expxagents 0.7.8 → 0.8.0
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.
- package/dist/dashboard/assets/BufferResource-C0G45m2G.js +185 -0
- package/dist/dashboard/assets/BufferResource-D7n27_ZU.js +185 -0
- package/dist/dashboard/assets/CanvasRenderer-DHMJqOGJ.js +1 -0
- package/dist/dashboard/assets/CanvasRenderer-DaWDUaww.js +1 -0
- package/dist/dashboard/assets/RenderTargetSystem-B0x2vSUR.js +172 -0
- package/dist/dashboard/assets/RenderTargetSystem-DSsFNic8.js +172 -0
- package/dist/dashboard/assets/WebGLRenderer-CLUUiUwN.js +156 -0
- package/dist/dashboard/assets/WebGLRenderer-b57E3WO7.js +156 -0
- package/dist/dashboard/assets/WebGPURenderer-D3EuYGrn.js +41 -0
- package/dist/dashboard/assets/WebGPURenderer-DTCsOZ0b.js +41 -0
- package/dist/dashboard/assets/browserAll-CMCjtKAR.js +14 -0
- package/dist/dashboard/assets/browserAll-Cg6Ia_Fa.js +14 -0
- package/dist/dashboard/assets/index-BwP29LGC.js +344 -0
- package/dist/dashboard/assets/index-D-7NXU4-.js +344 -0
- package/dist/dashboard/assets/webworkerAll-CX20ihio.js +83 -0
- package/dist/dashboard/assets/webworkerAll-DUAmTXT4.js +83 -0
- package/dist/dashboard/index.html +1 -1
- package/dist/server/watcher/state-parser.d.ts.map +1 -1
- package/dist/server/watcher/state-parser.js +6 -2
- package/dist/server/watcher/state-parser.js.map +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,344 @@
|
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/browserAll-Cg6Ia_Fa.js","assets/webworkerAll-CX20ihio.js","assets/WebGPURenderer-DTCsOZ0b.js","assets/BufferResource-D7n27_ZU.js","assets/RenderTargetSystem-DSsFNic8.js","assets/WebGLRenderer-b57E3WO7.js","assets/CanvasRenderer-DHMJqOGJ.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"]'))l(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"&&l(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 l(o){if(o.ep)return;o.ep=!0;const f=n(o);fetch(o.href,f)}})();function yp(a){return a&&a.__esModule&&Object.prototype.hasOwnProperty.call(a,"default")?a.default:a}var fy={exports:{}},Rh={};/**
|
|
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 Jg;function eb(){if(Jg)return Rh;Jg=1;var a=Symbol.for("react.transitional.element"),t=Symbol.for("react.fragment");function n(l,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:a,type:l,key:d,ref:o!==void 0?o:null,props:f}}return Rh.Fragment=t,Rh.jsx=n,Rh.jsxs=n,Rh}var Pg;function nb(){return Pg||(Pg=1,fy.exports=eb()),fy.exports}var X=nb(),hy={exports:{}},Vt={};/**
|
|
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 Wg;function ab(){if(Wg)return Vt;Wg=1;var a=Symbol.for("react.transitional.element"),t=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),l=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"),_=Symbol.for("react.lazy"),b=Symbol.for("react.activity"),C=Symbol.iterator;function E(j){return j===null||typeof j!="object"?null:(j=C&&j[C]||j["@@iterator"],typeof j=="function"?j:null)}var M={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},z=Object.assign,R={};function D(j,I,st){this.props=j,this.context=I,this.refs=R,this.updater=st||M}D.prototype.isReactComponent={},D.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")},D.prototype.forceUpdate=function(j){this.updater.enqueueForceUpdate(this,j,"forceUpdate")};function U(){}U.prototype=D.prototype;function B(j,I,st){this.props=j,this.context=I,this.refs=R,this.updater=st||M}var G=B.prototype=new U;G.constructor=B,z(G,D.prototype),G.isPureReactComponent=!0;var Q=Array.isArray;function V(){}var K={H:null,A:null,T:null,S:null},pt=Object.prototype.hasOwnProperty;function ot(j,I,st){var yt=st.ref;return{$$typeof:a,type:j,key:I,ref:yt!==void 0?yt:null,props:st}}function ft(j,I){return ot(j.type,I,j.props)}function ht(j){return typeof j=="object"&&j!==null&&j.$$typeof===a}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 Bt=!1;if(j===null)Bt=!0;else switch(Ot){case"bigint":case"string":case"number":Bt=!0;break;case"object":switch(j.$$typeof){case a:case t:Bt=!0;break;case _:return Bt=j._init,w(Bt(j._payload),I,st,yt,Tt)}}if(Bt)return Tt=Tt(j),Bt=yt===""?"."+xt(j,0):yt,Q(Tt)?(st="",Bt!=null&&(st=Bt.replace(_t,"$&/")+"/"),w(Tt,I,st,"",function(pa){return pa})):Tt!=null&&(ht(Tt)&&(Tt=ft(Tt,st+(Tt.key==null||j&&j.key===Tt.key?"":(""+Tt.key).replace(_t,"$&/")+"/")+Bt)),I.push(Tt)),1;Bt=0;var fe=yt===""?".":yt+":";if(Q(j))for(var ce=0;ce<j.length;ce++)yt=j[ce],Ot=fe+xt(yt,ce),Bt+=w(yt,I,st,Ot,Tt);else if(ce=E(j),typeof ce=="function")for(j=ce.call(j),ce=0;!(yt=j.next()).done;)yt=yt.value,Ot=fe+xt(yt,ce++),Bt+=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 Bt}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)},dt={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(!ht(j))throw Error("React.Children.only expected to receive a single React element child.");return j}};return Vt.Activity=b,Vt.Children=dt,Vt.Component=D,Vt.Fragment=n,Vt.Profiler=o,Vt.PureComponent=B,Vt.StrictMode=l,Vt.Suspense=g,Vt.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=K,Vt.__COMPILER_RUNTIME={__proto__:null,c:function(j){return K.H.useMemoCache(j)}},Vt.cache=function(j){return function(){return j.apply(null,arguments)}},Vt.cacheSignal=function(){return null},Vt.cloneElement=function(j,I,st){if(j==null)throw Error("The argument must be a React element, but you passed "+j+".");var yt=z({},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 Bt=Array(Ot),fe=0;fe<Ot;fe++)Bt[fe]=arguments[fe+2];yt.children=Bt}return ot(j.type,Tt,yt)},Vt.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},Vt.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 Bt=arguments.length-2;if(Bt===1)Tt.children=st;else if(1<Bt){for(var fe=Array(Bt),ce=0;ce<Bt;ce++)fe[ce]=arguments[ce+2];Tt.children=fe}if(j&&j.defaultProps)for(yt in Bt=j.defaultProps,Bt)Tt[yt]===void 0&&(Tt[yt]=Bt[yt]);return ot(j,Ot,Tt)},Vt.createRef=function(){return{current:null}},Vt.forwardRef=function(j){return{$$typeof:m,render:j}},Vt.isValidElement=ht,Vt.lazy=function(j){return{$$typeof:_,_payload:{_status:-1,_result:j},_init:at}},Vt.memo=function(j,I){return{$$typeof:v,type:j,compare:I===void 0?null:I}},Vt.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}},Vt.unstable_useCacheRefresh=function(){return K.H.useCacheRefresh()},Vt.use=function(j){return K.H.use(j)},Vt.useActionState=function(j,I,st){return K.H.useActionState(j,I,st)},Vt.useCallback=function(j,I){return K.H.useCallback(j,I)},Vt.useContext=function(j){return K.H.useContext(j)},Vt.useDebugValue=function(){},Vt.useDeferredValue=function(j,I){return K.H.useDeferredValue(j,I)},Vt.useEffect=function(j,I){return K.H.useEffect(j,I)},Vt.useEffectEvent=function(j){return K.H.useEffectEvent(j)},Vt.useId=function(){return K.H.useId()},Vt.useImperativeHandle=function(j,I,st){return K.H.useImperativeHandle(j,I,st)},Vt.useInsertionEffect=function(j,I){return K.H.useInsertionEffect(j,I)},Vt.useLayoutEffect=function(j,I){return K.H.useLayoutEffect(j,I)},Vt.useMemo=function(j,I){return K.H.useMemo(j,I)},Vt.useOptimistic=function(j,I){return K.H.useOptimistic(j,I)},Vt.useReducer=function(j,I,st){return K.H.useReducer(j,I,st)},Vt.useRef=function(j){return K.H.useRef(j)},Vt.useState=function(j){return K.H.useState(j)},Vt.useSyncExternalStore=function(j,I,st){return K.H.useSyncExternalStore(j,I,st)},Vt.useTransition=function(){return K.H.useTransition()},Vt.version="19.2.4",Vt}var Fg;function gp(){return Fg||(Fg=1,hy.exports=ab()),hy.exports}var L=gp();const jm=yp(L);var dy={exports:{}},zh={},my={exports:{}},py={};/**
|
|
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 Ig;function ib(){return Ig||(Ig=1,(function(a){function t(w,H){var at=w.length;w.push(H);t:for(;0<at;){var et=at-1>>>1,dt=w[et];if(0<o(dt,H))w[et]=H,w[at]=dt,at=et;else break t}}function n(w){return w.length===0?null:w[0]}function l(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,dt=w.length,j=dt>>>1;et<j;){var I=2*(et+1)-1,st=w[I],yt=I+1,Tt=w[yt];if(0>o(st,at))yt<dt&&0>o(Tt,st)?(w[et]=Tt,w[yt]=at,et=yt):(w[et]=st,w[I]=at,et=I);else if(yt<dt&&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(a.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var f=performance;a.unstable_now=function(){return f.now()}}else{var d=Date,m=d.now();a.unstable_now=function(){return d.now()-m}}var g=[],v=[],_=1,b=null,C=3,E=!1,M=!1,z=!1,R=!1,D=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)l(v);else if(H.startTime<=w)l(v),H.sortIndex=H.expirationTime,t(g,H);else break;H=n(v)}}function Q(w){if(z=!1,G(w),!M)if(n(g)!==null)M=!0,V||(V=!0,vt());else{var H=n(v);H!==null&&Dt(Q,H.startTime-w)}}var V=!1,K=-1,pt=5,ot=-1;function ft(){return R?!0:!(a.unstable_now()-ot<pt)}function ht(){if(R=!1,V){var w=a.unstable_now();ot=w;var H=!0;try{t:{M=!1,z&&(z=!1,U(K),K=-1),E=!0;var at=C;try{e:{for(G(w),b=n(g);b!==null&&!(b.expirationTime>w&&ft());){var et=b.callback;if(typeof et=="function"){b.callback=null,C=b.priorityLevel;var dt=et(b.expirationTime<=w);if(w=a.unstable_now(),typeof dt=="function"){b.callback=dt,G(w),H=!0;break e}b===n(g)&&l(g),G(w)}else l(g);b=n(g)}if(b!==null)H=!0;else{var j=n(v);j!==null&&Dt(Q,j.startTime-w),H=!1}}break t}finally{b=null,C=at,E=!1}H=void 0}}finally{H?vt():V=!1}}}var vt;if(typeof B=="function")vt=function(){B(ht)};else if(typeof MessageChannel<"u"){var _t=new MessageChannel,xt=_t.port2;_t.port1.onmessage=ht,vt=function(){xt.postMessage(null)}}else vt=function(){D(ht,0)};function Dt(w,H){K=D(function(){w(a.unstable_now())},H)}a.unstable_IdlePriority=5,a.unstable_ImmediatePriority=1,a.unstable_LowPriority=4,a.unstable_NormalPriority=3,a.unstable_Profiling=null,a.unstable_UserBlockingPriority=2,a.unstable_cancelCallback=function(w){w.callback=null},a.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},a.unstable_getCurrentPriorityLevel=function(){return C},a.unstable_next=function(w){switch(C){case 1:case 2:case 3:var H=3;break;default:H=C}var at=C;C=H;try{return w()}finally{C=at}},a.unstable_requestPaint=function(){R=!0},a.unstable_runWithPriority=function(w,H){switch(w){case 1:case 2:case 3:case 4:case 5:break;default:w=3}var at=C;C=w;try{return H()}finally{C=at}},a.unstable_scheduleCallback=function(w,H,at){var et=a.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 dt=-1;break;case 2:dt=250;break;case 5:dt=1073741823;break;case 4:dt=1e4;break;default:dt=5e3}return dt=at+dt,w={id:_++,callback:H,priorityLevel:w,startTime:at,expirationTime:dt,sortIndex:-1},at>et?(w.sortIndex=at,t(v,w),n(g)===null&&w===n(v)&&(z?(U(K),K=-1):z=!0,Dt(Q,at-et))):(w.sortIndex=dt,t(g,w),M||E||(M=!0,V||(V=!0,vt()))),w},a.unstable_shouldYield=ft,a.unstable_wrapCallback=function(w){var H=C;return function(){var at=C;C=H;try{return w.apply(this,arguments)}finally{C=at}}}})(py)),py}var $g;function lb(){return $g||($g=1,my.exports=ib()),my.exports}var yy={exports:{}},fa={};/**
|
|
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 t1;function sb(){if(t1)return fa;t1=1;var a=gp();function t(g){var v="https://react.dev/errors/"+g;if(1<arguments.length){v+="?args[]="+encodeURIComponent(arguments[1]);for(var _=2;_<arguments.length;_++)v+="&args[]="+encodeURIComponent(arguments[_])}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 l={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,_){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:_}}var d=a.__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 fa.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=l,fa.createPortal=function(g,v){var _=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,_)},fa.flushSync=function(g){var v=d.T,_=l.p;try{if(d.T=null,l.p=2,g)return g()}finally{d.T=v,l.p=_,l.d.f()}},fa.preconnect=function(g,v){typeof g=="string"&&(v?(v=v.crossOrigin,v=typeof v=="string"?v==="use-credentials"?v:"":void 0):v=null,l.d.C(g,v))},fa.prefetchDNS=function(g){typeof g=="string"&&l.d.D(g)},fa.preinit=function(g,v){if(typeof g=="string"&&v&&typeof v.as=="string"){var _=v.as,b=m(_,v.crossOrigin),C=typeof v.integrity=="string"?v.integrity:void 0,E=typeof v.fetchPriority=="string"?v.fetchPriority:void 0;_==="style"?l.d.S(g,typeof v.precedence=="string"?v.precedence:void 0,{crossOrigin:b,integrity:C,fetchPriority:E}):_==="script"&&l.d.X(g,{crossOrigin:b,integrity:C,fetchPriority:E,nonce:typeof v.nonce=="string"?v.nonce:void 0})}},fa.preinitModule=function(g,v){if(typeof g=="string")if(typeof v=="object"&&v!==null){if(v.as==null||v.as==="script"){var _=m(v.as,v.crossOrigin);l.d.M(g,{crossOrigin:_,integrity:typeof v.integrity=="string"?v.integrity:void 0,nonce:typeof v.nonce=="string"?v.nonce:void 0})}}else v==null&&l.d.M(g)},fa.preload=function(g,v){if(typeof g=="string"&&typeof v=="object"&&v!==null&&typeof v.as=="string"){var _=v.as,b=m(_,v.crossOrigin);l.d.L(g,_,{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})}},fa.preloadModule=function(g,v){if(typeof g=="string")if(v){var _=m(v.as,v.crossOrigin);l.d.m(g,{as:typeof v.as=="string"&&v.as!=="script"?v.as:void 0,crossOrigin:_,integrity:typeof v.integrity=="string"?v.integrity:void 0})}else l.d.m(g)},fa.requestFormReset=function(g){l.d.r(g)},fa.unstable_batchedUpdates=function(g,v){return g(v)},fa.useFormState=function(g,v,_){return d.H.useFormState(g,v,_)},fa.useFormStatus=function(){return d.H.useHostTransitionStatus()},fa.version="19.2.4",fa}var e1;function ub(){if(e1)return yy.exports;e1=1;function a(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(a)}catch(t){console.error(t)}}return a(),yy.exports=sb(),yy.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 n1;function rb(){if(n1)return zh;n1=1;var a=lb(),t=gp(),n=ub();function l(e){var i="https://react.dev/errors/"+e;if(1<arguments.length){i+="?args[]="+encodeURIComponent(arguments[1]);for(var r=2;r<arguments.length;r++)i+="&args[]="+encodeURIComponent(arguments[r])}return"Minified React error #"+e+"; visit "+i+" 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 i=e,r=e;if(e.alternate)for(;i.return;)i=i.return;else{e=i;do i=e,(i.flags&4098)!==0&&(r=i.return),e=i.return;while(e)}return i.tag===3?r:null}function d(e){if(e.tag===13){var i=e.memoizedState;if(i===null&&(e=e.alternate,e!==null&&(i=e.memoizedState)),i!==null)return i.dehydrated}return null}function m(e){if(e.tag===31){var i=e.memoizedState;if(i===null&&(e=e.alternate,e!==null&&(i=e.memoizedState)),i!==null)return i.dehydrated}return null}function g(e){if(f(e)!==e)throw Error(l(188))}function v(e){var i=e.alternate;if(!i){if(i=f(e),i===null)throw Error(l(188));return i!==e?null:e}for(var r=e,c=i;;){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),i;x=x.sibling}throw Error(l(188))}if(r.return!==c.return)r=p,c=x;else{for(var A=!1,O=p.child;O;){if(O===r){A=!0,r=p,c=x;break}if(O===c){A=!0,c=p,r=x;break}O=O.sibling}if(!A){for(O=x.child;O;){if(O===r){A=!0,r=x,c=p;break}if(O===c){A=!0,c=x,r=p;break}O=O.sibling}if(!A)throw Error(l(189))}}if(r.alternate!==c)throw Error(l(190))}if(r.tag!==3)throw Error(l(188));return r.stateNode.current===r?e:i}function _(e){var i=e.tag;if(i===5||i===26||i===27||i===6)return e;for(e=e.child;e!==null;){if(i=_(e),i!==null)return i;e=e.sibling}return null}var b=Object.assign,C=Symbol.for("react.element"),E=Symbol.for("react.transitional.element"),M=Symbol.for("react.portal"),z=Symbol.for("react.fragment"),R=Symbol.for("react.strict_mode"),D=Symbol.for("react.profiler"),U=Symbol.for("react.consumer"),B=Symbol.for("react.context"),G=Symbol.for("react.forward_ref"),Q=Symbol.for("react.suspense"),V=Symbol.for("react.suspense_list"),K=Symbol.for("react.memo"),pt=Symbol.for("react.lazy"),ot=Symbol.for("react.activity"),ft=Symbol.for("react.memo_cache_sentinel"),ht=Symbol.iterator;function vt(e){return e===null||typeof e!="object"?null:(e=ht&&e[ht]||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 z:return"Fragment";case D:return"Profiler";case R:return"StrictMode";case Q:return"Suspense";case V:return"SuspenseList";case ot:return"Activity"}if(typeof e=="object")switch(e.$$typeof){case M:return"Portal";case B:return e.displayName||"Context";case U:return(e._context.displayName||"Context")+".Consumer";case G:var i=e.render;return e=e.displayName,e||(e=i.displayName||i.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case K:return i=e.displayName||null,i!==null?i:xt(e.type)||"Memo";case pt:i=e._payload,e=e._init;try{return xt(e(i))}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=[],dt=-1;function j(e){return{current:e}}function I(e){0>dt||(e.current=et[dt],et[dt]=null,dt--)}function st(e,i){dt++,et[dt]=e.current,e.current=i}var yt=j(null),Tt=j(null),Ot=j(null),Bt=j(null);function fe(e,i){switch(st(Ot,i),st(Tt,e),st(yt,null),i.nodeType){case 9:case 11:e=(e=i.documentElement)&&(e=e.namespaceURI)?gg(e):0;break;default:if(e=i.tagName,i=i.namespaceURI)i=gg(i),e=vg(i,e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}I(yt),st(yt,e)}function ce(){I(yt),I(Tt),I(Ot)}function pa(e){e.memoizedState!==null&&st(Bt,e);var i=yt.current,r=vg(i,e.type);i!==r&&(st(Tt,e),st(yt,r))}function ja(e){Tt.current===e&&(I(yt),I(Tt)),Bt.current===e&&(I(Bt),Eh._currentValue=at)}var Yn,Fn;function pn(e){if(Yn===void 0)try{throw Error()}catch(r){var i=r.stack.trim().match(/\n( *(at )?)/);Yn=i&&i[1]||"",Fn=-1<r.stack.indexOf(`
|
|
43
|
+
at`)?" (<anonymous>)":-1<r.stack.indexOf("@")?"@unknown:0:0":""}return`
|
|
44
|
+
`+Yn+e+Fn}var In=!1;function fs(e,i){if(!e||In)return"";In=!0;var r=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var c={DetermineComponentFrameRoot:function(){try{if(i){var ct=function(){throw Error()};if(Object.defineProperty(ct.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(ct,[])}catch(it){var tt=it}Reflect.construct(e,[],ct)}else{try{ct.call()}catch(it){tt=it}e.call(ct.prototype)}}else{try{throw Error()}catch(it){tt=it}(ct=e())&&typeof ct.catch=="function"&&ct.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(),A=x[0],O=x[1];if(A&&O){var Y=A.split(`
|
|
45
|
+
`),F=O.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&<.includes("<anonymous>")&&(lt=lt.replace("<anonymous>",e.displayName)),lt}while(1<=c&&0<=p);break}}}finally{In=!1,Error.prepareStackTrace=r}return(r=e?e.displayName||e.name:"")?pn(r):""}function Ia(e,i){switch(e.tag){case 26:case 27:case 5:return pn(e.type);case 16:return pn("Lazy");case 13:return e.child!==i&&i!==null?pn("Suspense Fallback"):pn("Suspense");case 19:return pn("SuspenseList");case 0:case 15:return fs(e.type,!1);case 11:return fs(e.type.render,!1);case 1:return fs(e.type,!0);case 31:return pn("Activity");default:return""}}function Wu(e){try{var i="",r=null;do i+=Ia(e,r),r=e,e=e.return;while(e);return i}catch(c){return`
|
|
48
|
+
Error generating stack: `+c.message+`
|
|
49
|
+
`+c.stack}}var hs=Object.prototype.hasOwnProperty,qa=a.unstable_scheduleCallback,Cl=a.unstable_cancelCallback,Rp=a.unstable_shouldYield,sd=a.unstable_requestPaint,$n=a.unstable_now,ud=a.unstable_getCurrentPriorityLevel,rd=a.unstable_ImmediatePriority,co=a.unstable_UserBlockingPriority,fo=a.unstable_NormalPriority,od=a.unstable_LowPriority,cd=a.unstable_IdlePriority,Pc=a.log,Wc=a.unstable_setDisableYieldValue,Ya=null,$e=null;function La(e){if(typeof Pc=="function"&&Wc(e),$e&&typeof $e.setStrictMode=="function")try{$e.setStrictMode(Ya,e)}catch{}}var Ln=Math.clz32?Math.clz32:fd,Fu=Math.log,Iu=Math.LN2;function fd(e){return e>>>=0,e===0?32:31-(Fu(e)/Iu|0)|0}var $u=256,ds=262144,tr=4194304;function yi(e){var i=e&42;if(i!==0)return i;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 er(e,i,r){var c=e.pendingLanes;if(c===0)return 0;var p=0,x=e.suspendedLanes,A=e.pingedLanes;e=e.warmLanes;var O=c&134217727;return O!==0?(c=O&~x,c!==0?p=yi(c):(A&=O,A!==0?p=yi(A):r||(r=O&~e,r!==0&&(p=yi(r))))):(O=c&~x,O!==0?p=yi(O):A!==0?p=yi(A):r||(r=c&~e,r!==0&&(p=yi(r)))),p===0?0:i!==0&&i!==p&&(i&x)===0&&(x=p&-p,r=i&-i,x>=r||x===32&&(r&4194048)!==0)?i:p}function eu(e,i){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&i)===0}function ho(e,i){switch(e){case 1:case 2:case 4:case 8:case 64:return i+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 i+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 nu(){var e=tr;return tr<<=1,(tr&62914560)===0&&(tr=4194304),e}function au(e){for(var i=[],r=0;31>r;r++)i.push(e);return i}function iu(e,i){e.pendingLanes|=i,i!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function hd(e,i,r,c,p,x){var A=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 O=e.entanglements,Y=e.expirationTimes,F=e.hiddenUpdates;for(r=A&~r;0<r;){var lt=31-Ln(r),ct=1<<lt;O[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&=~ct}c!==0&&Fc(e,c,0),x!==0&&p===0&&e.tag!==0&&(e.suspendedLanes|=x&~(A&~i))}function Fc(e,i,r){e.pendingLanes|=i,e.suspendedLanes&=~i;var c=31-Ln(i);e.entangledLanes|=i,e.entanglements[c]=e.entanglements[c]|1073741824|r&261930}function mo(e,i){var r=e.entangledLanes|=i;for(e=e.entanglements;r;){var c=31-Ln(r),p=1<<c;p&i|e[c]&i&&(e[c]|=i),r&=~p}}function po(e,i){var r=i&-i;return r=(r&42)!==0?1:gi(r),(r&(e.suspendedLanes|i))!==0?0:r}function gi(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 yo(e){return e&=-e,2<e?8<e?(e&134217727)!==0?32:268435456:8:2}function Zi(){var e=H.p;return e!==0?e:(e=window.event,e===void 0?32:Lg(e.type))}function vi(e,i){var r=H.p;try{return H.p=e,i()}finally{H.p=r}}var $a=Math.random().toString(36).slice(2),Ft="__reactFiber$"+$a,zn="__reactProps$"+$a,Al="__reactContainer$"+$a,go="__reactEvents$"+$a,dd="__reactListeners$"+$a,zp="__reactHandles$"+$a,vo="__reactResources$"+$a,ms="__reactMarker$"+$a;function nr(e){delete e[Ft],delete e[zn],delete e[go],delete e[dd],delete e[zp]}function fn(e){var i=e[Ft];if(i)return i;for(var r=e.parentNode;r;){if(i=r[Al]||r[Ft]){if(r=i.alternate,i.child!==null||r!==null&&r.child!==null)for(e=Cg(e);e!==null;){if(r=e[Ft])return r;e=Cg(e)}return i}e=r,r=e.parentNode}return null}function De(e){if(e=e[Ft]||e[Al]){var i=e.tag;if(i===5||i===6||i===13||i===31||i===26||i===27||i===3)return e}return null}function Ji(e){var i=e.tag;if(i===5||i===26||i===27||i===6)return e.stateNode;throw Error(l(33))}function Pi(e){var i=e[vo];return i||(i=e[vo]={hoistableStyles:new Map,hoistableScripts:new Map}),i}function tn(e){e[ms]=!0}var xi=new Set,ar={};function Wi(e,i){Ml(e,i),Ml(e+"Capture",i)}function Ml(e,i){for(ar[e]=i,e=0;e<i.length;e++)xi.add(i[e])}var md=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]*$"),Ic={},$c={};function pd(e){return hs.call($c,e)?!0:hs.call(Ic,e)?!1:md.test(e)?$c[e]=!0:(Ic[e]=!0,!1)}function ir(e,i,r){if(pd(i))if(r===null)e.removeAttribute(i);else{switch(typeof r){case"undefined":case"function":case"symbol":e.removeAttribute(i);return;case"boolean":var c=i.toLowerCase().slice(0,5);if(c!=="data-"&&c!=="aria-"){e.removeAttribute(i);return}}e.setAttribute(i,""+r)}}function lr(e,i,r){if(r===null)e.removeAttribute(i);else{switch(typeof r){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(i);return}e.setAttribute(i,""+r)}}function ti(e,i,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(i,r,""+c)}}function ya(e){switch(typeof e){case"bigint":case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function yd(e){var i=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(i==="checkbox"||i==="radio")}function gd(e,i,r){var c=Object.getOwnPropertyDescriptor(e.constructor.prototype,i);if(!e.hasOwnProperty(i)&&typeof c<"u"&&typeof c.get=="function"&&typeof c.set=="function"){var p=c.get,x=c.set;return Object.defineProperty(e,i,{configurable:!0,get:function(){return p.call(this)},set:function(A){r=""+A,x.call(this,A)}}),Object.defineProperty(e,i,{enumerable:c.enumerable}),{getValue:function(){return r},setValue:function(A){r=""+A},stopTracking:function(){e._valueTracker=null,delete e[i]}}}}function xo(e){if(!e._valueTracker){var i=yd(e)?"checked":"value";e._valueTracker=gd(e,i,""+e[i])}}function tf(e){if(!e)return!1;var i=e._valueTracker;if(!i)return!0;var r=i.getValue(),c="";return e&&(c=yd(e)?e.checked?"true":"false":e.value),e=c,e!==r?(i.setValue(e),!0):!1}function lu(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 vd=/[\n"\\]/g;function ga(e){return e.replace(vd,function(i){return"\\"+i.charCodeAt(0).toString(16)+" "})}function _o(e,i,r,c,p,x,A,O){e.name="",A!=null&&typeof A!="function"&&typeof A!="symbol"&&typeof A!="boolean"?e.type=A:e.removeAttribute("type"),i!=null?A==="number"?(i===0&&e.value===""||e.value!=i)&&(e.value=""+ya(i)):e.value!==""+ya(i)&&(e.value=""+ya(i)):A!=="submit"&&A!=="reset"||e.removeAttribute("value"),i!=null?So(e,A,ya(i)):r!=null?So(e,A,ya(r)):c!=null&&e.removeAttribute("value"),p==null&&x!=null&&(e.defaultChecked=!!x),p!=null&&(e.checked=p&&typeof p!="function"&&typeof p!="symbol"),O!=null&&typeof O!="function"&&typeof O!="symbol"&&typeof O!="boolean"?e.name=""+ya(O):e.removeAttribute("name")}function ef(e,i,r,c,p,x,A,O){if(x!=null&&typeof x!="function"&&typeof x!="symbol"&&typeof x!="boolean"&&(e.type=x),i!=null||r!=null){if(!(x!=="submit"&&x!=="reset"||i!=null)){xo(e);return}r=r!=null?""+ya(r):"",i=i!=null?""+ya(i):r,O||i===e.value||(e.value=i),e.defaultValue=i}c=c??p,c=typeof c!="function"&&typeof c!="symbol"&&!!c,e.checked=O?e.checked:!!c,e.defaultChecked=!!c,A!=null&&typeof A!="function"&&typeof A!="symbol"&&typeof A!="boolean"&&(e.name=A),xo(e)}function So(e,i,r){i==="number"&&lu(e.ownerDocument)===e||e.defaultValue===""+r||(e.defaultValue=""+r)}function su(e,i,r,c){if(e=e.options,i){i={};for(var p=0;p<r.length;p++)i["$"+r[p]]=!0;for(r=0;r<e.length;r++)p=i.hasOwnProperty("$"+e[r].value),e[r].selected!==p&&(e[r].selected=p),p&&c&&(e[r].defaultSelected=!0)}else{for(r=""+ya(r),i=null,p=0;p<e.length;p++){if(e[p].value===r){e[p].selected=!0,c&&(e[p].defaultSelected=!0);return}i!==null||e[p].disabled||(i=e[p])}i!==null&&(i.selected=!0)}}function nf(e,i,r){if(i!=null&&(i=""+ya(i),i!==e.value&&(e.value=i),r==null)){e.defaultValue!==i&&(e.defaultValue=i);return}e.defaultValue=r!=null?""+ya(r):""}function ps(e,i,r,c){if(i==null){if(c!=null){if(r!=null)throw Error(l(92));if(Dt(c)){if(1<c.length)throw Error(l(93));c=c[0]}r=c}r==null&&(r=""),i=r}r=ya(i),e.defaultValue=r,c=e.textContent,c===r&&c!==""&&c!==null&&(e.value=c),xo(e)}function ys(e,i){if(i){var r=e.firstChild;if(r&&r===e.lastChild&&r.nodeType===3){r.nodeValue=i;return}}e.textContent=i}var bo=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 sr(e,i,r){var c=i.indexOf("--")===0;r==null||typeof r=="boolean"||r===""?c?e.setProperty(i,""):i==="float"?e.cssFloat="":e[i]="":c?e.setProperty(i,r):typeof r!="number"||r===0||bo.has(i)?i==="float"?e.cssFloat=r:e[i]=(""+r).trim():e[i]=r+"px"}function af(e,i,r){if(i!=null&&typeof i!="object")throw Error(l(62));if(e=e.style,r!=null){for(var c in r)!r.hasOwnProperty(c)||i!=null&&i.hasOwnProperty(c)||(c.indexOf("--")===0?e.setProperty(c,""):c==="float"?e.cssFloat="":e[c]="");for(var p in i)c=i[p],i.hasOwnProperty(p)&&r[p]!==c&&sr(e,p,c)}else for(var x in i)i.hasOwnProperty(x)&&sr(e,x,i[x])}function ur(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 xd=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"]]),_d=/^[\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 rr(e){return _d.test(""+e)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":e}function _i(){}var or=null;function To(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var gs=null,Rl=null;function lf(e){var i=De(e);if(i&&(e=i.stateNode)){var r=e[zn]||null;t:switch(e=i.stateNode,i.type){case"input":if(_o(e,r.value,r.defaultValue,r.defaultValue,r.checked,r.defaultChecked,r.type,r.name),i=r.name,r.type==="radio"&&i!=null){for(r=e;r.parentNode;)r=r.parentNode;for(r=r.querySelectorAll('input[name="'+ga(""+i)+'"][type="radio"]'),i=0;i<r.length;i++){var c=r[i];if(c!==e&&c.form===e.form){var p=c[zn]||null;if(!p)throw Error(l(90));_o(c,p.value,p.defaultValue,p.defaultValue,p.checked,p.defaultChecked,p.type,p.name)}}for(i=0;i<r.length;i++)c=r[i],c.form===e.form&&tf(c)}break t;case"textarea":nf(e,r.value,r.defaultValue);break t;case"select":i=r.value,i!=null&&su(e,!!r.multiple,i,!1)}}}var Eo=!1;function sf(e,i,r){if(Eo)return e(i,r);Eo=!0;try{var c=e(i);return c}finally{if(Eo=!1,(gs!==null||Rl!==null)&&(N(),gs&&(i=gs,e=Rl,Rl=gs=null,lf(i),e)))for(i=0;i<e.length;i++)lf(e[i])}}function vs(e,i){var r=e.stateNode;if(r===null)return null;var c=r[zn]||null;if(c===null)return null;r=c[i];t:switch(i){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(l(231,i,typeof r));return r}var Si=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Co=!1;if(Si)try{var cr={};Object.defineProperty(cr,"passive",{get:function(){Co=!0}}),window.addEventListener("test",cr,cr),window.removeEventListener("test",cr,cr)}catch{Co=!1}var zl=null,Ao=null,Dl=null;function Mo(){if(Dl)return Dl;var e,i=Ao,r=i.length,c,p="value"in zl?zl.value:zl.textContent,x=p.length;for(e=0;e<r&&i[e]===p[e];e++);var A=r-e;for(c=1;c<=A&&i[r-c]===p[x-c];c++);return Dl=p.slice(e,1<c?1-c:void 0)}function xs(e){var i=e.keyCode;return"charCode"in e?(e=e.charCode,e===0&&i===13&&(e=13)):e=i,e===10&&(e=13),32<=e||e===13?e:0}function fr(){return!0}function uf(){return!1}function Dn(e){function i(r,c,p,x,A){this._reactName=r,this._targetInst=p,this.type=c,this.nativeEvent=x,this.target=A,this.currentTarget=null;for(var O in e)e.hasOwnProperty(O)&&(r=e[O],this[O]=r?r(x):x[O]);return this.isDefaultPrevented=(x.defaultPrevented!=null?x.defaultPrevented:x.returnValue===!1)?fr:uf,this.isPropagationStopped=uf,this}return b(i.prototype,{preventDefault:function(){this.defaultPrevented=!0;var r=this.nativeEvent;r&&(r.preventDefault?r.preventDefault():typeof r.returnValue!="unknown"&&(r.returnValue=!1),this.isDefaultPrevented=fr)},stopPropagation:function(){var r=this.nativeEvent;r&&(r.stopPropagation?r.stopPropagation():typeof r.cancelBubble!="unknown"&&(r.cancelBubble=!0),this.isPropagationStopped=fr)},persist:function(){},isPersistent:fr}),i}var Ol={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},hr=Dn(Ol),ei=b({},Ol,{view:0,detail:0}),Ro=Dn(ei),zo,dr,uu,mr=b({},ei,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:yr,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!==uu&&(uu&&e.type==="mousemove"?(zo=e.screenX-uu.screenX,dr=e.screenY-uu.screenY):dr=zo=0,uu=e),zo)},movementY:function(e){return"movementY"in e?e.movementY:dr}}),Sd=Dn(mr),Sn=b({},mr,{dataTransfer:0}),bd=Dn(Sn),Td=b({},ei,{relatedTarget:0}),Do=Dn(Td),Ed=b({},Ol,{animationName:0,elapsedTime:0,pseudoElement:0}),Cd=Dn(Ed),pr=b({},Ol,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),rf=Dn(pr),Ad=b({},Ol,{data:0}),of=Dn(Ad),Md={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},cf={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"},ff={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function Rd(e){var i=this.nativeEvent;return i.getModifierState?i.getModifierState(e):(e=ff[e])?!!i[e]:!1}function yr(){return Rd}var hf=b({},ei,{key:function(e){if(e.key){var i=Md[e.key]||e.key;if(i!=="Unidentified")return i}return e.type==="keypress"?(e=xs(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?cf[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:yr,charCode:function(e){return e.type==="keypress"?xs(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?xs(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),df=Dn(hf),zd=b({},mr,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Oo=Dn(zd),Dd=b({},ei,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:yr}),Fi=Dn(Dd),mf=b({},Ol,{propertyName:0,elapsedTime:0,pseudoElement:0}),Dp=Dn(mf),Od=b({},mr,{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}),Nl=Dn(Od),Ii=b({},Ol,{newState:0,oldState:0}),pf=Dn(Ii),yf=[9,13,27,32],_s=Si&&"CompositionEvent"in window,Ul=null;Si&&"documentMode"in document&&(Ul=document.documentMode);var Ss=Si&&"TextEvent"in window&&!Ul,bn=Si&&(!_s||Ul&&8<Ul&&11>=Ul),gr=" ",gf=!1;function No(e,i){switch(e){case"keyup":return yf.indexOf(i.keyCode)!==-1;case"keydown":return i.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function ru(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Bl=!1;function Uo(e,i){switch(e){case"compositionend":return ru(i);case"keypress":return i.which!==32?null:(gf=!0,gr);case"textInput":return e=i.data,e===gr&&gf?null:e;default:return null}}function Nd(e,i){if(Bl)return e==="compositionend"||!_s&&No(e,i)?(e=Mo(),Dl=Ao=zl=null,Bl=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(i.ctrlKey||i.altKey||i.metaKey)||i.ctrlKey&&i.altKey){if(i.char&&1<i.char.length)return i.char;if(i.which)return String.fromCharCode(i.which)}return null;case"compositionend":return bn&&i.locale!=="ko"?null:i.data;default:return null}}var va={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 vf(e){var i=e&&e.nodeName&&e.nodeName.toLowerCase();return i==="input"?!!va[e.type]:i==="textarea"}function Bo(e,i,r,c){gs?Rl?Rl.push(c):Rl=[c]:gs=c,i=Tm(i,"onChange"),0<i.length&&(r=new hr("onChange","change",null,r,c),e.push({event:r,listeners:i}))}var ou=null,cu=null;function xf(e){fg(e,0)}function fu(e){var i=Ji(e);if(tf(i))return e}function _f(e,i){if(e==="change")return i}var vr=!1;if(Si){var bs;if(Si){var Oe="oninput"in document;if(!Oe){var Ud=document.createElement("div");Ud.setAttribute("oninput","return;"),Oe=typeof Ud.oninput=="function"}bs=Oe}else bs=!1;vr=bs&&(!document.documentMode||9<document.documentMode)}function Bd(){ou&&(ou.detachEvent("onpropertychange",Sf),cu=ou=null)}function Sf(e){if(e.propertyName==="value"&&fu(cu)){var i=[];Bo(i,cu,e,To(e)),sf(xf,i)}}function xr(e,i,r){e==="focusin"?(Bd(),ou=i,cu=r,ou.attachEvent("onpropertychange",Sf)):e==="focusout"&&Bd()}function wl(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return fu(cu)}function wd(e,i){if(e==="click")return fu(i)}function Hd(e,i){if(e==="input"||e==="change")return fu(i)}function Ts(e,i){return e===i&&(e!==0||1/e===1/i)||e!==e&&i!==i}var Ne=typeof Object.is=="function"?Object.is:Ts;function hu(e,i){if(Ne(e,i))return!0;if(typeof e!="object"||e===null||typeof i!="object"||i===null)return!1;var r=Object.keys(e),c=Object.keys(i);if(r.length!==c.length)return!1;for(c=0;c<r.length;c++){var p=r[c];if(!hs.call(i,p)||!Ne(e[p],i[p]))return!1}return!0}function bf(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Tf(e,i){var r=bf(e);e=0;for(var c;r;){if(r.nodeType===3){if(c=e+r.textContent.length,e<=i&&c>=i)return{node:r,offset:i-e};e=c}t:{for(;r;){if(r.nextSibling){r=r.nextSibling;break t}r=r.parentNode}r=void 0}r=bf(r)}}function wo(e,i){return e&&i?e===i?!0:e&&e.nodeType===3?!1:i&&i.nodeType===3?wo(e,i.parentNode):"contains"in e?e.contains(i):e.compareDocumentPosition?!!(e.compareDocumentPosition(i)&16):!1:!1}function Ho(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var i=lu(e.document);i instanceof e.HTMLIFrameElement;){try{var r=typeof i.contentWindow.location.href=="string"}catch{r=!1}if(r)e=i.contentWindow;else break;i=lu(e.document)}return i}function du(e){var i=e&&e.nodeName&&e.nodeName.toLowerCase();return i&&(i==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||i==="textarea"||e.contentEditable==="true")}var Gd=Si&&"documentMode"in document&&11>=document.documentMode,mu=null,Go=null,pu=null,xa=!1;function jo(e,i,r){var c=r.window===r?r.document:r.nodeType===9?r:r.ownerDocument;xa||mu==null||mu!==lu(c)||(c=mu,"selectionStart"in c&&du(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}),pu&&hu(pu,c)||(pu=c,c=Tm(Go,"onSelect"),0<c.length&&(i=new hr("onSelect","select",null,i,r),e.push({event:i,listeners:c}),i.target=mu)))}function Hl(e,i){var r={};return r[e.toLowerCase()]=i.toLowerCase(),r["Webkit"+e]="webkit"+i,r["Moz"+e]="moz"+i,r}var yu={animationend:Hl("Animation","AnimationEnd"),animationiteration:Hl("Animation","AnimationIteration"),animationstart:Hl("Animation","AnimationStart"),transitionrun:Hl("Transition","TransitionRun"),transitionstart:Hl("Transition","TransitionStart"),transitioncancel:Hl("Transition","TransitionCancel"),transitionend:Hl("Transition","TransitionEnd")},_r={},Xn={};Si&&(Xn=document.createElement("div").style,"AnimationEvent"in window||(delete yu.animationend.animation,delete yu.animationiteration.animation,delete yu.animationstart.animation),"TransitionEvent"in window||delete yu.transitionend.transition);function Gl(e){if(_r[e])return _r[e];if(!yu[e])return e;var i=yu[e],r;for(r in i)if(i.hasOwnProperty(r)&&r in Xn)return _r[e]=i[r];return e}var ta=Gl("animationend"),Ef=Gl("animationiteration"),bi=Gl("animationstart"),gu=Gl("transitionrun"),jl=Gl("transitionstart"),Cf=Gl("transitioncancel"),qo=Gl("transitionend"),$i=new Map,Yo="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(" ");Yo.push("scrollEnd");function On(e,i){$i.set(e,i),Wi(i,[e])}var ql=typeof reportError=="function"?reportError:function(e){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var i=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(i))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",e);return}console.error(e)},yn=[],Es=0,Lo=0;function Yl(){for(var e=Es,i=Lo=Es=0;i<e;){var r=yn[i];yn[i++]=null;var c=yn[i];yn[i++]=null;var p=yn[i];yn[i++]=null;var x=yn[i];if(yn[i++]=null,c!==null&&p!==null){var A=c.pending;A===null?p.next=p:(p.next=A.next,A.next=p),c.pending=p}x!==0&&Xo(r,p,x)}}function Sr(e,i,r,c){yn[Es++]=e,yn[Es++]=i,yn[Es++]=r,yn[Es++]=c,Lo|=c,e.lanes|=c,e=e.alternate,e!==null&&(e.lanes|=c)}function vu(e,i,r,c){return Sr(e,i,r,c),xu(e)}function Ll(e,i){return Sr(e,null,null,i),xu(e)}function Xo(e,i,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&&i!==null&&(p=31-Ln(r),e=x.hiddenUpdates,c=e[p],c===null?e[p]=[i]:c.push(i),i.lane=r|536870912),x):null}function xu(e){if(50<Ls)throw Ls=0,Xs=null,Error(l(185));for(var i=e.return;i!==null;)e=i,i=e.return;return e.tag===3?e.stateNode:null}var Xl={};function jd(e,i,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=i,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 Vn(e,i,r,c){return new jd(e,i,r,c)}function Qn(e){return e=e.prototype,!(!e||!e.isReactComponent)}function Ti(e,i){var r=e.alternate;return r===null?(r=Vn(e.tag,i,e.key,e.mode),r.elementType=e.elementType,r.type=e.type,r.stateNode=e.stateNode,r.alternate=e,e.alternate=r):(r.pendingProps=i,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,i=e.dependencies,r.dependencies=i===null?null:{lanes:i.lanes,firstContext:i.firstContext},r.sibling=e.sibling,r.index=e.index,r.ref=e.ref,r.refCleanup=e.refCleanup,r}function Nn(e,i){e.flags&=65011714;var r=e.alternate;return r===null?(e.childLanes=0,e.lanes=i,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,i=r.dependencies,e.dependencies=i===null?null:{lanes:i.lanes,firstContext:i.firstContext}),e}function br(e,i,r,c,p,x){var A=0;if(c=e,typeof e=="function")Qn(e)&&(A=1);else if(typeof e=="string")A=VS(e,r,yt.current)?26:e==="html"||e==="head"||e==="body"?27:5;else t:switch(e){case ot:return e=Vn(31,r,i,p),e.elementType=ot,e.lanes=x,e;case z:return tl(r.children,p,x,i);case R:A=8,p|=24;break;case D:return e=Vn(12,r,i,p|2),e.elementType=D,e.lanes=x,e;case Q:return e=Vn(13,r,i,p),e.elementType=Q,e.lanes=x,e;case V:return e=Vn(19,r,i,p),e.elementType=V,e.lanes=x,e;default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case B:A=10;break t;case U:A=9;break t;case G:A=11;break t;case K:A=14;break t;case pt:A=16,c=null;break t}A=29,r=Error(l(130,e===null?"null":typeof e,"")),c=null}return i=Vn(A,r,i,p),i.elementType=e,i.type=c,i.lanes=x,i}function tl(e,i,r,c){return e=Vn(7,e,c,i),e.lanes=r,e}function Vo(e,i,r){return e=Vn(6,e,null,i),e.lanes=r,e}function qd(e){var i=Vn(18,null,null,0);return i.stateNode=e,i}function ni(e,i,r){return i=Vn(4,e.children!==null?e.children:[],e.key,i),i.lanes=r,i.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},i}var Af=new WeakMap;function ea(e,i){if(typeof e=="object"&&e!==null){var r=Af.get(e);return r!==void 0?r:(i={value:e,source:i,stack:Wu(i)},Af.set(e,i),i)}return{value:e,source:i,stack:Wu(i)}}var ai=[],Cs=0,Tr=null,_u=0,_a=[],na=0,Ei=null,Ci=1,Ai="";function el(e,i){ai[Cs++]=_u,ai[Cs++]=Tr,Tr=e,_u=i}function Mf(e,i,r){_a[na++]=Ci,_a[na++]=Ai,_a[na++]=Ei,Ei=e;var c=Ci;e=Ai;var p=32-Ln(c)-1;c&=~(1<<p),r+=1;var x=32-Ln(i)+p;if(30<x){var A=p-p%5;x=(c&(1<<A)-1).toString(32),c>>=A,p-=A,Ci=1<<32-Ln(i)+p|r<<p|c,Ai=x+e}else Ci=1<<x|r<<p|c,Ai=e}function Qo(e){e.return!==null&&(el(e,1),Mf(e,1,0))}function Vl(e){for(;e===Tr;)Tr=ai[--Cs],ai[Cs]=null,_u=ai[--Cs],ai[Cs]=null;for(;e===Ei;)Ei=_a[--na],_a[na]=null,Ai=_a[--na],_a[na]=null,Ci=_a[--na],_a[na]=null}function Er(e,i){_a[na++]=Ci,_a[na++]=Ai,_a[na++]=Ei,Ci=i.id,Ai=i.overflow,Ei=e}var gn=null,Ce=null,te=!1,nl=null,vn=!1,ko=Error(l(519));function It(e){var i=Error(l(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw Cr(ea(i,e)),ko}function Ko(e){var i=e.stateNode,r=e.type,c=e.memoizedProps;switch(i[Ft]=e,i[zn]=c,r){case"dialog":ee("cancel",i),ee("close",i);break;case"iframe":case"object":case"embed":ee("load",i);break;case"video":case"audio":for(r=0;r<xh.length;r++)ee(xh[r],i);break;case"source":ee("error",i);break;case"img":case"image":case"link":ee("error",i),ee("load",i);break;case"details":ee("toggle",i);break;case"input":ee("invalid",i),ef(i,c.value,c.defaultValue,c.checked,c.defaultChecked,c.type,c.name,!0);break;case"select":ee("invalid",i);break;case"textarea":ee("invalid",i),ps(i,c.value,c.defaultValue,c.children)}r=c.children,typeof r!="string"&&typeof r!="number"&&typeof r!="bigint"||i.textContent===""+r||c.suppressHydrationWarning===!0||pg(i.textContent,r)?(c.popover!=null&&(ee("beforetoggle",i),ee("toggle",i)),c.onScroll!=null&&ee("scroll",i),c.onScrollEnd!=null&&ee("scrollend",i),c.onClick!=null&&(i.onclick=_i),i=!0):i=!1,i||It(e,!0)}function Yd(e){for(gn=e.return;gn;)switch(gn.tag){case 5:case 31:case 13:vn=!1;return;case 27:case 3:vn=!0;return;default:gn=gn.return}}function As(e){if(e!==gn)return!1;if(!te)return Yd(e),te=!0,!1;var i=e.tag,r;if((r=i!==3&&i!==27)&&((r=i===5)&&(r=e.type,r=!(r!=="form"&&r!=="button")||Wp(e.type,e.memoizedProps)),r=!r),r&&Ce&&It(e),Yd(e),i===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(l(317));Ce=Eg(e)}else if(i===31){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(l(317));Ce=Eg(e)}else i===27?(i=Ce,qu(e.type)?(e=ey,ey=null,Ce=e):Ce=i):Ce=gn?Gi(e.stateNode.nextSibling):null;return!0}function Ms(){Ce=gn=null,te=!1}function Rf(){var e=nl;return e!==null&&(jn===null?jn=e:jn.push.apply(jn,e),nl=null),e}function Cr(e){nl===null?nl=[e]:nl.push(e)}var zf=j(null),al=null,Un=null;function il(e,i,r){st(zf,i._currentValue),i._currentValue=r}function Xa(e){e._currentValue=zf.current,I(zf)}function ll(e,i,r){for(;e!==null;){var c=e.alternate;if((e.childLanes&i)!==i?(e.childLanes|=i,c!==null&&(c.childLanes|=i)):c!==null&&(c.childLanes&i)!==i&&(c.childLanes|=i),e===r)break;e=e.return}}function Zo(e,i,r,c){var p=e.child;for(p!==null&&(p.return=e);p!==null;){var x=p.dependencies;if(x!==null){var A=p.child;x=x.firstContext;t:for(;x!==null;){var O=x;x=p;for(var Y=0;Y<i.length;Y++)if(O.context===i[Y]){x.lanes|=r,O=x.alternate,O!==null&&(O.lanes|=r),ll(x.return,r,e),c||(A=null);break t}x=O.next}}else if(p.tag===18){if(A=p.return,A===null)throw Error(l(341));A.lanes|=r,x=A.alternate,x!==null&&(x.lanes|=r),ll(A,r,e),A=null}else A=p.child;if(A!==null)A.return=p;else for(A=p;A!==null;){if(A===e){A=null;break}if(p=A.sibling,p!==null){p.return=A.return,A=p;break}A=A.return}p=A}}function Ql(e,i,r,c){e=null;for(var p=i,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 A=p.alternate;if(A===null)throw Error(l(387));if(A=A.memoizedProps,A!==null){var O=p.type;Ne(p.pendingProps.value,A.value)||(e!==null?e.push(O):e=[O])}}else if(p===Bt.current){if(A=p.alternate,A===null)throw Error(l(387));A.memoizedState.memoizedState!==p.memoizedState.memoizedState&&(e!==null?e.push(Eh):e=[Eh])}p=p.return}e!==null&&Zo(i,e,r,c),i.flags|=262144}function Su(e){for(e=e.firstContext;e!==null;){if(!Ne(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function Rs(e){al=e,Un=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function xn(e){return Df(al,e)}function Ar(e,i){return al===null&&Rs(e),Df(e,i)}function Df(e,i){var r=i._currentValue;if(i={context:i,memoizedValue:r,next:null},Un===null){if(e===null)throw Error(l(308));Un=i,e.dependencies={lanes:0,firstContext:i},e.flags|=524288}else Un=Un.next=i;return r}var Ld=typeof AbortController<"u"?AbortController:function(){var e=[],i=this.signal={aborted:!1,addEventListener:function(r,c){e.push(c)}};this.abort=function(){i.aborted=!0,e.forEach(function(r){return r()})}},Xd=a.unstable_scheduleCallback,Of=a.unstable_NormalPriority,Mt={$$typeof:B,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Nf(){return{controller:new Ld,data:new Map,refCount:0}}function Tn(e){e.refCount--,e.refCount===0&&Xd(Of,function(){e.controller.abort()})}var zs=null,Uf=0,sl=0,ii=null;function bu(e,i){if(zs===null){var r=zs=[];Uf=0,sl=Lp(),ii={status:"pending",value:void 0,then:function(c){r.push(c)}}}return Uf++,i.then(Bf,Bf),i}function Bf(){if(--Uf===0&&zs!==null){ii!==null&&(ii.status="fulfilled");var e=zs;zs=null,sl=0,ii=null;for(var i=0;i<e.length;i++)(0,e[i])()}}function wf(e,i){var r=[],c={status:"pending",value:null,reason:null,then:function(p){r.push(p)}};return e.then(function(){c.status="fulfilled",c.value=i;for(var p=0;p<r.length;p++)(0,r[p])(i)},function(p){for(c.status="rejected",c.reason=p,p=0;p<r.length;p++)(0,r[p])(void 0)}),c}var Vd=w.S;w.S=function(e,i){Hu=$n(),typeof i=="object"&&i!==null&&typeof i.then=="function"&&bu(e,i),Vd!==null&&Vd(e,i)};var kl=j(null);function Mi(){var e=kl.current;return e!==null?e:pe.pooledCache}function Tu(e,i){i===null?st(kl,kl.current):st(kl,i.pool)}function Jo(){var e=Mi();return e===null?null:{parent:Mt._currentValue,pool:e}}var Kl=Error(l(460)),Mr=Error(l(474)),li=Error(l(542)),Rr={then:function(){}};function Qd(e){return e=e.status,e==="fulfilled"||e==="rejected"}function Hf(e,i,r){switch(r=e[r],r===void 0?e.push(i):r!==i&&(i.then(_i,_i),i=r),i.status){case"fulfilled":return i.value;case"rejected":throw e=i.reason,Gf(e),e;default:if(typeof i.status=="string")i.then(_i,_i);else{if(e=pe,e!==null&&100<e.shellSuspendCounter)throw Error(l(482));e=i,e.status="pending",e.then(function(c){if(i.status==="pending"){var p=i;p.status="fulfilled",p.value=c}},function(c){if(i.status==="pending"){var p=i;p.status="rejected",p.reason=c}})}switch(i.status){case"fulfilled":return i.value;case"rejected":throw e=i.reason,Gf(e),e}throw Nt=i,Kl}}function Ds(e){try{var i=e._init;return i(e._payload)}catch(r){throw r!==null&&typeof r=="object"&&typeof r.then=="function"?(Nt=r,Kl):r}}var Nt=null;function Po(){if(Nt===null)throw Error(l(459));var e=Nt;return Nt=null,e}function Gf(e){if(e===Kl||e===li)throw Error(l(483))}var Zl=null,Jl=0;function Wo(e){var i=Jl;return Jl+=1,Zl===null&&(Zl=[]),Hf(Zl,e,i)}function zr(e,i){i=i.props.ref,e.ref=i!==void 0?i:null}function Dr(e,i){throw i.$$typeof===C?Error(l(525)):(e=Object.prototype.toString.call(i),Error(l(31,e==="[object Object]"?"object with keys {"+Object.keys(i).join(", ")+"}":e)))}function Eu(e){function i(J,k){if(e){var W=J.deletions;W===null?(J.deletions=[k],J.flags|=16):W.push(k)}}function r(J,k){if(!e)return null;for(;k!==null;)i(J,k),k=k.sibling;return null}function c(J){for(var k=new Map;J!==null;)J.key!==null?k.set(J.key,J):k.set(J.index,J),J=J.sibling;return k}function p(J,k){return J=Ti(J,k),J.index=0,J.sibling=null,J}function x(J,k,W){return J.index=W,e?(W=J.alternate,W!==null?(W=W.index,W<k?(J.flags|=67108866,k):W):(J.flags|=67108866,k)):(J.flags|=1048576,k)}function A(J){return e&&J.alternate===null&&(J.flags|=67108866),J}function O(J,k,W,rt){return k===null||k.tag!==6?(k=Vo(W,J.mode,rt),k.return=J,k):(k=p(k,W),k.return=J,k)}function Y(J,k,W,rt){var zt=W.type;return zt===z?lt(J,k,W.props.children,rt,W.key):k!==null&&(k.elementType===zt||typeof zt=="object"&&zt!==null&&zt.$$typeof===pt&&Ds(zt)===k.type)?(k=p(k,W.props),zr(k,W),k.return=J,k):(k=br(W.type,W.key,W.props,null,J.mode,rt),zr(k,W),k.return=J,k)}function F(J,k,W,rt){return k===null||k.tag!==4||k.stateNode.containerInfo!==W.containerInfo||k.stateNode.implementation!==W.implementation?(k=ni(W,J.mode,rt),k.return=J,k):(k=p(k,W.children||[]),k.return=J,k)}function lt(J,k,W,rt,zt){return k===null||k.tag!==7?(k=tl(W,J.mode,rt,zt),k.return=J,k):(k=p(k,W),k.return=J,k)}function ct(J,k,W){if(typeof k=="string"&&k!==""||typeof k=="number"||typeof k=="bigint")return k=Vo(""+k,J.mode,W),k.return=J,k;if(typeof k=="object"&&k!==null){switch(k.$$typeof){case E:return W=br(k.type,k.key,k.props,null,J.mode,W),zr(W,k),W.return=J,W;case M:return k=ni(k,J.mode,W),k.return=J,k;case pt:return k=Ds(k),ct(J,k,W)}if(Dt(k)||vt(k))return k=tl(k,J.mode,W,null),k.return=J,k;if(typeof k.then=="function")return ct(J,Wo(k),W);if(k.$$typeof===B)return ct(J,Ar(J,k),W);Dr(J,k)}return null}function tt(J,k,W,rt){var zt=k!==null?k.key:null;if(typeof W=="string"&&W!==""||typeof W=="number"||typeof W=="bigint")return zt!==null?null:O(J,k,""+W,rt);if(typeof W=="object"&&W!==null){switch(W.$$typeof){case E:return W.key===zt?Y(J,k,W,rt):null;case M:return W.key===zt?F(J,k,W,rt):null;case pt:return W=Ds(W),tt(J,k,W,rt)}if(Dt(W)||vt(W))return zt!==null?null:lt(J,k,W,rt,null);if(typeof W.then=="function")return tt(J,k,Wo(W),rt);if(W.$$typeof===B)return tt(J,k,Ar(J,W),rt);Dr(J,W)}return null}function it(J,k,W,rt,zt){if(typeof rt=="string"&&rt!==""||typeof rt=="number"||typeof rt=="bigint")return J=J.get(W)||null,O(k,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(k,J,rt,zt);case M:return J=J.get(rt.key===null?W:rt.key)||null,F(k,J,rt,zt);case pt:return rt=Ds(rt),it(J,k,W,rt,zt)}if(Dt(rt)||vt(rt))return J=J.get(W)||null,lt(k,J,rt,zt,null);if(typeof rt.then=="function")return it(J,k,W,Wo(rt),zt);if(rt.$$typeof===B)return it(J,k,W,Ar(k,rt),zt);Dr(k,rt)}return null}function Et(J,k,W,rt){for(var zt=null,ge=null,Ct=k,Zt=k=0,ie=null;Ct!==null&&Zt<W.length;Zt++){Ct.index>Zt?(ie=Ct,Ct=null):ie=Ct.sibling;var ve=tt(J,Ct,W[Zt],rt);if(ve===null){Ct===null&&(Ct=ie);break}e&&Ct&&ve.alternate===null&&i(J,Ct),k=x(ve,k,Zt),ge===null?zt=ve:ge.sibling=ve,ge=ve,Ct=ie}if(Zt===W.length)return r(J,Ct),te&&el(J,Zt),zt;if(Ct===null){for(;Zt<W.length;Zt++)Ct=ct(J,W[Zt],rt),Ct!==null&&(k=x(Ct,k,Zt),ge===null?zt=Ct:ge.sibling=Ct,ge=Ct);return te&&el(J,Zt),zt}for(Ct=c(Ct);Zt<W.length;Zt++)ie=it(Ct,J,Zt,W[Zt],rt),ie!==null&&(e&&ie.alternate!==null&&Ct.delete(ie.key===null?Zt:ie.key),k=x(ie,k,Zt),ge===null?zt=ie:ge.sibling=ie,ge=ie);return e&&Ct.forEach(function(Qu){return i(J,Qu)}),te&&el(J,Zt),zt}function wt(J,k,W,rt){if(W==null)throw Error(l(151));for(var zt=null,ge=null,Ct=k,Zt=k=0,ie=null,ve=W.next();Ct!==null&&!ve.done;Zt++,ve=W.next()){Ct.index>Zt?(ie=Ct,Ct=null):ie=Ct.sibling;var Qu=tt(J,Ct,ve.value,rt);if(Qu===null){Ct===null&&(Ct=ie);break}e&&Ct&&Qu.alternate===null&&i(J,Ct),k=x(Qu,k,Zt),ge===null?zt=Qu:ge.sibling=Qu,ge=Qu,Ct=ie}if(ve.done)return r(J,Ct),te&&el(J,Zt),zt;if(Ct===null){for(;!ve.done;Zt++,ve=W.next())ve=ct(J,ve.value,rt),ve!==null&&(k=x(ve,k,Zt),ge===null?zt=ve:ge.sibling=ve,ge=ve);return te&&el(J,Zt),zt}for(Ct=c(Ct);!ve.done;Zt++,ve=W.next())ve=it(Ct,J,Zt,ve.value,rt),ve!==null&&(e&&ve.alternate!==null&&Ct.delete(ve.key===null?Zt:ve.key),k=x(ve,k,Zt),ge===null?zt=ve:ge.sibling=ve,ge=ve);return e&&Ct.forEach(function(tb){return i(J,tb)}),te&&el(J,Zt),zt}function Re(J,k,W,rt){if(typeof W=="object"&&W!==null&&W.type===z&&W.key===null&&(W=W.props.children),typeof W=="object"&&W!==null){switch(W.$$typeof){case E:t:{for(var zt=W.key;k!==null;){if(k.key===zt){if(zt=W.type,zt===z){if(k.tag===7){r(J,k.sibling),rt=p(k,W.props.children),rt.return=J,J=rt;break t}}else if(k.elementType===zt||typeof zt=="object"&&zt!==null&&zt.$$typeof===pt&&Ds(zt)===k.type){r(J,k.sibling),rt=p(k,W.props),zr(rt,W),rt.return=J,J=rt;break t}r(J,k);break}else i(J,k);k=k.sibling}W.type===z?(rt=tl(W.props.children,J.mode,rt,W.key),rt.return=J,J=rt):(rt=br(W.type,W.key,W.props,null,J.mode,rt),zr(rt,W),rt.return=J,J=rt)}return A(J);case M:t:{for(zt=W.key;k!==null;){if(k.key===zt)if(k.tag===4&&k.stateNode.containerInfo===W.containerInfo&&k.stateNode.implementation===W.implementation){r(J,k.sibling),rt=p(k,W.children||[]),rt.return=J,J=rt;break t}else{r(J,k);break}else i(J,k);k=k.sibling}rt=ni(W,J.mode,rt),rt.return=J,J=rt}return A(J);case pt:return W=Ds(W),Re(J,k,W,rt)}if(Dt(W))return Et(J,k,W,rt);if(vt(W)){if(zt=vt(W),typeof zt!="function")throw Error(l(150));return W=zt.call(W),wt(J,k,W,rt)}if(typeof W.then=="function")return Re(J,k,Wo(W),rt);if(W.$$typeof===B)return Re(J,k,Ar(J,W),rt);Dr(J,W)}return typeof W=="string"&&W!==""||typeof W=="number"||typeof W=="bigint"?(W=""+W,k!==null&&k.tag===6?(r(J,k.sibling),rt=p(k,W),rt.return=J,J=rt):(r(J,k),rt=Vo(W,J.mode,rt),rt.return=J,J=rt),A(J)):r(J,k)}return function(J,k,W,rt){try{Jl=0;var zt=Re(J,k,W,rt);return Zl=null,zt}catch(Ct){if(Ct===Kl||Ct===li)throw Ct;var ge=Vn(29,Ct,null,J.mode);return ge.lanes=rt,ge.return=J,ge}finally{}}}var Os=Eu(!0),kd=Eu(!1),Pl=!1;function jf(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function qf(e,i){e=e.updateQueue,i.updateQueue===e&&(i.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,callbacks:null})}function Ri(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function ul(e,i,r){var c=e.updateQueue;if(c===null)return null;if(c=c.shared,(ne&2)!==0){var p=c.pending;return p===null?i.next=i:(i.next=p.next,p.next=i),c.pending=i,i=xu(e),Xo(e,null,r),i}return Sr(e,c,i,r),xu(e)}function Wl(e,i,r){if(i=i.updateQueue,i!==null&&(i=i.shared,(r&4194048)!==0)){var c=i.lanes;c&=e.pendingLanes,r|=c,i.lanes=r,mo(e,r)}}function Fo(e,i){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 A={lane:r.lane,tag:r.tag,payload:r.payload,callback:null,next:null};x===null?p=x=A:x=x.next=A,r=r.next}while(r!==null);x===null?p=x=i:x=x.next=i}else p=x=i;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=i:e.next=i,r.lastBaseUpdate=i}var Yf=!1;function Or(){if(Yf){var e=ii;if(e!==null)throw e}}function Ns(e,i,r,c){Yf=!1;var p=e.updateQueue;Pl=!1;var x=p.firstBaseUpdate,A=p.lastBaseUpdate,O=p.shared.pending;if(O!==null){p.shared.pending=null;var Y=O,F=Y.next;Y.next=null,A===null?x=F:A.next=F,A=Y;var lt=e.alternate;lt!==null&&(lt=lt.updateQueue,O=lt.lastBaseUpdate,O!==A&&(O===null?lt.firstBaseUpdate=F:O.next=F,lt.lastBaseUpdate=Y))}if(x!==null){var ct=p.baseState;A=0,lt=F=Y=null,O=x;do{var tt=O.lane&-536870913,it=tt!==O.lane;if(it?($t&tt)===tt:(c&tt)===tt){tt!==0&&tt===sl&&(Yf=!0),lt!==null&&(lt=lt.next={lane:0,tag:O.tag,payload:O.payload,callback:null,next:null});t:{var Et=e,wt=O;tt=i;var Re=r;switch(wt.tag){case 1:if(Et=wt.payload,typeof Et=="function"){ct=Et.call(Re,ct,tt);break t}ct=Et;break t;case 3:Et.flags=Et.flags&-65537|128;case 0:if(Et=wt.payload,tt=typeof Et=="function"?Et.call(Re,ct,tt):Et,tt==null)break t;ct=b({},ct,tt);break t;case 2:Pl=!0}}tt=O.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:O.tag,payload:O.payload,callback:O.callback,next:null},lt===null?(F=lt=it,Y=ct):lt=lt.next=it,A|=tt;if(O=O.next,O===null){if(O=p.shared.pending,O===null)break;it=O,O=it.next,it.next=null,p.lastBaseUpdate=it,p.shared.pending=null}}while(!0);lt===null&&(Y=ct),p.baseState=Y,p.firstBaseUpdate=F,p.lastBaseUpdate=lt,x===null&&(p.shared.lanes=0),Oa|=A,e.lanes=A,e.memoizedState=ct}}function zi(e,i){if(typeof e!="function")throw Error(l(191,e));e.call(i)}function En(e,i){var r=e.callbacks;if(r!==null)for(e.callbacks=null,e=0;e<r.length;e++)zi(r[e],i)}var Sa=j(null),kn=j(0);function Lf(e,i){e=We,st(kn,e),st(Sa,i),We=e|i.baseLanes}function Xf(){st(kn,We),st(Sa,Sa.current)}function Bn(){We=kn.current,I(Sa),I(kn)}var hn=j(null),Va=null;function Fl(e){var i=e.alternate;st(qe,qe.current&1),st(hn,e),Va===null&&(i===null||Sa.current!==null||i.memoizedState!==null)&&(Va=e)}function Vf(e){st(qe,qe.current),st(hn,e),Va===null&&(Va=e)}function Kd(e){e.tag===22?(st(qe,qe.current),st(hn,e),Va===null&&(Va=e)):rl()}function rl(){st(qe,qe.current),st(hn,hn.current)}function ba(e){I(hn),Va===e&&(Va=null),I(qe)}var qe=j(0);function Io(e){for(var i=e;i!==null;){if(i.tag===13){var r=i.memoizedState;if(r!==null&&(r=r.dehydrated,r===null||$p(r)||ty(r)))return i}else if(i.tag===19&&(i.memoizedProps.revealOrder==="forwards"||i.memoizedProps.revealOrder==="backwards"||i.memoizedProps.revealOrder==="unstable_legacy-backwards"||i.memoizedProps.revealOrder==="together")){if((i.flags&128)!==0)return i}else if(i.child!==null){i.child.return=i,i=i.child;continue}if(i===e)break;for(;i.sibling===null;){if(i.return===null||i.return===e)return null;i=i.return}i.sibling.return=i.return,i=i.sibling}return null}var aa=0,Ht=null,Se=null,en=null,$o=!1,Di=!1,Us=!1,tc=0,Nr=0,Oi=null,Op=0;function Ye(){throw Error(l(321))}function Qf(e,i){if(i===null)return!1;for(var r=0;r<i.length&&r<e.length;r++)if(!Ne(e[r],i[r]))return!1;return!0}function kf(e,i,r,c,p,x){return aa=x,Ht=i,i.memoizedState=null,i.updateQueue=null,i.lanes=0,w.H=e===null||e.memoizedState===null?hm:Mu,Us=!1,x=r(c,p),Us=!1,Di&&(x=Jd(i,r,c,p)),Zd(e),x}function Zd(e){w.H=Gr;var i=Se!==null&&Se.next!==null;if(aa=0,en=Se=Ht=null,$o=!1,Nr=0,Oi=null,i)throw Error(l(300));e===null||Ue||(e=e.dependencies,e!==null&&Su(e)&&(Ue=!0))}function Jd(e,i,r,c){Ht=e;var p=0;do{if(Di&&(Oi=null),Nr=0,Di=!1,25<=p)throw Error(l(301));if(p+=1,en=Se=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=jr,x=i(r,c)}while(Di);return x}function Np(){var e=w.H,i=e.useState()[0];return i=typeof i.then=="function"?Br(i):i,e=e.useState()[0],(Se!==null?Se.memoizedState:null)!==e&&(Ht.flags|=1024),i}function Kf(){var e=tc!==0;return tc=0,e}function Zf(e,i,r){i.updateQueue=e.updateQueue,i.flags&=-2053,e.lanes&=~r}function Jf(e){if($o){for(e=e.memoizedState;e!==null;){var i=e.queue;i!==null&&(i.pending=null),e=e.next}$o=!1}aa=0,en=Se=Ht=null,Di=!1,Nr=tc=0,Oi=null}function Kn(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return en===null?Ht.memoizedState=en=e:en=en.next=e,en}function Ke(){if(Se===null){var e=Ht.alternate;e=e!==null?e.memoizedState:null}else e=Se.next;var i=en===null?Ht.memoizedState:en.next;if(i!==null)en=i,Se=e;else{if(e===null)throw Ht.alternate===null?Error(l(467)):Error(l(310));Se=e,e={memoizedState:Se.memoizedState,baseState:Se.baseState,baseQueue:Se.baseQueue,queue:Se.queue,next:null},en===null?Ht.memoizedState=en=e:en=en.next=e}return en}function Ur(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function Br(e){var i=Nr;return Nr+=1,Oi===null&&(Oi=[]),e=Hf(Oi,e,i),i=Ht,(en===null?i.memoizedState:en.next)===null&&(i=i.alternate,w.H=i===null||i.memoizedState===null?hm:Mu),e}function ec(e){if(e!==null&&typeof e=="object"){if(typeof e.then=="function")return Br(e);if(e.$$typeof===B)return xn(e)}throw Error(l(438,String(e)))}function Pf(e){var i=null,r=Ht.updateQueue;if(r!==null&&(i=r.memoCache),i==null){var c=Ht.alternate;c!==null&&(c=c.updateQueue,c!==null&&(c=c.memoCache,c!=null&&(i={data:c.data.map(function(p){return p.slice()}),index:0})))}if(i==null&&(i={data:[],index:0}),r===null&&(r=Ur(),Ht.updateQueue=r),r.memoCache=i,r=i.data[i.index],r===void 0)for(r=i.data[i.index]=Array(e),c=0;c<e;c++)r[c]=ft;return i.index++,r}function ol(e,i){return typeof i=="function"?i(e):i}function nc(e){var i=Ke();return Wf(i,Se,e)}function Wf(e,i,r){var c=e.queue;if(c===null)throw Error(l(311));c.lastRenderedReducer=r;var p=e.baseQueue,x=c.pending;if(x!==null){if(p!==null){var A=p.next;p.next=x.next,x.next=A}i.baseQueue=p=x,c.pending=null}if(x=e.baseState,p===null)e.memoizedState=x;else{i=p.next;var O=A=null,Y=null,F=i,lt=!1;do{var ct=F.lane&-536870913;if(ct!==F.lane?($t&ct)===ct:(aa&ct)===ct){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}),ct===sl&&(lt=!0);else if((aa&tt)===tt){F=F.next,tt===sl&&(lt=!0);continue}else ct={lane:0,revertLane:F.revertLane,gesture:null,action:F.action,hasEagerState:F.hasEagerState,eagerState:F.eagerState,next:null},Y===null?(O=Y=ct,A=x):Y=Y.next=ct,Ht.lanes|=tt,Oa|=tt;ct=F.action,Us&&r(x,ct),x=F.hasEagerState?F.eagerState:r(x,ct)}else tt={lane:ct,revertLane:F.revertLane,gesture:F.gesture,action:F.action,hasEagerState:F.hasEagerState,eagerState:F.eagerState,next:null},Y===null?(O=Y=tt,A=x):Y=Y.next=tt,Ht.lanes|=ct,Oa|=ct;F=F.next}while(F!==null&&F!==i);if(Y===null?A=x:Y.next=O,!Ne(x,e.memoizedState)&&(Ue=!0,lt&&(r=ii,r!==null)))throw r;e.memoizedState=x,e.baseState=A,e.baseQueue=Y,c.lastRenderedState=x}return p===null&&(c.lanes=0),[e.memoizedState,c.dispatch]}function ac(e){var i=Ke(),r=i.queue;if(r===null)throw Error(l(311));r.lastRenderedReducer=e;var c=r.dispatch,p=r.pending,x=i.memoizedState;if(p!==null){r.pending=null;var A=p=p.next;do x=e(x,A.action),A=A.next;while(A!==p);Ne(x,i.memoizedState)||(Ue=!0),i.memoizedState=x,i.baseQueue===null&&(i.baseState=x),r.lastRenderedState=x}return[x,c]}function Ff(e,i,r){var c=Ht,p=Ke(),x=te;if(x){if(r===void 0)throw Error(l(407));r=r()}else r=i();var A=!Ne((Se||p).memoizedState,r);if(A&&(p.memoizedState=r,Ue=!0),p=p.queue,nh($f.bind(null,c,p,e),[e]),p.getSnapshot!==i||A||en!==null&&en.memoizedState.tag&1){if(c.flags|=2048,Cu(9,{destroy:void 0},If.bind(null,c,p,r,i),null),pe===null)throw Error(l(349));x||(aa&127)!==0||Pd(c,i,r)}return r}function Pd(e,i,r){e.flags|=16384,e={getSnapshot:i,value:r},i=Ht.updateQueue,i===null?(i=Ur(),Ht.updateQueue=i,i.stores=[e]):(r=i.stores,r===null?i.stores=[e]:r.push(e))}function If(e,i,r,c){i.value=r,i.getSnapshot=c,th(i)&&ic(e)}function $f(e,i,r){return r(function(){th(i)&&ic(e)})}function th(e){var i=e.getSnapshot;e=e.value;try{var r=i();return!Ne(e,r)}catch{return!0}}function ic(e){var i=Ll(e,2);i!==null&&u(i,e,2)}function wr(e){var i=Kn();if(typeof e=="function"){var r=e;if(e=r(),Us){La(!0);try{r()}finally{La(!1)}}}return i.memoizedState=i.baseState=e,i.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:ol,lastRenderedState:e},i}function Wd(e,i,r,c){return e.baseState=r,Wf(e,Se,typeof c=="function"?c:ol)}function Up(e,i,r,c,p){if(cl(e))throw Error(l(485));if(e=i.action,e!==null){var x={payload:p,action:e,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(A){x.listeners.push(A)}};w.T!==null?r(!0):x.isTransition=!1,c(x),r=i.pending,r===null?(x.next=i.pending=x,Fd(i,x)):(x.next=r.next,i.pending=r.next=x)}}function Fd(e,i){var r=i.action,c=i.payload,p=e.state;if(i.isTransition){var x=w.T,A={};w.T=A;try{var O=r(p,c),Y=w.S;Y!==null&&Y(A,O),Id(e,i,O)}catch(F){lc(e,i,F)}finally{x!==null&&A.types!==null&&(x.types=A.types),w.T=x}}else try{x=r(p,c),Id(e,i,x)}catch(F){lc(e,i,F)}}function Id(e,i,r){r!==null&&typeof r=="object"&&typeof r.then=="function"?r.then(function(c){eh(e,i,c)},function(c){return lc(e,i,c)}):eh(e,i,r)}function eh(e,i,r){i.status="fulfilled",i.value=r,$d(i),e.state=r,i=e.pending,i!==null&&(r=i.next,r===i?e.pending=null:(r=r.next,i.next=r,Fd(e,r)))}function lc(e,i,r){var c=e.pending;if(e.pending=null,c!==null){c=c.next;do i.status="rejected",i.reason=r,$d(i),i=i.next;while(i!==c)}e.action=null}function $d(e){e=e.listeners;for(var i=0;i<e.length;i++)(0,e[i])()}function tm(e,i){return i}function em(e,i){if(te){var r=pe.formState;if(r!==null){t:{var c=Ht;if(te){if(Ce){e:{for(var p=Ce,x=vn;p.nodeType!==8;){if(!x){p=null;break e}if(p=Gi(p.nextSibling),p===null){p=null;break e}}x=p.data,p=x==="F!"||x==="F"?p:null}if(p){Ce=Gi(p.nextSibling),c=p.data==="F!";break t}}It(c)}c=!1}c&&(i=r[0])}}return r=Kn(),r.memoizedState=r.baseState=i,c={pending:null,lanes:0,dispatch:null,lastRenderedReducer:tm,lastRenderedState:i},r.queue=c,r=fm.bind(null,Ht,c),c.dispatch=r,c=wr(!1),x=Hr.bind(null,Ht,!1,c.queue),c=Kn(),p={state:i,dispatch:null,action:e,pending:null},c.queue=p,r=Up.bind(null,Ht,p,x,r),p.dispatch=r,c.memoizedState=e,[i,r,!1]}function nm(e){var i=Ke();return am(i,Se,e)}function am(e,i,r){if(i=Wf(e,i,tm)[0],e=nc(ol)[0],typeof i=="object"&&i!==null&&typeof i.then=="function")try{var c=Br(i)}catch(A){throw A===Kl?li:A}else c=i;i=Ke();var p=i.queue,x=p.dispatch;return r!==i.memoizedState&&(Ht.flags|=2048,Cu(9,{destroy:void 0},Bp.bind(null,p,r),null)),[c,x,e]}function Bp(e,i){e.action=i}function im(e){var i=Ke(),r=Se;if(r!==null)return am(i,r,e);Ke(),i=i.memoizedState,r=Ke();var c=r.queue.dispatch;return r.memoizedState=e,[i,c,!1]}function Cu(e,i,r,c){return e={tag:e,create:r,deps:c,inst:i,next:null},i=Ht.updateQueue,i===null&&(i=Ur(),Ht.updateQueue=i),r=i.lastEffect,r===null?i.lastEffect=e.next=e:(c=r.next,r.next=e,e.next=c,i.lastEffect=e),e}function lm(){return Ke().memoizedState}function sc(e,i,r,c){var p=Kn();Ht.flags|=e,p.memoizedState=Cu(1|i,{destroy:void 0},r,c===void 0?null:c)}function uc(e,i,r,c){var p=Ke();c=c===void 0?null:c;var x=p.memoizedState.inst;Se!==null&&c!==null&&Qf(c,Se.memoizedState.deps)?p.memoizedState=Cu(i,x,r,c):(Ht.flags|=e,p.memoizedState=Cu(1|i,x,r,c))}function sm(e,i){sc(8390656,8,e,i)}function nh(e,i){uc(2048,8,e,i)}function um(e){Ht.flags|=4;var i=Ht.updateQueue;if(i===null)i=Ur(),Ht.updateQueue=i,i.events=[e];else{var r=i.events;r===null?i.events=[e]:r.push(e)}}function rm(e){var i=Ke().memoizedState;return um({ref:i,nextImpl:e}),function(){if((ne&2)!==0)throw Error(l(440));return i.impl.apply(void 0,arguments)}}function om(e,i){return uc(4,2,e,i)}function Ta(e,i){return uc(4,4,e,i)}function ah(e,i){if(typeof i=="function"){e=e();var r=i(e);return function(){typeof r=="function"?r():i(null)}}if(i!=null)return e=e(),i.current=e,function(){i.current=null}}function rc(e,i,r){r=r!=null?r.concat([e]):null,uc(4,4,ah.bind(null,i,e),r)}function oc(){}function ih(e,i){var r=Ke();i=i===void 0?null:i;var c=r.memoizedState;return i!==null&&Qf(i,c[1])?c[0]:(r.memoizedState=[e,i],e)}function lh(e,i){var r=Ke();i=i===void 0?null:i;var c=r.memoizedState;if(i!==null&&Qf(i,c[1]))return c[0];if(c=e(),Us){La(!0);try{e()}finally{La(!1)}}return r.memoizedState=[c,i],c}function sh(e,i,r){return r===void 0||(aa&1073741824)!==0&&($t&261930)===0?e.memoizedState=i:(e.memoizedState=r,e=s(),Ht.lanes|=e,Oa|=e,r)}function uh(e,i,r,c){return Ne(r,i)?r:Sa.current!==null?(e=sh(e,r,c),Ne(e,i)||(Ue=!0),e):(aa&42)===0||(aa&1073741824)!==0&&($t&261930)===0?(Ue=!0,e.memoizedState=r):(e=s(),Ht.lanes|=e,Oa|=e,i)}function rh(e,i,r,c,p){var x=H.p;H.p=x!==0&&8>x?x:8;var A=w.T,O={};w.T=O,Hr(e,!1,i,r);try{var Y=p(),F=w.S;if(F!==null&&F(O,Y),Y!==null&&typeof Y=="object"&&typeof Y.then=="function"){var lt=wf(Y,c);Au(e,i,lt,Jn(e))}else Au(e,i,c,Jn(e))}catch(ct){Au(e,i,{then:function(){},status:"rejected",reason:ct},Jn())}finally{H.p=x,A!==null&&O.types!==null&&(A.types=O.types),w.T=A}}function wp(){}function oh(e,i,r,c){if(e.tag!==5)throw Error(l(476));var p=cm(e).queue;rh(e,p,i,at,r===null?wp:function(){return ch(e),r(c)})}function cm(e){var i=e.memoizedState;if(i!==null)return i;i={memoizedState:at,baseState:at,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:ol,lastRenderedState:at},next:null};var r={};return i.next={memoizedState:r,baseState:r,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:ol,lastRenderedState:r},next:null},e.memoizedState=i,e=e.alternate,e!==null&&(e.memoizedState=i),i}function ch(e){var i=cm(e);i.next===null&&(i=e.alternate.memoizedState),Au(e,i.next.queue,{},Jn())}function fh(){return xn(Eh)}function Cn(){return Ke().memoizedState}function hh(){return Ke().memoizedState}function Hp(e){for(var i=e.return;i!==null;){switch(i.tag){case 24:case 3:var r=Jn();e=Ri(r);var c=ul(i,e,r);c!==null&&(u(c,i,r),Wl(c,i,r)),i={cache:Nf()},e.payload=i;return}i=i.return}}function Gp(e,i,r){var c=Jn();r={lane:c,revertLane:0,gesture:null,action:r,hasEagerState:!1,eagerState:null,next:null},cl(e)?Bs(i,r):(r=vu(e,i,r,c),r!==null&&(u(r,e,c),ia(r,i,c)))}function fm(e,i,r){var c=Jn();Au(e,i,r,c)}function Au(e,i,r,c){var p={lane:c,revertLane:0,gesture:null,action:r,hasEagerState:!1,eagerState:null,next:null};if(cl(e))Bs(i,p);else{var x=e.alternate;if(e.lanes===0&&(x===null||x.lanes===0)&&(x=i.lastRenderedReducer,x!==null))try{var A=i.lastRenderedState,O=x(A,r);if(p.hasEagerState=!0,p.eagerState=O,Ne(O,A))return Sr(e,i,p,0),pe===null&&Yl(),!1}catch{}finally{}if(r=vu(e,i,p,c),r!==null)return u(r,e,c),ia(r,i,c),!0}return!1}function Hr(e,i,r,c){if(c={lane:2,revertLane:Lp(),gesture:null,action:c,hasEagerState:!1,eagerState:null,next:null},cl(e)){if(i)throw Error(l(479))}else i=vu(e,r,c,2),i!==null&&u(i,e,2)}function cl(e){var i=e.alternate;return e===Ht||i!==null&&i===Ht}function Bs(e,i){Di=$o=!0;var r=e.pending;r===null?i.next=i:(i.next=r.next,r.next=i),e.pending=i}function ia(e,i,r){if((r&4194048)!==0){var c=i.lanes;c&=e.pendingLanes,r|=c,i.lanes=r,mo(e,r)}}var Gr={readContext:xn,use:ec,useCallback:Ye,useContext:Ye,useEffect:Ye,useImperativeHandle:Ye,useLayoutEffect:Ye,useInsertionEffect:Ye,useMemo:Ye,useReducer:Ye,useRef:Ye,useState:Ye,useDebugValue:Ye,useDeferredValue:Ye,useTransition:Ye,useSyncExternalStore:Ye,useId:Ye,useHostTransitionStatus:Ye,useFormState:Ye,useActionState:Ye,useOptimistic:Ye,useMemoCache:Ye,useCacheRefresh:Ye};Gr.useEffectEvent=Ye;var hm={readContext:xn,use:ec,useCallback:function(e,i){return Kn().memoizedState=[e,i===void 0?null:i],e},useContext:xn,useEffect:sm,useImperativeHandle:function(e,i,r){r=r!=null?r.concat([e]):null,sc(4194308,4,ah.bind(null,i,e),r)},useLayoutEffect:function(e,i){return sc(4194308,4,e,i)},useInsertionEffect:function(e,i){sc(4,2,e,i)},useMemo:function(e,i){var r=Kn();i=i===void 0?null:i;var c=e();if(Us){La(!0);try{e()}finally{La(!1)}}return r.memoizedState=[c,i],c},useReducer:function(e,i,r){var c=Kn();if(r!==void 0){var p=r(i);if(Us){La(!0);try{r(i)}finally{La(!1)}}}else p=i;return c.memoizedState=c.baseState=p,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:p},c.queue=e,e=e.dispatch=Gp.bind(null,Ht,e),[c.memoizedState,e]},useRef:function(e){var i=Kn();return e={current:e},i.memoizedState=e},useState:function(e){e=wr(e);var i=e.queue,r=fm.bind(null,Ht,i);return i.dispatch=r,[e.memoizedState,r]},useDebugValue:oc,useDeferredValue:function(e,i){var r=Kn();return sh(r,e,i)},useTransition:function(){var e=wr(!1);return e=rh.bind(null,Ht,e.queue,!0,!1),Kn().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,i,r){var c=Ht,p=Kn();if(te){if(r===void 0)throw Error(l(407));r=r()}else{if(r=i(),pe===null)throw Error(l(349));($t&127)!==0||Pd(c,i,r)}p.memoizedState=r;var x={value:r,getSnapshot:i};return p.queue=x,sm($f.bind(null,c,x,e),[e]),c.flags|=2048,Cu(9,{destroy:void 0},If.bind(null,c,x,r,i),null),r},useId:function(){var e=Kn(),i=pe.identifierPrefix;if(te){var r=Ai,c=Ci;r=(c&~(1<<32-Ln(c)-1)).toString(32)+r,i="_"+i+"R_"+r,r=tc++,0<r&&(i+="H"+r.toString(32)),i+="_"}else r=Op++,i="_"+i+"r_"+r.toString(32)+"_";return e.memoizedState=i},useHostTransitionStatus:fh,useFormState:em,useActionState:em,useOptimistic:function(e){var i=Kn();i.memoizedState=i.baseState=e;var r={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return i.queue=r,i=Hr.bind(null,Ht,!0,r),r.dispatch=i,[e,i]},useMemoCache:Pf,useCacheRefresh:function(){return Kn().memoizedState=Hp.bind(null,Ht)},useEffectEvent:function(e){var i=Kn(),r={impl:e};return i.memoizedState=r,function(){if((ne&2)!==0)throw Error(l(440));return r.impl.apply(void 0,arguments)}}},Mu={readContext:xn,use:ec,useCallback:ih,useContext:xn,useEffect:nh,useImperativeHandle:rc,useInsertionEffect:om,useLayoutEffect:Ta,useMemo:lh,useReducer:nc,useRef:lm,useState:function(){return nc(ol)},useDebugValue:oc,useDeferredValue:function(e,i){var r=Ke();return uh(r,Se.memoizedState,e,i)},useTransition:function(){var e=nc(ol)[0],i=Ke().memoizedState;return[typeof e=="boolean"?e:Br(e),i]},useSyncExternalStore:Ff,useId:Cn,useHostTransitionStatus:fh,useFormState:nm,useActionState:nm,useOptimistic:function(e,i){var r=Ke();return Wd(r,Se,e,i)},useMemoCache:Pf,useCacheRefresh:hh};Mu.useEffectEvent=rm;var jr={readContext:xn,use:ec,useCallback:ih,useContext:xn,useEffect:nh,useImperativeHandle:rc,useInsertionEffect:om,useLayoutEffect:Ta,useMemo:lh,useReducer:ac,useRef:lm,useState:function(){return ac(ol)},useDebugValue:oc,useDeferredValue:function(e,i){var r=Ke();return Se===null?sh(r,e,i):uh(r,Se.memoizedState,e,i)},useTransition:function(){var e=ac(ol)[0],i=Ke().memoizedState;return[typeof e=="boolean"?e:Br(e),i]},useSyncExternalStore:Ff,useId:Cn,useHostTransitionStatus:fh,useFormState:im,useActionState:im,useOptimistic:function(e,i){var r=Ke();return Se!==null?Wd(r,Se,e,i):(r.baseState=e,[e,r.queue.dispatch])},useMemoCache:Pf,useCacheRefresh:hh};jr.useEffectEvent=rm;function Ru(e,i,r,c){i=e.memoizedState,r=r(c,i),r=r==null?i:b({},i,r),e.memoizedState=r,e.lanes===0&&(e.updateQueue.baseState=r)}var qr={enqueueSetState:function(e,i,r){e=e._reactInternals;var c=Jn(),p=Ri(c);p.payload=i,r!=null&&(p.callback=r),i=ul(e,p,c),i!==null&&(u(i,e,c),Wl(i,e,c))},enqueueReplaceState:function(e,i,r){e=e._reactInternals;var c=Jn(),p=Ri(c);p.tag=1,p.payload=i,r!=null&&(p.callback=r),i=ul(e,p,c),i!==null&&(u(i,e,c),Wl(i,e,c))},enqueueForceUpdate:function(e,i){e=e._reactInternals;var r=Jn(),c=Ri(r);c.tag=2,i!=null&&(c.callback=i),i=ul(e,c,r),i!==null&&(u(i,e,r),Wl(i,e,r))}};function dm(e,i,r,c,p,x,A){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(c,x,A):i.prototype&&i.prototype.isPureReactComponent?!hu(r,c)||!hu(p,x):!0}function mm(e,i,r,c){e=i.state,typeof i.componentWillReceiveProps=="function"&&i.componentWillReceiveProps(r,c),typeof i.UNSAFE_componentWillReceiveProps=="function"&&i.UNSAFE_componentWillReceiveProps(r,c),i.state!==e&&qr.enqueueReplaceState(i,i.state,null)}function An(e,i){var r=i;if("ref"in i){r={};for(var c in i)c!=="ref"&&(r[c]=i[c])}if(e=e.defaultProps){r===i&&(r=b({},r));for(var p in e)r[p]===void 0&&(r[p]=e[p])}return r}function dh(e){ql(e)}function pm(e){console.error(e)}function cc(e){ql(e)}function fc(e,i){try{var r=e.onUncaughtError;r(i.value,{componentStack:i.stack})}catch(c){setTimeout(function(){throw c})}}function ym(e,i,r){try{var c=e.onCaughtError;c(r.value,{componentStack:r.stack,errorBoundary:i.tag===1?i.stateNode:null})}catch(p){setTimeout(function(){throw p})}}function mh(e,i,r){return r=Ri(r),r.tag=3,r.payload={element:null},r.callback=function(){fc(e,i)},r}function zu(e){return e=Ri(e),e.tag=3,e}function la(e,i,r,c){var p=r.type.getDerivedStateFromError;if(typeof p=="function"){var x=c.value;e.payload=function(){return p(x)},e.callback=function(){ym(i,r,c)}}var A=r.stateNode;A!==null&&typeof A.componentDidCatch=="function"&&(e.callback=function(){ym(i,r,c),typeof p!="function"&&(Hi===null?Hi=new Set([this]):Hi.add(this));var O=c.stack;this.componentDidCatch(c.value,{componentStack:O!==null?O:""})})}function Ea(e,i,r,c,p){if(r.flags|=32768,c!==null&&typeof c=="object"&&typeof c.then=="function"){if(i=r.alternate,i!==null&&Ql(i,r,p,!0),r=hn.current,r!==null){switch(r.tag){case 31:case 13:return Va===null?Yt():r.alternate===null&&ye===0&&(ye=3),r.flags&=-257,r.flags|=65536,r.lanes=p,c===Rr?r.flags|=16384:(i=r.updateQueue,i===null?r.updateQueue=new Set([c]):i.add(c),jp(e,c,p)),!1;case 22:return r.flags|=65536,c===Rr?r.flags|=16384:(i=r.updateQueue,i===null?(i={transitions:null,markerInstances:null,retryQueue:new Set([c])},r.updateQueue=i):(r=i.retryQueue,r===null?i.retryQueue=new Set([c]):r.add(c)),jp(e,c,p)),!1}throw Error(l(435,r.tag))}return jp(e,c,p),Yt(),!1}if(te)return i=hn.current,i!==null?((i.flags&65536)===0&&(i.flags|=256),i.flags|=65536,i.lanes=p,c!==ko&&(e=Error(l(422),{cause:c}),Cr(ea(e,r)))):(c!==ko&&(i=Error(l(423),{cause:c}),Cr(ea(i,r))),e=e.current.alternate,e.flags|=65536,p&=-p,e.lanes|=p,c=ea(c,r),p=mh(e.stateNode,c,p),Fo(e,p),ye!==4&&(ye=2)),!1;var x=Error(l(520),{cause:c});if(x=ea(x,r),ci===null?ci=[x]:ci.push(x),ye!==4&&(ye=2),i===null)return!0;c=ea(c,r),r=i;do{switch(r.tag){case 3:return r.flags|=65536,e=p&-p,r.lanes|=e,e=mh(r.stateNode,c,e),Fo(r,e),!1;case 1:if(i=r.type,x=r.stateNode,(r.flags&128)===0&&(typeof i.getDerivedStateFromError=="function"||x!==null&&typeof x.componentDidCatch=="function"&&(Hi===null||!Hi.has(x))))return r.flags|=65536,p&=-p,r.lanes|=p,p=zu(p),la(p,e,r,c),Fo(r,p),!1}r=r.return}while(r!==null);return!1}var hc=Error(l(461)),Ue=!1;function Le(e,i,r,c){i.child=e===null?kd(i,null,r,c):Os(i,e.child,r,c)}function Yr(e,i,r,c,p){r=r.render;var x=i.ref;if("ref"in c){var A={};for(var O in c)O!=="ref"&&(A[O]=c[O])}else A=c;return Rs(i),c=kf(e,i,r,A,x,p),O=Kf(),e!==null&&!Ue?(Zf(e,i,p),ri(e,i,p)):(te&&O&&Qo(i),i.flags|=1,Le(e,i,c,p),i.child)}function Lr(e,i,r,c,p){if(e===null){var x=r.type;return typeof x=="function"&&!Qn(x)&&x.defaultProps===void 0&&r.compare===null?(i.tag=15,i.type=x,Ca(e,i,x,c,p)):(e=br(r.type,null,c,i,i.mode,p),e.ref=i.ref,e.return=i,i.child=e)}if(x=e.child,!$l(e,p)){var A=x.memoizedProps;if(r=r.compare,r=r!==null?r:hu,r(A,c)&&e.ref===i.ref)return ri(e,i,p)}return i.flags|=1,e=Ti(x,c),e.ref=i.ref,e.return=i,i.child=e}function Ca(e,i,r,c,p){if(e!==null){var x=e.memoizedProps;if(hu(x,c)&&e.ref===i.ref)if(Ue=!1,i.pendingProps=c=x,$l(e,p))(e.flags&131072)!==0&&(Ue=!0);else return i.lanes=e.lanes,ri(e,i,p)}return Du(e,i,r,c,p)}function Aa(e,i,r,c){var p=c.children,x=e!==null?e.memoizedState:null;if(e===null&&i.stateNode===null&&(i.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),c.mode==="hidden"){if((i.flags&128)!==0){if(x=x!==null?x.baseLanes|r:r,e!==null){for(c=i.child=e.child,p=0;c!==null;)p=p|c.lanes|c.childLanes,c=c.sibling;c=p&~x}else c=0,i.child=null;return Ni(e,i,x,r,c)}if((r&536870912)!==0)i.memoizedState={baseLanes:0,cachePool:null},e!==null&&Tu(i,x!==null?x.cachePool:null),x!==null?Lf(i,x):Xf(),Kd(i);else return c=i.lanes=536870912,Ni(e,i,x!==null?x.baseLanes|r:r,r,c)}else x!==null?(Tu(i,x.cachePool),Lf(i,x),rl(),i.memoizedState=null):(e!==null&&Tu(i,null),Xf(),rl());return Le(e,i,p,r),i.child}function si(e,i){return e!==null&&e.tag===22||i.stateNode!==null||(i.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),i.sibling}function Ni(e,i,r,c,p){var x=Mi();return x=x===null?null:{parent:Mt._currentValue,pool:x},i.memoizedState={baseLanes:r,cachePool:x},e!==null&&Tu(i,null),Xf(),Kd(i),e!==null&&Ql(e,i,c,!0),i.childLanes=p,null}function Qa(e,i){return i=Ou({mode:i.mode,children:i.children},e.mode),i.ref=e.ref,e.child=i,i.return=e,i}function _n(e,i,r){return Os(i,e.child,null,r),e=Qa(i,i.pendingProps),e.flags|=2,ba(i),i.memoizedState=null,e}function Xr(e,i,r){var c=i.pendingProps,p=(i.flags&128)!==0;if(i.flags&=-129,e===null){if(te){if(c.mode==="hidden")return e=Qa(i,c),i.lanes=536870912,si(null,e);if(Vf(i),(e=Ce)?(e=Tg(e,vn),e=e!==null&&e.data==="&"?e:null,e!==null&&(i.memoizedState={dehydrated:e,treeContext:Ei!==null?{id:Ci,overflow:Ai}:null,retryLane:536870912,hydrationErrors:null},r=qd(e),r.return=i,i.child=r,gn=i,Ce=null)):e=null,e===null)throw It(i);return i.lanes=536870912,null}return Qa(i,c)}var x=e.memoizedState;if(x!==null){var A=x.dehydrated;if(Vf(i),p)if(i.flags&256)i.flags&=-257,i=_n(e,i,r);else if(i.memoizedState!==null)i.child=e.child,i.flags|=128,i=null;else throw Error(l(558));else if(Ue||Ql(e,i,r,!1),p=(r&e.childLanes)!==0,Ue||p){if(c=pe,c!==null&&(A=po(c,r),A!==0&&A!==x.retryLane))throw x.retryLane=A,Ll(e,A),u(c,e,A),hc;Yt(),i=_n(e,i,r)}else e=x.treeContext,Ce=Gi(A.nextSibling),gn=i,te=!0,nl=null,vn=!1,e!==null&&Er(i,e),i=Qa(i,c),i.flags|=4096;return i}return e=Ti(e.child,{mode:c.mode,children:c.children}),e.ref=i.ref,i.child=e,e.return=i,e}function ui(e,i){var r=i.ref;if(r===null)e!==null&&e.ref!==null&&(i.flags|=4194816);else{if(typeof r!="function"&&typeof r!="object")throw Error(l(284));(e===null||e.ref!==r)&&(i.flags|=4194816)}}function Du(e,i,r,c,p){return Rs(i),r=kf(e,i,r,c,void 0,p),c=Kf(),e!==null&&!Ue?(Zf(e,i,p),ri(e,i,p)):(te&&c&&Qo(i),i.flags|=1,Le(e,i,r,p),i.child)}function wn(e,i,r,c,p,x){return Rs(i),i.updateQueue=null,r=Jd(i,c,r,p),Zd(e),c=Kf(),e!==null&&!Ue?(Zf(e,i,x),ri(e,i,x)):(te&&c&&Qo(i),i.flags|=1,Le(e,i,r,x),i.child)}function Mn(e,i,r,c,p){if(Rs(i),i.stateNode===null){var x=Xl,A=r.contextType;typeof A=="object"&&A!==null&&(x=xn(A)),x=new r(c,x),i.memoizedState=x.state!==null&&x.state!==void 0?x.state:null,x.updater=qr,i.stateNode=x,x._reactInternals=i,x=i.stateNode,x.props=c,x.state=i.memoizedState,x.refs={},jf(i),A=r.contextType,x.context=typeof A=="object"&&A!==null?xn(A):Xl,x.state=i.memoizedState,A=r.getDerivedStateFromProps,typeof A=="function"&&(Ru(i,r,A,c),x.state=i.memoizedState),typeof r.getDerivedStateFromProps=="function"||typeof x.getSnapshotBeforeUpdate=="function"||typeof x.UNSAFE_componentWillMount!="function"&&typeof x.componentWillMount!="function"||(A=x.state,typeof x.componentWillMount=="function"&&x.componentWillMount(),typeof x.UNSAFE_componentWillMount=="function"&&x.UNSAFE_componentWillMount(),A!==x.state&&qr.enqueueReplaceState(x,x.state,null),Ns(i,c,x,p),Or(),x.state=i.memoizedState),typeof x.componentDidMount=="function"&&(i.flags|=4194308),c=!0}else if(e===null){x=i.stateNode;var O=i.memoizedProps,Y=An(r,O);x.props=Y;var F=x.context,lt=r.contextType;A=Xl,typeof lt=="object"&<!==null&&(A=xn(lt));var ct=r.getDerivedStateFromProps;lt=typeof ct=="function"||typeof x.getSnapshotBeforeUpdate=="function",O=i.pendingProps!==O,lt||typeof x.UNSAFE_componentWillReceiveProps!="function"&&typeof x.componentWillReceiveProps!="function"||(O||F!==A)&&mm(i,x,c,A),Pl=!1;var tt=i.memoizedState;x.state=tt,Ns(i,c,x,p),Or(),F=i.memoizedState,O||tt!==F||Pl?(typeof ct=="function"&&(Ru(i,r,ct,c),F=i.memoizedState),(Y=Pl||dm(i,r,Y,c,tt,F,A))?(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"&&(i.flags|=4194308)):(typeof x.componentDidMount=="function"&&(i.flags|=4194308),i.memoizedProps=c,i.memoizedState=F),x.props=c,x.state=F,x.context=A,c=Y):(typeof x.componentDidMount=="function"&&(i.flags|=4194308),c=!1)}else{x=i.stateNode,qf(e,i),A=i.memoizedProps,lt=An(r,A),x.props=lt,ct=i.pendingProps,tt=x.context,F=r.contextType,Y=Xl,typeof F=="object"&&F!==null&&(Y=xn(F)),O=r.getDerivedStateFromProps,(F=typeof O=="function"||typeof x.getSnapshotBeforeUpdate=="function")||typeof x.UNSAFE_componentWillReceiveProps!="function"&&typeof x.componentWillReceiveProps!="function"||(A!==ct||tt!==Y)&&mm(i,x,c,Y),Pl=!1,tt=i.memoizedState,x.state=tt,Ns(i,c,x,p),Or();var it=i.memoizedState;A!==ct||tt!==it||Pl||e!==null&&e.dependencies!==null&&Su(e.dependencies)?(typeof O=="function"&&(Ru(i,r,O,c),it=i.memoizedState),(lt=Pl||dm(i,r,lt,c,tt,it,Y)||e!==null&&e.dependencies!==null&&Su(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"&&(i.flags|=4),typeof x.getSnapshotBeforeUpdate=="function"&&(i.flags|=1024)):(typeof x.componentDidUpdate!="function"||A===e.memoizedProps&&tt===e.memoizedState||(i.flags|=4),typeof x.getSnapshotBeforeUpdate!="function"||A===e.memoizedProps&&tt===e.memoizedState||(i.flags|=1024),i.memoizedProps=c,i.memoizedState=it),x.props=c,x.state=it,x.context=Y,c=lt):(typeof x.componentDidUpdate!="function"||A===e.memoizedProps&&tt===e.memoizedState||(i.flags|=4),typeof x.getSnapshotBeforeUpdate!="function"||A===e.memoizedProps&&tt===e.memoizedState||(i.flags|=1024),c=!1)}return x=c,ui(e,i),c=(i.flags&128)!==0,x||c?(x=i.stateNode,r=c&&typeof r.getDerivedStateFromError!="function"?null:x.render(),i.flags|=1,e!==null&&c?(i.child=Os(i,e.child,null,p),i.child=Os(i,null,r,p)):Le(e,i,r,p),i.memoizedState=x.state,e=i.child):e=ri(e,i,p),e}function se(e,i,r,c){return Ms(),i.flags|=256,Le(e,i,r,c),i.child}var Ma={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function ka(e){return{baseLanes:e,cachePool:Jo()}}function Vr(e,i,r){return e=e!==null?e.childLanes&~r:0,i&&(e|=ae),e}function Ra(e,i,r){var c=i.pendingProps,p=!1,x=(i.flags&128)!==0,A;if((A=x)||(A=e!==null&&e.memoizedState===null?!1:(qe.current&2)!==0),A&&(p=!0,i.flags&=-129),A=(i.flags&32)!==0,i.flags&=-33,e===null){if(te){if(p?Fl(i):rl(),(e=Ce)?(e=Tg(e,vn),e=e!==null&&e.data!=="&"?e:null,e!==null&&(i.memoizedState={dehydrated:e,treeContext:Ei!==null?{id:Ci,overflow:Ai}:null,retryLane:536870912,hydrationErrors:null},r=qd(e),r.return=i,i.child=r,gn=i,Ce=null)):e=null,e===null)throw It(i);return ty(e)?i.lanes=32:i.lanes=536870912,null}var O=c.children;return c=c.fallback,p?(rl(),p=i.mode,O=Ou({mode:"hidden",children:O},p),c=tl(c,p,r,null),O.return=i,c.return=i,O.sibling=c,i.child=O,c=i.child,c.memoizedState=ka(r),c.childLanes=Vr(e,A,r),i.memoizedState=Ma,si(null,c)):(Fl(i),Il(i,O))}var Y=e.memoizedState;if(Y!==null&&(O=Y.dehydrated,O!==null)){if(x)i.flags&256?(Fl(i),i.flags&=-257,i=Nu(e,i,r)):i.memoizedState!==null?(rl(),i.child=e.child,i.flags|=128,i=null):(rl(),O=c.fallback,p=i.mode,c=Ou({mode:"visible",children:c.children},p),O=tl(O,p,r,null),O.flags|=2,c.return=i,O.return=i,c.sibling=O,i.child=c,Os(i,e.child,null,r),c=i.child,c.memoizedState=ka(r),c.childLanes=Vr(e,A,r),i.memoizedState=Ma,i=si(null,c));else if(Fl(i),ty(O)){if(A=O.nextSibling&&O.nextSibling.dataset,A)var F=A.dgst;A=F,c=Error(l(419)),c.stack="",c.digest=A,Cr({value:c,source:null,stack:null}),i=Nu(e,i,r)}else if(Ue||Ql(e,i,r,!1),A=(r&e.childLanes)!==0,Ue||A){if(A=pe,A!==null&&(c=po(A,r),c!==0&&c!==Y.retryLane))throw Y.retryLane=c,Ll(e,c),u(A,e,c),hc;$p(O)||Yt(),i=Nu(e,i,r)}else $p(O)?(i.flags|=192,i.child=e.child,i=null):(e=Y.treeContext,Ce=Gi(O.nextSibling),gn=i,te=!0,nl=null,vn=!1,e!==null&&Er(i,e),i=Il(i,c.children),i.flags|=4096);return i}return p?(rl(),O=c.fallback,p=i.mode,Y=e.child,F=Y.sibling,c=Ti(Y,{mode:"hidden",children:c.children}),c.subtreeFlags=Y.subtreeFlags&65011712,F!==null?O=Ti(F,O):(O=tl(O,p,r,null),O.flags|=2),O.return=i,c.return=i,c.sibling=O,i.child=c,si(null,c),c=i.child,O=e.child.memoizedState,O===null?O=ka(r):(p=O.cachePool,p!==null?(Y=Mt._currentValue,p=p.parent!==Y?{parent:Y,pool:Y}:p):p=Jo(),O={baseLanes:O.baseLanes|r,cachePool:p}),c.memoizedState=O,c.childLanes=Vr(e,A,r),i.memoizedState=Ma,si(e.child,c)):(Fl(i),r=e.child,e=r.sibling,r=Ti(r,{mode:"visible",children:c.children}),r.return=i,r.sibling=null,e!==null&&(A=i.deletions,A===null?(i.deletions=[e],i.flags|=16):A.push(e)),i.child=r,i.memoizedState=null,r)}function Il(e,i){return i=Ou({mode:"visible",children:i},e.mode),i.return=e,e.child=i}function Ou(e,i){return e=Vn(22,e,null,i),e.lanes=0,e}function Nu(e,i,r){return Os(i,e.child,null,r),e=Il(i,i.pendingProps.children),e.flags|=2,i.memoizedState=null,e}function ws(e,i,r){e.lanes|=i;var c=e.alternate;c!==null&&(c.lanes|=i),ll(e.return,i,r)}function Qr(e,i,r,c,p,x){var A=e.memoizedState;A===null?e.memoizedState={isBackwards:i,rendering:null,renderingStartTime:0,last:c,tail:r,tailMode:p,treeForkCount:x}:(A.isBackwards=i,A.rendering=null,A.renderingStartTime=0,A.last=c,A.tail=r,A.tailMode=p,A.treeForkCount=x)}function kr(e,i,r){var c=i.pendingProps,p=c.revealOrder,x=c.tail;c=c.children;var A=qe.current,O=(A&2)!==0;if(O?(A=A&1|2,i.flags|=128):A&=1,st(qe,A),Le(e,i,c,r),c=te?_u:0,!O&&e!==null&&(e.flags&128)!==0)t:for(e=i.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&ws(e,r,i);else if(e.tag===19)ws(e,r,i);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===i)break t;for(;e.sibling===null;){if(e.return===null||e.return===i)break t;e=e.return}e.sibling.return=e.return,e=e.sibling}switch(p){case"forwards":for(r=i.child,p=null;r!==null;)e=r.alternate,e!==null&&Io(e)===null&&(p=r),r=r.sibling;r=p,r===null?(p=i.child,i.child=null):(p=r.sibling,r.sibling=null),Qr(i,!1,p,r,x,c);break;case"backwards":case"unstable_legacy-backwards":for(r=null,p=i.child,i.child=null;p!==null;){if(e=p.alternate,e!==null&&Io(e)===null){i.child=p;break}e=p.sibling,p.sibling=r,r=p,p=e}Qr(i,!0,r,null,x,c);break;case"together":Qr(i,!1,null,null,void 0,c);break;default:i.memoizedState=null}return i.child}function ri(e,i,r){if(e!==null&&(i.dependencies=e.dependencies),Oa|=i.lanes,(r&i.childLanes)===0)if(e!==null){if(Ql(e,i,r,!1),(r&i.childLanes)===0)return null}else return null;if(e!==null&&i.child!==e.child)throw Error(l(153));if(i.child!==null){for(e=i.child,r=Ti(e,e.pendingProps),i.child=r,r.return=i;e.sibling!==null;)e=e.sibling,r=r.sibling=Ti(e,e.pendingProps),r.return=i;r.sibling=null}return i.child}function $l(e,i){return(e.lanes&i)!==0?!0:(e=e.dependencies,!!(e!==null&&Su(e)))}function Kr(e,i,r){switch(i.tag){case 3:fe(i,i.stateNode.containerInfo),il(i,Mt,e.memoizedState.cache),Ms();break;case 27:case 5:pa(i);break;case 4:fe(i,i.stateNode.containerInfo);break;case 10:il(i,i.type,i.memoizedProps.value);break;case 31:if(i.memoizedState!==null)return i.flags|=128,Vf(i),null;break;case 13:var c=i.memoizedState;if(c!==null)return c.dehydrated!==null?(Fl(i),i.flags|=128,null):(r&i.child.childLanes)!==0?Ra(e,i,r):(Fl(i),e=ri(e,i,r),e!==null?e.sibling:null);Fl(i);break;case 19:var p=(e.flags&128)!==0;if(c=(r&i.childLanes)!==0,c||(Ql(e,i,r,!1),c=(r&i.childLanes)!==0),p){if(c)return kr(e,i,r);i.flags|=128}if(p=i.memoizedState,p!==null&&(p.rendering=null,p.tail=null,p.lastEffect=null),st(qe,qe.current),c)break;return null;case 22:return i.lanes=0,Aa(e,i,r,i.pendingProps);case 24:il(i,Mt,e.memoizedState.cache)}return ri(e,i,r)}function dc(e,i,r){if(e!==null)if(e.memoizedProps!==i.pendingProps)Ue=!0;else{if(!$l(e,r)&&(i.flags&128)===0)return Ue=!1,Kr(e,i,r);Ue=(e.flags&131072)!==0}else Ue=!1,te&&(i.flags&1048576)!==0&&Mf(i,_u,i.index);switch(i.lanes=0,i.tag){case 16:t:{var c=i.pendingProps;if(e=Ds(i.elementType),i.type=e,typeof e=="function")Qn(e)?(c=An(e,c),i.tag=1,i=Mn(null,i,e,c,r)):(i.tag=0,i=Du(null,i,e,c,r));else{if(e!=null){var p=e.$$typeof;if(p===G){i.tag=11,i=Yr(null,i,e,c,r);break t}else if(p===K){i.tag=14,i=Lr(null,i,e,c,r);break t}}throw i=xt(e)||e,Error(l(306,i,""))}}return i;case 0:return Du(e,i,i.type,i.pendingProps,r);case 1:return c=i.type,p=An(c,i.pendingProps),Mn(e,i,c,p,r);case 3:t:{if(fe(i,i.stateNode.containerInfo),e===null)throw Error(l(387));c=i.pendingProps;var x=i.memoizedState;p=x.element,qf(e,i),Ns(i,c,null,r);var A=i.memoizedState;if(c=A.cache,il(i,Mt,c),c!==x.cache&&Zo(i,[Mt],r,!0),Or(),c=A.element,x.isDehydrated)if(x={element:c,isDehydrated:!1,cache:A.cache},i.updateQueue.baseState=x,i.memoizedState=x,i.flags&256){i=se(e,i,c,r);break t}else if(c!==p){p=ea(Error(l(424)),i),Cr(p),i=se(e,i,c,r);break t}else{switch(e=i.stateNode.containerInfo,e.nodeType){case 9:e=e.body;break;default:e=e.nodeName==="HTML"?e.ownerDocument.body:e}for(Ce=Gi(e.firstChild),gn=i,te=!0,nl=null,vn=!0,r=kd(i,null,c,r),i.child=r;r;)r.flags=r.flags&-3|4096,r=r.sibling}else{if(Ms(),c===p){i=ri(e,i,r);break t}Le(e,i,c,r)}i=i.child}return i;case 26:return ui(e,i),e===null?(r=zg(i.type,null,i.pendingProps,null))?i.memoizedState=r:te||(r=i.type,e=i.pendingProps,c=Em(Ot.current).createElement(r),c[Ft]=i,c[zn]=e,Pn(c,r,e),tn(c),i.stateNode=c):i.memoizedState=zg(i.type,e.memoizedProps,i.pendingProps,e.memoizedState),null;case 27:return pa(i),e===null&&te&&(c=i.stateNode=Ag(i.type,i.pendingProps,Ot.current),gn=i,vn=!0,p=Ce,qu(i.type)?(ey=p,Ce=Gi(c.firstChild)):Ce=p),Le(e,i,i.pendingProps.children,r),ui(e,i),e===null&&(i.flags|=4194304),i.child;case 5:return e===null&&te&&((p=c=Ce)&&(c=DS(c,i.type,i.pendingProps,vn),c!==null?(i.stateNode=c,gn=i,Ce=Gi(c.firstChild),vn=!1,p=!0):p=!1),p||It(i)),pa(i),p=i.type,x=i.pendingProps,A=e!==null?e.memoizedProps:null,c=x.children,Wp(p,x)?c=null:A!==null&&Wp(p,A)&&(i.flags|=32),i.memoizedState!==null&&(p=kf(e,i,Np,null,null,r),Eh._currentValue=p),ui(e,i),Le(e,i,c,r),i.child;case 6:return e===null&&te&&((e=r=Ce)&&(r=OS(r,i.pendingProps,vn),r!==null?(i.stateNode=r,gn=i,Ce=null,e=!0):e=!1),e||It(i)),null;case 13:return Ra(e,i,r);case 4:return fe(i,i.stateNode.containerInfo),c=i.pendingProps,e===null?i.child=Os(i,null,c,r):Le(e,i,c,r),i.child;case 11:return Yr(e,i,i.type,i.pendingProps,r);case 7:return Le(e,i,i.pendingProps,r),i.child;case 8:return Le(e,i,i.pendingProps.children,r),i.child;case 12:return Le(e,i,i.pendingProps.children,r),i.child;case 10:return c=i.pendingProps,il(i,i.type,c.value),Le(e,i,c.children,r),i.child;case 9:return p=i.type._context,c=i.pendingProps.children,Rs(i),p=xn(p),c=c(p),i.flags|=1,Le(e,i,c,r),i.child;case 14:return Lr(e,i,i.type,i.pendingProps,r);case 15:return Ca(e,i,i.type,i.pendingProps,r);case 19:return kr(e,i,r);case 31:return Xr(e,i,r);case 22:return Aa(e,i,r,i.pendingProps);case 24:return Rs(i),c=xn(Mt),e===null?(p=Mi(),p===null&&(p=pe,x=Nf(),p.pooledCache=x,x.refCount++,x!==null&&(p.pooledCacheLanes|=r),p=x),i.memoizedState={parent:c,cache:p},jf(i),il(i,Mt,p)):((e.lanes&r)!==0&&(qf(e,i),Ns(i,null,null,r),Or()),p=e.memoizedState,x=i.memoizedState,p.parent!==c?(p={parent:c,cache:c},i.memoizedState=p,i.lanes===0&&(i.memoizedState=i.updateQueue.baseState=p),il(i,Mt,c)):(c=x.cache,il(i,Mt,c),c!==p.cache&&Zo(i,[Mt],r,!0))),Le(e,i,i.pendingProps.children,r),i.child;case 29:throw i.pendingProps}throw Error(l(156,i.tag))}function sa(e){e.flags|=4}function ts(e,i,r,c,p){if((i=(e.mode&32)!==0)&&(i=!1),i){if(e.flags|=16777216,(p&335544128)===p)if(e.stateNode.complete)e.flags|=8192;else if(gt())e.flags|=8192;else throw Nt=Rr,Mr}else e.flags&=-16777217}function fl(e,i){if(i.type!=="stylesheet"||(i.state.loading&4)!==0)e.flags&=-16777217;else if(e.flags|=16777216,!Bg(i))if(gt())e.flags|=8192;else throw Nt=Rr,Mr}function Uu(e,i){i!==null&&(e.flags|=4),e.flags&16384&&(i=e.tag!==22?nu():536870912,e.lanes|=i,Na|=i)}function Zr(e,i){if(!te)switch(e.tailMode){case"hidden":i=e.tail;for(var r=null;i!==null;)i.alternate!==null&&(r=i),i=i.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?i||e.tail===null?e.tail=null:e.tail.sibling=null:c.sibling=null}}function xe(e){var i=e.alternate!==null&&e.alternate.child===e.child,r=0,c=0;if(i)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,i}function ph(e,i,r){var c=i.pendingProps;switch(Vl(i),i.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return xe(i),null;case 1:return xe(i),null;case 3:return r=i.stateNode,c=null,e!==null&&(c=e.memoizedState.cache),i.memoizedState.cache!==c&&(i.flags|=2048),Xa(Mt),ce(),r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),(e===null||e.child===null)&&(As(i)?sa(i):e===null||e.memoizedState.isDehydrated&&(i.flags&256)===0||(i.flags|=1024,Rf())),xe(i),null;case 26:var p=i.type,x=i.memoizedState;return e===null?(sa(i),x!==null?(xe(i),fl(i,x)):(xe(i),ts(i,p,null,c,r))):x?x!==e.memoizedState?(sa(i),xe(i),fl(i,x)):(xe(i),i.flags&=-16777217):(e=e.memoizedProps,e!==c&&sa(i),xe(i),ts(i,p,e,c,r)),null;case 27:if(ja(i),r=Ot.current,p=i.type,e!==null&&i.stateNode!=null)e.memoizedProps!==c&&sa(i);else{if(!c){if(i.stateNode===null)throw Error(l(166));return xe(i),null}e=yt.current,As(i)?Ko(i):(e=Ag(p,c,r),i.stateNode=e,sa(i))}return xe(i),null;case 5:if(ja(i),p=i.type,e!==null&&i.stateNode!=null)e.memoizedProps!==c&&sa(i);else{if(!c){if(i.stateNode===null)throw Error(l(166));return xe(i),null}if(x=yt.current,As(i))Ko(i);else{var A=Em(Ot.current);switch(x){case 1:x=A.createElementNS("http://www.w3.org/2000/svg",p);break;case 2:x=A.createElementNS("http://www.w3.org/1998/Math/MathML",p);break;default:switch(p){case"svg":x=A.createElementNS("http://www.w3.org/2000/svg",p);break;case"math":x=A.createElementNS("http://www.w3.org/1998/Math/MathML",p);break;case"script":x=A.createElement("div"),x.innerHTML="<script><\/script>",x=x.removeChild(x.firstChild);break;case"select":x=typeof c.is=="string"?A.createElement("select",{is:c.is}):A.createElement("select"),c.multiple?x.multiple=!0:c.size&&(x.size=c.size);break;default:x=typeof c.is=="string"?A.createElement(p,{is:c.is}):A.createElement(p)}}x[Ft]=i,x[zn]=c;t:for(A=i.child;A!==null;){if(A.tag===5||A.tag===6)x.appendChild(A.stateNode);else if(A.tag!==4&&A.tag!==27&&A.child!==null){A.child.return=A,A=A.child;continue}if(A===i)break t;for(;A.sibling===null;){if(A.return===null||A.return===i)break t;A=A.return}A.sibling.return=A.return,A=A.sibling}i.stateNode=x;t:switch(Pn(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&&sa(i)}}return xe(i),ts(i,i.type,e===null?null:e.memoizedProps,i.pendingProps,r),null;case 6:if(e&&i.stateNode!=null)e.memoizedProps!==c&&sa(i);else{if(typeof c!="string"&&i.stateNode===null)throw Error(l(166));if(e=Ot.current,As(i)){if(e=i.stateNode,r=i.memoizedProps,c=null,p=gn,p!==null)switch(p.tag){case 27:case 5:c=p.memoizedProps}e[Ft]=i,e=!!(e.nodeValue===r||c!==null&&c.suppressHydrationWarning===!0||pg(e.nodeValue,r)),e||It(i,!0)}else e=Em(e).createTextNode(c),e[Ft]=i,i.stateNode=e}return xe(i),null;case 31:if(r=i.memoizedState,e===null||e.memoizedState!==null){if(c=As(i),r!==null){if(e===null){if(!c)throw Error(l(318));if(e=i.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(l(557));e[Ft]=i}else Ms(),(i.flags&128)===0&&(i.memoizedState=null),i.flags|=4;xe(i),e=!1}else r=Rf(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=r),e=!0;if(!e)return i.flags&256?(ba(i),i):(ba(i),null);if((i.flags&128)!==0)throw Error(l(558))}return xe(i),null;case 13:if(c=i.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(p=As(i),c!==null&&c.dehydrated!==null){if(e===null){if(!p)throw Error(l(318));if(p=i.memoizedState,p=p!==null?p.dehydrated:null,!p)throw Error(l(317));p[Ft]=i}else Ms(),(i.flags&128)===0&&(i.memoizedState=null),i.flags|=4;xe(i),p=!1}else p=Rf(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=p),p=!0;if(!p)return i.flags&256?(ba(i),i):(ba(i),null)}return ba(i),(i.flags&128)!==0?(i.lanes=r,i):(r=c!==null,e=e!==null&&e.memoizedState!==null,r&&(c=i.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&&(i.child.flags|=8192),Uu(i,i.updateQueue),xe(i),null);case 4:return ce(),e===null&&kp(i.stateNode.containerInfo),xe(i),null;case 10:return Xa(i.type),xe(i),null;case 19:if(I(qe),c=i.memoizedState,c===null)return xe(i),null;if(p=(i.flags&128)!==0,x=c.rendering,x===null)if(p)Zr(c,!1);else{if(ye!==0||e!==null&&(e.flags&128)!==0)for(e=i.child;e!==null;){if(x=Io(e),x!==null){for(i.flags|=128,Zr(c,!1),e=x.updateQueue,i.updateQueue=e,Uu(i,e),i.subtreeFlags=0,e=r,r=i.child;r!==null;)Nn(r,e),r=r.sibling;return st(qe,qe.current&1|2),te&&el(i,c.treeForkCount),i.child}e=e.sibling}c.tail!==null&&$n()>Ua&&(i.flags|=128,p=!0,Zr(c,!1),i.lanes=4194304)}else{if(!p)if(e=Io(x),e!==null){if(i.flags|=128,p=!0,e=e.updateQueue,i.updateQueue=e,Uu(i,e),Zr(c,!0),c.tail===null&&c.tailMode==="hidden"&&!x.alternate&&!te)return xe(i),null}else 2*$n()-c.renderingStartTime>Ua&&r!==536870912&&(i.flags|=128,p=!0,Zr(c,!1),i.lanes=4194304);c.isBackwards?(x.sibling=i.child,i.child=x):(e=c.last,e!==null?e.sibling=x:i.child=x,c.last=x)}return c.tail!==null?(e=c.tail,c.rendering=e,c.tail=e.sibling,c.renderingStartTime=$n(),e.sibling=null,r=qe.current,st(qe,p?r&1|2:r&1),te&&el(i,c.treeForkCount),e):(xe(i),null);case 22:case 23:return ba(i),Bn(),c=i.memoizedState!==null,e!==null?e.memoizedState!==null!==c&&(i.flags|=8192):c&&(i.flags|=8192),c?(r&536870912)!==0&&(i.flags&128)===0&&(xe(i),i.subtreeFlags&6&&(i.flags|=8192)):xe(i),r=i.updateQueue,r!==null&&Uu(i,r.retryQueue),r=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(r=e.memoizedState.cachePool.pool),c=null,i.memoizedState!==null&&i.memoizedState.cachePool!==null&&(c=i.memoizedState.cachePool.pool),c!==r&&(i.flags|=2048),e!==null&&I(kl),null;case 24:return r=null,e!==null&&(r=e.memoizedState.cache),i.memoizedState.cache!==r&&(i.flags|=2048),Xa(Mt),xe(i),null;case 25:return null;case 30:return null}throw Error(l(156,i.tag))}function mc(e,i){switch(Vl(i),i.tag){case 1:return e=i.flags,e&65536?(i.flags=e&-65537|128,i):null;case 3:return Xa(Mt),ce(),e=i.flags,(e&65536)!==0&&(e&128)===0?(i.flags=e&-65537|128,i):null;case 26:case 27:case 5:return ja(i),null;case 31:if(i.memoizedState!==null){if(ba(i),i.alternate===null)throw Error(l(340));Ms()}return e=i.flags,e&65536?(i.flags=e&-65537|128,i):null;case 13:if(ba(i),e=i.memoizedState,e!==null&&e.dehydrated!==null){if(i.alternate===null)throw Error(l(340));Ms()}return e=i.flags,e&65536?(i.flags=e&-65537|128,i):null;case 19:return I(qe),null;case 4:return ce(),null;case 10:return Xa(i.type),null;case 22:case 23:return ba(i),Bn(),e!==null&&I(kl),e=i.flags,e&65536?(i.flags=e&-65537|128,i):null;case 24:return Xa(Mt),null;case 25:return null;default:return null}}function Hs(e,i){switch(Vl(i),i.tag){case 3:Xa(Mt),ce();break;case 26:case 27:case 5:ja(i);break;case 4:ce();break;case 31:i.memoizedState!==null&&ba(i);break;case 13:ba(i);break;case 19:I(qe);break;case 10:Xa(i.type);break;case 22:case 23:ba(i),Bn(),e!==null&&I(kl);break;case 24:Xa(Mt)}}function Ui(e,i){try{var r=i.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,A=r.inst;c=x(),A.destroy=c}r=r.next}while(r!==p)}}catch(O){Ee(i,i.return,O)}}function Ka(e,i,r){try{var c=i.updateQueue,p=c!==null?c.lastEffect:null;if(p!==null){var x=p.next;c=x;do{if((c.tag&e)===e){var A=c.inst,O=A.destroy;if(O!==void 0){A.destroy=void 0,p=i;var Y=r,F=O;try{F()}catch(lt){Ee(p,Y,lt)}}}c=c.next}while(c!==x)}}catch(lt){Ee(i,i.return,lt)}}function es(e){var i=e.updateQueue;if(i!==null){var r=e.stateNode;try{En(i,r)}catch(c){Ee(e,e.return,c)}}}function yh(e,i,r){r.props=An(e.type,e.memoizedProps),r.state=e.memoizedState;try{r.componentWillUnmount()}catch(c){Ee(e,i,c)}}function Bi(e,i){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){Ee(e,i,p)}}function za(e,i){var r=e.ref,c=e.refCleanup;if(r!==null)if(typeof c=="function")try{c()}catch(p){Ee(e,i,p)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof r=="function")try{r(null)}catch(p){Ee(e,i,p)}else r.current=null}function Da(e){var i=e.type,r=e.memoizedProps,c=e.stateNode;try{t:switch(i){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){Ee(e,e.return,p)}}function Za(e,i,r){try{var c=e.stateNode;ES(c,e.type,r,i),c[zn]=i}catch(p){Ee(e,e.return,p)}}function nn(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&qu(e.type)||e.tag===4}function wi(e){t:for(;;){for(;e.sibling===null;){if(e.return===null||nn(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&&qu(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 Qt(e,i,r){var c=e.tag;if(c===5||c===6)e=e.stateNode,i?(r.nodeType===9?r.body:r.nodeName==="HTML"?r.ownerDocument.body:r).insertBefore(e,i):(i=r.nodeType===9?r.body:r.nodeName==="HTML"?r.ownerDocument.body:r,i.appendChild(e),r=r._reactRootContainer,r!=null||i.onclick!==null||(i.onclick=_i));else if(c!==4&&(c===27&&qu(e.type)&&(r=e.stateNode,i=null),e=e.child,e!==null))for(Qt(e,i,r),e=e.sibling;e!==null;)Qt(e,i,r),e=e.sibling}function he(e,i,r){var c=e.tag;if(c===5||c===6)e=e.stateNode,i?r.insertBefore(e,i):r.appendChild(e);else if(c!==4&&(c===27&&qu(e.type)&&(r=e.stateNode),e=e.child,e!==null))for(he(e,i,r),e=e.sibling;e!==null;)he(e,i,r),e=e.sibling}function Ze(e){var i=e.stateNode,r=e.memoizedProps;try{for(var c=e.type,p=i.attributes;p.length;)i.removeAttributeNode(p[0]);Pn(i,c,r),i[Ft]=e,i[zn]=r}catch(x){Ee(e,e.return,x)}}var Ja=!1,Be=!1,hl=!1,Jr=typeof WeakSet=="function"?WeakSet:Set,Xe=null;function Bu(e,i){if(e=e.containerInfo,Jp=Om,e=Ho(e),du(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 A=0,O=-1,Y=-1,F=0,lt=0,ct=e,tt=null;e:for(;;){for(var it;ct!==r||p!==0&&ct.nodeType!==3||(O=A+p),ct!==x||c!==0&&ct.nodeType!==3||(Y=A+c),ct.nodeType===3&&(A+=ct.nodeValue.length),(it=ct.firstChild)!==null;)tt=ct,ct=it;for(;;){if(ct===e)break e;if(tt===r&&++F===p&&(O=A),tt===x&&++lt===c&&(Y=A),(it=ct.nextSibling)!==null)break;ct=tt,tt=ct.parentNode}ct=it}r=O===-1||Y===-1?null:{start:O,end:Y}}else r=null}r=r||{start:0,end:0}}else r=null;for(Pp={focusedElem:e,selectionRange:r},Om=!1,Xe=i;Xe!==null;)if(i=Xe,e=i.child,(i.subtreeFlags&1028)!==0&&e!==null)e.return=i,Xe=e;else for(;Xe!==null;){switch(i=Xe,x=i.alternate,e=i.flags,i.tag){case 0:if((e&4)!==0&&(e=i.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=i,p=x.memoizedProps,x=x.memoizedState,c=r.stateNode;try{var Et=An(r.type,p);e=c.getSnapshotBeforeUpdate(Et,x),c.__reactInternalSnapshotBeforeUpdate=e}catch(wt){Ee(r,r.return,wt)}}break;case 3:if((e&1024)!==0){if(e=i.stateNode.containerInfo,r=e.nodeType,r===9)Ip(e);else if(r===1)switch(e.nodeName){case"HEAD":case"HTML":case"BODY":Ip(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(l(163))}if(e=i.sibling,e!==null){e.return=i.return,Xe=e;break}Xe=i.return}}function gm(e,i,r){var c=r.flags;switch(r.tag){case 0:case 11:case 15:dl(e,r),c&4&&Ui(5,r);break;case 1:if(dl(e,r),c&4)if(e=r.stateNode,i===null)try{e.componentDidMount()}catch(A){Ee(r,r.return,A)}else{var p=An(r.type,i.memoizedProps);i=i.memoizedState;try{e.componentDidUpdate(p,i,e.__reactInternalSnapshotBeforeUpdate)}catch(A){Ee(r,r.return,A)}}c&64&&es(r),c&512&&Bi(r,r.return);break;case 3:if(dl(e,r),c&64&&(e=r.updateQueue,e!==null)){if(i=null,r.child!==null)switch(r.child.tag){case 27:case 5:i=r.child.stateNode;break;case 1:i=r.child.stateNode}try{En(e,i)}catch(A){Ee(r,r.return,A)}}break;case 27:i===null&&c&4&&Ze(r);case 26:case 5:dl(e,r),i===null&&c&4&&Da(r),c&512&&Bi(r,r.return);break;case 12:dl(e,r);break;case 31:dl(e,r),c&4&&yc(e,r);break;case 13:dl(e,r),c&4&&gh(e,r),c&64&&(e=r.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(r=hS.bind(null,r),NS(e,r))));break;case 22:if(c=r.memoizedState!==null||Ja,!c){i=i!==null&&i.memoizedState!==null||Be,p=Ja;var x=Be;Ja=c,(Be=i)&&!x?me(e,r,(r.subtreeFlags&8772)!==0):dl(e,r),Ja=p,Be=x}break;case 30:break;default:dl(e,r)}}function pc(e){var i=e.alternate;i!==null&&(e.alternate=null,pc(i)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(i=e.stateNode,i!==null&&nr(i)),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 ue=null,an=!1;function Hn(e,i,r){for(r=r.child;r!==null;)ns(e,i,r),r=r.sibling}function ns(e,i,r){if($e&&typeof $e.onCommitFiberUnmount=="function")try{$e.onCommitFiberUnmount(Ya,r)}catch{}switch(r.tag){case 26:Be||za(r,i),Hn(e,i,r),r.memoizedState?r.memoizedState.count--:r.stateNode&&(r=r.stateNode,r.parentNode.removeChild(r));break;case 27:Be||za(r,i);var c=ue,p=an;qu(r.type)&&(ue=r.stateNode,an=!1),Hn(e,i,r),Sh(r.stateNode),ue=c,an=p;break;case 5:Be||za(r,i);case 6:if(c=ue,p=an,ue=null,Hn(e,i,r),ue=c,an=p,ue!==null)if(an)try{(ue.nodeType===9?ue.body:ue.nodeName==="HTML"?ue.ownerDocument.body:ue).removeChild(r.stateNode)}catch(x){Ee(r,i,x)}else try{ue.removeChild(r.stateNode)}catch(x){Ee(r,i,x)}break;case 18:ue!==null&&(an?(e=ue,Sg(e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,r.stateNode),Mc(e)):Sg(ue,r.stateNode));break;case 4:c=ue,p=an,ue=r.stateNode.containerInfo,an=!0,Hn(e,i,r),ue=c,an=p;break;case 0:case 11:case 14:case 15:Ka(2,r,i),Be||Ka(4,r,i),Hn(e,i,r);break;case 1:Be||(za(r,i),c=r.stateNode,typeof c.componentWillUnmount=="function"&&yh(r,i,c)),Hn(e,i,r);break;case 21:Hn(e,i,r);break;case 22:Be=(c=Be)||r.memoizedState!==null,Hn(e,i,r),Be=c;break;default:Hn(e,i,r)}}function yc(e,i){if(i.memoizedState===null&&(e=i.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{Mc(e)}catch(r){Ee(i,i.return,r)}}}function gh(e,i){if(i.memoizedState===null&&(e=i.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{Mc(e)}catch(r){Ee(i,i.return,r)}}function vm(e){switch(e.tag){case 31:case 13:case 19:var i=e.stateNode;return i===null&&(i=e.stateNode=new Jr),i;case 22:return e=e.stateNode,i=e._retryCache,i===null&&(i=e._retryCache=new Jr),i;default:throw Error(l(435,e.tag))}}function Je(e,i){var r=vm(e);i.forEach(function(c){if(!r.has(c)){r.add(c);var p=dS.bind(null,e,c);c.then(p,p)}})}function Gn(e,i){var r=i.deletions;if(r!==null)for(var c=0;c<r.length;c++){var p=r[c],x=e,A=i,O=A;t:for(;O!==null;){switch(O.tag){case 27:if(qu(O.type)){ue=O.stateNode,an=!1;break t}break;case 5:ue=O.stateNode,an=!1;break t;case 3:case 4:ue=O.stateNode.containerInfo,an=!0;break t}O=O.return}if(ue===null)throw Error(l(160));ns(x,A,p),ue=null,an=!1,x=p.alternate,x!==null&&(x.return=null),p.return=null}if(i.subtreeFlags&13886)for(i=i.child;i!==null;)as(i,e),i=i.sibling}var ua=null;function as(e,i){var r=e.alternate,c=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:Gn(i,e),Ve(e),c&4&&(Ka(3,e,e.return),Ui(3,e),Ka(5,e,e.return));break;case 1:Gn(i,e),Ve(e),c&512&&(Be||r===null||za(r,r.return)),c&64&&Ja&&(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=ua;if(Gn(i,e),Ve(e),c&512&&(Be||r===null||za(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[ms]||x[Ft]||x.namespaceURI==="http://www.w3.org/2000/svg"||x.hasAttribute("itemprop"))&&(x=p.createElement(c),p.head.insertBefore(x,p.querySelector("head > title"))),Pn(x,c,r),x[Ft]=e,tn(x),c=x;break t;case"link":var A=Ng("link","href",p).get(c+(r.href||""));if(A){for(var O=0;O<A.length;O++)if(x=A[O],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)){A.splice(O,1);break e}}x=p.createElement(c),Pn(x,c,r),p.head.appendChild(x);break;case"meta":if(A=Ng("meta","content",p).get(c+(r.content||""))){for(O=0;O<A.length;O++)if(x=A[O],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)){A.splice(O,1);break e}}x=p.createElement(c),Pn(x,c,r),p.head.appendChild(x);break;default:throw Error(l(468,c))}x[Ft]=e,tn(x),c=x}e.stateNode=c}else Ug(p,e.type,e.stateNode);else e.stateNode=Og(p,c,e.memoizedProps);else x!==c?(x===null?r.stateNode!==null&&(r=r.stateNode,r.parentNode.removeChild(r)):x.count--,c===null?Ug(p,e.type,e.stateNode):Og(p,c,e.memoizedProps)):c===null&&e.stateNode!==null&&Za(e,e.memoizedProps,r.memoizedProps)}break;case 27:Gn(i,e),Ve(e),c&512&&(Be||r===null||za(r,r.return)),r!==null&&c&4&&Za(e,e.memoizedProps,r.memoizedProps);break;case 5:if(Gn(i,e),Ve(e),c&512&&(Be||r===null||za(r,r.return)),e.flags&32){p=e.stateNode;try{ys(p,"")}catch(Et){Ee(e,e.return,Et)}}c&4&&e.stateNode!=null&&(p=e.memoizedProps,Za(e,p,r!==null?r.memoizedProps:p)),c&1024&&(hl=!0);break;case 6:if(Gn(i,e),Ve(e),c&4){if(e.stateNode===null)throw Error(l(162));c=e.memoizedProps,r=e.stateNode;try{r.nodeValue=c}catch(Et){Ee(e,e.return,Et)}}break;case 3:if(Mm=null,p=ua,ua=Cm(i.containerInfo),Gn(i,e),ua=p,Ve(e),c&4&&r!==null&&r.memoizedState.isDehydrated)try{Mc(i.containerInfo)}catch(Et){Ee(e,e.return,Et)}hl&&(hl=!1,xm(e));break;case 4:c=ua,ua=Cm(e.stateNode.containerInfo),Gn(i,e),Ve(e),ua=c;break;case 12:Gn(i,e),Ve(e);break;case 31:Gn(i,e),Ve(e),c&4&&(c=e.updateQueue,c!==null&&(e.updateQueue=null,Je(e,c)));break;case 13:Gn(i,e),Ve(e),e.child.flags&8192&&e.memoizedState!==null!=(r!==null&&r.memoizedState!==null)&&(yl=$n()),c&4&&(c=e.updateQueue,c!==null&&(e.updateQueue=null,Je(e,c)));break;case 22:p=e.memoizedState!==null;var Y=r!==null&&r.memoizedState!==null,F=Ja,lt=Be;if(Ja=F||p,Be=lt||Y,Gn(i,e),Be=lt,Ja=F,Ve(e),c&8192)t:for(i=e.stateNode,i._visibility=p?i._visibility&-2:i._visibility|1,p&&(r===null||Y||Ja||Be||Gs(e)),r=null,i=e;;){if(i.tag===5||i.tag===26){if(r===null){Y=r=i;try{if(x=Y.stateNode,p)A=x.style,typeof A.setProperty=="function"?A.setProperty("display","none","important"):A.display="none";else{O=Y.stateNode;var ct=Y.memoizedProps.style,tt=ct!=null&&ct.hasOwnProperty("display")?ct.display:null;O.style.display=tt==null||typeof tt=="boolean"?"":(""+tt).trim()}}catch(Et){Ee(Y,Y.return,Et)}}}else if(i.tag===6){if(r===null){Y=i;try{Y.stateNode.nodeValue=p?"":Y.memoizedProps}catch(Et){Ee(Y,Y.return,Et)}}}else if(i.tag===18){if(r===null){Y=i;try{var it=Y.stateNode;p?bg(it,!0):bg(Y.stateNode,!1)}catch(Et){Ee(Y,Y.return,Et)}}}else if((i.tag!==22&&i.tag!==23||i.memoizedState===null||i===e)&&i.child!==null){i.child.return=i,i=i.child;continue}if(i===e)break t;for(;i.sibling===null;){if(i.return===null||i.return===e)break t;r===i&&(r=null),i=i.return}r===i&&(r=null),i.sibling.return=i.return,i=i.sibling}c&4&&(c=e.updateQueue,c!==null&&(r=c.retryQueue,r!==null&&(c.retryQueue=null,Je(e,r))));break;case 19:Gn(i,e),Ve(e),c&4&&(c=e.updateQueue,c!==null&&(e.updateQueue=null,Je(e,c)));break;case 30:break;case 21:break;default:Gn(i,e),Ve(e)}}function Ve(e){var i=e.flags;if(i&2){try{for(var r,c=e.return;c!==null;){if(nn(c)){r=c;break}c=c.return}if(r==null)throw Error(l(160));switch(r.tag){case 27:var p=r.stateNode,x=wi(e);he(e,x,p);break;case 5:var A=r.stateNode;r.flags&32&&(ys(A,""),r.flags&=-33);var O=wi(e);he(e,O,A);break;case 3:case 4:var Y=r.stateNode.containerInfo,F=wi(e);Qt(e,F,Y);break;default:throw Error(l(161))}}catch(lt){Ee(e,e.return,lt)}e.flags&=-3}i&4096&&(e.flags&=-4097)}function xm(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var i=e;xm(i),i.tag===5&&i.flags&1024&&i.stateNode.reset(),e=e.sibling}}function dl(e,i){if(i.subtreeFlags&8772)for(i=i.child;i!==null;)gm(e,i.alternate,i),i=i.sibling}function Gs(e){for(e=e.child;e!==null;){var i=e;switch(i.tag){case 0:case 11:case 14:case 15:Ka(4,i,i.return),Gs(i);break;case 1:za(i,i.return);var r=i.stateNode;typeof r.componentWillUnmount=="function"&&yh(i,i.return,r),Gs(i);break;case 27:Sh(i.stateNode);case 26:case 5:za(i,i.return),Gs(i);break;case 22:i.memoizedState===null&&Gs(i);break;case 30:Gs(i);break;default:Gs(i)}e=e.sibling}}function me(e,i,r){for(r=r&&(i.subtreeFlags&8772)!==0,i=i.child;i!==null;){var c=i.alternate,p=e,x=i,A=x.flags;switch(x.tag){case 0:case 11:case 15:me(p,x,r),Ui(4,x);break;case 1:if(me(p,x,r),c=x,p=c.stateNode,typeof p.componentDidMount=="function")try{p.componentDidMount()}catch(F){Ee(c,c.return,F)}if(c=x,p=c.updateQueue,p!==null){var O=c.stateNode;try{var Y=p.shared.hiddenCallbacks;if(Y!==null)for(p.shared.hiddenCallbacks=null,p=0;p<Y.length;p++)zi(Y[p],O)}catch(F){Ee(c,c.return,F)}}r&&A&64&&es(x),Bi(x,x.return);break;case 27:Ze(x);case 26:case 5:me(p,x,r),r&&c===null&&A&4&&Da(x),Bi(x,x.return);break;case 12:me(p,x,r);break;case 31:me(p,x,r),r&&A&4&&yc(p,x);break;case 13:me(p,x,r),r&&A&4&&gh(p,x);break;case 22:x.memoizedState===null&&me(p,x,r),Bi(x,x.return);break;case 30:break;default:me(p,x,r)}i=i.sibling}}function gc(e,i){var r=null;e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(r=e.memoizedState.cachePool.pool),e=null,i.memoizedState!==null&&i.memoizedState.cachePool!==null&&(e=i.memoizedState.cachePool.pool),e!==r&&(e!=null&&e.refCount++,r!=null&&Tn(r))}function ml(e,i){e=null,i.alternate!==null&&(e=i.alternate.memoizedState.cache),i=i.memoizedState.cache,i!==e&&(i.refCount++,e!=null&&Tn(e))}function dn(e,i,r,c){if(i.subtreeFlags&10256)for(i=i.child;i!==null;)Ge(e,i,r,c),i=i.sibling}function Ge(e,i,r,c){var p=i.flags;switch(i.tag){case 0:case 11:case 15:dn(e,i,r,c),p&2048&&Ui(9,i);break;case 1:dn(e,i,r,c);break;case 3:dn(e,i,r,c),p&2048&&(e=null,i.alternate!==null&&(e=i.alternate.memoizedState.cache),i=i.memoizedState.cache,i!==e&&(i.refCount++,e!=null&&Tn(e)));break;case 12:if(p&2048){dn(e,i,r,c),e=i.stateNode;try{var x=i.memoizedProps,A=x.id,O=x.onPostCommit;typeof O=="function"&&O(A,i.alternate===null?"mount":"update",e.passiveEffectDuration,-0)}catch(Y){Ee(i,i.return,Y)}}else dn(e,i,r,c);break;case 31:dn(e,i,r,c);break;case 13:dn(e,i,r,c);break;case 23:break;case 22:x=i.stateNode,A=i.alternate,i.memoizedState!==null?x._visibility&2?dn(e,i,r,c):wu(e,i):x._visibility&2?dn(e,i,r,c):(x._visibility|=2,is(e,i,r,c,(i.subtreeFlags&10256)!==0||!1)),p&2048&&gc(A,i);break;case 24:dn(e,i,r,c),p&2048&&ml(i.alternate,i);break;default:dn(e,i,r,c)}}function is(e,i,r,c,p){for(p=p&&((i.subtreeFlags&10256)!==0||!1),i=i.child;i!==null;){var x=e,A=i,O=r,Y=c,F=A.flags;switch(A.tag){case 0:case 11:case 15:is(x,A,O,Y,p),Ui(8,A);break;case 23:break;case 22:var lt=A.stateNode;A.memoizedState!==null?lt._visibility&2?is(x,A,O,Y,p):wu(x,A):(lt._visibility|=2,is(x,A,O,Y,p)),p&&F&2048&&gc(A.alternate,A);break;case 24:is(x,A,O,Y,p),p&&F&2048&&ml(A.alternate,A);break;default:is(x,A,O,Y,p)}i=i.sibling}}function wu(e,i){if(i.subtreeFlags&10256)for(i=i.child;i!==null;){var r=e,c=i,p=c.flags;switch(c.tag){case 22:wu(r,c),p&2048&&gc(c.alternate,c);break;case 24:wu(r,c),p&2048&&ml(c.alternate,c);break;default:wu(r,c)}i=i.sibling}}var Qe=8192;function js(e,i,r){if(e.subtreeFlags&Qe)for(e=e.child;e!==null;)Pe(e,i,r),e=e.sibling}function Pe(e,i,r){switch(e.tag){case 26:js(e,i,r),e.flags&Qe&&e.memoizedState!==null&&QS(r,ua,e.memoizedState,e.memoizedProps);break;case 5:js(e,i,r);break;case 3:case 4:var c=ua;ua=Cm(e.stateNode.containerInfo),js(e,i,r),ua=c;break;case 22:e.memoizedState===null&&(c=e.alternate,c!==null&&c.memoizedState!==null?(c=Qe,Qe=16777216,js(e,i,r),Qe=c):js(e,i,r));break;default:js(e,i,r)}}function ra(e){var i=e.alternate;if(i!==null&&(e=i.child,e!==null)){i.child=null;do i=e.sibling,e.sibling=null,e=i;while(e!==null)}}function Zn(e){var i=e.deletions;if((e.flags&16)!==0){if(i!==null)for(var r=0;r<i.length;r++){var c=i[r];Xe=c,Pr(c,e)}ra(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)qs(e),e=e.sibling}function qs(e){switch(e.tag){case 0:case 11:case 15:Zn(e),e.flags&2048&&Ka(9,e,e.return);break;case 3:Zn(e);break;case 12:Zn(e);break;case 22:var i=e.stateNode;e.memoizedState!==null&&i._visibility&2&&(e.return===null||e.return.tag!==13)?(i._visibility&=-3,vc(e)):Zn(e);break;default:Zn(e)}}function vc(e){var i=e.deletions;if((e.flags&16)!==0){if(i!==null)for(var r=0;r<i.length;r++){var c=i[r];Xe=c,Pr(c,e)}ra(e)}for(e=e.child;e!==null;){switch(i=e,i.tag){case 0:case 11:case 15:Ka(8,i,i.return),vc(i);break;case 22:r=i.stateNode,r._visibility&2&&(r._visibility&=-3,vc(i));break;default:vc(i)}e=e.sibling}}function Pr(e,i){for(;Xe!==null;){var r=Xe;switch(r.tag){case 0:case 11:case 15:Ka(8,r,i);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:Tn(r.memoizedState.cache)}if(c=r.child,c!==null)c.return=r,Xe=c;else t:for(r=e;Xe!==null;){c=Xe;var p=c.sibling,x=c.return;if(pc(c),c===r){Xe=null;break t}if(p!==null){p.return=x,Xe=p;break t}Xe=x}}}var xc={getCacheForType:function(e){var i=xn(Mt),r=i.data.get(e);return r===void 0&&(r=e(),i.data.set(e,r)),r},cacheSignal:function(){return xn(Mt).controller.signal}},_c=typeof WeakMap=="function"?WeakMap:Map,ne=0,pe=null,kt=null,$t=0,Rt=0,Pt=null,Xt=!1,Kt=!1,be=!1,We=0,ye=0,Oa=0,pl=0,oi=0,ae=0,Na=0,ci=null,jn=null,oa=!1,yl=0,Hu=0,Ua=1/0,Gu=null,Hi=null,je=0,fi=null,Ba=null,Pa=0,gl=0,Ys=null,Sc=null,Ls=0,Xs=null;function Jn(){return(ne&2)!==0&&$t!==0?$t&-$t:w.T!==null?Lp():Zi()}function s(){if(ae===0)if(($t&536870912)===0||te){var e=ds;ds<<=1,(ds&3932160)===0&&(ds=262144),ae=e}else ae=536870912;return e=hn.current,e!==null&&(e.flags|=32),ae}function u(e,i,r){(e===pe&&(Rt===2||Rt===9)||e.cancelPendingCommit!==null)&&(P(e,0),T(e,$t,ae,!1)),iu(e,r),((ne&2)===0||e!==pe)&&(e===pe&&((ne&2)===0&&(pl|=r),ye===4&&T(e,$t,ae,!1)),ls(e))}function h(e,i,r){if((ne&6)!==0)throw Error(l(327));var c=!r&&(i&127)===0&&(i&e.expiredLanes)===0||eu(e,i),p=c?Vs(e,i):ca(e,i,!0),x=c;do{if(p===0){Kt&&!c&&T(e,i,0,!1);break}else{if(r=e.current.alternate,x&&!S(r)){p=ca(e,i,!1),x=!1;continue}if(p===2){if(x=i,e.errorRecoveryDisabledLanes&x)var A=0;else A=e.pendingLanes&-536870913,A=A!==0?A:A&536870912?536870912:0;if(A!==0){i=A;t:{var O=e;p=ci;var Y=O.current.memoizedState.isDehydrated;if(Y&&(P(O,A).flags|=256),A=ca(O,A,!1),A!==2){if(be&&!Y){O.errorRecoveryDisabledLanes|=x,pl|=x,p=4;break t}x=jn,jn=p,x!==null&&(jn===null?jn=x:jn.push.apply(jn,x))}p=A}if(x=!1,p!==2)continue}}if(p===1){P(e,0),T(e,i,0,!0);break}t:{switch(c=e,x=p,x){case 0:case 1:throw Error(l(345));case 4:if((i&4194048)!==i)break;case 6:T(c,i,ae,!Xt);break t;case 2:jn=null;break;case 3:case 5:break;default:throw Error(l(329))}if((i&62914560)===i&&(p=yl+300-$n(),10<p)){if(T(c,i,ae,!Xt),er(c,0,!0)!==0)break t;Pa=i,c.timeoutHandle=xg(y.bind(null,c,r,jn,Gu,oa,i,ae,pl,Na,Xt,x,"Throttled",-0,0),p);break t}y(c,r,jn,Gu,oa,i,ae,pl,Na,Xt,x,null,-0,0)}}break}while(!0);ls(e)}function y(e,i,r,c,p,x,A,O,Y,F,lt,ct,tt,it){if(e.timeoutHandle=-1,ct=i.subtreeFlags,ct&8192||(ct&16785408)===16785408){ct={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:_i},Pe(i,x,ct);var Et=(x&62914560)===x?yl-$n():(x&4194048)===x?Hu-$n():0;if(Et=kS(ct,Et),Et!==null){Pa=x,e.cancelPendingCommit=Et(Gt.bind(null,e,i,x,r,c,p,A,O,Y,lt,ct,null,tt,it)),T(e,x,A,!F);return}}Gt(e,i,x,r,c,p,A,O,Y)}function S(e){for(var i=e;;){var r=i.tag;if((r===0||r===11||r===15)&&i.flags&16384&&(r=i.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(!Ne(x(),p))return!1}catch{return!1}}if(r=i.child,i.subtreeFlags&16384&&r!==null)r.return=i,i=r;else{if(i===e)break;for(;i.sibling===null;){if(i.return===null||i.return===e)return!0;i=i.return}i.sibling.return=i.return,i=i.sibling}}return!0}function T(e,i,r,c){i&=~oi,i&=~pl,e.suspendedLanes|=i,e.pingedLanes&=~i,c&&(e.warmLanes|=i),c=e.expirationTimes;for(var p=i;0<p;){var x=31-Ln(p),A=1<<x;c[x]=-1,p&=~A}r!==0&&Fc(e,r,i)}function N(){return(ne&6)===0?(vh(0),!1):!0}function q(){if(kt!==null){if(Rt===0)var e=kt.return;else e=kt,Un=al=null,Jf(e),Zl=null,Jl=0,e=kt;for(;e!==null;)Hs(e.alternate,e),e=e.return;kt=null}}function P(e,i){var r=e.timeoutHandle;r!==-1&&(e.timeoutHandle=-1,MS(r)),r=e.cancelPendingCommit,r!==null&&(e.cancelPendingCommit=null,r()),Pa=0,q(),pe=e,kt=r=Ti(e.current,null),$t=i,Rt=0,Pt=null,Xt=!1,Kt=eu(e,i),be=!1,Na=ae=oi=pl=Oa=ye=0,jn=ci=null,oa=!1,(i&8)!==0&&(i|=i&32);var c=e.entangledLanes;if(c!==0)for(e=e.entanglements,c&=i;0<c;){var p=31-Ln(c),x=1<<p;i|=e[p],c&=~x}return We=i,Yl(),r}function ut(e,i){Ht=null,w.H=Gr,i===Kl||i===li?(i=Po(),Rt=3):i===Mr?(i=Po(),Rt=4):Rt=i===hc?8:i!==null&&typeof i=="object"&&typeof i.then=="function"?6:1,Pt=i,kt===null&&(ye=1,fc(e,ea(i,e.current)))}function gt(){var e=hn.current;return e===null?!0:($t&4194048)===$t?Va===null:($t&62914560)===$t||($t&536870912)!==0?e===Va:!1}function St(){var e=w.H;return w.H=Gr,e===null?Gr:e}function bt(){var e=w.A;return w.A=xc,e}function Yt(){ye=4,Xt||($t&4194048)!==$t&&hn.current!==null||(Kt=!0),(Oa&134217727)===0&&(pl&134217727)===0||pe===null||T(pe,$t,ae,!1)}function ca(e,i,r){var c=ne;ne|=2;var p=St(),x=bt();(pe!==e||$t!==i)&&(Gu=null,P(e,i)),i=!1;var A=ye;t:do try{if(Rt!==0&&kt!==null){var O=kt,Y=Pt;switch(Rt){case 8:q(),A=6;break t;case 3:case 2:case 9:case 6:hn.current===null&&(i=!0);var F=Rt;if(Rt=0,Pt=null,mt(e,O,Y,F),r&&Kt){A=0;break t}break;default:F=Rt,Rt=0,Pt=null,mt(e,O,Y,F)}}Wr(),A=ye;break}catch(lt){ut(e,lt)}while(!0);return i&&e.shellSuspendCounter++,Un=al=null,ne=c,w.H=p,w.A=x,kt===null&&(pe=null,$t=0,Yl()),A}function Wr(){for(;kt!==null;)Z(kt)}function Vs(e,i){var r=ne;ne|=2;var c=St(),p=bt();pe!==e||$t!==i?(Gu=null,Ua=$n()+500,P(e,i)):Kt=eu(e,i);t:do try{if(Rt!==0&&kt!==null){i=kt;var x=Pt;e:switch(Rt){case 1:Rt=0,Pt=null,mt(e,i,x,1);break;case 2:case 9:if(Qd(x)){Rt=0,Pt=null,nt(i);break}i=function(){Rt!==2&&Rt!==9||pe!==e||(Rt=7),ls(e)},x.then(i,i);break t;case 3:Rt=7;break t;case 4:Rt=5;break t;case 7:Qd(x)?(Rt=0,Pt=null,nt(i)):(Rt=0,Pt=null,mt(e,i,x,7));break;case 5:var A=null;switch(kt.tag){case 26:A=kt.memoizedState;case 5:case 27:var O=kt;if(A?Bg(A):O.stateNode.complete){Rt=0,Pt=null;var Y=O.sibling;if(Y!==null)kt=Y;else{var F=O.return;F!==null?(kt=F,At(F)):kt=null}break e}}Rt=0,Pt=null,mt(e,i,x,5);break;case 6:Rt=0,Pt=null,mt(e,i,x,6);break;case 8:q(),ye=6;break t;default:throw Error(l(462))}}$();break}catch(lt){ut(e,lt)}while(!0);return Un=al=null,w.H=c,w.A=p,ne=r,kt!==null?0:(pe=null,$t=0,Yl(),ye)}function $(){for(;kt!==null&&!Rp();)Z(kt)}function Z(e){var i=dc(e.alternate,e,We);e.memoizedProps=e.pendingProps,i===null?At(e):kt=i}function nt(e){var i=e,r=i.alternate;switch(i.tag){case 15:case 0:i=wn(r,i,i.pendingProps,i.type,void 0,$t);break;case 11:i=wn(r,i,i.pendingProps,i.type.render,i.ref,$t);break;case 5:Jf(i);default:Hs(r,i),i=kt=Nn(i,We),i=dc(r,i,We)}e.memoizedProps=e.pendingProps,i===null?At(e):kt=i}function mt(e,i,r,c){Un=al=null,Jf(i),Zl=null,Jl=0;var p=i.return;try{if(Ea(e,p,i,r,$t)){ye=1,fc(e,ea(r,e.current)),kt=null;return}}catch(x){if(p!==null)throw kt=p,x;ye=1,fc(e,ea(r,e.current)),kt=null;return}i.flags&32768?(te||c===1?e=!0:Kt||($t&536870912)!==0?e=!1:(Xt=e=!0,(c===2||c===9||c===3||c===6)&&(c=hn.current,c!==null&&c.tag===13&&(c.flags|=16384))),Ae(i,e)):At(i)}function At(e){var i=e;do{if((i.flags&32768)!==0){Ae(i,Xt);return}e=i.return;var r=ph(i.alternate,i,We);if(r!==null){kt=r;return}if(i=i.sibling,i!==null){kt=i;return}kt=i=e}while(i!==null);ye===0&&(ye=5)}function Ae(e,i){do{var r=mc(e.alternate,e);if(r!==null){r.flags&=32767,kt=r;return}if(r=e.return,r!==null&&(r.flags|=32768,r.subtreeFlags=0,r.deletions=null),!i&&(e=e.sibling,e!==null)){kt=e;return}kt=e=r}while(e!==null);ye=6,kt=null}function Gt(e,i,r,c,p,x,A,O,Y){e.cancelPendingCommit=null;do bc();while(je!==0);if((ne&6)!==0)throw Error(l(327));if(i!==null){if(i===e.current)throw Error(l(177));if(x=i.lanes|i.childLanes,x|=Lo,hd(e,r,x,A,O,Y),e===pe&&(kt=pe=null,$t=0),Ba=i,fi=e,Pa=r,gl=x,Ys=p,Sc=c,(i.subtreeFlags&10256)!==0||(i.flags&10256)!==0?(e.callbackNode=null,e.callbackPriority=0,mS(fo,function(){return ng(),null})):(e.callbackNode=null,e.callbackPriority=0),c=(i.flags&13878)!==0,(i.subtreeFlags&13878)!==0||c){c=w.T,w.T=null,p=H.p,H.p=2,A=ne,ne|=4;try{Bu(e,i,r)}finally{ne=A,H.p=p,w.T=c}}je=1,re(),mn(),oe()}}function re(){if(je===1){je=0;var e=fi,i=Ba,r=(i.flags&13878)!==0;if((i.subtreeFlags&13878)!==0||r){r=w.T,w.T=null;var c=H.p;H.p=2;var p=ne;ne|=4;try{as(i,e);var x=Pp,A=Ho(e.containerInfo),O=x.focusedElem,Y=x.selectionRange;if(A!==O&&O&&O.ownerDocument&&wo(O.ownerDocument.documentElement,O)){if(Y!==null&&du(O)){var F=Y.start,lt=Y.end;if(lt===void 0&&(lt=F),"selectionStart"in O)O.selectionStart=F,O.selectionEnd=Math.min(lt,O.value.length);else{var ct=O.ownerDocument||document,tt=ct&&ct.defaultView||window;if(tt.getSelection){var it=tt.getSelection(),Et=O.textContent.length,wt=Math.min(Y.start,Et),Re=Y.end===void 0?wt:Math.min(Y.end,Et);!it.extend&&wt>Re&&(A=Re,Re=wt,wt=A);var J=Tf(O,wt),k=Tf(O,Re);if(J&&k&&(it.rangeCount!==1||it.anchorNode!==J.node||it.anchorOffset!==J.offset||it.focusNode!==k.node||it.focusOffset!==k.offset)){var W=ct.createRange();W.setStart(J.node,J.offset),it.removeAllRanges(),wt>Re?(it.addRange(W),it.extend(k.node,k.offset)):(W.setEnd(k.node,k.offset),it.addRange(W))}}}}for(ct=[],it=O;it=it.parentNode;)it.nodeType===1&&ct.push({element:it,left:it.scrollLeft,top:it.scrollTop});for(typeof O.focus=="function"&&O.focus(),O=0;O<ct.length;O++){var rt=ct[O];rt.element.scrollLeft=rt.left,rt.element.scrollTop=rt.top}}Om=!!Jp,Pp=Jp=null}finally{ne=p,H.p=c,w.T=r}}e.current=i,je=2}}function mn(){if(je===2){je=0;var e=fi,i=Ba,r=(i.flags&8772)!==0;if((i.subtreeFlags&8772)!==0||r){r=w.T,w.T=null;var c=H.p;H.p=2;var p=ne;ne|=4;try{gm(e,i.alternate,i)}finally{ne=p,H.p=c,w.T=r}}je=3}}function oe(){if(je===4||je===3){je=0,sd();var e=fi,i=Ba,r=Pa,c=Sc;(i.subtreeFlags&10256)!==0||(i.flags&10256)!==0?je=5:(je=0,Ba=fi=null,vl(e,e.pendingLanes));var p=e.pendingLanes;if(p===0&&(Hi=null),yo(r),i=i.stateNode,$e&&typeof $e.onCommitFiberRoot=="function")try{$e.onCommitFiberRoot(Ya,i,void 0,(i.current.flags&128)===128)}catch{}if(c!==null){i=w.T,p=H.p,H.p=2,w.T=null;try{for(var x=e.onRecoverableError,A=0;A<c.length;A++){var O=c[A];x(O.value,{componentStack:O.stack})}}finally{w.T=i,H.p=p}}(Pa&3)!==0&&bc(),ls(e),p=e.pendingLanes,(r&261930)!==0&&(p&42)!==0?e===Xs?Ls++:(Ls=0,Xs=e):Ls=0,vh(0)}}function vl(e,i){(e.pooledCacheLanes&=i)===0&&(i=e.pooledCache,i!=null&&(e.pooledCache=null,Tn(i)))}function bc(){return re(),mn(),oe(),ng()}function ng(){if(je!==5)return!1;var e=fi,i=gl;gl=0;var r=yo(Pa),c=w.T,p=H.p;try{H.p=32>r?32:r,w.T=null,r=Ys,Ys=null;var x=fi,A=Pa;if(je=0,Ba=fi=null,Pa=0,(ne&6)!==0)throw Error(l(331));var O=ne;if(ne|=4,qs(x.current),Ge(x,x.current,A,r),ne=O,vh(0,!1),$e&&typeof $e.onPostCommitFiberRoot=="function")try{$e.onPostCommitFiberRoot(Ya,x)}catch{}return!0}finally{H.p=p,w.T=c,vl(e,i)}}function ag(e,i,r){i=ea(r,i),i=mh(e.stateNode,i,2),e=ul(e,i,2),e!==null&&(iu(e,2),ls(e))}function Ee(e,i,r){if(e.tag===3)ag(e,e,r);else for(;i!==null;){if(i.tag===3){ag(i,e,r);break}else if(i.tag===1){var c=i.stateNode;if(typeof i.type.getDerivedStateFromError=="function"||typeof c.componentDidCatch=="function"&&(Hi===null||!Hi.has(c))){e=ea(r,e),r=zu(2),c=ul(i,r,2),c!==null&&(la(r,c,i,e),iu(c,2),ls(c));break}}i=i.return}}function jp(e,i,r){var c=e.pingCache;if(c===null){c=e.pingCache=new _c;var p=new Set;c.set(i,p)}else p=c.get(i),p===void 0&&(p=new Set,c.set(i,p));p.has(r)||(be=!0,p.add(r),e=fS.bind(null,e,i,r),i.then(e,e))}function fS(e,i,r){var c=e.pingCache;c!==null&&c.delete(i),e.pingedLanes|=e.suspendedLanes&r,e.warmLanes&=~r,pe===e&&($t&r)===r&&(ye===4||ye===3&&($t&62914560)===$t&&300>$n()-yl?(ne&2)===0&&P(e,0):oi|=r,Na===$t&&(Na=0)),ls(e)}function ig(e,i){i===0&&(i=nu()),e=Ll(e,i),e!==null&&(iu(e,i),ls(e))}function hS(e){var i=e.memoizedState,r=0;i!==null&&(r=i.retryLane),ig(e,r)}function dS(e,i){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(l(314))}c!==null&&c.delete(i),ig(e,r)}function mS(e,i){return qa(e,i)}var _m=null,Tc=null,qp=!1,Sm=!1,Yp=!1,ju=0;function ls(e){e!==Tc&&e.next===null&&(Tc===null?_m=Tc=e:Tc=Tc.next=e),Sm=!0,qp||(qp=!0,yS())}function vh(e,i){if(!Yp&&Sm){Yp=!0;do for(var r=!1,c=_m;c!==null;){if(e!==0){var p=c.pendingLanes;if(p===0)var x=0;else{var A=c.suspendedLanes,O=c.pingedLanes;x=(1<<31-Ln(42|e)+1)-1,x&=p&~(A&~O),x=x&201326741?x&201326741|1:x?x|2:0}x!==0&&(r=!0,rg(c,x))}else x=$t,x=er(c,c===pe?x:0,c.cancelPendingCommit!==null||c.timeoutHandle!==-1),(x&3)===0||eu(c,x)||(r=!0,rg(c,x));c=c.next}while(r);Yp=!1}}function pS(){lg()}function lg(){Sm=qp=!1;var e=0;ju!==0&&AS()&&(e=ju);for(var i=$n(),r=null,c=_m;c!==null;){var p=c.next,x=sg(c,i);x===0?(c.next=null,r===null?_m=p:r.next=p,p===null&&(Tc=r)):(r=c,(e!==0||(x&3)!==0)&&(Sm=!0)),c=p}je!==0&&je!==5||vh(e),ju!==0&&(ju=0)}function sg(e,i){for(var r=e.suspendedLanes,c=e.pingedLanes,p=e.expirationTimes,x=e.pendingLanes&-62914561;0<x;){var A=31-Ln(x),O=1<<A,Y=p[A];Y===-1?((O&r)===0||(O&c)!==0)&&(p[A]=ho(O,i)):Y<=i&&(e.expiredLanes|=O),x&=~O}if(i=pe,r=$t,r=er(e,e===i?r:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),c=e.callbackNode,r===0||e===i&&(Rt===2||Rt===9)||e.cancelPendingCommit!==null)return c!==null&&c!==null&&Cl(c),e.callbackNode=null,e.callbackPriority=0;if((r&3)===0||eu(e,r)){if(i=r&-r,i===e.callbackPriority)return i;switch(c!==null&&Cl(c),yo(r)){case 2:case 8:r=co;break;case 32:r=fo;break;case 268435456:r=cd;break;default:r=fo}return c=ug.bind(null,e),r=qa(r,c),e.callbackPriority=i,e.callbackNode=r,i}return c!==null&&c!==null&&Cl(c),e.callbackPriority=2,e.callbackNode=null,2}function ug(e,i){if(je!==0&&je!==5)return e.callbackNode=null,e.callbackPriority=0,null;var r=e.callbackNode;if(bc()&&e.callbackNode!==r)return null;var c=$t;return c=er(e,e===pe?c:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),c===0?null:(h(e,c,i),sg(e,$n()),e.callbackNode!=null&&e.callbackNode===r?ug.bind(null,e):null)}function rg(e,i){if(bc())return null;h(e,i,!0)}function yS(){RS(function(){(ne&6)!==0?qa(rd,pS):lg()})}function Lp(){if(ju===0){var e=sl;e===0&&(e=$u,$u<<=1,($u&261888)===0&&($u=256)),ju=e}return ju}function og(e){return e==null||typeof e=="symbol"||typeof e=="boolean"?null:typeof e=="function"?e:rr(""+e)}function cg(e,i){var r=i.ownerDocument.createElement("input");return r.name=i.name,r.value=i.value,e.id&&r.setAttribute("form",e.id),i.parentNode.insertBefore(r,i),e=new FormData(e),r.parentNode.removeChild(r),e}function gS(e,i,r,c,p){if(i==="submit"&&r&&r.stateNode===p){var x=og((p[zn]||null).action),A=c.submitter;A&&(i=(i=A[zn]||null)?og(i.formAction):A.getAttribute("formAction"),i!==null&&(x=i,A=null));var O=new hr("action","action",null,c,p);e.push({event:O,listeners:[{instance:null,listener:function(){if(c.defaultPrevented){if(ju!==0){var Y=A?cg(p,A):new FormData(p);oh(r,{pending:!0,data:Y,method:p.method,action:x},null,Y)}}else typeof x=="function"&&(O.preventDefault(),Y=A?cg(p,A):new FormData(p),oh(r,{pending:!0,data:Y,method:p.method,action:x},x,Y))},currentTarget:p}]})}}for(var Xp=0;Xp<Yo.length;Xp++){var Vp=Yo[Xp],vS=Vp.toLowerCase(),xS=Vp[0].toUpperCase()+Vp.slice(1);On(vS,"on"+xS)}On(ta,"onAnimationEnd"),On(Ef,"onAnimationIteration"),On(bi,"onAnimationStart"),On("dblclick","onDoubleClick"),On("focusin","onFocus"),On("focusout","onBlur"),On(gu,"onTransitionRun"),On(jl,"onTransitionStart"),On(Cf,"onTransitionCancel"),On(qo,"onTransitionEnd"),Ml("onMouseEnter",["mouseout","mouseover"]),Ml("onMouseLeave",["mouseout","mouseover"]),Ml("onPointerEnter",["pointerout","pointerover"]),Ml("onPointerLeave",["pointerout","pointerover"]),Wi("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),Wi("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),Wi("onBeforeInput",["compositionend","keypress","textInput","paste"]),Wi("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),Wi("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),Wi("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var xh="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(" "),_S=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(xh));function fg(e,i){i=(i&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(i)for(var A=c.length-1;0<=A;A--){var O=c[A],Y=O.instance,F=O.currentTarget;if(O=O.listener,Y!==x&&p.isPropagationStopped())break t;x=O,p.currentTarget=F;try{x(p)}catch(lt){ql(lt)}p.currentTarget=null,x=Y}else for(A=0;A<c.length;A++){if(O=c[A],Y=O.instance,F=O.currentTarget,O=O.listener,Y!==x&&p.isPropagationStopped())break t;x=O,p.currentTarget=F;try{x(p)}catch(lt){ql(lt)}p.currentTarget=null,x=Y}}}}function ee(e,i){var r=i[go];r===void 0&&(r=i[go]=new Set);var c=e+"__bubble";r.has(c)||(hg(i,e,2,!1),r.add(c))}function Qp(e,i,r){var c=0;i&&(c|=4),hg(r,e,c,i)}var bm="_reactListening"+Math.random().toString(36).slice(2);function kp(e){if(!e[bm]){e[bm]=!0,xi.forEach(function(r){r!=="selectionchange"&&(_S.has(r)||Qp(r,!1,e),Qp(r,!0,e))});var i=e.nodeType===9?e:e.ownerDocument;i===null||i[bm]||(i[bm]=!0,Qp("selectionchange",!1,i))}}function hg(e,i,r,c){switch(Lg(i)){case 2:var p=JS;break;case 8:p=PS;break;default:p=sy}r=p.bind(null,i,r,e),p=void 0,!Co||i!=="touchstart"&&i!=="touchmove"&&i!=="wheel"||(p=!0),c?p!==void 0?e.addEventListener(i,r,{capture:!0,passive:p}):e.addEventListener(i,r,!0):p!==void 0?e.addEventListener(i,r,{passive:p}):e.addEventListener(i,r,!1)}function Kp(e,i,r,c,p){var x=c;if((i&1)===0&&(i&2)===0&&c!==null)t:for(;;){if(c===null)return;var A=c.tag;if(A===3||A===4){var O=c.stateNode.containerInfo;if(O===p)break;if(A===4)for(A=c.return;A!==null;){var Y=A.tag;if((Y===3||Y===4)&&A.stateNode.containerInfo===p)return;A=A.return}for(;O!==null;){if(A=fn(O),A===null)return;if(Y=A.tag,Y===5||Y===6||Y===26||Y===27){c=x=A;continue t}O=O.parentNode}}c=c.return}sf(function(){var F=x,lt=To(r),ct=[];t:{var tt=$i.get(e);if(tt!==void 0){var it=hr,Et=e;switch(e){case"keypress":if(xs(r)===0)break t;case"keydown":case"keyup":it=df;break;case"focusin":Et="focus",it=Do;break;case"focusout":Et="blur",it=Do;break;case"beforeblur":case"afterblur":it=Do;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=Sd;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":it=bd;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":it=Fi;break;case ta:case Ef:case bi:it=Cd;break;case qo:it=Dp;break;case"scroll":case"scrollend":it=Ro;break;case"wheel":it=Nl;break;case"copy":case"cut":case"paste":it=rf;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":it=Oo;break;case"toggle":case"beforetoggle":it=pf}var wt=(i&4)!==0,Re=!wt&&(e==="scroll"||e==="scrollend"),J=wt?tt!==null?tt+"Capture":null:tt;wt=[];for(var k=F,W;k!==null;){var rt=k;if(W=rt.stateNode,rt=rt.tag,rt!==5&&rt!==26&&rt!==27||W===null||J===null||(rt=vs(k,J),rt!=null&&wt.push(_h(k,rt,W))),Re)break;k=k.return}0<wt.length&&(tt=new it(tt,Et,null,r,lt),ct.push({event:tt,listeners:wt}))}}if((i&7)===0){t:{if(tt=e==="mouseover"||e==="pointerover",it=e==="mouseout"||e==="pointerout",tt&&r!==or&&(Et=r.relatedTarget||r.fromElement)&&(fn(Et)||Et[Al]))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?fn(Et):null,Et!==null&&(Re=f(Et),wt=Et.tag,Et!==Re||wt!==5&&wt!==27&&wt!==6)&&(Et=null)):(it=null,Et=F),it!==Et)){if(wt=Sd,rt="onMouseLeave",J="onMouseEnter",k="mouse",(e==="pointerout"||e==="pointerover")&&(wt=Oo,rt="onPointerLeave",J="onPointerEnter",k="pointer"),Re=it==null?tt:Ji(it),W=Et==null?tt:Ji(Et),tt=new wt(rt,k+"leave",it,r,lt),tt.target=Re,tt.relatedTarget=W,rt=null,fn(lt)===F&&(wt=new wt(J,k+"enter",Et,r,lt),wt.target=W,wt.relatedTarget=Re,rt=wt),Re=rt,it&&Et)e:{for(wt=SS,J=it,k=Et,W=0,rt=J;rt;rt=wt(rt))W++;rt=0;for(var zt=k;zt;zt=wt(zt))rt++;for(;0<W-rt;)J=wt(J),W--;for(;0<rt-W;)k=wt(k),rt--;for(;W--;){if(J===k||k!==null&&J===k.alternate){wt=J;break e}J=wt(J),k=wt(k)}wt=null}else wt=null;it!==null&&dg(ct,tt,it,wt,!1),Et!==null&&Re!==null&&dg(ct,Re,Et,wt,!0)}}t:{if(tt=F?Ji(F):window,it=tt.nodeName&&tt.nodeName.toLowerCase(),it==="select"||it==="input"&&tt.type==="file")var ge=_f;else if(vf(tt))if(vr)ge=Hd;else{ge=wl;var Ct=xr}else it=tt.nodeName,!it||it.toLowerCase()!=="input"||tt.type!=="checkbox"&&tt.type!=="radio"?F&&ur(F.elementType)&&(ge=_f):ge=wd;if(ge&&(ge=ge(e,F))){Bo(ct,ge,r,lt);break t}Ct&&Ct(e,tt,F),e==="focusout"&&F&&tt.type==="number"&&F.memoizedProps.value!=null&&So(tt,"number",tt.value)}switch(Ct=F?Ji(F):window,e){case"focusin":(vf(Ct)||Ct.contentEditable==="true")&&(mu=Ct,Go=F,pu=null);break;case"focusout":pu=Go=mu=null;break;case"mousedown":xa=!0;break;case"contextmenu":case"mouseup":case"dragend":xa=!1,jo(ct,r,lt);break;case"selectionchange":if(Gd)break;case"keydown":case"keyup":jo(ct,r,lt)}var Zt;if(_s)t:{switch(e){case"compositionstart":var ie="onCompositionStart";break t;case"compositionend":ie="onCompositionEnd";break t;case"compositionupdate":ie="onCompositionUpdate";break t}ie=void 0}else Bl?No(e,r)&&(ie="onCompositionEnd"):e==="keydown"&&r.keyCode===229&&(ie="onCompositionStart");ie&&(bn&&r.locale!=="ko"&&(Bl||ie!=="onCompositionStart"?ie==="onCompositionEnd"&&Bl&&(Zt=Mo()):(zl=lt,Ao="value"in zl?zl.value:zl.textContent,Bl=!0)),Ct=Tm(F,ie),0<Ct.length&&(ie=new of(ie,e,null,r,lt),ct.push({event:ie,listeners:Ct}),Zt?ie.data=Zt:(Zt=ru(r),Zt!==null&&(ie.data=Zt)))),(Zt=Ss?Uo(e,r):Nd(e,r))&&(ie=Tm(F,"onBeforeInput"),0<ie.length&&(Ct=new of("onBeforeInput","beforeinput",null,r,lt),ct.push({event:Ct,listeners:ie}),Ct.data=Zt)),gS(ct,e,F,r,lt)}fg(ct,i)})}function _h(e,i,r){return{instance:e,listener:i,currentTarget:r}}function Tm(e,i){for(var r=i+"Capture",c=[];e!==null;){var p=e,x=p.stateNode;if(p=p.tag,p!==5&&p!==26&&p!==27||x===null||(p=vs(e,r),p!=null&&c.unshift(_h(e,p,x)),p=vs(e,i),p!=null&&c.push(_h(e,p,x))),e.tag===3)return c;e=e.return}return[]}function SS(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function dg(e,i,r,c,p){for(var x=i._reactName,A=[];r!==null&&r!==c;){var O=r,Y=O.alternate,F=O.stateNode;if(O=O.tag,Y!==null&&Y===c)break;O!==5&&O!==26&&O!==27||F===null||(Y=F,p?(F=vs(r,x),F!=null&&A.unshift(_h(r,F,Y))):p||(F=vs(r,x),F!=null&&A.push(_h(r,F,Y)))),r=r.return}A.length!==0&&e.push({event:i,listeners:A})}var bS=/\r\n?/g,TS=/\u0000|\uFFFD/g;function mg(e){return(typeof e=="string"?e:""+e).replace(bS,`
|
|
50
|
+
`).replace(TS,"")}function pg(e,i){return i=mg(i),mg(e)===i}function Me(e,i,r,c,p,x){switch(r){case"children":typeof c=="string"?i==="body"||i==="textarea"&&c===""||ys(e,c):(typeof c=="number"||typeof c=="bigint")&&i!=="body"&&ys(e,""+c);break;case"className":lr(e,"class",c);break;case"tabIndex":lr(e,"tabindex",c);break;case"dir":case"role":case"viewBox":case"width":case"height":lr(e,r,c);break;case"style":af(e,c,x);break;case"data":if(i!=="object"){lr(e,"data",c);break}case"src":case"href":if(c===""&&(i!=="a"||r!=="href")){e.removeAttribute(r);break}if(c==null||typeof c=="function"||typeof c=="symbol"||typeof c=="boolean"){e.removeAttribute(r);break}c=rr(""+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"?(i!=="input"&&Me(e,i,"name",p.name,p,null),Me(e,i,"formEncType",p.formEncType,p,null),Me(e,i,"formMethod",p.formMethod,p,null),Me(e,i,"formTarget",p.formTarget,p,null)):(Me(e,i,"encType",p.encType,p,null),Me(e,i,"method",p.method,p,null),Me(e,i,"target",p.target,p,null)));if(c==null||typeof c=="symbol"||typeof c=="boolean"){e.removeAttribute(r);break}c=rr(""+c),e.setAttribute(r,c);break;case"onClick":c!=null&&(e.onclick=_i);break;case"onScroll":c!=null&&ee("scroll",e);break;case"onScrollEnd":c!=null&&ee("scrollend",e);break;case"dangerouslySetInnerHTML":if(c!=null){if(typeof c!="object"||!("__html"in c))throw Error(l(61));if(r=c.__html,r!=null){if(p.children!=null)throw Error(l(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=rr(""+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":ee("beforetoggle",e),ee("toggle",e),ir(e,"popover",c);break;case"xlinkActuate":ti(e,"http://www.w3.org/1999/xlink","xlink:actuate",c);break;case"xlinkArcrole":ti(e,"http://www.w3.org/1999/xlink","xlink:arcrole",c);break;case"xlinkRole":ti(e,"http://www.w3.org/1999/xlink","xlink:role",c);break;case"xlinkShow":ti(e,"http://www.w3.org/1999/xlink","xlink:show",c);break;case"xlinkTitle":ti(e,"http://www.w3.org/1999/xlink","xlink:title",c);break;case"xlinkType":ti(e,"http://www.w3.org/1999/xlink","xlink:type",c);break;case"xmlBase":ti(e,"http://www.w3.org/XML/1998/namespace","xml:base",c);break;case"xmlLang":ti(e,"http://www.w3.org/XML/1998/namespace","xml:lang",c);break;case"xmlSpace":ti(e,"http://www.w3.org/XML/1998/namespace","xml:space",c);break;case"is":ir(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=xd.get(r)||r,ir(e,r,c))}}function Zp(e,i,r,c,p,x){switch(r){case"style":af(e,c,x);break;case"dangerouslySetInnerHTML":if(c!=null){if(typeof c!="object"||!("__html"in c))throw Error(l(61));if(r=c.__html,r!=null){if(p.children!=null)throw Error(l(60));e.innerHTML=r}}break;case"children":typeof c=="string"?ys(e,c):(typeof c=="number"||typeof c=="bigint")&&ys(e,""+c);break;case"onScroll":c!=null&&ee("scroll",e);break;case"onScrollEnd":c!=null&&ee("scrollend",e);break;case"onClick":c!=null&&(e.onclick=_i);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!ar.hasOwnProperty(r))t:{if(r[0]==="o"&&r[1]==="n"&&(p=r.endsWith("Capture"),i=r.slice(2,p?r.length-7:void 0),x=e[zn]||null,x=x!=null?x[r]:null,typeof x=="function"&&e.removeEventListener(i,x,p),typeof c=="function")){typeof x!="function"&&x!==null&&(r in e?e[r]=null:e.hasAttribute(r)&&e.removeAttribute(r)),e.addEventListener(i,c,p);break t}r in e?e[r]=c:c===!0?e.setAttribute(r,""):ir(e,r,c)}}}function Pn(e,i,r){switch(i){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":ee("error",e),ee("load",e);var c=!1,p=!1,x;for(x in r)if(r.hasOwnProperty(x)){var A=r[x];if(A!=null)switch(x){case"src":c=!0;break;case"srcSet":p=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(l(137,i));default:Me(e,i,x,A,r,null)}}p&&Me(e,i,"srcSet",r.srcSet,r,null),c&&Me(e,i,"src",r.src,r,null);return;case"input":ee("invalid",e);var O=x=A=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":A=lt;break;case"checked":Y=lt;break;case"defaultChecked":F=lt;break;case"value":x=lt;break;case"defaultValue":O=lt;break;case"children":case"dangerouslySetInnerHTML":if(lt!=null)throw Error(l(137,i));break;default:Me(e,i,c,lt,r,null)}}ef(e,x,O,Y,F,A,p,!1);return;case"select":ee("invalid",e),c=A=x=null;for(p in r)if(r.hasOwnProperty(p)&&(O=r[p],O!=null))switch(p){case"value":x=O;break;case"defaultValue":A=O;break;case"multiple":c=O;default:Me(e,i,p,O,r,null)}i=x,r=A,e.multiple=!!c,i!=null?su(e,!!c,i,!1):r!=null&&su(e,!!c,r,!0);return;case"textarea":ee("invalid",e),x=p=c=null;for(A in r)if(r.hasOwnProperty(A)&&(O=r[A],O!=null))switch(A){case"value":c=O;break;case"defaultValue":p=O;break;case"children":x=O;break;case"dangerouslySetInnerHTML":if(O!=null)throw Error(l(91));break;default:Me(e,i,A,O,r,null)}ps(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:Me(e,i,Y,c,r,null)}return;case"dialog":ee("beforetoggle",e),ee("toggle",e),ee("cancel",e),ee("close",e);break;case"iframe":case"object":ee("load",e);break;case"video":case"audio":for(c=0;c<xh.length;c++)ee(xh[c],e);break;case"image":ee("error",e),ee("load",e);break;case"details":ee("toggle",e);break;case"embed":case"source":case"link":ee("error",e),ee("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(l(137,i));default:Me(e,i,F,c,r,null)}return;default:if(ur(i)){for(lt in r)r.hasOwnProperty(lt)&&(c=r[lt],c!==void 0&&Zp(e,i,lt,c,r,void 0));return}}for(O in r)r.hasOwnProperty(O)&&(c=r[O],c!=null&&Me(e,i,O,c,r,null))}function ES(e,i,r,c){switch(i){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var p=null,x=null,A=null,O=null,Y=null,F=null,lt=null;for(it in r){var ct=r[it];if(r.hasOwnProperty(it)&&ct!=null)switch(it){case"checked":break;case"value":break;case"defaultValue":Y=ct;default:c.hasOwnProperty(it)||Me(e,i,it,null,c,ct)}}for(var tt in c){var it=c[tt];if(ct=r[tt],c.hasOwnProperty(tt)&&(it!=null||ct!=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":A=it;break;case"defaultValue":O=it;break;case"children":case"dangerouslySetInnerHTML":if(it!=null)throw Error(l(137,i));break;default:it!==ct&&Me(e,i,tt,it,c,ct)}}_o(e,A,O,Y,F,lt,x,p);return;case"select":it=A=O=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)||Me(e,i,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":O=x;break;case"multiple":A=x;default:x!==Y&&Me(e,i,p,x,c,Y)}i=O,r=A,c=it,tt!=null?su(e,!!r,tt,!1):!!c!=!!r&&(i!=null?su(e,!!r,i,!0):su(e,!!r,r?[]:"",!1));return;case"textarea":it=tt=null;for(O in r)if(p=r[O],r.hasOwnProperty(O)&&p!=null&&!c.hasOwnProperty(O))switch(O){case"value":break;case"children":break;default:Me(e,i,O,null,c,p)}for(A in c)if(p=c[A],x=r[A],c.hasOwnProperty(A)&&(p!=null||x!=null))switch(A){case"value":tt=p;break;case"defaultValue":it=p;break;case"children":break;case"dangerouslySetInnerHTML":if(p!=null)throw Error(l(91));break;default:p!==x&&Me(e,i,A,p,c,x)}nf(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:Me(e,i,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:Me(e,i,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 wt in r)tt=r[wt],r.hasOwnProperty(wt)&&tt!=null&&!c.hasOwnProperty(wt)&&Me(e,i,wt,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(l(137,i));break;default:Me(e,i,F,tt,c,it)}return;default:if(ur(i)){for(var Re in r)tt=r[Re],r.hasOwnProperty(Re)&&tt!==void 0&&!c.hasOwnProperty(Re)&&Zp(e,i,Re,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||Zp(e,i,lt,tt,c,it);return}}for(var J in r)tt=r[J],r.hasOwnProperty(J)&&tt!=null&&!c.hasOwnProperty(J)&&Me(e,i,J,null,c,tt);for(ct in c)tt=c[ct],it=r[ct],!c.hasOwnProperty(ct)||tt===it||tt==null&&it==null||Me(e,i,ct,tt,c,it)}function yg(e){switch(e){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function CS(){if(typeof performance.getEntriesByType=="function"){for(var e=0,i=0,r=performance.getEntriesByType("resource"),c=0;c<r.length;c++){var p=r[c],x=p.transferSize,A=p.initiatorType,O=p.duration;if(x&&O&&yg(A)){for(A=0,O=p.responseEnd,c+=1;c<r.length;c++){var Y=r[c],F=Y.startTime;if(F>O)break;var lt=Y.transferSize,ct=Y.initiatorType;lt&&yg(ct)&&(Y=Y.responseEnd,A+=lt*(Y<O?1:(O-F)/(Y-F)))}if(--c,i+=8*(x+A)/(p.duration/1e3),e++,10<e)break}}if(0<e)return i/e/1e6}return navigator.connection&&(e=navigator.connection.downlink,typeof e=="number")?e:5}var Jp=null,Pp=null;function Em(e){return e.nodeType===9?e:e.ownerDocument}function gg(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 vg(e,i){if(e===0)switch(i){case"svg":return 1;case"math":return 2;default:return 0}return e===1&&i==="foreignObject"?0:e}function Wp(e,i){return e==="textarea"||e==="noscript"||typeof i.children=="string"||typeof i.children=="number"||typeof i.children=="bigint"||typeof i.dangerouslySetInnerHTML=="object"&&i.dangerouslySetInnerHTML!==null&&i.dangerouslySetInnerHTML.__html!=null}var Fp=null;function AS(){var e=window.event;return e&&e.type==="popstate"?e===Fp?!1:(Fp=e,!0):(Fp=null,!1)}var xg=typeof setTimeout=="function"?setTimeout:void 0,MS=typeof clearTimeout=="function"?clearTimeout:void 0,_g=typeof Promise=="function"?Promise:void 0,RS=typeof queueMicrotask=="function"?queueMicrotask:typeof _g<"u"?function(e){return _g.resolve(null).then(e).catch(zS)}:xg;function zS(e){setTimeout(function(){throw e})}function qu(e){return e==="head"}function Sg(e,i){var r=i,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(i);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 A=x.nextSibling,O=x.nodeName;x[ms]||O==="SCRIPT"||O==="STYLE"||O==="LINK"&&x.rel.toLowerCase()==="stylesheet"||r.removeChild(x),x=A}}else r==="body"&&Sh(e.ownerDocument.body);r=p}while(r);Mc(i)}function bg(e,i){var r=e;e=0;do{var c=r.nextSibling;if(r.nodeType===1?i?(r._stashedDisplay=r.style.display,r.style.display="none"):(r.style.display=r._stashedDisplay||"",r.getAttribute("style")===""&&r.removeAttribute("style")):r.nodeType===3&&(i?(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 Ip(e){var i=e.firstChild;for(i&&i.nodeType===10&&(i=i.nextSibling);i;){var r=i;switch(i=i.nextSibling,r.nodeName){case"HTML":case"HEAD":case"BODY":Ip(r),nr(r);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(r.rel.toLowerCase()==="stylesheet")continue}e.removeChild(r)}}function DS(e,i,r,c){for(;e.nodeType===1;){var p=r;if(e.nodeName.toLowerCase()!==i.toLowerCase()){if(!c&&(e.nodeName!=="INPUT"||e.type!=="hidden"))break}else if(c){if(!e[ms])switch(i){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(i==="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=Gi(e.nextSibling),e===null)break}return null}function OS(e,i,r){if(i==="")return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!r||(e=Gi(e.nextSibling),e===null))return null;return e}function Tg(e,i){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!i||(e=Gi(e.nextSibling),e===null))return null;return e}function $p(e){return e.data==="$?"||e.data==="$~"}function ty(e){return e.data==="$!"||e.data==="$?"&&e.ownerDocument.readyState!=="loading"}function NS(e,i){var r=e.ownerDocument;if(e.data==="$~")e._reactRetry=i;else if(e.data!=="$?"||r.readyState!=="loading")i();else{var c=function(){i(),r.removeEventListener("DOMContentLoaded",c)};r.addEventListener("DOMContentLoaded",c),e._reactRetry=c}}function Gi(e){for(;e!=null;e=e.nextSibling){var i=e.nodeType;if(i===1||i===3)break;if(i===8){if(i=e.data,i==="$"||i==="$!"||i==="$?"||i==="$~"||i==="&"||i==="F!"||i==="F")break;if(i==="/$"||i==="/&")return null}}return e}var ey=null;function Eg(e){e=e.nextSibling;for(var i=0;e;){if(e.nodeType===8){var r=e.data;if(r==="/$"||r==="/&"){if(i===0)return Gi(e.nextSibling);i--}else r!=="$"&&r!=="$!"&&r!=="$?"&&r!=="$~"&&r!=="&"||i++}e=e.nextSibling}return null}function Cg(e){e=e.previousSibling;for(var i=0;e;){if(e.nodeType===8){var r=e.data;if(r==="$"||r==="$!"||r==="$?"||r==="$~"||r==="&"){if(i===0)return e;i--}else r!=="/$"&&r!=="/&"||i++}e=e.previousSibling}return null}function Ag(e,i,r){switch(i=Em(r),e){case"html":if(e=i.documentElement,!e)throw Error(l(452));return e;case"head":if(e=i.head,!e)throw Error(l(453));return e;case"body":if(e=i.body,!e)throw Error(l(454));return e;default:throw Error(l(451))}}function Sh(e){for(var i=e.attributes;i.length;)e.removeAttributeNode(i[0]);nr(e)}var ji=new Map,Mg=new Set;function Cm(e){return typeof e.getRootNode=="function"?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var Qs=H.d;H.d={f:US,r:BS,D:wS,C:HS,L:GS,m:jS,X:YS,S:qS,M:LS};function US(){var e=Qs.f(),i=N();return e||i}function BS(e){var i=De(e);i!==null&&i.tag===5&&i.type==="form"?ch(i):Qs.r(e)}var Ec=typeof document>"u"?null:document;function Rg(e,i,r){var c=Ec;if(c&&typeof i=="string"&&i){var p=ga(i);p='link[rel="'+e+'"][href="'+p+'"]',typeof r=="string"&&(p+='[crossorigin="'+r+'"]'),Mg.has(p)||(Mg.add(p),e={rel:e,crossOrigin:r,href:i},c.querySelector(p)===null&&(i=c.createElement("link"),Pn(i,"link",e),tn(i),c.head.appendChild(i)))}}function wS(e){Qs.D(e),Rg("dns-prefetch",e,null)}function HS(e,i){Qs.C(e,i),Rg("preconnect",e,i)}function GS(e,i,r){Qs.L(e,i,r);var c=Ec;if(c&&e&&i){var p='link[rel="preload"][as="'+ga(i)+'"]';i==="image"&&r&&r.imageSrcSet?(p+='[imagesrcset="'+ga(r.imageSrcSet)+'"]',typeof r.imageSizes=="string"&&(p+='[imagesizes="'+ga(r.imageSizes)+'"]')):p+='[href="'+ga(e)+'"]';var x=p;switch(i){case"style":x=Cc(e);break;case"script":x=Ac(e)}ji.has(x)||(e=b({rel:"preload",href:i==="image"&&r&&r.imageSrcSet?void 0:e,as:i},r),ji.set(x,e),c.querySelector(p)!==null||i==="style"&&c.querySelector(bh(x))||i==="script"&&c.querySelector(Th(x))||(i=c.createElement("link"),Pn(i,"link",e),tn(i),c.head.appendChild(i)))}}function jS(e,i){Qs.m(e,i);var r=Ec;if(r&&e){var c=i&&typeof i.as=="string"?i.as:"script",p='link[rel="modulepreload"][as="'+ga(c)+'"][href="'+ga(e)+'"]',x=p;switch(c){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":x=Ac(e)}if(!ji.has(x)&&(e=b({rel:"modulepreload",href:e},i),ji.set(x,e),r.querySelector(p)===null)){switch(c){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(r.querySelector(Th(x)))return}c=r.createElement("link"),Pn(c,"link",e),tn(c),r.head.appendChild(c)}}}function qS(e,i,r){Qs.S(e,i,r);var c=Ec;if(c&&e){var p=Pi(c).hoistableStyles,x=Cc(e);i=i||"default";var A=p.get(x);if(!A){var O={loading:0,preload:null};if(A=c.querySelector(bh(x)))O.loading=5;else{e=b({rel:"stylesheet",href:e,"data-precedence":i},r),(r=ji.get(x))&&ny(e,r);var Y=A=c.createElement("link");tn(Y),Pn(Y,"link",e),Y._p=new Promise(function(F,lt){Y.onload=F,Y.onerror=lt}),Y.addEventListener("load",function(){O.loading|=1}),Y.addEventListener("error",function(){O.loading|=2}),O.loading|=4,Am(A,i,c)}A={type:"stylesheet",instance:A,count:1,state:O},p.set(x,A)}}}function YS(e,i){Qs.X(e,i);var r=Ec;if(r&&e){var c=Pi(r).hoistableScripts,p=Ac(e),x=c.get(p);x||(x=r.querySelector(Th(p)),x||(e=b({src:e,async:!0},i),(i=ji.get(p))&&ay(e,i),x=r.createElement("script"),tn(x),Pn(x,"link",e),r.head.appendChild(x)),x={type:"script",instance:x,count:1,state:null},c.set(p,x))}}function LS(e,i){Qs.M(e,i);var r=Ec;if(r&&e){var c=Pi(r).hoistableScripts,p=Ac(e),x=c.get(p);x||(x=r.querySelector(Th(p)),x||(e=b({src:e,async:!0,type:"module"},i),(i=ji.get(p))&&ay(e,i),x=r.createElement("script"),tn(x),Pn(x,"link",e),r.head.appendChild(x)),x={type:"script",instance:x,count:1,state:null},c.set(p,x))}}function zg(e,i,r,c){var p=(p=Ot.current)?Cm(p):null;if(!p)throw Error(l(446));switch(e){case"meta":case"title":return null;case"style":return typeof r.precedence=="string"&&typeof r.href=="string"?(i=Cc(r.href),r=Pi(p).hoistableStyles,c=r.get(i),c||(c={type:"style",instance:null,count:0,state:null},r.set(i,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=Cc(r.href);var x=Pi(p).hoistableStyles,A=x.get(e);if(A||(p=p.ownerDocument||p,A={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},x.set(e,A),(x=p.querySelector(bh(e)))&&!x._p&&(A.instance=x,A.state.loading=5),ji.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},ji.set(e,r),x||XS(p,e,r,A.state))),i&&c===null)throw Error(l(528,""));return A}if(i&&c!==null)throw Error(l(529,""));return null;case"script":return i=r.async,r=r.src,typeof r=="string"&&i&&typeof i!="function"&&typeof i!="symbol"?(i=Ac(r),r=Pi(p).hoistableScripts,c=r.get(i),c||(c={type:"script",instance:null,count:0,state:null},r.set(i,c)),c):{type:"void",instance:null,count:0,state:null};default:throw Error(l(444,e))}}function Cc(e){return'href="'+ga(e)+'"'}function bh(e){return'link[rel="stylesheet"]['+e+"]"}function Dg(e){return b({},e,{"data-precedence":e.precedence,precedence:null})}function XS(e,i,r,c){e.querySelector('link[rel="preload"][as="style"]['+i+"]")?c.loading=1:(i=e.createElement("link"),c.preload=i,i.addEventListener("load",function(){return c.loading|=1}),i.addEventListener("error",function(){return c.loading|=2}),Pn(i,"link",r),tn(i),e.head.appendChild(i))}function Ac(e){return'[src="'+ga(e)+'"]'}function Th(e){return"script[async]"+e}function Og(e,i,r){if(i.count++,i.instance===null)switch(i.type){case"style":var c=e.querySelector('style[data-href~="'+ga(r.href)+'"]');if(c)return i.instance=c,tn(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"),tn(c),Pn(c,"style",p),Am(c,r.precedence,e),i.instance=c;case"stylesheet":p=Cc(r.href);var x=e.querySelector(bh(p));if(x)return i.state.loading|=4,i.instance=x,tn(x),x;c=Dg(r),(p=ji.get(p))&&ny(c,p),x=(e.ownerDocument||e).createElement("link"),tn(x);var A=x;return A._p=new Promise(function(O,Y){A.onload=O,A.onerror=Y}),Pn(x,"link",c),i.state.loading|=4,Am(x,r.precedence,e),i.instance=x;case"script":return x=Ac(r.src),(p=e.querySelector(Th(x)))?(i.instance=p,tn(p),p):(c=r,(p=ji.get(x))&&(c=b({},r),ay(c,p)),e=e.ownerDocument||e,p=e.createElement("script"),tn(p),Pn(p,"link",c),e.head.appendChild(p),i.instance=p);case"void":return null;default:throw Error(l(443,i.type))}else i.type==="stylesheet"&&(i.state.loading&4)===0&&(c=i.instance,i.state.loading|=4,Am(c,r.precedence,e));return i.instance}function Am(e,i,r){for(var c=r.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),p=c.length?c[c.length-1]:null,x=p,A=0;A<c.length;A++){var O=c[A];if(O.dataset.precedence===i)x=O;else if(x!==p)break}x?x.parentNode.insertBefore(e,x.nextSibling):(i=r.nodeType===9?r.head:r,i.insertBefore(e,i.firstChild))}function ny(e,i){e.crossOrigin==null&&(e.crossOrigin=i.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=i.referrerPolicy),e.title==null&&(e.title=i.title)}function ay(e,i){e.crossOrigin==null&&(e.crossOrigin=i.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=i.referrerPolicy),e.integrity==null&&(e.integrity=i.integrity)}var Mm=null;function Ng(e,i,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[ms]||x[Ft]||e==="link"&&x.getAttribute("rel")==="stylesheet")&&x.namespaceURI!=="http://www.w3.org/2000/svg"){var A=x.getAttribute(i)||"";A=e+A;var O=c.get(A);O?O.push(x):c.set(A,[x])}}return c}function Ug(e,i,r){e=e.ownerDocument||e,e.head.insertBefore(r,i==="title"?e.querySelector("head > title"):null)}function VS(e,i,r){if(r===1||i.itemProp!=null)return!1;switch(e){case"meta":case"title":return!0;case"style":if(typeof i.precedence!="string"||typeof i.href!="string"||i.href==="")break;return!0;case"link":if(typeof i.rel!="string"||typeof i.href!="string"||i.href===""||i.onLoad||i.onError)break;switch(i.rel){case"stylesheet":return e=i.disabled,typeof i.precedence=="string"&&e==null;default:return!0}case"script":if(i.async&&typeof i.async!="function"&&typeof i.async!="symbol"&&!i.onLoad&&!i.onError&&i.src&&typeof i.src=="string")return!0}return!1}function Bg(e){return!(e.type==="stylesheet"&&(e.state.loading&3)===0)}function QS(e,i,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=Cc(c.href),x=i.querySelector(bh(p));if(x){i=x._p,i!==null&&typeof i=="object"&&typeof i.then=="function"&&(e.count++,e=Rm.bind(e),i.then(e,e)),r.state.loading|=4,r.instance=x,tn(x);return}x=i.ownerDocument||i,c=Dg(c),(p=ji.get(p))&&ny(c,p),x=x.createElement("link"),tn(x);var A=x;A._p=new Promise(function(O,Y){A.onload=O,A.onerror=Y}),Pn(x,"link",c),r.instance=x}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(r,i),(i=r.state.preload)&&(r.state.loading&3)===0&&(e.count++,r=Rm.bind(e),i.addEventListener("load",r),i.addEventListener("error",r))}}var iy=0;function kS(e,i){return e.stylesheets&&e.count===0&&Dm(e,e.stylesheets),0<e.count||0<e.imgCount?function(r){var c=setTimeout(function(){if(e.stylesheets&&Dm(e,e.stylesheets),e.unsuspend){var x=e.unsuspend;e.unsuspend=null,x()}},6e4+i);0<e.imgBytes&&iy===0&&(iy=62500*CS());var p=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&Dm(e,e.stylesheets),e.unsuspend)){var x=e.unsuspend;e.unsuspend=null,x()}},(e.imgBytes>iy?50:800)+i);return e.unsuspend=r,function(){e.unsuspend=null,clearTimeout(c),clearTimeout(p)}}:null}function Rm(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)Dm(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var zm=null;function Dm(e,i){e.stylesheets=null,e.unsuspend!==null&&(e.count++,zm=new Map,i.forEach(KS,e),zm=null,Rm.call(e))}function KS(e,i){if(!(i.state.loading&4)){var r=zm.get(e);if(r)var c=r.get(null);else{r=new Map,zm.set(e,r);for(var p=e.querySelectorAll("link[data-precedence],style[data-precedence]"),x=0;x<p.length;x++){var A=p[x];(A.nodeName==="LINK"||A.getAttribute("media")!=="not all")&&(r.set(A.dataset.precedence,A),c=A)}c&&r.set(null,c)}p=i.instance,A=p.getAttribute("data-precedence"),x=r.get(A)||c,x===c&&r.set(null,p),r.set(A,p),this.count++,c=Rm.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)),i.state.loading|=4}}var Eh={$$typeof:B,Provider:null,Consumer:null,_currentValue:at,_currentValue2:at,_threadCount:0};function ZS(e,i,r,c,p,x,A,O,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=au(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=au(0),this.hiddenUpdates=au(null),this.identifierPrefix=c,this.onUncaughtError=p,this.onCaughtError=x,this.onRecoverableError=A,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=Y,this.incompleteTransitions=new Map}function wg(e,i,r,c,p,x,A,O,Y,F,lt,ct){return e=new ZS(e,i,r,A,Y,F,lt,ct,O),i=1,x===!0&&(i|=24),x=Vn(3,null,null,i),e.current=x,x.stateNode=e,i=Nf(),i.refCount++,e.pooledCache=i,i.refCount++,x.memoizedState={element:c,isDehydrated:r,cache:i},jf(x),e}function Hg(e){return e?(e=Xl,e):Xl}function Gg(e,i,r,c,p,x){p=Hg(p),c.context===null?c.context=p:c.pendingContext=p,c=Ri(i),c.payload={element:r},x=x===void 0?null:x,x!==null&&(c.callback=x),r=ul(e,c,i),r!==null&&(u(r,e,i),Wl(r,e,i))}function jg(e,i){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var r=e.retryLane;e.retryLane=r!==0&&r<i?r:i}}function ly(e,i){jg(e,i),(e=e.alternate)&&jg(e,i)}function qg(e){if(e.tag===13||e.tag===31){var i=Ll(e,67108864);i!==null&&u(i,e,67108864),ly(e,67108864)}}function Yg(e){if(e.tag===13||e.tag===31){var i=Jn();i=gi(i);var r=Ll(e,i);r!==null&&u(r,e,i),ly(e,i)}}var Om=!0;function JS(e,i,r,c){var p=w.T;w.T=null;var x=H.p;try{H.p=2,sy(e,i,r,c)}finally{H.p=x,w.T=p}}function PS(e,i,r,c){var p=w.T;w.T=null;var x=H.p;try{H.p=8,sy(e,i,r,c)}finally{H.p=x,w.T=p}}function sy(e,i,r,c){if(Om){var p=uy(c);if(p===null)Kp(e,i,c,Nm,r),Xg(e,c);else if(FS(p,e,i,r,c))c.stopPropagation();else if(Xg(e,c),i&4&&-1<WS.indexOf(e)){for(;p!==null;){var x=De(p);if(x!==null)switch(x.tag){case 3:if(x=x.stateNode,x.current.memoizedState.isDehydrated){var A=yi(x.pendingLanes);if(A!==0){var O=x;for(O.pendingLanes|=2,O.entangledLanes|=2;A;){var Y=1<<31-Ln(A);O.entanglements[1]|=Y,A&=~Y}ls(x),(ne&6)===0&&(Ua=$n()+500,vh(0))}}break;case 31:case 13:O=Ll(x,2),O!==null&&u(O,x,2),N(),ly(x,2)}if(x=uy(c),x===null&&Kp(e,i,c,Nm,r),x===p)break;p=x}p!==null&&c.stopPropagation()}else Kp(e,i,c,null,r)}}function uy(e){return e=To(e),ry(e)}var Nm=null;function ry(e){if(Nm=null,e=fn(e),e!==null){var i=f(e);if(i===null)e=null;else{var r=i.tag;if(r===13){if(e=d(i),e!==null)return e;e=null}else if(r===31){if(e=m(i),e!==null)return e;e=null}else if(r===3){if(i.stateNode.current.memoizedState.isDehydrated)return i.tag===3?i.stateNode.containerInfo:null;e=null}else i!==e&&(e=null)}}return Nm=e,null}function Lg(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(ud()){case rd:return 2;case co:return 8;case fo:case od:return 32;case cd:return 268435456;default:return 32}default:return 32}}var oy=!1,Yu=null,Lu=null,Xu=null,Ch=new Map,Ah=new Map,Vu=[],WS="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 Xg(e,i){switch(e){case"focusin":case"focusout":Yu=null;break;case"dragenter":case"dragleave":Lu=null;break;case"mouseover":case"mouseout":Xu=null;break;case"pointerover":case"pointerout":Ch.delete(i.pointerId);break;case"gotpointercapture":case"lostpointercapture":Ah.delete(i.pointerId)}}function Mh(e,i,r,c,p,x){return e===null||e.nativeEvent!==x?(e={blockedOn:i,domEventName:r,eventSystemFlags:c,nativeEvent:x,targetContainers:[p]},i!==null&&(i=De(i),i!==null&&qg(i)),e):(e.eventSystemFlags|=c,i=e.targetContainers,p!==null&&i.indexOf(p)===-1&&i.push(p),e)}function FS(e,i,r,c,p){switch(i){case"focusin":return Yu=Mh(Yu,e,i,r,c,p),!0;case"dragenter":return Lu=Mh(Lu,e,i,r,c,p),!0;case"mouseover":return Xu=Mh(Xu,e,i,r,c,p),!0;case"pointerover":var x=p.pointerId;return Ch.set(x,Mh(Ch.get(x)||null,e,i,r,c,p)),!0;case"gotpointercapture":return x=p.pointerId,Ah.set(x,Mh(Ah.get(x)||null,e,i,r,c,p)),!0}return!1}function Vg(e){var i=fn(e.target);if(i!==null){var r=f(i);if(r!==null){if(i=r.tag,i===13){if(i=d(r),i!==null){e.blockedOn=i,vi(e.priority,function(){Yg(r)});return}}else if(i===31){if(i=m(r),i!==null){e.blockedOn=i,vi(e.priority,function(){Yg(r)});return}}else if(i===3&&r.stateNode.current.memoizedState.isDehydrated){e.blockedOn=r.tag===3?r.stateNode.containerInfo:null;return}}}e.blockedOn=null}function Um(e){if(e.blockedOn!==null)return!1;for(var i=e.targetContainers;0<i.length;){var r=uy(e.nativeEvent);if(r===null){r=e.nativeEvent;var c=new r.constructor(r.type,r);or=c,r.target.dispatchEvent(c),or=null}else return i=De(r),i!==null&&qg(i),e.blockedOn=r,!1;i.shift()}return!0}function Qg(e,i,r){Um(e)&&r.delete(i)}function IS(){oy=!1,Yu!==null&&Um(Yu)&&(Yu=null),Lu!==null&&Um(Lu)&&(Lu=null),Xu!==null&&Um(Xu)&&(Xu=null),Ch.forEach(Qg),Ah.forEach(Qg)}function Bm(e,i){e.blockedOn===i&&(e.blockedOn=null,oy||(oy=!0,a.unstable_scheduleCallback(a.unstable_NormalPriority,IS)))}var wm=null;function kg(e){wm!==e&&(wm=e,a.unstable_scheduleCallback(a.unstable_NormalPriority,function(){wm===e&&(wm=null);for(var i=0;i<e.length;i+=3){var r=e[i],c=e[i+1],p=e[i+2];if(typeof c!="function"){if(ry(c||r)===null)continue;break}var x=De(r);x!==null&&(e.splice(i,3),i-=3,oh(x,{pending:!0,data:p,method:r.method,action:c},c,p))}}))}function Mc(e){function i(Y){return Bm(Y,e)}Yu!==null&&Bm(Yu,e),Lu!==null&&Bm(Lu,e),Xu!==null&&Bm(Xu,e),Ch.forEach(i),Ah.forEach(i);for(var r=0;r<Vu.length;r++){var c=Vu[r];c.blockedOn===e&&(c.blockedOn=null)}for(;0<Vu.length&&(r=Vu[0],r.blockedOn===null);)Vg(r),r.blockedOn===null&&Vu.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],A=p[zn]||null;if(typeof x=="function")A||kg(r);else if(A){var O=null;if(x&&x.hasAttribute("formAction")){if(p=x,A=x[zn]||null)O=A.formAction;else if(ry(p)!==null)continue}else O=A.action;typeof O=="function"?r[c+1]=O:(r.splice(c,3),c-=3),kg(r)}}}function Kg(){function e(x){x.canIntercept&&x.info==="react-transition"&&x.intercept({handler:function(){return new Promise(function(A){return p=A})},focusReset:"manual",scroll:"manual"})}function i(){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",i),navigation.addEventListener("navigateerror",i),setTimeout(r,100),function(){c=!0,navigation.removeEventListener("navigate",e),navigation.removeEventListener("navigatesuccess",i),navigation.removeEventListener("navigateerror",i),p!==null&&(p(),p=null)}}}function cy(e){this._internalRoot=e}Hm.prototype.render=cy.prototype.render=function(e){var i=this._internalRoot;if(i===null)throw Error(l(409));var r=i.current,c=Jn();Gg(r,c,e,i,null,null)},Hm.prototype.unmount=cy.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var i=e.containerInfo;Gg(e.current,2,null,e,null,null),N(),i[Al]=null}};function Hm(e){this._internalRoot=e}Hm.prototype.unstable_scheduleHydration=function(e){if(e){var i=Zi();e={blockedOn:null,target:e,priority:i};for(var r=0;r<Vu.length&&i!==0&&i<Vu[r].priority;r++);Vu.splice(r,0,e),r===0&&Vg(e)}};var Zg=t.version;if(Zg!=="19.2.4")throw Error(l(527,Zg,"19.2.4"));H.findDOMNode=function(e){var i=e._reactInternals;if(i===void 0)throw typeof e.render=="function"?Error(l(188)):(e=Object.keys(e).join(","),Error(l(268,e)));return e=v(i),e=e!==null?_(e):null,e=e===null?null:e.stateNode,e};var $S={bundleType:0,version:"19.2.4",rendererPackageName:"react-dom",currentDispatcherRef:w,reconcilerVersion:"19.2.4"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Gm=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Gm.isDisabled&&Gm.supportsFiber)try{Ya=Gm.inject($S),$e=Gm}catch{}}return zh.createRoot=function(e,i){if(!o(e))throw Error(l(299));var r=!1,c="",p=dh,x=pm,A=cc;return i!=null&&(i.unstable_strictMode===!0&&(r=!0),i.identifierPrefix!==void 0&&(c=i.identifierPrefix),i.onUncaughtError!==void 0&&(p=i.onUncaughtError),i.onCaughtError!==void 0&&(x=i.onCaughtError),i.onRecoverableError!==void 0&&(A=i.onRecoverableError)),i=wg(e,1,!1,null,null,r,c,null,p,x,A,Kg),e[Al]=i.current,kp(e),new cy(i)},zh.hydrateRoot=function(e,i,r){if(!o(e))throw Error(l(299));var c=!1,p="",x=dh,A=pm,O=cc,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&&(A=r.onCaughtError),r.onRecoverableError!==void 0&&(O=r.onRecoverableError),r.formState!==void 0&&(Y=r.formState)),i=wg(e,1,!0,i,r??null,c,p,Y,x,A,O,Kg),i.context=Hg(null),r=i.current,c=Jn(),c=gi(c),p=Ri(c),p.callback=null,ul(r,p,c),r=c,i.current.lanes=r,iu(i,r),ls(i),e[Al]=i.current,kp(e),new Hm(i)},zh.version="19.2.4",zh}var a1;function ob(){if(a1)return dy.exports;a1=1;function a(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(a)}catch(t){console.error(t)}}return a(),dy.exports=rb(),dy.exports}var cb=ob();/**
|
|
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 i1="popstate";function l1(a){return typeof a=="object"&&a!=null&&"pathname"in a&&"search"in a&&"hash"in a&&"state"in a&&"key"in a}function fb(a={}){function t(l,o){var v;let f=(v=o.state)==null?void 0:v.masked,{pathname:d,search:m,hash:g}=f||l.location;return t0("",{pathname:d,search:m,hash:g},o.state&&o.state.usr||null,o.state&&o.state.key||"default",f?{pathname:l.location.pathname,search:l.location.search,hash:l.location.hash}:void 0)}function n(l,o){return typeof o=="string"?o:Jh(o)}return db(t,n,null,a)}function ke(a,t){if(a===!1||a===null||typeof a>"u")throw new Error(t)}function Tl(a,t){if(!a){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function hb(){return Math.random().toString(36).substring(2,10)}function s1(a,t){return{usr:a.state,key:a.key,idx:t,masked:a.unstable_mask?{pathname:a.pathname,search:a.search,hash:a.hash}:void 0}}function t0(a,t,n=null,l,o){return{pathname:typeof a=="string"?a:a.pathname,search:"",hash:"",...typeof t=="string"?Kc(t):t,state:n,key:t&&t.key||l||hb(),unstable_mask:o}}function Jh({pathname:a="/",search:t="",hash:n=""}){return t&&t!=="?"&&(a+=t.charAt(0)==="?"?t:"?"+t),n&&n!=="#"&&(a+=n.charAt(0)==="#"?n:"#"+n),a}function Kc(a){let t={};if(a){let n=a.indexOf("#");n>=0&&(t.hash=a.substring(n),a=a.substring(0,n));let l=a.indexOf("?");l>=0&&(t.search=a.substring(l),a=a.substring(0,l)),a&&(t.pathname=a)}return t}function db(a,t,n,l={}){let{window:o=document.defaultView,v5Compat:f=!1}=l,d=o.history,m="POP",g=null,v=_();v==null&&(v=0,d.replaceState({...d.state,idx:v},""));function _(){return(d.state||{idx:null}).idx}function b(){m="POP";let R=_(),D=R==null?null:R-v;v=R,g&&g({action:m,location:z.location,delta:D})}function C(R,D){m="PUSH";let U=l1(R)?R:t0(z.location,R,D);v=_()+1;let B=s1(U,v),G=z.createHref(U.unstable_mask||U);try{d.pushState(B,"",G)}catch(Q){if(Q instanceof DOMException&&Q.name==="DataCloneError")throw Q;o.location.assign(G)}f&&g&&g({action:m,location:z.location,delta:1})}function E(R,D){m="REPLACE";let U=l1(R)?R:t0(z.location,R,D);v=_();let B=s1(U,v),G=z.createHref(U.unstable_mask||U);d.replaceState(B,"",G),f&&g&&g({action:m,location:z.location,delta:0})}function M(R){return mb(R)}let z={get action(){return m},get location(){return a(o,d)},listen(R){if(g)throw new Error("A history only accepts one active listener");return o.addEventListener(i1,b),g=R,()=>{o.removeEventListener(i1,b),g=null}},createHref(R){return t(o,R)},createURL:M,encodeLocation(R){let D=M(R);return{pathname:D.pathname,search:D.search,hash:D.hash}},push:C,replace:E,go(R){return d.go(R)}};return z}function mb(a,t=!1){let n="http://localhost";typeof window<"u"&&(n=window.location.origin!=="null"?window.location.origin:window.location.href),ke(n,"No window.location.(origin|href) available to create URL");let l=typeof a=="string"?a:Jh(a);return l=l.replace(/ $/,"%20"),!t&&l.startsWith("//")&&(l=n+l),new URL(l,n)}function ix(a,t,n="/"){return pb(a,t,n,!1)}function pb(a,t,n,l){let o=typeof t=="string"?Kc(t):t,f=Is(o.pathname||"/",n);if(f==null)return null;let d=lx(a);yb(d);let m=null;for(let g=0;m==null&&g<d.length;++g){let v=Mb(f);m=Cb(d[g],v,l)}return m}function lx(a,t=[],n=[],l="",o=!1){let f=(d,m,g=o,v)=>{let _={relativePath:v===void 0?d.path||"":v,caseSensitive:d.caseSensitive===!0,childrenIndex:m,route:d};if(_.relativePath.startsWith("/")){if(!_.relativePath.startsWith(l)&&g)return;ke(_.relativePath.startsWith(l),`Absolute route path "${_.relativePath}" nested under path "${l}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),_.relativePath=_.relativePath.slice(l.length)}let b=rs([l,_.relativePath]),C=n.concat(_);d.children&&d.children.length>0&&(ke(d.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${b}".`),lx(d.children,t,C,b,g)),!(d.path==null&&!d.index)&&t.push({path:b,score:Tb(b,d.index),routesMeta:C})};return a.forEach((d,m)=>{var g;if(d.path===""||!((g=d.path)!=null&&g.includes("?")))f(d,m);else for(let v of sx(d.path))f(d,m,!0,v)}),t}function sx(a){let t=a.split("/");if(t.length===0)return[];let[n,...l]=t,o=n.endsWith("?"),f=n.replace(/\?$/,"");if(l.length===0)return o?[f,""]:[f];let d=sx(l.join("/")),m=[];return m.push(...d.map(g=>g===""?f:[f,g].join("/"))),o&&m.push(...d),m.map(g=>a.startsWith("/")&&g===""?"/":g)}function yb(a){a.sort((t,n)=>t.score!==n.score?n.score-t.score:Eb(t.routesMeta.map(l=>l.childrenIndex),n.routesMeta.map(l=>l.childrenIndex)))}var gb=/^:[\w-]+$/,vb=3,xb=2,_b=1,Sb=10,bb=-2,u1=a=>a==="*";function Tb(a,t){let n=a.split("/"),l=n.length;return n.some(u1)&&(l+=bb),t&&(l+=xb),n.filter(o=>!u1(o)).reduce((o,f)=>o+(gb.test(f)?vb:f===""?_b:Sb),l)}function Eb(a,t){return a.length===t.length&&a.slice(0,-1).every((l,o)=>l===t[o])?a[a.length-1]-t[t.length-1]:0}function Cb(a,t,n=!1){let{routesMeta:l}=a,o={},f="/",d=[];for(let m=0;m<l.length;++m){let g=l[m],v=m===l.length-1,_=f==="/"?t:t.slice(f.length)||"/",b=rp({path:g.relativePath,caseSensitive:g.caseSensitive,end:v},_),C=g.route;if(!b&&v&&n&&!l[l.length-1].route.index&&(b=rp({path:g.relativePath,caseSensitive:g.caseSensitive,end:!1},_)),!b)return null;Object.assign(o,b.params),d.push({params:o,pathname:rs([f,b.pathname]),pathnameBase:Ob(rs([f,b.pathnameBase])),route:C}),b.pathnameBase!=="/"&&(f=rs([f,b.pathnameBase]))}return d}function rp(a,t){typeof a=="string"&&(a={path:a,caseSensitive:!1,end:!0});let[n,l]=Ab(a.path,a.caseSensitive,a.end),o=t.match(n);if(!o)return null;let f=o[0],d=f.replace(/(.)\/+$/,"$1"),m=o.slice(1);return{params:l.reduce((v,{paramName:_,isOptional:b},C)=>{if(_==="*"){let M=m[C]||"";d=f.slice(0,f.length-M.length).replace(/(.)\/+$/,"$1")}const E=m[C];return b&&!E?v[_]=void 0:v[_]=(E||"").replace(/%2F/g,"/"),v},{}),pathname:f,pathnameBase:d,pattern:a}}function Ab(a,t=!1,n=!0){Tl(a==="*"||!a.endsWith("*")||a.endsWith("/*"),`Route path "${a}" will be treated as if it were "${a.replace(/\*$/,"/*")}" because the \`*\` character must always follow a \`/\` in the pattern. To get rid of this warning, please change the route path to "${a.replace(/\*$/,"/*")}".`);let l=[],o="^"+a.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(d,m,g,v,_)=>{if(l.push({paramName:m,isOptional:g!=null}),g){let b=_.charAt(v+d.length);return b&&b!=="/"?"/([^\\/]*)":"(?:/([^\\/]*))?"}return"/([^\\/]+)"}).replace(/\/([\w-]+)\?(\/|$)/g,"(/$1)?$2");return a.endsWith("*")?(l.push({paramName:"*"}),o+=a==="*"||a==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?o+="\\/*$":a!==""&&a!=="/"&&(o+="(?:(?=\\/|$))"),[new RegExp(o,t?void 0:"i"),l]}function Mb(a){try{return a.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return Tl(!1,`The URL path "${a}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${t}).`),a}}function Is(a,t){if(t==="/")return a;if(!a.toLowerCase().startsWith(t.toLowerCase()))return null;let n=t.endsWith("/")?t.length-1:t.length,l=a.charAt(n);return l&&l!=="/"?null:a.slice(n)||"/"}var Rb=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i;function zb(a,t="/"){let{pathname:n,search:l="",hash:o=""}=typeof a=="string"?Kc(a):a,f;return n?(n=n.replace(/\/\/+/g,"/"),n.startsWith("/")?f=r1(n.substring(1),"/"):f=r1(n,t)):f=t,{pathname:f,search:Nb(l),hash:Ub(o)}}function r1(a,t){let n=t.replace(/\/+$/,"").split("/");return a.split("/").forEach(o=>{o===".."?n.length>1&&n.pop():o!=="."&&n.push(o)}),n.length>1?n.join("/"):"/"}function gy(a,t,n,l){return`Cannot include a '${a}' character in a manually specified \`to.${t}\` field [${JSON.stringify(l)}]. 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(a){return a.filter((t,n)=>n===0||t.route.path&&t.route.path.length>0)}function z0(a){let t=Db(a);return t.map((n,l)=>l===t.length-1?n.pathname:n.pathnameBase)}function vp(a,t,n,l=!1){let o;typeof a=="string"?o=Kc(a):(o={...a},ke(!o.pathname||!o.pathname.includes("?"),gy("?","pathname","search",o)),ke(!o.pathname||!o.pathname.includes("#"),gy("#","pathname","hash",o)),ke(!o.search||!o.search.includes("#"),gy("#","search","hash",o)));let f=a===""||o.pathname==="",d=f?"/":o.pathname,m;if(d==null)m=n;else{let b=t.length-1;if(!l&&d.startsWith("..")){let C=d.split("/");for(;C[0]==="..";)C.shift(),b-=1;o.pathname=C.join("/")}m=b>=0?t[b]:"/"}let g=zb(o,m),v=d&&d!=="/"&&d.endsWith("/"),_=(f||d===".")&&n.endsWith("/");return!g.pathname.endsWith("/")&&(v||_)&&(g.pathname+="/"),g}var rs=a=>a.join("/").replace(/\/\/+/g,"/"),Ob=a=>a.replace(/\/+$/,"").replace(/^\/*/,"/"),Nb=a=>!a||a==="?"?"":a.startsWith("?")?a:"?"+a,Ub=a=>!a||a==="#"?"":a.startsWith("#")?a:"#"+a,Bb=class{constructor(a,t,n,l=!1){this.status=a,this.statusText=t||"",this.internal=l,n instanceof Error?(this.data=n.toString(),this.error=n):this.data=n}};function wb(a){return a!=null&&typeof a.status=="number"&&typeof a.statusText=="string"&&typeof a.internal=="boolean"&&"data"in a}function Hb(a){return a.map(t=>t.route.path).filter(Boolean).join("/").replace(/\/\/*/g,"/")||"/"}var ux=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function rx(a,t){let n=a;if(typeof n!="string"||!Rb.test(n))return{absoluteURL:void 0,isExternal:!1,to:n};let l=n,o=!1;if(ux)try{let f=new URL(window.location.href),d=n.startsWith("//")?new URL(f.protocol+n):new URL(n),m=Is(d.pathname,t);d.origin===f.origin&&m!=null?n=m+d.search+d.hash:o=!0}catch{Tl(!1,`<Link to="${n}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}return{absoluteURL:l,isExternal:o,to:n}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");var ox=["POST","PUT","PATCH","DELETE"];new Set(ox);var Gb=["GET",...ox];new Set(Gb);var Zc=L.createContext(null);Zc.displayName="DataRouter";var xp=L.createContext(null);xp.displayName="DataRouterState";var jb=L.createContext(!1),cx=L.createContext({isTransitioning:!1});cx.displayName="ViewTransition";var qb=L.createContext(new Map);qb.displayName="Fetchers";var Yb=L.createContext(null);Yb.displayName="Await";var pi=L.createContext(null);pi.displayName="Navigation";var ed=L.createContext(null);ed.displayName="Location";var El=L.createContext({outlet:null,matches:[],isDataRoute:!1});El.displayName="Route";var D0=L.createContext(null);D0.displayName="RouteError";var fx="REACT_ROUTER_ERROR",Lb="REDIRECT",Xb="ROUTE_ERROR_RESPONSE";function Vb(a){if(a.startsWith(`${fx}:${Lb}:{`))try{let t=JSON.parse(a.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 Qb(a){if(a.startsWith(`${fx}:${Xb}:{`))try{let t=JSON.parse(a.slice(40));if(typeof t=="object"&&t&&typeof t.status=="number"&&typeof t.statusText=="string")return new Bb(t.status,t.statusText,t.data)}catch{}}function kb(a,{relative:t}={}){ke(Jc(),"useHref() may be used only in the context of a <Router> component.");let{basename:n,navigator:l}=L.useContext(pi),{hash:o,pathname:f,search:d}=nd(a,{relative:t}),m=f;return n!=="/"&&(m=f==="/"?n:rs([n,f])),l.createHref({pathname:m,search:d,hash:o})}function Jc(){return L.useContext(ed)!=null}function os(){return ke(Jc(),"useLocation() may be used only in the context of a <Router> component."),L.useContext(ed).location}var hx="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function dx(a){L.useContext(pi).static||L.useLayoutEffect(a)}function _p(){let{isDataRoute:a}=L.useContext(El);return a?s2():Kb()}function Kb(){ke(Jc(),"useNavigate() may be used only in the context of a <Router> component.");let a=L.useContext(Zc),{basename:t,navigator:n}=L.useContext(pi),{matches:l}=L.useContext(El),{pathname:o}=os(),f=JSON.stringify(z0(l)),d=L.useRef(!1);return dx(()=>{d.current=!0}),L.useCallback((g,v={})=>{if(Tl(d.current,hx),!d.current)return;if(typeof g=="number"){n.go(g);return}let _=vp(g,JSON.parse(f),o,v.relative==="path");a==null&&t!=="/"&&(_.pathname=_.pathname==="/"?t:rs([t,_.pathname])),(v.replace?n.replace:n.push)(_,v.state,v)},[t,n,f,o,a])}var Zb=L.createContext(null);function Jb(a){let t=L.useContext(El).outlet;return L.useMemo(()=>t&&L.createElement(Zb.Provider,{value:a},t),[t,a])}function nd(a,{relative:t}={}){let{matches:n}=L.useContext(El),{pathname:l}=os(),o=JSON.stringify(z0(n));return L.useMemo(()=>vp(a,JSON.parse(o),l,t==="path"),[a,o,l,t])}function Pb(a,t){return mx(a,t)}function mx(a,t,n){var R;ke(Jc(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:l}=L.useContext(pi),{matches:o}=L.useContext(El),f=o[o.length-1],d=f?f.params:{},m=f?f.pathname:"/",g=f?f.pathnameBase:"/",v=f&&f.route;{let D=v&&v.path||"";yx(m,!v||D.endsWith("*")||D.endsWith("*?"),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${m}" (under <Route path="${D}">) 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="${D}"> to <Route path="${D==="/"?"*":`${D}/*`}">.`)}let _=os(),b;if(t){let D=typeof t=="string"?Kc(t):t;ke(g==="/"||((R=D.pathname)==null?void 0:R.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 "${D.pathname}" was given in the \`location\` prop.`),b=D}else b=_;let C=b.pathname||"/",E=C;if(g!=="/"){let D=g.replace(/^\//,"").split("/");E="/"+C.replace(/^\//,"").split("/").slice(D.length).join("/")}let M=ix(a,{pathname:E});Tl(v||M!=null,`No routes matched location "${b.pathname}${b.search}${b.hash}" `),Tl(M==null||M[M.length-1].route.element!==void 0||M[M.length-1].route.Component!==void 0||M[M.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 z=t2(M&&M.map(D=>Object.assign({},D,{params:Object.assign({},d,D.params),pathname:rs([g,l.encodeLocation?l.encodeLocation(D.pathname.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:D.pathname]),pathnameBase:D.pathnameBase==="/"?g:rs([g,l.encodeLocation?l.encodeLocation(D.pathnameBase.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:D.pathnameBase])})),o,n);return t&&z?L.createElement(ed.Provider,{value:{location:{pathname:"/",search:"",hash:"",state:null,key:"default",unstable_mask:void 0,...b},navigationType:"POP"}},z):z}function Wb(){let a=l2(),t=wb(a)?`${a.status} ${a.statusText}`:a instanceof Error?a.message:JSON.stringify(a),n=a instanceof Error?a.stack:null,l="rgba(200,200,200, 0.5)",o={padding:"0.5rem",backgroundColor:l},f={padding:"2px 4px",backgroundColor:l},d=null;return console.error("Error handled by React Router default ErrorBoundary:",a),d=L.createElement(L.Fragment,null,L.createElement("p",null,"💿 Hey developer 👋"),L.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",L.createElement("code",{style:f},"ErrorBoundary")," or"," ",L.createElement("code",{style:f},"errorElement")," prop on your route.")),L.createElement(L.Fragment,null,L.createElement("h2",null,"Unexpected Application Error!"),L.createElement("h3",{style:{fontStyle:"italic"}},t),n?L.createElement("pre",{style:o},n):null,d)}var Fb=L.createElement(Wb,null),px=class extends L.Component{constructor(a){super(a),this.state={location:a.location,revalidation:a.revalidation,error:a.error}}static getDerivedStateFromError(a){return{error:a}}static getDerivedStateFromProps(a,t){return t.location!==a.location||t.revalidation!=="idle"&&a.revalidation==="idle"?{error:a.error,location:a.location,revalidation:a.revalidation}:{error:a.error!==void 0?a.error:t.error,location:t.location,revalidation:a.revalidation||t.revalidation}}componentDidCatch(a,t){this.props.onError?this.props.onError(a,t):console.error("React Router caught the following error during render",a)}render(){let a=this.state.error;if(this.context&&typeof a=="object"&&a&&"digest"in a&&typeof a.digest=="string"){const n=Qb(a.digest);n&&(a=n)}let t=a!==void 0?L.createElement(El.Provider,{value:this.props.routeContext},L.createElement(D0.Provider,{value:a,children:this.props.component})):this.props.children;return this.context?L.createElement(Ib,{error:a},t):t}};px.contextType=jb;var vy=new WeakMap;function Ib({children:a,error:t}){let{basename:n}=L.useContext(pi);if(typeof t=="object"&&t&&"digest"in t&&typeof t.digest=="string"){let l=Vb(t.digest);if(l){let o=vy.get(t);if(o)throw o;let f=rx(l.location,n);if(ux&&!vy.get(t))if(f.isExternal||l.reloadDocument)window.location.href=f.absoluteURL||f.to;else{const d=Promise.resolve().then(()=>window.__reactRouterDataRouter.navigate(f.to,{replace:l.replace}));throw vy.set(t,d),d}return L.createElement("meta",{httpEquiv:"refresh",content:`0;url=${f.absoluteURL||f.to}`})}}return a}function $b({routeContext:a,match:t,children:n}){let l=L.useContext(Zc);return l&&l.static&&l.staticContext&&(t.route.errorElement||t.route.ErrorBoundary)&&(l.staticContext._deepestRenderedBoundaryId=t.route.id),L.createElement(El.Provider,{value:a},n)}function t2(a,t=[],n){let l=n==null?void 0:n.state;if(a==null){if(!l)return null;if(l.errors)a=l.matches;else if(t.length===0&&!l.initialized&&l.matches.length>0)a=l.matches;else return null}let o=a,f=l==null?void 0:l.errors;if(f!=null){let _=o.findIndex(b=>b.route.id&&(f==null?void 0:f[b.route.id])!==void 0);ke(_>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(f).join(",")}`),o=o.slice(0,Math.min(o.length,_+1))}let d=!1,m=-1;if(n&&l){d=l.renderFallback;for(let _=0;_<o.length;_++){let b=o[_];if((b.route.HydrateFallback||b.route.hydrateFallbackElement)&&(m=_),b.route.id){let{loaderData:C,errors:E}=l,M=b.route.loader&&!C.hasOwnProperty(b.route.id)&&(!E||E[b.route.id]===void 0);if(b.route.lazy||M){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=l&&g?(_,b)=>{var C,E;g(_,{location:l.location,params:((E=(C=l.matches)==null?void 0:C[0])==null?void 0:E.params)??{},unstable_pattern:Hb(l.matches),errorInfo:b})}:void 0;return o.reduceRight((_,b,C)=>{let E,M=!1,z=null,R=null;l&&(E=f&&b.route.id?f[b.route.id]:void 0,z=b.route.errorElement||Fb,d&&(m<0&&C===0?(yx("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),M=!0,R=null):m===C&&(M=!0,R=b.route.hydrateFallbackElement||null)));let D=t.concat(o.slice(0,C+1)),U=()=>{let B;return E?B=z:M?B=R:b.route.Component?B=L.createElement(b.route.Component,null):b.route.element?B=b.route.element:B=_,L.createElement($b,{match:b,routeContext:{outlet:_,matches:D,isDataRoute:l!=null},children:B})};return l&&(b.route.ErrorBoundary||b.route.errorElement||C===0)?L.createElement(px,{location:l.location,revalidation:l.revalidation,component:z,error:E,children:U(),routeContext:{outlet:null,matches:D,isDataRoute:!0},onError:v}):U()},null)}function O0(a){return`${a} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function e2(a){let t=L.useContext(Zc);return ke(t,O0(a)),t}function n2(a){let t=L.useContext(xp);return ke(t,O0(a)),t}function a2(a){let t=L.useContext(El);return ke(t,O0(a)),t}function N0(a){let t=a2(a),n=t.matches[t.matches.length-1];return ke(n.route.id,`${a} can only be used on routes that contain a unique "id"`),n.route.id}function i2(){return N0("useRouteId")}function l2(){var l;let a=L.useContext(D0),t=n2("useRouteError"),n=N0("useRouteError");return a!==void 0?a:(l=t.errors)==null?void 0:l[n]}function s2(){let{router:a}=e2("useNavigate"),t=N0("useNavigate"),n=L.useRef(!1);return dx(()=>{n.current=!0}),L.useCallback(async(o,f={})=>{Tl(n.current,hx),n.current&&(typeof o=="number"?await a.navigate(o):await a.navigate(o,{fromRouteId:t,...f}))},[a,t])}var o1={};function yx(a,t,n){!t&&!o1[a]&&(o1[a]=!0,Tl(!1,n))}L.memo(u2);function u2({routes:a,future:t,state:n,isStatic:l,onError:o}){return mx(a,void 0,{state:n,isStatic:l,onError:o})}function r2({to:a,replace:t,state:n,relative:l}){ke(Jc(),"<Navigate> may be used only in the context of a <Router> component.");let{static:o}=L.useContext(pi);Tl(!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}=L.useContext(El),{pathname:d}=os(),m=_p(),g=vp(a,z0(f),d,l==="path"),v=JSON.stringify(g);return L.useEffect(()=>{m(JSON.parse(v),{replace:t,state:n,relative:l})},[m,v,l,t,n]),null}function o2(a){return Jb(a.context)}function ku(a){ke(!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 c2({basename:a="/",children:t=null,location:n,navigationType:l="POP",navigator:o,static:f=!1,unstable_useTransitions:d}){ke(!Jc(),"You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");let m=a.replace(/^\/*/,"/"),g=L.useMemo(()=>({basename:m,navigator:o,static:f,unstable_useTransitions:d,future:{}}),[m,o,f,d]);typeof n=="string"&&(n=Kc(n));let{pathname:v="/",search:_="",hash:b="",state:C=null,key:E="default",unstable_mask:M}=n,z=L.useMemo(()=>{let R=Is(v,m);return R==null?null:{location:{pathname:R,search:_,hash:b,state:C,key:E,unstable_mask:M},navigationType:l}},[m,v,_,b,C,E,l,M]);return Tl(z!=null,`<Router basename="${m}"> is not able to match the URL "${v}${_}${b}" because it does not start with the basename, so the <Router> won't render anything.`),z==null?null:L.createElement(pi.Provider,{value:g},L.createElement(ed.Provider,{children:t,value:z}))}function f2({children:a,location:t}){return Pb(e0(a),t)}function e0(a,t=[]){let n=[];return L.Children.forEach(a,(l,o)=>{if(!L.isValidElement(l))return;let f=[...t,o];if(l.type===L.Fragment){n.push.apply(n,e0(l.props.children,f));return}ke(l.type===ku,`[${typeof l.type=="string"?l.type:l.type.name}] is not a <Route> component. All component children of <Routes> must be a <Route> or <React.Fragment>`),ke(!l.props.index||!l.props.children,"An index route cannot have child routes.");let d={id:l.props.id||f.join("-"),caseSensitive:l.props.caseSensitive,element:l.props.element,Component:l.props.Component,index:l.props.index,path:l.props.path,middleware:l.props.middleware,loader:l.props.loader,action:l.props.action,hydrateFallbackElement:l.props.hydrateFallbackElement,HydrateFallback:l.props.HydrateFallback,errorElement:l.props.errorElement,ErrorBoundary:l.props.ErrorBoundary,hasErrorBoundary:l.props.hasErrorBoundary===!0||l.props.ErrorBoundary!=null||l.props.errorElement!=null,shouldRevalidate:l.props.shouldRevalidate,handle:l.props.handle,lazy:l.props.lazy};l.props.children&&(d.children=e0(l.props.children,f)),n.push(d)}),n}var np="get",ap="application/x-www-form-urlencoded";function Sp(a){return typeof HTMLElement<"u"&&a instanceof HTMLElement}function h2(a){return Sp(a)&&a.tagName.toLowerCase()==="button"}function d2(a){return Sp(a)&&a.tagName.toLowerCase()==="form"}function m2(a){return Sp(a)&&a.tagName.toLowerCase()==="input"}function p2(a){return!!(a.metaKey||a.altKey||a.ctrlKey||a.shiftKey)}function y2(a,t){return a.button===0&&(!t||t==="_self")&&!p2(a)}var qm=null;function g2(){if(qm===null)try{new FormData(document.createElement("form"),0),qm=!1}catch{qm=!0}return qm}var v2=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function xy(a){return a!=null&&!v2.has(a)?(Tl(!1,`"${a}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${ap}"`),null):a}function x2(a,t){let n,l,o,f,d;if(d2(a)){let m=a.getAttribute("action");l=m?Is(m,t):null,n=a.getAttribute("method")||np,o=xy(a.getAttribute("enctype"))||ap,f=new FormData(a)}else if(h2(a)||m2(a)&&(a.type==="submit"||a.type==="image")){let m=a.form;if(m==null)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');let g=a.getAttribute("formaction")||m.getAttribute("action");if(l=g?Is(g,t):null,n=a.getAttribute("formmethod")||m.getAttribute("method")||np,o=xy(a.getAttribute("formenctype"))||xy(m.getAttribute("enctype"))||ap,f=new FormData(m,a),!g2()){let{name:v,type:_,value:b}=a;if(_==="image"){let C=v?`${v}.`:"";f.append(`${C}x`,"0"),f.append(`${C}y`,"0")}else v&&f.append(v,b)}}else{if(Sp(a))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');n=np,l=null,o=ap,d=a}return f&&o==="text/plain"&&(d=f,f=void 0),{action:l,method:n.toLowerCase(),encType:o,formData:f,body:d}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");function U0(a,t){if(a===!1||a===null||typeof a>"u")throw new Error(t)}function _2(a,t,n,l){let o=typeof a=="string"?new URL(a,typeof window>"u"?"server://singlefetch/":window.location.origin):a;return n?o.pathname.endsWith("/")?o.pathname=`${o.pathname}_.${l}`:o.pathname=`${o.pathname}.${l}`:o.pathname==="/"?o.pathname=`_root.${l}`:t&&Is(o.pathname,t)==="/"?o.pathname=`${t.replace(/\/$/,"")}/_root.${l}`:o.pathname=`${o.pathname.replace(/\/$/,"")}.${l}`,o}async function S2(a,t){if(a.id in t)return t[a.id];try{let n=await import(a.module);return t[a.id]=n,n}catch(n){return console.error(`Error loading route module \`${a.module}\`, reloading page...`),console.error(n),window.__reactRouterContext&&window.__reactRouterContext.isSpaMode,window.location.reload(),new Promise(()=>{})}}function b2(a){return a==null?!1:a.href==null?a.rel==="preload"&&typeof a.imageSrcSet=="string"&&typeof a.imageSizes=="string":typeof a.rel=="string"&&typeof a.href=="string"}async function T2(a,t,n){let l=await Promise.all(a.map(async o=>{let f=t.routes[o.route.id];if(f){let d=await S2(f,n);return d.links?d.links():[]}return[]}));return M2(l.flat(1).filter(b2).filter(o=>o.rel==="stylesheet"||o.rel==="preload").map(o=>o.rel==="stylesheet"?{...o,rel:"prefetch",as:"style"}:{...o,rel:"prefetch"}))}function c1(a,t,n,l,o,f){let d=(g,v)=>n[v]?g.route.id!==n[v].route.id:!0,m=(g,v)=>{var _;return n[v].pathname!==g.pathname||((_=n[v].route.path)==null?void 0:_.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 _=l.routes[g.route.id];if(!_||!_.hasLoader)return!1;if(d(g,v)||m(g,v))return!0;if(g.route.shouldRevalidate){let C=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(a,window.origin),nextParams:g.params,defaultShouldRevalidate:!0});if(typeof C=="boolean")return C}return!0}):[]}function E2(a,t,{includeHydrateFallback:n}={}){return C2(a.map(l=>{let o=t.routes[l.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 C2(a){return[...new Set(a)]}function A2(a){let t={},n=Object.keys(a).sort();for(let l of n)t[l]=a[l];return t}function M2(a,t){let n=new Set;return new Set(t),a.reduce((l,o)=>{let f=JSON.stringify(A2(o));return n.has(f)||(n.add(f),l.push({key:f,link:o})),l},[])}function gx(){let a=L.useContext(Zc);return U0(a,"You must render this element inside a <DataRouterContext.Provider> element"),a}function R2(){let a=L.useContext(xp);return U0(a,"You must render this element inside a <DataRouterStateContext.Provider> element"),a}var B0=L.createContext(void 0);B0.displayName="FrameworkContext";function vx(){let a=L.useContext(B0);return U0(a,"You must render this element inside a <HydratedRouter> element"),a}function z2(a,t){let n=L.useContext(B0),[l,o]=L.useState(!1),[f,d]=L.useState(!1),{onFocus:m,onBlur:g,onMouseEnter:v,onMouseLeave:_,onTouchStart:b}=t,C=L.useRef(null);L.useEffect(()=>{if(a==="render"&&d(!0),a==="viewport"){let z=D=>{D.forEach(U=>{d(U.isIntersecting)})},R=new IntersectionObserver(z,{threshold:.5});return C.current&&R.observe(C.current),()=>{R.disconnect()}}},[a]),L.useEffect(()=>{if(l){let z=setTimeout(()=>{d(!0)},100);return()=>{clearTimeout(z)}}},[l]);let E=()=>{o(!0)},M=()=>{o(!1),d(!1)};return n?a!=="intent"?[f,C,{}]:[f,C,{onFocus:Dh(m,E),onBlur:Dh(g,M),onMouseEnter:Dh(v,E),onMouseLeave:Dh(_,M),onTouchStart:Dh(b,E)}]:[!1,C,{}]}function Dh(a,t){return n=>{a&&a(n),n.defaultPrevented||t(n)}}function D2({page:a,...t}){let{router:n}=gx(),l=L.useMemo(()=>ix(n.routes,a,n.basename),[n.routes,a,n.basename]);return l?L.createElement(N2,{page:a,matches:l,...t}):null}function O2(a){let{manifest:t,routeModules:n}=vx(),[l,o]=L.useState([]);return L.useEffect(()=>{let f=!1;return T2(a,t,n).then(d=>{f||o(d)}),()=>{f=!0}},[a,t,n]),l}function N2({page:a,matches:t,...n}){let l=os(),{future:o,manifest:f,routeModules:d}=vx(),{basename:m}=gx(),{loaderData:g,matches:v}=R2(),_=L.useMemo(()=>c1(a,t,v,f,l,"data"),[a,t,v,f,l]),b=L.useMemo(()=>c1(a,t,v,f,l,"assets"),[a,t,v,f,l]),C=L.useMemo(()=>{if(a===l.pathname+l.search+l.hash)return[];let z=new Set,R=!1;if(t.forEach(U=>{var G;let B=f.routes[U.route.id];!B||!B.hasLoader||(!_.some(Q=>Q.route.id===U.route.id)&&U.route.id in g&&((G=d[U.route.id])!=null&&G.shouldRevalidate)||B.hasClientLoader?R=!0:z.add(U.route.id))}),z.size===0)return[];let D=_2(a,m,o.unstable_trailingSlashAwareDataRequests,"data");return R&&z.size>0&&D.searchParams.set("_routes",t.filter(U=>z.has(U.route.id)).map(U=>U.route.id).join(",")),[D.pathname+D.search]},[m,o.unstable_trailingSlashAwareDataRequests,g,l,f,_,t,a,d]),E=L.useMemo(()=>E2(b,f),[b,f]),M=O2(b);return L.createElement(L.Fragment,null,C.map(z=>L.createElement("link",{key:z,rel:"prefetch",as:"fetch",href:z,...n})),E.map(z=>L.createElement("link",{key:z,rel:"modulepreload",href:z,...n})),M.map(({key:z,link:R})=>L.createElement("link",{key:z,nonce:n.nonce,...R,crossOrigin:R.crossOrigin??n.crossOrigin})))}function U2(...a){return t=>{a.forEach(n=>{typeof n=="function"?n(t):n!=null&&(n.current=t)})}}var B2=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";try{B2&&(window.__reactRouterVersion="7.13.1")}catch{}function w2({basename:a,children:t,unstable_useTransitions:n,window:l}){let o=L.useRef();o.current==null&&(o.current=fb({window:l,v5Compat:!0}));let f=o.current,[d,m]=L.useState({action:f.action,location:f.location}),g=L.useCallback(v=>{n===!1?m(v):L.startTransition(()=>m(v))},[n]);return L.useLayoutEffect(()=>f.listen(g),[f,g]),L.createElement(c2,{basename:a,children:t,location:d.location,navigationType:d.action,navigator:f,unstable_useTransitions:n})}var xx=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,_x=L.forwardRef(function({onClick:t,discover:n="render",prefetch:l="none",relative:o,reloadDocument:f,replace:d,unstable_mask:m,state:g,target:v,to:_,preventScrollReset:b,viewTransition:C,unstable_defaultShouldRevalidate:E,...M},z){let{basename:R,navigator:D,unstable_useTransitions:U}=L.useContext(pi),B=typeof _=="string"&&xx.test(_),G=rx(_,R);_=G.to;let Q=kb(_,{relative:o}),V=os(),K=null;if(m){let Dt=vp(m,[],V.unstable_mask?V.unstable_mask.pathname:"/",!0);R!=="/"&&(Dt.pathname=Dt.pathname==="/"?R:rs([R,Dt.pathname])),K=D.createHref(Dt)}let[pt,ot,ft]=z2(l,M),ht=j2(_,{replace:d,unstable_mask:m,state:g,target:v,preventScrollReset:b,relative:o,viewTransition:C,unstable_defaultShouldRevalidate:E,unstable_useTransitions:U});function vt(Dt){t&&t(Dt),Dt.defaultPrevented||ht(Dt)}let _t=!(G.isExternal||f),xt=L.createElement("a",{...M,...ft,href:(_t?K:void 0)||G.absoluteURL||Q,onClick:_t?vt:t,ref:U2(z,ot),target:v,"data-discover":!B&&n==="render"?"true":void 0});return pt&&!B?L.createElement(L.Fragment,null,xt,L.createElement(D2,{page:Q})):xt});_x.displayName="Link";var jh=L.forwardRef(function({"aria-current":t="page",caseSensitive:n=!1,className:l="",end:o=!1,style:f,to:d,viewTransition:m,children:g,...v},_){let b=nd(d,{relative:v.relative}),C=os(),E=L.useContext(xp),{navigator:M,basename:z}=L.useContext(pi),R=E!=null&&V2(b)&&m===!0,D=M.encodeLocation?M.encodeLocation(b).pathname:b.pathname,U=C.pathname,B=E&&E.navigation&&E.navigation.location?E.navigation.location.pathname:null;n||(U=U.toLowerCase(),B=B?B.toLowerCase():null,D=D.toLowerCase()),B&&z&&(B=Is(B,z)||B);const G=D!=="/"&&D.endsWith("/")?D.length-1:D.length;let Q=U===D||!o&&U.startsWith(D)&&U.charAt(G)==="/",V=B!=null&&(B===D||!o&&B.startsWith(D)&&B.charAt(D.length)==="/"),K={isActive:Q,isPending:V,isTransitioning:R},pt=Q?t:void 0,ot;typeof l=="function"?ot=l(K):ot=[l,Q?"active":null,V?"pending":null,R?"transitioning":null].filter(Boolean).join(" ");let ft=typeof f=="function"?f(K):f;return L.createElement(_x,{...v,"aria-current":pt,className:ot,ref:_,style:ft,to:d,viewTransition:m},typeof g=="function"?g(K):g)});jh.displayName="NavLink";var H2=L.forwardRef(({discover:a="render",fetcherKey:t,navigate:n,reloadDocument:l,replace:o,state:f,method:d=np,action:m,onSubmit:g,relative:v,preventScrollReset:_,viewTransition:b,unstable_defaultShouldRevalidate:C,...E},M)=>{let{unstable_useTransitions:z}=L.useContext(pi),R=L2(),D=X2(m,{relative:v}),U=d.toLowerCase()==="get"?"get":"post",B=typeof m=="string"&&xx.test(m),G=Q=>{if(g&&g(Q),Q.defaultPrevented)return;Q.preventDefault();let V=Q.nativeEvent.submitter,K=(V==null?void 0:V.getAttribute("formmethod"))||d,pt=()=>R(V||Q.currentTarget,{fetcherKey:t,method:K,navigate:n,replace:o,state:f,relative:v,preventScrollReset:_,viewTransition:b,unstable_defaultShouldRevalidate:C});z&&n!==!1?L.startTransition(()=>pt()):pt()};return L.createElement("form",{ref:M,method:U,action:D,onSubmit:l?g:G,...E,"data-discover":!B&&a==="render"?"true":void 0})});H2.displayName="Form";function G2(a){return`${a} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function Sx(a){let t=L.useContext(Zc);return ke(t,G2(a)),t}function j2(a,{target:t,replace:n,unstable_mask:l,state:o,preventScrollReset:f,relative:d,viewTransition:m,unstable_defaultShouldRevalidate:g,unstable_useTransitions:v}={}){let _=_p(),b=os(),C=nd(a,{relative:d});return L.useCallback(E=>{if(y2(E,t)){E.preventDefault();let M=n!==void 0?n:Jh(b)===Jh(C),z=()=>_(a,{replace:M,unstable_mask:l,state:o,preventScrollReset:f,relative:d,viewTransition:m,unstable_defaultShouldRevalidate:g});v?L.startTransition(()=>z()):z()}},[b,_,C,n,l,o,t,a,f,d,m,g,v])}var q2=0,Y2=()=>`__${String(++q2)}__`;function L2(){let{router:a}=Sx("useSubmit"),{basename:t}=L.useContext(pi),n=i2(),l=a.fetch,o=a.navigate;return L.useCallback(async(f,d={})=>{let{action:m,method:g,encType:v,formData:_,body:b}=x2(f,t);if(d.navigate===!1){let C=d.fetcherKey||Y2();await l(C,n,d.action||m,{unstable_defaultShouldRevalidate:d.unstable_defaultShouldRevalidate,preventScrollReset:d.preventScrollReset,formData:_,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:_,body:b,formMethod:d.method||g,formEncType:d.encType||v,replace:d.replace,state:d.state,fromRouteId:n,flushSync:d.flushSync,viewTransition:d.viewTransition})},[l,o,t,n])}function X2(a,{relative:t}={}){let{basename:n}=L.useContext(pi),l=L.useContext(El);ke(l,"useFormAction must be used inside a RouteContext");let[o]=l.matches.slice(-1),f={...nd(a||".",{relative:t})},d=os();if(a==null){f.search=d.search;let m=new URLSearchParams(f.search),g=m.getAll("index");if(g.some(_=>_==="")){m.delete("index"),g.filter(b=>b).forEach(b=>m.append("index",b));let _=m.toString();f.search=_?`?${_}`:""}}return(!a||a===".")&&o.route.index&&(f.search=f.search?f.search.replace(/^\?/,"?index&"):"?index"),n!=="/"&&(f.pathname=f.pathname==="/"?n:rs([n,f.pathname])),Jh(f)}function V2(a,{relative:t}={}){let n=L.useContext(cx);ke(n!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:l}=Sx("useViewTransitionState"),o=nd(a,{relative:t});if(!n.isTransitioning)return!1;let f=Is(n.currentLocation.pathname,l)||n.currentLocation.pathname,d=Is(n.nextLocation.pathname,l)||n.nextLocation.pathname;return rp(o.pathname,d)!=null||rp(o.pathname,f)!=null}const f1=a=>{let t;const n=new Set,l=(v,_)=>{const b=typeof v=="function"?v(t):v;if(!Object.is(b,t)){const C=t;t=_??(typeof b!="object"||b===null)?b:Object.assign({},t,b),n.forEach(E=>E(t,C))}},o=()=>t,m={setState:l,getState:o,getInitialState:()=>g,subscribe:v=>(n.add(v),()=>n.delete(v))},g=t=a(l,o,m);return m},Q2=(a=>a?f1(a):f1),k2=a=>a;function K2(a,t=k2){const n=jm.useSyncExternalStore(a.subscribe,jm.useCallback(()=>t(a.getState()),[a,t]),jm.useCallback(()=>t(a.getInitialState()),[a,t]));return jm.useDebugValue(n),n}const h1=a=>{const t=Q2(a),n=l=>K2(t,l);return Object.assign(n,t),n},bp=(a=>a?h1(a):h1),bl=bp(a=>({user:null,isAuthenticated:!1,loading:!1,error:null,login:async(t,n)=>{a({loading:!0,error:null});try{const l=await fetch("/api/auth/login",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({username:t,password:n}),credentials:"include"}),o=await l.json();if(!l.ok){a({loading:!1,error:o.error||"Login failed"});return}a({user:o.user,isAuthenticated:!0,loading:!1,error:null})}catch{a({loading:!1,error:"Network error"})}},logout:async()=>{try{await fetch("/api/auth/logout",{method:"POST",credentials:"include"})}catch{}a({user:null,isAuthenticated:!1,error:null})},checkAuth:async()=>{a({loading:!0});try{const t=await fetch("/api/auth/me",{credentials:"include"});if(t.ok){const n=await t.json();a({user:n.user,isAuthenticated:!0,loading:!1})}else a({user:null,isAuthenticated:!1,loading:!1})}catch{a({user:null,isAuthenticated:!1,loading:!1})}},reset:()=>a({user:null,isAuthenticated:!1,loading:!1,error:null})})),wa=bp((a,t)=>({squads:[],selectedSquad:null,activeStates:{},fetchSquads:async()=>{try{const n=await fetch("/api/squads",{credentials:"include"});if(n.ok){const l=await n.json();a({squads:l.squads})}}catch{}},selectSquad:n=>a({selectedSquad:n}),setSquadState:(n,l)=>a(o=>({activeStates:{...o.activeStates,[n]:l}})),clearSquadState:n=>a(l=>{const{[n]:o,...f}=l.activeStates;return{activeStates:f}}),reset:()=>a({squads:[],selectedSquad:null,activeStates:{}})}));let Z2=0;function d1(){return`local-${Date.now()}-${++Z2}`}const Li=bp((a,t)=>({messages:[],conversationId:null,streaming:!1,streamingText:"",error:null,addUserMessage:n=>{const l={id:d1(),role:"user",content:n,createdAt:new Date().toISOString()};a(o=>({messages:[...o.messages,l],error:null}))},setConversationId:n=>{a({conversationId:n})},startStreaming:()=>{a({streaming:!0,streamingText:"",error:null})},appendChunk:n=>{a(l=>({streamingText:l.streamingText+n}))},finishStreaming:n=>{const{streamingText:l}=t(),o={id:n,role:"assistant",content:l,createdAt:new Date().toISOString()};a(f=>({messages:[...f.messages,o],streaming:!1,streamingText:""}))},addAgentDm:n=>{const l={id:d1(),role:"agent_dm",content:n.content,agentId:n.agentId,agentName:n.agentName,createdAt:new Date().toISOString()};a(o=>({messages:[...o.messages,l]}))},setError:n=>{a({error:n,streaming:!1,streamingText:""})},loadHistory:async n=>{try{const l=await fetch(`/api/squads/${n}/conversations`,{credentials:"include"});if(!l.ok)return;const o=await l.json();if(!o.data||o.data.length===0){a({conversationId:null,messages:[]});return}const f=o.data[0];a({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}));a({messages:g})}catch{}},reset:()=>a({messages:[],conversationId:null,streaming:!1,streamingText:"",error:null})}));function J2(a){const n=`${window.location.protocol==="https:"?"wss:":"ws:"}//${window.location.host}/ws`,l=new WebSocket(n),o=[];let f=!0;function d(m){l.readyState===WebSocket.OPEN?l.send(JSON.stringify(m)):l.readyState===WebSocket.CONNECTING&&o.push(m)}return l.onopen=()=>{var m,g;f||(g=(m=a.current).onReconnect)==null||g.call(m),f=!1;for(const v of o)l.send(JSON.stringify(v));o.length=0},l.onmessage=m=>{var g,v,_,b,C,E,M,z,R,D,U;try{const B=JSON.parse(m.data),G=a.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":(_=G.onChatChunk)==null||_.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":(C=G.onChatError)==null||C.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":(M=G.onChatConversationCreated)==null||M.call(G,B.squadName,B.conversationId);break;case"agent:output_chunk":(z=G.onAgentOutputChunk)==null||z.call(G,B.squadName,B.agentId,B.agentName,B.delta);break;case"agent:step_start":(R=G.onAgentStepStart)==null||R.call(G,B.squadName,B.agentId,B.agentName,B.stepIndex,B.stepLabel);break;case"agent:step_complete":(D=G.onAgentStepComplete)==null||D.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:()=>{l.close()}}}function P2(a={}){const t=L.useRef(null),n=L.useRef(a),l=L.useRef(new Set);n.current=a,L.useEffect(()=>{const g=J2(n);t.current=g;for(const v of l.current)g.subscribe(v);return()=>{g.disconnect()}},[]);const o=L.useCallback(g=>{var v;l.current.add(g),(v=t.current)==null||v.subscribe(g)},[]),f=L.useCallback(g=>{var v;l.current.delete(g),(v=t.current)==null||v.unsubscribe(g)},[]),d=L.useCallback((g,v)=>{var _;(_=t.current)==null||_.sendChat(g,v)},[]),m=L.useCallback((g,v)=>{var _;(_=t.current)==null||_.sendCheckpointResponse(g,v)},[]);return{subscribe:o,unsubscribe:f,sendChat:d,sendCheckpointResponse:m}}const W2={idle:"#888",working:"#4caf50",delivering:"#4fc3f7",done:"#4caf50",checkpoint:"#ff9800",running:"#4caf50",completed:"#4caf50"},F2={idle:"○",working:"●",delivering:"→",done:"✓",checkpoint:"◆",running:"●",completed:"✓"};function I2({status:a}){if(!a)return null;const t=W2[a]||"#888",n=F2[a]||"○";return X.jsxs("span",{style:{color:t,fontSize:"0.75rem"},children:[n," ",a]})}function $2({squad:a,selected:t,onClick:n}){return X.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:[X.jsx("div",{style:{fontSize:"0.875rem",color:t?"#e0e0e0":"#aaa"},children:a.name}),X.jsx(I2,{status:a.status})]})}function tT({squads:a,selectedSquad:t,onSelect:n}){return X.jsxs("div",{style:{padding:"8px"},children:[X.jsx("div",{style:{color:"#888",fontSize:"0.7rem",textTransform:"uppercase",marginBottom:"8px",padding:"0 12px"},children:"Squads"}),a.length===0&&X.jsx("div",{style:{padding:"8px 12px",color:"#666",fontSize:"0.8rem"},children:"No squads found"}),a.map(l=>X.jsx($2,{squad:l,selected:l.code===t,onClick:()=>n(l.code)},l.code))]})}function eT(a){const t=Math.floor(a/3600),n=Math.floor(a%3600/60),l=a%60,o=f=>f.toString().padStart(2,"0");return t>0?`${t}h ${o(n)}m ${o(l)}s`:`${n}m ${o(l)}s`}function nT({state:a}){const[t,n]=L.useState(0);return L.useEffect(()=>{if(!(a!=null&&a.startedAt)||a.status!=="running"){n(0);return}const l=new Date(a.startedAt).getTime(),o=()=>n(Math.floor((Date.now()-l)/1e3));o();const f=setInterval(o,1e3);return()=>clearInterval(f)},[a==null?void 0:a.startedAt,a==null?void 0:a.status]),a?X.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:[X.jsxs("span",{children:["Step ",a.step.current,"/",a.step.total,": ",a.step.label]}),a.status==="running"&&X.jsxs("span",{children:["Elapsed: ",eT(t)]}),a.handoff&&X.jsxs("span",{style:{color:"#4caf50"},children:[a.handoff.from," → ",a.handoff.to]})]}):X.jsx("div",{})}let n0=null;function aT(a){n0=a}function iT(a,t){n0&&n0(a,t)}let a0=null;function lT(a){a0=a}function sT(a,t){a0&&a0(a,t)}const ip=32,_l=96,Ku=64,qt={floor:13158600,floorHighlight:14211288,floorGrout:12105912,wall:15261904,wallTrim:11577496,baseboard:7035464,desk:15263976,deskTop:16119285,deskShadow:13684944,deskLeg:1710618,deskEdge:14737632,monitor:2236976,monitorScreen:1981020,monitorScreenGlow:2773120,monitorStand:3355456,keyboard:3355456,keyboardKey:4473941,chairSeat:2899536,chairBack:3426654,chairBase:4473924,chairWheel:3355443,plant:5025616,plantDark:3706428,plantLight:6732650,pot:9133628,potRim:10515018,soil:4863264,bookshelf:8020808,bookshelfEdge:9139029,bookColors:[15022389,2001125,4431943,16750592,9315498,35195,16635957],rug:6044974,rugPattern:8016448,rugBorder:4861472},i0=[5227511,5025616,16750592,15022389,9315498,16771899],uT={idle:8947848,working:5025616,delivering:5227511,done:5025616,checkpoint:16750592},ha={counter:4073251,counterTop:6111287,machine:3622735,machineTop:4545124,machineLight:5025616,cup:14142664,cupShadow:12364452,saucer:14735052,sink:7901340,faucet:11583173,menu:5125166},hi={table:6111287,tableTop:7162945,tableEdge:5125166,tableLeg:4073251,chair:3622735,chairSeat:4545124,chairBack:5533306,carpet:2503224,carpetPattern:3030340,whiteboard:15527921,whiteboardFrame:7901340},lo={background:1713022,backgroundGlow:2635155,statusRunning:5025616,statusIdle:8947848,statusCheckpoint:16750592,statusCompleted:5025616},Ps=640,qc=480,m1=64,rT=64,oT=80,cT=_l+32,fT=Ku+48,p1=2,y1=3;function g1(a,t,n){const l=Math.max(0,Math.min(1,n));return a+(t-a)*l}function hT(a){return a<.5?2*a*a:1-Math.pow(-2*a+2,2)/2}function dT(a,t){const n=a%y1,l=Math.floor(a/y1);return{x:n*(Ps+m1),y:l*(qc+m1)}}function lp(a,t){const n=a%p1,l=Math.floor(a/p1);return{x:t.x+rT+n*cT,y:t.y+oT+l*fT}}function Xh(a){return{x:a.x+Ps-80,y:a.y+qc-80}}function bx(a){return{x:a.x+Ps-160,y:a.y+Math.floor(qc/2)}}const v1=500,x1=50;let _1=0;function S1(a){return{idle:"idle",working:"working",delivering:"walking",done:"idle",checkpoint:"checkpoint"}[a]??"idle"}const He=bp(a=>({rooms:[],activeRoom:null,bubbles:{},activityLog:{},checkpoints:{},agentVisuals:{},appendBubble:(t,n,l)=>{const o=`${t}:${n}`;a(f=>{var g;let m=(((g=f.bubbles[o])==null?void 0:g.text)??"")+l;return m.length>v1&&(m=m.slice(m.length-v1)),{bubbles:{...f.bubbles,[o]:{text:m,updatedAt:Date.now()}}}})},clearBubble:(t,n)=>{const l=`${t}:${n}`;a(o=>{const{[l]:f,...d}=o.bubbles;return{bubbles:d}})},clearAllBubbles:()=>a({bubbles:{}}),addActivity:(t,n,l)=>{const f={id:++_1,agentName:n,action:l,timestamp:Date.now()};a(d=>{var _;const g=[...((_=d.activityLog[t])==null?void 0:_.entries)??[],f],v=g.length>x1?g.slice(g.length-x1):g;return{activityLog:{...d.activityLog,[t]:{entries:v}}}})},setCheckpoint:(t,n,l,o)=>a(f=>({checkpoints:{...f.checkpoints,[t]:{agentId:n,agentName:l,question:o}}})),clearCheckpoint:t=>a(n=>{const{[t]:l,...o}=n.checkpoints;return{checkpoints:o}}),setActiveRoom:t=>a({activeRoom:t}),syncRooms:t=>a(n=>{const l=t;let o;return l.length===0?o=null:n.activeRoom===null||!l.includes(n.activeRoom)?o=l[0]:o=n.activeRoom,{rooms:l,activeRoom:o}}),setAgents:(t,n)=>a(l=>{const o=l.agentVisuals[t]??[],f=new Map(o.map(g=>[g.id,g])),d={x:0,y:0},m=n.map((g,v)=>{const _=f.get(g.id);if(_){const E=g.status?S1(g.status):_.status,M=E!==_.status;let z=_.targetPosition;return M&&(E==="working"||E==="checkpoint"?z=lp(v,d):z=Xh(d)),{..._,name:g.name,deskIndex:v,status:E,targetPosition:z}}const b=g.status?S1(g.status):"idle",C=b==="working"||b==="checkpoint"?lp(v,d):Xh(d);return{id:g.id,name:g.name,colorIndex:v%6,status:b,deskIndex:v,position:C,targetPosition:null}});return{agentVisuals:{...l.agentVisuals,[t]:m}}}),setAgentStatus:(t,n,l)=>a(o=>{const f=o.agentVisuals[t];if(!f)return o;const d={x:0,y:0},m=f.map(g=>{if(g.id!==n)return g;let v;return l==="working"||l==="checkpoint"?v=lp(g.deskIndex,d):v=Xh(d),{...g,status:l,targetPosition:v}});return{agentVisuals:{...o.agentVisuals,[t]:m}}}),reset:()=>{_1=0,a({rooms:[],activeRoom:null,bubbles:{},activityLog:{},checkpoints:{},agentVisuals:{}})}}));function mT(){const a=bl(H=>H.user),t=bl(H=>H.isAuthenticated),n=bl(H=>H.loading),l=bl(H=>H.logout),o=bl(H=>H.checkAuth),f=_p(),d=os(),m=d.pathname==="/office"||d.pathname==="/",g=wa(H=>H.squads),v=wa(H=>H.selectedSquad),_=wa(H=>v?H.activeStates[v]:null),b=wa(H=>H.fetchSquads),C=wa(H=>H.selectSquad),E=wa(H=>H.setSquadState),M=wa(H=>H.clearSquadState),z=L.useCallback((H,at)=>{E(H,at);const et=He.getState();et.rooms.includes(H)||et.syncRooms([...et.rooms,H]),at.status!=="checkpoint"&&et.clearCheckpoint(H),at.agents&&et.setAgents(H,at.agents.map(dt=>({id:dt.id,name:dt.name,status:dt.status})))},[E]),R=L.useCallback(H=>{M(H);const at=He.getState(),et=at.agentVisuals[H];if(et)for(const dt of et)at.setAgentStatus(H,dt.id,"idle")},[M]),D=L.useCallback((H,at)=>{Li.getState().setConversationId(at)},[]),U=L.useCallback((H,at,et)=>{const dt=Li.getState();dt.streaming||dt.startStreaming(),dt.appendChunk(et)},[]),B=L.useCallback((H,at,et)=>{Li.getState().finishStreaming(et)},[]),G=L.useCallback((H,at)=>{Li.getState().setError(at)},[]),Q=L.useCallback((H,at,et,dt,j)=>{Li.getState().addAgentDm({agentId:et,agentName:dt,content:j})},[]),V=L.useCallback((H,at,et,dt)=>{He.getState().appendBubble(H,at,dt)},[]),K=L.useCallback((H,at,et,dt,j)=>{He.getState().addActivity(H,et,`started "${j}"`),He.getState().setAgentStatus(H,at,"working")},[]),pt=L.useCallback((H,at,et,dt,j)=>{He.getState().addActivity(H,et,`completed "${j}"`),He.getState().setAgentStatus(H,at,"idle")},[]),ot=L.useCallback((H,at,et,dt)=>{He.getState().setCheckpoint(H,at,et,dt),He.getState().setAgentStatus(H,at,"checkpoint")},[]),ft=L.useCallback(()=>{He.getState().clearAllBubbles()},[]),{subscribe:ht,unsubscribe:vt,sendChat:_t,sendCheckpointResponse:xt}=P2({onSquadState:z,onSquadInactive:R,onChatConversationCreated:D,onChatChunk:U,onChatDone:B,onChatError:G,onChatAgentDm:Q,onAgentOutputChunk:V,onAgentStepStart:K,onAgentStepComplete:pt,onSquadCheckpoint:ot,onReconnect:ft});L.useEffect(()=>{aT(_t)},[_t]),L.useEffect(()=>{lT(xt)},[xt]),L.useEffect(()=>{b().then(()=>{const{squads:H}=wa.getState();if(H.length>0){const at=He.getState(),et=H.map(I=>I.code),dt=at.rooms,j=[...new Set([...dt,...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=He(H=>H.rooms);L.useEffect(()=>{for(const H of Dt)ht(H);return()=>{for(const H of Dt)vt(H)}},[Dt,ht,vt]),L.useEffect(()=>{t||o()},[]),L.useEffect(()=>{!n&&!t&&f("/login")},[n,t,f]);const w=H=>({padding:"6px 12px",color:H?"#4fc3f7":"#888",textDecoration:"none",fontSize:"0.85rem"});return X.jsxs("div",{style:{display:"flex",flexDirection:"column",height:"100vh",background:"#0f0f1a",color:"#e0e0e0"},children:[X.jsxs("header",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",padding:"8px 16px",background:"#16213e",borderBottom:"1px solid #1a1a2e"},children:[X.jsx("span",{style:{color:"#4fc3f7",fontWeight:"bold",fontSize:"1.1rem"},children:"ExpxAgents"}),X.jsxs("span",{style:{color:"#888",fontSize:"0.85rem"},children:[a==null?void 0:a.username," | ",X.jsx("span",{style:{color:"#4caf50"},children:"● Connected"}),X.jsx("button",{onClick:l,style:{marginLeft:"12px",background:"none",border:"none",color:"#888",cursor:"pointer",fontSize:"0.8rem"},children:"Logout"})]})]}),X.jsxs("div",{style:{display:"flex",flex:1,overflow:"hidden"},children:[X.jsxs("aside",{style:{width:"200px",background:"#16213e",borderRight:"1px solid #1a1a2e",display:"flex",flexDirection:"column",overflowY:"auto"},children:[!m&&X.jsx(tT,{squads:g,selectedSquad:v,onSelect:C}),!m&&X.jsx("hr",{style:{border:"none",borderTop:"1px solid #333",margin:"8px 12px"}}),X.jsxs("nav",{style:{padding:"8px"},children:[X.jsx("div",{style:{color:"#888",fontSize:"0.7rem",textTransform:"uppercase",marginBottom:"8px",padding:"0 12px"},children:"Views"}),X.jsx(jh,{to:"/office",style:({isActive:H})=>w(H),children:"Office"}),X.jsx("br",{}),X.jsx(jh,{to:"/chat",style:({isActive:H})=>w(H),children:"Chat"}),X.jsx("br",{}),X.jsx(jh,{to:"/kanban",style:({isActive:H})=>w(H),children:"Kanban"}),X.jsx("br",{}),X.jsx(jh,{to:"/settings",style:({isActive:H})=>w(H),children:"Settings"})]})]}),X.jsx("main",{style:{flex:1,overflow:"auto"},children:X.jsx(o2,{})})]}),X.jsx(nT,{state:_})]})}function pT(){const[a,t]=L.useState(""),[n,l]=L.useState(""),o=bl(_=>_.login),f=bl(_=>_.loading),d=bl(_=>_.error),m=bl(_=>_.isAuthenticated),g=_p();L.useEffect(()=>{m&&g("/",{replace:!0})},[m,g]);const v=_=>{_.preventDefault(),o(a,n)};return X.jsx("div",{style:{display:"flex",alignItems:"center",justifyContent:"center",minHeight:"100vh",background:"#0f0f1a"},children:X.jsxs("form",{onSubmit:v,style:{background:"#1a1a2e",padding:"2rem",borderRadius:"8px",width:"320px"},children:[X.jsx("h1",{style:{color:"#4fc3f7",marginBottom:"1.5rem",textAlign:"center",fontSize:"1.5rem"},children:"ExpxAgents"}),d&&X.jsx("div",{style:{color:"#ef5350",marginBottom:"1rem",fontSize:"0.875rem"},children:d}),X.jsx("input",{type:"text",placeholder:"Username",value:a,onChange:_=>t(_.target.value),style:{width:"100%",padding:"0.75rem",marginBottom:"0.75rem",background:"#16213e",border:"1px solid #333",borderRadius:"4px",color:"#e0e0e0",fontSize:"1rem"}}),X.jsx("input",{type:"password",placeholder:"Password",value:n,onChange:_=>l(_.target.value),style:{width:"100%",padding:"0.75rem",marginBottom:"1rem",background:"#16213e",border:"1px solid #333",borderRadius:"4px",color:"#e0e0e0",fontSize:"1rem"}}),X.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 Tx(a,t,n){if(!a)return;if(n(a)===!0)return a;let l=a.child;for(;l;){const o=Tx(l,t,n);if(o)return o;l=l.sibling}}function Ex(a){try{return Object.defineProperties(a,{_currentRenderer:{get(){return null},set(){}},_currentRenderer2:{get(){return null},set(){}}})}catch{return a}}const w0=Ex(L.createContext(null));let Cx=class extends L.Component{render(){return L.createElement(w0.Provider,{value:this._reactInternals},this.props.children)}};function yT(){const a=L.useContext(w0);if(a===null)throw new Error("its-fine: useFiber must be called within a <FiberProvider />!");const t=L.useId();return L.useMemo(()=>{for(const n of[a,a==null?void 0:a.alternate]){if(!n)continue;const l=Tx(n,!1,o=>{let f=o.memoizedState;for(;f;){if(f.memoizedState===t)return!0;f=f.next}});if(l)return l}},[a,t])}const gT=Symbol.for("react.context"),vT=a=>a!==null&&typeof a=="object"&&"$$typeof"in a&&a.$$typeof===gT;function xT(){const a=yT(),[t]=L.useState(()=>new Map);t.clear();let n=a;for(;n;){const l=n.type;vT(l)&&l!==w0&&!t.has(l)&&t.set(l,L.use(Ex(l))),n=n.return}return t}function _T(){const a=xT();return L.useMemo(()=>Array.from(a.keys()).reduce((t,n)=>l=>L.createElement(t,null,L.createElement(n.Provider,{...l,value:a.get(n)})),t=>L.createElement(Cx,{...t})),[a])}const ST="modulepreload",bT=function(a){return"/"+a},b1={},Vh=function(t,n,l){let o=Promise.resolve();if(n&&n.length>0){let d=function(v){return Promise.all(v.map(_=>Promise.resolve(_).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=bT(v),v in b1)return;b1[v]=!0;const _=v.endsWith(".css"),b=_?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${v}"]${b}`))return;const C=document.createElement("link");if(C.rel=_?"stylesheet":ST,_||(C.as="script"),C.crossOrigin="",C.href=v,g&&C.setAttribute("nonce",g),document.head.appendChild(C),_)return new Promise((E,M)=>{C.addEventListener("load",E),C.addEventListener("error",()=>M(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 Wt=(a=>(a.Application="application",a.WebGLPipes="webgl-pipes",a.WebGLPipesAdaptor="webgl-pipes-adaptor",a.WebGLSystem="webgl-system",a.WebGPUPipes="webgpu-pipes",a.WebGPUPipesAdaptor="webgpu-pipes-adaptor",a.WebGPUSystem="webgpu-system",a.CanvasSystem="canvas-system",a.CanvasPipesAdaptor="canvas-pipes-adaptor",a.CanvasPipes="canvas-pipes",a.Asset="asset",a.LoadParser="load-parser",a.ResolveParser="resolve-parser",a.CacheParser="cache-parser",a.DetectionParser="detection-parser",a.MaskEffect="mask-effect",a.BlendMode="blend-mode",a.TextureSource="texture-source",a.Environment="environment",a.ShapeBuilder="shape-builder",a.Batcher="batcher",a))(Wt||{});const l0=a=>{if(typeof a=="function"||typeof a=="object"&&a.extension){if(!a.extension)throw new Error("Extension class must have an extension object");a={...typeof a.extension!="object"?{type:a.extension}:a.extension,ref:a}}if(typeof a=="object")a={...a};else throw new Error("Invalid extension type");return typeof a.type=="string"&&(a.type=[a.type]),a},Ym=(a,t)=>l0(a).priority??t,Ie={_addHandlers:{},_removeHandlers:{},_queue:{},remove(...a){return a.map(l0).forEach(t=>{t.type.forEach(n=>{var l,o;return(o=(l=this._removeHandlers)[n])==null?void 0:o.call(l,t)})}),this},add(...a){return a.map(l0).forEach(t=>{t.type.forEach(n=>{var f,d;const l=this._addHandlers,o=this._queue;l[n]?(d=l[n])==null||d.call(l,t):(o[n]=o[n]||[],(f=o[n])==null||f.push(t))})}),this},handle(a,t,n){var d;const l=this._addHandlers,o=this._removeHandlers;if(l[a]||o[a])throw new Error(`Extension type ${a} already has a handler`);l[a]=t,o[a]=n;const f=this._queue;return f[a]&&((d=f[a])==null||d.forEach(m=>t(m)),delete f[a]),this},handleByMap(a,t){return this.handle(a,n=>{n.name&&(t[n.name]=n.ref)},n=>{n.name&&delete t[n.name]})},handleByNamedList(a,t,n=-1){return this.handle(a,l=>{t.findIndex(f=>f.name===l.name)>=0||(t.push({name:l.name,value:l.ref}),t.sort((f,d)=>Ym(d.value,n)-Ym(f.value,n)))},l=>{const o=t.findIndex(f=>f.name===l.name);o!==-1&&t.splice(o,1)})},handleByList(a,t,n=-1){return this.handle(a,l=>{t.includes(l.ref)||(t.push(l.ref),t.sort((o,f)=>Ym(f,n)-Ym(o,n)))},l=>{const o=t.indexOf(l.ref);o!==-1&&t.splice(o,1)})},mixin(a,...t){for(const n of t)Object.defineProperties(a.prototype,Object.getOwnPropertyDescriptors(n))}},TT={extension:{type:Wt.Environment,name:"browser",priority:-1},test:()=>!0,load:async()=>{await Vh(()=>import("./browserAll-Cg6Ia_Fa.js"),__vite__mapDeps([0,1]))}},ET={extension:{type:Wt.Environment,name:"webworker",priority:0},test:()=>typeof self<"u"&&self.WorkerGlobalScope!==void 0,load:async()=>{await Vh(()=>import("./webworkerAll-CX20ihio.js"),[])}};class Wn{constructor(t,n,l){this._x=n||0,this._y=l||0,this._observer=t}clone(t){return new Wn(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 _y={exports:{}},T1;function CT(){return T1||(T1=1,(function(a){var t=Object.prototype.hasOwnProperty,n="~";function l(){}Object.create&&(l.prototype=Object.create(null),new l().__proto__||(n=!1));function o(g,v,_){this.fn=g,this.context=v,this.once=_||!1}function f(g,v,_,b,C){if(typeof _!="function")throw new TypeError("The listener must be a function");var E=new o(_,b||g,C),M=n?n+v:v;return g._events[M]?g._events[M].fn?g._events[M]=[g._events[M],E]:g._events[M].push(E):(g._events[M]=E,g._eventsCount++),g}function d(g,v){--g._eventsCount===0?g._events=new l:delete g._events[v]}function m(){this._events=new l,this._eventsCount=0}m.prototype.eventNames=function(){var v=[],_,b;if(this._eventsCount===0)return v;for(b in _=this._events)t.call(_,b)&&v.push(n?b.slice(1):b);return Object.getOwnPropertySymbols?v.concat(Object.getOwnPropertySymbols(_)):v},m.prototype.listeners=function(v){var _=n?n+v:v,b=this._events[_];if(!b)return[];if(b.fn)return[b.fn];for(var C=0,E=b.length,M=new Array(E);C<E;C++)M[C]=b[C].fn;return M},m.prototype.listenerCount=function(v){var _=n?n+v:v,b=this._events[_];return b?b.fn?1:b.length:0},m.prototype.emit=function(v,_,b,C,E,M){var z=n?n+v:v;if(!this._events[z])return!1;var R=this._events[z],D=arguments.length,U,B;if(R.fn){switch(R.once&&this.removeListener(v,R.fn,void 0,!0),D){case 1:return R.fn.call(R.context),!0;case 2:return R.fn.call(R.context,_),!0;case 3:return R.fn.call(R.context,_,b),!0;case 4:return R.fn.call(R.context,_,b,C),!0;case 5:return R.fn.call(R.context,_,b,C,E),!0;case 6:return R.fn.call(R.context,_,b,C,E,M),!0}for(B=1,U=new Array(D-1);B<D;B++)U[B-1]=arguments[B];R.fn.apply(R.context,U)}else{var G=R.length,Q;for(B=0;B<G;B++)switch(R[B].once&&this.removeListener(v,R[B].fn,void 0,!0),D){case 1:R[B].fn.call(R[B].context);break;case 2:R[B].fn.call(R[B].context,_);break;case 3:R[B].fn.call(R[B].context,_,b);break;case 4:R[B].fn.call(R[B].context,_,b,C);break;default:if(!U)for(Q=1,U=new Array(D-1);Q<D;Q++)U[Q-1]=arguments[Q];R[B].fn.apply(R[B].context,U)}}return!0},m.prototype.on=function(v,_,b){return f(this,v,_,b,!1)},m.prototype.once=function(v,_,b){return f(this,v,_,b,!0)},m.prototype.removeListener=function(v,_,b,C){var E=n?n+v:v;if(!this._events[E])return this;if(!_)return d(this,E),this;var M=this._events[E];if(M.fn)M.fn===_&&(!C||M.once)&&(!b||M.context===b)&&d(this,E);else{for(var z=0,R=[],D=M.length;z<D;z++)(M[z].fn!==_||C&&!M[z].once||b&&M[z].context!==b)&&R.push(M[z]);R.length?this._events[E]=R.length===1?R[0]:R:d(this,E)}return this},m.prototype.removeAllListeners=function(v){var _;return v?(_=n?n+v:v,this._events[_]&&d(this,_)):(this._events=new l,this._eventsCount=0),this},m.prototype.off=m.prototype.removeListener,m.prototype.addListener=m.prototype.on,m.prefixed=n,m.EventEmitter=m,a.exports=m})(_y)),_y.exports}var AT=CT();const cs=yp(AT),MT=Math.PI*2,RT=180/Math.PI,zT=Math.PI/180;class da{constructor(t=0,n=0){this.x=0,this.y=0,this.x=t,this.y=n}clone(){return new da(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 Sy.x=0,Sy.y=0,Sy}}const Sy=new da;class le{constructor(t=1,n=0,l=0,o=1,f=0,d=0){this.array=null,this.a=t,this.b=n,this.c=l,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,l,o,f,d){return this.a=t,this.b=n,this.c=l,this.d=o,this.tx=f,this.ty=d,this}toArray(t,n){this.array||(this.array=new Float32Array(9));const l=n||this.array;return t?(l[0]=this.a,l[1]=this.b,l[2]=0,l[3]=this.c,l[4]=this.d,l[5]=0,l[6]=this.tx,l[7]=this.ty,l[8]=1):(l[0]=this.a,l[1]=this.c,l[2]=this.tx,l[3]=this.b,l[4]=this.d,l[5]=this.ty,l[6]=0,l[7]=0,l[8]=1),l}apply(t,n){n=n||new da;const l=t.x,o=t.y;return n.x=this.a*l+this.c*o+this.tx,n.y=this.b*l+this.d*o+this.ty,n}applyInverse(t,n){n=n||new da;const l=this.a,o=this.b,f=this.c,d=this.d,m=this.tx,g=this.ty,v=1/(l*d+f*-o),_=t.x,b=t.y;return n.x=d*v*_+-f*v*b+(g*f-m*d)*v,n.y=l*v*b+-o*v*_+(-g*l+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),l=Math.sin(t),o=this.a,f=this.c,d=this.tx;return this.a=o*n-this.b*l,this.b=o*l+this.b*n,this.c=f*n-this.d*l,this.d=f*l+this.d*n,this.tx=d*n-this.ty*l,this.ty=d*l+this.ty*n,this}append(t){const n=this.a,l=this.b,o=this.c,f=this.d;return this.a=t.a*n+t.b*o,this.b=t.a*l+t.b*f,this.c=t.c*n+t.d*o,this.d=t.c*l+t.d*f,this.tx=t.tx*n+t.ty*o+this.tx,this.ty=t.tx*l+t.ty*f+this.ty,this}appendFrom(t,n){const l=t.a,o=t.b,f=t.c,d=t.d,m=t.tx,g=t.ty,v=n.a,_=n.b,b=n.c,C=n.d;return this.a=l*v+o*b,this.b=l*_+o*C,this.c=f*v+d*b,this.d=f*_+d*C,this.tx=m*v+g*b+n.tx,this.ty=m*_+g*C+n.ty,this}setTransform(t,n,l,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-(l*this.a+o*this.c),this.ty=n-(l*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 l=this.a,o=this.c;this.a=l*t.a+this.b*t.c,this.b=l*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,l=this.b,o=this.c,f=this.d,d=t.pivot,m=-Math.atan2(-o,f),g=Math.atan2(l,n),v=Math.abs(m+g);return v<1e-5||Math.abs(MT-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+l*l),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*l+d.y*f),t}invert(){const t=this.a,n=this.b,l=this.c,o=this.d,f=this.tx,d=t*o-n*l;return this.a=o/d,this.b=-n/d,this.c=-l/d,this.d=t/d,this.tx=(l*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 le;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 OT.identity()}static get shared(){return DT.identity()}}const DT=new le,OT=new le,$r=[1,1,0,-1,-1,-1,0,1,1,1,0,-1,-1,-1,0,1],to=[0,1,1,1,0,-1,-1,-1,0,1,1,1,0,-1,-1,-1],eo=[0,-1,-1,-1,0,1,1,1,0,1,1,1,0,-1,-1,-1],no=[1,1,0,-1,-1,-1,0,1,-1,-1,0,1,1,1,0,-1],s0=[],Ax=[],Lm=Math.sign;function NT(){for(let a=0;a<16;a++){const t=[];s0.push(t);for(let n=0;n<16;n++){const l=Lm($r[a]*$r[n]+eo[a]*to[n]),o=Lm(to[a]*$r[n]+no[a]*to[n]),f=Lm($r[a]*eo[n]+eo[a]*no[n]),d=Lm(to[a]*eo[n]+no[a]*no[n]);for(let m=0;m<16;m++)if($r[m]===l&&to[m]===o&&eo[m]===f&&no[m]===d){t.push(m);break}}}for(let a=0;a<16;a++){const t=new le;t.set($r[a],to[a],eo[a],no[a],0,0),Ax.push(t)}}NT();const we={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:a=>$r[a],uY:a=>to[a],vX:a=>eo[a],vY:a=>no[a],inv:a=>a&8?a&15:-a&7,add:(a,t)=>s0[a][t],sub:(a,t)=>s0[a][we.inv(t)],rotate180:a=>a^4,isVertical:a=>(a&3)===2,byDirection:(a,t)=>Math.abs(a)*2<=Math.abs(t)?t>=0?we.S:we.N:Math.abs(t)*2<=Math.abs(a)?a>0?we.E:we.W:t>0?a>0?we.SE:we.SW:a>0?we.NE:we.NW,matrixAppendRotationInv:(a,t,n=0,l=0,o=0,f=0)=>{const d=Ax[we.inv(t)],m=d.a,g=d.b,v=d.c,_=d.d,b=n-Math.min(0,m*o,v*f,m*o+v*f),C=l-Math.min(0,g*o,_*f,g*o+_*f),E=a.a,M=a.b,z=a.c,R=a.d;a.a=m*E+g*z,a.b=m*M+g*R,a.c=v*E+_*z,a.d=v*M+_*R,a.tx=b*E+C*z+a.tx,a.ty=b*M+C*R+a.ty},transformRectCoords:(a,t,n,l)=>{const{x:o,y:f,width:d,height:m}=a,{x:g,y:v,width:_,height:b}=t;return n===we.E?(l.set(o+g,f+v,d,m),l):n===we.S?l.set(_-f-m+g,o+v,m,d):n===we.W?l.set(_-o-d+g,b-f-m+v,d,m):n===we.N?l.set(f+g,b-o-d+v,m,d):l.set(o+g,f+v,d,m)}},Xm=[new da,new da,new da,new da];class on{constructor(t=0,n=0,l=0,o=0){this.type="rectangle",this.x=Number(t),this.y=Number(n),this.width=Number(l),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 on(0,0,0,0)}clone(){return new on(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,l,o=.5){const{width:f,height:d}=this;if(f<=0||d<=0)return!1;const m=this.x,g=this.y,v=l*(1-o),_=l-v,b=m-v,C=m+f+v,E=g-v,M=g+d+v,z=m+_,R=m+f-_,D=g+_,U=g+d-_;return t>=b&&t<=C&&n>=E&&n<=M&&!(t>z&&t<R&&n>D&&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 ft=this.y<t.y?t.y:this.y;return(this.bottom>t.bottom?t.bottom:this.bottom)>ft}const l=this.left,o=this.right,f=this.top,d=this.bottom;if(o<=l||d<=f)return!1;const m=Xm[0].set(t.left,t.top),g=Xm[1].set(t.left,t.bottom),v=Xm[2].set(t.right,t.top),_=Xm[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(_,_),Math.max(m.x,g.x,v.x,_.x)<=l||Math.min(m.x,g.x,v.x,_.x)>=o||Math.max(m.y,g.y,v.y,_.y)<=f||Math.min(m.y,g.y,v.y,_.y)>=d))return!1;const C=b*(g.y-m.y),E=b*(m.x-g.x),M=C*l+E*f,z=C*o+E*f,R=C*l+E*d,D=C*o+E*d;if(Math.max(M,z,R,D)<=C*m.x+E*m.y||Math.min(M,z,R,D)>=C*_.x+E*_.y)return!1;const U=b*(m.y-v.y),B=b*(v.x-m.x),G=U*l+B*f,Q=U*o+B*f,V=U*l+B*d,K=U*o+B*d;return!(Math.max(G,Q,V,K)<=U*m.x+B*m.y||Math.min(G,Q,V,K)>=U*_.x+B*_.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),l=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(l-n,0),this.y=o,this.height=Math.max(f-o,0),this}ceil(t=1,n=.001){const l=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=l-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),l=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=l-n,this.y=o,this.height=f-o,this}getBounds(t){return t||(t=new on),t.copyFrom(this),t}containsRect(t){if(this.width<=0||this.height<=0)return!1;const n=t.x,l=t.y,o=t.x+t.width,f=t.y+t.height;return n>=this.x&&n<this.x+this.width&&l>=this.y&&l<this.y+this.height&&o>=this.x&&o<this.x+this.width&&f>=this.y&&f<this.y+this.height}set(t,n,l,o){return this.x=t,this.y=n,this.width=l,this.height=o,this}toString(){return`[pixi.js/math:Rectangle x=${this.x} y=${this.y} width=${this.width} height=${this.height}]`}}const by={default:-1};function cn(a="default"){return by[a]===void 0&&(by[a]=-1),++by[a]}const E1=new Set,rn="8.0.0",UT="8.3.4",wc={quiet:!1,noColor:!1},de=((a,t,n=3)=>{if(wc.quiet||E1.has(t))return;let l=new Error().stack;const o=`${t}
|
|
62
|
+
Deprecated since v${a}`,f=typeof console.groupCollapsed=="function"&&!wc.noColor;typeof l>"u"?console.warn("PixiJS Deprecation Warning: ",o):(l=l.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(l),console.groupEnd()):(console.warn("PixiJS Deprecation Warning: ",o),console.warn(l))),E1.add(t)});Object.defineProperties(de,{quiet:{get:()=>wc.quiet,set:a=>{wc.quiet=a},enumerable:!0,configurable:!1},noColor:{get:()=>wc.noColor,set:a=>{wc.noColor=a},enumerable:!0,configurable:!1}});const Mx=()=>{};function Yc(a){return a+=a===0?1:0,--a,a|=a>>>1,a|=a>>>2,a|=a>>>4,a|=a>>>8,a|=a>>>16,a+1}function C1(a){return!(a&a-1)&&!!a}function Rx(a){const t={};for(const n in a)a[n]!==void 0&&(t[n]=a[n]);return t}const A1=Object.create(null);function BT(a){const t=A1[a];return t===void 0&&(A1[a]=cn("resource")),t}const zx=class Dx extends cs{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){de(rn,"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=BT(t),this._resourceId}destroy(){this.destroyed=!0,this.emit("destroy",this),this.emit("change",this),this.removeAllListeners()}};zx.defaultOptions={addressMode:"clamp-to-edge",scaleMode:"linear"};let Lc=zx;const Ox=class Nx extends cs{constructor(t={}){super(),this.options=t,this._gpuData=Object.create(null),this._gcLastUsed=-1,this.uid=cn("textureSource"),this._resourceType="textureSource",this._resourceId=cn("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={...Nx.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 Lc(Rx(t)),this.destroyed=!1,this._refreshPOT()}get source(){return this}get style(){return this._style}set style(t){var n,l;this.style!==t&&((n=this._style)==null||n.off("change",this._onStyleChange,this),this._style=t,(l=this._style)==null||l.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=cn("resource"),this.emit("change",this),this.emit("unload",this);for(const l in this._gpuData)(n=(t=this._gpuData[l])==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,l){l||(l=this._resolution),t||(t=this.width),n||(n=this.height);const o=Math.round(t*l),f=Math.round(n*l);return this.width=o/l,this.height=f/l,this._resolution=l,this.pixelWidth===o&&this.pixelHeight===f?!1:(this._refreshPOT(),this.pixelWidth=o,this.pixelHeight=f,this.emit("resize",this),this._resourceId=cn("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=C1(this.pixelWidth)&&C1(this.pixelHeight)}static test(t){throw new Error("Unimplemented")}};Ox.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 Ki=Ox;class H0 extends Ki{constructor(t){const n=t.resource||new Float32Array(t.width*t.height*4);let l=t.format;l||(n instanceof Float32Array?l="rgba32float":n instanceof Int32Array||n instanceof Uint32Array?l="rgba32uint":n instanceof Int16Array||n instanceof Uint16Array?l="rgba16uint":(n instanceof Int8Array,l="bgra8unorm")),super({...t,resource:n,format:l}),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}}H0.extension=Wt.TextureSource;const M1=new le;class wT{constructor(t,n){this.mapCoord=new le,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 l=this.mapCoord;for(let o=0;o<t.length;o+=2){const f=t[o],d=t[o+1];n[o]=f*l.a+d*l.c+l.tx,n[o+1]=f*l.b+d*l.d+l.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 l=t.orig,o=t.trim;o&&(M1.set(l.width/o.width,0,0,l.height/o.height,-o.x/o.width,-o.y/o.height),this.mapCoord.append(M1));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 ze extends cs{constructor({source:t,label:n,frame:l,orig:o,trim:f,defaultAnchor:d,defaultBorders:m,rotate:g,dynamic:v}={}){if(super(),this.uid=cn("texture"),this.uvs={x0:0,y0:0,x1:0,y1:0,x2:0,y2:0,x3:0,y3:0},this.frame=new on,this.noFrame=!1,this.dynamic=!1,this.isTexture=!0,this.label=n,this.source=(t==null?void 0:t.source)??new Ki,this.noFrame=!l,l)this.frame.copyFrom(l);else{const{width:_,height:b}=this._source;this.frame.width=_,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 wT(this)),this._textureMatrix}get width(){return this.orig.width}get height(){return this.orig.height}updateUvs(){const{uvs:t,frame:n}=this,{width:l,height:o}=this._source,f=n.x/l,d=n.y/o,m=n.width/l,g=n.height/o;let v=this.rotate;if(v){const _=m/2,b=g/2,C=f+_,E=d+b;v=we.add(v,we.NW),t.x0=C+_*we.uX(v),t.y0=E+b*we.uY(v),v=we.add(v,2),t.x1=C+_*we.uX(v),t.y1=E+b*we.uY(v),v=we.add(v,2),t.x2=C+_*we.uX(v),t.y2=E+b*we.uY(v),v=we.add(v,2),t.x3=C+_*we.uX(v),t.y3=E+b*we.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 de(rn,"Texture.baseTexture is now Texture.source"),this._source}}ze.EMPTY=new ze({label:"EMPTY",source:new Ki({label:"EMPTY"})});ze.EMPTY.destroy=Mx;ze.WHITE=new ze({source:new H0({resource:new Uint8Array([255,255,255,255]),width:1,height:1,alphaMode:"premultiply-alpha-on-upload",label:"WHITE"}),label:"WHITE"});ze.WHITE.destroy=Mx;function Ux(a,t,n){const{width:l,height:o}=n.orig,f=n.trim;if(f){const d=f.width,m=f.height;a.minX=f.x-t._x*l,a.maxX=a.minX+d,a.minY=f.y-t._y*o,a.maxY=a.minY+m}else a.minX=-t._x*l,a.maxX=a.minX+l,a.minY=-t._y*o,a.maxY=a.minY+o}const R1=new le;class ki{constructor(t=1/0,n=1/0,l=-1/0,o=-1/0){this.minX=1/0,this.minY=1/0,this.maxX=-1/0,this.maxY=-1/0,this.matrix=R1,this.minX=t,this.minY=n,this.maxX=l,this.maxY=o}isEmpty(){return this.minX>this.maxX||this.minY>this.maxY}get rectangle(){this._rectangle||(this._rectangle=new on);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=R1,this}set(t,n,l,o){this.minX=t,this.minY=n,this.maxX=l,this.maxY=o}addFrame(t,n,l,o,f){f||(f=this.matrix);const d=f.a,m=f.b,g=f.c,v=f.d,_=f.tx,b=f.ty;let C=this.minX,E=this.minY,M=this.maxX,z=this.maxY,R=d*t+g*n+_,D=m*t+v*n+b;R<C&&(C=R),D<E&&(E=D),R>M&&(M=R),D>z&&(z=D),R=d*l+g*n+_,D=m*l+v*n+b,R<C&&(C=R),D<E&&(E=D),R>M&&(M=R),D>z&&(z=D),R=d*t+g*o+_,D=m*t+v*o+b,R<C&&(C=R),D<E&&(E=D),R>M&&(M=R),D>z&&(z=D),R=d*l+g*o+_,D=m*l+v*o+b,R<C&&(C=R),D<E&&(E=D),R>M&&(M=R),D>z&&(z=D),this.minX=C,this.minY=E,this.maxX=M,this.maxY=z}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,l=this.minY,o=this.maxX,f=this.maxY,{a:d,b:m,c:g,d:v,tx:_,ty:b}=t;let C=d*n+g*l+_,E=m*n+v*l+b;this.minX=C,this.minY=E,this.maxX=C,this.maxY=E,C=d*o+g*l+_,E=m*o+v*l+b,this.minX=C<this.minX?C:this.minX,this.minY=E<this.minY?E:this.minY,this.maxX=C>this.maxX?C:this.maxX,this.maxY=E>this.maxY?E:this.maxY,C=d*n+g*f+_,E=m*n+v*f+b,this.minX=C<this.minX?C:this.minX,this.minY=E<this.minY?E:this.minY,this.maxX=C>this.maxX?C:this.maxX,this.maxY=E>this.maxY?E:this.maxY,C=d*o+g*f+_,E=m*o+v*f+b,this.minX=C<this.minX?C:this.minX,this.minY=E<this.minY?E:this.minY,this.maxX=C>this.maxX?C: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,l,o){return this.minX<t&&(this.minX=t),this.maxX>n&&(this.maxX=n),this.minY<l&&(this.minY=l),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 ki(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,l,o){let f=this.minX,d=this.minY,m=this.maxX,g=this.maxY;o||(o=this.matrix);const v=o.a,_=o.b,b=o.c,C=o.d,E=o.tx,M=o.ty;for(let z=n;z<l;z+=2){const R=t[z],D=t[z+1],U=v*R+b*D+E,B=_*R+C*D+M;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 HT={grad:.9,turn:360,rad:360/(2*Math.PI)},ks=function(a){return typeof a=="string"?a.length>0:typeof a=="number"},qn=function(a,t,n){return t===void 0&&(t=0),n===void 0&&(n=Math.pow(10,t)),Math.round(n*a)/n+0},Vi=function(a,t,n){return t===void 0&&(t=0),n===void 0&&(n=1),a>n?n:a>t?a:t},Bx=function(a){return(a=isFinite(a)?a%360:0)>0?a:a+360},z1=function(a){return{r:Vi(a.r,0,255),g:Vi(a.g,0,255),b:Vi(a.b,0,255),a:Vi(a.a)}},Ty=function(a){return{r:qn(a.r),g:qn(a.g),b:qn(a.b),a:qn(a.a,3)}},GT=/^#([0-9a-f]{3,8})$/i,Vm=function(a){var t=a.toString(16);return t.length<2?"0"+t:t},wx=function(a){var t=a.r,n=a.g,l=a.b,o=a.a,f=Math.max(t,n,l),d=f-Math.min(t,n,l),m=d?f===t?(n-l)/d:f===n?2+(l-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}},Hx=function(a){var t=a.h,n=a.s,l=a.v,o=a.a;t=t/360*6,n/=100,l/=100;var f=Math.floor(t),d=l*(1-n),m=l*(1-(t-f)*n),g=l*(1-(1-t+f)*n),v=f%6;return{r:255*[l,m,d,d,g,l][v],g:255*[g,l,l,m,d,d][v],b:255*[d,d,g,l,l,m][v],a:o}},D1=function(a){return{h:Bx(a.h),s:Vi(a.s,0,100),l:Vi(a.l,0,100),a:Vi(a.a)}},O1=function(a){return{h:qn(a.h),s:qn(a.s),l:qn(a.l),a:qn(a.a,3)}},N1=function(a){return Hx((n=(t=a).s,{h:t.h,s:(n*=((l=t.l)<50?l:100-l)/100)>0?2*n/(l+n)*100:0,v:l+n,a:t.a}));var t,n,l},Qh=function(a){return{h:(t=wx(a)).h,s:(o=(200-(n=t.s))*(l=t.v)/100)>0&&o<200?n*l/100/(o<=100?o:200-o)*100:0,l:o/2,a:t.a};var t,n,l,o},jT=/^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s*,\s*([+-]?\d*\.?\d+)%\s*,\s*([+-]?\d*\.?\d+)%\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,qT=/^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s+([+-]?\d*\.?\d+)%\s+([+-]?\d*\.?\d+)%\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,YT=/^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,LT=/^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,u0={string:[[function(a){var t=GT.exec(a);return t?(a=t[1]).length<=4?{r:parseInt(a[0]+a[0],16),g:parseInt(a[1]+a[1],16),b:parseInt(a[2]+a[2],16),a:a.length===4?qn(parseInt(a[3]+a[3],16)/255,2):1}:a.length===6||a.length===8?{r:parseInt(a.substr(0,2),16),g:parseInt(a.substr(2,2),16),b:parseInt(a.substr(4,2),16),a:a.length===8?qn(parseInt(a.substr(6,2),16)/255,2):1}:null:null},"hex"],[function(a){var t=YT.exec(a)||LT.exec(a);return t?t[2]!==t[4]||t[4]!==t[6]?null:z1({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(a){var t=jT.exec(a)||qT.exec(a);if(!t)return null;var n,l,o=D1({h:(n=t[1],l=t[2],l===void 0&&(l="deg"),Number(n)*(HT[l]||1)),s:Number(t[3]),l:Number(t[4]),a:t[5]===void 0?1:Number(t[5])/(t[6]?100:1)});return N1(o)},"hsl"]],object:[[function(a){var t=a.r,n=a.g,l=a.b,o=a.a,f=o===void 0?1:o;return ks(t)&&ks(n)&&ks(l)?z1({r:Number(t),g:Number(n),b:Number(l),a:Number(f)}):null},"rgb"],[function(a){var t=a.h,n=a.s,l=a.l,o=a.a,f=o===void 0?1:o;if(!ks(t)||!ks(n)||!ks(l))return null;var d=D1({h:Number(t),s:Number(n),l:Number(l),a:Number(f)});return N1(d)},"hsl"],[function(a){var t=a.h,n=a.s,l=a.v,o=a.a,f=o===void 0?1:o;if(!ks(t)||!ks(n)||!ks(l))return null;var d=(function(m){return{h:Bx(m.h),s:Vi(m.s,0,100),v:Vi(m.v,0,100),a:Vi(m.a)}})({h:Number(t),s:Number(n),v:Number(l),a:Number(f)});return Hx(d)},"hsv"]]},U1=function(a,t){for(var n=0;n<t.length;n++){var l=t[n][0](a);if(l)return[l,t[n][1]]}return[null,void 0]},XT=function(a){return typeof a=="string"?U1(a.trim(),u0.string):typeof a=="object"&&a!==null?U1(a,u0.object):[null,void 0]},Ey=function(a,t){var n=Qh(a);return{h:n.h,s:Vi(n.s+100*t,0,100),l:n.l,a:n.a}},Cy=function(a){return(299*a.r+587*a.g+114*a.b)/1e3/255},B1=function(a,t){var n=Qh(a);return{h:n.h,s:n.s,l:Vi(n.l+100*t,0,100),a:n.a}},r0=(function(){function a(t){this.parsed=XT(t)[0],this.rgba=this.parsed||{r:0,g:0,b:0,a:1}}return a.prototype.isValid=function(){return this.parsed!==null},a.prototype.brightness=function(){return qn(Cy(this.rgba),2)},a.prototype.isDark=function(){return Cy(this.rgba)<.5},a.prototype.isLight=function(){return Cy(this.rgba)>=.5},a.prototype.toHex=function(){return t=Ty(this.rgba),n=t.r,l=t.g,o=t.b,d=(f=t.a)<1?Vm(qn(255*f)):"","#"+Vm(n)+Vm(l)+Vm(o)+d;var t,n,l,o,f,d},a.prototype.toRgb=function(){return Ty(this.rgba)},a.prototype.toRgbString=function(){return t=Ty(this.rgba),n=t.r,l=t.g,o=t.b,(f=t.a)<1?"rgba("+n+", "+l+", "+o+", "+f+")":"rgb("+n+", "+l+", "+o+")";var t,n,l,o,f},a.prototype.toHsl=function(){return O1(Qh(this.rgba))},a.prototype.toHslString=function(){return t=O1(Qh(this.rgba)),n=t.h,l=t.s,o=t.l,(f=t.a)<1?"hsla("+n+", "+l+"%, "+o+"%, "+f+")":"hsl("+n+", "+l+"%, "+o+"%)";var t,n,l,o,f},a.prototype.toHsv=function(){return t=wx(this.rgba),{h:qn(t.h),s:qn(t.s),v:qn(t.v),a:qn(t.a,3)};var t},a.prototype.invert=function(){return ss({r:255-(t=this.rgba).r,g:255-t.g,b:255-t.b,a:t.a});var t},a.prototype.saturate=function(t){return t===void 0&&(t=.1),ss(Ey(this.rgba,t))},a.prototype.desaturate=function(t){return t===void 0&&(t=.1),ss(Ey(this.rgba,-t))},a.prototype.grayscale=function(){return ss(Ey(this.rgba,-1))},a.prototype.lighten=function(t){return t===void 0&&(t=.1),ss(B1(this.rgba,t))},a.prototype.darken=function(t){return t===void 0&&(t=.1),ss(B1(this.rgba,-t))},a.prototype.rotate=function(t){return t===void 0&&(t=15),this.hue(this.hue()+t)},a.prototype.alpha=function(t){return typeof t=="number"?ss({r:(n=this.rgba).r,g:n.g,b:n.b,a:t}):qn(this.rgba.a,3);var n},a.prototype.hue=function(t){var n=Qh(this.rgba);return typeof t=="number"?ss({h:t,s:n.s,l:n.l,a:n.a}):qn(n.h)},a.prototype.isEqual=function(t){return this.toHex()===ss(t).toHex()},a})(),ss=function(a){return a instanceof r0?a:new r0(a)},w1=[],VT=function(a){a.forEach(function(t){w1.indexOf(t)<0&&(t(r0,u0),w1.push(t))})};function QT(a,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"},l={};for(var o in n)l[n[o]]=o;var f={};a.prototype.toName=function(d){if(!(this.rgba.a||this.rgba.r||this.rgba.g||this.rgba.b))return"transparent";var m,g,v=l[this.toHex()];if(v)return v;if(d!=null&&d.closest){var _=this.toRgb(),b=1/0,C="black";if(!f.length)for(var E in n)f[E]=new a(n[E]).toRgb();for(var M in n){var z=(m=_,g=f[M],Math.pow(m.r-g.r,2)+Math.pow(m.g-g.g,2)+Math.pow(m.b-g.b,2));z<b&&(b=z,C=M)}return C}},t.string.push([function(d){var m=d.toLowerCase(),g=m==="transparent"?"#0000":n[m];return g?new a(g).toRgb():null},"name"])}VT([QT]);const Xc=class qh{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 qh)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 l=typeof t;if(l!==typeof n)return!1;if(l==="number"||l==="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,l,o]=this._components;return{r:t,g:n,b:l,a:o}}toRgb(){const[t,n,l]=this._components;return{r:t,g:n,b:l}}toRgbaString(){const[t,n,l]=this.toUint8RgbArray();return`rgba(${t},${n},${l},${this.alpha})`}toUint8RgbArray(t){const[n,l,o]=this._components;return this._arrayRgb||(this._arrayRgb=[]),t||(t=this._arrayRgb),t[0]=Math.round(n*255),t[1]=Math.round(l*255),t[2]=Math.round(o*255),t}toArray(t){this._arrayRgba||(this._arrayRgba=[]),t||(t=this._arrayRgba);const[n,l,o,f]=this._components;return t[0]=n,t[1]=l,t[2]=o,t[3]=f,t}toRgbArray(t){this._arrayRgb||(this._arrayRgb=[]),t||(t=this._arrayRgb);const[n,l,o]=this._components;return t[0]=n,t[1]=l,t[2]=o,t}toNumber(){return this._int}toBgrNumber(){const[t,n,l]=this.toUint8RgbArray();return(l<<16)+(n<<8)+t}toLittleEndianNumber(){const t=this._int;return(t>>16)+(t&65280)+((t&255)<<16)}multiply(t){const[n,l,o,f]=qh._temp.setValue(t)._components;return this._components[0]*=n,this._components[1]*=l,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 l=this._int>>16&255,o=this._int>>8&255,f=this._int&255;return n&&(l=l*t+.5|0,o=o*t+.5|0,f=f*t+.5|0),(t*255<<24)+(l<<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,l,o,f;if((typeof t=="number"||t instanceof Number)&&t>=0&&t<=16777215){const d=t;n=(d>>16&255)/255,l=(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,l,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,l,o,f=255]=t,n/=255,l/=255,o/=255,f/=255;else if(typeof t=="string"||typeof t=="object"){if(typeof t=="string"){const m=qh.HEX_PATTERN.exec(t);m&&(t=`#${m[2]}`)}const d=ss(t);d.isValid()&&({r:n,g:l,b:o,a:f}=d.rgba,n/=255,l/=255,o/=255)}if(n!==void 0)this._components[0]=n,this._components[1]=l,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,l]=this._components;this._int=(t*255<<16)+(n*255<<8)+(l*255|0)}_clamp(t,n=0,l=1){return typeof t=="number"?Math.min(Math.max(t,n),l):(t.forEach((o,f)=>{t[f]=Math.min(Math.max(o,n),l)}),t)}static isColorLike(t){return typeof t=="number"||typeof t=="string"||t instanceof Number||t instanceof qh||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}};Xc.shared=new Xc;Xc._temp=new Xc;Xc.HEX_PATTERN=/^(#|0x)?(([a-f0-9]{3}){1,2}([a-f0-9]{2})?)$/i;let Rn=Xc;const kT={cullArea:null,cullable:!1,cullableChildren:!0};let Ay=0;const H1=500;function Ga(...a){Ay!==H1&&(Ay++,Ay===H1?console.warn("PixiJS Warning: too many warnings, no more warnings will be reported to the console by PixiJS."):console.warn("PixiJS Warning: ",...a))}const ad={_registeredResources:new Set,register(a){this._registeredResources.add(a)},unregister(a){this._registeredResources.delete(a)},release(){this._registeredResources.forEach(a=>a.clear())},get registeredCount(){return this._registeredResources.size},isRegistered(a){return this._registeredResources.has(a)},reset(){this._registeredResources.clear()}};class KT{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 l;let n;return this._index>0?n=this._pool[--this._index]:(n=new this._classType,this._count++),(l=n.init)==null||l.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 KT(t)),this._poolsByClass.get(t)}stats(){const t={};return this._poolsByClass.forEach(n=>{const l=t[n._classType.name]?n._classType.name+n._classType.ID:n._classType.name;t[l]={free:n.totalFree,used:n.totalUsed,size:n.totalSize}}),t}clear(){this._poolsByClass.forEach(t=>t.clear()),this._poolsByClass.clear()}}const Fa=new ZT;ad.register(Fa);const JT={get isCachedAsTexture(){var a;return!!((a=this.renderGroup)!=null&&a.isCachedAsTexture)},cacheAsTexture(a){typeof a=="boolean"&&a===!1?this.disableRenderGroup():(this.enableRenderGroup(),this.renderGroup.enableCacheAsTexture(a===!0?{}:a))},updateCacheTexture(){var a;(a=this.renderGroup)==null||a.updateCacheTexture()},get cacheAsBitmap(){return this.isCachedAsTexture},set cacheAsBitmap(a){de("v8.6.0","cacheAsBitmap is deprecated, use cacheAsTexture instead."),this.cacheAsTexture(a)}};function PT(a,t,n){const l=a.length;let o;if(t>=l||n===0)return;n=t+n>l?l-t:n;const f=l-n;for(o=t;o<f;++o)a[o]=a[o+n];a.length=f}const WT={allowChildren:!0,removeChildren(a=0,t){var f;const n=t??this.children.length,l=n-a,o=[];if(l>0&&l<=n){for(let m=n-1;m>=a;m--){const g=this.children[m];g&&(o.push(g),g.parent=null)}PT(this.children,a,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(l===0&&this.children.length===0)return o;throw new RangeError("removeChildren: numeric values are outside the acceptable range.")},removeChildAt(a){const t=this.getChildAt(a);return this.removeChild(t)},getChildAt(a){if(a<0||a>=this.children.length)throw new Error(`getChildAt: Index (${a}) does not exist.`);return this.children[a]},setChildIndex(a,t){if(t<0||t>=this.children.length)throw new Error(`The index ${t} supplied is out of bounds ${this.children.length}`);this.getChildIndex(a),this.addChildAt(a,t)},getChildIndex(a){const t=this.children.indexOf(a);if(t===-1)throw new Error("The supplied Container must be a child of the caller");return t},addChildAt(a,t){this.allowChildren||de(rn,"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(`${a}addChildAt: The index ${t} supplied is out of bounds ${n.length}`);const l=a.parent===this;if(a.parent){const f=a.parent.children.indexOf(a);if(l){if(f===t)return a;a.parent.children.splice(f,1)}else a.removeFromParent()}t===n.length?n.push(a):n.splice(t,0,a),a.parent=this,a.didChange=!0,a._updateFlags=15;const o=this.renderGroup||this.parentRenderGroup;return o&&o.addChild(a),this.sortableChildren&&(this.sortDirty=!0),l||(this.emit("childAdded",a,this,t),a.emit("added",this)),a},swapChildren(a,t){if(a===t)return;const n=this.getChildIndex(a),l=this.getChildIndex(t);this.children[n]=t,this.children[l]=a;const o=this.renderGroup||this.parentRenderGroup;o&&(o.structureDidChange=!0),this._didContainerChangeTick++},removeFromParent(){var a;(a=this.parent)==null||a.removeChild(this)},reparentChild(...a){return a.length===1?this.reparentChildAt(a[0],this.children.length):(a.forEach(t=>this.reparentChildAt(t,this.children.length)),a[0])},reparentChildAt(a,t){if(a.parent===this)return this.setChildIndex(a,t),a;const n=a.worldTransform.clone();a.removeFromParent(),this.addChildAt(a,t);const l=this.worldTransform.clone();return l.invert(),n.prepend(l),a.setFromMatrix(n),a},replaceChild(a,t){a.updateLocalTransform(),this.addChildAt(t,this.getChildIndex(a)),t.setFromMatrix(a.localTransform),t.updateLocalTransform(),this.removeChild(a)}},FT={collectRenderables(a,t,n){this.parentRenderLayer&&this.parentRenderLayer!==n||this.globalDisplayStatus<7||!this.includeInBuild||(this.sortableChildren&&this.sortChildren(),this.isSimple?this.collectRenderablesSimple(a,t,n):this.renderGroup?t.renderPipes.renderGroup.addRenderGroup(this.renderGroup,a):this.collectRenderablesWithEffects(a,t,n))},collectRenderablesSimple(a,t,n){const l=this.children,o=l.length;for(let f=0;f<o;f++)l[f].collectRenderables(a,t,n)},collectRenderablesWithEffects(a,t,n){const{renderPipes:l}=t;for(let o=0;o<this.effects.length;o++){const f=this.effects[o];l[f.pipe].push(f,this,a)}this.collectRenderablesSimple(a,t,n);for(let o=this.effects.length-1;o>=0;o--){const f=this.effects[o];l[f.pipe].pop(f,this,a)}}};class G1{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 IT{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 l=this._tests[n];if(l.test(t))return Fa.get(l.maskClass,t)}return t}returnMaskEffect(t){Fa.return(t)}}const o0=new IT;Ie.handleByList(Wt.MaskEffect,o0._effectClasses);const $T={_maskEffect:null,_maskOptions:{inverse:!1},_filterEffect:null,effects:[],_markStructureAsChanged(){const a=this.renderGroup||this.parentRenderGroup;a&&(a.structureDidChange=!0)},addEffect(a){this.effects.indexOf(a)===-1&&(this.effects.push(a),this.effects.sort((n,l)=>n.priority-l.priority),this._markStructureAsChanged(),this._updateIsSimple())},removeEffect(a){const t=this.effects.indexOf(a);t!==-1&&(this.effects.splice(t,1),this._markStructureAsChanged(),this._updateIsSimple())},set mask(a){const t=this._maskEffect;(t==null?void 0:t.mask)!==a&&(t&&(this.removeEffect(t),o0.returnMaskEffect(t),this._maskEffect=null),a!=null&&(this._maskEffect=o0.getMaskEffect(a),this.addEffect(this._maskEffect)))},get mask(){var a;return(a=this._maskEffect)==null?void 0:a.mask},setMask(a){this._maskOptions={...this._maskOptions,...a},a.mask&&(this.mask=a.mask),this._markStructureAsChanged()},set filters(a){var f;!Array.isArray(a)&&a&&(a=[a]);const t=this._filterEffect||(this._filterEffect=new G1);a=a;const n=(a==null?void 0:a.length)>0,l=((f=t.filters)==null?void 0:f.length)>0,o=n!==l;a=Array.isArray(a)?a.slice(0):a,t.filters=Object.freeze(a),o&&(n?this.addEffect(t):(this.removeEffect(t),t.filters=a??null))},get filters(){var a;return(a=this._filterEffect)==null?void 0:a.filters},set filterArea(a){this._filterEffect||(this._filterEffect=new G1),this._filterEffect.filterArea=a},get filterArea(){var a;return(a=this._filterEffect)==null?void 0:a.filterArea}},tE={label:null,get name(){return de(rn,"Container.name property has been removed, use Container.label instead"),this.label},set name(a){de(rn,"Container.name property has been removed, use Container.label instead"),this.label=a},getChildByName(a,t=!1){return this.getChildByLabel(a,t)},getChildByLabel(a,t=!1){const n=this.children;for(let l=0;l<n.length;l++){const o=n[l];if(o.label===a||a instanceof RegExp&&a.test(o.label))return o}if(t)for(let l=0;l<n.length;l++){const f=n[l].getChildByLabel(a,!0);if(f)return f}return null},getChildrenByLabel(a,t=!1,n=[]){const l=this.children;for(let o=0;o<l.length;o++){const f=l[o];(f.label===a||a instanceof RegExp&&a.test(f.label))&&n.push(f)}if(t)for(let o=0;o<l.length;o++)l[o].getChildrenByLabel(a,!0,n);return n}},Ha=Fa.getPool(le),Ws=Fa.getPool(ki),eE=new le,nE={getFastGlobalBounds(a,t){t||(t=new ki),t.clear(),this._getGlobalBoundsRecursive(!!a,t,this.parentRenderLayer),t.isValid||t.set(0,0,0,0);const n=this.renderGroup||this.parentRenderGroup;return t.applyMatrix(n.worldTransform),t},_getGlobalBoundsRecursive(a,t,n){let l=t;if(a&&this.parentRenderLayer&&this.parentRenderLayer!==n||this.localDisplayStatus!==7||!this.measurable)return;const o=!!this.effects.length;if((this.renderGroup||o)&&(l=Ws.get().clear()),this.boundsArea)t.addRect(this.boundsArea,this.worldTransform);else{if(this.renderPipeId){const d=this.bounds;l.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(a,l,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,l.applyMatrix(d.worldTransform)),this.effects[m].addBounds(l,!0));f&&l.applyMatrix(d.worldTransform.copyTo(eE).invert()),t.addBounds(l),Ws.return(l)}else this.renderGroup&&(t.addBounds(l,this.relativeGroupTransform),Ws.return(l))}};function Gx(a,t,n){n.clear();let l,o;return a.parent?t?l=a.parent.worldTransform:(o=Ha.get().identity(),l=G0(a,o)):l=le.IDENTITY,jx(a,n,l,t),o&&Ha.return(o),n.isValid||n.set(0,0,0,0),n}function jx(a,t,n,l){var m,g;if(!a.visible||!a.measurable)return;let o;l?o=a.worldTransform:(a.updateLocalTransform(),o=Ha.get(),o.appendFrom(a.localTransform,n));const f=t,d=!!a.effects.length;if(d&&(t=Ws.get().clear()),a.boundsArea)t.addRect(a.boundsArea,o);else{const v=a.bounds;v&&!v.isEmpty()&&(t.matrix=o,t.addBounds(v));for(let _=0;_<a.children.length;_++)jx(a.children[_],t,o,l)}if(d){for(let v=0;v<a.effects.length;v++)(g=(m=a.effects[v]).addBounds)==null||g.call(m,t);f.addBounds(t,le.IDENTITY),Ws.return(t)}l||Ha.return(o)}function G0(a,t){const n=a.parent;return n&&(G0(n,t),n.updateLocalTransform(),t.append(n.localTransform)),t}function qx(a,t){if(a===16777215||!t)return t;if(t===16777215||!a)return a;const n=a>>16&255,l=a>>8&255,o=a&255,f=t>>16&255,d=t>>8&255,m=t&255,g=n*f/255|0,v=l*d/255|0,_=o*m/255|0;return(g<<16)+(v<<8)+_}const j1=16777215;function q1(a,t){return a===j1?t:t===j1?a:qx(a,t)}function sp(a){return((a&255)<<16)+(a&65280)+(a>>16&255)}const aE={getGlobalAlpha(a){if(a)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(a=new le,t){if(t)return a.copyFrom(this.worldTransform);this.updateLocalTransform();const n=G0(this,Ha.get().identity());return a.appendFrom(this.localTransform,n),Ha.return(n),a},getGlobalTint(a){if(a)return this.renderGroup?sp(this.renderGroup.worldColor):this.parentRenderGroup?sp(q1(this.localColor,this.parentRenderGroup.worldColor)):this.tint;let t=this.localColor,n=this.parent;for(;n;)t=q1(t,n.localColor),n=n.parent;return sp(t)}};function Yx(a,t,n){return t.clear(),n||(n=le.IDENTITY),Lx(a,t,n,a,!0),t.isValid||t.set(0,0,0,0),t}function Lx(a,t,n,l,o){var g,v;let f;if(o)f=Ha.get(),f=n.copyTo(f);else{if(!a.visible||!a.measurable)return;a.updateLocalTransform();const _=a.localTransform;f=Ha.get(),f.appendFrom(_,n)}const d=t,m=!!a.effects.length;if(m&&(t=Ws.get().clear()),a.boundsArea)t.addRect(a.boundsArea,f);else{a.renderPipeId&&(t.matrix=f,t.addBounds(a.bounds));const _=a.children;for(let b=0;b<_.length;b++)Lx(_[b],t,f,l,!1)}if(m){for(let _=0;_<a.effects.length;_++)(v=(g=a.effects[_]).addLocalBounds)==null||v.call(g,t,l);d.addBounds(t,le.IDENTITY),Ws.return(t)}Ha.return(f)}function Xx(a,t){const n=a.children;for(let l=0;l<n.length;l++){const o=n[l],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&&Xx(o,t)}return t.didChange}const iE=new le,lE={_localBoundsCacheId:-1,_localBoundsCacheData:null,_setWidth(a,t){const n=Math.sign(this.scale.x)||1;t!==0?this.scale.x=a/t*n:this.scale.x=n},_setHeight(a,t){const n=Math.sign(this.scale.y)||1;t!==0?this.scale.y=a/t*n:this.scale.y=n},getLocalBounds(){this._localBoundsCacheData||(this._localBoundsCacheData={data:[],index:1,didChange:!1,localBounds:new ki});const a=this._localBoundsCacheData;return a.index=1,a.didChange=!1,a.data[0]!==this._didViewChangeTick&&(a.didChange=!0,a.data[0]=this._didViewChangeTick),Xx(this,a),a.didChange&&Yx(this,a.localBounds,iE),a.localBounds},getBounds(a,t){return Gx(this,a,t||new ki)}},sE={_onRender:null,set onRender(a){const t=this.renderGroup||this.parentRenderGroup;if(!a){this._onRender&&(t==null||t.removeOnRender(this)),this._onRender=null;return}this._onRender||t==null||t.addOnRender(this),this._onRender=a},get onRender(){return this._onRender}},uE={_zIndex:0,sortDirty:!1,sortableChildren:!1,get zIndex(){return this._zIndex},set zIndex(a){this._zIndex!==a&&(this._zIndex=a,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(rE))}};function rE(a,t){return a._zIndex-t._zIndex}const oE={getGlobalPosition(a=new da,t=!1){return this.parent?this.parent.toGlobal(this._position,a,t):(a.x=this._position.x,a.y=this._position.y),a},toGlobal(a,t,n=!1){const l=this.getGlobalTransform(Ha.get(),n);return t=l.apply(a,t),Ha.return(l),t},toLocal(a,t,n,l){t&&(a=t.toGlobal(a,n,l));const o=this.getGlobalTransform(Ha.get(),l);return n=o.applyInverse(a,n),Ha.return(o),n}};class j0{constructor(){this.uid=cn("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 cE=0;class fE{constructor(t){this._poolKeyHash=Object.create(null),this._texturePool={},this.textureOptions=t||{},this.enableFullScreen=!1,this.textureStyle=new Lc(this.textureOptions)}createTexture(t,n,l,o){const f=new Ki({...this.textureOptions,width:t,height:n,resolution:1,antialias:l,autoGarbageCollect:!1,autoGenerateMipmaps:o});return new ze({source:f,label:`texturePool_${cE++}`})}getOptimalTexture(t,n,l=1,o,f=!1){let d=Math.ceil(t*l-1e-6),m=Math.ceil(n*l-1e-6);d=Yc(d),m=Yc(m);const g=o?1:0,v=f?1:0,_=(d<<17)+(m<<2)+(v<<1)+g;this._texturePool[_]||(this._texturePool[_]=[]);let b=this._texturePool[_].pop();return b||(b=this.createTexture(d,m,o,f)),b.source._resolution=l,b.source.width=d/l,b.source.height=m/l,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]=_,b}getSameSizeTexture(t,n=!1){const l=t.source;return this.getOptimalTexture(t.width,t.height,l._resolution,n)}returnTexture(t,n=!1){const l=this._poolKeyHash[t.uid];n&&(t.source.style=this.textureStyle),this._texturePool[l].push(t)}clear(t){if(t=t!==!1,t)for(const n in this._texturePool){const l=this._texturePool[n];if(l)for(let o=0;o<l.length;o++)l[o].destroy(!0)}this._texturePool={}}}const Tp=new fE;ad.register(Tp);class hE{constructor(){this.renderPipeId="renderGroup",this.root=null,this.canBundle=!1,this.renderGroupParent=null,this.renderGroupChildren=[],this.worldTransform=new le,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 j0,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 l=0;l<n.length;l++){const o=n[l];o._updateFlags=15,this.addChild(o)}}enableCacheAsTexture(t={}){this.textureOptions=t,this.isCachedAsTexture=!0,this.textureNeedsUpdate=!0}disableCacheAsTexture(){this.isCachedAsTexture=!1,this.texture&&(Tp.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 l=0;l<n.length;l++)this.addChild(n[l])}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 l=0;l<n.length;l++)this.removeChild(n[l])}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 l=0;l<n.length;l++)this._getChildren(n[l],t);return t}_getChildren(t,n=[]){if(n.push(t),t.renderGroup)return n;const l=t.children;for(let o=0;o<l.length;o++)this._getChildren(l[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 le),this._inverseWorldTransform.copyFrom(this.worldTransform).invert())}get textureOffsetInverseTransform(){return(this._matrixDirty&2)===0?this._textureOffsetInverseTransform:(this._matrixDirty&=-3,this._textureOffsetInverseTransform||(this._textureOffsetInverseTransform=new le),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 le),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 dE(a,t,n={}){for(const l in t)!n[l]&&t[l]!==void 0&&(a[l]=t[l])}const My=new Wn(null),Qm=new Wn(null),Ry=new Wn(null,1,1),km=new Wn(null),Y1=1,mE=2,zy=4;class ma extends cs{constructor(t={}){var n,l;super(),this.uid=cn("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 le,this.relativeGroupTransform=new le,this.groupTransform=this.relativeGroupTransform,this.destroyed=!1,this._position=new Wn(this,0,0),this._scale=Ry,this._pivot=Qm,this._origin=km,this._skew=My,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=[],dE(this,t,{children:!0,parent:!0,effects:!0}),(n=t.children)==null||n.forEach(o=>this.addChild(o)),(l=t.parent)==null||l.addChild(this)}static mixin(t){de("8.8.0","Container.mixin is deprecated, please use extensions.mixin instead."),Ie.mixin(ma,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||de(rn,"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],l=this.renderGroup||this.parentRenderGroup;return n.parent===this?(this.children.splice(this.children.indexOf(n),1),this.children.push(n),l&&(l.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,l&&l.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],l=this.children.indexOf(n);return l>-1&&(this._didViewChangeTick++,this.children.splice(l,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,l),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=Fa.get(hE,this),this.groupTransform=le.IDENTITY,t==null||t.addChild(this),this._updateIsSimple()}disableRenderGroup(){if(!this.renderGroup)return;const t=this.parentRenderGroup;t==null||t.removeChild(this),Fa.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 le),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*RT}set angle(t){this.rotation=t*zT}get pivot(){return this._pivot===Qm&&(this._pivot=new Wn(this,0,0)),this._pivot}set pivot(t){this._pivot===Qm&&(this._pivot=new Wn(this,0,0),this._origin!==km&&Ga("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===My&&(this._skew=new Wn(this,0,0)),this._skew}set skew(t){this._skew===My&&(this._skew=new Wn(this,0,0)),this._skew.copyFrom(t)}get scale(){return this._scale===Ry&&(this._scale=new Wn(this,1,1)),this._scale}set scale(t){this._scale===Ry&&(this._scale=new Wn(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===km&&(this._origin=new Wn(this,0,0)),this._origin}set origin(t){this._origin===km&&(this._origin=new Wn(this,0,0),this._pivot!==Qm&&Ga("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 l=this.getLocalBounds();typeof t=="object"?(n=t.height??t.width,t=t.width):n??(n=t),t!==void 0&&this._setWidth(t,l.width),n!==void 0&&this._setHeight(n,l.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,l=this._scale,o=this._pivot,f=this._origin,d=this._position,m=l._x,g=l._y,v=o._x,_=o._y,b=-f._x,C=-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+_*n.c)+(b*n.a+C*n.c)-b,n.ty=d._y-(v*n.b+_*n.d)+(b*n.b+C*n.d)-C}set alpha(t){t!==this.localAlpha&&(this.localAlpha=t,this._updateFlags|=Y1,this._onUpdate())}get alpha(){return this.localAlpha}set tint(t){const l=Rn.shared.setValue(t??16777215).toBgrNumber();l!==this.localColor&&(this.localColor=l,this._updateFlags|=Y1,this._onUpdate())}get tint(){return sp(this.localColor)}set blendMode(t){this.localBlendMode!==t&&(this.parentRenderGroup&&(this.parentRenderGroup.structureDidChange=!0),this._updateFlags|=mE,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|=zy,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|=zy,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|=zy,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}}Ie.mixin(ma,WT,nE,oE,sE,lE,$T,tE,uE,kT,JT,aE,FT);class q0 extends ma{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 ki(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:l,y:o}=t;return l>=n.minX&&l<=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,l){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,l);o.blendMode.popBlendMode(t)}}class Vc extends q0{constructor(t=ze.EMPTY){t instanceof ze&&(t={texture:t});const{texture:n=ze.EMPTY,anchor:l,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 Wn({_onUpdate:()=>{this.onViewUpdate()}}),l?this.anchor=l: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 ze?new Vc(t):new Vc(ze.from(t,n))}set texture(t){t||(t=ze.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 Ux(this._visualBounds,this._anchor,this._texture),this._visualBounds}get sourceBounds(){return de("8.6.1","Sprite.sourceBounds is deprecated, use visualBounds instead."),this.visualBounds}updateBounds(){const t=this._anchor,n=this._texture,l=this._bounds,{width:o,height:f}=n.orig;l.minX=-t._x*o,l.maxX=l.minX+o,l.minY=-t._y*f,l.maxY=l.minY+f}destroy(t=!1){if(super.destroy(t),typeof t=="boolean"?t:t==null?void 0:t.texture){const l=typeof t=="boolean"?t:t==null?void 0:t.textureSource;this._texture.destroy(l)}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 pE=new ki;function Vx(a,t,n){const l=pE;a.measurable=!0,Gx(a,n,l),t.addBoundsMask(l),a.measurable=!1}function Qx(a,t,n){const l=Ws.get();a.measurable=!0;const o=Ha.get().identity(),f=kx(a,n,o);Yx(a,l,f),a.measurable=!1,t.addBoundsMask(l),Ha.return(o),Ws.return(l)}function kx(a,t,n){return a?(a!==t&&(kx(a.parent,t,n),a.updateLocalTransform(),n.append(a.localTransform)),n):(Ga("Mask bounds, renderable is not inside the root container"),n)}class Kx{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 Vc),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||Vx(this.mask,t,n)}addLocalBounds(t,n){Qx(this.mask,t,n)}containsPoint(t,n){const l=this.mask;return n(l,t)}destroy(){this.reset()}static test(t){return t instanceof Vc}}Kx.extension=Wt.MaskEffect;class Zx{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"}}Zx.extension=Wt.MaskEffect;class Jx{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){Vx(this.mask,t,n)}addLocalBounds(t,n){Qx(this.mask,t,n)}containsPoint(t,n){const l=this.mask;return n(l,t)}destroy(){this.reset()}static test(t){return t instanceof ma}}Jx.extension=Wt.MaskEffect;const yE={createCanvas:(a,t)=>{const n=document.createElement("canvas");return n.width=a,n.height=t,n},createImage:()=>new Image,getCanvasRenderingContext2D:()=>CanvasRenderingContext2D,getWebGLRenderingContext:()=>WebGLRenderingContext,getNavigator:()=>navigator,getBaseUrl:()=>document.baseURI??window.location.href,getFontFaceSet:()=>document.fonts,fetch:(a,t)=>fetch(a,t),parseXML:a=>new DOMParser().parseFromString(a,"text/xml")};let L1=yE;const mi={get(){return L1},set(a){L1=a}};class Px extends Ki{constructor(t){t.resource||(t.resource=mi.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,l=this._resolution){const o=super.resize(t,n,l);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"))}}Px.extension=Wt.TextureSource;class op extends Ki{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}}op.extension=Wt.TextureSource;var cp=(a=>(a[a.INTERACTION=50]="INTERACTION",a[a.HIGH=25]="HIGH",a[a.NORMAL=0]="NORMAL",a[a.LOW=-25]="LOW",a[a.UTILITY=-50]="UTILITY",a))(cp||{});class Dy{constructor(t,n=null,l=0,o=!1){this.next=null,this.previous=null,this._destroyed=!1,this._fn=t,this._context=n,this.priority=l,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 Wx=class di{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 Dy(null,null,1/0),this.deltaMS=1/di.targetFPMS,this.elapsedMS=1/di.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,l=cp.NORMAL){return this._addListener(new Dy(t,n,l))}addOnce(t,n,l=cp.NORMAL){return this._addListener(new Dy(t,n,l,!0))}_addListener(t){let n=this._head.next,l=this._head;if(!n)t.connect(l);else{for(;n;){if(t.priority>n.priority){t.connect(l);break}l=n,n=n.next}t.previous||t.connect(l)}return this._startIfPossible(),this}remove(t,n){let l=this._head.next;for(;l;)l.match(t,n)?l=l.destroy():l=l.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*di.targetFPMS;const l=this._head;let o=l.next;for(;o;)o=o.emit(this);l.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,di.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(!di._shared){const t=di._shared=new di;t.autoStart=!0,t._protected=!0}return di._shared}static get system(){if(!di._system){const t=di._system=new di;t.autoStart=!0,t._protected=!0}return di._system}};Wx.targetFPMS=.06;let Hc=Wx,Oy;async function gE(){return Oy??(Oy=(async()=>{var d;const t=mi.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 l=t.createTexture();t.bindTexture(t.TEXTURE_2D,l);const o=t.createFramebuffer();t.bindFramebuffer(t.FRAMEBUFFER,o),t.framebufferTexture2D(t.FRAMEBUFFER,t.COLOR_ATTACHMENT0,t.TEXTURE_2D,l,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(l),(d=t.getExtension("WEBGL_lose_context"))==null||d.loseContext(),f[0]<=f[3]?"premultiplied-alpha":"premultiply-alpha-on-upload"})()),Oy}const Ep=class Fx extends Ki{constructor(t){super(t),this.isReady=!1,this.uploadMethodId="video",t={...Fx.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=Hc.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 gE(),this._load=new Promise((l,o)=>{this.isValid?l(this):(this._resolve=l,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&&(Hc.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||(Hc.shared.add(this.updateFrame,this),this._isConnectedToTicker=!0,this._msToNextUpdate=0)):(this._videoFrameRequestCallbackHandle!==null&&(this.resource.cancelVideoFrameCallback(this._videoFrameRequestCallbackHandle),this._videoFrameRequestCallbackHandle=null),this._isConnectedToTicker&&(Hc.shared.remove(this.updateFrame,this),this._isConnectedToTicker=!1,this._msToNextUpdate=0))}static test(t){return globalThis.HTMLVideoElement&&t instanceof HTMLVideoElement}};Ep.extension=Wt.TextureSource;Ep.defaultOptions={...Ki.defaultOptions,autoLoad:!0,autoPlay:!0,updateFPS:0,crossorigin:!0,loop:!1,muted:!0,playsinline:!0,preload:!1};Ep.MIME_TYPES={ogv:"video/ogg",mov:"video/quicktime",m4v:"video/mp4"};let vE=Ep;const Uc=(a,t,n=!1)=>(Array.isArray(a)||(a=[a]),t?a.map(l=>typeof l=="string"||n?t(l):l):a);class xE{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||Ga(`[Assets] Asset id ${t} was not found in the Cache`),n}set(t,n){const l=Uc(t);let o;for(let g=0;g<this.parsers.length;g++){const v=this.parsers[g];if(v.test(n)){o=v.getCacheableAssets(l,n);break}}const f=new Map(Object.entries(o||{}));o||l.forEach(g=>{f.set(g,n)});const d=[...f.keys()],m={cacheKeys:d,keys:l};l.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&&Ga("[Cache] already has key:",g),this._cache.set(g,f.get(g))})}remove(t){if(!this._cacheMap.has(t)){Ga(`[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 Bc=new xE,c0=[];Ie.handleByList(Wt.TextureSource,c0);function Ix(a={}){const t=a&&a.resource,n=t?a.resource:a,l=t?a:{resource:a};for(let o=0;o<c0.length;o++){const f=c0[o];if(f.test(n))return new f(l)}throw new Error(`Could not find a source type for resource: ${l.resource}`)}function _E(a={},t=!1){const n=a&&a.resource,l=n?a.resource:a,o=n?a:{resource:a};if(!t&&Bc.has(l))return Bc.get(l);const f=new ze({source:Ix(o)});return f.on("destroy",()=>{Bc.has(l)&&Bc.remove(l)}),t||Bc.set(l,f),f}function SE(a,t=!1){return typeof a=="string"?Bc.get(a):a instanceof Ki?new ze({source:a}):_E(a,t)}ze.from=SE;Ki.from=Ix;Ie.add(Kx,Zx,Jx,vE,op,Px,H0);var $x=(a=>(a[a.Low=0]="Low",a[a.Normal=1]="Normal",a[a.High=2]="High",a))($x||{});function xl(a){if(typeof a!="string")throw new TypeError(`Path must be a string. Received ${JSON.stringify(a)}`)}function Oh(a){return a.split("?")[0].split("#")[0]}function bE(a){return a.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function TE(a,t,n){return a.replace(new RegExp(bE(t),"g"),n)}function EE(a,t){let n="",l=0,o=-1,f=0,d=-1;for(let m=0;m<=a.length;++m){if(m<a.length)d=a.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||l!==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="",l=0):(n=n.slice(0,g),l=n.length-1-n.lastIndexOf("/")),o=m,f=0;continue}}else if(n.length===2||n.length===1){n="",l=0,o=m,f=0;continue}}}else n.length>0?n+=`/${a.slice(o+1,m)}`:n=a.slice(o+1,m),l=m-o-1;o=m,f=0}else d===46&&f!==-1?++f:f=-1}return n}const Ph={toPosix(a){return TE(a,"\\","/")},isUrl(a){return/^https?:/.test(this.toPosix(a))},isDataUrl(a){return/^data:([a-z]+\/[a-z0-9-+.]+(;[a-z0-9-.!#$%*+.{}|~`]+=[a-z0-9-.!#$%*+.{}()_|~`]+)*)?(;base64)?,([a-z0-9!$&',()*+;=\-._~:@\/?%\s<>]*?)$/i.test(a)},isBlobUrl(a){return a.startsWith("blob:")},hasProtocol(a){return/^[^/:]+:/.test(this.toPosix(a))},getProtocol(a){xl(a),a=this.toPosix(a);const t=/^file:\/\/\//.exec(a);if(t)return t[0];const n=/^[^/:]+:\/{0,2}/.exec(a);return n?n[0]:""},toAbsolute(a,t,n){if(xl(a),this.isDataUrl(a)||this.isBlobUrl(a))return a;const l=Oh(this.toPosix(t??mi.get().getBaseUrl())),o=Oh(this.toPosix(n??this.rootname(l)));return a=this.toPosix(a),a.startsWith("/")?Ph.join(o,a.slice(1)):this.isAbsolute(a)?a:this.join(l,a)},normalize(a){if(xl(a),a.length===0)return".";if(this.isDataUrl(a)||this.isBlobUrl(a))return a;a=this.toPosix(a);let t="";const n=a.startsWith("/");this.hasProtocol(a)&&(t=this.rootname(a),a=a.slice(t.length));const l=a.endsWith("/");return a=EE(a),a.length>0&&l&&(a+="/"),n?`/${a}`:t+a},isAbsolute(a){return xl(a),a=this.toPosix(a),this.hasProtocol(a)?!0:a.startsWith("/")},join(...a){if(a.length===0)return".";let t;for(let n=0;n<a.length;++n){const l=a[n];if(xl(l),l.length>0)if(t===void 0)t=l;else{const o=a[n-1]??"";this.joinExtensions.includes(this.extname(o).toLowerCase())?t+=`/../${l}`:t+=`/${l}`}}return t===void 0?".":this.normalize(t)},dirname(a){if(xl(a),a.length===0)return".";a=this.toPosix(a);let t=a.charCodeAt(0);const n=t===47;let l=-1,o=!0;const f=this.getProtocol(a),d=a;a=a.slice(f.length);for(let m=a.length-1;m>=1;--m)if(t=a.charCodeAt(m),t===47){if(!o){l=m;break}}else o=!1;return l===-1?n?"/":this.isUrl(d)?f+a:f:n&&l===1?"//":f+a.slice(0,l)},rootname(a){xl(a),a=this.toPosix(a);let t="";if(a.startsWith("/")?t="/":t=this.getProtocol(a),this.isUrl(a)){const n=a.indexOf("/",t.length);n!==-1?t=a.slice(0,n):t=a,t.endsWith("/")||(t+="/")}return t},basename(a,t){xl(a),t&&xl(t),a=Oh(this.toPosix(a));let n=0,l=-1,o=!0,f;if(t!==void 0&&t.length>0&&t.length<=a.length){if(t.length===a.length&&t===a)return"";let d=t.length-1,m=-1;for(f=a.length-1;f>=0;--f){const g=a.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&&(l=f):(d=-1,l=m))}return n===l?l=m:l===-1&&(l=a.length),a.slice(n,l)}for(f=a.length-1;f>=0;--f)if(a.charCodeAt(f)===47){if(!o){n=f+1;break}}else l===-1&&(o=!1,l=f+1);return l===-1?"":a.slice(n,l)},extname(a){xl(a),a=Oh(this.toPosix(a));let t=-1,n=0,l=-1,o=!0,f=0;for(let d=a.length-1;d>=0;--d){const m=a.charCodeAt(d);if(m===47){if(!o){n=d+1;break}continue}l===-1&&(o=!1,l=d+1),m===46?t===-1?t=d:f!==1&&(f=1):t!==-1&&(f=-1)}return t===-1||l===-1||f===0||f===1&&t===l-1&&t===n+1?"":a.slice(t,l)},parse(a){xl(a);const t={root:"",dir:"",base:"",ext:"",name:""};if(a.length===0)return t;a=Oh(this.toPosix(a));let n=a.charCodeAt(0);const l=this.isAbsolute(a);let o;t.root=this.rootname(a),l||this.hasProtocol(a)?o=1:o=0;let f=-1,d=0,m=-1,g=!0,v=a.length-1,_=0;for(;v>=o;--v){if(n=a.charCodeAt(v),n===47){if(!g){d=v+1;break}continue}m===-1&&(g=!1,m=v+1),n===46?f===-1?f=v:_!==1&&(_=1):f!==-1&&(_=-1)}return f===-1||m===-1||_===0||_===1&&f===m-1&&f===d+1?m!==-1&&(d===0&&l?t.base=t.name=a.slice(1,m):t.base=t.name=a.slice(d,m)):(d===0&&l?(t.name=a.slice(1,f),t.base=a.slice(1,m)):(t.name=a.slice(d,f),t.base=a.slice(d,m)),t.ext=a.slice(f,m)),t.dir=this.dirname(a),t},sep:"/",delimiter:":",joinExtensions:[".html"]};function t_(a,t,n,l,o){const f=t[n];for(let d=0;d<f.length;d++){const m=f[d];n<t.length-1?t_(a.replace(l[n],m),t,n+1,l,o):o.push(a.replace(l[n],m))}}function CE(a){const t=/\{(.*?)\}/g,n=a.match(t),l=[];if(n){const o=[];n.forEach(f=>{const d=f.substring(1,f.length-1).split(",");o.push(d)}),t_(a,o,0,n,l)}else l.push(a);return l}const X1=a=>!Array.isArray(a);class e_{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(l=>`${encodeURIComponent(l)}=${encodeURIComponent(n[l])}`).join("&")}}getAlias(t){const{alias:n,src:l}=t;return Uc(n||l,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&&Ga("[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 l=[];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);l.push(v),g=[m,v]}else{const v=m.map(_=>this._createBundleAssetId(t,_));l.push(...v),g=[...m,...v]}this.add({...f,alias:g,src:d})}),this._bundles[t]=l}add(t){const n=[];Array.isArray(t)?n.push(...t):n.push(t);let l;l=f=>{this.hasKey(f)&&Ga(`[Resolver] already has key: ${f} overwriting`)},Uc(n).forEach(f=>{const{src:d}=f;let{data:m,format:g,loadParser:v,parser:_}=f;const b=Uc(d).map(z=>typeof z=="string"?CE(z):Array.isArray(z)?z:[z]),C=this.getAlias(f);Array.isArray(C)?C.forEach(l):l(C);const E=[],M=z=>{const R=this._parsers.find(D=>D.test(z));return{src:z,...R==null?void 0:R.parse(z)}};b.forEach(z=>{z.forEach(R=>{let D={};if(typeof R!="object"?D=M(R):(m=R.data??m,g=R.format??g,(R.loadParser||R.parser)&&(v=R.loadParser??v,_=R.parser??_),D={...M(R.src),...R}),!C)throw new Error(`[Resolver] alias is undefined for this asset: ${D.src}`);D=this._buildResolvedAsset(D,{aliases:C,data:m,format:g,loadParser:v,parser:_,progressSize:f.progressSize}),E.push(D)})}),C.forEach(z=>{this._assetMap[z]=E})})}resolveBundle(t){const n=X1(t);t=Uc(t);const l={};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}l[o]=m}}),n?l[t[0]]:l}resolveUrl(t){const n=this.resolve(t);if(typeof t!="string"){const l={};for(const o in n)l[o]=n[o].src;return l}return n.src}resolve(t){const n=X1(t);t=Uc(t);const l={};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(_=>_[m]?_[m]===g:!1);v.length&&(f=v)})}),this._resolverHash[o]=f[0]}else this._resolverHash[o]=this._buildResolvedAsset({alias:[o],src:o},{});l[o]=this._resolverHash[o]}),n?l[t[0]]:l}hasKey(t){return!!this._assetMap[t]}hasBundle(t){return!!this._bundles[t]}_getPreferredOrder(t){for(let n=0;n<t.length;n++){const l=t[n],o=this._preferredOrder.find(f=>f.params.format.includes(l.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:l,data:o,loadParser:f,parser:d,format:m,progressSize:g}=n;return(this._basePath||this._rootPath)&&(t.src=Ph.toAbsolute(t.src,this._basePath,this._rootPath)),t.alias=l??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??AE(t.src),g!==void 0&&(t.progressSize=g),t}}e_.RETINA_PREFIX=/@([0-9\.]+)x/;function AE(a){return a.split(".").pop().split("?").shift().split("#").shift()}const V1=(a,t)=>{const n=t.split("?")[1];return n&&(a+=`?${n}`),a},n_=class Yh{constructor(t,n){this.linkedSheets=[];let l=t;(t==null?void 0:t.source)instanceof Ki&&(l={texture:t,data:n});const{texture:o,data:f,cachePrefix:d=""}=l;this.cachePrefix=d,this._texture=o instanceof ze?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<=Yh.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 l=t;const o=n?1/0:Yh.BATCH_SIZE;for(;l-t<o&&l<this._frameKeys.length;){const f=this._frameKeys[l],d=this._frames[f],m=d.frame;if(m){let g=null,v=null;const _=d.trimmed!==!1&&d.sourceSize?d.sourceSize:d.frame,b=new on(0,0,Math.floor(_.w)/this.resolution,Math.floor(_.h)/this.resolution);d.rotated?g=new on(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 on(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 on(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 ze({source:this.textureSource,frame:g,orig:b,trim:v,rotate:d.rotated?2:0,defaultAnchor:d.anchor,defaultBorders:d.borders,label:f.toString()})}l++}}_processAnimations(){const t=this.data.animations||{};for(const n in t){this.animations[n]=[];for(let l=0;l<t[n].length;l++){const o=t[n][l];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*Yh.BATCH_SIZE),this._batchIndex++,setTimeout(()=>{this._batchIndex*Yh.BATCH_SIZE<this._frameKeys.length?this._nextBatch():(this._processAnimations(),this._parseComplete())},0)}destroy(t=!1){var n;for(const l in this.textures)this.textures[l].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=[]}};n_.BATCH_SIZE=1e3;let Q1=n_;const ME=["jpg","png","jpeg","avif","webp","basis","etc2","bc7","bc6h","bc5","bc4","bc3","bc2","bc1","eac","astc"];function a_(a,t,n){const l={};if(a.forEach(o=>{l[o]=t}),Object.keys(t.textures).forEach(o=>{l[`${t.cachePrefix}${o}`]=t.textures[o]}),!n){const o=Ph.dirname(a[0]);t.linkedSheets.forEach((f,d)=>{const m=a_([`${o}/${t.data.meta.related_multi_packs[d]}`],f,!0);Object.assign(l,m)})}return l}const RE={extension:Wt.Asset,cache:{test:a=>a instanceof Q1,getCacheableAssets:(a,t)=>a_(a,t,!1)},resolver:{extension:{type:Wt.ResolveParser,name:"resolveSpritesheet"},test:a=>{const n=a.split("?")[0].split("."),l=n.pop(),o=n.pop();return l==="json"&&ME.includes(o)},parse:a=>{var n;const t=a.split(".");return{resolution:parseFloat(((n=e_.RETINA_PREFIX.exec(a))==null?void 0:n[1])??"1"),format:t[t.length-2],src:a}}},loader:{name:"spritesheetLoader",id:"spritesheet",extension:{type:Wt.LoadParser,priority:$x.Normal,name:"spritesheetLoader"},async testParse(a,t){return Ph.extname(t.src).toLowerCase()===".json"&&!!a.frames},async parse(a,t,n){var b,C;const{texture:l,imageFilename:o,textureOptions:f,cachePrefix:d}=(t==null?void 0:t.data)??{};let m=Ph.dirname(t.src);m&&m.lastIndexOf("/")!==m.length-1&&(m+="/");let g;if(l instanceof ze)g=l;else{const E=V1(m+(o??a.meta.image),t.src);g=(await n.load([{src:E,data:f}]))[E]}const v=new Q1({texture:g.source,data:a,cachePrefix:d});await v.parse();const _=(b=a==null?void 0:a.meta)==null?void 0:b.related_multi_packs;if(Array.isArray(_)){const E=[];for(const z of _){if(typeof z!="string")continue;let R=m+z;(C=t.data)!=null&&C.ignoreMultiPack||(R=V1(R,t.src),E.push(n.load({src:R,data:{textureOptions:f,ignoreMultiPack:!0}})))}const M=await Promise.all(E);v.linkedSheets=M,M.forEach(z=>{z.linkedSheets=[v].concat(v.linkedSheets.filter(R=>R!==z))})}return v},async unload(a,t,n){await n.unload(a.textureSource._sourceOrigin),a.destroy(!1)}}};Ie.add(RE);const Ny=Object.create(null),k1=Object.create(null);function Y0(a,t){let n=k1[a];return n===void 0&&(Ny[t]===void 0&&(Ny[t]=1),k1[a]=n=Ny[t]++),n}let Rc;function i_(){return(!Rc||Rc!=null&&Rc.isContextLost())&&(Rc=mi.get().createCanvas().getContext("webgl",{})),Rc}let Km;function zE(){if(!Km){Km="mediump";const a=i_();a&&a.getShaderPrecisionFormat&&(Km=a.getShaderPrecisionFormat(a.FRAGMENT_SHADER,a.HIGH_FLOAT).precision?"highp":"mediump")}return Km}function DE(a,t,n){return t?a:n?(a=a.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
|
+
${a}
|
|
72
|
+
`):`
|
|
73
|
+
|
|
74
|
+
#ifdef GL_ES // This checks if it is WebGL1
|
|
75
|
+
#define in attribute
|
|
76
|
+
#define out varying
|
|
77
|
+
#endif
|
|
78
|
+
${a}
|
|
79
|
+
`}function OE(a,t,n){const l=n?t.maxSupportedFragmentPrecision:t.maxSupportedVertexPrecision;if(a.substring(0,9)!=="precision"){let o=n?t.requestedFragmentPrecision:t.requestedVertexPrecision;return o==="highp"&&l!=="highp"&&(o="mediump"),`precision ${o} float;
|
|
80
|
+
${a}`}else if(l!=="highp"&&a.substring(0,15)==="precision highp")return a.replace("precision highp","precision mediump");return a}function NE(a,t){return t?`#version 300 es
|
|
81
|
+
${a}`:a}const UE={},BE={};function wE(a,{name:t="pixi-program"},n=!0){t=t.replace(/\s+/g,"-"),t+=n?"-fragment":"-vertex";const l=n?UE:BE;return l[t]?(l[t]++,t+=`-${l[t]}`):l[t]=1,a.indexOf("#define SHADER_NAME")!==-1?a:`${`#define SHADER_NAME ${t}`}
|
|
82
|
+
${a}`}function HE(a,t){return t?a.replace("#version 300 es",""):a}const Uy={stripVersion:HE,ensurePrecision:OE,addProgramDefines:DE,setProgramName:wE,insertVersion:NE},Nh=Object.create(null),l_=class f0{constructor(t){t={...f0.defaultOptions,...t};const n=t.fragment.indexOf("#version 300 es")!==-1,l={stripVersion:n,ensurePrecision:{requestedFragmentPrecision:t.preferredFragmentPrecision,requestedVertexPrecision:t.preferredVertexPrecision,maxSupportedVertexPrecision:"highp",maxSupportedFragmentPrecision:zE()},setProgramName:{name:t.name},addProgramDefines:n,insertVersion:n};let o=t.fragment,f=t.vertex;Object.keys(Uy).forEach(d=>{const m=l[d];o=Uy[d](o,m,!0),f=Uy[d](f,m,!1)}),this.fragment=o,this.vertex=f,this.transformFeedbackVaryings=t.transformFeedbackVaryings,this._key=Y0(`${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,Nh[this._cacheKey]=null}static from(t){const n=`${t.vertex}:${t.fragment}`;return Nh[n]||(Nh[n]=new f0(t),Nh[n]._cacheKey=n),Nh[n]}};l_.defaultOptions={preferredVertexPrecision:"highp",preferredFragmentPrecision:"mediump"};let L0=l_;const K1={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 GE(a){return K1[a]??K1.float32}const jE={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"},Z1=/@location\((\d+)\)\s+([a-zA-Z0-9_]+)\s*:\s*([a-zA-Z0-9_<>]+)(?:,|\s|\)|$)/g;function J1(a,t){let n;for(;(n=Z1.exec(a))!==null;){const l=jE[n[3]]??"float32";t[n[2]]={location:parseInt(n[1],10),format:l,stride:GE(l).stride,offset:0,instance:!1,start:0}}Z1.lastIndex=0}function qE(a){return a.replace(/\/\/.*$/gm,"").replace(/\/\*[\s\S]*?\*\//g,"")}function YE({source:a,entryPoint:t}){const n={},l=qE(a),o=l.indexOf(`fn ${t}(`);if(o===-1)return n;const f=l.indexOf("->",o);if(f===-1)return n;const d=l.substring(o,f);if(J1(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"),_=l.match(v);_&&J1(_[1],n)}}return n}function By(a){var b,C;const t=/(^|[^/])@(group|binding)\(\d+\)[^;]+;/g,n=/@group\((\d+)\)/,l=/@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=a.match(t))==null?void 0:b.map(E=>({group:parseInt(E.match(n)[1],10),binding:parseInt(E.match(l)[1],10),name:E.match(o)[2],isUniform:E.match(o)[1]==="<uniform>",type:E.match(f)[1]}));if(!v)return{groups:[],structs:[]};const _=((C=a.match(d))==null?void 0:C.map(E=>{const M=E.match(g)[1],z=E.match(m).reduce((R,D)=>{const[U,B]=D.split(":");return R[U.trim()]=B.trim(),R},{});return z?{name:M,members:z}:null}).filter(({name:E})=>v.some(M=>M.type===E||M.type.includes(`<${E}>`))))??[];return{groups:v,structs:_}}var ao=(a=>(a[a.VERTEX=1]="VERTEX",a[a.FRAGMENT=2]="FRAGMENT",a[a.COMPUTE=4]="COMPUTE",a))(ao||{});function LE({groups:a}){const t=[];for(let n=0;n<a.length;n++){const l=a[n];t[l.group]||(t[l.group]=[]),l.isUniform?t[l.group].push({binding:l.binding,visibility:ao.VERTEX|ao.FRAGMENT,buffer:{type:"uniform"}}):l.type==="sampler"?t[l.group].push({binding:l.binding,visibility:ao.FRAGMENT,sampler:{type:"filtering"}}):l.type==="texture_2d"||l.type.startsWith("texture_2d<")?t[l.group].push({binding:l.binding,visibility:ao.FRAGMENT,texture:{sampleType:"float",viewDimension:"2d",multisampled:!1}}):l.type==="texture_2d_array"||l.type.startsWith("texture_2d_array<")?t[l.group].push({binding:l.binding,visibility:ao.FRAGMENT,texture:{sampleType:"float",viewDimension:"2d-array",multisampled:!1}}):(l.type==="texture_cube"||l.type.startsWith("texture_cube<"))&&t[l.group].push({binding:l.binding,visibility:ao.FRAGMENT,texture:{sampleType:"float",viewDimension:"cube",multisampled:!1}})}for(let n=0;n<t.length;n++)t[n]||(t[n]=[]);return t}function XE({groups:a}){const t=[];for(let n=0;n<a.length;n++){const l=a[n];t[l.group]||(t[l.group]={}),t[l.group][l.name]=l.binding}return t}function VE(a,t){const n=new Set,l=new Set,o=[...a.structs,...t.structs].filter(d=>n.has(d.name)?!1:(n.add(d.name),!0)),f=[...a.groups,...t.groups].filter(d=>{const m=`${d.name}-${d.binding}`;return l.has(m)?!1:(l.add(m),!0)});return{structs:o,groups:f}}const Uh=Object.create(null);class id{constructor(t){var m,g;this._layoutKey=0,this._attributeLocationsKey=0;const{fragment:n,vertex:l,layout:o,gpuLayout:f,name:d}=t;if(this.name=d,this.fragment=n,this.vertex=l,n.source===l.source){const v=By(n.source);this.structsAndGroups=v}else{const v=By(l.source),_=By(n.source);this.structsAndGroups=VE(v,_)}this.layout=o??XE(this.structsAndGroups),this.gpuLayout=f??LE(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,l=t.source+n.source+t.entryPoint+n.entryPoint;this._layoutKey=Y0(l,"program")}get attributeData(){return this._attributeData??(this._attributeData=YE(this.vertex)),this._attributeData}destroy(){this.gpuLayout=null,this.layout=null,this.structsAndGroups=null,this.fragment=null,this.vertex=null,Uh[this._cacheKey]=null}static from(t){const n=`${t.vertex.source}:${t.fragment.source}:${t.fragment.entryPoint}:${t.vertex.entryPoint}`;return Uh[n]||(Uh[n]=new id(t),Uh[n]._cacheKey=n),Uh[n]}}const s_=["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>"],QE=s_.reduce((a,t)=>(a[t]=!0,a),{});function kE(a,t){switch(a){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 u_=class r_{constructor(t,n){this._touched=0,this.uid=cn("uniform"),this._resourceType="uniformGroup",this._resourceId=cn("resource"),this.isUniformGroup=!0,this._dirtyId=0,this.destroyed=!1,n={...r_.defaultOptions,...n},this.uniformStructures=t;const l={};for(const o in t){const f=t[o];if(f.name=o,f.size=f.size??1,!QE[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: ${s_.join(", ")}`)}f.value??(f.value=kE(f.type,f.size)),l[o]=f.value}this.uniforms=l,this._dirtyId=1,this.ubo=n.ubo,this.isStatic=n.isStatic,this._signature=Y0(Object.keys(l).map(o=>`${o}-${t[o].type}`).join("-"),"uniform-group")}update(){this._dirtyId++}};u_.defaultOptions={ubo:!1,isStatic:!1};let o_=u_;class up{constructor(t){this.resources=Object.create(null),this._dirty=!0;let n=0;for(const l in t){const o=t[l];this.setResource(o,n++)}this._updateKey()}_updateKey(){if(!this._dirty)return;this._dirty=!1;const t=[];let n=0;for(const l in this.resources)t[n++]=this.resources[l]._resourceId;this._key=t.join("|")}setResource(t,n){var o,f;const l=this.resources[n];t!==l&&((o=l==null?void 0:l.off)==null||o.call(l,"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 l=this.resources;for(const o in l)l[o]._gcLastUsed=t,l[o]._touched=n}destroy(){var n;const t=this.resources;for(const l in t){const o=t[l];(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 h0=(a=>(a[a.WEBGL=1]="WEBGL",a[a.WEBGPU=2]="WEBGPU",a[a.CANVAS=4]="CANVAS",a[a.BOTH=3]="BOTH",a))(h0||{});class Cp extends cs{constructor(t){super(),this.uid=cn("shader"),this._uniformBindMap=Object.create(null),this._ownedBindGroups=[],this._destroyed=!1;let{gpuProgram:n,glProgram:l,groups:o,resources:f,compatibleRenderers:d,groupMap:m}=t;this.gpuProgram=n,this.glProgram=l,d===void 0&&(d=0,n&&(d|=h0.WEBGPU),l&&(d|=h0.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 _ in m[v]){const b=m[v][_];g[b]={group:v,binding:_,name:b}}else if(n&&o&&!m){const v=n.structsAndGroups.groups;m={},v.forEach(_=>{m[_.group]=m[_.group]||{},m[_.group][_.binding]=_.name,g[_.name]=_})}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 _ in f)g[_]||(o[99]||(o[99]=new up,this._ownedBindGroups.push(o[99])),g[_]={group:99,binding:v,name:_},m[99]=m[99]||{},m[99][v]=_,v++);for(const _ in f){const b=_;let C=f[_];!C.source&&!C._resourceType&&(C=new o_(C));const E=g[b];E&&(o[E.group]||(o[E.group]=new up,this._ownedBindGroups.push(o[E.group])),o[E.group].setResource(C,E.binding))}}this.groups=o,this._uniformBindMap=m,this.resources=this._buildResourceAccessor(o,g)}addResource(t,n,l){var o,f;(o=this._uniformBindMap)[n]||(o[n]={}),(f=this._uniformBindMap[n])[l]||(f[l]=t),this.groups[n]||(this.groups[n]=new up,this._ownedBindGroups.push(this.groups[n]))}_buildResourceAccessor(t,n){const l={};for(const o in n){const f=n[o];Object.defineProperty(l,f.name,{get(){return t[f.group].getResource(f.binding)},set(d){t[f.group].setResource(d,f.binding)}})}return l}destroy(t=!1){var n,l;this._destroyed||(this._destroyed=!0,this.emit("destroy",this),t&&((n=this.gpuProgram)==null||n.destroy(),(l=this.glProgram)==null||l.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:l,...o}=t;let f,d;return n&&(f=id.from(n)),l&&(d=L0.from(l)),new Cp({gpuProgram:f,glProgram:d,...o})}}const KE={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},wy=0,Hy=1,Gy=2,jy=3,qy=4,Yy=5,d0=class c_{constructor(){this.data=0,this.blendMode="normal",this.polygonOffset=0,this.blend=!0,this.depthMask=!0}get blend(){return!!(this.data&1<<wy)}set blend(t){!!(this.data&1<<wy)!==t&&(this.data^=1<<wy)}get offsets(){return!!(this.data&1<<Hy)}set offsets(t){!!(this.data&1<<Hy)!==t&&(this.data^=1<<Hy)}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<<Gy)}set culling(t){!!(this.data&1<<Gy)!==t&&(this.data^=1<<Gy)}get depthTest(){return!!(this.data&1<<jy)}set depthTest(t){!!(this.data&1<<jy)!==t&&(this.data^=1<<jy)}get depthMask(){return!!(this.data&1<<Yy)}set depthMask(t){!!(this.data&1<<Yy)!==t&&(this.data^=1<<Yy)}get clockwiseFrontFace(){return!!(this.data&1<<qy)}set clockwiseFrontFace(t){!!(this.data&1<<qy)!==t&&(this.data^=1<<qy)}get blendMode(){return this._blendMode}set blendMode(t){this.blend=t!=="none",this._blendMode=t,this._blendModeId=KE[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 c_;return t.depthTest=!1,t.blend=!0,t}};d0.default2d=d0.for2d();let X0=d0;const f_=class m0 extends Cp{constructor(t){t={...m0.defaultOptions,...t},super(t),this.enabled=!0,this._state=X0.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,l,o){t.applyFilter(this,n,l,o)}get blendMode(){return this._state.blendMode}set blendMode(t){this._state.blendMode=t}static from(t){const{gpu:n,gl:l,...o}=t;let f,d;return n&&(f=id.from(n)),l&&(d=L0.from(l)),new m0({gpuProgram:f,glProgram:d,...o})}};f_.defaultOptions={blendMode:"normal",resolution:1,padding:0,antialias:"off",blendRequired:!1,clipToViewport:!0};let oo=f_;const p0=[];Ie.handleByNamedList(Wt.Environment,p0);async function ZE(a){if(!a)for(let t=0;t<p0.length;t++){const n=p0[t];if(n.value.test()){await n.value.load();return}}}let Bh;function JE(){if(typeof Bh=="boolean")return Bh;try{Bh=new Function("param1","param2","param3","return param1[param2] === param3;")({a:"b"},"a","b")===!0}catch{Bh=!1}return Bh}function P1(a,t,n=2){const l=t&&t.length,o=l?t[0]*n:a.length;let f=h_(a,0,o,n,!0);const d=[];if(!f||f.next===f.prev)return d;let m,g,v;if(l&&(f=$E(a,t,f,n)),a.length>80*n){m=a[0],g=a[1];let _=m,b=g;for(let C=n;C<o;C+=n){const E=a[C],M=a[C+1];E<m&&(m=E),M<g&&(g=M),E>_&&(_=E),M>b&&(b=M)}v=Math.max(_-m,b-g),v=v!==0?32767/v:0}return Wh(f,d,n,m,g,v,0),d}function h_(a,t,n,l,o){let f;if(o===c3(a,t,n,l)>0)for(let d=t;d<n;d+=l)f=W1(d/l|0,a[d],a[d+1],f);else for(let d=n-l;d>=t;d-=l)f=W1(d/l|0,a[d],a[d+1],f);return f&&Qc(f,f.next)&&(Ih(f),f=f.next),f}function uo(a,t){if(!a)return a;t||(t=a);let n=a,l;do if(l=!1,!n.steiner&&(Qc(n,n.next)||Fe(n.prev,n,n.next)===0)){if(Ih(n),n=t=n.prev,n===n.next)break;l=!0}else n=n.next;while(l||n!==t);return t}function Wh(a,t,n,l,o,f,d){if(!a)return;!d&&f&&i3(a,l,o,f);let m=a;for(;a.prev!==a.next;){const g=a.prev,v=a.next;if(f?WE(a,l,o,f):PE(a)){t.push(g.i,a.i,v.i),Ih(a),a=v.next,m=v.next;continue}if(a=v,a===m){d?d===1?(a=FE(uo(a),t),Wh(a,t,n,l,o,f,2)):d===2&&IE(a,t,n,l,o,f):Wh(uo(a),t,n,l,o,f,1);break}}}function PE(a){const t=a.prev,n=a,l=a.next;if(Fe(t,n,l)>=0)return!1;const o=t.x,f=n.x,d=l.x,m=t.y,g=n.y,v=l.y,_=Math.min(o,f,d),b=Math.min(m,g,v),C=Math.max(o,f,d),E=Math.max(m,g,v);let M=l.next;for(;M!==t;){if(M.x>=_&&M.x<=C&&M.y>=b&&M.y<=E&&Lh(o,m,f,g,d,v,M.x,M.y)&&Fe(M.prev,M,M.next)>=0)return!1;M=M.next}return!0}function WE(a,t,n,l){const o=a.prev,f=a,d=a.next;if(Fe(o,f,d)>=0)return!1;const m=o.x,g=f.x,v=d.x,_=o.y,b=f.y,C=d.y,E=Math.min(m,g,v),M=Math.min(_,b,C),z=Math.max(m,g,v),R=Math.max(_,b,C),D=y0(E,M,t,n,l),U=y0(z,R,t,n,l);let B=a.prevZ,G=a.nextZ;for(;B&&B.z>=D&&G&&G.z<=U;){if(B.x>=E&&B.x<=z&&B.y>=M&&B.y<=R&&B!==o&&B!==d&&Lh(m,_,g,b,v,C,B.x,B.y)&&Fe(B.prev,B,B.next)>=0||(B=B.prevZ,G.x>=E&&G.x<=z&&G.y>=M&&G.y<=R&&G!==o&&G!==d&&Lh(m,_,g,b,v,C,G.x,G.y)&&Fe(G.prev,G,G.next)>=0))return!1;G=G.nextZ}for(;B&&B.z>=D;){if(B.x>=E&&B.x<=z&&B.y>=M&&B.y<=R&&B!==o&&B!==d&&Lh(m,_,g,b,v,C,B.x,B.y)&&Fe(B.prev,B,B.next)>=0)return!1;B=B.prevZ}for(;G&&G.z<=U;){if(G.x>=E&&G.x<=z&&G.y>=M&&G.y<=R&&G!==o&&G!==d&&Lh(m,_,g,b,v,C,G.x,G.y)&&Fe(G.prev,G,G.next)>=0)return!1;G=G.nextZ}return!0}function FE(a,t){let n=a;do{const l=n.prev,o=n.next.next;!Qc(l,o)&&m_(l,n,n.next,o)&&Fh(l,o)&&Fh(o,l)&&(t.push(l.i,n.i,o.i),Ih(n),Ih(n.next),n=a=o),n=n.next}while(n!==a);return uo(n)}function IE(a,t,n,l,o,f){let d=a;do{let m=d.next.next;for(;m!==d.prev;){if(d.i!==m.i&&u3(d,m)){let g=p_(d,m);d=uo(d,d.next),g=uo(g,g.next),Wh(d,t,n,l,o,f,0),Wh(g,t,n,l,o,f,0);return}m=m.next}d=d.next}while(d!==a)}function $E(a,t,n,l){const o=[];for(let f=0,d=t.length;f<d;f++){const m=t[f]*l,g=f<d-1?t[f+1]*l:a.length,v=h_(a,m,g,l,!1);v===v.next&&(v.steiner=!0),o.push(s3(v))}o.sort(t3);for(let f=0;f<o.length;f++)n=e3(o[f],n);return n}function t3(a,t){let n=a.x-t.x;if(n===0&&(n=a.y-t.y,n===0)){const l=(a.next.y-a.y)/(a.next.x-a.x),o=(t.next.y-t.y)/(t.next.x-t.x);n=l-o}return n}function e3(a,t){const n=n3(a,t);if(!n)return t;const l=p_(n,a);return uo(l,l.next),uo(n,n.next)}function n3(a,t){let n=t;const l=a.x,o=a.y;let f=-1/0,d;if(Qc(a,n))return n;do{if(Qc(a,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<=l&&b>f&&(f=b,d=n.x<n.next.x?n:n.next,b===l))return d}n=n.next}while(n!==t);if(!d)return null;const m=d,g=d.x,v=d.y;let _=1/0;n=d;do{if(l>=n.x&&n.x>=g&&l!==n.x&&d_(o<v?l:f,o,g,v,o<v?f:l,o,n.x,n.y)){const b=Math.abs(o-n.y)/(l-n.x);Fh(n,a)&&(b<_||b===_&&(n.x>d.x||n.x===d.x&&a3(d,n)))&&(d=n,_=b)}n=n.next}while(n!==m);return d}function a3(a,t){return Fe(a.prev,a,t.prev)<0&&Fe(t.next,a,a.next)<0}function i3(a,t,n,l){let o=a;do o.z===0&&(o.z=y0(o.x,o.y,t,n,l)),o.prevZ=o.prev,o.nextZ=o.next,o=o.next;while(o!==a);o.prevZ.nextZ=null,o.prevZ=null,l3(o)}function l3(a){let t,n=1;do{let l=a,o;a=null;let f=null;for(t=0;l;){t++;let d=l,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||l.z<=d.z)?(o=l,l=l.nextZ,m--):(o=d,d=d.nextZ,g--),f?f.nextZ=o:a=o,o.prevZ=f,f=o;l=d}f.nextZ=null,n*=2}while(t>1);return a}function y0(a,t,n,l,o){return a=(a-n)*o|0,t=(t-l)*o|0,a=(a|a<<8)&16711935,a=(a|a<<4)&252645135,a=(a|a<<2)&858993459,a=(a|a<<1)&1431655765,t=(t|t<<8)&16711935,t=(t|t<<4)&252645135,t=(t|t<<2)&858993459,t=(t|t<<1)&1431655765,a|t<<1}function s3(a){let t=a,n=a;do(t.x<n.x||t.x===n.x&&t.y<n.y)&&(n=t),t=t.next;while(t!==a);return n}function d_(a,t,n,l,o,f,d,m){return(o-d)*(t-m)>=(a-d)*(f-m)&&(a-d)*(l-m)>=(n-d)*(t-m)&&(n-d)*(f-m)>=(o-d)*(l-m)}function Lh(a,t,n,l,o,f,d,m){return!(a===d&&t===m)&&d_(a,t,n,l,o,f,d,m)}function u3(a,t){return a.next.i!==t.i&&a.prev.i!==t.i&&!r3(a,t)&&(Fh(a,t)&&Fh(t,a)&&o3(a,t)&&(Fe(a.prev,a,t.prev)||Fe(a,t.prev,t))||Qc(a,t)&&Fe(a.prev,a,a.next)>0&&Fe(t.prev,t,t.next)>0)}function Fe(a,t,n){return(t.y-a.y)*(n.x-t.x)-(t.x-a.x)*(n.y-t.y)}function Qc(a,t){return a.x===t.x&&a.y===t.y}function m_(a,t,n,l){const o=Jm(Fe(a,t,n)),f=Jm(Fe(a,t,l)),d=Jm(Fe(n,l,a)),m=Jm(Fe(n,l,t));return!!(o!==f&&d!==m||o===0&&Zm(a,n,t)||f===0&&Zm(a,l,t)||d===0&&Zm(n,a,l)||m===0&&Zm(n,t,l))}function Zm(a,t,n){return t.x<=Math.max(a.x,n.x)&&t.x>=Math.min(a.x,n.x)&&t.y<=Math.max(a.y,n.y)&&t.y>=Math.min(a.y,n.y)}function Jm(a){return a>0?1:a<0?-1:0}function r3(a,t){let n=a;do{if(n.i!==a.i&&n.next.i!==a.i&&n.i!==t.i&&n.next.i!==t.i&&m_(n,n.next,a,t))return!0;n=n.next}while(n!==a);return!1}function Fh(a,t){return Fe(a.prev,a,a.next)<0?Fe(a,t,a.next)>=0&&Fe(a,a.prev,t)>=0:Fe(a,t,a.prev)<0||Fe(a,a.next,t)<0}function o3(a,t){let n=a,l=!1;const o=(a.x+t.x)/2,f=(a.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&&(l=!l),n=n.next;while(n!==a);return l}function p_(a,t){const n=g0(a.i,a.x,a.y),l=g0(t.i,t.x,t.y),o=a.next,f=t.prev;return a.next=t,t.prev=a,n.next=o,o.prev=n,l.next=n,n.prev=l,f.next=l,l.prev=f,l}function W1(a,t,n,l){const o=g0(a,t,n);return l?(o.next=l.next,o.prev=l,l.next.prev=o,l.next=o):(o.prev=o,o.next=o),o}function Ih(a){a.next.prev=a.prev,a.prev.next=a.next,a.prevZ&&(a.prevZ.nextZ=a.nextZ),a.nextZ&&(a.nextZ.prevZ=a.prevZ)}function g0(a,t,n){return{i:a,x:t,y:n,prev:null,next:null,z:0,prevZ:null,nextZ:null,steiner:!1}}function c3(a,t,n,l){let o=0;for(let f=t,d=n-l;f<n;f+=l)o+=(a[d]-a[f])*(a[f+1]+a[d+1]),d=f;return o}const f3=P1.default||P1;var y_=(a=>(a[a.NONE=0]="NONE",a[a.COLOR=16384]="COLOR",a[a.STENCIL=1024]="STENCIL",a[a.DEPTH=256]="DEPTH",a[a.COLOR_DEPTH=16640]="COLOR_DEPTH",a[a.COLOR_STENCIL=17408]="COLOR_STENCIL",a[a.DEPTH_STENCIL=1280]="DEPTH_STENCIL",a[a.ALL=17664]="ALL",a))(y_||{});class h3{constructor(t){this.items=[],this._name=t}emit(t,n,l,o,f,d,m,g){const{name:v,items:_}=this;for(let b=0,C=_.length;b<C;b++)_[b][v](t,n,l,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 d3=["init","destroy","contextChange","resolutionChange","resetState","renderEnd","renderStart","render","update","postrender","prerender"],g_=class v_ extends cs{constructor(t){super(),this.tick=0,this.uid=cn("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=[...d3,...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 l in this._systemsHash)t={...this._systemsHash[l].constructor.defaultOptions,...t};t={...v_.defaultOptions,...t},this._roundPixels=t.roundPixels?1:0;for(let l=0;l<this.runners.init.items.length;l++)await this.runners.init.items[l].init(t);this._initOptions=t}render(t,n){this.tick++;let l=t;if(l instanceof ma&&(l={container:l},n&&(de(rn,"passing a second argument is deprecated, please use render options instead"),l.target=n.renderTexture)),l.target||(l.target=this.view.renderTarget),l.target===this.view.renderTarget&&(this._lastObjectRendered=l.container,l.clearColor??(l.clearColor=this.background.colorRgba),l.clear??(l.clear=this.background.clearBeforeRender)),l.clearColor){const o=Array.isArray(l.clearColor)&&l.clearColor.length===4;l.clearColor=o?l.clearColor:Rn.shared.setValue(l.clearColor).toArray()}l.transform||(l.container.updateLocalTransform(),l.transform=l.container.localTransform),l.container.visible&&(l.container.enableRenderGroup(),this.runners.prerender.emit(l),this.runners.renderStart.emit(l),this.runners.render.emit(l),this.runners.renderEnd.emit(l),this.runners.postrender.emit(l))}resize(t,n,l){const o=this.view.resolution;this.view.resize(t,n,l),this.emit("resize",this.view.screen.width,this.view.screen.height,this.view.resolution),l!==void 0&&l!==o&&this.runners.resolutionChange.emit(l)}clear(t={}){const n=this;t.target||(t.target=n.renderTarget.renderTarget),t.clearColor||(t.clearColor=this.background.colorRgba),t.clear??(t.clear=y_.ALL);const{clear:l,clearColor:o,target:f,mipLevel:d,layer:m}=t;Rn.shared.setValue(o??this.background.colorRgba),n.renderTarget.clear(f,l,Rn.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 h3(n)})}_addSystems(t){let n;for(n in t){const l=t[n];this._addSystem(l.value,l.name)}}_addSystem(t,n){const l=new t(this);if(this[n])throw new Error(`Whoops! The name "${n}" is already in use`);this[n]=l,this._systemsHash[n]=l;for(const o in this.runners)this.runners[o].add(l);return this}_addPipes(t,n){const l=n.reduce((o,f)=>(o[f.name]=f.value,o),{});t.forEach(o=>{const f=o.value,d=o.name,m=l[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)&&ad.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(!JE())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()}};g_.defaultOptions={resolution:1,failIfMajorPerformanceCaveat:!1,roundPixels:!1};let x_=g_,Pm;function m3(a){return Pm!==void 0||(Pm=(()=>{var n;const t={stencil:!0,failIfMajorPerformanceCaveat:a??x_.defaultOptions.failIfMajorPerformanceCaveat};try{if(!mi.get().getWebGLRenderingContext())return!1;let o=mi.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}})()),Pm}let Wm;async function p3(a={}){return Wm!==void 0||(Wm=await(async()=>{const t=mi.get().getNavigator().gpu;if(!t)return!1;try{return await(await t.requestAdapter(a)).requestDevice(),!0}catch{return!1}})()),Wm}const F1=["webgl","webgpu","canvas"];async function y3(a){let t=[];a.preference?(t.push(a.preference),F1.forEach(f=>{f!==a.preference&&t.push(f)})):t=F1.slice();let n,l={};for(let f=0;f<t.length;f++){const d=t[f];if(d==="webgpu"&&await p3()){const{WebGPURenderer:m}=await Vh(async()=>{const{WebGPURenderer:g}=await import("./WebGPURenderer-DTCsOZ0b.js");return{WebGPURenderer:g}},__vite__mapDeps([2,3,4]));n=m,l={...a,...a.webgpu};break}else if(d==="webgl"&&m3(a.failIfMajorPerformanceCaveat??x_.defaultOptions.failIfMajorPerformanceCaveat)){const{WebGLRenderer:m}=await Vh(async()=>{const{WebGLRenderer:g}=await import("./WebGLRenderer-b57E3WO7.js");return{WebGLRenderer:g}},__vite__mapDeps([5,3,4]));n=m,l={...a,...a.webgl};break}else if(d==="canvas"){const{CanvasRenderer:m}=await Vh(async()=>{const{CanvasRenderer:g}=await import("./CanvasRenderer-DHMJqOGJ.js");return{CanvasRenderer:g}},__vite__mapDeps([6,4]));n=m,l={...a,...a.canvasOptions};break}}if(delete l.webgpu,delete l.webgl,delete l.canvasOptions,!n)throw new Error("No available renderer for the current environment");const o=new n;return await o.init(l),o}const __="8.17.0";class S_{static init(){var t;(t=globalThis.__PIXI_APP_INIT__)==null||t.call(globalThis,this,__)}static destroy(){}}S_.extension=Wt.Application;class g3{constructor(t){this._renderer=t}init(){var t;(t=globalThis.__PIXI_RENDERER_INIT__)==null||t.call(globalThis,this._renderer,__)}destroy(){this._renderer=null}}g3.extension={type:[Wt.WebGLSystem,Wt.WebGPUSystem],name:"initHook",priority:-10};class b_{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,l;if(this._resizeTo===globalThis.window)n=globalThis.innerWidth,l=globalThis.innerHeight;else{const{clientWidth:o,clientHeight:f}=this._resizeTo;n=o,l=f}this.renderer.resize(n,l),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}}b_.extension=Wt.Application;class T_{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,cp.LOW)},get(){return this._ticker}}),this.stop=()=>{this._ticker.stop()},this.start=()=>{this._ticker.start()},this._ticker=null,this.ticker=t.sharedTicker?Hc.shared:new Hc,t.autoStart&&this.start()}static destroy(){if(this._ticker){const t=this._ticker;this.ticker=null,t.destroy()}}}T_.extension=Wt.Application;Ie.add(b_);Ie.add(T_);const E_=class v0{constructor(...t){this.stage=new ma,t[0]!==void 0&&de(rn,"Application constructor options are deprecated, please use Application.init() instead.")}async init(t){t={...t},this.stage||(this.stage=new ma),this.renderer=await y3(t),v0._plugins.forEach(n=>{n.init.call(this,t)})}render(){this.renderer.render({container:this.stage})}get canvas(){return this.renderer.canvas}get view(){return de(rn,"Application.view is deprecated, please use Application.canvas instead."),this.renderer.canvas}get screen(){return this.renderer.screen}destroy(t=!1,n=!1){const l=v0._plugins.slice(0);l.reverse(),l.forEach(o=>{o.destroy.call(this)}),this.stage.destroy(n),this.stage=null,this.renderer.destroy(t),this.renderer=null}};E_._plugins=[];let V0=E_;Ie.handleByList(Wt.Application,V0._plugins);Ie.add(S_);var Ly,I1;function v3(){if(I1)return Ly;I1=1,Ly=n;var a={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 _=g.toLowerCase();for(v=o(v),_=="m"&&v.length>2&&(d.push([g].concat(v.splice(0,2))),_="l",g=g=="m"?"l":"L");;){if(v.length==a[_])return v.unshift(g),d.push(v);if(v.length<a[_])throw new Error("malformed path data");d.push([g].concat(v.splice(0,a[_])))}}),d}var l=/-?[0-9]*\.?[0-9]+(?:e[-+]?\d+)?/ig;function o(f){var d=f.match(l);return d?d.map(Number):[]}return Ly}var x3=v3();const _3=yp(x3);function S3(a,t){const n=_3(a),l=[];let o=null,f=0,d=0;for(let m=0;m<n.length;m++){const g=n[m],v=g[0],_=g;switch(v){case"M":f=_[1],d=_[2],t.moveTo(f,d);break;case"m":f+=_[1],d+=_[2],t.moveTo(f,d);break;case"H":f=_[1],t.lineTo(f,d);break;case"h":f+=_[1],t.lineTo(f,d);break;case"V":d=_[1],t.lineTo(f,d);break;case"v":d+=_[1],t.lineTo(f,d);break;case"L":f=_[1],d=_[2],t.lineTo(f,d);break;case"l":f+=_[1],d+=_[2],t.lineTo(f,d);break;case"C":f=_[5],d=_[6],t.bezierCurveTo(_[1],_[2],_[3],_[4],f,d);break;case"c":t.bezierCurveTo(f+_[1],d+_[2],f+_[3],d+_[4],f+_[5],d+_[6]),f+=_[5],d+=_[6];break;case"S":f=_[3],d=_[4],t.bezierCurveToShort(_[1],_[2],f,d);break;case"s":t.bezierCurveToShort(f+_[1],d+_[2],f+_[3],d+_[4]),f+=_[3],d+=_[4];break;case"Q":f=_[3],d=_[4],t.quadraticCurveTo(_[1],_[2],f,d);break;case"q":t.quadraticCurveTo(f+_[1],d+_[2],f+_[3],d+_[4]),f+=_[3],d+=_[4];break;case"T":f=_[1],d=_[2],t.quadraticCurveToShort(f,d);break;case"t":f+=_[1],d+=_[2],t.quadraticCurveToShort(f,d);break;case"A":f=_[6],d=_[7],t.arcToSvg(_[1],_[2],_[3],_[4],_[5],f,d);break;case"a":f+=_[6],d+=_[7],t.arcToSvg(_[1],_[2],_[3],_[4],_[5],f,d);break;case"Z":case"z":t.closePath(),l.length>0&&(o=l.pop(),o?(f=o.startX,d=o.startY):(f=0,d=0)),o=null;break;default:Ga(`Unknown SVG path command: ${v}`)}v!=="Z"&&v!=="z"&&o===null&&(o={startX:f,startY:d},l.push(o))}return t}class Q0{constructor(t=0,n=0,l=0){this.type="circle",this.x=t,this.y=n,this.radius=l}clone(){return new Q0(this.x,this.y,this.radius)}contains(t,n){if(this.radius<=0)return!1;const l=this.radius*this.radius;let o=this.x-t,f=this.y-n;return o*=o,f*=f,o+f<=l}strokeContains(t,n,l,o=.5){if(this.radius===0)return!1;const f=this.x-t,d=this.y-n,m=this.radius,g=(1-o)*l,v=Math.sqrt(f*f+d*d);return v<=m+g&&v>m-(l-g)}getBounds(t){return t||(t=new on),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 k0{constructor(t=0,n=0,l=0,o=0){this.type="ellipse",this.x=t,this.y=n,this.halfWidth=l,this.halfHeight=o}clone(){return new k0(this.x,this.y,this.halfWidth,this.halfHeight)}contains(t,n){if(this.halfWidth<=0||this.halfHeight<=0)return!1;let l=(t-this.x)/this.halfWidth,o=(n-this.y)/this.halfHeight;return l*=l,o*=o,l+o<=1}strokeContains(t,n,l,o=.5){const{halfWidth:f,halfHeight:d}=this;if(f<=0||d<=0)return!1;const m=l*(1-o),g=l-m,v=f-g,_=d-g,b=f+m,C=d+m,E=t-this.x,M=n-this.y,z=E*E/(v*v)+M*M/(_*_),R=E*E/(b*b)+M*M/(C*C);return z>1&&R<=1}getBounds(t){return t||(t=new on),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 b3(a,t,n,l,o,f){const d=a-n,m=t-l,g=o-n,v=f-l,_=d*g+m*v,b=g*g+v*v;let C=-1;b!==0&&(C=_/b);let E,M;C<0?(E=n,M=l):C>1?(E=o,M=f):(E=n+C*g,M=l+C*v);const z=a-E,R=t-M;return z*z+R*R}let T3,E3;class kh{constructor(...t){this.type="polygon";let n=Array.isArray(t[0])?t[0]:t;if(typeof n[0]!="number"){const l=[];for(let o=0,f=n.length;o<f;o++)l.push(n[o].x,n[o].y);n=l}this.points=n,this.closePath=!0}isClockwise(){let t=0;const n=this.points,l=n.length;for(let o=0;o<l;o+=2){const f=n[o],d=n[o+1],m=n[(o+2)%l],g=n[(o+3)%l];t+=(m-f)*(g+d)}return t<0}containsPolygon(t){const n=this.getBounds(T3),l=t.getBounds(E3);if(!n.containsRect(l))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 kh(t);return n.closePath=this.closePath,n}contains(t,n){let l=!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],_=this.points[d*2+1];g>n!=_>n&&t<(v-m)*((n-g)/(_-g))+m&&(l=!l)}return l}strokeContains(t,n,l,o=.5){const f=l*l,d=f*(1-o),m=f-d,{points:g}=this,v=g.length-(this.closePath?0:2);for(let _=0;_<v;_+=2){const b=g[_],C=g[_+1],E=g[(_+2)%g.length],M=g[(_+3)%g.length],z=b3(t,n,b,C,E,M),R=Math.sign((E-b)*(n-C)-(M-C)*(t-b));if(z<=(R<0?m:d))return!0}return!1}getBounds(t){t||(t=new on);const n=this.points;let l=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],_=n[m+1];l=v<l?v:l,o=v>o?v:o,f=_<f?_:f,d=_>d?_:d}return t.x=l,t.width=o-l,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 de("8.11.0","Polygon.lastX is deprecated, please use Polygon.lastX instead."),this.points[this.points.length-2]}get y(){return de("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 Fm=(a,t,n,l,o,f,d)=>{const m=a-n,g=t-l,v=Math.sqrt(m*m+g*g);return v>=o-f&&v<=o+d};class K0{constructor(t=0,n=0,l=0,o=0,f=20){this.type="roundedRectangle",this.x=t,this.y=n,this.width=l,this.height=o,this.radius=f}getBounds(t){return t||(t=new on),t.x=this.x,t.y=this.y,t.width=this.width,t.height=this.height,t}clone(){return new K0(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 l=Math.max(0,Math.min(this.radius,Math.min(this.width,this.height)/2));if(n>=this.y+l&&n<=this.y+this.height-l||t>=this.x+l&&t<=this.x+this.width-l)return!0;let o=t-(this.x+l),f=n-(this.y+l);const d=l*l;if(o*o+f*f<=d||(o=t-(this.x+this.width-l),o*o+f*f<=d)||(f=n-(this.y+this.height-l),o*o+f*f<=d)||(o=t-(this.x+l),o*o+f*f<=d))return!0}return!1}strokeContains(t,n,l,o=.5){const{x:f,y:d,width:m,height:g,radius:v}=this,_=l*(1-o),b=l-_,C=f+v,E=d+v,M=m-v*2,z=g-v*2,R=f+m,D=d+g;return(t>=f-_&&t<=f+b||t>=R-b&&t<=R+_)&&n>=E&&n<=E+z||(n>=d-_&&n<=d+b||n>=D-b&&n<=D+_)&&t>=C&&t<=C+M?!0:t<C&&n<E&&Fm(t,n,C,E,v,b,_)||t>R-v&&n<E&&Fm(t,n,R-v,E,v,b,_)||t>R-v&&n>D-v&&Fm(t,n,R-v,D-v,v,b,_)||t<C&&n>D-v&&Fm(t,n,C,D-v,v,b,_)}toString(){return`[pixi.js/math:RoundedRectangle x=${this.x} y=${this.y}width=${this.width} height=${this.height} radius=${this.radius}]`}}const C_={};function C3(a,t,n){let l=2166136261;for(let o=0;o<t;o++)l^=a[o].uid,l=Math.imul(l,16777619),l>>>=0;return C_[l]||A3(a,t,l,n)}function A3(a,t,n,l){const o={};let f=0;for(let m=0;m<l;m++){const g=m<t?a[m]:ze.EMPTY.source;o[f++]=g.source,o[f++]=g.style}const d=new up(o);return C_[n]=d,d}class $1{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 tv(a,t,n,l){if(n??(n=0),l??(l=Math.min(a.byteLength-n,t.byteLength)),!(n&7)&&!(l&7)){const o=l/8;new Float64Array(t,0,o).set(new Float64Array(a,n,o))}else if(!(n&3)&&!(l&3)){const o=l/4;new Float32Array(t,0,o).set(new Float32Array(a,n,o))}else new Uint8Array(t).set(new Uint8Array(a,n,l))}const M3={normal:"normal-npm",add:"add-npm",screen:"screen-npm"};var R3=(a=>(a[a.DISABLED=0]="DISABLED",a[a.RENDERING_MASK_ADD=1]="RENDERING_MASK_ADD",a[a.MASK_ACTIVE=2]="MASK_ACTIVE",a[a.INVERSE_MASK_ACTIVE=3]="INVERSE_MASK_ACTIVE",a[a.RENDERING_MASK_REMOVE=4]="RENDERING_MASK_REMOVE",a[a.NONE=5]="NONE",a))(R3||{});function ev(a,t){return t.alphaMode==="no-premultiply-alpha"&&M3[a]||a}const z3=["precision mediump float;","void main(void){","float test = 0.1;","%forloop%","gl_FragColor = vec4(0.0);","}"].join(`
|
|
83
|
+
`);function D3(a){let t="";for(let n=0;n<a;++n)n>0&&(t+=`
|
|
84
|
+
else `),n<a-1&&(t+=`if(test == ${n}.0){}`);return t}function O3(a,t){if(a===0)throw new Error("Invalid value of `0` passed to `checkMaxIfStatementsInShader`");const n=t.createShader(t.FRAGMENT_SHADER);try{for(;;){const l=z3.replace(/%forloop%/gi,D3(a));if(t.shaderSource(n,l),t.compileShader(n),!t.getShaderParameter(n,t.COMPILE_STATUS))a=a/2|0;else break}}finally{t.deleteShader(n)}return a}let zc=null;function N3(){var t;if(zc)return zc;const a=i_();return zc=a.getParameter(a.MAX_TEXTURE_IMAGE_UNITS),zc=O3(zc,a),(t=a.getExtension("WEBGL_lose_context"))==null||t.loseContext(),zc}class U3{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 B3{constructor(){this.renderPipeId="batch",this.action="startBatch",this.start=0,this.size=0,this.textures=new U3,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 Kh=[];let fp=0;ad.register({clear:()=>{if(Kh.length>0)for(const a of Kh)a&&a.destroy();Kh.length=0,fp=0}});function nv(){return fp>0?Kh[--fp]:new B3}function av(a){a.elements=null,Kh[fp++]=a}let wh=0;const A_=class M_{constructor(t){this.uid=cn("batcher"),this.dirty=!0,this.batchIndex=0,this.batches=[],this._elements=[],t={...M_.defaultOptions,...t},t.maxTextures||(de("v8.8.0","maxTextures is a required option for Batcher now, please pass it in the options"),t.maxTextures=N3());const{maxTextures:n,attributesInitialSize:l,indicesInitialSize:o}=t;this.attributeBuffer=new $1(l*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++)av(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 l=t._batch.textures.ids[n._source.uid];return!l&&l!==0?!1:(t._textureId=l,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 l=nv(),o=l.textures;o.clear();const f=n[this.elementStart];let d=ev(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,_=this.indexBuffer;let b=this._batchIndexSize,C=this._batchIndexStart,E="startBatch",M=[];const z=this.maxTextures;for(let R=this.elementStart;R<this.elementSize;++R){const D=n[R];n[R]=null;const B=D.texture._source,G=ev(D.blendMode,B),Q=d!==G||m!==D.topology;if(B._batchTick===wh&&!Q){D._textureId=B._textureBindLocation,b+=D.indexSize,D.packAsQuad?(this.packQuadAttributes(D,g,v,D._attributeStart,D._textureId),this.packQuadIndex(_,D._indexStart,D._attributeStart/this.vertexSize)):(this.packAttributes(D,g,v,D._attributeStart,D._textureId),this.packIndex(D,_,D._indexStart,D._attributeStart/this.vertexSize)),D._batch=l,M.push(D);continue}B._batchTick=wh,(o.count>=z||Q)&&(this._finishBatch(l,C,b-C,o,d,m,t,E,M),E="renderBatch",C=b,d=G,m=D.topology,l=nv(),o=l.textures,o.clear(),M=[],++wh),D._textureId=B._textureBindLocation=o.count,o.ids[B.uid]=o.count,o.textures[o.count++]=B,D._batch=l,M.push(D),b+=D.indexSize,D.packAsQuad?(this.packQuadAttributes(D,g,v,D._attributeStart,D._textureId),this.packQuadIndex(_,D._indexStart,D._attributeStart/this.vertexSize)):(this.packAttributes(D,g,v,D._attributeStart,D._textureId),this.packIndex(D,_,D._indexStart,D._attributeStart/this.vertexSize))}o.count>0&&(this._finishBatch(l,C,b-C,o,d,m,t,E,M),C=b,++wh),this.elementStart=this.elementSize,this._batchIndexStart=C,this._batchIndexSize=b}_finishBatch(t,n,l,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=l,t.elements=v,++wh,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),l=new $1(n);tv(this.attributeBuffer.rawBinaryData,l.rawBinaryData),this.attributeBuffer=l}_resizeIndexBuffer(t){const n=this.indexBuffer;let l=Math.max(t,n.length*1.5);l+=l%2;const o=l>65535?new Uint32Array(l):new Uint16Array(l);if(o.BYTES_PER_ELEMENT!==n.BYTES_PER_ELEMENT)for(let f=0;f<n.length;f++)o[f]=n[f];else tv(n.buffer,o.buffer);this.indexBuffer=o}packQuadIndex(t,n,l){t[n]=l+0,t[n+1]=l+1,t[n+2]=l+2,t[n+3]=l+0,t[n+4]=l+2,t[n+5]=l+3}packIndex(t,n,l,o){const f=t.indices,d=t.indexSize,m=t.indexOffset,g=t.attributeOffset;for(let v=0;v<d;v++)n[l++]=o+f[v+m]-g}destroy(t={}){var n;if(this.batches!==null){for(let l=0;l<this.batchIndex;l++)av(this.batches[l]);this.batches=null,this.geometry.destroy(!0),this.geometry=null,t.shader&&((n=this.shader)==null||n.destroy(),this.shader=null);for(let l=0;l<this._elements.length;l++)this._elements[l]&&(this._elements[l]._batch=null);this._elements=null,this.indexBuffer=null,this.attributeBuffer.destroy(),this.attributeBuffer=null}}};A_.defaultOptions={maxTextures:null,attributesInitialSize:4,indicesInitialSize:6};let w3=A_;var Wa=(a=>(a[a.MAP_READ=1]="MAP_READ",a[a.MAP_WRITE=2]="MAP_WRITE",a[a.COPY_SRC=4]="COPY_SRC",a[a.COPY_DST=8]="COPY_DST",a[a.INDEX=16]="INDEX",a[a.VERTEX=32]="VERTEX",a[a.UNIFORM=64]="UNIFORM",a[a.STORAGE=128]="STORAGE",a[a.INDIRECT=256]="INDIRECT",a[a.QUERY_RESOLVE=512]="QUERY_RESOLVE",a[a.STATIC=1024]="STATIC",a))(Wa||{});class $h extends cs{constructor(t){let{data:n,size:l}=t;const{usage:o,label:f,shrinkToFit:d}=t;super(),this._gpuData=Object.create(null),this._gcLastUsed=-1,this.autoGarbageCollect=!0,this.uid=cn("buffer"),this._resourceType="buffer",this._resourceId=cn("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,l??(l=n==null?void 0:n.byteLength);const m=!!n;this.descriptor={size:l,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&Wa.STATIC)}set static(t){t?this.descriptor.usage|=Wa.STATIC:this.descriptor.usage&=~Wa.STATIC}setDataWithSize(t,n,l){if(this._updateID++,this._updateSize=n*t.BYTES_PER_ELEMENT,this._data===t){l&&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?l&&this.emit("update",this):(this.descriptor.size=t.byteLength,this._resourceId=cn("resource"),this.emit("change",this));return}l&&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 R_(a,t){if(!(a instanceof $h)){let n=t?Wa.INDEX:Wa.VERTEX;a instanceof Array&&(t?(a=new Uint32Array(a),n=Wa.INDEX|Wa.COPY_DST):(a=new Float32Array(a),n=Wa.VERTEX|Wa.COPY_DST)),a=new $h({data:a,label:t?"index-mesh-buffer":"vertex-mesh-buffer",usage:n})}return a}function H3(a,t,n){const l=a.getAttribute(t);if(!l)return n.minX=0,n.minY=0,n.maxX=0,n.maxY=0,n;const o=l.buffer.data;let f=1/0,d=1/0,m=-1/0,g=-1/0;const v=o.BYTES_PER_ELEMENT,_=(l.offset||0)/v,b=(l.stride||8)/v;for(let C=_;C<o.length;C+=b){const E=o[C],M=o[C+1];E>m&&(m=E),M>g&&(g=M),E<f&&(f=E),M<d&&(d=M)}return n.minX=f,n.minY=d,n.maxX=m,n.maxY=g,n}function G3(a){return(a instanceof $h||Array.isArray(a)||a.BYTES_PER_ELEMENT)&&(a={buffer:a}),a.buffer=R_(a.buffer,!1),a}class j3 extends cs{constructor(t={}){super(),this._gpuData=Object.create(null),this.autoGarbageCollect=!0,this._gcLastUsed=-1,this.uid=cn("geometry"),this._layoutKey=0,this.instanceCount=1,this._bounds=new ki,this._boundsDirty=!0;const{attributes:n,indexBuffer:l,topology:o}=t;if(this.buffers=[],this.attributes={},n)for(const f in n)this.addAttribute(f,n[f]);this.instanceCount=t.instanceCount??1,l&&this.addIndex(l),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 l=G3(n);this.buffers.indexOf(l.buffer)===-1&&(this.buffers.push(l.buffer),l.buffer.on("update",this.onBufferUpdate,this),l.buffer.on("change",this.onBufferUpdate,this)),this.attributes[t]=l}addIndex(t){this.indexBuffer=R_(t,!0),this.buffers.push(this.indexBuffer)}get bounds(){return this._boundsDirty?(this._boundsDirty=!1,H3(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(l=>l.destroy()),this.unload(),(n=this.indexBuffer)==null||n.destroy(),this.attributes=null,this.buffers=null,this.indexBuffer=null,this._bounds=null}}const q3=new Float32Array(1),Y3=new Uint32Array(1);class L3 extends j3{constructor(){const n=new $h({data:q3,label:"attribute-batch-buffer",usage:Wa.VERTEX|Wa.COPY_DST,shrinkToFit:!1}),l=new $h({data:Y3,label:"index-batch-buffer",usage:Wa.INDEX|Wa.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:l})}}function iv(a,t,n){if(a)for(const l in a){const o=l.toLocaleLowerCase(),f=t[o];if(f){let d=a[l];l==="header"&&(d=d.replace(/@in\s+[^;]+;\s*/g,"").replace(/@out\s+[^;]+;\s*/g,"")),n&&f.push(`//----${n}----//`),f.push(d)}else Ga(`${l} placement hook does not exist in shader`)}}const X3=/\{\{(.*?)\}\}/g;function lv(a){var l;const t={};return(((l=a.match(X3))==null?void 0:l.map(o=>o.replace(/[{()}]/g,"")))??[]).forEach(o=>{t[o]=[]}),t}function sv(a,t){let n;const l=/@in\s+([^;]+);/g;for(;(n=l.exec(a))!==null;)t.push(n[1])}function uv(a,t,n=!1){const l=[];sv(t,l),a.forEach(m=>{m.header&&sv(m.header,l)});const o=l;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 rv(a,t){let n;const l=/@out\s+([^;]+);/g;for(;(n=l.exec(a))!==null;)t.push(n[1])}function V3(a){const n=/\b(\w+)\s*:/g.exec(a);return n?n[1]:""}function Q3(a){const t=/@.*?\s+/g;return a.replace(t,"")}function k3(a,t){const n=[];rv(t,n),a.forEach(g=>{g.header&&rv(g.header,n)});let l=0;const o=n.sort().map(g=>g.indexOf("builtin")>-1?g:`@location(${l++}) ${g}`).join(`,
|
|
88
|
+
`),f=n.sort().map(g=>` var ${Q3(g)};`).join(`
|
|
89
|
+
`),d=`return VSOutput(
|
|
90
|
+
${n.sort().map(g=>` ${V3(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 ov(a,t){let n=a;for(const l in t){const o=t[l];o.join(`
|
|
98
|
+
`).length?n=n.replace(`{{${l}}}`,`//-----${l} START-----//
|
|
99
|
+
${o.join(`
|
|
100
|
+
`)}
|
|
101
|
+
//----${l} FINISH----//`):n=n.replace(`{{${l}}}`,"")}return n}const Ju=Object.create(null),Xy=new Map;let K3=0;function Z3({template:a,bits:t}){const n=z_(a,t);if(Ju[n])return Ju[n];const{vertex:l,fragment:o}=P3(a,t);return Ju[n]=D_(l,o,t),Ju[n]}function J3({template:a,bits:t}){const n=z_(a,t);return Ju[n]||(Ju[n]=D_(a.vertex,a.fragment,t)),Ju[n]}function P3(a,t){const n=t.map(d=>d.vertex).filter(d=>!!d),l=t.map(d=>d.fragment).filter(d=>!!d);let o=uv(n,a.vertex,!0);o=k3(n,o);const f=uv(l,a.fragment,!0);return{vertex:o,fragment:f}}function z_(a,t){return t.map(n=>(Xy.has(n)||Xy.set(n,K3++),Xy.get(n))).sort((n,l)=>n-l).join("-")+a.vertex+a.fragment}function D_(a,t,n){const l=lv(a),o=lv(t);return n.forEach(f=>{iv(f.vertex,l,f.name),iv(f.fragment,o,f.name)}),{vertex:ov(a,l),fragment:ov(t,o)}}const W3=`
|
|
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
|
+
`,F3=`
|
|
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
|
+
`,I3=`
|
|
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
|
+
`,$3=`
|
|
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
|
+
`,tC={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
|
+
`}},eC={name:"global-uniforms-bit",vertex:{header:`
|
|
235
|
+
uniform mat3 uProjectionMatrix;
|
|
236
|
+
uniform mat3 uWorldTransformMatrix;
|
|
237
|
+
uniform vec4 uWorldColorAlpha;
|
|
238
|
+
uniform vec2 uResolution;
|
|
239
|
+
`}};function nC({bits:a,name:t}){const n=Z3({template:{fragment:F3,vertex:W3},bits:[tC,...a]});return id.from({name:t,vertex:{source:n.vertex,entryPoint:"main"},fragment:{source:n.fragment,entryPoint:"main"}})}function aC({bits:a,name:t}){return new L0({name:t,...J3({template:{vertex:I3,fragment:$3},bits:[eC,...a]})})}const iC={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
|
+
`}},Vy={};function sC(a){const t=[];if(a===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 l=0;l<a;l++)t.push(`@group(1) @binding(${n++}) var textureSource${l+1}: texture_2d<f32>;`),t.push(`@group(1) @binding(${n++}) var textureSampler${l+1}: sampler;`)}return t.join(`
|
|
248
|
+
`)}function uC(a){const t=[];if(a===1)t.push("outColor = textureSampleGrad(textureSource1, textureSampler1, vUV, uvDx, uvDy);");else{t.push("switch vTextureId {");for(let n=0;n<a;n++)n===a-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 rC(a){return Vy[a]||(Vy[a]={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
|
+
${sC(a)}
|
|
263
|
+
`,main:`
|
|
264
|
+
var uvDx = dpdx(vUV);
|
|
265
|
+
var uvDy = dpdy(vUV);
|
|
266
|
+
|
|
267
|
+
${uC(a)}
|
|
268
|
+
`}}),Vy[a]}const Qy={};function oC(a){const t=[];for(let n=0;n<a;n++)n>0&&t.push("else"),n<a-1&&t.push(`if(vTextureId < ${n}.5)`),t.push("{"),t.push(` outColor = texture(uTextures[${n}], vUV);`),t.push("}");return t.join(`
|
|
269
|
+
`)}function cC(a){return Qy[a]||(Qy[a]={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[${a}];
|
|
284
|
+
|
|
285
|
+
`,main:`
|
|
286
|
+
|
|
287
|
+
${oC(a)}
|
|
288
|
+
`}}),Qy[a]}const fC={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
|
+
`}},hC={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
|
+
`}},cv={};function dC(a){let t=cv[a];if(t)return t;const n=new Int32Array(a);for(let l=0;l<a;l++)n[l]=l;return t=cv[a]=new o_({uTextures:{value:n,type:"i32",size:a}},{isStatic:!0}),t}class fv extends Cp{constructor(t){const n=aC({name:"batch",bits:[lC,cC(t),hC]}),l=nC({name:"batch",bits:[iC,rC(t),fC]});super({glProgram:n,gpuProgram:l,resources:{batchSamplers:dC(t)}}),this.maxTextures=t}}let Hh=null;const O_=class N_ extends w3{constructor(t){super(t),this.geometry=new L3,this.name=N_.extension.name,this.vertexSize=6,Hh??(Hh=new fv(t.maxTextures)),this.shader=Hh}packAttributes(t,n,l,o,f){const d=f<<16|t.roundPixels&65535,m=t.transform,g=m.a,v=m.b,_=m.c,b=m.d,C=m.tx,E=m.ty,{positions:M,uvs:z}=t,R=t.color,D=t.attributeOffset,U=D+t.attributeSize;for(let B=D;B<U;B++){const G=B*2,Q=M[G],V=M[G+1];n[o++]=g*Q+_*V+C,n[o++]=b*V+v*Q+E,n[o++]=z[G],n[o++]=z[G+1],l[o++]=R,l[o++]=d}}packQuadAttributes(t,n,l,o,f){const d=t.texture,m=t.transform,g=m.a,v=m.b,_=m.c,b=m.d,C=m.tx,E=m.ty,M=t.bounds,z=M.maxX,R=M.minX,D=M.maxY,U=M.minY,B=d.uvs,G=t.color,Q=f<<16|t.roundPixels&65535;n[o+0]=g*R+_*U+C,n[o+1]=b*U+v*R+E,n[o+2]=B.x0,n[o+3]=B.y0,l[o+4]=G,l[o+5]=Q,n[o+6]=g*z+_*U+C,n[o+7]=b*U+v*z+E,n[o+8]=B.x1,n[o+9]=B.y1,l[o+10]=G,l[o+11]=Q,n[o+12]=g*z+_*D+C,n[o+13]=b*D+v*z+E,n[o+14]=B.x2,n[o+15]=B.y2,l[o+16]=G,l[o+17]=Q,n[o+18]=g*R+_*D+C,n[o+19]=b*D+v*R+E,n[o+20]=B.x3,n[o+21]=B.y3,l[o+22]=G,l[o+23]=Q}_updateMaxTextures(t){this.shader.maxTextures!==t&&(Hh=new fv(t),this.shader=Hh)}destroy(){this.shader=null,super.destroy()}};O_.extension={type:[Wt.Batcher],name:"default"};let mC=O_;class ld{constructor(t){this.items=Object.create(null);const{renderer:n,type:l,onUnload:o,priority:f,name:d}=t;this._renderer=n,n.gc.addResourceHash(this,"items",l,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 l=t._gpuData[this._renderer.uid];l&&((o=this._onUnload)==null||o.call(this,t,...n),l.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 pC(a,t,n,l,o,f,d,m=null){let g=0;n*=t,o*=f;const v=m.a,_=m.b,b=m.c,C=m.d,E=m.tx,M=m.ty;for(;g<d;){const z=a[n],R=a[n+1];l[o]=v*z+b*R+E,l[o+1]=_*z+C*R+M,o+=f,n+=t,g++}}function yC(a,t,n,l){let o=0;for(t*=n;o<l;)a[t]=0,a[t+1]=0,t+=n,o++}function U_(a,t,n,l,o){const f=t.a,d=t.b,m=t.c,g=t.d,v=t.tx,_=t.ty;n||(n=0),l||(l=2),o||(o=a.length/l-n);let b=n*l;for(let C=0;C<o;C++){const E=a[b],M=a[b+1];a[b]=f*E+m*M+v,a[b+1]=d*E+g*M+_,b+=l}}const gC=new le;class Z0{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,l=this.renderable;return l?qx(n,l.groupColor)+(this.alpha*l.groupAlpha*255<<24):n+(this.alpha*255<<24)}get transform(){var t;return((t=this.renderable)==null?void 0:t.groupTransform)||gC}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 td={extension:{type:Wt.ShapeBuilder,name:"circle"},build(a,t){let n,l,o,f,d,m;if(a.type==="circle"){const G=a;if(d=m=G.radius,d<=0)return!1;n=G.x,l=G.y,o=f=0}else if(a.type==="ellipse"){const G=a;if(d=G.halfWidth,m=G.halfHeight,d<=0||m<=0)return!1;n=G.x,l=G.y,o=f=0}else{const G=a,Q=G.width/2,V=G.height/2;n=G.x+Q,l=G.y+V,d=m=Math.max(0,Math.min(G.radius,Math.min(Q,V))),o=Q-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]=l+f,t[2]=t[4]=n-o,t[5]=t[7]=l-f,!0;let _=0,b=g*4+(o?2:0)+2,C=b,E=v,M=o+d,z=f,R=n+M,D=n-M,U=l+z;if(t[_++]=R,t[_++]=U,t[--b]=U,t[--b]=D,f){const G=l-z;t[C++]=D,t[C++]=G,t[--E]=G,t[--E]=R}for(let G=1;G<g;G++){const Q=Math.PI/2*(G/g),V=o+Math.cos(Q)*d,K=f+Math.sin(Q)*m,pt=n+V,ot=n-V,ft=l+K,ht=l-K;t[_++]=pt,t[_++]=ft,t[--b]=ft,t[--b]=ot,t[C++]=ot,t[C++]=ht,t[--E]=ht,t[--E]=pt}M=o,z=f+m,R=n+M,D=n-M,U=l+z;const B=l-z;return t[_++]=R,t[_++]=U,t[--E]=B,t[--E]=R,o&&(t[_++]=D,t[_++]=U,t[--E]=B,t[--E]=D),!0},triangulate(a,t,n,l,o,f){if(a.length===0)return;let d=0,m=0;for(let _=0;_<a.length;_+=2)d+=a[_],m+=a[_+1];d/=a.length/2,m/=a.length/2;let g=l;t[g*n]=d,t[g*n+1]=m;const v=g++;for(let _=0;_<a.length;_+=2)t[g*n]=a[_],t[g*n+1]=a[_+1],_>0&&(o[f++]=g,o[f++]=v,o[f++]=g-1),g++;o[f++]=v+1,o[f++]=v,o[f++]=g-1}},vC={...td,extension:{...td.extension,name:"ellipse"}},xC={...td,extension:{...td.extension,name:"roundedRectangle"}},B_=1e-4,hv=1e-4;function _C(a){const t=a.length;if(t<6)return 1;let n=0;for(let l=0,o=a[t-2],f=a[t-1];l<t;l+=2){const d=a[l],m=a[l+1];n+=(d-o)*(m+f),o=d,f=m}return n<0?-1:1}function dv(a,t,n,l,o,f,d,m){const g=a-n*o,v=t-l*o,_=a+n*f,b=t+l*f;let C,E;d?(C=l,E=-n):(C=-l,E=n);const M=g+C,z=v+E,R=_+C,D=b+E;return m.push(M,z),m.push(R,D),2}function Fr(a,t,n,l,o,f,d,m){const g=n-a,v=l-t;let _=Math.atan2(g,v),b=Math.atan2(o-a,f-t);m&&_<b?_+=Math.PI*2:!m&&_>b&&(b+=Math.PI*2);let C=_;const E=b-_,M=Math.abs(E),z=Math.sqrt(g*g+v*v),R=(15*M*Math.sqrt(z)/Math.PI>>0)+1,D=E/R;if(C+=D,m){d.push(a,t),d.push(n,l);for(let U=1,B=C;U<R;U++,B+=D)d.push(a,t),d.push(a+Math.sin(B)*z,t+Math.cos(B)*z);d.push(a,t),d.push(o,f)}else{d.push(n,l),d.push(a,t);for(let U=1,B=C;U<R;U++,B+=D)d.push(a+Math.sin(B)*z,t+Math.cos(B)*z),d.push(a,t);d.push(o,f),d.push(a,t)}return R*2}function SC(a,t,n,l,o,f){const d=B_;if(a.length===0)return;const m=t;let g=m.alignment;if(t.alignment!==.5){let et=_C(a);g=(g-.5)*et+.5}const v=new da(a[0],a[1]),_=new da(a[a.length-2],a[a.length-1]),b=l,C=Math.abs(v.x-_.x)<d&&Math.abs(v.y-_.y)<d;if(b){a=a.slice(),C&&(a.pop(),a.pop(),_.set(a[a.length-2],a[a.length-1]));const et=(v.x+_.x)*.5,dt=(_.y+v.y)*.5;a.unshift(et,dt),a.push(et,dt)}const E=o,M=a.length/2;let z=a.length;const R=E.length/2,D=m.width/2,U=D*D,B=m.miterLimit*m.miterLimit;let G=a[0],Q=a[1],V=a[2],K=a[3],pt=0,ot=0,ft=-(Q-K),ht=G-V,vt=0,_t=0,xt=Math.sqrt(ft*ft+ht*ht);ft/=xt,ht/=xt,ft*=D,ht*=D;const Dt=g,w=(1-Dt)*2,H=Dt*2;b||(m.cap==="round"?z+=Fr(G-ft*(w-H)*.5,Q-ht*(w-H)*.5,G-ft*w,Q-ht*w,G+ft*H,Q+ht*H,E,!0)+2:m.cap==="square"&&(z+=dv(G,Q,ft,ht,w,H,!0,E))),E.push(G-ft*w,Q-ht*w),E.push(G+ft*H,Q+ht*H);for(let et=1;et<M-1;++et){G=a[(et-1)*2],Q=a[(et-1)*2+1],V=a[et*2],K=a[et*2+1],pt=a[(et+1)*2],ot=a[(et+1)*2+1],ft=-(Q-K),ht=G-V,xt=Math.sqrt(ft*ft+ht*ht),ft/=xt,ht/=xt,ft*=D,ht*=D,vt=-(K-ot),_t=V-pt,xt=Math.sqrt(vt*vt+_t*_t),vt/=xt,_t/=xt,vt*=D,_t*=D;const dt=V-G,j=Q-K,I=V-pt,st=ot-K,yt=dt*I+j*st,Tt=j*I-st*dt,Ot=Tt<0;if(Math.abs(Tt)<.001*Math.abs(yt)){E.push(V-ft*w,K-ht*w),E.push(V+ft*H,K+ht*H),yt>=0&&(m.join==="round"?z+=Fr(V,K,V-ft*w,K-ht*w,V-vt*w,K-_t*w,E,!1)+4:z+=2,E.push(V-vt*H,K-_t*H),E.push(V+vt*w,K+_t*w));continue}const Bt=(-ft+G)*(-ht+K)-(-ft+V)*(-ht+Q),fe=(-vt+pt)*(-_t+K)-(-vt+V)*(-_t+ot),ce=(dt*fe-I*Bt)/Tt,pa=(st*Bt-j*fe)/Tt,ja=(ce-V)*(ce-V)+(pa-K)*(pa-K),Yn=V+(ce-V)*w,Fn=K+(pa-K)*w,pn=V-(ce-V)*H,In=K-(pa-K)*H,fs=Math.min(dt*dt+j*j,I*I+st*st),Ia=Ot?w:H,Wu=fs+Ia*Ia*U;ja<=Wu?m.join==="bevel"||ja/U>B?(Ot?(E.push(Yn,Fn),E.push(V+ft*H,K+ht*H),E.push(Yn,Fn),E.push(V+vt*H,K+_t*H)):(E.push(V-ft*w,K-ht*w),E.push(pn,In),E.push(V-vt*w,K-_t*w),E.push(pn,In)),z+=2):m.join==="round"?Ot?(E.push(Yn,Fn),E.push(V+ft*H,K+ht*H),z+=Fr(V,K,V+ft*H,K+ht*H,V+vt*H,K+_t*H,E,!0)+4,E.push(Yn,Fn),E.push(V+vt*H,K+_t*H)):(E.push(V-ft*w,K-ht*w),E.push(pn,In),z+=Fr(V,K,V-ft*w,K-ht*w,V-vt*w,K-_t*w,E,!1)+4,E.push(V-vt*w,K-_t*w),E.push(pn,In)):(E.push(Yn,Fn),E.push(pn,In)):(E.push(V-ft*w,K-ht*w),E.push(V+ft*H,K+ht*H),m.join==="round"?Ot?z+=Fr(V,K,V+ft*H,K+ht*H,V+vt*H,K+_t*H,E,!0)+2:z+=Fr(V,K,V-ft*w,K-ht*w,V-vt*w,K-_t*w,E,!1)+2:m.join==="miter"&&ja/U<=B&&(Ot?(E.push(pn,In),E.push(pn,In)):(E.push(Yn,Fn),E.push(Yn,Fn)),z+=2),E.push(V-vt*w,K-_t*w),E.push(V+vt*H,K+_t*H),z+=2)}G=a[(M-2)*2],Q=a[(M-2)*2+1],V=a[(M-1)*2],K=a[(M-1)*2+1],ft=-(Q-K),ht=G-V,xt=Math.sqrt(ft*ft+ht*ht),ft/=xt,ht/=xt,ft*=D,ht*=D,E.push(V-ft*w,K-ht*w),E.push(V+ft*H,K+ht*H),b||(m.cap==="round"?z+=Fr(V-ft*(w-H)*.5,K-ht*(w-H)*.5,V-ft*w,K-ht*w,V+ft*H,K+ht*H,E,!1)+2:m.cap==="square"&&(z+=dv(V,K,ft,ht,w,H,!1,E)));const at=hv*hv;for(let et=R;et<z+R-2;++et)G=E[et*2],Q=E[et*2+1],V=E[(et+1)*2],K=E[(et+1)*2+1],pt=E[(et+2)*2],ot=E[(et+2)*2+1],!(Math.abs(G*(K-ot)+V*(ot-Q)+pt*(Q-K))<at)&&f.push(et,et+1,et+2)}function bC(a,t,n,l){const o=B_;if(a.length===0)return;const f=a[0],d=a[1],m=a[a.length-2],g=a[a.length-1],v=t||Math.abs(f-m)<o&&Math.abs(d-g)<o,_=n,b=a.length/2,C=_.length/2;for(let E=0;E<b;E++)_.push(a[E*2]),_.push(a[E*2+1]);for(let E=0;E<b-1;E++)l.push(C+E,C+E+1);v&&l.push(C+b-1,C)}function w_(a,t,n,l,o,f,d){const m=f3(a,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*l;for(let v=0;v<a.length;v+=2)n[g]=a[v],n[g+1]=a[v+1],g+=l}const TC=[],EC={extension:{type:Wt.ShapeBuilder,name:"polygon"},build(a,t){for(let n=0;n<a.points.length;n++)t[n]=a.points[n];return!0},triangulate(a,t,n,l,o,f){w_(a,TC,t,n,l,o,f)}},CC={extension:{type:Wt.ShapeBuilder,name:"rectangle"},build(a,t){const n=a,l=n.x,o=n.y,f=n.width,d=n.height;return f>0&&d>0?(t[0]=l,t[1]=o,t[2]=l+f,t[3]=o,t[4]=l+f,t[5]=o+d,t[6]=l,t[7]=o+d,!0):!1},triangulate(a,t,n,l,o,f){let d=0;l*=n,t[l+d]=a[0],t[l+d+1]=a[1],d+=n,t[l+d]=a[2],t[l+d+1]=a[3],d+=n,t[l+d]=a[6],t[l+d+1]=a[7],d+=n,t[l+d]=a[4],t[l+d+1]=a[5],d+=n;const m=l/n;o[f++]=m,o[f++]=m+1,o[f++]=m+2,o[f++]=m+1,o[f++]=m+3,o[f++]=m+2}},AC={extension:{type:Wt.ShapeBuilder,name:"triangle"},build(a,t){return t[0]=a.x,t[1]=a.y,t[2]=a.x2,t[3]=a.y2,t[4]=a.x3,t[5]=a.y3,!0},triangulate(a,t,n,l,o,f){let d=0;l*=n,t[l+d]=a[0],t[l+d+1]=a[1],d+=n,t[l+d]=a[2],t[l+d+1]=a[3],d+=n,t[l+d]=a[4],t[l+d+1]=a[5];const m=l/n;o[f++]=m,o[f++]=m+1,o[f++]=m+2}},mv=[{offset:0,color:"white"},{offset:1,color:"black"}],J0=class x0{constructor(...t){this.uid=cn("fillGradient"),this._tick=0,this.type="linear",this.colorStops=[];let n=MC(t);n={...n.type==="radial"?x0.defaultRadialOptions:x0.defaultLinearOptions,...Rx(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:Rn.shared.setValue(n).toHexa()}),this}buildLinearGradient(){if(this.texture)return;let{x:t,y:n}=this.start,{x:l,y:o}=this.end,f=l-t,d=o-n;const m=f<0||d<0;if(this._wrapMode==="clamp-to-edge"){if(f<0){const R=t;t=l,l=R,f*=-1}if(d<0){const R=n;n=o,o=R,d*=-1}}const g=this.colorStops.length?this.colorStops:mv,v=this._textureSize,{canvas:_,context:b}=yv(v,1),C=m?b.createLinearGradient(this._textureSize,0,0,0):b.createLinearGradient(0,0,this._textureSize,0);pv(C,g),b.fillStyle=C,b.fillRect(0,0,v,1),this.texture=new ze({source:new op({resource:_,addressMode:this._wrapMode})});const E=Math.sqrt(f*f+d*d),M=Math.atan2(d,f),z=new le;z.scale(E/v,1),z.rotate(M),z.translate(t,n),this.textureSpace==="local"&&z.scale(v,v),this.transform=z}buildGradient(){this.texture||this._tick++,this.type==="linear"?this.buildLinearGradient():this.buildRadialGradient()}buildRadialGradient(){if(this.texture)return;const t=this.colorStops.length?this.colorStops:mv,n=this._textureSize,{canvas:l,context:o}=yv(n,n),{x:f,y:d}=this.center,{x:m,y:g}=this.outerCenter,v=this.innerRadius,_=this.outerRadius,b=m-_,C=g-_,E=n/(_*2),M=(f-b)*E,z=(d-C)*E,R=o.createRadialGradient(M,z,v*E,(m-b)*E,(g-C)*E,_*E);pv(R,t),o.fillStyle=t[t.length-1].color,o.fillRect(0,0,n,n),o.fillStyle=R,o.translate(M,z),o.rotate(this.rotation),o.scale(1,this.scale),o.translate(-M,-z),o.fillRect(0,0,n,n),this.texture=new ze({source:new op({resource:l,addressMode:this._wrapMode})});const D=new le;D.scale(1/E,1/E),D.translate(b,C),this.textureSpace==="local"&&D.scale(n,n),this.transform=D}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}`}};J0.defaultLinearOptions={start:{x:0,y:0},end:{x:0,y:1},colorStops:[],textureSpace:"local",type:"linear",textureSize:256,wrapMode:"clamp-to-edge"};J0.defaultRadialOptions={center:{x:.5,y:.5},innerRadius:0,outerRadius:.5,colorStops:[],scale:1,textureSpace:"local",type:"radial",textureSize:256,wrapMode:"clamp-to-edge"};let $s=J0;function pv(a,t){for(let n=0;n<t.length;n++){const l=t[n];a.addColorStop(l.offset,l.color)}}function yv(a,t){const n=mi.get().createCanvas(a,t),l=n.getContext("2d");return{canvas:n,context:l}}function MC(a){let t=a[0]??{};return(typeof t=="number"||a[1])&&(de("8.5.2","use options object instead"),t={type:"linear",start:{x:a[0],y:a[1]},end:{x:a[2],y:a[3]},textureSpace:a[4],textureSize:a[5]??$s.defaultLinearOptions.textureSize}),t}const RC=new le,zC=new on;function DC(a,t,n,l){const o=t.matrix?a.copyFrom(t.matrix).invert():a.identity();if(t.textureSpace==="local"){const d=n.getBounds(zC);t.width&&d.pad(t.width);const{x:m,y:g}=d,v=1/d.width,_=1/d.height,b=-m*v,C=-g*_,E=o.a,M=o.b,z=o.c,R=o.d;o.a*=v,o.b*=v,o.c*=_,o.d*=_,o.tx=b*E+C*z+o.tx,o.ty=b*M+C*R+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 $s)&&f.addressMode==="clamp-to-edge"&&(f.addressMode="repeat",f.update()),l&&o.append(RC.copyFrom(l).invert()),o}const Ap={};Ie.handleByMap(Wt.ShapeBuilder,Ap);Ie.add(CC,EC,AC,td,vC,xC);const OC=new on,NC=new le;function UC(a,t){const{geometryData:n,batches:l}=t;l.length=0,n.indices.length=0,n.vertices.length=0,n.uvs.length=0;for(let o=0;o<a.instructions.length;o++){const f=a.instructions[o];if(f.action==="texture")BC(f.data,l,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&&gv(v.shapePath,g,!0,l,n),v&&(m.shapePrimitives[m.shapePrimitives.length-1].holes=v.shapePath.shapePrimitives),gv(m,g,d,l,n)}}}function BC(a,t,n){const l=[],o=Ap.rectangle,f=OC;f.x=a.dx,f.y=a.dy,f.width=a.dw,f.height=a.dh;const d=a.transform;if(!o.build(f,l))return;const{vertices:m,uvs:g,indices:v}=n,_=v.length,b=m.length/2;d&&U_(l,d),o.triangulate(l,m,2,b,v,_);const C=a.image,E=C.uvs;g.push(E.x0,E.y0,E.x1,E.y1,E.x3,E.y3,E.x2,E.y2);const M=Fa.get(Z0);M.indexOffset=_,M.indexSize=v.length-_,M.attributeOffset=b,M.attributeSize=m.length/2-b,M.baseColor=a.style,M.alpha=a.alpha,M.texture=C,M.geometryData=n,t.push(M)}function gv(a,t,n,l,o){const{vertices:f,uvs:d,indices:m}=o;a.shapePrimitives.forEach(({shape:g,transform:v,holes:_})=>{const b=[],C=Ap[g.type];if(!C.build(g,b))return;const E=m.length,M=f.length/2;let z="triangle-list";if(v&&U_(b,v),n){const B=g.closePath??!0,G=t;G.pixelLine?(bC(b,B,f,m),z="line-list"):SC(b,G,!1,B,f,m)}else if(_){const B=[],G=b.slice();wC(_).forEach(V=>{B.push(G.length/2),G.push(...V)}),w_(G,B,f,2,M,m,E)}else C.triangulate(b,f,2,M,m,E);const R=d.length/2,D=t.texture;if(D!==ze.WHITE){const B=DC(NC,t,g,v);pC(f,2,M,d,R,2,f.length/2-M,B)}else yC(d,R,2,f.length/2-M);const U=Fa.get(Z0);U.indexOffset=E,U.indexSize=m.length-E,U.attributeOffset=M,U.attributeSize=f.length/2-M,U.baseColor=t.color,U.alpha=t.alpha,U.texture=D,U.geometryData=o,U.topology=z,l.push(U)})}function wC(a){const t=[];for(let n=0;n<a.length;n++){const l=a[n].shape,o=[];Ap[l.type].build(l,o)&&t.push(o)}return t}class HC{constructor(){this.batches=[],this.geometryData={vertices:[],uvs:[],indices:[]}}reset(){this.batches&&this.batches.forEach(t=>{Fa.return(t)}),this.graphicsData&&Fa.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 GC{constructor(){this.instructions=new j0}init(t){const n=t.maxTextures;this.batcher?this.batcher._updateMaxTextures(n):this.batcher=new mC({maxTextures:n}),this.instructions.reset()}get geometry(){return de(UT,"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 P0=class _0{constructor(t){this._renderer=t,this._managedContexts=new ld({renderer:t,type:"resource",name:"graphicsContext"})}init(t){_0.defaultOptions.bezierSmoothness=(t==null?void 0:t.bezierSmoothness)??_0.defaultOptions.bezierSmoothness}getContextRenderData(t){return t._gpuData[this._renderer.uid].graphicsData||this._initContextRenderData(t)}updateGpuContext(t){const n=!!t._gpuData[this._renderer.uid],l=t._gpuData[this._renderer.uid]||this._initContext(t);if(t.dirty||!n){n&&l.reset(),UC(t,l);const o=t.batchMode;t.customShader||o==="no-batch"?l.isBatchable=!1:o==="auto"?l.isBatchable=l.geometryData.vertices.length<400:l.isBatchable=!0,t.dirty=!1}return l}getGpuContext(t){return t._gpuData[this._renderer.uid]||this._initContext(t)}_initContextRenderData(t){const n=Fa.get(GC,{maxTextures:this._renderer.limits.maxBatchableTextures}),l=t._gpuData[this._renderer.uid],{batches:o,geometryData:f}=l;l.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 C=o[b];g.add(C)}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 _=g.batches;for(let b=0;b<_.length;b++){const C=_[b];C.bindGroup=C3(C.textures.textures,C.textures.count,this._renderer.limits.maxBatchableTextures)}return n}_initContext(t){const n=new HC;return n.context=t,t._gpuData[this._renderer.uid]=n,this._managedContexts.add(t),n}destroy(){this._managedContexts.destroy(),this._renderer=null}};P0.extension={type:[Wt.WebGLSystem,Wt.WebGPUSystem],name:"graphicsContext"};P0.defaultOptions={bezierSmoothness:.5};let W0=P0;const jC=8,Im=11920929e-14,qC=1;function H_(a,t,n,l,o,f,d,m,g,v){const b=Math.min(.99,Math.max(0,v??W0.defaultOptions.bezierSmoothness));let C=(qC-b)/1;return C*=C,YC(t,n,l,o,f,d,m,g,a,C),a}function YC(a,t,n,l,o,f,d,m,g,v){S0(a,t,n,l,o,f,d,m,g,v,0),g.push(d,m)}function S0(a,t,n,l,o,f,d,m,g,v,_){if(_>jC)return;const b=(a+n)/2,C=(t+l)/2,E=(n+o)/2,M=(l+f)/2,z=(o+d)/2,R=(f+m)/2,D=(b+E)/2,U=(C+M)/2,B=(E+z)/2,G=(M+R)/2,Q=(D+B)/2,V=(U+G)/2;if(_>0){let K=d-a,pt=m-t;const ot=Math.abs((n-d)*pt-(l-m)*K),ft=Math.abs((o-d)*pt-(f-m)*K);if(ot>Im&&ft>Im){if((ot+ft)*(ot+ft)<=v*(K*K+pt*pt)){g.push(Q,V);return}}else if(ot>Im){if(ot*ot<=v*(K*K+pt*pt)){g.push(Q,V);return}}else if(ft>Im){if(ft*ft<=v*(K*K+pt*pt)){g.push(Q,V);return}}else if(K=Q-(a+d)/2,pt=V-(t+m)/2,K*K+pt*pt<=v){g.push(Q,V);return}}S0(a,t,b,C,D,U,Q,V,g,v,_+1),S0(Q,V,B,G,z,R,d,m,g,v,_+1)}const LC=8,XC=11920929e-14,VC=1;function QC(a,t,n,l,o,f,d,m){const v=Math.min(.99,Math.max(0,m??W0.defaultOptions.bezierSmoothness));let _=(VC-v)/1;return _*=_,kC(t,n,l,o,f,d,a,_),a}function kC(a,t,n,l,o,f,d,m){b0(d,a,t,n,l,o,f,m,0),d.push(o,f)}function b0(a,t,n,l,o,f,d,m,g){if(g>LC)return;const v=(t+l)/2,_=(n+o)/2,b=(l+f)/2,C=(o+d)/2,E=(v+b)/2,M=(_+C)/2;let z=f-t,R=d-n;const D=Math.abs((l-f)*R-(o-d)*z);if(D>XC){if(D*D<=m*(z*z+R*R)){a.push(E,M);return}}else if(z=E-(t+f)/2,R=M-(n+d)/2,z*z+R*R<=m){a.push(E,M);return}b0(a,t,n,v,_,E,M,m,g+1),b0(a,E,M,b,C,f,d,m,g+1)}function G_(a,t,n,l,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(l,1/3)*(g/Math.PI)))),m=Math.max(m,3);let v=g/m,_=o;v*=d?-1:1;for(let b=0;b<m+1;b++){const C=Math.cos(_),E=Math.sin(_),M=t+C*l,z=n+E*l;a.push(M,z),_+=v}}function KC(a,t,n,l,o,f){const d=a[a.length-2],g=a[a.length-1]-n,v=d-t,_=o-n,b=l-t,C=Math.abs(g*b-v*_);if(C<1e-8||f===0){(a[a.length-2]!==t||a[a.length-1]!==n)&&a.push(t,n);return}const E=g*g+v*v,M=_*_+b*b,z=g*_+v*b,R=f*Math.sqrt(E)/C,D=f*Math.sqrt(M)/C,U=R*z/E,B=D*z/M,G=R*b+D*v,Q=R*_+D*g,V=v*(D+U),K=g*(D+U),pt=b*(R+B),ot=_*(R+B),ft=Math.atan2(K-Q,V-G),ht=Math.atan2(ot-Q,pt-G);G_(a,G+t,Q+n,f,ft,ht,v*_>b*g)}const Zh=Math.PI*2,ky={centerX:0,centerY:0,ang1:0,ang2:0},Ky=({x:a,y:t},n,l,o,f,d,m,g)=>{a*=n,t*=l;const v=o*a-f*t,_=f*a+o*t;return g.x=v+d,g.y=_+m,g};function ZC(a,t){const n=t===-1.5707963267948966?-.551915024494:1.3333333333333333*Math.tan(t/4),l=t===1.5707963267948966?.551915024494:n,o=Math.cos(a),f=Math.sin(a),d=Math.cos(a+t),m=Math.sin(a+t);return[{x:o-f*l,y:f+o*l},{x:d+m*l,y:m-d*l},{x:d,y:m}]}const vv=(a,t,n,l)=>{const o=a*l-t*n<0?-1:1;let f=a*n+t*l;return f>1&&(f=1),f<-1&&(f=-1),o*Math.acos(f)},JC=(a,t,n,l,o,f,d,m,g,v,_,b,C)=>{const E=Math.pow(o,2),M=Math.pow(f,2),z=Math.pow(_,2),R=Math.pow(b,2);let D=E*M-E*R-M*z;D<0&&(D=0),D/=E*R+M*z,D=Math.sqrt(D)*(d===m?-1:1);const U=D*o/f*b,B=D*-f/o*_,G=v*U-g*B+(a+n)/2,Q=g*U+v*B+(t+l)/2,V=(_-U)/o,K=(b-B)/f,pt=(-_-U)/o,ot=(-b-B)/f,ft=vv(1,0,V,K);let ht=vv(V,K,pt,ot);m===0&&ht>0&&(ht-=Zh),m===1&&ht<0&&(ht+=Zh),C.centerX=G,C.centerY=Q,C.ang1=ft,C.ang2=ht};function PC(a,t,n,l,o,f,d,m=0,g=0,v=0){if(f===0||d===0)return;const _=Math.sin(m*Zh/360),b=Math.cos(m*Zh/360),C=b*(t-l)/2+_*(n-o)/2,E=-_*(t-l)/2+b*(n-o)/2;if(C===0&&E===0)return;f=Math.abs(f),d=Math.abs(d);const M=Math.pow(C,2)/Math.pow(f,2)+Math.pow(E,2)/Math.pow(d,2);M>1&&(f*=Math.sqrt(M),d*=Math.sqrt(M)),JC(t,n,l,o,f,d,g,v,_,b,C,E,ky);let{ang1:z,ang2:R}=ky;const{centerX:D,centerY:U}=ky;let B=Math.abs(R)/(Zh/4);Math.abs(1-B)<1e-7&&(B=1);const G=Math.max(Math.ceil(B),1);R/=G;let Q=a[a.length-2],V=a[a.length-1];const K={x:0,y:0};for(let pt=0;pt<G;pt++){const ot=ZC(z,R),{x:ft,y:ht}=Ky(ot[0],f,d,b,_,D,U,K),{x:vt,y:_t}=Ky(ot[1],f,d,b,_,D,U,K),{x:xt,y:Dt}=Ky(ot[2],f,d,b,_,D,U,K);H_(a,Q,V,ft,ht,vt,_t,xt,Dt),Q=xt,V=Dt,z+=R}}function WC(a,t,n){const l=(d,m)=>{const g=m.x-d.x,v=m.y-d.y,_=Math.sqrt(g*g+v*v),b=g/_,C=v/_;return{len:_,nx:b,ny:C}},o=(d,m)=>{d===0?a.moveTo(m.x,m.y):a.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],_=l(m,f),b=l(m,v);if(_.len<1e-4||b.len<1e-4){o(d,m),f=m;continue}let C=Math.asin(_.nx*b.ny-_.ny*b.nx),E=1,M=!1;_.nx*b.nx-_.ny*-b.ny<0?C<0?C=Math.PI+C:(C=Math.PI-C,E=-1,M=!0):C>0&&(E=-1,M=!0);const z=C/2;let R,D=Math.abs(Math.cos(z)*g/Math.sin(z));D>Math.min(_.len/2,b.len/2)?(D=Math.min(_.len/2,b.len/2),R=Math.abs(D*Math.sin(z)/Math.cos(z))):R=g;const U=m.x+b.nx*D+-b.ny*R*E,B=m.y+b.ny*D+b.nx*R*E,G=Math.atan2(_.ny,_.nx)+Math.PI/2*E,Q=Math.atan2(b.ny,b.nx)-Math.PI/2*E;d===0&&a.moveTo(U+Math.cos(G)*R,B+Math.sin(G)*R),a.arc(U,B,R,G,Q,M),f=m}}function FC(a,t,n,l){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?a.moveTo(g.x,g.y):a.lineTo(g.x,g.y);continue}const _=t[m],b=t[(m+2)%d],C=o(_,g);let E;if(C<1e-4)E=g;else{const R=Math.min(C/2,v);E=f(g,_,R/C)}const M=o(b,g);let z;if(M<1e-4)z=g;else{const R=Math.min(M/2,v);z=f(g,b,R/M)}m===0?a.moveTo(E.x,E.y):a.lineTo(E.x,E.y),a.quadraticCurveTo(g.x,g.y,z.x,z.y,l)}}const IC=new on;class $C{constructor(t){this.shapePrimitives=[],this._currentPoly=null,this._bounds=new ki,this._graphicsPath2D=t,this.signed=t.checkForHoles}moveTo(t,n){return this.startPoly(t,n),this}lineTo(t,n){this._ensurePoly();const l=this._currentPoly.points,o=l[l.length-2],f=l[l.length-1];return(o!==t||f!==n)&&l.push(t,n),this}arc(t,n,l,o,f,d){this._ensurePoly(!1);const m=this._currentPoly.points;return G_(m,t,n,l,o,f,d),this}arcTo(t,n,l,o,f){this._ensurePoly();const d=this._currentPoly.points;return KC(d,t,n,l,o,f),this}arcToSvg(t,n,l,o,f,d,m){const g=this._currentPoly.points;return PC(g,this._currentPoly.lastX,this._currentPoly.lastY,d,m,t,n,l,o,f),this}bezierCurveTo(t,n,l,o,f,d,m){this._ensurePoly();const g=this._currentPoly;return H_(this._currentPoly.points,g.lastX,g.lastY,t,n,l,o,f,d,m),this}quadraticCurveTo(t,n,l,o,f){this._ensurePoly();const d=this._currentPoly;return QC(this._currentPoly.points,d.lastX,d.lastY,t,n,l,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 l=this.shapePrimitives,o=l.length;for(let f=0;f<t.instructions.length;f++){const d=t.instructions[f];this[d.action](...d.data)}if(t.checkForHoles&&l.length-o>1){let f=null;for(let d=o;d<l.length;d++){const m=l[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),l.copyWithin(d,d+1),l.length--,d--):f=m}}}return this}finish(t=!1){this.endPoly(t)}rect(t,n,l,o,f){return this.drawShape(new on(t,n,l,o),f),this}circle(t,n,l,o){return this.drawShape(new Q0(t,n,l),o),this}poly(t,n,l){const o=new kh(t);return o.closePath=n,this.drawShape(o,l),this}regularPoly(t,n,l,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 _=0;_<o;_++){const b=m-_*g;v.push(t+l*Math.cos(b),n+l*Math.sin(b))}return this.poly(v,!0,d),this}roundPoly(t,n,l,o,f,d=0,m){if(o=Math.max(o|0,3),f<=0)return this.regularPoly(t,n,l,o,d);const g=l*Math.sin(Math.PI/o)-.001;f=Math.min(f,g);const v=-1*Math.PI/2+d,_=Math.PI*2/o,b=(o-2)*Math.PI/o/2;for(let C=0;C<o;C++){const E=C*_+v,M=t+l*Math.cos(E),z=n+l*Math.sin(E),R=E+Math.PI+b,D=E-Math.PI-b,U=M+f*Math.cos(R),B=z+f*Math.sin(R),G=M+f*Math.cos(D),Q=z+f*Math.sin(D);C===0?this.moveTo(U,B):this.lineTo(U,B),this.quadraticCurveTo(M,z,G,Q,m)}return this.closePath()}roundShape(t,n,l=!1,o){return t.length<3?this:(l?FC(this,t,n,o):WC(this,t,n),this.closePath())}filletRect(t,n,l,o,f){if(f===0)return this.rect(t,n,l,o);const d=Math.min(l,o)/2,m=Math.min(d,Math.max(-d,f)),g=t+l,v=n+o,_=m<0?-m:0,b=Math.abs(m);return this.moveTo(t,n+b).arcTo(t+_,n+_,t+b,n,b).lineTo(g-b,n).arcTo(g-_,n+_,g,n+b,b).lineTo(g,v-b).arcTo(g-_,v-_,t+l-b,v,b).lineTo(t+b,v).arcTo(t+_,v-_,t,v-b,b).closePath()}chamferRect(t,n,l,o,f,d){if(f<=0)return this.rect(t,n,l,o);const m=Math.min(f,Math.min(l,o)/2),g=t+l,v=n+o,_=[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=_.length-1;b>=2;b-=2)_[b]===_[b-2]&&_[b-1]===_[b-3]&&_.splice(b-1,2);return this.poly(_,!0,d)}ellipse(t,n,l,o,f){return this.drawShape(new k0(t,n,l,o),f),this}roundRect(t,n,l,o,f,d){return this.drawShape(new K0(t,n,l,o,f),d),this}drawShape(t,n){return this.endPoly(),this.shapePrimitives.push({shape:t,transform:n}),this}startPoly(t,n){let l=this._currentPoly;return l&&this.endPoly(),l=new kh,l.points.push(t,n),this._currentPoly=l,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 kh,t)){const n=this.shapePrimitives[this.shapePrimitives.length-1];if(n){let l=n.shape.x,o=n.shape.y;if(n.transform&&!n.transform.isIdentity()){const f=n.transform,d=l;l=f.a*l+f.c*o+f.tx,o=f.b*d+f.d*o+f.ty}this._currentPoly.points.push(l,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 l=t.instructions[n];this[l.action](...l.data)}this.finish()}get bounds(){const t=this._bounds;t.clear();const n=this.shapePrimitives;for(let l=0;l<n.length;l++){const o=n[l],f=o.shape.getBounds(IC);o.transform?t.addRect(f,o.transform):t.addRect(f)}return t}}class Fs{constructor(t,n=!1){this.instructions=[],this.uid=cn("graphicsPath"),this._dirty=!0,this.checkForHoles=n,typeof t=="string"?S3(t,this):this.instructions=(t==null?void 0:t.slice())??[]}get shapePath(){return this._shapePath||(this._shapePath=new $C(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,l,o,f){const d=this.instructions[this.instructions.length-1],m=this.getLastPoint(da.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 _=m.x,b=m.y;g=_+(_-g),v=b+(b-v)}return this.instructions.push({action:"bezierCurveTo",data:[g,v,t,n,l,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,l){const o=this.instructions[this.instructions.length-1],f=this.getLastPoint(da.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,l]}),this._dirty=!0,this}rect(t,n,l,o,f){return this.instructions.push({action:"rect",data:[t,n,l,o,f]}),this._dirty=!0,this}circle(t,n,l,o){return this.instructions.push({action:"circle",data:[t,n,l,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,l,o,f,d,m){f||(f=o/2);const g=-1*Math.PI/2+d,v=l*2,_=Math.PI*2/v,b=[];for(let C=0;C<v;C++){const E=C%2?f:o,M=C*_+g;b.push(t+E*Math.cos(M),n+E*Math.sin(M))}return this.poly(b,!0,m),this}clone(t=!1){const n=new Fs;if(n.checkForHoles=this.checkForHoles,!t)n.instructions=this.instructions.slice();else for(let l=0;l<this.instructions.length;l++){const o=this.instructions[l];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,l=t.b,o=t.c,f=t.d,d=t.tx,m=t.ty;let g=0,v=0,_=0,b=0,C=0,E=0,M=0,z=0;for(let R=0;R<this.instructions.length;R++){const D=this.instructions[R],U=D.data;switch(D.action){case"moveTo":case"lineTo":g=U[0],v=U[1],U[0]=n*g+o*v+d,U[1]=l*g+f*v+m;break;case"bezierCurveTo":_=U[0],b=U[1],C=U[2],E=U[3],g=U[4],v=U[5],U[0]=n*_+o*b+d,U[1]=l*_+f*b+m,U[2]=n*C+o*E+d,U[3]=l*C+f*E+m,U[4]=n*g+o*v+d,U[5]=l*g+f*v+m;break;case"quadraticCurveTo":_=U[0],b=U[1],g=U[2],v=U[3],U[0]=n*_+o*b+d,U[1]=l*_+f*b+m,U[2]=n*g+o*v+d,U[3]=l*g+f*v+m;break;case"arcToSvg":g=U[5],v=U[6],M=U[0],z=U[1],U[0]=n*M+o*z,U[1]=l*M+f*z,U[5]=n*g+o*v+d,U[6]=l*g+f*v+m;break;case"circle":U[4]=Gh(U[3],t);break;case"rect":U[4]=Gh(U[4],t);break;case"ellipse":U[8]=Gh(U[8],t);break;case"roundRect":U[5]=Gh(U[5],t);break;case"addPath":U[0].transform(t);break;case"poly":U[2]=Gh(U[2],t);break;default:Ga("unknown transform action",D.action);break}}return this._dirty=!0,this}get bounds(){return this.shapePath.bounds}getLastPoint(t){let n=this.instructions.length-1,l=this.instructions[n];if(!l)return t.x=0,t.y=0,t;for(;l.action==="closePath";){if(n--,n<0)return t.x=0,t.y=0,t;l=this.instructions[n]}switch(l.action){case"moveTo":case"lineTo":t.x=l.data[0],t.y=l.data[1];break;case"quadraticCurveTo":t.x=l.data[2],t.y=l.data[3];break;case"bezierCurveTo":t.x=l.data[4],t.y=l.data[5];break;case"arc":case"arcToSvg":t.x=l.data[5],t.y=l.data[6];break;case"addPath":l.data[0].getLastPoint(t);break}return t}}function Gh(a,t){return a?a.prepend(t):t.clone()}function un(a,t,n){const l=a.getAttribute(t);return l?Number(l):n}function tA(a,t){const n=a.querySelectorAll("defs");for(let l=0;l<n.length;l++){const o=n[l];for(let f=0;f<o.children.length;f++){const d=o.children[f];switch(d.nodeName.toLowerCase()){case"lineargradient":t.defs[d.id]=eA(d);break;case"radialgradient":t.defs[d.id]=nA();break}}}}function eA(a){const t=un(a,"x1",0),n=un(a,"y1",0),l=un(a,"x2",1),o=un(a,"y2",0),f=a.getAttribute("gradientUnits")||"objectBoundingBox",d=new $s(t,n,l,o,f==="objectBoundingBox"?"local":"global");for(let m=0;m<a.children.length;m++){const g=a.children[m],v=un(g,"offset",0),_=Rn.shared.setValue(g.getAttribute("stop-color")).toNumber();d.addColorStop(v,_)}return d}function nA(a){return Ga("[SVG Parser] Radial gradients are not yet supported"),new $s(0,0,1,0)}function xv(a){const t=a.match(/url\s*\(\s*['"]?\s*#([^'"\s)]+)\s*['"]?\s*\)/i);return t?t[1]:""}const _v={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 j_(a,t){const n=a.getAttribute("style"),l={},o={},f={strokeStyle:l,fillStyle:o,useFill:!1,useStroke:!1};for(const d in _v){const m=a.getAttribute(d);m&&Sv(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,_]=g.split(":");_v[v]&&Sv(t,f,v,_.trim())}}return{strokeStyle:f.useStroke?l:null,fillStyle:f.useFill?o:null,useFill:f.useFill,useStroke:f.useStroke}}function Sv(a,t,n,l){switch(n){case"stroke":if(l!=="none"){if(l.startsWith("url(")){const o=xv(l);t.strokeStyle.fill=a.defs[o]}else t.strokeStyle.color=Rn.shared.setValue(l).toNumber();t.useStroke=!0}break;case"stroke-width":t.strokeStyle.width=Number(l);break;case"fill":if(l!=="none"){if(l.startsWith("url(")){const o=xv(l);t.fillStyle.fill=a.defs[o]}else t.fillStyle.color=Rn.shared.setValue(l).toNumber();t.useFill=!0}break;case"fill-opacity":t.fillStyle.alpha=Number(l);break;case"stroke-opacity":t.strokeStyle.alpha=Number(l);break;case"opacity":t.fillStyle.alpha=Number(l),t.strokeStyle.alpha=Number(l);break}}function aA(a){if(a.length<=2)return!0;const t=a.map(m=>m.area).sort((m,g)=>g-m),[n,l]=t,o=t[t.length-1],f=n/l,d=l/o;return!(f>3&&d<2)}function iA(a){return a.split(/(?=[Mm])/).filter(l=>l.trim().length>0)}function lA(a){const t=a.match(/[-+]?[0-9]*\.?[0-9]+/g);if(!t||t.length<4)return 0;const n=t.map(Number),l=[],o=[];for(let _=0;_<n.length;_+=2)_+1<n.length&&(l.push(n[_]),o.push(n[_+1]));if(l.length===0||o.length===0)return 0;const f=Math.min(...l),d=Math.max(...l),m=Math.min(...o),g=Math.max(...o);return(d-f)*(g-m)}function bv(a,t){const n=new Fs(a,!1);for(const l of n.instructions)t.instructions.push(l)}function sA(a,t){if(typeof a=="string"){const d=document.createElement("div");d.innerHTML=a.trim(),a=d.querySelector("svg")}const n={context:t,defs:{},path:new Fs};tA(a,n);const l=a.children,{fillStyle:o,strokeStyle:f}=j_(a,n);for(let d=0;d<l.length;d++){const m=l[d];m.nodeName.toLowerCase()!=="defs"&&q_(m,n,o,f)}return t}function q_(a,t,n,l){const o=a.children,{fillStyle:f,strokeStyle:d}=j_(a,t);f&&n?n={...n,...f}:f&&(n=f),d&&l?l={...l,...d}:d&&(l=d);const m=!n&&!l;m&&(n={color:0});let g,v,_,b,C,E,M,z,R,D,U,B,G,Q,V,K,pt;switch(a.nodeName.toLowerCase()){case"path":{Q=a.getAttribute("d");const ot=a.getAttribute("fill-rule"),ft=iA(Q),ht=ot==="evenodd",vt=ft.length>1;if(ht&&vt){const xt=ft.map(w=>({path:w,area:lA(w)}));if(xt.sort((w,H)=>H.area-w.area),ft.length>3||!aA(xt))for(let w=0;w<xt.length;w++){const H=xt[w],at=w===0;t.context.beginPath();const et=new Fs(void 0,!0);bv(H.path,et),t.context.path(et),at?(n&&t.context.fill(n),l&&t.context.stroke(l)):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 Fs(void 0,!0);bv(H.path,et),t.context.path(et),at?t.context.cut():(n&&t.context.fill(n),l&&t.context.stroke(l))}}else{const xt=ot?ot==="evenodd":!0;V=new Fs(Q,xt),t.context.path(V),n&&t.context.fill(n),l&&t.context.stroke(l)}break}case"circle":M=un(a,"cx",0),z=un(a,"cy",0),R=un(a,"r",0),t.context.ellipse(M,z,R,R),n&&t.context.fill(n),l&&t.context.stroke(l);break;case"rect":g=un(a,"x",0),v=un(a,"y",0),K=un(a,"width",0),pt=un(a,"height",0),D=un(a,"rx",0),U=un(a,"ry",0),D||U?t.context.roundRect(g,v,K,pt,D||U):t.context.rect(g,v,K,pt),n&&t.context.fill(n),l&&t.context.stroke(l);break;case"ellipse":M=un(a,"cx",0),z=un(a,"cy",0),D=un(a,"rx",0),U=un(a,"ry",0),t.context.beginPath(),t.context.ellipse(M,z,D,U),n&&t.context.fill(n),l&&t.context.stroke(l);break;case"line":_=un(a,"x1",0),b=un(a,"y1",0),C=un(a,"x2",0),E=un(a,"y2",0),t.context.beginPath(),t.context.moveTo(_,b),t.context.lineTo(C,E),l&&t.context.stroke(l);break;case"polygon":G=a.getAttribute("points"),B=G.match(/-?\d+/g).map(ot=>parseInt(ot,10)),t.context.poly(B,!0),n&&t.context.fill(n),l&&t.context.stroke(l);break;case"polyline":G=a.getAttribute("points"),B=G.match(/-?\d+/g).map(ot=>parseInt(ot,10)),t.context.poly(B,!1),l&&t.context.stroke(l);break;case"g":case"svg":break;default:{Ga(`[SVG parser] <${a.nodeName}> elements unsupported`);break}}m&&(n=null);for(let ot=0;ot<o.length;ot++)q_(o[ot],t,n,l)}const Tv={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 Mp{constructor(t,n){this.uid=cn("fillPattern"),this._tick=0,this.transform=new le,this.texture=t,this.transform.scale(1/t.frame.width,1/t.frame.height),n&&(t.source.style.addressModeU=Tv[n].addressModeU,t.source.style.addressModeV=Tv[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 uA(a){return Rn.isColorLike(a)}function Ev(a){return a instanceof Mp}function Cv(a){return a instanceof $s}function rA(a){return a instanceof ze}function oA(a,t,n){const l=Rn.shared.setValue(t??0);return a.color=l.toNumber(),a.alpha=l.alpha===1?n.alpha:l.alpha,a.texture=ze.WHITE,{...n,...a}}function cA(a,t,n){return a.texture=t,{...n,...a}}function Av(a,t,n){return a.fill=t,a.color=16777215,a.texture=t.texture,a.matrix=t.transform,{...n,...a}}function Mv(a,t,n){return t.buildGradient(),a.fill=t,a.color=16777215,a.texture=t.texture,a.matrix=t.transform,a.textureSpace=t.textureSpace,{...n,...a}}function fA(a,t){const n={...t,...a},l=Rn.shared.setValue(n.color);return n.alpha*=l.alpha,n.color=l.toNumber(),n}function so(a,t){if(a==null)return null;const n={},l=a;return uA(a)?oA(n,a,t):rA(a)?cA(n,a,t):Ev(a)?Av(n,a,t):Cv(a)?Mv(n,a,t):l.fill&&Ev(l.fill)?Av(l,l.fill,t):l.fill&&Cv(l.fill)?Mv(l,l.fill,t):fA(l,t)}function hp(a,t){const{width:n,alignment:l,miterLimit:o,cap:f,join:d,pixelLine:m,...g}=t,v=so(a,g);return v?{width:n,alignment:l,miterLimit:o,cap:f,join:d,pixelLine:m,...v}:null}function hA(a,t){let n=1;const l=a.shapePath.shapePrimitives;for(let o=0;o<l.length;o++){const f=l[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 _=(v-2+m)%m,b=(v+2)%m,C=d[_],E=d[_+1],M=d[v],z=d[v+1],R=d[b],D=d[b+1],U=C-M,B=E-z,G=R-M,Q=D-z,V=U*U+B*B,K=G*G+Q*Q;if(V<1e-12||K<1e-12)continue;let ft=(U*G+B*Q)/Math.sqrt(V*K);ft<-1?ft=-1:ft>1&&(ft=1);const ht=Math.sqrt((1-ft)*.5);if(ht<1e-6)continue;const vt=Math.min(1/ht,t);vt>n&&(n=vt)}}return n}const dA=new da,Rv=new le,F0=class us extends cs{constructor(){super(...arguments),this._gpuData=Object.create(null),this.autoGarbageCollect=!0,this._gcLastUsed=-1,this.uid=cn("graphicsContext"),this.dirty=!0,this.batchMode="auto",this.instructions=[],this.destroyed=!1,this._activePath=new Fs,this._transform=new le,this._fillStyle={...us.defaultFillStyle},this._strokeStyle={...us.defaultStrokeStyle},this._stateStack=[],this._tick=0,this._bounds=new ki,this._boundsDirty=!0}clone(){const t=new us;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=so(t,us.defaultFillStyle)}get strokeStyle(){return this._strokeStyle}set strokeStyle(t){this._strokeStyle=hp(t,us.defaultStrokeStyle)}setFillStyle(t){return this._fillStyle=so(t,us.defaultFillStyle),this}setStrokeStyle(t){return this._strokeStyle=so(t,us.defaultStrokeStyle),this}texture(t,n,l,o,f,d){return this.instructions.push({action:"texture",data:{image:t,dx:l||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?Rn.shared.setValue(n).toNumber():16777215}}),this.onUpdate(),this}beginPath(){return this._activePath=new Fs,this}fill(t,n){let l;const o=this.instructions[this.instructions.length-1];return this._tick===0&&(o==null?void 0:o.action)==="stroke"?l=o.data.path:l=this._activePath.clone(),l?(t!=null&&(n!==void 0&&typeof t=="number"&&(de(rn,"GraphicsContext.fill(color, alpha) is deprecated, use GraphicsContext.fill({ color, alpha }) instead"),t={color:t,alpha:n}),this._fillStyle=so(t,us.defaultFillStyle)),this.instructions.push({action:"fill",data:{style:this.fillStyle,path:l}}),this.onUpdate(),this._initNextPathLocation(),this._tick=0,this):this}_initNextPathLocation(){const{x:t,y:n}=this._activePath.getLastPoint(da.shared);this._activePath.clear(),this._activePath.moveTo(t,n)}stroke(t){let n;const l=this.instructions[this.instructions.length-1];return this._tick===0&&(l==null?void 0:l.action)==="fill"?n=l.data.path:n=this._activePath.clone(),n?(t!=null&&(this._strokeStyle=hp(t,us.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],l=this._activePath.clone();if(n&&(n.action==="stroke"||n.action==="fill"))if(n.data.hole)n.data.hole.addPath(l);else{n.data.hole=l;break}}return this._initNextPathLocation(),this}arc(t,n,l,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,l,o,f,d),this}arcTo(t,n,l,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*l+d.c*o+d.tx,d.b*l+d.d*o+d.ty,f),this}arcToSvg(t,n,l,o,f,d,m){this._tick++;const g=this._transform;return this._activePath.arcToSvg(t,n,l,o,f,g.a*d+g.c*m+g.tx,g.b*d+g.d*m+g.ty),this}bezierCurveTo(t,n,l,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*l+g.c*o+g.tx,g.b*l+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,l,o){return this._tick++,this._activePath.ellipse(t,n,l,o,this._transform.clone()),this}circle(t,n,l){return this._tick++,this._activePath.circle(t,n,l,this._transform.clone()),this}path(t){return this._tick++,this._activePath.addPath(t,this._transform.clone()),this}lineTo(t,n){this._tick++;const l=this._transform;return this._activePath.lineTo(l.a*t+l.c*n+l.tx,l.b*t+l.d*n+l.ty),this}moveTo(t,n){this._tick++;const l=this._transform,o=this._activePath.instructions,f=l.a*t+l.c*n+l.tx,d=l.b*t+l.d*n+l.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,l,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*l+d.c*o+d.tx,d.b*l+d.d*o+d.ty,f),this}rect(t,n,l,o){return this._tick++,this._activePath.rect(t,n,l,o,this._transform.clone()),this}roundRect(t,n,l,o,f){return this._tick++,this._activePath.roundRect(t,n,l,o,f,this._transform.clone()),this}poly(t,n){return this._tick++,this._activePath.poly(t,n,this._transform.clone()),this}regularPoly(t,n,l,o,f=0,d){return this._tick++,this._activePath.regularPoly(t,n,l,o,f,d),this}roundPoly(t,n,l,o,f,d){return this._tick++,this._activePath.roundPoly(t,n,l,o,f,d),this}roundShape(t,n,l,o){return this._tick++,this._activePath.roundShape(t,n,l,o),this}filletRect(t,n,l,o,f){return this._tick++,this._activePath.filletRect(t,n,l,o,f),this}chamferRect(t,n,l,o,f,d){return this._tick++,this._activePath.chamferRect(t,n,l,o,f,d),this}star(t,n,l,o,f=0,d=0){return this._tick++,this._activePath.star(t,n,l,o,f,d,this._transform.clone()),this}svg(t){return this._tick++,sA(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,l,o,f,d){return t instanceof le?(this._transform.set(t.a,t.b,t.c,t.d,t.tx,t.ty),this):(this._transform.set(t,n,l,o,f,d),this)}transform(t,n,l,o,f,d){return t instanceof le?(this._transform.append(t),this):(Rv.set(t,n,l,o,f,d),this._transform.append(Rv),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 l=this.instructions[n],o=l.action;if(o==="fill"){const f=l.data;t.addBounds(f.path.bounds)}else if(o==="texture"){const f=l.data;t.addFrame(f.dx,f.dy,f.dx+f.dw,f.dy+f.dh,f.transform)}if(o==="stroke"){const f=l.data,d=f.style.alignment;let m=f.style.width*(1-d);f.style.join==="miter"&&(m*=hA(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 l=!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,_=g.shapePath.shapePrimitives;for(let b=0;b<_.length;b++){const C=_[b].shape;if(!v||!C)continue;const E=_[b].transform,M=E?E.applyInverse(t,dA):t;if(d.action==="fill")l=C.contains(M.x,M.y);else{const R=v;l=C.strokeContains(M.x,M.y,R.width,R.alignment)}const z=m.hole;if(z){const R=(o=z.shapePath)==null?void 0:o.shapePrimitives;if(R)for(let D=0;D<R.length;D++)R[D].shape.contains(M.x,M.y)&&(l=!1)}if(l)return!0}}return l}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 l=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(l)),this._strokeStyle.texture&&(this._strokeStyle.fill&&"uid"in this._strokeStyle.fill?this._strokeStyle.fill.destroy():this._strokeStyle.texture.destroy(l))}this._fillStyle=null,this._strokeStyle=null,this.instructions=null,this._activePath=null,this._bounds=null,this._stateStack=null,this.customShader=null,this._transform=null}};F0.defaultFillStyle={color:16777215,alpha:1,texture:ze.WHITE,matrix:null,fill:null,textureSpace:"local"};F0.defaultStrokeStyle={width:1,color:16777215,alpha:1,alignment:.5,miterLimit:10,cap:"butt",join:"miter",texture:ze.WHITE,matrix:null,fill:null,textureSpace:"local",pixelLine:!1};let Sl=F0;class mA{constructor(){this.isBatchable=!1}reset(){this.isBatchable=!1,this.context=null,this.graphicsData&&(this.graphicsData.destroy(),this.graphicsData=null)}destroy(){this.reset()}}class pA{constructor(){this.instructions=new j0}init(){this.instructions.reset()}destroy(){this.instructions.destroy(),this.instructions=null}}const I0=class T0{constructor(t){this._renderer=t,this._managedContexts=new ld({renderer:t,type:"resource",name:"graphicsContext"})}init(t){T0.defaultOptions.bezierSmoothness=(t==null?void 0:t.bezierSmoothness)??T0.defaultOptions.bezierSmoothness}getContextRenderData(t){return this.getGpuContext(t).graphicsData||this._initContextRenderData(t)}updateGpuContext(t){const n=t._gpuData,l=!!n[this._renderer.uid],o=n[this._renderer.uid]||this._initContext(t);return(t.dirty||!l)&&(l&&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 pA,l=this.getGpuContext(t);return l.graphicsData=n,n.init(),n}_initContext(t){const n=new mA;return n.context=t,t._gpuData[this._renderer.uid]=n,this._managedContexts.add(t),n}destroy(){this._managedContexts.destroy(),this._renderer=null}};I0.extension={type:[Wt.CanvasSystem],name:"graphicsContext"};I0.defaultOptions={bezierSmoothness:.5};let yA=I0;class Y_{constructor(t,n){this.state=X0.for2d(),this.renderer=t,this._adaptor=n,this.renderer.runners.contextChange.add(this),this._managedGraphics=new ld({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}}Y_.extension={type:[Wt.CanvasPipes],name:"graphics"};function gA(a,t,n){const l=(a>>24&255)/255;t[n++]=(a&255)/255*l,t[n++]=(a>>8&255)/255*l,t[n++]=(a>>16&255)/255*l,t[n++]=l}class vA{constructor(){this.batches=[],this.batched=!1}destroy(){this.batches.forEach(t=>{Fa.return(t)}),this.batches.length=0}}class L_{constructor(t,n){this.state=X0.for2d(),this.renderer=t,this._adaptor=n,this.renderer.runners.contextChange.add(this),this._managedGraphics=new ld({renderer:t,type:"renderable",priority:-1,name:"graphics"})}contextChange(){this._adaptor.contextChange(this.renderer)}validateRenderable(t){const n=t.context,l=!!t._gpuData,f=this.renderer.graphicsContext.updateGpuContext(n);return!!(f.isBatchable||l!==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 l=this._getGpuDataForRenderable(t).batches;for(let o=0;o<l.length;o++){const f=l[o];f._batcher.updateElement(f)}}execute(t){if(!t.isRenderable)return;const n=this.renderer,l=t.context;if(!n.graphicsContext.getGpuContext(l).batches.length)return;const f=l.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,gA(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 l=this.renderer.renderPipes.batch,o=this._getGpuDataForRenderable(t).batches;for(let f=0;f<o.length;f++){const d=o[f];l.addToBatch(d,n)}}_getGpuDataForRenderable(t){return t._gpuData[this.renderer.uid]||this._initGpuDataForRenderable(t)}_initGpuDataForRenderable(t){const n=new vA;return t._gpuData[this.renderer.uid]=n,this._managedGraphics.add(t),n}_updateBatchesForRenderable(t,n){const l=t.context,f=this.renderer.graphicsContext.getGpuContext(l),d=this.renderer._roundPixels|t._roundPixels;n.batches=f.batches.map(m=>{const g=Fa.get(Z0);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}}L_.extension={type:[Wt.WebGLPipes,Wt.WebGPUPipes],name:"graphics"};Ie.add(Y_);Ie.add(L_);Ie.add(yA);Ie.add(W0);class Xi extends q0{constructor(t){t instanceof Sl&&(t={context:t});const{context:n,roundPixels:l,...o}=t||{};super({label:"Graphics",...o}),this.renderPipeId="graphics",n?this.context=n:(this.context=this._ownedContext=new Sl,this.context.autoGarbageCollect=this.autoGarbageCollect),this.didViewUpdate=!0,this.allowChildren=!1,this.roundPixels=l??!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 Xi(this._context.clone()):(this._ownedContext=null,new Xi(this._context))}lineStyle(t,n,l){de(rn,"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),l&&(o.alpha=l),this.context.strokeStyle=o,this}beginFill(t,n){de(rn,"Graphics#beginFill is no longer needed. Use Graphics#fill to fill the shape with the desired style.");const l={};return t!==void 0&&(l.color=t),n!==void 0&&(l.alpha=n),this.context.fillStyle=l,this}endFill(){de(rn,"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!==Sl.defaultStrokeStyle.width||t.color!==Sl.defaultStrokeStyle.color||t.alpha!==Sl.defaultStrokeStyle.alpha)&&this.context.stroke(),this}drawCircle(...t){return de(rn,"Graphics#drawCircle has been renamed to Graphics#circle"),this._callContextMethod("circle",t)}drawEllipse(...t){return de(rn,"Graphics#drawEllipse has been renamed to Graphics#ellipse"),this._callContextMethod("ellipse",t)}drawPolygon(...t){return de(rn,"Graphics#drawPolygon has been renamed to Graphics#poly"),this._callContextMethod("poly",t)}drawRect(...t){return de(rn,"Graphics#drawRect has been renamed to Graphics#rect"),this._callContextMethod("rect",t)}drawRoundedRect(...t){return de(rn,"Graphics#drawRoundedRect has been renamed to Graphics#roundRect"),this._callContextMethod("roundRect",t)}drawStar(...t){return de(rn,"Graphics#drawStar has been renamed to Graphics#star"),this._callContextMethod("star",t)}}class xA extends q0{constructor(t,n){const{text:l,resolution:o,style:f,anchor:d,width:m,height:g,roundPixels:v,..._}=t;super({..._}),this.batched=!0,this._resolution=null,this._autoResolution=!0,this._didTextUpdate=!0,this._styleClass=n,this.text=l??"",this.style=f,this.resolution=o??null,this.allowChildren=!1,this._anchor=new Wn({_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,l=this.bounds.height,o=-n*this.anchor.x;let f=0;return t.x>=o&&t.x<=o+n&&(f=-l*this.anchor.y,t.y>=f&&t.y<=f+l)}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 _A(a,t){let n=a[0]??{};return(typeof n=="string"||a[1])&&(de(rn,`use new ${t}({ text: "hi!", style }) instead`),n={text:n,style:a[1]}),n}class SA{constructor(t){this._canvasPool=Object.create(null),this.canvasOptions=t||{},this.enableFullScreen=!1}_createCanvasAndContext(t,n){const l=mi.get().createCanvas();l.width=t,l.height=n;const o=l.getContext("2d");return{canvas:l,context:o}}getOptimalCanvasAndContext(t,n,l=1){t=Math.ceil(t*l-1e-6),n=Math.ceil(n*l-1e-6),t=Yc(t),n=Yc(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:l,height:o}=n,f=(l<<17)+(o<<1);t.context.resetTransform(),t.context.clearRect(0,0,l,o),this._canvasPool[f].push(t)}clear(){this._canvasPool={}}}const E0=new SA;ad.register(E0);let Ir=null,Js=null;function bA(a,t){Ir||(Ir=mi.get().createCanvas(256,128),Js=Ir.getContext("2d",{willReadFrequently:!0}),Js.globalCompositeOperation="copy",Js.globalAlpha=1),(Ir.width<a||Ir.height<t)&&(Ir.width=Yc(a),Ir.height=Yc(t))}function zv(a,t,n){for(let l=0,o=4*n*t;l<t;++l,o+=4)if(a[o+3]!==0)return!1;return!0}function Dv(a,t,n,l,o){const f=4*t;for(let d=l,m=l*f+4*n;d<=o;++d,m+=f)if(a[m+3]!==0)return!1;return!0}function TA(...a){let t=a[0];t.canvas||(t={canvas:a[0],resolution:a[1]});const{canvas:n}=t,l=Math.min(t.resolution??1,1),o=t.width??n.width,f=t.height??n.height;let d=t.output;if(bA(o,f),!Js)throw new TypeError("Failed to get canvas 2D context");Js.drawImage(n,0,0,o,f,0,0,o*l,f*l);const g=Js.getImageData(0,0,o,f).data;let v=0,_=0,b=o-1,C=f-1;for(;_<f&&zv(g,o,_);)++_;if(_===f)return on.EMPTY;for(;zv(g,o,C);)--C;for(;Dv(g,o,v,_,C);)++v;for(;Dv(g,o,b,_,C);)--b;return++b,++C,Js.globalCompositeOperation="source-over",Js.strokeRect(v,_,b-v,C-_),Js.globalCompositeOperation="copy",d??(d=new on),d.set(v/l,_/l,(b-v)/l,(C-_)/l),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 EA{constructor(t=0,n=0,l=!1){this.first=null,this.items=Object.create(null),this.last=null,this.max=t,this.resetTtl=l,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 l=0;l<t.length;l++){const o=t[l];n[l]=[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,l=0;for(;n!==null;)t[l++]=n.key,n=n.next;return t}setWithEvicted(t,n,l=this.resetTtl){let o=null;if(this.has(t))this.set(t,n,!0,l);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,l=!1,o=this.resetTtl){let f=this.items[t];return l||f!==void 0?(f.value=n,l===!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 l=0;l<t.length;l++)n[l]=this.get(t[l]);return n}}function CA(a=1e3,t=0,n=!1){if(isNaN(a)||a<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 EA(a,t,n)}function X_(a){return!!a.tagStyles&&Object.keys(a.tagStyles).length>0}function V_(a){return a.includes("<")}function AA(a,t){return a.clone().assign(t)}function MA(a,t){const n=[],l=t.tagStyles;if(!X_(t)||!V_(a))return n.push({text:a,style:t}),n;const o=[t],f=[];let d="",m=0;for(;m<a.length;){const g=a[m];if(g==="<"){const v=a.indexOf(">",m);if(v===-1){d+=g,m++;continue}const _=a.slice(m+1,v);if(_.startsWith("/")){const b=_.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+=a.slice(m,v+1),m=v+1;continue}}else{const b=_.trim();if(l[b]){d.length>0&&(n.push({text:d,style:o[o.length-1]}),d="");const C=o[o.length-1],E=AA(C,l[b]);o.push(E),f.push(b),m=v+1;continue}else{d+=a.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 RA=[10,13],zA=new Set(RA),DA=[9,32,8192,8193,8194,8195,8196,8197,8198,8200,8201,8202,8287,12288],OA=new Set(DA),NA=[9,32];new Set(NA);const UA=[45,8208,8211,8212,173],BA=new Set(UA),wA=/(\r\n|\r|\n)/,HA=/(?:\r\n|\r|\n)/;function dp(a){return typeof a!="string"?!1:zA.has(a.charCodeAt(0))}function Qi(a,t){return typeof a!="string"?!1:OA.has(a.charCodeAt(0))}function GA(a){return typeof a!="string"?!1:BA.has(a.charCodeAt(0))}function Q_(a){return a==="normal"||a==="pre-line"}function k_(a){return a==="normal"}function Zs(a){if(typeof a!="string")return"";let t=a.length-1;for(;t>=0&&Qi(a[t]);)t--;return t<a.length-1?a.slice(0,t+1):a}function K_(a){const t=[],n=[];if(typeof a!="string")return t;for(let l=0;l<a.length;l++){const o=a[l],f=a[l+1];if(Qi(o)||dp(o)){n.length>0&&(t.push(n.join("")),n.length=0),o==="\r"&&f===`
|
|
305
|
+
`?(t.push(`\r
|
|
306
|
+
`),l++):t.push(o);continue}n.push(o),GA(o)&&f&&!Qi(f)&&!dp(f)&&(t.push(n.join("")),n.length=0)}return n.length>0&&t.push(n.join("")),t}function Z_(a,t,n,l){const o=n(a),f=[];for(let d=0;d<o.length;d++){let m=o[d],g=m,v=1;for(;o[d+v];){const _=o[d+v];if(!l(g,_,a,d,t))m+=_,g=_,v++;else break}d+=v-1,f.push(m)}return f}const jA=/\r\n|\r|\n/g;function qA(a,t,n,l,o,f,d,m){var Dt,w;const g=MA(a,t);if(k_(t.whiteSpace))for(let H=0;H<g.length;H++){const at=g[H];g[H]={text:at.text.replace(jA," "),style:at.style}}const _=[];let b=[];for(const H of g){const at=H.text.split(wA);for(let et=0;et<at.length;et++){const dt=at[et];dt===`\r
|
|
307
|
+
`||dt==="\r"||dt===`
|
|
308
|
+
`?(_.push(b),b=[]):dt.length>0&&b.push({text:dt,style:H.style})}}(b.length>0||_.length===0)&&_.push(b);const C=n?YA(_,t,l,o,d,m):_,E=[],M=[],z=[],R=[],D=[];let U=0;const B=t._fontString,G=f(B);G.fontSize===0&&(G.fontSize=t.fontSize,G.ascent=t.fontSize);let Q="",V=!!t.dropShadow,K=((Dt=t._stroke)==null?void 0:Dt.width)||0;for(const H of C){let at=0,et=G.ascent,dt=G.descent,j="";for(const st of H){const yt=st.style._fontString,Tt=f(yt);yt!==Q&&(l.font=yt,Q=yt);const Ot=o(st.text,st.style.letterSpacing,l);at+=Ot,et=Math.max(et,Tt.ascent),dt=Math.max(dt,Tt.descent),j+=st.text;const Bt=((w=st.style._stroke)==null?void 0:w.width)||0;Bt>K&&(K=Bt),!V&&st.style.dropShadow&&(V=!0)}H.length===0&&(et=G.ascent,dt=G.descent),E.push(at),M.push(et),z.push(dt),D.push(j);const I=t.lineHeight||et+dt;R.push(I+t.leading),U=Math.max(U,at)}const pt=K,ht=(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<R.length;H++)vt+=R[H];vt=Math.max(vt,R[0]+pt);const _t=vt+(t.dropShadow?t.dropShadow.distance:0),xt=t.lineHeight||G.fontSize;return{width:ht,height:_t,lines:D,lineWidths:E,lineHeight:xt+t.leading,maxLineWidth:U,fontProperties:G,runsByLine:C,lineAscents:M,lineDescents:z,lineHeights:R,hasDropShadow:V}}function YA(a,t,n,l,o,f){var R;const{letterSpacing:d,whiteSpace:m,wordWrapWidth:g,breakWords:v}=t,_=Q_(m),b=g+d,C={};let E="";const M=(D,U)=>{const B=`${D}|${U.styleKey}`;let G=C[B];if(G===void 0){const Q=U._fontString;Q!==E&&(n.font=Q,E=Q),G=l(D,U.letterSpacing,n)+U.letterSpacing,C[B]=G}return G},z=[];for(const D of a){const U=LA(D),B=z.length,G=vt=>{let _t=0,xt=vt;do{const{token:Dt,style:w}=U[xt];_t+=M(Dt,w),xt++}while(xt<U.length&&U[xt].continuesFromPrevious);return _t},Q=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=!_,ot=null;const ft=()=>{ot&&ot.text.length>0&&V.push(ot),ot=null},ht=()=>{if(ft(),V.length>0){const vt=V[V.length-1];vt.text=Zs(vt.text),vt.text.length===0&&V.pop()}z.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=M(_t,xt);if(_){const et=Qi(_t),dt=(ot==null?void 0:ot.text[ot.text.length-1])??((R=V[V.length-1])==null?void 0:R.text.slice(-1))??"",j=dt?Qi(dt):!1;if(et&&j)continue}const H=!Dt,at=H?G(vt):w;if(at>b&&H)if(K>0&&ht(),v){const et=Q(vt);for(let dt=0;dt<et.length;dt++){const j=et[dt].token,I=et[dt].style,st=Z_(j,v,f,o);for(const yt of st){const Tt=M(yt,I);Tt+K>b&&ht(),!ot||ot.style!==I?(ft(),ot={text:yt,style:I}):ot.text+=yt,K+=Tt}}vt+=et.length-1}else{const et=Q(vt);ft(),z.push(et.map(dt=>({text:dt.token,style:dt.style}))),pt=!1,vt+=et.length-1}else if(at+K>b&&H){if(Qi(_t)){pt=!1;continue}ht(),ot={text:_t,style:xt},K=w}else if(Dt&&!v)!ot||ot.style!==xt?(ft(),ot={text:_t,style:xt}):ot.text+=_t,K+=w;else{const et=Qi(_t);if(K===0&&et&&!pt)continue;!ot||ot.style!==xt?(ft(),ot={text:_t,style:xt}):ot.text+=_t,K+=w}}if(ft(),V.length>0){const vt=V[V.length-1];vt.text=Zs(vt.text),vt.text.length===0&&V.pop()}(V.length>0||z.length===B)&&z.push(V)}return z}function LA(a){const t=[];let n=!1;for(const l of a){const o=K_(l.text);let f=!0;for(const d of o){const m=Qi(d)||dp(d),g=f&&n&&!m;t.push({token:d,style:l.style,continuesFromPrevious:g}),n=!m,f=!1}}return t}const XA={willReadFrequently:!0};function Ov(a,t,n,l,o){let f=n[a];return typeof f!="number"&&(f=o(a,t,l)+t,n[a]=f),f}function VA(a,t,n,l,o,f,d){const m=n.getContext("2d",XA);m.font=t._fontString;let g=0,v="";const _=[],b=Object.create(null),{letterSpacing:C,whiteSpace:E}=t,M=Q_(E),z=k_(E);let R=!M;const D=t.wordWrapWidth+C,U=K_(a);for(let G=0;G<U.length;G++){let Q=U[G];if(dp(Q)){if(!z){_.push(Zs(v)),R=!M,v="",g=0;continue}Q=" "}if(M){const K=Qi(Q),pt=Qi(v[v.length-1]);if(K&&pt)continue}const V=Ov(Q,C,b,m,l);if(V>D)if(v!==""&&(_.push(Zs(v)),v="",g=0),o(Q,t.breakWords)){const K=Z_(Q,t.breakWords,d,f);for(const pt of K){const ot=Ov(pt,C,b,m,l);ot+g>D&&(_.push(Zs(v)),R=!1,v="",g=0),v+=pt,g+=ot}}else v.length>0&&(_.push(Zs(v)),v="",g=0),_.push(Zs(Q)),R=!1,v="",g=0;else V+g>D&&(R=!1,_.push(Zs(v)),v="",g=0),(v.length>0||!Qi(Q)||R)&&(v+=Q,g+=V)}const B=Zs(v);return B.length>0&&_.push(B),_.join(`
|
|
309
|
+
`)}const Nv={willReadFrequently:!0},tu=class Lt{static get experimentalLetterSpacingSupported(){let t=Lt._experimentalLetterSpacingSupported;if(t===void 0){const n=mi.get().getCanvasRenderingContext2D().prototype;t=Lt._experimentalLetterSpacingSupported="letterSpacing"in n||"textLetterSpacing"in n}return t}constructor(t,n,l,o,f,d,m,g,v,_){this.text=t,this.style=n,this.width=l,this.height=o,this.lines=f,this.lineWidths=d,this.lineHeight=m,this.maxLineWidth=g,this.fontProperties=v,_&&(this.runsByLine=_.runsByLine,this.lineAscents=_.lineAscents,this.lineDescents=_.lineDescents,this.lineHeights=_.lineHeights,this.hasDropShadow=_.hasDropShadow)}static measureText(t=" ",n,l=Lt._canvas,o=n.wordWrap){var Q;const f=`${t}-${n.styleKey}-wordWrap-${o}`;if(Lt._measurementCache.has(f))return Lt._measurementCache.get(f);if(X_(n)&&V_(t)){const V=qA(t,n,o,Lt._context,Lt._measureText,Lt.measureFont,Lt.canBreakChars,Lt.wordWrapSplit),K=new Lt(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 Lt._measurementCache.set(f,K),K}const m=n._fontString,g=Lt.measureFont(m);g.fontSize===0&&(g.fontSize=n.fontSize,g.ascent=n.fontSize,g.descent=0);const v=Lt._context;v.font=m;const b=(o?Lt._wordWrap(t,n,l):t).split(HA),C=new Array(b.length);let E=0;for(let V=0;V<b.length;V++){const K=Lt._measureText(b[V],n.letterSpacing,v);C[V]=K,E=Math.max(E,K)}const M=((Q=n._stroke)==null?void 0:Q.width)??0,z=n.lineHeight||g.fontSize,R=Lt._getAlignWidth(E,n,o),D=Lt._adjustWidthForStyle(R,n),U=Math.max(z,g.fontSize+M)+(b.length-1)*(z+n.leading),B=Lt._adjustHeightForStyle(U,n),G=new Lt(t,n,D,B,b,C,z+n.leading,E,g);return Lt._measurementCache.set(f,G),G}static _adjustWidthForStyle(t,n){var f;const l=((f=n._stroke)==null?void 0:f.width)||0;let o=t+l;return n.dropShadow&&(o+=n.dropShadow.distance),o}static _adjustHeightForStyle(t,n){let l=t;return n.dropShadow&&(l+=n.dropShadow.distance),l}static _getAlignWidth(t,n,l){return l&&n.align!=="left"?Math.max(t,n.wordWrapWidth):t}static _measureText(t,n,l){let o=!1;Lt.experimentalLetterSpacingSupported&&(Lt.experimentalLetterSpacing?(l.letterSpacing=`${n}px`,l.textLetterSpacing=`${n}px`,o=!0):(l.letterSpacing="0px",l.textLetterSpacing="0px"));const f=l.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 _=(Lt.graphemeSegmenter(t).length-1)*n;d+=_,v+=_}return Math.max(d,v)}static _wordWrap(t,n,l=Lt._canvas){return VA(t,n,l,Lt._measureText,Lt.canBreakWords,Lt.canBreakChars,Lt.wordWrapSplit)}static isBreakingSpace(t,n){return Qi(t)}static canBreakWords(t,n){return n}static canBreakChars(t,n,l,o,f){return!0}static wordWrapSplit(t){return Lt.graphemeSegmenter(t)}static measureFont(t){if(Lt._fonts[t])return Lt._fonts[t];const n=Lt._context;n.font=t;const l=n.measureText(Lt.METRICS_STRING+Lt.BASELINE_SYMBOL),o=l.actualBoundingBoxAscent??0,f=l.actualBoundingBoxDescent??0,d={ascent:o,descent:f,fontSize:o+f};return Lt._fonts[t]=d,d}static clearMetrics(t=""){t?delete Lt._fonts[t]:Lt._fonts={}}static get _canvas(){if(!Lt.__canvas){let t;try{const n=new OffscreenCanvas(0,0),l=n.getContext("2d",Nv);if(l!=null&&l.measureText)return Lt.__canvas=n,n;t=mi.get().createCanvas()}catch{t=mi.get().createCanvas()}t.width=t.height=10,Lt.__canvas=t}return Lt.__canvas}static get _context(){return Lt.__context||(Lt.__context=Lt._canvas.getContext("2d",Nv)),Lt.__context}};tu.METRICS_STRING="|ÉqÅ";tu.BASELINE_SYMBOL="M";tu.BASELINE_MULTIPLIER=1.4;tu.HEIGHT_MULTIPLIER=2;tu.graphemeSegmenter=(()=>{if(typeof(Intl==null?void 0:Intl.Segmenter)=="function"){const a=new Intl.Segmenter;return t=>{const n=a.segment(t),l=[];let o=0;for(const f of n)l[o++]=f.segment;return l}}return a=>[...a]})();tu.experimentalLetterSpacing=!1;tu._fonts={};tu._measurementCache=CA(1e3);let Zu=tu;const QA=["serif","sans-serif","monospace","cursive","fantasy","system-ui"];function C0(a){const t=typeof a.fontSize=="number"?`${a.fontSize}px`:a.fontSize;let n=a.fontFamily;Array.isArray(a.fontFamily)||(n=a.fontFamily.split(","));for(let l=n.length-1;l>=0;l--){let o=n[l].trim();!/([\"\'])[^\'\"]+\1/.test(o)&&!QA.includes(o)&&(o=`"${o}"`),n[l]=o}return`${a.fontStyle} ${a.fontVariant} ${a.fontWeight} ${t} ${n.join(",")}`}const Uv=1e5;function $m(a,t,n,l=0,o=0,f=0){if(a.texture===ze.WHITE&&!a.fill)return Rn.shared.setValue(a.color).setAlpha(a.alpha??1).toHexa();if(a.fill){if(a.fill instanceof Mp){const d=a.fill,m=t.createPattern(d.texture.source.resource,"repeat"),g=d.transform.copyTo(le.shared);return g.scale(d.texture.source.pixelWidth,d.texture.source.pixelHeight),m.setTransform(g),m}else if(a.fill instanceof $s){const d=a.fill,m=d.type==="linear",g=d.textureSpace==="local";let v=1,_=1;g&&n&&(v=n.width+l,_=n.height+l);let b,C=!1;if(m){const{start:E,end:M}=d;b=t.createLinearGradient(E.x*v+o,E.y*_+f,M.x*v+o,M.y*_+f),C=Math.abs(M.x-E.x)<Math.abs((M.y-E.y)*.1)}else{const{center:E,innerRadius:M,outerCenter:z,outerRadius:R}=d;b=t.createRadialGradient(E.x*v+o,E.y*_+f,M*v,z.x*v+o,z.y*_+f,R*v)}if(C&&g&&n){const E=n.lineHeight/_;for(let M=0;M<n.lines.length;M++){const z=(M*n.lineHeight+l/2)/_;d.colorStops.forEach(R=>{let D=z+R.offset*E;D=Math.max(0,Math.min(1,D)),b.addColorStop(Math.floor(D*Uv)/Uv,Rn.shared.setValue(R.color).toHex())})}}else d.colorStops.forEach(E=>{b.addColorStop(E.offset,Rn.shared.setValue(E.color).toHex())});return b}}else{const d=t.createPattern(a.texture.source.resource,"repeat"),m=a.matrix.copyTo(le.shared);return m.scale(a.texture.source.pixelWidth,a.texture.source.pixelHeight),d.setTransform(m),d}return Ga("FillStyle not recognised",a),"red"}const Bv=new on;function Dc(a){let t=0;for(let n=0;n<a.length;n++)a.charCodeAt(n)===32&&t++;return t}class kA{getCanvasAndContext(t){const{text:n,style:l,resolution:o=1}=t,f=l._getFinalPadding(),d=Zu.measureText(n||" ",l),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=E0.getOptimalCanvasAndContext(m,g);this._renderTextToCanvas(l,f,o,v,d);const _=l.trim?TA({canvas:v.canvas,width:m,height:g,resolution:1,output:Bv}):Bv.set(0,0,m,g);return{canvasAndContext:v,frame:_}}returnCanvasAndContext(t){E0.returnCanvasAndContext(t)}_renderTextToCanvas(t,n,l,o,f){var V,K,pt;if(f.runsByLine&&f.runsByLine.length>0){this._renderTaggedTextToCanvas(f,t,n,l,o);return}const{canvas:d,context:m}=o,g=C0(t),v=f.lines,_=f.lineHeight,b=f.lineWidths,C=f.maxLineWidth,E=f.fontProperties,M=d.height;if(m.resetTransform(),m.scale(l,l),m.textBaseline=t.textBaseline,(V=t._stroke)!=null&&V.width){const ot=t._stroke;m.lineWidth=ot.width,m.miterLimit=ot.miterLimit,m.lineJoin=ot.join,m.lineCap=ot.cap}m.font=g;let z,R;const D=t.dropShadow?2:1,U=t.wordWrap?t.wordWrapWidth:C,G=(((K=t._stroke)==null?void 0:K.width)??0)/2;let Q=(_-E.fontSize)/2;_-E.fontSize<0&&(Q=0);for(let ot=0;ot<D;++ot){const ft=t.dropShadow&&ot===0,ht=ft?Math.ceil(Math.max(1,M)+n*2):0,vt=ht*l;if(ft)this._setupDropShadow(m,t,l,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++){z=G,R=G+_t*_+E.ascent+Q,z+=this._getAlignmentOffset(b[_t],U,t.align);let xt=0;if(t.align==="justify"&&t.wordWrap&&_t<v.length-1){const Dt=Dc(v[_t]);Dt>0&&(xt=(U-b[_t])/Dt)}(pt=t._stroke)!=null&&pt.width&&this._drawLetterSpacing(v[_t],t,o,z+n,R+n-ht,!0,xt),t._fill!==void 0&&this._drawLetterSpacing(v[_t],t,o,z+n,R+n-ht,!1,xt)}}}_renderTaggedTextToCanvas(t,n,l,o,f){var G,Q,V;const{canvas:d,context:m}=f,{runsByLine:g,lineWidths:v,maxLineWidth:_,lineAscents:b,lineHeights:C,hasDropShadow:E}=t,M=d.height;m.resetTransform(),m.scale(o,o),m.textBaseline=n.textBaseline;const z=E?2:1,R=n.wordWrap?n.wordWrapWidth:_;let D=((G=n._stroke)==null?void 0:G.width)??0;for(const K of g)for(const pt of K){const ot=((Q=pt.style._stroke)==null?void 0:Q.width)??0;ot>D&&(D=ot)}const U=D/2,B=[];for(let K=0;K<g.length;K++){const pt=g[K],ot=[];for(const ft of pt){const ht=C0(ft.style);m.font=ht,ot.push({width:Zu._measureText(ft.text,ft.style.letterSpacing,m),font:ht})}B.push(ot)}for(let K=0;K<z;++K){const pt=E&&K===0,ot=pt?Math.ceil(Math.max(1,M)+l*2):0,ft=ot*o;pt||(m.shadowColor="rgba(0,0,0,0)");let ht=U;for(let vt=0;vt<g.length;vt++){const _t=g[vt],xt=v[vt],Dt=b[vt],w=C[vt],H=B[vt];let at=U;at+=this._getAlignmentOffset(xt,R,n.align);let et=0;if(n.align==="justify"&&n.wordWrap&&vt<g.length-1){let I=0;for(const st of _t)I+=Dc(st.text);I>0&&(et=(R-xt)/I)}const dt=ht+Dt;let j=at+l;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 Bt=st.style._stroke;if(m.lineWidth=Bt.width,m.miterLimit=Bt.miterLimit,m.lineJoin=Bt.join,m.lineCap=Bt.cap,pt)if(st.style.dropShadow)this._setupDropShadow(m,st.style,o,ft);else{const fe=Dc(st.text);j+=yt+fe*et;continue}else{const fe=Zu.measureFont(Tt),ce=st.style.lineHeight||fe.fontSize,pa={width:yt,height:ce,lineHeight:ce,lines:[st.text]};m.strokeStyle=$m(Bt,m,pa,l*2,j-l,ht)}this._drawLetterSpacing(st.text,st.style,f,j,dt+l-ot,!0,et)}const Ot=Dc(st.text);j+=yt+Ot*et}j=at+l;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,ft);else{const Bt=Dc(st.text);j+=yt+Bt*et;continue}else{const Bt=Zu.measureFont(Tt),fe=st.style.lineHeight||Bt.fontSize,ce={width:yt,height:fe,lineHeight:fe,lines:[st.text]};m.fillStyle=$m(st.style._fill,m,ce,l*2,j-l,ht)}this._drawLetterSpacing(st.text,st.style,f,j,dt+l-ot,!1,et)}const Ot=Dc(st.text);j+=yt+Ot*et}ht+=w}}}_setFillAndStrokeStyles(t,n,l,o,f,d=0,m=0){var g;if(t.fillStyle=n._fill?$m(n._fill,t,l,o*2,d,m):null,(g=n._stroke)!=null&&g.width){const v=f+o*2;t.strokeStyle=$m(n._stroke,t,l,v,d,m)}}_setupDropShadow(t,n,l,o){t.fillStyle="black",t.strokeStyle="black";const f=n.dropShadow,d=f.color,m=f.alpha;t.shadowColor=Rn.shared.setValue(d).setAlpha(m).toRgbaString();const g=f.blur*l,v=f.distance*l;t.shadowBlur=g,t.shadowOffsetX=Math.cos(f.angle)*v,t.shadowOffsetY=Math.sin(f.angle)*v+o}_getAlignmentOffset(t,n,l){return l==="right"?n-t:l==="center"?(n-t)/2:0}_drawLetterSpacing(t,n,l,o,f,d=!1,m=0){const{context:g}=l,v=n.letterSpacing;let _=!1;if(Zu.experimentalLetterSpacingSupported&&(Zu.experimentalLetterSpacing?(g.letterSpacing=`${v}px`,g.textLetterSpacing=`${v}px`,_=!0):(g.letterSpacing="0px",g.textLetterSpacing="0px")),(v===0||_)&&m===0){d?g.strokeText(t,o,f):g.fillText(t,o,f);return}if(m!==0&&(v===0||_)){const z=t.split(" ");let R=o;const D=g.measureText(" ").width;for(let U=0;U<z.length;U++)d?g.strokeText(z[U],R,f):g.fillText(z[U],R,f),R+=g.measureText(z[U]).width+D+m;return}let b=o;const C=Zu.graphemeSegmenter(t);let E=g.measureText(t).width,M=0;for(let z=0;z<C.length;++z){const R=C[z];d?g.strokeText(R,b,f):g.fillText(R,b,f);let D="";for(let U=z+1;U<C.length;++U)D+=C[U];M=g.measureText(D).width,b+=E-M+v,R===" "&&(b+=m),E=M}}}const Gc=new kA,$0=class io extends cs{constructor(t={}){super(),this.uid=cn("textStyle"),this._tick=0,this._cachedFontString=null,KA(t),t instanceof io&&(t=t._toObject());const o={...io.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({...io.defaultDropShadow,...t}):this._dropShadow=t?this._createProxy({...io.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({...Sl.defaultFillStyle,...t},()=>{this._fill=so({...this._originalFill},Sl.defaultFillStyle)})),this._fill=so(t===0?"black":t,Sl.defaultFillStyle),this.update())}get stroke(){return this._originalStroke}set stroke(t){t!==this._originalStroke&&(this._originalStroke=t,this._isFillStyle(t)&&(this._originalStroke=this._createProxy({...Sl.defaultStrokeStyle,...t},()=>{this._stroke=hp({...this._originalStroke},Sl.defaultStrokeStyle)})),this._stroke=hp(t,Sl.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=io.defaultTextStyle;for(const n in t)this[n]=t[n]}assign(t){for(const n in t){const l=n;this[l]=t[n]}return this}get styleKey(){return`${this.uid}-${this._tick}`}get _fontString(){return this._cachedFontString===null&&(this._cachedFontString=C0(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 io(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 l,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;(l=this._fill)!=null&&l.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:(l,o,f)=>(l[o]===f||(l[o]=f,n==null||n(o,f),this.update()),!0)})}_isFillStyle(t){return(t??null)!==null&&!(Rn.isColorLike(t)||t instanceof $s||t instanceof Mp)}};$0.defaultDropShadow={alpha:1,angle:Math.PI/6,blur:0,color:"black",distance:5};$0.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 ro=$0;function KA(a){const t=a;if(typeof t.dropShadow=="boolean"&&t.dropShadow){const n=ro.defaultDropShadow;a.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){de(rn,"strokeThickness is now a part of stroke");const n=t.stroke;let l={};if(Rn.isColorLike(n))l.color=n;else if(n instanceof $s||n instanceof Mp)l.fill=n;else if(Object.hasOwnProperty.call(n,"color")||Object.hasOwnProperty.call(n,"fill"))l=n;else throw new Error("Invalid stroke value.");a.stroke={...l,width:t.strokeThickness}}if(Array.isArray(t.fillGradientStops)){if(de(rn,"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&&Ga("The number of fill colors must match the number of fill gradient stops.");const n=new $s({start:{x:0,y:0},end:{x:0,y:1},textureSpace:"local"}),l=t.fillGradientStops.slice(),o=t.fill.map(f=>Rn.shared.setValue(f).toNumber());l.forEach((f,d)=>{n.addColorStop(f,o[d])}),a.fill={fill:n}}}function ZA(a,t){const{texture:n,bounds:l}=a,o=t._style._getFinalPadding();Ux(l,t._anchor,n);const f=t._anchor._x*o*2,d=t._anchor._y*o*2;l.minX-=o-f,l.minY-=o-d,l.maxX-=o-f,l.maxY-=o-d}class JA{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 PA extends JA{}class J_{constructor(t){this._renderer=t,t.runners.resolutionChange.add(this),this._managedTexts=new ld({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),l=t.styleKey;return n.currentKey!==l?!0:t._didTextUpdate}addRenderable(t,n){const l=this._getGpuText(t);if(t._didTextUpdate){const o=t._autoResolution?this._renderer.resolution:t.resolution;(l.currentKey!==t.styleKey||t._resolution!==o)&&this._updateGpuText(t),t._didTextUpdate=!1,ZA(l,t)}this._renderer.renderPipes.batch.addToBatch(l,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 PA;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:l}=this._renderer;l.getReferenceCount(n.currentKey)>0?l.decreaseReferenceCount(n.currentKey):n.texture&&l.returnTexture(n.texture)}destroy(){this._managedTexts.destroy(),this._renderer=null}}J_.extension={type:[Wt.WebGLPipes,Wt.WebGPUPipes,Wt.CanvasPipes],name:"text"};const WA=new ki;function FA(a,t,n,l,o=!1){const f=WA;f.minX=0,f.minY=0,f.maxX=a.width/l|0,f.maxY=a.height/l|0;const d=Tp.getOptimalTexture(f.width,f.height,l,!1,o);return d.source.uploadMethodId="image",d.source.resource=a,d.source.alphaMode="premultiply-alpha-on-upload",d.frame.width=t/l,d.frame.height=n/l,d.source.emit("update",d.source),d.updateUvs(),d}class P_{constructor(t,n){this._activeTextures={},this._renderer=t,this._retainCanvasContext=n}getTexture(t,n,l,o){typeof t=="string"&&(de("8.0.0","CanvasTextSystem.getTexture: Use object TextOptions instead of separate arguments"),t={text:t,style:l,resolution:n}),t.style instanceof ro||(t.style=new ro(t.style)),t.textureStyle instanceof Lc||(t.textureStyle=new Lc(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:_,canvasAndContext:b}=Gc.getCanvasAndContext({text:f,style:d,resolution:v}),C=FA(b.canvas,_.width,_.height,v,g);if(m&&(C.source.style=m),d.trim&&(_.pad(d.padding),C.frame.copyFrom(_),C.frame.scale(1/v),C.updateUvs()),d.filters){const E=this._applyFilters(C,d.filters);return this.returnTexture(C),Gc.returnCanvasAndContext(b),E}return this._renderer.texture.initSource(C._source),this._retainCanvasContext||Gc.returnCanvasAndContext(b),C}returnTexture(t){const n=t.source,l=n.resource;if(this._retainCanvasContext&&(l!=null&&l.getContext)){const o=l.getContext("2d");o&&Gc.returnCanvasAndContext({canvas:l,context:o})}n.resource=null,n.uploadMethodId="unknown",n.alphaMode="no-premultiply-alpha",Tp.returnTexture(t,!0)}renderTextToCanvas(){de("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 l=this.getTexture({text:t.text,style:t.style,resolution:t._resolution,textureStyle:t.textureStyle,autoGenerateMipmaps:t.autoGenerateMipmaps});return this._activeTextures[n]={texture:l,usageCount:1},l}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 l=this._renderer.renderTarget.renderTarget,o=this._renderer.filter.generateFilteredTexture({texture:t,filters:n});return this._renderer.renderTarget.bind(l,!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 W_ extends P_{constructor(t){super(t,!0)}}W_.extension={type:[Wt.CanvasSystem],name:"canvasText"};class F_ extends P_{constructor(t){super(t,!1)}}F_.extension={type:[Wt.WebGLSystem,Wt.WebGPUSystem],name:"canvasText"};Ie.add(W_);Ie.add(F_);Ie.add(J_);class I_ extends xA{constructor(...t){const n=_A(t,"Text");super(n,ro),this.renderPipeId="text",n.textureStyle&&(this.textureStyle=n.textureStyle instanceof Lc?n.textureStyle:new Lc(n.textureStyle)),this.autoGenerateMipmaps=n.autoGenerateMipmaps??Ki.defaultOptions.autoGenerateMipmaps}updateBounds(){const t=this._bounds,n=this._anchor;let l=0,o=0;if(this._style.trim){const{frame:f,canvasAndContext:d}=Gc.getCanvasAndContext({text:this.text,style:this._style,resolution:1});Gc.returnCanvasAndContext(d),l=f.width,o=f.height}else{const f=Zu.measureText(this._text,this._style);l=f.width,o=f.height}t.minX=-n._x*l,t.maxX=t.minX+l,t.minY=-n._y*o,t.maxY=t.minY+o}}Ie.add(TT,ET);var Zy={exports:{}},Ks={};/**
|
|
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 wv;function IA(){return wv||(wv=1,Ks.ConcurrentRoot=1,Ks.ContinuousEventPriority=8,Ks.DefaultEventPriority=32,Ks.DiscreteEventPriority=2,Ks.IdleEventPriority=268435456,Ks.LegacyRoot=0,Ks.NoEventPriority=0),Ks}var Hv;function $A(){return Hv||(Hv=1,Zy.exports=IA()),Zy.exports}var jc=$A();const tg=L.createContext({}),t4=tg.Provider;tg.Consumer;function $_(a,t){const n=Object.getPrototypeOf(a),l=Object.getOwnPropertyDescriptor(n,t);return!(typeof l>"u"||l.writable||l.set)}const Pu={currentUpdatePriority:jc.DefaultEventPriority,unmountQueue:new Set};function Gv(a,...t){}function tS(a,t={}){const n=a;return n.__pixireact=Object.assign({filters:[],parent:null,root:null,type:""},t),n}var e4="0.0.0-development",n4={version:e4};function a4(){}function eS(a,t,n){t instanceof oo&&(t.__pixireact.parent=a,typeof n=="number"?a.__pixireact.filters.splice(n,0,t):a.__pixireact.filters.push(t),a.filters=a.__pixireact.filters)}function Jy(a,t){t&&(t instanceof ma?a.addChild(t):t instanceof oo&&eS(a,t))}function i4(){}function l4(){return!1}const A0=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"}),mp=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 nS(a){return Array.isArray(a)}function aS(a,t,n={arrays:"reference",objects:"reference",strict:!0}){const{arrays:l,objects:o,strict:f}=n;if(typeof a!=typeof t||!!a!=!!t)return!1;if(o4(a)||u4(a))return a===t;const d=r4(a);if(d&&o==="reference")return a===t;const m=nS(a);if(m&&l==="reference")return a===t;if((m||d)&&a===t)return!0;let g;for(g in a)if(!(g in t))return!1;let v=a;if(f&&(v=t),d&&l==="shallow"&&o==="shallow"){for(g in v)if(!aS(a[g],t[g],{strict:f,objects:"reference"}))return!1}else for(g in v)if(a[g]!==t[g])return!1;if(iS(g)){if(m&&a.length===0&&t.length===0||d&&Object.keys(a).length===0&&Object.keys(t).length===0)return!0;if(a!==t)return!1}return!0}function s4(a){return a===null}function u4(a){return typeof a=="number"}function r4(a){return!(a!==Object(a)||nS(a)||typeof a=="function")}function o4(a){return typeof a=="string"}function iS(a){return a===void 0}const c4=Object.freeze(["children","key","ref"]);function f4(a,t=[]){const n={};return Object.entries(a).reduce((l,[o,f])=>(t.includes(o)||(l[o]=f),l),n)}function M0(a,t=[]){return f4(a,c4.concat(t))}const h4="__default";function lS(a,t={},n=!1){const l=M0(a),o=M0(t),f=Object.entries(l),d=[];if(n){const m=Object.keys(o);let g=0;for(;g<m.length;){const v=m[g];!(v in l)&&f.unshift([v,`${h4}remove`]),g+=1}}return f.forEach(([m,g])=>{if(aS(g,o[m]))return;if(m in mp){d.push([m,g,!0,[]]);return}let v=[];m.includes("-")&&(v=m.split("-")),d.push([m,g,!1,v]);for(const _ in l){const b=l[_];_.startsWith(`${m}-`)&&d.push([_,b,!1,_.split("-")])}}),{changes:d}}function d4(a){const t=a;return!(!t||!t.changes)}const m4="__default",jv=new Map,qv={};function Yv(a,t){if(a){const n=a[t];if(!iS(n)&&!s4(n))return n}return a}function sS(a,t){const{__pixireact:n={},...l}=a;let o;d4(t)?o=t:o=lS(t,l);const{changes:f}=o;let d=0;for(;d<f.length;){const m=f[d];let g=!1,v=m[0],_=m[1];const b=m[2],C=m[3];let E=a,M=E[v];if(v==="draw"&&typeof _=="function"&&(a instanceof Xi?_(a):(g=!0,Gv("warn",`The \`draw\` prop was used on a \`${n.type}\` component, but it's only valid on \`graphics\` components.`))),v in A0){const z=v;g=!0,qv[v]||(qv[v]=!0,Gv("warn",`Event names must be pascal case; instead of \`${v}\`, you probably want \`${A0[z]}\`.`))}if(!g){if(C.length&&(M=C.reduce(Yv,E),!(M&&M.set))){const[z,...R]=C.reverse();E=R.reverse().reduce(Yv,E),v=z}if(_===`${m4}remove`)if(E instanceof ma){let z=jv.get(E.constructor);z||(z=E.constructor,z=new z,jv.set(E.constructor,z)),_=z[v]}else _=0;if(b&&n){const R=mp[v];_?E[R]=_:delete E[R]}else $_(E,v)||(E[v]=_)}d+=1}return a}function p4(a,t,n,l){const{children:o,...f}=l,{children:d,...m}=n,g=lS(f,m,!0);return g.changes.length?g:null}function y4(a,t,n,l){const o=p4(a,t,n,l);o&&sS(a,o)}const g4=Object.freeze([...Object.keys(A0),"draw"]),R0={};function v4(a){const t=a.charAt(0),n=a.substring(1);return`${t.toUpperCase()}${n}`}function x4(a,t){return t.toLowerCase()}function _4(a){let t=a;return a.startsWith("pixi")&&(t=a.replace(/^pixi([A-Z])/,x4)),t}function S4(a,t,n){const l=_4(a),o=v4(l);if(!(o in R0))throw new Error(`${o} is not part of the PIXI namespace! Did you forget to extend?`);const f=R0[o],d=M0(t,g4);Object.entries(t).forEach(([g,v])=>{if(g in mp){const _=mp[g];d[_]=v}});const m=tS(new f(d),{root:n,type:l});return sS(m,t),m}var Py={exports:{}},Wy={exports:{}},Fy={exports:{}},Iy={};/**
|
|
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 Lv;function b4(){return Lv||(Lv=1,(function(a){function t(w,H){var at=w.length;w.push(H);t:for(;0<at;){var et=at-1>>>1,dt=w[et];if(0<o(dt,H))w[et]=H,w[at]=dt,at=et;else break t}}function n(w){return w.length===0?null:w[0]}function l(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,dt=w.length,j=dt>>>1;et<j;){var I=2*(et+1)-1,st=w[I],yt=I+1,Tt=w[yt];if(0>o(st,at))yt<dt&&0>o(Tt,st)?(w[et]=Tt,w[yt]=at,et=yt):(w[et]=st,w[I]=at,et=I);else if(yt<dt&&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(a.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var f=performance;a.unstable_now=function(){return f.now()}}else{var d=Date,m=d.now();a.unstable_now=function(){return d.now()-m}}var g=[],v=[],_=1,b=null,C=3,E=!1,M=!1,z=!1,R=typeof setTimeout=="function"?setTimeout:null,D=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)l(v);else if(H.startTime<=w)l(v),H.sortIndex=H.expirationTime,t(g,H);else break;H=n(v)}}function G(w){if(z=!1,B(w),!M)if(n(g)!==null)M=!0,xt();else{var H=n(v);H!==null&&Dt(G,H.startTime-w)}}var Q=!1,V=-1,K=5,pt=-1;function ot(){return!(a.unstable_now()-pt<K)}function ft(){if(Q){var w=a.unstable_now();pt=w;var H=!0;try{t:{M=!1,z&&(z=!1,D(V),V=-1),E=!0;var at=C;try{e:{for(B(w),b=n(g);b!==null&&!(b.expirationTime>w&&ot());){var et=b.callback;if(typeof et=="function"){b.callback=null,C=b.priorityLevel;var dt=et(b.expirationTime<=w);if(w=a.unstable_now(),typeof dt=="function"){b.callback=dt,B(w),H=!0;break e}b===n(g)&&l(g),B(w)}else l(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,C=at,E=!1}H=void 0}}finally{H?ht():Q=!1}}}var ht;if(typeof U=="function")ht=function(){U(ft)};else if(typeof MessageChannel<"u"){var vt=new MessageChannel,_t=vt.port2;vt.port1.onmessage=ft,ht=function(){_t.postMessage(null)}}else ht=function(){R(ft,0)};function xt(){Q||(Q=!0,ht())}function Dt(w,H){V=R(function(){w(a.unstable_now())},H)}a.unstable_IdlePriority=5,a.unstable_ImmediatePriority=1,a.unstable_LowPriority=4,a.unstable_NormalPriority=3,a.unstable_Profiling=null,a.unstable_UserBlockingPriority=2,a.unstable_cancelCallback=function(w){w.callback=null},a.unstable_continueExecution=function(){M||E||(M=!0,xt())},a.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},a.unstable_getCurrentPriorityLevel=function(){return C},a.unstable_getFirstCallbackNode=function(){return n(g)},a.unstable_next=function(w){switch(C){case 1:case 2:case 3:var H=3;break;default:H=C}var at=C;C=H;try{return w()}finally{C=at}},a.unstable_pauseExecution=function(){},a.unstable_requestPaint=function(){},a.unstable_runWithPriority=function(w,H){switch(w){case 1:case 2:case 3:case 4:case 5:break;default:w=3}var at=C;C=w;try{return H()}finally{C=at}},a.unstable_scheduleCallback=function(w,H,at){var et=a.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 dt=-1;break;case 2:dt=250;break;case 5:dt=1073741823;break;case 4:dt=1e4;break;default:dt=5e3}return dt=at+dt,w={id:_++,callback:H,priorityLevel:w,startTime:at,expirationTime:dt,sortIndex:-1},at>et?(w.sortIndex=at,t(v,w),n(g)===null&&w===n(v)&&(z?(D(V),V=-1):z=!0,Dt(G,at-et))):(w.sortIndex=dt,t(g,w),M||E||(M=!0,xt())),w},a.unstable_shouldYield=ot,a.unstable_wrapCallback=function(w){var H=C;return function(){var at=C;C=H;try{return w.apply(this,arguments)}finally{C=at}}}})(Iy)),Iy}var Xv;function T4(){return Xv||(Xv=1,Fy.exports=b4()),Fy.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 Vv;function E4(){return Vv||(Vv=1,(function(a){a.exports=function(t){function n(s,u,h,y){return new zf(s,u,h,y)}function l(){}function o(s){var u="https://react.dev/errors/"+s;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 #"+s+"; visit "+u+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function f(s){return s===null||typeof s!="object"?null:(s=Hf&&s[Hf]||s["@@iterator"],typeof s=="function"?s:null)}function d(s){if(s==null)return null;if(typeof s=="function")return s.$$typeof===Ds?null:s.displayName||s.name||null;if(typeof s=="string")return s;switch(s){case bu:return"Fragment";case ii:return"Portal";case wf:return"Profiler";case Bf:return"StrictMode";case Jo:return"Suspense";case Kl:return"SuspenseList"}if(typeof s=="object")switch(s.$$typeof){case Mi:return(s.displayName||"Context")+".Provider";case kl:return(s._context.displayName||"Context")+".Consumer";case Tu:var u=s.render;return s=s.displayName,s||(s=u.displayName||u.name||"",s=s!==""?"ForwardRef("+s+")":"ForwardRef"),s;case Mr:return u=s.displayName||null,u!==null?u:d(s.type)||"Memo";case li:u=s._payload,s=s._init;try{return d(s(u))}catch{}}return null}function m(s){if(Po===void 0)try{throw Error()}catch(h){var u=h.stack.trim().match(/\n( *(at )?)/);Po=u&&u[1]||"",Gf=-1<h.stack.indexOf(`
|
|
334
|
+
at`)?" (<anonymous>)":-1<h.stack.indexOf("@")?"@unknown:0:0":""}return`
|
|
335
|
+
`+Po+s+Gf}function g(s,u){if(!s||Zl)return"";Zl=!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(Yt){var bt=Yt}Reflect.construct(s,[],St)}else{try{St.call()}catch(Yt){bt=Yt}s.call(St.prototype)}}else{try{throw Error()}catch(Yt){bt=Yt}(St=s())&&typeof St.catch=="function"&&St.catch(function(){})}}catch(Yt){if(Yt&&bt&&typeof Yt.stack=="string")return[Yt.stack,bt.stack]}return[null,null]}};y.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var S=Object.getOwnPropertyDescriptor(y.DetermineComponentFrameRoot,"name");S&&S.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(S=y=0;y<P.length&&!P[y].includes("DetermineComponentFrameRoot");)y++;for(;S<ut.length&&!ut[S].includes("DetermineComponentFrameRoot");)S++;if(y===P.length||S===ut.length)for(y=P.length-1,S=ut.length-1;1<=y&&0<=S&&P[y]!==ut[S];)S--;for(;1<=y&&0<=S;y--,S--)if(P[y]!==ut[S]){if(y!==1||S!==1)do if(y--,S--,0>S||P[y]!==ut[S]){var gt=`
|
|
338
|
+
`+P[y].replace(" at new "," at ");return s.displayName&>.includes("<anonymous>")&&(gt=gt.replace("<anonymous>",s.displayName)),gt}while(1<=y&&0<=S);break}}}finally{Zl=!1,Error.prepareStackTrace=h}return(h=s?s.displayName||s.name:"")?m(h):""}function v(s){switch(s.tag){case 26:case 27:case 5:return m(s.type);case 16:return m("Lazy");case 13:return m("Suspense");case 19:return m("SuspenseList");case 0:case 15:return s=g(s.type,!1),s;case 11:return s=g(s.type.render,!1),s;case 1:return s=g(s.type,!0),s;default:return""}}function _(s){try{var u="";do u+=v(s),s=s.return;while(s);return u}catch(h){return`
|
|
339
|
+
Error generating stack: `+h.message+`
|
|
340
|
+
`+h.stack}}function b(s){var u=s,h=s;if(s.alternate)for(;u.return;)u=u.return;else{s=u;do u=s,(u.flags&4098)!==0&&(h=u.return),s=u.return;while(s)}return u.tag===3?h:null}function C(s){if(b(s)!==s)throw Error(o(188))}function E(s){var u=s.alternate;if(!u){if(u=b(s),u===null)throw Error(o(188));return u!==s?null:s}for(var h=s,y=u;;){var S=h.return;if(S===null)break;var T=S.alternate;if(T===null){if(y=S.return,y!==null){h=y;continue}break}if(S.child===T.child){for(T=S.child;T;){if(T===h)return C(S),s;if(T===y)return C(S),u;T=T.sibling}throw Error(o(188))}if(h.return!==y.return)h=S,y=T;else{for(var N=!1,q=S.child;q;){if(q===h){N=!0,h=S,y=T;break}if(q===y){N=!0,y=S,h=T;break}q=q.sibling}if(!N){for(q=T.child;q;){if(q===h){N=!0,h=T,y=S;break}if(q===y){N=!0,y=T,h=S;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?s:u}function M(s){var u=s.tag;if(u===5||u===26||u===27||u===6)return s;for(s=s.child;s!==null;){if(u=M(s),u!==null)return u;s=s.sibling}return null}function z(s){var u=s.tag;if(u===5||u===26||u===27||u===6)return s;for(s=s.child;s!==null;){if(s.tag!==4&&(u=z(s),u!==null))return u;s=s.sibling}return null}function R(s){return{current:s}}function D(s){0>cl||(s.current=Hr[cl],Hr[cl]=null,cl--)}function U(s,u){cl++,Hr[cl]=s.current,s.current=u}function B(s){return s>>>=0,s===0?32:31-(Gr(s)/hm|0)|0}function G(s){var u=s&42;if(u!==0)return u;switch(s&-s){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 s&4194176;case 4194304:case 8388608:case 16777216:case 33554432:return s&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return s}}function Q(s,u){var h=s.pendingLanes;if(h===0)return 0;var y=0,S=s.suspendedLanes,T=s.pingedLanes,N=s.warmLanes;s=s.finishedLanes!==0;var q=h&134217727;return q!==0?(h=q&~S,h!==0?y=G(h):(T&=q,T!==0?y=G(T):s||(N=q&~N,N!==0&&(y=G(N))))):(q=h&~S,q!==0?y=G(q):T!==0?y=G(T):s||(N=h&~N,N!==0&&(y=G(N)))),y===0?0:u!==0&&u!==y&&(u&S)===0&&(S=y&-y,N=u&-u,S>=N||S===32&&(N&4194176)!==0)?u:y}function V(s,u){return(s.pendingLanes&~(s.suspendedLanes&~s.pingedLanes)&u)===0}function K(s,u){switch(s){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 s=Mu;return Mu<<=1,(Mu&4194176)===0&&(Mu=128),s}function ot(){var s=jr;return jr<<=1,(jr&62914560)===0&&(jr=4194304),s}function ft(s){for(var u=[],h=0;31>h;h++)u.push(s);return u}function ht(s,u){s.pendingLanes|=u,u!==268435456&&(s.suspendedLanes=0,s.pingedLanes=0,s.warmLanes=0)}function vt(s,u,h,y,S,T){var N=s.pendingLanes;s.pendingLanes=h,s.suspendedLanes=0,s.pingedLanes=0,s.warmLanes=0,s.expiredLanes&=h,s.entangledLanes&=h,s.errorRecoveryDisabledLanes&=h,s.shellSuspendCounter=0;var q=s.entanglements,P=s.expirationTimes,ut=s.hiddenUpdates;for(h=N&~h;0<h;){var gt=31-ia(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 Yt=bt[gt];Yt!==null&&(Yt.lane&=-536870913)}h&=~St}y!==0&&_t(s,y,0),T!==0&&S===0&&s.tag!==0&&(s.suspendedLanes|=T&~(N&~u))}function _t(s,u,h){s.pendingLanes|=u,s.suspendedLanes&=~u;var y=31-ia(u);s.entangledLanes|=u,s.entanglements[y]=s.entanglements[y]|1073741824|h&4194218}function xt(s,u){var h=s.entangledLanes|=u;for(s=s.entanglements;h;){var y=31-ia(h),S=1<<y;S&u|s[y]&u&&(s[y]|=u),h&=~S}}function Dt(s){return s&=-s,2<s?8<s?(s&134217727)!==0?32:268435456:8:2}function w(s){if(la&&typeof la.onCommitFiberRoot=="function")try{la.onCommitFiberRoot(zu,s,void 0,(s.current.flags&128)===128)}catch{}}function H(s){if(typeof ym=="function"&&mh(s),la&&typeof la.setStrictMode=="function")try{la.setStrictMode(zu,s)}catch{}}function at(s,u){return s===u&&(s!==0||1/s===1/u)||s!==s&&u!==u}function et(s,u){if(typeof s=="object"&&s!==null){var h=hc.get(s);return h!==void 0?h:(u={value:s,source:u,stack:_(u)},hc.set(s,u),u)}return{value:s,source:u,stack:_(u)}}function dt(s,u){Ue[Le++]=Lr,Ue[Le++]=Yr,Yr=s,Lr=u}function j(s,u,h){Ca[Aa++]=Ni,Ca[Aa++]=Qa,Ca[Aa++]=si,si=s;var y=Ni;s=Qa;var S=32-ia(y)-1;y&=~(1<<S),h+=1;var T=32-ia(u)+S;if(30<T){var N=S-S%5;T=(y&(1<<N)-1).toString(32),y>>=N,S-=N,Ni=1<<32-ia(u)+S|h<<S|y,Qa=T+s}else Ni=1<<T|h<<S|y,Qa=s}function I(s){s.return!==null&&(dt(s,1),j(s,1,0))}function st(s){for(;s===Yr;)Yr=Ue[--Le],Ue[Le]=null,Lr=Ue[--Le],Ue[Le]=null;for(;s===si;)si=Ca[--Aa],Ca[Aa]=null,Qa=Ca[--Aa],Ca[Aa]=null,Ni=Ca[--Aa],Ca[Aa]=null}function yt(s,u){U(ui,u),U(Xr,s),U(_n,null),s=Os(u),D(_n),U(_n,s)}function Tt(){D(_n),D(Xr),D(ui)}function Ot(s){s.memoizedState!==null&&U(Du,s);var u=_n.current,h=kd(u,s.type);u!==h&&(U(Xr,s),U(_n,h))}function Bt(s){Xr.current===s&&(D(_n),D(Xr)),Du.current===s&&(D(Du),zi?Ht._currentValue=aa:Ht._currentValue2=aa)}function fe(s){var u=Error(o(418,""));throw Fn(et(u,s)),Vr}function ce(s,u){if(!kn)throw Error(o(175));Bp(s.stateNode,s.type,s.memoizedProps,u,s)||fe(s)}function pa(s){for(wn=s.return;wn;)switch(wn.tag){case 3:case 27:ka=!0;return;case 5:case 13:ka=!1;return;default:wn=wn.return}}function ja(s){if(!kn||s!==wn)return!1;if(!se)return pa(s),se=!0,!1;var u=!1;if(Cn?s.tag!==3&&s.tag!==27&&(s.tag!==5||um(s.type)&&!Wl(s.type,s.memoizedProps))&&(u=!0):s.tag!==3&&(s.tag!==5||um(s.type)&&!Wl(s.type,s.memoizedProps))&&(u=!0),u&&Mn&&fe(s),pa(s),s.tag===13){if(!kn)throw Error(o(316));if(s=s.memoizedState,s=s!==null?s.dehydrated:null,!s)throw Error(o(317));Mn=lm(s)}else Mn=wn?eh(s.stateNode):null;return!0}function Yn(){kn&&(Mn=wn=null,se=!1)}function Fn(s){Ma===null?Ma=[s]:Ma.push(s)}function pn(){for(var s=Il,u=Ou=Il=0;u<s;){var h=Ra[u];Ra[u++]=null;var y=Ra[u];Ra[u++]=null;var S=Ra[u];Ra[u++]=null;var T=Ra[u];if(Ra[u++]=null,y!==null&&S!==null){var N=y.pending;N===null?S.next=S:(S.next=N.next,N.next=S),y.pending=S}T!==0&&Wu(h,S,T)}}function In(s,u,h,y){Ra[Il++]=s,Ra[Il++]=u,Ra[Il++]=h,Ra[Il++]=y,Ou|=y,s.lanes|=y,s=s.alternate,s!==null&&(s.lanes|=y)}function fs(s,u,h,y){return In(s,u,h,y),hs(s)}function Ia(s,u){return In(s,null,null,u),hs(s)}function Wu(s,u,h){s.lanes|=h;var y=s.alternate;y!==null&&(y.lanes|=h);for(var S=!1,T=s.return;T!==null;)T.childLanes|=h,y=T.alternate,y!==null&&(y.childLanes|=h),T.tag===22&&(s=T.stateNode,s===null||s._visibility&1||(S=!0)),s=T,T=T.return;S&&u!==null&&s.tag===3&&(T=s.stateNode,S=31-ia(h),T=T.hiddenUpdates,s=T[S],s===null?T[S]=[u]:s.push(u),u.lane=h|536870912)}function hs(s){if(50<Xs)throw Xs=0,Jn=null,Error(o(185));for(var u=s.return;u!==null;)s=u,u=s.return;return s.tag===3?s.stateNode:null}function qa(s){s!==ws&&s.next===null&&(ws===null?Nu=ws=s:ws=ws.next=s),kr=!0,Qr||(Qr=!0,rd(Rp))}function Cl(s,u){if(!ri&&kr){ri=!0;do for(var h=!1,y=Nu;y!==null;){if(s!==0){var S=y.pendingLanes;if(S===0)var T=0;else{var N=y.suspendedLanes,q=y.pingedLanes;T=(1<<31-ia(42|s)+1)-1,T&=S&~(N&~q),T=T&201326677?T&201326677|1:T?T|2:0}T!==0&&(h=!0,ud(y,T))}else T=Kt,T=Q(y,y===Pt?T:0),(T&3)===0||V(y,T)||(h=!0,ud(y,T));y=y.next}while(h);ri=!1}}function Rp(){kr=Qr=!1;var s=0;$l!==0&&(Fl()&&(s=$l),$l=0);for(var u=An(),h=null,y=Nu;y!==null;){var S=y.next,T=sd(y,u);T===0?(y.next=null,h===null?Nu=S:h.next=S,S===null&&(ws=h)):(h=y,(s!==0||(T&3)!==0)&&(kr=!0)),y=S}Cl(s)}function sd(s,u){for(var h=s.suspendedLanes,y=s.pingedLanes,S=s.expirationTimes,T=s.pendingLanes&-62914561;0<T;){var N=31-ia(T),q=1<<N,P=S[N];P===-1?((q&h)===0||(q&y)!==0)&&(S[N]=K(q,u)):P<=u&&(s.expiredLanes|=q),T&=~q}if(u=Pt,h=Kt,h=Q(s,s===u?h:0),y=s.callbackNode,h===0||s===u&&be===2||s.cancelPendingCommit!==null)return y!==null&&y!==null&&qr(y),s.callbackNode=null,s.callbackPriority=0;if((h&3)===0||V(s,h)){if(u=h&-h,u===s.callbackPriority)return u;switch(y!==null&&qr(y),Dt(h)){case 2:case 8:h=pm;break;case 32:h=cc;break;case 268435456:h=fc;break;default:h=cc}return y=$n.bind(null,s),h=Ru(h,y),s.callbackPriority=u,s.callbackNode=h,u}return y!==null&&y!==null&&qr(y),s.callbackPriority=2,s.callbackNode=null,2}function $n(s,u){var h=s.callbackNode;if(vn()&&s.callbackNode!==h)return null;var y=Kt;return y=Q(s,s===Pt?y:0),y===0?null:(br(s,y,u),sd(s,An()),s.callbackNode!=null&&s.callbackNode===h?$n.bind(null,s):null)}function ud(s,u){if(vn())return null;br(s,u,!0)}function rd(s){en?$o(function(){(Rt&6)!==0?Ru(dh,s):s()}):Ru(dh,s)}function co(){return $l===0&&($l=pt()),$l}function fo(s,u){if(Kr===null){var h=Kr=[];dc=0,sa=co(),ts={status:"pending",value:void 0,then:function(y){h.push(y)}}}return dc++,u.then(od,od),u}function od(){if(--dc===0&&Kr!==null){ts!==null&&(ts.status="fulfilled");var s=Kr;Kr=null,sa=0,ts=null;for(var u=0;u<s.length;u++)(0,s[u])()}}function cd(s,u){var h=[],y={status:"pending",value:null,reason:null,then:function(S){h.push(S)}};return s.then(function(){y.status="fulfilled",y.value=u;for(var S=0;S<h.length;S++)(0,h[S])(u)},function(S){for(y.status="rejected",y.reason=S,S=0;S<h.length;S++)(0,h[S])(void 0)}),y}function Pc(s){s.updateQueue={baseState:s.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Wc(s,u){s=s.updateQueue,u.updateQueue===s&&(u.updateQueue={baseState:s.baseState,firstBaseUpdate:s.firstBaseUpdate,lastBaseUpdate:s.lastBaseUpdate,shared:s.shared,callbacks:null})}function Ya(s){return{lane:s,tag:0,payload:null,callback:null,next:null}}function $e(s,u,h){var y=s.updateQueue;if(y===null)return null;if(y=y.shared,(Rt&2)!==0){var S=y.pending;return S===null?u.next=u:(u.next=S.next,S.next=u),y.pending=u,u=hs(s),Wu(s,null,h),u}return In(s,y,u,h),hs(s)}function La(s,u,h){if(u=u.updateQueue,u!==null&&(u=u.shared,(h&4194176)!==0)){var y=u.lanes;y&=s.pendingLanes,h|=y,u.lanes=h,xt(s,h)}}function Ln(s,u){var h=s.updateQueue,y=s.alternate;if(y!==null&&(y=y.updateQueue,h===y)){var S=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?S=T=N:T=T.next=N,h=h.next}while(h!==null);T===null?S=T=u:T=T.next=u}else S=T=u;h={baseState:y.baseState,firstBaseUpdate:S,lastBaseUpdate:T,shared:y.shared,callbacks:y.callbacks},s.updateQueue=h;return}s=h.lastBaseUpdate,s===null?h.firstBaseUpdate=u:s.next=u,h.lastBaseUpdate=u}function Fu(){if(Uu){var s=ts;if(s!==null)throw s}}function Iu(s,u,h,y){Uu=!1;var S=s.updateQueue;fl=!1;var T=S.firstBaseUpdate,N=S.lastBaseUpdate,q=S.shared.pending;if(q!==null){S.shared.pending=null;var P=q,ut=P.next;P.next=null,N===null?T=ut:N.next=ut,N=P;var gt=s.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=S.baseState;N=0,gt=ut=P=null,q=T;do{var bt=q.lane&-536870913,Yt=bt!==q.lane;if(Yt?(Kt&bt)===bt:(y&bt)===bt){bt!==0&&bt===sa&&(Uu=!0),gt!==null&&(gt=gt.next={lane:0,tag:q.tag,payload:q.payload,callback:null,next:null});t:{var ca=s,Wr=q;bt=u;var Vs=h;switch(Wr.tag){case 1:if(ca=Wr.payload,typeof ca=="function"){St=ca.call(Vs,St,bt);break t}St=ca;break t;case 3:ca.flags=ca.flags&-65537|128;case 0:if(ca=Wr.payload,bt=typeof ca=="function"?ca.call(Vs,St,bt):ca,bt==null)break t;St=zs({},St,bt);break t;case 2:fl=!0}}bt=q.callback,bt!==null&&(s.flags|=64,Yt&&(s.flags|=8192),Yt=S.callbacks,Yt===null?S.callbacks=[bt]:Yt.push(bt))}else Yt={lane:bt,tag:q.tag,payload:q.payload,callback:q.callback,next:null},gt===null?(ut=gt=Yt,P=St):gt=gt.next=Yt,N|=bt;if(q=q.next,q===null){if(q=S.shared.pending,q===null)break;Yt=q,q=Yt.next,Yt.next=null,S.lastBaseUpdate=Yt,S.shared.pending=null}}while(!0);gt===null&&(P=St),S.baseState=P,S.firstBaseUpdate=ut,S.lastBaseUpdate=gt,T===null&&(S.shared.lanes=0),Na|=N,s.lanes=N,s.memoizedState=St}}function fd(s,u){if(typeof s!="function")throw Error(o(191,s));s.call(u)}function $u(s,u){var h=s.callbacks;if(h!==null)for(s.callbacks=null,s=0;s<h.length;s++)fd(h[s],u)}function ds(s,u){if(Ea(s,u))return!0;if(typeof s!="object"||s===null||typeof u!="object"||u===null)return!1;var h=Object.keys(s),y=Object.keys(u);if(h.length!==y.length)return!1;for(y=0;y<h.length;y++){var S=h[y];if(!Zr.call(u,S)||!Ea(s[S],u[S]))return!1}return!0}function tr(s){return s=s.status,s==="fulfilled"||s==="rejected"}function yi(){}function er(s,u,h){switch(h=s[h],h===void 0?s.push(u):h!==u&&(u.then(yi,yi),u=h),u.status){case"fulfilled":return u.value;case"rejected":throw s=u.reason,s===xe?Error(o(483)):s;default:if(typeof u.status=="string")u.then(yi,yi);else{if(s=Pt,s!==null&&100<s.shellSuspendCounter)throw Error(o(482));s=u,s.status="pending",s.then(function(y){if(u.status==="pending"){var S=u;S.status="fulfilled",S.value=y}},function(y){if(u.status==="pending"){var S=u;S.status="rejected",S.reason=y}})}switch(u.status){case"fulfilled":return u.value;case"rejected":throw s=u.reason,s===xe?Error(o(483)):s}throw Hs=u,xe}}function eu(){if(Hs===null)throw Error(o(459));var s=Hs;return Hs=null,s}function ho(s){var u=Ka;return Ka+=1,Ui===null&&(Ui=[]),er(Ui,s,u)}function nu(s,u){u=u.props.ref,s.ref=u!==void 0?u:null}function au(s,u){throw u.$$typeof===Uf?Error(o(525)):(s=Object.prototype.toString.call(u),Error(o(31,s==="[object Object]"?"object with keys {"+Object.keys(u).join(", ")+"}":s)))}function iu(s){var u=s._init;return u(s._payload)}function hd(s){function u($,Z){if(s){var nt=$.deletions;nt===null?($.deletions=[Z],$.flags|=16):nt.push(Z)}}function h($,Z){if(!s)return null;for(;Z!==null;)u($,Z),Z=Z.sibling;return null}function y($){for(var Z=new Map;$!==null;)$.key!==null?Z.set($.key,$):Z.set($.index,$),$=$.sibling;return Z}function S($,Z){return $=Un($,Z),$.index=0,$.sibling=null,$}function T($,Z,nt){return $.index=nt,s?(nt=$.alternate,nt!==null?(nt=nt.index,nt<Z?($.flags|=33554434,Z):nt):($.flags|=33554434,Z)):($.flags|=1048576,Z)}function N($){return s&&$.alternate===null&&($.flags|=33554434),$}function q($,Z,nt,mt){return Z===null||Z.tag!==6?(Z=Ql(nt,$.mode,mt),Z.return=$,Z):(Z=S(Z,nt),Z.return=$,Z)}function P($,Z,nt,mt){var At=nt.type;return At===bu?gt($,Z,nt.props.children,mt,nt.key):Z!==null&&(Z.elementType===At||typeof At=="object"&&At!==null&&At.$$typeof===li&&iu(At)===Z.type)?(Z=S(Z,nt.props),nu(Z,nt),Z.return=$,Z):(Z=Xa(nt.type,nt.key,nt.props,null,$.mode,mt),nu(Z,nt),Z.return=$,Z)}function ut($,Z,nt,mt){return Z===null||Z.tag!==4||Z.stateNode.containerInfo!==nt.containerInfo||Z.stateNode.implementation!==nt.implementation?(Z=Su(nt,$.mode,mt),Z.return=$,Z):(Z=S(Z,nt.children||[]),Z.return=$,Z)}function gt($,Z,nt,mt,At){return Z===null||Z.tag!==7?(Z=ll(nt,$.mode,mt,At),Z.return=$,Z):(Z=S(Z,nt),Z.return=$,Z)}function St($,Z,nt){if(typeof Z=="string"&&Z!==""||typeof Z=="number"||typeof Z=="bigint")return Z=Ql(""+Z,$.mode,nt),Z.return=$,Z;if(typeof Z=="object"&&Z!==null){switch(Z.$$typeof){case sl:return nt=Xa(Z.type,Z.key,Z.props,null,$.mode,nt),nu(nt,Z),nt.return=$,nt;case ii:return Z=Su(Z,$.mode,nt),Z.return=$,Z;case li:var mt=Z._init;return Z=mt(Z._payload),St($,Z,nt)}if(Jl(Z)||f(Z))return Z=ll(Z,$.mode,nt,null),Z.return=$,Z;if(typeof Z.then=="function")return St($,ho(Z),nt);if(Z.$$typeof===Mi)return St($,gr($,Z),nt);au($,Z)}return null}function bt($,Z,nt,mt){var At=Z!==null?Z.key:null;if(typeof nt=="string"&&nt!==""||typeof nt=="number"||typeof nt=="bigint")return At!==null?null:q($,Z,""+nt,mt);if(typeof nt=="object"&&nt!==null){switch(nt.$$typeof){case sl:return nt.key===At?P($,Z,nt,mt):null;case ii:return nt.key===At?ut($,Z,nt,mt):null;case li:return At=nt._init,nt=At(nt._payload),bt($,Z,nt,mt)}if(Jl(nt)||f(nt))return At!==null?null:gt($,Z,nt,mt,null);if(typeof nt.then=="function")return bt($,Z,ho(nt),mt);if(nt.$$typeof===Mi)return bt($,Z,gr($,nt),mt);au($,nt)}return null}function Yt($,Z,nt,mt,At){if(typeof mt=="string"&&mt!==""||typeof mt=="number"||typeof mt=="bigint")return $=$.get(nt)||null,q(Z,$,""+mt,At);if(typeof mt=="object"&&mt!==null){switch(mt.$$typeof){case sl:return $=$.get(mt.key===null?nt:mt.key)||null,P(Z,$,mt,At);case ii:return $=$.get(mt.key===null?nt:mt.key)||null,ut(Z,$,mt,At);case li:var Ae=mt._init;return mt=Ae(mt._payload),Yt($,Z,nt,mt,At)}if(Jl(mt)||f(mt))return $=$.get(nt)||null,gt(Z,$,mt,At,null);if(typeof mt.then=="function")return Yt($,Z,nt,ho(mt),At);if(mt.$$typeof===Mi)return Yt($,Z,nt,gr(Z,mt),At);au(Z,mt)}return null}function ca($,Z,nt,mt){for(var At=null,Ae=null,Gt=Z,re=Z=0,mn=null;Gt!==null&&re<nt.length;re++){Gt.index>re?(mn=Gt,Gt=null):mn=Gt.sibling;var oe=bt($,Gt,nt[re],mt);if(oe===null){Gt===null&&(Gt=mn);break}s&&Gt&&oe.alternate===null&&u($,Gt),Z=T(oe,Z,re),Ae===null?At=oe:Ae.sibling=oe,Ae=oe,Gt=mn}if(re===nt.length)return h($,Gt),se&&dt($,re),At;if(Gt===null){for(;re<nt.length;re++)Gt=St($,nt[re],mt),Gt!==null&&(Z=T(Gt,Z,re),Ae===null?At=Gt:Ae.sibling=Gt,Ae=Gt);return se&&dt($,re),At}for(Gt=y(Gt);re<nt.length;re++)mn=Yt(Gt,$,re,nt[re],mt),mn!==null&&(s&&mn.alternate!==null&&Gt.delete(mn.key===null?re:mn.key),Z=T(mn,Z,re),Ae===null?At=mn:Ae.sibling=mn,Ae=mn);return s&&Gt.forEach(function(vl){return u($,vl)}),se&&dt($,re),At}function Wr($,Z,nt,mt){if(nt==null)throw Error(o(151));for(var At=null,Ae=null,Gt=Z,re=Z=0,mn=null,oe=nt.next();Gt!==null&&!oe.done;re++,oe=nt.next()){Gt.index>re?(mn=Gt,Gt=null):mn=Gt.sibling;var vl=bt($,Gt,oe.value,mt);if(vl===null){Gt===null&&(Gt=mn);break}s&&Gt&&vl.alternate===null&&u($,Gt),Z=T(vl,Z,re),Ae===null?At=vl:Ae.sibling=vl,Ae=vl,Gt=mn}if(oe.done)return h($,Gt),se&&dt($,re),At;if(Gt===null){for(;!oe.done;re++,oe=nt.next())oe=St($,oe.value,mt),oe!==null&&(Z=T(oe,Z,re),Ae===null?At=oe:Ae.sibling=oe,Ae=oe);return se&&dt($,re),At}for(Gt=y(Gt);!oe.done;re++,oe=nt.next())oe=Yt(Gt,$,re,oe.value,mt),oe!==null&&(s&&oe.alternate!==null&&Gt.delete(oe.key===null?re:oe.key),Z=T(oe,Z,re),Ae===null?At=oe:Ae.sibling=oe,Ae=oe);return s&&Gt.forEach(function(bc){return u($,bc)}),se&&dt($,re),At}function Vs($,Z,nt,mt){if(typeof nt=="object"&&nt!==null&&nt.type===bu&&nt.key===null&&(nt=nt.props.children),typeof nt=="object"&&nt!==null){switch(nt.$$typeof){case sl:t:{for(var At=nt.key;Z!==null;){if(Z.key===At){if(At=nt.type,At===bu){if(Z.tag===7){h($,Z.sibling),mt=S(Z,nt.props.children),mt.return=$,$=mt;break t}}else if(Z.elementType===At||typeof At=="object"&&At!==null&&At.$$typeof===li&&iu(At)===Z.type){h($,Z.sibling),mt=S(Z,nt.props),nu(mt,nt),mt.return=$,$=mt;break t}h($,Z);break}else u($,Z);Z=Z.sibling}nt.type===bu?(mt=ll(nt.props.children,$.mode,mt,nt.key),mt.return=$,$=mt):(mt=Xa(nt.type,nt.key,nt.props,null,$.mode,mt),nu(mt,nt),mt.return=$,$=mt)}return N($);case ii:t:{for(At=nt.key;Z!==null;){if(Z.key===At)if(Z.tag===4&&Z.stateNode.containerInfo===nt.containerInfo&&Z.stateNode.implementation===nt.implementation){h($,Z.sibling),mt=S(Z,nt.children||[]),mt.return=$,$=mt;break t}else{h($,Z);break}else u($,Z);Z=Z.sibling}mt=Su(nt,$.mode,mt),mt.return=$,$=mt}return N($);case li:return At=nt._init,nt=At(nt._payload),Vs($,Z,nt,mt)}if(Jl(nt))return ca($,Z,nt,mt);if(f(nt)){if(At=f(nt),typeof At!="function")throw Error(o(150));return nt=At.call(nt),Wr($,Z,nt,mt)}if(typeof nt.then=="function")return Vs($,Z,ho(nt),mt);if(nt.$$typeof===Mi)return Vs($,Z,gr($,nt),mt);au($,nt)}return typeof nt=="string"&&nt!==""||typeof nt=="number"||typeof nt=="bigint"?(nt=""+nt,Z!==null&&Z.tag===6?(h($,Z.sibling),mt=S(Z,nt),mt.return=$,$=mt):(h($,Z),mt=Ql(nt,$.mode,mt),mt.return=$,$=mt),N($)):h($,Z)}return function($,Z,nt,mt){try{Ka=0;var At=Vs($,Z,nt,mt);return Ui=null,At}catch(Gt){if(Gt===xe)throw Gt;var Ae=n(29,Gt,null,$.mode);return Ae.lanes=mt,Ae.return=$,Ae}finally{}}}function Fc(s,u){s=oi,U(za,s),U(Bi,u),oi=s|u.baseLanes}function mo(){U(za,oi),U(Bi,Bi.current)}function po(){oi=za.current,D(Bi),D(za)}function gi(s){var u=s.alternate;U(nn,nn.current&1),U(Da,s),Za===null&&(u===null||Bi.current!==null||u.memoizedState!==null)&&(Za=s)}function yo(s){if(s.tag===22){if(U(nn,nn.current),U(Da,s),Za===null){var u=s.alternate;u!==null&&u.memoizedState!==null&&(Za=s)}}else Zi()}function Zi(){U(nn,nn.current),U(Da,Da.current)}function vi(s){D(Da),Za===s&&(Za=null),D(nn)}function $a(s){for(var u=s;u!==null;){if(u.tag===13){var h=u.memoizedState;if(h!==null&&(h=h.dehydrated,h===null||ic(h)||wr(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===s)break;for(;u.sibling===null;){if(u.return===null||u.return===s)return null;u=u.return}u.sibling.return=u.return,u=u.sibling}return null}function Ft(){throw Error(o(321))}function zn(s,u){if(u===null)return!1;for(var h=0;h<u.length&&h<s.length;h++)if(!Ea(s[h],u[h]))return!1;return!0}function Al(s,u,h,y,S,T){return wi=T,Qt=u,u.memoizedState=null,u.updateQueue=null,u.lanes=0,Nt.H=s===null||s.memoizedState===null?an:Hn,hl=!1,T=h(y,S),hl=!1,Be&&(T=dd(u,h,y,S)),go(s),T}function go(s){Nt.H=ue;var u=he!==null&&he.next!==null;if(wi=0,Ze=he=Qt=null,Ja=!1,Xe=0,Bu=null,u)throw Error(o(300));s===null||Je||(s=s.dependencies,s!==null&&Ul(s)&&(Je=!0))}function dd(s,u,h,y){Qt=s;var S=0;do{if(Be&&(Bu=null),Xe=0,Be=!1,25<=S)throw Error(o(301));if(S+=1,Ze=he=null,s.updateQueue!=null){var T=s.updateQueue;T.lastEffect=null,T.events=null,T.stores=null,T.memoCache!=null&&(T.memoCache.index=0)}Nt.H=ns,T=u(h,y)}while(Be);return T}function zp(){var s=Nt.H,u=s.useState()[0];return u=typeof u.then=="function"?Ji(u):u,s=s.useState()[0],(he!==null?he.memoizedState:null)!==s&&(Qt.flags|=1024),u}function vo(){var s=Jr!==0;return Jr=0,s}function ms(s,u,h){u.updateQueue=s.updateQueue,u.flags&=-2053,s.lanes&=~h}function nr(s){if(Ja){for(s=s.memoizedState;s!==null;){var u=s.queue;u!==null&&(u.pending=null),s=s.next}Ja=!1}wi=0,Ze=he=Qt=null,Be=!1,Xe=Jr=0,Bu=null}function fn(){var s={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Ze===null?Qt.memoizedState=Ze=s:Ze=Ze.next=s,Ze}function De(){if(he===null){var s=Qt.alternate;s=s!==null?s.memoizedState:null}else s=he.next;var u=Ze===null?Qt.memoizedState:Ze.next;if(u!==null)Ze=u,he=s;else{if(s===null)throw Qt.alternate===null?Error(o(467)):Error(o(310));he=s,s={memoizedState:he.memoizedState,baseState:he.baseState,baseQueue:he.baseQueue,queue:he.queue,next:null},Ze===null?Qt.memoizedState=Ze=s:Ze=Ze.next=s}return Ze}function Ji(s){var u=Xe;return Xe+=1,Bu===null&&(Bu=[]),s=er(Bu,s,u),u=Qt,(Ze===null?u.memoizedState:Ze.next)===null&&(u=u.alternate,Nt.H=u===null||u.memoizedState===null?an:Hn),s}function Pi(s){if(s!==null&&typeof s=="object"){if(typeof s.then=="function")return Ji(s);if(s.$$typeof===Mi)return bn(s)}throw Error(o(438,String(s)))}function tn(s){var u=null,h=Qt.updateQueue;if(h!==null&&(u=h.memoCache),u==null){var y=Qt.alternate;y!==null&&(y=y.updateQueue,y!==null&&(y=y.memoCache,y!=null&&(u={data:y.data.map(function(S){return S.slice()}),index:0})))}if(u==null&&(u={data:[],index:0}),h===null&&(h=pc(),Qt.updateQueue=h),h.memoCache=u,h=u.data[u.index],h===void 0)for(h=u.data[u.index]=Array(s),y=0;y<s;y++)h[y]=Qd;return u.index++,h}function xi(s,u){return typeof u=="function"?u(s):u}function ar(s){var u=De();return Wi(u,he,s)}function Wi(s,u,h){var y=s.queue;if(y===null)throw Error(o(311));y.lastRenderedReducer=h;var S=s.baseQueue,T=y.pending;if(T!==null){if(S!==null){var N=S.next;S.next=T.next,T.next=N}u.baseQueue=S=T,y.pending=null}if(T=s.baseState,S===null)s.memoizedState=T;else{u=S.next;var q=N=null,P=null,ut=u,gt=!1;do{var St=ut.lane&-536870913;if(St!==ut.lane?(Kt&St)===St:(wi&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===sa&&(gt=!0);else if((wi&bt)===bt){ut=ut.next,bt===sa&&(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,Qt.lanes|=bt,Na|=bt;St=ut.action,hl&&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,Qt.lanes|=St,Na|=St;ut=ut.next}while(ut!==null&&ut!==u);if(P===null?N=T:P.next=q,!Ea(T,s.memoizedState)&&(Je=!0,gt&&(h=ts,h!==null)))throw h;s.memoizedState=T,s.baseState=N,s.baseQueue=P,y.lastRenderedState=T}return S===null&&(y.lanes=0),[s.memoizedState,y.dispatch]}function Ml(s){var u=De(),h=u.queue;if(h===null)throw Error(o(311));h.lastRenderedReducer=s;var y=h.dispatch,S=h.pending,T=u.memoizedState;if(S!==null){h.pending=null;var N=S=S.next;do T=s(T,N.action),N=N.next;while(N!==S);Ea(T,u.memoizedState)||(Je=!0),u.memoizedState=T,u.baseQueue===null&&(u.baseState=T),h.lastRenderedState=T}return[T,y]}function md(s,u,h){var y=Qt,S=De(),T=se;if(T){if(h===void 0)throw Error(o(407));h=h()}else h=u();var N=!Ea((he||S).memoizedState,h);if(N&&(S.memoizedState=h,Je=!0),S=S.queue,ur(pd.bind(null,y,S,s),[s]),S.getSnapshot!==u||N||Ze!==null&&Ze.memoizedState.tag&1){if(y.flags|=2048,ps(9,$c.bind(null,y,S,h,u),{destroy:void 0},null),Pt===null)throw Error(o(349));T||(wi&60)!==0||Ic(y,u,h)}return h}function Ic(s,u,h){s.flags|=16384,s={getSnapshot:u,value:h},u=Qt.updateQueue,u===null?(u=pc(),Qt.updateQueue=u,u.stores=[s]):(h=u.stores,h===null?u.stores=[s]:h.push(s))}function $c(s,u,h,y){u.value=h,u.getSnapshot=y,ir(u)&&lr(s)}function pd(s,u,h){return h(function(){ir(u)&&lr(s)})}function ir(s){var u=s.getSnapshot;s=s.value;try{var h=u();return!Ea(s,h)}catch{return!0}}function lr(s){var u=Ia(s,2);u!==null&&Nn(u,s,2)}function ti(s){var u=fn();if(typeof s=="function"){var h=s;if(s=h(),hl){H(!0);try{h()}finally{H(!1)}}}return u.memoizedState=u.baseState=s,u.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:xi,lastRenderedState:s},u}function ya(s,u,h,y){return s.baseState=h,Wi(s,he,typeof y=="function"?y:xi)}function yd(s,u,h,y,S){if(xs(s))throw Error(o(485));if(s=u.action,s!==null){var T={payload:S,action:s,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,gd(u,T)):(T.next=h.next,u.pending=h.next=T)}}function gd(s,u){var h=u.action,y=u.payload,S=s.state;if(u.isTransition){var T=Nt.T,N={};Nt.T=N;try{var q=h(S,y),P=Nt.S;P!==null&&P(N,q),xo(s,u,q)}catch(ut){lu(s,u,ut)}finally{Nt.T=T}}else try{T=h(S,y),xo(s,u,T)}catch(ut){lu(s,u,ut)}}function xo(s,u,h){h!==null&&typeof h=="object"&&typeof h.then=="function"?h.then(function(y){tf(s,u,y)},function(y){return lu(s,u,y)}):tf(s,u,h)}function tf(s,u,h){u.status="fulfilled",u.value=h,vd(u),s.state=h,u=s.pending,u!==null&&(h=u.next,h===u?s.pending=null:(h=h.next,u.next=h,gd(s,h)))}function lu(s,u,h){var y=s.pending;if(s.pending=null,y!==null){y=y.next;do u.status="rejected",u.reason=h,vd(u),u=u.next;while(u!==y)}s.action=null}function vd(s){s=s.listeners;for(var u=0;u<s.length;u++)(0,s[u])()}function ga(s,u){return u}function _o(s,u){if(se){var h=Pt.formState;if(h!==null){t:{var y=Qt;if(se){if(Mn){var S=Fd(Mn,ka);if(S){Mn=eh(S),y=Id(S);break t}}fe(y)}y=!1}y&&(u=h[0])}}h=fn(),h.memoizedState=h.baseState=u,y={pending:null,lanes:0,dispatch:null,lastRenderedReducer:ga,lastRenderedState:u},h.queue=y,h=Ao.bind(null,Qt,y),y.dispatch=h,y=ti(!1);var T=Mo.bind(null,Qt,!1,y.queue);return y=fn(),S={state:u,dispatch:null,action:s,pending:null},y.queue=S,h=yd.bind(null,Qt,S,T,h),S.dispatch=h,y.memoizedState=s,[u,h,!1]}function ef(s){var u=De();return So(u,he,s)}function So(s,u,h){u=Wi(s,u,ga)[0],s=ar(xi)[0],u=typeof u=="object"&&u!==null&&typeof u.then=="function"?Ji(u):u;var y=De(),S=y.queue,T=S.dispatch;return h!==y.memoizedState&&(Qt.flags|=2048,ps(9,su.bind(null,S,h),{destroy:void 0},null)),[u,T,s]}function su(s,u){s.action=u}function nf(s){var u=De(),h=he;if(h!==null)return So(u,h,s);De(),u=u.memoizedState,h=De();var y=h.queue.dispatch;return h.memoizedState=s,[u,y,!1]}function ps(s,u,h,y){return s={tag:s,create:u,inst:h,deps:y,next:null},u=Qt.updateQueue,u===null&&(u=pc(),Qt.updateQueue=u),h=u.lastEffect,h===null?u.lastEffect=s.next=s:(y=h.next,h.next=s,s.next=y,u.lastEffect=s),s}function ys(){return De().memoizedState}function bo(s,u,h,y){var S=fn();Qt.flags|=s,S.memoizedState=ps(1|u,h,{destroy:void 0},y===void 0?null:y)}function sr(s,u,h,y){var S=De();y=y===void 0?null:y;var T=S.memoizedState.inst;he!==null&&y!==null&&zn(y,he.memoizedState.deps)?S.memoizedState=ps(u,h,T,y):(Qt.flags|=s,S.memoizedState=ps(1|u,h,T,y))}function af(s,u){bo(8390656,8,s,u)}function ur(s,u){sr(2048,8,s,u)}function xd(s,u){return sr(4,2,s,u)}function _d(s,u){return sr(4,4,s,u)}function rr(s,u){if(typeof u=="function"){s=s();var h=u(s);return function(){typeof h=="function"?h():u(null)}}if(u!=null)return s=s(),u.current=s,function(){u.current=null}}function _i(s,u,h){h=h!=null?h.concat([s]):null,sr(4,4,rr.bind(null,u,s),h)}function or(){}function To(s,u){var h=De();u=u===void 0?null:u;var y=h.memoizedState;return u!==null&&zn(u,y[1])?y[0]:(h.memoizedState=[s,u],s)}function gs(s,u){var h=De();u=u===void 0?null:u;var y=h.memoizedState;if(u!==null&&zn(u,y[1]))return y[0];if(y=s(),hl){H(!0);try{s()}finally{H(!1)}}return h.memoizedState=[y,u],y}function Rl(s,u,h){return h===void 0||(wi&1073741824)!==0?s.memoizedState=u:(s.memoizedState=h,s=Ti(),Qt.lanes|=s,Na|=s,h)}function lf(s,u,h,y){return Ea(h,u)?h:Bi.current!==null?(s=Rl(s,h,y),Ea(s,u)||(Je=!0),s):(wi&42)===0?(Je=!0,s.memoizedState=h):(s=Ti(),Qt.lanes|=s,Na|=s,u)}function Eo(s,u,h,y,S){var T=hn();Bn(T!==0&&8>T?T:8);var N=Nt.T,q={};Nt.T=q,Mo(s,!1,u,h);try{var P=S(),ut=Nt.S;if(ut!==null&&ut(q,P),P!==null&&typeof P=="object"&&typeof P.then=="function"){var gt=cd(P,y);Dl(s,u,gt,Qn(s))}else Dl(s,u,y,Qn(s))}catch(St){Dl(s,u,{then:function(){},status:"rejected",reason:St},Qn())}finally{Bn(T),Nt.T=N}}function sf(s){var u=s.memoizedState;if(u!==null)return u;u={memoizedState:aa,baseState:aa,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:xi,lastRenderedState:aa},next:null};var h={};return u.next={memoizedState:h,baseState:h,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:xi,lastRenderedState:h},next:null},s.memoizedState=u,s=s.alternate,s!==null&&(s.memoizedState=u),u}function vs(){return bn(Ht)}function Si(){return De().memoizedState}function Co(){return De().memoizedState}function cr(s){for(var u=s.return;u!==null;){switch(u.tag){case 24:case 3:var h=Qn();s=Ya(h);var y=$e(u,s,h);y!==null&&(Nn(y,u,h),La(y,u,h)),u={cache:No()},s.payload=u;return}u=u.return}}function zl(s,u,h){var y=Qn();h={lane:y,revertLane:0,action:h,hasEagerState:!1,eagerState:null,next:null},xs(s)?fr(u,h):(h=fs(s,u,h,y),h!==null&&(Nn(h,s,y),uf(h,u,y)))}function Ao(s,u,h){var y=Qn();Dl(s,u,h,y)}function Dl(s,u,h,y){var S={lane:y,revertLane:0,action:h,hasEagerState:!1,eagerState:null,next:null};if(xs(s))fr(u,S);else{var T=s.alternate;if(s.lanes===0&&(T===null||T.lanes===0)&&(T=u.lastRenderedReducer,T!==null))try{var N=u.lastRenderedState,q=T(N,h);if(S.hasEagerState=!0,S.eagerState=q,Ea(q,N))return In(s,u,S,0),Pt===null&&pn(),!1}catch{}finally{}if(h=fs(s,u,S,y),h!==null)return Nn(h,s,y),uf(h,u,y),!0}return!1}function Mo(s,u,h,y){if(y={lane:2,revertLane:co(),action:y,hasEagerState:!1,eagerState:null,next:null},xs(s)){if(u)throw Error(o(479))}else u=fs(s,h,y,2),u!==null&&Nn(u,s,2)}function xs(s){var u=s.alternate;return s===Qt||u!==null&&u===Qt}function fr(s,u){Be=Ja=!0;var h=s.pending;h===null?u.next=u:(u.next=h.next,h.next=u),s.pending=u}function uf(s,u,h){if((h&4194176)!==0){var y=u.lanes;y&=s.pendingLanes,h|=y,u.lanes=h,xt(s,h)}}function Dn(s,u,h,y){u=s.memoizedState,h=h(y,u),h=h==null?u:zs({},u,h),s.memoizedState=h,s.lanes===0&&(s.updateQueue.baseState=h)}function Ol(s,u,h,y,S,T,N){return s=s.stateNode,typeof s.shouldComponentUpdate=="function"?s.shouldComponentUpdate(y,T,N):u.prototype&&u.prototype.isPureReactComponent?!ds(h,y)||!ds(S,T):!0}function hr(s,u,h,y){s=u.state,typeof u.componentWillReceiveProps=="function"&&u.componentWillReceiveProps(h,y),typeof u.UNSAFE_componentWillReceiveProps=="function"&&u.UNSAFE_componentWillReceiveProps(h,y),u.state!==s&&yc.enqueueReplaceState(u,u.state,null)}function ei(s,u){var h=u;if("ref"in u){h={};for(var y in u)y!=="ref"&&(h[y]=u[y])}if(s=s.defaultProps){h===u&&(h=zs({},h));for(var S in s)h[S]===void 0&&(h[S]=s[S])}return h}function Ro(s,u){try{var h=s.onUncaughtError;h(u.value,{componentStack:u.stack})}catch(y){setTimeout(function(){throw y})}}function zo(s,u,h){try{var y=s.onCaughtError;y(h.value,{componentStack:h.stack,errorBoundary:u.tag===1?u.stateNode:null})}catch(S){setTimeout(function(){throw S})}}function dr(s,u,h){return h=Ya(h),h.tag=3,h.payload={element:null},h.callback=function(){Ro(s,u)},h}function uu(s){return s=Ya(s),s.tag=3,s}function mr(s,u,h,y){var S=h.type.getDerivedStateFromError;if(typeof S=="function"){var T=y.value;s.payload=function(){return S(T)},s.callback=function(){zo(u,h,y)}}var N=h.stateNode;N!==null&&typeof N.componentDidCatch=="function"&&(s.callback=function(){zo(u,h,y),typeof S!="function"&&(Ba===null?Ba=new Set([this]):Ba.add(this));var q=y.stack;this.componentDidCatch(y.value,{componentStack:q!==null?q:""})})}function Sd(s,u,h,y,S){if(h.flags|=32768,y!==null&&typeof y=="object"&&typeof y.then=="function"){if(u=h.alternate,u!==null&&_s(u,h,S,!0),h=Da.current,h!==null){switch(h.tag){case 13:return Za===null?na():h.alternate===null&&ae===0&&(ae=3),h.flags&=-257,h.flags|=65536,h.lanes=S,y===mc?h.flags|=16384:(u=h.updateQueue,u===null?h.updateQueue=new Set([y]):u.add(y),Ko(s,y,S)),!1;case 22:return h.flags|=65536,y===mc?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)),Ko(s,y,S)),!1}throw Error(o(435,h.tag))}return Ko(s,y,S),na(),!1}if(se)return u=Da.current,u!==null?((u.flags&65536)===0&&(u.flags|=256),u.flags|=65536,u.lanes=S,y!==Vr&&(s=Error(o(422),{cause:y}),Fn(et(s,h)))):(y!==Vr&&(u=Error(o(423),{cause:y}),Fn(et(u,h))),s=s.current.alternate,s.flags|=65536,S&=-S,s.lanes|=S,y=et(y,h),S=dr(s.stateNode,y,S),Ln(s,S),ae!==4&&(ae=2)),!1;var T=Error(o(520),{cause:y});if(T=et(T,h),Hu===null?Hu=[T]:Hu.push(T),ae!==4&&(ae=2),u===null)return!0;y=et(y,h),h=u;do{switch(h.tag){case 3:return h.flags|=65536,s=S&-S,h.lanes|=s,s=dr(h.stateNode,y,s),Ln(h,s),!1;case 1:if(u=h.type,T=h.stateNode,(h.flags&128)===0&&(typeof u.getDerivedStateFromError=="function"||T!==null&&typeof T.componentDidCatch=="function"&&(Ba===null||!Ba.has(T))))return h.flags|=65536,S&=-S,h.lanes|=S,S=uu(S),mr(S,s,h,y),Ln(h,S),!1}h=h.return}while(h!==null);return!1}function Sn(s,u,h,y){u.child=s===null?yh(u,null,h,y):es(u,s.child,h,y)}function bd(s,u,h,y,S){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 Ss(u),y=Al(s,u,h,N,T,S),q=vo(),s!==null&&!Je?(ms(s,u,S),Fi(s,u,S)):(se&&q&&I(u),u.flags|=1,Sn(s,u,y,S),u.child)}function Td(s,u,h,y,S){if(s===null){var T=h.type;return typeof T=="function"&&!al(T)&&T.defaultProps===void 0&&h.compare===null?(u.tag=15,u.type=T,Do(s,u,T,y,S)):(s=Xa(h.type,null,y,u,u.mode,S),s.ref=u.ref,s.return=u,u.child=s)}if(T=s.child,!mf(s,S)){var N=T.memoizedProps;if(h=h.compare,h=h!==null?h:ds,h(N,y)&&s.ref===u.ref)return Fi(s,u,S)}return u.flags|=1,s=Un(T,y),s.ref=u.ref,s.return=u,u.child=s}function Do(s,u,h,y,S){if(s!==null){var T=s.memoizedProps;if(ds(T,y)&&s.ref===u.ref)if(Je=!1,u.pendingProps=y=T,mf(s,S))(s.flags&131072)!==0&&(Je=!0);else return u.lanes=s.lanes,Fi(s,u,S)}return rf(s,u,h,y,S)}function Ed(s,u,h){var y=u.pendingProps,S=y.children,T=(u.stateNode._pendingVisibility&2)!==0,N=s!==null?s.memoizedState:null;if(pr(s,u),y.mode==="hidden"||T){if((u.flags&128)!==0){if(y=N!==null?N.baseLanes|h:h,s!==null){for(S=u.child=s.child,T=0;S!==null;)T=T|S.lanes|S.childLanes,S=S.sibling;u.childLanes=T&~y}else u.childLanes=0,u.child=null;return Cd(s,u,y,h)}if((h&536870912)!==0)u.memoizedState={baseLanes:0,cachePool:null},s!==null&&Uo(u,N!==null?N.cachePool:null),N!==null?Fc(u,N):mo(),yo(u);else return u.lanes=u.childLanes=536870912,Cd(s,u,N!==null?N.baseLanes|h:h,h)}else N!==null?(Uo(u,N.cachePool),Fc(u,N),Zi(),u.memoizedState=null):(s!==null&&Uo(u,null),mo(),Zi());return Sn(s,u,S,h),u.child}function Cd(s,u,h,y){var S=Bl();return S=S===null?null:{parent:zi?me._currentValue:me._currentValue2,pool:S},u.memoizedState={baseLanes:h,cachePool:S},s!==null&&Uo(u,null),mo(),yo(u),s!==null&&_s(s,u,y,!0),null}function pr(s,u){var h=u.ref;if(h===null)s!==null&&s.ref!==null&&(u.flags|=2097664);else{if(typeof h!="function"&&typeof h!="object")throw Error(o(284));(s===null||s.ref!==h)&&(u.flags|=2097664)}}function rf(s,u,h,y,S){return Ss(u),h=Al(s,u,h,y,void 0,S),y=vo(),s!==null&&!Je?(ms(s,u,S),Fi(s,u,S)):(se&&y&&I(u),u.flags|=1,Sn(s,u,h,S),u.child)}function Ad(s,u,h,y,S,T){return Ss(u),u.updateQueue=null,h=dd(u,y,h,S),go(s),y=vo(),s!==null&&!Je?(ms(s,u,T),Fi(s,u,T)):(se&&y&&I(u),u.flags|=1,Sn(s,u,h,T),u.child)}function of(s,u,h,y,S){if(Ss(u),u.stateNode===null){var T=Bs,N=h.contextType;typeof N=="object"&&N!==null&&(T=bn(N)),T=new h(y,T),u.memoizedState=T.state!==null&&T.state!==void 0?T.state:null,T.updater=yc,u.stateNode=T,T._reactInternals=u,T=u.stateNode,T.props=y,T.state=u.memoizedState,T.refs={},Pc(u),N=h.contextType,T.context=typeof N=="object"&&N!==null?bn(N):Bs,T.state=u.memoizedState,N=h.getDerivedStateFromProps,typeof N=="function"&&(Dn(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&&yc.enqueueReplaceState(T,T.state,null),Iu(u,y,T,S),Fu(),T.state=u.memoizedState),typeof T.componentDidMount=="function"&&(u.flags|=4194308),y=!0}else if(s===null){T=u.stateNode;var q=u.memoizedProps,P=ei(h,q);T.props=P;var ut=T.context,gt=h.contextType;N=Bs,typeof gt=="object"&>!==null&&(N=bn(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)&&hr(u,T,y,N),fl=!1;var bt=u.memoizedState;T.state=bt,Iu(u,y,T,S),Fu(),ut=u.memoizedState,q||bt!==ut||fl?(typeof St=="function"&&(Dn(u,h,St,y),ut=u.memoizedState),(P=fl||Ol(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(s,u),N=u.memoizedProps,gt=ei(h,N),T.props=gt,St=u.pendingProps,bt=T.context,ut=h.contextType,P=Bs,typeof ut=="object"&&ut!==null&&(P=bn(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)&&hr(u,T,y,P),fl=!1,bt=u.memoizedState,T.state=bt,Iu(u,y,T,S),Fu();var Yt=u.memoizedState;N!==St||bt!==Yt||fl||s!==null&&s.dependencies!==null&&Ul(s.dependencies)?(typeof q=="function"&&(Dn(u,h,q,y),Yt=u.memoizedState),(gt=fl||Ol(u,h,gt,y,bt,Yt,P)||s!==null&&s.dependencies!==null&&Ul(s.dependencies))?(ut||typeof T.UNSAFE_componentWillUpdate!="function"&&typeof T.componentWillUpdate!="function"||(typeof T.componentWillUpdate=="function"&&T.componentWillUpdate(y,Yt,P),typeof T.UNSAFE_componentWillUpdate=="function"&&T.UNSAFE_componentWillUpdate(y,Yt,P)),typeof T.componentDidUpdate=="function"&&(u.flags|=4),typeof T.getSnapshotBeforeUpdate=="function"&&(u.flags|=1024)):(typeof T.componentDidUpdate!="function"||N===s.memoizedProps&&bt===s.memoizedState||(u.flags|=4),typeof T.getSnapshotBeforeUpdate!="function"||N===s.memoizedProps&&bt===s.memoizedState||(u.flags|=1024),u.memoizedProps=y,u.memoizedState=Yt),T.props=y,T.state=Yt,T.context=P,y=gt):(typeof T.componentDidUpdate!="function"||N===s.memoizedProps&&bt===s.memoizedState||(u.flags|=4),typeof T.getSnapshotBeforeUpdate!="function"||N===s.memoizedProps&&bt===s.memoizedState||(u.flags|=1024),y=!1)}return T=y,pr(s,u),y=(u.flags&128)!==0,T||y?(T=u.stateNode,h=y&&typeof h.getDerivedStateFromError!="function"?null:T.render(),u.flags|=1,s!==null&&y?(u.child=es(u,s.child,null,S),u.child=es(u,null,h,S)):Sn(s,u,h,S),u.memoizedState=T.state,s=u.child):s=Fi(s,u,S),s}function Md(s,u,h,y){return Yn(),u.flags|=256,Sn(s,u,h,y),u.child}function cf(s){return{baseLanes:s,cachePool:Nd()}}function ff(s,u,h){return s=s!==null?s.childLanes&~h:0,u&&(s|=oa),s}function Rd(s,u,h){var y=u.pendingProps,S=!1,T=(u.flags&128)!==0,N;if((N=T)||(N=s!==null&&s.memoizedState===null?!1:(nn.current&2)!==0),N&&(S=!0,u.flags&=-129),N=(u.flags&32)!==0,u.flags&=-33,s===null){if(se){if(S?gi(u):Zi(),se){var q=Mn,P;(P=q)&&(q=am(q,ka),q!==null?(u.memoizedState={dehydrated:q,treeContext:si!==null?{id:Ni,overflow:Qa}:null,retryLane:536870912},P=n(18,null,null,0),P.stateNode=q,P.return=u,u.child=P,wn=u,Mn=null,P=!0):P=!1),P||fe(u)}if(q=u.memoizedState,q!==null&&(q=q.dehydrated,q!==null))return wr(q)?u.lanes=16:u.lanes=536870912,null;vi(u)}return q=y.children,y=y.fallback,S?(Zi(),S=u.mode,q=hf({mode:"hidden",children:q},S),y=ll(y,S,h,null),q.return=u,y.return=u,q.sibling=y,u.child=q,S=u.child,S.memoizedState=cf(h),S.childLanes=ff(s,N,h),u.memoizedState=Gn,y):(gi(u),yr(u,q))}if(P=s.memoizedState,P!==null&&(q=P.dehydrated,q!==null)){if(T)u.flags&256?(gi(u),u.flags&=-257,u=df(s,u,h)):u.memoizedState!==null?(Zi(),u.child=s.child,u.flags|=128,u=null):(Zi(),S=y.fallback,q=u.mode,y=hf({mode:"visible",children:y.children},q),S=ll(S,q,h,null),S.flags|=2,y.return=u,S.return=u,y.sibling=S,u.child=y,es(u,s.child,null,h),y=u.child,y.memoizedState=cf(h),y.childLanes=ff(s,N,h),u.memoizedState=Gn,u=S);else if(gi(u),wr(q))N=Wd(q).digest,y=Error(o(419)),y.stack="",y.digest=N,Fn({value:y,source:null,stack:null}),u=df(s,u,h);else if(Je||_s(s,u,h,!1),N=(h&s.childLanes)!==0,Je||N){if(N=Pt,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,Ia(s,y),Nn(N,s,y),vm}ic(q)||na(),u=df(s,u,h)}else ic(q)?(u.flags|=128,u.child=s.child,u=Ms.bind(null,s),Up(q,u),u=null):(s=P.treeContext,kn&&(Mn=tm(q),wn=u,se=!0,Ma=null,ka=!1,s!==null&&(Ca[Aa++]=Ni,Ca[Aa++]=Qa,Ca[Aa++]=si,Ni=s.id,Qa=s.overflow,si=u)),u=yr(u,y.children),u.flags|=4096);return u}return S?(Zi(),S=y.fallback,q=u.mode,P=s.child,T=P.sibling,y=Un(P,{mode:"hidden",children:y.children}),y.subtreeFlags=P.subtreeFlags&31457280,T!==null?S=Un(T,S):(S=ll(S,q,h,null),S.flags|=2),S.return=u,y.return=u,y.sibling=S,u.child=y,y=S,S=u.child,q=s.child.memoizedState,q===null?q=cf(h):(P=q.cachePool,P!==null?(T=zi?me._currentValue:me._currentValue2,P=P.parent!==T?{parent:T,pool:T}:P):P=Nd(),q={baseLanes:q.baseLanes|h,cachePool:P}),S.memoizedState=q,S.childLanes=ff(s,N,h),u.memoizedState=Gn,y):(gi(u),h=s.child,s=h.sibling,h=Un(h,{mode:"visible",children:y.children}),h.return=u,h.sibling=null,s!==null&&(N=u.deletions,N===null?(u.deletions=[s],u.flags|=16):N.push(s)),u.child=h,u.memoizedState=null,h)}function yr(s,u){return u=hf({mode:"visible",children:u},s.mode),u.return=s,s.child=u}function hf(s,u){return Zo(s,u,0,null)}function df(s,u,h){return es(u,s.child,null,h),s=yr(u,u.pendingProps.children),s.flags|=2,u.memoizedState=null,s}function zd(s,u,h){s.lanes|=u;var y=s.alternate;y!==null&&(y.lanes|=u),pf(s.return,u,h)}function Oo(s,u,h,y,S){var T=s.memoizedState;T===null?s.memoizedState={isBackwards:u,rendering:null,renderingStartTime:0,last:y,tail:h,tailMode:S}:(T.isBackwards=u,T.rendering=null,T.renderingStartTime=0,T.last=y,T.tail=h,T.tailMode=S)}function Dd(s,u,h){var y=u.pendingProps,S=y.revealOrder,T=y.tail;if(Sn(s,u,y.children,h),y=nn.current,(y&2)!==0)y=y&1|2,u.flags|=128;else{if(s!==null&&(s.flags&128)!==0)t:for(s=u.child;s!==null;){if(s.tag===13)s.memoizedState!==null&&zd(s,h,u);else if(s.tag===19)zd(s,h,u);else if(s.child!==null){s.child.return=s,s=s.child;continue}if(s===u)break t;for(;s.sibling===null;){if(s.return===null||s.return===u)break t;s=s.return}s.sibling.return=s.return,s=s.sibling}y&=1}switch(U(nn,y),S){case"forwards":for(h=u.child,S=null;h!==null;)s=h.alternate,s!==null&&$a(s)===null&&(S=h),h=h.sibling;h=S,h===null?(S=u.child,u.child=null):(S=h.sibling,h.sibling=null),Oo(u,!1,S,h,T);break;case"backwards":for(h=null,S=u.child,u.child=null;S!==null;){if(s=S.alternate,s!==null&&$a(s)===null){u.child=S;break}s=S.sibling,S.sibling=h,h=S,S=s}Oo(u,!0,h,null,T);break;case"together":Oo(u,!1,null,null,void 0);break;default:u.memoizedState=null}return u.child}function Fi(s,u,h){if(s!==null&&(u.dependencies=s.dependencies),Na|=u.lanes,(h&u.childLanes)===0)if(s!==null){if(_s(s,u,h,!1),(h&u.childLanes)===0)return null}else return null;if(s!==null&&u.child!==s.child)throw Error(o(153));if(u.child!==null){for(s=u.child,h=Un(s,s.pendingProps),u.child=h,h.return=u;s.sibling!==null;)s=s.sibling,h=h.sibling=Un(s,s.pendingProps),h.return=u;h.sibling=null}return u.child}function mf(s,u){return(s.lanes&u)!==0?!0:(s=s.dependencies,!!(s!==null&&Ul(s)))}function Dp(s,u,h){switch(u.tag){case 3:yt(u,u.stateNode.containerInfo),Nl(u,me,s.memoizedState.cache),Yn();break;case 27:case 5:Ot(u);break;case 4:yt(u,u.stateNode.containerInfo);break;case 10:Nl(u,u.type,u.memoizedProps.value);break;case 13:var y=u.memoizedState;if(y!==null)return y.dehydrated!==null?(gi(u),u.flags|=128,null):(h&u.child.childLanes)!==0?Rd(s,u,h):(gi(u),s=Fi(s,u,h),s!==null?s.sibling:null);gi(u);break;case 19:var S=(s.flags&128)!==0;if(y=(h&u.childLanes)!==0,y||(_s(s,u,h,!1),y=(h&u.childLanes)!==0),S){if(y)return Dd(s,u,h);u.flags|=128}if(S=u.memoizedState,S!==null&&(S.rendering=null,S.tail=null,S.lastEffect=null),U(nn,nn.current),y)break;return null;case 22:case 23:return u.lanes=0,Ed(s,u,h);case 24:Nl(u,me,s.memoizedState.cache)}return Fi(s,u,h)}function Od(s,u,h){if(s!==null)if(s.memoizedProps!==u.pendingProps)Je=!0;else{if(!mf(s,h)&&(u.flags&128)===0)return Je=!1,Dp(s,u,h);Je=(s.flags&131072)!==0}else Je=!1,se&&(u.flags&1048576)!==0&&j(u,Lr,u.index);switch(u.lanes=0,u.tag){case 16:t:{s=u.pendingProps;var y=u.elementType,S=y._init;if(y=S(y._payload),u.type=y,typeof y=="function")al(y)?(s=ei(y,s),u.tag=1,u=of(null,u,y,s,h)):(u.tag=0,u=rf(null,u,y,s,h));else{if(y!=null){if(S=y.$$typeof,S===Tu){u.tag=11,u=bd(null,u,y,s,h);break t}else if(S===Mr){u.tag=14,u=Td(null,u,y,s,h);break t}}throw u=d(y)||y,Error(o(306,u,""))}}return u;case 0:return rf(s,u,u.type,u.pendingProps,h);case 1:return y=u.type,S=ei(y,u.pendingProps),of(s,u,y,S,h);case 3:t:{if(yt(u,u.stateNode.containerInfo),s===null)throw Error(o(387));var T=u.pendingProps;S=u.memoizedState,y=S.element,Wc(s,u),Iu(u,T,null,h);var N=u.memoizedState;if(T=N.cache,Nl(u,me,T),T!==S.cache&&yf(u,[me],h,!0),Fu(),T=N.element,kn&&S.isDehydrated)if(S={element:T,isDehydrated:!1,cache:N.cache},u.updateQueue.baseState=S,u.memoizedState=S,u.flags&256){u=Md(s,u,T,h);break t}else if(T!==y){y=et(Error(o(424)),u),Fn(y),u=Md(s,u,T,h);break t}else for(kn&&(Mn=$d(u.stateNode.containerInfo),wn=u,se=!0,Ma=null,ka=!0),h=yh(u,null,T,h),u.child=h;h;)h.flags=h.flags&-3|4096,h=h.sibling;else{if(Yn(),T===y){u=Fi(s,u,h);break t}Sn(s,u,T,h)}u=u.child}return u;case 26:if(Ta)return pr(s,u),s===null?(h=oc(u.type,null,u.pendingProps,null))?u.memoizedState=h:se||(u.stateNode=wp(u.type,u.pendingProps,ui.current,u)):u.memoizedState=oc(u.type,s.memoizedProps,u.pendingProps,s.memoizedState),null;case 27:if(Cn)return Ot(u),s===null&&Cn&&se&&(y=u.stateNode=hh(u.type,u.pendingProps,ui.current,_n.current,!1),wn=u,ka=!0,Mn=lc(y)),y=u.pendingProps.children,s!==null||se?Sn(s,u,y,h):u.child=es(u,null,y,h),pr(s,u),u.child;case 5:return s===null&&se&&(rm(u.type,u.pendingProps,_n.current),(S=y=Mn)&&(y=em(y,u.type,u.pendingProps,ka),y!==null?(u.stateNode=y,wn=u,Mn=lc(y),ka=!1,S=!0):S=!1),S||fe(u)),Ot(u),S=u.type,T=u.pendingProps,N=s!==null?s.memoizedProps:null,y=T.children,Wl(S,T)?y=null:N!==null&&Wl(S,N)&&(u.flags|=32),u.memoizedState!==null&&(S=Al(s,u,zp,null,null,h),zi?Ht._currentValue=S:Ht._currentValue2=S),pr(s,u),Sn(s,u,y,h),u.child;case 6:return s===null&&se&&(om(u.pendingProps,_n.current),(s=h=Mn)&&(h=nm(h,u.pendingProps,ka),h!==null?(u.stateNode=h,wn=u,Mn=null,s=!0):s=!1),s||fe(u)),null;case 13:return Rd(s,u,h);case 4:return yt(u,u.stateNode.containerInfo),y=u.pendingProps,s===null?u.child=es(u,null,y,h):Sn(s,u,y,h),u.child;case 11:return bd(s,u,u.type,u.pendingProps,h);case 7:return Sn(s,u,u.pendingProps,h),u.child;case 8:return Sn(s,u,u.pendingProps.children,h),u.child;case 12:return Sn(s,u,u.pendingProps.children,h),u.child;case 10:return y=u.pendingProps,Nl(u,u.type,y.value),Sn(s,u,y.children,h),u.child;case 9:return S=u.type._context,y=u.pendingProps.children,Ss(u),S=bn(S),y=y(S),u.flags|=1,Sn(s,u,y,h),u.child;case 14:return Td(s,u,u.type,u.pendingProps,h);case 15:return Do(s,u,u.type,u.pendingProps,h);case 19:return Dd(s,u,h);case 22:return Ed(s,u,h);case 24:return Ss(u),y=bn(me),s===null?(S=Bl(),S===null&&(S=Pt,T=No(),S.pooledCache=T,T.refCount++,T!==null&&(S.pooledCacheLanes|=h),S=T),u.memoizedState={parent:y,cache:S},Pc(u),Nl(u,me,S)):((s.lanes&h)!==0&&(Wc(s,u),Iu(u,null,null,h),Fu()),S=s.memoizedState,T=u.memoizedState,S.parent!==y?(S={parent:y,cache:y},u.memoizedState=S,u.lanes===0&&(u.memoizedState=u.updateQueue.baseState=S),Nl(u,me,y)):(y=T.cache,Nl(u,me,y),y!==S.cache&&yf(u,[me],h,!0))),Sn(s,u,u.pendingProps.children,h),u.child;case 29:throw u.pendingProps}throw Error(o(156,u.tag))}function Nl(s,u,h){zi?(U(ua,u._currentValue),u._currentValue=h):(U(ua,u._currentValue2),u._currentValue2=h)}function Ii(s){var u=ua.current;zi?s._currentValue=u:s._currentValue2=u,D(ua)}function pf(s,u,h){for(;s!==null;){var y=s.alternate;if((s.childLanes&u)!==u?(s.childLanes|=u,y!==null&&(y.childLanes|=u)):y!==null&&(y.childLanes&u)!==u&&(y.childLanes|=u),s===h)break;s=s.return}}function yf(s,u,h,y){var S=s.child;for(S!==null&&(S.return=s);S!==null;){var T=S.dependencies;if(T!==null){var N=S.child;T=T.firstContext;t:for(;T!==null;){var q=T;T=S;for(var P=0;P<u.length;P++)if(q.context===u[P]){T.lanes|=h,q=T.alternate,q!==null&&(q.lanes|=h),pf(T.return,h,s),y||(N=null);break t}T=q.next}}else if(S.tag===18){if(N=S.return,N===null)throw Error(o(341));N.lanes|=h,T=N.alternate,T!==null&&(T.lanes|=h),pf(N,h,s),N=null}else N=S.child;if(N!==null)N.return=S;else for(N=S;N!==null;){if(N===s){N=null;break}if(S=N.sibling,S!==null){S.return=N.return,N=S;break}N=N.return}S=N}}function _s(s,u,h,y){s=null;for(var S=u,T=!1;S!==null;){if(!T){if((S.flags&524288)!==0)T=!0;else if((S.flags&262144)!==0)break}if(S.tag===10){var N=S.alternate;if(N===null)throw Error(o(387));if(N=N.memoizedProps,N!==null){var q=S.type;Ea(S.pendingProps.value,N.value)||(s!==null?s.push(q):s=[q])}}else if(S===Du.current){if(N=S.alternate,N===null)throw Error(o(387));N.memoizedState.memoizedState!==S.memoizedState.memoizedState&&(s!==null?s.push(Ht):s=[Ht])}S=S.return}s!==null&&yf(u,s,h,y),u.flags|=262144}function Ul(s){for(s=s.firstContext;s!==null;){var u=s.context;if(!Ea(zi?u._currentValue:u._currentValue2,s.memoizedValue))return!0;s=s.next}return!1}function Ss(s){as=s,Ve=null,s=s.dependencies,s!==null&&(s.firstContext=null)}function bn(s){return gf(as,s)}function gr(s,u){return as===null&&Ss(s),gf(s,u)}function gf(s,u){var h=zi?u._currentValue:u._currentValue2;if(u={context:u,memoizedValue:h,next:null},Ve===null){if(s===null)throw Error(o(308));Ve=u,s.dependencies={lanes:0,firstContext:u},s.flags|=524288}else Ve=Ve.next=u;return h}function No(){return{controller:new xm,data:new Map,refCount:0}}function ru(s){s.refCount--,s.refCount===0&&dl(Gs,function(){s.controller.abort()})}function Bl(){var s=ml.current;return s!==null?s:Pt.pooledCache}function Uo(s,u){u===null?U(ml,ml.current):U(ml,u.pool)}function Nd(){var s=Bl();return s===null?null:{parent:zi?me._currentValue:me._currentValue2,pool:s}}function va(s){s.flags|=4}function vf(s,u){if(s!==null&&s.child===u.child)return!1;if((u.flags&16)!==0)return!0;for(s=u.child;s!==null;){if((s.flags&13878)!==0||(s.subtreeFlags&13878)!==0)return!0;s=s.sibling}return!1}function Bo(s,u,h,y){if(En)for(h=u.child;h!==null;){if(h.tag===5||h.tag===6)Ri(s,h.stateNode);else if(!(h.tag===4||Cn&&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(Sa)for(var S=u.child;S!==null;){if(S.tag===5){var T=S.stateNode;h&&y&&(T=$f(T,S.type,S.memoizedProps)),Ri(s,T)}else if(S.tag===6)T=S.stateNode,h&&y&&(T=th(T,S.memoizedProps)),Ri(s,T);else if(S.tag!==4){if(S.tag===22&&S.memoizedState!==null)T=S.child,T!==null&&(T.return=S),Bo(s,S,!0,!0);else if(S.child!==null){S.child.return=S,S=S.child;continue}}if(S===u)break;for(;S.sibling===null;){if(S.return===null||S.return===u)return;S=S.return}S.sibling.return=S.return,S=S.sibling}}function ou(s,u,h,y){if(Sa)for(var S=u.child;S!==null;){if(S.tag===5){var T=S.stateNode;h&&y&&(T=$f(T,S.type,S.memoizedProps)),Ff(s,T)}else if(S.tag===6)T=S.stateNode,h&&y&&(T=th(T,S.memoizedProps)),Ff(s,T);else if(S.tag!==4){if(S.tag===22&&S.memoizedState!==null)T=S.child,T!==null&&(T.return=S),ou(s,S,!(S.memoizedProps!==null&&S.memoizedProps.mode==="manual"),!0);else if(S.child!==null){S.child.return=S,S=S.child;continue}}if(S===u)break;for(;S.sibling===null;){if(S.return===null||S.return===u)return;S=S.return}S.sibling.return=S.return,S=S.sibling}}function cu(s,u){if(Sa&&vf(s,u)){s=u.stateNode;var h=s.containerInfo,y=ac();ou(y,u,!1,!1),s.pendingChildren=y,va(u),Pd(h,y)}}function xf(s,u,h,y){if(En)s.memoizedProps!==y&&va(u);else if(Sa){var S=s.stateNode,T=s.memoizedProps;if((s=vf(s,u))||T!==y){var N=_n.current;T=Wf(S,h,T,y,!s,null),T===S?u.stateNode=S:(ul(T,h,y,N)&&va(u),u.stateNode=T,s?Bo(T,u,!1,!1):va(u))}else u.stateNode=S}}function fu(s,u,h){if(Kd(u,h)){if(s.flags|=16777216,!rl(u,h))if(Tr())s.flags|=8192;else throw Hs=mc,ph}else s.flags&=-16777217}function _f(s,u){if(cm(u)){if(s.flags|=16777216,!ch(u))if(Tr())s.flags|=8192;else throw Hs=mc,ph}else s.flags&=-16777217}function vr(s,u){u!==null&&(s.flags|=4),s.flags&16384&&(u=s.tag!==22?ot():536870912,s.lanes|=u,yl|=u)}function bs(s,u){if(!se)switch(s.tailMode){case"hidden":u=s.tail;for(var h=null;u!==null;)u.alternate!==null&&(h=u),u=u.sibling;h===null?s.tail=null:h.sibling=null;break;case"collapsed":h=s.tail;for(var y=null;h!==null;)h.alternate!==null&&(y=h),h=h.sibling;y===null?u||s.tail===null?s.tail=null:s.tail.sibling=null:y.sibling=null}}function Oe(s){var u=s.alternate!==null&&s.alternate.child===s.child,h=0,y=0;if(u)for(var S=s.child;S!==null;)h|=S.lanes|S.childLanes,y|=S.subtreeFlags&31457280,y|=S.flags&31457280,S.return=s,S=S.sibling;else for(S=s.child;S!==null;)h|=S.lanes|S.childLanes,y|=S.subtreeFlags,y|=S.flags,S.return=s,S=S.sibling;return s.subtreeFlags|=y,s.childLanes=h,u}function Ud(s,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 Oe(u),null;case 1:return Oe(u),null;case 3:return h=u.stateNode,y=null,s!==null&&(y=s.memoizedState.cache),u.memoizedState.cache!==y&&(u.flags|=2048),Ii(me),Tt(),h.pendingContext&&(h.context=h.pendingContext,h.pendingContext=null),(s===null||s.child===null)&&(ja(u)?va(u):s===null||s.memoizedState.isDehydrated&&(u.flags&256)===0||(u.flags|=1024,Ma!==null&&(tl(Ma),Ma=null))),cu(s,u),Oe(u),null;case 26:if(Ta){h=u.type;var S=u.memoizedState;return s===null?(va(u),S!==null?(Oe(u),_f(u,S)):(Oe(u),fu(u,h,y))):S?S!==s.memoizedState?(va(u),Oe(u),_f(u,S)):(Oe(u),u.flags&=-16777217):(En?s.memoizedProps!==y&&va(u):xf(s,u,h,y),Oe(u),fu(u,h,y)),null}case 27:if(Cn){if(Bt(u),h=ui.current,S=u.type,s!==null&&u.stateNode!=null)En?s.memoizedProps!==y&&va(u):xf(s,u,S,y);else{if(!y){if(u.stateNode===null)throw Error(o(166));return Oe(u),null}s=_n.current,ja(u)?ce(u,s):(s=hh(S,y,h,s,!0),u.stateNode=s,va(u))}return Oe(u),null}case 5:if(Bt(u),h=u.type,s!==null&&u.stateNode!=null)xf(s,u,h,y);else{if(!y){if(u.stateNode===null)throw Error(o(166));return Oe(u),null}s=_n.current,ja(u)?ce(u,s):(S=qf(h,y,ui.current,s,u),Bo(S,u,!1,!1),u.stateNode=S,ul(S,h,y,s)&&va(u))}return Oe(u),fu(u,u.type,u.pendingProps),null;case 6:if(s&&u.stateNode!=null)h=s.memoizedProps,En?h!==y&&va(u):Sa&&(h!==y?(u.stateNode=Fo(y,ui.current,_n.current,u),va(u)):u.stateNode=s.stateNode);else{if(typeof y!="string"&&u.stateNode===null)throw Error(o(166));if(s=ui.current,h=_n.current,ja(u)){if(!kn)throw Error(o(176));if(s=u.stateNode,h=u.memoizedProps,y=null,S=wn,S!==null)switch(S.tag){case 27:case 5:y=S.memoizedProps}im(s,h,u,y)||fe(u)}else u.stateNode=Fo(y,s,h,u)}return Oe(u),null;case 13:if(y=u.memoizedState,s===null||s.memoizedState!==null&&s.memoizedState.dehydrated!==null){if(S=ja(u),y!==null&&y.dehydrated!==null){if(s===null){if(!S)throw Error(o(318));if(!kn)throw Error(o(344));if(S=u.memoizedState,S=S!==null?S.dehydrated:null,!S)throw Error(o(317));Cu(S,u)}else Yn(),(u.flags&128)===0&&(u.memoizedState=null),u.flags|=4;Oe(u),S=!1}else Ma!==null&&(tl(Ma),Ma=null),S=!0;if(!S)return u.flags&256?(vi(u),u):(vi(u),null)}if(vi(u),(u.flags&128)!==0)return u.lanes=h,u;if(h=y!==null,s=s!==null&&s.memoizedState!==null,h){y=u.child,S=null,y.alternate!==null&&y.alternate.memoizedState!==null&&y.alternate.memoizedState.cachePool!==null&&(S=y.alternate.memoizedState.cachePool.pool);var T=null;y.memoizedState!==null&&y.memoizedState.cachePool!==null&&(T=y.memoizedState.cachePool.pool),T!==S&&(y.flags|=2048)}return h!==s&&h&&(u.child.flags|=8192),vr(u,u.updateQueue),Oe(u),null;case 4:return Tt(),cu(s,u),s===null&&Xf(u.stateNode.containerInfo),Oe(u),null;case 10:return Ii(u.type),Oe(u),null;case 19:if(D(nn),S=u.memoizedState,S===null)return Oe(u),null;if(y=(u.flags&128)!==0,T=S.rendering,T===null)if(y)bs(S,!1);else{if(ae!==0||s!==null&&(s.flags&128)!==0)for(s=u.child;s!==null;){if(T=$a(s),T!==null){for(u.flags|=128,bs(S,!1),s=T.updateQueue,u.updateQueue=s,vr(u,s),u.subtreeFlags=0,s=h,h=u.child;h!==null;)il(h,s),h=h.sibling;return U(nn,nn.current&1|2),u.child}s=s.sibling}S.tail!==null&&An()>je&&(u.flags|=128,y=!0,bs(S,!1),u.lanes=4194304)}else{if(!y)if(s=$a(T),s!==null){if(u.flags|=128,y=!0,s=s.updateQueue,u.updateQueue=s,vr(u,s),bs(S,!0),S.tail===null&&S.tailMode==="hidden"&&!T.alternate&&!se)return Oe(u),null}else 2*An()-S.renderingStartTime>je&&h!==536870912&&(u.flags|=128,y=!0,bs(S,!1),u.lanes=4194304);S.isBackwards?(T.sibling=u.child,u.child=T):(s=S.last,s!==null?s.sibling=T:u.child=T,S.last=T)}return S.tail!==null?(u=S.tail,S.rendering=u,S.tail=u.sibling,S.renderingStartTime=An(),u.sibling=null,s=nn.current,U(nn,y?s&1|2:s&1),u):(Oe(u),null);case 22:case 23:return vi(u),po(),y=u.memoizedState!==null,s!==null?s.memoizedState!==null!==y&&(u.flags|=8192):y&&(u.flags|=8192),y?(h&536870912)!==0&&(u.flags&128)===0&&(Oe(u),u.subtreeFlags&6&&(u.flags|=8192)):Oe(u),h=u.updateQueue,h!==null&&vr(u,h.retryQueue),h=null,s!==null&&s.memoizedState!==null&&s.memoizedState.cachePool!==null&&(h=s.memoizedState.cachePool.pool),y=null,u.memoizedState!==null&&u.memoizedState.cachePool!==null&&(y=u.memoizedState.cachePool.pool),y!==h&&(u.flags|=2048),s!==null&&D(ml),null;case 24:return h=null,s!==null&&(h=s.memoizedState.cache),u.memoizedState.cache!==h&&(u.flags|=2048),Ii(me),Oe(u),null;case 25:return null}throw Error(o(156,u.tag))}function Bd(s,u){switch(st(u),u.tag){case 1:return s=u.flags,s&65536?(u.flags=s&-65537|128,u):null;case 3:return Ii(me),Tt(),s=u.flags,(s&65536)!==0&&(s&128)===0?(u.flags=s&-65537|128,u):null;case 26:case 27:case 5:return Bt(u),null;case 13:if(vi(u),s=u.memoizedState,s!==null&&s.dehydrated!==null){if(u.alternate===null)throw Error(o(340));Yn()}return s=u.flags,s&65536?(u.flags=s&-65537|128,u):null;case 19:return D(nn),null;case 4:return Tt(),null;case 10:return Ii(u.type),null;case 22:case 23:return vi(u),po(),s!==null&&D(ml),s=u.flags,s&65536?(u.flags=s&-65537|128,u):null;case 24:return Ii(me),null;case 25:return null;default:return null}}function Sf(s,u){switch(st(u),u.tag){case 3:Ii(me),Tt();break;case 26:case 27:case 5:Bt(u);break;case 4:Tt();break;case 13:vi(u);break;case 19:D(nn);break;case 10:Ii(u.type);break;case 22:case 23:vi(u),po(),s!==null&&D(ml);break;case 24:Ii(me)}}function xr(s,u){try{var h=u.updateQueue,y=h!==null?h.lastEffect:null;if(y!==null){var S=y.next;h=S;do{if((h.tag&s)===s){y=void 0;var T=h.create,N=h.inst;y=T(),N.destroy=y}h=h.next}while(h!==S)}}catch(q){It(u,u.return,q)}}function wl(s,u,h){try{var y=u.updateQueue,S=y!==null?y.lastEffect:null;if(S!==null){var T=S.next;y=T;do{if((y.tag&s)===s){var N=y.inst,q=N.destroy;if(q!==void 0){N.destroy=void 0,S=u;var P=h;try{q()}catch(ut){It(S,P,ut)}}}y=y.next}while(y!==T)}}catch(ut){It(u,u.return,ut)}}function wd(s){var u=s.updateQueue;if(u!==null){var h=s.stateNode;try{$u(u,h)}catch(y){It(s,s.return,y)}}}function Hd(s,u,h){h.props=ei(s.type,s.memoizedProps),h.state=s.memoizedState;try{h.componentWillUnmount()}catch(y){It(s,u,y)}}function Ts(s,u){try{var h=s.ref;if(h!==null){var y=s.stateNode;switch(s.tag){case 26:case 27:case 5:var S=Eu(y);break;default:S=y}typeof h=="function"?s.refCleanup=h(S):h.current=S}}catch(T){It(s,u,T)}}function Ne(s,u){var h=s.ref,y=s.refCleanup;if(h!==null)if(typeof y=="function")try{y()}catch(S){It(s,u,S)}finally{s.refCleanup=null,s=s.alternate,s!=null&&(s.refCleanup=null)}else if(typeof h=="function")try{h(null)}catch(S){It(s,u,S)}else h.current=null}function hu(s){var u=s.type,h=s.memoizedProps,y=s.stateNode;try{Np(y,u,h,s)}catch(S){It(s,s.return,S)}}function bf(s,u,h){try{Kf(s.stateNode,s.type,h,u,s)}catch(y){It(s,s.return,y)}}function Tf(s){return s.tag===5||s.tag===3||(Ta?s.tag===26:!1)||(Cn?s.tag===27:!1)||s.tag===4}function wo(s){t:for(;;){for(;s.sibling===null;){if(s.return===null||Tf(s.return))return null;s=s.return}for(s.sibling.return=s.return,s=s.sibling;s.tag!==5&&s.tag!==6&&(!Cn||s.tag!==27)&&s.tag!==18;){if(s.flags&2||s.child===null||s.tag===4)continue t;s.child.return=s,s=s.child}if(!(s.flags&2))return s.stateNode}}function Ho(s,u,h){var y=s.tag;if(y===5||y===6)s=s.stateNode,u?Jf(h,s,u):Zd(h,s);else if(!(y===4||Cn&&y===27)&&(s=s.child,s!==null))for(Ho(s,u,h),s=s.sibling;s!==null;)Ho(s,u,h),s=s.sibling}function du(s,u,h){var y=s.tag;if(y===5||y===6)s=s.stateNode,u?Zf(h,s,u):kf(h,s);else if(!(y===4||Cn&&y===27)&&(s=s.child,s!==null))for(du(s,u,h),s=s.sibling;s!==null;)du(s,u,h),s=s.sibling}function Gd(s,u,h){s=s.containerInfo;try{If(s,h)}catch(y){It(u,u.return,y)}}function mu(s,u){for(Pl(s.containerInfo),Qe=u;Qe!==null;)if(s=Qe,u=s.child,(s.subtreeFlags&1028)!==0&&u!==null)u.return=s,Qe=u;else for(;Qe!==null;){s=Qe;var h=s.alternate;switch(u=s.flags,s.tag){case 0:break;case 11:case 15:break;case 1:if((u&1024)!==0&&h!==null){u=void 0;var y=s,S=h.memoizedProps;h=h.memoizedState;var T=y.stateNode;try{var N=ei(y.type,S,y.elementType===y.type);u=T.getSnapshotBeforeUpdate(N,h),T.__reactInternalSnapshotBeforeUpdate=u}catch(q){It(y,y.return,q)}}break;case 3:(u&1024)!==0&&En&&nc(s.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=s.sibling,u!==null){u.return=s.return,Qe=u;break}Qe=s.return}return N=js,js=!1,N}function Go(s,u,h){var y=h.flags;switch(h.tag){case 0:case 11:case 15:bi(s,h),y&4&&xr(5,h);break;case 1:if(bi(s,h),y&4)if(s=h.stateNode,u===null)try{s.componentDidMount()}catch(q){It(h,h.return,q)}else{var S=ei(h.type,u.memoizedProps);u=u.memoizedState;try{s.componentDidUpdate(S,u,s.__reactInternalSnapshotBeforeUpdate)}catch(q){It(h,h.return,q)}}y&64&&wd(h),y&512&&Ts(h,h.return);break;case 3:if(bi(s,h),y&64&&(y=h.updateQueue,y!==null)){if(s=null,h.child!==null)switch(h.child.tag){case 27:case 5:s=Eu(h.child.stateNode);break;case 1:s=h.child.stateNode}try{$u(y,s)}catch(q){It(h,h.return,q)}}break;case 26:if(Ta){bi(s,h),y&512&&Ts(h,h.return);break}case 27:case 5:bi(s,h),u===null&&y&4&&hu(h),y&512&&Ts(h,h.return);break;case 12:bi(s,h);break;case 13:bi(s,h),y&4&&Hl(s,h);break;case 22:if(S=h.memoizedState!==null||dn,!S){u=u!==null&&u.memoizedState!==null||Ge;var T=dn,N=Ge;dn=S,(Ge=u)&&!N?jl(s,h,(h.subtreeFlags&8772)!==0):bi(s,h),dn=T,Ge=N}y&512&&(h.memoizedProps.mode==="manual"?Ts(h,h.return):Ne(h,h.return));break;default:bi(s,h)}}function pu(s){var u=s.alternate;u!==null&&(s.alternate=null,pu(u)),s.child=null,s.deletions=null,s.sibling=null,s.tag===5&&(u=s.stateNode,u!==null&&Vf(u)),s.stateNode=null,s.return=null,s.dependencies=null,s.memoizedProps=null,s.memoizedState=null,s.pendingProps=null,s.stateNode=null,s.updateQueue=null}function xa(s,u,h){for(h=h.child;h!==null;)jo(s,u,h),h=h.sibling}function jo(s,u,h){if(la&&typeof la.onCommitFiberUnmount=="function")try{la.onCommitFiberUnmount(zu,h)}catch{}switch(h.tag){case 26:if(Ta){Ge||Ne(h,u),xa(s,u,h),h.memoizedState?lh(h.memoizedState):h.stateNode&&rh(h.stateNode);break}case 27:if(Cn){Ge||Ne(h,u);var y=Pe,S=ra;Pe=h.stateNode,xa(s,u,h),fm(h.stateNode),Pe=y,ra=S;break}case 5:Ge||Ne(h,u);case 6:if(En){if(y=Pe,S=ra,Pe=null,xa(s,u,h),Pe=y,ra=S,Pe!==null)if(ra)try{Ke(Pe,h.stateNode)}catch(T){It(h,u,T)}else try{Kn(Pe,h.stateNode)}catch(T){It(h,u,T)}}else xa(s,u,h);break;case 18:En&&Pe!==null&&(ra?nh(Pe,h.stateNode):sm(Pe,h.stateNode));break;case 4:En?(y=Pe,S=ra,Pe=h.stateNode.containerInfo,ra=!0,xa(s,u,h),Pe=y,ra=S):(Sa&&Gd(h.stateNode,h,ac()),xa(s,u,h));break;case 0:case 11:case 14:case 15:Ge||wl(2,h,u),Ge||wl(4,h,u),xa(s,u,h);break;case 1:Ge||(Ne(h,u),y=h.stateNode,typeof y.componentWillUnmount=="function"&&Hd(h,u,y)),xa(s,u,h);break;case 21:xa(s,u,h);break;case 22:Ge||Ne(h,u),Ge=(y=Ge)||h.memoizedState!==null,xa(s,u,h),Ge=y;break;default:xa(s,u,h)}}function Hl(s,u){if(kn&&u.memoizedState===null&&(s=u.alternate,s!==null&&(s=s.memoizedState,s!==null&&(s=s.dehydrated,s!==null))))try{uc(s)}catch(h){It(u,u.return,h)}}function yu(s){switch(s.tag){case 13:case 19:var u=s.stateNode;return u===null&&(u=s.stateNode=new wu),u;case 22:return s=s.stateNode,u=s._retryCache,u===null&&(u=s._retryCache=new wu),u;default:throw Error(o(435,s.tag))}}function _r(s,u){var h=yu(s);u.forEach(function(y){var S=Rf.bind(null,s,y);h.has(y)||(h.add(y),y.then(S,S))})}function Xn(s,u){var h=u.deletions;if(h!==null)for(var y=0;y<h.length;y++){var S=h[y],T=s,N=u;if(En){var q=N;t:for(;q!==null;){switch(q.tag){case 27:case 5:Pe=q.stateNode,ra=!1;break t;case 3:Pe=q.stateNode.containerInfo,ra=!0;break t;case 4:Pe=q.stateNode.containerInfo,ra=!0;break t}q=q.return}if(Pe===null)throw Error(o(160));jo(T,N,S),Pe=null,ra=!1}else jo(T,N,S);T=S.alternate,T!==null&&(T.return=null),S.return=null}if(u.subtreeFlags&13878)for(u=u.child;u!==null;)Gl(u,s),u=u.sibling}function Gl(s,u){var h=s.alternate,y=s.flags;switch(s.tag){case 0:case 11:case 14:case 15:Xn(u,s),ta(s),y&4&&(wl(3,s,s.return),xr(3,s),wl(5,s,s.return));break;case 1:Xn(u,s),ta(s),y&512&&(Ge||h===null||Ne(h,h.return)),y&64&&dn&&(s=s.updateQueue,s!==null&&(y=s.callbacks,y!==null&&(h=s.shared.hiddenCallbacks,s.shared.hiddenCallbacks=h===null?y:h.concat(y))));break;case 26:if(Ta){var S=Zn;Xn(u,s),ta(s),y&512&&(Ge||h===null||Ne(h,h.return)),y&4&&(y=h!==null?h.memoizedState:null,u=s.memoizedState,h===null?u===null?s.stateNode===null?s.stateNode=sh(S,s.type,s.memoizedProps,s):uh(S,s.type,s.stateNode):s.stateNode=ih(S,u,s.memoizedProps):y!==u?(y===null?h.stateNode!==null&&rh(h.stateNode):lh(y),u===null?uh(S,s.type,s.stateNode):ih(S,u,s.memoizedProps)):u===null&&s.stateNode!==null&&bf(s,s.memoizedProps,h.memoizedProps));break}case 27:if(Cn&&y&4&&s.alternate===null){S=s.stateNode;var T=s.memoizedProps;try{Hp(S),Gp(s.type,T,S,s)}catch(gt){It(s,s.return,gt)}}case 5:if(Xn(u,s),ta(s),y&512&&(Ge||h===null||Ne(h,h.return)),En){if(s.flags&32){u=s.stateNode;try{Ur(u)}catch(gt){It(s,s.return,gt)}}y&4&&s.stateNode!=null&&(u=s.memoizedProps,bf(s,u,h!==null?h.memoizedProps:u)),y&1024&&(is=!0)}break;case 6:if(Xn(u,s),ta(s),y&4&&En){if(s.stateNode===null)throw Error(o(162));y=s.memoizedProps,h=h!==null?h.memoizedProps:y,u=s.stateNode;try{Jd(u,h,y)}catch(gt){It(s,s.return,gt)}}break;case 3:if(Ta?(oh(),S=Zn,Zn=rc(u.containerInfo),Xn(u,s),Zn=S):Xn(u,s),ta(s),y&4){if(En&&kn&&h!==null&&h.memoizedState.isDehydrated)try{sc(u.containerInfo)}catch(gt){It(s,s.return,gt)}if(Sa){y=u.containerInfo,h=u.pendingChildren;try{If(y,h)}catch(gt){It(s,s.return,gt)}}}is&&(is=!1,Ef(s));break;case 4:Ta?(h=Zn,Zn=rc(s.stateNode.containerInfo),Xn(u,s),ta(s),Zn=h):(Xn(u,s),ta(s)),y&4&&Sa&&Gd(s.stateNode,s,s.stateNode.pendingChildren);break;case 12:Xn(u,s),ta(s);break;case 13:Xn(u,s),ta(s),s.child.flags&8192&&s.memoizedState!==null!=(h!==null&&h.memoizedState!==null)&&(Hi=An()),y&4&&(y=s.updateQueue,y!==null&&(s.updateQueue=null,_r(s,y)));break;case 22:y&512&&(Ge||h===null||Ne(h,h.return)),S=s.memoizedState!==null;var N=h!==null&&h.memoizedState!==null,q=dn,P=Ge;if(dn=q||S,Ge=P||N,Xn(u,s),Ge=P,dn=q,ta(s),u=s.stateNode,u._current=s,u._visibility&=-3,u._visibility|=u._pendingVisibility&2,y&8192&&(u._visibility=S?u._visibility&-2:u._visibility|1,S&&(u=dn||Ge,h===null||N||u||gu(s)),En&&(s.memoizedProps===null||s.memoizedProps.mode!=="manual"))){t:if(h=null,En)for(u=s;;){if(u.tag===5||Ta&&u.tag===26||Cn&&u.tag===27){if(h===null){N=h=u;try{T=N.stateNode,S?Br(T):Pf(N.stateNode,N.memoizedProps)}catch(gt){It(N,N.return,gt)}}}else if(u.tag===6){if(h===null){N=u;try{var ut=N.stateNode;S?ec(ut):ol(ut,N.memoizedProps)}catch(gt){It(N,N.return,gt)}}}else if((u.tag!==22&&u.tag!==23||u.memoizedState===null||u===s)&&u.child!==null){u.child.return=u,u=u.child;continue}if(u===s)break t;for(;u.sibling===null;){if(u.return===null||u.return===s)break t;h===u&&(h=null),u=u.return}h===u&&(h=null),u.sibling.return=u.return,u=u.sibling}}y&4&&(y=s.updateQueue,y!==null&&(h=y.retryQueue,h!==null&&(y.retryQueue=null,_r(s,h))));break;case 19:Xn(u,s),ta(s),y&4&&(y=s.updateQueue,y!==null&&(s.updateQueue=null,_r(s,y)));break;case 21:break;default:Xn(u,s),ta(s)}}function ta(s){var u=s.flags;if(u&2){try{if(En&&(!Cn||s.tag!==27)){t:{for(var h=s.return;h!==null;){if(Tf(h)){var y=h;break t}h=h.return}throw Error(o(160))}switch(y.tag){case 27:if(Cn){var S=y.stateNode,T=wo(s);du(s,T,S);break}case 5:var N=y.stateNode;y.flags&32&&(Ur(N),y.flags&=-33);var q=wo(s);du(s,q,N);break;case 3:case 4:var P=y.stateNode.containerInfo,ut=wo(s);Ho(s,ut,P);break;default:throw Error(o(161))}}}catch(gt){It(s,s.return,gt)}s.flags&=-3}u&4096&&(s.flags&=-4097)}function Ef(s){if(s.subtreeFlags&1024)for(s=s.child;s!==null;){var u=s;Ef(u),u.tag===5&&u.flags&1024&&Se(u.stateNode),s=s.sibling}}function bi(s,u){if(u.subtreeFlags&8772)for(u=u.child;u!==null;)Go(s,u.alternate,u),u=u.sibling}function gu(s){for(s=s.child;s!==null;){var u=s;switch(u.tag){case 0:case 11:case 14:case 15:wl(4,u,u.return),gu(u);break;case 1:Ne(u,u.return);var h=u.stateNode;typeof h.componentWillUnmount=="function"&&Hd(u,u.return,h),gu(u);break;case 26:case 27:case 5:Ne(u,u.return),gu(u);break;case 22:Ne(u,u.return),u.memoizedState===null&&gu(u);break;default:gu(u)}s=s.sibling}}function jl(s,u,h){for(h=h&&(u.subtreeFlags&8772)!==0,u=u.child;u!==null;){var y=u.alternate,S=s,T=u,N=T.flags;switch(T.tag){case 0:case 11:case 15:jl(S,T,h),xr(4,T);break;case 1:if(jl(S,T,h),y=T,S=y.stateNode,typeof S.componentDidMount=="function")try{S.componentDidMount()}catch(ut){It(y,y.return,ut)}if(y=T,S=y.updateQueue,S!==null){var q=y.stateNode;try{var P=S.shared.hiddenCallbacks;if(P!==null)for(S.shared.hiddenCallbacks=null,S=0;S<P.length;S++)fd(P[S],q)}catch(ut){It(y,y.return,ut)}}h&&N&64&&wd(T),Ts(T,T.return);break;case 26:case 27:case 5:jl(S,T,h),h&&y===null&&N&4&&hu(T),Ts(T,T.return);break;case 12:jl(S,T,h);break;case 13:jl(S,T,h),h&&N&4&&Hl(S,T);break;case 22:T.memoizedState===null&&jl(S,T,h),Ts(T,T.return);break;default:jl(S,T,h)}u=u.sibling}}function Cf(s,u){var h=null;s!==null&&s.memoizedState!==null&&s.memoizedState.cachePool!==null&&(h=s.memoizedState.cachePool.pool),s=null,u.memoizedState!==null&&u.memoizedState.cachePool!==null&&(s=u.memoizedState.cachePool.pool),s!==h&&(s!=null&&s.refCount++,h!=null&&ru(h))}function qo(s,u){s=null,u.alternate!==null&&(s=u.alternate.memoizedState.cache),u=u.memoizedState.cache,u!==s&&(u.refCount++,s!=null&&ru(s))}function $i(s,u,h,y){if(u.subtreeFlags&10256)for(u=u.child;u!==null;)Yo(s,u,h,y),u=u.sibling}function Yo(s,u,h,y){var S=u.flags;switch(u.tag){case 0:case 11:case 15:$i(s,u,h,y),S&2048&&xr(9,u);break;case 3:$i(s,u,h,y),S&2048&&(s=null,u.alternate!==null&&(s=u.alternate.memoizedState.cache),u=u.memoizedState.cache,u!==s&&(u.refCount++,s!=null&&ru(s)));break;case 12:if(S&2048){$i(s,u,h,y),s=u.stateNode;try{var T=u.memoizedProps,N=T.id,q=T.onPostCommit;typeof q=="function"&&q(N,u.alternate===null?"mount":"update",s.passiveEffectDuration,-0)}catch(P){It(u,u.return,P)}}else $i(s,u,h,y);break;case 23:break;case 22:T=u.stateNode,u.memoizedState!==null?T._visibility&4?$i(s,u,h,y):ql(s,u):T._visibility&4?$i(s,u,h,y):(T._visibility|=4,On(s,u,h,y,(u.subtreeFlags&10256)!==0)),S&2048&&Cf(u.alternate,u);break;case 24:$i(s,u,h,y),S&2048&&qo(u.alternate,u);break;default:$i(s,u,h,y)}}function On(s,u,h,y,S){for(S=S&&(u.subtreeFlags&10256)!==0,u=u.child;u!==null;){var T=s,N=u,q=h,P=y,ut=N.flags;switch(N.tag){case 0:case 11:case 15:On(T,N,q,P,S),xr(8,N);break;case 23:break;case 22:var gt=N.stateNode;N.memoizedState!==null?gt._visibility&4?On(T,N,q,P,S):ql(T,N):(gt._visibility|=4,On(T,N,q,P,S)),S&&ut&2048&&Cf(N.alternate,N);break;case 24:On(T,N,q,P,S),S&&ut&2048&&qo(N.alternate,N);break;default:On(T,N,q,P,S)}u=u.sibling}}function ql(s,u){if(u.subtreeFlags&10256)for(u=u.child;u!==null;){var h=s,y=u,S=y.flags;switch(y.tag){case 22:ql(h,y),S&2048&&Cf(y.alternate,y);break;case 24:ql(h,y),S&2048&&qo(y.alternate,y);break;default:ql(h,y)}u=u.sibling}}function yn(s){if(s.subtreeFlags&qs)for(s=s.child;s!==null;)Es(s),s=s.sibling}function Es(s){switch(s.tag){case 26:yn(s),s.flags&qs&&(s.memoizedState!==null?fh(Zn,s.memoizedState,s.memoizedProps):qe(s.type,s.memoizedProps));break;case 5:yn(s),s.flags&qs&&qe(s.type,s.memoizedProps);break;case 3:case 4:if(Ta){var u=Zn;Zn=rc(s.stateNode.containerInfo),yn(s),Zn=u}else yn(s);break;case 22:s.memoizedState===null&&(u=s.alternate,u!==null&&u.memoizedState!==null?(u=qs,qs=16777216,yn(s),qs=u):yn(s));break;default:yn(s)}}function Lo(s){var u=s.alternate;if(u!==null&&(s=u.child,s!==null)){u.child=null;do u=s.sibling,s.sibling=null,s=u;while(s!==null)}}function Yl(s){var u=s.deletions;if((s.flags&16)!==0){if(u!==null)for(var h=0;h<u.length;h++){var y=u[h];Qe=y,Ll(y,s)}Lo(s)}if(s.subtreeFlags&10256)for(s=s.child;s!==null;)Sr(s),s=s.sibling}function Sr(s){switch(s.tag){case 0:case 11:case 15:Yl(s),s.flags&2048&&wl(9,s,s.return);break;case 3:Yl(s);break;case 12:Yl(s);break;case 22:var u=s.stateNode;s.memoizedState!==null&&u._visibility&4&&(s.return===null||s.return.tag!==13)?(u._visibility&=-5,vu(s)):Yl(s);break;default:Yl(s)}}function vu(s){var u=s.deletions;if((s.flags&16)!==0){if(u!==null)for(var h=0;h<u.length;h++){var y=u[h];Qe=y,Ll(y,s)}Lo(s)}for(s=s.child;s!==null;){switch(u=s,u.tag){case 0:case 11:case 15:wl(8,u,u.return),vu(u);break;case 22:h=u.stateNode,h._visibility&4&&(h._visibility&=-5,vu(u));break;default:vu(u)}s=s.sibling}}function Ll(s,u){for(;Qe!==null;){var h=Qe;switch(h.tag){case 0:case 11:case 15:wl(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:ru(h.memoizedState.cache)}if(y=h.child,y!==null)y.return=h,Qe=y;else t:for(h=s;Qe!==null;){y=Qe;var S=y.sibling,T=y.return;if(pu(y),y===h){Qe=null;break t}if(S!==null){S.return=T,Qe=S;break t}Qe=T}}}function Xo(s){var u=Lf(s);if(u!=null){if(typeof u.memoizedProps["data-testname"]!="string")throw Error(o(364));return u}if(s=Us(s),s===null)throw Error(o(362));return s.stateNode.current}function xu(s,u){var h=s.tag;switch(u.$$typeof){case Pr:if(s.type===u.value)return!0;break;case xc:t:{for(u=u.value,s=[s,0],h=0;h<s.length;){var y=s[h++],S=y.tag,T=s[h++],N=u[T];if(S!==5&&S!==26&&S!==27||!Oi(y)){for(;N!=null&&xu(y,N);)T++,N=u[T];if(T===u.length){u=!0;break t}else for(y=y.child;y!==null;)s.push(y,T),y=y.sibling}}u=!1}return u;case _c:if((h===5||h===26||h===27)&&Op(s.stateNode,u.value))return!0;break;case pe:if((h===5||h===6||h===26||h===27)&&(s=Nr(s),s!==null&&0<=s.indexOf(u.value)))return!0;break;case ne:if((h===5||h===26||h===27)&&(s=s.memoizedProps["data-testname"],typeof s=="string"&&s.toLowerCase()===u.value.toLowerCase()))return!0;break;default:throw Error(o(365))}return!1}function Xl(s){switch(s.$$typeof){case Pr:return"<"+(d(s.value)||"Unknown")+">";case xc:return":has("+(Xl(s)||"")+")";case _c:return'[role="'+s.value+'"]';case pe:return'"'+s.value+'"';case ne:return'[data-testname="'+s.value+'"]';default:throw Error(o(365))}}function jd(s,u){var h=[];s=[s,0];for(var y=0;y<s.length;){var S=s[y++],T=S.tag,N=s[y++],q=u[N];if(T!==5&&T!==26&&T!==27||!Oi(S)){for(;q!=null&&xu(S,q);)N++,q=u[N];if(N===u.length)h.push(S);else for(S=S.child;S!==null;)s.push(S,N),S=S.sibling}}return h}function Vn(s,u){if(!Di)throw Error(o(363));s=Xo(s),s=jd(s,u),u=[],s=Array.from(s);for(var h=0;h<s.length;){var y=s[h++],S=y.tag;if(S===5||S===26||S===27)Oi(y)||u.push(y.stateNode);else for(y=y.child;y!==null;)s.push(y),y=y.sibling}return u}function Qn(){if((Rt&2)!==0&&Kt!==0)return Kt&-Kt;if(Nt.T!==null){var s=sa;return s!==0?s:co()}return Va()}function Ti(){oa===0&&(oa=(Kt&536870912)===0||se?pt():536870912);var s=Da.current;return s!==null&&(s.flags|=32),oa}function Nn(s,u,h){(s===Pt&&be===2||s.cancelPendingCommit!==null)&&(ai(s,0),ni(s,Kt,oa,!1)),ht(s,h),((Rt&2)===0||s!==Pt)&&(s===Pt&&((Rt&2)===0&&(ci|=h),ae===4&&ni(s,Kt,oa,!1)),qa(s))}function br(s,u,h){if((Rt&6)!==0)throw Error(o(327));var y=!h&&(u&60)===0&&(u&s.expiredLanes)===0||V(s,u),S=y?Ai(s,u):Ei(s,u,!0),T=y;do{if(S===0){Oa&&!y&&ni(s,u,0,!1);break}else if(S===6)ni(s,u,0,!ye);else{if(h=s.current.alternate,T&&!qd(h)){S=Ei(s,u,!1),T=!1;continue}if(S===2){if(T=u,s.errorRecoveryDisabledLanes&T)var N=0;else N=s.pendingLanes&-536870913,N=N!==0?N:N&536870912?536870912:0;if(N!==0){u=N;t:{var q=s;S=Hu;var P=kn&&q.current.memoizedState.isDehydrated;if(P&&(ai(q,N).flags|=256),N=Ei(q,N,!1),N!==2){if(pl&&!P){q.errorRecoveryDisabledLanes|=T,ci|=T,S=4;break t}T=Ua,Ua=S,T!==null&&tl(T)}S=N}if(T=!1,S!==2)continue}}if(S===1){ai(s,0),ni(s,u,0,!0);break}t:{switch(y=s,S){case 0:case 1:throw Error(o(345));case 4:if((u&4194176)===u){ni(y,u,oa,!ye);break t}break;case 2:Ua=null;break;case 3:case 5:break;default:throw Error(o(329))}if(y.finishedWork=h,y.finishedLanes=u,(u&62914560)===u&&(T=Hi+300-An(),10<T)){if(ni(y,u,oa,!ye),Q(y,0)!==0)break t;y.timeoutHandle=Yf(Vo.bind(null,y,h,Ua,fi,Gu,u,oa,ci,yl,ye,2,-0,0),T);break t}Vo(y,h,Ua,fi,Gu,u,oa,ci,yl,ye,0,-0,0)}}break}while(!0);qa(s)}function tl(s){Ua===null?Ua=s:Ua.push.apply(Ua,s)}function Vo(s,u,h,y,S,T,N,q,P,ut,gt,St,bt){var Yt=u.subtreeFlags;if((Yt&8192||(Yt&16785408)===16785408)&&(ba(),Es(u),u=Io(),u!==null)){s.cancelPendingCommit=u(Ce.bind(null,s,h,y,S,N,q,P,1,St,bt)),ni(s,T,N,!ut);return}Ce(s,h,y,S,N,q,P,gt,St,bt)}function qd(s){for(var u=s;;){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 S=h[y],T=S.getSnapshot;S=S.value;try{if(!Ea(T(),S))return!1}catch{return!1}}if(h=u.child,u.subtreeFlags&16384&&h!==null)h.return=u,u=h;else{if(u===s)break;for(;u.sibling===null;){if(u.return===null||u.return===s)return!0;u=u.return}u.sibling.return=u.return,u=u.sibling}}return!0}function ni(s,u,h,y){u&=~jn,u&=~ci,s.suspendedLanes|=u,s.pingedLanes&=~u,y&&(s.warmLanes|=u),y=s.expirationTimes;for(var S=u;0<S;){var T=31-ia(S),N=1<<T;y[T]=-1,S&=~N}h!==0&&_t(s,h,u)}function Af(){return(Rt&6)===0?(Cl(0),!1):!0}function ea(){if(Xt!==null){if(be===0)var s=Xt.return;else s=Xt,Ve=as=null,nr(s),Ui=null,Ka=0,s=Xt;for(;s!==null;)Sf(s.alternate,s),s=s.return;Xt=null}}function ai(s,u){s.finishedWork=null,s.finishedLanes=0;var h=s.timeoutHandle;h!==Ns&&(s.timeoutHandle=Ns,Or(h)),h=s.cancelPendingCommit,h!==null&&(s.cancelPendingCommit=null,h()),ea(),Pt=s,Xt=h=Un(s.current,null),Kt=u,be=0,We=null,ye=!1,Oa=V(s,u),pl=!1,yl=oa=jn=ci=Na=ae=0,Ua=Hu=null,Gu=!1,(u&8)!==0&&(u|=u&32);var y=s.entangledLanes;if(y!==0)for(s=s.entanglements,y&=u;0<y;){var S=31-ia(y),T=1<<S;u|=s[S],y&=~T}return oi=u,pn(),h}function Cs(s,u){Qt=null,Nt.H=ue,u===xe?(u=eu(),be=3):u===ph?(u=eu(),be=4):be=u===vm?8:u!==null&&typeof u=="object"&&typeof u.then=="function"?6:1,We=u,Xt===null&&(ae=1,Ro(s,et(u,s.current)))}function Tr(){var s=Da.current;return s===null?!0:(Kt&4194176)===Kt?Za===null:(Kt&62914560)===Kt||(Kt&536870912)!==0?s===Za:!1}function _u(){var s=Nt.H;return Nt.H=ue,s===null?ue:s}function _a(){var s=Nt.A;return Nt.A=vc,s}function na(){ae=4,ye||(Kt&4194176)!==Kt&&Da.current!==null||(Oa=!0),(Na&134217727)===0&&(ci&134217727)===0||Pt===null||ni(Pt,Kt,oa,!1)}function Ei(s,u,h){var y=Rt;Rt|=2;var S=_u(),T=_a();(Pt!==s||Kt!==u)&&(fi=null,ai(s,u)),u=!1;var N=ae;t:do try{if(be!==0&&Xt!==null){var q=Xt,P=We;switch(be){case 8:ea(),N=6;break t;case 3:case 2:case 6:Da.current===null&&(u=!0);var ut=be;if(be=0,We=null,Vl(s,q,P,ut),h&&Oa){N=0;break t}break;default:ut=be,be=0,We=null,Vl(s,q,P,ut)}}Ci(),N=ae;break}catch(gt){Cs(s,gt)}while(!0);return u&&s.shellSuspendCounter++,Ve=as=null,Rt=y,Nt.H=S,Nt.A=T,Xt===null&&(Pt=null,Kt=0,pn()),N}function Ci(){for(;Xt!==null;)Mf(Xt)}function Ai(s,u){var h=Rt;Rt|=2;var y=_u(),S=_a();Pt!==s||Kt!==u?(fi=null,je=An()+500,ai(s,u)):Oa=V(s,u);t:do try{if(be!==0&&Xt!==null){u=Xt;var T=We;e:switch(be){case 1:be=0,We=null,Vl(s,u,T,1);break;case 2:if(tr(T)){be=0,We=null,Qo(u);break}u=function(){be===2&&Pt===s&&(be=7),qa(s)},T.then(u,u);break t;case 3:be=7;break t;case 4:be=5;break t;case 7:tr(T)?(be=0,We=null,Qo(u)):(be=0,We=null,Vl(s,u,T,7));break;case 5:var N=null;switch(Xt.tag){case 26:N=Xt.memoizedState;case 5:case 27:var q=Xt,P=q.type,ut=q.pendingProps;if(N?ch(N):rl(P,ut)){be=0,We=null;var gt=q.sibling;if(gt!==null)Xt=gt;else{var St=q.return;St!==null?(Xt=St,Er(St)):Xt=null}break e}}be=0,We=null,Vl(s,u,T,5);break;case 6:be=0,We=null,Vl(s,u,T,6);break;case 8:ea(),ae=6;break t;default:throw Error(o(462))}}el();break}catch(bt){Cs(s,bt)}while(!0);return Ve=as=null,Nt.H=y,Nt.A=S,Rt=h,Xt!==null?0:(Pt=null,Kt=0,pn(),ae)}function el(){for(;Xt!==null&&!dm();)Mf(Xt)}function Mf(s){var u=Od(s.alternate,s,oi);s.memoizedProps=s.pendingProps,u===null?Er(s):Xt=u}function Qo(s){var u=s,h=u.alternate;switch(u.tag){case 15:case 0:u=Ad(h,u,u.pendingProps,u.type,void 0,Kt);break;case 11:u=Ad(h,u,u.pendingProps,u.type.render,u.ref,Kt);break;case 5:nr(u);default:Sf(h,u),u=Xt=il(u,oi),u=Od(h,u,oi)}s.memoizedProps=s.pendingProps,u===null?Er(s):Xt=u}function Vl(s,u,h,y){Ve=as=null,nr(u),Ui=null,Ka=0;var S=u.return;try{if(Sd(s,S,u,h,Kt)){ae=1,Ro(s,et(h,s.current)),Xt=null;return}}catch(T){if(S!==null)throw Xt=S,T;ae=1,Ro(s,et(h,s.current)),Xt=null;return}u.flags&32768?(se||y===1?s=!0:Oa||(Kt&536870912)!==0?s=!1:(ye=s=!0,(y===2||y===3||y===6)&&(y=Da.current,y!==null&&y.tag===13&&(y.flags|=16384))),gn(u,s)):Er(u)}function Er(s){var u=s;do{if((u.flags&32768)!==0){gn(u,ye);return}s=u.return;var h=Ud(u.alternate,u,oi);if(h!==null){Xt=h;return}if(u=u.sibling,u!==null){Xt=u;return}Xt=u=s}while(u!==null);ae===0&&(ae=5)}function gn(s,u){do{var h=Bd(s.alternate,s);if(h!==null){h.flags&=32767,Xt=h;return}if(h=s.return,h!==null&&(h.flags|=32768,h.subtreeFlags=0,h.deletions=null),!u&&(s=s.sibling,s!==null)){Xt=s;return}Xt=s=h}while(s!==null);ae=6,Xt=null}function Ce(s,u,h,y,S,T,N,q,P,ut){var gt=Nt.T,St=hn();try{Bn(2),Nt.T=null,te(s,u,h,y,St,S,T,N,q,P,ut)}finally{Nt.T=gt,Bn(St)}}function te(s,u,h,y,S,T,N,q){do vn();while(gl!==null);if((Rt&6)!==0)throw Error(o(327));var P=s.finishedWork;if(y=s.finishedLanes,P===null)return null;if(s.finishedWork=null,s.finishedLanes=0,P===s.current)throw Error(o(177));s.callbackNode=null,s.callbackPriority=0,s.cancelPendingCommit=null;var ut=P.lanes|P.childLanes;if(ut|=Ou,vt(s,y,ut,T,N,q),s===Pt&&(Xt=Pt=null,Kt=0),(P.subtreeFlags&10256)===0&&(P.flags&10256)===0||Pa||(Pa=!0,Sc=ut,Ls=h,Cr(cc,function(){return vn(),null})),h=(P.flags&15990)!==0,(P.subtreeFlags&15990)!==0||h?(h=Nt.T,Nt.T=null,T=hn(),Bn(2),N=Rt,Rt|=4,mu(s,P),Gl(P,s),jf(s.containerInfo),s.current=P,Go(s,P.alternate,P),mm(),Rt=N,Bn(T),Nt.T=h):s.current=P,Pa?(Pa=!1,gl=s,Ys=y):nl(s,ut),ut=s.pendingLanes,ut===0&&(Ba=null),w(P.stateNode),qa(s),u!==null)for(S=s.onRecoverableError,P=0;P<u.length;P++)ut=u[P],S(ut.value,{componentStack:ut.stack});return(Ys&3)!==0&&vn(),ut=s.pendingLanes,(y&4194218)!==0&&(ut&42)!==0?s===Jn?Xs++:(Xs=0,Jn=s):Xs=0,Cl(0),null}function nl(s,u){(s.pooledCacheLanes&=u)===0&&(u=s.pooledCache,u!=null&&(s.pooledCache=null,ru(u)))}function vn(){if(gl!==null){var s=gl,u=Sc;Sc=0;var h=Dt(Ys),y=32>h?32:h;h=Nt.T;var S=hn();try{if(Bn(y),Nt.T=null,gl===null)var T=!1;else{y=Ls,Ls=null;var N=gl,q=Ys;if(gl=null,Ys=0,(Rt&6)!==0)throw Error(o(331));var P=Rt;if(Rt|=4,Sr(N.current),Yo(N,N.current,q,y),Rt=P,Cl(0,!1),la&&typeof la.onPostCommitFiberRoot=="function")try{la.onPostCommitFiberRoot(zu,N)}catch{}T=!0}return T}finally{Bn(S),Nt.T=h,nl(s,u)}}return!1}function ko(s,u,h){u=et(h,u),u=dr(s.stateNode,u,2),s=$e(s,u,2),s!==null&&(ht(s,2),qa(s))}function It(s,u,h){if(s.tag===3)ko(s,s,h);else for(;u!==null;){if(u.tag===3){ko(u,s,h);break}else if(u.tag===1){var y=u.stateNode;if(typeof u.type.getDerivedStateFromError=="function"||typeof y.componentDidCatch=="function"&&(Ba===null||!Ba.has(y))){s=et(h,s),h=uu(2),y=$e(u,h,2),y!==null&&(mr(h,y,u,s),ht(y,2),qa(y));break}}u=u.return}}function Ko(s,u,h){var y=s.pingCache;if(y===null){y=s.pingCache=new $t;var S=new Set;y.set(u,S)}else S=y.get(u),S===void 0&&(S=new Set,y.set(u,S));S.has(h)||(pl=!0,S.add(h),s=Yd.bind(null,s,u,h),u.then(s,s))}function Yd(s,u,h){var y=s.pingCache;y!==null&&y.delete(u),s.pingedLanes|=s.suspendedLanes&h,s.warmLanes&=~h,Pt===s&&(Kt&h)===h&&(ae===4||ae===3&&(Kt&62914560)===Kt&&300>An()-Hi?(Rt&2)===0&&ai(s,0):jn|=h,yl===Kt&&(yl=0)),qa(s)}function As(s,u){u===0&&(u=ot()),s=Ia(s,u),s!==null&&(ht(s,u),qa(s))}function Ms(s){var u=s.memoizedState,h=0;u!==null&&(h=u.retryLane),As(s,h)}function Rf(s,u){var h=0;switch(s.tag){case 13:var y=s.stateNode,S=s.memoizedState;S!==null&&(h=S.retryLane);break;case 19:y=s.stateNode;break;case 22:y=s.stateNode._retryCache;break;default:throw Error(o(314))}y!==null&&y.delete(u),As(s,h)}function Cr(s,u){return Ru(s,u)}function zf(s,u,h,y){this.tag=s,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 al(s){return s=s.prototype,!(!s||!s.isReactComponent)}function Un(s,u){var h=s.alternate;return h===null?(h=n(s.tag,u,s.key,s.mode),h.elementType=s.elementType,h.type=s.type,h.stateNode=s.stateNode,h.alternate=s,s.alternate=h):(h.pendingProps=u,h.type=s.type,h.flags=0,h.subtreeFlags=0,h.deletions=null),h.flags=s.flags&31457280,h.childLanes=s.childLanes,h.lanes=s.lanes,h.child=s.child,h.memoizedProps=s.memoizedProps,h.memoizedState=s.memoizedState,h.updateQueue=s.updateQueue,u=s.dependencies,h.dependencies=u===null?null:{lanes:u.lanes,firstContext:u.firstContext},h.sibling=s.sibling,h.index=s.index,h.ref=s.ref,h.refCleanup=s.refCleanup,h}function il(s,u){s.flags&=31457282;var h=s.alternate;return h===null?(s.childLanes=0,s.lanes=u,s.child=null,s.subtreeFlags=0,s.memoizedProps=null,s.memoizedState=null,s.updateQueue=null,s.dependencies=null,s.stateNode=null):(s.childLanes=h.childLanes,s.lanes=h.lanes,s.child=h.child,s.subtreeFlags=0,s.deletions=null,s.memoizedProps=h.memoizedProps,s.memoizedState=h.memoizedState,s.updateQueue=h.updateQueue,s.type=h.type,u=h.dependencies,s.dependencies=u===null?null:{lanes:u.lanes,firstContext:u.firstContext}),s}function Xa(s,u,h,y,S,T){var N=0;if(y=s,typeof s=="function")al(s)&&(N=1);else if(typeof s=="string")N=Ta&&Cn?ah(s,h,_n.current)?26:Au(s)?27:5:Ta?ah(s,h,_n.current)?26:5:Cn&&Au(s)?27:5;else t:switch(s){case bu:return ll(h.children,S,T,u);case Bf:N=8,S|=24;break;case wf:return s=n(12,h,u,S|2),s.elementType=wf,s.lanes=T,s;case Jo:return s=n(13,h,u,S),s.elementType=Jo,s.lanes=T,s;case Kl:return s=n(19,h,u,S),s.elementType=Kl,s.lanes=T,s;case Rr:return Zo(h,S,T,u);default:if(typeof s=="object"&&s!==null)switch(s.$$typeof){case Vd:case Mi:N=10;break t;case kl:N=9;break t;case Tu:N=11;break t;case Mr:N=14;break t;case li:N=16,y=null;break t}N=29,h=Error(o(130,s===null?"null":typeof s,"")),y=null}return u=n(N,h,u,S),u.elementType=s,u.type=y,u.lanes=T,u}function ll(s,u,h,y){return s=n(7,s,y,u),s.lanes=h,s}function Zo(s,u,h,y){s=n(22,s,y,u),s.elementType=Rr,s.lanes=h;var S={_visibility:1,_pendingVisibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null,_current:null,detach:function(){var T=S._current;if(T===null)throw Error(o(456));if((S._pendingVisibility&2)===0){var N=Ia(T,2);N!==null&&(S._pendingVisibility|=2,Nn(N,T,2))}},attach:function(){var T=S._current;if(T===null)throw Error(o(456));if((S._pendingVisibility&2)!==0){var N=Ia(T,2);N!==null&&(S._pendingVisibility&=-3,Nn(N,T,2))}}};return s.stateNode=S,s}function Ql(s,u,h){return s=n(6,s,null,u),s.lanes=h,s}function Su(s,u,h){return u=n(4,s.children!==null?s.children:[],s.key,u),u.lanes=h,u.stateNode={containerInfo:s.containerInfo,pendingChildren:null,implementation:s.implementation},u}function Rs(s,u,h,y,S,T,N,q){this.tag=1,this.containerInfo=s,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=Ns,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=ft(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.finishedLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=ft(0),this.hiddenUpdates=ft(null),this.identifierPrefix=y,this.onUncaughtError=S,this.onCaughtError=T,this.onRecoverableError=N,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=q,this.incompleteTransitions=new Map}function xn(s,u,h,y,S,T,N,q,P,ut,gt,St){return s=new Rs(s,u,h,N,q,P,ut,St),u=1,T===!0&&(u|=24),T=n(3,null,null,u),s.current=T,T.stateNode=s,u=No(),u.refCount++,s.pooledCache=u,u.refCount++,T.memoizedState={element:y,isDehydrated:h,cache:u},Pc(T),s}function Ar(s){return s?(s=Bs,s):Bs}function Df(s){var u=s._reactInternals;if(u===void 0)throw typeof s.render=="function"?Error(o(188)):(s=Object.keys(s).join(","),Error(o(268,s)));return s=E(u),s=s!==null?M(s):null,s===null?null:Eu(s.stateNode)}function Ld(s,u,h,y,S,T){S=Ar(S),y.context===null?y.context=S:y.pendingContext=S,y=Ya(u),y.payload={element:h},T=T===void 0?null:T,T!==null&&(y.callback=T),h=$e(s,y,u),h!==null&&(Nn(h,s,u),La(h,s,u))}function Xd(s,u){if(s=s.memoizedState,s!==null&&s.dehydrated!==null){var h=s.retryLane;s.retryLane=h!==0&&h<u?h:u}}function Of(s,u){Xd(s,u),(s=s.alternate)&&Xd(s,u)}var Mt={},Nf=gp(),Tn=T4(),zs=Object.assign,Uf=Symbol.for("react.element"),sl=Symbol.for("react.transitional.element"),ii=Symbol.for("react.portal"),bu=Symbol.for("react.fragment"),Bf=Symbol.for("react.strict_mode"),wf=Symbol.for("react.profiler"),Vd=Symbol.for("react.provider"),kl=Symbol.for("react.consumer"),Mi=Symbol.for("react.context"),Tu=Symbol.for("react.forward_ref"),Jo=Symbol.for("react.suspense"),Kl=Symbol.for("react.suspense_list"),Mr=Symbol.for("react.memo"),li=Symbol.for("react.lazy"),Rr=Symbol.for("react.offscreen"),Qd=Symbol.for("react.memo_cache_sentinel"),Hf=Symbol.iterator,Ds=Symbol.for("react.client.reference"),Nt=Nf.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,Po,Gf,Zl=!1,Jl=Array.isArray,Wo=t.rendererVersion,zr=t.rendererPackageName,Dr=t.extraDevToolsConfig,Eu=t.getPublicInstance,Os=t.getRootHostContext,kd=t.getChildHostContext,Pl=t.prepareForCommit,jf=t.resetAfterCommit,qf=t.createInstance,Ri=t.appendInitialChild,ul=t.finalizeInitialChildren,Wl=t.shouldSetTextContent,Fo=t.createTextInstance,Yf=t.scheduleTimeout,Or=t.cancelTimeout,Ns=t.noTimeout,zi=t.isPrimaryRenderer;t.warnsIfNotActing;var En=t.supportsMutation,Sa=t.supportsPersistence,kn=t.supportsHydration,Lf=t.getInstanceFromNode;t.beforeActiveInstanceBlur,t.afterActiveInstanceBlur;var Xf=t.preparePortalMount;t.prepareScopeUpdate,t.getInstanceFromScope;var Bn=t.setCurrentUpdatePriority,hn=t.getCurrentUpdatePriority,Va=t.resolveUpdatePriority;t.resolveEventType,t.resolveEventTimeStamp;var Fl=t.shouldAttemptEagerTransition,Vf=t.detachDeletedInstance;t.requestPostPaintCallback;var Kd=t.maySuspendCommit,rl=t.preloadInstance,ba=t.startSuspendingCommit,qe=t.suspendInstance,Io=t.waitForCommitToBeReady,aa=t.NotPendingTransition,Ht=t.HostTransitionContext,Se=t.resetFormInstance;t.bindToConsole;var en=t.supportsMicrotasks,$o=t.scheduleMicrotask,Di=t.supportsTestSelectors,Us=t.findFiberRoot,tc=t.getBoundingRect,Nr=t.getTextContent,Oi=t.isHiddenSubtree,Op=t.matchAccessibilityRole,Ye=t.setFocusIfFocusable,Qf=t.setupIntersectionObserver,kf=t.appendChild,Zd=t.appendChildToContainer,Jd=t.commitTextUpdate,Np=t.commitMount,Kf=t.commitUpdate,Zf=t.insertBefore,Jf=t.insertInContainerBefore,Kn=t.removeChild,Ke=t.removeChildFromContainer,Ur=t.resetTextContent,Br=t.hideInstance,ec=t.hideTextInstance,Pf=t.unhideInstance,ol=t.unhideTextInstance,nc=t.clearContainer,Wf=t.cloneInstance,ac=t.createContainerChildSet,Ff=t.appendChildToContainerChildSet,Pd=t.finalizeContainerChildren,If=t.replaceContainerChildren,$f=t.cloneHiddenInstance,th=t.cloneHiddenTextInstance,ic=t.isSuspenseInstancePending,wr=t.isSuspenseInstanceFallback,Wd=t.getSuspenseInstanceFallbackErrorDetails,Up=t.registerSuspenseInstanceRetry,Fd=t.canHydrateFormStateMarker,Id=t.isFormStateMarkerMatching,eh=t.getNextHydratableSibling,lc=t.getFirstHydratableChild,$d=t.getFirstHydratableChildWithinContainer,tm=t.getFirstHydratableChildWithinSuspenseInstance,em=t.canHydrateInstance,nm=t.canHydrateTextInstance,am=t.canHydrateSuspenseInstance,Bp=t.hydrateInstance,im=t.hydrateTextInstance,Cu=t.hydrateSuspenseInstance,lm=t.getNextHydratableInstanceAfterSuspenseInstance,sc=t.commitHydratedContainer,uc=t.commitHydratedSuspenseInstance,sm=t.clearSuspenseBoundary,nh=t.clearSuspenseBoundaryFromContainer,um=t.shouldDeleteUnhydratedTailInstances;t.diffHydratedPropsForDevWarnings,t.diffHydratedTextForDevWarnings,t.describeHydratableInstanceForDevWarnings;var rm=t.validateHydratableInstance,om=t.validateHydratableTextInstance,Ta=t.supportsResources,ah=t.isHostHoistableType,rc=t.getHoistableRoot,oc=t.getResource,ih=t.acquireResource,lh=t.releaseResource,sh=t.hydrateHoistable,uh=t.mountHoistable,rh=t.unmountHoistable,wp=t.createHoistableInstance,oh=t.prepareToCommitHoistables,cm=t.mayResourceSuspendCommit,ch=t.preloadResource,fh=t.suspendResource,Cn=t.supportsSingletons,hh=t.resolveSingletonInstance,Hp=t.clearSingleton,Gp=t.acquireSingletonInstance,fm=t.releaseSingletonInstance,Au=t.isHostSingletonType,Hr=[],cl=-1,Bs={},ia=Math.clz32?Math.clz32:B,Gr=Math.log,hm=Math.LN2,Mu=128,jr=4194304,Ru=Tn.unstable_scheduleCallback,qr=Tn.unstable_cancelCallback,dm=Tn.unstable_shouldYield,mm=Tn.unstable_requestPaint,An=Tn.unstable_now,dh=Tn.unstable_ImmediatePriority,pm=Tn.unstable_UserBlockingPriority,cc=Tn.unstable_NormalPriority,fc=Tn.unstable_IdlePriority,ym=Tn.log,mh=Tn.unstable_setDisableYieldValue,zu=null,la=null,Ea=typeof Object.is=="function"?Object.is:at,hc=new WeakMap,Ue=[],Le=0,Yr=null,Lr=0,Ca=[],Aa=0,si=null,Ni=1,Qa="",_n=R(null),Xr=R(null),ui=R(null),Du=R(null),wn=null,Mn=null,se=!1,Ma=null,ka=!1,Vr=Error(o(519)),Ra=[],Il=0,Ou=0,Nu=null,ws=null,Qr=!1,kr=!1,ri=!1,$l=0,Kr=null,dc=0,sa=0,ts=null,fl=!1,Uu=!1,Zr=Object.prototype.hasOwnProperty,xe=Error(o(460)),ph=Error(o(474)),mc={then:function(){}},Hs=null,Ui=null,Ka=0,es=hd(!0),yh=hd(!1),Bi=R(null),za=R(0),Da=R(null),Za=null,nn=R(0),wi=0,Qt=null,he=null,Ze=null,Ja=!1,Be=!1,hl=!1,Jr=0,Xe=0,Bu=null,gm=0,pc=function(){return{lastEffect:null,events:null,stores:null,memoCache:null}},ue={readContext:bn,use:Pi,useCallback:Ft,useContext:Ft,useEffect:Ft,useImperativeHandle:Ft,useLayoutEffect:Ft,useInsertionEffect:Ft,useMemo:Ft,useReducer:Ft,useRef:Ft,useState:Ft,useDebugValue:Ft,useDeferredValue:Ft,useTransition:Ft,useSyncExternalStore:Ft,useId:Ft};ue.useCacheRefresh=Ft,ue.useMemoCache=Ft,ue.useHostTransitionStatus=Ft,ue.useFormState=Ft,ue.useActionState=Ft,ue.useOptimistic=Ft;var an={readContext:bn,use:Pi,useCallback:function(s,u){return fn().memoizedState=[s,u===void 0?null:u],s},useContext:bn,useEffect:af,useImperativeHandle:function(s,u,h){h=h!=null?h.concat([s]):null,bo(4194308,4,rr.bind(null,u,s),h)},useLayoutEffect:function(s,u){return bo(4194308,4,s,u)},useInsertionEffect:function(s,u){bo(4,2,s,u)},useMemo:function(s,u){var h=fn();u=u===void 0?null:u;var y=s();if(hl){H(!0);try{s()}finally{H(!1)}}return h.memoizedState=[y,u],y},useReducer:function(s,u,h){var y=fn();if(h!==void 0){var S=h(u);if(hl){H(!0);try{h(u)}finally{H(!1)}}}else S=u;return y.memoizedState=y.baseState=S,s={pending:null,lanes:0,dispatch:null,lastRenderedReducer:s,lastRenderedState:S},y.queue=s,s=s.dispatch=zl.bind(null,Qt,s),[y.memoizedState,s]},useRef:function(s){var u=fn();return s={current:s},u.memoizedState=s},useState:function(s){s=ti(s);var u=s.queue,h=Ao.bind(null,Qt,u);return u.dispatch=h,[s.memoizedState,h]},useDebugValue:or,useDeferredValue:function(s,u){var h=fn();return Rl(h,s,u)},useTransition:function(){var s=ti(!1);return s=Eo.bind(null,Qt,s.queue,!0,!1),fn().memoizedState=s,[!1,s]},useSyncExternalStore:function(s,u,h){var y=Qt,S=fn();if(se){if(h===void 0)throw Error(o(407));h=h()}else{if(h=u(),Pt===null)throw Error(o(349));(Kt&60)!==0||Ic(y,u,h)}S.memoizedState=h;var T={value:h,getSnapshot:u};return S.queue=T,af(pd.bind(null,y,T,s),[s]),y.flags|=2048,ps(9,$c.bind(null,y,T,h,u),{destroy:void 0},null),h},useId:function(){var s=fn(),u=Pt.identifierPrefix;if(se){var h=Qa,y=Ni;h=(y&~(1<<32-ia(y)-1)).toString(32)+h,u=":"+u+"R"+h,h=Jr++,0<h&&(u+="H"+h.toString(32)),u+=":"}else h=gm++,u=":"+u+"r"+h.toString(32)+":";return s.memoizedState=u},useCacheRefresh:function(){return fn().memoizedState=cr.bind(null,Qt)}};an.useMemoCache=tn,an.useHostTransitionStatus=vs,an.useFormState=_o,an.useActionState=_o,an.useOptimistic=function(s){var u=fn();u.memoizedState=u.baseState=s;var h={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return u.queue=h,u=Mo.bind(null,Qt,!0,h),h.dispatch=u,[s,u]};var Hn={readContext:bn,use:Pi,useCallback:To,useContext:bn,useEffect:ur,useImperativeHandle:_i,useInsertionEffect:xd,useLayoutEffect:_d,useMemo:gs,useReducer:ar,useRef:ys,useState:function(){return ar(xi)},useDebugValue:or,useDeferredValue:function(s,u){var h=De();return lf(h,he.memoizedState,s,u)},useTransition:function(){var s=ar(xi)[0],u=De().memoizedState;return[typeof s=="boolean"?s:Ji(s),u]},useSyncExternalStore:md,useId:Si};Hn.useCacheRefresh=Co,Hn.useMemoCache=tn,Hn.useHostTransitionStatus=vs,Hn.useFormState=ef,Hn.useActionState=ef,Hn.useOptimistic=function(s,u){var h=De();return ya(h,he,s,u)};var ns={readContext:bn,use:Pi,useCallback:To,useContext:bn,useEffect:ur,useImperativeHandle:_i,useInsertionEffect:xd,useLayoutEffect:_d,useMemo:gs,useReducer:Ml,useRef:ys,useState:function(){return Ml(xi)},useDebugValue:or,useDeferredValue:function(s,u){var h=De();return he===null?Rl(h,s,u):lf(h,he.memoizedState,s,u)},useTransition:function(){var s=Ml(xi)[0],u=De().memoizedState;return[typeof s=="boolean"?s:Ji(s),u]},useSyncExternalStore:md,useId:Si};ns.useCacheRefresh=Co,ns.useMemoCache=tn,ns.useHostTransitionStatus=vs,ns.useFormState=nf,ns.useActionState=nf,ns.useOptimistic=function(s,u){var h=De();return he!==null?ya(h,he,s,u):(h.baseState=s,[s,h.queue.dispatch])};var yc={isMounted:function(s){return(s=s._reactInternals)?b(s)===s:!1},enqueueSetState:function(s,u,h){s=s._reactInternals;var y=Qn(),S=Ya(y);S.payload=u,h!=null&&(S.callback=h),u=$e(s,S,y),u!==null&&(Nn(u,s,y),La(u,s,y))},enqueueReplaceState:function(s,u,h){s=s._reactInternals;var y=Qn(),S=Ya(y);S.tag=1,S.payload=u,h!=null&&(S.callback=h),u=$e(s,S,y),u!==null&&(Nn(u,s,y),La(u,s,y))},enqueueForceUpdate:function(s,u){s=s._reactInternals;var h=Qn(),y=Ya(h);y.tag=2,u!=null&&(y.callback=u),u=$e(s,y,h),u!==null&&(Nn(u,s,h),La(u,s,h))}},gh=typeof reportError=="function"?reportError:function(s){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var u=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof s=="object"&&s!==null&&typeof s.message=="string"?String(s.message):String(s),error:s});if(!window.dispatchEvent(u))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",s);return}console.error(s)},vm=Error(o(461)),Je=!1,Gn={dehydrated:null,treeContext:null,retryLane:0},ua=R(null),as=null,Ve=null,xm=typeof AbortController<"u"?AbortController:function(){var s=[],u=this.signal={aborted:!1,addEventListener:function(h,y){s.push(y)}};this.abort=function(){u.aborted=!0,s.forEach(function(h){return h()})}},dl=Tn.unstable_scheduleCallback,Gs=Tn.unstable_NormalPriority,me={$$typeof:Mi,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0},gc=Nt.S;Nt.S=function(s,u){typeof u=="object"&&u!==null&&typeof u.then=="function"&&fo(s,u),gc!==null&&gc(s,u)};var ml=R(null),dn=!1,Ge=!1,is=!1,wu=typeof WeakSet=="function"?WeakSet:Set,Qe=null,js=!1,Pe=null,ra=!1,Zn=null,qs=8192,vc={getCacheForType:function(s){var u=bn(me),h=u.data.get(s);return h===void 0&&(h=s(),u.data.set(s,h)),h}},Pr=0,xc=1,_c=2,ne=3,pe=4;if(typeof Symbol=="function"&&Symbol.for){var kt=Symbol.for;Pr=kt("selector.component"),xc=kt("selector.has_pseudo_class"),_c=kt("selector.role"),ne=kt("selector.test_id"),pe=kt("selector.text")}var $t=typeof WeakMap=="function"?WeakMap:Map,Rt=0,Pt=null,Xt=null,Kt=0,be=0,We=null,ye=!1,Oa=!1,pl=!1,oi=0,ae=0,Na=0,ci=0,jn=0,oa=0,yl=0,Hu=null,Ua=null,Gu=!1,Hi=0,je=1/0,fi=null,Ba=null,Pa=!1,gl=null,Ys=0,Sc=0,Ls=null,Xs=0,Jn=null;return Mt.attemptContinuousHydration=function(s){if(s.tag===13){var u=Ia(s,67108864);u!==null&&Nn(u,s,67108864),Of(s,67108864)}},Mt.attemptHydrationAtCurrentPriority=function(s){if(s.tag===13){var u=Qn(),h=Ia(s,u);h!==null&&Nn(h,s,u),Of(s,u)}},Mt.attemptSynchronousHydration=function(s){switch(s.tag){case 3:if(s=s.stateNode,s.current.memoizedState.isDehydrated){var u=G(s.pendingLanes);if(u!==0){for(s.pendingLanes|=2,s.entangledLanes|=2;u;){var h=1<<31-ia(u);s.entanglements[1]|=h,u&=~h}qa(s),(Rt&6)===0&&(je=An()+500,Cl(0))}}break;case 13:u=Ia(s,2),u!==null&&Nn(u,s,2),Af(),Of(s,2)}},Mt.batchedUpdates=function(s,u){return s(u)},Mt.createComponentSelector=function(s){return{$$typeof:Pr,value:s}},Mt.createContainer=function(s,u,h,y,S,T,N,q,P,ut){return xn(s,u,!1,null,h,y,T,N,q,P,ut,null)},Mt.createHasPseudoClassSelector=function(s){return{$$typeof:xc,value:s}},Mt.createHydrationContainer=function(s,u,h,y,S,T,N,q,P,ut,gt,St,bt){return s=xn(h,y,!0,s,S,T,q,P,ut,gt,St,bt),s.context=Ar(null),h=s.current,y=Qn(),S=Ya(y),S.callback=u??null,$e(h,S,y),s.current.lanes=y,ht(s,y),qa(s),s},Mt.createPortal=function(s,u,h){var y=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:ii,key:y==null?null:""+y,children:s,containerInfo:u,implementation:h}},Mt.createRoleSelector=function(s){return{$$typeof:_c,value:s}},Mt.createTestNameSelector=function(s){return{$$typeof:ne,value:s}},Mt.createTextSelector=function(s){return{$$typeof:pe,value:s}},Mt.defaultOnCaughtError=function(s){console.error(s)},Mt.defaultOnRecoverableError=function(s){gh(s)},Mt.defaultOnUncaughtError=function(s){gh(s)},Mt.deferredUpdates=function(s){var u=Nt.T,h=hn();try{return Bn(32),Nt.T=null,s()}finally{Bn(h),Nt.T=u}},Mt.discreteUpdates=function(s,u,h,y,S){var T=Nt.T,N=hn();try{return Bn(2),Nt.T=null,s(u,h,y,S)}finally{Bn(N),Nt.T=T,Rt===0&&(je=An()+500)}},Mt.findAllNodes=Vn,Mt.findBoundingRects=function(s,u){if(!Di)throw Error(o(363));u=Vn(s,u),s=[];for(var h=0;h<u.length;h++)s.push(tc(u[h]));for(u=s.length-1;0<u;u--){h=s[u];for(var y=h.x,S=y+h.width,T=h.y,N=T+h.height,q=u-1;0<=q;q--)if(u!==q){var P=s[q],ut=P.x,gt=ut+P.width,St=P.y,bt=St+P.height;if(y>=ut&&T>=St&&S<=gt&&N<=bt){s.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>S)){ut>y&&(P.width+=ut-y,P.x=y),gt<S&&(P.width=S-ut),s.splice(u,1);break}}else{St>T&&(P.height+=St-T,P.y=T),bt<N&&(P.height=N-St),s.splice(u,1);break}}}return s},Mt.findHostInstance=Df,Mt.findHostInstanceWithNoPortals=function(s){return s=E(s),s=s!==null?z(s):null,s===null?null:Eu(s.stateNode)},Mt.findHostInstanceWithWarning=function(s){return Df(s)},Mt.flushPassiveEffects=vn,Mt.flushSyncFromReconciler=function(s){var u=Rt;Rt|=1;var h=Nt.T,y=hn();try{if(Bn(2),Nt.T=null,s)return s()}finally{Bn(y),Nt.T=h,Rt=u,(Rt&6)===0&&Cl(0)}},Mt.flushSyncWork=Af,Mt.focusWithin=function(s,u){if(!Di)throw Error(o(363));for(s=Xo(s),u=jd(s,u),u=Array.from(u),s=0;s<u.length;){var h=u[s++],y=h.tag;if(!Oi(h)){if((y===5||y===26||y===27)&&Ye(h.stateNode))return!0;for(h=h.child;h!==null;)u.push(h),h=h.sibling}}return!1},Mt.getFindAllNodesFailureDescription=function(s,u){if(!Di)throw Error(o(363));var h=0,y=[];s=[Xo(s),0];for(var S=0;S<s.length;){var T=s[S++],N=T.tag,q=s[S++],P=u[q];if((N!==5&&N!==26&&N!==27||!Oi(T))&&(xu(T,P)&&(y.push(Xl(P)),q++,q>h&&(h=q)),q<u.length))for(T=T.child;T!==null;)s.push(T,q),T=T.sibling}if(h<u.length){for(s=[];h<u.length;h++)s.push(Xl(u[h]));return`findAllNodes was able to match part of the selector:
|
|
341
|
+
`+(y.join(" > ")+`
|
|
342
|
+
|
|
343
|
+
No matching component was found for:
|
|
344
|
+
`)+s.join(" > ")}return null},Mt.getPublicRootInstance=function(s){if(s=s.current,!s.child)return null;switch(s.child.tag){case 27:case 5:return Eu(s.child.stateNode);default:return s.child.stateNode}},Mt.injectIntoDevTools=function(){var s={bundleType:0,version:Wo,rendererPackageName:zr,currentDispatcherRef:Nt,findFiberByHostInstance:Lf,reconcilerVersion:"19.0.0"};if(Dr!==null&&(s.rendererConfig=Dr),typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u")s=!1;else{var u=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(u.isDisabled||!u.supportsFiber)s=!0;else{try{zu=u.inject(s),la=u}catch{}s=!!u.checkDCE}}return s},Mt.isAlreadyRendering=function(){return!1},Mt.observeVisibleRects=function(s,u,h,y){if(!Di)throw Error(o(363));s=Vn(s,u);var S=Qf(s,h,y).disconnect;return{disconnect:function(){S()}}},Mt.shouldError=function(){return null},Mt.shouldSuspend=function(){return!1},Mt.startHostTransition=function(s,u,h,y){if(s.tag!==5)throw Error(o(476));var S=sf(s).queue;Eo(s,S,u,aa,h===null?l:function(){var T=sf(s).next.queue;return Dl(s,T,{},Qn()),h(y)})},Mt.updateContainer=function(s,u,h,y){var S=u.current,T=Qn();return Ld(S,T,s,u,h,y),T},Mt.updateContainerSync=function(s,u,h,y){return u.tag===0&&vn(),Ld(u.current,2,s,u,h,y),2},Mt},a.exports.default=a.exports,Object.defineProperty(a.exports,"__esModule",{value:!0})})(Wy)),Wy.exports}var Qv;function C4(){return Qv||(Qv=1,Py.exports=E4()),Py.exports}var A4=C4();const M4=yp(A4),R4=M4;function z4(a,t,n,l){throw new Error("Text instances are not yet supported. Please use a `<text>` component.")}function D4(){}function O4(){return!1}const uS={};function N4(a){return a??uS}function U4(){return Pu.currentUpdatePriority}function B4(){return null}function w4(a){throw new Error("Not yet implemented.")}function H4(a){return a}function G4(){return uS}function j4(a){a instanceof ma?a.visible=!1:a instanceof oo&&(a.enabled=!1)}function q4(a){throw new Error("Text instances are not yet supported. Please use a `<text>` component.")}function rS(a){if(a instanceof oo){const t=a.__pixireact.parent;if(t){const n=t.__pixireact.filters.indexOf(a);t.__pixireact.filters.splice(n,1),t.filters=t.__pixireact.filters}a.__pixireact.parent=null}}function oS(a,t,...n){}function kv(a,t,n){if(oS(),t instanceof ma){const l=t,o=t,f=n;l.parent===a&&a.removeChild(o);const d=a.getChildIndex(f);a.addChildAt(o,d)}else if(t instanceof oo){const f=t.__pixireact.filters.indexOf(n);rS(t),eS(a,t,f)}}function Y4(){return!1}function L4(){return!0}function X4(){return null}function V4(){}function Q4(){}function Kv(a,t){t instanceof oo&&rS(t),t.destroy()}function k4(a){}function K4(){}function Z4(){}function J4(){return-1.1}function P4(){return null}function W4(){var n;if(Pu.currentUpdatePriority)return Pu.currentUpdatePriority;const a=typeof self<"u"&&self||typeof window<"u"&&window;if(!a)return jc.DefaultEventPriority;switch((n=a.event)==null?void 0:n.type){case"click":case"contextmenu":case"dblclick":case"pointercancel":case"pointerdown":case"pointerup":return jc.DiscreteEventPriority;case"pointermove":case"pointerout":case"pointerover":case"pointerenter":case"pointerleave":case"wheel":return jc.ContinuousEventPriority;default:return jc.DefaultEventPriority}}function F4(a){Pu.currentUpdatePriority=a}function I4(){return!1}function $4(){return!1}function tM(){}function eM(){}function nM(){}function aM(a){a instanceof ma?a.visible=!0:a instanceof oo&&(a.enabled=!0)}function iM(a){throw new Error("Text instances are not yet supported. Please use a `<text>` component.")}function lM(){return null}const sM={isPrimaryRenderer:!1,noTimeout:-1,NotPendingTransition:null,supportsHydration:!1,supportsMutation:!0,supportsPersistence:!1,warnsIfNotActing:!1,afterActiveInstanceBlur:a4,appendChild:Jy,appendChildToContainer:Jy,appendInitialChild:Jy,beforeActiveInstanceBlur:i4,cancelTimeout:clearTimeout,clearContainer:l4,commitUpdate:y4,createInstance:S4,createTextInstance:z4,hideTextInstance:q4,unhideTextInstance:iM,detachDeletedInstance:D4,finalizeInitialChildren:O4,getChildHostContext:N4,getCurrentUpdatePriority:U4,getInstanceFromNode:B4,getInstanceFromScope:w4,getPublicInstance:H4,getRootHostContext:G4,hideInstance:j4,insertBefore:kv,insertInContainerBefore:kv,maySuspendCommit:Y4,preloadInstance:L4,prepareForCommit:X4,preparePortalMount:V4,prepareScopeUpdate:Q4,removeChild:Kv,removeChildFromContainer:Kv,requestPostPaintCallback:k4,resetAfterCommit:K4,resetFormInstance:Z4,resolveEventTimeStamp:J4,resolveEventType:P4,resolveUpdatePriority:W4,scheduleTimeout:setTimeout,shouldAttemptEagerTransition:I4,setCurrentUpdatePriority:F4,shouldSetTextContent:$4,startSuspendingCommit:tM,suspendInstance:eM,trackSchedulerEvent:nM,unhideInstance:aM,waitForCommitToBeReady:lM,rendererPackageName:"@pixi/react",rendererVersion:n4.version},pp=R4(sM);pp.injectIntoDevTools();const kc=new Map;function uM(a,t={}){let n=kc.get(a),l=(n==null?void 0:n.applicationState)??{isInitialised:!1,isInitialising:!1};const o=(n==null?void 0:n.internalState)??{};n||(l.app=new V0,o.rootContainer=tS(l.app.stage));const f=(n==null?void 0:n.fiber)??pp.createContainer(o.rootContainer,jc.ConcurrentRoot,null,!1,null,"",console.error,console.error,console.error,null);if(!n){let d;a instanceof HTMLCanvasElement&&(d=a),d||(d=document.createElement("canvas"),a.innerHTML="",a.appendChild(d)),o.canvas=d,n={applicationState:l,fiber:f,internalState:o,render:async(g,v)=>{var _;return!l.app.renderer&&!l.isInitialised&&!l.isInitialising&&(l.isInitialising=!0,await l.app.init({...v,canvas:d}),l.isInitialising=!1,l.isInitialised=!0,l={...l},(_=t.onInit)==null||_.call(t,l.app)),Object.entries(v).forEach(([b,C])=>{const E=b;$_(v,E)||(l.app[E]=C)}),pp.updateContainer(X.jsx(t4,{value:l,children:g}),f,null,()=>{}),l.app}},kc.set(d,n)}return n}function cS(a){Pu.unmountQueue.delete(a);const t=a.fiber;t&&pp.updateContainer(null,t,null,()=>{a.applicationState.app&&a.applicationState.app.destroy(),kc.delete(a.internalState.canvas)})}function rM(){for(const a of Pu.unmountQueue)cS(a)}function oM(a){const t=kc.get(a);t&&(t.applicationState.isInitialised?cS(t):Pu.unmountQueue.add(t))}function cM(a){const t=kc.get(a);t&&Pu.unmountQueue.delete(t)}var nx,ax;const tp=typeof window<"u"&&((nx=window.document)!=null&&nx.createElement||((ax=window.navigator)==null?void 0:ax.product)==="ReactNative")?L.useLayoutEffect:L.useEffect,fM={...ro.defaultTextStyle},hM=L.forwardRef(function(t,n){const{children:l,className:o,defaultTextStyle:f,extensions:d,onInit:m,resizeTo:g,...v}=t,_=_T(),b=L.useRef(null),C=L.useRef(null),E=L.useRef(new Set);L.useImperativeHandle(n,()=>({getApplication(){return b.current},getCanvas(){return C.current}}));const M=L.useCallback(()=>{const R=b.current;R&&(g?"current"in g?g.current instanceof HTMLElement&&(R.resizeTo=g.current):R.resizeTo=g:R.resizeTo=void 0)},[g]),z=L.useCallback(R=>{rM(),b.current=R,M(),m==null||m(R)},[m]);return tp(()=>{if(d){const R=[...d],D=E.current;for(const U of D.values()){const B=R.indexOf(U);B===-1&&(Ie.remove(U),D.delete(U)),R.splice(B,1)}for(const U of R)Ie.add(U),D.add(U)}},[d]),tp(()=>{const R=C.current;if(R){let D=kc.get(R);D||(D=uM(R,{onInit:z})),D.render(X.jsx(_,{children:l}),v)}},[v,l,z,g]),tp(()=>{M()},[g]),tp(()=>{f?Object.assign(ro.defaultTextStyle,f):Object.assign(ro.defaultTextStyle,fM)},[f]),L.useEffect(()=>{const R=C.current;if(R)return cM(R),()=>{oM(R)}},[]),X.jsx("canvas",{ref:C,className:o})}),dM=L.forwardRef(function(t,n){return X.jsx(Cx,{children:X.jsx(hM,{ref:n,...t})})});function eg(a){Object.assign(R0,a)}function mM(){const a=L.useContext(tg);return oS(a.app instanceof V0,"No Context found with `%s`. Make sure to wrap component with `%s`","Application","AppProvider"),a}const pM={idle:"#888",running:"#4caf50",completed:"#4caf50",checkpoint:"#ff9800"};function yM({rooms:a,activeRoom:t,statuses:n,onSelectRoom:l}){return X.jsxs("div",{style:{padding:"8px"},children:[X.jsx("div",{style:{color:"#888",fontSize:"0.7rem",textTransform:"uppercase",marginBottom:"8px",padding:"0 12px"},children:"Rooms"}),a.length===0&&X.jsx("div",{style:{padding:"8px 12px",color:"#666",fontSize:"0.8rem"},children:"No active squads"}),a.map(o=>{const f=n[o]||"idle",d=pM[f],m=o===t;return X.jsxs("div",{"data-testid":"room-item",onClick:()=>l(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:[X.jsx("div",{"data-testid":"status-dot",style:{width:"8px",height:"8px",borderRadius:"50%",backgroundColor:d,flexShrink:0}}),X.jsx("div",{style:{fontSize:"0.875rem",color:m?"#e0e0e0":"#aaa"},children:o})]},o)})]})}function gM({entries:a}){const t=n=>new Date(n).toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"});return a.length===0?X.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"}):X.jsxs("div",{style:{width:"220px",height:"100%",background:"#0f0f0f",borderLeft:"1px solid #1a1a2e",padding:"16px",boxSizing:"border-box",overflowY:"auto"},children:[X.jsx("div",{style:{fontSize:"0.75rem",color:"#666",marginBottom:"12px"},children:"Activity Log"}),X.jsx("div",{style:{display:"flex",flexDirection:"column",gap:"8px"},children:a.map(n=>X.jsxs("div",{"data-testid":"activity-entry",style:{fontSize:"0.75rem",color:"#aaa",padding:"8px",background:"#1a1a2e",borderRadius:"4px",borderLeft:"2px solid #4caf50"},children:[X.jsx("div",{style:{color:"#4caf50",marginBottom:"2px"},children:t(n.timestamp)}),X.jsx("div",{style:{fontWeight:"bold",marginBottom:"2px"},children:n.agentName}),X.jsx("div",{style:{color:"#999"},children:n.action})]},n.id))})]})}function vM({agentName:a,question:t,onRespond:n}){const[l,o]=L.useState(""),f=()=>{const m=l.trim();m&&(n(m),o(""))},d=m=>{m.key==="Enter"&&f()};return X.jsx("div",{className:"fixed inset-0 bg-black bg-opacity-50 flex items-center justify-center z-50",children:X.jsxs("div",{className:"bg-white rounded-lg shadow-lg p-6 max-w-md w-full mx-4",children:[X.jsxs("h2",{className:"text-lg font-bold text-orange-500 mb-4",children:["CHECKPOINT — ",a]}),X.jsx("p",{className:"text-gray-700 mb-6",children:t}),X.jsxs("div",{className:"flex gap-2",children:[X.jsx("input",{type:"text",placeholder:"Type your response...",value:l,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}),X.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"})]})]})})}const Zv=[16109737,15251594,13935988,13012574,10515018,9133628],Jv=[2890510,4861722,9136404,12886874,1710618,9118976],xM=ip,Ut=xM/2,jt=7,_e=14,ln=12,sn=5,qi=10,Te=4,Yi=9,Jt=8;function Oc(a,t,n,l,o){a.circle(t,n-1,jt+1),a.fill(o),a.circle(t,n,jt),a.fill(l),a.circle(t-3,n-1,1.5),a.fill(1710618),a.circle(t+3,n-1,1.5),a.fill(1710618),a.circle(t-2.5,n-1.5,.6),a.fill(16777215),a.circle(t+3.5,n-1.5,.6),a.fill(16777215)}function Nc(a,t,n,l,o,f){a.roundRect(t-l/2,n,l,o,3),a.fill(f),a.moveTo(t-3,n),a.lineTo(t,n+4),a.lineTo(t+3,n),a.stroke({width:1,color:_M(f,.15)})}function Pv(a,t,n,l,o){a.roundRect(t-l-1,n,l,o,2),a.fill(2899536),a.roundRect(t+1,n,l,o,2),a.fill(2899536)}function Wv(a,t,n,l){a.roundRect(t-l-2,n,l+2,3,1),a.fill(1710618),a.roundRect(t,n,l+2,3,1),a.fill(1710618)}function _M(a,t){const n=Math.max(0,(a>>16&255)*(1-t)),l=Math.max(0,(a>>8&255)*(1-t)),o=Math.max(0,(a&255)*(1-t));return Math.floor(n)<<16|Math.floor(l)<<8|Math.floor(o)}function SM(a){const t=new Map;for(let n=0;n<i0.length;n++){const l=i0[n],o=Zv[n%Zv.length],f=Jv[n%Jv.length],d=new Xi;Oc(d,Ut,Jt,o,f),Nc(d,Ut,Jt+jt,_e,ln,l),d.roundRect(Ut-_e/2-Te,Jt+jt+1,Te,Yi,2),d.fill(l),d.roundRect(Ut+_e/2,Jt+jt+1,Te,Yi,2),d.fill(l),d.circle(Ut-_e/2-Te/2,Jt+jt+Yi+1,2),d.fill(o),d.circle(Ut+_e/2+Te/2,Jt+jt+Yi+1,2),d.fill(o),Pv(d,Ut,Jt+jt+ln,sn,qi),Wv(d,Ut,Jt+jt+ln+qi,sn),t.set(`agent-${n}-standing`,a.renderer.generateTexture(d));const m=new Xi,g=Jt+4;Oc(m,Ut,g,o,f),Nc(m,Ut,g+jt,_e,ln-2,l),m.roundRect(Ut-_e/2-Te+1,g+jt+2,Te,Yi-3,2),m.fill(l),m.roundRect(Ut+_e/2-1,g+jt+2,Te,Yi-3,2),m.fill(l);const v=6;m.roundRect(Ut-sn-1,g+jt+ln-2,sn+1,v,2),m.fill(2899536),m.roundRect(Ut,g+jt+ln-2,sn+1,v,2),m.fill(2899536),t.set(`agent-${n}-seated`,a.renderer.generateTexture(m));const _=new Xi,b=Jt+4;Oc(_,Ut+2,b,o,f),Nc(_,Ut+1,b+jt,_e,ln-2,l),_.roundRect(Ut+_e/2,b+jt+2,Te+4,4,2),_.fill(l),_.roundRect(Ut+_e/2-2,b+jt+2,Te+4,4,2),_.fill(l),_.circle(Ut+_e/2+Te+3,b+jt+4,2),_.fill(o),_.circle(Ut+_e/2+Te+1,b+jt+4,2),_.fill(o),m.roundRect(Ut-sn-1,b+jt+ln-2,sn+1,v,2),m.fill(2899536),_.roundRect(Ut,b+jt+ln-2,sn+1,v,2),_.fill(2899536),t.set(`agent-${n}-typing`,a.renderer.generateTexture(_));const C=new Xi;Oc(C,Ut,Jt,o,f),Nc(C,Ut,Jt+jt,_e,ln,l),C.roundRect(Ut-_e/2-Te,Jt+jt-1,Te,Yi+2,2),C.fill(l),C.roundRect(Ut+_e/2,Jt+jt+3,Te,Yi-2,2),C.fill(l),C.roundRect(Ut+1,Jt+jt+ln,sn,qi+2,2),C.fill(2899536),C.roundRect(Ut-sn-1,Jt+jt+ln-2,sn,qi,2),C.fill(2899536),C.roundRect(Ut,Jt+jt+ln+qi+1,sn+2,3,1),C.fill(1710618),C.roundRect(Ut-sn-2,Jt+jt+ln+qi-3,sn+1,3,1),C.fill(1710618),t.set(`agent-${n}-walk-right`,a.renderer.generateTexture(C));const E=new Xi;Oc(E,Ut,Jt,o,f),Nc(E,Ut,Jt+jt,_e,ln,l),E.roundRect(Ut+_e/2,Jt+jt-1,Te,Yi+2,2),E.fill(l),E.roundRect(Ut-_e/2-Te,Jt+jt+3,Te,Yi-2,2),E.fill(l),E.roundRect(Ut-sn-1,Jt+jt+ln,sn,qi+2,2),E.fill(2899536),E.roundRect(Ut+1,Jt+jt+ln-2,sn,qi,2),E.fill(2899536),E.roundRect(Ut-sn-2,Jt+jt+ln+qi+1,sn+2,3,1),E.fill(1710618),E.roundRect(Ut,Jt+jt+ln+qi-3,sn+1,3,1),E.fill(1710618),t.set(`agent-${n}-walk-left`,a.renderer.generateTexture(E));const M=new Xi;Oc(M,Ut,Jt,o,f),Nc(M,Ut,Jt+jt,_e,ln,l),M.roundRect(Ut-_e/2-Te,Jt+jt+1,Te,Yi,2),M.fill(l),M.circle(Ut-_e/2-Te/2,Jt+jt+Yi+1,2),M.fill(o),M.roundRect(Ut+_e/2,Jt+jt,Te,6,2),M.fill(l),M.circle(Ut+_e/2+Te/2+1,Jt+jt,2),M.fill(o),M.roundRect(Ut+_e/2+Te/2-1,Jt+jt-6,6,7,1),M.fill(14142664),M.moveTo(Ut+_e/2+Te/2,Jt+jt-7),M.quadraticCurveTo(Ut+_e/2+Te/2+2,Jt+jt-11,Ut+_e/2+Te/2,Jt+jt-14),M.stroke({width:1,color:16777215,alpha:.4}),M.moveTo(Ut+_e/2+Te/2+3,Jt+jt-7),M.quadraticCurveTo(Ut+_e/2+Te/2+5,Jt+jt-10,Ut+_e/2+Te/2+3,Jt+jt-13),M.stroke({width:1,color:16777215,alpha:.3}),Pv(M,Ut,Jt+jt+ln,sn,qi),Wv(M,Ut,Jt+jt+ln+qi,sn),t.set(`agent-${n}-coffee`,a.renderer.generateTexture(M))}return t}function bM(a,t){const n=a%i0.length;let l;switch(t){case"working":l="typing";break;case"typing":l="typing";break;case"standing":l="standing";break;case"coffee":l="coffee";break;case"walk-right":l="walk-right";break;case"walk-left":l="walk-left";break;case"delivering":l="walk-right";break;case"idle":l="standing";break;case"seated":l="seated";break;case"checkpoint":case"done":default:l="seated";break}return`agent-${n}-${l}`}function TM(a,t,n){a.rect(0,0,t,n),a.fill(qt.floor);const l=20,o=80;for(let b=0;b<Math.ceil(n/l);b++){const C=b%2*(o/2),E=b*l;a.moveTo(0,E),a.lineTo(t,E),a.stroke({width:1,color:qt.floorGrout,alpha:.4});for(let M=0;M<Math.ceil(t/o)+1;M++){const z=M*o-C;z>0&&z<t&&(a.moveTo(z,E),a.lineTo(z,E+l),a.stroke({width:1,color:qt.floorGrout,alpha:.25}))}b%3===0&&(a.rect(0,E+2,t,l-4),a.fill({color:qt.floorHighlight,alpha:.08}))}const f=42;a.rect(0,f,t,4),a.fill({color:0,alpha:.1}),a.rect(0,0,t,f),a.fill({color:qt.wall,alpha:.2}),a.rect(0,0,t,3),a.fill({color:qt.wallTrim,alpha:.15}),a.rect(0,f-4,t,4),a.fill({color:qt.baseboard,alpha:.2});const d=120,m=t-d*2,g=n-200,v=d,_=100;a.roundRect(v+3,_+3,m,g,6),a.fill({color:0,alpha:.08}),a.roundRect(v,_,m,g,6),a.fill({color:qt.rug,alpha:.15}),a.roundRect(v+4,_+4,m-8,g-8,4),a.stroke({width:1.5,color:qt.rugBorder,alpha:.12}),a.roundRect(v+12,_+12,m-24,g-24,3),a.stroke({width:1,color:qt.rugPattern,alpha:.1}),a.roundRect(1,1,t-2,n-2,4),a.stroke({width:1.5,color:0,alpha:.15})}function EM(a,t,n){const l=t+_l/2,o=n+Ku+8;for(let z=0;z<5;z++){const R=z/5*Math.PI*2-Math.PI/2,D=l+Math.cos(R)*10,U=o+14+Math.sin(R)*5;a.circle(D,U,2),a.fill(qt.chairWheel)}a.rect(l-1.5,o+4,3,12),a.fill(qt.chairBase),a.roundRect(l-14,o,28,10,4),a.fill(qt.chairSeat),a.roundRect(l-12,o+1,24,4,3),a.fill({color:qt.chairBack,alpha:.5}),a.roundRect(l-12,o-16,24,18,5),a.fill(qt.chairBack),a.roundRect(l-10,o-14,20,8,3),a.fill({color:16777215,alpha:.05}),a.roundRect(t+3,n+3,_l,Ku,4),a.fill({color:0,alpha:.12}),a.roundRect(t,n,_l,Ku,4),a.fill(qt.desk),a.roundRect(t+2,n+2,_l-4,Ku-4,3),a.fill(qt.deskTop);for(let z=0;z<3;z++){const R=n+10+z*16;a.moveTo(t+6,R),a.lineTo(t+_l-6,R),a.stroke({width:.5,color:qt.deskShadow,alpha:.2})}a.rect(t+2,n+Ku-6,_l-4,4),a.fill(qt.deskEdge);const f=4,d=8;a.rect(t+4,n+Ku,f,d),a.fill(qt.deskLeg),a.rect(t+_l-4-f,n+Ku,f,d),a.fill(qt.deskLeg);const m=32,g=22,v=t+(_l-m)/2,_=n+8;a.roundRect(v+m/2-10,_+g+4,20,4,2),a.fill(qt.monitorStand),a.rect(v+m/2-2,_+g,4,6),a.fill(qt.monitorStand),a.roundRect(v,_,m,g,2),a.fill(qt.monitor),a.roundRect(v+2,_+2,m-4,g-5,1),a.fill(qt.monitorScreen),a.roundRect(v+3,_+3,m-6,6,1),a.fill({color:qt.monitorScreenGlow,alpha:.3});const b=24,C=8,E=v+(m-b)/2,M=_+g+10;a.roundRect(E,M,b,C,2),a.fill(qt.keyboard);for(let z=0;z<3;z++)for(let R=0;R<6;R++)a.rect(E+2+R*3.5,M+1.5+z*2.5,2.5,1.5),a.fill(qt.keyboardKey);a.roundRect(t+_l-18,n+14,7,8,2),a.fill(14142664),a.roundRect(t+_l-11,n+16,3,4,1),a.fill(14142664),a.rect(t+8,n+20,14,18),a.fill(16775620),a.rect(t+8,n+20,14,2),a.fill(16635957),a.rect(t+10,n+24,10,1.5),a.fill(1402304)}function CM(a,t,n){a.roundRect(t+2,n+2,44,64,3),a.fill({color:0,alpha:.1}),a.roundRect(t,n,44,64,3),a.fill(qt.bookshelf),a.roundRect(t+1,n+1,42,62,2),a.stroke({width:1,color:qt.bookshelfEdge,alpha:.3}),a.rect(t+3,n+3,38,58),a.fill({color:6048310,alpha:.5});for(let l=0;l<3;l++){const o=n+8+l*20;a.rect(t+3,o+14,38,3),a.fill(qt.bookshelfEdge),a.rect(t+3,o+17,38,1),a.fill({color:0,alpha:.1});const f=4+l%2;for(let d=0;d<f;d++){const m=t+5+d*(34/f),g=Math.max(4,34/f-2),v=10+(d*3+l*2)%5,_=(d+l*3)%qt.bookColors.length;a.rect(m,o+14-v,g,v),a.fill(qt.bookColors[_]),a.rect(m+1,o+14-v+2,.8,v-4),a.fill({color:16777215,alpha:.15})}l===1&&(a.circle(t+38,o+8,4),a.fill({color:4367861,alpha:.6}),a.circle(t+38,o+8,4),a.stroke({width:.5,color:2001125,alpha:.4}))}a.roundRect(t+14,n-4,8,6,1),a.fill(qt.pot),a.circle(t+18,n-6,5),a.fill(qt.plantLight),a.circle(t+15,n-8,3),a.fill(qt.plant)}function Fv(a,t,n){a.ellipse(t+12,n+34,12,3),a.fill({color:0,alpha:.1}),a.moveTo(t+2,n+16),a.lineTo(t+4,n+32),a.lineTo(t+20,n+32),a.lineTo(t+22,n+16),a.closePath(),a.fill(qt.pot),a.roundRect(t,n+14,24,5,2),a.fill(qt.potRim),a.roundRect(t+2,n+14,20,2,1),a.fill({color:16777215,alpha:.08}),a.ellipse(t+12,n+16,10,3),a.fill(qt.soil),a.rect(t+11,n+2,2,14),a.fill(qt.plantDark),a.ellipse(t+6,n+4,7,5),a.fill(qt.plantDark),a.ellipse(t+18,n+2,6,5),a.fill(qt.plantDark),a.ellipse(t+12,n+1,8,6),a.fill(qt.plant),a.ellipse(t+4,n+8,6,4),a.fill(qt.plant),a.ellipse(t+20,n+8,6,4),a.fill(qt.plant),a.ellipse(t+9,n+5,5,4),a.fill(qt.plantLight),a.ellipse(t+15,n+3,5,4),a.fill(qt.plantLight),a.moveTo(t+12,n-2),a.lineTo(t+12,n+6),a.stroke({width:.5,color:qt.plantDark,alpha:.3})}function AM(a,t,n){a.roundRect(t+2,n+2,80,40,4),a.fill({color:0,alpha:.1}),a.roundRect(t,n,80,40,4),a.fill(ha.counter),a.roundRect(t+1,n+1,78,8,3),a.fill(ha.counterTop),a.roundRect(t+2,n+2,76,3,2),a.fill({color:16777215,alpha:.06}),a.roundRect(t+4,n-14,28,38,3),a.fill(ha.machine),a.roundRect(t+5,n-14,26,6,2),a.fill(ha.machineTop),a.roundRect(t+8,n+16,20,4,1),a.fill({color:2503224,alpha:.8}),a.rect(t+13,n+8,3,8),a.fill(ha.machineTop),a.rect(t+20,n+8,3,8),a.fill(ha.machineTop),a.circle(t+18,n-8,2.5),a.fill({color:ha.machineLight,alpha:.9}),a.circle(t+18,n-8,5),a.fill({color:ha.machineLight,alpha:.15}),a.roundRect(t+38,n+8,8,10,2),a.fill(ha.cup),a.roundRect(t+46,n+10,3,5,1),a.fill(ha.cup),a.roundRect(t+48,n+6,8,10,2),a.fill(ha.cupShadow),a.ellipse(t+42,n+20,10,3),a.fill(ha.saucer),a.roundRect(t+60,n+6,16,14,3),a.fill(ha.sink),a.roundRect(t+62,n+8,12,10,2),a.fill({color:5533306,alpha:.8}),a.rect(t+66,n-2,3,10),a.fill(ha.faucet),a.roundRect(t+65,n-4,8,3,1),a.fill(ha.faucet),a.roundRect(t+10,n-30,30,14,2),a.fill(ha.menu),a.rect(t+14,n-27,22,2),a.fill({color:16777215,alpha:.5}),a.rect(t+14,n-23,16,1.5),a.fill({color:16777215,alpha:.3}),a.rect(t+14,n-20,18,1.5),a.fill({color:16777215,alpha:.3})}function MM(a,t,n){a.roundRect(t-16,n-24,128,96,6),a.fill({color:hi.carpet,alpha:.25}),a.roundRect(t-12,n-20,120,88,4),a.stroke({width:1,color:hi.carpetPattern,alpha:.2});const l=t+10,o=n-20;a.roundRect(l+2,o+2,76,16,2),a.fill({color:0,alpha:.1}),a.roundRect(l,o,76,16,2),a.fill(hi.whiteboardFrame),a.roundRect(l+2,o+2,72,12,1),a.fill(hi.whiteboard),a.rect(l+6,o+4,18,8),a.fill({color:16775620,alpha:.6}),a.rect(l+28,o+4,18,8),a.fill({color:12312315,alpha:.6}),a.rect(l+50,o+4,18,8),a.fill({color:13166281,alpha:.6}),a.roundRect(l+20,o+14,36,3,1),a.fill(hi.whiteboardFrame),a.roundRect(t+3,n+3,96,48,6),a.fill({color:0,alpha:.1}),a.roundRect(t,n,96,48,6),a.fill(hi.table),a.roundRect(t+2,n+2,92,44,5),a.fill(hi.tableTop),a.roundRect(t+6,n+4,40,10,3),a.fill({color:16777215,alpha:.04}),a.roundRect(t+1,n+1,94,46,5),a.stroke({width:1,color:hi.tableEdge,alpha:.4});const f=4,d=6;a.rect(t+8,n+48,f,d),a.fill(hi.tableLeg),a.rect(t+84,n+48,f,d),a.fill(hi.tableLeg);const m=[{cx:t+16,cy:n-10},{cx:t+48,cy:n-10},{cx:t+80,cy:n-10},{cx:t+16,cy:n+56},{cx:t+48,cy:n+56},{cx:t+80,cy:n+56}];for(const g of m){const _=g.cy<n?g.cy-6:g.cy+6;a.roundRect(g.cx-8,_-4,16,10,3),a.fill(hi.chairBack),a.roundRect(g.cx-7,g.cy-4,14,8,3),a.fill(hi.chairSeat),a.roundRect(g.cx-5,g.cy-3,10,3,2),a.fill({color:16777215,alpha:.06}),a.circle(g.cx,g.cy+5,2),a.fill(hi.chair)}a.roundRect(t+10,n+8,18,12,2),a.fill(3622735),a.roundRect(t+11,n+9,16,8,1),a.fill(4545124),a.rect(t+60,n+12,12,16),a.fill({color:16777215,alpha:.7}),a.rect(t+62,n+14,8,1),a.fill({color:3355443,alpha:.3}),a.rect(t+62,n+17,6,1),a.fill({color:3355443,alpha:.3}),a.roundRect(t+40,n+10,6,14,2),a.fill({color:4367861,alpha:.6}),a.roundRect(t+41,n+7,4,4,1),a.fill({color:9489145,alpha:.5})}const RM={running:lo.statusRunning,idle:lo.statusIdle,completed:lo.statusCompleted,checkpoint:lo.statusCheckpoint};function zM(a,t,n,l){const o=n*.85,f=t+(n-o)/2,d=6,m=30;a.roundRect(f+2,d+2,o,m,8),a.fill({color:0,alpha:.15}),a.roundRect(f,d,o,m,8),a.fill({color:lo.background,alpha:.85}),a.roundRect(f+2,d+1,o-4,8,6),a.fill({color:lo.backgroundGlow,alpha:.4}),a.roundRect(f,d,o,m,8),a.stroke({width:1,color:16777215,alpha:.08});const g=RM[l]??lo.statusIdle,v=f+o-18,_=d+m/2;a.circle(v,_,7),a.fill({color:g,alpha:.2}),a.circle(v,_,4),a.fill(g),a.circle(v-1,_-1,1.5),a.fill({color:16777215,alpha:.3}),a.circle(f+14,_,2),a.fill({color:16777215,alpha:.1})}eg({Container:ma,Graphics:Xi,Sprite:Vc,Text:I_});function DM({agent:a,textures:t,bubbleText:n,animX:l,animY:o,animPose:f}){const d=bM(a.colorIndex,f),m=t.get(d),g=uT[a.status==="walking"?"idle":a.status]??8947848,v=a.status==="checkpoint",_=L.useCallback(C=>{C.clear(),C.circle(0,0,ip/2+6),C.fill({color:g,alpha:v?.4:.15})},[g,v]),b=L.useCallback(C=>{if(C.clear(),!n)return;const E=Math.min(n.length*5+16,160);C.roundRect(-E/2,-40,E,28,6),C.fill({color:1710638,alpha:.9})},[n]);return X.jsxs("container",{x:l,y:o,children:[X.jsx("graphics",{draw:_}),m&&X.jsx("sprite",{texture:m,anchor:.5}),X.jsx("text",{text:a.name,y:ip/2+4,anchor:{x:.5,y:0},style:{fontSize:9,fill:"#cccccc",fontFamily:"sans-serif"}}),v&&X.jsx("text",{text:"⚠",y:-ip/2-12,anchor:.5,style:{fontSize:14,fill:"#ff9800",fontFamily:"sans-serif"}}),n&&X.jsxs(X.Fragment,{children:[X.jsx("graphics",{draw:b}),X.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}})]})]})}eg({Container:ma,Graphics:Xi,Text:I_});function OM({squadName:a,status:t,agents:n,textures:l,bubbles:o,animStates:f,originX:d,originY:m}){const g={x:0,y:0},v=Xh(g),_=bx(g),b=L.useCallback(C=>{C.clear(),TM(C,Ps,qc),zM(C,0,Ps,t);for(let E=0;E<n.length;E++){const M=lp(E,g);EM(C,M.x-48,M.y-32)}AM(C,v.x,v.y),MM(C,_.x,_.y),CM(C,Ps-60,44),Fv(C,10,qc-50),Fv(C,Ps-40,50)},[n.length,t]);return X.jsxs("container",{x:d,y:m,children:[X.jsx("graphics",{draw:b}),X.jsx("text",{text:a,x:Ps/2,y:22,anchor:.5,style:{fontSize:14,fill:"#ffffff",fontFamily:"sans-serif",fontWeight:"bold"}}),n.map(C=>{const E=`${a}:${C.id}`,M=o[E],z=f[C.id];return X.jsx(DM,{agent:C,textures:l,bubbleText:(M==null?void 0:M.text)??null,animX:(z==null?void 0:z.x)??C.position.x,animY:(z==null?void 0:z.y)??C.position.y,animPose:(z==null?void 0:z.pose)??(C.status==="working"?"typing":"seated")},C.id)})]})}const Iv=45,NM=48,UM=18,BM=4e3,ep=180,$y=600,wM=60,$v=900,tx=5e3,ex=[["Café novo?","Sim, colombiano!"],["Viu o deploy?","Passou nos testes!"],["Reunião às 3?","Vou confirmar."],["Bug no login?","Já corrigi."],["Almoço onde?","Sushi hoje?"],["PR aprovado?","Mergeei agora."],["Tá ocupado?","Pode falar."],["Deadline?","Sexta-feira."],["Novo feature?","Ficou muito bom!"],["Ajuda aqui?","Claro, mostra."],["Sprint review?","Amanhã cedo."],["Stand-up?","Já começou!"],["Refatorei aquele módulo.","Ficou mais limpo."],["Testes passando?","Todos verdes!"],["Viu o Figma?","Design top!"],["Pipeline rodou?","Em 2 min."],["Code review?","Já olhei, aprovo."],["Qual branch?","feature/office."],["Bom dia!","Bom dia! Tudo bem?"],["Feriado próximo?","Semana que vem!"]];function HM(){const a={x:0,y:0},t=Math.random();if(t<.35){const n=Xh(a);return{x:n.x+(Math.random()-.5)*30,y:n.y+(Math.random()-.5)*20,destination:"coffee"}}else if(t<.6){const n=bx(a);return{x:n.x+(Math.random()-.5)*40,y:n.y+(Math.random()-.5)*30,destination:"meeting"}}else return{x:60+Math.random()*(Ps-120),y:60+Math.random()*(qc-120),destination:"wander"}}function GM(a){const[t,n]=L.useState({}),l=L.useRef({}),o=L.useRef({}),f=L.useRef({}),d=L.useRef({}),m=L.useRef(0),g=L.useRef({}),v=L.useRef({});L.useEffect(()=>{const b=He.subscribe((C,E)=>{var R,D;const M=C.bubbles,z=E.bubbles;for(const U of Object.keys(M))if(((R=M[U])==null?void 0:R.updatedAt)!==((D=z[U])==null?void 0:D.updatedAt)){g.current[U]&&clearTimeout(g.current[U]);const[B,G]=U.split(":");g.current[U]=setTimeout(()=>{He.getState().clearBubble(B,G),delete g.current[U]},BM)}});return()=>{b();for(const C of Object.values(g.current))clearTimeout(C);g.current={}}},[]);const _=L.useCallback(()=>{m.current++;const b=m.current,C=He.getState(),E={};for(const[M,z]of Object.entries(C.agentVisuals)){l.current[M]||(l.current[M]={}),o.current[M]||(o.current[M]={}),E[M]={};const R=[];for(const D of z){const U=l.current[M],B=o.current[M],G=`${M}:${D.id}`;B[D.id]||(B[D.id]={x:D.position.x,y:D.position.y,baseY:D.position.y},f.current[G]=Math.floor(Math.random()*$y));const Q=B[D.id];if(D.targetPosition&&(!U[D.id]||U[D.id].progress>=1)&&(U[D.id]={startX:Q.x,startY:Q.baseY,targetX:D.targetPosition.x,targetY:D.targetPosition.y,progress:0,duration:Iv,baseY:D.targetPosition.y}),D.status==="idle"&&(!U[D.id]||U[D.id].progress>=1)&&(f.current[G]===void 0&&(f.current[G]=ep+Math.floor(Math.random()*($y-ep))),f.current[G]--,f.current[G]<=0)){const K=HM();d.current[G]=K.destination,U[D.id]={startX:Q.x,startY:Q.baseY,targetX:K.x,targetY:K.y,progress:0,duration:Iv+Math.floor(Math.random()*30),baseY:K.y},f.current[G]=ep+Math.floor(Math.random()*($y-ep))}const V=U[D.id];if(V&&V.progress<1){V.progress=Math.min(1,V.progress+1/V.duration);const K=hT(V.progress);Q.x=g1(V.startX,V.targetX,K),Q.y=g1(V.startY,V.targetY,K),Q.baseY=V.baseY;const pt=Math.floor(b/UM)%2===0?"walk-right":"walk-left";E[M][D.id]={x:Q.x,y:Q.y,pose:pt}}else if(D.status==="working"){const K=Math.floor(b/NM)%2===0?"typing":"seated";E[M][D.id]={x:Q.x,y:Q.baseY,pose:K}}else if(D.status==="idle"){const K=d.current[G]??"coffee",pt=Math.sin(b*.07+D.deskIndex*1.5)*2;let ot;K==="coffee"?ot="coffee":K==="meeting"?ot=Math.floor(b/90)%2===0?"standing":"coffee":ot="standing",E[M][D.id]={x:Q.x,y:Q.baseY+pt,pose:ot},R.push({agentKey:G,agentId:D.id,agentName:D.name,x:Q.x,y:Q.baseY})}else D.status==="checkpoint"?E[M][D.id]={x:Q.x,y:Q.baseY,pose:"seated"}:E[M][D.id]={x:Q.x,y:Q.baseY,pose:"seated"}}if(b%60===0&&R.length>=2)for(let D=0;D<R.length;D++){const U=R[D];if(!(v.current[U.agentKey]&&b-v.current[U.agentKey]<$v)&&!C.bubbles[U.agentKey])for(let B=D+1;B<R.length;B++){const G=R[B];if(v.current[G.agentKey]&&b-v.current[G.agentKey]<$v||C.bubbles[G.agentKey])continue;const Q=U.x-G.x,V=U.y-G.y;if(Math.sqrt(Q*Q+V*V)<wM){const[pt,ot]=ex[Math.floor(Math.random()*ex.length)];C.appendBubble(M,U.agentId,pt),setTimeout(()=>{He.getState().appendBubble(M,G.agentId,ot)},1500),v.current[U.agentKey]=b,v.current[G.agentKey]=b;const ft=`${M}:${U.agentId}`,ht=`${M}:${G.agentId}`;g.current[ft]&&clearTimeout(g.current[ft]),g.current[ht]&&clearTimeout(g.current[ht]),g.current[ft]=setTimeout(()=>{He.getState().clearBubble(M,U.agentId),delete g.current[ft]},tx),g.current[ht]=setTimeout(()=>{He.getState().clearBubble(M,G.agentId),delete g.current[ht]},tx+1500);break}}}}n(E)},[]);return L.useEffect(()=>{if(a)return a.add(_),()=>{a.remove(_)}},[a,_]),t}eg({Container:ma});const jM=.3,qM=2;function YM(){const{app:a}=mM(),t=L.useRef(null),[n,l]=L.useState(new Map),o=L.useRef(null),f=He(E=>E.rooms),d=He(E=>E.agentVisuals),m=He(E=>E.bubbles),g=wa(E=>E.activeStates),v=GM((a==null?void 0:a.ticker)??null);L.useEffect(()=>{a!=null&&a.renderer&&l(SM(a))},[a]),L.useEffect(()=>{const E=t.current;E&&(E.hitArea=new on(-5e3,-5e3,15e3,15e3))},[]);const _=L.useCallback(E=>{const M=t.current;M&&(o.current={startX:E.globalX,startY:E.globalY,pivotX:M.position.x,pivotY:M.position.y})},[]),b=L.useCallback(E=>{const M=t.current,z=o.current;!M||!z||(M.position.x=z.pivotX+(E.globalX-z.startX),M.position.y=z.pivotY+(E.globalY-z.startY))},[]),C=L.useCallback(()=>{o.current=null},[]);return L.useEffect(()=>{const E=a==null?void 0:a.canvas;if(!E)return;const M=z=>{z.preventDefault();const R=t.current;if(!R)return;const D=R.scale.x,U=z.deltaY>0?.9:1.1,B=Math.max(jM,Math.min(qM,D*U)),G=E.getBoundingClientRect(),Q=z.clientX-G.left,V=z.clientY-G.top,K=B/D;R.position.x=Q-(Q-R.position.x)*K,R.position.y=V-(V-R.position.y)*K,R.scale.set(B)};return E.addEventListener("wheel",M,{passive:!1}),()=>E.removeEventListener("wheel",M)},[a]),X.jsx("container",{ref:t,eventMode:"static",onpointerdown:_,onpointermove:b,onpointerup:C,onpointerupoutside:C,children:f.map((E,M)=>{var B;const z=dT(M,f.length),R=d[E]??[],D=((B=g[E])==null?void 0:B.status)??"idle",U=v[E]??{};return X.jsx(OM,{squadName:E,status:D,agents:R,textures:n,bubbles:m,animStates:U,originX:z.x,originY:z.y},E)})})}function LM(){var _,b;const a=wa(C=>C.activeStates),t=He(C=>C.rooms),n=He(C=>C.activeRoom),l=He(C=>C.setActiveRoom),o=He(C=>C.activityLog),f=He(C=>C.checkpoints),d=n?f[n]:void 0,g=(n?((_=o[n])==null?void 0:_.entries)??[]:[]).map(C=>({...C,timestamp:new Date(C.timestamp).toISOString()})),v={};for(const C of t)v[C]=((b=a[C])==null?void 0:b.status)??"idle";return X.jsxs("div",{style:{display:"flex",height:"100%"},children:[X.jsx(yM,{rooms:t,activeRoom:n,statuses:v,onSelectRoom:l}),X.jsxs("div",{style:{flex:1,position:"relative",overflow:"hidden"},children:[X.jsx(dM,{background:2760462,antialias:!0,resizeTo:window,style:{width:"100%",height:"100%"},children:X.jsx(YM,{})}),d&&X.jsx(vM,{agentName:d.agentName,question:d.question,onRespond:C=>sT(n,C)})]}),X.jsx(gM,{entries:g})]})}function XM({message:a}){if(a.role==="agent_dm")return X.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:[X.jsx("div",{style:{fontSize:11,color:"#a0a0d0",fontWeight:600,marginBottom:4},children:a.agentName}),X.jsx("div",{style:{color:"#e0e0e0",fontSize:14,lineHeight:1.5},children:a.content})]});const t=a.role==="user";return X.jsx("div",{"data-role":a.role,style:{alignSelf:t?"flex-end":"flex-start",background:t?"#3b5bdb":"#1e1e2e",borderRadius:12,padding:"8px 14px",maxWidth:"75%",marginBottom:8},children:X.jsx("div",{style:{color:"#e0e0e0",fontSize:14,lineHeight:1.5,whiteSpace:"pre-wrap"},children:a.content})})}function VM(){const[a,t]=L.useState(""),n=L.useRef(null),l=wa(E=>E.selectedSquad),o=Li(E=>E.messages),f=Li(E=>E.streaming),d=Li(E=>E.streamingText),m=Li(E=>E.error),g=Li(E=>E.addUserMessage),v=Li(E=>E.startStreaming),_=Li(E=>E.loadHistory);if(L.useEffect(()=>{l&&_(l)},[l,_]),L.useEffect(()=>{var E,M;(M=(E=n.current)==null?void 0:E.scrollIntoView)==null||M.call(E,{behavior:"smooth"})},[o,d]),!l)return X.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=a.trim();!E||f||(g(E),v(),iT(l,E),t(""))},C=E=>{E.key==="Enter"&&!E.shiftKey&&(E.preventDefault(),b())};return X.jsxs("div",{style:{display:"flex",flexDirection:"column",height:"100%",background:"#0f0f1a"},children:[X.jsxs("div",{style:{flex:1,overflowY:"auto",padding:16,display:"flex",flexDirection:"column"},children:[o.map(E=>X.jsx(XM,{message:E},E.id)),f&&d&&X.jsx("div",{"data-role":"assistant",style:{alignSelf:"flex-start",background:"#1e1e2e",borderRadius:12,padding:"8px 14px",maxWidth:"75%",marginBottom:8},children:X.jsx("div",{style:{color:"#e0e0e0",fontSize:14,lineHeight:1.5,whiteSpace:"pre-wrap"},children:d})}),m&&X.jsx("div",{style:{alignSelf:"center",background:"#3a1a1a",border:"1px solid #c53030",borderRadius:8,padding:"8px 14px",color:"#fc8181",fontSize:13,marginBottom:8},children:m}),X.jsx("div",{ref:n})]}),X.jsxs("div",{style:{display:"flex",padding:12,borderTop:"1px solid #2a2a3e",gap:8},children:[X.jsx("input",{type:"text",value:a,onChange:E=>t(E.target.value),onKeyDown:C,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"}}),X.jsx("button",{onClick:b,disabled:!a.trim()||f,"aria-label":"Send",style:{background:!a.trim()||f?"#2a2a3e":"#3b5bdb",color:"#fff",border:"none",borderRadius:8,padding:"10px 20px",fontSize:14,cursor:!a.trim()||f?"not-allowed":"pointer",fontWeight:600},children:"Send"})]})]})}const QM={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 kM({agent:a}){return X.jsxs("div",{style:{background:"#1e1e2e",borderRadius:8,padding:"12px 16px",marginBottom:8,border:"1px solid #2a2a3e"},children:[X.jsxs("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",marginBottom:6},children:[X.jsx("span",{style:{fontWeight:600,fontSize:14,color:"#e0e0e0"},children:a.name}),X.jsx("span",{style:{backgroundColor:QM[a.status],color:"#fff",fontSize:11,fontWeight:600,padding:"2px 8px",borderRadius:10,textTransform:"lowercase"},children:a.status})]}),X.jsx("div",{style:{fontSize:12,color:"#9ca3af"},children:a.stepLabel})]})}const KM=[{key:"pending",label:"Pending",color:"rgb(107, 114, 128)",filter:a=>a.status==="idle"},{key:"running",label:"Running",color:"rgb(59, 130, 246)",filter:a=>a.status==="working"||a.status==="checkpoint"||a.status==="delivering"},{key:"done",label:"Done",color:"rgb(34, 197, 94)",filter:a=>a.status==="done"}];function ZM(){const a=wa(o=>o.selectedSquad),t=wa(o=>o.activeStates),n=a?t[a]:null,l=L.useMemo(()=>n?KM.map(o=>({...o,agents:n.agents.filter(o.filter)})):null,[n]);return a?n?X.jsx("div",{style:{display:"flex",gap:16,padding:20,height:"100%",overflow:"auto"},children:l.map(o=>X.jsxs("div",{"data-testid":`column-${o.key}`,style:{flex:1,background:"#16161e",borderRadius:10,padding:16,display:"flex",flexDirection:"column",minWidth:220},children:[X.jsxs("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",marginBottom:16,paddingBottom:12,borderBottom:`2px solid ${o.color}`},children:[X.jsx("span",{style:{fontWeight:700,fontSize:14,color:"#e0e0e0"},children:o.label}),X.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})]}),X.jsx("div",{style:{flex:1,overflowY:"auto"},children:o.agents.map(f=>X.jsx(kM,{agent:f},f.id))})]},o.key))}):X.jsx("div",{style:{display:"flex",alignItems:"center",justifyContent:"center",height:"100%",color:"#9ca3af"},children:"No active state for this squad"}):X.jsx("div",{style:{display:"flex",alignItems:"center",justifyContent:"center",height:"100%",color:"#9ca3af"},children:"Select a squad to view the kanban board"})}function JM(){const a=bl(Q=>Q.user),[t,n]=L.useState([]),[l,o]=L.useState(!0),[f,d]=L.useState(""),[m,g]=L.useState(""),[v,_]=L.useState("viewer"),[b,C]=L.useState(null),[E,M]=L.useState(null),z=L.useCallback(async()=>{try{const Q=await fetch("/api/users",{credentials:"include"});if(Q.ok){const V=await Q.json();n(V.users)}}catch{C("Failed to load users")}finally{o(!1)}},[]);L.useEffect(()=>{z()},[z]);const R=async()=>{if(!(!f.trim()||!m.trim())){C(null);try{const Q=await fetch("/api/auth/register",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({username:f,password:m,role:v}),credentials:"include"});if(!Q.ok){const V=await Q.json();C(V.error||"Failed to create user");return}d(""),g(""),_("viewer"),await z()}catch{C("Network error")}}},D=async(Q,V)=>{try{(await fetch(`/api/users/${Q}`,{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({role:V}),credentials:"include"})).ok&&await z()}catch{C("Failed to update role")}},U=async Q=>{try{(await fetch(`/api/users/${Q}`,{method:"DELETE",credentials:"include"})).ok&&(M(null),await z())}catch{C("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 l?X.jsx("div",{style:{color:"#9ca3af",padding:20},children:"Loading users..."}):X.jsxs("div",{children:[X.jsx("h3",{style:{color:"#e0e0e0",marginBottom:16,fontSize:16,fontWeight:700},children:"User Management"}),b&&X.jsx("div",{style:{background:"#3b1818",color:"#f87171",padding:"8px 12px",borderRadius:6,marginBottom:12,fontSize:13},children:b}),X.jsxs("div",{style:{display:"flex",gap:8,marginBottom:20,flexWrap:"wrap",alignItems:"center"},children:[X.jsx("input",{placeholder:"Username",value:f,onChange:Q=>d(Q.target.value),style:{...B,flex:1,minWidth:120}}),X.jsx("input",{placeholder:"Password",type:"password",value:m,onChange:Q=>g(Q.target.value),style:{...B,flex:1,minWidth:120}}),X.jsxs("select",{value:v,onChange:Q=>_(Q.target.value),style:{...B,minWidth:100},children:[X.jsx("option",{value:"viewer",children:"viewer"}),X.jsx("option",{value:"operator",children:"operator"}),X.jsx("option",{value:"admin",children:"admin"})]}),X.jsx("button",{onClick:R,style:{...G,background:"#3b82f6",color:"#fff"},children:"Create User"})]}),X.jsxs("table",{style:{width:"100%",borderCollapse:"collapse",fontSize:13},children:[X.jsx("thead",{children:X.jsxs("tr",{style:{borderBottom:"1px solid #2a2a3e"},children:[X.jsx("th",{style:{textAlign:"left",padding:"8px 12px",color:"#9ca3af",fontWeight:600},children:"Username"}),X.jsx("th",{style:{textAlign:"left",padding:"8px 12px",color:"#9ca3af",fontWeight:600},children:"Email"}),X.jsx("th",{style:{textAlign:"left",padding:"8px 12px",color:"#9ca3af",fontWeight:600},children:"Role"}),X.jsx("th",{style:{textAlign:"left",padding:"8px 12px",color:"#9ca3af",fontWeight:600},children:"Last Login"}),X.jsx("th",{style:{textAlign:"right",padding:"8px 12px",color:"#9ca3af",fontWeight:600},children:"Actions"})]})}),X.jsx("tbody",{children:t.map(Q=>X.jsxs("tr",{style:{borderBottom:"1px solid #1e1e2e"},children:[X.jsx("td",{style:{padding:"10px 12px",color:"#e0e0e0"},children:Q.username}),X.jsx("td",{style:{padding:"10px 12px",color:"#9ca3af"},children:Q.email||"—"}),X.jsx("td",{style:{padding:"10px 12px"},children:Q.id===(a==null?void 0:a.id)?X.jsx("span",{style:{color:"#9ca3af"},children:Q.role}):X.jsxs("select",{value:Q.role,onChange:V=>D(Q.id,V.target.value),style:{...B,padding:"4px 8px",fontSize:12},children:[X.jsx("option",{value:"viewer",children:"viewer"}),X.jsx("option",{value:"operator",children:"operator"}),X.jsx("option",{value:"admin",children:"admin"})]})}),X.jsx("td",{style:{padding:"10px 12px",color:"#9ca3af",fontSize:12},children:Q.last_login?new Date(Q.last_login).toLocaleDateString():"—"}),X.jsx("td",{style:{padding:"10px 12px",textAlign:"right"},children:Q.id!==(a==null?void 0:a.id)&&(E===Q.id?X.jsxs("span",{style:{display:"inline-flex",gap:6,alignItems:"center"},children:[X.jsx("span",{style:{color:"#f87171",fontSize:12},children:"Confirm Delete"}),X.jsx("button",{onClick:()=>U(Q.id),style:{...G,background:"#dc2626",color:"#fff",padding:"4px 10px",fontSize:12},children:"Yes"}),X.jsx("button",{onClick:()=>M(null),style:{...G,background:"#2a2a3e",color:"#9ca3af",padding:"4px 10px",fontSize:12},children:"No"})]}):X.jsx("button",{onClick:()=>M(Q.id),style:{...G,background:"#2a2a3e",color:"#f87171",padding:"4px 10px",fontSize:12},children:"Delete"}))})]},Q.id))})]})]})}function PM(){const a=wa(v=>v.selectedSquad),t=wa(v=>v.activeStates),[n,l]=L.useState(null),[o,f]=L.useState(!1),d=a?t[a]:null;if(L.useEffect(()=>{if(!a){l(null);return}f(!0),fetch(`/api/squads/${a}`,{credentials:"include"}).then(v=>v.ok?v.json():null).then(v=>{v&&l(v.data)}).finally(()=>f(!1))},[a]),!a)return X.jsx("div",{style:{color:"#9ca3af",padding:20},children:"Select a squad to view details"});if(o)return X.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 X.jsxs("div",{children:[X.jsx("h3",{style:{color:"#e0e0e0",marginBottom:16,fontSize:16,fontWeight:700},children:"Squad Info"}),n&&X.jsxs(X.Fragment,{children:[X.jsxs("div",{style:m,children:[X.jsx("div",{style:g,children:"Name"}),X.jsx("div",{style:{color:"#e0e0e0",fontSize:14,fontWeight:600},children:n.name})]}),X.jsxs("div",{style:m,children:[X.jsx("div",{style:g,children:"Description"}),X.jsx("div",{style:{color:"#e0e0e0",fontSize:14},children:n.description})]}),X.jsxs("div",{style:m,children:[X.jsx("div",{style:g,children:"Agents"}),X.jsx("div",{style:{display:"flex",gap:8,flexWrap:"wrap"},children:n.agents.map(v=>X.jsx("span",{style:{background:"#1e1e2e",border:"1px solid #2a2a3e",borderRadius:6,padding:"4px 10px",fontSize:12,color:"#e0e0e0"},children:v.name},v.id))})]}),X.jsxs("div",{style:m,children:[X.jsx("div",{style:g,children:"Pipeline Steps"}),X.jsx("div",{style:{display:"flex",flexDirection:"column",gap:6},children:n.pipeline.steps.map((v,_)=>X.jsxs("div",{style:{display:"flex",alignItems:"center",gap:10,background:"#1e1e2e",border:"1px solid #2a2a3e",borderRadius:6,padding:"8px 12px",fontSize:13},children:[X.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:_+1}),X.jsx("span",{style:{color:"#e0e0e0"},children:v.label}),X.jsx("span",{style:{color:"#6b7280",fontSize:11,marginLeft:"auto"},children:v.agent})]},v.id))})]})]}),d&&X.jsxs("div",{style:m,children:[X.jsx("div",{style:g,children:"Current State"}),X.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 WM(){const[a,t]=L.useState(null),[n,l]=L.useState(null),[o,f]=L.useState(!0),[d,m]=L.useState(null),g=L.useCallback(async()=>{f(!0);try{const b=await fetch("/api/health",{credentials:"include"});if(b.ok){const C=await b.json();t(C),l(C.status==="ok")}else l(!1)}catch{l(!1)}finally{f(!1),m(new Date().toLocaleTimeString())}},[]);L.useEffect(()=>{g()},[g]);const v={fontSize:12,color:"#9ca3af",fontWeight:600,marginBottom:6,textTransform:"uppercase",letterSpacing:"0.05em"},_={display:"flex",justifyContent:"space-between",alignItems:"center",padding:"10px 12px",background:"#1e1e2e",border:"1px solid #2a2a3e",borderRadius:6,marginBottom:8,fontSize:13};return X.jsxs("div",{children:[X.jsxs("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",marginBottom:16},children:[X.jsx("h3",{style:{color:"#e0e0e0",fontSize:16,fontWeight:700},children:"Server Info"}),X.jsx("button",{onClick:g,style:{padding:"6px 14px",borderRadius:6,border:"none",background:"#2a2a3e",color:"#e0e0e0",fontWeight:600,fontSize:12,cursor:"pointer"},children:"Refresh"})]}),X.jsxs("div",{style:{marginBottom:24},children:[X.jsx("div",{style:v,children:"Health Status"}),X.jsxs("div",{style:_,children:[X.jsx("span",{style:{color:"#e0e0e0"},children:"API Server"}),o?X.jsx("span",{style:{color:"#9ca3af"},children:"Checking..."}):X.jsx("span",{style:{color:n?"#22c55e":"#ef4444",fontWeight:600},children:n?"Healthy":"Unhealthy"})]})]}),X.jsxs("div",{style:{marginBottom:24},children:[X.jsx("div",{style:v,children:"Environment"}),X.jsxs("div",{style:_,children:[X.jsx("span",{style:{color:"#e0e0e0"},children:"API Port"}),X.jsx("span",{style:{color:"#9ca3af"},children:"3001"})]}),X.jsxs("div",{style:_,children:[X.jsx("span",{style:{color:"#e0e0e0"},children:"Dashboard Port (dev)"}),X.jsx("span",{style:{color:"#9ca3af"},children:"5173"})]})]}),d&&X.jsxs("div",{style:{fontSize:11,color:"#6b7280",textAlign:"right"},children:["Last checked: ",d]})]})}function FM(){const a=bl(d=>d.user),t=(a==null?void 0:a.role)==="admin",[n,l]=L.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 X.jsxs("div",{style:{display:"flex",flexDirection:"column",height:"100%",padding:20},children:[X.jsx("div",{style:{display:"flex",gap:4,marginBottom:20,borderBottom:"1px solid #2a2a3e",paddingBottom:0},children:f.map(d=>X.jsx("button",{onClick:()=>l(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))}),X.jsxs("div",{style:{flex:1,overflow:"auto"},children:[n==="users"&&t&&X.jsx(JM,{}),n==="squad"&&X.jsx(PM,{}),n==="server"&&X.jsx(WM,{})]})]})}cb.createRoot(document.getElementById("root")).render(X.jsx(L.StrictMode,{children:X.jsx(w2,{children:X.jsxs(f2,{children:[X.jsx(ku,{path:"/login",element:X.jsx(pT,{})}),X.jsxs(ku,{path:"/",element:X.jsx(mT,{}),children:[X.jsx(ku,{index:!0,element:X.jsx(r2,{to:"/office",replace:!0})}),X.jsx(ku,{path:"office",element:X.jsx(LM,{})}),X.jsx(ku,{path:"chat",element:X.jsx(VM,{})}),X.jsx(ku,{path:"kanban",element:X.jsx(ZM,{})}),X.jsx(ku,{path:"settings",element:X.jsx(FM,{})})]})]})})}));export{ki as $,x_ as A,$h as B,Rn as C,mi as D,cs as E,$s as F,Xi as G,o_ as H,E0 as I,nC as J,iC as K,fC as L,le as M,rC as N,Cp as O,da as P,oo as Q,h0 as R,R3 as S,ze as T,cp as U,wT as V,id as W,L0 as X,mC as Y,Fa as Z,Gx as _,Wa as a,Tp as a0,G1 as a1,Vc as a2,JA as a3,hE as a4,q1 as a5,zy as a6,Y1 as a7,mE as a8,Lc as a9,on as aa,Yx as ab,gA as ac,__ as ad,de as ae,ad as af,rn as ag,g3 as ah,h3 as ai,j3 as aj,O3 as ak,aC as al,lC as am,hC as an,cC as ao,dC as ap,cn as b,we as c,sp as d,Wt as e,DC as f,GE as g,SC as h,Mp as i,Px as j,Ie as k,Hc as l,qx as m,ma as n,C3 as o,X0 as p,ld as q,PT as r,Ap as s,tv as t,JE as u,up as v,Ga as w,Y0 as x,y_ as y,Ki as z};
|