expxagents 0.7.3 → 0.7.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,344 @@
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/browserAll-C8fHaPkt.js","assets/webworkerAll-DW-cy7bD.js","assets/WebGPURenderer-BYaiziZY.js","assets/BufferResource-CGHomcGM.js","assets/RenderTargetSystem-CV6rXoGR.js","assets/WebGLRenderer-C-OGxDx9.js","assets/CanvasRenderer-IX_LP94-.js"])))=>i.map(i=>d[i]);
2
+ (function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const o of document.querySelectorAll('link[rel="modulepreload"]'))s(o);new MutationObserver(o=>{for(const f of o)if(f.type==="childList")for(const d of f.addedNodes)d.tagName==="LINK"&&d.rel==="modulepreload"&&s(d)}).observe(document,{childList:!0,subtree:!0});function n(o){const f={};return o.integrity&&(f.integrity=o.integrity),o.referrerPolicy&&(f.referrerPolicy=o.referrerPolicy),o.crossOrigin==="use-credentials"?f.credentials="include":o.crossOrigin==="anonymous"?f.credentials="omit":f.credentials="same-origin",f}function s(o){if(o.ep)return;o.ep=!0;const f=n(o);fetch(o.href,f)}})();function ip(i){return i&&i.__esModule&&Object.prototype.hasOwnProperty.call(i,"default")?i.default:i}var $p={exports:{}},dh={};/**
3
+ * @license React
4
+ * react-jsx-runtime.production.js
5
+ *
6
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
7
+ *
8
+ * This source code is licensed under the MIT license found in the
9
+ * LICENSE file in the root directory of this source tree.
10
+ */var G0;function jS(){if(G0)return dh;G0=1;var i=Symbol.for("react.transitional.element"),t=Symbol.for("react.fragment");function n(s,o,f){var d=null;if(f!==void 0&&(d=""+f),o.key!==void 0&&(d=""+o.key),"key"in o){f={};for(var m in o)m!=="key"&&(f[m]=o[m])}else f=o;return o=f.ref,{$$typeof:i,type:s,key:d,ref:o!==void 0?o:null,props:f}}return dh.Fragment=t,dh.jsx=n,dh.jsxs=n,dh}var j0;function qS(){return j0||(j0=1,$p.exports=jS()),$p.exports}var L=qS(),ty={exports:{}},Lt={};/**
11
+ * @license React
12
+ * react.production.js
13
+ *
14
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
15
+ *
16
+ * This source code is licensed under the MIT license found in the
17
+ * LICENSE file in the root directory of this source tree.
18
+ */var q0;function YS(){if(q0)return Lt;q0=1;var i=Symbol.for("react.transitional.element"),t=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),s=Symbol.for("react.strict_mode"),o=Symbol.for("react.profiler"),f=Symbol.for("react.consumer"),d=Symbol.for("react.context"),m=Symbol.for("react.forward_ref"),g=Symbol.for("react.suspense"),v=Symbol.for("react.memo"),S=Symbol.for("react.lazy"),b=Symbol.for("react.activity"),A=Symbol.iterator;function E(j){return j===null||typeof j!="object"?null:(j=A&&j[A]||j["@@iterator"],typeof j=="function"?j:null)}var R={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},D=Object.assign,M={};function O(j,I,st){this.props=j,this.context=I,this.refs=M,this.updater=st||R}O.prototype.isReactComponent={},O.prototype.setState=function(j,I){if(typeof j!="object"&&typeof j!="function"&&j!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,j,I,"setState")},O.prototype.forceUpdate=function(j){this.updater.enqueueForceUpdate(this,j,"forceUpdate")};function U(){}U.prototype=O.prototype;function B(j,I,st){this.props=j,this.context=I,this.refs=M,this.updater=st||R}var G=B.prototype=new U;G.constructor=B,D(G,O.prototype),G.isPureReactComponent=!0;var Z=Array.isArray;function V(){}var K={H:null,A:null,T:null,S:null},pt=Object.prototype.hasOwnProperty;function ct(j,I,st){var yt=st.ref;return{$$typeof:i,type:j,key:I,ref:yt!==void 0?yt:null,props:st}}function ht(j,I){return ct(j.type,I,j.props)}function dt(j){return typeof j=="object"&&j!==null&&j.$$typeof===i}function vt(j){var I={"=":"=0",":":"=2"};return"$"+j.replace(/[=:]/g,function(st){return I[st]})}var _t=/\/+/g;function xt(j,I){return typeof j=="object"&&j!==null&&j.key!=null?vt(""+j.key):I.toString(36)}function Dt(j){switch(j.status){case"fulfilled":return j.value;case"rejected":throw j.reason;default:switch(typeof j.status=="string"?j.then(V,V):(j.status="pending",j.then(function(I){j.status==="pending"&&(j.status="fulfilled",j.value=I)},function(I){j.status==="pending"&&(j.status="rejected",j.reason=I)})),j.status){case"fulfilled":return j.value;case"rejected":throw j.reason}}throw j}function w(j,I,st,yt,Tt){var Ot=typeof j;(Ot==="undefined"||Ot==="boolean")&&(j=null);var Ut=!1;if(j===null)Ut=!0;else switch(Ot){case"bigint":case"string":case"number":Ut=!0;break;case"object":switch(j.$$typeof){case i:case t:Ut=!0;break;case S:return Ut=j._init,w(Ut(j._payload),I,st,yt,Tt)}}if(Ut)return Tt=Tt(j),Ut=yt===""?"."+xt(j,0):yt,Z(Tt)?(st="",Ut!=null&&(st=Ut.replace(_t,"$&/")+"/"),w(Tt,I,st,"",function(ra){return ra})):Tt!=null&&(dt(Tt)&&(Tt=ht(Tt,st+(Tt.key==null||j&&j.key===Tt.key?"":(""+Tt.key).replace(_t,"$&/")+"/")+Ut)),I.push(Tt)),1;Ut=0;var re=yt===""?".":yt+":";if(Z(j))for(var ue=0;ue<j.length;ue++)yt=j[ue],Ot=re+xt(yt,ue),Ut+=w(yt,I,st,Ot,Tt);else if(ue=E(j),typeof ue=="function")for(j=ue.call(j),ue=0;!(yt=j.next()).done;)yt=yt.value,Ot=re+xt(yt,ue++),Ut+=w(yt,I,st,Ot,Tt);else if(Ot==="object"){if(typeof j.then=="function")return w(Dt(j),I,st,yt,Tt);throw I=String(j),Error("Objects are not valid as a React child (found: "+(I==="[object Object]"?"object with keys {"+Object.keys(j).join(", ")+"}":I)+"). If you meant to render a collection of children, use an array instead.")}return Ut}function H(j,I,st){if(j==null)return j;var yt=[],Tt=0;return w(j,yt,"","",function(Ot){return I.call(st,Ot,Tt++)}),yt}function at(j){if(j._status===-1){var I=j._result;I=I(),I.then(function(st){(j._status===0||j._status===-1)&&(j._status=1,j._result=st)},function(st){(j._status===0||j._status===-1)&&(j._status=2,j._result=st)}),j._status===-1&&(j._status=0,j._result=I)}if(j._status===1)return j._result.default;throw j._result}var et=typeof reportError=="function"?reportError:function(j){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var I=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof j=="object"&&j!==null&&typeof j.message=="string"?String(j.message):String(j),error:j});if(!window.dispatchEvent(I))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",j);return}console.error(j)},ft={map:H,forEach:function(j,I,st){H(j,function(){I.apply(this,arguments)},st)},count:function(j){var I=0;return H(j,function(){I++}),I},toArray:function(j){return H(j,function(I){return I})||[]},only:function(j){if(!dt(j))throw Error("React.Children.only expected to receive a single React element child.");return j}};return Lt.Activity=b,Lt.Children=ft,Lt.Component=O,Lt.Fragment=n,Lt.Profiler=o,Lt.PureComponent=B,Lt.StrictMode=s,Lt.Suspense=g,Lt.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=K,Lt.__COMPILER_RUNTIME={__proto__:null,c:function(j){return K.H.useMemoCache(j)}},Lt.cache=function(j){return function(){return j.apply(null,arguments)}},Lt.cacheSignal=function(){return null},Lt.cloneElement=function(j,I,st){if(j==null)throw Error("The argument must be a React element, but you passed "+j+".");var yt=D({},j.props),Tt=j.key;if(I!=null)for(Ot in I.key!==void 0&&(Tt=""+I.key),I)!pt.call(I,Ot)||Ot==="key"||Ot==="__self"||Ot==="__source"||Ot==="ref"&&I.ref===void 0||(yt[Ot]=I[Ot]);var Ot=arguments.length-2;if(Ot===1)yt.children=st;else if(1<Ot){for(var Ut=Array(Ot),re=0;re<Ot;re++)Ut[re]=arguments[re+2];yt.children=Ut}return ct(j.type,Tt,yt)},Lt.createContext=function(j){return j={$$typeof:d,_currentValue:j,_currentValue2:j,_threadCount:0,Provider:null,Consumer:null},j.Provider=j,j.Consumer={$$typeof:f,_context:j},j},Lt.createElement=function(j,I,st){var yt,Tt={},Ot=null;if(I!=null)for(yt in I.key!==void 0&&(Ot=""+I.key),I)pt.call(I,yt)&&yt!=="key"&&yt!=="__self"&&yt!=="__source"&&(Tt[yt]=I[yt]);var Ut=arguments.length-2;if(Ut===1)Tt.children=st;else if(1<Ut){for(var re=Array(Ut),ue=0;ue<Ut;ue++)re[ue]=arguments[ue+2];Tt.children=re}if(j&&j.defaultProps)for(yt in Ut=j.defaultProps,Ut)Tt[yt]===void 0&&(Tt[yt]=Ut[yt]);return ct(j,Ot,Tt)},Lt.createRef=function(){return{current:null}},Lt.forwardRef=function(j){return{$$typeof:m,render:j}},Lt.isValidElement=dt,Lt.lazy=function(j){return{$$typeof:S,_payload:{_status:-1,_result:j},_init:at}},Lt.memo=function(j,I){return{$$typeof:v,type:j,compare:I===void 0?null:I}},Lt.startTransition=function(j){var I=K.T,st={};K.T=st;try{var yt=j(),Tt=K.S;Tt!==null&&Tt(st,yt),typeof yt=="object"&&yt!==null&&typeof yt.then=="function"&&yt.then(V,et)}catch(Ot){et(Ot)}finally{I!==null&&st.types!==null&&(I.types=st.types),K.T=I}},Lt.unstable_useCacheRefresh=function(){return K.H.useCacheRefresh()},Lt.use=function(j){return K.H.use(j)},Lt.useActionState=function(j,I,st){return K.H.useActionState(j,I,st)},Lt.useCallback=function(j,I){return K.H.useCallback(j,I)},Lt.useContext=function(j){return K.H.useContext(j)},Lt.useDebugValue=function(){},Lt.useDeferredValue=function(j,I){return K.H.useDeferredValue(j,I)},Lt.useEffect=function(j,I){return K.H.useEffect(j,I)},Lt.useEffectEvent=function(j){return K.H.useEffectEvent(j)},Lt.useId=function(){return K.H.useId()},Lt.useImperativeHandle=function(j,I,st){return K.H.useImperativeHandle(j,I,st)},Lt.useInsertionEffect=function(j,I){return K.H.useInsertionEffect(j,I)},Lt.useLayoutEffect=function(j,I){return K.H.useLayoutEffect(j,I)},Lt.useMemo=function(j,I){return K.H.useMemo(j,I)},Lt.useOptimistic=function(j,I){return K.H.useOptimistic(j,I)},Lt.useReducer=function(j,I,st){return K.H.useReducer(j,I,st)},Lt.useRef=function(j){return K.H.useRef(j)},Lt.useState=function(j){return K.H.useState(j)},Lt.useSyncExternalStore=function(j,I,st){return K.H.useSyncExternalStore(j,I,st)},Lt.useTransition=function(){return K.H.useTransition()},Lt.version="19.2.4",Lt}var Y0;function lp(){return Y0||(Y0=1,ty.exports=YS()),ty.exports}var X=lp();const Cm=ip(X);var ey={exports:{}},mh={},ny={exports:{}},ay={};/**
19
+ * @license React
20
+ * scheduler.production.js
21
+ *
22
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
23
+ *
24
+ * This source code is licensed under the MIT license found in the
25
+ * LICENSE file in the root directory of this source tree.
26
+ */var L0;function LS(){return L0||(L0=1,(function(i){function t(w,H){var at=w.length;w.push(H);t:for(;0<at;){var et=at-1>>>1,ft=w[et];if(0<o(ft,H))w[et]=H,w[at]=ft,at=et;else break t}}function n(w){return w.length===0?null:w[0]}function s(w){if(w.length===0)return null;var H=w[0],at=w.pop();if(at!==H){w[0]=at;t:for(var et=0,ft=w.length,j=ft>>>1;et<j;){var I=2*(et+1)-1,st=w[I],yt=I+1,Tt=w[yt];if(0>o(st,at))yt<ft&&0>o(Tt,st)?(w[et]=Tt,w[yt]=at,et=yt):(w[et]=st,w[I]=at,et=I);else if(yt<ft&&0>o(Tt,at))w[et]=Tt,w[yt]=at,et=yt;else break t}}return H}function o(w,H){var at=w.sortIndex-H.sortIndex;return at!==0?at:w.id-H.id}if(i.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var f=performance;i.unstable_now=function(){return f.now()}}else{var d=Date,m=d.now();i.unstable_now=function(){return d.now()-m}}var g=[],v=[],S=1,b=null,A=3,E=!1,R=!1,D=!1,M=!1,O=typeof setTimeout=="function"?setTimeout:null,U=typeof clearTimeout=="function"?clearTimeout:null,B=typeof setImmediate<"u"?setImmediate:null;function G(w){for(var H=n(v);H!==null;){if(H.callback===null)s(v);else if(H.startTime<=w)s(v),H.sortIndex=H.expirationTime,t(g,H);else break;H=n(v)}}function Z(w){if(D=!1,G(w),!R)if(n(g)!==null)R=!0,V||(V=!0,vt());else{var H=n(v);H!==null&&Dt(Z,H.startTime-w)}}var V=!1,K=-1,pt=5,ct=-1;function ht(){return M?!0:!(i.unstable_now()-ct<pt)}function dt(){if(M=!1,V){var w=i.unstable_now();ct=w;var H=!0;try{t:{R=!1,D&&(D=!1,U(K),K=-1),E=!0;var at=A;try{e:{for(G(w),b=n(g);b!==null&&!(b.expirationTime>w&&ht());){var et=b.callback;if(typeof et=="function"){b.callback=null,A=b.priorityLevel;var ft=et(b.expirationTime<=w);if(w=i.unstable_now(),typeof ft=="function"){b.callback=ft,G(w),H=!0;break e}b===n(g)&&s(g),G(w)}else s(g);b=n(g)}if(b!==null)H=!0;else{var j=n(v);j!==null&&Dt(Z,j.startTime-w),H=!1}}break t}finally{b=null,A=at,E=!1}H=void 0}}finally{H?vt():V=!1}}}var vt;if(typeof B=="function")vt=function(){B(dt)};else if(typeof MessageChannel<"u"){var _t=new MessageChannel,xt=_t.port2;_t.port1.onmessage=dt,vt=function(){xt.postMessage(null)}}else vt=function(){O(dt,0)};function Dt(w,H){K=O(function(){w(i.unstable_now())},H)}i.unstable_IdlePriority=5,i.unstable_ImmediatePriority=1,i.unstable_LowPriority=4,i.unstable_NormalPriority=3,i.unstable_Profiling=null,i.unstable_UserBlockingPriority=2,i.unstable_cancelCallback=function(w){w.callback=null},i.unstable_forceFrameRate=function(w){0>w||125<w?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):pt=0<w?Math.floor(1e3/w):5},i.unstable_getCurrentPriorityLevel=function(){return A},i.unstable_next=function(w){switch(A){case 1:case 2:case 3:var H=3;break;default:H=A}var at=A;A=H;try{return w()}finally{A=at}},i.unstable_requestPaint=function(){M=!0},i.unstable_runWithPriority=function(w,H){switch(w){case 1:case 2:case 3:case 4:case 5:break;default:w=3}var at=A;A=w;try{return H()}finally{A=at}},i.unstable_scheduleCallback=function(w,H,at){var et=i.unstable_now();switch(typeof at=="object"&&at!==null?(at=at.delay,at=typeof at=="number"&&0<at?et+at:et):at=et,w){case 1:var ft=-1;break;case 2:ft=250;break;case 5:ft=1073741823;break;case 4:ft=1e4;break;default:ft=5e3}return ft=at+ft,w={id:S++,callback:H,priorityLevel:w,startTime:at,expirationTime:ft,sortIndex:-1},at>et?(w.sortIndex=at,t(v,w),n(g)===null&&w===n(v)&&(D?(U(K),K=-1):D=!0,Dt(Z,at-et))):(w.sortIndex=ft,t(g,w),R||E||(R=!0,V||(V=!0,vt()))),w},i.unstable_shouldYield=ht,i.unstable_wrapCallback=function(w){var H=A;return function(){var at=A;A=H;try{return w.apply(this,arguments)}finally{A=at}}}})(ay)),ay}var X0;function XS(){return X0||(X0=1,ny.exports=LS()),ny.exports}var iy={exports:{}},ia={};/**
27
+ * @license React
28
+ * react-dom.production.js
29
+ *
30
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
31
+ *
32
+ * This source code is licensed under the MIT license found in the
33
+ * LICENSE file in the root directory of this source tree.
34
+ */var V0;function VS(){if(V0)return ia;V0=1;var i=lp();function t(g){var v="https://react.dev/errors/"+g;if(1<arguments.length){v+="?args[]="+encodeURIComponent(arguments[1]);for(var S=2;S<arguments.length;S++)v+="&args[]="+encodeURIComponent(arguments[S])}return"Minified React error #"+g+"; visit "+v+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function n(){}var s={d:{f:n,r:function(){throw Error(t(522))},D:n,C:n,L:n,m:n,X:n,S:n,M:n},p:0,findDOMNode:null},o=Symbol.for("react.portal");function f(g,v,S){var b=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:o,key:b==null?null:""+b,children:g,containerInfo:v,implementation:S}}var d=i.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function m(g,v){if(g==="font")return"";if(typeof v=="string")return v==="use-credentials"?v:""}return ia.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=s,ia.createPortal=function(g,v){var S=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!v||v.nodeType!==1&&v.nodeType!==9&&v.nodeType!==11)throw Error(t(299));return f(g,v,null,S)},ia.flushSync=function(g){var v=d.T,S=s.p;try{if(d.T=null,s.p=2,g)return g()}finally{d.T=v,s.p=S,s.d.f()}},ia.preconnect=function(g,v){typeof g=="string"&&(v?(v=v.crossOrigin,v=typeof v=="string"?v==="use-credentials"?v:"":void 0):v=null,s.d.C(g,v))},ia.prefetchDNS=function(g){typeof g=="string"&&s.d.D(g)},ia.preinit=function(g,v){if(typeof g=="string"&&v&&typeof v.as=="string"){var S=v.as,b=m(S,v.crossOrigin),A=typeof v.integrity=="string"?v.integrity:void 0,E=typeof v.fetchPriority=="string"?v.fetchPriority:void 0;S==="style"?s.d.S(g,typeof v.precedence=="string"?v.precedence:void 0,{crossOrigin:b,integrity:A,fetchPriority:E}):S==="script"&&s.d.X(g,{crossOrigin:b,integrity:A,fetchPriority:E,nonce:typeof v.nonce=="string"?v.nonce:void 0})}},ia.preinitModule=function(g,v){if(typeof g=="string")if(typeof v=="object"&&v!==null){if(v.as==null||v.as==="script"){var S=m(v.as,v.crossOrigin);s.d.M(g,{crossOrigin:S,integrity:typeof v.integrity=="string"?v.integrity:void 0,nonce:typeof v.nonce=="string"?v.nonce:void 0})}}else v==null&&s.d.M(g)},ia.preload=function(g,v){if(typeof g=="string"&&typeof v=="object"&&v!==null&&typeof v.as=="string"){var S=v.as,b=m(S,v.crossOrigin);s.d.L(g,S,{crossOrigin:b,integrity:typeof v.integrity=="string"?v.integrity:void 0,nonce:typeof v.nonce=="string"?v.nonce:void 0,type:typeof v.type=="string"?v.type:void 0,fetchPriority:typeof v.fetchPriority=="string"?v.fetchPriority:void 0,referrerPolicy:typeof v.referrerPolicy=="string"?v.referrerPolicy:void 0,imageSrcSet:typeof v.imageSrcSet=="string"?v.imageSrcSet:void 0,imageSizes:typeof v.imageSizes=="string"?v.imageSizes:void 0,media:typeof v.media=="string"?v.media:void 0})}},ia.preloadModule=function(g,v){if(typeof g=="string")if(v){var S=m(v.as,v.crossOrigin);s.d.m(g,{as:typeof v.as=="string"&&v.as!=="script"?v.as:void 0,crossOrigin:S,integrity:typeof v.integrity=="string"?v.integrity:void 0})}else s.d.m(g)},ia.requestFormReset=function(g){s.d.r(g)},ia.unstable_batchedUpdates=function(g,v){return g(v)},ia.useFormState=function(g,v,S){return d.H.useFormState(g,v,S)},ia.useFormStatus=function(){return d.H.useHostTransitionStatus()},ia.version="19.2.4",ia}var Q0;function QS(){if(Q0)return iy.exports;Q0=1;function i(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(i)}catch(t){console.error(t)}}return i(),iy.exports=VS(),iy.exports}/**
35
+ * @license React
36
+ * react-dom-client.production.js
37
+ *
38
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
39
+ *
40
+ * This source code is licensed under the MIT license found in the
41
+ * LICENSE file in the root directory of this source tree.
42
+ */var Z0;function ZS(){if(Z0)return mh;Z0=1;var i=XS(),t=lp(),n=QS();function s(e){var a="https://react.dev/errors/"+e;if(1<arguments.length){a+="?args[]="+encodeURIComponent(arguments[1]);for(var r=2;r<arguments.length;r++)a+="&args[]="+encodeURIComponent(arguments[r])}return"Minified React error #"+e+"; visit "+a+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function o(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function f(e){var a=e,r=e;if(e.alternate)for(;a.return;)a=a.return;else{e=a;do a=e,(a.flags&4098)!==0&&(r=a.return),e=a.return;while(e)}return a.tag===3?r:null}function d(e){if(e.tag===13){var a=e.memoizedState;if(a===null&&(e=e.alternate,e!==null&&(a=e.memoizedState)),a!==null)return a.dehydrated}return null}function m(e){if(e.tag===31){var a=e.memoizedState;if(a===null&&(e=e.alternate,e!==null&&(a=e.memoizedState)),a!==null)return a.dehydrated}return null}function g(e){if(f(e)!==e)throw Error(s(188))}function v(e){var a=e.alternate;if(!a){if(a=f(e),a===null)throw Error(s(188));return a!==e?null:e}for(var r=e,c=a;;){var p=r.return;if(p===null)break;var x=p.alternate;if(x===null){if(c=p.return,c!==null){r=c;continue}break}if(p.child===x.child){for(x=p.child;x;){if(x===r)return g(p),e;if(x===c)return g(p),a;x=x.sibling}throw Error(s(188))}if(r.return!==c.return)r=p,c=x;else{for(var C=!1,z=p.child;z;){if(z===r){C=!0,r=p,c=x;break}if(z===c){C=!0,c=p,r=x;break}z=z.sibling}if(!C){for(z=x.child;z;){if(z===r){C=!0,r=x,c=p;break}if(z===c){C=!0,c=x,r=p;break}z=z.sibling}if(!C)throw Error(s(189))}}if(r.alternate!==c)throw Error(s(190))}if(r.tag!==3)throw Error(s(188));return r.stateNode.current===r?e:a}function S(e){var a=e.tag;if(a===5||a===26||a===27||a===6)return e;for(e=e.child;e!==null;){if(a=S(e),a!==null)return a;e=e.sibling}return null}var b=Object.assign,A=Symbol.for("react.element"),E=Symbol.for("react.transitional.element"),R=Symbol.for("react.portal"),D=Symbol.for("react.fragment"),M=Symbol.for("react.strict_mode"),O=Symbol.for("react.profiler"),U=Symbol.for("react.consumer"),B=Symbol.for("react.context"),G=Symbol.for("react.forward_ref"),Z=Symbol.for("react.suspense"),V=Symbol.for("react.suspense_list"),K=Symbol.for("react.memo"),pt=Symbol.for("react.lazy"),ct=Symbol.for("react.activity"),ht=Symbol.for("react.memo_cache_sentinel"),dt=Symbol.iterator;function vt(e){return e===null||typeof e!="object"?null:(e=dt&&e[dt]||e["@@iterator"],typeof e=="function"?e:null)}var _t=Symbol.for("react.client.reference");function xt(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===_t?null:e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case D:return"Fragment";case O:return"Profiler";case M:return"StrictMode";case Z:return"Suspense";case V:return"SuspenseList";case ct:return"Activity"}if(typeof e=="object")switch(e.$$typeof){case R:return"Portal";case B:return e.displayName||"Context";case U:return(e._context.displayName||"Context")+".Consumer";case G:var a=e.render;return e=e.displayName,e||(e=a.displayName||a.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case K:return a=e.displayName||null,a!==null?a:xt(e.type)||"Memo";case pt:a=e._payload,e=e._init;try{return xt(e(a))}catch{}}return null}var Dt=Array.isArray,w=t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,H=n.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,at={pending:!1,data:null,method:null,action:null},et=[],ft=-1;function j(e){return{current:e}}function I(e){0>ft||(e.current=et[ft],et[ft]=null,ft--)}function st(e,a){ft++,et[ft]=e.current,e.current=a}var yt=j(null),Tt=j(null),Ot=j(null),Ut=j(null);function re(e,a){switch(st(Ot,a),st(Tt,e),st(yt,null),a.nodeType){case 9:case 11:e=(e=a.documentElement)&&(e=e.namespaceURI)?s0(e):0;break;default:if(e=a.tagName,a=a.namespaceURI)a=s0(a),e=u0(a,e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}I(yt),st(yt,e)}function ue(){I(yt),I(Tt),I(Ot)}function ra(e){e.memoizedState!==null&&st(Ut,e);var a=yt.current,r=u0(a,e.type);a!==r&&(st(Tt,e),st(yt,r))}function Oa(e){Tt.current===e&&(I(yt),I(Tt)),Ut.current===e&&(I(Ut),oh._currentValue=at)}var Un,Qn;function rn(e){if(Un===void 0)try{throw Error()}catch(r){var a=r.stack.trim().match(/\n( *(at )?)/);Un=a&&a[1]||"",Qn=-1<r.stack.indexOf(`
43
+ at`)?" (<anonymous>)":-1<r.stack.indexOf("@")?"@unknown:0:0":""}return`
44
+ `+Un+e+Qn}var Zn=!1;function ts(e,a){if(!e||Zn)return"";Zn=!0;var r=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var c={DetermineComponentFrameRoot:function(){try{if(a){var ot=function(){throw Error()};if(Object.defineProperty(ot.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(ot,[])}catch(it){var tt=it}Reflect.construct(e,[],ot)}else{try{ot.call()}catch(it){tt=it}e.call(ot.prototype)}}else{try{throw Error()}catch(it){tt=it}(ot=e())&&typeof ot.catch=="function"&&ot.catch(function(){})}}catch(it){if(it&&tt&&typeof it.stack=="string")return[it.stack,tt.stack]}return[null,null]}};c.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var p=Object.getOwnPropertyDescriptor(c.DetermineComponentFrameRoot,"name");p&&p.configurable&&Object.defineProperty(c.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var x=c.DetermineComponentFrameRoot(),C=x[0],z=x[1];if(C&&z){var Y=C.split(`
45
+ `),F=z.split(`
46
+ `);for(p=c=0;c<Y.length&&!Y[c].includes("DetermineComponentFrameRoot");)c++;for(;p<F.length&&!F[p].includes("DetermineComponentFrameRoot");)p++;if(c===Y.length||p===F.length)for(c=Y.length-1,p=F.length-1;1<=c&&0<=p&&Y[c]!==F[p];)p--;for(;1<=c&&0<=p;c--,p--)if(Y[c]!==F[p]){if(c!==1||p!==1)do if(c--,p--,0>p||Y[c]!==F[p]){var lt=`
47
+ `+Y[c].replace(" at new "," at ");return e.displayName&&lt.includes("<anonymous>")&&(lt=lt.replace("<anonymous>",e.displayName)),lt}while(1<=c&&0<=p);break}}}finally{Zn=!1,Error.prepareStackTrace=r}return(r=e?e.displayName||e.name:"")?rn(r):""}function Za(e,a){switch(e.tag){case 26:case 27:case 5:return rn(e.type);case 16:return rn("Lazy");case 13:return e.child!==a&&a!==null?rn("Suspense Fallback"):rn("Suspense");case 19:return rn("SuspenseList");case 0:case 15:return ts(e.type,!1);case 11:return ts(e.type.render,!1);case 1:return ts(e.type,!0);case 31:return rn("Activity");default:return""}}function ju(e){try{var a="",r=null;do a+=Za(e,r),r=e,e=e.return;while(e);return a}catch(c){return`
48
+ Error generating stack: `+c.message+`
49
+ `+c.stack}}var es=Object.prototype.hasOwnProperty,Na=i.unstable_scheduleCallback,ml=i.unstable_cancelCallback,yp=i.unstable_shouldYield,kh=i.unstable_requestPaint,Kn=i.unstable_now,Jh=i.unstable_getCurrentPriorityLevel,Ph=i.unstable_ImmediatePriority,Fr=i.unstable_UserBlockingPriority,Ir=i.unstable_NormalPriority,Wh=i.unstable_LowPriority,Fh=i.unstable_IdlePriority,Bc=i.log,wc=i.unstable_setDisableYieldValue,Ua=null,Je=null;function Ba(e){if(typeof Bc=="function"&&wc(e),Je&&typeof Je.setStrictMode=="function")try{Je.setStrictMode(Ua,e)}catch{}}var Bn=Math.clz32?Math.clz32:Ih,qu=Math.log,Yu=Math.LN2;function Ih(e){return e>>>=0,e===0?32:31-(qu(e)/Yu|0)|0}var Lu=256,ns=262144,Xu=4194304;function ri(e){var a=e&42;if(a!==0)return a;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:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return e&261888;case 262144:case 524288:case 1048576:case 2097152:return e&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return e&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return e}}function Vu(e,a,r){var c=e.pendingLanes;if(c===0)return 0;var p=0,x=e.suspendedLanes,C=e.pingedLanes;e=e.warmLanes;var z=c&134217727;return z!==0?(c=z&~x,c!==0?p=ri(c):(C&=z,C!==0?p=ri(C):r||(r=z&~e,r!==0&&(p=ri(r))))):(z=c&~x,z!==0?p=ri(z):C!==0?p=ri(C):r||(r=c&~e,r!==0&&(p=ri(r)))),p===0?0:a!==0&&a!==p&&(a&x)===0&&(x=p&-p,r=a&-a,x>=r||x===32&&(r&4194048)!==0)?a:p}function Vs(e,a){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&a)===0}function $r(e,a){switch(e){case 1:case 2:case 4:case 8:case 64:return a+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return a+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function Qs(){var e=Xu;return Xu<<=1,(Xu&62914560)===0&&(Xu=4194304),e}function Zs(e){for(var a=[],r=0;31>r;r++)a.push(e);return a}function Ks(e,a){e.pendingLanes|=a,a!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function $h(e,a,r,c,p,x){var C=e.pendingLanes;e.pendingLanes=r,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=r,e.entangledLanes&=r,e.errorRecoveryDisabledLanes&=r,e.shellSuspendCounter=0;var z=e.entanglements,Y=e.expirationTimes,F=e.hiddenUpdates;for(r=C&~r;0<r;){var lt=31-Bn(r),ot=1<<lt;z[lt]=0,Y[lt]=-1;var tt=F[lt];if(tt!==null)for(F[lt]=null,lt=0;lt<tt.length;lt++){var it=tt[lt];it!==null&&(it.lane&=-536870913)}r&=~ot}c!==0&&Hc(e,c,0),x!==0&&p===0&&e.tag!==0&&(e.suspendedLanes|=x&~(C&~a))}function Hc(e,a,r){e.pendingLanes|=a,e.suspendedLanes&=~a;var c=31-Bn(a);e.entangledLanes|=a,e.entanglements[c]=e.entanglements[c]|1073741824|r&261930}function to(e,a){var r=e.entangledLanes|=a;for(e=e.entanglements;r;){var c=31-Bn(r),p=1<<c;p&a|e[c]&a&&(e[c]|=a),r&=~p}}function eo(e,a){var r=a&-a;return r=(r&42)!==0?1:oi(r),(r&(e.suspendedLanes|a))!==0?0:r}function oi(e){switch(e){case 2:e=1;break;case 8:e=4;break;case 32:e=16;break;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:e=128;break;case 268435456:e=134217728;break;default:e=0}return e}function no(e){return e&=-e,2<e?8<e?(e&134217727)!==0?32:268435456:8:2}function Hi(){var e=H.p;return e!==0?e:(e=window.event,e===void 0?32:D0(e.type))}function ci(e,a){var r=H.p;try{return H.p=e,a()}finally{H.p=r}}var Ka=Math.random().toString(36).slice(2),Jt="__reactFiber$"+Ka,bn="__reactProps$"+Ka,pl="__reactContainer$"+Ka,ao="__reactEvents$"+Ka,td="__reactListeners$"+Ka,gp="__reactHandles$"+Ka,io="__reactResources$"+Ka,as="__reactMarker$"+Ka;function Qu(e){delete e[Jt],delete e[bn],delete e[ao],delete e[td],delete e[gp]}function nn(e){var a=e[Jt];if(a)return a;for(var r=e.parentNode;r;){if(a=r[pl]||r[Jt]){if(r=a.alternate,a.child!==null||r!==null&&r.child!==null)for(e=m0(e);e!==null;){if(r=e[Jt])return r;e=m0(e)}return a}e=r,r=e.parentNode}return null}function Ce(e){if(e=e[Jt]||e[pl]){var a=e.tag;if(a===5||a===6||a===13||a===31||a===26||a===27||a===3)return e}return null}function Gi(e){var a=e.tag;if(a===5||a===26||a===27||a===6)return e.stateNode;throw Error(s(33))}function ji(e){var a=e[io];return a||(a=e[io]={hoistableStyles:new Map,hoistableScripts:new Map}),a}function Pe(e){e[as]=!0}var fi=new Set,Zu={};function qi(e,a){yl(e,a),yl(e+"Capture",a)}function yl(e,a){for(Zu[e]=a,e=0;e<a.length;e++)fi.add(a[e])}var ed=RegExp("^[:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD][:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$"),Gc={},jc={};function nd(e){return es.call(jc,e)?!0:es.call(Gc,e)?!1:ed.test(e)?jc[e]=!0:(Gc[e]=!0,!1)}function Ku(e,a,r){if(nd(a))if(r===null)e.removeAttribute(a);else{switch(typeof r){case"undefined":case"function":case"symbol":e.removeAttribute(a);return;case"boolean":var c=a.toLowerCase().slice(0,5);if(c!=="data-"&&c!=="aria-"){e.removeAttribute(a);return}}e.setAttribute(a,""+r)}}function ku(e,a,r){if(r===null)e.removeAttribute(a);else{switch(typeof r){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(a);return}e.setAttribute(a,""+r)}}function ka(e,a,r,c){if(c===null)e.removeAttribute(r);else{switch(typeof c){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(r);return}e.setAttributeNS(a,r,""+c)}}function oa(e){switch(typeof e){case"bigint":case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function ad(e){var a=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(a==="checkbox"||a==="radio")}function id(e,a,r){var c=Object.getOwnPropertyDescriptor(e.constructor.prototype,a);if(!e.hasOwnProperty(a)&&typeof c<"u"&&typeof c.get=="function"&&typeof c.set=="function"){var p=c.get,x=c.set;return Object.defineProperty(e,a,{configurable:!0,get:function(){return p.call(this)},set:function(C){r=""+C,x.call(this,C)}}),Object.defineProperty(e,a,{enumerable:c.enumerable}),{getValue:function(){return r},setValue:function(C){r=""+C},stopTracking:function(){e._valueTracker=null,delete e[a]}}}}function lo(e){if(!e._valueTracker){var a=ad(e)?"checked":"value";e._valueTracker=id(e,a,""+e[a])}}function qc(e){if(!e)return!1;var a=e._valueTracker;if(!a)return!0;var r=a.getValue(),c="";return e&&(c=ad(e)?e.checked?"true":"false":e.value),e=c,e!==r?(a.setValue(e),!0):!1}function ks(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}}var ld=/[\n"\\]/g;function ca(e){return e.replace(ld,function(a){return"\\"+a.charCodeAt(0).toString(16)+" "})}function so(e,a,r,c,p,x,C,z){e.name="",C!=null&&typeof C!="function"&&typeof C!="symbol"&&typeof C!="boolean"?e.type=C:e.removeAttribute("type"),a!=null?C==="number"?(a===0&&e.value===""||e.value!=a)&&(e.value=""+oa(a)):e.value!==""+oa(a)&&(e.value=""+oa(a)):C!=="submit"&&C!=="reset"||e.removeAttribute("value"),a!=null?uo(e,C,oa(a)):r!=null?uo(e,C,oa(r)):c!=null&&e.removeAttribute("value"),p==null&&x!=null&&(e.defaultChecked=!!x),p!=null&&(e.checked=p&&typeof p!="function"&&typeof p!="symbol"),z!=null&&typeof z!="function"&&typeof z!="symbol"&&typeof z!="boolean"?e.name=""+oa(z):e.removeAttribute("name")}function Yc(e,a,r,c,p,x,C,z){if(x!=null&&typeof x!="function"&&typeof x!="symbol"&&typeof x!="boolean"&&(e.type=x),a!=null||r!=null){if(!(x!=="submit"&&x!=="reset"||a!=null)){lo(e);return}r=r!=null?""+oa(r):"",a=a!=null?""+oa(a):r,z||a===e.value||(e.value=a),e.defaultValue=a}c=c??p,c=typeof c!="function"&&typeof c!="symbol"&&!!c,e.checked=z?e.checked:!!c,e.defaultChecked=!!c,C!=null&&typeof C!="function"&&typeof C!="symbol"&&typeof C!="boolean"&&(e.name=C),lo(e)}function uo(e,a,r){a==="number"&&ks(e.ownerDocument)===e||e.defaultValue===""+r||(e.defaultValue=""+r)}function Js(e,a,r,c){if(e=e.options,a){a={};for(var p=0;p<r.length;p++)a["$"+r[p]]=!0;for(r=0;r<e.length;r++)p=a.hasOwnProperty("$"+e[r].value),e[r].selected!==p&&(e[r].selected=p),p&&c&&(e[r].defaultSelected=!0)}else{for(r=""+oa(r),a=null,p=0;p<e.length;p++){if(e[p].value===r){e[p].selected=!0,c&&(e[p].defaultSelected=!0);return}a!==null||e[p].disabled||(a=e[p])}a!==null&&(a.selected=!0)}}function Lc(e,a,r){if(a!=null&&(a=""+oa(a),a!==e.value&&(e.value=a),r==null)){e.defaultValue!==a&&(e.defaultValue=a);return}e.defaultValue=r!=null?""+oa(r):""}function is(e,a,r,c){if(a==null){if(c!=null){if(r!=null)throw Error(s(92));if(Dt(c)){if(1<c.length)throw Error(s(93));c=c[0]}r=c}r==null&&(r=""),a=r}r=oa(a),e.defaultValue=r,c=e.textContent,c===r&&c!==""&&c!==null&&(e.value=c),lo(e)}function ls(e,a){if(a){var r=e.firstChild;if(r&&r===e.lastChild&&r.nodeType===3){r.nodeValue=a;return}}e.textContent=a}var ro=new Set("animationIterationCount aspectRatio borderImageOutset borderImageSlice borderImageWidth boxFlex boxFlexGroup boxOrdinalGroup columnCount columns flex flexGrow flexPositive flexShrink flexNegative flexOrder gridArea gridRow gridRowEnd gridRowSpan gridRowStart gridColumn gridColumnEnd gridColumnSpan gridColumnStart fontWeight lineClamp lineHeight opacity order orphans scale tabSize widows zIndex zoom fillOpacity floodOpacity stopOpacity strokeDasharray strokeDashoffset strokeMiterlimit strokeOpacity strokeWidth MozAnimationIterationCount MozBoxFlex MozBoxFlexGroup MozLineClamp msAnimationIterationCount msFlex msZoom msFlexGrow msFlexNegative msFlexOrder msFlexPositive msFlexShrink msGridColumn msGridColumnSpan msGridRow msGridRowSpan WebkitAnimationIterationCount WebkitBoxFlex WebKitBoxFlexGroup WebkitBoxOrdinalGroup WebkitColumnCount WebkitColumns WebkitFlex WebkitFlexGrow WebkitFlexPositive WebkitFlexShrink WebkitLineClamp".split(" "));function Ju(e,a,r){var c=a.indexOf("--")===0;r==null||typeof r=="boolean"||r===""?c?e.setProperty(a,""):a==="float"?e.cssFloat="":e[a]="":c?e.setProperty(a,r):typeof r!="number"||r===0||ro.has(a)?a==="float"?e.cssFloat=r:e[a]=(""+r).trim():e[a]=r+"px"}function Xc(e,a,r){if(a!=null&&typeof a!="object")throw Error(s(62));if(e=e.style,r!=null){for(var c in r)!r.hasOwnProperty(c)||a!=null&&a.hasOwnProperty(c)||(c.indexOf("--")===0?e.setProperty(c,""):c==="float"?e.cssFloat="":e[c]="");for(var p in a)c=a[p],a.hasOwnProperty(p)&&r[p]!==c&&Ju(e,p,c)}else for(var x in a)a.hasOwnProperty(x)&&Ju(e,x,a[x])}function Pu(e){if(e.indexOf("-")===-1)return!1;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 sd=new Map([["acceptCharset","accept-charset"],["htmlFor","for"],["httpEquiv","http-equiv"],["crossOrigin","crossorigin"],["accentHeight","accent-height"],["alignmentBaseline","alignment-baseline"],["arabicForm","arabic-form"],["baselineShift","baseline-shift"],["capHeight","cap-height"],["clipPath","clip-path"],["clipRule","clip-rule"],["colorInterpolation","color-interpolation"],["colorInterpolationFilters","color-interpolation-filters"],["colorProfile","color-profile"],["colorRendering","color-rendering"],["dominantBaseline","dominant-baseline"],["enableBackground","enable-background"],["fillOpacity","fill-opacity"],["fillRule","fill-rule"],["floodColor","flood-color"],["floodOpacity","flood-opacity"],["fontFamily","font-family"],["fontSize","font-size"],["fontSizeAdjust","font-size-adjust"],["fontStretch","font-stretch"],["fontStyle","font-style"],["fontVariant","font-variant"],["fontWeight","font-weight"],["glyphName","glyph-name"],["glyphOrientationHorizontal","glyph-orientation-horizontal"],["glyphOrientationVertical","glyph-orientation-vertical"],["horizAdvX","horiz-adv-x"],["horizOriginX","horiz-origin-x"],["imageRendering","image-rendering"],["letterSpacing","letter-spacing"],["lightingColor","lighting-color"],["markerEnd","marker-end"],["markerMid","marker-mid"],["markerStart","marker-start"],["overlinePosition","overline-position"],["overlineThickness","overline-thickness"],["paintOrder","paint-order"],["panose-1","panose-1"],["pointerEvents","pointer-events"],["renderingIntent","rendering-intent"],["shapeRendering","shape-rendering"],["stopColor","stop-color"],["stopOpacity","stop-opacity"],["strikethroughPosition","strikethrough-position"],["strikethroughThickness","strikethrough-thickness"],["strokeDasharray","stroke-dasharray"],["strokeDashoffset","stroke-dashoffset"],["strokeLinecap","stroke-linecap"],["strokeLinejoin","stroke-linejoin"],["strokeMiterlimit","stroke-miterlimit"],["strokeOpacity","stroke-opacity"],["strokeWidth","stroke-width"],["textAnchor","text-anchor"],["textDecoration","text-decoration"],["textRendering","text-rendering"],["transformOrigin","transform-origin"],["underlinePosition","underline-position"],["underlineThickness","underline-thickness"],["unicodeBidi","unicode-bidi"],["unicodeRange","unicode-range"],["unitsPerEm","units-per-em"],["vAlphabetic","v-alphabetic"],["vHanging","v-hanging"],["vIdeographic","v-ideographic"],["vMathematical","v-mathematical"],["vectorEffect","vector-effect"],["vertAdvY","vert-adv-y"],["vertOriginX","vert-origin-x"],["vertOriginY","vert-origin-y"],["wordSpacing","word-spacing"],["writingMode","writing-mode"],["xmlnsXlink","xmlns:xlink"],["xHeight","x-height"]]),ud=/^[\u0000-\u001F ]*j[\r\n\t]*a[\r\n\t]*v[\r\n\t]*a[\r\n\t]*s[\r\n\t]*c[\r\n\t]*r[\r\n\t]*i[\r\n\t]*p[\r\n\t]*t[\r\n\t]*:/i;function Wu(e){return ud.test(""+e)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":e}function hi(){}var Fu=null;function oo(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var ss=null,gl=null;function Vc(e){var a=Ce(e);if(a&&(e=a.stateNode)){var r=e[bn]||null;t:switch(e=a.stateNode,a.type){case"input":if(so(e,r.value,r.defaultValue,r.defaultValue,r.checked,r.defaultChecked,r.type,r.name),a=r.name,r.type==="radio"&&a!=null){for(r=e;r.parentNode;)r=r.parentNode;for(r=r.querySelectorAll('input[name="'+ca(""+a)+'"][type="radio"]'),a=0;a<r.length;a++){var c=r[a];if(c!==e&&c.form===e.form){var p=c[bn]||null;if(!p)throw Error(s(90));so(c,p.value,p.defaultValue,p.defaultValue,p.checked,p.defaultChecked,p.type,p.name)}}for(a=0;a<r.length;a++)c=r[a],c.form===e.form&&qc(c)}break t;case"textarea":Lc(e,r.value,r.defaultValue);break t;case"select":a=r.value,a!=null&&Js(e,!!r.multiple,a,!1)}}}var co=!1;function Qc(e,a,r){if(co)return e(a,r);co=!0;try{var c=e(a);return c}finally{if(co=!1,(ss!==null||gl!==null)&&(N(),ss&&(a=ss,e=gl,gl=ss=null,Vc(a),e)))for(a=0;a<e.length;a++)Vc(e[a])}}function us(e,a){var r=e.stateNode;if(r===null)return null;var c=r[bn]||null;if(c===null)return null;r=c[a];t:switch(a){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(c=!c.disabled)||(e=e.type,c=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!c;break t;default:e=!1}if(e)return null;if(r&&typeof r!="function")throw Error(s(231,a,typeof r));return r}var di=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),fo=!1;if(di)try{var Iu={};Object.defineProperty(Iu,"passive",{get:function(){fo=!0}}),window.addEventListener("test",Iu,Iu),window.removeEventListener("test",Iu,Iu)}catch{fo=!1}var vl=null,ho=null,xl=null;function mo(){if(xl)return xl;var e,a=ho,r=a.length,c,p="value"in vl?vl.value:vl.textContent,x=p.length;for(e=0;e<r&&a[e]===p[e];e++);var C=r-e;for(c=1;c<=C&&a[r-c]===p[x-c];c++);return xl=p.slice(e,1<c?1-c:void 0)}function rs(e){var a=e.keyCode;return"charCode"in e?(e=e.charCode,e===0&&a===13&&(e=13)):e=a,e===10&&(e=13),32<=e||e===13?e:0}function $u(){return!0}function Zc(){return!1}function Tn(e){function a(r,c,p,x,C){this._reactName=r,this._targetInst=p,this.type=c,this.nativeEvent=x,this.target=C,this.currentTarget=null;for(var z in e)e.hasOwnProperty(z)&&(r=e[z],this[z]=r?r(x):x[z]);return this.isDefaultPrevented=(x.defaultPrevented!=null?x.defaultPrevented:x.returnValue===!1)?$u:Zc,this.isPropagationStopped=Zc,this}return b(a.prototype,{preventDefault:function(){this.defaultPrevented=!0;var r=this.nativeEvent;r&&(r.preventDefault?r.preventDefault():typeof r.returnValue!="unknown"&&(r.returnValue=!1),this.isDefaultPrevented=$u)},stopPropagation:function(){var r=this.nativeEvent;r&&(r.stopPropagation?r.stopPropagation():typeof r.cancelBubble!="unknown"&&(r.cancelBubble=!0),this.isPropagationStopped=$u)},persist:function(){},isPersistent:$u}),a}var _l={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},tr=Tn(_l),Ja=b({},_l,{view:0,detail:0}),po=Tn(Ja),yo,er,Ps,nr=b({},Ja,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:ir,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!==Ps&&(Ps&&e.type==="mousemove"?(yo=e.screenX-Ps.screenX,er=e.screenY-Ps.screenY):er=yo=0,Ps=e),yo)},movementY:function(e){return"movementY"in e?e.movementY:er}}),rd=Tn(nr),mn=b({},nr,{dataTransfer:0}),od=Tn(mn),cd=b({},Ja,{relatedTarget:0}),go=Tn(cd),fd=b({},_l,{animationName:0,elapsedTime:0,pseudoElement:0}),hd=Tn(fd),ar=b({},_l,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),Kc=Tn(ar),dd=b({},_l,{data:0}),kc=Tn(dd),md={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},Jc={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"},Pc={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function pd(e){var a=this.nativeEvent;return a.getModifierState?a.getModifierState(e):(e=Pc[e])?!!a[e]:!1}function ir(){return pd}var Wc=b({},Ja,{key:function(e){if(e.key){var a=md[e.key]||e.key;if(a!=="Unidentified")return a}return e.type==="keypress"?(e=rs(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?Jc[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:ir,charCode:function(e){return e.type==="keypress"?rs(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?rs(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),Fc=Tn(Wc),yd=b({},nr,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),vo=Tn(yd),gd=b({},Ja,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:ir}),Yi=Tn(gd),Ic=b({},_l,{propertyName:0,elapsedTime:0,pseudoElement:0}),vp=Tn(Ic),vd=b({},nr,{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}),Sl=Tn(vd),Li=b({},_l,{newState:0,oldState:0}),$c=Tn(Li),tf=[9,13,27,32],os=di&&"CompositionEvent"in window,bl=null;di&&"documentMode"in document&&(bl=document.documentMode);var cs=di&&"TextEvent"in window&&!bl,pn=di&&(!os||bl&&8<bl&&11>=bl),lr=" ",ef=!1;function xo(e,a){switch(e){case"keyup":return tf.indexOf(a.keyCode)!==-1;case"keydown":return a.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Ws(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Tl=!1;function _o(e,a){switch(e){case"compositionend":return Ws(a);case"keypress":return a.which!==32?null:(ef=!0,lr);case"textInput":return e=a.data,e===lr&&ef?null:e;default:return null}}function xd(e,a){if(Tl)return e==="compositionend"||!os&&xo(e,a)?(e=mo(),xl=ho=vl=null,Tl=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(a.ctrlKey||a.altKey||a.metaKey)||a.ctrlKey&&a.altKey){if(a.char&&1<a.char.length)return a.char;if(a.which)return String.fromCharCode(a.which)}return null;case"compositionend":return pn&&a.locale!=="ko"?null:a.data;default:return null}}var fa={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 nf(e){var a=e&&e.nodeName&&e.nodeName.toLowerCase();return a==="input"?!!fa[e.type]:a==="textarea"}function So(e,a,r,c){ss?gl?gl.push(c):gl=[c]:ss=c,a=cm(a,"onChange"),0<a.length&&(r=new tr("onChange","change",null,r,c),e.push({event:r,listeners:a}))}var Fs=null,Is=null;function af(e){t0(e,0)}function $s(e){var a=Gi(e);if(qc(a))return e}function lf(e,a){if(e==="change")return a}var sr=!1;if(di){var fs;if(di){var Ae="oninput"in document;if(!Ae){var _d=document.createElement("div");_d.setAttribute("oninput","return;"),Ae=typeof _d.oninput=="function"}fs=Ae}else fs=!1;sr=fs&&(!document.documentMode||9<document.documentMode)}function Sd(){Fs&&(Fs.detachEvent("onpropertychange",sf),Is=Fs=null)}function sf(e){if(e.propertyName==="value"&&$s(Is)){var a=[];So(a,Is,e,oo(e)),Qc(af,a)}}function ur(e,a,r){e==="focusin"?(Sd(),Fs=a,Is=r,Fs.attachEvent("onpropertychange",sf)):e==="focusout"&&Sd()}function El(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return $s(Is)}function bd(e,a){if(e==="click")return $s(a)}function Td(e,a){if(e==="input"||e==="change")return $s(a)}function hs(e,a){return e===a&&(e!==0||1/e===1/a)||e!==e&&a!==a}var Me=typeof Object.is=="function"?Object.is:hs;function tu(e,a){if(Me(e,a))return!0;if(typeof e!="object"||e===null||typeof a!="object"||a===null)return!1;var r=Object.keys(e),c=Object.keys(a);if(r.length!==c.length)return!1;for(c=0;c<r.length;c++){var p=r[c];if(!es.call(a,p)||!Me(e[p],a[p]))return!1}return!0}function uf(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function rf(e,a){var r=uf(e);e=0;for(var c;r;){if(r.nodeType===3){if(c=e+r.textContent.length,e<=a&&c>=a)return{node:r,offset:a-e};e=c}t:{for(;r;){if(r.nextSibling){r=r.nextSibling;break t}r=r.parentNode}r=void 0}r=uf(r)}}function bo(e,a){return e&&a?e===a?!0:e&&e.nodeType===3?!1:a&&a.nodeType===3?bo(e,a.parentNode):"contains"in e?e.contains(a):e.compareDocumentPosition?!!(e.compareDocumentPosition(a)&16):!1:!1}function To(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var a=ks(e.document);a instanceof e.HTMLIFrameElement;){try{var r=typeof a.contentWindow.location.href=="string"}catch{r=!1}if(r)e=a.contentWindow;else break;a=ks(e.document)}return a}function eu(e){var a=e&&e.nodeName&&e.nodeName.toLowerCase();return a&&(a==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||a==="textarea"||e.contentEditable==="true")}var Ed=di&&"documentMode"in document&&11>=document.documentMode,nu=null,Eo=null,au=null,ha=!1;function Co(e,a,r){var c=r.window===r?r.document:r.nodeType===9?r:r.ownerDocument;ha||nu==null||nu!==ks(c)||(c=nu,"selectionStart"in c&&eu(c)?c={start:c.selectionStart,end:c.selectionEnd}:(c=(c.ownerDocument&&c.ownerDocument.defaultView||window).getSelection(),c={anchorNode:c.anchorNode,anchorOffset:c.anchorOffset,focusNode:c.focusNode,focusOffset:c.focusOffset}),au&&tu(au,c)||(au=c,c=cm(Eo,"onSelect"),0<c.length&&(a=new tr("onSelect","select",null,a,r),e.push({event:a,listeners:c}),a.target=nu)))}function Cl(e,a){var r={};return r[e.toLowerCase()]=a.toLowerCase(),r["Webkit"+e]="webkit"+a,r["Moz"+e]="moz"+a,r}var iu={animationend:Cl("Animation","AnimationEnd"),animationiteration:Cl("Animation","AnimationIteration"),animationstart:Cl("Animation","AnimationStart"),transitionrun:Cl("Transition","TransitionRun"),transitionstart:Cl("Transition","TransitionStart"),transitioncancel:Cl("Transition","TransitionCancel"),transitionend:Cl("Transition","TransitionEnd")},rr={},wn={};di&&(wn=document.createElement("div").style,"AnimationEvent"in window||(delete iu.animationend.animation,delete iu.animationiteration.animation,delete iu.animationstart.animation),"TransitionEvent"in window||delete iu.transitionend.transition);function Al(e){if(rr[e])return rr[e];if(!iu[e])return e;var a=iu[e],r;for(r in a)if(a.hasOwnProperty(r)&&r in wn)return rr[e]=a[r];return e}var kn=Al("animationend"),of=Al("animationiteration"),mi=Al("animationstart"),lu=Al("transitionrun"),Ml=Al("transitionstart"),cf=Al("transitioncancel"),Ao=Al("transitionend"),Xi=new Map,Mo="abort auxClick beforeToggle cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");Mo.push("scrollEnd");function En(e,a){Xi.set(e,a),qi(a,[e])}var Rl=typeof reportError=="function"?reportError:function(e){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var a=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof e=="object"&&e!==null&&typeof e.message=="string"?String(e.message):String(e),error:e});if(!window.dispatchEvent(a))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",e);return}console.error(e)},on=[],ds=0,Ro=0;function zl(){for(var e=ds,a=Ro=ds=0;a<e;){var r=on[a];on[a++]=null;var c=on[a];on[a++]=null;var p=on[a];on[a++]=null;var x=on[a];if(on[a++]=null,c!==null&&p!==null){var C=c.pending;C===null?p.next=p:(p.next=C.next,C.next=p),c.pending=p}x!==0&&zo(r,p,x)}}function or(e,a,r,c){on[ds++]=e,on[ds++]=a,on[ds++]=r,on[ds++]=c,Ro|=c,e.lanes|=c,e=e.alternate,e!==null&&(e.lanes|=c)}function su(e,a,r,c){return or(e,a,r,c),uu(e)}function Dl(e,a){return or(e,null,null,a),uu(e)}function zo(e,a,r){e.lanes|=r;var c=e.alternate;c!==null&&(c.lanes|=r);for(var p=!1,x=e.return;x!==null;)x.childLanes|=r,c=x.alternate,c!==null&&(c.childLanes|=r),x.tag===22&&(e=x.stateNode,e===null||e._visibility&1||(p=!0)),e=x,x=x.return;return e.tag===3?(x=e.stateNode,p&&a!==null&&(p=31-Bn(r),e=x.hiddenUpdates,c=e[p],c===null?e[p]=[a]:c.push(a),a.lane=r|536870912),x):null}function uu(e){if(50<Ds)throw Ds=0,Os=null,Error(s(185));for(var a=e.return;a!==null;)e=a,a=e.return;return e.tag===3?e.stateNode:null}var Ol={};function Cd(e,a,r,c){this.tag=e,this.key=r,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=a,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=c,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Hn(e,a,r,c){return new Cd(e,a,r,c)}function Gn(e){return e=e.prototype,!(!e||!e.isReactComponent)}function pi(e,a){var r=e.alternate;return r===null?(r=Hn(e.tag,a,e.key,e.mode),r.elementType=e.elementType,r.type=e.type,r.stateNode=e.stateNode,r.alternate=e,e.alternate=r):(r.pendingProps=a,r.type=e.type,r.flags=0,r.subtreeFlags=0,r.deletions=null),r.flags=e.flags&65011712,r.childLanes=e.childLanes,r.lanes=e.lanes,r.child=e.child,r.memoizedProps=e.memoizedProps,r.memoizedState=e.memoizedState,r.updateQueue=e.updateQueue,a=e.dependencies,r.dependencies=a===null?null:{lanes:a.lanes,firstContext:a.firstContext},r.sibling=e.sibling,r.index=e.index,r.ref=e.ref,r.refCleanup=e.refCleanup,r}function Cn(e,a){e.flags&=65011714;var r=e.alternate;return r===null?(e.childLanes=0,e.lanes=a,e.child=null,e.subtreeFlags=0,e.memoizedProps=null,e.memoizedState=null,e.updateQueue=null,e.dependencies=null,e.stateNode=null):(e.childLanes=r.childLanes,e.lanes=r.lanes,e.child=r.child,e.subtreeFlags=0,e.deletions=null,e.memoizedProps=r.memoizedProps,e.memoizedState=r.memoizedState,e.updateQueue=r.updateQueue,e.type=r.type,a=r.dependencies,e.dependencies=a===null?null:{lanes:a.lanes,firstContext:a.firstContext}),e}function cr(e,a,r,c,p,x){var C=0;if(c=e,typeof e=="function")Gn(e)&&(C=1);else if(typeof e=="string")C=AS(e,r,yt.current)?26:e==="html"||e==="head"||e==="body"?27:5;else t:switch(e){case ct:return e=Hn(31,r,a,p),e.elementType=ct,e.lanes=x,e;case D:return Vi(r.children,p,x,a);case M:C=8,p|=24;break;case O:return e=Hn(12,r,a,p|2),e.elementType=O,e.lanes=x,e;case Z:return e=Hn(13,r,a,p),e.elementType=Z,e.lanes=x,e;case V:return e=Hn(19,r,a,p),e.elementType=V,e.lanes=x,e;default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case B:C=10;break t;case U:C=9;break t;case G:C=11;break t;case K:C=14;break t;case pt:C=16,c=null;break t}C=29,r=Error(s(130,e===null?"null":typeof e,"")),c=null}return a=Hn(C,r,a,p),a.elementType=e,a.type=c,a.lanes=x,a}function Vi(e,a,r,c){return e=Hn(7,e,c,a),e.lanes=r,e}function Do(e,a,r){return e=Hn(6,e,null,a),e.lanes=r,e}function Ad(e){var a=Hn(18,null,null,0);return a.stateNode=e,a}function Pa(e,a,r){return a=Hn(4,e.children!==null?e.children:[],e.key,a),a.lanes=r,a.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},a}var ff=new WeakMap;function Jn(e,a){if(typeof e=="object"&&e!==null){var r=ff.get(e);return r!==void 0?r:(a={value:e,source:a,stack:ju(a)},ff.set(e,a),a)}return{value:e,source:a,stack:ju(a)}}var Wa=[],ms=0,fr=null,ru=0,da=[],Pn=0,yi=null,gi=1,vi="";function Qi(e,a){Wa[ms++]=ru,Wa[ms++]=fr,fr=e,ru=a}function hf(e,a,r){da[Pn++]=gi,da[Pn++]=vi,da[Pn++]=yi,yi=e;var c=gi;e=vi;var p=32-Bn(c)-1;c&=~(1<<p),r+=1;var x=32-Bn(a)+p;if(30<x){var C=p-p%5;x=(c&(1<<C)-1).toString(32),c>>=C,p-=C,gi=1<<32-Bn(a)+p|r<<p|c,vi=x+e}else gi=1<<x|r<<p|c,vi=e}function Oo(e){e.return!==null&&(Qi(e,1),hf(e,1,0))}function Nl(e){for(;e===fr;)fr=Wa[--ms],Wa[ms]=null,ru=Wa[--ms],Wa[ms]=null;for(;e===yi;)yi=da[--Pn],da[Pn]=null,vi=da[--Pn],da[Pn]=null,gi=da[--Pn],da[Pn]=null}function hr(e,a){da[Pn++]=gi,da[Pn++]=vi,da[Pn++]=yi,gi=a.id,vi=a.overflow,yi=e}var cn=null,_e=null,Ft=!1,Zi=null,fn=!1,No=Error(s(519));function Pt(e){var a=Error(s(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw dr(Jn(a,e)),No}function Uo(e){var a=e.stateNode,r=e.type,c=e.memoizedProps;switch(a[Jt]=e,a[bn]=c,r){case"dialog":It("cancel",a),It("close",a);break;case"iframe":case"object":case"embed":It("load",a);break;case"video":case"audio":for(r=0;r<ih.length;r++)It(ih[r],a);break;case"source":It("error",a);break;case"img":case"image":case"link":It("error",a),It("load",a);break;case"details":It("toggle",a);break;case"input":It("invalid",a),Yc(a,c.value,c.defaultValue,c.checked,c.defaultChecked,c.type,c.name,!0);break;case"select":It("invalid",a);break;case"textarea":It("invalid",a),is(a,c.value,c.defaultValue,c.children)}r=c.children,typeof r!="string"&&typeof r!="number"&&typeof r!="bigint"||a.textContent===""+r||c.suppressHydrationWarning===!0||i0(a.textContent,r)?(c.popover!=null&&(It("beforetoggle",a),It("toggle",a)),c.onScroll!=null&&It("scroll",a),c.onScrollEnd!=null&&It("scrollend",a),c.onClick!=null&&(a.onclick=hi),a=!0):a=!1,a||Pt(e,!0)}function Md(e){for(cn=e.return;cn;)switch(cn.tag){case 5:case 31:case 13:fn=!1;return;case 27:case 3:fn=!0;return;default:cn=cn.return}}function ps(e){if(e!==cn)return!1;if(!Ft)return Md(e),Ft=!0,!1;var a=e.tag,r;if((r=a!==3&&a!==27)&&((r=a===5)&&(r=e.type,r=!(r!=="form"&&r!=="button")||jp(e.type,e.memoizedProps)),r=!r),r&&_e&&Pt(e),Md(e),a===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(s(317));_e=d0(e)}else if(a===31){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(s(317));_e=d0(e)}else a===27?(a=_e,Mu(e.type)?(e=Vp,Vp=null,_e=e):_e=a):_e=cn?zi(e.stateNode.nextSibling):null;return!0}function ys(){_e=cn=null,Ft=!1}function df(){var e=Zi;return e!==null&&(On===null?On=e:On.push.apply(On,e),Zi=null),e}function dr(e){Zi===null?Zi=[e]:Zi.push(e)}var mf=j(null),Ki=null,An=null;function ki(e,a,r){st(mf,a._currentValue),a._currentValue=r}function wa(e){e._currentValue=mf.current,I(mf)}function Ji(e,a,r){for(;e!==null;){var c=e.alternate;if((e.childLanes&a)!==a?(e.childLanes|=a,c!==null&&(c.childLanes|=a)):c!==null&&(c.childLanes&a)!==a&&(c.childLanes|=a),e===r)break;e=e.return}}function Bo(e,a,r,c){var p=e.child;for(p!==null&&(p.return=e);p!==null;){var x=p.dependencies;if(x!==null){var C=p.child;x=x.firstContext;t:for(;x!==null;){var z=x;x=p;for(var Y=0;Y<a.length;Y++)if(z.context===a[Y]){x.lanes|=r,z=x.alternate,z!==null&&(z.lanes|=r),Ji(x.return,r,e),c||(C=null);break t}x=z.next}}else if(p.tag===18){if(C=p.return,C===null)throw Error(s(341));C.lanes|=r,x=C.alternate,x!==null&&(x.lanes|=r),Ji(C,r,e),C=null}else C=p.child;if(C!==null)C.return=p;else for(C=p;C!==null;){if(C===e){C=null;break}if(p=C.sibling,p!==null){p.return=C.return,C=p;break}C=C.return}p=C}}function Ul(e,a,r,c){e=null;for(var p=a,x=!1;p!==null;){if(!x){if((p.flags&524288)!==0)x=!0;else if((p.flags&262144)!==0)break}if(p.tag===10){var C=p.alternate;if(C===null)throw Error(s(387));if(C=C.memoizedProps,C!==null){var z=p.type;Me(p.pendingProps.value,C.value)||(e!==null?e.push(z):e=[z])}}else if(p===Ut.current){if(C=p.alternate,C===null)throw Error(s(387));C.memoizedState.memoizedState!==p.memoizedState.memoizedState&&(e!==null?e.push(oh):e=[oh])}p=p.return}e!==null&&Bo(a,e,r,c),a.flags|=262144}function ou(e){for(e=e.firstContext;e!==null;){if(!Me(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function gs(e){Ki=e,An=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function hn(e){return pf(Ki,e)}function mr(e,a){return Ki===null&&gs(e),pf(e,a)}function pf(e,a){var r=a._currentValue;if(a={context:a,memoizedValue:r,next:null},An===null){if(e===null)throw Error(s(308));An=a,e.dependencies={lanes:0,firstContext:a},e.flags|=524288}else An=An.next=a;return r}var Rd=typeof AbortController<"u"?AbortController:function(){var e=[],a=this.signal={aborted:!1,addEventListener:function(r,c){e.push(c)}};this.abort=function(){a.aborted=!0,e.forEach(function(r){return r()})}},zd=i.unstable_scheduleCallback,yf=i.unstable_NormalPriority,Mt={$$typeof:B,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function gf(){return{controller:new Rd,data:new Map,refCount:0}}function yn(e){e.refCount--,e.refCount===0&&zd(yf,function(){e.controller.abort()})}var vs=null,vf=0,Pi=0,Fa=null;function cu(e,a){if(vs===null){var r=vs=[];vf=0,Pi=zp(),Fa={status:"pending",value:void 0,then:function(c){r.push(c)}}}return vf++,a.then(xf,xf),a}function xf(){if(--vf===0&&vs!==null){Fa!==null&&(Fa.status="fulfilled");var e=vs;vs=null,Pi=0,Fa=null;for(var a=0;a<e.length;a++)(0,e[a])()}}function _f(e,a){var r=[],c={status:"pending",value:null,reason:null,then:function(p){r.push(p)}};return e.then(function(){c.status="fulfilled",c.value=a;for(var p=0;p<r.length;p++)(0,r[p])(a)},function(p){for(c.status="rejected",c.reason=p,p=0;p<r.length;p++)(0,r[p])(void 0)}),c}var Dd=w.S;w.S=function(e,a){Eu=Kn(),typeof a=="object"&&a!==null&&typeof a.then=="function"&&cu(e,a),Dd!==null&&Dd(e,a)};var Bl=j(null);function xi(){var e=Bl.current;return e!==null?e:he.pooledCache}function fu(e,a){a===null?st(Bl,Bl.current):st(Bl,a.pool)}function wo(){var e=xi();return e===null?null:{parent:Mt._currentValue,pool:e}}var wl=Error(s(460)),pr=Error(s(474)),Ia=Error(s(542)),yr={then:function(){}};function Od(e){return e=e.status,e==="fulfilled"||e==="rejected"}function Sf(e,a,r){switch(r=e[r],r===void 0?e.push(a):r!==a&&(a.then(hi,hi),a=r),a.status){case"fulfilled":return a.value;case"rejected":throw e=a.reason,bf(e),e;default:if(typeof a.status=="string")a.then(hi,hi);else{if(e=he,e!==null&&100<e.shellSuspendCounter)throw Error(s(482));e=a,e.status="pending",e.then(function(c){if(a.status==="pending"){var p=a;p.status="fulfilled",p.value=c}},function(c){if(a.status==="pending"){var p=a;p.status="rejected",p.reason=c}})}switch(a.status){case"fulfilled":return a.value;case"rejected":throw e=a.reason,bf(e),e}throw Nt=a,wl}}function xs(e){try{var a=e._init;return a(e._payload)}catch(r){throw r!==null&&typeof r=="object"&&typeof r.then=="function"?(Nt=r,wl):r}}var Nt=null;function Ho(){if(Nt===null)throw Error(s(459));var e=Nt;return Nt=null,e}function bf(e){if(e===wl||e===Ia)throw Error(s(483))}var Hl=null,Gl=0;function Go(e){var a=Gl;return Gl+=1,Hl===null&&(Hl=[]),Sf(Hl,e,a)}function gr(e,a){a=a.props.ref,e.ref=a!==void 0?a:null}function vr(e,a){throw a.$$typeof===A?Error(s(525)):(e=Object.prototype.toString.call(a),Error(s(31,e==="[object Object]"?"object with keys {"+Object.keys(a).join(", ")+"}":e)))}function hu(e){function a(J,Q){if(e){var W=J.deletions;W===null?(J.deletions=[Q],J.flags|=16):W.push(Q)}}function r(J,Q){if(!e)return null;for(;Q!==null;)a(J,Q),Q=Q.sibling;return null}function c(J){for(var Q=new Map;J!==null;)J.key!==null?Q.set(J.key,J):Q.set(J.index,J),J=J.sibling;return Q}function p(J,Q){return J=pi(J,Q),J.index=0,J.sibling=null,J}function x(J,Q,W){return J.index=W,e?(W=J.alternate,W!==null?(W=W.index,W<Q?(J.flags|=67108866,Q):W):(J.flags|=67108866,Q)):(J.flags|=1048576,Q)}function C(J){return e&&J.alternate===null&&(J.flags|=67108866),J}function z(J,Q,W,rt){return Q===null||Q.tag!==6?(Q=Do(W,J.mode,rt),Q.return=J,Q):(Q=p(Q,W),Q.return=J,Q)}function Y(J,Q,W,rt){var zt=W.type;return zt===D?lt(J,Q,W.props.children,rt,W.key):Q!==null&&(Q.elementType===zt||typeof zt=="object"&&zt!==null&&zt.$$typeof===pt&&xs(zt)===Q.type)?(Q=p(Q,W.props),gr(Q,W),Q.return=J,Q):(Q=cr(W.type,W.key,W.props,null,J.mode,rt),gr(Q,W),Q.return=J,Q)}function F(J,Q,W,rt){return Q===null||Q.tag!==4||Q.stateNode.containerInfo!==W.containerInfo||Q.stateNode.implementation!==W.implementation?(Q=Pa(W,J.mode,rt),Q.return=J,Q):(Q=p(Q,W.children||[]),Q.return=J,Q)}function lt(J,Q,W,rt,zt){return Q===null||Q.tag!==7?(Q=Vi(W,J.mode,rt,zt),Q.return=J,Q):(Q=p(Q,W),Q.return=J,Q)}function ot(J,Q,W){if(typeof Q=="string"&&Q!==""||typeof Q=="number"||typeof Q=="bigint")return Q=Do(""+Q,J.mode,W),Q.return=J,Q;if(typeof Q=="object"&&Q!==null){switch(Q.$$typeof){case E:return W=cr(Q.type,Q.key,Q.props,null,J.mode,W),gr(W,Q),W.return=J,W;case R:return Q=Pa(Q,J.mode,W),Q.return=J,Q;case pt:return Q=xs(Q),ot(J,Q,W)}if(Dt(Q)||vt(Q))return Q=Vi(Q,J.mode,W,null),Q.return=J,Q;if(typeof Q.then=="function")return ot(J,Go(Q),W);if(Q.$$typeof===B)return ot(J,mr(J,Q),W);vr(J,Q)}return null}function tt(J,Q,W,rt){var zt=Q!==null?Q.key:null;if(typeof W=="string"&&W!==""||typeof W=="number"||typeof W=="bigint")return zt!==null?null:z(J,Q,""+W,rt);if(typeof W=="object"&&W!==null){switch(W.$$typeof){case E:return W.key===zt?Y(J,Q,W,rt):null;case R:return W.key===zt?F(J,Q,W,rt):null;case pt:return W=xs(W),tt(J,Q,W,rt)}if(Dt(W)||vt(W))return zt!==null?null:lt(J,Q,W,rt,null);if(typeof W.then=="function")return tt(J,Q,Go(W),rt);if(W.$$typeof===B)return tt(J,Q,mr(J,W),rt);vr(J,W)}return null}function it(J,Q,W,rt,zt){if(typeof rt=="string"&&rt!==""||typeof rt=="number"||typeof rt=="bigint")return J=J.get(W)||null,z(Q,J,""+rt,zt);if(typeof rt=="object"&&rt!==null){switch(rt.$$typeof){case E:return J=J.get(rt.key===null?W:rt.key)||null,Y(Q,J,rt,zt);case R:return J=J.get(rt.key===null?W:rt.key)||null,F(Q,J,rt,zt);case pt:return rt=xs(rt),it(J,Q,W,rt,zt)}if(Dt(rt)||vt(rt))return J=J.get(W)||null,lt(Q,J,rt,zt,null);if(typeof rt.then=="function")return it(J,Q,W,Go(rt),zt);if(rt.$$typeof===B)return it(J,Q,W,mr(Q,rt),zt);vr(Q,rt)}return null}function Et(J,Q,W,rt){for(var zt=null,me=null,Ct=Q,Zt=Q=0,ee=null;Ct!==null&&Zt<W.length;Zt++){Ct.index>Zt?(ee=Ct,Ct=null):ee=Ct.sibling;var pe=tt(J,Ct,W[Zt],rt);if(pe===null){Ct===null&&(Ct=ee);break}e&&Ct&&pe.alternate===null&&a(J,Ct),Q=x(pe,Q,Zt),me===null?zt=pe:me.sibling=pe,me=pe,Ct=ee}if(Zt===W.length)return r(J,Ct),Ft&&Qi(J,Zt),zt;if(Ct===null){for(;Zt<W.length;Zt++)Ct=ot(J,W[Zt],rt),Ct!==null&&(Q=x(Ct,Q,Zt),me===null?zt=Ct:me.sibling=Ct,me=Ct);return Ft&&Qi(J,Zt),zt}for(Ct=c(Ct);Zt<W.length;Zt++)ee=it(Ct,J,Zt,W[Zt],rt),ee!==null&&(e&&ee.alternate!==null&&Ct.delete(ee.key===null?Zt:ee.key),Q=x(ee,Q,Zt),me===null?zt=ee:me.sibling=ee,me=ee);return e&&Ct.forEach(function(Nu){return a(J,Nu)}),Ft&&Qi(J,Zt),zt}function Bt(J,Q,W,rt){if(W==null)throw Error(s(151));for(var zt=null,me=null,Ct=Q,Zt=Q=0,ee=null,pe=W.next();Ct!==null&&!pe.done;Zt++,pe=W.next()){Ct.index>Zt?(ee=Ct,Ct=null):ee=Ct.sibling;var Nu=tt(J,Ct,pe.value,rt);if(Nu===null){Ct===null&&(Ct=ee);break}e&&Ct&&Nu.alternate===null&&a(J,Ct),Q=x(Nu,Q,Zt),me===null?zt=Nu:me.sibling=Nu,me=Nu,Ct=ee}if(pe.done)return r(J,Ct),Ft&&Qi(J,Zt),zt;if(Ct===null){for(;!pe.done;Zt++,pe=W.next())pe=ot(J,pe.value,rt),pe!==null&&(Q=x(pe,Q,Zt),me===null?zt=pe:me.sibling=pe,me=pe);return Ft&&Qi(J,Zt),zt}for(Ct=c(Ct);!pe.done;Zt++,pe=W.next())pe=it(Ct,J,Zt,pe.value,rt),pe!==null&&(e&&pe.alternate!==null&&Ct.delete(pe.key===null?Zt:pe.key),Q=x(pe,Q,Zt),me===null?zt=pe:me.sibling=pe,me=pe);return e&&Ct.forEach(function(GS){return a(J,GS)}),Ft&&Qi(J,Zt),zt}function Te(J,Q,W,rt){if(typeof W=="object"&&W!==null&&W.type===D&&W.key===null&&(W=W.props.children),typeof W=="object"&&W!==null){switch(W.$$typeof){case E:t:{for(var zt=W.key;Q!==null;){if(Q.key===zt){if(zt=W.type,zt===D){if(Q.tag===7){r(J,Q.sibling),rt=p(Q,W.props.children),rt.return=J,J=rt;break t}}else if(Q.elementType===zt||typeof zt=="object"&&zt!==null&&zt.$$typeof===pt&&xs(zt)===Q.type){r(J,Q.sibling),rt=p(Q,W.props),gr(rt,W),rt.return=J,J=rt;break t}r(J,Q);break}else a(J,Q);Q=Q.sibling}W.type===D?(rt=Vi(W.props.children,J.mode,rt,W.key),rt.return=J,J=rt):(rt=cr(W.type,W.key,W.props,null,J.mode,rt),gr(rt,W),rt.return=J,J=rt)}return C(J);case R:t:{for(zt=W.key;Q!==null;){if(Q.key===zt)if(Q.tag===4&&Q.stateNode.containerInfo===W.containerInfo&&Q.stateNode.implementation===W.implementation){r(J,Q.sibling),rt=p(Q,W.children||[]),rt.return=J,J=rt;break t}else{r(J,Q);break}else a(J,Q);Q=Q.sibling}rt=Pa(W,J.mode,rt),rt.return=J,J=rt}return C(J);case pt:return W=xs(W),Te(J,Q,W,rt)}if(Dt(W))return Et(J,Q,W,rt);if(vt(W)){if(zt=vt(W),typeof zt!="function")throw Error(s(150));return W=zt.call(W),Bt(J,Q,W,rt)}if(typeof W.then=="function")return Te(J,Q,Go(W),rt);if(W.$$typeof===B)return Te(J,Q,mr(J,W),rt);vr(J,W)}return typeof W=="string"&&W!==""||typeof W=="number"||typeof W=="bigint"?(W=""+W,Q!==null&&Q.tag===6?(r(J,Q.sibling),rt=p(Q,W),rt.return=J,J=rt):(r(J,Q),rt=Do(W,J.mode,rt),rt.return=J,J=rt),C(J)):r(J,Q)}return function(J,Q,W,rt){try{Gl=0;var zt=Te(J,Q,W,rt);return Hl=null,zt}catch(Ct){if(Ct===wl||Ct===Ia)throw Ct;var me=Hn(29,Ct,null,J.mode);return me.lanes=rt,me.return=J,me}finally{}}}var _s=hu(!0),Nd=hu(!1),jl=!1;function Tf(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Ef(e,a){e=e.updateQueue,a.updateQueue===e&&(a.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,callbacks:null})}function _i(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function Wi(e,a,r){var c=e.updateQueue;if(c===null)return null;if(c=c.shared,($t&2)!==0){var p=c.pending;return p===null?a.next=a:(a.next=p.next,p.next=a),c.pending=a,a=uu(e),zo(e,null,r),a}return or(e,c,a,r),uu(e)}function ql(e,a,r){if(a=a.updateQueue,a!==null&&(a=a.shared,(r&4194048)!==0)){var c=a.lanes;c&=e.pendingLanes,r|=c,a.lanes=r,to(e,r)}}function jo(e,a){var r=e.updateQueue,c=e.alternate;if(c!==null&&(c=c.updateQueue,r===c)){var p=null,x=null;if(r=r.firstBaseUpdate,r!==null){do{var C={lane:r.lane,tag:r.tag,payload:r.payload,callback:null,next:null};x===null?p=x=C:x=x.next=C,r=r.next}while(r!==null);x===null?p=x=a:x=x.next=a}else p=x=a;r={baseState:c.baseState,firstBaseUpdate:p,lastBaseUpdate:x,shared:c.shared,callbacks:c.callbacks},e.updateQueue=r;return}e=r.lastBaseUpdate,e===null?r.firstBaseUpdate=a:e.next=a,r.lastBaseUpdate=a}var Cf=!1;function xr(){if(Cf){var e=Fa;if(e!==null)throw e}}function Ss(e,a,r,c){Cf=!1;var p=e.updateQueue;jl=!1;var x=p.firstBaseUpdate,C=p.lastBaseUpdate,z=p.shared.pending;if(z!==null){p.shared.pending=null;var Y=z,F=Y.next;Y.next=null,C===null?x=F:C.next=F,C=Y;var lt=e.alternate;lt!==null&&(lt=lt.updateQueue,z=lt.lastBaseUpdate,z!==C&&(z===null?lt.firstBaseUpdate=F:z.next=F,lt.lastBaseUpdate=Y))}if(x!==null){var ot=p.baseState;C=0,lt=F=Y=null,z=x;do{var tt=z.lane&-536870913,it=tt!==z.lane;if(it?(Wt&tt)===tt:(c&tt)===tt){tt!==0&&tt===Pi&&(Cf=!0),lt!==null&&(lt=lt.next={lane:0,tag:z.tag,payload:z.payload,callback:null,next:null});t:{var Et=e,Bt=z;tt=a;var Te=r;switch(Bt.tag){case 1:if(Et=Bt.payload,typeof Et=="function"){ot=Et.call(Te,ot,tt);break t}ot=Et;break t;case 3:Et.flags=Et.flags&-65537|128;case 0:if(Et=Bt.payload,tt=typeof Et=="function"?Et.call(Te,ot,tt):Et,tt==null)break t;ot=b({},ot,tt);break t;case 2:jl=!0}}tt=z.callback,tt!==null&&(e.flags|=64,it&&(e.flags|=8192),it=p.callbacks,it===null?p.callbacks=[tt]:it.push(tt))}else it={lane:tt,tag:z.tag,payload:z.payload,callback:z.callback,next:null},lt===null?(F=lt=it,Y=ot):lt=lt.next=it,C|=tt;if(z=z.next,z===null){if(z=p.shared.pending,z===null)break;it=z,z=it.next,it.next=null,p.lastBaseUpdate=it,p.shared.pending=null}}while(!0);lt===null&&(Y=ot),p.baseState=Y,p.firstBaseUpdate=F,p.lastBaseUpdate=lt,x===null&&(p.shared.lanes=0),Ea|=C,e.lanes=C,e.memoizedState=ot}}function Si(e,a){if(typeof e!="function")throw Error(s(191,e));e.call(a)}function gn(e,a){var r=e.callbacks;if(r!==null)for(e.callbacks=null,e=0;e<r.length;e++)Si(r[e],a)}var ma=j(null),jn=j(0);function Af(e,a){e=Qe,st(jn,e),st(ma,a),Qe=e|a.baseLanes}function Mf(){st(jn,Qe),st(ma,ma.current)}function Mn(){Qe=jn.current,I(ma),I(jn)}var an=j(null),Ha=null;function Yl(e){var a=e.alternate;st(Ue,Ue.current&1),st(an,e),Ha===null&&(a===null||ma.current!==null||a.memoizedState!==null)&&(Ha=e)}function Rf(e){st(Ue,Ue.current),st(an,e),Ha===null&&(Ha=e)}function Ud(e){e.tag===22?(st(Ue,Ue.current),st(an,e),Ha===null&&(Ha=e)):Fi()}function Fi(){st(Ue,Ue.current),st(an,an.current)}function pa(e){I(an),Ha===e&&(Ha=null),I(Ue)}var Ue=j(0);function qo(e){for(var a=e;a!==null;){if(a.tag===13){var r=a.memoizedState;if(r!==null&&(r=r.dehydrated,r===null||Lp(r)||Xp(r)))return a}else if(a.tag===19&&(a.memoizedProps.revealOrder==="forwards"||a.memoizedProps.revealOrder==="backwards"||a.memoizedProps.revealOrder==="unstable_legacy-backwards"||a.memoizedProps.revealOrder==="together")){if((a.flags&128)!==0)return a}else if(a.child!==null){a.child.return=a,a=a.child;continue}if(a===e)break;for(;a.sibling===null;){if(a.return===null||a.return===e)return null;a=a.return}a.sibling.return=a.return,a=a.sibling}return null}var Wn=0,wt=null,ge=null,We=null,Yo=!1,bi=!1,bs=!1,Lo=0,_r=0,Ti=null,xp=0;function Be(){throw Error(s(321))}function zf(e,a){if(a===null)return!1;for(var r=0;r<a.length&&r<e.length;r++)if(!Me(e[r],a[r]))return!1;return!0}function Df(e,a,r,c,p,x){return Wn=x,wt=a,a.memoizedState=null,a.updateQueue=null,a.lanes=0,w.H=e===null||e.memoizedState===null?$d:pu,bs=!1,x=r(c,p),bs=!1,bi&&(x=wd(a,r,c,p)),Bd(e),x}function Bd(e){w.H=Cr;var a=ge!==null&&ge.next!==null;if(Wn=0,We=ge=wt=null,Yo=!1,_r=0,Ti=null,a)throw Error(s(300));e===null||Re||(e=e.dependencies,e!==null&&ou(e)&&(Re=!0))}function wd(e,a,r,c){wt=e;var p=0;do{if(bi&&(Ti=null),_r=0,bi=!1,25<=p)throw Error(s(301));if(p+=1,We=ge=null,e.updateQueue!=null){var x=e.updateQueue;x.lastEffect=null,x.events=null,x.stores=null,x.memoCache!=null&&(x.memoCache.index=0)}w.H=Ar,x=a(r,c)}while(bi);return x}function _p(){var e=w.H,a=e.useState()[0];return a=typeof a.then=="function"?br(a):a,e=e.useState()[0],(ge!==null?ge.memoizedState:null)!==e&&(wt.flags|=1024),a}function Of(){var e=Lo!==0;return Lo=0,e}function Nf(e,a,r){a.updateQueue=e.updateQueue,a.flags&=-2053,e.lanes&=~r}function Uf(e){if(Yo){for(e=e.memoizedState;e!==null;){var a=e.queue;a!==null&&(a.pending=null),e=e.next}Yo=!1}Wn=0,We=ge=wt=null,bi=!1,_r=Lo=0,Ti=null}function qn(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return We===null?wt.memoizedState=We=e:We=We.next=e,We}function Ye(){if(ge===null){var e=wt.alternate;e=e!==null?e.memoizedState:null}else e=ge.next;var a=We===null?wt.memoizedState:We.next;if(a!==null)We=a,ge=e;else{if(e===null)throw wt.alternate===null?Error(s(467)):Error(s(310));ge=e,e={memoizedState:ge.memoizedState,baseState:ge.baseState,baseQueue:ge.baseQueue,queue:ge.queue,next:null},We===null?wt.memoizedState=We=e:We=We.next=e}return We}function Sr(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function br(e){var a=_r;return _r+=1,Ti===null&&(Ti=[]),e=Sf(Ti,e,a),a=wt,(We===null?a.memoizedState:We.next)===null&&(a=a.alternate,w.H=a===null||a.memoizedState===null?$d:pu),e}function Xo(e){if(e!==null&&typeof e=="object"){if(typeof e.then=="function")return br(e);if(e.$$typeof===B)return hn(e)}throw Error(s(438,String(e)))}function Bf(e){var a=null,r=wt.updateQueue;if(r!==null&&(a=r.memoCache),a==null){var c=wt.alternate;c!==null&&(c=c.updateQueue,c!==null&&(c=c.memoCache,c!=null&&(a={data:c.data.map(function(p){return p.slice()}),index:0})))}if(a==null&&(a={data:[],index:0}),r===null&&(r=Sr(),wt.updateQueue=r),r.memoCache=a,r=a.data[a.index],r===void 0)for(r=a.data[a.index]=Array(e),c=0;c<e;c++)r[c]=ht;return a.index++,r}function Ii(e,a){return typeof a=="function"?a(e):a}function Vo(e){var a=Ye();return wf(a,ge,e)}function wf(e,a,r){var c=e.queue;if(c===null)throw Error(s(311));c.lastRenderedReducer=r;var p=e.baseQueue,x=c.pending;if(x!==null){if(p!==null){var C=p.next;p.next=x.next,x.next=C}a.baseQueue=p=x,c.pending=null}if(x=e.baseState,p===null)e.memoizedState=x;else{a=p.next;var z=C=null,Y=null,F=a,lt=!1;do{var ot=F.lane&-536870913;if(ot!==F.lane?(Wt&ot)===ot:(Wn&ot)===ot){var tt=F.revertLane;if(tt===0)Y!==null&&(Y=Y.next={lane:0,revertLane:0,gesture:null,action:F.action,hasEagerState:F.hasEagerState,eagerState:F.eagerState,next:null}),ot===Pi&&(lt=!0);else if((Wn&tt)===tt){F=F.next,tt===Pi&&(lt=!0);continue}else ot={lane:0,revertLane:F.revertLane,gesture:null,action:F.action,hasEagerState:F.hasEagerState,eagerState:F.eagerState,next:null},Y===null?(z=Y=ot,C=x):Y=Y.next=ot,wt.lanes|=tt,Ea|=tt;ot=F.action,bs&&r(x,ot),x=F.hasEagerState?F.eagerState:r(x,ot)}else tt={lane:ot,revertLane:F.revertLane,gesture:F.gesture,action:F.action,hasEagerState:F.hasEagerState,eagerState:F.eagerState,next:null},Y===null?(z=Y=tt,C=x):Y=Y.next=tt,wt.lanes|=ot,Ea|=ot;F=F.next}while(F!==null&&F!==a);if(Y===null?C=x:Y.next=z,!Me(x,e.memoizedState)&&(Re=!0,lt&&(r=Fa,r!==null)))throw r;e.memoizedState=x,e.baseState=C,e.baseQueue=Y,c.lastRenderedState=x}return p===null&&(c.lanes=0),[e.memoizedState,c.dispatch]}function Qo(e){var a=Ye(),r=a.queue;if(r===null)throw Error(s(311));r.lastRenderedReducer=e;var c=r.dispatch,p=r.pending,x=a.memoizedState;if(p!==null){r.pending=null;var C=p=p.next;do x=e(x,C.action),C=C.next;while(C!==p);Me(x,a.memoizedState)||(Re=!0),a.memoizedState=x,a.baseQueue===null&&(a.baseState=x),r.lastRenderedState=x}return[x,c]}function Hf(e,a,r){var c=wt,p=Ye(),x=Ft;if(x){if(r===void 0)throw Error(s(407));r=r()}else r=a();var C=!Me((ge||p).memoizedState,r);if(C&&(p.memoizedState=r,Re=!0),p=p.queue,Lf(jf.bind(null,c,p,e),[e]),p.getSnapshot!==a||C||We!==null&&We.memoizedState.tag&1){if(c.flags|=2048,du(9,{destroy:void 0},Gf.bind(null,c,p,r,a),null),he===null)throw Error(s(349));x||(Wn&127)!==0||Hd(c,a,r)}return r}function Hd(e,a,r){e.flags|=16384,e={getSnapshot:a,value:r},a=wt.updateQueue,a===null?(a=Sr(),wt.updateQueue=a,a.stores=[e]):(r=a.stores,r===null?a.stores=[e]:r.push(e))}function Gf(e,a,r,c){a.value=r,a.getSnapshot=c,qf(a)&&Zo(e)}function jf(e,a,r){return r(function(){qf(a)&&Zo(e)})}function qf(e){var a=e.getSnapshot;e=e.value;try{var r=a();return!Me(e,r)}catch{return!0}}function Zo(e){var a=Dl(e,2);a!==null&&u(a,e,2)}function Tr(e){var a=qn();if(typeof e=="function"){var r=e;if(e=r(),bs){Ba(!0);try{r()}finally{Ba(!1)}}}return a.memoizedState=a.baseState=e,a.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Ii,lastRenderedState:e},a}function Gd(e,a,r,c){return e.baseState=r,wf(e,ge,typeof c=="function"?c:Ii)}function Sp(e,a,r,c,p){if($i(e))throw Error(s(485));if(e=a.action,e!==null){var x={payload:p,action:e,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(C){x.listeners.push(C)}};w.T!==null?r(!0):x.isTransition=!1,c(x),r=a.pending,r===null?(x.next=a.pending=x,jd(a,x)):(x.next=r.next,a.pending=r.next=x)}}function jd(e,a){var r=a.action,c=a.payload,p=e.state;if(a.isTransition){var x=w.T,C={};w.T=C;try{var z=r(p,c),Y=w.S;Y!==null&&Y(C,z),qd(e,a,z)}catch(F){Ko(e,a,F)}finally{x!==null&&C.types!==null&&(x.types=C.types),w.T=x}}else try{x=r(p,c),qd(e,a,x)}catch(F){Ko(e,a,F)}}function qd(e,a,r){r!==null&&typeof r=="object"&&typeof r.then=="function"?r.then(function(c){Yf(e,a,c)},function(c){return Ko(e,a,c)}):Yf(e,a,r)}function Yf(e,a,r){a.status="fulfilled",a.value=r,Yd(a),e.state=r,a=e.pending,a!==null&&(r=a.next,r===a?e.pending=null:(r=r.next,a.next=r,jd(e,r)))}function Ko(e,a,r){var c=e.pending;if(e.pending=null,c!==null){c=c.next;do a.status="rejected",a.reason=r,Yd(a),a=a.next;while(a!==c)}e.action=null}function Yd(e){e=e.listeners;for(var a=0;a<e.length;a++)(0,e[a])()}function Ld(e,a){return a}function Xd(e,a){if(Ft){var r=he.formState;if(r!==null){t:{var c=wt;if(Ft){if(_e){e:{for(var p=_e,x=fn;p.nodeType!==8;){if(!x){p=null;break e}if(p=zi(p.nextSibling),p===null){p=null;break e}}x=p.data,p=x==="F!"||x==="F"?p:null}if(p){_e=zi(p.nextSibling),c=p.data==="F!";break t}}Pt(c)}c=!1}c&&(a=r[0])}}return r=qn(),r.memoizedState=r.baseState=a,c={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Ld,lastRenderedState:a},r.queue=c,r=Id.bind(null,wt,c),c.dispatch=r,c=Tr(!1),x=Er.bind(null,wt,!1,c.queue),c=qn(),p={state:a,dispatch:null,action:e,pending:null},c.queue=p,r=Sp.bind(null,wt,p,x,r),p.dispatch=r,c.memoizedState=e,[a,r,!1]}function Vd(e){var a=Ye();return Qd(a,ge,e)}function Qd(e,a,r){if(a=wf(e,a,Ld)[0],e=Vo(Ii)[0],typeof a=="object"&&a!==null&&typeof a.then=="function")try{var c=br(a)}catch(C){throw C===wl?Ia:C}else c=a;a=Ye();var p=a.queue,x=p.dispatch;return r!==a.memoizedState&&(wt.flags|=2048,du(9,{destroy:void 0},bp.bind(null,p,r),null)),[c,x,e]}function bp(e,a){e.action=a}function Zd(e){var a=Ye(),r=ge;if(r!==null)return Qd(a,r,e);Ye(),a=a.memoizedState,r=Ye();var c=r.queue.dispatch;return r.memoizedState=e,[a,c,!1]}function du(e,a,r,c){return e={tag:e,create:r,deps:c,inst:a,next:null},a=wt.updateQueue,a===null&&(a=Sr(),wt.updateQueue=a),r=a.lastEffect,r===null?a.lastEffect=e.next=e:(c=r.next,r.next=e,e.next=c,a.lastEffect=e),e}function Kd(){return Ye().memoizedState}function ko(e,a,r,c){var p=qn();wt.flags|=e,p.memoizedState=du(1|a,{destroy:void 0},r,c===void 0?null:c)}function Jo(e,a,r,c){var p=Ye();c=c===void 0?null:c;var x=p.memoizedState.inst;ge!==null&&c!==null&&zf(c,ge.memoizedState.deps)?p.memoizedState=du(a,x,r,c):(wt.flags|=e,p.memoizedState=du(1|a,x,r,c))}function kd(e,a){ko(8390656,8,e,a)}function Lf(e,a){Jo(2048,8,e,a)}function Jd(e){wt.flags|=4;var a=wt.updateQueue;if(a===null)a=Sr(),wt.updateQueue=a,a.events=[e];else{var r=a.events;r===null?a.events=[e]:r.push(e)}}function Pd(e){var a=Ye().memoizedState;return Jd({ref:a,nextImpl:e}),function(){if(($t&2)!==0)throw Error(s(440));return a.impl.apply(void 0,arguments)}}function Wd(e,a){return Jo(4,2,e,a)}function ya(e,a){return Jo(4,4,e,a)}function Xf(e,a){if(typeof a=="function"){e=e();var r=a(e);return function(){typeof r=="function"?r():a(null)}}if(a!=null)return e=e(),a.current=e,function(){a.current=null}}function Po(e,a,r){r=r!=null?r.concat([e]):null,Jo(4,4,Xf.bind(null,a,e),r)}function Wo(){}function Vf(e,a){var r=Ye();a=a===void 0?null:a;var c=r.memoizedState;return a!==null&&zf(a,c[1])?c[0]:(r.memoizedState=[e,a],e)}function Qf(e,a){var r=Ye();a=a===void 0?null:a;var c=r.memoizedState;if(a!==null&&zf(a,c[1]))return c[0];if(c=e(),bs){Ba(!0);try{e()}finally{Ba(!1)}}return r.memoizedState=[c,a],c}function Zf(e,a,r){return r===void 0||(Wn&1073741824)!==0&&(Wt&261930)===0?e.memoizedState=a:(e.memoizedState=r,e=l(),wt.lanes|=e,Ea|=e,r)}function Kf(e,a,r,c){return Me(r,a)?r:ma.current!==null?(e=Zf(e,r,c),Me(e,a)||(Re=!0),e):(Wn&42)===0||(Wn&1073741824)!==0&&(Wt&261930)===0?(Re=!0,e.memoizedState=r):(e=l(),wt.lanes|=e,Ea|=e,a)}function kf(e,a,r,c,p){var x=H.p;H.p=x!==0&&8>x?x:8;var C=w.T,z={};w.T=z,Er(e,!1,a,r);try{var Y=p(),F=w.S;if(F!==null&&F(z,Y),Y!==null&&typeof Y=="object"&&typeof Y.then=="function"){var lt=_f(Y,c);mu(e,a,lt,Ln(e))}else mu(e,a,c,Ln(e))}catch(ot){mu(e,a,{then:function(){},status:"rejected",reason:ot},Ln())}finally{H.p=x,C!==null&&z.types!==null&&(C.types=z.types),w.T=C}}function Tp(){}function Jf(e,a,r,c){if(e.tag!==5)throw Error(s(476));var p=Fd(e).queue;kf(e,p,a,at,r===null?Tp:function(){return Pf(e),r(c)})}function Fd(e){var a=e.memoizedState;if(a!==null)return a;a={memoizedState:at,baseState:at,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Ii,lastRenderedState:at},next:null};var r={};return a.next={memoizedState:r,baseState:r,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Ii,lastRenderedState:r},next:null},e.memoizedState=a,e=e.alternate,e!==null&&(e.memoizedState=a),a}function Pf(e){var a=Fd(e);a.next===null&&(a=e.alternate.memoizedState),mu(e,a.next.queue,{},Ln())}function Wf(){return hn(oh)}function vn(){return Ye().memoizedState}function Ff(){return Ye().memoizedState}function Ep(e){for(var a=e.return;a!==null;){switch(a.tag){case 24:case 3:var r=Ln();e=_i(r);var c=Wi(a,e,r);c!==null&&(u(c,a,r),ql(c,a,r)),a={cache:gf()},e.payload=a;return}a=a.return}}function Cp(e,a,r){var c=Ln();r={lane:c,revertLane:0,gesture:null,action:r,hasEagerState:!1,eagerState:null,next:null},$i(e)?Ts(a,r):(r=su(e,a,r,c),r!==null&&(u(r,e,c),Fn(r,a,c)))}function Id(e,a,r){var c=Ln();mu(e,a,r,c)}function mu(e,a,r,c){var p={lane:c,revertLane:0,gesture:null,action:r,hasEagerState:!1,eagerState:null,next:null};if($i(e))Ts(a,p);else{var x=e.alternate;if(e.lanes===0&&(x===null||x.lanes===0)&&(x=a.lastRenderedReducer,x!==null))try{var C=a.lastRenderedState,z=x(C,r);if(p.hasEagerState=!0,p.eagerState=z,Me(z,C))return or(e,a,p,0),he===null&&zl(),!1}catch{}finally{}if(r=su(e,a,p,c),r!==null)return u(r,e,c),Fn(r,a,c),!0}return!1}function Er(e,a,r,c){if(c={lane:2,revertLane:zp(),gesture:null,action:c,hasEagerState:!1,eagerState:null,next:null},$i(e)){if(a)throw Error(s(479))}else a=su(e,r,c,2),a!==null&&u(a,e,2)}function $i(e){var a=e.alternate;return e===wt||a!==null&&a===wt}function Ts(e,a){bi=Yo=!0;var r=e.pending;r===null?a.next=a:(a.next=r.next,r.next=a),e.pending=a}function Fn(e,a,r){if((r&4194048)!==0){var c=a.lanes;c&=e.pendingLanes,r|=c,a.lanes=r,to(e,r)}}var Cr={readContext:hn,use:Xo,useCallback:Be,useContext:Be,useEffect:Be,useImperativeHandle:Be,useLayoutEffect:Be,useInsertionEffect:Be,useMemo:Be,useReducer:Be,useRef:Be,useState:Be,useDebugValue:Be,useDeferredValue:Be,useTransition:Be,useSyncExternalStore:Be,useId:Be,useHostTransitionStatus:Be,useFormState:Be,useActionState:Be,useOptimistic:Be,useMemoCache:Be,useCacheRefresh:Be};Cr.useEffectEvent=Be;var $d={readContext:hn,use:Xo,useCallback:function(e,a){return qn().memoizedState=[e,a===void 0?null:a],e},useContext:hn,useEffect:kd,useImperativeHandle:function(e,a,r){r=r!=null?r.concat([e]):null,ko(4194308,4,Xf.bind(null,a,e),r)},useLayoutEffect:function(e,a){return ko(4194308,4,e,a)},useInsertionEffect:function(e,a){ko(4,2,e,a)},useMemo:function(e,a){var r=qn();a=a===void 0?null:a;var c=e();if(bs){Ba(!0);try{e()}finally{Ba(!1)}}return r.memoizedState=[c,a],c},useReducer:function(e,a,r){var c=qn();if(r!==void 0){var p=r(a);if(bs){Ba(!0);try{r(a)}finally{Ba(!1)}}}else p=a;return c.memoizedState=c.baseState=p,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:p},c.queue=e,e=e.dispatch=Cp.bind(null,wt,e),[c.memoizedState,e]},useRef:function(e){var a=qn();return e={current:e},a.memoizedState=e},useState:function(e){e=Tr(e);var a=e.queue,r=Id.bind(null,wt,a);return a.dispatch=r,[e.memoizedState,r]},useDebugValue:Wo,useDeferredValue:function(e,a){var r=qn();return Zf(r,e,a)},useTransition:function(){var e=Tr(!1);return e=kf.bind(null,wt,e.queue,!0,!1),qn().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,a,r){var c=wt,p=qn();if(Ft){if(r===void 0)throw Error(s(407));r=r()}else{if(r=a(),he===null)throw Error(s(349));(Wt&127)!==0||Hd(c,a,r)}p.memoizedState=r;var x={value:r,getSnapshot:a};return p.queue=x,kd(jf.bind(null,c,x,e),[e]),c.flags|=2048,du(9,{destroy:void 0},Gf.bind(null,c,x,r,a),null),r},useId:function(){var e=qn(),a=he.identifierPrefix;if(Ft){var r=vi,c=gi;r=(c&~(1<<32-Bn(c)-1)).toString(32)+r,a="_"+a+"R_"+r,r=Lo++,0<r&&(a+="H"+r.toString(32)),a+="_"}else r=xp++,a="_"+a+"r_"+r.toString(32)+"_";return e.memoizedState=a},useHostTransitionStatus:Wf,useFormState:Xd,useActionState:Xd,useOptimistic:function(e){var a=qn();a.memoizedState=a.baseState=e;var r={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return a.queue=r,a=Er.bind(null,wt,!0,r),r.dispatch=a,[e,a]},useMemoCache:Bf,useCacheRefresh:function(){return qn().memoizedState=Ep.bind(null,wt)},useEffectEvent:function(e){var a=qn(),r={impl:e};return a.memoizedState=r,function(){if(($t&2)!==0)throw Error(s(440));return r.impl.apply(void 0,arguments)}}},pu={readContext:hn,use:Xo,useCallback:Vf,useContext:hn,useEffect:Lf,useImperativeHandle:Po,useInsertionEffect:Wd,useLayoutEffect:ya,useMemo:Qf,useReducer:Vo,useRef:Kd,useState:function(){return Vo(Ii)},useDebugValue:Wo,useDeferredValue:function(e,a){var r=Ye();return Kf(r,ge.memoizedState,e,a)},useTransition:function(){var e=Vo(Ii)[0],a=Ye().memoizedState;return[typeof e=="boolean"?e:br(e),a]},useSyncExternalStore:Hf,useId:vn,useHostTransitionStatus:Wf,useFormState:Vd,useActionState:Vd,useOptimistic:function(e,a){var r=Ye();return Gd(r,ge,e,a)},useMemoCache:Bf,useCacheRefresh:Ff};pu.useEffectEvent=Pd;var Ar={readContext:hn,use:Xo,useCallback:Vf,useContext:hn,useEffect:Lf,useImperativeHandle:Po,useInsertionEffect:Wd,useLayoutEffect:ya,useMemo:Qf,useReducer:Qo,useRef:Kd,useState:function(){return Qo(Ii)},useDebugValue:Wo,useDeferredValue:function(e,a){var r=Ye();return ge===null?Zf(r,e,a):Kf(r,ge.memoizedState,e,a)},useTransition:function(){var e=Qo(Ii)[0],a=Ye().memoizedState;return[typeof e=="boolean"?e:br(e),a]},useSyncExternalStore:Hf,useId:vn,useHostTransitionStatus:Wf,useFormState:Zd,useActionState:Zd,useOptimistic:function(e,a){var r=Ye();return ge!==null?Gd(r,ge,e,a):(r.baseState=e,[e,r.queue.dispatch])},useMemoCache:Bf,useCacheRefresh:Ff};Ar.useEffectEvent=Pd;function yu(e,a,r,c){a=e.memoizedState,r=r(c,a),r=r==null?a:b({},a,r),e.memoizedState=r,e.lanes===0&&(e.updateQueue.baseState=r)}var Mr={enqueueSetState:function(e,a,r){e=e._reactInternals;var c=Ln(),p=_i(c);p.payload=a,r!=null&&(p.callback=r),a=Wi(e,p,c),a!==null&&(u(a,e,c),ql(a,e,c))},enqueueReplaceState:function(e,a,r){e=e._reactInternals;var c=Ln(),p=_i(c);p.tag=1,p.payload=a,r!=null&&(p.callback=r),a=Wi(e,p,c),a!==null&&(u(a,e,c),ql(a,e,c))},enqueueForceUpdate:function(e,a){e=e._reactInternals;var r=Ln(),c=_i(r);c.tag=2,a!=null&&(c.callback=a),a=Wi(e,c,r),a!==null&&(u(a,e,r),ql(a,e,r))}};function tm(e,a,r,c,p,x,C){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(c,x,C):a.prototype&&a.prototype.isPureReactComponent?!tu(r,c)||!tu(p,x):!0}function em(e,a,r,c){e=a.state,typeof a.componentWillReceiveProps=="function"&&a.componentWillReceiveProps(r,c),typeof a.UNSAFE_componentWillReceiveProps=="function"&&a.UNSAFE_componentWillReceiveProps(r,c),a.state!==e&&Mr.enqueueReplaceState(a,a.state,null)}function xn(e,a){var r=a;if("ref"in a){r={};for(var c in a)c!=="ref"&&(r[c]=a[c])}if(e=e.defaultProps){r===a&&(r=b({},r));for(var p in e)r[p]===void 0&&(r[p]=e[p])}return r}function If(e){Rl(e)}function nm(e){console.error(e)}function Fo(e){Rl(e)}function Io(e,a){try{var r=e.onUncaughtError;r(a.value,{componentStack:a.stack})}catch(c){setTimeout(function(){throw c})}}function am(e,a,r){try{var c=e.onCaughtError;c(r.value,{componentStack:r.stack,errorBoundary:a.tag===1?a.stateNode:null})}catch(p){setTimeout(function(){throw p})}}function $f(e,a,r){return r=_i(r),r.tag=3,r.payload={element:null},r.callback=function(){Io(e,a)},r}function gu(e){return e=_i(e),e.tag=3,e}function In(e,a,r,c){var p=r.type.getDerivedStateFromError;if(typeof p=="function"){var x=c.value;e.payload=function(){return p(x)},e.callback=function(){am(a,r,c)}}var C=r.stateNode;C!==null&&typeof C.componentDidCatch=="function"&&(e.callback=function(){am(a,r,c),typeof p!="function"&&(Ri===null?Ri=new Set([this]):Ri.add(this));var z=c.stack;this.componentDidCatch(c.value,{componentStack:z!==null?z:""})})}function ga(e,a,r,c,p){if(r.flags|=32768,c!==null&&typeof c=="object"&&typeof c.then=="function"){if(a=r.alternate,a!==null&&Ul(a,r,p,!0),r=an.current,r!==null){switch(r.tag){case 31:case 13:return Ha===null?Gt():r.alternate===null&&de===0&&(de=3),r.flags&=-257,r.flags|=65536,r.lanes=p,c===yr?r.flags|=16384:(a=r.updateQueue,a===null?r.updateQueue=new Set([c]):a.add(c),Ap(e,c,p)),!1;case 22:return r.flags|=65536,c===yr?r.flags|=16384:(a=r.updateQueue,a===null?(a={transitions:null,markerInstances:null,retryQueue:new Set([c])},r.updateQueue=a):(r=a.retryQueue,r===null?a.retryQueue=new Set([c]):r.add(c)),Ap(e,c,p)),!1}throw Error(s(435,r.tag))}return Ap(e,c,p),Gt(),!1}if(Ft)return a=an.current,a!==null?((a.flags&65536)===0&&(a.flags|=256),a.flags|=65536,a.lanes=p,c!==No&&(e=Error(s(422),{cause:c}),dr(Jn(e,r)))):(c!==No&&(a=Error(s(423),{cause:c}),dr(Jn(a,r))),e=e.current.alternate,e.flags|=65536,p&=-p,e.lanes|=p,c=Jn(c,r),p=$f(e.stateNode,c,p),jo(e,p),de!==4&&(de=2)),!1;var x=Error(s(520),{cause:c});if(x=Jn(x,r),ai===null?ai=[x]:ai.push(x),de!==4&&(de=2),a===null)return!0;c=Jn(c,r),r=a;do{switch(r.tag){case 3:return r.flags|=65536,e=p&-p,r.lanes|=e,e=$f(r.stateNode,c,e),jo(r,e),!1;case 1:if(a=r.type,x=r.stateNode,(r.flags&128)===0&&(typeof a.getDerivedStateFromError=="function"||x!==null&&typeof x.componentDidCatch=="function"&&(Ri===null||!Ri.has(x))))return r.flags|=65536,p&=-p,r.lanes|=p,p=gu(p),In(p,e,r,c),jo(r,p),!1}r=r.return}while(r!==null);return!1}var $o=Error(s(461)),Re=!1;function we(e,a,r,c){a.child=e===null?Nd(a,null,r,c):_s(a,e.child,r,c)}function Rr(e,a,r,c,p){r=r.render;var x=a.ref;if("ref"in c){var C={};for(var z in c)z!=="ref"&&(C[z]=c[z])}else C=c;return gs(a),c=Df(e,a,r,C,x,p),z=Of(),e!==null&&!Re?(Nf(e,a,p),ei(e,a,p)):(Ft&&z&&Oo(a),a.flags|=1,we(e,a,c,p),a.child)}function zr(e,a,r,c,p){if(e===null){var x=r.type;return typeof x=="function"&&!Gn(x)&&x.defaultProps===void 0&&r.compare===null?(a.tag=15,a.type=x,va(e,a,x,c,p)):(e=cr(r.type,null,c,a,a.mode,p),e.ref=a.ref,e.return=a,a.child=e)}if(x=e.child,!Xl(e,p)){var C=x.memoizedProps;if(r=r.compare,r=r!==null?r:tu,r(C,c)&&e.ref===a.ref)return ei(e,a,p)}return a.flags|=1,e=pi(x,c),e.ref=a.ref,e.return=a,a.child=e}function va(e,a,r,c,p){if(e!==null){var x=e.memoizedProps;if(tu(x,c)&&e.ref===a.ref)if(Re=!1,a.pendingProps=c=x,Xl(e,p))(e.flags&131072)!==0&&(Re=!0);else return a.lanes=e.lanes,ei(e,a,p)}return vu(e,a,r,c,p)}function xa(e,a,r,c){var p=c.children,x=e!==null?e.memoizedState:null;if(e===null&&a.stateNode===null&&(a.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),c.mode==="hidden"){if((a.flags&128)!==0){if(x=x!==null?x.baseLanes|r:r,e!==null){for(c=a.child=e.child,p=0;c!==null;)p=p|c.lanes|c.childLanes,c=c.sibling;c=p&~x}else c=0,a.child=null;return Ei(e,a,x,r,c)}if((r&536870912)!==0)a.memoizedState={baseLanes:0,cachePool:null},e!==null&&fu(a,x!==null?x.cachePool:null),x!==null?Af(a,x):Mf(),Ud(a);else return c=a.lanes=536870912,Ei(e,a,x!==null?x.baseLanes|r:r,r,c)}else x!==null?(fu(a,x.cachePool),Af(a,x),Fi(),a.memoizedState=null):(e!==null&&fu(a,null),Mf(),Fi());return we(e,a,p,r),a.child}function $a(e,a){return e!==null&&e.tag===22||a.stateNode!==null||(a.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),a.sibling}function Ei(e,a,r,c,p){var x=xi();return x=x===null?null:{parent:Mt._currentValue,pool:x},a.memoizedState={baseLanes:r,cachePool:x},e!==null&&fu(a,null),Mf(),Ud(a),e!==null&&Ul(e,a,c,!0),a.childLanes=p,null}function Ga(e,a){return a=xu({mode:a.mode,children:a.children},e.mode),a.ref=e.ref,e.child=a,a.return=e,a}function dn(e,a,r){return _s(a,e.child,null,r),e=Ga(a,a.pendingProps),e.flags|=2,pa(a),a.memoizedState=null,e}function Dr(e,a,r){var c=a.pendingProps,p=(a.flags&128)!==0;if(a.flags&=-129,e===null){if(Ft){if(c.mode==="hidden")return e=Ga(a,c),a.lanes=536870912,$a(null,e);if(Rf(a),(e=_e)?(e=h0(e,fn),e=e!==null&&e.data==="&"?e:null,e!==null&&(a.memoizedState={dehydrated:e,treeContext:yi!==null?{id:gi,overflow:vi}:null,retryLane:536870912,hydrationErrors:null},r=Ad(e),r.return=a,a.child=r,cn=a,_e=null)):e=null,e===null)throw Pt(a);return a.lanes=536870912,null}return Ga(a,c)}var x=e.memoizedState;if(x!==null){var C=x.dehydrated;if(Rf(a),p)if(a.flags&256)a.flags&=-257,a=dn(e,a,r);else if(a.memoizedState!==null)a.child=e.child,a.flags|=128,a=null;else throw Error(s(558));else if(Re||Ul(e,a,r,!1),p=(r&e.childLanes)!==0,Re||p){if(c=he,c!==null&&(C=eo(c,r),C!==0&&C!==x.retryLane))throw x.retryLane=C,Dl(e,C),u(c,e,C),$o;Gt(),a=dn(e,a,r)}else e=x.treeContext,_e=zi(C.nextSibling),cn=a,Ft=!0,Zi=null,fn=!1,e!==null&&hr(a,e),a=Ga(a,c),a.flags|=4096;return a}return e=pi(e.child,{mode:c.mode,children:c.children}),e.ref=a.ref,a.child=e,e.return=a,e}function ti(e,a){var r=a.ref;if(r===null)e!==null&&e.ref!==null&&(a.flags|=4194816);else{if(typeof r!="function"&&typeof r!="object")throw Error(s(284));(e===null||e.ref!==r)&&(a.flags|=4194816)}}function vu(e,a,r,c,p){return gs(a),r=Df(e,a,r,c,void 0,p),c=Of(),e!==null&&!Re?(Nf(e,a,p),ei(e,a,p)):(Ft&&c&&Oo(a),a.flags|=1,we(e,a,r,p),a.child)}function Rn(e,a,r,c,p,x){return gs(a),a.updateQueue=null,r=wd(a,c,r,p),Bd(e),c=Of(),e!==null&&!Re?(Nf(e,a,x),ei(e,a,x)):(Ft&&c&&Oo(a),a.flags|=1,we(e,a,r,x),a.child)}function _n(e,a,r,c,p){if(gs(a),a.stateNode===null){var x=Ol,C=r.contextType;typeof C=="object"&&C!==null&&(x=hn(C)),x=new r(c,x),a.memoizedState=x.state!==null&&x.state!==void 0?x.state:null,x.updater=Mr,a.stateNode=x,x._reactInternals=a,x=a.stateNode,x.props=c,x.state=a.memoizedState,x.refs={},Tf(a),C=r.contextType,x.context=typeof C=="object"&&C!==null?hn(C):Ol,x.state=a.memoizedState,C=r.getDerivedStateFromProps,typeof C=="function"&&(yu(a,r,C,c),x.state=a.memoizedState),typeof r.getDerivedStateFromProps=="function"||typeof x.getSnapshotBeforeUpdate=="function"||typeof x.UNSAFE_componentWillMount!="function"&&typeof x.componentWillMount!="function"||(C=x.state,typeof x.componentWillMount=="function"&&x.componentWillMount(),typeof x.UNSAFE_componentWillMount=="function"&&x.UNSAFE_componentWillMount(),C!==x.state&&Mr.enqueueReplaceState(x,x.state,null),Ss(a,c,x,p),xr(),x.state=a.memoizedState),typeof x.componentDidMount=="function"&&(a.flags|=4194308),c=!0}else if(e===null){x=a.stateNode;var z=a.memoizedProps,Y=xn(r,z);x.props=Y;var F=x.context,lt=r.contextType;C=Ol,typeof lt=="object"&&lt!==null&&(C=hn(lt));var ot=r.getDerivedStateFromProps;lt=typeof ot=="function"||typeof x.getSnapshotBeforeUpdate=="function",z=a.pendingProps!==z,lt||typeof x.UNSAFE_componentWillReceiveProps!="function"&&typeof x.componentWillReceiveProps!="function"||(z||F!==C)&&em(a,x,c,C),jl=!1;var tt=a.memoizedState;x.state=tt,Ss(a,c,x,p),xr(),F=a.memoizedState,z||tt!==F||jl?(typeof ot=="function"&&(yu(a,r,ot,c),F=a.memoizedState),(Y=jl||tm(a,r,Y,c,tt,F,C))?(lt||typeof x.UNSAFE_componentWillMount!="function"&&typeof x.componentWillMount!="function"||(typeof x.componentWillMount=="function"&&x.componentWillMount(),typeof x.UNSAFE_componentWillMount=="function"&&x.UNSAFE_componentWillMount()),typeof x.componentDidMount=="function"&&(a.flags|=4194308)):(typeof x.componentDidMount=="function"&&(a.flags|=4194308),a.memoizedProps=c,a.memoizedState=F),x.props=c,x.state=F,x.context=C,c=Y):(typeof x.componentDidMount=="function"&&(a.flags|=4194308),c=!1)}else{x=a.stateNode,Ef(e,a),C=a.memoizedProps,lt=xn(r,C),x.props=lt,ot=a.pendingProps,tt=x.context,F=r.contextType,Y=Ol,typeof F=="object"&&F!==null&&(Y=hn(F)),z=r.getDerivedStateFromProps,(F=typeof z=="function"||typeof x.getSnapshotBeforeUpdate=="function")||typeof x.UNSAFE_componentWillReceiveProps!="function"&&typeof x.componentWillReceiveProps!="function"||(C!==ot||tt!==Y)&&em(a,x,c,Y),jl=!1,tt=a.memoizedState,x.state=tt,Ss(a,c,x,p),xr();var it=a.memoizedState;C!==ot||tt!==it||jl||e!==null&&e.dependencies!==null&&ou(e.dependencies)?(typeof z=="function"&&(yu(a,r,z,c),it=a.memoizedState),(lt=jl||tm(a,r,lt,c,tt,it,Y)||e!==null&&e.dependencies!==null&&ou(e.dependencies))?(F||typeof x.UNSAFE_componentWillUpdate!="function"&&typeof x.componentWillUpdate!="function"||(typeof x.componentWillUpdate=="function"&&x.componentWillUpdate(c,it,Y),typeof x.UNSAFE_componentWillUpdate=="function"&&x.UNSAFE_componentWillUpdate(c,it,Y)),typeof x.componentDidUpdate=="function"&&(a.flags|=4),typeof x.getSnapshotBeforeUpdate=="function"&&(a.flags|=1024)):(typeof x.componentDidUpdate!="function"||C===e.memoizedProps&&tt===e.memoizedState||(a.flags|=4),typeof x.getSnapshotBeforeUpdate!="function"||C===e.memoizedProps&&tt===e.memoizedState||(a.flags|=1024),a.memoizedProps=c,a.memoizedState=it),x.props=c,x.state=it,x.context=Y,c=lt):(typeof x.componentDidUpdate!="function"||C===e.memoizedProps&&tt===e.memoizedState||(a.flags|=4),typeof x.getSnapshotBeforeUpdate!="function"||C===e.memoizedProps&&tt===e.memoizedState||(a.flags|=1024),c=!1)}return x=c,ti(e,a),c=(a.flags&128)!==0,x||c?(x=a.stateNode,r=c&&typeof r.getDerivedStateFromError!="function"?null:x.render(),a.flags|=1,e!==null&&c?(a.child=_s(a,e.child,null,p),a.child=_s(a,null,r,p)):we(e,a,r,p),a.memoizedState=x.state,e=a.child):e=ei(e,a,p),e}function ae(e,a,r,c){return ys(),a.flags|=256,we(e,a,r,c),a.child}var _a={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function ja(e){return{baseLanes:e,cachePool:wo()}}function Or(e,a,r){return e=e!==null?e.childLanes&~r:0,a&&(e|=te),e}function Sa(e,a,r){var c=a.pendingProps,p=!1,x=(a.flags&128)!==0,C;if((C=x)||(C=e!==null&&e.memoizedState===null?!1:(Ue.current&2)!==0),C&&(p=!0,a.flags&=-129),C=(a.flags&32)!==0,a.flags&=-33,e===null){if(Ft){if(p?Yl(a):Fi(),(e=_e)?(e=h0(e,fn),e=e!==null&&e.data!=="&"?e:null,e!==null&&(a.memoizedState={dehydrated:e,treeContext:yi!==null?{id:gi,overflow:vi}:null,retryLane:536870912,hydrationErrors:null},r=Ad(e),r.return=a,a.child=r,cn=a,_e=null)):e=null,e===null)throw Pt(a);return Xp(e)?a.lanes=32:a.lanes=536870912,null}var z=c.children;return c=c.fallback,p?(Fi(),p=a.mode,z=xu({mode:"hidden",children:z},p),c=Vi(c,p,r,null),z.return=a,c.return=a,z.sibling=c,a.child=z,c=a.child,c.memoizedState=ja(r),c.childLanes=Or(e,C,r),a.memoizedState=_a,$a(null,c)):(Yl(a),Ll(a,z))}var Y=e.memoizedState;if(Y!==null&&(z=Y.dehydrated,z!==null)){if(x)a.flags&256?(Yl(a),a.flags&=-257,a=_u(e,a,r)):a.memoizedState!==null?(Fi(),a.child=e.child,a.flags|=128,a=null):(Fi(),z=c.fallback,p=a.mode,c=xu({mode:"visible",children:c.children},p),z=Vi(z,p,r,null),z.flags|=2,c.return=a,z.return=a,c.sibling=z,a.child=c,_s(a,e.child,null,r),c=a.child,c.memoizedState=ja(r),c.childLanes=Or(e,C,r),a.memoizedState=_a,a=$a(null,c));else if(Yl(a),Xp(z)){if(C=z.nextSibling&&z.nextSibling.dataset,C)var F=C.dgst;C=F,c=Error(s(419)),c.stack="",c.digest=C,dr({value:c,source:null,stack:null}),a=_u(e,a,r)}else if(Re||Ul(e,a,r,!1),C=(r&e.childLanes)!==0,Re||C){if(C=he,C!==null&&(c=eo(C,r),c!==0&&c!==Y.retryLane))throw Y.retryLane=c,Dl(e,c),u(C,e,c),$o;Lp(z)||Gt(),a=_u(e,a,r)}else Lp(z)?(a.flags|=192,a.child=e.child,a=null):(e=Y.treeContext,_e=zi(z.nextSibling),cn=a,Ft=!0,Zi=null,fn=!1,e!==null&&hr(a,e),a=Ll(a,c.children),a.flags|=4096);return a}return p?(Fi(),z=c.fallback,p=a.mode,Y=e.child,F=Y.sibling,c=pi(Y,{mode:"hidden",children:c.children}),c.subtreeFlags=Y.subtreeFlags&65011712,F!==null?z=pi(F,z):(z=Vi(z,p,r,null),z.flags|=2),z.return=a,c.return=a,c.sibling=z,a.child=c,$a(null,c),c=a.child,z=e.child.memoizedState,z===null?z=ja(r):(p=z.cachePool,p!==null?(Y=Mt._currentValue,p=p.parent!==Y?{parent:Y,pool:Y}:p):p=wo(),z={baseLanes:z.baseLanes|r,cachePool:p}),c.memoizedState=z,c.childLanes=Or(e,C,r),a.memoizedState=_a,$a(e.child,c)):(Yl(a),r=e.child,e=r.sibling,r=pi(r,{mode:"visible",children:c.children}),r.return=a,r.sibling=null,e!==null&&(C=a.deletions,C===null?(a.deletions=[e],a.flags|=16):C.push(e)),a.child=r,a.memoizedState=null,r)}function Ll(e,a){return a=xu({mode:"visible",children:a},e.mode),a.return=e,e.child=a}function xu(e,a){return e=Hn(22,e,null,a),e.lanes=0,e}function _u(e,a,r){return _s(a,e.child,null,r),e=Ll(a,a.pendingProps.children),e.flags|=2,a.memoizedState=null,e}function Es(e,a,r){e.lanes|=a;var c=e.alternate;c!==null&&(c.lanes|=a),Ji(e.return,a,r)}function Nr(e,a,r,c,p,x){var C=e.memoizedState;C===null?e.memoizedState={isBackwards:a,rendering:null,renderingStartTime:0,last:c,tail:r,tailMode:p,treeForkCount:x}:(C.isBackwards=a,C.rendering=null,C.renderingStartTime=0,C.last=c,C.tail=r,C.tailMode=p,C.treeForkCount=x)}function Ur(e,a,r){var c=a.pendingProps,p=c.revealOrder,x=c.tail;c=c.children;var C=Ue.current,z=(C&2)!==0;if(z?(C=C&1|2,a.flags|=128):C&=1,st(Ue,C),we(e,a,c,r),c=Ft?ru:0,!z&&e!==null&&(e.flags&128)!==0)t:for(e=a.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&Es(e,r,a);else if(e.tag===19)Es(e,r,a);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===a)break t;for(;e.sibling===null;){if(e.return===null||e.return===a)break t;e=e.return}e.sibling.return=e.return,e=e.sibling}switch(p){case"forwards":for(r=a.child,p=null;r!==null;)e=r.alternate,e!==null&&qo(e)===null&&(p=r),r=r.sibling;r=p,r===null?(p=a.child,a.child=null):(p=r.sibling,r.sibling=null),Nr(a,!1,p,r,x,c);break;case"backwards":case"unstable_legacy-backwards":for(r=null,p=a.child,a.child=null;p!==null;){if(e=p.alternate,e!==null&&qo(e)===null){a.child=p;break}e=p.sibling,p.sibling=r,r=p,p=e}Nr(a,!0,r,null,x,c);break;case"together":Nr(a,!1,null,null,void 0,c);break;default:a.memoizedState=null}return a.child}function ei(e,a,r){if(e!==null&&(a.dependencies=e.dependencies),Ea|=a.lanes,(r&a.childLanes)===0)if(e!==null){if(Ul(e,a,r,!1),(r&a.childLanes)===0)return null}else return null;if(e!==null&&a.child!==e.child)throw Error(s(153));if(a.child!==null){for(e=a.child,r=pi(e,e.pendingProps),a.child=r,r.return=a;e.sibling!==null;)e=e.sibling,r=r.sibling=pi(e,e.pendingProps),r.return=a;r.sibling=null}return a.child}function Xl(e,a){return(e.lanes&a)!==0?!0:(e=e.dependencies,!!(e!==null&&ou(e)))}function Br(e,a,r){switch(a.tag){case 3:re(a,a.stateNode.containerInfo),ki(a,Mt,e.memoizedState.cache),ys();break;case 27:case 5:ra(a);break;case 4:re(a,a.stateNode.containerInfo);break;case 10:ki(a,a.type,a.memoizedProps.value);break;case 31:if(a.memoizedState!==null)return a.flags|=128,Rf(a),null;break;case 13:var c=a.memoizedState;if(c!==null)return c.dehydrated!==null?(Yl(a),a.flags|=128,null):(r&a.child.childLanes)!==0?Sa(e,a,r):(Yl(a),e=ei(e,a,r),e!==null?e.sibling:null);Yl(a);break;case 19:var p=(e.flags&128)!==0;if(c=(r&a.childLanes)!==0,c||(Ul(e,a,r,!1),c=(r&a.childLanes)!==0),p){if(c)return Ur(e,a,r);a.flags|=128}if(p=a.memoizedState,p!==null&&(p.rendering=null,p.tail=null,p.lastEffect=null),st(Ue,Ue.current),c)break;return null;case 22:return a.lanes=0,xa(e,a,r,a.pendingProps);case 24:ki(a,Mt,e.memoizedState.cache)}return ei(e,a,r)}function tc(e,a,r){if(e!==null)if(e.memoizedProps!==a.pendingProps)Re=!0;else{if(!Xl(e,r)&&(a.flags&128)===0)return Re=!1,Br(e,a,r);Re=(e.flags&131072)!==0}else Re=!1,Ft&&(a.flags&1048576)!==0&&hf(a,ru,a.index);switch(a.lanes=0,a.tag){case 16:t:{var c=a.pendingProps;if(e=xs(a.elementType),a.type=e,typeof e=="function")Gn(e)?(c=xn(e,c),a.tag=1,a=_n(null,a,e,c,r)):(a.tag=0,a=vu(null,a,e,c,r));else{if(e!=null){var p=e.$$typeof;if(p===G){a.tag=11,a=Rr(null,a,e,c,r);break t}else if(p===K){a.tag=14,a=zr(null,a,e,c,r);break t}}throw a=xt(e)||e,Error(s(306,a,""))}}return a;case 0:return vu(e,a,a.type,a.pendingProps,r);case 1:return c=a.type,p=xn(c,a.pendingProps),_n(e,a,c,p,r);case 3:t:{if(re(a,a.stateNode.containerInfo),e===null)throw Error(s(387));c=a.pendingProps;var x=a.memoizedState;p=x.element,Ef(e,a),Ss(a,c,null,r);var C=a.memoizedState;if(c=C.cache,ki(a,Mt,c),c!==x.cache&&Bo(a,[Mt],r,!0),xr(),c=C.element,x.isDehydrated)if(x={element:c,isDehydrated:!1,cache:C.cache},a.updateQueue.baseState=x,a.memoizedState=x,a.flags&256){a=ae(e,a,c,r);break t}else if(c!==p){p=Jn(Error(s(424)),a),dr(p),a=ae(e,a,c,r);break t}else{switch(e=a.stateNode.containerInfo,e.nodeType){case 9:e=e.body;break;default:e=e.nodeName==="HTML"?e.ownerDocument.body:e}for(_e=zi(e.firstChild),cn=a,Ft=!0,Zi=null,fn=!0,r=Nd(a,null,c,r),a.child=r;r;)r.flags=r.flags&-3|4096,r=r.sibling}else{if(ys(),c===p){a=ei(e,a,r);break t}we(e,a,c,r)}a=a.child}return a;case 26:return ti(e,a),e===null?(r=v0(a.type,null,a.pendingProps,null))?a.memoizedState=r:Ft||(r=a.type,e=a.pendingProps,c=fm(Ot.current).createElement(r),c[Jt]=a,c[bn]=e,Xn(c,r,e),Pe(c),a.stateNode=c):a.memoizedState=v0(a.type,e.memoizedProps,a.pendingProps,e.memoizedState),null;case 27:return ra(a),e===null&&Ft&&(c=a.stateNode=p0(a.type,a.pendingProps,Ot.current),cn=a,fn=!0,p=_e,Mu(a.type)?(Vp=p,_e=zi(c.firstChild)):_e=p),we(e,a,a.pendingProps.children,r),ti(e,a),e===null&&(a.flags|=4194304),a.child;case 5:return e===null&&Ft&&((p=c=_e)&&(c=dS(c,a.type,a.pendingProps,fn),c!==null?(a.stateNode=c,cn=a,_e=zi(c.firstChild),fn=!1,p=!0):p=!1),p||Pt(a)),ra(a),p=a.type,x=a.pendingProps,C=e!==null?e.memoizedProps:null,c=x.children,jp(p,x)?c=null:C!==null&&jp(p,C)&&(a.flags|=32),a.memoizedState!==null&&(p=Df(e,a,_p,null,null,r),oh._currentValue=p),ti(e,a),we(e,a,c,r),a.child;case 6:return e===null&&Ft&&((e=r=_e)&&(r=mS(r,a.pendingProps,fn),r!==null?(a.stateNode=r,cn=a,_e=null,e=!0):e=!1),e||Pt(a)),null;case 13:return Sa(e,a,r);case 4:return re(a,a.stateNode.containerInfo),c=a.pendingProps,e===null?a.child=_s(a,null,c,r):we(e,a,c,r),a.child;case 11:return Rr(e,a,a.type,a.pendingProps,r);case 7:return we(e,a,a.pendingProps,r),a.child;case 8:return we(e,a,a.pendingProps.children,r),a.child;case 12:return we(e,a,a.pendingProps.children,r),a.child;case 10:return c=a.pendingProps,ki(a,a.type,c.value),we(e,a,c.children,r),a.child;case 9:return p=a.type._context,c=a.pendingProps.children,gs(a),p=hn(p),c=c(p),a.flags|=1,we(e,a,c,r),a.child;case 14:return zr(e,a,a.type,a.pendingProps,r);case 15:return va(e,a,a.type,a.pendingProps,r);case 19:return Ur(e,a,r);case 31:return Dr(e,a,r);case 22:return xa(e,a,r,a.pendingProps);case 24:return gs(a),c=hn(Mt),e===null?(p=xi(),p===null&&(p=he,x=gf(),p.pooledCache=x,x.refCount++,x!==null&&(p.pooledCacheLanes|=r),p=x),a.memoizedState={parent:c,cache:p},Tf(a),ki(a,Mt,p)):((e.lanes&r)!==0&&(Ef(e,a),Ss(a,null,null,r),xr()),p=e.memoizedState,x=a.memoizedState,p.parent!==c?(p={parent:c,cache:c},a.memoizedState=p,a.lanes===0&&(a.memoizedState=a.updateQueue.baseState=p),ki(a,Mt,c)):(c=x.cache,ki(a,Mt,c),c!==p.cache&&Bo(a,[Mt],r,!0))),we(e,a,a.pendingProps.children,r),a.child;case 29:throw a.pendingProps}throw Error(s(156,a.tag))}function $n(e){e.flags|=4}function Vl(e,a,r,c,p){if((a=(e.mode&32)!==0)&&(a=!1),a){if(e.flags|=16777216,(p&335544128)===p)if(e.stateNode.complete)e.flags|=8192;else if(gt())e.flags|=8192;else throw Nt=yr,pr}else e.flags&=-16777217}function tl(e,a){if(a.type!=="stylesheet"||(a.state.loading&4)!==0)e.flags&=-16777217;else if(e.flags|=16777216,!T0(a))if(gt())e.flags|=8192;else throw Nt=yr,pr}function Su(e,a){a!==null&&(e.flags|=4),e.flags&16384&&(a=e.tag!==22?Qs():536870912,e.lanes|=a,Ca|=a)}function wr(e,a){if(!Ft)switch(e.tailMode){case"hidden":a=e.tail;for(var r=null;a!==null;)a.alternate!==null&&(r=a),a=a.sibling;r===null?e.tail=null:r.sibling=null;break;case"collapsed":r=e.tail;for(var c=null;r!==null;)r.alternate!==null&&(c=r),r=r.sibling;c===null?a||e.tail===null?e.tail=null:e.tail.sibling=null:c.sibling=null}}function ye(e){var a=e.alternate!==null&&e.alternate.child===e.child,r=0,c=0;if(a)for(var p=e.child;p!==null;)r|=p.lanes|p.childLanes,c|=p.subtreeFlags&65011712,c|=p.flags&65011712,p.return=e,p=p.sibling;else for(p=e.child;p!==null;)r|=p.lanes|p.childLanes,c|=p.subtreeFlags,c|=p.flags,p.return=e,p=p.sibling;return e.subtreeFlags|=c,e.childLanes=r,a}function th(e,a,r){var c=a.pendingProps;switch(Nl(a),a.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return ye(a),null;case 1:return ye(a),null;case 3:return r=a.stateNode,c=null,e!==null&&(c=e.memoizedState.cache),a.memoizedState.cache!==c&&(a.flags|=2048),wa(Mt),ue(),r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),(e===null||e.child===null)&&(ps(a)?$n(a):e===null||e.memoizedState.isDehydrated&&(a.flags&256)===0||(a.flags|=1024,df())),ye(a),null;case 26:var p=a.type,x=a.memoizedState;return e===null?($n(a),x!==null?(ye(a),tl(a,x)):(ye(a),Vl(a,p,null,c,r))):x?x!==e.memoizedState?($n(a),ye(a),tl(a,x)):(ye(a),a.flags&=-16777217):(e=e.memoizedProps,e!==c&&$n(a),ye(a),Vl(a,p,e,c,r)),null;case 27:if(Oa(a),r=Ot.current,p=a.type,e!==null&&a.stateNode!=null)e.memoizedProps!==c&&$n(a);else{if(!c){if(a.stateNode===null)throw Error(s(166));return ye(a),null}e=yt.current,ps(a)?Uo(a):(e=p0(p,c,r),a.stateNode=e,$n(a))}return ye(a),null;case 5:if(Oa(a),p=a.type,e!==null&&a.stateNode!=null)e.memoizedProps!==c&&$n(a);else{if(!c){if(a.stateNode===null)throw Error(s(166));return ye(a),null}if(x=yt.current,ps(a))Uo(a);else{var C=fm(Ot.current);switch(x){case 1:x=C.createElementNS("http://www.w3.org/2000/svg",p);break;case 2:x=C.createElementNS("http://www.w3.org/1998/Math/MathML",p);break;default:switch(p){case"svg":x=C.createElementNS("http://www.w3.org/2000/svg",p);break;case"math":x=C.createElementNS("http://www.w3.org/1998/Math/MathML",p);break;case"script":x=C.createElement("div"),x.innerHTML="<script><\/script>",x=x.removeChild(x.firstChild);break;case"select":x=typeof c.is=="string"?C.createElement("select",{is:c.is}):C.createElement("select"),c.multiple?x.multiple=!0:c.size&&(x.size=c.size);break;default:x=typeof c.is=="string"?C.createElement(p,{is:c.is}):C.createElement(p)}}x[Jt]=a,x[bn]=c;t:for(C=a.child;C!==null;){if(C.tag===5||C.tag===6)x.appendChild(C.stateNode);else if(C.tag!==4&&C.tag!==27&&C.child!==null){C.child.return=C,C=C.child;continue}if(C===a)break t;for(;C.sibling===null;){if(C.return===null||C.return===a)break t;C=C.return}C.sibling.return=C.return,C=C.sibling}a.stateNode=x;t:switch(Xn(x,p,c),p){case"button":case"input":case"select":case"textarea":c=!!c.autoFocus;break t;case"img":c=!0;break t;default:c=!1}c&&$n(a)}}return ye(a),Vl(a,a.type,e===null?null:e.memoizedProps,a.pendingProps,r),null;case 6:if(e&&a.stateNode!=null)e.memoizedProps!==c&&$n(a);else{if(typeof c!="string"&&a.stateNode===null)throw Error(s(166));if(e=Ot.current,ps(a)){if(e=a.stateNode,r=a.memoizedProps,c=null,p=cn,p!==null)switch(p.tag){case 27:case 5:c=p.memoizedProps}e[Jt]=a,e=!!(e.nodeValue===r||c!==null&&c.suppressHydrationWarning===!0||i0(e.nodeValue,r)),e||Pt(a,!0)}else e=fm(e).createTextNode(c),e[Jt]=a,a.stateNode=e}return ye(a),null;case 31:if(r=a.memoizedState,e===null||e.memoizedState!==null){if(c=ps(a),r!==null){if(e===null){if(!c)throw Error(s(318));if(e=a.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(s(557));e[Jt]=a}else ys(),(a.flags&128)===0&&(a.memoizedState=null),a.flags|=4;ye(a),e=!1}else r=df(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=r),e=!0;if(!e)return a.flags&256?(pa(a),a):(pa(a),null);if((a.flags&128)!==0)throw Error(s(558))}return ye(a),null;case 13:if(c=a.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(p=ps(a),c!==null&&c.dehydrated!==null){if(e===null){if(!p)throw Error(s(318));if(p=a.memoizedState,p=p!==null?p.dehydrated:null,!p)throw Error(s(317));p[Jt]=a}else ys(),(a.flags&128)===0&&(a.memoizedState=null),a.flags|=4;ye(a),p=!1}else p=df(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=p),p=!0;if(!p)return a.flags&256?(pa(a),a):(pa(a),null)}return pa(a),(a.flags&128)!==0?(a.lanes=r,a):(r=c!==null,e=e!==null&&e.memoizedState!==null,r&&(c=a.child,p=null,c.alternate!==null&&c.alternate.memoizedState!==null&&c.alternate.memoizedState.cachePool!==null&&(p=c.alternate.memoizedState.cachePool.pool),x=null,c.memoizedState!==null&&c.memoizedState.cachePool!==null&&(x=c.memoizedState.cachePool.pool),x!==p&&(c.flags|=2048)),r!==e&&r&&(a.child.flags|=8192),Su(a,a.updateQueue),ye(a),null);case 4:return ue(),e===null&&Up(a.stateNode.containerInfo),ye(a),null;case 10:return wa(a.type),ye(a),null;case 19:if(I(Ue),c=a.memoizedState,c===null)return ye(a),null;if(p=(a.flags&128)!==0,x=c.rendering,x===null)if(p)wr(c,!1);else{if(de!==0||e!==null&&(e.flags&128)!==0)for(e=a.child;e!==null;){if(x=qo(e),x!==null){for(a.flags|=128,wr(c,!1),e=x.updateQueue,a.updateQueue=e,Su(a,e),a.subtreeFlags=0,e=r,r=a.child;r!==null;)Cn(r,e),r=r.sibling;return st(Ue,Ue.current&1|2),Ft&&Qi(a,c.treeForkCount),a.child}e=e.sibling}c.tail!==null&&Kn()>Aa&&(a.flags|=128,p=!0,wr(c,!1),a.lanes=4194304)}else{if(!p)if(e=qo(x),e!==null){if(a.flags|=128,p=!0,e=e.updateQueue,a.updateQueue=e,Su(a,e),wr(c,!0),c.tail===null&&c.tailMode==="hidden"&&!x.alternate&&!Ft)return ye(a),null}else 2*Kn()-c.renderingStartTime>Aa&&r!==536870912&&(a.flags|=128,p=!0,wr(c,!1),a.lanes=4194304);c.isBackwards?(x.sibling=a.child,a.child=x):(e=c.last,e!==null?e.sibling=x:a.child=x,c.last=x)}return c.tail!==null?(e=c.tail,c.rendering=e,c.tail=e.sibling,c.renderingStartTime=Kn(),e.sibling=null,r=Ue.current,st(Ue,p?r&1|2:r&1),Ft&&Qi(a,c.treeForkCount),e):(ye(a),null);case 22:case 23:return pa(a),Mn(),c=a.memoizedState!==null,e!==null?e.memoizedState!==null!==c&&(a.flags|=8192):c&&(a.flags|=8192),c?(r&536870912)!==0&&(a.flags&128)===0&&(ye(a),a.subtreeFlags&6&&(a.flags|=8192)):ye(a),r=a.updateQueue,r!==null&&Su(a,r.retryQueue),r=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(r=e.memoizedState.cachePool.pool),c=null,a.memoizedState!==null&&a.memoizedState.cachePool!==null&&(c=a.memoizedState.cachePool.pool),c!==r&&(a.flags|=2048),e!==null&&I(Bl),null;case 24:return r=null,e!==null&&(r=e.memoizedState.cache),a.memoizedState.cache!==r&&(a.flags|=2048),wa(Mt),ye(a),null;case 25:return null;case 30:return null}throw Error(s(156,a.tag))}function ec(e,a){switch(Nl(a),a.tag){case 1:return e=a.flags,e&65536?(a.flags=e&-65537|128,a):null;case 3:return wa(Mt),ue(),e=a.flags,(e&65536)!==0&&(e&128)===0?(a.flags=e&-65537|128,a):null;case 26:case 27:case 5:return Oa(a),null;case 31:if(a.memoizedState!==null){if(pa(a),a.alternate===null)throw Error(s(340));ys()}return e=a.flags,e&65536?(a.flags=e&-65537|128,a):null;case 13:if(pa(a),e=a.memoizedState,e!==null&&e.dehydrated!==null){if(a.alternate===null)throw Error(s(340));ys()}return e=a.flags,e&65536?(a.flags=e&-65537|128,a):null;case 19:return I(Ue),null;case 4:return ue(),null;case 10:return wa(a.type),null;case 22:case 23:return pa(a),Mn(),e!==null&&I(Bl),e=a.flags,e&65536?(a.flags=e&-65537|128,a):null;case 24:return wa(Mt),null;case 25:return null;default:return null}}function Cs(e,a){switch(Nl(a),a.tag){case 3:wa(Mt),ue();break;case 26:case 27:case 5:Oa(a);break;case 4:ue();break;case 31:a.memoizedState!==null&&pa(a);break;case 13:pa(a);break;case 19:I(Ue);break;case 10:wa(a.type);break;case 22:case 23:pa(a),Mn(),e!==null&&I(Bl);break;case 24:wa(Mt)}}function Ci(e,a){try{var r=a.updateQueue,c=r!==null?r.lastEffect:null;if(c!==null){var p=c.next;r=p;do{if((r.tag&e)===e){c=void 0;var x=r.create,C=r.inst;c=x(),C.destroy=c}r=r.next}while(r!==p)}}catch(z){xe(a,a.return,z)}}function qa(e,a,r){try{var c=a.updateQueue,p=c!==null?c.lastEffect:null;if(p!==null){var x=p.next;c=x;do{if((c.tag&e)===e){var C=c.inst,z=C.destroy;if(z!==void 0){C.destroy=void 0,p=a;var Y=r,F=z;try{F()}catch(lt){xe(p,Y,lt)}}}c=c.next}while(c!==x)}}catch(lt){xe(a,a.return,lt)}}function Ql(e){var a=e.updateQueue;if(a!==null){var r=e.stateNode;try{gn(a,r)}catch(c){xe(e,e.return,c)}}}function eh(e,a,r){r.props=xn(e.type,e.memoizedProps),r.state=e.memoizedState;try{r.componentWillUnmount()}catch(c){xe(e,a,c)}}function Ai(e,a){try{var r=e.ref;if(r!==null){switch(e.tag){case 26:case 27:case 5:var c=e.stateNode;break;case 30:c=e.stateNode;break;default:c=e.stateNode}typeof r=="function"?e.refCleanup=r(c):r.current=c}}catch(p){xe(e,a,p)}}function ba(e,a){var r=e.ref,c=e.refCleanup;if(r!==null)if(typeof c=="function")try{c()}catch(p){xe(e,a,p)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof r=="function")try{r(null)}catch(p){xe(e,a,p)}else r.current=null}function Ta(e){var a=e.type,r=e.memoizedProps,c=e.stateNode;try{t:switch(a){case"button":case"input":case"select":case"textarea":r.autoFocus&&c.focus();break t;case"img":r.src?c.src=r.src:r.srcSet&&(c.srcset=r.srcSet)}}catch(p){xe(e,e.return,p)}}function Ya(e,a,r){try{var c=e.stateNode;uS(c,e.type,r,a),c[bn]=a}catch(p){xe(e,e.return,p)}}function Fe(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&Mu(e.type)||e.tag===4}function Mi(e){t:for(;;){for(;e.sibling===null;){if(e.return===null||Fe(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.tag===27&&Mu(e.type)||e.flags&2||e.child===null||e.tag===4)continue t;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function Xt(e,a,r){var c=e.tag;if(c===5||c===6)e=e.stateNode,a?(r.nodeType===9?r.body:r.nodeName==="HTML"?r.ownerDocument.body:r).insertBefore(e,a):(a=r.nodeType===9?r.body:r.nodeName==="HTML"?r.ownerDocument.body:r,a.appendChild(e),r=r._reactRootContainer,r!=null||a.onclick!==null||(a.onclick=hi));else if(c!==4&&(c===27&&Mu(e.type)&&(r=e.stateNode,a=null),e=e.child,e!==null))for(Xt(e,a,r),e=e.sibling;e!==null;)Xt(e,a,r),e=e.sibling}function oe(e,a,r){var c=e.tag;if(c===5||c===6)e=e.stateNode,a?r.insertBefore(e,a):r.appendChild(e);else if(c!==4&&(c===27&&Mu(e.type)&&(r=e.stateNode),e=e.child,e!==null))for(oe(e,a,r),e=e.sibling;e!==null;)oe(e,a,r),e=e.sibling}function Le(e){var a=e.stateNode,r=e.memoizedProps;try{for(var c=e.type,p=a.attributes;p.length;)a.removeAttributeNode(p[0]);Xn(a,c,r),a[Jt]=e,a[bn]=r}catch(x){xe(e,e.return,x)}}var La=!1,ze=!1,el=!1,Hr=typeof WeakSet=="function"?WeakSet:Set,He=null;function bu(e,a){if(e=e.containerInfo,Hp=vm,e=To(e),eu(e)){if("selectionStart"in e)var r={start:e.selectionStart,end:e.selectionEnd};else t:{r=(r=e.ownerDocument)&&r.defaultView||window;var c=r.getSelection&&r.getSelection();if(c&&c.rangeCount!==0){r=c.anchorNode;var p=c.anchorOffset,x=c.focusNode;c=c.focusOffset;try{r.nodeType,x.nodeType}catch{r=null;break t}var C=0,z=-1,Y=-1,F=0,lt=0,ot=e,tt=null;e:for(;;){for(var it;ot!==r||p!==0&&ot.nodeType!==3||(z=C+p),ot!==x||c!==0&&ot.nodeType!==3||(Y=C+c),ot.nodeType===3&&(C+=ot.nodeValue.length),(it=ot.firstChild)!==null;)tt=ot,ot=it;for(;;){if(ot===e)break e;if(tt===r&&++F===p&&(z=C),tt===x&&++lt===c&&(Y=C),(it=ot.nextSibling)!==null)break;ot=tt,tt=ot.parentNode}ot=it}r=z===-1||Y===-1?null:{start:z,end:Y}}else r=null}r=r||{start:0,end:0}}else r=null;for(Gp={focusedElem:e,selectionRange:r},vm=!1,He=a;He!==null;)if(a=He,e=a.child,(a.subtreeFlags&1028)!==0&&e!==null)e.return=a,He=e;else for(;He!==null;){switch(a=He,x=a.alternate,e=a.flags,a.tag){case 0:if((e&4)!==0&&(e=a.updateQueue,e=e!==null?e.events:null,e!==null))for(r=0;r<e.length;r++)p=e[r],p.ref.impl=p.nextImpl;break;case 11:case 15:break;case 1:if((e&1024)!==0&&x!==null){e=void 0,r=a,p=x.memoizedProps,x=x.memoizedState,c=r.stateNode;try{var Et=xn(r.type,p);e=c.getSnapshotBeforeUpdate(Et,x),c.__reactInternalSnapshotBeforeUpdate=e}catch(Bt){xe(r,r.return,Bt)}}break;case 3:if((e&1024)!==0){if(e=a.stateNode.containerInfo,r=e.nodeType,r===9)Yp(e);else if(r===1)switch(e.nodeName){case"HEAD":case"HTML":case"BODY":Yp(e);break;default:e.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((e&1024)!==0)throw Error(s(163))}if(e=a.sibling,e!==null){e.return=a.return,He=e;break}He=a.return}}function im(e,a,r){var c=r.flags;switch(r.tag){case 0:case 11:case 15:nl(e,r),c&4&&Ci(5,r);break;case 1:if(nl(e,r),c&4)if(e=r.stateNode,a===null)try{e.componentDidMount()}catch(C){xe(r,r.return,C)}else{var p=xn(r.type,a.memoizedProps);a=a.memoizedState;try{e.componentDidUpdate(p,a,e.__reactInternalSnapshotBeforeUpdate)}catch(C){xe(r,r.return,C)}}c&64&&Ql(r),c&512&&Ai(r,r.return);break;case 3:if(nl(e,r),c&64&&(e=r.updateQueue,e!==null)){if(a=null,r.child!==null)switch(r.child.tag){case 27:case 5:a=r.child.stateNode;break;case 1:a=r.child.stateNode}try{gn(e,a)}catch(C){xe(r,r.return,C)}}break;case 27:a===null&&c&4&&Le(r);case 26:case 5:nl(e,r),a===null&&c&4&&Ta(r),c&512&&Ai(r,r.return);break;case 12:nl(e,r);break;case 31:nl(e,r),c&4&&ac(e,r);break;case 13:nl(e,r),c&4&&nh(e,r),c&64&&(e=r.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(r=P_.bind(null,r),pS(e,r))));break;case 22:if(c=r.memoizedState!==null||La,!c){a=a!==null&&a.memoizedState!==null||ze,p=La;var x=ze;La=c,(ze=a)&&!x?fe(e,r,(r.subtreeFlags&8772)!==0):nl(e,r),La=p,ze=x}break;case 30:break;default:nl(e,r)}}function nc(e){var a=e.alternate;a!==null&&(e.alternate=null,nc(a)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(a=e.stateNode,a!==null&&Qu(a)),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}var ie=null,Ie=!1;function zn(e,a,r){for(r=r.child;r!==null;)Zl(e,a,r),r=r.sibling}function Zl(e,a,r){if(Je&&typeof Je.onCommitFiberUnmount=="function")try{Je.onCommitFiberUnmount(Ua,r)}catch{}switch(r.tag){case 26:ze||ba(r,a),zn(e,a,r),r.memoizedState?r.memoizedState.count--:r.stateNode&&(r=r.stateNode,r.parentNode.removeChild(r));break;case 27:ze||ba(r,a);var c=ie,p=Ie;Mu(r.type)&&(ie=r.stateNode,Ie=!1),zn(e,a,r),sh(r.stateNode),ie=c,Ie=p;break;case 5:ze||ba(r,a);case 6:if(c=ie,p=Ie,ie=null,zn(e,a,r),ie=c,Ie=p,ie!==null)if(Ie)try{(ie.nodeType===9?ie.body:ie.nodeName==="HTML"?ie.ownerDocument.body:ie).removeChild(r.stateNode)}catch(x){xe(r,a,x)}else try{ie.removeChild(r.stateNode)}catch(x){xe(r,a,x)}break;case 18:ie!==null&&(Ie?(e=ie,c0(e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,r.stateNode),mc(e)):c0(ie,r.stateNode));break;case 4:c=ie,p=Ie,ie=r.stateNode.containerInfo,Ie=!0,zn(e,a,r),ie=c,Ie=p;break;case 0:case 11:case 14:case 15:qa(2,r,a),ze||qa(4,r,a),zn(e,a,r);break;case 1:ze||(ba(r,a),c=r.stateNode,typeof c.componentWillUnmount=="function"&&eh(r,a,c)),zn(e,a,r);break;case 21:zn(e,a,r);break;case 22:ze=(c=ze)||r.memoizedState!==null,zn(e,a,r),ze=c;break;default:zn(e,a,r)}}function ac(e,a){if(a.memoizedState===null&&(e=a.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{mc(e)}catch(r){xe(a,a.return,r)}}}function nh(e,a){if(a.memoizedState===null&&(e=a.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{mc(e)}catch(r){xe(a,a.return,r)}}function lm(e){switch(e.tag){case 31:case 13:case 19:var a=e.stateNode;return a===null&&(a=e.stateNode=new Hr),a;case 22:return e=e.stateNode,a=e._retryCache,a===null&&(a=e._retryCache=new Hr),a;default:throw Error(s(435,e.tag))}}function Xe(e,a){var r=lm(e);a.forEach(function(c){if(!r.has(c)){r.add(c);var p=W_.bind(null,e,c);c.then(p,p)}})}function Dn(e,a){var r=a.deletions;if(r!==null)for(var c=0;c<r.length;c++){var p=r[c],x=e,C=a,z=C;t:for(;z!==null;){switch(z.tag){case 27:if(Mu(z.type)){ie=z.stateNode,Ie=!1;break t}break;case 5:ie=z.stateNode,Ie=!1;break t;case 3:case 4:ie=z.stateNode.containerInfo,Ie=!0;break t}z=z.return}if(ie===null)throw Error(s(160));Zl(x,C,p),ie=null,Ie=!1,x=p.alternate,x!==null&&(x.return=null),p.return=null}if(a.subtreeFlags&13886)for(a=a.child;a!==null;)Kl(a,e),a=a.sibling}var ta=null;function Kl(e,a){var r=e.alternate,c=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:Dn(a,e),Ge(e),c&4&&(qa(3,e,e.return),Ci(3,e),qa(5,e,e.return));break;case 1:Dn(a,e),Ge(e),c&512&&(ze||r===null||ba(r,r.return)),c&64&&La&&(e=e.updateQueue,e!==null&&(c=e.callbacks,c!==null&&(r=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=r===null?c:r.concat(c))));break;case 26:var p=ta;if(Dn(a,e),Ge(e),c&512&&(ze||r===null||ba(r,r.return)),c&4){var x=r!==null?r.memoizedState:null;if(c=e.memoizedState,r===null)if(c===null)if(e.stateNode===null){t:{c=e.type,r=e.memoizedProps,p=p.ownerDocument||p;e:switch(c){case"title":x=p.getElementsByTagName("title")[0],(!x||x[as]||x[Jt]||x.namespaceURI==="http://www.w3.org/2000/svg"||x.hasAttribute("itemprop"))&&(x=p.createElement(c),p.head.insertBefore(x,p.querySelector("head > title"))),Xn(x,c,r),x[Jt]=e,Pe(x),c=x;break t;case"link":var C=S0("link","href",p).get(c+(r.href||""));if(C){for(var z=0;z<C.length;z++)if(x=C[z],x.getAttribute("href")===(r.href==null||r.href===""?null:r.href)&&x.getAttribute("rel")===(r.rel==null?null:r.rel)&&x.getAttribute("title")===(r.title==null?null:r.title)&&x.getAttribute("crossorigin")===(r.crossOrigin==null?null:r.crossOrigin)){C.splice(z,1);break e}}x=p.createElement(c),Xn(x,c,r),p.head.appendChild(x);break;case"meta":if(C=S0("meta","content",p).get(c+(r.content||""))){for(z=0;z<C.length;z++)if(x=C[z],x.getAttribute("content")===(r.content==null?null:""+r.content)&&x.getAttribute("name")===(r.name==null?null:r.name)&&x.getAttribute("property")===(r.property==null?null:r.property)&&x.getAttribute("http-equiv")===(r.httpEquiv==null?null:r.httpEquiv)&&x.getAttribute("charset")===(r.charSet==null?null:r.charSet)){C.splice(z,1);break e}}x=p.createElement(c),Xn(x,c,r),p.head.appendChild(x);break;default:throw Error(s(468,c))}x[Jt]=e,Pe(x),c=x}e.stateNode=c}else b0(p,e.type,e.stateNode);else e.stateNode=_0(p,c,e.memoizedProps);else x!==c?(x===null?r.stateNode!==null&&(r=r.stateNode,r.parentNode.removeChild(r)):x.count--,c===null?b0(p,e.type,e.stateNode):_0(p,c,e.memoizedProps)):c===null&&e.stateNode!==null&&Ya(e,e.memoizedProps,r.memoizedProps)}break;case 27:Dn(a,e),Ge(e),c&512&&(ze||r===null||ba(r,r.return)),r!==null&&c&4&&Ya(e,e.memoizedProps,r.memoizedProps);break;case 5:if(Dn(a,e),Ge(e),c&512&&(ze||r===null||ba(r,r.return)),e.flags&32){p=e.stateNode;try{ls(p,"")}catch(Et){xe(e,e.return,Et)}}c&4&&e.stateNode!=null&&(p=e.memoizedProps,Ya(e,p,r!==null?r.memoizedProps:p)),c&1024&&(el=!0);break;case 6:if(Dn(a,e),Ge(e),c&4){if(e.stateNode===null)throw Error(s(162));c=e.memoizedProps,r=e.stateNode;try{r.nodeValue=c}catch(Et){xe(e,e.return,Et)}}break;case 3:if(mm=null,p=ta,ta=hm(a.containerInfo),Dn(a,e),ta=p,Ge(e),c&4&&r!==null&&r.memoizedState.isDehydrated)try{mc(a.containerInfo)}catch(Et){xe(e,e.return,Et)}el&&(el=!1,sm(e));break;case 4:c=ta,ta=hm(e.stateNode.containerInfo),Dn(a,e),Ge(e),ta=c;break;case 12:Dn(a,e),Ge(e);break;case 31:Dn(a,e),Ge(e),c&4&&(c=e.updateQueue,c!==null&&(e.updateQueue=null,Xe(e,c)));break;case 13:Dn(a,e),Ge(e),e.child.flags&8192&&e.memoizedState!==null!=(r!==null&&r.memoizedState!==null)&&(ll=Kn()),c&4&&(c=e.updateQueue,c!==null&&(e.updateQueue=null,Xe(e,c)));break;case 22:p=e.memoizedState!==null;var Y=r!==null&&r.memoizedState!==null,F=La,lt=ze;if(La=F||p,ze=lt||Y,Dn(a,e),ze=lt,La=F,Ge(e),c&8192)t:for(a=e.stateNode,a._visibility=p?a._visibility&-2:a._visibility|1,p&&(r===null||Y||La||ze||As(e)),r=null,a=e;;){if(a.tag===5||a.tag===26){if(r===null){Y=r=a;try{if(x=Y.stateNode,p)C=x.style,typeof C.setProperty=="function"?C.setProperty("display","none","important"):C.display="none";else{z=Y.stateNode;var ot=Y.memoizedProps.style,tt=ot!=null&&ot.hasOwnProperty("display")?ot.display:null;z.style.display=tt==null||typeof tt=="boolean"?"":(""+tt).trim()}}catch(Et){xe(Y,Y.return,Et)}}}else if(a.tag===6){if(r===null){Y=a;try{Y.stateNode.nodeValue=p?"":Y.memoizedProps}catch(Et){xe(Y,Y.return,Et)}}}else if(a.tag===18){if(r===null){Y=a;try{var it=Y.stateNode;p?f0(it,!0):f0(Y.stateNode,!1)}catch(Et){xe(Y,Y.return,Et)}}}else if((a.tag!==22&&a.tag!==23||a.memoizedState===null||a===e)&&a.child!==null){a.child.return=a,a=a.child;continue}if(a===e)break t;for(;a.sibling===null;){if(a.return===null||a.return===e)break t;r===a&&(r=null),a=a.return}r===a&&(r=null),a.sibling.return=a.return,a=a.sibling}c&4&&(c=e.updateQueue,c!==null&&(r=c.retryQueue,r!==null&&(c.retryQueue=null,Xe(e,r))));break;case 19:Dn(a,e),Ge(e),c&4&&(c=e.updateQueue,c!==null&&(e.updateQueue=null,Xe(e,c)));break;case 30:break;case 21:break;default:Dn(a,e),Ge(e)}}function Ge(e){var a=e.flags;if(a&2){try{for(var r,c=e.return;c!==null;){if(Fe(c)){r=c;break}c=c.return}if(r==null)throw Error(s(160));switch(r.tag){case 27:var p=r.stateNode,x=Mi(e);oe(e,x,p);break;case 5:var C=r.stateNode;r.flags&32&&(ls(C,""),r.flags&=-33);var z=Mi(e);oe(e,z,C);break;case 3:case 4:var Y=r.stateNode.containerInfo,F=Mi(e);Xt(e,F,Y);break;default:throw Error(s(161))}}catch(lt){xe(e,e.return,lt)}e.flags&=-3}a&4096&&(e.flags&=-4097)}function sm(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var a=e;sm(a),a.tag===5&&a.flags&1024&&a.stateNode.reset(),e=e.sibling}}function nl(e,a){if(a.subtreeFlags&8772)for(a=a.child;a!==null;)im(e,a.alternate,a),a=a.sibling}function As(e){for(e=e.child;e!==null;){var a=e;switch(a.tag){case 0:case 11:case 14:case 15:qa(4,a,a.return),As(a);break;case 1:ba(a,a.return);var r=a.stateNode;typeof r.componentWillUnmount=="function"&&eh(a,a.return,r),As(a);break;case 27:sh(a.stateNode);case 26:case 5:ba(a,a.return),As(a);break;case 22:a.memoizedState===null&&As(a);break;case 30:As(a);break;default:As(a)}e=e.sibling}}function fe(e,a,r){for(r=r&&(a.subtreeFlags&8772)!==0,a=a.child;a!==null;){var c=a.alternate,p=e,x=a,C=x.flags;switch(x.tag){case 0:case 11:case 15:fe(p,x,r),Ci(4,x);break;case 1:if(fe(p,x,r),c=x,p=c.stateNode,typeof p.componentDidMount=="function")try{p.componentDidMount()}catch(F){xe(c,c.return,F)}if(c=x,p=c.updateQueue,p!==null){var z=c.stateNode;try{var Y=p.shared.hiddenCallbacks;if(Y!==null)for(p.shared.hiddenCallbacks=null,p=0;p<Y.length;p++)Si(Y[p],z)}catch(F){xe(c,c.return,F)}}r&&C&64&&Ql(x),Ai(x,x.return);break;case 27:Le(x);case 26:case 5:fe(p,x,r),r&&c===null&&C&4&&Ta(x),Ai(x,x.return);break;case 12:fe(p,x,r);break;case 31:fe(p,x,r),r&&C&4&&ac(p,x);break;case 13:fe(p,x,r),r&&C&4&&nh(p,x);break;case 22:x.memoizedState===null&&fe(p,x,r),Ai(x,x.return);break;case 30:break;default:fe(p,x,r)}a=a.sibling}}function ic(e,a){var r=null;e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(r=e.memoizedState.cachePool.pool),e=null,a.memoizedState!==null&&a.memoizedState.cachePool!==null&&(e=a.memoizedState.cachePool.pool),e!==r&&(e!=null&&e.refCount++,r!=null&&yn(r))}function al(e,a){e=null,a.alternate!==null&&(e=a.alternate.memoizedState.cache),a=a.memoizedState.cache,a!==e&&(a.refCount++,e!=null&&yn(e))}function ln(e,a,r,c){if(a.subtreeFlags&10256)for(a=a.child;a!==null;)Oe(e,a,r,c),a=a.sibling}function Oe(e,a,r,c){var p=a.flags;switch(a.tag){case 0:case 11:case 15:ln(e,a,r,c),p&2048&&Ci(9,a);break;case 1:ln(e,a,r,c);break;case 3:ln(e,a,r,c),p&2048&&(e=null,a.alternate!==null&&(e=a.alternate.memoizedState.cache),a=a.memoizedState.cache,a!==e&&(a.refCount++,e!=null&&yn(e)));break;case 12:if(p&2048){ln(e,a,r,c),e=a.stateNode;try{var x=a.memoizedProps,C=x.id,z=x.onPostCommit;typeof z=="function"&&z(C,a.alternate===null?"mount":"update",e.passiveEffectDuration,-0)}catch(Y){xe(a,a.return,Y)}}else ln(e,a,r,c);break;case 31:ln(e,a,r,c);break;case 13:ln(e,a,r,c);break;case 23:break;case 22:x=a.stateNode,C=a.alternate,a.memoizedState!==null?x._visibility&2?ln(e,a,r,c):Tu(e,a):x._visibility&2?ln(e,a,r,c):(x._visibility|=2,kl(e,a,r,c,(a.subtreeFlags&10256)!==0||!1)),p&2048&&ic(C,a);break;case 24:ln(e,a,r,c),p&2048&&al(a.alternate,a);break;default:ln(e,a,r,c)}}function kl(e,a,r,c,p){for(p=p&&((a.subtreeFlags&10256)!==0||!1),a=a.child;a!==null;){var x=e,C=a,z=r,Y=c,F=C.flags;switch(C.tag){case 0:case 11:case 15:kl(x,C,z,Y,p),Ci(8,C);break;case 23:break;case 22:var lt=C.stateNode;C.memoizedState!==null?lt._visibility&2?kl(x,C,z,Y,p):Tu(x,C):(lt._visibility|=2,kl(x,C,z,Y,p)),p&&F&2048&&ic(C.alternate,C);break;case 24:kl(x,C,z,Y,p),p&&F&2048&&al(C.alternate,C);break;default:kl(x,C,z,Y,p)}a=a.sibling}}function Tu(e,a){if(a.subtreeFlags&10256)for(a=a.child;a!==null;){var r=e,c=a,p=c.flags;switch(c.tag){case 22:Tu(r,c),p&2048&&ic(c.alternate,c);break;case 24:Tu(r,c),p&2048&&al(c.alternate,c);break;default:Tu(r,c)}a=a.sibling}}var je=8192;function Ms(e,a,r){if(e.subtreeFlags&je)for(e=e.child;e!==null;)Ve(e,a,r),e=e.sibling}function Ve(e,a,r){switch(e.tag){case 26:Ms(e,a,r),e.flags&je&&e.memoizedState!==null&&MS(r,ta,e.memoizedState,e.memoizedProps);break;case 5:Ms(e,a,r);break;case 3:case 4:var c=ta;ta=hm(e.stateNode.containerInfo),Ms(e,a,r),ta=c;break;case 22:e.memoizedState===null&&(c=e.alternate,c!==null&&c.memoizedState!==null?(c=je,je=16777216,Ms(e,a,r),je=c):Ms(e,a,r));break;default:Ms(e,a,r)}}function ea(e){var a=e.alternate;if(a!==null&&(e=a.child,e!==null)){a.child=null;do a=e.sibling,e.sibling=null,e=a;while(e!==null)}}function Yn(e){var a=e.deletions;if((e.flags&16)!==0){if(a!==null)for(var r=0;r<a.length;r++){var c=a[r];He=c,Gr(c,e)}ea(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)Rs(e),e=e.sibling}function Rs(e){switch(e.tag){case 0:case 11:case 15:Yn(e),e.flags&2048&&qa(9,e,e.return);break;case 3:Yn(e);break;case 12:Yn(e);break;case 22:var a=e.stateNode;e.memoizedState!==null&&a._visibility&2&&(e.return===null||e.return.tag!==13)?(a._visibility&=-3,lc(e)):Yn(e);break;default:Yn(e)}}function lc(e){var a=e.deletions;if((e.flags&16)!==0){if(a!==null)for(var r=0;r<a.length;r++){var c=a[r];He=c,Gr(c,e)}ea(e)}for(e=e.child;e!==null;){switch(a=e,a.tag){case 0:case 11:case 15:qa(8,a,a.return),lc(a);break;case 22:r=a.stateNode,r._visibility&2&&(r._visibility&=-3,lc(a));break;default:lc(a)}e=e.sibling}}function Gr(e,a){for(;He!==null;){var r=He;switch(r.tag){case 0:case 11:case 15:qa(8,r,a);break;case 23:case 22:if(r.memoizedState!==null&&r.memoizedState.cachePool!==null){var c=r.memoizedState.cachePool.pool;c!=null&&c.refCount++}break;case 24:yn(r.memoizedState.cache)}if(c=r.child,c!==null)c.return=r,He=c;else t:for(r=e;He!==null;){c=He;var p=c.sibling,x=c.return;if(nc(c),c===r){He=null;break t}if(p!==null){p.return=x,He=p;break t}He=x}}}var sc={getCacheForType:function(e){var a=hn(Mt),r=a.data.get(e);return r===void 0&&(r=e(),a.data.set(e,r)),r},cacheSignal:function(){return hn(Mt).controller.signal}},uc=typeof WeakMap=="function"?WeakMap:Map,$t=0,he=null,Vt=null,Wt=0,Rt=0,Kt=null,Yt=!1,Qt=!1,ve=!1,Qe=0,de=0,Ea=0,il=0,ni=0,te=0,Ca=0,ai=null,On=null,na=!1,ll=0,Eu=0,Aa=1/0,Cu=null,Ri=null,Ne=0,ii=null,Ma=null,Xa=0,sl=0,zs=null,rc=null,Ds=0,Os=null;function Ln(){return($t&2)!==0&&Wt!==0?Wt&-Wt:w.T!==null?zp():Hi()}function l(){if(te===0)if((Wt&536870912)===0||Ft){var e=ns;ns<<=1,(ns&3932160)===0&&(ns=262144),te=e}else te=536870912;return e=an.current,e!==null&&(e.flags|=32),te}function u(e,a,r){(e===he&&(Rt===2||Rt===9)||e.cancelPendingCommit!==null)&&(P(e,0),T(e,Wt,te,!1)),Ks(e,r),(($t&2)===0||e!==he)&&(e===he&&(($t&2)===0&&(il|=r),de===4&&T(e,Wt,te,!1)),Jl(e))}function h(e,a,r){if(($t&6)!==0)throw Error(s(327));var c=!r&&(a&127)===0&&(a&e.expiredLanes)===0||Vs(e,a),p=c?Ns(e,a):aa(e,a,!0),x=c;do{if(p===0){Qt&&!c&&T(e,a,0,!1);break}else{if(r=e.current.alternate,x&&!_(r)){p=aa(e,a,!1),x=!1;continue}if(p===2){if(x=a,e.errorRecoveryDisabledLanes&x)var C=0;else C=e.pendingLanes&-536870913,C=C!==0?C:C&536870912?536870912:0;if(C!==0){a=C;t:{var z=e;p=ai;var Y=z.current.memoizedState.isDehydrated;if(Y&&(P(z,C).flags|=256),C=aa(z,C,!1),C!==2){if(ve&&!Y){z.errorRecoveryDisabledLanes|=x,il|=x,p=4;break t}x=On,On=p,x!==null&&(On===null?On=x:On.push.apply(On,x))}p=C}if(x=!1,p!==2)continue}}if(p===1){P(e,0),T(e,a,0,!0);break}t:{switch(c=e,x=p,x){case 0:case 1:throw Error(s(345));case 4:if((a&4194048)!==a)break;case 6:T(c,a,te,!Yt);break t;case 2:On=null;break;case 3:case 5:break;default:throw Error(s(329))}if((a&62914560)===a&&(p=ll+300-Kn(),10<p)){if(T(c,a,te,!Yt),Vu(c,0,!0)!==0)break t;Xa=a,c.timeoutHandle=r0(y.bind(null,c,r,On,Cu,na,a,te,il,Ca,Yt,x,"Throttled",-0,0),p);break t}y(c,r,On,Cu,na,a,te,il,Ca,Yt,x,null,-0,0)}}break}while(!0);Jl(e)}function y(e,a,r,c,p,x,C,z,Y,F,lt,ot,tt,it){if(e.timeoutHandle=-1,ot=a.subtreeFlags,ot&8192||(ot&16785408)===16785408){ot={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:hi},Ve(a,x,ot);var Et=(x&62914560)===x?ll-Kn():(x&4194048)===x?Eu-Kn():0;if(Et=RS(ot,Et),Et!==null){Xa=x,e.cancelPendingCommit=Et(Ht.bind(null,e,a,x,r,c,p,C,z,Y,lt,ot,null,tt,it)),T(e,x,C,!F);return}}Ht(e,a,x,r,c,p,C,z,Y)}function _(e){for(var a=e;;){var r=a.tag;if((r===0||r===11||r===15)&&a.flags&16384&&(r=a.updateQueue,r!==null&&(r=r.stores,r!==null)))for(var c=0;c<r.length;c++){var p=r[c],x=p.getSnapshot;p=p.value;try{if(!Me(x(),p))return!1}catch{return!1}}if(r=a.child,a.subtreeFlags&16384&&r!==null)r.return=a,a=r;else{if(a===e)break;for(;a.sibling===null;){if(a.return===null||a.return===e)return!0;a=a.return}a.sibling.return=a.return,a=a.sibling}}return!0}function T(e,a,r,c){a&=~ni,a&=~il,e.suspendedLanes|=a,e.pingedLanes&=~a,c&&(e.warmLanes|=a),c=e.expirationTimes;for(var p=a;0<p;){var x=31-Bn(p),C=1<<x;c[x]=-1,p&=~C}r!==0&&Hc(e,r,a)}function N(){return($t&6)===0?(ah(0),!1):!0}function q(){if(Vt!==null){if(Rt===0)var e=Vt.return;else e=Vt,An=Ki=null,Uf(e),Hl=null,Gl=0,e=Vt;for(;e!==null;)Cs(e.alternate,e),e=e.return;Vt=null}}function P(e,a){var r=e.timeoutHandle;r!==-1&&(e.timeoutHandle=-1,cS(r)),r=e.cancelPendingCommit,r!==null&&(e.cancelPendingCommit=null,r()),Xa=0,q(),he=e,Vt=r=pi(e.current,null),Wt=a,Rt=0,Kt=null,Yt=!1,Qt=Vs(e,a),ve=!1,Ca=te=ni=il=Ea=de=0,On=ai=null,na=!1,(a&8)!==0&&(a|=a&32);var c=e.entangledLanes;if(c!==0)for(e=e.entanglements,c&=a;0<c;){var p=31-Bn(c),x=1<<p;a|=e[p],c&=~x}return Qe=a,zl(),r}function ut(e,a){wt=null,w.H=Cr,a===wl||a===Ia?(a=Ho(),Rt=3):a===pr?(a=Ho(),Rt=4):Rt=a===$o?8:a!==null&&typeof a=="object"&&typeof a.then=="function"?6:1,Kt=a,Vt===null&&(de=1,Io(e,Jn(a,e.current)))}function gt(){var e=an.current;return e===null?!0:(Wt&4194048)===Wt?Ha===null:(Wt&62914560)===Wt||(Wt&536870912)!==0?e===Ha:!1}function St(){var e=w.H;return w.H=Cr,e===null?Cr:e}function bt(){var e=w.A;return w.A=sc,e}function Gt(){de=4,Yt||(Wt&4194048)!==Wt&&an.current!==null||(Qt=!0),(Ea&134217727)===0&&(il&134217727)===0||he===null||T(he,Wt,te,!1)}function aa(e,a,r){var c=$t;$t|=2;var p=St(),x=bt();(he!==e||Wt!==a)&&(Cu=null,P(e,a)),a=!1;var C=de;t:do try{if(Rt!==0&&Vt!==null){var z=Vt,Y=Kt;switch(Rt){case 8:q(),C=6;break t;case 3:case 2:case 9:case 6:an.current===null&&(a=!0);var F=Rt;if(Rt=0,Kt=null,mt(e,z,Y,F),r&&Qt){C=0;break t}break;default:F=Rt,Rt=0,Kt=null,mt(e,z,Y,F)}}jr(),C=de;break}catch(lt){ut(e,lt)}while(!0);return a&&e.shellSuspendCounter++,An=Ki=null,$t=c,w.H=p,w.A=x,Vt===null&&(he=null,Wt=0,zl()),C}function jr(){for(;Vt!==null;)k(Vt)}function Ns(e,a){var r=$t;$t|=2;var c=St(),p=bt();he!==e||Wt!==a?(Cu=null,Aa=Kn()+500,P(e,a)):Qt=Vs(e,a);t:do try{if(Rt!==0&&Vt!==null){a=Vt;var x=Kt;e:switch(Rt){case 1:Rt=0,Kt=null,mt(e,a,x,1);break;case 2:case 9:if(Od(x)){Rt=0,Kt=null,nt(a);break}a=function(){Rt!==2&&Rt!==9||he!==e||(Rt=7),Jl(e)},x.then(a,a);break t;case 3:Rt=7;break t;case 4:Rt=5;break t;case 7:Od(x)?(Rt=0,Kt=null,nt(a)):(Rt=0,Kt=null,mt(e,a,x,7));break;case 5:var C=null;switch(Vt.tag){case 26:C=Vt.memoizedState;case 5:case 27:var z=Vt;if(C?T0(C):z.stateNode.complete){Rt=0,Kt=null;var Y=z.sibling;if(Y!==null)Vt=Y;else{var F=z.return;F!==null?(Vt=F,At(F)):Vt=null}break e}}Rt=0,Kt=null,mt(e,a,x,5);break;case 6:Rt=0,Kt=null,mt(e,a,x,6);break;case 8:q(),de=6;break t;default:throw Error(s(462))}}$();break}catch(lt){ut(e,lt)}while(!0);return An=Ki=null,w.H=c,w.A=p,$t=r,Vt!==null?0:(he=null,Wt=0,zl(),de)}function $(){for(;Vt!==null&&!yp();)k(Vt)}function k(e){var a=tc(e.alternate,e,Qe);e.memoizedProps=e.pendingProps,a===null?At(e):Vt=a}function nt(e){var a=e,r=a.alternate;switch(a.tag){case 15:case 0:a=Rn(r,a,a.pendingProps,a.type,void 0,Wt);break;case 11:a=Rn(r,a,a.pendingProps,a.type.render,a.ref,Wt);break;case 5:Uf(a);default:Cs(r,a),a=Vt=Cn(a,Qe),a=tc(r,a,Qe)}e.memoizedProps=e.pendingProps,a===null?At(e):Vt=a}function mt(e,a,r,c){An=Ki=null,Uf(a),Hl=null,Gl=0;var p=a.return;try{if(ga(e,p,a,r,Wt)){de=1,Io(e,Jn(r,e.current)),Vt=null;return}}catch(x){if(p!==null)throw Vt=p,x;de=1,Io(e,Jn(r,e.current)),Vt=null;return}a.flags&32768?(Ft||c===1?e=!0:Qt||(Wt&536870912)!==0?e=!1:(Yt=e=!0,(c===2||c===9||c===3||c===6)&&(c=an.current,c!==null&&c.tag===13&&(c.flags|=16384))),Se(a,e)):At(a)}function At(e){var a=e;do{if((a.flags&32768)!==0){Se(a,Yt);return}e=a.return;var r=th(a.alternate,a,Qe);if(r!==null){Vt=r;return}if(a=a.sibling,a!==null){Vt=a;return}Vt=a=e}while(a!==null);de===0&&(de=5)}function Se(e,a){do{var r=ec(e.alternate,e);if(r!==null){r.flags&=32767,Vt=r;return}if(r=e.return,r!==null&&(r.flags|=32768,r.subtreeFlags=0,r.deletions=null),!a&&(e=e.sibling,e!==null)){Vt=e;return}Vt=e=r}while(e!==null);de=6,Vt=null}function Ht(e,a,r,c,p,x,C,z,Y){e.cancelPendingCommit=null;do oc();while(Ne!==0);if(($t&6)!==0)throw Error(s(327));if(a!==null){if(a===e.current)throw Error(s(177));if(x=a.lanes|a.childLanes,x|=Ro,$h(e,r,x,C,z,Y),e===he&&(Vt=he=null,Wt=0),Ma=a,ii=e,Xa=r,sl=x,zs=p,rc=c,(a.subtreeFlags&10256)!==0||(a.flags&10256)!==0?(e.callbackNode=null,e.callbackPriority=0,F_(Ir,function(){return Zg(),null})):(e.callbackNode=null,e.callbackPriority=0),c=(a.flags&13878)!==0,(a.subtreeFlags&13878)!==0||c){c=w.T,w.T=null,p=H.p,H.p=2,C=$t,$t|=4;try{bu(e,a,r)}finally{$t=C,H.p=p,w.T=c}}Ne=1,le(),sn(),se()}}function le(){if(Ne===1){Ne=0;var e=ii,a=Ma,r=(a.flags&13878)!==0;if((a.subtreeFlags&13878)!==0||r){r=w.T,w.T=null;var c=H.p;H.p=2;var p=$t;$t|=4;try{Kl(a,e);var x=Gp,C=To(e.containerInfo),z=x.focusedElem,Y=x.selectionRange;if(C!==z&&z&&z.ownerDocument&&bo(z.ownerDocument.documentElement,z)){if(Y!==null&&eu(z)){var F=Y.start,lt=Y.end;if(lt===void 0&&(lt=F),"selectionStart"in z)z.selectionStart=F,z.selectionEnd=Math.min(lt,z.value.length);else{var ot=z.ownerDocument||document,tt=ot&&ot.defaultView||window;if(tt.getSelection){var it=tt.getSelection(),Et=z.textContent.length,Bt=Math.min(Y.start,Et),Te=Y.end===void 0?Bt:Math.min(Y.end,Et);!it.extend&&Bt>Te&&(C=Te,Te=Bt,Bt=C);var J=rf(z,Bt),Q=rf(z,Te);if(J&&Q&&(it.rangeCount!==1||it.anchorNode!==J.node||it.anchorOffset!==J.offset||it.focusNode!==Q.node||it.focusOffset!==Q.offset)){var W=ot.createRange();W.setStart(J.node,J.offset),it.removeAllRanges(),Bt>Te?(it.addRange(W),it.extend(Q.node,Q.offset)):(W.setEnd(Q.node,Q.offset),it.addRange(W))}}}}for(ot=[],it=z;it=it.parentNode;)it.nodeType===1&&ot.push({element:it,left:it.scrollLeft,top:it.scrollTop});for(typeof z.focus=="function"&&z.focus(),z=0;z<ot.length;z++){var rt=ot[z];rt.element.scrollLeft=rt.left,rt.element.scrollTop=rt.top}}vm=!!Hp,Gp=Hp=null}finally{$t=p,H.p=c,w.T=r}}e.current=a,Ne=2}}function sn(){if(Ne===2){Ne=0;var e=ii,a=Ma,r=(a.flags&8772)!==0;if((a.subtreeFlags&8772)!==0||r){r=w.T,w.T=null;var c=H.p;H.p=2;var p=$t;$t|=4;try{im(e,a.alternate,a)}finally{$t=p,H.p=c,w.T=r}}Ne=3}}function se(){if(Ne===4||Ne===3){Ne=0,kh();var e=ii,a=Ma,r=Xa,c=rc;(a.subtreeFlags&10256)!==0||(a.flags&10256)!==0?Ne=5:(Ne=0,Ma=ii=null,ul(e,e.pendingLanes));var p=e.pendingLanes;if(p===0&&(Ri=null),no(r),a=a.stateNode,Je&&typeof Je.onCommitFiberRoot=="function")try{Je.onCommitFiberRoot(Ua,a,void 0,(a.current.flags&128)===128)}catch{}if(c!==null){a=w.T,p=H.p,H.p=2,w.T=null;try{for(var x=e.onRecoverableError,C=0;C<c.length;C++){var z=c[C];x(z.value,{componentStack:z.stack})}}finally{w.T=a,H.p=p}}(Xa&3)!==0&&oc(),Jl(e),p=e.pendingLanes,(r&261930)!==0&&(p&42)!==0?e===Os?Ds++:(Ds=0,Os=e):Ds=0,ah(0)}}function ul(e,a){(e.pooledCacheLanes&=a)===0&&(a=e.pooledCache,a!=null&&(e.pooledCache=null,yn(a)))}function oc(){return le(),sn(),se(),Zg()}function Zg(){if(Ne!==5)return!1;var e=ii,a=sl;sl=0;var r=no(Xa),c=w.T,p=H.p;try{H.p=32>r?32:r,w.T=null,r=zs,zs=null;var x=ii,C=Xa;if(Ne=0,Ma=ii=null,Xa=0,($t&6)!==0)throw Error(s(331));var z=$t;if($t|=4,Rs(x.current),Oe(x,x.current,C,r),$t=z,ah(0,!1),Je&&typeof Je.onPostCommitFiberRoot=="function")try{Je.onPostCommitFiberRoot(Ua,x)}catch{}return!0}finally{H.p=p,w.T=c,ul(e,a)}}function Kg(e,a,r){a=Jn(r,a),a=$f(e.stateNode,a,2),e=Wi(e,a,2),e!==null&&(Ks(e,2),Jl(e))}function xe(e,a,r){if(e.tag===3)Kg(e,e,r);else for(;a!==null;){if(a.tag===3){Kg(a,e,r);break}else if(a.tag===1){var c=a.stateNode;if(typeof a.type.getDerivedStateFromError=="function"||typeof c.componentDidCatch=="function"&&(Ri===null||!Ri.has(c))){e=Jn(r,e),r=gu(2),c=Wi(a,r,2),c!==null&&(In(r,c,a,e),Ks(c,2),Jl(c));break}}a=a.return}}function Ap(e,a,r){var c=e.pingCache;if(c===null){c=e.pingCache=new uc;var p=new Set;c.set(a,p)}else p=c.get(a),p===void 0&&(p=new Set,c.set(a,p));p.has(r)||(ve=!0,p.add(r),e=J_.bind(null,e,a,r),a.then(e,e))}function J_(e,a,r){var c=e.pingCache;c!==null&&c.delete(a),e.pingedLanes|=e.suspendedLanes&r,e.warmLanes&=~r,he===e&&(Wt&r)===r&&(de===4||de===3&&(Wt&62914560)===Wt&&300>Kn()-ll?($t&2)===0&&P(e,0):ni|=r,Ca===Wt&&(Ca=0)),Jl(e)}function kg(e,a){a===0&&(a=Qs()),e=Dl(e,a),e!==null&&(Ks(e,a),Jl(e))}function P_(e){var a=e.memoizedState,r=0;a!==null&&(r=a.retryLane),kg(e,r)}function W_(e,a){var r=0;switch(e.tag){case 31:case 13:var c=e.stateNode,p=e.memoizedState;p!==null&&(r=p.retryLane);break;case 19:c=e.stateNode;break;case 22:c=e.stateNode._retryCache;break;default:throw Error(s(314))}c!==null&&c.delete(a),kg(e,r)}function F_(e,a){return Na(e,a)}var um=null,cc=null,Mp=!1,rm=!1,Rp=!1,Au=0;function Jl(e){e!==cc&&e.next===null&&(cc===null?um=cc=e:cc=cc.next=e),rm=!0,Mp||(Mp=!0,$_())}function ah(e,a){if(!Rp&&rm){Rp=!0;do for(var r=!1,c=um;c!==null;){if(e!==0){var p=c.pendingLanes;if(p===0)var x=0;else{var C=c.suspendedLanes,z=c.pingedLanes;x=(1<<31-Bn(42|e)+1)-1,x&=p&~(C&~z),x=x&201326741?x&201326741|1:x?x|2:0}x!==0&&(r=!0,Fg(c,x))}else x=Wt,x=Vu(c,c===he?x:0,c.cancelPendingCommit!==null||c.timeoutHandle!==-1),(x&3)===0||Vs(c,x)||(r=!0,Fg(c,x));c=c.next}while(r);Rp=!1}}function I_(){Jg()}function Jg(){rm=Mp=!1;var e=0;Au!==0&&oS()&&(e=Au);for(var a=Kn(),r=null,c=um;c!==null;){var p=c.next,x=Pg(c,a);x===0?(c.next=null,r===null?um=p:r.next=p,p===null&&(cc=r)):(r=c,(e!==0||(x&3)!==0)&&(rm=!0)),c=p}Ne!==0&&Ne!==5||ah(e),Au!==0&&(Au=0)}function Pg(e,a){for(var r=e.suspendedLanes,c=e.pingedLanes,p=e.expirationTimes,x=e.pendingLanes&-62914561;0<x;){var C=31-Bn(x),z=1<<C,Y=p[C];Y===-1?((z&r)===0||(z&c)!==0)&&(p[C]=$r(z,a)):Y<=a&&(e.expiredLanes|=z),x&=~z}if(a=he,r=Wt,r=Vu(e,e===a?r:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),c=e.callbackNode,r===0||e===a&&(Rt===2||Rt===9)||e.cancelPendingCommit!==null)return c!==null&&c!==null&&ml(c),e.callbackNode=null,e.callbackPriority=0;if((r&3)===0||Vs(e,r)){if(a=r&-r,a===e.callbackPriority)return a;switch(c!==null&&ml(c),no(r)){case 2:case 8:r=Fr;break;case 32:r=Ir;break;case 268435456:r=Fh;break;default:r=Ir}return c=Wg.bind(null,e),r=Na(r,c),e.callbackPriority=a,e.callbackNode=r,a}return c!==null&&c!==null&&ml(c),e.callbackPriority=2,e.callbackNode=null,2}function Wg(e,a){if(Ne!==0&&Ne!==5)return e.callbackNode=null,e.callbackPriority=0,null;var r=e.callbackNode;if(oc()&&e.callbackNode!==r)return null;var c=Wt;return c=Vu(e,e===he?c:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),c===0?null:(h(e,c,a),Pg(e,Kn()),e.callbackNode!=null&&e.callbackNode===r?Wg.bind(null,e):null)}function Fg(e,a){if(oc())return null;h(e,a,!0)}function $_(){fS(function(){($t&6)!==0?Na(Ph,I_):Jg()})}function zp(){if(Au===0){var e=Pi;e===0&&(e=Lu,Lu<<=1,(Lu&261888)===0&&(Lu=256)),Au=e}return Au}function Ig(e){return e==null||typeof e=="symbol"||typeof e=="boolean"?null:typeof e=="function"?e:Wu(""+e)}function $g(e,a){var r=a.ownerDocument.createElement("input");return r.name=a.name,r.value=a.value,e.id&&r.setAttribute("form",e.id),a.parentNode.insertBefore(r,a),e=new FormData(e),r.parentNode.removeChild(r),e}function tS(e,a,r,c,p){if(a==="submit"&&r&&r.stateNode===p){var x=Ig((p[bn]||null).action),C=c.submitter;C&&(a=(a=C[bn]||null)?Ig(a.formAction):C.getAttribute("formAction"),a!==null&&(x=a,C=null));var z=new tr("action","action",null,c,p);e.push({event:z,listeners:[{instance:null,listener:function(){if(c.defaultPrevented){if(Au!==0){var Y=C?$g(p,C):new FormData(p);Jf(r,{pending:!0,data:Y,method:p.method,action:x},null,Y)}}else typeof x=="function"&&(z.preventDefault(),Y=C?$g(p,C):new FormData(p),Jf(r,{pending:!0,data:Y,method:p.method,action:x},x,Y))},currentTarget:p}]})}}for(var Dp=0;Dp<Mo.length;Dp++){var Op=Mo[Dp],eS=Op.toLowerCase(),nS=Op[0].toUpperCase()+Op.slice(1);En(eS,"on"+nS)}En(kn,"onAnimationEnd"),En(of,"onAnimationIteration"),En(mi,"onAnimationStart"),En("dblclick","onDoubleClick"),En("focusin","onFocus"),En("focusout","onBlur"),En(lu,"onTransitionRun"),En(Ml,"onTransitionStart"),En(cf,"onTransitionCancel"),En(Ao,"onTransitionEnd"),yl("onMouseEnter",["mouseout","mouseover"]),yl("onMouseLeave",["mouseout","mouseover"]),yl("onPointerEnter",["pointerout","pointerover"]),yl("onPointerLeave",["pointerout","pointerover"]),qi("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),qi("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),qi("onBeforeInput",["compositionend","keypress","textInput","paste"]),qi("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),qi("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),qi("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var ih="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(" "),aS=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(ih));function t0(e,a){a=(a&4)!==0;for(var r=0;r<e.length;r++){var c=e[r],p=c.event;c=c.listeners;t:{var x=void 0;if(a)for(var C=c.length-1;0<=C;C--){var z=c[C],Y=z.instance,F=z.currentTarget;if(z=z.listener,Y!==x&&p.isPropagationStopped())break t;x=z,p.currentTarget=F;try{x(p)}catch(lt){Rl(lt)}p.currentTarget=null,x=Y}else for(C=0;C<c.length;C++){if(z=c[C],Y=z.instance,F=z.currentTarget,z=z.listener,Y!==x&&p.isPropagationStopped())break t;x=z,p.currentTarget=F;try{x(p)}catch(lt){Rl(lt)}p.currentTarget=null,x=Y}}}}function It(e,a){var r=a[ao];r===void 0&&(r=a[ao]=new Set);var c=e+"__bubble";r.has(c)||(e0(a,e,2,!1),r.add(c))}function Np(e,a,r){var c=0;a&&(c|=4),e0(r,e,c,a)}var om="_reactListening"+Math.random().toString(36).slice(2);function Up(e){if(!e[om]){e[om]=!0,fi.forEach(function(r){r!=="selectionchange"&&(aS.has(r)||Np(r,!1,e),Np(r,!0,e))});var a=e.nodeType===9?e:e.ownerDocument;a===null||a[om]||(a[om]=!0,Np("selectionchange",!1,a))}}function e0(e,a,r,c){switch(D0(a)){case 2:var p=OS;break;case 8:p=NS;break;default:p=Jp}r=p.bind(null,a,r,e),p=void 0,!fo||a!=="touchstart"&&a!=="touchmove"&&a!=="wheel"||(p=!0),c?p!==void 0?e.addEventListener(a,r,{capture:!0,passive:p}):e.addEventListener(a,r,!0):p!==void 0?e.addEventListener(a,r,{passive:p}):e.addEventListener(a,r,!1)}function Bp(e,a,r,c,p){var x=c;if((a&1)===0&&(a&2)===0&&c!==null)t:for(;;){if(c===null)return;var C=c.tag;if(C===3||C===4){var z=c.stateNode.containerInfo;if(z===p)break;if(C===4)for(C=c.return;C!==null;){var Y=C.tag;if((Y===3||Y===4)&&C.stateNode.containerInfo===p)return;C=C.return}for(;z!==null;){if(C=nn(z),C===null)return;if(Y=C.tag,Y===5||Y===6||Y===26||Y===27){c=x=C;continue t}z=z.parentNode}}c=c.return}Qc(function(){var F=x,lt=oo(r),ot=[];t:{var tt=Xi.get(e);if(tt!==void 0){var it=tr,Et=e;switch(e){case"keypress":if(rs(r)===0)break t;case"keydown":case"keyup":it=Fc;break;case"focusin":Et="focus",it=go;break;case"focusout":Et="blur",it=go;break;case"beforeblur":case"afterblur":it=go;break;case"click":if(r.button===2)break t;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":it=rd;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":it=od;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":it=Yi;break;case kn:case of:case mi:it=hd;break;case Ao:it=vp;break;case"scroll":case"scrollend":it=po;break;case"wheel":it=Sl;break;case"copy":case"cut":case"paste":it=Kc;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":it=vo;break;case"toggle":case"beforetoggle":it=$c}var Bt=(a&4)!==0,Te=!Bt&&(e==="scroll"||e==="scrollend"),J=Bt?tt!==null?tt+"Capture":null:tt;Bt=[];for(var Q=F,W;Q!==null;){var rt=Q;if(W=rt.stateNode,rt=rt.tag,rt!==5&&rt!==26&&rt!==27||W===null||J===null||(rt=us(Q,J),rt!=null&&Bt.push(lh(Q,rt,W))),Te)break;Q=Q.return}0<Bt.length&&(tt=new it(tt,Et,null,r,lt),ot.push({event:tt,listeners:Bt}))}}if((a&7)===0){t:{if(tt=e==="mouseover"||e==="pointerover",it=e==="mouseout"||e==="pointerout",tt&&r!==Fu&&(Et=r.relatedTarget||r.fromElement)&&(nn(Et)||Et[pl]))break t;if((it||tt)&&(tt=lt.window===lt?lt:(tt=lt.ownerDocument)?tt.defaultView||tt.parentWindow:window,it?(Et=r.relatedTarget||r.toElement,it=F,Et=Et?nn(Et):null,Et!==null&&(Te=f(Et),Bt=Et.tag,Et!==Te||Bt!==5&&Bt!==27&&Bt!==6)&&(Et=null)):(it=null,Et=F),it!==Et)){if(Bt=rd,rt="onMouseLeave",J="onMouseEnter",Q="mouse",(e==="pointerout"||e==="pointerover")&&(Bt=vo,rt="onPointerLeave",J="onPointerEnter",Q="pointer"),Te=it==null?tt:Gi(it),W=Et==null?tt:Gi(Et),tt=new Bt(rt,Q+"leave",it,r,lt),tt.target=Te,tt.relatedTarget=W,rt=null,nn(lt)===F&&(Bt=new Bt(J,Q+"enter",Et,r,lt),Bt.target=W,Bt.relatedTarget=Te,rt=Bt),Te=rt,it&&Et)e:{for(Bt=iS,J=it,Q=Et,W=0,rt=J;rt;rt=Bt(rt))W++;rt=0;for(var zt=Q;zt;zt=Bt(zt))rt++;for(;0<W-rt;)J=Bt(J),W--;for(;0<rt-W;)Q=Bt(Q),rt--;for(;W--;){if(J===Q||Q!==null&&J===Q.alternate){Bt=J;break e}J=Bt(J),Q=Bt(Q)}Bt=null}else Bt=null;it!==null&&n0(ot,tt,it,Bt,!1),Et!==null&&Te!==null&&n0(ot,Te,Et,Bt,!0)}}t:{if(tt=F?Gi(F):window,it=tt.nodeName&&tt.nodeName.toLowerCase(),it==="select"||it==="input"&&tt.type==="file")var me=lf;else if(nf(tt))if(sr)me=Td;else{me=El;var Ct=ur}else it=tt.nodeName,!it||it.toLowerCase()!=="input"||tt.type!=="checkbox"&&tt.type!=="radio"?F&&Pu(F.elementType)&&(me=lf):me=bd;if(me&&(me=me(e,F))){So(ot,me,r,lt);break t}Ct&&Ct(e,tt,F),e==="focusout"&&F&&tt.type==="number"&&F.memoizedProps.value!=null&&uo(tt,"number",tt.value)}switch(Ct=F?Gi(F):window,e){case"focusin":(nf(Ct)||Ct.contentEditable==="true")&&(nu=Ct,Eo=F,au=null);break;case"focusout":au=Eo=nu=null;break;case"mousedown":ha=!0;break;case"contextmenu":case"mouseup":case"dragend":ha=!1,Co(ot,r,lt);break;case"selectionchange":if(Ed)break;case"keydown":case"keyup":Co(ot,r,lt)}var Zt;if(os)t:{switch(e){case"compositionstart":var ee="onCompositionStart";break t;case"compositionend":ee="onCompositionEnd";break t;case"compositionupdate":ee="onCompositionUpdate";break t}ee=void 0}else Tl?xo(e,r)&&(ee="onCompositionEnd"):e==="keydown"&&r.keyCode===229&&(ee="onCompositionStart");ee&&(pn&&r.locale!=="ko"&&(Tl||ee!=="onCompositionStart"?ee==="onCompositionEnd"&&Tl&&(Zt=mo()):(vl=lt,ho="value"in vl?vl.value:vl.textContent,Tl=!0)),Ct=cm(F,ee),0<Ct.length&&(ee=new kc(ee,e,null,r,lt),ot.push({event:ee,listeners:Ct}),Zt?ee.data=Zt:(Zt=Ws(r),Zt!==null&&(ee.data=Zt)))),(Zt=cs?_o(e,r):xd(e,r))&&(ee=cm(F,"onBeforeInput"),0<ee.length&&(Ct=new kc("onBeforeInput","beforeinput",null,r,lt),ot.push({event:Ct,listeners:ee}),Ct.data=Zt)),tS(ot,e,F,r,lt)}t0(ot,a)})}function lh(e,a,r){return{instance:e,listener:a,currentTarget:r}}function cm(e,a){for(var r=a+"Capture",c=[];e!==null;){var p=e,x=p.stateNode;if(p=p.tag,p!==5&&p!==26&&p!==27||x===null||(p=us(e,r),p!=null&&c.unshift(lh(e,p,x)),p=us(e,a),p!=null&&c.push(lh(e,p,x))),e.tag===3)return c;e=e.return}return[]}function iS(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function n0(e,a,r,c,p){for(var x=a._reactName,C=[];r!==null&&r!==c;){var z=r,Y=z.alternate,F=z.stateNode;if(z=z.tag,Y!==null&&Y===c)break;z!==5&&z!==26&&z!==27||F===null||(Y=F,p?(F=us(r,x),F!=null&&C.unshift(lh(r,F,Y))):p||(F=us(r,x),F!=null&&C.push(lh(r,F,Y)))),r=r.return}C.length!==0&&e.push({event:a,listeners:C})}var lS=/\r\n?/g,sS=/\u0000|\uFFFD/g;function a0(e){return(typeof e=="string"?e:""+e).replace(lS,`
50
+ `).replace(sS,"")}function i0(e,a){return a=a0(a),a0(e)===a}function be(e,a,r,c,p,x){switch(r){case"children":typeof c=="string"?a==="body"||a==="textarea"&&c===""||ls(e,c):(typeof c=="number"||typeof c=="bigint")&&a!=="body"&&ls(e,""+c);break;case"className":ku(e,"class",c);break;case"tabIndex":ku(e,"tabindex",c);break;case"dir":case"role":case"viewBox":case"width":case"height":ku(e,r,c);break;case"style":Xc(e,c,x);break;case"data":if(a!=="object"){ku(e,"data",c);break}case"src":case"href":if(c===""&&(a!=="a"||r!=="href")){e.removeAttribute(r);break}if(c==null||typeof c=="function"||typeof c=="symbol"||typeof c=="boolean"){e.removeAttribute(r);break}c=Wu(""+c),e.setAttribute(r,c);break;case"action":case"formAction":if(typeof c=="function"){e.setAttribute(r,"javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')");break}else typeof x=="function"&&(r==="formAction"?(a!=="input"&&be(e,a,"name",p.name,p,null),be(e,a,"formEncType",p.formEncType,p,null),be(e,a,"formMethod",p.formMethod,p,null),be(e,a,"formTarget",p.formTarget,p,null)):(be(e,a,"encType",p.encType,p,null),be(e,a,"method",p.method,p,null),be(e,a,"target",p.target,p,null)));if(c==null||typeof c=="symbol"||typeof c=="boolean"){e.removeAttribute(r);break}c=Wu(""+c),e.setAttribute(r,c);break;case"onClick":c!=null&&(e.onclick=hi);break;case"onScroll":c!=null&&It("scroll",e);break;case"onScrollEnd":c!=null&&It("scrollend",e);break;case"dangerouslySetInnerHTML":if(c!=null){if(typeof c!="object"||!("__html"in c))throw Error(s(61));if(r=c.__html,r!=null){if(p.children!=null)throw Error(s(60));e.innerHTML=r}}break;case"multiple":e.multiple=c&&typeof c!="function"&&typeof c!="symbol";break;case"muted":e.muted=c&&typeof c!="function"&&typeof c!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(c==null||typeof c=="function"||typeof c=="boolean"||typeof c=="symbol"){e.removeAttribute("xlink:href");break}r=Wu(""+c),e.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",r);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":c!=null&&typeof c!="function"&&typeof c!="symbol"?e.setAttribute(r,""+c):e.removeAttribute(r);break;case"inert":case"allowFullScreen":case"async":case"autoPlay":case"controls":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInline":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":c&&typeof c!="function"&&typeof c!="symbol"?e.setAttribute(r,""):e.removeAttribute(r);break;case"capture":case"download":c===!0?e.setAttribute(r,""):c!==!1&&c!=null&&typeof c!="function"&&typeof c!="symbol"?e.setAttribute(r,c):e.removeAttribute(r);break;case"cols":case"rows":case"size":case"span":c!=null&&typeof c!="function"&&typeof c!="symbol"&&!isNaN(c)&&1<=c?e.setAttribute(r,c):e.removeAttribute(r);break;case"rowSpan":case"start":c==null||typeof c=="function"||typeof c=="symbol"||isNaN(c)?e.removeAttribute(r):e.setAttribute(r,c);break;case"popover":It("beforetoggle",e),It("toggle",e),Ku(e,"popover",c);break;case"xlinkActuate":ka(e,"http://www.w3.org/1999/xlink","xlink:actuate",c);break;case"xlinkArcrole":ka(e,"http://www.w3.org/1999/xlink","xlink:arcrole",c);break;case"xlinkRole":ka(e,"http://www.w3.org/1999/xlink","xlink:role",c);break;case"xlinkShow":ka(e,"http://www.w3.org/1999/xlink","xlink:show",c);break;case"xlinkTitle":ka(e,"http://www.w3.org/1999/xlink","xlink:title",c);break;case"xlinkType":ka(e,"http://www.w3.org/1999/xlink","xlink:type",c);break;case"xmlBase":ka(e,"http://www.w3.org/XML/1998/namespace","xml:base",c);break;case"xmlLang":ka(e,"http://www.w3.org/XML/1998/namespace","xml:lang",c);break;case"xmlSpace":ka(e,"http://www.w3.org/XML/1998/namespace","xml:space",c);break;case"is":Ku(e,"is",c);break;case"innerText":case"textContent":break;default:(!(2<r.length)||r[0]!=="o"&&r[0]!=="O"||r[1]!=="n"&&r[1]!=="N")&&(r=sd.get(r)||r,Ku(e,r,c))}}function wp(e,a,r,c,p,x){switch(r){case"style":Xc(e,c,x);break;case"dangerouslySetInnerHTML":if(c!=null){if(typeof c!="object"||!("__html"in c))throw Error(s(61));if(r=c.__html,r!=null){if(p.children!=null)throw Error(s(60));e.innerHTML=r}}break;case"children":typeof c=="string"?ls(e,c):(typeof c=="number"||typeof c=="bigint")&&ls(e,""+c);break;case"onScroll":c!=null&&It("scroll",e);break;case"onScrollEnd":c!=null&&It("scrollend",e);break;case"onClick":c!=null&&(e.onclick=hi);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!Zu.hasOwnProperty(r))t:{if(r[0]==="o"&&r[1]==="n"&&(p=r.endsWith("Capture"),a=r.slice(2,p?r.length-7:void 0),x=e[bn]||null,x=x!=null?x[r]:null,typeof x=="function"&&e.removeEventListener(a,x,p),typeof c=="function")){typeof x!="function"&&x!==null&&(r in e?e[r]=null:e.hasAttribute(r)&&e.removeAttribute(r)),e.addEventListener(a,c,p);break t}r in e?e[r]=c:c===!0?e.setAttribute(r,""):Ku(e,r,c)}}}function Xn(e,a,r){switch(a){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":It("error",e),It("load",e);var c=!1,p=!1,x;for(x in r)if(r.hasOwnProperty(x)){var C=r[x];if(C!=null)switch(x){case"src":c=!0;break;case"srcSet":p=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(s(137,a));default:be(e,a,x,C,r,null)}}p&&be(e,a,"srcSet",r.srcSet,r,null),c&&be(e,a,"src",r.src,r,null);return;case"input":It("invalid",e);var z=x=C=p=null,Y=null,F=null;for(c in r)if(r.hasOwnProperty(c)){var lt=r[c];if(lt!=null)switch(c){case"name":p=lt;break;case"type":C=lt;break;case"checked":Y=lt;break;case"defaultChecked":F=lt;break;case"value":x=lt;break;case"defaultValue":z=lt;break;case"children":case"dangerouslySetInnerHTML":if(lt!=null)throw Error(s(137,a));break;default:be(e,a,c,lt,r,null)}}Yc(e,x,z,Y,F,C,p,!1);return;case"select":It("invalid",e),c=C=x=null;for(p in r)if(r.hasOwnProperty(p)&&(z=r[p],z!=null))switch(p){case"value":x=z;break;case"defaultValue":C=z;break;case"multiple":c=z;default:be(e,a,p,z,r,null)}a=x,r=C,e.multiple=!!c,a!=null?Js(e,!!c,a,!1):r!=null&&Js(e,!!c,r,!0);return;case"textarea":It("invalid",e),x=p=c=null;for(C in r)if(r.hasOwnProperty(C)&&(z=r[C],z!=null))switch(C){case"value":c=z;break;case"defaultValue":p=z;break;case"children":x=z;break;case"dangerouslySetInnerHTML":if(z!=null)throw Error(s(91));break;default:be(e,a,C,z,r,null)}is(e,c,p,x);return;case"option":for(Y in r)if(r.hasOwnProperty(Y)&&(c=r[Y],c!=null))switch(Y){case"selected":e.selected=c&&typeof c!="function"&&typeof c!="symbol";break;default:be(e,a,Y,c,r,null)}return;case"dialog":It("beforetoggle",e),It("toggle",e),It("cancel",e),It("close",e);break;case"iframe":case"object":It("load",e);break;case"video":case"audio":for(c=0;c<ih.length;c++)It(ih[c],e);break;case"image":It("error",e),It("load",e);break;case"details":It("toggle",e);break;case"embed":case"source":case"link":It("error",e),It("load",e);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(F in r)if(r.hasOwnProperty(F)&&(c=r[F],c!=null))switch(F){case"children":case"dangerouslySetInnerHTML":throw Error(s(137,a));default:be(e,a,F,c,r,null)}return;default:if(Pu(a)){for(lt in r)r.hasOwnProperty(lt)&&(c=r[lt],c!==void 0&&wp(e,a,lt,c,r,void 0));return}}for(z in r)r.hasOwnProperty(z)&&(c=r[z],c!=null&&be(e,a,z,c,r,null))}function uS(e,a,r,c){switch(a){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var p=null,x=null,C=null,z=null,Y=null,F=null,lt=null;for(it in r){var ot=r[it];if(r.hasOwnProperty(it)&&ot!=null)switch(it){case"checked":break;case"value":break;case"defaultValue":Y=ot;default:c.hasOwnProperty(it)||be(e,a,it,null,c,ot)}}for(var tt in c){var it=c[tt];if(ot=r[tt],c.hasOwnProperty(tt)&&(it!=null||ot!=null))switch(tt){case"type":x=it;break;case"name":p=it;break;case"checked":F=it;break;case"defaultChecked":lt=it;break;case"value":C=it;break;case"defaultValue":z=it;break;case"children":case"dangerouslySetInnerHTML":if(it!=null)throw Error(s(137,a));break;default:it!==ot&&be(e,a,tt,it,c,ot)}}so(e,C,z,Y,F,lt,x,p);return;case"select":it=C=z=tt=null;for(x in r)if(Y=r[x],r.hasOwnProperty(x)&&Y!=null)switch(x){case"value":break;case"multiple":it=Y;default:c.hasOwnProperty(x)||be(e,a,x,null,c,Y)}for(p in c)if(x=c[p],Y=r[p],c.hasOwnProperty(p)&&(x!=null||Y!=null))switch(p){case"value":tt=x;break;case"defaultValue":z=x;break;case"multiple":C=x;default:x!==Y&&be(e,a,p,x,c,Y)}a=z,r=C,c=it,tt!=null?Js(e,!!r,tt,!1):!!c!=!!r&&(a!=null?Js(e,!!r,a,!0):Js(e,!!r,r?[]:"",!1));return;case"textarea":it=tt=null;for(z in r)if(p=r[z],r.hasOwnProperty(z)&&p!=null&&!c.hasOwnProperty(z))switch(z){case"value":break;case"children":break;default:be(e,a,z,null,c,p)}for(C in c)if(p=c[C],x=r[C],c.hasOwnProperty(C)&&(p!=null||x!=null))switch(C){case"value":tt=p;break;case"defaultValue":it=p;break;case"children":break;case"dangerouslySetInnerHTML":if(p!=null)throw Error(s(91));break;default:p!==x&&be(e,a,C,p,c,x)}Lc(e,tt,it);return;case"option":for(var Et in r)if(tt=r[Et],r.hasOwnProperty(Et)&&tt!=null&&!c.hasOwnProperty(Et))switch(Et){case"selected":e.selected=!1;break;default:be(e,a,Et,null,c,tt)}for(Y in c)if(tt=c[Y],it=r[Y],c.hasOwnProperty(Y)&&tt!==it&&(tt!=null||it!=null))switch(Y){case"selected":e.selected=tt&&typeof tt!="function"&&typeof tt!="symbol";break;default:be(e,a,Y,tt,c,it)}return;case"img":case"link":case"area":case"base":case"br":case"col":case"embed":case"hr":case"keygen":case"meta":case"param":case"source":case"track":case"wbr":case"menuitem":for(var Bt in r)tt=r[Bt],r.hasOwnProperty(Bt)&&tt!=null&&!c.hasOwnProperty(Bt)&&be(e,a,Bt,null,c,tt);for(F in c)if(tt=c[F],it=r[F],c.hasOwnProperty(F)&&tt!==it&&(tt!=null||it!=null))switch(F){case"children":case"dangerouslySetInnerHTML":if(tt!=null)throw Error(s(137,a));break;default:be(e,a,F,tt,c,it)}return;default:if(Pu(a)){for(var Te in r)tt=r[Te],r.hasOwnProperty(Te)&&tt!==void 0&&!c.hasOwnProperty(Te)&&wp(e,a,Te,void 0,c,tt);for(lt in c)tt=c[lt],it=r[lt],!c.hasOwnProperty(lt)||tt===it||tt===void 0&&it===void 0||wp(e,a,lt,tt,c,it);return}}for(var J in r)tt=r[J],r.hasOwnProperty(J)&&tt!=null&&!c.hasOwnProperty(J)&&be(e,a,J,null,c,tt);for(ot in c)tt=c[ot],it=r[ot],!c.hasOwnProperty(ot)||tt===it||tt==null&&it==null||be(e,a,ot,tt,c,it)}function l0(e){switch(e){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function rS(){if(typeof performance.getEntriesByType=="function"){for(var e=0,a=0,r=performance.getEntriesByType("resource"),c=0;c<r.length;c++){var p=r[c],x=p.transferSize,C=p.initiatorType,z=p.duration;if(x&&z&&l0(C)){for(C=0,z=p.responseEnd,c+=1;c<r.length;c++){var Y=r[c],F=Y.startTime;if(F>z)break;var lt=Y.transferSize,ot=Y.initiatorType;lt&&l0(ot)&&(Y=Y.responseEnd,C+=lt*(Y<z?1:(z-F)/(Y-F)))}if(--c,a+=8*(x+C)/(p.duration/1e3),e++,10<e)break}}if(0<e)return a/e/1e6}return navigator.connection&&(e=navigator.connection.downlink,typeof e=="number")?e:5}var Hp=null,Gp=null;function fm(e){return e.nodeType===9?e:e.ownerDocument}function s0(e){switch(e){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function u0(e,a){if(e===0)switch(a){case"svg":return 1;case"math":return 2;default:return 0}return e===1&&a==="foreignObject"?0:e}function jp(e,a){return e==="textarea"||e==="noscript"||typeof a.children=="string"||typeof a.children=="number"||typeof a.children=="bigint"||typeof a.dangerouslySetInnerHTML=="object"&&a.dangerouslySetInnerHTML!==null&&a.dangerouslySetInnerHTML.__html!=null}var qp=null;function oS(){var e=window.event;return e&&e.type==="popstate"?e===qp?!1:(qp=e,!0):(qp=null,!1)}var r0=typeof setTimeout=="function"?setTimeout:void 0,cS=typeof clearTimeout=="function"?clearTimeout:void 0,o0=typeof Promise=="function"?Promise:void 0,fS=typeof queueMicrotask=="function"?queueMicrotask:typeof o0<"u"?function(e){return o0.resolve(null).then(e).catch(hS)}:r0;function hS(e){setTimeout(function(){throw e})}function Mu(e){return e==="head"}function c0(e,a){var r=a,c=0;do{var p=r.nextSibling;if(e.removeChild(r),p&&p.nodeType===8)if(r=p.data,r==="/$"||r==="/&"){if(c===0){e.removeChild(p),mc(a);return}c--}else if(r==="$"||r==="$?"||r==="$~"||r==="$!"||r==="&")c++;else if(r==="html")sh(e.ownerDocument.documentElement);else if(r==="head"){r=e.ownerDocument.head,sh(r);for(var x=r.firstChild;x;){var C=x.nextSibling,z=x.nodeName;x[as]||z==="SCRIPT"||z==="STYLE"||z==="LINK"&&x.rel.toLowerCase()==="stylesheet"||r.removeChild(x),x=C}}else r==="body"&&sh(e.ownerDocument.body);r=p}while(r);mc(a)}function f0(e,a){var r=e;e=0;do{var c=r.nextSibling;if(r.nodeType===1?a?(r._stashedDisplay=r.style.display,r.style.display="none"):(r.style.display=r._stashedDisplay||"",r.getAttribute("style")===""&&r.removeAttribute("style")):r.nodeType===3&&(a?(r._stashedText=r.nodeValue,r.nodeValue=""):r.nodeValue=r._stashedText||""),c&&c.nodeType===8)if(r=c.data,r==="/$"){if(e===0)break;e--}else r!=="$"&&r!=="$?"&&r!=="$~"&&r!=="$!"||e++;r=c}while(r)}function Yp(e){var a=e.firstChild;for(a&&a.nodeType===10&&(a=a.nextSibling);a;){var r=a;switch(a=a.nextSibling,r.nodeName){case"HTML":case"HEAD":case"BODY":Yp(r),Qu(r);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(r.rel.toLowerCase()==="stylesheet")continue}e.removeChild(r)}}function dS(e,a,r,c){for(;e.nodeType===1;){var p=r;if(e.nodeName.toLowerCase()!==a.toLowerCase()){if(!c&&(e.nodeName!=="INPUT"||e.type!=="hidden"))break}else if(c){if(!e[as])switch(a){case"meta":if(!e.hasAttribute("itemprop"))break;return e;case"link":if(x=e.getAttribute("rel"),x==="stylesheet"&&e.hasAttribute("data-precedence"))break;if(x!==p.rel||e.getAttribute("href")!==(p.href==null||p.href===""?null:p.href)||e.getAttribute("crossorigin")!==(p.crossOrigin==null?null:p.crossOrigin)||e.getAttribute("title")!==(p.title==null?null:p.title))break;return e;case"style":if(e.hasAttribute("data-precedence"))break;return e;case"script":if(x=e.getAttribute("src"),(x!==(p.src==null?null:p.src)||e.getAttribute("type")!==(p.type==null?null:p.type)||e.getAttribute("crossorigin")!==(p.crossOrigin==null?null:p.crossOrigin))&&x&&e.hasAttribute("async")&&!e.hasAttribute("itemprop"))break;return e;default:return e}}else if(a==="input"&&e.type==="hidden"){var x=p.name==null?null:""+p.name;if(p.type==="hidden"&&e.getAttribute("name")===x)return e}else return e;if(e=zi(e.nextSibling),e===null)break}return null}function mS(e,a,r){if(a==="")return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!r||(e=zi(e.nextSibling),e===null))return null;return e}function h0(e,a){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!a||(e=zi(e.nextSibling),e===null))return null;return e}function Lp(e){return e.data==="$?"||e.data==="$~"}function Xp(e){return e.data==="$!"||e.data==="$?"&&e.ownerDocument.readyState!=="loading"}function pS(e,a){var r=e.ownerDocument;if(e.data==="$~")e._reactRetry=a;else if(e.data!=="$?"||r.readyState!=="loading")a();else{var c=function(){a(),r.removeEventListener("DOMContentLoaded",c)};r.addEventListener("DOMContentLoaded",c),e._reactRetry=c}}function zi(e){for(;e!=null;e=e.nextSibling){var a=e.nodeType;if(a===1||a===3)break;if(a===8){if(a=e.data,a==="$"||a==="$!"||a==="$?"||a==="$~"||a==="&"||a==="F!"||a==="F")break;if(a==="/$"||a==="/&")return null}}return e}var Vp=null;function d0(e){e=e.nextSibling;for(var a=0;e;){if(e.nodeType===8){var r=e.data;if(r==="/$"||r==="/&"){if(a===0)return zi(e.nextSibling);a--}else r!=="$"&&r!=="$!"&&r!=="$?"&&r!=="$~"&&r!=="&"||a++}e=e.nextSibling}return null}function m0(e){e=e.previousSibling;for(var a=0;e;){if(e.nodeType===8){var r=e.data;if(r==="$"||r==="$!"||r==="$?"||r==="$~"||r==="&"){if(a===0)return e;a--}else r!=="/$"&&r!=="/&"||a++}e=e.previousSibling}return null}function p0(e,a,r){switch(a=fm(r),e){case"html":if(e=a.documentElement,!e)throw Error(s(452));return e;case"head":if(e=a.head,!e)throw Error(s(453));return e;case"body":if(e=a.body,!e)throw Error(s(454));return e;default:throw Error(s(451))}}function sh(e){for(var a=e.attributes;a.length;)e.removeAttributeNode(a[0]);Qu(e)}var Di=new Map,y0=new Set;function hm(e){return typeof e.getRootNode=="function"?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var Us=H.d;H.d={f:yS,r:gS,D:vS,C:xS,L:_S,m:SS,X:TS,S:bS,M:ES};function yS(){var e=Us.f(),a=N();return e||a}function gS(e){var a=Ce(e);a!==null&&a.tag===5&&a.type==="form"?Pf(a):Us.r(e)}var fc=typeof document>"u"?null:document;function g0(e,a,r){var c=fc;if(c&&typeof a=="string"&&a){var p=ca(a);p='link[rel="'+e+'"][href="'+p+'"]',typeof r=="string"&&(p+='[crossorigin="'+r+'"]'),y0.has(p)||(y0.add(p),e={rel:e,crossOrigin:r,href:a},c.querySelector(p)===null&&(a=c.createElement("link"),Xn(a,"link",e),Pe(a),c.head.appendChild(a)))}}function vS(e){Us.D(e),g0("dns-prefetch",e,null)}function xS(e,a){Us.C(e,a),g0("preconnect",e,a)}function _S(e,a,r){Us.L(e,a,r);var c=fc;if(c&&e&&a){var p='link[rel="preload"][as="'+ca(a)+'"]';a==="image"&&r&&r.imageSrcSet?(p+='[imagesrcset="'+ca(r.imageSrcSet)+'"]',typeof r.imageSizes=="string"&&(p+='[imagesizes="'+ca(r.imageSizes)+'"]')):p+='[href="'+ca(e)+'"]';var x=p;switch(a){case"style":x=hc(e);break;case"script":x=dc(e)}Di.has(x)||(e=b({rel:"preload",href:a==="image"&&r&&r.imageSrcSet?void 0:e,as:a},r),Di.set(x,e),c.querySelector(p)!==null||a==="style"&&c.querySelector(uh(x))||a==="script"&&c.querySelector(rh(x))||(a=c.createElement("link"),Xn(a,"link",e),Pe(a),c.head.appendChild(a)))}}function SS(e,a){Us.m(e,a);var r=fc;if(r&&e){var c=a&&typeof a.as=="string"?a.as:"script",p='link[rel="modulepreload"][as="'+ca(c)+'"][href="'+ca(e)+'"]',x=p;switch(c){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":x=dc(e)}if(!Di.has(x)&&(e=b({rel:"modulepreload",href:e},a),Di.set(x,e),r.querySelector(p)===null)){switch(c){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(r.querySelector(rh(x)))return}c=r.createElement("link"),Xn(c,"link",e),Pe(c),r.head.appendChild(c)}}}function bS(e,a,r){Us.S(e,a,r);var c=fc;if(c&&e){var p=ji(c).hoistableStyles,x=hc(e);a=a||"default";var C=p.get(x);if(!C){var z={loading:0,preload:null};if(C=c.querySelector(uh(x)))z.loading=5;else{e=b({rel:"stylesheet",href:e,"data-precedence":a},r),(r=Di.get(x))&&Qp(e,r);var Y=C=c.createElement("link");Pe(Y),Xn(Y,"link",e),Y._p=new Promise(function(F,lt){Y.onload=F,Y.onerror=lt}),Y.addEventListener("load",function(){z.loading|=1}),Y.addEventListener("error",function(){z.loading|=2}),z.loading|=4,dm(C,a,c)}C={type:"stylesheet",instance:C,count:1,state:z},p.set(x,C)}}}function TS(e,a){Us.X(e,a);var r=fc;if(r&&e){var c=ji(r).hoistableScripts,p=dc(e),x=c.get(p);x||(x=r.querySelector(rh(p)),x||(e=b({src:e,async:!0},a),(a=Di.get(p))&&Zp(e,a),x=r.createElement("script"),Pe(x),Xn(x,"link",e),r.head.appendChild(x)),x={type:"script",instance:x,count:1,state:null},c.set(p,x))}}function ES(e,a){Us.M(e,a);var r=fc;if(r&&e){var c=ji(r).hoistableScripts,p=dc(e),x=c.get(p);x||(x=r.querySelector(rh(p)),x||(e=b({src:e,async:!0,type:"module"},a),(a=Di.get(p))&&Zp(e,a),x=r.createElement("script"),Pe(x),Xn(x,"link",e),r.head.appendChild(x)),x={type:"script",instance:x,count:1,state:null},c.set(p,x))}}function v0(e,a,r,c){var p=(p=Ot.current)?hm(p):null;if(!p)throw Error(s(446));switch(e){case"meta":case"title":return null;case"style":return typeof r.precedence=="string"&&typeof r.href=="string"?(a=hc(r.href),r=ji(p).hoistableStyles,c=r.get(a),c||(c={type:"style",instance:null,count:0,state:null},r.set(a,c)),c):{type:"void",instance:null,count:0,state:null};case"link":if(r.rel==="stylesheet"&&typeof r.href=="string"&&typeof r.precedence=="string"){e=hc(r.href);var x=ji(p).hoistableStyles,C=x.get(e);if(C||(p=p.ownerDocument||p,C={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},x.set(e,C),(x=p.querySelector(uh(e)))&&!x._p&&(C.instance=x,C.state.loading=5),Di.has(e)||(r={rel:"preload",as:"style",href:r.href,crossOrigin:r.crossOrigin,integrity:r.integrity,media:r.media,hrefLang:r.hrefLang,referrerPolicy:r.referrerPolicy},Di.set(e,r),x||CS(p,e,r,C.state))),a&&c===null)throw Error(s(528,""));return C}if(a&&c!==null)throw Error(s(529,""));return null;case"script":return a=r.async,r=r.src,typeof r=="string"&&a&&typeof a!="function"&&typeof a!="symbol"?(a=dc(r),r=ji(p).hoistableScripts,c=r.get(a),c||(c={type:"script",instance:null,count:0,state:null},r.set(a,c)),c):{type:"void",instance:null,count:0,state:null};default:throw Error(s(444,e))}}function hc(e){return'href="'+ca(e)+'"'}function uh(e){return'link[rel="stylesheet"]['+e+"]"}function x0(e){return b({},e,{"data-precedence":e.precedence,precedence:null})}function CS(e,a,r,c){e.querySelector('link[rel="preload"][as="style"]['+a+"]")?c.loading=1:(a=e.createElement("link"),c.preload=a,a.addEventListener("load",function(){return c.loading|=1}),a.addEventListener("error",function(){return c.loading|=2}),Xn(a,"link",r),Pe(a),e.head.appendChild(a))}function dc(e){return'[src="'+ca(e)+'"]'}function rh(e){return"script[async]"+e}function _0(e,a,r){if(a.count++,a.instance===null)switch(a.type){case"style":var c=e.querySelector('style[data-href~="'+ca(r.href)+'"]');if(c)return a.instance=c,Pe(c),c;var p=b({},r,{"data-href":r.href,"data-precedence":r.precedence,href:null,precedence:null});return c=(e.ownerDocument||e).createElement("style"),Pe(c),Xn(c,"style",p),dm(c,r.precedence,e),a.instance=c;case"stylesheet":p=hc(r.href);var x=e.querySelector(uh(p));if(x)return a.state.loading|=4,a.instance=x,Pe(x),x;c=x0(r),(p=Di.get(p))&&Qp(c,p),x=(e.ownerDocument||e).createElement("link"),Pe(x);var C=x;return C._p=new Promise(function(z,Y){C.onload=z,C.onerror=Y}),Xn(x,"link",c),a.state.loading|=4,dm(x,r.precedence,e),a.instance=x;case"script":return x=dc(r.src),(p=e.querySelector(rh(x)))?(a.instance=p,Pe(p),p):(c=r,(p=Di.get(x))&&(c=b({},r),Zp(c,p)),e=e.ownerDocument||e,p=e.createElement("script"),Pe(p),Xn(p,"link",c),e.head.appendChild(p),a.instance=p);case"void":return null;default:throw Error(s(443,a.type))}else a.type==="stylesheet"&&(a.state.loading&4)===0&&(c=a.instance,a.state.loading|=4,dm(c,r.precedence,e));return a.instance}function dm(e,a,r){for(var c=r.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),p=c.length?c[c.length-1]:null,x=p,C=0;C<c.length;C++){var z=c[C];if(z.dataset.precedence===a)x=z;else if(x!==p)break}x?x.parentNode.insertBefore(e,x.nextSibling):(a=r.nodeType===9?r.head:r,a.insertBefore(e,a.firstChild))}function Qp(e,a){e.crossOrigin==null&&(e.crossOrigin=a.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=a.referrerPolicy),e.title==null&&(e.title=a.title)}function Zp(e,a){e.crossOrigin==null&&(e.crossOrigin=a.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=a.referrerPolicy),e.integrity==null&&(e.integrity=a.integrity)}var mm=null;function S0(e,a,r){if(mm===null){var c=new Map,p=mm=new Map;p.set(r,c)}else p=mm,c=p.get(r),c||(c=new Map,p.set(r,c));if(c.has(e))return c;for(c.set(e,null),r=r.getElementsByTagName(e),p=0;p<r.length;p++){var x=r[p];if(!(x[as]||x[Jt]||e==="link"&&x.getAttribute("rel")==="stylesheet")&&x.namespaceURI!=="http://www.w3.org/2000/svg"){var C=x.getAttribute(a)||"";C=e+C;var z=c.get(C);z?z.push(x):c.set(C,[x])}}return c}function b0(e,a,r){e=e.ownerDocument||e,e.head.insertBefore(r,a==="title"?e.querySelector("head > title"):null)}function AS(e,a,r){if(r===1||a.itemProp!=null)return!1;switch(e){case"meta":case"title":return!0;case"style":if(typeof a.precedence!="string"||typeof a.href!="string"||a.href==="")break;return!0;case"link":if(typeof a.rel!="string"||typeof a.href!="string"||a.href===""||a.onLoad||a.onError)break;switch(a.rel){case"stylesheet":return e=a.disabled,typeof a.precedence=="string"&&e==null;default:return!0}case"script":if(a.async&&typeof a.async!="function"&&typeof a.async!="symbol"&&!a.onLoad&&!a.onError&&a.src&&typeof a.src=="string")return!0}return!1}function T0(e){return!(e.type==="stylesheet"&&(e.state.loading&3)===0)}function MS(e,a,r,c){if(r.type==="stylesheet"&&(typeof c.media!="string"||matchMedia(c.media).matches!==!1)&&(r.state.loading&4)===0){if(r.instance===null){var p=hc(c.href),x=a.querySelector(uh(p));if(x){a=x._p,a!==null&&typeof a=="object"&&typeof a.then=="function"&&(e.count++,e=pm.bind(e),a.then(e,e)),r.state.loading|=4,r.instance=x,Pe(x);return}x=a.ownerDocument||a,c=x0(c),(p=Di.get(p))&&Qp(c,p),x=x.createElement("link"),Pe(x);var C=x;C._p=new Promise(function(z,Y){C.onload=z,C.onerror=Y}),Xn(x,"link",c),r.instance=x}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(r,a),(a=r.state.preload)&&(r.state.loading&3)===0&&(e.count++,r=pm.bind(e),a.addEventListener("load",r),a.addEventListener("error",r))}}var Kp=0;function RS(e,a){return e.stylesheets&&e.count===0&&gm(e,e.stylesheets),0<e.count||0<e.imgCount?function(r){var c=setTimeout(function(){if(e.stylesheets&&gm(e,e.stylesheets),e.unsuspend){var x=e.unsuspend;e.unsuspend=null,x()}},6e4+a);0<e.imgBytes&&Kp===0&&(Kp=62500*rS());var p=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&gm(e,e.stylesheets),e.unsuspend)){var x=e.unsuspend;e.unsuspend=null,x()}},(e.imgBytes>Kp?50:800)+a);return e.unsuspend=r,function(){e.unsuspend=null,clearTimeout(c),clearTimeout(p)}}:null}function pm(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)gm(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var ym=null;function gm(e,a){e.stylesheets=null,e.unsuspend!==null&&(e.count++,ym=new Map,a.forEach(zS,e),ym=null,pm.call(e))}function zS(e,a){if(!(a.state.loading&4)){var r=ym.get(e);if(r)var c=r.get(null);else{r=new Map,ym.set(e,r);for(var p=e.querySelectorAll("link[data-precedence],style[data-precedence]"),x=0;x<p.length;x++){var C=p[x];(C.nodeName==="LINK"||C.getAttribute("media")!=="not all")&&(r.set(C.dataset.precedence,C),c=C)}c&&r.set(null,c)}p=a.instance,C=p.getAttribute("data-precedence"),x=r.get(C)||c,x===c&&r.set(null,p),r.set(C,p),this.count++,c=pm.bind(this),p.addEventListener("load",c),p.addEventListener("error",c),x?x.parentNode.insertBefore(p,x.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(p,e.firstChild)),a.state.loading|=4}}var oh={$$typeof:B,Provider:null,Consumer:null,_currentValue:at,_currentValue2:at,_threadCount:0};function DS(e,a,r,c,p,x,C,z,Y){this.tag=1,this.containerInfo=e,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=Zs(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Zs(0),this.hiddenUpdates=Zs(null),this.identifierPrefix=c,this.onUncaughtError=p,this.onCaughtError=x,this.onRecoverableError=C,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=Y,this.incompleteTransitions=new Map}function E0(e,a,r,c,p,x,C,z,Y,F,lt,ot){return e=new DS(e,a,r,C,Y,F,lt,ot,z),a=1,x===!0&&(a|=24),x=Hn(3,null,null,a),e.current=x,x.stateNode=e,a=gf(),a.refCount++,e.pooledCache=a,a.refCount++,x.memoizedState={element:c,isDehydrated:r,cache:a},Tf(x),e}function C0(e){return e?(e=Ol,e):Ol}function A0(e,a,r,c,p,x){p=C0(p),c.context===null?c.context=p:c.pendingContext=p,c=_i(a),c.payload={element:r},x=x===void 0?null:x,x!==null&&(c.callback=x),r=Wi(e,c,a),r!==null&&(u(r,e,a),ql(r,e,a))}function M0(e,a){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var r=e.retryLane;e.retryLane=r!==0&&r<a?r:a}}function kp(e,a){M0(e,a),(e=e.alternate)&&M0(e,a)}function R0(e){if(e.tag===13||e.tag===31){var a=Dl(e,67108864);a!==null&&u(a,e,67108864),kp(e,67108864)}}function z0(e){if(e.tag===13||e.tag===31){var a=Ln();a=oi(a);var r=Dl(e,a);r!==null&&u(r,e,a),kp(e,a)}}var vm=!0;function OS(e,a,r,c){var p=w.T;w.T=null;var x=H.p;try{H.p=2,Jp(e,a,r,c)}finally{H.p=x,w.T=p}}function NS(e,a,r,c){var p=w.T;w.T=null;var x=H.p;try{H.p=8,Jp(e,a,r,c)}finally{H.p=x,w.T=p}}function Jp(e,a,r,c){if(vm){var p=Pp(c);if(p===null)Bp(e,a,c,xm,r),O0(e,c);else if(BS(p,e,a,r,c))c.stopPropagation();else if(O0(e,c),a&4&&-1<US.indexOf(e)){for(;p!==null;){var x=Ce(p);if(x!==null)switch(x.tag){case 3:if(x=x.stateNode,x.current.memoizedState.isDehydrated){var C=ri(x.pendingLanes);if(C!==0){var z=x;for(z.pendingLanes|=2,z.entangledLanes|=2;C;){var Y=1<<31-Bn(C);z.entanglements[1]|=Y,C&=~Y}Jl(x),($t&6)===0&&(Aa=Kn()+500,ah(0))}}break;case 31:case 13:z=Dl(x,2),z!==null&&u(z,x,2),N(),kp(x,2)}if(x=Pp(c),x===null&&Bp(e,a,c,xm,r),x===p)break;p=x}p!==null&&c.stopPropagation()}else Bp(e,a,c,null,r)}}function Pp(e){return e=oo(e),Wp(e)}var xm=null;function Wp(e){if(xm=null,e=nn(e),e!==null){var a=f(e);if(a===null)e=null;else{var r=a.tag;if(r===13){if(e=d(a),e!==null)return e;e=null}else if(r===31){if(e=m(a),e!==null)return e;e=null}else if(r===3){if(a.stateNode.current.memoizedState.isDehydrated)return a.tag===3?a.stateNode.containerInfo:null;e=null}else a!==e&&(e=null)}}return xm=e,null}function D0(e){switch(e){case"beforetoggle":case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"toggle":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 2;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 8;case"message":switch(Jh()){case Ph:return 2;case Fr:return 8;case Ir:case Wh:return 32;case Fh:return 268435456;default:return 32}default:return 32}}var Fp=!1,Ru=null,zu=null,Du=null,ch=new Map,fh=new Map,Ou=[],US="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset".split(" ");function O0(e,a){switch(e){case"focusin":case"focusout":Ru=null;break;case"dragenter":case"dragleave":zu=null;break;case"mouseover":case"mouseout":Du=null;break;case"pointerover":case"pointerout":ch.delete(a.pointerId);break;case"gotpointercapture":case"lostpointercapture":fh.delete(a.pointerId)}}function hh(e,a,r,c,p,x){return e===null||e.nativeEvent!==x?(e={blockedOn:a,domEventName:r,eventSystemFlags:c,nativeEvent:x,targetContainers:[p]},a!==null&&(a=Ce(a),a!==null&&R0(a)),e):(e.eventSystemFlags|=c,a=e.targetContainers,p!==null&&a.indexOf(p)===-1&&a.push(p),e)}function BS(e,a,r,c,p){switch(a){case"focusin":return Ru=hh(Ru,e,a,r,c,p),!0;case"dragenter":return zu=hh(zu,e,a,r,c,p),!0;case"mouseover":return Du=hh(Du,e,a,r,c,p),!0;case"pointerover":var x=p.pointerId;return ch.set(x,hh(ch.get(x)||null,e,a,r,c,p)),!0;case"gotpointercapture":return x=p.pointerId,fh.set(x,hh(fh.get(x)||null,e,a,r,c,p)),!0}return!1}function N0(e){var a=nn(e.target);if(a!==null){var r=f(a);if(r!==null){if(a=r.tag,a===13){if(a=d(r),a!==null){e.blockedOn=a,ci(e.priority,function(){z0(r)});return}}else if(a===31){if(a=m(r),a!==null){e.blockedOn=a,ci(e.priority,function(){z0(r)});return}}else if(a===3&&r.stateNode.current.memoizedState.isDehydrated){e.blockedOn=r.tag===3?r.stateNode.containerInfo:null;return}}}e.blockedOn=null}function _m(e){if(e.blockedOn!==null)return!1;for(var a=e.targetContainers;0<a.length;){var r=Pp(e.nativeEvent);if(r===null){r=e.nativeEvent;var c=new r.constructor(r.type,r);Fu=c,r.target.dispatchEvent(c),Fu=null}else return a=Ce(r),a!==null&&R0(a),e.blockedOn=r,!1;a.shift()}return!0}function U0(e,a,r){_m(e)&&r.delete(a)}function wS(){Fp=!1,Ru!==null&&_m(Ru)&&(Ru=null),zu!==null&&_m(zu)&&(zu=null),Du!==null&&_m(Du)&&(Du=null),ch.forEach(U0),fh.forEach(U0)}function Sm(e,a){e.blockedOn===a&&(e.blockedOn=null,Fp||(Fp=!0,i.unstable_scheduleCallback(i.unstable_NormalPriority,wS)))}var bm=null;function B0(e){bm!==e&&(bm=e,i.unstable_scheduleCallback(i.unstable_NormalPriority,function(){bm===e&&(bm=null);for(var a=0;a<e.length;a+=3){var r=e[a],c=e[a+1],p=e[a+2];if(typeof c!="function"){if(Wp(c||r)===null)continue;break}var x=Ce(r);x!==null&&(e.splice(a,3),a-=3,Jf(x,{pending:!0,data:p,method:r.method,action:c},c,p))}}))}function mc(e){function a(Y){return Sm(Y,e)}Ru!==null&&Sm(Ru,e),zu!==null&&Sm(zu,e),Du!==null&&Sm(Du,e),ch.forEach(a),fh.forEach(a);for(var r=0;r<Ou.length;r++){var c=Ou[r];c.blockedOn===e&&(c.blockedOn=null)}for(;0<Ou.length&&(r=Ou[0],r.blockedOn===null);)N0(r),r.blockedOn===null&&Ou.shift();if(r=(e.ownerDocument||e).$$reactFormReplay,r!=null)for(c=0;c<r.length;c+=3){var p=r[c],x=r[c+1],C=p[bn]||null;if(typeof x=="function")C||B0(r);else if(C){var z=null;if(x&&x.hasAttribute("formAction")){if(p=x,C=x[bn]||null)z=C.formAction;else if(Wp(p)!==null)continue}else z=C.action;typeof z=="function"?r[c+1]=z:(r.splice(c,3),c-=3),B0(r)}}}function w0(){function e(x){x.canIntercept&&x.info==="react-transition"&&x.intercept({handler:function(){return new Promise(function(C){return p=C})},focusReset:"manual",scroll:"manual"})}function a(){p!==null&&(p(),p=null),c||setTimeout(r,20)}function r(){if(!c&&!navigation.transition){var x=navigation.currentEntry;x&&x.url!=null&&navigation.navigate(x.url,{state:x.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var c=!1,p=null;return navigation.addEventListener("navigate",e),navigation.addEventListener("navigatesuccess",a),navigation.addEventListener("navigateerror",a),setTimeout(r,100),function(){c=!0,navigation.removeEventListener("navigate",e),navigation.removeEventListener("navigatesuccess",a),navigation.removeEventListener("navigateerror",a),p!==null&&(p(),p=null)}}}function Ip(e){this._internalRoot=e}Tm.prototype.render=Ip.prototype.render=function(e){var a=this._internalRoot;if(a===null)throw Error(s(409));var r=a.current,c=Ln();A0(r,c,e,a,null,null)},Tm.prototype.unmount=Ip.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var a=e.containerInfo;A0(e.current,2,null,e,null,null),N(),a[pl]=null}};function Tm(e){this._internalRoot=e}Tm.prototype.unstable_scheduleHydration=function(e){if(e){var a=Hi();e={blockedOn:null,target:e,priority:a};for(var r=0;r<Ou.length&&a!==0&&a<Ou[r].priority;r++);Ou.splice(r,0,e),r===0&&N0(e)}};var H0=t.version;if(H0!=="19.2.4")throw Error(s(527,H0,"19.2.4"));H.findDOMNode=function(e){var a=e._reactInternals;if(a===void 0)throw typeof e.render=="function"?Error(s(188)):(e=Object.keys(e).join(","),Error(s(268,e)));return e=v(a),e=e!==null?S(e):null,e=e===null?null:e.stateNode,e};var HS={bundleType:0,version:"19.2.4",rendererPackageName:"react-dom",currentDispatcherRef:w,reconcilerVersion:"19.2.4"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Em=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Em.isDisabled&&Em.supportsFiber)try{Ua=Em.inject(HS),Je=Em}catch{}}return mh.createRoot=function(e,a){if(!o(e))throw Error(s(299));var r=!1,c="",p=If,x=nm,C=Fo;return a!=null&&(a.unstable_strictMode===!0&&(r=!0),a.identifierPrefix!==void 0&&(c=a.identifierPrefix),a.onUncaughtError!==void 0&&(p=a.onUncaughtError),a.onCaughtError!==void 0&&(x=a.onCaughtError),a.onRecoverableError!==void 0&&(C=a.onRecoverableError)),a=E0(e,1,!1,null,null,r,c,null,p,x,C,w0),e[pl]=a.current,Up(e),new Ip(a)},mh.hydrateRoot=function(e,a,r){if(!o(e))throw Error(s(299));var c=!1,p="",x=If,C=nm,z=Fo,Y=null;return r!=null&&(r.unstable_strictMode===!0&&(c=!0),r.identifierPrefix!==void 0&&(p=r.identifierPrefix),r.onUncaughtError!==void 0&&(x=r.onUncaughtError),r.onCaughtError!==void 0&&(C=r.onCaughtError),r.onRecoverableError!==void 0&&(z=r.onRecoverableError),r.formState!==void 0&&(Y=r.formState)),a=E0(e,1,!0,a,r??null,c,p,Y,x,C,z,w0),a.context=C0(null),r=a.current,c=Ln(),c=oi(c),p=_i(c),p.callback=null,Wi(r,p,c),r=c,a.current.lanes=r,Ks(a,r),Jl(a),e[pl]=a.current,Up(e),new Tm(a)},mh.version="19.2.4",mh}var K0;function KS(){if(K0)return ey.exports;K0=1;function i(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(i)}catch(t){console.error(t)}}return i(),ey.exports=ZS(),ey.exports}var kS=KS();/**
51
+ * react-router v7.13.1
52
+ *
53
+ * Copyright (c) Remix Software Inc.
54
+ *
55
+ * This source code is licensed under the MIT license found in the
56
+ * LICENSE.md file in the root directory of this source tree.
57
+ *
58
+ * @license MIT
59
+ */var k0="popstate";function J0(i){return typeof i=="object"&&i!=null&&"pathname"in i&&"search"in i&&"hash"in i&&"state"in i&&"key"in i}function JS(i={}){function t(s,o){var v;let f=(v=o.state)==null?void 0:v.masked,{pathname:d,search:m,hash:g}=f||s.location;return Vy("",{pathname:d,search:m,hash:g},o.state&&o.state.usr||null,o.state&&o.state.key||"default",f?{pathname:s.location.pathname,search:s.location.search,hash:s.location.hash}:void 0)}function n(s,o){return typeof o=="string"?o:Bh(o)}return WS(t,n,null,i)}function qe(i,t){if(i===!1||i===null||typeof i>"u")throw new Error(t)}function hl(i,t){if(!i){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function PS(){return Math.random().toString(36).substring(2,10)}function P0(i,t){return{usr:i.state,key:i.key,idx:t,masked:i.unstable_mask?{pathname:i.pathname,search:i.search,hash:i.hash}:void 0}}function Vy(i,t,n=null,s,o){return{pathname:typeof i=="string"?i:i.pathname,search:"",hash:"",...typeof t=="string"?Oc(t):t,state:n,key:t&&t.key||s||PS(),unstable_mask:o}}function Bh({pathname:i="/",search:t="",hash:n=""}){return t&&t!=="?"&&(i+=t.charAt(0)==="?"?t:"?"+t),n&&n!=="#"&&(i+=n.charAt(0)==="#"?n:"#"+n),i}function Oc(i){let t={};if(i){let n=i.indexOf("#");n>=0&&(t.hash=i.substring(n),i=i.substring(0,n));let s=i.indexOf("?");s>=0&&(t.search=i.substring(s),i=i.substring(0,s)),i&&(t.pathname=i)}return t}function WS(i,t,n,s={}){let{window:o=document.defaultView,v5Compat:f=!1}=s,d=o.history,m="POP",g=null,v=S();v==null&&(v=0,d.replaceState({...d.state,idx:v},""));function S(){return(d.state||{idx:null}).idx}function b(){m="POP";let M=S(),O=M==null?null:M-v;v=M,g&&g({action:m,location:D.location,delta:O})}function A(M,O){m="PUSH";let U=J0(M)?M:Vy(D.location,M,O);v=S()+1;let B=P0(U,v),G=D.createHref(U.unstable_mask||U);try{d.pushState(B,"",G)}catch(Z){if(Z instanceof DOMException&&Z.name==="DataCloneError")throw Z;o.location.assign(G)}f&&g&&g({action:m,location:D.location,delta:1})}function E(M,O){m="REPLACE";let U=J0(M)?M:Vy(D.location,M,O);v=S();let B=P0(U,v),G=D.createHref(U.unstable_mask||U);d.replaceState(B,"",G),f&&g&&g({action:m,location:D.location,delta:0})}function R(M){return FS(M)}let D={get action(){return m},get location(){return i(o,d)},listen(M){if(g)throw new Error("A history only accepts one active listener");return o.addEventListener(k0,b),g=M,()=>{o.removeEventListener(k0,b),g=null}},createHref(M){return t(o,M)},createURL:R,encodeLocation(M){let O=R(M);return{pathname:O.pathname,search:O.search,hash:O.hash}},push:A,replace:E,go(M){return d.go(M)}};return D}function FS(i,t=!1){let n="http://localhost";typeof window<"u"&&(n=window.location.origin!=="null"?window.location.origin:window.location.href),qe(n,"No window.location.(origin|href) available to create URL");let s=typeof i=="string"?i:Bh(i);return s=s.replace(/ $/,"%20"),!t&&s.startsWith("//")&&(s=n+s),new URL(s,n)}function Y1(i,t,n="/"){return IS(i,t,n,!1)}function IS(i,t,n,s){let o=typeof t=="string"?Oc(t):t,f=Ys(o.pathname||"/",n);if(f==null)return null;let d=L1(i);$S(d);let m=null;for(let g=0;m==null&&g<d.length;++g){let v=cb(f);m=rb(d[g],v,s)}return m}function L1(i,t=[],n=[],s="",o=!1){let f=(d,m,g=o,v)=>{let S={relativePath:v===void 0?d.path||"":v,caseSensitive:d.caseSensitive===!0,childrenIndex:m,route:d};if(S.relativePath.startsWith("/")){if(!S.relativePath.startsWith(s)&&g)return;qe(S.relativePath.startsWith(s),`Absolute route path "${S.relativePath}" nested under path "${s}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),S.relativePath=S.relativePath.slice(s.length)}let b=Fl([s,S.relativePath]),A=n.concat(S);d.children&&d.children.length>0&&(qe(d.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${b}".`),L1(d.children,t,A,b,g)),!(d.path==null&&!d.index)&&t.push({path:b,score:sb(b,d.index),routesMeta:A})};return i.forEach((d,m)=>{var g;if(d.path===""||!((g=d.path)!=null&&g.includes("?")))f(d,m);else for(let v of X1(d.path))f(d,m,!0,v)}),t}function X1(i){let t=i.split("/");if(t.length===0)return[];let[n,...s]=t,o=n.endsWith("?"),f=n.replace(/\?$/,"");if(s.length===0)return o?[f,""]:[f];let d=X1(s.join("/")),m=[];return m.push(...d.map(g=>g===""?f:[f,g].join("/"))),o&&m.push(...d),m.map(g=>i.startsWith("/")&&g===""?"/":g)}function $S(i){i.sort((t,n)=>t.score!==n.score?n.score-t.score:ub(t.routesMeta.map(s=>s.childrenIndex),n.routesMeta.map(s=>s.childrenIndex)))}var tb=/^:[\w-]+$/,eb=3,nb=2,ab=1,ib=10,lb=-2,W0=i=>i==="*";function sb(i,t){let n=i.split("/"),s=n.length;return n.some(W0)&&(s+=lb),t&&(s+=nb),n.filter(o=>!W0(o)).reduce((o,f)=>o+(tb.test(f)?eb:f===""?ab:ib),s)}function ub(i,t){return i.length===t.length&&i.slice(0,-1).every((s,o)=>s===t[o])?i[i.length-1]-t[t.length-1]:0}function rb(i,t,n=!1){let{routesMeta:s}=i,o={},f="/",d=[];for(let m=0;m<s.length;++m){let g=s[m],v=m===s.length-1,S=f==="/"?t:t.slice(f.length)||"/",b=Pm({path:g.relativePath,caseSensitive:g.caseSensitive,end:v},S),A=g.route;if(!b&&v&&n&&!s[s.length-1].route.index&&(b=Pm({path:g.relativePath,caseSensitive:g.caseSensitive,end:!1},S)),!b)return null;Object.assign(o,b.params),d.push({params:o,pathname:Fl([f,b.pathname]),pathnameBase:mb(Fl([f,b.pathnameBase])),route:A}),b.pathnameBase!=="/"&&(f=Fl([f,b.pathnameBase]))}return d}function Pm(i,t){typeof i=="string"&&(i={path:i,caseSensitive:!1,end:!0});let[n,s]=ob(i.path,i.caseSensitive,i.end),o=t.match(n);if(!o)return null;let f=o[0],d=f.replace(/(.)\/+$/,"$1"),m=o.slice(1);return{params:s.reduce((v,{paramName:S,isOptional:b},A)=>{if(S==="*"){let R=m[A]||"";d=f.slice(0,f.length-R.length).replace(/(.)\/+$/,"$1")}const E=m[A];return b&&!E?v[S]=void 0:v[S]=(E||"").replace(/%2F/g,"/"),v},{}),pathname:f,pathnameBase:d,pattern:i}}function ob(i,t=!1,n=!0){hl(i==="*"||!i.endsWith("*")||i.endsWith("/*"),`Route path "${i}" will be treated as if it were "${i.replace(/\*$/,"/*")}" because the \`*\` character must always follow a \`/\` in the pattern. To get rid of this warning, please change the route path to "${i.replace(/\*$/,"/*")}".`);let s=[],o="^"+i.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(d,m,g,v,S)=>{if(s.push({paramName:m,isOptional:g!=null}),g){let b=S.charAt(v+d.length);return b&&b!=="/"?"/([^\\/]*)":"(?:/([^\\/]*))?"}return"/([^\\/]+)"}).replace(/\/([\w-]+)\?(\/|$)/g,"(/$1)?$2");return i.endsWith("*")?(s.push({paramName:"*"}),o+=i==="*"||i==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?o+="\\/*$":i!==""&&i!=="/"&&(o+="(?:(?=\\/|$))"),[new RegExp(o,t?void 0:"i"),s]}function cb(i){try{return i.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return hl(!1,`The URL path "${i}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${t}).`),i}}function Ys(i,t){if(t==="/")return i;if(!i.toLowerCase().startsWith(t.toLowerCase()))return null;let n=t.endsWith("/")?t.length-1:t.length,s=i.charAt(n);return s&&s!=="/"?null:i.slice(n)||"/"}var fb=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i;function hb(i,t="/"){let{pathname:n,search:s="",hash:o=""}=typeof i=="string"?Oc(i):i,f;return n?(n=n.replace(/\/\/+/g,"/"),n.startsWith("/")?f=F0(n.substring(1),"/"):f=F0(n,t)):f=t,{pathname:f,search:pb(s),hash:yb(o)}}function F0(i,t){let n=t.replace(/\/+$/,"").split("/");return i.split("/").forEach(o=>{o===".."?n.length>1&&n.pop():o!=="."&&n.push(o)}),n.length>1?n.join("/"):"/"}function ly(i,t,n,s){return`Cannot include a '${i}' character in a manually specified \`to.${t}\` field [${JSON.stringify(s)}]. Please separate it out to the \`to.${n}\` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.`}function db(i){return i.filter((t,n)=>n===0||t.route.path&&t.route.path.length>0)}function vg(i){let t=db(i);return t.map((n,s)=>s===t.length-1?n.pathname:n.pathnameBase)}function sp(i,t,n,s=!1){let o;typeof i=="string"?o=Oc(i):(o={...i},qe(!o.pathname||!o.pathname.includes("?"),ly("?","pathname","search",o)),qe(!o.pathname||!o.pathname.includes("#"),ly("#","pathname","hash",o)),qe(!o.search||!o.search.includes("#"),ly("#","search","hash",o)));let f=i===""||o.pathname==="",d=f?"/":o.pathname,m;if(d==null)m=n;else{let b=t.length-1;if(!s&&d.startsWith("..")){let A=d.split("/");for(;A[0]==="..";)A.shift(),b-=1;o.pathname=A.join("/")}m=b>=0?t[b]:"/"}let g=hb(o,m),v=d&&d!=="/"&&d.endsWith("/"),S=(f||d===".")&&n.endsWith("/");return!g.pathname.endsWith("/")&&(v||S)&&(g.pathname+="/"),g}var Fl=i=>i.join("/").replace(/\/\/+/g,"/"),mb=i=>i.replace(/\/+$/,"").replace(/^\/*/,"/"),pb=i=>!i||i==="?"?"":i.startsWith("?")?i:"?"+i,yb=i=>!i||i==="#"?"":i.startsWith("#")?i:"#"+i,gb=class{constructor(i,t,n,s=!1){this.status=i,this.statusText=t||"",this.internal=s,n instanceof Error?(this.data=n.toString(),this.error=n):this.data=n}};function vb(i){return i!=null&&typeof i.status=="number"&&typeof i.statusText=="string"&&typeof i.internal=="boolean"&&"data"in i}function xb(i){return i.map(t=>t.route.path).filter(Boolean).join("/").replace(/\/\/*/g,"/")||"/"}var V1=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function Q1(i,t){let n=i;if(typeof n!="string"||!fb.test(n))return{absoluteURL:void 0,isExternal:!1,to:n};let s=n,o=!1;if(V1)try{let f=new URL(window.location.href),d=n.startsWith("//")?new URL(f.protocol+n):new URL(n),m=Ys(d.pathname,t);d.origin===f.origin&&m!=null?n=m+d.search+d.hash:o=!0}catch{hl(!1,`<Link to="${n}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}return{absoluteURL:s,isExternal:o,to:n}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");var Z1=["POST","PUT","PATCH","DELETE"];new Set(Z1);var _b=["GET",...Z1];new Set(_b);var Nc=X.createContext(null);Nc.displayName="DataRouter";var up=X.createContext(null);up.displayName="DataRouterState";var Sb=X.createContext(!1),K1=X.createContext({isTransitioning:!1});K1.displayName="ViewTransition";var bb=X.createContext(new Map);bb.displayName="Fetchers";var Tb=X.createContext(null);Tb.displayName="Await";var ui=X.createContext(null);ui.displayName="Navigation";var Xh=X.createContext(null);Xh.displayName="Location";var dl=X.createContext({outlet:null,matches:[],isDataRoute:!1});dl.displayName="Route";var xg=X.createContext(null);xg.displayName="RouteError";var k1="REACT_ROUTER_ERROR",Eb="REDIRECT",Cb="ROUTE_ERROR_RESPONSE";function Ab(i){if(i.startsWith(`${k1}:${Eb}:{`))try{let t=JSON.parse(i.slice(28));if(typeof t=="object"&&t&&typeof t.status=="number"&&typeof t.statusText=="string"&&typeof t.location=="string"&&typeof t.reloadDocument=="boolean"&&typeof t.replace=="boolean")return t}catch{}}function Mb(i){if(i.startsWith(`${k1}:${Cb}:{`))try{let t=JSON.parse(i.slice(40));if(typeof t=="object"&&t&&typeof t.status=="number"&&typeof t.statusText=="string")return new gb(t.status,t.statusText,t.data)}catch{}}function Rb(i,{relative:t}={}){qe(Uc(),"useHref() may be used only in the context of a <Router> component.");let{basename:n,navigator:s}=X.useContext(ui),{hash:o,pathname:f,search:d}=Vh(i,{relative:t}),m=f;return n!=="/"&&(m=f==="/"?n:Fl([n,f])),s.createHref({pathname:m,search:d,hash:o})}function Uc(){return X.useContext(Xh)!=null}function Il(){return qe(Uc(),"useLocation() may be used only in the context of a <Router> component."),X.useContext(Xh).location}var J1="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function P1(i){X.useContext(ui).static||X.useLayoutEffect(i)}function rp(){let{isDataRoute:i}=X.useContext(dl);return i?Vb():zb()}function zb(){qe(Uc(),"useNavigate() may be used only in the context of a <Router> component.");let i=X.useContext(Nc),{basename:t,navigator:n}=X.useContext(ui),{matches:s}=X.useContext(dl),{pathname:o}=Il(),f=JSON.stringify(vg(s)),d=X.useRef(!1);return P1(()=>{d.current=!0}),X.useCallback((g,v={})=>{if(hl(d.current,J1),!d.current)return;if(typeof g=="number"){n.go(g);return}let S=sp(g,JSON.parse(f),o,v.relative==="path");i==null&&t!=="/"&&(S.pathname=S.pathname==="/"?t:Fl([t,S.pathname])),(v.replace?n.replace:n.push)(S,v.state,v)},[t,n,f,o,i])}var Db=X.createContext(null);function Ob(i){let t=X.useContext(dl).outlet;return X.useMemo(()=>t&&X.createElement(Db.Provider,{value:i},t),[t,i])}function Vh(i,{relative:t}={}){let{matches:n}=X.useContext(dl),{pathname:s}=Il(),o=JSON.stringify(vg(n));return X.useMemo(()=>sp(i,JSON.parse(o),s,t==="path"),[i,o,s,t])}function Nb(i,t){return W1(i,t)}function W1(i,t,n){var M;qe(Uc(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:s}=X.useContext(ui),{matches:o}=X.useContext(dl),f=o[o.length-1],d=f?f.params:{},m=f?f.pathname:"/",g=f?f.pathnameBase:"/",v=f&&f.route;{let O=v&&v.path||"";I1(m,!v||O.endsWith("*")||O.endsWith("*?"),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${m}" (under <Route path="${O}">) but the parent route path has no trailing "*". This means if you navigate deeper, the parent won't match anymore and therefore the child routes will never render.
60
+
61
+ Please change the parent <Route path="${O}"> to <Route path="${O==="/"?"*":`${O}/*`}">.`)}let S=Il(),b;if(t){let O=typeof t=="string"?Oc(t):t;qe(g==="/"||((M=O.pathname)==null?void 0:M.startsWith(g)),`When overriding the location using \`<Routes location>\` or \`useRoutes(routes, location)\`, the location pathname must begin with the portion of the URL pathname that was matched by all parent routes. The current pathname base is "${g}" but pathname "${O.pathname}" was given in the \`location\` prop.`),b=O}else b=S;let A=b.pathname||"/",E=A;if(g!=="/"){let O=g.replace(/^\//,"").split("/");E="/"+A.replace(/^\//,"").split("/").slice(O.length).join("/")}let R=Y1(i,{pathname:E});hl(v||R!=null,`No routes matched location "${b.pathname}${b.search}${b.hash}" `),hl(R==null||R[R.length-1].route.element!==void 0||R[R.length-1].route.Component!==void 0||R[R.length-1].route.lazy!==void 0,`Matched leaf route at location "${b.pathname}${b.search}${b.hash}" does not have an element or Component. This means it will render an <Outlet /> with a null value by default resulting in an "empty" page.`);let D=Gb(R&&R.map(O=>Object.assign({},O,{params:Object.assign({},d,O.params),pathname:Fl([g,s.encodeLocation?s.encodeLocation(O.pathname.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:O.pathname]),pathnameBase:O.pathnameBase==="/"?g:Fl([g,s.encodeLocation?s.encodeLocation(O.pathnameBase.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:O.pathnameBase])})),o,n);return t&&D?X.createElement(Xh.Provider,{value:{location:{pathname:"/",search:"",hash:"",state:null,key:"default",unstable_mask:void 0,...b},navigationType:"POP"}},D):D}function Ub(){let i=Xb(),t=vb(i)?`${i.status} ${i.statusText}`:i instanceof Error?i.message:JSON.stringify(i),n=i instanceof Error?i.stack:null,s="rgba(200,200,200, 0.5)",o={padding:"0.5rem",backgroundColor:s},f={padding:"2px 4px",backgroundColor:s},d=null;return console.error("Error handled by React Router default ErrorBoundary:",i),d=X.createElement(X.Fragment,null,X.createElement("p",null,"💿 Hey developer 👋"),X.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",X.createElement("code",{style:f},"ErrorBoundary")," or"," ",X.createElement("code",{style:f},"errorElement")," prop on your route.")),X.createElement(X.Fragment,null,X.createElement("h2",null,"Unexpected Application Error!"),X.createElement("h3",{style:{fontStyle:"italic"}},t),n?X.createElement("pre",{style:o},n):null,d)}var Bb=X.createElement(Ub,null),F1=class extends X.Component{constructor(i){super(i),this.state={location:i.location,revalidation:i.revalidation,error:i.error}}static getDerivedStateFromError(i){return{error:i}}static getDerivedStateFromProps(i,t){return t.location!==i.location||t.revalidation!=="idle"&&i.revalidation==="idle"?{error:i.error,location:i.location,revalidation:i.revalidation}:{error:i.error!==void 0?i.error:t.error,location:t.location,revalidation:i.revalidation||t.revalidation}}componentDidCatch(i,t){this.props.onError?this.props.onError(i,t):console.error("React Router caught the following error during render",i)}render(){let i=this.state.error;if(this.context&&typeof i=="object"&&i&&"digest"in i&&typeof i.digest=="string"){const n=Mb(i.digest);n&&(i=n)}let t=i!==void 0?X.createElement(dl.Provider,{value:this.props.routeContext},X.createElement(xg.Provider,{value:i,children:this.props.component})):this.props.children;return this.context?X.createElement(wb,{error:i},t):t}};F1.contextType=Sb;var sy=new WeakMap;function wb({children:i,error:t}){let{basename:n}=X.useContext(ui);if(typeof t=="object"&&t&&"digest"in t&&typeof t.digest=="string"){let s=Ab(t.digest);if(s){let o=sy.get(t);if(o)throw o;let f=Q1(s.location,n);if(V1&&!sy.get(t))if(f.isExternal||s.reloadDocument)window.location.href=f.absoluteURL||f.to;else{const d=Promise.resolve().then(()=>window.__reactRouterDataRouter.navigate(f.to,{replace:s.replace}));throw sy.set(t,d),d}return X.createElement("meta",{httpEquiv:"refresh",content:`0;url=${f.absoluteURL||f.to}`})}}return i}function Hb({routeContext:i,match:t,children:n}){let s=X.useContext(Nc);return s&&s.static&&s.staticContext&&(t.route.errorElement||t.route.ErrorBoundary)&&(s.staticContext._deepestRenderedBoundaryId=t.route.id),X.createElement(dl.Provider,{value:i},n)}function Gb(i,t=[],n){let s=n==null?void 0:n.state;if(i==null){if(!s)return null;if(s.errors)i=s.matches;else if(t.length===0&&!s.initialized&&s.matches.length>0)i=s.matches;else return null}let o=i,f=s==null?void 0:s.errors;if(f!=null){let S=o.findIndex(b=>b.route.id&&(f==null?void 0:f[b.route.id])!==void 0);qe(S>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(f).join(",")}`),o=o.slice(0,Math.min(o.length,S+1))}let d=!1,m=-1;if(n&&s){d=s.renderFallback;for(let S=0;S<o.length;S++){let b=o[S];if((b.route.HydrateFallback||b.route.hydrateFallbackElement)&&(m=S),b.route.id){let{loaderData:A,errors:E}=s,R=b.route.loader&&!A.hasOwnProperty(b.route.id)&&(!E||E[b.route.id]===void 0);if(b.route.lazy||R){n.isStatic&&(d=!0),m>=0?o=o.slice(0,m+1):o=[o[0]];break}}}}let g=n==null?void 0:n.onError,v=s&&g?(S,b)=>{var A,E;g(S,{location:s.location,params:((E=(A=s.matches)==null?void 0:A[0])==null?void 0:E.params)??{},unstable_pattern:xb(s.matches),errorInfo:b})}:void 0;return o.reduceRight((S,b,A)=>{let E,R=!1,D=null,M=null;s&&(E=f&&b.route.id?f[b.route.id]:void 0,D=b.route.errorElement||Bb,d&&(m<0&&A===0?(I1("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),R=!0,M=null):m===A&&(R=!0,M=b.route.hydrateFallbackElement||null)));let O=t.concat(o.slice(0,A+1)),U=()=>{let B;return E?B=D:R?B=M:b.route.Component?B=X.createElement(b.route.Component,null):b.route.element?B=b.route.element:B=S,X.createElement(Hb,{match:b,routeContext:{outlet:S,matches:O,isDataRoute:s!=null},children:B})};return s&&(b.route.ErrorBoundary||b.route.errorElement||A===0)?X.createElement(F1,{location:s.location,revalidation:s.revalidation,component:D,error:E,children:U(),routeContext:{outlet:null,matches:O,isDataRoute:!0},onError:v}):U()},null)}function _g(i){return`${i} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function jb(i){let t=X.useContext(Nc);return qe(t,_g(i)),t}function qb(i){let t=X.useContext(up);return qe(t,_g(i)),t}function Yb(i){let t=X.useContext(dl);return qe(t,_g(i)),t}function Sg(i){let t=Yb(i),n=t.matches[t.matches.length-1];return qe(n.route.id,`${i} can only be used on routes that contain a unique "id"`),n.route.id}function Lb(){return Sg("useRouteId")}function Xb(){var s;let i=X.useContext(xg),t=qb("useRouteError"),n=Sg("useRouteError");return i!==void 0?i:(s=t.errors)==null?void 0:s[n]}function Vb(){let{router:i}=jb("useNavigate"),t=Sg("useNavigate"),n=X.useRef(!1);return P1(()=>{n.current=!0}),X.useCallback(async(o,f={})=>{hl(n.current,J1),n.current&&(typeof o=="number"?await i.navigate(o):await i.navigate(o,{fromRouteId:t,...f}))},[i,t])}var I0={};function I1(i,t,n){!t&&!I0[i]&&(I0[i]=!0,hl(!1,n))}X.memo(Qb);function Qb({routes:i,future:t,state:n,isStatic:s,onError:o}){return W1(i,void 0,{state:n,isStatic:s,onError:o})}function Zb({to:i,replace:t,state:n,relative:s}){qe(Uc(),"<Navigate> may be used only in the context of a <Router> component.");let{static:o}=X.useContext(ui);hl(!o,"<Navigate> must not be used on the initial render in a <StaticRouter>. This is a no-op, but you should modify your code so the <Navigate> is only ever rendered in response to some user interaction or state change.");let{matches:f}=X.useContext(dl),{pathname:d}=Il(),m=rp(),g=sp(i,vg(f),d,s==="path"),v=JSON.stringify(g);return X.useEffect(()=>{m(JSON.parse(v),{replace:t,state:n,relative:s})},[m,v,s,t,n]),null}function Kb(i){return Ob(i.context)}function Uu(i){qe(!1,"A <Route> is only ever to be used as the child of <Routes> element, never rendered directly. Please wrap your <Route> in a <Routes>.")}function kb({basename:i="/",children:t=null,location:n,navigationType:s="POP",navigator:o,static:f=!1,unstable_useTransitions:d}){qe(!Uc(),"You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");let m=i.replace(/^\/*/,"/"),g=X.useMemo(()=>({basename:m,navigator:o,static:f,unstable_useTransitions:d,future:{}}),[m,o,f,d]);typeof n=="string"&&(n=Oc(n));let{pathname:v="/",search:S="",hash:b="",state:A=null,key:E="default",unstable_mask:R}=n,D=X.useMemo(()=>{let M=Ys(v,m);return M==null?null:{location:{pathname:M,search:S,hash:b,state:A,key:E,unstable_mask:R},navigationType:s}},[m,v,S,b,A,E,s,R]);return hl(D!=null,`<Router basename="${m}"> is not able to match the URL "${v}${S}${b}" because it does not start with the basename, so the <Router> won't render anything.`),D==null?null:X.createElement(ui.Provider,{value:g},X.createElement(Xh.Provider,{children:t,value:D}))}function Jb({children:i,location:t}){return Nb(Qy(i),t)}function Qy(i,t=[]){let n=[];return X.Children.forEach(i,(s,o)=>{if(!X.isValidElement(s))return;let f=[...t,o];if(s.type===X.Fragment){n.push.apply(n,Qy(s.props.children,f));return}qe(s.type===Uu,`[${typeof s.type=="string"?s.type:s.type.name}] is not a <Route> component. All component children of <Routes> must be a <Route> or <React.Fragment>`),qe(!s.props.index||!s.props.children,"An index route cannot have child routes.");let d={id:s.props.id||f.join("-"),caseSensitive:s.props.caseSensitive,element:s.props.element,Component:s.props.Component,index:s.props.index,path:s.props.path,middleware:s.props.middleware,loader:s.props.loader,action:s.props.action,hydrateFallbackElement:s.props.hydrateFallbackElement,HydrateFallback:s.props.HydrateFallback,errorElement:s.props.errorElement,ErrorBoundary:s.props.ErrorBoundary,hasErrorBoundary:s.props.hasErrorBoundary===!0||s.props.ErrorBoundary!=null||s.props.errorElement!=null,shouldRevalidate:s.props.shouldRevalidate,handle:s.props.handle,lazy:s.props.lazy};s.props.children&&(d.children=Qy(s.props.children,f)),n.push(d)}),n}var Qm="get",Zm="application/x-www-form-urlencoded";function op(i){return typeof HTMLElement<"u"&&i instanceof HTMLElement}function Pb(i){return op(i)&&i.tagName.toLowerCase()==="button"}function Wb(i){return op(i)&&i.tagName.toLowerCase()==="form"}function Fb(i){return op(i)&&i.tagName.toLowerCase()==="input"}function Ib(i){return!!(i.metaKey||i.altKey||i.ctrlKey||i.shiftKey)}function $b(i,t){return i.button===0&&(!t||t==="_self")&&!Ib(i)}var Am=null;function t2(){if(Am===null)try{new FormData(document.createElement("form"),0),Am=!1}catch{Am=!0}return Am}var e2=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function uy(i){return i!=null&&!e2.has(i)?(hl(!1,`"${i}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${Zm}"`),null):i}function n2(i,t){let n,s,o,f,d;if(Wb(i)){let m=i.getAttribute("action");s=m?Ys(m,t):null,n=i.getAttribute("method")||Qm,o=uy(i.getAttribute("enctype"))||Zm,f=new FormData(i)}else if(Pb(i)||Fb(i)&&(i.type==="submit"||i.type==="image")){let m=i.form;if(m==null)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');let g=i.getAttribute("formaction")||m.getAttribute("action");if(s=g?Ys(g,t):null,n=i.getAttribute("formmethod")||m.getAttribute("method")||Qm,o=uy(i.getAttribute("formenctype"))||uy(m.getAttribute("enctype"))||Zm,f=new FormData(m,i),!t2()){let{name:v,type:S,value:b}=i;if(S==="image"){let A=v?`${v}.`:"";f.append(`${A}x`,"0"),f.append(`${A}y`,"0")}else v&&f.append(v,b)}}else{if(op(i))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');n=Qm,s=null,o=Zm,d=i}return f&&o==="text/plain"&&(d=f,f=void 0),{action:s,method:n.toLowerCase(),encType:o,formData:f,body:d}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");function bg(i,t){if(i===!1||i===null||typeof i>"u")throw new Error(t)}function a2(i,t,n,s){let o=typeof i=="string"?new URL(i,typeof window>"u"?"server://singlefetch/":window.location.origin):i;return n?o.pathname.endsWith("/")?o.pathname=`${o.pathname}_.${s}`:o.pathname=`${o.pathname}.${s}`:o.pathname==="/"?o.pathname=`_root.${s}`:t&&Ys(o.pathname,t)==="/"?o.pathname=`${t.replace(/\/$/,"")}/_root.${s}`:o.pathname=`${o.pathname.replace(/\/$/,"")}.${s}`,o}async function i2(i,t){if(i.id in t)return t[i.id];try{let n=await import(i.module);return t[i.id]=n,n}catch(n){return console.error(`Error loading route module \`${i.module}\`, reloading page...`),console.error(n),window.__reactRouterContext&&window.__reactRouterContext.isSpaMode,window.location.reload(),new Promise(()=>{})}}function l2(i){return i==null?!1:i.href==null?i.rel==="preload"&&typeof i.imageSrcSet=="string"&&typeof i.imageSizes=="string":typeof i.rel=="string"&&typeof i.href=="string"}async function s2(i,t,n){let s=await Promise.all(i.map(async o=>{let f=t.routes[o.route.id];if(f){let d=await i2(f,n);return d.links?d.links():[]}return[]}));return c2(s.flat(1).filter(l2).filter(o=>o.rel==="stylesheet"||o.rel==="preload").map(o=>o.rel==="stylesheet"?{...o,rel:"prefetch",as:"style"}:{...o,rel:"prefetch"}))}function $0(i,t,n,s,o,f){let d=(g,v)=>n[v]?g.route.id!==n[v].route.id:!0,m=(g,v)=>{var S;return n[v].pathname!==g.pathname||((S=n[v].route.path)==null?void 0:S.endsWith("*"))&&n[v].params["*"]!==g.params["*"]};return f==="assets"?t.filter((g,v)=>d(g,v)||m(g,v)):f==="data"?t.filter((g,v)=>{var b;let S=s.routes[g.route.id];if(!S||!S.hasLoader)return!1;if(d(g,v)||m(g,v))return!0;if(g.route.shouldRevalidate){let A=g.route.shouldRevalidate({currentUrl:new URL(o.pathname+o.search+o.hash,window.origin),currentParams:((b=n[0])==null?void 0:b.params)||{},nextUrl:new URL(i,window.origin),nextParams:g.params,defaultShouldRevalidate:!0});if(typeof A=="boolean")return A}return!0}):[]}function u2(i,t,{includeHydrateFallback:n}={}){return r2(i.map(s=>{let o=t.routes[s.route.id];if(!o)return[];let f=[o.module];return o.clientActionModule&&(f=f.concat(o.clientActionModule)),o.clientLoaderModule&&(f=f.concat(o.clientLoaderModule)),n&&o.hydrateFallbackModule&&(f=f.concat(o.hydrateFallbackModule)),o.imports&&(f=f.concat(o.imports)),f}).flat(1))}function r2(i){return[...new Set(i)]}function o2(i){let t={},n=Object.keys(i).sort();for(let s of n)t[s]=i[s];return t}function c2(i,t){let n=new Set;return new Set(t),i.reduce((s,o)=>{let f=JSON.stringify(o2(o));return n.has(f)||(n.add(f),s.push({key:f,link:o})),s},[])}function $1(){let i=X.useContext(Nc);return bg(i,"You must render this element inside a <DataRouterContext.Provider> element"),i}function f2(){let i=X.useContext(up);return bg(i,"You must render this element inside a <DataRouterStateContext.Provider> element"),i}var Tg=X.createContext(void 0);Tg.displayName="FrameworkContext";function tx(){let i=X.useContext(Tg);return bg(i,"You must render this element inside a <HydratedRouter> element"),i}function h2(i,t){let n=X.useContext(Tg),[s,o]=X.useState(!1),[f,d]=X.useState(!1),{onFocus:m,onBlur:g,onMouseEnter:v,onMouseLeave:S,onTouchStart:b}=t,A=X.useRef(null);X.useEffect(()=>{if(i==="render"&&d(!0),i==="viewport"){let D=O=>{O.forEach(U=>{d(U.isIntersecting)})},M=new IntersectionObserver(D,{threshold:.5});return A.current&&M.observe(A.current),()=>{M.disconnect()}}},[i]),X.useEffect(()=>{if(s){let D=setTimeout(()=>{d(!0)},100);return()=>{clearTimeout(D)}}},[s]);let E=()=>{o(!0)},R=()=>{o(!1),d(!1)};return n?i!=="intent"?[f,A,{}]:[f,A,{onFocus:ph(m,E),onBlur:ph(g,R),onMouseEnter:ph(v,E),onMouseLeave:ph(S,R),onTouchStart:ph(b,E)}]:[!1,A,{}]}function ph(i,t){return n=>{i&&i(n),n.defaultPrevented||t(n)}}function d2({page:i,...t}){let{router:n}=$1(),s=X.useMemo(()=>Y1(n.routes,i,n.basename),[n.routes,i,n.basename]);return s?X.createElement(p2,{page:i,matches:s,...t}):null}function m2(i){let{manifest:t,routeModules:n}=tx(),[s,o]=X.useState([]);return X.useEffect(()=>{let f=!1;return s2(i,t,n).then(d=>{f||o(d)}),()=>{f=!0}},[i,t,n]),s}function p2({page:i,matches:t,...n}){let s=Il(),{future:o,manifest:f,routeModules:d}=tx(),{basename:m}=$1(),{loaderData:g,matches:v}=f2(),S=X.useMemo(()=>$0(i,t,v,f,s,"data"),[i,t,v,f,s]),b=X.useMemo(()=>$0(i,t,v,f,s,"assets"),[i,t,v,f,s]),A=X.useMemo(()=>{if(i===s.pathname+s.search+s.hash)return[];let D=new Set,M=!1;if(t.forEach(U=>{var G;let B=f.routes[U.route.id];!B||!B.hasLoader||(!S.some(Z=>Z.route.id===U.route.id)&&U.route.id in g&&((G=d[U.route.id])!=null&&G.shouldRevalidate)||B.hasClientLoader?M=!0:D.add(U.route.id))}),D.size===0)return[];let O=a2(i,m,o.unstable_trailingSlashAwareDataRequests,"data");return M&&D.size>0&&O.searchParams.set("_routes",t.filter(U=>D.has(U.route.id)).map(U=>U.route.id).join(",")),[O.pathname+O.search]},[m,o.unstable_trailingSlashAwareDataRequests,g,s,f,S,t,i,d]),E=X.useMemo(()=>u2(b,f),[b,f]),R=m2(b);return X.createElement(X.Fragment,null,A.map(D=>X.createElement("link",{key:D,rel:"prefetch",as:"fetch",href:D,...n})),E.map(D=>X.createElement("link",{key:D,rel:"modulepreload",href:D,...n})),R.map(({key:D,link:M})=>X.createElement("link",{key:D,nonce:n.nonce,...M,crossOrigin:M.crossOrigin??n.crossOrigin})))}function y2(...i){return t=>{i.forEach(n=>{typeof n=="function"?n(t):n!=null&&(n.current=t)})}}var g2=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";try{g2&&(window.__reactRouterVersion="7.13.1")}catch{}function v2({basename:i,children:t,unstable_useTransitions:n,window:s}){let o=X.useRef();o.current==null&&(o.current=JS({window:s,v5Compat:!0}));let f=o.current,[d,m]=X.useState({action:f.action,location:f.location}),g=X.useCallback(v=>{n===!1?m(v):X.startTransition(()=>m(v))},[n]);return X.useLayoutEffect(()=>f.listen(g),[f,g]),X.createElement(kb,{basename:i,children:t,location:d.location,navigationType:d.action,navigator:f,unstable_useTransitions:n})}var ex=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,nx=X.forwardRef(function({onClick:t,discover:n="render",prefetch:s="none",relative:o,reloadDocument:f,replace:d,unstable_mask:m,state:g,target:v,to:S,preventScrollReset:b,viewTransition:A,unstable_defaultShouldRevalidate:E,...R},D){let{basename:M,navigator:O,unstable_useTransitions:U}=X.useContext(ui),B=typeof S=="string"&&ex.test(S),G=Q1(S,M);S=G.to;let Z=Rb(S,{relative:o}),V=Il(),K=null;if(m){let Dt=sp(m,[],V.unstable_mask?V.unstable_mask.pathname:"/",!0);M!=="/"&&(Dt.pathname=Dt.pathname==="/"?M:Fl([M,Dt.pathname])),K=O.createHref(Dt)}let[pt,ct,ht]=h2(s,R),dt=S2(S,{replace:d,unstable_mask:m,state:g,target:v,preventScrollReset:b,relative:o,viewTransition:A,unstable_defaultShouldRevalidate:E,unstable_useTransitions:U});function vt(Dt){t&&t(Dt),Dt.defaultPrevented||dt(Dt)}let _t=!(G.isExternal||f),xt=X.createElement("a",{...R,...ht,href:(_t?K:void 0)||G.absoluteURL||Z,onClick:_t?vt:t,ref:y2(D,ct),target:v,"data-discover":!B&&n==="render"?"true":void 0});return pt&&!B?X.createElement(X.Fragment,null,xt,X.createElement(d2,{page:Z})):xt});nx.displayName="Link";var Th=X.forwardRef(function({"aria-current":t="page",caseSensitive:n=!1,className:s="",end:o=!1,style:f,to:d,viewTransition:m,children:g,...v},S){let b=Vh(d,{relative:v.relative}),A=Il(),E=X.useContext(up),{navigator:R,basename:D}=X.useContext(ui),M=E!=null&&A2(b)&&m===!0,O=R.encodeLocation?R.encodeLocation(b).pathname:b.pathname,U=A.pathname,B=E&&E.navigation&&E.navigation.location?E.navigation.location.pathname:null;n||(U=U.toLowerCase(),B=B?B.toLowerCase():null,O=O.toLowerCase()),B&&D&&(B=Ys(B,D)||B);const G=O!=="/"&&O.endsWith("/")?O.length-1:O.length;let Z=U===O||!o&&U.startsWith(O)&&U.charAt(G)==="/",V=B!=null&&(B===O||!o&&B.startsWith(O)&&B.charAt(O.length)==="/"),K={isActive:Z,isPending:V,isTransitioning:M},pt=Z?t:void 0,ct;typeof s=="function"?ct=s(K):ct=[s,Z?"active":null,V?"pending":null,M?"transitioning":null].filter(Boolean).join(" ");let ht=typeof f=="function"?f(K):f;return X.createElement(nx,{...v,"aria-current":pt,className:ct,ref:S,style:ht,to:d,viewTransition:m},typeof g=="function"?g(K):g)});Th.displayName="NavLink";var x2=X.forwardRef(({discover:i="render",fetcherKey:t,navigate:n,reloadDocument:s,replace:o,state:f,method:d=Qm,action:m,onSubmit:g,relative:v,preventScrollReset:S,viewTransition:b,unstable_defaultShouldRevalidate:A,...E},R)=>{let{unstable_useTransitions:D}=X.useContext(ui),M=E2(),O=C2(m,{relative:v}),U=d.toLowerCase()==="get"?"get":"post",B=typeof m=="string"&&ex.test(m),G=Z=>{if(g&&g(Z),Z.defaultPrevented)return;Z.preventDefault();let V=Z.nativeEvent.submitter,K=(V==null?void 0:V.getAttribute("formmethod"))||d,pt=()=>M(V||Z.currentTarget,{fetcherKey:t,method:K,navigate:n,replace:o,state:f,relative:v,preventScrollReset:S,viewTransition:b,unstable_defaultShouldRevalidate:A});D&&n!==!1?X.startTransition(()=>pt()):pt()};return X.createElement("form",{ref:R,method:U,action:O,onSubmit:s?g:G,...E,"data-discover":!B&&i==="render"?"true":void 0})});x2.displayName="Form";function _2(i){return`${i} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function ax(i){let t=X.useContext(Nc);return qe(t,_2(i)),t}function S2(i,{target:t,replace:n,unstable_mask:s,state:o,preventScrollReset:f,relative:d,viewTransition:m,unstable_defaultShouldRevalidate:g,unstable_useTransitions:v}={}){let S=rp(),b=Il(),A=Vh(i,{relative:d});return X.useCallback(E=>{if($b(E,t)){E.preventDefault();let R=n!==void 0?n:Bh(b)===Bh(A),D=()=>S(i,{replace:R,unstable_mask:s,state:o,preventScrollReset:f,relative:d,viewTransition:m,unstable_defaultShouldRevalidate:g});v?X.startTransition(()=>D()):D()}},[b,S,A,n,s,o,t,i,f,d,m,g,v])}var b2=0,T2=()=>`__${String(++b2)}__`;function E2(){let{router:i}=ax("useSubmit"),{basename:t}=X.useContext(ui),n=Lb(),s=i.fetch,o=i.navigate;return X.useCallback(async(f,d={})=>{let{action:m,method:g,encType:v,formData:S,body:b}=n2(f,t);if(d.navigate===!1){let A=d.fetcherKey||T2();await s(A,n,d.action||m,{unstable_defaultShouldRevalidate:d.unstable_defaultShouldRevalidate,preventScrollReset:d.preventScrollReset,formData:S,body:b,formMethod:d.method||g,formEncType:d.encType||v,flushSync:d.flushSync})}else await o(d.action||m,{unstable_defaultShouldRevalidate:d.unstable_defaultShouldRevalidate,preventScrollReset:d.preventScrollReset,formData:S,body:b,formMethod:d.method||g,formEncType:d.encType||v,replace:d.replace,state:d.state,fromRouteId:n,flushSync:d.flushSync,viewTransition:d.viewTransition})},[s,o,t,n])}function C2(i,{relative:t}={}){let{basename:n}=X.useContext(ui),s=X.useContext(dl);qe(s,"useFormAction must be used inside a RouteContext");let[o]=s.matches.slice(-1),f={...Vh(i||".",{relative:t})},d=Il();if(i==null){f.search=d.search;let m=new URLSearchParams(f.search),g=m.getAll("index");if(g.some(S=>S==="")){m.delete("index"),g.filter(b=>b).forEach(b=>m.append("index",b));let S=m.toString();f.search=S?`?${S}`:""}}return(!i||i===".")&&o.route.index&&(f.search=f.search?f.search.replace(/^\?/,"?index&"):"?index"),n!=="/"&&(f.pathname=f.pathname==="/"?n:Fl([n,f.pathname])),Bh(f)}function A2(i,{relative:t}={}){let n=X.useContext(K1);qe(n!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:s}=ax("useViewTransitionState"),o=Vh(i,{relative:t});if(!n.isTransitioning)return!1;let f=Ys(n.currentLocation.pathname,s)||n.currentLocation.pathname,d=Ys(n.nextLocation.pathname,s)||n.nextLocation.pathname;return Pm(o.pathname,d)!=null||Pm(o.pathname,f)!=null}const tv=i=>{let t;const n=new Set,s=(v,S)=>{const b=typeof v=="function"?v(t):v;if(!Object.is(b,t)){const A=t;t=S??(typeof b!="object"||b===null)?b:Object.assign({},t,b),n.forEach(E=>E(t,A))}},o=()=>t,m={setState:s,getState:o,getInitialState:()=>g,subscribe:v=>(n.add(v),()=>n.delete(v))},g=t=i(s,o,m);return m},M2=(i=>i?tv(i):tv),R2=i=>i;function z2(i,t=R2){const n=Cm.useSyncExternalStore(i.subscribe,Cm.useCallback(()=>t(i.getState()),[i,t]),Cm.useCallback(()=>t(i.getInitialState()),[i,t]));return Cm.useDebugValue(n),n}const ev=i=>{const t=M2(i),n=s=>z2(t,s);return Object.assign(n,t),n},cp=(i=>i?ev(i):ev),cl=cp(i=>({user:null,isAuthenticated:!1,loading:!1,error:null,login:async(t,n)=>{i({loading:!0,error:null});try{const s=await fetch("/api/auth/login",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({username:t,password:n}),credentials:"include"}),o=await s.json();if(!s.ok){i({loading:!1,error:o.error||"Login failed"});return}i({user:o.user,isAuthenticated:!0,loading:!1,error:null})}catch{i({loading:!1,error:"Network error"})}},logout:async()=>{try{await fetch("/api/auth/logout",{method:"POST",credentials:"include"})}catch{}i({user:null,isAuthenticated:!1,error:null})},checkAuth:async()=>{i({loading:!0});try{const t=await fetch("/api/auth/me",{credentials:"include"});if(t.ok){const n=await t.json();i({user:n.user,isAuthenticated:!0,loading:!1})}else i({user:null,isAuthenticated:!1,loading:!1})}catch{i({user:null,isAuthenticated:!1,loading:!1})}},reset:()=>i({user:null,isAuthenticated:!1,loading:!1,error:null})})),Ra=cp((i,t)=>({squads:[],selectedSquad:null,activeStates:{},fetchSquads:async()=>{try{const n=await fetch("/api/squads",{credentials:"include"});if(n.ok){const s=await n.json();i({squads:s.squads})}}catch{}},selectSquad:n=>i({selectedSquad:n}),setSquadState:(n,s)=>i(o=>({activeStates:{...o.activeStates,[n]:s}})),clearSquadState:n=>i(s=>{const{[n]:o,...f}=s.activeStates;return{activeStates:f}}),reset:()=>i({squads:[],selectedSquad:null,activeStates:{}})}));let D2=0;function nv(){return`local-${Date.now()}-${++D2}`}const Oi=cp((i,t)=>({messages:[],conversationId:null,streaming:!1,streamingText:"",error:null,addUserMessage:n=>{const s={id:nv(),role:"user",content:n,createdAt:new Date().toISOString()};i(o=>({messages:[...o.messages,s],error:null}))},setConversationId:n=>{i({conversationId:n})},startStreaming:()=>{i({streaming:!0,streamingText:"",error:null})},appendChunk:n=>{i(s=>({streamingText:s.streamingText+n}))},finishStreaming:n=>{const{streamingText:s}=t(),o={id:n,role:"assistant",content:s,createdAt:new Date().toISOString()};i(f=>({messages:[...f.messages,o],streaming:!1,streamingText:""}))},addAgentDm:n=>{const s={id:nv(),role:"agent_dm",content:n.content,agentId:n.agentId,agentName:n.agentName,createdAt:new Date().toISOString()};i(o=>({messages:[...o.messages,s]}))},setError:n=>{i({error:n,streaming:!1,streamingText:""})},loadHistory:async n=>{try{const s=await fetch(`/api/squads/${n}/conversations`,{credentials:"include"});if(!s.ok)return;const o=await s.json();if(!o.data||o.data.length===0){i({conversationId:null,messages:[]});return}const f=o.data[0];i({conversationId:f.id});const d=await fetch(`/api/conversations/${f.id}/messages`,{credentials:"include"});if(!d.ok)return;const g=((await d.json()).data||[]).map(v=>({id:v.id,role:v.role,content:v.content,agentId:v.agent_id??void 0,agentName:v.agent_name??void 0,createdAt:v.created_at}));i({messages:g})}catch{}},reset:()=>i({messages:[],conversationId:null,streaming:!1,streamingText:"",error:null})}));function O2(i){const n=`${window.location.protocol==="https:"?"wss:":"ws:"}//${window.location.host}/ws`,s=new WebSocket(n),o=[];let f=!0;function d(m){s.readyState===WebSocket.OPEN?s.send(JSON.stringify(m)):s.readyState===WebSocket.CONNECTING&&o.push(m)}return s.onopen=()=>{var m,g;f||(g=(m=i.current).onReconnect)==null||g.call(m),f=!1;for(const v of o)s.send(JSON.stringify(v));o.length=0},s.onmessage=m=>{var g,v,S,b,A,E,R,D,M,O,U;try{const B=JSON.parse(m.data),G=i.current;switch(B.type){case"squad:state":(g=G.onSquadState)==null||g.call(G,B.squadName,B.state);break;case"squad:inactive":(v=G.onSquadInactive)==null||v.call(G,B.squadName,B.reason);break;case"chat:chunk":(S=G.onChatChunk)==null||S.call(G,B.squadName,B.conversationId,B.delta);break;case"chat:done":(b=G.onChatDone)==null||b.call(G,B.squadName,B.conversationId,B.messageId);break;case"chat:error":(A=G.onChatError)==null||A.call(G,B.squadName,B.error);break;case"chat:agent_dm":(E=G.onChatAgentDm)==null||E.call(G,B.squadName,B.conversationId,B.agentId,B.agentName,B.message);break;case"chat:conversation_created":(R=G.onChatConversationCreated)==null||R.call(G,B.squadName,B.conversationId);break;case"agent:output_chunk":(D=G.onAgentOutputChunk)==null||D.call(G,B.squadName,B.agentId,B.agentName,B.delta);break;case"agent:step_start":(M=G.onAgentStepStart)==null||M.call(G,B.squadName,B.agentId,B.agentName,B.stepIndex,B.stepLabel);break;case"agent:step_complete":(O=G.onAgentStepComplete)==null||O.call(G,B.squadName,B.agentId,B.agentName,B.stepIndex,B.stepLabel);break;case"squad:checkpoint":(U=G.onSquadCheckpoint)==null||U.call(G,B.squadName,B.agentId,B.agentName,B.question);break}}catch{}},{subscribe:m=>{d({type:"squad:subscribe",squadName:m})},unsubscribe:m=>{d({type:"squad:unsubscribe",squadName:m})},sendChat:(m,g)=>{d({type:"chat:send",squadName:m,message:g})},newConversation:m=>{d({type:"chat:new_conversation",squadName:m})},sendCheckpointResponse:(m,g)=>{d({type:"squad:checkpoint_response",squadName:m,answer:g})},disconnect:()=>{s.close()}}}function N2(i={}){const t=X.useRef(null),n=X.useRef(i),s=X.useRef(new Set);n.current=i,X.useEffect(()=>{const g=O2(n);t.current=g;for(const v of s.current)g.subscribe(v);return()=>{g.disconnect()}},[]);const o=X.useCallback(g=>{var v;s.current.add(g),(v=t.current)==null||v.subscribe(g)},[]),f=X.useCallback(g=>{var v;s.current.delete(g),(v=t.current)==null||v.unsubscribe(g)},[]),d=X.useCallback((g,v)=>{var S;(S=t.current)==null||S.sendChat(g,v)},[]),m=X.useCallback((g,v)=>{var S;(S=t.current)==null||S.sendCheckpointResponse(g,v)},[]);return{subscribe:o,unsubscribe:f,sendChat:d,sendCheckpointResponse:m}}const U2={idle:"#888",working:"#4caf50",delivering:"#4fc3f7",done:"#4caf50",checkpoint:"#ff9800",running:"#4caf50",completed:"#4caf50"},B2={idle:"○",working:"●",delivering:"→",done:"✓",checkpoint:"◆",running:"●",completed:"✓"};function w2({status:i}){if(!i)return null;const t=U2[i]||"#888",n=B2[i]||"○";return L.jsxs("span",{style:{color:t,fontSize:"0.75rem"},children:[n," ",i]})}function H2({squad:i,selected:t,onClick:n}){return L.jsxs("div",{onClick:n,style:{padding:"8px 12px",cursor:"pointer",borderRadius:"4px",background:t?"#1a3a5c":"transparent",borderLeft:t?"2px solid #4caf50":"2px solid transparent",marginBottom:"4px"},children:[L.jsx("div",{style:{fontSize:"0.875rem",color:t?"#e0e0e0":"#aaa"},children:i.name}),L.jsx(w2,{status:i.status})]})}function G2({squads:i,selectedSquad:t,onSelect:n}){return L.jsxs("div",{style:{padding:"8px"},children:[L.jsx("div",{style:{color:"#888",fontSize:"0.7rem",textTransform:"uppercase",marginBottom:"8px",padding:"0 12px"},children:"Squads"}),i.length===0&&L.jsx("div",{style:{padding:"8px 12px",color:"#666",fontSize:"0.8rem"},children:"No squads found"}),i.map(s=>L.jsx(H2,{squad:s,selected:s.code===t,onClick:()=>n(s.code)},s.code))]})}function j2(i){const t=Math.floor(i/3600),n=Math.floor(i%3600/60),s=i%60,o=f=>f.toString().padStart(2,"0");return t>0?`${t}h ${o(n)}m ${o(s)}s`:`${n}m ${o(s)}s`}function q2({state:i}){const[t,n]=X.useState(0);return X.useEffect(()=>{if(!(i!=null&&i.startedAt)||i.status!=="running"){n(0);return}const s=new Date(i.startedAt).getTime(),o=()=>n(Math.floor((Date.now()-s)/1e3));o();const f=setInterval(o,1e3);return()=>clearInterval(f)},[i==null?void 0:i.startedAt,i==null?void 0:i.status]),i?L.jsxs("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",padding:"6px 16px",background:"#16213e",fontSize:"0.8rem",color:"#aaa",borderTop:"1px solid #1a1a2e"},children:[L.jsxs("span",{children:["Step ",i.step.current,"/",i.step.total,": ",i.step.label]}),i.status==="running"&&L.jsxs("span",{children:["Elapsed: ",j2(t)]}),i.handoff&&L.jsxs("span",{style:{color:"#4caf50"},children:[i.handoff.from," → ",i.handoff.to]})]}):L.jsx("div",{})}let Zy=null;function Y2(i){Zy=i}function L2(i,t){Zy&&Zy(i,t)}let Ky=null;function X2(i){Ky=i}function V2(i,t){Ky&&Ky(i,t)}const qt=32,Km=96,ix=64,la={floor:3813150,floorPlank:4865838,wall:16117992,desk:9139029,deskTop:10518624,deskShadow:7033653,monitor:1710638,monitorScreen:1450302,plant:5025616,pot:9127187,bookshelf:9139029,bookColors:[15022389,2001125,4431943,16750592,9315498]},ky=[5227511,5025616,16750592,15022389,9315498,16771899],Q2={idle:8947848,working:5025616,delivering:5227511,done:5025616,checkpoint:16750592},Mm={counter:4073251,machine:4342338,machineLight:16711680,cup:14142664},ry={table:5125166,chair:6111287,border:4073251},_c={background:1713022,statusRunning:5025616,statusIdle:8947848,statusCheckpoint:16750592},wu=640,wh=480,av=64,Z2=64,K2=80,k2=Km+32,J2=ix+48,iv=2,lv=3;function sv(i,t,n){const s=Math.max(0,Math.min(1,n));return i+(t-i)*s}function P2(i){return i<.5?2*i*i:1-Math.pow(-2*i+2,2)/2}function Wm(i,t){const n=i%lv,s=Math.floor(i/lv);return{x:n*(wu+av),y:s*(wh+av)}}function Mh(i,t){const n=i%iv,s=Math.floor(i/iv);return{x:t.x+Z2+n*k2,y:t.y+K2+s*J2}}function Rh(i){return{x:i.x+wu-80,y:i.y+wh-80}}function lx(i){return{x:i.x+wu-160,y:i.y+Math.floor(wh/2)}}const uv=500,rv=50;let ov=0;function cv(i){return{idle:"idle",working:"working",delivering:"walking",done:"idle",checkpoint:"checkpoint"}[i]??"idle"}const Ze=cp(i=>({rooms:[],activeRoom:null,bubbles:{},activityLog:{},checkpoints:{},agentVisuals:{},appendBubble:(t,n,s)=>{const o=`${t}:${n}`;i(f=>{var g;let m=(((g=f.bubbles[o])==null?void 0:g.text)??"")+s;return m.length>uv&&(m=m.slice(m.length-uv)),{bubbles:{...f.bubbles,[o]:{text:m,updatedAt:Date.now()}}}})},clearBubble:(t,n)=>{const s=`${t}:${n}`;i(o=>{const{[s]:f,...d}=o.bubbles;return{bubbles:d}})},clearAllBubbles:()=>i({bubbles:{}}),addActivity:(t,n,s)=>{const f={id:++ov,agentName:n,action:s,timestamp:Date.now()};i(d=>{var S;const g=[...((S=d.activityLog[t])==null?void 0:S.entries)??[],f],v=g.length>rv?g.slice(g.length-rv):g;return{activityLog:{...d.activityLog,[t]:{entries:v}}}})},setCheckpoint:(t,n,s,o)=>i(f=>({checkpoints:{...f.checkpoints,[t]:{agentId:n,agentName:s,question:o}}})),clearCheckpoint:t=>i(n=>{const{[t]:s,...o}=n.checkpoints;return{checkpoints:o}}),setActiveRoom:t=>i({activeRoom:t}),syncRooms:t=>i(n=>{const s=t;let o;return s.length===0?o=null:n.activeRoom===null||!s.includes(n.activeRoom)?o=s[0]:o=n.activeRoom,{rooms:s,activeRoom:o}}),setAgents:(t,n)=>i(s=>{const o=s.agentVisuals[t]??[],f=new Map(o.map(v=>[v.id,v])),d=s.rooms.indexOf(t),m=Wm(Math.max(0,d),s.rooms.length||1),g=n.map((v,S)=>{const b=f.get(v.id);if(b){const R=v.status?cv(v.status):b.status,D=R!==b.status;let M=b.targetPosition;return D&&(R==="working"||R==="checkpoint"?M=Mh(S,m):M=Rh(m)),{...b,name:v.name,deskIndex:S,status:R,targetPosition:M}}const A=v.status?cv(v.status):"idle",E=A==="working"||A==="checkpoint"?Mh(S,m):Rh(m);return{id:v.id,name:v.name,colorIndex:S%6,status:A,deskIndex:S,position:E,targetPosition:null}});return{agentVisuals:{...s.agentVisuals,[t]:g}}}),setAgentStatus:(t,n,s)=>i(o=>{const f=o.agentVisuals[t];if(!f)return o;const d=o.rooms.indexOf(t),m=Wm(Math.max(0,d),o.rooms.length||1),g=f.map(v=>{if(v.id!==n)return v;let S;return s==="working"||s==="checkpoint"?S=Mh(v.deskIndex,m):S=Rh(m),{...v,status:s,targetPosition:S}});return{agentVisuals:{...o.agentVisuals,[t]:g}}}),reset:()=>{ov=0,i({rooms:[],activeRoom:null,bubbles:{},activityLog:{},checkpoints:{},agentVisuals:{}})}}));function W2(){const i=cl(H=>H.user),t=cl(H=>H.isAuthenticated),n=cl(H=>H.loading),s=cl(H=>H.logout),o=cl(H=>H.checkAuth),f=rp(),d=Il(),m=d.pathname==="/office"||d.pathname==="/",g=Ra(H=>H.squads),v=Ra(H=>H.selectedSquad),S=Ra(H=>v?H.activeStates[v]:null),b=Ra(H=>H.fetchSquads),A=Ra(H=>H.selectSquad),E=Ra(H=>H.setSquadState),R=Ra(H=>H.clearSquadState),D=X.useCallback((H,at)=>{E(H,at);const et=Ze.getState();et.rooms.includes(H)||et.syncRooms([...et.rooms,H]),at.status!=="checkpoint"&&et.clearCheckpoint(H),at.agents&&et.setAgents(H,at.agents.map(ft=>({id:ft.id,name:ft.name,status:ft.status})))},[E]),M=X.useCallback(H=>{R(H);const at=Ze.getState(),et=at.agentVisuals[H];if(et)for(const ft of et)at.setAgentStatus(H,ft.id,"idle")},[R]),O=X.useCallback((H,at)=>{Oi.getState().setConversationId(at)},[]),U=X.useCallback((H,at,et)=>{const ft=Oi.getState();ft.streaming||ft.startStreaming(),ft.appendChunk(et)},[]),B=X.useCallback((H,at,et)=>{Oi.getState().finishStreaming(et)},[]),G=X.useCallback((H,at)=>{Oi.getState().setError(at)},[]),Z=X.useCallback((H,at,et,ft,j)=>{Oi.getState().addAgentDm({agentId:et,agentName:ft,content:j})},[]),V=X.useCallback((H,at,et,ft)=>{Ze.getState().appendBubble(H,at,ft)},[]),K=X.useCallback((H,at,et,ft,j)=>{Ze.getState().addActivity(H,et,`started "${j}"`),Ze.getState().setAgentStatus(H,at,"working")},[]),pt=X.useCallback((H,at,et,ft,j)=>{Ze.getState().addActivity(H,et,`completed "${j}"`),Ze.getState().setAgentStatus(H,at,"idle")},[]),ct=X.useCallback((H,at,et,ft)=>{Ze.getState().setCheckpoint(H,at,et,ft),Ze.getState().setAgentStatus(H,at,"checkpoint")},[]),ht=X.useCallback(()=>{Ze.getState().clearAllBubbles()},[]),{subscribe:dt,unsubscribe:vt,sendChat:_t,sendCheckpointResponse:xt}=N2({onSquadState:D,onSquadInactive:M,onChatConversationCreated:O,onChatChunk:U,onChatDone:B,onChatError:G,onChatAgentDm:Z,onAgentOutputChunk:V,onAgentStepStart:K,onAgentStepComplete:pt,onSquadCheckpoint:ct,onReconnect:ht});X.useEffect(()=>{Y2(_t)},[_t]),X.useEffect(()=>{X2(xt)},[xt]),X.useEffect(()=>{b().then(()=>{const{squads:H}=Ra.getState();if(H.length>0){const at=Ze.getState(),et=H.map(I=>I.code),ft=at.rooms,j=[...new Set([...ft,...et])];at.syncRooms(j);for(const I of H)!at.agentVisuals[I.code]&&I.agents&&I.agents.length>0&&at.setAgents(I.code,I.agents.map(st=>({id:st.id,name:st.name,status:"idle"})))}})},[b]);const Dt=Ze(H=>H.rooms);X.useEffect(()=>{for(const H of Dt)dt(H);return()=>{for(const H of Dt)vt(H)}},[Dt,dt,vt]),X.useEffect(()=>{t||o()},[]),X.useEffect(()=>{!n&&!t&&f("/login")},[n,t,f]);const w=H=>({padding:"6px 12px",color:H?"#4fc3f7":"#888",textDecoration:"none",fontSize:"0.85rem"});return L.jsxs("div",{style:{display:"flex",flexDirection:"column",height:"100vh",background:"#0f0f1a",color:"#e0e0e0"},children:[L.jsxs("header",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",padding:"8px 16px",background:"#16213e",borderBottom:"1px solid #1a1a2e"},children:[L.jsx("span",{style:{color:"#4fc3f7",fontWeight:"bold",fontSize:"1.1rem"},children:"ExpxAgents"}),L.jsxs("span",{style:{color:"#888",fontSize:"0.85rem"},children:[i==null?void 0:i.username," | ",L.jsx("span",{style:{color:"#4caf50"},children:"● Connected"}),L.jsx("button",{onClick:s,style:{marginLeft:"12px",background:"none",border:"none",color:"#888",cursor:"pointer",fontSize:"0.8rem"},children:"Logout"})]})]}),L.jsxs("div",{style:{display:"flex",flex:1,overflow:"hidden"},children:[L.jsxs("aside",{style:{width:"200px",background:"#16213e",borderRight:"1px solid #1a1a2e",display:"flex",flexDirection:"column",overflowY:"auto"},children:[!m&&L.jsx(G2,{squads:g,selectedSquad:v,onSelect:A}),!m&&L.jsx("hr",{style:{border:"none",borderTop:"1px solid #333",margin:"8px 12px"}}),L.jsxs("nav",{style:{padding:"8px"},children:[L.jsx("div",{style:{color:"#888",fontSize:"0.7rem",textTransform:"uppercase",marginBottom:"8px",padding:"0 12px"},children:"Views"}),L.jsx(Th,{to:"/office",style:({isActive:H})=>w(H),children:"Office"}),L.jsx("br",{}),L.jsx(Th,{to:"/chat",style:({isActive:H})=>w(H),children:"Chat"}),L.jsx("br",{}),L.jsx(Th,{to:"/kanban",style:({isActive:H})=>w(H),children:"Kanban"}),L.jsx("br",{}),L.jsx(Th,{to:"/settings",style:({isActive:H})=>w(H),children:"Settings"})]})]}),L.jsx("main",{style:{flex:1,overflow:"auto"},children:L.jsx(Kb,{})})]}),L.jsx(q2,{state:S})]})}function F2(){const[i,t]=X.useState(""),[n,s]=X.useState(""),o=cl(S=>S.login),f=cl(S=>S.loading),d=cl(S=>S.error),m=cl(S=>S.isAuthenticated),g=rp();X.useEffect(()=>{m&&g("/",{replace:!0})},[m,g]);const v=S=>{S.preventDefault(),o(i,n)};return L.jsx("div",{style:{display:"flex",alignItems:"center",justifyContent:"center",minHeight:"100vh",background:"#0f0f1a"},children:L.jsxs("form",{onSubmit:v,style:{background:"#1a1a2e",padding:"2rem",borderRadius:"8px",width:"320px"},children:[L.jsx("h1",{style:{color:"#4fc3f7",marginBottom:"1.5rem",textAlign:"center",fontSize:"1.5rem"},children:"ExpxAgents"}),d&&L.jsx("div",{style:{color:"#ef5350",marginBottom:"1rem",fontSize:"0.875rem"},children:d}),L.jsx("input",{type:"text",placeholder:"Username",value:i,onChange:S=>t(S.target.value),style:{width:"100%",padding:"0.75rem",marginBottom:"0.75rem",background:"#16213e",border:"1px solid #333",borderRadius:"4px",color:"#e0e0e0",fontSize:"1rem"}}),L.jsx("input",{type:"password",placeholder:"Password",value:n,onChange:S=>s(S.target.value),style:{width:"100%",padding:"0.75rem",marginBottom:"1rem",background:"#16213e",border:"1px solid #333",borderRadius:"4px",color:"#e0e0e0",fontSize:"1rem"}}),L.jsx("button",{type:"submit",disabled:f,style:{width:"100%",padding:"0.75rem",background:"#4fc3f7",color:"#0f0f1a",border:"none",borderRadius:"4px",fontSize:"1rem",fontWeight:"bold",cursor:f?"wait":"pointer"},children:f?"Logging in...":"Login"})]})})}function sx(i,t,n){if(!i)return;if(n(i)===!0)return i;let s=i.child;for(;s;){const o=sx(s,t,n);if(o)return o;s=s.sibling}}function ux(i){try{return Object.defineProperties(i,{_currentRenderer:{get(){return null},set(){}},_currentRenderer2:{get(){return null},set(){}}})}catch{return i}}const Eg=ux(X.createContext(null));let rx=class extends X.Component{render(){return X.createElement(Eg.Provider,{value:this._reactInternals},this.props.children)}};function I2(){const i=X.useContext(Eg);if(i===null)throw new Error("its-fine: useFiber must be called within a <FiberProvider />!");const t=X.useId();return X.useMemo(()=>{for(const n of[i,i==null?void 0:i.alternate]){if(!n)continue;const s=sx(n,!1,o=>{let f=o.memoizedState;for(;f;){if(f.memoizedState===t)return!0;f=f.next}});if(s)return s}},[i,t])}const $2=Symbol.for("react.context"),tT=i=>i!==null&&typeof i=="object"&&"$$typeof"in i&&i.$$typeof===$2;function eT(){const i=I2(),[t]=X.useState(()=>new Map);t.clear();let n=i;for(;n;){const s=n.type;tT(s)&&s!==Eg&&!t.has(s)&&t.set(s,X.use(ux(s))),n=n.return}return t}function nT(){const i=eT();return X.useMemo(()=>Array.from(i.keys()).reduce((t,n)=>s=>X.createElement(t,null,X.createElement(n.Provider,{...s,value:i.get(n)})),t=>X.createElement(rx,{...t})),[i])}const aT="modulepreload",iT=function(i){return"/"+i},fv={},zh=function(t,n,s){let o=Promise.resolve();if(n&&n.length>0){let d=function(v){return Promise.all(v.map(S=>Promise.resolve(S).then(b=>({status:"fulfilled",value:b}),b=>({status:"rejected",reason:b}))))};document.getElementsByTagName("link");const m=document.querySelector("meta[property=csp-nonce]"),g=(m==null?void 0:m.nonce)||(m==null?void 0:m.getAttribute("nonce"));o=d(n.map(v=>{if(v=iT(v),v in fv)return;fv[v]=!0;const S=v.endsWith(".css"),b=S?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${v}"]${b}`))return;const A=document.createElement("link");if(A.rel=S?"stylesheet":aT,S||(A.as="script"),A.crossOrigin="",A.href=v,g&&A.setAttribute("nonce",g),document.head.appendChild(A),S)return new Promise((E,R)=>{A.addEventListener("load",E),A.addEventListener("error",()=>R(new Error(`Unable to preload CSS for ${v}`)))})}))}function f(d){const m=new Event("vite:preloadError",{cancelable:!0});if(m.payload=d,window.dispatchEvent(m),!m.defaultPrevented)throw d}return o.then(d=>{for(const m of d||[])m.status==="rejected"&&f(m.reason);return t().catch(f)})};var kt=(i=>(i.Application="application",i.WebGLPipes="webgl-pipes",i.WebGLPipesAdaptor="webgl-pipes-adaptor",i.WebGLSystem="webgl-system",i.WebGPUPipes="webgpu-pipes",i.WebGPUPipesAdaptor="webgpu-pipes-adaptor",i.WebGPUSystem="webgpu-system",i.CanvasSystem="canvas-system",i.CanvasPipesAdaptor="canvas-pipes-adaptor",i.CanvasPipes="canvas-pipes",i.Asset="asset",i.LoadParser="load-parser",i.ResolveParser="resolve-parser",i.CacheParser="cache-parser",i.DetectionParser="detection-parser",i.MaskEffect="mask-effect",i.BlendMode="blend-mode",i.TextureSource="texture-source",i.Environment="environment",i.ShapeBuilder="shape-builder",i.Batcher="batcher",i))(kt||{});const Jy=i=>{if(typeof i=="function"||typeof i=="object"&&i.extension){if(!i.extension)throw new Error("Extension class must have an extension object");i={...typeof i.extension!="object"?{type:i.extension}:i.extension,ref:i}}if(typeof i=="object")i={...i};else throw new Error("Invalid extension type");return typeof i.type=="string"&&(i.type=[i.type]),i},Rm=(i,t)=>Jy(i).priority??t,ke={_addHandlers:{},_removeHandlers:{},_queue:{},remove(...i){return i.map(Jy).forEach(t=>{t.type.forEach(n=>{var s,o;return(o=(s=this._removeHandlers)[n])==null?void 0:o.call(s,t)})}),this},add(...i){return i.map(Jy).forEach(t=>{t.type.forEach(n=>{var f,d;const s=this._addHandlers,o=this._queue;s[n]?(d=s[n])==null||d.call(s,t):(o[n]=o[n]||[],(f=o[n])==null||f.push(t))})}),this},handle(i,t,n){var d;const s=this._addHandlers,o=this._removeHandlers;if(s[i]||o[i])throw new Error(`Extension type ${i} already has a handler`);s[i]=t,o[i]=n;const f=this._queue;return f[i]&&((d=f[i])==null||d.forEach(m=>t(m)),delete f[i]),this},handleByMap(i,t){return this.handle(i,n=>{n.name&&(t[n.name]=n.ref)},n=>{n.name&&delete t[n.name]})},handleByNamedList(i,t,n=-1){return this.handle(i,s=>{t.findIndex(f=>f.name===s.name)>=0||(t.push({name:s.name,value:s.ref}),t.sort((f,d)=>Rm(d.value,n)-Rm(f.value,n)))},s=>{const o=t.findIndex(f=>f.name===s.name);o!==-1&&t.splice(o,1)})},handleByList(i,t,n=-1){return this.handle(i,s=>{t.includes(s.ref)||(t.push(s.ref),t.sort((o,f)=>Rm(f,n)-Rm(o,n)))},s=>{const o=t.indexOf(s.ref);o!==-1&&t.splice(o,1)})},mixin(i,...t){for(const n of t)Object.defineProperties(i.prototype,Object.getOwnPropertyDescriptors(n))}},lT={extension:{type:kt.Environment,name:"browser",priority:-1},test:()=>!0,load:async()=>{await zh(()=>import("./browserAll-C8fHaPkt.js"),__vite__mapDeps([0,1]))}},sT={extension:{type:kt.Environment,name:"webworker",priority:0},test:()=>typeof self<"u"&&self.WorkerGlobalScope!==void 0,load:async()=>{await zh(()=>import("./webworkerAll-DW-cy7bD.js"),[])}};class Vn{constructor(t,n,s){this._x=n||0,this._y=s||0,this._observer=t}clone(t){return new Vn(t??this._observer,this._x,this._y)}set(t=0,n=t){return(this._x!==t||this._y!==n)&&(this._x=t,this._y=n,this._observer._onUpdate(this)),this}copyFrom(t){return(this._x!==t.x||this._y!==t.y)&&(this._x=t.x,this._y=t.y,this._observer._onUpdate(this)),this}copyTo(t){return t.set(this._x,this._y),t}equals(t){return t.x===this._x&&t.y===this._y}toString(){return`[pixi.js/math:ObservablePoint x=${this._x} y=${this._y} scope=${this._observer}]`}get x(){return this._x}set x(t){this._x!==t&&(this._x=t,this._observer._onUpdate(this))}get y(){return this._y}set y(t){this._y!==t&&(this._y=t,this._observer._onUpdate(this))}}var oy={exports:{}},hv;function uT(){return hv||(hv=1,(function(i){var t=Object.prototype.hasOwnProperty,n="~";function s(){}Object.create&&(s.prototype=Object.create(null),new s().__proto__||(n=!1));function o(g,v,S){this.fn=g,this.context=v,this.once=S||!1}function f(g,v,S,b,A){if(typeof S!="function")throw new TypeError("The listener must be a function");var E=new o(S,b||g,A),R=n?n+v:v;return g._events[R]?g._events[R].fn?g._events[R]=[g._events[R],E]:g._events[R].push(E):(g._events[R]=E,g._eventsCount++),g}function d(g,v){--g._eventsCount===0?g._events=new s:delete g._events[v]}function m(){this._events=new s,this._eventsCount=0}m.prototype.eventNames=function(){var v=[],S,b;if(this._eventsCount===0)return v;for(b in S=this._events)t.call(S,b)&&v.push(n?b.slice(1):b);return Object.getOwnPropertySymbols?v.concat(Object.getOwnPropertySymbols(S)):v},m.prototype.listeners=function(v){var S=n?n+v:v,b=this._events[S];if(!b)return[];if(b.fn)return[b.fn];for(var A=0,E=b.length,R=new Array(E);A<E;A++)R[A]=b[A].fn;return R},m.prototype.listenerCount=function(v){var S=n?n+v:v,b=this._events[S];return b?b.fn?1:b.length:0},m.prototype.emit=function(v,S,b,A,E,R){var D=n?n+v:v;if(!this._events[D])return!1;var M=this._events[D],O=arguments.length,U,B;if(M.fn){switch(M.once&&this.removeListener(v,M.fn,void 0,!0),O){case 1:return M.fn.call(M.context),!0;case 2:return M.fn.call(M.context,S),!0;case 3:return M.fn.call(M.context,S,b),!0;case 4:return M.fn.call(M.context,S,b,A),!0;case 5:return M.fn.call(M.context,S,b,A,E),!0;case 6:return M.fn.call(M.context,S,b,A,E,R),!0}for(B=1,U=new Array(O-1);B<O;B++)U[B-1]=arguments[B];M.fn.apply(M.context,U)}else{var G=M.length,Z;for(B=0;B<G;B++)switch(M[B].once&&this.removeListener(v,M[B].fn,void 0,!0),O){case 1:M[B].fn.call(M[B].context);break;case 2:M[B].fn.call(M[B].context,S);break;case 3:M[B].fn.call(M[B].context,S,b);break;case 4:M[B].fn.call(M[B].context,S,b,A);break;default:if(!U)for(Z=1,U=new Array(O-1);Z<O;Z++)U[Z-1]=arguments[Z];M[B].fn.apply(M[B].context,U)}}return!0},m.prototype.on=function(v,S,b){return f(this,v,S,b,!1)},m.prototype.once=function(v,S,b){return f(this,v,S,b,!0)},m.prototype.removeListener=function(v,S,b,A){var E=n?n+v:v;if(!this._events[E])return this;if(!S)return d(this,E),this;var R=this._events[E];if(R.fn)R.fn===S&&(!A||R.once)&&(!b||R.context===b)&&d(this,E);else{for(var D=0,M=[],O=R.length;D<O;D++)(R[D].fn!==S||A&&!R[D].once||b&&R[D].context!==b)&&M.push(R[D]);M.length?this._events[E]=M.length===1?M[0]:M:d(this,E)}return this},m.prototype.removeAllListeners=function(v){var S;return v?(S=n?n+v:v,this._events[S]&&d(this,S)):(this._events=new s,this._eventsCount=0),this},m.prototype.off=m.prototype.removeListener,m.prototype.addListener=m.prototype.on,m.prefixed=n,m.EventEmitter=m,i.exports=m})(oy)),oy.exports}var rT=uT();const $l=ip(rT),oT=Math.PI*2,cT=180/Math.PI,fT=Math.PI/180;class sa{constructor(t=0,n=0){this.x=0,this.y=0,this.x=t,this.y=n}clone(){return new sa(this.x,this.y)}copyFrom(t){return this.set(t.x,t.y),this}copyTo(t){return t.set(this.x,this.y),t}equals(t){return t.x===this.x&&t.y===this.y}set(t=0,n=t){return this.x=t,this.y=n,this}toString(){return`[pixi.js/math:Point x=${this.x} y=${this.y}]`}static get shared(){return cy.x=0,cy.y=0,cy}}const cy=new sa;class ne{constructor(t=1,n=0,s=0,o=1,f=0,d=0){this.array=null,this.a=t,this.b=n,this.c=s,this.d=o,this.tx=f,this.ty=d}fromArray(t){this.a=t[0],this.b=t[1],this.c=t[3],this.d=t[4],this.tx=t[2],this.ty=t[5]}set(t,n,s,o,f,d){return this.a=t,this.b=n,this.c=s,this.d=o,this.tx=f,this.ty=d,this}toArray(t,n){this.array||(this.array=new Float32Array(9));const s=n||this.array;return t?(s[0]=this.a,s[1]=this.b,s[2]=0,s[3]=this.c,s[4]=this.d,s[5]=0,s[6]=this.tx,s[7]=this.ty,s[8]=1):(s[0]=this.a,s[1]=this.c,s[2]=this.tx,s[3]=this.b,s[4]=this.d,s[5]=this.ty,s[6]=0,s[7]=0,s[8]=1),s}apply(t,n){n=n||new sa;const s=t.x,o=t.y;return n.x=this.a*s+this.c*o+this.tx,n.y=this.b*s+this.d*o+this.ty,n}applyInverse(t,n){n=n||new sa;const s=this.a,o=this.b,f=this.c,d=this.d,m=this.tx,g=this.ty,v=1/(s*d+f*-o),S=t.x,b=t.y;return n.x=d*v*S+-f*v*b+(g*f-m*d)*v,n.y=s*v*b+-o*v*S+(-g*s+m*o)*v,n}translate(t,n){return this.tx+=t,this.ty+=n,this}scale(t,n){return this.a*=t,this.d*=n,this.c*=t,this.b*=n,this.tx*=t,this.ty*=n,this}rotate(t){const n=Math.cos(t),s=Math.sin(t),o=this.a,f=this.c,d=this.tx;return this.a=o*n-this.b*s,this.b=o*s+this.b*n,this.c=f*n-this.d*s,this.d=f*s+this.d*n,this.tx=d*n-this.ty*s,this.ty=d*s+this.ty*n,this}append(t){const n=this.a,s=this.b,o=this.c,f=this.d;return this.a=t.a*n+t.b*o,this.b=t.a*s+t.b*f,this.c=t.c*n+t.d*o,this.d=t.c*s+t.d*f,this.tx=t.tx*n+t.ty*o+this.tx,this.ty=t.tx*s+t.ty*f+this.ty,this}appendFrom(t,n){const s=t.a,o=t.b,f=t.c,d=t.d,m=t.tx,g=t.ty,v=n.a,S=n.b,b=n.c,A=n.d;return this.a=s*v+o*b,this.b=s*S+o*A,this.c=f*v+d*b,this.d=f*S+d*A,this.tx=m*v+g*b+n.tx,this.ty=m*S+g*A+n.ty,this}setTransform(t,n,s,o,f,d,m,g,v){return this.a=Math.cos(m+v)*f,this.b=Math.sin(m+v)*f,this.c=-Math.sin(m-g)*d,this.d=Math.cos(m-g)*d,this.tx=t-(s*this.a+o*this.c),this.ty=n-(s*this.b+o*this.d),this}prepend(t){const n=this.tx;if(t.a!==1||t.b!==0||t.c!==0||t.d!==1){const s=this.a,o=this.c;this.a=s*t.a+this.b*t.c,this.b=s*t.b+this.b*t.d,this.c=o*t.a+this.d*t.c,this.d=o*t.b+this.d*t.d}return this.tx=n*t.a+this.ty*t.c+t.tx,this.ty=n*t.b+this.ty*t.d+t.ty,this}decompose(t){const n=this.a,s=this.b,o=this.c,f=this.d,d=t.pivot,m=-Math.atan2(-o,f),g=Math.atan2(s,n),v=Math.abs(m+g);return v<1e-5||Math.abs(oT-v)<1e-5?(t.rotation=g,t.skew.x=t.skew.y=0):(t.rotation=0,t.skew.x=m,t.skew.y=g),t.scale.x=Math.sqrt(n*n+s*s),t.scale.y=Math.sqrt(o*o+f*f),t.position.x=this.tx+(d.x*n+d.y*o),t.position.y=this.ty+(d.x*s+d.y*f),t}invert(){const t=this.a,n=this.b,s=this.c,o=this.d,f=this.tx,d=t*o-n*s;return this.a=o/d,this.b=-n/d,this.c=-s/d,this.d=t/d,this.tx=(s*this.ty-o*f)/d,this.ty=-(t*this.ty-n*f)/d,this}isIdentity(){return this.a===1&&this.b===0&&this.c===0&&this.d===1&&this.tx===0&&this.ty===0}identity(){return this.a=1,this.b=0,this.c=0,this.d=1,this.tx=0,this.ty=0,this}clone(){const t=new ne;return t.a=this.a,t.b=this.b,t.c=this.c,t.d=this.d,t.tx=this.tx,t.ty=this.ty,t}copyTo(t){return t.a=this.a,t.b=this.b,t.c=this.c,t.d=this.d,t.tx=this.tx,t.ty=this.ty,t}copyFrom(t){return this.a=t.a,this.b=t.b,this.c=t.c,this.d=t.d,this.tx=t.tx,this.ty=t.ty,this}equals(t){return t.a===this.a&&t.b===this.b&&t.c===this.c&&t.d===this.d&&t.tx===this.tx&&t.ty===this.ty}toString(){return`[pixi.js:Matrix a=${this.a} b=${this.b} c=${this.c} d=${this.d} tx=${this.tx} ty=${this.ty}]`}static get IDENTITY(){return dT.identity()}static get shared(){return hT.identity()}}const hT=new ne,dT=new ne,Lr=[1,1,0,-1,-1,-1,0,1,1,1,0,-1,-1,-1,0,1],Xr=[0,1,1,1,0,-1,-1,-1,0,1,1,1,0,-1,-1,-1],Vr=[0,-1,-1,-1,0,1,1,1,0,1,1,1,0,-1,-1,-1],Qr=[1,1,0,-1,-1,-1,0,1,-1,-1,0,1,1,1,0,-1],Py=[],ox=[],zm=Math.sign;function mT(){for(let i=0;i<16;i++){const t=[];Py.push(t);for(let n=0;n<16;n++){const s=zm(Lr[i]*Lr[n]+Vr[i]*Xr[n]),o=zm(Xr[i]*Lr[n]+Qr[i]*Xr[n]),f=zm(Lr[i]*Vr[n]+Vr[i]*Qr[n]),d=zm(Xr[i]*Vr[n]+Qr[i]*Qr[n]);for(let m=0;m<16;m++)if(Lr[m]===s&&Xr[m]===o&&Vr[m]===f&&Qr[m]===d){t.push(m);break}}}for(let i=0;i<16;i++){const t=new ne;t.set(Lr[i],Xr[i],Vr[i],Qr[i],0,0),ox.push(t)}}mT();const De={E:0,SE:1,S:2,SW:3,W:4,NW:5,N:6,NE:7,MIRROR_VERTICAL:8,MAIN_DIAGONAL:10,MIRROR_HORIZONTAL:12,REVERSE_DIAGONAL:14,uX:i=>Lr[i],uY:i=>Xr[i],vX:i=>Vr[i],vY:i=>Qr[i],inv:i=>i&8?i&15:-i&7,add:(i,t)=>Py[i][t],sub:(i,t)=>Py[i][De.inv(t)],rotate180:i=>i^4,isVertical:i=>(i&3)===2,byDirection:(i,t)=>Math.abs(i)*2<=Math.abs(t)?t>=0?De.S:De.N:Math.abs(t)*2<=Math.abs(i)?i>0?De.E:De.W:t>0?i>0?De.SE:De.SW:i>0?De.NE:De.NW,matrixAppendRotationInv:(i,t,n=0,s=0,o=0,f=0)=>{const d=ox[De.inv(t)],m=d.a,g=d.b,v=d.c,S=d.d,b=n-Math.min(0,m*o,v*f,m*o+v*f),A=s-Math.min(0,g*o,S*f,g*o+S*f),E=i.a,R=i.b,D=i.c,M=i.d;i.a=m*E+g*D,i.b=m*R+g*M,i.c=v*E+S*D,i.d=v*R+S*M,i.tx=b*E+A*D+i.tx,i.ty=b*R+A*M+i.ty},transformRectCoords:(i,t,n,s)=>{const{x:o,y:f,width:d,height:m}=i,{x:g,y:v,width:S,height:b}=t;return n===De.E?(s.set(o+g,f+v,d,m),s):n===De.S?s.set(S-f-m+g,o+v,m,d):n===De.W?s.set(S-o-d+g,b-f-m+v,d,m):n===De.N?s.set(f+g,b-o-d+v,m,d):s.set(o+g,f+v,d,m)}},Dm=[new sa,new sa,new sa,new sa];class un{constructor(t=0,n=0,s=0,o=0){this.type="rectangle",this.x=Number(t),this.y=Number(n),this.width=Number(s),this.height=Number(o)}get left(){return this.x}get right(){return this.x+this.width}get top(){return this.y}get bottom(){return this.y+this.height}isEmpty(){return this.left===this.right||this.top===this.bottom}static get EMPTY(){return new un(0,0,0,0)}clone(){return new un(this.x,this.y,this.width,this.height)}copyFromBounds(t){return this.x=t.minX,this.y=t.minY,this.width=t.maxX-t.minX,this.height=t.maxY-t.minY,this}copyFrom(t){return this.x=t.x,this.y=t.y,this.width=t.width,this.height=t.height,this}copyTo(t){return t.copyFrom(this),t}contains(t,n){return this.width<=0||this.height<=0?!1:t>=this.x&&t<this.x+this.width&&n>=this.y&&n<this.y+this.height}strokeContains(t,n,s,o=.5){const{width:f,height:d}=this;if(f<=0||d<=0)return!1;const m=this.x,g=this.y,v=s*(1-o),S=s-v,b=m-v,A=m+f+v,E=g-v,R=g+d+v,D=m+S,M=m+f-S,O=g+S,U=g+d-S;return t>=b&&t<=A&&n>=E&&n<=R&&!(t>D&&t<M&&n>O&&n<U)}intersects(t,n){if(!n){const pt=this.x<t.x?t.x:this.x;if((this.right>t.right?t.right:this.right)<=pt)return!1;const ht=this.y<t.y?t.y:this.y;return(this.bottom>t.bottom?t.bottom:this.bottom)>ht}const s=this.left,o=this.right,f=this.top,d=this.bottom;if(o<=s||d<=f)return!1;const m=Dm[0].set(t.left,t.top),g=Dm[1].set(t.left,t.bottom),v=Dm[2].set(t.right,t.top),S=Dm[3].set(t.right,t.bottom);if(v.x<=m.x||g.y<=m.y)return!1;const b=Math.sign(n.a*n.d-n.b*n.c);if(b===0||(n.apply(m,m),n.apply(g,g),n.apply(v,v),n.apply(S,S),Math.max(m.x,g.x,v.x,S.x)<=s||Math.min(m.x,g.x,v.x,S.x)>=o||Math.max(m.y,g.y,v.y,S.y)<=f||Math.min(m.y,g.y,v.y,S.y)>=d))return!1;const A=b*(g.y-m.y),E=b*(m.x-g.x),R=A*s+E*f,D=A*o+E*f,M=A*s+E*d,O=A*o+E*d;if(Math.max(R,D,M,O)<=A*m.x+E*m.y||Math.min(R,D,M,O)>=A*S.x+E*S.y)return!1;const U=b*(m.y-v.y),B=b*(v.x-m.x),G=U*s+B*f,Z=U*o+B*f,V=U*s+B*d,K=U*o+B*d;return!(Math.max(G,Z,V,K)<=U*m.x+B*m.y||Math.min(G,Z,V,K)>=U*S.x+B*S.y)}pad(t=0,n=t){return this.x-=t,this.y-=n,this.width+=t*2,this.height+=n*2,this}fit(t){const n=Math.max(this.x,t.x),s=Math.min(this.x+this.width,t.x+t.width),o=Math.max(this.y,t.y),f=Math.min(this.y+this.height,t.y+t.height);return this.x=n,this.width=Math.max(s-n,0),this.y=o,this.height=Math.max(f-o,0),this}ceil(t=1,n=.001){const s=Math.ceil((this.x+this.width-n)*t)/t,o=Math.ceil((this.y+this.height-n)*t)/t;return this.x=Math.floor((this.x+n)*t)/t,this.y=Math.floor((this.y+n)*t)/t,this.width=s-this.x,this.height=o-this.y,this}scale(t,n=t){return this.x*=t,this.y*=n,this.width*=t,this.height*=n,this}enlarge(t){const n=Math.min(this.x,t.x),s=Math.max(this.x+this.width,t.x+t.width),o=Math.min(this.y,t.y),f=Math.max(this.y+this.height,t.y+t.height);return this.x=n,this.width=s-n,this.y=o,this.height=f-o,this}getBounds(t){return t||(t=new un),t.copyFrom(this),t}containsRect(t){if(this.width<=0||this.height<=0)return!1;const n=t.x,s=t.y,o=t.x+t.width,f=t.y+t.height;return n>=this.x&&n<this.x+this.width&&s>=this.y&&s<this.y+this.height&&o>=this.x&&o<this.x+this.width&&f>=this.y&&f<this.y+this.height}set(t,n,s,o){return this.x=t,this.y=n,this.width=s,this.height=o,this}toString(){return`[pixi.js/math:Rectangle x=${this.x} y=${this.y} width=${this.width} height=${this.height}]`}}const fy={default:-1};function en(i="default"){return fy[i]===void 0&&(fy[i]=-1),++fy[i]}const dv=new Set,tn="8.0.0",pT="8.3.4",Sc={quiet:!1,noColor:!1},ce=((i,t,n=3)=>{if(Sc.quiet||dv.has(t))return;let s=new Error().stack;const o=`${t}
62
+ Deprecated since v${i}`,f=typeof console.groupCollapsed=="function"&&!Sc.noColor;typeof s>"u"?console.warn("PixiJS Deprecation Warning: ",o):(s=s.split(`
63
+ `).splice(n).join(`
64
+ `),f?(console.groupCollapsed("%cPixiJS Deprecation Warning: %c%s","color:#614108;background:#fffbe6","font-weight:normal;color:#614108;background:#fffbe6",o),console.warn(s),console.groupEnd()):(console.warn("PixiJS Deprecation Warning: ",o),console.warn(s))),dv.add(t)});Object.defineProperties(ce,{quiet:{get:()=>Sc.quiet,set:i=>{Sc.quiet=i},enumerable:!0,configurable:!1},noColor:{get:()=>Sc.noColor,set:i=>{Sc.noColor=i},enumerable:!0,configurable:!1}});const cx=()=>{};function Cc(i){return i+=i===0?1:0,--i,i|=i>>>1,i|=i>>>2,i|=i>>>4,i|=i>>>8,i|=i>>>16,i+1}function mv(i){return!(i&i-1)&&!!i}function fx(i){const t={};for(const n in i)i[n]!==void 0&&(t[n]=i[n]);return t}const pv=Object.create(null);function yT(i){const t=pv[i];return t===void 0&&(pv[i]=en("resource")),t}const hx=class dx extends $l{constructor(t={}){super(),this._resourceType="textureSampler",this._touched=0,this._maxAnisotropy=1,this.destroyed=!1,t={...dx.defaultOptions,...t},this.addressMode=t.addressMode,this.addressModeU=t.addressModeU??this.addressModeU,this.addressModeV=t.addressModeV??this.addressModeV,this.addressModeW=t.addressModeW??this.addressModeW,this.scaleMode=t.scaleMode,this.magFilter=t.magFilter??this.magFilter,this.minFilter=t.minFilter??this.minFilter,this.mipmapFilter=t.mipmapFilter??this.mipmapFilter,this.lodMinClamp=t.lodMinClamp,this.lodMaxClamp=t.lodMaxClamp,this.compare=t.compare,this.maxAnisotropy=t.maxAnisotropy??1}set addressMode(t){this.addressModeU=t,this.addressModeV=t,this.addressModeW=t}get addressMode(){return this.addressModeU}set wrapMode(t){ce(tn,"TextureStyle.wrapMode is now TextureStyle.addressMode"),this.addressMode=t}get wrapMode(){return this.addressMode}set scaleMode(t){this.magFilter=t,this.minFilter=t,this.mipmapFilter=t}get scaleMode(){return this.magFilter}set maxAnisotropy(t){this._maxAnisotropy=Math.min(t,16),this._maxAnisotropy>1&&(this.scaleMode="linear")}get maxAnisotropy(){return this._maxAnisotropy}get _resourceId(){return this._sharedResourceId||this._generateResourceId()}update(){this._sharedResourceId=null,this.emit("change",this)}_generateResourceId(){const t=`${this.addressModeU}-${this.addressModeV}-${this.addressModeW}-${this.magFilter}-${this.minFilter}-${this.mipmapFilter}-${this.lodMinClamp}-${this.lodMaxClamp}-${this.compare}-${this._maxAnisotropy}`;return this._sharedResourceId=yT(t),this._resourceId}destroy(){this.destroyed=!0,this.emit("destroy",this),this.emit("change",this),this.removeAllListeners()}};hx.defaultOptions={addressMode:"clamp-to-edge",scaleMode:"linear"};let Ac=hx;const mx=class px extends $l{constructor(t={}){super(),this.options=t,this._gpuData=Object.create(null),this._gcLastUsed=-1,this.uid=en("textureSource"),this._resourceType="textureSource",this._resourceId=en("resource"),this.uploadMethodId="unknown",this._resolution=1,this.pixelWidth=1,this.pixelHeight=1,this.width=1,this.height=1,this.sampleCount=1,this.mipLevelCount=1,this.autoGenerateMipmaps=!1,this.format="rgba8unorm",this.dimension="2d",this.viewDimension="2d",this.arrayLayerCount=1,this.antialias=!1,this._touched=0,this._batchTick=-1,this._textureBindLocation=-1,t={...px.defaultOptions,...t},this.label=t.label??"",this.resource=t.resource,this.autoGarbageCollect=t.autoGarbageCollect,this._resolution=t.resolution,t.width?this.pixelWidth=t.width*this._resolution:this.pixelWidth=this.resource?this.resourceWidth??1:1,t.height?this.pixelHeight=t.height*this._resolution:this.pixelHeight=this.resource?this.resourceHeight??1:1,this.width=this.pixelWidth/this._resolution,this.height=this.pixelHeight/this._resolution,this.format=t.format,this.dimension=t.dimensions,this.viewDimension=t.viewDimension??t.dimensions,this.arrayLayerCount=t.arrayLayerCount,this.mipLevelCount=t.mipLevelCount,this.autoGenerateMipmaps=t.autoGenerateMipmaps,this.sampleCount=t.sampleCount,this.antialias=t.antialias,this.alphaMode=t.alphaMode,this.style=new Ac(fx(t)),this.destroyed=!1,this._refreshPOT()}get source(){return this}get style(){return this._style}set style(t){var n,s;this.style!==t&&((n=this._style)==null||n.off("change",this._onStyleChange,this),this._style=t,(s=this._style)==null||s.on("change",this._onStyleChange,this),this._onStyleChange())}set maxAnisotropy(t){this._style.maxAnisotropy=t}get maxAnisotropy(){return this._style.maxAnisotropy}get addressMode(){return this._style.addressMode}set addressMode(t){this._style.addressMode=t}get repeatMode(){return this._style.addressMode}set repeatMode(t){this._style.addressMode=t}get magFilter(){return this._style.magFilter}set magFilter(t){this._style.magFilter=t}get minFilter(){return this._style.minFilter}set minFilter(t){this._style.minFilter=t}get mipmapFilter(){return this._style.mipmapFilter}set mipmapFilter(t){this._style.mipmapFilter=t}get lodMinClamp(){return this._style.lodMinClamp}set lodMinClamp(t){this._style.lodMinClamp=t}get lodMaxClamp(){return this._style.lodMaxClamp}set lodMaxClamp(t){this._style.lodMaxClamp=t}_onStyleChange(){this.emit("styleChange",this)}update(){if(this.resource){const t=this._resolution;if(this.resize(this.resourceWidth/t,this.resourceHeight/t))return}this.emit("update",this)}destroy(){this.destroyed=!0,this.unload(),this.emit("destroy",this),this._style&&(this._style.destroy(),this._style=null),this.uploadMethodId=null,this.resource=null,this.removeAllListeners()}unload(){var t,n;this._resourceId=en("resource"),this.emit("change",this),this.emit("unload",this);for(const s in this._gpuData)(n=(t=this._gpuData[s])==null?void 0:t.destroy)==null||n.call(t);this._gpuData=Object.create(null)}get resourceWidth(){const{resource:t}=this;return t.naturalWidth||t.videoWidth||t.displayWidth||t.width}get resourceHeight(){const{resource:t}=this;return t.naturalHeight||t.videoHeight||t.displayHeight||t.height}get resolution(){return this._resolution}set resolution(t){this._resolution!==t&&(this._resolution=t,this.width=this.pixelWidth/t,this.height=this.pixelHeight/t)}resize(t,n,s){s||(s=this._resolution),t||(t=this.width),n||(n=this.height);const o=Math.round(t*s),f=Math.round(n*s);return this.width=o/s,this.height=f/s,this._resolution=s,this.pixelWidth===o&&this.pixelHeight===f?!1:(this._refreshPOT(),this.pixelWidth=o,this.pixelHeight=f,this.emit("resize",this),this._resourceId=en("resource"),this.emit("change",this),!0)}updateMipmaps(){this.autoGenerateMipmaps&&this.mipLevelCount>1&&this.emit("updateMipmaps",this)}set wrapMode(t){this._style.wrapMode=t}get wrapMode(){return this._style.wrapMode}set scaleMode(t){this._style.scaleMode=t}get scaleMode(){return this._style.scaleMode}_refreshPOT(){this.isPowerOfTwo=mv(this.pixelWidth)&&mv(this.pixelHeight)}static test(t){throw new Error("Unimplemented")}};mx.defaultOptions={resolution:1,format:"bgra8unorm",alphaMode:"premultiply-alpha-on-upload",dimensions:"2d",viewDimension:"2d",arrayLayerCount:1,mipLevelCount:1,autoGenerateMipmaps:!1,sampleCount:1,antialias:!1,autoGarbageCollect:!1};let wi=mx;class Cg extends wi{constructor(t){const n=t.resource||new Float32Array(t.width*t.height*4);let s=t.format;s||(n instanceof Float32Array?s="rgba32float":n instanceof Int32Array||n instanceof Uint32Array?s="rgba32uint":n instanceof Int16Array||n instanceof Uint16Array?s="rgba16uint":(n instanceof Int8Array,s="bgra8unorm")),super({...t,resource:n,format:s}),this.uploadMethodId="buffer"}static test(t){return t instanceof Int8Array||t instanceof Uint8Array||t instanceof Uint8ClampedArray||t instanceof Int16Array||t instanceof Uint16Array||t instanceof Int32Array||t instanceof Uint32Array||t instanceof Float32Array}}Cg.extension=kt.TextureSource;const yv=new ne;class gT{constructor(t,n){this.mapCoord=new ne,this.uClampFrame=new Float32Array(4),this.uClampOffset=new Float32Array(2),this._textureID=-1,this._updateID=0,this.clampOffset=0,typeof n>"u"?this.clampMargin=t.width<10?0:.5:this.clampMargin=n,this.isSimple=!1,this.texture=t}get texture(){return this._texture}set texture(t){var n;this.texture!==t&&((n=this._texture)==null||n.removeListener("update",this.update,this),this._texture=t,this._texture.addListener("update",this.update,this),this.update())}multiplyUvs(t,n){n===void 0&&(n=t);const s=this.mapCoord;for(let o=0;o<t.length;o+=2){const f=t[o],d=t[o+1];n[o]=f*s.a+d*s.c+s.tx,n[o+1]=f*s.b+d*s.d+s.ty}return n}update(){const t=this._texture;this._updateID++;const n=t.uvs;this.mapCoord.set(n.x1-n.x0,n.y1-n.y0,n.x3-n.x0,n.y3-n.y0,n.x0,n.y0);const s=t.orig,o=t.trim;o&&(yv.set(s.width/o.width,0,0,s.height/o.height,-o.x/o.width,-o.y/o.height),this.mapCoord.append(yv));const f=t.source,d=this.uClampFrame,m=this.clampMargin/f._resolution,g=this.clampOffset/f._resolution;return d[0]=(t.frame.x+m+g)/f.width,d[1]=(t.frame.y+m+g)/f.height,d[2]=(t.frame.x+t.frame.width-m+g)/f.width,d[3]=(t.frame.y+t.frame.height-m+g)/f.height,this.uClampOffset[0]=this.clampOffset/f.pixelWidth,this.uClampOffset[1]=this.clampOffset/f.pixelHeight,this.isSimple=t.frame.width===f.width&&t.frame.height===f.height&&t.rotate===0,!0}}class Ee extends $l{constructor({source:t,label:n,frame:s,orig:o,trim:f,defaultAnchor:d,defaultBorders:m,rotate:g,dynamic:v}={}){if(super(),this.uid=en("texture"),this.uvs={x0:0,y0:0,x1:0,y1:0,x2:0,y2:0,x3:0,y3:0},this.frame=new un,this.noFrame=!1,this.dynamic=!1,this.isTexture=!0,this.label=n,this.source=(t==null?void 0:t.source)??new wi,this.noFrame=!s,s)this.frame.copyFrom(s);else{const{width:S,height:b}=this._source;this.frame.width=S,this.frame.height=b}this.orig=o||this.frame,this.trim=f,this.rotate=g??0,this.defaultAnchor=d,this.defaultBorders=m,this.destroyed=!1,this.dynamic=v||!1,this.updateUvs()}set source(t){this._source&&this._source.off("resize",this.update,this),this._source=t,t.on("resize",this.update,this),this.emit("update",this)}get source(){return this._source}get textureMatrix(){return this._textureMatrix||(this._textureMatrix=new gT(this)),this._textureMatrix}get width(){return this.orig.width}get height(){return this.orig.height}updateUvs(){const{uvs:t,frame:n}=this,{width:s,height:o}=this._source,f=n.x/s,d=n.y/o,m=n.width/s,g=n.height/o;let v=this.rotate;if(v){const S=m/2,b=g/2,A=f+S,E=d+b;v=De.add(v,De.NW),t.x0=A+S*De.uX(v),t.y0=E+b*De.uY(v),v=De.add(v,2),t.x1=A+S*De.uX(v),t.y1=E+b*De.uY(v),v=De.add(v,2),t.x2=A+S*De.uX(v),t.y2=E+b*De.uY(v),v=De.add(v,2),t.x3=A+S*De.uX(v),t.y3=E+b*De.uY(v)}else t.x0=f,t.y0=d,t.x1=f+m,t.y1=d,t.x2=f+m,t.y2=d+g,t.x3=f,t.y3=d+g}destroy(t=!1){this._source&&(this._source.off("resize",this.update,this),t&&(this._source.destroy(),this._source=null)),this._textureMatrix=null,this.destroyed=!0,this.emit("destroy",this),this.removeAllListeners()}update(){this.noFrame&&(this.frame.width=this._source.width,this.frame.height=this._source.height),this.updateUvs(),this.emit("update",this)}get baseTexture(){return ce(tn,"Texture.baseTexture is now Texture.source"),this._source}}Ee.EMPTY=new Ee({label:"EMPTY",source:new wi({label:"EMPTY"})});Ee.EMPTY.destroy=cx;Ee.WHITE=new Ee({source:new Cg({resource:new Uint8Array([255,255,255,255]),width:1,height:1,alphaMode:"premultiply-alpha-on-upload",label:"WHITE"}),label:"WHITE"});Ee.WHITE.destroy=cx;function yx(i,t,n){const{width:s,height:o}=n.orig,f=n.trim;if(f){const d=f.width,m=f.height;i.minX=f.x-t._x*s,i.maxX=i.minX+d,i.minY=f.y-t._y*o,i.maxY=i.minY+m}else i.minX=-t._x*s,i.maxX=i.minX+s,i.minY=-t._y*o,i.maxY=i.minY+o}const gv=new ne;class Bi{constructor(t=1/0,n=1/0,s=-1/0,o=-1/0){this.minX=1/0,this.minY=1/0,this.maxX=-1/0,this.maxY=-1/0,this.matrix=gv,this.minX=t,this.minY=n,this.maxX=s,this.maxY=o}isEmpty(){return this.minX>this.maxX||this.minY>this.maxY}get rectangle(){this._rectangle||(this._rectangle=new un);const t=this._rectangle;return this.minX>this.maxX||this.minY>this.maxY?(t.x=0,t.y=0,t.width=0,t.height=0):t.copyFromBounds(this),t}clear(){return this.minX=1/0,this.minY=1/0,this.maxX=-1/0,this.maxY=-1/0,this.matrix=gv,this}set(t,n,s,o){this.minX=t,this.minY=n,this.maxX=s,this.maxY=o}addFrame(t,n,s,o,f){f||(f=this.matrix);const d=f.a,m=f.b,g=f.c,v=f.d,S=f.tx,b=f.ty;let A=this.minX,E=this.minY,R=this.maxX,D=this.maxY,M=d*t+g*n+S,O=m*t+v*n+b;M<A&&(A=M),O<E&&(E=O),M>R&&(R=M),O>D&&(D=O),M=d*s+g*n+S,O=m*s+v*n+b,M<A&&(A=M),O<E&&(E=O),M>R&&(R=M),O>D&&(D=O),M=d*t+g*o+S,O=m*t+v*o+b,M<A&&(A=M),O<E&&(E=O),M>R&&(R=M),O>D&&(D=O),M=d*s+g*o+S,O=m*s+v*o+b,M<A&&(A=M),O<E&&(E=O),M>R&&(R=M),O>D&&(D=O),this.minX=A,this.minY=E,this.maxX=R,this.maxY=D}addRect(t,n){this.addFrame(t.x,t.y,t.x+t.width,t.y+t.height,n)}addBounds(t,n){this.addFrame(t.minX,t.minY,t.maxX,t.maxY,n)}addBoundsMask(t){this.minX=this.minX>t.minX?this.minX:t.minX,this.minY=this.minY>t.minY?this.minY:t.minY,this.maxX=this.maxX<t.maxX?this.maxX:t.maxX,this.maxY=this.maxY<t.maxY?this.maxY:t.maxY}applyMatrix(t){const n=this.minX,s=this.minY,o=this.maxX,f=this.maxY,{a:d,b:m,c:g,d:v,tx:S,ty:b}=t;let A=d*n+g*s+S,E=m*n+v*s+b;this.minX=A,this.minY=E,this.maxX=A,this.maxY=E,A=d*o+g*s+S,E=m*o+v*s+b,this.minX=A<this.minX?A:this.minX,this.minY=E<this.minY?E:this.minY,this.maxX=A>this.maxX?A:this.maxX,this.maxY=E>this.maxY?E:this.maxY,A=d*n+g*f+S,E=m*n+v*f+b,this.minX=A<this.minX?A:this.minX,this.minY=E<this.minY?E:this.minY,this.maxX=A>this.maxX?A:this.maxX,this.maxY=E>this.maxY?E:this.maxY,A=d*o+g*f+S,E=m*o+v*f+b,this.minX=A<this.minX?A:this.minX,this.minY=E<this.minY?E:this.minY,this.maxX=A>this.maxX?A:this.maxX,this.maxY=E>this.maxY?E:this.maxY}fit(t){return this.minX<t.left&&(this.minX=t.left),this.maxX>t.right&&(this.maxX=t.right),this.minY<t.top&&(this.minY=t.top),this.maxY>t.bottom&&(this.maxY=t.bottom),this}fitBounds(t,n,s,o){return this.minX<t&&(this.minX=t),this.maxX>n&&(this.maxX=n),this.minY<s&&(this.minY=s),this.maxY>o&&(this.maxY=o),this}pad(t,n=t){return this.minX-=t,this.maxX+=t,this.minY-=n,this.maxY+=n,this}ceil(){return this.minX=Math.floor(this.minX),this.minY=Math.floor(this.minY),this.maxX=Math.ceil(this.maxX),this.maxY=Math.ceil(this.maxY),this}clone(){return new Bi(this.minX,this.minY,this.maxX,this.maxY)}scale(t,n=t){return this.minX*=t,this.minY*=n,this.maxX*=t,this.maxY*=n,this}get x(){return this.minX}set x(t){const n=this.maxX-this.minX;this.minX=t,this.maxX=t+n}get y(){return this.minY}set y(t){const n=this.maxY-this.minY;this.minY=t,this.maxY=t+n}get width(){return this.maxX-this.minX}set width(t){this.maxX=this.minX+t}get height(){return this.maxY-this.minY}set height(t){this.maxY=this.minY+t}get left(){return this.minX}get right(){return this.maxX}get top(){return this.minY}get bottom(){return this.maxY}get isPositive(){return this.maxX-this.minX>0&&this.maxY-this.minY>0}get isValid(){return this.minX+this.minY!==1/0}addVertexData(t,n,s,o){let f=this.minX,d=this.minY,m=this.maxX,g=this.maxY;o||(o=this.matrix);const v=o.a,S=o.b,b=o.c,A=o.d,E=o.tx,R=o.ty;for(let D=n;D<s;D+=2){const M=t[D],O=t[D+1],U=v*M+b*O+E,B=S*M+A*O+R;f=U<f?U:f,d=B<d?B:d,m=U>m?U:m,g=B>g?B:g}this.minX=f,this.minY=d,this.maxX=m,this.maxY=g}containsPoint(t,n){return this.minX<=t&&this.minY<=n&&this.maxX>=t&&this.maxY>=n}toString(){return`[pixi.js:Bounds minX=${this.minX} minY=${this.minY} maxX=${this.maxX} maxY=${this.maxY} width=${this.width} height=${this.height}]`}copyFrom(t){return this.minX=t.minX,this.minY=t.minY,this.maxX=t.maxX,this.maxY=t.maxY,this}}var vT={grad:.9,turn:360,rad:360/(2*Math.PI)},Bs=function(i){return typeof i=="string"?i.length>0:typeof i=="number"},Nn=function(i,t,n){return t===void 0&&(t=0),n===void 0&&(n=Math.pow(10,t)),Math.round(n*i)/n+0},Ni=function(i,t,n){return t===void 0&&(t=0),n===void 0&&(n=1),i>n?n:i>t?i:t},gx=function(i){return(i=isFinite(i)?i%360:0)>0?i:i+360},vv=function(i){return{r:Ni(i.r,0,255),g:Ni(i.g,0,255),b:Ni(i.b,0,255),a:Ni(i.a)}},hy=function(i){return{r:Nn(i.r),g:Nn(i.g),b:Nn(i.b),a:Nn(i.a,3)}},xT=/^#([0-9a-f]{3,8})$/i,Om=function(i){var t=i.toString(16);return t.length<2?"0"+t:t},vx=function(i){var t=i.r,n=i.g,s=i.b,o=i.a,f=Math.max(t,n,s),d=f-Math.min(t,n,s),m=d?f===t?(n-s)/d:f===n?2+(s-t)/d:4+(t-n)/d:0;return{h:60*(m<0?m+6:m),s:f?d/f*100:0,v:f/255*100,a:o}},xx=function(i){var t=i.h,n=i.s,s=i.v,o=i.a;t=t/360*6,n/=100,s/=100;var f=Math.floor(t),d=s*(1-n),m=s*(1-(t-f)*n),g=s*(1-(1-t+f)*n),v=f%6;return{r:255*[s,m,d,d,g,s][v],g:255*[g,s,s,m,d,d][v],b:255*[d,d,g,s,s,m][v],a:o}},xv=function(i){return{h:gx(i.h),s:Ni(i.s,0,100),l:Ni(i.l,0,100),a:Ni(i.a)}},_v=function(i){return{h:Nn(i.h),s:Nn(i.s),l:Nn(i.l),a:Nn(i.a,3)}},Sv=function(i){return xx((n=(t=i).s,{h:t.h,s:(n*=((s=t.l)<50?s:100-s)/100)>0?2*n/(s+n)*100:0,v:s+n,a:t.a}));var t,n,s},Dh=function(i){return{h:(t=vx(i)).h,s:(o=(200-(n=t.s))*(s=t.v)/100)>0&&o<200?n*s/100/(o<=100?o:200-o)*100:0,l:o/2,a:t.a};var t,n,s,o},_T=/^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s*,\s*([+-]?\d*\.?\d+)%\s*,\s*([+-]?\d*\.?\d+)%\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,ST=/^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s+([+-]?\d*\.?\d+)%\s+([+-]?\d*\.?\d+)%\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,bT=/^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,TT=/^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,Wy={string:[[function(i){var t=xT.exec(i);return t?(i=t[1]).length<=4?{r:parseInt(i[0]+i[0],16),g:parseInt(i[1]+i[1],16),b:parseInt(i[2]+i[2],16),a:i.length===4?Nn(parseInt(i[3]+i[3],16)/255,2):1}:i.length===6||i.length===8?{r:parseInt(i.substr(0,2),16),g:parseInt(i.substr(2,2),16),b:parseInt(i.substr(4,2),16),a:i.length===8?Nn(parseInt(i.substr(6,2),16)/255,2):1}:null:null},"hex"],[function(i){var t=bT.exec(i)||TT.exec(i);return t?t[2]!==t[4]||t[4]!==t[6]?null:vv({r:Number(t[1])/(t[2]?100/255:1),g:Number(t[3])/(t[4]?100/255:1),b:Number(t[5])/(t[6]?100/255:1),a:t[7]===void 0?1:Number(t[7])/(t[8]?100:1)}):null},"rgb"],[function(i){var t=_T.exec(i)||ST.exec(i);if(!t)return null;var n,s,o=xv({h:(n=t[1],s=t[2],s===void 0&&(s="deg"),Number(n)*(vT[s]||1)),s:Number(t[3]),l:Number(t[4]),a:t[5]===void 0?1:Number(t[5])/(t[6]?100:1)});return Sv(o)},"hsl"]],object:[[function(i){var t=i.r,n=i.g,s=i.b,o=i.a,f=o===void 0?1:o;return Bs(t)&&Bs(n)&&Bs(s)?vv({r:Number(t),g:Number(n),b:Number(s),a:Number(f)}):null},"rgb"],[function(i){var t=i.h,n=i.s,s=i.l,o=i.a,f=o===void 0?1:o;if(!Bs(t)||!Bs(n)||!Bs(s))return null;var d=xv({h:Number(t),s:Number(n),l:Number(s),a:Number(f)});return Sv(d)},"hsl"],[function(i){var t=i.h,n=i.s,s=i.v,o=i.a,f=o===void 0?1:o;if(!Bs(t)||!Bs(n)||!Bs(s))return null;var d=(function(m){return{h:gx(m.h),s:Ni(m.s,0,100),v:Ni(m.v,0,100),a:Ni(m.a)}})({h:Number(t),s:Number(n),v:Number(s),a:Number(f)});return xx(d)},"hsv"]]},bv=function(i,t){for(var n=0;n<t.length;n++){var s=t[n][0](i);if(s)return[s,t[n][1]]}return[null,void 0]},ET=function(i){return typeof i=="string"?bv(i.trim(),Wy.string):typeof i=="object"&&i!==null?bv(i,Wy.object):[null,void 0]},dy=function(i,t){var n=Dh(i);return{h:n.h,s:Ni(n.s+100*t,0,100),l:n.l,a:n.a}},my=function(i){return(299*i.r+587*i.g+114*i.b)/1e3/255},Tv=function(i,t){var n=Dh(i);return{h:n.h,s:n.s,l:Ni(n.l+100*t,0,100),a:n.a}},Fy=(function(){function i(t){this.parsed=ET(t)[0],this.rgba=this.parsed||{r:0,g:0,b:0,a:1}}return i.prototype.isValid=function(){return this.parsed!==null},i.prototype.brightness=function(){return Nn(my(this.rgba),2)},i.prototype.isDark=function(){return my(this.rgba)<.5},i.prototype.isLight=function(){return my(this.rgba)>=.5},i.prototype.toHex=function(){return t=hy(this.rgba),n=t.r,s=t.g,o=t.b,d=(f=t.a)<1?Om(Nn(255*f)):"","#"+Om(n)+Om(s)+Om(o)+d;var t,n,s,o,f,d},i.prototype.toRgb=function(){return hy(this.rgba)},i.prototype.toRgbString=function(){return t=hy(this.rgba),n=t.r,s=t.g,o=t.b,(f=t.a)<1?"rgba("+n+", "+s+", "+o+", "+f+")":"rgb("+n+", "+s+", "+o+")";var t,n,s,o,f},i.prototype.toHsl=function(){return _v(Dh(this.rgba))},i.prototype.toHslString=function(){return t=_v(Dh(this.rgba)),n=t.h,s=t.s,o=t.l,(f=t.a)<1?"hsla("+n+", "+s+"%, "+o+"%, "+f+")":"hsl("+n+", "+s+"%, "+o+"%)";var t,n,s,o,f},i.prototype.toHsv=function(){return t=vx(this.rgba),{h:Nn(t.h),s:Nn(t.s),v:Nn(t.v),a:Nn(t.a,3)};var t},i.prototype.invert=function(){return Pl({r:255-(t=this.rgba).r,g:255-t.g,b:255-t.b,a:t.a});var t},i.prototype.saturate=function(t){return t===void 0&&(t=.1),Pl(dy(this.rgba,t))},i.prototype.desaturate=function(t){return t===void 0&&(t=.1),Pl(dy(this.rgba,-t))},i.prototype.grayscale=function(){return Pl(dy(this.rgba,-1))},i.prototype.lighten=function(t){return t===void 0&&(t=.1),Pl(Tv(this.rgba,t))},i.prototype.darken=function(t){return t===void 0&&(t=.1),Pl(Tv(this.rgba,-t))},i.prototype.rotate=function(t){return t===void 0&&(t=15),this.hue(this.hue()+t)},i.prototype.alpha=function(t){return typeof t=="number"?Pl({r:(n=this.rgba).r,g:n.g,b:n.b,a:t}):Nn(this.rgba.a,3);var n},i.prototype.hue=function(t){var n=Dh(this.rgba);return typeof t=="number"?Pl({h:t,s:n.s,l:n.l,a:n.a}):Nn(n.h)},i.prototype.isEqual=function(t){return this.toHex()===Pl(t).toHex()},i})(),Pl=function(i){return i instanceof Fy?i:new Fy(i)},Ev=[],CT=function(i){i.forEach(function(t){Ev.indexOf(t)<0&&(t(Fy,Wy),Ev.push(t))})};function AT(i,t){var n={white:"#ffffff",bisque:"#ffe4c4",blue:"#0000ff",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",antiquewhite:"#faebd7",aqua:"#00ffff",azure:"#f0ffff",whitesmoke:"#f5f5f5",papayawhip:"#ffefd5",plum:"#dda0dd",blanchedalmond:"#ffebcd",black:"#000000",gold:"#ffd700",goldenrod:"#daa520",gainsboro:"#dcdcdc",cornsilk:"#fff8dc",cornflowerblue:"#6495ed",burlywood:"#deb887",aquamarine:"#7fffd4",beige:"#f5f5dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkkhaki:"#bdb76b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",peachpuff:"#ffdab9",darkmagenta:"#8b008b",darkred:"#8b0000",darkorchid:"#9932cc",darkorange:"#ff8c00",darkslateblue:"#483d8b",gray:"#808080",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",deeppink:"#ff1493",deepskyblue:"#00bfff",wheat:"#f5deb3",firebrick:"#b22222",floralwhite:"#fffaf0",ghostwhite:"#f8f8ff",darkviolet:"#9400d3",magenta:"#ff00ff",green:"#008000",dodgerblue:"#1e90ff",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",blueviolet:"#8a2be2",forestgreen:"#228b22",lawngreen:"#7cfc00",indianred:"#cd5c5c",indigo:"#4b0082",fuchsia:"#ff00ff",brown:"#a52a2a",maroon:"#800000",mediumblue:"#0000cd",lightcoral:"#f08080",darkturquoise:"#00ced1",lightcyan:"#e0ffff",ivory:"#fffff0",lightyellow:"#ffffe0",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",linen:"#faf0e6",mediumaquamarine:"#66cdaa",lemonchiffon:"#fffacd",lime:"#00ff00",khaki:"#f0e68c",mediumseagreen:"#3cb371",limegreen:"#32cd32",mediumspringgreen:"#00fa9a",lightskyblue:"#87cefa",lightblue:"#add8e6",midnightblue:"#191970",lightpink:"#ffb6c1",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",mintcream:"#f5fffa",lightslategray:"#778899",lightslategrey:"#778899",navajowhite:"#ffdead",navy:"#000080",mediumvioletred:"#c71585",powderblue:"#b0e0e6",palegoldenrod:"#eee8aa",oldlace:"#fdf5e6",paleturquoise:"#afeeee",mediumturquoise:"#48d1cc",mediumorchid:"#ba55d3",rebeccapurple:"#663399",lightsteelblue:"#b0c4de",mediumslateblue:"#7b68ee",thistle:"#d8bfd8",tan:"#d2b48c",orchid:"#da70d6",mediumpurple:"#9370db",purple:"#800080",pink:"#ffc0cb",skyblue:"#87ceeb",springgreen:"#00ff7f",palegreen:"#98fb98",red:"#ff0000",yellow:"#ffff00",slateblue:"#6a5acd",lavenderblush:"#fff0f5",peru:"#cd853f",palevioletred:"#db7093",violet:"#ee82ee",teal:"#008080",slategray:"#708090",slategrey:"#708090",aliceblue:"#f0f8ff",darkseagreen:"#8fbc8f",darkolivegreen:"#556b2f",greenyellow:"#adff2f",seagreen:"#2e8b57",seashell:"#fff5ee",tomato:"#ff6347",silver:"#c0c0c0",sienna:"#a0522d",lavender:"#e6e6fa",lightgreen:"#90ee90",orange:"#ffa500",orangered:"#ff4500",steelblue:"#4682b4",royalblue:"#4169e1",turquoise:"#40e0d0",yellowgreen:"#9acd32",salmon:"#fa8072",saddlebrown:"#8b4513",sandybrown:"#f4a460",rosybrown:"#bc8f8f",darksalmon:"#e9967a",lightgoldenrodyellow:"#fafad2",snow:"#fffafa",lightgrey:"#d3d3d3",lightgray:"#d3d3d3",dimgray:"#696969",dimgrey:"#696969",olivedrab:"#6b8e23",olive:"#808000"},s={};for(var o in n)s[n[o]]=o;var f={};i.prototype.toName=function(d){if(!(this.rgba.a||this.rgba.r||this.rgba.g||this.rgba.b))return"transparent";var m,g,v=s[this.toHex()];if(v)return v;if(d!=null&&d.closest){var S=this.toRgb(),b=1/0,A="black";if(!f.length)for(var E in n)f[E]=new i(n[E]).toRgb();for(var R in n){var D=(m=S,g=f[R],Math.pow(m.r-g.r,2)+Math.pow(m.g-g.g,2)+Math.pow(m.b-g.b,2));D<b&&(b=D,A=R)}return A}},t.string.push([function(d){var m=d.toLowerCase(),g=m==="transparent"?"#0000":n[m];return g?new i(g).toRgb():null},"name"])}CT([AT]);const Mc=class Eh{constructor(t=16777215){this._value=null,this._components=new Float32Array(4),this._components.fill(1),this._int=16777215,this.value=t}get red(){return this._components[0]}get green(){return this._components[1]}get blue(){return this._components[2]}get alpha(){return this._components[3]}setValue(t){return this.value=t,this}set value(t){if(t instanceof Eh)this._value=this._cloneSource(t._value),this._int=t._int,this._components.set(t._components);else{if(t===null)throw new Error("Cannot set Color#value to null");(this._value===null||!this._isSourceEqual(this._value,t))&&(this._value=this._cloneSource(t),this._normalize(this._value))}}get value(){return this._value}_cloneSource(t){return typeof t=="string"||typeof t=="number"||t instanceof Number||t===null?t:Array.isArray(t)||ArrayBuffer.isView(t)?t.slice(0):typeof t=="object"&&t!==null?{...t}:t}_isSourceEqual(t,n){const s=typeof t;if(s!==typeof n)return!1;if(s==="number"||s==="string"||t instanceof Number)return t===n;if(Array.isArray(t)&&Array.isArray(n)||ArrayBuffer.isView(t)&&ArrayBuffer.isView(n))return t.length!==n.length?!1:t.every((f,d)=>f===n[d]);if(t!==null&&n!==null){const f=Object.keys(t),d=Object.keys(n);return f.length!==d.length?!1:f.every(m=>t[m]===n[m])}return t===n}toRgba(){const[t,n,s,o]=this._components;return{r:t,g:n,b:s,a:o}}toRgb(){const[t,n,s]=this._components;return{r:t,g:n,b:s}}toRgbaString(){const[t,n,s]=this.toUint8RgbArray();return`rgba(${t},${n},${s},${this.alpha})`}toUint8RgbArray(t){const[n,s,o]=this._components;return this._arrayRgb||(this._arrayRgb=[]),t||(t=this._arrayRgb),t[0]=Math.round(n*255),t[1]=Math.round(s*255),t[2]=Math.round(o*255),t}toArray(t){this._arrayRgba||(this._arrayRgba=[]),t||(t=this._arrayRgba);const[n,s,o,f]=this._components;return t[0]=n,t[1]=s,t[2]=o,t[3]=f,t}toRgbArray(t){this._arrayRgb||(this._arrayRgb=[]),t||(t=this._arrayRgb);const[n,s,o]=this._components;return t[0]=n,t[1]=s,t[2]=o,t}toNumber(){return this._int}toBgrNumber(){const[t,n,s]=this.toUint8RgbArray();return(s<<16)+(n<<8)+t}toLittleEndianNumber(){const t=this._int;return(t>>16)+(t&65280)+((t&255)<<16)}multiply(t){const[n,s,o,f]=Eh._temp.setValue(t)._components;return this._components[0]*=n,this._components[1]*=s,this._components[2]*=o,this._components[3]*=f,this._refreshInt(),this._value=null,this}premultiply(t,n=!0){return n&&(this._components[0]*=t,this._components[1]*=t,this._components[2]*=t),this._components[3]=t,this._refreshInt(),this._value=null,this}toPremultiplied(t,n=!0){if(t===1)return(255<<24)+this._int;if(t===0)return n?0:this._int;let s=this._int>>16&255,o=this._int>>8&255,f=this._int&255;return n&&(s=s*t+.5|0,o=o*t+.5|0,f=f*t+.5|0),(t*255<<24)+(s<<16)+(o<<8)+f}toHex(){const t=this._int.toString(16);return`#${"000000".substring(0,6-t.length)+t}`}toHexa(){const n=Math.round(this._components[3]*255).toString(16);return this.toHex()+"00".substring(0,2-n.length)+n}setAlpha(t){return this._components[3]=this._clamp(t),this._value=null,this}_normalize(t){let n,s,o,f;if((typeof t=="number"||t instanceof Number)&&t>=0&&t<=16777215){const d=t;n=(d>>16&255)/255,s=(d>>8&255)/255,o=(d&255)/255,f=1}else if((Array.isArray(t)||t instanceof Float32Array)&&t.length>=3&&t.length<=4)t=this._clamp(t),[n,s,o,f=1]=t;else if((t instanceof Uint8Array||t instanceof Uint8ClampedArray)&&t.length>=3&&t.length<=4)t=this._clamp(t,0,255),[n,s,o,f=255]=t,n/=255,s/=255,o/=255,f/=255;else if(typeof t=="string"||typeof t=="object"){if(typeof t=="string"){const m=Eh.HEX_PATTERN.exec(t);m&&(t=`#${m[2]}`)}const d=Pl(t);d.isValid()&&({r:n,g:s,b:o,a:f}=d.rgba,n/=255,s/=255,o/=255)}if(n!==void 0)this._components[0]=n,this._components[1]=s,this._components[2]=o,this._components[3]=f,this._refreshInt();else throw new Error(`Unable to convert color ${t}`)}_refreshInt(){this._clamp(this._components);const[t,n,s]=this._components;this._int=(t*255<<16)+(n*255<<8)+(s*255|0)}_clamp(t,n=0,s=1){return typeof t=="number"?Math.min(Math.max(t,n),s):(t.forEach((o,f)=>{t[f]=Math.min(Math.max(o,n),s)}),t)}static isColorLike(t){return typeof t=="number"||typeof t=="string"||t instanceof Number||t instanceof Eh||Array.isArray(t)||t instanceof Uint8Array||t instanceof Uint8ClampedArray||t instanceof Float32Array||t.r!==void 0&&t.g!==void 0&&t.b!==void 0||t.r!==void 0&&t.g!==void 0&&t.b!==void 0&&t.a!==void 0||t.h!==void 0&&t.s!==void 0&&t.l!==void 0||t.h!==void 0&&t.s!==void 0&&t.l!==void 0&&t.a!==void 0||t.h!==void 0&&t.s!==void 0&&t.v!==void 0||t.h!==void 0&&t.s!==void 0&&t.v!==void 0&&t.a!==void 0}};Mc.shared=new Mc;Mc._temp=new Mc;Mc.HEX_PATTERN=/^(#|0x)?(([a-f0-9]{3}){1,2}([a-f0-9]{2})?)$/i;let Sn=Mc;const MT={cullArea:null,cullable:!1,cullableChildren:!0};let py=0;const Cv=500;function Da(...i){py!==Cv&&(py++,py===Cv?console.warn("PixiJS Warning: too many warnings, no more warnings will be reported to the console by PixiJS."):console.warn("PixiJS Warning: ",...i))}const Qh={_registeredResources:new Set,register(i){this._registeredResources.add(i)},unregister(i){this._registeredResources.delete(i)},release(){this._registeredResources.forEach(i=>i.clear())},get registeredCount(){return this._registeredResources.size},isRegistered(i){return this._registeredResources.has(i)},reset(){this._registeredResources.clear()}};class RT{constructor(t,n){this._pool=[],this._count=0,this._index=0,this._classType=t,n&&this.prepopulate(n)}prepopulate(t){for(let n=0;n<t;n++)this._pool[this._index++]=new this._classType;this._count+=t}get(t){var s;let n;return this._index>0?n=this._pool[--this._index]:(n=new this._classType,this._count++),(s=n.init)==null||s.call(n,t),n}return(t){var n;(n=t.reset)==null||n.call(t),this._pool[this._index++]=t}get totalSize(){return this._count}get totalFree(){return this._index}get totalUsed(){return this._count-this._index}clear(){if(this._pool.length>0&&this._pool[0].destroy)for(let t=0;t<this._index;t++)this._pool[t].destroy();this._pool.length=0,this._count=0,this._index=0}}class zT{constructor(){this._poolsByClass=new Map}prepopulate(t,n){this.getPool(t).prepopulate(n)}get(t,n){return this.getPool(t).get(n)}return(t){this.getPool(t.constructor).return(t)}getPool(t){return this._poolsByClass.has(t)||this._poolsByClass.set(t,new RT(t)),this._poolsByClass.get(t)}stats(){const t={};return this._poolsByClass.forEach(n=>{const s=t[n._classType.name]?n._classType.name+n._classType.ID:n._classType.name;t[s]={free:n.totalFree,used:n.totalUsed,size:n.totalSize}}),t}clear(){this._poolsByClass.forEach(t=>t.clear()),this._poolsByClass.clear()}}const Qa=new zT;Qh.register(Qa);const DT={get isCachedAsTexture(){var i;return!!((i=this.renderGroup)!=null&&i.isCachedAsTexture)},cacheAsTexture(i){typeof i=="boolean"&&i===!1?this.disableRenderGroup():(this.enableRenderGroup(),this.renderGroup.enableCacheAsTexture(i===!0?{}:i))},updateCacheTexture(){var i;(i=this.renderGroup)==null||i.updateCacheTexture()},get cacheAsBitmap(){return this.isCachedAsTexture},set cacheAsBitmap(i){ce("v8.6.0","cacheAsBitmap is deprecated, use cacheAsTexture instead."),this.cacheAsTexture(i)}};function OT(i,t,n){const s=i.length;let o;if(t>=s||n===0)return;n=t+n>s?s-t:n;const f=s-n;for(o=t;o<f;++o)i[o]=i[o+n];i.length=f}const NT={allowChildren:!0,removeChildren(i=0,t){var f;const n=t??this.children.length,s=n-i,o=[];if(s>0&&s<=n){for(let m=n-1;m>=i;m--){const g=this.children[m];g&&(o.push(g),g.parent=null)}OT(this.children,i,n);const d=this.renderGroup||this.parentRenderGroup;d&&d.removeChildren(o);for(let m=0;m<o.length;++m){const g=o[m];(f=g.parentRenderLayer)==null||f.detach(g),this.emit("childRemoved",g,this,m),o[m].emit("removed",this)}return o.length>0&&this._didViewChangeTick++,o}else if(s===0&&this.children.length===0)return o;throw new RangeError("removeChildren: numeric values are outside the acceptable range.")},removeChildAt(i){const t=this.getChildAt(i);return this.removeChild(t)},getChildAt(i){if(i<0||i>=this.children.length)throw new Error(`getChildAt: Index (${i}) does not exist.`);return this.children[i]},setChildIndex(i,t){if(t<0||t>=this.children.length)throw new Error(`The index ${t} supplied is out of bounds ${this.children.length}`);this.getChildIndex(i),this.addChildAt(i,t)},getChildIndex(i){const t=this.children.indexOf(i);if(t===-1)throw new Error("The supplied Container must be a child of the caller");return t},addChildAt(i,t){this.allowChildren||ce(tn,"addChildAt: Only Containers will be allowed to add children in v8.0.0");const{children:n}=this;if(t<0||t>n.length)throw new Error(`${i}addChildAt: The index ${t} supplied is out of bounds ${n.length}`);const s=i.parent===this;if(i.parent){const f=i.parent.children.indexOf(i);if(s){if(f===t)return i;i.parent.children.splice(f,1)}else i.removeFromParent()}t===n.length?n.push(i):n.splice(t,0,i),i.parent=this,i.didChange=!0,i._updateFlags=15;const o=this.renderGroup||this.parentRenderGroup;return o&&o.addChild(i),this.sortableChildren&&(this.sortDirty=!0),s||(this.emit("childAdded",i,this,t),i.emit("added",this)),i},swapChildren(i,t){if(i===t)return;const n=this.getChildIndex(i),s=this.getChildIndex(t);this.children[n]=t,this.children[s]=i;const o=this.renderGroup||this.parentRenderGroup;o&&(o.structureDidChange=!0),this._didContainerChangeTick++},removeFromParent(){var i;(i=this.parent)==null||i.removeChild(this)},reparentChild(...i){return i.length===1?this.reparentChildAt(i[0],this.children.length):(i.forEach(t=>this.reparentChildAt(t,this.children.length)),i[0])},reparentChildAt(i,t){if(i.parent===this)return this.setChildIndex(i,t),i;const n=i.worldTransform.clone();i.removeFromParent(),this.addChildAt(i,t);const s=this.worldTransform.clone();return s.invert(),n.prepend(s),i.setFromMatrix(n),i},replaceChild(i,t){i.updateLocalTransform(),this.addChildAt(t,this.getChildIndex(i)),t.setFromMatrix(i.localTransform),t.updateLocalTransform(),this.removeChild(i)}},UT={collectRenderables(i,t,n){this.parentRenderLayer&&this.parentRenderLayer!==n||this.globalDisplayStatus<7||!this.includeInBuild||(this.sortableChildren&&this.sortChildren(),this.isSimple?this.collectRenderablesSimple(i,t,n):this.renderGroup?t.renderPipes.renderGroup.addRenderGroup(this.renderGroup,i):this.collectRenderablesWithEffects(i,t,n))},collectRenderablesSimple(i,t,n){const s=this.children,o=s.length;for(let f=0;f<o;f++)s[f].collectRenderables(i,t,n)},collectRenderablesWithEffects(i,t,n){const{renderPipes:s}=t;for(let o=0;o<this.effects.length;o++){const f=this.effects[o];s[f.pipe].push(f,this,i)}this.collectRenderablesSimple(i,t,n);for(let o=this.effects.length-1;o>=0;o--){const f=this.effects[o];s[f.pipe].pop(f,this,i)}}};class Av{constructor(){this.pipe="filter",this.priority=1}destroy(){for(let t=0;t<this.filters.length;t++)this.filters[t].destroy();this.filters=null,this.filterArea=null}}class BT{constructor(){this._effectClasses=[],this._tests=[],this._initialized=!1}init(){this._initialized||(this._initialized=!0,this._effectClasses.forEach(t=>{this.add({test:t.test,maskClass:t})}))}add(t){this._tests.push(t)}getMaskEffect(t){this._initialized||this.init();for(let n=0;n<this._tests.length;n++){const s=this._tests[n];if(s.test(t))return Qa.get(s.maskClass,t)}return t}returnMaskEffect(t){Qa.return(t)}}const Iy=new BT;ke.handleByList(kt.MaskEffect,Iy._effectClasses);const wT={_maskEffect:null,_maskOptions:{inverse:!1},_filterEffect:null,effects:[],_markStructureAsChanged(){const i=this.renderGroup||this.parentRenderGroup;i&&(i.structureDidChange=!0)},addEffect(i){this.effects.indexOf(i)===-1&&(this.effects.push(i),this.effects.sort((n,s)=>n.priority-s.priority),this._markStructureAsChanged(),this._updateIsSimple())},removeEffect(i){const t=this.effects.indexOf(i);t!==-1&&(this.effects.splice(t,1),this._markStructureAsChanged(),this._updateIsSimple())},set mask(i){const t=this._maskEffect;(t==null?void 0:t.mask)!==i&&(t&&(this.removeEffect(t),Iy.returnMaskEffect(t),this._maskEffect=null),i!=null&&(this._maskEffect=Iy.getMaskEffect(i),this.addEffect(this._maskEffect)))},get mask(){var i;return(i=this._maskEffect)==null?void 0:i.mask},setMask(i){this._maskOptions={...this._maskOptions,...i},i.mask&&(this.mask=i.mask),this._markStructureAsChanged()},set filters(i){var f;!Array.isArray(i)&&i&&(i=[i]);const t=this._filterEffect||(this._filterEffect=new Av);i=i;const n=(i==null?void 0:i.length)>0,s=((f=t.filters)==null?void 0:f.length)>0,o=n!==s;i=Array.isArray(i)?i.slice(0):i,t.filters=Object.freeze(i),o&&(n?this.addEffect(t):(this.removeEffect(t),t.filters=i??null))},get filters(){var i;return(i=this._filterEffect)==null?void 0:i.filters},set filterArea(i){this._filterEffect||(this._filterEffect=new Av),this._filterEffect.filterArea=i},get filterArea(){var i;return(i=this._filterEffect)==null?void 0:i.filterArea}},HT={label:null,get name(){return ce(tn,"Container.name property has been removed, use Container.label instead"),this.label},set name(i){ce(tn,"Container.name property has been removed, use Container.label instead"),this.label=i},getChildByName(i,t=!1){return this.getChildByLabel(i,t)},getChildByLabel(i,t=!1){const n=this.children;for(let s=0;s<n.length;s++){const o=n[s];if(o.label===i||i instanceof RegExp&&i.test(o.label))return o}if(t)for(let s=0;s<n.length;s++){const f=n[s].getChildByLabel(i,!0);if(f)return f}return null},getChildrenByLabel(i,t=!1,n=[]){const s=this.children;for(let o=0;o<s.length;o++){const f=s[o];(f.label===i||i instanceof RegExp&&i.test(f.label))&&n.push(f)}if(t)for(let o=0;o<s.length;o++)s[o].getChildrenByLabel(i,!0,n);return n}},za=Qa.getPool(ne),js=Qa.getPool(Bi),GT=new ne,jT={getFastGlobalBounds(i,t){t||(t=new Bi),t.clear(),this._getGlobalBoundsRecursive(!!i,t,this.parentRenderLayer),t.isValid||t.set(0,0,0,0);const n=this.renderGroup||this.parentRenderGroup;return t.applyMatrix(n.worldTransform),t},_getGlobalBoundsRecursive(i,t,n){let s=t;if(i&&this.parentRenderLayer&&this.parentRenderLayer!==n||this.localDisplayStatus!==7||!this.measurable)return;const o=!!this.effects.length;if((this.renderGroup||o)&&(s=js.get().clear()),this.boundsArea)t.addRect(this.boundsArea,this.worldTransform);else{if(this.renderPipeId){const d=this.bounds;s.addFrame(d.minX,d.minY,d.maxX,d.maxY,this.groupTransform)}const f=this.children;for(let d=0;d<f.length;d++)f[d]._getGlobalBoundsRecursive(i,s,n)}if(o){let f=!1;const d=this.renderGroup||this.parentRenderGroup;for(let m=0;m<this.effects.length;m++)this.effects[m].addBounds&&(f||(f=!0,s.applyMatrix(d.worldTransform)),this.effects[m].addBounds(s,!0));f&&s.applyMatrix(d.worldTransform.copyTo(GT).invert()),t.addBounds(s),js.return(s)}else this.renderGroup&&(t.addBounds(s,this.relativeGroupTransform),js.return(s))}};function _x(i,t,n){n.clear();let s,o;return i.parent?t?s=i.parent.worldTransform:(o=za.get().identity(),s=Ag(i,o)):s=ne.IDENTITY,Sx(i,n,s,t),o&&za.return(o),n.isValid||n.set(0,0,0,0),n}function Sx(i,t,n,s){var m,g;if(!i.visible||!i.measurable)return;let o;s?o=i.worldTransform:(i.updateLocalTransform(),o=za.get(),o.appendFrom(i.localTransform,n));const f=t,d=!!i.effects.length;if(d&&(t=js.get().clear()),i.boundsArea)t.addRect(i.boundsArea,o);else{const v=i.bounds;v&&!v.isEmpty()&&(t.matrix=o,t.addBounds(v));for(let S=0;S<i.children.length;S++)Sx(i.children[S],t,o,s)}if(d){for(let v=0;v<i.effects.length;v++)(g=(m=i.effects[v]).addBounds)==null||g.call(m,t);f.addBounds(t,ne.IDENTITY),js.return(t)}s||za.return(o)}function Ag(i,t){const n=i.parent;return n&&(Ag(n,t),n.updateLocalTransform(),t.append(n.localTransform)),t}function bx(i,t){if(i===16777215||!t)return t;if(t===16777215||!i)return i;const n=i>>16&255,s=i>>8&255,o=i&255,f=t>>16&255,d=t>>8&255,m=t&255,g=n*f/255|0,v=s*d/255|0,S=o*m/255|0;return(g<<16)+(v<<8)+S}const Mv=16777215;function Rv(i,t){return i===Mv?t:t===Mv?i:bx(i,t)}function km(i){return((i&255)<<16)+(i&65280)+(i>>16&255)}const qT={getGlobalAlpha(i){if(i)return this.renderGroup?this.renderGroup.worldAlpha:this.parentRenderGroup?this.parentRenderGroup.worldAlpha*this.alpha:this.alpha;let t=this.alpha,n=this.parent;for(;n;)t*=n.alpha,n=n.parent;return t},getGlobalTransform(i=new ne,t){if(t)return i.copyFrom(this.worldTransform);this.updateLocalTransform();const n=Ag(this,za.get().identity());return i.appendFrom(this.localTransform,n),za.return(n),i},getGlobalTint(i){if(i)return this.renderGroup?km(this.renderGroup.worldColor):this.parentRenderGroup?km(Rv(this.localColor,this.parentRenderGroup.worldColor)):this.tint;let t=this.localColor,n=this.parent;for(;n;)t=Rv(t,n.localColor),n=n.parent;return km(t)}};function Tx(i,t,n){return t.clear(),n||(n=ne.IDENTITY),Ex(i,t,n,i,!0),t.isValid||t.set(0,0,0,0),t}function Ex(i,t,n,s,o){var g,v;let f;if(o)f=za.get(),f=n.copyTo(f);else{if(!i.visible||!i.measurable)return;i.updateLocalTransform();const S=i.localTransform;f=za.get(),f.appendFrom(S,n)}const d=t,m=!!i.effects.length;if(m&&(t=js.get().clear()),i.boundsArea)t.addRect(i.boundsArea,f);else{i.renderPipeId&&(t.matrix=f,t.addBounds(i.bounds));const S=i.children;for(let b=0;b<S.length;b++)Ex(S[b],t,f,s,!1)}if(m){for(let S=0;S<i.effects.length;S++)(v=(g=i.effects[S]).addLocalBounds)==null||v.call(g,t,s);d.addBounds(t,ne.IDENTITY),js.return(t)}za.return(f)}function Cx(i,t){const n=i.children;for(let s=0;s<n.length;s++){const o=n[s],f=o.uid,d=(o._didViewChangeTick&65535)<<16|o._didContainerChangeTick&65535,m=t.index;(t.data[m]!==f||t.data[m+1]!==d)&&(t.data[t.index]=f,t.data[t.index+1]=d,t.didChange=!0),t.index=m+2,o.children.length&&Cx(o,t)}return t.didChange}const YT=new ne,LT={_localBoundsCacheId:-1,_localBoundsCacheData:null,_setWidth(i,t){const n=Math.sign(this.scale.x)||1;t!==0?this.scale.x=i/t*n:this.scale.x=n},_setHeight(i,t){const n=Math.sign(this.scale.y)||1;t!==0?this.scale.y=i/t*n:this.scale.y=n},getLocalBounds(){this._localBoundsCacheData||(this._localBoundsCacheData={data:[],index:1,didChange:!1,localBounds:new Bi});const i=this._localBoundsCacheData;return i.index=1,i.didChange=!1,i.data[0]!==this._didViewChangeTick&&(i.didChange=!0,i.data[0]=this._didViewChangeTick),Cx(this,i),i.didChange&&Tx(this,i.localBounds,YT),i.localBounds},getBounds(i,t){return _x(this,i,t||new Bi)}},XT={_onRender:null,set onRender(i){const t=this.renderGroup||this.parentRenderGroup;if(!i){this._onRender&&(t==null||t.removeOnRender(this)),this._onRender=null;return}this._onRender||t==null||t.addOnRender(this),this._onRender=i},get onRender(){return this._onRender}},VT={_zIndex:0,sortDirty:!1,sortableChildren:!1,get zIndex(){return this._zIndex},set zIndex(i){this._zIndex!==i&&(this._zIndex=i,this.depthOfChildModified())},depthOfChildModified(){this.parent&&(this.parent.sortableChildren=!0,this.parent.sortDirty=!0),this.parentRenderGroup&&(this.parentRenderGroup.structureDidChange=!0)},sortChildren(){this.sortDirty&&(this.sortDirty=!1,this.children.sort(QT))}};function QT(i,t){return i._zIndex-t._zIndex}const ZT={getGlobalPosition(i=new sa,t=!1){return this.parent?this.parent.toGlobal(this._position,i,t):(i.x=this._position.x,i.y=this._position.y),i},toGlobal(i,t,n=!1){const s=this.getGlobalTransform(za.get(),n);return t=s.apply(i,t),za.return(s),t},toLocal(i,t,n,s){t&&(i=t.toGlobal(i,n,s));const o=this.getGlobalTransform(za.get(),s);return n=o.applyInverse(i,n),za.return(o),n}};class Mg{constructor(){this.uid=en("instructionSet"),this.instructions=[],this.instructionSize=0,this.renderables=[],this.gcTick=0}reset(){this.instructionSize=0}destroy(){this.instructions.length=0,this.renderables.length=0,this.renderPipes=null,this.gcTick=0}add(t){this.instructions[this.instructionSize++]=t}log(){this.instructions.length=this.instructionSize,console.table(this.instructions,["type","action"])}}let KT=0;class kT{constructor(t){this._poolKeyHash=Object.create(null),this._texturePool={},this.textureOptions=t||{},this.enableFullScreen=!1,this.textureStyle=new Ac(this.textureOptions)}createTexture(t,n,s,o){const f=new wi({...this.textureOptions,width:t,height:n,resolution:1,antialias:s,autoGarbageCollect:!1,autoGenerateMipmaps:o});return new Ee({source:f,label:`texturePool_${KT++}`})}getOptimalTexture(t,n,s=1,o,f=!1){let d=Math.ceil(t*s-1e-6),m=Math.ceil(n*s-1e-6);d=Cc(d),m=Cc(m);const g=o?1:0,v=f?1:0,S=(d<<17)+(m<<2)+(v<<1)+g;this._texturePool[S]||(this._texturePool[S]=[]);let b=this._texturePool[S].pop();return b||(b=this.createTexture(d,m,o,f)),b.source._resolution=s,b.source.width=d/s,b.source.height=m/s,b.source.pixelWidth=d,b.source.pixelHeight=m,b.frame.x=0,b.frame.y=0,b.frame.width=t,b.frame.height=n,b.updateUvs(),this._poolKeyHash[b.uid]=S,b}getSameSizeTexture(t,n=!1){const s=t.source;return this.getOptimalTexture(t.width,t.height,s._resolution,n)}returnTexture(t,n=!1){const s=this._poolKeyHash[t.uid];n&&(t.source.style=this.textureStyle),this._texturePool[s].push(t)}clear(t){if(t=t!==!1,t)for(const n in this._texturePool){const s=this._texturePool[n];if(s)for(let o=0;o<s.length;o++)s[o].destroy(!0)}this._texturePool={}}}const fp=new kT;Qh.register(fp);class JT{constructor(){this.renderPipeId="renderGroup",this.root=null,this.canBundle=!1,this.renderGroupParent=null,this.renderGroupChildren=[],this.worldTransform=new ne,this.worldColorAlpha=4294967295,this.worldColor=16777215,this.worldAlpha=1,this.childrenToUpdate=Object.create(null),this.updateTick=0,this.gcTick=0,this.childrenRenderablesToUpdate={list:[],index:0},this.structureDidChange=!0,this.instructionSet=new Mg,this._onRenderContainers=[],this.textureNeedsUpdate=!0,this.isCachedAsTexture=!1,this._matrixDirty=7}init(t){this.root=t,t._onRender&&this.addOnRender(t),t.didChange=!0;const n=t.children;for(let s=0;s<n.length;s++){const o=n[s];o._updateFlags=15,this.addChild(o)}}enableCacheAsTexture(t={}){this.textureOptions=t,this.isCachedAsTexture=!0,this.textureNeedsUpdate=!0}disableCacheAsTexture(){this.isCachedAsTexture=!1,this.texture&&(fp.returnTexture(this.texture,!0),this.texture=null)}updateCacheTexture(){this.textureNeedsUpdate=!0;const t=this._parentCacheAsTextureRenderGroup;t&&!t.textureNeedsUpdate&&t.updateCacheTexture()}reset(){this.renderGroupChildren.length=0;for(const t in this.childrenToUpdate){const n=this.childrenToUpdate[t];n.list.fill(null),n.index=0}this.childrenRenderablesToUpdate.index=0,this.childrenRenderablesToUpdate.list.fill(null),this.root=null,this.updateTick=0,this.structureDidChange=!0,this._onRenderContainers.length=0,this.renderGroupParent=null,this.disableCacheAsTexture()}get localTransform(){return this.root.localTransform}addRenderGroupChild(t){t.renderGroupParent&&t.renderGroupParent._removeRenderGroupChild(t),t.renderGroupParent=this,this.renderGroupChildren.push(t)}_removeRenderGroupChild(t){const n=this.renderGroupChildren.indexOf(t);n>-1&&this.renderGroupChildren.splice(n,1),t.renderGroupParent=null}addChild(t){if(this.structureDidChange=!0,t.parentRenderGroup=this,t.updateTick=-1,t.parent===this.root?t.relativeRenderGroupDepth=1:t.relativeRenderGroupDepth=t.parent.relativeRenderGroupDepth+1,t.didChange=!0,this.onChildUpdate(t),t.renderGroup){this.addRenderGroupChild(t.renderGroup);return}t._onRender&&this.addOnRender(t);const n=t.children;for(let s=0;s<n.length;s++)this.addChild(n[s])}removeChild(t){if(this.structureDidChange=!0,t._onRender&&(t.renderGroup||this.removeOnRender(t)),t.parentRenderGroup=null,t.renderGroup){this._removeRenderGroupChild(t.renderGroup);return}const n=t.children;for(let s=0;s<n.length;s++)this.removeChild(n[s])}removeChildren(t){for(let n=0;n<t.length;n++)this.removeChild(t[n])}onChildUpdate(t){let n=this.childrenToUpdate[t.relativeRenderGroupDepth];n||(n=this.childrenToUpdate[t.relativeRenderGroupDepth]={index:0,list:[]}),n.list[n.index++]=t}updateRenderable(t){t.globalDisplayStatus<7||(this.instructionSet.renderPipes[t.renderPipeId].updateRenderable(t),t.didViewUpdate=!1)}onChildViewUpdate(t){this.childrenRenderablesToUpdate.list[this.childrenRenderablesToUpdate.index++]=t}get isRenderable(){return this.root.localDisplayStatus===7&&this.worldAlpha>0}addOnRender(t){this._onRenderContainers.push(t)}removeOnRender(t){this._onRenderContainers.splice(this._onRenderContainers.indexOf(t),1)}runOnRender(t){for(let n=0;n<this._onRenderContainers.length;n++)this._onRenderContainers[n]._onRender(t)}destroy(){this.disableCacheAsTexture(),this.renderGroupParent=null,this.root=null,this.childrenRenderablesToUpdate=null,this.childrenToUpdate=null,this.renderGroupChildren=null,this._onRenderContainers=null,this.instructionSet=null}getChildren(t=[]){const n=this.root.children;for(let s=0;s<n.length;s++)this._getChildren(n[s],t);return t}_getChildren(t,n=[]){if(n.push(t),t.renderGroup)return n;const s=t.children;for(let o=0;o<s.length;o++)this._getChildren(s[o],n);return n}invalidateMatrices(){this._matrixDirty=7}get inverseWorldTransform(){return(this._matrixDirty&1)===0?this._inverseWorldTransform:(this._matrixDirty&=-2,this._inverseWorldTransform||(this._inverseWorldTransform=new ne),this._inverseWorldTransform.copyFrom(this.worldTransform).invert())}get textureOffsetInverseTransform(){return(this._matrixDirty&2)===0?this._textureOffsetInverseTransform:(this._matrixDirty&=-3,this._textureOffsetInverseTransform||(this._textureOffsetInverseTransform=new ne),this._textureOffsetInverseTransform.copyFrom(this.inverseWorldTransform).translate(-this._textureBounds.x,-this._textureBounds.y))}get inverseParentTextureTransform(){if((this._matrixDirty&4)===0)return this._inverseParentTextureTransform;this._matrixDirty&=-5;const t=this._parentCacheAsTextureRenderGroup;return t?(this._inverseParentTextureTransform||(this._inverseParentTextureTransform=new ne),this._inverseParentTextureTransform.copyFrom(this.worldTransform).prepend(t.inverseWorldTransform).translate(-t._textureBounds.x,-t._textureBounds.y)):this.worldTransform}get cacheToLocalTransform(){return this.isCachedAsTexture?this.textureOffsetInverseTransform:this._parentCacheAsTextureRenderGroup?this._parentCacheAsTextureRenderGroup.textureOffsetInverseTransform:null}}function PT(i,t,n={}){for(const s in t)!n[s]&&t[s]!==void 0&&(i[s]=t[s])}const yy=new Vn(null),Nm=new Vn(null),gy=new Vn(null,1,1),Um=new Vn(null),zv=1,WT=2,vy=4;class ua extends $l{constructor(t={}){var n,s;super(),this.uid=en("renderable"),this._updateFlags=15,this.renderGroup=null,this.parentRenderGroup=null,this.parentRenderGroupIndex=0,this.didChange=!1,this.didViewUpdate=!1,this.relativeRenderGroupDepth=0,this.children=[],this.parent=null,this.includeInBuild=!0,this.measurable=!0,this.isSimple=!0,this.parentRenderLayer=null,this.updateTick=-1,this.localTransform=new ne,this.relativeGroupTransform=new ne,this.groupTransform=this.relativeGroupTransform,this.destroyed=!1,this._position=new Vn(this,0,0),this._scale=gy,this._pivot=Nm,this._origin=Um,this._skew=yy,this._cx=1,this._sx=0,this._cy=0,this._sy=1,this._rotation=0,this.localColor=16777215,this.localAlpha=1,this.groupAlpha=1,this.groupColor=16777215,this.groupColorAlpha=4294967295,this.localBlendMode="inherit",this.groupBlendMode="normal",this.localDisplayStatus=7,this.globalDisplayStatus=7,this._didContainerChangeTick=0,this._didViewChangeTick=0,this._didLocalTransformChangeId=-1,this.effects=[],PT(this,t,{children:!0,parent:!0,effects:!0}),(n=t.children)==null||n.forEach(o=>this.addChild(o)),(s=t.parent)==null||s.addChild(this)}static mixin(t){ce("8.8.0","Container.mixin is deprecated, please use extensions.mixin instead."),ke.mixin(ua,t)}set _didChangeId(t){this._didViewChangeTick=t>>12&4095,this._didContainerChangeTick=t&4095}get _didChangeId(){return this._didContainerChangeTick&4095|(this._didViewChangeTick&4095)<<12}addChild(...t){if(this.allowChildren||ce(tn,"addChild: Only Containers will be allowed to add children in v8.0.0"),t.length>1){for(let o=0;o<t.length;o++)this.addChild(t[o]);return t[0]}const n=t[0],s=this.renderGroup||this.parentRenderGroup;return n.parent===this?(this.children.splice(this.children.indexOf(n),1),this.children.push(n),s&&(s.structureDidChange=!0),n):(n.parent&&n.parent.removeChild(n),this.children.push(n),this.sortableChildren&&(this.sortDirty=!0),n.parent=this,n.didChange=!0,n._updateFlags=15,s&&s.addChild(n),this.emit("childAdded",n,this,this.children.length-1),n.emit("added",this),this._didViewChangeTick++,n._zIndex!==0&&n.depthOfChildModified(),n)}removeChild(...t){if(t.length>1){for(let o=0;o<t.length;o++)this.removeChild(t[o]);return t[0]}const n=t[0],s=this.children.indexOf(n);return s>-1&&(this._didViewChangeTick++,this.children.splice(s,1),this.renderGroup?this.renderGroup.removeChild(n):this.parentRenderGroup&&this.parentRenderGroup.removeChild(n),n.parentRenderLayer&&n.parentRenderLayer.detach(n),n.parent=null,this.emit("childRemoved",n,this,s),n.emit("removed",this)),n}_onUpdate(t){t&&t===this._skew&&this._updateSkew(),this._didContainerChangeTick++,!this.didChange&&(this.didChange=!0,this.parentRenderGroup&&this.parentRenderGroup.onChildUpdate(this))}set isRenderGroup(t){!!this.renderGroup!==t&&(t?this.enableRenderGroup():this.disableRenderGroup())}get isRenderGroup(){return!!this.renderGroup}enableRenderGroup(){if(this.renderGroup)return;const t=this.parentRenderGroup;t==null||t.removeChild(this),this.renderGroup=Qa.get(JT,this),this.groupTransform=ne.IDENTITY,t==null||t.addChild(this),this._updateIsSimple()}disableRenderGroup(){if(!this.renderGroup)return;const t=this.parentRenderGroup;t==null||t.removeChild(this),Qa.return(this.renderGroup),this.renderGroup=null,this.groupTransform=this.relativeGroupTransform,t==null||t.addChild(this),this._updateIsSimple()}_updateIsSimple(){this.isSimple=!this.renderGroup&&this.effects.length===0}get worldTransform(){return this._worldTransform||(this._worldTransform=new ne),this.renderGroup?this._worldTransform.copyFrom(this.renderGroup.worldTransform):this.parentRenderGroup&&this._worldTransform.appendFrom(this.relativeGroupTransform,this.parentRenderGroup.worldTransform),this._worldTransform}get x(){return this._position.x}set x(t){this._position.x=t}get y(){return this._position.y}set y(t){this._position.y=t}get position(){return this._position}set position(t){this._position.copyFrom(t)}get rotation(){return this._rotation}set rotation(t){this._rotation!==t&&(this._rotation=t,this._onUpdate(this._skew))}get angle(){return this.rotation*cT}set angle(t){this.rotation=t*fT}get pivot(){return this._pivot===Nm&&(this._pivot=new Vn(this,0,0)),this._pivot}set pivot(t){this._pivot===Nm&&(this._pivot=new Vn(this,0,0),this._origin!==Um&&Da("Setting both a pivot and origin on a Container is not recommended. This can lead to unexpected behavior if not handled carefully.")),typeof t=="number"?this._pivot.set(t):this._pivot.copyFrom(t)}get skew(){return this._skew===yy&&(this._skew=new Vn(this,0,0)),this._skew}set skew(t){this._skew===yy&&(this._skew=new Vn(this,0,0)),this._skew.copyFrom(t)}get scale(){return this._scale===gy&&(this._scale=new Vn(this,1,1)),this._scale}set scale(t){this._scale===gy&&(this._scale=new Vn(this,0,0)),typeof t=="string"&&(t=parseFloat(t)),typeof t=="number"?this._scale.set(t):this._scale.copyFrom(t)}get origin(){return this._origin===Um&&(this._origin=new Vn(this,0,0)),this._origin}set origin(t){this._origin===Um&&(this._origin=new Vn(this,0,0),this._pivot!==Nm&&Da("Setting both a pivot and origin on a Container is not recommended. This can lead to unexpected behavior if not handled carefully.")),typeof t=="number"?this._origin.set(t):this._origin.copyFrom(t)}get width(){return Math.abs(this.scale.x*this.getLocalBounds().width)}set width(t){const n=this.getLocalBounds().width;this._setWidth(t,n)}get height(){return Math.abs(this.scale.y*this.getLocalBounds().height)}set height(t){const n=this.getLocalBounds().height;this._setHeight(t,n)}getSize(t){t||(t={});const n=this.getLocalBounds();return t.width=Math.abs(this.scale.x*n.width),t.height=Math.abs(this.scale.y*n.height),t}setSize(t,n){const s=this.getLocalBounds();typeof t=="object"?(n=t.height??t.width,t=t.width):n??(n=t),t!==void 0&&this._setWidth(t,s.width),n!==void 0&&this._setHeight(n,s.height)}_updateSkew(){const t=this._rotation,n=this._skew;this._cx=Math.cos(t+n._y),this._sx=Math.sin(t+n._y),this._cy=-Math.sin(t-n._x),this._sy=Math.cos(t-n._x)}updateTransform(t){return this.position.set(typeof t.x=="number"?t.x:this.position.x,typeof t.y=="number"?t.y:this.position.y),this.scale.set(typeof t.scaleX=="number"?t.scaleX||1:this.scale.x,typeof t.scaleY=="number"?t.scaleY||1:this.scale.y),this.rotation=typeof t.rotation=="number"?t.rotation:this.rotation,this.skew.set(typeof t.skewX=="number"?t.skewX:this.skew.x,typeof t.skewY=="number"?t.skewY:this.skew.y),this.pivot.set(typeof t.pivotX=="number"?t.pivotX:this.pivot.x,typeof t.pivotY=="number"?t.pivotY:this.pivot.y),this.origin.set(typeof t.originX=="number"?t.originX:this.origin.x,typeof t.originY=="number"?t.originY:this.origin.y),this}setFromMatrix(t){t.decompose(this)}updateLocalTransform(){const t=this._didContainerChangeTick;if(this._didLocalTransformChangeId===t)return;this._didLocalTransformChangeId=t;const n=this.localTransform,s=this._scale,o=this._pivot,f=this._origin,d=this._position,m=s._x,g=s._y,v=o._x,S=o._y,b=-f._x,A=-f._y;n.a=this._cx*m,n.b=this._sx*m,n.c=this._cy*g,n.d=this._sy*g,n.tx=d._x-(v*n.a+S*n.c)+(b*n.a+A*n.c)-b,n.ty=d._y-(v*n.b+S*n.d)+(b*n.b+A*n.d)-A}set alpha(t){t!==this.localAlpha&&(this.localAlpha=t,this._updateFlags|=zv,this._onUpdate())}get alpha(){return this.localAlpha}set tint(t){const s=Sn.shared.setValue(t??16777215).toBgrNumber();s!==this.localColor&&(this.localColor=s,this._updateFlags|=zv,this._onUpdate())}get tint(){return km(this.localColor)}set blendMode(t){this.localBlendMode!==t&&(this.parentRenderGroup&&(this.parentRenderGroup.structureDidChange=!0),this._updateFlags|=WT,this.localBlendMode=t,this._onUpdate())}get blendMode(){return this.localBlendMode}get visible(){return!!(this.localDisplayStatus&2)}set visible(t){const n=t?2:0;(this.localDisplayStatus&2)!==n&&(this.parentRenderGroup&&(this.parentRenderGroup.structureDidChange=!0),this._updateFlags|=vy,this.localDisplayStatus^=2,this._onUpdate(),this.emit("visibleChanged",t))}get culled(){return!(this.localDisplayStatus&4)}set culled(t){const n=t?0:4;(this.localDisplayStatus&4)!==n&&(this.parentRenderGroup&&(this.parentRenderGroup.structureDidChange=!0),this._updateFlags|=vy,this.localDisplayStatus^=4,this._onUpdate())}get renderable(){return!!(this.localDisplayStatus&1)}set renderable(t){const n=t?1:0;(this.localDisplayStatus&1)!==n&&(this._updateFlags|=vy,this.localDisplayStatus^=1,this.parentRenderGroup&&(this.parentRenderGroup.structureDidChange=!0),this._onUpdate())}get isRenderable(){return this.localDisplayStatus===7&&this.groupAlpha>0}destroy(t=!1){var o;if(this.destroyed)return;this.destroyed=!0;let n;if(this.children.length&&(n=this.removeChildren(0,this.children.length)),this.removeFromParent(),this.parent=null,this._maskEffect=null,this._filterEffect=null,this.effects=null,this._position=null,this._scale=null,this._pivot=null,this._origin=null,this._skew=null,this.emit("destroyed",this),this.removeAllListeners(),(typeof t=="boolean"?t:t==null?void 0:t.children)&&n)for(let f=0;f<n.length;++f)n[f].destroy(t);(o=this.renderGroup)==null||o.destroy(),this.renderGroup=null}}ke.mixin(ua,NT,jT,ZT,XT,LT,wT,HT,VT,MT,DT,qT,UT);class Rg extends ua{constructor(t){super(t),this.canBundle=!0,this.allowChildren=!1,this._roundPixels=0,this._lastUsed=-1,this._gpuData=Object.create(null),this.autoGarbageCollect=!0,this._gcLastUsed=-1,this._bounds=new Bi(0,1,0,0),this._boundsDirty=!0,this.autoGarbageCollect=t.autoGarbageCollect??!0}get bounds(){return this._boundsDirty?(this.updateBounds(),this._boundsDirty=!1,this._bounds):this._bounds}get roundPixels(){return!!this._roundPixels}set roundPixels(t){this._roundPixels=t?1:0}containsPoint(t){const n=this.bounds,{x:s,y:o}=t;return s>=n.minX&&s<=n.maxX&&o>=n.minY&&o<=n.maxY}onViewUpdate(){if(this._didViewChangeTick++,this._boundsDirty=!0,this.didViewUpdate)return;this.didViewUpdate=!0;const t=this.renderGroup||this.parentRenderGroup;t&&t.onChildViewUpdate(this)}unload(){var t;this.emit("unload",this);for(const n in this._gpuData)(t=this._gpuData[n])==null||t.destroy();this._gpuData=Object.create(null),this.onViewUpdate()}destroy(t){this.unload(),super.destroy(t),this._bounds=null}collectRenderablesSimple(t,n,s){const{renderPipes:o}=n;o.blendMode.pushBlendMode(this,this.groupBlendMode,t);const d=o[this.renderPipeId];d!=null&&d.addRenderable&&d.addRenderable(this,t),this.didViewUpdate=!1;const m=this.children,g=m.length;for(let v=0;v<g;v++)m[v].collectRenderables(t,n,s);o.blendMode.popBlendMode(t)}}class Rc extends Rg{constructor(t=Ee.EMPTY){t instanceof Ee&&(t={texture:t});const{texture:n=Ee.EMPTY,anchor:s,roundPixels:o,width:f,height:d,...m}=t;super({label:"Sprite",...m}),this.renderPipeId="sprite",this.batched=!0,this._visualBounds={minX:0,maxX:1,minY:0,maxY:0},this._anchor=new Vn({_onUpdate:()=>{this.onViewUpdate()}}),s?this.anchor=s:n.defaultAnchor&&(this.anchor=n.defaultAnchor),this.texture=n,this.allowChildren=!1,this.roundPixels=o??!1,f!==void 0&&(this.width=f),d!==void 0&&(this.height=d)}static from(t,n=!1){return t instanceof Ee?new Rc(t):new Rc(Ee.from(t,n))}set texture(t){t||(t=Ee.EMPTY);const n=this._texture;n!==t&&(n&&n.dynamic&&n.off("update",this.onViewUpdate,this),t.dynamic&&t.on("update",this.onViewUpdate,this),this._texture=t,this._width&&this._setWidth(this._width,this._texture.orig.width),this._height&&this._setHeight(this._height,this._texture.orig.height),this.onViewUpdate())}get texture(){return this._texture}get visualBounds(){return yx(this._visualBounds,this._anchor,this._texture),this._visualBounds}get sourceBounds(){return ce("8.6.1","Sprite.sourceBounds is deprecated, use visualBounds instead."),this.visualBounds}updateBounds(){const t=this._anchor,n=this._texture,s=this._bounds,{width:o,height:f}=n.orig;s.minX=-t._x*o,s.maxX=s.minX+o,s.minY=-t._y*f,s.maxY=s.minY+f}destroy(t=!1){if(super.destroy(t),typeof t=="boolean"?t:t==null?void 0:t.texture){const s=typeof t=="boolean"?t:t==null?void 0:t.textureSource;this._texture.destroy(s)}this._texture=null,this._visualBounds=null,this._bounds=null,this._anchor=null}get anchor(){return this._anchor}set anchor(t){typeof t=="number"?this._anchor.set(t):this._anchor.copyFrom(t)}get width(){return Math.abs(this.scale.x)*this._texture.orig.width}set width(t){this._setWidth(t,this._texture.orig.width),this._width=t}get height(){return Math.abs(this.scale.y)*this._texture.orig.height}set height(t){this._setHeight(t,this._texture.orig.height),this._height=t}getSize(t){return t||(t={}),t.width=Math.abs(this.scale.x)*this._texture.orig.width,t.height=Math.abs(this.scale.y)*this._texture.orig.height,t}setSize(t,n){typeof t=="object"?(n=t.height??t.width,t=t.width):n??(n=t),t!==void 0&&this._setWidth(t,this._texture.orig.width),n!==void 0&&this._setHeight(n,this._texture.orig.height)}}const FT=new Bi;function Ax(i,t,n){const s=FT;i.measurable=!0,_x(i,n,s),t.addBoundsMask(s),i.measurable=!1}function Mx(i,t,n){const s=js.get();i.measurable=!0;const o=za.get().identity(),f=Rx(i,n,o);Tx(i,s,f),i.measurable=!1,t.addBoundsMask(s),za.return(o),js.return(s)}function Rx(i,t,n){return i?(i!==t&&(Rx(i.parent,t,n),i.updateLocalTransform(),n.append(i.localTransform)),n):(Da("Mask bounds, renderable is not inside the root container"),n)}class zx{constructor(t){this.priority=0,this.inverse=!1,this.pipe="alphaMask",t!=null&&t.mask&&this.init(t.mask)}init(t){this.mask=t,this.renderMaskToTexture=!(t instanceof Rc),this.mask.renderable=this.renderMaskToTexture,this.mask.includeInBuild=!this.renderMaskToTexture,this.mask.measurable=!1}reset(){this.mask!==null&&(this.mask.measurable=!0,this.mask=null)}addBounds(t,n){this.inverse||Ax(this.mask,t,n)}addLocalBounds(t,n){Mx(this.mask,t,n)}containsPoint(t,n){const s=this.mask;return n(s,t)}destroy(){this.reset()}static test(t){return t instanceof Rc}}zx.extension=kt.MaskEffect;class Dx{constructor(t){this.priority=0,this.pipe="colorMask",t!=null&&t.mask&&this.init(t.mask)}init(t){this.mask=t}destroy(){}static test(t){return typeof t=="number"}}Dx.extension=kt.MaskEffect;class Ox{constructor(t){this.priority=0,this.pipe="stencilMask",t!=null&&t.mask&&this.init(t.mask)}init(t){this.mask=t,this.mask.includeInBuild=!1,this.mask.measurable=!1}reset(){this.mask!==null&&(this.mask.measurable=!0,this.mask.includeInBuild=!0,this.mask=null)}addBounds(t,n){Ax(this.mask,t,n)}addLocalBounds(t,n){Mx(this.mask,t,n)}containsPoint(t,n){const s=this.mask;return n(s,t)}destroy(){this.reset()}static test(t){return t instanceof ua}}Ox.extension=kt.MaskEffect;const IT={createCanvas:(i,t)=>{const n=document.createElement("canvas");return n.width=i,n.height=t,n},createImage:()=>new Image,getCanvasRenderingContext2D:()=>CanvasRenderingContext2D,getWebGLRenderingContext:()=>WebGLRenderingContext,getNavigator:()=>navigator,getBaseUrl:()=>document.baseURI??window.location.href,getFontFaceSet:()=>document.fonts,fetch:(i,t)=>fetch(i,t),parseXML:i=>new DOMParser().parseFromString(i,"text/xml")};let Dv=IT;const si={get(){return Dv},set(i){Dv=i}};class Nx extends wi{constructor(t){t.resource||(t.resource=si.get().createCanvas()),t.width||(t.width=t.resource.width,t.autoDensity||(t.width/=t.resolution)),t.height||(t.height=t.resource.height,t.autoDensity||(t.height/=t.resolution)),super(t),this.uploadMethodId="image",this.autoDensity=t.autoDensity,this.resizeCanvas(),this.transparent=!!t.transparent}resizeCanvas(){this.autoDensity&&"style"in this.resource&&(this.resource.style.width=`${this.width}px`,this.resource.style.height=`${this.height}px`),(this.resource.width!==this.pixelWidth||this.resource.height!==this.pixelHeight)&&(this.resource.width=this.pixelWidth,this.resource.height=this.pixelHeight)}resize(t=this.width,n=this.height,s=this._resolution){const o=super.resize(t,n,s);return o&&this.resizeCanvas(),o}static test(t){return globalThis.HTMLCanvasElement&&t instanceof HTMLCanvasElement||globalThis.OffscreenCanvas&&t instanceof OffscreenCanvas}get context2D(){return this._context2D||(this._context2D=this.resource.getContext("2d"))}}Nx.extension=kt.TextureSource;class Fm extends wi{constructor(t){super(t),this.uploadMethodId="image",this.autoGarbageCollect=!0}static test(t){return globalThis.HTMLImageElement&&t instanceof HTMLImageElement||typeof ImageBitmap<"u"&&t instanceof ImageBitmap||globalThis.VideoFrame&&t instanceof VideoFrame}}Fm.extension=kt.TextureSource;var Im=(i=>(i[i.INTERACTION=50]="INTERACTION",i[i.HIGH=25]="HIGH",i[i.NORMAL=0]="NORMAL",i[i.LOW=-25]="LOW",i[i.UTILITY=-50]="UTILITY",i))(Im||{});class xy{constructor(t,n=null,s=0,o=!1){this.next=null,this.previous=null,this._destroyed=!1,this._fn=t,this._context=n,this.priority=s,this._once=o}match(t,n=null){return this._fn===t&&this._context===n}emit(t){this._fn&&(this._context?this._fn.call(this._context,t):this._fn(t));const n=this.next;return this._once&&this.destroy(!0),this._destroyed&&(this.next=null),n}connect(t){this.previous=t,t.next&&(t.next.previous=this),this.next=t.next,t.next=this}destroy(t=!1){this._destroyed=!0,this._fn=null,this._context=null,this.previous&&(this.previous.next=this.next),this.next&&(this.next.previous=this.previous);const n=this.next;return this.next=t?null:n,this.previous=null,n}}const Ux=class li{constructor(){this.autoStart=!1,this.deltaTime=1,this.lastTime=-1,this.speed=1,this.started=!1,this._requestId=null,this._maxElapsedMS=100,this._minElapsedMS=0,this._protected=!1,this._lastFrame=-1,this._head=new xy(null,null,1/0),this.deltaMS=1/li.targetFPMS,this.elapsedMS=1/li.targetFPMS,this._tick=t=>{this._requestId=null,this.started&&(this.update(t),this.started&&this._requestId===null&&this._head.next&&(this._requestId=requestAnimationFrame(this._tick)))}}_requestIfNeeded(){this._requestId===null&&this._head.next&&(this.lastTime=performance.now(),this._lastFrame=this.lastTime,this._requestId=requestAnimationFrame(this._tick))}_cancelIfNeeded(){this._requestId!==null&&(cancelAnimationFrame(this._requestId),this._requestId=null)}_startIfPossible(){this.started?this._requestIfNeeded():this.autoStart&&this.start()}add(t,n,s=Im.NORMAL){return this._addListener(new xy(t,n,s))}addOnce(t,n,s=Im.NORMAL){return this._addListener(new xy(t,n,s,!0))}_addListener(t){let n=this._head.next,s=this._head;if(!n)t.connect(s);else{for(;n;){if(t.priority>n.priority){t.connect(s);break}s=n,n=n.next}t.previous||t.connect(s)}return this._startIfPossible(),this}remove(t,n){let s=this._head.next;for(;s;)s.match(t,n)?s=s.destroy():s=s.next;return this._head.next||this._cancelIfNeeded(),this}get count(){if(!this._head)return 0;let t=0,n=this._head;for(;n=n.next;)t++;return t}start(){this.started||(this.started=!0,this._requestIfNeeded())}stop(){this.started&&(this.started=!1,this._cancelIfNeeded())}destroy(){if(!this._protected){this.stop();let t=this._head.next;for(;t;)t=t.destroy(!0);this._head.destroy(),this._head=null}}update(t=performance.now()){let n;if(t>this.lastTime){if(n=this.elapsedMS=t-this.lastTime,n>this._maxElapsedMS&&(n=this._maxElapsedMS),n*=this.speed,this._minElapsedMS){const f=t-this._lastFrame|0;if(f<this._minElapsedMS)return;this._lastFrame=t-f%this._minElapsedMS}this.deltaMS=n,this.deltaTime=this.deltaMS*li.targetFPMS;const s=this._head;let o=s.next;for(;o;)o=o.emit(this);s.next||this._cancelIfNeeded()}else this.deltaTime=this.deltaMS=this.elapsedMS=0;this.lastTime=t}get FPS(){return 1e3/this.elapsedMS}get minFPS(){return 1e3/this._maxElapsedMS}set minFPS(t){const n=Math.min(Math.max(0,t)/1e3,li.targetFPMS);this._maxElapsedMS=1/n,this._minElapsedMS&&t>this.maxFPS&&(this.maxFPS=t)}get maxFPS(){return this._minElapsedMS?Math.round(1e3/this._minElapsedMS):0}set maxFPS(t){t===0?this._minElapsedMS=0:(t<this.minFPS&&(this.minFPS=t),this._minElapsedMS=1/(t/1e3))}static get shared(){if(!li._shared){const t=li._shared=new li;t.autoStart=!0,t._protected=!0}return li._shared}static get system(){if(!li._system){const t=li._system=new li;t.autoStart=!0,t._protected=!0}return li._system}};Ux.targetFPMS=.06;let bc=Ux,_y;async function $T(){return _y??(_y=(async()=>{var d;const t=si.get().createCanvas(1,1).getContext("webgl");if(!t)return"premultiply-alpha-on-upload";const n=await new Promise(m=>{const g=document.createElement("video");g.onloadeddata=()=>m(g),g.onerror=()=>m(null),g.autoplay=!1,g.crossOrigin="anonymous",g.preload="auto",g.src="data:video/webm;base64,GkXfo59ChoEBQveBAULygQRC84EIQoKEd2VibUKHgQJChYECGFOAZwEAAAAAAAHTEU2bdLpNu4tTq4QVSalmU6yBoU27i1OrhBZUrmtTrIHGTbuMU6uEElTDZ1OsggEXTbuMU6uEHFO7a1OsggG97AEAAAAAAABZAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAVSalmoCrXsYMPQkBNgIRMYXZmV0GETGF2ZkSJiEBEAAAAAAAAFlSua8yuAQAAAAAAAEPXgQFzxYgAAAAAAAAAAZyBACK1nIN1bmSIgQCGhVZfVlA5g4EBI+ODhAJiWgDglLCBArqBApqBAlPAgQFVsIRVuYEBElTDZ9Vzc9JjwItjxYgAAAAAAAAAAWfInEWjh0VOQ09ERVJEh49MYXZjIGxpYnZweC12cDlnyKJFo4hEVVJBVElPTkSHlDAwOjAwOjAwLjA0MDAwMDAwMAAAH0O2dcfngQCgwqGggQAAAIJJg0IAABAAFgA4JBwYSgAAICAAEb///4r+AAB1oZ2mm+6BAaWWgkmDQgAAEAAWADgkHBhKAAAgIABIQBxTu2uRu4+zgQC3iveBAfGCAXHwgQM=",g.load()});if(!n)return"premultiply-alpha-on-upload";const s=t.createTexture();t.bindTexture(t.TEXTURE_2D,s);const o=t.createFramebuffer();t.bindFramebuffer(t.FRAMEBUFFER,o),t.framebufferTexture2D(t.FRAMEBUFFER,t.COLOR_ATTACHMENT0,t.TEXTURE_2D,s,0),t.pixelStorei(t.UNPACK_PREMULTIPLY_ALPHA_WEBGL,!1),t.pixelStorei(t.UNPACK_COLORSPACE_CONVERSION_WEBGL,t.NONE),t.texImage2D(t.TEXTURE_2D,0,t.RGBA,t.RGBA,t.UNSIGNED_BYTE,n);const f=new Uint8Array(4);return t.readPixels(0,0,1,1,t.RGBA,t.UNSIGNED_BYTE,f),t.deleteFramebuffer(o),t.deleteTexture(s),(d=t.getExtension("WEBGL_lose_context"))==null||d.loseContext(),f[0]<=f[3]?"premultiplied-alpha":"premultiply-alpha-on-upload"})()),_y}const hp=class Bx extends wi{constructor(t){super(t),this.isReady=!1,this.uploadMethodId="video",t={...Bx.defaultOptions,...t},this._autoUpdate=!0,this._isConnectedToTicker=!1,this._updateFPS=t.updateFPS||0,this._msToNextUpdate=0,this.autoPlay=t.autoPlay!==!1,this.alphaMode=t.alphaMode??"premultiply-alpha-on-upload",this._videoFrameRequestCallback=this._videoFrameRequestCallback.bind(this),this._videoFrameRequestCallbackHandle=null,this._load=null,this._resolve=null,this._reject=null,this._onCanPlay=this._onCanPlay.bind(this),this._onCanPlayThrough=this._onCanPlayThrough.bind(this),this._onError=this._onError.bind(this),this._onPlayStart=this._onPlayStart.bind(this),this._onPlayStop=this._onPlayStop.bind(this),this._onSeeked=this._onSeeked.bind(this),t.autoLoad!==!1&&this.load()}updateFrame(){if(!this.destroyed){if(this._updateFPS){const t=bc.shared.elapsedMS*this.resource.playbackRate;this._msToNextUpdate=Math.floor(this._msToNextUpdate-t)}(!this._updateFPS||this._msToNextUpdate<=0)&&(this._msToNextUpdate=this._updateFPS?Math.floor(1e3/this._updateFPS):0),this.isValid&&this.update()}}_videoFrameRequestCallback(){this.updateFrame(),this.destroyed?this._videoFrameRequestCallbackHandle=null:this._videoFrameRequestCallbackHandle=this.resource.requestVideoFrameCallback(this._videoFrameRequestCallback)}get isValid(){return!!this.resource.videoWidth&&!!this.resource.videoHeight}async load(){if(this._load)return this._load;const t=this.resource,n=this.options;return(t.readyState===t.HAVE_ENOUGH_DATA||t.readyState===t.HAVE_FUTURE_DATA)&&t.width&&t.height&&(t.complete=!0),t.addEventListener("play",this._onPlayStart),t.addEventListener("pause",this._onPlayStop),t.addEventListener("seeked",this._onSeeked),this._isSourceReady()?this._mediaReady():(n.preload||t.addEventListener("canplay",this._onCanPlay),t.addEventListener("canplaythrough",this._onCanPlayThrough),t.addEventListener("error",this._onError,!0)),this.alphaMode=await $T(),this._load=new Promise((s,o)=>{this.isValid?s(this):(this._resolve=s,this._reject=o,n.preloadTimeoutMs!==void 0&&(this._preloadTimeout=setTimeout(()=>{this._onError(new ErrorEvent(`Preload exceeded timeout of ${n.preloadTimeoutMs}ms`))})),t.load())}),this._load}_onError(t){this.resource.removeEventListener("error",this._onError,!0),this.emit("error",t),this._reject&&(this._reject(t),this._reject=null,this._resolve=null)}_isSourcePlaying(){const t=this.resource;return!t.paused&&!t.ended}_isSourceReady(){return this.resource.readyState>2}_onPlayStart(){this.isValid||this._mediaReady(),this._configureAutoUpdate()}_onPlayStop(){this._configureAutoUpdate()}_onSeeked(){this._autoUpdate&&!this._isSourcePlaying()&&(this._msToNextUpdate=0,this.updateFrame(),this._msToNextUpdate=0)}_onCanPlay(){this.resource.removeEventListener("canplay",this._onCanPlay),this._mediaReady()}_onCanPlayThrough(){this.resource.removeEventListener("canplaythrough",this._onCanPlay),this._preloadTimeout&&(clearTimeout(this._preloadTimeout),this._preloadTimeout=void 0),this._mediaReady()}_mediaReady(){const t=this.resource;this.isValid&&(this.isReady=!0,this.resize(t.videoWidth,t.videoHeight)),this._msToNextUpdate=0,this.updateFrame(),this._msToNextUpdate=0,this._resolve&&(this._resolve(this),this._resolve=null,this._reject=null),this._isSourcePlaying()?this._onPlayStart():this.autoPlay&&this.resource.play()}destroy(){this._configureAutoUpdate();const t=this.resource;t&&(t.removeEventListener("play",this._onPlayStart),t.removeEventListener("pause",this._onPlayStop),t.removeEventListener("seeked",this._onSeeked),t.removeEventListener("canplay",this._onCanPlay),t.removeEventListener("canplaythrough",this._onCanPlayThrough),t.removeEventListener("error",this._onError,!0),t.pause(),t.src="",t.load()),super.destroy()}get autoUpdate(){return this._autoUpdate}set autoUpdate(t){t!==this._autoUpdate&&(this._autoUpdate=t,this._configureAutoUpdate())}get updateFPS(){return this._updateFPS}set updateFPS(t){t!==this._updateFPS&&(this._updateFPS=t,this._configureAutoUpdate())}_configureAutoUpdate(){this._autoUpdate&&this._isSourcePlaying()?!this._updateFPS&&this.resource.requestVideoFrameCallback?(this._isConnectedToTicker&&(bc.shared.remove(this.updateFrame,this),this._isConnectedToTicker=!1,this._msToNextUpdate=0),this._videoFrameRequestCallbackHandle===null&&(this._videoFrameRequestCallbackHandle=this.resource.requestVideoFrameCallback(this._videoFrameRequestCallback))):(this._videoFrameRequestCallbackHandle!==null&&(this.resource.cancelVideoFrameCallback(this._videoFrameRequestCallbackHandle),this._videoFrameRequestCallbackHandle=null),this._isConnectedToTicker||(bc.shared.add(this.updateFrame,this),this._isConnectedToTicker=!0,this._msToNextUpdate=0)):(this._videoFrameRequestCallbackHandle!==null&&(this.resource.cancelVideoFrameCallback(this._videoFrameRequestCallbackHandle),this._videoFrameRequestCallbackHandle=null),this._isConnectedToTicker&&(bc.shared.remove(this.updateFrame,this),this._isConnectedToTicker=!1,this._msToNextUpdate=0))}static test(t){return globalThis.HTMLVideoElement&&t instanceof HTMLVideoElement}};hp.extension=kt.TextureSource;hp.defaultOptions={...wi.defaultOptions,autoLoad:!0,autoPlay:!0,updateFPS:0,crossorigin:!0,loop:!1,muted:!0,playsinline:!0,preload:!1};hp.MIME_TYPES={ogv:"video/ogg",mov:"video/quicktime",m4v:"video/mp4"};let tE=hp;const vc=(i,t,n=!1)=>(Array.isArray(i)||(i=[i]),t?i.map(s=>typeof s=="string"||n?t(s):s):i);class eE{constructor(){this._parsers=[],this._cache=new Map,this._cacheMap=new Map}reset(){this._cacheMap.clear(),this._cache.clear()}has(t){return this._cache.has(t)}get(t){const n=this._cache.get(t);return n||Da(`[Assets] Asset id ${t} was not found in the Cache`),n}set(t,n){const s=vc(t);let o;for(let g=0;g<this.parsers.length;g++){const v=this.parsers[g];if(v.test(n)){o=v.getCacheableAssets(s,n);break}}const f=new Map(Object.entries(o||{}));o||s.forEach(g=>{f.set(g,n)});const d=[...f.keys()],m={cacheKeys:d,keys:s};s.forEach(g=>{this._cacheMap.set(g,m)}),d.forEach(g=>{const v=o?o[g]:n;this._cache.has(g)&&this._cache.get(g)!==v&&Da("[Cache] already has key:",g),this._cache.set(g,f.get(g))})}remove(t){if(!this._cacheMap.has(t)){Da(`[Assets] Asset id ${t} was not found in the Cache`);return}const n=this._cacheMap.get(t);n.cacheKeys.forEach(o=>{this._cache.delete(o)}),n.keys.forEach(o=>{this._cacheMap.delete(o)})}get parsers(){return this._parsers}}const xc=new eE,$y=[];ke.handleByList(kt.TextureSource,$y);function wx(i={}){const t=i&&i.resource,n=t?i.resource:i,s=t?i:{resource:i};for(let o=0;o<$y.length;o++){const f=$y[o];if(f.test(n))return new f(s)}throw new Error(`Could not find a source type for resource: ${s.resource}`)}function nE(i={},t=!1){const n=i&&i.resource,s=n?i.resource:i,o=n?i:{resource:i};if(!t&&xc.has(s))return xc.get(s);const f=new Ee({source:wx(o)});return f.on("destroy",()=>{xc.has(s)&&xc.remove(s)}),t||xc.set(s,f),f}function aE(i,t=!1){return typeof i=="string"?xc.get(i):i instanceof wi?new Ee({source:i}):nE(i,t)}Ee.from=aE;wi.from=wx;ke.add(zx,Dx,Ox,tE,Fm,Nx,Cg);var Hx=(i=>(i[i.Low=0]="Low",i[i.Normal=1]="Normal",i[i.High=2]="High",i))(Hx||{});function rl(i){if(typeof i!="string")throw new TypeError(`Path must be a string. Received ${JSON.stringify(i)}`)}function yh(i){return i.split("?")[0].split("#")[0]}function iE(i){return i.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function lE(i,t,n){return i.replace(new RegExp(iE(t),"g"),n)}function sE(i,t){let n="",s=0,o=-1,f=0,d=-1;for(let m=0;m<=i.length;++m){if(m<i.length)d=i.charCodeAt(m);else{if(d===47)break;d=47}if(d===47){if(!(o===m-1||f===1))if(o!==m-1&&f===2){if(n.length<2||s!==2||n.charCodeAt(n.length-1)!==46||n.charCodeAt(n.length-2)!==46){if(n.length>2){const g=n.lastIndexOf("/");if(g!==n.length-1){g===-1?(n="",s=0):(n=n.slice(0,g),s=n.length-1-n.lastIndexOf("/")),o=m,f=0;continue}}else if(n.length===2||n.length===1){n="",s=0,o=m,f=0;continue}}}else n.length>0?n+=`/${i.slice(o+1,m)}`:n=i.slice(o+1,m),s=m-o-1;o=m,f=0}else d===46&&f!==-1?++f:f=-1}return n}const Hh={toPosix(i){return lE(i,"\\","/")},isUrl(i){return/^https?:/.test(this.toPosix(i))},isDataUrl(i){return/^data:([a-z]+\/[a-z0-9-+.]+(;[a-z0-9-.!#$%*+.{}|~`]+=[a-z0-9-.!#$%*+.{}()_|~`]+)*)?(;base64)?,([a-z0-9!$&',()*+;=\-._~:@\/?%\s<>]*?)$/i.test(i)},isBlobUrl(i){return i.startsWith("blob:")},hasProtocol(i){return/^[^/:]+:/.test(this.toPosix(i))},getProtocol(i){rl(i),i=this.toPosix(i);const t=/^file:\/\/\//.exec(i);if(t)return t[0];const n=/^[^/:]+:\/{0,2}/.exec(i);return n?n[0]:""},toAbsolute(i,t,n){if(rl(i),this.isDataUrl(i)||this.isBlobUrl(i))return i;const s=yh(this.toPosix(t??si.get().getBaseUrl())),o=yh(this.toPosix(n??this.rootname(s)));return i=this.toPosix(i),i.startsWith("/")?Hh.join(o,i.slice(1)):this.isAbsolute(i)?i:this.join(s,i)},normalize(i){if(rl(i),i.length===0)return".";if(this.isDataUrl(i)||this.isBlobUrl(i))return i;i=this.toPosix(i);let t="";const n=i.startsWith("/");this.hasProtocol(i)&&(t=this.rootname(i),i=i.slice(t.length));const s=i.endsWith("/");return i=sE(i),i.length>0&&s&&(i+="/"),n?`/${i}`:t+i},isAbsolute(i){return rl(i),i=this.toPosix(i),this.hasProtocol(i)?!0:i.startsWith("/")},join(...i){if(i.length===0)return".";let t;for(let n=0;n<i.length;++n){const s=i[n];if(rl(s),s.length>0)if(t===void 0)t=s;else{const o=i[n-1]??"";this.joinExtensions.includes(this.extname(o).toLowerCase())?t+=`/../${s}`:t+=`/${s}`}}return t===void 0?".":this.normalize(t)},dirname(i){if(rl(i),i.length===0)return".";i=this.toPosix(i);let t=i.charCodeAt(0);const n=t===47;let s=-1,o=!0;const f=this.getProtocol(i),d=i;i=i.slice(f.length);for(let m=i.length-1;m>=1;--m)if(t=i.charCodeAt(m),t===47){if(!o){s=m;break}}else o=!1;return s===-1?n?"/":this.isUrl(d)?f+i:f:n&&s===1?"//":f+i.slice(0,s)},rootname(i){rl(i),i=this.toPosix(i);let t="";if(i.startsWith("/")?t="/":t=this.getProtocol(i),this.isUrl(i)){const n=i.indexOf("/",t.length);n!==-1?t=i.slice(0,n):t=i,t.endsWith("/")||(t+="/")}return t},basename(i,t){rl(i),t&&rl(t),i=yh(this.toPosix(i));let n=0,s=-1,o=!0,f;if(t!==void 0&&t.length>0&&t.length<=i.length){if(t.length===i.length&&t===i)return"";let d=t.length-1,m=-1;for(f=i.length-1;f>=0;--f){const g=i.charCodeAt(f);if(g===47){if(!o){n=f+1;break}}else m===-1&&(o=!1,m=f+1),d>=0&&(g===t.charCodeAt(d)?--d===-1&&(s=f):(d=-1,s=m))}return n===s?s=m:s===-1&&(s=i.length),i.slice(n,s)}for(f=i.length-1;f>=0;--f)if(i.charCodeAt(f)===47){if(!o){n=f+1;break}}else s===-1&&(o=!1,s=f+1);return s===-1?"":i.slice(n,s)},extname(i){rl(i),i=yh(this.toPosix(i));let t=-1,n=0,s=-1,o=!0,f=0;for(let d=i.length-1;d>=0;--d){const m=i.charCodeAt(d);if(m===47){if(!o){n=d+1;break}continue}s===-1&&(o=!1,s=d+1),m===46?t===-1?t=d:f!==1&&(f=1):t!==-1&&(f=-1)}return t===-1||s===-1||f===0||f===1&&t===s-1&&t===n+1?"":i.slice(t,s)},parse(i){rl(i);const t={root:"",dir:"",base:"",ext:"",name:""};if(i.length===0)return t;i=yh(this.toPosix(i));let n=i.charCodeAt(0);const s=this.isAbsolute(i);let o;t.root=this.rootname(i),s||this.hasProtocol(i)?o=1:o=0;let f=-1,d=0,m=-1,g=!0,v=i.length-1,S=0;for(;v>=o;--v){if(n=i.charCodeAt(v),n===47){if(!g){d=v+1;break}continue}m===-1&&(g=!1,m=v+1),n===46?f===-1?f=v:S!==1&&(S=1):f!==-1&&(S=-1)}return f===-1||m===-1||S===0||S===1&&f===m-1&&f===d+1?m!==-1&&(d===0&&s?t.base=t.name=i.slice(1,m):t.base=t.name=i.slice(d,m)):(d===0&&s?(t.name=i.slice(1,f),t.base=i.slice(1,m)):(t.name=i.slice(d,f),t.base=i.slice(d,m)),t.ext=i.slice(f,m)),t.dir=this.dirname(i),t},sep:"/",delimiter:":",joinExtensions:[".html"]};function Gx(i,t,n,s,o){const f=t[n];for(let d=0;d<f.length;d++){const m=f[d];n<t.length-1?Gx(i.replace(s[n],m),t,n+1,s,o):o.push(i.replace(s[n],m))}}function uE(i){const t=/\{(.*?)\}/g,n=i.match(t),s=[];if(n){const o=[];n.forEach(f=>{const d=f.substring(1,f.length-1).split(",");o.push(d)}),Gx(i,o,0,n,s)}else s.push(i);return s}const Ov=i=>!Array.isArray(i);class jx{constructor(){this._defaultBundleIdentifierOptions={connector:"-",createBundleAssetId:(t,n)=>`${t}${this._bundleIdConnector}${n}`,extractAssetIdFromBundle:(t,n)=>n.replace(`${t}${this._bundleIdConnector}`,"")},this._bundleIdConnector=this._defaultBundleIdentifierOptions.connector,this._createBundleAssetId=this._defaultBundleIdentifierOptions.createBundleAssetId,this._extractAssetIdFromBundle=this._defaultBundleIdentifierOptions.extractAssetIdFromBundle,this._assetMap={},this._preferredOrder=[],this._parsers=[],this._resolverHash={},this._bundles={}}setBundleIdentifier(t){if(this._bundleIdConnector=t.connector??this._bundleIdConnector,this._createBundleAssetId=t.createBundleAssetId??this._createBundleAssetId,this._extractAssetIdFromBundle=t.extractAssetIdFromBundle??this._extractAssetIdFromBundle,this._extractAssetIdFromBundle("foo",this._createBundleAssetId("foo","bar"))!=="bar")throw new Error("[Resolver] GenerateBundleAssetId are not working correctly")}prefer(...t){t.forEach(n=>{this._preferredOrder.push(n),n.priority||(n.priority=Object.keys(n.params))}),this._resolverHash={}}set basePath(t){this._basePath=t}get basePath(){return this._basePath}set rootPath(t){this._rootPath=t}get rootPath(){return this._rootPath}get parsers(){return this._parsers}reset(){this.setBundleIdentifier(this._defaultBundleIdentifierOptions),this._assetMap={},this._preferredOrder=[],this._resolverHash={},this._rootPath=null,this._basePath=null,this._manifest=null,this._bundles={},this._defaultSearchParams=null}setDefaultSearchParams(t){if(typeof t=="string")this._defaultSearchParams=t;else{const n=t;this._defaultSearchParams=Object.keys(n).map(s=>`${encodeURIComponent(s)}=${encodeURIComponent(n[s])}`).join("&")}}getAlias(t){const{alias:n,src:s}=t;return vc(n||s,f=>typeof f=="string"?f:Array.isArray(f)?f.map(d=>(d==null?void 0:d.src)??d):f!=null&&f.src?f.src:f,!0)}removeAlias(t,n){this._assetMap[t]&&(n&&n!==this._resolverHash[t]||(delete this._resolverHash[t],delete this._assetMap[t]))}addManifest(t){this._manifest&&Da("[Resolver] Manifest already exists, this will be overwritten"),this._manifest=t,t.bundles.forEach(n=>{this.addBundle(n.name,n.assets)})}addBundle(t,n){const s=[];let o=n;Array.isArray(n)||(o=Object.entries(n).map(([f,d])=>typeof d=="string"||Array.isArray(d)?{alias:f,src:d}:{alias:f,...d})),o.forEach(f=>{const d=f.src,m=f.alias;let g;if(typeof m=="string"){const v=this._createBundleAssetId(t,m);s.push(v),g=[m,v]}else{const v=m.map(S=>this._createBundleAssetId(t,S));s.push(...v),g=[...m,...v]}this.add({...f,alias:g,src:d})}),this._bundles[t]=s}add(t){const n=[];Array.isArray(t)?n.push(...t):n.push(t);let s;s=f=>{this.hasKey(f)&&Da(`[Resolver] already has key: ${f} overwriting`)},vc(n).forEach(f=>{const{src:d}=f;let{data:m,format:g,loadParser:v,parser:S}=f;const b=vc(d).map(D=>typeof D=="string"?uE(D):Array.isArray(D)?D:[D]),A=this.getAlias(f);Array.isArray(A)?A.forEach(s):s(A);const E=[],R=D=>{const M=this._parsers.find(O=>O.test(D));return{src:D,...M==null?void 0:M.parse(D)}};b.forEach(D=>{D.forEach(M=>{let O={};if(typeof M!="object"?O=R(M):(m=M.data??m,g=M.format??g,(M.loadParser||M.parser)&&(v=M.loadParser??v,S=M.parser??S),O={...R(M.src),...M}),!A)throw new Error(`[Resolver] alias is undefined for this asset: ${O.src}`);O=this._buildResolvedAsset(O,{aliases:A,data:m,format:g,loadParser:v,parser:S,progressSize:f.progressSize}),E.push(O)})}),A.forEach(D=>{this._assetMap[D]=E})})}resolveBundle(t){const n=Ov(t);t=vc(t);const s={};return t.forEach(o=>{const f=this._bundles[o];if(f){const d=this.resolve(f),m={};for(const g in d){const v=d[g];m[this._extractAssetIdFromBundle(o,g)]=v}s[o]=m}}),n?s[t[0]]:s}resolveUrl(t){const n=this.resolve(t);if(typeof t!="string"){const s={};for(const o in n)s[o]=n[o].src;return s}return n.src}resolve(t){const n=Ov(t);t=vc(t);const s={};return t.forEach(o=>{if(!this._resolverHash[o])if(this._assetMap[o]){let f=this._assetMap[o];const d=this._getPreferredOrder(f);d==null||d.priority.forEach(m=>{d.params[m].forEach(g=>{const v=f.filter(S=>S[m]?S[m]===g:!1);v.length&&(f=v)})}),this._resolverHash[o]=f[0]}else this._resolverHash[o]=this._buildResolvedAsset({alias:[o],src:o},{});s[o]=this._resolverHash[o]}),n?s[t[0]]:s}hasKey(t){return!!this._assetMap[t]}hasBundle(t){return!!this._bundles[t]}_getPreferredOrder(t){for(let n=0;n<t.length;n++){const s=t[n],o=this._preferredOrder.find(f=>f.params.format.includes(s.format));if(o)return o}return this._preferredOrder[0]}_appendDefaultSearchParams(t){if(!this._defaultSearchParams)return t;const n=/\?/.test(t)?"&":"?";return`${t}${n}${this._defaultSearchParams}`}_buildResolvedAsset(t,n){const{aliases:s,data:o,loadParser:f,parser:d,format:m,progressSize:g}=n;return(this._basePath||this._rootPath)&&(t.src=Hh.toAbsolute(t.src,this._basePath,this._rootPath)),t.alias=s??t.alias??[t.src],t.src=this._appendDefaultSearchParams(t.src),t.data={...o||{},...t.data},t.loadParser=f??t.loadParser,t.parser=d??t.parser,t.format=m??t.format??rE(t.src),g!==void 0&&(t.progressSize=g),t}}jx.RETINA_PREFIX=/@([0-9\.]+)x/;function rE(i){return i.split(".").pop().split("?").shift().split("#").shift()}const Nv=(i,t)=>{const n=t.split("?")[1];return n&&(i+=`?${n}`),i},qx=class Ch{constructor(t,n){this.linkedSheets=[];let s=t;(t==null?void 0:t.source)instanceof wi&&(s={texture:t,data:n});const{texture:o,data:f,cachePrefix:d=""}=s;this.cachePrefix=d,this._texture=o instanceof Ee?o:null,this.textureSource=o.source,this.textures={},this.animations={},this.data=f;const m=parseFloat(f.meta.scale);m?(this.resolution=m,o.source.resolution=this.resolution):this.resolution=o.source._resolution,this._frames=this.data.frames,this._frameKeys=Object.keys(this._frames),this._batchIndex=0,this._callback=null}parse(){return new Promise(t=>{this._callback=t,this._batchIndex=0,this._frameKeys.length<=Ch.BATCH_SIZE?(this._processFrames(0),this._processAnimations(),this._parseComplete()):this._nextBatch()})}parseSync(){return this._processFrames(0,!0),this._processAnimations(),this.textures}_processFrames(t,n=!1){let s=t;const o=n?1/0:Ch.BATCH_SIZE;for(;s-t<o&&s<this._frameKeys.length;){const f=this._frameKeys[s],d=this._frames[f],m=d.frame;if(m){let g=null,v=null;const S=d.trimmed!==!1&&d.sourceSize?d.sourceSize:d.frame,b=new un(0,0,Math.floor(S.w)/this.resolution,Math.floor(S.h)/this.resolution);d.rotated?g=new un(Math.floor(m.x)/this.resolution,Math.floor(m.y)/this.resolution,Math.floor(m.h)/this.resolution,Math.floor(m.w)/this.resolution):g=new un(Math.floor(m.x)/this.resolution,Math.floor(m.y)/this.resolution,Math.floor(m.w)/this.resolution,Math.floor(m.h)/this.resolution),d.trimmed!==!1&&d.spriteSourceSize&&(v=new un(Math.floor(d.spriteSourceSize.x)/this.resolution,Math.floor(d.spriteSourceSize.y)/this.resolution,Math.floor(m.w)/this.resolution,Math.floor(m.h)/this.resolution)),this.textures[f]=new Ee({source:this.textureSource,frame:g,orig:b,trim:v,rotate:d.rotated?2:0,defaultAnchor:d.anchor,defaultBorders:d.borders,label:f.toString()})}s++}}_processAnimations(){const t=this.data.animations||{};for(const n in t){this.animations[n]=[];for(let s=0;s<t[n].length;s++){const o=t[n][s];this.animations[n].push(this.textures[o])}}}_parseComplete(){const t=this._callback;this._callback=null,this._batchIndex=0,t.call(this,this.textures)}_nextBatch(){this._processFrames(this._batchIndex*Ch.BATCH_SIZE),this._batchIndex++,setTimeout(()=>{this._batchIndex*Ch.BATCH_SIZE<this._frameKeys.length?this._nextBatch():(this._processAnimations(),this._parseComplete())},0)}destroy(t=!1){var n;for(const s in this.textures)this.textures[s].destroy();this._frames=null,this._frameKeys=null,this.data=null,this.textures=null,t&&((n=this._texture)==null||n.destroy(),this.textureSource.destroy()),this._texture=null,this.textureSource=null,this.linkedSheets=[]}};qx.BATCH_SIZE=1e3;let Uv=qx;const oE=["jpg","png","jpeg","avif","webp","basis","etc2","bc7","bc6h","bc5","bc4","bc3","bc2","bc1","eac","astc"];function Yx(i,t,n){const s={};if(i.forEach(o=>{s[o]=t}),Object.keys(t.textures).forEach(o=>{s[`${t.cachePrefix}${o}`]=t.textures[o]}),!n){const o=Hh.dirname(i[0]);t.linkedSheets.forEach((f,d)=>{const m=Yx([`${o}/${t.data.meta.related_multi_packs[d]}`],f,!0);Object.assign(s,m)})}return s}const cE={extension:kt.Asset,cache:{test:i=>i instanceof Uv,getCacheableAssets:(i,t)=>Yx(i,t,!1)},resolver:{extension:{type:kt.ResolveParser,name:"resolveSpritesheet"},test:i=>{const n=i.split("?")[0].split("."),s=n.pop(),o=n.pop();return s==="json"&&oE.includes(o)},parse:i=>{var n;const t=i.split(".");return{resolution:parseFloat(((n=jx.RETINA_PREFIX.exec(i))==null?void 0:n[1])??"1"),format:t[t.length-2],src:i}}},loader:{name:"spritesheetLoader",id:"spritesheet",extension:{type:kt.LoadParser,priority:Hx.Normal,name:"spritesheetLoader"},async testParse(i,t){return Hh.extname(t.src).toLowerCase()===".json"&&!!i.frames},async parse(i,t,n){var b,A;const{texture:s,imageFilename:o,textureOptions:f,cachePrefix:d}=(t==null?void 0:t.data)??{};let m=Hh.dirname(t.src);m&&m.lastIndexOf("/")!==m.length-1&&(m+="/");let g;if(s instanceof Ee)g=s;else{const E=Nv(m+(o??i.meta.image),t.src);g=(await n.load([{src:E,data:f}]))[E]}const v=new Uv({texture:g.source,data:i,cachePrefix:d});await v.parse();const S=(b=i==null?void 0:i.meta)==null?void 0:b.related_multi_packs;if(Array.isArray(S)){const E=[];for(const D of S){if(typeof D!="string")continue;let M=m+D;(A=t.data)!=null&&A.ignoreMultiPack||(M=Nv(M,t.src),E.push(n.load({src:M,data:{textureOptions:f,ignoreMultiPack:!0}})))}const R=await Promise.all(E);v.linkedSheets=R,R.forEach(D=>{D.linkedSheets=[v].concat(v.linkedSheets.filter(M=>M!==D))})}return v},async unload(i,t,n){await n.unload(i.textureSource._sourceOrigin),i.destroy(!1)}}};ke.add(cE);const Sy=Object.create(null),Bv=Object.create(null);function zg(i,t){let n=Bv[i];return n===void 0&&(Sy[t]===void 0&&(Sy[t]=1),Bv[i]=n=Sy[t]++),n}let pc;function Lx(){return(!pc||pc!=null&&pc.isContextLost())&&(pc=si.get().createCanvas().getContext("webgl",{})),pc}let Bm;function fE(){if(!Bm){Bm="mediump";const i=Lx();i&&i.getShaderPrecisionFormat&&(Bm=i.getShaderPrecisionFormat(i.FRAGMENT_SHADER,i.HIGH_FLOAT).precision?"highp":"mediump")}return Bm}function hE(i,t,n){return t?i:n?(i=i.replace("out vec4 finalColor;",""),`
65
+
66
+ #ifdef GL_ES // This checks if it is WebGL1
67
+ #define in varying
68
+ #define finalColor gl_FragColor
69
+ #define texture texture2D
70
+ #endif
71
+ ${i}
72
+ `):`
73
+
74
+ #ifdef GL_ES // This checks if it is WebGL1
75
+ #define in attribute
76
+ #define out varying
77
+ #endif
78
+ ${i}
79
+ `}function dE(i,t,n){const s=n?t.maxSupportedFragmentPrecision:t.maxSupportedVertexPrecision;if(i.substring(0,9)!=="precision"){let o=n?t.requestedFragmentPrecision:t.requestedVertexPrecision;return o==="highp"&&s!=="highp"&&(o="mediump"),`precision ${o} float;
80
+ ${i}`}else if(s!=="highp"&&i.substring(0,15)==="precision highp")return i.replace("precision highp","precision mediump");return i}function mE(i,t){return t?`#version 300 es
81
+ ${i}`:i}const pE={},yE={};function gE(i,{name:t="pixi-program"},n=!0){t=t.replace(/\s+/g,"-"),t+=n?"-fragment":"-vertex";const s=n?pE:yE;return s[t]?(s[t]++,t+=`-${s[t]}`):s[t]=1,i.indexOf("#define SHADER_NAME")!==-1?i:`${`#define SHADER_NAME ${t}`}
82
+ ${i}`}function vE(i,t){return t?i.replace("#version 300 es",""):i}const by={stripVersion:vE,ensurePrecision:dE,addProgramDefines:hE,setProgramName:gE,insertVersion:mE},gh=Object.create(null),Xx=class tg{constructor(t){t={...tg.defaultOptions,...t};const n=t.fragment.indexOf("#version 300 es")!==-1,s={stripVersion:n,ensurePrecision:{requestedFragmentPrecision:t.preferredFragmentPrecision,requestedVertexPrecision:t.preferredVertexPrecision,maxSupportedVertexPrecision:"highp",maxSupportedFragmentPrecision:fE()},setProgramName:{name:t.name},addProgramDefines:n,insertVersion:n};let o=t.fragment,f=t.vertex;Object.keys(by).forEach(d=>{const m=s[d];o=by[d](o,m,!0),f=by[d](f,m,!1)}),this.fragment=o,this.vertex=f,this.transformFeedbackVaryings=t.transformFeedbackVaryings,this._key=zg(`${this.vertex}:${this.fragment}`,"gl-program")}destroy(){this.fragment=null,this.vertex=null,this._attributeData=null,this._uniformData=null,this._uniformBlockData=null,this.transformFeedbackVaryings=null,gh[this._cacheKey]=null}static from(t){const n=`${t.vertex}:${t.fragment}`;return gh[n]||(gh[n]=new tg(t),gh[n]._cacheKey=n),gh[n]}};Xx.defaultOptions={preferredVertexPrecision:"highp",preferredFragmentPrecision:"mediump"};let Dg=Xx;const wv={uint8x2:{size:2,stride:2,normalised:!1},uint8x4:{size:4,stride:4,normalised:!1},sint8x2:{size:2,stride:2,normalised:!1},sint8x4:{size:4,stride:4,normalised:!1},unorm8x2:{size:2,stride:2,normalised:!0},unorm8x4:{size:4,stride:4,normalised:!0},snorm8x2:{size:2,stride:2,normalised:!0},snorm8x4:{size:4,stride:4,normalised:!0},uint16x2:{size:2,stride:4,normalised:!1},uint16x4:{size:4,stride:8,normalised:!1},sint16x2:{size:2,stride:4,normalised:!1},sint16x4:{size:4,stride:8,normalised:!1},unorm16x2:{size:2,stride:4,normalised:!0},unorm16x4:{size:4,stride:8,normalised:!0},snorm16x2:{size:2,stride:4,normalised:!0},snorm16x4:{size:4,stride:8,normalised:!0},float16x2:{size:2,stride:4,normalised:!1},float16x4:{size:4,stride:8,normalised:!1},float32:{size:1,stride:4,normalised:!1},float32x2:{size:2,stride:8,normalised:!1},float32x3:{size:3,stride:12,normalised:!1},float32x4:{size:4,stride:16,normalised:!1},uint32:{size:1,stride:4,normalised:!1},uint32x2:{size:2,stride:8,normalised:!1},uint32x3:{size:3,stride:12,normalised:!1},uint32x4:{size:4,stride:16,normalised:!1},sint32:{size:1,stride:4,normalised:!1},sint32x2:{size:2,stride:8,normalised:!1},sint32x3:{size:3,stride:12,normalised:!1},sint32x4:{size:4,stride:16,normalised:!1}};function xE(i){return wv[i]??wv.float32}const _E={f32:"float32","vec2<f32>":"float32x2","vec3<f32>":"float32x3","vec4<f32>":"float32x4",vec2f:"float32x2",vec3f:"float32x3",vec4f:"float32x4",i32:"sint32","vec2<i32>":"sint32x2","vec3<i32>":"sint32x3","vec4<i32>":"sint32x4",vec2i:"sint32x2",vec3i:"sint32x3",vec4i:"sint32x4",u32:"uint32","vec2<u32>":"uint32x2","vec3<u32>":"uint32x3","vec4<u32>":"uint32x4",vec2u:"uint32x2",vec3u:"uint32x3",vec4u:"uint32x4",bool:"uint32","vec2<bool>":"uint32x2","vec3<bool>":"uint32x3","vec4<bool>":"uint32x4"},Hv=/@location\((\d+)\)\s+([a-zA-Z0-9_]+)\s*:\s*([a-zA-Z0-9_<>]+)(?:,|\s|\)|$)/g;function Gv(i,t){let n;for(;(n=Hv.exec(i))!==null;){const s=_E[n[3]]??"float32";t[n[2]]={location:parseInt(n[1],10),format:s,stride:xE(s).stride,offset:0,instance:!1,start:0}}Hv.lastIndex=0}function SE(i){return i.replace(/\/\/.*$/gm,"").replace(/\/\*[\s\S]*?\*\//g,"")}function bE({source:i,entryPoint:t}){const n={},s=SE(i),o=s.indexOf(`fn ${t}(`);if(o===-1)return n;const f=s.indexOf("->",o);if(f===-1)return n;const d=s.substring(o,f);if(Gv(d,n),Object.keys(n).length===0){const m=d.match(/\(\s*\w+\s*:\s*(\w+)/);if(m){const g=m[1],v=new RegExp(`struct\\s+${g}\\s*\\{([^}]+)\\}`,"s"),S=s.match(v);S&&Gv(S[1],n)}}return n}function Ty(i){var b,A;const t=/(^|[^/])@(group|binding)\(\d+\)[^;]+;/g,n=/@group\((\d+)\)/,s=/@binding\((\d+)\)/,o=/var(<[^>]+>)? (\w+)/,f=/:\s*([\w<>]+)/,d=/struct\s+(\w+)\s*{([^}]+)}/g,m=/(\w+)\s*:\s*([\w\<\>]+)/g,g=/struct\s+(\w+)/,v=(b=i.match(t))==null?void 0:b.map(E=>({group:parseInt(E.match(n)[1],10),binding:parseInt(E.match(s)[1],10),name:E.match(o)[2],isUniform:E.match(o)[1]==="<uniform>",type:E.match(f)[1]}));if(!v)return{groups:[],structs:[]};const S=((A=i.match(d))==null?void 0:A.map(E=>{const R=E.match(g)[1],D=E.match(m).reduce((M,O)=>{const[U,B]=O.split(":");return M[U.trim()]=B.trim(),M},{});return D?{name:R,members:D}:null}).filter(({name:E})=>v.some(R=>R.type===E||R.type.includes(`<${E}>`))))??[];return{groups:v,structs:S}}var Zr=(i=>(i[i.VERTEX=1]="VERTEX",i[i.FRAGMENT=2]="FRAGMENT",i[i.COMPUTE=4]="COMPUTE",i))(Zr||{});function TE({groups:i}){const t=[];for(let n=0;n<i.length;n++){const s=i[n];t[s.group]||(t[s.group]=[]),s.isUniform?t[s.group].push({binding:s.binding,visibility:Zr.VERTEX|Zr.FRAGMENT,buffer:{type:"uniform"}}):s.type==="sampler"?t[s.group].push({binding:s.binding,visibility:Zr.FRAGMENT,sampler:{type:"filtering"}}):s.type==="texture_2d"||s.type.startsWith("texture_2d<")?t[s.group].push({binding:s.binding,visibility:Zr.FRAGMENT,texture:{sampleType:"float",viewDimension:"2d",multisampled:!1}}):s.type==="texture_2d_array"||s.type.startsWith("texture_2d_array<")?t[s.group].push({binding:s.binding,visibility:Zr.FRAGMENT,texture:{sampleType:"float",viewDimension:"2d-array",multisampled:!1}}):(s.type==="texture_cube"||s.type.startsWith("texture_cube<"))&&t[s.group].push({binding:s.binding,visibility:Zr.FRAGMENT,texture:{sampleType:"float",viewDimension:"cube",multisampled:!1}})}for(let n=0;n<t.length;n++)t[n]||(t[n]=[]);return t}function EE({groups:i}){const t=[];for(let n=0;n<i.length;n++){const s=i[n];t[s.group]||(t[s.group]={}),t[s.group][s.name]=s.binding}return t}function CE(i,t){const n=new Set,s=new Set,o=[...i.structs,...t.structs].filter(d=>n.has(d.name)?!1:(n.add(d.name),!0)),f=[...i.groups,...t.groups].filter(d=>{const m=`${d.name}-${d.binding}`;return s.has(m)?!1:(s.add(m),!0)});return{structs:o,groups:f}}const vh=Object.create(null);class Zh{constructor(t){var m,g;this._layoutKey=0,this._attributeLocationsKey=0;const{fragment:n,vertex:s,layout:o,gpuLayout:f,name:d}=t;if(this.name=d,this.fragment=n,this.vertex=s,n.source===s.source){const v=Ty(n.source);this.structsAndGroups=v}else{const v=Ty(s.source),S=Ty(n.source);this.structsAndGroups=CE(v,S)}this.layout=o??EE(this.structsAndGroups),this.gpuLayout=f??TE(this.structsAndGroups),this.autoAssignGlobalUniforms=((m=this.layout[0])==null?void 0:m.globalUniforms)!==void 0,this.autoAssignLocalUniforms=((g=this.layout[1])==null?void 0:g.localUniforms)!==void 0,this._generateProgramKey()}_generateProgramKey(){const{vertex:t,fragment:n}=this,s=t.source+n.source+t.entryPoint+n.entryPoint;this._layoutKey=zg(s,"program")}get attributeData(){return this._attributeData??(this._attributeData=bE(this.vertex)),this._attributeData}destroy(){this.gpuLayout=null,this.layout=null,this.structsAndGroups=null,this.fragment=null,this.vertex=null,vh[this._cacheKey]=null}static from(t){const n=`${t.vertex.source}:${t.fragment.source}:${t.fragment.entryPoint}:${t.vertex.entryPoint}`;return vh[n]||(vh[n]=new Zh(t),vh[n]._cacheKey=n),vh[n]}}const Vx=["f32","i32","vec2<f32>","vec3<f32>","vec4<f32>","mat2x2<f32>","mat3x3<f32>","mat4x4<f32>","mat3x2<f32>","mat4x2<f32>","mat2x3<f32>","mat4x3<f32>","mat2x4<f32>","mat3x4<f32>","vec2<i32>","vec3<i32>","vec4<i32>"],AE=Vx.reduce((i,t)=>(i[t]=!0,i),{});function ME(i,t){switch(i){case"f32":return 0;case"vec2<f32>":return new Float32Array(2*t);case"vec3<f32>":return new Float32Array(3*t);case"vec4<f32>":return new Float32Array(4*t);case"mat2x2<f32>":return new Float32Array([1,0,0,1]);case"mat3x3<f32>":return new Float32Array([1,0,0,0,1,0,0,0,1]);case"mat4x4<f32>":return new Float32Array([1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1])}return null}const Qx=class Zx{constructor(t,n){this._touched=0,this.uid=en("uniform"),this._resourceType="uniformGroup",this._resourceId=en("resource"),this.isUniformGroup=!0,this._dirtyId=0,this.destroyed=!1,n={...Zx.defaultOptions,...n},this.uniformStructures=t;const s={};for(const o in t){const f=t[o];if(f.name=o,f.size=f.size??1,!AE[f.type]){const d=f.type.match(/^array<(\w+(?:<\w+>)?),\s*(\d+)>$/);if(d){const[,m,g]=d;throw new Error(`Uniform type ${f.type} is not supported. Use type: '${m}', size: ${g} instead.`)}throw new Error(`Uniform type ${f.type} is not supported. Supported uniform types are: ${Vx.join(", ")}`)}f.value??(f.value=ME(f.type,f.size)),s[o]=f.value}this.uniforms=s,this._dirtyId=1,this.ubo=n.ubo,this.isStatic=n.isStatic,this._signature=zg(Object.keys(s).map(o=>`${o}-${t[o].type}`).join("-"),"uniform-group")}update(){this._dirtyId++}};Qx.defaultOptions={ubo:!1,isStatic:!1};let Kx=Qx;class Jm{constructor(t){this.resources=Object.create(null),this._dirty=!0;let n=0;for(const s in t){const o=t[s];this.setResource(o,n++)}this._updateKey()}_updateKey(){if(!this._dirty)return;this._dirty=!1;const t=[];let n=0;for(const s in this.resources)t[n++]=this.resources[s]._resourceId;this._key=t.join("|")}setResource(t,n){var o,f;const s=this.resources[n];t!==s&&((o=s==null?void 0:s.off)==null||o.call(s,"change",this.onResourceChange,this),(f=t.on)==null||f.call(t,"change",this.onResourceChange,this),this.resources[n]=t,this._dirty=!0)}getResource(t){return this.resources[t]}_touch(t,n){const s=this.resources;for(const o in s)s[o]._gcLastUsed=t,s[o]._touched=n}destroy(){var n;const t=this.resources;for(const s in t){const o=t[s];(n=o==null?void 0:o.off)==null||n.call(o,"change",this.onResourceChange,this)}this.resources=null}onResourceChange(t){this._dirty=!0,t.destroyed?this.destroy():this._updateKey()}}var eg=(i=>(i[i.WEBGL=1]="WEBGL",i[i.WEBGPU=2]="WEBGPU",i[i.CANVAS=4]="CANVAS",i[i.BOTH=3]="BOTH",i))(eg||{});class dp extends $l{constructor(t){super(),this.uid=en("shader"),this._uniformBindMap=Object.create(null),this._ownedBindGroups=[],this._destroyed=!1;let{gpuProgram:n,glProgram:s,groups:o,resources:f,compatibleRenderers:d,groupMap:m}=t;this.gpuProgram=n,this.glProgram=s,d===void 0&&(d=0,n&&(d|=eg.WEBGPU),s&&(d|=eg.WEBGL)),this.compatibleRenderers=d;const g={};if(!f&&!o&&(f={}),f&&o)throw new Error("[Shader] Cannot have both resources and groups");if(!n&&o&&!m)throw new Error("[Shader] No group map or WebGPU shader provided - consider using resources instead.");if(!n&&o&&m)for(const v in m)for(const S in m[v]){const b=m[v][S];g[b]={group:v,binding:S,name:b}}else if(n&&o&&!m){const v=n.structsAndGroups.groups;m={},v.forEach(S=>{m[S.group]=m[S.group]||{},m[S.group][S.binding]=S.name,g[S.name]=S})}else if(f){o={},m={},n&&n.structsAndGroups.groups.forEach(b=>{m[b.group]=m[b.group]||{},m[b.group][b.binding]=b.name,g[b.name]=b});let v=0;for(const S in f)g[S]||(o[99]||(o[99]=new Jm,this._ownedBindGroups.push(o[99])),g[S]={group:99,binding:v,name:S},m[99]=m[99]||{},m[99][v]=S,v++);for(const S in f){const b=S;let A=f[S];!A.source&&!A._resourceType&&(A=new Kx(A));const E=g[b];E&&(o[E.group]||(o[E.group]=new Jm,this._ownedBindGroups.push(o[E.group])),o[E.group].setResource(A,E.binding))}}this.groups=o,this._uniformBindMap=m,this.resources=this._buildResourceAccessor(o,g)}addResource(t,n,s){var o,f;(o=this._uniformBindMap)[n]||(o[n]={}),(f=this._uniformBindMap[n])[s]||(f[s]=t),this.groups[n]||(this.groups[n]=new Jm,this._ownedBindGroups.push(this.groups[n]))}_buildResourceAccessor(t,n){const s={};for(const o in n){const f=n[o];Object.defineProperty(s,f.name,{get(){return t[f.group].getResource(f.binding)},set(d){t[f.group].setResource(d,f.binding)}})}return s}destroy(t=!1){var n,s;this._destroyed||(this._destroyed=!0,this.emit("destroy",this),t&&((n=this.gpuProgram)==null||n.destroy(),(s=this.glProgram)==null||s.destroy()),this.gpuProgram=null,this.glProgram=null,this.removeAllListeners(),this._uniformBindMap=null,this._ownedBindGroups.forEach(o=>{o.destroy()}),this._ownedBindGroups=null,this.resources=null,this.groups=null)}static from(t){const{gpu:n,gl:s,...o}=t;let f,d;return n&&(f=Zh.from(n)),s&&(d=Dg.from(s)),new dp({gpuProgram:f,glProgram:d,...o})}}const RE={normal:0,add:1,multiply:2,screen:3,overlay:4,erase:5,"normal-npm":6,"add-npm":7,"screen-npm":8,min:9,max:10},Ey=0,Cy=1,Ay=2,My=3,Ry=4,zy=5,ng=class kx{constructor(){this.data=0,this.blendMode="normal",this.polygonOffset=0,this.blend=!0,this.depthMask=!0}get blend(){return!!(this.data&1<<Ey)}set blend(t){!!(this.data&1<<Ey)!==t&&(this.data^=1<<Ey)}get offsets(){return!!(this.data&1<<Cy)}set offsets(t){!!(this.data&1<<Cy)!==t&&(this.data^=1<<Cy)}set cullMode(t){if(t==="none"){this.culling=!1;return}this.culling=!0,this.clockwiseFrontFace=t==="front"}get cullMode(){return this.culling?this.clockwiseFrontFace?"front":"back":"none"}get culling(){return!!(this.data&1<<Ay)}set culling(t){!!(this.data&1<<Ay)!==t&&(this.data^=1<<Ay)}get depthTest(){return!!(this.data&1<<My)}set depthTest(t){!!(this.data&1<<My)!==t&&(this.data^=1<<My)}get depthMask(){return!!(this.data&1<<zy)}set depthMask(t){!!(this.data&1<<zy)!==t&&(this.data^=1<<zy)}get clockwiseFrontFace(){return!!(this.data&1<<Ry)}set clockwiseFrontFace(t){!!(this.data&1<<Ry)!==t&&(this.data^=1<<Ry)}get blendMode(){return this._blendMode}set blendMode(t){this.blend=t!=="none",this._blendMode=t,this._blendModeId=RE[t]||0}get polygonOffset(){return this._polygonOffset}set polygonOffset(t){this.offsets=!!t,this._polygonOffset=t}toString(){return`[pixi.js/core:State blendMode=${this.blendMode} clockwiseFrontFace=${this.clockwiseFrontFace} culling=${this.culling} depthMask=${this.depthMask} polygonOffset=${this.polygonOffset}]`}static for2d(){const t=new kx;return t.depthTest=!1,t.blend=!0,t}};ng.default2d=ng.for2d();let Og=ng;const Jx=class ag extends dp{constructor(t){t={...ag.defaultOptions,...t},super(t),this.enabled=!0,this._state=Og.for2d(),this.blendMode=t.blendMode,this.padding=t.padding,typeof t.antialias=="boolean"?this.antialias=t.antialias?"on":"off":this.antialias=t.antialias,this.resolution=t.resolution,this.blendRequired=t.blendRequired,this.clipToViewport=t.clipToViewport,this.addResource("uTexture",0,1),t.blendRequired&&this.addResource("uBackTexture",0,3)}apply(t,n,s,o){t.applyFilter(this,n,s,o)}get blendMode(){return this._state.blendMode}set blendMode(t){this._state.blendMode=t}static from(t){const{gpu:n,gl:s,...o}=t;let f,d;return n&&(f=Zh.from(n)),s&&(d=Dg.from(s)),new ag({gpuProgram:f,glProgram:d,...o})}};Jx.defaultOptions={blendMode:"normal",resolution:1,padding:0,antialias:"off",blendRequired:!1,clipToViewport:!0};let Wr=Jx;const ig=[];ke.handleByNamedList(kt.Environment,ig);async function zE(i){if(!i)for(let t=0;t<ig.length;t++){const n=ig[t];if(n.value.test()){await n.value.load();return}}}let xh;function DE(){if(typeof xh=="boolean")return xh;try{xh=new Function("param1","param2","param3","return param1[param2] === param3;")({a:"b"},"a","b")===!0}catch{xh=!1}return xh}function jv(i,t,n=2){const s=t&&t.length,o=s?t[0]*n:i.length;let f=Px(i,0,o,n,!0);const d=[];if(!f||f.next===f.prev)return d;let m,g,v;if(s&&(f=wE(i,t,f,n)),i.length>80*n){m=i[0],g=i[1];let S=m,b=g;for(let A=n;A<o;A+=n){const E=i[A],R=i[A+1];E<m&&(m=E),R<g&&(g=R),E>S&&(S=E),R>b&&(b=R)}v=Math.max(S-m,b-g),v=v!==0?32767/v:0}return Gh(f,d,n,m,g,v,0),d}function Px(i,t,n,s,o){let f;if(o===KE(i,t,n,s)>0)for(let d=t;d<n;d+=s)f=qv(d/s|0,i[d],i[d+1],f);else for(let d=n-s;d>=t;d-=s)f=qv(d/s|0,i[d],i[d+1],f);return f&&zc(f,f.next)&&(qh(f),f=f.next),f}function Jr(i,t){if(!i)return i;t||(t=i);let n=i,s;do if(s=!1,!n.steiner&&(zc(n,n.next)||Ke(n.prev,n,n.next)===0)){if(qh(n),n=t=n.prev,n===n.next)break;s=!0}else n=n.next;while(s||n!==t);return t}function Gh(i,t,n,s,o,f,d){if(!i)return;!d&&f&&YE(i,s,o,f);let m=i;for(;i.prev!==i.next;){const g=i.prev,v=i.next;if(f?NE(i,s,o,f):OE(i)){t.push(g.i,i.i,v.i),qh(i),i=v.next,m=v.next;continue}if(i=v,i===m){d?d===1?(i=UE(Jr(i),t),Gh(i,t,n,s,o,f,2)):d===2&&BE(i,t,n,s,o,f):Gh(Jr(i),t,n,s,o,f,1);break}}}function OE(i){const t=i.prev,n=i,s=i.next;if(Ke(t,n,s)>=0)return!1;const o=t.x,f=n.x,d=s.x,m=t.y,g=n.y,v=s.y,S=Math.min(o,f,d),b=Math.min(m,g,v),A=Math.max(o,f,d),E=Math.max(m,g,v);let R=s.next;for(;R!==t;){if(R.x>=S&&R.x<=A&&R.y>=b&&R.y<=E&&Ah(o,m,f,g,d,v,R.x,R.y)&&Ke(R.prev,R,R.next)>=0)return!1;R=R.next}return!0}function NE(i,t,n,s){const o=i.prev,f=i,d=i.next;if(Ke(o,f,d)>=0)return!1;const m=o.x,g=f.x,v=d.x,S=o.y,b=f.y,A=d.y,E=Math.min(m,g,v),R=Math.min(S,b,A),D=Math.max(m,g,v),M=Math.max(S,b,A),O=lg(E,R,t,n,s),U=lg(D,M,t,n,s);let B=i.prevZ,G=i.nextZ;for(;B&&B.z>=O&&G&&G.z<=U;){if(B.x>=E&&B.x<=D&&B.y>=R&&B.y<=M&&B!==o&&B!==d&&Ah(m,S,g,b,v,A,B.x,B.y)&&Ke(B.prev,B,B.next)>=0||(B=B.prevZ,G.x>=E&&G.x<=D&&G.y>=R&&G.y<=M&&G!==o&&G!==d&&Ah(m,S,g,b,v,A,G.x,G.y)&&Ke(G.prev,G,G.next)>=0))return!1;G=G.nextZ}for(;B&&B.z>=O;){if(B.x>=E&&B.x<=D&&B.y>=R&&B.y<=M&&B!==o&&B!==d&&Ah(m,S,g,b,v,A,B.x,B.y)&&Ke(B.prev,B,B.next)>=0)return!1;B=B.prevZ}for(;G&&G.z<=U;){if(G.x>=E&&G.x<=D&&G.y>=R&&G.y<=M&&G!==o&&G!==d&&Ah(m,S,g,b,v,A,G.x,G.y)&&Ke(G.prev,G,G.next)>=0)return!1;G=G.nextZ}return!0}function UE(i,t){let n=i;do{const s=n.prev,o=n.next.next;!zc(s,o)&&Fx(s,n,n.next,o)&&jh(s,o)&&jh(o,s)&&(t.push(s.i,n.i,o.i),qh(n),qh(n.next),n=i=o),n=n.next}while(n!==i);return Jr(n)}function BE(i,t,n,s,o,f){let d=i;do{let m=d.next.next;for(;m!==d.prev;){if(d.i!==m.i&&VE(d,m)){let g=Ix(d,m);d=Jr(d,d.next),g=Jr(g,g.next),Gh(d,t,n,s,o,f,0),Gh(g,t,n,s,o,f,0);return}m=m.next}d=d.next}while(d!==i)}function wE(i,t,n,s){const o=[];for(let f=0,d=t.length;f<d;f++){const m=t[f]*s,g=f<d-1?t[f+1]*s:i.length,v=Px(i,m,g,s,!1);v===v.next&&(v.steiner=!0),o.push(XE(v))}o.sort(HE);for(let f=0;f<o.length;f++)n=GE(o[f],n);return n}function HE(i,t){let n=i.x-t.x;if(n===0&&(n=i.y-t.y,n===0)){const s=(i.next.y-i.y)/(i.next.x-i.x),o=(t.next.y-t.y)/(t.next.x-t.x);n=s-o}return n}function GE(i,t){const n=jE(i,t);if(!n)return t;const s=Ix(n,i);return Jr(s,s.next),Jr(n,n.next)}function jE(i,t){let n=t;const s=i.x,o=i.y;let f=-1/0,d;if(zc(i,n))return n;do{if(zc(i,n.next))return n.next;if(o<=n.y&&o>=n.next.y&&n.next.y!==n.y){const b=n.x+(o-n.y)*(n.next.x-n.x)/(n.next.y-n.y);if(b<=s&&b>f&&(f=b,d=n.x<n.next.x?n:n.next,b===s))return d}n=n.next}while(n!==t);if(!d)return null;const m=d,g=d.x,v=d.y;let S=1/0;n=d;do{if(s>=n.x&&n.x>=g&&s!==n.x&&Wx(o<v?s:f,o,g,v,o<v?f:s,o,n.x,n.y)){const b=Math.abs(o-n.y)/(s-n.x);jh(n,i)&&(b<S||b===S&&(n.x>d.x||n.x===d.x&&qE(d,n)))&&(d=n,S=b)}n=n.next}while(n!==m);return d}function qE(i,t){return Ke(i.prev,i,t.prev)<0&&Ke(t.next,i,i.next)<0}function YE(i,t,n,s){let o=i;do o.z===0&&(o.z=lg(o.x,o.y,t,n,s)),o.prevZ=o.prev,o.nextZ=o.next,o=o.next;while(o!==i);o.prevZ.nextZ=null,o.prevZ=null,LE(o)}function LE(i){let t,n=1;do{let s=i,o;i=null;let f=null;for(t=0;s;){t++;let d=s,m=0;for(let v=0;v<n&&(m++,d=d.nextZ,!!d);v++);let g=n;for(;m>0||g>0&&d;)m!==0&&(g===0||!d||s.z<=d.z)?(o=s,s=s.nextZ,m--):(o=d,d=d.nextZ,g--),f?f.nextZ=o:i=o,o.prevZ=f,f=o;s=d}f.nextZ=null,n*=2}while(t>1);return i}function lg(i,t,n,s,o){return i=(i-n)*o|0,t=(t-s)*o|0,i=(i|i<<8)&16711935,i=(i|i<<4)&252645135,i=(i|i<<2)&858993459,i=(i|i<<1)&1431655765,t=(t|t<<8)&16711935,t=(t|t<<4)&252645135,t=(t|t<<2)&858993459,t=(t|t<<1)&1431655765,i|t<<1}function XE(i){let t=i,n=i;do(t.x<n.x||t.x===n.x&&t.y<n.y)&&(n=t),t=t.next;while(t!==i);return n}function Wx(i,t,n,s,o,f,d,m){return(o-d)*(t-m)>=(i-d)*(f-m)&&(i-d)*(s-m)>=(n-d)*(t-m)&&(n-d)*(f-m)>=(o-d)*(s-m)}function Ah(i,t,n,s,o,f,d,m){return!(i===d&&t===m)&&Wx(i,t,n,s,o,f,d,m)}function VE(i,t){return i.next.i!==t.i&&i.prev.i!==t.i&&!QE(i,t)&&(jh(i,t)&&jh(t,i)&&ZE(i,t)&&(Ke(i.prev,i,t.prev)||Ke(i,t.prev,t))||zc(i,t)&&Ke(i.prev,i,i.next)>0&&Ke(t.prev,t,t.next)>0)}function Ke(i,t,n){return(t.y-i.y)*(n.x-t.x)-(t.x-i.x)*(n.y-t.y)}function zc(i,t){return i.x===t.x&&i.y===t.y}function Fx(i,t,n,s){const o=Hm(Ke(i,t,n)),f=Hm(Ke(i,t,s)),d=Hm(Ke(n,s,i)),m=Hm(Ke(n,s,t));return!!(o!==f&&d!==m||o===0&&wm(i,n,t)||f===0&&wm(i,s,t)||d===0&&wm(n,i,s)||m===0&&wm(n,t,s))}function wm(i,t,n){return t.x<=Math.max(i.x,n.x)&&t.x>=Math.min(i.x,n.x)&&t.y<=Math.max(i.y,n.y)&&t.y>=Math.min(i.y,n.y)}function Hm(i){return i>0?1:i<0?-1:0}function QE(i,t){let n=i;do{if(n.i!==i.i&&n.next.i!==i.i&&n.i!==t.i&&n.next.i!==t.i&&Fx(n,n.next,i,t))return!0;n=n.next}while(n!==i);return!1}function jh(i,t){return Ke(i.prev,i,i.next)<0?Ke(i,t,i.next)>=0&&Ke(i,i.prev,t)>=0:Ke(i,t,i.prev)<0||Ke(i,i.next,t)<0}function ZE(i,t){let n=i,s=!1;const o=(i.x+t.x)/2,f=(i.y+t.y)/2;do n.y>f!=n.next.y>f&&n.next.y!==n.y&&o<(n.next.x-n.x)*(f-n.y)/(n.next.y-n.y)+n.x&&(s=!s),n=n.next;while(n!==i);return s}function Ix(i,t){const n=sg(i.i,i.x,i.y),s=sg(t.i,t.x,t.y),o=i.next,f=t.prev;return i.next=t,t.prev=i,n.next=o,o.prev=n,s.next=n,n.prev=s,f.next=s,s.prev=f,s}function qv(i,t,n,s){const o=sg(i,t,n);return s?(o.next=s.next,o.prev=s,s.next.prev=o,s.next=o):(o.prev=o,o.next=o),o}function qh(i){i.next.prev=i.prev,i.prev.next=i.next,i.prevZ&&(i.prevZ.nextZ=i.nextZ),i.nextZ&&(i.nextZ.prevZ=i.prevZ)}function sg(i,t,n){return{i,x:t,y:n,prev:null,next:null,z:0,prevZ:null,nextZ:null,steiner:!1}}function KE(i,t,n,s){let o=0;for(let f=t,d=n-s;f<n;f+=s)o+=(i[d]-i[f])*(i[f+1]+i[d+1]),d=f;return o}const kE=jv.default||jv;var $x=(i=>(i[i.NONE=0]="NONE",i[i.COLOR=16384]="COLOR",i[i.STENCIL=1024]="STENCIL",i[i.DEPTH=256]="DEPTH",i[i.COLOR_DEPTH=16640]="COLOR_DEPTH",i[i.COLOR_STENCIL=17408]="COLOR_STENCIL",i[i.DEPTH_STENCIL=1280]="DEPTH_STENCIL",i[i.ALL=17664]="ALL",i))($x||{});class JE{constructor(t){this.items=[],this._name=t}emit(t,n,s,o,f,d,m,g){const{name:v,items:S}=this;for(let b=0,A=S.length;b<A;b++)S[b][v](t,n,s,o,f,d,m,g);return this}add(t){return t[this._name]&&(this.remove(t),this.items.push(t)),this}remove(t){const n=this.items.indexOf(t);return n!==-1&&this.items.splice(n,1),this}contains(t){return this.items.indexOf(t)!==-1}removeAll(){return this.items.length=0,this}destroy(){this.removeAll(),this.items=null,this._name=null}get empty(){return this.items.length===0}get name(){return this._name}}const PE=["init","destroy","contextChange","resolutionChange","resetState","renderEnd","renderStart","render","update","postrender","prerender"],t_=class e_ extends $l{constructor(t){super(),this.tick=0,this.uid=en("renderer"),this.runners=Object.create(null),this.renderPipes=Object.create(null),this._initOptions={},this._systemsHash=Object.create(null),this.type=t.type,this.name=t.name,this.config=t;const n=[...PE,...this.config.runners??[]];this._addRunners(...n),this._unsafeEvalCheck()}async init(t={}){const n=t.skipExtensionImports===!0?!0:t.manageImports===!1;await zE(n),this._addSystems(this.config.systems),this._addPipes(this.config.renderPipes,this.config.renderPipeAdaptors);for(const s in this._systemsHash)t={...this._systemsHash[s].constructor.defaultOptions,...t};t={...e_.defaultOptions,...t},this._roundPixels=t.roundPixels?1:0;for(let s=0;s<this.runners.init.items.length;s++)await this.runners.init.items[s].init(t);this._initOptions=t}render(t,n){this.tick++;let s=t;if(s instanceof ua&&(s={container:s},n&&(ce(tn,"passing a second argument is deprecated, please use render options instead"),s.target=n.renderTexture)),s.target||(s.target=this.view.renderTarget),s.target===this.view.renderTarget&&(this._lastObjectRendered=s.container,s.clearColor??(s.clearColor=this.background.colorRgba),s.clear??(s.clear=this.background.clearBeforeRender)),s.clearColor){const o=Array.isArray(s.clearColor)&&s.clearColor.length===4;s.clearColor=o?s.clearColor:Sn.shared.setValue(s.clearColor).toArray()}s.transform||(s.container.updateLocalTransform(),s.transform=s.container.localTransform),s.container.visible&&(s.container.enableRenderGroup(),this.runners.prerender.emit(s),this.runners.renderStart.emit(s),this.runners.render.emit(s),this.runners.renderEnd.emit(s),this.runners.postrender.emit(s))}resize(t,n,s){const o=this.view.resolution;this.view.resize(t,n,s),this.emit("resize",this.view.screen.width,this.view.screen.height,this.view.resolution),s!==void 0&&s!==o&&this.runners.resolutionChange.emit(s)}clear(t={}){const n=this;t.target||(t.target=n.renderTarget.renderTarget),t.clearColor||(t.clearColor=this.background.colorRgba),t.clear??(t.clear=$x.ALL);const{clear:s,clearColor:o,target:f,mipLevel:d,layer:m}=t;Sn.shared.setValue(o??this.background.colorRgba),n.renderTarget.clear(f,s,Sn.shared.toArray(),d??0,m??0)}get resolution(){return this.view.resolution}set resolution(t){this.view.resolution=t,this.runners.resolutionChange.emit(t)}get width(){return this.view.texture.frame.width}get height(){return this.view.texture.frame.height}get canvas(){return this.view.canvas}get lastObjectRendered(){return this._lastObjectRendered}get renderingToScreen(){return this.renderTarget.renderingToScreen}get screen(){return this.view.screen}_addRunners(...t){t.forEach(n=>{this.runners[n]=new JE(n)})}_addSystems(t){let n;for(n in t){const s=t[n];this._addSystem(s.value,s.name)}}_addSystem(t,n){const s=new t(this);if(this[n])throw new Error(`Whoops! The name "${n}" is already in use`);this[n]=s,this._systemsHash[n]=s;for(const o in this.runners)this.runners[o].add(s);return this}_addPipes(t,n){const s=n.reduce((o,f)=>(o[f.name]=f.value,o),{});t.forEach(o=>{const f=o.value,d=o.name,m=s[d];this.renderPipes[d]=new f(this,m?new m:null),this.runners.destroy.add(this.renderPipes[d])})}destroy(t=!1){this.runners.destroy.items.reverse(),this.runners.destroy.emit(t),(t===!0||typeof t=="object"&&t.releaseGlobalResources)&&Qh.release(),Object.values(this.runners).forEach(n=>{n.destroy()}),this._systemsHash=null,this.renderPipes=null,this.removeAllListeners()}generateTexture(t){return this.textureGenerator.generateTexture(t)}get roundPixels(){return!!this._roundPixels}_unsafeEvalCheck(){if(!DE())throw new Error("Current environment does not allow unsafe-eval, please use pixi.js/unsafe-eval module to enable support.")}resetState(){this.runners.resetState.emit()}};t_.defaultOptions={resolution:1,failIfMajorPerformanceCaveat:!1,roundPixels:!1};let n_=t_,Gm;function WE(i){return Gm!==void 0||(Gm=(()=>{var n;const t={stencil:!0,failIfMajorPerformanceCaveat:i??n_.defaultOptions.failIfMajorPerformanceCaveat};try{if(!si.get().getWebGLRenderingContext())return!1;let o=si.get().createCanvas().getContext("webgl",t);const f=!!((n=o==null?void 0:o.getContextAttributes())!=null&&n.stencil);if(o){const d=o.getExtension("WEBGL_lose_context");d&&d.loseContext()}return o=null,f}catch{return!1}})()),Gm}let jm;async function FE(i={}){return jm!==void 0||(jm=await(async()=>{const t=si.get().getNavigator().gpu;if(!t)return!1;try{return await(await t.requestAdapter(i)).requestDevice(),!0}catch{return!1}})()),jm}const Yv=["webgl","webgpu","canvas"];async function IE(i){let t=[];i.preference?(t.push(i.preference),Yv.forEach(f=>{f!==i.preference&&t.push(f)})):t=Yv.slice();let n,s={};for(let f=0;f<t.length;f++){const d=t[f];if(d==="webgpu"&&await FE()){const{WebGPURenderer:m}=await zh(async()=>{const{WebGPURenderer:g}=await import("./WebGPURenderer-BYaiziZY.js");return{WebGPURenderer:g}},__vite__mapDeps([2,3,4]));n=m,s={...i,...i.webgpu};break}else if(d==="webgl"&&WE(i.failIfMajorPerformanceCaveat??n_.defaultOptions.failIfMajorPerformanceCaveat)){const{WebGLRenderer:m}=await zh(async()=>{const{WebGLRenderer:g}=await import("./WebGLRenderer-C-OGxDx9.js");return{WebGLRenderer:g}},__vite__mapDeps([5,3,4]));n=m,s={...i,...i.webgl};break}else if(d==="canvas"){const{CanvasRenderer:m}=await zh(async()=>{const{CanvasRenderer:g}=await import("./CanvasRenderer-IX_LP94-.js");return{CanvasRenderer:g}},__vite__mapDeps([6,4]));n=m,s={...i,...i.canvasOptions};break}}if(delete s.webgpu,delete s.webgl,delete s.canvasOptions,!n)throw new Error("No available renderer for the current environment");const o=new n;return await o.init(s),o}const a_="8.17.0";class i_{static init(){var t;(t=globalThis.__PIXI_APP_INIT__)==null||t.call(globalThis,this,a_)}static destroy(){}}i_.extension=kt.Application;class $E{constructor(t){this._renderer=t}init(){var t;(t=globalThis.__PIXI_RENDERER_INIT__)==null||t.call(globalThis,this._renderer,a_)}destroy(){this._renderer=null}}$E.extension={type:[kt.WebGLSystem,kt.WebGPUSystem],name:"initHook",priority:-10};class l_{static init(t){Object.defineProperty(this,"resizeTo",{configurable:!0,set(n){globalThis.removeEventListener("resize",this.queueResize),this._resizeTo=n,n&&(globalThis.addEventListener("resize",this.queueResize),this.resize())},get(){return this._resizeTo}}),this.queueResize=()=>{this._resizeTo&&(this._cancelResize(),this._resizeId=requestAnimationFrame(()=>this.resize()))},this._cancelResize=()=>{this._resizeId&&(cancelAnimationFrame(this._resizeId),this._resizeId=null)},this.resize=()=>{if(!this._resizeTo)return;this._cancelResize();let n,s;if(this._resizeTo===globalThis.window)n=globalThis.innerWidth,s=globalThis.innerHeight;else{const{clientWidth:o,clientHeight:f}=this._resizeTo;n=o,s=f}this.renderer.resize(n,s),this.render()},this._resizeId=null,this._resizeTo=null,this.resizeTo=t.resizeTo||null}static destroy(){globalThis.removeEventListener("resize",this.queueResize),this._cancelResize(),this._cancelResize=null,this.queueResize=null,this.resizeTo=null,this.resize=null}}l_.extension=kt.Application;class s_{static init(t){t=Object.assign({autoStart:!0,sharedTicker:!1},t),Object.defineProperty(this,"ticker",{configurable:!0,set(n){this._ticker&&this._ticker.remove(this.render,this),this._ticker=n,n&&n.add(this.render,this,Im.LOW)},get(){return this._ticker}}),this.stop=()=>{this._ticker.stop()},this.start=()=>{this._ticker.start()},this._ticker=null,this.ticker=t.sharedTicker?bc.shared:new bc,t.autoStart&&this.start()}static destroy(){if(this._ticker){const t=this._ticker;this.ticker=null,t.destroy()}}}s_.extension=kt.Application;ke.add(l_);ke.add(s_);const u_=class ug{constructor(...t){this.stage=new ua,t[0]!==void 0&&ce(tn,"Application constructor options are deprecated, please use Application.init() instead.")}async init(t){t={...t},this.stage||(this.stage=new ua),this.renderer=await IE(t),ug._plugins.forEach(n=>{n.init.call(this,t)})}render(){this.renderer.render({container:this.stage})}get canvas(){return this.renderer.canvas}get view(){return ce(tn,"Application.view is deprecated, please use Application.canvas instead."),this.renderer.canvas}get screen(){return this.renderer.screen}destroy(t=!1,n=!1){const s=ug._plugins.slice(0);s.reverse(),s.forEach(o=>{o.destroy.call(this)}),this.stage.destroy(n),this.stage=null,this.renderer.destroy(t),this.renderer=null}};u_._plugins=[];let Ng=u_;ke.handleByList(kt.Application,Ng._plugins);ke.add(i_);var Dy,Lv;function tC(){if(Lv)return Dy;Lv=1,Dy=n;var i={a:7,c:6,h:1,l:2,m:2,q:4,s:4,t:2,v:1,z:0},t=/([astvzqmhlc])([^astvzqmhlc]*)/ig;function n(f){var d=[];return f.replace(t,function(m,g,v){var S=g.toLowerCase();for(v=o(v),S=="m"&&v.length>2&&(d.push([g].concat(v.splice(0,2))),S="l",g=g=="m"?"l":"L");;){if(v.length==i[S])return v.unshift(g),d.push(v);if(v.length<i[S])throw new Error("malformed path data");d.push([g].concat(v.splice(0,i[S])))}}),d}var s=/-?[0-9]*\.?[0-9]+(?:e[-+]?\d+)?/ig;function o(f){var d=f.match(s);return d?d.map(Number):[]}return Dy}var eC=tC();const nC=ip(eC);function aC(i,t){const n=nC(i),s=[];let o=null,f=0,d=0;for(let m=0;m<n.length;m++){const g=n[m],v=g[0],S=g;switch(v){case"M":f=S[1],d=S[2],t.moveTo(f,d);break;case"m":f+=S[1],d+=S[2],t.moveTo(f,d);break;case"H":f=S[1],t.lineTo(f,d);break;case"h":f+=S[1],t.lineTo(f,d);break;case"V":d=S[1],t.lineTo(f,d);break;case"v":d+=S[1],t.lineTo(f,d);break;case"L":f=S[1],d=S[2],t.lineTo(f,d);break;case"l":f+=S[1],d+=S[2],t.lineTo(f,d);break;case"C":f=S[5],d=S[6],t.bezierCurveTo(S[1],S[2],S[3],S[4],f,d);break;case"c":t.bezierCurveTo(f+S[1],d+S[2],f+S[3],d+S[4],f+S[5],d+S[6]),f+=S[5],d+=S[6];break;case"S":f=S[3],d=S[4],t.bezierCurveToShort(S[1],S[2],f,d);break;case"s":t.bezierCurveToShort(f+S[1],d+S[2],f+S[3],d+S[4]),f+=S[3],d+=S[4];break;case"Q":f=S[3],d=S[4],t.quadraticCurveTo(S[1],S[2],f,d);break;case"q":t.quadraticCurveTo(f+S[1],d+S[2],f+S[3],d+S[4]),f+=S[3],d+=S[4];break;case"T":f=S[1],d=S[2],t.quadraticCurveToShort(f,d);break;case"t":f+=S[1],d+=S[2],t.quadraticCurveToShort(f,d);break;case"A":f=S[6],d=S[7],t.arcToSvg(S[1],S[2],S[3],S[4],S[5],f,d);break;case"a":f+=S[6],d+=S[7],t.arcToSvg(S[1],S[2],S[3],S[4],S[5],f,d);break;case"Z":case"z":t.closePath(),s.length>0&&(o=s.pop(),o?(f=o.startX,d=o.startY):(f=0,d=0)),o=null;break;default:Da(`Unknown SVG path command: ${v}`)}v!=="Z"&&v!=="z"&&o===null&&(o={startX:f,startY:d},s.push(o))}return t}class Ug{constructor(t=0,n=0,s=0){this.type="circle",this.x=t,this.y=n,this.radius=s}clone(){return new Ug(this.x,this.y,this.radius)}contains(t,n){if(this.radius<=0)return!1;const s=this.radius*this.radius;let o=this.x-t,f=this.y-n;return o*=o,f*=f,o+f<=s}strokeContains(t,n,s,o=.5){if(this.radius===0)return!1;const f=this.x-t,d=this.y-n,m=this.radius,g=(1-o)*s,v=Math.sqrt(f*f+d*d);return v<=m+g&&v>m-(s-g)}getBounds(t){return t||(t=new un),t.x=this.x-this.radius,t.y=this.y-this.radius,t.width=this.radius*2,t.height=this.radius*2,t}copyFrom(t){return this.x=t.x,this.y=t.y,this.radius=t.radius,this}copyTo(t){return t.copyFrom(this),t}toString(){return`[pixi.js/math:Circle x=${this.x} y=${this.y} radius=${this.radius}]`}}class Bg{constructor(t=0,n=0,s=0,o=0){this.type="ellipse",this.x=t,this.y=n,this.halfWidth=s,this.halfHeight=o}clone(){return new Bg(this.x,this.y,this.halfWidth,this.halfHeight)}contains(t,n){if(this.halfWidth<=0||this.halfHeight<=0)return!1;let s=(t-this.x)/this.halfWidth,o=(n-this.y)/this.halfHeight;return s*=s,o*=o,s+o<=1}strokeContains(t,n,s,o=.5){const{halfWidth:f,halfHeight:d}=this;if(f<=0||d<=0)return!1;const m=s*(1-o),g=s-m,v=f-g,S=d-g,b=f+m,A=d+m,E=t-this.x,R=n-this.y,D=E*E/(v*v)+R*R/(S*S),M=E*E/(b*b)+R*R/(A*A);return D>1&&M<=1}getBounds(t){return t||(t=new un),t.x=this.x-this.halfWidth,t.y=this.y-this.halfHeight,t.width=this.halfWidth*2,t.height=this.halfHeight*2,t}copyFrom(t){return this.x=t.x,this.y=t.y,this.halfWidth=t.halfWidth,this.halfHeight=t.halfHeight,this}copyTo(t){return t.copyFrom(this),t}toString(){return`[pixi.js/math:Ellipse x=${this.x} y=${this.y} halfWidth=${this.halfWidth} halfHeight=${this.halfHeight}]`}}function iC(i,t,n,s,o,f){const d=i-n,m=t-s,g=o-n,v=f-s,S=d*g+m*v,b=g*g+v*v;let A=-1;b!==0&&(A=S/b);let E,R;A<0?(E=n,R=s):A>1?(E=o,R=f):(E=n+A*g,R=s+A*v);const D=i-E,M=t-R;return D*D+M*M}let lC,sC;class Oh{constructor(...t){this.type="polygon";let n=Array.isArray(t[0])?t[0]:t;if(typeof n[0]!="number"){const s=[];for(let o=0,f=n.length;o<f;o++)s.push(n[o].x,n[o].y);n=s}this.points=n,this.closePath=!0}isClockwise(){let t=0;const n=this.points,s=n.length;for(let o=0;o<s;o+=2){const f=n[o],d=n[o+1],m=n[(o+2)%s],g=n[(o+3)%s];t+=(m-f)*(g+d)}return t<0}containsPolygon(t){const n=this.getBounds(lC),s=t.getBounds(sC);if(!n.containsRect(s))return!1;const o=t.points;for(let f=0;f<o.length;f+=2){const d=o[f],m=o[f+1];if(!this.contains(d,m))return!1}return!0}clone(){const t=this.points.slice(),n=new Oh(t);return n.closePath=this.closePath,n}contains(t,n){let s=!1;const o=this.points.length/2;for(let f=0,d=o-1;f<o;d=f++){const m=this.points[f*2],g=this.points[f*2+1],v=this.points[d*2],S=this.points[d*2+1];g>n!=S>n&&t<(v-m)*((n-g)/(S-g))+m&&(s=!s)}return s}strokeContains(t,n,s,o=.5){const f=s*s,d=f*(1-o),m=f-d,{points:g}=this,v=g.length-(this.closePath?0:2);for(let S=0;S<v;S+=2){const b=g[S],A=g[S+1],E=g[(S+2)%g.length],R=g[(S+3)%g.length],D=iC(t,n,b,A,E,R),M=Math.sign((E-b)*(n-A)-(R-A)*(t-b));if(D<=(M<0?m:d))return!0}return!1}getBounds(t){t||(t=new un);const n=this.points;let s=1/0,o=-1/0,f=1/0,d=-1/0;for(let m=0,g=n.length;m<g;m+=2){const v=n[m],S=n[m+1];s=v<s?v:s,o=v>o?v:o,f=S<f?S:f,d=S>d?S:d}return t.x=s,t.width=o-s,t.y=f,t.height=d-f,t}copyFrom(t){return this.points=t.points.slice(),this.closePath=t.closePath,this}copyTo(t){return t.copyFrom(this),t}toString(){return`[pixi.js/math:PolygoncloseStroke=${this.closePath}points=${this.points.reduce((t,n)=>`${t}, ${n}`,"")}]`}get lastX(){return this.points[this.points.length-2]}get lastY(){return this.points[this.points.length-1]}get x(){return ce("8.11.0","Polygon.lastX is deprecated, please use Polygon.lastX instead."),this.points[this.points.length-2]}get y(){return ce("8.11.0","Polygon.y is deprecated, please use Polygon.lastY instead."),this.points[this.points.length-1]}get startX(){return this.points[0]}get startY(){return this.points[1]}}const qm=(i,t,n,s,o,f,d)=>{const m=i-n,g=t-s,v=Math.sqrt(m*m+g*g);return v>=o-f&&v<=o+d};class wg{constructor(t=0,n=0,s=0,o=0,f=20){this.type="roundedRectangle",this.x=t,this.y=n,this.width=s,this.height=o,this.radius=f}getBounds(t){return t||(t=new un),t.x=this.x,t.y=this.y,t.width=this.width,t.height=this.height,t}clone(){return new wg(this.x,this.y,this.width,this.height,this.radius)}copyFrom(t){return this.x=t.x,this.y=t.y,this.width=t.width,this.height=t.height,this}copyTo(t){return t.copyFrom(this),t}contains(t,n){if(this.width<=0||this.height<=0)return!1;if(t>=this.x&&t<=this.x+this.width&&n>=this.y&&n<=this.y+this.height){const s=Math.max(0,Math.min(this.radius,Math.min(this.width,this.height)/2));if(n>=this.y+s&&n<=this.y+this.height-s||t>=this.x+s&&t<=this.x+this.width-s)return!0;let o=t-(this.x+s),f=n-(this.y+s);const d=s*s;if(o*o+f*f<=d||(o=t-(this.x+this.width-s),o*o+f*f<=d)||(f=n-(this.y+this.height-s),o*o+f*f<=d)||(o=t-(this.x+s),o*o+f*f<=d))return!0}return!1}strokeContains(t,n,s,o=.5){const{x:f,y:d,width:m,height:g,radius:v}=this,S=s*(1-o),b=s-S,A=f+v,E=d+v,R=m-v*2,D=g-v*2,M=f+m,O=d+g;return(t>=f-S&&t<=f+b||t>=M-b&&t<=M+S)&&n>=E&&n<=E+D||(n>=d-S&&n<=d+b||n>=O-b&&n<=O+S)&&t>=A&&t<=A+R?!0:t<A&&n<E&&qm(t,n,A,E,v,b,S)||t>M-v&&n<E&&qm(t,n,M-v,E,v,b,S)||t>M-v&&n>O-v&&qm(t,n,M-v,O-v,v,b,S)||t<A&&n>O-v&&qm(t,n,A,O-v,v,b,S)}toString(){return`[pixi.js/math:RoundedRectangle x=${this.x} y=${this.y}width=${this.width} height=${this.height} radius=${this.radius}]`}}const r_={};function uC(i,t,n){let s=2166136261;for(let o=0;o<t;o++)s^=i[o].uid,s=Math.imul(s,16777619),s>>>=0;return r_[s]||rC(i,t,s,n)}function rC(i,t,n,s){const o={};let f=0;for(let m=0;m<s;m++){const g=m<t?i[m]:Ee.EMPTY.source;o[f++]=g.source,o[f++]=g.style}const d=new Jm(o);return r_[n]=d,d}class Xv{constructor(t){typeof t=="number"?this.rawBinaryData=new ArrayBuffer(t):t instanceof Uint8Array?this.rawBinaryData=t.buffer:this.rawBinaryData=t,this.uint32View=new Uint32Array(this.rawBinaryData),this.float32View=new Float32Array(this.rawBinaryData),this.size=this.rawBinaryData.byteLength}get int8View(){return this._int8View||(this._int8View=new Int8Array(this.rawBinaryData)),this._int8View}get uint8View(){return this._uint8View||(this._uint8View=new Uint8Array(this.rawBinaryData)),this._uint8View}get int16View(){return this._int16View||(this._int16View=new Int16Array(this.rawBinaryData)),this._int16View}get int32View(){return this._int32View||(this._int32View=new Int32Array(this.rawBinaryData)),this._int32View}get float64View(){return this._float64Array||(this._float64Array=new Float64Array(this.rawBinaryData)),this._float64Array}get bigUint64View(){return this._bigUint64Array||(this._bigUint64Array=new BigUint64Array(this.rawBinaryData)),this._bigUint64Array}view(t){return this[`${t}View`]}destroy(){this.rawBinaryData=null,this.uint32View=null,this.float32View=null,this.uint16View=null,this._int8View=null,this._uint8View=null,this._int16View=null,this._int32View=null,this._float64Array=null,this._bigUint64Array=null}static sizeOf(t){switch(t){case"int8":case"uint8":return 1;case"int16":case"uint16":return 2;case"int32":case"uint32":case"float32":return 4;default:throw new Error(`${t} isn't a valid view type`)}}}function Vv(i,t,n,s){if(n??(n=0),s??(s=Math.min(i.byteLength-n,t.byteLength)),!(n&7)&&!(s&7)){const o=s/8;new Float64Array(t,0,o).set(new Float64Array(i,n,o))}else if(!(n&3)&&!(s&3)){const o=s/4;new Float32Array(t,0,o).set(new Float32Array(i,n,o))}else new Uint8Array(t).set(new Uint8Array(i,n,s))}const oC={normal:"normal-npm",add:"add-npm",screen:"screen-npm"};var cC=(i=>(i[i.DISABLED=0]="DISABLED",i[i.RENDERING_MASK_ADD=1]="RENDERING_MASK_ADD",i[i.MASK_ACTIVE=2]="MASK_ACTIVE",i[i.INVERSE_MASK_ACTIVE=3]="INVERSE_MASK_ACTIVE",i[i.RENDERING_MASK_REMOVE=4]="RENDERING_MASK_REMOVE",i[i.NONE=5]="NONE",i))(cC||{});function Qv(i,t){return t.alphaMode==="no-premultiply-alpha"&&oC[i]||i}const fC=["precision mediump float;","void main(void){","float test = 0.1;","%forloop%","gl_FragColor = vec4(0.0);","}"].join(`
83
+ `);function hC(i){let t="";for(let n=0;n<i;++n)n>0&&(t+=`
84
+ else `),n<i-1&&(t+=`if(test == ${n}.0){}`);return t}function dC(i,t){if(i===0)throw new Error("Invalid value of `0` passed to `checkMaxIfStatementsInShader`");const n=t.createShader(t.FRAGMENT_SHADER);try{for(;;){const s=fC.replace(/%forloop%/gi,hC(i));if(t.shaderSource(n,s),t.compileShader(n),!t.getShaderParameter(n,t.COMPILE_STATUS))i=i/2|0;else break}}finally{t.deleteShader(n)}return i}let yc=null;function mC(){var t;if(yc)return yc;const i=Lx();return yc=i.getParameter(i.MAX_TEXTURE_IMAGE_UNITS),yc=dC(yc,i),(t=i.getExtension("WEBGL_lose_context"))==null||t.loseContext(),yc}class pC{constructor(){this.ids=Object.create(null),this.textures=[],this.count=0}clear(){for(let t=0;t<this.count;t++){const n=this.textures[t];this.textures[t]=null,this.ids[n.uid]=null}this.count=0}}class yC{constructor(){this.renderPipeId="batch",this.action="startBatch",this.start=0,this.size=0,this.textures=new pC,this.blendMode="normal",this.topology="triangle-strip",this.canBundle=!0}destroy(){this.textures=null,this.gpuBindGroup=null,this.bindGroup=null,this.batcher=null,this.elements=null}}const Nh=[];let $m=0;Qh.register({clear:()=>{if(Nh.length>0)for(const i of Nh)i&&i.destroy();Nh.length=0,$m=0}});function Zv(){return $m>0?Nh[--$m]:new yC}function Kv(i){i.elements=null,Nh[$m++]=i}let _h=0;const o_=class c_{constructor(t){this.uid=en("batcher"),this.dirty=!0,this.batchIndex=0,this.batches=[],this._elements=[],t={...c_.defaultOptions,...t},t.maxTextures||(ce("v8.8.0","maxTextures is a required option for Batcher now, please pass it in the options"),t.maxTextures=mC());const{maxTextures:n,attributesInitialSize:s,indicesInitialSize:o}=t;this.attributeBuffer=new Xv(s*4),this.indexBuffer=new Uint16Array(o),this.maxTextures=n}begin(){this.elementSize=0,this.elementStart=0,this.indexSize=0,this.attributeSize=0;for(let t=0;t<this.batchIndex;t++)Kv(this.batches[t]);this.batchIndex=0,this._batchIndexStart=0,this._batchIndexSize=0,this.dirty=!0}add(t){this._elements[this.elementSize++]=t,t._indexStart=this.indexSize,t._attributeStart=this.attributeSize,t._batcher=this,this.indexSize+=t.indexSize,this.attributeSize+=t.attributeSize*this.vertexSize}checkAndUpdateTexture(t,n){const s=t._batch.textures.ids[n._source.uid];return!s&&s!==0?!1:(t._textureId=s,t.texture=n,!0)}updateElement(t){this.dirty=!0;const n=this.attributeBuffer;t.packAsQuad?this.packQuadAttributes(t,n.float32View,n.uint32View,t._attributeStart,t._textureId):this.packAttributes(t,n.float32View,n.uint32View,t._attributeStart,t._textureId)}break(t){const n=this._elements;if(!n[this.elementStart])return;let s=Zv(),o=s.textures;o.clear();const f=n[this.elementStart];let d=Qv(f.blendMode,f.texture._source),m=f.topology;this.attributeSize*4>this.attributeBuffer.size&&this._resizeAttributeBuffer(this.attributeSize*4),this.indexSize>this.indexBuffer.length&&this._resizeIndexBuffer(this.indexSize);const g=this.attributeBuffer.float32View,v=this.attributeBuffer.uint32View,S=this.indexBuffer;let b=this._batchIndexSize,A=this._batchIndexStart,E="startBatch",R=[];const D=this.maxTextures;for(let M=this.elementStart;M<this.elementSize;++M){const O=n[M];n[M]=null;const B=O.texture._source,G=Qv(O.blendMode,B),Z=d!==G||m!==O.topology;if(B._batchTick===_h&&!Z){O._textureId=B._textureBindLocation,b+=O.indexSize,O.packAsQuad?(this.packQuadAttributes(O,g,v,O._attributeStart,O._textureId),this.packQuadIndex(S,O._indexStart,O._attributeStart/this.vertexSize)):(this.packAttributes(O,g,v,O._attributeStart,O._textureId),this.packIndex(O,S,O._indexStart,O._attributeStart/this.vertexSize)),O._batch=s,R.push(O);continue}B._batchTick=_h,(o.count>=D||Z)&&(this._finishBatch(s,A,b-A,o,d,m,t,E,R),E="renderBatch",A=b,d=G,m=O.topology,s=Zv(),o=s.textures,o.clear(),R=[],++_h),O._textureId=B._textureBindLocation=o.count,o.ids[B.uid]=o.count,o.textures[o.count++]=B,O._batch=s,R.push(O),b+=O.indexSize,O.packAsQuad?(this.packQuadAttributes(O,g,v,O._attributeStart,O._textureId),this.packQuadIndex(S,O._indexStart,O._attributeStart/this.vertexSize)):(this.packAttributes(O,g,v,O._attributeStart,O._textureId),this.packIndex(O,S,O._indexStart,O._attributeStart/this.vertexSize))}o.count>0&&(this._finishBatch(s,A,b-A,o,d,m,t,E,R),A=b,++_h),this.elementStart=this.elementSize,this._batchIndexStart=A,this._batchIndexSize=b}_finishBatch(t,n,s,o,f,d,m,g,v){t.gpuBindGroup=null,t.bindGroup=null,t.action=g,t.batcher=this,t.textures=o,t.blendMode=f,t.topology=d,t.start=n,t.size=s,t.elements=v,++_h,this.batches[this.batchIndex++]=t,m.add(t)}finish(t){this.break(t)}ensureAttributeBuffer(t){t*4<=this.attributeBuffer.size||this._resizeAttributeBuffer(t*4)}ensureIndexBuffer(t){t<=this.indexBuffer.length||this._resizeIndexBuffer(t)}_resizeAttributeBuffer(t){const n=Math.max(t,this.attributeBuffer.size*2),s=new Xv(n);Vv(this.attributeBuffer.rawBinaryData,s.rawBinaryData),this.attributeBuffer=s}_resizeIndexBuffer(t){const n=this.indexBuffer;let s=Math.max(t,n.length*1.5);s+=s%2;const o=s>65535?new Uint32Array(s):new Uint16Array(s);if(o.BYTES_PER_ELEMENT!==n.BYTES_PER_ELEMENT)for(let f=0;f<n.length;f++)o[f]=n[f];else Vv(n.buffer,o.buffer);this.indexBuffer=o}packQuadIndex(t,n,s){t[n]=s+0,t[n+1]=s+1,t[n+2]=s+2,t[n+3]=s+0,t[n+4]=s+2,t[n+5]=s+3}packIndex(t,n,s,o){const f=t.indices,d=t.indexSize,m=t.indexOffset,g=t.attributeOffset;for(let v=0;v<d;v++)n[s++]=o+f[v+m]-g}destroy(t={}){var n;if(this.batches!==null){for(let s=0;s<this.batchIndex;s++)Kv(this.batches[s]);this.batches=null,this.geometry.destroy(!0),this.geometry=null,t.shader&&((n=this.shader)==null||n.destroy(),this.shader=null);for(let s=0;s<this._elements.length;s++)this._elements[s]&&(this._elements[s]._batch=null);this._elements=null,this.indexBuffer=null,this.attributeBuffer.destroy(),this.attributeBuffer=null}}};o_.defaultOptions={maxTextures:null,attributesInitialSize:4,indicesInitialSize:6};let gC=o_;var Va=(i=>(i[i.MAP_READ=1]="MAP_READ",i[i.MAP_WRITE=2]="MAP_WRITE",i[i.COPY_SRC=4]="COPY_SRC",i[i.COPY_DST=8]="COPY_DST",i[i.INDEX=16]="INDEX",i[i.VERTEX=32]="VERTEX",i[i.UNIFORM=64]="UNIFORM",i[i.STORAGE=128]="STORAGE",i[i.INDIRECT=256]="INDIRECT",i[i.QUERY_RESOLVE=512]="QUERY_RESOLVE",i[i.STATIC=1024]="STATIC",i))(Va||{});class Yh extends $l{constructor(t){let{data:n,size:s}=t;const{usage:o,label:f,shrinkToFit:d}=t;super(),this._gpuData=Object.create(null),this._gcLastUsed=-1,this.autoGarbageCollect=!0,this.uid=en("buffer"),this._resourceType="buffer",this._resourceId=en("resource"),this._touched=0,this._updateID=1,this._dataInt32=null,this.shrinkToFit=!0,this.destroyed=!1,n instanceof Array&&(n=new Float32Array(n)),this._data=n,s??(s=n==null?void 0:n.byteLength);const m=!!n;this.descriptor={size:s,usage:o,mappedAtCreation:m,label:f},this.shrinkToFit=d??!0}get data(){return this._data}set data(t){this.setDataWithSize(t,t.length,!0)}get dataInt32(){return this._dataInt32||(this._dataInt32=new Int32Array(this.data.buffer)),this._dataInt32}get static(){return!!(this.descriptor.usage&Va.STATIC)}set static(t){t?this.descriptor.usage|=Va.STATIC:this.descriptor.usage&=~Va.STATIC}setDataWithSize(t,n,s){if(this._updateID++,this._updateSize=n*t.BYTES_PER_ELEMENT,this._data===t){s&&this.emit("update",this);return}const o=this._data;if(this._data=t,this._dataInt32=null,!o||o.length!==t.length){!this.shrinkToFit&&o&&t.byteLength<o.byteLength?s&&this.emit("update",this):(this.descriptor.size=t.byteLength,this._resourceId=en("resource"),this.emit("change",this));return}s&&this.emit("update",this)}update(t){this._updateSize=t??this._updateSize,this._updateID++,this.emit("update",this)}unload(){var t;this.emit("unload",this);for(const n in this._gpuData)(t=this._gpuData[n])==null||t.destroy();this._gpuData=Object.create(null)}destroy(){this.destroyed=!0,this.unload(),this.emit("destroy",this),this.emit("change",this),this._data=null,this.descriptor=null,this.removeAllListeners()}}function f_(i,t){if(!(i instanceof Yh)){let n=t?Va.INDEX:Va.VERTEX;i instanceof Array&&(t?(i=new Uint32Array(i),n=Va.INDEX|Va.COPY_DST):(i=new Float32Array(i),n=Va.VERTEX|Va.COPY_DST)),i=new Yh({data:i,label:t?"index-mesh-buffer":"vertex-mesh-buffer",usage:n})}return i}function vC(i,t,n){const s=i.getAttribute(t);if(!s)return n.minX=0,n.minY=0,n.maxX=0,n.maxY=0,n;const o=s.buffer.data;let f=1/0,d=1/0,m=-1/0,g=-1/0;const v=o.BYTES_PER_ELEMENT,S=(s.offset||0)/v,b=(s.stride||8)/v;for(let A=S;A<o.length;A+=b){const E=o[A],R=o[A+1];E>m&&(m=E),R>g&&(g=R),E<f&&(f=E),R<d&&(d=R)}return n.minX=f,n.minY=d,n.maxX=m,n.maxY=g,n}function xC(i){return(i instanceof Yh||Array.isArray(i)||i.BYTES_PER_ELEMENT)&&(i={buffer:i}),i.buffer=f_(i.buffer,!1),i}class _C extends $l{constructor(t={}){super(),this._gpuData=Object.create(null),this.autoGarbageCollect=!0,this._gcLastUsed=-1,this.uid=en("geometry"),this._layoutKey=0,this.instanceCount=1,this._bounds=new Bi,this._boundsDirty=!0;const{attributes:n,indexBuffer:s,topology:o}=t;if(this.buffers=[],this.attributes={},n)for(const f in n)this.addAttribute(f,n[f]);this.instanceCount=t.instanceCount??1,s&&this.addIndex(s),this.topology=o||"triangle-list"}onBufferUpdate(){this._boundsDirty=!0,this.emit("update",this)}getAttribute(t){return this.attributes[t]}getIndex(){return this.indexBuffer}getBuffer(t){return this.getAttribute(t).buffer}getSize(){for(const t in this.attributes){const n=this.attributes[t];return n.buffer.data.length/(n.stride/4||n.size)}return 0}addAttribute(t,n){const s=xC(n);this.buffers.indexOf(s.buffer)===-1&&(this.buffers.push(s.buffer),s.buffer.on("update",this.onBufferUpdate,this),s.buffer.on("change",this.onBufferUpdate,this)),this.attributes[t]=s}addIndex(t){this.indexBuffer=f_(t,!0),this.buffers.push(this.indexBuffer)}get bounds(){return this._boundsDirty?(this._boundsDirty=!1,vC(this,"aPosition",this._bounds)):this._bounds}unload(){var t;this.emit("unload",this);for(const n in this._gpuData)(t=this._gpuData[n])==null||t.destroy();this._gpuData=Object.create(null)}destroy(t=!1){var n;this.emit("destroy",this),this.removeAllListeners(),t&&this.buffers.forEach(s=>s.destroy()),this.unload(),(n=this.indexBuffer)==null||n.destroy(),this.attributes=null,this.buffers=null,this.indexBuffer=null,this._bounds=null}}const SC=new Float32Array(1),bC=new Uint32Array(1);class TC extends _C{constructor(){const n=new Yh({data:SC,label:"attribute-batch-buffer",usage:Va.VERTEX|Va.COPY_DST,shrinkToFit:!1}),s=new Yh({data:bC,label:"index-batch-buffer",usage:Va.INDEX|Va.COPY_DST,shrinkToFit:!1}),o=24;super({attributes:{aPosition:{buffer:n,format:"float32x2",stride:o,offset:0},aUV:{buffer:n,format:"float32x2",stride:o,offset:8},aColor:{buffer:n,format:"unorm8x4",stride:o,offset:16},aTextureIdAndRound:{buffer:n,format:"uint16x2",stride:o,offset:20}},indexBuffer:s})}}function kv(i,t,n){if(i)for(const s in i){const o=s.toLocaleLowerCase(),f=t[o];if(f){let d=i[s];s==="header"&&(d=d.replace(/@in\s+[^;]+;\s*/g,"").replace(/@out\s+[^;]+;\s*/g,"")),n&&f.push(`//----${n}----//`),f.push(d)}else Da(`${s} placement hook does not exist in shader`)}}const EC=/\{\{(.*?)\}\}/g;function Jv(i){var s;const t={};return(((s=i.match(EC))==null?void 0:s.map(o=>o.replace(/[{()}]/g,"")))??[]).forEach(o=>{t[o]=[]}),t}function Pv(i,t){let n;const s=/@in\s+([^;]+);/g;for(;(n=s.exec(i))!==null;)t.push(n[1])}function Wv(i,t,n=!1){const s=[];Pv(t,s),i.forEach(m=>{m.header&&Pv(m.header,s)});const o=s;n&&o.sort();const f=o.map((m,g)=>` @location(${g}) ${m},`).join(`
85
+ `);let d=t.replace(/@in\s+[^;]+;\s*/g,"");return d=d.replace("{{in}}",`
86
+ ${f}
87
+ `),d}function Fv(i,t){let n;const s=/@out\s+([^;]+);/g;for(;(n=s.exec(i))!==null;)t.push(n[1])}function CC(i){const n=/\b(\w+)\s*:/g.exec(i);return n?n[1]:""}function AC(i){const t=/@.*?\s+/g;return i.replace(t,"")}function MC(i,t){const n=[];Fv(t,n),i.forEach(g=>{g.header&&Fv(g.header,n)});let s=0;const o=n.sort().map(g=>g.indexOf("builtin")>-1?g:`@location(${s++}) ${g}`).join(`,
88
+ `),f=n.sort().map(g=>` var ${AC(g)};`).join(`
89
+ `),d=`return VSOutput(
90
+ ${n.sort().map(g=>` ${CC(g)}`).join(`,
91
+ `)});`;let m=t.replace(/@out\s+[^;]+;\s*/g,"");return m=m.replace("{{struct}}",`
92
+ ${o}
93
+ `),m=m.replace("{{start}}",`
94
+ ${f}
95
+ `),m=m.replace("{{return}}",`
96
+ ${d}
97
+ `),m}function Iv(i,t){let n=i;for(const s in t){const o=t[s];o.join(`
98
+ `).length?n=n.replace(`{{${s}}}`,`//-----${s} START-----//
99
+ ${o.join(`
100
+ `)}
101
+ //----${s} FINISH----//`):n=n.replace(`{{${s}}}`,"")}return n}const Hu=Object.create(null),Oy=new Map;let RC=0;function zC({template:i,bits:t}){const n=h_(i,t);if(Hu[n])return Hu[n];const{vertex:s,fragment:o}=OC(i,t);return Hu[n]=d_(s,o,t),Hu[n]}function DC({template:i,bits:t}){const n=h_(i,t);return Hu[n]||(Hu[n]=d_(i.vertex,i.fragment,t)),Hu[n]}function OC(i,t){const n=t.map(d=>d.vertex).filter(d=>!!d),s=t.map(d=>d.fragment).filter(d=>!!d);let o=Wv(n,i.vertex,!0);o=MC(n,o);const f=Wv(s,i.fragment,!0);return{vertex:o,fragment:f}}function h_(i,t){return t.map(n=>(Oy.has(n)||Oy.set(n,RC++),Oy.get(n))).sort((n,s)=>n-s).join("-")+i.vertex+i.fragment}function d_(i,t,n){const s=Jv(i),o=Jv(t);return n.forEach(f=>{kv(f.vertex,s,f.name),kv(f.fragment,o,f.name)}),{vertex:Iv(i,s),fragment:Iv(t,o)}}const NC=`
102
+ @in aPosition: vec2<f32>;
103
+ @in aUV: vec2<f32>;
104
+
105
+ @out @builtin(position) vPosition: vec4<f32>;
106
+ @out vUV : vec2<f32>;
107
+ @out vColor : vec4<f32>;
108
+
109
+ {{header}}
110
+
111
+ struct VSOutput {
112
+ {{struct}}
113
+ };
114
+
115
+ @vertex
116
+ fn main( {{in}} ) -> VSOutput {
117
+
118
+ var worldTransformMatrix = globalUniforms.uWorldTransformMatrix;
119
+ var modelMatrix = mat3x3<f32>(
120
+ 1.0, 0.0, 0.0,
121
+ 0.0, 1.0, 0.0,
122
+ 0.0, 0.0, 1.0
123
+ );
124
+ var position = aPosition;
125
+ var uv = aUV;
126
+
127
+ {{start}}
128
+
129
+ vColor = vec4<f32>(1., 1., 1., 1.);
130
+
131
+ {{main}}
132
+
133
+ vUV = uv;
134
+
135
+ var modelViewProjectionMatrix = globalUniforms.uProjectionMatrix * worldTransformMatrix * modelMatrix;
136
+
137
+ vPosition = vec4<f32>((modelViewProjectionMatrix * vec3<f32>(position, 1.0)).xy, 0.0, 1.0);
138
+
139
+ vColor *= globalUniforms.uWorldColorAlpha;
140
+
141
+ {{end}}
142
+
143
+ {{return}}
144
+ };
145
+ `,UC=`
146
+ @in vUV : vec2<f32>;
147
+ @in vColor : vec4<f32>;
148
+
149
+ {{header}}
150
+
151
+ @fragment
152
+ fn main(
153
+ {{in}}
154
+ ) -> @location(0) vec4<f32> {
155
+
156
+ {{start}}
157
+
158
+ var outColor:vec4<f32>;
159
+
160
+ {{main}}
161
+
162
+ var finalColor:vec4<f32> = outColor * vColor;
163
+
164
+ {{end}}
165
+
166
+ return finalColor;
167
+ };
168
+ `,BC=`
169
+ in vec2 aPosition;
170
+ in vec2 aUV;
171
+
172
+ out vec4 vColor;
173
+ out vec2 vUV;
174
+
175
+ {{header}}
176
+
177
+ void main(void){
178
+
179
+ mat3 worldTransformMatrix = uWorldTransformMatrix;
180
+ mat3 modelMatrix = mat3(
181
+ 1.0, 0.0, 0.0,
182
+ 0.0, 1.0, 0.0,
183
+ 0.0, 0.0, 1.0
184
+ );
185
+ vec2 position = aPosition;
186
+ vec2 uv = aUV;
187
+
188
+ {{start}}
189
+
190
+ vColor = vec4(1.);
191
+
192
+ {{main}}
193
+
194
+ vUV = uv;
195
+
196
+ mat3 modelViewProjectionMatrix = uProjectionMatrix * worldTransformMatrix * modelMatrix;
197
+
198
+ gl_Position = vec4((modelViewProjectionMatrix * vec3(position, 1.0)).xy, 0.0, 1.0);
199
+
200
+ vColor *= uWorldColorAlpha;
201
+
202
+ {{end}}
203
+ }
204
+ `,wC=`
205
+
206
+ in vec4 vColor;
207
+ in vec2 vUV;
208
+
209
+ out vec4 finalColor;
210
+
211
+ {{header}}
212
+
213
+ void main(void) {
214
+
215
+ {{start}}
216
+
217
+ vec4 outColor;
218
+
219
+ {{main}}
220
+
221
+ finalColor = outColor * vColor;
222
+
223
+ {{end}}
224
+ }
225
+ `,HC={name:"global-uniforms-bit",vertex:{header:`
226
+ struct GlobalUniforms {
227
+ uProjectionMatrix:mat3x3<f32>,
228
+ uWorldTransformMatrix:mat3x3<f32>,
229
+ uWorldColorAlpha: vec4<f32>,
230
+ uResolution: vec2<f32>,
231
+ }
232
+
233
+ @group(0) @binding(0) var<uniform> globalUniforms : GlobalUniforms;
234
+ `}},GC={name:"global-uniforms-bit",vertex:{header:`
235
+ uniform mat3 uProjectionMatrix;
236
+ uniform mat3 uWorldTransformMatrix;
237
+ uniform vec4 uWorldColorAlpha;
238
+ uniform vec2 uResolution;
239
+ `}};function jC({bits:i,name:t}){const n=zC({template:{fragment:UC,vertex:NC},bits:[HC,...i]});return Zh.from({name:t,vertex:{source:n.vertex,entryPoint:"main"},fragment:{source:n.fragment,entryPoint:"main"}})}function qC({bits:i,name:t}){return new Dg({name:t,...DC({template:{vertex:BC,fragment:wC},bits:[GC,...i]})})}const YC={name:"color-bit",vertex:{header:`
240
+ @in aColor: vec4<f32>;
241
+ `,main:`
242
+ vColor *= vec4<f32>(aColor.rgb * aColor.a, aColor.a);
243
+ `}},LC={name:"color-bit",vertex:{header:`
244
+ in vec4 aColor;
245
+ `,main:`
246
+ vColor *= vec4(aColor.rgb * aColor.a, aColor.a);
247
+ `}},Ny={};function XC(i){const t=[];if(i===1)t.push("@group(1) @binding(0) var textureSource1: texture_2d<f32>;"),t.push("@group(1) @binding(1) var textureSampler1: sampler;");else{let n=0;for(let s=0;s<i;s++)t.push(`@group(1) @binding(${n++}) var textureSource${s+1}: texture_2d<f32>;`),t.push(`@group(1) @binding(${n++}) var textureSampler${s+1}: sampler;`)}return t.join(`
248
+ `)}function VC(i){const t=[];if(i===1)t.push("outColor = textureSampleGrad(textureSource1, textureSampler1, vUV, uvDx, uvDy);");else{t.push("switch vTextureId {");for(let n=0;n<i;n++)n===i-1?t.push(" default:{"):t.push(` case ${n}:{`),t.push(` outColor = textureSampleGrad(textureSource${n+1}, textureSampler${n+1}, vUV, uvDx, uvDy);`),t.push(" break;}");t.push("}")}return t.join(`
249
+ `)}function QC(i){return Ny[i]||(Ny[i]={name:"texture-batch-bit",vertex:{header:`
250
+ @in aTextureIdAndRound: vec2<u32>;
251
+ @out @interpolate(flat) vTextureId : u32;
252
+ `,main:`
253
+ vTextureId = aTextureIdAndRound.y;
254
+ `,end:`
255
+ if(aTextureIdAndRound.x == 1)
256
+ {
257
+ vPosition = vec4<f32>(roundPixels(vPosition.xy, globalUniforms.uResolution), vPosition.zw);
258
+ }
259
+ `},fragment:{header:`
260
+ @in @interpolate(flat) vTextureId: u32;
261
+
262
+ ${XC(i)}
263
+ `,main:`
264
+ var uvDx = dpdx(vUV);
265
+ var uvDy = dpdy(vUV);
266
+
267
+ ${VC(i)}
268
+ `}}),Ny[i]}const Uy={};function ZC(i){const t=[];for(let n=0;n<i;n++)n>0&&t.push("else"),n<i-1&&t.push(`if(vTextureId < ${n}.5)`),t.push("{"),t.push(` outColor = texture(uTextures[${n}], vUV);`),t.push("}");return t.join(`
269
+ `)}function KC(i){return Uy[i]||(Uy[i]={name:"texture-batch-bit",vertex:{header:`
270
+ in vec2 aTextureIdAndRound;
271
+ out float vTextureId;
272
+
273
+ `,main:`
274
+ vTextureId = aTextureIdAndRound.y;
275
+ `,end:`
276
+ if(aTextureIdAndRound.x == 1.)
277
+ {
278
+ gl_Position.xy = roundPixels(gl_Position.xy, uResolution);
279
+ }
280
+ `},fragment:{header:`
281
+ in float vTextureId;
282
+
283
+ uniform sampler2D uTextures[${i}];
284
+
285
+ `,main:`
286
+
287
+ ${ZC(i)}
288
+ `}}),Uy[i]}const kC={name:"round-pixels-bit",vertex:{header:`
289
+ fn roundPixels(position: vec2<f32>, targetSize: vec2<f32>) -> vec2<f32>
290
+ {
291
+ return (floor(((position * 0.5 + 0.5) * targetSize) + 0.5) / targetSize) * 2.0 - 1.0;
292
+ }
293
+ `}},JC={name:"round-pixels-bit",vertex:{header:`
294
+ vec2 roundPixels(vec2 position, vec2 targetSize)
295
+ {
296
+ return (floor(((position * 0.5 + 0.5) * targetSize) + 0.5) / targetSize) * 2.0 - 1.0;
297
+ }
298
+ `}},$v={};function PC(i){let t=$v[i];if(t)return t;const n=new Int32Array(i);for(let s=0;s<i;s++)n[s]=s;return t=$v[i]=new Kx({uTextures:{value:n,type:"i32",size:i}},{isStatic:!0}),t}class t1 extends dp{constructor(t){const n=qC({name:"batch",bits:[LC,KC(t),JC]}),s=jC({name:"batch",bits:[YC,QC(t),kC]});super({glProgram:n,gpuProgram:s,resources:{batchSamplers:PC(t)}}),this.maxTextures=t}}let Sh=null;const m_=class p_ extends gC{constructor(t){super(t),this.geometry=new TC,this.name=p_.extension.name,this.vertexSize=6,Sh??(Sh=new t1(t.maxTextures)),this.shader=Sh}packAttributes(t,n,s,o,f){const d=f<<16|t.roundPixels&65535,m=t.transform,g=m.a,v=m.b,S=m.c,b=m.d,A=m.tx,E=m.ty,{positions:R,uvs:D}=t,M=t.color,O=t.attributeOffset,U=O+t.attributeSize;for(let B=O;B<U;B++){const G=B*2,Z=R[G],V=R[G+1];n[o++]=g*Z+S*V+A,n[o++]=b*V+v*Z+E,n[o++]=D[G],n[o++]=D[G+1],s[o++]=M,s[o++]=d}}packQuadAttributes(t,n,s,o,f){const d=t.texture,m=t.transform,g=m.a,v=m.b,S=m.c,b=m.d,A=m.tx,E=m.ty,R=t.bounds,D=R.maxX,M=R.minX,O=R.maxY,U=R.minY,B=d.uvs,G=t.color,Z=f<<16|t.roundPixels&65535;n[o+0]=g*M+S*U+A,n[o+1]=b*U+v*M+E,n[o+2]=B.x0,n[o+3]=B.y0,s[o+4]=G,s[o+5]=Z,n[o+6]=g*D+S*U+A,n[o+7]=b*U+v*D+E,n[o+8]=B.x1,n[o+9]=B.y1,s[o+10]=G,s[o+11]=Z,n[o+12]=g*D+S*O+A,n[o+13]=b*O+v*D+E,n[o+14]=B.x2,n[o+15]=B.y2,s[o+16]=G,s[o+17]=Z,n[o+18]=g*M+S*O+A,n[o+19]=b*O+v*M+E,n[o+20]=B.x3,n[o+21]=B.y3,s[o+22]=G,s[o+23]=Z}_updateMaxTextures(t){this.shader.maxTextures!==t&&(Sh=new t1(t),this.shader=Sh)}destroy(){this.shader=null,super.destroy()}};m_.extension={type:[kt.Batcher],name:"default"};let WC=m_;class Kh{constructor(t){this.items=Object.create(null);const{renderer:n,type:s,onUnload:o,priority:f,name:d}=t;this._renderer=n,n.gc.addResourceHash(this,"items",s,f??0),this._onUnload=o,this.name=d}add(t){return this.items[t.uid]?!1:(this.items[t.uid]=t,t.once("unload",this.remove,this),t._gcLastUsed=this._renderer.gc.now,!0)}remove(t,...n){var o;if(!this.items[t.uid])return;const s=t._gpuData[this._renderer.uid];s&&((o=this._onUnload)==null||o.call(this,t,...n),s.destroy(),t._gpuData[this._renderer.uid]=null,this.items[t.uid]=null)}removeAll(...t){Object.values(this.items).forEach(n=>n&&this.remove(n,...t))}destroy(...t){this.removeAll(...t),this.items=Object.create(null),this._renderer=null,this._onUnload=null}}function FC(i,t,n,s,o,f,d,m=null){let g=0;n*=t,o*=f;const v=m.a,S=m.b,b=m.c,A=m.d,E=m.tx,R=m.ty;for(;g<d;){const D=i[n],M=i[n+1];s[o]=v*D+b*M+E,s[o+1]=S*D+A*M+R,o+=f,n+=t,g++}}function IC(i,t,n,s){let o=0;for(t*=n;o<s;)i[t]=0,i[t+1]=0,t+=n,o++}function y_(i,t,n,s,o){const f=t.a,d=t.b,m=t.c,g=t.d,v=t.tx,S=t.ty;n||(n=0),s||(s=2),o||(o=i.length/s-n);let b=n*s;for(let A=0;A<o;A++){const E=i[b],R=i[b+1];i[b]=f*E+m*R+v,i[b+1]=d*E+g*R+S,b+=s}}const $C=new ne;class Hg{constructor(){this.packAsQuad=!1,this.batcherName="default",this.topology="triangle-list",this.applyTransform=!0,this.roundPixels=0,this._batcher=null,this._batch=null}get uvs(){return this.geometryData.uvs}get positions(){return this.geometryData.vertices}get indices(){return this.geometryData.indices}get blendMode(){return this.renderable&&this.applyTransform?this.renderable.groupBlendMode:"normal"}get color(){const t=this.baseColor,n=t>>16|t&65280|(t&255)<<16,s=this.renderable;return s?bx(n,s.groupColor)+(this.alpha*s.groupAlpha*255<<24):n+(this.alpha*255<<24)}get transform(){var t;return((t=this.renderable)==null?void 0:t.groupTransform)||$C}copyTo(t){t.indexOffset=this.indexOffset,t.indexSize=this.indexSize,t.attributeOffset=this.attributeOffset,t.attributeSize=this.attributeSize,t.baseColor=this.baseColor,t.alpha=this.alpha,t.texture=this.texture,t.geometryData=this.geometryData,t.topology=this.topology}reset(){this.applyTransform=!0,this.renderable=null,this.topology="triangle-list"}destroy(){this.renderable=null,this.texture=null,this.geometryData=null,this._batcher=null,this._batch=null}}const Lh={extension:{type:kt.ShapeBuilder,name:"circle"},build(i,t){let n,s,o,f,d,m;if(i.type==="circle"){const G=i;if(d=m=G.radius,d<=0)return!1;n=G.x,s=G.y,o=f=0}else if(i.type==="ellipse"){const G=i;if(d=G.halfWidth,m=G.halfHeight,d<=0||m<=0)return!1;n=G.x,s=G.y,o=f=0}else{const G=i,Z=G.width/2,V=G.height/2;n=G.x+Z,s=G.y+V,d=m=Math.max(0,Math.min(G.radius,Math.min(Z,V))),o=Z-d,f=V-m}if(o<0||f<0)return!1;const g=Math.ceil(2.3*Math.sqrt(d+m)),v=g*8+(o?4:0)+(f?4:0);if(v===0)return!1;if(g===0)return t[0]=t[6]=n+o,t[1]=t[3]=s+f,t[2]=t[4]=n-o,t[5]=t[7]=s-f,!0;let S=0,b=g*4+(o?2:0)+2,A=b,E=v,R=o+d,D=f,M=n+R,O=n-R,U=s+D;if(t[S++]=M,t[S++]=U,t[--b]=U,t[--b]=O,f){const G=s-D;t[A++]=O,t[A++]=G,t[--E]=G,t[--E]=M}for(let G=1;G<g;G++){const Z=Math.PI/2*(G/g),V=o+Math.cos(Z)*d,K=f+Math.sin(Z)*m,pt=n+V,ct=n-V,ht=s+K,dt=s-K;t[S++]=pt,t[S++]=ht,t[--b]=ht,t[--b]=ct,t[A++]=ct,t[A++]=dt,t[--E]=dt,t[--E]=pt}R=o,D=f+m,M=n+R,O=n-R,U=s+D;const B=s-D;return t[S++]=M,t[S++]=U,t[--E]=B,t[--E]=M,o&&(t[S++]=O,t[S++]=U,t[--E]=B,t[--E]=O),!0},triangulate(i,t,n,s,o,f){if(i.length===0)return;let d=0,m=0;for(let S=0;S<i.length;S+=2)d+=i[S],m+=i[S+1];d/=i.length/2,m/=i.length/2;let g=s;t[g*n]=d,t[g*n+1]=m;const v=g++;for(let S=0;S<i.length;S+=2)t[g*n]=i[S],t[g*n+1]=i[S+1],S>0&&(o[f++]=g,o[f++]=v,o[f++]=g-1),g++;o[f++]=v+1,o[f++]=v,o[f++]=g-1}},tA={...Lh,extension:{...Lh.extension,name:"ellipse"}},eA={...Lh,extension:{...Lh.extension,name:"roundedRectangle"}},g_=1e-4,e1=1e-4;function nA(i){const t=i.length;if(t<6)return 1;let n=0;for(let s=0,o=i[t-2],f=i[t-1];s<t;s+=2){const d=i[s],m=i[s+1];n+=(d-o)*(m+f),o=d,f=m}return n<0?-1:1}function n1(i,t,n,s,o,f,d,m){const g=i-n*o,v=t-s*o,S=i+n*f,b=t+s*f;let A,E;d?(A=s,E=-n):(A=-s,E=n);const R=g+A,D=v+E,M=S+A,O=b+E;return m.push(R,D),m.push(M,O),2}function qr(i,t,n,s,o,f,d,m){const g=n-i,v=s-t;let S=Math.atan2(g,v),b=Math.atan2(o-i,f-t);m&&S<b?S+=Math.PI*2:!m&&S>b&&(b+=Math.PI*2);let A=S;const E=b-S,R=Math.abs(E),D=Math.sqrt(g*g+v*v),M=(15*R*Math.sqrt(D)/Math.PI>>0)+1,O=E/M;if(A+=O,m){d.push(i,t),d.push(n,s);for(let U=1,B=A;U<M;U++,B+=O)d.push(i,t),d.push(i+Math.sin(B)*D,t+Math.cos(B)*D);d.push(i,t),d.push(o,f)}else{d.push(n,s),d.push(i,t);for(let U=1,B=A;U<M;U++,B+=O)d.push(i+Math.sin(B)*D,t+Math.cos(B)*D),d.push(i,t);d.push(o,f),d.push(i,t)}return M*2}function aA(i,t,n,s,o,f){const d=g_;if(i.length===0)return;const m=t;let g=m.alignment;if(t.alignment!==.5){let et=nA(i);g=(g-.5)*et+.5}const v=new sa(i[0],i[1]),S=new sa(i[i.length-2],i[i.length-1]),b=s,A=Math.abs(v.x-S.x)<d&&Math.abs(v.y-S.y)<d;if(b){i=i.slice(),A&&(i.pop(),i.pop(),S.set(i[i.length-2],i[i.length-1]));const et=(v.x+S.x)*.5,ft=(S.y+v.y)*.5;i.unshift(et,ft),i.push(et,ft)}const E=o,R=i.length/2;let D=i.length;const M=E.length/2,O=m.width/2,U=O*O,B=m.miterLimit*m.miterLimit;let G=i[0],Z=i[1],V=i[2],K=i[3],pt=0,ct=0,ht=-(Z-K),dt=G-V,vt=0,_t=0,xt=Math.sqrt(ht*ht+dt*dt);ht/=xt,dt/=xt,ht*=O,dt*=O;const Dt=g,w=(1-Dt)*2,H=Dt*2;b||(m.cap==="round"?D+=qr(G-ht*(w-H)*.5,Z-dt*(w-H)*.5,G-ht*w,Z-dt*w,G+ht*H,Z+dt*H,E,!0)+2:m.cap==="square"&&(D+=n1(G,Z,ht,dt,w,H,!0,E))),E.push(G-ht*w,Z-dt*w),E.push(G+ht*H,Z+dt*H);for(let et=1;et<R-1;++et){G=i[(et-1)*2],Z=i[(et-1)*2+1],V=i[et*2],K=i[et*2+1],pt=i[(et+1)*2],ct=i[(et+1)*2+1],ht=-(Z-K),dt=G-V,xt=Math.sqrt(ht*ht+dt*dt),ht/=xt,dt/=xt,ht*=O,dt*=O,vt=-(K-ct),_t=V-pt,xt=Math.sqrt(vt*vt+_t*_t),vt/=xt,_t/=xt,vt*=O,_t*=O;const ft=V-G,j=Z-K,I=V-pt,st=ct-K,yt=ft*I+j*st,Tt=j*I-st*ft,Ot=Tt<0;if(Math.abs(Tt)<.001*Math.abs(yt)){E.push(V-ht*w,K-dt*w),E.push(V+ht*H,K+dt*H),yt>=0&&(m.join==="round"?D+=qr(V,K,V-ht*w,K-dt*w,V-vt*w,K-_t*w,E,!1)+4:D+=2,E.push(V-vt*H,K-_t*H),E.push(V+vt*w,K+_t*w));continue}const Ut=(-ht+G)*(-dt+K)-(-ht+V)*(-dt+Z),re=(-vt+pt)*(-_t+K)-(-vt+V)*(-_t+ct),ue=(ft*re-I*Ut)/Tt,ra=(st*Ut-j*re)/Tt,Oa=(ue-V)*(ue-V)+(ra-K)*(ra-K),Un=V+(ue-V)*w,Qn=K+(ra-K)*w,rn=V-(ue-V)*H,Zn=K-(ra-K)*H,ts=Math.min(ft*ft+j*j,I*I+st*st),Za=Ot?w:H,ju=ts+Za*Za*U;Oa<=ju?m.join==="bevel"||Oa/U>B?(Ot?(E.push(Un,Qn),E.push(V+ht*H,K+dt*H),E.push(Un,Qn),E.push(V+vt*H,K+_t*H)):(E.push(V-ht*w,K-dt*w),E.push(rn,Zn),E.push(V-vt*w,K-_t*w),E.push(rn,Zn)),D+=2):m.join==="round"?Ot?(E.push(Un,Qn),E.push(V+ht*H,K+dt*H),D+=qr(V,K,V+ht*H,K+dt*H,V+vt*H,K+_t*H,E,!0)+4,E.push(Un,Qn),E.push(V+vt*H,K+_t*H)):(E.push(V-ht*w,K-dt*w),E.push(rn,Zn),D+=qr(V,K,V-ht*w,K-dt*w,V-vt*w,K-_t*w,E,!1)+4,E.push(V-vt*w,K-_t*w),E.push(rn,Zn)):(E.push(Un,Qn),E.push(rn,Zn)):(E.push(V-ht*w,K-dt*w),E.push(V+ht*H,K+dt*H),m.join==="round"?Ot?D+=qr(V,K,V+ht*H,K+dt*H,V+vt*H,K+_t*H,E,!0)+2:D+=qr(V,K,V-ht*w,K-dt*w,V-vt*w,K-_t*w,E,!1)+2:m.join==="miter"&&Oa/U<=B&&(Ot?(E.push(rn,Zn),E.push(rn,Zn)):(E.push(Un,Qn),E.push(Un,Qn)),D+=2),E.push(V-vt*w,K-_t*w),E.push(V+vt*H,K+_t*H),D+=2)}G=i[(R-2)*2],Z=i[(R-2)*2+1],V=i[(R-1)*2],K=i[(R-1)*2+1],ht=-(Z-K),dt=G-V,xt=Math.sqrt(ht*ht+dt*dt),ht/=xt,dt/=xt,ht*=O,dt*=O,E.push(V-ht*w,K-dt*w),E.push(V+ht*H,K+dt*H),b||(m.cap==="round"?D+=qr(V-ht*(w-H)*.5,K-dt*(w-H)*.5,V-ht*w,K-dt*w,V+ht*H,K+dt*H,E,!1)+2:m.cap==="square"&&(D+=n1(V,K,ht,dt,w,H,!1,E)));const at=e1*e1;for(let et=M;et<D+M-2;++et)G=E[et*2],Z=E[et*2+1],V=E[(et+1)*2],K=E[(et+1)*2+1],pt=E[(et+2)*2],ct=E[(et+2)*2+1],!(Math.abs(G*(K-ct)+V*(ct-Z)+pt*(Z-K))<at)&&f.push(et,et+1,et+2)}function iA(i,t,n,s){const o=g_;if(i.length===0)return;const f=i[0],d=i[1],m=i[i.length-2],g=i[i.length-1],v=t||Math.abs(f-m)<o&&Math.abs(d-g)<o,S=n,b=i.length/2,A=S.length/2;for(let E=0;E<b;E++)S.push(i[E*2]),S.push(i[E*2+1]);for(let E=0;E<b-1;E++)s.push(A+E,A+E+1);v&&s.push(A+b-1,A)}function v_(i,t,n,s,o,f,d){const m=kE(i,t,2);if(!m)return;for(let v=0;v<m.length;v+=3)f[d++]=m[v]+o,f[d++]=m[v+1]+o,f[d++]=m[v+2]+o;let g=o*s;for(let v=0;v<i.length;v+=2)n[g]=i[v],n[g+1]=i[v+1],g+=s}const lA=[],sA={extension:{type:kt.ShapeBuilder,name:"polygon"},build(i,t){for(let n=0;n<i.points.length;n++)t[n]=i.points[n];return!0},triangulate(i,t,n,s,o,f){v_(i,lA,t,n,s,o,f)}},uA={extension:{type:kt.ShapeBuilder,name:"rectangle"},build(i,t){const n=i,s=n.x,o=n.y,f=n.width,d=n.height;return f>0&&d>0?(t[0]=s,t[1]=o,t[2]=s+f,t[3]=o,t[4]=s+f,t[5]=o+d,t[6]=s,t[7]=o+d,!0):!1},triangulate(i,t,n,s,o,f){let d=0;s*=n,t[s+d]=i[0],t[s+d+1]=i[1],d+=n,t[s+d]=i[2],t[s+d+1]=i[3],d+=n,t[s+d]=i[6],t[s+d+1]=i[7],d+=n,t[s+d]=i[4],t[s+d+1]=i[5],d+=n;const m=s/n;o[f++]=m,o[f++]=m+1,o[f++]=m+2,o[f++]=m+1,o[f++]=m+3,o[f++]=m+2}},rA={extension:{type:kt.ShapeBuilder,name:"triangle"},build(i,t){return t[0]=i.x,t[1]=i.y,t[2]=i.x2,t[3]=i.y2,t[4]=i.x3,t[5]=i.y3,!0},triangulate(i,t,n,s,o,f){let d=0;s*=n,t[s+d]=i[0],t[s+d+1]=i[1],d+=n,t[s+d]=i[2],t[s+d+1]=i[3],d+=n,t[s+d]=i[4],t[s+d+1]=i[5];const m=s/n;o[f++]=m,o[f++]=m+1,o[f++]=m+2}},a1=[{offset:0,color:"white"},{offset:1,color:"black"}],Gg=class rg{constructor(...t){this.uid=en("fillGradient"),this._tick=0,this.type="linear",this.colorStops=[];let n=oA(t);n={...n.type==="radial"?rg.defaultRadialOptions:rg.defaultLinearOptions,...fx(n)},this._textureSize=n.textureSize,this._wrapMode=n.wrapMode,n.type==="radial"?(this.center=n.center,this.outerCenter=n.outerCenter??this.center,this.innerRadius=n.innerRadius,this.outerRadius=n.outerRadius,this.scale=n.scale,this.rotation=n.rotation):(this.start=n.start,this.end=n.end),this.textureSpace=n.textureSpace,this.type=n.type,n.colorStops.forEach(o=>{this.addColorStop(o.offset,o.color)})}addColorStop(t,n){return this.colorStops.push({offset:t,color:Sn.shared.setValue(n).toHexa()}),this}buildLinearGradient(){if(this.texture)return;let{x:t,y:n}=this.start,{x:s,y:o}=this.end,f=s-t,d=o-n;const m=f<0||d<0;if(this._wrapMode==="clamp-to-edge"){if(f<0){const M=t;t=s,s=M,f*=-1}if(d<0){const M=n;n=o,o=M,d*=-1}}const g=this.colorStops.length?this.colorStops:a1,v=this._textureSize,{canvas:S,context:b}=l1(v,1),A=m?b.createLinearGradient(this._textureSize,0,0,0):b.createLinearGradient(0,0,this._textureSize,0);i1(A,g),b.fillStyle=A,b.fillRect(0,0,v,1),this.texture=new Ee({source:new Fm({resource:S,addressMode:this._wrapMode})});const E=Math.sqrt(f*f+d*d),R=Math.atan2(d,f),D=new ne;D.scale(E/v,1),D.rotate(R),D.translate(t,n),this.textureSpace==="local"&&D.scale(v,v),this.transform=D}buildGradient(){this.texture||this._tick++,this.type==="linear"?this.buildLinearGradient():this.buildRadialGradient()}buildRadialGradient(){if(this.texture)return;const t=this.colorStops.length?this.colorStops:a1,n=this._textureSize,{canvas:s,context:o}=l1(n,n),{x:f,y:d}=this.center,{x:m,y:g}=this.outerCenter,v=this.innerRadius,S=this.outerRadius,b=m-S,A=g-S,E=n/(S*2),R=(f-b)*E,D=(d-A)*E,M=o.createRadialGradient(R,D,v*E,(m-b)*E,(g-A)*E,S*E);i1(M,t),o.fillStyle=t[t.length-1].color,o.fillRect(0,0,n,n),o.fillStyle=M,o.translate(R,D),o.rotate(this.rotation),o.scale(1,this.scale),o.translate(-R,-D),o.fillRect(0,0,n,n),this.texture=new Ee({source:new Fm({resource:s,addressMode:this._wrapMode})});const O=new ne;O.scale(1/E,1/E),O.translate(b,A),this.textureSpace==="local"&&O.scale(n,n),this.transform=O}destroy(){var t;(t=this.texture)==null||t.destroy(!0),this.texture=null,this.transform=null,this.colorStops=[],this.start=null,this.end=null,this.center=null,this.outerCenter=null}get styleKey(){return`fill-gradient-${this.uid}-${this._tick}`}};Gg.defaultLinearOptions={start:{x:0,y:0},end:{x:0,y:1},colorStops:[],textureSpace:"local",type:"linear",textureSize:256,wrapMode:"clamp-to-edge"};Gg.defaultRadialOptions={center:{x:.5,y:.5},innerRadius:0,outerRadius:.5,colorStops:[],scale:1,textureSpace:"local",type:"radial",textureSize:256,wrapMode:"clamp-to-edge"};let Ls=Gg;function i1(i,t){for(let n=0;n<t.length;n++){const s=t[n];i.addColorStop(s.offset,s.color)}}function l1(i,t){const n=si.get().createCanvas(i,t),s=n.getContext("2d");return{canvas:n,context:s}}function oA(i){let t=i[0]??{};return(typeof t=="number"||i[1])&&(ce("8.5.2","use options object instead"),t={type:"linear",start:{x:i[0],y:i[1]},end:{x:i[2],y:i[3]},textureSpace:i[4],textureSize:i[5]??Ls.defaultLinearOptions.textureSize}),t}const cA=new ne,fA=new un;function hA(i,t,n,s){const o=t.matrix?i.copyFrom(t.matrix).invert():i.identity();if(t.textureSpace==="local"){const d=n.getBounds(fA);t.width&&d.pad(t.width);const{x:m,y:g}=d,v=1/d.width,S=1/d.height,b=-m*v,A=-g*S,E=o.a,R=o.b,D=o.c,M=o.d;o.a*=v,o.b*=v,o.c*=S,o.d*=S,o.tx=b*E+A*D+o.tx,o.ty=b*R+A*M+o.ty}else o.translate(t.texture.frame.x,t.texture.frame.y),o.scale(1/t.texture.source.width,1/t.texture.source.height);const f=t.texture.source.style;return!(t.fill instanceof Ls)&&f.addressMode==="clamp-to-edge"&&(f.addressMode="repeat",f.update()),s&&o.append(cA.copyFrom(s).invert()),o}const mp={};ke.handleByMap(kt.ShapeBuilder,mp);ke.add(uA,sA,rA,Lh,tA,eA);const dA=new un,mA=new ne;function pA(i,t){const{geometryData:n,batches:s}=t;s.length=0,n.indices.length=0,n.vertices.length=0,n.uvs.length=0;for(let o=0;o<i.instructions.length;o++){const f=i.instructions[o];if(f.action==="texture")yA(f.data,s,n);else if(f.action==="fill"||f.action==="stroke"){const d=f.action==="stroke",m=f.data.path.shapePath,g=f.data.style,v=f.data.hole;d&&v&&s1(v.shapePath,g,!0,s,n),v&&(m.shapePrimitives[m.shapePrimitives.length-1].holes=v.shapePath.shapePrimitives),s1(m,g,d,s,n)}}}function yA(i,t,n){const s=[],o=mp.rectangle,f=dA;f.x=i.dx,f.y=i.dy,f.width=i.dw,f.height=i.dh;const d=i.transform;if(!o.build(f,s))return;const{vertices:m,uvs:g,indices:v}=n,S=v.length,b=m.length/2;d&&y_(s,d),o.triangulate(s,m,2,b,v,S);const A=i.image,E=A.uvs;g.push(E.x0,E.y0,E.x1,E.y1,E.x3,E.y3,E.x2,E.y2);const R=Qa.get(Hg);R.indexOffset=S,R.indexSize=v.length-S,R.attributeOffset=b,R.attributeSize=m.length/2-b,R.baseColor=i.style,R.alpha=i.alpha,R.texture=A,R.geometryData=n,t.push(R)}function s1(i,t,n,s,o){const{vertices:f,uvs:d,indices:m}=o;i.shapePrimitives.forEach(({shape:g,transform:v,holes:S})=>{const b=[],A=mp[g.type];if(!A.build(g,b))return;const E=m.length,R=f.length/2;let D="triangle-list";if(v&&y_(b,v),n){const B=g.closePath??!0,G=t;G.pixelLine?(iA(b,B,f,m),D="line-list"):aA(b,G,!1,B,f,m)}else if(S){const B=[],G=b.slice();gA(S).forEach(V=>{B.push(G.length/2),G.push(...V)}),v_(G,B,f,2,R,m,E)}else A.triangulate(b,f,2,R,m,E);const M=d.length/2,O=t.texture;if(O!==Ee.WHITE){const B=hA(mA,t,g,v);FC(f,2,R,d,M,2,f.length/2-R,B)}else IC(d,M,2,f.length/2-R);const U=Qa.get(Hg);U.indexOffset=E,U.indexSize=m.length-E,U.attributeOffset=R,U.attributeSize=f.length/2-R,U.baseColor=t.color,U.alpha=t.alpha,U.texture=O,U.geometryData=o,U.topology=D,s.push(U)})}function gA(i){const t=[];for(let n=0;n<i.length;n++){const s=i[n].shape,o=[];mp[s.type].build(s,o)&&t.push(o)}return t}class vA{constructor(){this.batches=[],this.geometryData={vertices:[],uvs:[],indices:[]}}reset(){this.batches&&this.batches.forEach(t=>{Qa.return(t)}),this.graphicsData&&Qa.return(this.graphicsData),this.isBatchable=!1,this.context=null,this.batches.length=0,this.geometryData.indices.length=0,this.geometryData.vertices.length=0,this.geometryData.uvs.length=0,this.graphicsData=null}destroy(){this.reset(),this.batches=null,this.geometryData=null}}class xA{constructor(){this.instructions=new Mg}init(t){const n=t.maxTextures;this.batcher?this.batcher._updateMaxTextures(n):this.batcher=new WC({maxTextures:n}),this.instructions.reset()}get geometry(){return ce(pT,"GraphicsContextRenderData#geometry is deprecated, please use batcher.geometry instead."),this.batcher.geometry}destroy(){this.batcher.destroy(),this.instructions.destroy(),this.batcher=null,this.instructions=null}}const jg=class og{constructor(t){this._renderer=t,this._managedContexts=new Kh({renderer:t,type:"resource",name:"graphicsContext"})}init(t){og.defaultOptions.bezierSmoothness=(t==null?void 0:t.bezierSmoothness)??og.defaultOptions.bezierSmoothness}getContextRenderData(t){return t._gpuData[this._renderer.uid].graphicsData||this._initContextRenderData(t)}updateGpuContext(t){const n=!!t._gpuData[this._renderer.uid],s=t._gpuData[this._renderer.uid]||this._initContext(t);if(t.dirty||!n){n&&s.reset(),pA(t,s);const o=t.batchMode;t.customShader||o==="no-batch"?s.isBatchable=!1:o==="auto"?s.isBatchable=s.geometryData.vertices.length<400:s.isBatchable=!0,t.dirty=!1}return s}getGpuContext(t){return t._gpuData[this._renderer.uid]||this._initContext(t)}_initContextRenderData(t){const n=Qa.get(xA,{maxTextures:this._renderer.limits.maxBatchableTextures}),s=t._gpuData[this._renderer.uid],{batches:o,geometryData:f}=s;s.graphicsData=n;const d=f.vertices.length,m=f.indices.length;for(let b=0;b<o.length;b++)o[b].applyTransform=!1;const g=n.batcher;g.ensureAttributeBuffer(d),g.ensureIndexBuffer(m),g.begin();for(let b=0;b<o.length;b++){const A=o[b];g.add(A)}g.finish(n.instructions);const v=g.geometry;v.indexBuffer.setDataWithSize(g.indexBuffer,g.indexSize,!0),v.buffers[0].setDataWithSize(g.attributeBuffer.float32View,g.attributeSize,!0);const S=g.batches;for(let b=0;b<S.length;b++){const A=S[b];A.bindGroup=uC(A.textures.textures,A.textures.count,this._renderer.limits.maxBatchableTextures)}return n}_initContext(t){const n=new vA;return n.context=t,t._gpuData[this._renderer.uid]=n,this._managedContexts.add(t),n}destroy(){this._managedContexts.destroy(),this._renderer=null}};jg.extension={type:[kt.WebGLSystem,kt.WebGPUSystem],name:"graphicsContext"};jg.defaultOptions={bezierSmoothness:.5};let qg=jg;const _A=8,Ym=11920929e-14,SA=1;function x_(i,t,n,s,o,f,d,m,g,v){const b=Math.min(.99,Math.max(0,v??qg.defaultOptions.bezierSmoothness));let A=(SA-b)/1;return A*=A,bA(t,n,s,o,f,d,m,g,i,A),i}function bA(i,t,n,s,o,f,d,m,g,v){cg(i,t,n,s,o,f,d,m,g,v,0),g.push(d,m)}function cg(i,t,n,s,o,f,d,m,g,v,S){if(S>_A)return;const b=(i+n)/2,A=(t+s)/2,E=(n+o)/2,R=(s+f)/2,D=(o+d)/2,M=(f+m)/2,O=(b+E)/2,U=(A+R)/2,B=(E+D)/2,G=(R+M)/2,Z=(O+B)/2,V=(U+G)/2;if(S>0){let K=d-i,pt=m-t;const ct=Math.abs((n-d)*pt-(s-m)*K),ht=Math.abs((o-d)*pt-(f-m)*K);if(ct>Ym&&ht>Ym){if((ct+ht)*(ct+ht)<=v*(K*K+pt*pt)){g.push(Z,V);return}}else if(ct>Ym){if(ct*ct<=v*(K*K+pt*pt)){g.push(Z,V);return}}else if(ht>Ym){if(ht*ht<=v*(K*K+pt*pt)){g.push(Z,V);return}}else if(K=Z-(i+d)/2,pt=V-(t+m)/2,K*K+pt*pt<=v){g.push(Z,V);return}}cg(i,t,b,A,O,U,Z,V,g,v,S+1),cg(Z,V,B,G,D,M,d,m,g,v,S+1)}const TA=8,EA=11920929e-14,CA=1;function AA(i,t,n,s,o,f,d,m){const v=Math.min(.99,Math.max(0,m??qg.defaultOptions.bezierSmoothness));let S=(CA-v)/1;return S*=S,MA(t,n,s,o,f,d,i,S),i}function MA(i,t,n,s,o,f,d,m){fg(d,i,t,n,s,o,f,m,0),d.push(o,f)}function fg(i,t,n,s,o,f,d,m,g){if(g>TA)return;const v=(t+s)/2,S=(n+o)/2,b=(s+f)/2,A=(o+d)/2,E=(v+b)/2,R=(S+A)/2;let D=f-t,M=d-n;const O=Math.abs((s-f)*M-(o-d)*D);if(O>EA){if(O*O<=m*(D*D+M*M)){i.push(E,R);return}}else if(D=E-(t+f)/2,M=R-(n+d)/2,D*D+M*M<=m){i.push(E,R);return}fg(i,t,n,v,S,E,R,m,g+1),fg(i,E,R,b,A,f,d,m,g+1)}function __(i,t,n,s,o,f,d,m){let g=Math.abs(o-f);(!d&&o>f||d&&f>o)&&(g=2*Math.PI-g),m||(m=Math.max(6,Math.floor(6*Math.pow(s,1/3)*(g/Math.PI)))),m=Math.max(m,3);let v=g/m,S=o;v*=d?-1:1;for(let b=0;b<m+1;b++){const A=Math.cos(S),E=Math.sin(S),R=t+A*s,D=n+E*s;i.push(R,D),S+=v}}function RA(i,t,n,s,o,f){const d=i[i.length-2],g=i[i.length-1]-n,v=d-t,S=o-n,b=s-t,A=Math.abs(g*b-v*S);if(A<1e-8||f===0){(i[i.length-2]!==t||i[i.length-1]!==n)&&i.push(t,n);return}const E=g*g+v*v,R=S*S+b*b,D=g*S+v*b,M=f*Math.sqrt(E)/A,O=f*Math.sqrt(R)/A,U=M*D/E,B=O*D/R,G=M*b+O*v,Z=M*S+O*g,V=v*(O+U),K=g*(O+U),pt=b*(M+B),ct=S*(M+B),ht=Math.atan2(K-Z,V-G),dt=Math.atan2(ct-Z,pt-G);__(i,G+t,Z+n,f,ht,dt,v*S>b*g)}const Uh=Math.PI*2,By={centerX:0,centerY:0,ang1:0,ang2:0},wy=({x:i,y:t},n,s,o,f,d,m,g)=>{i*=n,t*=s;const v=o*i-f*t,S=f*i+o*t;return g.x=v+d,g.y=S+m,g};function zA(i,t){const n=t===-1.5707963267948966?-.551915024494:1.3333333333333333*Math.tan(t/4),s=t===1.5707963267948966?.551915024494:n,o=Math.cos(i),f=Math.sin(i),d=Math.cos(i+t),m=Math.sin(i+t);return[{x:o-f*s,y:f+o*s},{x:d+m*s,y:m-d*s},{x:d,y:m}]}const u1=(i,t,n,s)=>{const o=i*s-t*n<0?-1:1;let f=i*n+t*s;return f>1&&(f=1),f<-1&&(f=-1),o*Math.acos(f)},DA=(i,t,n,s,o,f,d,m,g,v,S,b,A)=>{const E=Math.pow(o,2),R=Math.pow(f,2),D=Math.pow(S,2),M=Math.pow(b,2);let O=E*R-E*M-R*D;O<0&&(O=0),O/=E*M+R*D,O=Math.sqrt(O)*(d===m?-1:1);const U=O*o/f*b,B=O*-f/o*S,G=v*U-g*B+(i+n)/2,Z=g*U+v*B+(t+s)/2,V=(S-U)/o,K=(b-B)/f,pt=(-S-U)/o,ct=(-b-B)/f,ht=u1(1,0,V,K);let dt=u1(V,K,pt,ct);m===0&&dt>0&&(dt-=Uh),m===1&&dt<0&&(dt+=Uh),A.centerX=G,A.centerY=Z,A.ang1=ht,A.ang2=dt};function OA(i,t,n,s,o,f,d,m=0,g=0,v=0){if(f===0||d===0)return;const S=Math.sin(m*Uh/360),b=Math.cos(m*Uh/360),A=b*(t-s)/2+S*(n-o)/2,E=-S*(t-s)/2+b*(n-o)/2;if(A===0&&E===0)return;f=Math.abs(f),d=Math.abs(d);const R=Math.pow(A,2)/Math.pow(f,2)+Math.pow(E,2)/Math.pow(d,2);R>1&&(f*=Math.sqrt(R),d*=Math.sqrt(R)),DA(t,n,s,o,f,d,g,v,S,b,A,E,By);let{ang1:D,ang2:M}=By;const{centerX:O,centerY:U}=By;let B=Math.abs(M)/(Uh/4);Math.abs(1-B)<1e-7&&(B=1);const G=Math.max(Math.ceil(B),1);M/=G;let Z=i[i.length-2],V=i[i.length-1];const K={x:0,y:0};for(let pt=0;pt<G;pt++){const ct=zA(D,M),{x:ht,y:dt}=wy(ct[0],f,d,b,S,O,U,K),{x:vt,y:_t}=wy(ct[1],f,d,b,S,O,U,K),{x:xt,y:Dt}=wy(ct[2],f,d,b,S,O,U,K);x_(i,Z,V,ht,dt,vt,_t,xt,Dt),Z=xt,V=Dt,D+=M}}function NA(i,t,n){const s=(d,m)=>{const g=m.x-d.x,v=m.y-d.y,S=Math.sqrt(g*g+v*v),b=g/S,A=v/S;return{len:S,nx:b,ny:A}},o=(d,m)=>{d===0?i.moveTo(m.x,m.y):i.lineTo(m.x,m.y)};let f=t[t.length-1];for(let d=0;d<t.length;d++){const m=t[d%t.length],g=m.radius??n;if(g<=0){o(d,m),f=m;continue}const v=t[(d+1)%t.length],S=s(m,f),b=s(m,v);if(S.len<1e-4||b.len<1e-4){o(d,m),f=m;continue}let A=Math.asin(S.nx*b.ny-S.ny*b.nx),E=1,R=!1;S.nx*b.nx-S.ny*-b.ny<0?A<0?A=Math.PI+A:(A=Math.PI-A,E=-1,R=!0):A>0&&(E=-1,R=!0);const D=A/2;let M,O=Math.abs(Math.cos(D)*g/Math.sin(D));O>Math.min(S.len/2,b.len/2)?(O=Math.min(S.len/2,b.len/2),M=Math.abs(O*Math.sin(D)/Math.cos(D))):M=g;const U=m.x+b.nx*O+-b.ny*M*E,B=m.y+b.ny*O+b.nx*M*E,G=Math.atan2(S.ny,S.nx)+Math.PI/2*E,Z=Math.atan2(b.ny,b.nx)-Math.PI/2*E;d===0&&i.moveTo(U+Math.cos(G)*M,B+Math.sin(G)*M),i.arc(U,B,M,G,Z,R),f=m}}function UA(i,t,n,s){const o=(m,g)=>Math.sqrt((m.x-g.x)**2+(m.y-g.y)**2),f=(m,g,v)=>({x:m.x+(g.x-m.x)*v,y:m.y+(g.y-m.y)*v}),d=t.length;for(let m=0;m<d;m++){const g=t[(m+1)%d],v=g.radius??n;if(v<=0){m===0?i.moveTo(g.x,g.y):i.lineTo(g.x,g.y);continue}const S=t[m],b=t[(m+2)%d],A=o(S,g);let E;if(A<1e-4)E=g;else{const M=Math.min(A/2,v);E=f(g,S,M/A)}const R=o(b,g);let D;if(R<1e-4)D=g;else{const M=Math.min(R/2,v);D=f(g,b,M/R)}m===0?i.moveTo(E.x,E.y):i.lineTo(E.x,E.y),i.quadraticCurveTo(g.x,g.y,D.x,D.y,s)}}const BA=new un;class wA{constructor(t){this.shapePrimitives=[],this._currentPoly=null,this._bounds=new Bi,this._graphicsPath2D=t,this.signed=t.checkForHoles}moveTo(t,n){return this.startPoly(t,n),this}lineTo(t,n){this._ensurePoly();const s=this._currentPoly.points,o=s[s.length-2],f=s[s.length-1];return(o!==t||f!==n)&&s.push(t,n),this}arc(t,n,s,o,f,d){this._ensurePoly(!1);const m=this._currentPoly.points;return __(m,t,n,s,o,f,d),this}arcTo(t,n,s,o,f){this._ensurePoly();const d=this._currentPoly.points;return RA(d,t,n,s,o,f),this}arcToSvg(t,n,s,o,f,d,m){const g=this._currentPoly.points;return OA(g,this._currentPoly.lastX,this._currentPoly.lastY,d,m,t,n,s,o,f),this}bezierCurveTo(t,n,s,o,f,d,m){this._ensurePoly();const g=this._currentPoly;return x_(this._currentPoly.points,g.lastX,g.lastY,t,n,s,o,f,d,m),this}quadraticCurveTo(t,n,s,o,f){this._ensurePoly();const d=this._currentPoly;return AA(this._currentPoly.points,d.lastX,d.lastY,t,n,s,o,f),this}closePath(){return this.endPoly(!0),this}addPath(t,n){this.endPoly(),n&&!n.isIdentity()&&(t=t.clone(!0),t.transform(n));const s=this.shapePrimitives,o=s.length;for(let f=0;f<t.instructions.length;f++){const d=t.instructions[f];this[d.action](...d.data)}if(t.checkForHoles&&s.length-o>1){let f=null;for(let d=o;d<s.length;d++){const m=s[d];if(m.shape.type==="polygon"){const g=m.shape,v=f==null?void 0:f.shape;v&&v.containsPolygon(g)?(f.holes||(f.holes=[]),f.holes.push(m),s.copyWithin(d,d+1),s.length--,d--):f=m}}}return this}finish(t=!1){this.endPoly(t)}rect(t,n,s,o,f){return this.drawShape(new un(t,n,s,o),f),this}circle(t,n,s,o){return this.drawShape(new Ug(t,n,s),o),this}poly(t,n,s){const o=new Oh(t);return o.closePath=n,this.drawShape(o,s),this}regularPoly(t,n,s,o,f=0,d){o=Math.max(o|0,3);const m=-1*Math.PI/2+f,g=Math.PI*2/o,v=[];for(let S=0;S<o;S++){const b=m-S*g;v.push(t+s*Math.cos(b),n+s*Math.sin(b))}return this.poly(v,!0,d),this}roundPoly(t,n,s,o,f,d=0,m){if(o=Math.max(o|0,3),f<=0)return this.regularPoly(t,n,s,o,d);const g=s*Math.sin(Math.PI/o)-.001;f=Math.min(f,g);const v=-1*Math.PI/2+d,S=Math.PI*2/o,b=(o-2)*Math.PI/o/2;for(let A=0;A<o;A++){const E=A*S+v,R=t+s*Math.cos(E),D=n+s*Math.sin(E),M=E+Math.PI+b,O=E-Math.PI-b,U=R+f*Math.cos(M),B=D+f*Math.sin(M),G=R+f*Math.cos(O),Z=D+f*Math.sin(O);A===0?this.moveTo(U,B):this.lineTo(U,B),this.quadraticCurveTo(R,D,G,Z,m)}return this.closePath()}roundShape(t,n,s=!1,o){return t.length<3?this:(s?UA(this,t,n,o):NA(this,t,n),this.closePath())}filletRect(t,n,s,o,f){if(f===0)return this.rect(t,n,s,o);const d=Math.min(s,o)/2,m=Math.min(d,Math.max(-d,f)),g=t+s,v=n+o,S=m<0?-m:0,b=Math.abs(m);return this.moveTo(t,n+b).arcTo(t+S,n+S,t+b,n,b).lineTo(g-b,n).arcTo(g-S,n+S,g,n+b,b).lineTo(g,v-b).arcTo(g-S,v-S,t+s-b,v,b).lineTo(t+b,v).arcTo(t+S,v-S,t,v-b,b).closePath()}chamferRect(t,n,s,o,f,d){if(f<=0)return this.rect(t,n,s,o);const m=Math.min(f,Math.min(s,o)/2),g=t+s,v=n+o,S=[t+m,n,g-m,n,g,n+m,g,v-m,g-m,v,t+m,v,t,v-m,t,n+m];for(let b=S.length-1;b>=2;b-=2)S[b]===S[b-2]&&S[b-1]===S[b-3]&&S.splice(b-1,2);return this.poly(S,!0,d)}ellipse(t,n,s,o,f){return this.drawShape(new Bg(t,n,s,o),f),this}roundRect(t,n,s,o,f,d){return this.drawShape(new wg(t,n,s,o,f),d),this}drawShape(t,n){return this.endPoly(),this.shapePrimitives.push({shape:t,transform:n}),this}startPoly(t,n){let s=this._currentPoly;return s&&this.endPoly(),s=new Oh,s.points.push(t,n),this._currentPoly=s,this}endPoly(t=!1){const n=this._currentPoly;return n&&n.points.length>2&&(n.closePath=t,this.shapePrimitives.push({shape:n})),this._currentPoly=null,this}_ensurePoly(t=!0){if(!this._currentPoly&&(this._currentPoly=new Oh,t)){const n=this.shapePrimitives[this.shapePrimitives.length-1];if(n){let s=n.shape.x,o=n.shape.y;if(n.transform&&!n.transform.isIdentity()){const f=n.transform,d=s;s=f.a*s+f.c*o+f.tx,o=f.b*d+f.d*o+f.ty}this._currentPoly.points.push(s,o)}else this._currentPoly.points.push(0,0)}}buildPath(){const t=this._graphicsPath2D;this.shapePrimitives.length=0,this._currentPoly=null;for(let n=0;n<t.instructions.length;n++){const s=t.instructions[n];this[s.action](...s.data)}this.finish()}get bounds(){const t=this._bounds;t.clear();const n=this.shapePrimitives;for(let s=0;s<n.length;s++){const o=n[s],f=o.shape.getBounds(BA);o.transform?t.addRect(f,o.transform):t.addRect(f)}return t}}class qs{constructor(t,n=!1){this.instructions=[],this.uid=en("graphicsPath"),this._dirty=!0,this.checkForHoles=n,typeof t=="string"?aC(t,this):this.instructions=(t==null?void 0:t.slice())??[]}get shapePath(){return this._shapePath||(this._shapePath=new wA(this)),this._dirty&&(this._dirty=!1,this._shapePath.buildPath()),this._shapePath}addPath(t,n){return t=t.clone(),this.instructions.push({action:"addPath",data:[t,n]}),this._dirty=!0,this}arc(...t){return this.instructions.push({action:"arc",data:t}),this._dirty=!0,this}arcTo(...t){return this.instructions.push({action:"arcTo",data:t}),this._dirty=!0,this}arcToSvg(...t){return this.instructions.push({action:"arcToSvg",data:t}),this._dirty=!0,this}bezierCurveTo(...t){return this.instructions.push({action:"bezierCurveTo",data:t}),this._dirty=!0,this}bezierCurveToShort(t,n,s,o,f){const d=this.instructions[this.instructions.length-1],m=this.getLastPoint(sa.shared);let g=0,v=0;if(!d||d.action!=="bezierCurveTo")g=m.x,v=m.y;else{g=d.data[2],v=d.data[3];const S=m.x,b=m.y;g=S+(S-g),v=b+(b-v)}return this.instructions.push({action:"bezierCurveTo",data:[g,v,t,n,s,o,f]}),this._dirty=!0,this}closePath(){return this.instructions.push({action:"closePath",data:[]}),this._dirty=!0,this}ellipse(...t){return this.instructions.push({action:"ellipse",data:t}),this._dirty=!0,this}lineTo(...t){return this.instructions.push({action:"lineTo",data:t}),this._dirty=!0,this}moveTo(...t){return this.instructions.push({action:"moveTo",data:t}),this}quadraticCurveTo(...t){return this.instructions.push({action:"quadraticCurveTo",data:t}),this._dirty=!0,this}quadraticCurveToShort(t,n,s){const o=this.instructions[this.instructions.length-1],f=this.getLastPoint(sa.shared);let d=0,m=0;if(!o||o.action!=="quadraticCurveTo")d=f.x,m=f.y;else{d=o.data[0],m=o.data[1];const g=f.x,v=f.y;d=g+(g-d),m=v+(v-m)}return this.instructions.push({action:"quadraticCurveTo",data:[d,m,t,n,s]}),this._dirty=!0,this}rect(t,n,s,o,f){return this.instructions.push({action:"rect",data:[t,n,s,o,f]}),this._dirty=!0,this}circle(t,n,s,o){return this.instructions.push({action:"circle",data:[t,n,s,o]}),this._dirty=!0,this}roundRect(...t){return this.instructions.push({action:"roundRect",data:t}),this._dirty=!0,this}poly(...t){return this.instructions.push({action:"poly",data:t}),this._dirty=!0,this}regularPoly(...t){return this.instructions.push({action:"regularPoly",data:t}),this._dirty=!0,this}roundPoly(...t){return this.instructions.push({action:"roundPoly",data:t}),this._dirty=!0,this}roundShape(...t){return this.instructions.push({action:"roundShape",data:t}),this._dirty=!0,this}filletRect(...t){return this.instructions.push({action:"filletRect",data:t}),this._dirty=!0,this}chamferRect(...t){return this.instructions.push({action:"chamferRect",data:t}),this._dirty=!0,this}star(t,n,s,o,f,d,m){f||(f=o/2);const g=-1*Math.PI/2+d,v=s*2,S=Math.PI*2/v,b=[];for(let A=0;A<v;A++){const E=A%2?f:o,R=A*S+g;b.push(t+E*Math.cos(R),n+E*Math.sin(R))}return this.poly(b,!0,m),this}clone(t=!1){const n=new qs;if(n.checkForHoles=this.checkForHoles,!t)n.instructions=this.instructions.slice();else for(let s=0;s<this.instructions.length;s++){const o=this.instructions[s];n.instructions.push({action:o.action,data:o.data.slice()})}return n}clear(){return this.instructions.length=0,this._dirty=!0,this}transform(t){if(t.isIdentity())return this;const n=t.a,s=t.b,o=t.c,f=t.d,d=t.tx,m=t.ty;let g=0,v=0,S=0,b=0,A=0,E=0,R=0,D=0;for(let M=0;M<this.instructions.length;M++){const O=this.instructions[M],U=O.data;switch(O.action){case"moveTo":case"lineTo":g=U[0],v=U[1],U[0]=n*g+o*v+d,U[1]=s*g+f*v+m;break;case"bezierCurveTo":S=U[0],b=U[1],A=U[2],E=U[3],g=U[4],v=U[5],U[0]=n*S+o*b+d,U[1]=s*S+f*b+m,U[2]=n*A+o*E+d,U[3]=s*A+f*E+m,U[4]=n*g+o*v+d,U[5]=s*g+f*v+m;break;case"quadraticCurveTo":S=U[0],b=U[1],g=U[2],v=U[3],U[0]=n*S+o*b+d,U[1]=s*S+f*b+m,U[2]=n*g+o*v+d,U[3]=s*g+f*v+m;break;case"arcToSvg":g=U[5],v=U[6],R=U[0],D=U[1],U[0]=n*R+o*D,U[1]=s*R+f*D,U[5]=n*g+o*v+d,U[6]=s*g+f*v+m;break;case"circle":U[4]=bh(U[3],t);break;case"rect":U[4]=bh(U[4],t);break;case"ellipse":U[8]=bh(U[8],t);break;case"roundRect":U[5]=bh(U[5],t);break;case"addPath":U[0].transform(t);break;case"poly":U[2]=bh(U[2],t);break;default:Da("unknown transform action",O.action);break}}return this._dirty=!0,this}get bounds(){return this.shapePath.bounds}getLastPoint(t){let n=this.instructions.length-1,s=this.instructions[n];if(!s)return t.x=0,t.y=0,t;for(;s.action==="closePath";){if(n--,n<0)return t.x=0,t.y=0,t;s=this.instructions[n]}switch(s.action){case"moveTo":case"lineTo":t.x=s.data[0],t.y=s.data[1];break;case"quadraticCurveTo":t.x=s.data[2],t.y=s.data[3];break;case"bezierCurveTo":t.x=s.data[4],t.y=s.data[5];break;case"arc":case"arcToSvg":t.x=s.data[5],t.y=s.data[6];break;case"addPath":s.data[0].getLastPoint(t);break}return t}}function bh(i,t){return i?i.prepend(t):t.clone()}function $e(i,t,n){const s=i.getAttribute(t);return s?Number(s):n}function HA(i,t){const n=i.querySelectorAll("defs");for(let s=0;s<n.length;s++){const o=n[s];for(let f=0;f<o.children.length;f++){const d=o.children[f];switch(d.nodeName.toLowerCase()){case"lineargradient":t.defs[d.id]=GA(d);break;case"radialgradient":t.defs[d.id]=jA();break}}}}function GA(i){const t=$e(i,"x1",0),n=$e(i,"y1",0),s=$e(i,"x2",1),o=$e(i,"y2",0),f=i.getAttribute("gradientUnits")||"objectBoundingBox",d=new Ls(t,n,s,o,f==="objectBoundingBox"?"local":"global");for(let m=0;m<i.children.length;m++){const g=i.children[m],v=$e(g,"offset",0),S=Sn.shared.setValue(g.getAttribute("stop-color")).toNumber();d.addColorStop(v,S)}return d}function jA(i){return Da("[SVG Parser] Radial gradients are not yet supported"),new Ls(0,0,1,0)}function r1(i){const t=i.match(/url\s*\(\s*['"]?\s*#([^'"\s)]+)\s*['"]?\s*\)/i);return t?t[1]:""}const o1={fill:{type:"paint",default:0},"fill-opacity":{type:"number",default:1},stroke:{type:"paint",default:0},"stroke-width":{type:"number",default:1},"stroke-opacity":{type:"number",default:1},"stroke-linecap":{type:"string",default:"butt"},"stroke-linejoin":{type:"string",default:"miter"},"stroke-miterlimit":{type:"number",default:10},"stroke-dasharray":{type:"string",default:"none"},"stroke-dashoffset":{type:"number",default:0},opacity:{type:"number",default:1}};function S_(i,t){const n=i.getAttribute("style"),s={},o={},f={strokeStyle:s,fillStyle:o,useFill:!1,useStroke:!1};for(const d in o1){const m=i.getAttribute(d);m&&c1(t,f,d,m.trim())}if(n){const d=n.split(";");for(let m=0;m<d.length;m++){const g=d[m].trim(),[v,S]=g.split(":");o1[v]&&c1(t,f,v,S.trim())}}return{strokeStyle:f.useStroke?s:null,fillStyle:f.useFill?o:null,useFill:f.useFill,useStroke:f.useStroke}}function c1(i,t,n,s){switch(n){case"stroke":if(s!=="none"){if(s.startsWith("url(")){const o=r1(s);t.strokeStyle.fill=i.defs[o]}else t.strokeStyle.color=Sn.shared.setValue(s).toNumber();t.useStroke=!0}break;case"stroke-width":t.strokeStyle.width=Number(s);break;case"fill":if(s!=="none"){if(s.startsWith("url(")){const o=r1(s);t.fillStyle.fill=i.defs[o]}else t.fillStyle.color=Sn.shared.setValue(s).toNumber();t.useFill=!0}break;case"fill-opacity":t.fillStyle.alpha=Number(s);break;case"stroke-opacity":t.strokeStyle.alpha=Number(s);break;case"opacity":t.fillStyle.alpha=Number(s),t.strokeStyle.alpha=Number(s);break}}function qA(i){if(i.length<=2)return!0;const t=i.map(m=>m.area).sort((m,g)=>g-m),[n,s]=t,o=t[t.length-1],f=n/s,d=s/o;return!(f>3&&d<2)}function YA(i){return i.split(/(?=[Mm])/).filter(s=>s.trim().length>0)}function LA(i){const t=i.match(/[-+]?[0-9]*\.?[0-9]+/g);if(!t||t.length<4)return 0;const n=t.map(Number),s=[],o=[];for(let S=0;S<n.length;S+=2)S+1<n.length&&(s.push(n[S]),o.push(n[S+1]));if(s.length===0||o.length===0)return 0;const f=Math.min(...s),d=Math.max(...s),m=Math.min(...o),g=Math.max(...o);return(d-f)*(g-m)}function f1(i,t){const n=new qs(i,!1);for(const s of n.instructions)t.instructions.push(s)}function XA(i,t){if(typeof i=="string"){const d=document.createElement("div");d.innerHTML=i.trim(),i=d.querySelector("svg")}const n={context:t,defs:{},path:new qs};HA(i,n);const s=i.children,{fillStyle:o,strokeStyle:f}=S_(i,n);for(let d=0;d<s.length;d++){const m=s[d];m.nodeName.toLowerCase()!=="defs"&&b_(m,n,o,f)}return t}function b_(i,t,n,s){const o=i.children,{fillStyle:f,strokeStyle:d}=S_(i,t);f&&n?n={...n,...f}:f&&(n=f),d&&s?s={...s,...d}:d&&(s=d);const m=!n&&!s;m&&(n={color:0});let g,v,S,b,A,E,R,D,M,O,U,B,G,Z,V,K,pt;switch(i.nodeName.toLowerCase()){case"path":{Z=i.getAttribute("d");const ct=i.getAttribute("fill-rule"),ht=YA(Z),dt=ct==="evenodd",vt=ht.length>1;if(dt&&vt){const xt=ht.map(w=>({path:w,area:LA(w)}));if(xt.sort((w,H)=>H.area-w.area),ht.length>3||!qA(xt))for(let w=0;w<xt.length;w++){const H=xt[w],at=w===0;t.context.beginPath();const et=new qs(void 0,!0);f1(H.path,et),t.context.path(et),at?(n&&t.context.fill(n),s&&t.context.stroke(s)):t.context.cut()}else for(let w=0;w<xt.length;w++){const H=xt[w],at=w%2===1;t.context.beginPath();const et=new qs(void 0,!0);f1(H.path,et),t.context.path(et),at?t.context.cut():(n&&t.context.fill(n),s&&t.context.stroke(s))}}else{const xt=ct?ct==="evenodd":!0;V=new qs(Z,xt),t.context.path(V),n&&t.context.fill(n),s&&t.context.stroke(s)}break}case"circle":R=$e(i,"cx",0),D=$e(i,"cy",0),M=$e(i,"r",0),t.context.ellipse(R,D,M,M),n&&t.context.fill(n),s&&t.context.stroke(s);break;case"rect":g=$e(i,"x",0),v=$e(i,"y",0),K=$e(i,"width",0),pt=$e(i,"height",0),O=$e(i,"rx",0),U=$e(i,"ry",0),O||U?t.context.roundRect(g,v,K,pt,O||U):t.context.rect(g,v,K,pt),n&&t.context.fill(n),s&&t.context.stroke(s);break;case"ellipse":R=$e(i,"cx",0),D=$e(i,"cy",0),O=$e(i,"rx",0),U=$e(i,"ry",0),t.context.beginPath(),t.context.ellipse(R,D,O,U),n&&t.context.fill(n),s&&t.context.stroke(s);break;case"line":S=$e(i,"x1",0),b=$e(i,"y1",0),A=$e(i,"x2",0),E=$e(i,"y2",0),t.context.beginPath(),t.context.moveTo(S,b),t.context.lineTo(A,E),s&&t.context.stroke(s);break;case"polygon":G=i.getAttribute("points"),B=G.match(/-?\d+/g).map(ct=>parseInt(ct,10)),t.context.poly(B,!0),n&&t.context.fill(n),s&&t.context.stroke(s);break;case"polyline":G=i.getAttribute("points"),B=G.match(/-?\d+/g).map(ct=>parseInt(ct,10)),t.context.poly(B,!1),s&&t.context.stroke(s);break;case"g":case"svg":break;default:{Da(`[SVG parser] <${i.nodeName}> elements unsupported`);break}}m&&(n=null);for(let ct=0;ct<o.length;ct++)b_(o[ct],t,n,s)}const h1={repeat:{addressModeU:"repeat",addressModeV:"repeat"},"repeat-x":{addressModeU:"repeat",addressModeV:"clamp-to-edge"},"repeat-y":{addressModeU:"clamp-to-edge",addressModeV:"repeat"},"no-repeat":{addressModeU:"clamp-to-edge",addressModeV:"clamp-to-edge"}};class pp{constructor(t,n){this.uid=en("fillPattern"),this._tick=0,this.transform=new ne,this.texture=t,this.transform.scale(1/t.frame.width,1/t.frame.height),n&&(t.source.style.addressModeU=h1[n].addressModeU,t.source.style.addressModeV=h1[n].addressModeV)}setTransform(t){const n=this.texture;this.transform.copyFrom(t),this.transform.invert(),this.transform.scale(1/n.frame.width,1/n.frame.height),this._tick++}get texture(){return this._texture}set texture(t){this._texture!==t&&(this._texture=t,this._tick++)}get styleKey(){return`fill-pattern-${this.uid}-${this._tick}`}destroy(){this.texture.destroy(!0),this.texture=null}}function VA(i){return Sn.isColorLike(i)}function d1(i){return i instanceof pp}function m1(i){return i instanceof Ls}function QA(i){return i instanceof Ee}function ZA(i,t,n){const s=Sn.shared.setValue(t??0);return i.color=s.toNumber(),i.alpha=s.alpha===1?n.alpha:s.alpha,i.texture=Ee.WHITE,{...n,...i}}function KA(i,t,n){return i.texture=t,{...n,...i}}function p1(i,t,n){return i.fill=t,i.color=16777215,i.texture=t.texture,i.matrix=t.transform,{...n,...i}}function y1(i,t,n){return t.buildGradient(),i.fill=t,i.color=16777215,i.texture=t.texture,i.matrix=t.transform,i.textureSpace=t.textureSpace,{...n,...i}}function kA(i,t){const n={...t,...i},s=Sn.shared.setValue(n.color);return n.alpha*=s.alpha,n.color=s.toNumber(),n}function kr(i,t){if(i==null)return null;const n={},s=i;return VA(i)?ZA(n,i,t):QA(i)?KA(n,i,t):d1(i)?p1(n,i,t):m1(i)?y1(n,i,t):s.fill&&d1(s.fill)?p1(s,s.fill,t):s.fill&&m1(s.fill)?y1(s,s.fill,t):kA(s,t)}function tp(i,t){const{width:n,alignment:s,miterLimit:o,cap:f,join:d,pixelLine:m,...g}=t,v=kr(i,g);return v?{width:n,alignment:s,miterLimit:o,cap:f,join:d,pixelLine:m,...v}:null}function JA(i,t){let n=1;const s=i.shapePath.shapePrimitives;for(let o=0;o<s.length;o++){const f=s[o].shape;if(f.type!=="polygon")continue;const d=f.points,m=d.length;if(m<6)continue;const g=f.closePath;for(let v=0;v<m;v+=2){if(!g&&(v===0||v===m-2))continue;const S=(v-2+m)%m,b=(v+2)%m,A=d[S],E=d[S+1],R=d[v],D=d[v+1],M=d[b],O=d[b+1],U=A-R,B=E-D,G=M-R,Z=O-D,V=U*U+B*B,K=G*G+Z*Z;if(V<1e-12||K<1e-12)continue;let ht=(U*G+B*Z)/Math.sqrt(V*K);ht<-1?ht=-1:ht>1&&(ht=1);const dt=Math.sqrt((1-ht)*.5);if(dt<1e-6)continue;const vt=Math.min(1/dt,t);vt>n&&(n=vt)}}return n}const PA=new sa,g1=new ne,Yg=class Wl extends $l{constructor(){super(...arguments),this._gpuData=Object.create(null),this.autoGarbageCollect=!0,this._gcLastUsed=-1,this.uid=en("graphicsContext"),this.dirty=!0,this.batchMode="auto",this.instructions=[],this.destroyed=!1,this._activePath=new qs,this._transform=new ne,this._fillStyle={...Wl.defaultFillStyle},this._strokeStyle={...Wl.defaultStrokeStyle},this._stateStack=[],this._tick=0,this._bounds=new Bi,this._boundsDirty=!0}clone(){const t=new Wl;return t.batchMode=this.batchMode,t.instructions=this.instructions.slice(),t._activePath=this._activePath.clone(),t._transform=this._transform.clone(),t._fillStyle={...this._fillStyle},t._strokeStyle={...this._strokeStyle},t._stateStack=this._stateStack.slice(),t._bounds=this._bounds.clone(),t._boundsDirty=!0,t}get fillStyle(){return this._fillStyle}set fillStyle(t){this._fillStyle=kr(t,Wl.defaultFillStyle)}get strokeStyle(){return this._strokeStyle}set strokeStyle(t){this._strokeStyle=tp(t,Wl.defaultStrokeStyle)}setFillStyle(t){return this._fillStyle=kr(t,Wl.defaultFillStyle),this}setStrokeStyle(t){return this._strokeStyle=kr(t,Wl.defaultStrokeStyle),this}texture(t,n,s,o,f,d){return this.instructions.push({action:"texture",data:{image:t,dx:s||0,dy:o||0,dw:f||t.frame.width,dh:d||t.frame.height,transform:this._transform.clone(),alpha:this._fillStyle.alpha,style:n||n===0?Sn.shared.setValue(n).toNumber():16777215}}),this.onUpdate(),this}beginPath(){return this._activePath=new qs,this}fill(t,n){let s;const o=this.instructions[this.instructions.length-1];return this._tick===0&&(o==null?void 0:o.action)==="stroke"?s=o.data.path:s=this._activePath.clone(),s?(t!=null&&(n!==void 0&&typeof t=="number"&&(ce(tn,"GraphicsContext.fill(color, alpha) is deprecated, use GraphicsContext.fill({ color, alpha }) instead"),t={color:t,alpha:n}),this._fillStyle=kr(t,Wl.defaultFillStyle)),this.instructions.push({action:"fill",data:{style:this.fillStyle,path:s}}),this.onUpdate(),this._initNextPathLocation(),this._tick=0,this):this}_initNextPathLocation(){const{x:t,y:n}=this._activePath.getLastPoint(sa.shared);this._activePath.clear(),this._activePath.moveTo(t,n)}stroke(t){let n;const s=this.instructions[this.instructions.length-1];return this._tick===0&&(s==null?void 0:s.action)==="fill"?n=s.data.path:n=this._activePath.clone(),n?(t!=null&&(this._strokeStyle=tp(t,Wl.defaultStrokeStyle)),this.instructions.push({action:"stroke",data:{style:this.strokeStyle,path:n}}),this.onUpdate(),this._initNextPathLocation(),this._tick=0,this):this}cut(){for(let t=0;t<2;t++){const n=this.instructions[this.instructions.length-1-t],s=this._activePath.clone();if(n&&(n.action==="stroke"||n.action==="fill"))if(n.data.hole)n.data.hole.addPath(s);else{n.data.hole=s;break}}return this._initNextPathLocation(),this}arc(t,n,s,o,f,d){this._tick++;const m=this._transform;return this._activePath.arc(m.a*t+m.c*n+m.tx,m.b*t+m.d*n+m.ty,s,o,f,d),this}arcTo(t,n,s,o,f){this._tick++;const d=this._transform;return this._activePath.arcTo(d.a*t+d.c*n+d.tx,d.b*t+d.d*n+d.ty,d.a*s+d.c*o+d.tx,d.b*s+d.d*o+d.ty,f),this}arcToSvg(t,n,s,o,f,d,m){this._tick++;const g=this._transform;return this._activePath.arcToSvg(t,n,s,o,f,g.a*d+g.c*m+g.tx,g.b*d+g.d*m+g.ty),this}bezierCurveTo(t,n,s,o,f,d,m){this._tick++;const g=this._transform;return this._activePath.bezierCurveTo(g.a*t+g.c*n+g.tx,g.b*t+g.d*n+g.ty,g.a*s+g.c*o+g.tx,g.b*s+g.d*o+g.ty,g.a*f+g.c*d+g.tx,g.b*f+g.d*d+g.ty,m),this}closePath(){var t;return this._tick++,(t=this._activePath)==null||t.closePath(),this}ellipse(t,n,s,o){return this._tick++,this._activePath.ellipse(t,n,s,o,this._transform.clone()),this}circle(t,n,s){return this._tick++,this._activePath.circle(t,n,s,this._transform.clone()),this}path(t){return this._tick++,this._activePath.addPath(t,this._transform.clone()),this}lineTo(t,n){this._tick++;const s=this._transform;return this._activePath.lineTo(s.a*t+s.c*n+s.tx,s.b*t+s.d*n+s.ty),this}moveTo(t,n){this._tick++;const s=this._transform,o=this._activePath.instructions,f=s.a*t+s.c*n+s.tx,d=s.b*t+s.d*n+s.ty;return o.length===1&&o[0].action==="moveTo"?(o[0].data[0]=f,o[0].data[1]=d,this):(this._activePath.moveTo(f,d),this)}quadraticCurveTo(t,n,s,o,f){this._tick++;const d=this._transform;return this._activePath.quadraticCurveTo(d.a*t+d.c*n+d.tx,d.b*t+d.d*n+d.ty,d.a*s+d.c*o+d.tx,d.b*s+d.d*o+d.ty,f),this}rect(t,n,s,o){return this._tick++,this._activePath.rect(t,n,s,o,this._transform.clone()),this}roundRect(t,n,s,o,f){return this._tick++,this._activePath.roundRect(t,n,s,o,f,this._transform.clone()),this}poly(t,n){return this._tick++,this._activePath.poly(t,n,this._transform.clone()),this}regularPoly(t,n,s,o,f=0,d){return this._tick++,this._activePath.regularPoly(t,n,s,o,f,d),this}roundPoly(t,n,s,o,f,d){return this._tick++,this._activePath.roundPoly(t,n,s,o,f,d),this}roundShape(t,n,s,o){return this._tick++,this._activePath.roundShape(t,n,s,o),this}filletRect(t,n,s,o,f){return this._tick++,this._activePath.filletRect(t,n,s,o,f),this}chamferRect(t,n,s,o,f,d){return this._tick++,this._activePath.chamferRect(t,n,s,o,f,d),this}star(t,n,s,o,f=0,d=0){return this._tick++,this._activePath.star(t,n,s,o,f,d,this._transform.clone()),this}svg(t){return this._tick++,XA(t,this),this}restore(){const t=this._stateStack.pop();return t&&(this._transform=t.transform,this._fillStyle=t.fillStyle,this._strokeStyle=t.strokeStyle),this}save(){return this._stateStack.push({transform:this._transform.clone(),fillStyle:{...this._fillStyle},strokeStyle:{...this._strokeStyle}}),this}getTransform(){return this._transform}resetTransform(){return this._transform.identity(),this}rotate(t){return this._transform.rotate(t),this}scale(t,n=t){return this._transform.scale(t,n),this}setTransform(t,n,s,o,f,d){return t instanceof ne?(this._transform.set(t.a,t.b,t.c,t.d,t.tx,t.ty),this):(this._transform.set(t,n,s,o,f,d),this)}transform(t,n,s,o,f,d){return t instanceof ne?(this._transform.append(t),this):(g1.set(t,n,s,o,f,d),this._transform.append(g1),this)}translate(t,n=t){return this._transform.translate(t,n),this}clear(){return this._activePath.clear(),this.instructions.length=0,this.resetTransform(),this.onUpdate(),this}onUpdate(){this._boundsDirty=!0,this.dirty=!0,this.emit("update",this,16)}get bounds(){if(!this._boundsDirty)return this._bounds;this._boundsDirty=!1;const t=this._bounds;t.clear();for(let n=0;n<this.instructions.length;n++){const s=this.instructions[n],o=s.action;if(o==="fill"){const f=s.data;t.addBounds(f.path.bounds)}else if(o==="texture"){const f=s.data;t.addFrame(f.dx,f.dy,f.dx+f.dw,f.dy+f.dh,f.transform)}if(o==="stroke"){const f=s.data,d=f.style.alignment;let m=f.style.width*(1-d);f.style.join==="miter"&&(m*=JA(f.path,f.style.miterLimit));const g=f.path.bounds;t.addFrame(g.minX-m,g.minY-m,g.maxX+m,g.maxY+m)}}return t.isValid||t.set(0,0,0,0),t}containsPoint(t){var o;if(!this.bounds.containsPoint(t.x,t.y))return!1;const n=this.instructions;let s=!1;for(let f=0;f<n.length;f++){const d=n[f],m=d.data,g=m.path;if(!d.action||!g)continue;const v=m.style,S=g.shapePath.shapePrimitives;for(let b=0;b<S.length;b++){const A=S[b].shape;if(!v||!A)continue;const E=S[b].transform,R=E?E.applyInverse(t,PA):t;if(d.action==="fill")s=A.contains(R.x,R.y);else{const M=v;s=A.strokeContains(R.x,R.y,M.width,M.alignment)}const D=m.hole;if(D){const M=(o=D.shapePath)==null?void 0:o.shapePrimitives;if(M)for(let O=0;O<M.length;O++)M[O].shape.contains(R.x,R.y)&&(s=!1)}if(s)return!0}}return s}unload(){var t;this.emit("unload",this);for(const n in this._gpuData)(t=this._gpuData[n])==null||t.destroy();this._gpuData=Object.create(null)}destroy(t=!1){if(this.destroyed)return;if(this.destroyed=!0,this._stateStack.length=0,this._transform=null,this.unload(),this.emit("destroy",this),this.removeAllListeners(),typeof t=="boolean"?t:t==null?void 0:t.texture){const s=typeof t=="boolean"?t:t==null?void 0:t.textureSource;this._fillStyle.texture&&(this._fillStyle.fill&&"uid"in this._fillStyle.fill?this._fillStyle.fill.destroy():this._fillStyle.texture.destroy(s)),this._strokeStyle.texture&&(this._strokeStyle.fill&&"uid"in this._strokeStyle.fill?this._strokeStyle.fill.destroy():this._strokeStyle.texture.destroy(s))}this._fillStyle=null,this._strokeStyle=null,this.instructions=null,this._activePath=null,this._bounds=null,this._stateStack=null,this.customShader=null,this._transform=null}};Yg.defaultFillStyle={color:16777215,alpha:1,texture:Ee.WHITE,matrix:null,fill:null,textureSpace:"local"};Yg.defaultStrokeStyle={width:1,color:16777215,alpha:1,alignment:.5,miterLimit:10,cap:"butt",join:"miter",texture:Ee.WHITE,matrix:null,fill:null,textureSpace:"local",pixelLine:!1};let ol=Yg;class WA{constructor(){this.isBatchable=!1}reset(){this.isBatchable=!1,this.context=null,this.graphicsData&&(this.graphicsData.destroy(),this.graphicsData=null)}destroy(){this.reset()}}class FA{constructor(){this.instructions=new Mg}init(){this.instructions.reset()}destroy(){this.instructions.destroy(),this.instructions=null}}const Lg=class hg{constructor(t){this._renderer=t,this._managedContexts=new Kh({renderer:t,type:"resource",name:"graphicsContext"})}init(t){hg.defaultOptions.bezierSmoothness=(t==null?void 0:t.bezierSmoothness)??hg.defaultOptions.bezierSmoothness}getContextRenderData(t){return this.getGpuContext(t).graphicsData||this._initContextRenderData(t)}updateGpuContext(t){const n=t._gpuData,s=!!n[this._renderer.uid],o=n[this._renderer.uid]||this._initContext(t);return(t.dirty||!s)&&(s&&o.reset(),o.isBatchable=!1,t.dirty=!1),o}getGpuContext(t){return t._gpuData[this._renderer.uid]||this._initContext(t)}_initContextRenderData(t){const n=new FA,s=this.getGpuContext(t);return s.graphicsData=n,n.init(),n}_initContext(t){const n=new WA;return n.context=t,t._gpuData[this._renderer.uid]=n,this._managedContexts.add(t),n}destroy(){this._managedContexts.destroy(),this._renderer=null}};Lg.extension={type:[kt.CanvasSystem],name:"graphicsContext"};Lg.defaultOptions={bezierSmoothness:.5};let IA=Lg;class T_{constructor(t,n){this.state=Og.for2d(),this.renderer=t,this._adaptor=n,this.renderer.runners.contextChange.add(this),this._managedGraphics=new Kh({renderer:t,type:"renderable",priority:-1,name:"graphics"})}contextChange(){this._adaptor.contextChange(this.renderer)}validateRenderable(t){return!1}addRenderable(t,n){this._managedGraphics.add(t),this.renderer.renderPipes.batch.break(n),n.add(t)}updateRenderable(t){}execute(t){t.isRenderable&&this._adaptor.execute(this,t)}destroy(){this._managedGraphics.destroy(),this.renderer=null,this._adaptor.destroy(),this._adaptor=null}}T_.extension={type:[kt.CanvasPipes],name:"graphics"};function $A(i,t,n){const s=(i>>24&255)/255;t[n++]=(i&255)/255*s,t[n++]=(i>>8&255)/255*s,t[n++]=(i>>16&255)/255*s,t[n++]=s}class t3{constructor(){this.batches=[],this.batched=!1}destroy(){this.batches.forEach(t=>{Qa.return(t)}),this.batches.length=0}}class E_{constructor(t,n){this.state=Og.for2d(),this.renderer=t,this._adaptor=n,this.renderer.runners.contextChange.add(this),this._managedGraphics=new Kh({renderer:t,type:"renderable",priority:-1,name:"graphics"})}contextChange(){this._adaptor.contextChange(this.renderer)}validateRenderable(t){const n=t.context,s=!!t._gpuData,f=this.renderer.graphicsContext.updateGpuContext(n);return!!(f.isBatchable||s!==f.isBatchable)}addRenderable(t,n){const o=this.renderer.graphicsContext.updateGpuContext(t.context);t.didViewUpdate&&this._rebuild(t),o.isBatchable?this._addToBatcher(t,n):(this.renderer.renderPipes.batch.break(n),n.add(t))}updateRenderable(t){const s=this._getGpuDataForRenderable(t).batches;for(let o=0;o<s.length;o++){const f=s[o];f._batcher.updateElement(f)}}execute(t){if(!t.isRenderable)return;const n=this.renderer,s=t.context;if(!n.graphicsContext.getGpuContext(s).batches.length)return;const f=s.customShader||this._adaptor.shader;this.state.blendMode=t.groupBlendMode;const d=f.resources.localUniforms.uniforms;d.uTransformMatrix=t.groupTransform,d.uRound=n._roundPixels|t._roundPixels,$A(t.groupColorAlpha,d.uColor,0),this._adaptor.execute(this,t)}_rebuild(t){const n=this._getGpuDataForRenderable(t),o=this.renderer.graphicsContext.updateGpuContext(t.context);n.destroy(),o.isBatchable&&this._updateBatchesForRenderable(t,n)}_addToBatcher(t,n){const s=this.renderer.renderPipes.batch,o=this._getGpuDataForRenderable(t).batches;for(let f=0;f<o.length;f++){const d=o[f];s.addToBatch(d,n)}}_getGpuDataForRenderable(t){return t._gpuData[this.renderer.uid]||this._initGpuDataForRenderable(t)}_initGpuDataForRenderable(t){const n=new t3;return t._gpuData[this.renderer.uid]=n,this._managedGraphics.add(t),n}_updateBatchesForRenderable(t,n){const s=t.context,f=this.renderer.graphicsContext.getGpuContext(s),d=this.renderer._roundPixels|t._roundPixels;n.batches=f.batches.map(m=>{const g=Qa.get(Hg);return m.copyTo(g),g.renderable=t,g.roundPixels=d,g})}destroy(){this._managedGraphics.destroy(),this.renderer=null,this._adaptor.destroy(),this._adaptor=null,this.state=null}}E_.extension={type:[kt.WebGLPipes,kt.WebGPUPipes],name:"graphics"};ke.add(T_);ke.add(E_);ke.add(IA);ke.add(qg);class fl extends Rg{constructor(t){t instanceof ol&&(t={context:t});const{context:n,roundPixels:s,...o}=t||{};super({label:"Graphics",...o}),this.renderPipeId="graphics",n?this.context=n:(this.context=this._ownedContext=new ol,this.context.autoGarbageCollect=this.autoGarbageCollect),this.didViewUpdate=!0,this.allowChildren=!1,this.roundPixels=s??!1}set context(t){t!==this._context&&(this._context&&(this._context.off("update",this.onViewUpdate,this),this._context.off("unload",this.unload,this)),this._context=t,this._context.on("update",this.onViewUpdate,this),this._context.on("unload",this.unload,this),this.onViewUpdate())}get context(){return this._context}get bounds(){return this._context.bounds}updateBounds(){}containsPoint(t){return this._context.containsPoint(t)}destroy(t){this._ownedContext&&!t?this._ownedContext.destroy(t):(t===!0||(t==null?void 0:t.context)===!0)&&this._context.destroy(t),this._ownedContext=null,this._context=null,super.destroy(t)}_onTouch(t){this._gcLastUsed=t,this._context._gcLastUsed=t}_callContextMethod(t,n){return this.context[t](...n),this}setFillStyle(...t){return this._callContextMethod("setFillStyle",t)}setStrokeStyle(...t){return this._callContextMethod("setStrokeStyle",t)}fill(...t){return this._callContextMethod("fill",t)}stroke(...t){return this._callContextMethod("stroke",t)}texture(...t){return this._callContextMethod("texture",t)}beginPath(){return this._callContextMethod("beginPath",[])}cut(){return this._callContextMethod("cut",[])}arc(...t){return this._callContextMethod("arc",t)}arcTo(...t){return this._callContextMethod("arcTo",t)}arcToSvg(...t){return this._callContextMethod("arcToSvg",t)}bezierCurveTo(...t){return this._callContextMethod("bezierCurveTo",t)}closePath(){return this._callContextMethod("closePath",[])}ellipse(...t){return this._callContextMethod("ellipse",t)}circle(...t){return this._callContextMethod("circle",t)}path(...t){return this._callContextMethod("path",t)}lineTo(...t){return this._callContextMethod("lineTo",t)}moveTo(...t){return this._callContextMethod("moveTo",t)}quadraticCurveTo(...t){return this._callContextMethod("quadraticCurveTo",t)}rect(...t){return this._callContextMethod("rect",t)}roundRect(...t){return this._callContextMethod("roundRect",t)}poly(...t){return this._callContextMethod("poly",t)}regularPoly(...t){return this._callContextMethod("regularPoly",t)}roundPoly(...t){return this._callContextMethod("roundPoly",t)}roundShape(...t){return this._callContextMethod("roundShape",t)}filletRect(...t){return this._callContextMethod("filletRect",t)}chamferRect(...t){return this._callContextMethod("chamferRect",t)}star(...t){return this._callContextMethod("star",t)}svg(...t){return this._callContextMethod("svg",t)}restore(...t){return this._callContextMethod("restore",t)}save(){return this._callContextMethod("save",[])}getTransform(){return this.context.getTransform()}resetTransform(){return this._callContextMethod("resetTransform",[])}rotateTransform(...t){return this._callContextMethod("rotate",t)}scaleTransform(...t){return this._callContextMethod("scale",t)}setTransform(...t){return this._callContextMethod("setTransform",t)}transform(...t){return this._callContextMethod("transform",t)}translateTransform(...t){return this._callContextMethod("translate",t)}clear(){return this._callContextMethod("clear",[])}get fillStyle(){return this._context.fillStyle}set fillStyle(t){this._context.fillStyle=t}get strokeStyle(){return this._context.strokeStyle}set strokeStyle(t){this._context.strokeStyle=t}clone(t=!1){return t?new fl(this._context.clone()):(this._ownedContext=null,new fl(this._context))}lineStyle(t,n,s){ce(tn,"Graphics#lineStyle is no longer needed. Use Graphics#setStrokeStyle to set the stroke style.");const o={};return t&&(o.width=t),n&&(o.color=n),s&&(o.alpha=s),this.context.strokeStyle=o,this}beginFill(t,n){ce(tn,"Graphics#beginFill is no longer needed. Use Graphics#fill to fill the shape with the desired style.");const s={};return t!==void 0&&(s.color=t),n!==void 0&&(s.alpha=n),this.context.fillStyle=s,this}endFill(){ce(tn,"Graphics#endFill is no longer needed. Use Graphics#fill to fill the shape with the desired style."),this.context.fill();const t=this.context.strokeStyle;return(t.width!==ol.defaultStrokeStyle.width||t.color!==ol.defaultStrokeStyle.color||t.alpha!==ol.defaultStrokeStyle.alpha)&&this.context.stroke(),this}drawCircle(...t){return ce(tn,"Graphics#drawCircle has been renamed to Graphics#circle"),this._callContextMethod("circle",t)}drawEllipse(...t){return ce(tn,"Graphics#drawEllipse has been renamed to Graphics#ellipse"),this._callContextMethod("ellipse",t)}drawPolygon(...t){return ce(tn,"Graphics#drawPolygon has been renamed to Graphics#poly"),this._callContextMethod("poly",t)}drawRect(...t){return ce(tn,"Graphics#drawRect has been renamed to Graphics#rect"),this._callContextMethod("rect",t)}drawRoundedRect(...t){return ce(tn,"Graphics#drawRoundedRect has been renamed to Graphics#roundRect"),this._callContextMethod("roundRect",t)}drawStar(...t){return ce(tn,"Graphics#drawStar has been renamed to Graphics#star"),this._callContextMethod("star",t)}}class e3 extends Rg{constructor(t,n){const{text:s,resolution:o,style:f,anchor:d,width:m,height:g,roundPixels:v,...S}=t;super({...S}),this.batched=!0,this._resolution=null,this._autoResolution=!0,this._didTextUpdate=!0,this._styleClass=n,this.text=s??"",this.style=f,this.resolution=o??null,this.allowChildren=!1,this._anchor=new Vn({_onUpdate:()=>{this.onViewUpdate()}}),d&&(this.anchor=d),this.roundPixels=v??!1,m!==void 0&&(this.width=m),g!==void 0&&(this.height=g)}get anchor(){return this._anchor}set anchor(t){typeof t=="number"?this._anchor.set(t):this._anchor.copyFrom(t)}set text(t){t=t.toString(),this._text!==t&&(this._text=t,this.onViewUpdate())}get text(){return this._text}set resolution(t){this._autoResolution=t===null,this._resolution=t,this.onViewUpdate()}get resolution(){return this._resolution}get style(){return this._style}set style(t){var n;t||(t={}),(n=this._style)==null||n.off("update",this.onViewUpdate,this),t instanceof this._styleClass?this._style=t:this._style=new this._styleClass(t),this._style.on("update",this.onViewUpdate,this),this.onViewUpdate()}get width(){return Math.abs(this.scale.x)*this.bounds.width}set width(t){this._setWidth(t,this.bounds.width)}get height(){return Math.abs(this.scale.y)*this.bounds.height}set height(t){this._setHeight(t,this.bounds.height)}getSize(t){return t||(t={}),t.width=Math.abs(this.scale.x)*this.bounds.width,t.height=Math.abs(this.scale.y)*this.bounds.height,t}setSize(t,n){typeof t=="object"?(n=t.height??t.width,t=t.width):n??(n=t),t!==void 0&&this._setWidth(t,this.bounds.width),n!==void 0&&this._setHeight(n,this.bounds.height)}containsPoint(t){const n=this.bounds.width,s=this.bounds.height,o=-n*this.anchor.x;let f=0;return t.x>=o&&t.x<=o+n&&(f=-s*this.anchor.y,t.y>=f&&t.y<=f+s)}onViewUpdate(){this.didViewUpdate||(this._didTextUpdate=!0),super.onViewUpdate()}destroy(t=!1){super.destroy(t),this.owner=null,this._bounds=null,this._anchor=null,(typeof t=="boolean"?t:t!=null&&t.style)&&this._style.destroy(t),this._style=null,this._text=null}get styleKey(){return`${this._text}:${this._style.styleKey}:${this._resolution}`}}function n3(i,t){let n=i[0]??{};return(typeof n=="string"||i[1])&&(ce(tn,`use new ${t}({ text: "hi!", style }) instead`),n={text:n,style:i[1]}),n}class a3{constructor(t){this._canvasPool=Object.create(null),this.canvasOptions=t||{},this.enableFullScreen=!1}_createCanvasAndContext(t,n){const s=si.get().createCanvas();s.width=t,s.height=n;const o=s.getContext("2d");return{canvas:s,context:o}}getOptimalCanvasAndContext(t,n,s=1){t=Math.ceil(t*s-1e-6),n=Math.ceil(n*s-1e-6),t=Cc(t),n=Cc(n);const o=(t<<17)+(n<<1);this._canvasPool[o]||(this._canvasPool[o]=[]);let f=this._canvasPool[o].pop();return f||(f=this._createCanvasAndContext(t,n)),f}returnCanvasAndContext(t){const n=t.canvas,{width:s,height:o}=n,f=(s<<17)+(o<<1);t.context.resetTransform(),t.context.clearRect(0,0,s,o),this._canvasPool[f].push(t)}clear(){this._canvasPool={}}}const dg=new a3;Qh.register(dg);let Yr=null,Gs=null;function i3(i,t){Yr||(Yr=si.get().createCanvas(256,128),Gs=Yr.getContext("2d",{willReadFrequently:!0}),Gs.globalCompositeOperation="copy",Gs.globalAlpha=1),(Yr.width<i||Yr.height<t)&&(Yr.width=Cc(i),Yr.height=Cc(t))}function v1(i,t,n){for(let s=0,o=4*n*t;s<t;++s,o+=4)if(i[o+3]!==0)return!1;return!0}function x1(i,t,n,s,o){const f=4*t;for(let d=s,m=s*f+4*n;d<=o;++d,m+=f)if(i[m+3]!==0)return!1;return!0}function l3(...i){let t=i[0];t.canvas||(t={canvas:i[0],resolution:i[1]});const{canvas:n}=t,s=Math.min(t.resolution??1,1),o=t.width??n.width,f=t.height??n.height;let d=t.output;if(i3(o,f),!Gs)throw new TypeError("Failed to get canvas 2D context");Gs.drawImage(n,0,0,o,f,0,0,o*s,f*s);const g=Gs.getImageData(0,0,o,f).data;let v=0,S=0,b=o-1,A=f-1;for(;S<f&&v1(g,o,S);)++S;if(S===f)return un.EMPTY;for(;v1(g,o,A);)--A;for(;x1(g,o,v,S,A);)++v;for(;x1(g,o,b,S,A);)--b;return++b,++A,Gs.globalCompositeOperation="source-over",Gs.strokeRect(v,S,b-v,A-S),Gs.globalCompositeOperation="copy",d??(d=new un),d.set(v/s,S/s,(b-v)/s,(A-S)/s),d}/**
299
+ * tiny-lru
300
+ *
301
+ * @copyright 2026 Jason Mulligan <jason.mulligan@avoidwork.com>
302
+ * @license BSD-3-Clause
303
+ * @version 11.4.7
304
+ */class s3{constructor(t=0,n=0,s=!1){this.first=null,this.items=Object.create(null),this.last=null,this.max=t,this.resetTtl=s,this.size=0,this.ttl=n}clear(){return this.first=null,this.items=Object.create(null),this.last=null,this.size=0,this}delete(t){if(this.has(t)){const n=this.items[t];delete this.items[t],this.size--,n.prev!==null&&(n.prev.next=n.next),n.next!==null&&(n.next.prev=n.prev),this.first===n&&(this.first=n.next),this.last===n&&(this.last=n.prev)}return this}entries(t=this.keys()){const n=new Array(t.length);for(let s=0;s<t.length;s++){const o=t[s];n[s]=[o,this.get(o)]}return n}evict(t=!1){if(t||this.size>0){const n=this.first;delete this.items[n.key],--this.size===0?(this.first=null,this.last=null):(this.first=n.next,this.first.prev=null)}return this}expiresAt(t){let n;return this.has(t)&&(n=this.items[t].expiry),n}get(t){const n=this.items[t];if(n!==void 0){if(this.ttl>0&&n.expiry<=Date.now()){this.delete(t);return}return this.moveToEnd(n),n.value}}has(t){return t in this.items}moveToEnd(t){this.last!==t&&(t.prev!==null&&(t.prev.next=t.next),t.next!==null&&(t.next.prev=t.prev),this.first===t&&(this.first=t.next),t.prev=this.last,t.next=null,this.last!==null&&(this.last.next=t),this.last=t,this.first===null&&(this.first=t))}keys(){const t=new Array(this.size);let n=this.first,s=0;for(;n!==null;)t[s++]=n.key,n=n.next;return t}setWithEvicted(t,n,s=this.resetTtl){let o=null;if(this.has(t))this.set(t,n,!0,s);else{this.max>0&&this.size===this.max&&(o={...this.first},this.evict(!0));let f=this.items[t]={expiry:this.ttl>0?Date.now()+this.ttl:this.ttl,key:t,prev:this.last,next:null,value:n};++this.size===1?this.first=f:this.last.next=f,this.last=f}return o}set(t,n,s=!1,o=this.resetTtl){let f=this.items[t];return s||f!==void 0?(f.value=n,s===!1&&o&&(f.expiry=this.ttl>0?Date.now()+this.ttl:this.ttl),this.moveToEnd(f)):(this.max>0&&this.size===this.max&&this.evict(!0),f=this.items[t]={expiry:this.ttl>0?Date.now()+this.ttl:this.ttl,key:t,prev:this.last,next:null,value:n},++this.size===1?this.first=f:this.last.next=f,this.last=f),this}values(t=this.keys()){const n=new Array(t.length);for(let s=0;s<t.length;s++)n[s]=this.get(t[s]);return n}}function u3(i=1e3,t=0,n=!1){if(isNaN(i)||i<0)throw new TypeError("Invalid max value");if(isNaN(t)||t<0)throw new TypeError("Invalid ttl value");if(typeof n!="boolean")throw new TypeError("Invalid resetTtl value");return new s3(i,t,n)}function C_(i){return!!i.tagStyles&&Object.keys(i.tagStyles).length>0}function A_(i){return i.includes("<")}function r3(i,t){return i.clone().assign(t)}function o3(i,t){const n=[],s=t.tagStyles;if(!C_(t)||!A_(i))return n.push({text:i,style:t}),n;const o=[t],f=[];let d="",m=0;for(;m<i.length;){const g=i[m];if(g==="<"){const v=i.indexOf(">",m);if(v===-1){d+=g,m++;continue}const S=i.slice(m+1,v);if(S.startsWith("/")){const b=S.slice(1).trim();if(f.length>0&&f[f.length-1]===b){d.length>0&&(n.push({text:d,style:o[o.length-1]}),d=""),o.pop(),f.pop(),m=v+1;continue}else{d+=i.slice(m,v+1),m=v+1;continue}}else{const b=S.trim();if(s[b]){d.length>0&&(n.push({text:d,style:o[o.length-1]}),d="");const A=o[o.length-1],E=r3(A,s[b]);o.push(E),f.push(b),m=v+1;continue}else{d+=i.slice(m,v+1),m=v+1;continue}}}else d+=g,m++}return d.length>0&&n.push({text:d,style:o[o.length-1]}),n}const c3=[10,13],f3=new Set(c3),h3=[9,32,8192,8193,8194,8195,8196,8197,8198,8200,8201,8202,8287,12288],d3=new Set(h3),m3=[9,32];new Set(m3);const p3=[45,8208,8211,8212,173],y3=new Set(p3),g3=/(\r\n|\r|\n)/,v3=/(?:\r\n|\r|\n)/;function ep(i){return typeof i!="string"?!1:f3.has(i.charCodeAt(0))}function Ui(i,t){return typeof i!="string"?!1:d3.has(i.charCodeAt(0))}function x3(i){return typeof i!="string"?!1:y3.has(i.charCodeAt(0))}function M_(i){return i==="normal"||i==="pre-line"}function R_(i){return i==="normal"}function Hs(i){if(typeof i!="string")return"";let t=i.length-1;for(;t>=0&&Ui(i[t]);)t--;return t<i.length-1?i.slice(0,t+1):i}function z_(i){const t=[],n=[];if(typeof i!="string")return t;for(let s=0;s<i.length;s++){const o=i[s],f=i[s+1];if(Ui(o)||ep(o)){n.length>0&&(t.push(n.join("")),n.length=0),o==="\r"&&f===`
305
+ `?(t.push(`\r
306
+ `),s++):t.push(o);continue}n.push(o),x3(o)&&f&&!Ui(f)&&!ep(f)&&(t.push(n.join("")),n.length=0)}return n.length>0&&t.push(n.join("")),t}function D_(i,t,n,s){const o=n(i),f=[];for(let d=0;d<o.length;d++){let m=o[d],g=m,v=1;for(;o[d+v];){const S=o[d+v];if(!s(g,S,i,d,t))m+=S,g=S,v++;else break}d+=v-1,f.push(m)}return f}const _3=/\r\n|\r|\n/g;function S3(i,t,n,s,o,f,d,m){var Dt,w;const g=o3(i,t);if(R_(t.whiteSpace))for(let H=0;H<g.length;H++){const at=g[H];g[H]={text:at.text.replace(_3," "),style:at.style}}const S=[];let b=[];for(const H of g){const at=H.text.split(g3);for(let et=0;et<at.length;et++){const ft=at[et];ft===`\r
307
+ `||ft==="\r"||ft===`
308
+ `?(S.push(b),b=[]):ft.length>0&&b.push({text:ft,style:H.style})}}(b.length>0||S.length===0)&&S.push(b);const A=n?b3(S,t,s,o,d,m):S,E=[],R=[],D=[],M=[],O=[];let U=0;const B=t._fontString,G=f(B);G.fontSize===0&&(G.fontSize=t.fontSize,G.ascent=t.fontSize);let Z="",V=!!t.dropShadow,K=((Dt=t._stroke)==null?void 0:Dt.width)||0;for(const H of A){let at=0,et=G.ascent,ft=G.descent,j="";for(const st of H){const yt=st.style._fontString,Tt=f(yt);yt!==Z&&(s.font=yt,Z=yt);const Ot=o(st.text,st.style.letterSpacing,s);at+=Ot,et=Math.max(et,Tt.ascent),ft=Math.max(ft,Tt.descent),j+=st.text;const Ut=((w=st.style._stroke)==null?void 0:w.width)||0;Ut>K&&(K=Ut),!V&&st.style.dropShadow&&(V=!0)}H.length===0&&(et=G.ascent,ft=G.descent),E.push(at),R.push(et),D.push(ft),O.push(j);const I=t.lineHeight||et+ft;M.push(I+t.leading),U=Math.max(U,at)}const pt=K,dt=(n&&t.align!=="left"?Math.max(U,t.wordWrapWidth):U)+pt+(t.dropShadow?t.dropShadow.distance:0);let vt=0;for(let H=0;H<M.length;H++)vt+=M[H];vt=Math.max(vt,M[0]+pt);const _t=vt+(t.dropShadow?t.dropShadow.distance:0),xt=t.lineHeight||G.fontSize;return{width:dt,height:_t,lines:O,lineWidths:E,lineHeight:xt+t.leading,maxLineWidth:U,fontProperties:G,runsByLine:A,lineAscents:R,lineDescents:D,lineHeights:M,hasDropShadow:V}}function b3(i,t,n,s,o,f){var M;const{letterSpacing:d,whiteSpace:m,wordWrapWidth:g,breakWords:v}=t,S=M_(m),b=g+d,A={};let E="";const R=(O,U)=>{const B=`${O}|${U.styleKey}`;let G=A[B];if(G===void 0){const Z=U._fontString;Z!==E&&(n.font=Z,E=Z),G=s(O,U.letterSpacing,n)+U.letterSpacing,A[B]=G}return G},D=[];for(const O of i){const U=T3(O),B=D.length,G=vt=>{let _t=0,xt=vt;do{const{token:Dt,style:w}=U[xt];_t+=R(Dt,w),xt++}while(xt<U.length&&U[xt].continuesFromPrevious);return _t},Z=vt=>{const _t=[];let xt=vt;do _t.push({token:U[xt].token,style:U[xt].style}),xt++;while(xt<U.length&&U[xt].continuesFromPrevious);return _t};let V=[],K=0,pt=!S,ct=null;const ht=()=>{ct&&ct.text.length>0&&V.push(ct),ct=null},dt=()=>{if(ht(),V.length>0){const vt=V[V.length-1];vt.text=Hs(vt.text),vt.text.length===0&&V.pop()}D.push(V),V=[],K=0,pt=!1};for(let vt=0;vt<U.length;vt++){const{token:_t,style:xt,continuesFromPrevious:Dt}=U[vt],w=R(_t,xt);if(S){const et=Ui(_t),ft=(ct==null?void 0:ct.text[ct.text.length-1])??((M=V[V.length-1])==null?void 0:M.text.slice(-1))??"",j=ft?Ui(ft):!1;if(et&&j)continue}const H=!Dt,at=H?G(vt):w;if(at>b&&H)if(K>0&&dt(),v){const et=Z(vt);for(let ft=0;ft<et.length;ft++){const j=et[ft].token,I=et[ft].style,st=D_(j,v,f,o);for(const yt of st){const Tt=R(yt,I);Tt+K>b&&dt(),!ct||ct.style!==I?(ht(),ct={text:yt,style:I}):ct.text+=yt,K+=Tt}}vt+=et.length-1}else{const et=Z(vt);ht(),D.push(et.map(ft=>({text:ft.token,style:ft.style}))),pt=!1,vt+=et.length-1}else if(at+K>b&&H){if(Ui(_t)){pt=!1;continue}dt(),ct={text:_t,style:xt},K=w}else if(Dt&&!v)!ct||ct.style!==xt?(ht(),ct={text:_t,style:xt}):ct.text+=_t,K+=w;else{const et=Ui(_t);if(K===0&&et&&!pt)continue;!ct||ct.style!==xt?(ht(),ct={text:_t,style:xt}):ct.text+=_t,K+=w}}if(ht(),V.length>0){const vt=V[V.length-1];vt.text=Hs(vt.text),vt.text.length===0&&V.pop()}(V.length>0||D.length===B)&&D.push(V)}return D}function T3(i){const t=[];let n=!1;for(const s of i){const o=z_(s.text);let f=!0;for(const d of o){const m=Ui(d)||ep(d),g=f&&n&&!m;t.push({token:d,style:s.style,continuesFromPrevious:g}),n=!m,f=!1}}return t}const E3={willReadFrequently:!0};function _1(i,t,n,s,o){let f=n[i];return typeof f!="number"&&(f=o(i,t,s)+t,n[i]=f),f}function C3(i,t,n,s,o,f,d){const m=n.getContext("2d",E3);m.font=t._fontString;let g=0,v="";const S=[],b=Object.create(null),{letterSpacing:A,whiteSpace:E}=t,R=M_(E),D=R_(E);let M=!R;const O=t.wordWrapWidth+A,U=z_(i);for(let G=0;G<U.length;G++){let Z=U[G];if(ep(Z)){if(!D){S.push(Hs(v)),M=!R,v="",g=0;continue}Z=" "}if(R){const K=Ui(Z),pt=Ui(v[v.length-1]);if(K&&pt)continue}const V=_1(Z,A,b,m,s);if(V>O)if(v!==""&&(S.push(Hs(v)),v="",g=0),o(Z,t.breakWords)){const K=D_(Z,t.breakWords,d,f);for(const pt of K){const ct=_1(pt,A,b,m,s);ct+g>O&&(S.push(Hs(v)),M=!1,v="",g=0),v+=pt,g+=ct}}else v.length>0&&(S.push(Hs(v)),v="",g=0),S.push(Hs(Z)),M=!1,v="",g=0;else V+g>O&&(M=!1,S.push(Hs(v)),v="",g=0),(v.length>0||!Ui(Z)||M)&&(v+=Z,g+=V)}const B=Hs(v);return B.length>0&&S.push(B),S.join(`
309
+ `)}const S1={willReadFrequently:!0},Xs=class jt{static get experimentalLetterSpacingSupported(){let t=jt._experimentalLetterSpacingSupported;if(t===void 0){const n=si.get().getCanvasRenderingContext2D().prototype;t=jt._experimentalLetterSpacingSupported="letterSpacing"in n||"textLetterSpacing"in n}return t}constructor(t,n,s,o,f,d,m,g,v,S){this.text=t,this.style=n,this.width=s,this.height=o,this.lines=f,this.lineWidths=d,this.lineHeight=m,this.maxLineWidth=g,this.fontProperties=v,S&&(this.runsByLine=S.runsByLine,this.lineAscents=S.lineAscents,this.lineDescents=S.lineDescents,this.lineHeights=S.lineHeights,this.hasDropShadow=S.hasDropShadow)}static measureText(t=" ",n,s=jt._canvas,o=n.wordWrap){var Z;const f=`${t}-${n.styleKey}-wordWrap-${o}`;if(jt._measurementCache.has(f))return jt._measurementCache.get(f);if(C_(n)&&A_(t)){const V=S3(t,n,o,jt._context,jt._measureText,jt.measureFont,jt.canBreakChars,jt.wordWrapSplit),K=new jt(t,n,V.width,V.height,V.lines,V.lineWidths,V.lineHeight,V.maxLineWidth,V.fontProperties,{runsByLine:V.runsByLine,lineAscents:V.lineAscents,lineDescents:V.lineDescents,lineHeights:V.lineHeights,hasDropShadow:V.hasDropShadow});return jt._measurementCache.set(f,K),K}const m=n._fontString,g=jt.measureFont(m);g.fontSize===0&&(g.fontSize=n.fontSize,g.ascent=n.fontSize,g.descent=0);const v=jt._context;v.font=m;const b=(o?jt._wordWrap(t,n,s):t).split(v3),A=new Array(b.length);let E=0;for(let V=0;V<b.length;V++){const K=jt._measureText(b[V],n.letterSpacing,v);A[V]=K,E=Math.max(E,K)}const R=((Z=n._stroke)==null?void 0:Z.width)??0,D=n.lineHeight||g.fontSize,M=jt._getAlignWidth(E,n,o),O=jt._adjustWidthForStyle(M,n),U=Math.max(D,g.fontSize+R)+(b.length-1)*(D+n.leading),B=jt._adjustHeightForStyle(U,n),G=new jt(t,n,O,B,b,A,D+n.leading,E,g);return jt._measurementCache.set(f,G),G}static _adjustWidthForStyle(t,n){var f;const s=((f=n._stroke)==null?void 0:f.width)||0;let o=t+s;return n.dropShadow&&(o+=n.dropShadow.distance),o}static _adjustHeightForStyle(t,n){let s=t;return n.dropShadow&&(s+=n.dropShadow.distance),s}static _getAlignWidth(t,n,s){return s&&n.align!=="left"?Math.max(t,n.wordWrapWidth):t}static _measureText(t,n,s){let o=!1;jt.experimentalLetterSpacingSupported&&(jt.experimentalLetterSpacing?(s.letterSpacing=`${n}px`,s.textLetterSpacing=`${n}px`,o=!0):(s.letterSpacing="0px",s.textLetterSpacing="0px"));const f=s.measureText(t);let d=f.width;const m=-(f.actualBoundingBoxLeft??0);let v=(f.actualBoundingBoxRight??0)-m;if(d>0)if(o)d-=n,v-=n;else{const S=(jt.graphemeSegmenter(t).length-1)*n;d+=S,v+=S}return Math.max(d,v)}static _wordWrap(t,n,s=jt._canvas){return C3(t,n,s,jt._measureText,jt.canBreakWords,jt.canBreakChars,jt.wordWrapSplit)}static isBreakingSpace(t,n){return Ui(t)}static canBreakWords(t,n){return n}static canBreakChars(t,n,s,o,f){return!0}static wordWrapSplit(t){return jt.graphemeSegmenter(t)}static measureFont(t){if(jt._fonts[t])return jt._fonts[t];const n=jt._context;n.font=t;const s=n.measureText(jt.METRICS_STRING+jt.BASELINE_SYMBOL),o=s.actualBoundingBoxAscent??0,f=s.actualBoundingBoxDescent??0,d={ascent:o,descent:f,fontSize:o+f};return jt._fonts[t]=d,d}static clearMetrics(t=""){t?delete jt._fonts[t]:jt._fonts={}}static get _canvas(){if(!jt.__canvas){let t;try{const n=new OffscreenCanvas(0,0),s=n.getContext("2d",S1);if(s!=null&&s.measureText)return jt.__canvas=n,n;t=si.get().createCanvas()}catch{t=si.get().createCanvas()}t.width=t.height=10,jt.__canvas=t}return jt.__canvas}static get _context(){return jt.__context||(jt.__context=jt._canvas.getContext("2d",S1)),jt.__context}};Xs.METRICS_STRING="|ÉqÅ";Xs.BASELINE_SYMBOL="M";Xs.BASELINE_MULTIPLIER=1.4;Xs.HEIGHT_MULTIPLIER=2;Xs.graphemeSegmenter=(()=>{if(typeof(Intl==null?void 0:Intl.Segmenter)=="function"){const i=new Intl.Segmenter;return t=>{const n=i.segment(t),s=[];let o=0;for(const f of n)s[o++]=f.segment;return s}}return i=>[...i]})();Xs.experimentalLetterSpacing=!1;Xs._fonts={};Xs._measurementCache=u3(1e3);let Bu=Xs;const A3=["serif","sans-serif","monospace","cursive","fantasy","system-ui"];function mg(i){const t=typeof i.fontSize=="number"?`${i.fontSize}px`:i.fontSize;let n=i.fontFamily;Array.isArray(i.fontFamily)||(n=i.fontFamily.split(","));for(let s=n.length-1;s>=0;s--){let o=n[s].trim();!/([\"\'])[^\'\"]+\1/.test(o)&&!A3.includes(o)&&(o=`"${o}"`),n[s]=o}return`${i.fontStyle} ${i.fontVariant} ${i.fontWeight} ${t} ${n.join(",")}`}const b1=1e5;function Lm(i,t,n,s=0,o=0,f=0){if(i.texture===Ee.WHITE&&!i.fill)return Sn.shared.setValue(i.color).setAlpha(i.alpha??1).toHexa();if(i.fill){if(i.fill instanceof pp){const d=i.fill,m=t.createPattern(d.texture.source.resource,"repeat"),g=d.transform.copyTo(ne.shared);return g.scale(d.texture.source.pixelWidth,d.texture.source.pixelHeight),m.setTransform(g),m}else if(i.fill instanceof Ls){const d=i.fill,m=d.type==="linear",g=d.textureSpace==="local";let v=1,S=1;g&&n&&(v=n.width+s,S=n.height+s);let b,A=!1;if(m){const{start:E,end:R}=d;b=t.createLinearGradient(E.x*v+o,E.y*S+f,R.x*v+o,R.y*S+f),A=Math.abs(R.x-E.x)<Math.abs((R.y-E.y)*.1)}else{const{center:E,innerRadius:R,outerCenter:D,outerRadius:M}=d;b=t.createRadialGradient(E.x*v+o,E.y*S+f,R*v,D.x*v+o,D.y*S+f,M*v)}if(A&&g&&n){const E=n.lineHeight/S;for(let R=0;R<n.lines.length;R++){const D=(R*n.lineHeight+s/2)/S;d.colorStops.forEach(M=>{let O=D+M.offset*E;O=Math.max(0,Math.min(1,O)),b.addColorStop(Math.floor(O*b1)/b1,Sn.shared.setValue(M.color).toHex())})}}else d.colorStops.forEach(E=>{b.addColorStop(E.offset,Sn.shared.setValue(E.color).toHex())});return b}}else{const d=t.createPattern(i.texture.source.resource,"repeat"),m=i.matrix.copyTo(ne.shared);return m.scale(i.texture.source.pixelWidth,i.texture.source.pixelHeight),d.setTransform(m),d}return Da("FillStyle not recognised",i),"red"}const T1=new un;function gc(i){let t=0;for(let n=0;n<i.length;n++)i.charCodeAt(n)===32&&t++;return t}class M3{getCanvasAndContext(t){const{text:n,style:s,resolution:o=1}=t,f=s._getFinalPadding(),d=Bu.measureText(n||" ",s),m=Math.ceil(Math.ceil(Math.max(1,d.width)+f*2)*o),g=Math.ceil(Math.ceil(Math.max(1,d.height)+f*2)*o),v=dg.getOptimalCanvasAndContext(m,g);this._renderTextToCanvas(s,f,o,v,d);const S=s.trim?l3({canvas:v.canvas,width:m,height:g,resolution:1,output:T1}):T1.set(0,0,m,g);return{canvasAndContext:v,frame:S}}returnCanvasAndContext(t){dg.returnCanvasAndContext(t)}_renderTextToCanvas(t,n,s,o,f){var V,K,pt;if(f.runsByLine&&f.runsByLine.length>0){this._renderTaggedTextToCanvas(f,t,n,s,o);return}const{canvas:d,context:m}=o,g=mg(t),v=f.lines,S=f.lineHeight,b=f.lineWidths,A=f.maxLineWidth,E=f.fontProperties,R=d.height;if(m.resetTransform(),m.scale(s,s),m.textBaseline=t.textBaseline,(V=t._stroke)!=null&&V.width){const ct=t._stroke;m.lineWidth=ct.width,m.miterLimit=ct.miterLimit,m.lineJoin=ct.join,m.lineCap=ct.cap}m.font=g;let D,M;const O=t.dropShadow?2:1,U=t.wordWrap?t.wordWrapWidth:A,G=(((K=t._stroke)==null?void 0:K.width)??0)/2;let Z=(S-E.fontSize)/2;S-E.fontSize<0&&(Z=0);for(let ct=0;ct<O;++ct){const ht=t.dropShadow&&ct===0,dt=ht?Math.ceil(Math.max(1,R)+n*2):0,vt=dt*s;if(ht)this._setupDropShadow(m,t,s,vt);else{const _t=t._gradientBounds,xt=t._gradientOffset;if(_t){const Dt={width:_t.width,height:_t.height,lineHeight:_t.height,lines:f.lines};this._setFillAndStrokeStyles(m,t,Dt,n,G,(xt==null?void 0:xt.x)??0,(xt==null?void 0:xt.y)??0)}else xt?this._setFillAndStrokeStyles(m,t,f,n,G,xt.x,xt.y):this._setFillAndStrokeStyles(m,t,f,n,G);m.shadowColor="rgba(0,0,0,0)"}for(let _t=0;_t<v.length;_t++){D=G,M=G+_t*S+E.ascent+Z,D+=this._getAlignmentOffset(b[_t],U,t.align);let xt=0;if(t.align==="justify"&&t.wordWrap&&_t<v.length-1){const Dt=gc(v[_t]);Dt>0&&(xt=(U-b[_t])/Dt)}(pt=t._stroke)!=null&&pt.width&&this._drawLetterSpacing(v[_t],t,o,D+n,M+n-dt,!0,xt),t._fill!==void 0&&this._drawLetterSpacing(v[_t],t,o,D+n,M+n-dt,!1,xt)}}}_renderTaggedTextToCanvas(t,n,s,o,f){var G,Z,V;const{canvas:d,context:m}=f,{runsByLine:g,lineWidths:v,maxLineWidth:S,lineAscents:b,lineHeights:A,hasDropShadow:E}=t,R=d.height;m.resetTransform(),m.scale(o,o),m.textBaseline=n.textBaseline;const D=E?2:1,M=n.wordWrap?n.wordWrapWidth:S;let O=((G=n._stroke)==null?void 0:G.width)??0;for(const K of g)for(const pt of K){const ct=((Z=pt.style._stroke)==null?void 0:Z.width)??0;ct>O&&(O=ct)}const U=O/2,B=[];for(let K=0;K<g.length;K++){const pt=g[K],ct=[];for(const ht of pt){const dt=mg(ht.style);m.font=dt,ct.push({width:Bu._measureText(ht.text,ht.style.letterSpacing,m),font:dt})}B.push(ct)}for(let K=0;K<D;++K){const pt=E&&K===0,ct=pt?Math.ceil(Math.max(1,R)+s*2):0,ht=ct*o;pt||(m.shadowColor="rgba(0,0,0,0)");let dt=U;for(let vt=0;vt<g.length;vt++){const _t=g[vt],xt=v[vt],Dt=b[vt],w=A[vt],H=B[vt];let at=U;at+=this._getAlignmentOffset(xt,M,n.align);let et=0;if(n.align==="justify"&&n.wordWrap&&vt<g.length-1){let I=0;for(const st of _t)I+=gc(st.text);I>0&&(et=(M-xt)/I)}const ft=dt+Dt;let j=at+s;for(let I=0;I<_t.length;I++){const st=_t[I],{width:yt,font:Tt}=H[I];if(m.font=Tt,m.textBaseline=st.style.textBaseline,(V=st.style._stroke)!=null&&V.width){const Ut=st.style._stroke;if(m.lineWidth=Ut.width,m.miterLimit=Ut.miterLimit,m.lineJoin=Ut.join,m.lineCap=Ut.cap,pt)if(st.style.dropShadow)this._setupDropShadow(m,st.style,o,ht);else{const re=gc(st.text);j+=yt+re*et;continue}else{const re=Bu.measureFont(Tt),ue=st.style.lineHeight||re.fontSize,ra={width:yt,height:ue,lineHeight:ue,lines:[st.text]};m.strokeStyle=Lm(Ut,m,ra,s*2,j-s,dt)}this._drawLetterSpacing(st.text,st.style,f,j,ft+s-ct,!0,et)}const Ot=gc(st.text);j+=yt+Ot*et}j=at+s;for(let I=0;I<_t.length;I++){const st=_t[I],{width:yt,font:Tt}=H[I];if(m.font=Tt,m.textBaseline=st.style.textBaseline,st.style._fill!==void 0){if(pt)if(st.style.dropShadow)this._setupDropShadow(m,st.style,o,ht);else{const Ut=gc(st.text);j+=yt+Ut*et;continue}else{const Ut=Bu.measureFont(Tt),re=st.style.lineHeight||Ut.fontSize,ue={width:yt,height:re,lineHeight:re,lines:[st.text]};m.fillStyle=Lm(st.style._fill,m,ue,s*2,j-s,dt)}this._drawLetterSpacing(st.text,st.style,f,j,ft+s-ct,!1,et)}const Ot=gc(st.text);j+=yt+Ot*et}dt+=w}}}_setFillAndStrokeStyles(t,n,s,o,f,d=0,m=0){var g;if(t.fillStyle=n._fill?Lm(n._fill,t,s,o*2,d,m):null,(g=n._stroke)!=null&&g.width){const v=f+o*2;t.strokeStyle=Lm(n._stroke,t,s,v,d,m)}}_setupDropShadow(t,n,s,o){t.fillStyle="black",t.strokeStyle="black";const f=n.dropShadow,d=f.color,m=f.alpha;t.shadowColor=Sn.shared.setValue(d).setAlpha(m).toRgbaString();const g=f.blur*s,v=f.distance*s;t.shadowBlur=g,t.shadowOffsetX=Math.cos(f.angle)*v,t.shadowOffsetY=Math.sin(f.angle)*v+o}_getAlignmentOffset(t,n,s){return s==="right"?n-t:s==="center"?(n-t)/2:0}_drawLetterSpacing(t,n,s,o,f,d=!1,m=0){const{context:g}=s,v=n.letterSpacing;let S=!1;if(Bu.experimentalLetterSpacingSupported&&(Bu.experimentalLetterSpacing?(g.letterSpacing=`${v}px`,g.textLetterSpacing=`${v}px`,S=!0):(g.letterSpacing="0px",g.textLetterSpacing="0px")),(v===0||S)&&m===0){d?g.strokeText(t,o,f):g.fillText(t,o,f);return}if(m!==0&&(v===0||S)){const D=t.split(" ");let M=o;const O=g.measureText(" ").width;for(let U=0;U<D.length;U++)d?g.strokeText(D[U],M,f):g.fillText(D[U],M,f),M+=g.measureText(D[U]).width+O+m;return}let b=o;const A=Bu.graphemeSegmenter(t);let E=g.measureText(t).width,R=0;for(let D=0;D<A.length;++D){const M=A[D];d?g.strokeText(M,b,f):g.fillText(M,b,f);let O="";for(let U=D+1;U<A.length;++U)O+=A[U];R=g.measureText(O).width,b+=E-R+v,M===" "&&(b+=m),E=R}}}const Tc=new M3,Xg=class Kr extends $l{constructor(t={}){super(),this.uid=en("textStyle"),this._tick=0,this._cachedFontString=null,R3(t),t instanceof Kr&&(t=t._toObject());const o={...Kr.defaultTextStyle,...t};for(const f in o){const d=f;this[d]=o[f]}this._tagStyles=t.tagStyles??void 0,this.update(),this._tick=0}get align(){return this._align}set align(t){this._align!==t&&(this._align=t,this.update())}get breakWords(){return this._breakWords}set breakWords(t){this._breakWords!==t&&(this._breakWords=t,this.update())}get dropShadow(){return this._dropShadow}set dropShadow(t){this._dropShadow!==t&&(t!==null&&typeof t=="object"?this._dropShadow=this._createProxy({...Kr.defaultDropShadow,...t}):this._dropShadow=t?this._createProxy({...Kr.defaultDropShadow}):null,this.update())}get fontFamily(){return this._fontFamily}set fontFamily(t){this._fontFamily!==t&&(this._fontFamily=t,this.update())}get fontSize(){return this._fontSize}set fontSize(t){this._fontSize!==t&&(typeof t=="string"?this._fontSize=parseInt(t,10):this._fontSize=t,this.update())}get fontStyle(){return this._fontStyle}set fontStyle(t){this._fontStyle!==t&&(this._fontStyle=t.toLowerCase(),this.update())}get fontVariant(){return this._fontVariant}set fontVariant(t){this._fontVariant!==t&&(this._fontVariant=t,this.update())}get fontWeight(){return this._fontWeight}set fontWeight(t){this._fontWeight!==t&&(this._fontWeight=t,this.update())}get leading(){return this._leading}set leading(t){this._leading!==t&&(this._leading=t,this.update())}get letterSpacing(){return this._letterSpacing}set letterSpacing(t){this._letterSpacing!==t&&(this._letterSpacing=t,this.update())}get lineHeight(){return this._lineHeight}set lineHeight(t){this._lineHeight!==t&&(this._lineHeight=t,this.update())}get padding(){return this._padding}set padding(t){this._padding!==t&&(this._padding=t,this.update())}get filters(){return this._filters}set filters(t){this._filters!==t&&(this._filters=Object.freeze(t),this.update())}get trim(){return this._trim}set trim(t){this._trim!==t&&(this._trim=t,this.update())}get textBaseline(){return this._textBaseline}set textBaseline(t){this._textBaseline!==t&&(this._textBaseline=t,this.update())}get whiteSpace(){return this._whiteSpace}set whiteSpace(t){this._whiteSpace!==t&&(this._whiteSpace=t,this.update())}get wordWrap(){return this._wordWrap}set wordWrap(t){this._wordWrap!==t&&(this._wordWrap=t,this.update())}get wordWrapWidth(){return this._wordWrapWidth}set wordWrapWidth(t){this._wordWrapWidth!==t&&(this._wordWrapWidth=t,this.update())}get fill(){return this._originalFill}set fill(t){t!==this._originalFill&&(this._originalFill=t,this._isFillStyle(t)&&(this._originalFill=this._createProxy({...ol.defaultFillStyle,...t},()=>{this._fill=kr({...this._originalFill},ol.defaultFillStyle)})),this._fill=kr(t===0?"black":t,ol.defaultFillStyle),this.update())}get stroke(){return this._originalStroke}set stroke(t){t!==this._originalStroke&&(this._originalStroke=t,this._isFillStyle(t)&&(this._originalStroke=this._createProxy({...ol.defaultStrokeStyle,...t},()=>{this._stroke=tp({...this._originalStroke},ol.defaultStrokeStyle)})),this._stroke=tp(t,ol.defaultStrokeStyle),this.update())}get tagStyles(){return this._tagStyles}set tagStyles(t){this._tagStyles!==t&&(this._tagStyles=t??void 0,this.update())}update(){this._tick++,this._cachedFontString=null,this.emit("update",this)}reset(){const t=Kr.defaultTextStyle;for(const n in t)this[n]=t[n]}assign(t){for(const n in t){const s=n;this[s]=t[n]}return this}get styleKey(){return`${this.uid}-${this._tick}`}get _fontString(){return this._cachedFontString===null&&(this._cachedFontString=mg(this)),this._cachedFontString}_toObject(){return{align:this.align,breakWords:this.breakWords,dropShadow:this._dropShadow?{...this._dropShadow}:null,fill:this._fill?{...this._fill}:void 0,fontFamily:this.fontFamily,fontSize:this.fontSize,fontStyle:this.fontStyle,fontVariant:this.fontVariant,fontWeight:this.fontWeight,leading:this.leading,letterSpacing:this.letterSpacing,lineHeight:this.lineHeight,padding:this.padding,stroke:this._stroke?{...this._stroke}:void 0,textBaseline:this.textBaseline,trim:this.trim,whiteSpace:this.whiteSpace,wordWrap:this.wordWrap,wordWrapWidth:this.wordWrapWidth,filters:this._filters?[...this._filters]:void 0,tagStyles:this._tagStyles?{...this._tagStyles}:void 0}}clone(){return new Kr(this._toObject())}_getFinalPadding(){let t=0;if(this._filters)for(let n=0;n<this._filters.length;n++)t+=this._filters[n].padding;return Math.max(this._padding,t)}destroy(t=!1){var s,o,f,d;if(this.removeAllListeners(),typeof t=="boolean"?t:t==null?void 0:t.texture){const m=typeof t=="boolean"?t:t==null?void 0:t.textureSource;(s=this._fill)!=null&&s.texture&&this._fill.texture.destroy(m),(o=this._originalFill)!=null&&o.texture&&this._originalFill.texture.destroy(m),(f=this._stroke)!=null&&f.texture&&this._stroke.texture.destroy(m),(d=this._originalStroke)!=null&&d.texture&&this._originalStroke.texture.destroy(m)}this._fill=null,this._stroke=null,this.dropShadow=null,this._originalStroke=null,this._originalFill=null}_createProxy(t,n){return new Proxy(t,{set:(s,o,f)=>(s[o]===f||(s[o]=f,n==null||n(o,f),this.update()),!0)})}_isFillStyle(t){return(t??null)!==null&&!(Sn.isColorLike(t)||t instanceof Ls||t instanceof pp)}};Xg.defaultDropShadow={alpha:1,angle:Math.PI/6,blur:0,color:"black",distance:5};Xg.defaultTextStyle={align:"left",breakWords:!1,dropShadow:null,fill:"black",fontFamily:"Arial",fontSize:26,fontStyle:"normal",fontVariant:"normal",fontWeight:"normal",leading:0,letterSpacing:0,lineHeight:0,padding:0,stroke:null,textBaseline:"alphabetic",trim:!1,whiteSpace:"pre",wordWrap:!1,wordWrapWidth:100};let Pr=Xg;function R3(i){const t=i;if(typeof t.dropShadow=="boolean"&&t.dropShadow){const n=Pr.defaultDropShadow;i.dropShadow={alpha:t.dropShadowAlpha??n.alpha,angle:t.dropShadowAngle??n.angle,blur:t.dropShadowBlur??n.blur,color:t.dropShadowColor??n.color,distance:t.dropShadowDistance??n.distance}}if(t.strokeThickness!==void 0){ce(tn,"strokeThickness is now a part of stroke");const n=t.stroke;let s={};if(Sn.isColorLike(n))s.color=n;else if(n instanceof Ls||n instanceof pp)s.fill=n;else if(Object.hasOwnProperty.call(n,"color")||Object.hasOwnProperty.call(n,"fill"))s=n;else throw new Error("Invalid stroke value.");i.stroke={...s,width:t.strokeThickness}}if(Array.isArray(t.fillGradientStops)){if(ce(tn,"gradient fill is now a fill pattern: `new FillGradient(...)`"),!Array.isArray(t.fill)||t.fill.length===0)throw new Error("Invalid fill value. Expected an array of colors for gradient fill.");t.fill.length!==t.fillGradientStops.length&&Da("The number of fill colors must match the number of fill gradient stops.");const n=new Ls({start:{x:0,y:0},end:{x:0,y:1},textureSpace:"local"}),s=t.fillGradientStops.slice(),o=t.fill.map(f=>Sn.shared.setValue(f).toNumber());s.forEach((f,d)=>{n.addColorStop(f,o[d])}),i.fill={fill:n}}}function z3(i,t){const{texture:n,bounds:s}=i,o=t._style._getFinalPadding();yx(s,t._anchor,n);const f=t._anchor._x*o*2,d=t._anchor._y*o*2;s.minX-=o-f,s.minY-=o-d,s.maxX-=o-f,s.maxY-=o-d}class D3{constructor(){this.batcherName="default",this.topology="triangle-list",this.attributeSize=4,this.indexSize=6,this.packAsQuad=!0,this.roundPixels=0,this._attributeStart=0,this._batcher=null,this._batch=null}get blendMode(){return this.renderable.groupBlendMode}get color(){return this.renderable.groupColorAlpha}reset(){this.renderable=null,this.texture=null,this._batcher=null,this._batch=null,this.bounds=null}destroy(){this.reset()}}class O3 extends D3{}class O_{constructor(t){this._renderer=t,t.runners.resolutionChange.add(this),this._managedTexts=new Kh({renderer:t,type:"renderable",onUnload:this.onTextUnload.bind(this),name:"canvasText"})}resolutionChange(){for(const t in this._managedTexts.items){const n=this._managedTexts.items[t];n!=null&&n._autoResolution&&n.onViewUpdate()}}validateRenderable(t){const n=this._getGpuText(t),s=t.styleKey;return n.currentKey!==s?!0:t._didTextUpdate}addRenderable(t,n){const s=this._getGpuText(t);if(t._didTextUpdate){const o=t._autoResolution?this._renderer.resolution:t.resolution;(s.currentKey!==t.styleKey||t._resolution!==o)&&this._updateGpuText(t),t._didTextUpdate=!1,z3(s,t)}this._renderer.renderPipes.batch.addToBatch(s,n)}updateRenderable(t){const n=this._getGpuText(t);n._batcher.updateElement(n)}_updateGpuText(t){const n=this._getGpuText(t);n.texture&&this._renderer.canvasText.decreaseReferenceCount(n.currentKey),t._resolution=t._autoResolution?this._renderer.resolution:t.resolution,n.texture=this._renderer.canvasText.getManagedTexture(t),n.currentKey=t.styleKey}_getGpuText(t){return t._gpuData[this._renderer.uid]||this.initGpuText(t)}initGpuText(t){const n=new O3;return n.currentKey="--",n.renderable=t,n.transform=t.groupTransform,n.bounds={minX:0,maxX:1,minY:0,maxY:0},n.roundPixels=this._renderer._roundPixels|t._roundPixels,t._gpuData[this._renderer.uid]=n,this._managedTexts.add(t),n}onTextUnload(t){const n=t._gpuData[this._renderer.uid];if(!n)return;const{canvasText:s}=this._renderer;s.getReferenceCount(n.currentKey)>0?s.decreaseReferenceCount(n.currentKey):n.texture&&s.returnTexture(n.texture)}destroy(){this._managedTexts.destroy(),this._renderer=null}}O_.extension={type:[kt.WebGLPipes,kt.WebGPUPipes,kt.CanvasPipes],name:"text"};const N3=new Bi;function U3(i,t,n,s,o=!1){const f=N3;f.minX=0,f.minY=0,f.maxX=i.width/s|0,f.maxY=i.height/s|0;const d=fp.getOptimalTexture(f.width,f.height,s,!1,o);return d.source.uploadMethodId="image",d.source.resource=i,d.source.alphaMode="premultiply-alpha-on-upload",d.frame.width=t/s,d.frame.height=n/s,d.source.emit("update",d.source),d.updateUvs(),d}class N_{constructor(t,n){this._activeTextures={},this._renderer=t,this._retainCanvasContext=n}getTexture(t,n,s,o){typeof t=="string"&&(ce("8.0.0","CanvasTextSystem.getTexture: Use object TextOptions instead of separate arguments"),t={text:t,style:s,resolution:n}),t.style instanceof Pr||(t.style=new Pr(t.style)),t.textureStyle instanceof Ac||(t.textureStyle=new Ac(t.textureStyle)),typeof t.text!="string"&&(t.text=t.text.toString());const{text:f,style:d,textureStyle:m,autoGenerateMipmaps:g}=t,v=t.resolution??this._renderer.resolution,{frame:S,canvasAndContext:b}=Tc.getCanvasAndContext({text:f,style:d,resolution:v}),A=U3(b.canvas,S.width,S.height,v,g);if(m&&(A.source.style=m),d.trim&&(S.pad(d.padding),A.frame.copyFrom(S),A.frame.scale(1/v),A.updateUvs()),d.filters){const E=this._applyFilters(A,d.filters);return this.returnTexture(A),Tc.returnCanvasAndContext(b),E}return this._renderer.texture.initSource(A._source),this._retainCanvasContext||Tc.returnCanvasAndContext(b),A}returnTexture(t){const n=t.source,s=n.resource;if(this._retainCanvasContext&&(s!=null&&s.getContext)){const o=s.getContext("2d");o&&Tc.returnCanvasAndContext({canvas:s,context:o})}n.resource=null,n.uploadMethodId="unknown",n.alphaMode="no-premultiply-alpha",fp.returnTexture(t,!0)}renderTextToCanvas(){ce("8.10.0","CanvasTextSystem.renderTextToCanvas: no longer supported, use CanvasTextSystem.getTexture instead")}getManagedTexture(t){t._resolution=t._autoResolution?this._renderer.resolution:t.resolution;const n=t.styleKey;if(this._activeTextures[n])return this._increaseReferenceCount(n),this._activeTextures[n].texture;const s=this.getTexture({text:t.text,style:t.style,resolution:t._resolution,textureStyle:t.textureStyle,autoGenerateMipmaps:t.autoGenerateMipmaps});return this._activeTextures[n]={texture:s,usageCount:1},s}decreaseReferenceCount(t){const n=this._activeTextures[t];n&&(n.usageCount--,n.usageCount===0&&(this.returnTexture(n.texture),this._activeTextures[t]=null))}getReferenceCount(t){var n;return((n=this._activeTextures[t])==null?void 0:n.usageCount)??0}_increaseReferenceCount(t){this._activeTextures[t].usageCount++}_applyFilters(t,n){const s=this._renderer.renderTarget.renderTarget,o=this._renderer.filter.generateFilteredTexture({texture:t,filters:n});return this._renderer.renderTarget.bind(s,!1),o}destroy(){this._renderer=null;for(const t in this._activeTextures)this._activeTextures[t]&&this.returnTexture(this._activeTextures[t].texture);this._activeTextures=null}}class U_ extends N_{constructor(t){super(t,!0)}}U_.extension={type:[kt.CanvasSystem],name:"canvasText"};class B_ extends N_{constructor(t){super(t,!1)}}B_.extension={type:[kt.WebGLSystem,kt.WebGPUSystem],name:"canvasText"};ke.add(U_);ke.add(B_);ke.add(O_);class w_ extends e3{constructor(...t){const n=n3(t,"Text");super(n,Pr),this.renderPipeId="text",n.textureStyle&&(this.textureStyle=n.textureStyle instanceof Ac?n.textureStyle:new Ac(n.textureStyle)),this.autoGenerateMipmaps=n.autoGenerateMipmaps??wi.defaultOptions.autoGenerateMipmaps}updateBounds(){const t=this._bounds,n=this._anchor;let s=0,o=0;if(this._style.trim){const{frame:f,canvasAndContext:d}=Tc.getCanvasAndContext({text:this.text,style:this._style,resolution:1});Tc.returnCanvasAndContext(d),s=f.width,o=f.height}else{const f=Bu.measureText(this._text,this._style);s=f.width,o=f.height}t.minX=-n._x*s,t.maxX=t.minX+s,t.minY=-n._y*o,t.maxY=t.minY+o}}ke.add(lT,sT);var Hy={exports:{}},ws={};/**
310
+ * @license React
311
+ * react-reconciler-constants.production.js
312
+ *
313
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
314
+ *
315
+ * This source code is licensed under the MIT license found in the
316
+ * LICENSE file in the root directory of this source tree.
317
+ */var E1;function B3(){return E1||(E1=1,ws.ConcurrentRoot=1,ws.ContinuousEventPriority=8,ws.DefaultEventPriority=32,ws.DiscreteEventPriority=2,ws.IdleEventPriority=268435456,ws.LegacyRoot=0,ws.NoEventPriority=0),ws}var C1;function w3(){return C1||(C1=1,Hy.exports=B3()),Hy.exports}var Ec=w3();const Vg=X.createContext({}),H3=Vg.Provider;Vg.Consumer;function H_(i,t){const n=Object.getPrototypeOf(i),s=Object.getOwnPropertyDescriptor(n,t);return!(typeof s>"u"||s.writable||s.set)}const Gu={currentUpdatePriority:Ec.DefaultEventPriority,unmountQueue:new Set};function A1(i,...t){}function G_(i,t={}){const n=i;return n.__pixireact=Object.assign({filters:[],parent:null,root:null,type:""},t),n}var G3="0.0.0-development",j3={version:G3};function q3(){}function j_(i,t,n){t instanceof Wr&&(t.__pixireact.parent=i,typeof n=="number"?i.__pixireact.filters.splice(n,0,t):i.__pixireact.filters.push(t),i.filters=i.__pixireact.filters)}function Gy(i,t){t&&(t instanceof ua?i.addChild(t):t instanceof Wr&&j_(i,t))}function Y3(){}function L3(){return!1}const pg=Object.freeze({onclick:"onClick",onglobalmousemove:"onGlobalMouseMove",onglobalpointermove:"onGlobalPointerMove",onglobaltouchmove:"onGlobalTouchMove",onmousedown:"onMouseDown",onmouseenter:"onMouseEnter",onmouseleave:"onMouseLeave",onmousemove:"onMouseMove",onmouseout:"onMouseOut",onmouseover:"onMouseOver",onmouseup:"onMouseUp",onmouseupoutside:"onMouseUpOutside",onpointercancel:"onPointerCancel",onpointerdown:"onPointerDown",onpointerenter:"onPointerEnter",onpointerleave:"onPointerLeave",onpointermove:"onPointerMove",onpointerout:"onPointerOut",onpointerover:"onPointerOver",onpointertap:"onPointerTap",onpointerup:"onPointerUp",onpointerupoutside:"onPointerUpOutside",onrightclick:"onRightClick",onrightdown:"onRightDown",onrightup:"onRightUp",onrightupoutside:"onRightUpOutside",ontap:"onTap",ontouchcancel:"onTouchCancel",ontouchend:"onTouchEnd",ontouchendoutside:"onTouchEndOutside",ontouchmove:"onTouchMove",ontouchstart:"onTouchStart",onwheel:"onWheel"}),np=Object.freeze({onClick:"onclick",onGlobalMouseMove:"onglobalmousemove",onGlobalPointerMove:"onglobalpointermove",onGlobalTouchMove:"onglobaltouchmove",onMouseDown:"onmousedown",onMouseEnter:"onmouseenter",onMouseLeave:"onmouseleave",onMouseMove:"onmousemove",onMouseOut:"onmouseout",onMouseOver:"onmouseover",onMouseUp:"onmouseup",onMouseUpOutside:"onmouseupoutside",onPointerCancel:"onpointercancel",onPointerDown:"onpointerdown",onPointerEnter:"onpointerenter",onPointerLeave:"onpointerleave",onPointerMove:"onpointermove",onPointerOut:"onpointerout",onPointerOver:"onpointerover",onPointerTap:"onpointertap",onPointerUp:"onpointerup",onPointerUpOutside:"onpointerupoutside",onRightClick:"onrightclick",onRightDown:"onrightdown",onRightUp:"onrightup",onRightUpOutside:"onrightupoutside",onTap:"ontap",onTouchCancel:"ontouchcancel",onTouchEnd:"ontouchend",onTouchEndOutside:"ontouchendoutside",onTouchMove:"ontouchmove",onTouchStart:"ontouchstart",onWheel:"onwheel"});function q_(i){return Array.isArray(i)}function Y_(i,t,n={arrays:"reference",objects:"reference",strict:!0}){const{arrays:s,objects:o,strict:f}=n;if(typeof i!=typeof t||!!i!=!!t)return!1;if(Z3(i)||V3(i))return i===t;const d=Q3(i);if(d&&o==="reference")return i===t;const m=q_(i);if(m&&s==="reference")return i===t;if((m||d)&&i===t)return!0;let g;for(g in i)if(!(g in t))return!1;let v=i;if(f&&(v=t),d&&s==="shallow"&&o==="shallow"){for(g in v)if(!Y_(i[g],t[g],{strict:f,objects:"reference"}))return!1}else for(g in v)if(i[g]!==t[g])return!1;if(L_(g)){if(m&&i.length===0&&t.length===0||d&&Object.keys(i).length===0&&Object.keys(t).length===0)return!0;if(i!==t)return!1}return!0}function X3(i){return i===null}function V3(i){return typeof i=="number"}function Q3(i){return!(i!==Object(i)||q_(i)||typeof i=="function")}function Z3(i){return typeof i=="string"}function L_(i){return i===void 0}const K3=Object.freeze(["children","key","ref"]);function k3(i,t=[]){const n={};return Object.entries(i).reduce((s,[o,f])=>(t.includes(o)||(s[o]=f),s),n)}function yg(i,t=[]){return k3(i,K3.concat(t))}const J3="__default";function X_(i,t={},n=!1){const s=yg(i),o=yg(t),f=Object.entries(s),d=[];if(n){const m=Object.keys(o);let g=0;for(;g<m.length;){const v=m[g];!(v in s)&&f.unshift([v,`${J3}remove`]),g+=1}}return f.forEach(([m,g])=>{if(Y_(g,o[m]))return;if(m in np){d.push([m,g,!0,[]]);return}let v=[];m.includes("-")&&(v=m.split("-")),d.push([m,g,!1,v]);for(const S in s){const b=s[S];S.startsWith(`${m}-`)&&d.push([S,b,!1,S.split("-")])}}),{changes:d}}function P3(i){const t=i;return!(!t||!t.changes)}const W3="__default",M1=new Map,R1={};function z1(i,t){if(i){const n=i[t];if(!L_(n)&&!X3(n))return n}return i}function V_(i,t){const{__pixireact:n={},...s}=i;let o;P3(t)?o=t:o=X_(t,s);const{changes:f}=o;let d=0;for(;d<f.length;){const m=f[d];let g=!1,v=m[0],S=m[1];const b=m[2],A=m[3];let E=i,R=E[v];if(v==="draw"&&typeof S=="function"&&(i instanceof fl?S(i):(g=!0,A1("warn",`The \`draw\` prop was used on a \`${n.type}\` component, but it's only valid on \`graphics\` components.`))),v in pg){const D=v;g=!0,R1[v]||(R1[v]=!0,A1("warn",`Event names must be pascal case; instead of \`${v}\`, you probably want \`${pg[D]}\`.`))}if(!g){if(A.length&&(R=A.reduce(z1,E),!(R&&R.set))){const[D,...M]=A.reverse();E=M.reverse().reduce(z1,E),v=D}if(S===`${W3}remove`)if(E instanceof ua){let D=M1.get(E.constructor);D||(D=E.constructor,D=new D,M1.set(E.constructor,D)),S=D[v]}else S=0;if(b&&n){const M=np[v];S?E[M]=S:delete E[M]}else H_(E,v)||(E[v]=S)}d+=1}return i}function F3(i,t,n,s){const{children:o,...f}=s,{children:d,...m}=n,g=X_(f,m,!0);return g.changes.length?g:null}function I3(i,t,n,s){const o=F3(i,t,n,s);o&&V_(i,o)}const $3=Object.freeze([...Object.keys(pg),"draw"]),gg={};function tM(i){const t=i.charAt(0),n=i.substring(1);return`${t.toUpperCase()}${n}`}function eM(i,t){return t.toLowerCase()}function nM(i){let t=i;return i.startsWith("pixi")&&(t=i.replace(/^pixi([A-Z])/,eM)),t}function aM(i,t,n){const s=nM(i),o=tM(s);if(!(o in gg))throw new Error(`${o} is not part of the PIXI namespace! Did you forget to extend?`);const f=gg[o],d=yg(t,$3);Object.entries(t).forEach(([g,v])=>{if(g in np){const S=np[g];d[S]=v}});const m=G_(new f(d),{root:n,type:s});return V_(m,t),m}var jy={exports:{}},qy={exports:{}},Yy={exports:{}},Ly={};/**
318
+ * @license React
319
+ * scheduler.production.js
320
+ *
321
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
322
+ *
323
+ * This source code is licensed under the MIT license found in the
324
+ * LICENSE file in the root directory of this source tree.
325
+ */var D1;function iM(){return D1||(D1=1,(function(i){function t(w,H){var at=w.length;w.push(H);t:for(;0<at;){var et=at-1>>>1,ft=w[et];if(0<o(ft,H))w[et]=H,w[at]=ft,at=et;else break t}}function n(w){return w.length===0?null:w[0]}function s(w){if(w.length===0)return null;var H=w[0],at=w.pop();if(at!==H){w[0]=at;t:for(var et=0,ft=w.length,j=ft>>>1;et<j;){var I=2*(et+1)-1,st=w[I],yt=I+1,Tt=w[yt];if(0>o(st,at))yt<ft&&0>o(Tt,st)?(w[et]=Tt,w[yt]=at,et=yt):(w[et]=st,w[I]=at,et=I);else if(yt<ft&&0>o(Tt,at))w[et]=Tt,w[yt]=at,et=yt;else break t}}return H}function o(w,H){var at=w.sortIndex-H.sortIndex;return at!==0?at:w.id-H.id}if(i.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var f=performance;i.unstable_now=function(){return f.now()}}else{var d=Date,m=d.now();i.unstable_now=function(){return d.now()-m}}var g=[],v=[],S=1,b=null,A=3,E=!1,R=!1,D=!1,M=typeof setTimeout=="function"?setTimeout:null,O=typeof clearTimeout=="function"?clearTimeout:null,U=typeof setImmediate<"u"?setImmediate:null;function B(w){for(var H=n(v);H!==null;){if(H.callback===null)s(v);else if(H.startTime<=w)s(v),H.sortIndex=H.expirationTime,t(g,H);else break;H=n(v)}}function G(w){if(D=!1,B(w),!R)if(n(g)!==null)R=!0,xt();else{var H=n(v);H!==null&&Dt(G,H.startTime-w)}}var Z=!1,V=-1,K=5,pt=-1;function ct(){return!(i.unstable_now()-pt<K)}function ht(){if(Z){var w=i.unstable_now();pt=w;var H=!0;try{t:{R=!1,D&&(D=!1,O(V),V=-1),E=!0;var at=A;try{e:{for(B(w),b=n(g);b!==null&&!(b.expirationTime>w&&ct());){var et=b.callback;if(typeof et=="function"){b.callback=null,A=b.priorityLevel;var ft=et(b.expirationTime<=w);if(w=i.unstable_now(),typeof ft=="function"){b.callback=ft,B(w),H=!0;break e}b===n(g)&&s(g),B(w)}else s(g);b=n(g)}if(b!==null)H=!0;else{var j=n(v);j!==null&&Dt(G,j.startTime-w),H=!1}}break t}finally{b=null,A=at,E=!1}H=void 0}}finally{H?dt():Z=!1}}}var dt;if(typeof U=="function")dt=function(){U(ht)};else if(typeof MessageChannel<"u"){var vt=new MessageChannel,_t=vt.port2;vt.port1.onmessage=ht,dt=function(){_t.postMessage(null)}}else dt=function(){M(ht,0)};function xt(){Z||(Z=!0,dt())}function Dt(w,H){V=M(function(){w(i.unstable_now())},H)}i.unstable_IdlePriority=5,i.unstable_ImmediatePriority=1,i.unstable_LowPriority=4,i.unstable_NormalPriority=3,i.unstable_Profiling=null,i.unstable_UserBlockingPriority=2,i.unstable_cancelCallback=function(w){w.callback=null},i.unstable_continueExecution=function(){R||E||(R=!0,xt())},i.unstable_forceFrameRate=function(w){0>w||125<w?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):K=0<w?Math.floor(1e3/w):5},i.unstable_getCurrentPriorityLevel=function(){return A},i.unstable_getFirstCallbackNode=function(){return n(g)},i.unstable_next=function(w){switch(A){case 1:case 2:case 3:var H=3;break;default:H=A}var at=A;A=H;try{return w()}finally{A=at}},i.unstable_pauseExecution=function(){},i.unstable_requestPaint=function(){},i.unstable_runWithPriority=function(w,H){switch(w){case 1:case 2:case 3:case 4:case 5:break;default:w=3}var at=A;A=w;try{return H()}finally{A=at}},i.unstable_scheduleCallback=function(w,H,at){var et=i.unstable_now();switch(typeof at=="object"&&at!==null?(at=at.delay,at=typeof at=="number"&&0<at?et+at:et):at=et,w){case 1:var ft=-1;break;case 2:ft=250;break;case 5:ft=1073741823;break;case 4:ft=1e4;break;default:ft=5e3}return ft=at+ft,w={id:S++,callback:H,priorityLevel:w,startTime:at,expirationTime:ft,sortIndex:-1},at>et?(w.sortIndex=at,t(v,w),n(g)===null&&w===n(v)&&(D?(O(V),V=-1):D=!0,Dt(G,at-et))):(w.sortIndex=ft,t(g,w),R||E||(R=!0,xt())),w},i.unstable_shouldYield=ct,i.unstable_wrapCallback=function(w){var H=A;return function(){var at=A;A=H;try{return w.apply(this,arguments)}finally{A=at}}}})(Ly)),Ly}var O1;function lM(){return O1||(O1=1,Yy.exports=iM()),Yy.exports}/**
326
+ * @license React
327
+ * react-reconciler.production.js
328
+ *
329
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
330
+ *
331
+ * This source code is licensed under the MIT license found in the
332
+ * LICENSE file in the root directory of this source tree.
333
+ */var N1;function sM(){return N1||(N1=1,(function(i){i.exports=function(t){function n(l,u,h,y){return new mf(l,u,h,y)}function s(){}function o(l){var u="https://react.dev/errors/"+l;if(1<arguments.length){u+="?args[]="+encodeURIComponent(arguments[1]);for(var h=2;h<arguments.length;h++)u+="&args[]="+encodeURIComponent(arguments[h])}return"Minified React error #"+l+"; visit "+u+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function f(l){return l===null||typeof l!="object"?null:(l=Sf&&l[Sf]||l["@@iterator"],typeof l=="function"?l:null)}function d(l){if(l==null)return null;if(typeof l=="function")return l.$$typeof===xs?null:l.displayName||l.name||null;if(typeof l=="string")return l;switch(l){case cu:return"Fragment";case Fa:return"Portal";case _f:return"Profiler";case xf:return"StrictMode";case wo:return"Suspense";case wl:return"SuspenseList"}if(typeof l=="object")switch(l.$$typeof){case xi:return(l.displayName||"Context")+".Provider";case Bl:return(l._context.displayName||"Context")+".Consumer";case fu:var u=l.render;return l=l.displayName,l||(l=u.displayName||u.name||"",l=l!==""?"ForwardRef("+l+")":"ForwardRef"),l;case pr:return u=l.displayName||null,u!==null?u:d(l.type)||"Memo";case Ia:u=l._payload,l=l._init;try{return d(l(u))}catch{}}return null}function m(l){if(Ho===void 0)try{throw Error()}catch(h){var u=h.stack.trim().match(/\n( *(at )?)/);Ho=u&&u[1]||"",bf=-1<h.stack.indexOf(`
334
+ at`)?" (<anonymous>)":-1<h.stack.indexOf("@")?"@unknown:0:0":""}return`
335
+ `+Ho+l+bf}function g(l,u){if(!l||Hl)return"";Hl=!0;var h=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var y={DetermineComponentFrameRoot:function(){try{if(u){var St=function(){throw Error()};if(Object.defineProperty(St.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(St,[])}catch(Gt){var bt=Gt}Reflect.construct(l,[],St)}else{try{St.call()}catch(Gt){bt=Gt}l.call(St.prototype)}}else{try{throw Error()}catch(Gt){bt=Gt}(St=l())&&typeof St.catch=="function"&&St.catch(function(){})}}catch(Gt){if(Gt&&bt&&typeof Gt.stack=="string")return[Gt.stack,bt.stack]}return[null,null]}};y.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var _=Object.getOwnPropertyDescriptor(y.DetermineComponentFrameRoot,"name");_&&_.configurable&&Object.defineProperty(y.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var T=y.DetermineComponentFrameRoot(),N=T[0],q=T[1];if(N&&q){var P=N.split(`
336
+ `),ut=q.split(`
337
+ `);for(_=y=0;y<P.length&&!P[y].includes("DetermineComponentFrameRoot");)y++;for(;_<ut.length&&!ut[_].includes("DetermineComponentFrameRoot");)_++;if(y===P.length||_===ut.length)for(y=P.length-1,_=ut.length-1;1<=y&&0<=_&&P[y]!==ut[_];)_--;for(;1<=y&&0<=_;y--,_--)if(P[y]!==ut[_]){if(y!==1||_!==1)do if(y--,_--,0>_||P[y]!==ut[_]){var gt=`
338
+ `+P[y].replace(" at new "," at ");return l.displayName&&gt.includes("<anonymous>")&&(gt=gt.replace("<anonymous>",l.displayName)),gt}while(1<=y&&0<=_);break}}}finally{Hl=!1,Error.prepareStackTrace=h}return(h=l?l.displayName||l.name:"")?m(h):""}function v(l){switch(l.tag){case 26:case 27:case 5:return m(l.type);case 16:return m("Lazy");case 13:return m("Suspense");case 19:return m("SuspenseList");case 0:case 15:return l=g(l.type,!1),l;case 11:return l=g(l.type.render,!1),l;case 1:return l=g(l.type,!0),l;default:return""}}function S(l){try{var u="";do u+=v(l),l=l.return;while(l);return u}catch(h){return`
339
+ Error generating stack: `+h.message+`
340
+ `+h.stack}}function b(l){var u=l,h=l;if(l.alternate)for(;u.return;)u=u.return;else{l=u;do u=l,(u.flags&4098)!==0&&(h=u.return),l=u.return;while(l)}return u.tag===3?h:null}function A(l){if(b(l)!==l)throw Error(o(188))}function E(l){var u=l.alternate;if(!u){if(u=b(l),u===null)throw Error(o(188));return u!==l?null:l}for(var h=l,y=u;;){var _=h.return;if(_===null)break;var T=_.alternate;if(T===null){if(y=_.return,y!==null){h=y;continue}break}if(_.child===T.child){for(T=_.child;T;){if(T===h)return A(_),l;if(T===y)return A(_),u;T=T.sibling}throw Error(o(188))}if(h.return!==y.return)h=_,y=T;else{for(var N=!1,q=_.child;q;){if(q===h){N=!0,h=_,y=T;break}if(q===y){N=!0,y=_,h=T;break}q=q.sibling}if(!N){for(q=T.child;q;){if(q===h){N=!0,h=T,y=_;break}if(q===y){N=!0,y=T,h=_;break}q=q.sibling}if(!N)throw Error(o(189))}}if(h.alternate!==y)throw Error(o(190))}if(h.tag!==3)throw Error(o(188));return h.stateNode.current===h?l:u}function R(l){var u=l.tag;if(u===5||u===26||u===27||u===6)return l;for(l=l.child;l!==null;){if(u=R(l),u!==null)return u;l=l.sibling}return null}function D(l){var u=l.tag;if(u===5||u===26||u===27||u===6)return l;for(l=l.child;l!==null;){if(l.tag!==4&&(u=D(l),u!==null))return u;l=l.sibling}return null}function M(l){return{current:l}}function O(l){0>$i||(l.current=Er[$i],Er[$i]=null,$i--)}function U(l,u){$i++,Er[$i]=l.current,l.current=u}function B(l){return l>>>=0,l===0?32:31-(Cr(l)/$d|0)|0}function G(l){var u=l&42;if(u!==0)return u;switch(l&-l){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128: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 l&4194176;case 4194304:case 8388608:case 16777216:case 33554432:return l&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return l}}function Z(l,u){var h=l.pendingLanes;if(h===0)return 0;var y=0,_=l.suspendedLanes,T=l.pingedLanes,N=l.warmLanes;l=l.finishedLanes!==0;var q=h&134217727;return q!==0?(h=q&~_,h!==0?y=G(h):(T&=q,T!==0?y=G(T):l||(N=q&~N,N!==0&&(y=G(N))))):(q=h&~_,q!==0?y=G(q):T!==0?y=G(T):l||(N=h&~N,N!==0&&(y=G(N)))),y===0?0:u!==0&&u!==y&&(u&_)===0&&(_=y&-y,N=u&-u,_>=N||_===32&&(N&4194176)!==0)?u:y}function V(l,u){return(l.pendingLanes&~(l.suspendedLanes&~l.pingedLanes)&u)===0}function K(l,u){switch(l){case 1:case 2:case 4:case 8:return u+250;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 u+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function pt(){var l=pu;return pu<<=1,(pu&4194176)===0&&(pu=128),l}function ct(){var l=Ar;return Ar<<=1,(Ar&62914560)===0&&(Ar=4194304),l}function ht(l){for(var u=[],h=0;31>h;h++)u.push(l);return u}function dt(l,u){l.pendingLanes|=u,u!==268435456&&(l.suspendedLanes=0,l.pingedLanes=0,l.warmLanes=0)}function vt(l,u,h,y,_,T){var N=l.pendingLanes;l.pendingLanes=h,l.suspendedLanes=0,l.pingedLanes=0,l.warmLanes=0,l.expiredLanes&=h,l.entangledLanes&=h,l.errorRecoveryDisabledLanes&=h,l.shellSuspendCounter=0;var q=l.entanglements,P=l.expirationTimes,ut=l.hiddenUpdates;for(h=N&~h;0<h;){var gt=31-Fn(h),St=1<<gt;q[gt]=0,P[gt]=-1;var bt=ut[gt];if(bt!==null)for(ut[gt]=null,gt=0;gt<bt.length;gt++){var Gt=bt[gt];Gt!==null&&(Gt.lane&=-536870913)}h&=~St}y!==0&&_t(l,y,0),T!==0&&_===0&&l.tag!==0&&(l.suspendedLanes|=T&~(N&~u))}function _t(l,u,h){l.pendingLanes|=u,l.suspendedLanes&=~u;var y=31-Fn(u);l.entangledLanes|=u,l.entanglements[y]=l.entanglements[y]|1073741824|h&4194218}function xt(l,u){var h=l.entangledLanes|=u;for(l=l.entanglements;h;){var y=31-Fn(h),_=1<<y;_&u|l[y]&u&&(l[y]|=u),h&=~_}}function Dt(l){return l&=-l,2<l?8<l?(l&134217727)!==0?32:268435456:8:2}function w(l){if(In&&typeof In.onCommitFiberRoot=="function")try{In.onCommitFiberRoot(gu,l,void 0,(l.current.flags&128)===128)}catch{}}function H(l){if(typeof am=="function"&&$f(l),In&&typeof In.setStrictMode=="function")try{In.setStrictMode(gu,l)}catch{}}function at(l,u){return l===u&&(l!==0||1/l===1/u)||l!==l&&u!==u}function et(l,u){if(typeof l=="object"&&l!==null){var h=$o.get(l);return h!==void 0?h:(u={value:l,source:u,stack:S(u)},$o.set(l,u),u)}return{value:l,source:u,stack:S(u)}}function ft(l,u){Re[we++]=zr,Re[we++]=Rr,Rr=l,zr=u}function j(l,u,h){va[xa++]=Ei,va[xa++]=Ga,va[xa++]=$a,$a=l;var y=Ei;l=Ga;var _=32-Fn(y)-1;y&=~(1<<_),h+=1;var T=32-Fn(u)+_;if(30<T){var N=_-_%5;T=(y&(1<<N)-1).toString(32),y>>=N,_-=N,Ei=1<<32-Fn(u)+_|h<<_|y,Ga=T+l}else Ei=1<<T|h<<_|y,Ga=l}function I(l){l.return!==null&&(ft(l,1),j(l,1,0))}function st(l){for(;l===Rr;)Rr=Re[--we],Re[we]=null,zr=Re[--we],Re[we]=null;for(;l===$a;)$a=va[--xa],va[xa]=null,Ga=va[--xa],va[xa]=null,Ei=va[--xa],va[xa]=null}function yt(l,u){U(ti,u),U(Dr,l),U(dn,null),l=_s(u),O(dn),U(dn,l)}function Tt(){O(dn),O(Dr),O(ti)}function Ot(l){l.memoizedState!==null&&U(vu,l);var u=dn.current,h=Nd(u,l.type);u!==h&&(U(Dr,l),U(dn,h))}function Ut(l){Dr.current===l&&(O(dn),O(Dr)),vu.current===l&&(O(vu),Si?wt._currentValue=Wn:wt._currentValue2=Wn)}function re(l){var u=Error(o(418,""));throw Qn(et(u,l)),Or}function ue(l,u){if(!jn)throw Error(o(175));bp(l.stateNode,l.type,l.memoizedProps,u,l)||re(l)}function ra(l){for(Rn=l.return;Rn;)switch(Rn.tag){case 3:case 27:ja=!0;return;case 5:case 13:ja=!1;return;default:Rn=Rn.return}}function Oa(l){if(!jn||l!==Rn)return!1;if(!ae)return ra(l),ae=!0,!1;var u=!1;if(vn?l.tag!==3&&l.tag!==27&&(l.tag!==5||Jd(l.type)&&!ql(l.type,l.memoizedProps))&&(u=!0):l.tag!==3&&(l.tag!==5||Jd(l.type)&&!ql(l.type,l.memoizedProps))&&(u=!0),u&&_n&&re(l),ra(l),l.tag===13){if(!jn)throw Error(o(316));if(l=l.memoizedState,l=l!==null?l.dehydrated:null,!l)throw Error(o(317));_n=Kd(l)}else _n=Rn?Yf(l.stateNode):null;return!0}function Un(){jn&&(_n=Rn=null,ae=!1)}function Qn(l){_a===null?_a=[l]:_a.push(l)}function rn(){for(var l=Ll,u=xu=Ll=0;u<l;){var h=Sa[u];Sa[u++]=null;var y=Sa[u];Sa[u++]=null;var _=Sa[u];Sa[u++]=null;var T=Sa[u];if(Sa[u++]=null,y!==null&&_!==null){var N=y.pending;N===null?_.next=_:(_.next=N.next,N.next=_),y.pending=_}T!==0&&ju(h,_,T)}}function Zn(l,u,h,y){Sa[Ll++]=l,Sa[Ll++]=u,Sa[Ll++]=h,Sa[Ll++]=y,xu|=y,l.lanes|=y,l=l.alternate,l!==null&&(l.lanes|=y)}function ts(l,u,h,y){return Zn(l,u,h,y),es(l)}function Za(l,u){return Zn(l,null,null,u),es(l)}function ju(l,u,h){l.lanes|=h;var y=l.alternate;y!==null&&(y.lanes|=h);for(var _=!1,T=l.return;T!==null;)T.childLanes|=h,y=T.alternate,y!==null&&(y.childLanes|=h),T.tag===22&&(l=T.stateNode,l===null||l._visibility&1||(_=!0)),l=T,T=T.return;_&&u!==null&&l.tag===3&&(T=l.stateNode,_=31-Fn(h),T=T.hiddenUpdates,l=T[_],l===null?T[_]=[u]:l.push(u),u.lane=h|536870912)}function es(l){if(50<Os)throw Os=0,Ln=null,Error(o(185));for(var u=l.return;u!==null;)l=u,u=l.return;return l.tag===3?l.stateNode:null}function Na(l){l!==Es&&l.next===null&&(Es===null?_u=Es=l:Es=Es.next=l),Ur=!0,Nr||(Nr=!0,Ph(yp))}function ml(l,u){if(!ei&&Ur){ei=!0;do for(var h=!1,y=_u;y!==null;){if(l!==0){var _=y.pendingLanes;if(_===0)var T=0;else{var N=y.suspendedLanes,q=y.pingedLanes;T=(1<<31-Fn(42|l)+1)-1,T&=_&~(N&~q),T=T&201326677?T&201326677|1:T?T|2:0}T!==0&&(h=!0,Jh(y,T))}else T=Qt,T=Z(y,y===Kt?T:0),(T&3)===0||V(y,T)||(h=!0,Jh(y,T));y=y.next}while(h);ei=!1}}function yp(){Ur=Nr=!1;var l=0;Xl!==0&&(Yl()&&(l=Xl),Xl=0);for(var u=xn(),h=null,y=_u;y!==null;){var _=y.next,T=kh(y,u);T===0?(y.next=null,h===null?_u=_:h.next=_,_===null&&(Es=h)):(h=y,(l!==0||(T&3)!==0)&&(Ur=!0)),y=_}ml(l)}function kh(l,u){for(var h=l.suspendedLanes,y=l.pingedLanes,_=l.expirationTimes,T=l.pendingLanes&-62914561;0<T;){var N=31-Fn(T),q=1<<N,P=_[N];P===-1?((q&h)===0||(q&y)!==0)&&(_[N]=K(q,u)):P<=u&&(l.expiredLanes|=q),T&=~q}if(u=Kt,h=Qt,h=Z(l,l===u?h:0),y=l.callbackNode,h===0||l===u&&ve===2||l.cancelPendingCommit!==null)return y!==null&&y!==null&&Mr(y),l.callbackNode=null,l.callbackPriority=0;if((h&3)===0||V(l,h)){if(u=h&-h,u===l.callbackPriority)return u;switch(y!==null&&Mr(y),Dt(h)){case 2:case 8:h=nm;break;case 32:h=Fo;break;case 268435456:h=Io;break;default:h=Fo}return y=Kn.bind(null,l),h=yu(h,y),l.callbackPriority=u,l.callbackNode=h,u}return y!==null&&y!==null&&Mr(y),l.callbackPriority=2,l.callbackNode=null,2}function Kn(l,u){var h=l.callbackNode;if(fn()&&l.callbackNode!==h)return null;var y=Qt;return y=Z(l,l===Kt?y:0),y===0?null:(cr(l,y,u),kh(l,xn()),l.callbackNode!=null&&l.callbackNode===h?Kn.bind(null,l):null)}function Jh(l,u){if(fn())return null;cr(l,u,!0)}function Ph(l){We?Yo(function(){(Rt&6)!==0?yu(If,l):l()}):yu(If,l)}function Fr(){return Xl===0&&(Xl=pt()),Xl}function Ir(l,u){if(Br===null){var h=Br=[];tc=0,$n=Fr(),Vl={status:"pending",value:void 0,then:function(y){h.push(y)}}}return tc++,u.then(Wh,Wh),u}function Wh(){if(--tc===0&&Br!==null){Vl!==null&&(Vl.status="fulfilled");var l=Br;Br=null,$n=0,Vl=null;for(var u=0;u<l.length;u++)(0,l[u])()}}function Fh(l,u){var h=[],y={status:"pending",value:null,reason:null,then:function(_){h.push(_)}};return l.then(function(){y.status="fulfilled",y.value=u;for(var _=0;_<h.length;_++)(0,h[_])(u)},function(_){for(y.status="rejected",y.reason=_,_=0;_<h.length;_++)(0,h[_])(void 0)}),y}function Bc(l){l.updateQueue={baseState:l.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function wc(l,u){l=l.updateQueue,u.updateQueue===l&&(u.updateQueue={baseState:l.baseState,firstBaseUpdate:l.firstBaseUpdate,lastBaseUpdate:l.lastBaseUpdate,shared:l.shared,callbacks:null})}function Ua(l){return{lane:l,tag:0,payload:null,callback:null,next:null}}function Je(l,u,h){var y=l.updateQueue;if(y===null)return null;if(y=y.shared,(Rt&2)!==0){var _=y.pending;return _===null?u.next=u:(u.next=_.next,_.next=u),y.pending=u,u=es(l),ju(l,null,h),u}return Zn(l,y,u,h),es(l)}function Ba(l,u,h){if(u=u.updateQueue,u!==null&&(u=u.shared,(h&4194176)!==0)){var y=u.lanes;y&=l.pendingLanes,h|=y,u.lanes=h,xt(l,h)}}function Bn(l,u){var h=l.updateQueue,y=l.alternate;if(y!==null&&(y=y.updateQueue,h===y)){var _=null,T=null;if(h=h.firstBaseUpdate,h!==null){do{var N={lane:h.lane,tag:h.tag,payload:h.payload,callback:null,next:null};T===null?_=T=N:T=T.next=N,h=h.next}while(h!==null);T===null?_=T=u:T=T.next=u}else _=T=u;h={baseState:y.baseState,firstBaseUpdate:_,lastBaseUpdate:T,shared:y.shared,callbacks:y.callbacks},l.updateQueue=h;return}l=h.lastBaseUpdate,l===null?h.firstBaseUpdate=u:l.next=u,h.lastBaseUpdate=u}function qu(){if(Su){var l=Vl;if(l!==null)throw l}}function Yu(l,u,h,y){Su=!1;var _=l.updateQueue;tl=!1;var T=_.firstBaseUpdate,N=_.lastBaseUpdate,q=_.shared.pending;if(q!==null){_.shared.pending=null;var P=q,ut=P.next;P.next=null,N===null?T=ut:N.next=ut,N=P;var gt=l.alternate;gt!==null&&(gt=gt.updateQueue,q=gt.lastBaseUpdate,q!==N&&(q===null?gt.firstBaseUpdate=ut:q.next=ut,gt.lastBaseUpdate=P))}if(T!==null){var St=_.baseState;N=0,gt=ut=P=null,q=T;do{var bt=q.lane&-536870913,Gt=bt!==q.lane;if(Gt?(Qt&bt)===bt:(y&bt)===bt){bt!==0&&bt===$n&&(Su=!0),gt!==null&&(gt=gt.next={lane:0,tag:q.tag,payload:q.payload,callback:null,next:null});t:{var aa=l,jr=q;bt=u;var Ns=h;switch(jr.tag){case 1:if(aa=jr.payload,typeof aa=="function"){St=aa.call(Ns,St,bt);break t}St=aa;break t;case 3:aa.flags=aa.flags&-65537|128;case 0:if(aa=jr.payload,bt=typeof aa=="function"?aa.call(Ns,St,bt):aa,bt==null)break t;St=vs({},St,bt);break t;case 2:tl=!0}}bt=q.callback,bt!==null&&(l.flags|=64,Gt&&(l.flags|=8192),Gt=_.callbacks,Gt===null?_.callbacks=[bt]:Gt.push(bt))}else Gt={lane:bt,tag:q.tag,payload:q.payload,callback:q.callback,next:null},gt===null?(ut=gt=Gt,P=St):gt=gt.next=Gt,N|=bt;if(q=q.next,q===null){if(q=_.shared.pending,q===null)break;Gt=q,q=Gt.next,Gt.next=null,_.lastBaseUpdate=Gt,_.shared.pending=null}}while(!0);gt===null&&(P=St),_.baseState=P,_.firstBaseUpdate=ut,_.lastBaseUpdate=gt,T===null&&(_.shared.lanes=0),Ca|=N,l.lanes=N,l.memoizedState=St}}function Ih(l,u){if(typeof l!="function")throw Error(o(191,l));l.call(u)}function Lu(l,u){var h=l.callbacks;if(h!==null)for(l.callbacks=null,l=0;l<h.length;l++)Ih(h[l],u)}function ns(l,u){if(ga(l,u))return!0;if(typeof l!="object"||l===null||typeof u!="object"||u===null)return!1;var h=Object.keys(l),y=Object.keys(u);if(h.length!==y.length)return!1;for(y=0;y<h.length;y++){var _=h[y];if(!wr.call(u,_)||!ga(l[_],u[_]))return!1}return!0}function Xu(l){return l=l.status,l==="fulfilled"||l==="rejected"}function ri(){}function Vu(l,u,h){switch(h=l[h],h===void 0?l.push(u):h!==u&&(u.then(ri,ri),u=h),u.status){case"fulfilled":return u.value;case"rejected":throw l=u.reason,l===ye?Error(o(483)):l;default:if(typeof u.status=="string")u.then(ri,ri);else{if(l=Kt,l!==null&&100<l.shellSuspendCounter)throw Error(o(482));l=u,l.status="pending",l.then(function(y){if(u.status==="pending"){var _=u;_.status="fulfilled",_.value=y}},function(y){if(u.status==="pending"){var _=u;_.status="rejected",_.reason=y}})}switch(u.status){case"fulfilled":return u.value;case"rejected":throw l=u.reason,l===ye?Error(o(483)):l}throw Cs=u,ye}}function Vs(){if(Cs===null)throw Error(o(459));var l=Cs;return Cs=null,l}function $r(l){var u=qa;return qa+=1,Ci===null&&(Ci=[]),Vu(Ci,l,u)}function Qs(l,u){u=u.props.ref,l.ref=u!==void 0?u:null}function Zs(l,u){throw u.$$typeof===vf?Error(o(525)):(l=Object.prototype.toString.call(u),Error(o(31,l==="[object Object]"?"object with keys {"+Object.keys(u).join(", ")+"}":l)))}function Ks(l){var u=l._init;return u(l._payload)}function $h(l){function u($,k){if(l){var nt=$.deletions;nt===null?($.deletions=[k],$.flags|=16):nt.push(k)}}function h($,k){if(!l)return null;for(;k!==null;)u($,k),k=k.sibling;return null}function y($){for(var k=new Map;$!==null;)$.key!==null?k.set($.key,$):k.set($.index,$),$=$.sibling;return k}function _($,k){return $=An($,k),$.index=0,$.sibling=null,$}function T($,k,nt){return $.index=nt,l?(nt=$.alternate,nt!==null?(nt=nt.index,nt<k?($.flags|=33554434,k):nt):($.flags|=33554434,k)):($.flags|=1048576,k)}function N($){return l&&$.alternate===null&&($.flags|=33554434),$}function q($,k,nt,mt){return k===null||k.tag!==6?(k=Ul(nt,$.mode,mt),k.return=$,k):(k=_(k,nt),k.return=$,k)}function P($,k,nt,mt){var At=nt.type;return At===cu?gt($,k,nt.props.children,mt,nt.key):k!==null&&(k.elementType===At||typeof At=="object"&&At!==null&&At.$$typeof===Ia&&Ks(At)===k.type)?(k=_(k,nt.props),Qs(k,nt),k.return=$,k):(k=wa(nt.type,nt.key,nt.props,null,$.mode,mt),Qs(k,nt),k.return=$,k)}function ut($,k,nt,mt){return k===null||k.tag!==4||k.stateNode.containerInfo!==nt.containerInfo||k.stateNode.implementation!==nt.implementation?(k=ou(nt,$.mode,mt),k.return=$,k):(k=_(k,nt.children||[]),k.return=$,k)}function gt($,k,nt,mt,At){return k===null||k.tag!==7?(k=Ji(nt,$.mode,mt,At),k.return=$,k):(k=_(k,nt),k.return=$,k)}function St($,k,nt){if(typeof k=="string"&&k!==""||typeof k=="number"||typeof k=="bigint")return k=Ul(""+k,$.mode,nt),k.return=$,k;if(typeof k=="object"&&k!==null){switch(k.$$typeof){case Pi:return nt=wa(k.type,k.key,k.props,null,$.mode,nt),Qs(nt,k),nt.return=$,nt;case Fa:return k=ou(k,$.mode,nt),k.return=$,k;case Ia:var mt=k._init;return k=mt(k._payload),St($,k,nt)}if(Gl(k)||f(k))return k=Ji(k,$.mode,nt,null),k.return=$,k;if(typeof k.then=="function")return St($,$r(k),nt);if(k.$$typeof===xi)return St($,lr($,k),nt);Zs($,k)}return null}function bt($,k,nt,mt){var At=k!==null?k.key:null;if(typeof nt=="string"&&nt!==""||typeof nt=="number"||typeof nt=="bigint")return At!==null?null:q($,k,""+nt,mt);if(typeof nt=="object"&&nt!==null){switch(nt.$$typeof){case Pi:return nt.key===At?P($,k,nt,mt):null;case Fa:return nt.key===At?ut($,k,nt,mt):null;case Ia:return At=nt._init,nt=At(nt._payload),bt($,k,nt,mt)}if(Gl(nt)||f(nt))return At!==null?null:gt($,k,nt,mt,null);if(typeof nt.then=="function")return bt($,k,$r(nt),mt);if(nt.$$typeof===xi)return bt($,k,lr($,nt),mt);Zs($,nt)}return null}function Gt($,k,nt,mt,At){if(typeof mt=="string"&&mt!==""||typeof mt=="number"||typeof mt=="bigint")return $=$.get(nt)||null,q(k,$,""+mt,At);if(typeof mt=="object"&&mt!==null){switch(mt.$$typeof){case Pi:return $=$.get(mt.key===null?nt:mt.key)||null,P(k,$,mt,At);case Fa:return $=$.get(mt.key===null?nt:mt.key)||null,ut(k,$,mt,At);case Ia:var Se=mt._init;return mt=Se(mt._payload),Gt($,k,nt,mt,At)}if(Gl(mt)||f(mt))return $=$.get(nt)||null,gt(k,$,mt,At,null);if(typeof mt.then=="function")return Gt($,k,nt,$r(mt),At);if(mt.$$typeof===xi)return Gt($,k,nt,lr(k,mt),At);Zs(k,mt)}return null}function aa($,k,nt,mt){for(var At=null,Se=null,Ht=k,le=k=0,sn=null;Ht!==null&&le<nt.length;le++){Ht.index>le?(sn=Ht,Ht=null):sn=Ht.sibling;var se=bt($,Ht,nt[le],mt);if(se===null){Ht===null&&(Ht=sn);break}l&&Ht&&se.alternate===null&&u($,Ht),k=T(se,k,le),Se===null?At=se:Se.sibling=se,Se=se,Ht=sn}if(le===nt.length)return h($,Ht),ae&&ft($,le),At;if(Ht===null){for(;le<nt.length;le++)Ht=St($,nt[le],mt),Ht!==null&&(k=T(Ht,k,le),Se===null?At=Ht:Se.sibling=Ht,Se=Ht);return ae&&ft($,le),At}for(Ht=y(Ht);le<nt.length;le++)sn=Gt(Ht,$,le,nt[le],mt),sn!==null&&(l&&sn.alternate!==null&&Ht.delete(sn.key===null?le:sn.key),k=T(sn,k,le),Se===null?At=sn:Se.sibling=sn,Se=sn);return l&&Ht.forEach(function(ul){return u($,ul)}),ae&&ft($,le),At}function jr($,k,nt,mt){if(nt==null)throw Error(o(151));for(var At=null,Se=null,Ht=k,le=k=0,sn=null,se=nt.next();Ht!==null&&!se.done;le++,se=nt.next()){Ht.index>le?(sn=Ht,Ht=null):sn=Ht.sibling;var ul=bt($,Ht,se.value,mt);if(ul===null){Ht===null&&(Ht=sn);break}l&&Ht&&ul.alternate===null&&u($,Ht),k=T(ul,k,le),Se===null?At=ul:Se.sibling=ul,Se=ul,Ht=sn}if(se.done)return h($,Ht),ae&&ft($,le),At;if(Ht===null){for(;!se.done;le++,se=nt.next())se=St($,se.value,mt),se!==null&&(k=T(se,k,le),Se===null?At=se:Se.sibling=se,Se=se);return ae&&ft($,le),At}for(Ht=y(Ht);!se.done;le++,se=nt.next())se=Gt(Ht,$,le,se.value,mt),se!==null&&(l&&se.alternate!==null&&Ht.delete(se.key===null?le:se.key),k=T(se,k,le),Se===null?At=se:Se.sibling=se,Se=se);return l&&Ht.forEach(function(oc){return u($,oc)}),ae&&ft($,le),At}function Ns($,k,nt,mt){if(typeof nt=="object"&&nt!==null&&nt.type===cu&&nt.key===null&&(nt=nt.props.children),typeof nt=="object"&&nt!==null){switch(nt.$$typeof){case Pi:t:{for(var At=nt.key;k!==null;){if(k.key===At){if(At=nt.type,At===cu){if(k.tag===7){h($,k.sibling),mt=_(k,nt.props.children),mt.return=$,$=mt;break t}}else if(k.elementType===At||typeof At=="object"&&At!==null&&At.$$typeof===Ia&&Ks(At)===k.type){h($,k.sibling),mt=_(k,nt.props),Qs(mt,nt),mt.return=$,$=mt;break t}h($,k);break}else u($,k);k=k.sibling}nt.type===cu?(mt=Ji(nt.props.children,$.mode,mt,nt.key),mt.return=$,$=mt):(mt=wa(nt.type,nt.key,nt.props,null,$.mode,mt),Qs(mt,nt),mt.return=$,$=mt)}return N($);case Fa:t:{for(At=nt.key;k!==null;){if(k.key===At)if(k.tag===4&&k.stateNode.containerInfo===nt.containerInfo&&k.stateNode.implementation===nt.implementation){h($,k.sibling),mt=_(k,nt.children||[]),mt.return=$,$=mt;break t}else{h($,k);break}else u($,k);k=k.sibling}mt=ou(nt,$.mode,mt),mt.return=$,$=mt}return N($);case Ia:return At=nt._init,nt=At(nt._payload),Ns($,k,nt,mt)}if(Gl(nt))return aa($,k,nt,mt);if(f(nt)){if(At=f(nt),typeof At!="function")throw Error(o(150));return nt=At.call(nt),jr($,k,nt,mt)}if(typeof nt.then=="function")return Ns($,k,$r(nt),mt);if(nt.$$typeof===xi)return Ns($,k,lr($,nt),mt);Zs($,nt)}return typeof nt=="string"&&nt!==""||typeof nt=="number"||typeof nt=="bigint"?(nt=""+nt,k!==null&&k.tag===6?(h($,k.sibling),mt=_(k,nt),mt.return=$,$=mt):(h($,k),mt=Ul(nt,$.mode,mt),mt.return=$,$=mt),N($)):h($,k)}return function($,k,nt,mt){try{qa=0;var At=Ns($,k,nt,mt);return Ci=null,At}catch(Ht){if(Ht===ye)throw Ht;var Se=n(29,Ht,null,$.mode);return Se.lanes=mt,Se.return=$,Se}finally{}}}function Hc(l,u){l=ni,U(ba,l),U(Ai,u),ni=l|u.baseLanes}function to(){U(ba,ni),U(Ai,Ai.current)}function eo(){ni=ba.current,O(Ai),O(ba)}function oi(l){var u=l.alternate;U(Fe,Fe.current&1),U(Ta,l),Ya===null&&(u===null||Ai.current!==null||u.memoizedState!==null)&&(Ya=l)}function no(l){if(l.tag===22){if(U(Fe,Fe.current),U(Ta,l),Ya===null){var u=l.alternate;u!==null&&u.memoizedState!==null&&(Ya=l)}}else Hi()}function Hi(){U(Fe,Fe.current),U(Ta,Ta.current)}function ci(l){O(Ta),Ya===l&&(Ya=null),O(Fe)}function Ka(l){for(var u=l;u!==null;){if(u.tag===13){var h=u.memoizedState;if(h!==null&&(h=h.dehydrated,h===null||Zo(h)||Tr(h)))return u}else if(u.tag===19&&u.memoizedProps.revealOrder!==void 0){if((u.flags&128)!==0)return u}else if(u.child!==null){u.child.return=u,u=u.child;continue}if(u===l)break;for(;u.sibling===null;){if(u.return===null||u.return===l)return null;u=u.return}u.sibling.return=u.return,u=u.sibling}return null}function Jt(){throw Error(o(321))}function bn(l,u){if(u===null)return!1;for(var h=0;h<u.length&&h<l.length;h++)if(!ga(l[h],u[h]))return!1;return!0}function pl(l,u,h,y,_,T){return Mi=T,Xt=u,u.memoizedState=null,u.updateQueue=null,u.lanes=0,Nt.H=l===null||l.memoizedState===null?Ie:zn,el=!1,T=h(y,_),el=!1,ze&&(T=td(u,h,y,_)),ao(l),T}function ao(l){Nt.H=ie;var u=oe!==null&&oe.next!==null;if(Mi=0,Le=oe=Xt=null,La=!1,He=0,bu=null,u)throw Error(o(300));l===null||Xe||(l=l.dependencies,l!==null&&bl(l)&&(Xe=!0))}function td(l,u,h,y){Xt=l;var _=0;do{if(ze&&(bu=null),He=0,ze=!1,25<=_)throw Error(o(301));if(_+=1,Le=oe=null,l.updateQueue!=null){var T=l.updateQueue;T.lastEffect=null,T.events=null,T.stores=null,T.memoCache!=null&&(T.memoCache.index=0)}Nt.H=Zl,T=u(h,y)}while(ze);return T}function gp(){var l=Nt.H,u=l.useState()[0];return u=typeof u.then=="function"?Gi(u):u,l=l.useState()[0],(oe!==null?oe.memoizedState:null)!==l&&(Xt.flags|=1024),u}function io(){var l=Hr!==0;return Hr=0,l}function as(l,u,h){u.updateQueue=l.updateQueue,u.flags&=-2053,l.lanes&=~h}function Qu(l){if(La){for(l=l.memoizedState;l!==null;){var u=l.queue;u!==null&&(u.pending=null),l=l.next}La=!1}Mi=0,Le=oe=Xt=null,ze=!1,He=Hr=0,bu=null}function nn(){var l={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Le===null?Xt.memoizedState=Le=l:Le=Le.next=l,Le}function Ce(){if(oe===null){var l=Xt.alternate;l=l!==null?l.memoizedState:null}else l=oe.next;var u=Le===null?Xt.memoizedState:Le.next;if(u!==null)Le=u,oe=l;else{if(l===null)throw Xt.alternate===null?Error(o(467)):Error(o(310));oe=l,l={memoizedState:oe.memoizedState,baseState:oe.baseState,baseQueue:oe.baseQueue,queue:oe.queue,next:null},Le===null?Xt.memoizedState=Le=l:Le=Le.next=l}return Le}function Gi(l){var u=He;return He+=1,bu===null&&(bu=[]),l=Vu(bu,l,u),u=Xt,(Le===null?u.memoizedState:Le.next)===null&&(u=u.alternate,Nt.H=u===null||u.memoizedState===null?Ie:zn),l}function ji(l){if(l!==null&&typeof l=="object"){if(typeof l.then=="function")return Gi(l);if(l.$$typeof===xi)return pn(l)}throw Error(o(438,String(l)))}function Pe(l){var u=null,h=Xt.updateQueue;if(h!==null&&(u=h.memoCache),u==null){var y=Xt.alternate;y!==null&&(y=y.updateQueue,y!==null&&(y=y.memoCache,y!=null&&(u={data:y.data.map(function(_){return _.slice()}),index:0})))}if(u==null&&(u={data:[],index:0}),h===null&&(h=nc(),Xt.updateQueue=h),h.memoCache=u,h=u.data[u.index],h===void 0)for(h=u.data[u.index]=Array(l),y=0;y<l;y++)h[y]=Od;return u.index++,h}function fi(l,u){return typeof u=="function"?u(l):u}function Zu(l){var u=Ce();return qi(u,oe,l)}function qi(l,u,h){var y=l.queue;if(y===null)throw Error(o(311));y.lastRenderedReducer=h;var _=l.baseQueue,T=y.pending;if(T!==null){if(_!==null){var N=_.next;_.next=T.next,T.next=N}u.baseQueue=_=T,y.pending=null}if(T=l.baseState,_===null)l.memoizedState=T;else{u=_.next;var q=N=null,P=null,ut=u,gt=!1;do{var St=ut.lane&-536870913;if(St!==ut.lane?(Qt&St)===St:(Mi&St)===St){var bt=ut.revertLane;if(bt===0)P!==null&&(P=P.next={lane:0,revertLane:0,action:ut.action,hasEagerState:ut.hasEagerState,eagerState:ut.eagerState,next:null}),St===$n&&(gt=!0);else if((Mi&bt)===bt){ut=ut.next,bt===$n&&(gt=!0);continue}else St={lane:0,revertLane:ut.revertLane,action:ut.action,hasEagerState:ut.hasEagerState,eagerState:ut.eagerState,next:null},P===null?(q=P=St,N=T):P=P.next=St,Xt.lanes|=bt,Ca|=bt;St=ut.action,el&&h(T,St),T=ut.hasEagerState?ut.eagerState:h(T,St)}else bt={lane:St,revertLane:ut.revertLane,action:ut.action,hasEagerState:ut.hasEagerState,eagerState:ut.eagerState,next:null},P===null?(q=P=bt,N=T):P=P.next=bt,Xt.lanes|=St,Ca|=St;ut=ut.next}while(ut!==null&&ut!==u);if(P===null?N=T:P.next=q,!ga(T,l.memoizedState)&&(Xe=!0,gt&&(h=Vl,h!==null)))throw h;l.memoizedState=T,l.baseState=N,l.baseQueue=P,y.lastRenderedState=T}return _===null&&(y.lanes=0),[l.memoizedState,y.dispatch]}function yl(l){var u=Ce(),h=u.queue;if(h===null)throw Error(o(311));h.lastRenderedReducer=l;var y=h.dispatch,_=h.pending,T=u.memoizedState;if(_!==null){h.pending=null;var N=_=_.next;do T=l(T,N.action),N=N.next;while(N!==_);ga(T,u.memoizedState)||(Xe=!0),u.memoizedState=T,u.baseQueue===null&&(u.baseState=T),h.lastRenderedState=T}return[T,y]}function ed(l,u,h){var y=Xt,_=Ce(),T=ae;if(T){if(h===void 0)throw Error(o(407));h=h()}else h=u();var N=!ga((oe||_).memoizedState,h);if(N&&(_.memoizedState=h,Xe=!0),_=_.queue,Pu(nd.bind(null,y,_,l),[l]),_.getSnapshot!==u||N||Le!==null&&Le.memoizedState.tag&1){if(y.flags|=2048,is(9,jc.bind(null,y,_,h,u),{destroy:void 0},null),Kt===null)throw Error(o(349));T||(Mi&60)!==0||Gc(y,u,h)}return h}function Gc(l,u,h){l.flags|=16384,l={getSnapshot:u,value:h},u=Xt.updateQueue,u===null?(u=nc(),Xt.updateQueue=u,u.stores=[l]):(h=u.stores,h===null?u.stores=[l]:h.push(l))}function jc(l,u,h,y){u.value=h,u.getSnapshot=y,Ku(u)&&ku(l)}function nd(l,u,h){return h(function(){Ku(u)&&ku(l)})}function Ku(l){var u=l.getSnapshot;l=l.value;try{var h=u();return!ga(l,h)}catch{return!0}}function ku(l){var u=Za(l,2);u!==null&&Cn(u,l,2)}function ka(l){var u=nn();if(typeof l=="function"){var h=l;if(l=h(),el){H(!0);try{h()}finally{H(!1)}}}return u.memoizedState=u.baseState=l,u.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:fi,lastRenderedState:l},u}function oa(l,u,h,y){return l.baseState=h,qi(l,oe,typeof y=="function"?y:fi)}function ad(l,u,h,y,_){if(rs(l))throw Error(o(485));if(l=u.action,l!==null){var T={payload:_,action:l,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(N){T.listeners.push(N)}};Nt.T!==null?h(!0):T.isTransition=!1,y(T),h=u.pending,h===null?(T.next=u.pending=T,id(u,T)):(T.next=h.next,u.pending=h.next=T)}}function id(l,u){var h=u.action,y=u.payload,_=l.state;if(u.isTransition){var T=Nt.T,N={};Nt.T=N;try{var q=h(_,y),P=Nt.S;P!==null&&P(N,q),lo(l,u,q)}catch(ut){ks(l,u,ut)}finally{Nt.T=T}}else try{T=h(_,y),lo(l,u,T)}catch(ut){ks(l,u,ut)}}function lo(l,u,h){h!==null&&typeof h=="object"&&typeof h.then=="function"?h.then(function(y){qc(l,u,y)},function(y){return ks(l,u,y)}):qc(l,u,h)}function qc(l,u,h){u.status="fulfilled",u.value=h,ld(u),l.state=h,u=l.pending,u!==null&&(h=u.next,h===u?l.pending=null:(h=h.next,u.next=h,id(l,h)))}function ks(l,u,h){var y=l.pending;if(l.pending=null,y!==null){y=y.next;do u.status="rejected",u.reason=h,ld(u),u=u.next;while(u!==y)}l.action=null}function ld(l){l=l.listeners;for(var u=0;u<l.length;u++)(0,l[u])()}function ca(l,u){return u}function so(l,u){if(ae){var h=Kt.formState;if(h!==null){t:{var y=Xt;if(ae){if(_n){var _=jd(_n,ja);if(_){_n=Yf(_),y=qd(_);break t}}re(y)}y=!1}y&&(u=h[0])}}h=nn(),h.memoizedState=h.baseState=u,y={pending:null,lanes:0,dispatch:null,lastRenderedReducer:ca,lastRenderedState:u},h.queue=y,h=ho.bind(null,Xt,y),y.dispatch=h,y=ka(!1);var T=mo.bind(null,Xt,!1,y.queue);return y=nn(),_={state:u,dispatch:null,action:l,pending:null},y.queue=_,h=ad.bind(null,Xt,_,T,h),_.dispatch=h,y.memoizedState=l,[u,h,!1]}function Yc(l){var u=Ce();return uo(u,oe,l)}function uo(l,u,h){u=qi(l,u,ca)[0],l=Zu(fi)[0],u=typeof u=="object"&&u!==null&&typeof u.then=="function"?Gi(u):u;var y=Ce(),_=y.queue,T=_.dispatch;return h!==y.memoizedState&&(Xt.flags|=2048,is(9,Js.bind(null,_,h),{destroy:void 0},null)),[u,T,l]}function Js(l,u){l.action=u}function Lc(l){var u=Ce(),h=oe;if(h!==null)return uo(u,h,l);Ce(),u=u.memoizedState,h=Ce();var y=h.queue.dispatch;return h.memoizedState=l,[u,y,!1]}function is(l,u,h,y){return l={tag:l,create:u,inst:h,deps:y,next:null},u=Xt.updateQueue,u===null&&(u=nc(),Xt.updateQueue=u),h=u.lastEffect,h===null?u.lastEffect=l.next=l:(y=h.next,h.next=l,l.next=y,u.lastEffect=l),l}function ls(){return Ce().memoizedState}function ro(l,u,h,y){var _=nn();Xt.flags|=l,_.memoizedState=is(1|u,h,{destroy:void 0},y===void 0?null:y)}function Ju(l,u,h,y){var _=Ce();y=y===void 0?null:y;var T=_.memoizedState.inst;oe!==null&&y!==null&&bn(y,oe.memoizedState.deps)?_.memoizedState=is(u,h,T,y):(Xt.flags|=l,_.memoizedState=is(1|u,h,T,y))}function Xc(l,u){ro(8390656,8,l,u)}function Pu(l,u){Ju(2048,8,l,u)}function sd(l,u){return Ju(4,2,l,u)}function ud(l,u){return Ju(4,4,l,u)}function Wu(l,u){if(typeof u=="function"){l=l();var h=u(l);return function(){typeof h=="function"?h():u(null)}}if(u!=null)return l=l(),u.current=l,function(){u.current=null}}function hi(l,u,h){h=h!=null?h.concat([l]):null,Ju(4,4,Wu.bind(null,u,l),h)}function Fu(){}function oo(l,u){var h=Ce();u=u===void 0?null:u;var y=h.memoizedState;return u!==null&&bn(u,y[1])?y[0]:(h.memoizedState=[l,u],l)}function ss(l,u){var h=Ce();u=u===void 0?null:u;var y=h.memoizedState;if(u!==null&&bn(u,y[1]))return y[0];if(y=l(),el){H(!0);try{l()}finally{H(!1)}}return h.memoizedState=[y,u],y}function gl(l,u,h){return h===void 0||(Mi&1073741824)!==0?l.memoizedState=u:(l.memoizedState=h,l=pi(),Xt.lanes|=l,Ca|=l,h)}function Vc(l,u,h,y){return ga(h,u)?h:Ai.current!==null?(l=gl(l,h,y),ga(l,u)||(Xe=!0),l):(Mi&42)===0?(Xe=!0,l.memoizedState=h):(l=pi(),Xt.lanes|=l,Ca|=l,u)}function co(l,u,h,y,_){var T=an();Mn(T!==0&&8>T?T:8);var N=Nt.T,q={};Nt.T=q,mo(l,!1,u,h);try{var P=_(),ut=Nt.S;if(ut!==null&&ut(q,P),P!==null&&typeof P=="object"&&typeof P.then=="function"){var gt=Fh(P,y);xl(l,u,gt,Gn(l))}else xl(l,u,y,Gn(l))}catch(St){xl(l,u,{then:function(){},status:"rejected",reason:St},Gn())}finally{Mn(T),Nt.T=N}}function Qc(l){var u=l.memoizedState;if(u!==null)return u;u={memoizedState:Wn,baseState:Wn,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:fi,lastRenderedState:Wn},next:null};var h={};return u.next={memoizedState:h,baseState:h,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:fi,lastRenderedState:h},next:null},l.memoizedState=u,l=l.alternate,l!==null&&(l.memoizedState=u),u}function us(){return pn(wt)}function di(){return Ce().memoizedState}function fo(){return Ce().memoizedState}function Iu(l){for(var u=l.return;u!==null;){switch(u.tag){case 24:case 3:var h=Gn();l=Ua(h);var y=Je(u,l,h);y!==null&&(Cn(y,u,h),Ba(y,u,h)),u={cache:xo()},l.payload=u;return}u=u.return}}function vl(l,u,h){var y=Gn();h={lane:y,revertLane:0,action:h,hasEagerState:!1,eagerState:null,next:null},rs(l)?$u(u,h):(h=ts(l,u,h,y),h!==null&&(Cn(h,l,y),Zc(h,u,y)))}function ho(l,u,h){var y=Gn();xl(l,u,h,y)}function xl(l,u,h,y){var _={lane:y,revertLane:0,action:h,hasEagerState:!1,eagerState:null,next:null};if(rs(l))$u(u,_);else{var T=l.alternate;if(l.lanes===0&&(T===null||T.lanes===0)&&(T=u.lastRenderedReducer,T!==null))try{var N=u.lastRenderedState,q=T(N,h);if(_.hasEagerState=!0,_.eagerState=q,ga(q,N))return Zn(l,u,_,0),Kt===null&&rn(),!1}catch{}finally{}if(h=ts(l,u,_,y),h!==null)return Cn(h,l,y),Zc(h,u,y),!0}return!1}function mo(l,u,h,y){if(y={lane:2,revertLane:Fr(),action:y,hasEagerState:!1,eagerState:null,next:null},rs(l)){if(u)throw Error(o(479))}else u=ts(l,h,y,2),u!==null&&Cn(u,l,2)}function rs(l){var u=l.alternate;return l===Xt||u!==null&&u===Xt}function $u(l,u){ze=La=!0;var h=l.pending;h===null?u.next=u:(u.next=h.next,h.next=u),l.pending=u}function Zc(l,u,h){if((h&4194176)!==0){var y=u.lanes;y&=l.pendingLanes,h|=y,u.lanes=h,xt(l,h)}}function Tn(l,u,h,y){u=l.memoizedState,h=h(y,u),h=h==null?u:vs({},u,h),l.memoizedState=h,l.lanes===0&&(l.updateQueue.baseState=h)}function _l(l,u,h,y,_,T,N){return l=l.stateNode,typeof l.shouldComponentUpdate=="function"?l.shouldComponentUpdate(y,T,N):u.prototype&&u.prototype.isPureReactComponent?!ns(h,y)||!ns(_,T):!0}function tr(l,u,h,y){l=u.state,typeof u.componentWillReceiveProps=="function"&&u.componentWillReceiveProps(h,y),typeof u.UNSAFE_componentWillReceiveProps=="function"&&u.UNSAFE_componentWillReceiveProps(h,y),u.state!==l&&ac.enqueueReplaceState(u,u.state,null)}function Ja(l,u){var h=u;if("ref"in u){h={};for(var y in u)y!=="ref"&&(h[y]=u[y])}if(l=l.defaultProps){h===u&&(h=vs({},h));for(var _ in l)h[_]===void 0&&(h[_]=l[_])}return h}function po(l,u){try{var h=l.onUncaughtError;h(u.value,{componentStack:u.stack})}catch(y){setTimeout(function(){throw y})}}function yo(l,u,h){try{var y=l.onCaughtError;y(h.value,{componentStack:h.stack,errorBoundary:u.tag===1?u.stateNode:null})}catch(_){setTimeout(function(){throw _})}}function er(l,u,h){return h=Ua(h),h.tag=3,h.payload={element:null},h.callback=function(){po(l,u)},h}function Ps(l){return l=Ua(l),l.tag=3,l}function nr(l,u,h,y){var _=h.type.getDerivedStateFromError;if(typeof _=="function"){var T=y.value;l.payload=function(){return _(T)},l.callback=function(){yo(u,h,y)}}var N=h.stateNode;N!==null&&typeof N.componentDidCatch=="function"&&(l.callback=function(){yo(u,h,y),typeof _!="function"&&(Ma===null?Ma=new Set([this]):Ma.add(this));var q=y.stack;this.componentDidCatch(y.value,{componentStack:q!==null?q:""})})}function rd(l,u,h,y,_){if(h.flags|=32768,y!==null&&typeof y=="object"&&typeof y.then=="function"){if(u=h.alternate,u!==null&&os(u,h,_,!0),h=Ta.current,h!==null){switch(h.tag){case 13:return Ya===null?Pn():h.alternate===null&&te===0&&(te=3),h.flags&=-257,h.flags|=65536,h.lanes=_,y===ec?h.flags|=16384:(u=h.updateQueue,u===null?h.updateQueue=new Set([y]):u.add(y),Uo(l,y,_)),!1;case 22:return h.flags|=65536,y===ec?h.flags|=16384:(u=h.updateQueue,u===null?(u={transitions:null,markerInstances:null,retryQueue:new Set([y])},h.updateQueue=u):(h=u.retryQueue,h===null?u.retryQueue=new Set([y]):h.add(y)),Uo(l,y,_)),!1}throw Error(o(435,h.tag))}return Uo(l,y,_),Pn(),!1}if(ae)return u=Ta.current,u!==null?((u.flags&65536)===0&&(u.flags|=256),u.flags|=65536,u.lanes=_,y!==Or&&(l=Error(o(422),{cause:y}),Qn(et(l,h)))):(y!==Or&&(u=Error(o(423),{cause:y}),Qn(et(u,h))),l=l.current.alternate,l.flags|=65536,_&=-_,l.lanes|=_,y=et(y,h),_=er(l.stateNode,y,_),Bn(l,_),te!==4&&(te=2)),!1;var T=Error(o(520),{cause:y});if(T=et(T,h),Eu===null?Eu=[T]:Eu.push(T),te!==4&&(te=2),u===null)return!0;y=et(y,h),h=u;do{switch(h.tag){case 3:return h.flags|=65536,l=_&-_,h.lanes|=l,l=er(h.stateNode,y,l),Bn(h,l),!1;case 1:if(u=h.type,T=h.stateNode,(h.flags&128)===0&&(typeof u.getDerivedStateFromError=="function"||T!==null&&typeof T.componentDidCatch=="function"&&(Ma===null||!Ma.has(T))))return h.flags|=65536,_&=-_,h.lanes|=_,_=Ps(_),nr(_,l,h,y),Bn(h,_),!1}h=h.return}while(h!==null);return!1}function mn(l,u,h,y){u.child=l===null?eh(u,null,h,y):Ql(u,l.child,h,y)}function od(l,u,h,y,_){h=h.render;var T=u.ref;if("ref"in y){var N={};for(var q in y)q!=="ref"&&(N[q]=y[q])}else N=y;return cs(u),y=pl(l,u,h,N,T,_),q=io(),l!==null&&!Xe?(as(l,u,_),Yi(l,u,_)):(ae&&q&&I(u),u.flags|=1,mn(l,u,y,_),u.child)}function cd(l,u,h,y,_){if(l===null){var T=h.type;return typeof T=="function"&&!Ki(T)&&T.defaultProps===void 0&&h.compare===null?(u.tag=15,u.type=T,go(l,u,T,y,_)):(l=wa(h.type,null,y,u,u.mode,_),l.ref=u.ref,l.return=u,u.child=l)}if(T=l.child,!Ic(l,_)){var N=T.memoizedProps;if(h=h.compare,h=h!==null?h:ns,h(N,y)&&l.ref===u.ref)return Yi(l,u,_)}return u.flags|=1,l=An(T,y),l.ref=u.ref,l.return=u,u.child=l}function go(l,u,h,y,_){if(l!==null){var T=l.memoizedProps;if(ns(T,y)&&l.ref===u.ref)if(Xe=!1,u.pendingProps=y=T,Ic(l,_))(l.flags&131072)!==0&&(Xe=!0);else return u.lanes=l.lanes,Yi(l,u,_)}return Kc(l,u,h,y,_)}function fd(l,u,h){var y=u.pendingProps,_=y.children,T=(u.stateNode._pendingVisibility&2)!==0,N=l!==null?l.memoizedState:null;if(ar(l,u),y.mode==="hidden"||T){if((u.flags&128)!==0){if(y=N!==null?N.baseLanes|h:h,l!==null){for(_=u.child=l.child,T=0;_!==null;)T=T|_.lanes|_.childLanes,_=_.sibling;u.childLanes=T&~y}else u.childLanes=0,u.child=null;return hd(l,u,y,h)}if((h&536870912)!==0)u.memoizedState={baseLanes:0,cachePool:null},l!==null&&_o(u,N!==null?N.cachePool:null),N!==null?Hc(u,N):to(),no(u);else return u.lanes=u.childLanes=536870912,hd(l,u,N!==null?N.baseLanes|h:h,h)}else N!==null?(_o(u,N.cachePool),Hc(u,N),Hi(),u.memoizedState=null):(l!==null&&_o(u,null),to(),Hi());return mn(l,u,_,h),u.child}function hd(l,u,h,y){var _=Tl();return _=_===null?null:{parent:Si?fe._currentValue:fe._currentValue2,pool:_},u.memoizedState={baseLanes:h,cachePool:_},l!==null&&_o(u,null),to(),no(u),l!==null&&os(l,u,y,!0),null}function ar(l,u){var h=u.ref;if(h===null)l!==null&&l.ref!==null&&(u.flags|=2097664);else{if(typeof h!="function"&&typeof h!="object")throw Error(o(284));(l===null||l.ref!==h)&&(u.flags|=2097664)}}function Kc(l,u,h,y,_){return cs(u),h=pl(l,u,h,y,void 0,_),y=io(),l!==null&&!Xe?(as(l,u,_),Yi(l,u,_)):(ae&&y&&I(u),u.flags|=1,mn(l,u,h,_),u.child)}function dd(l,u,h,y,_,T){return cs(u),u.updateQueue=null,h=td(u,y,h,_),ao(l),y=io(),l!==null&&!Xe?(as(l,u,T),Yi(l,u,T)):(ae&&y&&I(u),u.flags|=1,mn(l,u,h,T),u.child)}function kc(l,u,h,y,_){if(cs(u),u.stateNode===null){var T=Ts,N=h.contextType;typeof N=="object"&&N!==null&&(T=pn(N)),T=new h(y,T),u.memoizedState=T.state!==null&&T.state!==void 0?T.state:null,T.updater=ac,u.stateNode=T,T._reactInternals=u,T=u.stateNode,T.props=y,T.state=u.memoizedState,T.refs={},Bc(u),N=h.contextType,T.context=typeof N=="object"&&N!==null?pn(N):Ts,T.state=u.memoizedState,N=h.getDerivedStateFromProps,typeof N=="function"&&(Tn(u,h,N,y),T.state=u.memoizedState),typeof h.getDerivedStateFromProps=="function"||typeof T.getSnapshotBeforeUpdate=="function"||typeof T.UNSAFE_componentWillMount!="function"&&typeof T.componentWillMount!="function"||(N=T.state,typeof T.componentWillMount=="function"&&T.componentWillMount(),typeof T.UNSAFE_componentWillMount=="function"&&T.UNSAFE_componentWillMount(),N!==T.state&&ac.enqueueReplaceState(T,T.state,null),Yu(u,y,T,_),qu(),T.state=u.memoizedState),typeof T.componentDidMount=="function"&&(u.flags|=4194308),y=!0}else if(l===null){T=u.stateNode;var q=u.memoizedProps,P=Ja(h,q);T.props=P;var ut=T.context,gt=h.contextType;N=Ts,typeof gt=="object"&&gt!==null&&(N=pn(gt));var St=h.getDerivedStateFromProps;gt=typeof St=="function"||typeof T.getSnapshotBeforeUpdate=="function",q=u.pendingProps!==q,gt||typeof T.UNSAFE_componentWillReceiveProps!="function"&&typeof T.componentWillReceiveProps!="function"||(q||ut!==N)&&tr(u,T,y,N),tl=!1;var bt=u.memoizedState;T.state=bt,Yu(u,y,T,_),qu(),ut=u.memoizedState,q||bt!==ut||tl?(typeof St=="function"&&(Tn(u,h,St,y),ut=u.memoizedState),(P=tl||_l(u,h,P,y,bt,ut,N))?(gt||typeof T.UNSAFE_componentWillMount!="function"&&typeof T.componentWillMount!="function"||(typeof T.componentWillMount=="function"&&T.componentWillMount(),typeof T.UNSAFE_componentWillMount=="function"&&T.UNSAFE_componentWillMount()),typeof T.componentDidMount=="function"&&(u.flags|=4194308)):(typeof T.componentDidMount=="function"&&(u.flags|=4194308),u.memoizedProps=y,u.memoizedState=ut),T.props=y,T.state=ut,T.context=N,y=P):(typeof T.componentDidMount=="function"&&(u.flags|=4194308),y=!1)}else{T=u.stateNode,wc(l,u),N=u.memoizedProps,gt=Ja(h,N),T.props=gt,St=u.pendingProps,bt=T.context,ut=h.contextType,P=Ts,typeof ut=="object"&&ut!==null&&(P=pn(ut)),q=h.getDerivedStateFromProps,(ut=typeof q=="function"||typeof T.getSnapshotBeforeUpdate=="function")||typeof T.UNSAFE_componentWillReceiveProps!="function"&&typeof T.componentWillReceiveProps!="function"||(N!==St||bt!==P)&&tr(u,T,y,P),tl=!1,bt=u.memoizedState,T.state=bt,Yu(u,y,T,_),qu();var Gt=u.memoizedState;N!==St||bt!==Gt||tl||l!==null&&l.dependencies!==null&&bl(l.dependencies)?(typeof q=="function"&&(Tn(u,h,q,y),Gt=u.memoizedState),(gt=tl||_l(u,h,gt,y,bt,Gt,P)||l!==null&&l.dependencies!==null&&bl(l.dependencies))?(ut||typeof T.UNSAFE_componentWillUpdate!="function"&&typeof T.componentWillUpdate!="function"||(typeof T.componentWillUpdate=="function"&&T.componentWillUpdate(y,Gt,P),typeof T.UNSAFE_componentWillUpdate=="function"&&T.UNSAFE_componentWillUpdate(y,Gt,P)),typeof T.componentDidUpdate=="function"&&(u.flags|=4),typeof T.getSnapshotBeforeUpdate=="function"&&(u.flags|=1024)):(typeof T.componentDidUpdate!="function"||N===l.memoizedProps&&bt===l.memoizedState||(u.flags|=4),typeof T.getSnapshotBeforeUpdate!="function"||N===l.memoizedProps&&bt===l.memoizedState||(u.flags|=1024),u.memoizedProps=y,u.memoizedState=Gt),T.props=y,T.state=Gt,T.context=P,y=gt):(typeof T.componentDidUpdate!="function"||N===l.memoizedProps&&bt===l.memoizedState||(u.flags|=4),typeof T.getSnapshotBeforeUpdate!="function"||N===l.memoizedProps&&bt===l.memoizedState||(u.flags|=1024),y=!1)}return T=y,ar(l,u),y=(u.flags&128)!==0,T||y?(T=u.stateNode,h=y&&typeof h.getDerivedStateFromError!="function"?null:T.render(),u.flags|=1,l!==null&&y?(u.child=Ql(u,l.child,null,_),u.child=Ql(u,null,h,_)):mn(l,u,h,_),u.memoizedState=T.state,l=u.child):l=Yi(l,u,_),l}function md(l,u,h,y){return Un(),u.flags|=256,mn(l,u,h,y),u.child}function Jc(l){return{baseLanes:l,cachePool:xd()}}function Pc(l,u,h){return l=l!==null?l.childLanes&~h:0,u&&(l|=na),l}function pd(l,u,h){var y=u.pendingProps,_=!1,T=(u.flags&128)!==0,N;if((N=T)||(N=l!==null&&l.memoizedState===null?!1:(Fe.current&2)!==0),N&&(_=!0,u.flags&=-129),N=(u.flags&32)!==0,u.flags&=-33,l===null){if(ae){if(_?oi(u):Hi(),ae){var q=_n,P;(P=q)&&(q=Qd(q,ja),q!==null?(u.memoizedState={dehydrated:q,treeContext:$a!==null?{id:Ei,overflow:Ga}:null,retryLane:536870912},P=n(18,null,null,0),P.stateNode=q,P.return=u,u.child=P,Rn=u,_n=null,P=!0):P=!1),P||re(u)}if(q=u.memoizedState,q!==null&&(q=q.dehydrated,q!==null))return Tr(q)?u.lanes=16:u.lanes=536870912,null;ci(u)}return q=y.children,y=y.fallback,_?(Hi(),_=u.mode,q=Wc({mode:"hidden",children:q},_),y=Ji(y,_,h,null),q.return=u,y.return=u,q.sibling=y,u.child=q,_=u.child,_.memoizedState=Jc(h),_.childLanes=Pc(l,N,h),u.memoizedState=Dn,y):(oi(u),ir(u,q))}if(P=l.memoizedState,P!==null&&(q=P.dehydrated,q!==null)){if(T)u.flags&256?(oi(u),u.flags&=-257,u=Fc(l,u,h)):u.memoizedState!==null?(Hi(),u.child=l.child,u.flags|=128,u=null):(Hi(),_=y.fallback,q=u.mode,y=Wc({mode:"visible",children:y.children},q),_=Ji(_,q,h,null),_.flags|=2,y.return=u,_.return=u,y.sibling=_,u.child=y,Ql(u,l.child,null,h),y=u.child,y.memoizedState=Jc(h),y.childLanes=Pc(l,N,h),u.memoizedState=Dn,u=_);else if(oi(u),Tr(q))N=Gd(q).digest,y=Error(o(419)),y.stack="",y.digest=N,Qn({value:y,source:null,stack:null}),u=Fc(l,u,h);else if(Xe||os(l,u,h,!1),N=(h&l.childLanes)!==0,Xe||N){if(N=Kt,N!==null){if(y=h&-h,(y&42)!==0)y=1;else switch(y){case 2:y=1;break;case 8:y=4;break;case 32:y=16;break;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:y=64;break;case 268435456:y=134217728;break;default:y=0}if(y=(y&(N.suspendedLanes|h))!==0?0:y,y!==0&&y!==P.retryLane)throw P.retryLane=y,Za(l,y),Cn(N,l,y),lm}Zo(q)||Pn(),u=Fc(l,u,h)}else Zo(q)?(u.flags|=128,u.child=l.child,u=ys.bind(null,l),Sp(q,u),u=null):(l=P.treeContext,jn&&(_n=Ld(q),Rn=u,ae=!0,_a=null,ja=!1,l!==null&&(va[xa++]=Ei,va[xa++]=Ga,va[xa++]=$a,Ei=l.id,Ga=l.overflow,$a=u)),u=ir(u,y.children),u.flags|=4096);return u}return _?(Hi(),_=y.fallback,q=u.mode,P=l.child,T=P.sibling,y=An(P,{mode:"hidden",children:y.children}),y.subtreeFlags=P.subtreeFlags&31457280,T!==null?_=An(T,_):(_=Ji(_,q,h,null),_.flags|=2),_.return=u,y.return=u,y.sibling=_,u.child=y,y=_,_=u.child,q=l.child.memoizedState,q===null?q=Jc(h):(P=q.cachePool,P!==null?(T=Si?fe._currentValue:fe._currentValue2,P=P.parent!==T?{parent:T,pool:T}:P):P=xd(),q={baseLanes:q.baseLanes|h,cachePool:P}),_.memoizedState=q,_.childLanes=Pc(l,N,h),u.memoizedState=Dn,y):(oi(u),h=l.child,l=h.sibling,h=An(h,{mode:"visible",children:y.children}),h.return=u,h.sibling=null,l!==null&&(N=u.deletions,N===null?(u.deletions=[l],u.flags|=16):N.push(l)),u.child=h,u.memoizedState=null,h)}function ir(l,u){return u=Wc({mode:"visible",children:u},l.mode),u.return=l,l.child=u}function Wc(l,u){return Bo(l,u,0,null)}function Fc(l,u,h){return Ql(u,l.child,null,h),l=ir(u,u.pendingProps.children),l.flags|=2,u.memoizedState=null,l}function yd(l,u,h){l.lanes|=u;var y=l.alternate;y!==null&&(y.lanes|=u),$c(l.return,u,h)}function vo(l,u,h,y,_){var T=l.memoizedState;T===null?l.memoizedState={isBackwards:u,rendering:null,renderingStartTime:0,last:y,tail:h,tailMode:_}:(T.isBackwards=u,T.rendering=null,T.renderingStartTime=0,T.last=y,T.tail=h,T.tailMode=_)}function gd(l,u,h){var y=u.pendingProps,_=y.revealOrder,T=y.tail;if(mn(l,u,y.children,h),y=Fe.current,(y&2)!==0)y=y&1|2,u.flags|=128;else{if(l!==null&&(l.flags&128)!==0)t:for(l=u.child;l!==null;){if(l.tag===13)l.memoizedState!==null&&yd(l,h,u);else if(l.tag===19)yd(l,h,u);else if(l.child!==null){l.child.return=l,l=l.child;continue}if(l===u)break t;for(;l.sibling===null;){if(l.return===null||l.return===u)break t;l=l.return}l.sibling.return=l.return,l=l.sibling}y&=1}switch(U(Fe,y),_){case"forwards":for(h=u.child,_=null;h!==null;)l=h.alternate,l!==null&&Ka(l)===null&&(_=h),h=h.sibling;h=_,h===null?(_=u.child,u.child=null):(_=h.sibling,h.sibling=null),vo(u,!1,_,h,T);break;case"backwards":for(h=null,_=u.child,u.child=null;_!==null;){if(l=_.alternate,l!==null&&Ka(l)===null){u.child=_;break}l=_.sibling,_.sibling=h,h=_,_=l}vo(u,!0,h,null,T);break;case"together":vo(u,!1,null,null,void 0);break;default:u.memoizedState=null}return u.child}function Yi(l,u,h){if(l!==null&&(u.dependencies=l.dependencies),Ca|=u.lanes,(h&u.childLanes)===0)if(l!==null){if(os(l,u,h,!1),(h&u.childLanes)===0)return null}else return null;if(l!==null&&u.child!==l.child)throw Error(o(153));if(u.child!==null){for(l=u.child,h=An(l,l.pendingProps),u.child=h,h.return=u;l.sibling!==null;)l=l.sibling,h=h.sibling=An(l,l.pendingProps),h.return=u;h.sibling=null}return u.child}function Ic(l,u){return(l.lanes&u)!==0?!0:(l=l.dependencies,!!(l!==null&&bl(l)))}function vp(l,u,h){switch(u.tag){case 3:yt(u,u.stateNode.containerInfo),Sl(u,fe,l.memoizedState.cache),Un();break;case 27:case 5:Ot(u);break;case 4:yt(u,u.stateNode.containerInfo);break;case 10:Sl(u,u.type,u.memoizedProps.value);break;case 13:var y=u.memoizedState;if(y!==null)return y.dehydrated!==null?(oi(u),u.flags|=128,null):(h&u.child.childLanes)!==0?pd(l,u,h):(oi(u),l=Yi(l,u,h),l!==null?l.sibling:null);oi(u);break;case 19:var _=(l.flags&128)!==0;if(y=(h&u.childLanes)!==0,y||(os(l,u,h,!1),y=(h&u.childLanes)!==0),_){if(y)return gd(l,u,h);u.flags|=128}if(_=u.memoizedState,_!==null&&(_.rendering=null,_.tail=null,_.lastEffect=null),U(Fe,Fe.current),y)break;return null;case 22:case 23:return u.lanes=0,fd(l,u,h);case 24:Sl(u,fe,l.memoizedState.cache)}return Yi(l,u,h)}function vd(l,u,h){if(l!==null)if(l.memoizedProps!==u.pendingProps)Xe=!0;else{if(!Ic(l,h)&&(u.flags&128)===0)return Xe=!1,vp(l,u,h);Xe=(l.flags&131072)!==0}else Xe=!1,ae&&(u.flags&1048576)!==0&&j(u,zr,u.index);switch(u.lanes=0,u.tag){case 16:t:{l=u.pendingProps;var y=u.elementType,_=y._init;if(y=_(y._payload),u.type=y,typeof y=="function")Ki(y)?(l=Ja(y,l),u.tag=1,u=kc(null,u,y,l,h)):(u.tag=0,u=Kc(null,u,y,l,h));else{if(y!=null){if(_=y.$$typeof,_===fu){u.tag=11,u=od(null,u,y,l,h);break t}else if(_===pr){u.tag=14,u=cd(null,u,y,l,h);break t}}throw u=d(y)||y,Error(o(306,u,""))}}return u;case 0:return Kc(l,u,u.type,u.pendingProps,h);case 1:return y=u.type,_=Ja(y,u.pendingProps),kc(l,u,y,_,h);case 3:t:{if(yt(u,u.stateNode.containerInfo),l===null)throw Error(o(387));var T=u.pendingProps;_=u.memoizedState,y=_.element,wc(l,u),Yu(u,T,null,h);var N=u.memoizedState;if(T=N.cache,Sl(u,fe,T),T!==_.cache&&tf(u,[fe],h,!0),qu(),T=N.element,jn&&_.isDehydrated)if(_={element:T,isDehydrated:!1,cache:N.cache},u.updateQueue.baseState=_,u.memoizedState=_,u.flags&256){u=md(l,u,T,h);break t}else if(T!==y){y=et(Error(o(424)),u),Qn(y),u=md(l,u,T,h);break t}else for(jn&&(_n=Yd(u.stateNode.containerInfo),Rn=u,ae=!0,_a=null,ja=!0),h=eh(u,null,T,h),u.child=h;h;)h.flags=h.flags&-3|4096,h=h.sibling;else{if(Un(),T===y){u=Yi(l,u,h);break t}mn(l,u,T,h)}u=u.child}return u;case 26:if(ya)return ar(l,u),l===null?(h=Wo(u.type,null,u.pendingProps,null))?u.memoizedState=h:ae||(u.stateNode=Tp(u.type,u.pendingProps,ti.current,u)):u.memoizedState=Wo(u.type,l.memoizedProps,u.pendingProps,l.memoizedState),null;case 27:if(vn)return Ot(u),l===null&&vn&&ae&&(y=u.stateNode=Ff(u.type,u.pendingProps,ti.current,dn.current,!1),Rn=u,ja=!0,_n=Ko(y)),y=u.pendingProps.children,l!==null||ae?mn(l,u,y,h):u.child=Ql(u,null,y,h),ar(l,u),u.child;case 5:return l===null&&ae&&(Pd(u.type,u.pendingProps,dn.current),(_=y=_n)&&(y=Xd(y,u.type,u.pendingProps,ja),y!==null?(u.stateNode=y,Rn=u,_n=Ko(y),ja=!1,_=!0):_=!1),_||re(u)),Ot(u),_=u.type,T=u.pendingProps,N=l!==null?l.memoizedProps:null,y=T.children,ql(_,T)?y=null:N!==null&&ql(_,N)&&(u.flags|=32),u.memoizedState!==null&&(_=pl(l,u,gp,null,null,h),Si?wt._currentValue=_:wt._currentValue2=_),ar(l,u),mn(l,u,y,h),u.child;case 6:return l===null&&ae&&(Wd(u.pendingProps,dn.current),(l=h=_n)&&(h=Vd(h,u.pendingProps,ja),h!==null?(u.stateNode=h,Rn=u,_n=null,l=!0):l=!1),l||re(u)),null;case 13:return pd(l,u,h);case 4:return yt(u,u.stateNode.containerInfo),y=u.pendingProps,l===null?u.child=Ql(u,null,y,h):mn(l,u,y,h),u.child;case 11:return od(l,u,u.type,u.pendingProps,h);case 7:return mn(l,u,u.pendingProps,h),u.child;case 8:return mn(l,u,u.pendingProps.children,h),u.child;case 12:return mn(l,u,u.pendingProps.children,h),u.child;case 10:return y=u.pendingProps,Sl(u,u.type,y.value),mn(l,u,y.children,h),u.child;case 9:return _=u.type._context,y=u.pendingProps.children,cs(u),_=pn(_),y=y(_),u.flags|=1,mn(l,u,y,h),u.child;case 14:return cd(l,u,u.type,u.pendingProps,h);case 15:return go(l,u,u.type,u.pendingProps,h);case 19:return gd(l,u,h);case 22:return fd(l,u,h);case 24:return cs(u),y=pn(fe),l===null?(_=Tl(),_===null&&(_=Kt,T=xo(),_.pooledCache=T,T.refCount++,T!==null&&(_.pooledCacheLanes|=h),_=T),u.memoizedState={parent:y,cache:_},Bc(u),Sl(u,fe,_)):((l.lanes&h)!==0&&(wc(l,u),Yu(u,null,null,h),qu()),_=l.memoizedState,T=u.memoizedState,_.parent!==y?(_={parent:y,cache:y},u.memoizedState=_,u.lanes===0&&(u.memoizedState=u.updateQueue.baseState=_),Sl(u,fe,y)):(y=T.cache,Sl(u,fe,y),y!==_.cache&&tf(u,[fe],h,!0))),mn(l,u,u.pendingProps.children,h),u.child;case 29:throw u.pendingProps}throw Error(o(156,u.tag))}function Sl(l,u,h){Si?(U(ta,u._currentValue),u._currentValue=h):(U(ta,u._currentValue2),u._currentValue2=h)}function Li(l){var u=ta.current;Si?l._currentValue=u:l._currentValue2=u,O(ta)}function $c(l,u,h){for(;l!==null;){var y=l.alternate;if((l.childLanes&u)!==u?(l.childLanes|=u,y!==null&&(y.childLanes|=u)):y!==null&&(y.childLanes&u)!==u&&(y.childLanes|=u),l===h)break;l=l.return}}function tf(l,u,h,y){var _=l.child;for(_!==null&&(_.return=l);_!==null;){var T=_.dependencies;if(T!==null){var N=_.child;T=T.firstContext;t:for(;T!==null;){var q=T;T=_;for(var P=0;P<u.length;P++)if(q.context===u[P]){T.lanes|=h,q=T.alternate,q!==null&&(q.lanes|=h),$c(T.return,h,l),y||(N=null);break t}T=q.next}}else if(_.tag===18){if(N=_.return,N===null)throw Error(o(341));N.lanes|=h,T=N.alternate,T!==null&&(T.lanes|=h),$c(N,h,l),N=null}else N=_.child;if(N!==null)N.return=_;else for(N=_;N!==null;){if(N===l){N=null;break}if(_=N.sibling,_!==null){_.return=N.return,N=_;break}N=N.return}_=N}}function os(l,u,h,y){l=null;for(var _=u,T=!1;_!==null;){if(!T){if((_.flags&524288)!==0)T=!0;else if((_.flags&262144)!==0)break}if(_.tag===10){var N=_.alternate;if(N===null)throw Error(o(387));if(N=N.memoizedProps,N!==null){var q=_.type;ga(_.pendingProps.value,N.value)||(l!==null?l.push(q):l=[q])}}else if(_===vu.current){if(N=_.alternate,N===null)throw Error(o(387));N.memoizedState.memoizedState!==_.memoizedState.memoizedState&&(l!==null?l.push(wt):l=[wt])}_=_.return}l!==null&&tf(u,l,h,y),u.flags|=262144}function bl(l){for(l=l.firstContext;l!==null;){var u=l.context;if(!ga(Si?u._currentValue:u._currentValue2,l.memoizedValue))return!0;l=l.next}return!1}function cs(l){Kl=l,Ge=null,l=l.dependencies,l!==null&&(l.firstContext=null)}function pn(l){return ef(Kl,l)}function lr(l,u){return Kl===null&&cs(l),ef(l,u)}function ef(l,u){var h=Si?u._currentValue:u._currentValue2;if(u={context:u,memoizedValue:h,next:null},Ge===null){if(l===null)throw Error(o(308));Ge=u,l.dependencies={lanes:0,firstContext:u},l.flags|=524288}else Ge=Ge.next=u;return h}function xo(){return{controller:new sm,data:new Map,refCount:0}}function Ws(l){l.refCount--,l.refCount===0&&nl(As,function(){l.controller.abort()})}function Tl(){var l=al.current;return l!==null?l:Kt.pooledCache}function _o(l,u){u===null?U(al,al.current):U(al,u.pool)}function xd(){var l=Tl();return l===null?null:{parent:Si?fe._currentValue:fe._currentValue2,pool:l}}function fa(l){l.flags|=4}function nf(l,u){if(l!==null&&l.child===u.child)return!1;if((u.flags&16)!==0)return!0;for(l=u.child;l!==null;){if((l.flags&13878)!==0||(l.subtreeFlags&13878)!==0)return!0;l=l.sibling}return!1}function So(l,u,h,y){if(gn)for(h=u.child;h!==null;){if(h.tag===5||h.tag===6)_i(l,h.stateNode);else if(!(h.tag===4||vn&&h.tag===27)&&h.child!==null){h.child.return=h,h=h.child;continue}if(h===u)break;for(;h.sibling===null;){if(h.return===null||h.return===u)return;h=h.return}h.sibling.return=h.return,h=h.sibling}else if(ma)for(var _=u.child;_!==null;){if(_.tag===5){var T=_.stateNode;h&&y&&(T=jf(T,_.type,_.memoizedProps)),_i(l,T)}else if(_.tag===6)T=_.stateNode,h&&y&&(T=qf(T,_.memoizedProps)),_i(l,T);else if(_.tag!==4){if(_.tag===22&&_.memoizedState!==null)T=_.child,T!==null&&(T.return=_),So(l,_,!0,!0);else if(_.child!==null){_.child.return=_,_=_.child;continue}}if(_===u)break;for(;_.sibling===null;){if(_.return===null||_.return===u)return;_=_.return}_.sibling.return=_.return,_=_.sibling}}function Fs(l,u,h,y){if(ma)for(var _=u.child;_!==null;){if(_.tag===5){var T=_.stateNode;h&&y&&(T=jf(T,_.type,_.memoizedProps)),Hf(l,T)}else if(_.tag===6)T=_.stateNode,h&&y&&(T=qf(T,_.memoizedProps)),Hf(l,T);else if(_.tag!==4){if(_.tag===22&&_.memoizedState!==null)T=_.child,T!==null&&(T.return=_),Fs(l,_,!(_.memoizedProps!==null&&_.memoizedProps.mode==="manual"),!0);else if(_.child!==null){_.child.return=_,_=_.child;continue}}if(_===u)break;for(;_.sibling===null;){if(_.return===null||_.return===u)return;_=_.return}_.sibling.return=_.return,_=_.sibling}}function Is(l,u){if(ma&&nf(l,u)){l=u.stateNode;var h=l.containerInfo,y=Qo();Fs(y,u,!1,!1),l.pendingChildren=y,fa(u),Hd(h,y)}}function af(l,u,h,y){if(gn)l.memoizedProps!==y&&fa(u);else if(ma){var _=l.stateNode,T=l.memoizedProps;if((l=nf(l,u))||T!==y){var N=dn.current;T=wf(_,h,T,y,!l,null),T===_?u.stateNode=_:(Wi(T,h,y,N)&&fa(u),u.stateNode=T,l?So(T,u,!1,!1):fa(u))}else u.stateNode=_}}function $s(l,u,h){if(Ud(u,h)){if(l.flags|=16777216,!Fi(u,h))if(fr())l.flags|=8192;else throw Cs=ec,th}else l.flags&=-16777217}function lf(l,u){if(Fd(u)){if(l.flags|=16777216,!Pf(u))if(fr())l.flags|=8192;else throw Cs=ec,th}else l.flags&=-16777217}function sr(l,u){u!==null&&(l.flags|=4),l.flags&16384&&(u=l.tag!==22?ct():536870912,l.lanes|=u,ll|=u)}function fs(l,u){if(!ae)switch(l.tailMode){case"hidden":u=l.tail;for(var h=null;u!==null;)u.alternate!==null&&(h=u),u=u.sibling;h===null?l.tail=null:h.sibling=null;break;case"collapsed":h=l.tail;for(var y=null;h!==null;)h.alternate!==null&&(y=h),h=h.sibling;y===null?u||l.tail===null?l.tail=null:l.tail.sibling=null:y.sibling=null}}function Ae(l){var u=l.alternate!==null&&l.alternate.child===l.child,h=0,y=0;if(u)for(var _=l.child;_!==null;)h|=_.lanes|_.childLanes,y|=_.subtreeFlags&31457280,y|=_.flags&31457280,_.return=l,_=_.sibling;else for(_=l.child;_!==null;)h|=_.lanes|_.childLanes,y|=_.subtreeFlags,y|=_.flags,_.return=l,_=_.sibling;return l.subtreeFlags|=y,l.childLanes=h,u}function _d(l,u,h){var y=u.pendingProps;switch(st(u),u.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Ae(u),null;case 1:return Ae(u),null;case 3:return h=u.stateNode,y=null,l!==null&&(y=l.memoizedState.cache),u.memoizedState.cache!==y&&(u.flags|=2048),Li(fe),Tt(),h.pendingContext&&(h.context=h.pendingContext,h.pendingContext=null),(l===null||l.child===null)&&(Oa(u)?fa(u):l===null||l.memoizedState.isDehydrated&&(u.flags&256)===0||(u.flags|=1024,_a!==null&&(Vi(_a),_a=null))),Is(l,u),Ae(u),null;case 26:if(ya){h=u.type;var _=u.memoizedState;return l===null?(fa(u),_!==null?(Ae(u),lf(u,_)):(Ae(u),$s(u,h,y))):_?_!==l.memoizedState?(fa(u),Ae(u),lf(u,_)):(Ae(u),u.flags&=-16777217):(gn?l.memoizedProps!==y&&fa(u):af(l,u,h,y),Ae(u),$s(u,h,y)),null}case 27:if(vn){if(Ut(u),h=ti.current,_=u.type,l!==null&&u.stateNode!=null)gn?l.memoizedProps!==y&&fa(u):af(l,u,_,y);else{if(!y){if(u.stateNode===null)throw Error(o(166));return Ae(u),null}l=dn.current,Oa(u)?ue(u,l):(l=Ff(_,y,h,l,!0),u.stateNode=l,fa(u))}return Ae(u),null}case 5:if(Ut(u),h=u.type,l!==null&&u.stateNode!=null)af(l,u,h,y);else{if(!y){if(u.stateNode===null)throw Error(o(166));return Ae(u),null}l=dn.current,Oa(u)?ue(u,l):(_=Ef(h,y,ti.current,l,u),So(_,u,!1,!1),u.stateNode=_,Wi(_,h,y,l)&&fa(u))}return Ae(u),$s(u,u.type,u.pendingProps),null;case 6:if(l&&u.stateNode!=null)h=l.memoizedProps,gn?h!==y&&fa(u):ma&&(h!==y?(u.stateNode=jo(y,ti.current,dn.current,u),fa(u)):u.stateNode=l.stateNode);else{if(typeof y!="string"&&u.stateNode===null)throw Error(o(166));if(l=ti.current,h=dn.current,Oa(u)){if(!jn)throw Error(o(176));if(l=u.stateNode,h=u.memoizedProps,y=null,_=Rn,_!==null)switch(_.tag){case 27:case 5:y=_.memoizedProps}Zd(l,h,u,y)||re(u)}else u.stateNode=jo(y,l,h,u)}return Ae(u),null;case 13:if(y=u.memoizedState,l===null||l.memoizedState!==null&&l.memoizedState.dehydrated!==null){if(_=Oa(u),y!==null&&y.dehydrated!==null){if(l===null){if(!_)throw Error(o(318));if(!jn)throw Error(o(344));if(_=u.memoizedState,_=_!==null?_.dehydrated:null,!_)throw Error(o(317));du(_,u)}else Un(),(u.flags&128)===0&&(u.memoizedState=null),u.flags|=4;Ae(u),_=!1}else _a!==null&&(Vi(_a),_a=null),_=!0;if(!_)return u.flags&256?(ci(u),u):(ci(u),null)}if(ci(u),(u.flags&128)!==0)return u.lanes=h,u;if(h=y!==null,l=l!==null&&l.memoizedState!==null,h){y=u.child,_=null,y.alternate!==null&&y.alternate.memoizedState!==null&&y.alternate.memoizedState.cachePool!==null&&(_=y.alternate.memoizedState.cachePool.pool);var T=null;y.memoizedState!==null&&y.memoizedState.cachePool!==null&&(T=y.memoizedState.cachePool.pool),T!==_&&(y.flags|=2048)}return h!==l&&h&&(u.child.flags|=8192),sr(u,u.updateQueue),Ae(u),null;case 4:return Tt(),Is(l,u),l===null&&Mf(u.stateNode.containerInfo),Ae(u),null;case 10:return Li(u.type),Ae(u),null;case 19:if(O(Fe),_=u.memoizedState,_===null)return Ae(u),null;if(y=(u.flags&128)!==0,T=_.rendering,T===null)if(y)fs(_,!1);else{if(te!==0||l!==null&&(l.flags&128)!==0)for(l=u.child;l!==null;){if(T=Ka(l),T!==null){for(u.flags|=128,fs(_,!1),l=T.updateQueue,u.updateQueue=l,sr(u,l),u.subtreeFlags=0,l=h,h=u.child;h!==null;)ki(h,l),h=h.sibling;return U(Fe,Fe.current&1|2),u.child}l=l.sibling}_.tail!==null&&xn()>Ne&&(u.flags|=128,y=!0,fs(_,!1),u.lanes=4194304)}else{if(!y)if(l=Ka(T),l!==null){if(u.flags|=128,y=!0,l=l.updateQueue,u.updateQueue=l,sr(u,l),fs(_,!0),_.tail===null&&_.tailMode==="hidden"&&!T.alternate&&!ae)return Ae(u),null}else 2*xn()-_.renderingStartTime>Ne&&h!==536870912&&(u.flags|=128,y=!0,fs(_,!1),u.lanes=4194304);_.isBackwards?(T.sibling=u.child,u.child=T):(l=_.last,l!==null?l.sibling=T:u.child=T,_.last=T)}return _.tail!==null?(u=_.tail,_.rendering=u,_.tail=u.sibling,_.renderingStartTime=xn(),u.sibling=null,l=Fe.current,U(Fe,y?l&1|2:l&1),u):(Ae(u),null);case 22:case 23:return ci(u),eo(),y=u.memoizedState!==null,l!==null?l.memoizedState!==null!==y&&(u.flags|=8192):y&&(u.flags|=8192),y?(h&536870912)!==0&&(u.flags&128)===0&&(Ae(u),u.subtreeFlags&6&&(u.flags|=8192)):Ae(u),h=u.updateQueue,h!==null&&sr(u,h.retryQueue),h=null,l!==null&&l.memoizedState!==null&&l.memoizedState.cachePool!==null&&(h=l.memoizedState.cachePool.pool),y=null,u.memoizedState!==null&&u.memoizedState.cachePool!==null&&(y=u.memoizedState.cachePool.pool),y!==h&&(u.flags|=2048),l!==null&&O(al),null;case 24:return h=null,l!==null&&(h=l.memoizedState.cache),u.memoizedState.cache!==h&&(u.flags|=2048),Li(fe),Ae(u),null;case 25:return null}throw Error(o(156,u.tag))}function Sd(l,u){switch(st(u),u.tag){case 1:return l=u.flags,l&65536?(u.flags=l&-65537|128,u):null;case 3:return Li(fe),Tt(),l=u.flags,(l&65536)!==0&&(l&128)===0?(u.flags=l&-65537|128,u):null;case 26:case 27:case 5:return Ut(u),null;case 13:if(ci(u),l=u.memoizedState,l!==null&&l.dehydrated!==null){if(u.alternate===null)throw Error(o(340));Un()}return l=u.flags,l&65536?(u.flags=l&-65537|128,u):null;case 19:return O(Fe),null;case 4:return Tt(),null;case 10:return Li(u.type),null;case 22:case 23:return ci(u),eo(),l!==null&&O(al),l=u.flags,l&65536?(u.flags=l&-65537|128,u):null;case 24:return Li(fe),null;case 25:return null;default:return null}}function sf(l,u){switch(st(u),u.tag){case 3:Li(fe),Tt();break;case 26:case 27:case 5:Ut(u);break;case 4:Tt();break;case 13:ci(u);break;case 19:O(Fe);break;case 10:Li(u.type);break;case 22:case 23:ci(u),eo(),l!==null&&O(al);break;case 24:Li(fe)}}function ur(l,u){try{var h=u.updateQueue,y=h!==null?h.lastEffect:null;if(y!==null){var _=y.next;h=_;do{if((h.tag&l)===l){y=void 0;var T=h.create,N=h.inst;y=T(),N.destroy=y}h=h.next}while(h!==_)}}catch(q){Pt(u,u.return,q)}}function El(l,u,h){try{var y=u.updateQueue,_=y!==null?y.lastEffect:null;if(_!==null){var T=_.next;y=T;do{if((y.tag&l)===l){var N=y.inst,q=N.destroy;if(q!==void 0){N.destroy=void 0,_=u;var P=h;try{q()}catch(ut){Pt(_,P,ut)}}}y=y.next}while(y!==T)}}catch(ut){Pt(u,u.return,ut)}}function bd(l){var u=l.updateQueue;if(u!==null){var h=l.stateNode;try{Lu(u,h)}catch(y){Pt(l,l.return,y)}}}function Td(l,u,h){h.props=Ja(l.type,l.memoizedProps),h.state=l.memoizedState;try{h.componentWillUnmount()}catch(y){Pt(l,u,y)}}function hs(l,u){try{var h=l.ref;if(h!==null){var y=l.stateNode;switch(l.tag){case 26:case 27:case 5:var _=hu(y);break;default:_=y}typeof h=="function"?l.refCleanup=h(_):h.current=_}}catch(T){Pt(l,u,T)}}function Me(l,u){var h=l.ref,y=l.refCleanup;if(h!==null)if(typeof y=="function")try{y()}catch(_){Pt(l,u,_)}finally{l.refCleanup=null,l=l.alternate,l!=null&&(l.refCleanup=null)}else if(typeof h=="function")try{h(null)}catch(_){Pt(l,u,_)}else h.current=null}function tu(l){var u=l.type,h=l.memoizedProps,y=l.stateNode;try{_p(y,u,h,l)}catch(_){Pt(l,l.return,_)}}function uf(l,u,h){try{Of(l.stateNode,l.type,h,u,l)}catch(y){Pt(l,l.return,y)}}function rf(l){return l.tag===5||l.tag===3||(ya?l.tag===26:!1)||(vn?l.tag===27:!1)||l.tag===4}function bo(l){t:for(;;){for(;l.sibling===null;){if(l.return===null||rf(l.return))return null;l=l.return}for(l.sibling.return=l.return,l=l.sibling;l.tag!==5&&l.tag!==6&&(!vn||l.tag!==27)&&l.tag!==18;){if(l.flags&2||l.child===null||l.tag===4)continue t;l.child.return=l,l=l.child}if(!(l.flags&2))return l.stateNode}}function To(l,u,h){var y=l.tag;if(y===5||y===6)l=l.stateNode,u?Uf(h,l,u):Bd(h,l);else if(!(y===4||vn&&y===27)&&(l=l.child,l!==null))for(To(l,u,h),l=l.sibling;l!==null;)To(l,u,h),l=l.sibling}function eu(l,u,h){var y=l.tag;if(y===5||y===6)l=l.stateNode,u?Nf(h,l,u):Df(h,l);else if(!(y===4||vn&&y===27)&&(l=l.child,l!==null))for(eu(l,u,h),l=l.sibling;l!==null;)eu(l,u,h),l=l.sibling}function Ed(l,u,h){l=l.containerInfo;try{Gf(l,h)}catch(y){Pt(u,u.return,y)}}function nu(l,u){for(jl(l.containerInfo),je=u;je!==null;)if(l=je,u=l.child,(l.subtreeFlags&1028)!==0&&u!==null)u.return=l,je=u;else for(;je!==null;){l=je;var h=l.alternate;switch(u=l.flags,l.tag){case 0:break;case 11:case 15:break;case 1:if((u&1024)!==0&&h!==null){u=void 0;var y=l,_=h.memoizedProps;h=h.memoizedState;var T=y.stateNode;try{var N=Ja(y.type,_,y.elementType===y.type);u=T.getSnapshotBeforeUpdate(N,h),T.__reactInternalSnapshotBeforeUpdate=u}catch(q){Pt(y,y.return,q)}}break;case 3:(u&1024)!==0&&gn&&Vo(l.stateNode.containerInfo);break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((u&1024)!==0)throw Error(o(163))}if(u=l.sibling,u!==null){u.return=l.return,je=u;break}je=l.return}return N=Ms,Ms=!1,N}function Eo(l,u,h){var y=h.flags;switch(h.tag){case 0:case 11:case 15:mi(l,h),y&4&&ur(5,h);break;case 1:if(mi(l,h),y&4)if(l=h.stateNode,u===null)try{l.componentDidMount()}catch(q){Pt(h,h.return,q)}else{var _=Ja(h.type,u.memoizedProps);u=u.memoizedState;try{l.componentDidUpdate(_,u,l.__reactInternalSnapshotBeforeUpdate)}catch(q){Pt(h,h.return,q)}}y&64&&bd(h),y&512&&hs(h,h.return);break;case 3:if(mi(l,h),y&64&&(y=h.updateQueue,y!==null)){if(l=null,h.child!==null)switch(h.child.tag){case 27:case 5:l=hu(h.child.stateNode);break;case 1:l=h.child.stateNode}try{Lu(y,l)}catch(q){Pt(h,h.return,q)}}break;case 26:if(ya){mi(l,h),y&512&&hs(h,h.return);break}case 27:case 5:mi(l,h),u===null&&y&4&&tu(h),y&512&&hs(h,h.return);break;case 12:mi(l,h);break;case 13:mi(l,h),y&4&&Cl(l,h);break;case 22:if(_=h.memoizedState!==null||ln,!_){u=u!==null&&u.memoizedState!==null||Oe;var T=ln,N=Oe;ln=_,(Oe=u)&&!N?Ml(l,h,(h.subtreeFlags&8772)!==0):mi(l,h),ln=T,Oe=N}y&512&&(h.memoizedProps.mode==="manual"?hs(h,h.return):Me(h,h.return));break;default:mi(l,h)}}function au(l){var u=l.alternate;u!==null&&(l.alternate=null,au(u)),l.child=null,l.deletions=null,l.sibling=null,l.tag===5&&(u=l.stateNode,u!==null&&Rf(u)),l.stateNode=null,l.return=null,l.dependencies=null,l.memoizedProps=null,l.memoizedState=null,l.pendingProps=null,l.stateNode=null,l.updateQueue=null}function ha(l,u,h){for(h=h.child;h!==null;)Co(l,u,h),h=h.sibling}function Co(l,u,h){if(In&&typeof In.onCommitFiberUnmount=="function")try{In.onCommitFiberUnmount(gu,h)}catch{}switch(h.tag){case 26:if(ya){Oe||Me(h,u),ha(l,u,h),h.memoizedState?Qf(h.memoizedState):h.stateNode&&kf(h.stateNode);break}case 27:if(vn){Oe||Me(h,u);var y=Ve,_=ea;Ve=h.stateNode,ha(l,u,h),Id(h.stateNode),Ve=y,ea=_;break}case 5:Oe||Me(h,u);case 6:if(gn){if(y=Ve,_=ea,Ve=null,ha(l,u,h),Ve=y,ea=_,Ve!==null)if(ea)try{Ye(Ve,h.stateNode)}catch(T){Pt(h,u,T)}else try{qn(Ve,h.stateNode)}catch(T){Pt(h,u,T)}}else ha(l,u,h);break;case 18:gn&&Ve!==null&&(ea?Lf(Ve,h.stateNode):kd(Ve,h.stateNode));break;case 4:gn?(y=Ve,_=ea,Ve=h.stateNode.containerInfo,ea=!0,ha(l,u,h),Ve=y,ea=_):(ma&&Ed(h.stateNode,h,Qo()),ha(l,u,h));break;case 0:case 11:case 14:case 15:Oe||El(2,h,u),Oe||El(4,h,u),ha(l,u,h);break;case 1:Oe||(Me(h,u),y=h.stateNode,typeof y.componentWillUnmount=="function"&&Td(h,u,y)),ha(l,u,h);break;case 21:ha(l,u,h);break;case 22:Oe||Me(h,u),Oe=(y=Oe)||h.memoizedState!==null,ha(l,u,h),Oe=y;break;default:ha(l,u,h)}}function Cl(l,u){if(jn&&u.memoizedState===null&&(l=u.alternate,l!==null&&(l=l.memoizedState,l!==null&&(l=l.dehydrated,l!==null))))try{Jo(l)}catch(h){Pt(u,u.return,h)}}function iu(l){switch(l.tag){case 13:case 19:var u=l.stateNode;return u===null&&(u=l.stateNode=new Tu),u;case 22:return l=l.stateNode,u=l._retryCache,u===null&&(u=l._retryCache=new Tu),u;default:throw Error(o(435,l.tag))}}function rr(l,u){var h=iu(l);u.forEach(function(y){var _=df.bind(null,l,y);h.has(y)||(h.add(y),y.then(_,_))})}function wn(l,u){var h=u.deletions;if(h!==null)for(var y=0;y<h.length;y++){var _=h[y],T=l,N=u;if(gn){var q=N;t:for(;q!==null;){switch(q.tag){case 27:case 5:Ve=q.stateNode,ea=!1;break t;case 3:Ve=q.stateNode.containerInfo,ea=!0;break t;case 4:Ve=q.stateNode.containerInfo,ea=!0;break t}q=q.return}if(Ve===null)throw Error(o(160));Co(T,N,_),Ve=null,ea=!1}else Co(T,N,_);T=_.alternate,T!==null&&(T.return=null),_.return=null}if(u.subtreeFlags&13878)for(u=u.child;u!==null;)Al(u,l),u=u.sibling}function Al(l,u){var h=l.alternate,y=l.flags;switch(l.tag){case 0:case 11:case 14:case 15:wn(u,l),kn(l),y&4&&(El(3,l,l.return),ur(3,l),El(5,l,l.return));break;case 1:wn(u,l),kn(l),y&512&&(Oe||h===null||Me(h,h.return)),y&64&&ln&&(l=l.updateQueue,l!==null&&(y=l.callbacks,y!==null&&(h=l.shared.hiddenCallbacks,l.shared.hiddenCallbacks=h===null?y:h.concat(y))));break;case 26:if(ya){var _=Yn;wn(u,l),kn(l),y&512&&(Oe||h===null||Me(h,h.return)),y&4&&(y=h!==null?h.memoizedState:null,u=l.memoizedState,h===null?u===null?l.stateNode===null?l.stateNode=Zf(_,l.type,l.memoizedProps,l):Kf(_,l.type,l.stateNode):l.stateNode=Vf(_,u,l.memoizedProps):y!==u?(y===null?h.stateNode!==null&&kf(h.stateNode):Qf(y),u===null?Kf(_,l.type,l.stateNode):Vf(_,u,l.memoizedProps)):u===null&&l.stateNode!==null&&uf(l,l.memoizedProps,h.memoizedProps));break}case 27:if(vn&&y&4&&l.alternate===null){_=l.stateNode;var T=l.memoizedProps;try{Ep(_),Cp(l.type,T,_,l)}catch(gt){Pt(l,l.return,gt)}}case 5:if(wn(u,l),kn(l),y&512&&(Oe||h===null||Me(h,h.return)),gn){if(l.flags&32){u=l.stateNode;try{Sr(u)}catch(gt){Pt(l,l.return,gt)}}y&4&&l.stateNode!=null&&(u=l.memoizedProps,uf(l,u,h!==null?h.memoizedProps:u)),y&1024&&(kl=!0)}break;case 6:if(wn(u,l),kn(l),y&4&&gn){if(l.stateNode===null)throw Error(o(162));y=l.memoizedProps,h=h!==null?h.memoizedProps:y,u=l.stateNode;try{wd(u,h,y)}catch(gt){Pt(l,l.return,gt)}}break;case 3:if(ya?(Jf(),_=Yn,Yn=Po(u.containerInfo),wn(u,l),Yn=_):wn(u,l),kn(l),y&4){if(gn&&jn&&h!==null&&h.memoizedState.isDehydrated)try{ko(u.containerInfo)}catch(gt){Pt(l,l.return,gt)}if(ma){y=u.containerInfo,h=u.pendingChildren;try{Gf(y,h)}catch(gt){Pt(l,l.return,gt)}}}kl&&(kl=!1,of(l));break;case 4:ya?(h=Yn,Yn=Po(l.stateNode.containerInfo),wn(u,l),kn(l),Yn=h):(wn(u,l),kn(l)),y&4&&ma&&Ed(l.stateNode,l,l.stateNode.pendingChildren);break;case 12:wn(u,l),kn(l);break;case 13:wn(u,l),kn(l),l.child.flags&8192&&l.memoizedState!==null!=(h!==null&&h.memoizedState!==null)&&(Ri=xn()),y&4&&(y=l.updateQueue,y!==null&&(l.updateQueue=null,rr(l,y)));break;case 22:y&512&&(Oe||h===null||Me(h,h.return)),_=l.memoizedState!==null;var N=h!==null&&h.memoizedState!==null,q=ln,P=Oe;if(ln=q||_,Oe=P||N,wn(u,l),Oe=P,ln=q,kn(l),u=l.stateNode,u._current=l,u._visibility&=-3,u._visibility|=u._pendingVisibility&2,y&8192&&(u._visibility=_?u._visibility&-2:u._visibility|1,_&&(u=ln||Oe,h===null||N||u||lu(l)),gn&&(l.memoizedProps===null||l.memoizedProps.mode!=="manual"))){t:if(h=null,gn)for(u=l;;){if(u.tag===5||ya&&u.tag===26||vn&&u.tag===27){if(h===null){N=h=u;try{T=N.stateNode,_?br(T):Bf(N.stateNode,N.memoizedProps)}catch(gt){Pt(N,N.return,gt)}}}else if(u.tag===6){if(h===null){N=u;try{var ut=N.stateNode;_?Xo(ut):Ii(ut,N.memoizedProps)}catch(gt){Pt(N,N.return,gt)}}}else if((u.tag!==22&&u.tag!==23||u.memoizedState===null||u===l)&&u.child!==null){u.child.return=u,u=u.child;continue}if(u===l)break t;for(;u.sibling===null;){if(u.return===null||u.return===l)break t;h===u&&(h=null),u=u.return}h===u&&(h=null),u.sibling.return=u.return,u=u.sibling}}y&4&&(y=l.updateQueue,y!==null&&(h=y.retryQueue,h!==null&&(y.retryQueue=null,rr(l,h))));break;case 19:wn(u,l),kn(l),y&4&&(y=l.updateQueue,y!==null&&(l.updateQueue=null,rr(l,y)));break;case 21:break;default:wn(u,l),kn(l)}}function kn(l){var u=l.flags;if(u&2){try{if(gn&&(!vn||l.tag!==27)){t:{for(var h=l.return;h!==null;){if(rf(h)){var y=h;break t}h=h.return}throw Error(o(160))}switch(y.tag){case 27:if(vn){var _=y.stateNode,T=bo(l);eu(l,T,_);break}case 5:var N=y.stateNode;y.flags&32&&(Sr(N),y.flags&=-33);var q=bo(l);eu(l,q,N);break;case 3:case 4:var P=y.stateNode.containerInfo,ut=bo(l);To(l,ut,P);break;default:throw Error(o(161))}}}catch(gt){Pt(l,l.return,gt)}l.flags&=-3}u&4096&&(l.flags&=-4097)}function of(l){if(l.subtreeFlags&1024)for(l=l.child;l!==null;){var u=l;of(u),u.tag===5&&u.flags&1024&&ge(u.stateNode),l=l.sibling}}function mi(l,u){if(u.subtreeFlags&8772)for(u=u.child;u!==null;)Eo(l,u.alternate,u),u=u.sibling}function lu(l){for(l=l.child;l!==null;){var u=l;switch(u.tag){case 0:case 11:case 14:case 15:El(4,u,u.return),lu(u);break;case 1:Me(u,u.return);var h=u.stateNode;typeof h.componentWillUnmount=="function"&&Td(u,u.return,h),lu(u);break;case 26:case 27:case 5:Me(u,u.return),lu(u);break;case 22:Me(u,u.return),u.memoizedState===null&&lu(u);break;default:lu(u)}l=l.sibling}}function Ml(l,u,h){for(h=h&&(u.subtreeFlags&8772)!==0,u=u.child;u!==null;){var y=u.alternate,_=l,T=u,N=T.flags;switch(T.tag){case 0:case 11:case 15:Ml(_,T,h),ur(4,T);break;case 1:if(Ml(_,T,h),y=T,_=y.stateNode,typeof _.componentDidMount=="function")try{_.componentDidMount()}catch(ut){Pt(y,y.return,ut)}if(y=T,_=y.updateQueue,_!==null){var q=y.stateNode;try{var P=_.shared.hiddenCallbacks;if(P!==null)for(_.shared.hiddenCallbacks=null,_=0;_<P.length;_++)Ih(P[_],q)}catch(ut){Pt(y,y.return,ut)}}h&&N&64&&bd(T),hs(T,T.return);break;case 26:case 27:case 5:Ml(_,T,h),h&&y===null&&N&4&&tu(T),hs(T,T.return);break;case 12:Ml(_,T,h);break;case 13:Ml(_,T,h),h&&N&4&&Cl(_,T);break;case 22:T.memoizedState===null&&Ml(_,T,h),hs(T,T.return);break;default:Ml(_,T,h)}u=u.sibling}}function cf(l,u){var h=null;l!==null&&l.memoizedState!==null&&l.memoizedState.cachePool!==null&&(h=l.memoizedState.cachePool.pool),l=null,u.memoizedState!==null&&u.memoizedState.cachePool!==null&&(l=u.memoizedState.cachePool.pool),l!==h&&(l!=null&&l.refCount++,h!=null&&Ws(h))}function Ao(l,u){l=null,u.alternate!==null&&(l=u.alternate.memoizedState.cache),u=u.memoizedState.cache,u!==l&&(u.refCount++,l!=null&&Ws(l))}function Xi(l,u,h,y){if(u.subtreeFlags&10256)for(u=u.child;u!==null;)Mo(l,u,h,y),u=u.sibling}function Mo(l,u,h,y){var _=u.flags;switch(u.tag){case 0:case 11:case 15:Xi(l,u,h,y),_&2048&&ur(9,u);break;case 3:Xi(l,u,h,y),_&2048&&(l=null,u.alternate!==null&&(l=u.alternate.memoizedState.cache),u=u.memoizedState.cache,u!==l&&(u.refCount++,l!=null&&Ws(l)));break;case 12:if(_&2048){Xi(l,u,h,y),l=u.stateNode;try{var T=u.memoizedProps,N=T.id,q=T.onPostCommit;typeof q=="function"&&q(N,u.alternate===null?"mount":"update",l.passiveEffectDuration,-0)}catch(P){Pt(u,u.return,P)}}else Xi(l,u,h,y);break;case 23:break;case 22:T=u.stateNode,u.memoizedState!==null?T._visibility&4?Xi(l,u,h,y):Rl(l,u):T._visibility&4?Xi(l,u,h,y):(T._visibility|=4,En(l,u,h,y,(u.subtreeFlags&10256)!==0)),_&2048&&cf(u.alternate,u);break;case 24:Xi(l,u,h,y),_&2048&&Ao(u.alternate,u);break;default:Xi(l,u,h,y)}}function En(l,u,h,y,_){for(_=_&&(u.subtreeFlags&10256)!==0,u=u.child;u!==null;){var T=l,N=u,q=h,P=y,ut=N.flags;switch(N.tag){case 0:case 11:case 15:En(T,N,q,P,_),ur(8,N);break;case 23:break;case 22:var gt=N.stateNode;N.memoizedState!==null?gt._visibility&4?En(T,N,q,P,_):Rl(T,N):(gt._visibility|=4,En(T,N,q,P,_)),_&&ut&2048&&cf(N.alternate,N);break;case 24:En(T,N,q,P,_),_&&ut&2048&&Ao(N.alternate,N);break;default:En(T,N,q,P,_)}u=u.sibling}}function Rl(l,u){if(u.subtreeFlags&10256)for(u=u.child;u!==null;){var h=l,y=u,_=y.flags;switch(y.tag){case 22:Rl(h,y),_&2048&&cf(y.alternate,y);break;case 24:Rl(h,y),_&2048&&Ao(y.alternate,y);break;default:Rl(h,y)}u=u.sibling}}function on(l){if(l.subtreeFlags&Rs)for(l=l.child;l!==null;)ds(l),l=l.sibling}function ds(l){switch(l.tag){case 26:on(l),l.flags&Rs&&(l.memoizedState!==null?Wf(Yn,l.memoizedState,l.memoizedProps):Ue(l.type,l.memoizedProps));break;case 5:on(l),l.flags&Rs&&Ue(l.type,l.memoizedProps);break;case 3:case 4:if(ya){var u=Yn;Yn=Po(l.stateNode.containerInfo),on(l),Yn=u}else on(l);break;case 22:l.memoizedState===null&&(u=l.alternate,u!==null&&u.memoizedState!==null?(u=Rs,Rs=16777216,on(l),Rs=u):on(l));break;default:on(l)}}function Ro(l){var u=l.alternate;if(u!==null&&(l=u.child,l!==null)){u.child=null;do u=l.sibling,l.sibling=null,l=u;while(l!==null)}}function zl(l){var u=l.deletions;if((l.flags&16)!==0){if(u!==null)for(var h=0;h<u.length;h++){var y=u[h];je=y,Dl(y,l)}Ro(l)}if(l.subtreeFlags&10256)for(l=l.child;l!==null;)or(l),l=l.sibling}function or(l){switch(l.tag){case 0:case 11:case 15:zl(l),l.flags&2048&&El(9,l,l.return);break;case 3:zl(l);break;case 12:zl(l);break;case 22:var u=l.stateNode;l.memoizedState!==null&&u._visibility&4&&(l.return===null||l.return.tag!==13)?(u._visibility&=-5,su(l)):zl(l);break;default:zl(l)}}function su(l){var u=l.deletions;if((l.flags&16)!==0){if(u!==null)for(var h=0;h<u.length;h++){var y=u[h];je=y,Dl(y,l)}Ro(l)}for(l=l.child;l!==null;){switch(u=l,u.tag){case 0:case 11:case 15:El(8,u,u.return),su(u);break;case 22:h=u.stateNode,h._visibility&4&&(h._visibility&=-5,su(u));break;default:su(u)}l=l.sibling}}function Dl(l,u){for(;je!==null;){var h=je;switch(h.tag){case 0:case 11:case 15:El(8,h,u);break;case 23:case 22:if(h.memoizedState!==null&&h.memoizedState.cachePool!==null){var y=h.memoizedState.cachePool.pool;y!=null&&y.refCount++}break;case 24:Ws(h.memoizedState.cache)}if(y=h.child,y!==null)y.return=h,je=y;else t:for(h=l;je!==null;){y=je;var _=y.sibling,T=y.return;if(au(y),y===h){je=null;break t}if(_!==null){_.return=T,je=_;break t}je=T}}}function zo(l){var u=Af(l);if(u!=null){if(typeof u.memoizedProps["data-testname"]!="string")throw Error(o(364));return u}if(l=bs(l),l===null)throw Error(o(362));return l.stateNode.current}function uu(l,u){var h=l.tag;switch(u.$$typeof){case Gr:if(l.type===u.value)return!0;break;case sc:t:{for(u=u.value,l=[l,0],h=0;h<l.length;){var y=l[h++],_=y.tag,T=l[h++],N=u[T];if(_!==5&&_!==26&&_!==27||!Ti(y)){for(;N!=null&&uu(y,N);)T++,N=u[T];if(T===u.length){u=!0;break t}else for(y=y.child;y!==null;)l.push(y,T),y=y.sibling}}u=!1}return u;case uc:if((h===5||h===26||h===27)&&xp(l.stateNode,u.value))return!0;break;case he:if((h===5||h===6||h===26||h===27)&&(l=_r(l),l!==null&&0<=l.indexOf(u.value)))return!0;break;case $t:if((h===5||h===26||h===27)&&(l=l.memoizedProps["data-testname"],typeof l=="string"&&l.toLowerCase()===u.value.toLowerCase()))return!0;break;default:throw Error(o(365))}return!1}function Ol(l){switch(l.$$typeof){case Gr:return"<"+(d(l.value)||"Unknown")+">";case sc:return":has("+(Ol(l)||"")+")";case uc:return'[role="'+l.value+'"]';case he:return'"'+l.value+'"';case $t:return'[data-testname="'+l.value+'"]';default:throw Error(o(365))}}function Cd(l,u){var h=[];l=[l,0];for(var y=0;y<l.length;){var _=l[y++],T=_.tag,N=l[y++],q=u[N];if(T!==5&&T!==26&&T!==27||!Ti(_)){for(;q!=null&&uu(_,q);)N++,q=u[N];if(N===u.length)h.push(_);else for(_=_.child;_!==null;)l.push(_,N),_=_.sibling}}return h}function Hn(l,u){if(!bi)throw Error(o(363));l=zo(l),l=Cd(l,u),u=[],l=Array.from(l);for(var h=0;h<l.length;){var y=l[h++],_=y.tag;if(_===5||_===26||_===27)Ti(y)||u.push(y.stateNode);else for(y=y.child;y!==null;)l.push(y),y=y.sibling}return u}function Gn(){if((Rt&2)!==0&&Qt!==0)return Qt&-Qt;if(Nt.T!==null){var l=$n;return l!==0?l:Fr()}return Ha()}function pi(){na===0&&(na=(Qt&536870912)===0||ae?pt():536870912);var l=Ta.current;return l!==null&&(l.flags|=32),na}function Cn(l,u,h){(l===Kt&&ve===2||l.cancelPendingCommit!==null)&&(Wa(l,0),Pa(l,Qt,na,!1)),dt(l,h),((Rt&2)===0||l!==Kt)&&(l===Kt&&((Rt&2)===0&&(ai|=h),te===4&&Pa(l,Qt,na,!1)),Na(l))}function cr(l,u,h){if((Rt&6)!==0)throw Error(o(327));var y=!h&&(u&60)===0&&(u&l.expiredLanes)===0||V(l,u),_=y?vi(l,u):yi(l,u,!0),T=y;do{if(_===0){Ea&&!y&&Pa(l,u,0,!1);break}else if(_===6)Pa(l,u,0,!de);else{if(h=l.current.alternate,T&&!Ad(h)){_=yi(l,u,!1),T=!1;continue}if(_===2){if(T=u,l.errorRecoveryDisabledLanes&T)var N=0;else N=l.pendingLanes&-536870913,N=N!==0?N:N&536870912?536870912:0;if(N!==0){u=N;t:{var q=l;_=Eu;var P=jn&&q.current.memoizedState.isDehydrated;if(P&&(Wa(q,N).flags|=256),N=yi(q,N,!1),N!==2){if(il&&!P){q.errorRecoveryDisabledLanes|=T,ai|=T,_=4;break t}T=Aa,Aa=_,T!==null&&Vi(T)}_=N}if(T=!1,_!==2)continue}}if(_===1){Wa(l,0),Pa(l,u,0,!0);break}t:{switch(y=l,_){case 0:case 1:throw Error(o(345));case 4:if((u&4194176)===u){Pa(y,u,na,!de);break t}break;case 2:Aa=null;break;case 3:case 5:break;default:throw Error(o(329))}if(y.finishedWork=h,y.finishedLanes=u,(u&62914560)===u&&(T=Ri+300-xn(),10<T)){if(Pa(y,u,na,!de),Z(y,0)!==0)break t;y.timeoutHandle=Cf(Do.bind(null,y,h,Aa,ii,Cu,u,na,ai,ll,de,2,-0,0),T);break t}Do(y,h,Aa,ii,Cu,u,na,ai,ll,de,0,-0,0)}}break}while(!0);Na(l)}function Vi(l){Aa===null?Aa=l:Aa.push.apply(Aa,l)}function Do(l,u,h,y,_,T,N,q,P,ut,gt,St,bt){var Gt=u.subtreeFlags;if((Gt&8192||(Gt&16785408)===16785408)&&(pa(),ds(u),u=qo(),u!==null)){l.cancelPendingCommit=u(_e.bind(null,l,h,y,_,N,q,P,1,St,bt)),Pa(l,T,N,!ut);return}_e(l,h,y,_,N,q,P,gt,St,bt)}function Ad(l){for(var u=l;;){var h=u.tag;if((h===0||h===11||h===15)&&u.flags&16384&&(h=u.updateQueue,h!==null&&(h=h.stores,h!==null)))for(var y=0;y<h.length;y++){var _=h[y],T=_.getSnapshot;_=_.value;try{if(!ga(T(),_))return!1}catch{return!1}}if(h=u.child,u.subtreeFlags&16384&&h!==null)h.return=u,u=h;else{if(u===l)break;for(;u.sibling===null;){if(u.return===null||u.return===l)return!0;u=u.return}u.sibling.return=u.return,u=u.sibling}}return!0}function Pa(l,u,h,y){u&=~On,u&=~ai,l.suspendedLanes|=u,l.pingedLanes&=~u,y&&(l.warmLanes|=u),y=l.expirationTimes;for(var _=u;0<_;){var T=31-Fn(_),N=1<<T;y[T]=-1,_&=~N}h!==0&&_t(l,h,u)}function ff(){return(Rt&6)===0?(ml(0),!1):!0}function Jn(){if(Yt!==null){if(ve===0)var l=Yt.return;else l=Yt,Ge=Kl=null,Qu(l),Ci=null,qa=0,l=Yt;for(;l!==null;)sf(l.alternate,l),l=l.return;Yt=null}}function Wa(l,u){l.finishedWork=null,l.finishedLanes=0;var h=l.timeoutHandle;h!==Ss&&(l.timeoutHandle=Ss,xr(h)),h=l.cancelPendingCommit,h!==null&&(l.cancelPendingCommit=null,h()),Jn(),Kt=l,Yt=h=An(l.current,null),Qt=u,ve=0,Qe=null,de=!1,Ea=V(l,u),il=!1,ll=na=On=ai=Ca=te=0,Aa=Eu=null,Cu=!1,(u&8)!==0&&(u|=u&32);var y=l.entangledLanes;if(y!==0)for(l=l.entanglements,y&=u;0<y;){var _=31-Fn(y),T=1<<_;u|=l[_],y&=~T}return ni=u,rn(),h}function ms(l,u){Xt=null,Nt.H=ie,u===ye?(u=Vs(),ve=3):u===th?(u=Vs(),ve=4):ve=u===lm?8:u!==null&&typeof u=="object"&&typeof u.then=="function"?6:1,Qe=u,Yt===null&&(te=1,po(l,et(u,l.current)))}function fr(){var l=Ta.current;return l===null?!0:(Qt&4194176)===Qt?Ya===null:(Qt&62914560)===Qt||(Qt&536870912)!==0?l===Ya:!1}function ru(){var l=Nt.H;return Nt.H=ie,l===null?ie:l}function da(){var l=Nt.A;return Nt.A=lc,l}function Pn(){te=4,de||(Qt&4194176)!==Qt&&Ta.current!==null||(Ea=!0),(Ca&134217727)===0&&(ai&134217727)===0||Kt===null||Pa(Kt,Qt,na,!1)}function yi(l,u,h){var y=Rt;Rt|=2;var _=ru(),T=da();(Kt!==l||Qt!==u)&&(ii=null,Wa(l,u)),u=!1;var N=te;t:do try{if(ve!==0&&Yt!==null){var q=Yt,P=Qe;switch(ve){case 8:Jn(),N=6;break t;case 3:case 2:case 6:Ta.current===null&&(u=!0);var ut=ve;if(ve=0,Qe=null,Nl(l,q,P,ut),h&&Ea){N=0;break t}break;default:ut=ve,ve=0,Qe=null,Nl(l,q,P,ut)}}gi(),N=te;break}catch(gt){ms(l,gt)}while(!0);return u&&l.shellSuspendCounter++,Ge=Kl=null,Rt=y,Nt.H=_,Nt.A=T,Yt===null&&(Kt=null,Qt=0,rn()),N}function gi(){for(;Yt!==null;)hf(Yt)}function vi(l,u){var h=Rt;Rt|=2;var y=ru(),_=da();Kt!==l||Qt!==u?(ii=null,Ne=xn()+500,Wa(l,u)):Ea=V(l,u);t:do try{if(ve!==0&&Yt!==null){u=Yt;var T=Qe;e:switch(ve){case 1:ve=0,Qe=null,Nl(l,u,T,1);break;case 2:if(Xu(T)){ve=0,Qe=null,Oo(u);break}u=function(){ve===2&&Kt===l&&(ve=7),Na(l)},T.then(u,u);break t;case 3:ve=7;break t;case 4:ve=5;break t;case 7:Xu(T)?(ve=0,Qe=null,Oo(u)):(ve=0,Qe=null,Nl(l,u,T,7));break;case 5:var N=null;switch(Yt.tag){case 26:N=Yt.memoizedState;case 5:case 27:var q=Yt,P=q.type,ut=q.pendingProps;if(N?Pf(N):Fi(P,ut)){ve=0,Qe=null;var gt=q.sibling;if(gt!==null)Yt=gt;else{var St=q.return;St!==null?(Yt=St,hr(St)):Yt=null}break e}}ve=0,Qe=null,Nl(l,u,T,5);break;case 6:ve=0,Qe=null,Nl(l,u,T,6);break;case 8:Jn(),te=6;break t;default:throw Error(o(462))}}Qi();break}catch(bt){ms(l,bt)}while(!0);return Ge=Kl=null,Nt.H=y,Nt.A=_,Rt=h,Yt!==null?0:(Kt=null,Qt=0,rn(),te)}function Qi(){for(;Yt!==null&&!tm();)hf(Yt)}function hf(l){var u=vd(l.alternate,l,ni);l.memoizedProps=l.pendingProps,u===null?hr(l):Yt=u}function Oo(l){var u=l,h=u.alternate;switch(u.tag){case 15:case 0:u=dd(h,u,u.pendingProps,u.type,void 0,Qt);break;case 11:u=dd(h,u,u.pendingProps,u.type.render,u.ref,Qt);break;case 5:Qu(u);default:sf(h,u),u=Yt=ki(u,ni),u=vd(h,u,ni)}l.memoizedProps=l.pendingProps,u===null?hr(l):Yt=u}function Nl(l,u,h,y){Ge=Kl=null,Qu(u),Ci=null,qa=0;var _=u.return;try{if(rd(l,_,u,h,Qt)){te=1,po(l,et(h,l.current)),Yt=null;return}}catch(T){if(_!==null)throw Yt=_,T;te=1,po(l,et(h,l.current)),Yt=null;return}u.flags&32768?(ae||y===1?l=!0:Ea||(Qt&536870912)!==0?l=!1:(de=l=!0,(y===2||y===3||y===6)&&(y=Ta.current,y!==null&&y.tag===13&&(y.flags|=16384))),cn(u,l)):hr(u)}function hr(l){var u=l;do{if((u.flags&32768)!==0){cn(u,de);return}l=u.return;var h=_d(u.alternate,u,ni);if(h!==null){Yt=h;return}if(u=u.sibling,u!==null){Yt=u;return}Yt=u=l}while(u!==null);te===0&&(te=5)}function cn(l,u){do{var h=Sd(l.alternate,l);if(h!==null){h.flags&=32767,Yt=h;return}if(h=l.return,h!==null&&(h.flags|=32768,h.subtreeFlags=0,h.deletions=null),!u&&(l=l.sibling,l!==null)){Yt=l;return}Yt=l=h}while(l!==null);te=6,Yt=null}function _e(l,u,h,y,_,T,N,q,P,ut){var gt=Nt.T,St=an();try{Mn(2),Nt.T=null,Ft(l,u,h,y,St,_,T,N,q,P,ut)}finally{Nt.T=gt,Mn(St)}}function Ft(l,u,h,y,_,T,N,q){do fn();while(sl!==null);if((Rt&6)!==0)throw Error(o(327));var P=l.finishedWork;if(y=l.finishedLanes,P===null)return null;if(l.finishedWork=null,l.finishedLanes=0,P===l.current)throw Error(o(177));l.callbackNode=null,l.callbackPriority=0,l.cancelPendingCommit=null;var ut=P.lanes|P.childLanes;if(ut|=xu,vt(l,y,ut,T,N,q),l===Kt&&(Yt=Kt=null,Qt=0),(P.subtreeFlags&10256)===0&&(P.flags&10256)===0||Xa||(Xa=!0,rc=ut,Ds=h,dr(Fo,function(){return fn(),null})),h=(P.flags&15990)!==0,(P.subtreeFlags&15990)!==0||h?(h=Nt.T,Nt.T=null,T=an(),Mn(2),N=Rt,Rt|=4,nu(l,P),Al(P,l),Tf(l.containerInfo),l.current=P,Eo(l,P.alternate,P),em(),Rt=N,Mn(T),Nt.T=h):l.current=P,Xa?(Xa=!1,sl=l,zs=y):Zi(l,ut),ut=l.pendingLanes,ut===0&&(Ma=null),w(P.stateNode),Na(l),u!==null)for(_=l.onRecoverableError,P=0;P<u.length;P++)ut=u[P],_(ut.value,{componentStack:ut.stack});return(zs&3)!==0&&fn(),ut=l.pendingLanes,(y&4194218)!==0&&(ut&42)!==0?l===Ln?Os++:(Os=0,Ln=l):Os=0,ml(0),null}function Zi(l,u){(l.pooledCacheLanes&=u)===0&&(u=l.pooledCache,u!=null&&(l.pooledCache=null,Ws(u)))}function fn(){if(sl!==null){var l=sl,u=rc;rc=0;var h=Dt(zs),y=32>h?32:h;h=Nt.T;var _=an();try{if(Mn(y),Nt.T=null,sl===null)var T=!1;else{y=Ds,Ds=null;var N=sl,q=zs;if(sl=null,zs=0,(Rt&6)!==0)throw Error(o(331));var P=Rt;if(Rt|=4,or(N.current),Mo(N,N.current,q,y),Rt=P,ml(0,!1),In&&typeof In.onPostCommitFiberRoot=="function")try{In.onPostCommitFiberRoot(gu,N)}catch{}T=!0}return T}finally{Mn(_),Nt.T=h,Zi(l,u)}}return!1}function No(l,u,h){u=et(h,u),u=er(l.stateNode,u,2),l=Je(l,u,2),l!==null&&(dt(l,2),Na(l))}function Pt(l,u,h){if(l.tag===3)No(l,l,h);else for(;u!==null;){if(u.tag===3){No(u,l,h);break}else if(u.tag===1){var y=u.stateNode;if(typeof u.type.getDerivedStateFromError=="function"||typeof y.componentDidCatch=="function"&&(Ma===null||!Ma.has(y))){l=et(h,l),h=Ps(2),y=Je(u,h,2),y!==null&&(nr(h,y,u,l),dt(y,2),Na(y));break}}u=u.return}}function Uo(l,u,h){var y=l.pingCache;if(y===null){y=l.pingCache=new Wt;var _=new Set;y.set(u,_)}else _=y.get(u),_===void 0&&(_=new Set,y.set(u,_));_.has(h)||(il=!0,_.add(h),l=Md.bind(null,l,u,h),u.then(l,l))}function Md(l,u,h){var y=l.pingCache;y!==null&&y.delete(u),l.pingedLanes|=l.suspendedLanes&h,l.warmLanes&=~h,Kt===l&&(Qt&h)===h&&(te===4||te===3&&(Qt&62914560)===Qt&&300>xn()-Ri?(Rt&2)===0&&Wa(l,0):On|=h,ll===Qt&&(ll=0)),Na(l)}function ps(l,u){u===0&&(u=ct()),l=Za(l,u),l!==null&&(dt(l,u),Na(l))}function ys(l){var u=l.memoizedState,h=0;u!==null&&(h=u.retryLane),ps(l,h)}function df(l,u){var h=0;switch(l.tag){case 13:var y=l.stateNode,_=l.memoizedState;_!==null&&(h=_.retryLane);break;case 19:y=l.stateNode;break;case 22:y=l.stateNode._retryCache;break;default:throw Error(o(314))}y!==null&&y.delete(u),ps(l,h)}function dr(l,u){return yu(l,u)}function mf(l,u,h,y){this.tag=l,this.key=h,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=u,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=y,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Ki(l){return l=l.prototype,!(!l||!l.isReactComponent)}function An(l,u){var h=l.alternate;return h===null?(h=n(l.tag,u,l.key,l.mode),h.elementType=l.elementType,h.type=l.type,h.stateNode=l.stateNode,h.alternate=l,l.alternate=h):(h.pendingProps=u,h.type=l.type,h.flags=0,h.subtreeFlags=0,h.deletions=null),h.flags=l.flags&31457280,h.childLanes=l.childLanes,h.lanes=l.lanes,h.child=l.child,h.memoizedProps=l.memoizedProps,h.memoizedState=l.memoizedState,h.updateQueue=l.updateQueue,u=l.dependencies,h.dependencies=u===null?null:{lanes:u.lanes,firstContext:u.firstContext},h.sibling=l.sibling,h.index=l.index,h.ref=l.ref,h.refCleanup=l.refCleanup,h}function ki(l,u){l.flags&=31457282;var h=l.alternate;return h===null?(l.childLanes=0,l.lanes=u,l.child=null,l.subtreeFlags=0,l.memoizedProps=null,l.memoizedState=null,l.updateQueue=null,l.dependencies=null,l.stateNode=null):(l.childLanes=h.childLanes,l.lanes=h.lanes,l.child=h.child,l.subtreeFlags=0,l.deletions=null,l.memoizedProps=h.memoizedProps,l.memoizedState=h.memoizedState,l.updateQueue=h.updateQueue,l.type=h.type,u=h.dependencies,l.dependencies=u===null?null:{lanes:u.lanes,firstContext:u.firstContext}),l}function wa(l,u,h,y,_,T){var N=0;if(y=l,typeof l=="function")Ki(l)&&(N=1);else if(typeof l=="string")N=ya&&vn?Xf(l,h,dn.current)?26:mu(l)?27:5:ya?Xf(l,h,dn.current)?26:5:vn&&mu(l)?27:5;else t:switch(l){case cu:return Ji(h.children,_,T,u);case xf:N=8,_|=24;break;case _f:return l=n(12,h,u,_|2),l.elementType=_f,l.lanes=T,l;case wo:return l=n(13,h,u,_),l.elementType=wo,l.lanes=T,l;case wl:return l=n(19,h,u,_),l.elementType=wl,l.lanes=T,l;case yr:return Bo(h,_,T,u);default:if(typeof l=="object"&&l!==null)switch(l.$$typeof){case Dd:case xi:N=10;break t;case Bl:N=9;break t;case fu:N=11;break t;case pr:N=14;break t;case Ia:N=16,y=null;break t}N=29,h=Error(o(130,l===null?"null":typeof l,"")),y=null}return u=n(N,h,u,_),u.elementType=l,u.type=y,u.lanes=T,u}function Ji(l,u,h,y){return l=n(7,l,y,u),l.lanes=h,l}function Bo(l,u,h,y){l=n(22,l,y,u),l.elementType=yr,l.lanes=h;var _={_visibility:1,_pendingVisibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null,_current:null,detach:function(){var T=_._current;if(T===null)throw Error(o(456));if((_._pendingVisibility&2)===0){var N=Za(T,2);N!==null&&(_._pendingVisibility|=2,Cn(N,T,2))}},attach:function(){var T=_._current;if(T===null)throw Error(o(456));if((_._pendingVisibility&2)!==0){var N=Za(T,2);N!==null&&(_._pendingVisibility&=-3,Cn(N,T,2))}}};return l.stateNode=_,l}function Ul(l,u,h){return l=n(6,l,null,u),l.lanes=h,l}function ou(l,u,h){return u=n(4,l.children!==null?l.children:[],l.key,u),u.lanes=h,u.stateNode={containerInfo:l.containerInfo,pendingChildren:null,implementation:l.implementation},u}function gs(l,u,h,y,_,T,N,q){this.tag=1,this.containerInfo=l,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=Ss,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=ht(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.finishedLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=ht(0),this.hiddenUpdates=ht(null),this.identifierPrefix=y,this.onUncaughtError=_,this.onCaughtError=T,this.onRecoverableError=N,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=q,this.incompleteTransitions=new Map}function hn(l,u,h,y,_,T,N,q,P,ut,gt,St){return l=new gs(l,u,h,N,q,P,ut,St),u=1,T===!0&&(u|=24),T=n(3,null,null,u),l.current=T,T.stateNode=l,u=xo(),u.refCount++,l.pooledCache=u,u.refCount++,T.memoizedState={element:y,isDehydrated:h,cache:u},Bc(T),l}function mr(l){return l?(l=Ts,l):Ts}function pf(l){var u=l._reactInternals;if(u===void 0)throw typeof l.render=="function"?Error(o(188)):(l=Object.keys(l).join(","),Error(o(268,l)));return l=E(u),l=l!==null?R(l):null,l===null?null:hu(l.stateNode)}function Rd(l,u,h,y,_,T){_=mr(_),y.context===null?y.context=_:y.pendingContext=_,y=Ua(u),y.payload={element:h},T=T===void 0?null:T,T!==null&&(y.callback=T),h=Je(l,y,u),h!==null&&(Cn(h,l,u),Ba(h,l,u))}function zd(l,u){if(l=l.memoizedState,l!==null&&l.dehydrated!==null){var h=l.retryLane;l.retryLane=h!==0&&h<u?h:u}}function yf(l,u){zd(l,u),(l=l.alternate)&&zd(l,u)}var Mt={},gf=lp(),yn=lM(),vs=Object.assign,vf=Symbol.for("react.element"),Pi=Symbol.for("react.transitional.element"),Fa=Symbol.for("react.portal"),cu=Symbol.for("react.fragment"),xf=Symbol.for("react.strict_mode"),_f=Symbol.for("react.profiler"),Dd=Symbol.for("react.provider"),Bl=Symbol.for("react.consumer"),xi=Symbol.for("react.context"),fu=Symbol.for("react.forward_ref"),wo=Symbol.for("react.suspense"),wl=Symbol.for("react.suspense_list"),pr=Symbol.for("react.memo"),Ia=Symbol.for("react.lazy"),yr=Symbol.for("react.offscreen"),Od=Symbol.for("react.memo_cache_sentinel"),Sf=Symbol.iterator,xs=Symbol.for("react.client.reference"),Nt=gf.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,Ho,bf,Hl=!1,Gl=Array.isArray,Go=t.rendererVersion,gr=t.rendererPackageName,vr=t.extraDevToolsConfig,hu=t.getPublicInstance,_s=t.getRootHostContext,Nd=t.getChildHostContext,jl=t.prepareForCommit,Tf=t.resetAfterCommit,Ef=t.createInstance,_i=t.appendInitialChild,Wi=t.finalizeInitialChildren,ql=t.shouldSetTextContent,jo=t.createTextInstance,Cf=t.scheduleTimeout,xr=t.cancelTimeout,Ss=t.noTimeout,Si=t.isPrimaryRenderer;t.warnsIfNotActing;var gn=t.supportsMutation,ma=t.supportsPersistence,jn=t.supportsHydration,Af=t.getInstanceFromNode;t.beforeActiveInstanceBlur,t.afterActiveInstanceBlur;var Mf=t.preparePortalMount;t.prepareScopeUpdate,t.getInstanceFromScope;var Mn=t.setCurrentUpdatePriority,an=t.getCurrentUpdatePriority,Ha=t.resolveUpdatePriority;t.resolveEventType,t.resolveEventTimeStamp;var Yl=t.shouldAttemptEagerTransition,Rf=t.detachDeletedInstance;t.requestPostPaintCallback;var Ud=t.maySuspendCommit,Fi=t.preloadInstance,pa=t.startSuspendingCommit,Ue=t.suspendInstance,qo=t.waitForCommitToBeReady,Wn=t.NotPendingTransition,wt=t.HostTransitionContext,ge=t.resetFormInstance;t.bindToConsole;var We=t.supportsMicrotasks,Yo=t.scheduleMicrotask,bi=t.supportsTestSelectors,bs=t.findFiberRoot,Lo=t.getBoundingRect,_r=t.getTextContent,Ti=t.isHiddenSubtree,xp=t.matchAccessibilityRole,Be=t.setFocusIfFocusable,zf=t.setupIntersectionObserver,Df=t.appendChild,Bd=t.appendChildToContainer,wd=t.commitTextUpdate,_p=t.commitMount,Of=t.commitUpdate,Nf=t.insertBefore,Uf=t.insertInContainerBefore,qn=t.removeChild,Ye=t.removeChildFromContainer,Sr=t.resetTextContent,br=t.hideInstance,Xo=t.hideTextInstance,Bf=t.unhideInstance,Ii=t.unhideTextInstance,Vo=t.clearContainer,wf=t.cloneInstance,Qo=t.createContainerChildSet,Hf=t.appendChildToContainerChildSet,Hd=t.finalizeContainerChildren,Gf=t.replaceContainerChildren,jf=t.cloneHiddenInstance,qf=t.cloneHiddenTextInstance,Zo=t.isSuspenseInstancePending,Tr=t.isSuspenseInstanceFallback,Gd=t.getSuspenseInstanceFallbackErrorDetails,Sp=t.registerSuspenseInstanceRetry,jd=t.canHydrateFormStateMarker,qd=t.isFormStateMarkerMatching,Yf=t.getNextHydratableSibling,Ko=t.getFirstHydratableChild,Yd=t.getFirstHydratableChildWithinContainer,Ld=t.getFirstHydratableChildWithinSuspenseInstance,Xd=t.canHydrateInstance,Vd=t.canHydrateTextInstance,Qd=t.canHydrateSuspenseInstance,bp=t.hydrateInstance,Zd=t.hydrateTextInstance,du=t.hydrateSuspenseInstance,Kd=t.getNextHydratableInstanceAfterSuspenseInstance,ko=t.commitHydratedContainer,Jo=t.commitHydratedSuspenseInstance,kd=t.clearSuspenseBoundary,Lf=t.clearSuspenseBoundaryFromContainer,Jd=t.shouldDeleteUnhydratedTailInstances;t.diffHydratedPropsForDevWarnings,t.diffHydratedTextForDevWarnings,t.describeHydratableInstanceForDevWarnings;var Pd=t.validateHydratableInstance,Wd=t.validateHydratableTextInstance,ya=t.supportsResources,Xf=t.isHostHoistableType,Po=t.getHoistableRoot,Wo=t.getResource,Vf=t.acquireResource,Qf=t.releaseResource,Zf=t.hydrateHoistable,Kf=t.mountHoistable,kf=t.unmountHoistable,Tp=t.createHoistableInstance,Jf=t.prepareToCommitHoistables,Fd=t.mayResourceSuspendCommit,Pf=t.preloadResource,Wf=t.suspendResource,vn=t.supportsSingletons,Ff=t.resolveSingletonInstance,Ep=t.clearSingleton,Cp=t.acquireSingletonInstance,Id=t.releaseSingletonInstance,mu=t.isHostSingletonType,Er=[],$i=-1,Ts={},Fn=Math.clz32?Math.clz32:B,Cr=Math.log,$d=Math.LN2,pu=128,Ar=4194304,yu=yn.unstable_scheduleCallback,Mr=yn.unstable_cancelCallback,tm=yn.unstable_shouldYield,em=yn.unstable_requestPaint,xn=yn.unstable_now,If=yn.unstable_ImmediatePriority,nm=yn.unstable_UserBlockingPriority,Fo=yn.unstable_NormalPriority,Io=yn.unstable_IdlePriority,am=yn.log,$f=yn.unstable_setDisableYieldValue,gu=null,In=null,ga=typeof Object.is=="function"?Object.is:at,$o=new WeakMap,Re=[],we=0,Rr=null,zr=0,va=[],xa=0,$a=null,Ei=1,Ga="",dn=M(null),Dr=M(null),ti=M(null),vu=M(null),Rn=null,_n=null,ae=!1,_a=null,ja=!1,Or=Error(o(519)),Sa=[],Ll=0,xu=0,_u=null,Es=null,Nr=!1,Ur=!1,ei=!1,Xl=0,Br=null,tc=0,$n=0,Vl=null,tl=!1,Su=!1,wr=Object.prototype.hasOwnProperty,ye=Error(o(460)),th=Error(o(474)),ec={then:function(){}},Cs=null,Ci=null,qa=0,Ql=$h(!0),eh=$h(!1),Ai=M(null),ba=M(0),Ta=M(null),Ya=null,Fe=M(0),Mi=0,Xt=null,oe=null,Le=null,La=!1,ze=!1,el=!1,Hr=0,He=0,bu=null,im=0,nc=function(){return{lastEffect:null,events:null,stores:null,memoCache:null}},ie={readContext:pn,use:ji,useCallback:Jt,useContext:Jt,useEffect:Jt,useImperativeHandle:Jt,useLayoutEffect:Jt,useInsertionEffect:Jt,useMemo:Jt,useReducer:Jt,useRef:Jt,useState:Jt,useDebugValue:Jt,useDeferredValue:Jt,useTransition:Jt,useSyncExternalStore:Jt,useId:Jt};ie.useCacheRefresh=Jt,ie.useMemoCache=Jt,ie.useHostTransitionStatus=Jt,ie.useFormState=Jt,ie.useActionState=Jt,ie.useOptimistic=Jt;var Ie={readContext:pn,use:ji,useCallback:function(l,u){return nn().memoizedState=[l,u===void 0?null:u],l},useContext:pn,useEffect:Xc,useImperativeHandle:function(l,u,h){h=h!=null?h.concat([l]):null,ro(4194308,4,Wu.bind(null,u,l),h)},useLayoutEffect:function(l,u){return ro(4194308,4,l,u)},useInsertionEffect:function(l,u){ro(4,2,l,u)},useMemo:function(l,u){var h=nn();u=u===void 0?null:u;var y=l();if(el){H(!0);try{l()}finally{H(!1)}}return h.memoizedState=[y,u],y},useReducer:function(l,u,h){var y=nn();if(h!==void 0){var _=h(u);if(el){H(!0);try{h(u)}finally{H(!1)}}}else _=u;return y.memoizedState=y.baseState=_,l={pending:null,lanes:0,dispatch:null,lastRenderedReducer:l,lastRenderedState:_},y.queue=l,l=l.dispatch=vl.bind(null,Xt,l),[y.memoizedState,l]},useRef:function(l){var u=nn();return l={current:l},u.memoizedState=l},useState:function(l){l=ka(l);var u=l.queue,h=ho.bind(null,Xt,u);return u.dispatch=h,[l.memoizedState,h]},useDebugValue:Fu,useDeferredValue:function(l,u){var h=nn();return gl(h,l,u)},useTransition:function(){var l=ka(!1);return l=co.bind(null,Xt,l.queue,!0,!1),nn().memoizedState=l,[!1,l]},useSyncExternalStore:function(l,u,h){var y=Xt,_=nn();if(ae){if(h===void 0)throw Error(o(407));h=h()}else{if(h=u(),Kt===null)throw Error(o(349));(Qt&60)!==0||Gc(y,u,h)}_.memoizedState=h;var T={value:h,getSnapshot:u};return _.queue=T,Xc(nd.bind(null,y,T,l),[l]),y.flags|=2048,is(9,jc.bind(null,y,T,h,u),{destroy:void 0},null),h},useId:function(){var l=nn(),u=Kt.identifierPrefix;if(ae){var h=Ga,y=Ei;h=(y&~(1<<32-Fn(y)-1)).toString(32)+h,u=":"+u+"R"+h,h=Hr++,0<h&&(u+="H"+h.toString(32)),u+=":"}else h=im++,u=":"+u+"r"+h.toString(32)+":";return l.memoizedState=u},useCacheRefresh:function(){return nn().memoizedState=Iu.bind(null,Xt)}};Ie.useMemoCache=Pe,Ie.useHostTransitionStatus=us,Ie.useFormState=so,Ie.useActionState=so,Ie.useOptimistic=function(l){var u=nn();u.memoizedState=u.baseState=l;var h={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return u.queue=h,u=mo.bind(null,Xt,!0,h),h.dispatch=u,[l,u]};var zn={readContext:pn,use:ji,useCallback:oo,useContext:pn,useEffect:Pu,useImperativeHandle:hi,useInsertionEffect:sd,useLayoutEffect:ud,useMemo:ss,useReducer:Zu,useRef:ls,useState:function(){return Zu(fi)},useDebugValue:Fu,useDeferredValue:function(l,u){var h=Ce();return Vc(h,oe.memoizedState,l,u)},useTransition:function(){var l=Zu(fi)[0],u=Ce().memoizedState;return[typeof l=="boolean"?l:Gi(l),u]},useSyncExternalStore:ed,useId:di};zn.useCacheRefresh=fo,zn.useMemoCache=Pe,zn.useHostTransitionStatus=us,zn.useFormState=Yc,zn.useActionState=Yc,zn.useOptimistic=function(l,u){var h=Ce();return oa(h,oe,l,u)};var Zl={readContext:pn,use:ji,useCallback:oo,useContext:pn,useEffect:Pu,useImperativeHandle:hi,useInsertionEffect:sd,useLayoutEffect:ud,useMemo:ss,useReducer:yl,useRef:ls,useState:function(){return yl(fi)},useDebugValue:Fu,useDeferredValue:function(l,u){var h=Ce();return oe===null?gl(h,l,u):Vc(h,oe.memoizedState,l,u)},useTransition:function(){var l=yl(fi)[0],u=Ce().memoizedState;return[typeof l=="boolean"?l:Gi(l),u]},useSyncExternalStore:ed,useId:di};Zl.useCacheRefresh=fo,Zl.useMemoCache=Pe,Zl.useHostTransitionStatus=us,Zl.useFormState=Lc,Zl.useActionState=Lc,Zl.useOptimistic=function(l,u){var h=Ce();return oe!==null?oa(h,oe,l,u):(h.baseState=l,[l,h.queue.dispatch])};var ac={isMounted:function(l){return(l=l._reactInternals)?b(l)===l:!1},enqueueSetState:function(l,u,h){l=l._reactInternals;var y=Gn(),_=Ua(y);_.payload=u,h!=null&&(_.callback=h),u=Je(l,_,y),u!==null&&(Cn(u,l,y),Ba(u,l,y))},enqueueReplaceState:function(l,u,h){l=l._reactInternals;var y=Gn(),_=Ua(y);_.tag=1,_.payload=u,h!=null&&(_.callback=h),u=Je(l,_,y),u!==null&&(Cn(u,l,y),Ba(u,l,y))},enqueueForceUpdate:function(l,u){l=l._reactInternals;var h=Gn(),y=Ua(h);y.tag=2,u!=null&&(y.callback=u),u=Je(l,y,h),u!==null&&(Cn(u,l,h),Ba(u,l,h))}},nh=typeof reportError=="function"?reportError:function(l){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var u=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof l=="object"&&l!==null&&typeof l.message=="string"?String(l.message):String(l),error:l});if(!window.dispatchEvent(u))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",l);return}console.error(l)},lm=Error(o(461)),Xe=!1,Dn={dehydrated:null,treeContext:null,retryLane:0},ta=M(null),Kl=null,Ge=null,sm=typeof AbortController<"u"?AbortController:function(){var l=[],u=this.signal={aborted:!1,addEventListener:function(h,y){l.push(y)}};this.abort=function(){u.aborted=!0,l.forEach(function(h){return h()})}},nl=yn.unstable_scheduleCallback,As=yn.unstable_NormalPriority,fe={$$typeof:xi,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0},ic=Nt.S;Nt.S=function(l,u){typeof u=="object"&&u!==null&&typeof u.then=="function"&&Ir(l,u),ic!==null&&ic(l,u)};var al=M(null),ln=!1,Oe=!1,kl=!1,Tu=typeof WeakSet=="function"?WeakSet:Set,je=null,Ms=!1,Ve=null,ea=!1,Yn=null,Rs=8192,lc={getCacheForType:function(l){var u=pn(fe),h=u.data.get(l);return h===void 0&&(h=l(),u.data.set(l,h)),h}},Gr=0,sc=1,uc=2,$t=3,he=4;if(typeof Symbol=="function"&&Symbol.for){var Vt=Symbol.for;Gr=Vt("selector.component"),sc=Vt("selector.has_pseudo_class"),uc=Vt("selector.role"),$t=Vt("selector.test_id"),he=Vt("selector.text")}var Wt=typeof WeakMap=="function"?WeakMap:Map,Rt=0,Kt=null,Yt=null,Qt=0,ve=0,Qe=null,de=!1,Ea=!1,il=!1,ni=0,te=0,Ca=0,ai=0,On=0,na=0,ll=0,Eu=null,Aa=null,Cu=!1,Ri=0,Ne=1/0,ii=null,Ma=null,Xa=!1,sl=null,zs=0,rc=0,Ds=null,Os=0,Ln=null;return Mt.attemptContinuousHydration=function(l){if(l.tag===13){var u=Za(l,67108864);u!==null&&Cn(u,l,67108864),yf(l,67108864)}},Mt.attemptHydrationAtCurrentPriority=function(l){if(l.tag===13){var u=Gn(),h=Za(l,u);h!==null&&Cn(h,l,u),yf(l,u)}},Mt.attemptSynchronousHydration=function(l){switch(l.tag){case 3:if(l=l.stateNode,l.current.memoizedState.isDehydrated){var u=G(l.pendingLanes);if(u!==0){for(l.pendingLanes|=2,l.entangledLanes|=2;u;){var h=1<<31-Fn(u);l.entanglements[1]|=h,u&=~h}Na(l),(Rt&6)===0&&(Ne=xn()+500,ml(0))}}break;case 13:u=Za(l,2),u!==null&&Cn(u,l,2),ff(),yf(l,2)}},Mt.batchedUpdates=function(l,u){return l(u)},Mt.createComponentSelector=function(l){return{$$typeof:Gr,value:l}},Mt.createContainer=function(l,u,h,y,_,T,N,q,P,ut){return hn(l,u,!1,null,h,y,T,N,q,P,ut,null)},Mt.createHasPseudoClassSelector=function(l){return{$$typeof:sc,value:l}},Mt.createHydrationContainer=function(l,u,h,y,_,T,N,q,P,ut,gt,St,bt){return l=hn(h,y,!0,l,_,T,q,P,ut,gt,St,bt),l.context=mr(null),h=l.current,y=Gn(),_=Ua(y),_.callback=u??null,Je(h,_,y),l.current.lanes=y,dt(l,y),Na(l),l},Mt.createPortal=function(l,u,h){var y=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:Fa,key:y==null?null:""+y,children:l,containerInfo:u,implementation:h}},Mt.createRoleSelector=function(l){return{$$typeof:uc,value:l}},Mt.createTestNameSelector=function(l){return{$$typeof:$t,value:l}},Mt.createTextSelector=function(l){return{$$typeof:he,value:l}},Mt.defaultOnCaughtError=function(l){console.error(l)},Mt.defaultOnRecoverableError=function(l){nh(l)},Mt.defaultOnUncaughtError=function(l){nh(l)},Mt.deferredUpdates=function(l){var u=Nt.T,h=an();try{return Mn(32),Nt.T=null,l()}finally{Mn(h),Nt.T=u}},Mt.discreteUpdates=function(l,u,h,y,_){var T=Nt.T,N=an();try{return Mn(2),Nt.T=null,l(u,h,y,_)}finally{Mn(N),Nt.T=T,Rt===0&&(Ne=xn()+500)}},Mt.findAllNodes=Hn,Mt.findBoundingRects=function(l,u){if(!bi)throw Error(o(363));u=Hn(l,u),l=[];for(var h=0;h<u.length;h++)l.push(Lo(u[h]));for(u=l.length-1;0<u;u--){h=l[u];for(var y=h.x,_=y+h.width,T=h.y,N=T+h.height,q=u-1;0<=q;q--)if(u!==q){var P=l[q],ut=P.x,gt=ut+P.width,St=P.y,bt=St+P.height;if(y>=ut&&T>=St&&_<=gt&&N<=bt){l.splice(u,1);break}else if(y!==ut||h.width!==P.width||bt<T||St>N){if(!(T!==St||h.height!==P.height||gt<y||ut>_)){ut>y&&(P.width+=ut-y,P.x=y),gt<_&&(P.width=_-ut),l.splice(u,1);break}}else{St>T&&(P.height+=St-T,P.y=T),bt<N&&(P.height=N-St),l.splice(u,1);break}}}return l},Mt.findHostInstance=pf,Mt.findHostInstanceWithNoPortals=function(l){return l=E(l),l=l!==null?D(l):null,l===null?null:hu(l.stateNode)},Mt.findHostInstanceWithWarning=function(l){return pf(l)},Mt.flushPassiveEffects=fn,Mt.flushSyncFromReconciler=function(l){var u=Rt;Rt|=1;var h=Nt.T,y=an();try{if(Mn(2),Nt.T=null,l)return l()}finally{Mn(y),Nt.T=h,Rt=u,(Rt&6)===0&&ml(0)}},Mt.flushSyncWork=ff,Mt.focusWithin=function(l,u){if(!bi)throw Error(o(363));for(l=zo(l),u=Cd(l,u),u=Array.from(u),l=0;l<u.length;){var h=u[l++],y=h.tag;if(!Ti(h)){if((y===5||y===26||y===27)&&Be(h.stateNode))return!0;for(h=h.child;h!==null;)u.push(h),h=h.sibling}}return!1},Mt.getFindAllNodesFailureDescription=function(l,u){if(!bi)throw Error(o(363));var h=0,y=[];l=[zo(l),0];for(var _=0;_<l.length;){var T=l[_++],N=T.tag,q=l[_++],P=u[q];if((N!==5&&N!==26&&N!==27||!Ti(T))&&(uu(T,P)&&(y.push(Ol(P)),q++,q>h&&(h=q)),q<u.length))for(T=T.child;T!==null;)l.push(T,q),T=T.sibling}if(h<u.length){for(l=[];h<u.length;h++)l.push(Ol(u[h]));return`findAllNodes was able to match part of the selector:
341
+ `+(y.join(" > ")+`
342
+
343
+ No matching component was found for:
344
+ `)+l.join(" > ")}return null},Mt.getPublicRootInstance=function(l){if(l=l.current,!l.child)return null;switch(l.child.tag){case 27:case 5:return hu(l.child.stateNode);default:return l.child.stateNode}},Mt.injectIntoDevTools=function(){var l={bundleType:0,version:Go,rendererPackageName:gr,currentDispatcherRef:Nt,findFiberByHostInstance:Af,reconcilerVersion:"19.0.0"};if(vr!==null&&(l.rendererConfig=vr),typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u")l=!1;else{var u=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(u.isDisabled||!u.supportsFiber)l=!0;else{try{gu=u.inject(l),In=u}catch{}l=!!u.checkDCE}}return l},Mt.isAlreadyRendering=function(){return!1},Mt.observeVisibleRects=function(l,u,h,y){if(!bi)throw Error(o(363));l=Hn(l,u);var _=zf(l,h,y).disconnect;return{disconnect:function(){_()}}},Mt.shouldError=function(){return null},Mt.shouldSuspend=function(){return!1},Mt.startHostTransition=function(l,u,h,y){if(l.tag!==5)throw Error(o(476));var _=Qc(l).queue;co(l,_,u,Wn,h===null?s:function(){var T=Qc(l).next.queue;return xl(l,T,{},Gn()),h(y)})},Mt.updateContainer=function(l,u,h,y){var _=u.current,T=Gn();return Rd(_,T,l,u,h,y),T},Mt.updateContainerSync=function(l,u,h,y){return u.tag===0&&fn(),Rd(u.current,2,l,u,h,y),2},Mt},i.exports.default=i.exports,Object.defineProperty(i.exports,"__esModule",{value:!0})})(qy)),qy.exports}var U1;function uM(){return U1||(U1=1,jy.exports=sM()),jy.exports}var rM=uM();const oM=ip(rM),cM=oM;function fM(i,t,n,s){throw new Error("Text instances are not yet supported. Please use a `<text>` component.")}function hM(){}function dM(){return!1}const Q_={};function mM(i){return i??Q_}function pM(){return Gu.currentUpdatePriority}function yM(){return null}function gM(i){throw new Error("Not yet implemented.")}function vM(i){return i}function xM(){return Q_}function _M(i){i instanceof ua?i.visible=!1:i instanceof Wr&&(i.enabled=!1)}function SM(i){throw new Error("Text instances are not yet supported. Please use a `<text>` component.")}function Z_(i){if(i instanceof Wr){const t=i.__pixireact.parent;if(t){const n=t.__pixireact.filters.indexOf(i);t.__pixireact.filters.splice(n,1),t.filters=t.__pixireact.filters}i.__pixireact.parent=null}}function K_(i,t,...n){}function B1(i,t,n){if(K_(),t instanceof ua){const s=t,o=t,f=n;s.parent===i&&i.removeChild(o);const d=i.getChildIndex(f);i.addChildAt(o,d)}else if(t instanceof Wr){const f=t.__pixireact.filters.indexOf(n);Z_(t),j_(i,t,f)}}function bM(){return!1}function TM(){return!0}function EM(){return null}function CM(){}function AM(){}function w1(i,t){t instanceof Wr&&Z_(t),t.destroy()}function MM(i){}function RM(){}function zM(){}function DM(){return-1.1}function OM(){return null}function NM(){var n;if(Gu.currentUpdatePriority)return Gu.currentUpdatePriority;const i=typeof self<"u"&&self||typeof window<"u"&&window;if(!i)return Ec.DefaultEventPriority;switch((n=i.event)==null?void 0:n.type){case"click":case"contextmenu":case"dblclick":case"pointercancel":case"pointerdown":case"pointerup":return Ec.DiscreteEventPriority;case"pointermove":case"pointerout":case"pointerover":case"pointerenter":case"pointerleave":case"wheel":return Ec.ContinuousEventPriority;default:return Ec.DefaultEventPriority}}function UM(i){Gu.currentUpdatePriority=i}function BM(){return!1}function wM(){return!1}function HM(){}function GM(){}function jM(){}function qM(i){i instanceof ua?i.visible=!0:i instanceof Wr&&(i.enabled=!0)}function YM(i){throw new Error("Text instances are not yet supported. Please use a `<text>` component.")}function LM(){return null}const XM={isPrimaryRenderer:!1,noTimeout:-1,NotPendingTransition:null,supportsHydration:!1,supportsMutation:!0,supportsPersistence:!1,warnsIfNotActing:!1,afterActiveInstanceBlur:q3,appendChild:Gy,appendChildToContainer:Gy,appendInitialChild:Gy,beforeActiveInstanceBlur:Y3,cancelTimeout:clearTimeout,clearContainer:L3,commitUpdate:I3,createInstance:aM,createTextInstance:fM,hideTextInstance:SM,unhideTextInstance:YM,detachDeletedInstance:hM,finalizeInitialChildren:dM,getChildHostContext:mM,getCurrentUpdatePriority:pM,getInstanceFromNode:yM,getInstanceFromScope:gM,getPublicInstance:vM,getRootHostContext:xM,hideInstance:_M,insertBefore:B1,insertInContainerBefore:B1,maySuspendCommit:bM,preloadInstance:TM,prepareForCommit:EM,preparePortalMount:CM,prepareScopeUpdate:AM,removeChild:w1,removeChildFromContainer:w1,requestPostPaintCallback:MM,resetAfterCommit:RM,resetFormInstance:zM,resolveEventTimeStamp:DM,resolveEventType:OM,resolveUpdatePriority:NM,scheduleTimeout:setTimeout,shouldAttemptEagerTransition:BM,setCurrentUpdatePriority:UM,shouldSetTextContent:wM,startSuspendingCommit:HM,suspendInstance:GM,trackSchedulerEvent:jM,unhideInstance:qM,waitForCommitToBeReady:LM,rendererPackageName:"@pixi/react",rendererVersion:j3.version},ap=cM(XM);ap.injectIntoDevTools();const Dc=new Map;function VM(i,t={}){let n=Dc.get(i),s=(n==null?void 0:n.applicationState)??{isInitialised:!1,isInitialising:!1};const o=(n==null?void 0:n.internalState)??{};n||(s.app=new Ng,o.rootContainer=G_(s.app.stage));const f=(n==null?void 0:n.fiber)??ap.createContainer(o.rootContainer,Ec.ConcurrentRoot,null,!1,null,"",console.error,console.error,console.error,null);if(!n){let d;i instanceof HTMLCanvasElement&&(d=i),d||(d=document.createElement("canvas"),i.innerHTML="",i.appendChild(d)),o.canvas=d,n={applicationState:s,fiber:f,internalState:o,render:async(g,v)=>{var S;return!s.app.renderer&&!s.isInitialised&&!s.isInitialising&&(s.isInitialising=!0,await s.app.init({...v,canvas:d}),s.isInitialising=!1,s.isInitialised=!0,s={...s},(S=t.onInit)==null||S.call(t,s.app)),Object.entries(v).forEach(([b,A])=>{const E=b;H_(v,E)||(s.app[E]=A)}),ap.updateContainer(L.jsx(H3,{value:s,children:g}),f,null,()=>{}),s.app}},Dc.set(d,n)}return n}function k_(i){Gu.unmountQueue.delete(i);const t=i.fiber;t&&ap.updateContainer(null,t,null,()=>{i.applicationState.app&&i.applicationState.app.destroy(),Dc.delete(i.internalState.canvas)})}function QM(){for(const i of Gu.unmountQueue)k_(i)}function ZM(i){const t=Dc.get(i);t&&(t.applicationState.isInitialised?k_(t):Gu.unmountQueue.add(t))}function KM(i){const t=Dc.get(i);t&&Gu.unmountQueue.delete(t)}var j1,q1;const Xm=typeof window<"u"&&((j1=window.document)!=null&&j1.createElement||((q1=window.navigator)==null?void 0:q1.product)==="ReactNative")?X.useLayoutEffect:X.useEffect,kM={...Pr.defaultTextStyle},JM=X.forwardRef(function(t,n){const{children:s,className:o,defaultTextStyle:f,extensions:d,onInit:m,resizeTo:g,...v}=t,S=nT(),b=X.useRef(null),A=X.useRef(null),E=X.useRef(new Set);X.useImperativeHandle(n,()=>({getApplication(){return b.current},getCanvas(){return A.current}}));const R=X.useCallback(()=>{const M=b.current;M&&(g?"current"in g?g.current instanceof HTMLElement&&(M.resizeTo=g.current):M.resizeTo=g:M.resizeTo=void 0)},[g]),D=X.useCallback(M=>{QM(),b.current=M,R(),m==null||m(M)},[m]);return Xm(()=>{if(d){const M=[...d],O=E.current;for(const U of O.values()){const B=M.indexOf(U);B===-1&&(ke.remove(U),O.delete(U)),M.splice(B,1)}for(const U of M)ke.add(U),O.add(U)}},[d]),Xm(()=>{const M=A.current;if(M){let O=Dc.get(M);O||(O=VM(M,{onInit:D})),O.render(L.jsx(S,{children:s}),v)}},[v,s,D,g]),Xm(()=>{R()},[g]),Xm(()=>{f?Object.assign(Pr.defaultTextStyle,f):Object.assign(Pr.defaultTextStyle,kM)},[f]),X.useEffect(()=>{const M=A.current;if(M)return KM(M),()=>{ZM(M)}},[]),L.jsx("canvas",{ref:A,className:o})}),PM=X.forwardRef(function(t,n){return L.jsx(rx,{children:L.jsx(JM,{ref:n,...t})})});function Qg(i){Object.assign(gg,i)}function WM(){const i=X.useContext(Vg);return K_(i.app instanceof Ng,"No Context found with `%s`. Make sure to wrap component with `%s`","Application","AppProvider"),i}const FM={idle:"#888",running:"#4caf50",completed:"#4caf50",checkpoint:"#ff9800"};function IM({rooms:i,activeRoom:t,statuses:n,onSelectRoom:s}){return L.jsxs("div",{style:{padding:"8px"},children:[L.jsx("div",{style:{color:"#888",fontSize:"0.7rem",textTransform:"uppercase",marginBottom:"8px",padding:"0 12px"},children:"Rooms"}),i.length===0&&L.jsx("div",{style:{padding:"8px 12px",color:"#666",fontSize:"0.8rem"},children:"No active squads"}),i.map(o=>{const f=n[o]||"idle",d=FM[f],m=o===t;return L.jsxs("div",{"data-testid":"room-item",onClick:()=>s(o),style:{padding:"8px 12px",cursor:"pointer",borderRadius:"4px",background:m?"#1a3a5c":"transparent",borderLeft:m?"2px solid #4caf50":"2px solid transparent",marginBottom:"4px",display:"flex",alignItems:"center",gap:"8px"},children:[L.jsx("div",{"data-testid":"status-dot",style:{width:"8px",height:"8px",borderRadius:"50%",backgroundColor:d,flexShrink:0}}),L.jsx("div",{style:{fontSize:"0.875rem",color:m?"#e0e0e0":"#aaa"},children:o})]},o)})]})}function $M({entries:i}){const t=n=>new Date(n).toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"});return i.length===0?L.jsx("div",{style:{width:"220px",height:"100%",background:"#0f0f0f",borderLeft:"1px solid #1a1a2e",padding:"16px",boxSizing:"border-box",display:"flex",alignItems:"center",justifyContent:"center",color:"#666",fontSize:"0.9rem"},children:"No activity yet"}):L.jsxs("div",{style:{width:"220px",height:"100%",background:"#0f0f0f",borderLeft:"1px solid #1a1a2e",padding:"16px",boxSizing:"border-box",overflowY:"auto"},children:[L.jsx("div",{style:{fontSize:"0.75rem",color:"#666",marginBottom:"12px"},children:"Activity Log"}),L.jsx("div",{style:{display:"flex",flexDirection:"column",gap:"8px"},children:i.map(n=>L.jsxs("div",{"data-testid":"activity-entry",style:{fontSize:"0.75rem",color:"#aaa",padding:"8px",background:"#1a1a2e",borderRadius:"4px",borderLeft:"2px solid #4caf50"},children:[L.jsx("div",{style:{color:"#4caf50",marginBottom:"2px"},children:t(n.timestamp)}),L.jsx("div",{style:{fontWeight:"bold",marginBottom:"2px"},children:n.agentName}),L.jsx("div",{style:{color:"#999"},children:n.action})]},n.id))})]})}function t4({agentName:i,question:t,onRespond:n}){const[s,o]=X.useState(""),f=()=>{const m=s.trim();m&&(n(m),o(""))},d=m=>{m.key==="Enter"&&f()};return L.jsx("div",{className:"fixed inset-0 bg-black bg-opacity-50 flex items-center justify-center z-50",children:L.jsxs("div",{className:"bg-white rounded-lg shadow-lg p-6 max-w-md w-full mx-4",children:[L.jsxs("h2",{className:"text-lg font-bold text-orange-500 mb-4",children:["CHECKPOINT — ",i]}),L.jsx("p",{className:"text-gray-700 mb-6",children:t}),L.jsxs("div",{className:"flex gap-2",children:[L.jsx("input",{type:"text",placeholder:"Type your response...",value:s,onChange:m=>o(m.target.value),onKeyPress:d,className:"flex-1 px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-orange-500",autoFocus:!0}),L.jsx("button",{onClick:f,className:"px-4 py-2 bg-orange-500 text-white rounded-md font-semibold hover:bg-orange-600 transition-colors",children:"Send"})]})]})})}function e4(i){const t=new Map;for(let n=0;n<ky.length;n++){const s=ky[n],o=new fl;o.circle(qt/2,qt/2+4,qt/3),o.fill(s),o.circle(qt/2,qt/3,qt/4),o.fill(s),t.set(`agent-${n}-seated`,i.renderer.generateTexture(o));const f=new fl;f.circle(qt/2+2,qt/2+4,qt/3),f.fill(s),f.circle(qt/2+3,qt/3,qt/4),f.fill(s),f.rect(qt/2+6,qt/2+2,8,3),f.fill(s),t.set(`agent-${n}-typing`,i.renderer.generateTexture(f));const d=new fl;d.circle(qt/2,qt/2,qt/3),d.fill(s),d.circle(qt/2,qt/4,qt/4),d.fill(s),d.rect(qt/2+2,qt/2+8,4,10),d.fill(s),d.rect(qt/2-6,qt/2+6,4,8),d.fill(s),t.set(`agent-${n}-walk-right`,i.renderer.generateTexture(d));const m=new fl;m.circle(qt/2,qt/2,qt/3),m.fill(s),m.circle(qt/2,qt/4,qt/4),m.fill(s),m.rect(qt/2-6,qt/2+8,4,10),m.fill(s),m.rect(qt/2+2,qt/2+6,4,8),m.fill(s),t.set(`agent-${n}-walk-left`,i.renderer.generateTexture(m));const g=new fl;g.circle(qt/2,qt/2,qt/3),g.fill(s),g.circle(qt/2,qt/4,qt/4),g.fill(s),g.rect(qt/2+4,qt/2-2,8,3),g.fill(s),g.rect(qt/2+10,qt/2-5,5,6),g.fill(14142664),t.set(`agent-${n}-coffee`,i.renderer.generateTexture(g))}return t}function n4(i,t){const n=i%ky.length;let s;switch(t){case"working":s="typing";break;case"idle":s="seated";break;case"coffee":s="coffee";break;case"walk-right":s="walk-right";break;case"walk-left":s="walk-left";break;case"delivering":s="walk-right";break;case"checkpoint":case"done":default:s="seated";break}return`agent-${n}-${s}`}function a4(i,t,n){i.rect(0,0,t,n),i.fill(la.floor);const s=24;for(let o=0;o<n;o+=s)i.moveTo(0,o),i.lineTo(t,o),i.stroke({width:1,color:la.floorPlank,alpha:.3});i.rect(0,0,t,40),i.fill({color:la.wall,alpha:.15})}function i4(i,t,n){i.roundRect(t,n,Km,ix,4),i.fill(la.desk),i.roundRect(t+2,n+2,Km-4,8,2),i.fill(la.deskTop);const s=28,o=20,f=t+(Km-s)/2,d=n+12;i.roundRect(f,d,s,o,2),i.fill(la.monitor),i.roundRect(f+2,d+2,s-4,o-6,1),i.fill(la.monitorScreen),i.rect(f+s/2-2,d+o,4,6),i.fill(la.monitor)}function l4(i,t,n){i.roundRect(t,n,40,60,2),i.fill(la.bookshelf);for(let s=0;s<3;s++){const o=n+8+s*18;i.rect(t+4,o,32,2),i.fill(la.deskShadow);for(let f=0;f<4;f++){const d=t+5+f*8,m=10+Math.random()*4;i.rect(d,o-m,6,m),i.fill(la.bookColors[f%la.bookColors.length])}}}function H1(i,t,n){i.roundRect(t,n+16,20,16,2),i.fill(la.pot),i.circle(t+10,n+10,10),i.fill(la.plant),i.circle(t+4,n+6,7),i.fill(la.plant),i.circle(t+16,n+6,7),i.fill(la.plant)}function s4(i,t,n){i.roundRect(t,n,64,32,3),i.fill(Mm.counter),i.roundRect(t+4,n-8,24,32,2),i.fill(Mm.machine),i.circle(t+16,n-2,2),i.fill({color:Mm.machineLight,alpha:.8}),i.circle(t+48,n+16,6),i.fill({color:Mm.cup,alpha:.5})}function u4(i,t,n){i.roundRect(t-8,n-12,112,72,4),i.stroke({width:1,color:ry.border,alpha:.3}),i.roundRect(t,n,96,48,4),i.fill(ry.table);const s=12,o=[{cx:t+16,cy:n-8},{cx:t+48,cy:n-8},{cx:t+80,cy:n-8},{cx:t+16,cy:n+52},{cx:t+48,cy:n+52},{cx:t+80,cy:n+52}];for(const f of o)i.roundRect(f.cx-s/2,f.cy-s/2,s,s,2),i.fill(ry.chair)}const r4={running:_c.statusRunning,idle:_c.statusIdle,completed:_c.statusRunning,checkpoint:_c.statusCheckpoint};function o4(i,t,n,s){const o=n*.8,f=t+(n-o)/2;i.roundRect(f,8,o,28,6),i.fill({color:_c.background,alpha:.8});const d=r4[s]??_c.statusIdle;i.circle(f+o-16,22,4),i.fill(d)}Qg({Container:ua,Graphics:fl,Sprite:Rc,Text:w_});function c4({agent:i,textures:t,bubbleText:n,animX:s,animY:o,animPose:f}){const d=n4(i.colorIndex,f),m=t.get(d),g=Q2[i.status==="walking"?"idle":i.status]??8947848,v=i.status==="checkpoint",S=X.useCallback(A=>{A.clear(),A.circle(0,0,qt/2+6),A.fill({color:g,alpha:v?.4:.15})},[g,v]),b=X.useCallback(A=>{if(A.clear(),!n)return;const E=Math.min(n.length*5+16,160);A.roundRect(-E/2,-40,E,28,6),A.fill({color:1710638,alpha:.9})},[n]);return L.jsxs("container",{x:s,y:o,children:[L.jsx("graphics",{draw:S}),m&&L.jsx("sprite",{texture:m,anchor:.5}),L.jsx("text",{text:i.name,y:qt/2+4,anchor:{x:.5,y:0},style:{fontSize:9,fill:"#cccccc",fontFamily:"sans-serif"}}),v&&L.jsx("text",{text:"⚠",y:-qt/2-12,anchor:.5,style:{fontSize:14,fill:"#ff9800",fontFamily:"sans-serif"}}),n&&L.jsxs(L.Fragment,{children:[L.jsx("graphics",{draw:b}),L.jsx("text",{text:n.length>80?n.slice(-80)+"…":n,y:-48,anchor:{x:.5,y:.5},style:{fontSize:8,fill:"#ffffff",fontFamily:"sans-serif",wordWrap:!0,wordWrapWidth:140}})]})]})}Qg({Container:ua,Graphics:fl,Text:w_});function f4({squadName:i,status:t,agents:n,textures:s,bubbles:o,animStates:f,originX:d,originY:m}){const g={x:0,y:0},v=Rh(g),S=lx(g),b=X.useCallback(A=>{A.clear(),a4(A,wu,wh),o4(A,0,wu,t);for(let E=0;E<n.length;E++){const R=Mh(E,g);i4(A,R.x-48,R.y-32)}s4(A,v.x,v.y),u4(A,S.x,S.y),l4(A,wu-60,44),H1(A,10,wh-50),H1(A,wu-40,50)},[n.length,t]);return L.jsxs("container",{x:d,y:m,children:[L.jsx("graphics",{draw:b}),L.jsx("text",{text:i,x:wu/2,y:22,anchor:.5,style:{fontSize:14,fill:"#ffffff",fontFamily:"sans-serif",fontWeight:"bold"}}),n.map(A=>{const E=`${i}:${A.id}`,R=o[E],D=f[A.id];return L.jsx(c4,{agent:A,textures:s,bubbleText:(R==null?void 0:R.text)??null,animX:(D==null?void 0:D.x)??A.position.x,animY:(D==null?void 0:D.y)??A.position.y,animPose:(D==null?void 0:D.pose)??(A.status==="working"?"typing":"seated")},A.id)})]})}const G1=45,h4=48,d4=18,m4=4e3,Vm=180,Xy=600;function p4(i,t,n){const s=Wm(t),o=Math.random();if(o<.3)return{...Mh(i,s),destination:"desk"};if(o<.55){const f=Rh(s);return{x:f.x+(Math.random()-.5)*30,y:f.y+(Math.random()-.5)*20,destination:"coffee"}}else if(o<.75){const f=lx(s);return{x:f.x+(Math.random()-.5)*40,y:f.y+(Math.random()-.5)*30,destination:"meeting"}}else return{x:s.x+60+Math.random()*520,y:s.y+60+Math.random()*360,destination:"wander"}}function y4(i){const[t,n]=X.useState({}),s=X.useRef({}),o=X.useRef({}),f=X.useRef({}),d=X.useRef({}),m=X.useRef(0),g=X.useRef({});X.useEffect(()=>{const S=Ze.subscribe((b,A)=>{var D,M;const E=b.bubbles,R=A.bubbles;for(const O of Object.keys(E))if(((D=E[O])==null?void 0:D.updatedAt)!==((M=R[O])==null?void 0:M.updatedAt)){g.current[O]&&clearTimeout(g.current[O]);const[U,B]=O.split(":");g.current[O]=setTimeout(()=>{Ze.getState().clearBubble(U,B),delete g.current[O]},m4)}});return()=>{S();for(const b of Object.values(g.current))clearTimeout(b);g.current={}}},[]);const v=X.useCallback(()=>{m.current++;const S=m.current,b=Ze.getState(),A={};b.rooms.length;for(const[E,R]of Object.entries(b.agentVisuals)){s.current[E]||(s.current[E]={}),o.current[E]||(o.current[E]={}),A[E]={};const D=b.rooms.indexOf(E);for(const M of R){const O=s.current[E],U=o.current[E],B=`${E}:${M.id}`;U[M.id]||(U[M.id]={x:M.position.x,y:M.position.y,baseY:M.position.y},f.current[B]=Math.floor(Math.random()*Xy));const G=U[M.id];if(M.targetPosition&&(!O[M.id]||O[M.id].progress>=1)&&(O[M.id]={startX:G.x,startY:G.baseY,targetX:M.targetPosition.x,targetY:M.targetPosition.y,progress:0,duration:G1,baseY:M.targetPosition.y}),M.status==="idle"&&(!O[M.id]||O[M.id].progress>=1)&&(f.current[B]===void 0&&(f.current[B]=Vm+Math.floor(Math.random()*(Xy-Vm))),f.current[B]--,f.current[B]<=0)){const V=p4(M.deskIndex,Math.max(0,D));d.current[B]=V.destination,O[M.id]={startX:G.x,startY:G.baseY,targetX:V.x,targetY:V.y,progress:0,duration:G1+Math.floor(Math.random()*30),baseY:V.y},f.current[B]=Vm+Math.floor(Math.random()*(Xy-Vm))}const Z=O[M.id];if(Z&&Z.progress<1){Z.progress=Math.min(1,Z.progress+1/Z.duration);const V=P2(Z.progress);G.x=sv(Z.startX,Z.targetX,V),G.y=sv(Z.startY,Z.targetY,V),G.baseY=Z.baseY;const K=Math.floor(S/d4)%2===0?"walk-right":"walk-left";A[E][M.id]={x:G.x,y:G.y,pose:K}}else if(M.status==="working"){const V=Math.floor(S/h4)%2===0?"typing":"seated";A[E][M.id]={x:G.x,y:G.baseY,pose:V}}else if(M.status==="idle"){const V=d.current[B]??"coffee",K=Math.sin(S*.07+M.deskIndex*1.5)*2;let pt;V==="coffee"?pt="coffee":V==="meeting"?pt=Math.floor(S/60)%2===0?"seated":"coffee":pt="seated",A[E][M.id]={x:G.x,y:G.baseY+K,pose:pt}}else M.status==="checkpoint"?A[E][M.id]={x:G.x,y:G.baseY,pose:"seated"}:A[E][M.id]={x:G.x,y:G.baseY,pose:"seated"}}}n(A)},[]);return X.useEffect(()=>{if(i)return i.add(v),()=>{i.remove(v)}},[i,v]),t}Qg({Container:ua});const g4=.3,v4=2;function x4(){const{app:i}=WM(),t=X.useRef(null),[n,s]=X.useState(new Map),o=X.useRef(null),f=Ze(E=>E.rooms),d=Ze(E=>E.agentVisuals),m=Ze(E=>E.bubbles),g=Ra(E=>E.activeStates),v=y4((i==null?void 0:i.ticker)??null);X.useEffect(()=>{i!=null&&i.renderer&&s(e4(i))},[i]);const S=X.useCallback(E=>{const R=t.current;R&&(o.current={startX:E.globalX,startY:E.globalY,pivotX:R.pivot.x,pivotY:R.pivot.y})},[]),b=X.useCallback(E=>{const R=t.current,D=o.current;if(!R||!D)return;const M=(E.globalX-D.startX)/R.scale.x,O=(E.globalY-D.startY)/R.scale.y;R.pivot.x=D.pivotX-M,R.pivot.y=D.pivotY-O},[]),A=X.useCallback(()=>{o.current=null},[]);return X.useEffect(()=>{const E=i==null?void 0:i.canvas;if(!E)return;const R=D=>{D.preventDefault();const M=t.current;if(!M)return;const O=D.deltaY>0?.9:1.1,U=Math.max(g4,Math.min(v4,M.scale.x*O));M.scale.set(U)};return E.addEventListener("wheel",R,{passive:!1}),()=>E.removeEventListener("wheel",R)},[i]),L.jsx("container",{ref:t,eventMode:"static",onpointerdown:S,onpointermove:b,onpointerup:A,onpointerupoutside:A,children:f.map((E,R)=>{var B;const D=Wm(R,f.length),M=d[E]??[],O=((B=g[E])==null?void 0:B.status)??"idle",U=v[E]??{};return L.jsx(f4,{squadName:E,status:O,agents:M,textures:n,bubbles:m,animStates:U,originX:D.x,originY:D.y},E)})})}function _4(){var S,b;const i=Ra(A=>A.activeStates),t=Ze(A=>A.rooms),n=Ze(A=>A.activeRoom),s=Ze(A=>A.setActiveRoom),o=Ze(A=>A.activityLog),f=Ze(A=>A.checkpoints),d=n?f[n]:void 0,g=(n?((S=o[n])==null?void 0:S.entries)??[]:[]).map(A=>({...A,timestamp:new Date(A.timestamp).toISOString()})),v={};for(const A of t)v[A]=((b=i[A])==null?void 0:b.status)??"idle";return L.jsxs("div",{style:{display:"flex",height:"100%"},children:[L.jsx(IM,{rooms:t,activeRoom:n,statuses:v,onSelectRoom:s}),L.jsxs("div",{style:{flex:1,position:"relative",overflow:"hidden"},children:[L.jsx(PM,{background:2760462,antialias:!0,resizeTo:window,style:{width:"100%",height:"100%"},children:L.jsx(x4,{})}),d&&L.jsx(t4,{agentName:d.agentName,question:d.question,onRespond:A=>V2(n,A)})]}),L.jsx($M,{entries:g})]})}function S4({message:i}){if(i.role==="agent_dm")return L.jsxs("div",{"data-role":"agent_dm",style:{alignSelf:"flex-start",background:"#2a2a3e",border:"1px solid #4a4a6a",borderRadius:12,padding:"8px 14px",maxWidth:"75%",marginBottom:8},children:[L.jsx("div",{style:{fontSize:11,color:"#a0a0d0",fontWeight:600,marginBottom:4},children:i.agentName}),L.jsx("div",{style:{color:"#e0e0e0",fontSize:14,lineHeight:1.5},children:i.content})]});const t=i.role==="user";return L.jsx("div",{"data-role":i.role,style:{alignSelf:t?"flex-end":"flex-start",background:t?"#3b5bdb":"#1e1e2e",borderRadius:12,padding:"8px 14px",maxWidth:"75%",marginBottom:8},children:L.jsx("div",{style:{color:"#e0e0e0",fontSize:14,lineHeight:1.5,whiteSpace:"pre-wrap"},children:i.content})})}function b4(){const[i,t]=X.useState(""),n=X.useRef(null),s=Ra(E=>E.selectedSquad),o=Oi(E=>E.messages),f=Oi(E=>E.streaming),d=Oi(E=>E.streamingText),m=Oi(E=>E.error),g=Oi(E=>E.addUserMessage),v=Oi(E=>E.startStreaming),S=Oi(E=>E.loadHistory);if(X.useEffect(()=>{s&&S(s)},[s,S]),X.useEffect(()=>{var E,R;(R=(E=n.current)==null?void 0:E.scrollIntoView)==null||R.call(E,{behavior:"smooth"})},[o,d]),!s)return L.jsx("div",{style:{display:"flex",alignItems:"center",justifyContent:"center",height:"100%",color:"#888",fontSize:16},children:"Select a squad to start chatting"});const b=()=>{const E=i.trim();!E||f||(g(E),v(),L2(s,E),t(""))},A=E=>{E.key==="Enter"&&!E.shiftKey&&(E.preventDefault(),b())};return L.jsxs("div",{style:{display:"flex",flexDirection:"column",height:"100%",background:"#0f0f1a"},children:[L.jsxs("div",{style:{flex:1,overflowY:"auto",padding:16,display:"flex",flexDirection:"column"},children:[o.map(E=>L.jsx(S4,{message:E},E.id)),f&&d&&L.jsx("div",{"data-role":"assistant",style:{alignSelf:"flex-start",background:"#1e1e2e",borderRadius:12,padding:"8px 14px",maxWidth:"75%",marginBottom:8},children:L.jsx("div",{style:{color:"#e0e0e0",fontSize:14,lineHeight:1.5,whiteSpace:"pre-wrap"},children:d})}),m&&L.jsx("div",{style:{alignSelf:"center",background:"#3a1a1a",border:"1px solid #c53030",borderRadius:8,padding:"8px 14px",color:"#fc8181",fontSize:13,marginBottom:8},children:m}),L.jsx("div",{ref:n})]}),L.jsxs("div",{style:{display:"flex",padding:12,borderTop:"1px solid #2a2a3e",gap:8},children:[L.jsx("input",{type:"text",value:i,onChange:E=>t(E.target.value),onKeyDown:A,placeholder:"Type a message...",disabled:f,style:{flex:1,background:"#1e1e2e",border:"1px solid #2a2a3e",borderRadius:8,padding:"10px 14px",color:"#e0e0e0",fontSize:14,outline:"none"}}),L.jsx("button",{onClick:b,disabled:!i.trim()||f,"aria-label":"Send",style:{background:!i.trim()||f?"#2a2a3e":"#3b5bdb",color:"#fff",border:"none",borderRadius:8,padding:"10px 20px",fontSize:14,cursor:!i.trim()||f?"not-allowed":"pointer",fontWeight:600},children:"Send"})]})]})}const T4={idle:"rgb(107, 114, 128)",working:"rgb(59, 130, 246)",delivering:"rgb(168, 85, 247)",done:"rgb(34, 197, 94)",checkpoint:"rgb(234, 179, 8)"};function E4({agent:i}){return L.jsxs("div",{style:{background:"#1e1e2e",borderRadius:8,padding:"12px 16px",marginBottom:8,border:"1px solid #2a2a3e"},children:[L.jsxs("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",marginBottom:6},children:[L.jsx("span",{style:{fontWeight:600,fontSize:14,color:"#e0e0e0"},children:i.name}),L.jsx("span",{style:{backgroundColor:T4[i.status],color:"#fff",fontSize:11,fontWeight:600,padding:"2px 8px",borderRadius:10,textTransform:"lowercase"},children:i.status})]}),L.jsx("div",{style:{fontSize:12,color:"#9ca3af"},children:i.stepLabel})]})}const C4=[{key:"pending",label:"Pending",color:"rgb(107, 114, 128)",filter:i=>i.status==="idle"},{key:"running",label:"Running",color:"rgb(59, 130, 246)",filter:i=>i.status==="working"||i.status==="checkpoint"||i.status==="delivering"},{key:"done",label:"Done",color:"rgb(34, 197, 94)",filter:i=>i.status==="done"}];function A4(){const i=Ra(o=>o.selectedSquad),t=Ra(o=>o.activeStates),n=i?t[i]:null,s=X.useMemo(()=>n?C4.map(o=>({...o,agents:n.agents.filter(o.filter)})):null,[n]);return i?n?L.jsx("div",{style:{display:"flex",gap:16,padding:20,height:"100%",overflow:"auto"},children:s.map(o=>L.jsxs("div",{"data-testid":`column-${o.key}`,style:{flex:1,background:"#16161e",borderRadius:10,padding:16,display:"flex",flexDirection:"column",minWidth:220},children:[L.jsxs("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",marginBottom:16,paddingBottom:12,borderBottom:`2px solid ${o.color}`},children:[L.jsx("span",{style:{fontWeight:700,fontSize:14,color:"#e0e0e0"},children:o.label}),L.jsx("span",{"data-testid":`count-${o.key}`,style:{background:o.color,color:"#fff",fontSize:11,fontWeight:700,width:22,height:22,borderRadius:"50%",display:"flex",alignItems:"center",justifyContent:"center"},children:o.agents.length})]}),L.jsx("div",{style:{flex:1,overflowY:"auto"},children:o.agents.map(f=>L.jsx(E4,{agent:f},f.id))})]},o.key))}):L.jsx("div",{style:{display:"flex",alignItems:"center",justifyContent:"center",height:"100%",color:"#9ca3af"},children:"No active state for this squad"}):L.jsx("div",{style:{display:"flex",alignItems:"center",justifyContent:"center",height:"100%",color:"#9ca3af"},children:"Select a squad to view the kanban board"})}function M4(){const i=cl(Z=>Z.user),[t,n]=X.useState([]),[s,o]=X.useState(!0),[f,d]=X.useState(""),[m,g]=X.useState(""),[v,S]=X.useState("viewer"),[b,A]=X.useState(null),[E,R]=X.useState(null),D=X.useCallback(async()=>{try{const Z=await fetch("/api/users",{credentials:"include"});if(Z.ok){const V=await Z.json();n(V.users)}}catch{A("Failed to load users")}finally{o(!1)}},[]);X.useEffect(()=>{D()},[D]);const M=async()=>{if(!(!f.trim()||!m.trim())){A(null);try{const Z=await fetch("/api/auth/register",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({username:f,password:m,role:v}),credentials:"include"});if(!Z.ok){const V=await Z.json();A(V.error||"Failed to create user");return}d(""),g(""),S("viewer"),await D()}catch{A("Network error")}}},O=async(Z,V)=>{try{(await fetch(`/api/users/${Z}`,{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({role:V}),credentials:"include"})).ok&&await D()}catch{A("Failed to update role")}},U=async Z=>{try{(await fetch(`/api/users/${Z}`,{method:"DELETE",credentials:"include"})).ok&&(R(null),await D())}catch{A("Failed to delete user")}},B={background:"#1e1e2e",border:"1px solid #2a2a3e",borderRadius:6,padding:"8px 12px",color:"#e0e0e0",fontSize:13,outline:"none"},G={padding:"8px 16px",borderRadius:6,border:"none",fontWeight:600,fontSize:13,cursor:"pointer"};return s?L.jsx("div",{style:{color:"#9ca3af",padding:20},children:"Loading users..."}):L.jsxs("div",{children:[L.jsx("h3",{style:{color:"#e0e0e0",marginBottom:16,fontSize:16,fontWeight:700},children:"User Management"}),b&&L.jsx("div",{style:{background:"#3b1818",color:"#f87171",padding:"8px 12px",borderRadius:6,marginBottom:12,fontSize:13},children:b}),L.jsxs("div",{style:{display:"flex",gap:8,marginBottom:20,flexWrap:"wrap",alignItems:"center"},children:[L.jsx("input",{placeholder:"Username",value:f,onChange:Z=>d(Z.target.value),style:{...B,flex:1,minWidth:120}}),L.jsx("input",{placeholder:"Password",type:"password",value:m,onChange:Z=>g(Z.target.value),style:{...B,flex:1,minWidth:120}}),L.jsxs("select",{value:v,onChange:Z=>S(Z.target.value),style:{...B,minWidth:100},children:[L.jsx("option",{value:"viewer",children:"viewer"}),L.jsx("option",{value:"operator",children:"operator"}),L.jsx("option",{value:"admin",children:"admin"})]}),L.jsx("button",{onClick:M,style:{...G,background:"#3b82f6",color:"#fff"},children:"Create User"})]}),L.jsxs("table",{style:{width:"100%",borderCollapse:"collapse",fontSize:13},children:[L.jsx("thead",{children:L.jsxs("tr",{style:{borderBottom:"1px solid #2a2a3e"},children:[L.jsx("th",{style:{textAlign:"left",padding:"8px 12px",color:"#9ca3af",fontWeight:600},children:"Username"}),L.jsx("th",{style:{textAlign:"left",padding:"8px 12px",color:"#9ca3af",fontWeight:600},children:"Email"}),L.jsx("th",{style:{textAlign:"left",padding:"8px 12px",color:"#9ca3af",fontWeight:600},children:"Role"}),L.jsx("th",{style:{textAlign:"left",padding:"8px 12px",color:"#9ca3af",fontWeight:600},children:"Last Login"}),L.jsx("th",{style:{textAlign:"right",padding:"8px 12px",color:"#9ca3af",fontWeight:600},children:"Actions"})]})}),L.jsx("tbody",{children:t.map(Z=>L.jsxs("tr",{style:{borderBottom:"1px solid #1e1e2e"},children:[L.jsx("td",{style:{padding:"10px 12px",color:"#e0e0e0"},children:Z.username}),L.jsx("td",{style:{padding:"10px 12px",color:"#9ca3af"},children:Z.email||"—"}),L.jsx("td",{style:{padding:"10px 12px"},children:Z.id===(i==null?void 0:i.id)?L.jsx("span",{style:{color:"#9ca3af"},children:Z.role}):L.jsxs("select",{value:Z.role,onChange:V=>O(Z.id,V.target.value),style:{...B,padding:"4px 8px",fontSize:12},children:[L.jsx("option",{value:"viewer",children:"viewer"}),L.jsx("option",{value:"operator",children:"operator"}),L.jsx("option",{value:"admin",children:"admin"})]})}),L.jsx("td",{style:{padding:"10px 12px",color:"#9ca3af",fontSize:12},children:Z.last_login?new Date(Z.last_login).toLocaleDateString():"—"}),L.jsx("td",{style:{padding:"10px 12px",textAlign:"right"},children:Z.id!==(i==null?void 0:i.id)&&(E===Z.id?L.jsxs("span",{style:{display:"inline-flex",gap:6,alignItems:"center"},children:[L.jsx("span",{style:{color:"#f87171",fontSize:12},children:"Confirm Delete"}),L.jsx("button",{onClick:()=>U(Z.id),style:{...G,background:"#dc2626",color:"#fff",padding:"4px 10px",fontSize:12},children:"Yes"}),L.jsx("button",{onClick:()=>R(null),style:{...G,background:"#2a2a3e",color:"#9ca3af",padding:"4px 10px",fontSize:12},children:"No"})]}):L.jsx("button",{onClick:()=>R(Z.id),style:{...G,background:"#2a2a3e",color:"#f87171",padding:"4px 10px",fontSize:12},children:"Delete"}))})]},Z.id))})]})]})}function R4(){const i=Ra(v=>v.selectedSquad),t=Ra(v=>v.activeStates),[n,s]=X.useState(null),[o,f]=X.useState(!1),d=i?t[i]:null;if(X.useEffect(()=>{if(!i){s(null);return}f(!0),fetch(`/api/squads/${i}`,{credentials:"include"}).then(v=>v.ok?v.json():null).then(v=>{v&&s(v.data)}).finally(()=>f(!1))},[i]),!i)return L.jsx("div",{style:{color:"#9ca3af",padding:20},children:"Select a squad to view details"});if(o)return L.jsx("div",{style:{color:"#9ca3af",padding:20},children:"Loading squad details..."});const m={marginBottom:24},g={fontSize:12,color:"#9ca3af",fontWeight:600,marginBottom:6,textTransform:"uppercase",letterSpacing:"0.05em"};return L.jsxs("div",{children:[L.jsx("h3",{style:{color:"#e0e0e0",marginBottom:16,fontSize:16,fontWeight:700},children:"Squad Info"}),n&&L.jsxs(L.Fragment,{children:[L.jsxs("div",{style:m,children:[L.jsx("div",{style:g,children:"Name"}),L.jsx("div",{style:{color:"#e0e0e0",fontSize:14,fontWeight:600},children:n.name})]}),L.jsxs("div",{style:m,children:[L.jsx("div",{style:g,children:"Description"}),L.jsx("div",{style:{color:"#e0e0e0",fontSize:14},children:n.description})]}),L.jsxs("div",{style:m,children:[L.jsx("div",{style:g,children:"Agents"}),L.jsx("div",{style:{display:"flex",gap:8,flexWrap:"wrap"},children:n.agents.map(v=>L.jsx("span",{style:{background:"#1e1e2e",border:"1px solid #2a2a3e",borderRadius:6,padding:"4px 10px",fontSize:12,color:"#e0e0e0"},children:v.name},v.id))})]}),L.jsxs("div",{style:m,children:[L.jsx("div",{style:g,children:"Pipeline Steps"}),L.jsx("div",{style:{display:"flex",flexDirection:"column",gap:6},children:n.pipeline.steps.map((v,S)=>L.jsxs("div",{style:{display:"flex",alignItems:"center",gap:10,background:"#1e1e2e",border:"1px solid #2a2a3e",borderRadius:6,padding:"8px 12px",fontSize:13},children:[L.jsx("span",{style:{background:"#3b82f6",color:"#fff",width:22,height:22,borderRadius:"50%",display:"flex",alignItems:"center",justifyContent:"center",fontSize:11,fontWeight:700,flexShrink:0},children:S+1}),L.jsx("span",{style:{color:"#e0e0e0"},children:v.label}),L.jsx("span",{style:{color:"#6b7280",fontSize:11,marginLeft:"auto"},children:v.agent})]},v.id))})]})]}),d&&L.jsxs("div",{style:m,children:[L.jsx("div",{style:g,children:"Current State"}),L.jsx("pre",{"data-testid":"state-json",style:{background:"#1e1e2e",border:"1px solid #2a2a3e",borderRadius:8,padding:16,fontSize:12,color:"#a5b4fc",overflow:"auto",maxHeight:400,lineHeight:1.5},children:JSON.stringify(d,null,2)})]})]})}function z4(){const[i,t]=X.useState(null),[n,s]=X.useState(null),[o,f]=X.useState(!0),[d,m]=X.useState(null),g=X.useCallback(async()=>{f(!0);try{const b=await fetch("/api/health",{credentials:"include"});if(b.ok){const A=await b.json();t(A),s(A.status==="ok")}else s(!1)}catch{s(!1)}finally{f(!1),m(new Date().toLocaleTimeString())}},[]);X.useEffect(()=>{g()},[g]);const v={fontSize:12,color:"#9ca3af",fontWeight:600,marginBottom:6,textTransform:"uppercase",letterSpacing:"0.05em"},S={display:"flex",justifyContent:"space-between",alignItems:"center",padding:"10px 12px",background:"#1e1e2e",border:"1px solid #2a2a3e",borderRadius:6,marginBottom:8,fontSize:13};return L.jsxs("div",{children:[L.jsxs("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",marginBottom:16},children:[L.jsx("h3",{style:{color:"#e0e0e0",fontSize:16,fontWeight:700},children:"Server Info"}),L.jsx("button",{onClick:g,style:{padding:"6px 14px",borderRadius:6,border:"none",background:"#2a2a3e",color:"#e0e0e0",fontWeight:600,fontSize:12,cursor:"pointer"},children:"Refresh"})]}),L.jsxs("div",{style:{marginBottom:24},children:[L.jsx("div",{style:v,children:"Health Status"}),L.jsxs("div",{style:S,children:[L.jsx("span",{style:{color:"#e0e0e0"},children:"API Server"}),o?L.jsx("span",{style:{color:"#9ca3af"},children:"Checking..."}):L.jsx("span",{style:{color:n?"#22c55e":"#ef4444",fontWeight:600},children:n?"Healthy":"Unhealthy"})]})]}),L.jsxs("div",{style:{marginBottom:24},children:[L.jsx("div",{style:v,children:"Environment"}),L.jsxs("div",{style:S,children:[L.jsx("span",{style:{color:"#e0e0e0"},children:"API Port"}),L.jsx("span",{style:{color:"#9ca3af"},children:"3001"})]}),L.jsxs("div",{style:S,children:[L.jsx("span",{style:{color:"#e0e0e0"},children:"Dashboard Port (dev)"}),L.jsx("span",{style:{color:"#9ca3af"},children:"5173"})]})]}),d&&L.jsxs("div",{style:{fontSize:11,color:"#6b7280",textAlign:"right"},children:["Last checked: ",d]})]})}function D4(){const i=cl(d=>d.user),t=(i==null?void 0:i.role)==="admin",[n,s]=X.useState(t?"users":"squad"),f=[{key:"users",label:"Users",adminOnly:!0},{key:"squad",label:"Squad"},{key:"server",label:"Server"}].filter(d=>!d.adminOnly||t);return L.jsxs("div",{style:{display:"flex",flexDirection:"column",height:"100%",padding:20},children:[L.jsx("div",{style:{display:"flex",gap:4,marginBottom:20,borderBottom:"1px solid #2a2a3e",paddingBottom:0},children:f.map(d=>L.jsx("button",{onClick:()=>s(d.key),style:{padding:"10px 20px",border:"none",borderBottom:n===d.key?"2px solid #3b82f6":"2px solid transparent",background:"transparent",color:n===d.key?"#e0e0e0":"#6b7280",fontWeight:n===d.key?700:500,fontSize:14,cursor:"pointer",transition:"color 0.15s, border-color 0.15s"},children:d.label},d.key))}),L.jsxs("div",{style:{flex:1,overflow:"auto"},children:[n==="users"&&t&&L.jsx(M4,{}),n==="squad"&&L.jsx(R4,{}),n==="server"&&L.jsx(z4,{})]})]})}kS.createRoot(document.getElementById("root")).render(L.jsx(X.StrictMode,{children:L.jsx(v2,{children:L.jsxs(Jb,{children:[L.jsx(Uu,{path:"/login",element:L.jsx(F2,{})}),L.jsxs(Uu,{path:"/",element:L.jsx(W2,{}),children:[L.jsx(Uu,{index:!0,element:L.jsx(Zb,{to:"/office",replace:!0})}),L.jsx(Uu,{path:"office",element:L.jsx(_4,{})}),L.jsx(Uu,{path:"chat",element:L.jsx(b4,{})}),L.jsx(Uu,{path:"kanban",element:L.jsx(A4,{})}),L.jsx(Uu,{path:"settings",element:L.jsx(D4,{})})]})]})})}));export{Bi as $,n_ as A,Yh as B,Sn as C,si as D,$l as E,Ls as F,fl as G,Kx as H,dg as I,jC as J,YC as K,kC as L,ne as M,QC as N,dp as O,sa as P,Wr as Q,eg as R,cC as S,Ee as T,Im as U,gT as V,Zh as W,Dg as X,WC as Y,Qa as Z,_x as _,Va as a,fp as a0,Av as a1,Rc as a2,D3 as a3,JT as a4,Rv as a5,vy as a6,zv as a7,WT as a8,Ac as a9,un as aa,Tx as ab,$A as ac,a_ as ad,ce as ae,Qh as af,tn as ag,$E as ah,JE as ai,_C as aj,dC as ak,qC as al,LC as am,JC as an,KC as ao,PC as ap,en as b,De as c,km as d,kt as e,hA as f,xE as g,aA as h,pp as i,Nx as j,ke as k,bc as l,bx as m,ua as n,uC as o,Og as p,Kh as q,OT as r,mp as s,Vv as t,DE as u,Jm as v,Da as w,zg as x,$x as y,wi as z};