sage-team 3.0.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.
Files changed (178) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +180 -0
  3. package/dist/agents/__tests__/personas.test.d.ts +2 -0
  4. package/dist/agents/__tests__/personas.test.d.ts.map +1 -0
  5. package/dist/agents/__tests__/personas.test.js +47 -0
  6. package/dist/agents/__tests__/personas.test.js.map +1 -0
  7. package/dist/agents/personas.d.ts +3 -0
  8. package/dist/agents/personas.d.ts.map +1 -0
  9. package/dist/agents/personas.js +127 -0
  10. package/dist/agents/personas.js.map +1 -0
  11. package/dist/agents/skills-map.d.ts +7 -0
  12. package/dist/agents/skills-map.d.ts.map +1 -0
  13. package/dist/agents/skills-map.js +55 -0
  14. package/dist/agents/skills-map.js.map +1 -0
  15. package/dist/cli/__tests__/cli.test.d.ts +2 -0
  16. package/dist/cli/__tests__/cli.test.d.ts.map +1 -0
  17. package/dist/cli/__tests__/cli.test.js +65 -0
  18. package/dist/cli/__tests__/cli.test.js.map +1 -0
  19. package/dist/cli/commands/config.d.ts +3 -0
  20. package/dist/cli/commands/config.d.ts.map +1 -0
  21. package/dist/cli/commands/config.js +50 -0
  22. package/dist/cli/commands/config.js.map +1 -0
  23. package/dist/cli/commands/doctor.d.ts +9 -0
  24. package/dist/cli/commands/doctor.d.ts.map +1 -0
  25. package/dist/cli/commands/doctor.js +74 -0
  26. package/dist/cli/commands/doctor.js.map +1 -0
  27. package/dist/cli/commands/init.d.ts +3 -0
  28. package/dist/cli/commands/init.d.ts.map +1 -0
  29. package/dist/cli/commands/init.js +67 -0
  30. package/dist/cli/commands/init.js.map +1 -0
  31. package/dist/cli/commands/logs.d.ts +3 -0
  32. package/dist/cli/commands/logs.d.ts.map +1 -0
  33. package/dist/cli/commands/logs.js +51 -0
  34. package/dist/cli/commands/logs.js.map +1 -0
  35. package/dist/cli/commands/resume.d.ts +3 -0
  36. package/dist/cli/commands/resume.d.ts.map +1 -0
  37. package/dist/cli/commands/resume.js +106 -0
  38. package/dist/cli/commands/resume.js.map +1 -0
  39. package/dist/cli/commands/start.d.ts +3 -0
  40. package/dist/cli/commands/start.d.ts.map +1 -0
  41. package/dist/cli/commands/start.js +103 -0
  42. package/dist/cli/commands/start.js.map +1 -0
  43. package/dist/cli/commands/status.d.ts +3 -0
  44. package/dist/cli/commands/status.d.ts.map +1 -0
  45. package/dist/cli/commands/status.js +64 -0
  46. package/dist/cli/commands/status.js.map +1 -0
  47. package/dist/cli/commands/team.d.ts +4 -0
  48. package/dist/cli/commands/team.d.ts.map +1 -0
  49. package/dist/cli/commands/team.js +33 -0
  50. package/dist/cli/commands/team.js.map +1 -0
  51. package/dist/cli/index.d.ts +4 -0
  52. package/dist/cli/index.d.ts.map +1 -0
  53. package/dist/cli/index.js +35 -0
  54. package/dist/cli/index.js.map +1 -0
  55. package/dist/cli/splash.d.ts +2 -0
  56. package/dist/cli/splash.d.ts.map +1 -0
  57. package/dist/cli/splash.js +20 -0
  58. package/dist/cli/splash.js.map +1 -0
  59. package/dist/engine/__tests__/ceo-brain.test.d.ts +2 -0
  60. package/dist/engine/__tests__/ceo-brain.test.d.ts.map +1 -0
  61. package/dist/engine/__tests__/ceo-brain.test.js +57 -0
  62. package/dist/engine/__tests__/ceo-brain.test.js.map +1 -0
  63. package/dist/engine/__tests__/dispatcher.test.d.ts +2 -0
  64. package/dist/engine/__tests__/dispatcher.test.d.ts.map +1 -0
  65. package/dist/engine/__tests__/dispatcher.test.js +60 -0
  66. package/dist/engine/__tests__/dispatcher.test.js.map +1 -0
  67. package/dist/engine/__tests__/orchestrator.test.d.ts +2 -0
  68. package/dist/engine/__tests__/orchestrator.test.d.ts.map +1 -0
  69. package/dist/engine/__tests__/orchestrator.test.js +83 -0
  70. package/dist/engine/__tests__/orchestrator.test.js.map +1 -0
  71. package/dist/engine/__tests__/pr-manager.test.d.ts +2 -0
  72. package/dist/engine/__tests__/pr-manager.test.d.ts.map +1 -0
  73. package/dist/engine/__tests__/pr-manager.test.js +44 -0
  74. package/dist/engine/__tests__/pr-manager.test.js.map +1 -0
  75. package/dist/engine/__tests__/prompt-builder.test.d.ts +2 -0
  76. package/dist/engine/__tests__/prompt-builder.test.d.ts.map +1 -0
  77. package/dist/engine/__tests__/prompt-builder.test.js +42 -0
  78. package/dist/engine/__tests__/prompt-builder.test.js.map +1 -0
  79. package/dist/engine/ceo-brain.d.ts +33 -0
  80. package/dist/engine/ceo-brain.d.ts.map +1 -0
  81. package/dist/engine/ceo-brain.js +94 -0
  82. package/dist/engine/ceo-brain.js.map +1 -0
  83. package/dist/engine/dispatcher.d.ts +40 -0
  84. package/dist/engine/dispatcher.d.ts.map +1 -0
  85. package/dist/engine/dispatcher.js +125 -0
  86. package/dist/engine/dispatcher.js.map +1 -0
  87. package/dist/engine/orchestrator.d.ts +49 -0
  88. package/dist/engine/orchestrator.d.ts.map +1 -0
  89. package/dist/engine/orchestrator.js +303 -0
  90. package/dist/engine/orchestrator.js.map +1 -0
  91. package/dist/engine/pr-manager.d.ts +14 -0
  92. package/dist/engine/pr-manager.d.ts.map +1 -0
  93. package/dist/engine/pr-manager.js +67 -0
  94. package/dist/engine/pr-manager.js.map +1 -0
  95. package/dist/engine/prompt-builder.d.ts +27 -0
  96. package/dist/engine/prompt-builder.d.ts.map +1 -0
  97. package/dist/engine/prompt-builder.js +73 -0
  98. package/dist/engine/prompt-builder.js.map +1 -0
  99. package/dist/server/__tests__/server.test.d.ts +2 -0
  100. package/dist/server/__tests__/server.test.d.ts.map +1 -0
  101. package/dist/server/__tests__/server.test.js +87 -0
  102. package/dist/server/__tests__/server.test.js.map +1 -0
  103. package/dist/server/index.d.ts +4 -0
  104. package/dist/server/index.d.ts.map +1 -0
  105. package/dist/server/index.js +72 -0
  106. package/dist/server/index.js.map +1 -0
  107. package/dist/server/routes/api.d.ts +4 -0
  108. package/dist/server/routes/api.d.ts.map +1 -0
  109. package/dist/server/routes/api.js +60 -0
  110. package/dist/server/routes/api.js.map +1 -0
  111. package/dist/skills/__tests__/loader.test.d.ts +2 -0
  112. package/dist/skills/__tests__/loader.test.d.ts.map +1 -0
  113. package/dist/skills/__tests__/loader.test.js +50 -0
  114. package/dist/skills/__tests__/loader.test.js.map +1 -0
  115. package/dist/skills/loader.d.ts +21 -0
  116. package/dist/skills/loader.d.ts.map +1 -0
  117. package/dist/skills/loader.js +190 -0
  118. package/dist/skills/loader.js.map +1 -0
  119. package/dist/state/__tests__/database.test.d.ts +2 -0
  120. package/dist/state/__tests__/database.test.d.ts.map +1 -0
  121. package/dist/state/__tests__/database.test.js +50 -0
  122. package/dist/state/__tests__/database.test.js.map +1 -0
  123. package/dist/state/database.d.ts +14 -0
  124. package/dist/state/database.d.ts.map +1 -0
  125. package/dist/state/database.js +164 -0
  126. package/dist/state/database.js.map +1 -0
  127. package/dist/state/repositories/__tests__/repositories.test.d.ts +2 -0
  128. package/dist/state/repositories/__tests__/repositories.test.d.ts.map +1 -0
  129. package/dist/state/repositories/__tests__/repositories.test.js +162 -0
  130. package/dist/state/repositories/__tests__/repositories.test.js.map +1 -0
  131. package/dist/state/repositories/agents.d.ts +14 -0
  132. package/dist/state/repositories/agents.d.ts.map +1 -0
  133. package/dist/state/repositories/agents.js +52 -0
  134. package/dist/state/repositories/agents.js.map +1 -0
  135. package/dist/state/repositories/events.d.ts +10 -0
  136. package/dist/state/repositories/events.d.ts.map +1 -0
  137. package/dist/state/repositories/events.js +27 -0
  138. package/dist/state/repositories/events.js.map +1 -0
  139. package/dist/state/repositories/messages.d.ts +15 -0
  140. package/dist/state/repositories/messages.d.ts.map +1 -0
  141. package/dist/state/repositories/messages.js +19 -0
  142. package/dist/state/repositories/messages.js.map +1 -0
  143. package/dist/state/repositories/pull-requests.d.ts +25 -0
  144. package/dist/state/repositories/pull-requests.d.ts.map +1 -0
  145. package/dist/state/repositories/pull-requests.js +40 -0
  146. package/dist/state/repositories/pull-requests.js.map +1 -0
  147. package/dist/state/repositories/sessions.d.ts +13 -0
  148. package/dist/state/repositories/sessions.d.ts.map +1 -0
  149. package/dist/state/repositories/sessions.js +41 -0
  150. package/dist/state/repositories/sessions.js.map +1 -0
  151. package/dist/state/repositories/sprints.d.ts +19 -0
  152. package/dist/state/repositories/sprints.d.ts.map +1 -0
  153. package/dist/state/repositories/sprints.js +26 -0
  154. package/dist/state/repositories/sprints.js.map +1 -0
  155. package/dist/state/repositories/tasks.d.ts +26 -0
  156. package/dist/state/repositories/tasks.d.ts.map +1 -0
  157. package/dist/state/repositories/tasks.js +43 -0
  158. package/dist/state/repositories/tasks.js.map +1 -0
  159. package/dist/types/__tests__/types.test.d.ts +2 -0
  160. package/dist/types/__tests__/types.test.d.ts.map +1 -0
  161. package/dist/types/__tests__/types.test.js +70 -0
  162. package/dist/types/__tests__/types.test.js.map +1 -0
  163. package/dist/types/index.d.ts +198 -0
  164. package/dist/types/index.d.ts.map +1 -0
  165. package/dist/types/index.js +3 -0
  166. package/dist/types/index.js.map +1 -0
  167. package/package.json +65 -0
  168. package/src/web/dist/assets/BufferResource-rnljfCCz.js +185 -0
  169. package/src/web/dist/assets/CanvasRenderer-BvTI2UTL.js +1 -0
  170. package/src/web/dist/assets/Filter-BzO9QkkB.js +1 -0
  171. package/src/web/dist/assets/RenderTargetSystem-CKlnKfTJ.js +172 -0
  172. package/src/web/dist/assets/WebGLRenderer-B5LAM4bk.js +156 -0
  173. package/src/web/dist/assets/WebGPURenderer-FkK3p3f4.js +41 -0
  174. package/src/web/dist/assets/browserAll-CDpBxY6s.js +14 -0
  175. package/src/web/dist/assets/index-B3XZpovA.js +298 -0
  176. package/src/web/dist/assets/index-BcX-h_hs.css +1 -0
  177. package/src/web/dist/assets/webworkerAll-B9AvsPZH.js +83 -0
  178. package/src/web/dist/index.html +18 -0
@@ -0,0 +1,298 @@
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/browserAll-CDpBxY6s.js","assets/webworkerAll-B9AvsPZH.js","assets/Filter-BzO9QkkB.js","assets/WebGPURenderer-FkK3p3f4.js","assets/BufferResource-rnljfCCz.js","assets/RenderTargetSystem-CKlnKfTJ.js","assets/WebGLRenderer-B5LAM4bk.js","assets/CanvasRenderer-BvTI2UTL.js"])))=>i.map(i=>d[i]);
2
+ var ob=Object.defineProperty;var cb=(l,t,n)=>t in l?ob(l,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):l[t]=n;var de=(l,t,n)=>cb(l,typeof t!="symbol"?t+"":t,n);(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const u of document.querySelectorAll('link[rel="modulepreload"]'))a(u);new MutationObserver(u=>{for(const o of u)if(o.type==="childList")for(const c of o.addedNodes)c.tagName==="LINK"&&c.rel==="modulepreload"&&a(c)}).observe(document,{childList:!0,subtree:!0});function n(u){const o={};return u.integrity&&(o.integrity=u.integrity),u.referrerPolicy&&(o.referrerPolicy=u.referrerPolicy),u.crossOrigin==="use-credentials"?o.credentials="include":u.crossOrigin==="anonymous"?o.credentials="omit":o.credentials="same-origin",o}function a(u){if(u.ep)return;u.ep=!0;const o=n(u);fetch(u.href,o)}})();function vh(l){return l&&l.__esModule&&Object.prototype.hasOwnProperty.call(l,"default")?l.default:l}var vc={exports:{}},Ya={};/**
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 Lg;function hb(){if(Lg)return Ya;Lg=1;var l=Symbol.for("react.transitional.element"),t=Symbol.for("react.fragment");function n(a,u,o){var c=null;if(o!==void 0&&(c=""+o),u.key!==void 0&&(c=""+u.key),"key"in u){o={};for(var f in u)f!=="key"&&(o[f]=u[f])}else o=u;return u=o.ref,{$$typeof:l,type:a,key:c,ref:u!==void 0?u:null,props:o}}return Ya.Fragment=t,Ya.jsx=n,Ya.jsxs=n,Ya}var Yg;function fb(){return Yg||(Yg=1,vc.exports=hb()),vc.exports}var tt=fb(),Sc={exports:{}},dt={};/**
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 jg;function db(){if(jg)return dt;jg=1;var l=Symbol.for("react.transitional.element"),t=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),a=Symbol.for("react.strict_mode"),u=Symbol.for("react.profiler"),o=Symbol.for("react.consumer"),c=Symbol.for("react.context"),f=Symbol.for("react.forward_ref"),m=Symbol.for("react.suspense"),g=Symbol.for("react.memo"),p=Symbol.for("react.lazy"),_=Symbol.for("react.activity"),b=Symbol.iterator;function x(w){return w===null||typeof w!="object"?null:(w=b&&w[b]||w["@@iterator"],typeof w=="function"?w:null)}var S={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},A=Object.assign,T={};function M(w,j,P){this.props=w,this.context=j,this.refs=T,this.updater=P||S}M.prototype.isReactComponent={},M.prototype.setState=function(w,j){if(typeof w!="object"&&typeof w!="function"&&w!=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,w,j,"setState")},M.prototype.forceUpdate=function(w){this.updater.enqueueForceUpdate(this,w,"forceUpdate")};function z(){}z.prototype=M.prototype;function B(w,j,P){this.props=w,this.context=j,this.refs=T,this.updater=P||S}var O=B.prototype=new z;O.constructor=B,A(O,M.prototype),O.isPureReactComponent=!0;var F=Array.isArray;function k(){}var G={H:null,A:null,T:null,S:null},$=Object.prototype.hasOwnProperty;function Q(w,j,P){var I=P.ref;return{$$typeof:l,type:w,key:j,ref:I!==void 0?I:null,props:P}}function Z(w,j){return Q(w.type,j,w.props)}function K(w){return typeof w=="object"&&w!==null&&w.$$typeof===l}function J(w){var j={"=":"=0",":":"=2"};return"$"+w.replace(/[=:]/g,function(P){return j[P]})}var it=/\/+/g;function nt(w,j){return typeof w=="object"&&w!==null&&w.key!=null?J(""+w.key):j.toString(36)}function Tt(w){switch(w.status){case"fulfilled":return w.value;case"rejected":throw w.reason;default:switch(typeof w.status=="string"?w.then(k,k):(w.status="pending",w.then(function(j){w.status==="pending"&&(w.status="fulfilled",w.value=j)},function(j){w.status==="pending"&&(w.status="rejected",w.reason=j)})),w.status){case"fulfilled":return w.value;case"rejected":throw w.reason}}throw w}function R(w,j,P,I,rt){var ct=typeof w;(ct==="undefined"||ct==="boolean")&&(w=null);var ft=!1;if(w===null)ft=!0;else switch(ct){case"bigint":case"string":case"number":ft=!0;break;case"object":switch(w.$$typeof){case l:case t:ft=!0;break;case p:return ft=w._init,R(ft(w._payload),j,P,I,rt)}}if(ft)return rt=rt(w),ft=I===""?"."+nt(w,0):I,F(rt)?(P="",ft!=null&&(P=ft.replace(it,"$&/")+"/"),R(rt,j,P,"",function(Xe){return Xe})):rt!=null&&(K(rt)&&(rt=Z(rt,P+(rt.key==null||w&&w.key===rt.key?"":(""+rt.key).replace(it,"$&/")+"/")+ft)),j.push(rt)),1;ft=0;var Ht=I===""?".":I+":";if(F(w))for(var wt=0;wt<w.length;wt++)I=w[wt],ct=Ht+nt(I,wt),ft+=R(I,j,P,ct,rt);else if(wt=x(w),typeof wt=="function")for(w=wt.call(w),wt=0;!(I=w.next()).done;)I=I.value,ct=Ht+nt(I,wt++),ft+=R(I,j,P,ct,rt);else if(ct==="object"){if(typeof w.then=="function")return R(Tt(w),j,P,I,rt);throw j=String(w),Error("Objects are not valid as a React child (found: "+(j==="[object Object]"?"object with keys {"+Object.keys(w).join(", ")+"}":j)+"). If you meant to render a collection of children, use an array instead.")}return ft}function L(w,j,P){if(w==null)return w;var I=[],rt=0;return R(w,I,"","",function(ct){return j.call(P,ct,rt++)}),I}function et(w){if(w._status===-1){var j=w._result;j=j(),j.then(function(P){(w._status===0||w._status===-1)&&(w._status=1,w._result=P)},function(P){(w._status===0||w._status===-1)&&(w._status=2,w._result=P)}),w._status===-1&&(w._status=0,w._result=j)}if(w._status===1)return w._result.default;throw w._result}var W=typeof reportError=="function"?reportError:function(w){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var j=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof w=="object"&&w!==null&&typeof w.message=="string"?String(w.message):String(w),error:w});if(!window.dispatchEvent(j))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",w);return}console.error(w)},at={map:L,forEach:function(w,j,P){L(w,function(){j.apply(this,arguments)},P)},count:function(w){var j=0;return L(w,function(){j++}),j},toArray:function(w){return L(w,function(j){return j})||[]},only:function(w){if(!K(w))throw Error("React.Children.only expected to receive a single React element child.");return w}};return dt.Activity=_,dt.Children=at,dt.Component=M,dt.Fragment=n,dt.Profiler=u,dt.PureComponent=B,dt.StrictMode=a,dt.Suspense=m,dt.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=G,dt.__COMPILER_RUNTIME={__proto__:null,c:function(w){return G.H.useMemoCache(w)}},dt.cache=function(w){return function(){return w.apply(null,arguments)}},dt.cacheSignal=function(){return null},dt.cloneElement=function(w,j,P){if(w==null)throw Error("The argument must be a React element, but you passed "+w+".");var I=A({},w.props),rt=w.key;if(j!=null)for(ct in j.key!==void 0&&(rt=""+j.key),j)!$.call(j,ct)||ct==="key"||ct==="__self"||ct==="__source"||ct==="ref"&&j.ref===void 0||(I[ct]=j[ct]);var ct=arguments.length-2;if(ct===1)I.children=P;else if(1<ct){for(var ft=Array(ct),Ht=0;Ht<ct;Ht++)ft[Ht]=arguments[Ht+2];I.children=ft}return Q(w.type,rt,I)},dt.createContext=function(w){return w={$$typeof:c,_currentValue:w,_currentValue2:w,_threadCount:0,Provider:null,Consumer:null},w.Provider=w,w.Consumer={$$typeof:o,_context:w},w},dt.createElement=function(w,j,P){var I,rt={},ct=null;if(j!=null)for(I in j.key!==void 0&&(ct=""+j.key),j)$.call(j,I)&&I!=="key"&&I!=="__self"&&I!=="__source"&&(rt[I]=j[I]);var ft=arguments.length-2;if(ft===1)rt.children=P;else if(1<ft){for(var Ht=Array(ft),wt=0;wt<ft;wt++)Ht[wt]=arguments[wt+2];rt.children=Ht}if(w&&w.defaultProps)for(I in ft=w.defaultProps,ft)rt[I]===void 0&&(rt[I]=ft[I]);return Q(w,ct,rt)},dt.createRef=function(){return{current:null}},dt.forwardRef=function(w){return{$$typeof:f,render:w}},dt.isValidElement=K,dt.lazy=function(w){return{$$typeof:p,_payload:{_status:-1,_result:w},_init:et}},dt.memo=function(w,j){return{$$typeof:g,type:w,compare:j===void 0?null:j}},dt.startTransition=function(w){var j=G.T,P={};G.T=P;try{var I=w(),rt=G.S;rt!==null&&rt(P,I),typeof I=="object"&&I!==null&&typeof I.then=="function"&&I.then(k,W)}catch(ct){W(ct)}finally{j!==null&&P.types!==null&&(j.types=P.types),G.T=j}},dt.unstable_useCacheRefresh=function(){return G.H.useCacheRefresh()},dt.use=function(w){return G.H.use(w)},dt.useActionState=function(w,j,P){return G.H.useActionState(w,j,P)},dt.useCallback=function(w,j){return G.H.useCallback(w,j)},dt.useContext=function(w){return G.H.useContext(w)},dt.useDebugValue=function(){},dt.useDeferredValue=function(w,j){return G.H.useDeferredValue(w,j)},dt.useEffect=function(w,j){return G.H.useEffect(w,j)},dt.useEffectEvent=function(w){return G.H.useEffectEvent(w)},dt.useId=function(){return G.H.useId()},dt.useImperativeHandle=function(w,j,P){return G.H.useImperativeHandle(w,j,P)},dt.useInsertionEffect=function(w,j){return G.H.useInsertionEffect(w,j)},dt.useLayoutEffect=function(w,j){return G.H.useLayoutEffect(w,j)},dt.useMemo=function(w,j){return G.H.useMemo(w,j)},dt.useOptimistic=function(w,j){return G.H.useOptimistic(w,j)},dt.useReducer=function(w,j,P){return G.H.useReducer(w,j,P)},dt.useRef=function(w){return G.H.useRef(w)},dt.useState=function(w){return G.H.useState(w)},dt.useSyncExternalStore=function(w,j,P){return G.H.useSyncExternalStore(w,j,P)},dt.useTransition=function(){return G.H.useTransition()},dt.version="19.2.4",dt}var Xg;function Sh(){return Xg||(Xg=1,Sc.exports=db()),Sc.exports}var ei=Sh();const Br=vh(ei);var Tc={exports:{}},ja={},Ac={exports:{}},Cc={};/**
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 qg;function mb(){return qg||(qg=1,(function(l){function t(R,L){var et=R.length;R.push(L);t:for(;0<et;){var W=et-1>>>1,at=R[W];if(0<u(at,L))R[W]=L,R[et]=at,et=W;else break t}}function n(R){return R.length===0?null:R[0]}function a(R){if(R.length===0)return null;var L=R[0],et=R.pop();if(et!==L){R[0]=et;t:for(var W=0,at=R.length,w=at>>>1;W<w;){var j=2*(W+1)-1,P=R[j],I=j+1,rt=R[I];if(0>u(P,et))I<at&&0>u(rt,P)?(R[W]=rt,R[I]=et,W=I):(R[W]=P,R[j]=et,W=j);else if(I<at&&0>u(rt,et))R[W]=rt,R[I]=et,W=I;else break t}}return L}function u(R,L){var et=R.sortIndex-L.sortIndex;return et!==0?et:R.id-L.id}if(l.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var o=performance;l.unstable_now=function(){return o.now()}}else{var c=Date,f=c.now();l.unstable_now=function(){return c.now()-f}}var m=[],g=[],p=1,_=null,b=3,x=!1,S=!1,A=!1,T=!1,M=typeof setTimeout=="function"?setTimeout:null,z=typeof clearTimeout=="function"?clearTimeout:null,B=typeof setImmediate<"u"?setImmediate:null;function O(R){for(var L=n(g);L!==null;){if(L.callback===null)a(g);else if(L.startTime<=R)a(g),L.sortIndex=L.expirationTime,t(m,L);else break;L=n(g)}}function F(R){if(A=!1,O(R),!S)if(n(m)!==null)S=!0,k||(k=!0,J());else{var L=n(g);L!==null&&Tt(F,L.startTime-R)}}var k=!1,G=-1,$=5,Q=-1;function Z(){return T?!0:!(l.unstable_now()-Q<$)}function K(){if(T=!1,k){var R=l.unstable_now();Q=R;var L=!0;try{t:{S=!1,A&&(A=!1,z(G),G=-1),x=!0;var et=b;try{e:{for(O(R),_=n(m);_!==null&&!(_.expirationTime>R&&Z());){var W=_.callback;if(typeof W=="function"){_.callback=null,b=_.priorityLevel;var at=W(_.expirationTime<=R);if(R=l.unstable_now(),typeof at=="function"){_.callback=at,O(R),L=!0;break e}_===n(m)&&a(m),O(R)}else a(m);_=n(m)}if(_!==null)L=!0;else{var w=n(g);w!==null&&Tt(F,w.startTime-R),L=!1}}break t}finally{_=null,b=et,x=!1}L=void 0}}finally{L?J():k=!1}}}var J;if(typeof B=="function")J=function(){B(K)};else if(typeof MessageChannel<"u"){var it=new MessageChannel,nt=it.port2;it.port1.onmessage=K,J=function(){nt.postMessage(null)}}else J=function(){M(K,0)};function Tt(R,L){G=M(function(){R(l.unstable_now())},L)}l.unstable_IdlePriority=5,l.unstable_ImmediatePriority=1,l.unstable_LowPriority=4,l.unstable_NormalPriority=3,l.unstable_Profiling=null,l.unstable_UserBlockingPriority=2,l.unstable_cancelCallback=function(R){R.callback=null},l.unstable_forceFrameRate=function(R){0>R||125<R?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):$=0<R?Math.floor(1e3/R):5},l.unstable_getCurrentPriorityLevel=function(){return b},l.unstable_next=function(R){switch(b){case 1:case 2:case 3:var L=3;break;default:L=b}var et=b;b=L;try{return R()}finally{b=et}},l.unstable_requestPaint=function(){T=!0},l.unstable_runWithPriority=function(R,L){switch(R){case 1:case 2:case 3:case 4:case 5:break;default:R=3}var et=b;b=R;try{return L()}finally{b=et}},l.unstable_scheduleCallback=function(R,L,et){var W=l.unstable_now();switch(typeof et=="object"&&et!==null?(et=et.delay,et=typeof et=="number"&&0<et?W+et:W):et=W,R){case 1:var at=-1;break;case 2:at=250;break;case 5:at=1073741823;break;case 4:at=1e4;break;default:at=5e3}return at=et+at,R={id:p++,callback:L,priorityLevel:R,startTime:et,expirationTime:at,sortIndex:-1},et>W?(R.sortIndex=et,t(g,R),n(m)===null&&R===n(g)&&(A?(z(G),G=-1):A=!0,Tt(F,et-W))):(R.sortIndex=at,t(m,R),S||x||(S=!0,k||(k=!0,J()))),R},l.unstable_shouldYield=Z,l.unstable_wrapCallback=function(R){var L=b;return function(){var et=b;b=L;try{return R.apply(this,arguments)}finally{b=et}}}})(Cc)),Cc}var Vg;function gb(){return Vg||(Vg=1,Ac.exports=mb()),Ac.exports}var Mc={exports:{}},me={};/**
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 Pg;function pb(){if(Pg)return me;Pg=1;var l=Sh();function t(m){var g="https://react.dev/errors/"+m;if(1<arguments.length){g+="?args[]="+encodeURIComponent(arguments[1]);for(var p=2;p<arguments.length;p++)g+="&args[]="+encodeURIComponent(arguments[p])}return"Minified React error #"+m+"; visit "+g+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function n(){}var a={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},u=Symbol.for("react.portal");function o(m,g,p){var _=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:u,key:_==null?null:""+_,children:m,containerInfo:g,implementation:p}}var c=l.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function f(m,g){if(m==="font")return"";if(typeof g=="string")return g==="use-credentials"?g:""}return me.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=a,me.createPortal=function(m,g){var p=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!g||g.nodeType!==1&&g.nodeType!==9&&g.nodeType!==11)throw Error(t(299));return o(m,g,null,p)},me.flushSync=function(m){var g=c.T,p=a.p;try{if(c.T=null,a.p=2,m)return m()}finally{c.T=g,a.p=p,a.d.f()}},me.preconnect=function(m,g){typeof m=="string"&&(g?(g=g.crossOrigin,g=typeof g=="string"?g==="use-credentials"?g:"":void 0):g=null,a.d.C(m,g))},me.prefetchDNS=function(m){typeof m=="string"&&a.d.D(m)},me.preinit=function(m,g){if(typeof m=="string"&&g&&typeof g.as=="string"){var p=g.as,_=f(p,g.crossOrigin),b=typeof g.integrity=="string"?g.integrity:void 0,x=typeof g.fetchPriority=="string"?g.fetchPriority:void 0;p==="style"?a.d.S(m,typeof g.precedence=="string"?g.precedence:void 0,{crossOrigin:_,integrity:b,fetchPriority:x}):p==="script"&&a.d.X(m,{crossOrigin:_,integrity:b,fetchPriority:x,nonce:typeof g.nonce=="string"?g.nonce:void 0})}},me.preinitModule=function(m,g){if(typeof m=="string")if(typeof g=="object"&&g!==null){if(g.as==null||g.as==="script"){var p=f(g.as,g.crossOrigin);a.d.M(m,{crossOrigin:p,integrity:typeof g.integrity=="string"?g.integrity:void 0,nonce:typeof g.nonce=="string"?g.nonce:void 0})}}else g==null&&a.d.M(m)},me.preload=function(m,g){if(typeof m=="string"&&typeof g=="object"&&g!==null&&typeof g.as=="string"){var p=g.as,_=f(p,g.crossOrigin);a.d.L(m,p,{crossOrigin:_,integrity:typeof g.integrity=="string"?g.integrity:void 0,nonce:typeof g.nonce=="string"?g.nonce:void 0,type:typeof g.type=="string"?g.type:void 0,fetchPriority:typeof g.fetchPriority=="string"?g.fetchPriority:void 0,referrerPolicy:typeof g.referrerPolicy=="string"?g.referrerPolicy:void 0,imageSrcSet:typeof g.imageSrcSet=="string"?g.imageSrcSet:void 0,imageSizes:typeof g.imageSizes=="string"?g.imageSizes:void 0,media:typeof g.media=="string"?g.media:void 0})}},me.preloadModule=function(m,g){if(typeof m=="string")if(g){var p=f(g.as,g.crossOrigin);a.d.m(m,{as:typeof g.as=="string"&&g.as!=="script"?g.as:void 0,crossOrigin:p,integrity:typeof g.integrity=="string"?g.integrity:void 0})}else a.d.m(m)},me.requestFormReset=function(m){a.d.r(m)},me.unstable_batchedUpdates=function(m,g){return m(g)},me.useFormState=function(m,g,p){return c.H.useFormState(m,g,p)},me.useFormStatus=function(){return c.H.useHostTransitionStatus()},me.version="19.2.4",me}var Fg;function yb(){if(Fg)return Mc.exports;Fg=1;function l(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(l)}catch(t){console.error(t)}}return l(),Mc.exports=pb(),Mc.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 Qg;function _b(){if(Qg)return ja;Qg=1;var l=gb(),t=Sh(),n=yb();function a(e){var i="https://react.dev/errors/"+e;if(1<arguments.length){i+="?args[]="+encodeURIComponent(arguments[1]);for(var s=2;s<arguments.length;s++)i+="&args[]="+encodeURIComponent(arguments[s])}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 u(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function o(e){var i=e,s=e;if(e.alternate)for(;i.return;)i=i.return;else{e=i;do i=e,(i.flags&4098)!==0&&(s=i.return),e=i.return;while(e)}return i.tag===3?s:null}function c(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 f(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 m(e){if(o(e)!==e)throw Error(a(188))}function g(e){var i=e.alternate;if(!i){if(i=o(e),i===null)throw Error(a(188));return i!==e?null:e}for(var s=e,r=i;;){var h=s.return;if(h===null)break;var d=h.alternate;if(d===null){if(r=h.return,r!==null){s=r;continue}break}if(h.child===d.child){for(d=h.child;d;){if(d===s)return m(h),e;if(d===r)return m(h),i;d=d.sibling}throw Error(a(188))}if(s.return!==r.return)s=h,r=d;else{for(var y=!1,v=h.child;v;){if(v===s){y=!0,s=h,r=d;break}if(v===r){y=!0,r=h,s=d;break}v=v.sibling}if(!y){for(v=d.child;v;){if(v===s){y=!0,s=d,r=h;break}if(v===r){y=!0,r=d,s=h;break}v=v.sibling}if(!y)throw Error(a(189))}}if(s.alternate!==r)throw Error(a(190))}if(s.tag!==3)throw Error(a(188));return s.stateNode.current===s?e:i}function p(e){var i=e.tag;if(i===5||i===26||i===27||i===6)return e;for(e=e.child;e!==null;){if(i=p(e),i!==null)return i;e=e.sibling}return null}var _=Object.assign,b=Symbol.for("react.element"),x=Symbol.for("react.transitional.element"),S=Symbol.for("react.portal"),A=Symbol.for("react.fragment"),T=Symbol.for("react.strict_mode"),M=Symbol.for("react.profiler"),z=Symbol.for("react.consumer"),B=Symbol.for("react.context"),O=Symbol.for("react.forward_ref"),F=Symbol.for("react.suspense"),k=Symbol.for("react.suspense_list"),G=Symbol.for("react.memo"),$=Symbol.for("react.lazy"),Q=Symbol.for("react.activity"),Z=Symbol.for("react.memo_cache_sentinel"),K=Symbol.iterator;function J(e){return e===null||typeof e!="object"?null:(e=K&&e[K]||e["@@iterator"],typeof e=="function"?e:null)}var it=Symbol.for("react.client.reference");function nt(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===it?null:e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case A:return"Fragment";case M:return"Profiler";case T:return"StrictMode";case F:return"Suspense";case k:return"SuspenseList";case Q:return"Activity"}if(typeof e=="object")switch(e.$$typeof){case S:return"Portal";case B:return e.displayName||"Context";case z:return(e._context.displayName||"Context")+".Consumer";case O:var i=e.render;return e=e.displayName,e||(e=i.displayName||i.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case G:return i=e.displayName||null,i!==null?i:nt(e.type)||"Memo";case $:i=e._payload,e=e._init;try{return nt(e(i))}catch{}}return null}var Tt=Array.isArray,R=t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,L=n.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,et={pending:!1,data:null,method:null,action:null},W=[],at=-1;function w(e){return{current:e}}function j(e){0>at||(e.current=W[at],W[at]=null,at--)}function P(e,i){at++,W[at]=e.current,e.current=i}var I=w(null),rt=w(null),ct=w(null),ft=w(null);function Ht(e,i){switch(P(ct,i),P(rt,e),P(I,null),i.nodeType){case 9:case 11:e=(e=i.documentElement)&&(e=e.namespaceURI)?ug(e):0;break;default:if(e=i.tagName,i=i.namespaceURI)i=ug(i),e=og(i,e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}j(I),P(I,e)}function wt(){j(I),j(rt),j(ct)}function Xe(e){e.memoizedState!==null&&P(ft,e);var i=I.current,s=og(i,e.type);i!==s&&(P(rt,e),P(I,s))}function Fi(e){rt.current===e&&(j(I),j(rt)),ft.current===e&&(j(ft),Na._currentValue=et)}var ai,fi;function pe(e){if(ai===void 0)try{throw Error()}catch(s){var i=s.stack.trim().match(/\n( *(at )?)/);ai=i&&i[1]||"",fi=-1<s.stack.indexOf(`
43
+ at`)?" (<anonymous>)":-1<s.stack.indexOf("@")?"@unknown:0:0":""}return`
44
+ `+ai+e+fi}var li=!1;function Qs(e,i){if(!e||li)return"";li=!0;var s=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var r={DetermineComponentFrameRoot:function(){try{if(i){var V=function(){throw Error()};if(Object.defineProperty(V.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(V,[])}catch(Y){var H=Y}Reflect.construct(e,[],V)}else{try{V.call()}catch(Y){H=Y}e.call(V.prototype)}}else{try{throw Error()}catch(Y){H=Y}(V=e())&&typeof V.catch=="function"&&V.catch(function(){})}}catch(Y){if(Y&&H&&typeof Y.stack=="string")return[Y.stack,H.stack]}return[null,null]}};r.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var h=Object.getOwnPropertyDescriptor(r.DetermineComponentFrameRoot,"name");h&&h.configurable&&Object.defineProperty(r.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var d=r.DetermineComponentFrameRoot(),y=d[0],v=d[1];if(y&&v){var C=y.split(`
45
+ `),N=v.split(`
46
+ `);for(h=r=0;r<C.length&&!C[r].includes("DetermineComponentFrameRoot");)r++;for(;h<N.length&&!N[h].includes("DetermineComponentFrameRoot");)h++;if(r===C.length||h===N.length)for(r=C.length-1,h=N.length-1;1<=r&&0<=h&&C[r]!==N[h];)h--;for(;1<=r&&0<=h;r--,h--)if(C[r]!==N[h]){if(r!==1||h!==1)do if(r--,h--,0>h||C[r]!==N[h]){var X=`
47
+ `+C[r].replace(" at new "," at ");return e.displayName&&X.includes("<anonymous>")&&(X=X.replace("<anonymous>",e.displayName)),X}while(1<=r&&0<=h);break}}}finally{li=!1,Error.prepareStackTrace=s}return(s=e?e.displayName||e.name:"")?pe(s):""}function fl(e,i){switch(e.tag){case 26:case 27:case 5:return pe(e.type);case 16:return pe("Lazy");case 13:return e.child!==i&&i!==null?pe("Suspense Fallback"):pe("Suspense");case 19:return pe("SuspenseList");case 0:case 15:return Qs(e.type,!1);case 11:return Qs(e.type.render,!1);case 1:return Qs(e.type,!0);case 31:return pe("Activity");default:return""}}function dl(e){try{var i="",s=null;do i+=fl(e,s),s=e,e=e.return;while(e);return i}catch(r){return`
48
+ Error generating stack: `+r.message+`
49
+ `+r.stack}}var ml=Object.prototype.hasOwnProperty,lu=l.unstable_scheduleCallback,ru=l.unstable_cancelCallback,j0=l.unstable_shouldYield,X0=l.unstable_requestPaint,ze=l.unstable_now,q0=l.unstable_getCurrentPriorityLevel,Lh=l.unstable_ImmediatePriority,Yh=l.unstable_UserBlockingPriority,gl=l.unstable_NormalPriority,V0=l.unstable_LowPriority,jh=l.unstable_IdlePriority,P0=l.log,F0=l.unstable_setDisableYieldValue,Zs=null,De=null;function Qi(e){if(typeof P0=="function"&&F0(e),De&&typeof De.setStrictMode=="function")try{De.setStrictMode(Zs,e)}catch{}}var Be=Math.clz32?Math.clz32:W0,Q0=Math.log,Z0=Math.LN2;function W0(e){return e>>>=0,e===0?32:31-(Q0(e)/Z0|0)|0}var pl=256,yl=262144,_l=4194304;function vn(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 xl(e,i,s){var r=e.pendingLanes;if(r===0)return 0;var h=0,d=e.suspendedLanes,y=e.pingedLanes;e=e.warmLanes;var v=r&134217727;return v!==0?(r=v&~d,r!==0?h=vn(r):(y&=v,y!==0?h=vn(y):s||(s=v&~e,s!==0&&(h=vn(s))))):(v=r&~d,v!==0?h=vn(v):y!==0?h=vn(y):s||(s=r&~e,s!==0&&(h=vn(s)))),h===0?0:i!==0&&i!==h&&(i&d)===0&&(d=h&-h,s=i&-i,d>=s||d===32&&(s&4194048)!==0)?i:h}function Ws(e,i){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&i)===0}function K0(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 Xh(){var e=_l;return _l<<=1,(_l&62914560)===0&&(_l=4194304),e}function uu(e){for(var i=[],s=0;31>s;s++)i.push(e);return i}function Ks(e,i){e.pendingLanes|=i,i!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function I0(e,i,s,r,h,d){var y=e.pendingLanes;e.pendingLanes=s,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=s,e.entangledLanes&=s,e.errorRecoveryDisabledLanes&=s,e.shellSuspendCounter=0;var v=e.entanglements,C=e.expirationTimes,N=e.hiddenUpdates;for(s=y&~s;0<s;){var X=31-Be(s),V=1<<X;v[X]=0,C[X]=-1;var H=N[X];if(H!==null)for(N[X]=null,X=0;X<H.length;X++){var Y=H[X];Y!==null&&(Y.lane&=-536870913)}s&=~V}r!==0&&qh(e,r,0),d!==0&&h===0&&e.tag!==0&&(e.suspendedLanes|=d&~(y&~i))}function qh(e,i,s){e.pendingLanes|=i,e.suspendedLanes&=~i;var r=31-Be(i);e.entangledLanes|=i,e.entanglements[r]=e.entanglements[r]|1073741824|s&261930}function Vh(e,i){var s=e.entangledLanes|=i;for(e=e.entanglements;s;){var r=31-Be(s),h=1<<r;h&i|e[r]&i&&(e[r]|=i),s&=~h}}function Ph(e,i){var s=i&-i;return s=(s&42)!==0?1:ou(s),(s&(e.suspendedLanes|i))!==0?0:s}function ou(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 cu(e){return e&=-e,2<e?8<e?(e&134217727)!==0?32:268435456:8:2}function Fh(){var e=L.p;return e!==0?e:(e=window.event,e===void 0?32:Bg(e.type))}function Qh(e,i){var s=L.p;try{return L.p=e,i()}finally{L.p=s}}var Zi=Math.random().toString(36).slice(2),re="__reactFiber$"+Zi,ve="__reactProps$"+Zi,Wn="__reactContainer$"+Zi,hu="__reactEvents$"+Zi,J0="__reactListeners$"+Zi,$0="__reactHandles$"+Zi,Zh="__reactResources$"+Zi,Is="__reactMarker$"+Zi;function fu(e){delete e[re],delete e[ve],delete e[hu],delete e[J0],delete e[$0]}function Kn(e){var i=e[re];if(i)return i;for(var s=e.parentNode;s;){if(i=s[Wn]||s[re]){if(s=i.alternate,i.child!==null||s!==null&&s.child!==null)for(e=pg(e);e!==null;){if(s=e[re])return s;e=pg(e)}return i}e=s,s=e.parentNode}return null}function In(e){if(e=e[re]||e[Wn]){var i=e.tag;if(i===5||i===6||i===13||i===31||i===26||i===27||i===3)return e}return null}function Js(e){var i=e.tag;if(i===5||i===26||i===27||i===6)return e.stateNode;throw Error(a(33))}function Jn(e){var i=e[Zh];return i||(i=e[Zh]={hoistableStyles:new Map,hoistableScripts:new Map}),i}function se(e){e[Is]=!0}var Wh=new Set,Kh={};function Sn(e,i){$n(e,i),$n(e+"Capture",i)}function $n(e,i){for(Kh[e]=i,e=0;e<i.length;e++)Wh.add(i[e])}var t_=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]*$"),Ih={},Jh={};function e_(e){return ml.call(Jh,e)?!0:ml.call(Ih,e)?!1:t_.test(e)?Jh[e]=!0:(Ih[e]=!0,!1)}function bl(e,i,s){if(e_(i))if(s===null)e.removeAttribute(i);else{switch(typeof s){case"undefined":case"function":case"symbol":e.removeAttribute(i);return;case"boolean":var r=i.toLowerCase().slice(0,5);if(r!=="data-"&&r!=="aria-"){e.removeAttribute(i);return}}e.setAttribute(i,""+s)}}function vl(e,i,s){if(s===null)e.removeAttribute(i);else{switch(typeof s){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(i);return}e.setAttribute(i,""+s)}}function bi(e,i,s,r){if(r===null)e.removeAttribute(s);else{switch(typeof r){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(s);return}e.setAttributeNS(i,s,""+r)}}function qe(e){switch(typeof e){case"bigint":case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function $h(e){var i=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(i==="checkbox"||i==="radio")}function i_(e,i,s){var r=Object.getOwnPropertyDescriptor(e.constructor.prototype,i);if(!e.hasOwnProperty(i)&&typeof r<"u"&&typeof r.get=="function"&&typeof r.set=="function"){var h=r.get,d=r.set;return Object.defineProperty(e,i,{configurable:!0,get:function(){return h.call(this)},set:function(y){s=""+y,d.call(this,y)}}),Object.defineProperty(e,i,{enumerable:r.enumerable}),{getValue:function(){return s},setValue:function(y){s=""+y},stopTracking:function(){e._valueTracker=null,delete e[i]}}}}function du(e){if(!e._valueTracker){var i=$h(e)?"checked":"value";e._valueTracker=i_(e,i,""+e[i])}}function tf(e){if(!e)return!1;var i=e._valueTracker;if(!i)return!0;var s=i.getValue(),r="";return e&&(r=$h(e)?e.checked?"true":"false":e.value),e=r,e!==s?(i.setValue(e),!0):!1}function Sl(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 n_=/[\n"\\]/g;function Ve(e){return e.replace(n_,function(i){return"\\"+i.charCodeAt(0).toString(16)+" "})}function mu(e,i,s,r,h,d,y,v){e.name="",y!=null&&typeof y!="function"&&typeof y!="symbol"&&typeof y!="boolean"?e.type=y:e.removeAttribute("type"),i!=null?y==="number"?(i===0&&e.value===""||e.value!=i)&&(e.value=""+qe(i)):e.value!==""+qe(i)&&(e.value=""+qe(i)):y!=="submit"&&y!=="reset"||e.removeAttribute("value"),i!=null?gu(e,y,qe(i)):s!=null?gu(e,y,qe(s)):r!=null&&e.removeAttribute("value"),h==null&&d!=null&&(e.defaultChecked=!!d),h!=null&&(e.checked=h&&typeof h!="function"&&typeof h!="symbol"),v!=null&&typeof v!="function"&&typeof v!="symbol"&&typeof v!="boolean"?e.name=""+qe(v):e.removeAttribute("name")}function ef(e,i,s,r,h,d,y,v){if(d!=null&&typeof d!="function"&&typeof d!="symbol"&&typeof d!="boolean"&&(e.type=d),i!=null||s!=null){if(!(d!=="submit"&&d!=="reset"||i!=null)){du(e);return}s=s!=null?""+qe(s):"",i=i!=null?""+qe(i):s,v||i===e.value||(e.value=i),e.defaultValue=i}r=r??h,r=typeof r!="function"&&typeof r!="symbol"&&!!r,e.checked=v?e.checked:!!r,e.defaultChecked=!!r,y!=null&&typeof y!="function"&&typeof y!="symbol"&&typeof y!="boolean"&&(e.name=y),du(e)}function gu(e,i,s){i==="number"&&Sl(e.ownerDocument)===e||e.defaultValue===""+s||(e.defaultValue=""+s)}function ts(e,i,s,r){if(e=e.options,i){i={};for(var h=0;h<s.length;h++)i["$"+s[h]]=!0;for(s=0;s<e.length;s++)h=i.hasOwnProperty("$"+e[s].value),e[s].selected!==h&&(e[s].selected=h),h&&r&&(e[s].defaultSelected=!0)}else{for(s=""+qe(s),i=null,h=0;h<e.length;h++){if(e[h].value===s){e[h].selected=!0,r&&(e[h].defaultSelected=!0);return}i!==null||e[h].disabled||(i=e[h])}i!==null&&(i.selected=!0)}}function nf(e,i,s){if(i!=null&&(i=""+qe(i),i!==e.value&&(e.value=i),s==null)){e.defaultValue!==i&&(e.defaultValue=i);return}e.defaultValue=s!=null?""+qe(s):""}function sf(e,i,s,r){if(i==null){if(r!=null){if(s!=null)throw Error(a(92));if(Tt(r)){if(1<r.length)throw Error(a(93));r=r[0]}s=r}s==null&&(s=""),i=s}s=qe(i),e.defaultValue=s,r=e.textContent,r===s&&r!==""&&r!==null&&(e.value=r),du(e)}function es(e,i){if(i){var s=e.firstChild;if(s&&s===e.lastChild&&s.nodeType===3){s.nodeValue=i;return}}e.textContent=i}var s_=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 af(e,i,s){var r=i.indexOf("--")===0;s==null||typeof s=="boolean"||s===""?r?e.setProperty(i,""):i==="float"?e.cssFloat="":e[i]="":r?e.setProperty(i,s):typeof s!="number"||s===0||s_.has(i)?i==="float"?e.cssFloat=s:e[i]=(""+s).trim():e[i]=s+"px"}function lf(e,i,s){if(i!=null&&typeof i!="object")throw Error(a(62));if(e=e.style,s!=null){for(var r in s)!s.hasOwnProperty(r)||i!=null&&i.hasOwnProperty(r)||(r.indexOf("--")===0?e.setProperty(r,""):r==="float"?e.cssFloat="":e[r]="");for(var h in i)r=i[h],i.hasOwnProperty(h)&&s[h]!==r&&af(e,h,r)}else for(var d in i)i.hasOwnProperty(d)&&af(e,d,i[d])}function pu(e){if(e.indexOf("-")===-1)return!1;switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var a_=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"]]),l_=/^[\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 Tl(e){return l_.test(""+e)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":e}function vi(){}var yu=null;function _u(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var is=null,ns=null;function rf(e){var i=In(e);if(i&&(e=i.stateNode)){var s=e[ve]||null;t:switch(e=i.stateNode,i.type){case"input":if(mu(e,s.value,s.defaultValue,s.defaultValue,s.checked,s.defaultChecked,s.type,s.name),i=s.name,s.type==="radio"&&i!=null){for(s=e;s.parentNode;)s=s.parentNode;for(s=s.querySelectorAll('input[name="'+Ve(""+i)+'"][type="radio"]'),i=0;i<s.length;i++){var r=s[i];if(r!==e&&r.form===e.form){var h=r[ve]||null;if(!h)throw Error(a(90));mu(r,h.value,h.defaultValue,h.defaultValue,h.checked,h.defaultChecked,h.type,h.name)}}for(i=0;i<s.length;i++)r=s[i],r.form===e.form&&tf(r)}break t;case"textarea":nf(e,s.value,s.defaultValue);break t;case"select":i=s.value,i!=null&&ts(e,!!s.multiple,i,!1)}}}var xu=!1;function uf(e,i,s){if(xu)return e(i,s);xu=!0;try{var r=e(i);return r}finally{if(xu=!1,(is!==null||ns!==null)&&(cr(),is&&(i=is,e=ns,ns=is=null,rf(i),e)))for(i=0;i<e.length;i++)rf(e[i])}}function $s(e,i){var s=e.stateNode;if(s===null)return null;var r=s[ve]||null;if(r===null)return null;s=r[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":(r=!r.disabled)||(e=e.type,r=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!r;break t;default:e=!1}if(e)return null;if(s&&typeof s!="function")throw Error(a(231,i,typeof s));return s}var Si=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),bu=!1;if(Si)try{var ta={};Object.defineProperty(ta,"passive",{get:function(){bu=!0}}),window.addEventListener("test",ta,ta),window.removeEventListener("test",ta,ta)}catch{bu=!1}var Wi=null,vu=null,Al=null;function of(){if(Al)return Al;var e,i=vu,s=i.length,r,h="value"in Wi?Wi.value:Wi.textContent,d=h.length;for(e=0;e<s&&i[e]===h[e];e++);var y=s-e;for(r=1;r<=y&&i[s-r]===h[d-r];r++);return Al=h.slice(e,1<r?1-r:void 0)}function Cl(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 Ml(){return!0}function cf(){return!1}function Se(e){function i(s,r,h,d,y){this._reactName=s,this._targetInst=h,this.type=r,this.nativeEvent=d,this.target=y,this.currentTarget=null;for(var v in e)e.hasOwnProperty(v)&&(s=e[v],this[v]=s?s(d):d[v]);return this.isDefaultPrevented=(d.defaultPrevented!=null?d.defaultPrevented:d.returnValue===!1)?Ml:cf,this.isPropagationStopped=cf,this}return _(i.prototype,{preventDefault:function(){this.defaultPrevented=!0;var s=this.nativeEvent;s&&(s.preventDefault?s.preventDefault():typeof s.returnValue!="unknown"&&(s.returnValue=!1),this.isDefaultPrevented=Ml)},stopPropagation:function(){var s=this.nativeEvent;s&&(s.stopPropagation?s.stopPropagation():typeof s.cancelBubble!="unknown"&&(s.cancelBubble=!0),this.isPropagationStopped=Ml)},persist:function(){},isPersistent:Ml}),i}var Tn={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},wl=Se(Tn),ea=_({},Tn,{view:0,detail:0}),r_=Se(ea),Su,Tu,ia,El=_({},ea,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Cu,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!==ia&&(ia&&e.type==="mousemove"?(Su=e.screenX-ia.screenX,Tu=e.screenY-ia.screenY):Tu=Su=0,ia=e),Su)},movementY:function(e){return"movementY"in e?e.movementY:Tu}}),hf=Se(El),u_=_({},El,{dataTransfer:0}),o_=Se(u_),c_=_({},ea,{relatedTarget:0}),Au=Se(c_),h_=_({},Tn,{animationName:0,elapsedTime:0,pseudoElement:0}),f_=Se(h_),d_=_({},Tn,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),m_=Se(d_),g_=_({},Tn,{data:0}),ff=Se(g_),p_={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},y_={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"},__={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function x_(e){var i=this.nativeEvent;return i.getModifierState?i.getModifierState(e):(e=__[e])?!!i[e]:!1}function Cu(){return x_}var b_=_({},ea,{key:function(e){if(e.key){var i=p_[e.key]||e.key;if(i!=="Unidentified")return i}return e.type==="keypress"?(e=Cl(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?y_[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Cu,charCode:function(e){return e.type==="keypress"?Cl(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?Cl(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),v_=Se(b_),S_=_({},El,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),df=Se(S_),T_=_({},ea,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Cu}),A_=Se(T_),C_=_({},Tn,{propertyName:0,elapsedTime:0,pseudoElement:0}),M_=Se(C_),w_=_({},El,{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}),E_=Se(w_),R_=_({},Tn,{newState:0,oldState:0}),z_=Se(R_),D_=[9,13,27,32],Mu=Si&&"CompositionEvent"in window,na=null;Si&&"documentMode"in document&&(na=document.documentMode);var B_=Si&&"TextEvent"in window&&!na,mf=Si&&(!Mu||na&&8<na&&11>=na),gf=" ",pf=!1;function yf(e,i){switch(e){case"keyup":return D_.indexOf(i.keyCode)!==-1;case"keydown":return i.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function _f(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var ss=!1;function O_(e,i){switch(e){case"compositionend":return _f(i);case"keypress":return i.which!==32?null:(pf=!0,gf);case"textInput":return e=i.data,e===gf&&pf?null:e;default:return null}}function G_(e,i){if(ss)return e==="compositionend"||!Mu&&yf(e,i)?(e=of(),Al=vu=Wi=null,ss=!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 mf&&i.locale!=="ko"?null:i.data;default:return null}}var U_={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 xf(e){var i=e&&e.nodeName&&e.nodeName.toLowerCase();return i==="input"?!!U_[e.type]:i==="textarea"}function bf(e,i,s,r){is?ns?ns.push(r):ns=[r]:is=r,i=yr(i,"onChange"),0<i.length&&(s=new wl("onChange","change",null,s,r),e.push({event:s,listeners:i}))}var sa=null,aa=null;function N_(e){ig(e,0)}function Rl(e){var i=Js(e);if(tf(i))return e}function vf(e,i){if(e==="change")return i}var Sf=!1;if(Si){var wu;if(Si){var Eu="oninput"in document;if(!Eu){var Tf=document.createElement("div");Tf.setAttribute("oninput","return;"),Eu=typeof Tf.oninput=="function"}wu=Eu}else wu=!1;Sf=wu&&(!document.documentMode||9<document.documentMode)}function Af(){sa&&(sa.detachEvent("onpropertychange",Cf),aa=sa=null)}function Cf(e){if(e.propertyName==="value"&&Rl(aa)){var i=[];bf(i,aa,e,_u(e)),uf(N_,i)}}function k_(e,i,s){e==="focusin"?(Af(),sa=i,aa=s,sa.attachEvent("onpropertychange",Cf)):e==="focusout"&&Af()}function H_(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return Rl(aa)}function L_(e,i){if(e==="click")return Rl(i)}function Y_(e,i){if(e==="input"||e==="change")return Rl(i)}function j_(e,i){return e===i&&(e!==0||1/e===1/i)||e!==e&&i!==i}var Oe=typeof Object.is=="function"?Object.is:j_;function la(e,i){if(Oe(e,i))return!0;if(typeof e!="object"||e===null||typeof i!="object"||i===null)return!1;var s=Object.keys(e),r=Object.keys(i);if(s.length!==r.length)return!1;for(r=0;r<s.length;r++){var h=s[r];if(!ml.call(i,h)||!Oe(e[h],i[h]))return!1}return!0}function Mf(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function wf(e,i){var s=Mf(e);e=0;for(var r;s;){if(s.nodeType===3){if(r=e+s.textContent.length,e<=i&&r>=i)return{node:s,offset:i-e};e=r}t:{for(;s;){if(s.nextSibling){s=s.nextSibling;break t}s=s.parentNode}s=void 0}s=Mf(s)}}function Ef(e,i){return e&&i?e===i?!0:e&&e.nodeType===3?!1:i&&i.nodeType===3?Ef(e,i.parentNode):"contains"in e?e.contains(i):e.compareDocumentPosition?!!(e.compareDocumentPosition(i)&16):!1:!1}function Rf(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var i=Sl(e.document);i instanceof e.HTMLIFrameElement;){try{var s=typeof i.contentWindow.location.href=="string"}catch{s=!1}if(s)e=i.contentWindow;else break;i=Sl(e.document)}return i}function Ru(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 X_=Si&&"documentMode"in document&&11>=document.documentMode,as=null,zu=null,ra=null,Du=!1;function zf(e,i,s){var r=s.window===s?s.document:s.nodeType===9?s:s.ownerDocument;Du||as==null||as!==Sl(r)||(r=as,"selectionStart"in r&&Ru(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),ra&&la(ra,r)||(ra=r,r=yr(zu,"onSelect"),0<r.length&&(i=new wl("onSelect","select",null,i,s),e.push({event:i,listeners:r}),i.target=as)))}function An(e,i){var s={};return s[e.toLowerCase()]=i.toLowerCase(),s["Webkit"+e]="webkit"+i,s["Moz"+e]="moz"+i,s}var ls={animationend:An("Animation","AnimationEnd"),animationiteration:An("Animation","AnimationIteration"),animationstart:An("Animation","AnimationStart"),transitionrun:An("Transition","TransitionRun"),transitionstart:An("Transition","TransitionStart"),transitioncancel:An("Transition","TransitionCancel"),transitionend:An("Transition","TransitionEnd")},Bu={},Df={};Si&&(Df=document.createElement("div").style,"AnimationEvent"in window||(delete ls.animationend.animation,delete ls.animationiteration.animation,delete ls.animationstart.animation),"TransitionEvent"in window||delete ls.transitionend.transition);function Cn(e){if(Bu[e])return Bu[e];if(!ls[e])return e;var i=ls[e],s;for(s in i)if(i.hasOwnProperty(s)&&s in Df)return Bu[e]=i[s];return e}var Bf=Cn("animationend"),Of=Cn("animationiteration"),Gf=Cn("animationstart"),q_=Cn("transitionrun"),V_=Cn("transitionstart"),P_=Cn("transitioncancel"),Uf=Cn("transitionend"),Nf=new Map,Ou="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(" ");Ou.push("scrollEnd");function ri(e,i){Nf.set(e,i),Sn(i,[e])}var zl=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)},Pe=[],rs=0,Gu=0;function Dl(){for(var e=rs,i=Gu=rs=0;i<e;){var s=Pe[i];Pe[i++]=null;var r=Pe[i];Pe[i++]=null;var h=Pe[i];Pe[i++]=null;var d=Pe[i];if(Pe[i++]=null,r!==null&&h!==null){var y=r.pending;y===null?h.next=h:(h.next=y.next,y.next=h),r.pending=h}d!==0&&kf(s,h,d)}}function Bl(e,i,s,r){Pe[rs++]=e,Pe[rs++]=i,Pe[rs++]=s,Pe[rs++]=r,Gu|=r,e.lanes|=r,e=e.alternate,e!==null&&(e.lanes|=r)}function Uu(e,i,s,r){return Bl(e,i,s,r),Ol(e)}function Mn(e,i){return Bl(e,null,null,i),Ol(e)}function kf(e,i,s){e.lanes|=s;var r=e.alternate;r!==null&&(r.lanes|=s);for(var h=!1,d=e.return;d!==null;)d.childLanes|=s,r=d.alternate,r!==null&&(r.childLanes|=s),d.tag===22&&(e=d.stateNode,e===null||e._visibility&1||(h=!0)),e=d,d=d.return;return e.tag===3?(d=e.stateNode,h&&i!==null&&(h=31-Be(s),e=d.hiddenUpdates,r=e[h],r===null?e[h]=[i]:r.push(i),i.lane=s|536870912),d):null}function Ol(e){if(50<Ra)throw Ra=0,Po=null,Error(a(185));for(var i=e.return;i!==null;)e=i,i=e.return;return e.tag===3?e.stateNode:null}var us={};function F_(e,i,s,r){this.tag=e,this.key=s,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=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Ge(e,i,s,r){return new F_(e,i,s,r)}function Nu(e){return e=e.prototype,!(!e||!e.isReactComponent)}function Ti(e,i){var s=e.alternate;return s===null?(s=Ge(e.tag,i,e.key,e.mode),s.elementType=e.elementType,s.type=e.type,s.stateNode=e.stateNode,s.alternate=e,e.alternate=s):(s.pendingProps=i,s.type=e.type,s.flags=0,s.subtreeFlags=0,s.deletions=null),s.flags=e.flags&65011712,s.childLanes=e.childLanes,s.lanes=e.lanes,s.child=e.child,s.memoizedProps=e.memoizedProps,s.memoizedState=e.memoizedState,s.updateQueue=e.updateQueue,i=e.dependencies,s.dependencies=i===null?null:{lanes:i.lanes,firstContext:i.firstContext},s.sibling=e.sibling,s.index=e.index,s.ref=e.ref,s.refCleanup=e.refCleanup,s}function Hf(e,i){e.flags&=65011714;var s=e.alternate;return s===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=s.childLanes,e.lanes=s.lanes,e.child=s.child,e.subtreeFlags=0,e.deletions=null,e.memoizedProps=s.memoizedProps,e.memoizedState=s.memoizedState,e.updateQueue=s.updateQueue,e.type=s.type,i=s.dependencies,e.dependencies=i===null?null:{lanes:i.lanes,firstContext:i.firstContext}),e}function Gl(e,i,s,r,h,d){var y=0;if(r=e,typeof e=="function")Nu(e)&&(y=1);else if(typeof e=="string")y=Ix(e,s,I.current)?26:e==="html"||e==="head"||e==="body"?27:5;else t:switch(e){case Q:return e=Ge(31,s,i,h),e.elementType=Q,e.lanes=d,e;case A:return wn(s.children,h,d,i);case T:y=8,h|=24;break;case M:return e=Ge(12,s,i,h|2),e.elementType=M,e.lanes=d,e;case F:return e=Ge(13,s,i,h),e.elementType=F,e.lanes=d,e;case k:return e=Ge(19,s,i,h),e.elementType=k,e.lanes=d,e;default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case B:y=10;break t;case z:y=9;break t;case O:y=11;break t;case G:y=14;break t;case $:y=16,r=null;break t}y=29,s=Error(a(130,e===null?"null":typeof e,"")),r=null}return i=Ge(y,s,i,h),i.elementType=e,i.type=r,i.lanes=d,i}function wn(e,i,s,r){return e=Ge(7,e,r,i),e.lanes=s,e}function ku(e,i,s){return e=Ge(6,e,null,i),e.lanes=s,e}function Lf(e){var i=Ge(18,null,null,0);return i.stateNode=e,i}function Hu(e,i,s){return i=Ge(4,e.children!==null?e.children:[],e.key,i),i.lanes=s,i.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},i}var Yf=new WeakMap;function Fe(e,i){if(typeof e=="object"&&e!==null){var s=Yf.get(e);return s!==void 0?s:(i={value:e,source:i,stack:dl(i)},Yf.set(e,i),i)}return{value:e,source:i,stack:dl(i)}}var os=[],cs=0,Ul=null,ua=0,Qe=[],Ze=0,Ki=null,di=1,mi="";function Ai(e,i){os[cs++]=ua,os[cs++]=Ul,Ul=e,ua=i}function jf(e,i,s){Qe[Ze++]=di,Qe[Ze++]=mi,Qe[Ze++]=Ki,Ki=e;var r=di;e=mi;var h=32-Be(r)-1;r&=~(1<<h),s+=1;var d=32-Be(i)+h;if(30<d){var y=h-h%5;d=(r&(1<<y)-1).toString(32),r>>=y,h-=y,di=1<<32-Be(i)+h|s<<h|r,mi=d+e}else di=1<<d|s<<h|r,mi=e}function Lu(e){e.return!==null&&(Ai(e,1),jf(e,1,0))}function Yu(e){for(;e===Ul;)Ul=os[--cs],os[cs]=null,ua=os[--cs],os[cs]=null;for(;e===Ki;)Ki=Qe[--Ze],Qe[Ze]=null,mi=Qe[--Ze],Qe[Ze]=null,di=Qe[--Ze],Qe[Ze]=null}function Xf(e,i){Qe[Ze++]=di,Qe[Ze++]=mi,Qe[Ze++]=Ki,di=i.id,mi=i.overflow,Ki=e}var ue=null,Lt=null,St=!1,Ii=null,We=!1,ju=Error(a(519));function Ji(e){var i=Error(a(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw oa(Fe(i,e)),ju}function qf(e){var i=e.stateNode,s=e.type,r=e.memoizedProps;switch(i[re]=e,i[ve]=r,s){case"dialog":_t("cancel",i),_t("close",i);break;case"iframe":case"object":case"embed":_t("load",i);break;case"video":case"audio":for(s=0;s<Da.length;s++)_t(Da[s],i);break;case"source":_t("error",i);break;case"img":case"image":case"link":_t("error",i),_t("load",i);break;case"details":_t("toggle",i);break;case"input":_t("invalid",i),ef(i,r.value,r.defaultValue,r.checked,r.defaultChecked,r.type,r.name,!0);break;case"select":_t("invalid",i);break;case"textarea":_t("invalid",i),sf(i,r.value,r.defaultValue,r.children)}s=r.children,typeof s!="string"&&typeof s!="number"&&typeof s!="bigint"||i.textContent===""+s||r.suppressHydrationWarning===!0||lg(i.textContent,s)?(r.popover!=null&&(_t("beforetoggle",i),_t("toggle",i)),r.onScroll!=null&&_t("scroll",i),r.onScrollEnd!=null&&_t("scrollend",i),r.onClick!=null&&(i.onclick=vi),i=!0):i=!1,i||Ji(e,!0)}function Vf(e){for(ue=e.return;ue;)switch(ue.tag){case 5:case 31:case 13:We=!1;return;case 27:case 3:We=!0;return;default:ue=ue.return}}function hs(e){if(e!==ue)return!1;if(!St)return Vf(e),St=!0,!1;var i=e.tag,s;if((s=i!==3&&i!==27)&&((s=i===5)&&(s=e.type,s=!(s!=="form"&&s!=="button")||lc(e.type,e.memoizedProps)),s=!s),s&&Lt&&Ji(e),Vf(e),i===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(a(317));Lt=gg(e)}else if(i===31){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(a(317));Lt=gg(e)}else i===27?(i=Lt,dn(e.type)?(e=hc,hc=null,Lt=e):Lt=i):Lt=ue?Ie(e.stateNode.nextSibling):null;return!0}function En(){Lt=ue=null,St=!1}function Xu(){var e=Ii;return e!==null&&(Me===null?Me=e:Me.push.apply(Me,e),Ii=null),e}function oa(e){Ii===null?Ii=[e]:Ii.push(e)}var qu=w(null),Rn=null,Ci=null;function $i(e,i,s){P(qu,i._currentValue),i._currentValue=s}function Mi(e){e._currentValue=qu.current,j(qu)}function Vu(e,i,s){for(;e!==null;){var r=e.alternate;if((e.childLanes&i)!==i?(e.childLanes|=i,r!==null&&(r.childLanes|=i)):r!==null&&(r.childLanes&i)!==i&&(r.childLanes|=i),e===s)break;e=e.return}}function Pu(e,i,s,r){var h=e.child;for(h!==null&&(h.return=e);h!==null;){var d=h.dependencies;if(d!==null){var y=h.child;d=d.firstContext;t:for(;d!==null;){var v=d;d=h;for(var C=0;C<i.length;C++)if(v.context===i[C]){d.lanes|=s,v=d.alternate,v!==null&&(v.lanes|=s),Vu(d.return,s,e),r||(y=null);break t}d=v.next}}else if(h.tag===18){if(y=h.return,y===null)throw Error(a(341));y.lanes|=s,d=y.alternate,d!==null&&(d.lanes|=s),Vu(y,s,e),y=null}else y=h.child;if(y!==null)y.return=h;else for(y=h;y!==null;){if(y===e){y=null;break}if(h=y.sibling,h!==null){h.return=y.return,y=h;break}y=y.return}h=y}}function fs(e,i,s,r){e=null;for(var h=i,d=!1;h!==null;){if(!d){if((h.flags&524288)!==0)d=!0;else if((h.flags&262144)!==0)break}if(h.tag===10){var y=h.alternate;if(y===null)throw Error(a(387));if(y=y.memoizedProps,y!==null){var v=h.type;Oe(h.pendingProps.value,y.value)||(e!==null?e.push(v):e=[v])}}else if(h===ft.current){if(y=h.alternate,y===null)throw Error(a(387));y.memoizedState.memoizedState!==h.memoizedState.memoizedState&&(e!==null?e.push(Na):e=[Na])}h=h.return}e!==null&&Pu(i,e,s,r),i.flags|=262144}function Nl(e){for(e=e.firstContext;e!==null;){if(!Oe(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function zn(e){Rn=e,Ci=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function oe(e){return Pf(Rn,e)}function kl(e,i){return Rn===null&&zn(e),Pf(e,i)}function Pf(e,i){var s=i._currentValue;if(i={context:i,memoizedValue:s,next:null},Ci===null){if(e===null)throw Error(a(308));Ci=i,e.dependencies={lanes:0,firstContext:i},e.flags|=524288}else Ci=Ci.next=i;return s}var Q_=typeof AbortController<"u"?AbortController:function(){var e=[],i=this.signal={aborted:!1,addEventListener:function(s,r){e.push(r)}};this.abort=function(){i.aborted=!0,e.forEach(function(s){return s()})}},Z_=l.unstable_scheduleCallback,W_=l.unstable_NormalPriority,Jt={$$typeof:B,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Fu(){return{controller:new Q_,data:new Map,refCount:0}}function ca(e){e.refCount--,e.refCount===0&&Z_(W_,function(){e.controller.abort()})}var ha=null,Qu=0,ds=0,ms=null;function K_(e,i){if(ha===null){var s=ha=[];Qu=0,ds=Io(),ms={status:"pending",value:void 0,then:function(r){s.push(r)}}}return Qu++,i.then(Ff,Ff),i}function Ff(){if(--Qu===0&&ha!==null){ms!==null&&(ms.status="fulfilled");var e=ha;ha=null,ds=0,ms=null;for(var i=0;i<e.length;i++)(0,e[i])()}}function I_(e,i){var s=[],r={status:"pending",value:null,reason:null,then:function(h){s.push(h)}};return e.then(function(){r.status="fulfilled",r.value=i;for(var h=0;h<s.length;h++)(0,s[h])(i)},function(h){for(r.status="rejected",r.reason=h,h=0;h<s.length;h++)(0,s[h])(void 0)}),r}var Qf=R.S;R.S=function(e,i){zm=ze(),typeof i=="object"&&i!==null&&typeof i.then=="function"&&K_(e,i),Qf!==null&&Qf(e,i)};var Dn=w(null);function Zu(){var e=Dn.current;return e!==null?e:Nt.pooledCache}function Hl(e,i){i===null?P(Dn,Dn.current):P(Dn,i.pool)}function Zf(){var e=Zu();return e===null?null:{parent:Jt._currentValue,pool:e}}var gs=Error(a(460)),Wu=Error(a(474)),Ll=Error(a(542)),Yl={then:function(){}};function Wf(e){return e=e.status,e==="fulfilled"||e==="rejected"}function Kf(e,i,s){switch(s=e[s],s===void 0?e.push(i):s!==i&&(i.then(vi,vi),i=s),i.status){case"fulfilled":return i.value;case"rejected":throw e=i.reason,Jf(e),e;default:if(typeof i.status=="string")i.then(vi,vi);else{if(e=Nt,e!==null&&100<e.shellSuspendCounter)throw Error(a(482));e=i,e.status="pending",e.then(function(r){if(i.status==="pending"){var h=i;h.status="fulfilled",h.value=r}},function(r){if(i.status==="pending"){var h=i;h.status="rejected",h.reason=r}})}switch(i.status){case"fulfilled":return i.value;case"rejected":throw e=i.reason,Jf(e),e}throw On=i,gs}}function Bn(e){try{var i=e._init;return i(e._payload)}catch(s){throw s!==null&&typeof s=="object"&&typeof s.then=="function"?(On=s,gs):s}}var On=null;function If(){if(On===null)throw Error(a(459));var e=On;return On=null,e}function Jf(e){if(e===gs||e===Ll)throw Error(a(483))}var ps=null,fa=0;function jl(e){var i=fa;return fa+=1,ps===null&&(ps=[]),Kf(ps,e,i)}function da(e,i){i=i.props.ref,e.ref=i!==void 0?i:null}function Xl(e,i){throw i.$$typeof===b?Error(a(525)):(e=Object.prototype.toString.call(i),Error(a(31,e==="[object Object]"?"object with keys {"+Object.keys(i).join(", ")+"}":e)))}function $f(e){function i(D,E){if(e){var U=D.deletions;U===null?(D.deletions=[E],D.flags|=16):U.push(E)}}function s(D,E){if(!e)return null;for(;E!==null;)i(D,E),E=E.sibling;return null}function r(D){for(var E=new Map;D!==null;)D.key!==null?E.set(D.key,D):E.set(D.index,D),D=D.sibling;return E}function h(D,E){return D=Ti(D,E),D.index=0,D.sibling=null,D}function d(D,E,U){return D.index=U,e?(U=D.alternate,U!==null?(U=U.index,U<E?(D.flags|=67108866,E):U):(D.flags|=67108866,E)):(D.flags|=1048576,E)}function y(D){return e&&D.alternate===null&&(D.flags|=67108866),D}function v(D,E,U,q){return E===null||E.tag!==6?(E=ku(U,D.mode,q),E.return=D,E):(E=h(E,U),E.return=D,E)}function C(D,E,U,q){var ut=U.type;return ut===A?X(D,E,U.props.children,q,U.key):E!==null&&(E.elementType===ut||typeof ut=="object"&&ut!==null&&ut.$$typeof===$&&Bn(ut)===E.type)?(E=h(E,U.props),da(E,U),E.return=D,E):(E=Gl(U.type,U.key,U.props,null,D.mode,q),da(E,U),E.return=D,E)}function N(D,E,U,q){return E===null||E.tag!==4||E.stateNode.containerInfo!==U.containerInfo||E.stateNode.implementation!==U.implementation?(E=Hu(U,D.mode,q),E.return=D,E):(E=h(E,U.children||[]),E.return=D,E)}function X(D,E,U,q,ut){return E===null||E.tag!==7?(E=wn(U,D.mode,q,ut),E.return=D,E):(E=h(E,U),E.return=D,E)}function V(D,E,U){if(typeof E=="string"&&E!==""||typeof E=="number"||typeof E=="bigint")return E=ku(""+E,D.mode,U),E.return=D,E;if(typeof E=="object"&&E!==null){switch(E.$$typeof){case x:return U=Gl(E.type,E.key,E.props,null,D.mode,U),da(U,E),U.return=D,U;case S:return E=Hu(E,D.mode,U),E.return=D,E;case $:return E=Bn(E),V(D,E,U)}if(Tt(E)||J(E))return E=wn(E,D.mode,U,null),E.return=D,E;if(typeof E.then=="function")return V(D,jl(E),U);if(E.$$typeof===B)return V(D,kl(D,E),U);Xl(D,E)}return null}function H(D,E,U,q){var ut=E!==null?E.key:null;if(typeof U=="string"&&U!==""||typeof U=="number"||typeof U=="bigint")return ut!==null?null:v(D,E,""+U,q);if(typeof U=="object"&&U!==null){switch(U.$$typeof){case x:return U.key===ut?C(D,E,U,q):null;case S:return U.key===ut?N(D,E,U,q):null;case $:return U=Bn(U),H(D,E,U,q)}if(Tt(U)||J(U))return ut!==null?null:X(D,E,U,q,null);if(typeof U.then=="function")return H(D,E,jl(U),q);if(U.$$typeof===B)return H(D,E,kl(D,U),q);Xl(D,U)}return null}function Y(D,E,U,q,ut){if(typeof q=="string"&&q!==""||typeof q=="number"||typeof q=="bigint")return D=D.get(U)||null,v(E,D,""+q,ut);if(typeof q=="object"&&q!==null){switch(q.$$typeof){case x:return D=D.get(q.key===null?U:q.key)||null,C(E,D,q,ut);case S:return D=D.get(q.key===null?U:q.key)||null,N(E,D,q,ut);case $:return q=Bn(q),Y(D,E,U,q,ut)}if(Tt(q)||J(q))return D=D.get(U)||null,X(E,D,q,ut,null);if(typeof q.then=="function")return Y(D,E,U,jl(q),ut);if(q.$$typeof===B)return Y(D,E,U,kl(E,q),ut);Xl(E,q)}return null}function st(D,E,U,q){for(var ut=null,Ct=null,lt=E,gt=E=0,bt=null;lt!==null&&gt<U.length;gt++){lt.index>gt?(bt=lt,lt=null):bt=lt.sibling;var Mt=H(D,lt,U[gt],q);if(Mt===null){lt===null&&(lt=bt);break}e&&lt&&Mt.alternate===null&&i(D,lt),E=d(Mt,E,gt),Ct===null?ut=Mt:Ct.sibling=Mt,Ct=Mt,lt=bt}if(gt===U.length)return s(D,lt),St&&Ai(D,gt),ut;if(lt===null){for(;gt<U.length;gt++)lt=V(D,U[gt],q),lt!==null&&(E=d(lt,E,gt),Ct===null?ut=lt:Ct.sibling=lt,Ct=lt);return St&&Ai(D,gt),ut}for(lt=r(lt);gt<U.length;gt++)bt=Y(lt,D,gt,U[gt],q),bt!==null&&(e&&bt.alternate!==null&&lt.delete(bt.key===null?gt:bt.key),E=d(bt,E,gt),Ct===null?ut=bt:Ct.sibling=bt,Ct=bt);return e&&lt.forEach(function(_n){return i(D,_n)}),St&&Ai(D,gt),ut}function ot(D,E,U,q){if(U==null)throw Error(a(151));for(var ut=null,Ct=null,lt=E,gt=E=0,bt=null,Mt=U.next();lt!==null&&!Mt.done;gt++,Mt=U.next()){lt.index>gt?(bt=lt,lt=null):bt=lt.sibling;var _n=H(D,lt,Mt.value,q);if(_n===null){lt===null&&(lt=bt);break}e&&lt&&_n.alternate===null&&i(D,lt),E=d(_n,E,gt),Ct===null?ut=_n:Ct.sibling=_n,Ct=_n,lt=bt}if(Mt.done)return s(D,lt),St&&Ai(D,gt),ut;if(lt===null){for(;!Mt.done;gt++,Mt=U.next())Mt=V(D,Mt.value,q),Mt!==null&&(E=d(Mt,E,gt),Ct===null?ut=Mt:Ct.sibling=Mt,Ct=Mt);return St&&Ai(D,gt),ut}for(lt=r(lt);!Mt.done;gt++,Mt=U.next())Mt=Y(lt,D,gt,Mt.value,q),Mt!==null&&(e&&Mt.alternate!==null&&lt.delete(Mt.key===null?gt:Mt.key),E=d(Mt,E,gt),Ct===null?ut=Mt:Ct.sibling=Mt,Ct=Mt);return e&&lt.forEach(function(ub){return i(D,ub)}),St&&Ai(D,gt),ut}function Gt(D,E,U,q){if(typeof U=="object"&&U!==null&&U.type===A&&U.key===null&&(U=U.props.children),typeof U=="object"&&U!==null){switch(U.$$typeof){case x:t:{for(var ut=U.key;E!==null;){if(E.key===ut){if(ut=U.type,ut===A){if(E.tag===7){s(D,E.sibling),q=h(E,U.props.children),q.return=D,D=q;break t}}else if(E.elementType===ut||typeof ut=="object"&&ut!==null&&ut.$$typeof===$&&Bn(ut)===E.type){s(D,E.sibling),q=h(E,U.props),da(q,U),q.return=D,D=q;break t}s(D,E);break}else i(D,E);E=E.sibling}U.type===A?(q=wn(U.props.children,D.mode,q,U.key),q.return=D,D=q):(q=Gl(U.type,U.key,U.props,null,D.mode,q),da(q,U),q.return=D,D=q)}return y(D);case S:t:{for(ut=U.key;E!==null;){if(E.key===ut)if(E.tag===4&&E.stateNode.containerInfo===U.containerInfo&&E.stateNode.implementation===U.implementation){s(D,E.sibling),q=h(E,U.children||[]),q.return=D,D=q;break t}else{s(D,E);break}else i(D,E);E=E.sibling}q=Hu(U,D.mode,q),q.return=D,D=q}return y(D);case $:return U=Bn(U),Gt(D,E,U,q)}if(Tt(U))return st(D,E,U,q);if(J(U)){if(ut=J(U),typeof ut!="function")throw Error(a(150));return U=ut.call(U),ot(D,E,U,q)}if(typeof U.then=="function")return Gt(D,E,jl(U),q);if(U.$$typeof===B)return Gt(D,E,kl(D,U),q);Xl(D,U)}return typeof U=="string"&&U!==""||typeof U=="number"||typeof U=="bigint"?(U=""+U,E!==null&&E.tag===6?(s(D,E.sibling),q=h(E,U),q.return=D,D=q):(s(D,E),q=ku(U,D.mode,q),q.return=D,D=q),y(D)):s(D,E)}return function(D,E,U,q){try{fa=0;var ut=Gt(D,E,U,q);return ps=null,ut}catch(lt){if(lt===gs||lt===Ll)throw lt;var Ct=Ge(29,lt,null,D.mode);return Ct.lanes=q,Ct.return=D,Ct}finally{}}}var Gn=$f(!0),td=$f(!1),tn=!1;function Ku(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Iu(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 en(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function nn(e,i,s){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,(Et&2)!==0){var h=r.pending;return h===null?i.next=i:(i.next=h.next,h.next=i),r.pending=i,i=Ol(e),kf(e,null,s),i}return Bl(e,r,i,s),Ol(e)}function ma(e,i,s){if(i=i.updateQueue,i!==null&&(i=i.shared,(s&4194048)!==0)){var r=i.lanes;r&=e.pendingLanes,s|=r,i.lanes=s,Vh(e,s)}}function Ju(e,i){var s=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,s===r)){var h=null,d=null;if(s=s.firstBaseUpdate,s!==null){do{var y={lane:s.lane,tag:s.tag,payload:s.payload,callback:null,next:null};d===null?h=d=y:d=d.next=y,s=s.next}while(s!==null);d===null?h=d=i:d=d.next=i}else h=d=i;s={baseState:r.baseState,firstBaseUpdate:h,lastBaseUpdate:d,shared:r.shared,callbacks:r.callbacks},e.updateQueue=s;return}e=s.lastBaseUpdate,e===null?s.firstBaseUpdate=i:e.next=i,s.lastBaseUpdate=i}var $u=!1;function ga(){if($u){var e=ms;if(e!==null)throw e}}function pa(e,i,s,r){$u=!1;var h=e.updateQueue;tn=!1;var d=h.firstBaseUpdate,y=h.lastBaseUpdate,v=h.shared.pending;if(v!==null){h.shared.pending=null;var C=v,N=C.next;C.next=null,y===null?d=N:y.next=N,y=C;var X=e.alternate;X!==null&&(X=X.updateQueue,v=X.lastBaseUpdate,v!==y&&(v===null?X.firstBaseUpdate=N:v.next=N,X.lastBaseUpdate=C))}if(d!==null){var V=h.baseState;y=0,X=N=C=null,v=d;do{var H=v.lane&-536870913,Y=H!==v.lane;if(Y?(xt&H)===H:(r&H)===H){H!==0&&H===ds&&($u=!0),X!==null&&(X=X.next={lane:0,tag:v.tag,payload:v.payload,callback:null,next:null});t:{var st=e,ot=v;H=i;var Gt=s;switch(ot.tag){case 1:if(st=ot.payload,typeof st=="function"){V=st.call(Gt,V,H);break t}V=st;break t;case 3:st.flags=st.flags&-65537|128;case 0:if(st=ot.payload,H=typeof st=="function"?st.call(Gt,V,H):st,H==null)break t;V=_({},V,H);break t;case 2:tn=!0}}H=v.callback,H!==null&&(e.flags|=64,Y&&(e.flags|=8192),Y=h.callbacks,Y===null?h.callbacks=[H]:Y.push(H))}else Y={lane:H,tag:v.tag,payload:v.payload,callback:v.callback,next:null},X===null?(N=X=Y,C=V):X=X.next=Y,y|=H;if(v=v.next,v===null){if(v=h.shared.pending,v===null)break;Y=v,v=Y.next,Y.next=null,h.lastBaseUpdate=Y,h.shared.pending=null}}while(!0);X===null&&(C=V),h.baseState=C,h.firstBaseUpdate=N,h.lastBaseUpdate=X,d===null&&(h.shared.lanes=0),un|=y,e.lanes=y,e.memoizedState=V}}function ed(e,i){if(typeof e!="function")throw Error(a(191,e));e.call(i)}function id(e,i){var s=e.callbacks;if(s!==null)for(e.callbacks=null,e=0;e<s.length;e++)ed(s[e],i)}var ys=w(null),ql=w(0);function nd(e,i){e=Ui,P(ql,e),P(ys,i),Ui=e|i.baseLanes}function to(){P(ql,Ui),P(ys,ys.current)}function eo(){Ui=ql.current,j(ys),j(ql)}var Ue=w(null),Ke=null;function sn(e){var i=e.alternate;P(Zt,Zt.current&1),P(Ue,e),Ke===null&&(i===null||ys.current!==null||i.memoizedState!==null)&&(Ke=e)}function io(e){P(Zt,Zt.current),P(Ue,e),Ke===null&&(Ke=e)}function sd(e){e.tag===22?(P(Zt,Zt.current),P(Ue,e),Ke===null&&(Ke=e)):an()}function an(){P(Zt,Zt.current),P(Ue,Ue.current)}function Ne(e){j(Ue),Ke===e&&(Ke=null),j(Zt)}var Zt=w(0);function Vl(e){for(var i=e;i!==null;){if(i.tag===13){var s=i.memoizedState;if(s!==null&&(s=s.dehydrated,s===null||oc(s)||cc(s)))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 wi=0,mt=null,Bt=null,$t=null,Pl=!1,_s=!1,Un=!1,Fl=0,ya=0,xs=null,J_=0;function qt(){throw Error(a(321))}function no(e,i){if(i===null)return!1;for(var s=0;s<i.length&&s<e.length;s++)if(!Oe(e[s],i[s]))return!1;return!0}function so(e,i,s,r,h,d){return wi=d,mt=i,i.memoizedState=null,i.updateQueue=null,i.lanes=0,R.H=e===null||e.memoizedState===null?jd:bo,Un=!1,d=s(r,h),Un=!1,_s&&(d=ld(i,s,r,h)),ad(e),d}function ad(e){R.H=ba;var i=Bt!==null&&Bt.next!==null;if(wi=0,$t=Bt=mt=null,Pl=!1,ya=0,xs=null,i)throw Error(a(300));e===null||te||(e=e.dependencies,e!==null&&Nl(e)&&(te=!0))}function ld(e,i,s,r){mt=e;var h=0;do{if(_s&&(xs=null),ya=0,_s=!1,25<=h)throw Error(a(301));if(h+=1,$t=Bt=null,e.updateQueue!=null){var d=e.updateQueue;d.lastEffect=null,d.events=null,d.stores=null,d.memoCache!=null&&(d.memoCache.index=0)}R.H=Xd,d=i(s,r)}while(_s);return d}function $_(){var e=R.H,i=e.useState()[0];return i=typeof i.then=="function"?_a(i):i,e=e.useState()[0],(Bt!==null?Bt.memoizedState:null)!==e&&(mt.flags|=1024),i}function ao(){var e=Fl!==0;return Fl=0,e}function lo(e,i,s){i.updateQueue=e.updateQueue,i.flags&=-2053,e.lanes&=~s}function ro(e){if(Pl){for(e=e.memoizedState;e!==null;){var i=e.queue;i!==null&&(i.pending=null),e=e.next}Pl=!1}wi=0,$t=Bt=mt=null,_s=!1,ya=Fl=0,xs=null}function ye(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return $t===null?mt.memoizedState=$t=e:$t=$t.next=e,$t}function Wt(){if(Bt===null){var e=mt.alternate;e=e!==null?e.memoizedState:null}else e=Bt.next;var i=$t===null?mt.memoizedState:$t.next;if(i!==null)$t=i,Bt=e;else{if(e===null)throw mt.alternate===null?Error(a(467)):Error(a(310));Bt=e,e={memoizedState:Bt.memoizedState,baseState:Bt.baseState,baseQueue:Bt.baseQueue,queue:Bt.queue,next:null},$t===null?mt.memoizedState=$t=e:$t=$t.next=e}return $t}function Ql(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function _a(e){var i=ya;return ya+=1,xs===null&&(xs=[]),e=Kf(xs,e,i),i=mt,($t===null?i.memoizedState:$t.next)===null&&(i=i.alternate,R.H=i===null||i.memoizedState===null?jd:bo),e}function Zl(e){if(e!==null&&typeof e=="object"){if(typeof e.then=="function")return _a(e);if(e.$$typeof===B)return oe(e)}throw Error(a(438,String(e)))}function uo(e){var i=null,s=mt.updateQueue;if(s!==null&&(i=s.memoCache),i==null){var r=mt.alternate;r!==null&&(r=r.updateQueue,r!==null&&(r=r.memoCache,r!=null&&(i={data:r.data.map(function(h){return h.slice()}),index:0})))}if(i==null&&(i={data:[],index:0}),s===null&&(s=Ql(),mt.updateQueue=s),s.memoCache=i,s=i.data[i.index],s===void 0)for(s=i.data[i.index]=Array(e),r=0;r<e;r++)s[r]=Z;return i.index++,s}function Ei(e,i){return typeof i=="function"?i(e):i}function Wl(e){var i=Wt();return oo(i,Bt,e)}function oo(e,i,s){var r=e.queue;if(r===null)throw Error(a(311));r.lastRenderedReducer=s;var h=e.baseQueue,d=r.pending;if(d!==null){if(h!==null){var y=h.next;h.next=d.next,d.next=y}i.baseQueue=h=d,r.pending=null}if(d=e.baseState,h===null)e.memoizedState=d;else{i=h.next;var v=y=null,C=null,N=i,X=!1;do{var V=N.lane&-536870913;if(V!==N.lane?(xt&V)===V:(wi&V)===V){var H=N.revertLane;if(H===0)C!==null&&(C=C.next={lane:0,revertLane:0,gesture:null,action:N.action,hasEagerState:N.hasEagerState,eagerState:N.eagerState,next:null}),V===ds&&(X=!0);else if((wi&H)===H){N=N.next,H===ds&&(X=!0);continue}else V={lane:0,revertLane:N.revertLane,gesture:null,action:N.action,hasEagerState:N.hasEagerState,eagerState:N.eagerState,next:null},C===null?(v=C=V,y=d):C=C.next=V,mt.lanes|=H,un|=H;V=N.action,Un&&s(d,V),d=N.hasEagerState?N.eagerState:s(d,V)}else H={lane:V,revertLane:N.revertLane,gesture:N.gesture,action:N.action,hasEagerState:N.hasEagerState,eagerState:N.eagerState,next:null},C===null?(v=C=H,y=d):C=C.next=H,mt.lanes|=V,un|=V;N=N.next}while(N!==null&&N!==i);if(C===null?y=d:C.next=v,!Oe(d,e.memoizedState)&&(te=!0,X&&(s=ms,s!==null)))throw s;e.memoizedState=d,e.baseState=y,e.baseQueue=C,r.lastRenderedState=d}return h===null&&(r.lanes=0),[e.memoizedState,r.dispatch]}function co(e){var i=Wt(),s=i.queue;if(s===null)throw Error(a(311));s.lastRenderedReducer=e;var r=s.dispatch,h=s.pending,d=i.memoizedState;if(h!==null){s.pending=null;var y=h=h.next;do d=e(d,y.action),y=y.next;while(y!==h);Oe(d,i.memoizedState)||(te=!0),i.memoizedState=d,i.baseQueue===null&&(i.baseState=d),s.lastRenderedState=d}return[d,r]}function rd(e,i,s){var r=mt,h=Wt(),d=St;if(d){if(s===void 0)throw Error(a(407));s=s()}else s=i();var y=!Oe((Bt||h).memoizedState,s);if(y&&(h.memoizedState=s,te=!0),h=h.queue,mo(cd.bind(null,r,h,e),[e]),h.getSnapshot!==i||y||$t!==null&&$t.memoizedState.tag&1){if(r.flags|=2048,bs(9,{destroy:void 0},od.bind(null,r,h,s,i),null),Nt===null)throw Error(a(349));d||(wi&127)!==0||ud(r,i,s)}return s}function ud(e,i,s){e.flags|=16384,e={getSnapshot:i,value:s},i=mt.updateQueue,i===null?(i=Ql(),mt.updateQueue=i,i.stores=[e]):(s=i.stores,s===null?i.stores=[e]:s.push(e))}function od(e,i,s,r){i.value=s,i.getSnapshot=r,hd(i)&&fd(e)}function cd(e,i,s){return s(function(){hd(i)&&fd(e)})}function hd(e){var i=e.getSnapshot;e=e.value;try{var s=i();return!Oe(e,s)}catch{return!0}}function fd(e){var i=Mn(e,2);i!==null&&we(i,e,2)}function ho(e){var i=ye();if(typeof e=="function"){var s=e;if(e=s(),Un){Qi(!0);try{s()}finally{Qi(!1)}}}return i.memoizedState=i.baseState=e,i.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Ei,lastRenderedState:e},i}function dd(e,i,s,r){return e.baseState=s,oo(e,Bt,typeof r=="function"?r:Ei)}function tx(e,i,s,r,h){if(Jl(e))throw Error(a(485));if(e=i.action,e!==null){var d={payload:h,action:e,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(y){d.listeners.push(y)}};R.T!==null?s(!0):d.isTransition=!1,r(d),s=i.pending,s===null?(d.next=i.pending=d,md(i,d)):(d.next=s.next,i.pending=s.next=d)}}function md(e,i){var s=i.action,r=i.payload,h=e.state;if(i.isTransition){var d=R.T,y={};R.T=y;try{var v=s(h,r),C=R.S;C!==null&&C(y,v),gd(e,i,v)}catch(N){fo(e,i,N)}finally{d!==null&&y.types!==null&&(d.types=y.types),R.T=d}}else try{d=s(h,r),gd(e,i,d)}catch(N){fo(e,i,N)}}function gd(e,i,s){s!==null&&typeof s=="object"&&typeof s.then=="function"?s.then(function(r){pd(e,i,r)},function(r){return fo(e,i,r)}):pd(e,i,s)}function pd(e,i,s){i.status="fulfilled",i.value=s,yd(i),e.state=s,i=e.pending,i!==null&&(s=i.next,s===i?e.pending=null:(s=s.next,i.next=s,md(e,s)))}function fo(e,i,s){var r=e.pending;if(e.pending=null,r!==null){r=r.next;do i.status="rejected",i.reason=s,yd(i),i=i.next;while(i!==r)}e.action=null}function yd(e){e=e.listeners;for(var i=0;i<e.length;i++)(0,e[i])()}function _d(e,i){return i}function xd(e,i){if(St){var s=Nt.formState;if(s!==null){t:{var r=mt;if(St){if(Lt){e:{for(var h=Lt,d=We;h.nodeType!==8;){if(!d){h=null;break e}if(h=Ie(h.nextSibling),h===null){h=null;break e}}d=h.data,h=d==="F!"||d==="F"?h:null}if(h){Lt=Ie(h.nextSibling),r=h.data==="F!";break t}}Ji(r)}r=!1}r&&(i=s[0])}}return s=ye(),s.memoizedState=s.baseState=i,r={pending:null,lanes:0,dispatch:null,lastRenderedReducer:_d,lastRenderedState:i},s.queue=r,s=Hd.bind(null,mt,r),r.dispatch=s,r=ho(!1),d=xo.bind(null,mt,!1,r.queue),r=ye(),h={state:i,dispatch:null,action:e,pending:null},r.queue=h,s=tx.bind(null,mt,h,d,s),h.dispatch=s,r.memoizedState=e,[i,s,!1]}function bd(e){var i=Wt();return vd(i,Bt,e)}function vd(e,i,s){if(i=oo(e,i,_d)[0],e=Wl(Ei)[0],typeof i=="object"&&i!==null&&typeof i.then=="function")try{var r=_a(i)}catch(y){throw y===gs?Ll:y}else r=i;i=Wt();var h=i.queue,d=h.dispatch;return s!==i.memoizedState&&(mt.flags|=2048,bs(9,{destroy:void 0},ex.bind(null,h,s),null)),[r,d,e]}function ex(e,i){e.action=i}function Sd(e){var i=Wt(),s=Bt;if(s!==null)return vd(i,s,e);Wt(),i=i.memoizedState,s=Wt();var r=s.queue.dispatch;return s.memoizedState=e,[i,r,!1]}function bs(e,i,s,r){return e={tag:e,create:s,deps:r,inst:i,next:null},i=mt.updateQueue,i===null&&(i=Ql(),mt.updateQueue=i),s=i.lastEffect,s===null?i.lastEffect=e.next=e:(r=s.next,s.next=e,e.next=r,i.lastEffect=e),e}function Td(){return Wt().memoizedState}function Kl(e,i,s,r){var h=ye();mt.flags|=e,h.memoizedState=bs(1|i,{destroy:void 0},s,r===void 0?null:r)}function Il(e,i,s,r){var h=Wt();r=r===void 0?null:r;var d=h.memoizedState.inst;Bt!==null&&r!==null&&no(r,Bt.memoizedState.deps)?h.memoizedState=bs(i,d,s,r):(mt.flags|=e,h.memoizedState=bs(1|i,d,s,r))}function Ad(e,i){Kl(8390656,8,e,i)}function mo(e,i){Il(2048,8,e,i)}function ix(e){mt.flags|=4;var i=mt.updateQueue;if(i===null)i=Ql(),mt.updateQueue=i,i.events=[e];else{var s=i.events;s===null?i.events=[e]:s.push(e)}}function Cd(e){var i=Wt().memoizedState;return ix({ref:i,nextImpl:e}),function(){if((Et&2)!==0)throw Error(a(440));return i.impl.apply(void 0,arguments)}}function Md(e,i){return Il(4,2,e,i)}function wd(e,i){return Il(4,4,e,i)}function Ed(e,i){if(typeof i=="function"){e=e();var s=i(e);return function(){typeof s=="function"?s():i(null)}}if(i!=null)return e=e(),i.current=e,function(){i.current=null}}function Rd(e,i,s){s=s!=null?s.concat([e]):null,Il(4,4,Ed.bind(null,i,e),s)}function go(){}function zd(e,i){var s=Wt();i=i===void 0?null:i;var r=s.memoizedState;return i!==null&&no(i,r[1])?r[0]:(s.memoizedState=[e,i],e)}function Dd(e,i){var s=Wt();i=i===void 0?null:i;var r=s.memoizedState;if(i!==null&&no(i,r[1]))return r[0];if(r=e(),Un){Qi(!0);try{e()}finally{Qi(!1)}}return s.memoizedState=[r,i],r}function po(e,i,s){return s===void 0||(wi&1073741824)!==0&&(xt&261930)===0?e.memoizedState=i:(e.memoizedState=s,e=Bm(),mt.lanes|=e,un|=e,s)}function Bd(e,i,s,r){return Oe(s,i)?s:ys.current!==null?(e=po(e,s,r),Oe(e,i)||(te=!0),e):(wi&42)===0||(wi&1073741824)!==0&&(xt&261930)===0?(te=!0,e.memoizedState=s):(e=Bm(),mt.lanes|=e,un|=e,i)}function Od(e,i,s,r,h){var d=L.p;L.p=d!==0&&8>d?d:8;var y=R.T,v={};R.T=v,xo(e,!1,i,s);try{var C=h(),N=R.S;if(N!==null&&N(v,C),C!==null&&typeof C=="object"&&typeof C.then=="function"){var X=I_(C,r);xa(e,i,X,Le(e))}else xa(e,i,r,Le(e))}catch(V){xa(e,i,{then:function(){},status:"rejected",reason:V},Le())}finally{L.p=d,y!==null&&v.types!==null&&(y.types=v.types),R.T=y}}function nx(){}function yo(e,i,s,r){if(e.tag!==5)throw Error(a(476));var h=Gd(e).queue;Od(e,h,i,et,s===null?nx:function(){return Ud(e),s(r)})}function Gd(e){var i=e.memoizedState;if(i!==null)return i;i={memoizedState:et,baseState:et,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Ei,lastRenderedState:et},next:null};var s={};return i.next={memoizedState:s,baseState:s,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Ei,lastRenderedState:s},next:null},e.memoizedState=i,e=e.alternate,e!==null&&(e.memoizedState=i),i}function Ud(e){var i=Gd(e);i.next===null&&(i=e.alternate.memoizedState),xa(e,i.next.queue,{},Le())}function _o(){return oe(Na)}function Nd(){return Wt().memoizedState}function kd(){return Wt().memoizedState}function sx(e){for(var i=e.return;i!==null;){switch(i.tag){case 24:case 3:var s=Le();e=en(s);var r=nn(i,e,s);r!==null&&(we(r,i,s),ma(r,i,s)),i={cache:Fu()},e.payload=i;return}i=i.return}}function ax(e,i,s){var r=Le();s={lane:r,revertLane:0,gesture:null,action:s,hasEagerState:!1,eagerState:null,next:null},Jl(e)?Ld(i,s):(s=Uu(e,i,s,r),s!==null&&(we(s,e,r),Yd(s,i,r)))}function Hd(e,i,s){var r=Le();xa(e,i,s,r)}function xa(e,i,s,r){var h={lane:r,revertLane:0,gesture:null,action:s,hasEagerState:!1,eagerState:null,next:null};if(Jl(e))Ld(i,h);else{var d=e.alternate;if(e.lanes===0&&(d===null||d.lanes===0)&&(d=i.lastRenderedReducer,d!==null))try{var y=i.lastRenderedState,v=d(y,s);if(h.hasEagerState=!0,h.eagerState=v,Oe(v,y))return Bl(e,i,h,0),Nt===null&&Dl(),!1}catch{}finally{}if(s=Uu(e,i,h,r),s!==null)return we(s,e,r),Yd(s,i,r),!0}return!1}function xo(e,i,s,r){if(r={lane:2,revertLane:Io(),gesture:null,action:r,hasEagerState:!1,eagerState:null,next:null},Jl(e)){if(i)throw Error(a(479))}else i=Uu(e,s,r,2),i!==null&&we(i,e,2)}function Jl(e){var i=e.alternate;return e===mt||i!==null&&i===mt}function Ld(e,i){_s=Pl=!0;var s=e.pending;s===null?i.next=i:(i.next=s.next,s.next=i),e.pending=i}function Yd(e,i,s){if((s&4194048)!==0){var r=i.lanes;r&=e.pendingLanes,s|=r,i.lanes=s,Vh(e,s)}}var ba={readContext:oe,use:Zl,useCallback:qt,useContext:qt,useEffect:qt,useImperativeHandle:qt,useLayoutEffect:qt,useInsertionEffect:qt,useMemo:qt,useReducer:qt,useRef:qt,useState:qt,useDebugValue:qt,useDeferredValue:qt,useTransition:qt,useSyncExternalStore:qt,useId:qt,useHostTransitionStatus:qt,useFormState:qt,useActionState:qt,useOptimistic:qt,useMemoCache:qt,useCacheRefresh:qt};ba.useEffectEvent=qt;var jd={readContext:oe,use:Zl,useCallback:function(e,i){return ye().memoizedState=[e,i===void 0?null:i],e},useContext:oe,useEffect:Ad,useImperativeHandle:function(e,i,s){s=s!=null?s.concat([e]):null,Kl(4194308,4,Ed.bind(null,i,e),s)},useLayoutEffect:function(e,i){return Kl(4194308,4,e,i)},useInsertionEffect:function(e,i){Kl(4,2,e,i)},useMemo:function(e,i){var s=ye();i=i===void 0?null:i;var r=e();if(Un){Qi(!0);try{e()}finally{Qi(!1)}}return s.memoizedState=[r,i],r},useReducer:function(e,i,s){var r=ye();if(s!==void 0){var h=s(i);if(Un){Qi(!0);try{s(i)}finally{Qi(!1)}}}else h=i;return r.memoizedState=r.baseState=h,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:h},r.queue=e,e=e.dispatch=ax.bind(null,mt,e),[r.memoizedState,e]},useRef:function(e){var i=ye();return e={current:e},i.memoizedState=e},useState:function(e){e=ho(e);var i=e.queue,s=Hd.bind(null,mt,i);return i.dispatch=s,[e.memoizedState,s]},useDebugValue:go,useDeferredValue:function(e,i){var s=ye();return po(s,e,i)},useTransition:function(){var e=ho(!1);return e=Od.bind(null,mt,e.queue,!0,!1),ye().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,i,s){var r=mt,h=ye();if(St){if(s===void 0)throw Error(a(407));s=s()}else{if(s=i(),Nt===null)throw Error(a(349));(xt&127)!==0||ud(r,i,s)}h.memoizedState=s;var d={value:s,getSnapshot:i};return h.queue=d,Ad(cd.bind(null,r,d,e),[e]),r.flags|=2048,bs(9,{destroy:void 0},od.bind(null,r,d,s,i),null),s},useId:function(){var e=ye(),i=Nt.identifierPrefix;if(St){var s=mi,r=di;s=(r&~(1<<32-Be(r)-1)).toString(32)+s,i="_"+i+"R_"+s,s=Fl++,0<s&&(i+="H"+s.toString(32)),i+="_"}else s=J_++,i="_"+i+"r_"+s.toString(32)+"_";return e.memoizedState=i},useHostTransitionStatus:_o,useFormState:xd,useActionState:xd,useOptimistic:function(e){var i=ye();i.memoizedState=i.baseState=e;var s={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return i.queue=s,i=xo.bind(null,mt,!0,s),s.dispatch=i,[e,i]},useMemoCache:uo,useCacheRefresh:function(){return ye().memoizedState=sx.bind(null,mt)},useEffectEvent:function(e){var i=ye(),s={impl:e};return i.memoizedState=s,function(){if((Et&2)!==0)throw Error(a(440));return s.impl.apply(void 0,arguments)}}},bo={readContext:oe,use:Zl,useCallback:zd,useContext:oe,useEffect:mo,useImperativeHandle:Rd,useInsertionEffect:Md,useLayoutEffect:wd,useMemo:Dd,useReducer:Wl,useRef:Td,useState:function(){return Wl(Ei)},useDebugValue:go,useDeferredValue:function(e,i){var s=Wt();return Bd(s,Bt.memoizedState,e,i)},useTransition:function(){var e=Wl(Ei)[0],i=Wt().memoizedState;return[typeof e=="boolean"?e:_a(e),i]},useSyncExternalStore:rd,useId:Nd,useHostTransitionStatus:_o,useFormState:bd,useActionState:bd,useOptimistic:function(e,i){var s=Wt();return dd(s,Bt,e,i)},useMemoCache:uo,useCacheRefresh:kd};bo.useEffectEvent=Cd;var Xd={readContext:oe,use:Zl,useCallback:zd,useContext:oe,useEffect:mo,useImperativeHandle:Rd,useInsertionEffect:Md,useLayoutEffect:wd,useMemo:Dd,useReducer:co,useRef:Td,useState:function(){return co(Ei)},useDebugValue:go,useDeferredValue:function(e,i){var s=Wt();return Bt===null?po(s,e,i):Bd(s,Bt.memoizedState,e,i)},useTransition:function(){var e=co(Ei)[0],i=Wt().memoizedState;return[typeof e=="boolean"?e:_a(e),i]},useSyncExternalStore:rd,useId:Nd,useHostTransitionStatus:_o,useFormState:Sd,useActionState:Sd,useOptimistic:function(e,i){var s=Wt();return Bt!==null?dd(s,Bt,e,i):(s.baseState=e,[e,s.queue.dispatch])},useMemoCache:uo,useCacheRefresh:kd};Xd.useEffectEvent=Cd;function vo(e,i,s,r){i=e.memoizedState,s=s(r,i),s=s==null?i:_({},i,s),e.memoizedState=s,e.lanes===0&&(e.updateQueue.baseState=s)}var So={enqueueSetState:function(e,i,s){e=e._reactInternals;var r=Le(),h=en(r);h.payload=i,s!=null&&(h.callback=s),i=nn(e,h,r),i!==null&&(we(i,e,r),ma(i,e,r))},enqueueReplaceState:function(e,i,s){e=e._reactInternals;var r=Le(),h=en(r);h.tag=1,h.payload=i,s!=null&&(h.callback=s),i=nn(e,h,r),i!==null&&(we(i,e,r),ma(i,e,r))},enqueueForceUpdate:function(e,i){e=e._reactInternals;var s=Le(),r=en(s);r.tag=2,i!=null&&(r.callback=i),i=nn(e,r,s),i!==null&&(we(i,e,s),ma(i,e,s))}};function qd(e,i,s,r,h,d,y){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(r,d,y):i.prototype&&i.prototype.isPureReactComponent?!la(s,r)||!la(h,d):!0}function Vd(e,i,s,r){e=i.state,typeof i.componentWillReceiveProps=="function"&&i.componentWillReceiveProps(s,r),typeof i.UNSAFE_componentWillReceiveProps=="function"&&i.UNSAFE_componentWillReceiveProps(s,r),i.state!==e&&So.enqueueReplaceState(i,i.state,null)}function Nn(e,i){var s=i;if("ref"in i){s={};for(var r in i)r!=="ref"&&(s[r]=i[r])}if(e=e.defaultProps){s===i&&(s=_({},s));for(var h in e)s[h]===void 0&&(s[h]=e[h])}return s}function Pd(e){zl(e)}function Fd(e){console.error(e)}function Qd(e){zl(e)}function $l(e,i){try{var s=e.onUncaughtError;s(i.value,{componentStack:i.stack})}catch(r){setTimeout(function(){throw r})}}function Zd(e,i,s){try{var r=e.onCaughtError;r(s.value,{componentStack:s.stack,errorBoundary:i.tag===1?i.stateNode:null})}catch(h){setTimeout(function(){throw h})}}function To(e,i,s){return s=en(s),s.tag=3,s.payload={element:null},s.callback=function(){$l(e,i)},s}function Wd(e){return e=en(e),e.tag=3,e}function Kd(e,i,s,r){var h=s.type.getDerivedStateFromError;if(typeof h=="function"){var d=r.value;e.payload=function(){return h(d)},e.callback=function(){Zd(i,s,r)}}var y=s.stateNode;y!==null&&typeof y.componentDidCatch=="function"&&(e.callback=function(){Zd(i,s,r),typeof h!="function"&&(on===null?on=new Set([this]):on.add(this));var v=r.stack;this.componentDidCatch(r.value,{componentStack:v!==null?v:""})})}function lx(e,i,s,r,h){if(s.flags|=32768,r!==null&&typeof r=="object"&&typeof r.then=="function"){if(i=s.alternate,i!==null&&fs(i,s,h,!0),s=Ue.current,s!==null){switch(s.tag){case 31:case 13:return Ke===null?hr():s.alternate===null&&Vt===0&&(Vt=3),s.flags&=-257,s.flags|=65536,s.lanes=h,r===Yl?s.flags|=16384:(i=s.updateQueue,i===null?s.updateQueue=new Set([r]):i.add(r),Zo(e,r,h)),!1;case 22:return s.flags|=65536,r===Yl?s.flags|=16384:(i=s.updateQueue,i===null?(i={transitions:null,markerInstances:null,retryQueue:new Set([r])},s.updateQueue=i):(s=i.retryQueue,s===null?i.retryQueue=new Set([r]):s.add(r)),Zo(e,r,h)),!1}throw Error(a(435,s.tag))}return Zo(e,r,h),hr(),!1}if(St)return i=Ue.current,i!==null?((i.flags&65536)===0&&(i.flags|=256),i.flags|=65536,i.lanes=h,r!==ju&&(e=Error(a(422),{cause:r}),oa(Fe(e,s)))):(r!==ju&&(i=Error(a(423),{cause:r}),oa(Fe(i,s))),e=e.current.alternate,e.flags|=65536,h&=-h,e.lanes|=h,r=Fe(r,s),h=To(e.stateNode,r,h),Ju(e,h),Vt!==4&&(Vt=2)),!1;var d=Error(a(520),{cause:r});if(d=Fe(d,s),Ea===null?Ea=[d]:Ea.push(d),Vt!==4&&(Vt=2),i===null)return!0;r=Fe(r,s),s=i;do{switch(s.tag){case 3:return s.flags|=65536,e=h&-h,s.lanes|=e,e=To(s.stateNode,r,e),Ju(s,e),!1;case 1:if(i=s.type,d=s.stateNode,(s.flags&128)===0&&(typeof i.getDerivedStateFromError=="function"||d!==null&&typeof d.componentDidCatch=="function"&&(on===null||!on.has(d))))return s.flags|=65536,h&=-h,s.lanes|=h,h=Wd(h),Kd(h,e,s,r),Ju(s,h),!1}s=s.return}while(s!==null);return!1}var Ao=Error(a(461)),te=!1;function ce(e,i,s,r){i.child=e===null?td(i,null,s,r):Gn(i,e.child,s,r)}function Id(e,i,s,r,h){s=s.render;var d=i.ref;if("ref"in r){var y={};for(var v in r)v!=="ref"&&(y[v]=r[v])}else y=r;return zn(i),r=so(e,i,s,y,d,h),v=ao(),e!==null&&!te?(lo(e,i,h),Ri(e,i,h)):(St&&v&&Lu(i),i.flags|=1,ce(e,i,r,h),i.child)}function Jd(e,i,s,r,h){if(e===null){var d=s.type;return typeof d=="function"&&!Nu(d)&&d.defaultProps===void 0&&s.compare===null?(i.tag=15,i.type=d,$d(e,i,d,r,h)):(e=Gl(s.type,null,r,i,i.mode,h),e.ref=i.ref,e.return=i,i.child=e)}if(d=e.child,!Bo(e,h)){var y=d.memoizedProps;if(s=s.compare,s=s!==null?s:la,s(y,r)&&e.ref===i.ref)return Ri(e,i,h)}return i.flags|=1,e=Ti(d,r),e.ref=i.ref,e.return=i,i.child=e}function $d(e,i,s,r,h){if(e!==null){var d=e.memoizedProps;if(la(d,r)&&e.ref===i.ref)if(te=!1,i.pendingProps=r=d,Bo(e,h))(e.flags&131072)!==0&&(te=!0);else return i.lanes=e.lanes,Ri(e,i,h)}return Co(e,i,s,r,h)}function tm(e,i,s,r){var h=r.children,d=e!==null?e.memoizedState:null;if(e===null&&i.stateNode===null&&(i.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),r.mode==="hidden"){if((i.flags&128)!==0){if(d=d!==null?d.baseLanes|s:s,e!==null){for(r=i.child=e.child,h=0;r!==null;)h=h|r.lanes|r.childLanes,r=r.sibling;r=h&~d}else r=0,i.child=null;return em(e,i,d,s,r)}if((s&536870912)!==0)i.memoizedState={baseLanes:0,cachePool:null},e!==null&&Hl(i,d!==null?d.cachePool:null),d!==null?nd(i,d):to(),sd(i);else return r=i.lanes=536870912,em(e,i,d!==null?d.baseLanes|s:s,s,r)}else d!==null?(Hl(i,d.cachePool),nd(i,d),an(),i.memoizedState=null):(e!==null&&Hl(i,null),to(),an());return ce(e,i,h,s),i.child}function va(e,i){return e!==null&&e.tag===22||i.stateNode!==null||(i.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),i.sibling}function em(e,i,s,r,h){var d=Zu();return d=d===null?null:{parent:Jt._currentValue,pool:d},i.memoizedState={baseLanes:s,cachePool:d},e!==null&&Hl(i,null),to(),sd(i),e!==null&&fs(e,i,r,!0),i.childLanes=h,null}function tr(e,i){return i=ir({mode:i.mode,children:i.children},e.mode),i.ref=e.ref,e.child=i,i.return=e,i}function im(e,i,s){return Gn(i,e.child,null,s),e=tr(i,i.pendingProps),e.flags|=2,Ne(i),i.memoizedState=null,e}function rx(e,i,s){var r=i.pendingProps,h=(i.flags&128)!==0;if(i.flags&=-129,e===null){if(St){if(r.mode==="hidden")return e=tr(i,r),i.lanes=536870912,va(null,e);if(io(i),(e=Lt)?(e=mg(e,We),e=e!==null&&e.data==="&"?e:null,e!==null&&(i.memoizedState={dehydrated:e,treeContext:Ki!==null?{id:di,overflow:mi}:null,retryLane:536870912,hydrationErrors:null},s=Lf(e),s.return=i,i.child=s,ue=i,Lt=null)):e=null,e===null)throw Ji(i);return i.lanes=536870912,null}return tr(i,r)}var d=e.memoizedState;if(d!==null){var y=d.dehydrated;if(io(i),h)if(i.flags&256)i.flags&=-257,i=im(e,i,s);else if(i.memoizedState!==null)i.child=e.child,i.flags|=128,i=null;else throw Error(a(558));else if(te||fs(e,i,s,!1),h=(s&e.childLanes)!==0,te||h){if(r=Nt,r!==null&&(y=Ph(r,s),y!==0&&y!==d.retryLane))throw d.retryLane=y,Mn(e,y),we(r,e,y),Ao;hr(),i=im(e,i,s)}else e=d.treeContext,Lt=Ie(y.nextSibling),ue=i,St=!0,Ii=null,We=!1,e!==null&&Xf(i,e),i=tr(i,r),i.flags|=4096;return i}return e=Ti(e.child,{mode:r.mode,children:r.children}),e.ref=i.ref,i.child=e,e.return=i,e}function er(e,i){var s=i.ref;if(s===null)e!==null&&e.ref!==null&&(i.flags|=4194816);else{if(typeof s!="function"&&typeof s!="object")throw Error(a(284));(e===null||e.ref!==s)&&(i.flags|=4194816)}}function Co(e,i,s,r,h){return zn(i),s=so(e,i,s,r,void 0,h),r=ao(),e!==null&&!te?(lo(e,i,h),Ri(e,i,h)):(St&&r&&Lu(i),i.flags|=1,ce(e,i,s,h),i.child)}function nm(e,i,s,r,h,d){return zn(i),i.updateQueue=null,s=ld(i,r,s,h),ad(e),r=ao(),e!==null&&!te?(lo(e,i,d),Ri(e,i,d)):(St&&r&&Lu(i),i.flags|=1,ce(e,i,s,d),i.child)}function sm(e,i,s,r,h){if(zn(i),i.stateNode===null){var d=us,y=s.contextType;typeof y=="object"&&y!==null&&(d=oe(y)),d=new s(r,d),i.memoizedState=d.state!==null&&d.state!==void 0?d.state:null,d.updater=So,i.stateNode=d,d._reactInternals=i,d=i.stateNode,d.props=r,d.state=i.memoizedState,d.refs={},Ku(i),y=s.contextType,d.context=typeof y=="object"&&y!==null?oe(y):us,d.state=i.memoizedState,y=s.getDerivedStateFromProps,typeof y=="function"&&(vo(i,s,y,r),d.state=i.memoizedState),typeof s.getDerivedStateFromProps=="function"||typeof d.getSnapshotBeforeUpdate=="function"||typeof d.UNSAFE_componentWillMount!="function"&&typeof d.componentWillMount!="function"||(y=d.state,typeof d.componentWillMount=="function"&&d.componentWillMount(),typeof d.UNSAFE_componentWillMount=="function"&&d.UNSAFE_componentWillMount(),y!==d.state&&So.enqueueReplaceState(d,d.state,null),pa(i,r,d,h),ga(),d.state=i.memoizedState),typeof d.componentDidMount=="function"&&(i.flags|=4194308),r=!0}else if(e===null){d=i.stateNode;var v=i.memoizedProps,C=Nn(s,v);d.props=C;var N=d.context,X=s.contextType;y=us,typeof X=="object"&&X!==null&&(y=oe(X));var V=s.getDerivedStateFromProps;X=typeof V=="function"||typeof d.getSnapshotBeforeUpdate=="function",v=i.pendingProps!==v,X||typeof d.UNSAFE_componentWillReceiveProps!="function"&&typeof d.componentWillReceiveProps!="function"||(v||N!==y)&&Vd(i,d,r,y),tn=!1;var H=i.memoizedState;d.state=H,pa(i,r,d,h),ga(),N=i.memoizedState,v||H!==N||tn?(typeof V=="function"&&(vo(i,s,V,r),N=i.memoizedState),(C=tn||qd(i,s,C,r,H,N,y))?(X||typeof d.UNSAFE_componentWillMount!="function"&&typeof d.componentWillMount!="function"||(typeof d.componentWillMount=="function"&&d.componentWillMount(),typeof d.UNSAFE_componentWillMount=="function"&&d.UNSAFE_componentWillMount()),typeof d.componentDidMount=="function"&&(i.flags|=4194308)):(typeof d.componentDidMount=="function"&&(i.flags|=4194308),i.memoizedProps=r,i.memoizedState=N),d.props=r,d.state=N,d.context=y,r=C):(typeof d.componentDidMount=="function"&&(i.flags|=4194308),r=!1)}else{d=i.stateNode,Iu(e,i),y=i.memoizedProps,X=Nn(s,y),d.props=X,V=i.pendingProps,H=d.context,N=s.contextType,C=us,typeof N=="object"&&N!==null&&(C=oe(N)),v=s.getDerivedStateFromProps,(N=typeof v=="function"||typeof d.getSnapshotBeforeUpdate=="function")||typeof d.UNSAFE_componentWillReceiveProps!="function"&&typeof d.componentWillReceiveProps!="function"||(y!==V||H!==C)&&Vd(i,d,r,C),tn=!1,H=i.memoizedState,d.state=H,pa(i,r,d,h),ga();var Y=i.memoizedState;y!==V||H!==Y||tn||e!==null&&e.dependencies!==null&&Nl(e.dependencies)?(typeof v=="function"&&(vo(i,s,v,r),Y=i.memoizedState),(X=tn||qd(i,s,X,r,H,Y,C)||e!==null&&e.dependencies!==null&&Nl(e.dependencies))?(N||typeof d.UNSAFE_componentWillUpdate!="function"&&typeof d.componentWillUpdate!="function"||(typeof d.componentWillUpdate=="function"&&d.componentWillUpdate(r,Y,C),typeof d.UNSAFE_componentWillUpdate=="function"&&d.UNSAFE_componentWillUpdate(r,Y,C)),typeof d.componentDidUpdate=="function"&&(i.flags|=4),typeof d.getSnapshotBeforeUpdate=="function"&&(i.flags|=1024)):(typeof d.componentDidUpdate!="function"||y===e.memoizedProps&&H===e.memoizedState||(i.flags|=4),typeof d.getSnapshotBeforeUpdate!="function"||y===e.memoizedProps&&H===e.memoizedState||(i.flags|=1024),i.memoizedProps=r,i.memoizedState=Y),d.props=r,d.state=Y,d.context=C,r=X):(typeof d.componentDidUpdate!="function"||y===e.memoizedProps&&H===e.memoizedState||(i.flags|=4),typeof d.getSnapshotBeforeUpdate!="function"||y===e.memoizedProps&&H===e.memoizedState||(i.flags|=1024),r=!1)}return d=r,er(e,i),r=(i.flags&128)!==0,d||r?(d=i.stateNode,s=r&&typeof s.getDerivedStateFromError!="function"?null:d.render(),i.flags|=1,e!==null&&r?(i.child=Gn(i,e.child,null,h),i.child=Gn(i,null,s,h)):ce(e,i,s,h),i.memoizedState=d.state,e=i.child):e=Ri(e,i,h),e}function am(e,i,s,r){return En(),i.flags|=256,ce(e,i,s,r),i.child}var Mo={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function wo(e){return{baseLanes:e,cachePool:Zf()}}function Eo(e,i,s){return e=e!==null?e.childLanes&~s:0,i&&(e|=He),e}function lm(e,i,s){var r=i.pendingProps,h=!1,d=(i.flags&128)!==0,y;if((y=d)||(y=e!==null&&e.memoizedState===null?!1:(Zt.current&2)!==0),y&&(h=!0,i.flags&=-129),y=(i.flags&32)!==0,i.flags&=-33,e===null){if(St){if(h?sn(i):an(),(e=Lt)?(e=mg(e,We),e=e!==null&&e.data!=="&"?e:null,e!==null&&(i.memoizedState={dehydrated:e,treeContext:Ki!==null?{id:di,overflow:mi}:null,retryLane:536870912,hydrationErrors:null},s=Lf(e),s.return=i,i.child=s,ue=i,Lt=null)):e=null,e===null)throw Ji(i);return cc(e)?i.lanes=32:i.lanes=536870912,null}var v=r.children;return r=r.fallback,h?(an(),h=i.mode,v=ir({mode:"hidden",children:v},h),r=wn(r,h,s,null),v.return=i,r.return=i,v.sibling=r,i.child=v,r=i.child,r.memoizedState=wo(s),r.childLanes=Eo(e,y,s),i.memoizedState=Mo,va(null,r)):(sn(i),Ro(i,v))}var C=e.memoizedState;if(C!==null&&(v=C.dehydrated,v!==null)){if(d)i.flags&256?(sn(i),i.flags&=-257,i=zo(e,i,s)):i.memoizedState!==null?(an(),i.child=e.child,i.flags|=128,i=null):(an(),v=r.fallback,h=i.mode,r=ir({mode:"visible",children:r.children},h),v=wn(v,h,s,null),v.flags|=2,r.return=i,v.return=i,r.sibling=v,i.child=r,Gn(i,e.child,null,s),r=i.child,r.memoizedState=wo(s),r.childLanes=Eo(e,y,s),i.memoizedState=Mo,i=va(null,r));else if(sn(i),cc(v)){if(y=v.nextSibling&&v.nextSibling.dataset,y)var N=y.dgst;y=N,r=Error(a(419)),r.stack="",r.digest=y,oa({value:r,source:null,stack:null}),i=zo(e,i,s)}else if(te||fs(e,i,s,!1),y=(s&e.childLanes)!==0,te||y){if(y=Nt,y!==null&&(r=Ph(y,s),r!==0&&r!==C.retryLane))throw C.retryLane=r,Mn(e,r),we(y,e,r),Ao;oc(v)||hr(),i=zo(e,i,s)}else oc(v)?(i.flags|=192,i.child=e.child,i=null):(e=C.treeContext,Lt=Ie(v.nextSibling),ue=i,St=!0,Ii=null,We=!1,e!==null&&Xf(i,e),i=Ro(i,r.children),i.flags|=4096);return i}return h?(an(),v=r.fallback,h=i.mode,C=e.child,N=C.sibling,r=Ti(C,{mode:"hidden",children:r.children}),r.subtreeFlags=C.subtreeFlags&65011712,N!==null?v=Ti(N,v):(v=wn(v,h,s,null),v.flags|=2),v.return=i,r.return=i,r.sibling=v,i.child=r,va(null,r),r=i.child,v=e.child.memoizedState,v===null?v=wo(s):(h=v.cachePool,h!==null?(C=Jt._currentValue,h=h.parent!==C?{parent:C,pool:C}:h):h=Zf(),v={baseLanes:v.baseLanes|s,cachePool:h}),r.memoizedState=v,r.childLanes=Eo(e,y,s),i.memoizedState=Mo,va(e.child,r)):(sn(i),s=e.child,e=s.sibling,s=Ti(s,{mode:"visible",children:r.children}),s.return=i,s.sibling=null,e!==null&&(y=i.deletions,y===null?(i.deletions=[e],i.flags|=16):y.push(e)),i.child=s,i.memoizedState=null,s)}function Ro(e,i){return i=ir({mode:"visible",children:i},e.mode),i.return=e,e.child=i}function ir(e,i){return e=Ge(22,e,null,i),e.lanes=0,e}function zo(e,i,s){return Gn(i,e.child,null,s),e=Ro(i,i.pendingProps.children),e.flags|=2,i.memoizedState=null,e}function rm(e,i,s){e.lanes|=i;var r=e.alternate;r!==null&&(r.lanes|=i),Vu(e.return,i,s)}function Do(e,i,s,r,h,d){var y=e.memoizedState;y===null?e.memoizedState={isBackwards:i,rendering:null,renderingStartTime:0,last:r,tail:s,tailMode:h,treeForkCount:d}:(y.isBackwards=i,y.rendering=null,y.renderingStartTime=0,y.last=r,y.tail=s,y.tailMode=h,y.treeForkCount=d)}function um(e,i,s){var r=i.pendingProps,h=r.revealOrder,d=r.tail;r=r.children;var y=Zt.current,v=(y&2)!==0;if(v?(y=y&1|2,i.flags|=128):y&=1,P(Zt,y),ce(e,i,r,s),r=St?ua:0,!v&&e!==null&&(e.flags&128)!==0)t:for(e=i.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&rm(e,s,i);else if(e.tag===19)rm(e,s,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(h){case"forwards":for(s=i.child,h=null;s!==null;)e=s.alternate,e!==null&&Vl(e)===null&&(h=s),s=s.sibling;s=h,s===null?(h=i.child,i.child=null):(h=s.sibling,s.sibling=null),Do(i,!1,h,s,d,r);break;case"backwards":case"unstable_legacy-backwards":for(s=null,h=i.child,i.child=null;h!==null;){if(e=h.alternate,e!==null&&Vl(e)===null){i.child=h;break}e=h.sibling,h.sibling=s,s=h,h=e}Do(i,!0,s,null,d,r);break;case"together":Do(i,!1,null,null,void 0,r);break;default:i.memoizedState=null}return i.child}function Ri(e,i,s){if(e!==null&&(i.dependencies=e.dependencies),un|=i.lanes,(s&i.childLanes)===0)if(e!==null){if(fs(e,i,s,!1),(s&i.childLanes)===0)return null}else return null;if(e!==null&&i.child!==e.child)throw Error(a(153));if(i.child!==null){for(e=i.child,s=Ti(e,e.pendingProps),i.child=s,s.return=i;e.sibling!==null;)e=e.sibling,s=s.sibling=Ti(e,e.pendingProps),s.return=i;s.sibling=null}return i.child}function Bo(e,i){return(e.lanes&i)!==0?!0:(e=e.dependencies,!!(e!==null&&Nl(e)))}function ux(e,i,s){switch(i.tag){case 3:Ht(i,i.stateNode.containerInfo),$i(i,Jt,e.memoizedState.cache),En();break;case 27:case 5:Xe(i);break;case 4:Ht(i,i.stateNode.containerInfo);break;case 10:$i(i,i.type,i.memoizedProps.value);break;case 31:if(i.memoizedState!==null)return i.flags|=128,io(i),null;break;case 13:var r=i.memoizedState;if(r!==null)return r.dehydrated!==null?(sn(i),i.flags|=128,null):(s&i.child.childLanes)!==0?lm(e,i,s):(sn(i),e=Ri(e,i,s),e!==null?e.sibling:null);sn(i);break;case 19:var h=(e.flags&128)!==0;if(r=(s&i.childLanes)!==0,r||(fs(e,i,s,!1),r=(s&i.childLanes)!==0),h){if(r)return um(e,i,s);i.flags|=128}if(h=i.memoizedState,h!==null&&(h.rendering=null,h.tail=null,h.lastEffect=null),P(Zt,Zt.current),r)break;return null;case 22:return i.lanes=0,tm(e,i,s,i.pendingProps);case 24:$i(i,Jt,e.memoizedState.cache)}return Ri(e,i,s)}function om(e,i,s){if(e!==null)if(e.memoizedProps!==i.pendingProps)te=!0;else{if(!Bo(e,s)&&(i.flags&128)===0)return te=!1,ux(e,i,s);te=(e.flags&131072)!==0}else te=!1,St&&(i.flags&1048576)!==0&&jf(i,ua,i.index);switch(i.lanes=0,i.tag){case 16:t:{var r=i.pendingProps;if(e=Bn(i.elementType),i.type=e,typeof e=="function")Nu(e)?(r=Nn(e,r),i.tag=1,i=sm(null,i,e,r,s)):(i.tag=0,i=Co(null,i,e,r,s));else{if(e!=null){var h=e.$$typeof;if(h===O){i.tag=11,i=Id(null,i,e,r,s);break t}else if(h===G){i.tag=14,i=Jd(null,i,e,r,s);break t}}throw i=nt(e)||e,Error(a(306,i,""))}}return i;case 0:return Co(e,i,i.type,i.pendingProps,s);case 1:return r=i.type,h=Nn(r,i.pendingProps),sm(e,i,r,h,s);case 3:t:{if(Ht(i,i.stateNode.containerInfo),e===null)throw Error(a(387));r=i.pendingProps;var d=i.memoizedState;h=d.element,Iu(e,i),pa(i,r,null,s);var y=i.memoizedState;if(r=y.cache,$i(i,Jt,r),r!==d.cache&&Pu(i,[Jt],s,!0),ga(),r=y.element,d.isDehydrated)if(d={element:r,isDehydrated:!1,cache:y.cache},i.updateQueue.baseState=d,i.memoizedState=d,i.flags&256){i=am(e,i,r,s);break t}else if(r!==h){h=Fe(Error(a(424)),i),oa(h),i=am(e,i,r,s);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(Lt=Ie(e.firstChild),ue=i,St=!0,Ii=null,We=!0,s=td(i,null,r,s),i.child=s;s;)s.flags=s.flags&-3|4096,s=s.sibling}else{if(En(),r===h){i=Ri(e,i,s);break t}ce(e,i,r,s)}i=i.child}return i;case 26:return er(e,i),e===null?(s=bg(i.type,null,i.pendingProps,null))?i.memoizedState=s:St||(s=i.type,e=i.pendingProps,r=_r(ct.current).createElement(s),r[re]=i,r[ve]=e,he(r,s,e),se(r),i.stateNode=r):i.memoizedState=bg(i.type,e.memoizedProps,i.pendingProps,e.memoizedState),null;case 27:return Xe(i),e===null&&St&&(r=i.stateNode=yg(i.type,i.pendingProps,ct.current),ue=i,We=!0,h=Lt,dn(i.type)?(hc=h,Lt=Ie(r.firstChild)):Lt=h),ce(e,i,i.pendingProps.children,s),er(e,i),e===null&&(i.flags|=4194304),i.child;case 5:return e===null&&St&&((h=r=Lt)&&(r=Hx(r,i.type,i.pendingProps,We),r!==null?(i.stateNode=r,ue=i,Lt=Ie(r.firstChild),We=!1,h=!0):h=!1),h||Ji(i)),Xe(i),h=i.type,d=i.pendingProps,y=e!==null?e.memoizedProps:null,r=d.children,lc(h,d)?r=null:y!==null&&lc(h,y)&&(i.flags|=32),i.memoizedState!==null&&(h=so(e,i,$_,null,null,s),Na._currentValue=h),er(e,i),ce(e,i,r,s),i.child;case 6:return e===null&&St&&((e=s=Lt)&&(s=Lx(s,i.pendingProps,We),s!==null?(i.stateNode=s,ue=i,Lt=null,e=!0):e=!1),e||Ji(i)),null;case 13:return lm(e,i,s);case 4:return Ht(i,i.stateNode.containerInfo),r=i.pendingProps,e===null?i.child=Gn(i,null,r,s):ce(e,i,r,s),i.child;case 11:return Id(e,i,i.type,i.pendingProps,s);case 7:return ce(e,i,i.pendingProps,s),i.child;case 8:return ce(e,i,i.pendingProps.children,s),i.child;case 12:return ce(e,i,i.pendingProps.children,s),i.child;case 10:return r=i.pendingProps,$i(i,i.type,r.value),ce(e,i,r.children,s),i.child;case 9:return h=i.type._context,r=i.pendingProps.children,zn(i),h=oe(h),r=r(h),i.flags|=1,ce(e,i,r,s),i.child;case 14:return Jd(e,i,i.type,i.pendingProps,s);case 15:return $d(e,i,i.type,i.pendingProps,s);case 19:return um(e,i,s);case 31:return rx(e,i,s);case 22:return tm(e,i,s,i.pendingProps);case 24:return zn(i),r=oe(Jt),e===null?(h=Zu(),h===null&&(h=Nt,d=Fu(),h.pooledCache=d,d.refCount++,d!==null&&(h.pooledCacheLanes|=s),h=d),i.memoizedState={parent:r,cache:h},Ku(i),$i(i,Jt,h)):((e.lanes&s)!==0&&(Iu(e,i),pa(i,null,null,s),ga()),h=e.memoizedState,d=i.memoizedState,h.parent!==r?(h={parent:r,cache:r},i.memoizedState=h,i.lanes===0&&(i.memoizedState=i.updateQueue.baseState=h),$i(i,Jt,r)):(r=d.cache,$i(i,Jt,r),r!==h.cache&&Pu(i,[Jt],s,!0))),ce(e,i,i.pendingProps.children,s),i.child;case 29:throw i.pendingProps}throw Error(a(156,i.tag))}function zi(e){e.flags|=4}function Oo(e,i,s,r,h){if((i=(e.mode&32)!==0)&&(i=!1),i){if(e.flags|=16777216,(h&335544128)===h)if(e.stateNode.complete)e.flags|=8192;else if(Nm())e.flags|=8192;else throw On=Yl,Wu}else e.flags&=-16777217}function cm(e,i){if(i.type!=="stylesheet"||(i.state.loading&4)!==0)e.flags&=-16777217;else if(e.flags|=16777216,!Cg(i))if(Nm())e.flags|=8192;else throw On=Yl,Wu}function nr(e,i){i!==null&&(e.flags|=4),e.flags&16384&&(i=e.tag!==22?Xh():536870912,e.lanes|=i,As|=i)}function Sa(e,i){if(!St)switch(e.tailMode){case"hidden":i=e.tail;for(var s=null;i!==null;)i.alternate!==null&&(s=i),i=i.sibling;s===null?e.tail=null:s.sibling=null;break;case"collapsed":s=e.tail;for(var r=null;s!==null;)s.alternate!==null&&(r=s),s=s.sibling;r===null?i||e.tail===null?e.tail=null:e.tail.sibling=null:r.sibling=null}}function Yt(e){var i=e.alternate!==null&&e.alternate.child===e.child,s=0,r=0;if(i)for(var h=e.child;h!==null;)s|=h.lanes|h.childLanes,r|=h.subtreeFlags&65011712,r|=h.flags&65011712,h.return=e,h=h.sibling;else for(h=e.child;h!==null;)s|=h.lanes|h.childLanes,r|=h.subtreeFlags,r|=h.flags,h.return=e,h=h.sibling;return e.subtreeFlags|=r,e.childLanes=s,i}function ox(e,i,s){var r=i.pendingProps;switch(Yu(i),i.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Yt(i),null;case 1:return Yt(i),null;case 3:return s=i.stateNode,r=null,e!==null&&(r=e.memoizedState.cache),i.memoizedState.cache!==r&&(i.flags|=2048),Mi(Jt),wt(),s.pendingContext&&(s.context=s.pendingContext,s.pendingContext=null),(e===null||e.child===null)&&(hs(i)?zi(i):e===null||e.memoizedState.isDehydrated&&(i.flags&256)===0||(i.flags|=1024,Xu())),Yt(i),null;case 26:var h=i.type,d=i.memoizedState;return e===null?(zi(i),d!==null?(Yt(i),cm(i,d)):(Yt(i),Oo(i,h,null,r,s))):d?d!==e.memoizedState?(zi(i),Yt(i),cm(i,d)):(Yt(i),i.flags&=-16777217):(e=e.memoizedProps,e!==r&&zi(i),Yt(i),Oo(i,h,e,r,s)),null;case 27:if(Fi(i),s=ct.current,h=i.type,e!==null&&i.stateNode!=null)e.memoizedProps!==r&&zi(i);else{if(!r){if(i.stateNode===null)throw Error(a(166));return Yt(i),null}e=I.current,hs(i)?qf(i):(e=yg(h,r,s),i.stateNode=e,zi(i))}return Yt(i),null;case 5:if(Fi(i),h=i.type,e!==null&&i.stateNode!=null)e.memoizedProps!==r&&zi(i);else{if(!r){if(i.stateNode===null)throw Error(a(166));return Yt(i),null}if(d=I.current,hs(i))qf(i);else{var y=_r(ct.current);switch(d){case 1:d=y.createElementNS("http://www.w3.org/2000/svg",h);break;case 2:d=y.createElementNS("http://www.w3.org/1998/Math/MathML",h);break;default:switch(h){case"svg":d=y.createElementNS("http://www.w3.org/2000/svg",h);break;case"math":d=y.createElementNS("http://www.w3.org/1998/Math/MathML",h);break;case"script":d=y.createElement("div"),d.innerHTML="<script><\/script>",d=d.removeChild(d.firstChild);break;case"select":d=typeof r.is=="string"?y.createElement("select",{is:r.is}):y.createElement("select"),r.multiple?d.multiple=!0:r.size&&(d.size=r.size);break;default:d=typeof r.is=="string"?y.createElement(h,{is:r.is}):y.createElement(h)}}d[re]=i,d[ve]=r;t:for(y=i.child;y!==null;){if(y.tag===5||y.tag===6)d.appendChild(y.stateNode);else if(y.tag!==4&&y.tag!==27&&y.child!==null){y.child.return=y,y=y.child;continue}if(y===i)break t;for(;y.sibling===null;){if(y.return===null||y.return===i)break t;y=y.return}y.sibling.return=y.return,y=y.sibling}i.stateNode=d;t:switch(he(d,h,r),h){case"button":case"input":case"select":case"textarea":r=!!r.autoFocus;break t;case"img":r=!0;break t;default:r=!1}r&&zi(i)}}return Yt(i),Oo(i,i.type,e===null?null:e.memoizedProps,i.pendingProps,s),null;case 6:if(e&&i.stateNode!=null)e.memoizedProps!==r&&zi(i);else{if(typeof r!="string"&&i.stateNode===null)throw Error(a(166));if(e=ct.current,hs(i)){if(e=i.stateNode,s=i.memoizedProps,r=null,h=ue,h!==null)switch(h.tag){case 27:case 5:r=h.memoizedProps}e[re]=i,e=!!(e.nodeValue===s||r!==null&&r.suppressHydrationWarning===!0||lg(e.nodeValue,s)),e||Ji(i,!0)}else e=_r(e).createTextNode(r),e[re]=i,i.stateNode=e}return Yt(i),null;case 31:if(s=i.memoizedState,e===null||e.memoizedState!==null){if(r=hs(i),s!==null){if(e===null){if(!r)throw Error(a(318));if(e=i.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(a(557));e[re]=i}else En(),(i.flags&128)===0&&(i.memoizedState=null),i.flags|=4;Yt(i),e=!1}else s=Xu(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=s),e=!0;if(!e)return i.flags&256?(Ne(i),i):(Ne(i),null);if((i.flags&128)!==0)throw Error(a(558))}return Yt(i),null;case 13:if(r=i.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(h=hs(i),r!==null&&r.dehydrated!==null){if(e===null){if(!h)throw Error(a(318));if(h=i.memoizedState,h=h!==null?h.dehydrated:null,!h)throw Error(a(317));h[re]=i}else En(),(i.flags&128)===0&&(i.memoizedState=null),i.flags|=4;Yt(i),h=!1}else h=Xu(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=h),h=!0;if(!h)return i.flags&256?(Ne(i),i):(Ne(i),null)}return Ne(i),(i.flags&128)!==0?(i.lanes=s,i):(s=r!==null,e=e!==null&&e.memoizedState!==null,s&&(r=i.child,h=null,r.alternate!==null&&r.alternate.memoizedState!==null&&r.alternate.memoizedState.cachePool!==null&&(h=r.alternate.memoizedState.cachePool.pool),d=null,r.memoizedState!==null&&r.memoizedState.cachePool!==null&&(d=r.memoizedState.cachePool.pool),d!==h&&(r.flags|=2048)),s!==e&&s&&(i.child.flags|=8192),nr(i,i.updateQueue),Yt(i),null);case 4:return wt(),e===null&&ec(i.stateNode.containerInfo),Yt(i),null;case 10:return Mi(i.type),Yt(i),null;case 19:if(j(Zt),r=i.memoizedState,r===null)return Yt(i),null;if(h=(i.flags&128)!==0,d=r.rendering,d===null)if(h)Sa(r,!1);else{if(Vt!==0||e!==null&&(e.flags&128)!==0)for(e=i.child;e!==null;){if(d=Vl(e),d!==null){for(i.flags|=128,Sa(r,!1),e=d.updateQueue,i.updateQueue=e,nr(i,e),i.subtreeFlags=0,e=s,s=i.child;s!==null;)Hf(s,e),s=s.sibling;return P(Zt,Zt.current&1|2),St&&Ai(i,r.treeForkCount),i.child}e=e.sibling}r.tail!==null&&ze()>ur&&(i.flags|=128,h=!0,Sa(r,!1),i.lanes=4194304)}else{if(!h)if(e=Vl(d),e!==null){if(i.flags|=128,h=!0,e=e.updateQueue,i.updateQueue=e,nr(i,e),Sa(r,!0),r.tail===null&&r.tailMode==="hidden"&&!d.alternate&&!St)return Yt(i),null}else 2*ze()-r.renderingStartTime>ur&&s!==536870912&&(i.flags|=128,h=!0,Sa(r,!1),i.lanes=4194304);r.isBackwards?(d.sibling=i.child,i.child=d):(e=r.last,e!==null?e.sibling=d:i.child=d,r.last=d)}return r.tail!==null?(e=r.tail,r.rendering=e,r.tail=e.sibling,r.renderingStartTime=ze(),e.sibling=null,s=Zt.current,P(Zt,h?s&1|2:s&1),St&&Ai(i,r.treeForkCount),e):(Yt(i),null);case 22:case 23:return Ne(i),eo(),r=i.memoizedState!==null,e!==null?e.memoizedState!==null!==r&&(i.flags|=8192):r&&(i.flags|=8192),r?(s&536870912)!==0&&(i.flags&128)===0&&(Yt(i),i.subtreeFlags&6&&(i.flags|=8192)):Yt(i),s=i.updateQueue,s!==null&&nr(i,s.retryQueue),s=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(s=e.memoizedState.cachePool.pool),r=null,i.memoizedState!==null&&i.memoizedState.cachePool!==null&&(r=i.memoizedState.cachePool.pool),r!==s&&(i.flags|=2048),e!==null&&j(Dn),null;case 24:return s=null,e!==null&&(s=e.memoizedState.cache),i.memoizedState.cache!==s&&(i.flags|=2048),Mi(Jt),Yt(i),null;case 25:return null;case 30:return null}throw Error(a(156,i.tag))}function cx(e,i){switch(Yu(i),i.tag){case 1:return e=i.flags,e&65536?(i.flags=e&-65537|128,i):null;case 3:return Mi(Jt),wt(),e=i.flags,(e&65536)!==0&&(e&128)===0?(i.flags=e&-65537|128,i):null;case 26:case 27:case 5:return Fi(i),null;case 31:if(i.memoizedState!==null){if(Ne(i),i.alternate===null)throw Error(a(340));En()}return e=i.flags,e&65536?(i.flags=e&-65537|128,i):null;case 13:if(Ne(i),e=i.memoizedState,e!==null&&e.dehydrated!==null){if(i.alternate===null)throw Error(a(340));En()}return e=i.flags,e&65536?(i.flags=e&-65537|128,i):null;case 19:return j(Zt),null;case 4:return wt(),null;case 10:return Mi(i.type),null;case 22:case 23:return Ne(i),eo(),e!==null&&j(Dn),e=i.flags,e&65536?(i.flags=e&-65537|128,i):null;case 24:return Mi(Jt),null;case 25:return null;default:return null}}function hm(e,i){switch(Yu(i),i.tag){case 3:Mi(Jt),wt();break;case 26:case 27:case 5:Fi(i);break;case 4:wt();break;case 31:i.memoizedState!==null&&Ne(i);break;case 13:Ne(i);break;case 19:j(Zt);break;case 10:Mi(i.type);break;case 22:case 23:Ne(i),eo(),e!==null&&j(Dn);break;case 24:Mi(Jt)}}function Ta(e,i){try{var s=i.updateQueue,r=s!==null?s.lastEffect:null;if(r!==null){var h=r.next;s=h;do{if((s.tag&e)===e){r=void 0;var d=s.create,y=s.inst;r=d(),y.destroy=r}s=s.next}while(s!==h)}}catch(v){Dt(i,i.return,v)}}function ln(e,i,s){try{var r=i.updateQueue,h=r!==null?r.lastEffect:null;if(h!==null){var d=h.next;r=d;do{if((r.tag&e)===e){var y=r.inst,v=y.destroy;if(v!==void 0){y.destroy=void 0,h=i;var C=s,N=v;try{N()}catch(X){Dt(h,C,X)}}}r=r.next}while(r!==d)}}catch(X){Dt(i,i.return,X)}}function fm(e){var i=e.updateQueue;if(i!==null){var s=e.stateNode;try{id(i,s)}catch(r){Dt(e,e.return,r)}}}function dm(e,i,s){s.props=Nn(e.type,e.memoizedProps),s.state=e.memoizedState;try{s.componentWillUnmount()}catch(r){Dt(e,i,r)}}function Aa(e,i){try{var s=e.ref;if(s!==null){switch(e.tag){case 26:case 27:case 5:var r=e.stateNode;break;case 30:r=e.stateNode;break;default:r=e.stateNode}typeof s=="function"?e.refCleanup=s(r):s.current=r}}catch(h){Dt(e,i,h)}}function gi(e,i){var s=e.ref,r=e.refCleanup;if(s!==null)if(typeof r=="function")try{r()}catch(h){Dt(e,i,h)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof s=="function")try{s(null)}catch(h){Dt(e,i,h)}else s.current=null}function mm(e){var i=e.type,s=e.memoizedProps,r=e.stateNode;try{t:switch(i){case"button":case"input":case"select":case"textarea":s.autoFocus&&r.focus();break t;case"img":s.src?r.src=s.src:s.srcSet&&(r.srcset=s.srcSet)}}catch(h){Dt(e,e.return,h)}}function Go(e,i,s){try{var r=e.stateNode;Bx(r,e.type,s,i),r[ve]=i}catch(h){Dt(e,e.return,h)}}function gm(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&dn(e.type)||e.tag===4}function Uo(e){t:for(;;){for(;e.sibling===null;){if(e.return===null||gm(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&&dn(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 No(e,i,s){var r=e.tag;if(r===5||r===6)e=e.stateNode,i?(s.nodeType===9?s.body:s.nodeName==="HTML"?s.ownerDocument.body:s).insertBefore(e,i):(i=s.nodeType===9?s.body:s.nodeName==="HTML"?s.ownerDocument.body:s,i.appendChild(e),s=s._reactRootContainer,s!=null||i.onclick!==null||(i.onclick=vi));else if(r!==4&&(r===27&&dn(e.type)&&(s=e.stateNode,i=null),e=e.child,e!==null))for(No(e,i,s),e=e.sibling;e!==null;)No(e,i,s),e=e.sibling}function sr(e,i,s){var r=e.tag;if(r===5||r===6)e=e.stateNode,i?s.insertBefore(e,i):s.appendChild(e);else if(r!==4&&(r===27&&dn(e.type)&&(s=e.stateNode),e=e.child,e!==null))for(sr(e,i,s),e=e.sibling;e!==null;)sr(e,i,s),e=e.sibling}function pm(e){var i=e.stateNode,s=e.memoizedProps;try{for(var r=e.type,h=i.attributes;h.length;)i.removeAttributeNode(h[0]);he(i,r,s),i[re]=e,i[ve]=s}catch(d){Dt(e,e.return,d)}}var Di=!1,ee=!1,ko=!1,ym=typeof WeakSet=="function"?WeakSet:Set,ae=null;function hx(e,i){if(e=e.containerInfo,sc=Cr,e=Rf(e),Ru(e)){if("selectionStart"in e)var s={start:e.selectionStart,end:e.selectionEnd};else t:{s=(s=e.ownerDocument)&&s.defaultView||window;var r=s.getSelection&&s.getSelection();if(r&&r.rangeCount!==0){s=r.anchorNode;var h=r.anchorOffset,d=r.focusNode;r=r.focusOffset;try{s.nodeType,d.nodeType}catch{s=null;break t}var y=0,v=-1,C=-1,N=0,X=0,V=e,H=null;e:for(;;){for(var Y;V!==s||h!==0&&V.nodeType!==3||(v=y+h),V!==d||r!==0&&V.nodeType!==3||(C=y+r),V.nodeType===3&&(y+=V.nodeValue.length),(Y=V.firstChild)!==null;)H=V,V=Y;for(;;){if(V===e)break e;if(H===s&&++N===h&&(v=y),H===d&&++X===r&&(C=y),(Y=V.nextSibling)!==null)break;V=H,H=V.parentNode}V=Y}s=v===-1||C===-1?null:{start:v,end:C}}else s=null}s=s||{start:0,end:0}}else s=null;for(ac={focusedElem:e,selectionRange:s},Cr=!1,ae=i;ae!==null;)if(i=ae,e=i.child,(i.subtreeFlags&1028)!==0&&e!==null)e.return=i,ae=e;else for(;ae!==null;){switch(i=ae,d=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(s=0;s<e.length;s++)h=e[s],h.ref.impl=h.nextImpl;break;case 11:case 15:break;case 1:if((e&1024)!==0&&d!==null){e=void 0,s=i,h=d.memoizedProps,d=d.memoizedState,r=s.stateNode;try{var st=Nn(s.type,h);e=r.getSnapshotBeforeUpdate(st,d),r.__reactInternalSnapshotBeforeUpdate=e}catch(ot){Dt(s,s.return,ot)}}break;case 3:if((e&1024)!==0){if(e=i.stateNode.containerInfo,s=e.nodeType,s===9)uc(e);else if(s===1)switch(e.nodeName){case"HEAD":case"HTML":case"BODY":uc(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(a(163))}if(e=i.sibling,e!==null){e.return=i.return,ae=e;break}ae=i.return}}function _m(e,i,s){var r=s.flags;switch(s.tag){case 0:case 11:case 15:Oi(e,s),r&4&&Ta(5,s);break;case 1:if(Oi(e,s),r&4)if(e=s.stateNode,i===null)try{e.componentDidMount()}catch(y){Dt(s,s.return,y)}else{var h=Nn(s.type,i.memoizedProps);i=i.memoizedState;try{e.componentDidUpdate(h,i,e.__reactInternalSnapshotBeforeUpdate)}catch(y){Dt(s,s.return,y)}}r&64&&fm(s),r&512&&Aa(s,s.return);break;case 3:if(Oi(e,s),r&64&&(e=s.updateQueue,e!==null)){if(i=null,s.child!==null)switch(s.child.tag){case 27:case 5:i=s.child.stateNode;break;case 1:i=s.child.stateNode}try{id(e,i)}catch(y){Dt(s,s.return,y)}}break;case 27:i===null&&r&4&&pm(s);case 26:case 5:Oi(e,s),i===null&&r&4&&mm(s),r&512&&Aa(s,s.return);break;case 12:Oi(e,s);break;case 31:Oi(e,s),r&4&&vm(e,s);break;case 13:Oi(e,s),r&4&&Sm(e,s),r&64&&(e=s.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(s=bx.bind(null,s),Yx(e,s))));break;case 22:if(r=s.memoizedState!==null||Di,!r){i=i!==null&&i.memoizedState!==null||ee,h=Di;var d=ee;Di=r,(ee=i)&&!d?Gi(e,s,(s.subtreeFlags&8772)!==0):Oi(e,s),Di=h,ee=d}break;case 30:break;default:Oi(e,s)}}function xm(e){var i=e.alternate;i!==null&&(e.alternate=null,xm(i)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(i=e.stateNode,i!==null&&fu(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 jt=null,Te=!1;function Bi(e,i,s){for(s=s.child;s!==null;)bm(e,i,s),s=s.sibling}function bm(e,i,s){if(De&&typeof De.onCommitFiberUnmount=="function")try{De.onCommitFiberUnmount(Zs,s)}catch{}switch(s.tag){case 26:ee||gi(s,i),Bi(e,i,s),s.memoizedState?s.memoizedState.count--:s.stateNode&&(s=s.stateNode,s.parentNode.removeChild(s));break;case 27:ee||gi(s,i);var r=jt,h=Te;dn(s.type)&&(jt=s.stateNode,Te=!1),Bi(e,i,s),Oa(s.stateNode),jt=r,Te=h;break;case 5:ee||gi(s,i);case 6:if(r=jt,h=Te,jt=null,Bi(e,i,s),jt=r,Te=h,jt!==null)if(Te)try{(jt.nodeType===9?jt.body:jt.nodeName==="HTML"?jt.ownerDocument.body:jt).removeChild(s.stateNode)}catch(d){Dt(s,i,d)}else try{jt.removeChild(s.stateNode)}catch(d){Dt(s,i,d)}break;case 18:jt!==null&&(Te?(e=jt,fg(e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,s.stateNode),Bs(e)):fg(jt,s.stateNode));break;case 4:r=jt,h=Te,jt=s.stateNode.containerInfo,Te=!0,Bi(e,i,s),jt=r,Te=h;break;case 0:case 11:case 14:case 15:ln(2,s,i),ee||ln(4,s,i),Bi(e,i,s);break;case 1:ee||(gi(s,i),r=s.stateNode,typeof r.componentWillUnmount=="function"&&dm(s,i,r)),Bi(e,i,s);break;case 21:Bi(e,i,s);break;case 22:ee=(r=ee)||s.memoizedState!==null,Bi(e,i,s),ee=r;break;default:Bi(e,i,s)}}function vm(e,i){if(i.memoizedState===null&&(e=i.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{Bs(e)}catch(s){Dt(i,i.return,s)}}}function Sm(e,i){if(i.memoizedState===null&&(e=i.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{Bs(e)}catch(s){Dt(i,i.return,s)}}function fx(e){switch(e.tag){case 31:case 13:case 19:var i=e.stateNode;return i===null&&(i=e.stateNode=new ym),i;case 22:return e=e.stateNode,i=e._retryCache,i===null&&(i=e._retryCache=new ym),i;default:throw Error(a(435,e.tag))}}function ar(e,i){var s=fx(e);i.forEach(function(r){if(!s.has(r)){s.add(r);var h=vx.bind(null,e,r);r.then(h,h)}})}function Ae(e,i){var s=i.deletions;if(s!==null)for(var r=0;r<s.length;r++){var h=s[r],d=e,y=i,v=y;t:for(;v!==null;){switch(v.tag){case 27:if(dn(v.type)){jt=v.stateNode,Te=!1;break t}break;case 5:jt=v.stateNode,Te=!1;break t;case 3:case 4:jt=v.stateNode.containerInfo,Te=!0;break t}v=v.return}if(jt===null)throw Error(a(160));bm(d,y,h),jt=null,Te=!1,d=h.alternate,d!==null&&(d.return=null),h.return=null}if(i.subtreeFlags&13886)for(i=i.child;i!==null;)Tm(i,e),i=i.sibling}var ui=null;function Tm(e,i){var s=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:Ae(i,e),Ce(e),r&4&&(ln(3,e,e.return),Ta(3,e),ln(5,e,e.return));break;case 1:Ae(i,e),Ce(e),r&512&&(ee||s===null||gi(s,s.return)),r&64&&Di&&(e=e.updateQueue,e!==null&&(r=e.callbacks,r!==null&&(s=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=s===null?r:s.concat(r))));break;case 26:var h=ui;if(Ae(i,e),Ce(e),r&512&&(ee||s===null||gi(s,s.return)),r&4){var d=s!==null?s.memoizedState:null;if(r=e.memoizedState,s===null)if(r===null)if(e.stateNode===null){t:{r=e.type,s=e.memoizedProps,h=h.ownerDocument||h;e:switch(r){case"title":d=h.getElementsByTagName("title")[0],(!d||d[Is]||d[re]||d.namespaceURI==="http://www.w3.org/2000/svg"||d.hasAttribute("itemprop"))&&(d=h.createElement(r),h.head.insertBefore(d,h.querySelector("head > title"))),he(d,r,s),d[re]=e,se(d),r=d;break t;case"link":var y=Tg("link","href",h).get(r+(s.href||""));if(y){for(var v=0;v<y.length;v++)if(d=y[v],d.getAttribute("href")===(s.href==null||s.href===""?null:s.href)&&d.getAttribute("rel")===(s.rel==null?null:s.rel)&&d.getAttribute("title")===(s.title==null?null:s.title)&&d.getAttribute("crossorigin")===(s.crossOrigin==null?null:s.crossOrigin)){y.splice(v,1);break e}}d=h.createElement(r),he(d,r,s),h.head.appendChild(d);break;case"meta":if(y=Tg("meta","content",h).get(r+(s.content||""))){for(v=0;v<y.length;v++)if(d=y[v],d.getAttribute("content")===(s.content==null?null:""+s.content)&&d.getAttribute("name")===(s.name==null?null:s.name)&&d.getAttribute("property")===(s.property==null?null:s.property)&&d.getAttribute("http-equiv")===(s.httpEquiv==null?null:s.httpEquiv)&&d.getAttribute("charset")===(s.charSet==null?null:s.charSet)){y.splice(v,1);break e}}d=h.createElement(r),he(d,r,s),h.head.appendChild(d);break;default:throw Error(a(468,r))}d[re]=e,se(d),r=d}e.stateNode=r}else Ag(h,e.type,e.stateNode);else e.stateNode=Sg(h,r,e.memoizedProps);else d!==r?(d===null?s.stateNode!==null&&(s=s.stateNode,s.parentNode.removeChild(s)):d.count--,r===null?Ag(h,e.type,e.stateNode):Sg(h,r,e.memoizedProps)):r===null&&e.stateNode!==null&&Go(e,e.memoizedProps,s.memoizedProps)}break;case 27:Ae(i,e),Ce(e),r&512&&(ee||s===null||gi(s,s.return)),s!==null&&r&4&&Go(e,e.memoizedProps,s.memoizedProps);break;case 5:if(Ae(i,e),Ce(e),r&512&&(ee||s===null||gi(s,s.return)),e.flags&32){h=e.stateNode;try{es(h,"")}catch(st){Dt(e,e.return,st)}}r&4&&e.stateNode!=null&&(h=e.memoizedProps,Go(e,h,s!==null?s.memoizedProps:h)),r&1024&&(ko=!0);break;case 6:if(Ae(i,e),Ce(e),r&4){if(e.stateNode===null)throw Error(a(162));r=e.memoizedProps,s=e.stateNode;try{s.nodeValue=r}catch(st){Dt(e,e.return,st)}}break;case 3:if(vr=null,h=ui,ui=xr(i.containerInfo),Ae(i,e),ui=h,Ce(e),r&4&&s!==null&&s.memoizedState.isDehydrated)try{Bs(i.containerInfo)}catch(st){Dt(e,e.return,st)}ko&&(ko=!1,Am(e));break;case 4:r=ui,ui=xr(e.stateNode.containerInfo),Ae(i,e),Ce(e),ui=r;break;case 12:Ae(i,e),Ce(e);break;case 31:Ae(i,e),Ce(e),r&4&&(r=e.updateQueue,r!==null&&(e.updateQueue=null,ar(e,r)));break;case 13:Ae(i,e),Ce(e),e.child.flags&8192&&e.memoizedState!==null!=(s!==null&&s.memoizedState!==null)&&(rr=ze()),r&4&&(r=e.updateQueue,r!==null&&(e.updateQueue=null,ar(e,r)));break;case 22:h=e.memoizedState!==null;var C=s!==null&&s.memoizedState!==null,N=Di,X=ee;if(Di=N||h,ee=X||C,Ae(i,e),ee=X,Di=N,Ce(e),r&8192)t:for(i=e.stateNode,i._visibility=h?i._visibility&-2:i._visibility|1,h&&(s===null||C||Di||ee||kn(e)),s=null,i=e;;){if(i.tag===5||i.tag===26){if(s===null){C=s=i;try{if(d=C.stateNode,h)y=d.style,typeof y.setProperty=="function"?y.setProperty("display","none","important"):y.display="none";else{v=C.stateNode;var V=C.memoizedProps.style,H=V!=null&&V.hasOwnProperty("display")?V.display:null;v.style.display=H==null||typeof H=="boolean"?"":(""+H).trim()}}catch(st){Dt(C,C.return,st)}}}else if(i.tag===6){if(s===null){C=i;try{C.stateNode.nodeValue=h?"":C.memoizedProps}catch(st){Dt(C,C.return,st)}}}else if(i.tag===18){if(s===null){C=i;try{var Y=C.stateNode;h?dg(Y,!0):dg(C.stateNode,!1)}catch(st){Dt(C,C.return,st)}}}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;s===i&&(s=null),i=i.return}s===i&&(s=null),i.sibling.return=i.return,i=i.sibling}r&4&&(r=e.updateQueue,r!==null&&(s=r.retryQueue,s!==null&&(r.retryQueue=null,ar(e,s))));break;case 19:Ae(i,e),Ce(e),r&4&&(r=e.updateQueue,r!==null&&(e.updateQueue=null,ar(e,r)));break;case 30:break;case 21:break;default:Ae(i,e),Ce(e)}}function Ce(e){var i=e.flags;if(i&2){try{for(var s,r=e.return;r!==null;){if(gm(r)){s=r;break}r=r.return}if(s==null)throw Error(a(160));switch(s.tag){case 27:var h=s.stateNode,d=Uo(e);sr(e,d,h);break;case 5:var y=s.stateNode;s.flags&32&&(es(y,""),s.flags&=-33);var v=Uo(e);sr(e,v,y);break;case 3:case 4:var C=s.stateNode.containerInfo,N=Uo(e);No(e,N,C);break;default:throw Error(a(161))}}catch(X){Dt(e,e.return,X)}e.flags&=-3}i&4096&&(e.flags&=-4097)}function Am(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var i=e;Am(i),i.tag===5&&i.flags&1024&&i.stateNode.reset(),e=e.sibling}}function Oi(e,i){if(i.subtreeFlags&8772)for(i=i.child;i!==null;)_m(e,i.alternate,i),i=i.sibling}function kn(e){for(e=e.child;e!==null;){var i=e;switch(i.tag){case 0:case 11:case 14:case 15:ln(4,i,i.return),kn(i);break;case 1:gi(i,i.return);var s=i.stateNode;typeof s.componentWillUnmount=="function"&&dm(i,i.return,s),kn(i);break;case 27:Oa(i.stateNode);case 26:case 5:gi(i,i.return),kn(i);break;case 22:i.memoizedState===null&&kn(i);break;case 30:kn(i);break;default:kn(i)}e=e.sibling}}function Gi(e,i,s){for(s=s&&(i.subtreeFlags&8772)!==0,i=i.child;i!==null;){var r=i.alternate,h=e,d=i,y=d.flags;switch(d.tag){case 0:case 11:case 15:Gi(h,d,s),Ta(4,d);break;case 1:if(Gi(h,d,s),r=d,h=r.stateNode,typeof h.componentDidMount=="function")try{h.componentDidMount()}catch(N){Dt(r,r.return,N)}if(r=d,h=r.updateQueue,h!==null){var v=r.stateNode;try{var C=h.shared.hiddenCallbacks;if(C!==null)for(h.shared.hiddenCallbacks=null,h=0;h<C.length;h++)ed(C[h],v)}catch(N){Dt(r,r.return,N)}}s&&y&64&&fm(d),Aa(d,d.return);break;case 27:pm(d);case 26:case 5:Gi(h,d,s),s&&r===null&&y&4&&mm(d),Aa(d,d.return);break;case 12:Gi(h,d,s);break;case 31:Gi(h,d,s),s&&y&4&&vm(h,d);break;case 13:Gi(h,d,s),s&&y&4&&Sm(h,d);break;case 22:d.memoizedState===null&&Gi(h,d,s),Aa(d,d.return);break;case 30:break;default:Gi(h,d,s)}i=i.sibling}}function Ho(e,i){var s=null;e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(s=e.memoizedState.cachePool.pool),e=null,i.memoizedState!==null&&i.memoizedState.cachePool!==null&&(e=i.memoizedState.cachePool.pool),e!==s&&(e!=null&&e.refCount++,s!=null&&ca(s))}function Lo(e,i){e=null,i.alternate!==null&&(e=i.alternate.memoizedState.cache),i=i.memoizedState.cache,i!==e&&(i.refCount++,e!=null&&ca(e))}function oi(e,i,s,r){if(i.subtreeFlags&10256)for(i=i.child;i!==null;)Cm(e,i,s,r),i=i.sibling}function Cm(e,i,s,r){var h=i.flags;switch(i.tag){case 0:case 11:case 15:oi(e,i,s,r),h&2048&&Ta(9,i);break;case 1:oi(e,i,s,r);break;case 3:oi(e,i,s,r),h&2048&&(e=null,i.alternate!==null&&(e=i.alternate.memoizedState.cache),i=i.memoizedState.cache,i!==e&&(i.refCount++,e!=null&&ca(e)));break;case 12:if(h&2048){oi(e,i,s,r),e=i.stateNode;try{var d=i.memoizedProps,y=d.id,v=d.onPostCommit;typeof v=="function"&&v(y,i.alternate===null?"mount":"update",e.passiveEffectDuration,-0)}catch(C){Dt(i,i.return,C)}}else oi(e,i,s,r);break;case 31:oi(e,i,s,r);break;case 13:oi(e,i,s,r);break;case 23:break;case 22:d=i.stateNode,y=i.alternate,i.memoizedState!==null?d._visibility&2?oi(e,i,s,r):Ca(e,i):d._visibility&2?oi(e,i,s,r):(d._visibility|=2,vs(e,i,s,r,(i.subtreeFlags&10256)!==0||!1)),h&2048&&Ho(y,i);break;case 24:oi(e,i,s,r),h&2048&&Lo(i.alternate,i);break;default:oi(e,i,s,r)}}function vs(e,i,s,r,h){for(h=h&&((i.subtreeFlags&10256)!==0||!1),i=i.child;i!==null;){var d=e,y=i,v=s,C=r,N=y.flags;switch(y.tag){case 0:case 11:case 15:vs(d,y,v,C,h),Ta(8,y);break;case 23:break;case 22:var X=y.stateNode;y.memoizedState!==null?X._visibility&2?vs(d,y,v,C,h):Ca(d,y):(X._visibility|=2,vs(d,y,v,C,h)),h&&N&2048&&Ho(y.alternate,y);break;case 24:vs(d,y,v,C,h),h&&N&2048&&Lo(y.alternate,y);break;default:vs(d,y,v,C,h)}i=i.sibling}}function Ca(e,i){if(i.subtreeFlags&10256)for(i=i.child;i!==null;){var s=e,r=i,h=r.flags;switch(r.tag){case 22:Ca(s,r),h&2048&&Ho(r.alternate,r);break;case 24:Ca(s,r),h&2048&&Lo(r.alternate,r);break;default:Ca(s,r)}i=i.sibling}}var Ma=8192;function Ss(e,i,s){if(e.subtreeFlags&Ma)for(e=e.child;e!==null;)Mm(e,i,s),e=e.sibling}function Mm(e,i,s){switch(e.tag){case 26:Ss(e,i,s),e.flags&Ma&&e.memoizedState!==null&&Jx(s,ui,e.memoizedState,e.memoizedProps);break;case 5:Ss(e,i,s);break;case 3:case 4:var r=ui;ui=xr(e.stateNode.containerInfo),Ss(e,i,s),ui=r;break;case 22:e.memoizedState===null&&(r=e.alternate,r!==null&&r.memoizedState!==null?(r=Ma,Ma=16777216,Ss(e,i,s),Ma=r):Ss(e,i,s));break;default:Ss(e,i,s)}}function wm(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 wa(e){var i=e.deletions;if((e.flags&16)!==0){if(i!==null)for(var s=0;s<i.length;s++){var r=i[s];ae=r,Rm(r,e)}wm(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)Em(e),e=e.sibling}function Em(e){switch(e.tag){case 0:case 11:case 15:wa(e),e.flags&2048&&ln(9,e,e.return);break;case 3:wa(e);break;case 12:wa(e);break;case 22:var i=e.stateNode;e.memoizedState!==null&&i._visibility&2&&(e.return===null||e.return.tag!==13)?(i._visibility&=-3,lr(e)):wa(e);break;default:wa(e)}}function lr(e){var i=e.deletions;if((e.flags&16)!==0){if(i!==null)for(var s=0;s<i.length;s++){var r=i[s];ae=r,Rm(r,e)}wm(e)}for(e=e.child;e!==null;){switch(i=e,i.tag){case 0:case 11:case 15:ln(8,i,i.return),lr(i);break;case 22:s=i.stateNode,s._visibility&2&&(s._visibility&=-3,lr(i));break;default:lr(i)}e=e.sibling}}function Rm(e,i){for(;ae!==null;){var s=ae;switch(s.tag){case 0:case 11:case 15:ln(8,s,i);break;case 23:case 22:if(s.memoizedState!==null&&s.memoizedState.cachePool!==null){var r=s.memoizedState.cachePool.pool;r!=null&&r.refCount++}break;case 24:ca(s.memoizedState.cache)}if(r=s.child,r!==null)r.return=s,ae=r;else t:for(s=e;ae!==null;){r=ae;var h=r.sibling,d=r.return;if(xm(r),r===s){ae=null;break t}if(h!==null){h.return=d,ae=h;break t}ae=d}}}var dx={getCacheForType:function(e){var i=oe(Jt),s=i.data.get(e);return s===void 0&&(s=e(),i.data.set(e,s)),s},cacheSignal:function(){return oe(Jt).controller.signal}},mx=typeof WeakMap=="function"?WeakMap:Map,Et=0,Nt=null,yt=null,xt=0,zt=0,ke=null,rn=!1,Ts=!1,Yo=!1,Ui=0,Vt=0,un=0,Hn=0,jo=0,He=0,As=0,Ea=null,Me=null,Xo=!1,rr=0,zm=0,ur=1/0,or=null,on=null,ie=0,cn=null,Cs=null,Ni=0,qo=0,Vo=null,Dm=null,Ra=0,Po=null;function Le(){return(Et&2)!==0&&xt!==0?xt&-xt:R.T!==null?Io():Fh()}function Bm(){if(He===0)if((xt&536870912)===0||St){var e=yl;yl<<=1,(yl&3932160)===0&&(yl=262144),He=e}else He=536870912;return e=Ue.current,e!==null&&(e.flags|=32),He}function we(e,i,s){(e===Nt&&(zt===2||zt===9)||e.cancelPendingCommit!==null)&&(Ms(e,0),hn(e,xt,He,!1)),Ks(e,s),((Et&2)===0||e!==Nt)&&(e===Nt&&((Et&2)===0&&(Hn|=s),Vt===4&&hn(e,xt,He,!1)),pi(e))}function Om(e,i,s){if((Et&6)!==0)throw Error(a(327));var r=!s&&(i&127)===0&&(i&e.expiredLanes)===0||Ws(e,i),h=r?yx(e,i):Qo(e,i,!0),d=r;do{if(h===0){Ts&&!r&&hn(e,i,0,!1);break}else{if(s=e.current.alternate,d&&!gx(s)){h=Qo(e,i,!1),d=!1;continue}if(h===2){if(d=i,e.errorRecoveryDisabledLanes&d)var y=0;else y=e.pendingLanes&-536870913,y=y!==0?y:y&536870912?536870912:0;if(y!==0){i=y;t:{var v=e;h=Ea;var C=v.current.memoizedState.isDehydrated;if(C&&(Ms(v,y).flags|=256),y=Qo(v,y,!1),y!==2){if(Yo&&!C){v.errorRecoveryDisabledLanes|=d,Hn|=d,h=4;break t}d=Me,Me=h,d!==null&&(Me===null?Me=d:Me.push.apply(Me,d))}h=y}if(d=!1,h!==2)continue}}if(h===1){Ms(e,0),hn(e,i,0,!0);break}t:{switch(r=e,d=h,d){case 0:case 1:throw Error(a(345));case 4:if((i&4194048)!==i)break;case 6:hn(r,i,He,!rn);break t;case 2:Me=null;break;case 3:case 5:break;default:throw Error(a(329))}if((i&62914560)===i&&(h=rr+300-ze(),10<h)){if(hn(r,i,He,!rn),xl(r,0,!0)!==0)break t;Ni=i,r.timeoutHandle=cg(Gm.bind(null,r,s,Me,or,Xo,i,He,Hn,As,rn,d,"Throttled",-0,0),h);break t}Gm(r,s,Me,or,Xo,i,He,Hn,As,rn,d,null,-0,0)}}break}while(!0);pi(e)}function Gm(e,i,s,r,h,d,y,v,C,N,X,V,H,Y){if(e.timeoutHandle=-1,V=i.subtreeFlags,V&8192||(V&16785408)===16785408){V={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:vi},Mm(i,d,V);var st=(d&62914560)===d?rr-ze():(d&4194048)===d?zm-ze():0;if(st=$x(V,st),st!==null){Ni=d,e.cancelPendingCommit=st(Xm.bind(null,e,i,d,s,r,h,y,v,C,X,V,null,H,Y)),hn(e,d,y,!N);return}}Xm(e,i,d,s,r,h,y,v,C)}function gx(e){for(var i=e;;){var s=i.tag;if((s===0||s===11||s===15)&&i.flags&16384&&(s=i.updateQueue,s!==null&&(s=s.stores,s!==null)))for(var r=0;r<s.length;r++){var h=s[r],d=h.getSnapshot;h=h.value;try{if(!Oe(d(),h))return!1}catch{return!1}}if(s=i.child,i.subtreeFlags&16384&&s!==null)s.return=i,i=s;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 hn(e,i,s,r){i&=~jo,i&=~Hn,e.suspendedLanes|=i,e.pingedLanes&=~i,r&&(e.warmLanes|=i),r=e.expirationTimes;for(var h=i;0<h;){var d=31-Be(h),y=1<<d;r[d]=-1,h&=~y}s!==0&&qh(e,s,i)}function cr(){return(Et&6)===0?(za(0),!1):!0}function Fo(){if(yt!==null){if(zt===0)var e=yt.return;else e=yt,Ci=Rn=null,ro(e),ps=null,fa=0,e=yt;for(;e!==null;)hm(e.alternate,e),e=e.return;yt=null}}function Ms(e,i){var s=e.timeoutHandle;s!==-1&&(e.timeoutHandle=-1,Ux(s)),s=e.cancelPendingCommit,s!==null&&(e.cancelPendingCommit=null,s()),Ni=0,Fo(),Nt=e,yt=s=Ti(e.current,null),xt=i,zt=0,ke=null,rn=!1,Ts=Ws(e,i),Yo=!1,As=He=jo=Hn=un=Vt=0,Me=Ea=null,Xo=!1,(i&8)!==0&&(i|=i&32);var r=e.entangledLanes;if(r!==0)for(e=e.entanglements,r&=i;0<r;){var h=31-Be(r),d=1<<h;i|=e[h],r&=~d}return Ui=i,Dl(),s}function Um(e,i){mt=null,R.H=ba,i===gs||i===Ll?(i=If(),zt=3):i===Wu?(i=If(),zt=4):zt=i===Ao?8:i!==null&&typeof i=="object"&&typeof i.then=="function"?6:1,ke=i,yt===null&&(Vt=1,$l(e,Fe(i,e.current)))}function Nm(){var e=Ue.current;return e===null?!0:(xt&4194048)===xt?Ke===null:(xt&62914560)===xt||(xt&536870912)!==0?e===Ke:!1}function km(){var e=R.H;return R.H=ba,e===null?ba:e}function Hm(){var e=R.A;return R.A=dx,e}function hr(){Vt=4,rn||(xt&4194048)!==xt&&Ue.current!==null||(Ts=!0),(un&134217727)===0&&(Hn&134217727)===0||Nt===null||hn(Nt,xt,He,!1)}function Qo(e,i,s){var r=Et;Et|=2;var h=km(),d=Hm();(Nt!==e||xt!==i)&&(or=null,Ms(e,i)),i=!1;var y=Vt;t:do try{if(zt!==0&&yt!==null){var v=yt,C=ke;switch(zt){case 8:Fo(),y=6;break t;case 3:case 2:case 9:case 6:Ue.current===null&&(i=!0);var N=zt;if(zt=0,ke=null,ws(e,v,C,N),s&&Ts){y=0;break t}break;default:N=zt,zt=0,ke=null,ws(e,v,C,N)}}px(),y=Vt;break}catch(X){Um(e,X)}while(!0);return i&&e.shellSuspendCounter++,Ci=Rn=null,Et=r,R.H=h,R.A=d,yt===null&&(Nt=null,xt=0,Dl()),y}function px(){for(;yt!==null;)Lm(yt)}function yx(e,i){var s=Et;Et|=2;var r=km(),h=Hm();Nt!==e||xt!==i?(or=null,ur=ze()+500,Ms(e,i)):Ts=Ws(e,i);t:do try{if(zt!==0&&yt!==null){i=yt;var d=ke;e:switch(zt){case 1:zt=0,ke=null,ws(e,i,d,1);break;case 2:case 9:if(Wf(d)){zt=0,ke=null,Ym(i);break}i=function(){zt!==2&&zt!==9||Nt!==e||(zt=7),pi(e)},d.then(i,i);break t;case 3:zt=7;break t;case 4:zt=5;break t;case 7:Wf(d)?(zt=0,ke=null,Ym(i)):(zt=0,ke=null,ws(e,i,d,7));break;case 5:var y=null;switch(yt.tag){case 26:y=yt.memoizedState;case 5:case 27:var v=yt;if(y?Cg(y):v.stateNode.complete){zt=0,ke=null;var C=v.sibling;if(C!==null)yt=C;else{var N=v.return;N!==null?(yt=N,fr(N)):yt=null}break e}}zt=0,ke=null,ws(e,i,d,5);break;case 6:zt=0,ke=null,ws(e,i,d,6);break;case 8:Fo(),Vt=6;break t;default:throw Error(a(462))}}_x();break}catch(X){Um(e,X)}while(!0);return Ci=Rn=null,R.H=r,R.A=h,Et=s,yt!==null?0:(Nt=null,xt=0,Dl(),Vt)}function _x(){for(;yt!==null&&!j0();)Lm(yt)}function Lm(e){var i=om(e.alternate,e,Ui);e.memoizedProps=e.pendingProps,i===null?fr(e):yt=i}function Ym(e){var i=e,s=i.alternate;switch(i.tag){case 15:case 0:i=nm(s,i,i.pendingProps,i.type,void 0,xt);break;case 11:i=nm(s,i,i.pendingProps,i.type.render,i.ref,xt);break;case 5:ro(i);default:hm(s,i),i=yt=Hf(i,Ui),i=om(s,i,Ui)}e.memoizedProps=e.pendingProps,i===null?fr(e):yt=i}function ws(e,i,s,r){Ci=Rn=null,ro(i),ps=null,fa=0;var h=i.return;try{if(lx(e,h,i,s,xt)){Vt=1,$l(e,Fe(s,e.current)),yt=null;return}}catch(d){if(h!==null)throw yt=h,d;Vt=1,$l(e,Fe(s,e.current)),yt=null;return}i.flags&32768?(St||r===1?e=!0:Ts||(xt&536870912)!==0?e=!1:(rn=e=!0,(r===2||r===9||r===3||r===6)&&(r=Ue.current,r!==null&&r.tag===13&&(r.flags|=16384))),jm(i,e)):fr(i)}function fr(e){var i=e;do{if((i.flags&32768)!==0){jm(i,rn);return}e=i.return;var s=ox(i.alternate,i,Ui);if(s!==null){yt=s;return}if(i=i.sibling,i!==null){yt=i;return}yt=i=e}while(i!==null);Vt===0&&(Vt=5)}function jm(e,i){do{var s=cx(e.alternate,e);if(s!==null){s.flags&=32767,yt=s;return}if(s=e.return,s!==null&&(s.flags|=32768,s.subtreeFlags=0,s.deletions=null),!i&&(e=e.sibling,e!==null)){yt=e;return}yt=e=s}while(e!==null);Vt=6,yt=null}function Xm(e,i,s,r,h,d,y,v,C){e.cancelPendingCommit=null;do dr();while(ie!==0);if((Et&6)!==0)throw Error(a(327));if(i!==null){if(i===e.current)throw Error(a(177));if(d=i.lanes|i.childLanes,d|=Gu,I0(e,s,d,y,v,C),e===Nt&&(yt=Nt=null,xt=0),Cs=i,cn=e,Ni=s,qo=d,Vo=h,Dm=r,(i.subtreeFlags&10256)!==0||(i.flags&10256)!==0?(e.callbackNode=null,e.callbackPriority=0,Sx(gl,function(){return Qm(),null})):(e.callbackNode=null,e.callbackPriority=0),r=(i.flags&13878)!==0,(i.subtreeFlags&13878)!==0||r){r=R.T,R.T=null,h=L.p,L.p=2,y=Et,Et|=4;try{hx(e,i,s)}finally{Et=y,L.p=h,R.T=r}}ie=1,qm(),Vm(),Pm()}}function qm(){if(ie===1){ie=0;var e=cn,i=Cs,s=(i.flags&13878)!==0;if((i.subtreeFlags&13878)!==0||s){s=R.T,R.T=null;var r=L.p;L.p=2;var h=Et;Et|=4;try{Tm(i,e);var d=ac,y=Rf(e.containerInfo),v=d.focusedElem,C=d.selectionRange;if(y!==v&&v&&v.ownerDocument&&Ef(v.ownerDocument.documentElement,v)){if(C!==null&&Ru(v)){var N=C.start,X=C.end;if(X===void 0&&(X=N),"selectionStart"in v)v.selectionStart=N,v.selectionEnd=Math.min(X,v.value.length);else{var V=v.ownerDocument||document,H=V&&V.defaultView||window;if(H.getSelection){var Y=H.getSelection(),st=v.textContent.length,ot=Math.min(C.start,st),Gt=C.end===void 0?ot:Math.min(C.end,st);!Y.extend&&ot>Gt&&(y=Gt,Gt=ot,ot=y);var D=wf(v,ot),E=wf(v,Gt);if(D&&E&&(Y.rangeCount!==1||Y.anchorNode!==D.node||Y.anchorOffset!==D.offset||Y.focusNode!==E.node||Y.focusOffset!==E.offset)){var U=V.createRange();U.setStart(D.node,D.offset),Y.removeAllRanges(),ot>Gt?(Y.addRange(U),Y.extend(E.node,E.offset)):(U.setEnd(E.node,E.offset),Y.addRange(U))}}}}for(V=[],Y=v;Y=Y.parentNode;)Y.nodeType===1&&V.push({element:Y,left:Y.scrollLeft,top:Y.scrollTop});for(typeof v.focus=="function"&&v.focus(),v=0;v<V.length;v++){var q=V[v];q.element.scrollLeft=q.left,q.element.scrollTop=q.top}}Cr=!!sc,ac=sc=null}finally{Et=h,L.p=r,R.T=s}}e.current=i,ie=2}}function Vm(){if(ie===2){ie=0;var e=cn,i=Cs,s=(i.flags&8772)!==0;if((i.subtreeFlags&8772)!==0||s){s=R.T,R.T=null;var r=L.p;L.p=2;var h=Et;Et|=4;try{_m(e,i.alternate,i)}finally{Et=h,L.p=r,R.T=s}}ie=3}}function Pm(){if(ie===4||ie===3){ie=0,X0();var e=cn,i=Cs,s=Ni,r=Dm;(i.subtreeFlags&10256)!==0||(i.flags&10256)!==0?ie=5:(ie=0,Cs=cn=null,Fm(e,e.pendingLanes));var h=e.pendingLanes;if(h===0&&(on=null),cu(s),i=i.stateNode,De&&typeof De.onCommitFiberRoot=="function")try{De.onCommitFiberRoot(Zs,i,void 0,(i.current.flags&128)===128)}catch{}if(r!==null){i=R.T,h=L.p,L.p=2,R.T=null;try{for(var d=e.onRecoverableError,y=0;y<r.length;y++){var v=r[y];d(v.value,{componentStack:v.stack})}}finally{R.T=i,L.p=h}}(Ni&3)!==0&&dr(),pi(e),h=e.pendingLanes,(s&261930)!==0&&(h&42)!==0?e===Po?Ra++:(Ra=0,Po=e):Ra=0,za(0)}}function Fm(e,i){(e.pooledCacheLanes&=i)===0&&(i=e.pooledCache,i!=null&&(e.pooledCache=null,ca(i)))}function dr(){return qm(),Vm(),Pm(),Qm()}function Qm(){if(ie!==5)return!1;var e=cn,i=qo;qo=0;var s=cu(Ni),r=R.T,h=L.p;try{L.p=32>s?32:s,R.T=null,s=Vo,Vo=null;var d=cn,y=Ni;if(ie=0,Cs=cn=null,Ni=0,(Et&6)!==0)throw Error(a(331));var v=Et;if(Et|=4,Em(d.current),Cm(d,d.current,y,s),Et=v,za(0,!1),De&&typeof De.onPostCommitFiberRoot=="function")try{De.onPostCommitFiberRoot(Zs,d)}catch{}return!0}finally{L.p=h,R.T=r,Fm(e,i)}}function Zm(e,i,s){i=Fe(s,i),i=To(e.stateNode,i,2),e=nn(e,i,2),e!==null&&(Ks(e,2),pi(e))}function Dt(e,i,s){if(e.tag===3)Zm(e,e,s);else for(;i!==null;){if(i.tag===3){Zm(i,e,s);break}else if(i.tag===1){var r=i.stateNode;if(typeof i.type.getDerivedStateFromError=="function"||typeof r.componentDidCatch=="function"&&(on===null||!on.has(r))){e=Fe(s,e),s=Wd(2),r=nn(i,s,2),r!==null&&(Kd(s,r,i,e),Ks(r,2),pi(r));break}}i=i.return}}function Zo(e,i,s){var r=e.pingCache;if(r===null){r=e.pingCache=new mx;var h=new Set;r.set(i,h)}else h=r.get(i),h===void 0&&(h=new Set,r.set(i,h));h.has(s)||(Yo=!0,h.add(s),e=xx.bind(null,e,i,s),i.then(e,e))}function xx(e,i,s){var r=e.pingCache;r!==null&&r.delete(i),e.pingedLanes|=e.suspendedLanes&s,e.warmLanes&=~s,Nt===e&&(xt&s)===s&&(Vt===4||Vt===3&&(xt&62914560)===xt&&300>ze()-rr?(Et&2)===0&&Ms(e,0):jo|=s,As===xt&&(As=0)),pi(e)}function Wm(e,i){i===0&&(i=Xh()),e=Mn(e,i),e!==null&&(Ks(e,i),pi(e))}function bx(e){var i=e.memoizedState,s=0;i!==null&&(s=i.retryLane),Wm(e,s)}function vx(e,i){var s=0;switch(e.tag){case 31:case 13:var r=e.stateNode,h=e.memoizedState;h!==null&&(s=h.retryLane);break;case 19:r=e.stateNode;break;case 22:r=e.stateNode._retryCache;break;default:throw Error(a(314))}r!==null&&r.delete(i),Wm(e,s)}function Sx(e,i){return lu(e,i)}var mr=null,Es=null,Wo=!1,gr=!1,Ko=!1,fn=0;function pi(e){e!==Es&&e.next===null&&(Es===null?mr=Es=e:Es=Es.next=e),gr=!0,Wo||(Wo=!0,Ax())}function za(e,i){if(!Ko&&gr){Ko=!0;do for(var s=!1,r=mr;r!==null;){if(e!==0){var h=r.pendingLanes;if(h===0)var d=0;else{var y=r.suspendedLanes,v=r.pingedLanes;d=(1<<31-Be(42|e)+1)-1,d&=h&~(y&~v),d=d&201326741?d&201326741|1:d?d|2:0}d!==0&&(s=!0,$m(r,d))}else d=xt,d=xl(r,r===Nt?d:0,r.cancelPendingCommit!==null||r.timeoutHandle!==-1),(d&3)===0||Ws(r,d)||(s=!0,$m(r,d));r=r.next}while(s);Ko=!1}}function Tx(){Km()}function Km(){gr=Wo=!1;var e=0;fn!==0&&Gx()&&(e=fn);for(var i=ze(),s=null,r=mr;r!==null;){var h=r.next,d=Im(r,i);d===0?(r.next=null,s===null?mr=h:s.next=h,h===null&&(Es=s)):(s=r,(e!==0||(d&3)!==0)&&(gr=!0)),r=h}ie!==0&&ie!==5||za(e),fn!==0&&(fn=0)}function Im(e,i){for(var s=e.suspendedLanes,r=e.pingedLanes,h=e.expirationTimes,d=e.pendingLanes&-62914561;0<d;){var y=31-Be(d),v=1<<y,C=h[y];C===-1?((v&s)===0||(v&r)!==0)&&(h[y]=K0(v,i)):C<=i&&(e.expiredLanes|=v),d&=~v}if(i=Nt,s=xt,s=xl(e,e===i?s:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),r=e.callbackNode,s===0||e===i&&(zt===2||zt===9)||e.cancelPendingCommit!==null)return r!==null&&r!==null&&ru(r),e.callbackNode=null,e.callbackPriority=0;if((s&3)===0||Ws(e,s)){if(i=s&-s,i===e.callbackPriority)return i;switch(r!==null&&ru(r),cu(s)){case 2:case 8:s=Yh;break;case 32:s=gl;break;case 268435456:s=jh;break;default:s=gl}return r=Jm.bind(null,e),s=lu(s,r),e.callbackPriority=i,e.callbackNode=s,i}return r!==null&&r!==null&&ru(r),e.callbackPriority=2,e.callbackNode=null,2}function Jm(e,i){if(ie!==0&&ie!==5)return e.callbackNode=null,e.callbackPriority=0,null;var s=e.callbackNode;if(dr()&&e.callbackNode!==s)return null;var r=xt;return r=xl(e,e===Nt?r:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),r===0?null:(Om(e,r,i),Im(e,ze()),e.callbackNode!=null&&e.callbackNode===s?Jm.bind(null,e):null)}function $m(e,i){if(dr())return null;Om(e,i,!0)}function Ax(){Nx(function(){(Et&6)!==0?lu(Lh,Tx):Km()})}function Io(){if(fn===0){var e=ds;e===0&&(e=pl,pl<<=1,(pl&261888)===0&&(pl=256)),fn=e}return fn}function tg(e){return e==null||typeof e=="symbol"||typeof e=="boolean"?null:typeof e=="function"?e:Tl(""+e)}function eg(e,i){var s=i.ownerDocument.createElement("input");return s.name=i.name,s.value=i.value,e.id&&s.setAttribute("form",e.id),i.parentNode.insertBefore(s,i),e=new FormData(e),s.parentNode.removeChild(s),e}function Cx(e,i,s,r,h){if(i==="submit"&&s&&s.stateNode===h){var d=tg((h[ve]||null).action),y=r.submitter;y&&(i=(i=y[ve]||null)?tg(i.formAction):y.getAttribute("formAction"),i!==null&&(d=i,y=null));var v=new wl("action","action",null,r,h);e.push({event:v,listeners:[{instance:null,listener:function(){if(r.defaultPrevented){if(fn!==0){var C=y?eg(h,y):new FormData(h);yo(s,{pending:!0,data:C,method:h.method,action:d},null,C)}}else typeof d=="function"&&(v.preventDefault(),C=y?eg(h,y):new FormData(h),yo(s,{pending:!0,data:C,method:h.method,action:d},d,C))},currentTarget:h}]})}}for(var Jo=0;Jo<Ou.length;Jo++){var $o=Ou[Jo],Mx=$o.toLowerCase(),wx=$o[0].toUpperCase()+$o.slice(1);ri(Mx,"on"+wx)}ri(Bf,"onAnimationEnd"),ri(Of,"onAnimationIteration"),ri(Gf,"onAnimationStart"),ri("dblclick","onDoubleClick"),ri("focusin","onFocus"),ri("focusout","onBlur"),ri(q_,"onTransitionRun"),ri(V_,"onTransitionStart"),ri(P_,"onTransitionCancel"),ri(Uf,"onTransitionEnd"),$n("onMouseEnter",["mouseout","mouseover"]),$n("onMouseLeave",["mouseout","mouseover"]),$n("onPointerEnter",["pointerout","pointerover"]),$n("onPointerLeave",["pointerout","pointerover"]),Sn("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),Sn("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),Sn("onBeforeInput",["compositionend","keypress","textInput","paste"]),Sn("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),Sn("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),Sn("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Da="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(" "),Ex=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(Da));function ig(e,i){i=(i&4)!==0;for(var s=0;s<e.length;s++){var r=e[s],h=r.event;r=r.listeners;t:{var d=void 0;if(i)for(var y=r.length-1;0<=y;y--){var v=r[y],C=v.instance,N=v.currentTarget;if(v=v.listener,C!==d&&h.isPropagationStopped())break t;d=v,h.currentTarget=N;try{d(h)}catch(X){zl(X)}h.currentTarget=null,d=C}else for(y=0;y<r.length;y++){if(v=r[y],C=v.instance,N=v.currentTarget,v=v.listener,C!==d&&h.isPropagationStopped())break t;d=v,h.currentTarget=N;try{d(h)}catch(X){zl(X)}h.currentTarget=null,d=C}}}}function _t(e,i){var s=i[hu];s===void 0&&(s=i[hu]=new Set);var r=e+"__bubble";s.has(r)||(ng(i,e,2,!1),s.add(r))}function tc(e,i,s){var r=0;i&&(r|=4),ng(s,e,r,i)}var pr="_reactListening"+Math.random().toString(36).slice(2);function ec(e){if(!e[pr]){e[pr]=!0,Wh.forEach(function(s){s!=="selectionchange"&&(Ex.has(s)||tc(s,!1,e),tc(s,!0,e))});var i=e.nodeType===9?e:e.ownerDocument;i===null||i[pr]||(i[pr]=!0,tc("selectionchange",!1,i))}}function ng(e,i,s,r){switch(Bg(i)){case 2:var h=ib;break;case 8:h=nb;break;default:h=pc}s=h.bind(null,i,s,e),h=void 0,!bu||i!=="touchstart"&&i!=="touchmove"&&i!=="wheel"||(h=!0),r?h!==void 0?e.addEventListener(i,s,{capture:!0,passive:h}):e.addEventListener(i,s,!0):h!==void 0?e.addEventListener(i,s,{passive:h}):e.addEventListener(i,s,!1)}function ic(e,i,s,r,h){var d=r;if((i&1)===0&&(i&2)===0&&r!==null)t:for(;;){if(r===null)return;var y=r.tag;if(y===3||y===4){var v=r.stateNode.containerInfo;if(v===h)break;if(y===4)for(y=r.return;y!==null;){var C=y.tag;if((C===3||C===4)&&y.stateNode.containerInfo===h)return;y=y.return}for(;v!==null;){if(y=Kn(v),y===null)return;if(C=y.tag,C===5||C===6||C===26||C===27){r=d=y;continue t}v=v.parentNode}}r=r.return}uf(function(){var N=d,X=_u(s),V=[];t:{var H=Nf.get(e);if(H!==void 0){var Y=wl,st=e;switch(e){case"keypress":if(Cl(s)===0)break t;case"keydown":case"keyup":Y=v_;break;case"focusin":st="focus",Y=Au;break;case"focusout":st="blur",Y=Au;break;case"beforeblur":case"afterblur":Y=Au;break;case"click":if(s.button===2)break t;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":Y=hf;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":Y=o_;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":Y=A_;break;case Bf:case Of:case Gf:Y=f_;break;case Uf:Y=M_;break;case"scroll":case"scrollend":Y=r_;break;case"wheel":Y=E_;break;case"copy":case"cut":case"paste":Y=m_;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":Y=df;break;case"toggle":case"beforetoggle":Y=z_}var ot=(i&4)!==0,Gt=!ot&&(e==="scroll"||e==="scrollend"),D=ot?H!==null?H+"Capture":null:H;ot=[];for(var E=N,U;E!==null;){var q=E;if(U=q.stateNode,q=q.tag,q!==5&&q!==26&&q!==27||U===null||D===null||(q=$s(E,D),q!=null&&ot.push(Ba(E,q,U))),Gt)break;E=E.return}0<ot.length&&(H=new Y(H,st,null,s,X),V.push({event:H,listeners:ot}))}}if((i&7)===0){t:{if(H=e==="mouseover"||e==="pointerover",Y=e==="mouseout"||e==="pointerout",H&&s!==yu&&(st=s.relatedTarget||s.fromElement)&&(Kn(st)||st[Wn]))break t;if((Y||H)&&(H=X.window===X?X:(H=X.ownerDocument)?H.defaultView||H.parentWindow:window,Y?(st=s.relatedTarget||s.toElement,Y=N,st=st?Kn(st):null,st!==null&&(Gt=o(st),ot=st.tag,st!==Gt||ot!==5&&ot!==27&&ot!==6)&&(st=null)):(Y=null,st=N),Y!==st)){if(ot=hf,q="onMouseLeave",D="onMouseEnter",E="mouse",(e==="pointerout"||e==="pointerover")&&(ot=df,q="onPointerLeave",D="onPointerEnter",E="pointer"),Gt=Y==null?H:Js(Y),U=st==null?H:Js(st),H=new ot(q,E+"leave",Y,s,X),H.target=Gt,H.relatedTarget=U,q=null,Kn(X)===N&&(ot=new ot(D,E+"enter",st,s,X),ot.target=U,ot.relatedTarget=Gt,q=ot),Gt=q,Y&&st)e:{for(ot=Rx,D=Y,E=st,U=0,q=D;q;q=ot(q))U++;q=0;for(var ut=E;ut;ut=ot(ut))q++;for(;0<U-q;)D=ot(D),U--;for(;0<q-U;)E=ot(E),q--;for(;U--;){if(D===E||E!==null&&D===E.alternate){ot=D;break e}D=ot(D),E=ot(E)}ot=null}else ot=null;Y!==null&&sg(V,H,Y,ot,!1),st!==null&&Gt!==null&&sg(V,Gt,st,ot,!0)}}t:{if(H=N?Js(N):window,Y=H.nodeName&&H.nodeName.toLowerCase(),Y==="select"||Y==="input"&&H.type==="file")var Ct=vf;else if(xf(H))if(Sf)Ct=Y_;else{Ct=H_;var lt=k_}else Y=H.nodeName,!Y||Y.toLowerCase()!=="input"||H.type!=="checkbox"&&H.type!=="radio"?N&&pu(N.elementType)&&(Ct=vf):Ct=L_;if(Ct&&(Ct=Ct(e,N))){bf(V,Ct,s,X);break t}lt&&lt(e,H,N),e==="focusout"&&N&&H.type==="number"&&N.memoizedProps.value!=null&&gu(H,"number",H.value)}switch(lt=N?Js(N):window,e){case"focusin":(xf(lt)||lt.contentEditable==="true")&&(as=lt,zu=N,ra=null);break;case"focusout":ra=zu=as=null;break;case"mousedown":Du=!0;break;case"contextmenu":case"mouseup":case"dragend":Du=!1,zf(V,s,X);break;case"selectionchange":if(X_)break;case"keydown":case"keyup":zf(V,s,X)}var gt;if(Mu)t:{switch(e){case"compositionstart":var bt="onCompositionStart";break t;case"compositionend":bt="onCompositionEnd";break t;case"compositionupdate":bt="onCompositionUpdate";break t}bt=void 0}else ss?yf(e,s)&&(bt="onCompositionEnd"):e==="keydown"&&s.keyCode===229&&(bt="onCompositionStart");bt&&(mf&&s.locale!=="ko"&&(ss||bt!=="onCompositionStart"?bt==="onCompositionEnd"&&ss&&(gt=of()):(Wi=X,vu="value"in Wi?Wi.value:Wi.textContent,ss=!0)),lt=yr(N,bt),0<lt.length&&(bt=new ff(bt,e,null,s,X),V.push({event:bt,listeners:lt}),gt?bt.data=gt:(gt=_f(s),gt!==null&&(bt.data=gt)))),(gt=B_?O_(e,s):G_(e,s))&&(bt=yr(N,"onBeforeInput"),0<bt.length&&(lt=new ff("onBeforeInput","beforeinput",null,s,X),V.push({event:lt,listeners:bt}),lt.data=gt)),Cx(V,e,N,s,X)}ig(V,i)})}function Ba(e,i,s){return{instance:e,listener:i,currentTarget:s}}function yr(e,i){for(var s=i+"Capture",r=[];e!==null;){var h=e,d=h.stateNode;if(h=h.tag,h!==5&&h!==26&&h!==27||d===null||(h=$s(e,s),h!=null&&r.unshift(Ba(e,h,d)),h=$s(e,i),h!=null&&r.push(Ba(e,h,d))),e.tag===3)return r;e=e.return}return[]}function Rx(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function sg(e,i,s,r,h){for(var d=i._reactName,y=[];s!==null&&s!==r;){var v=s,C=v.alternate,N=v.stateNode;if(v=v.tag,C!==null&&C===r)break;v!==5&&v!==26&&v!==27||N===null||(C=N,h?(N=$s(s,d),N!=null&&y.unshift(Ba(s,N,C))):h||(N=$s(s,d),N!=null&&y.push(Ba(s,N,C)))),s=s.return}y.length!==0&&e.push({event:i,listeners:y})}var zx=/\r\n?/g,Dx=/\u0000|\uFFFD/g;function ag(e){return(typeof e=="string"?e:""+e).replace(zx,`
50
+ `).replace(Dx,"")}function lg(e,i){return i=ag(i),ag(e)===i}function Ot(e,i,s,r,h,d){switch(s){case"children":typeof r=="string"?i==="body"||i==="textarea"&&r===""||es(e,r):(typeof r=="number"||typeof r=="bigint")&&i!=="body"&&es(e,""+r);break;case"className":vl(e,"class",r);break;case"tabIndex":vl(e,"tabindex",r);break;case"dir":case"role":case"viewBox":case"width":case"height":vl(e,s,r);break;case"style":lf(e,r,d);break;case"data":if(i!=="object"){vl(e,"data",r);break}case"src":case"href":if(r===""&&(i!=="a"||s!=="href")){e.removeAttribute(s);break}if(r==null||typeof r=="function"||typeof r=="symbol"||typeof r=="boolean"){e.removeAttribute(s);break}r=Tl(""+r),e.setAttribute(s,r);break;case"action":case"formAction":if(typeof r=="function"){e.setAttribute(s,"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 d=="function"&&(s==="formAction"?(i!=="input"&&Ot(e,i,"name",h.name,h,null),Ot(e,i,"formEncType",h.formEncType,h,null),Ot(e,i,"formMethod",h.formMethod,h,null),Ot(e,i,"formTarget",h.formTarget,h,null)):(Ot(e,i,"encType",h.encType,h,null),Ot(e,i,"method",h.method,h,null),Ot(e,i,"target",h.target,h,null)));if(r==null||typeof r=="symbol"||typeof r=="boolean"){e.removeAttribute(s);break}r=Tl(""+r),e.setAttribute(s,r);break;case"onClick":r!=null&&(e.onclick=vi);break;case"onScroll":r!=null&&_t("scroll",e);break;case"onScrollEnd":r!=null&&_t("scrollend",e);break;case"dangerouslySetInnerHTML":if(r!=null){if(typeof r!="object"||!("__html"in r))throw Error(a(61));if(s=r.__html,s!=null){if(h.children!=null)throw Error(a(60));e.innerHTML=s}}break;case"multiple":e.multiple=r&&typeof r!="function"&&typeof r!="symbol";break;case"muted":e.muted=r&&typeof r!="function"&&typeof r!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(r==null||typeof r=="function"||typeof r=="boolean"||typeof r=="symbol"){e.removeAttribute("xlink:href");break}s=Tl(""+r),e.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",s);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":r!=null&&typeof r!="function"&&typeof r!="symbol"?e.setAttribute(s,""+r):e.removeAttribute(s);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":r&&typeof r!="function"&&typeof r!="symbol"?e.setAttribute(s,""):e.removeAttribute(s);break;case"capture":case"download":r===!0?e.setAttribute(s,""):r!==!1&&r!=null&&typeof r!="function"&&typeof r!="symbol"?e.setAttribute(s,r):e.removeAttribute(s);break;case"cols":case"rows":case"size":case"span":r!=null&&typeof r!="function"&&typeof r!="symbol"&&!isNaN(r)&&1<=r?e.setAttribute(s,r):e.removeAttribute(s);break;case"rowSpan":case"start":r==null||typeof r=="function"||typeof r=="symbol"||isNaN(r)?e.removeAttribute(s):e.setAttribute(s,r);break;case"popover":_t("beforetoggle",e),_t("toggle",e),bl(e,"popover",r);break;case"xlinkActuate":bi(e,"http://www.w3.org/1999/xlink","xlink:actuate",r);break;case"xlinkArcrole":bi(e,"http://www.w3.org/1999/xlink","xlink:arcrole",r);break;case"xlinkRole":bi(e,"http://www.w3.org/1999/xlink","xlink:role",r);break;case"xlinkShow":bi(e,"http://www.w3.org/1999/xlink","xlink:show",r);break;case"xlinkTitle":bi(e,"http://www.w3.org/1999/xlink","xlink:title",r);break;case"xlinkType":bi(e,"http://www.w3.org/1999/xlink","xlink:type",r);break;case"xmlBase":bi(e,"http://www.w3.org/XML/1998/namespace","xml:base",r);break;case"xmlLang":bi(e,"http://www.w3.org/XML/1998/namespace","xml:lang",r);break;case"xmlSpace":bi(e,"http://www.w3.org/XML/1998/namespace","xml:space",r);break;case"is":bl(e,"is",r);break;case"innerText":case"textContent":break;default:(!(2<s.length)||s[0]!=="o"&&s[0]!=="O"||s[1]!=="n"&&s[1]!=="N")&&(s=a_.get(s)||s,bl(e,s,r))}}function nc(e,i,s,r,h,d){switch(s){case"style":lf(e,r,d);break;case"dangerouslySetInnerHTML":if(r!=null){if(typeof r!="object"||!("__html"in r))throw Error(a(61));if(s=r.__html,s!=null){if(h.children!=null)throw Error(a(60));e.innerHTML=s}}break;case"children":typeof r=="string"?es(e,r):(typeof r=="number"||typeof r=="bigint")&&es(e,""+r);break;case"onScroll":r!=null&&_t("scroll",e);break;case"onScrollEnd":r!=null&&_t("scrollend",e);break;case"onClick":r!=null&&(e.onclick=vi);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!Kh.hasOwnProperty(s))t:{if(s[0]==="o"&&s[1]==="n"&&(h=s.endsWith("Capture"),i=s.slice(2,h?s.length-7:void 0),d=e[ve]||null,d=d!=null?d[s]:null,typeof d=="function"&&e.removeEventListener(i,d,h),typeof r=="function")){typeof d!="function"&&d!==null&&(s in e?e[s]=null:e.hasAttribute(s)&&e.removeAttribute(s)),e.addEventListener(i,r,h);break t}s in e?e[s]=r:r===!0?e.setAttribute(s,""):bl(e,s,r)}}}function he(e,i,s){switch(i){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":_t("error",e),_t("load",e);var r=!1,h=!1,d;for(d in s)if(s.hasOwnProperty(d)){var y=s[d];if(y!=null)switch(d){case"src":r=!0;break;case"srcSet":h=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(a(137,i));default:Ot(e,i,d,y,s,null)}}h&&Ot(e,i,"srcSet",s.srcSet,s,null),r&&Ot(e,i,"src",s.src,s,null);return;case"input":_t("invalid",e);var v=d=y=h=null,C=null,N=null;for(r in s)if(s.hasOwnProperty(r)){var X=s[r];if(X!=null)switch(r){case"name":h=X;break;case"type":y=X;break;case"checked":C=X;break;case"defaultChecked":N=X;break;case"value":d=X;break;case"defaultValue":v=X;break;case"children":case"dangerouslySetInnerHTML":if(X!=null)throw Error(a(137,i));break;default:Ot(e,i,r,X,s,null)}}ef(e,d,v,C,N,y,h,!1);return;case"select":_t("invalid",e),r=y=d=null;for(h in s)if(s.hasOwnProperty(h)&&(v=s[h],v!=null))switch(h){case"value":d=v;break;case"defaultValue":y=v;break;case"multiple":r=v;default:Ot(e,i,h,v,s,null)}i=d,s=y,e.multiple=!!r,i!=null?ts(e,!!r,i,!1):s!=null&&ts(e,!!r,s,!0);return;case"textarea":_t("invalid",e),d=h=r=null;for(y in s)if(s.hasOwnProperty(y)&&(v=s[y],v!=null))switch(y){case"value":r=v;break;case"defaultValue":h=v;break;case"children":d=v;break;case"dangerouslySetInnerHTML":if(v!=null)throw Error(a(91));break;default:Ot(e,i,y,v,s,null)}sf(e,r,h,d);return;case"option":for(C in s)if(s.hasOwnProperty(C)&&(r=s[C],r!=null))switch(C){case"selected":e.selected=r&&typeof r!="function"&&typeof r!="symbol";break;default:Ot(e,i,C,r,s,null)}return;case"dialog":_t("beforetoggle",e),_t("toggle",e),_t("cancel",e),_t("close",e);break;case"iframe":case"object":_t("load",e);break;case"video":case"audio":for(r=0;r<Da.length;r++)_t(Da[r],e);break;case"image":_t("error",e),_t("load",e);break;case"details":_t("toggle",e);break;case"embed":case"source":case"link":_t("error",e),_t("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(N in s)if(s.hasOwnProperty(N)&&(r=s[N],r!=null))switch(N){case"children":case"dangerouslySetInnerHTML":throw Error(a(137,i));default:Ot(e,i,N,r,s,null)}return;default:if(pu(i)){for(X in s)s.hasOwnProperty(X)&&(r=s[X],r!==void 0&&nc(e,i,X,r,s,void 0));return}}for(v in s)s.hasOwnProperty(v)&&(r=s[v],r!=null&&Ot(e,i,v,r,s,null))}function Bx(e,i,s,r){switch(i){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var h=null,d=null,y=null,v=null,C=null,N=null,X=null;for(Y in s){var V=s[Y];if(s.hasOwnProperty(Y)&&V!=null)switch(Y){case"checked":break;case"value":break;case"defaultValue":C=V;default:r.hasOwnProperty(Y)||Ot(e,i,Y,null,r,V)}}for(var H in r){var Y=r[H];if(V=s[H],r.hasOwnProperty(H)&&(Y!=null||V!=null))switch(H){case"type":d=Y;break;case"name":h=Y;break;case"checked":N=Y;break;case"defaultChecked":X=Y;break;case"value":y=Y;break;case"defaultValue":v=Y;break;case"children":case"dangerouslySetInnerHTML":if(Y!=null)throw Error(a(137,i));break;default:Y!==V&&Ot(e,i,H,Y,r,V)}}mu(e,y,v,C,N,X,d,h);return;case"select":Y=y=v=H=null;for(d in s)if(C=s[d],s.hasOwnProperty(d)&&C!=null)switch(d){case"value":break;case"multiple":Y=C;default:r.hasOwnProperty(d)||Ot(e,i,d,null,r,C)}for(h in r)if(d=r[h],C=s[h],r.hasOwnProperty(h)&&(d!=null||C!=null))switch(h){case"value":H=d;break;case"defaultValue":v=d;break;case"multiple":y=d;default:d!==C&&Ot(e,i,h,d,r,C)}i=v,s=y,r=Y,H!=null?ts(e,!!s,H,!1):!!r!=!!s&&(i!=null?ts(e,!!s,i,!0):ts(e,!!s,s?[]:"",!1));return;case"textarea":Y=H=null;for(v in s)if(h=s[v],s.hasOwnProperty(v)&&h!=null&&!r.hasOwnProperty(v))switch(v){case"value":break;case"children":break;default:Ot(e,i,v,null,r,h)}for(y in r)if(h=r[y],d=s[y],r.hasOwnProperty(y)&&(h!=null||d!=null))switch(y){case"value":H=h;break;case"defaultValue":Y=h;break;case"children":break;case"dangerouslySetInnerHTML":if(h!=null)throw Error(a(91));break;default:h!==d&&Ot(e,i,y,h,r,d)}nf(e,H,Y);return;case"option":for(var st in s)if(H=s[st],s.hasOwnProperty(st)&&H!=null&&!r.hasOwnProperty(st))switch(st){case"selected":e.selected=!1;break;default:Ot(e,i,st,null,r,H)}for(C in r)if(H=r[C],Y=s[C],r.hasOwnProperty(C)&&H!==Y&&(H!=null||Y!=null))switch(C){case"selected":e.selected=H&&typeof H!="function"&&typeof H!="symbol";break;default:Ot(e,i,C,H,r,Y)}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 ot in s)H=s[ot],s.hasOwnProperty(ot)&&H!=null&&!r.hasOwnProperty(ot)&&Ot(e,i,ot,null,r,H);for(N in r)if(H=r[N],Y=s[N],r.hasOwnProperty(N)&&H!==Y&&(H!=null||Y!=null))switch(N){case"children":case"dangerouslySetInnerHTML":if(H!=null)throw Error(a(137,i));break;default:Ot(e,i,N,H,r,Y)}return;default:if(pu(i)){for(var Gt in s)H=s[Gt],s.hasOwnProperty(Gt)&&H!==void 0&&!r.hasOwnProperty(Gt)&&nc(e,i,Gt,void 0,r,H);for(X in r)H=r[X],Y=s[X],!r.hasOwnProperty(X)||H===Y||H===void 0&&Y===void 0||nc(e,i,X,H,r,Y);return}}for(var D in s)H=s[D],s.hasOwnProperty(D)&&H!=null&&!r.hasOwnProperty(D)&&Ot(e,i,D,null,r,H);for(V in r)H=r[V],Y=s[V],!r.hasOwnProperty(V)||H===Y||H==null&&Y==null||Ot(e,i,V,H,r,Y)}function rg(e){switch(e){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function Ox(){if(typeof performance.getEntriesByType=="function"){for(var e=0,i=0,s=performance.getEntriesByType("resource"),r=0;r<s.length;r++){var h=s[r],d=h.transferSize,y=h.initiatorType,v=h.duration;if(d&&v&&rg(y)){for(y=0,v=h.responseEnd,r+=1;r<s.length;r++){var C=s[r],N=C.startTime;if(N>v)break;var X=C.transferSize,V=C.initiatorType;X&&rg(V)&&(C=C.responseEnd,y+=X*(C<v?1:(v-N)/(C-N)))}if(--r,i+=8*(d+y)/(h.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 sc=null,ac=null;function _r(e){return e.nodeType===9?e:e.ownerDocument}function ug(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 og(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 lc(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 rc=null;function Gx(){var e=window.event;return e&&e.type==="popstate"?e===rc?!1:(rc=e,!0):(rc=null,!1)}var cg=typeof setTimeout=="function"?setTimeout:void 0,Ux=typeof clearTimeout=="function"?clearTimeout:void 0,hg=typeof Promise=="function"?Promise:void 0,Nx=typeof queueMicrotask=="function"?queueMicrotask:typeof hg<"u"?function(e){return hg.resolve(null).then(e).catch(kx)}:cg;function kx(e){setTimeout(function(){throw e})}function dn(e){return e==="head"}function fg(e,i){var s=i,r=0;do{var h=s.nextSibling;if(e.removeChild(s),h&&h.nodeType===8)if(s=h.data,s==="/$"||s==="/&"){if(r===0){e.removeChild(h),Bs(i);return}r--}else if(s==="$"||s==="$?"||s==="$~"||s==="$!"||s==="&")r++;else if(s==="html")Oa(e.ownerDocument.documentElement);else if(s==="head"){s=e.ownerDocument.head,Oa(s);for(var d=s.firstChild;d;){var y=d.nextSibling,v=d.nodeName;d[Is]||v==="SCRIPT"||v==="STYLE"||v==="LINK"&&d.rel.toLowerCase()==="stylesheet"||s.removeChild(d),d=y}}else s==="body"&&Oa(e.ownerDocument.body);s=h}while(s);Bs(i)}function dg(e,i){var s=e;e=0;do{var r=s.nextSibling;if(s.nodeType===1?i?(s._stashedDisplay=s.style.display,s.style.display="none"):(s.style.display=s._stashedDisplay||"",s.getAttribute("style")===""&&s.removeAttribute("style")):s.nodeType===3&&(i?(s._stashedText=s.nodeValue,s.nodeValue=""):s.nodeValue=s._stashedText||""),r&&r.nodeType===8)if(s=r.data,s==="/$"){if(e===0)break;e--}else s!=="$"&&s!=="$?"&&s!=="$~"&&s!=="$!"||e++;s=r}while(s)}function uc(e){var i=e.firstChild;for(i&&i.nodeType===10&&(i=i.nextSibling);i;){var s=i;switch(i=i.nextSibling,s.nodeName){case"HTML":case"HEAD":case"BODY":uc(s),fu(s);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(s.rel.toLowerCase()==="stylesheet")continue}e.removeChild(s)}}function Hx(e,i,s,r){for(;e.nodeType===1;){var h=s;if(e.nodeName.toLowerCase()!==i.toLowerCase()){if(!r&&(e.nodeName!=="INPUT"||e.type!=="hidden"))break}else if(r){if(!e[Is])switch(i){case"meta":if(!e.hasAttribute("itemprop"))break;return e;case"link":if(d=e.getAttribute("rel"),d==="stylesheet"&&e.hasAttribute("data-precedence"))break;if(d!==h.rel||e.getAttribute("href")!==(h.href==null||h.href===""?null:h.href)||e.getAttribute("crossorigin")!==(h.crossOrigin==null?null:h.crossOrigin)||e.getAttribute("title")!==(h.title==null?null:h.title))break;return e;case"style":if(e.hasAttribute("data-precedence"))break;return e;case"script":if(d=e.getAttribute("src"),(d!==(h.src==null?null:h.src)||e.getAttribute("type")!==(h.type==null?null:h.type)||e.getAttribute("crossorigin")!==(h.crossOrigin==null?null:h.crossOrigin))&&d&&e.hasAttribute("async")&&!e.hasAttribute("itemprop"))break;return e;default:return e}}else if(i==="input"&&e.type==="hidden"){var d=h.name==null?null:""+h.name;if(h.type==="hidden"&&e.getAttribute("name")===d)return e}else return e;if(e=Ie(e.nextSibling),e===null)break}return null}function Lx(e,i,s){if(i==="")return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!s||(e=Ie(e.nextSibling),e===null))return null;return e}function mg(e,i){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!i||(e=Ie(e.nextSibling),e===null))return null;return e}function oc(e){return e.data==="$?"||e.data==="$~"}function cc(e){return e.data==="$!"||e.data==="$?"&&e.ownerDocument.readyState!=="loading"}function Yx(e,i){var s=e.ownerDocument;if(e.data==="$~")e._reactRetry=i;else if(e.data!=="$?"||s.readyState!=="loading")i();else{var r=function(){i(),s.removeEventListener("DOMContentLoaded",r)};s.addEventListener("DOMContentLoaded",r),e._reactRetry=r}}function Ie(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 hc=null;function gg(e){e=e.nextSibling;for(var i=0;e;){if(e.nodeType===8){var s=e.data;if(s==="/$"||s==="/&"){if(i===0)return Ie(e.nextSibling);i--}else s!=="$"&&s!=="$!"&&s!=="$?"&&s!=="$~"&&s!=="&"||i++}e=e.nextSibling}return null}function pg(e){e=e.previousSibling;for(var i=0;e;){if(e.nodeType===8){var s=e.data;if(s==="$"||s==="$!"||s==="$?"||s==="$~"||s==="&"){if(i===0)return e;i--}else s!=="/$"&&s!=="/&"||i++}e=e.previousSibling}return null}function yg(e,i,s){switch(i=_r(s),e){case"html":if(e=i.documentElement,!e)throw Error(a(452));return e;case"head":if(e=i.head,!e)throw Error(a(453));return e;case"body":if(e=i.body,!e)throw Error(a(454));return e;default:throw Error(a(451))}}function Oa(e){for(var i=e.attributes;i.length;)e.removeAttributeNode(i[0]);fu(e)}var Je=new Map,_g=new Set;function xr(e){return typeof e.getRootNode=="function"?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var ki=L.d;L.d={f:jx,r:Xx,D:qx,C:Vx,L:Px,m:Fx,X:Zx,S:Qx,M:Wx};function jx(){var e=ki.f(),i=cr();return e||i}function Xx(e){var i=In(e);i!==null&&i.tag===5&&i.type==="form"?Ud(i):ki.r(e)}var Rs=typeof document>"u"?null:document;function xg(e,i,s){var r=Rs;if(r&&typeof i=="string"&&i){var h=Ve(i);h='link[rel="'+e+'"][href="'+h+'"]',typeof s=="string"&&(h+='[crossorigin="'+s+'"]'),_g.has(h)||(_g.add(h),e={rel:e,crossOrigin:s,href:i},r.querySelector(h)===null&&(i=r.createElement("link"),he(i,"link",e),se(i),r.head.appendChild(i)))}}function qx(e){ki.D(e),xg("dns-prefetch",e,null)}function Vx(e,i){ki.C(e,i),xg("preconnect",e,i)}function Px(e,i,s){ki.L(e,i,s);var r=Rs;if(r&&e&&i){var h='link[rel="preload"][as="'+Ve(i)+'"]';i==="image"&&s&&s.imageSrcSet?(h+='[imagesrcset="'+Ve(s.imageSrcSet)+'"]',typeof s.imageSizes=="string"&&(h+='[imagesizes="'+Ve(s.imageSizes)+'"]')):h+='[href="'+Ve(e)+'"]';var d=h;switch(i){case"style":d=zs(e);break;case"script":d=Ds(e)}Je.has(d)||(e=_({rel:"preload",href:i==="image"&&s&&s.imageSrcSet?void 0:e,as:i},s),Je.set(d,e),r.querySelector(h)!==null||i==="style"&&r.querySelector(Ga(d))||i==="script"&&r.querySelector(Ua(d))||(i=r.createElement("link"),he(i,"link",e),se(i),r.head.appendChild(i)))}}function Fx(e,i){ki.m(e,i);var s=Rs;if(s&&e){var r=i&&typeof i.as=="string"?i.as:"script",h='link[rel="modulepreload"][as="'+Ve(r)+'"][href="'+Ve(e)+'"]',d=h;switch(r){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":d=Ds(e)}if(!Je.has(d)&&(e=_({rel:"modulepreload",href:e},i),Je.set(d,e),s.querySelector(h)===null)){switch(r){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(s.querySelector(Ua(d)))return}r=s.createElement("link"),he(r,"link",e),se(r),s.head.appendChild(r)}}}function Qx(e,i,s){ki.S(e,i,s);var r=Rs;if(r&&e){var h=Jn(r).hoistableStyles,d=zs(e);i=i||"default";var y=h.get(d);if(!y){var v={loading:0,preload:null};if(y=r.querySelector(Ga(d)))v.loading=5;else{e=_({rel:"stylesheet",href:e,"data-precedence":i},s),(s=Je.get(d))&&fc(e,s);var C=y=r.createElement("link");se(C),he(C,"link",e),C._p=new Promise(function(N,X){C.onload=N,C.onerror=X}),C.addEventListener("load",function(){v.loading|=1}),C.addEventListener("error",function(){v.loading|=2}),v.loading|=4,br(y,i,r)}y={type:"stylesheet",instance:y,count:1,state:v},h.set(d,y)}}}function Zx(e,i){ki.X(e,i);var s=Rs;if(s&&e){var r=Jn(s).hoistableScripts,h=Ds(e),d=r.get(h);d||(d=s.querySelector(Ua(h)),d||(e=_({src:e,async:!0},i),(i=Je.get(h))&&dc(e,i),d=s.createElement("script"),se(d),he(d,"link",e),s.head.appendChild(d)),d={type:"script",instance:d,count:1,state:null},r.set(h,d))}}function Wx(e,i){ki.M(e,i);var s=Rs;if(s&&e){var r=Jn(s).hoistableScripts,h=Ds(e),d=r.get(h);d||(d=s.querySelector(Ua(h)),d||(e=_({src:e,async:!0,type:"module"},i),(i=Je.get(h))&&dc(e,i),d=s.createElement("script"),se(d),he(d,"link",e),s.head.appendChild(d)),d={type:"script",instance:d,count:1,state:null},r.set(h,d))}}function bg(e,i,s,r){var h=(h=ct.current)?xr(h):null;if(!h)throw Error(a(446));switch(e){case"meta":case"title":return null;case"style":return typeof s.precedence=="string"&&typeof s.href=="string"?(i=zs(s.href),s=Jn(h).hoistableStyles,r=s.get(i),r||(r={type:"style",instance:null,count:0,state:null},s.set(i,r)),r):{type:"void",instance:null,count:0,state:null};case"link":if(s.rel==="stylesheet"&&typeof s.href=="string"&&typeof s.precedence=="string"){e=zs(s.href);var d=Jn(h).hoistableStyles,y=d.get(e);if(y||(h=h.ownerDocument||h,y={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},d.set(e,y),(d=h.querySelector(Ga(e)))&&!d._p&&(y.instance=d,y.state.loading=5),Je.has(e)||(s={rel:"preload",as:"style",href:s.href,crossOrigin:s.crossOrigin,integrity:s.integrity,media:s.media,hrefLang:s.hrefLang,referrerPolicy:s.referrerPolicy},Je.set(e,s),d||Kx(h,e,s,y.state))),i&&r===null)throw Error(a(528,""));return y}if(i&&r!==null)throw Error(a(529,""));return null;case"script":return i=s.async,s=s.src,typeof s=="string"&&i&&typeof i!="function"&&typeof i!="symbol"?(i=Ds(s),s=Jn(h).hoistableScripts,r=s.get(i),r||(r={type:"script",instance:null,count:0,state:null},s.set(i,r)),r):{type:"void",instance:null,count:0,state:null};default:throw Error(a(444,e))}}function zs(e){return'href="'+Ve(e)+'"'}function Ga(e){return'link[rel="stylesheet"]['+e+"]"}function vg(e){return _({},e,{"data-precedence":e.precedence,precedence:null})}function Kx(e,i,s,r){e.querySelector('link[rel="preload"][as="style"]['+i+"]")?r.loading=1:(i=e.createElement("link"),r.preload=i,i.addEventListener("load",function(){return r.loading|=1}),i.addEventListener("error",function(){return r.loading|=2}),he(i,"link",s),se(i),e.head.appendChild(i))}function Ds(e){return'[src="'+Ve(e)+'"]'}function Ua(e){return"script[async]"+e}function Sg(e,i,s){if(i.count++,i.instance===null)switch(i.type){case"style":var r=e.querySelector('style[data-href~="'+Ve(s.href)+'"]');if(r)return i.instance=r,se(r),r;var h=_({},s,{"data-href":s.href,"data-precedence":s.precedence,href:null,precedence:null});return r=(e.ownerDocument||e).createElement("style"),se(r),he(r,"style",h),br(r,s.precedence,e),i.instance=r;case"stylesheet":h=zs(s.href);var d=e.querySelector(Ga(h));if(d)return i.state.loading|=4,i.instance=d,se(d),d;r=vg(s),(h=Je.get(h))&&fc(r,h),d=(e.ownerDocument||e).createElement("link"),se(d);var y=d;return y._p=new Promise(function(v,C){y.onload=v,y.onerror=C}),he(d,"link",r),i.state.loading|=4,br(d,s.precedence,e),i.instance=d;case"script":return d=Ds(s.src),(h=e.querySelector(Ua(d)))?(i.instance=h,se(h),h):(r=s,(h=Je.get(d))&&(r=_({},s),dc(r,h)),e=e.ownerDocument||e,h=e.createElement("script"),se(h),he(h,"link",r),e.head.appendChild(h),i.instance=h);case"void":return null;default:throw Error(a(443,i.type))}else i.type==="stylesheet"&&(i.state.loading&4)===0&&(r=i.instance,i.state.loading|=4,br(r,s.precedence,e));return i.instance}function br(e,i,s){for(var r=s.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),h=r.length?r[r.length-1]:null,d=h,y=0;y<r.length;y++){var v=r[y];if(v.dataset.precedence===i)d=v;else if(d!==h)break}d?d.parentNode.insertBefore(e,d.nextSibling):(i=s.nodeType===9?s.head:s,i.insertBefore(e,i.firstChild))}function fc(e,i){e.crossOrigin==null&&(e.crossOrigin=i.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=i.referrerPolicy),e.title==null&&(e.title=i.title)}function dc(e,i){e.crossOrigin==null&&(e.crossOrigin=i.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=i.referrerPolicy),e.integrity==null&&(e.integrity=i.integrity)}var vr=null;function Tg(e,i,s){if(vr===null){var r=new Map,h=vr=new Map;h.set(s,r)}else h=vr,r=h.get(s),r||(r=new Map,h.set(s,r));if(r.has(e))return r;for(r.set(e,null),s=s.getElementsByTagName(e),h=0;h<s.length;h++){var d=s[h];if(!(d[Is]||d[re]||e==="link"&&d.getAttribute("rel")==="stylesheet")&&d.namespaceURI!=="http://www.w3.org/2000/svg"){var y=d.getAttribute(i)||"";y=e+y;var v=r.get(y);v?v.push(d):r.set(y,[d])}}return r}function Ag(e,i,s){e=e.ownerDocument||e,e.head.insertBefore(s,i==="title"?e.querySelector("head > title"):null)}function Ix(e,i,s){if(s===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 Cg(e){return!(e.type==="stylesheet"&&(e.state.loading&3)===0)}function Jx(e,i,s,r){if(s.type==="stylesheet"&&(typeof r.media!="string"||matchMedia(r.media).matches!==!1)&&(s.state.loading&4)===0){if(s.instance===null){var h=zs(r.href),d=i.querySelector(Ga(h));if(d){i=d._p,i!==null&&typeof i=="object"&&typeof i.then=="function"&&(e.count++,e=Sr.bind(e),i.then(e,e)),s.state.loading|=4,s.instance=d,se(d);return}d=i.ownerDocument||i,r=vg(r),(h=Je.get(h))&&fc(r,h),d=d.createElement("link"),se(d);var y=d;y._p=new Promise(function(v,C){y.onload=v,y.onerror=C}),he(d,"link",r),s.instance=d}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(s,i),(i=s.state.preload)&&(s.state.loading&3)===0&&(e.count++,s=Sr.bind(e),i.addEventListener("load",s),i.addEventListener("error",s))}}var mc=0;function $x(e,i){return e.stylesheets&&e.count===0&&Ar(e,e.stylesheets),0<e.count||0<e.imgCount?function(s){var r=setTimeout(function(){if(e.stylesheets&&Ar(e,e.stylesheets),e.unsuspend){var d=e.unsuspend;e.unsuspend=null,d()}},6e4+i);0<e.imgBytes&&mc===0&&(mc=62500*Ox());var h=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&Ar(e,e.stylesheets),e.unsuspend)){var d=e.unsuspend;e.unsuspend=null,d()}},(e.imgBytes>mc?50:800)+i);return e.unsuspend=s,function(){e.unsuspend=null,clearTimeout(r),clearTimeout(h)}}:null}function Sr(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)Ar(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var Tr=null;function Ar(e,i){e.stylesheets=null,e.unsuspend!==null&&(e.count++,Tr=new Map,i.forEach(tb,e),Tr=null,Sr.call(e))}function tb(e,i){if(!(i.state.loading&4)){var s=Tr.get(e);if(s)var r=s.get(null);else{s=new Map,Tr.set(e,s);for(var h=e.querySelectorAll("link[data-precedence],style[data-precedence]"),d=0;d<h.length;d++){var y=h[d];(y.nodeName==="LINK"||y.getAttribute("media")!=="not all")&&(s.set(y.dataset.precedence,y),r=y)}r&&s.set(null,r)}h=i.instance,y=h.getAttribute("data-precedence"),d=s.get(y)||r,d===r&&s.set(null,h),s.set(y,h),this.count++,r=Sr.bind(this),h.addEventListener("load",r),h.addEventListener("error",r),d?d.parentNode.insertBefore(h,d.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(h,e.firstChild)),i.state.loading|=4}}var Na={$$typeof:B,Provider:null,Consumer:null,_currentValue:et,_currentValue2:et,_threadCount:0};function eb(e,i,s,r,h,d,y,v,C){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=uu(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=uu(0),this.hiddenUpdates=uu(null),this.identifierPrefix=r,this.onUncaughtError=h,this.onCaughtError=d,this.onRecoverableError=y,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=C,this.incompleteTransitions=new Map}function Mg(e,i,s,r,h,d,y,v,C,N,X,V){return e=new eb(e,i,s,y,C,N,X,V,v),i=1,d===!0&&(i|=24),d=Ge(3,null,null,i),e.current=d,d.stateNode=e,i=Fu(),i.refCount++,e.pooledCache=i,i.refCount++,d.memoizedState={element:r,isDehydrated:s,cache:i},Ku(d),e}function wg(e){return e?(e=us,e):us}function Eg(e,i,s,r,h,d){h=wg(h),r.context===null?r.context=h:r.pendingContext=h,r=en(i),r.payload={element:s},d=d===void 0?null:d,d!==null&&(r.callback=d),s=nn(e,r,i),s!==null&&(we(s,e,i),ma(s,e,i))}function Rg(e,i){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var s=e.retryLane;e.retryLane=s!==0&&s<i?s:i}}function gc(e,i){Rg(e,i),(e=e.alternate)&&Rg(e,i)}function zg(e){if(e.tag===13||e.tag===31){var i=Mn(e,67108864);i!==null&&we(i,e,67108864),gc(e,67108864)}}function Dg(e){if(e.tag===13||e.tag===31){var i=Le();i=ou(i);var s=Mn(e,i);s!==null&&we(s,e,i),gc(e,i)}}var Cr=!0;function ib(e,i,s,r){var h=R.T;R.T=null;var d=L.p;try{L.p=2,pc(e,i,s,r)}finally{L.p=d,R.T=h}}function nb(e,i,s,r){var h=R.T;R.T=null;var d=L.p;try{L.p=8,pc(e,i,s,r)}finally{L.p=d,R.T=h}}function pc(e,i,s,r){if(Cr){var h=yc(r);if(h===null)ic(e,i,r,Mr,s),Og(e,r);else if(ab(h,e,i,s,r))r.stopPropagation();else if(Og(e,r),i&4&&-1<sb.indexOf(e)){for(;h!==null;){var d=In(h);if(d!==null)switch(d.tag){case 3:if(d=d.stateNode,d.current.memoizedState.isDehydrated){var y=vn(d.pendingLanes);if(y!==0){var v=d;for(v.pendingLanes|=2,v.entangledLanes|=2;y;){var C=1<<31-Be(y);v.entanglements[1]|=C,y&=~C}pi(d),(Et&6)===0&&(ur=ze()+500,za(0))}}break;case 31:case 13:v=Mn(d,2),v!==null&&we(v,d,2),cr(),gc(d,2)}if(d=yc(r),d===null&&ic(e,i,r,Mr,s),d===h)break;h=d}h!==null&&r.stopPropagation()}else ic(e,i,r,null,s)}}function yc(e){return e=_u(e),_c(e)}var Mr=null;function _c(e){if(Mr=null,e=Kn(e),e!==null){var i=o(e);if(i===null)e=null;else{var s=i.tag;if(s===13){if(e=c(i),e!==null)return e;e=null}else if(s===31){if(e=f(i),e!==null)return e;e=null}else if(s===3){if(i.stateNode.current.memoizedState.isDehydrated)return i.tag===3?i.stateNode.containerInfo:null;e=null}else i!==e&&(e=null)}}return Mr=e,null}function Bg(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(q0()){case Lh:return 2;case Yh:return 8;case gl:case V0:return 32;case jh:return 268435456;default:return 32}default:return 32}}var xc=!1,mn=null,gn=null,pn=null,ka=new Map,Ha=new Map,yn=[],sb="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 Og(e,i){switch(e){case"focusin":case"focusout":mn=null;break;case"dragenter":case"dragleave":gn=null;break;case"mouseover":case"mouseout":pn=null;break;case"pointerover":case"pointerout":ka.delete(i.pointerId);break;case"gotpointercapture":case"lostpointercapture":Ha.delete(i.pointerId)}}function La(e,i,s,r,h,d){return e===null||e.nativeEvent!==d?(e={blockedOn:i,domEventName:s,eventSystemFlags:r,nativeEvent:d,targetContainers:[h]},i!==null&&(i=In(i),i!==null&&zg(i)),e):(e.eventSystemFlags|=r,i=e.targetContainers,h!==null&&i.indexOf(h)===-1&&i.push(h),e)}function ab(e,i,s,r,h){switch(i){case"focusin":return mn=La(mn,e,i,s,r,h),!0;case"dragenter":return gn=La(gn,e,i,s,r,h),!0;case"mouseover":return pn=La(pn,e,i,s,r,h),!0;case"pointerover":var d=h.pointerId;return ka.set(d,La(ka.get(d)||null,e,i,s,r,h)),!0;case"gotpointercapture":return d=h.pointerId,Ha.set(d,La(Ha.get(d)||null,e,i,s,r,h)),!0}return!1}function Gg(e){var i=Kn(e.target);if(i!==null){var s=o(i);if(s!==null){if(i=s.tag,i===13){if(i=c(s),i!==null){e.blockedOn=i,Qh(e.priority,function(){Dg(s)});return}}else if(i===31){if(i=f(s),i!==null){e.blockedOn=i,Qh(e.priority,function(){Dg(s)});return}}else if(i===3&&s.stateNode.current.memoizedState.isDehydrated){e.blockedOn=s.tag===3?s.stateNode.containerInfo:null;return}}}e.blockedOn=null}function wr(e){if(e.blockedOn!==null)return!1;for(var i=e.targetContainers;0<i.length;){var s=yc(e.nativeEvent);if(s===null){s=e.nativeEvent;var r=new s.constructor(s.type,s);yu=r,s.target.dispatchEvent(r),yu=null}else return i=In(s),i!==null&&zg(i),e.blockedOn=s,!1;i.shift()}return!0}function Ug(e,i,s){wr(e)&&s.delete(i)}function lb(){xc=!1,mn!==null&&wr(mn)&&(mn=null),gn!==null&&wr(gn)&&(gn=null),pn!==null&&wr(pn)&&(pn=null),ka.forEach(Ug),Ha.forEach(Ug)}function Er(e,i){e.blockedOn===i&&(e.blockedOn=null,xc||(xc=!0,l.unstable_scheduleCallback(l.unstable_NormalPriority,lb)))}var Rr=null;function Ng(e){Rr!==e&&(Rr=e,l.unstable_scheduleCallback(l.unstable_NormalPriority,function(){Rr===e&&(Rr=null);for(var i=0;i<e.length;i+=3){var s=e[i],r=e[i+1],h=e[i+2];if(typeof r!="function"){if(_c(r||s)===null)continue;break}var d=In(s);d!==null&&(e.splice(i,3),i-=3,yo(d,{pending:!0,data:h,method:s.method,action:r},r,h))}}))}function Bs(e){function i(C){return Er(C,e)}mn!==null&&Er(mn,e),gn!==null&&Er(gn,e),pn!==null&&Er(pn,e),ka.forEach(i),Ha.forEach(i);for(var s=0;s<yn.length;s++){var r=yn[s];r.blockedOn===e&&(r.blockedOn=null)}for(;0<yn.length&&(s=yn[0],s.blockedOn===null);)Gg(s),s.blockedOn===null&&yn.shift();if(s=(e.ownerDocument||e).$$reactFormReplay,s!=null)for(r=0;r<s.length;r+=3){var h=s[r],d=s[r+1],y=h[ve]||null;if(typeof d=="function")y||Ng(s);else if(y){var v=null;if(d&&d.hasAttribute("formAction")){if(h=d,y=d[ve]||null)v=y.formAction;else if(_c(h)!==null)continue}else v=y.action;typeof v=="function"?s[r+1]=v:(s.splice(r,3),r-=3),Ng(s)}}}function kg(){function e(d){d.canIntercept&&d.info==="react-transition"&&d.intercept({handler:function(){return new Promise(function(y){return h=y})},focusReset:"manual",scroll:"manual"})}function i(){h!==null&&(h(),h=null),r||setTimeout(s,20)}function s(){if(!r&&!navigation.transition){var d=navigation.currentEntry;d&&d.url!=null&&navigation.navigate(d.url,{state:d.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var r=!1,h=null;return navigation.addEventListener("navigate",e),navigation.addEventListener("navigatesuccess",i),navigation.addEventListener("navigateerror",i),setTimeout(s,100),function(){r=!0,navigation.removeEventListener("navigate",e),navigation.removeEventListener("navigatesuccess",i),navigation.removeEventListener("navigateerror",i),h!==null&&(h(),h=null)}}}function bc(e){this._internalRoot=e}zr.prototype.render=bc.prototype.render=function(e){var i=this._internalRoot;if(i===null)throw Error(a(409));var s=i.current,r=Le();Eg(s,r,e,i,null,null)},zr.prototype.unmount=bc.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var i=e.containerInfo;Eg(e.current,2,null,e,null,null),cr(),i[Wn]=null}};function zr(e){this._internalRoot=e}zr.prototype.unstable_scheduleHydration=function(e){if(e){var i=Fh();e={blockedOn:null,target:e,priority:i};for(var s=0;s<yn.length&&i!==0&&i<yn[s].priority;s++);yn.splice(s,0,e),s===0&&Gg(e)}};var Hg=t.version;if(Hg!=="19.2.4")throw Error(a(527,Hg,"19.2.4"));L.findDOMNode=function(e){var i=e._reactInternals;if(i===void 0)throw typeof e.render=="function"?Error(a(188)):(e=Object.keys(e).join(","),Error(a(268,e)));return e=g(i),e=e!==null?p(e):null,e=e===null?null:e.stateNode,e};var rb={bundleType:0,version:"19.2.4",rendererPackageName:"react-dom",currentDispatcherRef:R,reconcilerVersion:"19.2.4"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Dr=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Dr.isDisabled&&Dr.supportsFiber)try{Zs=Dr.inject(rb),De=Dr}catch{}}return ja.createRoot=function(e,i){if(!u(e))throw Error(a(299));var s=!1,r="",h=Pd,d=Fd,y=Qd;return i!=null&&(i.unstable_strictMode===!0&&(s=!0),i.identifierPrefix!==void 0&&(r=i.identifierPrefix),i.onUncaughtError!==void 0&&(h=i.onUncaughtError),i.onCaughtError!==void 0&&(d=i.onCaughtError),i.onRecoverableError!==void 0&&(y=i.onRecoverableError)),i=Mg(e,1,!1,null,null,s,r,null,h,d,y,kg),e[Wn]=i.current,ec(e),new bc(i)},ja.hydrateRoot=function(e,i,s){if(!u(e))throw Error(a(299));var r=!1,h="",d=Pd,y=Fd,v=Qd,C=null;return s!=null&&(s.unstable_strictMode===!0&&(r=!0),s.identifierPrefix!==void 0&&(h=s.identifierPrefix),s.onUncaughtError!==void 0&&(d=s.onUncaughtError),s.onCaughtError!==void 0&&(y=s.onCaughtError),s.onRecoverableError!==void 0&&(v=s.onRecoverableError),s.formState!==void 0&&(C=s.formState)),i=Mg(e,1,!0,i,s??null,r,h,C,d,y,v,kg),i.context=wg(null),s=i.current,r=Le(),r=ou(r),h=en(r),h.callback=null,nn(s,h,r),s=r,i.current.lanes=s,Ks(i,s),pi(i),e[Wn]=i.current,ec(e),new zr(i)},ja.version="19.2.4",ja}var Zg;function xb(){if(Zg)return Tc.exports;Zg=1;function l(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(l)}catch(t){console.error(t)}}return l(),Tc.exports=_b(),Tc.exports}var bb=xb();const Wg=l=>{let t;const n=new Set,a=(g,p)=>{const _=typeof g=="function"?g(t):g;if(!Object.is(_,t)){const b=t;t=p??(typeof _!="object"||_===null)?_:Object.assign({},t,_),n.forEach(x=>x(t,b))}},u=()=>t,f={setState:a,getState:u,getInitialState:()=>m,subscribe:g=>(n.add(g),()=>n.delete(g))},m=t=l(a,u,f);return f},vb=(l=>l?Wg(l):Wg),Sb=l=>l;function Tb(l,t=Sb){const n=Br.useSyncExternalStore(l.subscribe,Br.useCallback(()=>t(l.getState()),[l,t]),Br.useCallback(()=>t(l.getInitialState()),[l,t]));return Br.useDebugValue(n),n}const Kg=l=>{const t=vb(l),n=a=>Tb(t,a);return Object.assign(n,t),n},Ab=(l=>l?Kg(l):Kg),Rt=Ab(l=>({connected:!1,agents:[],tasks:[],messages:[],prs:[],sprint:null,selectedPR:null,wowEvents:[],setConnected:t=>l({connected:t}),setAgents:t=>l({agents:t}),setTasks:t=>l({tasks:t}),setSprint:t=>l({sprint:t}),setPRs:t=>l({prs:t}),setSelectedPR:t=>l({selectedPR:t}),addMessage:t=>l(n=>({messages:[...n.messages.slice(-199),t]})),updateAgent:(t,n)=>l(a=>({agents:a.agents.map(u=>u.id===t?{...u,...n}:u)})),updateTask:(t,n)=>l(a=>({tasks:a.tasks.map(u=>u.id===t?{...u,...n}:u)})),addPR:t=>l(n=>({prs:[...n.prs,t]})),updatePR:(t,n)=>l(a=>({prs:a.prs.map(u=>u.id===t?{...u,...n}:u)})),pushWow:t=>l(n=>({wowEvents:[...n.wowEvents,t]})),popWow:()=>{const n=Rt.getState().wowEvents;if(n.length===0)return;const a=n[0];return Rt.setState({wowEvents:n.slice(1)}),a}}));function Cb(){const l=ei.useRef(null),{setConnected:t,setAgents:n,setTasks:a,setPRs:u,addMessage:o,updateAgent:c,updateTask:f,addPR:m,updatePR:g}=Rt.getState();ei.useEffect(()=>{function p(){const b=window.location.protocol==="https:"?"wss:":"ws:",x=new WebSocket(`${b}//${window.location.host}`);l.current=x,x.onopen=()=>{Rt.setState({connected:!0})},x.onclose=()=>{Rt.setState({connected:!1}),setTimeout(p,2e3)},x.onerror=()=>{x.close()},x.onmessage=S=>{try{const A=JSON.parse(S.data);_(A)}catch{}}}function _(b){switch(b.type){case"snapshot":b.agents&&n(b.agents),b.tasks&&a(b.tasks),b.prs&&u(b.prs);break;case"agent:status":c(b.agentId,{status:b.status});break;case"agent:move":c(b.agentId,{position_room:b.room,position_seat:b.seat});break;case"task:status":f(b.taskId,{status:b.status});break;case"task:assigned":f(b.taskId,{assigned_to:b.agentId,status:"in_progress"}),c(b.agentId,{current_task_id:b.taskId,status:"coding"});break;case"task:completed":f(b.taskId,{status:"done"});break;case"message":o(b.message);break;case"pr:created":m(b.pr);break;case"pr:updated":g(b.prId,b.updates);break;case"sprint:created":Rt.setState({sprint:b.sprint});break;case"sprint:completed":Rt.setState(x=>({sprint:x.sprint?{...x.sprint,status:"completed"}:null})),Rt.getState().pushWow({type:"sprint:complete"});break;case"meeting:start":Rt.getState().pushWow({type:"meeting:start",agents:b.agents||[]});break;case"meeting:end":Rt.getState().pushWow({type:"meeting:end"});break;case"crisis:start":Rt.getState().pushWow({type:"crisis:start",reason:b.reason||""});break;case"crisis:resolved":Rt.getState().pushWow({type:"crisis:resolved"});break;case"pr:merged":Rt.getState().pushWow({type:"pr:merged",agentId:b.agentId,title:b.title});break;case"deploy:success":Rt.getState().pushWow({type:"deploy:success"});break;case"pair:start":Rt.getState().pushWow({type:"pair:start",agents:b.agents||[]});break;case"pair:end":Rt.getState().pushWow({type:"pair:end"});break}}return p(),()=>{var b;(b=l.current)==null||b.close()}},[])}const Mb="modulepreload",wb=function(l){return"/"+l},Ig={},Ja=function(t,n,a){let u=Promise.resolve();if(n&&n.length>0){let c=function(g){return Promise.all(g.map(p=>Promise.resolve(p).then(_=>({status:"fulfilled",value:_}),_=>({status:"rejected",reason:_}))))};document.getElementsByTagName("link");const f=document.querySelector("meta[property=csp-nonce]"),m=(f==null?void 0:f.nonce)||(f==null?void 0:f.getAttribute("nonce"));u=c(n.map(g=>{if(g=wb(g),g in Ig)return;Ig[g]=!0;const p=g.endsWith(".css"),_=p?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${g}"]${_}`))return;const b=document.createElement("link");if(b.rel=p?"stylesheet":Mb,p||(b.as="script"),b.crossOrigin="",b.href=g,m&&b.setAttribute("nonce",m),document.head.appendChild(b),p)return new Promise((x,S)=>{b.addEventListener("load",x),b.addEventListener("error",()=>S(new Error(`Unable to preload CSS for ${g}`)))})}))}function o(c){const f=new Event("vite:preloadError",{cancelable:!0});if(f.payload=c,window.dispatchEvent(f),!f.defaultPrevented)throw c}return u.then(c=>{for(const f of c||[])f.status==="rejected"&&o(f.reason);return t().catch(o)})};var pt=(l=>(l.Application="application",l.WebGLPipes="webgl-pipes",l.WebGLPipesAdaptor="webgl-pipes-adaptor",l.WebGLSystem="webgl-system",l.WebGPUPipes="webgpu-pipes",l.WebGPUPipesAdaptor="webgpu-pipes-adaptor",l.WebGPUSystem="webgpu-system",l.CanvasSystem="canvas-system",l.CanvasPipesAdaptor="canvas-pipes-adaptor",l.CanvasPipes="canvas-pipes",l.Asset="asset",l.LoadParser="load-parser",l.ResolveParser="resolve-parser",l.CacheParser="cache-parser",l.DetectionParser="detection-parser",l.MaskEffect="mask-effect",l.BlendMode="blend-mode",l.TextureSource="texture-source",l.Environment="environment",l.ShapeBuilder="shape-builder",l.Batcher="batcher",l))(pt||{});const th=l=>{if(typeof l=="function"||typeof l=="object"&&l.extension){if(!l.extension)throw new Error("Extension class must have an extension object");l={...typeof l.extension!="object"?{type:l.extension}:l.extension,ref:l}}if(typeof l=="object")l={...l};else throw new Error("Invalid extension type");return typeof l.type=="string"&&(l.type=[l.type]),l},Or=(l,t)=>th(l).priority??t,It={_addHandlers:{},_removeHandlers:{},_queue:{},remove(...l){return l.map(th).forEach(t=>{t.type.forEach(n=>{var a,u;return(u=(a=this._removeHandlers)[n])==null?void 0:u.call(a,t)})}),this},add(...l){return l.map(th).forEach(t=>{t.type.forEach(n=>{var o,c;const a=this._addHandlers,u=this._queue;a[n]?(c=a[n])==null||c.call(a,t):(u[n]=u[n]||[],(o=u[n])==null||o.push(t))})}),this},handle(l,t,n){var c;const a=this._addHandlers,u=this._removeHandlers;if(a[l]||u[l])throw new Error(`Extension type ${l} already has a handler`);a[l]=t,u[l]=n;const o=this._queue;return o[l]&&((c=o[l])==null||c.forEach(f=>t(f)),delete o[l]),this},handleByMap(l,t){return this.handle(l,n=>{n.name&&(t[n.name]=n.ref)},n=>{n.name&&delete t[n.name]})},handleByNamedList(l,t,n=-1){return this.handle(l,a=>{t.findIndex(o=>o.name===a.name)>=0||(t.push({name:a.name,value:a.ref}),t.sort((o,c)=>Or(c.value,n)-Or(o.value,n)))},a=>{const u=t.findIndex(o=>o.name===a.name);u!==-1&&t.splice(u,1)})},handleByList(l,t,n=-1){return this.handle(l,a=>{t.includes(a.ref)||(t.push(a.ref),t.sort((u,o)=>Or(o,n)-Or(u,n)))},a=>{const u=t.indexOf(a.ref);u!==-1&&t.splice(u,1)})},mixin(l,...t){for(const n of t)Object.defineProperties(l.prototype,Object.getOwnPropertyDescriptors(n))}},Eb={extension:{type:pt.Environment,name:"browser",priority:-1},test:()=>!0,load:async()=>{await Ja(()=>import("./browserAll-CDpBxY6s.js"),__vite__mapDeps([0,1,2]))}},Rb={extension:{type:pt.Environment,name:"webworker",priority:0},test:()=>typeof self<"u"&&self.WorkerGlobalScope!==void 0,load:async()=>{await Ja(()=>import("./webworkerAll-B9AvsPZH.js"),__vite__mapDeps([1,2]))}};class fe{constructor(t,n,a){this._x=n||0,this._y=a||0,this._observer=t}clone(t){return new fe(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 wc={exports:{}},Jg;function zb(){return Jg||(Jg=1,(function(l){var t=Object.prototype.hasOwnProperty,n="~";function a(){}Object.create&&(a.prototype=Object.create(null),new a().__proto__||(n=!1));function u(m,g,p){this.fn=m,this.context=g,this.once=p||!1}function o(m,g,p,_,b){if(typeof p!="function")throw new TypeError("The listener must be a function");var x=new u(p,_||m,b),S=n?n+g:g;return m._events[S]?m._events[S].fn?m._events[S]=[m._events[S],x]:m._events[S].push(x):(m._events[S]=x,m._eventsCount++),m}function c(m,g){--m._eventsCount===0?m._events=new a:delete m._events[g]}function f(){this._events=new a,this._eventsCount=0}f.prototype.eventNames=function(){var g=[],p,_;if(this._eventsCount===0)return g;for(_ in p=this._events)t.call(p,_)&&g.push(n?_.slice(1):_);return Object.getOwnPropertySymbols?g.concat(Object.getOwnPropertySymbols(p)):g},f.prototype.listeners=function(g){var p=n?n+g:g,_=this._events[p];if(!_)return[];if(_.fn)return[_.fn];for(var b=0,x=_.length,S=new Array(x);b<x;b++)S[b]=_[b].fn;return S},f.prototype.listenerCount=function(g){var p=n?n+g:g,_=this._events[p];return _?_.fn?1:_.length:0},f.prototype.emit=function(g,p,_,b,x,S){var A=n?n+g:g;if(!this._events[A])return!1;var T=this._events[A],M=arguments.length,z,B;if(T.fn){switch(T.once&&this.removeListener(g,T.fn,void 0,!0),M){case 1:return T.fn.call(T.context),!0;case 2:return T.fn.call(T.context,p),!0;case 3:return T.fn.call(T.context,p,_),!0;case 4:return T.fn.call(T.context,p,_,b),!0;case 5:return T.fn.call(T.context,p,_,b,x),!0;case 6:return T.fn.call(T.context,p,_,b,x,S),!0}for(B=1,z=new Array(M-1);B<M;B++)z[B-1]=arguments[B];T.fn.apply(T.context,z)}else{var O=T.length,F;for(B=0;B<O;B++)switch(T[B].once&&this.removeListener(g,T[B].fn,void 0,!0),M){case 1:T[B].fn.call(T[B].context);break;case 2:T[B].fn.call(T[B].context,p);break;case 3:T[B].fn.call(T[B].context,p,_);break;case 4:T[B].fn.call(T[B].context,p,_,b);break;default:if(!z)for(F=1,z=new Array(M-1);F<M;F++)z[F-1]=arguments[F];T[B].fn.apply(T[B].context,z)}}return!0},f.prototype.on=function(g,p,_){return o(this,g,p,_,!1)},f.prototype.once=function(g,p,_){return o(this,g,p,_,!0)},f.prototype.removeListener=function(g,p,_,b){var x=n?n+g:g;if(!this._events[x])return this;if(!p)return c(this,x),this;var S=this._events[x];if(S.fn)S.fn===p&&(!b||S.once)&&(!_||S.context===_)&&c(this,x);else{for(var A=0,T=[],M=S.length;A<M;A++)(S[A].fn!==p||b&&!S[A].once||_&&S[A].context!==_)&&T.push(S[A]);T.length?this._events[x]=T.length===1?T[0]:T:c(this,x)}return this},f.prototype.removeAllListeners=function(g){var p;return g?(p=n?n+g:g,this._events[p]&&c(this,p)):(this._events=new a,this._eventsCount=0),this},f.prototype.off=f.prototype.removeListener,f.prototype.addListener=f.prototype.on,f.prefixed=n,f.EventEmitter=f,l.exports=f})(wc)),wc.exports}var Db=zb();const xi=vh(Db),Bb=Math.PI*2,Ob=180/Math.PI,Gb=Math.PI/180;class ge{constructor(t=0,n=0){this.x=0,this.y=0,this.x=t,this.y=n}clone(){return new ge(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 Ec.x=0,Ec.y=0,Ec}}const Ec=new ge;class vt{constructor(t=1,n=0,a=0,u=1,o=0,c=0){this.array=null,this.a=t,this.b=n,this.c=a,this.d=u,this.tx=o,this.ty=c}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,a,u,o,c){return this.a=t,this.b=n,this.c=a,this.d=u,this.tx=o,this.ty=c,this}toArray(t,n){this.array||(this.array=new Float32Array(9));const a=n||this.array;return t?(a[0]=this.a,a[1]=this.b,a[2]=0,a[3]=this.c,a[4]=this.d,a[5]=0,a[6]=this.tx,a[7]=this.ty,a[8]=1):(a[0]=this.a,a[1]=this.c,a[2]=this.tx,a[3]=this.b,a[4]=this.d,a[5]=this.ty,a[6]=0,a[7]=0,a[8]=1),a}apply(t,n){n=n||new ge;const a=t.x,u=t.y;return n.x=this.a*a+this.c*u+this.tx,n.y=this.b*a+this.d*u+this.ty,n}applyInverse(t,n){n=n||new ge;const a=this.a,u=this.b,o=this.c,c=this.d,f=this.tx,m=this.ty,g=1/(a*c+o*-u),p=t.x,_=t.y;return n.x=c*g*p+-o*g*_+(m*o-f*c)*g,n.y=a*g*_+-u*g*p+(-m*a+f*u)*g,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),a=Math.sin(t),u=this.a,o=this.c,c=this.tx;return this.a=u*n-this.b*a,this.b=u*a+this.b*n,this.c=o*n-this.d*a,this.d=o*a+this.d*n,this.tx=c*n-this.ty*a,this.ty=c*a+this.ty*n,this}append(t){const n=this.a,a=this.b,u=this.c,o=this.d;return this.a=t.a*n+t.b*u,this.b=t.a*a+t.b*o,this.c=t.c*n+t.d*u,this.d=t.c*a+t.d*o,this.tx=t.tx*n+t.ty*u+this.tx,this.ty=t.tx*a+t.ty*o+this.ty,this}appendFrom(t,n){const a=t.a,u=t.b,o=t.c,c=t.d,f=t.tx,m=t.ty,g=n.a,p=n.b,_=n.c,b=n.d;return this.a=a*g+u*_,this.b=a*p+u*b,this.c=o*g+c*_,this.d=o*p+c*b,this.tx=f*g+m*_+n.tx,this.ty=f*p+m*b+n.ty,this}setTransform(t,n,a,u,o,c,f,m,g){return this.a=Math.cos(f+g)*o,this.b=Math.sin(f+g)*o,this.c=-Math.sin(f-m)*c,this.d=Math.cos(f-m)*c,this.tx=t-(a*this.a+u*this.c),this.ty=n-(a*this.b+u*this.d),this}prepend(t){const n=this.tx;if(t.a!==1||t.b!==0||t.c!==0||t.d!==1){const a=this.a,u=this.c;this.a=a*t.a+this.b*t.c,this.b=a*t.b+this.b*t.d,this.c=u*t.a+this.d*t.c,this.d=u*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,a=this.b,u=this.c,o=this.d,c=t.pivot,f=-Math.atan2(-u,o),m=Math.atan2(a,n),g=Math.abs(f+m);return g<1e-5||Math.abs(Bb-g)<1e-5?(t.rotation=m,t.skew.x=t.skew.y=0):(t.rotation=0,t.skew.x=f,t.skew.y=m),t.scale.x=Math.sqrt(n*n+a*a),t.scale.y=Math.sqrt(u*u+o*o),t.position.x=this.tx+(c.x*n+c.y*u),t.position.y=this.ty+(c.x*a+c.y*o),t}invert(){const t=this.a,n=this.b,a=this.c,u=this.d,o=this.tx,c=t*u-n*a;return this.a=u/c,this.b=-n/c,this.c=-a/c,this.d=t/c,this.tx=(a*this.ty-u*o)/c,this.ty=-(t*this.ty-n*o)/c,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 vt;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 Nb.identity()}static get shared(){return Ub.identity()}}const Ub=new vt,Nb=new vt,jn=[1,1,0,-1,-1,-1,0,1,1,1,0,-1,-1,-1,0,1],Xn=[0,1,1,1,0,-1,-1,-1,0,1,1,1,0,-1,-1,-1],qn=[0,-1,-1,-1,0,1,1,1,0,1,1,1,0,-1,-1,-1],Vn=[1,1,0,-1,-1,-1,0,1,-1,-1,0,1,1,1,0,-1],eh=[],cy=[],Gr=Math.sign;function kb(){for(let l=0;l<16;l++){const t=[];eh.push(t);for(let n=0;n<16;n++){const a=Gr(jn[l]*jn[n]+qn[l]*Xn[n]),u=Gr(Xn[l]*jn[n]+Vn[l]*Xn[n]),o=Gr(jn[l]*qn[n]+qn[l]*Vn[n]),c=Gr(Xn[l]*qn[n]+Vn[l]*Vn[n]);for(let f=0;f<16;f++)if(jn[f]===a&&Xn[f]===u&&qn[f]===o&&Vn[f]===c){t.push(f);break}}}for(let l=0;l<16;l++){const t=new vt;t.set(jn[l],Xn[l],qn[l],Vn[l],0,0),cy.push(t)}}kb();const kt={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:l=>jn[l],uY:l=>Xn[l],vX:l=>qn[l],vY:l=>Vn[l],inv:l=>l&8?l&15:-l&7,add:(l,t)=>eh[l][t],sub:(l,t)=>eh[l][kt.inv(t)],rotate180:l=>l^4,isVertical:l=>(l&3)===2,byDirection:(l,t)=>Math.abs(l)*2<=Math.abs(t)?t>=0?kt.S:kt.N:Math.abs(t)*2<=Math.abs(l)?l>0?kt.E:kt.W:t>0?l>0?kt.SE:kt.SW:l>0?kt.NE:kt.NW,matrixAppendRotationInv:(l,t,n=0,a=0,u=0,o=0)=>{const c=cy[kt.inv(t)],f=c.a,m=c.b,g=c.c,p=c.d,_=n-Math.min(0,f*u,g*o,f*u+g*o),b=a-Math.min(0,m*u,p*o,m*u+p*o),x=l.a,S=l.b,A=l.c,T=l.d;l.a=f*x+m*A,l.b=f*S+m*T,l.c=g*x+p*A,l.d=g*S+p*T,l.tx=_*x+b*A+l.tx,l.ty=_*S+b*T+l.ty},transformRectCoords:(l,t,n,a)=>{const{x:u,y:o,width:c,height:f}=l,{x:m,y:g,width:p,height:_}=t;return n===kt.E?(a.set(u+m,o+g,c,f),a):n===kt.S?a.set(p-o-f+m,u+g,f,c):n===kt.W?a.set(p-u-c+m,_-o-f+g,c,f):n===kt.N?a.set(o+m,_-u-c+g,f,c):a.set(u+m,o+g,c,f)}},Ur=[new ge,new ge,new ge,new ge];class Kt{constructor(t=0,n=0,a=0,u=0){this.type="rectangle",this.x=Number(t),this.y=Number(n),this.width=Number(a),this.height=Number(u)}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 Kt(0,0,0,0)}clone(){return new Kt(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,a,u=.5){const{width:o,height:c}=this;if(o<=0||c<=0)return!1;const f=this.x,m=this.y,g=a*(1-u),p=a-g,_=f-g,b=f+o+g,x=m-g,S=m+c+g,A=f+p,T=f+o-p,M=m+p,z=m+c-p;return t>=_&&t<=b&&n>=x&&n<=S&&!(t>A&&t<T&&n>M&&n<z)}intersects(t,n){if(!n){const $=this.x<t.x?t.x:this.x;if((this.right>t.right?t.right:this.right)<=$)return!1;const Z=this.y<t.y?t.y:this.y;return(this.bottom>t.bottom?t.bottom:this.bottom)>Z}const a=this.left,u=this.right,o=this.top,c=this.bottom;if(u<=a||c<=o)return!1;const f=Ur[0].set(t.left,t.top),m=Ur[1].set(t.left,t.bottom),g=Ur[2].set(t.right,t.top),p=Ur[3].set(t.right,t.bottom);if(g.x<=f.x||m.y<=f.y)return!1;const _=Math.sign(n.a*n.d-n.b*n.c);if(_===0||(n.apply(f,f),n.apply(m,m),n.apply(g,g),n.apply(p,p),Math.max(f.x,m.x,g.x,p.x)<=a||Math.min(f.x,m.x,g.x,p.x)>=u||Math.max(f.y,m.y,g.y,p.y)<=o||Math.min(f.y,m.y,g.y,p.y)>=c))return!1;const b=_*(m.y-f.y),x=_*(f.x-m.x),S=b*a+x*o,A=b*u+x*o,T=b*a+x*c,M=b*u+x*c;if(Math.max(S,A,T,M)<=b*f.x+x*f.y||Math.min(S,A,T,M)>=b*p.x+x*p.y)return!1;const z=_*(f.y-g.y),B=_*(g.x-f.x),O=z*a+B*o,F=z*u+B*o,k=z*a+B*c,G=z*u+B*c;return!(Math.max(O,F,k,G)<=z*f.x+B*f.y||Math.min(O,F,k,G)>=z*p.x+B*p.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),a=Math.min(this.x+this.width,t.x+t.width),u=Math.max(this.y,t.y),o=Math.min(this.y+this.height,t.y+t.height);return this.x=n,this.width=Math.max(a-n,0),this.y=u,this.height=Math.max(o-u,0),this}ceil(t=1,n=.001){const a=Math.ceil((this.x+this.width-n)*t)/t,u=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=a-this.x,this.height=u-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),a=Math.max(this.x+this.width,t.x+t.width),u=Math.min(this.y,t.y),o=Math.max(this.y+this.height,t.y+t.height);return this.x=n,this.width=a-n,this.y=u,this.height=o-u,this}getBounds(t){return t||(t=new Kt),t.copyFrom(this),t}containsRect(t){if(this.width<=0||this.height<=0)return!1;const n=t.x,a=t.y,u=t.x+t.width,o=t.y+t.height;return n>=this.x&&n<this.x+this.width&&a>=this.y&&a<this.y+this.height&&u>=this.x&&u<this.x+this.width&&o>=this.y&&o<this.y+this.height}set(t,n,a,u){return this.x=t,this.y=n,this.width=a,this.height=u,this}toString(){return`[pixi.js/math:Rectangle x=${this.x} y=${this.y} width=${this.width} height=${this.height}]`}}const Rc={default:-1};function Qt(l="default"){return Rc[l]===void 0&&(Rc[l]=-1),++Rc[l]}const $g=new Set,Ft="8.0.0",Hb="8.3.4",Ls={quiet:!1,noColor:!1},At=((l,t,n=3)=>{if(Ls.quiet||$g.has(t))return;let a=new Error().stack;const u=`${t}
51
+ Deprecated since v${l}`,o=typeof console.groupCollapsed=="function"&&!Ls.noColor;typeof a>"u"?console.warn("PixiJS Deprecation Warning: ",u):(a=a.split(`
52
+ `).splice(n).join(`
53
+ `),o?(console.groupCollapsed("%cPixiJS Deprecation Warning: %c%s","color:#614108;background:#fffbe6","font-weight:normal;color:#614108;background:#fffbe6",u),console.warn(a),console.groupEnd()):(console.warn("PixiJS Deprecation Warning: ",u),console.warn(a))),$g.add(t)});Object.defineProperties(At,{quiet:{get:()=>Ls.quiet,set:l=>{Ls.quiet=l},enumerable:!0,configurable:!1},noColor:{get:()=>Ls.noColor,set:l=>{Ls.noColor=l},enumerable:!0,configurable:!1}});const hy=()=>{};function Xs(l){return l+=l===0?1:0,--l,l|=l>>>1,l|=l>>>2,l|=l>>>4,l|=l>>>8,l|=l>>>16,l+1}function tp(l){return!(l&l-1)&&!!l}function fy(l){const t={};for(const n in l)l[n]!==void 0&&(t[n]=l[n]);return t}const ep=Object.create(null);function Lb(l){const t=ep[l];return t===void 0&&(ep[l]=Qt("resource")),t}const dy=class my extends xi{constructor(t={}){super(),this._resourceType="textureSampler",this._touched=0,this._maxAnisotropy=1,this.destroyed=!1,t={...my.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){At(Ft,"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=Lb(t),this._resourceId}destroy(){this.destroyed=!0,this.emit("destroy",this),this.emit("change",this),this.removeAllListeners()}};dy.defaultOptions={addressMode:"clamp-to-edge",scaleMode:"linear"};let qs=dy;const gy=class py extends xi{constructor(t={}){super(),this.options=t,this._gpuData=Object.create(null),this._gcLastUsed=-1,this.uid=Qt("textureSource"),this._resourceType="textureSource",this._resourceId=Qt("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={...py.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 qs(fy(t)),this.destroyed=!1,this._refreshPOT()}get source(){return this}get style(){return this._style}set style(t){var n,a;this.style!==t&&((n=this._style)==null||n.off("change",this._onStyleChange,this),this._style=t,(a=this._style)==null||a.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=Qt("resource"),this.emit("change",this),this.emit("unload",this);for(const a in this._gpuData)(n=(t=this._gpuData[a])==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,a){a||(a=this._resolution),t||(t=this.width),n||(n=this.height);const u=Math.round(t*a),o=Math.round(n*a);return this.width=u/a,this.height=o/a,this._resolution=a,this.pixelWidth===u&&this.pixelHeight===o?!1:(this._refreshPOT(),this.pixelWidth=u,this.pixelHeight=o,this.emit("resize",this),this._resourceId=Qt("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=tp(this.pixelWidth)&&tp(this.pixelHeight)}static test(t){throw new Error("Unimplemented")}};gy.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 si=gy;class Th extends si{constructor(t){const n=t.resource||new Float32Array(t.width*t.height*4);let a=t.format;a||(n instanceof Float32Array?a="rgba32float":n instanceof Int32Array||n instanceof Uint32Array?a="rgba32uint":n instanceof Int16Array||n instanceof Uint16Array?a="rgba16uint":(n instanceof Int8Array,a="bgra8unorm")),super({...t,resource:n,format:a}),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}}Th.extension=pt.TextureSource;const ip=new vt;class Yb{constructor(t,n){this.mapCoord=new vt,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 a=this.mapCoord;for(let u=0;u<t.length;u+=2){const o=t[u],c=t[u+1];n[u]=o*a.a+c*a.c+a.tx,n[u+1]=o*a.b+c*a.d+a.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 a=t.orig,u=t.trim;u&&(ip.set(a.width/u.width,0,0,a.height/u.height,-u.x/u.width,-u.y/u.height),this.mapCoord.append(ip));const o=t.source,c=this.uClampFrame,f=this.clampMargin/o._resolution,m=this.clampOffset/o._resolution;return c[0]=(t.frame.x+f+m)/o.width,c[1]=(t.frame.y+f+m)/o.height,c[2]=(t.frame.x+t.frame.width-f+m)/o.width,c[3]=(t.frame.y+t.frame.height-f+m)/o.height,this.uClampOffset[0]=this.clampOffset/o.pixelWidth,this.uClampOffset[1]=this.clampOffset/o.pixelHeight,this.isSimple=t.frame.width===o.width&&t.frame.height===o.height&&t.rotate===0,!0}}class Ut extends xi{constructor({source:t,label:n,frame:a,orig:u,trim:o,defaultAnchor:c,defaultBorders:f,rotate:m,dynamic:g}={}){if(super(),this.uid=Qt("texture"),this.uvs={x0:0,y0:0,x1:0,y1:0,x2:0,y2:0,x3:0,y3:0},this.frame=new Kt,this.noFrame=!1,this.dynamic=!1,this.isTexture=!0,this.label=n,this.source=(t==null?void 0:t.source)??new si,this.noFrame=!a,a)this.frame.copyFrom(a);else{const{width:p,height:_}=this._source;this.frame.width=p,this.frame.height=_}this.orig=u||this.frame,this.trim=o,this.rotate=m??0,this.defaultAnchor=c,this.defaultBorders=f,this.destroyed=!1,this.dynamic=g||!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 Yb(this)),this._textureMatrix}get width(){return this.orig.width}get height(){return this.orig.height}updateUvs(){const{uvs:t,frame:n}=this,{width:a,height:u}=this._source,o=n.x/a,c=n.y/u,f=n.width/a,m=n.height/u;let g=this.rotate;if(g){const p=f/2,_=m/2,b=o+p,x=c+_;g=kt.add(g,kt.NW),t.x0=b+p*kt.uX(g),t.y0=x+_*kt.uY(g),g=kt.add(g,2),t.x1=b+p*kt.uX(g),t.y1=x+_*kt.uY(g),g=kt.add(g,2),t.x2=b+p*kt.uX(g),t.y2=x+_*kt.uY(g),g=kt.add(g,2),t.x3=b+p*kt.uX(g),t.y3=x+_*kt.uY(g)}else t.x0=o,t.y0=c,t.x1=o+f,t.y1=c,t.x2=o+f,t.y2=c+m,t.x3=o,t.y3=c+m}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 At(Ft,"Texture.baseTexture is now Texture.source"),this._source}}Ut.EMPTY=new Ut({label:"EMPTY",source:new si({label:"EMPTY"})});Ut.EMPTY.destroy=hy;Ut.WHITE=new Ut({source:new Th({resource:new Uint8Array([255,255,255,255]),width:1,height:1,alphaMode:"premultiply-alpha-on-upload",label:"WHITE"}),label:"WHITE"});Ut.WHITE.destroy=hy;function yy(l,t,n){const{width:a,height:u}=n.orig,o=n.trim;if(o){const c=o.width,f=o.height;l.minX=o.x-t._x*a,l.maxX=l.minX+c,l.minY=o.y-t._y*u,l.maxY=l.minY+f}else l.minX=-t._x*a,l.maxX=l.minX+a,l.minY=-t._y*u,l.maxY=l.minY+u}const np=new vt;class ii{constructor(t=1/0,n=1/0,a=-1/0,u=-1/0){this.minX=1/0,this.minY=1/0,this.maxX=-1/0,this.maxY=-1/0,this.matrix=np,this.minX=t,this.minY=n,this.maxX=a,this.maxY=u}isEmpty(){return this.minX>this.maxX||this.minY>this.maxY}get rectangle(){this._rectangle||(this._rectangle=new Kt);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=np,this}set(t,n,a,u){this.minX=t,this.minY=n,this.maxX=a,this.maxY=u}addFrame(t,n,a,u,o){o||(o=this.matrix);const c=o.a,f=o.b,m=o.c,g=o.d,p=o.tx,_=o.ty;let b=this.minX,x=this.minY,S=this.maxX,A=this.maxY,T=c*t+m*n+p,M=f*t+g*n+_;T<b&&(b=T),M<x&&(x=M),T>S&&(S=T),M>A&&(A=M),T=c*a+m*n+p,M=f*a+g*n+_,T<b&&(b=T),M<x&&(x=M),T>S&&(S=T),M>A&&(A=M),T=c*t+m*u+p,M=f*t+g*u+_,T<b&&(b=T),M<x&&(x=M),T>S&&(S=T),M>A&&(A=M),T=c*a+m*u+p,M=f*a+g*u+_,T<b&&(b=T),M<x&&(x=M),T>S&&(S=T),M>A&&(A=M),this.minX=b,this.minY=x,this.maxX=S,this.maxY=A}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,a=this.minY,u=this.maxX,o=this.maxY,{a:c,b:f,c:m,d:g,tx:p,ty:_}=t;let b=c*n+m*a+p,x=f*n+g*a+_;this.minX=b,this.minY=x,this.maxX=b,this.maxY=x,b=c*u+m*a+p,x=f*u+g*a+_,this.minX=b<this.minX?b:this.minX,this.minY=x<this.minY?x:this.minY,this.maxX=b>this.maxX?b:this.maxX,this.maxY=x>this.maxY?x:this.maxY,b=c*n+m*o+p,x=f*n+g*o+_,this.minX=b<this.minX?b:this.minX,this.minY=x<this.minY?x:this.minY,this.maxX=b>this.maxX?b:this.maxX,this.maxY=x>this.maxY?x:this.maxY,b=c*u+m*o+p,x=f*u+g*o+_,this.minX=b<this.minX?b:this.minX,this.minY=x<this.minY?x:this.minY,this.maxX=b>this.maxX?b:this.maxX,this.maxY=x>this.maxY?x: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,a,u){return this.minX<t&&(this.minX=t),this.maxX>n&&(this.maxX=n),this.minY<a&&(this.minY=a),this.maxY>u&&(this.maxY=u),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 ii(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,a,u){let o=this.minX,c=this.minY,f=this.maxX,m=this.maxY;u||(u=this.matrix);const g=u.a,p=u.b,_=u.c,b=u.d,x=u.tx,S=u.ty;for(let A=n;A<a;A+=2){const T=t[A],M=t[A+1],z=g*T+_*M+x,B=p*T+b*M+S;o=z<o?z:o,c=B<c?B:c,f=z>f?z:f,m=B>m?B:m}this.minX=o,this.minY=c,this.maxX=f,this.maxY=m}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 jb={grad:.9,turn:360,rad:360/(2*Math.PI)},Hi=function(l){return typeof l=="string"?l.length>0:typeof l=="number"},le=function(l,t,n){return t===void 0&&(t=0),n===void 0&&(n=Math.pow(10,t)),Math.round(n*l)/n+0},$e=function(l,t,n){return t===void 0&&(t=0),n===void 0&&(n=1),l>n?n:l>t?l:t},_y=function(l){return(l=isFinite(l)?l%360:0)>0?l:l+360},sp=function(l){return{r:$e(l.r,0,255),g:$e(l.g,0,255),b:$e(l.b,0,255),a:$e(l.a)}},zc=function(l){return{r:le(l.r),g:le(l.g),b:le(l.b),a:le(l.a,3)}},Xb=/^#([0-9a-f]{3,8})$/i,Nr=function(l){var t=l.toString(16);return t.length<2?"0"+t:t},xy=function(l){var t=l.r,n=l.g,a=l.b,u=l.a,o=Math.max(t,n,a),c=o-Math.min(t,n,a),f=c?o===t?(n-a)/c:o===n?2+(a-t)/c:4+(t-n)/c:0;return{h:60*(f<0?f+6:f),s:o?c/o*100:0,v:o/255*100,a:u}},by=function(l){var t=l.h,n=l.s,a=l.v,u=l.a;t=t/360*6,n/=100,a/=100;var o=Math.floor(t),c=a*(1-n),f=a*(1-(t-o)*n),m=a*(1-(1-t+o)*n),g=o%6;return{r:255*[a,f,c,c,m,a][g],g:255*[m,a,a,f,c,c][g],b:255*[c,c,m,a,a,f][g],a:u}},ap=function(l){return{h:_y(l.h),s:$e(l.s,0,100),l:$e(l.l,0,100),a:$e(l.a)}},lp=function(l){return{h:le(l.h),s:le(l.s),l:le(l.l),a:le(l.a,3)}},rp=function(l){return by((n=(t=l).s,{h:t.h,s:(n*=((a=t.l)<50?a:100-a)/100)>0?2*n/(a+n)*100:0,v:a+n,a:t.a}));var t,n,a},$a=function(l){return{h:(t=xy(l)).h,s:(u=(200-(n=t.s))*(a=t.v)/100)>0&&u<200?n*a/100/(u<=100?u:200-u)*100:0,l:u/2,a:t.a};var t,n,a,u},qb=/^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s*,\s*([+-]?\d*\.?\d+)%\s*,\s*([+-]?\d*\.?\d+)%\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,Vb=/^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s+([+-]?\d*\.?\d+)%\s+([+-]?\d*\.?\d+)%\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,Pb=/^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,Fb=/^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,ih={string:[[function(l){var t=Xb.exec(l);return t?(l=t[1]).length<=4?{r:parseInt(l[0]+l[0],16),g:parseInt(l[1]+l[1],16),b:parseInt(l[2]+l[2],16),a:l.length===4?le(parseInt(l[3]+l[3],16)/255,2):1}:l.length===6||l.length===8?{r:parseInt(l.substr(0,2),16),g:parseInt(l.substr(2,2),16),b:parseInt(l.substr(4,2),16),a:l.length===8?le(parseInt(l.substr(6,2),16)/255,2):1}:null:null},"hex"],[function(l){var t=Pb.exec(l)||Fb.exec(l);return t?t[2]!==t[4]||t[4]!==t[6]?null:sp({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(l){var t=qb.exec(l)||Vb.exec(l);if(!t)return null;var n,a,u=ap({h:(n=t[1],a=t[2],a===void 0&&(a="deg"),Number(n)*(jb[a]||1)),s:Number(t[3]),l:Number(t[4]),a:t[5]===void 0?1:Number(t[5])/(t[6]?100:1)});return rp(u)},"hsl"]],object:[[function(l){var t=l.r,n=l.g,a=l.b,u=l.a,o=u===void 0?1:u;return Hi(t)&&Hi(n)&&Hi(a)?sp({r:Number(t),g:Number(n),b:Number(a),a:Number(o)}):null},"rgb"],[function(l){var t=l.h,n=l.s,a=l.l,u=l.a,o=u===void 0?1:u;if(!Hi(t)||!Hi(n)||!Hi(a))return null;var c=ap({h:Number(t),s:Number(n),l:Number(a),a:Number(o)});return rp(c)},"hsl"],[function(l){var t=l.h,n=l.s,a=l.v,u=l.a,o=u===void 0?1:u;if(!Hi(t)||!Hi(n)||!Hi(a))return null;var c=(function(f){return{h:_y(f.h),s:$e(f.s,0,100),v:$e(f.v,0,100),a:$e(f.a)}})({h:Number(t),s:Number(n),v:Number(a),a:Number(o)});return by(c)},"hsv"]]},up=function(l,t){for(var n=0;n<t.length;n++){var a=t[n][0](l);if(a)return[a,t[n][1]]}return[null,void 0]},Qb=function(l){return typeof l=="string"?up(l.trim(),ih.string):typeof l=="object"&&l!==null?up(l,ih.object):[null,void 0]},Dc=function(l,t){var n=$a(l);return{h:n.h,s:$e(n.s+100*t,0,100),l:n.l,a:n.a}},Bc=function(l){return(299*l.r+587*l.g+114*l.b)/1e3/255},op=function(l,t){var n=$a(l);return{h:n.h,s:n.s,l:$e(n.l+100*t,0,100),a:n.a}},nh=(function(){function l(t){this.parsed=Qb(t)[0],this.rgba=this.parsed||{r:0,g:0,b:0,a:1}}return l.prototype.isValid=function(){return this.parsed!==null},l.prototype.brightness=function(){return le(Bc(this.rgba),2)},l.prototype.isDark=function(){return Bc(this.rgba)<.5},l.prototype.isLight=function(){return Bc(this.rgba)>=.5},l.prototype.toHex=function(){return t=zc(this.rgba),n=t.r,a=t.g,u=t.b,c=(o=t.a)<1?Nr(le(255*o)):"","#"+Nr(n)+Nr(a)+Nr(u)+c;var t,n,a,u,o,c},l.prototype.toRgb=function(){return zc(this.rgba)},l.prototype.toRgbString=function(){return t=zc(this.rgba),n=t.r,a=t.g,u=t.b,(o=t.a)<1?"rgba("+n+", "+a+", "+u+", "+o+")":"rgb("+n+", "+a+", "+u+")";var t,n,a,u,o},l.prototype.toHsl=function(){return lp($a(this.rgba))},l.prototype.toHslString=function(){return t=lp($a(this.rgba)),n=t.h,a=t.s,u=t.l,(o=t.a)<1?"hsla("+n+", "+a+"%, "+u+"%, "+o+")":"hsl("+n+", "+a+"%, "+u+"%)";var t,n,a,u,o},l.prototype.toHsv=function(){return t=xy(this.rgba),{h:le(t.h),s:le(t.s),v:le(t.v),a:le(t.a,3)};var t},l.prototype.invert=function(){return yi({r:255-(t=this.rgba).r,g:255-t.g,b:255-t.b,a:t.a});var t},l.prototype.saturate=function(t){return t===void 0&&(t=.1),yi(Dc(this.rgba,t))},l.prototype.desaturate=function(t){return t===void 0&&(t=.1),yi(Dc(this.rgba,-t))},l.prototype.grayscale=function(){return yi(Dc(this.rgba,-1))},l.prototype.lighten=function(t){return t===void 0&&(t=.1),yi(op(this.rgba,t))},l.prototype.darken=function(t){return t===void 0&&(t=.1),yi(op(this.rgba,-t))},l.prototype.rotate=function(t){return t===void 0&&(t=15),this.hue(this.hue()+t)},l.prototype.alpha=function(t){return typeof t=="number"?yi({r:(n=this.rgba).r,g:n.g,b:n.b,a:t}):le(this.rgba.a,3);var n},l.prototype.hue=function(t){var n=$a(this.rgba);return typeof t=="number"?yi({h:t,s:n.s,l:n.l,a:n.a}):le(n.h)},l.prototype.isEqual=function(t){return this.toHex()===yi(t).toHex()},l})(),yi=function(l){return l instanceof nh?l:new nh(l)},cp=[],Zb=function(l){l.forEach(function(t){cp.indexOf(t)<0&&(t(nh,ih),cp.push(t))})};function Wb(l,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"},a={};for(var u in n)a[n[u]]=u;var o={};l.prototype.toName=function(c){if(!(this.rgba.a||this.rgba.r||this.rgba.g||this.rgba.b))return"transparent";var f,m,g=a[this.toHex()];if(g)return g;if(c!=null&&c.closest){var p=this.toRgb(),_=1/0,b="black";if(!o.length)for(var x in n)o[x]=new l(n[x]).toRgb();for(var S in n){var A=(f=p,m=o[S],Math.pow(f.r-m.r,2)+Math.pow(f.g-m.g,2)+Math.pow(f.b-m.b,2));A<_&&(_=A,b=S)}return b}},t.string.push([function(c){var f=c.toLowerCase(),m=f==="transparent"?"#0000":n[f];return m?new l(m).toRgb():null},"name"])}Zb([Wb]);const Vs=class Wa{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 Wa)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 a=typeof t;if(a!==typeof n)return!1;if(a==="number"||a==="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((o,c)=>o===n[c]);if(t!==null&&n!==null){const o=Object.keys(t),c=Object.keys(n);return o.length!==c.length?!1:o.every(f=>t[f]===n[f])}return t===n}toRgba(){const[t,n,a,u]=this._components;return{r:t,g:n,b:a,a:u}}toRgb(){const[t,n,a]=this._components;return{r:t,g:n,b:a}}toRgbaString(){const[t,n,a]=this.toUint8RgbArray();return`rgba(${t},${n},${a},${this.alpha})`}toUint8RgbArray(t){const[n,a,u]=this._components;return this._arrayRgb||(this._arrayRgb=[]),t||(t=this._arrayRgb),t[0]=Math.round(n*255),t[1]=Math.round(a*255),t[2]=Math.round(u*255),t}toArray(t){this._arrayRgba||(this._arrayRgba=[]),t||(t=this._arrayRgba);const[n,a,u,o]=this._components;return t[0]=n,t[1]=a,t[2]=u,t[3]=o,t}toRgbArray(t){this._arrayRgb||(this._arrayRgb=[]),t||(t=this._arrayRgb);const[n,a,u]=this._components;return t[0]=n,t[1]=a,t[2]=u,t}toNumber(){return this._int}toBgrNumber(){const[t,n,a]=this.toUint8RgbArray();return(a<<16)+(n<<8)+t}toLittleEndianNumber(){const t=this._int;return(t>>16)+(t&65280)+((t&255)<<16)}multiply(t){const[n,a,u,o]=Wa._temp.setValue(t)._components;return this._components[0]*=n,this._components[1]*=a,this._components[2]*=u,this._components[3]*=o,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 a=this._int>>16&255,u=this._int>>8&255,o=this._int&255;return n&&(a=a*t+.5|0,u=u*t+.5|0,o=o*t+.5|0),(t*255<<24)+(a<<16)+(u<<8)+o}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,a,u,o;if((typeof t=="number"||t instanceof Number)&&t>=0&&t<=16777215){const c=t;n=(c>>16&255)/255,a=(c>>8&255)/255,u=(c&255)/255,o=1}else if((Array.isArray(t)||t instanceof Float32Array)&&t.length>=3&&t.length<=4)t=this._clamp(t),[n,a,u,o=1]=t;else if((t instanceof Uint8Array||t instanceof Uint8ClampedArray)&&t.length>=3&&t.length<=4)t=this._clamp(t,0,255),[n,a,u,o=255]=t,n/=255,a/=255,u/=255,o/=255;else if(typeof t=="string"||typeof t=="object"){if(typeof t=="string"){const f=Wa.HEX_PATTERN.exec(t);f&&(t=`#${f[2]}`)}const c=yi(t);c.isValid()&&({r:n,g:a,b:u,a:o}=c.rgba,n/=255,a/=255,u/=255)}if(n!==void 0)this._components[0]=n,this._components[1]=a,this._components[2]=u,this._components[3]=o,this._refreshInt();else throw new Error(`Unable to convert color ${t}`)}_refreshInt(){this._clamp(this._components);const[t,n,a]=this._components;this._int=(t*255<<16)+(n*255<<8)+(a*255|0)}_clamp(t,n=0,a=1){return typeof t=="number"?Math.min(Math.max(t,n),a):(t.forEach((u,o)=>{t[o]=Math.min(Math.max(u,n),a)}),t)}static isColorLike(t){return typeof t=="number"||typeof t=="string"||t instanceof Number||t instanceof Wa||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}};Vs.shared=new Vs;Vs._temp=new Vs;Vs.HEX_PATTERN=/^(#|0x)?(([a-f0-9]{3}){1,2}([a-f0-9]{2})?)$/i;let ne=Vs;const Kb={cullArea:null,cullable:!1,cullableChildren:!0};let Oc=0;const hp=500;function be(...l){Oc!==hp&&(Oc++,Oc===hp?console.warn("PixiJS Warning: too many warnings, no more warnings will be reported to the console by PixiJS."):console.warn("PixiJS Warning: ",...l))}const cl={_registeredResources:new Set,register(l){this._registeredResources.add(l)},unregister(l){this._registeredResources.delete(l)},release(){this._registeredResources.forEach(l=>l.clear())},get registeredCount(){return this._registeredResources.size},isRegistered(l){return this._registeredResources.has(l)},reset(){this._registeredResources.clear()}};class Ib{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 a;let n;return this._index>0?n=this._pool[--this._index]:(n=new this._classType,this._count++),(a=n.init)==null||a.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 Jb{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 Ib(t)),this._poolsByClass.get(t)}stats(){const t={};return this._poolsByClass.forEach(n=>{const a=t[n._classType.name]?n._classType.name+n._classType.ID:n._classType.name;t[a]={free:n.totalFree,used:n.totalUsed,size:n.totalSize}}),t}clear(){this._poolsByClass.forEach(t=>t.clear()),this._poolsByClass.clear()}}const Re=new Jb;cl.register(Re);const $b={get isCachedAsTexture(){var l;return!!((l=this.renderGroup)!=null&&l.isCachedAsTexture)},cacheAsTexture(l){typeof l=="boolean"&&l===!1?this.disableRenderGroup():(this.enableRenderGroup(),this.renderGroup.enableCacheAsTexture(l===!0?{}:l))},updateCacheTexture(){var l;(l=this.renderGroup)==null||l.updateCacheTexture()},get cacheAsBitmap(){return this.isCachedAsTexture},set cacheAsBitmap(l){At("v8.6.0","cacheAsBitmap is deprecated, use cacheAsTexture instead."),this.cacheAsTexture(l)}};function t1(l,t,n){const a=l.length;let u;if(t>=a||n===0)return;n=t+n>a?a-t:n;const o=a-n;for(u=t;u<o;++u)l[u]=l[u+n];l.length=o}const e1={allowChildren:!0,removeChildren(l=0,t){var o;const n=t??this.children.length,a=n-l,u=[];if(a>0&&a<=n){for(let f=n-1;f>=l;f--){const m=this.children[f];m&&(u.push(m),m.parent=null)}t1(this.children,l,n);const c=this.renderGroup||this.parentRenderGroup;c&&c.removeChildren(u);for(let f=0;f<u.length;++f){const m=u[f];(o=m.parentRenderLayer)==null||o.detach(m),this.emit("childRemoved",m,this,f),u[f].emit("removed",this)}return u.length>0&&this._didViewChangeTick++,u}else if(a===0&&this.children.length===0)return u;throw new RangeError("removeChildren: numeric values are outside the acceptable range.")},removeChildAt(l){const t=this.getChildAt(l);return this.removeChild(t)},getChildAt(l){if(l<0||l>=this.children.length)throw new Error(`getChildAt: Index (${l}) does not exist.`);return this.children[l]},setChildIndex(l,t){if(t<0||t>=this.children.length)throw new Error(`The index ${t} supplied is out of bounds ${this.children.length}`);this.getChildIndex(l),this.addChildAt(l,t)},getChildIndex(l){const t=this.children.indexOf(l);if(t===-1)throw new Error("The supplied Container must be a child of the caller");return t},addChildAt(l,t){this.allowChildren||At(Ft,"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(`${l}addChildAt: The index ${t} supplied is out of bounds ${n.length}`);const a=l.parent===this;if(l.parent){const o=l.parent.children.indexOf(l);if(a){if(o===t)return l;l.parent.children.splice(o,1)}else l.removeFromParent()}t===n.length?n.push(l):n.splice(t,0,l),l.parent=this,l.didChange=!0,l._updateFlags=15;const u=this.renderGroup||this.parentRenderGroup;return u&&u.addChild(l),this.sortableChildren&&(this.sortDirty=!0),a||(this.emit("childAdded",l,this,t),l.emit("added",this)),l},swapChildren(l,t){if(l===t)return;const n=this.getChildIndex(l),a=this.getChildIndex(t);this.children[n]=t,this.children[a]=l;const u=this.renderGroup||this.parentRenderGroup;u&&(u.structureDidChange=!0),this._didContainerChangeTick++},removeFromParent(){var l;(l=this.parent)==null||l.removeChild(this)},reparentChild(...l){return l.length===1?this.reparentChildAt(l[0],this.children.length):(l.forEach(t=>this.reparentChildAt(t,this.children.length)),l[0])},reparentChildAt(l,t){if(l.parent===this)return this.setChildIndex(l,t),l;const n=l.worldTransform.clone();l.removeFromParent(),this.addChildAt(l,t);const a=this.worldTransform.clone();return a.invert(),n.prepend(a),l.setFromMatrix(n),l},replaceChild(l,t){l.updateLocalTransform(),this.addChildAt(t,this.getChildIndex(l)),t.setFromMatrix(l.localTransform),t.updateLocalTransform(),this.removeChild(l)}},i1={collectRenderables(l,t,n){this.parentRenderLayer&&this.parentRenderLayer!==n||this.globalDisplayStatus<7||!this.includeInBuild||(this.sortableChildren&&this.sortChildren(),this.isSimple?this.collectRenderablesSimple(l,t,n):this.renderGroup?t.renderPipes.renderGroup.addRenderGroup(this.renderGroup,l):this.collectRenderablesWithEffects(l,t,n))},collectRenderablesSimple(l,t,n){const a=this.children,u=a.length;for(let o=0;o<u;o++)a[o].collectRenderables(l,t,n)},collectRenderablesWithEffects(l,t,n){const{renderPipes:a}=t;for(let u=0;u<this.effects.length;u++){const o=this.effects[u];a[o.pipe].push(o,this,l)}this.collectRenderablesSimple(l,t,n);for(let u=this.effects.length-1;u>=0;u--){const o=this.effects[u];a[o.pipe].pop(o,this,l)}}};class fp{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 n1{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 a=this._tests[n];if(a.test(t))return Re.get(a.maskClass,t)}return t}returnMaskEffect(t){Re.return(t)}}const sh=new n1;It.handleByList(pt.MaskEffect,sh._effectClasses);const s1={_maskEffect:null,_maskOptions:{inverse:!1},_filterEffect:null,effects:[],_markStructureAsChanged(){const l=this.renderGroup||this.parentRenderGroup;l&&(l.structureDidChange=!0)},addEffect(l){this.effects.indexOf(l)===-1&&(this.effects.push(l),this.effects.sort((n,a)=>n.priority-a.priority),this._markStructureAsChanged(),this._updateIsSimple())},removeEffect(l){const t=this.effects.indexOf(l);t!==-1&&(this.effects.splice(t,1),this._markStructureAsChanged(),this._updateIsSimple())},set mask(l){const t=this._maskEffect;(t==null?void 0:t.mask)!==l&&(t&&(this.removeEffect(t),sh.returnMaskEffect(t),this._maskEffect=null),l!=null&&(this._maskEffect=sh.getMaskEffect(l),this.addEffect(this._maskEffect)))},get mask(){var l;return(l=this._maskEffect)==null?void 0:l.mask},setMask(l){this._maskOptions={...this._maskOptions,...l},l.mask&&(this.mask=l.mask),this._markStructureAsChanged()},set filters(l){var o;!Array.isArray(l)&&l&&(l=[l]);const t=this._filterEffect||(this._filterEffect=new fp);l=l;const n=(l==null?void 0:l.length)>0,a=((o=t.filters)==null?void 0:o.length)>0,u=n!==a;l=Array.isArray(l)?l.slice(0):l,t.filters=Object.freeze(l),u&&(n?this.addEffect(t):(this.removeEffect(t),t.filters=l??null))},get filters(){var l;return(l=this._filterEffect)==null?void 0:l.filters},set filterArea(l){this._filterEffect||(this._filterEffect=new fp),this._filterEffect.filterArea=l},get filterArea(){var l;return(l=this._filterEffect)==null?void 0:l.filterArea}},a1={label:null,get name(){return At(Ft,"Container.name property has been removed, use Container.label instead"),this.label},set name(l){At(Ft,"Container.name property has been removed, use Container.label instead"),this.label=l},getChildByName(l,t=!1){return this.getChildByLabel(l,t)},getChildByLabel(l,t=!1){const n=this.children;for(let a=0;a<n.length;a++){const u=n[a];if(u.label===l||l instanceof RegExp&&l.test(u.label))return u}if(t)for(let a=0;a<n.length;a++){const o=n[a].getChildByLabel(l,!0);if(o)return o}return null},getChildrenByLabel(l,t=!1,n=[]){const a=this.children;for(let u=0;u<a.length;u++){const o=a[u];(o.label===l||l instanceof RegExp&&l.test(o.label))&&n.push(o)}if(t)for(let u=0;u<a.length;u++)a[u].getChildrenByLabel(l,!0,n);return n}},xe=Re.getPool(vt),ji=Re.getPool(ii),l1=new vt,r1={getFastGlobalBounds(l,t){t||(t=new ii),t.clear(),this._getGlobalBoundsRecursive(!!l,t,this.parentRenderLayer),t.isValid||t.set(0,0,0,0);const n=this.renderGroup||this.parentRenderGroup;return t.applyMatrix(n.worldTransform),t},_getGlobalBoundsRecursive(l,t,n){let a=t;if(l&&this.parentRenderLayer&&this.parentRenderLayer!==n||this.localDisplayStatus!==7||!this.measurable)return;const u=!!this.effects.length;if((this.renderGroup||u)&&(a=ji.get().clear()),this.boundsArea)t.addRect(this.boundsArea,this.worldTransform);else{if(this.renderPipeId){const c=this.bounds;a.addFrame(c.minX,c.minY,c.maxX,c.maxY,this.groupTransform)}const o=this.children;for(let c=0;c<o.length;c++)o[c]._getGlobalBoundsRecursive(l,a,n)}if(u){let o=!1;const c=this.renderGroup||this.parentRenderGroup;for(let f=0;f<this.effects.length;f++)this.effects[f].addBounds&&(o||(o=!0,a.applyMatrix(c.worldTransform)),this.effects[f].addBounds(a,!0));o&&a.applyMatrix(c.worldTransform.copyTo(l1).invert()),t.addBounds(a),ji.return(a)}else this.renderGroup&&(t.addBounds(a,this.relativeGroupTransform),ji.return(a))}};function vy(l,t,n){n.clear();let a,u;return l.parent?t?a=l.parent.worldTransform:(u=xe.get().identity(),a=Ah(l,u)):a=vt.IDENTITY,Sy(l,n,a,t),u&&xe.return(u),n.isValid||n.set(0,0,0,0),n}function Sy(l,t,n,a){var f,m;if(!l.visible||!l.measurable)return;let u;a?u=l.worldTransform:(l.updateLocalTransform(),u=xe.get(),u.appendFrom(l.localTransform,n));const o=t,c=!!l.effects.length;if(c&&(t=ji.get().clear()),l.boundsArea)t.addRect(l.boundsArea,u);else{const g=l.bounds;g&&!g.isEmpty()&&(t.matrix=u,t.addBounds(g));for(let p=0;p<l.children.length;p++)Sy(l.children[p],t,u,a)}if(c){for(let g=0;g<l.effects.length;g++)(m=(f=l.effects[g]).addBounds)==null||m.call(f,t);o.addBounds(t,vt.IDENTITY),ji.return(t)}a||xe.return(u)}function Ah(l,t){const n=l.parent;return n&&(Ah(n,t),n.updateLocalTransform(),t.append(n.localTransform)),t}function Ty(l,t){if(l===16777215||!t)return t;if(t===16777215||!l)return l;const n=l>>16&255,a=l>>8&255,u=l&255,o=t>>16&255,c=t>>8&255,f=t&255,m=n*o/255|0,g=a*c/255|0,p=u*f/255|0;return(m<<16)+(g<<8)+p}const dp=16777215;function mp(l,t){return l===dp?t:t===dp?l:Ty(l,t)}function Qr(l){return((l&255)<<16)+(l&65280)+(l>>16&255)}const u1={getGlobalAlpha(l){if(l)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(l=new vt,t){if(t)return l.copyFrom(this.worldTransform);this.updateLocalTransform();const n=Ah(this,xe.get().identity());return l.appendFrom(this.localTransform,n),xe.return(n),l},getGlobalTint(l){if(l)return this.renderGroup?Qr(this.renderGroup.worldColor):this.parentRenderGroup?Qr(mp(this.localColor,this.parentRenderGroup.worldColor)):this.tint;let t=this.localColor,n=this.parent;for(;n;)t=mp(t,n.localColor),n=n.parent;return Qr(t)}};function Ay(l,t,n){return t.clear(),n||(n=vt.IDENTITY),Cy(l,t,n,l,!0),t.isValid||t.set(0,0,0,0),t}function Cy(l,t,n,a,u){var m,g;let o;if(u)o=xe.get(),o=n.copyTo(o);else{if(!l.visible||!l.measurable)return;l.updateLocalTransform();const p=l.localTransform;o=xe.get(),o.appendFrom(p,n)}const c=t,f=!!l.effects.length;if(f&&(t=ji.get().clear()),l.boundsArea)t.addRect(l.boundsArea,o);else{l.renderPipeId&&(t.matrix=o,t.addBounds(l.bounds));const p=l.children;for(let _=0;_<p.length;_++)Cy(p[_],t,o,a,!1)}if(f){for(let p=0;p<l.effects.length;p++)(g=(m=l.effects[p]).addLocalBounds)==null||g.call(m,t,a);c.addBounds(t,vt.IDENTITY),ji.return(t)}xe.return(o)}function My(l,t){const n=l.children;for(let a=0;a<n.length;a++){const u=n[a],o=u.uid,c=(u._didViewChangeTick&65535)<<16|u._didContainerChangeTick&65535,f=t.index;(t.data[f]!==o||t.data[f+1]!==c)&&(t.data[t.index]=o,t.data[t.index+1]=c,t.didChange=!0),t.index=f+2,u.children.length&&My(u,t)}return t.didChange}const o1=new vt,c1={_localBoundsCacheId:-1,_localBoundsCacheData:null,_setWidth(l,t){const n=Math.sign(this.scale.x)||1;t!==0?this.scale.x=l/t*n:this.scale.x=n},_setHeight(l,t){const n=Math.sign(this.scale.y)||1;t!==0?this.scale.y=l/t*n:this.scale.y=n},getLocalBounds(){this._localBoundsCacheData||(this._localBoundsCacheData={data:[],index:1,didChange:!1,localBounds:new ii});const l=this._localBoundsCacheData;return l.index=1,l.didChange=!1,l.data[0]!==this._didViewChangeTick&&(l.didChange=!0,l.data[0]=this._didViewChangeTick),My(this,l),l.didChange&&Ay(this,l.localBounds,o1),l.localBounds},getBounds(l,t){return vy(this,l,t||new ii)}},h1={_onRender:null,set onRender(l){const t=this.renderGroup||this.parentRenderGroup;if(!l){this._onRender&&(t==null||t.removeOnRender(this)),this._onRender=null;return}this._onRender||t==null||t.addOnRender(this),this._onRender=l},get onRender(){return this._onRender}},f1={_zIndex:0,sortDirty:!1,sortableChildren:!1,get zIndex(){return this._zIndex},set zIndex(l){this._zIndex!==l&&(this._zIndex=l,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(d1))}};function d1(l,t){return l._zIndex-t._zIndex}const m1={getGlobalPosition(l=new ge,t=!1){return this.parent?this.parent.toGlobal(this._position,l,t):(l.x=this._position.x,l.y=this._position.y),l},toGlobal(l,t,n=!1){const a=this.getGlobalTransform(xe.get(),n);return t=a.apply(l,t),xe.return(a),t},toLocal(l,t,n,a){t&&(l=t.toGlobal(l,n,a));const u=this.getGlobalTransform(xe.get(),a);return n=u.applyInverse(l,n),xe.return(u),n}};class Ch{constructor(){this.uid=Qt("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 g1=0;class p1{constructor(t){this._poolKeyHash=Object.create(null),this._texturePool={},this.textureOptions=t||{},this.enableFullScreen=!1,this.textureStyle=new qs(this.textureOptions)}createTexture(t,n,a,u){const o=new si({...this.textureOptions,width:t,height:n,resolution:1,antialias:a,autoGarbageCollect:!1,autoGenerateMipmaps:u});return new Ut({source:o,label:`texturePool_${g1++}`})}getOptimalTexture(t,n,a=1,u,o=!1){let c=Math.ceil(t*a-1e-6),f=Math.ceil(n*a-1e-6);c=Xs(c),f=Xs(f);const m=u?1:0,g=o?1:0,p=(c<<17)+(f<<2)+(g<<1)+m;this._texturePool[p]||(this._texturePool[p]=[]);let _=this._texturePool[p].pop();return _||(_=this.createTexture(c,f,u,o)),_.source._resolution=a,_.source.width=c/a,_.source.height=f/a,_.source.pixelWidth=c,_.source.pixelHeight=f,_.frame.x=0,_.frame.y=0,_.frame.width=t,_.frame.height=n,_.updateUvs(),this._poolKeyHash[_.uid]=p,_}getSameSizeTexture(t,n=!1){const a=t.source;return this.getOptimalTexture(t.width,t.height,a._resolution,n)}returnTexture(t,n=!1){const a=this._poolKeyHash[t.uid];n&&(t.source.style=this.textureStyle),this._texturePool[a].push(t)}clear(t){if(t=t!==!1,t)for(const n in this._texturePool){const a=this._texturePool[n];if(a)for(let u=0;u<a.length;u++)a[u].destroy(!0)}this._texturePool={}}}const eu=new p1;cl.register(eu);class y1{constructor(){this.renderPipeId="renderGroup",this.root=null,this.canBundle=!1,this.renderGroupParent=null,this.renderGroupChildren=[],this.worldTransform=new vt,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 Ch,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 a=0;a<n.length;a++){const u=n[a];u._updateFlags=15,this.addChild(u)}}enableCacheAsTexture(t={}){this.textureOptions=t,this.isCachedAsTexture=!0,this.textureNeedsUpdate=!0}disableCacheAsTexture(){this.isCachedAsTexture=!1,this.texture&&(eu.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 a=0;a<n.length;a++)this.addChild(n[a])}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 a=0;a<n.length;a++)this.removeChild(n[a])}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 a=0;a<n.length;a++)this._getChildren(n[a],t);return t}_getChildren(t,n=[]){if(n.push(t),t.renderGroup)return n;const a=t.children;for(let u=0;u<a.length;u++)this._getChildren(a[u],n);return n}invalidateMatrices(){this._matrixDirty=7}get inverseWorldTransform(){return(this._matrixDirty&1)===0?this._inverseWorldTransform:(this._matrixDirty&=-2,this._inverseWorldTransform||(this._inverseWorldTransform=new vt),this._inverseWorldTransform.copyFrom(this.worldTransform).invert())}get textureOffsetInverseTransform(){return(this._matrixDirty&2)===0?this._textureOffsetInverseTransform:(this._matrixDirty&=-3,this._textureOffsetInverseTransform||(this._textureOffsetInverseTransform=new vt),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 vt),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 _1(l,t,n={}){for(const a in t)!n[a]&&t[a]!==void 0&&(l[a]=t[a])}const Gc=new fe(null),kr=new fe(null),Uc=new fe(null,1,1),Hr=new fe(null),gp=1,x1=2,Nc=4;class ni extends xi{constructor(t={}){var n,a;super(),this.uid=Qt("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 vt,this.relativeGroupTransform=new vt,this.groupTransform=this.relativeGroupTransform,this.destroyed=!1,this._position=new fe(this,0,0),this._scale=Uc,this._pivot=kr,this._origin=Hr,this._skew=Gc,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=[],_1(this,t,{children:!0,parent:!0,effects:!0}),(n=t.children)==null||n.forEach(u=>this.addChild(u)),(a=t.parent)==null||a.addChild(this)}static mixin(t){At("8.8.0","Container.mixin is deprecated, please use extensions.mixin instead."),It.mixin(ni,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||At(Ft,"addChild: Only Containers will be allowed to add children in v8.0.0"),t.length>1){for(let u=0;u<t.length;u++)this.addChild(t[u]);return t[0]}const n=t[0],a=this.renderGroup||this.parentRenderGroup;return n.parent===this?(this.children.splice(this.children.indexOf(n),1),this.children.push(n),a&&(a.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,a&&a.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 u=0;u<t.length;u++)this.removeChild(t[u]);return t[0]}const n=t[0],a=this.children.indexOf(n);return a>-1&&(this._didViewChangeTick++,this.children.splice(a,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,a),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=Re.get(y1,this),this.groupTransform=vt.IDENTITY,t==null||t.addChild(this),this._updateIsSimple()}disableRenderGroup(){if(!this.renderGroup)return;const t=this.parentRenderGroup;t==null||t.removeChild(this),Re.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 vt),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*Ob}set angle(t){this.rotation=t*Gb}get pivot(){return this._pivot===kr&&(this._pivot=new fe(this,0,0)),this._pivot}set pivot(t){this._pivot===kr&&(this._pivot=new fe(this,0,0),this._origin!==Hr&&be("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===Gc&&(this._skew=new fe(this,0,0)),this._skew}set skew(t){this._skew===Gc&&(this._skew=new fe(this,0,0)),this._skew.copyFrom(t)}get scale(){return this._scale===Uc&&(this._scale=new fe(this,1,1)),this._scale}set scale(t){this._scale===Uc&&(this._scale=new fe(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===Hr&&(this._origin=new fe(this,0,0)),this._origin}set origin(t){this._origin===Hr&&(this._origin=new fe(this,0,0),this._pivot!==kr&&be("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 a=this.getLocalBounds();typeof t=="object"?(n=t.height??t.width,t=t.width):n??(n=t),t!==void 0&&this._setWidth(t,a.width),n!==void 0&&this._setHeight(n,a.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,a=this._scale,u=this._pivot,o=this._origin,c=this._position,f=a._x,m=a._y,g=u._x,p=u._y,_=-o._x,b=-o._y;n.a=this._cx*f,n.b=this._sx*f,n.c=this._cy*m,n.d=this._sy*m,n.tx=c._x-(g*n.a+p*n.c)+(_*n.a+b*n.c)-_,n.ty=c._y-(g*n.b+p*n.d)+(_*n.b+b*n.d)-b}set alpha(t){t!==this.localAlpha&&(this.localAlpha=t,this._updateFlags|=gp,this._onUpdate())}get alpha(){return this.localAlpha}set tint(t){const a=ne.shared.setValue(t??16777215).toBgrNumber();a!==this.localColor&&(this.localColor=a,this._updateFlags|=gp,this._onUpdate())}get tint(){return Qr(this.localColor)}set blendMode(t){this.localBlendMode!==t&&(this.parentRenderGroup&&(this.parentRenderGroup.structureDidChange=!0),this._updateFlags|=x1,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|=Nc,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|=Nc,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|=Nc,this.localDisplayStatus^=1,this.parentRenderGroup&&(this.parentRenderGroup.structureDidChange=!0),this._onUpdate())}get isRenderable(){return this.localDisplayStatus===7&&this.groupAlpha>0}destroy(t=!1){var u;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 o=0;o<n.length;++o)n[o].destroy(t);(u=this.renderGroup)==null||u.destroy(),this.renderGroup=null}}It.mixin(ni,e1,r1,m1,h1,c1,s1,a1,f1,Kb,$b,u1,i1);class Mh extends ni{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 ii(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:a,y:u}=t;return a>=n.minX&&a<=n.maxX&&u>=n.minY&&u<=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,a){const{renderPipes:u}=n;u.blendMode.pushBlendMode(this,this.groupBlendMode,t);const c=u[this.renderPipeId];c!=null&&c.addRenderable&&c.addRenderable(this,t),this.didViewUpdate=!1;const f=this.children,m=f.length;for(let g=0;g<m;g++)f[g].collectRenderables(t,n,a);u.blendMode.popBlendMode(t)}}class nl extends Mh{constructor(t=Ut.EMPTY){t instanceof Ut&&(t={texture:t});const{texture:n=Ut.EMPTY,anchor:a,roundPixels:u,width:o,height:c,...f}=t;super({label:"Sprite",...f}),this.renderPipeId="sprite",this.batched=!0,this._visualBounds={minX:0,maxX:1,minY:0,maxY:0},this._anchor=new fe({_onUpdate:()=>{this.onViewUpdate()}}),a?this.anchor=a:n.defaultAnchor&&(this.anchor=n.defaultAnchor),this.texture=n,this.allowChildren=!1,this.roundPixels=u??!1,o!==void 0&&(this.width=o),c!==void 0&&(this.height=c)}static from(t,n=!1){return t instanceof Ut?new nl(t):new nl(Ut.from(t,n))}set texture(t){t||(t=Ut.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 yy(this._visualBounds,this._anchor,this._texture),this._visualBounds}get sourceBounds(){return At("8.6.1","Sprite.sourceBounds is deprecated, use visualBounds instead."),this.visualBounds}updateBounds(){const t=this._anchor,n=this._texture,a=this._bounds,{width:u,height:o}=n.orig;a.minX=-t._x*u,a.maxX=a.minX+u,a.minY=-t._y*o,a.maxY=a.minY+o}destroy(t=!1){if(super.destroy(t),typeof t=="boolean"?t:t==null?void 0:t.texture){const a=typeof t=="boolean"?t:t==null?void 0:t.textureSource;this._texture.destroy(a)}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 b1=new ii;function wy(l,t,n){const a=b1;l.measurable=!0,vy(l,n,a),t.addBoundsMask(a),l.measurable=!1}function Ey(l,t,n){const a=ji.get();l.measurable=!0;const u=xe.get().identity(),o=Ry(l,n,u);Ay(l,a,o),l.measurable=!1,t.addBoundsMask(a),xe.return(u),ji.return(a)}function Ry(l,t,n){return l?(l!==t&&(Ry(l.parent,t,n),l.updateLocalTransform(),n.append(l.localTransform)),n):(be("Mask bounds, renderable is not inside the root container"),n)}class zy{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 nl),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||wy(this.mask,t,n)}addLocalBounds(t,n){Ey(this.mask,t,n)}containsPoint(t,n){const a=this.mask;return n(a,t)}destroy(){this.reset()}static test(t){return t instanceof nl}}zy.extension=pt.MaskEffect;class Dy{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"}}Dy.extension=pt.MaskEffect;class By{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){wy(this.mask,t,n)}addLocalBounds(t,n){Ey(this.mask,t,n)}containsPoint(t,n){const a=this.mask;return n(a,t)}destroy(){this.reset()}static test(t){return t instanceof ni}}By.extension=pt.MaskEffect;const v1={createCanvas:(l,t)=>{const n=document.createElement("canvas");return n.width=l,n.height=t,n},createImage:()=>new Image,getCanvasRenderingContext2D:()=>CanvasRenderingContext2D,getWebGLRenderingContext:()=>WebGLRenderingContext,getNavigator:()=>navigator,getBaseUrl:()=>document.baseURI??window.location.href,getFontFaceSet:()=>document.fonts,fetch:(l,t)=>fetch(l,t),parseXML:l=>new DOMParser().parseFromString(l,"text/xml")};let pp=v1;const je={get(){return pp},set(l){pp=l}};class Oy extends si{constructor(t){t.resource||(t.resource=je.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,a=this._resolution){const u=super.resize(t,n,a);return u&&this.resizeCanvas(),u}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"))}}Oy.extension=pt.TextureSource;class Kr extends si{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}}Kr.extension=pt.TextureSource;var Ir=(l=>(l[l.INTERACTION=50]="INTERACTION",l[l.HIGH=25]="HIGH",l[l.NORMAL=0]="NORMAL",l[l.LOW=-25]="LOW",l[l.UTILITY=-50]="UTILITY",l))(Ir||{});class kc{constructor(t,n=null,a=0,u=!1){this.next=null,this.previous=null,this._destroyed=!1,this._fn=t,this._context=n,this.priority=a,this._once=u}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 Gy=class Ye{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 kc(null,null,1/0),this.deltaMS=1/Ye.targetFPMS,this.elapsedMS=1/Ye.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,a=Ir.NORMAL){return this._addListener(new kc(t,n,a))}addOnce(t,n,a=Ir.NORMAL){return this._addListener(new kc(t,n,a,!0))}_addListener(t){let n=this._head.next,a=this._head;if(!n)t.connect(a);else{for(;n;){if(t.priority>n.priority){t.connect(a);break}a=n,n=n.next}t.previous||t.connect(a)}return this._startIfPossible(),this}remove(t,n){let a=this._head.next;for(;a;)a.match(t,n)?a=a.destroy():a=a.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 o=t-this._lastFrame|0;if(o<this._minElapsedMS)return;this._lastFrame=t-o%this._minElapsedMS}this.deltaMS=n,this.deltaTime=this.deltaMS*Ye.targetFPMS;const a=this._head;let u=a.next;for(;u;)u=u.emit(this);a.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,Ye.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(!Ye._shared){const t=Ye._shared=new Ye;t.autoStart=!0,t._protected=!0}return Ye._shared}static get system(){if(!Ye._system){const t=Ye._system=new Ye;t.autoStart=!0,t._protected=!0}return Ye._system}};Gy.targetFPMS=.06;let Ys=Gy,Hc;async function S1(){return Hc??(Hc=(async()=>{var c;const t=je.get().createCanvas(1,1).getContext("webgl");if(!t)return"premultiply-alpha-on-upload";const n=await new Promise(f=>{const m=document.createElement("video");m.onloadeddata=()=>f(m),m.onerror=()=>f(null),m.autoplay=!1,m.crossOrigin="anonymous",m.preload="auto",m.src="data:video/webm;base64,GkXfo59ChoEBQveBAULygQRC84EIQoKEd2VibUKHgQJChYECGFOAZwEAAAAAAAHTEU2bdLpNu4tTq4QVSalmU6yBoU27i1OrhBZUrmtTrIHGTbuMU6uEElTDZ1OsggEXTbuMU6uEHFO7a1OsggG97AEAAAAAAABZAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAVSalmoCrXsYMPQkBNgIRMYXZmV0GETGF2ZkSJiEBEAAAAAAAAFlSua8yuAQAAAAAAAEPXgQFzxYgAAAAAAAAAAZyBACK1nIN1bmSIgQCGhVZfVlA5g4EBI+ODhAJiWgDglLCBArqBApqBAlPAgQFVsIRVuYEBElTDZ9Vzc9JjwItjxYgAAAAAAAAAAWfInEWjh0VOQ09ERVJEh49MYXZjIGxpYnZweC12cDlnyKJFo4hEVVJBVElPTkSHlDAwOjAwOjAwLjA0MDAwMDAwMAAAH0O2dcfngQCgwqGggQAAAIJJg0IAABAAFgA4JBwYSgAAICAAEb///4r+AAB1oZ2mm+6BAaWWgkmDQgAAEAAWADgkHBhKAAAgIABIQBxTu2uRu4+zgQC3iveBAfGCAXHwgQM=",m.load()});if(!n)return"premultiply-alpha-on-upload";const a=t.createTexture();t.bindTexture(t.TEXTURE_2D,a);const u=t.createFramebuffer();t.bindFramebuffer(t.FRAMEBUFFER,u),t.framebufferTexture2D(t.FRAMEBUFFER,t.COLOR_ATTACHMENT0,t.TEXTURE_2D,a,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 o=new Uint8Array(4);return t.readPixels(0,0,1,1,t.RGBA,t.UNSIGNED_BYTE,o),t.deleteFramebuffer(u),t.deleteTexture(a),(c=t.getExtension("WEBGL_lose_context"))==null||c.loseContext(),o[0]<=o[3]?"premultiplied-alpha":"premultiply-alpha-on-upload"})()),Hc}const iu=class Uy extends si{constructor(t){super(t),this.isReady=!1,this.uploadMethodId="video",t={...Uy.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=Ys.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 S1(),this._load=new Promise((a,u)=>{this.isValid?a(this):(this._resolve=a,this._reject=u,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&&(Ys.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||(Ys.shared.add(this.updateFrame,this),this._isConnectedToTicker=!0,this._msToNextUpdate=0)):(this._videoFrameRequestCallbackHandle!==null&&(this.resource.cancelVideoFrameCallback(this._videoFrameRequestCallbackHandle),this._videoFrameRequestCallbackHandle=null),this._isConnectedToTicker&&(Ys.shared.remove(this.updateFrame,this),this._isConnectedToTicker=!1,this._msToNextUpdate=0))}static test(t){return globalThis.HTMLVideoElement&&t instanceof HTMLVideoElement}};iu.extension=pt.TextureSource;iu.defaultOptions={...si.defaultOptions,autoLoad:!0,autoPlay:!0,updateFPS:0,crossorigin:!0,loop:!1,muted:!0,playsinline:!0,preload:!1};iu.MIME_TYPES={ogv:"video/ogg",mov:"video/quicktime",m4v:"video/mp4"};let T1=iu;const Ns=(l,t,n=!1)=>(Array.isArray(l)||(l=[l]),t?l.map(a=>typeof a=="string"||n?t(a):a):l);class A1{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||be(`[Assets] Asset id ${t} was not found in the Cache`),n}set(t,n){const a=Ns(t);let u;for(let m=0;m<this.parsers.length;m++){const g=this.parsers[m];if(g.test(n)){u=g.getCacheableAssets(a,n);break}}const o=new Map(Object.entries(u||{}));u||a.forEach(m=>{o.set(m,n)});const c=[...o.keys()],f={cacheKeys:c,keys:a};a.forEach(m=>{this._cacheMap.set(m,f)}),c.forEach(m=>{const g=u?u[m]:n;this._cache.has(m)&&this._cache.get(m)!==g&&be("[Cache] already has key:",m),this._cache.set(m,o.get(m))})}remove(t){if(!this._cacheMap.has(t)){be(`[Assets] Asset id ${t} was not found in the Cache`);return}const n=this._cacheMap.get(t);n.cacheKeys.forEach(u=>{this._cache.delete(u)}),n.keys.forEach(u=>{this._cacheMap.delete(u)})}get parsers(){return this._parsers}}const ks=new A1,ah=[];It.handleByList(pt.TextureSource,ah);function Ny(l={}){const t=l&&l.resource,n=t?l.resource:l,a=t?l:{resource:l};for(let u=0;u<ah.length;u++){const o=ah[u];if(o.test(n))return new o(a)}throw new Error(`Could not find a source type for resource: ${a.resource}`)}function C1(l={},t=!1){const n=l&&l.resource,a=n?l.resource:l,u=n?l:{resource:l};if(!t&&ks.has(a))return ks.get(a);const o=new Ut({source:Ny(u)});return o.on("destroy",()=>{ks.has(a)&&ks.remove(a)}),t||ks.set(a,o),o}function M1(l,t=!1){return typeof l=="string"?ks.get(l):l instanceof si?new Ut({source:l}):C1(l,t)}Ut.from=M1;si.from=Ny;It.add(zy,Dy,By,T1,Kr,Oy,Th);var ky=(l=>(l[l.Low=0]="Low",l[l.Normal=1]="Normal",l[l.High=2]="High",l))(ky||{});function ci(l){if(typeof l!="string")throw new TypeError(`Path must be a string. Received ${JSON.stringify(l)}`)}function Xa(l){return l.split("?")[0].split("#")[0]}function w1(l){return l.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function E1(l,t,n){return l.replace(new RegExp(w1(t),"g"),n)}function R1(l,t){let n="",a=0,u=-1,o=0,c=-1;for(let f=0;f<=l.length;++f){if(f<l.length)c=l.charCodeAt(f);else{if(c===47)break;c=47}if(c===47){if(!(u===f-1||o===1))if(u!==f-1&&o===2){if(n.length<2||a!==2||n.charCodeAt(n.length-1)!==46||n.charCodeAt(n.length-2)!==46){if(n.length>2){const m=n.lastIndexOf("/");if(m!==n.length-1){m===-1?(n="",a=0):(n=n.slice(0,m),a=n.length-1-n.lastIndexOf("/")),u=f,o=0;continue}}else if(n.length===2||n.length===1){n="",a=0,u=f,o=0;continue}}}else n.length>0?n+=`/${l.slice(u+1,f)}`:n=l.slice(u+1,f),a=f-u-1;u=f,o=0}else c===46&&o!==-1?++o:o=-1}return n}const sl={toPosix(l){return E1(l,"\\","/")},isUrl(l){return/^https?:/.test(this.toPosix(l))},isDataUrl(l){return/^data:([a-z]+\/[a-z0-9-+.]+(;[a-z0-9-.!#$%*+.{}|~`]+=[a-z0-9-.!#$%*+.{}()_|~`]+)*)?(;base64)?,([a-z0-9!$&',()*+;=\-._~:@\/?%\s<>]*?)$/i.test(l)},isBlobUrl(l){return l.startsWith("blob:")},hasProtocol(l){return/^[^/:]+:/.test(this.toPosix(l))},getProtocol(l){ci(l),l=this.toPosix(l);const t=/^file:\/\/\//.exec(l);if(t)return t[0];const n=/^[^/:]+:\/{0,2}/.exec(l);return n?n[0]:""},toAbsolute(l,t,n){if(ci(l),this.isDataUrl(l)||this.isBlobUrl(l))return l;const a=Xa(this.toPosix(t??je.get().getBaseUrl())),u=Xa(this.toPosix(n??this.rootname(a)));return l=this.toPosix(l),l.startsWith("/")?sl.join(u,l.slice(1)):this.isAbsolute(l)?l:this.join(a,l)},normalize(l){if(ci(l),l.length===0)return".";if(this.isDataUrl(l)||this.isBlobUrl(l))return l;l=this.toPosix(l);let t="";const n=l.startsWith("/");this.hasProtocol(l)&&(t=this.rootname(l),l=l.slice(t.length));const a=l.endsWith("/");return l=R1(l),l.length>0&&a&&(l+="/"),n?`/${l}`:t+l},isAbsolute(l){return ci(l),l=this.toPosix(l),this.hasProtocol(l)?!0:l.startsWith("/")},join(...l){if(l.length===0)return".";let t;for(let n=0;n<l.length;++n){const a=l[n];if(ci(a),a.length>0)if(t===void 0)t=a;else{const u=l[n-1]??"";this.joinExtensions.includes(this.extname(u).toLowerCase())?t+=`/../${a}`:t+=`/${a}`}}return t===void 0?".":this.normalize(t)},dirname(l){if(ci(l),l.length===0)return".";l=this.toPosix(l);let t=l.charCodeAt(0);const n=t===47;let a=-1,u=!0;const o=this.getProtocol(l),c=l;l=l.slice(o.length);for(let f=l.length-1;f>=1;--f)if(t=l.charCodeAt(f),t===47){if(!u){a=f;break}}else u=!1;return a===-1?n?"/":this.isUrl(c)?o+l:o:n&&a===1?"//":o+l.slice(0,a)},rootname(l){ci(l),l=this.toPosix(l);let t="";if(l.startsWith("/")?t="/":t=this.getProtocol(l),this.isUrl(l)){const n=l.indexOf("/",t.length);n!==-1?t=l.slice(0,n):t=l,t.endsWith("/")||(t+="/")}return t},basename(l,t){ci(l),t&&ci(t),l=Xa(this.toPosix(l));let n=0,a=-1,u=!0,o;if(t!==void 0&&t.length>0&&t.length<=l.length){if(t.length===l.length&&t===l)return"";let c=t.length-1,f=-1;for(o=l.length-1;o>=0;--o){const m=l.charCodeAt(o);if(m===47){if(!u){n=o+1;break}}else f===-1&&(u=!1,f=o+1),c>=0&&(m===t.charCodeAt(c)?--c===-1&&(a=o):(c=-1,a=f))}return n===a?a=f:a===-1&&(a=l.length),l.slice(n,a)}for(o=l.length-1;o>=0;--o)if(l.charCodeAt(o)===47){if(!u){n=o+1;break}}else a===-1&&(u=!1,a=o+1);return a===-1?"":l.slice(n,a)},extname(l){ci(l),l=Xa(this.toPosix(l));let t=-1,n=0,a=-1,u=!0,o=0;for(let c=l.length-1;c>=0;--c){const f=l.charCodeAt(c);if(f===47){if(!u){n=c+1;break}continue}a===-1&&(u=!1,a=c+1),f===46?t===-1?t=c:o!==1&&(o=1):t!==-1&&(o=-1)}return t===-1||a===-1||o===0||o===1&&t===a-1&&t===n+1?"":l.slice(t,a)},parse(l){ci(l);const t={root:"",dir:"",base:"",ext:"",name:""};if(l.length===0)return t;l=Xa(this.toPosix(l));let n=l.charCodeAt(0);const a=this.isAbsolute(l);let u;t.root=this.rootname(l),a||this.hasProtocol(l)?u=1:u=0;let o=-1,c=0,f=-1,m=!0,g=l.length-1,p=0;for(;g>=u;--g){if(n=l.charCodeAt(g),n===47){if(!m){c=g+1;break}continue}f===-1&&(m=!1,f=g+1),n===46?o===-1?o=g:p!==1&&(p=1):o!==-1&&(p=-1)}return o===-1||f===-1||p===0||p===1&&o===f-1&&o===c+1?f!==-1&&(c===0&&a?t.base=t.name=l.slice(1,f):t.base=t.name=l.slice(c,f)):(c===0&&a?(t.name=l.slice(1,o),t.base=l.slice(1,f)):(t.name=l.slice(c,o),t.base=l.slice(c,f)),t.ext=l.slice(o,f)),t.dir=this.dirname(l),t},sep:"/",delimiter:":",joinExtensions:[".html"]};function Hy(l,t,n,a,u){const o=t[n];for(let c=0;c<o.length;c++){const f=o[c];n<t.length-1?Hy(l.replace(a[n],f),t,n+1,a,u):u.push(l.replace(a[n],f))}}function z1(l){const t=/\{(.*?)\}/g,n=l.match(t),a=[];if(n){const u=[];n.forEach(o=>{const c=o.substring(1,o.length-1).split(",");u.push(c)}),Hy(l,u,0,n,a)}else a.push(l);return a}const yp=l=>!Array.isArray(l);class Ly{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(a=>`${encodeURIComponent(a)}=${encodeURIComponent(n[a])}`).join("&")}}getAlias(t){const{alias:n,src:a}=t;return Ns(n||a,o=>typeof o=="string"?o:Array.isArray(o)?o.map(c=>(c==null?void 0:c.src)??c):o!=null&&o.src?o.src:o,!0)}removeAlias(t,n){this._assetMap[t]&&(n&&n!==this._resolverHash[t]||(delete this._resolverHash[t],delete this._assetMap[t]))}addManifest(t){this._manifest&&be("[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 a=[];let u=n;Array.isArray(n)||(u=Object.entries(n).map(([o,c])=>typeof c=="string"||Array.isArray(c)?{alias:o,src:c}:{alias:o,...c})),u.forEach(o=>{const c=o.src,f=o.alias;let m;if(typeof f=="string"){const g=this._createBundleAssetId(t,f);a.push(g),m=[f,g]}else{const g=f.map(p=>this._createBundleAssetId(t,p));a.push(...g),m=[...f,...g]}this.add({...o,alias:m,src:c})}),this._bundles[t]=a}add(t){const n=[];Array.isArray(t)?n.push(...t):n.push(t);let a;a=o=>{this.hasKey(o)&&be(`[Resolver] already has key: ${o} overwriting`)},Ns(n).forEach(o=>{const{src:c}=o;let{data:f,format:m,loadParser:g,parser:p}=o;const _=Ns(c).map(A=>typeof A=="string"?z1(A):Array.isArray(A)?A:[A]),b=this.getAlias(o);Array.isArray(b)?b.forEach(a):a(b);const x=[],S=A=>{const T=this._parsers.find(M=>M.test(A));return{src:A,...T==null?void 0:T.parse(A)}};_.forEach(A=>{A.forEach(T=>{let M={};if(typeof T!="object"?M=S(T):(f=T.data??f,m=T.format??m,(T.loadParser||T.parser)&&(g=T.loadParser??g,p=T.parser??p),M={...S(T.src),...T}),!b)throw new Error(`[Resolver] alias is undefined for this asset: ${M.src}`);M=this._buildResolvedAsset(M,{aliases:b,data:f,format:m,loadParser:g,parser:p,progressSize:o.progressSize}),x.push(M)})}),b.forEach(A=>{this._assetMap[A]=x})})}resolveBundle(t){const n=yp(t);t=Ns(t);const a={};return t.forEach(u=>{const o=this._bundles[u];if(o){const c=this.resolve(o),f={};for(const m in c){const g=c[m];f[this._extractAssetIdFromBundle(u,m)]=g}a[u]=f}}),n?a[t[0]]:a}resolveUrl(t){const n=this.resolve(t);if(typeof t!="string"){const a={};for(const u in n)a[u]=n[u].src;return a}return n.src}resolve(t){const n=yp(t);t=Ns(t);const a={};return t.forEach(u=>{if(!this._resolverHash[u])if(this._assetMap[u]){let o=this._assetMap[u];const c=this._getPreferredOrder(o);c==null||c.priority.forEach(f=>{c.params[f].forEach(m=>{const g=o.filter(p=>p[f]?p[f]===m:!1);g.length&&(o=g)})}),this._resolverHash[u]=o[0]}else this._resolverHash[u]=this._buildResolvedAsset({alias:[u],src:u},{});a[u]=this._resolverHash[u]}),n?a[t[0]]:a}hasKey(t){return!!this._assetMap[t]}hasBundle(t){return!!this._bundles[t]}_getPreferredOrder(t){for(let n=0;n<t.length;n++){const a=t[n],u=this._preferredOrder.find(o=>o.params.format.includes(a.format));if(u)return u}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:a,data:u,loadParser:o,parser:c,format:f,progressSize:m}=n;return(this._basePath||this._rootPath)&&(t.src=sl.toAbsolute(t.src,this._basePath,this._rootPath)),t.alias=a??t.alias??[t.src],t.src=this._appendDefaultSearchParams(t.src),t.data={...u||{},...t.data},t.loadParser=o??t.loadParser,t.parser=c??t.parser,t.format=f??t.format??D1(t.src),m!==void 0&&(t.progressSize=m),t}}Ly.RETINA_PREFIX=/@([0-9\.]+)x/;function D1(l){return l.split(".").pop().split("?").shift().split("#").shift()}const _p=(l,t)=>{const n=t.split("?")[1];return n&&(l+=`?${n}`),l},Yy=class Ka{constructor(t,n){this.linkedSheets=[];let a=t;(t==null?void 0:t.source)instanceof si&&(a={texture:t,data:n});const{texture:u,data:o,cachePrefix:c=""}=a;this.cachePrefix=c,this._texture=u instanceof Ut?u:null,this.textureSource=u.source,this.textures={},this.animations={},this.data=o;const f=parseFloat(o.meta.scale);f?(this.resolution=f,u.source.resolution=this.resolution):this.resolution=u.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<=Ka.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 a=t;const u=n?1/0:Ka.BATCH_SIZE;for(;a-t<u&&a<this._frameKeys.length;){const o=this._frameKeys[a],c=this._frames[o],f=c.frame;if(f){let m=null,g=null;const p=c.trimmed!==!1&&c.sourceSize?c.sourceSize:c.frame,_=new Kt(0,0,Math.floor(p.w)/this.resolution,Math.floor(p.h)/this.resolution);c.rotated?m=new Kt(Math.floor(f.x)/this.resolution,Math.floor(f.y)/this.resolution,Math.floor(f.h)/this.resolution,Math.floor(f.w)/this.resolution):m=new Kt(Math.floor(f.x)/this.resolution,Math.floor(f.y)/this.resolution,Math.floor(f.w)/this.resolution,Math.floor(f.h)/this.resolution),c.trimmed!==!1&&c.spriteSourceSize&&(g=new Kt(Math.floor(c.spriteSourceSize.x)/this.resolution,Math.floor(c.spriteSourceSize.y)/this.resolution,Math.floor(f.w)/this.resolution,Math.floor(f.h)/this.resolution)),this.textures[o]=new Ut({source:this.textureSource,frame:m,orig:_,trim:g,rotate:c.rotated?2:0,defaultAnchor:c.anchor,defaultBorders:c.borders,label:o.toString()})}a++}}_processAnimations(){const t=this.data.animations||{};for(const n in t){this.animations[n]=[];for(let a=0;a<t[n].length;a++){const u=t[n][a];this.animations[n].push(this.textures[u])}}}_parseComplete(){const t=this._callback;this._callback=null,this._batchIndex=0,t.call(this,this.textures)}_nextBatch(){this._processFrames(this._batchIndex*Ka.BATCH_SIZE),this._batchIndex++,setTimeout(()=>{this._batchIndex*Ka.BATCH_SIZE<this._frameKeys.length?this._nextBatch():(this._processAnimations(),this._parseComplete())},0)}destroy(t=!1){var n;for(const a in this.textures)this.textures[a].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=[]}};Yy.BATCH_SIZE=1e3;let xp=Yy;const B1=["jpg","png","jpeg","avif","webp","basis","etc2","bc7","bc6h","bc5","bc4","bc3","bc2","bc1","eac","astc"];function jy(l,t,n){const a={};if(l.forEach(u=>{a[u]=t}),Object.keys(t.textures).forEach(u=>{a[`${t.cachePrefix}${u}`]=t.textures[u]}),!n){const u=sl.dirname(l[0]);t.linkedSheets.forEach((o,c)=>{const f=jy([`${u}/${t.data.meta.related_multi_packs[c]}`],o,!0);Object.assign(a,f)})}return a}const O1={extension:pt.Asset,cache:{test:l=>l instanceof xp,getCacheableAssets:(l,t)=>jy(l,t,!1)},resolver:{extension:{type:pt.ResolveParser,name:"resolveSpritesheet"},test:l=>{const n=l.split("?")[0].split("."),a=n.pop(),u=n.pop();return a==="json"&&B1.includes(u)},parse:l=>{var n;const t=l.split(".");return{resolution:parseFloat(((n=Ly.RETINA_PREFIX.exec(l))==null?void 0:n[1])??"1"),format:t[t.length-2],src:l}}},loader:{name:"spritesheetLoader",id:"spritesheet",extension:{type:pt.LoadParser,priority:ky.Normal,name:"spritesheetLoader"},async testParse(l,t){return sl.extname(t.src).toLowerCase()===".json"&&!!l.frames},async parse(l,t,n){var _,b;const{texture:a,imageFilename:u,textureOptions:o,cachePrefix:c}=(t==null?void 0:t.data)??{};let f=sl.dirname(t.src);f&&f.lastIndexOf("/")!==f.length-1&&(f+="/");let m;if(a instanceof Ut)m=a;else{const x=_p(f+(u??l.meta.image),t.src);m=(await n.load([{src:x,data:o}]))[x]}const g=new xp({texture:m.source,data:l,cachePrefix:c});await g.parse();const p=(_=l==null?void 0:l.meta)==null?void 0:_.related_multi_packs;if(Array.isArray(p)){const x=[];for(const A of p){if(typeof A!="string")continue;let T=f+A;(b=t.data)!=null&&b.ignoreMultiPack||(T=_p(T,t.src),x.push(n.load({src:T,data:{textureOptions:o,ignoreMultiPack:!0}})))}const S=await Promise.all(x);g.linkedSheets=S,S.forEach(A=>{A.linkedSheets=[g].concat(g.linkedSheets.filter(T=>T!==A))})}return g},async unload(l,t,n){await n.unload(l.textureSource._sourceOrigin),l.destroy(!1)}}};It.add(O1);const Lc=Object.create(null),bp=Object.create(null);function wh(l,t){let n=bp[l];return n===void 0&&(Lc[t]===void 0&&(Lc[t]=1),bp[l]=n=Lc[t]++),n}let Os;function Xy(){return(!Os||Os!=null&&Os.isContextLost())&&(Os=je.get().createCanvas().getContext("webgl",{})),Os}let Lr;function G1(){if(!Lr){Lr="mediump";const l=Xy();l&&l.getShaderPrecisionFormat&&(Lr=l.getShaderPrecisionFormat(l.FRAGMENT_SHADER,l.HIGH_FLOAT).precision?"highp":"mediump")}return Lr}function U1(l,t,n){return t?l:n?(l=l.replace("out vec4 finalColor;",""),`
54
+
55
+ #ifdef GL_ES // This checks if it is WebGL1
56
+ #define in varying
57
+ #define finalColor gl_FragColor
58
+ #define texture texture2D
59
+ #endif
60
+ ${l}
61
+ `):`
62
+
63
+ #ifdef GL_ES // This checks if it is WebGL1
64
+ #define in attribute
65
+ #define out varying
66
+ #endif
67
+ ${l}
68
+ `}function N1(l,t,n){const a=n?t.maxSupportedFragmentPrecision:t.maxSupportedVertexPrecision;if(l.substring(0,9)!=="precision"){let u=n?t.requestedFragmentPrecision:t.requestedVertexPrecision;return u==="highp"&&a!=="highp"&&(u="mediump"),`precision ${u} float;
69
+ ${l}`}else if(a!=="highp"&&l.substring(0,15)==="precision highp")return l.replace("precision highp","precision mediump");return l}function k1(l,t){return t?`#version 300 es
70
+ ${l}`:l}const H1={},L1={};function Y1(l,{name:t="pixi-program"},n=!0){t=t.replace(/\s+/g,"-"),t+=n?"-fragment":"-vertex";const a=n?H1:L1;return a[t]?(a[t]++,t+=`-${a[t]}`):a[t]=1,l.indexOf("#define SHADER_NAME")!==-1?l:`${`#define SHADER_NAME ${t}`}
71
+ ${l}`}function j1(l,t){return t?l.replace("#version 300 es",""):l}const Yc={stripVersion:j1,ensurePrecision:N1,addProgramDefines:U1,setProgramName:Y1,insertVersion:k1},qa=Object.create(null),qy=class lh{constructor(t){t={...lh.defaultOptions,...t};const n=t.fragment.indexOf("#version 300 es")!==-1,a={stripVersion:n,ensurePrecision:{requestedFragmentPrecision:t.preferredFragmentPrecision,requestedVertexPrecision:t.preferredVertexPrecision,maxSupportedVertexPrecision:"highp",maxSupportedFragmentPrecision:G1()},setProgramName:{name:t.name},addProgramDefines:n,insertVersion:n};let u=t.fragment,o=t.vertex;Object.keys(Yc).forEach(c=>{const f=a[c];u=Yc[c](u,f,!0),o=Yc[c](o,f,!1)}),this.fragment=u,this.vertex=o,this.transformFeedbackVaryings=t.transformFeedbackVaryings,this._key=wh(`${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,qa[this._cacheKey]=null}static from(t){const n=`${t.vertex}:${t.fragment}`;return qa[n]||(qa[n]=new lh(t),qa[n]._cacheKey=n),qa[n]}};qy.defaultOptions={preferredVertexPrecision:"highp",preferredFragmentPrecision:"mediump"};let Vy=qy;const vp={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 X1(l){return vp[l]??vp.float32}const q1={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"},Sp=/@location\((\d+)\)\s+([a-zA-Z0-9_]+)\s*:\s*([a-zA-Z0-9_<>]+)(?:,|\s|\)|$)/g;function Tp(l,t){let n;for(;(n=Sp.exec(l))!==null;){const a=q1[n[3]]??"float32";t[n[2]]={location:parseInt(n[1],10),format:a,stride:X1(a).stride,offset:0,instance:!1,start:0}}Sp.lastIndex=0}function V1(l){return l.replace(/\/\/.*$/gm,"").replace(/\/\*[\s\S]*?\*\//g,"")}function P1({source:l,entryPoint:t}){const n={},a=V1(l),u=a.indexOf(`fn ${t}(`);if(u===-1)return n;const o=a.indexOf("->",u);if(o===-1)return n;const c=a.substring(u,o);if(Tp(c,n),Object.keys(n).length===0){const f=c.match(/\(\s*\w+\s*:\s*(\w+)/);if(f){const m=f[1],g=new RegExp(`struct\\s+${m}\\s*\\{([^}]+)\\}`,"s"),p=a.match(g);p&&Tp(p[1],n)}}return n}function jc(l){var _,b;const t=/(^|[^/])@(group|binding)\(\d+\)[^;]+;/g,n=/@group\((\d+)\)/,a=/@binding\((\d+)\)/,u=/var(<[^>]+>)? (\w+)/,o=/:\s*([\w<>]+)/,c=/struct\s+(\w+)\s*{([^}]+)}/g,f=/(\w+)\s*:\s*([\w\<\>]+)/g,m=/struct\s+(\w+)/,g=(_=l.match(t))==null?void 0:_.map(x=>({group:parseInt(x.match(n)[1],10),binding:parseInt(x.match(a)[1],10),name:x.match(u)[2],isUniform:x.match(u)[1]==="<uniform>",type:x.match(o)[1]}));if(!g)return{groups:[],structs:[]};const p=((b=l.match(c))==null?void 0:b.map(x=>{const S=x.match(m)[1],A=x.match(f).reduce((T,M)=>{const[z,B]=M.split(":");return T[z.trim()]=B.trim(),T},{});return A?{name:S,members:A}:null}).filter(({name:x})=>g.some(S=>S.type===x||S.type.includes(`<${x}>`))))??[];return{groups:g,structs:p}}var Pn=(l=>(l[l.VERTEX=1]="VERTEX",l[l.FRAGMENT=2]="FRAGMENT",l[l.COMPUTE=4]="COMPUTE",l))(Pn||{});function F1({groups:l}){const t=[];for(let n=0;n<l.length;n++){const a=l[n];t[a.group]||(t[a.group]=[]),a.isUniform?t[a.group].push({binding:a.binding,visibility:Pn.VERTEX|Pn.FRAGMENT,buffer:{type:"uniform"}}):a.type==="sampler"?t[a.group].push({binding:a.binding,visibility:Pn.FRAGMENT,sampler:{type:"filtering"}}):a.type==="texture_2d"||a.type.startsWith("texture_2d<")?t[a.group].push({binding:a.binding,visibility:Pn.FRAGMENT,texture:{sampleType:"float",viewDimension:"2d",multisampled:!1}}):a.type==="texture_2d_array"||a.type.startsWith("texture_2d_array<")?t[a.group].push({binding:a.binding,visibility:Pn.FRAGMENT,texture:{sampleType:"float",viewDimension:"2d-array",multisampled:!1}}):(a.type==="texture_cube"||a.type.startsWith("texture_cube<"))&&t[a.group].push({binding:a.binding,visibility:Pn.FRAGMENT,texture:{sampleType:"float",viewDimension:"cube",multisampled:!1}})}for(let n=0;n<t.length;n++)t[n]||(t[n]=[]);return t}function Q1({groups:l}){const t=[];for(let n=0;n<l.length;n++){const a=l[n];t[a.group]||(t[a.group]={}),t[a.group][a.name]=a.binding}return t}function Z1(l,t){const n=new Set,a=new Set,u=[...l.structs,...t.structs].filter(c=>n.has(c.name)?!1:(n.add(c.name),!0)),o=[...l.groups,...t.groups].filter(c=>{const f=`${c.name}-${c.binding}`;return a.has(f)?!1:(a.add(f),!0)});return{structs:u,groups:o}}const Va=Object.create(null);class nu{constructor(t){var f,m;this._layoutKey=0,this._attributeLocationsKey=0;const{fragment:n,vertex:a,layout:u,gpuLayout:o,name:c}=t;if(this.name=c,this.fragment=n,this.vertex=a,n.source===a.source){const g=jc(n.source);this.structsAndGroups=g}else{const g=jc(a.source),p=jc(n.source);this.structsAndGroups=Z1(g,p)}this.layout=u??Q1(this.structsAndGroups),this.gpuLayout=o??F1(this.structsAndGroups),this.autoAssignGlobalUniforms=((f=this.layout[0])==null?void 0:f.globalUniforms)!==void 0,this.autoAssignLocalUniforms=((m=this.layout[1])==null?void 0:m.localUniforms)!==void 0,this._generateProgramKey()}_generateProgramKey(){const{vertex:t,fragment:n}=this,a=t.source+n.source+t.entryPoint+n.entryPoint;this._layoutKey=wh(a,"program")}get attributeData(){return this._attributeData??(this._attributeData=P1(this.vertex)),this._attributeData}destroy(){this.gpuLayout=null,this.layout=null,this.structsAndGroups=null,this.fragment=null,this.vertex=null,Va[this._cacheKey]=null}static from(t){const n=`${t.vertex.source}:${t.fragment.source}:${t.fragment.entryPoint}:${t.vertex.entryPoint}`;return Va[n]||(Va[n]=new nu(t),Va[n]._cacheKey=n),Va[n]}}const Py=["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>"],W1=Py.reduce((l,t)=>(l[t]=!0,l),{});function K1(l,t){switch(l){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 Fy=class Qy{constructor(t,n){this._touched=0,this.uid=Qt("uniform"),this._resourceType="uniformGroup",this._resourceId=Qt("resource"),this.isUniformGroup=!0,this._dirtyId=0,this.destroyed=!1,n={...Qy.defaultOptions,...n},this.uniformStructures=t;const a={};for(const u in t){const o=t[u];if(o.name=u,o.size=o.size??1,!W1[o.type]){const c=o.type.match(/^array<(\w+(?:<\w+>)?),\s*(\d+)>$/);if(c){const[,f,m]=c;throw new Error(`Uniform type ${o.type} is not supported. Use type: '${f}', size: ${m} instead.`)}throw new Error(`Uniform type ${o.type} is not supported. Supported uniform types are: ${Py.join(", ")}`)}o.value??(o.value=K1(o.type,o.size)),a[u]=o.value}this.uniforms=a,this._dirtyId=1,this.ubo=n.ubo,this.isStatic=n.isStatic,this._signature=wh(Object.keys(a).map(u=>`${u}-${t[u].type}`).join("-"),"uniform-group")}update(){this._dirtyId++}};Fy.defaultOptions={ubo:!1,isStatic:!1};let Zy=Fy;class Zr{constructor(t){this.resources=Object.create(null),this._dirty=!0;let n=0;for(const a in t){const u=t[a];this.setResource(u,n++)}this._updateKey()}_updateKey(){if(!this._dirty)return;this._dirty=!1;const t=[];let n=0;for(const a in this.resources)t[n++]=this.resources[a]._resourceId;this._key=t.join("|")}setResource(t,n){var u,o;const a=this.resources[n];t!==a&&((u=a==null?void 0:a.off)==null||u.call(a,"change",this.onResourceChange,this),(o=t.on)==null||o.call(t,"change",this.onResourceChange,this),this.resources[n]=t,this._dirty=!0)}getResource(t){return this.resources[t]}_touch(t,n){const a=this.resources;for(const u in a)a[u]._gcLastUsed=t,a[u]._touched=n}destroy(){var n;const t=this.resources;for(const a in t){const u=t[a];(n=u==null?void 0:u.off)==null||n.call(u,"change",this.onResourceChange,this)}this.resources=null}onResourceChange(t){this._dirty=!0,t.destroyed?this.destroy():this._updateKey()}}var rh=(l=>(l[l.WEBGL=1]="WEBGL",l[l.WEBGPU=2]="WEBGPU",l[l.CANVAS=4]="CANVAS",l[l.BOTH=3]="BOTH",l))(rh||{});class Eh extends xi{constructor(t){super(),this.uid=Qt("shader"),this._uniformBindMap=Object.create(null),this._ownedBindGroups=[],this._destroyed=!1;let{gpuProgram:n,glProgram:a,groups:u,resources:o,compatibleRenderers:c,groupMap:f}=t;this.gpuProgram=n,this.glProgram=a,c===void 0&&(c=0,n&&(c|=rh.WEBGPU),a&&(c|=rh.WEBGL)),this.compatibleRenderers=c;const m={};if(!o&&!u&&(o={}),o&&u)throw new Error("[Shader] Cannot have both resources and groups");if(!n&&u&&!f)throw new Error("[Shader] No group map or WebGPU shader provided - consider using resources instead.");if(!n&&u&&f)for(const g in f)for(const p in f[g]){const _=f[g][p];m[_]={group:g,binding:p,name:_}}else if(n&&u&&!f){const g=n.structsAndGroups.groups;f={},g.forEach(p=>{f[p.group]=f[p.group]||{},f[p.group][p.binding]=p.name,m[p.name]=p})}else if(o){u={},f={},n&&n.structsAndGroups.groups.forEach(_=>{f[_.group]=f[_.group]||{},f[_.group][_.binding]=_.name,m[_.name]=_});let g=0;for(const p in o)m[p]||(u[99]||(u[99]=new Zr,this._ownedBindGroups.push(u[99])),m[p]={group:99,binding:g,name:p},f[99]=f[99]||{},f[99][g]=p,g++);for(const p in o){const _=p;let b=o[p];!b.source&&!b._resourceType&&(b=new Zy(b));const x=m[_];x&&(u[x.group]||(u[x.group]=new Zr,this._ownedBindGroups.push(u[x.group])),u[x.group].setResource(b,x.binding))}}this.groups=u,this._uniformBindMap=f,this.resources=this._buildResourceAccessor(u,m)}addResource(t,n,a){var u,o;(u=this._uniformBindMap)[n]||(u[n]={}),(o=this._uniformBindMap[n])[a]||(o[a]=t),this.groups[n]||(this.groups[n]=new Zr,this._ownedBindGroups.push(this.groups[n]))}_buildResourceAccessor(t,n){const a={};for(const u in n){const o=n[u];Object.defineProperty(a,o.name,{get(){return t[o.group].getResource(o.binding)},set(c){t[o.group].setResource(c,o.binding)}})}return a}destroy(t=!1){var n,a;this._destroyed||(this._destroyed=!0,this.emit("destroy",this),t&&((n=this.gpuProgram)==null||n.destroy(),(a=this.glProgram)==null||a.destroy()),this.gpuProgram=null,this.glProgram=null,this.removeAllListeners(),this._uniformBindMap=null,this._ownedBindGroups.forEach(u=>{u.destroy()}),this._ownedBindGroups=null,this.resources=null,this.groups=null)}static from(t){const{gpu:n,gl:a,...u}=t;let o,c;return n&&(o=nu.from(n)),a&&(c=Vy.from(a)),new Eh({gpuProgram:o,glProgram:c,...u})}}const I1={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},Xc=0,qc=1,Vc=2,Pc=3,Fc=4,Qc=5,uh=class Wy{constructor(){this.data=0,this.blendMode="normal",this.polygonOffset=0,this.blend=!0,this.depthMask=!0}get blend(){return!!(this.data&1<<Xc)}set blend(t){!!(this.data&1<<Xc)!==t&&(this.data^=1<<Xc)}get offsets(){return!!(this.data&1<<qc)}set offsets(t){!!(this.data&1<<qc)!==t&&(this.data^=1<<qc)}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<<Vc)}set culling(t){!!(this.data&1<<Vc)!==t&&(this.data^=1<<Vc)}get depthTest(){return!!(this.data&1<<Pc)}set depthTest(t){!!(this.data&1<<Pc)!==t&&(this.data^=1<<Pc)}get depthMask(){return!!(this.data&1<<Qc)}set depthMask(t){!!(this.data&1<<Qc)!==t&&(this.data^=1<<Qc)}get clockwiseFrontFace(){return!!(this.data&1<<Fc)}set clockwiseFrontFace(t){!!(this.data&1<<Fc)!==t&&(this.data^=1<<Fc)}get blendMode(){return this._blendMode}set blendMode(t){this.blend=t!=="none",this._blendMode=t,this._blendModeId=I1[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 Wy;return t.depthTest=!1,t.blend=!0,t}};uh.default2d=uh.for2d();let Ky=uh;const oh=[];It.handleByNamedList(pt.Environment,oh);async function J1(l){if(!l)for(let t=0;t<oh.length;t++){const n=oh[t];if(n.value.test()){await n.value.load();return}}}let Pa;function $1(){if(typeof Pa=="boolean")return Pa;try{Pa=new Function("param1","param2","param3","return param1[param2] === param3;")({a:"b"},"a","b")===!0}catch{Pa=!1}return Pa}function Ap(l,t,n=2){const a=t&&t.length,u=a?t[0]*n:l.length;let o=Iy(l,0,u,n,!0);const c=[];if(!o||o.next===o.prev)return c;let f,m,g;if(a&&(o=sv(l,t,o,n)),l.length>80*n){f=l[0],m=l[1];let p=f,_=m;for(let b=n;b<u;b+=n){const x=l[b],S=l[b+1];x<f&&(f=x),S<m&&(m=S),x>p&&(p=x),S>_&&(_=S)}g=Math.max(p-f,_-m),g=g!==0?32767/g:0}return al(o,c,n,f,m,g,0),c}function Iy(l,t,n,a,u){let o;if(u===gv(l,t,n,a)>0)for(let c=t;c<n;c+=a)o=Cp(c/a|0,l[c],l[c+1],o);else for(let c=n-a;c>=t;c-=a)o=Cp(c/a|0,l[c],l[c+1],o);return o&&Ps(o,o.next)&&(rl(o),o=o.next),o}function Zn(l,t){if(!l)return l;t||(t=l);let n=l,a;do if(a=!1,!n.steiner&&(Ps(n,n.next)||Xt(n.prev,n,n.next)===0)){if(rl(n),n=t=n.prev,n===n.next)break;a=!0}else n=n.next;while(a||n!==t);return t}function al(l,t,n,a,u,o,c){if(!l)return;!c&&o&&ov(l,a,u,o);let f=l;for(;l.prev!==l.next;){const m=l.prev,g=l.next;if(o?ev(l,a,u,o):tv(l)){t.push(m.i,l.i,g.i),rl(l),l=g.next,f=g.next;continue}if(l=g,l===f){c?c===1?(l=iv(Zn(l),t),al(l,t,n,a,u,o,2)):c===2&&nv(l,t,n,a,u,o):al(Zn(l),t,n,a,u,o,1);break}}}function tv(l){const t=l.prev,n=l,a=l.next;if(Xt(t,n,a)>=0)return!1;const u=t.x,o=n.x,c=a.x,f=t.y,m=n.y,g=a.y,p=Math.min(u,o,c),_=Math.min(f,m,g),b=Math.max(u,o,c),x=Math.max(f,m,g);let S=a.next;for(;S!==t;){if(S.x>=p&&S.x<=b&&S.y>=_&&S.y<=x&&Ia(u,f,o,m,c,g,S.x,S.y)&&Xt(S.prev,S,S.next)>=0)return!1;S=S.next}return!0}function ev(l,t,n,a){const u=l.prev,o=l,c=l.next;if(Xt(u,o,c)>=0)return!1;const f=u.x,m=o.x,g=c.x,p=u.y,_=o.y,b=c.y,x=Math.min(f,m,g),S=Math.min(p,_,b),A=Math.max(f,m,g),T=Math.max(p,_,b),M=ch(x,S,t,n,a),z=ch(A,T,t,n,a);let B=l.prevZ,O=l.nextZ;for(;B&&B.z>=M&&O&&O.z<=z;){if(B.x>=x&&B.x<=A&&B.y>=S&&B.y<=T&&B!==u&&B!==c&&Ia(f,p,m,_,g,b,B.x,B.y)&&Xt(B.prev,B,B.next)>=0||(B=B.prevZ,O.x>=x&&O.x<=A&&O.y>=S&&O.y<=T&&O!==u&&O!==c&&Ia(f,p,m,_,g,b,O.x,O.y)&&Xt(O.prev,O,O.next)>=0))return!1;O=O.nextZ}for(;B&&B.z>=M;){if(B.x>=x&&B.x<=A&&B.y>=S&&B.y<=T&&B!==u&&B!==c&&Ia(f,p,m,_,g,b,B.x,B.y)&&Xt(B.prev,B,B.next)>=0)return!1;B=B.prevZ}for(;O&&O.z<=z;){if(O.x>=x&&O.x<=A&&O.y>=S&&O.y<=T&&O!==u&&O!==c&&Ia(f,p,m,_,g,b,O.x,O.y)&&Xt(O.prev,O,O.next)>=0)return!1;O=O.nextZ}return!0}function iv(l,t){let n=l;do{const a=n.prev,u=n.next.next;!Ps(a,u)&&$y(a,n,n.next,u)&&ll(a,u)&&ll(u,a)&&(t.push(a.i,n.i,u.i),rl(n),rl(n.next),n=l=u),n=n.next}while(n!==l);return Zn(n)}function nv(l,t,n,a,u,o){let c=l;do{let f=c.next.next;for(;f!==c.prev;){if(c.i!==f.i&&fv(c,f)){let m=t0(c,f);c=Zn(c,c.next),m=Zn(m,m.next),al(c,t,n,a,u,o,0),al(m,t,n,a,u,o,0);return}f=f.next}c=c.next}while(c!==l)}function sv(l,t,n,a){const u=[];for(let o=0,c=t.length;o<c;o++){const f=t[o]*a,m=o<c-1?t[o+1]*a:l.length,g=Iy(l,f,m,a,!1);g===g.next&&(g.steiner=!0),u.push(hv(g))}u.sort(av);for(let o=0;o<u.length;o++)n=lv(u[o],n);return n}function av(l,t){let n=l.x-t.x;if(n===0&&(n=l.y-t.y,n===0)){const a=(l.next.y-l.y)/(l.next.x-l.x),u=(t.next.y-t.y)/(t.next.x-t.x);n=a-u}return n}function lv(l,t){const n=rv(l,t);if(!n)return t;const a=t0(n,l);return Zn(a,a.next),Zn(n,n.next)}function rv(l,t){let n=t;const a=l.x,u=l.y;let o=-1/0,c;if(Ps(l,n))return n;do{if(Ps(l,n.next))return n.next;if(u<=n.y&&u>=n.next.y&&n.next.y!==n.y){const _=n.x+(u-n.y)*(n.next.x-n.x)/(n.next.y-n.y);if(_<=a&&_>o&&(o=_,c=n.x<n.next.x?n:n.next,_===a))return c}n=n.next}while(n!==t);if(!c)return null;const f=c,m=c.x,g=c.y;let p=1/0;n=c;do{if(a>=n.x&&n.x>=m&&a!==n.x&&Jy(u<g?a:o,u,m,g,u<g?o:a,u,n.x,n.y)){const _=Math.abs(u-n.y)/(a-n.x);ll(n,l)&&(_<p||_===p&&(n.x>c.x||n.x===c.x&&uv(c,n)))&&(c=n,p=_)}n=n.next}while(n!==f);return c}function uv(l,t){return Xt(l.prev,l,t.prev)<0&&Xt(t.next,l,l.next)<0}function ov(l,t,n,a){let u=l;do u.z===0&&(u.z=ch(u.x,u.y,t,n,a)),u.prevZ=u.prev,u.nextZ=u.next,u=u.next;while(u!==l);u.prevZ.nextZ=null,u.prevZ=null,cv(u)}function cv(l){let t,n=1;do{let a=l,u;l=null;let o=null;for(t=0;a;){t++;let c=a,f=0;for(let g=0;g<n&&(f++,c=c.nextZ,!!c);g++);let m=n;for(;f>0||m>0&&c;)f!==0&&(m===0||!c||a.z<=c.z)?(u=a,a=a.nextZ,f--):(u=c,c=c.nextZ,m--),o?o.nextZ=u:l=u,u.prevZ=o,o=u;a=c}o.nextZ=null,n*=2}while(t>1);return l}function ch(l,t,n,a,u){return l=(l-n)*u|0,t=(t-a)*u|0,l=(l|l<<8)&16711935,l=(l|l<<4)&252645135,l=(l|l<<2)&858993459,l=(l|l<<1)&1431655765,t=(t|t<<8)&16711935,t=(t|t<<4)&252645135,t=(t|t<<2)&858993459,t=(t|t<<1)&1431655765,l|t<<1}function hv(l){let t=l,n=l;do(t.x<n.x||t.x===n.x&&t.y<n.y)&&(n=t),t=t.next;while(t!==l);return n}function Jy(l,t,n,a,u,o,c,f){return(u-c)*(t-f)>=(l-c)*(o-f)&&(l-c)*(a-f)>=(n-c)*(t-f)&&(n-c)*(o-f)>=(u-c)*(a-f)}function Ia(l,t,n,a,u,o,c,f){return!(l===c&&t===f)&&Jy(l,t,n,a,u,o,c,f)}function fv(l,t){return l.next.i!==t.i&&l.prev.i!==t.i&&!dv(l,t)&&(ll(l,t)&&ll(t,l)&&mv(l,t)&&(Xt(l.prev,l,t.prev)||Xt(l,t.prev,t))||Ps(l,t)&&Xt(l.prev,l,l.next)>0&&Xt(t.prev,t,t.next)>0)}function Xt(l,t,n){return(t.y-l.y)*(n.x-t.x)-(t.x-l.x)*(n.y-t.y)}function Ps(l,t){return l.x===t.x&&l.y===t.y}function $y(l,t,n,a){const u=jr(Xt(l,t,n)),o=jr(Xt(l,t,a)),c=jr(Xt(n,a,l)),f=jr(Xt(n,a,t));return!!(u!==o&&c!==f||u===0&&Yr(l,n,t)||o===0&&Yr(l,a,t)||c===0&&Yr(n,l,a)||f===0&&Yr(n,t,a))}function Yr(l,t,n){return t.x<=Math.max(l.x,n.x)&&t.x>=Math.min(l.x,n.x)&&t.y<=Math.max(l.y,n.y)&&t.y>=Math.min(l.y,n.y)}function jr(l){return l>0?1:l<0?-1:0}function dv(l,t){let n=l;do{if(n.i!==l.i&&n.next.i!==l.i&&n.i!==t.i&&n.next.i!==t.i&&$y(n,n.next,l,t))return!0;n=n.next}while(n!==l);return!1}function ll(l,t){return Xt(l.prev,l,l.next)<0?Xt(l,t,l.next)>=0&&Xt(l,l.prev,t)>=0:Xt(l,t,l.prev)<0||Xt(l,l.next,t)<0}function mv(l,t){let n=l,a=!1;const u=(l.x+t.x)/2,o=(l.y+t.y)/2;do n.y>o!=n.next.y>o&&n.next.y!==n.y&&u<(n.next.x-n.x)*(o-n.y)/(n.next.y-n.y)+n.x&&(a=!a),n=n.next;while(n!==l);return a}function t0(l,t){const n=hh(l.i,l.x,l.y),a=hh(t.i,t.x,t.y),u=l.next,o=t.prev;return l.next=t,t.prev=l,n.next=u,u.prev=n,a.next=n,n.prev=a,o.next=a,a.prev=o,a}function Cp(l,t,n,a){const u=hh(l,t,n);return a?(u.next=a.next,u.prev=a,a.next.prev=u,a.next=u):(u.prev=u,u.next=u),u}function rl(l){l.next.prev=l.prev,l.prev.next=l.next,l.prevZ&&(l.prevZ.nextZ=l.nextZ),l.nextZ&&(l.nextZ.prevZ=l.prevZ)}function hh(l,t,n){return{i:l,x:t,y:n,prev:null,next:null,z:0,prevZ:null,nextZ:null,steiner:!1}}function gv(l,t,n,a){let u=0;for(let o=t,c=n-a;o<n;o+=a)u+=(l[c]-l[o])*(l[o+1]+l[c+1]),c=o;return u}const pv=Ap.default||Ap;var e0=(l=>(l[l.NONE=0]="NONE",l[l.COLOR=16384]="COLOR",l[l.STENCIL=1024]="STENCIL",l[l.DEPTH=256]="DEPTH",l[l.COLOR_DEPTH=16640]="COLOR_DEPTH",l[l.COLOR_STENCIL=17408]="COLOR_STENCIL",l[l.DEPTH_STENCIL=1280]="DEPTH_STENCIL",l[l.ALL=17664]="ALL",l))(e0||{});class yv{constructor(t){this.items=[],this._name=t}emit(t,n,a,u,o,c,f,m){const{name:g,items:p}=this;for(let _=0,b=p.length;_<b;_++)p[_][g](t,n,a,u,o,c,f,m);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 _v=["init","destroy","contextChange","resolutionChange","resetState","renderEnd","renderStart","render","update","postrender","prerender"],i0=class n0 extends xi{constructor(t){super(),this.tick=0,this.uid=Qt("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=[..._v,...this.config.runners??[]];this._addRunners(...n),this._unsafeEvalCheck()}async init(t={}){const n=t.skipExtensionImports===!0?!0:t.manageImports===!1;await J1(n),this._addSystems(this.config.systems),this._addPipes(this.config.renderPipes,this.config.renderPipeAdaptors);for(const a in this._systemsHash)t={...this._systemsHash[a].constructor.defaultOptions,...t};t={...n0.defaultOptions,...t},this._roundPixels=t.roundPixels?1:0;for(let a=0;a<this.runners.init.items.length;a++)await this.runners.init.items[a].init(t);this._initOptions=t}render(t,n){this.tick++;let a=t;if(a instanceof ni&&(a={container:a},n&&(At(Ft,"passing a second argument is deprecated, please use render options instead"),a.target=n.renderTexture)),a.target||(a.target=this.view.renderTarget),a.target===this.view.renderTarget&&(this._lastObjectRendered=a.container,a.clearColor??(a.clearColor=this.background.colorRgba),a.clear??(a.clear=this.background.clearBeforeRender)),a.clearColor){const u=Array.isArray(a.clearColor)&&a.clearColor.length===4;a.clearColor=u?a.clearColor:ne.shared.setValue(a.clearColor).toArray()}a.transform||(a.container.updateLocalTransform(),a.transform=a.container.localTransform),a.container.visible&&(a.container.enableRenderGroup(),this.runners.prerender.emit(a),this.runners.renderStart.emit(a),this.runners.render.emit(a),this.runners.renderEnd.emit(a),this.runners.postrender.emit(a))}resize(t,n,a){const u=this.view.resolution;this.view.resize(t,n,a),this.emit("resize",this.view.screen.width,this.view.screen.height,this.view.resolution),a!==void 0&&a!==u&&this.runners.resolutionChange.emit(a)}clear(t={}){const n=this;t.target||(t.target=n.renderTarget.renderTarget),t.clearColor||(t.clearColor=this.background.colorRgba),t.clear??(t.clear=e0.ALL);const{clear:a,clearColor:u,target:o,mipLevel:c,layer:f}=t;ne.shared.setValue(u??this.background.colorRgba),n.renderTarget.clear(o,a,ne.shared.toArray(),c??0,f??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 yv(n)})}_addSystems(t){let n;for(n in t){const a=t[n];this._addSystem(a.value,a.name)}}_addSystem(t,n){const a=new t(this);if(this[n])throw new Error(`Whoops! The name "${n}" is already in use`);this[n]=a,this._systemsHash[n]=a;for(const u in this.runners)this.runners[u].add(a);return this}_addPipes(t,n){const a=n.reduce((u,o)=>(u[o.name]=o.value,u),{});t.forEach(u=>{const o=u.value,c=u.name,f=a[c];this.renderPipes[c]=new o(this,f?new f:null),this.runners.destroy.add(this.renderPipes[c])})}destroy(t=!1){this.runners.destroy.items.reverse(),this.runners.destroy.emit(t),(t===!0||typeof t=="object"&&t.releaseGlobalResources)&&cl.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(!$1())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()}};i0.defaultOptions={resolution:1,failIfMajorPerformanceCaveat:!1,roundPixels:!1};let s0=i0,Xr;function xv(l){return Xr!==void 0||(Xr=(()=>{var n;const t={stencil:!0,failIfMajorPerformanceCaveat:l??s0.defaultOptions.failIfMajorPerformanceCaveat};try{if(!je.get().getWebGLRenderingContext())return!1;let u=je.get().createCanvas().getContext("webgl",t);const o=!!((n=u==null?void 0:u.getContextAttributes())!=null&&n.stencil);if(u){const c=u.getExtension("WEBGL_lose_context");c&&c.loseContext()}return u=null,o}catch{return!1}})()),Xr}let qr;async function bv(l={}){return qr!==void 0||(qr=await(async()=>{const t=je.get().getNavigator().gpu;if(!t)return!1;try{return await(await t.requestAdapter(l)).requestDevice(),!0}catch{return!1}})()),qr}const Mp=["webgl","webgpu","canvas"];async function vv(l){let t=[];l.preference?(t.push(l.preference),Mp.forEach(o=>{o!==l.preference&&t.push(o)})):t=Mp.slice();let n,a={};for(let o=0;o<t.length;o++){const c=t[o];if(c==="webgpu"&&await bv()){const{WebGPURenderer:f}=await Ja(async()=>{const{WebGPURenderer:m}=await import("./WebGPURenderer-FkK3p3f4.js");return{WebGPURenderer:m}},__vite__mapDeps([3,4,5,2]));n=f,a={...l,...l.webgpu};break}else if(c==="webgl"&&xv(l.failIfMajorPerformanceCaveat??s0.defaultOptions.failIfMajorPerformanceCaveat)){const{WebGLRenderer:f}=await Ja(async()=>{const{WebGLRenderer:m}=await import("./WebGLRenderer-B5LAM4bk.js");return{WebGLRenderer:m}},__vite__mapDeps([6,4,5,2]));n=f,a={...l,...l.webgl};break}else if(c==="canvas"){const{CanvasRenderer:f}=await Ja(async()=>{const{CanvasRenderer:m}=await import("./CanvasRenderer-BvTI2UTL.js");return{CanvasRenderer:m}},__vite__mapDeps([7,5,2]));n=f,a={...l,...l.canvasOptions};break}}if(delete a.webgpu,delete a.webgl,delete a.canvasOptions,!n)throw new Error("No available renderer for the current environment");const u=new n;return await u.init(a),u}const a0="8.17.1";class l0{static init(){var t;(t=globalThis.__PIXI_APP_INIT__)==null||t.call(globalThis,this,a0)}static destroy(){}}l0.extension=pt.Application;class Sv{constructor(t){this._renderer=t}init(){var t;(t=globalThis.__PIXI_RENDERER_INIT__)==null||t.call(globalThis,this._renderer,a0)}destroy(){this._renderer=null}}Sv.extension={type:[pt.WebGLSystem,pt.WebGPUSystem],name:"initHook",priority:-10};class r0{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,a;if(this._resizeTo===globalThis.window)n=globalThis.innerWidth,a=globalThis.innerHeight;else{const{clientWidth:u,clientHeight:o}=this._resizeTo;n=u,a=o}this.renderer.resize(n,a),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}}r0.extension=pt.Application;class u0{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,Ir.LOW)},get(){return this._ticker}}),this.stop=()=>{this._ticker.stop()},this.start=()=>{this._ticker.start()},this._ticker=null,this.ticker=t.sharedTicker?Ys.shared:new Ys,t.autoStart&&this.start()}static destroy(){if(this._ticker){const t=this._ticker;this.ticker=null,t.destroy()}}}u0.extension=pt.Application;It.add(r0);It.add(u0);const o0=class fh{constructor(...t){this.stage=new ni,t[0]!==void 0&&At(Ft,"Application constructor options are deprecated, please use Application.init() instead.")}async init(t){t={...t},this.stage||(this.stage=new ni),this.renderer=await vv(t),fh._plugins.forEach(n=>{n.init.call(this,t)})}render(){this.renderer.render({container:this.stage})}get canvas(){return this.renderer.canvas}get view(){return At(Ft,"Application.view is deprecated, please use Application.canvas instead."),this.renderer.canvas}get screen(){return this.renderer.screen}destroy(t=!1,n=!1){const a=fh._plugins.slice(0);a.reverse(),a.forEach(u=>{u.destroy.call(this)}),this.stage.destroy(n),this.stage=null,this.renderer.destroy(t),this.renderer=null}};o0._plugins=[];let c0=o0;It.handleByList(pt.Application,c0._plugins);It.add(l0);var Zc,wp;function Tv(){if(wp)return Zc;wp=1,Zc=n;var l={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(o){var c=[];return o.replace(t,function(f,m,g){var p=m.toLowerCase();for(g=u(g),p=="m"&&g.length>2&&(c.push([m].concat(g.splice(0,2))),p="l",m=m=="m"?"l":"L");;){if(g.length==l[p])return g.unshift(m),c.push(g);if(g.length<l[p])throw new Error("malformed path data");c.push([m].concat(g.splice(0,l[p])))}}),c}var a=/-?[0-9]*\.?[0-9]+(?:e[-+]?\d+)?/ig;function u(o){var c=o.match(a);return c?c.map(Number):[]}return Zc}var Av=Tv();const Cv=vh(Av);function Mv(l,t){const n=Cv(l),a=[];let u=null,o=0,c=0;for(let f=0;f<n.length;f++){const m=n[f],g=m[0],p=m;switch(g){case"M":o=p[1],c=p[2],t.moveTo(o,c);break;case"m":o+=p[1],c+=p[2],t.moveTo(o,c);break;case"H":o=p[1],t.lineTo(o,c);break;case"h":o+=p[1],t.lineTo(o,c);break;case"V":c=p[1],t.lineTo(o,c);break;case"v":c+=p[1],t.lineTo(o,c);break;case"L":o=p[1],c=p[2],t.lineTo(o,c);break;case"l":o+=p[1],c+=p[2],t.lineTo(o,c);break;case"C":o=p[5],c=p[6],t.bezierCurveTo(p[1],p[2],p[3],p[4],o,c);break;case"c":t.bezierCurveTo(o+p[1],c+p[2],o+p[3],c+p[4],o+p[5],c+p[6]),o+=p[5],c+=p[6];break;case"S":o=p[3],c=p[4],t.bezierCurveToShort(p[1],p[2],o,c);break;case"s":t.bezierCurveToShort(o+p[1],c+p[2],o+p[3],c+p[4]),o+=p[3],c+=p[4];break;case"Q":o=p[3],c=p[4],t.quadraticCurveTo(p[1],p[2],o,c);break;case"q":t.quadraticCurveTo(o+p[1],c+p[2],o+p[3],c+p[4]),o+=p[3],c+=p[4];break;case"T":o=p[1],c=p[2],t.quadraticCurveToShort(o,c);break;case"t":o+=p[1],c+=p[2],t.quadraticCurveToShort(o,c);break;case"A":o=p[6],c=p[7],t.arcToSvg(p[1],p[2],p[3],p[4],p[5],o,c);break;case"a":o+=p[6],c+=p[7],t.arcToSvg(p[1],p[2],p[3],p[4],p[5],o,c);break;case"Z":case"z":t.closePath(),a.length>0&&(u=a.pop(),u?(o=u.startX,c=u.startY):(o=0,c=0)),u=null;break;default:be(`Unknown SVG path command: ${g}`)}g!=="Z"&&g!=="z"&&u===null&&(u={startX:o,startY:c},a.push(u))}return t}class Rh{constructor(t=0,n=0,a=0){this.type="circle",this.x=t,this.y=n,this.radius=a}clone(){return new Rh(this.x,this.y,this.radius)}contains(t,n){if(this.radius<=0)return!1;const a=this.radius*this.radius;let u=this.x-t,o=this.y-n;return u*=u,o*=o,u+o<=a}strokeContains(t,n,a,u=.5){if(this.radius===0)return!1;const o=this.x-t,c=this.y-n,f=this.radius,m=(1-u)*a,g=Math.sqrt(o*o+c*c);return g<=f+m&&g>f-(a-m)}getBounds(t){return t||(t=new Kt),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 zh{constructor(t=0,n=0,a=0,u=0){this.type="ellipse",this.x=t,this.y=n,this.halfWidth=a,this.halfHeight=u}clone(){return new zh(this.x,this.y,this.halfWidth,this.halfHeight)}contains(t,n){if(this.halfWidth<=0||this.halfHeight<=0)return!1;let a=(t-this.x)/this.halfWidth,u=(n-this.y)/this.halfHeight;return a*=a,u*=u,a+u<=1}strokeContains(t,n,a,u=.5){const{halfWidth:o,halfHeight:c}=this;if(o<=0||c<=0)return!1;const f=a*(1-u),m=a-f,g=o-m,p=c-m,_=o+f,b=c+f,x=t-this.x,S=n-this.y,A=x*x/(g*g)+S*S/(p*p),T=x*x/(_*_)+S*S/(b*b);return A>1&&T<=1}getBounds(t){return t||(t=new Kt),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 wv(l,t,n,a,u,o){const c=l-n,f=t-a,m=u-n,g=o-a,p=c*m+f*g,_=m*m+g*g;let b=-1;_!==0&&(b=p/_);let x,S;b<0?(x=n,S=a):b>1?(x=u,S=o):(x=n+b*m,S=a+b*g);const A=l-x,T=t-S;return A*A+T*T}let Ev,Rv;class tl{constructor(...t){this.type="polygon";let n=Array.isArray(t[0])?t[0]:t;if(typeof n[0]!="number"){const a=[];for(let u=0,o=n.length;u<o;u++)a.push(n[u].x,n[u].y);n=a}this.points=n,this.closePath=!0}isClockwise(){let t=0;const n=this.points,a=n.length;for(let u=0;u<a;u+=2){const o=n[u],c=n[u+1],f=n[(u+2)%a],m=n[(u+3)%a];t+=(f-o)*(m+c)}return t<0}containsPolygon(t){const n=this.getBounds(Ev),a=t.getBounds(Rv);if(!n.containsRect(a))return!1;const u=t.points;for(let o=0;o<u.length;o+=2){const c=u[o],f=u[o+1];if(!this.contains(c,f))return!1}return!0}clone(){const t=this.points.slice(),n=new tl(t);return n.closePath=this.closePath,n}contains(t,n){let a=!1;const u=this.points.length/2;for(let o=0,c=u-1;o<u;c=o++){const f=this.points[o*2],m=this.points[o*2+1],g=this.points[c*2],p=this.points[c*2+1];m>n!=p>n&&t<(g-f)*((n-m)/(p-m))+f&&(a=!a)}return a}strokeContains(t,n,a,u=.5){const o=a*a,c=o*(1-u),f=o-c,{points:m}=this,g=m.length-(this.closePath?0:2);for(let p=0;p<g;p+=2){const _=m[p],b=m[p+1],x=m[(p+2)%m.length],S=m[(p+3)%m.length],A=wv(t,n,_,b,x,S),T=Math.sign((x-_)*(n-b)-(S-b)*(t-_));if(A<=(T<0?f:c))return!0}return!1}getBounds(t){t||(t=new Kt);const n=this.points;let a=1/0,u=-1/0,o=1/0,c=-1/0;for(let f=0,m=n.length;f<m;f+=2){const g=n[f],p=n[f+1];a=g<a?g:a,u=g>u?g:u,o=p<o?p:o,c=p>c?p:c}return t.x=a,t.width=u-a,t.y=o,t.height=c-o,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 At("8.11.0","Polygon.lastX is deprecated, please use Polygon.lastX instead."),this.points[this.points.length-2]}get y(){return At("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 Vr=(l,t,n,a,u,o,c)=>{const f=l-n,m=t-a,g=Math.sqrt(f*f+m*m);return g>=u-o&&g<=u+c};class Dh{constructor(t=0,n=0,a=0,u=0,o=20){this.type="roundedRectangle",this.x=t,this.y=n,this.width=a,this.height=u,this.radius=o}getBounds(t){return t||(t=new Kt),t.x=this.x,t.y=this.y,t.width=this.width,t.height=this.height,t}clone(){return new Dh(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 a=Math.max(0,Math.min(this.radius,Math.min(this.width,this.height)/2));if(n>=this.y+a&&n<=this.y+this.height-a||t>=this.x+a&&t<=this.x+this.width-a)return!0;let u=t-(this.x+a),o=n-(this.y+a);const c=a*a;if(u*u+o*o<=c||(u=t-(this.x+this.width-a),u*u+o*o<=c)||(o=n-(this.y+this.height-a),u*u+o*o<=c)||(u=t-(this.x+a),u*u+o*o<=c))return!0}return!1}strokeContains(t,n,a,u=.5){const{x:o,y:c,width:f,height:m,radius:g}=this,p=a*(1-u),_=a-p,b=o+g,x=c+g,S=f-g*2,A=m-g*2,T=o+f,M=c+m;return(t>=o-p&&t<=o+_||t>=T-_&&t<=T+p)&&n>=x&&n<=x+A||(n>=c-p&&n<=c+_||n>=M-_&&n<=M+p)&&t>=b&&t<=b+S?!0:t<b&&n<x&&Vr(t,n,b,x,g,_,p)||t>T-g&&n<x&&Vr(t,n,T-g,x,g,_,p)||t>T-g&&n>M-g&&Vr(t,n,T-g,M-g,g,_,p)||t<b&&n>M-g&&Vr(t,n,b,M-g,g,_,p)}toString(){return`[pixi.js/math:RoundedRectangle x=${this.x} y=${this.y}width=${this.width} height=${this.height} radius=${this.radius}]`}}const h0={};function zv(l,t,n){let a=2166136261;for(let u=0;u<t;u++)a^=l[u].uid,a=Math.imul(a,16777619),a>>>=0;return h0[a]||Dv(l,t,a,n)}function Dv(l,t,n,a){const u={};let o=0;for(let f=0;f<a;f++){const m=f<t?l[f]:Ut.EMPTY.source;u[o++]=m.source,u[o++]=m.style}const c=new Zr(u);return h0[n]=c,c}class Ep{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 Rp(l,t,n,a){if(n??(n=0),a??(a=Math.min(l.byteLength-n,t.byteLength)),!(n&7)&&!(a&7)){const u=a/8;new Float64Array(t,0,u).set(new Float64Array(l,n,u))}else if(!(n&3)&&!(a&3)){const u=a/4;new Float32Array(t,0,u).set(new Float32Array(l,n,u))}else new Uint8Array(t).set(new Uint8Array(l,n,a))}const Bv={normal:"normal-npm",add:"add-npm",screen:"screen-npm"};var Ov=(l=>(l[l.DISABLED=0]="DISABLED",l[l.RENDERING_MASK_ADD=1]="RENDERING_MASK_ADD",l[l.MASK_ACTIVE=2]="MASK_ACTIVE",l[l.INVERSE_MASK_ACTIVE=3]="INVERSE_MASK_ACTIVE",l[l.RENDERING_MASK_REMOVE=4]="RENDERING_MASK_REMOVE",l[l.NONE=5]="NONE",l))(Ov||{});function zp(l,t){return t.alphaMode==="no-premultiply-alpha"&&Bv[l]||l}const Gv=["precision mediump float;","void main(void){","float test = 0.1;","%forloop%","gl_FragColor = vec4(0.0);","}"].join(`
72
+ `);function Uv(l){let t="";for(let n=0;n<l;++n)n>0&&(t+=`
73
+ else `),n<l-1&&(t+=`if(test == ${n}.0){}`);return t}function Nv(l,t){if(l===0)throw new Error("Invalid value of `0` passed to `checkMaxIfStatementsInShader`");const n=t.createShader(t.FRAGMENT_SHADER);try{for(;;){const a=Gv.replace(/%forloop%/gi,Uv(l));if(t.shaderSource(n,a),t.compileShader(n),!t.getShaderParameter(n,t.COMPILE_STATUS))l=l/2|0;else break}}finally{t.deleteShader(n)}return l}let Gs=null;function kv(){var t;if(Gs)return Gs;const l=Xy();return Gs=l.getParameter(l.MAX_TEXTURE_IMAGE_UNITS),Gs=Nv(Gs,l),(t=l.getExtension("WEBGL_lose_context"))==null||t.loseContext(),Gs}class Hv{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 Lv{constructor(){this.renderPipeId="batch",this.action="startBatch",this.start=0,this.size=0,this.textures=new Hv,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 el=[];let Jr=0;cl.register({clear:()=>{if(el.length>0)for(const l of el)l&&l.destroy();el.length=0,Jr=0}});function Dp(){return Jr>0?el[--Jr]:new Lv}function Bp(l){l.elements=null,el[Jr++]=l}let Fa=0;const f0=class d0{constructor(t){this.uid=Qt("batcher"),this.dirty=!0,this.batchIndex=0,this.batches=[],this._elements=[],t={...d0.defaultOptions,...t},t.maxTextures||(At("v8.8.0","maxTextures is a required option for Batcher now, please pass it in the options"),t.maxTextures=kv());const{maxTextures:n,attributesInitialSize:a,indicesInitialSize:u}=t;this.attributeBuffer=new Ep(a*4),this.indexBuffer=new Uint16Array(u),this.maxTextures=n}begin(){this.elementSize=0,this.elementStart=0,this.indexSize=0,this.attributeSize=0;for(let t=0;t<this.batchIndex;t++)Bp(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 a=t._batch.textures.ids[n._source.uid];return!a&&a!==0?!1:(t._textureId=a,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 a=Dp(),u=a.textures;u.clear();const o=n[this.elementStart];let c=zp(o.blendMode,o.texture._source),f=o.topology;this.attributeSize*4>this.attributeBuffer.size&&this._resizeAttributeBuffer(this.attributeSize*4),this.indexSize>this.indexBuffer.length&&this._resizeIndexBuffer(this.indexSize);const m=this.attributeBuffer.float32View,g=this.attributeBuffer.uint32View,p=this.indexBuffer;let _=this._batchIndexSize,b=this._batchIndexStart,x="startBatch",S=[];const A=this.maxTextures;for(let T=this.elementStart;T<this.elementSize;++T){const M=n[T];n[T]=null;const B=M.texture._source,O=zp(M.blendMode,B),F=c!==O||f!==M.topology;if(B._batchTick===Fa&&!F){M._textureId=B._textureBindLocation,_+=M.indexSize,M.packAsQuad?(this.packQuadAttributes(M,m,g,M._attributeStart,M._textureId),this.packQuadIndex(p,M._indexStart,M._attributeStart/this.vertexSize)):(this.packAttributes(M,m,g,M._attributeStart,M._textureId),this.packIndex(M,p,M._indexStart,M._attributeStart/this.vertexSize)),M._batch=a,S.push(M);continue}B._batchTick=Fa,(u.count>=A||F)&&(this._finishBatch(a,b,_-b,u,c,f,t,x,S),x="renderBatch",b=_,c=O,f=M.topology,a=Dp(),u=a.textures,u.clear(),S=[],++Fa),M._textureId=B._textureBindLocation=u.count,u.ids[B.uid]=u.count,u.textures[u.count++]=B,M._batch=a,S.push(M),_+=M.indexSize,M.packAsQuad?(this.packQuadAttributes(M,m,g,M._attributeStart,M._textureId),this.packQuadIndex(p,M._indexStart,M._attributeStart/this.vertexSize)):(this.packAttributes(M,m,g,M._attributeStart,M._textureId),this.packIndex(M,p,M._indexStart,M._attributeStart/this.vertexSize))}u.count>0&&(this._finishBatch(a,b,_-b,u,c,f,t,x,S),b=_,++Fa),this.elementStart=this.elementSize,this._batchIndexStart=b,this._batchIndexSize=_}_finishBatch(t,n,a,u,o,c,f,m,g){t.gpuBindGroup=null,t.bindGroup=null,t.action=m,t.batcher=this,t.textures=u,t.blendMode=o,t.topology=c,t.start=n,t.size=a,t.elements=g,++Fa,this.batches[this.batchIndex++]=t,f.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),a=new Ep(n);Rp(this.attributeBuffer.rawBinaryData,a.rawBinaryData),this.attributeBuffer=a}_resizeIndexBuffer(t){const n=this.indexBuffer;let a=Math.max(t,n.length*1.5);a+=a%2;const u=a>65535?new Uint32Array(a):new Uint16Array(a);if(u.BYTES_PER_ELEMENT!==n.BYTES_PER_ELEMENT)for(let o=0;o<n.length;o++)u[o]=n[o];else Rp(n.buffer,u.buffer);this.indexBuffer=u}packQuadIndex(t,n,a){t[n]=a+0,t[n+1]=a+1,t[n+2]=a+2,t[n+3]=a+0,t[n+4]=a+2,t[n+5]=a+3}packIndex(t,n,a,u){const o=t.indices,c=t.indexSize,f=t.indexOffset,m=t.attributeOffset;for(let g=0;g<c;g++)n[a++]=u+o[g+f]-m}destroy(t={}){var n;if(this.batches!==null){for(let a=0;a<this.batchIndex;a++)Bp(this.batches[a]);this.batches=null,this.geometry.destroy(!0),this.geometry=null,t.shader&&((n=this.shader)==null||n.destroy(),this.shader=null);for(let a=0;a<this._elements.length;a++)this._elements[a]&&(this._elements[a]._batch=null);this._elements=null,this.indexBuffer=null,this.attributeBuffer.destroy(),this.attributeBuffer=null}}};f0.defaultOptions={maxTextures:null,attributesInitialSize:4,indicesInitialSize:6};let Yv=f0;var Ee=(l=>(l[l.MAP_READ=1]="MAP_READ",l[l.MAP_WRITE=2]="MAP_WRITE",l[l.COPY_SRC=4]="COPY_SRC",l[l.COPY_DST=8]="COPY_DST",l[l.INDEX=16]="INDEX",l[l.VERTEX=32]="VERTEX",l[l.UNIFORM=64]="UNIFORM",l[l.STORAGE=128]="STORAGE",l[l.INDIRECT=256]="INDIRECT",l[l.QUERY_RESOLVE=512]="QUERY_RESOLVE",l[l.STATIC=1024]="STATIC",l))(Ee||{});class ul extends xi{constructor(t){let{data:n,size:a}=t;const{usage:u,label:o,shrinkToFit:c}=t;super(),this._gpuData=Object.create(null),this._gcLastUsed=-1,this.autoGarbageCollect=!0,this.uid=Qt("buffer"),this._resourceType="buffer",this._resourceId=Qt("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,a??(a=n==null?void 0:n.byteLength);const f=!!n;this.descriptor={size:a,usage:u,mappedAtCreation:f,label:o},this.shrinkToFit=c??!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&Ee.STATIC)}set static(t){t?this.descriptor.usage|=Ee.STATIC:this.descriptor.usage&=~Ee.STATIC}setDataWithSize(t,n,a){if(this._updateID++,this._updateSize=n*t.BYTES_PER_ELEMENT,this._data===t){a&&this.emit("update",this);return}const u=this._data;if(this._data=t,this._dataInt32=null,!u||u.length!==t.length){!this.shrinkToFit&&u&&t.byteLength<u.byteLength?a&&this.emit("update",this):(this.descriptor.size=t.byteLength,this._resourceId=Qt("resource"),this.emit("change",this));return}a&&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 m0(l,t){if(!(l instanceof ul)){let n=t?Ee.INDEX:Ee.VERTEX;l instanceof Array&&(t?(l=new Uint32Array(l),n=Ee.INDEX|Ee.COPY_DST):(l=new Float32Array(l),n=Ee.VERTEX|Ee.COPY_DST)),l=new ul({data:l,label:t?"index-mesh-buffer":"vertex-mesh-buffer",usage:n})}return l}function jv(l,t,n){const a=l.getAttribute(t);if(!a)return n.minX=0,n.minY=0,n.maxX=0,n.maxY=0,n;const u=a.buffer.data;let o=1/0,c=1/0,f=-1/0,m=-1/0;const g=u.BYTES_PER_ELEMENT,p=(a.offset||0)/g,_=(a.stride||8)/g;for(let b=p;b<u.length;b+=_){const x=u[b],S=u[b+1];x>f&&(f=x),S>m&&(m=S),x<o&&(o=x),S<c&&(c=S)}return n.minX=o,n.minY=c,n.maxX=f,n.maxY=m,n}function Xv(l){return(l instanceof ul||Array.isArray(l)||l.BYTES_PER_ELEMENT)&&(l={buffer:l}),l.buffer=m0(l.buffer,!1),l}class qv extends xi{constructor(t={}){super(),this._gpuData=Object.create(null),this.autoGarbageCollect=!0,this._gcLastUsed=-1,this.uid=Qt("geometry"),this._layoutKey=0,this.instanceCount=1,this._bounds=new ii,this._boundsDirty=!0;const{attributes:n,indexBuffer:a,topology:u}=t;if(this.buffers=[],this.attributes={},n)for(const o in n)this.addAttribute(o,n[o]);this.instanceCount=t.instanceCount??1,a&&this.addIndex(a),this.topology=u||"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 a=Xv(n);this.buffers.indexOf(a.buffer)===-1&&(this.buffers.push(a.buffer),a.buffer.on("update",this.onBufferUpdate,this),a.buffer.on("change",this.onBufferUpdate,this)),this.attributes[t]=a}addIndex(t){this.indexBuffer=m0(t,!0),this.buffers.push(this.indexBuffer)}get bounds(){return this._boundsDirty?(this._boundsDirty=!1,jv(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(a=>a.destroy()),this.unload(),(n=this.indexBuffer)==null||n.destroy(),this.attributes=null,this.buffers=null,this.indexBuffer=null,this._bounds=null}}const Vv=new Float32Array(1),Pv=new Uint32Array(1);class Fv extends qv{constructor(){const n=new ul({data:Vv,label:"attribute-batch-buffer",usage:Ee.VERTEX|Ee.COPY_DST,shrinkToFit:!1}),a=new ul({data:Pv,label:"index-batch-buffer",usage:Ee.INDEX|Ee.COPY_DST,shrinkToFit:!1}),u=24;super({attributes:{aPosition:{buffer:n,format:"float32x2",stride:u,offset:0},aUV:{buffer:n,format:"float32x2",stride:u,offset:8},aColor:{buffer:n,format:"unorm8x4",stride:u,offset:16},aTextureIdAndRound:{buffer:n,format:"uint16x2",stride:u,offset:20}},indexBuffer:a})}}function Op(l,t,n){if(l)for(const a in l){const u=a.toLocaleLowerCase(),o=t[u];if(o){let c=l[a];a==="header"&&(c=c.replace(/@in\s+[^;]+;\s*/g,"").replace(/@out\s+[^;]+;\s*/g,"")),n&&o.push(`//----${n}----//`),o.push(c)}else be(`${a} placement hook does not exist in shader`)}}const Qv=/\{\{(.*?)\}\}/g;function Gp(l){var a;const t={};return(((a=l.match(Qv))==null?void 0:a.map(u=>u.replace(/[{()}]/g,"")))??[]).forEach(u=>{t[u]=[]}),t}function Up(l,t){let n;const a=/@in\s+([^;]+);/g;for(;(n=a.exec(l))!==null;)t.push(n[1])}function Np(l,t,n=!1){const a=[];Up(t,a),l.forEach(f=>{f.header&&Up(f.header,a)});const u=a;n&&u.sort();const o=u.map((f,m)=>` @location(${m}) ${f},`).join(`
74
+ `);let c=t.replace(/@in\s+[^;]+;\s*/g,"");return c=c.replace("{{in}}",`
75
+ ${o}
76
+ `),c}function kp(l,t){let n;const a=/@out\s+([^;]+);/g;for(;(n=a.exec(l))!==null;)t.push(n[1])}function Zv(l){const n=/\b(\w+)\s*:/g.exec(l);return n?n[1]:""}function Wv(l){const t=/@.*?\s+/g;return l.replace(t,"")}function Kv(l,t){const n=[];kp(t,n),l.forEach(m=>{m.header&&kp(m.header,n)});let a=0;const u=n.sort().map(m=>m.indexOf("builtin")>-1?m:`@location(${a++}) ${m}`).join(`,
77
+ `),o=n.sort().map(m=>` var ${Wv(m)};`).join(`
78
+ `),c=`return VSOutput(
79
+ ${n.sort().map(m=>` ${Zv(m)}`).join(`,
80
+ `)});`;let f=t.replace(/@out\s+[^;]+;\s*/g,"");return f=f.replace("{{struct}}",`
81
+ ${u}
82
+ `),f=f.replace("{{start}}",`
83
+ ${o}
84
+ `),f=f.replace("{{return}}",`
85
+ ${c}
86
+ `),f}function Hp(l,t){let n=l;for(const a in t){const u=t[a];u.join(`
87
+ `).length?n=n.replace(`{{${a}}}`,`//-----${a} START-----//
88
+ ${u.join(`
89
+ `)}
90
+ //----${a} FINISH----//`):n=n.replace(`{{${a}}}`,"")}return n}const bn=Object.create(null),Wc=new Map;let Iv=0;function Jv({template:l,bits:t}){const n=g0(l,t);if(bn[n])return bn[n];const{vertex:a,fragment:u}=tS(l,t);return bn[n]=p0(a,u,t),bn[n]}function $v({template:l,bits:t}){const n=g0(l,t);return bn[n]||(bn[n]=p0(l.vertex,l.fragment,t)),bn[n]}function tS(l,t){const n=t.map(c=>c.vertex).filter(c=>!!c),a=t.map(c=>c.fragment).filter(c=>!!c);let u=Np(n,l.vertex,!0);u=Kv(n,u);const o=Np(a,l.fragment,!0);return{vertex:u,fragment:o}}function g0(l,t){return t.map(n=>(Wc.has(n)||Wc.set(n,Iv++),Wc.get(n))).sort((n,a)=>n-a).join("-")+l.vertex+l.fragment}function p0(l,t,n){const a=Gp(l),u=Gp(t);return n.forEach(o=>{Op(o.vertex,a,o.name),Op(o.fragment,u,o.name)}),{vertex:Hp(l,a),fragment:Hp(t,u)}}const eS=`
91
+ @in aPosition: vec2<f32>;
92
+ @in aUV: vec2<f32>;
93
+
94
+ @out @builtin(position) vPosition: vec4<f32>;
95
+ @out vUV : vec2<f32>;
96
+ @out vColor : vec4<f32>;
97
+
98
+ {{header}}
99
+
100
+ struct VSOutput {
101
+ {{struct}}
102
+ };
103
+
104
+ @vertex
105
+ fn main( {{in}} ) -> VSOutput {
106
+
107
+ var worldTransformMatrix = globalUniforms.uWorldTransformMatrix;
108
+ var modelMatrix = mat3x3<f32>(
109
+ 1.0, 0.0, 0.0,
110
+ 0.0, 1.0, 0.0,
111
+ 0.0, 0.0, 1.0
112
+ );
113
+ var position = aPosition;
114
+ var uv = aUV;
115
+
116
+ {{start}}
117
+
118
+ vColor = vec4<f32>(1., 1., 1., 1.);
119
+
120
+ {{main}}
121
+
122
+ vUV = uv;
123
+
124
+ var modelViewProjectionMatrix = globalUniforms.uProjectionMatrix * worldTransformMatrix * modelMatrix;
125
+
126
+ vPosition = vec4<f32>((modelViewProjectionMatrix * vec3<f32>(position, 1.0)).xy, 0.0, 1.0);
127
+
128
+ vColor *= globalUniforms.uWorldColorAlpha;
129
+
130
+ {{end}}
131
+
132
+ {{return}}
133
+ };
134
+ `,iS=`
135
+ @in vUV : vec2<f32>;
136
+ @in vColor : vec4<f32>;
137
+
138
+ {{header}}
139
+
140
+ @fragment
141
+ fn main(
142
+ {{in}}
143
+ ) -> @location(0) vec4<f32> {
144
+
145
+ {{start}}
146
+
147
+ var outColor:vec4<f32>;
148
+
149
+ {{main}}
150
+
151
+ var finalColor:vec4<f32> = outColor * vColor;
152
+
153
+ {{end}}
154
+
155
+ return finalColor;
156
+ };
157
+ `,nS=`
158
+ in vec2 aPosition;
159
+ in vec2 aUV;
160
+
161
+ out vec4 vColor;
162
+ out vec2 vUV;
163
+
164
+ {{header}}
165
+
166
+ void main(void){
167
+
168
+ mat3 worldTransformMatrix = uWorldTransformMatrix;
169
+ mat3 modelMatrix = mat3(
170
+ 1.0, 0.0, 0.0,
171
+ 0.0, 1.0, 0.0,
172
+ 0.0, 0.0, 1.0
173
+ );
174
+ vec2 position = aPosition;
175
+ vec2 uv = aUV;
176
+
177
+ {{start}}
178
+
179
+ vColor = vec4(1.);
180
+
181
+ {{main}}
182
+
183
+ vUV = uv;
184
+
185
+ mat3 modelViewProjectionMatrix = uProjectionMatrix * worldTransformMatrix * modelMatrix;
186
+
187
+ gl_Position = vec4((modelViewProjectionMatrix * vec3(position, 1.0)).xy, 0.0, 1.0);
188
+
189
+ vColor *= uWorldColorAlpha;
190
+
191
+ {{end}}
192
+ }
193
+ `,sS=`
194
+
195
+ in vec4 vColor;
196
+ in vec2 vUV;
197
+
198
+ out vec4 finalColor;
199
+
200
+ {{header}}
201
+
202
+ void main(void) {
203
+
204
+ {{start}}
205
+
206
+ vec4 outColor;
207
+
208
+ {{main}}
209
+
210
+ finalColor = outColor * vColor;
211
+
212
+ {{end}}
213
+ }
214
+ `,aS={name:"global-uniforms-bit",vertex:{header:`
215
+ struct GlobalUniforms {
216
+ uProjectionMatrix:mat3x3<f32>,
217
+ uWorldTransformMatrix:mat3x3<f32>,
218
+ uWorldColorAlpha: vec4<f32>,
219
+ uResolution: vec2<f32>,
220
+ }
221
+
222
+ @group(0) @binding(0) var<uniform> globalUniforms : GlobalUniforms;
223
+ `}},lS={name:"global-uniforms-bit",vertex:{header:`
224
+ uniform mat3 uProjectionMatrix;
225
+ uniform mat3 uWorldTransformMatrix;
226
+ uniform vec4 uWorldColorAlpha;
227
+ uniform vec2 uResolution;
228
+ `}};function rS({bits:l,name:t}){const n=Jv({template:{fragment:iS,vertex:eS},bits:[aS,...l]});return nu.from({name:t,vertex:{source:n.vertex,entryPoint:"main"},fragment:{source:n.fragment,entryPoint:"main"}})}function uS({bits:l,name:t}){return new Vy({name:t,...$v({template:{vertex:nS,fragment:sS},bits:[lS,...l]})})}const oS={name:"color-bit",vertex:{header:`
229
+ @in aColor: vec4<f32>;
230
+ `,main:`
231
+ vColor *= vec4<f32>(aColor.rgb * aColor.a, aColor.a);
232
+ `}},cS={name:"color-bit",vertex:{header:`
233
+ in vec4 aColor;
234
+ `,main:`
235
+ vColor *= vec4(aColor.rgb * aColor.a, aColor.a);
236
+ `}},Kc={};function hS(l){const t=[];if(l===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 a=0;a<l;a++)t.push(`@group(1) @binding(${n++}) var textureSource${a+1}: texture_2d<f32>;`),t.push(`@group(1) @binding(${n++}) var textureSampler${a+1}: sampler;`)}return t.join(`
237
+ `)}function fS(l){const t=[];if(l===1)t.push("outColor = textureSampleGrad(textureSource1, textureSampler1, vUV, uvDx, uvDy);");else{t.push("switch vTextureId {");for(let n=0;n<l;n++)n===l-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(`
238
+ `)}function dS(l){return Kc[l]||(Kc[l]={name:"texture-batch-bit",vertex:{header:`
239
+ @in aTextureIdAndRound: vec2<u32>;
240
+ @out @interpolate(flat) vTextureId : u32;
241
+ `,main:`
242
+ vTextureId = aTextureIdAndRound.y;
243
+ `,end:`
244
+ if(aTextureIdAndRound.x == 1)
245
+ {
246
+ vPosition = vec4<f32>(roundPixels(vPosition.xy, globalUniforms.uResolution), vPosition.zw);
247
+ }
248
+ `},fragment:{header:`
249
+ @in @interpolate(flat) vTextureId: u32;
250
+
251
+ ${hS(l)}
252
+ `,main:`
253
+ var uvDx = dpdx(vUV);
254
+ var uvDy = dpdy(vUV);
255
+
256
+ ${fS(l)}
257
+ `}}),Kc[l]}const Ic={};function mS(l){const t=[];for(let n=0;n<l;n++)n>0&&t.push("else"),n<l-1&&t.push(`if(vTextureId < ${n}.5)`),t.push("{"),t.push(` outColor = texture(uTextures[${n}], vUV);`),t.push("}");return t.join(`
258
+ `)}function gS(l){return Ic[l]||(Ic[l]={name:"texture-batch-bit",vertex:{header:`
259
+ in vec2 aTextureIdAndRound;
260
+ out float vTextureId;
261
+
262
+ `,main:`
263
+ vTextureId = aTextureIdAndRound.y;
264
+ `,end:`
265
+ if(aTextureIdAndRound.x == 1.)
266
+ {
267
+ gl_Position.xy = roundPixels(gl_Position.xy, uResolution);
268
+ }
269
+ `},fragment:{header:`
270
+ in float vTextureId;
271
+
272
+ uniform sampler2D uTextures[${l}];
273
+
274
+ `,main:`
275
+
276
+ ${mS(l)}
277
+ `}}),Ic[l]}const pS={name:"round-pixels-bit",vertex:{header:`
278
+ fn roundPixels(position: vec2<f32>, targetSize: vec2<f32>) -> vec2<f32>
279
+ {
280
+ return (floor(((position * 0.5 + 0.5) * targetSize) + 0.5) / targetSize) * 2.0 - 1.0;
281
+ }
282
+ `}},yS={name:"round-pixels-bit",vertex:{header:`
283
+ vec2 roundPixels(vec2 position, vec2 targetSize)
284
+ {
285
+ return (floor(((position * 0.5 + 0.5) * targetSize) + 0.5) / targetSize) * 2.0 - 1.0;
286
+ }
287
+ `}},Lp={};function _S(l){let t=Lp[l];if(t)return t;const n=new Int32Array(l);for(let a=0;a<l;a++)n[a]=a;return t=Lp[l]=new Zy({uTextures:{value:n,type:"i32",size:l}},{isStatic:!0}),t}class Yp extends Eh{constructor(t){const n=uS({name:"batch",bits:[cS,gS(t),yS]}),a=rS({name:"batch",bits:[oS,dS(t),pS]});super({glProgram:n,gpuProgram:a,resources:{batchSamplers:_S(t)}}),this.maxTextures=t}}let Qa=null;const y0=class _0 extends Yv{constructor(t){super(t),this.geometry=new Fv,this.name=_0.extension.name,this.vertexSize=6,Qa??(Qa=new Yp(t.maxTextures)),this.shader=Qa}packAttributes(t,n,a,u,o){const c=o<<16|t.roundPixels&65535,f=t.transform,m=f.a,g=f.b,p=f.c,_=f.d,b=f.tx,x=f.ty,{positions:S,uvs:A}=t,T=t.color,M=t.attributeOffset,z=M+t.attributeSize;for(let B=M;B<z;B++){const O=B*2,F=S[O],k=S[O+1];n[u++]=m*F+p*k+b,n[u++]=_*k+g*F+x,n[u++]=A[O],n[u++]=A[O+1],a[u++]=T,a[u++]=c}}packQuadAttributes(t,n,a,u,o){const c=t.texture,f=t.transform,m=f.a,g=f.b,p=f.c,_=f.d,b=f.tx,x=f.ty,S=t.bounds,A=S.maxX,T=S.minX,M=S.maxY,z=S.minY,B=c.uvs,O=t.color,F=o<<16|t.roundPixels&65535;n[u+0]=m*T+p*z+b,n[u+1]=_*z+g*T+x,n[u+2]=B.x0,n[u+3]=B.y0,a[u+4]=O,a[u+5]=F,n[u+6]=m*A+p*z+b,n[u+7]=_*z+g*A+x,n[u+8]=B.x1,n[u+9]=B.y1,a[u+10]=O,a[u+11]=F,n[u+12]=m*A+p*M+b,n[u+13]=_*M+g*A+x,n[u+14]=B.x2,n[u+15]=B.y2,a[u+16]=O,a[u+17]=F,n[u+18]=m*T+p*M+b,n[u+19]=_*M+g*T+x,n[u+20]=B.x3,n[u+21]=B.y3,a[u+22]=O,a[u+23]=F}_updateMaxTextures(t){this.shader.maxTextures!==t&&(Qa=new Yp(t),this.shader=Qa)}destroy(){this.shader=null,super.destroy()}};y0.extension={type:[pt.Batcher],name:"default"};let xS=y0;class hl{constructor(t){this.items=Object.create(null);const{renderer:n,type:a,onUnload:u,priority:o,name:c}=t;this._renderer=n,n.gc.addResourceHash(this,"items",a,o??0),this._onUnload=u,this.name=c}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 u;if(!this.items[t.uid])return;const a=t._gpuData[this._renderer.uid];a&&((u=this._onUnload)==null||u.call(this,t,...n),a.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 bS(l,t,n,a,u,o,c,f=null){let m=0;n*=t,u*=o;const g=f.a,p=f.b,_=f.c,b=f.d,x=f.tx,S=f.ty;for(;m<c;){const A=l[n],T=l[n+1];a[u]=g*A+_*T+x,a[u+1]=p*A+b*T+S,u+=o,n+=t,m++}}function vS(l,t,n,a){let u=0;for(t*=n;u<a;)l[t]=0,l[t+1]=0,t+=n,u++}function x0(l,t,n,a,u){const o=t.a,c=t.b,f=t.c,m=t.d,g=t.tx,p=t.ty;n||(n=0),a||(a=2),u||(u=l.length/a-n);let _=n*a;for(let b=0;b<u;b++){const x=l[_],S=l[_+1];l[_]=o*x+f*S+g,l[_+1]=c*x+m*S+p,_+=a}}const SS=new vt;class Bh{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,a=this.renderable;return a?Ty(n,a.groupColor)+(this.alpha*a.groupAlpha*255<<24):n+(this.alpha*255<<24)}get transform(){var t;return((t=this.renderable)==null?void 0:t.groupTransform)||SS}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 ol={extension:{type:pt.ShapeBuilder,name:"circle"},build(l,t){let n,a,u,o,c,f;if(l.type==="circle"){const O=l;if(c=f=O.radius,c<=0)return!1;n=O.x,a=O.y,u=o=0}else if(l.type==="ellipse"){const O=l;if(c=O.halfWidth,f=O.halfHeight,c<=0||f<=0)return!1;n=O.x,a=O.y,u=o=0}else{const O=l,F=O.width/2,k=O.height/2;n=O.x+F,a=O.y+k,c=f=Math.max(0,Math.min(O.radius,Math.min(F,k))),u=F-c,o=k-f}if(u<0||o<0)return!1;const m=Math.ceil(2.3*Math.sqrt(c+f)),g=m*8+(u?4:0)+(o?4:0);if(g===0)return!1;if(m===0)return t[0]=t[6]=n+u,t[1]=t[3]=a+o,t[2]=t[4]=n-u,t[5]=t[7]=a-o,!0;let p=0,_=m*4+(u?2:0)+2,b=_,x=g,S=u+c,A=o,T=n+S,M=n-S,z=a+A;if(t[p++]=T,t[p++]=z,t[--_]=z,t[--_]=M,o){const O=a-A;t[b++]=M,t[b++]=O,t[--x]=O,t[--x]=T}for(let O=1;O<m;O++){const F=Math.PI/2*(O/m),k=u+Math.cos(F)*c,G=o+Math.sin(F)*f,$=n+k,Q=n-k,Z=a+G,K=a-G;t[p++]=$,t[p++]=Z,t[--_]=Z,t[--_]=Q,t[b++]=Q,t[b++]=K,t[--x]=K,t[--x]=$}S=u,A=o+f,T=n+S,M=n-S,z=a+A;const B=a-A;return t[p++]=T,t[p++]=z,t[--x]=B,t[--x]=T,u&&(t[p++]=M,t[p++]=z,t[--x]=B,t[--x]=M),!0},triangulate(l,t,n,a,u,o){if(l.length===0)return;let c=0,f=0;for(let p=0;p<l.length;p+=2)c+=l[p],f+=l[p+1];c/=l.length/2,f/=l.length/2;let m=a;t[m*n]=c,t[m*n+1]=f;const g=m++;for(let p=0;p<l.length;p+=2)t[m*n]=l[p],t[m*n+1]=l[p+1],p>0&&(u[o++]=m,u[o++]=g,u[o++]=m-1),m++;u[o++]=g+1,u[o++]=g,u[o++]=m-1}},TS={...ol,extension:{...ol.extension,name:"ellipse"}},AS={...ol,extension:{...ol.extension,name:"roundedRectangle"}},b0=1e-4,jp=1e-4;function CS(l){const t=l.length;if(t<6)return 1;let n=0;for(let a=0,u=l[t-2],o=l[t-1];a<t;a+=2){const c=l[a],f=l[a+1];n+=(c-u)*(f+o),u=c,o=f}return n<0?-1:1}function Xp(l,t,n,a,u,o,c,f){const m=l-n*u,g=t-a*u,p=l+n*o,_=t+a*o;let b,x;c?(b=a,x=-n):(b=-a,x=n);const S=m+b,A=g+x,T=p+b,M=_+x;return f.push(S,A),f.push(T,M),2}function Ln(l,t,n,a,u,o,c,f){const m=n-l,g=a-t;let p=Math.atan2(m,g),_=Math.atan2(u-l,o-t);f&&p<_?p+=Math.PI*2:!f&&p>_&&(_+=Math.PI*2);let b=p;const x=_-p,S=Math.abs(x),A=Math.sqrt(m*m+g*g),T=(15*S*Math.sqrt(A)/Math.PI>>0)+1,M=x/T;if(b+=M,f){c.push(l,t),c.push(n,a);for(let z=1,B=b;z<T;z++,B+=M)c.push(l,t),c.push(l+Math.sin(B)*A,t+Math.cos(B)*A);c.push(l,t),c.push(u,o)}else{c.push(n,a),c.push(l,t);for(let z=1,B=b;z<T;z++,B+=M)c.push(l+Math.sin(B)*A,t+Math.cos(B)*A),c.push(l,t);c.push(u,o),c.push(l,t)}return T*2}function MS(l,t,n,a,u,o){const c=b0;if(l.length===0)return;const f=t;let m=f.alignment;if(t.alignment!==.5){let W=CS(l);m=(m-.5)*W+.5}const g=new ge(l[0],l[1]),p=new ge(l[l.length-2],l[l.length-1]),_=a,b=Math.abs(g.x-p.x)<c&&Math.abs(g.y-p.y)<c;if(_){l=l.slice(),b&&(l.pop(),l.pop(),p.set(l[l.length-2],l[l.length-1]));const W=(g.x+p.x)*.5,at=(p.y+g.y)*.5;l.unshift(W,at),l.push(W,at)}const x=u,S=l.length/2;let A=l.length;const T=x.length/2,M=f.width/2,z=M*M,B=f.miterLimit*f.miterLimit;let O=l[0],F=l[1],k=l[2],G=l[3],$=0,Q=0,Z=-(F-G),K=O-k,J=0,it=0,nt=Math.sqrt(Z*Z+K*K);Z/=nt,K/=nt,Z*=M,K*=M;const Tt=m,R=(1-Tt)*2,L=Tt*2;_||(f.cap==="round"?A+=Ln(O-Z*(R-L)*.5,F-K*(R-L)*.5,O-Z*R,F-K*R,O+Z*L,F+K*L,x,!0)+2:f.cap==="square"&&(A+=Xp(O,F,Z,K,R,L,!0,x))),x.push(O-Z*R,F-K*R),x.push(O+Z*L,F+K*L);for(let W=1;W<S-1;++W){O=l[(W-1)*2],F=l[(W-1)*2+1],k=l[W*2],G=l[W*2+1],$=l[(W+1)*2],Q=l[(W+1)*2+1],Z=-(F-G),K=O-k,nt=Math.sqrt(Z*Z+K*K),Z/=nt,K/=nt,Z*=M,K*=M,J=-(G-Q),it=k-$,nt=Math.sqrt(J*J+it*it),J/=nt,it/=nt,J*=M,it*=M;const at=k-O,w=F-G,j=k-$,P=Q-G,I=at*j+w*P,rt=w*j-P*at,ct=rt<0;if(Math.abs(rt)<.001*Math.abs(I)){x.push(k-Z*R,G-K*R),x.push(k+Z*L,G+K*L),I>=0&&(f.join==="round"?A+=Ln(k,G,k-Z*R,G-K*R,k-J*R,G-it*R,x,!1)+4:A+=2,x.push(k-J*L,G-it*L),x.push(k+J*R,G+it*R));continue}const ft=(-Z+O)*(-K+G)-(-Z+k)*(-K+F),Ht=(-J+$)*(-it+G)-(-J+k)*(-it+Q),wt=(at*Ht-j*ft)/rt,Xe=(P*ft-w*Ht)/rt,Fi=(wt-k)*(wt-k)+(Xe-G)*(Xe-G),ai=k+(wt-k)*R,fi=G+(Xe-G)*R,pe=k-(wt-k)*L,li=G-(Xe-G)*L,Qs=Math.min(at*at+w*w,j*j+P*P),fl=ct?R:L,dl=Qs+fl*fl*z;Fi<=dl?f.join==="bevel"||Fi/z>B?(ct?(x.push(ai,fi),x.push(k+Z*L,G+K*L),x.push(ai,fi),x.push(k+J*L,G+it*L)):(x.push(k-Z*R,G-K*R),x.push(pe,li),x.push(k-J*R,G-it*R),x.push(pe,li)),A+=2):f.join==="round"?ct?(x.push(ai,fi),x.push(k+Z*L,G+K*L),A+=Ln(k,G,k+Z*L,G+K*L,k+J*L,G+it*L,x,!0)+4,x.push(ai,fi),x.push(k+J*L,G+it*L)):(x.push(k-Z*R,G-K*R),x.push(pe,li),A+=Ln(k,G,k-Z*R,G-K*R,k-J*R,G-it*R,x,!1)+4,x.push(k-J*R,G-it*R),x.push(pe,li)):(x.push(ai,fi),x.push(pe,li)):(x.push(k-Z*R,G-K*R),x.push(k+Z*L,G+K*L),f.join==="round"?ct?A+=Ln(k,G,k+Z*L,G+K*L,k+J*L,G+it*L,x,!0)+2:A+=Ln(k,G,k-Z*R,G-K*R,k-J*R,G-it*R,x,!1)+2:f.join==="miter"&&Fi/z<=B&&(ct?(x.push(pe,li),x.push(pe,li)):(x.push(ai,fi),x.push(ai,fi)),A+=2),x.push(k-J*R,G-it*R),x.push(k+J*L,G+it*L),A+=2)}O=l[(S-2)*2],F=l[(S-2)*2+1],k=l[(S-1)*2],G=l[(S-1)*2+1],Z=-(F-G),K=O-k,nt=Math.sqrt(Z*Z+K*K),Z/=nt,K/=nt,Z*=M,K*=M,x.push(k-Z*R,G-K*R),x.push(k+Z*L,G+K*L),_||(f.cap==="round"?A+=Ln(k-Z*(R-L)*.5,G-K*(R-L)*.5,k-Z*R,G-K*R,k+Z*L,G+K*L,x,!1)+2:f.cap==="square"&&(A+=Xp(k,G,Z,K,R,L,!1,x)));const et=jp*jp;for(let W=T;W<A+T-2;++W)O=x[W*2],F=x[W*2+1],k=x[(W+1)*2],G=x[(W+1)*2+1],$=x[(W+2)*2],Q=x[(W+2)*2+1],!(Math.abs(O*(G-Q)+k*(Q-F)+$*(F-G))<et)&&o.push(W,W+1,W+2)}function wS(l,t,n,a){const u=b0;if(l.length===0)return;const o=l[0],c=l[1],f=l[l.length-2],m=l[l.length-1],g=t||Math.abs(o-f)<u&&Math.abs(c-m)<u,p=n,_=l.length/2,b=p.length/2;for(let x=0;x<_;x++)p.push(l[x*2]),p.push(l[x*2+1]);for(let x=0;x<_-1;x++)a.push(b+x,b+x+1);g&&a.push(b+_-1,b)}function v0(l,t,n,a,u,o,c){const f=pv(l,t,2);if(!f)return;for(let g=0;g<f.length;g+=3)o[c++]=f[g]+u,o[c++]=f[g+1]+u,o[c++]=f[g+2]+u;let m=u*a;for(let g=0;g<l.length;g+=2)n[m]=l[g],n[m+1]=l[g+1],m+=a}const ES=[],RS={extension:{type:pt.ShapeBuilder,name:"polygon"},build(l,t){for(let n=0;n<l.points.length;n++)t[n]=l.points[n];return!0},triangulate(l,t,n,a,u,o){v0(l,ES,t,n,a,u,o)}},zS={extension:{type:pt.ShapeBuilder,name:"rectangle"},build(l,t){const n=l,a=n.x,u=n.y,o=n.width,c=n.height;return o>0&&c>0?(t[0]=a,t[1]=u,t[2]=a+o,t[3]=u,t[4]=a+o,t[5]=u+c,t[6]=a,t[7]=u+c,!0):!1},triangulate(l,t,n,a,u,o){let c=0;a*=n,t[a+c]=l[0],t[a+c+1]=l[1],c+=n,t[a+c]=l[2],t[a+c+1]=l[3],c+=n,t[a+c]=l[6],t[a+c+1]=l[7],c+=n,t[a+c]=l[4],t[a+c+1]=l[5],c+=n;const f=a/n;u[o++]=f,u[o++]=f+1,u[o++]=f+2,u[o++]=f+1,u[o++]=f+3,u[o++]=f+2}},DS={extension:{type:pt.ShapeBuilder,name:"triangle"},build(l,t){return t[0]=l.x,t[1]=l.y,t[2]=l.x2,t[3]=l.y2,t[4]=l.x3,t[5]=l.y3,!0},triangulate(l,t,n,a,u,o){let c=0;a*=n,t[a+c]=l[0],t[a+c+1]=l[1],c+=n,t[a+c]=l[2],t[a+c+1]=l[3],c+=n,t[a+c]=l[4],t[a+c+1]=l[5];const f=a/n;u[o++]=f,u[o++]=f+1,u[o++]=f+2}},qp=[{offset:0,color:"white"},{offset:1,color:"black"}],Oh=class dh{constructor(...t){this.uid=Qt("fillGradient"),this._tick=0,this.type="linear",this.colorStops=[];let n=BS(t);n={...n.type==="radial"?dh.defaultRadialOptions:dh.defaultLinearOptions,...fy(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(u=>{this.addColorStop(u.offset,u.color)})}addColorStop(t,n){return this.colorStops.push({offset:t,color:ne.shared.setValue(n).toHexa()}),this}buildLinearGradient(){if(this.texture)return;let{x:t,y:n}=this.start,{x:a,y:u}=this.end,o=a-t,c=u-n;const f=o<0||c<0;if(this._wrapMode==="clamp-to-edge"){if(o<0){const T=t;t=a,a=T,o*=-1}if(c<0){const T=n;n=u,u=T,c*=-1}}const m=this.colorStops.length?this.colorStops:qp,g=this._textureSize,{canvas:p,context:_}=Pp(g,1),b=f?_.createLinearGradient(this._textureSize,0,0,0):_.createLinearGradient(0,0,this._textureSize,0);Vp(b,m),_.fillStyle=b,_.fillRect(0,0,g,1),this.texture=new Ut({source:new Kr({resource:p,addressMode:this._wrapMode})});const x=Math.sqrt(o*o+c*c),S=Math.atan2(c,o),A=new vt;A.scale(x/g,1),A.rotate(S),A.translate(t,n),this.textureSpace==="local"&&A.scale(g,g),this.transform=A}buildGradient(){this.texture||this._tick++,this.type==="linear"?this.buildLinearGradient():this.buildRadialGradient()}buildRadialGradient(){if(this.texture)return;const t=this.colorStops.length?this.colorStops:qp,n=this._textureSize,{canvas:a,context:u}=Pp(n,n),{x:o,y:c}=this.center,{x:f,y:m}=this.outerCenter,g=this.innerRadius,p=this.outerRadius,_=f-p,b=m-p,x=n/(p*2),S=(o-_)*x,A=(c-b)*x,T=u.createRadialGradient(S,A,g*x,(f-_)*x,(m-b)*x,p*x);Vp(T,t),u.fillStyle=t[t.length-1].color,u.fillRect(0,0,n,n),u.fillStyle=T,u.translate(S,A),u.rotate(this.rotation),u.scale(1,this.scale),u.translate(-S,-A),u.fillRect(0,0,n,n),this.texture=new Ut({source:new Kr({resource:a,addressMode:this._wrapMode})});const M=new vt;M.scale(1/x,1/x),M.translate(_,b),this.textureSpace==="local"&&M.scale(n,n),this.transform=M}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}`}};Oh.defaultLinearOptions={start:{x:0,y:0},end:{x:0,y:1},colorStops:[],textureSpace:"local",type:"linear",textureSize:256,wrapMode:"clamp-to-edge"};Oh.defaultRadialOptions={center:{x:.5,y:.5},innerRadius:0,outerRadius:.5,colorStops:[],scale:1,textureSpace:"local",type:"radial",textureSize:256,wrapMode:"clamp-to-edge"};let Vi=Oh;function Vp(l,t){for(let n=0;n<t.length;n++){const a=t[n];l.addColorStop(a.offset,a.color)}}function Pp(l,t){const n=je.get().createCanvas(l,t),a=n.getContext("2d");return{canvas:n,context:a}}function BS(l){let t=l[0]??{};return(typeof t=="number"||l[1])&&(At("8.5.2","use options object instead"),t={type:"linear",start:{x:l[0],y:l[1]},end:{x:l[2],y:l[3]},textureSpace:l[4],textureSize:l[5]??Vi.defaultLinearOptions.textureSize}),t}const OS=new vt,GS=new Kt;function US(l,t,n,a){const u=t.matrix?l.copyFrom(t.matrix).invert():l.identity();if(t.textureSpace==="local"){const c=n.getBounds(GS);t.width&&c.pad(t.width);const{x:f,y:m}=c,g=1/c.width,p=1/c.height,_=-f*g,b=-m*p,x=u.a,S=u.b,A=u.c,T=u.d;u.a*=g,u.b*=g,u.c*=p,u.d*=p,u.tx=_*x+b*A+u.tx,u.ty=_*S+b*T+u.ty}else u.translate(t.texture.frame.x,t.texture.frame.y),u.scale(1/t.texture.source.width,1/t.texture.source.height);const o=t.texture.source.style;return!(t.fill instanceof Vi)&&o.addressMode==="clamp-to-edge"&&(o.addressMode="repeat",o.update()),a&&u.append(OS.copyFrom(a).invert()),u}const su={};It.handleByMap(pt.ShapeBuilder,su);It.add(zS,RS,DS,ol,TS,AS);const NS=new Kt,kS=new vt;function HS(l,t){const{geometryData:n,batches:a}=t;a.length=0,n.indices.length=0,n.vertices.length=0,n.uvs.length=0;for(let u=0;u<l.instructions.length;u++){const o=l.instructions[u];if(o.action==="texture")LS(o.data,a,n);else if(o.action==="fill"||o.action==="stroke"){const c=o.action==="stroke",f=o.data.path.shapePath,m=o.data.style,g=o.data.hole;c&&g&&Fp(g.shapePath,m,!0,a,n),g&&(f.shapePrimitives[f.shapePrimitives.length-1].holes=g.shapePath.shapePrimitives),Fp(f,m,c,a,n)}}}function LS(l,t,n){const a=[],u=su.rectangle,o=NS;o.x=l.dx,o.y=l.dy,o.width=l.dw,o.height=l.dh;const c=l.transform;if(!u.build(o,a))return;const{vertices:f,uvs:m,indices:g}=n,p=g.length,_=f.length/2;c&&x0(a,c),u.triangulate(a,f,2,_,g,p);const b=l.image,x=b.uvs;m.push(x.x0,x.y0,x.x1,x.y1,x.x3,x.y3,x.x2,x.y2);const S=Re.get(Bh);S.indexOffset=p,S.indexSize=g.length-p,S.attributeOffset=_,S.attributeSize=f.length/2-_,S.baseColor=l.style,S.alpha=l.alpha,S.texture=b,S.geometryData=n,t.push(S)}function Fp(l,t,n,a,u){const{vertices:o,uvs:c,indices:f}=u;l.shapePrimitives.forEach(({shape:m,transform:g,holes:p})=>{const _=[],b=su[m.type];if(!b.build(m,_))return;const x=f.length,S=o.length/2;let A="triangle-list";if(g&&x0(_,g),n){const B=m.closePath??!0,O=t;O.pixelLine?(wS(_,B,o,f),A="line-list"):MS(_,O,!1,B,o,f)}else if(p){const B=[],O=_.slice();YS(p).forEach(k=>{B.push(O.length/2),O.push(...k)}),v0(O,B,o,2,S,f,x)}else b.triangulate(_,o,2,S,f,x);const T=c.length/2,M=t.texture;if(M!==Ut.WHITE){const B=US(kS,t,m,g);bS(o,2,S,c,T,2,o.length/2-S,B)}else vS(c,T,2,o.length/2-S);const z=Re.get(Bh);z.indexOffset=x,z.indexSize=f.length-x,z.attributeOffset=S,z.attributeSize=o.length/2-S,z.baseColor=t.color,z.alpha=t.alpha,z.texture=M,z.geometryData=u,z.topology=A,a.push(z)})}function YS(l){const t=[];for(let n=0;n<l.length;n++){const a=l[n].shape,u=[];su[a.type].build(a,u)&&t.push(u)}return t}class jS{constructor(){this.batches=[],this.geometryData={vertices:[],uvs:[],indices:[]}}reset(){this.batches&&this.batches.forEach(t=>{Re.return(t)}),this.graphicsData&&Re.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 XS{constructor(){this.instructions=new Ch}init(t){const n=t.maxTextures;this.batcher?this.batcher._updateMaxTextures(n):this.batcher=new xS({maxTextures:n}),this.instructions.reset()}get geometry(){return At(Hb,"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 Gh=class mh{constructor(t){this._renderer=t,this._managedContexts=new hl({renderer:t,type:"resource",name:"graphicsContext"})}init(t){mh.defaultOptions.bezierSmoothness=(t==null?void 0:t.bezierSmoothness)??mh.defaultOptions.bezierSmoothness}getContextRenderData(t){return t._gpuData[this._renderer.uid].graphicsData||this._initContextRenderData(t)}updateGpuContext(t){const n=!!t._gpuData[this._renderer.uid],a=t._gpuData[this._renderer.uid]||this._initContext(t);if(t.dirty||!n){n&&a.reset(),HS(t,a);const u=t.batchMode;t.customShader||u==="no-batch"?a.isBatchable=!1:u==="auto"?a.isBatchable=a.geometryData.vertices.length<400:a.isBatchable=!0,t.dirty=!1}return a}getGpuContext(t){return t._gpuData[this._renderer.uid]||this._initContext(t)}_initContextRenderData(t){const n=Re.get(XS,{maxTextures:this._renderer.limits.maxBatchableTextures}),a=t._gpuData[this._renderer.uid],{batches:u,geometryData:o}=a;a.graphicsData=n;const c=o.vertices.length,f=o.indices.length;for(let _=0;_<u.length;_++)u[_].applyTransform=!1;const m=n.batcher;m.ensureAttributeBuffer(c),m.ensureIndexBuffer(f),m.begin();for(let _=0;_<u.length;_++){const b=u[_];m.add(b)}m.finish(n.instructions);const g=m.geometry;g.indexBuffer.setDataWithSize(m.indexBuffer,m.indexSize,!0),g.buffers[0].setDataWithSize(m.attributeBuffer.float32View,m.attributeSize,!0);const p=m.batches;for(let _=0;_<p.length;_++){const b=p[_];b.bindGroup=zv(b.textures.textures,b.textures.count,this._renderer.limits.maxBatchableTextures)}return n}_initContext(t){const n=new jS;return n.context=t,t._gpuData[this._renderer.uid]=n,this._managedContexts.add(t),n}destroy(){this._managedContexts.destroy(),this._renderer=null}};Gh.extension={type:[pt.WebGLSystem,pt.WebGPUSystem],name:"graphicsContext"};Gh.defaultOptions={bezierSmoothness:.5};let Uh=Gh;const qS=8,Pr=11920929e-14,VS=1;function S0(l,t,n,a,u,o,c,f,m,g){const _=Math.min(.99,Math.max(0,g??Uh.defaultOptions.bezierSmoothness));let b=(VS-_)/1;return b*=b,PS(t,n,a,u,o,c,f,m,l,b),l}function PS(l,t,n,a,u,o,c,f,m,g){gh(l,t,n,a,u,o,c,f,m,g,0),m.push(c,f)}function gh(l,t,n,a,u,o,c,f,m,g,p){if(p>qS)return;const _=(l+n)/2,b=(t+a)/2,x=(n+u)/2,S=(a+o)/2,A=(u+c)/2,T=(o+f)/2,M=(_+x)/2,z=(b+S)/2,B=(x+A)/2,O=(S+T)/2,F=(M+B)/2,k=(z+O)/2;if(p>0){let G=c-l,$=f-t;const Q=Math.abs((n-c)*$-(a-f)*G),Z=Math.abs((u-c)*$-(o-f)*G);if(Q>Pr&&Z>Pr){if((Q+Z)*(Q+Z)<=g*(G*G+$*$)){m.push(F,k);return}}else if(Q>Pr){if(Q*Q<=g*(G*G+$*$)){m.push(F,k);return}}else if(Z>Pr){if(Z*Z<=g*(G*G+$*$)){m.push(F,k);return}}else if(G=F-(l+c)/2,$=k-(t+f)/2,G*G+$*$<=g){m.push(F,k);return}}gh(l,t,_,b,M,z,F,k,m,g,p+1),gh(F,k,B,O,A,T,c,f,m,g,p+1)}const FS=8,QS=11920929e-14,ZS=1;function WS(l,t,n,a,u,o,c,f){const g=Math.min(.99,Math.max(0,f??Uh.defaultOptions.bezierSmoothness));let p=(ZS-g)/1;return p*=p,KS(t,n,a,u,o,c,l,p),l}function KS(l,t,n,a,u,o,c,f){ph(c,l,t,n,a,u,o,f,0),c.push(u,o)}function ph(l,t,n,a,u,o,c,f,m){if(m>FS)return;const g=(t+a)/2,p=(n+u)/2,_=(a+o)/2,b=(u+c)/2,x=(g+_)/2,S=(p+b)/2;let A=o-t,T=c-n;const M=Math.abs((a-o)*T-(u-c)*A);if(M>QS){if(M*M<=f*(A*A+T*T)){l.push(x,S);return}}else if(A=x-(t+o)/2,T=S-(n+c)/2,A*A+T*T<=f){l.push(x,S);return}ph(l,t,n,g,p,x,S,f,m+1),ph(l,x,S,_,b,o,c,f,m+1)}function T0(l,t,n,a,u,o,c,f){let m=Math.abs(u-o);(!c&&u>o||c&&o>u)&&(m=2*Math.PI-m),f||(f=Math.max(6,Math.floor(6*Math.pow(a,1/3)*(m/Math.PI)))),f=Math.max(f,3);let g=m/f,p=u;g*=c?-1:1;for(let _=0;_<f+1;_++){const b=Math.cos(p),x=Math.sin(p),S=t+b*a,A=n+x*a;l.push(S,A),p+=g}}function IS(l,t,n,a,u,o){const c=l[l.length-2],m=l[l.length-1]-n,g=c-t,p=u-n,_=a-t,b=Math.abs(m*_-g*p);if(b<1e-8||o===0){(l[l.length-2]!==t||l[l.length-1]!==n)&&l.push(t,n);return}const x=m*m+g*g,S=p*p+_*_,A=m*p+g*_,T=o*Math.sqrt(x)/b,M=o*Math.sqrt(S)/b,z=T*A/x,B=M*A/S,O=T*_+M*g,F=T*p+M*m,k=g*(M+z),G=m*(M+z),$=_*(T+B),Q=p*(T+B),Z=Math.atan2(G-F,k-O),K=Math.atan2(Q-F,$-O);T0(l,O+t,F+n,o,Z,K,g*p>_*m)}const il=Math.PI*2,Jc={centerX:0,centerY:0,ang1:0,ang2:0},$c=({x:l,y:t},n,a,u,o,c,f,m)=>{l*=n,t*=a;const g=u*l-o*t,p=o*l+u*t;return m.x=g+c,m.y=p+f,m};function JS(l,t){const n=t===-1.5707963267948966?-.551915024494:1.3333333333333333*Math.tan(t/4),a=t===1.5707963267948966?.551915024494:n,u=Math.cos(l),o=Math.sin(l),c=Math.cos(l+t),f=Math.sin(l+t);return[{x:u-o*a,y:o+u*a},{x:c+f*a,y:f-c*a},{x:c,y:f}]}const Qp=(l,t,n,a)=>{const u=l*a-t*n<0?-1:1;let o=l*n+t*a;return o>1&&(o=1),o<-1&&(o=-1),u*Math.acos(o)},$S=(l,t,n,a,u,o,c,f,m,g,p,_,b)=>{const x=Math.pow(u,2),S=Math.pow(o,2),A=Math.pow(p,2),T=Math.pow(_,2);let M=x*S-x*T-S*A;M<0&&(M=0),M/=x*T+S*A,M=Math.sqrt(M)*(c===f?-1:1);const z=M*u/o*_,B=M*-o/u*p,O=g*z-m*B+(l+n)/2,F=m*z+g*B+(t+a)/2,k=(p-z)/u,G=(_-B)/o,$=(-p-z)/u,Q=(-_-B)/o,Z=Qp(1,0,k,G);let K=Qp(k,G,$,Q);f===0&&K>0&&(K-=il),f===1&&K<0&&(K+=il),b.centerX=O,b.centerY=F,b.ang1=Z,b.ang2=K};function t2(l,t,n,a,u,o,c,f=0,m=0,g=0){if(o===0||c===0)return;const p=Math.sin(f*il/360),_=Math.cos(f*il/360),b=_*(t-a)/2+p*(n-u)/2,x=-p*(t-a)/2+_*(n-u)/2;if(b===0&&x===0)return;o=Math.abs(o),c=Math.abs(c);const S=Math.pow(b,2)/Math.pow(o,2)+Math.pow(x,2)/Math.pow(c,2);S>1&&(o*=Math.sqrt(S),c*=Math.sqrt(S)),$S(t,n,a,u,o,c,m,g,p,_,b,x,Jc);let{ang1:A,ang2:T}=Jc;const{centerX:M,centerY:z}=Jc;let B=Math.abs(T)/(il/4);Math.abs(1-B)<1e-7&&(B=1);const O=Math.max(Math.ceil(B),1);T/=O;let F=l[l.length-2],k=l[l.length-1];const G={x:0,y:0};for(let $=0;$<O;$++){const Q=JS(A,T),{x:Z,y:K}=$c(Q[0],o,c,_,p,M,z,G),{x:J,y:it}=$c(Q[1],o,c,_,p,M,z,G),{x:nt,y:Tt}=$c(Q[2],o,c,_,p,M,z,G);S0(l,F,k,Z,K,J,it,nt,Tt),F=nt,k=Tt,A+=T}}function e2(l,t,n){const a=(c,f)=>{const m=f.x-c.x,g=f.y-c.y,p=Math.sqrt(m*m+g*g),_=m/p,b=g/p;return{len:p,nx:_,ny:b}},u=(c,f)=>{c===0?l.moveTo(f.x,f.y):l.lineTo(f.x,f.y)};let o=t[t.length-1];for(let c=0;c<t.length;c++){const f=t[c%t.length],m=f.radius??n;if(m<=0){u(c,f),o=f;continue}const g=t[(c+1)%t.length],p=a(f,o),_=a(f,g);if(p.len<1e-4||_.len<1e-4){u(c,f),o=f;continue}let b=Math.asin(p.nx*_.ny-p.ny*_.nx),x=1,S=!1;p.nx*_.nx-p.ny*-_.ny<0?b<0?b=Math.PI+b:(b=Math.PI-b,x=-1,S=!0):b>0&&(x=-1,S=!0);const A=b/2;let T,M=Math.abs(Math.cos(A)*m/Math.sin(A));M>Math.min(p.len/2,_.len/2)?(M=Math.min(p.len/2,_.len/2),T=Math.abs(M*Math.sin(A)/Math.cos(A))):T=m;const z=f.x+_.nx*M+-_.ny*T*x,B=f.y+_.ny*M+_.nx*T*x,O=Math.atan2(p.ny,p.nx)+Math.PI/2*x,F=Math.atan2(_.ny,_.nx)-Math.PI/2*x;c===0&&l.moveTo(z+Math.cos(O)*T,B+Math.sin(O)*T),l.arc(z,B,T,O,F,S),o=f}}function i2(l,t,n,a){const u=(f,m)=>Math.sqrt((f.x-m.x)**2+(f.y-m.y)**2),o=(f,m,g)=>({x:f.x+(m.x-f.x)*g,y:f.y+(m.y-f.y)*g}),c=t.length;for(let f=0;f<c;f++){const m=t[(f+1)%c],g=m.radius??n;if(g<=0){f===0?l.moveTo(m.x,m.y):l.lineTo(m.x,m.y);continue}const p=t[f],_=t[(f+2)%c],b=u(p,m);let x;if(b<1e-4)x=m;else{const T=Math.min(b/2,g);x=o(m,p,T/b)}const S=u(_,m);let A;if(S<1e-4)A=m;else{const T=Math.min(S/2,g);A=o(m,_,T/S)}f===0?l.moveTo(x.x,x.y):l.lineTo(x.x,x.y),l.quadraticCurveTo(m.x,m.y,A.x,A.y,a)}}const n2=new Kt;class s2{constructor(t){this.shapePrimitives=[],this._currentPoly=null,this._bounds=new ii,this._graphicsPath2D=t,this.signed=t.checkForHoles}moveTo(t,n){return this.startPoly(t,n),this}lineTo(t,n){this._ensurePoly();const a=this._currentPoly.points,u=a[a.length-2],o=a[a.length-1];return(u!==t||o!==n)&&a.push(t,n),this}arc(t,n,a,u,o,c){this._ensurePoly(!1);const f=this._currentPoly.points;return T0(f,t,n,a,u,o,c),this}arcTo(t,n,a,u,o){this._ensurePoly();const c=this._currentPoly.points;return IS(c,t,n,a,u,o),this}arcToSvg(t,n,a,u,o,c,f){const m=this._currentPoly.points;return t2(m,this._currentPoly.lastX,this._currentPoly.lastY,c,f,t,n,a,u,o),this}bezierCurveTo(t,n,a,u,o,c,f){this._ensurePoly();const m=this._currentPoly;return S0(this._currentPoly.points,m.lastX,m.lastY,t,n,a,u,o,c,f),this}quadraticCurveTo(t,n,a,u,o){this._ensurePoly();const c=this._currentPoly;return WS(this._currentPoly.points,c.lastX,c.lastY,t,n,a,u,o),this}closePath(){return this.endPoly(!0),this}addPath(t,n){this.endPoly(),n&&!n.isIdentity()&&(t=t.clone(!0),t.transform(n));const a=this.shapePrimitives,u=a.length;for(let o=0;o<t.instructions.length;o++){const c=t.instructions[o];this[c.action](...c.data)}if(t.checkForHoles&&a.length-u>1){let o=null;for(let c=u;c<a.length;c++){const f=a[c];if(f.shape.type==="polygon"){const m=f.shape,g=o==null?void 0:o.shape;g&&g.containsPolygon(m)?(o.holes||(o.holes=[]),o.holes.push(f),a.copyWithin(c,c+1),a.length--,c--):o=f}}}return this}finish(t=!1){this.endPoly(t)}rect(t,n,a,u,o){return this.drawShape(new Kt(t,n,a,u),o),this}circle(t,n,a,u){return this.drawShape(new Rh(t,n,a),u),this}poly(t,n,a){const u=new tl(t);return u.closePath=n,this.drawShape(u,a),this}regularPoly(t,n,a,u,o=0,c){u=Math.max(u|0,3);const f=-1*Math.PI/2+o,m=Math.PI*2/u,g=[];for(let p=0;p<u;p++){const _=f-p*m;g.push(t+a*Math.cos(_),n+a*Math.sin(_))}return this.poly(g,!0,c),this}roundPoly(t,n,a,u,o,c=0,f){if(u=Math.max(u|0,3),o<=0)return this.regularPoly(t,n,a,u,c);const m=a*Math.sin(Math.PI/u)-.001;o=Math.min(o,m);const g=-1*Math.PI/2+c,p=Math.PI*2/u,_=(u-2)*Math.PI/u/2;for(let b=0;b<u;b++){const x=b*p+g,S=t+a*Math.cos(x),A=n+a*Math.sin(x),T=x+Math.PI+_,M=x-Math.PI-_,z=S+o*Math.cos(T),B=A+o*Math.sin(T),O=S+o*Math.cos(M),F=A+o*Math.sin(M);b===0?this.moveTo(z,B):this.lineTo(z,B),this.quadraticCurveTo(S,A,O,F,f)}return this.closePath()}roundShape(t,n,a=!1,u){return t.length<3?this:(a?i2(this,t,n,u):e2(this,t,n),this.closePath())}filletRect(t,n,a,u,o){if(o===0)return this.rect(t,n,a,u);const c=Math.min(a,u)/2,f=Math.min(c,Math.max(-c,o)),m=t+a,g=n+u,p=f<0?-f:0,_=Math.abs(f);return this.moveTo(t,n+_).arcTo(t+p,n+p,t+_,n,_).lineTo(m-_,n).arcTo(m-p,n+p,m,n+_,_).lineTo(m,g-_).arcTo(m-p,g-p,t+a-_,g,_).lineTo(t+_,g).arcTo(t+p,g-p,t,g-_,_).closePath()}chamferRect(t,n,a,u,o,c){if(o<=0)return this.rect(t,n,a,u);const f=Math.min(o,Math.min(a,u)/2),m=t+a,g=n+u,p=[t+f,n,m-f,n,m,n+f,m,g-f,m-f,g,t+f,g,t,g-f,t,n+f];for(let _=p.length-1;_>=2;_-=2)p[_]===p[_-2]&&p[_-1]===p[_-3]&&p.splice(_-1,2);return this.poly(p,!0,c)}ellipse(t,n,a,u,o){return this.drawShape(new zh(t,n,a,u),o),this}roundRect(t,n,a,u,o,c){return this.drawShape(new Dh(t,n,a,u,o),c),this}drawShape(t,n){return this.endPoly(),this.shapePrimitives.push({shape:t,transform:n}),this}startPoly(t,n){let a=this._currentPoly;return a&&this.endPoly(),a=new tl,a.points.push(t,n),this._currentPoly=a,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 tl,t)){const n=this.shapePrimitives[this.shapePrimitives.length-1];if(n){let a=n.shape.x,u=n.shape.y;if(n.transform&&!n.transform.isIdentity()){const o=n.transform,c=a;a=o.a*a+o.c*u+o.tx,u=o.b*c+o.d*u+o.ty}this._currentPoly.points.push(a,u)}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 a=t.instructions[n];this[a.action](...a.data)}this.finish()}get bounds(){const t=this._bounds;t.clear();const n=this.shapePrimitives;for(let a=0;a<n.length;a++){const u=n[a],o=u.shape.getBounds(n2);u.transform?t.addRect(o,u.transform):t.addRect(o)}return t}}class Xi{constructor(t,n=!1){this.instructions=[],this.uid=Qt("graphicsPath"),this._dirty=!0,this.checkForHoles=n,typeof t=="string"?Mv(t,this):this.instructions=(t==null?void 0:t.slice())??[]}get shapePath(){return this._shapePath||(this._shapePath=new s2(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,a,u,o){const c=this.instructions[this.instructions.length-1],f=this.getLastPoint(ge.shared);let m=0,g=0;if(!c||c.action!=="bezierCurveTo")m=f.x,g=f.y;else{m=c.data[2],g=c.data[3];const p=f.x,_=f.y;m=p+(p-m),g=_+(_-g)}return this.instructions.push({action:"bezierCurveTo",data:[m,g,t,n,a,u,o]}),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,a){const u=this.instructions[this.instructions.length-1],o=this.getLastPoint(ge.shared);let c=0,f=0;if(!u||u.action!=="quadraticCurveTo")c=o.x,f=o.y;else{c=u.data[0],f=u.data[1];const m=o.x,g=o.y;c=m+(m-c),f=g+(g-f)}return this.instructions.push({action:"quadraticCurveTo",data:[c,f,t,n,a]}),this._dirty=!0,this}rect(t,n,a,u,o){return this.instructions.push({action:"rect",data:[t,n,a,u,o]}),this._dirty=!0,this}circle(t,n,a,u){return this.instructions.push({action:"circle",data:[t,n,a,u]}),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,a,u,o,c,f){o||(o=u/2);const m=-1*Math.PI/2+c,g=a*2,p=Math.PI*2/g,_=[];for(let b=0;b<g;b++){const x=b%2?o:u,S=b*p+m;_.push(t+x*Math.cos(S),n+x*Math.sin(S))}return this.poly(_,!0,f),this}clone(t=!1){const n=new Xi;if(n.checkForHoles=this.checkForHoles,!t)n.instructions=this.instructions.slice();else for(let a=0;a<this.instructions.length;a++){const u=this.instructions[a];n.instructions.push({action:u.action,data:u.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,a=t.b,u=t.c,o=t.d,c=t.tx,f=t.ty;let m=0,g=0,p=0,_=0,b=0,x=0,S=0,A=0;for(let T=0;T<this.instructions.length;T++){const M=this.instructions[T],z=M.data;switch(M.action){case"moveTo":case"lineTo":m=z[0],g=z[1],z[0]=n*m+u*g+c,z[1]=a*m+o*g+f;break;case"bezierCurveTo":p=z[0],_=z[1],b=z[2],x=z[3],m=z[4],g=z[5],z[0]=n*p+u*_+c,z[1]=a*p+o*_+f,z[2]=n*b+u*x+c,z[3]=a*b+o*x+f,z[4]=n*m+u*g+c,z[5]=a*m+o*g+f;break;case"quadraticCurveTo":p=z[0],_=z[1],m=z[2],g=z[3],z[0]=n*p+u*_+c,z[1]=a*p+o*_+f,z[2]=n*m+u*g+c,z[3]=a*m+o*g+f;break;case"arcToSvg":m=z[5],g=z[6],S=z[0],A=z[1],z[0]=n*S+u*A,z[1]=a*S+o*A,z[5]=n*m+u*g+c,z[6]=a*m+o*g+f;break;case"circle":z[4]=Za(z[3],t);break;case"rect":z[4]=Za(z[4],t);break;case"ellipse":z[8]=Za(z[8],t);break;case"roundRect":z[5]=Za(z[5],t);break;case"addPath":z[0].transform(t);break;case"poly":z[2]=Za(z[2],t);break;default:be("unknown transform action",M.action);break}}return this._dirty=!0,this}get bounds(){return this.shapePath.bounds}getLastPoint(t){let n=this.instructions.length-1,a=this.instructions[n];if(!a)return t.x=0,t.y=0,t;for(;a.action==="closePath";){if(n--,n<0)return t.x=0,t.y=0,t;a=this.instructions[n]}switch(a.action){case"moveTo":case"lineTo":t.x=a.data[0],t.y=a.data[1];break;case"quadraticCurveTo":t.x=a.data[2],t.y=a.data[3];break;case"bezierCurveTo":t.x=a.data[4],t.y=a.data[5];break;case"arc":case"arcToSvg":t.x=a.data[5],t.y=a.data[6];break;case"addPath":a.data[0].getLastPoint(t);break}return t}}function Za(l,t){return l?l.prepend(t):t.clone()}function Pt(l,t,n){const a=l.getAttribute(t);return a?Number(a):n}function a2(l,t){const n=l.querySelectorAll("defs");for(let a=0;a<n.length;a++){const u=n[a];for(let o=0;o<u.children.length;o++){const c=u.children[o];switch(c.nodeName.toLowerCase()){case"lineargradient":t.defs[c.id]=l2(c);break;case"radialgradient":t.defs[c.id]=r2();break}}}}function l2(l){const t=Pt(l,"x1",0),n=Pt(l,"y1",0),a=Pt(l,"x2",1),u=Pt(l,"y2",0),o=l.getAttribute("gradientUnits")||"objectBoundingBox",c=new Vi(t,n,a,u,o==="objectBoundingBox"?"local":"global");for(let f=0;f<l.children.length;f++){const m=l.children[f],g=Pt(m,"offset",0),p=ne.shared.setValue(m.getAttribute("stop-color")).toNumber();c.addColorStop(g,p)}return c}function r2(l){return be("[SVG Parser] Radial gradients are not yet supported"),new Vi(0,0,1,0)}function Zp(l){const t=l.match(/url\s*\(\s*['"]?\s*#([^'"\s)]+)\s*['"]?\s*\)/i);return t?t[1]:""}const Wp={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 A0(l,t){const n=l.getAttribute("style"),a={},u={},o={strokeStyle:a,fillStyle:u,useFill:!1,useStroke:!1};for(const c in Wp){const f=l.getAttribute(c);f&&Kp(t,o,c,f.trim())}if(n){const c=n.split(";");for(let f=0;f<c.length;f++){const m=c[f].trim(),[g,p]=m.split(":");Wp[g]&&Kp(t,o,g,p.trim())}}return{strokeStyle:o.useStroke?a:null,fillStyle:o.useFill?u:null,useFill:o.useFill,useStroke:o.useStroke}}function Kp(l,t,n,a){switch(n){case"stroke":if(a!=="none"){if(a.startsWith("url(")){const u=Zp(a);t.strokeStyle.fill=l.defs[u]}else t.strokeStyle.color=ne.shared.setValue(a).toNumber();t.useStroke=!0}break;case"stroke-width":t.strokeStyle.width=Number(a);break;case"fill":if(a!=="none"){if(a.startsWith("url(")){const u=Zp(a);t.fillStyle.fill=l.defs[u]}else t.fillStyle.color=ne.shared.setValue(a).toNumber();t.useFill=!0}break;case"fill-opacity":t.fillStyle.alpha=Number(a);break;case"stroke-opacity":t.strokeStyle.alpha=Number(a);break;case"opacity":t.fillStyle.alpha=Number(a),t.strokeStyle.alpha=Number(a);break}}function u2(l){if(l.length<=2)return!0;const t=l.map(f=>f.area).sort((f,m)=>m-f),[n,a]=t,u=t[t.length-1],o=n/a,c=a/u;return!(o>3&&c<2)}function o2(l){return l.split(/(?=[Mm])/).filter(a=>a.trim().length>0)}function c2(l){const t=l.match(/[-+]?[0-9]*\.?[0-9]+/g);if(!t||t.length<4)return 0;const n=t.map(Number),a=[],u=[];for(let p=0;p<n.length;p+=2)p+1<n.length&&(a.push(n[p]),u.push(n[p+1]));if(a.length===0||u.length===0)return 0;const o=Math.min(...a),c=Math.max(...a),f=Math.min(...u),m=Math.max(...u);return(c-o)*(m-f)}function Ip(l,t){const n=new Xi(l,!1);for(const a of n.instructions)t.instructions.push(a)}function h2(l,t){if(typeof l=="string"){const c=document.createElement("div");c.innerHTML=l.trim(),l=c.querySelector("svg")}const n={context:t,defs:{},path:new Xi};a2(l,n);const a=l.children,{fillStyle:u,strokeStyle:o}=A0(l,n);for(let c=0;c<a.length;c++){const f=a[c];f.nodeName.toLowerCase()!=="defs"&&C0(f,n,u,o)}return t}function C0(l,t,n,a){const u=l.children,{fillStyle:o,strokeStyle:c}=A0(l,t);o&&n?n={...n,...o}:o&&(n=o),c&&a?a={...a,...c}:c&&(a=c);const f=!n&&!a;f&&(n={color:0});let m,g,p,_,b,x,S,A,T,M,z,B,O,F,k,G,$;switch(l.nodeName.toLowerCase()){case"path":{F=l.getAttribute("d");const Q=l.getAttribute("fill-rule"),Z=o2(F),K=Q==="evenodd",J=Z.length>1;if(K&&J){const nt=Z.map(R=>({path:R,area:c2(R)}));if(nt.sort((R,L)=>L.area-R.area),Z.length>3||!u2(nt))for(let R=0;R<nt.length;R++){const L=nt[R],et=R===0;t.context.beginPath();const W=new Xi(void 0,!0);Ip(L.path,W),t.context.path(W),et?(n&&t.context.fill(n),a&&t.context.stroke(a)):t.context.cut()}else for(let R=0;R<nt.length;R++){const L=nt[R],et=R%2===1;t.context.beginPath();const W=new Xi(void 0,!0);Ip(L.path,W),t.context.path(W),et?t.context.cut():(n&&t.context.fill(n),a&&t.context.stroke(a))}}else{const nt=Q?Q==="evenodd":!0;k=new Xi(F,nt),t.context.path(k),n&&t.context.fill(n),a&&t.context.stroke(a)}break}case"circle":S=Pt(l,"cx",0),A=Pt(l,"cy",0),T=Pt(l,"r",0),t.context.ellipse(S,A,T,T),n&&t.context.fill(n),a&&t.context.stroke(a);break;case"rect":m=Pt(l,"x",0),g=Pt(l,"y",0),G=Pt(l,"width",0),$=Pt(l,"height",0),M=Pt(l,"rx",0),z=Pt(l,"ry",0),M||z?t.context.roundRect(m,g,G,$,M||z):t.context.rect(m,g,G,$),n&&t.context.fill(n),a&&t.context.stroke(a);break;case"ellipse":S=Pt(l,"cx",0),A=Pt(l,"cy",0),M=Pt(l,"rx",0),z=Pt(l,"ry",0),t.context.beginPath(),t.context.ellipse(S,A,M,z),n&&t.context.fill(n),a&&t.context.stroke(a);break;case"line":p=Pt(l,"x1",0),_=Pt(l,"y1",0),b=Pt(l,"x2",0),x=Pt(l,"y2",0),t.context.beginPath(),t.context.moveTo(p,_),t.context.lineTo(b,x),a&&t.context.stroke(a);break;case"polygon":O=l.getAttribute("points"),B=O.match(/-?\d+/g).map(Q=>parseInt(Q,10)),t.context.poly(B,!0),n&&t.context.fill(n),a&&t.context.stroke(a);break;case"polyline":O=l.getAttribute("points"),B=O.match(/-?\d+/g).map(Q=>parseInt(Q,10)),t.context.poly(B,!1),a&&t.context.stroke(a);break;case"g":case"svg":break;default:{be(`[SVG parser] <${l.nodeName}> elements unsupported`);break}}f&&(n=null);for(let Q=0;Q<u.length;Q++)C0(u[Q],t,n,a)}const Jp={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 au{constructor(t,n){this.uid=Qt("fillPattern"),this._tick=0,this.transform=new vt,this.texture=t,this.transform.scale(1/t.frame.width,1/t.frame.height),n&&(t.source.style.addressModeU=Jp[n].addressModeU,t.source.style.addressModeV=Jp[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 f2(l){return ne.isColorLike(l)}function $p(l){return l instanceof au}function ty(l){return l instanceof Vi}function d2(l){return l instanceof Ut}function m2(l,t,n){const a=ne.shared.setValue(t??0);return l.color=a.toNumber(),l.alpha=a.alpha===1?n.alpha:a.alpha,l.texture=Ut.WHITE,{...n,...l}}function g2(l,t,n){return l.texture=t,{...n,...l}}function ey(l,t,n){return l.fill=t,l.color=16777215,l.texture=t.texture,l.matrix=t.transform,{...n,...l}}function iy(l,t,n){return t.buildGradient(),l.fill=t,l.color=16777215,l.texture=t.texture,l.matrix=t.transform,l.textureSpace=t.textureSpace,{...n,...l}}function p2(l,t){const n={...t,...l},a=ne.shared.setValue(n.color);return n.alpha*=a.alpha,n.color=a.toNumber(),n}function Qn(l,t){if(l==null)return null;const n={},a=l;return f2(l)?m2(n,l,t):d2(l)?g2(n,l,t):$p(l)?ey(n,l,t):ty(l)?iy(n,l,t):a.fill&&$p(a.fill)?ey(a,a.fill,t):a.fill&&ty(a.fill)?iy(a,a.fill,t):p2(a,t)}function $r(l,t){const{width:n,alignment:a,miterLimit:u,cap:o,join:c,pixelLine:f,...m}=t,g=Qn(l,m);return g?{width:n,alignment:a,miterLimit:u,cap:o,join:c,pixelLine:f,...g}:null}function y2(l,t){let n=1;const a=l.shapePath.shapePrimitives;for(let u=0;u<a.length;u++){const o=a[u].shape;if(o.type!=="polygon")continue;const c=o.points,f=c.length;if(f<6)continue;const m=o.closePath;for(let g=0;g<f;g+=2){if(!m&&(g===0||g===f-2))continue;const p=(g-2+f)%f,_=(g+2)%f,b=c[p],x=c[p+1],S=c[g],A=c[g+1],T=c[_],M=c[_+1],z=b-S,B=x-A,O=T-S,F=M-A,k=z*z+B*B,G=O*O+F*F;if(k<1e-12||G<1e-12)continue;let Z=(z*O+B*F)/Math.sqrt(k*G);Z<-1?Z=-1:Z>1&&(Z=1);const K=Math.sqrt((1-Z)*.5);if(K<1e-6)continue;const J=Math.min(1/K,t);J>n&&(n=J)}}return n}const _2=new ge,ny=new vt,Nh=class _i extends xi{constructor(){super(...arguments),this._gpuData=Object.create(null),this.autoGarbageCollect=!0,this._gcLastUsed=-1,this.uid=Qt("graphicsContext"),this.dirty=!0,this.batchMode="auto",this.instructions=[],this.destroyed=!1,this._activePath=new Xi,this._transform=new vt,this._fillStyle={..._i.defaultFillStyle},this._strokeStyle={..._i.defaultStrokeStyle},this._stateStack=[],this._tick=0,this._bounds=new ii,this._boundsDirty=!0}clone(){const t=new _i;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=Qn(t,_i.defaultFillStyle)}get strokeStyle(){return this._strokeStyle}set strokeStyle(t){this._strokeStyle=$r(t,_i.defaultStrokeStyle)}setFillStyle(t){return this._fillStyle=Qn(t,_i.defaultFillStyle),this}setStrokeStyle(t){return this._strokeStyle=Qn(t,_i.defaultStrokeStyle),this}texture(t,n,a,u,o,c){return this.instructions.push({action:"texture",data:{image:t,dx:a||0,dy:u||0,dw:o||t.frame.width,dh:c||t.frame.height,transform:this._transform.clone(),alpha:this._fillStyle.alpha,style:n||n===0?ne.shared.setValue(n).toNumber():16777215}}),this.onUpdate(),this}beginPath(){return this._activePath=new Xi,this}fill(t,n){let a;const u=this.instructions[this.instructions.length-1];return this._tick===0&&(u==null?void 0:u.action)==="stroke"?a=u.data.path:a=this._activePath.clone(),a?(t!=null&&(n!==void 0&&typeof t=="number"&&(At(Ft,"GraphicsContext.fill(color, alpha) is deprecated, use GraphicsContext.fill({ color, alpha }) instead"),t={color:t,alpha:n}),this._fillStyle=Qn(t,_i.defaultFillStyle)),this.instructions.push({action:"fill",data:{style:this.fillStyle,path:a}}),this.onUpdate(),this._initNextPathLocation(),this._tick=0,this):this}_initNextPathLocation(){const{x:t,y:n}=this._activePath.getLastPoint(ge.shared);this._activePath.clear(),this._activePath.moveTo(t,n)}stroke(t){let n;const a=this.instructions[this.instructions.length-1];return this._tick===0&&(a==null?void 0:a.action)==="fill"?n=a.data.path:n=this._activePath.clone(),n?(t!=null&&(this._strokeStyle=$r(t,_i.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],a=this._activePath.clone();if(n&&(n.action==="stroke"||n.action==="fill"))if(n.data.hole)n.data.hole.addPath(a);else{n.data.hole=a;break}}return this._initNextPathLocation(),this}arc(t,n,a,u,o,c){this._tick++;const f=this._transform;return this._activePath.arc(f.a*t+f.c*n+f.tx,f.b*t+f.d*n+f.ty,a,u,o,c),this}arcTo(t,n,a,u,o){this._tick++;const c=this._transform;return this._activePath.arcTo(c.a*t+c.c*n+c.tx,c.b*t+c.d*n+c.ty,c.a*a+c.c*u+c.tx,c.b*a+c.d*u+c.ty,o),this}arcToSvg(t,n,a,u,o,c,f){this._tick++;const m=this._transform;return this._activePath.arcToSvg(t,n,a,u,o,m.a*c+m.c*f+m.tx,m.b*c+m.d*f+m.ty),this}bezierCurveTo(t,n,a,u,o,c,f){this._tick++;const m=this._transform;return this._activePath.bezierCurveTo(m.a*t+m.c*n+m.tx,m.b*t+m.d*n+m.ty,m.a*a+m.c*u+m.tx,m.b*a+m.d*u+m.ty,m.a*o+m.c*c+m.tx,m.b*o+m.d*c+m.ty,f),this}closePath(){var t;return this._tick++,(t=this._activePath)==null||t.closePath(),this}ellipse(t,n,a,u){return this._tick++,this._activePath.ellipse(t,n,a,u,this._transform.clone()),this}circle(t,n,a){return this._tick++,this._activePath.circle(t,n,a,this._transform.clone()),this}path(t){return this._tick++,this._activePath.addPath(t,this._transform.clone()),this}lineTo(t,n){this._tick++;const a=this._transform;return this._activePath.lineTo(a.a*t+a.c*n+a.tx,a.b*t+a.d*n+a.ty),this}moveTo(t,n){this._tick++;const a=this._transform,u=this._activePath.instructions,o=a.a*t+a.c*n+a.tx,c=a.b*t+a.d*n+a.ty;return u.length===1&&u[0].action==="moveTo"?(u[0].data[0]=o,u[0].data[1]=c,this):(this._activePath.moveTo(o,c),this)}quadraticCurveTo(t,n,a,u,o){this._tick++;const c=this._transform;return this._activePath.quadraticCurveTo(c.a*t+c.c*n+c.tx,c.b*t+c.d*n+c.ty,c.a*a+c.c*u+c.tx,c.b*a+c.d*u+c.ty,o),this}rect(t,n,a,u){return this._tick++,this._activePath.rect(t,n,a,u,this._transform.clone()),this}roundRect(t,n,a,u,o){return this._tick++,this._activePath.roundRect(t,n,a,u,o,this._transform.clone()),this}poly(t,n){return this._tick++,this._activePath.poly(t,n,this._transform.clone()),this}regularPoly(t,n,a,u,o=0,c){return this._tick++,this._activePath.regularPoly(t,n,a,u,o,c),this}roundPoly(t,n,a,u,o,c){return this._tick++,this._activePath.roundPoly(t,n,a,u,o,c),this}roundShape(t,n,a,u){return this._tick++,this._activePath.roundShape(t,n,a,u),this}filletRect(t,n,a,u,o){return this._tick++,this._activePath.filletRect(t,n,a,u,o),this}chamferRect(t,n,a,u,o,c){return this._tick++,this._activePath.chamferRect(t,n,a,u,o,c),this}star(t,n,a,u,o=0,c=0){return this._tick++,this._activePath.star(t,n,a,u,o,c,this._transform.clone()),this}svg(t){return this._tick++,h2(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,a,u,o,c){return t instanceof vt?(this._transform.set(t.a,t.b,t.c,t.d,t.tx,t.ty),this):(this._transform.set(t,n,a,u,o,c),this)}transform(t,n,a,u,o,c){return t instanceof vt?(this._transform.append(t),this):(ny.set(t,n,a,u,o,c),this._transform.append(ny),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 a=this.instructions[n],u=a.action;if(u==="fill"){const o=a.data;t.addBounds(o.path.bounds)}else if(u==="texture"){const o=a.data;t.addFrame(o.dx,o.dy,o.dx+o.dw,o.dy+o.dh,o.transform)}if(u==="stroke"){const o=a.data,c=o.style.alignment;let f=o.style.width*(1-c);o.style.join==="miter"&&(f*=y2(o.path,o.style.miterLimit));const m=o.path.bounds;t.addFrame(m.minX-f,m.minY-f,m.maxX+f,m.maxY+f)}}return t.isValid||t.set(0,0,0,0),t}containsPoint(t){var u;if(!this.bounds.containsPoint(t.x,t.y))return!1;const n=this.instructions;let a=!1;for(let o=0;o<n.length;o++){const c=n[o],f=c.data,m=f.path;if(!c.action||!m)continue;const g=f.style,p=m.shapePath.shapePrimitives;for(let _=0;_<p.length;_++){const b=p[_].shape;if(!g||!b)continue;const x=p[_].transform,S=x?x.applyInverse(t,_2):t;if(c.action==="fill")a=b.contains(S.x,S.y);else{const T=g;a=b.strokeContains(S.x,S.y,T.width,T.alignment)}const A=f.hole;if(A){const T=(u=A.shapePath)==null?void 0:u.shapePrimitives;if(T)for(let M=0;M<T.length;M++)T[M].shape.contains(S.x,S.y)&&(a=!1)}if(a)return!0}}return a}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 a=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(a)),this._strokeStyle.texture&&(this._strokeStyle.fill&&"uid"in this._strokeStyle.fill?this._strokeStyle.fill.destroy():this._strokeStyle.texture.destroy(a))}this._fillStyle=null,this._strokeStyle=null,this.instructions=null,this._activePath=null,this._bounds=null,this._stateStack=null,this.customShader=null,this._transform=null}};Nh.defaultFillStyle={color:16777215,alpha:1,texture:Ut.WHITE,matrix:null,fill:null,textureSpace:"local"};Nh.defaultStrokeStyle={width:1,color:16777215,alpha:1,alignment:.5,miterLimit:10,cap:"butt",join:"miter",texture:Ut.WHITE,matrix:null,fill:null,textureSpace:"local",pixelLine:!1};let hi=Nh;class x2{constructor(){this.isBatchable=!1}reset(){this.isBatchable=!1,this.context=null,this.graphicsData&&(this.graphicsData.destroy(),this.graphicsData=null)}destroy(){this.reset()}}class b2{constructor(){this.instructions=new Ch}init(){this.instructions.reset()}destroy(){this.instructions.destroy(),this.instructions=null}}const kh=class yh{constructor(t){this._renderer=t,this._managedContexts=new hl({renderer:t,type:"resource",name:"graphicsContext"})}init(t){yh.defaultOptions.bezierSmoothness=(t==null?void 0:t.bezierSmoothness)??yh.defaultOptions.bezierSmoothness}getContextRenderData(t){return this.getGpuContext(t).graphicsData||this._initContextRenderData(t)}updateGpuContext(t){const n=t._gpuData,a=!!n[this._renderer.uid],u=n[this._renderer.uid]||this._initContext(t);return(t.dirty||!a)&&(a&&u.reset(),u.isBatchable=!1,t.dirty=!1),u}getGpuContext(t){return t._gpuData[this._renderer.uid]||this._initContext(t)}_initContextRenderData(t){const n=new b2,a=this.getGpuContext(t);return a.graphicsData=n,n.init(),n}_initContext(t){const n=new x2;return n.context=t,t._gpuData[this._renderer.uid]=n,this._managedContexts.add(t),n}destroy(){this._managedContexts.destroy(),this._renderer=null}};kh.extension={type:[pt.CanvasSystem],name:"graphicsContext"};kh.defaultOptions={bezierSmoothness:.5};let v2=kh;class M0{constructor(t,n){this.state=Ky.for2d(),this.renderer=t,this._adaptor=n,this.renderer.runners.contextChange.add(this),this._managedGraphics=new hl({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}}M0.extension={type:[pt.CanvasPipes],name:"graphics"};function S2(l,t,n){const a=(l>>24&255)/255;t[n++]=(l&255)/255*a,t[n++]=(l>>8&255)/255*a,t[n++]=(l>>16&255)/255*a,t[n++]=a}class T2{constructor(){this.batches=[],this.batched=!1}destroy(){this.batches.forEach(t=>{Re.return(t)}),this.batches.length=0}}class w0{constructor(t,n){this.state=Ky.for2d(),this.renderer=t,this._adaptor=n,this.renderer.runners.contextChange.add(this),this._managedGraphics=new hl({renderer:t,type:"renderable",priority:-1,name:"graphics"})}contextChange(){this._adaptor.contextChange(this.renderer)}validateRenderable(t){const n=t.context,a=!!t._gpuData,o=this.renderer.graphicsContext.updateGpuContext(n);return!!(o.isBatchable||a!==o.isBatchable)}addRenderable(t,n){const u=this.renderer.graphicsContext.updateGpuContext(t.context);t.didViewUpdate&&this._rebuild(t),u.isBatchable?this._addToBatcher(t,n):(this.renderer.renderPipes.batch.break(n),n.add(t))}updateRenderable(t){const a=this._getGpuDataForRenderable(t).batches;for(let u=0;u<a.length;u++){const o=a[u];o._batcher.updateElement(o)}}execute(t){if(!t.isRenderable)return;const n=this.renderer,a=t.context;if(!n.graphicsContext.getGpuContext(a).batches.length)return;const o=a.customShader||this._adaptor.shader;this.state.blendMode=t.groupBlendMode;const c=o.resources.localUniforms.uniforms;c.uTransformMatrix=t.groupTransform,c.uRound=n._roundPixels|t._roundPixels,S2(t.groupColorAlpha,c.uColor,0),this._adaptor.execute(this,t)}_rebuild(t){const n=this._getGpuDataForRenderable(t),u=this.renderer.graphicsContext.updateGpuContext(t.context);n.destroy(),u.isBatchable&&this._updateBatchesForRenderable(t,n)}_addToBatcher(t,n){const a=this.renderer.renderPipes.batch,u=this._getGpuDataForRenderable(t).batches;for(let o=0;o<u.length;o++){const c=u[o];a.addToBatch(c,n)}}_getGpuDataForRenderable(t){return t._gpuData[this.renderer.uid]||this._initGpuDataForRenderable(t)}_initGpuDataForRenderable(t){const n=new T2;return t._gpuData[this.renderer.uid]=n,this._managedGraphics.add(t),n}_updateBatchesForRenderable(t,n){const a=t.context,o=this.renderer.graphicsContext.getGpuContext(a),c=this.renderer._roundPixels|t._roundPixels;n.batches=o.batches.map(f=>{const m=Re.get(Bh);return f.copyTo(m),m.renderable=t,m.roundPixels=c,m})}destroy(){this._managedGraphics.destroy(),this.renderer=null,this._adaptor.destroy(),this._adaptor=null,this.state=null}}w0.extension={type:[pt.WebGLPipes,pt.WebGPUPipes],name:"graphics"};It.add(M0);It.add(w0);It.add(v2);It.add(Uh);class qi extends Mh{constructor(t){t instanceof hi&&(t={context:t});const{context:n,roundPixels:a,...u}=t||{};super({label:"Graphics",...u}),this.renderPipeId="graphics",n?this.context=n:(this.context=this._ownedContext=new hi,this.context.autoGarbageCollect=this.autoGarbageCollect),this.didViewUpdate=!0,this.allowChildren=!1,this.roundPixels=a??!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 qi(this._context.clone()):(this._ownedContext=null,new qi(this._context))}lineStyle(t,n,a){At(Ft,"Graphics#lineStyle is no longer needed. Use Graphics#setStrokeStyle to set the stroke style.");const u={};return t&&(u.width=t),n&&(u.color=n),a&&(u.alpha=a),this.context.strokeStyle=u,this}beginFill(t,n){At(Ft,"Graphics#beginFill is no longer needed. Use Graphics#fill to fill the shape with the desired style.");const a={};return t!==void 0&&(a.color=t),n!==void 0&&(a.alpha=n),this.context.fillStyle=a,this}endFill(){At(Ft,"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!==hi.defaultStrokeStyle.width||t.color!==hi.defaultStrokeStyle.color||t.alpha!==hi.defaultStrokeStyle.alpha)&&this.context.stroke(),this}drawCircle(...t){return At(Ft,"Graphics#drawCircle has been renamed to Graphics#circle"),this._callContextMethod("circle",t)}drawEllipse(...t){return At(Ft,"Graphics#drawEllipse has been renamed to Graphics#ellipse"),this._callContextMethod("ellipse",t)}drawPolygon(...t){return At(Ft,"Graphics#drawPolygon has been renamed to Graphics#poly"),this._callContextMethod("poly",t)}drawRect(...t){return At(Ft,"Graphics#drawRect has been renamed to Graphics#rect"),this._callContextMethod("rect",t)}drawRoundedRect(...t){return At(Ft,"Graphics#drawRoundedRect has been renamed to Graphics#roundRect"),this._callContextMethod("roundRect",t)}drawStar(...t){return At(Ft,"Graphics#drawStar has been renamed to Graphics#star"),this._callContextMethod("star",t)}}class A2 extends Mh{constructor(t,n){const{text:a,resolution:u,style:o,anchor:c,width:f,height:m,roundPixels:g,...p}=t;super({...p}),this.batched=!0,this._resolution=null,this._autoResolution=!0,this._didTextUpdate=!0,this._styleClass=n,this.text=a??"",this.style=o,this.resolution=u??null,this.allowChildren=!1,this._anchor=new fe({_onUpdate:()=>{this.onViewUpdate()}}),c&&(this.anchor=c),this.roundPixels=g??!1,f!==void 0&&(this.width=f),m!==void 0&&(this.height=m)}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,a=this.bounds.height,u=-n*this.anchor.x;let o=0;return t.x>=u&&t.x<=u+n&&(o=-a*this.anchor.y,t.y>=o&&t.y<=o+a)}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 C2(l,t){let n=l[0]??{};return(typeof n=="string"||l[1])&&(At(Ft,`use new ${t}({ text: "hi!", style }) instead`),n={text:n,style:l[1]}),n}class M2{constructor(t){this._canvasPool=Object.create(null),this.canvasOptions=t||{},this.enableFullScreen=!1}_createCanvasAndContext(t,n){const a=je.get().createCanvas();a.width=t,a.height=n;const u=a.getContext("2d");return{canvas:a,context:u}}getOptimalCanvasAndContext(t,n,a=1){t=Math.ceil(t*a-1e-6),n=Math.ceil(n*a-1e-6),t=Xs(t),n=Xs(n);const u=(t<<17)+(n<<1);this._canvasPool[u]||(this._canvasPool[u]=[]);let o=this._canvasPool[u].pop();return o||(o=this._createCanvasAndContext(t,n)),o}returnCanvasAndContext(t){const n=t.canvas,{width:a,height:u}=n,o=(a<<17)+(u<<1);t.context.resetTransform(),t.context.clearRect(0,0,a,u),this._canvasPool[o].push(t)}clear(){this._canvasPool={}}}const _h=new M2;cl.register(_h);let Yn=null,Yi=null;function w2(l,t){Yn||(Yn=je.get().createCanvas(256,128),Yi=Yn.getContext("2d",{willReadFrequently:!0}),Yi.globalCompositeOperation="copy",Yi.globalAlpha=1),(Yn.width<l||Yn.height<t)&&(Yn.width=Xs(l),Yn.height=Xs(t))}function sy(l,t,n){for(let a=0,u=4*n*t;a<t;++a,u+=4)if(l[u+3]!==0)return!1;return!0}function ay(l,t,n,a,u){const o=4*t;for(let c=a,f=a*o+4*n;c<=u;++c,f+=o)if(l[f+3]!==0)return!1;return!0}function E2(...l){let t=l[0];t.canvas||(t={canvas:l[0],resolution:l[1]});const{canvas:n}=t,a=Math.min(t.resolution??1,1),u=t.width??n.width,o=t.height??n.height;let c=t.output;if(w2(u,o),!Yi)throw new TypeError("Failed to get canvas 2D context");Yi.drawImage(n,0,0,u,o,0,0,u*a,o*a);const m=Yi.getImageData(0,0,u,o).data;let g=0,p=0,_=u-1,b=o-1;for(;p<o&&sy(m,u,p);)++p;if(p===o)return Kt.EMPTY;for(;sy(m,u,b);)--b;for(;ay(m,u,g,p,b);)++g;for(;ay(m,u,_,p,b);)--_;return++_,++b,Yi.globalCompositeOperation="source-over",Yi.strokeRect(g,p,_-g,b-p),Yi.globalCompositeOperation="copy",c??(c=new Kt),c.set(g/a,p/a,(_-g)/a,(b-p)/a),c}/**
288
+ * tiny-lru
289
+ *
290
+ * @copyright 2026 Jason Mulligan <jason.mulligan@avoidwork.com>
291
+ * @license BSD-3-Clause
292
+ * @version 11.4.7
293
+ */class R2{constructor(t=0,n=0,a=!1){this.first=null,this.items=Object.create(null),this.last=null,this.max=t,this.resetTtl=a,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 a=0;a<t.length;a++){const u=t[a];n[a]=[u,this.get(u)]}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,a=0;for(;n!==null;)t[a++]=n.key,n=n.next;return t}setWithEvicted(t,n,a=this.resetTtl){let u=null;if(this.has(t))this.set(t,n,!0,a);else{this.max>0&&this.size===this.max&&(u={...this.first},this.evict(!0));let o=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=o:this.last.next=o,this.last=o}return u}set(t,n,a=!1,u=this.resetTtl){let o=this.items[t];return a||o!==void 0?(o.value=n,a===!1&&u&&(o.expiry=this.ttl>0?Date.now()+this.ttl:this.ttl),this.moveToEnd(o)):(this.max>0&&this.size===this.max&&this.evict(!0),o=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=o:this.last.next=o,this.last=o),this}values(t=this.keys()){const n=new Array(t.length);for(let a=0;a<t.length;a++)n[a]=this.get(t[a]);return n}}function z2(l=1e3,t=0,n=!1){if(isNaN(l)||l<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 R2(l,t,n)}function E0(l){return!!l.tagStyles&&Object.keys(l.tagStyles).length>0}function R0(l){return l.includes("<")}function D2(l,t){return l.clone().assign(t)}function B2(l,t){const n=[],a=t.tagStyles;if(!E0(t)||!R0(l))return n.push({text:l,style:t}),n;const u=[t],o=[];let c="",f=0;for(;f<l.length;){const m=l[f];if(m==="<"){const g=l.indexOf(">",f);if(g===-1){c+=m,f++;continue}const p=l.slice(f+1,g);if(p.startsWith("/")){const _=p.slice(1).trim();if(o.length>0&&o[o.length-1]===_){c.length>0&&(n.push({text:c,style:u[u.length-1]}),c=""),u.pop(),o.pop(),f=g+1;continue}else{c+=l.slice(f,g+1),f=g+1;continue}}else{const _=p.trim();if(a[_]){c.length>0&&(n.push({text:c,style:u[u.length-1]}),c="");const b=u[u.length-1],x=D2(b,a[_]);u.push(x),o.push(_),f=g+1;continue}else{c+=l.slice(f,g+1),f=g+1;continue}}}else c+=m,f++}return c.length>0&&n.push({text:c,style:u[u.length-1]}),n}const O2=[10,13],G2=new Set(O2),U2=[9,32,8192,8193,8194,8195,8196,8197,8198,8200,8201,8202,8287,12288],N2=new Set(U2),k2=[9,32];new Set(k2);const H2=[45,8208,8211,8212,173],L2=new Set(H2),Y2=/(\r\n|\r|\n)/,j2=/(?:\r\n|\r|\n)/;function tu(l){return typeof l!="string"?!1:G2.has(l.charCodeAt(0))}function ti(l,t){return typeof l!="string"?!1:N2.has(l.charCodeAt(0))}function X2(l){return typeof l!="string"?!1:L2.has(l.charCodeAt(0))}function z0(l){return l==="normal"||l==="pre-line"}function D0(l){return l==="normal"}function Li(l){if(typeof l!="string")return"";let t=l.length-1;for(;t>=0&&ti(l[t]);)t--;return t<l.length-1?l.slice(0,t+1):l}function B0(l){const t=[],n=[];if(typeof l!="string")return t;for(let a=0;a<l.length;a++){const u=l[a],o=l[a+1];if(ti(u)||tu(u)){n.length>0&&(t.push(n.join("")),n.length=0),u==="\r"&&o===`
294
+ `?(t.push(`\r
295
+ `),a++):t.push(u);continue}n.push(u),X2(u)&&o&&!ti(o)&&!tu(o)&&(t.push(n.join("")),n.length=0)}return n.length>0&&t.push(n.join("")),t}function O0(l,t,n,a){const u=n(l),o=[];for(let c=0;c<u.length;c++){let f=u[c],m=f,g=1;for(;u[c+g];){const p=u[c+g];if(!a(m,p,l,c,t))f+=p,m=p,g++;else break}c+=g-1,o.push(f)}return o}const q2=/\r\n|\r|\n/g;function V2(l,t,n,a,u,o,c,f){var Tt,R;const m=B2(l,t);if(D0(t.whiteSpace))for(let L=0;L<m.length;L++){const et=m[L];m[L]={text:et.text.replace(q2," "),style:et.style}}const p=[];let _=[];for(const L of m){const et=L.text.split(Y2);for(let W=0;W<et.length;W++){const at=et[W];at===`\r
296
+ `||at==="\r"||at===`
297
+ `?(p.push(_),_=[]):at.length>0&&_.push({text:at,style:L.style})}}(_.length>0||p.length===0)&&p.push(_);const b=n?P2(p,t,a,u,c,f):p,x=[],S=[],A=[],T=[],M=[];let z=0;const B=t._fontString,O=o(B);O.fontSize===0&&(O.fontSize=t.fontSize,O.ascent=t.fontSize);let F="",k=!!t.dropShadow,G=((Tt=t._stroke)==null?void 0:Tt.width)||0;for(const L of b){let et=0,W=O.ascent,at=O.descent,w="";for(const P of L){const I=P.style._fontString,rt=o(I);I!==F&&(a.font=I,F=I);const ct=u(P.text,P.style.letterSpacing,a);et+=ct,W=Math.max(W,rt.ascent),at=Math.max(at,rt.descent),w+=P.text;const ft=((R=P.style._stroke)==null?void 0:R.width)||0;ft>G&&(G=ft),!k&&P.style.dropShadow&&(k=!0)}L.length===0&&(W=O.ascent,at=O.descent),x.push(et),S.push(W),A.push(at),M.push(w);const j=t.lineHeight||W+at;T.push(j+t.leading),z=Math.max(z,et)}const $=G,K=(n&&t.align!=="left"?Math.max(z,t.wordWrapWidth):z)+$+(t.dropShadow?t.dropShadow.distance:0);let J=0;for(let L=0;L<T.length;L++)J+=T[L];J=Math.max(J,T[0]+$);const it=J+(t.dropShadow?t.dropShadow.distance:0),nt=t.lineHeight||O.fontSize;return{width:K,height:it,lines:M,lineWidths:x,lineHeight:nt+t.leading,maxLineWidth:z,fontProperties:O,runsByLine:b,lineAscents:S,lineDescents:A,lineHeights:T,hasDropShadow:k}}function P2(l,t,n,a,u,o){var T;const{letterSpacing:c,whiteSpace:f,wordWrapWidth:m,breakWords:g}=t,p=z0(f),_=m+c,b={};let x="";const S=(M,z)=>{const B=`${M}|${z.styleKey}`;let O=b[B];if(O===void 0){const F=z._fontString;F!==x&&(n.font=F,x=F),O=a(M,z.letterSpacing,n)+z.letterSpacing,b[B]=O}return O},A=[];for(const M of l){const z=F2(M),B=A.length,O=J=>{let it=0,nt=J;do{const{token:Tt,style:R}=z[nt];it+=S(Tt,R),nt++}while(nt<z.length&&z[nt].continuesFromPrevious);return it},F=J=>{const it=[];let nt=J;do it.push({token:z[nt].token,style:z[nt].style}),nt++;while(nt<z.length&&z[nt].continuesFromPrevious);return it};let k=[],G=0,$=!p,Q=null;const Z=()=>{Q&&Q.text.length>0&&k.push(Q),Q=null},K=()=>{if(Z(),k.length>0){const J=k[k.length-1];J.text=Li(J.text),J.text.length===0&&k.pop()}A.push(k),k=[],G=0,$=!1};for(let J=0;J<z.length;J++){const{token:it,style:nt,continuesFromPrevious:Tt}=z[J],R=S(it,nt);if(p){const W=ti(it),at=(Q==null?void 0:Q.text[Q.text.length-1])??((T=k[k.length-1])==null?void 0:T.text.slice(-1))??"",w=at?ti(at):!1;if(W&&w)continue}const L=!Tt,et=L?O(J):R;if(et>_&&L)if(G>0&&K(),g){const W=F(J);for(let at=0;at<W.length;at++){const w=W[at].token,j=W[at].style,P=O0(w,g,o,u);for(const I of P){const rt=S(I,j);rt+G>_&&K(),!Q||Q.style!==j?(Z(),Q={text:I,style:j}):Q.text+=I,G+=rt}}J+=W.length-1}else{const W=F(J);Z(),A.push(W.map(at=>({text:at.token,style:at.style}))),$=!1,J+=W.length-1}else if(et+G>_&&L){if(ti(it)){$=!1;continue}K(),Q={text:it,style:nt},G=R}else if(Tt&&!g)!Q||Q.style!==nt?(Z(),Q={text:it,style:nt}):Q.text+=it,G+=R;else{const W=ti(it);if(G===0&&W&&!$)continue;!Q||Q.style!==nt?(Z(),Q={text:it,style:nt}):Q.text+=it,G+=R}}if(Z(),k.length>0){const J=k[k.length-1];J.text=Li(J.text),J.text.length===0&&k.pop()}(k.length>0||A.length===B)&&A.push(k)}return A}function F2(l){const t=[];let n=!1;for(const a of l){const u=B0(a.text);let o=!0;for(const c of u){const f=ti(c)||tu(c),m=o&&n&&!f;t.push({token:c,style:a.style,continuesFromPrevious:m}),n=!f,o=!1}}return t}const Q2={willReadFrequently:!0};function ly(l,t,n,a,u){let o=n[l];return typeof o!="number"&&(o=u(l,t,a)+t,n[l]=o),o}function Z2(l,t,n,a,u,o,c){const f=n.getContext("2d",Q2);f.font=t._fontString;let m=0,g="";const p=[],_=Object.create(null),{letterSpacing:b,whiteSpace:x}=t,S=z0(x),A=D0(x);let T=!S;const M=t.wordWrapWidth+b,z=B0(l);for(let O=0;O<z.length;O++){let F=z[O];if(tu(F)){if(!A){p.push(Li(g)),T=!S,g="",m=0;continue}F=" "}if(S){const G=ti(F),$=ti(g[g.length-1]);if(G&&$)continue}const k=ly(F,b,_,f,a);if(k>M)if(g!==""&&(p.push(Li(g)),g="",m=0),u(F,t.breakWords)){const G=O0(F,t.breakWords,c,o);for(const $ of G){const Q=ly($,b,_,f,a);Q+m>M&&(p.push(Li(g)),T=!1,g="",m=0),g+=$,m+=Q}}else g.length>0&&(p.push(Li(g)),g="",m=0),p.push(Li(F)),T=!1,g="",m=0;else k+m>M&&(T=!1,p.push(Li(g)),g="",m=0),(g.length>0||!ti(F)||T)&&(g+=F,m+=k)}const B=Li(g);return B.length>0&&p.push(B),p.join(`
298
+ `)}const ry={willReadFrequently:!0},Pi=class ht{static get experimentalLetterSpacingSupported(){let t=ht._experimentalLetterSpacingSupported;if(t===void 0){const n=je.get().getCanvasRenderingContext2D().prototype;t=ht._experimentalLetterSpacingSupported="letterSpacing"in n||"textLetterSpacing"in n}return t}constructor(t,n,a,u,o,c,f,m,g,p){this.text=t,this.style=n,this.width=a,this.height=u,this.lines=o,this.lineWidths=c,this.lineHeight=f,this.maxLineWidth=m,this.fontProperties=g,p&&(this.runsByLine=p.runsByLine,this.lineAscents=p.lineAscents,this.lineDescents=p.lineDescents,this.lineHeights=p.lineHeights,this.hasDropShadow=p.hasDropShadow)}static measureText(t=" ",n,a=ht._canvas,u=n.wordWrap){var F;const o=`${t}-${n.styleKey}-wordWrap-${u}`;if(ht._measurementCache.has(o))return ht._measurementCache.get(o);if(E0(n)&&R0(t)){const k=V2(t,n,u,ht._context,ht._measureText,ht.measureFont,ht.canBreakChars,ht.wordWrapSplit),G=new ht(t,n,k.width,k.height,k.lines,k.lineWidths,k.lineHeight,k.maxLineWidth,k.fontProperties,{runsByLine:k.runsByLine,lineAscents:k.lineAscents,lineDescents:k.lineDescents,lineHeights:k.lineHeights,hasDropShadow:k.hasDropShadow});return ht._measurementCache.set(o,G),G}const f=n._fontString,m=ht.measureFont(f);m.fontSize===0&&(m.fontSize=n.fontSize,m.ascent=n.fontSize,m.descent=0);const g=ht._context;g.font=f;const _=(u?ht._wordWrap(t,n,a):t).split(j2),b=new Array(_.length);let x=0;for(let k=0;k<_.length;k++){const G=ht._measureText(_[k],n.letterSpacing,g);b[k]=G,x=Math.max(x,G)}const S=((F=n._stroke)==null?void 0:F.width)??0,A=n.lineHeight||m.fontSize,T=ht._getAlignWidth(x,n,u),M=ht._adjustWidthForStyle(T,n),z=Math.max(A,m.fontSize+S)+(_.length-1)*(A+n.leading),B=ht._adjustHeightForStyle(z,n),O=new ht(t,n,M,B,_,b,A+n.leading,x,m);return ht._measurementCache.set(o,O),O}static _adjustWidthForStyle(t,n){var o;const a=((o=n._stroke)==null?void 0:o.width)||0;let u=t+a;return n.dropShadow&&(u+=n.dropShadow.distance),u}static _adjustHeightForStyle(t,n){let a=t;return n.dropShadow&&(a+=n.dropShadow.distance),a}static _getAlignWidth(t,n,a){return a&&n.align!=="left"?Math.max(t,n.wordWrapWidth):t}static _measureText(t,n,a){let u=!1;ht.experimentalLetterSpacingSupported&&(ht.experimentalLetterSpacing?(a.letterSpacing=`${n}px`,a.textLetterSpacing=`${n}px`,u=!0):(a.letterSpacing="0px",a.textLetterSpacing="0px"));const o=a.measureText(t);let c=o.width;const f=-(o.actualBoundingBoxLeft??0);let g=(o.actualBoundingBoxRight??0)-f;if(c>0)if(u)c-=n,g-=n;else{const p=(ht.graphemeSegmenter(t).length-1)*n;c+=p,g+=p}return Math.max(c,g)}static _wordWrap(t,n,a=ht._canvas){return Z2(t,n,a,ht._measureText,ht.canBreakWords,ht.canBreakChars,ht.wordWrapSplit)}static isBreakingSpace(t,n){return ti(t)}static canBreakWords(t,n){return n}static canBreakChars(t,n,a,u,o){return!0}static wordWrapSplit(t){return ht.graphemeSegmenter(t)}static measureFont(t){if(ht._fonts[t])return ht._fonts[t];const n=ht._context;n.font=t;const a=n.measureText(ht.METRICS_STRING+ht.BASELINE_SYMBOL),u=a.actualBoundingBoxAscent??0,o=a.actualBoundingBoxDescent??0,c={ascent:u,descent:o,fontSize:u+o};return ht._fonts[t]=c,c}static clearMetrics(t=""){t?delete ht._fonts[t]:ht._fonts={}}static get _canvas(){if(!ht.__canvas){let t;try{const n=new OffscreenCanvas(0,0),a=n.getContext("2d",ry);if(a!=null&&a.measureText)return ht.__canvas=n,n;t=je.get().createCanvas()}catch{t=je.get().createCanvas()}t.width=t.height=10,ht.__canvas=t}return ht.__canvas}static get _context(){return ht.__context||(ht.__context=ht._canvas.getContext("2d",ry)),ht.__context}};Pi.METRICS_STRING="|ÉqÅ";Pi.BASELINE_SYMBOL="M";Pi.BASELINE_MULTIPLIER=1.4;Pi.HEIGHT_MULTIPLIER=2;Pi.graphemeSegmenter=(()=>{if(typeof(Intl==null?void 0:Intl.Segmenter)=="function"){const l=new Intl.Segmenter;return t=>{const n=l.segment(t),a=[];let u=0;for(const o of n)a[u++]=o.segment;return a}}return l=>[...l]})();Pi.experimentalLetterSpacing=!1;Pi._fonts={};Pi._measurementCache=z2(1e3);let xn=Pi;const W2=["serif","sans-serif","monospace","cursive","fantasy","system-ui"];function xh(l){const t=typeof l.fontSize=="number"?`${l.fontSize}px`:l.fontSize;let n=l.fontFamily;Array.isArray(l.fontFamily)||(n=l.fontFamily.split(","));for(let a=n.length-1;a>=0;a--){let u=n[a].trim();!/([\"\'])[^\'\"]+\1/.test(u)&&!W2.includes(u)&&(u=`"${u}"`),n[a]=u}return`${l.fontStyle} ${l.fontVariant} ${l.fontWeight} ${t} ${n.join(",")}`}const uy=1e5;function Fr(l,t,n,a=0,u=0,o=0){if(l.texture===Ut.WHITE&&!l.fill)return ne.shared.setValue(l.color).setAlpha(l.alpha??1).toHexa();if(l.fill){if(l.fill instanceof au){const c=l.fill,f=t.createPattern(c.texture.source.resource,"repeat"),m=c.transform.copyTo(vt.shared);return m.scale(c.texture.source.pixelWidth,c.texture.source.pixelHeight),f.setTransform(m),f}else if(l.fill instanceof Vi){const c=l.fill,f=c.type==="linear",m=c.textureSpace==="local";let g=1,p=1;m&&n&&(g=n.width+a,p=n.height+a);let _,b=!1;if(f){const{start:x,end:S}=c;_=t.createLinearGradient(x.x*g+u,x.y*p+o,S.x*g+u,S.y*p+o),b=Math.abs(S.x-x.x)<Math.abs((S.y-x.y)*.1)}else{const{center:x,innerRadius:S,outerCenter:A,outerRadius:T}=c;_=t.createRadialGradient(x.x*g+u,x.y*p+o,S*g,A.x*g+u,A.y*p+o,T*g)}if(b&&m&&n){const x=n.lineHeight/p;for(let S=0;S<n.lines.length;S++){const A=(S*n.lineHeight+a/2)/p;c.colorStops.forEach(T=>{let M=A+T.offset*x;M=Math.max(0,Math.min(1,M)),_.addColorStop(Math.floor(M*uy)/uy,ne.shared.setValue(T.color).toHex())})}}else c.colorStops.forEach(x=>{_.addColorStop(x.offset,ne.shared.setValue(x.color).toHex())});return _}}else{const c=t.createPattern(l.texture.source.resource,"repeat"),f=l.matrix.copyTo(vt.shared);return f.scale(l.texture.source.pixelWidth,l.texture.source.pixelHeight),c.setTransform(f),c}return be("FillStyle not recognised",l),"red"}const oy=new Kt;function Us(l){let t=0;for(let n=0;n<l.length;n++)l.charCodeAt(n)===32&&t++;return t}class K2{getCanvasAndContext(t){const{text:n,style:a,resolution:u=1}=t,o=a._getFinalPadding(),c=xn.measureText(n||" ",a),f=Math.ceil(Math.ceil(Math.max(1,c.width)+o*2)*u),m=Math.ceil(Math.ceil(Math.max(1,c.height)+o*2)*u),g=_h.getOptimalCanvasAndContext(f,m);this._renderTextToCanvas(a,o,u,g,c);const p=a.trim?E2({canvas:g.canvas,width:f,height:m,resolution:1,output:oy}):oy.set(0,0,f,m);return{canvasAndContext:g,frame:p}}returnCanvasAndContext(t){_h.returnCanvasAndContext(t)}_renderTextToCanvas(t,n,a,u,o){var k,G,$;if(o.runsByLine&&o.runsByLine.length>0){this._renderTaggedTextToCanvas(o,t,n,a,u);return}const{canvas:c,context:f}=u,m=xh(t),g=o.lines,p=o.lineHeight,_=o.lineWidths,b=o.maxLineWidth,x=o.fontProperties,S=c.height;if(f.resetTransform(),f.scale(a,a),f.textBaseline=t.textBaseline,(k=t._stroke)!=null&&k.width){const Q=t._stroke;f.lineWidth=Q.width,f.miterLimit=Q.miterLimit,f.lineJoin=Q.join,f.lineCap=Q.cap}f.font=m;let A,T;const M=t.dropShadow?2:1,z=t.wordWrap?Math.max(t.wordWrapWidth,b):b,O=(((G=t._stroke)==null?void 0:G.width)??0)/2;let F=(p-x.fontSize)/2;p-x.fontSize<0&&(F=0);for(let Q=0;Q<M;++Q){const Z=t.dropShadow&&Q===0,K=Z?Math.ceil(Math.max(1,S)+n*2):0,J=K*a;if(Z)this._setupDropShadow(f,t,a,J);else{const it=t._gradientBounds,nt=t._gradientOffset;if(it){const Tt={width:it.width,height:it.height,lineHeight:it.height,lines:o.lines};this._setFillAndStrokeStyles(f,t,Tt,n,O,(nt==null?void 0:nt.x)??0,(nt==null?void 0:nt.y)??0)}else nt?this._setFillAndStrokeStyles(f,t,o,n,O,nt.x,nt.y):this._setFillAndStrokeStyles(f,t,o,n,O);f.shadowColor="rgba(0,0,0,0)"}for(let it=0;it<g.length;it++){A=O,T=O+it*p+x.ascent+F,A+=this._getAlignmentOffset(_[it],z,t.align);let nt=0;if(t.align==="justify"&&t.wordWrap&&it<g.length-1){const Tt=Us(g[it]);Tt>0&&(nt=(z-_[it])/Tt)}($=t._stroke)!=null&&$.width&&this._drawLetterSpacing(g[it],t,u,A+n,T+n-K,!0,nt),t._fill!==void 0&&this._drawLetterSpacing(g[it],t,u,A+n,T+n-K,!1,nt)}}}_renderTaggedTextToCanvas(t,n,a,u,o){var O,F,k;const{canvas:c,context:f}=o,{runsByLine:m,lineWidths:g,maxLineWidth:p,lineAscents:_,lineHeights:b,hasDropShadow:x}=t,S=c.height;f.resetTransform(),f.scale(u,u),f.textBaseline=n.textBaseline;const A=x?2:1,T=n.wordWrap?Math.max(n.wordWrapWidth,p):p;let M=((O=n._stroke)==null?void 0:O.width)??0;for(const G of m)for(const $ of G){const Q=((F=$.style._stroke)==null?void 0:F.width)??0;Q>M&&(M=Q)}const z=M/2,B=[];for(let G=0;G<m.length;G++){const $=m[G],Q=[];for(const Z of $){const K=xh(Z.style);f.font=K,Q.push({width:xn._measureText(Z.text,Z.style.letterSpacing,f),font:K})}B.push(Q)}for(let G=0;G<A;++G){const $=x&&G===0,Q=$?Math.ceil(Math.max(1,S)+a*2):0,Z=Q*u;$||(f.shadowColor="rgba(0,0,0,0)");let K=z;for(let J=0;J<m.length;J++){const it=m[J],nt=g[J],Tt=_[J],R=b[J],L=B[J];let et=z;et+=this._getAlignmentOffset(nt,T,n.align);let W=0;if(n.align==="justify"&&n.wordWrap&&J<m.length-1){let j=0;for(const P of it)j+=Us(P.text);j>0&&(W=(T-nt)/j)}const at=K+Tt;let w=et+a;for(let j=0;j<it.length;j++){const P=it[j],{width:I,font:rt}=L[j];if(f.font=rt,f.textBaseline=P.style.textBaseline,(k=P.style._stroke)!=null&&k.width){const ft=P.style._stroke;if(f.lineWidth=ft.width,f.miterLimit=ft.miterLimit,f.lineJoin=ft.join,f.lineCap=ft.cap,$)if(P.style.dropShadow)this._setupDropShadow(f,P.style,u,Z);else{const Ht=Us(P.text);w+=I+Ht*W;continue}else{const Ht=xn.measureFont(rt),wt=P.style.lineHeight||Ht.fontSize,Xe={width:I,height:wt,lineHeight:wt,lines:[P.text]};f.strokeStyle=Fr(ft,f,Xe,a*2,w-a,K)}this._drawLetterSpacing(P.text,P.style,o,w,at+a-Q,!0,W)}const ct=Us(P.text);w+=I+ct*W}w=et+a;for(let j=0;j<it.length;j++){const P=it[j],{width:I,font:rt}=L[j];if(f.font=rt,f.textBaseline=P.style.textBaseline,P.style._fill!==void 0){if($)if(P.style.dropShadow)this._setupDropShadow(f,P.style,u,Z);else{const ft=Us(P.text);w+=I+ft*W;continue}else{const ft=xn.measureFont(rt),Ht=P.style.lineHeight||ft.fontSize,wt={width:I,height:Ht,lineHeight:Ht,lines:[P.text]};f.fillStyle=Fr(P.style._fill,f,wt,a*2,w-a,K)}this._drawLetterSpacing(P.text,P.style,o,w,at+a-Q,!1,W)}const ct=Us(P.text);w+=I+ct*W}K+=R}}}_setFillAndStrokeStyles(t,n,a,u,o,c=0,f=0){var m;if(t.fillStyle=n._fill?Fr(n._fill,t,a,u*2,c,f):null,(m=n._stroke)!=null&&m.width){const g=o+u*2;t.strokeStyle=Fr(n._stroke,t,a,g,c,f)}}_setupDropShadow(t,n,a,u){t.fillStyle="black",t.strokeStyle="black";const o=n.dropShadow,c=o.color,f=o.alpha;t.shadowColor=ne.shared.setValue(c).setAlpha(f).toRgbaString();const m=o.blur*a,g=o.distance*a;t.shadowBlur=m,t.shadowOffsetX=Math.cos(o.angle)*g,t.shadowOffsetY=Math.sin(o.angle)*g+u}_getAlignmentOffset(t,n,a){return a==="right"?n-t:a==="center"?(n-t)/2:0}_drawLetterSpacing(t,n,a,u,o,c=!1,f=0){const{context:m}=a,g=n.letterSpacing;let p=!1;if(xn.experimentalLetterSpacingSupported&&(xn.experimentalLetterSpacing?(m.letterSpacing=`${g}px`,m.textLetterSpacing=`${g}px`,p=!0):(m.letterSpacing="0px",m.textLetterSpacing="0px")),(g===0||p)&&f===0){c?m.strokeText(t,u,o):m.fillText(t,u,o);return}if(f!==0&&(g===0||p)){const A=t.split(" ");let T=u;const M=m.measureText(" ").width;for(let z=0;z<A.length;z++)c?m.strokeText(A[z],T,o):m.fillText(A[z],T,o),T+=m.measureText(A[z]).width+M+f;return}let _=u;const b=xn.graphemeSegmenter(t);let x=m.measureText(t).width,S=0;for(let A=0;A<b.length;++A){const T=b[A];c?m.strokeText(T,_,o):m.fillText(T,_,o);let M="";for(let z=A+1;z<b.length;++z)M+=b[z];S=m.measureText(M).width,_+=x-S+g,T===" "&&(_+=f),x=S}}}const js=new K2,Hh=class Fn extends xi{constructor(t={}){super(),this.uid=Qt("textStyle"),this._tick=0,this._cachedFontString=null,I2(t),t instanceof Fn&&(t=t._toObject());const u={...Fn.defaultTextStyle,...t};for(const o in u){const c=o;this[c]=u[o]}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({...Fn.defaultDropShadow,...t}):this._dropShadow=t?this._createProxy({...Fn.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({...hi.defaultFillStyle,...t},()=>{this._fill=Qn({...this._originalFill},hi.defaultFillStyle)})),this._fill=Qn(t===0?"black":t,hi.defaultFillStyle),this.update())}get stroke(){return this._originalStroke}set stroke(t){t!==this._originalStroke&&(this._originalStroke=t,this._isFillStyle(t)&&(this._originalStroke=this._createProxy({...hi.defaultStrokeStyle,...t},()=>{this._stroke=$r({...this._originalStroke},hi.defaultStrokeStyle)})),this._stroke=$r(t,hi.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=Fn.defaultTextStyle;for(const n in t)this[n]=t[n]}assign(t){for(const n in t){const a=n;this[a]=t[n]}return this}get styleKey(){return`${this.uid}-${this._tick}`}get _fontString(){return this._cachedFontString===null&&(this._cachedFontString=xh(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 Fn(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 a,u,o,c;if(this.removeAllListeners(),typeof t=="boolean"?t:t==null?void 0:t.texture){const f=typeof t=="boolean"?t:t==null?void 0:t.textureSource;(a=this._fill)!=null&&a.texture&&this._fill.texture.destroy(f),(u=this._originalFill)!=null&&u.texture&&this._originalFill.texture.destroy(f),(o=this._stroke)!=null&&o.texture&&this._stroke.texture.destroy(f),(c=this._originalStroke)!=null&&c.texture&&this._originalStroke.texture.destroy(f)}this._fill=null,this._stroke=null,this.dropShadow=null,this._originalStroke=null,this._originalFill=null}_createProxy(t,n){return new Proxy(t,{set:(a,u,o)=>(a[u]===o||(a[u]=o,n==null||n(u,o),this.update()),!0)})}_isFillStyle(t){return(t??null)!==null&&!(ne.isColorLike(t)||t instanceof Vi||t instanceof au)}};Hh.defaultDropShadow={alpha:1,angle:Math.PI/6,blur:0,color:"black",distance:5};Hh.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 Fs=Hh;function I2(l){const t=l;if(typeof t.dropShadow=="boolean"&&t.dropShadow){const n=Fs.defaultDropShadow;l.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){At(Ft,"strokeThickness is now a part of stroke");const n=t.stroke;let a={};if(ne.isColorLike(n))a.color=n;else if(n instanceof Vi||n instanceof au)a.fill=n;else if(Object.hasOwnProperty.call(n,"color")||Object.hasOwnProperty.call(n,"fill"))a=n;else throw new Error("Invalid stroke value.");l.stroke={...a,width:t.strokeThickness}}if(Array.isArray(t.fillGradientStops)){if(At(Ft,"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&&be("The number of fill colors must match the number of fill gradient stops.");const n=new Vi({start:{x:0,y:0},end:{x:0,y:1},textureSpace:"local"}),a=t.fillGradientStops.slice(),u=t.fill.map(o=>ne.shared.setValue(o).toNumber());a.forEach((o,c)=>{n.addColorStop(o,u[c])}),l.fill={fill:n}}}function J2(l,t){const{texture:n,bounds:a}=l,u=t._style._getFinalPadding();yy(a,t._anchor,n);const o=t._anchor._x*u*2,c=t._anchor._y*u*2;a.minX-=u-o,a.minY-=u-c,a.maxX-=u-o,a.maxY-=u-c}class $2{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 tT extends $2{}class G0{constructor(t){this._renderer=t,t.runners.resolutionChange.add(this),this._managedTexts=new hl({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),a=t.styleKey;return n.currentKey!==a?!0:t._didTextUpdate}addRenderable(t,n){const a=this._getGpuText(t);if(t._didTextUpdate){const u=t._autoResolution?this._renderer.resolution:t.resolution;(a.currentKey!==t.styleKey||t._resolution!==u)&&this._updateGpuText(t),t._didTextUpdate=!1,J2(a,t)}this._renderer.renderPipes.batch.addToBatch(a,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 tT;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:a}=this._renderer;a.getReferenceCount(n.currentKey)>0?a.decreaseReferenceCount(n.currentKey):n.texture&&a.returnTexture(n.texture)}destroy(){this._managedTexts.destroy(),this._renderer=null}}G0.extension={type:[pt.WebGLPipes,pt.WebGPUPipes,pt.CanvasPipes],name:"text"};const eT=new ii;function iT(l,t,n,a,u=!1){const o=eT;o.minX=0,o.minY=0,o.maxX=l.width/a|0,o.maxY=l.height/a|0;const c=eu.getOptimalTexture(o.width,o.height,a,!1,u);return c.source.uploadMethodId="image",c.source.resource=l,c.source.alphaMode="premultiply-alpha-on-upload",c.frame.width=t/a,c.frame.height=n/a,c.source.emit("update",c.source),c.updateUvs(),c}class U0{constructor(t,n){this._activeTextures={},this._renderer=t,this._retainCanvasContext=n}getTexture(t,n,a,u){typeof t=="string"&&(At("8.0.0","CanvasTextSystem.getTexture: Use object TextOptions instead of separate arguments"),t={text:t,style:a,resolution:n}),t.style instanceof Fs||(t.style=new Fs(t.style)),t.textureStyle instanceof qs||(t.textureStyle=new qs(t.textureStyle)),typeof t.text!="string"&&(t.text=t.text.toString());const{text:o,style:c,textureStyle:f,autoGenerateMipmaps:m}=t,g=t.resolution??this._renderer.resolution,{frame:p,canvasAndContext:_}=js.getCanvasAndContext({text:o,style:c,resolution:g}),b=iT(_.canvas,p.width,p.height,g,m);if(f&&(b.source.style=f),c.trim&&(p.pad(c.padding),b.frame.copyFrom(p),b.frame.scale(1/g),b.updateUvs()),c.filters){const x=this._applyFilters(b,c.filters);return this.returnTexture(b),js.returnCanvasAndContext(_),x}return this._renderer.texture.initSource(b._source),this._retainCanvasContext||js.returnCanvasAndContext(_),b}returnTexture(t){const n=t.source,a=n.resource;if(this._retainCanvasContext&&(a!=null&&a.getContext)){const u=a.getContext("2d");u&&js.returnCanvasAndContext({canvas:a,context:u})}n.resource=null,n.uploadMethodId="unknown",n.alphaMode="no-premultiply-alpha",eu.returnTexture(t,!0)}renderTextToCanvas(){At("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 a=this.getTexture({text:t.text,style:t.style,resolution:t._resolution,textureStyle:t.textureStyle,autoGenerateMipmaps:t.autoGenerateMipmaps});return this._activeTextures[n]={texture:a,usageCount:1},a}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 a=this._renderer.renderTarget.renderTarget,u=this._renderer.filter.generateFilteredTexture({texture:t,filters:n});return this._renderer.renderTarget.bind(a,!1),u}destroy(){this._renderer=null;for(const t in this._activeTextures)this._activeTextures[t]&&this.returnTexture(this._activeTextures[t].texture);this._activeTextures=null}}class N0 extends U0{constructor(t){super(t,!0)}}N0.extension={type:[pt.CanvasSystem],name:"canvasText"};class k0 extends U0{constructor(t){super(t,!1)}}k0.extension={type:[pt.WebGLSystem,pt.WebGPUSystem],name:"canvasText"};It.add(N0);It.add(k0);It.add(G0);class H0 extends A2{constructor(...t){const n=C2(t,"Text");super(n,Fs),this.renderPipeId="text",n.textureStyle&&(this.textureStyle=n.textureStyle instanceof qs?n.textureStyle:new qs(n.textureStyle)),this.autoGenerateMipmaps=n.autoGenerateMipmaps??si.defaultOptions.autoGenerateMipmaps}updateBounds(){const t=this._bounds,n=this._anchor;let a=0,u=0;if(this._style.trim){const{frame:o,canvasAndContext:c}=js.getCanvasAndContext({text:this.text,style:this._style,resolution:1});js.returnCanvasAndContext(c),a=o.width,u=o.height}else{const o=xn.measureText(this._text,this._style);a=o.width,u=o.height}t.minX=-n._x*a,t.maxX=t.minX+a,t.minY=-n._y*u,t.maxY=t.minY+u}}It.add(Eb,Rb);const bh=64,Wr=32;function _e(l,t){return{x:(l-t)*(bh/2),y:(l+t)*(Wr/2)}}const Hs=[{id:"ceo-office",label:"CEO Office",col:0,row:0,w:4,h:3,color:"#ffd700",floorColor:"#1a1508"},{id:"cto-office",label:"CTO Office",col:5,row:0,w:4,h:3,color:"#00bfff",floorColor:"#081418"},{id:"arch-lab",label:"Arch Lab",col:10,row:0,w:4,h:3,color:"#ff69b4",floorColor:"#180d14"},{id:"dev-bullpen",label:"Dev Bullpen",col:0,row:4,w:6,h:4,color:"#00ff88",floorColor:"#081a0e"},{id:"qa-lab",label:"QA Lab",col:7,row:4,w:4,h:4,color:"#9b59b6",floorColor:"#120d18"},{id:"design-studio",label:"Design Studio",col:12,row:4,w:4,h:4,color:"#e74c3c",floorColor:"#1a0c0a"},{id:"data-lab",label:"Data Lab",col:0,row:9,w:4,h:3,color:"#f39c12",floorColor:"#1a1408"},{id:"meeting-room",label:"Meeting Room",col:5,row:9,w:5,h:3,color:"#3498db",floorColor:"#0a1218"},{id:"lounge",label:"Lounge",col:11,row:9,w:5,h:3,color:"#2ecc71",floorColor:"#0a1a0e"},{id:"crisis-room",label:"Crisis Room",col:5,row:13,w:5,h:3,color:"#ff4444",floorColor:"#1a0808"}],L0=[{room:"ceo-office",seat:0,col:2,row:1},{room:"cto-office",seat:0,col:7,row:1},{room:"arch-lab",seat:0,col:12,row:1},{room:"dev-bullpen",seat:0,col:2,row:5},{room:"dev-bullpen",seat:1,col:4,row:6},{room:"qa-lab",seat:0,col:8,row:5},{room:"qa-lab",seat:1,col:10,row:6},{room:"design-studio",seat:0,col:13,row:5},{room:"design-studio",seat:1,col:15,row:6},{room:"data-lab",seat:0,col:2,row:10},{room:"meeting-room",seat:0,col:7,row:10},{room:"lounge",seat:0,col:13,row:10},{room:"crisis-room",seat:0,col:7,row:14}];function Y0(l,t){return L0.find(n=>n.room===l&&n.seat===t)}const nT={sage:16766720,nova:49151,aria:16738740,dex:65416,flux:16739125,quinn:10181046,gage:3426654,morgan:15158332,uma:1752220,river:3447003,atlas:15965202},sT={sage:"👑",nova:"🔮",aria:"🏛",dex:"⚡",flux:"🌊",quinn:"🔍",gage:"⚙",morgan:"📋",uma:"🎨",river:"🌀",atlas:"📊"},aT={coding:65416,reviewing:49151,testing:10181046,planning:16766720,blocked:16729156,deploying:16739125};class lT{constructor(t){de(this,"container");de(this,"body");de(this,"glow");de(this,"label");de(this,"bobOffset",Math.random()*Math.PI*2);de(this,"targetX",0);de(this,"targetY",0);de(this,"currentX",0);de(this,"currentY",0);this.container=new ni,this.container.sortableChildren=!0;const n=nT[t.id]||13421772;this.glow=new qi,this.glow.circle(0,0,10),this.glow.fill({color:65416,alpha:.3}),this.glow.zIndex=0,this.glow.visible=!1,this.container.addChild(this.glow),this.body=new qi,this.body.poly([{x:0,y:-10},{x:8,y:0},{x:0,y:6},{x:-8,y:0}]),this.body.fill({color:n}),this.body.stroke({color:16777215,width:1,alpha:.4}),this.body.zIndex=1,this.container.addChild(this.body),this.label=new H0({text:`${sT[t.id]||""} ${t.name}`,style:new Fs({fontSize:9,fill:13421772,fontFamily:"monospace",fontWeight:"bold"})}),this.label.anchor.set(.5,0),this.label.y=8,this.label.zIndex=2,this.container.addChild(this.label),this.setPositionFromRoom(t.position_room,t.position_seat),this.currentX=this.targetX,this.currentY=this.targetY,this.container.x=this.currentX,this.container.y=this.currentY}setPositionFromRoom(t,n){const a=Y0(t,n);if(a){const u=_e(a.col,a.row);this.targetX=u.x,this.targetY=u.y}}update(t){this.setPositionFromRoom(t.position_room,t.position_seat);const n=this.targetX-this.currentX,a=this.targetY-this.currentY,u=Math.sqrt(n*n+a*a);if(u>1){const f=Math.min(u*.08,3);this.currentX+=n/u*f,this.currentY+=a/u*f}else this.currentX=this.targetX,this.currentY=this.targetY;this.bobOffset+=.03;const o=t.status==="idle"?Math.sin(this.bobOffset)*1.5:0;this.container.x=this.currentX,this.container.y=this.currentY+o;const c=aT[t.status];c&&t.status!=="idle"?(this.glow.visible=!0,this.glow.clear(),this.glow.circle(0,0,12),this.glow.fill({color:c,alpha:.2+Math.sin(this.bobOffset*2)*.1})):this.glow.visible=!1}}class rT{constructor(){de(this,"app");de(this,"world");de(this,"agentSprites",new Map);de(this,"initialized",!1);this.app=new c0,this.world=new ni}async init(t){this.initialized||(this.initialized=!0,await this.app.init({canvas:t,resizeTo:t.parentElement,background:657935,antialias:!0,autoDensity:!0,resolution:window.devicePixelRatio||1}),this.app.stage.addChild(this.world),this.centerCamera(),this.drawRooms(),window.addEventListener("resize",()=>this.centerCamera()))}centerCamera(){const t=this.app.screen.width,n=this.app.screen.height,a=_e(8,8);this.world.x=t/2-a.x,this.world.y=n/4-a.y}drawRooms(){for(const t of Hs)this.drawRoom(t)}drawRoom(t){const n=new ni;for(let _=0;_<t.w;_++)for(let b=0;b<t.h;b++){const x=_e(t.col+_,t.row+b),S=new qi,A=parseInt(t.floorColor.slice(1),16);S.poly([{x:0,y:0},{x:bh/2,y:Wr/2},{x:0,y:Wr},{x:-bh/2,y:Wr/2}]),S.fill({color:A,alpha:.8}),S.stroke({color:parseInt(t.color.slice(1),16),width:1,alpha:.15}),S.x=x.x,S.y=x.y,n.addChild(S)}const a=_e(t.col,t.row),u=_e(t.col+t.w,t.row),o=_e(t.col+t.w,t.row+t.h),c=_e(t.col,t.row+t.h),f=new qi;f.poly([{x:a.x,y:a.y},{x:u.x,y:u.y},{x:o.x,y:o.y},{x:c.x,y:c.y}]),f.stroke({color:parseInt(t.color.slice(1),16),width:1.5,alpha:.4}),n.addChild(f);const m=_e(t.col+t.w/2,t.row+.2),g=new H0({text:t.label,style:new Fs({fontSize:10,fill:t.color,fontFamily:"monospace",fontWeight:"bold",align:"center"})});g.anchor.set(.5,.5),g.x=m.x,g.y=m.y,g.alpha=.6,n.addChild(g);const p=L0.filter(_=>_.room===t.id);for(const _ of p){const b=_e(_.col,_.row),x=new qi;x.poly([{x:0,y:-2},{x:8,y:2},{x:0,y:6},{x:-8,y:2}]),x.fill({color:3355460,alpha:.6}),x.x=b.x,x.y=b.y,n.addChild(x)}this.world.addChild(n)}updateAgents(t){for(const n of t){let a=this.agentSprites.get(n.id);a||(a=new lT(n),this.agentSprites.set(n.id,a),this.world.addChild(a.container)),a.update(n)}}destroy(){window.removeEventListener("resize",()=>this.centerCamera()),this.app.destroy(!0)}}class uT{constructor(){de(this,"container");de(this,"particles",[]);this.container=new ni}confetti(t,n){const a=[16766720,65416,49151,16738740,16739125];for(let u=0;u<30;u++){const o=Math.random()*Math.PI*2,c=1+Math.random()*3;this.addParticle(t,n,Math.cos(o)*c,Math.sin(o)*c-2,60+Math.random()*40,a[Math.floor(Math.random()*a.length)],2+Math.random()*3)}}redPulse(t,n){for(let a=0;a<12;a++){const u=a/12*Math.PI*2;this.addParticle(t,n,Math.cos(u)*1.5,Math.sin(u)*1.5,50,16729156,4)}}greenFlash(t,n){for(let a=0;a<8;a++){const u=a/8*Math.PI*2;this.addParticle(t,n,Math.cos(u)*2,Math.sin(u)*2-1,40,65416,3)}}addParticle(t,n,a,u,o,c,f){const m=new qi;m.rect(-f/2,-f/2,f,f),m.fill({color:c}),m.x=t,m.y=n,this.container.addChild(m),this.particles.push({x:t,y:n,vx:a,vy:u,life:o,maxLife:o,color:c,size:f,gfx:m})}tick(){for(let t=this.particles.length-1;t>=0;t--){const n=this.particles[t];n.x+=n.vx,n.y+=n.vy,n.vy+=.05,n.life--,n.gfx.x=n.x,n.gfx.y=n.y,n.gfx.alpha=n.life/n.maxLife,n.life<=0&&(this.container.removeChild(n.gfx),n.gfx.destroy(),this.particles.splice(t,1))}}}function oT(l){const t=ei.useRef(null),n=ei.useRef(null);return ei.useEffect(()=>{const a=document.getElementById(l);if(!a)return;const u=new rT,o=new uT;return t.current=u,n.current=o,u.init(a).then(()=>{u.world.addChild(o.container),u.app.ticker.add(()=>{const c=Rt.getState();u.updateAgents(c.agents.map(m=>({id:m.id,name:m.name,status:m.status,position_room:m.position_room,position_seat:m.position_seat})));let f=c.popWow();for(;f;)cT(f,o),f=c.popWow();o.tick()})}),()=>{u.destroy()}},[l]),{officeRef:t,effectsRef:n}}function cT(l,t){if(l)switch(l.type){case"pr:merged":{const n=Hs.find(a=>a.id==="dev-bullpen");if(n){const a=_e(n.col+n.w/2,n.row+n.h/2);t.confetti(a.x,a.y)}break}case"crisis:start":{const n=Hs.find(a=>a.id==="crisis-room");if(n){const a=_e(n.col+n.w/2,n.row+n.h/2);t.redPulse(a.x,a.y)}break}case"crisis:resolved":{const n=Hs.find(a=>a.id==="crisis-room");if(n){const a=_e(n.col+n.w/2,n.row+n.h/2);t.greenFlash(a.x,a.y)}break}case"deploy:success":{const n=Y0("qa-lab",1);if(n){const a=_e(n.col,n.row);t.confetti(a.x,a.y),t.greenFlash(a.x,a.y)}break}case"sprint:complete":{const n=Hs.find(a=>a.id==="lounge");if(n){const a=_e(n.col+n.w/2,n.row+n.h/2);t.confetti(a.x,a.y),t.confetti(a.x+30,a.y-10),t.confetti(a.x-30,a.y+10)}break}case"meeting:start":{const n=Hs.find(a=>a.id==="meeting-room");if(n){const a=_e(n.col+n.w/2,n.row+n.h/2);t.greenFlash(a.x,a.y)}break}}}const hT={sage:"👑",nova:"🔮",aria:"🏛️",dex:"⚡",flux:"🌊",quinn:"🔍",gage:"⚙️",morgan:"📋",uma:"🎨",river:"🌀",atlas:"📊"},fT={sage:"#FFD700",nova:"#00BFFF",aria:"#FF69B4",dex:"#00FF88",flux:"#FF6B35",quinn:"#9B59B6",gage:"#34495E",morgan:"#E74C3C",uma:"#1ABC9C",river:"#3498DB",atlas:"#F39C12"},dT={idle:"#555",coding:"#00ff88",reviewing:"#00bfff",testing:"#9b59b6",planning:"#ffd700",meeting:"#ff69b4",blocked:"#ff4444",deploying:"#ff6b35"};function mT(){const l=Rt(t=>t.agents);return tt.jsxs("div",{className:"agent-bar",children:[tt.jsx("div",{className:"agent-bar-logo",children:"SAGE TEAM"}),tt.jsx("div",{className:"agent-bar-list",children:l.map(t=>tt.jsxs("div",{className:"agent-bar-item",title:`${t.name} — ${t.role} (${t.status})`,children:[tt.jsx("span",{className:"agent-emoji",children:hT[t.id]||"🤖"}),tt.jsx("span",{className:"agent-name",style:{color:fT[t.id]||"#aaa"},children:t.name}),tt.jsx("span",{className:"status-dot",style:{background:dT[t.status]||"#555"}})]},t.id))})]})}const gT={sage:"#FFD700",nova:"#00BFFF",aria:"#FF69B4",dex:"#00FF88",flux:"#FF6B35",quinn:"#9B59B6",gage:"#34495E",morgan:"#E74C3C",uma:"#1ABC9C",river:"#3498DB",atlas:"#F39C12"};function pT(){const l=Rt(n=>n.messages),t=ei.useRef(null);return ei.useEffect(()=>{var n;(n=t.current)==null||n.scrollIntoView({behavior:"smooth"})},[l.length]),tt.jsxs("div",{className:"chat-panel",children:[tt.jsx("div",{className:"chat-header",children:"Activity"}),tt.jsxs("div",{className:"chat-messages",children:[l.length===0&&tt.jsx("div",{className:"chat-empty",children:"Waiting for activity..."}),l.map(n=>tt.jsxs("div",{className:"chat-msg",children:[tt.jsx("span",{className:"chat-author",style:{color:gT[n.from_agent]||"#888"},children:n.from_agent}),tt.jsx("span",{className:"chat-content",children:n.content})]},n.id)),tt.jsx("div",{ref:t})]})]})}function yT(){const l=Rt(m=>m.agents),t=Rt(m=>m.tasks),n=Rt(m=>m.sprint),a=l.filter(m=>m.status!=="idle"),u=t.filter(m=>m.status==="done").length,o=t.length,c=o>0?u/o:0,f=l.reduce((m,g)=>{const p=g.position_room;return m[p]||(m[p]=[]),m[p].push(g),m},{});return{agents:l,activeAgents:a,agentsByRoom:f,completedTasks:u,totalTasks:o,progress:c,sprint:n}}const _T={pending:"⏳",in_progress:"🔨",done:"✅",blocked:"🚫",review:"👀"};function xT(){const l=Rt(o=>o.tasks),{sprint:t,progress:n}=yT(),[a,u]=ei.useState(!1);return a?tt.jsx("div",{className:"task-board collapsed",onClick:()=>u(!1),children:tt.jsx("span",{className:"collapse-icon",children:"▶"})}):tt.jsxs("div",{className:"task-board",children:[tt.jsxs("div",{className:"task-board-header",onClick:()=>u(!0),children:[tt.jsx("span",{className:"collapse-icon",children:"◀"}),tt.jsx("span",{className:"task-board-title",children:"Sprint"})]}),t&&tt.jsxs("div",{className:"sprint-info",children:[tt.jsx("div",{className:"sprint-name",children:t.name}),tt.jsx("div",{className:"sprint-progress-bar",children:tt.jsx("div",{className:"sprint-progress-fill",style:{width:`${n*100}%`}})}),tt.jsxs("div",{className:"sprint-progress-text",children:[Math.round(n*100),"% complete"]})]}),tt.jsxs("div",{className:"task-list",children:[l.length===0&&tt.jsx("div",{className:"task-empty",children:"No tasks yet. Submit a goal to start."}),l.map(o=>tt.jsxs("div",{className:`task-item status-${o.status}`,children:[tt.jsx("span",{className:"task-status-icon",children:_T[o.status]||"📦"}),tt.jsxs("div",{className:"task-info",children:[tt.jsx("div",{className:"task-title",children:o.title}),o.assigned_to&&tt.jsx("div",{className:"task-assignee",children:o.assigned_to})]})]},o.id))]})]})}function bT(){const l=Rt(o=>o.prs),t=Rt(o=>o.selectedPR),n=Rt(o=>o.setSelectedPR),a=l.find(o=>o.id===t);if(!a)return null;async function u(o){try{await fetch(`/api/pr/${a.id}/${o}`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({feedback:""})}),n(null)}catch{}}return tt.jsx("div",{className:"pr-overlay",onClick:()=>n(null),children:tt.jsxs("div",{className:"pr-modal",onClick:o=>o.stopPropagation(),children:[tt.jsxs("div",{className:"pr-modal-header",children:[tt.jsx("h3",{children:"Pull Request Review"}),tt.jsx("button",{className:"pr-close",onClick:()=>n(null),children:"×"})]}),tt.jsxs("div",{className:"pr-modal-body",children:[tt.jsxs("div",{className:"pr-field",children:[tt.jsx("span",{className:"pr-label",children:"Title:"})," ",a.title]}),tt.jsxs("div",{className:"pr-field",children:[tt.jsx("span",{className:"pr-label",children:"Branch:"})," ",tt.jsx("code",{children:a.branch})]}),tt.jsxs("div",{className:"pr-field",children:[tt.jsx("span",{className:"pr-label",children:"Author:"})," ",a.author_agent]}),tt.jsxs("div",{className:"pr-field",children:[tt.jsx("span",{className:"pr-label",children:"Status:"})," ",a.status]}),a.review_notes&&tt.jsxs("div",{className:"pr-review-notes",children:[tt.jsx("div",{className:"pr-label",children:"Review Notes:"}),tt.jsx("pre",{children:a.review_notes})]})]}),tt.jsxs("div",{className:"pr-modal-actions",children:[tt.jsx("button",{className:"pr-btn approve",onClick:()=>u("approve"),children:"Approve & Merge"}),tt.jsx("button",{className:"pr-btn reject",onClick:()=>u("reject"),children:"Request Changes"})]})]})})}function vT(){const[l,t]=ei.useState(""),[n,a]=ei.useState(!1),u=Rt(g=>g.connected),o=Rt(g=>g.prs),c=Rt(g=>g.setSelectedPR),f=o.filter(g=>g.status==="pending_review"||g.status==="agent_reviewed");async function m(g){if(g.preventDefault(),!(!l.trim()||n)){a(!0);try{await fetch("/api/goal",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({goal:l.trim()})}),t("")}catch{}finally{a(!1)}}}return tt.jsxs("div",{className:"goal-bar",children:[f.length>0&&tt.jsx("div",{className:"pr-badges",children:f.map(g=>tt.jsxs("button",{className:"pr-badge",onClick:()=>c(g.id),children:["PR: ",g.title]},g.id))}),tt.jsxs("form",{className:"goal-form",onSubmit:m,children:[tt.jsx("input",{className:"goal-input",type:"text",placeholder:u?"Enter a goal for your team...":"Connecting...",value:l,onChange:g=>t(g.target.value),disabled:!u||n}),tt.jsx("button",{className:"goal-submit",type:"submit",disabled:!u||n||!l.trim(),children:n?"...":"Go"})]})]})}function ST(){const l=Rt(t=>t.connected);return Cb(),oT("office-canvas"),tt.jsxs("div",{className:"app",children:[tt.jsx(mT,{}),tt.jsxs("div",{className:"main-area",children:[tt.jsx(xT,{}),tt.jsxs("div",{className:"canvas-container",children:[tt.jsx("canvas",{id:"office-canvas"}),!l&&tt.jsx("div",{className:"connection-overlay",children:tt.jsx("span",{children:"Connecting to Sage Team..."})})]}),tt.jsx(pT,{})]}),tt.jsx(vT,{}),tt.jsx(bT,{})]})}bb.createRoot(document.getElementById("root")).render(tt.jsx(ei.StrictMode,{children:tt.jsx(ST,{})}));export{eu as $,s0 as A,ul as B,ne as C,je as D,xi as E,Vi as F,nu as G,wh as H,e0 as I,si as J,Zy as K,_h as L,vt as M,rS as N,oS as O,ge as P,pS as Q,rh as R,Eh as S,Ut as T,Ir as U,dS as V,Yb as W,xS as X,Re as Y,vy as Z,ii as _,Ky as a,fp as a0,nl as a1,$2 as a2,y1 as a3,mp as a4,Nc as a5,gp as a6,x1 as a7,qs as a8,Kt as a9,Ay as aa,S2 as ab,a0 as ac,At as ad,cl as ae,Ft as af,Sv as ag,yv as ah,qv as ai,Nv as aj,uS as ak,cS as al,yS as am,gS as an,_S as ao,Vy as b,Ov as c,Ee as d,Qt as e,kt as f,X1 as g,Qr as h,pt as i,qi as j,US as k,MS as l,Ty as m,au as n,Oy as o,It as p,Ys as q,t1 as r,su as s,ni as t,$1 as u,zv as v,be as w,hl as x,Rp as y,Zr as z};