-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMicrobotEvolutionLab.hta
More file actions
270 lines (269 loc) · 245 KB
/
Copy pathMicrobotEvolutionLab.hta
File metadata and controls
270 lines (269 loc) · 245 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta charset="utf-8" />
<title>Microbot Evolution Lab - 0.1.206</title>
<HTA:APPLICATION
ID="MicrobotEvolutionLabApp"
APPLICATIONNAME="Microbot Evolution Lab"
BORDER="thin"
BORDERSTYLE="normal"
CAPTION="yes"
ICON="favicon.ico"
MAXIMIZEBUTTON="yes"
MINIMIZEBUTTON="yes"
SHOWINTASKBAR="yes"
SINGLEINSTANCE="yes"
SYSMENU="yes"
WINDOWSTATE="maximize"
NAVIGABLE="yes"
/>
<html lang="en">
<head>
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta charset="UTF-8" />
<link rel="icon" type="image/svg+xml" href="data:image/svg+xml,<svg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 100 100%22><text y=%22.9em%22 font-size=%2290%22>🤖</text></svg>" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Microbot Evolution Lab - Beta 0.1.2</title>
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&family=JetBrains+Mono:wght@400;600;800&display=swap" rel="stylesheet">
<script>
window.onerror = function(msg, url, line) {
console.error("Diagnostic error listener caught:", msg, url, line);
}; var container = document.getElementById('root');
if (container) {
container.innerHTML = '<div style="background:#080E14;color:#FF6B00;padding:30px;font-family:monospace;min-height:100vh;">' +
'<h2 style="color:#00E5FF">⚠️ MICROBOT EVOLUTION LAB RUNTIME LOG</h2>' +
'<p style="margin-top:10px;"><strong>Error:</strong> ' + msg + '</p>' +
'<p><strong>Location:</strong> Line ' + lineNo + ':' + columnNo + '</p>' +
'<pre style="background:#0f1a24;padding:15px;border:1px solid #00E5FF;margin-top:15px;color:#fff;overflow:auto;">' + (error && error.stack ? error.stack : msg) + '</pre>' +
'</div>';
}
return false;
};
</script>
<script type="module" crossorigin>var jc=Object.defineProperty;var Mc=(e,t,n)=>t in e?jc(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var P=(e,t,n)=>Mc(e,typeof t!="symbol"?t+"":t,n);(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))r(i);new MutationObserver(i=>{for(const l of i)if(l.type==="childList")for(const o of l.addedNodes)o.tagName==="LINK"&&o.rel==="modulepreload"&&r(o)}).observe(document,{childList:!0,subtree:!0});function n(i){const l={};return i.integrity&&(l.integrity=i.integrity),i.referrerPolicy&&(l.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?l.credentials="include":i.crossOrigin==="anonymous"?l.credentials="omit":l.credentials="same-origin",l}function r(i){if(i.ep)return;i.ep=!0;const l=n(i);fetch(i.href,l)}})();function Cc(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var oa={exports:{}},ci={},sa={exports:{}},O={};/**
* @license React
* react.production.min.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/var rr=Symbol.for("react.element"),Rc=Symbol.for("react.portal"),Fc=Symbol.for("react.fragment"),Tc=Symbol.for("react.strict_mode"),Nc=Symbol.for("react.profiler"),Pc=Symbol.for("react.provider"),Ic=Symbol.for("react.context"),zc=Symbol.for("react.forward_ref"),_c=Symbol.for("react.suspense"),Bc=Symbol.for("react.memo"),Oc=Symbol.for("react.lazy"),Qo=Symbol.iterator;function Lc(e){return e===null||typeof e!="object"?null:(e=Qo&&e[Qo]||e["@@iterator"],typeof e=="function"?e:null)}var aa={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},ua=Object.assign,ca={};function yn(e,t,n){this.props=e,this.context=t,this.refs=ca,this.updater=n||aa}yn.prototype.isReactComponent={};yn.prototype.setState=function(e,t){if(typeof e!="object"&&typeof e!="function"&&e!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")};yn.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function da(){}da.prototype=yn.prototype;function Kl(e,t,n){this.props=e,this.context=t,this.refs=ca,this.updater=n||aa}var Xl=Kl.prototype=new da;Xl.constructor=Kl;ua(Xl,yn.prototype);Xl.isPureReactComponent=!0;var Yo=Array.isArray,fa=Object.prototype.hasOwnProperty,Zl={current:null},ha={key:!0,ref:!0,__self:!0,__source:!0};function pa(e,t,n){var r,i={},l=null,o=null;if(t!=null)for(r in t.ref!==void 0&&(o=t.ref),t.key!==void 0&&(l=""+t.key),t)fa.call(t,r)&&!ha.hasOwnProperty(r)&&(i[r]=t[r]);var u=arguments.length-2;if(u===1)i.children=n;else if(1<u){for(var d=Array(u),f=0;f<u;f++)d[f]=arguments[f+2];i.children=d}if(e&&e.defaultProps)for(r in u=e.defaultProps,u)i[r]===void 0&&(i[r]=u[r]);return{$$typeof:rr,type:e,key:l,ref:o,props:i,_owner:Zl.current}}function Dc(e,t){return{$$typeof:rr,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}function ql(e){return typeof e=="object"&&e!==null&&e.$$typeof===rr}function Ac(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(n){return t[n]})}var Ko=/\/+/g;function Ri(e,t){return typeof e=="object"&&e!==null&&e.key!=null?Ac(""+e.key):t.toString(36)}function Fr(e,t,n,r,i){var l=typeof e;(l==="undefined"||l==="boolean")&&(e=null);var o=!1;if(e===null)o=!0;else switch(l){case"string":case"number":o=!0;break;case"object":switch(e.$$typeof){case rr:case Rc:o=!0}}if(o)return o=e,i=i(o),e=r===""?"."+Ri(o,0):r,Yo(i)?(n="",e!=null&&(n=e.replace(Ko,"$&/")+"/"),Fr(i,t,n,"",function(f){return f})):i!=null&&(ql(i)&&(i=Dc(i,n+(!i.key||o&&o.key===i.key?"":(""+i.key).replace(Ko,"$&/")+"/")+e)),t.push(i)),1;if(o=0,r=r===""?".":r+":",Yo(e))for(var u=0;u<e.length;u++){l=e[u];var d=r+Ri(l,u);o+=Fr(l,t,n,d,i)}else if(d=Lc(e),typeof d=="function")for(e=d.call(e),u=0;!(l=e.next()).done;)l=l.value,d=r+Ri(l,u++),o+=Fr(l,t,n,d,i);else if(l==="object")throw t=String(e),Error("Objects are not valid as a React child (found: "+(t==="[object Object]"?"object with keys {"+Object.keys(e).join(", ")+"}":t)+"). If you meant to render a collection of children, use an array instead.");return o}function dr(e,t,n){if(e==null)return e;var r=[],i=0;return Fr(e,r,"","",function(l){return t.call(n,l,i++)}),r}function bc(e){if(e._status===-1){var t=e._result;t=t(),t.then(function(n){(e._status===0||e._status===-1)&&(e._status=1,e._result=n)},function(n){(e._status===0||e._status===-1)&&(e._status=2,e._result=n)}),e._status===-1&&(e._status=0,e._result=t)}if(e._status===1)return e._result.default;throw e._result}var ye={current:null},Tr={transition:null},Hc={ReactCurrentDispatcher:ye,ReactCurrentBatchConfig:Tr,ReactCurrentOwner:Zl};function ya(){throw Error("act(...) is not supported in production builds of React.")}O.Children={map:dr,forEach:function(e,t,n){dr(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return dr(e,function(){t++}),t},toArray:function(e){return dr(e,function(t){return t})||[]},only:function(e){if(!ql(e))throw Error("React.Children.only expected to receive a single React element child.");return e}};O.Component=yn;O.Fragment=Fc;O.Profiler=Nc;O.PureComponent=Kl;O.StrictMode=Tc;O.Suspense=_c;O.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=Hc;O.act=ya;O.cloneElement=function(e,t,n){if(e==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+e+".");var r=ua({},e.props),i=e.key,l=e.ref,o=e._owner;if(t!=null){if(t.ref!==void 0&&(l=t.ref,o=Zl.current),t.key!==void 0&&(i=""+t.key),e.type&&e.type.defaultProps)var u=e.type.defaultProps;for(d in t)fa.call(t,d)&&!ha.hasOwnProperty(d)&&(r[d]=t[d]===void 0&&u!==void 0?u[d]:t[d])}var d=arguments.length-2;if(d===1)r.children=n;else if(1<d){u=Array(d);for(var f=0;f<d;f++)u[f]=arguments[f+2];r.children=u}return{$$typeof:rr,type:e.type,key:i,ref:l,props:r,_owner:o}};O.createContext=function(e){return e={$$typeof:Ic,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},e.Provider={$$typeof:Pc,_context:e},e.Consumer=e};O.createElement=pa;O.createFactory=function(e){var t=pa.bind(null,e);return t.type=e,t};O.createRef=function(){return{current:null}};O.forwardRef=function(e){return{$$typeof:zc,render:e}};O.isValidElement=ql;O.lazy=function(e){return{$$typeof:Oc,_payload:{_status:-1,_result:e},_init:bc}};O.memo=function(e,t){return{$$typeof:Bc,type:e,compare:t===void 0?null:t}};O.startTransition=function(e){var t=Tr.transition;Tr.transition={};try{e()}finally{Tr.transition=t}};O.unstable_act=ya;O.useCallback=function(e,t){return ye.current.useCallback(e,t)};O.useContext=function(e){return ye.current.useContext(e)};O.useDebugValue=function(){};O.useDeferredValue=function(e){return ye.current.useDeferredValue(e)};O.useEffect=function(e,t){return ye.current.useEffect(e,t)};O.useId=function(){return ye.current.useId()};O.useImperativeHandle=function(e,t,n){return ye.current.useImperativeHandle(e,t,n)};O.useInsertionEffect=function(e,t){return ye.current.useInsertionEffect(e,t)};O.useLayoutEffect=function(e,t){return ye.current.useLayoutEffect(e,t)};O.useMemo=function(e,t){return ye.current.useMemo(e,t)};O.useReducer=function(e,t,n){return ye.current.useReducer(e,t,n)};O.useRef=function(e){return ye.current.useRef(e)};O.useState=function(e){return ye.current.useState(e)};O.useSyncExternalStore=function(e,t,n){return ye.current.useSyncExternalStore(e,t,n)};O.useTransition=function(){return ye.current.useTransition()};O.version="18.3.1";sa.exports=O;var B=sa.exports;const ma=Cc(B);/**
* @license React
* react-jsx-runtime.production.min.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/var Uc=B,Wc=Symbol.for("react.element"),$c=Symbol.for("react.fragment"),Vc=Object.prototype.hasOwnProperty,Gc=Uc.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,Jc={key:!0,ref:!0,__self:!0,__source:!0};function ga(e,t,n){var r,i={},l=null,o=null;n!==void 0&&(l=""+n),t.key!==void 0&&(l=""+t.key),t.ref!==void 0&&(o=t.ref);for(r in t)Vc.call(t,r)&&!Jc.hasOwnProperty(r)&&(i[r]=t[r]);if(e&&e.defaultProps)for(r in t=e.defaultProps,t)i[r]===void 0&&(i[r]=t[r]);return{$$typeof:Wc,type:e,key:l,ref:o,props:i,_owner:Gc.current}}ci.Fragment=$c;ci.jsx=ga;ci.jsxs=ga;oa.exports=ci;var s=oa.exports,nl={},va={exports:{}},Fe={},xa={exports:{}},Sa={};/**
* @license React
* scheduler.production.min.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/(function(e){function t(R,N){var _=R.length;R.push(N);e:for(;0<_;){var Y=_-1>>>1,b=R[Y];if(0<i(b,N))R[Y]=N,R[_]=b,_=Y;else break e}}function n(R){return R.length===0?null:R[0]}function r(R){if(R.length===0)return null;var N=R[0],_=R.pop();if(_!==N){R[0]=_;e:for(var Y=0,b=R.length,$e=b>>>1;Y<$e;){var Oe=2*(Y+1)-1,Ci=R[Oe],Ct=Oe+1,cr=R[Ct];if(0>i(Ci,_))Ct<b&&0>i(cr,Ci)?(R[Y]=cr,R[Ct]=_,Y=Ct):(R[Y]=Ci,R[Oe]=_,Y=Oe);else if(Ct<b&&0>i(cr,_))R[Y]=cr,R[Ct]=_,Y=Ct;else break e}}return N}function i(R,N){var _=R.sortIndex-N.sortIndex;return _!==0?_:R.id-N.id}if(typeof performance=="object"&&typeof performance.now=="function"){var l=performance;e.unstable_now=function(){return l.now()}}else{var o=Date,u=o.now();e.unstable_now=function(){return o.now()-u}}var d=[],f=[],g=1,c=null,m=3,x=!1,w=!1,S=!1,C=typeof setTimeout=="function"?setTimeout:null,h=typeof clearTimeout=="function"?clearTimeout:null,a=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function p(R){for(var N=n(f);N!==null;){if(N.callback===null)r(f);else if(N.startTime<=R)r(f),N.sortIndex=N.expirationTime,t(d,N);else break;N=n(f)}}function v(R){if(S=!1,p(R),!w)if(n(d)!==null)w=!0,G(y);else{var N=n(f);N!==null&&Ee(v,N.startTime-R)}}function y(R,N){w=!1,S&&(S=!1,h(M),M=-1),x=!0;var _=m;try{for(p(N),c=n(d);c!==null&&(!(c.expirationTime>N)||R&&!W());){var Y=c.callback;if(typeof Y=="function"){c.callback=null,m=c.priorityLevel;var b=Y(c.expirationTime<=N);N=e.unstable_now(),typeof b=="function"?c.callback=b:c===n(d)&&r(d),p(N)}else r(d);c=n(d)}if(c!==null)var $e=!0;else{var Oe=n(f);Oe!==null&&Ee(v,Oe.startTime-N),$e=!1}return $e}finally{c=null,m=_,x=!1}}var j=!1,k=null,M=-1,z=5,I=-1;function W(){return!(e.unstable_now()-I<z)}function ge(){if(k!==null){var R=e.unstable_now();I=R;var N=!0;try{N=k(!0,R)}finally{N?Q():(j=!1,k=null)}}else j=!1}var Q;if(typeof a=="function")Q=function(){a(ge)};else if(typeof MessageChannel<"u"){var T=new MessageChannel,L=T.port2;T.port1.onmessage=ge,Q=function(){L.postMessage(null)}}else Q=function(){C(ge,0)};function G(R){k=R,j||(j=!0,Q())}function Ee(R,N){M=C(function(){R(e.unstable_now())},N)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(R){R.callback=null},e.unstable_continueExecution=function(){w||x||(w=!0,G(y))},e.unstable_forceFrameRate=function(R){0>R||125<R?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):z=0<R?Math.floor(1e3/R):5},e.unstable_getCurrentPriorityLevel=function(){return m},e.unstable_getFirstCallbackNode=function(){return n(d)},e.unstable_next=function(R){switch(m){case 1:case 2:case 3:var N=3;break;default:N=m}var _=m;m=N;try{return R()}finally{m=_}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(R,N){switch(R){case 1:case 2:case 3:case 4:case 5:break;default:R=3}var _=m;m=R;try{return N()}finally{m=_}},e.unstable_scheduleCallback=function(R,N,_){var Y=e.unstable_now();switch(typeof _=="object"&&_!==null?(_=_.delay,_=typeof _=="number"&&0<_?Y+_:Y):_=Y,R){case 1:var b=-1;break;case 2:b=250;break;case 5:b=1073741823;break;case 4:b=1e4;break;default:b=5e3}return b=_+b,R={id:g++,callback:N,priorityLevel:R,startTime:_,expirationTime:b,sortIndex:-1},_>Y?(R.sortIndex=_,t(f,R),n(d)===null&&R===n(f)&&(S?(h(M),M=-1):S=!0,Ee(v,_-Y))):(R.sortIndex=b,t(d,R),w||x||(w=!0,G(y))),R},e.unstable_shouldYield=W,e.unstable_wrapCallback=function(R){var N=m;return function(){var _=m;m=N;try{return R.apply(this,arguments)}finally{m=_}}}})(Sa);xa.exports=Sa;var Qc=xa.exports;/**
* @license React
* react-dom.production.min.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/var Yc=B,Re=Qc;function E(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n]);return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var wa=new Set,bn={};function At(e,t){an(e,t),an(e+"Capture",t)}function an(e,t){for(bn[e]=t,e=0;e<t.length;e++)wa.add(t[e])}var tt=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),rl=Object.prototype.hasOwnProperty,Kc=/^[: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]*$/,Xo={},Zo={};function Xc(e){return rl.call(Zo,e)?!0:rl.call(Xo,e)?!1:Kc.test(e)?Zo[e]=!0:(Xo[e]=!0,!1)}function Zc(e,t,n,r){if(n!==null&&n.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return r?!1:n!==null?!n.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function qc(e,t,n,r){if(t===null||typeof t>"u"||Zc(e,t,n,r))return!0;if(r)return!1;if(n!==null)switch(n.type){case 3:return!t;case 4:return t===!1;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function me(e,t,n,r,i,l,o){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=r,this.attributeNamespace=i,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=l,this.removeEmptyString=o}var ae={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){ae[e]=new me(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];ae[t]=new me(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){ae[e]=new me(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){ae[e]=new me(e,2,!1,e,null,!1,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){ae[e]=new me(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){ae[e]=new me(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){ae[e]=new me(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){ae[e]=new me(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){ae[e]=new me(e,5,!1,e.toLowerCase(),null,!1,!1)});var eo=/[\-:]([a-z])/g;function to(e){return e[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var t=e.replace(eo,to);ae[t]=new me(t,1,!1,e,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var t=e.replace(eo,to);ae[t]=new me(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(eo,to);ae[t]=new me(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){ae[e]=new me(e,1,!1,e.toLowerCase(),null,!1,!1)});ae.xlinkHref=new me("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){ae[e]=new me(e,1,!1,e.toLowerCase(),null,!0,!0)});function no(e,t,n,r){var i=ae.hasOwnProperty(t)?ae[t]:null;(i!==null?i.type!==0:r||!(2<t.length)||t[0]!=="o"&&t[0]!=="O"||t[1]!=="n"&&t[1]!=="N")&&(qc(t,n,i,r)&&(n=null),r||i===null?Xc(t)&&(n===null?e.removeAttribute(t):e.setAttribute(t,""+n)):i.mustUseProperty?e[i.propertyName]=n===null?i.type===3?!1:"":n:(t=i.attributeName,r=i.attributeNamespace,n===null?e.removeAttribute(t):(i=i.type,n=i===3||i===4&&n===!0?"":""+n,r?e.setAttributeNS(r,t,n):e.setAttribute(t,n))))}var lt=Yc.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,fr=Symbol.for("react.element"),Ut=Symbol.for("react.portal"),Wt=Symbol.for("react.fragment"),ro=Symbol.for("react.strict_mode"),il=Symbol.for("react.profiler"),ka=Symbol.for("react.provider"),Ea=Symbol.for("react.context"),io=Symbol.for("react.forward_ref"),ll=Symbol.for("react.suspense"),ol=Symbol.for("react.suspense_list"),lo=Symbol.for("react.memo"),st=Symbol.for("react.lazy"),ja=Symbol.for("react.offscreen"),qo=Symbol.iterator;function vn(e){return e===null||typeof e!="object"?null:(e=qo&&e[qo]||e["@@iterator"],typeof e=="function"?e:null)}var Z=Object.assign,Fi;function Cn(e){if(Fi===void 0)try{throw Error()}catch(n){var t=n.stack.trim().match(/\n( *(at )?)/);Fi=t&&t[1]||""}return`
`+Fi+e}var Ti=!1;function Ni(e,t){if(!e||Ti)return"";Ti=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(t)if(t=function(){throw Error()},Object.defineProperty(t.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(t,[])}catch(f){var r=f}Reflect.construct(e,[],t)}else{try{t.call()}catch(f){r=f}e.call(t.prototype)}else{try{throw Error()}catch(f){r=f}e()}}catch(f){if(f&&r&&typeof f.stack=="string"){for(var i=f.stack.split(`
`),l=r.stack.split(`
`),o=i.length-1,u=l.length-1;1<=o&&0<=u&&i[o]!==l[u];)u--;for(;1<=o&&0<=u;o--,u--)if(i[o]!==l[u]){if(o!==1||u!==1)do if(o--,u--,0>u||i[o]!==l[u]){var d=`
`+i[o].replace(" at new "," at ");return e.displayName&&d.includes("<anonymous>")&&(d=d.replace("<anonymous>",e.displayName)),d}while(1<=o&&0<=u);break}}}finally{Ti=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?Cn(e):""}function ed(e){switch(e.tag){case 5:return Cn(e.type);case 16:return Cn("Lazy");case 13:return Cn("Suspense");case 19:return Cn("SuspenseList");case 0:case 2:case 15:return e=Ni(e.type,!1),e;case 11:return e=Ni(e.type.render,!1),e;case 1:return e=Ni(e.type,!0),e;default:return""}}function sl(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case Wt:return"Fragment";case Ut:return"Portal";case il:return"Profiler";case ro:return"StrictMode";case ll:return"Suspense";case ol:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case Ea:return(e.displayName||"Context")+".Consumer";case ka:return(e._context.displayName||"Context")+".Provider";case io:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case lo:return t=e.displayName||null,t!==null?t:sl(e.type)||"Memo";case st:t=e._payload,e=e._init;try{return sl(e(t))}catch{}}return null}function td(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=t.render,e=e.displayName||e.name||"",t.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return sl(t);case 8:return t===ro?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t}return null}function wt(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function Ma(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function nd(e){var t=Ma(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var i=n.get,l=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(o){r=""+o,l.call(this,o)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(o){r=""+o},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function hr(e){e._valueTracker||(e._valueTracker=nd(e))}function Ca(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=Ma(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function br(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}function al(e,t){var n=t.checked;return Z({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function es(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=wt(t.value!=null?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function Ra(e,t){t=t.checked,t!=null&&no(e,"checked",t,!1)}function ul(e,t){Ra(e,t);var n=wt(t.value),r=t.type;if(n!=null)r==="number"?(n===0&&e.value===""||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if(r==="submit"||r==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?cl(e,t.type,n):t.hasOwnProperty("defaultValue")&&cl(e,t.type,wt(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function ts(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!(r!=="submit"&&r!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}n=e.name,n!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,n!==""&&(e.name=n)}function cl(e,t,n){(t!=="number"||br(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var Rn=Array.isArray;function tn(e,t,n,r){if(e=e.options,t){t={};for(var i=0;i<n.length;i++)t["$"+n[i]]=!0;for(n=0;n<e.length;n++)i=t.hasOwnProperty("$"+e[n].value),e[n].selected!==i&&(e[n].selected=i),i&&r&&(e[n].defaultSelected=!0)}else{for(n=""+wt(n),t=null,i=0;i<e.length;i++){if(e[i].value===n){e[i].selected=!0,r&&(e[i].defaultSelected=!0);return}t!==null||e[i].disabled||(t=e[i])}t!==null&&(t.selected=!0)}}function dl(e,t){if(t.dangerouslySetInnerHTML!=null)throw Error(E(91));return Z({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function ns(e,t){var n=t.value;if(n==null){if(n=t.children,t=t.defaultValue,n!=null){if(t!=null)throw Error(E(92));if(Rn(n)){if(1<n.length)throw Error(E(93));n=n[0]}t=n}t==null&&(t=""),n=t}e._wrapperState={initialValue:wt(n)}}function Fa(e,t){var n=wt(t.value),r=wt(t.defaultValue);n!=null&&(n=""+n,n!==e.value&&(e.value=n),t.defaultValue==null&&e.defaultValue!==n&&(e.defaultValue=n)),r!=null&&(e.defaultValue=""+r)}function rs(e){var t=e.textContent;t===e._wrapperState.initialValue&&t!==""&&t!==null&&(e.value=t)}function Ta(e){switch(e){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function fl(e,t){return e==null||e==="http://www.w3.org/1999/xhtml"?Ta(t):e==="http://www.w3.org/2000/svg"&&t==="foreignObject"?"http://www.w3.org/1999/xhtml":e}var pr,Na=function(e){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(t,n,r,i){MSApp.execUnsafeLocalFunction(function(){return e(t,n,r,i)})}:e}(function(e,t){if(e.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in e)e.innerHTML=t;else{for(pr=pr||document.createElement("div"),pr.innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=pr.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function Hn(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var Pn={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},rd=["Webkit","ms","Moz","O"];Object.keys(Pn).forEach(function(e){rd.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),Pn[t]=Pn[e]})});function Pa(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||Pn.hasOwnProperty(e)&&Pn[e]?(""+t).trim():t+"px"}function Ia(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,i=Pa(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,i):e[n]=i}}var id=Z({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function hl(e,t){if(t){if(id[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(E(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(E(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(E(61))}if(t.style!=null&&typeof t.style!="object")throw Error(E(62))}}function pl(e,t){if(e.indexOf("-")===-1)return typeof t.is=="string";switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var yl=null;function oo(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var ml=null,nn=null,rn=null;function is(e){if(e=or(e)){if(typeof ml!="function")throw Error(E(280));var t=e.stateNode;t&&(t=yi(t),ml(e.stateNode,e.type,t))}}function za(e){nn?rn?rn.push(e):rn=[e]:nn=e}function _a(){if(nn){var e=nn,t=rn;if(rn=nn=null,is(e),t)for(e=0;e<t.length;e++)is(t[e])}}function Ba(e,t){return e(t)}function Oa(){}var Pi=!1;function La(e,t,n){if(Pi)return e(t,n);Pi=!0;try{return Ba(e,t,n)}finally{Pi=!1,(nn!==null||rn!==null)&&(Oa(),_a())}}function Un(e,t){var n=e.stateNode;if(n===null)return null;var r=yi(n);if(r===null)return null;n=r[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(r=!r.disabled)||(e=e.type,r=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!r;break e;default:e=!1}if(e)return null;if(n&&typeof n!="function")throw Error(E(231,t,typeof n));return n}var gl=!1;if(tt)try{var xn={};Object.defineProperty(xn,"passive",{get:function(){gl=!0}}),window.addEventListener("test",xn,xn),window.removeEventListener("test",xn,xn)}catch{gl=!1}function ld(e,t,n,r,i,l,o,u,d){var f=Array.prototype.slice.call(arguments,3);try{t.apply(n,f)}catch(g){this.onError(g)}}var In=!1,Hr=null,Ur=!1,vl=null,od={onError:function(e){In=!0,Hr=e}};function sd(e,t,n,r,i,l,o,u,d){In=!1,Hr=null,ld.apply(od,arguments)}function ad(e,t,n,r,i,l,o,u,d){if(sd.apply(this,arguments),In){if(In){var f=Hr;In=!1,Hr=null}else throw Error(E(198));Ur||(Ur=!0,vl=f)}}function bt(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,t.flags&4098&&(n=t.return),e=t.return;while(e)}return t.tag===3?n:null}function Da(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function ls(e){if(bt(e)!==e)throw Error(E(188))}function ud(e){var t=e.alternate;if(!t){if(t=bt(e),t===null)throw Error(E(188));return t!==e?null:e}for(var n=e,r=t;;){var i=n.return;if(i===null)break;var l=i.alternate;if(l===null){if(r=i.return,r!==null){n=r;continue}break}if(i.child===l.child){for(l=i.child;l;){if(l===n)return ls(i),e;if(l===r)return ls(i),t;l=l.sibling}throw Error(E(188))}if(n.return!==r.return)n=i,r=l;else{for(var o=!1,u=i.child;u;){if(u===n){o=!0,n=i,r=l;break}if(u===r){o=!0,r=i,n=l;break}u=u.sibling}if(!o){for(u=l.child;u;){if(u===n){o=!0,n=l,r=i;break}if(u===r){o=!0,r=l,n=i;break}u=u.sibling}if(!o)throw Error(E(189))}}if(n.alternate!==r)throw Error(E(190))}if(n.tag!==3)throw Error(E(188));return n.stateNode.current===n?e:t}function Aa(e){return e=ud(e),e!==null?ba(e):null}function ba(e){if(e.tag===5||e.tag===6)return e;for(e=e.child;e!==null;){var t=ba(e);if(t!==null)return t;e=e.sibling}return null}var Ha=Re.unstable_scheduleCallback,os=Re.unstable_cancelCallback,cd=Re.unstable_shouldYield,dd=Re.unstable_requestPaint,ee=Re.unstable_now,fd=Re.unstable_getCurrentPriorityLevel,so=Re.unstable_ImmediatePriority,Ua=Re.unstable_UserBlockingPriority,Wr=Re.unstable_NormalPriority,hd=Re.unstable_LowPriority,Wa=Re.unstable_IdlePriority,di=null,Qe=null;function pd(e){if(Qe&&typeof Qe.onCommitFiberRoot=="function")try{Qe.onCommitFiberRoot(di,e,void 0,(e.current.flags&128)===128)}catch{}}var He=Math.clz32?Math.clz32:gd,yd=Math.log,md=Math.LN2;function gd(e){return e>>>=0,e===0?32:31-(yd(e)/md|0)|0}var yr=64,mr=4194304;function Fn(e){switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return e&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return e&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function $r(e,t){var n=e.pendingLanes;if(n===0)return 0;var r=0,i=e.suspendedLanes,l=e.pingedLanes,o=n&268435455;if(o!==0){var u=o&~i;u!==0?r=Fn(u):(l&=o,l!==0&&(r=Fn(l)))}else o=n&~i,o!==0?r=Fn(o):l!==0&&(r=Fn(l));if(r===0)return 0;if(t!==0&&t!==r&&!(t&i)&&(i=r&-r,l=t&-t,i>=l||i===16&&(l&4194240)!==0))return t;if(r&4&&(r|=n&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=r;0<t;)n=31-He(t),i=1<<n,r|=e[n],t&=~i;return r}function vd(e,t){switch(e){case 1:case 2:case 4:return t+250;case 8:case 16:case 32:case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return-1;case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function xd(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,i=e.expirationTimes,l=e.pendingLanes;0<l;){var o=31-He(l),u=1<<o,d=i[o];d===-1?(!(u&n)||u&r)&&(i[o]=vd(u,t)):d<=t&&(e.expiredLanes|=u),l&=~u}}function xl(e){return e=e.pendingLanes&-1073741825,e!==0?e:e&1073741824?1073741824:0}function $a(){var e=yr;return yr<<=1,!(yr&4194240)&&(yr=64),e}function Ii(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function ir(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-He(t),e[t]=n}function Sd(e,t){var n=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var r=e.eventTimes;for(e=e.expirationTimes;0<n;){var i=31-He(n),l=1<<i;t[i]=0,r[i]=-1,e[i]=-1,n&=~l}}function ao(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-He(n),i=1<<r;i&t|e[r]&t&&(e[r]|=t),n&=~i}}var H=0;function Va(e){return e&=-e,1<e?4<e?e&268435455?16:536870912:4:1}var Ga,uo,Ja,Qa,Ya,Sl=!1,gr=[],ht=null,pt=null,yt=null,Wn=new Map,$n=new Map,ut=[],wd="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset submit".split(" ");function ss(e,t){switch(e){case"focusin":case"focusout":ht=null;break;case"dragenter":case"dragleave":pt=null;break;case"mouseover":case"mouseout":yt=null;break;case"pointerover":case"pointerout":Wn.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":$n.delete(t.pointerId)}}function Sn(e,t,n,r,i,l){return e===null||e.nativeEvent!==l?(e={blockedOn:t,domEventName:n,eventSystemFlags:r,nativeEvent:l,targetContainers:[i]},t!==null&&(t=or(t),t!==null&&uo(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,i!==null&&t.indexOf(i)===-1&&t.push(i),e)}function kd(e,t,n,r,i){switch(t){case"focusin":return ht=Sn(ht,e,t,n,r,i),!0;case"dragenter":return pt=Sn(pt,e,t,n,r,i),!0;case"mouseover":return yt=Sn(yt,e,t,n,r,i),!0;case"pointerover":var l=i.pointerId;return Wn.set(l,Sn(Wn.get(l)||null,e,t,n,r,i)),!0;case"gotpointercapture":return l=i.pointerId,$n.set(l,Sn($n.get(l)||null,e,t,n,r,i)),!0}return!1}function Ka(e){var t=Tt(e.target);if(t!==null){var n=bt(t);if(n!==null){if(t=n.tag,t===13){if(t=Da(n),t!==null){e.blockedOn=t,Ya(e.priority,function(){Ja(n)});return}}else if(t===3&&n.stateNode.current.memoizedState.isDehydrated){e.blockedOn=n.tag===3?n.stateNode.containerInfo:null;return}}}e.blockedOn=null}function Nr(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=wl(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(n===null){n=e.nativeEvent;var r=new n.constructor(n.type,n);yl=r,n.target.dispatchEvent(r),yl=null}else return t=or(n),t!==null&&uo(t),e.blockedOn=n,!1;t.shift()}return!0}function as(e,t,n){Nr(e)&&n.delete(t)}function Ed(){Sl=!1,ht!==null&&Nr(ht)&&(ht=null),pt!==null&&Nr(pt)&&(pt=null),yt!==null&&Nr(yt)&&(yt=null),Wn.forEach(as),$n.forEach(as)}function wn(e,t){e.blockedOn===t&&(e.blockedOn=null,Sl||(Sl=!0,Re.unstable_scheduleCallback(Re.unstable_NormalPriority,Ed)))}function Vn(e){function t(i){return wn(i,e)}if(0<gr.length){wn(gr[0],e);for(var n=1;n<gr.length;n++){var r=gr[n];r.blockedOn===e&&(r.blockedOn=null)}}for(ht!==null&&wn(ht,e),pt!==null&&wn(pt,e),yt!==null&&wn(yt,e),Wn.forEach(t),$n.forEach(t),n=0;n<ut.length;n++)r=ut[n],r.blockedOn===e&&(r.blockedOn=null);for(;0<ut.length&&(n=ut[0],n.blockedOn===null);)Ka(n),n.blockedOn===null&&ut.shift()}var ln=lt.ReactCurrentBatchConfig,Vr=!0;function jd(e,t,n,r){var i=H,l=ln.transition;ln.transition=null;try{H=1,co(e,t,n,r)}finally{H=i,ln.transition=l}}function Md(e,t,n,r){var i=H,l=ln.transition;ln.transition=null;try{H=4,co(e,t,n,r)}finally{H=i,ln.transition=l}}function co(e,t,n,r){if(Vr){var i=wl(e,t,n,r);if(i===null)Ui(e,t,r,Gr,n),ss(e,r);else if(kd(i,e,t,n,r))r.stopPropagation();else if(ss(e,r),t&4&&-1<wd.indexOf(e)){for(;i!==null;){var l=or(i);if(l!==null&&Ga(l),l=wl(e,t,n,r),l===null&&Ui(e,t,r,Gr,n),l===i)break;i=l}i!==null&&r.stopPropagation()}else Ui(e,t,r,null,n)}}var Gr=null;function wl(e,t,n,r){if(Gr=null,e=oo(r),e=Tt(e),e!==null)if(t=bt(e),t===null)e=null;else if(n=t.tag,n===13){if(e=Da(t),e!==null)return e;e=null}else if(n===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null);return Gr=e,null}function Xa(e){switch(e){case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 1;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"toggle":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 4;case"message":switch(fd()){case so:return 1;case Ua:return 4;case Wr:case hd:return 16;case Wa:return 536870912;default:return 16}default:return 16}}var dt=null,fo=null,Pr=null;function Za(){if(Pr)return Pr;var e,t=fo,n=t.length,r,i="value"in dt?dt.value:dt.textContent,l=i.length;for(e=0;e<n&&t[e]===i[e];e++);var o=n-e;for(r=1;r<=o&&t[n-r]===i[l-r];r++);return Pr=i.slice(e,1<r?1-r:void 0)}function Ir(e){var t=e.keyCode;return"charCode"in e?(e=e.charCode,e===0&&t===13&&(e=13)):e=t,e===10&&(e=13),32<=e||e===13?e:0}function vr(){return!0}function us(){return!1}function Te(e){function t(n,r,i,l,o){this._reactName=n,this._targetInst=i,this.type=r,this.nativeEvent=l,this.target=o,this.currentTarget=null;for(var u in e)e.hasOwnProperty(u)&&(n=e[u],this[u]=n?n(l):l[u]);return this.isDefaultPrevented=(l.defaultPrevented!=null?l.defaultPrevented:l.returnValue===!1)?vr:us,this.isPropagationStopped=us,this}return Z(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var n=this.nativeEvent;n&&(n.preventDefault?n.preventDefault():typeof n.returnValue!="unknown"&&(n.returnValue=!1),this.isDefaultPrevented=vr)},stopPropagation:function(){var n=this.nativeEvent;n&&(n.stopPropagation?n.stopPropagation():typeof n.cancelBubble!="unknown"&&(n.cancelBubble=!0),this.isPropagationStopped=vr)},persist:function(){},isPersistent:vr}),t}var mn={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},ho=Te(mn),lr=Z({},mn,{view:0,detail:0}),Cd=Te(lr),zi,_i,kn,fi=Z({},lr,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:po,button:0,buttons:0,relatedTarget:function(e){return e.relatedTarget===void 0?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return"movementX"in e?e.movementX:(e!==kn&&(kn&&e.type==="mousemove"?(zi=e.screenX-kn.screenX,_i=e.screenY-kn.screenY):_i=zi=0,kn=e),zi)},movementY:function(e){return"movementY"in e?e.movementY:_i}}),cs=Te(fi),Rd=Z({},fi,{dataTransfer:0}),Fd=Te(Rd),Td=Z({},lr,{relatedTarget:0}),Bi=Te(Td),Nd=Z({},mn,{animationName:0,elapsedTime:0,pseudoElement:0}),Pd=Te(Nd),Id=Z({},mn,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),zd=Te(Id),_d=Z({},mn,{data:0}),ds=Te(_d),Bd={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},Od={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"},Ld={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function Dd(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=Ld[e])?!!t[e]:!1}function po(){return Dd}var Ad=Z({},lr,{key:function(e){if(e.key){var t=Bd[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=Ir(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?Od[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:po,charCode:function(e){return e.type==="keypress"?Ir(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?Ir(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),bd=Te(Ad),Hd=Z({},fi,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),fs=Te(Hd),Ud=Z({},lr,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:po}),Wd=Te(Ud),$d=Z({},mn,{propertyName:0,elapsedTime:0,pseudoElement:0}),Vd=Te($d),Gd=Z({},fi,{deltaX:function(e){return"deltaX"in e?e.deltaX:"wheelDeltaX"in e?-e.wheelDeltaX:0},deltaY:function(e){return"deltaY"in e?e.deltaY:"wheelDeltaY"in e?-e.wheelDeltaY:"wheelDelta"in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0}),Jd=Te(Gd),Qd=[9,13,27,32],yo=tt&&"CompositionEvent"in window,zn=null;tt&&"documentMode"in document&&(zn=document.documentMode);var Yd=tt&&"TextEvent"in window&&!zn,qa=tt&&(!yo||zn&&8<zn&&11>=zn),hs=" ",ps=!1;function eu(e,t){switch(e){case"keyup":return Qd.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function tu(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var $t=!1;function Kd(e,t){switch(e){case"compositionend":return tu(t);case"keypress":return t.which!==32?null:(ps=!0,hs);case"textInput":return e=t.data,e===hs&&ps?null:e;default:return null}}function Xd(e,t){if($t)return e==="compositionend"||!yo&&eu(e,t)?(e=Za(),Pr=fo=dt=null,$t=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case"compositionend":return qa&&t.locale!=="ko"?null:t.data;default:return null}}var Zd={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 ys(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!Zd[e.type]:t==="textarea"}function nu(e,t,n,r){za(r),t=Jr(t,"onChange"),0<t.length&&(n=new ho("onChange","change",null,n,r),e.push({event:n,listeners:t}))}var _n=null,Gn=null;function qd(e){hu(e,0)}function hi(e){var t=Jt(e);if(Ca(t))return e}function ef(e,t){if(e==="change")return t}var ru=!1;if(tt){var Oi;if(tt){var Li="oninput"in document;if(!Li){var ms=document.createElement("div");ms.setAttribute("oninput","return;"),Li=typeof ms.oninput=="function"}Oi=Li}else Oi=!1;ru=Oi&&(!document.documentMode||9<document.documentMode)}function gs(){_n&&(_n.detachEvent("onpropertychange",iu),Gn=_n=null)}function iu(e){if(e.propertyName==="value"&&hi(Gn)){var t=[];nu(t,Gn,e,oo(e)),La(qd,t)}}function tf(e,t,n){e==="focusin"?(gs(),_n=t,Gn=n,_n.attachEvent("onpropertychange",iu)):e==="focusout"&&gs()}function nf(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return hi(Gn)}function rf(e,t){if(e==="click")return hi(t)}function lf(e,t){if(e==="input"||e==="change")return hi(t)}function of(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var We=typeof Object.is=="function"?Object.is:of;function Jn(e,t){if(We(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(r=0;r<n.length;r++){var i=n[r];if(!rl.call(t,i)||!We(e[i],t[i]))return!1}return!0}function vs(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function xs(e,t){var n=vs(e);e=0;for(var r;n;){if(n.nodeType===3){if(r=e+n.textContent.length,e<=t&&r>=t)return{node:n,offset:t-e};e=r}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=vs(n)}}function lu(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?lu(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function ou(){for(var e=window,t=br();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=br(e.document)}return t}function mo(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}function sf(e){var t=ou(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&lu(n.ownerDocument.documentElement,n)){if(r!==null&&mo(n)){if(t=r.start,e=r.end,e===void 0&&(e=t),"selectionStart"in n)n.selectionStart=t,n.selectionEnd=Math.min(e,n.value.length);else if(e=(t=n.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var i=n.textContent.length,l=Math.min(r.start,i);r=r.end===void 0?l:Math.min(r.end,i),!e.extend&&l>r&&(i=r,r=l,l=i),i=xs(n,l);var o=xs(n,r);i&&o&&(e.rangeCount!==1||e.anchorNode!==i.node||e.anchorOffset!==i.offset||e.focusNode!==o.node||e.focusOffset!==o.offset)&&(t=t.createRange(),t.setStart(i.node,i.offset),e.removeAllRanges(),l>r?(e.addRange(t),e.extend(o.node,o.offset)):(t.setEnd(o.node,o.offset),e.addRange(t)))}}for(t=[],e=n;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof n.focus=="function"&&n.focus(),n=0;n<t.length;n++)e=t[n],e.element.scrollLeft=e.left,e.element.scrollTop=e.top}}var af=tt&&"documentMode"in document&&11>=document.documentMode,Vt=null,kl=null,Bn=null,El=!1;function Ss(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;El||Vt==null||Vt!==br(r)||(r=Vt,"selectionStart"in r&&mo(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),Bn&&Jn(Bn,r)||(Bn=r,r=Jr(kl,"onSelect"),0<r.length&&(t=new ho("onSelect","select",null,t,n),e.push({event:t,listeners:r}),t.target=Vt)))}function xr(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var Gt={animationend:xr("Animation","AnimationEnd"),animationiteration:xr("Animation","AnimationIteration"),animationstart:xr("Animation","AnimationStart"),transitionend:xr("Transition","TransitionEnd")},Di={},su={};tt&&(su=document.createElement("div").style,"AnimationEvent"in window||(delete Gt.animationend.animation,delete Gt.animationiteration.animation,delete Gt.animationstart.animation),"TransitionEvent"in window||delete Gt.transitionend.transition);function pi(e){if(Di[e])return Di[e];if(!Gt[e])return e;var t=Gt[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in su)return Di[e]=t[n];return e}var au=pi("animationend"),uu=pi("animationiteration"),cu=pi("animationstart"),du=pi("transitionend"),fu=new Map,ws="abort auxClick cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");function Et(e,t){fu.set(e,t),At(t,[e])}for(var Ai=0;Ai<ws.length;Ai++){var bi=ws[Ai],uf=bi.toLowerCase(),cf=bi[0].toUpperCase()+bi.slice(1);Et(uf,"on"+cf)}Et(au,"onAnimationEnd");Et(uu,"onAnimationIteration");Et(cu,"onAnimationStart");Et("dblclick","onDoubleClick");Et("focusin","onFocus");Et("focusout","onBlur");Et(du,"onTransitionEnd");an("onMouseEnter",["mouseout","mouseover"]);an("onMouseLeave",["mouseout","mouseover"]);an("onPointerEnter",["pointerout","pointerover"]);an("onPointerLeave",["pointerout","pointerover"]);At("onChange","change click focusin focusout input keydown keyup selectionchange".split(" "));At("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" "));At("onBeforeInput",["compositionend","keypress","textInput","paste"]);At("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" "));At("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" "));At("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Tn="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(" "),df=new Set("cancel close invalid load scroll toggle".split(" ").concat(Tn));function ks(e,t,n){var r=e.type||"unknown-event";e.currentTarget=n,ad(r,t,void 0,e),e.currentTarget=null}function hu(e,t){t=(t&4)!==0;for(var n=0;n<e.length;n++){var r=e[n],i=r.event;r=r.listeners;e:{var l=void 0;if(t)for(var o=r.length-1;0<=o;o--){var u=r[o],d=u.instance,f=u.currentTarget;if(u=u.listener,d!==l&&i.isPropagationStopped())break e;ks(i,u,f),l=d}else for(o=0;o<r.length;o++){if(u=r[o],d=u.instance,f=u.currentTarget,u=u.listener,d!==l&&i.isPropagationStopped())break e;ks(i,u,f),l=d}}}if(Ur)throw e=vl,Ur=!1,vl=null,e}function $(e,t){var n=t[Fl];n===void 0&&(n=t[Fl]=new Set);var r=e+"__bubble";n.has(r)||(pu(t,e,2,!1),n.add(r))}function Hi(e,t,n){var r=0;t&&(r|=4),pu(n,e,r,t)}var Sr="_reactListening"+Math.random().toString(36).slice(2);function Qn(e){if(!e[Sr]){e[Sr]=!0,wa.forEach(function(n){n!=="selectionchange"&&(df.has(n)||Hi(n,!1,e),Hi(n,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[Sr]||(t[Sr]=!0,Hi("selectionchange",!1,t))}}function pu(e,t,n,r){switch(Xa(t)){case 1:var i=jd;break;case 4:i=Md;break;default:i=co}n=i.bind(null,t,n,e),i=void 0,!gl||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(i=!0),r?i!==void 0?e.addEventListener(t,n,{capture:!0,passive:i}):e.addEventListener(t,n,!0):i!==void 0?e.addEventListener(t,n,{passive:i}):e.addEventListener(t,n,!1)}function Ui(e,t,n,r,i){var l=r;if(!(t&1)&&!(t&2)&&r!==null)e:for(;;){if(r===null)return;var o=r.tag;if(o===3||o===4){var u=r.stateNode.containerInfo;if(u===i||u.nodeType===8&&u.parentNode===i)break;if(o===4)for(o=r.return;o!==null;){var d=o.tag;if((d===3||d===4)&&(d=o.stateNode.containerInfo,d===i||d.nodeType===8&&d.parentNode===i))return;o=o.return}for(;u!==null;){if(o=Tt(u),o===null)return;if(d=o.tag,d===5||d===6){r=l=o;continue e}u=u.parentNode}}r=r.return}La(function(){var f=l,g=oo(n),c=[];e:{var m=fu.get(e);if(m!==void 0){var x=ho,w=e;switch(e){case"keypress":if(Ir(n)===0)break e;case"keydown":case"keyup":x=bd;break;case"focusin":w="focus",x=Bi;break;case"focusout":w="blur",x=Bi;break;case"beforeblur":case"afterblur":x=Bi;break;case"click":if(n.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":x=cs;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":x=Fd;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":x=Wd;break;case au:case uu:case cu:x=Pd;break;case du:x=Vd;break;case"scroll":x=Cd;break;case"wheel":x=Jd;break;case"copy":case"cut":case"paste":x=zd;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":x=fs}var S=(t&4)!==0,C=!S&&e==="scroll",h=S?m!==null?m+"Capture":null:m;S=[];for(var a=f,p;a!==null;){p=a;var v=p.stateNode;if(p.tag===5&&v!==null&&(p=v,h!==null&&(v=Un(a,h),v!=null&&S.push(Yn(a,v,p)))),C)break;a=a.return}0<S.length&&(m=new x(m,w,null,n,g),c.push({event:m,listeners:S}))}}if(!(t&7)){e:{if(m=e==="mouseover"||e==="pointerover",x=e==="mouseout"||e==="pointerout",m&&n!==yl&&(w=n.relatedTarget||n.fromElement)&&(Tt(w)||w[nt]))break e;if((x||m)&&(m=g.window===g?g:(m=g.ownerDocument)?m.defaultView||m.parentWindow:window,x?(w=n.relatedTarget||n.toElement,x=f,w=w?Tt(w):null,w!==null&&(C=bt(w),w!==C||w.tag!==5&&w.tag!==6)&&(w=null)):(x=null,w=f),x!==w)){if(S=cs,v="onMouseLeave",h="onMouseEnter",a="mouse",(e==="pointerout"||e==="pointerover")&&(S=fs,v="onPointerLeave",h="onPointerEnter",a="pointer"),C=x==null?m:Jt(x),p=w==null?m:Jt(w),m=new S(v,a+"leave",x,n,g),m.target=C,m.relatedTarget=p,v=null,Tt(g)===f&&(S=new S(h,a+"enter",w,n,g),S.target=p,S.relatedTarget=C,v=S),C=v,x&&w)t:{for(S=x,h=w,a=0,p=S;p;p=Ht(p))a++;for(p=0,v=h;v;v=Ht(v))p++;for(;0<a-p;)S=Ht(S),a--;for(;0<p-a;)h=Ht(h),p--;for(;a--;){if(S===h||h!==null&&S===h.alternate)break t;S=Ht(S),h=Ht(h)}S=null}else S=null;x!==null&&Es(c,m,x,S,!1),w!==null&&C!==null&&Es(c,C,w,S,!0)}}e:{if(m=f?Jt(f):window,x=m.nodeName&&m.nodeName.toLowerCase(),x==="select"||x==="input"&&m.type==="file")var y=ef;else if(ys(m))if(ru)y=lf;else{y=nf;var j=tf}else(x=m.nodeName)&&x.toLowerCase()==="input"&&(m.type==="checkbox"||m.type==="radio")&&(y=rf);if(y&&(y=y(e,f))){nu(c,y,n,g);break e}j&&j(e,m,f),e==="focusout"&&(j=m._wrapperState)&&j.controlled&&m.type==="number"&&cl(m,"number",m.value)}switch(j=f?Jt(f):window,e){case"focusin":(ys(j)||j.contentEditable==="true")&&(Vt=j,kl=f,Bn=null);break;case"focusout":Bn=kl=Vt=null;break;case"mousedown":El=!0;break;case"contextmenu":case"mouseup":case"dragend":El=!1,Ss(c,n,g);break;case"selectionchange":if(af)break;case"keydown":case"keyup":Ss(c,n,g)}var k;if(yo)e:{switch(e){case"compositionstart":var M="onCompositionStart";break e;case"compositionend":M="onCompositionEnd";break e;case"compositionupdate":M="onCompositionUpdate";break e}M=void 0}else $t?eu(e,n)&&(M="onCompositionEnd"):e==="keydown"&&n.keyCode===229&&(M="onCompositionStart");M&&(qa&&n.locale!=="ko"&&($t||M!=="onCompositionStart"?M==="onCompositionEnd"&&$t&&(k=Za()):(dt=g,fo="value"in dt?dt.value:dt.textContent,$t=!0)),j=Jr(f,M),0<j.length&&(M=new ds(M,e,null,n,g),c.push({event:M,listeners:j}),k?M.data=k:(k=tu(n),k!==null&&(M.data=k)))),(k=Yd?Kd(e,n):Xd(e,n))&&(f=Jr(f,"onBeforeInput"),0<f.length&&(g=new ds("onBeforeInput","beforeinput",null,n,g),c.push({event:g,listeners:f}),g.data=k))}hu(c,t)})}function Yn(e,t,n){return{instance:e,listener:t,currentTarget:n}}function Jr(e,t){for(var n=t+"Capture",r=[];e!==null;){var i=e,l=i.stateNode;i.tag===5&&l!==null&&(i=l,l=Un(e,n),l!=null&&r.unshift(Yn(e,l,i)),l=Un(e,t),l!=null&&r.push(Yn(e,l,i))),e=e.return}return r}function Ht(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5);return e||null}function Es(e,t,n,r,i){for(var l=t._reactName,o=[];n!==null&&n!==r;){var u=n,d=u.alternate,f=u.stateNode;if(d!==null&&d===r)break;u.tag===5&&f!==null&&(u=f,i?(d=Un(n,l),d!=null&&o.unshift(Yn(n,d,u))):i||(d=Un(n,l),d!=null&&o.push(Yn(n,d,u)))),n=n.return}o.length!==0&&e.push({event:t,listeners:o})}var ff=/\r\n?/g,hf=/\u0000|\uFFFD/g;function js(e){return(typeof e=="string"?e:""+e).replace(ff,`
`).replace(hf,"")}function wr(e,t,n){if(t=js(t),js(e)!==t&&n)throw Error(E(425))}function Qr(){}var jl=null,Ml=null;function Cl(e,t){return e==="textarea"||e==="noscript"||typeof t.children=="string"||typeof t.children=="number"||typeof t.dangerouslySetInnerHTML=="object"&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var Rl=typeof setTimeout=="function"?setTimeout:void 0,pf=typeof clearTimeout=="function"?clearTimeout:void 0,Ms=typeof Promise=="function"?Promise:void 0,yf=typeof queueMicrotask=="function"?queueMicrotask:typeof Ms<"u"?function(e){return Ms.resolve(null).then(e).catch(mf)}:Rl;function mf(e){setTimeout(function(){throw e})}function Wi(e,t){var n=t,r=0;do{var i=n.nextSibling;if(e.removeChild(n),i&&i.nodeType===8)if(n=i.data,n==="/$"){if(r===0){e.removeChild(i),Vn(t);return}r--}else n!=="$"&&n!=="$?"&&n!=="$!"||r++;n=i}while(n);Vn(t)}function mt(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t==="$"||t==="$!"||t==="$?")break;if(t==="/$")return null}}return e}function Cs(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="$"||n==="$!"||n==="$?"){if(t===0)return e;t--}else n==="/$"&&t++}e=e.previousSibling}return null}var gn=Math.random().toString(36).slice(2),Je="__reactFiber$"+gn,Kn="__reactProps$"+gn,nt="__reactContainer$"+gn,Fl="__reactEvents$"+gn,gf="__reactListeners$"+gn,vf="__reactHandles$"+gn;function Tt(e){var t=e[Je];if(t)return t;for(var n=e.parentNode;n;){if(t=n[nt]||n[Je]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=Cs(e);e!==null;){if(n=e[Je])return n;e=Cs(e)}return t}e=n,n=e.parentNode}return null}function or(e){return e=e[Je]||e[nt],!e||e.tag!==5&&e.tag!==6&&e.tag!==13&&e.tag!==3?null:e}function Jt(e){if(e.tag===5||e.tag===6)return e.stateNode;throw Error(E(33))}function yi(e){return e[Kn]||null}var Tl=[],Qt=-1;function jt(e){return{current:e}}function V(e){0>Qt||(e.current=Tl[Qt],Tl[Qt]=null,Qt--)}function U(e,t){Qt++,Tl[Qt]=e.current,e.current=t}var kt={},fe=jt(kt),Se=jt(!1),_t=kt;function un(e,t){var n=e.type.contextTypes;if(!n)return kt;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var i={},l;for(l in n)i[l]=t[l];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=i),i}function we(e){return e=e.childContextTypes,e!=null}function Yr(){V(Se),V(fe)}function Rs(e,t,n){if(fe.current!==kt)throw Error(E(168));U(fe,t),U(Se,n)}function yu(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,typeof r.getChildContext!="function")return n;r=r.getChildContext();for(var i in r)if(!(i in t))throw Error(E(108,td(e)||"Unknown",i));return Z({},n,r)}function Kr(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||kt,_t=fe.current,U(fe,e),U(Se,Se.current),!0}function Fs(e,t,n){var r=e.stateNode;if(!r)throw Error(E(169));n?(e=yu(e,t,_t),r.__reactInternalMemoizedMergedChildContext=e,V(Se),V(fe),U(fe,e)):V(Se),U(Se,n)}var Xe=null,mi=!1,$i=!1;function mu(e){Xe===null?Xe=[e]:Xe.push(e)}function xf(e){mi=!0,mu(e)}function Mt(){if(!$i&&Xe!==null){$i=!0;var e=0,t=H;try{var n=Xe;for(H=1;e<n.length;e++){var r=n[e];do r=r(!0);while(r!==null)}Xe=null,mi=!1}catch(i){throw Xe!==null&&(Xe=Xe.slice(e+1)),Ha(so,Mt),i}finally{H=t,$i=!1}}return null}var Yt=[],Kt=0,Xr=null,Zr=0,Ne=[],Pe=0,Bt=null,Ze=1,qe="";function Rt(e,t){Yt[Kt++]=Zr,Yt[Kt++]=Xr,Xr=e,Zr=t}function gu(e,t,n){Ne[Pe++]=Ze,Ne[Pe++]=qe,Ne[Pe++]=Bt,Bt=e;var r=Ze;e=qe;var i=32-He(r)-1;r&=~(1<<i),n+=1;var l=32-He(t)+i;if(30<l){var o=i-i%5;l=(r&(1<<o)-1).toString(32),r>>=o,i-=o,Ze=1<<32-He(t)+i|n<<i|r,qe=l+e}else Ze=1<<l|n<<i|r,qe=e}function go(e){e.return!==null&&(Rt(e,1),gu(e,1,0))}function vo(e){for(;e===Xr;)Xr=Yt[--Kt],Yt[Kt]=null,Zr=Yt[--Kt],Yt[Kt]=null;for(;e===Bt;)Bt=Ne[--Pe],Ne[Pe]=null,qe=Ne[--Pe],Ne[Pe]=null,Ze=Ne[--Pe],Ne[Pe]=null}var Ce=null,Me=null,J=!1,be=null;function vu(e,t){var n=Ie(5,null,null,0);n.elementType="DELETED",n.stateNode=t,n.return=e,t=e.deletions,t===null?(e.deletions=[n],e.flags|=16):t.push(n)}function Ts(e,t){switch(e.tag){case 5:var n=e.type;return t=t.nodeType!==1||n.toLowerCase()!==t.nodeName.toLowerCase()?null:t,t!==null?(e.stateNode=t,Ce=e,Me=mt(t.firstChild),!0):!1;case 6:return t=e.pendingProps===""||t.nodeType!==3?null:t,t!==null?(e.stateNode=t,Ce=e,Me=null,!0):!1;case 13:return t=t.nodeType!==8?null:t,t!==null?(n=Bt!==null?{id:Ze,overflow:qe}:null,e.memoizedState={dehydrated:t,treeContext:n,retryLane:1073741824},n=Ie(18,null,null,0),n.stateNode=t,n.return=e,e.child=n,Ce=e,Me=null,!0):!1;default:return!1}}function Nl(e){return(e.mode&1)!==0&&(e.flags&128)===0}function Pl(e){if(J){var t=Me;if(t){var n=t;if(!Ts(e,t)){if(Nl(e))throw Error(E(418));t=mt(n.nextSibling);var r=Ce;t&&Ts(e,t)?vu(r,n):(e.flags=e.flags&-4097|2,J=!1,Ce=e)}}else{if(Nl(e))throw Error(E(418));e.flags=e.flags&-4097|2,J=!1,Ce=e}}}function Ns(e){for(e=e.return;e!==null&&e.tag!==5&&e.tag!==3&&e.tag!==13;)e=e.return;Ce=e}function kr(e){if(e!==Ce)return!1;if(!J)return Ns(e),J=!0,!1;var t;if((t=e.tag!==3)&&!(t=e.tag!==5)&&(t=e.type,t=t!=="head"&&t!=="body"&&!Cl(e.type,e.memoizedProps)),t&&(t=Me)){if(Nl(e))throw xu(),Error(E(418));for(;t;)vu(e,t),t=mt(t.nextSibling)}if(Ns(e),e.tag===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(E(317));e:{for(e=e.nextSibling,t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="/$"){if(t===0){Me=mt(e.nextSibling);break e}t--}else n!=="$"&&n!=="$!"&&n!=="$?"||t++}e=e.nextSibling}Me=null}}else Me=Ce?mt(e.stateNode.nextSibling):null;return!0}function xu(){for(var e=Me;e;)e=mt(e.nextSibling)}function cn(){Me=Ce=null,J=!1}function xo(e){be===null?be=[e]:be.push(e)}var Sf=lt.ReactCurrentBatchConfig;function En(e,t,n){if(e=n.ref,e!==null&&typeof e!="function"&&typeof e!="object"){if(n._owner){if(n=n._owner,n){if(n.tag!==1)throw Error(E(309));var r=n.stateNode}if(!r)throw Error(E(147,e));var i=r,l=""+e;return t!==null&&t.ref!==null&&typeof t.ref=="function"&&t.ref._stringRef===l?t.ref:(t=function(o){var u=i.refs;o===null?delete u[l]:u[l]=o},t._stringRef=l,t)}if(typeof e!="string")throw Error(E(284));if(!n._owner)throw Error(E(290,e))}return e}function Er(e,t){throw e=Object.prototype.toString.call(t),Error(E(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e))}function Ps(e){var t=e._init;return t(e._payload)}function Su(e){function t(h,a){if(e){var p=h.deletions;p===null?(h.deletions=[a],h.flags|=16):p.push(a)}}function n(h,a){if(!e)return null;for(;a!==null;)t(h,a),a=a.sibling;return null}function r(h,a){for(h=new Map;a!==null;)a.key!==null?h.set(a.key,a):h.set(a.index,a),a=a.sibling;return h}function i(h,a){return h=St(h,a),h.index=0,h.sibling=null,h}function l(h,a,p){return h.index=p,e?(p=h.alternate,p!==null?(p=p.index,p<a?(h.flags|=2,a):p):(h.flags|=2,a)):(h.flags|=1048576,a)}function o(h){return e&&h.alternate===null&&(h.flags|=2),h}function u(h,a,p,v){return a===null||a.tag!==6?(a=Xi(p,h.mode,v),a.return=h,a):(a=i(a,p),a.return=h,a)}function d(h,a,p,v){var y=p.type;return y===Wt?g(h,a,p.props.children,v,p.key):a!==null&&(a.elementType===y||typeof y=="object"&&y!==null&&y.$$typeof===st&&Ps(y)===a.type)?(v=i(a,p.props),v.ref=En(h,a,p),v.return=h,v):(v=Ar(p.type,p.key,p.props,null,h.mode,v),v.ref=En(h,a,p),v.return=h,v)}function f(h,a,p,v){return a===null||a.tag!==4||a.stateNode.containerInfo!==p.containerInfo||a.stateNode.implementation!==p.implementation?(a=Zi(p,h.mode,v),a.return=h,a):(a=i(a,p.children||[]),a.return=h,a)}function g(h,a,p,v,y){return a===null||a.tag!==7?(a=zt(p,h.mode,v,y),a.return=h,a):(a=i(a,p),a.return=h,a)}function c(h,a,p){if(typeof a=="string"&&a!==""||typeof a=="number")return a=Xi(""+a,h.mode,p),a.return=h,a;if(typeof a=="object"&&a!==null){switch(a.$$typeof){case fr:return p=Ar(a.type,a.key,a.props,null,h.mode,p),p.ref=En(h,null,a),p.return=h,p;case Ut:return a=Zi(a,h.mode,p),a.return=h,a;case st:var v=a._init;return c(h,v(a._payload),p)}if(Rn(a)||vn(a))return a=zt(a,h.mode,p,null),a.return=h,a;Er(h,a)}return null}function m(h,a,p,v){var y=a!==null?a.key:null;if(typeof p=="string"&&p!==""||typeof p=="number")return y!==null?null:u(h,a,""+p,v);if(typeof p=="object"&&p!==null){switch(p.$$typeof){case fr:return p.key===y?d(h,a,p,v):null;case Ut:return p.key===y?f(h,a,p,v):null;case st:return y=p._init,m(h,a,y(p._payload),v)}if(Rn(p)||vn(p))return y!==null?null:g(h,a,p,v,null);Er(h,p)}return null}function x(h,a,p,v,y){if(typeof v=="string"&&v!==""||typeof v=="number")return h=h.get(p)||null,u(a,h,""+v,y);if(typeof v=="object"&&v!==null){switch(v.$$typeof){case fr:return h=h.get(v.key===null?p:v.key)||null,d(a,h,v,y);case Ut:return h=h.get(v.key===null?p:v.key)||null,f(a,h,v,y);case st:var j=v._init;return x(h,a,p,j(v._payload),y)}if(Rn(v)||vn(v))return h=h.get(p)||null,g(a,h,v,y,null);Er(a,v)}return null}function w(h,a,p,v){for(var y=null,j=null,k=a,M=a=0,z=null;k!==null&&M<p.length;M++){k.index>M?(z=k,k=null):z=k.sibling;var I=m(h,k,p[M],v);if(I===null){k===null&&(k=z);break}e&&k&&I.alternate===null&&t(h,k),a=l(I,a,M),j===null?y=I:j.sibling=I,j=I,k=z}if(M===p.length)return n(h,k),J&&Rt(h,M),y;if(k===null){for(;M<p.length;M++)k=c(h,p[M],v),k!==null&&(a=l(k,a,M),j===null?y=k:j.sibling=k,j=k);return J&&Rt(h,M),y}for(k=r(h,k);M<p.length;M++)z=x(k,h,M,p[M],v),z!==null&&(e&&z.alternate!==null&&k.delete(z.key===null?M:z.key),a=l(z,a,M),j===null?y=z:j.sibling=z,j=z);return e&&k.forEach(function(W){return t(h,W)}),J&&Rt(h,M),y}function S(h,a,p,v){var y=vn(p);if(typeof y!="function")throw Error(E(150));if(p=y.call(p),p==null)throw Error(E(151));for(var j=y=null,k=a,M=a=0,z=null,I=p.next();k!==null&&!I.done;M++,I=p.next()){k.index>M?(z=k,k=null):z=k.sibling;var W=m(h,k,I.value,v);if(W===null){k===null&&(k=z);break}e&&k&&W.alternate===null&&t(h,k),a=l(W,a,M),j===null?y=W:j.sibling=W,j=W,k=z}if(I.done)return n(h,k),J&&Rt(h,M),y;if(k===null){for(;!I.done;M++,I=p.next())I=c(h,I.value,v),I!==null&&(a=l(I,a,M),j===null?y=I:j.sibling=I,j=I);return J&&Rt(h,M),y}for(k=r(h,k);!I.done;M++,I=p.next())I=x(k,h,M,I.value,v),I!==null&&(e&&I.alternate!==null&&k.delete(I.key===null?M:I.key),a=l(I,a,M),j===null?y=I:j.sibling=I,j=I);return e&&k.forEach(function(ge){return t(h,ge)}),J&&Rt(h,M),y}function C(h,a,p,v){if(typeof p=="object"&&p!==null&&p.type===Wt&&p.key===null&&(p=p.props.children),typeof p=="object"&&p!==null){switch(p.$$typeof){case fr:e:{for(var y=p.key,j=a;j!==null;){if(j.key===y){if(y=p.type,y===Wt){if(j.tag===7){n(h,j.sibling),a=i(j,p.props.children),a.return=h,h=a;break e}}else if(j.elementType===y||typeof y=="object"&&y!==null&&y.$$typeof===st&&Ps(y)===j.type){n(h,j.sibling),a=i(j,p.props),a.ref=En(h,j,p),a.return=h,h=a;break e}n(h,j);break}else t(h,j);j=j.sibling}p.type===Wt?(a=zt(p.props.children,h.mode,v,p.key),a.return=h,h=a):(v=Ar(p.type,p.key,p.props,null,h.mode,v),v.ref=En(h,a,p),v.return=h,h=v)}return o(h);case Ut:e:{for(j=p.key;a!==null;){if(a.key===j)if(a.tag===4&&a.stateNode.containerInfo===p.containerInfo&&a.stateNode.implementation===p.implementation){n(h,a.sibling),a=i(a,p.children||[]),a.return=h,h=a;break e}else{n(h,a);break}else t(h,a);a=a.sibling}a=Zi(p,h.mode,v),a.return=h,h=a}return o(h);case st:return j=p._init,C(h,a,j(p._payload),v)}if(Rn(p))return w(h,a,p,v);if(vn(p))return S(h,a,p,v);Er(h,p)}return typeof p=="string"&&p!==""||typeof p=="number"?(p=""+p,a!==null&&a.tag===6?(n(h,a.sibling),a=i(a,p),a.return=h,h=a):(n(h,a),a=Xi(p,h.mode,v),a.return=h,h=a),o(h)):n(h,a)}return C}var dn=Su(!0),wu=Su(!1),qr=jt(null),ei=null,Xt=null,So=null;function wo(){So=Xt=ei=null}function ko(e){var t=qr.current;V(qr),e._currentValue=t}function Il(e,t,n){for(;e!==null;){var r=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,r!==null&&(r.childLanes|=t)):r!==null&&(r.childLanes&t)!==t&&(r.childLanes|=t),e===n)break;e=e.return}}function on(e,t){ei=e,So=Xt=null,e=e.dependencies,e!==null&&e.firstContext!==null&&(e.lanes&t&&(xe=!0),e.firstContext=null)}function _e(e){var t=e._currentValue;if(So!==e)if(e={context:e,memoizedValue:t,next:null},Xt===null){if(ei===null)throw Error(E(308));Xt=e,ei.dependencies={lanes:0,firstContext:e}}else Xt=Xt.next=e;return t}var Nt=null;function Eo(e){Nt===null?Nt=[e]:Nt.push(e)}function ku(e,t,n,r){var i=t.interleaved;return i===null?(n.next=n,Eo(t)):(n.next=i.next,i.next=n),t.interleaved=n,rt(e,r)}function rt(e,t){e.lanes|=t;var n=e.alternate;for(n!==null&&(n.lanes|=t),n=e,e=e.return;e!==null;)e.childLanes|=t,n=e.alternate,n!==null&&(n.childLanes|=t),n=e,e=e.return;return n.tag===3?n.stateNode:null}var at=!1;function jo(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function Eu(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function et(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function gt(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,D&2){var i=r.pending;return i===null?t.next=t:(t.next=i.next,i.next=t),r.pending=t,rt(e,n)}return i=r.interleaved,i===null?(t.next=t,Eo(r)):(t.next=i.next,i.next=t),r.interleaved=t,rt(e,n)}function zr(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,(n&4194240)!==0)){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,ao(e,n)}}function Is(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var i=null,l=null;if(n=n.firstBaseUpdate,n!==null){do{var o={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};l===null?i=l=o:l=l.next=o,n=n.next}while(n!==null);l===null?i=l=t:l=l.next=t}else i=l=t;n={baseState:r.baseState,firstBaseUpdate:i,lastBaseUpdate:l,shared:r.shared,effects:r.effects},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}function ti(e,t,n,r){var i=e.updateQueue;at=!1;var l=i.firstBaseUpdate,o=i.lastBaseUpdate,u=i.shared.pending;if(u!==null){i.shared.pending=null;var d=u,f=d.next;d.next=null,o===null?l=f:o.next=f,o=d;var g=e.alternate;g!==null&&(g=g.updateQueue,u=g.lastBaseUpdate,u!==o&&(u===null?g.firstBaseUpdate=f:u.next=f,g.lastBaseUpdate=d))}if(l!==null){var c=i.baseState;o=0,g=f=d=null,u=l;do{var m=u.lane,x=u.eventTime;if((r&m)===m){g!==null&&(g=g.next={eventTime:x,lane:0,tag:u.tag,payload:u.payload,callback:u.callback,next:null});e:{var w=e,S=u;switch(m=t,x=n,S.tag){case 1:if(w=S.payload,typeof w=="function"){c=w.call(x,c,m);break e}c=w;break e;case 3:w.flags=w.flags&-65537|128;case 0:if(w=S.payload,m=typeof w=="function"?w.call(x,c,m):w,m==null)break e;c=Z({},c,m);break e;case 2:at=!0}}u.callback!==null&&u.lane!==0&&(e.flags|=64,m=i.effects,m===null?i.effects=[u]:m.push(u))}else x={eventTime:x,lane:m,tag:u.tag,payload:u.payload,callback:u.callback,next:null},g===null?(f=g=x,d=c):g=g.next=x,o|=m;if(u=u.next,u===null){if(u=i.shared.pending,u===null)break;m=u,u=m.next,m.next=null,i.lastBaseUpdate=m,i.shared.pending=null}}while(!0);if(g===null&&(d=c),i.baseState=d,i.firstBaseUpdate=f,i.lastBaseUpdate=g,t=i.shared.interleaved,t!==null){i=t;do o|=i.lane,i=i.next;while(i!==t)}else l===null&&(i.shared.lanes=0);Lt|=o,e.lanes=o,e.memoizedState=c}}function zs(e,t,n){if(e=t.effects,t.effects=null,e!==null)for(t=0;t<e.length;t++){var r=e[t],i=r.callback;if(i!==null){if(r.callback=null,r=n,typeof i!="function")throw Error(E(191,i));i.call(r)}}}var sr={},Ye=jt(sr),Xn=jt(sr),Zn=jt(sr);function Pt(e){if(e===sr)throw Error(E(174));return e}function Mo(e,t){switch(U(Zn,t),U(Xn,e),U(Ye,sr),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:fl(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=fl(t,e)}V(Ye),U(Ye,t)}function fn(){V(Ye),V(Xn),V(Zn)}function ju(e){Pt(Zn.current);var t=Pt(Ye.current),n=fl(t,e.type);t!==n&&(U(Xn,e),U(Ye,n))}function Co(e){Xn.current===e&&(V(Ye),V(Xn))}var K=jt(0);function ni(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||n.data==="$?"||n.data==="$!"))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!==void 0){if(t.flags&128)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var Vi=[];function Ro(){for(var e=0;e<Vi.length;e++)Vi[e]._workInProgressVersionPrimary=null;Vi.length=0}var _r=lt.ReactCurrentDispatcher,Gi=lt.ReactCurrentBatchConfig,Ot=0,X=null,ne=null,ie=null,ri=!1,On=!1,qn=0,wf=0;function ue(){throw Error(E(321))}function Fo(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!We(e[n],t[n]))return!1;return!0}function To(e,t,n,r,i,l){if(Ot=l,X=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,_r.current=e===null||e.memoizedState===null?Mf:Cf,e=n(r,i),On){l=0;do{if(On=!1,qn=0,25<=l)throw Error(E(301));l+=1,ie=ne=null,t.updateQueue=null,_r.current=Rf,e=n(r,i)}while(On)}if(_r.current=ii,t=ne!==null&&ne.next!==null,Ot=0,ie=ne=X=null,ri=!1,t)throw Error(E(300));return e}function No(){var e=qn!==0;return qn=0,e}function Ge(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return ie===null?X.memoizedState=ie=e:ie=ie.next=e,ie}function Be(){if(ne===null){var e=X.alternate;e=e!==null?e.memoizedState:null}else e=ne.next;var t=ie===null?X.memoizedState:ie.next;if(t!==null)ie=t,ne=e;else{if(e===null)throw Error(E(310));ne=e,e={memoizedState:ne.memoizedState,baseState:ne.baseState,baseQueue:ne.baseQueue,queue:ne.queue,next:null},ie===null?X.memoizedState=ie=e:ie=ie.next=e}return ie}function er(e,t){return typeof t=="function"?t(e):t}function Ji(e){var t=Be(),n=t.queue;if(n===null)throw Error(E(311));n.lastRenderedReducer=e;var r=ne,i=r.baseQueue,l=n.pending;if(l!==null){if(i!==null){var o=i.next;i.next=l.next,l.next=o}r.baseQueue=i=l,n.pending=null}if(i!==null){l=i.next,r=r.baseState;var u=o=null,d=null,f=l;do{var g=f.lane;if((Ot&g)===g)d!==null&&(d=d.next={lane:0,action:f.action,hasEagerState:f.hasEagerState,eagerState:f.eagerState,next:null}),r=f.hasEagerState?f.eagerState:e(r,f.action);else{var c={lane:g,action:f.action,hasEagerState:f.hasEagerState,eagerState:f.eagerState,next:null};d===null?(u=d=c,o=r):d=d.next=c,X.lanes|=g,Lt|=g}f=f.next}while(f!==null&&f!==l);d===null?o=r:d.next=u,We(r,t.memoizedState)||(xe=!0),t.memoizedState=r,t.baseState=o,t.baseQueue=d,n.lastRenderedState=r}if(e=n.interleaved,e!==null){i=e;do l=i.lane,X.lanes|=l,Lt|=l,i=i.next;while(i!==e)}else i===null&&(n.lanes=0);return[t.memoizedState,n.dispatch]}function Qi(e){var t=Be(),n=t.queue;if(n===null)throw Error(E(311));n.lastRenderedReducer=e;var r=n.dispatch,i=n.pending,l=t.memoizedState;if(i!==null){n.pending=null;var o=i=i.next;do l=e(l,o.action),o=o.next;while(o!==i);We(l,t.memoizedState)||(xe=!0),t.memoizedState=l,t.baseQueue===null&&(t.baseState=l),n.lastRenderedState=l}return[l,r]}function Mu(){}function Cu(e,t){var n=X,r=Be(),i=t(),l=!We(r.memoizedState,i);if(l&&(r.memoizedState=i,xe=!0),r=r.queue,Po(Tu.bind(null,n,r,e),[e]),r.getSnapshot!==t||l||ie!==null&&ie.memoizedState.tag&1){if(n.flags|=2048,tr(9,Fu.bind(null,n,r,i,t),void 0,null),le===null)throw Error(E(349));Ot&30||Ru(n,t,i)}return i}function Ru(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=X.updateQueue,t===null?(t={lastEffect:null,stores:null},X.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function Fu(e,t,n,r){t.value=n,t.getSnapshot=r,Nu(t)&&Pu(e)}function Tu(e,t,n){return n(function(){Nu(t)&&Pu(e)})}function Nu(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!We(e,n)}catch{return!0}}function Pu(e){var t=rt(e,1);t!==null&&Ue(t,e,1,-1)}function _s(e){var t=Ge();return typeof e=="function"&&(e=e()),t.memoizedState=t.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:er,lastRenderedState:e},t.queue=e,e=e.dispatch=jf.bind(null,X,e),[t.memoizedState,e]}function tr(e,t,n,r){return e={tag:e,create:t,destroy:n,deps:r,next:null},t=X.updateQueue,t===null?(t={lastEffect:null,stores:null},X.updateQueue=t,t.lastEffect=e.next=e):(n=t.lastEffect,n===null?t.lastEffect=e.next=e:(r=n.next,n.next=e,e.next=r,t.lastEffect=e)),e}function Iu(){return Be().memoizedState}function Br(e,t,n,r){var i=Ge();X.flags|=e,i.memoizedState=tr(1|t,n,void 0,r===void 0?null:r)}function gi(e,t,n,r){var i=Be();r=r===void 0?null:r;var l=void 0;if(ne!==null){var o=ne.memoizedState;if(l=o.destroy,r!==null&&Fo(r,o.deps)){i.memoizedState=tr(t,n,l,r);return}}X.flags|=e,i.memoizedState=tr(1|t,n,l,r)}function Bs(e,t){return Br(8390656,8,e,t)}function Po(e,t){return gi(2048,8,e,t)}function zu(e,t){return gi(4,2,e,t)}function _u(e,t){return gi(4,4,e,t)}function Bu(e,t){if(typeof t=="function")return e=e(),t(e),function(){t(null)};if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function Ou(e,t,n){return n=n!=null?n.concat([e]):null,gi(4,4,Bu.bind(null,t,e),n)}function Io(){}function Lu(e,t){var n=Be();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&Fo(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function Du(e,t){var n=Be();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&Fo(t,r[1])?r[0]:(e=e(),n.memoizedState=[e,t],e)}function Au(e,t,n){return Ot&21?(We(n,t)||(n=$a(),X.lanes|=n,Lt|=n,e.baseState=!0),t):(e.baseState&&(e.baseState=!1,xe=!0),e.memoizedState=n)}function kf(e,t){var n=H;H=n!==0&&4>n?n:4,e(!0);var r=Gi.transition;Gi.transition={};try{e(!1),t()}finally{H=n,Gi.transition=r}}function bu(){return Be().memoizedState}function Ef(e,t,n){var r=xt(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},Hu(e))Uu(t,n);else if(n=ku(e,t,n,r),n!==null){var i=pe();Ue(n,e,r,i),Wu(n,t,r)}}function jf(e,t,n){var r=xt(e),i={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(Hu(e))Uu(t,i);else{var l=e.alternate;if(e.lanes===0&&(l===null||l.lanes===0)&&(l=t.lastRenderedReducer,l!==null))try{var o=t.lastRenderedState,u=l(o,n);if(i.hasEagerState=!0,i.eagerState=u,We(u,o)){var d=t.interleaved;d===null?(i.next=i,Eo(t)):(i.next=d.next,d.next=i),t.interleaved=i;return}}catch{}finally{}n=ku(e,t,i,r),n!==null&&(i=pe(),Ue(n,e,r,i),Wu(n,t,r))}}function Hu(e){var t=e.alternate;return e===X||t!==null&&t===X}function Uu(e,t){On=ri=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function Wu(e,t,n){if(n&4194240){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,ao(e,n)}}var ii={readContext:_e,useCallback:ue,useContext:ue,useEffect:ue,useImperativeHandle:ue,useInsertionEffect:ue,useLayoutEffect:ue,useMemo:ue,useReducer:ue,useRef:ue,useState:ue,useDebugValue:ue,useDeferredValue:ue,useTransition:ue,useMutableSource:ue,useSyncExternalStore:ue,useId:ue,unstable_isNewReconciler:!1},Mf={readContext:_e,useCallback:function(e,t){return Ge().memoizedState=[e,t===void 0?null:t],e},useContext:_e,useEffect:Bs,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,Br(4194308,4,Bu.bind(null,t,e),n)},useLayoutEffect:function(e,t){return Br(4194308,4,e,t)},useInsertionEffect:function(e,t){return Br(4,2,e,t)},useMemo:function(e,t){var n=Ge();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=Ge();return t=n!==void 0?n(t):t,r.memoizedState=r.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},r.queue=e,e=e.dispatch=Ef.bind(null,X,e),[r.memoizedState,e]},useRef:function(e){var t=Ge();return e={current:e},t.memoizedState=e},useState:_s,useDebugValue:Io,useDeferredValue:function(e){return Ge().memoizedState=e},useTransition:function(){var e=_s(!1),t=e[0];return e=kf.bind(null,e[1]),Ge().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=X,i=Ge();if(J){if(n===void 0)throw Error(E(407));n=n()}else{if(n=t(),le===null)throw Error(E(349));Ot&30||Ru(r,t,n)}i.memoizedState=n;var l={value:n,getSnapshot:t};return i.queue=l,Bs(Tu.bind(null,r,l,e),[e]),r.flags|=2048,tr(9,Fu.bind(null,r,l,n,t),void 0,null),n},useId:function(){var e=Ge(),t=le.identifierPrefix;if(J){var n=qe,r=Ze;n=(r&~(1<<32-He(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=qn++,0<n&&(t+="H"+n.toString(32)),t+=":"}else n=wf++,t=":"+t+"r"+n.toString(32)+":";return e.memoizedState=t},unstable_isNewReconciler:!1},Cf={readContext:_e,useCallback:Lu,useContext:_e,useEffect:Po,useImperativeHandle:Ou,useInsertionEffect:zu,useLayoutEffect:_u,useMemo:Du,useReducer:Ji,useRef:Iu,useState:function(){return Ji(er)},useDebugValue:Io,useDeferredValue:function(e){var t=Be();return Au(t,ne.memoizedState,e)},useTransition:function(){var e=Ji(er)[0],t=Be().memoizedState;return[e,t]},useMutableSource:Mu,useSyncExternalStore:Cu,useId:bu,unstable_isNewReconciler:!1},Rf={readContext:_e,useCallback:Lu,useContext:_e,useEffect:Po,useImperativeHandle:Ou,useInsertionEffect:zu,useLayoutEffect:_u,useMemo:Du,useReducer:Qi,useRef:Iu,useState:function(){return Qi(er)},useDebugValue:Io,useDeferredValue:function(e){var t=Be();return ne===null?t.memoizedState=e:Au(t,ne.memoizedState,e)},useTransition:function(){var e=Qi(er)[0],t=Be().memoizedState;return[e,t]},useMutableSource:Mu,useSyncExternalStore:Cu,useId:bu,unstable_isNewReconciler:!1};function De(e,t){if(e&&e.defaultProps){t=Z({},t),e=e.defaultProps;for(var n in e)t[n]===void 0&&(t[n]=e[n]);return t}return t}function zl(e,t,n,r){t=e.memoizedState,n=n(r,t),n=n==null?t:Z({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var vi={isMounted:function(e){return(e=e._reactInternals)?bt(e)===e:!1},enqueueSetState:function(e,t,n){e=e._reactInternals;var r=pe(),i=xt(e),l=et(r,i);l.payload=t,n!=null&&(l.callback=n),t=gt(e,l,i),t!==null&&(Ue(t,e,i,r),zr(t,e,i))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=pe(),i=xt(e),l=et(r,i);l.tag=1,l.payload=t,n!=null&&(l.callback=n),t=gt(e,l,i),t!==null&&(Ue(t,e,i,r),zr(t,e,i))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=pe(),r=xt(e),i=et(n,r);i.tag=2,t!=null&&(i.callback=t),t=gt(e,i,r),t!==null&&(Ue(t,e,r,n),zr(t,e,r))}};function Os(e,t,n,r,i,l,o){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(r,l,o):t.prototype&&t.prototype.isPureReactComponent?!Jn(n,r)||!Jn(i,l):!0}function $u(e,t,n){var r=!1,i=kt,l=t.contextType;return typeof l=="object"&&l!==null?l=_e(l):(i=we(t)?_t:fe.current,r=t.contextTypes,l=(r=r!=null)?un(e,i):kt),t=new t(n,l),e.memoizedState=t.state!==null&&t.state!==void 0?t.state:null,t.updater=vi,e.stateNode=t,t._reactInternals=e,r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=i,e.__reactInternalMemoizedMaskedChildContext=l),t}function Ls(e,t,n,r){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(n,r),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(n,r),t.state!==e&&vi.enqueueReplaceState(t,t.state,null)}function _l(e,t,n,r){var i=e.stateNode;i.props=n,i.state=e.memoizedState,i.refs={},jo(e);var l=t.contextType;typeof l=="object"&&l!==null?i.context=_e(l):(l=we(t)?_t:fe.current,i.context=un(e,l)),i.state=e.memoizedState,l=t.getDerivedStateFromProps,typeof l=="function"&&(zl(e,t,l,n),i.state=e.memoizedState),typeof t.getDerivedStateFromProps=="function"||typeof i.getSnapshotBeforeUpdate=="function"||typeof i.UNSAFE_componentWillMount!="function"&&typeof i.componentWillMount!="function"||(t=i.state,typeof i.componentWillMount=="function"&&i.componentWillMount(),typeof i.UNSAFE_componentWillMount=="function"&&i.UNSAFE_componentWillMount(),t!==i.state&&vi.enqueueReplaceState(i,i.state,null),ti(e,n,i,r),i.state=e.memoizedState),typeof i.componentDidMount=="function"&&(e.flags|=4194308)}function hn(e,t){try{var n="",r=t;do n+=ed(r),r=r.return;while(r);var i=n}catch(l){i=`
Error generating stack: `+l.message+`
`+l.stack}return{value:e,source:t,stack:i,digest:null}}function Yi(e,t,n){return{value:e,source:null,stack:n??null,digest:t??null}}function Bl(e,t){try{console.error(t.value)}catch(n){setTimeout(function(){throw n})}}var Ff=typeof WeakMap=="function"?WeakMap:Map;function Vu(e,t,n){n=et(-1,n),n.tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){oi||(oi=!0,Vl=r),Bl(e,t)},n}function Gu(e,t,n){n=et(-1,n),n.tag=3;var r=e.type.getDerivedStateFromError;if(typeof r=="function"){var i=t.value;n.payload=function(){return r(i)},n.callback=function(){Bl(e,t)}}var l=e.stateNode;return l!==null&&typeof l.componentDidCatch=="function"&&(n.callback=function(){Bl(e,t),typeof r!="function"&&(vt===null?vt=new Set([this]):vt.add(this));var o=t.stack;this.componentDidCatch(t.value,{componentStack:o!==null?o:""})}),n}function Ds(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new Ff;var i=new Set;r.set(t,i)}else i=r.get(t),i===void 0&&(i=new Set,r.set(t,i));i.has(n)||(i.add(n),e=Uf.bind(null,e,t,n),t.then(e,e))}function As(e){do{var t;if((t=e.tag===13)&&(t=e.memoizedState,t=t!==null?t.dehydrated!==null:!0),t)return e;e=e.return}while(e!==null);return null}function bs(e,t,n,r,i){return e.mode&1?(e.flags|=65536,e.lanes=i,e):(e===t?e.flags|=65536:(e.flags|=128,n.flags|=131072,n.flags&=-52805,n.tag===1&&(n.alternate===null?n.tag=17:(t=et(-1,1),t.tag=2,gt(n,t,1))),n.lanes|=1),e)}var Tf=lt.ReactCurrentOwner,xe=!1;function he(e,t,n,r){t.child=e===null?wu(t,null,n,r):dn(t,e.child,n,r)}function Hs(e,t,n,r,i){n=n.render;var l=t.ref;return on(t,i),r=To(e,t,n,r,l,i),n=No(),e!==null&&!xe?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,it(e,t,i)):(J&&n&&go(t),t.flags|=1,he(e,t,r,i),t.child)}function Us(e,t,n,r,i){if(e===null){var l=n.type;return typeof l=="function"&&!bo(l)&&l.defaultProps===void 0&&n.compare===null&&n.defaultProps===void 0?(t.tag=15,t.type=l,Ju(e,t,l,r,i)):(e=Ar(n.type,null,r,t,t.mode,i),e.ref=t.ref,e.return=t,t.child=e)}if(l=e.child,!(e.lanes&i)){var o=l.memoizedProps;if(n=n.compare,n=n!==null?n:Jn,n(o,r)&&e.ref===t.ref)return it(e,t,i)}return t.flags|=1,e=St(l,r),e.ref=t.ref,e.return=t,t.child=e}function Ju(e,t,n,r,i){if(e!==null){var l=e.memoizedProps;if(Jn(l,r)&&e.ref===t.ref)if(xe=!1,t.pendingProps=r=l,(e.lanes&i)!==0)e.flags&131072&&(xe=!0);else return t.lanes=e.lanes,it(e,t,i)}return Ol(e,t,n,r,i)}function Qu(e,t,n){var r=t.pendingProps,i=r.children,l=e!==null?e.memoizedState:null;if(r.mode==="hidden")if(!(t.mode&1))t.memoizedState={baseLanes:0,cachePool:null,transitions:null},U(qt,je),je|=n;else{if(!(n&1073741824))return e=l!==null?l.baseLanes|n:n,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,U(qt,je),je|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=l!==null?l.baseLanes:n,U(qt,je),je|=r}else l!==null?(r=l.baseLanes|n,t.memoizedState=null):r=n,U(qt,je),je|=r;return he(e,t,i,n),t.child}function Yu(e,t){var n=t.ref;(e===null&&n!==null||e!==null&&e.ref!==n)&&(t.flags|=512,t.flags|=2097152)}function Ol(e,t,n,r,i){var l=we(n)?_t:fe.current;return l=un(t,l),on(t,i),n=To(e,t,n,r,l,i),r=No(),e!==null&&!xe?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,it(e,t,i)):(J&&r&&go(t),t.flags|=1,he(e,t,n,i),t.child)}function Ws(e,t,n,r,i){if(we(n)){var l=!0;Kr(t)}else l=!1;if(on(t,i),t.stateNode===null)Or(e,t),$u(t,n,r),_l(t,n,r,i),r=!0;else if(e===null){var o=t.stateNode,u=t.memoizedProps;o.props=u;var d=o.context,f=n.contextType;typeof f=="object"&&f!==null?f=_e(f):(f=we(n)?_t:fe.current,f=un(t,f));var g=n.getDerivedStateFromProps,c=typeof g=="function"||typeof o.getSnapshotBeforeUpdate=="function";c||typeof o.UNSAFE_componentWillReceiveProps!="function"&&typeof o.componentWillReceiveProps!="function"||(u!==r||d!==f)&&Ls(t,o,r,f),at=!1;var m=t.memoizedState;o.state=m,ti(t,r,o,i),d=t.memoizedState,u!==r||m!==d||Se.current||at?(typeof g=="function"&&(zl(t,n,g,r),d=t.memoizedState),(u=at||Os(t,n,u,r,m,d,f))?(c||typeof o.UNSAFE_componentWillMount!="function"&&typeof o.componentWillMount!="function"||(typeof o.componentWillMount=="function"&&o.componentWillMount(),typeof o.UNSAFE_componentWillMount=="function"&&o.UNSAFE_componentWillMount()),typeof o.componentDidMount=="function"&&(t.flags|=4194308)):(typeof o.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=d),o.props=r,o.state=d,o.context=f,r=u):(typeof o.componentDidMount=="function"&&(t.flags|=4194308),r=!1)}else{o=t.stateNode,Eu(e,t),u=t.memoizedProps,f=t.type===t.elementType?u:De(t.type,u),o.props=f,c=t.pendingProps,m=o.context,d=n.contextType,typeof d=="object"&&d!==null?d=_e(d):(d=we(n)?_t:fe.current,d=un(t,d));var x=n.getDerivedStateFromProps;(g=typeof x=="function"||typeof o.getSnapshotBeforeUpdate=="function")||typeof o.UNSAFE_componentWillReceiveProps!="function"&&typeof o.componentWillReceiveProps!="function"||(u!==c||m!==d)&&Ls(t,o,r,d),at=!1,m=t.memoizedState,o.state=m,ti(t,r,o,i);var w=t.memoizedState;u!==c||m!==w||Se.current||at?(typeof x=="function"&&(zl(t,n,x,r),w=t.memoizedState),(f=at||Os(t,n,f,r,m,w,d)||!1)?(g||typeof o.UNSAFE_componentWillUpdate!="function"&&typeof o.componentWillUpdate!="function"||(typeof o.componentWillUpdate=="function"&&o.componentWillUpdate(r,w,d),typeof o.UNSAFE_componentWillUpdate=="function"&&o.UNSAFE_componentWillUpdate(r,w,d)),typeof o.componentDidUpdate=="function"&&(t.flags|=4),typeof o.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof o.componentDidUpdate!="function"||u===e.memoizedProps&&m===e.memoizedState||(t.flags|=4),typeof o.getSnapshotBeforeUpdate!="function"||u===e.memoizedProps&&m===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=w),o.props=r,o.state=w,o.context=d,r=f):(typeof o.componentDidUpdate!="function"||u===e.memoizedProps&&m===e.memoizedState||(t.flags|=4),typeof o.getSnapshotBeforeUpdate!="function"||u===e.memoizedProps&&m===e.memoizedState||(t.flags|=1024),r=!1)}return Ll(e,t,n,r,l,i)}function Ll(e,t,n,r,i,l){Yu(e,t);var o=(t.flags&128)!==0;if(!r&&!o)return i&&Fs(t,n,!1),it(e,t,l);r=t.stateNode,Tf.current=t;var u=o&&typeof n.getDerivedStateFromError!="function"?null:r.render();return t.flags|=1,e!==null&&o?(t.child=dn(t,e.child,null,l),t.child=dn(t,null,u,l)):he(e,t,u,l),t.memoizedState=r.state,i&&Fs(t,n,!0),t.child}function Ku(e){var t=e.stateNode;t.pendingContext?Rs(e,t.pendingContext,t.pendingContext!==t.context):t.context&&Rs(e,t.context,!1),Mo(e,t.containerInfo)}function $s(e,t,n,r,i){return cn(),xo(i),t.flags|=256,he(e,t,n,r),t.child}var Dl={dehydrated:null,treeContext:null,retryLane:0};function Al(e){return{baseLanes:e,cachePool:null,transitions:null}}function Xu(e,t,n){var r=t.pendingProps,i=K.current,l=!1,o=(t.flags&128)!==0,u;if((u=o)||(u=e!==null&&e.memoizedState===null?!1:(i&2)!==0),u?(l=!0,t.flags&=-129):(e===null||e.memoizedState!==null)&&(i|=1),U(K,i&1),e===null)return Pl(t),e=t.memoizedState,e!==null&&(e=e.dehydrated,e!==null)?(t.mode&1?e.data==="$!"?t.lanes=8:t.lanes=1073741824:t.lanes=1,null):(o=r.children,e=r.fallback,l?(r=t.mode,l=t.child,o={mode:"hidden",children:o},!(r&1)&&l!==null?(l.childLanes=0,l.pendingProps=o):l=wi(o,r,0,null),e=zt(e,r,n,null),l.return=t,e.return=t,l.sibling=e,t.child=l,t.child.memoizedState=Al(n),t.memoizedState=Dl,e):zo(t,o));if(i=e.memoizedState,i!==null&&(u=i.dehydrated,u!==null))return Nf(e,t,o,r,u,i,n);if(l){l=r.fallback,o=t.mode,i=e.child,u=i.sibling;var d={mode:"hidden",children:r.children};return!(o&1)&&t.child!==i?(r=t.child,r.childLanes=0,r.pendingProps=d,t.deletions=null):(r=St(i,d),r.subtreeFlags=i.subtreeFlags&14680064),u!==null?l=St(u,l):(l=zt(l,o,n,null),l.flags|=2),l.return=t,r.return=t,r.sibling=l,t.child=r,r=l,l=t.child,o=e.child.memoizedState,o=o===null?Al(n):{baseLanes:o.baseLanes|n,cachePool:null,transitions:o.transitions},l.memoizedState=o,l.childLanes=e.childLanes&~n,t.memoizedState=Dl,r}return l=e.child,e=l.sibling,r=St(l,{mode:"visible",children:r.children}),!(t.mode&1)&&(r.lanes=n),r.return=t,r.sibling=null,e!==null&&(n=t.deletions,n===null?(t.deletions=[e],t.flags|=16):n.push(e)),t.child=r,t.memoizedState=null,r}function zo(e,t){return t=wi({mode:"visible",children:t},e.mode,0,null),t.return=e,e.child=t}function jr(e,t,n,r){return r!==null&&xo(r),dn(t,e.child,null,n),e=zo(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function Nf(e,t,n,r,i,l,o){if(n)return t.flags&256?(t.flags&=-257,r=Yi(Error(E(422))),jr(e,t,o,r)):t.memoizedState!==null?(t.child=e.child,t.flags|=128,null):(l=r.fallback,i=t.mode,r=wi({mode:"visible",children:r.children},i,0,null),l=zt(l,i,o,null),l.flags|=2,r.return=t,l.return=t,r.sibling=l,t.child=r,t.mode&1&&dn(t,e.child,null,o),t.child.memoizedState=Al(o),t.memoizedState=Dl,l);if(!(t.mode&1))return jr(e,t,o,null);if(i.data==="$!"){if(r=i.nextSibling&&i.nextSibling.dataset,r)var u=r.dgst;return r=u,l=Error(E(419)),r=Yi(l,r,void 0),jr(e,t,o,r)}if(u=(o&e.childLanes)!==0,xe||u){if(r=le,r!==null){switch(o&-o){case 4:i=2;break;case 16:i=8;break;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:i=32;break;case 536870912:i=268435456;break;default:i=0}i=i&(r.suspendedLanes|o)?0:i,i!==0&&i!==l.retryLane&&(l.retryLane=i,rt(e,i),Ue(r,e,i,-1))}return Ao(),r=Yi(Error(E(421))),jr(e,t,o,r)}return i.data==="$?"?(t.flags|=128,t.child=e.child,t=Wf.bind(null,e),i._reactRetry=t,null):(e=l.treeContext,Me=mt(i.nextSibling),Ce=t,J=!0,be=null,e!==null&&(Ne[Pe++]=Ze,Ne[Pe++]=qe,Ne[Pe++]=Bt,Ze=e.id,qe=e.overflow,Bt=t),t=zo(t,r.children),t.flags|=4096,t)}function Vs(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),Il(e.return,t,n)}function Ki(e,t,n,r,i){var l=e.memoizedState;l===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:i}:(l.isBackwards=t,l.rendering=null,l.renderingStartTime=0,l.last=r,l.tail=n,l.tailMode=i)}function Zu(e,t,n){var r=t.pendingProps,i=r.revealOrder,l=r.tail;if(he(e,t,r.children,n),r=K.current,r&2)r=r&1|2,t.flags|=128;else{if(e!==null&&e.flags&128)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&Vs(e,n,t);else if(e.tag===19)Vs(e,n,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;e.sibling===null;){if(e.return===null||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}r&=1}if(U(K,r),!(t.mode&1))t.memoizedState=null;else switch(i){case"forwards":for(n=t.child,i=null;n!==null;)e=n.alternate,e!==null&&ni(e)===null&&(i=n),n=n.sibling;n=i,n===null?(i=t.child,t.child=null):(i=n.sibling,n.sibling=null),Ki(t,!1,i,n,l);break;case"backwards":for(n=null,i=t.child,t.child=null;i!==null;){if(e=i.alternate,e!==null&&ni(e)===null){t.child=i;break}e=i.sibling,i.sibling=n,n=i,i=e}Ki(t,!0,n,null,l);break;case"together":Ki(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function Or(e,t){!(t.mode&1)&&e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2)}function it(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),Lt|=t.lanes,!(n&t.childLanes))return null;if(e!==null&&t.child!==e.child)throw Error(E(153));if(t.child!==null){for(e=t.child,n=St(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=St(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function Pf(e,t,n){switch(t.tag){case 3:Ku(t),cn();break;case 5:ju(t);break;case 1:we(t.type)&&Kr(t);break;case 4:Mo(t,t.stateNode.containerInfo);break;case 10:var r=t.type._context,i=t.memoizedProps.value;U(qr,r._currentValue),r._currentValue=i;break;case 13:if(r=t.memoizedState,r!==null)return r.dehydrated!==null?(U(K,K.current&1),t.flags|=128,null):n&t.child.childLanes?Xu(e,t,n):(U(K,K.current&1),e=it(e,t,n),e!==null?e.sibling:null);U(K,K.current&1);break;case 19:if(r=(n&t.childLanes)!==0,e.flags&128){if(r)return Zu(e,t,n);t.flags|=128}if(i=t.memoizedState,i!==null&&(i.rendering=null,i.tail=null,i.lastEffect=null),U(K,K.current),r)break;return null;case 22:case 23:return t.lanes=0,Qu(e,t,n)}return it(e,t,n)}var qu,bl,ec,tc;qu=function(e,t){for(var n=t.child;n!==null;){if(n.tag===5||n.tag===6)e.appendChild(n.stateNode);else if(n.tag!==4&&n.child!==null){n.child.return=n,n=n.child;continue}if(n===t)break;for(;n.sibling===null;){if(n.return===null||n.return===t)return;n=n.return}n.sibling.return=n.return,n=n.sibling}};bl=function(){};ec=function(e,t,n,r){var i=e.memoizedProps;if(i!==r){e=t.stateNode,Pt(Ye.current);var l=null;switch(n){case"input":i=al(e,i),r=al(e,r),l=[];break;case"select":i=Z({},i,{value:void 0}),r=Z({},r,{value:void 0}),l=[];break;case"textarea":i=dl(e,i),r=dl(e,r),l=[];break;default:typeof i.onClick!="function"&&typeof r.onClick=="function"&&(e.onclick=Qr)}hl(n,r);var o;n=null;for(f in i)if(!r.hasOwnProperty(f)&&i.hasOwnProperty(f)&&i[f]!=null)if(f==="style"){var u=i[f];for(o in u)u.hasOwnProperty(o)&&(n||(n={}),n[o]="")}else f!=="dangerouslySetInnerHTML"&&f!=="children"&&f!=="suppressContentEditableWarning"&&f!=="suppressHydrationWarning"&&f!=="autoFocus"&&(bn.hasOwnProperty(f)?l||(l=[]):(l=l||[]).push(f,null));for(f in r){var d=r[f];if(u=i!=null?i[f]:void 0,r.hasOwnProperty(f)&&d!==u&&(d!=null||u!=null))if(f==="style")if(u){for(o in u)!u.hasOwnProperty(o)||d&&d.hasOwnProperty(o)||(n||(n={}),n[o]="");for(o in d)d.hasOwnProperty(o)&&u[o]!==d[o]&&(n||(n={}),n[o]=d[o])}else n||(l||(l=[]),l.push(f,n)),n=d;else f==="dangerouslySetInnerHTML"?(d=d?d.__html:void 0,u=u?u.__html:void 0,d!=null&&u!==d&&(l=l||[]).push(f,d)):f==="children"?typeof d!="string"&&typeof d!="number"||(l=l||[]).push(f,""+d):f!=="suppressContentEditableWarning"&&f!=="suppressHydrationWarning"&&(bn.hasOwnProperty(f)?(d!=null&&f==="onScroll"&&$("scroll",e),l||u===d||(l=[])):(l=l||[]).push(f,d))}n&&(l=l||[]).push("style",n);var f=l;(t.updateQueue=f)&&(t.flags|=4)}};tc=function(e,t,n,r){n!==r&&(t.flags|=4)};function jn(e,t){if(!J)switch(e.tailMode){case"hidden":t=e.tail;for(var n=null;t!==null;)t.alternate!==null&&(n=t),t=t.sibling;n===null?e.tail=null:n.sibling=null;break;case"collapsed":n=e.tail;for(var r=null;n!==null;)n.alternate!==null&&(r=n),n=n.sibling;r===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:r.sibling=null}}function ce(e){var t=e.alternate!==null&&e.alternate.child===e.child,n=0,r=0;if(t)for(var i=e.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags&14680064,r|=i.flags&14680064,i.return=e,i=i.sibling;else for(i=e.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags,r|=i.flags,i.return=e,i=i.sibling;return e.subtreeFlags|=r,e.childLanes=n,t}function If(e,t,n){var r=t.pendingProps;switch(vo(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return ce(t),null;case 1:return we(t.type)&&Yr(),ce(t),null;case 3:return r=t.stateNode,fn(),V(Se),V(fe),Ro(),r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),(e===null||e.child===null)&&(kr(t)?t.flags|=4:e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,be!==null&&(Ql(be),be=null))),bl(e,t),ce(t),null;case 5:Co(t);var i=Pt(Zn.current);if(n=t.type,e!==null&&t.stateNode!=null)ec(e,t,n,r,i),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!r){if(t.stateNode===null)throw Error(E(166));return ce(t),null}if(e=Pt(Ye.current),kr(t)){r=t.stateNode,n=t.type;var l=t.memoizedProps;switch(r[Je]=t,r[Kn]=l,e=(t.mode&1)!==0,n){case"dialog":$("cancel",r),$("close",r);break;case"iframe":case"object":case"embed":$("load",r);break;case"video":case"audio":for(i=0;i<Tn.length;i++)$(Tn[i],r);break;case"source":$("error",r);break;case"img":case"image":case"link":$("error",r),$("load",r);break;case"details":$("toggle",r);break;case"input":es(r,l),$("invalid",r);break;case"select":r._wrapperState={wasMultiple:!!l.multiple},$("invalid",r);break;case"textarea":ns(r,l),$("invalid",r)}hl(n,l),i=null;for(var o in l)if(l.hasOwnProperty(o)){var u=l[o];o==="children"?typeof u=="string"?r.textContent!==u&&(l.suppressHydrationWarning!==!0&&wr(r.textContent,u,e),i=["children",u]):typeof u=="number"&&r.textContent!==""+u&&(l.suppressHydrationWarning!==!0&&wr(r.textContent,u,e),i=["children",""+u]):bn.hasOwnProperty(o)&&u!=null&&o==="onScroll"&&$("scroll",r)}switch(n){case"input":hr(r),ts(r,l,!0);break;case"textarea":hr(r),rs(r);break;case"select":case"option":break;default:typeof l.onClick=="function"&&(r.onclick=Qr)}r=i,t.updateQueue=r,r!==null&&(t.flags|=4)}else{o=i.nodeType===9?i:i.ownerDocument,e==="http://www.w3.org/1999/xhtml"&&(e=Ta(n)),e==="http://www.w3.org/1999/xhtml"?n==="script"?(e=o.createElement("div"),e.innerHTML="<script><\/script>",e=e.removeChild(e.firstChild)):typeof r.is=="string"?e=o.createElement(n,{is:r.is}):(e=o.createElement(n),n==="select"&&(o=e,r.multiple?o.multiple=!0:r.size&&(o.size=r.size))):e=o.createElementNS(e,n),e[Je]=t,e[Kn]=r,qu(e,t,!1,!1),t.stateNode=e;e:{switch(o=pl(n,r),n){case"dialog":$("cancel",e),$("close",e),i=r;break;case"iframe":case"object":case"embed":$("load",e),i=r;break;case"video":case"audio":for(i=0;i<Tn.length;i++)$(Tn[i],e);i=r;break;case"source":$("error",e),i=r;break;case"img":case"image":case"link":$("error",e),$("load",e),i=r;break;case"details":$("toggle",e),i=r;break;case"input":es(e,r),i=al(e,r),$("invalid",e);break;case"option":i=r;break;case"select":e._wrapperState={wasMultiple:!!r.multiple},i=Z({},r,{value:void 0}),$("invalid",e);break;case"textarea":ns(e,r),i=dl(e,r),$("invalid",e);break;default:i=r}hl(n,i),u=i;for(l in u)if(u.hasOwnProperty(l)){var d=u[l];l==="style"?Ia(e,d):l==="dangerouslySetInnerHTML"?(d=d?d.__html:void 0,d!=null&&Na(e,d)):l==="children"?typeof d=="string"?(n!=="textarea"||d!=="")&&Hn(e,d):typeof d=="number"&&Hn(e,""+d):l!=="suppressContentEditableWarning"&&l!=="suppressHydrationWarning"&&l!=="autoFocus"&&(bn.hasOwnProperty(l)?d!=null&&l==="onScroll"&&$("scroll",e):d!=null&&no(e,l,d,o))}switch(n){case"input":hr(e),ts(e,r,!1);break;case"textarea":hr(e),rs(e);break;case"option":r.value!=null&&e.setAttribute("value",""+wt(r.value));break;case"select":e.multiple=!!r.multiple,l=r.value,l!=null?tn(e,!!r.multiple,l,!1):r.defaultValue!=null&&tn(e,!!r.multiple,r.defaultValue,!0);break;default:typeof i.onClick=="function"&&(e.onclick=Qr)}switch(n){case"button":case"input":case"select":case"textarea":r=!!r.autoFocus;break e;case"img":r=!0;break e;default:r=!1}}r&&(t.flags|=4)}t.ref!==null&&(t.flags|=512,t.flags|=2097152)}return ce(t),null;case 6:if(e&&t.stateNode!=null)tc(e,t,e.memoizedProps,r);else{if(typeof r!="string"&&t.stateNode===null)throw Error(E(166));if(n=Pt(Zn.current),Pt(Ye.current),kr(t)){if(r=t.stateNode,n=t.memoizedProps,r[Je]=t,(l=r.nodeValue!==n)&&(e=Ce,e!==null))switch(e.tag){case 3:wr(r.nodeValue,n,(e.mode&1)!==0);break;case 5:e.memoizedProps.suppressHydrationWarning!==!0&&wr(r.nodeValue,n,(e.mode&1)!==0)}l&&(t.flags|=4)}else r=(n.nodeType===9?n:n.ownerDocument).createTextNode(r),r[Je]=t,t.stateNode=r}return ce(t),null;case 13:if(V(K),r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(J&&Me!==null&&t.mode&1&&!(t.flags&128))xu(),cn(),t.flags|=98560,l=!1;else if(l=kr(t),r!==null&&r.dehydrated!==null){if(e===null){if(!l)throw Error(E(318));if(l=t.memoizedState,l=l!==null?l.dehydrated:null,!l)throw Error(E(317));l[Je]=t}else cn(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;ce(t),l=!1}else be!==null&&(Ql(be),be=null),l=!0;if(!l)return t.flags&65536?t:null}return t.flags&128?(t.lanes=n,t):(r=r!==null,r!==(e!==null&&e.memoizedState!==null)&&r&&(t.child.flags|=8192,t.mode&1&&(e===null||K.current&1?re===0&&(re=3):Ao())),t.updateQueue!==null&&(t.flags|=4),ce(t),null);case 4:return fn(),bl(e,t),e===null&&Qn(t.stateNode.containerInfo),ce(t),null;case 10:return ko(t.type._context),ce(t),null;case 17:return we(t.type)&&Yr(),ce(t),null;case 19:if(V(K),l=t.memoizedState,l===null)return ce(t),null;if(r=(t.flags&128)!==0,o=l.rendering,o===null)if(r)jn(l,!1);else{if(re!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(o=ni(e),o!==null){for(t.flags|=128,jn(l,!1),r=o.updateQueue,r!==null&&(t.updateQueue=r,t.flags|=4),t.subtreeFlags=0,r=n,n=t.child;n!==null;)l=n,e=r,l.flags&=14680066,o=l.alternate,o===null?(l.childLanes=0,l.lanes=e,l.child=null,l.subtreeFlags=0,l.memoizedProps=null,l.memoizedState=null,l.updateQueue=null,l.dependencies=null,l.stateNode=null):(l.childLanes=o.childLanes,l.lanes=o.lanes,l.child=o.child,l.subtreeFlags=0,l.deletions=null,l.memoizedProps=o.memoizedProps,l.memoizedState=o.memoizedState,l.updateQueue=o.updateQueue,l.type=o.type,e=o.dependencies,l.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext}),n=n.sibling;return U(K,K.current&1|2),t.child}e=e.sibling}l.tail!==null&&ee()>pn&&(t.flags|=128,r=!0,jn(l,!1),t.lanes=4194304)}else{if(!r)if(e=ni(o),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),jn(l,!0),l.tail===null&&l.tailMode==="hidden"&&!o.alternate&&!J)return ce(t),null}else 2*ee()-l.renderingStartTime>pn&&n!==1073741824&&(t.flags|=128,r=!0,jn(l,!1),t.lanes=4194304);l.isBackwards?(o.sibling=t.child,t.child=o):(n=l.last,n!==null?n.sibling=o:t.child=o,l.last=o)}return l.tail!==null?(t=l.tail,l.rendering=t,l.tail=t.sibling,l.renderingStartTime=ee(),t.sibling=null,n=K.current,U(K,r?n&1|2:n&1),t):(ce(t),null);case 22:case 23:return Do(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&t.mode&1?je&1073741824&&(ce(t),t.subtreeFlags&6&&(t.flags|=8192)):ce(t),null;case 24:return null;case 25:return null}throw Error(E(156,t.tag))}function zf(e,t){switch(vo(t),t.tag){case 1:return we(t.type)&&Yr(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return fn(),V(Se),V(fe),Ro(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return Co(t),null;case 13:if(V(K),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(E(340));cn()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return V(K),null;case 4:return fn(),null;case 10:return ko(t.type._context),null;case 22:case 23:return Do(),null;case 24:return null;default:return null}}var Mr=!1,de=!1,_f=typeof WeakSet=="function"?WeakSet:Set,F=null;function Zt(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){q(e,t,r)}else n.current=null}function Hl(e,t,n){try{n()}catch(r){q(e,t,r)}}var Gs=!1;function Bf(e,t){if(jl=Vr,e=ou(),mo(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var i=r.anchorOffset,l=r.focusNode;r=r.focusOffset;try{n.nodeType,l.nodeType}catch{n=null;break e}var o=0,u=-1,d=-1,f=0,g=0,c=e,m=null;t:for(;;){for(var x;c!==n||i!==0&&c.nodeType!==3||(u=o+i),c!==l||r!==0&&c.nodeType!==3||(d=o+r),c.nodeType===3&&(o+=c.nodeValue.length),(x=c.firstChild)!==null;)m=c,c=x;for(;;){if(c===e)break t;if(m===n&&++f===i&&(u=o),m===l&&++g===r&&(d=o),(x=c.nextSibling)!==null)break;c=m,m=c.parentNode}c=x}n=u===-1||d===-1?null:{start:u,end:d}}else n=null}n=n||{start:0,end:0}}else n=null;for(Ml={focusedElem:e,selectionRange:n},Vr=!1,F=t;F!==null;)if(t=F,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,F=e;else for(;F!==null;){t=F;try{var w=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(w!==null){var S=w.memoizedProps,C=w.memoizedState,h=t.stateNode,a=h.getSnapshotBeforeUpdate(t.elementType===t.type?S:De(t.type,S),C);h.__reactInternalSnapshotBeforeUpdate=a}break;case 3:var p=t.stateNode.containerInfo;p.nodeType===1?p.textContent="":p.nodeType===9&&p.documentElement&&p.removeChild(p.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(E(163))}}catch(v){q(t,t.return,v)}if(e=t.sibling,e!==null){e.return=t.return,F=e;break}F=t.return}return w=Gs,Gs=!1,w}function Ln(e,t,n){var r=t.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var i=r=r.next;do{if((i.tag&e)===e){var l=i.destroy;i.destroy=void 0,l!==void 0&&Hl(t,n,l)}i=i.next}while(i!==r)}}function xi(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var n=t=t.next;do{if((n.tag&e)===e){var r=n.create;n.destroy=r()}n=n.next}while(n!==t)}}function Ul(e){var t=e.ref;if(t!==null){var n=e.stateNode;switch(e.tag){case 5:e=n;break;default:e=n}typeof t=="function"?t(e):t.current=e}}function nc(e){var t=e.alternate;t!==null&&(e.alternate=null,nc(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[Je],delete t[Kn],delete t[Fl],delete t[gf],delete t[vf])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function rc(e){return e.tag===5||e.tag===3||e.tag===4}function Js(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||rc(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function Wl(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.nodeType===8?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(n.nodeType===8?(t=n.parentNode,t.insertBefore(e,n)):(t=n,t.appendChild(e)),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=Qr));else if(r!==4&&(e=e.child,e!==null))for(Wl(e,t,n),e=e.sibling;e!==null;)Wl(e,t,n),e=e.sibling}function $l(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(e=e.child,e!==null))for($l(e,t,n),e=e.sibling;e!==null;)$l(e,t,n),e=e.sibling}var oe=null,Ae=!1;function ot(e,t,n){for(n=n.child;n!==null;)ic(e,t,n),n=n.sibling}function ic(e,t,n){if(Qe&&typeof Qe.onCommitFiberUnmount=="function")try{Qe.onCommitFiberUnmount(di,n)}catch{}switch(n.tag){case 5:de||Zt(n,t);case 6:var r=oe,i=Ae;oe=null,ot(e,t,n),oe=r,Ae=i,oe!==null&&(Ae?(e=oe,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):oe.removeChild(n.stateNode));break;case 18:oe!==null&&(Ae?(e=oe,n=n.stateNode,e.nodeType===8?Wi(e.parentNode,n):e.nodeType===1&&Wi(e,n),Vn(e)):Wi(oe,n.stateNode));break;case 4:r=oe,i=Ae,oe=n.stateNode.containerInfo,Ae=!0,ot(e,t,n),oe=r,Ae=i;break;case 0:case 11:case 14:case 15:if(!de&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){i=r=r.next;do{var l=i,o=l.destroy;l=l.tag,o!==void 0&&(l&2||l&4)&&Hl(n,t,o),i=i.next}while(i!==r)}ot(e,t,n);break;case 1:if(!de&&(Zt(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(u){q(n,t,u)}ot(e,t,n);break;case 21:ot(e,t,n);break;case 22:n.mode&1?(de=(r=de)||n.memoizedState!==null,ot(e,t,n),de=r):ot(e,t,n);break;default:ot(e,t,n)}}function Qs(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new _f),t.forEach(function(r){var i=$f.bind(null,e,r);n.has(r)||(n.add(r),r.then(i,i))})}}function Le(e,t){var n=t.deletions;if(n!==null)for(var r=0;r<n.length;r++){var i=n[r];try{var l=e,o=t,u=o;e:for(;u!==null;){switch(u.tag){case 5:oe=u.stateNode,Ae=!1;break e;case 3:oe=u.stateNode.containerInfo,Ae=!0;break e;case 4:oe=u.stateNode.containerInfo,Ae=!0;break e}u=u.return}if(oe===null)throw Error(E(160));ic(l,o,i),oe=null,Ae=!1;var d=i.alternate;d!==null&&(d.return=null),i.return=null}catch(f){q(i,t,f)}}if(t.subtreeFlags&12854)for(t=t.child;t!==null;)lc(t,e),t=t.sibling}function lc(e,t){var n=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(Le(t,e),Ve(e),r&4){try{Ln(3,e,e.return),xi(3,e)}catch(S){q(e,e.return,S)}try{Ln(5,e,e.return)}catch(S){q(e,e.return,S)}}break;case 1:Le(t,e),Ve(e),r&512&&n!==null&&Zt(n,n.return);break;case 5:if(Le(t,e),Ve(e),r&512&&n!==null&&Zt(n,n.return),e.flags&32){var i=e.stateNode;try{Hn(i,"")}catch(S){q(e,e.return,S)}}if(r&4&&(i=e.stateNode,i!=null)){var l=e.memoizedProps,o=n!==null?n.memoizedProps:l,u=e.type,d=e.updateQueue;if(e.updateQueue=null,d!==null)try{u==="input"&&l.type==="radio"&&l.name!=null&&Ra(i,l),pl(u,o);var f=pl(u,l);for(o=0;o<d.length;o+=2){var g=d[o],c=d[o+1];g==="style"?Ia(i,c):g==="dangerouslySetInnerHTML"?Na(i,c):g==="children"?Hn(i,c):no(i,g,c,f)}switch(u){case"input":ul(i,l);break;case"textarea":Fa(i,l);break;case"select":var m=i._wrapperState.wasMultiple;i._wrapperState.wasMultiple=!!l.multiple;var x=l.value;x!=null?tn(i,!!l.multiple,x,!1):m!==!!l.multiple&&(l.defaultValue!=null?tn(i,!!l.multiple,l.defaultValue,!0):tn(i,!!l.multiple,l.multiple?[]:"",!1))}i[Kn]=l}catch(S){q(e,e.return,S)}}break;case 6:if(Le(t,e),Ve(e),r&4){if(e.stateNode===null)throw Error(E(162));i=e.stateNode,l=e.memoizedProps;try{i.nodeValue=l}catch(S){q(e,e.return,S)}}break;case 3:if(Le(t,e),Ve(e),r&4&&n!==null&&n.memoizedState.isDehydrated)try{Vn(t.containerInfo)}catch(S){q(e,e.return,S)}break;case 4:Le(t,e),Ve(e);break;case 13:Le(t,e),Ve(e),i=e.child,i.flags&8192&&(l=i.memoizedState!==null,i.stateNode.isHidden=l,!l||i.alternate!==null&&i.alternate.memoizedState!==null||(Oo=ee())),r&4&&Qs(e);break;case 22:if(g=n!==null&&n.memoizedState!==null,e.mode&1?(de=(f=de)||g,Le(t,e),de=f):Le(t,e),Ve(e),r&8192){if(f=e.memoizedState!==null,(e.stateNode.isHidden=f)&&!g&&e.mode&1)for(F=e,g=e.child;g!==null;){for(c=F=g;F!==null;){switch(m=F,x=m.child,m.tag){case 0:case 11:case 14:case 15:Ln(4,m,m.return);break;case 1:Zt(m,m.return);var w=m.stateNode;if(typeof w.componentWillUnmount=="function"){r=m,n=m.return;try{t=r,w.props=t.memoizedProps,w.state=t.memoizedState,w.componentWillUnmount()}catch(S){q(r,n,S)}}break;case 5:Zt(m,m.return);break;case 22:if(m.memoizedState!==null){Ks(c);continue}}x!==null?(x.return=m,F=x):Ks(c)}g=g.sibling}e:for(g=null,c=e;;){if(c.tag===5){if(g===null){g=c;try{i=c.stateNode,f?(l=i.style,typeof l.setProperty=="function"?l.setProperty("display","none","important"):l.display="none"):(u=c.stateNode,d=c.memoizedProps.style,o=d!=null&&d.hasOwnProperty("display")?d.display:null,u.style.display=Pa("display",o))}catch(S){q(e,e.return,S)}}}else if(c.tag===6){if(g===null)try{c.stateNode.nodeValue=f?"":c.memoizedProps}catch(S){q(e,e.return,S)}}else if((c.tag!==22&&c.tag!==23||c.memoizedState===null||c===e)&&c.child!==null){c.child.return=c,c=c.child;continue}if(c===e)break e;for(;c.sibling===null;){if(c.return===null||c.return===e)break e;g===c&&(g=null),c=c.return}g===c&&(g=null),c.sibling.return=c.return,c=c.sibling}}break;case 19:Le(t,e),Ve(e),r&4&&Qs(e);break;case 21:break;default:Le(t,e),Ve(e)}}function Ve(e){var t=e.flags;if(t&2){try{e:{for(var n=e.return;n!==null;){if(rc(n)){var r=n;break e}n=n.return}throw Error(E(160))}switch(r.tag){case 5:var i=r.stateNode;r.flags&32&&(Hn(i,""),r.flags&=-33);var l=Js(e);$l(e,l,i);break;case 3:case 4:var o=r.stateNode.containerInfo,u=Js(e);Wl(e,u,o);break;default:throw Error(E(161))}}catch(d){q(e,e.return,d)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function Of(e,t,n){F=e,oc(e)}function oc(e,t,n){for(var r=(e.mode&1)!==0;F!==null;){var i=F,l=i.child;if(i.tag===22&&r){var o=i.memoizedState!==null||Mr;if(!o){var u=i.alternate,d=u!==null&&u.memoizedState!==null||de;u=Mr;var f=de;if(Mr=o,(de=d)&&!f)for(F=i;F!==null;)o=F,d=o.child,o.tag===22&&o.memoizedState!==null?Xs(i):d!==null?(d.return=o,F=d):Xs(i);for(;l!==null;)F=l,oc(l),l=l.sibling;F=i,Mr=u,de=f}Ys(e)}else i.subtreeFlags&8772&&l!==null?(l.return=i,F=l):Ys(e)}}function Ys(e){for(;F!==null;){var t=F;if(t.flags&8772){var n=t.alternate;try{if(t.flags&8772)switch(t.tag){case 0:case 11:case 15:de||xi(5,t);break;case 1:var r=t.stateNode;if(t.flags&4&&!de)if(n===null)r.componentDidMount();else{var i=t.elementType===t.type?n.memoizedProps:De(t.type,n.memoizedProps);r.componentDidUpdate(i,n.memoizedState,r.__reactInternalSnapshotBeforeUpdate)}var l=t.updateQueue;l!==null&&zs(t,l,r);break;case 3:var o=t.updateQueue;if(o!==null){if(n=null,t.child!==null)switch(t.child.tag){case 5:n=t.child.stateNode;break;case 1:n=t.child.stateNode}zs(t,o,n)}break;case 5:var u=t.stateNode;if(n===null&&t.flags&4){n=u;var d=t.memoizedProps;switch(t.type){case"button":case"input":case"select":case"textarea":d.autoFocus&&n.focus();break;case"img":d.src&&(n.src=d.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(t.memoizedState===null){var f=t.alternate;if(f!==null){var g=f.memoizedState;if(g!==null){var c=g.dehydrated;c!==null&&Vn(c)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(E(163))}de||t.flags&512&&Ul(t)}catch(m){q(t,t.return,m)}}if(t===e){F=null;break}if(n=t.sibling,n!==null){n.return=t.return,F=n;break}F=t.return}}function Ks(e){for(;F!==null;){var t=F;if(t===e){F=null;break}var n=t.sibling;if(n!==null){n.return=t.return,F=n;break}F=t.return}}function Xs(e){for(;F!==null;){var t=F;try{switch(t.tag){case 0:case 11:case 15:var n=t.return;try{xi(4,t)}catch(d){q(t,n,d)}break;case 1:var r=t.stateNode;if(typeof r.componentDidMount=="function"){var i=t.return;try{r.componentDidMount()}catch(d){q(t,i,d)}}var l=t.return;try{Ul(t)}catch(d){q(t,l,d)}break;case 5:var o=t.return;try{Ul(t)}catch(d){q(t,o,d)}}}catch(d){q(t,t.return,d)}if(t===e){F=null;break}var u=t.sibling;if(u!==null){u.return=t.return,F=u;break}F=t.return}}var Lf=Math.ceil,li=lt.ReactCurrentDispatcher,_o=lt.ReactCurrentOwner,ze=lt.ReactCurrentBatchConfig,D=0,le=null,te=null,se=0,je=0,qt=jt(0),re=0,nr=null,Lt=0,Si=0,Bo=0,Dn=null,ve=null,Oo=0,pn=1/0,Ke=null,oi=!1,Vl=null,vt=null,Cr=!1,ft=null,si=0,An=0,Gl=null,Lr=-1,Dr=0;function pe(){return D&6?ee():Lr!==-1?Lr:Lr=ee()}function xt(e){return e.mode&1?D&2&&se!==0?se&-se:Sf.transition!==null?(Dr===0&&(Dr=$a()),Dr):(e=H,e!==0||(e=window.event,e=e===void 0?16:Xa(e.type)),e):1}function Ue(e,t,n,r){if(50<An)throw An=0,Gl=null,Error(E(185));ir(e,n,r),(!(D&2)||e!==le)&&(e===le&&(!(D&2)&&(Si|=n),re===4&&ct(e,se)),ke(e,r),n===1&&D===0&&!(t.mode&1)&&(pn=ee()+500,mi&&Mt()))}function ke(e,t){var n=e.callbackNode;xd(e,t);var r=$r(e,e===le?se:0);if(r===0)n!==null&&os(n),e.callbackNode=null,e.callbackPriority=0;else if(t=r&-r,e.callbackPriority!==t){if(n!=null&&os(n),t===1)e.tag===0?xf(Zs.bind(null,e)):mu(Zs.bind(null,e)),yf(function(){!(D&6)&&Mt()}),n=null;else{switch(Va(r)){case 1:n=so;break;case 4:n=Ua;break;case 16:n=Wr;break;case 536870912:n=Wa;break;default:n=Wr}n=pc(n,sc.bind(null,e))}e.callbackPriority=t,e.callbackNode=n}}function sc(e,t){if(Lr=-1,Dr=0,D&6)throw Error(E(327));var n=e.callbackNode;if(sn()&&e.callbackNode!==n)return null;var r=$r(e,e===le?se:0);if(r===0)return null;if(r&30||r&e.expiredLanes||t)t=ai(e,r);else{t=r;var i=D;D|=2;var l=uc();(le!==e||se!==t)&&(Ke=null,pn=ee()+500,It(e,t));do try{bf();break}catch(u){ac(e,u)}while(!0);wo(),li.current=l,D=i,te!==null?t=0:(le=null,se=0,t=re)}if(t!==0){if(t===2&&(i=xl(e),i!==0&&(r=i,t=Jl(e,i))),t===1)throw n=nr,It(e,0),ct(e,r),ke(e,ee()),n;if(t===6)ct(e,r);else{if(i=e.current.alternate,!(r&30)&&!Df(i)&&(t=ai(e,r),t===2&&(l=xl(e),l!==0&&(r=l,t=Jl(e,l))),t===1))throw n=nr,It(e,0),ct(e,r),ke(e,ee()),n;switch(e.finishedWork=i,e.finishedLanes=r,t){case 0:case 1:throw Error(E(345));case 2:Ft(e,ve,Ke);break;case 3:if(ct(e,r),(r&130023424)===r&&(t=Oo+500-ee(),10<t)){if($r(e,0)!==0)break;if(i=e.suspendedLanes,(i&r)!==r){pe(),e.pingedLanes|=e.suspendedLanes&i;break}e.timeoutHandle=Rl(Ft.bind(null,e,ve,Ke),t);break}Ft(e,ve,Ke);break;case 4:if(ct(e,r),(r&4194240)===r)break;for(t=e.eventTimes,i=-1;0<r;){var o=31-He(r);l=1<<o,o=t[o],o>i&&(i=o),r&=~l}if(r=i,r=ee()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*Lf(r/1960))-r,10<r){e.timeoutHandle=Rl(Ft.bind(null,e,ve,Ke),r);break}Ft(e,ve,Ke);break;case 5:Ft(e,ve,Ke);break;default:throw Error(E(329))}}}return ke(e,ee()),e.callbackNode===n?sc.bind(null,e):null}function Jl(e,t){var n=Dn;return e.current.memoizedState.isDehydrated&&(It(e,t).flags|=256),e=ai(e,t),e!==2&&(t=ve,ve=n,t!==null&&Ql(t)),e}function Ql(e){ve===null?ve=e:ve.push.apply(ve,e)}function Df(e){for(var t=e;;){if(t.flags&16384){var n=t.updateQueue;if(n!==null&&(n=n.stores,n!==null))for(var r=0;r<n.length;r++){var i=n[r],l=i.getSnapshot;i=i.value;try{if(!We(l(),i))return!1}catch{return!1}}}if(n=t.child,t.subtreeFlags&16384&&n!==null)n.return=t,t=n;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function ct(e,t){for(t&=~Bo,t&=~Si,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var n=31-He(t),r=1<<n;e[n]=-1,t&=~r}}function Zs(e){if(D&6)throw Error(E(327));sn();var t=$r(e,0);if(!(t&1))return ke(e,ee()),null;var n=ai(e,t);if(e.tag!==0&&n===2){var r=xl(e);r!==0&&(t=r,n=Jl(e,r))}if(n===1)throw n=nr,It(e,0),ct(e,t),ke(e,ee()),n;if(n===6)throw Error(E(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,Ft(e,ve,Ke),ke(e,ee()),null}function Lo(e,t){var n=D;D|=1;try{return e(t)}finally{D=n,D===0&&(pn=ee()+500,mi&&Mt())}}function Dt(e){ft!==null&&ft.tag===0&&!(D&6)&&sn();var t=D;D|=1;var n=ze.transition,r=H;try{if(ze.transition=null,H=1,e)return e()}finally{H=r,ze.transition=n,D=t,!(D&6)&&Mt()}}function Do(){je=qt.current,V(qt)}function It(e,t){e.finishedWork=null,e.finishedLanes=0;var n=e.timeoutHandle;if(n!==-1&&(e.timeoutHandle=-1,pf(n)),te!==null)for(n=te.return;n!==null;){var r=n;switch(vo(r),r.tag){case 1:r=r.type.childContextTypes,r!=null&&Yr();break;case 3:fn(),V(Se),V(fe),Ro();break;case 5:Co(r);break;case 4:fn();break;case 13:V(K);break;case 19:V(K);break;case 10:ko(r.type._context);break;case 22:case 23:Do()}n=n.return}if(le=e,te=e=St(e.current,null),se=je=t,re=0,nr=null,Bo=Si=Lt=0,ve=Dn=null,Nt!==null){for(t=0;t<Nt.length;t++)if(n=Nt[t],r=n.interleaved,r!==null){n.interleaved=null;var i=r.next,l=n.pending;if(l!==null){var o=l.next;l.next=i,r.next=o}n.pending=r}Nt=null}return e}function ac(e,t){do{var n=te;try{if(wo(),_r.current=ii,ri){for(var r=X.memoizedState;r!==null;){var i=r.queue;i!==null&&(i.pending=null),r=r.next}ri=!1}if(Ot=0,ie=ne=X=null,On=!1,qn=0,_o.current=null,n===null||n.return===null){re=1,nr=t,te=null;break}e:{var l=e,o=n.return,u=n,d=t;if(t=se,u.flags|=32768,d!==null&&typeof d=="object"&&typeof d.then=="function"){var f=d,g=u,c=g.tag;if(!(g.mode&1)&&(c===0||c===11||c===15)){var m=g.alternate;m?(g.updateQueue=m.updateQueue,g.memoizedState=m.memoizedState,g.lanes=m.lanes):(g.updateQueue=null,g.memoizedState=null)}var x=As(o);if(x!==null){x.flags&=-257,bs(x,o,u,l,t),x.mode&1&&Ds(l,f,t),t=x,d=f;var w=t.updateQueue;if(w===null){var S=new Set;S.add(d),t.updateQueue=S}else w.add(d);break e}else{if(!(t&1)){Ds(l,f,t),Ao();break e}d=Error(E(426))}}else if(J&&u.mode&1){var C=As(o);if(C!==null){!(C.flags&65536)&&(C.flags|=256),bs(C,o,u,l,t),xo(hn(d,u));break e}}l=d=hn(d,u),re!==4&&(re=2),Dn===null?Dn=[l]:Dn.push(l),l=o;do{switch(l.tag){case 3:l.flags|=65536,t&=-t,l.lanes|=t;var h=Vu(l,d,t);Is(l,h);break e;case 1:u=d;var a=l.type,p=l.stateNode;if(!(l.flags&128)&&(typeof a.getDerivedStateFromError=="function"||p!==null&&typeof p.componentDidCatch=="function"&&(vt===null||!vt.has(p)))){l.flags|=65536,t&=-t,l.lanes|=t;var v=Gu(l,u,t);Is(l,v);break e}}l=l.return}while(l!==null)}dc(n)}catch(y){t=y,te===n&&n!==null&&(te=n=n.return);continue}break}while(!0)}function uc(){var e=li.current;return li.current=ii,e===null?ii:e}function Ao(){(re===0||re===3||re===2)&&(re=4),le===null||!(Lt&268435455)&&!(Si&268435455)||ct(le,se)}function ai(e,t){var n=D;D|=2;var r=uc();(le!==e||se!==t)&&(Ke=null,It(e,t));do try{Af();break}catch(i){ac(e,i)}while(!0);if(wo(),D=n,li.current=r,te!==null)throw Error(E(261));return le=null,se=0,re}function Af(){for(;te!==null;)cc(te)}function bf(){for(;te!==null&&!cd();)cc(te)}function cc(e){var t=hc(e.alternate,e,je);e.memoizedProps=e.pendingProps,t===null?dc(e):te=t,_o.current=null}function dc(e){var t=e;do{var n=t.alternate;if(e=t.return,t.flags&32768){if(n=zf(n,t),n!==null){n.flags&=32767,te=n;return}if(e!==null)e.flags|=32768,e.subtreeFlags=0,e.deletions=null;else{re=6,te=null;return}}else if(n=If(n,t,je),n!==null){te=n;return}if(t=t.sibling,t!==null){te=t;return}te=t=e}while(t!==null);re===0&&(re=5)}function Ft(e,t,n){var r=H,i=ze.transition;try{ze.transition=null,H=1,Hf(e,t,n,r)}finally{ze.transition=i,H=r}return null}function Hf(e,t,n,r){do sn();while(ft!==null);if(D&6)throw Error(E(327));n=e.finishedWork;var i=e.finishedLanes;if(n===null)return null;if(e.finishedWork=null,e.finishedLanes=0,n===e.current)throw Error(E(177));e.callbackNode=null,e.callbackPriority=0;var l=n.lanes|n.childLanes;if(Sd(e,l),e===le&&(te=le=null,se=0),!(n.subtreeFlags&2064)&&!(n.flags&2064)||Cr||(Cr=!0,pc(Wr,function(){return sn(),null})),l=(n.flags&15990)!==0,n.subtreeFlags&15990||l){l=ze.transition,ze.transition=null;var o=H;H=1;var u=D;D|=4,_o.current=null,Bf(e,n),lc(n,e),sf(Ml),Vr=!!jl,Ml=jl=null,e.current=n,Of(n),dd(),D=u,H=o,ze.transition=l}else e.current=n;if(Cr&&(Cr=!1,ft=e,si=i),l=e.pendingLanes,l===0&&(vt=null),pd(n.stateNode),ke(e,ee()),t!==null)for(r=e.onRecoverableError,n=0;n<t.length;n++)i=t[n],r(i.value,{componentStack:i.stack,digest:i.digest});if(oi)throw oi=!1,e=Vl,Vl=null,e;return si&1&&e.tag!==0&&sn(),l=e.pendingLanes,l&1?e===Gl?An++:(An=0,Gl=e):An=0,Mt(),null}function sn(){if(ft!==null){var e=Va(si),t=ze.transition,n=H;try{if(ze.transition=null,H=16>e?16:e,ft===null)var r=!1;else{if(e=ft,ft=null,si=0,D&6)throw Error(E(331));var i=D;for(D|=4,F=e.current;F!==null;){var l=F,o=l.child;if(F.flags&16){var u=l.deletions;if(u!==null){for(var d=0;d<u.length;d++){var f=u[d];for(F=f;F!==null;){var g=F;switch(g.tag){case 0:case 11:case 15:Ln(8,g,l)}var c=g.child;if(c!==null)c.return=g,F=c;else for(;F!==null;){g=F;var m=g.sibling,x=g.return;if(nc(g),g===f){F=null;break}if(m!==null){m.return=x,F=m;break}F=x}}}var w=l.alternate;if(w!==null){var S=w.child;if(S!==null){w.child=null;do{var C=S.sibling;S.sibling=null,S=C}while(S!==null)}}F=l}}if(l.subtreeFlags&2064&&o!==null)o.return=l,F=o;else e:for(;F!==null;){if(l=F,l.flags&2048)switch(l.tag){case 0:case 11:case 15:Ln(9,l,l.return)}var h=l.sibling;if(h!==null){h.return=l.return,F=h;break e}F=l.return}}var a=e.current;for(F=a;F!==null;){o=F;var p=o.child;if(o.subtreeFlags&2064&&p!==null)p.return=o,F=p;else e:for(o=a;F!==null;){if(u=F,u.flags&2048)try{switch(u.tag){case 0:case 11:case 15:xi(9,u)}}catch(y){q(u,u.return,y)}if(u===o){F=null;break e}var v=u.sibling;if(v!==null){v.return=u.return,F=v;break e}F=u.return}}if(D=i,Mt(),Qe&&typeof Qe.onPostCommitFiberRoot=="function")try{Qe.onPostCommitFiberRoot(di,e)}catch{}r=!0}return r}finally{H=n,ze.transition=t}}return!1}function qs(e,t,n){t=hn(n,t),t=Vu(e,t,1),e=gt(e,t,1),t=pe(),e!==null&&(ir(e,1,t),ke(e,t))}function q(e,t,n){if(e.tag===3)qs(e,e,n);else for(;t!==null;){if(t.tag===3){qs(t,e,n);break}else if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof r.componentDidCatch=="function"&&(vt===null||!vt.has(r))){e=hn(n,e),e=Gu(t,e,1),t=gt(t,e,1),e=pe(),t!==null&&(ir(t,1,e),ke(t,e));break}}t=t.return}}function Uf(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),t=pe(),e.pingedLanes|=e.suspendedLanes&n,le===e&&(se&n)===n&&(re===4||re===3&&(se&130023424)===se&&500>ee()-Oo?It(e,0):Bo|=n),ke(e,t)}function fc(e,t){t===0&&(e.mode&1?(t=mr,mr<<=1,!(mr&130023424)&&(mr=4194304)):t=1);var n=pe();e=rt(e,t),e!==null&&(ir(e,t,n),ke(e,n))}function Wf(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),fc(e,n)}function $f(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,i=e.memoizedState;i!==null&&(n=i.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(E(314))}r!==null&&r.delete(t),fc(e,n)}var hc;hc=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||Se.current)xe=!0;else{if(!(e.lanes&n)&&!(t.flags&128))return xe=!1,Pf(e,t,n);xe=!!(e.flags&131072)}else xe=!1,J&&t.flags&1048576&&gu(t,Zr,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;Or(e,t),e=t.pendingProps;var i=un(t,fe.current);on(t,n),i=To(null,t,r,e,i,n);var l=No();return t.flags|=1,typeof i=="object"&&i!==null&&typeof i.render=="function"&&i.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,we(r)?(l=!0,Kr(t)):l=!1,t.memoizedState=i.state!==null&&i.state!==void 0?i.state:null,jo(t),i.updater=vi,t.stateNode=i,i._reactInternals=t,_l(t,r,e,n),t=Ll(null,t,r,!0,l,n)):(t.tag=0,J&&l&&go(t),he(null,t,i,n),t=t.child),t;case 16:r=t.elementType;e:{switch(Or(e,t),e=t.pendingProps,i=r._init,r=i(r._payload),t.type=r,i=t.tag=Gf(r),e=De(r,e),i){case 0:t=Ol(null,t,r,e,n);break e;case 1:t=Ws(null,t,r,e,n);break e;case 11:t=Hs(null,t,r,e,n);break e;case 14:t=Us(null,t,r,De(r.type,e),n);break e}throw Error(E(306,r,""))}return t;case 0:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:De(r,i),Ol(e,t,r,i,n);case 1:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:De(r,i),Ws(e,t,r,i,n);case 3:e:{if(Ku(t),e===null)throw Error(E(387));r=t.pendingProps,l=t.memoizedState,i=l.element,Eu(e,t),ti(t,r,null,n);var o=t.memoizedState;if(r=o.element,l.isDehydrated)if(l={element:r,isDehydrated:!1,cache:o.cache,pendingSuspenseBoundaries:o.pendingSuspenseBoundaries,transitions:o.transitions},t.updateQueue.baseState=l,t.memoizedState=l,t.flags&256){i=hn(Error(E(423)),t),t=$s(e,t,r,n,i);break e}else if(r!==i){i=hn(Error(E(424)),t),t=$s(e,t,r,n,i);break e}else for(Me=mt(t.stateNode.containerInfo.firstChild),Ce=t,J=!0,be=null,n=wu(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(cn(),r===i){t=it(e,t,n);break e}he(e,t,r,n)}t=t.child}return t;case 5:return ju(t),e===null&&Pl(t),r=t.type,i=t.pendingProps,l=e!==null?e.memoizedProps:null,o=i.children,Cl(r,i)?o=null:l!==null&&Cl(r,l)&&(t.flags|=32),Yu(e,t),he(e,t,o,n),t.child;case 6:return e===null&&Pl(t),null;case 13:return Xu(e,t,n);case 4:return Mo(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=dn(t,null,r,n):he(e,t,r,n),t.child;case 11:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:De(r,i),Hs(e,t,r,i,n);case 7:return he(e,t,t.pendingProps,n),t.child;case 8:return he(e,t,t.pendingProps.children,n),t.child;case 12:return he(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,i=t.pendingProps,l=t.memoizedProps,o=i.value,U(qr,r._currentValue),r._currentValue=o,l!==null)if(We(l.value,o)){if(l.children===i.children&&!Se.current){t=it(e,t,n);break e}}else for(l=t.child,l!==null&&(l.return=t);l!==null;){var u=l.dependencies;if(u!==null){o=l.child;for(var d=u.firstContext;d!==null;){if(d.context===r){if(l.tag===1){d=et(-1,n&-n),d.tag=2;var f=l.updateQueue;if(f!==null){f=f.shared;var g=f.pending;g===null?d.next=d:(d.next=g.next,g.next=d),f.pending=d}}l.lanes|=n,d=l.alternate,d!==null&&(d.lanes|=n),Il(l.return,n,t),u.lanes|=n;break}d=d.next}}else if(l.tag===10)o=l.type===t.type?null:l.child;else if(l.tag===18){if(o=l.return,o===null)throw Error(E(341));o.lanes|=n,u=o.alternate,u!==null&&(u.lanes|=n),Il(o,n,t),o=l.sibling}else o=l.child;if(o!==null)o.return=l;else for(o=l;o!==null;){if(o===t){o=null;break}if(l=o.sibling,l!==null){l.return=o.return,o=l;break}o=o.return}l=o}he(e,t,i.children,n),t=t.child}return t;case 9:return i=t.type,r=t.pendingProps.children,on(t,n),i=_e(i),r=r(i),t.flags|=1,he(e,t,r,n),t.child;case 14:return r=t.type,i=De(r,t.pendingProps),i=De(r.type,i),Us(e,t,r,i,n);case 15:return Ju(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:De(r,i),Or(e,t),t.tag=1,we(r)?(e=!0,Kr(t)):e=!1,on(t,n),$u(t,r,i),_l(t,r,i,n),Ll(null,t,r,!0,e,n);case 19:return Zu(e,t,n);case 22:return Qu(e,t,n)}throw Error(E(156,t.tag))};function pc(e,t){return Ha(e,t)}function Vf(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Ie(e,t,n,r){return new Vf(e,t,n,r)}function bo(e){return e=e.prototype,!(!e||!e.isReactComponent)}function Gf(e){if(typeof e=="function")return bo(e)?1:0;if(e!=null){if(e=e.$$typeof,e===io)return 11;if(e===lo)return 14}return 2}function St(e,t){var n=e.alternate;return n===null?(n=Ie(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&14680064,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function Ar(e,t,n,r,i,l){var o=2;if(r=e,typeof e=="function")bo(e)&&(o=1);else if(typeof e=="string")o=5;else e:switch(e){case Wt:return zt(n.children,i,l,t);case ro:o=8,i|=8;break;case il:return e=Ie(12,n,t,i|2),e.elementType=il,e.lanes=l,e;case ll:return e=Ie(13,n,t,i),e.elementType=ll,e.lanes=l,e;case ol:return e=Ie(19,n,t,i),e.elementType=ol,e.lanes=l,e;case ja:return wi(n,i,l,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case ka:o=10;break e;case Ea:o=9;break e;case io:o=11;break e;case lo:o=14;break e;case st:o=16,r=null;break e}throw Error(E(130,e==null?e:typeof e,""))}return t=Ie(o,n,t,i),t.elementType=e,t.type=r,t.lanes=l,t}function zt(e,t,n,r){return e=Ie(7,e,r,t),e.lanes=n,e}function wi(e,t,n,r){return e=Ie(22,e,r,t),e.elementType=ja,e.lanes=n,e.stateNode={isHidden:!1},e}function Xi(e,t,n){return e=Ie(6,e,null,t),e.lanes=n,e}function Zi(e,t,n){return t=Ie(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function Jf(e,t,n,r,i){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=Ii(0),this.expirationTimes=Ii(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Ii(0),this.identifierPrefix=r,this.onRecoverableError=i,this.mutableSourceEagerHydrationData=null}function Ho(e,t,n,r,i,l,o,u,d){return e=new Jf(e,t,n,u,d),t===1?(t=1,l===!0&&(t|=8)):t=0,l=Ie(3,null,null,t),e.current=l,l.stateNode=e,l.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},jo(l),e}function Qf(e,t,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:Ut,key:r==null?null:""+r,children:e,containerInfo:t,implementation:n}}function yc(e){if(!e)return kt;e=e._reactInternals;e:{if(bt(e)!==e||e.tag!==1)throw Error(E(170));var t=e;do{switch(t.tag){case 3:t=t.stateNode.context;break e;case 1:if(we(t.type)){t=t.stateNode.__reactInternalMemoizedMergedChildContext;break e}}t=t.return}while(t!==null);throw Error(E(171))}if(e.tag===1){var n=e.type;if(we(n))return yu(e,n,t)}return t}function mc(e,t,n,r,i,l,o,u,d){return e=Ho(n,r,!0,e,i,l,o,u,d),e.context=yc(null),n=e.current,r=pe(),i=xt(n),l=et(r,i),l.callback=t??null,gt(n,l,i),e.current.lanes=i,ir(e,i,r),ke(e,r),e}function ki(e,t,n,r){var i=t.current,l=pe(),o=xt(i);return n=yc(n),t.context===null?t.context=n:t.pendingContext=n,t=et(l,o),t.payload={element:e},r=r===void 0?null:r,r!==null&&(t.callback=r),e=gt(i,t,o),e!==null&&(Ue(e,i,o,l),zr(e,i,o)),o}function ui(e){if(e=e.current,!e.child)return null;switch(e.child.tag){case 5:return e.child.stateNode;default:return e.child.stateNode}}function ea(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function Uo(e,t){ea(e,t),(e=e.alternate)&&ea(e,t)}function Yf(){return null}var gc=typeof reportError=="function"?reportError:function(e){console.error(e)};function Wo(e){this._internalRoot=e}Ei.prototype.render=Wo.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(E(409));ki(e,t,null,null)};Ei.prototype.unmount=Wo.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;Dt(function(){ki(null,e,null,null)}),t[nt]=null}};function Ei(e){this._internalRoot=e}Ei.prototype.unstable_scheduleHydration=function(e){if(e){var t=Qa();e={blockedOn:null,target:e,priority:t};for(var n=0;n<ut.length&&t!==0&&t<ut[n].priority;n++);ut.splice(n,0,e),n===0&&Ka(e)}};function $o(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function ji(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11&&(e.nodeType!==8||e.nodeValue!==" react-mount-point-unstable "))}function ta(){}function Kf(e,t,n,r,i){if(i){if(typeof r=="function"){var l=r;r=function(){var f=ui(o);l.call(f)}}var o=mc(t,r,e,0,null,!1,!1,"",ta);return e._reactRootContainer=o,e[nt]=o.current,Qn(e.nodeType===8?e.parentNode:e),Dt(),o}for(;i=e.lastChild;)e.removeChild(i);if(typeof r=="function"){var u=r;r=function(){var f=ui(d);u.call(f)}}var d=Ho(e,0,!1,null,null,!1,!1,"",ta);return e._reactRootContainer=d,e[nt]=d.current,Qn(e.nodeType===8?e.parentNode:e),Dt(function(){ki(t,d,n,r)}),d}function Mi(e,t,n,r,i){var l=n._reactRootContainer;if(l){var o=l;if(typeof i=="function"){var u=i;i=function(){var d=ui(o);u.call(d)}}ki(t,o,e,i)}else o=Kf(n,t,e,i,r);return ui(o)}Ga=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var n=Fn(t.pendingLanes);n!==0&&(ao(t,n|1),ke(t,ee()),!(D&6)&&(pn=ee()+500,Mt()))}break;case 13:Dt(function(){var r=rt(e,1);if(r!==null){var i=pe();Ue(r,e,1,i)}}),Uo(e,1)}};uo=function(e){if(e.tag===13){var t=rt(e,134217728);if(t!==null){var n=pe();Ue(t,e,134217728,n)}Uo(e,134217728)}};Ja=function(e){if(e.tag===13){var t=xt(e),n=rt(e,t);if(n!==null){var r=pe();Ue(n,e,t,r)}Uo(e,t)}};Qa=function(){return H};Ya=function(e,t){var n=H;try{return H=e,t()}finally{H=n}};ml=function(e,t,n){switch(t){case"input":if(ul(e,n),t=n.name,n.type==="radio"&&t!=null){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll("input[name="+JSON.stringify(""+t)+'][type="radio"]'),t=0;t<n.length;t++){var r=n[t];if(r!==e&&r.form===e.form){var i=yi(r);if(!i)throw Error(E(90));Ca(r),ul(r,i)}}}break;case"textarea":Fa(e,n);break;case"select":t=n.value,t!=null&&tn(e,!!n.multiple,t,!1)}};Ba=Lo;Oa=Dt;var Xf={usingClientEntryPoint:!1,Events:[or,Jt,yi,za,_a,Lo]},Mn={findFiberByHostInstance:Tt,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},Zf={bundleType:Mn.bundleType,version:Mn.version,rendererPackageName:Mn.rendererPackageName,rendererConfig:Mn.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:lt.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return e=Aa(e),e===null?null:e.stateNode},findFiberByHostInstance:Mn.findFiberByHostInstance||Yf,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.3.1-next-f1338f8080-20240426"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Rr=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Rr.isDisabled&&Rr.supportsFiber)try{di=Rr.inject(Zf),Qe=Rr}catch{}}Fe.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=Xf;Fe.createPortal=function(e,t){var n=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!$o(t))throw Error(E(200));return Qf(e,t,null,n)};Fe.createRoot=function(e,t){if(!$o(e))throw Error(E(299));var n=!1,r="",i=gc;return t!=null&&(t.unstable_strictMode===!0&&(n=!0),t.identifierPrefix!==void 0&&(r=t.identifierPrefix),t.onRecoverableError!==void 0&&(i=t.onRecoverableError)),t=Ho(e,1,!1,null,null,n,!1,r,i),e[nt]=t.current,Qn(e.nodeType===8?e.parentNode:e),new Wo(t)};Fe.findDOMNode=function(e){if(e==null)return null;if(e.nodeType===1)return e;var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(E(188)):(e=Object.keys(e).join(","),Error(E(268,e)));return e=Aa(t),e=e===null?null:e.stateNode,e};Fe.flushSync=function(e){return Dt(e)};Fe.hydrate=function(e,t,n){if(!ji(t))throw Error(E(200));return Mi(null,e,t,!0,n)};Fe.hydrateRoot=function(e,t,n){if(!$o(e))throw Error(E(405));var r=n!=null&&n.hydratedSources||null,i=!1,l="",o=gc;if(n!=null&&(n.unstable_strictMode===!0&&(i=!0),n.identifierPrefix!==void 0&&(l=n.identifierPrefix),n.onRecoverableError!==void 0&&(o=n.onRecoverableError)),t=mc(t,null,e,1,n??null,i,!1,l,o),e[nt]=t.current,Qn(e),r)for(e=0;e<r.length;e++)n=r[e],i=n._getVersion,i=i(n._source),t.mutableSourceEagerHydrationData==null?t.mutableSourceEagerHydrationData=[n,i]:t.mutableSourceEagerHydrationData.push(n,i);return new Ei(t)};Fe.render=function(e,t,n){if(!ji(t))throw Error(E(200));return Mi(null,e,t,!1,n)};Fe.unmountComponentAtNode=function(e){if(!ji(e))throw Error(E(40));return e._reactRootContainer?(Dt(function(){Mi(null,null,e,!1,function(){e._reactRootContainer=null,e[nt]=null})}),!0):!1};Fe.unstable_batchedUpdates=Lo;Fe.unstable_renderSubtreeIntoContainer=function(e,t,n,r){if(!ji(n))throw Error(E(200));if(e==null||e._reactInternals===void 0)throw Error(E(38));return Mi(e,t,n,!1,r)};Fe.version="18.3.1-next-f1338f8080-20240426";function vc(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(vc)}catch(e){console.error(e)}}vc(),va.exports=Fe;var qf=va.exports,na=qf;nl.createRoot=na.createRoot,nl.hydrateRoot=na.hydrateRoot;class ra{constructor(t,n,r=60){P(this,"cellSize");P(this,"cols");P(this,"rows");P(this,"grid");this.cellSize=r,this.cols=Math.ceil(t/r),this.rows=Math.ceil(n/r),this.grid=new Map}clear(){this.grid.clear()}getKey(t,n){return`${t},${n}`}insert(t){const n=Math.floor(t.x/this.cellSize),r=Math.floor(t.y/this.cellSize),i=this.getKey(n,r);this.grid.has(i)||this.grid.set(i,[]),this.grid.get(i).push(t)}getNearby(t,n,r){const i=Math.max(0,Math.floor((t-r)/this.cellSize)),l=Math.min(this.cols-1,Math.floor((t+r)/this.cellSize)),o=Math.max(0,Math.floor((n-r)/this.cellSize)),u=Math.min(this.rows-1,Math.floor((n+r)/this.cellSize)),d=[];for(let f=i;f<=l;f++)for(let g=o;g<=u;g++){const c=this.getKey(f,g),m=this.grid.get(c);m&&d.push(...m)}return d}}class en{constructor(t,n=12,r=8,i=0){P(this,"boundary");P(this,"capacity");P(this,"maxDepth");P(this,"depth");P(this,"points",[]);P(this,"divided",!1);P(this,"northwest",null);P(this,"northeast",null);P(this,"southwest",null);P(this,"southeast",null);this.boundary=t,this.capacity=n,this.maxDepth=r,this.depth=i}subdivide(){const{x:t,y:n,width:r,height:i}=this.boundary,l=r/2,o=i/2,u=this.depth+1;this.northwest=new en({x:t,y:n,width:l,height:o},this.capacity,this.maxDepth,u),this.northeast=new en({x:t+l,y:n,width:l,height:o},this.capacity,this.maxDepth,u),this.southwest=new en({x:t,y:n+o,width:l,height:o},this.capacity,this.maxDepth,u),this.southeast=new en({x:t+l,y:n+o,width:l,height:o},this.capacity,this.maxDepth,u),this.divided=!0}insert(t){if(!this.contains(this.boundary,t))return!1;if(this.points.length<this.capacity&&!this.divided)return this.points.push(t),!0;if(this.depth>=this.maxDepth)return this.points.push(t),!0;if(!this.divided){this.subdivide();for(const n of this.points)this.insertToChildren(n);this.points=[]}return this.insertToChildren(t)}insertToChildren(t){return this.northwest&&this.northwest.insert(t)||this.northeast&&this.northeast.insert(t)||this.southwest&&this.southwest.insert(t)||this.southeast&&this.southeast.insert(t)||!1}contains(t,n){return n.x>=t.x&&n.x<=t.x+t.width&&n.y>=t.y&&n.y<=t.y+t.height}queryRange(t,n=[]){var r,i,l,o;if(!this.intersectsCircle(this.boundary,t))return n;for(const u of this.points)(u.x-t.x)*(u.x-t.x)+(u.y-t.y)*(u.y-t.y)<=t.radius*t.radius&&n.push(u);return this.divided&&((r=this.northwest)==null||r.queryRange(t,n),(i=this.northeast)==null||i.queryRange(t,n),(l=this.southwest)==null||l.queryRange(t,n),(o=this.southeast)==null||o.queryRange(t,n)),n}intersectsCircle(t,n){const r=Math.max(t.x,Math.min(n.x,t.x+t.width)),i=Math.max(t.y,Math.min(n.y,t.y+t.height)),l=n.x-r,o=n.y-i;return l*l+o*o<=n.radius*n.radius}clear(){this.points=[],this.divided=!1,this.northwest=null,this.northeast=null,this.southwest=null,this.southeast=null}}class eh{constructor(t=60){P(this,"cellSize");P(this,"grid",new Map);this.cellSize=t}getKey(t,n){const r=Math.floor(t/this.cellSize),i=Math.floor(n/this.cellSize);return`${r},${i}`}clear(){this.grid.clear()}insert(t){const n=this.getKey(t.x,t.y);let r=this.grid.get(n);r||(r=[],this.grid.set(n,r)),r.push(t)}query(t,n,r){const i=[],l=Math.floor((t-r)/this.cellSize),o=Math.floor((t+r)/this.cellSize),u=Math.floor((n-r)/this.cellSize),d=Math.floor((n+r)/this.cellSize),f=r*r;for(let g=l;g<=o;g++)for(let c=u;c<=d;c++){const m=`${g},${c}`,x=this.grid.get(m);if(x)for(let w=0;w<x.length;w++){const S=x[w],C=S.x-t,h=S.y-n;C*C+h*h<=f&&i.push(S)}}return i}}class th{constructor(){P(this,"ctx",null);P(this,"isMuted",!0);P(this,"masterGain",null);P(this,"masterVolume",.3);P(this,"lastFeedTime",0);P(this,"feedCooldownMs",80);P(this,"activeOscCount",0);P(this,"maxConcurrentOsc",4)}initCtx(){if(!this.ctx&&typeof window<"u"){const t=window.AudioContext||window.webkitAudioContext;if(t)try{this.ctx=new t,this.masterGain=this.ctx.createGain(),this.masterGain.gain.setValueAtTime(this.masterVolume,this.ctx.currentTime),this.masterGain.connect(this.ctx.destination)}catch{this.ctx=null,this.masterGain=null}}}setVolume(t){this.masterVolume=Math.max(0,Math.min(1,t)),this.masterGain&&this.ctx&&this.masterGain.gain.setValueAtTime(this.masterVolume,this.ctx.currentTime)}getVolume(){return this.masterVolume}playFeedSound(t=440){if(this.isMuted)return;const n=performance.now();if(!(n-this.lastFeedTime<this.feedCooldownMs)&&(this.lastFeedTime=n,!(this.activeOscCount>=this.maxConcurrentOsc)&&(this.initCtx(),!(!this.ctx||!this.masterGain))))try{const r=Math.max(220,Math.min(880,t)),i=this.ctx.createOscillator(),l=this.ctx.createGain();i.type="sine",i.frequency.setValueAtTime(r,this.ctx.currentTime),l.gain.setValueAtTime(0,this.ctx.currentTime),l.gain.linearRampToValueAtTime(.06,this.ctx.currentTime+.01),l.gain.exponentialRampToValueAtTime(.001,this.ctx.currentTime+.12),i.connect(l),l.connect(this.masterGain),this.activeOscCount++,i.onended=()=>{this.activeOscCount=Math.max(0,this.activeOscCount-1);try{l.disconnect()}catch{}},i.start(),i.stop(this.ctx.currentTime+.12)}catch{}}playAmbientDrone(t=.5){}toggleMute(){return this.isMuted=!this.isMuted,this.isMuted&&this.masterGain&&this.ctx?this.masterGain.gain.setValueAtTime(0,this.ctx.currentTime):!this.isMuted&&this.masterGain&&this.ctx&&this.masterGain.gain.setValueAtTime(this.masterVolume,this.ctx.currentTime),this.isMuted}getMuted(){return this.isMuted}}const Nn=new th;function nh(e,t,n,r,i){let l=0,o=0,u=0,d=0;for(const C of n){const h=e.x-C.x,a=e.y-C.y,p=Math.hypot(h,a);if(p<C.radius+e.visionRadius){const v=(C.radius+e.visionRadius-p)/(C.radius+e.visionRadius);u+=h/(p||1)*v*4,d+=a/(p||1)*v*4}}if(Math.hypot(u,d)>.1)return l+=u,o+=d,{desiredHeading:Math.atan2(o,l),state:"EVADING_HAZARD"};let f=null,g=1/0;for(const C of t){const h=C.x-e.x,a=C.y-e.y,p=Math.hypot(h,a);p<=e.visionRadius&&p<g&&(g=p,f=C)}if(f){const C=f.x-e.x,h=f.y-e.y;return{desiredHeading:Math.atan2(h,C),state:"SEEKING_ENERGY"}}const c=60;let m=0,x=0;if(e.x<c?m=(c-e.x)/c:e.x>r-c&&(m=-(e.x-(r-c))/c),e.y<c?x=(c-e.y)/c:e.y>i-c&&(x=-(e.y-(i-c))/c),Math.hypot(m,x)>.1)return{desiredHeading:Math.atan2(x+Math.sin(e.heading)*.5,m+Math.cos(e.heading)*.5),state:"WANDERING"};const w=(Math.random()-.5)*.3;return{desiredHeading:e.heading+w,state:"WANDERING"}}class rh{constructor(t,n,r){P(this,"width");P(this,"height");P(this,"config");P(this,"microbots",[]);P(this,"energyParticles",[]);P(this,"hazards",[]);P(this,"speedFields",[]);P(this,"pheromones",[]);P(this,"meteors",[]);P(this,"voidRifts",[]);P(this,"selectedMicrobotId",null);P(this,"spatialGrid");P(this,"spatialHash");P(this,"totalBirths",0);P(this,"totalDeaths",0);P(this,"generationCount",1);P(this,"frameCount",0);P(this,"seasonFrameCount",0);P(this,"SEASON_DURATION_FRAMES",2700);P(this,"populationHistory",new Array(30).fill(45));P(this,"birthHistory",new Array(30).fill(0));P(this,"deathHistory",new Array(30).fill(0));P(this,"historyTimeline",[]);P(this,"recentBirths",0);P(this,"recentDeaths",0);P(this,"nextBotIdNum",1);P(this,"nextFoodIdNum",1);P(this,"nextFieldIdNum",1);this.width=t,this.height=n,this.config=r,this.spatialGrid=new ra(t,n,50),this.spatialHash=new eh(60),this.resetSimulation()}resetSimulation(){this.microbots=[],this.energyParticles=[],this.hazards=[],this.speedFields=[],this.pheromones=[],this.selectedMicrobotId=null,this.totalBirths=0,this.totalDeaths=0,this.generationCount=1,this.frameCount=0,this.seasonFrameCount=0,this.nextBotIdNum=1,this.nextFoodIdNum=1,this.nextFieldIdNum=1,this.recentBirths=0,this.recentDeaths=0,this.populationHistory=new Array(30).fill(this.config.startPopulation),this.birthHistory=new Array(30).fill(0),this.deathHistory=new Array(30).fill(0),this.historyTimeline=[];for(let t=0;t<this.config.startPopulation;t++)this.spawnMicrobot();this.spawnMultipleFood(80),this.updateHazardsCount(),this.microbots.length>0&&(this.selectedMicrobotId=this.microbots[0].id)}resize(t,n){this.width=Math.max(600,t),this.height=Math.max(400,n),this.spatialGrid=new ra(this.width,this.height,60)}spawnMicrobot(t){const n=`MB-${String(this.nextBotIdNum++).padStart(4,"0")}`;let r=Math.random()*(this.width-100)+50,i=Math.random()*(this.height-100)+50,l=2+(Math.random()-.5)*.5,o=.1+(Math.random()-.5)*.04,u=120+(Math.random()-.5)*30,d=100,f=1,g=185,c=1,m=null;if(t){r=t.x+(Math.random()-.5)*20,i=t.y+(Math.random()-.5)*20,c=t.generation+1,m=t.id,t.offspringCount++,c>this.generationCount&&(this.generationCount=c);const C=this.config.currentSeason==="AUTUMN"?1.5:1,h=this.config.mutationRate*C;l=Math.max(1,Math.min(5,t.speed+(Math.random()-.5)*h*1.5)),o=Math.max(.04,Math.min(.3,t.turnRate+(Math.random()-.5)*h*.1)),u=Math.max(60,Math.min(260,t.visionRadius+(Math.random()-.5)*h*50)),f=Math.max(.6,Math.min(2.5,t.energyEfficiency+(Math.random()-.5)*h*.4)),g=(t.hue+(Math.random()-.5)*h*80+360)%360}const x=l>3.4&&f>1.4,w=x?"#f43f5e":`hsl(${Math.round(g)}, 95%, 55%)`,S={id:n,x:r,y:i,vx:Math.cos(Math.random()*Math.PI*2)*l,vy:Math.sin(Math.random()*Math.PI*2)*l,heading:Math.random()*Math.PI*2,speed:l,maxSpeed:l,turnRate:o,visionRadius:u,battery:d,maxBattery:d,energyEfficiency:f,hue:g,color:w,generation:c,parentId:m,offspringCount:0,age:0,behaviorState:"WANDERING",energyCollected:0,isPredator:x,trail:[],batteryHistory:new Array(30).fill(d)};return this.microbots.push(S),this.totalBirths++,this.recentBirths++,S}spawnMultipleBots(t){for(let n=0;n<t;n++)this.spawnMicrobot()}spawnFoodParticle(t="NUTRIENT_DOT",n,r){const i=n??Math.random()*(this.width-60)+30,l=r??Math.random()*(this.height-60)+30,o=t==="SUPER_CHARGER"?50:t==="MUTAGEN_ORB"?30:25,u=t==="SUPER_CHARGER"?5:t==="MUTAGEN_ORB"?6:3.5,d=t==="SUPER_CHARGER"?"#00E5FF":t==="MUTAGEN_ORB"?"#E040FB":"#00E676";this.energyParticles.push({id:`F-${this.nextFoodIdNum++}`,x:i,y:l,value:o,radius:u,type:t,color:d})}spawnFood(t,n,r){const i=t??Math.random()*(this.width-80)+40,l=n??Math.random()*(this.height-80)+40;let o=r||"NUTRIENT_DOT";if(!r){const c=Math.random();c<.78?o="NUTRIENT_DOT":c<.9?o="SUPER_CHARGER":o="MUTAGEN_ORB"}let u=25,d=4,f="#00E676";o==="SUPER_CHARGER"?(u=50,d=6,f="#00E5FF"):o==="MUTAGEN_ORB"&&(u=30,d=5,f="#E040FB");const g={id:`EP-${this.nextFoodIdNum++}`,x:i,y:l,value:u,radius:d,type:o,color:f};this.energyParticles.push(g)}spawnMultipleFood(t){for(let n=0;n<t;n++)this.spawnFood()}spawnHazard(t,n){const r=`HZ-${this.hazards.length+1}`,i=60+Math.random()*40,l=t??Math.random()*(this.width-i*2)+i,o=n??Math.random()*(this.height-i*2)+i,u=Math.random()*Math.PI*2;this.hazards.push({id:r,x:l,y:o,radius:i,damageRate:.8,vx:Math.cos(u)*1.5,vy:Math.sin(u)*1.5})}spawnSpeedField(t,n){const r=`SF-${this.nextFieldIdNum++}`;this.speedFields.push({id:r,x:t,y:n,radius:50,multiplier:1.8})}triggerMeteorStrike(t,n){const r=t??Math.random()*(this.width-200)+100,i=n??Math.random()*(this.height-200)+100;this.meteors.push({id:`M-${Date.now()}`,x:r,y:i,radius:10,maxRadius:110,progress:0})}triggerVoidRift(t,n){const r=t??Math.random()*(this.width-200)+100,i=n??Math.random()*(this.height-200)+100;this.voidRifts.push({id:`VR-${Date.now()}`,x:r,y:i,radius:90,pullForce:2.8})}clearHazards(){this.hazards=[]}updateHazardsCount(){for(;this.hazards.length<this.config.hazardCount;)this.spawnHazard();this.hazards.length>this.config.hazardCount&&(this.hazards=this.hazards.slice(0,this.config.hazardCount))}overrideMicrobotGenes(t,n){const r=this.microbots.find(i=>i.id===t);r&&(n.speed!==void 0&&(r.speed=n.speed),n.visionRadius!==void 0&&(r.visionRadius=n.visionRadius),n.energyEfficiency!==void 0&&(r.energyEfficiency=n.energyEfficiency),n.turnRate!==void 0&&(r.turnRate=n.turnRate),n.hue!==void 0&&(r.hue=n.hue,r.color=`hsl(${Math.round(n.hue)}, 95%, 55%)`),r.isPredator=r.speed>3.4&&r.energyEfficiency>1.4,r.isPredator&&(r.color="#f43f5e"))}getLineageTree(t){const n=this.microbots.find(l=>l.id===t)||null;let r=null;n&&n.parentId&&(r=this.microbots.find(l=>l.id===n.parentId)||null);const i=n?this.microbots.filter(l=>l.parentId===n.id):[];return{parent:r,current:n,children:i}}selectRandomMicrobot(){if(this.microbots.length===0)return this.selectedMicrobotId=null,null;const t=Math.floor(Math.random()*this.microbots.length),n=this.microbots[t];return this.selectedMicrobotId=n.id,n}getSelectedMicrobot(){return this.selectedMicrobotId&&this.microbots.find(t=>t.id===this.selectedMicrobotId)||null}update(t=1){if(this.config.isPaused)return;this.frameCount++;const n=this.config.simSpeed*t;if(this.config.autoSeasonCycle&&(this.seasonFrameCount+=n,this.seasonFrameCount>=this.SEASON_DURATION_FRAMES)){this.seasonFrameCount=0;const c=["SPRING","SUMMER","AUTUMN","WINTER"],m=c.indexOf(this.config.currentSeason),x=c[(m+1)%c.length];this.config.currentSeason=x}let r=1,i=1,l=1;this.config.currentSeason==="SPRING"?r=1.5:this.config.currentSeason==="SUMMER"?l=1.15:this.config.currentSeason==="AUTUMN"?r=.75:this.config.currentSeason==="WINTER"&&(r=.4,i=1.4);let o=1;if(this.config.weatherEvent==="SOLAR_FLARE")o=2.5;else if(this.config.weatherEvent==="RESOURCE_BLOOM")this.frameCount%8===0&&this.energyParticles.length<this.config.maxEnergyParticles*1.5&&this.spawnFood();else if(this.config.weatherEvent==="TOXIC_DRIFT")for(const c of this.hazards){const m=c.vx||1.2,x=c.vy||1.2;c.x+=m*n,c.y+=x*n,(c.x<c.radius||c.x>this.width-c.radius)&&(c.vx=-m),(c.y<c.radius||c.y>this.height-c.radius)&&(c.vy=-x)}if(this.frameCount%5===0&&this.pheromones.length>0)for(let c=this.pheromones.length-1;c>=0;c--)this.pheromones[c].intensity-=.04,this.pheromones[c].intensity<=0&&this.pheromones.splice(c,1);this.spatialGrid.clear();const u=new en({x:0,y:0,width:this.width,height:this.height},8);for(const c of this.energyParticles)this.spatialGrid.insert(c),u.insert(c);const d=this.config.energySpawnRate*r;this.frameCount%Math.max(1,Math.floor(20/d))===0&&this.energyParticles.length<this.config.maxEnergyParticles&&this.spawnFood();const f=new Set,g=new Set;for(const c of this.microbots){c.age+=n,!c.isPredator&&c.speed>3.4&&c.energyEfficiency>1.4&&(c.isPredator=!0,c.color="#f43f5e");let m=c.speed*l;for(const a of this.speedFields)Math.hypot(c.x-a.x,c.y-a.y)<a.radius&&(m*=a.multiplier);this.frameCount%15===0&&(c.trail.push({x:c.x,y:c.y}),c.trail.length>12&&c.trail.shift(),this.config.showPheromoneTrails&&this.pheromones.length<220&&this.pheromones.push({x:c.x,y:c.y,intensity:1,color:c.color}));const x=this.spatialGrid.getNearby(c.x,c.y,c.visionRadius),w=nh(c,x,this.hazards,this.width,this.height);if(c.behaviorState=w.state,c.isPredator){let a=null,p=c.visionRadius;for(const v of this.microbots)if(v.id!==c.id&&!v.isPredator){const y=Math.hypot(c.x-v.x,c.y-v.y);y<p&&(p=y,a=v)}if(a){c.behaviorState="HUNTING_PREY";const v=Math.atan2(a.y-c.y,a.x-c.x);w.desiredHeading=v,p<16&&(c.battery=Math.min(c.maxBattery,c.battery+35),c.energyCollected+=35,a.battery-=35)}}let S=w.desiredHeading-c.heading;for(;S<-Math.PI;)S+=Math.PI*2;for(;S>Math.PI;)S-=Math.PI*2;c.heading+=S*c.turnRate*n,c.vx=Math.cos(c.heading)*m,c.vy=Math.sin(c.heading)*m,c.x+=c.vx*n,c.y+=c.vy*n,c.x=Math.max(15,Math.min(this.width-15,c.x)),c.y=Math.max(15,Math.min(this.height-15,c.y)),c.temperature=22+(this.config.weatherEvent==="SOLAR_FLARE"?18:0),this.config.weatherEvent==="TOXIC_DRIFT"&&(c.radiationExposure=(c.radiationExposure||0)+.1*n),c.battery<30&&(c.epigeneticStress=(c.epigeneticStress||0)+.05*n),(c.epigeneticStress||0)>10&&(c.speed=Math.min(5,c.speed*1.15),c.visionRadius=Math.min(260,c.visionRadius*1.2),c.epigeneticStress=0);const h=.08*(Math.pow(c.speed,1.3)*(c.mass||1)/(c.energyEfficiency||1))*this.config.batteryDrainMultiplier*o*i*n;if(c.battery-=h,this.frameCount%10===0&&(c.batteryHistory||(c.batteryHistory=[]),c.batteryHistory.push(Math.max(0,c.battery)),c.batteryHistory.length>30&&c.batteryHistory.shift()),c.isParasite){for(const a of this.microbots)if(a.id!==c.id&&!a.isParasite&&Math.hypot(a.x-c.x,a.y-c.y)<18){const v=.5*n;a.battery=Math.max(0,a.battery-v),c.battery=Math.min(c.maxBattery,c.battery+v)}}for(const a of this.microbots)if(a.id!==c.id&&!c.isPredator&&!a.isPredator&&Math.hypot(a.x-c.x,a.y-c.y)<25&&Math.abs(c.hue-a.hue)<20){c.symbiontPartnerId=a.id;const v=(c.battery+a.battery)/2;c.battery=v,a.battery=v}for(const a of this.microbots)if(a.id!==c.id){const p=a.x-c.x,v=a.y-c.y,y=p*p+v*v;if(y<100&&y>0){const j=Math.sqrt(y),k=p/j,M=v/j;c.x-=k*1.5,c.y-=M*1.5,a.x+=k*1.5,a.y+=M*1.5;const z=c.vx-a.vx,I=c.vy-a.vy,W=2*(k*z+M*I)/2;c.vx-=W*k,c.vy-=W*M,a.vx+=W*k,a.vy+=W*M}}if(c.isInfected)if(c.infectionTimer=(c.infectionTimer||0)+n,c.battery-=.1*n,c.behaviorState="INFECTED",c.infectionTimer>=300)c.isInfected=!1,c.hasAntibodies=!0;else for(const a of this.microbots)a.id!==c.id&&!a.isInfected&&!a.hasAntibodies&&Math.hypot(c.x-a.x,c.y-a.y)<20&&Math.random()<.35&&(a.isInfected=!0,a.infectionTimer=0);if(c.battery<=0){g.add(c.id),this.totalDeaths++,this.recentDeaths++;continue}for(const a of x){if(f.has(a.id))continue;const p=Math.hypot(c.x-a.x,c.y-a.y);p<12&&(p<10+a.radius&&(c.battery=Math.min(c.maxBattery,c.battery+a.value*c.energyEfficiency),c.energyCollected+=a.value,Nn.playFeedSound(440+c.hue%300)),a.type==="MUTAGEN_ORB"&&(c.speed=Math.max(1,Math.min(5,c.speed+(Math.random()-.5)*1.2)),c.visionRadius=Math.max(60,Math.min(260,c.visionRadius+(Math.random()-.5)*40)),c.energyEfficiency=Math.max(.6,Math.min(2.5,c.energyEfficiency+(Math.random()-.5)*.5))),c.battery>=c.maxBattery*.95&&this.microbots.length<this.config.maxPopulation&&(c.battery-=45,c.behaviorState="REPRODUCING",this.spawnMicrobot(c)))}}for(f.size>0&&(this.energyParticles=this.energyParticles.filter(c=>!f.has(c.id))),g.size>0&&(this.microbots=this.microbots.filter(c=>!g.has(c.id)));this.microbots.length<12;)this.spawnMicrobot();this.frameCount%30===0&&this.updateTelemetryBuffers(),this.frameCount%60===0&&this.recordHistorySnapshot()}updateTelemetryBuffers(){this.populationHistory.push(this.microbots.length),this.populationHistory.length>30&&this.populationHistory.shift(),this.birthHistory.push(this.recentBirths),this.birthHistory.length>30&&this.birthHistory.shift(),this.deathHistory.push(this.recentDeaths),this.deathHistory.length>30&&this.deathHistory.shift(),this.recentBirths=0,this.recentDeaths=0}recordHistorySnapshot(){const t=this.getStats();this.historyTimeline.push({time:Math.floor(this.frameCount/60),population:t.currentPopulation,avgSpeed:t.avgSpeed,avgVision:t.avgVision}),this.historyTimeline.length>60&&this.historyTimeline.shift()}triggerOutbreak(){if(this.microbots.length===0)return;const t=Math.floor(Math.random()*this.microbots.length);this.microbots[t].isInfected=!0,this.microbots[t].infectionTimer=0}getStats(){const t=this.microbots.length;let n=0,r=0,i=0,l=0,o=0;const u=new Array(10).fill(0),d=new Array(10).fill(0),f=new Array(10).fill(0),g=new Array(12).fill(0);for(const x of this.microbots){n+=x.speed,r+=x.visionRadius,i+=x.energyEfficiency,x.isPredator&&l++,x.isInfected&&o++;const w=Math.max(0,Math.min(9,Math.floor((x.speed-1)/4*10)));u[w]++;const S=Math.max(0,Math.min(9,Math.floor((x.visionRadius-60)/200*10)));d[S]++;const C=Math.max(0,Math.min(9,Math.floor((x.energyEfficiency-.6)/1.9*10)));f[C]++;const h=Math.max(0,Math.min(11,Math.floor(x.hue/360*12)));g[h]++}let c=0;if(t>0){for(const x of g)if(x>0){const w=x/t;c-=w*Math.log(w)}}const m=Math.min(100,Math.floor(this.seasonFrameCount/this.SEASON_DURATION_FRAMES*100));return{currentPopulation:t,generationCount:this.generationCount,energyParticleCount:this.energyParticles.length,avgSpeed:t>0?n/t:0,avgVision:t>0?r/t:0,avgEfficiency:t>0?i/t:0,totalBirths:this.totalBirths,totalDeaths:this.totalDeaths,predatorCount:l,infectedCount:o,shannonDiversityIndex:parseFloat(c.toFixed(2)),currentSeason:this.config.currentSeason,seasonProgressPct:m,populationHistory:[...this.populationHistory],birthHistory:[...this.birthHistory],deathHistory:[...this.deathHistory],speedHistogram:u,visionHistogram:d,efficiencyHistogram:f,diversityBuckets:g,historyTimeline:this.historyTimeline}}}const xc="microbot_evolution_lab_config",ia={startPopulation:45,maxPopulation:250,mutationRate:.15,energySpawnRate:4,maxEnergyParticles:120,hazardCount:3,batteryDrainMultiplier:1,simSpeed:1,targetFPS:60,isPaused:!1,showSensoryRings:!0,showMovementTrails:!0,showTargetVectors:!0,showEnergyForceLines:!0,showSensoryRaycasts:!0,showPheromoneTrails:!0,isSplitView:!1,weatherEvent:"CLEAR",brushMode:"NONE",heatmapMode:"OFF",currentSeason:"SPRING",autoSeasonCycle:!0};function ih(){try{const e=localStorage.getItem(xc);if(e)return{...ia,...JSON.parse(e),isPaused:!1}}catch(e){console.error("Failed to load config from storage:",e)}return{...ia}}function lh(e){try{localStorage.setItem(xc,JSON.stringify(e))}catch(t){console.error("Failed to save config to storage:",t)}}/**
* @license lucide-react v0.344.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/var oh={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.344.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const sh=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase().trim(),A=(e,t)=>{const n=B.forwardRef(({color:r="currentColor",size:i=24,strokeWidth:l=2,absoluteStrokeWidth:o,className:u="",children:d,...f},g)=>B.createElement("svg",{ref:g,...oh,width:i,height:i,stroke:r,strokeWidth:o?Number(l)*24/Number(i):l,className:["lucide",`lucide-${sh(e)}`,u].join(" "),...f},[...t.map(([c,m])=>B.createElement(c,m)),...Array.isArray(d)?d:[d]]));return n.displayName=`${e}`,n};/**
* @license lucide-react v0.344.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const ah=A("Activity",[["path",{d:"M22 12h-4l-3 9L9 3l-3 9H2",key:"d5dnw9"}]]);/**
* @license lucide-react v0.344.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const Sc=A("AlertCircle",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]]);/**
* @license lucide-react v0.344.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const uh=A("AlertTriangle",[["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-3Z",key:"c3ski4"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]]);/**
* @license lucide-react v0.344.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const ch=A("ArrowRight",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]]);/**
* @license lucide-react v0.344.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const dh=A("Award",[["circle",{cx:"12",cy:"8",r:"6",key:"1vp47v"}],["path",{d:"M15.477 12.89 17 22l-5-3-5 3 1.523-9.11",key:"em7aur"}]]);/**
* @license lucide-react v0.344.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const fh=A("BatteryCharging",[["path",{d:"M15 7h1a2 2 0 0 1 2 2v6a2 2 0 0 1-2 2h-2",key:"1sdynx"}],["path",{d:"M6 7H4a2 2 0 0 0-2 2v6a2 2 0 0 0 2 2h1",key:"1gkd3k"}],["path",{d:"m11 7-3 5h4l-3 5",key:"b4a64w"}],["line",{x1:"22",x2:"22",y1:"11",y2:"13",key:"4dh1rd"}]]);/**
* @license lucide-react v0.344.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const qi=A("ChevronDown",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);/**
* @license lucide-react v0.344.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const el=A("ChevronUp",[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]]);/**
* @license lucide-react v0.344.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const hh=A("Cpu",[["rect",{x:"4",y:"4",width:"16",height:"16",rx:"2",key:"1vbyd7"}],["rect",{x:"9",y:"9",width:"6",height:"6",key:"o3kz5p"}],["path",{d:"M15 2v2",key:"13l42r"}],["path",{d:"M15 20v2",key:"15mkzm"}],["path",{d:"M2 15h2",key:"1gxd5l"}],["path",{d:"M2 9h2",key:"1bbxkp"}],["path",{d:"M20 15h2",key:"19e6y8"}],["path",{d:"M20 9h2",key:"19tzq7"}],["path",{d:"M9 2v2",key:"165o2o"}],["path",{d:"M9 20v2",key:"i2bqo8"}]]);/**
* @license lucide-react v0.344.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const ph=A("Crosshair",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"22",x2:"18",y1:"12",y2:"12",key:"l9bcsi"}],["line",{x1:"6",x2:"2",y1:"12",y2:"12",key:"13hhkx"}],["line",{x1:"12",x2:"12",y1:"6",y2:"2",key:"10w3f3"}],["line",{x1:"12",x2:"12",y1:"22",y2:"18",key:"15g9kq"}]]);/**
* @license lucide-react v0.344.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const ar=A("Dna",[["path",{d:"M2 15c6.667-6 13.333 0 20-6",key:"1pyr53"}],["path",{d:"M9 22c1.798-1.998 2.518-3.995 2.807-5.993",key:"q3hbxp"}],["path",{d:"M15 2c-1.798 1.998-2.518 3.995-2.807 5.993",key:"80uv8i"}],["path",{d:"m17 6-2.5-2.5",key:"5cdfhj"}],["path",{d:"m14 8-1-1",key:"15nbz5"}],["path",{d:"m7 18 2.5 2.5",key:"16tu1a"}],["path",{d:"m3.5 14.5.5.5",key:"hapbhd"}],["path",{d:"m20 9 .5.5",key:"1n7z02"}],["path",{d:"m6.5 12.5 1 1",key:"cs35ky"}],["path",{d:"m16.5 10.5 1 1",key:"696xn5"}],["path",{d:"m10 16 1.5 1.5",key:"11lckj"}]]);/**
* @license lucide-react v0.344.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const la=A("Download",[["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["polyline",{points:"7 10 12 15 17 10",key:"2ggqvy"}],["line",{x1:"12",x2:"12",y1:"15",y2:"3",key:"1vk2je"}]]);/**
* @license lucide-react v0.344.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const yh=A("Eye",[["path",{d:"M2 12s3-7 10-7 10 7 10 7-3 7-10 7-10-7-10-7Z",key:"rwhkz3"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]);/**
* @license lucide-react v0.344.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const wc=A("Gauge",[["path",{d:"m12 14 4-4",key:"9kzdfg"}],["path",{d:"M3.34 19a10 10 0 1 1 17.32 0",key:"19p75a"}]]);/**
* @license lucide-react v0.344.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const kc=A("GitBranch",[["line",{x1:"6",x2:"6",y1:"3",y2:"15",key:"17qcm7"}],["circle",{cx:"18",cy:"6",r:"3",key:"1h7g24"}],["circle",{cx:"6",cy:"18",r:"3",key:"fqmcym"}],["path",{d:"M18 9a9 9 0 0 1-9 9",key:"n2h4wq"}]]);/**
* @license lucide-react v0.344.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const mh=A("HelpCircle",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3",key:"1u773s"}],["path",{d:"M12 17h.01",key:"p32p05"}]]);/**
* @license lucide-react v0.344.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const gh=A("Layers",[["path",{d:"m12.83 2.18a2 2 0 0 0-1.66 0L2.6 6.08a1 1 0 0 0 0 1.83l8.58 3.91a2 2 0 0 0 1.66 0l8.58-3.9a1 1 0 0 0 0-1.83Z",key:"8b97xw"}],["path",{d:"m22 17.65-9.17 4.16a2 2 0 0 1-1.66 0L2 17.65",key:"dd6zsq"}],["path",{d:"m22 12.65-9.17 4.16a2 2 0 0 1-1.66 0L2 12.65",key:"ep9fru"}]]);/**
* @license lucide-react v0.344.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const vh=A("MousePointerClick",[["path",{d:"m9 9 5 12 1.8-5.2L21 14Z",key:"1b76lo"}],["path",{d:"M7.2 2.2 8 5.1",key:"1cfko1"}],["path",{d:"m5.1 8-2.9-.8",key:"1go3kf"}],["path",{d:"M14 4.1 12 6",key:"ita8i4"}],["path",{d:"m6 12-1.9 2",key:"mnht97"}]]);/**
* @license lucide-react v0.344.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const xh=A("Pause",[["rect",{width:"4",height:"16",x:"6",y:"4",key:"iffhe4"}],["rect",{width:"4",height:"16",x:"14",y:"4",key:"sjin7j"}]]);/**
* @license lucide-react v0.344.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const Sh=A("Play",[["polygon",{points:"5 3 19 12 5 21 5 3",key:"191637"}]]);/**
* @license lucide-react v0.344.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const Yl=A("Plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]);/**
* @license lucide-react v0.344.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const wh=A("RotateCcw",[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}]]);/**
* @license lucide-react v0.344.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const kh=A("Search",[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]]);/**
* @license lucide-react v0.344.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const Vo=A("ShieldAlert",[["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"}]]);/**
* @license lucide-react v0.344.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const Eh=A("Sliders",[["line",{x1:"4",x2:"4",y1:"21",y2:"14",key:"1p332r"}],["line",{x1:"4",x2:"4",y1:"10",y2:"3",key:"gb41h5"}],["line",{x1:"12",x2:"12",y1:"21",y2:"12",key:"hf2csr"}],["line",{x1:"12",x2:"12",y1:"8",y2:"3",key:"1kfi7u"}],["line",{x1:"20",x2:"20",y1:"21",y2:"16",key:"1lhrwl"}],["line",{x1:"20",x2:"20",y1:"12",y2:"3",key:"16vvfq"}],["line",{x1:"2",x2:"6",y1:"14",y2:"14",key:"1uebub"}],["line",{x1:"10",x2:"14",y1:"8",y2:"8",key:"1yglbp"}],["line",{x1:"18",x2:"22",y1:"16",y2:"16",key:"1jxqpz"}]]);/**
* @license lucide-react v0.344.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const Ec=A("Sparkles",[["path",{d:"m12 3-1.912 5.813a2 2 0 0 1-1.275 1.275L3 12l5.813 1.912a2 2 0 0 1 1.275 1.275L12 21l1.912-5.813a2 2 0 0 1 1.275-1.275L21 12l-5.813-1.912a2 2 0 0 1-1.275-1.275L12 3Z",key:"17u4zn"}],["path",{d:"M5 3v4",key:"bklmnn"}],["path",{d:"M19 17v4",key:"iiml17"}],["path",{d:"M3 5h4",key:"nem4j1"}],["path",{d:"M17 19h4",key:"lbex7p"}]]);/**
* @license lucide-react v0.344.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const jh=A("Sun",[["circle",{cx:"12",cy:"12",r:"4",key:"4exip2"}],["path",{d:"M12 2v2",key:"tus03m"}],["path",{d:"M12 20v2",key:"1lh1kg"}],["path",{d:"m4.93 4.93 1.41 1.41",key:"149t6j"}],["path",{d:"m17.66 17.66 1.41 1.41",key:"ptbguv"}],["path",{d:"M2 12h2",key:"1t8f8n"}],["path",{d:"M20 12h2",key:"1q8mjw"}],["path",{d:"m6.34 17.66-1.41 1.41",key:"1m8zz5"}],["path",{d:"m19.07 4.93-1.41 1.41",key:"1shlcs"}]]);/**
* @license lucide-react v0.344.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const Go=A("Target",[["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"}]]);/**
* @license lucide-react v0.344.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const Mh=A("Upload",[["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["polyline",{points:"17 8 12 3 7 8",key:"t8dd8p"}],["line",{x1:"12",x2:"12",y1:"3",y2:"15",key:"widbto"}]]);/**
* @license lucide-react v0.344.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const Ch=A("Users",[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}],["path",{d:"M22 21v-2a4 4 0 0 0-3-3.87",key:"kshegd"}],["path",{d:"M16 3.13a4 4 0 0 1 0 7.75",key:"1da9ce"}]]);/**
* @license lucide-react v0.344.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const Rh=A("Wind",[["path",{d:"M17.7 7.7a2.5 2.5 0 1 1 1.8 4.3H2",key:"1k4u03"}],["path",{d:"M9.6 4.6A2 2 0 1 1 11 8H2",key:"b7d0fd"}],["path",{d:"M12.6 19.4A2 2 0 1 0 14 16H2",key:"1p5cb3"}]]);/**
* @license lucide-react v0.344.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const ur=A("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]);/**
* @license lucide-react v0.344.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const Jo=A("Zap",[["polygon",{points:"13 2 3 14 12 14 11 22 21 10 12 10 13 2",key:"45s27k"}]]),Fh=ma.memo(({buckets:e,shannonIndex:t=1.8})=>{const n=B.useMemo(()=>Math.max(1,...e),[e]),r=t<.8;return s.jsxs("div",{style:{background:"rgba(15, 26, 36, 0.85)",border:r?"1px solid #f43f5e":"1px solid rgba(0, 229, 255, 0.3)",borderRadius:12,padding:"8px 12px",backdropFilter:"blur(12px)",boxShadow:r?"0 0 15px rgba(244, 63, 94, 0.4)":"0 6px 20px rgba(0,0,0,0.4)",width:175},children:[s.jsxs("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",marginBottom:4},children:[s.jsxs("span",{style:{fontFamily:"'JetBrains Mono', monospace",fontSize:"0.62rem",fontWeight:800,color:r?"#f43f5e":"#ffffff",letterSpacing:"0.05em",display:"flex",alignItems:"center",gap:4},children:[r&&s.jsx(Sc,{style:{width:10,height:10,color:"#f43f5e"}}),"GENETIC DIVERSITY"]}),s.jsxs("span",{style:{fontSize:"0.62rem",fontFamily:"'JetBrains Mono', monospace",color:r?"#f43f5e":"#00E5FF",fontWeight:800},children:["H: ",t.toFixed(2)]})]}),s.jsx("div",{style:{display:"flex",alignItems:"flex-end",gap:3,height:24,paddingTop:2},children:e.map((i,l)=>{const o=i/n*100,u=Math.round(l/e.length*360);return s.jsx("div",{title:`Group ${l+1}: ${i} bots`,style:{flex:1,height:`${Math.max(15,o)}%`,backgroundColor:`hsl(${u}, 90%, 60%)`,borderRadius:"2px 2px 0 0",transition:"height 0.2s ease",boxShadow:`0 0 4px hsl(${u}, 90%, 60%)`}},l)})})]})}),Th=({config:e,stats:t,onUpdateConfig:n,onReset:r,onStep:i,onOpenRosterMenu:l,onOpenGuide:o,onOpenBlueprintStudio:u,onSpawnFood:d,onSpawnBots:f,onSpawnHazard:g,onTriggerMeteor:c,onTriggerVoidRift:m,onTriggerOutbreak:x,onExportTelemetryCSV:w,onExportConfigJSON:S,onImportConfigJSON:C})=>{const h=B.useRef(null),a=v=>{var k;const y=(k=v.target.files)==null?void 0:k[0];if(!y)return;const j=new FileReader;j.onload=M=>{var z;try{const I=JSON.parse((z=M.target)==null?void 0:z.result);C(I)}catch{alert("Invalid JSON preset file!")}},j.readAsText(y)},p={SPRING:"🌸 Spring",SUMMER:"☀️ Summer",AUTUMN:"🍂 Autumn",WINTER:"❄️ Winter"};return s.jsxs("header",{className:"top-nav-bar",children:[s.jsxs("div",{className:"brand-badge",children:[s.jsx("div",{className:"brand-icon-box",children:s.jsx(hh,{style:{width:22,height:22}})}),s.jsxs("div",{children:[s.jsxs("h1",{className:"brand-title",children:["MICROBOT ",s.jsx("span",{children:"EVOLUTION LAB"})]}),s.jsx("p",{className:"brand-sub",children:"2D Autonomous Artificial Life & Genetic Evolution Engine"})]})]}),s.jsxs("div",{className:"glass-deck-pill",children:[s.jsx("button",{onClick:()=>n({isPaused:!e.isPaused}),className:e.isPaused?"btn-holo btn-holo-green":"btn-holo btn-holo-orange",children:e.isPaused?s.jsxs(s.Fragment,{children:[s.jsx(Sh,{style:{width:13,height:13,fill:"currentColor"}}),s.jsx("span",{children:"RESUME"})]}):s.jsxs(s.Fragment,{children:[s.jsx(xh,{style:{width:13,height:13,fill:"currentColor"}}),s.jsx("span",{children:"PAUSE"})]})}),s.jsx("button",{onClick:i,disabled:!e.isPaused,className:"btn-holo btn-holo-dark",style:{opacity:e.isPaused?1:.4},children:"STEP"}),s.jsxs("button",{onClick:r,className:"btn-holo btn-holo-dark",children:[s.jsx(wh,{style:{width:12,height:12}}),s.jsx("span",{children:"RESET"})]}),s.jsxs("div",{style:{display:"flex",alignItems:"center",gap:8,marginLeft:6,fontSize:"0.68rem",fontFamily:"'JetBrains Mono', monospace",color:"#00E5FF"},children:[s.jsx("span",{style:{fontWeight:800,color:"#ffffff"},children:"SPEED:"}),s.jsx("input",{type:"range",min:"0.01",max:"5.0",step:"0.05",value:e.simSpeed,onChange:v=>n({simSpeed:parseFloat(v.target.value)}),style:{width:70,height:4}}),s.jsxs("span",{style:{fontWeight:800,width:32},children:[e.simSpeed.toFixed(2),"x"]})]}),s.jsx("div",{style:{display:"flex",alignItems:"center",gap:4,marginLeft:4},children:s.jsxs("select",{value:e.targetFPS||60,onChange:v=>n({targetFPS:parseInt(v.target.value,10)}),style:{background:"#080E14",color:"#00E5FF",fontWeight:800,border:"1px solid rgba(0, 229, 255, 0.4)",borderRadius:6,padding:"2px 4px",fontSize:"0.65rem",cursor:"pointer"},children:[s.jsx("option",{value:"30",children:"30 FPS"}),s.jsx("option",{value:"60",children:"60 FPS"}),s.jsx("option",{value:"120",children:"120 FPS"}),s.jsx("option",{value:"240",children:"MAX FPS"})]})})]}),s.jsxs("div",{className:"glass-deck-pill",children:[s.jsxs("div",{style:{display:"flex",alignItems:"center",gap:6,fontSize:"0.68rem",fontFamily:"'JetBrains Mono', monospace",color:"#00E676"},children:[s.jsx(Rh,{style:{width:12,height:12}}),s.jsxs("select",{value:e.currentSeason||"SPRING",onChange:v=>n({currentSeason:v.target.value}),style:{background:"#080E14",color:"#00E676",fontWeight:800,border:"1px solid rgba(0, 230, 118, 0.4)",borderRadius:6,padding:"3px 6px",fontSize:"0.68rem",cursor:"pointer"},children:[s.jsx("option",{value:"SPRING",children:p.SPRING}),s.jsx("option",{value:"SUMMER",children:p.SUMMER}),s.jsx("option",{value:"AUTUMN",children:p.AUTUMN}),s.jsx("option",{value:"WINTER",children:p.WINTER})]}),s.jsxs("span",{style:{color:"#8B949E",fontSize:"0.62rem"},children:["(",t.seasonProgressPct||0,"%)"]})]}),s.jsxs("button",{onClick:()=>n({showPheromoneTrails:!e.showPheromoneTrails}),className:e.showPheromoneTrails?"btn-holo btn-holo-magenta":"btn-holo btn-holo-dark",style:{fontSize:"0.68rem",padding:"4px 8px"},children:[s.jsx(Ec,{style:{width:12,height:12}}),s.jsx("span",{children:"PHEROMONES"})]}),s.jsxs("div",{style:{display:"flex",alignItems:"center",gap:4},children:[s.jsx("button",{onClick:()=>Nn.toggleMute(),className:Nn.getMuted()?"btn-holo btn-holo-dark":"btn-holo btn-holo-cyan",style:{fontSize:"0.68rem",padding:"4px 8px"},title:"Toggle Procedural Spatial Audio",children:s.jsx("span",{children:Nn.getMuted()?"🔇 MUTED":"🔊 AUDIO"})}),s.jsx("input",{type:"range",min:"0",max:"1",step:"0.05",defaultValue:.3,onChange:v=>Nn.setVolume(parseFloat(v.target.value)),style:{width:50,height:3,accentColor:"#00E5FF"},title:"Master Volume"})]}),s.jsxs("div",{style:{display:"flex",alignItems:"center",gap:4,fontSize:"0.68rem",fontFamily:"'JetBrains Mono', monospace",color:"#FF6B00"},children:[s.jsx(jh,{style:{width:12,height:12}}),s.jsxs("select",{value:e.weatherEvent||"CLEAR",onChange:v=>n({weatherEvent:v.target.value}),style:{background:"#080E14",color:"#FF6B00",fontWeight:800,border:"1px solid rgba(255, 107, 0, 0.4)",borderRadius:6,padding:"3px 6px",fontSize:"0.68rem",cursor:"pointer"},children:[s.jsx("option",{value:"CLEAR",children:"☀️ Weather: Clear"}),s.jsx("option",{value:"SOLAR_FLARE",children:"🔥 Solar Flare (+Drain)"}),s.jsx("option",{value:"TOXIC_DRIFT",children:"☣️ Toxic Drift (Hazards)"}),s.jsx("option",{value:"RESOURCE_BLOOM",children:"🌸 Resource Bloom (Food)"})]})]})]}),s.jsxs("div",{className:"glass-deck-pill",children:[s.jsx("button",{onClick:S,className:"btn-holo btn-holo-cyan",title:"Save preset .json",children:s.jsx(la,{style:{width:12,height:12}})}),s.jsx("button",{onClick:()=>{var v;return(v=h.current)==null?void 0:v.click()},className:"btn-holo btn-holo-cyan",title:"Load preset .json",children:s.jsx(Mh,{style:{width:12,height:12}})}),s.jsx("input",{ref:h,type:"file",accept:".json",onChange:a,style:{display:"none"}}),s.jsxs("button",{onClick:w,className:"btn-holo btn-holo-green",title:"Export CSV Data",children:[s.jsx(la,{style:{width:12,height:12}}),s.jsx("span",{children:"CSV"})]}),s.jsxs("button",{onClick:u,className:"btn-holo btn-holo-cyan",children:[s.jsx(ar,{style:{width:13,height:13}}),s.jsx("span",{children:"BLUEPRINT STUDIO"})]}),s.jsx("button",{onClick:o,className:"btn-holo btn-holo-cyan",children:s.jsx(mh,{style:{width:13,height:13}})}),s.jsxs("button",{onClick:l,className:"btn-holo btn-holo-magenta",children:[s.jsx(Go,{style:{width:13,height:13}}),s.jsx("span",{children:"ROSTER"})]}),s.jsxs("button",{onClick:d,className:"btn-holo btn-holo-green",children:[s.jsx(Yl,{style:{width:13,height:13}}),s.jsx("span",{children:"+20 FOOD"})]}),s.jsxs("button",{onClick:f,className:"btn-holo btn-holo-cyan",children:[s.jsx(Yl,{style:{width:13,height:13}}),s.jsx("span",{children:"+10 BOTS"})]}),s.jsxs("button",{onClick:g,className:"btn-holo btn-holo-orange",children:[s.jsx(Vo,{style:{width:13,height:13}}),s.jsx("span",{children:"+HAZARD"})]}),s.jsx("button",{onClick:c,className:"btn-holo btn-holo-orange",title:"Invoke Meteor Strike",children:s.jsx("span",{children:"☄️ METEOR"})}),s.jsx("button",{onClick:m,className:"btn-holo btn-holo-magenta",title:"Invoke Gravitational Void Rift",children:s.jsx("span",{children:"🌌 RIFT"})}),s.jsx("button",{onClick:x,className:"btn-holo btn-holo-green",title:"Inject Viral Outbreak",children:s.jsx("span",{children:"☣️ VIRUS"})})]}),s.jsx(Fh,{buckets:t.diversityBuckets||new Array(12).fill(1),shannonIndex:t.shannonDiversityIndex})]})},Nh=({config:e,onUpdateConfig:t})=>{const[n,r]=B.useState("all");return s.jsxs("div",{className:"glass-panel",style:{padding:"12px 14px"},children:[s.jsxs("div",{style:{fontFamily:"'JetBrains Mono', monospace",fontSize:"0.85rem",fontWeight:800,color:"#ffffff",letterSpacing:"0.05em",marginBottom:10,display:"flex",alignItems:"center",gap:6},children:[s.jsx("span",{style:{color:"#00E5FF"},children:"●"})," PARAMETERS & CONTROLS",s.jsx("span",{style:{fontSize:"0.62rem",color:"#00E676",marginLeft:"auto"},children:"⚡ WORKER ON"})]}),s.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:8},children:[s.jsxs("div",{style:{background:"rgba(8, 14, 20, 0.6)",borderRadius:10,border:"1px solid rgba(0, 229, 255, 0.2)",padding:"8px 10px"},children:[s.jsxs("div",{onClick:()=>r(n==="pop"?"all":"pop"),style:{display:"flex",alignItems:"center",justifyContent:"space-between",cursor:"pointer",marginBottom:6},children:[s.jsxs("span",{style:{fontFamily:"'JetBrains Mono', monospace",fontSize:"0.72rem",fontWeight:800,color:"#00E5FF",display:"flex",alignItems:"center",gap:6},children:[s.jsx(Ch,{style:{width:13,height:13}})," Population Dynamics"]}),n==="pop"||n==="all"?s.jsx(el,{style:{width:14,height:14,color:"#8B949E"}}):s.jsx(qi,{style:{width:14,height:14,color:"#8B949E"}})]}),(n==="pop"||n==="all")&&s.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:8,overflow:"hidden",transition:"max-height 0.3s ease, opacity 0.3s ease",maxHeight:600,opacity:1},children:[s.jsxs("div",{style:{display:"grid",gridTemplateColumns:"1fr 50px",gap:8,alignItems:"center"},children:[s.jsxs("div",{children:[s.jsxs("div",{style:{display:"flex",justifyContent:"space-between",fontSize:"0.65rem",fontFamily:"'JetBrains Mono', monospace",color:"#8B949E"},children:[s.jsx("span",{children:"Start Pop"}),s.jsx("span",{style:{color:"#00E5FF",fontWeight:700},children:e.startPopulation})]}),s.jsx("input",{type:"range",min:"10",max:"150",step:"5",value:e.startPopulation,onChange:i=>t({startPopulation:parseInt(i.target.value,10)}),style:{width:"100%",height:4}})]}),s.jsx("svg",{viewBox:"0 0 50 16",style:{width:50,height:16},children:s.jsx("path",{d:"M 0 14 L 10 10 L 20 12 L 30 6 L 40 4 L 50 8",fill:"none",stroke:"#00E5FF",strokeWidth:"1.5"})})]}),s.jsxs("div",{style:{display:"grid",gridTemplateColumns:"1fr 50px",gap:8,alignItems:"center"},children:[s.jsxs("div",{children:[s.jsxs("div",{style:{display:"flex",justifyContent:"space-between",fontSize:"0.65rem",fontFamily:"'JetBrains Mono', monospace",color:"#8B949E"},children:[s.jsx("span",{children:"Max Population"}),s.jsx("span",{style:{color:"#00E5FF",fontWeight:700},children:e.maxPopulation})]}),s.jsx("input",{type:"range",min:"50",max:"400",step:"10",value:e.maxPopulation,onChange:i=>t({maxPopulation:parseInt(i.target.value,10)}),style:{width:"100%",height:4}})]}),s.jsx("svg",{viewBox:"0 0 50 16",style:{width:50,height:16},children:s.jsx("path",{d:"M 0 12 L 12 14 L 25 8 L 38 4 L 50 2",fill:"none",stroke:"#00E676",strokeWidth:"1.5"})})]})]})]}),s.jsxs("div",{style:{background:"rgba(8, 14, 20, 0.6)",borderRadius:10,border:"1px solid rgba(224, 64, 251, 0.2)",padding:"8px 10px"},children:[s.jsxs("div",{onClick:()=>r(n==="gen"?"all":"gen"),style:{display:"flex",alignItems:"center",justifyContent:"space-between",cursor:"pointer",marginBottom:6},children:[s.jsxs("span",{style:{fontFamily:"'JetBrains Mono', monospace",fontSize:"0.72rem",fontWeight:800,color:"#E040FB",display:"flex",alignItems:"center",gap:6},children:[s.jsx(ar,{style:{width:13,height:13}})," Genetic Dynamics"]}),n==="gen"||n==="all"?s.jsx(el,{style:{width:14,height:14,color:"#8B949E"}}):s.jsx(qi,{style:{width:14,height:14,color:"#8B949E"}})]}),(n==="gen"||n==="all")&&s.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:8},children:[s.jsxs("div",{children:[s.jsxs("div",{style:{display:"flex",justifyContent:"space-between",fontSize:"0.68rem",fontFamily:"'JetBrains Mono', monospace",color:"#8B949E"},children:[s.jsx("span",{children:"Mutation Tendency"}),s.jsxs("span",{style:{color:"#E040FB",fontWeight:800},children:[(e.mutationRate*100).toFixed(0),"%"]})]}),s.jsx("input",{type:"range",min:"0.01",max:"0.50",step:"0.01",value:e.mutationRate,onChange:i=>t({mutationRate:parseFloat(i.target.value)}),style:{width:"100%",height:4,marginTop:4}})]}),s.jsxs("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",fontSize:"0.68rem",fontFamily:"'JetBrains Mono', monospace",color:"#8B949E"},children:[s.jsx("span",{children:"Symbiosis & Parasitism"}),s.jsx("span",{style:{color:"#00E5FF",fontWeight:800},children:"ENABLED"})]}),s.jsxs("div",{style:{display:"grid",gridTemplateColumns:"1fr 50px",gap:8,alignItems:"center"},children:[s.jsxs("div",{children:[s.jsxs("div",{style:{display:"flex",justifyContent:"space-between",fontSize:"0.65rem",fontFamily:"'JetBrains Mono', monospace",color:"#8B949E"},children:[s.jsx("span",{children:"Battery Drain Rate"}),s.jsxs("span",{style:{color:"#E040FB",fontWeight:700},children:[e.batteryDrainMultiplier.toFixed(1),"x"]})]}),s.jsx("input",{type:"range",min:"0.2",max:"3.0",step:"0.1",value:e.batteryDrainMultiplier,onChange:i=>t({batteryDrainMultiplier:parseFloat(i.target.value)}),style:{width:"100%",height:4}})]}),s.jsx("svg",{viewBox:"0 0 50 16",style:{width:50,height:16},children:s.jsx("path",{d:"M 0 14 L 12 10 L 25 12 L 38 6 L 50 4",fill:"none",stroke:"#E040FB",strokeWidth:"1.5"})})]})]})]}),s.jsxs("div",{style:{background:"rgba(8, 14, 20, 0.6)",borderRadius:10,border:"1px solid rgba(255, 107, 0, 0.2)",padding:"8px 10px"},children:[s.jsxs("div",{onClick:()=>r(n==="env"?"all":"env"),style:{display:"flex",alignItems:"center",justifyContent:"space-between",cursor:"pointer",marginBottom:6},children:[s.jsxs("span",{style:{fontFamily:"'JetBrains Mono', monospace",fontSize:"0.72rem",fontWeight:800,color:"#FF6B00",display:"flex",alignItems:"center",gap:6},children:[s.jsx(Vo,{style:{width:13,height:13}})," Environmental Forces"]}),n==="env"||n==="all"?s.jsx(el,{style:{width:14,height:14,color:"#8B949E"}}):s.jsx(qi,{style:{width:14,height:14,color:"#8B949E"}})]}),(n==="env"||n==="all")&&s.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:8},children:[s.jsxs("div",{style:{display:"grid",gridTemplateColumns:"1fr 50px",gap:8,alignItems:"center"},children:[s.jsxs("div",{children:[s.jsxs("div",{style:{display:"flex",justifyContent:"space-between",fontSize:"0.65rem",fontFamily:"'JetBrains Mono', monospace",color:"#8B949E"},children:[s.jsx("span",{children:"Energy Spawn Rate"}),s.jsxs("span",{style:{color:"#FF6B00",fontWeight:700},children:[e.energySpawnRate.toFixed(1),"/s"]})]}),s.jsx("input",{type:"range",min:"0.5",max:"12.0",step:"0.5",value:e.energySpawnRate,onChange:i=>t({energySpawnRate:parseFloat(i.target.value)}),style:{width:"100%",height:4}})]}),s.jsx("svg",{viewBox:"0 0 50 16",style:{width:50,height:16},children:s.jsx("path",{d:"M 0 12 L 15 14 L 30 6 L 50 2",fill:"none",stroke:"#FF6B00",strokeWidth:"1.5"})})]}),s.jsxs("div",{style:{display:"grid",gridTemplateColumns:"1fr 50px",gap:8,alignItems:"center"},children:[s.jsxs("div",{children:[s.jsxs("div",{style:{display:"flex",justifyContent:"space-between",fontSize:"0.65rem",fontFamily:"'JetBrains Mono', monospace",color:"#8B949E"},children:[s.jsx("span",{children:"Hazard Zones"}),s.jsx("span",{style:{color:"#FF6B00",fontWeight:700},children:e.hazardCount})]}),s.jsx("input",{type:"range",min:"0",max:"12",step:"1",value:e.hazardCount,onChange:i=>t({hazardCount:parseInt(i.target.value,10)}),style:{width:"100%",height:4}})]}),s.jsx("svg",{viewBox:"0 0 50 16",style:{width:50,height:16},children:s.jsx("path",{d:"M 0 14 L 10 10 L 20 12 L 30 4 L 40 10 L 50 6",fill:"none",stroke:"#FF6B00",strokeWidth:"1.5"})})]})]})]})]})]})},Ph=({bot:e,stats:t,onClose:n,onOverrideGenes:r,onOpenLineageModal:i})=>{const[l,o]=B.useState("telemetry");if(!e)return s.jsxs("div",{className:"glass-panel",style:{padding:"24px 16px",textAlign:"center"},children:[s.jsx(ph,{style:{width:28,height:28,color:"#00E5FF",margin:"0 auto 8px auto",display:"block"}}),s.jsx("p",{style:{fontFamily:"'JetBrains Mono', monospace",fontSize:"0.8rem",color:"#ffffff",fontWeight:800},children:"BOT DATA HUB"}),s.jsxs("p",{style:{fontSize:"0.7rem",color:"#8B949E",marginTop:4},children:["Select any microbot on the canvas grid or click ",s.jsx("strong",{style:{color:"#00E5FF"},children:"SELECT BOT MENU"})," to view real-time telemetry."]})]});const u=Math.max(0,Math.min(100,e.battery/e.maxBattery*100)),d=e.batteryHistory||new Array(30).fill(e.battery),f=Math.max(e.maxBattery,...d),g={WANDERING:{bg:"rgba(30, 41, 59, 0.6)",border:"#334155",text:"#cbd5e1",label:"WANDERING 🧭"},SEEKING_ENERGY:{bg:"rgba(0, 230, 118, 0.2)",border:"#00E676",text:"#00E676",label:"HUNTING FOOD 🍏"},EVADING_HAZARD:{bg:"rgba(255, 107, 0, 0.2)",border:"#FF6B00",text:"#FF6B00",label:"FLEEING HAZARD 💥"},REPRODUCING:{bg:"rgba(224, 64, 251, 0.2)",border:"#E040FB",text:"#E040FB",label:"SEEKING MATE 🧬"}},c=g[e.behaviorState]||g.WANDERING;return s.jsxs("div",{className:"glass-panel",style:{padding:"14px",border:"1px solid rgba(0, 229, 255, 0.4)",boxShadow:"0 0 25px rgba(0, 229, 255, 0.15)"},children:[s.jsxs("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",marginBottom:10},children:[s.jsxs("div",{style:{display:"flex",alignItems:"center",gap:10},children:[e.battery<25&&s.jsx(Sc,{style:{width:16,height:16,color:"#FF6B00"}}),s.jsxs("div",{children:[s.jsx("div",{style:{fontFamily:"'JetBrains Mono', monospace",fontWeight:800,fontSize:"0.95rem",color:"#00E5FF"},children:e.id}),s.jsxs("div",{style:{fontSize:"0.65rem",color:"#8B949E",fontFamily:"'JetBrains Mono', monospace"},children:["GEN R",e.generation," • PARENT: ",e.parentId||"ORIGIN"]})]})]}),s.jsxs("div",{style:{display:"flex",alignItems:"center",gap:6},children:[s.jsxs("button",{onClick:i,className:"btn-holo btn-holo-magenta",style:{padding:"4px 8px",fontSize:"0.65rem"},title:"View Family Lineage Tree",children:[s.jsx(kc,{style:{width:12,height:12}}),s.jsx("span",{children:"TREE"})]}),s.jsx("button",{onClick:n,style:{background:"transparent",border:"none",color:"#8B949E",cursor:"pointer",padding:4},title:"Deselect",children:s.jsx(ur,{style:{width:16,height:16}})})]})]}),s.jsxs("div",{style:{display:"flex",gap:6,marginBottom:10,borderBottom:"1px solid rgba(255, 255, 255, 0.08)",paddingBottom:6},children:[s.jsxs("button",{onClick:()=>o("telemetry"),className:l==="telemetry"?"btn-holo btn-holo-cyan":"btn-holo btn-holo-dark",style:{flex:1,padding:"4px 6px",fontSize:"0.68rem"},children:[s.jsx(Eh,{style:{width:12,height:12}})," TELEMETRY"]}),s.jsxs("button",{onClick:()=>o("dna"),className:l==="dna"?"btn-holo btn-holo-magenta":"btn-holo btn-holo-dark",style:{flex:1,padding:"4px 6px",fontSize:"0.68rem"},children:[s.jsx(ar,{style:{width:12,height:12}})," GENE INSPECTOR"]})]}),l==="telemetry"?s.jsxs(s.Fragment,{children:[s.jsxs("div",{style:{padding:"5px 10px",borderRadius:8,background:c.bg,border:"1px solid "+c.border,color:c.text,fontSize:"0.7rem",fontFamily:"'JetBrains Mono', monospace",fontWeight:800,display:"flex",alignItems:"center",justifyContent:"space-between",marginBottom:10},children:[s.jsx("span",{children:"BEHAVIOR:"}),s.jsx("span",{children:c.label})]}),s.jsxs("div",{style:{background:"rgba(8, 14, 20, 0.7)",padding:8,borderRadius:8,border:"1px solid rgba(255,255,255,0.08)",marginBottom:10},children:[s.jsxs("div",{style:{display:"flex",justifyContent:"space-between",fontSize:"0.68rem",fontFamily:"'JetBrains Mono', monospace",marginBottom:4},children:[s.jsxs("span",{style:{color:"#8B949E",display:"flex",alignItems:"center",gap:4},children:[s.jsx(fh,{style:{width:13,height:13,color:"#00E5FF"}})," Battery Charge"]}),s.jsxs("span",{style:{color:"#00E5FF",fontWeight:800},children:[e.battery.toFixed(1)," / ",e.maxBattery.toFixed(0)," (",u.toFixed(0),"%)"]})]}),s.jsx("div",{style:{width:"100%",height:6,background:"#1e293b",borderRadius:3,overflow:"hidden"},children:s.jsx("div",{style:{height:"100%",width:`${u}%`,background:u>40?"linear-gradient(90deg, #00E5FF, #00E676)":u>20?"#FF6B00":"#f43f5e",transition:"width 0.2s ease"}})})]}),s.jsxs("div",{style:{background:"rgba(8, 14, 20, 0.7)",padding:8,borderRadius:8,border:"1px solid rgba(0, 229, 255, 0.15)",marginBottom:10},children:[s.jsxs("div",{style:{display:"flex",justifyContent:"space-between",fontSize:"0.65rem",fontFamily:"'JetBrains Mono', monospace",color:"#8B949E",marginBottom:4},children:[s.jsx("span",{children:"Battery Charge Trend"}),s.jsx("span",{style:{color:"#00E5FF"},children:"Live"})]}),s.jsx("svg",{viewBox:"0 0 100 24",style:{width:"100%",height:24,overflow:"visible"},children:s.jsx("path",{d:d.map((m,x)=>{const w=x/(d.length-1)*100,S=24-m/f*20;return`${x===0?"M":"L"} ${w} ${S}`}).join(" "),fill:"none",stroke:"#00E5FF",strokeWidth:"1.8"})})]}),s.jsxs("div",{style:{background:"rgba(8, 14, 20, 0.7)",padding:8,borderRadius:8,border:"1px solid rgba(224, 64, 251, 0.15)"},children:[s.jsxs("div",{style:{display:"flex",justifyContent:"space-between",fontSize:"0.65rem",fontFamily:"'JetBrains Mono', monospace",color:"#8B949E",marginBottom:6},children:[s.jsx("span",{children:"Speed/Vision/Efficiency"}),s.jsx("span",{style:{color:"#E040FB"},children:"Last Mins"})]}),s.jsx("div",{style:{display:"flex",alignItems:"flex-end",gap:3,height:32},children:t.speedHistogram.map((m,x)=>{const w=Math.max(1,...t.speedHistogram),S=m/w*100;return s.jsx("div",{style:{flex:1,height:`${Math.max(15,S)}%`,backgroundColor:x<3?"#E040FB":x<7?"#00E5FF":"#00E676",borderRadius:"2px 2px 0 0"}},x)})})]})]}):s.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:10},children:[s.jsx("div",{style:{fontSize:"0.68rem",fontFamily:"'JetBrains Mono', monospace",color:"#E040FB",fontWeight:800},children:"REAL-TIME GENETIC OVERRIDES"}),s.jsxs("div",{style:{background:"rgba(8, 14, 20, 0.7)",padding:8,borderRadius:8,border:"1px solid rgba(255,255,255,0.08)"},children:[s.jsxs("div",{style:{display:"flex",justifyContent:"space-between",fontSize:"0.65rem",fontFamily:"'JetBrains Mono', monospace",color:"#8B949E"},children:[s.jsxs("span",{style:{display:"flex",alignItems:"center",gap:4},children:[s.jsx(wc,{style:{width:12,height:12,color:"#00E5FF"}})," Speed"]}),s.jsxs("span",{style:{color:"#00E5FF",fontWeight:800},children:[e.speed.toFixed(2)," px/f"]})]}),s.jsx("input",{type:"range",min:"1.0",max:"5.0",step:"0.1",value:e.speed,onChange:m=>r(e.id,{speed:parseFloat(m.target.value)}),style:{width:"100%",height:4,marginTop:4}})]}),s.jsxs("div",{style:{background:"rgba(8, 14, 20, 0.7)",padding:8,borderRadius:8,border:"1px solid rgba(255,255,255,0.08)"},children:[s.jsxs("div",{style:{display:"flex",justifyContent:"space-between",fontSize:"0.65rem",fontFamily:"'JetBrains Mono', monospace",color:"#8B949E"},children:[s.jsxs("span",{style:{display:"flex",alignItems:"center",gap:4},children:[s.jsx(yh,{style:{width:12,height:12,color:"#60a5fa"}})," Vision Radius"]}),s.jsxs("span",{style:{color:"#60a5fa",fontWeight:800},children:[e.visionRadius.toFixed(0)," px"]})]}),s.jsx("input",{type:"range",min:"60",max:"260",step:"5",value:e.visionRadius,onChange:m=>r(e.id,{visionRadius:parseInt(m.target.value,10)}),style:{width:"100%",height:4,marginTop:4}})]}),s.jsxs("div",{style:{background:"rgba(8, 14, 20, 0.7)",padding:8,borderRadius:8,border:"1px solid rgba(255,255,255,0.08)"},children:[s.jsxs("div",{style:{display:"flex",justifyContent:"space-between",fontSize:"0.65rem",fontFamily:"'JetBrains Mono', monospace",color:"#8B949E"},children:[s.jsxs("span",{style:{display:"flex",alignItems:"center",gap:4},children:[s.jsx(Jo,{style:{width:12,height:12,color:"#00E676"}})," Efficiency"]}),s.jsxs("span",{style:{color:"#00E676",fontWeight:800},children:[e.energyEfficiency.toFixed(2),"x"]})]}),s.jsx("input",{type:"range",min:"0.6",max:"2.5",step:"0.1",value:e.energyEfficiency,onChange:m=>r(e.id,{energyEfficiency:parseFloat(m.target.value)}),style:{width:"100%",height:4,marginTop:4}})]}),s.jsxs("div",{style:{background:"rgba(8, 14, 20, 0.7)",padding:8,borderRadius:8,border:"1px solid rgba(255,255,255,0.08)"},children:[s.jsxs("div",{style:{display:"flex",justifyContent:"space-between",fontSize:"0.65rem",fontFamily:"'JetBrains Mono', monospace",color:"#8B949E"},children:[s.jsx("span",{children:"Color Hue Alignment"}),s.jsxs("span",{style:{color:e.color,fontWeight:800},children:[e.hue.toFixed(0),"°"]})]}),s.jsx("input",{type:"range",min:"0",max:"360",step:"5",value:e.hue,onChange:m=>r(e.id,{hue:parseInt(m.target.value,10)}),style:{width:"100%",height:4,marginTop:4}})]})]})]})},Ih=({stats:e})=>{const t=e.speedHistogram||new Array(10).fill(0),n=e.visionHistogram||new Array(10).fill(0),r=e.efficiencyHistogram||new Array(10).fill(0),i=Math.max(1,...t,...n,...r);return s.jsxs("div",{style:{background:"rgba(8, 14, 20, 0.75)",borderRadius:10,border:"1px solid rgba(0, 229, 255, 0.25)",padding:"10px",marginTop:8},children:[s.jsxs("div",{style:{fontFamily:"'JetBrains Mono', monospace",fontSize:"0.72rem",fontWeight:800,color:"#00E5FF",display:"flex",alignItems:"center",justifyContent:"space-between",marginBottom:8},children:[s.jsxs("span",{style:{display:"flex",alignItems:"center",gap:6},children:[s.jsx(ah,{style:{width:13,height:13}})," GENETIC DRIFT HEATMAP"]}),s.jsx("span",{style:{color:"#8B949E",fontSize:"0.65rem"},children:"10 Trait Buckets"})]}),s.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:4},children:[s.jsxs("div",{style:{display:"grid",gridTemplateColumns:"50px 1fr",gap:6,alignItems:"center"},children:[s.jsx("span",{style:{fontSize:"0.6rem",fontFamily:"'JetBrains Mono', monospace",color:"#E040FB"},children:"SPEED"}),s.jsx("div",{style:{display:"flex",gap:2,height:12},children:t.map((l,o)=>{const u=Math.max(.1,l/i);return s.jsx("div",{title:`Speed Bucket ${o+1}: ${l} bots`,style:{flex:1,backgroundColor:`rgba(224, 64, 251, ${u})`,borderRadius:2,border:"1px solid rgba(224, 64, 251, 0.3)"}},o)})})]}),s.jsxs("div",{style:{display:"grid",gridTemplateColumns:"50px 1fr",gap:6,alignItems:"center"},children:[s.jsx("span",{style:{fontSize:"0.6rem",fontFamily:"'JetBrains Mono', monospace",color:"#00E5FF"},children:"VISION"}),s.jsx("div",{style:{display:"flex",gap:2,height:12},children:n.map((l,o)=>{const u=Math.max(.1,l/i);return s.jsx("div",{title:`Vision Bucket ${o+1}: ${l} bots`,style:{flex:1,backgroundColor:`rgba(0, 229, 255, ${u})`,borderRadius:2,border:"1px solid rgba(0, 229, 255, 0.3)"}},o)})})]}),s.jsxs("div",{style:{display:"grid",gridTemplateColumns:"50px 1fr",gap:6,alignItems:"center"},children:[s.jsx("span",{style:{fontSize:"0.6rem",fontFamily:"'JetBrains Mono', monospace",color:"#00E676"},children:"EFFICIENCY"}),s.jsx("div",{style:{display:"flex",gap:2,height:12},children:r.map((l,o)=>{const u=Math.max(.1,l/i);return s.jsx("div",{title:`Efficiency Bucket ${o+1}: ${l} bots`,style:{flex:1,backgroundColor:`rgba(0, 230, 118, ${u})`,borderRadius:2,border:"1px solid rgba(0, 230, 118, 0.3)"}},o)})})]})]})]})},tl=({engine:e,onSelectBot:t,onSelectRandomBot:n,onUpdateConfig:r})=>{const i=B.useRef(null),l=B.useRef(null),o=B.useRef(null),u=B.useRef(!0),d=B.useRef(!1);B.useEffect(()=>{const S=i.current;if(!S)return;const C=()=>{const a=S.getBoundingClientRect(),p=Math.max(600,Math.floor(S.clientWidth||a.width||1e3)),v=Math.max(400,Math.floor(S.clientHeight||a.height||650)),y=l.current;y&&(y.width=p,y.height=v,e.resize(p,v),u.current=!0)};C();const h=new ResizeObserver(C);return h.observe(S),()=>h.disconnect()},[e]);const f=(S,C)=>{o.current||(o.current=document.createElement("canvas"));const h=o.current;h.width=S,h.height=C;const a=h.getContext("2d");if(!a)return h;a.fillStyle="#080E14",a.fillRect(0,0,S,C),a.strokeStyle="rgba(0, 229, 255, 0.05)",a.lineWidth=1;const p=40;for(let y=0;y<S;y+=p)a.beginPath(),a.moveTo(y,0),a.lineTo(y,C),a.stroke();for(let y=0;y<C;y+=p)a.beginPath(),a.moveTo(0,y),a.lineTo(S,y),a.stroke();a.strokeStyle="rgba(0, 229, 255, 0.08)";const v=60;for(let y=0;y<S;y+=v)a.beginPath(),a.moveTo(y,0),a.lineTo(y,C),a.stroke();return u.current=!1,h};B.useEffect(()=>{let S;const C=()=>{const h=l.current;if(h){const a=h.getContext("2d");if(a){if(document.hidden){S=requestAnimationFrame(C);return}e.update(1),(u.current||!o.current)&&f(h.width,h.height),a.drawImage(o.current,0,0);const p=e.config.heatmapMode||"OFF";if(p!=="OFF"){const k=h.width/20,M=h.height/15;for(let z=0;z<20;z++)for(let I=0;I<15;I++){const W=z*k+k/2,ge=I*M+M/2;let Q=0,T="255, 107, 0";if(p==="MORTALITY"){T="244, 63, 94";for(const L of e.hazards)Math.hypot(W-L.x,ge-L.y)<L.radius*1.5&&(Q+=.35)}else if(p==="FOOD_DENSITY"){T="0, 230, 118";for(const L of e.energyParticles)Math.hypot(W-L.x,ge-L.y)<100&&(Q+=.25)}else if(p==="TRAFFIC"){T="0, 229, 255";for(const L of e.microbots)Math.hypot(W-L.x,ge-L.y)<120&&(Q+=.2)}Q=Math.min(.65,Q),Q>.05&&(a.fillStyle=`rgba(${T}, ${Q})`,a.fillRect(z*k,I*M,k,M))}}a.strokeStyle="rgba(0, 229, 255, 0.12)",a.lineWidth=1.5;for(let y=50;y<h.height;y+=120)a.beginPath(),a.moveTo(0,y),a.lineTo(h.width,y+Math.sin(y+Date.now()*.002)*15),a.stroke();for(const y of e.speedFields){const j=a.createRadialGradient(y.x,y.y,5,y.x,y.y,y.radius);j.addColorStop(0,"rgba(0, 229, 255, 0.3)"),j.addColorStop(1,"rgba(0, 229, 255, 0)"),a.fillStyle=j,a.beginPath(),a.arc(y.x,y.y,y.radius,0,Math.PI*2),a.fill(),a.strokeStyle="rgba(0, 229, 255, 0.5)",a.lineWidth=1,a.beginPath(),a.arc(y.x,y.y,y.radius,0,Math.PI*2),a.stroke()}for(const y of e.hazards){const j=Math.sin(Date.now()/350)*4,k=Math.max(10,y.radius+j),M=a.createRadialGradient(y.x,y.y,5,y.x,y.y,k);M.addColorStop(0,"rgba(255, 107, 0, 0.35)"),M.addColorStop(.7,"rgba(255, 107, 0, 0.15)"),M.addColorStop(1,"rgba(255, 107, 0, 0)"),a.fillStyle=M,a.beginPath(),a.arc(y.x,y.y,k,0,Math.PI*2),a.fill(),a.strokeStyle="rgba(255, 107, 0, 0.6)",a.lineWidth=1.5,a.setLineDash([6,6]),a.beginPath(),a.arc(y.x,y.y,y.radius,0,Math.PI*2),a.stroke(),a.setLineDash([]),a.font="800 9px 'JetBrains Mono', monospace",a.fillStyle="rgba(255, 107, 0, 0.8)",a.textAlign="center",a.fillText(y.id,y.x,y.y+3)}for(const y of e.energyParticles){if(a.shadowColor=y.color,a.shadowBlur=10,a.fillStyle=y.color,a.beginPath(),a.arc(y.x,y.y,y.radius,0,Math.PI*2),a.fill(),y.type==="SUPER_CHARGER")a.strokeStyle="#ffffff",a.lineWidth=1,a.stroke();else if(y.type==="MUTAGEN_ORB"){const j=y.radius+Math.sin(Date.now()/150)*2;a.strokeStyle="#E040FB",a.lineWidth=1.2,a.beginPath(),a.arc(y.x,y.y,j,0,Math.PI*2),a.stroke()}a.shadowBlur=0}if(e.config.showEnergyForceLines){a.lineWidth=1;for(const y of e.microbots){const j=e.spatialGrid.getNearby(y.x,y.y,y.visionRadius);for(const k of j){const M=Math.hypot(y.x-k.x,y.y-k.y);if(M<=y.visionRadius){const z=(1-M/y.visionRadius)*.45;a.strokeStyle=k.type==="MUTAGEN_ORB"?`rgba(224, 64, 251, ${z})`:k.type==="SUPER_CHARGER"?`rgba(0, 229, 255, ${z})`:`rgba(0, 230, 118, ${z})`,a.beginPath(),a.moveTo(y.x,y.y),a.quadraticCurveTo((y.x+k.x)/2+Math.sin(Date.now()/200+y.x)*10,(y.y+k.y)/2+Math.cos(Date.now()/200+y.y)*10,k.x,k.y),a.stroke()}}}}const v=e.getSelectedMicrobot();for(const y of e.microbots){const j=v&&v.id===y.id;if(e.config.showSensoryRaycasts||j){const T=Math.PI*.8,L=y.heading-T/2;for(let G=0;G<8;G++){const Ee=L+G/7*T;let R="rgba(0, 229, 255, 0.15)",N=y.visionRadius;for(const b of e.energyParticles){const $e=Math.hypot(y.x-b.x,y.y-b.y);if($e<y.visionRadius){const Oe=Math.atan2(b.y-y.y,b.x-y.x);Math.abs(Oe-Ee)<.25&&(R=b.color,N=Math.min(N,$e))}}for(const b of e.hazards){const $e=Math.hypot(y.x-b.x,y.y-b.y);if($e<y.visionRadius+b.radius){const Oe=Math.atan2(b.y-y.y,b.x-y.x);Math.abs(Oe-Ee)<.3&&(R="rgba(255, 107, 0, 0.7)",N=Math.min(N,$e))}}const _=y.x+Math.cos(Ee)*N,Y=y.y+Math.sin(Ee)*N;a.strokeStyle=R,a.lineWidth=j?1.5:1,a.beginPath(),a.moveTo(y.x,y.y),a.lineTo(_,Y),a.stroke()}}if(e.config.showMovementTrails&&y.trail.length>1){const Q=y.trail.length;for(let T=1;T<Q;T++){const L=T/Q*.35;a.strokeStyle=y.color,a.lineWidth=1+T/Q*1.5,a.globalAlpha=L,a.beginPath(),a.moveTo(y.trail[T-1].x,y.trail[T-1].y),a.lineTo(y.trail[T].x,y.trail[T].y),a.stroke()}a.globalAlpha=1}const k=14;a.strokeStyle=y.color,a.lineWidth=1.2,a.globalAlpha=.5,a.beginPath(),a.moveTo(y.x,y.y),a.lineTo(y.x+Math.cos(y.heading)*k,y.y+Math.sin(y.heading)*k),a.stroke(),a.globalAlpha=1,(j||e.config.showSensoryRings)&&(a.strokeStyle=j?y.isPredator?"#f43f5e":"#00E5FF":"rgba(0, 229, 255, 0.12)",a.lineWidth=j?1.5:.8,a.beginPath(),a.arc(y.x,y.y,y.visionRadius,0,Math.PI*2),a.stroke()),a.save(),a.translate(y.x,y.y),a.rotate(y.heading),a.shadowColor=y.color,a.shadowBlur=j?20:10,a.fillStyle=y.color,a.beginPath(),a.moveTo(10,0),a.lineTo(-8,-6),a.lineTo(-4,0),a.lineTo(-8,6),a.closePath(),a.fill(),y.isPredator&&(a.strokeStyle="#f43f5e",a.lineWidth=1.5,a.beginPath(),a.moveTo(8,-4),a.lineTo(14,-7),a.moveTo(8,4),a.lineTo(14,7),a.stroke()),a.fillStyle="#ffffff",a.beginPath(),a.arc(6,0,2,0,Math.PI*2),a.fill(),a.shadowBlur=0,a.restore();const M=Math.max(0,Math.min(1,y.battery/y.maxBattery)),z=20,I=3,W=y.x-z/2,ge=y.y-14;if(a.fillStyle="rgba(0, 0, 0, 0.7)",a.fillRect(W,ge,z,I),a.fillStyle=M>.4?"#00E676":M>.2?"#FF6B00":"#f43f5e",a.fillRect(W,ge,z*M,I),j){const T=18+Math.sin(Date.now()/200)*3;a.strokeStyle=y.isPredator?"#f43f5e":"#00E5FF",a.lineWidth=2,a.beginPath(),a.arc(y.x,y.y,T,0,Math.PI*2),a.stroke();const L=y.behaviorState==="HUNTING_PREY"?"Predator Hunting ⚔️":y.behaviorState==="SEEKING_ENERGY"?"Hunting Food 🍏":y.behaviorState==="EVADING_HAZARD"?"Fleeing Hazard 💥":y.behaviorState==="REPRODUCING"?"Seeking Mate 🧬":"Wandering 🧭";a.font="800 11px 'JetBrains Mono', monospace",a.fillStyle=y.isPredator?"#f43f5e":"#00E5FF",a.textAlign="center",a.fillText(`★ ${y.id} (${L})`,y.x,y.y-22)}}}}S=requestAnimationFrame(C)};return C(),()=>cancelAnimationFrame(S)},[e]);const g=S=>{const C=l.current;if(!C)return;const h=C.getBoundingClientRect(),a=S.clientX-h.left,p=S.clientY-h.top,v=e.config.brushMode||"NONE";if(v==="PAINT_FOOD")e.spawnFood(a,p);else if(v==="PAINT_HAZARD")e.spawnHazard(a,p);else if(v==="PAINT_SPEED_FIELD")e.spawnSpeedField(a,p);else{let y=null,j=28;for(const k of e.microbots){const M=Math.hypot(k.x-a,k.y-p);M<j&&(j=M,y=k)}if(y)t(y.id);else for(let k=0;k<5;k++)e.spawnFood(a+(Math.random()-.5)*20,p+(Math.random()-.5)*20)}},c=e.getSelectedMicrobot(),m=e.config.brushMode||"NONE",x=e.config.heatmapMode||"OFF",w=e.microbots.length<15;return s.jsxs("div",{ref:i,className:"canvas-viewport-card",style:{width:"100%",height:"100%"},children:[w&&s.jsxs("div",{style:{position:"absolute",top:60,left:"50%",transform:"translateX(-50%)",zIndex:22,display:"flex",alignItems:"center",gap:8,padding:"6px 18px",background:"rgba(244, 63, 94, 0.85)",border:"1px solid #f43f5e",borderRadius:12,color:"#ffffff",fontFamily:"'JetBrains Mono', monospace",fontSize:"0.75rem",fontWeight:800,boxShadow:"0 0 25px rgba(244, 63, 94, 0.5)",pointerEvents:"none"},children:[s.jsx(uh,{style:{width:14,height:14}}),s.jsx("span",{children:"⚠️ EXTINCTION CRISIS ALERT: POPULATION BELOW 15 BOTS! RECOVERY INITIATED"})]}),s.jsxs("div",{style:{position:"absolute",top:14,left:"50%",transform:"translateX(-50%)",zIndex:20,display:"flex",alignItems:"center",gap:12,padding:"6px 16px",background:"rgba(15, 26, 36, 0.85)",border:"1px solid rgba(0, 229, 255, 0.35)",borderRadius:20,backdropFilter:"blur(12px)",boxShadow:"0 8px 24px rgba(0,0,0,0.5)",pointerEvents:"auto"},children:[s.jsxs("div",{style:{display:"flex",alignItems:"center",gap:8},children:[s.jsx("div",{style:{width:10,height:10,borderRadius:"50%",backgroundColor:c?c.color:"#00E5FF",boxShadow:"0 0 10px "+(c?c.color:"#00E5FF")}}),s.jsxs("span",{style:{fontFamily:"'JetBrains Mono', monospace",fontSize:"0.8rem",fontWeight:800,color:"#ffffff"},children:["TRACKING: ",c?c.id:"SEARCHING..."]})]}),s.jsxs("button",{onClick:n,className:"btn-holo btn-holo-cyan",style:{padding:"4px 10px",fontSize:"0.68rem"},children:[s.jsx(Go,{style:{width:12,height:12}}),s.jsx("span",{children:"SWITCH BOT"})]})]}),s.jsxs("div",{style:{position:"absolute",top:14,right:14,zIndex:20,display:"flex",alignItems:"center",gap:6,padding:"4px 8px",background:"rgba(15, 26, 36, 0.85)",border:"1px solid rgba(0, 229, 255, 0.3)",borderRadius:10,backdropFilter:"blur(12px)"},children:[s.jsxs("span",{style:{fontSize:"0.65rem",fontFamily:"'JetBrains Mono', monospace",color:"#8B949E",display:"flex",alignItems:"center",gap:4},children:[s.jsx(gh,{style:{width:12,height:12}})," HEATMAP:"]}),s.jsxs("select",{value:x,onChange:S=>r({heatmapMode:S.target.value}),style:{background:"#080E14",color:"#00E5FF",fontWeight:800,border:"1px solid rgba(0, 229, 255, 0.4)",borderRadius:6,padding:"2px 6px",fontSize:"0.65rem",cursor:"pointer"},children:[s.jsx("option",{value:"OFF",children:"Off"}),s.jsx("option",{value:"MORTALITY",children:"🔴 Mortality"}),s.jsx("option",{value:"FOOD_DENSITY",children:"🟢 Food Density"}),s.jsx("option",{value:"TRAFFIC",children:"🔵 Traffic Pathing"})]})]}),s.jsxs("div",{style:{position:"absolute",top:14,left:14,zIndex:20,display:"flex",alignItems:"center",gap:6,padding:"4px 8px",background:"rgba(15, 26, 36, 0.85)",border:"1px solid rgba(0, 229, 255, 0.3)",borderRadius:10,backdropFilter:"blur(12px)"},children:[s.jsx("span",{style:{fontSize:"0.65rem",fontFamily:"'JetBrains Mono', monospace",color:"#8B949E"},children:"BRUSH:"}),s.jsxs("button",{onClick:()=>r({brushMode:m==="PAINT_FOOD"?"NONE":"PAINT_FOOD"}),className:m==="PAINT_FOOD"?"btn-holo btn-holo-green":"btn-holo btn-holo-dark",style:{padding:"3px 6px",fontSize:"0.65rem"},children:[s.jsx(Jo,{style:{width:10,height:10}})," FOOD"]}),s.jsxs("button",{onClick:()=>e.spawnFood(void 0,void 0,"MUTAGEN_ORB"),className:"btn-holo btn-holo-magenta",style:{padding:"3px 6px",fontSize:"0.65rem"},title:"Spawn Mutagen Orb",children:[s.jsx(ar,{style:{width:10,height:10}})," MUTAGEN"]}),s.jsxs("button",{onClick:()=>r({brushMode:m==="PAINT_HAZARD"?"NONE":"PAINT_HAZARD"}),className:m==="PAINT_HAZARD"?"btn-holo btn-holo-orange":"btn-holo btn-holo-dark",style:{padding:"3px 6px",fontSize:"0.65rem"},children:[s.jsx(Vo,{style:{width:10,height:10}})," HAZARD"]}),s.jsxs("button",{onClick:()=>r({brushMode:m==="PAINT_SPEED_FIELD"?"NONE":"PAINT_SPEED_FIELD"}),className:m==="PAINT_SPEED_FIELD"?"btn-holo btn-holo-cyan":"btn-holo btn-holo-dark",style:{padding:"3px 6px",fontSize:"0.65rem"},children:[s.jsx(Ec,{style:{width:10,height:10}})," SPEED FIELD"]})]}),s.jsx("canvas",{ref:l,onMouseDown:S=>{d.current=!0,g(S)},onMouseMove:S=>{d.current&&g(S)},onMouseUp:()=>{d.current=!1},style:{display:"block",width:"100%",height:"100%",cursor:m!=="NONE"?"cell":"crosshair"}}),s.jsxs("div",{style:{position:"absolute",bottom:14,left:14,zIndex:20,background:"rgba(15, 26, 36, 0.75)",padding:"5px 12px",borderRadius:8,border:"1px solid rgba(255, 255, 255, 0.1)",fontSize:"0.7rem",color:"#8B949E",display:"flex",alignItems:"center",gap:6,pointerEvents:"none",fontFamily:"'JetBrains Mono', monospace"},children:[s.jsx(vh,{style:{width:14,height:14,color:"#00E676"}}),s.jsx("span",{children:m==="PAINT_FOOD"?"Click or drag to paint food clusters!":m==="PAINT_HAZARD"?"Click to paint hazard zones!":m==="PAINT_SPEED_FIELD"?"Click to paint speed fields!":"Click anywhere on canvas to drop food!"})]})]})},zh=({stats:e})=>{const t=e.populationHistory||new Array(30).fill(45),n=e.birthHistory||new Array(30).fill(0),r=e.deathHistory||new Array(30).fill(0),i=Math.max(1,...t),l=Math.max(1,...n),o=Math.max(1,...r);return s.jsx("div",{className:"analytics-cube-container",children:s.jsxs("div",{className:"cube-card-3d",children:[s.jsxs("div",{style:{background:"rgba(8, 14, 20, 0.7)",borderRadius:8,padding:6,border:"1px solid rgba(0, 229, 255, 0.2)",display:"flex",flexDirection:"column",justifyContent:"space-between"},children:[s.jsxs("div",{style:{display:"flex",justifyContent:"space-between",fontSize:"0.55rem",fontFamily:"'JetBrains Mono', monospace",color:"#00E5FF",fontWeight:800},children:[s.jsx("span",{children:"POPULATION TIME"}),s.jsx("span",{children:e.currentPopulation})]}),s.jsx("svg",{viewBox:"0 0 100 30",style:{width:"100%",height:24,overflow:"visible"},children:s.jsx("path",{d:t.map((u,d)=>{const f=d/(t.length-1)*100,g=30-u/i*24;return`${d===0?"M":"L"} ${f} ${g}`}).join(" "),fill:"none",stroke:"#00E5FF",strokeWidth:"2"})})]}),s.jsxs("div",{style:{background:"rgba(8, 14, 20, 0.7)",borderRadius:8,padding:6,border:"1px solid rgba(0, 230, 118, 0.2)",display:"flex",flexDirection:"column",justifyContent:"space-between"},children:[s.jsxs("div",{style:{display:"flex",justifyContent:"space-between",fontSize:"0.55rem",fontFamily:"'JetBrains Mono', monospace",color:"#00E676",fontWeight:800},children:[s.jsx("span",{children:"TOTAL BIRTHS"}),s.jsx("span",{children:e.totalBirths})]}),s.jsx("svg",{viewBox:"0 0 100 30",style:{width:"100%",height:24,overflow:"visible"},children:s.jsx("path",{d:`${n.map((u,d)=>{const f=d/(n.length-1)*100,g=30-u/l*22;return`${d===0?"M":"L"} ${f} ${g}`}).join(" ")} L 100 30 L 0 30 Z`,fill:"rgba(0, 230, 118, 0.25)",stroke:"#00E676",strokeWidth:"1.5"})})]}),s.jsxs("div",{style:{background:"rgba(8, 14, 20, 0.7)",borderRadius:8,padding:6,border:"1px solid rgba(224, 64, 251, 0.2)",display:"flex",flexDirection:"column",justifyContent:"space-between"},children:[s.jsxs("div",{style:{display:"flex",justifyContent:"space-between",fontSize:"0.55rem",fontFamily:"'JetBrains Mono', monospace",color:"#E040FB",fontWeight:800},children:[s.jsx("span",{children:"GEN COUNT"}),s.jsxs("span",{children:["#",e.generationCount]})]}),s.jsx("svg",{viewBox:"0 0 100 30",style:{width:"100%",height:24,overflow:"visible"},children:s.jsx("path",{d:n.map((u,d)=>{const f=d/(n.length-1)*100,g=28-u/l*20;return`${d===0?"M":"L"} ${f} ${g}`}).join(" "),fill:"none",stroke:"#E040FB",strokeWidth:"2"})})]}),s.jsxs("div",{style:{background:"rgba(8, 14, 20, 0.7)",borderRadius:8,padding:6,border:"1px solid rgba(255, 107, 0, 0.2)",display:"flex",flexDirection:"column",justifyContent:"space-between"},children:[s.jsxs("div",{style:{display:"flex",justifyContent:"space-between",fontSize:"0.55rem",fontFamily:"'JetBrains Mono', monospace",color:"#FF6B00",fontWeight:800},children:[s.jsx("span",{children:"DEATH RATE"}),s.jsx("span",{children:e.totalDeaths})]}),s.jsx("div",{style:{display:"flex",alignItems:"flex-end",gap:2,height:24,paddingTop:2},children:r.slice(-15).map((u,d)=>{const f=o>0?u/o*100:10;return s.jsx("div",{style:{flex:1,height:`${Math.max(15,f)}%`,backgroundColor:"#FF6B00",borderRadius:"1px 1px 0 0"}},d)})})]})]})})},_h=({isOpen:e,onClose:t})=>e?s.jsx("div",{style:{position:"fixed",inset:0,zIndex:50,background:"rgba(3, 7, 18, 0.85)",backdropFilter:"blur(10px)",display:"flex",alignItems:"center",justifyContent:"center",padding:"20px"},children:s.jsxs("div",{style:{background:"#0b0f19",border:"2px solid #00f0ff",borderRadius:"18px",maxWidth:"620px",width:"100%",padding:"24px",boxShadow:"0 0 40px rgba(0, 240, 255, 0.3)",position:"relative"},children:[s.jsx("button",{onClick:t,style:{position:"absolute",top:16,right:16,background:"transparent",border:"none",color:"#94a3b8",cursor:"pointer"},children:s.jsx(ur,{style:{width:20,height:20}})}),s.jsxs("h2",{style:{fontFamily:"'JetBrains Mono', monospace",fontSize:"1.2rem",color:"#ffffff",marginBottom:6,display:"flex",alignItems:"center",gap:10},children:[s.jsx(Jo,{style:{color:"#00f0ff"}})," HOW TO PLAY MICROBOT EVOLUTION LAB"]}),s.jsx("p",{style:{fontSize:"0.8rem",color:"#94a3b8",marginBottom:20},children:"A 100% automated autonomous artificial life sandbox. Watch microbots steer, search for food, avoid hazards, and reproduce!"}),s.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:14},children:[s.jsxs("div",{style:{background:"rgba(15, 23, 42, 0.6)",padding:12,borderRadius:10,border:"1px solid rgba(255, 255, 255, 0.08)",display:"flex",gap:12},children:[s.jsx("div",{style:{width:32,height:32,borderRadius:8,background:"rgba(0, 240, 255, 0.2)",color:"#00f0ff",display:"flex",alignItems:"center",justifyContent:"center",fontWeight:800,flexShrink:0},children:"1"}),s.jsxs("div",{children:[s.jsx("h4",{style:{fontSize:"0.85rem",color:"#ffffff",fontWeight:700},children:"Inspect Microbot Telemetry"}),s.jsxs("p",{style:{fontSize:"0.75rem",color:"#94a3b8",marginTop:2},children:["Click ",s.jsx("strong",{children:"🎯 SELECT BOT"})," or click any microbot directly on the canvas grid to inspect its real-time battery level, movement speed, vision range, and behavior state."]})]})]}),s.jsxs("div",{style:{background:"rgba(15, 23, 42, 0.6)",padding:12,borderRadius:10,border:"1px solid rgba(255, 255, 255, 0.08)",display:"flex",gap:12},children:[s.jsx("div",{style:{width:32,height:32,borderRadius:8,background:"rgba(16, 185, 129, 0.2)",color:"#34d399",display:"flex",alignItems:"center",justifyContent:"center",fontWeight:800,flexShrink:0},children:"2"}),s.jsxs("div",{children:[s.jsx("h4",{style:{fontSize:"0.85rem",color:"#ffffff",fontWeight:700},children:"Interactive Mouse Canvas Spawner"}),s.jsxs("p",{style:{fontSize:"0.75rem",color:"#94a3b8",marginTop:2},children:["Click anywhere on the simulation grid to drop ",s.jsx("strong",{children:"5 green food particles"})," directly under your cursor, or use ",s.jsx("strong",{children:"🍏 +20 FOOD"})," and ",s.jsx("strong",{children:"🤖 +10 BOTS"})," buttons!"]})]})]}),s.jsxs("div",{style:{background:"rgba(15, 23, 42, 0.6)",padding:12,borderRadius:10,border:"1px solid rgba(255, 255, 255, 0.08)",display:"flex",gap:12},children:[s.jsx("div",{style:{width:32,height:32,borderRadius:8,background:"rgba(168, 85, 247, 0.2)",color:"#c084fc",display:"flex",alignItems:"center",justifyContent:"center",fontWeight:800,flexShrink:0},children:"3"}),s.jsxs("div",{children:[s.jsx("h4",{style:{fontSize:"0.85rem",color:"#ffffff",fontWeight:700},children:"Genetic Evolution & Hazards"}),s.jsx("p",{style:{fontSize:"0.75rem",color:"#94a3b8",marginTop:2},children:"When microbots reach full battery, they reproduce asexually. Offspring inherit mutated traits (speed, vision, energy efficiency). Spawn red hazard zones to watch microbots evolve evasion!"})]})]})]}),s.jsx("div",{style:{marginTop:24,textAlign:"right"},children:s.jsx("button",{onClick:t,className:"btn btn-cyan",style:{padding:"10px 24px",fontSize:"0.85rem"},children:"START EXPERIMENT"})})]})}):null,Bh=({isOpen:e,microbots:t,selectedBotId:n,onSelectBot:r,onClose:i})=>{const[l,o]=B.useState(""),[u,d]=B.useState("gen");if(!e)return null;const f=t.filter(g=>g.id.toLowerCase().includes(l.toLowerCase())).sort((g,c)=>u==="gen"?c.generation-g.generation:u==="battery"?c.battery-g.battery:u==="age"?c.age-g.age:u==="offspring"?c.offspringCount-g.offspringCount:0);return s.jsx("div",{style:{position:"fixed",inset:0,zIndex:60,background:"rgba(3, 7, 18, 0.85)",backdropFilter:"blur(10px)",display:"flex",alignItems:"center",justifyContent:"center",padding:"20px"},children:s.jsxs("div",{style:{background:"#0b0f19",border:"2px solid #00f0ff",borderRadius:"18px",maxWidth:"680px",width:"100%",maxHeight:"85vh",display:"flex",flexDirection:"column",boxShadow:"0 0 40px rgba(0, 240, 255, 0.3)",overflow:"hidden"},children:[s.jsxs("div",{style:{padding:"16px 20px",borderBottom:"1px solid rgba(255, 255, 255, 0.1)",display:"flex",alignItems:"center",justifyContent:"space-between",background:"rgba(15, 23, 42, 0.9)"},children:[s.jsxs("div",{style:{display:"flex",alignItems:"center",gap:10,color:"#00f0ff"},children:[s.jsx(Go,{style:{width:22,height:22}}),s.jsxs("div",{children:[s.jsx("h2",{style:{fontFamily:"'JetBrains Mono', monospace",fontSize:"1rem",fontWeight:800,color:"#ffffff"},children:"SELECT MICROBOT FROM ROSTER"}),s.jsxs("p",{style:{fontSize:"0.72rem",color:"#94a3b8"},children:["Active Population: ",t.length," Microbots"]})]})]}),s.jsx("button",{onClick:i,style:{background:"transparent",border:"none",color:"#94a3b8",cursor:"pointer",padding:4},children:s.jsx(ur,{style:{width:20,height:20}})})]}),s.jsxs("div",{style:{padding:"12px 20px",background:"rgba(15, 23, 42, 0.5)",display:"flex",gap:12,borderBottom:"1px solid rgba(255,255,255,0.08)"},children:[s.jsxs("div",{style:{flex:1,position:"relative",display:"flex",alignItems:"center"},children:[s.jsx(kh,{style:{width:14,height:14,color:"#94a3b8",position:"absolute",left:10}}),s.jsx("input",{type:"text",placeholder:"Search by ID (e.g. MB-0005)...",value:l,onChange:g=>o(g.target.value),style:{width:"100%",padding:"6px 10px 6px 32px",background:"#030712",border:"1px solid rgba(0, 240, 255, 0.3)",borderRadius:8,color:"#ffffff",fontSize:"0.75rem",fontFamily:"'JetBrains Mono', monospace",outline:"none"}})]}),s.jsxs("div",{style:{display:"flex",alignItems:"center",gap:6,fontSize:"0.72rem",color:"#94a3b8",fontFamily:"'JetBrains Mono', monospace"},children:[s.jsx("span",{children:"SORT:"}),s.jsxs("select",{value:u,onChange:g=>d(g.target.value),style:{background:"#030712",color:"#00f0ff",fontWeight:700,border:"1px solid rgba(0, 240, 255, 0.3)",borderRadius:8,padding:"6px 10px",fontSize:"0.75rem",cursor:"pointer"},children:[s.jsx("option",{value:"gen",children:"Highest Generation"}),s.jsx("option",{value:"battery",children:"Most Battery"}),s.jsx("option",{value:"age",children:"Oldest Age"}),s.jsx("option",{value:"offspring",children:"Most Offspring"})]})]})]}),s.jsx("div",{style:{flex:1,overflowY:"auto",padding:"16px 20px",display:"flex",flexDirection:"column",gap:10},children:f.length===0?s.jsxs("div",{style:{textAlign:"center",padding:"40px",color:"#94a3b8",fontSize:"0.8rem"},children:['No microbots found matching "',l,'".']}):f.map(g=>{const c=g.id===n,m=Math.max(0,Math.min(100,g.battery/g.maxBattery*100));return s.jsxs("div",{style:{background:c?"rgba(0, 240, 255, 0.12)":"rgba(15, 23, 42, 0.7)",border:c?"2px solid #00f0ff":"1px solid rgba(255, 255, 255, 0.1)",borderRadius:12,padding:"12px 16px",display:"flex",alignItems:"center",justifyContent:"space-between",gap:12,transition:"all 0.2s ease"},children:[s.jsxs("div",{style:{display:"flex",alignItems:"center",gap:12},children:[s.jsx("div",{style:{width:18,height:18,borderRadius:"50%",backgroundColor:g.color,border:"2px solid #ffffff",boxShadow:"0 0 8px "+g.color}}),s.jsxs("div",{children:[s.jsxs("div",{style:{display:"flex",alignItems:"center",gap:8},children:[s.jsx("span",{style:{fontFamily:"'JetBrains Mono', monospace",fontWeight:800,fontSize:"0.9rem",color:"#ffffff"},children:g.id}),s.jsxs("span",{style:{fontSize:"0.65rem",background:"rgba(168, 85, 247, 0.2)",color:"#c084fc",border:"1px solid rgba(168, 85, 247, 0.4)",padding:"2px 6px",borderRadius:6,fontWeight:700,fontFamily:"'JetBrains Mono', monospace"},children:["GEN #",g.generation]})]}),s.jsxs("div",{style:{display:"flex",gap:12,fontSize:"0.7rem",color:"#94a3b8",marginTop:4,fontFamily:"'JetBrains Mono', monospace"},children:[s.jsxs("span",{style:{display:"flex",alignItems:"center",gap:4},children:[s.jsx(wc,{style:{width:12,height:12,color:"#00f0ff"}})," ",g.speed.toFixed(1)," px/f"]}),s.jsxs("span",{style:{display:"flex",alignItems:"center",gap:4},children:[s.jsx(dh,{style:{width:12,height:12,color:"#fbbf24"}})," ",g.offspringCount," kids"]}),s.jsxs("span",{children:["State: ",s.jsx("strong",{style:{color:"#34d399"},children:g.behaviorState.replace("_"," ")})]})]})]})]}),s.jsxs("div",{style:{display:"flex",alignItems:"center",gap:16},children:[s.jsxs("div",{style:{width:90},children:[s.jsxs("div",{style:{display:"flex",justifyContent:"space-between",fontSize:"0.65rem",color:"#00f0ff",marginBottom:3,fontFamily:"'JetBrains Mono', monospace"},children:[s.jsx("span",{children:"Charge"}),s.jsxs("span",{children:[m.toFixed(0),"%"]})]}),s.jsx("div",{style:{width:"100%",height:6,background:"#1e293b",borderRadius:3,overflow:"hidden"},children:s.jsx("div",{style:{height:"100%",width:`${m}%`,background:m>40?"#00f0ff":"#fbbf24"}})})]}),s.jsx("button",{onClick:()=>{r(g.id),i()},className:c?"btn btn-cyan":"btn btn-purple",style:{padding:"6px 12px",fontSize:"0.72rem"},children:c?"✓ SELECTED":"SELECT THIS BOT"})]})]},g.id)})})]})})},Oh=({isOpen:e,selectedBot:t,parentBot:n,childBots:r,onSelectBot:i,onClose:l})=>!e||!t?null:s.jsx("div",{style:{position:"fixed",inset:0,zIndex:60,background:"rgba(3, 7, 18, 0.85)",backdropFilter:"blur(10px)",display:"flex",alignItems:"center",justifyContent:"center",padding:"20px"},children:s.jsxs("div",{style:{background:"#0b0f19",border:"2px solid #E040FB",borderRadius:"18px",maxWidth:"680px",width:"100%",padding:"24px",boxShadow:"0 0 40px rgba(224, 64, 251, 0.3)",position:"relative"},children:[s.jsx("button",{onClick:l,style:{position:"absolute",top:16,right:16,background:"transparent",border:"none",color:"#8B949E",cursor:"pointer"},children:s.jsx(ur,{style:{width:20,height:20}})}),s.jsxs("h2",{style:{fontFamily:"'JetBrains Mono', monospace",fontSize:"1.1rem",color:"#ffffff",marginBottom:6,display:"flex",alignItems:"center",gap:10},children:[s.jsx(kc,{style:{color:"#E040FB"}})," MICROBOT FAMILY LINEAGE TREE"]}),s.jsxs("p",{style:{fontSize:"0.75rem",color:"#8B949E",marginBottom:20},children:["Tracking genealogical heritage and offspring mutations for ",s.jsx("strong",{children:t.id})," (Gen #",t.generation,")."]}),s.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:16,alignItems:"center"},children:[s.jsxs("div",{style:{textAlign:"center"},children:[s.jsx("div",{style:{fontSize:"0.68rem",fontFamily:"'JetBrains Mono', monospace",color:"#8B949E",marginBottom:4},children:"PARENT NODE"}),n?s.jsxs("div",{onClick:()=>i(n.id),style:{background:"rgba(15, 26, 36, 0.8)",border:"1px solid rgba(0, 229, 255, 0.4)",borderRadius:10,padding:"8px 16px",cursor:"pointer",display:"inline-flex",alignItems:"center",gap:10},children:[s.jsx("div",{style:{width:12,height:12,borderRadius:"50%",backgroundColor:n.color}}),s.jsxs("span",{style:{fontFamily:"'JetBrains Mono', monospace",fontWeight:800,color:"#00E5FF"},children:[n.id," (Gen #",n.generation,")"]})]}):s.jsx("div",{style:{fontSize:"0.75rem",color:"#546575",fontStyle:"italic"},children:"ORIGIN (Generation 1 Founder)"})]}),s.jsx("div",{style:{color:"#E040FB",fontSize:"1.2rem"},children:"↓"}),s.jsxs("div",{style:{background:"rgba(224, 64, 251, 0.15)",border:"2px solid #E040FB",borderRadius:14,padding:"12px 24px",textAlign:"center",boxShadow:"0 0 20px rgba(224, 64, 251, 0.3)"},children:[s.jsxs("div",{style:{display:"flex",alignItems:"center",justifyContent:"center",gap:10},children:[s.jsx("div",{style:{width:16,height:16,borderRadius:"50%",backgroundColor:t.color,boxShadow:"0 0 10px "+t.color}}),s.jsx("span",{style:{fontFamily:"'JetBrains Mono', monospace",fontWeight:800,fontSize:"1.1rem",color:"#ffffff"},children:t.id})]}),s.jsxs("div",{style:{fontSize:"0.72rem",color:"#E040FB",fontFamily:"'JetBrains Mono', monospace",marginTop:4},children:["Generation #",t.generation," • Speed: ",t.speed.toFixed(1)," px/f • Vision: ",t.visionRadius.toFixed(0),"px"]})]}),s.jsx("div",{style:{color:"#E040FB",fontSize:"1.2rem"},children:"↓"}),s.jsxs("div",{style:{width:"100%"},children:[s.jsxs("div",{style:{fontSize:"0.68rem",fontFamily:"'JetBrains Mono', monospace",color:"#8B949E",textAlign:"center",marginBottom:8},children:["OFFSPRING (",r.length," Active Children)"]}),r.length===0?s.jsx("div",{style:{textAlign:"center",fontSize:"0.75rem",color:"#546575",fontStyle:"italic"},children:"No active offspring produced yet."}):s.jsx("div",{style:{display:"flex",flexWrap:"wrap",gap:10,justifyContent:"center"},children:r.map(o=>s.jsxs("div",{onClick:()=>i(o.id),style:{background:"rgba(15, 26, 36, 0.8)",border:"1px solid rgba(0, 230, 118, 0.4)",borderRadius:10,padding:"8px 12px",cursor:"pointer",display:"flex",alignItems:"center",gap:8},children:[s.jsx("div",{style:{width:10,height:10,borderRadius:"50%",backgroundColor:o.color}}),s.jsx("span",{style:{fontFamily:"'JetBrains Mono', monospace",fontSize:"0.8rem",fontWeight:800,color:"#00E676"},children:o.id}),s.jsx(ch,{style:{width:12,height:12,color:"#8B949E"}})]},o.id))})]})]}),s.jsx("div",{style:{marginTop:24,textAlign:"right"},children:s.jsx("button",{onClick:l,className:"btn-holo btn-holo-magenta",style:{padding:"8px 18px"},children:"CLOSE TREE"})})]})}),Lh=({isOpen:e,onSpawnBlueprint:t,onClose:n})=>{const[r,i]=B.useState("ALPHA-STRAIN-V1"),[l,o]=B.useState(3.2),[u,d]=B.useState(160),[f,g]=B.useState(1.8),[c]=B.useState(.15),[m,x]=B.useState(280),[w,S]=B.useState(5);if(!e)return null;const C=`hsl(${m}, 95%, 55%)`,h=()=>{t({speed:l,maxSpeed:l,visionRadius:u,energyEfficiency:f,turnRate:c,hue:m,color:C},w),n()};return s.jsx("div",{style:{position:"fixed",inset:0,zIndex:60,background:"rgba(3, 7, 18, 0.85)",backdropFilter:"blur(12px)",display:"flex",alignItems:"center",justifyContent:"center",padding:"20px"},children:s.jsxs("div",{style:{background:"#0b0f19",border:"2px solid #00E5FF",borderRadius:"18px",maxWidth:"560px",width:"100%",padding:"24px",boxShadow:"0 0 40px rgba(0, 229, 255, 0.3)",position:"relative"},children:[s.jsx("button",{onClick:n,style:{position:"absolute",top:16,right:16,background:"transparent",border:"none",color:"#8B949E",cursor:"pointer"},children:s.jsx(ur,{style:{width:20,height:20}})}),s.jsxs("h2",{style:{fontFamily:"'JetBrains Mono', monospace",fontSize:"1.1rem",color:"#ffffff",marginBottom:6,display:"flex",alignItems:"center",gap:10},children:[s.jsx(ar,{style:{color:"#00E5FF"}})," BLUEPRINT STUDIO & GENE DESIGNER"]}),s.jsx("p",{style:{fontSize:"0.75rem",color:"#8B949E",marginBottom:20},children:"Craft custom genetic strains and spawn custom artificial life blueprints into the evolution matrix."}),s.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:12},children:[s.jsxs("div",{children:[s.jsx("label",{style:{fontSize:"0.68rem",fontFamily:"'JetBrains Mono', monospace",color:"#8B949E",display:"block",marginBottom:4},children:"STRAIN NAME DESIGNATION"}),s.jsx("input",{type:"text",value:r,onChange:a=>i(a.target.value),style:{width:"100%",background:"#080E14",border:"1px solid rgba(0, 229, 255, 0.3)",borderRadius:8,padding:"8px 12px",color:"#00E5FF",fontFamily:"'JetBrains Mono', monospace",fontWeight:800}})]}),s.jsxs("div",{style:{background:"rgba(15, 26, 36, 0.7)",padding:10,borderRadius:10,border:"1px solid rgba(255,255,255,0.08)"},children:[s.jsxs("div",{style:{display:"flex",justifyContent:"space-between",fontSize:"0.7rem",fontFamily:"'JetBrains Mono', monospace",color:"#8B949E"},children:[s.jsx("span",{children:"Target Velocity (Speed)"}),s.jsxs("span",{style:{color:"#00E5FF",fontWeight:800},children:[l.toFixed(1)," px/f"]})]}),s.jsx("input",{type:"range",min:"1.0",max:"5.0",step:"0.1",value:l,onChange:a=>o(parseFloat(a.target.value)),style:{width:"100%",height:4,marginTop:6}})]}),s.jsxs("div",{style:{background:"rgba(15, 26, 36, 0.7)",padding:10,borderRadius:10,border:"1px solid rgba(255,255,255,0.08)"},children:[s.jsxs("div",{style:{display:"flex",justifyContent:"space-between",fontSize:"0.7rem",fontFamily:"'JetBrains Mono', monospace",color:"#8B949E"},children:[s.jsx("span",{children:"Sensory Vision Radius"}),s.jsxs("span",{style:{color:"#60a5fa",fontWeight:800},children:[u," px"]})]}),s.jsx("input",{type:"range",min:"60",max:"260",step:"5",value:u,onChange:a=>d(parseInt(a.target.value,10)),style:{width:"100%",height:4,marginTop:6}})]}),s.jsxs("div",{style:{background:"rgba(15, 26, 36, 0.7)",padding:10,borderRadius:10,border:"1px solid rgba(255,255,255,0.08)"},children:[s.jsxs("div",{style:{display:"flex",justifyContent:"space-between",fontSize:"0.7rem",fontFamily:"'JetBrains Mono', monospace",color:"#8B949E"},children:[s.jsx("span",{children:"Energy Efficiency Rating"}),s.jsxs("span",{style:{color:"#00E676",fontWeight:800},children:[f.toFixed(1),"x"]})]}),s.jsx("input",{type:"range",min:"0.6",max:"2.5",step:"0.1",value:f,onChange:a=>g(parseFloat(a.target.value)),style:{width:"100%",height:4,marginTop:6}})]}),s.jsxs("div",{style:{display:"grid",gridTemplateColumns:"1fr 1fr",gap:12},children:[s.jsxs("div",{style:{background:"rgba(15, 26, 36, 0.7)",padding:10,borderRadius:10,border:"1px solid rgba(255,255,255,0.08)"},children:[s.jsxs("div",{style:{display:"flex",justifyContent:"space-between",fontSize:"0.68rem",fontFamily:"'JetBrains Mono', monospace",color:"#8B949E"},children:[s.jsx("span",{children:"Pigment Hue"}),s.jsxs("span",{style:{color:C,fontWeight:800},children:[m,"°"]})]}),s.jsx("input",{type:"range",min:"0",max:"360",step:"5",value:m,onChange:a=>x(parseInt(a.target.value,10)),style:{width:"100%",height:4,marginTop:6}})]}),s.jsxs("div",{style:{background:"rgba(15, 26, 36, 0.7)",padding:10,borderRadius:10,border:"1px solid rgba(255,255,255,0.08)"},children:[s.jsxs("div",{style:{display:"flex",justifyContent:"space-between",fontSize:"0.68rem",fontFamily:"'JetBrains Mono', monospace",color:"#8B949E"},children:[s.jsx("span",{children:"Spawn Count"}),s.jsxs("span",{style:{color:"#E040FB",fontWeight:800},children:[w," Bots"]})]}),s.jsx("input",{type:"range",min:"1",max:"25",step:"1",value:w,onChange:a=>S(parseInt(a.target.value,10)),style:{width:"100%",height:4,marginTop:6}})]})]})]}),s.jsxs("div",{style:{marginTop:24,display:"flex",gap:10,justifyContent:"flex-end"},children:[s.jsx("button",{onClick:n,className:"btn-holo btn-holo-dark",children:"CANCEL"}),s.jsxs("button",{onClick:h,className:"btn-holo btn-holo-cyan",style:{padding:"8px 18px"},children:[s.jsx(Yl,{style:{width:14,height:14}})," SPAWN STRAIN BLUEPRINT"]})]})]})})},Dh=({bots:e})=>{const t=B.useRef(null);B.useEffect(()=>{const r=t.current;if(!r)return;const i=r.getContext("2d");if(!i)return;let l,o=0;const u=()=>{o+=.015,i.fillStyle="#060A10",i.fillRect(0,0,r.width,r.height);const d=r.width/2,f=r.height/2,g=80;i.strokeStyle="rgba(0, 229, 255, 0.15)",i.lineWidth=1,e.slice(0,40).forEach((c,m)=>{const x=m/Math.min(40,e.length)*Math.PI*2+o,w=c.hue/360*Math.PI,S=g*Math.sin(w)*Math.cos(x),C=g*Math.sin(w)*Math.sin(x),a=180/(180+g*Math.cos(w)),p=d+S*a,v=f+C*a;i.fillStyle=c.color||"#00E5FF",i.beginPath(),i.arc(p,v,Math.max(2,4*a),0,Math.PI*2),i.fill()}),l=requestAnimationFrame(u)};return u(),()=>cancelAnimationFrame(l)},[e]);const n=()=>{const r=t.current;if(!r)return;const i=r.toDataURL("image/png"),l=document.createElement("a");l.href=i,l.download=`genetic_constellation_${Date.now()}.png`,l.click()};return s.jsxs("div",{style:{background:"rgba(11, 15, 25, 0.85)",border:"1px solid rgba(0, 229, 255, 0.3)",borderRadius:12,padding:8},children:[s.jsxs("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",marginBottom:4},children:[s.jsx("span",{style:{fontSize:"0.65rem",fontFamily:"'JetBrains Mono', monospace",color:"#00E5FF",fontWeight:800},children:"3D GENETIC CONSTELLATION MAP"}),s.jsx("button",{onClick:n,style:{background:"transparent",border:"none",color:"#00E5FF",fontSize:"0.6rem",cursor:"pointer"},title:"Export 3D Snapshot PNG",children:"📸 PNG"})]}),s.jsx("canvas",{ref:t,width:180,height:130,style:{borderRadius:8}})]})},Ah=()=>{const[e,t]=B.useState(ih),n=B.useRef(null);n.current||(n.current=new rh(1200,800,{...e,isPaused:!1}));const r=n.current,[i,l]=B.useState(()=>r.selectRandomMicrobot()),[o,u]=B.useState(()=>r.getStats()),[d,f]=B.useState(!1),[g,c]=B.useState(!1),[m,x]=B.useState(!1),[w,S]=B.useState(!1);B.useEffect(()=>{const T=()=>{!document.hidden&&r&&r.update(.01)};return document.addEventListener("visibilitychange",T),()=>document.removeEventListener("visibilitychange",T)},[r]),B.useEffect(()=>{const T=setInterval(()=>{u(r.getStats());const L=r.getSelectedMicrobot();if(!L&&r.microbots.length>0){const G=r.selectRandomMicrobot();l(G)}else L&&l({...L})},80);return()=>clearInterval(T)},[r]);const C=T=>{t(L=>{const G={...L,...T};return lh(G),r&&(r.config=G,"hazardCount"in T&&r.updateHazardsCount()),G})},h=()=>{if(r){r.resetSimulation();const T=r.selectRandomMicrobot();l(T?{...T}:null),u(r.getStats())}},a=()=>{r&&e.isPaused&&(r.update(1),u(r.getStats()))},p=T=>{if(r)if(T){r.selectedMicrobotId=T;const L=r.getSelectedMicrobot();l(L?{...L}:null)}else r.selectedMicrobotId=null,l(null)},v=()=>{if(r){const T=r.selectRandomMicrobot();l(T?{...T}:null)}},y=()=>{r&&r.spawnMultipleFood(20)},j=()=>{r&&(r.spawnMultipleBots(10),i||v())},k=()=>{r&&(r.spawnHazard(),t(T=>({...T,hazardCount:r.hazards.length})))},M=(T,L)=>{if(r){for(let G=0;G<L;G++){const Ee=r.spawnMicrobot();r.overrideMicrobotGenes(Ee.id,T)}u(r.getStats())}},z=(T,L)=>{if(r){r.overrideMicrobotGenes(T,L);const G=r.getSelectedMicrobot();G&&l({...G})}},I=()=>{if(!r)return;const T=`Time (s),Population,Avg Speed,Avg Vision,Total Births,Total Deaths,Predators,Season
`,L=o.historyTimeline.map(N=>`${N.time},${N.population},${N.avgSpeed.toFixed(2)},${N.avgVision.toFixed(1)},${o.totalBirths},${o.totalDeaths},${o.predatorCount},${o.currentSeason}`).join(`
`),G=new Blob([T+L],{type:"text/csv"}),Ee=URL.createObjectURL(G),R=document.createElement("a");R.href=Ee,R.download=`microbot_telemetry_${new Date().toISOString().slice(0,10)}.csv`,R.click(),URL.revokeObjectURL(Ee)},W=()=>{const T="data:text/json;charset=utf-8,"+encodeURIComponent(JSON.stringify(e,null,2)),L=document.createElement("a");L.href=T,L.download=`microbot_preset_config_${new Date().toISOString().slice(0,10)}.json`,L.click()},ge=T=>{C(T),alert("Simulation Preset Loaded Successfully!")},Q=i&&r?r.getLineageTree(i.id):{parent:null,current:null,children:[]};return s.jsxs("div",{className:"app-container",children:[s.jsx(Bh,{isOpen:g,microbots:r.microbots,selectedBotId:i?i.id:null,onSelectBot:T=>p(T),onClose:()=>c(!1)}),s.jsx(_h,{isOpen:d,onClose:()=>f(!1)}),s.jsx(Oh,{isOpen:m,selectedBot:Q.current,parentBot:Q.parent,childBots:Q.children,onSelectBot:T=>{p(T)},onClose:()=>x(!1)}),s.jsx(Lh,{isOpen:w,onSpawnBlueprint:M,onClose:()=>S(!1)}),s.jsx(Th,{config:e,stats:o,onUpdateConfig:C,onReset:h,onStep:a,onOpenRosterMenu:()=>c(!0),onOpenGuide:()=>f(!0),onOpenBlueprintStudio:()=>S(!0),onSpawnFood:y,onSpawnBots:j,onSpawnHazard:k,onTriggerMeteor:()=>r==null?void 0:r.triggerMeteorStrike(),onTriggerVoidRift:()=>r==null?void 0:r.triggerVoidRift(),onTriggerOutbreak:()=>r==null?void 0:r.triggerOutbreak(),onExportTelemetryCSV:I,onExportConfigJSON:W,onImportConfigJSON:ge}),s.jsxs("main",{className:"workspace-grid",children:[s.jsxs("div",{className:"sidebar-col",children:[s.jsx(Ph,{bot:i,stats:o,onClose:()=>p(null),onOverrideGenes:z,onOpenLineageModal:()=>x(!0)}),s.jsx(Nh,{config:e,onUpdateConfig:C}),s.jsx(Dh,{bots:(r==null?void 0:r.microbots)||[]}),s.jsx(Ih,{stats:o})]}),s.jsxs("div",{className:"main-viewport-col",children:[e.isSplitView?s.jsxs("div",{style:{display:"grid",gridTemplateColumns:"1fr 1fr",gap:12,height:"100%"},children:[s.jsx(tl,{engine:r,onSelectBot:p,onSelectRandomBot:v,onUpdateConfig:C}),s.jsx(tl,{engine:r,onSelectBot:p,onSelectRandomBot:v,onUpdateConfig:C})]}):s.jsx(tl,{engine:r,onSelectBot:p,onSelectRandomBot:v,onUpdateConfig:C}),s.jsx(zh,{stats:o})]})]})]})};nl.createRoot(document.getElementById("root")).render(s.jsx(ma.StrictMode,{children:s.jsx(Ah,{})}));</script>
<style rel="stylesheet" crossorigin>:root{--bg-void: #080E14;--panel-glass: rgba(15, 26, 36, .75);--panel-border: rgba(0, 229, 255, .22);--panel-glow: rgba(0, 229, 255, .15);--cyan-glow: #00E5FF;--magenta-glow: #E040FB;--orange-hazard: #FF6B00;--bio-green: #00E676;--text-primary: #F0F6FC;--text-muted: #8B949E;--text-dim: #546575}*{box-sizing:border-box;margin:0;padding:0}body{font-family:Inter,system-ui,-apple-system,sans-serif;background-color:var(--bg-void);color:var(--text-primary);min-height:100vh;overflow:hidden;-webkit-user-select:none;user-select:none}.app-container{display:flex;flex-direction:column;height:100vh;width:100vw;overflow:hidden;background:radial-gradient(circle at 50% 30%,#0f1e2d99,#080e14f2 70%),radial-gradient(circle at 80% 80%,rgba(224,64,251,.05) 0%,transparent 50%),radial-gradient(circle at 20% 80%,rgba(0,229,255,.05) 0%,transparent 50%);position:relative}.top-nav-bar{display:flex;align-items:center;justify-content:space-between;padding:10px 18px;z-index:30;gap:12px}.brand-badge{display:flex;align-items:center;gap:10px}.brand-icon-box{width:36px;height:36px;border-radius:10px;background:linear-gradient(135deg,#00e5ffcc,#e040fbcc);display:flex;align-items:center;justify-content:center;color:#fff;box-shadow:0 0 15px #00e5ff66}.brand-title{font-family:JetBrains Mono,monospace;font-size:1rem;font-weight:800;letter-spacing:.05em;color:#fff;text-shadow:0 0 10px rgba(0,229,255,.4)}.brand-title span{color:var(--cyan-glow)}.brand-sub{font-size:.68rem;color:var(--text-muted);font-family:Inter,sans-serif}.glass-deck-pill{background:#0f1a24cc;border:1px solid rgba(0,229,255,.28);-webkit-backdrop-filter:blur(16px);backdrop-filter:blur(16px);border-radius:12px;padding:6px 12px;display:flex;align-items:center;gap:10px;box-shadow:0 8px 24px #00000073,inset 0 1px #ffffff0f;transition:border-color .2s ease}.glass-deck-pill:hover{border-color:#00e5ff66}.btn-holo{display:inline-flex;align-items:center;gap:6px;padding:6px 12px;border-radius:8px;font-family:JetBrains Mono,monospace;font-size:.72rem;font-weight:700;cursor:pointer;border:1px solid transparent;transition:all .2s ease;text-transform:uppercase}.btn-holo-cyan{background:#00e5ff1f;border-color:#00e5ff59;color:var(--cyan-glow)}.btn-holo-cyan:hover{background:#00e5ff40;box-shadow:0 0 14px #00e5ff66}.btn-holo-magenta{background:#e040fb1f;border-color:#e040fb59;color:var(--magenta-glow)}.btn-holo-magenta:hover{background:#e040fb40;box-shadow:0 0 14px #e040fb66}.btn-holo-green{background:#00e6761f;border-color:#00e67659;color:var(--bio-green)}.btn-holo-green:hover{background:#00e67640;box-shadow:0 0 14px #00e67666}.btn-holo-orange{background:#ff6b001f;border-color:#ff6b0059;color:var(--orange-hazard)}.btn-holo-orange:hover{background:#ff6b0040;box-shadow:0 0 14px #ff6b0066}.btn-holo-dark{background:#ffffff0d;border-color:#ffffff1f;color:var(--text-muted)}.btn-holo-dark:hover{background:#ffffff1f;color:#fff}@keyframes pulse-glow{0%{box-shadow:0 0 10px #00e5ff66}50%{box-shadow:0 0 25px #00e5ffcc}to{box-shadow:0 0 10px #00e5ff66}}.glass-panel{background:#0f1a24d1;backdrop-filter:blur(18px);-webkit-backdrop-filter:blur(18px);border:1px solid rgba(0,229,255,.3);box-shadow:0 8px 32px #0000008c,inset 0 1px #ffffff0a;will-change:transform;transform:translateZ(0);position:relative;transition:border-color .25s ease,box-shadow .25s ease}.glass-panel:hover{border-color:#00e5ff73;box-shadow:0 8px 32px #0000008c,0 0 12px #00e5ff1f}.workspace-grid{display:grid;grid-template-columns:320px 1fr;grid-template-rows:1fr auto;gap:12px;padding:0 16px 16px;flex:1;overflow:hidden}.sidebar-col{display:flex;flex-direction:column;gap:12px;overflow-y:auto;padding-right:4px}.main-viewport-col{position:relative;display:flex;flex-direction:column;gap:12px;overflow:hidden}.canvas-viewport-card{flex:1;position:relative;border-radius:16px;border:1px solid rgba(0,229,255,.25);overflow:hidden;background:#04080d;box-shadow:inset 0 0 40px #000000e6,0 0 25px #00e5ff1a}input[type=range]{accent-color:var(--cyan-glow);cursor:pointer}.analytics-cube-container{position:absolute;bottom:16px;right:16px;z-index:25;width:220px;height:180px;perspective:900px;pointer-events:auto}.cube-card-3d{width:100%;height:100%;background:#0f1a24d9;border:1px solid rgba(0,229,255,.35);border-radius:14px;-webkit-backdrop-filter:blur(18px);backdrop-filter:blur(18px);transform:rotateY(-8deg) rotateX(6deg);transition:transform .3s ease,box-shadow .3s ease;box-shadow:-10px 15px 25px #0009,0 0 20px #00e5ff33;padding:10px;display:grid;grid-template-columns:1fr 1fr;grid-template-rows:1fr 1fr;gap:6px}.cube-card-3d:hover{transform:rotateY(0) rotateX(0) scale(1.03);box-shadow:0 15px 35px #000c,0 0 30px #00e5ff59}::-webkit-scrollbar{width:6px;height:6px}::-webkit-scrollbar-track{background:#080e1466}::-webkit-scrollbar-thumb{background:#00e5ff40;border-radius:3px}::-webkit-scrollbar-thumb:hover{background:#00e5ff80}</style>
</head>
<body>
<div id="root"></div>
</body>
</html>