fleet-commander-ai 0.0.1

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 (281) hide show
  1. package/LICENSE +202 -0
  2. package/README.md +159 -0
  3. package/bin/fleet-commander-mcp.js +27 -0
  4. package/bin/fleet-commander.js +22 -0
  5. package/dist/client/assets/index-CHukC8Hq.js +188 -0
  6. package/dist/client/assets/index-CHukC8Hq.js.map +1 -0
  7. package/dist/client/assets/index-DvMjcYbg.css +1 -0
  8. package/dist/client/index.html +13 -0
  9. package/dist/server/config.d.ts +51 -0
  10. package/dist/server/config.d.ts.map +1 -0
  11. package/dist/server/config.js +104 -0
  12. package/dist/server/config.js.map +1 -0
  13. package/dist/server/db.d.ts +388 -0
  14. package/dist/server/db.d.ts.map +1 -0
  15. package/dist/server/db.js +1524 -0
  16. package/dist/server/db.js.map +1 -0
  17. package/dist/server/index.d.ts +2 -0
  18. package/dist/server/index.d.ts.map +1 -0
  19. package/dist/server/index.js +162 -0
  20. package/dist/server/index.js.map +1 -0
  21. package/dist/server/mcp/index.d.ts +2 -0
  22. package/dist/server/mcp/index.d.ts.map +1 -0
  23. package/dist/server/mcp/index.js +112 -0
  24. package/dist/server/mcp/index.js.map +1 -0
  25. package/dist/server/mcp/tools/add-project.d.ts +9 -0
  26. package/dist/server/mcp/tools/add-project.d.ts.map +1 -0
  27. package/dist/server/mcp/tools/add-project.js +58 -0
  28. package/dist/server/mcp/tools/add-project.js.map +1 -0
  29. package/dist/server/mcp/tools/get-team-timeline.d.ts +9 -0
  30. package/dist/server/mcp/tools/get-team-timeline.d.ts.map +1 -0
  31. package/dist/server/mcp/tools/get-team-timeline.js +48 -0
  32. package/dist/server/mcp/tools/get-team-timeline.js.map +1 -0
  33. package/dist/server/mcp/tools/get-team.d.ts +9 -0
  34. package/dist/server/mcp/tools/get-team.d.ts.map +1 -0
  35. package/dist/server/mcp/tools/get-team.js +48 -0
  36. package/dist/server/mcp/tools/get-team.js.map +1 -0
  37. package/dist/server/mcp/tools/get-usage.d.ts +9 -0
  38. package/dist/server/mcp/tools/get-usage.d.ts.map +1 -0
  39. package/dist/server/mcp/tools/get-usage.js +33 -0
  40. package/dist/server/mcp/tools/get-usage.js.map +1 -0
  41. package/dist/server/mcp/tools/launch-team.d.ts +8 -0
  42. package/dist/server/mcp/tools/launch-team.d.ts.map +1 -0
  43. package/dist/server/mcp/tools/launch-team.js +49 -0
  44. package/dist/server/mcp/tools/launch-team.js.map +1 -0
  45. package/dist/server/mcp/tools/list-issues.d.ts +9 -0
  46. package/dist/server/mcp/tools/list-issues.d.ts.map +1 -0
  47. package/dist/server/mcp/tools/list-issues.js +47 -0
  48. package/dist/server/mcp/tools/list-issues.js.map +1 -0
  49. package/dist/server/mcp/tools/list-projects.d.ts +9 -0
  50. package/dist/server/mcp/tools/list-projects.d.ts.map +1 -0
  51. package/dist/server/mcp/tools/list-projects.js +32 -0
  52. package/dist/server/mcp/tools/list-projects.js.map +1 -0
  53. package/dist/server/mcp/tools/list-teams.d.ts +9 -0
  54. package/dist/server/mcp/tools/list-teams.d.ts.map +1 -0
  55. package/dist/server/mcp/tools/list-teams.js +43 -0
  56. package/dist/server/mcp/tools/list-teams.js.map +1 -0
  57. package/dist/server/mcp/tools/restart-team.d.ts +8 -0
  58. package/dist/server/mcp/tools/restart-team.d.ts.map +1 -0
  59. package/dist/server/mcp/tools/restart-team.js +46 -0
  60. package/dist/server/mcp/tools/restart-team.js.map +1 -0
  61. package/dist/server/mcp/tools/send-message.d.ts +9 -0
  62. package/dist/server/mcp/tools/send-message.d.ts.map +1 -0
  63. package/dist/server/mcp/tools/send-message.js +48 -0
  64. package/dist/server/mcp/tools/send-message.js.map +1 -0
  65. package/dist/server/mcp/tools/stop-team.d.ts +8 -0
  66. package/dist/server/mcp/tools/stop-team.d.ts.map +1 -0
  67. package/dist/server/mcp/tools/stop-team.js +46 -0
  68. package/dist/server/mcp/tools/stop-team.js.map +1 -0
  69. package/dist/server/mcp/tools/system-health.d.ts +9 -0
  70. package/dist/server/mcp/tools/system-health.d.ts.map +1 -0
  71. package/dist/server/mcp/tools/system-health.js +32 -0
  72. package/dist/server/mcp/tools/system-health.js.map +1 -0
  73. package/dist/server/middleware/error-handler.d.ts +32 -0
  74. package/dist/server/middleware/error-handler.d.ts.map +1 -0
  75. package/dist/server/middleware/error-handler.js +65 -0
  76. package/dist/server/middleware/error-handler.js.map +1 -0
  77. package/dist/server/routes/events.d.ts +16 -0
  78. package/dist/server/routes/events.d.ts.map +1 -0
  79. package/dist/server/routes/events.js +164 -0
  80. package/dist/server/routes/events.js.map +1 -0
  81. package/dist/server/routes/issues.d.ts +4 -0
  82. package/dist/server/routes/issues.d.ts.map +1 -0
  83. package/dist/server/routes/issues.js +198 -0
  84. package/dist/server/routes/issues.js.map +1 -0
  85. package/dist/server/routes/project-groups.d.ts +4 -0
  86. package/dist/server/routes/project-groups.d.ts.map +1 -0
  87. package/dist/server/routes/project-groups.js +124 -0
  88. package/dist/server/routes/project-groups.js.map +1 -0
  89. package/dist/server/routes/projects.d.ts +4 -0
  90. package/dist/server/routes/projects.d.ts.map +1 -0
  91. package/dist/server/routes/projects.js +319 -0
  92. package/dist/server/routes/projects.js.map +1 -0
  93. package/dist/server/routes/prs.d.ts +4 -0
  94. package/dist/server/routes/prs.d.ts.map +1 -0
  95. package/dist/server/routes/prs.js +186 -0
  96. package/dist/server/routes/prs.js.map +1 -0
  97. package/dist/server/routes/query.d.ts +4 -0
  98. package/dist/server/routes/query.d.ts.map +1 -0
  99. package/dist/server/routes/query.js +82 -0
  100. package/dist/server/routes/query.js.map +1 -0
  101. package/dist/server/routes/state-machine.d.ts +4 -0
  102. package/dist/server/routes/state-machine.d.ts.map +1 -0
  103. package/dist/server/routes/state-machine.js +86 -0
  104. package/dist/server/routes/state-machine.js.map +1 -0
  105. package/dist/server/routes/stream.d.ts +18 -0
  106. package/dist/server/routes/stream.d.ts.map +1 -0
  107. package/dist/server/routes/stream.js +62 -0
  108. package/dist/server/routes/stream.js.map +1 -0
  109. package/dist/server/routes/system.d.ts +4 -0
  110. package/dist/server/routes/system.d.ts.map +1 -0
  111. package/dist/server/routes/system.js +225 -0
  112. package/dist/server/routes/system.js.map +1 -0
  113. package/dist/server/routes/teams.d.ts +4 -0
  114. package/dist/server/routes/teams.d.ts.map +1 -0
  115. package/dist/server/routes/teams.js +570 -0
  116. package/dist/server/routes/teams.js.map +1 -0
  117. package/dist/server/routes/usage.d.ts +4 -0
  118. package/dist/server/routes/usage.d.ts.map +1 -0
  119. package/dist/server/routes/usage.js +80 -0
  120. package/dist/server/routes/usage.js.map +1 -0
  121. package/dist/server/schema.sql +267 -0
  122. package/dist/server/services/cc-query.d.ts +20 -0
  123. package/dist/server/services/cc-query.d.ts.map +1 -0
  124. package/dist/server/services/cc-query.js +352 -0
  125. package/dist/server/services/cc-query.js.map +1 -0
  126. package/dist/server/services/cleanup.d.ts +15 -0
  127. package/dist/server/services/cleanup.d.ts.map +1 -0
  128. package/dist/server/services/cleanup.js +232 -0
  129. package/dist/server/services/cleanup.js.map +1 -0
  130. package/dist/server/services/diagnostics-service.d.ts +85 -0
  131. package/dist/server/services/diagnostics-service.d.ts.map +1 -0
  132. package/dist/server/services/diagnostics-service.js +242 -0
  133. package/dist/server/services/diagnostics-service.js.map +1 -0
  134. package/dist/server/services/event-collector.d.ts +125 -0
  135. package/dist/server/services/event-collector.d.ts.map +1 -0
  136. package/dist/server/services/event-collector.js +299 -0
  137. package/dist/server/services/event-collector.js.map +1 -0
  138. package/dist/server/services/event-service.d.ts +22 -0
  139. package/dist/server/services/event-service.d.ts.map +1 -0
  140. package/dist/server/services/event-service.js +53 -0
  141. package/dist/server/services/event-service.js.map +1 -0
  142. package/dist/server/services/github-poller.d.ts +68 -0
  143. package/dist/server/services/github-poller.d.ts.map +1 -0
  144. package/dist/server/services/github-poller.js +563 -0
  145. package/dist/server/services/github-poller.js.map +1 -0
  146. package/dist/server/services/issue-fetcher.d.ts +231 -0
  147. package/dist/server/services/issue-fetcher.d.ts.map +1 -0
  148. package/dist/server/services/issue-fetcher.js +1053 -0
  149. package/dist/server/services/issue-fetcher.js.map +1 -0
  150. package/dist/server/services/issue-service.d.ts +102 -0
  151. package/dist/server/services/issue-service.d.ts.map +1 -0
  152. package/dist/server/services/issue-service.js +279 -0
  153. package/dist/server/services/issue-service.js.map +1 -0
  154. package/dist/server/services/message-template-service.d.ts +39 -0
  155. package/dist/server/services/message-template-service.d.ts.map +1 -0
  156. package/dist/server/services/message-template-service.js +87 -0
  157. package/dist/server/services/message-template-service.js.map +1 -0
  158. package/dist/server/services/pr-service.d.ts +73 -0
  159. package/dist/server/services/pr-service.d.ts.map +1 -0
  160. package/dist/server/services/pr-service.js +231 -0
  161. package/dist/server/services/pr-service.js.map +1 -0
  162. package/dist/server/services/project-group-service.d.ts +64 -0
  163. package/dist/server/services/project-group-service.d.ts.map +1 -0
  164. package/dist/server/services/project-group-service.js +149 -0
  165. package/dist/server/services/project-group-service.js.map +1 -0
  166. package/dist/server/services/project-service.d.ts +161 -0
  167. package/dist/server/services/project-service.d.ts.map +1 -0
  168. package/dist/server/services/project-service.js +623 -0
  169. package/dist/server/services/project-service.js.map +1 -0
  170. package/dist/server/services/service-error.d.ts +25 -0
  171. package/dist/server/services/service-error.d.ts.map +1 -0
  172. package/dist/server/services/service-error.js +49 -0
  173. package/dist/server/services/service-error.js.map +1 -0
  174. package/dist/server/services/sse-broker.d.ts +144 -0
  175. package/dist/server/services/sse-broker.d.ts.map +1 -0
  176. package/dist/server/services/sse-broker.js +111 -0
  177. package/dist/server/services/sse-broker.js.map +1 -0
  178. package/dist/server/services/startup-recovery.d.ts +10 -0
  179. package/dist/server/services/startup-recovery.d.ts.map +1 -0
  180. package/dist/server/services/startup-recovery.js +122 -0
  181. package/dist/server/services/startup-recovery.js.map +1 -0
  182. package/dist/server/services/stuck-detector.d.ts +20 -0
  183. package/dist/server/services/stuck-detector.d.ts.map +1 -0
  184. package/dist/server/services/stuck-detector.js +167 -0
  185. package/dist/server/services/stuck-detector.js.map +1 -0
  186. package/dist/server/services/stuck-detector.test.d.ts +2 -0
  187. package/dist/server/services/stuck-detector.test.d.ts.map +1 -0
  188. package/dist/server/services/stuck-detector.test.js +363 -0
  189. package/dist/server/services/stuck-detector.test.js.map +1 -0
  190. package/dist/server/services/team-manager.d.ts +188 -0
  191. package/dist/server/services/team-manager.d.ts.map +1 -0
  192. package/dist/server/services/team-manager.js +1869 -0
  193. package/dist/server/services/team-manager.js.map +1 -0
  194. package/dist/server/services/team-service.d.ts +251 -0
  195. package/dist/server/services/team-service.d.ts.map +1 -0
  196. package/dist/server/services/team-service.js +707 -0
  197. package/dist/server/services/team-service.js.map +1 -0
  198. package/dist/server/services/usage-service.d.ts +42 -0
  199. package/dist/server/services/usage-service.d.ts.map +1 -0
  200. package/dist/server/services/usage-service.js +101 -0
  201. package/dist/server/services/usage-service.js.map +1 -0
  202. package/dist/server/services/usage-tracker.d.ts +68 -0
  203. package/dist/server/services/usage-tracker.d.ts.map +1 -0
  204. package/dist/server/services/usage-tracker.js +220 -0
  205. package/dist/server/services/usage-tracker.js.map +1 -0
  206. package/dist/server/utils/build-timeline.d.ts +32 -0
  207. package/dist/server/utils/build-timeline.d.ts.map +1 -0
  208. package/dist/server/utils/build-timeline.js +142 -0
  209. package/dist/server/utils/build-timeline.js.map +1 -0
  210. package/dist/server/utils/find-git-bash.d.ts +10 -0
  211. package/dist/server/utils/find-git-bash.d.ts.map +1 -0
  212. package/dist/server/utils/find-git-bash.js +46 -0
  213. package/dist/server/utils/find-git-bash.js.map +1 -0
  214. package/dist/server/utils/hook-installer.d.ts +20 -0
  215. package/dist/server/utils/hook-installer.d.ts.map +1 -0
  216. package/dist/server/utils/hook-installer.js +90 -0
  217. package/dist/server/utils/hook-installer.js.map +1 -0
  218. package/dist/server/utils/process-utils.d.ts +10 -0
  219. package/dist/server/utils/process-utils.d.ts.map +1 -0
  220. package/dist/server/utils/process-utils.js +33 -0
  221. package/dist/server/utils/process-utils.js.map +1 -0
  222. package/dist/server/utils/resolve-claude-path.d.ts +4 -0
  223. package/dist/server/utils/resolve-claude-path.d.ts.map +1 -0
  224. package/dist/server/utils/resolve-claude-path.js +66 -0
  225. package/dist/server/utils/resolve-claude-path.js.map +1 -0
  226. package/dist/server/utils/resolve-message.d.ts +10 -0
  227. package/dist/server/utils/resolve-message.d.ts.map +1 -0
  228. package/dist/server/utils/resolve-message.js +27 -0
  229. package/dist/server/utils/resolve-message.js.map +1 -0
  230. package/dist/shared/message-templates.d.ts +9 -0
  231. package/dist/shared/message-templates.d.ts.map +1 -0
  232. package/dist/shared/message-templates.js +88 -0
  233. package/dist/shared/message-templates.js.map +1 -0
  234. package/dist/shared/state-machine.d.ts +28 -0
  235. package/dist/shared/state-machine.d.ts.map +1 -0
  236. package/dist/shared/state-machine.js +282 -0
  237. package/dist/shared/state-machine.js.map +1 -0
  238. package/dist/shared/types.d.ts +404 -0
  239. package/dist/shared/types.d.ts.map +1 -0
  240. package/dist/shared/types.js +5 -0
  241. package/dist/shared/types.js.map +1 -0
  242. package/hooks/DESIGN.md +562 -0
  243. package/hooks/on_notification.sh +9 -0
  244. package/hooks/on_post_tool_use.sh +9 -0
  245. package/hooks/on_pre_compact.sh +10 -0
  246. package/hooks/on_session_end.sh +8 -0
  247. package/hooks/on_session_start.sh +8 -0
  248. package/hooks/on_stop.sh +8 -0
  249. package/hooks/on_stop_failure.sh +8 -0
  250. package/hooks/on_subagent_start.sh +8 -0
  251. package/hooks/on_subagent_stop.sh +8 -0
  252. package/hooks/on_teammate_idle.sh +8 -0
  253. package/hooks/on_tool_error.sh +8 -0
  254. package/hooks/send_event.sh +101 -0
  255. package/hooks/settings.json.example +120 -0
  256. package/package.json +93 -0
  257. package/prompts/default-prompt.md +16 -0
  258. package/scripts/install.ps1 +22 -0
  259. package/scripts/install.sh +229 -0
  260. package/scripts/launch.js +64 -0
  261. package/scripts/uninstall.ps1 +22 -0
  262. package/scripts/uninstall.sh +123 -0
  263. package/templates/agents/fleet-dev.md +162 -0
  264. package/templates/agents/fleet-planner.md +263 -0
  265. package/templates/agents/fleet-reviewer.md +309 -0
  266. package/templates/archive/fleet-coordinator.md +128 -0
  267. package/templates/archive/fleet-dev-csharp.md +74 -0
  268. package/templates/archive/fleet-dev-devops.md +76 -0
  269. package/templates/archive/fleet-dev-fsharp.md +83 -0
  270. package/templates/archive/fleet-dev-generic.md +64 -0
  271. package/templates/archive/fleet-dev-python.md +75 -0
  272. package/templates/archive/fleet-dev-typescript.md +76 -0
  273. package/templates/guides/api-design.md +159 -0
  274. package/templates/guides/csharp-conventions.md +182 -0
  275. package/templates/guides/devops-conventions.md +192 -0
  276. package/templates/guides/fsharp-conventions.md +201 -0
  277. package/templates/guides/python-conventions.md +146 -0
  278. package/templates/guides/sql-database.md +125 -0
  279. package/templates/guides/testing-strategies.md +123 -0
  280. package/templates/guides/typescript-conventions.md +130 -0
  281. package/templates/workflow.md +513 -0
@@ -0,0 +1,188 @@
1
+ var PH=Object.defineProperty;var RH=(e,r,n)=>r in e?PH(e,r,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[r]=n;var Ug=(e,r,n)=>RH(e,typeof r!="symbol"?r+"":r,n);function DH(e,r){for(var n=0;n<r.length;n++){const a=r[n];if(typeof a!="string"&&!Array.isArray(a)){for(const i in a)if(i!=="default"&&!(i in e)){const o=Object.getOwnPropertyDescriptor(a,i);o&&Object.defineProperty(e,i,o.get?o:{enumerable:!0,get:()=>a[i]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const r=document.createElement("link").relList;if(r&&r.supports&&r.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))a(i);new MutationObserver(i=>{for(const o of i)if(o.type==="childList")for(const u of o.addedNodes)u.tagName==="LINK"&&u.rel==="modulepreload"&&a(u)}).observe(document,{childList:!0,subtree:!0});function n(i){const o={};return i.integrity&&(o.integrity=i.integrity),i.referrerPolicy&&(o.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?o.credentials="include":i.crossOrigin==="anonymous"?o.credentials="omit":o.credentials="same-origin",o}function a(i){if(i.ep)return;i.ep=!0;const o=n(i);fetch(i.href,o)}})();var yd=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Dn(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Fg={exports:{}},gs={};/**
2
+ * @license React
3
+ * react-jsx-runtime.production.js
4
+ *
5
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
6
+ *
7
+ * This source code is licensed under the MIT license found in the
8
+ * LICENSE file in the root directory of this source tree.
9
+ */var XC;function LH(){if(XC)return gs;XC=1;var e=Symbol.for("react.transitional.element"),r=Symbol.for("react.fragment");function n(a,i,o){var u=null;if(o!==void 0&&(u=""+o),i.key!==void 0&&(u=""+i.key),"key"in i){o={};for(var c in i)c!=="key"&&(o[c]=i[c])}else o=i;return i=o.ref,{$$typeof:e,type:a,key:u,ref:i!==void 0?i:null,props:o}}return gs.Fragment=r,gs.jsx=n,gs.jsxs=n,gs}var WC;function IH(){return WC||(WC=1,Fg.exports=LH()),Fg.exports}var b=IH(),Hg={exports:{}},Ne={};/**
10
+ * @license React
11
+ * react.production.js
12
+ *
13
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
14
+ *
15
+ * This source code is licensed under the MIT license found in the
16
+ * LICENSE file in the root directory of this source tree.
17
+ */var ZC;function zH(){if(ZC)return Ne;ZC=1;var e=Symbol.for("react.transitional.element"),r=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),a=Symbol.for("react.strict_mode"),i=Symbol.for("react.profiler"),o=Symbol.for("react.consumer"),u=Symbol.for("react.context"),c=Symbol.for("react.forward_ref"),f=Symbol.for("react.suspense"),d=Symbol.for("react.memo"),h=Symbol.for("react.lazy"),m=Symbol.for("react.activity"),g=Symbol.iterator;function y(F){return F===null||typeof F!="object"?null:(F=g&&F[g]||F["@@iterator"],typeof F=="function"?F:null)}var x={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},E=Object.assign,w={};function _(F,Z,ce){this.props=F,this.context=Z,this.refs=w,this.updater=ce||x}_.prototype.isReactComponent={},_.prototype.setState=function(F,Z){if(typeof F!="object"&&typeof F!="function"&&F!=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,F,Z,"setState")},_.prototype.forceUpdate=function(F){this.updater.enqueueForceUpdate(this,F,"forceUpdate")};function A(){}A.prototype=_.prototype;function O(F,Z,ce){this.props=F,this.context=Z,this.refs=w,this.updater=ce||x}var T=O.prototype=new A;T.constructor=O,E(T,_.prototype),T.isPureReactComponent=!0;var C=Array.isArray;function N(){}var M={H:null,A:null,T:null,S:null},R=Object.prototype.hasOwnProperty;function L(F,Z,ce){var B=ce.ref;return{$$typeof:e,type:F,key:Z,ref:B!==void 0?B:null,props:ce}}function D(F,Z){return L(F.type,Z,F.props)}function z(F){return typeof F=="object"&&F!==null&&F.$$typeof===e}function q(F){var Z={"=":"=0",":":"=2"};return"$"+F.replace(/[=:]/g,function(ce){return Z[ce]})}var G=/\/+/g;function U(F,Z){return typeof F=="object"&&F!==null&&F.key!=null?q(""+F.key):Z.toString(36)}function Y(F){switch(F.status){case"fulfilled":return F.value;case"rejected":throw F.reason;default:switch(typeof F.status=="string"?F.then(N,N):(F.status="pending",F.then(function(Z){F.status==="pending"&&(F.status="fulfilled",F.value=Z)},function(Z){F.status==="pending"&&(F.status="rejected",F.reason=Z)})),F.status){case"fulfilled":return F.value;case"rejected":throw F.reason}}throw F}function $(F,Z,ce,B,H){var te=typeof F;(te==="undefined"||te==="boolean")&&(F=null);var he=!1;if(F===null)he=!0;else switch(te){case"bigint":case"string":case"number":he=!0;break;case"object":switch(F.$$typeof){case e:case r:he=!0;break;case h:return he=F._init,$(he(F._payload),Z,ce,B,H)}}if(he)return H=H(F),he=B===""?"."+U(F,0):B,C(H)?(ce="",he!=null&&(ce=he.replace(G,"$&/")+"/"),$(H,Z,ce,"",function(le){return le})):H!=null&&(z(H)&&(H=D(H,ce+(H.key==null||F&&F.key===H.key?"":(""+H.key).replace(G,"$&/")+"/")+he)),Z.push(H)),1;he=0;var ge=B===""?".":B+":";if(C(F))for(var W=0;W<F.length;W++)B=F[W],te=ge+U(B,W),he+=$(B,Z,ce,te,H);else if(W=y(F),typeof W=="function")for(F=W.call(F),W=0;!(B=F.next()).done;)B=B.value,te=ge+U(B,W++),he+=$(B,Z,ce,te,H);else if(te==="object"){if(typeof F.then=="function")return $(Y(F),Z,ce,B,H);throw Z=String(F),Error("Objects are not valid as a React child (found: "+(Z==="[object Object]"?"object with keys {"+Object.keys(F).join(", ")+"}":Z)+"). If you meant to render a collection of children, use an array instead.")}return he}function J(F,Z,ce){if(F==null)return F;var B=[],H=0;return $(F,B,"","",function(te){return Z.call(ce,te,H++)}),B}function re(F){if(F._status===-1){var Z=F._result;Z=Z(),Z.then(function(ce){(F._status===0||F._status===-1)&&(F._status=1,F._result=ce)},function(ce){(F._status===0||F._status===-1)&&(F._status=2,F._result=ce)}),F._status===-1&&(F._status=0,F._result=Z)}if(F._status===1)return F._result.default;throw F._result}var oe=typeof reportError=="function"?reportError:function(F){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var Z=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof F=="object"&&F!==null&&typeof F.message=="string"?String(F.message):String(F),error:F});if(!window.dispatchEvent(Z))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",F);return}console.error(F)},fe={map:J,forEach:function(F,Z,ce){J(F,function(){Z.apply(this,arguments)},ce)},count:function(F){var Z=0;return J(F,function(){Z++}),Z},toArray:function(F){return J(F,function(Z){return Z})||[]},only:function(F){if(!z(F))throw Error("React.Children.only expected to receive a single React element child.");return F}};return Ne.Activity=m,Ne.Children=fe,Ne.Component=_,Ne.Fragment=n,Ne.Profiler=i,Ne.PureComponent=O,Ne.StrictMode=a,Ne.Suspense=f,Ne.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=M,Ne.__COMPILER_RUNTIME={__proto__:null,c:function(F){return M.H.useMemoCache(F)}},Ne.cache=function(F){return function(){return F.apply(null,arguments)}},Ne.cacheSignal=function(){return null},Ne.cloneElement=function(F,Z,ce){if(F==null)throw Error("The argument must be a React element, but you passed "+F+".");var B=E({},F.props),H=F.key;if(Z!=null)for(te in Z.key!==void 0&&(H=""+Z.key),Z)!R.call(Z,te)||te==="key"||te==="__self"||te==="__source"||te==="ref"&&Z.ref===void 0||(B[te]=Z[te]);var te=arguments.length-2;if(te===1)B.children=ce;else if(1<te){for(var he=Array(te),ge=0;ge<te;ge++)he[ge]=arguments[ge+2];B.children=he}return L(F.type,H,B)},Ne.createContext=function(F){return F={$$typeof:u,_currentValue:F,_currentValue2:F,_threadCount:0,Provider:null,Consumer:null},F.Provider=F,F.Consumer={$$typeof:o,_context:F},F},Ne.createElement=function(F,Z,ce){var B,H={},te=null;if(Z!=null)for(B in Z.key!==void 0&&(te=""+Z.key),Z)R.call(Z,B)&&B!=="key"&&B!=="__self"&&B!=="__source"&&(H[B]=Z[B]);var he=arguments.length-2;if(he===1)H.children=ce;else if(1<he){for(var ge=Array(he),W=0;W<he;W++)ge[W]=arguments[W+2];H.children=ge}if(F&&F.defaultProps)for(B in he=F.defaultProps,he)H[B]===void 0&&(H[B]=he[B]);return L(F,te,H)},Ne.createRef=function(){return{current:null}},Ne.forwardRef=function(F){return{$$typeof:c,render:F}},Ne.isValidElement=z,Ne.lazy=function(F){return{$$typeof:h,_payload:{_status:-1,_result:F},_init:re}},Ne.memo=function(F,Z){return{$$typeof:d,type:F,compare:Z===void 0?null:Z}},Ne.startTransition=function(F){var Z=M.T,ce={};M.T=ce;try{var B=F(),H=M.S;H!==null&&H(ce,B),typeof B=="object"&&B!==null&&typeof B.then=="function"&&B.then(N,oe)}catch(te){oe(te)}finally{Z!==null&&ce.types!==null&&(Z.types=ce.types),M.T=Z}},Ne.unstable_useCacheRefresh=function(){return M.H.useCacheRefresh()},Ne.use=function(F){return M.H.use(F)},Ne.useActionState=function(F,Z,ce){return M.H.useActionState(F,Z,ce)},Ne.useCallback=function(F,Z){return M.H.useCallback(F,Z)},Ne.useContext=function(F){return M.H.useContext(F)},Ne.useDebugValue=function(){},Ne.useDeferredValue=function(F,Z){return M.H.useDeferredValue(F,Z)},Ne.useEffect=function(F,Z){return M.H.useEffect(F,Z)},Ne.useEffectEvent=function(F){return M.H.useEffectEvent(F)},Ne.useId=function(){return M.H.useId()},Ne.useImperativeHandle=function(F,Z,ce){return M.H.useImperativeHandle(F,Z,ce)},Ne.useInsertionEffect=function(F,Z){return M.H.useInsertionEffect(F,Z)},Ne.useLayoutEffect=function(F,Z){return M.H.useLayoutEffect(F,Z)},Ne.useMemo=function(F,Z){return M.H.useMemo(F,Z)},Ne.useOptimistic=function(F,Z){return M.H.useOptimistic(F,Z)},Ne.useReducer=function(F,Z,ce){return M.H.useReducer(F,Z,ce)},Ne.useRef=function(F){return M.H.useRef(F)},Ne.useState=function(F){return M.H.useState(F)},Ne.useSyncExternalStore=function(F,Z,ce){return M.H.useSyncExternalStore(F,Z,ce)},Ne.useTransition=function(){return M.H.useTransition()},Ne.version="19.2.4",Ne}var QC;function iu(){return QC||(QC=1,Hg.exports=zH()),Hg.exports}var k=iu();const vp=Dn(k),qH=DH({__proto__:null,default:vp},[k]);var Gg={exports:{}},ys={},Kg={exports:{}},Vg={};/**
18
+ * @license React
19
+ * scheduler.production.js
20
+ *
21
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
22
+ *
23
+ * This source code is licensed under the MIT license found in the
24
+ * LICENSE file in the root directory of this source tree.
25
+ */var JC;function BH(){return JC||(JC=1,(function(e){function r($,J){var re=$.length;$.push(J);e:for(;0<re;){var oe=re-1>>>1,fe=$[oe];if(0<i(fe,J))$[oe]=J,$[re]=fe,re=oe;else break e}}function n($){return $.length===0?null:$[0]}function a($){if($.length===0)return null;var J=$[0],re=$.pop();if(re!==J){$[0]=re;e:for(var oe=0,fe=$.length,F=fe>>>1;oe<F;){var Z=2*(oe+1)-1,ce=$[Z],B=Z+1,H=$[B];if(0>i(ce,re))B<fe&&0>i(H,ce)?($[oe]=H,$[B]=re,oe=B):($[oe]=ce,$[Z]=re,oe=Z);else if(B<fe&&0>i(H,re))$[oe]=H,$[B]=re,oe=B;else break e}}return J}function i($,J){var re=$.sortIndex-J.sortIndex;return re!==0?re:$.id-J.id}if(e.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var o=performance;e.unstable_now=function(){return o.now()}}else{var u=Date,c=u.now();e.unstable_now=function(){return u.now()-c}}var f=[],d=[],h=1,m=null,g=3,y=!1,x=!1,E=!1,w=!1,_=typeof setTimeout=="function"?setTimeout:null,A=typeof clearTimeout=="function"?clearTimeout:null,O=typeof setImmediate<"u"?setImmediate:null;function T($){for(var J=n(d);J!==null;){if(J.callback===null)a(d);else if(J.startTime<=$)a(d),J.sortIndex=J.expirationTime,r(f,J);else break;J=n(d)}}function C($){if(E=!1,T($),!x)if(n(f)!==null)x=!0,N||(N=!0,q());else{var J=n(d);J!==null&&Y(C,J.startTime-$)}}var N=!1,M=-1,R=5,L=-1;function D(){return w?!0:!(e.unstable_now()-L<R)}function z(){if(w=!1,N){var $=e.unstable_now();L=$;var J=!0;try{e:{x=!1,E&&(E=!1,A(M),M=-1),y=!0;var re=g;try{t:{for(T($),m=n(f);m!==null&&!(m.expirationTime>$&&D());){var oe=m.callback;if(typeof oe=="function"){m.callback=null,g=m.priorityLevel;var fe=oe(m.expirationTime<=$);if($=e.unstable_now(),typeof fe=="function"){m.callback=fe,T($),J=!0;break t}m===n(f)&&a(f),T($)}else a(f);m=n(f)}if(m!==null)J=!0;else{var F=n(d);F!==null&&Y(C,F.startTime-$),J=!1}}break e}finally{m=null,g=re,y=!1}J=void 0}}finally{J?q():N=!1}}}var q;if(typeof O=="function")q=function(){O(z)};else if(typeof MessageChannel<"u"){var G=new MessageChannel,U=G.port2;G.port1.onmessage=z,q=function(){U.postMessage(null)}}else q=function(){_(z,0)};function Y($,J){M=_(function(){$(e.unstable_now())},J)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function($){$.callback=null},e.unstable_forceFrameRate=function($){0>$||125<$?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):R=0<$?Math.floor(1e3/$):5},e.unstable_getCurrentPriorityLevel=function(){return g},e.unstable_next=function($){switch(g){case 1:case 2:case 3:var J=3;break;default:J=g}var re=g;g=J;try{return $()}finally{g=re}},e.unstable_requestPaint=function(){w=!0},e.unstable_runWithPriority=function($,J){switch($){case 1:case 2:case 3:case 4:case 5:break;default:$=3}var re=g;g=$;try{return J()}finally{g=re}},e.unstable_scheduleCallback=function($,J,re){var oe=e.unstable_now();switch(typeof re=="object"&&re!==null?(re=re.delay,re=typeof re=="number"&&0<re?oe+re:oe):re=oe,$){case 1:var fe=-1;break;case 2:fe=250;break;case 5:fe=1073741823;break;case 4:fe=1e4;break;default:fe=5e3}return fe=re+fe,$={id:h++,callback:J,priorityLevel:$,startTime:re,expirationTime:fe,sortIndex:-1},re>oe?($.sortIndex=re,r(d,$),n(f)===null&&$===n(d)&&(E?(A(M),M=-1):E=!0,Y(C,re-oe))):($.sortIndex=fe,r(f,$),x||y||(x=!0,N||(N=!0,q()))),$},e.unstable_shouldYield=D,e.unstable_wrapCallback=function($){var J=g;return function(){var re=g;g=J;try{return $.apply(this,arguments)}finally{g=re}}}})(Vg)),Vg}var eT;function $H(){return eT||(eT=1,Kg.exports=BH()),Kg.exports}var Yg={exports:{}},ar={};/**
26
+ * @license React
27
+ * react-dom.production.js
28
+ *
29
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
30
+ *
31
+ * This source code is licensed under the MIT license found in the
32
+ * LICENSE file in the root directory of this source tree.
33
+ */var tT;function UH(){if(tT)return ar;tT=1;var e=iu();function r(f){var d="https://react.dev/errors/"+f;if(1<arguments.length){d+="?args[]="+encodeURIComponent(arguments[1]);for(var h=2;h<arguments.length;h++)d+="&args[]="+encodeURIComponent(arguments[h])}return"Minified React error #"+f+"; visit "+d+" 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(r(522))},D:n,C:n,L:n,m:n,X:n,S:n,M:n},p:0,findDOMNode:null},i=Symbol.for("react.portal");function o(f,d,h){var m=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:i,key:m==null?null:""+m,children:f,containerInfo:d,implementation:h}}var u=e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function c(f,d){if(f==="font")return"";if(typeof d=="string")return d==="use-credentials"?d:""}return ar.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=a,ar.createPortal=function(f,d){var h=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!d||d.nodeType!==1&&d.nodeType!==9&&d.nodeType!==11)throw Error(r(299));return o(f,d,null,h)},ar.flushSync=function(f){var d=u.T,h=a.p;try{if(u.T=null,a.p=2,f)return f()}finally{u.T=d,a.p=h,a.d.f()}},ar.preconnect=function(f,d){typeof f=="string"&&(d?(d=d.crossOrigin,d=typeof d=="string"?d==="use-credentials"?d:"":void 0):d=null,a.d.C(f,d))},ar.prefetchDNS=function(f){typeof f=="string"&&a.d.D(f)},ar.preinit=function(f,d){if(typeof f=="string"&&d&&typeof d.as=="string"){var h=d.as,m=c(h,d.crossOrigin),g=typeof d.integrity=="string"?d.integrity:void 0,y=typeof d.fetchPriority=="string"?d.fetchPriority:void 0;h==="style"?a.d.S(f,typeof d.precedence=="string"?d.precedence:void 0,{crossOrigin:m,integrity:g,fetchPriority:y}):h==="script"&&a.d.X(f,{crossOrigin:m,integrity:g,fetchPriority:y,nonce:typeof d.nonce=="string"?d.nonce:void 0})}},ar.preinitModule=function(f,d){if(typeof f=="string")if(typeof d=="object"&&d!==null){if(d.as==null||d.as==="script"){var h=c(d.as,d.crossOrigin);a.d.M(f,{crossOrigin:h,integrity:typeof d.integrity=="string"?d.integrity:void 0,nonce:typeof d.nonce=="string"?d.nonce:void 0})}}else d==null&&a.d.M(f)},ar.preload=function(f,d){if(typeof f=="string"&&typeof d=="object"&&d!==null&&typeof d.as=="string"){var h=d.as,m=c(h,d.crossOrigin);a.d.L(f,h,{crossOrigin:m,integrity:typeof d.integrity=="string"?d.integrity:void 0,nonce:typeof d.nonce=="string"?d.nonce:void 0,type:typeof d.type=="string"?d.type:void 0,fetchPriority:typeof d.fetchPriority=="string"?d.fetchPriority:void 0,referrerPolicy:typeof d.referrerPolicy=="string"?d.referrerPolicy:void 0,imageSrcSet:typeof d.imageSrcSet=="string"?d.imageSrcSet:void 0,imageSizes:typeof d.imageSizes=="string"?d.imageSizes:void 0,media:typeof d.media=="string"?d.media:void 0})}},ar.preloadModule=function(f,d){if(typeof f=="string")if(d){var h=c(d.as,d.crossOrigin);a.d.m(f,{as:typeof d.as=="string"&&d.as!=="script"?d.as:void 0,crossOrigin:h,integrity:typeof d.integrity=="string"?d.integrity:void 0})}else a.d.m(f)},ar.requestFormReset=function(f){a.d.r(f)},ar.unstable_batchedUpdates=function(f,d){return f(d)},ar.useFormState=function(f,d,h){return u.H.useFormState(f,d,h)},ar.useFormStatus=function(){return u.H.useHostTransitionStatus()},ar.version="19.2.4",ar}var rT;function j6(){if(rT)return Yg.exports;rT=1;function e(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(r){console.error(r)}}return e(),Yg.exports=UH(),Yg.exports}/**
34
+ * @license React
35
+ * react-dom-client.production.js
36
+ *
37
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
38
+ *
39
+ * This source code is licensed under the MIT license found in the
40
+ * LICENSE file in the root directory of this source tree.
41
+ */var nT;function FH(){if(nT)return ys;nT=1;var e=$H(),r=iu(),n=j6();function a(l){var s="https://react.dev/errors/"+l;if(1<arguments.length){s+="?args[]="+encodeURIComponent(arguments[1]);for(var p=2;p<arguments.length;p++)s+="&args[]="+encodeURIComponent(arguments[p])}return"Minified React error #"+l+"; visit "+s+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function i(l){return!(!l||l.nodeType!==1&&l.nodeType!==9&&l.nodeType!==11)}function o(l){var s=l,p=l;if(l.alternate)for(;s.return;)s=s.return;else{l=s;do s=l,(s.flags&4098)!==0&&(p=s.return),l=s.return;while(l)}return s.tag===3?p:null}function u(l){if(l.tag===13){var s=l.memoizedState;if(s===null&&(l=l.alternate,l!==null&&(s=l.memoizedState)),s!==null)return s.dehydrated}return null}function c(l){if(l.tag===31){var s=l.memoizedState;if(s===null&&(l=l.alternate,l!==null&&(s=l.memoizedState)),s!==null)return s.dehydrated}return null}function f(l){if(o(l)!==l)throw Error(a(188))}function d(l){var s=l.alternate;if(!s){if(s=o(l),s===null)throw Error(a(188));return s!==l?null:l}for(var p=l,v=s;;){var S=p.return;if(S===null)break;var j=S.alternate;if(j===null){if(v=S.return,v!==null){p=v;continue}break}if(S.child===j.child){for(j=S.child;j;){if(j===p)return f(S),l;if(j===v)return f(S),s;j=j.sibling}throw Error(a(188))}if(p.return!==v.return)p=S,v=j;else{for(var P=!1,I=S.child;I;){if(I===p){P=!0,p=S,v=j;break}if(I===v){P=!0,v=S,p=j;break}I=I.sibling}if(!P){for(I=j.child;I;){if(I===p){P=!0,p=j,v=S;break}if(I===v){P=!0,v=j,p=S;break}I=I.sibling}if(!P)throw Error(a(189))}}if(p.alternate!==v)throw Error(a(190))}if(p.tag!==3)throw Error(a(188));return p.stateNode.current===p?l:s}function h(l){var s=l.tag;if(s===5||s===26||s===27||s===6)return l;for(l=l.child;l!==null;){if(s=h(l),s!==null)return s;l=l.sibling}return null}var m=Object.assign,g=Symbol.for("react.element"),y=Symbol.for("react.transitional.element"),x=Symbol.for("react.portal"),E=Symbol.for("react.fragment"),w=Symbol.for("react.strict_mode"),_=Symbol.for("react.profiler"),A=Symbol.for("react.consumer"),O=Symbol.for("react.context"),T=Symbol.for("react.forward_ref"),C=Symbol.for("react.suspense"),N=Symbol.for("react.suspense_list"),M=Symbol.for("react.memo"),R=Symbol.for("react.lazy"),L=Symbol.for("react.activity"),D=Symbol.for("react.memo_cache_sentinel"),z=Symbol.iterator;function q(l){return l===null||typeof l!="object"?null:(l=z&&l[z]||l["@@iterator"],typeof l=="function"?l:null)}var G=Symbol.for("react.client.reference");function U(l){if(l==null)return null;if(typeof l=="function")return l.$$typeof===G?null:l.displayName||l.name||null;if(typeof l=="string")return l;switch(l){case E:return"Fragment";case _:return"Profiler";case w:return"StrictMode";case C:return"Suspense";case N:return"SuspenseList";case L:return"Activity"}if(typeof l=="object")switch(l.$$typeof){case x:return"Portal";case O:return l.displayName||"Context";case A:return(l._context.displayName||"Context")+".Consumer";case T:var s=l.render;return l=l.displayName,l||(l=s.displayName||s.name||"",l=l!==""?"ForwardRef("+l+")":"ForwardRef"),l;case M:return s=l.displayName||null,s!==null?s:U(l.type)||"Memo";case R:s=l._payload,l=l._init;try{return U(l(s))}catch{}}return null}var Y=Array.isArray,$=r.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,J=n.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,re={pending:!1,data:null,method:null,action:null},oe=[],fe=-1;function F(l){return{current:l}}function Z(l){0>fe||(l.current=oe[fe],oe[fe]=null,fe--)}function ce(l,s){fe++,oe[fe]=l.current,l.current=s}var B=F(null),H=F(null),te=F(null),he=F(null);function ge(l,s){switch(ce(te,s),ce(H,l),ce(B,null),s.nodeType){case 9:case 11:l=(l=s.documentElement)&&(l=l.namespaceURI)?yC(l):0;break;default:if(l=s.tagName,s=s.namespaceURI)s=yC(s),l=bC(s,l);else switch(l){case"svg":l=1;break;case"math":l=2;break;default:l=0}}Z(B),ce(B,l)}function W(){Z(B),Z(H),Z(te)}function le(l){l.memoizedState!==null&&ce(he,l);var s=B.current,p=bC(s,l.type);s!==p&&(ce(H,l),ce(B,p))}function ye(l){H.current===l&&(Z(B),Z(H)),he.current===l&&(Z(he),hs._currentValue=re)}var K,be;function ve(l){if(K===void 0)try{throw Error()}catch(p){var s=p.stack.trim().match(/\n( *(at )?)/);K=s&&s[1]||"",be=-1<p.stack.indexOf(`
42
+ at`)?" (<anonymous>)":-1<p.stack.indexOf("@")?"@unknown:0:0":""}return`
43
+ `+K+l+be}var _e=!1;function $e(l,s){if(!l||_e)return"";_e=!0;var p=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var v={DetermineComponentFrameRoot:function(){try{if(s){var me=function(){throw Error()};if(Object.defineProperty(me.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(me,[])}catch(se){var ie=se}Reflect.construct(l,[],me)}else{try{me.call()}catch(se){ie=se}l.call(me.prototype)}}else{try{throw Error()}catch(se){ie=se}(me=l())&&typeof me.catch=="function"&&me.catch(function(){})}}catch(se){if(se&&ie&&typeof se.stack=="string")return[se.stack,ie.stack]}return[null,null]}};v.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var S=Object.getOwnPropertyDescriptor(v.DetermineComponentFrameRoot,"name");S&&S.configurable&&Object.defineProperty(v.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var j=v.DetermineComponentFrameRoot(),P=j[0],I=j[1];if(P&&I){var V=P.split(`
44
+ `),ae=I.split(`
45
+ `);for(S=v=0;v<V.length&&!V[v].includes("DetermineComponentFrameRoot");)v++;for(;S<ae.length&&!ae[S].includes("DetermineComponentFrameRoot");)S++;if(v===V.length||S===ae.length)for(v=V.length-1,S=ae.length-1;1<=v&&0<=S&&V[v]!==ae[S];)S--;for(;1<=v&&0<=S;v--,S--)if(V[v]!==ae[S]){if(v!==1||S!==1)do if(v--,S--,0>S||V[v]!==ae[S]){var de=`
46
+ `+V[v].replace(" at new "," at ");return l.displayName&&de.includes("<anonymous>")&&(de=de.replace("<anonymous>",l.displayName)),de}while(1<=v&&0<=S);break}}}finally{_e=!1,Error.prepareStackTrace=p}return(p=l?l.displayName||l.name:"")?ve(p):""}function Te(l,s){switch(l.tag){case 26:case 27:case 5:return ve(l.type);case 16:return ve("Lazy");case 13:return l.child!==s&&s!==null?ve("Suspense Fallback"):ve("Suspense");case 19:return ve("SuspenseList");case 0:case 15:return $e(l.type,!1);case 11:return $e(l.type.render,!1);case 1:return $e(l.type,!0);case 31:return ve("Activity");default:return""}}function at(l){try{var s="",p=null;do s+=Te(l,p),p=l,l=l.return;while(l);return s}catch(v){return`
47
+ Error generating stack: `+v.message+`
48
+ `+v.stack}}var Yr=Object.prototype.hasOwnProperty,Su=e.unstable_scheduleCallback,li=e.unstable_cancelCallback,qn=e.unstable_shouldYield,nr=e.unstable_requestPaint,It=e.unstable_now,Yo=e.unstable_getCurrentPriorityLevel,Qc=e.unstable_ImmediatePriority,Eu=e.unstable_UserBlockingPriority,Sn=e.unstable_NormalPriority,Jc=e.unstable_LowPriority,ku=e.unstable_IdlePriority,Cm=e.log,ef=e.unstable_setDisableYieldValue,xr=null,_t=null;function ui(l){if(typeof Cm=="function"&&ef(l),_t&&typeof _t.setStrictMode=="function")try{_t.setStrictMode(xr,l)}catch{}}var Pr=Math.clz32?Math.clz32:bU,gU=Math.log,yU=Math.LN2;function bU(l){return l>>>=0,l===0?32:31-(gU(l)/yU|0)|0}var tf=256,rf=262144,nf=4194304;function Xi(l){var s=l&42;if(s!==0)return s;switch(l&-l){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return l&261888;case 262144:case 524288:case 1048576:case 2097152:return l&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return l&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return l}}function af(l,s,p){var v=l.pendingLanes;if(v===0)return 0;var S=0,j=l.suspendedLanes,P=l.pingedLanes;l=l.warmLanes;var I=v&134217727;return I!==0?(v=I&~j,v!==0?S=Xi(v):(P&=I,P!==0?S=Xi(P):p||(p=I&~l,p!==0&&(S=Xi(p))))):(I=v&~j,I!==0?S=Xi(I):P!==0?S=Xi(P):p||(p=v&~l,p!==0&&(S=Xi(p)))),S===0?0:s!==0&&s!==S&&(s&j)===0&&(j=S&-S,p=s&-s,j>=p||j===32&&(p&4194048)!==0)?s:S}function ju(l,s){return(l.pendingLanes&~(l.suspendedLanes&~l.pingedLanes)&s)===0}function xU(l,s){switch(l){case 1:case 2:case 4:case 8:case 64:return s+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 s+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 Jk(){var l=nf;return nf<<=1,(nf&62914560)===0&&(nf=4194304),l}function Tm(l){for(var s=[],p=0;31>p;p++)s.push(l);return s}function Au(l,s){l.pendingLanes|=s,s!==268435456&&(l.suspendedLanes=0,l.pingedLanes=0,l.warmLanes=0)}function _U(l,s,p,v,S,j){var P=l.pendingLanes;l.pendingLanes=p,l.suspendedLanes=0,l.pingedLanes=0,l.warmLanes=0,l.expiredLanes&=p,l.entangledLanes&=p,l.errorRecoveryDisabledLanes&=p,l.shellSuspendCounter=0;var I=l.entanglements,V=l.expirationTimes,ae=l.hiddenUpdates;for(p=P&~p;0<p;){var de=31-Pr(p),me=1<<de;I[de]=0,V[de]=-1;var ie=ae[de];if(ie!==null)for(ae[de]=null,de=0;de<ie.length;de++){var se=ie[de];se!==null&&(se.lane&=-536870913)}p&=~me}v!==0&&ej(l,v,0),j!==0&&S===0&&l.tag!==0&&(l.suspendedLanes|=j&~(P&~s))}function ej(l,s,p){l.pendingLanes|=s,l.suspendedLanes&=~s;var v=31-Pr(s);l.entangledLanes|=s,l.entanglements[v]=l.entanglements[v]|1073741824|p&261930}function tj(l,s){var p=l.entangledLanes|=s;for(l=l.entanglements;p;){var v=31-Pr(p),S=1<<v;S&s|l[v]&s&&(l[v]|=s),p&=~S}}function rj(l,s){var p=s&-s;return p=(p&42)!==0?1:Nm(p),(p&(l.suspendedLanes|s))!==0?0:p}function Nm(l){switch(l){case 2:l=1;break;case 8:l=4;break;case 32:l=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:l=128;break;case 268435456:l=134217728;break;default:l=0}return l}function Mm(l){return l&=-l,2<l?8<l?(l&134217727)!==0?32:268435456:8:2}function nj(){var l=J.p;return l!==0?l:(l=window.event,l===void 0?32:UC(l.type))}function aj(l,s){var p=J.p;try{return J.p=l,s()}finally{J.p=p}}var si=Math.random().toString(36).slice(2),Kt="__reactFiber$"+si,_r="__reactProps$"+si,Xo="__reactContainer$"+si,Pm="__reactEvents$"+si,wU="__reactListeners$"+si,SU="__reactHandles$"+si,ij="__reactResources$"+si,Ou="__reactMarker$"+si;function Rm(l){delete l[Kt],delete l[_r],delete l[Pm],delete l[wU],delete l[SU]}function Wo(l){var s=l[Kt];if(s)return s;for(var p=l.parentNode;p;){if(s=p[Xo]||p[Kt]){if(p=s.alternate,s.child!==null||p!==null&&p.child!==null)for(l=jC(l);l!==null;){if(p=l[Kt])return p;l=jC(l)}return s}l=p,p=l.parentNode}return null}function Zo(l){if(l=l[Kt]||l[Xo]){var s=l.tag;if(s===5||s===6||s===13||s===31||s===26||s===27||s===3)return l}return null}function Cu(l){var s=l.tag;if(s===5||s===26||s===27||s===6)return l.stateNode;throw Error(a(33))}function Qo(l){var s=l[ij];return s||(s=l[ij]={hoistableStyles:new Map,hoistableScripts:new Map}),s}function zt(l){l[Ou]=!0}var oj=new Set,lj={};function Wi(l,s){Jo(l,s),Jo(l+"Capture",s)}function Jo(l,s){for(lj[l]=s,l=0;l<s.length;l++)oj.add(s[l])}var EU=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]*$"),uj={},sj={};function kU(l){return Yr.call(sj,l)?!0:Yr.call(uj,l)?!1:EU.test(l)?sj[l]=!0:(uj[l]=!0,!1)}function of(l,s,p){if(kU(s))if(p===null)l.removeAttribute(s);else{switch(typeof p){case"undefined":case"function":case"symbol":l.removeAttribute(s);return;case"boolean":var v=s.toLowerCase().slice(0,5);if(v!=="data-"&&v!=="aria-"){l.removeAttribute(s);return}}l.setAttribute(s,""+p)}}function lf(l,s,p){if(p===null)l.removeAttribute(s);else{switch(typeof p){case"undefined":case"function":case"symbol":case"boolean":l.removeAttribute(s);return}l.setAttribute(s,""+p)}}function pa(l,s,p,v){if(v===null)l.removeAttribute(p);else{switch(typeof v){case"undefined":case"function":case"symbol":case"boolean":l.removeAttribute(p);return}l.setAttributeNS(s,p,""+v)}}function Xr(l){switch(typeof l){case"bigint":case"boolean":case"number":case"string":case"undefined":return l;case"object":return l;default:return""}}function cj(l){var s=l.type;return(l=l.nodeName)&&l.toLowerCase()==="input"&&(s==="checkbox"||s==="radio")}function jU(l,s,p){var v=Object.getOwnPropertyDescriptor(l.constructor.prototype,s);if(!l.hasOwnProperty(s)&&typeof v<"u"&&typeof v.get=="function"&&typeof v.set=="function"){var S=v.get,j=v.set;return Object.defineProperty(l,s,{configurable:!0,get:function(){return S.call(this)},set:function(P){p=""+P,j.call(this,P)}}),Object.defineProperty(l,s,{enumerable:v.enumerable}),{getValue:function(){return p},setValue:function(P){p=""+P},stopTracking:function(){l._valueTracker=null,delete l[s]}}}}function Dm(l){if(!l._valueTracker){var s=cj(l)?"checked":"value";l._valueTracker=jU(l,s,""+l[s])}}function fj(l){if(!l)return!1;var s=l._valueTracker;if(!s)return!0;var p=s.getValue(),v="";return l&&(v=cj(l)?l.checked?"true":"false":l.value),l=v,l!==p?(s.setValue(l),!0):!1}function uf(l){if(l=l||(typeof document<"u"?document:void 0),typeof l>"u")return null;try{return l.activeElement||l.body}catch{return l.body}}var AU=/[\n"\\]/g;function Wr(l){return l.replace(AU,function(s){return"\\"+s.charCodeAt(0).toString(16)+" "})}function Lm(l,s,p,v,S,j,P,I){l.name="",P!=null&&typeof P!="function"&&typeof P!="symbol"&&typeof P!="boolean"?l.type=P:l.removeAttribute("type"),s!=null?P==="number"?(s===0&&l.value===""||l.value!=s)&&(l.value=""+Xr(s)):l.value!==""+Xr(s)&&(l.value=""+Xr(s)):P!=="submit"&&P!=="reset"||l.removeAttribute("value"),s!=null?Im(l,P,Xr(s)):p!=null?Im(l,P,Xr(p)):v!=null&&l.removeAttribute("value"),S==null&&j!=null&&(l.defaultChecked=!!j),S!=null&&(l.checked=S&&typeof S!="function"&&typeof S!="symbol"),I!=null&&typeof I!="function"&&typeof I!="symbol"&&typeof I!="boolean"?l.name=""+Xr(I):l.removeAttribute("name")}function dj(l,s,p,v,S,j,P,I){if(j!=null&&typeof j!="function"&&typeof j!="symbol"&&typeof j!="boolean"&&(l.type=j),s!=null||p!=null){if(!(j!=="submit"&&j!=="reset"||s!=null)){Dm(l);return}p=p!=null?""+Xr(p):"",s=s!=null?""+Xr(s):p,I||s===l.value||(l.value=s),l.defaultValue=s}v=v??S,v=typeof v!="function"&&typeof v!="symbol"&&!!v,l.checked=I?l.checked:!!v,l.defaultChecked=!!v,P!=null&&typeof P!="function"&&typeof P!="symbol"&&typeof P!="boolean"&&(l.name=P),Dm(l)}function Im(l,s,p){s==="number"&&uf(l.ownerDocument)===l||l.defaultValue===""+p||(l.defaultValue=""+p)}function el(l,s,p,v){if(l=l.options,s){s={};for(var S=0;S<p.length;S++)s["$"+p[S]]=!0;for(p=0;p<l.length;p++)S=s.hasOwnProperty("$"+l[p].value),l[p].selected!==S&&(l[p].selected=S),S&&v&&(l[p].defaultSelected=!0)}else{for(p=""+Xr(p),s=null,S=0;S<l.length;S++){if(l[S].value===p){l[S].selected=!0,v&&(l[S].defaultSelected=!0);return}s!==null||l[S].disabled||(s=l[S])}s!==null&&(s.selected=!0)}}function hj(l,s,p){if(s!=null&&(s=""+Xr(s),s!==l.value&&(l.value=s),p==null)){l.defaultValue!==s&&(l.defaultValue=s);return}l.defaultValue=p!=null?""+Xr(p):""}function pj(l,s,p,v){if(s==null){if(v!=null){if(p!=null)throw Error(a(92));if(Y(v)){if(1<v.length)throw Error(a(93));v=v[0]}p=v}p==null&&(p=""),s=p}p=Xr(s),l.defaultValue=p,v=l.textContent,v===p&&v!==""&&v!==null&&(l.value=v),Dm(l)}function tl(l,s){if(s){var p=l.firstChild;if(p&&p===l.lastChild&&p.nodeType===3){p.nodeValue=s;return}}l.textContent=s}var OU=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 mj(l,s,p){var v=s.indexOf("--")===0;p==null||typeof p=="boolean"||p===""?v?l.setProperty(s,""):s==="float"?l.cssFloat="":l[s]="":v?l.setProperty(s,p):typeof p!="number"||p===0||OU.has(s)?s==="float"?l.cssFloat=p:l[s]=(""+p).trim():l[s]=p+"px"}function vj(l,s,p){if(s!=null&&typeof s!="object")throw Error(a(62));if(l=l.style,p!=null){for(var v in p)!p.hasOwnProperty(v)||s!=null&&s.hasOwnProperty(v)||(v.indexOf("--")===0?l.setProperty(v,""):v==="float"?l.cssFloat="":l[v]="");for(var S in s)v=s[S],s.hasOwnProperty(S)&&p[S]!==v&&mj(l,S,v)}else for(var j in s)s.hasOwnProperty(j)&&mj(l,j,s[j])}function zm(l){if(l.indexOf("-")===-1)return!1;switch(l){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 CU=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"]]),TU=/^[\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 sf(l){return TU.test(""+l)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":l}function ma(){}var qm=null;function Bm(l){return l=l.target||l.srcElement||window,l.correspondingUseElement&&(l=l.correspondingUseElement),l.nodeType===3?l.parentNode:l}var rl=null,nl=null;function gj(l){var s=Zo(l);if(s&&(l=s.stateNode)){var p=l[_r]||null;e:switch(l=s.stateNode,s.type){case"input":if(Lm(l,p.value,p.defaultValue,p.defaultValue,p.checked,p.defaultChecked,p.type,p.name),s=p.name,p.type==="radio"&&s!=null){for(p=l;p.parentNode;)p=p.parentNode;for(p=p.querySelectorAll('input[name="'+Wr(""+s)+'"][type="radio"]'),s=0;s<p.length;s++){var v=p[s];if(v!==l&&v.form===l.form){var S=v[_r]||null;if(!S)throw Error(a(90));Lm(v,S.value,S.defaultValue,S.defaultValue,S.checked,S.defaultChecked,S.type,S.name)}}for(s=0;s<p.length;s++)v=p[s],v.form===l.form&&fj(v)}break e;case"textarea":hj(l,p.value,p.defaultValue);break e;case"select":s=p.value,s!=null&&el(l,!!p.multiple,s,!1)}}}var $m=!1;function yj(l,s,p){if($m)return l(s,p);$m=!0;try{var v=l(s);return v}finally{if($m=!1,(rl!==null||nl!==null)&&(Wf(),rl&&(s=rl,l=nl,nl=rl=null,gj(s),l)))for(s=0;s<l.length;s++)gj(l[s])}}function Tu(l,s){var p=l.stateNode;if(p===null)return null;var v=p[_r]||null;if(v===null)return null;p=v[s];e:switch(s){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(v=!v.disabled)||(l=l.type,v=!(l==="button"||l==="input"||l==="select"||l==="textarea")),l=!v;break e;default:l=!1}if(l)return null;if(p&&typeof p!="function")throw Error(a(231,s,typeof p));return p}var va=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Um=!1;if(va)try{var Nu={};Object.defineProperty(Nu,"passive",{get:function(){Um=!0}}),window.addEventListener("test",Nu,Nu),window.removeEventListener("test",Nu,Nu)}catch{Um=!1}var ci=null,Fm=null,cf=null;function bj(){if(cf)return cf;var l,s=Fm,p=s.length,v,S="value"in ci?ci.value:ci.textContent,j=S.length;for(l=0;l<p&&s[l]===S[l];l++);var P=p-l;for(v=1;v<=P&&s[p-v]===S[j-v];v++);return cf=S.slice(l,1<v?1-v:void 0)}function ff(l){var s=l.keyCode;return"charCode"in l?(l=l.charCode,l===0&&s===13&&(l=13)):l=s,l===10&&(l=13),32<=l||l===13?l:0}function df(){return!0}function xj(){return!1}function wr(l){function s(p,v,S,j,P){this._reactName=p,this._targetInst=S,this.type=v,this.nativeEvent=j,this.target=P,this.currentTarget=null;for(var I in l)l.hasOwnProperty(I)&&(p=l[I],this[I]=p?p(j):j[I]);return this.isDefaultPrevented=(j.defaultPrevented!=null?j.defaultPrevented:j.returnValue===!1)?df:xj,this.isPropagationStopped=xj,this}return m(s.prototype,{preventDefault:function(){this.defaultPrevented=!0;var p=this.nativeEvent;p&&(p.preventDefault?p.preventDefault():typeof p.returnValue!="unknown"&&(p.returnValue=!1),this.isDefaultPrevented=df)},stopPropagation:function(){var p=this.nativeEvent;p&&(p.stopPropagation?p.stopPropagation():typeof p.cancelBubble!="unknown"&&(p.cancelBubble=!0),this.isPropagationStopped=df)},persist:function(){},isPersistent:df}),s}var Zi={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(l){return l.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},hf=wr(Zi),Mu=m({},Zi,{view:0,detail:0}),NU=wr(Mu),Hm,Gm,Pu,pf=m({},Mu,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Vm,button:0,buttons:0,relatedTarget:function(l){return l.relatedTarget===void 0?l.fromElement===l.srcElement?l.toElement:l.fromElement:l.relatedTarget},movementX:function(l){return"movementX"in l?l.movementX:(l!==Pu&&(Pu&&l.type==="mousemove"?(Hm=l.screenX-Pu.screenX,Gm=l.screenY-Pu.screenY):Gm=Hm=0,Pu=l),Hm)},movementY:function(l){return"movementY"in l?l.movementY:Gm}}),_j=wr(pf),MU=m({},pf,{dataTransfer:0}),PU=wr(MU),RU=m({},Mu,{relatedTarget:0}),Km=wr(RU),DU=m({},Zi,{animationName:0,elapsedTime:0,pseudoElement:0}),LU=wr(DU),IU=m({},Zi,{clipboardData:function(l){return"clipboardData"in l?l.clipboardData:window.clipboardData}}),zU=wr(IU),qU=m({},Zi,{data:0}),wj=wr(qU),BU={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},$U={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"},UU={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function FU(l){var s=this.nativeEvent;return s.getModifierState?s.getModifierState(l):(l=UU[l])?!!s[l]:!1}function Vm(){return FU}var HU=m({},Mu,{key:function(l){if(l.key){var s=BU[l.key]||l.key;if(s!=="Unidentified")return s}return l.type==="keypress"?(l=ff(l),l===13?"Enter":String.fromCharCode(l)):l.type==="keydown"||l.type==="keyup"?$U[l.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Vm,charCode:function(l){return l.type==="keypress"?ff(l):0},keyCode:function(l){return l.type==="keydown"||l.type==="keyup"?l.keyCode:0},which:function(l){return l.type==="keypress"?ff(l):l.type==="keydown"||l.type==="keyup"?l.keyCode:0}}),GU=wr(HU),KU=m({},pf,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Sj=wr(KU),VU=m({},Mu,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Vm}),YU=wr(VU),XU=m({},Zi,{propertyName:0,elapsedTime:0,pseudoElement:0}),WU=wr(XU),ZU=m({},pf,{deltaX:function(l){return"deltaX"in l?l.deltaX:"wheelDeltaX"in l?-l.wheelDeltaX:0},deltaY:function(l){return"deltaY"in l?l.deltaY:"wheelDeltaY"in l?-l.wheelDeltaY:"wheelDelta"in l?-l.wheelDelta:0},deltaZ:0,deltaMode:0}),QU=wr(ZU),JU=m({},Zi,{newState:0,oldState:0}),eF=wr(JU),tF=[9,13,27,32],Ym=va&&"CompositionEvent"in window,Ru=null;va&&"documentMode"in document&&(Ru=document.documentMode);var rF=va&&"TextEvent"in window&&!Ru,Ej=va&&(!Ym||Ru&&8<Ru&&11>=Ru),kj=" ",jj=!1;function Aj(l,s){switch(l){case"keyup":return tF.indexOf(s.keyCode)!==-1;case"keydown":return s.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Oj(l){return l=l.detail,typeof l=="object"&&"data"in l?l.data:null}var al=!1;function nF(l,s){switch(l){case"compositionend":return Oj(s);case"keypress":return s.which!==32?null:(jj=!0,kj);case"textInput":return l=s.data,l===kj&&jj?null:l;default:return null}}function aF(l,s){if(al)return l==="compositionend"||!Ym&&Aj(l,s)?(l=bj(),cf=Fm=ci=null,al=!1,l):null;switch(l){case"paste":return null;case"keypress":if(!(s.ctrlKey||s.altKey||s.metaKey)||s.ctrlKey&&s.altKey){if(s.char&&1<s.char.length)return s.char;if(s.which)return String.fromCharCode(s.which)}return null;case"compositionend":return Ej&&s.locale!=="ko"?null:s.data;default:return null}}var iF={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 Cj(l){var s=l&&l.nodeName&&l.nodeName.toLowerCase();return s==="input"?!!iF[l.type]:s==="textarea"}function Tj(l,s,p,v){rl?nl?nl.push(v):nl=[v]:rl=v,s=nd(s,"onChange"),0<s.length&&(p=new hf("onChange","change",null,p,v),l.push({event:p,listeners:s}))}var Du=null,Lu=null;function oF(l){dC(l,0)}function mf(l){var s=Cu(l);if(fj(s))return l}function Nj(l,s){if(l==="change")return s}var Mj=!1;if(va){var Xm;if(va){var Wm="oninput"in document;if(!Wm){var Pj=document.createElement("div");Pj.setAttribute("oninput","return;"),Wm=typeof Pj.oninput=="function"}Xm=Wm}else Xm=!1;Mj=Xm&&(!document.documentMode||9<document.documentMode)}function Rj(){Du&&(Du.detachEvent("onpropertychange",Dj),Lu=Du=null)}function Dj(l){if(l.propertyName==="value"&&mf(Lu)){var s=[];Tj(s,Lu,l,Bm(l)),yj(oF,s)}}function lF(l,s,p){l==="focusin"?(Rj(),Du=s,Lu=p,Du.attachEvent("onpropertychange",Dj)):l==="focusout"&&Rj()}function uF(l){if(l==="selectionchange"||l==="keyup"||l==="keydown")return mf(Lu)}function sF(l,s){if(l==="click")return mf(s)}function cF(l,s){if(l==="input"||l==="change")return mf(s)}function fF(l,s){return l===s&&(l!==0||1/l===1/s)||l!==l&&s!==s}var Rr=typeof Object.is=="function"?Object.is:fF;function Iu(l,s){if(Rr(l,s))return!0;if(typeof l!="object"||l===null||typeof s!="object"||s===null)return!1;var p=Object.keys(l),v=Object.keys(s);if(p.length!==v.length)return!1;for(v=0;v<p.length;v++){var S=p[v];if(!Yr.call(s,S)||!Rr(l[S],s[S]))return!1}return!0}function Lj(l){for(;l&&l.firstChild;)l=l.firstChild;return l}function Ij(l,s){var p=Lj(l);l=0;for(var v;p;){if(p.nodeType===3){if(v=l+p.textContent.length,l<=s&&v>=s)return{node:p,offset:s-l};l=v}e:{for(;p;){if(p.nextSibling){p=p.nextSibling;break e}p=p.parentNode}p=void 0}p=Lj(p)}}function zj(l,s){return l&&s?l===s?!0:l&&l.nodeType===3?!1:s&&s.nodeType===3?zj(l,s.parentNode):"contains"in l?l.contains(s):l.compareDocumentPosition?!!(l.compareDocumentPosition(s)&16):!1:!1}function qj(l){l=l!=null&&l.ownerDocument!=null&&l.ownerDocument.defaultView!=null?l.ownerDocument.defaultView:window;for(var s=uf(l.document);s instanceof l.HTMLIFrameElement;){try{var p=typeof s.contentWindow.location.href=="string"}catch{p=!1}if(p)l=s.contentWindow;else break;s=uf(l.document)}return s}function Zm(l){var s=l&&l.nodeName&&l.nodeName.toLowerCase();return s&&(s==="input"&&(l.type==="text"||l.type==="search"||l.type==="tel"||l.type==="url"||l.type==="password")||s==="textarea"||l.contentEditable==="true")}var dF=va&&"documentMode"in document&&11>=document.documentMode,il=null,Qm=null,zu=null,Jm=!1;function Bj(l,s,p){var v=p.window===p?p.document:p.nodeType===9?p:p.ownerDocument;Jm||il==null||il!==uf(v)||(v=il,"selectionStart"in v&&Zm(v)?v={start:v.selectionStart,end:v.selectionEnd}:(v=(v.ownerDocument&&v.ownerDocument.defaultView||window).getSelection(),v={anchorNode:v.anchorNode,anchorOffset:v.anchorOffset,focusNode:v.focusNode,focusOffset:v.focusOffset}),zu&&Iu(zu,v)||(zu=v,v=nd(Qm,"onSelect"),0<v.length&&(s=new hf("onSelect","select",null,s,p),l.push({event:s,listeners:v}),s.target=il)))}function Qi(l,s){var p={};return p[l.toLowerCase()]=s.toLowerCase(),p["Webkit"+l]="webkit"+s,p["Moz"+l]="moz"+s,p}var ol={animationend:Qi("Animation","AnimationEnd"),animationiteration:Qi("Animation","AnimationIteration"),animationstart:Qi("Animation","AnimationStart"),transitionrun:Qi("Transition","TransitionRun"),transitionstart:Qi("Transition","TransitionStart"),transitioncancel:Qi("Transition","TransitionCancel"),transitionend:Qi("Transition","TransitionEnd")},ev={},$j={};va&&($j=document.createElement("div").style,"AnimationEvent"in window||(delete ol.animationend.animation,delete ol.animationiteration.animation,delete ol.animationstart.animation),"TransitionEvent"in window||delete ol.transitionend.transition);function Ji(l){if(ev[l])return ev[l];if(!ol[l])return l;var s=ol[l],p;for(p in s)if(s.hasOwnProperty(p)&&p in $j)return ev[l]=s[p];return l}var Uj=Ji("animationend"),Fj=Ji("animationiteration"),Hj=Ji("animationstart"),hF=Ji("transitionrun"),pF=Ji("transitionstart"),mF=Ji("transitioncancel"),Gj=Ji("transitionend"),Kj=new Map,tv="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(" ");tv.push("scrollEnd");function En(l,s){Kj.set(l,s),Wi(s,[l])}var vf=typeof reportError=="function"?reportError:function(l){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var s=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof l=="object"&&l!==null&&typeof l.message=="string"?String(l.message):String(l),error:l});if(!window.dispatchEvent(s))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",l);return}console.error(l)},Zr=[],ll=0,rv=0;function gf(){for(var l=ll,s=rv=ll=0;s<l;){var p=Zr[s];Zr[s++]=null;var v=Zr[s];Zr[s++]=null;var S=Zr[s];Zr[s++]=null;var j=Zr[s];if(Zr[s++]=null,v!==null&&S!==null){var P=v.pending;P===null?S.next=S:(S.next=P.next,P.next=S),v.pending=S}j!==0&&Vj(p,S,j)}}function yf(l,s,p,v){Zr[ll++]=l,Zr[ll++]=s,Zr[ll++]=p,Zr[ll++]=v,rv|=v,l.lanes|=v,l=l.alternate,l!==null&&(l.lanes|=v)}function nv(l,s,p,v){return yf(l,s,p,v),bf(l)}function eo(l,s){return yf(l,null,null,s),bf(l)}function Vj(l,s,p){l.lanes|=p;var v=l.alternate;v!==null&&(v.lanes|=p);for(var S=!1,j=l.return;j!==null;)j.childLanes|=p,v=j.alternate,v!==null&&(v.childLanes|=p),j.tag===22&&(l=j.stateNode,l===null||l._visibility&1||(S=!0)),l=j,j=j.return;return l.tag===3?(j=l.stateNode,S&&s!==null&&(S=31-Pr(p),l=j.hiddenUpdates,v=l[S],v===null?l[S]=[s]:v.push(s),s.lane=p|536870912),j):null}function bf(l){if(50<os)throw os=0,dg=null,Error(a(185));for(var s=l.return;s!==null;)l=s,s=l.return;return l.tag===3?l.stateNode:null}var ul={};function vF(l,s,p,v){this.tag=l,this.key=p,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=s,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=v,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Dr(l,s,p,v){return new vF(l,s,p,v)}function av(l){return l=l.prototype,!(!l||!l.isReactComponent)}function ga(l,s){var p=l.alternate;return p===null?(p=Dr(l.tag,s,l.key,l.mode),p.elementType=l.elementType,p.type=l.type,p.stateNode=l.stateNode,p.alternate=l,l.alternate=p):(p.pendingProps=s,p.type=l.type,p.flags=0,p.subtreeFlags=0,p.deletions=null),p.flags=l.flags&65011712,p.childLanes=l.childLanes,p.lanes=l.lanes,p.child=l.child,p.memoizedProps=l.memoizedProps,p.memoizedState=l.memoizedState,p.updateQueue=l.updateQueue,s=l.dependencies,p.dependencies=s===null?null:{lanes:s.lanes,firstContext:s.firstContext},p.sibling=l.sibling,p.index=l.index,p.ref=l.ref,p.refCleanup=l.refCleanup,p}function Yj(l,s){l.flags&=65011714;var p=l.alternate;return p===null?(l.childLanes=0,l.lanes=s,l.child=null,l.subtreeFlags=0,l.memoizedProps=null,l.memoizedState=null,l.updateQueue=null,l.dependencies=null,l.stateNode=null):(l.childLanes=p.childLanes,l.lanes=p.lanes,l.child=p.child,l.subtreeFlags=0,l.deletions=null,l.memoizedProps=p.memoizedProps,l.memoizedState=p.memoizedState,l.updateQueue=p.updateQueue,l.type=p.type,s=p.dependencies,l.dependencies=s===null?null:{lanes:s.lanes,firstContext:s.firstContext}),l}function xf(l,s,p,v,S,j){var P=0;if(v=l,typeof l=="function")av(l)&&(P=1);else if(typeof l=="string")P=_H(l,p,B.current)?26:l==="html"||l==="head"||l==="body"?27:5;else e:switch(l){case L:return l=Dr(31,p,s,S),l.elementType=L,l.lanes=j,l;case E:return to(p.children,S,j,s);case w:P=8,S|=24;break;case _:return l=Dr(12,p,s,S|2),l.elementType=_,l.lanes=j,l;case C:return l=Dr(13,p,s,S),l.elementType=C,l.lanes=j,l;case N:return l=Dr(19,p,s,S),l.elementType=N,l.lanes=j,l;default:if(typeof l=="object"&&l!==null)switch(l.$$typeof){case O:P=10;break e;case A:P=9;break e;case T:P=11;break e;case M:P=14;break e;case R:P=16,v=null;break e}P=29,p=Error(a(130,l===null?"null":typeof l,"")),v=null}return s=Dr(P,p,s,S),s.elementType=l,s.type=v,s.lanes=j,s}function to(l,s,p,v){return l=Dr(7,l,v,s),l.lanes=p,l}function iv(l,s,p){return l=Dr(6,l,null,s),l.lanes=p,l}function Xj(l){var s=Dr(18,null,null,0);return s.stateNode=l,s}function ov(l,s,p){return s=Dr(4,l.children!==null?l.children:[],l.key,s),s.lanes=p,s.stateNode={containerInfo:l.containerInfo,pendingChildren:null,implementation:l.implementation},s}var Wj=new WeakMap;function Qr(l,s){if(typeof l=="object"&&l!==null){var p=Wj.get(l);return p!==void 0?p:(s={value:l,source:s,stack:at(s)},Wj.set(l,s),s)}return{value:l,source:s,stack:at(s)}}var sl=[],cl=0,_f=null,qu=0,Jr=[],en=0,fi=null,Bn=1,$n="";function ya(l,s){sl[cl++]=qu,sl[cl++]=_f,_f=l,qu=s}function Zj(l,s,p){Jr[en++]=Bn,Jr[en++]=$n,Jr[en++]=fi,fi=l;var v=Bn;l=$n;var S=32-Pr(v)-1;v&=~(1<<S),p+=1;var j=32-Pr(s)+S;if(30<j){var P=S-S%5;j=(v&(1<<P)-1).toString(32),v>>=P,S-=P,Bn=1<<32-Pr(s)+S|p<<S|v,$n=j+l}else Bn=1<<j|p<<S|v,$n=l}function lv(l){l.return!==null&&(ya(l,1),Zj(l,1,0))}function uv(l){for(;l===_f;)_f=sl[--cl],sl[cl]=null,qu=sl[--cl],sl[cl]=null;for(;l===fi;)fi=Jr[--en],Jr[en]=null,$n=Jr[--en],Jr[en]=null,Bn=Jr[--en],Jr[en]=null}function Qj(l,s){Jr[en++]=Bn,Jr[en++]=$n,Jr[en++]=fi,Bn=s.id,$n=s.overflow,fi=l}var Vt=null,it=null,qe=!1,di=null,tn=!1,sv=Error(a(519));function hi(l){var s=Error(a(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw Bu(Qr(s,l)),sv}function Jj(l){var s=l.stateNode,p=l.type,v=l.memoizedProps;switch(s[Kt]=l,s[_r]=v,p){case"dialog":Le("cancel",s),Le("close",s);break;case"iframe":case"object":case"embed":Le("load",s);break;case"video":case"audio":for(p=0;p<us.length;p++)Le(us[p],s);break;case"source":Le("error",s);break;case"img":case"image":case"link":Le("error",s),Le("load",s);break;case"details":Le("toggle",s);break;case"input":Le("invalid",s),dj(s,v.value,v.defaultValue,v.checked,v.defaultChecked,v.type,v.name,!0);break;case"select":Le("invalid",s);break;case"textarea":Le("invalid",s),pj(s,v.value,v.defaultValue,v.children)}p=v.children,typeof p!="string"&&typeof p!="number"&&typeof p!="bigint"||s.textContent===""+p||v.suppressHydrationWarning===!0||vC(s.textContent,p)?(v.popover!=null&&(Le("beforetoggle",s),Le("toggle",s)),v.onScroll!=null&&Le("scroll",s),v.onScrollEnd!=null&&Le("scrollend",s),v.onClick!=null&&(s.onclick=ma),s=!0):s=!1,s||hi(l,!0)}function eA(l){for(Vt=l.return;Vt;)switch(Vt.tag){case 5:case 31:case 13:tn=!1;return;case 27:case 3:tn=!0;return;default:Vt=Vt.return}}function fl(l){if(l!==Vt)return!1;if(!qe)return eA(l),qe=!0,!1;var s=l.tag,p;if((p=s!==3&&s!==27)&&((p=s===5)&&(p=l.type,p=!(p!=="form"&&p!=="button")||Ag(l.type,l.memoizedProps)),p=!p),p&&it&&hi(l),eA(l),s===13){if(l=l.memoizedState,l=l!==null?l.dehydrated:null,!l)throw Error(a(317));it=kC(l)}else if(s===31){if(l=l.memoizedState,l=l!==null?l.dehydrated:null,!l)throw Error(a(317));it=kC(l)}else s===27?(s=it,Ai(l.type)?(l=Mg,Mg=null,it=l):it=s):it=Vt?nn(l.stateNode.nextSibling):null;return!0}function ro(){it=Vt=null,qe=!1}function cv(){var l=di;return l!==null&&(jr===null?jr=l:jr.push.apply(jr,l),di=null),l}function Bu(l){di===null?di=[l]:di.push(l)}var fv=F(null),no=null,ba=null;function pi(l,s,p){ce(fv,s._currentValue),s._currentValue=p}function xa(l){l._currentValue=fv.current,Z(fv)}function dv(l,s,p){for(;l!==null;){var v=l.alternate;if((l.childLanes&s)!==s?(l.childLanes|=s,v!==null&&(v.childLanes|=s)):v!==null&&(v.childLanes&s)!==s&&(v.childLanes|=s),l===p)break;l=l.return}}function hv(l,s,p,v){var S=l.child;for(S!==null&&(S.return=l);S!==null;){var j=S.dependencies;if(j!==null){var P=S.child;j=j.firstContext;e:for(;j!==null;){var I=j;j=S;for(var V=0;V<s.length;V++)if(I.context===s[V]){j.lanes|=p,I=j.alternate,I!==null&&(I.lanes|=p),dv(j.return,p,l),v||(P=null);break e}j=I.next}}else if(S.tag===18){if(P=S.return,P===null)throw Error(a(341));P.lanes|=p,j=P.alternate,j!==null&&(j.lanes|=p),dv(P,p,l),P=null}else P=S.child;if(P!==null)P.return=S;else for(P=S;P!==null;){if(P===l){P=null;break}if(S=P.sibling,S!==null){S.return=P.return,P=S;break}P=P.return}S=P}}function dl(l,s,p,v){l=null;for(var S=s,j=!1;S!==null;){if(!j){if((S.flags&524288)!==0)j=!0;else if((S.flags&262144)!==0)break}if(S.tag===10){var P=S.alternate;if(P===null)throw Error(a(387));if(P=P.memoizedProps,P!==null){var I=S.type;Rr(S.pendingProps.value,P.value)||(l!==null?l.push(I):l=[I])}}else if(S===he.current){if(P=S.alternate,P===null)throw Error(a(387));P.memoizedState.memoizedState!==S.memoizedState.memoizedState&&(l!==null?l.push(hs):l=[hs])}S=S.return}l!==null&&hv(s,l,p,v),s.flags|=262144}function wf(l){for(l=l.firstContext;l!==null;){if(!Rr(l.context._currentValue,l.memoizedValue))return!0;l=l.next}return!1}function ao(l){no=l,ba=null,l=l.dependencies,l!==null&&(l.firstContext=null)}function Yt(l){return tA(no,l)}function Sf(l,s){return no===null&&ao(l),tA(l,s)}function tA(l,s){var p=s._currentValue;if(s={context:s,memoizedValue:p,next:null},ba===null){if(l===null)throw Error(a(308));ba=s,l.dependencies={lanes:0,firstContext:s},l.flags|=524288}else ba=ba.next=s;return p}var gF=typeof AbortController<"u"?AbortController:function(){var l=[],s=this.signal={aborted:!1,addEventListener:function(p,v){l.push(v)}};this.abort=function(){s.aborted=!0,l.forEach(function(p){return p()})}},yF=e.unstable_scheduleCallback,bF=e.unstable_NormalPriority,kt={$$typeof:O,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function pv(){return{controller:new gF,data:new Map,refCount:0}}function $u(l){l.refCount--,l.refCount===0&&yF(bF,function(){l.controller.abort()})}var Uu=null,mv=0,hl=0,pl=null;function xF(l,s){if(Uu===null){var p=Uu=[];mv=0,hl=yg(),pl={status:"pending",value:void 0,then:function(v){p.push(v)}}}return mv++,s.then(rA,rA),s}function rA(){if(--mv===0&&Uu!==null){pl!==null&&(pl.status="fulfilled");var l=Uu;Uu=null,hl=0,pl=null;for(var s=0;s<l.length;s++)(0,l[s])()}}function _F(l,s){var p=[],v={status:"pending",value:null,reason:null,then:function(S){p.push(S)}};return l.then(function(){v.status="fulfilled",v.value=s;for(var S=0;S<p.length;S++)(0,p[S])(s)},function(S){for(v.status="rejected",v.reason=S,S=0;S<p.length;S++)(0,p[S])(void 0)}),v}var nA=$.S;$.S=function(l,s){BO=It(),typeof s=="object"&&s!==null&&typeof s.then=="function"&&xF(l,s),nA!==null&&nA(l,s)};var io=F(null);function vv(){var l=io.current;return l!==null?l:et.pooledCache}function Ef(l,s){s===null?ce(io,io.current):ce(io,s.pool)}function aA(){var l=vv();return l===null?null:{parent:kt._currentValue,pool:l}}var ml=Error(a(460)),gv=Error(a(474)),kf=Error(a(542)),jf={then:function(){}};function iA(l){return l=l.status,l==="fulfilled"||l==="rejected"}function oA(l,s,p){switch(p=l[p],p===void 0?l.push(s):p!==s&&(s.then(ma,ma),s=p),s.status){case"fulfilled":return s.value;case"rejected":throw l=s.reason,uA(l),l;default:if(typeof s.status=="string")s.then(ma,ma);else{if(l=et,l!==null&&100<l.shellSuspendCounter)throw Error(a(482));l=s,l.status="pending",l.then(function(v){if(s.status==="pending"){var S=s;S.status="fulfilled",S.value=v}},function(v){if(s.status==="pending"){var S=s;S.status="rejected",S.reason=v}})}switch(s.status){case"fulfilled":return s.value;case"rejected":throw l=s.reason,uA(l),l}throw lo=s,ml}}function oo(l){try{var s=l._init;return s(l._payload)}catch(p){throw p!==null&&typeof p=="object"&&typeof p.then=="function"?(lo=p,ml):p}}var lo=null;function lA(){if(lo===null)throw Error(a(459));var l=lo;return lo=null,l}function uA(l){if(l===ml||l===kf)throw Error(a(483))}var vl=null,Fu=0;function Af(l){var s=Fu;return Fu+=1,vl===null&&(vl=[]),oA(vl,l,s)}function Hu(l,s){s=s.props.ref,l.ref=s!==void 0?s:null}function Of(l,s){throw s.$$typeof===g?Error(a(525)):(l=Object.prototype.toString.call(s),Error(a(31,l==="[object Object]"?"object with keys {"+Object.keys(s).join(", ")+"}":l)))}function sA(l){function s(ee,X){if(l){var ne=ee.deletions;ne===null?(ee.deletions=[X],ee.flags|=16):ne.push(X)}}function p(ee,X){if(!l)return null;for(;X!==null;)s(ee,X),X=X.sibling;return null}function v(ee){for(var X=new Map;ee!==null;)ee.key!==null?X.set(ee.key,ee):X.set(ee.index,ee),ee=ee.sibling;return X}function S(ee,X){return ee=ga(ee,X),ee.index=0,ee.sibling=null,ee}function j(ee,X,ne){return ee.index=ne,l?(ne=ee.alternate,ne!==null?(ne=ne.index,ne<X?(ee.flags|=67108866,X):ne):(ee.flags|=67108866,X)):(ee.flags|=1048576,X)}function P(ee){return l&&ee.alternate===null&&(ee.flags|=67108866),ee}function I(ee,X,ne,pe){return X===null||X.tag!==6?(X=iv(ne,ee.mode,pe),X.return=ee,X):(X=S(X,ne),X.return=ee,X)}function V(ee,X,ne,pe){var Oe=ne.type;return Oe===E?de(ee,X,ne.props.children,pe,ne.key):X!==null&&(X.elementType===Oe||typeof Oe=="object"&&Oe!==null&&Oe.$$typeof===R&&oo(Oe)===X.type)?(X=S(X,ne.props),Hu(X,ne),X.return=ee,X):(X=xf(ne.type,ne.key,ne.props,null,ee.mode,pe),Hu(X,ne),X.return=ee,X)}function ae(ee,X,ne,pe){return X===null||X.tag!==4||X.stateNode.containerInfo!==ne.containerInfo||X.stateNode.implementation!==ne.implementation?(X=ov(ne,ee.mode,pe),X.return=ee,X):(X=S(X,ne.children||[]),X.return=ee,X)}function de(ee,X,ne,pe,Oe){return X===null||X.tag!==7?(X=to(ne,ee.mode,pe,Oe),X.return=ee,X):(X=S(X,ne),X.return=ee,X)}function me(ee,X,ne){if(typeof X=="string"&&X!==""||typeof X=="number"||typeof X=="bigint")return X=iv(""+X,ee.mode,ne),X.return=ee,X;if(typeof X=="object"&&X!==null){switch(X.$$typeof){case y:return ne=xf(X.type,X.key,X.props,null,ee.mode,ne),Hu(ne,X),ne.return=ee,ne;case x:return X=ov(X,ee.mode,ne),X.return=ee,X;case R:return X=oo(X),me(ee,X,ne)}if(Y(X)||q(X))return X=to(X,ee.mode,ne,null),X.return=ee,X;if(typeof X.then=="function")return me(ee,Af(X),ne);if(X.$$typeof===O)return me(ee,Sf(ee,X),ne);Of(ee,X)}return null}function ie(ee,X,ne,pe){var Oe=X!==null?X.key:null;if(typeof ne=="string"&&ne!==""||typeof ne=="number"||typeof ne=="bigint")return Oe!==null?null:I(ee,X,""+ne,pe);if(typeof ne=="object"&&ne!==null){switch(ne.$$typeof){case y:return ne.key===Oe?V(ee,X,ne,pe):null;case x:return ne.key===Oe?ae(ee,X,ne,pe):null;case R:return ne=oo(ne),ie(ee,X,ne,pe)}if(Y(ne)||q(ne))return Oe!==null?null:de(ee,X,ne,pe,null);if(typeof ne.then=="function")return ie(ee,X,Af(ne),pe);if(ne.$$typeof===O)return ie(ee,X,Sf(ee,ne),pe);Of(ee,ne)}return null}function se(ee,X,ne,pe,Oe){if(typeof pe=="string"&&pe!==""||typeof pe=="number"||typeof pe=="bigint")return ee=ee.get(ne)||null,I(X,ee,""+pe,Oe);if(typeof pe=="object"&&pe!==null){switch(pe.$$typeof){case y:return ee=ee.get(pe.key===null?ne:pe.key)||null,V(X,ee,pe,Oe);case x:return ee=ee.get(pe.key===null?ne:pe.key)||null,ae(X,ee,pe,Oe);case R:return pe=oo(pe),se(ee,X,ne,pe,Oe)}if(Y(pe)||q(pe))return ee=ee.get(ne)||null,de(X,ee,pe,Oe,null);if(typeof pe.then=="function")return se(ee,X,ne,Af(pe),Oe);if(pe.$$typeof===O)return se(ee,X,ne,Sf(X,pe),Oe);Of(X,pe)}return null}function Se(ee,X,ne,pe){for(var Oe=null,Ue=null,Ee=X,Pe=X=0,ze=null;Ee!==null&&Pe<ne.length;Pe++){Ee.index>Pe?(ze=Ee,Ee=null):ze=Ee.sibling;var Fe=ie(ee,Ee,ne[Pe],pe);if(Fe===null){Ee===null&&(Ee=ze);break}l&&Ee&&Fe.alternate===null&&s(ee,Ee),X=j(Fe,X,Pe),Ue===null?Oe=Fe:Ue.sibling=Fe,Ue=Fe,Ee=ze}if(Pe===ne.length)return p(ee,Ee),qe&&ya(ee,Pe),Oe;if(Ee===null){for(;Pe<ne.length;Pe++)Ee=me(ee,ne[Pe],pe),Ee!==null&&(X=j(Ee,X,Pe),Ue===null?Oe=Ee:Ue.sibling=Ee,Ue=Ee);return qe&&ya(ee,Pe),Oe}for(Ee=v(Ee);Pe<ne.length;Pe++)ze=se(Ee,ee,Pe,ne[Pe],pe),ze!==null&&(l&&ze.alternate!==null&&Ee.delete(ze.key===null?Pe:ze.key),X=j(ze,X,Pe),Ue===null?Oe=ze:Ue.sibling=ze,Ue=ze);return l&&Ee.forEach(function(Mi){return s(ee,Mi)}),qe&&ya(ee,Pe),Oe}function Ce(ee,X,ne,pe){if(ne==null)throw Error(a(151));for(var Oe=null,Ue=null,Ee=X,Pe=X=0,ze=null,Fe=ne.next();Ee!==null&&!Fe.done;Pe++,Fe=ne.next()){Ee.index>Pe?(ze=Ee,Ee=null):ze=Ee.sibling;var Mi=ie(ee,Ee,Fe.value,pe);if(Mi===null){Ee===null&&(Ee=ze);break}l&&Ee&&Mi.alternate===null&&s(ee,Ee),X=j(Mi,X,Pe),Ue===null?Oe=Mi:Ue.sibling=Mi,Ue=Mi,Ee=ze}if(Fe.done)return p(ee,Ee),qe&&ya(ee,Pe),Oe;if(Ee===null){for(;!Fe.done;Pe++,Fe=ne.next())Fe=me(ee,Fe.value,pe),Fe!==null&&(X=j(Fe,X,Pe),Ue===null?Oe=Fe:Ue.sibling=Fe,Ue=Fe);return qe&&ya(ee,Pe),Oe}for(Ee=v(Ee);!Fe.done;Pe++,Fe=ne.next())Fe=se(Ee,ee,Pe,Fe.value,pe),Fe!==null&&(l&&Fe.alternate!==null&&Ee.delete(Fe.key===null?Pe:Fe.key),X=j(Fe,X,Pe),Ue===null?Oe=Fe:Ue.sibling=Fe,Ue=Fe);return l&&Ee.forEach(function(MH){return s(ee,MH)}),qe&&ya(ee,Pe),Oe}function Ze(ee,X,ne,pe){if(typeof ne=="object"&&ne!==null&&ne.type===E&&ne.key===null&&(ne=ne.props.children),typeof ne=="object"&&ne!==null){switch(ne.$$typeof){case y:e:{for(var Oe=ne.key;X!==null;){if(X.key===Oe){if(Oe=ne.type,Oe===E){if(X.tag===7){p(ee,X.sibling),pe=S(X,ne.props.children),pe.return=ee,ee=pe;break e}}else if(X.elementType===Oe||typeof Oe=="object"&&Oe!==null&&Oe.$$typeof===R&&oo(Oe)===X.type){p(ee,X.sibling),pe=S(X,ne.props),Hu(pe,ne),pe.return=ee,ee=pe;break e}p(ee,X);break}else s(ee,X);X=X.sibling}ne.type===E?(pe=to(ne.props.children,ee.mode,pe,ne.key),pe.return=ee,ee=pe):(pe=xf(ne.type,ne.key,ne.props,null,ee.mode,pe),Hu(pe,ne),pe.return=ee,ee=pe)}return P(ee);case x:e:{for(Oe=ne.key;X!==null;){if(X.key===Oe)if(X.tag===4&&X.stateNode.containerInfo===ne.containerInfo&&X.stateNode.implementation===ne.implementation){p(ee,X.sibling),pe=S(X,ne.children||[]),pe.return=ee,ee=pe;break e}else{p(ee,X);break}else s(ee,X);X=X.sibling}pe=ov(ne,ee.mode,pe),pe.return=ee,ee=pe}return P(ee);case R:return ne=oo(ne),Ze(ee,X,ne,pe)}if(Y(ne))return Se(ee,X,ne,pe);if(q(ne)){if(Oe=q(ne),typeof Oe!="function")throw Error(a(150));return ne=Oe.call(ne),Ce(ee,X,ne,pe)}if(typeof ne.then=="function")return Ze(ee,X,Af(ne),pe);if(ne.$$typeof===O)return Ze(ee,X,Sf(ee,ne),pe);Of(ee,ne)}return typeof ne=="string"&&ne!==""||typeof ne=="number"||typeof ne=="bigint"?(ne=""+ne,X!==null&&X.tag===6?(p(ee,X.sibling),pe=S(X,ne),pe.return=ee,ee=pe):(p(ee,X),pe=iv(ne,ee.mode,pe),pe.return=ee,ee=pe),P(ee)):p(ee,X)}return function(ee,X,ne,pe){try{Fu=0;var Oe=Ze(ee,X,ne,pe);return vl=null,Oe}catch(Ee){if(Ee===ml||Ee===kf)throw Ee;var Ue=Dr(29,Ee,null,ee.mode);return Ue.lanes=pe,Ue.return=ee,Ue}finally{}}}var uo=sA(!0),cA=sA(!1),mi=!1;function yv(l){l.updateQueue={baseState:l.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function bv(l,s){l=l.updateQueue,s.updateQueue===l&&(s.updateQueue={baseState:l.baseState,firstBaseUpdate:l.firstBaseUpdate,lastBaseUpdate:l.lastBaseUpdate,shared:l.shared,callbacks:null})}function vi(l){return{lane:l,tag:0,payload:null,callback:null,next:null}}function gi(l,s,p){var v=l.updateQueue;if(v===null)return null;if(v=v.shared,(Ge&2)!==0){var S=v.pending;return S===null?s.next=s:(s.next=S.next,S.next=s),v.pending=s,s=bf(l),Vj(l,null,p),s}return yf(l,v,s,p),bf(l)}function Gu(l,s,p){if(s=s.updateQueue,s!==null&&(s=s.shared,(p&4194048)!==0)){var v=s.lanes;v&=l.pendingLanes,p|=v,s.lanes=p,tj(l,p)}}function xv(l,s){var p=l.updateQueue,v=l.alternate;if(v!==null&&(v=v.updateQueue,p===v)){var S=null,j=null;if(p=p.firstBaseUpdate,p!==null){do{var P={lane:p.lane,tag:p.tag,payload:p.payload,callback:null,next:null};j===null?S=j=P:j=j.next=P,p=p.next}while(p!==null);j===null?S=j=s:j=j.next=s}else S=j=s;p={baseState:v.baseState,firstBaseUpdate:S,lastBaseUpdate:j,shared:v.shared,callbacks:v.callbacks},l.updateQueue=p;return}l=p.lastBaseUpdate,l===null?p.firstBaseUpdate=s:l.next=s,p.lastBaseUpdate=s}var _v=!1;function Ku(){if(_v){var l=pl;if(l!==null)throw l}}function Vu(l,s,p,v){_v=!1;var S=l.updateQueue;mi=!1;var j=S.firstBaseUpdate,P=S.lastBaseUpdate,I=S.shared.pending;if(I!==null){S.shared.pending=null;var V=I,ae=V.next;V.next=null,P===null?j=ae:P.next=ae,P=V;var de=l.alternate;de!==null&&(de=de.updateQueue,I=de.lastBaseUpdate,I!==P&&(I===null?de.firstBaseUpdate=ae:I.next=ae,de.lastBaseUpdate=V))}if(j!==null){var me=S.baseState;P=0,de=ae=V=null,I=j;do{var ie=I.lane&-536870913,se=ie!==I.lane;if(se?(Ie&ie)===ie:(v&ie)===ie){ie!==0&&ie===hl&&(_v=!0),de!==null&&(de=de.next={lane:0,tag:I.tag,payload:I.payload,callback:null,next:null});e:{var Se=l,Ce=I;ie=s;var Ze=p;switch(Ce.tag){case 1:if(Se=Ce.payload,typeof Se=="function"){me=Se.call(Ze,me,ie);break e}me=Se;break e;case 3:Se.flags=Se.flags&-65537|128;case 0:if(Se=Ce.payload,ie=typeof Se=="function"?Se.call(Ze,me,ie):Se,ie==null)break e;me=m({},me,ie);break e;case 2:mi=!0}}ie=I.callback,ie!==null&&(l.flags|=64,se&&(l.flags|=8192),se=S.callbacks,se===null?S.callbacks=[ie]:se.push(ie))}else se={lane:ie,tag:I.tag,payload:I.payload,callback:I.callback,next:null},de===null?(ae=de=se,V=me):de=de.next=se,P|=ie;if(I=I.next,I===null){if(I=S.shared.pending,I===null)break;se=I,I=se.next,se.next=null,S.lastBaseUpdate=se,S.shared.pending=null}}while(!0);de===null&&(V=me),S.baseState=V,S.firstBaseUpdate=ae,S.lastBaseUpdate=de,j===null&&(S.shared.lanes=0),wi|=P,l.lanes=P,l.memoizedState=me}}function fA(l,s){if(typeof l!="function")throw Error(a(191,l));l.call(s)}function dA(l,s){var p=l.callbacks;if(p!==null)for(l.callbacks=null,l=0;l<p.length;l++)fA(p[l],s)}var gl=F(null),Cf=F(0);function hA(l,s){l=Ca,ce(Cf,l),ce(gl,s),Ca=l|s.baseLanes}function wv(){ce(Cf,Ca),ce(gl,gl.current)}function Sv(){Ca=Cf.current,Z(gl),Z(Cf)}var Lr=F(null),rn=null;function yi(l){var s=l.alternate;ce(wt,wt.current&1),ce(Lr,l),rn===null&&(s===null||gl.current!==null||s.memoizedState!==null)&&(rn=l)}function Ev(l){ce(wt,wt.current),ce(Lr,l),rn===null&&(rn=l)}function pA(l){l.tag===22?(ce(wt,wt.current),ce(Lr,l),rn===null&&(rn=l)):bi()}function bi(){ce(wt,wt.current),ce(Lr,Lr.current)}function Ir(l){Z(Lr),rn===l&&(rn=null),Z(wt)}var wt=F(0);function Tf(l){for(var s=l;s!==null;){if(s.tag===13){var p=s.memoizedState;if(p!==null&&(p=p.dehydrated,p===null||Tg(p)||Ng(p)))return s}else if(s.tag===19&&(s.memoizedProps.revealOrder==="forwards"||s.memoizedProps.revealOrder==="backwards"||s.memoizedProps.revealOrder==="unstable_legacy-backwards"||s.memoizedProps.revealOrder==="together")){if((s.flags&128)!==0)return s}else if(s.child!==null){s.child.return=s,s=s.child;continue}if(s===l)break;for(;s.sibling===null;){if(s.return===null||s.return===l)return null;s=s.return}s.sibling.return=s.return,s=s.sibling}return null}var _a=0,Me=null,Xe=null,jt=null,Nf=!1,yl=!1,so=!1,Mf=0,Yu=0,bl=null,wF=0;function gt(){throw Error(a(321))}function kv(l,s){if(s===null)return!1;for(var p=0;p<s.length&&p<l.length;p++)if(!Rr(l[p],s[p]))return!1;return!0}function jv(l,s,p,v,S,j){return _a=j,Me=s,s.memoizedState=null,s.updateQueue=null,s.lanes=0,$.H=l===null||l.memoizedState===null?ZA:$v,so=!1,j=p(v,S),so=!1,yl&&(j=vA(s,p,v,S)),mA(l),j}function mA(l){$.H=Zu;var s=Xe!==null&&Xe.next!==null;if(_a=0,jt=Xe=Me=null,Nf=!1,Yu=0,bl=null,s)throw Error(a(300));l===null||At||(l=l.dependencies,l!==null&&wf(l)&&(At=!0))}function vA(l,s,p,v){Me=l;var S=0;do{if(yl&&(bl=null),Yu=0,yl=!1,25<=S)throw Error(a(301));if(S+=1,jt=Xe=null,l.updateQueue!=null){var j=l.updateQueue;j.lastEffect=null,j.events=null,j.stores=null,j.memoCache!=null&&(j.memoCache.index=0)}$.H=QA,j=s(p,v)}while(yl);return j}function SF(){var l=$.H,s=l.useState()[0];return s=typeof s.then=="function"?Xu(s):s,l=l.useState()[0],(Xe!==null?Xe.memoizedState:null)!==l&&(Me.flags|=1024),s}function Av(){var l=Mf!==0;return Mf=0,l}function Ov(l,s,p){s.updateQueue=l.updateQueue,s.flags&=-2053,l.lanes&=~p}function Cv(l){if(Nf){for(l=l.memoizedState;l!==null;){var s=l.queue;s!==null&&(s.pending=null),l=l.next}Nf=!1}_a=0,jt=Xe=Me=null,yl=!1,Yu=Mf=0,bl=null}function fr(){var l={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return jt===null?Me.memoizedState=jt=l:jt=jt.next=l,jt}function St(){if(Xe===null){var l=Me.alternate;l=l!==null?l.memoizedState:null}else l=Xe.next;var s=jt===null?Me.memoizedState:jt.next;if(s!==null)jt=s,Xe=l;else{if(l===null)throw Me.alternate===null?Error(a(467)):Error(a(310));Xe=l,l={memoizedState:Xe.memoizedState,baseState:Xe.baseState,baseQueue:Xe.baseQueue,queue:Xe.queue,next:null},jt===null?Me.memoizedState=jt=l:jt=jt.next=l}return jt}function Pf(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function Xu(l){var s=Yu;return Yu+=1,bl===null&&(bl=[]),l=oA(bl,l,s),s=Me,(jt===null?s.memoizedState:jt.next)===null&&(s=s.alternate,$.H=s===null||s.memoizedState===null?ZA:$v),l}function Rf(l){if(l!==null&&typeof l=="object"){if(typeof l.then=="function")return Xu(l);if(l.$$typeof===O)return Yt(l)}throw Error(a(438,String(l)))}function Tv(l){var s=null,p=Me.updateQueue;if(p!==null&&(s=p.memoCache),s==null){var v=Me.alternate;v!==null&&(v=v.updateQueue,v!==null&&(v=v.memoCache,v!=null&&(s={data:v.data.map(function(S){return S.slice()}),index:0})))}if(s==null&&(s={data:[],index:0}),p===null&&(p=Pf(),Me.updateQueue=p),p.memoCache=s,p=s.data[s.index],p===void 0)for(p=s.data[s.index]=Array(l),v=0;v<l;v++)p[v]=D;return s.index++,p}function wa(l,s){return typeof s=="function"?s(l):s}function Df(l){var s=St();return Nv(s,Xe,l)}function Nv(l,s,p){var v=l.queue;if(v===null)throw Error(a(311));v.lastRenderedReducer=p;var S=l.baseQueue,j=v.pending;if(j!==null){if(S!==null){var P=S.next;S.next=j.next,j.next=P}s.baseQueue=S=j,v.pending=null}if(j=l.baseState,S===null)l.memoizedState=j;else{s=S.next;var I=P=null,V=null,ae=s,de=!1;do{var me=ae.lane&-536870913;if(me!==ae.lane?(Ie&me)===me:(_a&me)===me){var ie=ae.revertLane;if(ie===0)V!==null&&(V=V.next={lane:0,revertLane:0,gesture:null,action:ae.action,hasEagerState:ae.hasEagerState,eagerState:ae.eagerState,next:null}),me===hl&&(de=!0);else if((_a&ie)===ie){ae=ae.next,ie===hl&&(de=!0);continue}else me={lane:0,revertLane:ae.revertLane,gesture:null,action:ae.action,hasEagerState:ae.hasEagerState,eagerState:ae.eagerState,next:null},V===null?(I=V=me,P=j):V=V.next=me,Me.lanes|=ie,wi|=ie;me=ae.action,so&&p(j,me),j=ae.hasEagerState?ae.eagerState:p(j,me)}else ie={lane:me,revertLane:ae.revertLane,gesture:ae.gesture,action:ae.action,hasEagerState:ae.hasEagerState,eagerState:ae.eagerState,next:null},V===null?(I=V=ie,P=j):V=V.next=ie,Me.lanes|=me,wi|=me;ae=ae.next}while(ae!==null&&ae!==s);if(V===null?P=j:V.next=I,!Rr(j,l.memoizedState)&&(At=!0,de&&(p=pl,p!==null)))throw p;l.memoizedState=j,l.baseState=P,l.baseQueue=V,v.lastRenderedState=j}return S===null&&(v.lanes=0),[l.memoizedState,v.dispatch]}function Mv(l){var s=St(),p=s.queue;if(p===null)throw Error(a(311));p.lastRenderedReducer=l;var v=p.dispatch,S=p.pending,j=s.memoizedState;if(S!==null){p.pending=null;var P=S=S.next;do j=l(j,P.action),P=P.next;while(P!==S);Rr(j,s.memoizedState)||(At=!0),s.memoizedState=j,s.baseQueue===null&&(s.baseState=j),p.lastRenderedState=j}return[j,v]}function gA(l,s,p){var v=Me,S=St(),j=qe;if(j){if(p===void 0)throw Error(a(407));p=p()}else p=s();var P=!Rr((Xe||S).memoizedState,p);if(P&&(S.memoizedState=p,At=!0),S=S.queue,Dv(xA.bind(null,v,S,l),[l]),S.getSnapshot!==s||P||jt!==null&&jt.memoizedState.tag&1){if(v.flags|=2048,xl(9,{destroy:void 0},bA.bind(null,v,S,p,s),null),et===null)throw Error(a(349));j||(_a&127)!==0||yA(v,s,p)}return p}function yA(l,s,p){l.flags|=16384,l={getSnapshot:s,value:p},s=Me.updateQueue,s===null?(s=Pf(),Me.updateQueue=s,s.stores=[l]):(p=s.stores,p===null?s.stores=[l]:p.push(l))}function bA(l,s,p,v){s.value=p,s.getSnapshot=v,_A(s)&&wA(l)}function xA(l,s,p){return p(function(){_A(s)&&wA(l)})}function _A(l){var s=l.getSnapshot;l=l.value;try{var p=s();return!Rr(l,p)}catch{return!0}}function wA(l){var s=eo(l,2);s!==null&&Ar(s,l,2)}function Pv(l){var s=fr();if(typeof l=="function"){var p=l;if(l=p(),so){ui(!0);try{p()}finally{ui(!1)}}}return s.memoizedState=s.baseState=l,s.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:wa,lastRenderedState:l},s}function SA(l,s,p,v){return l.baseState=p,Nv(l,Xe,typeof v=="function"?v:wa)}function EF(l,s,p,v,S){if(zf(l))throw Error(a(485));if(l=s.action,l!==null){var j={payload:S,action:l,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(P){j.listeners.push(P)}};$.T!==null?p(!0):j.isTransition=!1,v(j),p=s.pending,p===null?(j.next=s.pending=j,EA(s,j)):(j.next=p.next,s.pending=p.next=j)}}function EA(l,s){var p=s.action,v=s.payload,S=l.state;if(s.isTransition){var j=$.T,P={};$.T=P;try{var I=p(S,v),V=$.S;V!==null&&V(P,I),kA(l,s,I)}catch(ae){Rv(l,s,ae)}finally{j!==null&&P.types!==null&&(j.types=P.types),$.T=j}}else try{j=p(S,v),kA(l,s,j)}catch(ae){Rv(l,s,ae)}}function kA(l,s,p){p!==null&&typeof p=="object"&&typeof p.then=="function"?p.then(function(v){jA(l,s,v)},function(v){return Rv(l,s,v)}):jA(l,s,p)}function jA(l,s,p){s.status="fulfilled",s.value=p,AA(s),l.state=p,s=l.pending,s!==null&&(p=s.next,p===s?l.pending=null:(p=p.next,s.next=p,EA(l,p)))}function Rv(l,s,p){var v=l.pending;if(l.pending=null,v!==null){v=v.next;do s.status="rejected",s.reason=p,AA(s),s=s.next;while(s!==v)}l.action=null}function AA(l){l=l.listeners;for(var s=0;s<l.length;s++)(0,l[s])()}function OA(l,s){return s}function CA(l,s){if(qe){var p=et.formState;if(p!==null){e:{var v=Me;if(qe){if(it){t:{for(var S=it,j=tn;S.nodeType!==8;){if(!j){S=null;break t}if(S=nn(S.nextSibling),S===null){S=null;break t}}j=S.data,S=j==="F!"||j==="F"?S:null}if(S){it=nn(S.nextSibling),v=S.data==="F!";break e}}hi(v)}v=!1}v&&(s=p[0])}}return p=fr(),p.memoizedState=p.baseState=s,v={pending:null,lanes:0,dispatch:null,lastRenderedReducer:OA,lastRenderedState:s},p.queue=v,p=YA.bind(null,Me,v),v.dispatch=p,v=Pv(!1),j=Bv.bind(null,Me,!1,v.queue),v=fr(),S={state:s,dispatch:null,action:l,pending:null},v.queue=S,p=EF.bind(null,Me,S,j,p),S.dispatch=p,v.memoizedState=l,[s,p,!1]}function TA(l){var s=St();return NA(s,Xe,l)}function NA(l,s,p){if(s=Nv(l,s,OA)[0],l=Df(wa)[0],typeof s=="object"&&s!==null&&typeof s.then=="function")try{var v=Xu(s)}catch(P){throw P===ml?kf:P}else v=s;s=St();var S=s.queue,j=S.dispatch;return p!==s.memoizedState&&(Me.flags|=2048,xl(9,{destroy:void 0},kF.bind(null,S,p),null)),[v,j,l]}function kF(l,s){l.action=s}function MA(l){var s=St(),p=Xe;if(p!==null)return NA(s,p,l);St(),s=s.memoizedState,p=St();var v=p.queue.dispatch;return p.memoizedState=l,[s,v,!1]}function xl(l,s,p,v){return l={tag:l,create:p,deps:v,inst:s,next:null},s=Me.updateQueue,s===null&&(s=Pf(),Me.updateQueue=s),p=s.lastEffect,p===null?s.lastEffect=l.next=l:(v=p.next,p.next=l,l.next=v,s.lastEffect=l),l}function PA(){return St().memoizedState}function Lf(l,s,p,v){var S=fr();Me.flags|=l,S.memoizedState=xl(1|s,{destroy:void 0},p,v===void 0?null:v)}function If(l,s,p,v){var S=St();v=v===void 0?null:v;var j=S.memoizedState.inst;Xe!==null&&v!==null&&kv(v,Xe.memoizedState.deps)?S.memoizedState=xl(s,j,p,v):(Me.flags|=l,S.memoizedState=xl(1|s,j,p,v))}function RA(l,s){Lf(8390656,8,l,s)}function Dv(l,s){If(2048,8,l,s)}function jF(l){Me.flags|=4;var s=Me.updateQueue;if(s===null)s=Pf(),Me.updateQueue=s,s.events=[l];else{var p=s.events;p===null?s.events=[l]:p.push(l)}}function DA(l){var s=St().memoizedState;return jF({ref:s,nextImpl:l}),function(){if((Ge&2)!==0)throw Error(a(440));return s.impl.apply(void 0,arguments)}}function LA(l,s){return If(4,2,l,s)}function IA(l,s){return If(4,4,l,s)}function zA(l,s){if(typeof s=="function"){l=l();var p=s(l);return function(){typeof p=="function"?p():s(null)}}if(s!=null)return l=l(),s.current=l,function(){s.current=null}}function qA(l,s,p){p=p!=null?p.concat([l]):null,If(4,4,zA.bind(null,s,l),p)}function Lv(){}function BA(l,s){var p=St();s=s===void 0?null:s;var v=p.memoizedState;return s!==null&&kv(s,v[1])?v[0]:(p.memoizedState=[l,s],l)}function $A(l,s){var p=St();s=s===void 0?null:s;var v=p.memoizedState;if(s!==null&&kv(s,v[1]))return v[0];if(v=l(),so){ui(!0);try{l()}finally{ui(!1)}}return p.memoizedState=[v,s],v}function Iv(l,s,p){return p===void 0||(_a&1073741824)!==0&&(Ie&261930)===0?l.memoizedState=s:(l.memoizedState=p,l=UO(),Me.lanes|=l,wi|=l,p)}function UA(l,s,p,v){return Rr(p,s)?p:gl.current!==null?(l=Iv(l,p,v),Rr(l,s)||(At=!0),l):(_a&42)===0||(_a&1073741824)!==0&&(Ie&261930)===0?(At=!0,l.memoizedState=p):(l=UO(),Me.lanes|=l,wi|=l,s)}function FA(l,s,p,v,S){var j=J.p;J.p=j!==0&&8>j?j:8;var P=$.T,I={};$.T=I,Bv(l,!1,s,p);try{var V=S(),ae=$.S;if(ae!==null&&ae(I,V),V!==null&&typeof V=="object"&&typeof V.then=="function"){var de=_F(V,v);Wu(l,s,de,Br(l))}else Wu(l,s,v,Br(l))}catch(me){Wu(l,s,{then:function(){},status:"rejected",reason:me},Br())}finally{J.p=j,P!==null&&I.types!==null&&(P.types=I.types),$.T=P}}function AF(){}function zv(l,s,p,v){if(l.tag!==5)throw Error(a(476));var S=HA(l).queue;FA(l,S,s,re,p===null?AF:function(){return GA(l),p(v)})}function HA(l){var s=l.memoizedState;if(s!==null)return s;s={memoizedState:re,baseState:re,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:wa,lastRenderedState:re},next:null};var p={};return s.next={memoizedState:p,baseState:p,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:wa,lastRenderedState:p},next:null},l.memoizedState=s,l=l.alternate,l!==null&&(l.memoizedState=s),s}function GA(l){var s=HA(l);s.next===null&&(s=l.alternate.memoizedState),Wu(l,s.next.queue,{},Br())}function qv(){return Yt(hs)}function KA(){return St().memoizedState}function VA(){return St().memoizedState}function OF(l){for(var s=l.return;s!==null;){switch(s.tag){case 24:case 3:var p=Br();l=vi(p);var v=gi(s,l,p);v!==null&&(Ar(v,s,p),Gu(v,s,p)),s={cache:pv()},l.payload=s;return}s=s.return}}function CF(l,s,p){var v=Br();p={lane:v,revertLane:0,gesture:null,action:p,hasEagerState:!1,eagerState:null,next:null},zf(l)?XA(s,p):(p=nv(l,s,p,v),p!==null&&(Ar(p,l,v),WA(p,s,v)))}function YA(l,s,p){var v=Br();Wu(l,s,p,v)}function Wu(l,s,p,v){var S={lane:v,revertLane:0,gesture:null,action:p,hasEagerState:!1,eagerState:null,next:null};if(zf(l))XA(s,S);else{var j=l.alternate;if(l.lanes===0&&(j===null||j.lanes===0)&&(j=s.lastRenderedReducer,j!==null))try{var P=s.lastRenderedState,I=j(P,p);if(S.hasEagerState=!0,S.eagerState=I,Rr(I,P))return yf(l,s,S,0),et===null&&gf(),!1}catch{}finally{}if(p=nv(l,s,S,v),p!==null)return Ar(p,l,v),WA(p,s,v),!0}return!1}function Bv(l,s,p,v){if(v={lane:2,revertLane:yg(),gesture:null,action:v,hasEagerState:!1,eagerState:null,next:null},zf(l)){if(s)throw Error(a(479))}else s=nv(l,p,v,2),s!==null&&Ar(s,l,2)}function zf(l){var s=l.alternate;return l===Me||s!==null&&s===Me}function XA(l,s){yl=Nf=!0;var p=l.pending;p===null?s.next=s:(s.next=p.next,p.next=s),l.pending=s}function WA(l,s,p){if((p&4194048)!==0){var v=s.lanes;v&=l.pendingLanes,p|=v,s.lanes=p,tj(l,p)}}var Zu={readContext:Yt,use:Rf,useCallback:gt,useContext:gt,useEffect:gt,useImperativeHandle:gt,useLayoutEffect:gt,useInsertionEffect:gt,useMemo:gt,useReducer:gt,useRef:gt,useState:gt,useDebugValue:gt,useDeferredValue:gt,useTransition:gt,useSyncExternalStore:gt,useId:gt,useHostTransitionStatus:gt,useFormState:gt,useActionState:gt,useOptimistic:gt,useMemoCache:gt,useCacheRefresh:gt};Zu.useEffectEvent=gt;var ZA={readContext:Yt,use:Rf,useCallback:function(l,s){return fr().memoizedState=[l,s===void 0?null:s],l},useContext:Yt,useEffect:RA,useImperativeHandle:function(l,s,p){p=p!=null?p.concat([l]):null,Lf(4194308,4,zA.bind(null,s,l),p)},useLayoutEffect:function(l,s){return Lf(4194308,4,l,s)},useInsertionEffect:function(l,s){Lf(4,2,l,s)},useMemo:function(l,s){var p=fr();s=s===void 0?null:s;var v=l();if(so){ui(!0);try{l()}finally{ui(!1)}}return p.memoizedState=[v,s],v},useReducer:function(l,s,p){var v=fr();if(p!==void 0){var S=p(s);if(so){ui(!0);try{p(s)}finally{ui(!1)}}}else S=s;return v.memoizedState=v.baseState=S,l={pending:null,lanes:0,dispatch:null,lastRenderedReducer:l,lastRenderedState:S},v.queue=l,l=l.dispatch=CF.bind(null,Me,l),[v.memoizedState,l]},useRef:function(l){var s=fr();return l={current:l},s.memoizedState=l},useState:function(l){l=Pv(l);var s=l.queue,p=YA.bind(null,Me,s);return s.dispatch=p,[l.memoizedState,p]},useDebugValue:Lv,useDeferredValue:function(l,s){var p=fr();return Iv(p,l,s)},useTransition:function(){var l=Pv(!1);return l=FA.bind(null,Me,l.queue,!0,!1),fr().memoizedState=l,[!1,l]},useSyncExternalStore:function(l,s,p){var v=Me,S=fr();if(qe){if(p===void 0)throw Error(a(407));p=p()}else{if(p=s(),et===null)throw Error(a(349));(Ie&127)!==0||yA(v,s,p)}S.memoizedState=p;var j={value:p,getSnapshot:s};return S.queue=j,RA(xA.bind(null,v,j,l),[l]),v.flags|=2048,xl(9,{destroy:void 0},bA.bind(null,v,j,p,s),null),p},useId:function(){var l=fr(),s=et.identifierPrefix;if(qe){var p=$n,v=Bn;p=(v&~(1<<32-Pr(v)-1)).toString(32)+p,s="_"+s+"R_"+p,p=Mf++,0<p&&(s+="H"+p.toString(32)),s+="_"}else p=wF++,s="_"+s+"r_"+p.toString(32)+"_";return l.memoizedState=s},useHostTransitionStatus:qv,useFormState:CA,useActionState:CA,useOptimistic:function(l){var s=fr();s.memoizedState=s.baseState=l;var p={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return s.queue=p,s=Bv.bind(null,Me,!0,p),p.dispatch=s,[l,s]},useMemoCache:Tv,useCacheRefresh:function(){return fr().memoizedState=OF.bind(null,Me)},useEffectEvent:function(l){var s=fr(),p={impl:l};return s.memoizedState=p,function(){if((Ge&2)!==0)throw Error(a(440));return p.impl.apply(void 0,arguments)}}},$v={readContext:Yt,use:Rf,useCallback:BA,useContext:Yt,useEffect:Dv,useImperativeHandle:qA,useInsertionEffect:LA,useLayoutEffect:IA,useMemo:$A,useReducer:Df,useRef:PA,useState:function(){return Df(wa)},useDebugValue:Lv,useDeferredValue:function(l,s){var p=St();return UA(p,Xe.memoizedState,l,s)},useTransition:function(){var l=Df(wa)[0],s=St().memoizedState;return[typeof l=="boolean"?l:Xu(l),s]},useSyncExternalStore:gA,useId:KA,useHostTransitionStatus:qv,useFormState:TA,useActionState:TA,useOptimistic:function(l,s){var p=St();return SA(p,Xe,l,s)},useMemoCache:Tv,useCacheRefresh:VA};$v.useEffectEvent=DA;var QA={readContext:Yt,use:Rf,useCallback:BA,useContext:Yt,useEffect:Dv,useImperativeHandle:qA,useInsertionEffect:LA,useLayoutEffect:IA,useMemo:$A,useReducer:Mv,useRef:PA,useState:function(){return Mv(wa)},useDebugValue:Lv,useDeferredValue:function(l,s){var p=St();return Xe===null?Iv(p,l,s):UA(p,Xe.memoizedState,l,s)},useTransition:function(){var l=Mv(wa)[0],s=St().memoizedState;return[typeof l=="boolean"?l:Xu(l),s]},useSyncExternalStore:gA,useId:KA,useHostTransitionStatus:qv,useFormState:MA,useActionState:MA,useOptimistic:function(l,s){var p=St();return Xe!==null?SA(p,Xe,l,s):(p.baseState=l,[l,p.queue.dispatch])},useMemoCache:Tv,useCacheRefresh:VA};QA.useEffectEvent=DA;function Uv(l,s,p,v){s=l.memoizedState,p=p(v,s),p=p==null?s:m({},s,p),l.memoizedState=p,l.lanes===0&&(l.updateQueue.baseState=p)}var Fv={enqueueSetState:function(l,s,p){l=l._reactInternals;var v=Br(),S=vi(v);S.payload=s,p!=null&&(S.callback=p),s=gi(l,S,v),s!==null&&(Ar(s,l,v),Gu(s,l,v))},enqueueReplaceState:function(l,s,p){l=l._reactInternals;var v=Br(),S=vi(v);S.tag=1,S.payload=s,p!=null&&(S.callback=p),s=gi(l,S,v),s!==null&&(Ar(s,l,v),Gu(s,l,v))},enqueueForceUpdate:function(l,s){l=l._reactInternals;var p=Br(),v=vi(p);v.tag=2,s!=null&&(v.callback=s),s=gi(l,v,p),s!==null&&(Ar(s,l,p),Gu(s,l,p))}};function JA(l,s,p,v,S,j,P){return l=l.stateNode,typeof l.shouldComponentUpdate=="function"?l.shouldComponentUpdate(v,j,P):s.prototype&&s.prototype.isPureReactComponent?!Iu(p,v)||!Iu(S,j):!0}function eO(l,s,p,v){l=s.state,typeof s.componentWillReceiveProps=="function"&&s.componentWillReceiveProps(p,v),typeof s.UNSAFE_componentWillReceiveProps=="function"&&s.UNSAFE_componentWillReceiveProps(p,v),s.state!==l&&Fv.enqueueReplaceState(s,s.state,null)}function co(l,s){var p=s;if("ref"in s){p={};for(var v in s)v!=="ref"&&(p[v]=s[v])}if(l=l.defaultProps){p===s&&(p=m({},p));for(var S in l)p[S]===void 0&&(p[S]=l[S])}return p}function tO(l){vf(l)}function rO(l){console.error(l)}function nO(l){vf(l)}function qf(l,s){try{var p=l.onUncaughtError;p(s.value,{componentStack:s.stack})}catch(v){setTimeout(function(){throw v})}}function aO(l,s,p){try{var v=l.onCaughtError;v(p.value,{componentStack:p.stack,errorBoundary:s.tag===1?s.stateNode:null})}catch(S){setTimeout(function(){throw S})}}function Hv(l,s,p){return p=vi(p),p.tag=3,p.payload={element:null},p.callback=function(){qf(l,s)},p}function iO(l){return l=vi(l),l.tag=3,l}function oO(l,s,p,v){var S=p.type.getDerivedStateFromError;if(typeof S=="function"){var j=v.value;l.payload=function(){return S(j)},l.callback=function(){aO(s,p,v)}}var P=p.stateNode;P!==null&&typeof P.componentDidCatch=="function"&&(l.callback=function(){aO(s,p,v),typeof S!="function"&&(Si===null?Si=new Set([this]):Si.add(this));var I=v.stack;this.componentDidCatch(v.value,{componentStack:I!==null?I:""})})}function TF(l,s,p,v,S){if(p.flags|=32768,v!==null&&typeof v=="object"&&typeof v.then=="function"){if(s=p.alternate,s!==null&&dl(s,p,S,!0),p=Lr.current,p!==null){switch(p.tag){case 31:case 13:return rn===null?Zf():p.alternate===null&&yt===0&&(yt=3),p.flags&=-257,p.flags|=65536,p.lanes=S,v===jf?p.flags|=16384:(s=p.updateQueue,s===null?p.updateQueue=new Set([v]):s.add(v),mg(l,v,S)),!1;case 22:return p.flags|=65536,v===jf?p.flags|=16384:(s=p.updateQueue,s===null?(s={transitions:null,markerInstances:null,retryQueue:new Set([v])},p.updateQueue=s):(p=s.retryQueue,p===null?s.retryQueue=new Set([v]):p.add(v)),mg(l,v,S)),!1}throw Error(a(435,p.tag))}return mg(l,v,S),Zf(),!1}if(qe)return s=Lr.current,s!==null?((s.flags&65536)===0&&(s.flags|=256),s.flags|=65536,s.lanes=S,v!==sv&&(l=Error(a(422),{cause:v}),Bu(Qr(l,p)))):(v!==sv&&(s=Error(a(423),{cause:v}),Bu(Qr(s,p))),l=l.current.alternate,l.flags|=65536,S&=-S,l.lanes|=S,v=Qr(v,p),S=Hv(l.stateNode,v,S),xv(l,S),yt!==4&&(yt=2)),!1;var j=Error(a(520),{cause:v});if(j=Qr(j,p),is===null?is=[j]:is.push(j),yt!==4&&(yt=2),s===null)return!0;v=Qr(v,p),p=s;do{switch(p.tag){case 3:return p.flags|=65536,l=S&-S,p.lanes|=l,l=Hv(p.stateNode,v,l),xv(p,l),!1;case 1:if(s=p.type,j=p.stateNode,(p.flags&128)===0&&(typeof s.getDerivedStateFromError=="function"||j!==null&&typeof j.componentDidCatch=="function"&&(Si===null||!Si.has(j))))return p.flags|=65536,S&=-S,p.lanes|=S,S=iO(S),oO(S,l,p,v),xv(p,S),!1}p=p.return}while(p!==null);return!1}var Gv=Error(a(461)),At=!1;function Xt(l,s,p,v){s.child=l===null?cA(s,null,p,v):uo(s,l.child,p,v)}function lO(l,s,p,v,S){p=p.render;var j=s.ref;if("ref"in v){var P={};for(var I in v)I!=="ref"&&(P[I]=v[I])}else P=v;return ao(s),v=jv(l,s,p,P,j,S),I=Av(),l!==null&&!At?(Ov(l,s,S),Sa(l,s,S)):(qe&&I&&lv(s),s.flags|=1,Xt(l,s,v,S),s.child)}function uO(l,s,p,v,S){if(l===null){var j=p.type;return typeof j=="function"&&!av(j)&&j.defaultProps===void 0&&p.compare===null?(s.tag=15,s.type=j,sO(l,s,j,v,S)):(l=xf(p.type,null,v,s,s.mode,S),l.ref=s.ref,l.return=s,s.child=l)}if(j=l.child,!Jv(l,S)){var P=j.memoizedProps;if(p=p.compare,p=p!==null?p:Iu,p(P,v)&&l.ref===s.ref)return Sa(l,s,S)}return s.flags|=1,l=ga(j,v),l.ref=s.ref,l.return=s,s.child=l}function sO(l,s,p,v,S){if(l!==null){var j=l.memoizedProps;if(Iu(j,v)&&l.ref===s.ref)if(At=!1,s.pendingProps=v=j,Jv(l,S))(l.flags&131072)!==0&&(At=!0);else return s.lanes=l.lanes,Sa(l,s,S)}return Kv(l,s,p,v,S)}function cO(l,s,p,v){var S=v.children,j=l!==null?l.memoizedState:null;if(l===null&&s.stateNode===null&&(s.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),v.mode==="hidden"){if((s.flags&128)!==0){if(j=j!==null?j.baseLanes|p:p,l!==null){for(v=s.child=l.child,S=0;v!==null;)S=S|v.lanes|v.childLanes,v=v.sibling;v=S&~j}else v=0,s.child=null;return fO(l,s,j,p,v)}if((p&536870912)!==0)s.memoizedState={baseLanes:0,cachePool:null},l!==null&&Ef(s,j!==null?j.cachePool:null),j!==null?hA(s,j):wv(),pA(s);else return v=s.lanes=536870912,fO(l,s,j!==null?j.baseLanes|p:p,p,v)}else j!==null?(Ef(s,j.cachePool),hA(s,j),bi(),s.memoizedState=null):(l!==null&&Ef(s,null),wv(),bi());return Xt(l,s,S,p),s.child}function Qu(l,s){return l!==null&&l.tag===22||s.stateNode!==null||(s.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),s.sibling}function fO(l,s,p,v,S){var j=vv();return j=j===null?null:{parent:kt._currentValue,pool:j},s.memoizedState={baseLanes:p,cachePool:j},l!==null&&Ef(s,null),wv(),pA(s),l!==null&&dl(l,s,v,!0),s.childLanes=S,null}function Bf(l,s){return s=Uf({mode:s.mode,children:s.children},l.mode),s.ref=l.ref,l.child=s,s.return=l,s}function dO(l,s,p){return uo(s,l.child,null,p),l=Bf(s,s.pendingProps),l.flags|=2,Ir(s),s.memoizedState=null,l}function NF(l,s,p){var v=s.pendingProps,S=(s.flags&128)!==0;if(s.flags&=-129,l===null){if(qe){if(v.mode==="hidden")return l=Bf(s,v),s.lanes=536870912,Qu(null,l);if(Ev(s),(l=it)?(l=EC(l,tn),l=l!==null&&l.data==="&"?l:null,l!==null&&(s.memoizedState={dehydrated:l,treeContext:fi!==null?{id:Bn,overflow:$n}:null,retryLane:536870912,hydrationErrors:null},p=Xj(l),p.return=s,s.child=p,Vt=s,it=null)):l=null,l===null)throw hi(s);return s.lanes=536870912,null}return Bf(s,v)}var j=l.memoizedState;if(j!==null){var P=j.dehydrated;if(Ev(s),S)if(s.flags&256)s.flags&=-257,s=dO(l,s,p);else if(s.memoizedState!==null)s.child=l.child,s.flags|=128,s=null;else throw Error(a(558));else if(At||dl(l,s,p,!1),S=(p&l.childLanes)!==0,At||S){if(v=et,v!==null&&(P=rj(v,p),P!==0&&P!==j.retryLane))throw j.retryLane=P,eo(l,P),Ar(v,l,P),Gv;Zf(),s=dO(l,s,p)}else l=j.treeContext,it=nn(P.nextSibling),Vt=s,qe=!0,di=null,tn=!1,l!==null&&Qj(s,l),s=Bf(s,v),s.flags|=4096;return s}return l=ga(l.child,{mode:v.mode,children:v.children}),l.ref=s.ref,s.child=l,l.return=s,l}function $f(l,s){var p=s.ref;if(p===null)l!==null&&l.ref!==null&&(s.flags|=4194816);else{if(typeof p!="function"&&typeof p!="object")throw Error(a(284));(l===null||l.ref!==p)&&(s.flags|=4194816)}}function Kv(l,s,p,v,S){return ao(s),p=jv(l,s,p,v,void 0,S),v=Av(),l!==null&&!At?(Ov(l,s,S),Sa(l,s,S)):(qe&&v&&lv(s),s.flags|=1,Xt(l,s,p,S),s.child)}function hO(l,s,p,v,S,j){return ao(s),s.updateQueue=null,p=vA(s,v,p,S),mA(l),v=Av(),l!==null&&!At?(Ov(l,s,j),Sa(l,s,j)):(qe&&v&&lv(s),s.flags|=1,Xt(l,s,p,j),s.child)}function pO(l,s,p,v,S){if(ao(s),s.stateNode===null){var j=ul,P=p.contextType;typeof P=="object"&&P!==null&&(j=Yt(P)),j=new p(v,j),s.memoizedState=j.state!==null&&j.state!==void 0?j.state:null,j.updater=Fv,s.stateNode=j,j._reactInternals=s,j=s.stateNode,j.props=v,j.state=s.memoizedState,j.refs={},yv(s),P=p.contextType,j.context=typeof P=="object"&&P!==null?Yt(P):ul,j.state=s.memoizedState,P=p.getDerivedStateFromProps,typeof P=="function"&&(Uv(s,p,P,v),j.state=s.memoizedState),typeof p.getDerivedStateFromProps=="function"||typeof j.getSnapshotBeforeUpdate=="function"||typeof j.UNSAFE_componentWillMount!="function"&&typeof j.componentWillMount!="function"||(P=j.state,typeof j.componentWillMount=="function"&&j.componentWillMount(),typeof j.UNSAFE_componentWillMount=="function"&&j.UNSAFE_componentWillMount(),P!==j.state&&Fv.enqueueReplaceState(j,j.state,null),Vu(s,v,j,S),Ku(),j.state=s.memoizedState),typeof j.componentDidMount=="function"&&(s.flags|=4194308),v=!0}else if(l===null){j=s.stateNode;var I=s.memoizedProps,V=co(p,I);j.props=V;var ae=j.context,de=p.contextType;P=ul,typeof de=="object"&&de!==null&&(P=Yt(de));var me=p.getDerivedStateFromProps;de=typeof me=="function"||typeof j.getSnapshotBeforeUpdate=="function",I=s.pendingProps!==I,de||typeof j.UNSAFE_componentWillReceiveProps!="function"&&typeof j.componentWillReceiveProps!="function"||(I||ae!==P)&&eO(s,j,v,P),mi=!1;var ie=s.memoizedState;j.state=ie,Vu(s,v,j,S),Ku(),ae=s.memoizedState,I||ie!==ae||mi?(typeof me=="function"&&(Uv(s,p,me,v),ae=s.memoizedState),(V=mi||JA(s,p,V,v,ie,ae,P))?(de||typeof j.UNSAFE_componentWillMount!="function"&&typeof j.componentWillMount!="function"||(typeof j.componentWillMount=="function"&&j.componentWillMount(),typeof j.UNSAFE_componentWillMount=="function"&&j.UNSAFE_componentWillMount()),typeof j.componentDidMount=="function"&&(s.flags|=4194308)):(typeof j.componentDidMount=="function"&&(s.flags|=4194308),s.memoizedProps=v,s.memoizedState=ae),j.props=v,j.state=ae,j.context=P,v=V):(typeof j.componentDidMount=="function"&&(s.flags|=4194308),v=!1)}else{j=s.stateNode,bv(l,s),P=s.memoizedProps,de=co(p,P),j.props=de,me=s.pendingProps,ie=j.context,ae=p.contextType,V=ul,typeof ae=="object"&&ae!==null&&(V=Yt(ae)),I=p.getDerivedStateFromProps,(ae=typeof I=="function"||typeof j.getSnapshotBeforeUpdate=="function")||typeof j.UNSAFE_componentWillReceiveProps!="function"&&typeof j.componentWillReceiveProps!="function"||(P!==me||ie!==V)&&eO(s,j,v,V),mi=!1,ie=s.memoizedState,j.state=ie,Vu(s,v,j,S),Ku();var se=s.memoizedState;P!==me||ie!==se||mi||l!==null&&l.dependencies!==null&&wf(l.dependencies)?(typeof I=="function"&&(Uv(s,p,I,v),se=s.memoizedState),(de=mi||JA(s,p,de,v,ie,se,V)||l!==null&&l.dependencies!==null&&wf(l.dependencies))?(ae||typeof j.UNSAFE_componentWillUpdate!="function"&&typeof j.componentWillUpdate!="function"||(typeof j.componentWillUpdate=="function"&&j.componentWillUpdate(v,se,V),typeof j.UNSAFE_componentWillUpdate=="function"&&j.UNSAFE_componentWillUpdate(v,se,V)),typeof j.componentDidUpdate=="function"&&(s.flags|=4),typeof j.getSnapshotBeforeUpdate=="function"&&(s.flags|=1024)):(typeof j.componentDidUpdate!="function"||P===l.memoizedProps&&ie===l.memoizedState||(s.flags|=4),typeof j.getSnapshotBeforeUpdate!="function"||P===l.memoizedProps&&ie===l.memoizedState||(s.flags|=1024),s.memoizedProps=v,s.memoizedState=se),j.props=v,j.state=se,j.context=V,v=de):(typeof j.componentDidUpdate!="function"||P===l.memoizedProps&&ie===l.memoizedState||(s.flags|=4),typeof j.getSnapshotBeforeUpdate!="function"||P===l.memoizedProps&&ie===l.memoizedState||(s.flags|=1024),v=!1)}return j=v,$f(l,s),v=(s.flags&128)!==0,j||v?(j=s.stateNode,p=v&&typeof p.getDerivedStateFromError!="function"?null:j.render(),s.flags|=1,l!==null&&v?(s.child=uo(s,l.child,null,S),s.child=uo(s,null,p,S)):Xt(l,s,p,S),s.memoizedState=j.state,l=s.child):l=Sa(l,s,S),l}function mO(l,s,p,v){return ro(),s.flags|=256,Xt(l,s,p,v),s.child}var Vv={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function Yv(l){return{baseLanes:l,cachePool:aA()}}function Xv(l,s,p){return l=l!==null?l.childLanes&~p:0,s&&(l|=qr),l}function vO(l,s,p){var v=s.pendingProps,S=!1,j=(s.flags&128)!==0,P;if((P=j)||(P=l!==null&&l.memoizedState===null?!1:(wt.current&2)!==0),P&&(S=!0,s.flags&=-129),P=(s.flags&32)!==0,s.flags&=-33,l===null){if(qe){if(S?yi(s):bi(),(l=it)?(l=EC(l,tn),l=l!==null&&l.data!=="&"?l:null,l!==null&&(s.memoizedState={dehydrated:l,treeContext:fi!==null?{id:Bn,overflow:$n}:null,retryLane:536870912,hydrationErrors:null},p=Xj(l),p.return=s,s.child=p,Vt=s,it=null)):l=null,l===null)throw hi(s);return Ng(l)?s.lanes=32:s.lanes=536870912,null}var I=v.children;return v=v.fallback,S?(bi(),S=s.mode,I=Uf({mode:"hidden",children:I},S),v=to(v,S,p,null),I.return=s,v.return=s,I.sibling=v,s.child=I,v=s.child,v.memoizedState=Yv(p),v.childLanes=Xv(l,P,p),s.memoizedState=Vv,Qu(null,v)):(yi(s),Wv(s,I))}var V=l.memoizedState;if(V!==null&&(I=V.dehydrated,I!==null)){if(j)s.flags&256?(yi(s),s.flags&=-257,s=Zv(l,s,p)):s.memoizedState!==null?(bi(),s.child=l.child,s.flags|=128,s=null):(bi(),I=v.fallback,S=s.mode,v=Uf({mode:"visible",children:v.children},S),I=to(I,S,p,null),I.flags|=2,v.return=s,I.return=s,v.sibling=I,s.child=v,uo(s,l.child,null,p),v=s.child,v.memoizedState=Yv(p),v.childLanes=Xv(l,P,p),s.memoizedState=Vv,s=Qu(null,v));else if(yi(s),Ng(I)){if(P=I.nextSibling&&I.nextSibling.dataset,P)var ae=P.dgst;P=ae,v=Error(a(419)),v.stack="",v.digest=P,Bu({value:v,source:null,stack:null}),s=Zv(l,s,p)}else if(At||dl(l,s,p,!1),P=(p&l.childLanes)!==0,At||P){if(P=et,P!==null&&(v=rj(P,p),v!==0&&v!==V.retryLane))throw V.retryLane=v,eo(l,v),Ar(P,l,v),Gv;Tg(I)||Zf(),s=Zv(l,s,p)}else Tg(I)?(s.flags|=192,s.child=l.child,s=null):(l=V.treeContext,it=nn(I.nextSibling),Vt=s,qe=!0,di=null,tn=!1,l!==null&&Qj(s,l),s=Wv(s,v.children),s.flags|=4096);return s}return S?(bi(),I=v.fallback,S=s.mode,V=l.child,ae=V.sibling,v=ga(V,{mode:"hidden",children:v.children}),v.subtreeFlags=V.subtreeFlags&65011712,ae!==null?I=ga(ae,I):(I=to(I,S,p,null),I.flags|=2),I.return=s,v.return=s,v.sibling=I,s.child=v,Qu(null,v),v=s.child,I=l.child.memoizedState,I===null?I=Yv(p):(S=I.cachePool,S!==null?(V=kt._currentValue,S=S.parent!==V?{parent:V,pool:V}:S):S=aA(),I={baseLanes:I.baseLanes|p,cachePool:S}),v.memoizedState=I,v.childLanes=Xv(l,P,p),s.memoizedState=Vv,Qu(l.child,v)):(yi(s),p=l.child,l=p.sibling,p=ga(p,{mode:"visible",children:v.children}),p.return=s,p.sibling=null,l!==null&&(P=s.deletions,P===null?(s.deletions=[l],s.flags|=16):P.push(l)),s.child=p,s.memoizedState=null,p)}function Wv(l,s){return s=Uf({mode:"visible",children:s},l.mode),s.return=l,l.child=s}function Uf(l,s){return l=Dr(22,l,null,s),l.lanes=0,l}function Zv(l,s,p){return uo(s,l.child,null,p),l=Wv(s,s.pendingProps.children),l.flags|=2,s.memoizedState=null,l}function gO(l,s,p){l.lanes|=s;var v=l.alternate;v!==null&&(v.lanes|=s),dv(l.return,s,p)}function Qv(l,s,p,v,S,j){var P=l.memoizedState;P===null?l.memoizedState={isBackwards:s,rendering:null,renderingStartTime:0,last:v,tail:p,tailMode:S,treeForkCount:j}:(P.isBackwards=s,P.rendering=null,P.renderingStartTime=0,P.last=v,P.tail=p,P.tailMode=S,P.treeForkCount=j)}function yO(l,s,p){var v=s.pendingProps,S=v.revealOrder,j=v.tail;v=v.children;var P=wt.current,I=(P&2)!==0;if(I?(P=P&1|2,s.flags|=128):P&=1,ce(wt,P),Xt(l,s,v,p),v=qe?qu:0,!I&&l!==null&&(l.flags&128)!==0)e:for(l=s.child;l!==null;){if(l.tag===13)l.memoizedState!==null&&gO(l,p,s);else if(l.tag===19)gO(l,p,s);else if(l.child!==null){l.child.return=l,l=l.child;continue}if(l===s)break e;for(;l.sibling===null;){if(l.return===null||l.return===s)break e;l=l.return}l.sibling.return=l.return,l=l.sibling}switch(S){case"forwards":for(p=s.child,S=null;p!==null;)l=p.alternate,l!==null&&Tf(l)===null&&(S=p),p=p.sibling;p=S,p===null?(S=s.child,s.child=null):(S=p.sibling,p.sibling=null),Qv(s,!1,S,p,j,v);break;case"backwards":case"unstable_legacy-backwards":for(p=null,S=s.child,s.child=null;S!==null;){if(l=S.alternate,l!==null&&Tf(l)===null){s.child=S;break}l=S.sibling,S.sibling=p,p=S,S=l}Qv(s,!0,p,null,j,v);break;case"together":Qv(s,!1,null,null,void 0,v);break;default:s.memoizedState=null}return s.child}function Sa(l,s,p){if(l!==null&&(s.dependencies=l.dependencies),wi|=s.lanes,(p&s.childLanes)===0)if(l!==null){if(dl(l,s,p,!1),(p&s.childLanes)===0)return null}else return null;if(l!==null&&s.child!==l.child)throw Error(a(153));if(s.child!==null){for(l=s.child,p=ga(l,l.pendingProps),s.child=p,p.return=s;l.sibling!==null;)l=l.sibling,p=p.sibling=ga(l,l.pendingProps),p.return=s;p.sibling=null}return s.child}function Jv(l,s){return(l.lanes&s)!==0?!0:(l=l.dependencies,!!(l!==null&&wf(l)))}function MF(l,s,p){switch(s.tag){case 3:ge(s,s.stateNode.containerInfo),pi(s,kt,l.memoizedState.cache),ro();break;case 27:case 5:le(s);break;case 4:ge(s,s.stateNode.containerInfo);break;case 10:pi(s,s.type,s.memoizedProps.value);break;case 31:if(s.memoizedState!==null)return s.flags|=128,Ev(s),null;break;case 13:var v=s.memoizedState;if(v!==null)return v.dehydrated!==null?(yi(s),s.flags|=128,null):(p&s.child.childLanes)!==0?vO(l,s,p):(yi(s),l=Sa(l,s,p),l!==null?l.sibling:null);yi(s);break;case 19:var S=(l.flags&128)!==0;if(v=(p&s.childLanes)!==0,v||(dl(l,s,p,!1),v=(p&s.childLanes)!==0),S){if(v)return yO(l,s,p);s.flags|=128}if(S=s.memoizedState,S!==null&&(S.rendering=null,S.tail=null,S.lastEffect=null),ce(wt,wt.current),v)break;return null;case 22:return s.lanes=0,cO(l,s,p,s.pendingProps);case 24:pi(s,kt,l.memoizedState.cache)}return Sa(l,s,p)}function bO(l,s,p){if(l!==null)if(l.memoizedProps!==s.pendingProps)At=!0;else{if(!Jv(l,p)&&(s.flags&128)===0)return At=!1,MF(l,s,p);At=(l.flags&131072)!==0}else At=!1,qe&&(s.flags&1048576)!==0&&Zj(s,qu,s.index);switch(s.lanes=0,s.tag){case 16:e:{var v=s.pendingProps;if(l=oo(s.elementType),s.type=l,typeof l=="function")av(l)?(v=co(l,v),s.tag=1,s=pO(null,s,l,v,p)):(s.tag=0,s=Kv(null,s,l,v,p));else{if(l!=null){var S=l.$$typeof;if(S===T){s.tag=11,s=lO(null,s,l,v,p);break e}else if(S===M){s.tag=14,s=uO(null,s,l,v,p);break e}}throw s=U(l)||l,Error(a(306,s,""))}}return s;case 0:return Kv(l,s,s.type,s.pendingProps,p);case 1:return v=s.type,S=co(v,s.pendingProps),pO(l,s,v,S,p);case 3:e:{if(ge(s,s.stateNode.containerInfo),l===null)throw Error(a(387));v=s.pendingProps;var j=s.memoizedState;S=j.element,bv(l,s),Vu(s,v,null,p);var P=s.memoizedState;if(v=P.cache,pi(s,kt,v),v!==j.cache&&hv(s,[kt],p,!0),Ku(),v=P.element,j.isDehydrated)if(j={element:v,isDehydrated:!1,cache:P.cache},s.updateQueue.baseState=j,s.memoizedState=j,s.flags&256){s=mO(l,s,v,p);break e}else if(v!==S){S=Qr(Error(a(424)),s),Bu(S),s=mO(l,s,v,p);break e}else{switch(l=s.stateNode.containerInfo,l.nodeType){case 9:l=l.body;break;default:l=l.nodeName==="HTML"?l.ownerDocument.body:l}for(it=nn(l.firstChild),Vt=s,qe=!0,di=null,tn=!0,p=cA(s,null,v,p),s.child=p;p;)p.flags=p.flags&-3|4096,p=p.sibling}else{if(ro(),v===S){s=Sa(l,s,p);break e}Xt(l,s,v,p)}s=s.child}return s;case 26:return $f(l,s),l===null?(p=TC(s.type,null,s.pendingProps,null))?s.memoizedState=p:qe||(p=s.type,l=s.pendingProps,v=ad(te.current).createElement(p),v[Kt]=s,v[_r]=l,Wt(v,p,l),zt(v),s.stateNode=v):s.memoizedState=TC(s.type,l.memoizedProps,s.pendingProps,l.memoizedState),null;case 27:return le(s),l===null&&qe&&(v=s.stateNode=AC(s.type,s.pendingProps,te.current),Vt=s,tn=!0,S=it,Ai(s.type)?(Mg=S,it=nn(v.firstChild)):it=S),Xt(l,s,s.pendingProps.children,p),$f(l,s),l===null&&(s.flags|=4194304),s.child;case 5:return l===null&&qe&&((S=v=it)&&(v=uH(v,s.type,s.pendingProps,tn),v!==null?(s.stateNode=v,Vt=s,it=nn(v.firstChild),tn=!1,S=!0):S=!1),S||hi(s)),le(s),S=s.type,j=s.pendingProps,P=l!==null?l.memoizedProps:null,v=j.children,Ag(S,j)?v=null:P!==null&&Ag(S,P)&&(s.flags|=32),s.memoizedState!==null&&(S=jv(l,s,SF,null,null,p),hs._currentValue=S),$f(l,s),Xt(l,s,v,p),s.child;case 6:return l===null&&qe&&((l=p=it)&&(p=sH(p,s.pendingProps,tn),p!==null?(s.stateNode=p,Vt=s,it=null,l=!0):l=!1),l||hi(s)),null;case 13:return vO(l,s,p);case 4:return ge(s,s.stateNode.containerInfo),v=s.pendingProps,l===null?s.child=uo(s,null,v,p):Xt(l,s,v,p),s.child;case 11:return lO(l,s,s.type,s.pendingProps,p);case 7:return Xt(l,s,s.pendingProps,p),s.child;case 8:return Xt(l,s,s.pendingProps.children,p),s.child;case 12:return Xt(l,s,s.pendingProps.children,p),s.child;case 10:return v=s.pendingProps,pi(s,s.type,v.value),Xt(l,s,v.children,p),s.child;case 9:return S=s.type._context,v=s.pendingProps.children,ao(s),S=Yt(S),v=v(S),s.flags|=1,Xt(l,s,v,p),s.child;case 14:return uO(l,s,s.type,s.pendingProps,p);case 15:return sO(l,s,s.type,s.pendingProps,p);case 19:return yO(l,s,p);case 31:return NF(l,s,p);case 22:return cO(l,s,p,s.pendingProps);case 24:return ao(s),v=Yt(kt),l===null?(S=vv(),S===null&&(S=et,j=pv(),S.pooledCache=j,j.refCount++,j!==null&&(S.pooledCacheLanes|=p),S=j),s.memoizedState={parent:v,cache:S},yv(s),pi(s,kt,S)):((l.lanes&p)!==0&&(bv(l,s),Vu(s,null,null,p),Ku()),S=l.memoizedState,j=s.memoizedState,S.parent!==v?(S={parent:v,cache:v},s.memoizedState=S,s.lanes===0&&(s.memoizedState=s.updateQueue.baseState=S),pi(s,kt,v)):(v=j.cache,pi(s,kt,v),v!==S.cache&&hv(s,[kt],p,!0))),Xt(l,s,s.pendingProps.children,p),s.child;case 29:throw s.pendingProps}throw Error(a(156,s.tag))}function Ea(l){l.flags|=4}function eg(l,s,p,v,S){if((s=(l.mode&32)!==0)&&(s=!1),s){if(l.flags|=16777216,(S&335544128)===S)if(l.stateNode.complete)l.flags|=8192;else if(KO())l.flags|=8192;else throw lo=jf,gv}else l.flags&=-16777217}function xO(l,s){if(s.type!=="stylesheet"||(s.state.loading&4)!==0)l.flags&=-16777217;else if(l.flags|=16777216,!DC(s))if(KO())l.flags|=8192;else throw lo=jf,gv}function Ff(l,s){s!==null&&(l.flags|=4),l.flags&16384&&(s=l.tag!==22?Jk():536870912,l.lanes|=s,El|=s)}function Ju(l,s){if(!qe)switch(l.tailMode){case"hidden":s=l.tail;for(var p=null;s!==null;)s.alternate!==null&&(p=s),s=s.sibling;p===null?l.tail=null:p.sibling=null;break;case"collapsed":p=l.tail;for(var v=null;p!==null;)p.alternate!==null&&(v=p),p=p.sibling;v===null?s||l.tail===null?l.tail=null:l.tail.sibling=null:v.sibling=null}}function ot(l){var s=l.alternate!==null&&l.alternate.child===l.child,p=0,v=0;if(s)for(var S=l.child;S!==null;)p|=S.lanes|S.childLanes,v|=S.subtreeFlags&65011712,v|=S.flags&65011712,S.return=l,S=S.sibling;else for(S=l.child;S!==null;)p|=S.lanes|S.childLanes,v|=S.subtreeFlags,v|=S.flags,S.return=l,S=S.sibling;return l.subtreeFlags|=v,l.childLanes=p,s}function PF(l,s,p){var v=s.pendingProps;switch(uv(s),s.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return ot(s),null;case 1:return ot(s),null;case 3:return p=s.stateNode,v=null,l!==null&&(v=l.memoizedState.cache),s.memoizedState.cache!==v&&(s.flags|=2048),xa(kt),W(),p.pendingContext&&(p.context=p.pendingContext,p.pendingContext=null),(l===null||l.child===null)&&(fl(s)?Ea(s):l===null||l.memoizedState.isDehydrated&&(s.flags&256)===0||(s.flags|=1024,cv())),ot(s),null;case 26:var S=s.type,j=s.memoizedState;return l===null?(Ea(s),j!==null?(ot(s),xO(s,j)):(ot(s),eg(s,S,null,v,p))):j?j!==l.memoizedState?(Ea(s),ot(s),xO(s,j)):(ot(s),s.flags&=-16777217):(l=l.memoizedProps,l!==v&&Ea(s),ot(s),eg(s,S,l,v,p)),null;case 27:if(ye(s),p=te.current,S=s.type,l!==null&&s.stateNode!=null)l.memoizedProps!==v&&Ea(s);else{if(!v){if(s.stateNode===null)throw Error(a(166));return ot(s),null}l=B.current,fl(s)?Jj(s):(l=AC(S,v,p),s.stateNode=l,Ea(s))}return ot(s),null;case 5:if(ye(s),S=s.type,l!==null&&s.stateNode!=null)l.memoizedProps!==v&&Ea(s);else{if(!v){if(s.stateNode===null)throw Error(a(166));return ot(s),null}if(j=B.current,fl(s))Jj(s);else{var P=ad(te.current);switch(j){case 1:j=P.createElementNS("http://www.w3.org/2000/svg",S);break;case 2:j=P.createElementNS("http://www.w3.org/1998/Math/MathML",S);break;default:switch(S){case"svg":j=P.createElementNS("http://www.w3.org/2000/svg",S);break;case"math":j=P.createElementNS("http://www.w3.org/1998/Math/MathML",S);break;case"script":j=P.createElement("div"),j.innerHTML="<script><\/script>",j=j.removeChild(j.firstChild);break;case"select":j=typeof v.is=="string"?P.createElement("select",{is:v.is}):P.createElement("select"),v.multiple?j.multiple=!0:v.size&&(j.size=v.size);break;default:j=typeof v.is=="string"?P.createElement(S,{is:v.is}):P.createElement(S)}}j[Kt]=s,j[_r]=v;e:for(P=s.child;P!==null;){if(P.tag===5||P.tag===6)j.appendChild(P.stateNode);else if(P.tag!==4&&P.tag!==27&&P.child!==null){P.child.return=P,P=P.child;continue}if(P===s)break e;for(;P.sibling===null;){if(P.return===null||P.return===s)break e;P=P.return}P.sibling.return=P.return,P=P.sibling}s.stateNode=j;e:switch(Wt(j,S,v),S){case"button":case"input":case"select":case"textarea":v=!!v.autoFocus;break e;case"img":v=!0;break e;default:v=!1}v&&Ea(s)}}return ot(s),eg(s,s.type,l===null?null:l.memoizedProps,s.pendingProps,p),null;case 6:if(l&&s.stateNode!=null)l.memoizedProps!==v&&Ea(s);else{if(typeof v!="string"&&s.stateNode===null)throw Error(a(166));if(l=te.current,fl(s)){if(l=s.stateNode,p=s.memoizedProps,v=null,S=Vt,S!==null)switch(S.tag){case 27:case 5:v=S.memoizedProps}l[Kt]=s,l=!!(l.nodeValue===p||v!==null&&v.suppressHydrationWarning===!0||vC(l.nodeValue,p)),l||hi(s,!0)}else l=ad(l).createTextNode(v),l[Kt]=s,s.stateNode=l}return ot(s),null;case 31:if(p=s.memoizedState,l===null||l.memoizedState!==null){if(v=fl(s),p!==null){if(l===null){if(!v)throw Error(a(318));if(l=s.memoizedState,l=l!==null?l.dehydrated:null,!l)throw Error(a(557));l[Kt]=s}else ro(),(s.flags&128)===0&&(s.memoizedState=null),s.flags|=4;ot(s),l=!1}else p=cv(),l!==null&&l.memoizedState!==null&&(l.memoizedState.hydrationErrors=p),l=!0;if(!l)return s.flags&256?(Ir(s),s):(Ir(s),null);if((s.flags&128)!==0)throw Error(a(558))}return ot(s),null;case 13:if(v=s.memoizedState,l===null||l.memoizedState!==null&&l.memoizedState.dehydrated!==null){if(S=fl(s),v!==null&&v.dehydrated!==null){if(l===null){if(!S)throw Error(a(318));if(S=s.memoizedState,S=S!==null?S.dehydrated:null,!S)throw Error(a(317));S[Kt]=s}else ro(),(s.flags&128)===0&&(s.memoizedState=null),s.flags|=4;ot(s),S=!1}else S=cv(),l!==null&&l.memoizedState!==null&&(l.memoizedState.hydrationErrors=S),S=!0;if(!S)return s.flags&256?(Ir(s),s):(Ir(s),null)}return Ir(s),(s.flags&128)!==0?(s.lanes=p,s):(p=v!==null,l=l!==null&&l.memoizedState!==null,p&&(v=s.child,S=null,v.alternate!==null&&v.alternate.memoizedState!==null&&v.alternate.memoizedState.cachePool!==null&&(S=v.alternate.memoizedState.cachePool.pool),j=null,v.memoizedState!==null&&v.memoizedState.cachePool!==null&&(j=v.memoizedState.cachePool.pool),j!==S&&(v.flags|=2048)),p!==l&&p&&(s.child.flags|=8192),Ff(s,s.updateQueue),ot(s),null);case 4:return W(),l===null&&wg(s.stateNode.containerInfo),ot(s),null;case 10:return xa(s.type),ot(s),null;case 19:if(Z(wt),v=s.memoizedState,v===null)return ot(s),null;if(S=(s.flags&128)!==0,j=v.rendering,j===null)if(S)Ju(v,!1);else{if(yt!==0||l!==null&&(l.flags&128)!==0)for(l=s.child;l!==null;){if(j=Tf(l),j!==null){for(s.flags|=128,Ju(v,!1),l=j.updateQueue,s.updateQueue=l,Ff(s,l),s.subtreeFlags=0,l=p,p=s.child;p!==null;)Yj(p,l),p=p.sibling;return ce(wt,wt.current&1|2),qe&&ya(s,v.treeForkCount),s.child}l=l.sibling}v.tail!==null&&It()>Yf&&(s.flags|=128,S=!0,Ju(v,!1),s.lanes=4194304)}else{if(!S)if(l=Tf(j),l!==null){if(s.flags|=128,S=!0,l=l.updateQueue,s.updateQueue=l,Ff(s,l),Ju(v,!0),v.tail===null&&v.tailMode==="hidden"&&!j.alternate&&!qe)return ot(s),null}else 2*It()-v.renderingStartTime>Yf&&p!==536870912&&(s.flags|=128,S=!0,Ju(v,!1),s.lanes=4194304);v.isBackwards?(j.sibling=s.child,s.child=j):(l=v.last,l!==null?l.sibling=j:s.child=j,v.last=j)}return v.tail!==null?(l=v.tail,v.rendering=l,v.tail=l.sibling,v.renderingStartTime=It(),l.sibling=null,p=wt.current,ce(wt,S?p&1|2:p&1),qe&&ya(s,v.treeForkCount),l):(ot(s),null);case 22:case 23:return Ir(s),Sv(),v=s.memoizedState!==null,l!==null?l.memoizedState!==null!==v&&(s.flags|=8192):v&&(s.flags|=8192),v?(p&536870912)!==0&&(s.flags&128)===0&&(ot(s),s.subtreeFlags&6&&(s.flags|=8192)):ot(s),p=s.updateQueue,p!==null&&Ff(s,p.retryQueue),p=null,l!==null&&l.memoizedState!==null&&l.memoizedState.cachePool!==null&&(p=l.memoizedState.cachePool.pool),v=null,s.memoizedState!==null&&s.memoizedState.cachePool!==null&&(v=s.memoizedState.cachePool.pool),v!==p&&(s.flags|=2048),l!==null&&Z(io),null;case 24:return p=null,l!==null&&(p=l.memoizedState.cache),s.memoizedState.cache!==p&&(s.flags|=2048),xa(kt),ot(s),null;case 25:return null;case 30:return null}throw Error(a(156,s.tag))}function RF(l,s){switch(uv(s),s.tag){case 1:return l=s.flags,l&65536?(s.flags=l&-65537|128,s):null;case 3:return xa(kt),W(),l=s.flags,(l&65536)!==0&&(l&128)===0?(s.flags=l&-65537|128,s):null;case 26:case 27:case 5:return ye(s),null;case 31:if(s.memoizedState!==null){if(Ir(s),s.alternate===null)throw Error(a(340));ro()}return l=s.flags,l&65536?(s.flags=l&-65537|128,s):null;case 13:if(Ir(s),l=s.memoizedState,l!==null&&l.dehydrated!==null){if(s.alternate===null)throw Error(a(340));ro()}return l=s.flags,l&65536?(s.flags=l&-65537|128,s):null;case 19:return Z(wt),null;case 4:return W(),null;case 10:return xa(s.type),null;case 22:case 23:return Ir(s),Sv(),l!==null&&Z(io),l=s.flags,l&65536?(s.flags=l&-65537|128,s):null;case 24:return xa(kt),null;case 25:return null;default:return null}}function _O(l,s){switch(uv(s),s.tag){case 3:xa(kt),W();break;case 26:case 27:case 5:ye(s);break;case 4:W();break;case 31:s.memoizedState!==null&&Ir(s);break;case 13:Ir(s);break;case 19:Z(wt);break;case 10:xa(s.type);break;case 22:case 23:Ir(s),Sv(),l!==null&&Z(io);break;case 24:xa(kt)}}function es(l,s){try{var p=s.updateQueue,v=p!==null?p.lastEffect:null;if(v!==null){var S=v.next;p=S;do{if((p.tag&l)===l){v=void 0;var j=p.create,P=p.inst;v=j(),P.destroy=v}p=p.next}while(p!==S)}}catch(I){Ye(s,s.return,I)}}function xi(l,s,p){try{var v=s.updateQueue,S=v!==null?v.lastEffect:null;if(S!==null){var j=S.next;v=j;do{if((v.tag&l)===l){var P=v.inst,I=P.destroy;if(I!==void 0){P.destroy=void 0,S=s;var V=p,ae=I;try{ae()}catch(de){Ye(S,V,de)}}}v=v.next}while(v!==j)}}catch(de){Ye(s,s.return,de)}}function wO(l){var s=l.updateQueue;if(s!==null){var p=l.stateNode;try{dA(s,p)}catch(v){Ye(l,l.return,v)}}}function SO(l,s,p){p.props=co(l.type,l.memoizedProps),p.state=l.memoizedState;try{p.componentWillUnmount()}catch(v){Ye(l,s,v)}}function ts(l,s){try{var p=l.ref;if(p!==null){switch(l.tag){case 26:case 27:case 5:var v=l.stateNode;break;case 30:v=l.stateNode;break;default:v=l.stateNode}typeof p=="function"?l.refCleanup=p(v):p.current=v}}catch(S){Ye(l,s,S)}}function Un(l,s){var p=l.ref,v=l.refCleanup;if(p!==null)if(typeof v=="function")try{v()}catch(S){Ye(l,s,S)}finally{l.refCleanup=null,l=l.alternate,l!=null&&(l.refCleanup=null)}else if(typeof p=="function")try{p(null)}catch(S){Ye(l,s,S)}else p.current=null}function EO(l){var s=l.type,p=l.memoizedProps,v=l.stateNode;try{e:switch(s){case"button":case"input":case"select":case"textarea":p.autoFocus&&v.focus();break e;case"img":p.src?v.src=p.src:p.srcSet&&(v.srcset=p.srcSet)}}catch(S){Ye(l,l.return,S)}}function tg(l,s,p){try{var v=l.stateNode;rH(v,l.type,p,s),v[_r]=s}catch(S){Ye(l,l.return,S)}}function kO(l){return l.tag===5||l.tag===3||l.tag===26||l.tag===27&&Ai(l.type)||l.tag===4}function rg(l){e:for(;;){for(;l.sibling===null;){if(l.return===null||kO(l.return))return null;l=l.return}for(l.sibling.return=l.return,l=l.sibling;l.tag!==5&&l.tag!==6&&l.tag!==18;){if(l.tag===27&&Ai(l.type)||l.flags&2||l.child===null||l.tag===4)continue e;l.child.return=l,l=l.child}if(!(l.flags&2))return l.stateNode}}function ng(l,s,p){var v=l.tag;if(v===5||v===6)l=l.stateNode,s?(p.nodeType===9?p.body:p.nodeName==="HTML"?p.ownerDocument.body:p).insertBefore(l,s):(s=p.nodeType===9?p.body:p.nodeName==="HTML"?p.ownerDocument.body:p,s.appendChild(l),p=p._reactRootContainer,p!=null||s.onclick!==null||(s.onclick=ma));else if(v!==4&&(v===27&&Ai(l.type)&&(p=l.stateNode,s=null),l=l.child,l!==null))for(ng(l,s,p),l=l.sibling;l!==null;)ng(l,s,p),l=l.sibling}function Hf(l,s,p){var v=l.tag;if(v===5||v===6)l=l.stateNode,s?p.insertBefore(l,s):p.appendChild(l);else if(v!==4&&(v===27&&Ai(l.type)&&(p=l.stateNode),l=l.child,l!==null))for(Hf(l,s,p),l=l.sibling;l!==null;)Hf(l,s,p),l=l.sibling}function jO(l){var s=l.stateNode,p=l.memoizedProps;try{for(var v=l.type,S=s.attributes;S.length;)s.removeAttributeNode(S[0]);Wt(s,v,p),s[Kt]=l,s[_r]=p}catch(j){Ye(l,l.return,j)}}var ka=!1,Ot=!1,ag=!1,AO=typeof WeakSet=="function"?WeakSet:Set,qt=null;function DF(l,s){if(l=l.containerInfo,kg=fd,l=qj(l),Zm(l)){if("selectionStart"in l)var p={start:l.selectionStart,end:l.selectionEnd};else e:{p=(p=l.ownerDocument)&&p.defaultView||window;var v=p.getSelection&&p.getSelection();if(v&&v.rangeCount!==0){p=v.anchorNode;var S=v.anchorOffset,j=v.focusNode;v=v.focusOffset;try{p.nodeType,j.nodeType}catch{p=null;break e}var P=0,I=-1,V=-1,ae=0,de=0,me=l,ie=null;t:for(;;){for(var se;me!==p||S!==0&&me.nodeType!==3||(I=P+S),me!==j||v!==0&&me.nodeType!==3||(V=P+v),me.nodeType===3&&(P+=me.nodeValue.length),(se=me.firstChild)!==null;)ie=me,me=se;for(;;){if(me===l)break t;if(ie===p&&++ae===S&&(I=P),ie===j&&++de===v&&(V=P),(se=me.nextSibling)!==null)break;me=ie,ie=me.parentNode}me=se}p=I===-1||V===-1?null:{start:I,end:V}}else p=null}p=p||{start:0,end:0}}else p=null;for(jg={focusedElem:l,selectionRange:p},fd=!1,qt=s;qt!==null;)if(s=qt,l=s.child,(s.subtreeFlags&1028)!==0&&l!==null)l.return=s,qt=l;else for(;qt!==null;){switch(s=qt,j=s.alternate,l=s.flags,s.tag){case 0:if((l&4)!==0&&(l=s.updateQueue,l=l!==null?l.events:null,l!==null))for(p=0;p<l.length;p++)S=l[p],S.ref.impl=S.nextImpl;break;case 11:case 15:break;case 1:if((l&1024)!==0&&j!==null){l=void 0,p=s,S=j.memoizedProps,j=j.memoizedState,v=p.stateNode;try{var Se=co(p.type,S);l=v.getSnapshotBeforeUpdate(Se,j),v.__reactInternalSnapshotBeforeUpdate=l}catch(Ce){Ye(p,p.return,Ce)}}break;case 3:if((l&1024)!==0){if(l=s.stateNode.containerInfo,p=l.nodeType,p===9)Cg(l);else if(p===1)switch(l.nodeName){case"HEAD":case"HTML":case"BODY":Cg(l);break;default:l.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((l&1024)!==0)throw Error(a(163))}if(l=s.sibling,l!==null){l.return=s.return,qt=l;break}qt=s.return}}function OO(l,s,p){var v=p.flags;switch(p.tag){case 0:case 11:case 15:Aa(l,p),v&4&&es(5,p);break;case 1:if(Aa(l,p),v&4)if(l=p.stateNode,s===null)try{l.componentDidMount()}catch(P){Ye(p,p.return,P)}else{var S=co(p.type,s.memoizedProps);s=s.memoizedState;try{l.componentDidUpdate(S,s,l.__reactInternalSnapshotBeforeUpdate)}catch(P){Ye(p,p.return,P)}}v&64&&wO(p),v&512&&ts(p,p.return);break;case 3:if(Aa(l,p),v&64&&(l=p.updateQueue,l!==null)){if(s=null,p.child!==null)switch(p.child.tag){case 27:case 5:s=p.child.stateNode;break;case 1:s=p.child.stateNode}try{dA(l,s)}catch(P){Ye(p,p.return,P)}}break;case 27:s===null&&v&4&&jO(p);case 26:case 5:Aa(l,p),s===null&&v&4&&EO(p),v&512&&ts(p,p.return);break;case 12:Aa(l,p);break;case 31:Aa(l,p),v&4&&NO(l,p);break;case 13:Aa(l,p),v&4&&MO(l,p),v&64&&(l=p.memoizedState,l!==null&&(l=l.dehydrated,l!==null&&(p=HF.bind(null,p),cH(l,p))));break;case 22:if(v=p.memoizedState!==null||ka,!v){s=s!==null&&s.memoizedState!==null||Ot,S=ka;var j=Ot;ka=v,(Ot=s)&&!j?Oa(l,p,(p.subtreeFlags&8772)!==0):Aa(l,p),ka=S,Ot=j}break;case 30:break;default:Aa(l,p)}}function CO(l){var s=l.alternate;s!==null&&(l.alternate=null,CO(s)),l.child=null,l.deletions=null,l.sibling=null,l.tag===5&&(s=l.stateNode,s!==null&&Rm(s)),l.stateNode=null,l.return=null,l.dependencies=null,l.memoizedProps=null,l.memoizedState=null,l.pendingProps=null,l.stateNode=null,l.updateQueue=null}var ct=null,Sr=!1;function ja(l,s,p){for(p=p.child;p!==null;)TO(l,s,p),p=p.sibling}function TO(l,s,p){if(_t&&typeof _t.onCommitFiberUnmount=="function")try{_t.onCommitFiberUnmount(xr,p)}catch{}switch(p.tag){case 26:Ot||Un(p,s),ja(l,s,p),p.memoizedState?p.memoizedState.count--:p.stateNode&&(p=p.stateNode,p.parentNode.removeChild(p));break;case 27:Ot||Un(p,s);var v=ct,S=Sr;Ai(p.type)&&(ct=p.stateNode,Sr=!1),ja(l,s,p),cs(p.stateNode),ct=v,Sr=S;break;case 5:Ot||Un(p,s);case 6:if(v=ct,S=Sr,ct=null,ja(l,s,p),ct=v,Sr=S,ct!==null)if(Sr)try{(ct.nodeType===9?ct.body:ct.nodeName==="HTML"?ct.ownerDocument.body:ct).removeChild(p.stateNode)}catch(j){Ye(p,s,j)}else try{ct.removeChild(p.stateNode)}catch(j){Ye(p,s,j)}break;case 18:ct!==null&&(Sr?(l=ct,wC(l.nodeType===9?l.body:l.nodeName==="HTML"?l.ownerDocument.body:l,p.stateNode),Ml(l)):wC(ct,p.stateNode));break;case 4:v=ct,S=Sr,ct=p.stateNode.containerInfo,Sr=!0,ja(l,s,p),ct=v,Sr=S;break;case 0:case 11:case 14:case 15:xi(2,p,s),Ot||xi(4,p,s),ja(l,s,p);break;case 1:Ot||(Un(p,s),v=p.stateNode,typeof v.componentWillUnmount=="function"&&SO(p,s,v)),ja(l,s,p);break;case 21:ja(l,s,p);break;case 22:Ot=(v=Ot)||p.memoizedState!==null,ja(l,s,p),Ot=v;break;default:ja(l,s,p)}}function NO(l,s){if(s.memoizedState===null&&(l=s.alternate,l!==null&&(l=l.memoizedState,l!==null))){l=l.dehydrated;try{Ml(l)}catch(p){Ye(s,s.return,p)}}}function MO(l,s){if(s.memoizedState===null&&(l=s.alternate,l!==null&&(l=l.memoizedState,l!==null&&(l=l.dehydrated,l!==null))))try{Ml(l)}catch(p){Ye(s,s.return,p)}}function LF(l){switch(l.tag){case 31:case 13:case 19:var s=l.stateNode;return s===null&&(s=l.stateNode=new AO),s;case 22:return l=l.stateNode,s=l._retryCache,s===null&&(s=l._retryCache=new AO),s;default:throw Error(a(435,l.tag))}}function Gf(l,s){var p=LF(l);s.forEach(function(v){if(!p.has(v)){p.add(v);var S=GF.bind(null,l,v);v.then(S,S)}})}function Er(l,s){var p=s.deletions;if(p!==null)for(var v=0;v<p.length;v++){var S=p[v],j=l,P=s,I=P;e:for(;I!==null;){switch(I.tag){case 27:if(Ai(I.type)){ct=I.stateNode,Sr=!1;break e}break;case 5:ct=I.stateNode,Sr=!1;break e;case 3:case 4:ct=I.stateNode.containerInfo,Sr=!0;break e}I=I.return}if(ct===null)throw Error(a(160));TO(j,P,S),ct=null,Sr=!1,j=S.alternate,j!==null&&(j.return=null),S.return=null}if(s.subtreeFlags&13886)for(s=s.child;s!==null;)PO(s,l),s=s.sibling}var kn=null;function PO(l,s){var p=l.alternate,v=l.flags;switch(l.tag){case 0:case 11:case 14:case 15:Er(s,l),kr(l),v&4&&(xi(3,l,l.return),es(3,l),xi(5,l,l.return));break;case 1:Er(s,l),kr(l),v&512&&(Ot||p===null||Un(p,p.return)),v&64&&ka&&(l=l.updateQueue,l!==null&&(v=l.callbacks,v!==null&&(p=l.shared.hiddenCallbacks,l.shared.hiddenCallbacks=p===null?v:p.concat(v))));break;case 26:var S=kn;if(Er(s,l),kr(l),v&512&&(Ot||p===null||Un(p,p.return)),v&4){var j=p!==null?p.memoizedState:null;if(v=l.memoizedState,p===null)if(v===null)if(l.stateNode===null){e:{v=l.type,p=l.memoizedProps,S=S.ownerDocument||S;t:switch(v){case"title":j=S.getElementsByTagName("title")[0],(!j||j[Ou]||j[Kt]||j.namespaceURI==="http://www.w3.org/2000/svg"||j.hasAttribute("itemprop"))&&(j=S.createElement(v),S.head.insertBefore(j,S.querySelector("head > title"))),Wt(j,v,p),j[Kt]=l,zt(j),v=j;break e;case"link":var P=PC("link","href",S).get(v+(p.href||""));if(P){for(var I=0;I<P.length;I++)if(j=P[I],j.getAttribute("href")===(p.href==null||p.href===""?null:p.href)&&j.getAttribute("rel")===(p.rel==null?null:p.rel)&&j.getAttribute("title")===(p.title==null?null:p.title)&&j.getAttribute("crossorigin")===(p.crossOrigin==null?null:p.crossOrigin)){P.splice(I,1);break t}}j=S.createElement(v),Wt(j,v,p),S.head.appendChild(j);break;case"meta":if(P=PC("meta","content",S).get(v+(p.content||""))){for(I=0;I<P.length;I++)if(j=P[I],j.getAttribute("content")===(p.content==null?null:""+p.content)&&j.getAttribute("name")===(p.name==null?null:p.name)&&j.getAttribute("property")===(p.property==null?null:p.property)&&j.getAttribute("http-equiv")===(p.httpEquiv==null?null:p.httpEquiv)&&j.getAttribute("charset")===(p.charSet==null?null:p.charSet)){P.splice(I,1);break t}}j=S.createElement(v),Wt(j,v,p),S.head.appendChild(j);break;default:throw Error(a(468,v))}j[Kt]=l,zt(j),v=j}l.stateNode=v}else RC(S,l.type,l.stateNode);else l.stateNode=MC(S,v,l.memoizedProps);else j!==v?(j===null?p.stateNode!==null&&(p=p.stateNode,p.parentNode.removeChild(p)):j.count--,v===null?RC(S,l.type,l.stateNode):MC(S,v,l.memoizedProps)):v===null&&l.stateNode!==null&&tg(l,l.memoizedProps,p.memoizedProps)}break;case 27:Er(s,l),kr(l),v&512&&(Ot||p===null||Un(p,p.return)),p!==null&&v&4&&tg(l,l.memoizedProps,p.memoizedProps);break;case 5:if(Er(s,l),kr(l),v&512&&(Ot||p===null||Un(p,p.return)),l.flags&32){S=l.stateNode;try{tl(S,"")}catch(Se){Ye(l,l.return,Se)}}v&4&&l.stateNode!=null&&(S=l.memoizedProps,tg(l,S,p!==null?p.memoizedProps:S)),v&1024&&(ag=!0);break;case 6:if(Er(s,l),kr(l),v&4){if(l.stateNode===null)throw Error(a(162));v=l.memoizedProps,p=l.stateNode;try{p.nodeValue=v}catch(Se){Ye(l,l.return,Se)}}break;case 3:if(ld=null,S=kn,kn=id(s.containerInfo),Er(s,l),kn=S,kr(l),v&4&&p!==null&&p.memoizedState.isDehydrated)try{Ml(s.containerInfo)}catch(Se){Ye(l,l.return,Se)}ag&&(ag=!1,RO(l));break;case 4:v=kn,kn=id(l.stateNode.containerInfo),Er(s,l),kr(l),kn=v;break;case 12:Er(s,l),kr(l);break;case 31:Er(s,l),kr(l),v&4&&(v=l.updateQueue,v!==null&&(l.updateQueue=null,Gf(l,v)));break;case 13:Er(s,l),kr(l),l.child.flags&8192&&l.memoizedState!==null!=(p!==null&&p.memoizedState!==null)&&(Vf=It()),v&4&&(v=l.updateQueue,v!==null&&(l.updateQueue=null,Gf(l,v)));break;case 22:S=l.memoizedState!==null;var V=p!==null&&p.memoizedState!==null,ae=ka,de=Ot;if(ka=ae||S,Ot=de||V,Er(s,l),Ot=de,ka=ae,kr(l),v&8192)e:for(s=l.stateNode,s._visibility=S?s._visibility&-2:s._visibility|1,S&&(p===null||V||ka||Ot||fo(l)),p=null,s=l;;){if(s.tag===5||s.tag===26){if(p===null){V=p=s;try{if(j=V.stateNode,S)P=j.style,typeof P.setProperty=="function"?P.setProperty("display","none","important"):P.display="none";else{I=V.stateNode;var me=V.memoizedProps.style,ie=me!=null&&me.hasOwnProperty("display")?me.display:null;I.style.display=ie==null||typeof ie=="boolean"?"":(""+ie).trim()}}catch(Se){Ye(V,V.return,Se)}}}else if(s.tag===6){if(p===null){V=s;try{V.stateNode.nodeValue=S?"":V.memoizedProps}catch(Se){Ye(V,V.return,Se)}}}else if(s.tag===18){if(p===null){V=s;try{var se=V.stateNode;S?SC(se,!0):SC(V.stateNode,!1)}catch(Se){Ye(V,V.return,Se)}}}else if((s.tag!==22&&s.tag!==23||s.memoizedState===null||s===l)&&s.child!==null){s.child.return=s,s=s.child;continue}if(s===l)break e;for(;s.sibling===null;){if(s.return===null||s.return===l)break e;p===s&&(p=null),s=s.return}p===s&&(p=null),s.sibling.return=s.return,s=s.sibling}v&4&&(v=l.updateQueue,v!==null&&(p=v.retryQueue,p!==null&&(v.retryQueue=null,Gf(l,p))));break;case 19:Er(s,l),kr(l),v&4&&(v=l.updateQueue,v!==null&&(l.updateQueue=null,Gf(l,v)));break;case 30:break;case 21:break;default:Er(s,l),kr(l)}}function kr(l){var s=l.flags;if(s&2){try{for(var p,v=l.return;v!==null;){if(kO(v)){p=v;break}v=v.return}if(p==null)throw Error(a(160));switch(p.tag){case 27:var S=p.stateNode,j=rg(l);Hf(l,j,S);break;case 5:var P=p.stateNode;p.flags&32&&(tl(P,""),p.flags&=-33);var I=rg(l);Hf(l,I,P);break;case 3:case 4:var V=p.stateNode.containerInfo,ae=rg(l);ng(l,ae,V);break;default:throw Error(a(161))}}catch(de){Ye(l,l.return,de)}l.flags&=-3}s&4096&&(l.flags&=-4097)}function RO(l){if(l.subtreeFlags&1024)for(l=l.child;l!==null;){var s=l;RO(s),s.tag===5&&s.flags&1024&&s.stateNode.reset(),l=l.sibling}}function Aa(l,s){if(s.subtreeFlags&8772)for(s=s.child;s!==null;)OO(l,s.alternate,s),s=s.sibling}function fo(l){for(l=l.child;l!==null;){var s=l;switch(s.tag){case 0:case 11:case 14:case 15:xi(4,s,s.return),fo(s);break;case 1:Un(s,s.return);var p=s.stateNode;typeof p.componentWillUnmount=="function"&&SO(s,s.return,p),fo(s);break;case 27:cs(s.stateNode);case 26:case 5:Un(s,s.return),fo(s);break;case 22:s.memoizedState===null&&fo(s);break;case 30:fo(s);break;default:fo(s)}l=l.sibling}}function Oa(l,s,p){for(p=p&&(s.subtreeFlags&8772)!==0,s=s.child;s!==null;){var v=s.alternate,S=l,j=s,P=j.flags;switch(j.tag){case 0:case 11:case 15:Oa(S,j,p),es(4,j);break;case 1:if(Oa(S,j,p),v=j,S=v.stateNode,typeof S.componentDidMount=="function")try{S.componentDidMount()}catch(ae){Ye(v,v.return,ae)}if(v=j,S=v.updateQueue,S!==null){var I=v.stateNode;try{var V=S.shared.hiddenCallbacks;if(V!==null)for(S.shared.hiddenCallbacks=null,S=0;S<V.length;S++)fA(V[S],I)}catch(ae){Ye(v,v.return,ae)}}p&&P&64&&wO(j),ts(j,j.return);break;case 27:jO(j);case 26:case 5:Oa(S,j,p),p&&v===null&&P&4&&EO(j),ts(j,j.return);break;case 12:Oa(S,j,p);break;case 31:Oa(S,j,p),p&&P&4&&NO(S,j);break;case 13:Oa(S,j,p),p&&P&4&&MO(S,j);break;case 22:j.memoizedState===null&&Oa(S,j,p),ts(j,j.return);break;case 30:break;default:Oa(S,j,p)}s=s.sibling}}function ig(l,s){var p=null;l!==null&&l.memoizedState!==null&&l.memoizedState.cachePool!==null&&(p=l.memoizedState.cachePool.pool),l=null,s.memoizedState!==null&&s.memoizedState.cachePool!==null&&(l=s.memoizedState.cachePool.pool),l!==p&&(l!=null&&l.refCount++,p!=null&&$u(p))}function og(l,s){l=null,s.alternate!==null&&(l=s.alternate.memoizedState.cache),s=s.memoizedState.cache,s!==l&&(s.refCount++,l!=null&&$u(l))}function jn(l,s,p,v){if(s.subtreeFlags&10256)for(s=s.child;s!==null;)DO(l,s,p,v),s=s.sibling}function DO(l,s,p,v){var S=s.flags;switch(s.tag){case 0:case 11:case 15:jn(l,s,p,v),S&2048&&es(9,s);break;case 1:jn(l,s,p,v);break;case 3:jn(l,s,p,v),S&2048&&(l=null,s.alternate!==null&&(l=s.alternate.memoizedState.cache),s=s.memoizedState.cache,s!==l&&(s.refCount++,l!=null&&$u(l)));break;case 12:if(S&2048){jn(l,s,p,v),l=s.stateNode;try{var j=s.memoizedProps,P=j.id,I=j.onPostCommit;typeof I=="function"&&I(P,s.alternate===null?"mount":"update",l.passiveEffectDuration,-0)}catch(V){Ye(s,s.return,V)}}else jn(l,s,p,v);break;case 31:jn(l,s,p,v);break;case 13:jn(l,s,p,v);break;case 23:break;case 22:j=s.stateNode,P=s.alternate,s.memoizedState!==null?j._visibility&2?jn(l,s,p,v):rs(l,s):j._visibility&2?jn(l,s,p,v):(j._visibility|=2,_l(l,s,p,v,(s.subtreeFlags&10256)!==0||!1)),S&2048&&ig(P,s);break;case 24:jn(l,s,p,v),S&2048&&og(s.alternate,s);break;default:jn(l,s,p,v)}}function _l(l,s,p,v,S){for(S=S&&((s.subtreeFlags&10256)!==0||!1),s=s.child;s!==null;){var j=l,P=s,I=p,V=v,ae=P.flags;switch(P.tag){case 0:case 11:case 15:_l(j,P,I,V,S),es(8,P);break;case 23:break;case 22:var de=P.stateNode;P.memoizedState!==null?de._visibility&2?_l(j,P,I,V,S):rs(j,P):(de._visibility|=2,_l(j,P,I,V,S)),S&&ae&2048&&ig(P.alternate,P);break;case 24:_l(j,P,I,V,S),S&&ae&2048&&og(P.alternate,P);break;default:_l(j,P,I,V,S)}s=s.sibling}}function rs(l,s){if(s.subtreeFlags&10256)for(s=s.child;s!==null;){var p=l,v=s,S=v.flags;switch(v.tag){case 22:rs(p,v),S&2048&&ig(v.alternate,v);break;case 24:rs(p,v),S&2048&&og(v.alternate,v);break;default:rs(p,v)}s=s.sibling}}var ns=8192;function wl(l,s,p){if(l.subtreeFlags&ns)for(l=l.child;l!==null;)LO(l,s,p),l=l.sibling}function LO(l,s,p){switch(l.tag){case 26:wl(l,s,p),l.flags&ns&&l.memoizedState!==null&&wH(p,kn,l.memoizedState,l.memoizedProps);break;case 5:wl(l,s,p);break;case 3:case 4:var v=kn;kn=id(l.stateNode.containerInfo),wl(l,s,p),kn=v;break;case 22:l.memoizedState===null&&(v=l.alternate,v!==null&&v.memoizedState!==null?(v=ns,ns=16777216,wl(l,s,p),ns=v):wl(l,s,p));break;default:wl(l,s,p)}}function IO(l){var s=l.alternate;if(s!==null&&(l=s.child,l!==null)){s.child=null;do s=l.sibling,l.sibling=null,l=s;while(l!==null)}}function as(l){var s=l.deletions;if((l.flags&16)!==0){if(s!==null)for(var p=0;p<s.length;p++){var v=s[p];qt=v,qO(v,l)}IO(l)}if(l.subtreeFlags&10256)for(l=l.child;l!==null;)zO(l),l=l.sibling}function zO(l){switch(l.tag){case 0:case 11:case 15:as(l),l.flags&2048&&xi(9,l,l.return);break;case 3:as(l);break;case 12:as(l);break;case 22:var s=l.stateNode;l.memoizedState!==null&&s._visibility&2&&(l.return===null||l.return.tag!==13)?(s._visibility&=-3,Kf(l)):as(l);break;default:as(l)}}function Kf(l){var s=l.deletions;if((l.flags&16)!==0){if(s!==null)for(var p=0;p<s.length;p++){var v=s[p];qt=v,qO(v,l)}IO(l)}for(l=l.child;l!==null;){switch(s=l,s.tag){case 0:case 11:case 15:xi(8,s,s.return),Kf(s);break;case 22:p=s.stateNode,p._visibility&2&&(p._visibility&=-3,Kf(s));break;default:Kf(s)}l=l.sibling}}function qO(l,s){for(;qt!==null;){var p=qt;switch(p.tag){case 0:case 11:case 15:xi(8,p,s);break;case 23:case 22:if(p.memoizedState!==null&&p.memoizedState.cachePool!==null){var v=p.memoizedState.cachePool.pool;v!=null&&v.refCount++}break;case 24:$u(p.memoizedState.cache)}if(v=p.child,v!==null)v.return=p,qt=v;else e:for(p=l;qt!==null;){v=qt;var S=v.sibling,j=v.return;if(CO(v),v===p){qt=null;break e}if(S!==null){S.return=j,qt=S;break e}qt=j}}}var IF={getCacheForType:function(l){var s=Yt(kt),p=s.data.get(l);return p===void 0&&(p=l(),s.data.set(l,p)),p},cacheSignal:function(){return Yt(kt).controller.signal}},zF=typeof WeakMap=="function"?WeakMap:Map,Ge=0,et=null,De=null,Ie=0,Ve=0,zr=null,_i=!1,Sl=!1,lg=!1,Ca=0,yt=0,wi=0,ho=0,ug=0,qr=0,El=0,is=null,jr=null,sg=!1,Vf=0,BO=0,Yf=1/0,Xf=null,Si=null,Nt=0,Ei=null,kl=null,Ta=0,cg=0,fg=null,$O=null,os=0,dg=null;function Br(){return(Ge&2)!==0&&Ie!==0?Ie&-Ie:$.T!==null?yg():nj()}function UO(){if(qr===0)if((Ie&536870912)===0||qe){var l=rf;rf<<=1,(rf&3932160)===0&&(rf=262144),qr=l}else qr=536870912;return l=Lr.current,l!==null&&(l.flags|=32),qr}function Ar(l,s,p){(l===et&&(Ve===2||Ve===9)||l.cancelPendingCommit!==null)&&(jl(l,0),ki(l,Ie,qr,!1)),Au(l,p),((Ge&2)===0||l!==et)&&(l===et&&((Ge&2)===0&&(ho|=p),yt===4&&ki(l,Ie,qr,!1)),Fn(l))}function FO(l,s,p){if((Ge&6)!==0)throw Error(a(327));var v=!p&&(s&127)===0&&(s&l.expiredLanes)===0||ju(l,s),S=v?$F(l,s):pg(l,s,!0),j=v;do{if(S===0){Sl&&!v&&ki(l,s,0,!1);break}else{if(p=l.current.alternate,j&&!qF(p)){S=pg(l,s,!1),j=!1;continue}if(S===2){if(j=s,l.errorRecoveryDisabledLanes&j)var P=0;else P=l.pendingLanes&-536870913,P=P!==0?P:P&536870912?536870912:0;if(P!==0){s=P;e:{var I=l;S=is;var V=I.current.memoizedState.isDehydrated;if(V&&(jl(I,P).flags|=256),P=pg(I,P,!1),P!==2){if(lg&&!V){I.errorRecoveryDisabledLanes|=j,ho|=j,S=4;break e}j=jr,jr=S,j!==null&&(jr===null?jr=j:jr.push.apply(jr,j))}S=P}if(j=!1,S!==2)continue}}if(S===1){jl(l,0),ki(l,s,0,!0);break}e:{switch(v=l,j=S,j){case 0:case 1:throw Error(a(345));case 4:if((s&4194048)!==s)break;case 6:ki(v,s,qr,!_i);break e;case 2:jr=null;break;case 3:case 5:break;default:throw Error(a(329))}if((s&62914560)===s&&(S=Vf+300-It(),10<S)){if(ki(v,s,qr,!_i),af(v,0,!0)!==0)break e;Ta=s,v.timeoutHandle=xC(HO.bind(null,v,p,jr,Xf,sg,s,qr,ho,El,_i,j,"Throttled",-0,0),S);break e}HO(v,p,jr,Xf,sg,s,qr,ho,El,_i,j,null,-0,0)}}break}while(!0);Fn(l)}function HO(l,s,p,v,S,j,P,I,V,ae,de,me,ie,se){if(l.timeoutHandle=-1,me=s.subtreeFlags,me&8192||(me&16785408)===16785408){me={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:ma},LO(s,j,me);var Se=(j&62914560)===j?Vf-It():(j&4194048)===j?BO-It():0;if(Se=SH(me,Se),Se!==null){Ta=j,l.cancelPendingCommit=Se(QO.bind(null,l,s,j,p,v,S,P,I,V,de,me,null,ie,se)),ki(l,j,P,!ae);return}}QO(l,s,j,p,v,S,P,I,V)}function qF(l){for(var s=l;;){var p=s.tag;if((p===0||p===11||p===15)&&s.flags&16384&&(p=s.updateQueue,p!==null&&(p=p.stores,p!==null)))for(var v=0;v<p.length;v++){var S=p[v],j=S.getSnapshot;S=S.value;try{if(!Rr(j(),S))return!1}catch{return!1}}if(p=s.child,s.subtreeFlags&16384&&p!==null)p.return=s,s=p;else{if(s===l)break;for(;s.sibling===null;){if(s.return===null||s.return===l)return!0;s=s.return}s.sibling.return=s.return,s=s.sibling}}return!0}function ki(l,s,p,v){s&=~ug,s&=~ho,l.suspendedLanes|=s,l.pingedLanes&=~s,v&&(l.warmLanes|=s),v=l.expirationTimes;for(var S=s;0<S;){var j=31-Pr(S),P=1<<j;v[j]=-1,S&=~P}p!==0&&ej(l,p,s)}function Wf(){return(Ge&6)===0?(ls(0),!1):!0}function hg(){if(De!==null){if(Ve===0)var l=De.return;else l=De,ba=no=null,Cv(l),vl=null,Fu=0,l=De;for(;l!==null;)_O(l.alternate,l),l=l.return;De=null}}function jl(l,s){var p=l.timeoutHandle;p!==-1&&(l.timeoutHandle=-1,iH(p)),p=l.cancelPendingCommit,p!==null&&(l.cancelPendingCommit=null,p()),Ta=0,hg(),et=l,De=p=ga(l.current,null),Ie=s,Ve=0,zr=null,_i=!1,Sl=ju(l,s),lg=!1,El=qr=ug=ho=wi=yt=0,jr=is=null,sg=!1,(s&8)!==0&&(s|=s&32);var v=l.entangledLanes;if(v!==0)for(l=l.entanglements,v&=s;0<v;){var S=31-Pr(v),j=1<<S;s|=l[S],v&=~j}return Ca=s,gf(),p}function GO(l,s){Me=null,$.H=Zu,s===ml||s===kf?(s=lA(),Ve=3):s===gv?(s=lA(),Ve=4):Ve=s===Gv?8:s!==null&&typeof s=="object"&&typeof s.then=="function"?6:1,zr=s,De===null&&(yt=1,qf(l,Qr(s,l.current)))}function KO(){var l=Lr.current;return l===null?!0:(Ie&4194048)===Ie?rn===null:(Ie&62914560)===Ie||(Ie&536870912)!==0?l===rn:!1}function VO(){var l=$.H;return $.H=Zu,l===null?Zu:l}function YO(){var l=$.A;return $.A=IF,l}function Zf(){yt=4,_i||(Ie&4194048)!==Ie&&Lr.current!==null||(Sl=!0),(wi&134217727)===0&&(ho&134217727)===0||et===null||ki(et,Ie,qr,!1)}function pg(l,s,p){var v=Ge;Ge|=2;var S=VO(),j=YO();(et!==l||Ie!==s)&&(Xf=null,jl(l,s)),s=!1;var P=yt;e:do try{if(Ve!==0&&De!==null){var I=De,V=zr;switch(Ve){case 8:hg(),P=6;break e;case 3:case 2:case 9:case 6:Lr.current===null&&(s=!0);var ae=Ve;if(Ve=0,zr=null,Al(l,I,V,ae),p&&Sl){P=0;break e}break;default:ae=Ve,Ve=0,zr=null,Al(l,I,V,ae)}}BF(),P=yt;break}catch(de){GO(l,de)}while(!0);return s&&l.shellSuspendCounter++,ba=no=null,Ge=v,$.H=S,$.A=j,De===null&&(et=null,Ie=0,gf()),P}function BF(){for(;De!==null;)XO(De)}function $F(l,s){var p=Ge;Ge|=2;var v=VO(),S=YO();et!==l||Ie!==s?(Xf=null,Yf=It()+500,jl(l,s)):Sl=ju(l,s);e:do try{if(Ve!==0&&De!==null){s=De;var j=zr;t:switch(Ve){case 1:Ve=0,zr=null,Al(l,s,j,1);break;case 2:case 9:if(iA(j)){Ve=0,zr=null,WO(s);break}s=function(){Ve!==2&&Ve!==9||et!==l||(Ve=7),Fn(l)},j.then(s,s);break e;case 3:Ve=7;break e;case 4:Ve=5;break e;case 7:iA(j)?(Ve=0,zr=null,WO(s)):(Ve=0,zr=null,Al(l,s,j,7));break;case 5:var P=null;switch(De.tag){case 26:P=De.memoizedState;case 5:case 27:var I=De;if(P?DC(P):I.stateNode.complete){Ve=0,zr=null;var V=I.sibling;if(V!==null)De=V;else{var ae=I.return;ae!==null?(De=ae,Qf(ae)):De=null}break t}}Ve=0,zr=null,Al(l,s,j,5);break;case 6:Ve=0,zr=null,Al(l,s,j,6);break;case 8:hg(),yt=6;break e;default:throw Error(a(462))}}UF();break}catch(de){GO(l,de)}while(!0);return ba=no=null,$.H=v,$.A=S,Ge=p,De!==null?0:(et=null,Ie=0,gf(),yt)}function UF(){for(;De!==null&&!qn();)XO(De)}function XO(l){var s=bO(l.alternate,l,Ca);l.memoizedProps=l.pendingProps,s===null?Qf(l):De=s}function WO(l){var s=l,p=s.alternate;switch(s.tag){case 15:case 0:s=hO(p,s,s.pendingProps,s.type,void 0,Ie);break;case 11:s=hO(p,s,s.pendingProps,s.type.render,s.ref,Ie);break;case 5:Cv(s);default:_O(p,s),s=De=Yj(s,Ca),s=bO(p,s,Ca)}l.memoizedProps=l.pendingProps,s===null?Qf(l):De=s}function Al(l,s,p,v){ba=no=null,Cv(s),vl=null,Fu=0;var S=s.return;try{if(TF(l,S,s,p,Ie)){yt=1,qf(l,Qr(p,l.current)),De=null;return}}catch(j){if(S!==null)throw De=S,j;yt=1,qf(l,Qr(p,l.current)),De=null;return}s.flags&32768?(qe||v===1?l=!0:Sl||(Ie&536870912)!==0?l=!1:(_i=l=!0,(v===2||v===9||v===3||v===6)&&(v=Lr.current,v!==null&&v.tag===13&&(v.flags|=16384))),ZO(s,l)):Qf(s)}function Qf(l){var s=l;do{if((s.flags&32768)!==0){ZO(s,_i);return}l=s.return;var p=PF(s.alternate,s,Ca);if(p!==null){De=p;return}if(s=s.sibling,s!==null){De=s;return}De=s=l}while(s!==null);yt===0&&(yt=5)}function ZO(l,s){do{var p=RF(l.alternate,l);if(p!==null){p.flags&=32767,De=p;return}if(p=l.return,p!==null&&(p.flags|=32768,p.subtreeFlags=0,p.deletions=null),!s&&(l=l.sibling,l!==null)){De=l;return}De=l=p}while(l!==null);yt=6,De=null}function QO(l,s,p,v,S,j,P,I,V){l.cancelPendingCommit=null;do Jf();while(Nt!==0);if((Ge&6)!==0)throw Error(a(327));if(s!==null){if(s===l.current)throw Error(a(177));if(j=s.lanes|s.childLanes,j|=rv,_U(l,p,j,P,I,V),l===et&&(De=et=null,Ie=0),kl=s,Ei=l,Ta=p,cg=j,fg=S,$O=v,(s.subtreeFlags&10256)!==0||(s.flags&10256)!==0?(l.callbackNode=null,l.callbackPriority=0,KF(Sn,function(){return nC(),null})):(l.callbackNode=null,l.callbackPriority=0),v=(s.flags&13878)!==0,(s.subtreeFlags&13878)!==0||v){v=$.T,$.T=null,S=J.p,J.p=2,P=Ge,Ge|=4;try{DF(l,s,p)}finally{Ge=P,J.p=S,$.T=v}}Nt=1,JO(),eC(),tC()}}function JO(){if(Nt===1){Nt=0;var l=Ei,s=kl,p=(s.flags&13878)!==0;if((s.subtreeFlags&13878)!==0||p){p=$.T,$.T=null;var v=J.p;J.p=2;var S=Ge;Ge|=4;try{PO(s,l);var j=jg,P=qj(l.containerInfo),I=j.focusedElem,V=j.selectionRange;if(P!==I&&I&&I.ownerDocument&&zj(I.ownerDocument.documentElement,I)){if(V!==null&&Zm(I)){var ae=V.start,de=V.end;if(de===void 0&&(de=ae),"selectionStart"in I)I.selectionStart=ae,I.selectionEnd=Math.min(de,I.value.length);else{var me=I.ownerDocument||document,ie=me&&me.defaultView||window;if(ie.getSelection){var se=ie.getSelection(),Se=I.textContent.length,Ce=Math.min(V.start,Se),Ze=V.end===void 0?Ce:Math.min(V.end,Se);!se.extend&&Ce>Ze&&(P=Ze,Ze=Ce,Ce=P);var ee=Ij(I,Ce),X=Ij(I,Ze);if(ee&&X&&(se.rangeCount!==1||se.anchorNode!==ee.node||se.anchorOffset!==ee.offset||se.focusNode!==X.node||se.focusOffset!==X.offset)){var ne=me.createRange();ne.setStart(ee.node,ee.offset),se.removeAllRanges(),Ce>Ze?(se.addRange(ne),se.extend(X.node,X.offset)):(ne.setEnd(X.node,X.offset),se.addRange(ne))}}}}for(me=[],se=I;se=se.parentNode;)se.nodeType===1&&me.push({element:se,left:se.scrollLeft,top:se.scrollTop});for(typeof I.focus=="function"&&I.focus(),I=0;I<me.length;I++){var pe=me[I];pe.element.scrollLeft=pe.left,pe.element.scrollTop=pe.top}}fd=!!kg,jg=kg=null}finally{Ge=S,J.p=v,$.T=p}}l.current=s,Nt=2}}function eC(){if(Nt===2){Nt=0;var l=Ei,s=kl,p=(s.flags&8772)!==0;if((s.subtreeFlags&8772)!==0||p){p=$.T,$.T=null;var v=J.p;J.p=2;var S=Ge;Ge|=4;try{OO(l,s.alternate,s)}finally{Ge=S,J.p=v,$.T=p}}Nt=3}}function tC(){if(Nt===4||Nt===3){Nt=0,nr();var l=Ei,s=kl,p=Ta,v=$O;(s.subtreeFlags&10256)!==0||(s.flags&10256)!==0?Nt=5:(Nt=0,kl=Ei=null,rC(l,l.pendingLanes));var S=l.pendingLanes;if(S===0&&(Si=null),Mm(p),s=s.stateNode,_t&&typeof _t.onCommitFiberRoot=="function")try{_t.onCommitFiberRoot(xr,s,void 0,(s.current.flags&128)===128)}catch{}if(v!==null){s=$.T,S=J.p,J.p=2,$.T=null;try{for(var j=l.onRecoverableError,P=0;P<v.length;P++){var I=v[P];j(I.value,{componentStack:I.stack})}}finally{$.T=s,J.p=S}}(Ta&3)!==0&&Jf(),Fn(l),S=l.pendingLanes,(p&261930)!==0&&(S&42)!==0?l===dg?os++:(os=0,dg=l):os=0,ls(0)}}function rC(l,s){(l.pooledCacheLanes&=s)===0&&(s=l.pooledCache,s!=null&&(l.pooledCache=null,$u(s)))}function Jf(){return JO(),eC(),tC(),nC()}function nC(){if(Nt!==5)return!1;var l=Ei,s=cg;cg=0;var p=Mm(Ta),v=$.T,S=J.p;try{J.p=32>p?32:p,$.T=null,p=fg,fg=null;var j=Ei,P=Ta;if(Nt=0,kl=Ei=null,Ta=0,(Ge&6)!==0)throw Error(a(331));var I=Ge;if(Ge|=4,zO(j.current),DO(j,j.current,P,p),Ge=I,ls(0,!1),_t&&typeof _t.onPostCommitFiberRoot=="function")try{_t.onPostCommitFiberRoot(xr,j)}catch{}return!0}finally{J.p=S,$.T=v,rC(l,s)}}function aC(l,s,p){s=Qr(p,s),s=Hv(l.stateNode,s,2),l=gi(l,s,2),l!==null&&(Au(l,2),Fn(l))}function Ye(l,s,p){if(l.tag===3)aC(l,l,p);else for(;s!==null;){if(s.tag===3){aC(s,l,p);break}else if(s.tag===1){var v=s.stateNode;if(typeof s.type.getDerivedStateFromError=="function"||typeof v.componentDidCatch=="function"&&(Si===null||!Si.has(v))){l=Qr(p,l),p=iO(2),v=gi(s,p,2),v!==null&&(oO(p,v,s,l),Au(v,2),Fn(v));break}}s=s.return}}function mg(l,s,p){var v=l.pingCache;if(v===null){v=l.pingCache=new zF;var S=new Set;v.set(s,S)}else S=v.get(s),S===void 0&&(S=new Set,v.set(s,S));S.has(p)||(lg=!0,S.add(p),l=FF.bind(null,l,s,p),s.then(l,l))}function FF(l,s,p){var v=l.pingCache;v!==null&&v.delete(s),l.pingedLanes|=l.suspendedLanes&p,l.warmLanes&=~p,et===l&&(Ie&p)===p&&(yt===4||yt===3&&(Ie&62914560)===Ie&&300>It()-Vf?(Ge&2)===0&&jl(l,0):ug|=p,El===Ie&&(El=0)),Fn(l)}function iC(l,s){s===0&&(s=Jk()),l=eo(l,s),l!==null&&(Au(l,s),Fn(l))}function HF(l){var s=l.memoizedState,p=0;s!==null&&(p=s.retryLane),iC(l,p)}function GF(l,s){var p=0;switch(l.tag){case 31:case 13:var v=l.stateNode,S=l.memoizedState;S!==null&&(p=S.retryLane);break;case 19:v=l.stateNode;break;case 22:v=l.stateNode._retryCache;break;default:throw Error(a(314))}v!==null&&v.delete(s),iC(l,p)}function KF(l,s){return Su(l,s)}var ed=null,Ol=null,vg=!1,td=!1,gg=!1,ji=0;function Fn(l){l!==Ol&&l.next===null&&(Ol===null?ed=Ol=l:Ol=Ol.next=l),td=!0,vg||(vg=!0,YF())}function ls(l,s){if(!gg&&td){gg=!0;do for(var p=!1,v=ed;v!==null;){if(l!==0){var S=v.pendingLanes;if(S===0)var j=0;else{var P=v.suspendedLanes,I=v.pingedLanes;j=(1<<31-Pr(42|l)+1)-1,j&=S&~(P&~I),j=j&201326741?j&201326741|1:j?j|2:0}j!==0&&(p=!0,sC(v,j))}else j=Ie,j=af(v,v===et?j:0,v.cancelPendingCommit!==null||v.timeoutHandle!==-1),(j&3)===0||ju(v,j)||(p=!0,sC(v,j));v=v.next}while(p);gg=!1}}function VF(){oC()}function oC(){td=vg=!1;var l=0;ji!==0&&aH()&&(l=ji);for(var s=It(),p=null,v=ed;v!==null;){var S=v.next,j=lC(v,s);j===0?(v.next=null,p===null?ed=S:p.next=S,S===null&&(Ol=p)):(p=v,(l!==0||(j&3)!==0)&&(td=!0)),v=S}Nt!==0&&Nt!==5||ls(l),ji!==0&&(ji=0)}function lC(l,s){for(var p=l.suspendedLanes,v=l.pingedLanes,S=l.expirationTimes,j=l.pendingLanes&-62914561;0<j;){var P=31-Pr(j),I=1<<P,V=S[P];V===-1?((I&p)===0||(I&v)!==0)&&(S[P]=xU(I,s)):V<=s&&(l.expiredLanes|=I),j&=~I}if(s=et,p=Ie,p=af(l,l===s?p:0,l.cancelPendingCommit!==null||l.timeoutHandle!==-1),v=l.callbackNode,p===0||l===s&&(Ve===2||Ve===9)||l.cancelPendingCommit!==null)return v!==null&&v!==null&&li(v),l.callbackNode=null,l.callbackPriority=0;if((p&3)===0||ju(l,p)){if(s=p&-p,s===l.callbackPriority)return s;switch(v!==null&&li(v),Mm(p)){case 2:case 8:p=Eu;break;case 32:p=Sn;break;case 268435456:p=ku;break;default:p=Sn}return v=uC.bind(null,l),p=Su(p,v),l.callbackPriority=s,l.callbackNode=p,s}return v!==null&&v!==null&&li(v),l.callbackPriority=2,l.callbackNode=null,2}function uC(l,s){if(Nt!==0&&Nt!==5)return l.callbackNode=null,l.callbackPriority=0,null;var p=l.callbackNode;if(Jf()&&l.callbackNode!==p)return null;var v=Ie;return v=af(l,l===et?v:0,l.cancelPendingCommit!==null||l.timeoutHandle!==-1),v===0?null:(FO(l,v,s),lC(l,It()),l.callbackNode!=null&&l.callbackNode===p?uC.bind(null,l):null)}function sC(l,s){if(Jf())return null;FO(l,s,!0)}function YF(){oH(function(){(Ge&6)!==0?Su(Qc,VF):oC()})}function yg(){if(ji===0){var l=hl;l===0&&(l=tf,tf<<=1,(tf&261888)===0&&(tf=256)),ji=l}return ji}function cC(l){return l==null||typeof l=="symbol"||typeof l=="boolean"?null:typeof l=="function"?l:sf(""+l)}function fC(l,s){var p=s.ownerDocument.createElement("input");return p.name=s.name,p.value=s.value,l.id&&p.setAttribute("form",l.id),s.parentNode.insertBefore(p,s),l=new FormData(l),p.parentNode.removeChild(p),l}function XF(l,s,p,v,S){if(s==="submit"&&p&&p.stateNode===S){var j=cC((S[_r]||null).action),P=v.submitter;P&&(s=(s=P[_r]||null)?cC(s.formAction):P.getAttribute("formAction"),s!==null&&(j=s,P=null));var I=new hf("action","action",null,v,S);l.push({event:I,listeners:[{instance:null,listener:function(){if(v.defaultPrevented){if(ji!==0){var V=P?fC(S,P):new FormData(S);zv(p,{pending:!0,data:V,method:S.method,action:j},null,V)}}else typeof j=="function"&&(I.preventDefault(),V=P?fC(S,P):new FormData(S),zv(p,{pending:!0,data:V,method:S.method,action:j},j,V))},currentTarget:S}]})}}for(var bg=0;bg<tv.length;bg++){var xg=tv[bg],WF=xg.toLowerCase(),ZF=xg[0].toUpperCase()+xg.slice(1);En(WF,"on"+ZF)}En(Uj,"onAnimationEnd"),En(Fj,"onAnimationIteration"),En(Hj,"onAnimationStart"),En("dblclick","onDoubleClick"),En("focusin","onFocus"),En("focusout","onBlur"),En(hF,"onTransitionRun"),En(pF,"onTransitionStart"),En(mF,"onTransitionCancel"),En(Gj,"onTransitionEnd"),Jo("onMouseEnter",["mouseout","mouseover"]),Jo("onMouseLeave",["mouseout","mouseover"]),Jo("onPointerEnter",["pointerout","pointerover"]),Jo("onPointerLeave",["pointerout","pointerover"]),Wi("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),Wi("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),Wi("onBeforeInput",["compositionend","keypress","textInput","paste"]),Wi("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),Wi("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),Wi("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var us="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(" "),QF=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(us));function dC(l,s){s=(s&4)!==0;for(var p=0;p<l.length;p++){var v=l[p],S=v.event;v=v.listeners;e:{var j=void 0;if(s)for(var P=v.length-1;0<=P;P--){var I=v[P],V=I.instance,ae=I.currentTarget;if(I=I.listener,V!==j&&S.isPropagationStopped())break e;j=I,S.currentTarget=ae;try{j(S)}catch(de){vf(de)}S.currentTarget=null,j=V}else for(P=0;P<v.length;P++){if(I=v[P],V=I.instance,ae=I.currentTarget,I=I.listener,V!==j&&S.isPropagationStopped())break e;j=I,S.currentTarget=ae;try{j(S)}catch(de){vf(de)}S.currentTarget=null,j=V}}}}function Le(l,s){var p=s[Pm];p===void 0&&(p=s[Pm]=new Set);var v=l+"__bubble";p.has(v)||(hC(s,l,2,!1),p.add(v))}function _g(l,s,p){var v=0;s&&(v|=4),hC(p,l,v,s)}var rd="_reactListening"+Math.random().toString(36).slice(2);function wg(l){if(!l[rd]){l[rd]=!0,oj.forEach(function(p){p!=="selectionchange"&&(QF.has(p)||_g(p,!1,l),_g(p,!0,l))});var s=l.nodeType===9?l:l.ownerDocument;s===null||s[rd]||(s[rd]=!0,_g("selectionchange",!1,s))}}function hC(l,s,p,v){switch(UC(s)){case 2:var S=jH;break;case 8:S=AH;break;default:S=Ig}p=S.bind(null,s,p,l),S=void 0,!Um||s!=="touchstart"&&s!=="touchmove"&&s!=="wheel"||(S=!0),v?S!==void 0?l.addEventListener(s,p,{capture:!0,passive:S}):l.addEventListener(s,p,!0):S!==void 0?l.addEventListener(s,p,{passive:S}):l.addEventListener(s,p,!1)}function Sg(l,s,p,v,S){var j=v;if((s&1)===0&&(s&2)===0&&v!==null)e:for(;;){if(v===null)return;var P=v.tag;if(P===3||P===4){var I=v.stateNode.containerInfo;if(I===S)break;if(P===4)for(P=v.return;P!==null;){var V=P.tag;if((V===3||V===4)&&P.stateNode.containerInfo===S)return;P=P.return}for(;I!==null;){if(P=Wo(I),P===null)return;if(V=P.tag,V===5||V===6||V===26||V===27){v=j=P;continue e}I=I.parentNode}}v=v.return}yj(function(){var ae=j,de=Bm(p),me=[];e:{var ie=Kj.get(l);if(ie!==void 0){var se=hf,Se=l;switch(l){case"keypress":if(ff(p)===0)break e;case"keydown":case"keyup":se=GU;break;case"focusin":Se="focus",se=Km;break;case"focusout":Se="blur",se=Km;break;case"beforeblur":case"afterblur":se=Km;break;case"click":if(p.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":se=_j;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":se=PU;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":se=YU;break;case Uj:case Fj:case Hj:se=LU;break;case Gj:se=WU;break;case"scroll":case"scrollend":se=NU;break;case"wheel":se=QU;break;case"copy":case"cut":case"paste":se=zU;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":se=Sj;break;case"toggle":case"beforetoggle":se=eF}var Ce=(s&4)!==0,Ze=!Ce&&(l==="scroll"||l==="scrollend"),ee=Ce?ie!==null?ie+"Capture":null:ie;Ce=[];for(var X=ae,ne;X!==null;){var pe=X;if(ne=pe.stateNode,pe=pe.tag,pe!==5&&pe!==26&&pe!==27||ne===null||ee===null||(pe=Tu(X,ee),pe!=null&&Ce.push(ss(X,pe,ne))),Ze)break;X=X.return}0<Ce.length&&(ie=new se(ie,Se,null,p,de),me.push({event:ie,listeners:Ce}))}}if((s&7)===0){e:{if(ie=l==="mouseover"||l==="pointerover",se=l==="mouseout"||l==="pointerout",ie&&p!==qm&&(Se=p.relatedTarget||p.fromElement)&&(Wo(Se)||Se[Xo]))break e;if((se||ie)&&(ie=de.window===de?de:(ie=de.ownerDocument)?ie.defaultView||ie.parentWindow:window,se?(Se=p.relatedTarget||p.toElement,se=ae,Se=Se?Wo(Se):null,Se!==null&&(Ze=o(Se),Ce=Se.tag,Se!==Ze||Ce!==5&&Ce!==27&&Ce!==6)&&(Se=null)):(se=null,Se=ae),se!==Se)){if(Ce=_j,pe="onMouseLeave",ee="onMouseEnter",X="mouse",(l==="pointerout"||l==="pointerover")&&(Ce=Sj,pe="onPointerLeave",ee="onPointerEnter",X="pointer"),Ze=se==null?ie:Cu(se),ne=Se==null?ie:Cu(Se),ie=new Ce(pe,X+"leave",se,p,de),ie.target=Ze,ie.relatedTarget=ne,pe=null,Wo(de)===ae&&(Ce=new Ce(ee,X+"enter",Se,p,de),Ce.target=ne,Ce.relatedTarget=Ze,pe=Ce),Ze=pe,se&&Se)t:{for(Ce=JF,ee=se,X=Se,ne=0,pe=ee;pe;pe=Ce(pe))ne++;pe=0;for(var Oe=X;Oe;Oe=Ce(Oe))pe++;for(;0<ne-pe;)ee=Ce(ee),ne--;for(;0<pe-ne;)X=Ce(X),pe--;for(;ne--;){if(ee===X||X!==null&&ee===X.alternate){Ce=ee;break t}ee=Ce(ee),X=Ce(X)}Ce=null}else Ce=null;se!==null&&pC(me,ie,se,Ce,!1),Se!==null&&Ze!==null&&pC(me,Ze,Se,Ce,!0)}}e:{if(ie=ae?Cu(ae):window,se=ie.nodeName&&ie.nodeName.toLowerCase(),se==="select"||se==="input"&&ie.type==="file")var Ue=Nj;else if(Cj(ie))if(Mj)Ue=cF;else{Ue=uF;var Ee=lF}else se=ie.nodeName,!se||se.toLowerCase()!=="input"||ie.type!=="checkbox"&&ie.type!=="radio"?ae&&zm(ae.elementType)&&(Ue=Nj):Ue=sF;if(Ue&&(Ue=Ue(l,ae))){Tj(me,Ue,p,de);break e}Ee&&Ee(l,ie,ae),l==="focusout"&&ae&&ie.type==="number"&&ae.memoizedProps.value!=null&&Im(ie,"number",ie.value)}switch(Ee=ae?Cu(ae):window,l){case"focusin":(Cj(Ee)||Ee.contentEditable==="true")&&(il=Ee,Qm=ae,zu=null);break;case"focusout":zu=Qm=il=null;break;case"mousedown":Jm=!0;break;case"contextmenu":case"mouseup":case"dragend":Jm=!1,Bj(me,p,de);break;case"selectionchange":if(dF)break;case"keydown":case"keyup":Bj(me,p,de)}var Pe;if(Ym)e:{switch(l){case"compositionstart":var ze="onCompositionStart";break e;case"compositionend":ze="onCompositionEnd";break e;case"compositionupdate":ze="onCompositionUpdate";break e}ze=void 0}else al?Aj(l,p)&&(ze="onCompositionEnd"):l==="keydown"&&p.keyCode===229&&(ze="onCompositionStart");ze&&(Ej&&p.locale!=="ko"&&(al||ze!=="onCompositionStart"?ze==="onCompositionEnd"&&al&&(Pe=bj()):(ci=de,Fm="value"in ci?ci.value:ci.textContent,al=!0)),Ee=nd(ae,ze),0<Ee.length&&(ze=new wj(ze,l,null,p,de),me.push({event:ze,listeners:Ee}),Pe?ze.data=Pe:(Pe=Oj(p),Pe!==null&&(ze.data=Pe)))),(Pe=rF?nF(l,p):aF(l,p))&&(ze=nd(ae,"onBeforeInput"),0<ze.length&&(Ee=new wj("onBeforeInput","beforeinput",null,p,de),me.push({event:Ee,listeners:ze}),Ee.data=Pe)),XF(me,l,ae,p,de)}dC(me,s)})}function ss(l,s,p){return{instance:l,listener:s,currentTarget:p}}function nd(l,s){for(var p=s+"Capture",v=[];l!==null;){var S=l,j=S.stateNode;if(S=S.tag,S!==5&&S!==26&&S!==27||j===null||(S=Tu(l,p),S!=null&&v.unshift(ss(l,S,j)),S=Tu(l,s),S!=null&&v.push(ss(l,S,j))),l.tag===3)return v;l=l.return}return[]}function JF(l){if(l===null)return null;do l=l.return;while(l&&l.tag!==5&&l.tag!==27);return l||null}function pC(l,s,p,v,S){for(var j=s._reactName,P=[];p!==null&&p!==v;){var I=p,V=I.alternate,ae=I.stateNode;if(I=I.tag,V!==null&&V===v)break;I!==5&&I!==26&&I!==27||ae===null||(V=ae,S?(ae=Tu(p,j),ae!=null&&P.unshift(ss(p,ae,V))):S||(ae=Tu(p,j),ae!=null&&P.push(ss(p,ae,V)))),p=p.return}P.length!==0&&l.push({event:s,listeners:P})}var eH=/\r\n?/g,tH=/\u0000|\uFFFD/g;function mC(l){return(typeof l=="string"?l:""+l).replace(eH,`
49
+ `).replace(tH,"")}function vC(l,s){return s=mC(s),mC(l)===s}function We(l,s,p,v,S,j){switch(p){case"children":typeof v=="string"?s==="body"||s==="textarea"&&v===""||tl(l,v):(typeof v=="number"||typeof v=="bigint")&&s!=="body"&&tl(l,""+v);break;case"className":lf(l,"class",v);break;case"tabIndex":lf(l,"tabindex",v);break;case"dir":case"role":case"viewBox":case"width":case"height":lf(l,p,v);break;case"style":vj(l,v,j);break;case"data":if(s!=="object"){lf(l,"data",v);break}case"src":case"href":if(v===""&&(s!=="a"||p!=="href")){l.removeAttribute(p);break}if(v==null||typeof v=="function"||typeof v=="symbol"||typeof v=="boolean"){l.removeAttribute(p);break}v=sf(""+v),l.setAttribute(p,v);break;case"action":case"formAction":if(typeof v=="function"){l.setAttribute(p,"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 j=="function"&&(p==="formAction"?(s!=="input"&&We(l,s,"name",S.name,S,null),We(l,s,"formEncType",S.formEncType,S,null),We(l,s,"formMethod",S.formMethod,S,null),We(l,s,"formTarget",S.formTarget,S,null)):(We(l,s,"encType",S.encType,S,null),We(l,s,"method",S.method,S,null),We(l,s,"target",S.target,S,null)));if(v==null||typeof v=="symbol"||typeof v=="boolean"){l.removeAttribute(p);break}v=sf(""+v),l.setAttribute(p,v);break;case"onClick":v!=null&&(l.onclick=ma);break;case"onScroll":v!=null&&Le("scroll",l);break;case"onScrollEnd":v!=null&&Le("scrollend",l);break;case"dangerouslySetInnerHTML":if(v!=null){if(typeof v!="object"||!("__html"in v))throw Error(a(61));if(p=v.__html,p!=null){if(S.children!=null)throw Error(a(60));l.innerHTML=p}}break;case"multiple":l.multiple=v&&typeof v!="function"&&typeof v!="symbol";break;case"muted":l.muted=v&&typeof v!="function"&&typeof v!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(v==null||typeof v=="function"||typeof v=="boolean"||typeof v=="symbol"){l.removeAttribute("xlink:href");break}p=sf(""+v),l.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",p);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":v!=null&&typeof v!="function"&&typeof v!="symbol"?l.setAttribute(p,""+v):l.removeAttribute(p);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":v&&typeof v!="function"&&typeof v!="symbol"?l.setAttribute(p,""):l.removeAttribute(p);break;case"capture":case"download":v===!0?l.setAttribute(p,""):v!==!1&&v!=null&&typeof v!="function"&&typeof v!="symbol"?l.setAttribute(p,v):l.removeAttribute(p);break;case"cols":case"rows":case"size":case"span":v!=null&&typeof v!="function"&&typeof v!="symbol"&&!isNaN(v)&&1<=v?l.setAttribute(p,v):l.removeAttribute(p);break;case"rowSpan":case"start":v==null||typeof v=="function"||typeof v=="symbol"||isNaN(v)?l.removeAttribute(p):l.setAttribute(p,v);break;case"popover":Le("beforetoggle",l),Le("toggle",l),of(l,"popover",v);break;case"xlinkActuate":pa(l,"http://www.w3.org/1999/xlink","xlink:actuate",v);break;case"xlinkArcrole":pa(l,"http://www.w3.org/1999/xlink","xlink:arcrole",v);break;case"xlinkRole":pa(l,"http://www.w3.org/1999/xlink","xlink:role",v);break;case"xlinkShow":pa(l,"http://www.w3.org/1999/xlink","xlink:show",v);break;case"xlinkTitle":pa(l,"http://www.w3.org/1999/xlink","xlink:title",v);break;case"xlinkType":pa(l,"http://www.w3.org/1999/xlink","xlink:type",v);break;case"xmlBase":pa(l,"http://www.w3.org/XML/1998/namespace","xml:base",v);break;case"xmlLang":pa(l,"http://www.w3.org/XML/1998/namespace","xml:lang",v);break;case"xmlSpace":pa(l,"http://www.w3.org/XML/1998/namespace","xml:space",v);break;case"is":of(l,"is",v);break;case"innerText":case"textContent":break;default:(!(2<p.length)||p[0]!=="o"&&p[0]!=="O"||p[1]!=="n"&&p[1]!=="N")&&(p=CU.get(p)||p,of(l,p,v))}}function Eg(l,s,p,v,S,j){switch(p){case"style":vj(l,v,j);break;case"dangerouslySetInnerHTML":if(v!=null){if(typeof v!="object"||!("__html"in v))throw Error(a(61));if(p=v.__html,p!=null){if(S.children!=null)throw Error(a(60));l.innerHTML=p}}break;case"children":typeof v=="string"?tl(l,v):(typeof v=="number"||typeof v=="bigint")&&tl(l,""+v);break;case"onScroll":v!=null&&Le("scroll",l);break;case"onScrollEnd":v!=null&&Le("scrollend",l);break;case"onClick":v!=null&&(l.onclick=ma);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!lj.hasOwnProperty(p))e:{if(p[0]==="o"&&p[1]==="n"&&(S=p.endsWith("Capture"),s=p.slice(2,S?p.length-7:void 0),j=l[_r]||null,j=j!=null?j[p]:null,typeof j=="function"&&l.removeEventListener(s,j,S),typeof v=="function")){typeof j!="function"&&j!==null&&(p in l?l[p]=null:l.hasAttribute(p)&&l.removeAttribute(p)),l.addEventListener(s,v,S);break e}p in l?l[p]=v:v===!0?l.setAttribute(p,""):of(l,p,v)}}}function Wt(l,s,p){switch(s){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":Le("error",l),Le("load",l);var v=!1,S=!1,j;for(j in p)if(p.hasOwnProperty(j)){var P=p[j];if(P!=null)switch(j){case"src":v=!0;break;case"srcSet":S=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(a(137,s));default:We(l,s,j,P,p,null)}}S&&We(l,s,"srcSet",p.srcSet,p,null),v&&We(l,s,"src",p.src,p,null);return;case"input":Le("invalid",l);var I=j=P=S=null,V=null,ae=null;for(v in p)if(p.hasOwnProperty(v)){var de=p[v];if(de!=null)switch(v){case"name":S=de;break;case"type":P=de;break;case"checked":V=de;break;case"defaultChecked":ae=de;break;case"value":j=de;break;case"defaultValue":I=de;break;case"children":case"dangerouslySetInnerHTML":if(de!=null)throw Error(a(137,s));break;default:We(l,s,v,de,p,null)}}dj(l,j,I,V,ae,P,S,!1);return;case"select":Le("invalid",l),v=P=j=null;for(S in p)if(p.hasOwnProperty(S)&&(I=p[S],I!=null))switch(S){case"value":j=I;break;case"defaultValue":P=I;break;case"multiple":v=I;default:We(l,s,S,I,p,null)}s=j,p=P,l.multiple=!!v,s!=null?el(l,!!v,s,!1):p!=null&&el(l,!!v,p,!0);return;case"textarea":Le("invalid",l),j=S=v=null;for(P in p)if(p.hasOwnProperty(P)&&(I=p[P],I!=null))switch(P){case"value":v=I;break;case"defaultValue":S=I;break;case"children":j=I;break;case"dangerouslySetInnerHTML":if(I!=null)throw Error(a(91));break;default:We(l,s,P,I,p,null)}pj(l,v,S,j);return;case"option":for(V in p)if(p.hasOwnProperty(V)&&(v=p[V],v!=null))switch(V){case"selected":l.selected=v&&typeof v!="function"&&typeof v!="symbol";break;default:We(l,s,V,v,p,null)}return;case"dialog":Le("beforetoggle",l),Le("toggle",l),Le("cancel",l),Le("close",l);break;case"iframe":case"object":Le("load",l);break;case"video":case"audio":for(v=0;v<us.length;v++)Le(us[v],l);break;case"image":Le("error",l),Le("load",l);break;case"details":Le("toggle",l);break;case"embed":case"source":case"link":Le("error",l),Le("load",l);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(ae in p)if(p.hasOwnProperty(ae)&&(v=p[ae],v!=null))switch(ae){case"children":case"dangerouslySetInnerHTML":throw Error(a(137,s));default:We(l,s,ae,v,p,null)}return;default:if(zm(s)){for(de in p)p.hasOwnProperty(de)&&(v=p[de],v!==void 0&&Eg(l,s,de,v,p,void 0));return}}for(I in p)p.hasOwnProperty(I)&&(v=p[I],v!=null&&We(l,s,I,v,p,null))}function rH(l,s,p,v){switch(s){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var S=null,j=null,P=null,I=null,V=null,ae=null,de=null;for(se in p){var me=p[se];if(p.hasOwnProperty(se)&&me!=null)switch(se){case"checked":break;case"value":break;case"defaultValue":V=me;default:v.hasOwnProperty(se)||We(l,s,se,null,v,me)}}for(var ie in v){var se=v[ie];if(me=p[ie],v.hasOwnProperty(ie)&&(se!=null||me!=null))switch(ie){case"type":j=se;break;case"name":S=se;break;case"checked":ae=se;break;case"defaultChecked":de=se;break;case"value":P=se;break;case"defaultValue":I=se;break;case"children":case"dangerouslySetInnerHTML":if(se!=null)throw Error(a(137,s));break;default:se!==me&&We(l,s,ie,se,v,me)}}Lm(l,P,I,V,ae,de,j,S);return;case"select":se=P=I=ie=null;for(j in p)if(V=p[j],p.hasOwnProperty(j)&&V!=null)switch(j){case"value":break;case"multiple":se=V;default:v.hasOwnProperty(j)||We(l,s,j,null,v,V)}for(S in v)if(j=v[S],V=p[S],v.hasOwnProperty(S)&&(j!=null||V!=null))switch(S){case"value":ie=j;break;case"defaultValue":I=j;break;case"multiple":P=j;default:j!==V&&We(l,s,S,j,v,V)}s=I,p=P,v=se,ie!=null?el(l,!!p,ie,!1):!!v!=!!p&&(s!=null?el(l,!!p,s,!0):el(l,!!p,p?[]:"",!1));return;case"textarea":se=ie=null;for(I in p)if(S=p[I],p.hasOwnProperty(I)&&S!=null&&!v.hasOwnProperty(I))switch(I){case"value":break;case"children":break;default:We(l,s,I,null,v,S)}for(P in v)if(S=v[P],j=p[P],v.hasOwnProperty(P)&&(S!=null||j!=null))switch(P){case"value":ie=S;break;case"defaultValue":se=S;break;case"children":break;case"dangerouslySetInnerHTML":if(S!=null)throw Error(a(91));break;default:S!==j&&We(l,s,P,S,v,j)}hj(l,ie,se);return;case"option":for(var Se in p)if(ie=p[Se],p.hasOwnProperty(Se)&&ie!=null&&!v.hasOwnProperty(Se))switch(Se){case"selected":l.selected=!1;break;default:We(l,s,Se,null,v,ie)}for(V in v)if(ie=v[V],se=p[V],v.hasOwnProperty(V)&&ie!==se&&(ie!=null||se!=null))switch(V){case"selected":l.selected=ie&&typeof ie!="function"&&typeof ie!="symbol";break;default:We(l,s,V,ie,v,se)}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 Ce in p)ie=p[Ce],p.hasOwnProperty(Ce)&&ie!=null&&!v.hasOwnProperty(Ce)&&We(l,s,Ce,null,v,ie);for(ae in v)if(ie=v[ae],se=p[ae],v.hasOwnProperty(ae)&&ie!==se&&(ie!=null||se!=null))switch(ae){case"children":case"dangerouslySetInnerHTML":if(ie!=null)throw Error(a(137,s));break;default:We(l,s,ae,ie,v,se)}return;default:if(zm(s)){for(var Ze in p)ie=p[Ze],p.hasOwnProperty(Ze)&&ie!==void 0&&!v.hasOwnProperty(Ze)&&Eg(l,s,Ze,void 0,v,ie);for(de in v)ie=v[de],se=p[de],!v.hasOwnProperty(de)||ie===se||ie===void 0&&se===void 0||Eg(l,s,de,ie,v,se);return}}for(var ee in p)ie=p[ee],p.hasOwnProperty(ee)&&ie!=null&&!v.hasOwnProperty(ee)&&We(l,s,ee,null,v,ie);for(me in v)ie=v[me],se=p[me],!v.hasOwnProperty(me)||ie===se||ie==null&&se==null||We(l,s,me,ie,v,se)}function gC(l){switch(l){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function nH(){if(typeof performance.getEntriesByType=="function"){for(var l=0,s=0,p=performance.getEntriesByType("resource"),v=0;v<p.length;v++){var S=p[v],j=S.transferSize,P=S.initiatorType,I=S.duration;if(j&&I&&gC(P)){for(P=0,I=S.responseEnd,v+=1;v<p.length;v++){var V=p[v],ae=V.startTime;if(ae>I)break;var de=V.transferSize,me=V.initiatorType;de&&gC(me)&&(V=V.responseEnd,P+=de*(V<I?1:(I-ae)/(V-ae)))}if(--v,s+=8*(j+P)/(S.duration/1e3),l++,10<l)break}}if(0<l)return s/l/1e6}return navigator.connection&&(l=navigator.connection.downlink,typeof l=="number")?l:5}var kg=null,jg=null;function ad(l){return l.nodeType===9?l:l.ownerDocument}function yC(l){switch(l){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function bC(l,s){if(l===0)switch(s){case"svg":return 1;case"math":return 2;default:return 0}return l===1&&s==="foreignObject"?0:l}function Ag(l,s){return l==="textarea"||l==="noscript"||typeof s.children=="string"||typeof s.children=="number"||typeof s.children=="bigint"||typeof s.dangerouslySetInnerHTML=="object"&&s.dangerouslySetInnerHTML!==null&&s.dangerouslySetInnerHTML.__html!=null}var Og=null;function aH(){var l=window.event;return l&&l.type==="popstate"?l===Og?!1:(Og=l,!0):(Og=null,!1)}var xC=typeof setTimeout=="function"?setTimeout:void 0,iH=typeof clearTimeout=="function"?clearTimeout:void 0,_C=typeof Promise=="function"?Promise:void 0,oH=typeof queueMicrotask=="function"?queueMicrotask:typeof _C<"u"?function(l){return _C.resolve(null).then(l).catch(lH)}:xC;function lH(l){setTimeout(function(){throw l})}function Ai(l){return l==="head"}function wC(l,s){var p=s,v=0;do{var S=p.nextSibling;if(l.removeChild(p),S&&S.nodeType===8)if(p=S.data,p==="/$"||p==="/&"){if(v===0){l.removeChild(S),Ml(s);return}v--}else if(p==="$"||p==="$?"||p==="$~"||p==="$!"||p==="&")v++;else if(p==="html")cs(l.ownerDocument.documentElement);else if(p==="head"){p=l.ownerDocument.head,cs(p);for(var j=p.firstChild;j;){var P=j.nextSibling,I=j.nodeName;j[Ou]||I==="SCRIPT"||I==="STYLE"||I==="LINK"&&j.rel.toLowerCase()==="stylesheet"||p.removeChild(j),j=P}}else p==="body"&&cs(l.ownerDocument.body);p=S}while(p);Ml(s)}function SC(l,s){var p=l;l=0;do{var v=p.nextSibling;if(p.nodeType===1?s?(p._stashedDisplay=p.style.display,p.style.display="none"):(p.style.display=p._stashedDisplay||"",p.getAttribute("style")===""&&p.removeAttribute("style")):p.nodeType===3&&(s?(p._stashedText=p.nodeValue,p.nodeValue=""):p.nodeValue=p._stashedText||""),v&&v.nodeType===8)if(p=v.data,p==="/$"){if(l===0)break;l--}else p!=="$"&&p!=="$?"&&p!=="$~"&&p!=="$!"||l++;p=v}while(p)}function Cg(l){var s=l.firstChild;for(s&&s.nodeType===10&&(s=s.nextSibling);s;){var p=s;switch(s=s.nextSibling,p.nodeName){case"HTML":case"HEAD":case"BODY":Cg(p),Rm(p);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(p.rel.toLowerCase()==="stylesheet")continue}l.removeChild(p)}}function uH(l,s,p,v){for(;l.nodeType===1;){var S=p;if(l.nodeName.toLowerCase()!==s.toLowerCase()){if(!v&&(l.nodeName!=="INPUT"||l.type!=="hidden"))break}else if(v){if(!l[Ou])switch(s){case"meta":if(!l.hasAttribute("itemprop"))break;return l;case"link":if(j=l.getAttribute("rel"),j==="stylesheet"&&l.hasAttribute("data-precedence"))break;if(j!==S.rel||l.getAttribute("href")!==(S.href==null||S.href===""?null:S.href)||l.getAttribute("crossorigin")!==(S.crossOrigin==null?null:S.crossOrigin)||l.getAttribute("title")!==(S.title==null?null:S.title))break;return l;case"style":if(l.hasAttribute("data-precedence"))break;return l;case"script":if(j=l.getAttribute("src"),(j!==(S.src==null?null:S.src)||l.getAttribute("type")!==(S.type==null?null:S.type)||l.getAttribute("crossorigin")!==(S.crossOrigin==null?null:S.crossOrigin))&&j&&l.hasAttribute("async")&&!l.hasAttribute("itemprop"))break;return l;default:return l}}else if(s==="input"&&l.type==="hidden"){var j=S.name==null?null:""+S.name;if(S.type==="hidden"&&l.getAttribute("name")===j)return l}else return l;if(l=nn(l.nextSibling),l===null)break}return null}function sH(l,s,p){if(s==="")return null;for(;l.nodeType!==3;)if((l.nodeType!==1||l.nodeName!=="INPUT"||l.type!=="hidden")&&!p||(l=nn(l.nextSibling),l===null))return null;return l}function EC(l,s){for(;l.nodeType!==8;)if((l.nodeType!==1||l.nodeName!=="INPUT"||l.type!=="hidden")&&!s||(l=nn(l.nextSibling),l===null))return null;return l}function Tg(l){return l.data==="$?"||l.data==="$~"}function Ng(l){return l.data==="$!"||l.data==="$?"&&l.ownerDocument.readyState!=="loading"}function cH(l,s){var p=l.ownerDocument;if(l.data==="$~")l._reactRetry=s;else if(l.data!=="$?"||p.readyState!=="loading")s();else{var v=function(){s(),p.removeEventListener("DOMContentLoaded",v)};p.addEventListener("DOMContentLoaded",v),l._reactRetry=v}}function nn(l){for(;l!=null;l=l.nextSibling){var s=l.nodeType;if(s===1||s===3)break;if(s===8){if(s=l.data,s==="$"||s==="$!"||s==="$?"||s==="$~"||s==="&"||s==="F!"||s==="F")break;if(s==="/$"||s==="/&")return null}}return l}var Mg=null;function kC(l){l=l.nextSibling;for(var s=0;l;){if(l.nodeType===8){var p=l.data;if(p==="/$"||p==="/&"){if(s===0)return nn(l.nextSibling);s--}else p!=="$"&&p!=="$!"&&p!=="$?"&&p!=="$~"&&p!=="&"||s++}l=l.nextSibling}return null}function jC(l){l=l.previousSibling;for(var s=0;l;){if(l.nodeType===8){var p=l.data;if(p==="$"||p==="$!"||p==="$?"||p==="$~"||p==="&"){if(s===0)return l;s--}else p!=="/$"&&p!=="/&"||s++}l=l.previousSibling}return null}function AC(l,s,p){switch(s=ad(p),l){case"html":if(l=s.documentElement,!l)throw Error(a(452));return l;case"head":if(l=s.head,!l)throw Error(a(453));return l;case"body":if(l=s.body,!l)throw Error(a(454));return l;default:throw Error(a(451))}}function cs(l){for(var s=l.attributes;s.length;)l.removeAttributeNode(s[0]);Rm(l)}var an=new Map,OC=new Set;function id(l){return typeof l.getRootNode=="function"?l.getRootNode():l.nodeType===9?l:l.ownerDocument}var Na=J.d;J.d={f:fH,r:dH,D:hH,C:pH,L:mH,m:vH,X:yH,S:gH,M:bH};function fH(){var l=Na.f(),s=Wf();return l||s}function dH(l){var s=Zo(l);s!==null&&s.tag===5&&s.type==="form"?GA(s):Na.r(l)}var Cl=typeof document>"u"?null:document;function CC(l,s,p){var v=Cl;if(v&&typeof s=="string"&&s){var S=Wr(s);S='link[rel="'+l+'"][href="'+S+'"]',typeof p=="string"&&(S+='[crossorigin="'+p+'"]'),OC.has(S)||(OC.add(S),l={rel:l,crossOrigin:p,href:s},v.querySelector(S)===null&&(s=v.createElement("link"),Wt(s,"link",l),zt(s),v.head.appendChild(s)))}}function hH(l){Na.D(l),CC("dns-prefetch",l,null)}function pH(l,s){Na.C(l,s),CC("preconnect",l,s)}function mH(l,s,p){Na.L(l,s,p);var v=Cl;if(v&&l&&s){var S='link[rel="preload"][as="'+Wr(s)+'"]';s==="image"&&p&&p.imageSrcSet?(S+='[imagesrcset="'+Wr(p.imageSrcSet)+'"]',typeof p.imageSizes=="string"&&(S+='[imagesizes="'+Wr(p.imageSizes)+'"]')):S+='[href="'+Wr(l)+'"]';var j=S;switch(s){case"style":j=Tl(l);break;case"script":j=Nl(l)}an.has(j)||(l=m({rel:"preload",href:s==="image"&&p&&p.imageSrcSet?void 0:l,as:s},p),an.set(j,l),v.querySelector(S)!==null||s==="style"&&v.querySelector(fs(j))||s==="script"&&v.querySelector(ds(j))||(s=v.createElement("link"),Wt(s,"link",l),zt(s),v.head.appendChild(s)))}}function vH(l,s){Na.m(l,s);var p=Cl;if(p&&l){var v=s&&typeof s.as=="string"?s.as:"script",S='link[rel="modulepreload"][as="'+Wr(v)+'"][href="'+Wr(l)+'"]',j=S;switch(v){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":j=Nl(l)}if(!an.has(j)&&(l=m({rel:"modulepreload",href:l},s),an.set(j,l),p.querySelector(S)===null)){switch(v){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(p.querySelector(ds(j)))return}v=p.createElement("link"),Wt(v,"link",l),zt(v),p.head.appendChild(v)}}}function gH(l,s,p){Na.S(l,s,p);var v=Cl;if(v&&l){var S=Qo(v).hoistableStyles,j=Tl(l);s=s||"default";var P=S.get(j);if(!P){var I={loading:0,preload:null};if(P=v.querySelector(fs(j)))I.loading=5;else{l=m({rel:"stylesheet",href:l,"data-precedence":s},p),(p=an.get(j))&&Pg(l,p);var V=P=v.createElement("link");zt(V),Wt(V,"link",l),V._p=new Promise(function(ae,de){V.onload=ae,V.onerror=de}),V.addEventListener("load",function(){I.loading|=1}),V.addEventListener("error",function(){I.loading|=2}),I.loading|=4,od(P,s,v)}P={type:"stylesheet",instance:P,count:1,state:I},S.set(j,P)}}}function yH(l,s){Na.X(l,s);var p=Cl;if(p&&l){var v=Qo(p).hoistableScripts,S=Nl(l),j=v.get(S);j||(j=p.querySelector(ds(S)),j||(l=m({src:l,async:!0},s),(s=an.get(S))&&Rg(l,s),j=p.createElement("script"),zt(j),Wt(j,"link",l),p.head.appendChild(j)),j={type:"script",instance:j,count:1,state:null},v.set(S,j))}}function bH(l,s){Na.M(l,s);var p=Cl;if(p&&l){var v=Qo(p).hoistableScripts,S=Nl(l),j=v.get(S);j||(j=p.querySelector(ds(S)),j||(l=m({src:l,async:!0,type:"module"},s),(s=an.get(S))&&Rg(l,s),j=p.createElement("script"),zt(j),Wt(j,"link",l),p.head.appendChild(j)),j={type:"script",instance:j,count:1,state:null},v.set(S,j))}}function TC(l,s,p,v){var S=(S=te.current)?id(S):null;if(!S)throw Error(a(446));switch(l){case"meta":case"title":return null;case"style":return typeof p.precedence=="string"&&typeof p.href=="string"?(s=Tl(p.href),p=Qo(S).hoistableStyles,v=p.get(s),v||(v={type:"style",instance:null,count:0,state:null},p.set(s,v)),v):{type:"void",instance:null,count:0,state:null};case"link":if(p.rel==="stylesheet"&&typeof p.href=="string"&&typeof p.precedence=="string"){l=Tl(p.href);var j=Qo(S).hoistableStyles,P=j.get(l);if(P||(S=S.ownerDocument||S,P={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},j.set(l,P),(j=S.querySelector(fs(l)))&&!j._p&&(P.instance=j,P.state.loading=5),an.has(l)||(p={rel:"preload",as:"style",href:p.href,crossOrigin:p.crossOrigin,integrity:p.integrity,media:p.media,hrefLang:p.hrefLang,referrerPolicy:p.referrerPolicy},an.set(l,p),j||xH(S,l,p,P.state))),s&&v===null)throw Error(a(528,""));return P}if(s&&v!==null)throw Error(a(529,""));return null;case"script":return s=p.async,p=p.src,typeof p=="string"&&s&&typeof s!="function"&&typeof s!="symbol"?(s=Nl(p),p=Qo(S).hoistableScripts,v=p.get(s),v||(v={type:"script",instance:null,count:0,state:null},p.set(s,v)),v):{type:"void",instance:null,count:0,state:null};default:throw Error(a(444,l))}}function Tl(l){return'href="'+Wr(l)+'"'}function fs(l){return'link[rel="stylesheet"]['+l+"]"}function NC(l){return m({},l,{"data-precedence":l.precedence,precedence:null})}function xH(l,s,p,v){l.querySelector('link[rel="preload"][as="style"]['+s+"]")?v.loading=1:(s=l.createElement("link"),v.preload=s,s.addEventListener("load",function(){return v.loading|=1}),s.addEventListener("error",function(){return v.loading|=2}),Wt(s,"link",p),zt(s),l.head.appendChild(s))}function Nl(l){return'[src="'+Wr(l)+'"]'}function ds(l){return"script[async]"+l}function MC(l,s,p){if(s.count++,s.instance===null)switch(s.type){case"style":var v=l.querySelector('style[data-href~="'+Wr(p.href)+'"]');if(v)return s.instance=v,zt(v),v;var S=m({},p,{"data-href":p.href,"data-precedence":p.precedence,href:null,precedence:null});return v=(l.ownerDocument||l).createElement("style"),zt(v),Wt(v,"style",S),od(v,p.precedence,l),s.instance=v;case"stylesheet":S=Tl(p.href);var j=l.querySelector(fs(S));if(j)return s.state.loading|=4,s.instance=j,zt(j),j;v=NC(p),(S=an.get(S))&&Pg(v,S),j=(l.ownerDocument||l).createElement("link"),zt(j);var P=j;return P._p=new Promise(function(I,V){P.onload=I,P.onerror=V}),Wt(j,"link",v),s.state.loading|=4,od(j,p.precedence,l),s.instance=j;case"script":return j=Nl(p.src),(S=l.querySelector(ds(j)))?(s.instance=S,zt(S),S):(v=p,(S=an.get(j))&&(v=m({},p),Rg(v,S)),l=l.ownerDocument||l,S=l.createElement("script"),zt(S),Wt(S,"link",v),l.head.appendChild(S),s.instance=S);case"void":return null;default:throw Error(a(443,s.type))}else s.type==="stylesheet"&&(s.state.loading&4)===0&&(v=s.instance,s.state.loading|=4,od(v,p.precedence,l));return s.instance}function od(l,s,p){for(var v=p.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),S=v.length?v[v.length-1]:null,j=S,P=0;P<v.length;P++){var I=v[P];if(I.dataset.precedence===s)j=I;else if(j!==S)break}j?j.parentNode.insertBefore(l,j.nextSibling):(s=p.nodeType===9?p.head:p,s.insertBefore(l,s.firstChild))}function Pg(l,s){l.crossOrigin==null&&(l.crossOrigin=s.crossOrigin),l.referrerPolicy==null&&(l.referrerPolicy=s.referrerPolicy),l.title==null&&(l.title=s.title)}function Rg(l,s){l.crossOrigin==null&&(l.crossOrigin=s.crossOrigin),l.referrerPolicy==null&&(l.referrerPolicy=s.referrerPolicy),l.integrity==null&&(l.integrity=s.integrity)}var ld=null;function PC(l,s,p){if(ld===null){var v=new Map,S=ld=new Map;S.set(p,v)}else S=ld,v=S.get(p),v||(v=new Map,S.set(p,v));if(v.has(l))return v;for(v.set(l,null),p=p.getElementsByTagName(l),S=0;S<p.length;S++){var j=p[S];if(!(j[Ou]||j[Kt]||l==="link"&&j.getAttribute("rel")==="stylesheet")&&j.namespaceURI!=="http://www.w3.org/2000/svg"){var P=j.getAttribute(s)||"";P=l+P;var I=v.get(P);I?I.push(j):v.set(P,[j])}}return v}function RC(l,s,p){l=l.ownerDocument||l,l.head.insertBefore(p,s==="title"?l.querySelector("head > title"):null)}function _H(l,s,p){if(p===1||s.itemProp!=null)return!1;switch(l){case"meta":case"title":return!0;case"style":if(typeof s.precedence!="string"||typeof s.href!="string"||s.href==="")break;return!0;case"link":if(typeof s.rel!="string"||typeof s.href!="string"||s.href===""||s.onLoad||s.onError)break;switch(s.rel){case"stylesheet":return l=s.disabled,typeof s.precedence=="string"&&l==null;default:return!0}case"script":if(s.async&&typeof s.async!="function"&&typeof s.async!="symbol"&&!s.onLoad&&!s.onError&&s.src&&typeof s.src=="string")return!0}return!1}function DC(l){return!(l.type==="stylesheet"&&(l.state.loading&3)===0)}function wH(l,s,p,v){if(p.type==="stylesheet"&&(typeof v.media!="string"||matchMedia(v.media).matches!==!1)&&(p.state.loading&4)===0){if(p.instance===null){var S=Tl(v.href),j=s.querySelector(fs(S));if(j){s=j._p,s!==null&&typeof s=="object"&&typeof s.then=="function"&&(l.count++,l=ud.bind(l),s.then(l,l)),p.state.loading|=4,p.instance=j,zt(j);return}j=s.ownerDocument||s,v=NC(v),(S=an.get(S))&&Pg(v,S),j=j.createElement("link"),zt(j);var P=j;P._p=new Promise(function(I,V){P.onload=I,P.onerror=V}),Wt(j,"link",v),p.instance=j}l.stylesheets===null&&(l.stylesheets=new Map),l.stylesheets.set(p,s),(s=p.state.preload)&&(p.state.loading&3)===0&&(l.count++,p=ud.bind(l),s.addEventListener("load",p),s.addEventListener("error",p))}}var Dg=0;function SH(l,s){return l.stylesheets&&l.count===0&&cd(l,l.stylesheets),0<l.count||0<l.imgCount?function(p){var v=setTimeout(function(){if(l.stylesheets&&cd(l,l.stylesheets),l.unsuspend){var j=l.unsuspend;l.unsuspend=null,j()}},6e4+s);0<l.imgBytes&&Dg===0&&(Dg=62500*nH());var S=setTimeout(function(){if(l.waitingForImages=!1,l.count===0&&(l.stylesheets&&cd(l,l.stylesheets),l.unsuspend)){var j=l.unsuspend;l.unsuspend=null,j()}},(l.imgBytes>Dg?50:800)+s);return l.unsuspend=p,function(){l.unsuspend=null,clearTimeout(v),clearTimeout(S)}}:null}function ud(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)cd(this,this.stylesheets);else if(this.unsuspend){var l=this.unsuspend;this.unsuspend=null,l()}}}var sd=null;function cd(l,s){l.stylesheets=null,l.unsuspend!==null&&(l.count++,sd=new Map,s.forEach(EH,l),sd=null,ud.call(l))}function EH(l,s){if(!(s.state.loading&4)){var p=sd.get(l);if(p)var v=p.get(null);else{p=new Map,sd.set(l,p);for(var S=l.querySelectorAll("link[data-precedence],style[data-precedence]"),j=0;j<S.length;j++){var P=S[j];(P.nodeName==="LINK"||P.getAttribute("media")!=="not all")&&(p.set(P.dataset.precedence,P),v=P)}v&&p.set(null,v)}S=s.instance,P=S.getAttribute("data-precedence"),j=p.get(P)||v,j===v&&p.set(null,S),p.set(P,S),this.count++,v=ud.bind(this),S.addEventListener("load",v),S.addEventListener("error",v),j?j.parentNode.insertBefore(S,j.nextSibling):(l=l.nodeType===9?l.head:l,l.insertBefore(S,l.firstChild)),s.state.loading|=4}}var hs={$$typeof:O,Provider:null,Consumer:null,_currentValue:re,_currentValue2:re,_threadCount:0};function kH(l,s,p,v,S,j,P,I,V){this.tag=1,this.containerInfo=l,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=Tm(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Tm(0),this.hiddenUpdates=Tm(null),this.identifierPrefix=v,this.onUncaughtError=S,this.onCaughtError=j,this.onRecoverableError=P,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=V,this.incompleteTransitions=new Map}function LC(l,s,p,v,S,j,P,I,V,ae,de,me){return l=new kH(l,s,p,P,V,ae,de,me,I),s=1,j===!0&&(s|=24),j=Dr(3,null,null,s),l.current=j,j.stateNode=l,s=pv(),s.refCount++,l.pooledCache=s,s.refCount++,j.memoizedState={element:v,isDehydrated:p,cache:s},yv(j),l}function IC(l){return l?(l=ul,l):ul}function zC(l,s,p,v,S,j){S=IC(S),v.context===null?v.context=S:v.pendingContext=S,v=vi(s),v.payload={element:p},j=j===void 0?null:j,j!==null&&(v.callback=j),p=gi(l,v,s),p!==null&&(Ar(p,l,s),Gu(p,l,s))}function qC(l,s){if(l=l.memoizedState,l!==null&&l.dehydrated!==null){var p=l.retryLane;l.retryLane=p!==0&&p<s?p:s}}function Lg(l,s){qC(l,s),(l=l.alternate)&&qC(l,s)}function BC(l){if(l.tag===13||l.tag===31){var s=eo(l,67108864);s!==null&&Ar(s,l,67108864),Lg(l,67108864)}}function $C(l){if(l.tag===13||l.tag===31){var s=Br();s=Nm(s);var p=eo(l,s);p!==null&&Ar(p,l,s),Lg(l,s)}}var fd=!0;function jH(l,s,p,v){var S=$.T;$.T=null;var j=J.p;try{J.p=2,Ig(l,s,p,v)}finally{J.p=j,$.T=S}}function AH(l,s,p,v){var S=$.T;$.T=null;var j=J.p;try{J.p=8,Ig(l,s,p,v)}finally{J.p=j,$.T=S}}function Ig(l,s,p,v){if(fd){var S=zg(v);if(S===null)Sg(l,s,v,dd,p),FC(l,v);else if(CH(S,l,s,p,v))v.stopPropagation();else if(FC(l,v),s&4&&-1<OH.indexOf(l)){for(;S!==null;){var j=Zo(S);if(j!==null)switch(j.tag){case 3:if(j=j.stateNode,j.current.memoizedState.isDehydrated){var P=Xi(j.pendingLanes);if(P!==0){var I=j;for(I.pendingLanes|=2,I.entangledLanes|=2;P;){var V=1<<31-Pr(P);I.entanglements[1]|=V,P&=~V}Fn(j),(Ge&6)===0&&(Yf=It()+500,ls(0))}}break;case 31:case 13:I=eo(j,2),I!==null&&Ar(I,j,2),Wf(),Lg(j,2)}if(j=zg(v),j===null&&Sg(l,s,v,dd,p),j===S)break;S=j}S!==null&&v.stopPropagation()}else Sg(l,s,v,null,p)}}function zg(l){return l=Bm(l),qg(l)}var dd=null;function qg(l){if(dd=null,l=Wo(l),l!==null){var s=o(l);if(s===null)l=null;else{var p=s.tag;if(p===13){if(l=u(s),l!==null)return l;l=null}else if(p===31){if(l=c(s),l!==null)return l;l=null}else if(p===3){if(s.stateNode.current.memoizedState.isDehydrated)return s.tag===3?s.stateNode.containerInfo:null;l=null}else s!==l&&(l=null)}}return dd=l,null}function UC(l){switch(l){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(Yo()){case Qc:return 2;case Eu:return 8;case Sn:case Jc:return 32;case ku:return 268435456;default:return 32}default:return 32}}var Bg=!1,Oi=null,Ci=null,Ti=null,ps=new Map,ms=new Map,Ni=[],OH="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 FC(l,s){switch(l){case"focusin":case"focusout":Oi=null;break;case"dragenter":case"dragleave":Ci=null;break;case"mouseover":case"mouseout":Ti=null;break;case"pointerover":case"pointerout":ps.delete(s.pointerId);break;case"gotpointercapture":case"lostpointercapture":ms.delete(s.pointerId)}}function vs(l,s,p,v,S,j){return l===null||l.nativeEvent!==j?(l={blockedOn:s,domEventName:p,eventSystemFlags:v,nativeEvent:j,targetContainers:[S]},s!==null&&(s=Zo(s),s!==null&&BC(s)),l):(l.eventSystemFlags|=v,s=l.targetContainers,S!==null&&s.indexOf(S)===-1&&s.push(S),l)}function CH(l,s,p,v,S){switch(s){case"focusin":return Oi=vs(Oi,l,s,p,v,S),!0;case"dragenter":return Ci=vs(Ci,l,s,p,v,S),!0;case"mouseover":return Ti=vs(Ti,l,s,p,v,S),!0;case"pointerover":var j=S.pointerId;return ps.set(j,vs(ps.get(j)||null,l,s,p,v,S)),!0;case"gotpointercapture":return j=S.pointerId,ms.set(j,vs(ms.get(j)||null,l,s,p,v,S)),!0}return!1}function HC(l){var s=Wo(l.target);if(s!==null){var p=o(s);if(p!==null){if(s=p.tag,s===13){if(s=u(p),s!==null){l.blockedOn=s,aj(l.priority,function(){$C(p)});return}}else if(s===31){if(s=c(p),s!==null){l.blockedOn=s,aj(l.priority,function(){$C(p)});return}}else if(s===3&&p.stateNode.current.memoizedState.isDehydrated){l.blockedOn=p.tag===3?p.stateNode.containerInfo:null;return}}}l.blockedOn=null}function hd(l){if(l.blockedOn!==null)return!1;for(var s=l.targetContainers;0<s.length;){var p=zg(l.nativeEvent);if(p===null){p=l.nativeEvent;var v=new p.constructor(p.type,p);qm=v,p.target.dispatchEvent(v),qm=null}else return s=Zo(p),s!==null&&BC(s),l.blockedOn=p,!1;s.shift()}return!0}function GC(l,s,p){hd(l)&&p.delete(s)}function TH(){Bg=!1,Oi!==null&&hd(Oi)&&(Oi=null),Ci!==null&&hd(Ci)&&(Ci=null),Ti!==null&&hd(Ti)&&(Ti=null),ps.forEach(GC),ms.forEach(GC)}function pd(l,s){l.blockedOn===s&&(l.blockedOn=null,Bg||(Bg=!0,e.unstable_scheduleCallback(e.unstable_NormalPriority,TH)))}var md=null;function KC(l){md!==l&&(md=l,e.unstable_scheduleCallback(e.unstable_NormalPriority,function(){md===l&&(md=null);for(var s=0;s<l.length;s+=3){var p=l[s],v=l[s+1],S=l[s+2];if(typeof v!="function"){if(qg(v||p)===null)continue;break}var j=Zo(p);j!==null&&(l.splice(s,3),s-=3,zv(j,{pending:!0,data:S,method:p.method,action:v},v,S))}}))}function Ml(l){function s(V){return pd(V,l)}Oi!==null&&pd(Oi,l),Ci!==null&&pd(Ci,l),Ti!==null&&pd(Ti,l),ps.forEach(s),ms.forEach(s);for(var p=0;p<Ni.length;p++){var v=Ni[p];v.blockedOn===l&&(v.blockedOn=null)}for(;0<Ni.length&&(p=Ni[0],p.blockedOn===null);)HC(p),p.blockedOn===null&&Ni.shift();if(p=(l.ownerDocument||l).$$reactFormReplay,p!=null)for(v=0;v<p.length;v+=3){var S=p[v],j=p[v+1],P=S[_r]||null;if(typeof j=="function")P||KC(p);else if(P){var I=null;if(j&&j.hasAttribute("formAction")){if(S=j,P=j[_r]||null)I=P.formAction;else if(qg(S)!==null)continue}else I=P.action;typeof I=="function"?p[v+1]=I:(p.splice(v,3),v-=3),KC(p)}}}function VC(){function l(j){j.canIntercept&&j.info==="react-transition"&&j.intercept({handler:function(){return new Promise(function(P){return S=P})},focusReset:"manual",scroll:"manual"})}function s(){S!==null&&(S(),S=null),v||setTimeout(p,20)}function p(){if(!v&&!navigation.transition){var j=navigation.currentEntry;j&&j.url!=null&&navigation.navigate(j.url,{state:j.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var v=!1,S=null;return navigation.addEventListener("navigate",l),navigation.addEventListener("navigatesuccess",s),navigation.addEventListener("navigateerror",s),setTimeout(p,100),function(){v=!0,navigation.removeEventListener("navigate",l),navigation.removeEventListener("navigatesuccess",s),navigation.removeEventListener("navigateerror",s),S!==null&&(S(),S=null)}}}function $g(l){this._internalRoot=l}vd.prototype.render=$g.prototype.render=function(l){var s=this._internalRoot;if(s===null)throw Error(a(409));var p=s.current,v=Br();zC(p,v,l,s,null,null)},vd.prototype.unmount=$g.prototype.unmount=function(){var l=this._internalRoot;if(l!==null){this._internalRoot=null;var s=l.containerInfo;zC(l.current,2,null,l,null,null),Wf(),s[Xo]=null}};function vd(l){this._internalRoot=l}vd.prototype.unstable_scheduleHydration=function(l){if(l){var s=nj();l={blockedOn:null,target:l,priority:s};for(var p=0;p<Ni.length&&s!==0&&s<Ni[p].priority;p++);Ni.splice(p,0,l),p===0&&HC(l)}};var YC=r.version;if(YC!=="19.2.4")throw Error(a(527,YC,"19.2.4"));J.findDOMNode=function(l){var s=l._reactInternals;if(s===void 0)throw typeof l.render=="function"?Error(a(188)):(l=Object.keys(l).join(","),Error(a(268,l)));return l=d(s),l=l!==null?h(l):null,l=l===null?null:l.stateNode,l};var NH={bundleType:0,version:"19.2.4",rendererPackageName:"react-dom",currentDispatcherRef:$,reconcilerVersion:"19.2.4"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var gd=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!gd.isDisabled&&gd.supportsFiber)try{xr=gd.inject(NH),_t=gd}catch{}}return ys.createRoot=function(l,s){if(!i(l))throw Error(a(299));var p=!1,v="",S=tO,j=rO,P=nO;return s!=null&&(s.unstable_strictMode===!0&&(p=!0),s.identifierPrefix!==void 0&&(v=s.identifierPrefix),s.onUncaughtError!==void 0&&(S=s.onUncaughtError),s.onCaughtError!==void 0&&(j=s.onCaughtError),s.onRecoverableError!==void 0&&(P=s.onRecoverableError)),s=LC(l,1,!1,null,null,p,v,null,S,j,P,VC),l[Xo]=s.current,wg(l),new $g(s)},ys.hydrateRoot=function(l,s,p){if(!i(l))throw Error(a(299));var v=!1,S="",j=tO,P=rO,I=nO,V=null;return p!=null&&(p.unstable_strictMode===!0&&(v=!0),p.identifierPrefix!==void 0&&(S=p.identifierPrefix),p.onUncaughtError!==void 0&&(j=p.onUncaughtError),p.onCaughtError!==void 0&&(P=p.onCaughtError),p.onRecoverableError!==void 0&&(I=p.onRecoverableError),p.formState!==void 0&&(V=p.formState)),s=LC(l,1,!0,s,p??null,v,S,V,j,P,I,VC),s.context=IC(null),p=s.current,v=Br(),v=Nm(v),S=vi(v),S.callback=null,gi(p,S,v),p=v,s.current.lanes=p,Au(s,p),Fn(s),l[Xo]=s.current,wg(l),new vd(s)},ys.version="19.2.4",ys}var aT;function HH(){if(aT)return Gg.exports;aT=1;function e(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(r){console.error(r)}}return e(),Gg.exports=FH(),Gg.exports}var GH=HH();const KH=Dn(GH);/**
50
+ * react-router v7.13.1
51
+ *
52
+ * Copyright (c) Remix Software Inc.
53
+ *
54
+ * This source code is licensed under the MIT license found in the
55
+ * LICENSE.md file in the root directory of this source tree.
56
+ *
57
+ * @license MIT
58
+ */var iT="popstate";function oT(e){return typeof e=="object"&&e!=null&&"pathname"in e&&"search"in e&&"hash"in e&&"state"in e&&"key"in e}function VH(e={}){function r(a,i){var d;let o=(d=i.state)==null?void 0:d.masked,{pathname:u,search:c,hash:f}=o||a.location;return o2("",{pathname:u,search:c,hash:f},i.state&&i.state.usr||null,i.state&&i.state.key||"default",o?{pathname:a.location.pathname,search:a.location.search,hash:a.location.hash}:void 0)}function n(a,i){return typeof i=="string"?i:ec(i)}return XH(r,n,null,e)}function mt(e,r){if(e===!1||e===null||typeof e>"u")throw new Error(r)}function na(e,r){if(!e){typeof console<"u"&&console.warn(r);try{throw new Error(r)}catch{}}}function YH(){return Math.random().toString(36).substring(2,10)}function lT(e,r){return{usr:e.state,key:e.key,idx:r,masked:e.unstable_mask?{pathname:e.pathname,search:e.search,hash:e.hash}:void 0}}function o2(e,r,n=null,a,i){return{pathname:typeof e=="string"?e:e.pathname,search:"",hash:"",...typeof r=="string"?ou(r):r,state:n,key:r&&r.key||a||YH(),unstable_mask:i}}function ec({pathname:e="/",search:r="",hash:n=""}){return r&&r!=="?"&&(e+=r.charAt(0)==="?"?r:"?"+r),n&&n!=="#"&&(e+=n.charAt(0)==="#"?n:"#"+n),e}function ou(e){let r={};if(e){let n=e.indexOf("#");n>=0&&(r.hash=e.substring(n),e=e.substring(0,n));let a=e.indexOf("?");a>=0&&(r.search=e.substring(a),e=e.substring(0,a)),e&&(r.pathname=e)}return r}function XH(e,r,n,a={}){let{window:i=document.defaultView,v5Compat:o=!1}=a,u=i.history,c="POP",f=null,d=h();d==null&&(d=0,u.replaceState({...u.state,idx:d},""));function h(){return(u.state||{idx:null}).idx}function m(){c="POP";let w=h(),_=w==null?null:w-d;d=w,f&&f({action:c,location:E.location,delta:_})}function g(w,_){c="PUSH";let A=oT(w)?w:o2(E.location,w,_);d=h()+1;let O=lT(A,d),T=E.createHref(A.unstable_mask||A);try{u.pushState(O,"",T)}catch(C){if(C instanceof DOMException&&C.name==="DataCloneError")throw C;i.location.assign(T)}o&&f&&f({action:c,location:E.location,delta:1})}function y(w,_){c="REPLACE";let A=oT(w)?w:o2(E.location,w,_);d=h();let O=lT(A,d),T=E.createHref(A.unstable_mask||A);u.replaceState(O,"",T),o&&f&&f({action:c,location:E.location,delta:0})}function x(w){return WH(w)}let E={get action(){return c},get location(){return e(i,u)},listen(w){if(f)throw new Error("A history only accepts one active listener");return i.addEventListener(iT,m),f=w,()=>{i.removeEventListener(iT,m),f=null}},createHref(w){return r(i,w)},createURL:x,encodeLocation(w){let _=x(w);return{pathname:_.pathname,search:_.search,hash:_.hash}},push:g,replace:y,go(w){return u.go(w)}};return E}function WH(e,r=!1){let n="http://localhost";typeof window<"u"&&(n=window.location.origin!=="null"?window.location.origin:window.location.href),mt(n,"No window.location.(origin|href) available to create URL");let a=typeof e=="string"?e:ec(e);return a=a.replace(/ $/,"%20"),!r&&a.startsWith("//")&&(a=n+a),new URL(a,n)}function A6(e,r,n="/"){return ZH(e,r,n,!1)}function ZH(e,r,n,a){let i=typeof r=="string"?ou(r):r,o=Ga(i.pathname||"/",n);if(o==null)return null;let u=O6(e);QH(u);let c=null;for(let f=0;c==null&&f<u.length;++f){let d=sG(o);c=lG(u[f],d,a)}return c}function O6(e,r=[],n=[],a="",i=!1){let o=(u,c,f=i,d)=>{let h={relativePath:d===void 0?u.path||"":d,caseSensitive:u.caseSensitive===!0,childrenIndex:c,route:u};if(h.relativePath.startsWith("/")){if(!h.relativePath.startsWith(a)&&f)return;mt(h.relativePath.startsWith(a),`Absolute route path "${h.relativePath}" nested under path "${a}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),h.relativePath=h.relativePath.slice(a.length)}let m=ea([a,h.relativePath]),g=n.concat(h);u.children&&u.children.length>0&&(mt(u.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${m}".`),O6(u.children,r,g,m,f)),!(u.path==null&&!u.index)&&r.push({path:m,score:iG(m,u.index),routesMeta:g})};return e.forEach((u,c)=>{var f;if(u.path===""||!((f=u.path)!=null&&f.includes("?")))o(u,c);else for(let d of C6(u.path))o(u,c,!0,d)}),r}function C6(e){let r=e.split("/");if(r.length===0)return[];let[n,...a]=r,i=n.endsWith("?"),o=n.replace(/\?$/,"");if(a.length===0)return i?[o,""]:[o];let u=C6(a.join("/")),c=[];return c.push(...u.map(f=>f===""?o:[o,f].join("/"))),i&&c.push(...u),c.map(f=>e.startsWith("/")&&f===""?"/":f)}function QH(e){e.sort((r,n)=>r.score!==n.score?n.score-r.score:oG(r.routesMeta.map(a=>a.childrenIndex),n.routesMeta.map(a=>a.childrenIndex)))}var JH=/^:[\w-]+$/,eG=3,tG=2,rG=1,nG=10,aG=-2,uT=e=>e==="*";function iG(e,r){let n=e.split("/"),a=n.length;return n.some(uT)&&(a+=aG),r&&(a+=tG),n.filter(i=>!uT(i)).reduce((i,o)=>i+(JH.test(o)?eG:o===""?rG:nG),a)}function oG(e,r){return e.length===r.length&&e.slice(0,-1).every((a,i)=>a===r[i])?e[e.length-1]-r[r.length-1]:0}function lG(e,r,n=!1){let{routesMeta:a}=e,i={},o="/",u=[];for(let c=0;c<a.length;++c){let f=a[c],d=c===a.length-1,h=o==="/"?r:r.slice(o.length)||"/",m=nh({path:f.relativePath,caseSensitive:f.caseSensitive,end:d},h),g=f.route;if(!m&&d&&n&&!a[a.length-1].route.index&&(m=nh({path:f.relativePath,caseSensitive:f.caseSensitive,end:!1},h)),!m)return null;Object.assign(i,m.params),u.push({params:i,pathname:ea([o,m.pathname]),pathnameBase:hG(ea([o,m.pathnameBase])),route:g}),m.pathnameBase!=="/"&&(o=ea([o,m.pathnameBase]))}return u}function nh(e,r){typeof e=="string"&&(e={path:e,caseSensitive:!1,end:!0});let[n,a]=uG(e.path,e.caseSensitive,e.end),i=r.match(n);if(!i)return null;let o=i[0],u=o.replace(/(.)\/+$/,"$1"),c=i.slice(1);return{params:a.reduce((d,{paramName:h,isOptional:m},g)=>{if(h==="*"){let x=c[g]||"";u=o.slice(0,o.length-x.length).replace(/(.)\/+$/,"$1")}const y=c[g];return m&&!y?d[h]=void 0:d[h]=(y||"").replace(/%2F/g,"/"),d},{}),pathname:o,pathnameBase:u,pattern:e}}function uG(e,r=!1,n=!0){na(e==="*"||!e.endsWith("*")||e.endsWith("/*"),`Route path "${e}" will be treated as if it were "${e.replace(/\*$/,"/*")}" because the \`*\` character must always follow a \`/\` in the pattern. To get rid of this warning, please change the route path to "${e.replace(/\*$/,"/*")}".`);let a=[],i="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(u,c,f,d,h)=>{if(a.push({paramName:c,isOptional:f!=null}),f){let m=h.charAt(d+u.length);return m&&m!=="/"?"/([^\\/]*)":"(?:/([^\\/]*))?"}return"/([^\\/]+)"}).replace(/\/([\w-]+)\?(\/|$)/g,"(/$1)?$2");return e.endsWith("*")?(a.push({paramName:"*"}),i+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?i+="\\/*$":e!==""&&e!=="/"&&(i+="(?:(?=\\/|$))"),[new RegExp(i,r?void 0:"i"),a]}function sG(e){try{return e.split("/").map(r=>decodeURIComponent(r).replace(/\//g,"%2F")).join("/")}catch(r){return na(!1,`The URL path "${e}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${r}).`),e}}function Ga(e,r){if(r==="/")return e;if(!e.toLowerCase().startsWith(r.toLowerCase()))return null;let n=r.endsWith("/")?r.length-1:r.length,a=e.charAt(n);return a&&a!=="/"?null:e.slice(n)||"/"}var cG=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i;function fG(e,r="/"){let{pathname:n,search:a="",hash:i=""}=typeof e=="string"?ou(e):e,o;return n?(n=n.replace(/\/\/+/g,"/"),n.startsWith("/")?o=sT(n.substring(1),"/"):o=sT(n,r)):o=r,{pathname:o,search:pG(a),hash:mG(i)}}function sT(e,r){let n=r.replace(/\/+$/,"").split("/");return e.split("/").forEach(i=>{i===".."?n.length>1&&n.pop():i!=="."&&n.push(i)}),n.length>1?n.join("/"):"/"}function Xg(e,r,n,a){return`Cannot include a '${e}' character in a manually specified \`to.${r}\` field [${JSON.stringify(a)}]. Please separate it out to the \`to.${n}\` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.`}function dG(e){return e.filter((r,n)=>n===0||r.route.path&&r.route.path.length>0)}function T6(e){let r=dG(e);return r.map((n,a)=>a===r.length-1?n.pathname:n.pathnameBase)}function jS(e,r,n,a=!1){let i;typeof e=="string"?i=ou(e):(i={...e},mt(!i.pathname||!i.pathname.includes("?"),Xg("?","pathname","search",i)),mt(!i.pathname||!i.pathname.includes("#"),Xg("#","pathname","hash",i)),mt(!i.search||!i.search.includes("#"),Xg("#","search","hash",i)));let o=e===""||i.pathname==="",u=o?"/":i.pathname,c;if(u==null)c=n;else{let m=r.length-1;if(!a&&u.startsWith("..")){let g=u.split("/");for(;g[0]==="..";)g.shift(),m-=1;i.pathname=g.join("/")}c=m>=0?r[m]:"/"}let f=fG(i,c),d=u&&u!=="/"&&u.endsWith("/"),h=(o||u===".")&&n.endsWith("/");return!f.pathname.endsWith("/")&&(d||h)&&(f.pathname+="/"),f}var ea=e=>e.join("/").replace(/\/\/+/g,"/"),hG=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),pG=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,mG=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e,vG=class{constructor(e,r,n,a=!1){this.status=e,this.statusText=r||"",this.internal=a,n instanceof Error?(this.data=n.toString(),this.error=n):this.data=n}};function gG(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}function yG(e){return e.map(r=>r.route.path).filter(Boolean).join("/").replace(/\/\/*/g,"/")||"/"}var N6=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function M6(e,r){let n=e;if(typeof n!="string"||!cG.test(n))return{absoluteURL:void 0,isExternal:!1,to:n};let a=n,i=!1;if(N6)try{let o=new URL(window.location.href),u=n.startsWith("//")?new URL(o.protocol+n):new URL(n),c=Ga(u.pathname,r);u.origin===o.origin&&c!=null?n=c+u.search+u.hash:i=!0}catch{na(!1,`<Link to="${n}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}return{absoluteURL:a,isExternal:i,to:n}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");var P6=["POST","PUT","PATCH","DELETE"];new Set(P6);var bG=["GET",...P6];new Set(bG);var lu=k.createContext(null);lu.displayName="DataRouter";var gp=k.createContext(null);gp.displayName="DataRouterState";var xG=k.createContext(!1),R6=k.createContext({isTransitioning:!1});R6.displayName="ViewTransition";var _G=k.createContext(new Map);_G.displayName="Fetchers";var wG=k.createContext(null);wG.displayName="Await";var bn=k.createContext(null);bn.displayName="Navigation";var xc=k.createContext(null);xc.displayName="Location";var Ja=k.createContext({outlet:null,matches:[],isDataRoute:!1});Ja.displayName="Route";var AS=k.createContext(null);AS.displayName="RouteError";var D6="REACT_ROUTER_ERROR",SG="REDIRECT",EG="ROUTE_ERROR_RESPONSE";function kG(e){if(e.startsWith(`${D6}:${SG}:{`))try{let r=JSON.parse(e.slice(28));if(typeof r=="object"&&r&&typeof r.status=="number"&&typeof r.statusText=="string"&&typeof r.location=="string"&&typeof r.reloadDocument=="boolean"&&typeof r.replace=="boolean")return r}catch{}}function jG(e){if(e.startsWith(`${D6}:${EG}:{`))try{let r=JSON.parse(e.slice(40));if(typeof r=="object"&&r&&typeof r.status=="number"&&typeof r.statusText=="string")return new vG(r.status,r.statusText,r.data)}catch{}}function AG(e,{relative:r}={}){mt(_c(),"useHref() may be used only in the context of a <Router> component.");let{basename:n,navigator:a}=k.useContext(bn),{hash:i,pathname:o,search:u}=wc(e,{relative:r}),c=o;return n!=="/"&&(c=o==="/"?n:ea([n,o])),a.createHref({pathname:c,search:u,hash:i})}function _c(){return k.useContext(xc)!=null}function Hi(){return mt(_c(),"useLocation() may be used only in the context of a <Router> component."),k.useContext(xc).location}var L6="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function I6(e){k.useContext(bn).static||k.useLayoutEffect(e)}function OG(){let{isDataRoute:e}=k.useContext(Ja);return e?$G():CG()}function CG(){mt(_c(),"useNavigate() may be used only in the context of a <Router> component.");let e=k.useContext(lu),{basename:r,navigator:n}=k.useContext(bn),{matches:a}=k.useContext(Ja),{pathname:i}=Hi(),o=JSON.stringify(T6(a)),u=k.useRef(!1);return I6(()=>{u.current=!0}),k.useCallback((f,d={})=>{if(na(u.current,L6),!u.current)return;if(typeof f=="number"){n.go(f);return}let h=jS(f,JSON.parse(o),i,d.relative==="path");e==null&&r!=="/"&&(h.pathname=h.pathname==="/"?r:ea([r,h.pathname])),(d.replace?n.replace:n.push)(h,d.state,d)},[r,n,o,i,e])}k.createContext(null);function wc(e,{relative:r}={}){let{matches:n}=k.useContext(Ja),{pathname:a}=Hi(),i=JSON.stringify(T6(n));return k.useMemo(()=>jS(e,JSON.parse(i),a,r==="path"),[e,i,a,r])}function TG(e,r){return z6(e,r)}function z6(e,r,n){var w;mt(_c(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:a}=k.useContext(bn),{matches:i}=k.useContext(Ja),o=i[i.length-1],u=o?o.params:{},c=o?o.pathname:"/",f=o?o.pathnameBase:"/",d=o&&o.route;{let _=d&&d.path||"";B6(c,!d||_.endsWith("*")||_.endsWith("*?"),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${c}" (under <Route path="${_}">) but the parent route path has no trailing "*". This means if you navigate deeper, the parent won't match anymore and therefore the child routes will never render.
59
+
60
+ Please change the parent <Route path="${_}"> to <Route path="${_==="/"?"*":`${_}/*`}">.`)}let h=Hi(),m;if(r){let _=typeof r=="string"?ou(r):r;mt(f==="/"||((w=_.pathname)==null?void 0:w.startsWith(f)),`When overriding the location using \`<Routes location>\` or \`useRoutes(routes, location)\`, the location pathname must begin with the portion of the URL pathname that was matched by all parent routes. The current pathname base is "${f}" but pathname "${_.pathname}" was given in the \`location\` prop.`),m=_}else m=h;let g=m.pathname||"/",y=g;if(f!=="/"){let _=f.replace(/^\//,"").split("/");y="/"+g.replace(/^\//,"").split("/").slice(_.length).join("/")}let x=A6(e,{pathname:y});na(d||x!=null,`No routes matched location "${m.pathname}${m.search}${m.hash}" `),na(x==null||x[x.length-1].route.element!==void 0||x[x.length-1].route.Component!==void 0||x[x.length-1].route.lazy!==void 0,`Matched leaf route at location "${m.pathname}${m.search}${m.hash}" does not have an element or Component. This means it will render an <Outlet /> with a null value by default resulting in an "empty" page.`);let E=DG(x&&x.map(_=>Object.assign({},_,{params:Object.assign({},u,_.params),pathname:ea([f,a.encodeLocation?a.encodeLocation(_.pathname.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:_.pathname]),pathnameBase:_.pathnameBase==="/"?f:ea([f,a.encodeLocation?a.encodeLocation(_.pathnameBase.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:_.pathnameBase])})),i,n);return r&&E?k.createElement(xc.Provider,{value:{location:{pathname:"/",search:"",hash:"",state:null,key:"default",unstable_mask:void 0,...m},navigationType:"POP"}},E):E}function NG(){let e=BG(),r=gG(e)?`${e.status} ${e.statusText}`:e instanceof Error?e.message:JSON.stringify(e),n=e instanceof Error?e.stack:null,a="rgba(200,200,200, 0.5)",i={padding:"0.5rem",backgroundColor:a},o={padding:"2px 4px",backgroundColor:a},u=null;return console.error("Error handled by React Router default ErrorBoundary:",e),u=k.createElement(k.Fragment,null,k.createElement("p",null,"💿 Hey developer 👋"),k.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",k.createElement("code",{style:o},"ErrorBoundary")," or"," ",k.createElement("code",{style:o},"errorElement")," prop on your route.")),k.createElement(k.Fragment,null,k.createElement("h2",null,"Unexpected Application Error!"),k.createElement("h3",{style:{fontStyle:"italic"}},r),n?k.createElement("pre",{style:i},n):null,u)}var MG=k.createElement(NG,null),q6=class extends k.Component{constructor(e){super(e),this.state={location:e.location,revalidation:e.revalidation,error:e.error}}static getDerivedStateFromError(e){return{error:e}}static getDerivedStateFromProps(e,r){return r.location!==e.location||r.revalidation!=="idle"&&e.revalidation==="idle"?{error:e.error,location:e.location,revalidation:e.revalidation}:{error:e.error!==void 0?e.error:r.error,location:r.location,revalidation:e.revalidation||r.revalidation}}componentDidCatch(e,r){this.props.onError?this.props.onError(e,r):console.error("React Router caught the following error during render",e)}render(){let e=this.state.error;if(this.context&&typeof e=="object"&&e&&"digest"in e&&typeof e.digest=="string"){const n=jG(e.digest);n&&(e=n)}let r=e!==void 0?k.createElement(Ja.Provider,{value:this.props.routeContext},k.createElement(AS.Provider,{value:e,children:this.props.component})):this.props.children;return this.context?k.createElement(PG,{error:e},r):r}};q6.contextType=xG;var Wg=new WeakMap;function PG({children:e,error:r}){let{basename:n}=k.useContext(bn);if(typeof r=="object"&&r&&"digest"in r&&typeof r.digest=="string"){let a=kG(r.digest);if(a){let i=Wg.get(r);if(i)throw i;let o=M6(a.location,n);if(N6&&!Wg.get(r))if(o.isExternal||a.reloadDocument)window.location.href=o.absoluteURL||o.to;else{const u=Promise.resolve().then(()=>window.__reactRouterDataRouter.navigate(o.to,{replace:a.replace}));throw Wg.set(r,u),u}return k.createElement("meta",{httpEquiv:"refresh",content:`0;url=${o.absoluteURL||o.to}`})}}return e}function RG({routeContext:e,match:r,children:n}){let a=k.useContext(lu);return a&&a.static&&a.staticContext&&(r.route.errorElement||r.route.ErrorBoundary)&&(a.staticContext._deepestRenderedBoundaryId=r.route.id),k.createElement(Ja.Provider,{value:e},n)}function DG(e,r=[],n){let a=n==null?void 0:n.state;if(e==null){if(!a)return null;if(a.errors)e=a.matches;else if(r.length===0&&!a.initialized&&a.matches.length>0)e=a.matches;else return null}let i=e,o=a==null?void 0:a.errors;if(o!=null){let h=i.findIndex(m=>m.route.id&&(o==null?void 0:o[m.route.id])!==void 0);mt(h>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(o).join(",")}`),i=i.slice(0,Math.min(i.length,h+1))}let u=!1,c=-1;if(n&&a){u=a.renderFallback;for(let h=0;h<i.length;h++){let m=i[h];if((m.route.HydrateFallback||m.route.hydrateFallbackElement)&&(c=h),m.route.id){let{loaderData:g,errors:y}=a,x=m.route.loader&&!g.hasOwnProperty(m.route.id)&&(!y||y[m.route.id]===void 0);if(m.route.lazy||x){n.isStatic&&(u=!0),c>=0?i=i.slice(0,c+1):i=[i[0]];break}}}}let f=n==null?void 0:n.onError,d=a&&f?(h,m)=>{var g,y;f(h,{location:a.location,params:((y=(g=a.matches)==null?void 0:g[0])==null?void 0:y.params)??{},unstable_pattern:yG(a.matches),errorInfo:m})}:void 0;return i.reduceRight((h,m,g)=>{let y,x=!1,E=null,w=null;a&&(y=o&&m.route.id?o[m.route.id]:void 0,E=m.route.errorElement||MG,u&&(c<0&&g===0?(B6("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),x=!0,w=null):c===g&&(x=!0,w=m.route.hydrateFallbackElement||null)));let _=r.concat(i.slice(0,g+1)),A=()=>{let O;return y?O=E:x?O=w:m.route.Component?O=k.createElement(m.route.Component,null):m.route.element?O=m.route.element:O=h,k.createElement(RG,{match:m,routeContext:{outlet:h,matches:_,isDataRoute:a!=null},children:O})};return a&&(m.route.ErrorBoundary||m.route.errorElement||g===0)?k.createElement(q6,{location:a.location,revalidation:a.revalidation,component:E,error:y,children:A(),routeContext:{outlet:null,matches:_,isDataRoute:!0},onError:d}):A()},null)}function OS(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function LG(e){let r=k.useContext(lu);return mt(r,OS(e)),r}function IG(e){let r=k.useContext(gp);return mt(r,OS(e)),r}function zG(e){let r=k.useContext(Ja);return mt(r,OS(e)),r}function CS(e){let r=zG(e),n=r.matches[r.matches.length-1];return mt(n.route.id,`${e} can only be used on routes that contain a unique "id"`),n.route.id}function qG(){return CS("useRouteId")}function BG(){var a;let e=k.useContext(AS),r=IG("useRouteError"),n=CS("useRouteError");return e!==void 0?e:(a=r.errors)==null?void 0:a[n]}function $G(){let{router:e}=LG("useNavigate"),r=CS("useNavigate"),n=k.useRef(!1);return I6(()=>{n.current=!0}),k.useCallback(async(i,o={})=>{na(n.current,L6),n.current&&(typeof i=="number"?await e.navigate(i):await e.navigate(i,{fromRouteId:r,...o}))},[e,r])}var cT={};function B6(e,r,n){!r&&!cT[e]&&(cT[e]=!0,na(!1,n))}k.memo(UG);function UG({routes:e,future:r,state:n,isStatic:a,onError:i}){return z6(e,void 0,{state:n,isStatic:a,onError:i})}function bo(e){mt(!1,"A <Route> is only ever to be used as the child of <Routes> element, never rendered directly. Please wrap your <Route> in a <Routes>.")}function FG({basename:e="/",children:r=null,location:n,navigationType:a="POP",navigator:i,static:o=!1,unstable_useTransitions:u}){mt(!_c(),"You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");let c=e.replace(/^\/*/,"/"),f=k.useMemo(()=>({basename:c,navigator:i,static:o,unstable_useTransitions:u,future:{}}),[c,i,o,u]);typeof n=="string"&&(n=ou(n));let{pathname:d="/",search:h="",hash:m="",state:g=null,key:y="default",unstable_mask:x}=n,E=k.useMemo(()=>{let w=Ga(d,c);return w==null?null:{location:{pathname:w,search:h,hash:m,state:g,key:y,unstable_mask:x},navigationType:a}},[c,d,h,m,g,y,a,x]);return na(E!=null,`<Router basename="${c}"> is not able to match the URL "${d}${h}${m}" because it does not start with the basename, so the <Router> won't render anything.`),E==null?null:k.createElement(bn.Provider,{value:f},k.createElement(xc.Provider,{children:r,value:E}))}function HG({children:e,location:r}){return TG(l2(e),r)}function l2(e,r=[]){let n=[];return k.Children.forEach(e,(a,i)=>{if(!k.isValidElement(a))return;let o=[...r,i];if(a.type===k.Fragment){n.push.apply(n,l2(a.props.children,o));return}mt(a.type===bo,`[${typeof a.type=="string"?a.type:a.type.name}] is not a <Route> component. All component children of <Routes> must be a <Route> or <React.Fragment>`),mt(!a.props.index||!a.props.children,"An index route cannot have child routes.");let u={id:a.props.id||o.join("-"),caseSensitive:a.props.caseSensitive,element:a.props.element,Component:a.props.Component,index:a.props.index,path:a.props.path,middleware:a.props.middleware,loader:a.props.loader,action:a.props.action,hydrateFallbackElement:a.props.hydrateFallbackElement,HydrateFallback:a.props.HydrateFallback,errorElement:a.props.errorElement,ErrorBoundary:a.props.ErrorBoundary,hasErrorBoundary:a.props.hasErrorBoundary===!0||a.props.ErrorBoundary!=null||a.props.errorElement!=null,shouldRevalidate:a.props.shouldRevalidate,handle:a.props.handle,lazy:a.props.lazy};a.props.children&&(u.children=l2(a.props.children,o)),n.push(u)}),n}var Gd="get",Kd="application/x-www-form-urlencoded";function yp(e){return typeof HTMLElement<"u"&&e instanceof HTMLElement}function GG(e){return yp(e)&&e.tagName.toLowerCase()==="button"}function KG(e){return yp(e)&&e.tagName.toLowerCase()==="form"}function VG(e){return yp(e)&&e.tagName.toLowerCase()==="input"}function YG(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function XG(e,r){return e.button===0&&(!r||r==="_self")&&!YG(e)}var bd=null;function WG(){if(bd===null)try{new FormData(document.createElement("form"),0),bd=!1}catch{bd=!0}return bd}var ZG=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function Zg(e){return e!=null&&!ZG.has(e)?(na(!1,`"${e}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${Kd}"`),null):e}function QG(e,r){let n,a,i,o,u;if(KG(e)){let c=e.getAttribute("action");a=c?Ga(c,r):null,n=e.getAttribute("method")||Gd,i=Zg(e.getAttribute("enctype"))||Kd,o=new FormData(e)}else if(GG(e)||VG(e)&&(e.type==="submit"||e.type==="image")){let c=e.form;if(c==null)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');let f=e.getAttribute("formaction")||c.getAttribute("action");if(a=f?Ga(f,r):null,n=e.getAttribute("formmethod")||c.getAttribute("method")||Gd,i=Zg(e.getAttribute("formenctype"))||Zg(c.getAttribute("enctype"))||Kd,o=new FormData(c,e),!WG()){let{name:d,type:h,value:m}=e;if(h==="image"){let g=d?`${d}.`:"";o.append(`${g}x`,"0"),o.append(`${g}y`,"0")}else d&&o.append(d,m)}}else{if(yp(e))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');n=Gd,a=null,i=Kd,u=e}return o&&i==="text/plain"&&(u=o,o=void 0),{action:a,method:n.toLowerCase(),encType:i,formData:o,body:u}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");function TS(e,r){if(e===!1||e===null||typeof e>"u")throw new Error(r)}function JG(e,r,n,a){let i=typeof e=="string"?new URL(e,typeof window>"u"?"server://singlefetch/":window.location.origin):e;return n?i.pathname.endsWith("/")?i.pathname=`${i.pathname}_.${a}`:i.pathname=`${i.pathname}.${a}`:i.pathname==="/"?i.pathname=`_root.${a}`:r&&Ga(i.pathname,r)==="/"?i.pathname=`${r.replace(/\/$/,"")}/_root.${a}`:i.pathname=`${i.pathname.replace(/\/$/,"")}.${a}`,i}async function eK(e,r){if(e.id in r)return r[e.id];try{let n=await import(e.module);return r[e.id]=n,n}catch(n){return console.error(`Error loading route module \`${e.module}\`, reloading page...`),console.error(n),window.__reactRouterContext&&window.__reactRouterContext.isSpaMode,window.location.reload(),new Promise(()=>{})}}function tK(e){return e==null?!1:e.href==null?e.rel==="preload"&&typeof e.imageSrcSet=="string"&&typeof e.imageSizes=="string":typeof e.rel=="string"&&typeof e.href=="string"}async function rK(e,r,n){let a=await Promise.all(e.map(async i=>{let o=r.routes[i.route.id];if(o){let u=await eK(o,n);return u.links?u.links():[]}return[]}));return oK(a.flat(1).filter(tK).filter(i=>i.rel==="stylesheet"||i.rel==="preload").map(i=>i.rel==="stylesheet"?{...i,rel:"prefetch",as:"style"}:{...i,rel:"prefetch"}))}function fT(e,r,n,a,i,o){let u=(f,d)=>n[d]?f.route.id!==n[d].route.id:!0,c=(f,d)=>{var h;return n[d].pathname!==f.pathname||((h=n[d].route.path)==null?void 0:h.endsWith("*"))&&n[d].params["*"]!==f.params["*"]};return o==="assets"?r.filter((f,d)=>u(f,d)||c(f,d)):o==="data"?r.filter((f,d)=>{var m;let h=a.routes[f.route.id];if(!h||!h.hasLoader)return!1;if(u(f,d)||c(f,d))return!0;if(f.route.shouldRevalidate){let g=f.route.shouldRevalidate({currentUrl:new URL(i.pathname+i.search+i.hash,window.origin),currentParams:((m=n[0])==null?void 0:m.params)||{},nextUrl:new URL(e,window.origin),nextParams:f.params,defaultShouldRevalidate:!0});if(typeof g=="boolean")return g}return!0}):[]}function nK(e,r,{includeHydrateFallback:n}={}){return aK(e.map(a=>{let i=r.routes[a.route.id];if(!i)return[];let o=[i.module];return i.clientActionModule&&(o=o.concat(i.clientActionModule)),i.clientLoaderModule&&(o=o.concat(i.clientLoaderModule)),n&&i.hydrateFallbackModule&&(o=o.concat(i.hydrateFallbackModule)),i.imports&&(o=o.concat(i.imports)),o}).flat(1))}function aK(e){return[...new Set(e)]}function iK(e){let r={},n=Object.keys(e).sort();for(let a of n)r[a]=e[a];return r}function oK(e,r){let n=new Set;return new Set(r),e.reduce((a,i)=>{let o=JSON.stringify(iK(i));return n.has(o)||(n.add(o),a.push({key:o,link:i})),a},[])}function $6(){let e=k.useContext(lu);return TS(e,"You must render this element inside a <DataRouterContext.Provider> element"),e}function lK(){let e=k.useContext(gp);return TS(e,"You must render this element inside a <DataRouterStateContext.Provider> element"),e}var NS=k.createContext(void 0);NS.displayName="FrameworkContext";function U6(){let e=k.useContext(NS);return TS(e,"You must render this element inside a <HydratedRouter> element"),e}function uK(e,r){let n=k.useContext(NS),[a,i]=k.useState(!1),[o,u]=k.useState(!1),{onFocus:c,onBlur:f,onMouseEnter:d,onMouseLeave:h,onTouchStart:m}=r,g=k.useRef(null);k.useEffect(()=>{if(e==="render"&&u(!0),e==="viewport"){let E=_=>{_.forEach(A=>{u(A.isIntersecting)})},w=new IntersectionObserver(E,{threshold:.5});return g.current&&w.observe(g.current),()=>{w.disconnect()}}},[e]),k.useEffect(()=>{if(a){let E=setTimeout(()=>{u(!0)},100);return()=>{clearTimeout(E)}}},[a]);let y=()=>{i(!0)},x=()=>{i(!1),u(!1)};return n?e!=="intent"?[o,g,{}]:[o,g,{onFocus:bs(c,y),onBlur:bs(f,x),onMouseEnter:bs(d,y),onMouseLeave:bs(h,x),onTouchStart:bs(m,y)}]:[!1,g,{}]}function bs(e,r){return n=>{e&&e(n),n.defaultPrevented||r(n)}}function sK({page:e,...r}){let{router:n}=$6(),a=k.useMemo(()=>A6(n.routes,e,n.basename),[n.routes,e,n.basename]);return a?k.createElement(fK,{page:e,matches:a,...r}):null}function cK(e){let{manifest:r,routeModules:n}=U6(),[a,i]=k.useState([]);return k.useEffect(()=>{let o=!1;return rK(e,r,n).then(u=>{o||i(u)}),()=>{o=!0}},[e,r,n]),a}function fK({page:e,matches:r,...n}){let a=Hi(),{future:i,manifest:o,routeModules:u}=U6(),{basename:c}=$6(),{loaderData:f,matches:d}=lK(),h=k.useMemo(()=>fT(e,r,d,o,a,"data"),[e,r,d,o,a]),m=k.useMemo(()=>fT(e,r,d,o,a,"assets"),[e,r,d,o,a]),g=k.useMemo(()=>{if(e===a.pathname+a.search+a.hash)return[];let E=new Set,w=!1;if(r.forEach(A=>{var T;let O=o.routes[A.route.id];!O||!O.hasLoader||(!h.some(C=>C.route.id===A.route.id)&&A.route.id in f&&((T=u[A.route.id])!=null&&T.shouldRevalidate)||O.hasClientLoader?w=!0:E.add(A.route.id))}),E.size===0)return[];let _=JG(e,c,i.unstable_trailingSlashAwareDataRequests,"data");return w&&E.size>0&&_.searchParams.set("_routes",r.filter(A=>E.has(A.route.id)).map(A=>A.route.id).join(",")),[_.pathname+_.search]},[c,i.unstable_trailingSlashAwareDataRequests,f,a,o,h,r,e,u]),y=k.useMemo(()=>nK(m,o),[m,o]),x=cK(m);return k.createElement(k.Fragment,null,g.map(E=>k.createElement("link",{key:E,rel:"prefetch",as:"fetch",href:E,...n})),y.map(E=>k.createElement("link",{key:E,rel:"modulepreload",href:E,...n})),x.map(({key:E,link:w})=>k.createElement("link",{key:E,nonce:n.nonce,...w,crossOrigin:w.crossOrigin??n.crossOrigin})))}function dK(...e){return r=>{e.forEach(n=>{typeof n=="function"?n(r):n!=null&&(n.current=r)})}}var hK=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";try{hK&&(window.__reactRouterVersion="7.13.1")}catch{}function pK({basename:e,children:r,unstable_useTransitions:n,window:a}){let i=k.useRef();i.current==null&&(i.current=VH({window:a,v5Compat:!0}));let o=i.current,[u,c]=k.useState({action:o.action,location:o.location}),f=k.useCallback(d=>{n===!1?c(d):k.startTransition(()=>c(d))},[n]);return k.useLayoutEffect(()=>o.listen(f),[o,f]),k.createElement(FG,{basename:e,children:r,location:u.location,navigationType:u.action,navigator:o,unstable_useTransitions:n})}var F6=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,H6=k.forwardRef(function({onClick:r,discover:n="render",prefetch:a="none",relative:i,reloadDocument:o,replace:u,unstable_mask:c,state:f,target:d,to:h,preventScrollReset:m,viewTransition:g,unstable_defaultShouldRevalidate:y,...x},E){let{basename:w,navigator:_,unstable_useTransitions:A}=k.useContext(bn),O=typeof h=="string"&&F6.test(h),T=M6(h,w);h=T.to;let C=AG(h,{relative:i}),N=Hi(),M=null;if(c){let Y=jS(c,[],N.unstable_mask?N.unstable_mask.pathname:"/",!0);w!=="/"&&(Y.pathname=Y.pathname==="/"?w:ea([w,Y.pathname])),M=_.createHref(Y)}let[R,L,D]=uK(a,x),z=gK(h,{replace:u,unstable_mask:c,state:f,target:d,preventScrollReset:m,relative:i,viewTransition:g,unstable_defaultShouldRevalidate:y,unstable_useTransitions:A});function q(Y){r&&r(Y),Y.defaultPrevented||z(Y)}let G=!(T.isExternal||o),U=k.createElement("a",{...x,...D,href:(G?M:void 0)||T.absoluteURL||C,onClick:G?q:r,ref:dK(E,L),target:d,"data-discover":!O&&n==="render"?"true":void 0});return R&&!O?k.createElement(k.Fragment,null,U,k.createElement(sK,{page:C})):U});H6.displayName="Link";var G6=k.forwardRef(function({"aria-current":r="page",caseSensitive:n=!1,className:a="",end:i=!1,style:o,to:u,viewTransition:c,children:f,...d},h){let m=wc(u,{relative:d.relative}),g=Hi(),y=k.useContext(gp),{navigator:x,basename:E}=k.useContext(bn),w=y!=null&&wK(m)&&c===!0,_=x.encodeLocation?x.encodeLocation(m).pathname:m.pathname,A=g.pathname,O=y&&y.navigation&&y.navigation.location?y.navigation.location.pathname:null;n||(A=A.toLowerCase(),O=O?O.toLowerCase():null,_=_.toLowerCase()),O&&E&&(O=Ga(O,E)||O);const T=_!=="/"&&_.endsWith("/")?_.length-1:_.length;let C=A===_||!i&&A.startsWith(_)&&A.charAt(T)==="/",N=O!=null&&(O===_||!i&&O.startsWith(_)&&O.charAt(_.length)==="/"),M={isActive:C,isPending:N,isTransitioning:w},R=C?r:void 0,L;typeof a=="function"?L=a(M):L=[a,C?"active":null,N?"pending":null,w?"transitioning":null].filter(Boolean).join(" ");let D=typeof o=="function"?o(M):o;return k.createElement(H6,{...d,"aria-current":R,className:L,ref:h,style:D,to:u,viewTransition:c},typeof f=="function"?f(M):f)});G6.displayName="NavLink";var mK=k.forwardRef(({discover:e="render",fetcherKey:r,navigate:n,reloadDocument:a,replace:i,state:o,method:u=Gd,action:c,onSubmit:f,relative:d,preventScrollReset:h,viewTransition:m,unstable_defaultShouldRevalidate:g,...y},x)=>{let{unstable_useTransitions:E}=k.useContext(bn),w=xK(),_=_K(c,{relative:d}),A=u.toLowerCase()==="get"?"get":"post",O=typeof c=="string"&&F6.test(c),T=C=>{if(f&&f(C),C.defaultPrevented)return;C.preventDefault();let N=C.nativeEvent.submitter,M=(N==null?void 0:N.getAttribute("formmethod"))||u,R=()=>w(N||C.currentTarget,{fetcherKey:r,method:M,navigate:n,replace:i,state:o,relative:d,preventScrollReset:h,viewTransition:m,unstable_defaultShouldRevalidate:g});E&&n!==!1?k.startTransition(()=>R()):R()};return k.createElement("form",{ref:x,method:A,action:_,onSubmit:a?f:T,...y,"data-discover":!O&&e==="render"?"true":void 0})});mK.displayName="Form";function vK(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function K6(e){let r=k.useContext(lu);return mt(r,vK(e)),r}function gK(e,{target:r,replace:n,unstable_mask:a,state:i,preventScrollReset:o,relative:u,viewTransition:c,unstable_defaultShouldRevalidate:f,unstable_useTransitions:d}={}){let h=OG(),m=Hi(),g=wc(e,{relative:u});return k.useCallback(y=>{if(XG(y,r)){y.preventDefault();let x=n!==void 0?n:ec(m)===ec(g),E=()=>h(e,{replace:x,unstable_mask:a,state:i,preventScrollReset:o,relative:u,viewTransition:c,unstable_defaultShouldRevalidate:f});d?k.startTransition(()=>E()):E()}},[m,h,g,n,a,i,r,e,o,u,c,f,d])}var yK=0,bK=()=>`__${String(++yK)}__`;function xK(){let{router:e}=K6("useSubmit"),{basename:r}=k.useContext(bn),n=qG(),a=e.fetch,i=e.navigate;return k.useCallback(async(o,u={})=>{let{action:c,method:f,encType:d,formData:h,body:m}=QG(o,r);if(u.navigate===!1){let g=u.fetcherKey||bK();await a(g,n,u.action||c,{unstable_defaultShouldRevalidate:u.unstable_defaultShouldRevalidate,preventScrollReset:u.preventScrollReset,formData:h,body:m,formMethod:u.method||f,formEncType:u.encType||d,flushSync:u.flushSync})}else await i(u.action||c,{unstable_defaultShouldRevalidate:u.unstable_defaultShouldRevalidate,preventScrollReset:u.preventScrollReset,formData:h,body:m,formMethod:u.method||f,formEncType:u.encType||d,replace:u.replace,state:u.state,fromRouteId:n,flushSync:u.flushSync,viewTransition:u.viewTransition})},[a,i,r,n])}function _K(e,{relative:r}={}){let{basename:n}=k.useContext(bn),a=k.useContext(Ja);mt(a,"useFormAction must be used inside a RouteContext");let[i]=a.matches.slice(-1),o={...wc(e||".",{relative:r})},u=Hi();if(e==null){o.search=u.search;let c=new URLSearchParams(o.search),f=c.getAll("index");if(f.some(h=>h==="")){c.delete("index"),f.filter(m=>m).forEach(m=>c.append("index",m));let h=c.toString();o.search=h?`?${h}`:""}}return(!e||e===".")&&i.route.index&&(o.search=o.search?o.search.replace(/^\?/,"?index&"):"?index"),n!=="/"&&(o.pathname=o.pathname==="/"?n:ea([n,o.pathname])),ec(o)}function wK(e,{relative:r}={}){let n=k.useContext(R6);mt(n!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:a}=K6("useViewTransitionState"),i=wc(e,{relative:r});if(!n.isTransitioning)return!1;let o=Ga(n.currentLocation.pathname,a)||n.currentLocation.pathname,u=Ga(n.nextLocation.pathname,a)||n.nextLocation.pathname;return nh(i.pathname,u)!=null||nh(i.pathname,o)!=null}var MS=j6();function PS(e={}){const[r,n]=k.useState(!1),[a,i]=k.useState(null),[o,u]=k.useState(null),c=k.useRef(e.onEvent),f=k.useRef(1e3),d=k.useRef(null),h=k.useRef(null),m=k.useRef(!0),g=k.useRef(0);c.current=e.onEvent;const y=k.useCallback(()=>{if(!m.current)return;const x=new EventSource("/api/stream");h.current=x,x.onopen=()=>{m.current&&(n(!0),f.current=1e3)};const E=["snapshot","team_status_changed","team_event","team_output","pr_updated","team_launched","team_stopped","usage_updated","project_added","project_updated","project_removed","project_cleanup","dependency_resolved","heartbeat","team_thinking_start","team_thinking_stop"],w=_=>{var T,C;if(!m.current)return;let A="message",O=null;try{const N=JSON.parse(_.data);A=N.type??_.type??"message",typeof N.team_id=="number"&&(O=N.team_id),(T=c.current)==null||T.call(c,A,N)}catch{(C=c.current)==null||C.call(c,"message",_.data)}if(A!=="team_output"&&A!=="heartbeat"&&A!=="team_thinking_start"&&A!=="team_thinking_stop"){const N=Date.now();N-g.current>1e3&&(g.current=N,i(new Date(N)),u(O))}};for(const _ of E)x.addEventListener(_,w);x.onmessage=w,x.onerror=()=>{if(!m.current)return;n(!1),x.close(),h.current=null;const _=f.current;d.current=setTimeout(()=>{m.current&&y()},_),f.current=Math.min(_*2,3e4)}},[]);return k.useEffect(()=>(m.current=!0,y(),()=>{m.current=!1,h.current&&(h.current.close(),h.current=null),d.current&&(clearTimeout(d.current),d.current=null)}),[y]),{connected:r,lastEvent:a,lastEventTeamId:o}}const V6=k.createContext(null),SK=45e3;function EK({children:e}){const[r,n]=k.useState([]),[a,i]=k.useState(null),o=k.useRef(null),u=k.useRef(new Set),[c,f]=k.useState(0),d=k.useCallback(async()=>{try{const _=await fetch("/api/teams");if(_.ok){const A=await _.json();n(A)}}catch{}},[]),h=k.useCallback(()=>{o.current&&clearTimeout(o.current),o.current=setTimeout(()=>{o.current=null,d()},500)},[d]),m=k.useCallback((_,A)=>{if(_==="snapshot"){const O=A;Array.isArray(O.teams)&&n(O.teams)}else if(_==="team_status_changed"||_==="team_launched"||_==="team_stopped"){if(h(),_==="team_stopped"){const O=A;typeof O.team_id=="number"&&u.current.has(O.team_id)&&(u.current.delete(O.team_id),f(T=>T+1))}}else if(_==="usage_updated"||_==="pr_updated")h();else if(_==="team_thinking_start"){const O=A;typeof O.team_id=="number"&&(u.current.add(O.team_id),f(T=>T+1))}else if(_==="team_thinking_stop"){const O=A;typeof O.team_id=="number"&&(u.current.delete(O.team_id),f(T=>T+1))}},[h]),{connected:g,lastEvent:y,lastEventTeamId:x}=PS({onEvent:m});k.useEffect(()=>{d()},[d]),k.useEffect(()=>{const _=setInterval(d,SK);return()=>clearInterval(_)},[d]),k.useEffect(()=>()=>{o.current&&clearTimeout(o.current)},[]);const E=k.useCallback(_=>u.current.has(_),[]),w=k.useMemo(()=>({teams:r,selectedTeamId:a,setSelectedTeamId:i,connected:g,lastEvent:y,lastEventTeamId:x,isThinking:E}),[r,a,g,y,x,E,c]);return b.jsx(V6.Provider,{value:w,children:e})}function Sc(){const e=k.useContext(V6);if(!e)throw new Error("useFleet must be used within a FleetProvider");return e}class Y6 extends Error{constructor(r,n,a){super(a??`API error: ${r} ${n}`),this.status=r,this.statusText=n,this.name="ApiError"}}async function xd(e,r,n){const a=`/api/${r.replace(/^\//,"")}`,i={method:e};n!==void 0?(i.headers={"Content-Type":"application/json"},i.body=JSON.stringify(n)):(e==="POST"||e==="PUT")&&(i.headers={"Content-Type":"application/json"},i.body="{}");const o=await fetch(a,i);if(!o.ok){let u;try{const c=await o.json();u=c.message??c.error??void 0}catch{}throw new Y6(o.status,o.statusText,u)}return o.json()}function Ut(){const e=k.useCallback(i=>xd("GET",i),[]),r=k.useCallback((i,o)=>xd("POST",i,o),[]),n=k.useCallback((i,o)=>xd("PUT",i,o),[]),a=k.useCallback(i=>xd("DELETE",i),[]);return k.useMemo(()=>({get:e,post:r,put:n,del:a}),[e,r,n,a])}function kK(e){const r=[],n=a=>{for(const i of a)r.push({number:i.number,title:i.title,state:i.state,labels:i.labels,activeTeam:i.activeTeam}),i.children.length>0&&n(i.children)};return n(e),r}function jK({message:e,onDone:r}){return k.useEffect(()=>{const n=setTimeout(r,2500);return()=>clearTimeout(n)},[r]),b.jsx("div",{className:"fixed bottom-6 left-1/2 -translate-x-1/2 z-[60] px-4 py-2 rounded bg-[#3FB950]/20 border border-[#3FB950]/40 text-[#3FB950] text-sm font-medium shadow-lg animate-fade-in",children:e})}function AK(e){switch(e){case"queued":return"Creating worktree...";case"launching":return"Starting Claude Code...";case"running":return"Team running";case"idle":return"Team idle";case"done":return"Completed";case"failed":return"Failed";case"stuck":return"Stuck";default:return e}}function OK(e){switch(e){case"assistant":return"text-[#58A6FF]";case"tool_use":return"text-[#D29922]";case"tool_result":return"text-[#A371F7]";case"result":return"text-[#3FB950]";default:return"text-[#8B949E]"}}function CK(e){var r,n,a;switch(e.type){case"assistant":{const i=(r=e.message)==null?void 0:r.content;if(Array.isArray(i)){const o=((n=i.find(u=>u.type==="text"))==null?void 0:n.text)??"";return o.substring(0,100)+(o.length>100?"...":"")}return""}case"tool_use":return((a=e.tool)==null?void 0:a.name)??"unknown";case"tool_result":return"completed";case"result":return"session complete";default:return""}}function TK({teamId:e,issueNumber:r,onClose:n}){const a=Ut(),[i,o]=k.useState("queued"),[u,c]=k.useState([]),[f,d]=k.useState([]),[h,m]=k.useState(null),g=k.useRef(null),y=k.useRef(null);k.useEffect(()=>{let _=!1;async function A(){if(!_)try{const T=await a.get(`teams/${e}`);if(_)return;o(T.status),T.status==="failed"&&m(`Team failed${T.stoppedAt?` at ${new Date(T.stoppedAt).toLocaleTimeString()}`:""}`);const C=await a.get(`teams/${e}/output?lines=50`);if(_)return;c(C.lines);const N=await a.get(`teams/${e}/stream-events`);if(_)return;d(N)}catch{}}A();const O=setInterval(A,2e3);return()=>{_=!0,clearInterval(O)}},[a,e]),k.useEffect(()=>{var _;(_=g.current)==null||_.scrollIntoView({behavior:"smooth"})},[u]),k.useEffect(()=>{var _;(_=g.current)==null||_.scrollIntoView({behavior:"smooth"})},[f]);const x=k.useRef(n);k.useEffect(()=>{x.current=n},[n]),k.useEffect(()=>{i==="running"&&!y.current&&(y.current=setTimeout(()=>x.current(),3e3))},[i]),k.useEffect(()=>()=>{y.current&&(clearTimeout(y.current),y.current=null)},[]);const E=(()=>{switch(i){case"queued":case"launching":return"text-[#D29922]";case"running":return"text-[#3FB950]";case"failed":return"text-[#F85149]";default:return"text-dark-muted"}})(),w=i==="queued"||i==="launching";return b.jsxs("div",{className:"px-5 py-4 space-y-3",children:[b.jsxs("div",{className:"flex items-center gap-2",children:[w&&b.jsxs("svg",{className:"animate-spin h-4 w-4 text-[#D29922]",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",children:[b.jsx("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),b.jsx("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4z"})]}),i==="running"&&b.jsx("svg",{className:"h-4 w-4 text-[#3FB950]",viewBox:"0 0 20 20",fill:"currentColor",children:b.jsx("path",{fillRule:"evenodd",d:"M16.707 5.293a1 1 0 010 1.414l-8 8a1 1 0 01-1.414 0l-4-4a1 1 0 011.414-1.414L8 12.586l7.293-7.293a1 1 0 011.414 0z",clipRule:"evenodd"})}),i==="failed"&&b.jsx("svg",{className:"h-4 w-4 text-[#F85149]",viewBox:"0 0 20 20",fill:"currentColor",children:b.jsx("path",{fillRule:"evenodd",d:"M4.293 4.293a1 1 0 011.414 0L10 8.586l4.293-4.293a1 1 0 111.414 1.414L11.414 10l4.293 4.293a1 1 0 01-1.414 1.414L10 11.414l-4.293 4.293a1 1 0 01-1.414-1.414L8.586 10 4.293 5.707a1 1 0 010-1.414z",clipRule:"evenodd"})}),b.jsx("span",{className:`text-sm font-medium ${E}`,children:AK(i)}),b.jsxs("span",{className:"text-xs text-dark-muted ml-auto",children:["Issue #",r," · Team #",e]})]}),b.jsxs("div",{className:"space-y-1",children:[b.jsx(_d,{label:"Team queued",done:!0}),b.jsx(_d,{label:"Creating worktree...",done:i!=="queued",active:i==="queued"}),b.jsx(_d,{label:"Starting Claude Code...",done:i==="running"||i==="done"||i==="idle",active:i==="launching"}),b.jsx(_d,{label:"Team running",done:i==="running"||i==="done"||i==="idle",active:!1})]}),h&&b.jsx("div",{className:"px-3 py-2 rounded border border-[#F85149]/30 bg-[#F85149]/10 text-[#F85149] text-sm",children:h}),f.length>0&&b.jsxs("div",{className:"bg-[#0D1117] border border-dark-border rounded p-2 max-h-[200px] overflow-y-auto font-mono text-xs",children:[f.slice(-30).map((_,A)=>{var O;return b.jsxs("div",{className:"py-0.5 leading-relaxed",children:[b.jsx("span",{className:"text-dark-muted",children:((O=_.timestamp)==null?void 0:O.substring(11,19))??"--:--:--"})," ",b.jsx("span",{className:OK(_.type),children:_.type})," ",b.jsx("span",{className:"text-dark-text",children:CK(_)})]},A)}),b.jsx("div",{ref:g})]}),f.length===0&&u.length>0&&b.jsxs("div",{className:"bg-dark-base border border-dark-border rounded p-2 max-h-[200px] overflow-y-auto font-mono text-xs text-dark-muted",children:[u.map((_,A)=>b.jsx("div",{className:"whitespace-pre-wrap break-all leading-relaxed",children:_},A)),b.jsx("div",{ref:g})]}),i==="running"&&b.jsx("p",{className:"text-xs text-[#3FB950]/70",children:"Auto-closing in 3 seconds..."})]})}function _d({label:e,done:r,active:n}){return b.jsxs("div",{className:"flex items-center gap-2 text-xs",children:[r?b.jsx("svg",{className:"h-3 w-3 text-[#3FB950]",viewBox:"0 0 20 20",fill:"currentColor",children:b.jsx("path",{fillRule:"evenodd",d:"M16.707 5.293a1 1 0 010 1.414l-8 8a1 1 0 01-1.414 0l-4-4a1 1 0 011.414-1.414L8 12.586l7.293-7.293a1 1 0 011.414 0z",clipRule:"evenodd"})}):n?b.jsxs("svg",{className:"animate-spin h-3 w-3 text-[#D29922]",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",children:[b.jsx("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),b.jsx("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4z"})]}):b.jsx("div",{className:"h-3 w-3 rounded-full border border-dark-border"}),b.jsx("span",{className:r?"text-dark-text":n?"text-[#D29922]":"text-dark-muted",children:e})]})}function NK({open:e,onClose:r}){const n=Ut(),[a,i]=k.useState(!1),[o,u]=k.useState(!0),[c,f]=k.useState(""),[d,h]=k.useState(""),[m,g]=k.useState(""),[y,x]=k.useState("15000"),[E,w]=k.useState(!1),[_,A]=k.useState(null),[O,T]=k.useState(null),[C,N]=k.useState([]),[M,R]=k.useState(""),[L,D]=k.useState([]),[z,q]=k.useState(!1),[G,U]=k.useState(null),[Y,$]=k.useState(""),[J,re]=k.useState("green"),[oe,fe]=k.useState(null),[F,Z]=k.useState(null),ce=k.useRef(null),B=k.useRef(null);k.useEffect(()=>{if(e&&!oe){const K=setTimeout(()=>{var be;return(be=ce.current)==null?void 0:be.focus()},50);return()=>clearTimeout(K)}},[e,a,oe]),k.useEffect(()=>{e&&(n.get("projects").then(K=>{N(K),K.length===1&&R(String(K[0].id))}).catch(()=>{N([])}),n.get("usage").then(K=>{const be=Math.max(K.dailyPercent,K.weeklyPercent,K.sonnetPercent,K.extraPercent);be>80?re("red"):be>=50?re("yellow"):re("green")}).catch(()=>{re("green")}))},[e,n]),k.useEffect(()=>{if(!M){D([]),U(null);return}let K=!1;return q(!0),U(null),n.get(`projects/${M}/issues`).then(be=>{if(K)return;const ve=kK(be.tree);D(ve)}).catch(be=>{if(K)return;const ve=be instanceof Error?be.message:String(be);U(ve||"Failed to fetch issues"),D([])}).finally(()=>{K||q(!1)}),()=>{K=!0}},[M,n]),k.useEffect(()=>{e&&(f(""),h(""),g(""),x("15000"),A(null),i(!1),u(!0),R(""),fe(null),Z(null),re("green"),D([]),U(null),$(""))},[e]),k.useEffect(()=>{if(!e)return;function K(be){be.key==="Escape"&&r()}return document.addEventListener("keydown",K),()=>document.removeEventListener("keydown",K)},[e,r]);const H=k.useCallback(K=>{B.current&&!B.current.contains(K.target)&&r()},[r]),te=k.useMemo(()=>{if(!Y.trim())return L;const K=Y.toLowerCase().trim(),be=K.startsWith("#")?parseInt(K.slice(1),10):/^\d+$/.test(K)?parseInt(K,10):NaN;return L.filter(ve=>!isNaN(be)&&ve.number===be||ve.title.toLowerCase().includes(K)||String(ve.number).includes(K))},[L,Y]),he=k.useCallback(K=>{f(String(K.number)),$("")},[]),ge=k.useCallback(async K=>{if(A(null),C.length>0&&!M){A("Please select a project");return}const be=parseInt(c.trim(),10);if(isNaN(be)||be<1){A("Issue number must be a positive integer");return}const ve=m.trim()||void 0,_e=M?parseInt(M,10):void 0;w(!0);try{const $e=await n.post("teams/launch",{issueNumber:be,prompt:ve,projectId:_e,headless:o,...K?{force:!0}:{}});fe($e.id),Z(be)}catch($e){const Te=$e instanceof Error?$e.message:String($e);A(Te||"Failed to launch team")}finally{w(!1)}},[c,m,n,C,M,o]),W=k.useCallback(async()=>{A(null);const K=d.trim();if(!K){A("Enter at least one issue number");return}const be=K.split(/[,\s]+/).map(at=>at.trim()).filter(Boolean).map(at=>parseInt(at,10));if(be.some(at=>isNaN(at)||at<1)){A("All issue numbers must be positive integers");return}if(be.length===0){A("Enter at least one issue number");return}const ve=parseInt(y.trim(),10);if(isNaN(ve)||ve<0){A("Stagger delay must be a non-negative number (ms)");return}if(C.length>0&&!M){A("Please select a project");return}const _e=be.map(at=>({number:at})),$e=m.trim()||void 0,Te=M?parseInt(M,10):void 0;w(!0);try{await n.post("teams/launch-batch",{issues:_e,prompt:$e,delayMs:ve,projectId:Te,headless:o}),T(`Launched ${be.length} team${be.length>1?"s":""}`),r()}catch(at){const Yr=at instanceof Error?at.message:String(at);A(Yr||"Failed to launch batch")}finally{w(!1)}},[d,y,m,n,r,C,M,o]),le=k.useCallback(K=>{K.key==="Enter"&&!E&&(a?W():ge())},[a,E,ge,W]);if(!e&&!O)return null;const ye=oe!==null&&F!==null;return b.jsxs(b.Fragment,{children:[O&&b.jsx(jK,{message:O,onDone:()=>T(null)}),e&&b.jsx("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-black/50",onClick:H,children:b.jsxs("div",{ref:B,className:"w-[480px] max-w-[95vw] max-h-[90vh] flex flex-col bg-dark-surface border border-dark-border rounded-lg shadow-2xl",role:"dialog","aria-modal":"true","aria-label":ye?"Launch Progress":"Launch Team",children:[b.jsxs("div",{className:"flex items-center justify-between px-5 py-4 border-b border-dark-border",children:[b.jsx("h2",{className:"text-base font-semibold text-dark-text",children:ye?"Launch Progress":"Launch Team"}),b.jsx("button",{onClick:r,className:"text-dark-muted hover:text-dark-text transition-colors p-1 rounded hover:bg-dark-border/30",title:"Close (Esc)",children:b.jsx("svg",{className:"w-4 h-4",viewBox:"0 0 20 20",fill:"currentColor",children:b.jsx("path",{fillRule:"evenodd",d:"M4.293 4.293a1 1 0 011.414 0L10 8.586l4.293-4.293a1 1 0 111.414 1.414L11.414 10l4.293 4.293a1 1 0 01-1.414 1.414L10 11.414l-4.293 4.293a1 1 0 01-1.414-1.414L8.586 10 4.293 5.707a1 1 0 010-1.414z",clipRule:"evenodd"})})})]}),ye?b.jsx(TK,{teamId:oe,issueNumber:F,onClose:r}):b.jsxs("div",{className:"px-5 py-4 space-y-4 overflow-y-auto",children:[C.length>0?b.jsxs("div",{children:[b.jsxs("label",{className:"block text-sm text-dark-muted mb-1",children:["Project ",b.jsx("span",{className:"text-[#F85149]",children:"*"})]}),b.jsxs("select",{value:M,onChange:K=>R(K.target.value),className:"w-full px-3 py-2 text-sm rounded border border-dark-border bg-dark-base text-dark-text focus:outline-none focus:border-dark-accent focus:ring-1 focus:ring-dark-accent/30",disabled:E,children:[b.jsx("option",{value:"",children:"Select a project..."}),C.map(K=>b.jsx("option",{value:K.id,children:K.name},K.id))]})]}):b.jsx("div",{className:"px-3 py-2 rounded border border-[#D29922]/30 bg-[#D29922]/10 text-[#D29922] text-sm",children:"Add a project first"}),b.jsxs("div",{className:"flex flex-col gap-2",children:[b.jsxs("label",{className:"flex items-center gap-2 cursor-pointer select-none",children:[b.jsx("input",{type:"checkbox",checked:a,onChange:K=>i(K.target.checked),className:"w-4 h-4 rounded border-dark-border bg-dark-base text-dark-accent focus:ring-dark-accent/50 focus:ring-offset-0 accent-[#58A6FF]"}),b.jsx("span",{className:"text-sm text-dark-muted",children:"Batch mode"})]}),b.jsxs("label",{className:"flex items-center gap-2 cursor-pointer select-none",title:o?"Runs Claude Code in the background with no visible window":"Opens Claude Code in a visible terminal window",children:[b.jsx("input",{type:"checkbox",checked:o,onChange:K=>u(K.target.checked),className:"w-4 h-4 rounded border-dark-border bg-dark-base text-dark-accent focus:ring-dark-accent/50 focus:ring-offset-0 accent-[#58A6FF]"}),b.jsx("span",{className:"text-sm text-dark-muted",children:"Run headless (background)"}),!o&&b.jsx("span",{className:"text-xs text-dark-muted/60",children:"— opens in a visible terminal window"})]})]}),a?b.jsxs(b.Fragment,{children:[b.jsxs("div",{children:[b.jsxs("label",{className:"block text-sm text-dark-muted mb-1",children:["Issue numbers ",b.jsx("span",{className:"text-[#F85149]",children:"*"})]}),b.jsx("input",{ref:ce,type:"text",value:d,onChange:K=>h(K.target.value),onKeyDown:le,placeholder:"e.g. 763, 812, 756",className:"w-full px-3 py-2 text-sm rounded border border-dark-border bg-dark-base text-dark-text placeholder:text-dark-muted/50 focus:outline-none focus:border-dark-accent focus:ring-1 focus:ring-dark-accent/30",disabled:E}),b.jsx("p",{className:"text-xs text-dark-muted mt-1",children:"Comma or space separated"})]}),b.jsxs("div",{children:[b.jsx("label",{className:"block text-sm text-dark-muted mb-1",children:"Stagger delay (ms)"}),b.jsx("input",{type:"text",inputMode:"numeric",pattern:"[0-9]*",value:y,onChange:K=>x(K.target.value),placeholder:"15000",className:"w-full px-3 py-2 text-sm rounded border border-dark-border bg-dark-base text-dark-text placeholder:text-dark-muted/50 focus:outline-none focus:border-dark-accent focus:ring-1 focus:ring-dark-accent/30",disabled:E})]})]}):b.jsxs("div",{className:"space-y-2",children:[M&&b.jsxs("div",{children:[b.jsx("label",{className:"block text-sm text-dark-muted mb-1",children:"Select issue"}),z&&b.jsxs("div",{className:"flex items-center gap-2 px-3 py-2 text-xs text-dark-muted",children:[b.jsxs("svg",{className:"animate-spin h-3 w-3",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",children:[b.jsx("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),b.jsx("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4z"})]}),"Loading issues..."]}),G&&b.jsx("div",{className:"px-3 py-2 rounded border border-[#F85149]/30 bg-[#F85149]/10 text-[#F85149] text-xs",children:G}),!z&&!G&&L.length>0&&b.jsxs(b.Fragment,{children:[b.jsxs("div",{className:"relative mb-1",children:[b.jsx("input",{type:"text",value:Y,onChange:K=>$(K.target.value),placeholder:"Filter issues... (#number or title)",className:"w-full px-3 py-1.5 text-xs rounded border border-dark-border bg-[#0D1117] text-dark-text placeholder:text-dark-muted/50 focus:outline-none focus:border-dark-accent focus:ring-1 focus:ring-dark-accent/30",disabled:E}),Y&&b.jsx("button",{onClick:()=>$(""),className:"absolute right-2 top-1/2 -translate-y-1/2 text-dark-muted hover:text-dark-text transition-colors","aria-label":"Clear search",children:b.jsx("svg",{className:"w-3 h-3",viewBox:"0 0 16 16",fill:"currentColor",children:b.jsx("path",{d:"M3.72 3.72a.75.75 0 0 1 1.06 0L8 6.94l3.22-3.22a.749.749 0 0 1 1.275.326.749.749 0 0 1-.215.734L9.06 8l3.22 3.22a.749.749 0 0 1-.326 1.275.749.749 0 0 1-.734-.215L8 9.06l-3.22 3.22a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042L6.94 8 3.72 4.78a.75.75 0 0 1 0-1.06Z"})})})]}),b.jsx("div",{className:"max-h-[200px] overflow-y-auto border border-dark-border rounded bg-[#0D1117]",children:te.length===0?b.jsxs("div",{className:"px-3 py-2 text-xs text-dark-muted",children:["No issues match “",Y,"”"]}):te.map(K=>{const be=c===String(K.number),ve=!!K.activeTeam;return b.jsxs("button",{onClick:()=>he(K),disabled:E,className:`w-full text-left px-3 py-1.5 text-xs flex items-center gap-2 transition-colors border-b border-dark-border/30 last:border-b-0 ${be?"bg-dark-accent/15 text-dark-accent":"hover:bg-dark-surface text-dark-text"}`,children:[K.state==="open"?b.jsxs("svg",{className:"w-3.5 h-3.5 text-[#3FB950] shrink-0",viewBox:"0 0 16 16",fill:"currentColor",children:[b.jsx("path",{d:"M8 9.5a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3Z"}),b.jsx("path",{d:"M8 0a8 8 0 1 1 0 16A8 8 0 0 1 8 0ZM1.5 8a6.5 6.5 0 1 0 13 0 6.5 6.5 0 0 0-13 0Z"})]}):b.jsxs("svg",{className:"w-3.5 h-3.5 text-[#A371F7] shrink-0",viewBox:"0 0 16 16",fill:"currentColor",children:[b.jsx("path",{d:"M11.28 6.78a.75.75 0 0 0-1.06-1.06L7.25 8.69 5.78 7.22a.75.75 0 0 0-1.06 1.06l2 2a.75.75 0 0 0 1.06 0l3.5-3.5Z"}),b.jsx("path",{d:"M16 8A8 8 0 1 1 0 8a8 8 0 0 1 16 0Zm-1.5 0a6.5 6.5 0 1 0-13 0 6.5 6.5 0 0 0 13 0Z"})]}),b.jsxs("span",{className:"text-dark-muted shrink-0",children:["#",K.number]}),b.jsx("span",{className:"truncate",children:K.title}),ve&&b.jsx("span",{className:"ml-auto shrink-0 px-1.5 py-0.5 rounded text-[10px] font-medium bg-[#D29922]/15 text-[#D29922] border border-[#D29922]/30",children:K.activeTeam.status}),be&&b.jsx("svg",{className:"w-3.5 h-3.5 text-dark-accent ml-auto shrink-0",viewBox:"0 0 20 20",fill:"currentColor",children:b.jsx("path",{fillRule:"evenodd",d:"M16.707 5.293a1 1 0 010 1.414l-8 8a1 1 0 01-1.414 0l-4-4a1 1 0 011.414-1.414L8 12.586l7.293-7.293a1 1 0 011.414 0z",clipRule:"evenodd"})})]},K.number)})}),b.jsxs("p",{className:"text-xs text-dark-muted mt-1",children:[L.length," issue",L.length!==1?"s":""," found",Y&&te.length!==L.length&&` (${te.length} matching)`]})]}),!z&&!G&&L.length===0&&b.jsx("div",{className:"px-3 py-2 text-xs text-dark-muted",children:"No issues found for this project"})]}),b.jsxs("div",{children:[b.jsxs("label",{className:"block text-sm text-dark-muted mb-1",children:["Issue number ",b.jsx("span",{className:"text-[#F85149]",children:"*"}),M&&L.length>0&&b.jsx("span",{className:"text-dark-muted/50 text-xs ml-1",children:"(or type manually)"})]}),b.jsx("input",{ref:ce,type:"text",inputMode:"numeric",pattern:"[0-9]*",value:c,onChange:K=>f(K.target.value),onKeyDown:le,placeholder:"e.g. 763",className:"w-full px-3 py-2 text-sm rounded border border-dark-border bg-dark-base text-dark-text placeholder:text-dark-muted/50 focus:outline-none focus:border-dark-accent focus:ring-1 focus:ring-dark-accent/30",disabled:E})]})]}),b.jsxs("div",{children:[b.jsxs("label",{className:"block text-sm text-dark-muted mb-1",children:["Prompt ",b.jsx("span",{className:"text-dark-muted/50",children:"(optional)"})]}),b.jsx("input",{type:"text",value:m,onChange:K=>g(K.target.value),onKeyDown:le,placeholder:"Custom prompt (default: project prompt file)",className:"w-full px-3 py-2 text-sm rounded border border-dark-border bg-dark-base text-dark-text placeholder:text-dark-muted/50 focus:outline-none focus:border-dark-accent focus:ring-1 focus:ring-dark-accent/30",disabled:E}),b.jsxs("p",{className:"text-xs text-dark-muted mt-1",children:["Leave empty to use the project's prompt file (with ",b.jsx("code",{className:"text-dark-accent/70",children:"{{ISSUE_NUMBER}}"})," replaced automatically)."]})]}),J==="red"&&b.jsx("div",{className:"px-3 py-2 rounded border border-[#F85149]/30 bg-[#F85149]/10 text-[#F85149] text-sm",children:'Usage is in the red zone (>80%). New launches will be queued instead of started immediately. Use "Force Launch" to override.'}),_&&b.jsx("div",{className:"px-3 py-2 rounded border border-[#F85149]/30 bg-[#F85149]/10 text-[#F85149] text-sm",children:_})]}),b.jsxs("div",{className:"flex items-center justify-end gap-3 px-5 py-4 border-t border-dark-border",children:[b.jsx("button",{onClick:r,className:"px-3 py-1.5 text-sm rounded border border-dark-border text-dark-muted hover:text-dark-text hover:border-dark-muted transition-colors",children:ye?"Close":"Cancel"}),!ye&&b.jsxs(b.Fragment,{children:[b.jsx("button",{onClick:()=>a?W():void ge(),disabled:E||C.length===0,className:"px-4 py-1.5 text-sm font-medium rounded border border-dark-accent/40 text-dark-accent bg-dark-accent/10 hover:bg-dark-accent/20 transition-colors disabled:opacity-40 disabled:cursor-not-allowed",children:E?"Launching...":J==="red"?a?"Queue All":"Queue":a?"Launch All":"Launch"}),J==="red"&&!a&&b.jsx("button",{onClick:()=>void ge(!0),disabled:E||C.length===0,className:"px-4 py-1.5 text-sm font-medium rounded border border-[#F85149]/40 text-[#F85149] bg-[#F85149]/10 hover:bg-[#F85149]/20 transition-colors disabled:opacity-40 disabled:cursor-not-allowed",title:"Force launch ignoring red zone usage limits",children:"Force Launch"})]})]})]})})]})}function MK({size:e=20,className:r}){return b.jsxs("svg",{className:r,width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[b.jsx("rect",{width:"7",height:"7",x:"3",y:"3",rx:"1"}),b.jsx("rect",{width:"7",height:"7",x:"14",y:"3",rx:"1"}),b.jsx("rect",{width:"7",height:"7",x:"14",y:"14",rx:"1"}),b.jsx("rect",{width:"7",height:"7",x:"3",y:"14",rx:"1"})]})}function PK({size:e=20,className:r}){return b.jsxs("svg",{className:r,width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[b.jsx("line",{x1:"6",x2:"6",y1:"3",y2:"15"}),b.jsx("circle",{cx:"18",cy:"6",r:"3"}),b.jsx("circle",{cx:"6",cy:"18",r:"3"}),b.jsx("path",{d:"M18 9a9 9 0 0 1-9 9"})]})}function RK({size:e=20,className:r}){return b.jsxs("svg",{className:r,width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[b.jsx("path",{d:"M3 3v18h18"}),b.jsx("path",{d:"M18 17V9"}),b.jsx("path",{d:"M13 17V5"}),b.jsx("path",{d:"M8 17v-3"})]})}function DK({size:e=20,className:r}){return b.jsxs("svg",{className:r,width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[b.jsx("path",{d:"M9 20H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H20a2 2 0 0 1 2 2v5"}),b.jsx("circle",{cx:"13",cy:"12",r:"2"}),b.jsx("path",{d:"M18 19c-2.8 0-5-2.2-5-5v8"}),b.jsx("circle",{cx:"20",cy:"19",r:"2"})]})}function LK({size:e=14,className:r}){return b.jsxs("svg",{className:r,width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[b.jsx("path",{d:"M4.5 16.5c-1.5 1.26-2 5-2 5s3.74-.5 5-2c.71-.84.7-2.13-.09-2.91a2.18 2.18 0 0 0-2.91-.09z"}),b.jsx("path",{d:"m12 15-3-3a22 22 0 0 1 2-3.95A12.88 12.88 0 0 1 22 2c0 2.72-.78 7.5-6 11a22.35 22.35 0 0 1-4 2z"}),b.jsx("path",{d:"M9 12H4s.55-3.03 2-4c1.62-1.08 5 0 5 0"}),b.jsx("path",{d:"M12 15v5s3.03-.55 4-2c1.08-1.62 0-5 0-5"})]})}function IK({size:e=14,className:r}){return b.jsx("svg",{className:r,width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:b.jsx("polygon",{points:"6 3 20 12 6 21 6 3"})})}function RS({size:e=14,className:r}){return b.jsxs("svg",{className:r,width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[b.jsx("path",{d:"M12.22 2h-.44a2 2 0 0 0-2 2v.18a2 2 0 0 1-1 1.73l-.43.25a2 2 0 0 1-2 0l-.15-.08a2 2 0 0 0-2.73.73l-.22.38a2 2 0 0 0 .73 2.73l.15.1a2 2 0 0 1 1 1.72v.51a2 2 0 0 1-1 1.74l-.15.09a2 2 0 0 0-.73 2.73l.22.38a2 2 0 0 0 2.73.73l.15-.08a2 2 0 0 1 2 0l.43.25a2 2 0 0 1 1 1.73V20a2 2 0 0 0 2 2h.44a2 2 0 0 0 2-2v-.18a2 2 0 0 1 1-1.73l.43-.25a2 2 0 0 1 2 0l.15.08a2 2 0 0 0 2.73-.73l.22-.39a2 2 0 0 0-.73-2.73l-.15-.08a2 2 0 0 1-1-1.74v-.5a2 2 0 0 1 1-1.74l.15-.09a2 2 0 0 0 .73-2.73l-.22-.38a2 2 0 0 0-2.73-.73l-.15.08a2 2 0 0 1-2 0l-.43-.25a2 2 0 0 1-1-1.73V4a2 2 0 0 0-2-2z"}),b.jsx("circle",{cx:"12",cy:"12",r:"3"})]})}function zK({size:e=14,className:r}){return b.jsxs("svg",{className:r,width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[b.jsx("path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8"}),b.jsx("path",{d:"M21 3v5h-5"}),b.jsx("path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16"}),b.jsx("path",{d:"M8 16H3v5"})]})}function qK({size:e=20,className:r}){return b.jsx("svg",{className:r,width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:b.jsx("path",{d:"M22 12h-4l-3 9L9 3l-3 9H2"})})}function BK({size:e=14,className:r}){return b.jsx("svg",{className:r,width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:b.jsx("path",{d:"M13 2L3 14h9l-1 8 10-12h-9l1-8z"})})}function $K({size:e=14,className:r}){return b.jsxs("svg",{className:r,width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[b.jsx("path",{d:"M20 21v-2a4 4 0 0 0-4-4H8a4 4 0 0 0-4 4v2"}),b.jsx("circle",{cx:"12",cy:"7",r:"4"})]})}function UK({size:e=14,className:r}){return b.jsxs("svg",{className:r,width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[b.jsx("circle",{cx:"12",cy:"12",r:"10"}),b.jsx("polyline",{points:"12 6 12 12 16 14"})]})}function dT({size:e=14,className:r}){return b.jsx("svg",{className:r,width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:b.jsx("path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z"})})}function FK({size:e=14,className:r}){return b.jsxs("svg",{className:r,width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[b.jsx("circle",{cx:"12",cy:"12",r:"1"}),b.jsx("circle",{cx:"19",cy:"12",r:"1"}),b.jsx("circle",{cx:"5",cy:"12",r:"1"})]})}function HK({size:e=14,className:r}){return b.jsxs("svg",{className:r,width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[b.jsx("rect",{width:"18",height:"11",x:"3",y:"11",rx:"2",ry:"2"}),b.jsx("path",{d:"M7 11V7a5 5 0 0 1 10 0v4"})]})}function GK({size:e=14,className:r}){return b.jsx("svg",{className:r,width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:b.jsx("path",{d:"m9 18 6-6-6-6"})})}const Wn={queued:"#8B949E",launching:"#D29922",running:"#3FB950",idle:"#D29922",stuck:"#F85149",done:"#A371F7",failed:"#F85149"};function X6(e,r){const n=Math.max(0,r-10);return e>=r?"#F85149":e>=n?"#D29922":"#3FB950"}const hT={"team-lead":"#58A6FF",coordinator:"#58A6FF",tl:"#58A6FF",analyst:"#D29922",dev:"#3FB950",developer:"#3FB950",reviewer:"#A371F7"},pT=["#58A6FF","#3FB950","#D29922","#A371F7","#F778BA","#79C0FF","#7EE787","#E3B341","#D2A8FF","#FF7B72"];function Ec(e,r){if(r){const i=hT[r.toLowerCase()];if(i)return i}const n=hT[e.toLowerCase()];if(n)return n;let a=0;for(let i=0;i<e.length;i++)a=(a<<5)-a+e.charCodeAt(i)|0;return pT[Math.abs(a)%pT.length]}function u2(e){if(!e)return null;const r=new Date(e).getTime()-Date.now();if(r<=0)return null;const n=Math.floor(r/36e5),a=Math.floor(r%36e5/6e4);return n>0?`Resets in ${n}h ${a}m`:`Resets in ${a}m`}const KK={daily:85,weekly:95,sonnet:95,extra:95};function VK(){const{teams:e}=Sc(),r=Ut(),[n,a]=k.useState(!1),[i,o]=k.useState(null),u=k.useCallback(async()=>{try{const g=await r.get("usage");o(g)}catch{}},[r]);k.useEffect(()=>{u();const g=setInterval(u,3e4);return()=>clearInterval(g)},[u]);const c=e.reduce((g,y)=>(g[y.status]=(g[y.status]||0)+1,g),{}),f=(i==null?void 0:i.redThresholds)??KK,d=i?[{key:"daily",label:"Daily",percent:i.dailyPercent,redThreshold:f.daily,resetLabel:u2(i.dailyResetsAt)},{key:"weekly",label:"Weekly",percent:i.weeklyPercent,redThreshold:f.weekly,resetLabel:u2(i.weeklyResetsAt)},{key:"sonnet",label:"Sonnet",percent:i.sonnetPercent,redThreshold:f.sonnet,resetLabel:null},{key:"extra",label:"Extra",percent:i.extraPercent,redThreshold:f.extra,resetLabel:null}]:[],h=[{label:"running",count:c.running||0,color:Wn.running},{label:"queued",count:c.queued||0,color:Wn.queued},{label:"launching",count:c.launching||0,color:Wn.launching},{label:"idle",count:c.idle||0,color:Wn.idle},{label:"stuck",count:c.stuck||0,color:Wn.stuck}].filter(g=>g.count>0),m=(i==null?void 0:i.zone)==="red";return b.jsxs(b.Fragment,{children:[b.jsxs("header",{className:"h-12 min-h-[48px] bg-dark-surface border-b border-dark-border flex items-center px-4 justify-between shrink-0",children:[b.jsx("div",{className:"flex items-center gap-3",children:b.jsx("h1",{className:"text-sm font-semibold text-dark-text tracking-wide",children:"Fleet Commander"})}),b.jsxs("div",{className:"flex items-center gap-3",children:[h.map((g,y)=>b.jsxs("span",{className:"text-xs font-medium",children:[b.jsx("span",{style:{color:g.color},children:g.count}),b.jsx("span",{className:"text-dark-muted ml-1",children:g.label}),y<h.length-1&&b.jsx("span",{className:"text-dark-muted ml-3",children:"·"})]},g.label)),d.length>0&&h.length>0&&b.jsx("span",{className:"text-dark-muted mx-1",children:"|"}),d.map(g=>b.jsxs("span",{className:"text-xs font-medium",title:g.resetLabel??void 0,children:[b.jsx("span",{className:"text-dark-muted",children:g.label})," ",b.jsxs("span",{style:{color:X6(g.percent,g.redThreshold)},children:[g.percent.toFixed(0),"%"]})]},g.key)),m&&b.jsx("span",{className:"text-xs font-bold animate-pulse",style:{color:"#F85149"},children:"PAUSED"}),b.jsxs("button",{type:"button",onClick:g=>{g.stopPropagation(),g.preventDefault(),a(!0)},className:"ml-2 px-3 py-1 text-xs font-medium rounded border border-dark-accent/40 text-dark-accent hover:bg-dark-accent/10 transition-colors inline-flex items-center gap-1.5",title:"Launch a new team",children:[b.jsx(LK,{size:14}),"Launch Team"]})]})]}),MS.createPortal(b.jsx(NK,{open:n,onClose:()=>a(!1)}),document.body)]})}const YK=[{to:"/",label:"Fleet Grid",icon:b.jsx(MK,{})},{to:"/issues",label:"Issue Tree",icon:b.jsx(PK,{})},{to:"/usage",label:"Usage View",icon:b.jsx(RK,{})},{to:"/projects",label:"Projects",icon:b.jsx(DK,{})},{to:"/lifecycle",label:"Lifecycle",icon:b.jsx(qK,{size:20})},{to:"/settings",label:"Settings",icon:b.jsx(RS,{size:20})}];function XK(){return b.jsx("nav",{className:"w-14 min-w-[56px] bg-dark-surface border-r border-dark-border flex flex-col items-center pt-2 gap-1",children:YK.map(e=>b.jsx(G6,{to:e.to,end:e.to==="/",title:e.label,className:({isActive:r})=>`w-10 h-10 flex items-center justify-center rounded-md text-lg transition-colors ${r?"text-dark-accent bg-dark-accent/10":"text-dark-muted hover:text-dark-text hover:bg-dark-border/50"}`,children:e.icon},e.to))})}function WK(){const{connected:e,lastEvent:r}=Sc(),[n,a]=k.useState(null);return k.useEffect(()=>{if(!r){a(null);return}const i=()=>{a(Math.floor((Date.now()-r.getTime())/1e3))};i();const o=setInterval(i,1e3);return()=>clearInterval(o)},[r]),b.jsxs("footer",{className:"h-6 min-h-[24px] bg-dark-base border-t border-dark-border flex items-center px-3 text-xs text-dark-muted select-none",children:[b.jsx("span",{className:`inline-block w-2 h-2 rounded-full mr-2 ${e?"bg-green-500":"bg-red-500"}`}),b.jsx("span",{children:e?"Connected":"Disconnected"}),n!==null&&b.jsxs("span",{className:"ml-4",children:["Last update: ",n,"s ago"]})]})}const ZK={queued:"Queued",running:"Running",stuck:"Stuck",idle:"Idle",done:"Done",failed:"Failed",launching:"Launching"};function DS({status:e}){const r=Wn[e]??"#8B949E",n=ZK[e]??e;let a="";return e==="stuck"?a="animate-pulse-stuck":e==="launching"&&(a="animate-blink"),b.jsxs("span",{className:"inline-flex items-center gap-2",children:[b.jsx("span",{className:`inline-block w-2.5 h-2.5 rounded-full shrink-0 ${a}`,style:{backgroundColor:r}}),b.jsx("span",{className:"text-sm font-medium",style:{color:r},children:n})]})}function QK(e,r){return e==="success"?{icon:"✓",color:"#3FB950"}:e==="failure"?{icon:"✕",color:"#F85149"}:e==="cancelled"?{icon:"―",color:"#8B949E"}:r==="in_progress"||r==="queued"||r==="pending"?{icon:"○",color:"#D29922"}:{icon:"○",color:"#8B949E"}}function W6({checks:e}){return e.length===0?b.jsx("p",{className:"text-dark-muted text-sm",children:"No CI checks available"}):b.jsx("div",{className:"flex flex-wrap gap-1.5",children:e.map((r,n)=>{const{icon:a,color:i}=QK(r.conclusion,r.status),o=r.conclusion==="success"?"rgba(63, 185, 80, 0.15)":r.conclusion==="failure"?"rgba(248, 81, 73, 0.15)":r.conclusion==="cancelled"?"rgba(139, 148, 158, 0.15)":"rgba(210, 153, 34, 0.15)";return b.jsxs("span",{className:"inline-flex items-center gap-1 text-xs px-2 py-0.5 rounded-full max-w-[10rem]",style:{backgroundColor:o},title:r.name,children:[b.jsx("span",{className:"font-bold leading-none shrink-0",style:{color:i},children:a}),b.jsx("span",{className:"truncate",style:{color:i},children:r.name})]},`${r.name}-${n}`)})})}const LS="__pm__",IS="__fc__";function JK(e){return e===LS?"You":e===IS?"FC":e==="team-lead"||e==="tl"?"TL":e.charAt(0).toUpperCase()+e.slice(1)}const eV={[LS]:"#3FB950",[IS]:"#D29922"};function tV({roster:e,activeFilters:r,onFiltersChange:n,hasUserEntries:a,hasFcEntries:i}){const o=k.useMemo(()=>{const d=new Set;d.add("team-lead");for(const m of e)d.add(m.name.toLowerCase());const h=Array.from(d).sort((m,g)=>m==="team-lead"?-1:g==="team-lead"?1:m.localeCompare(g));return a&&h.push(LS),i&&h.push(IS),h},[e,a,i]);if(o.length<=1)return null;const u=r.size===0||r.size===o.length,c=()=>{n(new Set)},f=d=>{const h=new Set(r);if(u){n(new Set([d]));return}if(h.has(d)){if(h.delete(d),h.size===0){n(new Set);return}}else if(h.add(d),h.size===o.length){n(new Set);return}n(h)};return b.jsxs("div",{className:"flex items-center gap-1 mb-2 flex-wrap",children:[b.jsx("button",{onClick:c,className:"px-2 py-0.5 text-[10px] font-medium rounded-full border transition-all duration-150",style:u?{color:"#C9D1D9",borderColor:"#C9D1D960",backgroundColor:"#C9D1D918"}:{color:"#484F58",borderColor:"#484F5840",opacity:.7},children:"All"}),o.map(d=>{const h=eV[d]??Ec(d,d),m=!u&&r.has(d);return b.jsxs("button",{onClick:()=>f(d),className:"px-2 py-0.5 text-[10px] font-medium rounded-full border transition-all duration-150 flex items-center gap-1",style:m?{color:h,borderColor:h+"60",backgroundColor:h+"18"}:{color:"#484F58",borderColor:"#484F5840",opacity:.5},children:[b.jsx("span",{className:"inline-block w-1.5 h-1.5 rounded-full shrink-0",style:{backgroundColor:m?h:"#484F58"}}),JK(d)]},d)})]})}function So(e){return!e||e==="team-lead"||e==="tl"?"TL":e.charAt(0).toUpperCase()+e.slice(1)}const rV={assistant:{color:"#58A6FF",label:"TL"},user:{color:"#3FB950",label:"You"},fc:{color:"#D29922",label:"FC"},system:{color:"#8B949E",label:"system"},tool_use:{color:"#D29922",label:"tool"},tool_result:{color:"#A371F7",label:"result"},result:{color:"#3FB950",label:"done"},rate_limit_event:{color:"#D29922",label:"rate-limit"}};function ah(e){return rV[e]??{color:"#8B949E",label:e}}const nV={initial_prompt:"prompt",origin_sync:"sync",idle_nudge:"idle",stuck_nudge:"nudge",ci_green:"CI pass",ci_red:"CI fail",ci_blocked:"CI blocked",pr_merged_shutdown:"shutdown",subagent_crash:"crash"};function Z6(e){return e?nV[e]??e:null}const Q6=new Set(["assistant","user","fc"]);function J6(e){var n;if(!Q6.has(e.streamType))return"";const r=(n=e.message)==null?void 0:n.content;return Array.isArray(r)?r.filter(a=>a.type==="text"&&a.text).map(a=>a.text).join(`
61
+ `):""}const aV=new Set(["SessionStart","SessionEnd","Stop","SubagentStart","SubagentStop"]),iV=new Set(["ToolError","StopFailure"]);function oV(e){if(!e)return null;try{const r=JSON.parse(e);if(typeof r=="object"&&r!==null&&"error"in r&&typeof r.error=="string")return r.error}catch{}return null}function Ia(e){try{return new Date(e).toLocaleTimeString([],{hour12:!1,hour:"2-digit",minute:"2-digit"})}catch{return"--:--"}}function mT(e){if(e.streamType==="user")return{label:"You",color:"#3FB950"};if(e.streamType==="fc")return{label:"FC",color:"#D29922"};if(e.agentName&&(e.streamType==="assistant"||e.streamType==="tool_use")){const r=So(e.agentName),n=Ec(e.agentName,e.agentName);return{label:r,color:n}}return ah(e.streamType)}function lV(e){if(e.agentName){const r=So(e.agentName),n=Ec(e.agentName,e.agentName);return{label:r,color:n}}return{label:"System",color:"#8B949E"}}const uV=120;function Pl(e,r=uV){return e.length<=r?e:e.slice(0,r)+"..."}function eL(e){var a;if(e.streamType!=="tool_use"||!((a=e.tool)!=null&&a.name)||!e.tool.input)return null;const r=e.tool.input;switch(e.tool.name){case"Bash":{const i=r.command;return typeof i=="string"?Pl(i):null}case"Read":{const i=r.file_path;return typeof i=="string"?i:null}case"Write":{const i=r.file_path;return typeof i=="string"?i:null}case"Edit":{const i=r.file_path,o=r.old_string,u=r.new_string,c=[];return typeof i=="string"&&c.push(i),typeof o=="string"&&typeof u=="string"&&c.push(Pl(o,50)+" -> "+Pl(u,50)),c.length>0?c.join(" "):null}case"Grep":{const i=r.pattern,o=r.path,u=[];return typeof i=="string"&&u.push(`/${i}/`),typeof o=="string"&&u.push(o),u.length>0?u.join(" in "):null}case"Glob":{const i=r.pattern;return typeof i=="string"?i:null}case"SendMessage":{const i=r.to,o=r.message,u=[];return typeof i=="string"&&u.push(`to ${i}`),typeof o=="string"&&u.push(Pl(o,80)),u.length>0?u.join(": "):null}case"Agent":{const i=r.name,o=r.message,u=[];return typeof i=="string"&&u.push(i),typeof o=="string"&&u.push(Pl(o,80)),u.length>0?u.join(": "):null}default:{try{const i=JSON.stringify(r);if(i.length>2)return Pl(i)}catch{}return null}}}function sV({entry:e}){var u,c;const[r,n]=k.useState(!1),a=J6(e),i=a.includes(`
62
+ `),o=eL(e);if(e.streamType==="system"&&(e.subtype==="task_progress"||e.subtype==="task_notification")){const f=So(e.agentName),d=e.agentName?Ec(e.agentName,e.agentName):"#8B949E",h=e.lastToolName??((u=e.tool)==null?void 0:u.name),m=e.description;return b.jsxs("div",{className:"py-0 leading-snug flex items-center gap-1.5 text-dark-muted",children:[b.jsx("span",{children:Ia(e.timestamp)}),b.jsx("span",{className:"inline-block w-1.5 h-1.5 rounded-full shrink-0",style:{backgroundColor:d}}),b.jsx("span",{style:{color:d},className:"font-medium",children:f}),h&&b.jsxs(b.Fragment,{children:[b.jsx("span",{className:"text-dark-muted",children:b.jsx(RS,{size:10})}),b.jsx("span",{className:"text-dark-muted",children:h})]}),m&&b.jsx("span",{className:"text-dark-muted truncate",children:m})]})}if(Q6.has(e.streamType)&&a){const{label:f,color:d}=mT(e);return b.jsxs("div",{className:"py-0.5 leading-relaxed",children:[b.jsx("span",{className:"text-dark-muted",children:Ia(e.timestamp)})," ",b.jsx("span",{className:"inline-block w-1.5 h-1.5 rounded-full mr-0.5 align-middle",style:{backgroundColor:d}}),b.jsx("span",{style:{color:d},className:"font-semibold",children:f}),e.streamType==="fc"&&e.subtype&&b.jsxs("span",{className:"text-dark-muted text-[10px] ml-1",children:["[",Z6(e.subtype),"]"]})," ",i?b.jsx("span",{className:"text-dark-text whitespace-pre-wrap",children:a}):b.jsx("span",{className:"text-dark-text",children:a})]})}if(e.streamType==="tool_use"&&((c=e.tool)!=null&&c.name)){const{label:f,color:d}=mT(e),h=o!==null;return b.jsxs("div",{children:[b.jsxs("div",{className:"py-0 leading-snug flex items-center gap-1.5",children:[b.jsx("span",{className:"text-dark-muted",children:Ia(e.timestamp)}),b.jsx("span",{className:"inline-block w-1.5 h-1.5 rounded-full shrink-0",style:{backgroundColor:d}}),b.jsx("span",{style:{color:d},className:"font-semibold",children:f}),b.jsx("span",{className:`text-dark-muted bg-dark-border/30 px-1.5 py-0.5 rounded${h?" cursor-pointer border-b border-dotted border-dark-border hover:bg-dark-border/50":""}`,onClick:h?()=>n(m=>!m):void 0,onKeyDown:h?m=>{(m.key==="Enter"||m.key===" ")&&(m.preventDefault(),n(g=>!g))}:void 0,role:h?"button":void 0,tabIndex:h?0:void 0,"aria-expanded":h?r:void 0,children:e.tool.name})]}),r&&o&&b.jsx("div",{className:"text-dark-muted pl-6 pb-0.5 font-mono truncate",title:o,children:o})]})}if(e.streamType==="result"||e.streamType==="tool_result"){const{color:f,label:d}=ah(e.streamType);return b.jsxs("div",{className:"py-0 leading-snug text-dark-muted",children:[b.jsx("span",{className:"text-dark-muted",children:Ia(e.timestamp)})," ",b.jsx("span",{style:{color:f},className:"font-semibold",children:d})]})}if(a){const{color:f,label:d}=ah(e.streamType);return b.jsxs("div",{className:"py-0 leading-snug text-dark-muted",children:[b.jsx("span",{className:"text-dark-muted",children:Ia(e.timestamp)})," ",b.jsx("span",{style:{color:f},className:"font-semibold",children:d})," ",b.jsx("span",{className:"text-dark-text",children:a})]})}return null}function cV({entry:e}){const r=aV.has(e.eventType),n=iV.has(e.eventType),a=n?oV(e.payload):null,{label:i,color:o}=lV(e),[u,c]=k.useState(!1);if(r){const f=e.eventType==="SessionStart"||e.eventType==="SubagentStart"?"#3FB950":"#8B949E";return b.jsxs("div",{className:"py-0 leading-snug flex items-center gap-1.5 text-dark-muted",children:[b.jsx("span",{children:Ia(e.timestamp)}),b.jsx("span",{className:"inline-block w-1.5 h-1.5 rounded-full shrink-0",style:{backgroundColor:o}}),b.jsx("span",{style:{color:o},className:"font-medium",children:i}),b.jsx("span",{className:"font-normal px-1.5 rounded",style:{color:f,backgroundColor:f+"18"},children:e.eventType})]})}if(n){const f=a!==null;return b.jsxs("div",{className:"py-0 leading-snug text-dark-muted",children:[b.jsxs("div",{className:"flex items-center gap-1.5",children:[b.jsx("span",{children:Ia(e.timestamp)}),b.jsx("span",{className:"inline-block w-1.5 h-1.5 rounded-full shrink-0",style:{backgroundColor:o}}),b.jsx("span",{style:{color:o},className:"font-medium",children:i}),b.jsx("span",{className:`font-normal bg-red-500/20 text-red-400 px-1.5 py-0.5 rounded${f?" cursor-pointer border-b border-dotted border-red-400/40 hover:bg-red-500/30":""}`,onClick:f?()=>c(d=>!d):void 0,onKeyDown:f?d=>{(d.key==="Enter"||d.key===" ")&&(d.preventDefault(),c(h=>!h))}:void 0,role:f?"button":void 0,tabIndex:f?0:void 0,"aria-expanded":f?u:void 0,children:e.eventType}),e.toolName&&b.jsx("span",{className:"text-dark-muted bg-dark-border/30 px-1.5 rounded",children:e.toolName})]}),u&&a&&b.jsx("div",{className:"ml-[52px] text-[#F85149] mt-0.5 line-clamp-2",children:a})]})}return b.jsxs("div",{className:"py-0 leading-snug flex items-center gap-1.5 text-dark-muted",children:[b.jsx("span",{children:Ia(e.timestamp)}),b.jsx("span",{className:"inline-block w-1.5 h-1.5 rounded-full shrink-0",style:{backgroundColor:o}}),b.jsx("span",{style:{color:o},className:"font-medium",children:i}),b.jsx("span",{className:"text-dark-text font-normal",children:e.eventType}),e.toolName&&b.jsx("span",{className:"text-dark-muted bg-dark-border/30 px-1.5 rounded",children:e.toolName})]})}function fV(e){return e.source==="stream"?e.streamType==="user"?"__pm__":e.streamType==="fc"?"__fc__":e.agentName:e.agentName}function dV({teamId:e,teamStatus:r,isThinking:n,roster:a,agentFilters:i,onAgentFiltersChange:o}){const u=Ut(),[c,f]=k.useState([]),[d,h]=k.useState(!1),[m,g]=k.useState(!1),y=k.useRef(null),x=k.useRef(null),E=k.useRef(!0),w=k.useCallback(()=>{const C=y.current;if(!C)return;const N=C.scrollHeight-C.scrollTop-C.clientHeight<40;E.current=N},[]);k.useEffect(()=>{let C=!1;async function N(){if(!C)try{const R=await u.get(`teams/${e}/timeline?limit=500`);C||f(R)}catch{}}if(N(),r==="done"||r==="failed")return()=>{C=!0};const M=setInterval(N,2e3);return()=>{C=!0,clearInterval(M)}},[u,e,r]);const _=k.useMemo(()=>!i||i.size===0?c:c.filter(C=>{const N=fV(C);return N?i.has(N):!0}),[c,i]);k.useEffect(()=>{var C;E.current&&((C=x.current)==null||C.scrollIntoView({behavior:"smooth"}))},[_.length]);const A=k.useCallback(()=>{var N;const C=[];for(const M of _){const R=Ia(M.timestamp);if(M.source==="stream"){const L=J6(M);if(L){const D=M.agentName?So(M.agentName):ah(M.streamType).label,z=M.streamType==="fc"&&M.subtype?` [${Z6(M.subtype)}]`:"";C.push(`[${R}] ${D}${z}: ${L}`)}else if(M.streamType==="tool_use"&&((N=M.tool)!=null&&N.name)){const D=M.agentName?So(M.agentName):"tool",z=eL(M),q=z?` — ${z}`:"";C.push(`[${R}] ${D}: ${M.tool.name}${q}`)}else if(M.streamType==="system"&&M.description){const D=M.agentName?So(M.agentName):"system";C.push(`[${R}] ${D}: ${M.lastToolName??""} ${M.description}`)}}else{const L=M,D=L.agentName?So(L.agentName):"System";let z=L.eventType;L.toolName&&(z+=` (${L.toolName})`),C.push(`[${R}] ${D}: ${z}`)}}navigator.clipboard.writeText(C.join(`
63
+ `)).then(()=>{h(!0),setTimeout(()=>h(!1),2e3)}).catch(()=>{g(!0),setTimeout(()=>g(!1),2e3)})},[_]),O=k.useMemo(()=>c.some(C=>C.source==="stream"&&C.streamType==="user"),[c]),T=k.useMemo(()=>c.some(C=>C.source==="stream"&&C.streamType==="fc"),[c]);if(c.length===0){const C=r==="done"||r==="failed";return b.jsx("div",{className:"text-[11px] text-dark-muted italic py-2",children:C?"No session log captured.":"No events yet. Events appear when Claude Code is running."})}return b.jsxs("div",{className:"relative flex-1 min-h-0 flex flex-col",children:[a&&o&&b.jsx(tV,{roster:a,activeFilters:i??new Set,onFiltersChange:o,hasUserEntries:O,hasFcEntries:T}),b.jsx("button",{onClick:A,className:"absolute top-1.5 right-1.5 z-10 px-2 py-0.5 text-[10px] rounded border border-dark-border text-dark-muted hover:text-dark-text hover:border-dark-muted bg-[#0D1117] transition-colors",title:"Copy full log to clipboard",children:d?"Copied!":m?"Failed":"Copy"}),b.jsxs("div",{ref:y,onScroll:w,className:`flex-1 min-h-0 font-mono text-[11px] overflow-y-auto bg-[#0D1117] p-2 rounded border border-dark-border custom-scrollbar${n?" thinking-glow":""}`,children:[_.map(C=>C.source==="stream"?b.jsx(sV,{entry:C},C.id):b.jsx(cV,{entry:C},C.id)),n&&b.jsxs("div",{className:"py-1 flex items-center gap-1.5",children:[b.jsx("span",{className:"inline-block w-1.5 h-1.5 rounded-full bg-[#E8976C] animate-thinking-dot"}),b.jsx("span",{className:"text-[#E8976C] text-[10px] italic",children:"thinking..."})]}),b.jsx("div",{ref:x})]})]})}function hV({teamId:e,disabled:r=!1}){const n=Ut(),[a,i]=k.useState(""),[o,u]=k.useState(!1),[c,f]=k.useState(null),d=k.useRef(null),h=k.useRef(null);k.useEffect(()=>()=>{h.current&&clearTimeout(h.current)},[]);const m=y=>{f(y),h.current&&clearTimeout(h.current),h.current=setTimeout(()=>{f(null),h.current=null},3e3)},g=async y=>{var E;y.preventDefault();const x=a.trim();if(!(!x||o)){u(!0),f(null);try{await n.post(`teams/${e}/send-message`,{message:x}),i(""),m({type:"success",message:"Message sent"}),(E=d.current)==null||E.focus()}catch(w){if(w instanceof Y6&&w.status===422)m({type:"warning",message:"Team is not running — message not delivered"});else{const _=w instanceof Error?w.message:"Failed to send message";m({type:"error",message:_})}}finally{u(!1)}}};return b.jsxs("div",{children:[b.jsxs("form",{onSubmit:g,className:"flex items-center gap-2",children:[b.jsx("input",{ref:d,type:"text",value:a,onChange:y=>i(y.target.value),disabled:r||o,placeholder:r?"Team is not running":"Send message to team...",className:"flex-1 bg-dark-base border border-dark-border rounded px-3 py-2 text-sm text-dark-text placeholder-dark-muted focus:outline-none focus:border-dark-accent transition-colors disabled:opacity-50"}),b.jsx("button",{type:"submit",disabled:r||o||!a.trim(),className:"px-4 py-2 text-sm font-medium rounded bg-dark-accent text-white hover:bg-dark-accent/80 transition-colors disabled:opacity-40 disabled:cursor-not-allowed shrink-0",children:o?"Sending...":"Send"})]}),c&&b.jsx("div",{className:`mt-2 text-xs px-2 py-1 rounded ${c.type==="success"?"text-[#3FB950] bg-[#3FB950]/10":c.type==="warning"?"text-[#D29922] bg-[#D29922]/10":"text-[#F85149] bg-[#F85149]/10"}`,children:c.message})]})}function pV(e,r){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var a,i,o,u,c=[],f=!0,d=!1;try{if(o=(n=n.call(e)).next,r===0){if(Object(n)!==n)return;f=!1}else for(;!(f=(a=o.call(n)).done)&&(c.push(a.value),c.length!==r);f=!0);}catch(h){d=!0,i=h}finally{try{if(!f&&n.return!=null&&(u=n.return(),Object(u)!==u))return}finally{if(d)throw i}}return c}}function mV(e,r,n){return r=SV(r),r in e?Object.defineProperty(e,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[r]=n,e}function vT(e,r){return yV(e)||pV(e,r)||tL(e,r)||_V()}function vV(e){return gV(e)||bV(e)||tL(e)||xV()}function gV(e){if(Array.isArray(e))return s2(e)}function yV(e){if(Array.isArray(e))return e}function bV(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function tL(e,r){if(e){if(typeof e=="string")return s2(e,r);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return s2(e,r)}}function s2(e,r){(r==null||r>e.length)&&(r=e.length);for(var n=0,a=new Array(r);n<r;n++)a[n]=e[n];return a}function xV(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
64
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function _V(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
65
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function wV(e,r){if(typeof e!="object"||e===null)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var a=n.call(e,r);if(typeof a!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return(r==="string"?String:Number)(e)}function SV(e){var r=wV(e,"string");return typeof r=="symbol"?r:String(r)}var EV=function(r,n){var a=new Set(n);return Object.assign.apply(Object,[{}].concat(vV(Object.entries(r).filter(function(i){var o=vT(i,1),u=o[0];return!a.has(u)}).map(function(i){var o=vT(i,2),u=o[0],c=o[1];return mV({},u,c)}))))};function c2(e,r){(r==null||r>e.length)&&(r=e.length);for(var n=0,a=Array(r);n<r;n++)a[n]=e[n];return a}function kV(e){if(Array.isArray(e))return e}function jV(e){if(Array.isArray(e))return c2(e)}function AV(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function OV(e,r){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var a,i,o,u,c=[],f=!0,d=!1;try{if(o=(n=n.call(e)).next,r!==0)for(;!(f=(a=o.call(n)).done)&&(c.push(a.value),c.length!==r);f=!0);}catch(h){d=!0,i=h}finally{try{if(!f&&n.return!=null&&(u=n.return(),Object(u)!==u))return}finally{if(d)throw i}}return c}}function CV(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
66
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function TV(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
67
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function NV(e,r){return kV(e)||OV(e,r)||rL(e,r)||CV()}function gT(e){return jV(e)||AV(e)||rL(e)||TV()}function rL(e,r){if(e){if(typeof e=="string")return c2(e,r);var n={}.toString.call(e).slice(8,-1);return n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set"?Array.from(e):n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?c2(e,r):void 0}}function MV(e){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=r.wrapperElementType,a=n===void 0?"div":n,i=r.nodeMapper,o=i===void 0?function(h){return h}:i,u=r.methodNames,c=u===void 0?[]:u,f=r.initPropNames,d=f===void 0?[]:f;return k.forwardRef(function(h,m){var g=k.useRef(),y=k.useMemo(function(){var w=Object.fromEntries(d.filter(function(_){return h.hasOwnProperty(_)}).map(function(_){return[_,h[_]]}));return e(w)},[]);yT(function(){y(o(g.current))},k.useLayoutEffect),yT(function(){return y._destructor instanceof Function?y._destructor:void 0});var x=k.useCallback(function(w){for(var _=arguments.length,A=new Array(_>1?_-1:0),O=1;O<_;O++)A[O-1]=arguments[O];return y[w]instanceof Function?y[w].apply(y,A):void 0},[y]),E=k.useRef({});return Object.keys(EV(h,[].concat(gT(c),gT(d)))).filter(function(w){return E.current[w]!==h[w]}).forEach(function(w){return x(w,h[w])}),E.current=h,k.useImperativeHandle(m,function(){return Object.fromEntries(c.map(function(w){return[w,function(){for(var _=arguments.length,A=new Array(_),O=0;O<_;O++)A[O]=arguments[O];return x.apply(void 0,[w].concat(A))}]}))},[x]),vp.createElement(a,{ref:g})})}function yT(e){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:k.useEffect,n=k.useRef(),a=k.useRef(!1),i=k.useRef(!1),o=k.useState(0),u=NV(o,2);u[0];var c=u[1];a.current&&(i.current=!0),r(function(){return a.current||(n.current=e(),a.current=!0),c(function(f){return f+1}),function(){i.current&&n.current&&n.current()}},[])}var f2="http://www.w3.org/1999/xhtml";const bT={svg:"http://www.w3.org/2000/svg",xhtml:f2,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function bp(e){var r=e+="",n=r.indexOf(":");return n>=0&&(r=e.slice(0,n))!=="xmlns"&&(e=e.slice(n+1)),bT.hasOwnProperty(r)?{space:bT[r],local:e}:e}function PV(e){return function(){var r=this.ownerDocument,n=this.namespaceURI;return n===f2&&r.documentElement.namespaceURI===f2?r.createElement(e):r.createElementNS(n,e)}}function RV(e){return function(){return this.ownerDocument.createElementNS(e.space,e.local)}}function nL(e){var r=bp(e);return(r.local?RV:PV)(r)}function DV(){}function zS(e){return e==null?DV:function(){return this.querySelector(e)}}function LV(e){typeof e!="function"&&(e=zS(e));for(var r=this._groups,n=r.length,a=new Array(n),i=0;i<n;++i)for(var o=r[i],u=o.length,c=a[i]=new Array(u),f,d,h=0;h<u;++h)(f=o[h])&&(d=e.call(f,f.__data__,h,o))&&("__data__"in f&&(d.__data__=f.__data__),c[h]=d);return new Gr(a,this._parents)}function IV(e){return e==null?[]:Array.isArray(e)?e:Array.from(e)}function zV(){return[]}function aL(e){return e==null?zV:function(){return this.querySelectorAll(e)}}function qV(e){return function(){return IV(e.apply(this,arguments))}}function BV(e){typeof e=="function"?e=qV(e):e=aL(e);for(var r=this._groups,n=r.length,a=[],i=[],o=0;o<n;++o)for(var u=r[o],c=u.length,f,d=0;d<c;++d)(f=u[d])&&(a.push(e.call(f,f.__data__,d,u)),i.push(f));return new Gr(a,i)}function iL(e){return function(){return this.matches(e)}}function oL(e){return function(r){return r.matches(e)}}var $V=Array.prototype.find;function UV(e){return function(){return $V.call(this.children,e)}}function FV(){return this.firstElementChild}function HV(e){return this.select(e==null?FV:UV(typeof e=="function"?e:oL(e)))}var GV=Array.prototype.filter;function KV(){return Array.from(this.children)}function VV(e){return function(){return GV.call(this.children,e)}}function YV(e){return this.selectAll(e==null?KV:VV(typeof e=="function"?e:oL(e)))}function XV(e){typeof e!="function"&&(e=iL(e));for(var r=this._groups,n=r.length,a=new Array(n),i=0;i<n;++i)for(var o=r[i],u=o.length,c=a[i]=[],f,d=0;d<u;++d)(f=o[d])&&e.call(f,f.__data__,d,o)&&c.push(f);return new Gr(a,this._parents)}function lL(e){return new Array(e.length)}function WV(){return new Gr(this._enter||this._groups.map(lL),this._parents)}function ih(e,r){this.ownerDocument=e.ownerDocument,this.namespaceURI=e.namespaceURI,this._next=null,this._parent=e,this.__data__=r}ih.prototype={constructor:ih,appendChild:function(e){return this._parent.insertBefore(e,this._next)},insertBefore:function(e,r){return this._parent.insertBefore(e,r)},querySelector:function(e){return this._parent.querySelector(e)},querySelectorAll:function(e){return this._parent.querySelectorAll(e)}};function ZV(e){return function(){return e}}function QV(e,r,n,a,i,o){for(var u=0,c,f=r.length,d=o.length;u<d;++u)(c=r[u])?(c.__data__=o[u],a[u]=c):n[u]=new ih(e,o[u]);for(;u<f;++u)(c=r[u])&&(i[u]=c)}function JV(e,r,n,a,i,o,u){var c,f,d=new Map,h=r.length,m=o.length,g=new Array(h),y;for(c=0;c<h;++c)(f=r[c])&&(g[c]=y=u.call(f,f.__data__,c,r)+"",d.has(y)?i[c]=f:d.set(y,f));for(c=0;c<m;++c)y=u.call(e,o[c],c,o)+"",(f=d.get(y))?(a[c]=f,f.__data__=o[c],d.delete(y)):n[c]=new ih(e,o[c]);for(c=0;c<h;++c)(f=r[c])&&d.get(g[c])===f&&(i[c]=f)}function eY(e){return e.__data__}function tY(e,r){if(!arguments.length)return Array.from(this,eY);var n=r?JV:QV,a=this._parents,i=this._groups;typeof e!="function"&&(e=ZV(e));for(var o=i.length,u=new Array(o),c=new Array(o),f=new Array(o),d=0;d<o;++d){var h=a[d],m=i[d],g=m.length,y=rY(e.call(h,h&&h.__data__,d,a)),x=y.length,E=c[d]=new Array(x),w=u[d]=new Array(x),_=f[d]=new Array(g);n(h,m,E,w,_,y,r);for(var A=0,O=0,T,C;A<x;++A)if(T=E[A]){for(A>=O&&(O=A+1);!(C=w[O])&&++O<x;);T._next=C||null}}return u=new Gr(u,a),u._enter=c,u._exit=f,u}function rY(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function nY(){return new Gr(this._exit||this._groups.map(lL),this._parents)}function aY(e,r,n){var a=this.enter(),i=this,o=this.exit();return typeof e=="function"?(a=e(a),a&&(a=a.selection())):a=a.append(e+""),r!=null&&(i=r(i),i&&(i=i.selection())),n==null?o.remove():n(o),a&&i?a.merge(i).order():i}function iY(e){for(var r=e.selection?e.selection():e,n=this._groups,a=r._groups,i=n.length,o=a.length,u=Math.min(i,o),c=new Array(i),f=0;f<u;++f)for(var d=n[f],h=a[f],m=d.length,g=c[f]=new Array(m),y,x=0;x<m;++x)(y=d[x]||h[x])&&(g[x]=y);for(;f<i;++f)c[f]=n[f];return new Gr(c,this._parents)}function oY(){for(var e=this._groups,r=-1,n=e.length;++r<n;)for(var a=e[r],i=a.length-1,o=a[i],u;--i>=0;)(u=a[i])&&(o&&u.compareDocumentPosition(o)^4&&o.parentNode.insertBefore(u,o),o=u);return this}function lY(e){e||(e=uY);function r(m,g){return m&&g?e(m.__data__,g.__data__):!m-!g}for(var n=this._groups,a=n.length,i=new Array(a),o=0;o<a;++o){for(var u=n[o],c=u.length,f=i[o]=new Array(c),d,h=0;h<c;++h)(d=u[h])&&(f[h]=d);f.sort(r)}return new Gr(i,this._parents).order()}function uY(e,r){return e<r?-1:e>r?1:e>=r?0:NaN}function sY(){var e=arguments[0];return arguments[0]=this,e.apply(null,arguments),this}function cY(){return Array.from(this)}function fY(){for(var e=this._groups,r=0,n=e.length;r<n;++r)for(var a=e[r],i=0,o=a.length;i<o;++i){var u=a[i];if(u)return u}return null}function dY(){let e=0;for(const r of this)++e;return e}function hY(){return!this.node()}function pY(e){for(var r=this._groups,n=0,a=r.length;n<a;++n)for(var i=r[n],o=0,u=i.length,c;o<u;++o)(c=i[o])&&e.call(c,c.__data__,o,i);return this}function mY(e){return function(){this.removeAttribute(e)}}function vY(e){return function(){this.removeAttributeNS(e.space,e.local)}}function gY(e,r){return function(){this.setAttribute(e,r)}}function yY(e,r){return function(){this.setAttributeNS(e.space,e.local,r)}}function bY(e,r){return function(){var n=r.apply(this,arguments);n==null?this.removeAttribute(e):this.setAttribute(e,n)}}function xY(e,r){return function(){var n=r.apply(this,arguments);n==null?this.removeAttributeNS(e.space,e.local):this.setAttributeNS(e.space,e.local,n)}}function _Y(e,r){var n=bp(e);if(arguments.length<2){var a=this.node();return n.local?a.getAttributeNS(n.space,n.local):a.getAttribute(n)}return this.each((r==null?n.local?vY:mY:typeof r=="function"?n.local?xY:bY:n.local?yY:gY)(n,r))}function uL(e){return e.ownerDocument&&e.ownerDocument.defaultView||e.document&&e||e.defaultView}function wY(e){return function(){this.style.removeProperty(e)}}function SY(e,r,n){return function(){this.style.setProperty(e,r,n)}}function EY(e,r,n){return function(){var a=r.apply(this,arguments);a==null?this.style.removeProperty(e):this.style.setProperty(e,a,n)}}function kY(e,r,n){return arguments.length>1?this.each((r==null?wY:typeof r=="function"?EY:SY)(e,r,n??"")):Wl(this.node(),e)}function Wl(e,r){return e.style.getPropertyValue(r)||uL(e).getComputedStyle(e,null).getPropertyValue(r)}function jY(e){return function(){delete this[e]}}function AY(e,r){return function(){this[e]=r}}function OY(e,r){return function(){var n=r.apply(this,arguments);n==null?delete this[e]:this[e]=n}}function CY(e,r){return arguments.length>1?this.each((r==null?jY:typeof r=="function"?OY:AY)(e,r)):this.node()[e]}function sL(e){return e.trim().split(/^|\s+/)}function qS(e){return e.classList||new cL(e)}function cL(e){this._node=e,this._names=sL(e.getAttribute("class")||"")}cL.prototype={add:function(e){var r=this._names.indexOf(e);r<0&&(this._names.push(e),this._node.setAttribute("class",this._names.join(" ")))},remove:function(e){var r=this._names.indexOf(e);r>=0&&(this._names.splice(r,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(e){return this._names.indexOf(e)>=0}};function fL(e,r){for(var n=qS(e),a=-1,i=r.length;++a<i;)n.add(r[a])}function dL(e,r){for(var n=qS(e),a=-1,i=r.length;++a<i;)n.remove(r[a])}function TY(e){return function(){fL(this,e)}}function NY(e){return function(){dL(this,e)}}function MY(e,r){return function(){(r.apply(this,arguments)?fL:dL)(this,e)}}function PY(e,r){var n=sL(e+"");if(arguments.length<2){for(var a=qS(this.node()),i=-1,o=n.length;++i<o;)if(!a.contains(n[i]))return!1;return!0}return this.each((typeof r=="function"?MY:r?TY:NY)(n,r))}function RY(){this.textContent=""}function DY(e){return function(){this.textContent=e}}function LY(e){return function(){var r=e.apply(this,arguments);this.textContent=r??""}}function IY(e){return arguments.length?this.each(e==null?RY:(typeof e=="function"?LY:DY)(e)):this.node().textContent}function zY(){this.innerHTML=""}function qY(e){return function(){this.innerHTML=e}}function BY(e){return function(){var r=e.apply(this,arguments);this.innerHTML=r??""}}function $Y(e){return arguments.length?this.each(e==null?zY:(typeof e=="function"?BY:qY)(e)):this.node().innerHTML}function UY(){this.nextSibling&&this.parentNode.appendChild(this)}function FY(){return this.each(UY)}function HY(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function GY(){return this.each(HY)}function KY(e){var r=typeof e=="function"?e:nL(e);return this.select(function(){return this.appendChild(r.apply(this,arguments))})}function VY(){return null}function YY(e,r){var n=typeof e=="function"?e:nL(e),a=r==null?VY:typeof r=="function"?r:zS(r);return this.select(function(){return this.insertBefore(n.apply(this,arguments),a.apply(this,arguments)||null)})}function XY(){var e=this.parentNode;e&&e.removeChild(this)}function WY(){return this.each(XY)}function ZY(){var e=this.cloneNode(!1),r=this.parentNode;return r?r.insertBefore(e,this.nextSibling):e}function QY(){var e=this.cloneNode(!0),r=this.parentNode;return r?r.insertBefore(e,this.nextSibling):e}function JY(e){return this.select(e?QY:ZY)}function eX(e){return arguments.length?this.property("__data__",e):this.node().__data__}function tX(e){return function(r){e.call(this,r,this.__data__)}}function rX(e){return e.trim().split(/^|\s+/).map(function(r){var n="",a=r.indexOf(".");return a>=0&&(n=r.slice(a+1),r=r.slice(0,a)),{type:r,name:n}})}function nX(e){return function(){var r=this.__on;if(r){for(var n=0,a=-1,i=r.length,o;n<i;++n)o=r[n],(!e.type||o.type===e.type)&&o.name===e.name?this.removeEventListener(o.type,o.listener,o.options):r[++a]=o;++a?r.length=a:delete this.__on}}}function aX(e,r,n){return function(){var a=this.__on,i,o=tX(r);if(a){for(var u=0,c=a.length;u<c;++u)if((i=a[u]).type===e.type&&i.name===e.name){this.removeEventListener(i.type,i.listener,i.options),this.addEventListener(i.type,i.listener=o,i.options=n),i.value=r;return}}this.addEventListener(e.type,o,n),i={type:e.type,name:e.name,value:r,listener:o,options:n},a?a.push(i):this.__on=[i]}}function iX(e,r,n){var a=rX(e+""),i,o=a.length,u;if(arguments.length<2){var c=this.node().__on;if(c){for(var f=0,d=c.length,h;f<d;++f)for(i=0,h=c[f];i<o;++i)if((u=a[i]).type===h.type&&u.name===h.name)return h.value}return}for(c=r?aX:nX,i=0;i<o;++i)this.each(c(a[i],r,n));return this}function hL(e,r,n){var a=uL(e),i=a.CustomEvent;typeof i=="function"?i=new i(r,n):(i=a.document.createEvent("Event"),n?(i.initEvent(r,n.bubbles,n.cancelable),i.detail=n.detail):i.initEvent(r,!1,!1)),e.dispatchEvent(i)}function oX(e,r){return function(){return hL(this,e,r)}}function lX(e,r){return function(){return hL(this,e,r.apply(this,arguments))}}function uX(e,r){return this.each((typeof r=="function"?lX:oX)(e,r))}function*sX(){for(var e=this._groups,r=0,n=e.length;r<n;++r)for(var a=e[r],i=0,o=a.length,u;i<o;++i)(u=a[i])&&(yield u)}var pL=[null];function Gr(e,r){this._groups=e,this._parents=r}function kc(){return new Gr([[document.documentElement]],pL)}function cX(){return this}Gr.prototype=kc.prototype={constructor:Gr,select:LV,selectAll:BV,selectChild:HV,selectChildren:YV,filter:XV,data:tY,enter:WV,exit:nY,join:aY,merge:iY,selection:cX,order:oY,sort:lY,call:sY,nodes:cY,node:fY,size:dY,empty:hY,each:pY,attr:_Y,style:kY,property:CY,classed:PY,text:IY,html:$Y,raise:FY,lower:GY,append:KY,insert:YY,remove:WY,clone:JY,datum:eX,on:iX,dispatch:uX,[Symbol.iterator]:sX};function dn(e){return typeof e=="string"?new Gr([[document.querySelector(e)]],[document.documentElement]):new Gr([[e]],pL)}function fX(e){let r;for(;r=e.sourceEvent;)e=r;return e}function Yn(e,r){if(e=fX(e),r===void 0&&(r=e.currentTarget),r){var n=r.ownerSVGElement||r;if(n.createSVGPoint){var a=n.createSVGPoint();return a.x=e.clientX,a.y=e.clientY,a=a.matrixTransform(r.getScreenCTM().inverse()),[a.x,a.y]}if(r.getBoundingClientRect){var i=r.getBoundingClientRect();return[e.clientX-i.left-r.clientLeft,e.clientY-i.top-r.clientTop]}}return[e.pageX,e.pageY]}var dX={value:()=>{}};function jc(){for(var e=0,r=arguments.length,n={},a;e<r;++e){if(!(a=arguments[e]+"")||a in n||/[\s.]/.test(a))throw new Error("illegal type: "+a);n[a]=[]}return new Vd(n)}function Vd(e){this._=e}function hX(e,r){return e.trim().split(/^|\s+/).map(function(n){var a="",i=n.indexOf(".");if(i>=0&&(a=n.slice(i+1),n=n.slice(0,i)),n&&!r.hasOwnProperty(n))throw new Error("unknown type: "+n);return{type:n,name:a}})}Vd.prototype=jc.prototype={constructor:Vd,on:function(e,r){var n=this._,a=hX(e+"",n),i,o=-1,u=a.length;if(arguments.length<2){for(;++o<u;)if((i=(e=a[o]).type)&&(i=pX(n[i],e.name)))return i;return}if(r!=null&&typeof r!="function")throw new Error("invalid callback: "+r);for(;++o<u;)if(i=(e=a[o]).type)n[i]=xT(n[i],e.name,r);else if(r==null)for(i in n)n[i]=xT(n[i],e.name,null);return this},copy:function(){var e={},r=this._;for(var n in r)e[n]=r[n].slice();return new Vd(e)},call:function(e,r){if((i=arguments.length-2)>0)for(var n=new Array(i),a=0,i,o;a<i;++a)n[a]=arguments[a+2];if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(o=this._[e],a=0,i=o.length;a<i;++a)o[a].value.apply(r,n)},apply:function(e,r,n){if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(var a=this._[e],i=0,o=a.length;i<o;++i)a[i].value.apply(r,n)}};function pX(e,r){for(var n=0,a=e.length,i;n<a;++n)if((i=e[n]).name===r)return i.value}function xT(e,r,n){for(var a=0,i=e.length;a<i;++a)if(e[a].name===r){e[a]=dX,e=e.slice(0,a).concat(e.slice(a+1));break}return n!=null&&e.push({name:r,value:n}),e}const mX={passive:!1},tc={capture:!0,passive:!1};function Qg(e){e.stopImmediatePropagation()}function Kl(e){e.preventDefault(),e.stopImmediatePropagation()}function mL(e){var r=e.document.documentElement,n=dn(e).on("dragstart.drag",Kl,tc);"onselectstart"in r?n.on("selectstart.drag",Kl,tc):(r.__noselect=r.style.MozUserSelect,r.style.MozUserSelect="none")}function vL(e,r){var n=e.document.documentElement,a=dn(e).on("dragstart.drag",null);r&&(a.on("click.drag",Kl,tc),setTimeout(function(){a.on("click.drag",null)},0)),"onselectstart"in n?a.on("selectstart.drag",null):(n.style.MozUserSelect=n.__noselect,delete n.__noselect)}const wd=e=>()=>e;function d2(e,{sourceEvent:r,subject:n,target:a,identifier:i,active:o,x:u,y:c,dx:f,dy:d,dispatch:h}){Object.defineProperties(this,{type:{value:e,enumerable:!0,configurable:!0},sourceEvent:{value:r,enumerable:!0,configurable:!0},subject:{value:n,enumerable:!0,configurable:!0},target:{value:a,enumerable:!0,configurable:!0},identifier:{value:i,enumerable:!0,configurable:!0},active:{value:o,enumerable:!0,configurable:!0},x:{value:u,enumerable:!0,configurable:!0},y:{value:c,enumerable:!0,configurable:!0},dx:{value:f,enumerable:!0,configurable:!0},dy:{value:d,enumerable:!0,configurable:!0},_:{value:h}})}d2.prototype.on=function(){var e=this._.on.apply(this._,arguments);return e===this._?this:e};function vX(e){return!e.ctrlKey&&!e.button}function gX(){return this.parentNode}function yX(e,r){return r??{x:e.x,y:e.y}}function bX(){return navigator.maxTouchPoints||"ontouchstart"in this}function xX(){var e=vX,r=gX,n=yX,a=bX,i={},o=jc("start","drag","end"),u=0,c,f,d,h,m=0;function g(T){T.on("mousedown.drag",y).filter(a).on("touchstart.drag",w).on("touchmove.drag",_,mX).on("touchend.drag touchcancel.drag",A).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function y(T,C){if(!(h||!e.call(this,T,C))){var N=O(this,r.call(this,T,C),T,C,"mouse");N&&(dn(T.view).on("mousemove.drag",x,tc).on("mouseup.drag",E,tc),mL(T.view),Qg(T),d=!1,c=T.clientX,f=T.clientY,N("start",T))}}function x(T){if(Kl(T),!d){var C=T.clientX-c,N=T.clientY-f;d=C*C+N*N>m}i.mouse("drag",T)}function E(T){dn(T.view).on("mousemove.drag mouseup.drag",null),vL(T.view,d),Kl(T),i.mouse("end",T)}function w(T,C){if(e.call(this,T,C)){var N=T.changedTouches,M=r.call(this,T,C),R=N.length,L,D;for(L=0;L<R;++L)(D=O(this,M,T,C,N[L].identifier,N[L]))&&(Qg(T),D("start",T,N[L]))}}function _(T){var C=T.changedTouches,N=C.length,M,R;for(M=0;M<N;++M)(R=i[C[M].identifier])&&(Kl(T),R("drag",T,C[M]))}function A(T){var C=T.changedTouches,N=C.length,M,R;for(h&&clearTimeout(h),h=setTimeout(function(){h=null},500),M=0;M<N;++M)(R=i[C[M].identifier])&&(Qg(T),R("end",T,C[M]))}function O(T,C,N,M,R,L){var D=o.copy(),z=Yn(L||N,C),q,G,U;if((U=n.call(T,new d2("beforestart",{sourceEvent:N,target:g,identifier:R,active:u,x:z[0],y:z[1],dx:0,dy:0,dispatch:D}),M))!=null)return q=U.x-z[0]||0,G=U.y-z[1]||0,function Y($,J,re){var oe=z,fe;switch($){case"start":i[R]=Y,fe=u++;break;case"end":delete i[R],--u;case"drag":z=Yn(re||J,C),fe=u;break}D.call($,T,new d2($,{sourceEvent:J,subject:U,target:g,identifier:R,active:fe,x:z[0]+q,y:z[1]+G,dx:z[0]-oe[0],dy:z[1]-oe[1],dispatch:D}),M)}}return g.filter=function(T){return arguments.length?(e=typeof T=="function"?T:wd(!!T),g):e},g.container=function(T){return arguments.length?(r=typeof T=="function"?T:wd(T),g):r},g.subject=function(T){return arguments.length?(n=typeof T=="function"?T:wd(T),g):n},g.touchable=function(T){return arguments.length?(a=typeof T=="function"?T:wd(!!T),g):a},g.on=function(){var T=o.on.apply(o,arguments);return T===o?g:T},g.clickDistance=function(T){return arguments.length?(m=(T=+T)*T,g):Math.sqrt(m)},g}function BS(e,r,n){e.prototype=r.prototype=n,n.constructor=e}function gL(e,r){var n=Object.create(e.prototype);for(var a in r)n[a]=r[a];return n}function Ac(){}var rc=.7,oh=1/rc,Vl="\\s*([+-]?\\d+)\\s*",nc="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",ta="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",_X=/^#([0-9a-f]{3,8})$/,wX=new RegExp(`^rgb\\(${Vl},${Vl},${Vl}\\)$`),SX=new RegExp(`^rgb\\(${ta},${ta},${ta}\\)$`),EX=new RegExp(`^rgba\\(${Vl},${Vl},${Vl},${nc}\\)$`),kX=new RegExp(`^rgba\\(${ta},${ta},${ta},${nc}\\)$`),jX=new RegExp(`^hsl\\(${nc},${ta},${ta}\\)$`),AX=new RegExp(`^hsla\\(${nc},${ta},${ta},${nc}\\)$`),_T={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};BS(Ac,Mo,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:wT,formatHex:wT,formatHex8:OX,formatHsl:CX,formatRgb:ST,toString:ST});function wT(){return this.rgb().formatHex()}function OX(){return this.rgb().formatHex8()}function CX(){return yL(this).formatHsl()}function ST(){return this.rgb().formatRgb()}function Mo(e){var r,n;return e=(e+"").trim().toLowerCase(),(r=_X.exec(e))?(n=r[1].length,r=parseInt(r[1],16),n===6?ET(r):n===3?new Cr(r>>8&15|r>>4&240,r>>4&15|r&240,(r&15)<<4|r&15,1):n===8?Sd(r>>24&255,r>>16&255,r>>8&255,(r&255)/255):n===4?Sd(r>>12&15|r>>8&240,r>>8&15|r>>4&240,r>>4&15|r&240,((r&15)<<4|r&15)/255):null):(r=wX.exec(e))?new Cr(r[1],r[2],r[3],1):(r=SX.exec(e))?new Cr(r[1]*255/100,r[2]*255/100,r[3]*255/100,1):(r=EX.exec(e))?Sd(r[1],r[2],r[3],r[4]):(r=kX.exec(e))?Sd(r[1]*255/100,r[2]*255/100,r[3]*255/100,r[4]):(r=jX.exec(e))?AT(r[1],r[2]/100,r[3]/100,1):(r=AX.exec(e))?AT(r[1],r[2]/100,r[3]/100,r[4]):_T.hasOwnProperty(e)?ET(_T[e]):e==="transparent"?new Cr(NaN,NaN,NaN,0):null}function ET(e){return new Cr(e>>16&255,e>>8&255,e&255,1)}function Sd(e,r,n,a){return a<=0&&(e=r=n=NaN),new Cr(e,r,n,a)}function TX(e){return e instanceof Ac||(e=Mo(e)),e?(e=e.rgb(),new Cr(e.r,e.g,e.b,e.opacity)):new Cr}function h2(e,r,n,a){return arguments.length===1?TX(e):new Cr(e,r,n,a??1)}function Cr(e,r,n,a){this.r=+e,this.g=+r,this.b=+n,this.opacity=+a}BS(Cr,h2,gL(Ac,{brighter(e){return e=e==null?oh:Math.pow(oh,e),new Cr(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?rc:Math.pow(rc,e),new Cr(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new Cr(Oo(this.r),Oo(this.g),Oo(this.b),lh(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:kT,formatHex:kT,formatHex8:NX,formatRgb:jT,toString:jT}));function kT(){return`#${Eo(this.r)}${Eo(this.g)}${Eo(this.b)}`}function NX(){return`#${Eo(this.r)}${Eo(this.g)}${Eo(this.b)}${Eo((isNaN(this.opacity)?1:this.opacity)*255)}`}function jT(){const e=lh(this.opacity);return`${e===1?"rgb(":"rgba("}${Oo(this.r)}, ${Oo(this.g)}, ${Oo(this.b)}${e===1?")":`, ${e})`}`}function lh(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function Oo(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function Eo(e){return e=Oo(e),(e<16?"0":"")+e.toString(16)}function AT(e,r,n,a){return a<=0?e=r=n=NaN:n<=0||n>=1?e=r=NaN:r<=0&&(e=NaN),new Cn(e,r,n,a)}function yL(e){if(e instanceof Cn)return new Cn(e.h,e.s,e.l,e.opacity);if(e instanceof Ac||(e=Mo(e)),!e)return new Cn;if(e instanceof Cn)return e;e=e.rgb();var r=e.r/255,n=e.g/255,a=e.b/255,i=Math.min(r,n,a),o=Math.max(r,n,a),u=NaN,c=o-i,f=(o+i)/2;return c?(r===o?u=(n-a)/c+(n<a)*6:n===o?u=(a-r)/c+2:u=(r-n)/c+4,c/=f<.5?o+i:2-o-i,u*=60):c=f>0&&f<1?0:u,new Cn(u,c,f,e.opacity)}function MX(e,r,n,a){return arguments.length===1?yL(e):new Cn(e,r,n,a??1)}function Cn(e,r,n,a){this.h=+e,this.s=+r,this.l=+n,this.opacity=+a}BS(Cn,MX,gL(Ac,{brighter(e){return e=e==null?oh:Math.pow(oh,e),new Cn(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?rc:Math.pow(rc,e),new Cn(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+(this.h<0)*360,r=isNaN(e)||isNaN(this.s)?0:this.s,n=this.l,a=n+(n<.5?n:1-n)*r,i=2*n-a;return new Cr(Jg(e>=240?e-240:e+120,i,a),Jg(e,i,a),Jg(e<120?e+240:e-120,i,a),this.opacity)},clamp(){return new Cn(OT(this.h),Ed(this.s),Ed(this.l),lh(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const e=lh(this.opacity);return`${e===1?"hsl(":"hsla("}${OT(this.h)}, ${Ed(this.s)*100}%, ${Ed(this.l)*100}%${e===1?")":`, ${e})`}`}}));function OT(e){return e=(e||0)%360,e<0?e+360:e}function Ed(e){return Math.max(0,Math.min(1,e||0))}function Jg(e,r,n){return(e<60?r+(n-r)*e/60:e<180?n:e<240?r+(n-r)*(240-e)/60:r)*255}const $S=e=>()=>e;function PX(e,r){return function(n){return e+n*r}}function RX(e,r,n){return e=Math.pow(e,n),r=Math.pow(r,n)-e,n=1/n,function(a){return Math.pow(e+a*r,n)}}function DX(e){return(e=+e)==1?bL:function(r,n){return n-r?RX(r,n,e):$S(isNaN(r)?n:r)}}function bL(e,r){var n=r-e;return n?PX(e,n):$S(isNaN(e)?r:e)}const uh=(function e(r){var n=DX(r);function a(i,o){var u=n((i=h2(i)).r,(o=h2(o)).r),c=n(i.g,o.g),f=n(i.b,o.b),d=bL(i.opacity,o.opacity);return function(h){return i.r=u(h),i.g=c(h),i.b=f(h),i.opacity=d(h),i+""}}return a.gamma=e,a})(1);function LX(e,r){r||(r=[]);var n=e?Math.min(r.length,e.length):0,a=r.slice(),i;return function(o){for(i=0;i<n;++i)a[i]=e[i]*(1-o)+r[i]*o;return a}}function IX(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}function zX(e,r){var n=r?r.length:0,a=e?Math.min(n,e.length):0,i=new Array(a),o=new Array(n),u;for(u=0;u<a;++u)i[u]=uu(e[u],r[u]);for(;u<n;++u)o[u]=r[u];return function(c){for(u=0;u<a;++u)o[u]=i[u](c);return o}}function qX(e,r){var n=new Date;return e=+e,r=+r,function(a){return n.setTime(e*(1-a)+r*a),n}}function On(e,r){return e=+e,r=+r,function(n){return e*(1-n)+r*n}}function BX(e,r){var n={},a={},i;(e===null||typeof e!="object")&&(e={}),(r===null||typeof r!="object")&&(r={});for(i in r)i in e?n[i]=uu(e[i],r[i]):a[i]=r[i];return function(o){for(i in n)a[i]=n[i](o);return a}}var p2=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,ey=new RegExp(p2.source,"g");function $X(e){return function(){return e}}function UX(e){return function(r){return e(r)+""}}function xL(e,r){var n=p2.lastIndex=ey.lastIndex=0,a,i,o,u=-1,c=[],f=[];for(e=e+"",r=r+"";(a=p2.exec(e))&&(i=ey.exec(r));)(o=i.index)>n&&(o=r.slice(n,o),c[u]?c[u]+=o:c[++u]=o),(a=a[0])===(i=i[0])?c[u]?c[u]+=i:c[++u]=i:(c[++u]=null,f.push({i:u,x:On(a,i)})),n=ey.lastIndex;return n<r.length&&(o=r.slice(n),c[u]?c[u]+=o:c[++u]=o),c.length<2?f[0]?UX(f[0].x):$X(r):(r=f.length,function(d){for(var h=0,m;h<r;++h)c[(m=f[h]).i]=m.x(d);return c.join("")})}function uu(e,r){var n=typeof r,a;return r==null||n==="boolean"?$S(r):(n==="number"?On:n==="string"?(a=Mo(r))?(r=a,uh):xL:r instanceof Mo?uh:r instanceof Date?qX:IX(r)?LX:Array.isArray(r)?zX:typeof r.valueOf!="function"&&typeof r.toString!="function"||isNaN(r)?BX:On)(e,r)}function US(e,r){return e=+e,r=+r,function(n){return Math.round(e*(1-n)+r*n)}}var CT=180/Math.PI,m2={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function _L(e,r,n,a,i,o){var u,c,f;return(u=Math.sqrt(e*e+r*r))&&(e/=u,r/=u),(f=e*n+r*a)&&(n-=e*f,a-=r*f),(c=Math.sqrt(n*n+a*a))&&(n/=c,a/=c,f/=c),e*a<r*n&&(e=-e,r=-r,f=-f,u=-u),{translateX:i,translateY:o,rotate:Math.atan2(r,e)*CT,skewX:Math.atan(f)*CT,scaleX:u,scaleY:c}}var kd;function FX(e){const r=new(typeof DOMMatrix=="function"?DOMMatrix:WebKitCSSMatrix)(e+"");return r.isIdentity?m2:_L(r.a,r.b,r.c,r.d,r.e,r.f)}function HX(e){return e==null||(kd||(kd=document.createElementNS("http://www.w3.org/2000/svg","g")),kd.setAttribute("transform",e),!(e=kd.transform.baseVal.consolidate()))?m2:(e=e.matrix,_L(e.a,e.b,e.c,e.d,e.e,e.f))}function wL(e,r,n,a){function i(d){return d.length?d.pop()+" ":""}function o(d,h,m,g,y,x){if(d!==m||h!==g){var E=y.push("translate(",null,r,null,n);x.push({i:E-4,x:On(d,m)},{i:E-2,x:On(h,g)})}else(m||g)&&y.push("translate("+m+r+g+n)}function u(d,h,m,g){d!==h?(d-h>180?h+=360:h-d>180&&(d+=360),g.push({i:m.push(i(m)+"rotate(",null,a)-2,x:On(d,h)})):h&&m.push(i(m)+"rotate("+h+a)}function c(d,h,m,g){d!==h?g.push({i:m.push(i(m)+"skewX(",null,a)-2,x:On(d,h)}):h&&m.push(i(m)+"skewX("+h+a)}function f(d,h,m,g,y,x){if(d!==m||h!==g){var E=y.push(i(y)+"scale(",null,",",null,")");x.push({i:E-4,x:On(d,m)},{i:E-2,x:On(h,g)})}else(m!==1||g!==1)&&y.push(i(y)+"scale("+m+","+g+")")}return function(d,h){var m=[],g=[];return d=e(d),h=e(h),o(d.translateX,d.translateY,h.translateX,h.translateY,m,g),u(d.rotate,h.rotate,m,g),c(d.skewX,h.skewX,m,g),f(d.scaleX,d.scaleY,h.scaleX,h.scaleY,m,g),d=h=null,function(y){for(var x=-1,E=g.length,w;++x<E;)m[(w=g[x]).i]=w.x(y);return m.join("")}}}var GX=wL(FX,"px, ","px)","deg)"),KX=wL(HX,", ",")",")"),VX=1e-12;function TT(e){return((e=Math.exp(e))+1/e)/2}function YX(e){return((e=Math.exp(e))-1/e)/2}function XX(e){return((e=Math.exp(2*e))-1)/(e+1)}const WX=(function e(r,n,a){function i(o,u){var c=o[0],f=o[1],d=o[2],h=u[0],m=u[1],g=u[2],y=h-c,x=m-f,E=y*y+x*x,w,_;if(E<VX)_=Math.log(g/d)/r,w=function(M){return[c+M*y,f+M*x,d*Math.exp(r*M*_)]};else{var A=Math.sqrt(E),O=(g*g-d*d+a*E)/(2*d*n*A),T=(g*g-d*d-a*E)/(2*g*n*A),C=Math.log(Math.sqrt(O*O+1)-O),N=Math.log(Math.sqrt(T*T+1)-T);_=(N-C)/r,w=function(M){var R=M*_,L=TT(C),D=d/(n*A)*(L*XX(r*R+C)-YX(C));return[c+D*y,f+D*x,d*L/TT(r*R+C)]}}return w.duration=_*1e3*r/Math.SQRT2,w}return i.rho=function(o){var u=Math.max(.001,+o),c=u*u,f=c*c;return e(u,c,f)},i})(Math.SQRT2,2,4);function ZX(e,r){r===void 0&&(r=e,e=uu);for(var n=0,a=r.length-1,i=r[0],o=new Array(a<0?0:a);n<a;)o[n]=e(i,i=r[++n]);return function(u){var c=Math.max(0,Math.min(a-1,Math.floor(u*=a)));return o[c](u-c)}}var Zl=0,Bs=0,xs=0,SL=1e3,sh,$s,ch=0,Po=0,xp=0,ac=typeof performance=="object"&&performance.now?performance:Date,EL=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(e){setTimeout(e,17)};function FS(){return Po||(EL(QX),Po=ac.now()+xp)}function QX(){Po=0}function fh(){this._call=this._time=this._next=null}fh.prototype=HS.prototype={constructor:fh,restart:function(e,r,n){if(typeof e!="function")throw new TypeError("callback is not a function");n=(n==null?FS():+n)+(r==null?0:+r),!this._next&&$s!==this&&($s?$s._next=this:sh=this,$s=this),this._call=e,this._time=n,v2()},stop:function(){this._call&&(this._call=null,this._time=1/0,v2())}};function HS(e,r,n){var a=new fh;return a.restart(e,r,n),a}function JX(){FS(),++Zl;for(var e=sh,r;e;)(r=Po-e._time)>=0&&e._call.call(void 0,r),e=e._next;--Zl}function NT(){Po=(ch=ac.now())+xp,Zl=Bs=0;try{JX()}finally{Zl=0,tW(),Po=0}}function eW(){var e=ac.now(),r=e-ch;r>SL&&(xp-=r,ch=e)}function tW(){for(var e,r=sh,n,a=1/0;r;)r._call?(a>r._time&&(a=r._time),e=r,r=r._next):(n=r._next,r._next=null,r=e?e._next=n:sh=n);$s=e,v2(a)}function v2(e){if(!Zl){Bs&&(Bs=clearTimeout(Bs));var r=e-Po;r>24?(e<1/0&&(Bs=setTimeout(NT,e-ac.now()-xp)),xs&&(xs=clearInterval(xs))):(xs||(ch=ac.now(),xs=setInterval(eW,SL)),Zl=1,EL(NT))}}function MT(e,r,n){var a=new fh;return r=r==null?0:+r,a.restart(i=>{a.stop(),e(i+r)},r,n),a}var rW=jc("start","end","cancel","interrupt"),nW=[],kL=0,PT=1,g2=2,Yd=3,RT=4,y2=5,Xd=6;function _p(e,r,n,a,i,o){var u=e.__transition;if(!u)e.__transition={};else if(n in u)return;aW(e,n,{name:r,index:a,group:i,on:rW,tween:nW,time:o.time,delay:o.delay,duration:o.duration,ease:o.ease,timer:null,state:kL})}function GS(e,r){var n=Ln(e,r);if(n.state>kL)throw new Error("too late; already scheduled");return n}function sa(e,r){var n=Ln(e,r);if(n.state>Yd)throw new Error("too late; already running");return n}function Ln(e,r){var n=e.__transition;if(!n||!(n=n[r]))throw new Error("transition not found");return n}function aW(e,r,n){var a=e.__transition,i;a[r]=n,n.timer=HS(o,0,n.time);function o(d){n.state=PT,n.timer.restart(u,n.delay,n.time),n.delay<=d&&u(d-n.delay)}function u(d){var h,m,g,y;if(n.state!==PT)return f();for(h in a)if(y=a[h],y.name===n.name){if(y.state===Yd)return MT(u);y.state===RT?(y.state=Xd,y.timer.stop(),y.on.call("interrupt",e,e.__data__,y.index,y.group),delete a[h]):+h<r&&(y.state=Xd,y.timer.stop(),y.on.call("cancel",e,e.__data__,y.index,y.group),delete a[h])}if(MT(function(){n.state===Yd&&(n.state=RT,n.timer.restart(c,n.delay,n.time),c(d))}),n.state=g2,n.on.call("start",e,e.__data__,n.index,n.group),n.state===g2){for(n.state=Yd,i=new Array(g=n.tween.length),h=0,m=-1;h<g;++h)(y=n.tween[h].value.call(e,e.__data__,n.index,n.group))&&(i[++m]=y);i.length=m+1}}function c(d){for(var h=d<n.duration?n.ease.call(null,d/n.duration):(n.timer.restart(f),n.state=y2,1),m=-1,g=i.length;++m<g;)i[m].call(e,h);n.state===y2&&(n.on.call("end",e,e.__data__,n.index,n.group),f())}function f(){n.state=Xd,n.timer.stop(),delete a[r];for(var d in a)return;delete e.__transition}}function Wd(e,r){var n=e.__transition,a,i,o=!0,u;if(n){r=r==null?null:r+"";for(u in n){if((a=n[u]).name!==r){o=!1;continue}i=a.state>g2&&a.state<y2,a.state=Xd,a.timer.stop(),a.on.call(i?"interrupt":"cancel",e,e.__data__,a.index,a.group),delete n[u]}o&&delete e.__transition}}function iW(e){return this.each(function(){Wd(this,e)})}function oW(e,r){var n,a;return function(){var i=sa(this,e),o=i.tween;if(o!==n){a=n=o;for(var u=0,c=a.length;u<c;++u)if(a[u].name===r){a=a.slice(),a.splice(u,1);break}}i.tween=a}}function lW(e,r,n){var a,i;if(typeof n!="function")throw new Error;return function(){var o=sa(this,e),u=o.tween;if(u!==a){i=(a=u).slice();for(var c={name:r,value:n},f=0,d=i.length;f<d;++f)if(i[f].name===r){i[f]=c;break}f===d&&i.push(c)}o.tween=i}}function uW(e,r){var n=this._id;if(e+="",arguments.length<2){for(var a=Ln(this.node(),n).tween,i=0,o=a.length,u;i<o;++i)if((u=a[i]).name===e)return u.value;return null}return this.each((r==null?oW:lW)(n,e,r))}function KS(e,r,n){var a=e._id;return e.each(function(){var i=sa(this,a);(i.value||(i.value={}))[r]=n.apply(this,arguments)}),function(i){return Ln(i,a).value[r]}}function jL(e,r){var n;return(typeof r=="number"?On:r instanceof Mo?uh:(n=Mo(r))?(r=n,uh):xL)(e,r)}function sW(e){return function(){this.removeAttribute(e)}}function cW(e){return function(){this.removeAttributeNS(e.space,e.local)}}function fW(e,r,n){var a,i=n+"",o;return function(){var u=this.getAttribute(e);return u===i?null:u===a?o:o=r(a=u,n)}}function dW(e,r,n){var a,i=n+"",o;return function(){var u=this.getAttributeNS(e.space,e.local);return u===i?null:u===a?o:o=r(a=u,n)}}function hW(e,r,n){var a,i,o;return function(){var u,c=n(this),f;return c==null?void this.removeAttribute(e):(u=this.getAttribute(e),f=c+"",u===f?null:u===a&&f===i?o:(i=f,o=r(a=u,c)))}}function pW(e,r,n){var a,i,o;return function(){var u,c=n(this),f;return c==null?void this.removeAttributeNS(e.space,e.local):(u=this.getAttributeNS(e.space,e.local),f=c+"",u===f?null:u===a&&f===i?o:(i=f,o=r(a=u,c)))}}function mW(e,r){var n=bp(e),a=n==="transform"?KX:jL;return this.attrTween(e,typeof r=="function"?(n.local?pW:hW)(n,a,KS(this,"attr."+e,r)):r==null?(n.local?cW:sW)(n):(n.local?dW:fW)(n,a,r))}function vW(e,r){return function(n){this.setAttribute(e,r.call(this,n))}}function gW(e,r){return function(n){this.setAttributeNS(e.space,e.local,r.call(this,n))}}function yW(e,r){var n,a;function i(){var o=r.apply(this,arguments);return o!==a&&(n=(a=o)&&gW(e,o)),n}return i._value=r,i}function bW(e,r){var n,a;function i(){var o=r.apply(this,arguments);return o!==a&&(n=(a=o)&&vW(e,o)),n}return i._value=r,i}function xW(e,r){var n="attr."+e;if(arguments.length<2)return(n=this.tween(n))&&n._value;if(r==null)return this.tween(n,null);if(typeof r!="function")throw new Error;var a=bp(e);return this.tween(n,(a.local?yW:bW)(a,r))}function _W(e,r){return function(){GS(this,e).delay=+r.apply(this,arguments)}}function wW(e,r){return r=+r,function(){GS(this,e).delay=r}}function SW(e){var r=this._id;return arguments.length?this.each((typeof e=="function"?_W:wW)(r,e)):Ln(this.node(),r).delay}function EW(e,r){return function(){sa(this,e).duration=+r.apply(this,arguments)}}function kW(e,r){return r=+r,function(){sa(this,e).duration=r}}function jW(e){var r=this._id;return arguments.length?this.each((typeof e=="function"?EW:kW)(r,e)):Ln(this.node(),r).duration}function AW(e,r){if(typeof r!="function")throw new Error;return function(){sa(this,e).ease=r}}function OW(e){var r=this._id;return arguments.length?this.each(AW(r,e)):Ln(this.node(),r).ease}function CW(e,r){return function(){var n=r.apply(this,arguments);if(typeof n!="function")throw new Error;sa(this,e).ease=n}}function TW(e){if(typeof e!="function")throw new Error;return this.each(CW(this._id,e))}function NW(e){typeof e!="function"&&(e=iL(e));for(var r=this._groups,n=r.length,a=new Array(n),i=0;i<n;++i)for(var o=r[i],u=o.length,c=a[i]=[],f,d=0;d<u;++d)(f=o[d])&&e.call(f,f.__data__,d,o)&&c.push(f);return new Ka(a,this._parents,this._name,this._id)}function MW(e){if(e._id!==this._id)throw new Error;for(var r=this._groups,n=e._groups,a=r.length,i=n.length,o=Math.min(a,i),u=new Array(a),c=0;c<o;++c)for(var f=r[c],d=n[c],h=f.length,m=u[c]=new Array(h),g,y=0;y<h;++y)(g=f[y]||d[y])&&(m[y]=g);for(;c<a;++c)u[c]=r[c];return new Ka(u,this._parents,this._name,this._id)}function PW(e){return(e+"").trim().split(/^|\s+/).every(function(r){var n=r.indexOf(".");return n>=0&&(r=r.slice(0,n)),!r||r==="start"})}function RW(e,r,n){var a,i,o=PW(r)?GS:sa;return function(){var u=o(this,e),c=u.on;c!==a&&(i=(a=c).copy()).on(r,n),u.on=i}}function DW(e,r){var n=this._id;return arguments.length<2?Ln(this.node(),n).on.on(e):this.each(RW(n,e,r))}function LW(e){return function(){var r=this.parentNode;for(var n in this.__transition)if(+n!==e)return;r&&r.removeChild(this)}}function IW(){return this.on("end.remove",LW(this._id))}function zW(e){var r=this._name,n=this._id;typeof e!="function"&&(e=zS(e));for(var a=this._groups,i=a.length,o=new Array(i),u=0;u<i;++u)for(var c=a[u],f=c.length,d=o[u]=new Array(f),h,m,g=0;g<f;++g)(h=c[g])&&(m=e.call(h,h.__data__,g,c))&&("__data__"in h&&(m.__data__=h.__data__),d[g]=m,_p(d[g],r,n,g,d,Ln(h,n)));return new Ka(o,this._parents,r,n)}function qW(e){var r=this._name,n=this._id;typeof e!="function"&&(e=aL(e));for(var a=this._groups,i=a.length,o=[],u=[],c=0;c<i;++c)for(var f=a[c],d=f.length,h,m=0;m<d;++m)if(h=f[m]){for(var g=e.call(h,h.__data__,m,f),y,x=Ln(h,n),E=0,w=g.length;E<w;++E)(y=g[E])&&_p(y,r,n,E,g,x);o.push(g),u.push(h)}return new Ka(o,u,r,n)}var BW=kc.prototype.constructor;function $W(){return new BW(this._groups,this._parents)}function UW(e,r){var n,a,i;return function(){var o=Wl(this,e),u=(this.style.removeProperty(e),Wl(this,e));return o===u?null:o===n&&u===a?i:i=r(n=o,a=u)}}function AL(e){return function(){this.style.removeProperty(e)}}function FW(e,r,n){var a,i=n+"",o;return function(){var u=Wl(this,e);return u===i?null:u===a?o:o=r(a=u,n)}}function HW(e,r,n){var a,i,o;return function(){var u=Wl(this,e),c=n(this),f=c+"";return c==null&&(f=c=(this.style.removeProperty(e),Wl(this,e))),u===f?null:u===a&&f===i?o:(i=f,o=r(a=u,c))}}function GW(e,r){var n,a,i,o="style."+r,u="end."+o,c;return function(){var f=sa(this,e),d=f.on,h=f.value[o]==null?c||(c=AL(r)):void 0;(d!==n||i!==h)&&(a=(n=d).copy()).on(u,i=h),f.on=a}}function KW(e,r,n){var a=(e+="")=="transform"?GX:jL;return r==null?this.styleTween(e,UW(e,a)).on("end.style."+e,AL(e)):typeof r=="function"?this.styleTween(e,HW(e,a,KS(this,"style."+e,r))).each(GW(this._id,e)):this.styleTween(e,FW(e,a,r),n).on("end.style."+e,null)}function VW(e,r,n){return function(a){this.style.setProperty(e,r.call(this,a),n)}}function YW(e,r,n){var a,i;function o(){var u=r.apply(this,arguments);return u!==i&&(a=(i=u)&&VW(e,u,n)),a}return o._value=r,o}function XW(e,r,n){var a="style."+(e+="");if(arguments.length<2)return(a=this.tween(a))&&a._value;if(r==null)return this.tween(a,null);if(typeof r!="function")throw new Error;return this.tween(a,YW(e,r,n??""))}function WW(e){return function(){this.textContent=e}}function ZW(e){return function(){var r=e(this);this.textContent=r??""}}function QW(e){return this.tween("text",typeof e=="function"?ZW(KS(this,"text",e)):WW(e==null?"":e+""))}function JW(e){return function(r){this.textContent=e.call(this,r)}}function eZ(e){var r,n;function a(){var i=e.apply(this,arguments);return i!==n&&(r=(n=i)&&JW(i)),r}return a._value=e,a}function tZ(e){var r="text";if(arguments.length<1)return(r=this.tween(r))&&r._value;if(e==null)return this.tween(r,null);if(typeof e!="function")throw new Error;return this.tween(r,eZ(e))}function rZ(){for(var e=this._name,r=this._id,n=OL(),a=this._groups,i=a.length,o=0;o<i;++o)for(var u=a[o],c=u.length,f,d=0;d<c;++d)if(f=u[d]){var h=Ln(f,r);_p(f,e,n,d,u,{time:h.time+h.delay+h.duration,delay:0,duration:h.duration,ease:h.ease})}return new Ka(a,this._parents,e,n)}function nZ(){var e,r,n=this,a=n._id,i=n.size();return new Promise(function(o,u){var c={value:u},f={value:function(){--i===0&&o()}};n.each(function(){var d=sa(this,a),h=d.on;h!==e&&(r=(e=h).copy(),r._.cancel.push(c),r._.interrupt.push(c),r._.end.push(f)),d.on=r}),i===0&&o()})}var aZ=0;function Ka(e,r,n,a){this._groups=e,this._parents=r,this._name=n,this._id=a}function OL(){return++aZ}var Ma=kc.prototype;Ka.prototype={constructor:Ka,select:zW,selectAll:qW,selectChild:Ma.selectChild,selectChildren:Ma.selectChildren,filter:NW,merge:MW,selection:$W,transition:rZ,call:Ma.call,nodes:Ma.nodes,node:Ma.node,size:Ma.size,empty:Ma.empty,each:Ma.each,on:DW,attr:mW,attrTween:xW,style:KW,styleTween:XW,text:QW,textTween:tZ,remove:IW,tween:uW,delay:SW,duration:jW,ease:OW,easeVarying:TW,end:nZ,[Symbol.iterator]:Ma[Symbol.iterator]};function iZ(e){return((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2}var oZ={time:null,delay:0,duration:250,ease:iZ};function lZ(e,r){for(var n;!(n=e.__transition)||!(n=n[r]);)if(!(e=e.parentNode))throw new Error(`transition ${r} not found`);return n}function uZ(e){var r,n;e instanceof Ka?(r=e._id,e=e._name):(r=OL(),(n=oZ).time=FS(),e=e==null?null:e+"");for(var a=this._groups,i=a.length,o=0;o<i;++o)for(var u=a[o],c=u.length,f,d=0;d<c;++d)(f=u[d])&&_p(f,e,r,d,u,n||lZ(f,r));return new Ka(a,this._parents,e,r)}kc.prototype.interrupt=iW;kc.prototype.transition=uZ;const jd=e=>()=>e;function sZ(e,{sourceEvent:r,target:n,transform:a,dispatch:i}){Object.defineProperties(this,{type:{value:e,enumerable:!0,configurable:!0},sourceEvent:{value:r,enumerable:!0,configurable:!0},target:{value:n,enumerable:!0,configurable:!0},transform:{value:a,enumerable:!0,configurable:!0},_:{value:i}})}function qa(e,r,n){this.k=e,this.x=r,this.y=n}qa.prototype={constructor:qa,scale:function(e){return e===1?this:new qa(this.k*e,this.x,this.y)},translate:function(e,r){return e===0&r===0?this:new qa(this.k,this.x+this.k*e,this.y+this.k*r)},apply:function(e){return[e[0]*this.k+this.x,e[1]*this.k+this.y]},applyX:function(e){return e*this.k+this.x},applyY:function(e){return e*this.k+this.y},invert:function(e){return[(e[0]-this.x)/this.k,(e[1]-this.y)/this.k]},invertX:function(e){return(e-this.x)/this.k},invertY:function(e){return(e-this.y)/this.k},rescaleX:function(e){return e.copy().domain(e.range().map(this.invertX,this).map(e.invert,e))},rescaleY:function(e){return e.copy().domain(e.range().map(this.invertY,this).map(e.invert,e))},toString:function(){return"translate("+this.x+","+this.y+") scale("+this.k+")"}};var VS=new qa(1,0,0);Vn.prototype=qa.prototype;function Vn(e){for(;!e.__zoom;)if(!(e=e.parentNode))return VS;return e.__zoom}function ty(e){e.stopImmediatePropagation()}function _s(e){e.preventDefault(),e.stopImmediatePropagation()}function cZ(e){return(!e.ctrlKey||e.type==="wheel")&&!e.button}function fZ(){var e=this;return e instanceof SVGElement?(e=e.ownerSVGElement||e,e.hasAttribute("viewBox")?(e=e.viewBox.baseVal,[[e.x,e.y],[e.x+e.width,e.y+e.height]]):[[0,0],[e.width.baseVal.value,e.height.baseVal.value]]):[[0,0],[e.clientWidth,e.clientHeight]]}function DT(){return this.__zoom||VS}function dZ(e){return-e.deltaY*(e.deltaMode===1?.05:e.deltaMode?1:.002)*(e.ctrlKey?10:1)}function hZ(){return navigator.maxTouchPoints||"ontouchstart"in this}function pZ(e,r,n){var a=e.invertX(r[0][0])-n[0][0],i=e.invertX(r[1][0])-n[1][0],o=e.invertY(r[0][1])-n[0][1],u=e.invertY(r[1][1])-n[1][1];return e.translate(i>a?(a+i)/2:Math.min(0,a)||Math.max(0,i),u>o?(o+u)/2:Math.min(0,o)||Math.max(0,u))}function mZ(){var e=cZ,r=fZ,n=pZ,a=dZ,i=hZ,o=[0,1/0],u=[[-1/0,-1/0],[1/0,1/0]],c=250,f=WX,d=jc("start","zoom","end"),h,m,g,y=500,x=150,E=0,w=10;function _(U){U.property("__zoom",DT).on("wheel.zoom",R,{passive:!1}).on("mousedown.zoom",L).on("dblclick.zoom",D).filter(i).on("touchstart.zoom",z).on("touchmove.zoom",q).on("touchend.zoom touchcancel.zoom",G).style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}_.transform=function(U,Y,$,J){var re=U.selection?U.selection():U;re.property("__zoom",DT),U!==re?C(U,Y,$,J):re.interrupt().each(function(){N(this,arguments).event(J).start().zoom(null,typeof Y=="function"?Y.apply(this,arguments):Y).end()})},_.scaleBy=function(U,Y,$,J){_.scaleTo(U,function(){var re=this.__zoom.k,oe=typeof Y=="function"?Y.apply(this,arguments):Y;return re*oe},$,J)},_.scaleTo=function(U,Y,$,J){_.transform(U,function(){var re=r.apply(this,arguments),oe=this.__zoom,fe=$==null?T(re):typeof $=="function"?$.apply(this,arguments):$,F=oe.invert(fe),Z=typeof Y=="function"?Y.apply(this,arguments):Y;return n(O(A(oe,Z),fe,F),re,u)},$,J)},_.translateBy=function(U,Y,$,J){_.transform(U,function(){return n(this.__zoom.translate(typeof Y=="function"?Y.apply(this,arguments):Y,typeof $=="function"?$.apply(this,arguments):$),r.apply(this,arguments),u)},null,J)},_.translateTo=function(U,Y,$,J,re){_.transform(U,function(){var oe=r.apply(this,arguments),fe=this.__zoom,F=J==null?T(oe):typeof J=="function"?J.apply(this,arguments):J;return n(VS.translate(F[0],F[1]).scale(fe.k).translate(typeof Y=="function"?-Y.apply(this,arguments):-Y,typeof $=="function"?-$.apply(this,arguments):-$),oe,u)},J,re)};function A(U,Y){return Y=Math.max(o[0],Math.min(o[1],Y)),Y===U.k?U:new qa(Y,U.x,U.y)}function O(U,Y,$){var J=Y[0]-$[0]*U.k,re=Y[1]-$[1]*U.k;return J===U.x&&re===U.y?U:new qa(U.k,J,re)}function T(U){return[(+U[0][0]+ +U[1][0])/2,(+U[0][1]+ +U[1][1])/2]}function C(U,Y,$,J){U.on("start.zoom",function(){N(this,arguments).event(J).start()}).on("interrupt.zoom end.zoom",function(){N(this,arguments).event(J).end()}).tween("zoom",function(){var re=this,oe=arguments,fe=N(re,oe).event(J),F=r.apply(re,oe),Z=$==null?T(F):typeof $=="function"?$.apply(re,oe):$,ce=Math.max(F[1][0]-F[0][0],F[1][1]-F[0][1]),B=re.__zoom,H=typeof Y=="function"?Y.apply(re,oe):Y,te=f(B.invert(Z).concat(ce/B.k),H.invert(Z).concat(ce/H.k));return function(he){if(he===1)he=H;else{var ge=te(he),W=ce/ge[2];he=new qa(W,Z[0]-ge[0]*W,Z[1]-ge[1]*W)}fe.zoom(null,he)}})}function N(U,Y,$){return!$&&U.__zooming||new M(U,Y)}function M(U,Y){this.that=U,this.args=Y,this.active=0,this.sourceEvent=null,this.extent=r.apply(U,Y),this.taps=0}M.prototype={event:function(U){return U&&(this.sourceEvent=U),this},start:function(){return++this.active===1&&(this.that.__zooming=this,this.emit("start")),this},zoom:function(U,Y){return this.mouse&&U!=="mouse"&&(this.mouse[1]=Y.invert(this.mouse[0])),this.touch0&&U!=="touch"&&(this.touch0[1]=Y.invert(this.touch0[0])),this.touch1&&U!=="touch"&&(this.touch1[1]=Y.invert(this.touch1[0])),this.that.__zoom=Y,this.emit("zoom"),this},end:function(){return--this.active===0&&(delete this.that.__zooming,this.emit("end")),this},emit:function(U){var Y=dn(this.that).datum();d.call(U,this.that,new sZ(U,{sourceEvent:this.sourceEvent,target:_,transform:this.that.__zoom,dispatch:d}),Y)}};function R(U,...Y){if(!e.apply(this,arguments))return;var $=N(this,Y).event(U),J=this.__zoom,re=Math.max(o[0],Math.min(o[1],J.k*Math.pow(2,a.apply(this,arguments)))),oe=Yn(U);if($.wheel)($.mouse[0][0]!==oe[0]||$.mouse[0][1]!==oe[1])&&($.mouse[1]=J.invert($.mouse[0]=oe)),clearTimeout($.wheel);else{if(J.k===re)return;$.mouse=[oe,J.invert(oe)],Wd(this),$.start()}_s(U),$.wheel=setTimeout(fe,x),$.zoom("mouse",n(O(A(J,re),$.mouse[0],$.mouse[1]),$.extent,u));function fe(){$.wheel=null,$.end()}}function L(U,...Y){if(g||!e.apply(this,arguments))return;var $=U.currentTarget,J=N(this,Y,!0).event(U),re=dn(U.view).on("mousemove.zoom",Z,!0).on("mouseup.zoom",ce,!0),oe=Yn(U,$),fe=U.clientX,F=U.clientY;mL(U.view),ty(U),J.mouse=[oe,this.__zoom.invert(oe)],Wd(this),J.start();function Z(B){if(_s(B),!J.moved){var H=B.clientX-fe,te=B.clientY-F;J.moved=H*H+te*te>E}J.event(B).zoom("mouse",n(O(J.that.__zoom,J.mouse[0]=Yn(B,$),J.mouse[1]),J.extent,u))}function ce(B){re.on("mousemove.zoom mouseup.zoom",null),vL(B.view,J.moved),_s(B),J.event(B).end()}}function D(U,...Y){if(e.apply(this,arguments)){var $=this.__zoom,J=Yn(U.changedTouches?U.changedTouches[0]:U,this),re=$.invert(J),oe=$.k*(U.shiftKey?.5:2),fe=n(O(A($,oe),J,re),r.apply(this,Y),u);_s(U),c>0?dn(this).transition().duration(c).call(C,fe,J,U):dn(this).call(_.transform,fe,J,U)}}function z(U,...Y){if(e.apply(this,arguments)){var $=U.touches,J=$.length,re=N(this,Y,U.changedTouches.length===J).event(U),oe,fe,F,Z;for(ty(U),fe=0;fe<J;++fe)F=$[fe],Z=Yn(F,this),Z=[Z,this.__zoom.invert(Z),F.identifier],re.touch0?!re.touch1&&re.touch0[2]!==Z[2]&&(re.touch1=Z,re.taps=0):(re.touch0=Z,oe=!0,re.taps=1+!!h);h&&(h=clearTimeout(h)),oe&&(re.taps<2&&(m=Z[0],h=setTimeout(function(){h=null},y)),Wd(this),re.start())}}function q(U,...Y){if(this.__zooming){var $=N(this,Y).event(U),J=U.changedTouches,re=J.length,oe,fe,F,Z;for(_s(U),oe=0;oe<re;++oe)fe=J[oe],F=Yn(fe,this),$.touch0&&$.touch0[2]===fe.identifier?$.touch0[0]=F:$.touch1&&$.touch1[2]===fe.identifier&&($.touch1[0]=F);if(fe=$.that.__zoom,$.touch1){var ce=$.touch0[0],B=$.touch0[1],H=$.touch1[0],te=$.touch1[1],he=(he=H[0]-ce[0])*he+(he=H[1]-ce[1])*he,ge=(ge=te[0]-B[0])*ge+(ge=te[1]-B[1])*ge;fe=A(fe,Math.sqrt(he/ge)),F=[(ce[0]+H[0])/2,(ce[1]+H[1])/2],Z=[(B[0]+te[0])/2,(B[1]+te[1])/2]}else if($.touch0)F=$.touch0[0],Z=$.touch0[1];else return;$.zoom("touch",n(O(fe,F,Z),$.extent,u))}}function G(U,...Y){if(this.__zooming){var $=N(this,Y).event(U),J=U.changedTouches,re=J.length,oe,fe;for(ty(U),g&&clearTimeout(g),g=setTimeout(function(){g=null},y),oe=0;oe<re;++oe)fe=J[oe],$.touch0&&$.touch0[2]===fe.identifier?delete $.touch0:$.touch1&&$.touch1[2]===fe.identifier&&delete $.touch1;if($.touch1&&!$.touch0&&($.touch0=$.touch1,delete $.touch1),$.touch0)$.touch0[1]=this.__zoom.invert($.touch0[0]);else if($.end(),$.taps===2&&(fe=Yn(fe,this),Math.hypot(m[0]-fe[0],m[1]-fe[1])<w)){var F=dn(this).on("dblclick.zoom");F&&F.apply(this,arguments)}}}return _.wheelDelta=function(U){return arguments.length?(a=typeof U=="function"?U:jd(+U),_):a},_.filter=function(U){return arguments.length?(e=typeof U=="function"?U:jd(!!U),_):e},_.touchable=function(U){return arguments.length?(i=typeof U=="function"?U:jd(!!U),_):i},_.extent=function(U){return arguments.length?(r=typeof U=="function"?U:jd([[+U[0][0],+U[0][1]],[+U[1][0],+U[1][1]]]),_):r},_.scaleExtent=function(U){return arguments.length?(o[0]=+U[0],o[1]=+U[1],_):[o[0],o[1]]},_.translateExtent=function(U){return arguments.length?(u[0][0]=+U[0][0],u[1][0]=+U[1][0],u[0][1]=+U[0][1],u[1][1]=+U[1][1],_):[[u[0][0],u[0][1]],[u[1][0],u[1][1]]]},_.constrain=function(U){return arguments.length?(n=U,_):n},_.duration=function(U){return arguments.length?(c=+U,_):c},_.interpolate=function(U){return arguments.length?(f=U,_):f},_.on=function(){var U=d.on.apply(d,arguments);return U===d?_:U},_.clickDistance=function(U){return arguments.length?(E=(U=+U)*U,_):Math.sqrt(E)},_.tapDistance=function(U){return arguments.length?(w=+U,_):w},_}function $i(e,r){return e==null||r==null?NaN:e<r?-1:e>r?1:e>=r?0:NaN}function vZ(e,r){return e==null||r==null?NaN:r<e?-1:r>e?1:r>=e?0:NaN}function YS(e){let r,n,a;e.length!==2?(r=$i,n=(c,f)=>$i(e(c),f),a=(c,f)=>e(c)-f):(r=e===$i||e===vZ?e:gZ,n=e,a=e);function i(c,f,d=0,h=c.length){if(d<h){if(r(f,f)!==0)return h;do{const m=d+h>>>1;n(c[m],f)<0?d=m+1:h=m}while(d<h)}return d}function o(c,f,d=0,h=c.length){if(d<h){if(r(f,f)!==0)return h;do{const m=d+h>>>1;n(c[m],f)<=0?d=m+1:h=m}while(d<h)}return d}function u(c,f,d=0,h=c.length){const m=i(c,f,d,h-1);return m>d&&a(c[m-1],f)>-a(c[m],f)?m-1:m}return{left:i,center:u,right:o}}function gZ(){return 0}function CL(e){return e===null?NaN:+e}function*yZ(e,r){for(let n of e)n!=null&&(n=+n)>=n&&(yield n)}const bZ=YS($i),Oc=bZ.right;YS(CL).center;class LT extends Map{constructor(r,n=wZ){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:n}}),r!=null)for(const[a,i]of r)this.set(a,i)}get(r){return super.get(IT(this,r))}has(r){return super.has(IT(this,r))}set(r,n){return super.set(xZ(this,r),n)}delete(r){return super.delete(_Z(this,r))}}function IT({_intern:e,_key:r},n){const a=r(n);return e.has(a)?e.get(a):n}function xZ({_intern:e,_key:r},n){const a=r(n);return e.has(a)?e.get(a):(e.set(a,n),n)}function _Z({_intern:e,_key:r},n){const a=r(n);return e.has(a)&&(n=e.get(a),e.delete(a)),n}function wZ(e){return e!==null&&typeof e=="object"?e.valueOf():e}function SZ(e=$i){if(e===$i)return TL;if(typeof e!="function")throw new TypeError("compare is not a function");return(r,n)=>{const a=e(r,n);return a||a===0?a:(e(n,n)===0)-(e(r,r)===0)}}function TL(e,r){return(e==null||!(e>=e))-(r==null||!(r>=r))||(e<r?-1:e>r?1:0)}const EZ=Math.sqrt(50),kZ=Math.sqrt(10),jZ=Math.sqrt(2);function dh(e,r,n){const a=(r-e)/Math.max(0,n),i=Math.floor(Math.log10(a)),o=a/Math.pow(10,i),u=o>=EZ?10:o>=kZ?5:o>=jZ?2:1;let c,f,d;return i<0?(d=Math.pow(10,-i)/u,c=Math.round(e*d),f=Math.round(r*d),c/d<e&&++c,f/d>r&&--f,d=-d):(d=Math.pow(10,i)*u,c=Math.round(e/d),f=Math.round(r/d),c*d<e&&++c,f*d>r&&--f),f<c&&.5<=n&&n<2?dh(e,r,n*2):[c,f,d]}function b2(e,r,n){if(r=+r,e=+e,n=+n,!(n>0))return[];if(e===r)return[e];const a=r<e,[i,o,u]=a?dh(r,e,n):dh(e,r,n);if(!(o>=i))return[];const c=o-i+1,f=new Array(c);if(a)if(u<0)for(let d=0;d<c;++d)f[d]=(o-d)/-u;else for(let d=0;d<c;++d)f[d]=(o-d)*u;else if(u<0)for(let d=0;d<c;++d)f[d]=(i+d)/-u;else for(let d=0;d<c;++d)f[d]=(i+d)*u;return f}function x2(e,r,n){return r=+r,e=+e,n=+n,dh(e,r,n)[2]}function _2(e,r,n){r=+r,e=+e,n=+n;const a=r<e,i=a?x2(r,e,n):x2(e,r,n);return(a?-1:1)*(i<0?1/-i:i)}function hh(e,r){let n;if(r===void 0)for(const a of e)a!=null&&(n<a||n===void 0&&a>=a)&&(n=a);else{let a=-1;for(let i of e)(i=r(i,++a,e))!=null&&(n<i||n===void 0&&i>=i)&&(n=i)}return n}function ph(e,r){let n;if(r===void 0)for(const a of e)a!=null&&(n>a||n===void 0&&a>=a)&&(n=a);else{let a=-1;for(let i of e)(i=r(i,++a,e))!=null&&(n>i||n===void 0&&i>=i)&&(n=i)}return n}function NL(e,r,n=0,a=1/0,i){if(r=Math.floor(r),n=Math.floor(Math.max(0,n)),a=Math.floor(Math.min(e.length-1,a)),!(n<=r&&r<=a))return e;for(i=i===void 0?TL:SZ(i);a>n;){if(a-n>600){const f=a-n+1,d=r-n+1,h=Math.log(f),m=.5*Math.exp(2*h/3),g=.5*Math.sqrt(h*m*(f-m)/f)*(d-f/2<0?-1:1),y=Math.max(n,Math.floor(r-d*m/f+g)),x=Math.min(a,Math.floor(r+(f-d)*m/f+g));NL(e,r,y,x,i)}const o=e[r];let u=n,c=a;for(ws(e,n,r),i(e[a],o)>0&&ws(e,n,a);u<c;){for(ws(e,u,c),++u,--c;i(e[u],o)<0;)++u;for(;i(e[c],o)>0;)--c}i(e[n],o)===0?ws(e,n,c):(++c,ws(e,c,a)),c<=r&&(n=c+1),r<=c&&(a=c-1)}return e}function ws(e,r,n){const a=e[r];e[r]=e[n],e[n]=a}function AZ(e,r,n){if(e=Float64Array.from(yZ(e)),!(!(a=e.length)||isNaN(r=+r))){if(r<=0||a<2)return ph(e);if(r>=1)return hh(e);var a,i=(a-1)*r,o=Math.floor(i),u=hh(NL(e,o).subarray(0,o+1)),c=ph(e.subarray(o+1));return u+(c-u)*(i-o)}}function OZ(e,r,n=CL){if(!(!(a=e.length)||isNaN(r=+r))){if(r<=0||a<2)return+n(e[0],0,e);if(r>=1)return+n(e[a-1],a-1,e);var a,i=(a-1)*r,o=Math.floor(i),u=+n(e[o],o,e),c=+n(e[o+1],o+1,e);return u+(c-u)*(i-o)}}function CZ(e,r,n){e=+e,r=+r,n=(i=arguments.length)<2?(r=e,e=0,1):i<3?1:+n;for(var a=-1,i=Math.max(0,Math.ceil((r-e)/n))|0,o=new Array(i);++a<i;)o[a]=e+a*n;return o}function TZ(e,r){let n=0;for(let a of e)(a=+a)&&(n+=a);return n}var NZ=typeof global=="object"&&global&&global.Object===Object&&global,MZ=typeof self=="object"&&self&&self.Object===Object&&self,ML=NZ||MZ||Function("return this")(),mh=ML.Symbol,PL=Object.prototype,PZ=PL.hasOwnProperty,RZ=PL.toString,Ss=mh?mh.toStringTag:void 0;function DZ(e){var r=PZ.call(e,Ss),n=e[Ss];try{e[Ss]=void 0;var a=!0}catch{}var i=RZ.call(e);return a&&(r?e[Ss]=n:delete e[Ss]),i}var LZ=Object.prototype,IZ=LZ.toString;function zZ(e){return IZ.call(e)}var qZ="[object Null]",BZ="[object Undefined]",zT=mh?mh.toStringTag:void 0;function $Z(e){return e==null?e===void 0?BZ:qZ:zT&&zT in Object(e)?DZ(e):zZ(e)}function UZ(e){return e!=null&&typeof e=="object"}var FZ="[object Symbol]";function HZ(e){return typeof e=="symbol"||UZ(e)&&$Z(e)==FZ}var GZ=/\s/;function KZ(e){for(var r=e.length;r--&&GZ.test(e.charAt(r)););return r}var VZ=/^\s+/;function YZ(e){return e&&e.slice(0,KZ(e)+1).replace(VZ,"")}function vh(e){var r=typeof e;return e!=null&&(r=="object"||r=="function")}var qT=NaN,XZ=/^[-+]0x[0-9a-f]+$/i,WZ=/^0b[01]+$/i,ZZ=/^0o[0-7]+$/i,QZ=parseInt;function BT(e){if(typeof e=="number")return e;if(HZ(e))return qT;if(vh(e)){var r=typeof e.valueOf=="function"?e.valueOf():e;e=vh(r)?r+"":r}if(typeof e!="string")return e===0?e:+e;e=YZ(e);var n=WZ.test(e);return n||ZZ.test(e)?QZ(e.slice(2),n?2:8):XZ.test(e)?qT:+e}var ry=function(){return ML.Date.now()},JZ="Expected a function",eQ=Math.max,tQ=Math.min;function RL(e,r,n){var a,i,o,u,c,f,d=0,h=!1,m=!1,g=!0;if(typeof e!="function")throw new TypeError(JZ);r=BT(r)||0,vh(n)&&(h=!!n.leading,m="maxWait"in n,o=m?eQ(BT(n.maxWait)||0,r):o,g="trailing"in n?!!n.trailing:g);function y(N){var M=a,R=i;return a=i=void 0,d=N,u=e.apply(R,M),u}function x(N){return d=N,c=setTimeout(_,r),h?y(N):u}function E(N){var M=N-f,R=N-d,L=r-M;return m?tQ(L,o-R):L}function w(N){var M=N-f,R=N-d;return f===void 0||M>=r||M<0||m&&R>=o}function _(){var N=ry();if(w(N))return A(N);c=setTimeout(_,E(N))}function A(N){return c=void 0,g&&a?y(N):(a=i=void 0,u)}function O(){c!==void 0&&clearTimeout(c),d=0,a=f=i=c=void 0}function T(){return c===void 0?u:A(ry())}function C(){var N=ry(),M=w(N);if(a=arguments,i=this,f=N,M){if(c===void 0)return x(f);if(m)return clearTimeout(c),c=setTimeout(_,r),y(f)}return c===void 0&&(c=setTimeout(_,r)),u}return C.cancel=O,C.flush=T,C}var rQ="Expected a function";function nQ(e,r,n){var a=!0,i=!0;if(typeof e!="function")throw new TypeError(rQ);return vh(n)&&(a="leading"in n?!!n.leading:a,i="trailing"in n?!!n.trailing:i),RL(e,r,{leading:a,maxWait:r,trailing:i})}var Co=Object.freeze({Linear:Object.freeze({None:function(e){return e},In:function(e){return e},Out:function(e){return e},InOut:function(e){return e}}),Quadratic:Object.freeze({In:function(e){return e*e},Out:function(e){return e*(2-e)},InOut:function(e){return(e*=2)<1?.5*e*e:-.5*(--e*(e-2)-1)}}),Cubic:Object.freeze({In:function(e){return e*e*e},Out:function(e){return--e*e*e+1},InOut:function(e){return(e*=2)<1?.5*e*e*e:.5*((e-=2)*e*e+2)}}),Quartic:Object.freeze({In:function(e){return e*e*e*e},Out:function(e){return 1- --e*e*e*e},InOut:function(e){return(e*=2)<1?.5*e*e*e*e:-.5*((e-=2)*e*e*e-2)}}),Quintic:Object.freeze({In:function(e){return e*e*e*e*e},Out:function(e){return--e*e*e*e*e+1},InOut:function(e){return(e*=2)<1?.5*e*e*e*e*e:.5*((e-=2)*e*e*e*e+2)}}),Sinusoidal:Object.freeze({In:function(e){return 1-Math.sin((1-e)*Math.PI/2)},Out:function(e){return Math.sin(e*Math.PI/2)},InOut:function(e){return .5*(1-Math.sin(Math.PI*(.5-e)))}}),Exponential:Object.freeze({In:function(e){return e===0?0:Math.pow(1024,e-1)},Out:function(e){return e===1?1:1-Math.pow(2,-10*e)},InOut:function(e){return e===0?0:e===1?1:(e*=2)<1?.5*Math.pow(1024,e-1):.5*(-Math.pow(2,-10*(e-1))+2)}}),Circular:Object.freeze({In:function(e){return 1-Math.sqrt(1-e*e)},Out:function(e){return Math.sqrt(1- --e*e)},InOut:function(e){return(e*=2)<1?-.5*(Math.sqrt(1-e*e)-1):.5*(Math.sqrt(1-(e-=2)*e)+1)}}),Elastic:Object.freeze({In:function(e){return e===0?0:e===1?1:-Math.pow(2,10*(e-1))*Math.sin((e-1.1)*5*Math.PI)},Out:function(e){return e===0?0:e===1?1:Math.pow(2,-10*e)*Math.sin((e-.1)*5*Math.PI)+1},InOut:function(e){return e===0?0:e===1?1:(e*=2,e<1?-.5*Math.pow(2,10*(e-1))*Math.sin((e-1.1)*5*Math.PI):.5*Math.pow(2,-10*(e-1))*Math.sin((e-1.1)*5*Math.PI)+1)}}),Back:Object.freeze({In:function(e){var r=1.70158;return e===1?1:e*e*((r+1)*e-r)},Out:function(e){var r=1.70158;return e===0?0:--e*e*((r+1)*e+r)+1},InOut:function(e){var r=2.5949095;return(e*=2)<1?.5*(e*e*((r+1)*e-r)):.5*((e-=2)*e*((r+1)*e+r)+2)}}),Bounce:Object.freeze({In:function(e){return 1-Co.Bounce.Out(1-e)},Out:function(e){return e<1/2.75?7.5625*e*e:e<2/2.75?7.5625*(e-=1.5/2.75)*e+.75:e<2.5/2.75?7.5625*(e-=2.25/2.75)*e+.9375:7.5625*(e-=2.625/2.75)*e+.984375},InOut:function(e){return e<.5?Co.Bounce.In(e*2)*.5:Co.Bounce.Out(e*2-1)*.5+.5}}),generatePow:function(e){return e===void 0&&(e=4),e=e<Number.EPSILON?Number.EPSILON:e,e=e>1e4?1e4:e,{In:function(r){return Math.pow(r,e)},Out:function(r){return 1-Math.pow(1-r,e)},InOut:function(r){return r<.5?Math.pow(r*2,e)/2:(1-Math.pow(2-r*2,e))/2+.5}}}}),Us=function(){return performance.now()},DL=(function(){function e(){for(var r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];this._tweens={},this._tweensAddedDuringUpdate={},this.add.apply(this,r)}return e.prototype.getAll=function(){var r=this;return Object.keys(this._tweens).map(function(n){return r._tweens[n]})},e.prototype.removeAll=function(){this._tweens={}},e.prototype.add=function(){for(var r,n=[],a=0;a<arguments.length;a++)n[a]=arguments[a];for(var i=0,o=n;i<o.length;i++){var u=o[i];(r=u._group)===null||r===void 0||r.remove(u),u._group=this,this._tweens[u.getId()]=u,this._tweensAddedDuringUpdate[u.getId()]=u}},e.prototype.remove=function(){for(var r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];for(var a=0,i=r;a<i.length;a++){var o=i[a];o._group=void 0,delete this._tweens[o.getId()],delete this._tweensAddedDuringUpdate[o.getId()]}},e.prototype.allStopped=function(){return this.getAll().every(function(r){return!r.isPlaying()})},e.prototype.update=function(r,n){r===void 0&&(r=Us()),n===void 0&&(n=!0);var a=Object.keys(this._tweens);if(a.length!==0)for(;a.length>0;){this._tweensAddedDuringUpdate={};for(var i=0;i<a.length;i++){var o=this._tweens[a[i]],u=!n;o&&o.update(r,u)===!1&&!n&&this.remove(o)}a=Object.keys(this._tweensAddedDuringUpdate)}},e})(),w2={Linear:function(e,r){var n=e.length-1,a=n*r,i=Math.floor(a),o=w2.Utils.Linear;return r<0?o(e[0],e[1],a):r>1?o(e[n],e[n-1],n-a):o(e[i],e[i+1>n?n:i+1],a-i)},Utils:{Linear:function(e,r,n){return(r-e)*n+e}}},LL=(function(){function e(){}return e.nextId=function(){return e._nextId++},e._nextId=0,e})(),S2=new DL,$T=(function(){function e(r,n){this._isPaused=!1,this._pauseStart=0,this._valuesStart={},this._valuesEnd={},this._valuesStartRepeat={},this._duration=1e3,this._isDynamic=!1,this._initialRepeat=0,this._repeat=0,this._yoyo=!1,this._isPlaying=!1,this._reversed=!1,this._delayTime=0,this._startTime=0,this._easingFunction=Co.Linear.None,this._interpolationFunction=w2.Linear,this._chainedTweens=[],this._onStartCallbackFired=!1,this._onEveryStartCallbackFired=!1,this._id=LL.nextId(),this._isChainStopped=!1,this._propertiesAreSetUp=!1,this._goToEnd=!1,this._object=r,typeof n=="object"?(this._group=n,n.add(this)):n===!0&&(this._group=S2,S2.add(this))}return e.prototype.getId=function(){return this._id},e.prototype.isPlaying=function(){return this._isPlaying},e.prototype.isPaused=function(){return this._isPaused},e.prototype.getDuration=function(){return this._duration},e.prototype.to=function(r,n){if(n===void 0&&(n=1e3),this._isPlaying)throw new Error("Can not call Tween.to() while Tween is already started or paused. Stop the Tween first.");return this._valuesEnd=r,this._propertiesAreSetUp=!1,this._duration=n<0?0:n,this},e.prototype.duration=function(r){return r===void 0&&(r=1e3),this._duration=r<0?0:r,this},e.prototype.dynamic=function(r){return r===void 0&&(r=!1),this._isDynamic=r,this},e.prototype.start=function(r,n){if(r===void 0&&(r=Us()),n===void 0&&(n=!1),this._isPlaying)return this;if(this._repeat=this._initialRepeat,this._reversed){this._reversed=!1;for(var a in this._valuesStartRepeat)this._swapEndStartRepeatValues(a),this._valuesStart[a]=this._valuesStartRepeat[a]}if(this._isPlaying=!0,this._isPaused=!1,this._onStartCallbackFired=!1,this._onEveryStartCallbackFired=!1,this._isChainStopped=!1,this._startTime=r,this._startTime+=this._delayTime,!this._propertiesAreSetUp||n){if(this._propertiesAreSetUp=!0,!this._isDynamic){var i={};for(var o in this._valuesEnd)i[o]=this._valuesEnd[o];this._valuesEnd=i}this._setupProperties(this._object,this._valuesStart,this._valuesEnd,this._valuesStartRepeat,n)}return this},e.prototype.startFromCurrentValues=function(r){return this.start(r,!0)},e.prototype._setupProperties=function(r,n,a,i,o){for(var u in a){var c=r[u],f=Array.isArray(c),d=f?"array":typeof c,h=!f&&Array.isArray(a[u]);if(!(d==="undefined"||d==="function")){if(h){var m=a[u];if(m.length===0)continue;for(var g=[c],y=0,x=m.length;y<x;y+=1){var E=this._handleRelativeValue(c,m[y]);if(isNaN(E)){h=!1,console.warn("Found invalid interpolation list. Skipping.");break}g.push(E)}h&&(a[u]=g)}if((d==="object"||f)&&c&&!h){n[u]=f?[]:{};var w=c;for(var _ in w)n[u][_]=w[_];i[u]=f?[]:{};var m=a[u];if(!this._isDynamic){var A={};for(var _ in m)A[_]=m[_];a[u]=m=A}this._setupProperties(w,n[u],m,i[u],o)}else(typeof n[u]>"u"||o)&&(n[u]=c),f||(n[u]*=1),h?i[u]=a[u].slice().reverse():i[u]=n[u]||0}}},e.prototype.stop=function(){return this._isChainStopped||(this._isChainStopped=!0,this.stopChainedTweens()),this._isPlaying?(this._isPlaying=!1,this._isPaused=!1,this._onStopCallback&&this._onStopCallback(this._object),this):this},e.prototype.end=function(){return this._goToEnd=!0,this.update(this._startTime+this._duration),this},e.prototype.pause=function(r){return r===void 0&&(r=Us()),this._isPaused||!this._isPlaying?this:(this._isPaused=!0,this._pauseStart=r,this)},e.prototype.resume=function(r){return r===void 0&&(r=Us()),!this._isPaused||!this._isPlaying?this:(this._isPaused=!1,this._startTime+=r-this._pauseStart,this._pauseStart=0,this)},e.prototype.stopChainedTweens=function(){for(var r=0,n=this._chainedTweens.length;r<n;r++)this._chainedTweens[r].stop();return this},e.prototype.group=function(r){return r?(r.add(this),this):(console.warn("tween.group() without args has been removed, use group.add(tween) instead."),this)},e.prototype.remove=function(){var r;return(r=this._group)===null||r===void 0||r.remove(this),this},e.prototype.delay=function(r){return r===void 0&&(r=0),this._delayTime=r,this},e.prototype.repeat=function(r){return r===void 0&&(r=0),this._initialRepeat=r,this._repeat=r,this},e.prototype.repeatDelay=function(r){return this._repeatDelayTime=r,this},e.prototype.yoyo=function(r){return r===void 0&&(r=!1),this._yoyo=r,this},e.prototype.easing=function(r){return r===void 0&&(r=Co.Linear.None),this._easingFunction=r,this},e.prototype.interpolation=function(r){return r===void 0&&(r=w2.Linear),this._interpolationFunction=r,this},e.prototype.chain=function(){for(var r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];return this._chainedTweens=r,this},e.prototype.onStart=function(r){return this._onStartCallback=r,this},e.prototype.onEveryStart=function(r){return this._onEveryStartCallback=r,this},e.prototype.onUpdate=function(r){return this._onUpdateCallback=r,this},e.prototype.onRepeat=function(r){return this._onRepeatCallback=r,this},e.prototype.onComplete=function(r){return this._onCompleteCallback=r,this},e.prototype.onStop=function(r){return this._onStopCallback=r,this},e.prototype.update=function(r,n){var a=this,i;if(r===void 0&&(r=Us()),n===void 0&&(n=e.autoStartOnUpdate),this._isPaused)return!0;var o;if(!this._goToEnd&&!this._isPlaying)if(n)this.start(r,!0);else return!1;if(this._goToEnd=!1,r<this._startTime)return!0;this._onStartCallbackFired===!1&&(this._onStartCallback&&this._onStartCallback(this._object),this._onStartCallbackFired=!0),this._onEveryStartCallbackFired===!1&&(this._onEveryStartCallback&&this._onEveryStartCallback(this._object),this._onEveryStartCallbackFired=!0);var u=r-this._startTime,c=this._duration+((i=this._repeatDelayTime)!==null&&i!==void 0?i:this._delayTime),f=this._duration+this._repeat*c,d=function(){if(a._duration===0||u>f)return 1;var E=Math.trunc(u/c),w=u-E*c,_=Math.min(w/a._duration,1);return _===0&&u===a._duration?1:_},h=d(),m=this._easingFunction(h);if(this._updateProperties(this._object,this._valuesStart,this._valuesEnd,m),this._onUpdateCallback&&this._onUpdateCallback(this._object,h),this._duration===0||u>=this._duration)if(this._repeat>0){var g=Math.min(Math.trunc((u-this._duration)/c)+1,this._repeat);isFinite(this._repeat)&&(this._repeat-=g);for(o in this._valuesStartRepeat)!this._yoyo&&typeof this._valuesEnd[o]=="string"&&(this._valuesStartRepeat[o]=this._valuesStartRepeat[o]+parseFloat(this._valuesEnd[o])),this._yoyo&&this._swapEndStartRepeatValues(o),this._valuesStart[o]=this._valuesStartRepeat[o];return this._yoyo&&(this._reversed=!this._reversed),this._startTime+=c*g,this._onRepeatCallback&&this._onRepeatCallback(this._object),this._onEveryStartCallbackFired=!1,!0}else{this._onCompleteCallback&&this._onCompleteCallback(this._object);for(var y=0,x=this._chainedTweens.length;y<x;y++)this._chainedTweens[y].start(this._startTime+this._duration,!1);return this._isPlaying=!1,!1}return!0},e.prototype._updateProperties=function(r,n,a,i){for(var o in a)if(n[o]!==void 0){var u=n[o]||0,c=a[o],f=Array.isArray(r[o]),d=Array.isArray(c),h=!f&&d;h?r[o]=this._interpolationFunction(c,i):typeof c=="object"&&c?this._updateProperties(r[o],u,c,i):(c=this._handleRelativeValue(u,c),typeof c=="number"&&(r[o]=u+(c-u)*i))}},e.prototype._handleRelativeValue=function(r,n){return typeof n!="string"?n:n.charAt(0)==="+"||n.charAt(0)==="-"?r+parseFloat(n):parseFloat(n)},e.prototype._swapEndStartRepeatValues=function(r){var n=this._valuesStartRepeat[r],a=this._valuesEnd[r];typeof a=="string"?this._valuesStartRepeat[r]=this._valuesStartRepeat[r]+parseFloat(a):this._valuesStartRepeat[r]=this._valuesEnd[r],this._valuesEnd[r]=n},e.autoStartOnUpdate=!1,e})();LL.nextId;var aa=S2;aa.getAll.bind(aa);aa.removeAll.bind(aa);aa.add.bind(aa);aa.remove.bind(aa);aa.update.bind(aa);function UT(e,r){(r==null||r>e.length)&&(r=e.length);for(var n=0,a=Array(r);n<r;n++)a[n]=e[n];return a}function aQ(e){if(Array.isArray(e))return e}function iQ(e,r){if(!(e instanceof r))throw new TypeError("Cannot call a class as a function")}function oQ(e,r,n){return Object.defineProperty(e,"prototype",{writable:!1}),e}function lQ(e,r){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var a,i,o,u,c=[],f=!0,d=!1;try{if(o=(n=n.call(e)).next,r!==0)for(;!(f=(a=o.call(n)).done)&&(c.push(a.value),c.length!==r);f=!0);}catch(h){d=!0,i=h}finally{try{if(!f&&n.return!=null&&(u=n.return(),Object(u)!==u))return}finally{if(d)throw i}}return c}}function uQ(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
68
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function sQ(e,r){return aQ(e)||lQ(e,r)||cQ(e,r)||uQ()}function cQ(e,r){if(e){if(typeof e=="string")return UT(e,r);var n={}.toString.call(e).slice(8,-1);return n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set"?Array.from(e):n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?UT(e,r):void 0}}var fQ=oQ(function e(r,n){var a=n.default,i=a===void 0?null:a,o=n.triggerUpdate,u=o===void 0?!0:o,c=n.onChange,f=c===void 0?function(d,h){}:c;iQ(this,e),this.name=r,this.defaultVal=i,this.triggerUpdate=u,this.onChange=f});function XS(e){var r=e.stateInit,n=r===void 0?function(){return{}}:r,a=e.props,i=a===void 0?{}:a,o=e.methods,u=o===void 0?{}:o,c=e.aliases,f=c===void 0?{}:c,d=e.init,h=d===void 0?function(){}:d,m=e.update,g=m===void 0?function(){}:m,y=Object.keys(i).map(function(x){return new fQ(x,i[x])});return function x(){for(var E=arguments.length,w=new Array(E),_=0;_<E;_++)w[_]=arguments[_];var A=!!(this instanceof x&&this.constructor),O=A?w.shift():void 0,T=w[0],C=T===void 0?{}:T,N=Object.assign({},n instanceof Function?n(C):n,{initialised:!1}),M={};function R(z){return L(z,C),D(),R}var L=function(q,G){h.call(R,q,N,G),N.initialised=!0},D=RL(function(){N.initialised&&(g.call(R,N,M),M={})},1);return y.forEach(function(z){R[z.name]=q(z);function q(G){var U=G.name,Y=G.triggerUpdate,$=Y===void 0?!1:Y,J=G.onChange,re=J===void 0?function(F,Z){}:J,oe=G.defaultVal,fe=oe===void 0?null:oe;return function(F){var Z=N[U];if(!arguments.length)return Z;var ce=F===void 0?fe:F;return N[U]=ce,re.call(R,ce,N,Z),!M.hasOwnProperty(U)&&(M[U]=Z),$&&D(),R}}}),Object.keys(u).forEach(function(z){R[z]=function(){for(var q,G=arguments.length,U=new Array(G),Y=0;Y<G;Y++)U[Y]=arguments[Y];return(q=u[z]).call.apply(q,[R,N].concat(U))}}),Object.entries(f).forEach(function(z){var q=sQ(z,2),G=q[0],U=q[1];return R[G]=R[U]}),R.resetProps=function(){return y.forEach(function(z){R[z.name](z.defaultVal)}),R},R.resetProps(),N._rerender=D,A&&O&&R(O),R}}var Ke=(function(e){return typeof e=="function"?e:typeof e=="string"?function(r){return r[e]}:function(r){return e}});function gh(e){"@babel/helpers - typeof";return gh=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},gh(e)}var dQ=/^\s+/,hQ=/\s+$/;function Ae(e,r){if(e=e||"",r=r||{},e instanceof Ae)return e;if(!(this instanceof Ae))return new Ae(e,r);var n=pQ(e);this._originalInput=e,this._r=n.r,this._g=n.g,this._b=n.b,this._a=n.a,this._roundA=Math.round(100*this._a)/100,this._format=r.format||n.format,this._gradientType=r.gradientType,this._r<1&&(this._r=Math.round(this._r)),this._g<1&&(this._g=Math.round(this._g)),this._b<1&&(this._b=Math.round(this._b)),this._ok=n.ok}Ae.prototype={isDark:function(){return this.getBrightness()<128},isLight:function(){return!this.isDark()},isValid:function(){return this._ok},getOriginalInput:function(){return this._originalInput},getFormat:function(){return this._format},getAlpha:function(){return this._a},getBrightness:function(){var r=this.toRgb();return(r.r*299+r.g*587+r.b*114)/1e3},getLuminance:function(){var r=this.toRgb(),n,a,i,o,u,c;return n=r.r/255,a=r.g/255,i=r.b/255,n<=.03928?o=n/12.92:o=Math.pow((n+.055)/1.055,2.4),a<=.03928?u=a/12.92:u=Math.pow((a+.055)/1.055,2.4),i<=.03928?c=i/12.92:c=Math.pow((i+.055)/1.055,2.4),.2126*o+.7152*u+.0722*c},setAlpha:function(r){return this._a=IL(r),this._roundA=Math.round(100*this._a)/100,this},toHsv:function(){var r=HT(this._r,this._g,this._b);return{h:r.h*360,s:r.s,v:r.v,a:this._a}},toHsvString:function(){var r=HT(this._r,this._g,this._b),n=Math.round(r.h*360),a=Math.round(r.s*100),i=Math.round(r.v*100);return this._a==1?"hsv("+n+", "+a+"%, "+i+"%)":"hsva("+n+", "+a+"%, "+i+"%, "+this._roundA+")"},toHsl:function(){var r=FT(this._r,this._g,this._b);return{h:r.h*360,s:r.s,l:r.l,a:this._a}},toHslString:function(){var r=FT(this._r,this._g,this._b),n=Math.round(r.h*360),a=Math.round(r.s*100),i=Math.round(r.l*100);return this._a==1?"hsl("+n+", "+a+"%, "+i+"%)":"hsla("+n+", "+a+"%, "+i+"%, "+this._roundA+")"},toHex:function(r){return GT(this._r,this._g,this._b,r)},toHexString:function(r){return"#"+this.toHex(r)},toHex8:function(r){return yQ(this._r,this._g,this._b,this._a,r)},toHex8String:function(r){return"#"+this.toHex8(r)},toRgb:function(){return{r:Math.round(this._r),g:Math.round(this._g),b:Math.round(this._b),a:this._a}},toRgbString:function(){return this._a==1?"rgb("+Math.round(this._r)+", "+Math.round(this._g)+", "+Math.round(this._b)+")":"rgba("+Math.round(this._r)+", "+Math.round(this._g)+", "+Math.round(this._b)+", "+this._roundA+")"},toPercentageRgb:function(){return{r:Math.round(ft(this._r,255)*100)+"%",g:Math.round(ft(this._g,255)*100)+"%",b:Math.round(ft(this._b,255)*100)+"%",a:this._a}},toPercentageRgbString:function(){return this._a==1?"rgb("+Math.round(ft(this._r,255)*100)+"%, "+Math.round(ft(this._g,255)*100)+"%, "+Math.round(ft(this._b,255)*100)+"%)":"rgba("+Math.round(ft(this._r,255)*100)+"%, "+Math.round(ft(this._g,255)*100)+"%, "+Math.round(ft(this._b,255)*100)+"%, "+this._roundA+")"},toName:function(){return this._a===0?"transparent":this._a<1?!1:TQ[GT(this._r,this._g,this._b,!0)]||!1},toFilter:function(r){var n="#"+KT(this._r,this._g,this._b,this._a),a=n,i=this._gradientType?"GradientType = 1, ":"";if(r){var o=Ae(r);a="#"+KT(o._r,o._g,o._b,o._a)}return"progid:DXImageTransform.Microsoft.gradient("+i+"startColorstr="+n+",endColorstr="+a+")"},toString:function(r){var n=!!r;r=r||this._format;var a=!1,i=this._a<1&&this._a>=0,o=!n&&i&&(r==="hex"||r==="hex6"||r==="hex3"||r==="hex4"||r==="hex8"||r==="name");return o?r==="name"&&this._a===0?this.toName():this.toRgbString():(r==="rgb"&&(a=this.toRgbString()),r==="prgb"&&(a=this.toPercentageRgbString()),(r==="hex"||r==="hex6")&&(a=this.toHexString()),r==="hex3"&&(a=this.toHexString(!0)),r==="hex4"&&(a=this.toHex8String(!0)),r==="hex8"&&(a=this.toHex8String()),r==="name"&&(a=this.toName()),r==="hsl"&&(a=this.toHslString()),r==="hsv"&&(a=this.toHsvString()),a||this.toHexString())},clone:function(){return Ae(this.toString())},_applyModification:function(r,n){var a=r.apply(null,[this].concat([].slice.call(n)));return this._r=a._r,this._g=a._g,this._b=a._b,this.setAlpha(a._a),this},lighten:function(){return this._applyModification(wQ,arguments)},brighten:function(){return this._applyModification(SQ,arguments)},darken:function(){return this._applyModification(EQ,arguments)},desaturate:function(){return this._applyModification(bQ,arguments)},saturate:function(){return this._applyModification(xQ,arguments)},greyscale:function(){return this._applyModification(_Q,arguments)},spin:function(){return this._applyModification(kQ,arguments)},_applyCombination:function(r,n){return r.apply(null,[this].concat([].slice.call(n)))},analogous:function(){return this._applyCombination(OQ,arguments)},complement:function(){return this._applyCombination(jQ,arguments)},monochromatic:function(){return this._applyCombination(CQ,arguments)},splitcomplement:function(){return this._applyCombination(AQ,arguments)},triad:function(){return this._applyCombination(VT,[3])},tetrad:function(){return this._applyCombination(VT,[4])}};Ae.fromRatio=function(e,r){if(gh(e)=="object"){var n={};for(var a in e)e.hasOwnProperty(a)&&(a==="a"?n[a]=e[a]:n[a]=Fs(e[a]));e=n}return Ae(e,r)};function pQ(e){var r={r:0,g:0,b:0},n=1,a=null,i=null,o=null,u=!1,c=!1;return typeof e=="string"&&(e=RQ(e)),gh(e)=="object"&&(Pa(e.r)&&Pa(e.g)&&Pa(e.b)?(r=mQ(e.r,e.g,e.b),u=!0,c=String(e.r).substr(-1)==="%"?"prgb":"rgb"):Pa(e.h)&&Pa(e.s)&&Pa(e.v)?(a=Fs(e.s),i=Fs(e.v),r=gQ(e.h,a,i),u=!0,c="hsv"):Pa(e.h)&&Pa(e.s)&&Pa(e.l)&&(a=Fs(e.s),o=Fs(e.l),r=vQ(e.h,a,o),u=!0,c="hsl"),e.hasOwnProperty("a")&&(n=e.a)),n=IL(n),{ok:u,format:e.format||c,r:Math.min(255,Math.max(r.r,0)),g:Math.min(255,Math.max(r.g,0)),b:Math.min(255,Math.max(r.b,0)),a:n}}function mQ(e,r,n){return{r:ft(e,255)*255,g:ft(r,255)*255,b:ft(n,255)*255}}function FT(e,r,n){e=ft(e,255),r=ft(r,255),n=ft(n,255);var a=Math.max(e,r,n),i=Math.min(e,r,n),o,u,c=(a+i)/2;if(a==i)o=u=0;else{var f=a-i;switch(u=c>.5?f/(2-a-i):f/(a+i),a){case e:o=(r-n)/f+(r<n?6:0);break;case r:o=(n-e)/f+2;break;case n:o=(e-r)/f+4;break}o/=6}return{h:o,s:u,l:c}}function vQ(e,r,n){var a,i,o;e=ft(e,360),r=ft(r,100),n=ft(n,100);function u(d,h,m){return m<0&&(m+=1),m>1&&(m-=1),m<1/6?d+(h-d)*6*m:m<1/2?h:m<2/3?d+(h-d)*(2/3-m)*6:d}if(r===0)a=i=o=n;else{var c=n<.5?n*(1+r):n+r-n*r,f=2*n-c;a=u(f,c,e+1/3),i=u(f,c,e),o=u(f,c,e-1/3)}return{r:a*255,g:i*255,b:o*255}}function HT(e,r,n){e=ft(e,255),r=ft(r,255),n=ft(n,255);var a=Math.max(e,r,n),i=Math.min(e,r,n),o,u,c=a,f=a-i;if(u=a===0?0:f/a,a==i)o=0;else{switch(a){case e:o=(r-n)/f+(r<n?6:0);break;case r:o=(n-e)/f+2;break;case n:o=(e-r)/f+4;break}o/=6}return{h:o,s:u,v:c}}function gQ(e,r,n){e=ft(e,360)*6,r=ft(r,100),n=ft(n,100);var a=Math.floor(e),i=e-a,o=n*(1-r),u=n*(1-i*r),c=n*(1-(1-i)*r),f=a%6,d=[n,u,o,o,c,n][f],h=[c,n,n,u,o,o][f],m=[o,o,c,n,n,u][f];return{r:d*255,g:h*255,b:m*255}}function GT(e,r,n,a){var i=[Mn(Math.round(e).toString(16)),Mn(Math.round(r).toString(16)),Mn(Math.round(n).toString(16))];return a&&i[0].charAt(0)==i[0].charAt(1)&&i[1].charAt(0)==i[1].charAt(1)&&i[2].charAt(0)==i[2].charAt(1)?i[0].charAt(0)+i[1].charAt(0)+i[2].charAt(0):i.join("")}function yQ(e,r,n,a,i){var o=[Mn(Math.round(e).toString(16)),Mn(Math.round(r).toString(16)),Mn(Math.round(n).toString(16)),Mn(zL(a))];return i&&o[0].charAt(0)==o[0].charAt(1)&&o[1].charAt(0)==o[1].charAt(1)&&o[2].charAt(0)==o[2].charAt(1)&&o[3].charAt(0)==o[3].charAt(1)?o[0].charAt(0)+o[1].charAt(0)+o[2].charAt(0)+o[3].charAt(0):o.join("")}function KT(e,r,n,a){var i=[Mn(zL(a)),Mn(Math.round(e).toString(16)),Mn(Math.round(r).toString(16)),Mn(Math.round(n).toString(16))];return i.join("")}Ae.equals=function(e,r){return!e||!r?!1:Ae(e).toRgbString()==Ae(r).toRgbString()};Ae.random=function(){return Ae.fromRatio({r:Math.random(),g:Math.random(),b:Math.random()})};function bQ(e,r){r=r===0?0:r||10;var n=Ae(e).toHsl();return n.s-=r/100,n.s=wp(n.s),Ae(n)}function xQ(e,r){r=r===0?0:r||10;var n=Ae(e).toHsl();return n.s+=r/100,n.s=wp(n.s),Ae(n)}function _Q(e){return Ae(e).desaturate(100)}function wQ(e,r){r=r===0?0:r||10;var n=Ae(e).toHsl();return n.l+=r/100,n.l=wp(n.l),Ae(n)}function SQ(e,r){r=r===0?0:r||10;var n=Ae(e).toRgb();return n.r=Math.max(0,Math.min(255,n.r-Math.round(255*-(r/100)))),n.g=Math.max(0,Math.min(255,n.g-Math.round(255*-(r/100)))),n.b=Math.max(0,Math.min(255,n.b-Math.round(255*-(r/100)))),Ae(n)}function EQ(e,r){r=r===0?0:r||10;var n=Ae(e).toHsl();return n.l-=r/100,n.l=wp(n.l),Ae(n)}function kQ(e,r){var n=Ae(e).toHsl(),a=(n.h+r)%360;return n.h=a<0?360+a:a,Ae(n)}function jQ(e){var r=Ae(e).toHsl();return r.h=(r.h+180)%360,Ae(r)}function VT(e,r){if(isNaN(r)||r<=0)throw new Error("Argument to polyad must be a positive number");for(var n=Ae(e).toHsl(),a=[Ae(e)],i=360/r,o=1;o<r;o++)a.push(Ae({h:(n.h+o*i)%360,s:n.s,l:n.l}));return a}function AQ(e){var r=Ae(e).toHsl(),n=r.h;return[Ae(e),Ae({h:(n+72)%360,s:r.s,l:r.l}),Ae({h:(n+216)%360,s:r.s,l:r.l})]}function OQ(e,r,n){r=r||6,n=n||30;var a=Ae(e).toHsl(),i=360/n,o=[Ae(e)];for(a.h=(a.h-(i*r>>1)+720)%360;--r;)a.h=(a.h+i)%360,o.push(Ae(a));return o}function CQ(e,r){r=r||6;for(var n=Ae(e).toHsv(),a=n.h,i=n.s,o=n.v,u=[],c=1/r;r--;)u.push(Ae({h:a,s:i,v:o})),o=(o+c)%1;return u}Ae.mix=function(e,r,n){n=n===0?0:n||50;var a=Ae(e).toRgb(),i=Ae(r).toRgb(),o=n/100,u={r:(i.r-a.r)*o+a.r,g:(i.g-a.g)*o+a.g,b:(i.b-a.b)*o+a.b,a:(i.a-a.a)*o+a.a};return Ae(u)};Ae.readability=function(e,r){var n=Ae(e),a=Ae(r);return(Math.max(n.getLuminance(),a.getLuminance())+.05)/(Math.min(n.getLuminance(),a.getLuminance())+.05)};Ae.isReadable=function(e,r,n){var a=Ae.readability(e,r),i,o;switch(o=!1,i=DQ(n),i.level+i.size){case"AAsmall":case"AAAlarge":o=a>=4.5;break;case"AAlarge":o=a>=3;break;case"AAAsmall":o=a>=7;break}return o};Ae.mostReadable=function(e,r,n){var a=null,i=0,o,u,c,f;n=n||{},u=n.includeFallbackColors,c=n.level,f=n.size;for(var d=0;d<r.length;d++)o=Ae.readability(e,r[d]),o>i&&(i=o,a=Ae(r[d]));return Ae.isReadable(e,a,{level:c,size:f})||!u?a:(n.includeFallbackColors=!1,Ae.mostReadable(e,["#fff","#000"],n))};var E2=Ae.names={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"0ff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000",blanchedalmond:"ffebcd",blue:"00f",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",burntsienna:"ea7e5d",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"0ff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkgrey:"a9a9a9",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkslategrey:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dimgrey:"696969",dodgerblue:"1e90ff",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"f0f",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",grey:"808080",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgray:"d3d3d3",lightgreen:"90ee90",lightgrey:"d3d3d3",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslategray:"789",lightslategrey:"789",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"0f0",limegreen:"32cd32",linen:"faf0e6",magenta:"f0f",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370db",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"db7093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",rebeccapurple:"663399",red:"f00",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",slategrey:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",wheat:"f5deb3",white:"fff",whitesmoke:"f5f5f5",yellow:"ff0",yellowgreen:"9acd32"},TQ=Ae.hexNames=NQ(E2);function NQ(e){var r={};for(var n in e)e.hasOwnProperty(n)&&(r[e[n]]=n);return r}function IL(e){return e=parseFloat(e),(isNaN(e)||e<0||e>1)&&(e=1),e}function ft(e,r){MQ(e)&&(e="100%");var n=PQ(e);return e=Math.min(r,Math.max(0,parseFloat(e))),n&&(e=parseInt(e*r,10)/100),Math.abs(e-r)<1e-6?1:e%r/parseFloat(r)}function wp(e){return Math.min(1,Math.max(0,e))}function $r(e){return parseInt(e,16)}function MQ(e){return typeof e=="string"&&e.indexOf(".")!=-1&&parseFloat(e)===1}function PQ(e){return typeof e=="string"&&e.indexOf("%")!=-1}function Mn(e){return e.length==1?"0"+e:""+e}function Fs(e){return e<=1&&(e=e*100+"%"),e}function zL(e){return Math.round(parseFloat(e)*255).toString(16)}function YT(e){return $r(e)/255}var An=(function(){var e="[-\\+]?\\d+%?",r="[-\\+]?\\d*\\.\\d+%?",n="(?:"+r+")|(?:"+e+")",a="[\\s|\\(]+("+n+")[,|\\s]+("+n+")[,|\\s]+("+n+")\\s*\\)?",i="[\\s|\\(]+("+n+")[,|\\s]+("+n+")[,|\\s]+("+n+")[,|\\s]+("+n+")\\s*\\)?";return{CSS_UNIT:new RegExp(n),rgb:new RegExp("rgb"+a),rgba:new RegExp("rgba"+i),hsl:new RegExp("hsl"+a),hsla:new RegExp("hsla"+i),hsv:new RegExp("hsv"+a),hsva:new RegExp("hsva"+i),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/}})();function Pa(e){return!!An.CSS_UNIT.exec(e)}function RQ(e){e=e.replace(dQ,"").replace(hQ,"").toLowerCase();var r=!1;if(E2[e])e=E2[e],r=!0;else if(e=="transparent")return{r:0,g:0,b:0,a:0,format:"name"};var n;return(n=An.rgb.exec(e))?{r:n[1],g:n[2],b:n[3]}:(n=An.rgba.exec(e))?{r:n[1],g:n[2],b:n[3],a:n[4]}:(n=An.hsl.exec(e))?{h:n[1],s:n[2],l:n[3]}:(n=An.hsla.exec(e))?{h:n[1],s:n[2],l:n[3],a:n[4]}:(n=An.hsv.exec(e))?{h:n[1],s:n[2],v:n[3]}:(n=An.hsva.exec(e))?{h:n[1],s:n[2],v:n[3],a:n[4]}:(n=An.hex8.exec(e))?{r:$r(n[1]),g:$r(n[2]),b:$r(n[3]),a:YT(n[4]),format:r?"name":"hex8"}:(n=An.hex6.exec(e))?{r:$r(n[1]),g:$r(n[2]),b:$r(n[3]),format:r?"name":"hex"}:(n=An.hex4.exec(e))?{r:$r(n[1]+""+n[1]),g:$r(n[2]+""+n[2]),b:$r(n[3]+""+n[3]),a:YT(n[4]+""+n[4]),format:r?"name":"hex8"}:(n=An.hex3.exec(e))?{r:$r(n[1]+""+n[1]),g:$r(n[2]+""+n[2]),b:$r(n[3]+""+n[3]),format:r?"name":"hex"}:!1}function DQ(e){var r,n;return e=e||{level:"AA",size:"small"},r=(e.level||"AA").toUpperCase(),n=(e.size||"small").toLowerCase(),r!=="AA"&&r!=="AAA"&&(r="AA"),n!=="small"&&n!=="large"&&(n="small"),{level:r,size:n}}function k2(e,r){(r==null||r>e.length)&&(r=e.length);for(var n=0,a=Array(r);n<r;n++)a[n]=e[n];return a}function LQ(e){if(Array.isArray(e))return k2(e)}function qL(e,r,n){if(typeof e=="function"?e===r:e.has(r))return arguments.length<3?r:n;throw new TypeError("Private element is not present on this object")}function IQ(e,r){if(r.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function zQ(e,r){if(!(e instanceof r))throw new TypeError("Cannot call a class as a function")}function on(e,r){return e.get(qL(e,r))}function XT(e,r,n){IQ(e,r),r.set(e,n)}function WT(e,r,n){return e.set(qL(e,r),n),n}function qQ(e,r){for(var n=0;n<r.length;n++){var a=r[n];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(e,GQ(a.key),a)}}function BQ(e,r,n){return r&&qQ(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function $Q(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function UQ(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
69
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function FQ(e){return LQ(e)||$Q(e)||KQ(e)||UQ()}function HQ(e,r){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var a=n.call(e,r);if(typeof a!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}function GQ(e){var r=HQ(e,"string");return typeof r=="symbol"?r:r+""}function KQ(e,r){if(e){if(typeof e=="string")return k2(e,r);var n={}.toString.call(e).slice(8,-1);return n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set"?Array.from(e):n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?k2(e,r):void 0}}var VQ=123,YQ=function(r){return"#".concat(Math.min(r,Math.pow(2,24)).toString(16).padStart(6,"0"))},BL=function(r,n,a){return(r<<16)+(n<<8)+a},XQ=function(r){var n=Ae(r).toRgb(),a=n.r,i=n.g,o=n.b;return BL(a,i,o)},ZT=function(r,n){return r*VQ%Math.pow(2,n)},po=new WeakMap,Ra=new WeakMap,WQ=(function(){function e(){var r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:6;zQ(this,e),XT(this,po,void 0),XT(this,Ra,void 0),WT(Ra,this,r),this.reset()}return BQ(e,[{key:"reset",value:function(){WT(po,this,["__reserved for background__"])}},{key:"register",value:function(n){if(on(po,this).length>=Math.pow(2,24-on(Ra,this)))return null;var a=on(po,this).length,i=ZT(a,on(Ra,this)),o=YQ(a+(i<<24-on(Ra,this)));return on(po,this).push(n),o}},{key:"lookup",value:function(n){if(!n)return null;var a=typeof n=="string"?XQ(n):BL.apply(void 0,FQ(n));if(!a)return null;var i=a&Math.pow(2,24-on(Ra,this))-1,o=a>>24-on(Ra,this)&Math.pow(2,on(Ra,this))-1;return ZT(i,on(Ra,this))!==o||i>=on(po,this).length?null:on(po,this)[i]}}])})(),Cc,dt,$L,UL,Li,QT,FL,HL,GL,WS,j2,A2,yh={},bh=[],ZQ=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,Sp=Array.isArray;function Zn(e,r){for(var n in r)e[n]=r[n];return e}function ZS(e){e&&e.parentNode&&e.parentNode.removeChild(e)}function QQ(e,r,n){var a,i,o,u={};for(o in r)o=="key"?a=r[o]:o=="ref"?i=r[o]:u[o]=r[o];if(arguments.length>2&&(u.children=arguments.length>3?Cc.call(arguments,2):n),typeof e=="function"&&e.defaultProps!=null)for(o in e.defaultProps)u[o]===void 0&&(u[o]=e.defaultProps[o]);return Ws(e,u,a,i,null)}function Ws(e,r,n,a,i){var o={type:e,props:r,key:n,ref:a,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:i??++$L,__i:-1,__u:0};return i==null&&dt.vnode!=null&&dt.vnode(o),o}function Ep(e){return e.children}function Zd(e,r){this.props=e,this.context=r}function Ql(e,r){if(r==null)return e.__?Ql(e.__,e.__i+1):null;for(var n;r<e.__k.length;r++)if((n=e.__k[r])!=null&&n.__e!=null)return n.__e;return typeof e.type=="function"?Ql(e):null}function JQ(e){if(e.__P&&e.__d){var r=e.__v,n=r.__e,a=[],i=[],o=Zn({},r);o.__v=r.__v+1,dt.vnode&&dt.vnode(o),QS(e.__P,o,r,e.__n,e.__P.namespaceURI,32&r.__u?[n]:null,a,n??Ql(r),!!(32&r.__u),i),o.__v=r.__v,o.__.__k[o.__i]=o,XL(a,o,i),r.__e=r.__=null,o.__e!=n&&KL(o)}}function KL(e){if((e=e.__)!=null&&e.__c!=null)return e.__e=e.__c.base=null,e.__k.some(function(r){if(r!=null&&r.__e!=null)return e.__e=e.__c.base=r.__e}),KL(e)}function JT(e){(!e.__d&&(e.__d=!0)&&Li.push(e)&&!xh.__r++||QT!=dt.debounceRendering)&&((QT=dt.debounceRendering)||FL)(xh)}function xh(){try{for(var e,r=1;Li.length;)Li.length>r&&Li.sort(HL),e=Li.shift(),r=Li.length,JQ(e)}finally{Li.length=xh.__r=0}}function VL(e,r,n,a,i,o,u,c,f,d,h){var m,g,y,x,E,w,_,A=a&&a.__k||bh,O=r.length;for(f=eJ(n,r,A,f,O),m=0;m<O;m++)(y=n.__k[m])!=null&&(g=y.__i!=-1&&A[y.__i]||yh,y.__i=m,w=QS(e,y,g,i,o,u,c,f,d,h),x=y.__e,y.ref&&g.ref!=y.ref&&(g.ref&&JS(g.ref,null,y),h.push(y.ref,y.__c||x,y)),E==null&&x!=null&&(E=x),(_=!!(4&y.__u))||g.__k===y.__k?f=YL(y,f,e,_):typeof y.type=="function"&&w!==void 0?f=w:x&&(f=x.nextSibling),y.__u&=-7);return n.__e=E,f}function eJ(e,r,n,a,i){var o,u,c,f,d,h=n.length,m=h,g=0;for(e.__k=new Array(i),o=0;o<i;o++)(u=r[o])!=null&&typeof u!="boolean"&&typeof u!="function"?(typeof u=="string"||typeof u=="number"||typeof u=="bigint"||u.constructor==String?u=e.__k[o]=Ws(null,u,null,null,null):Sp(u)?u=e.__k[o]=Ws(Ep,{children:u},null,null,null):u.constructor===void 0&&u.__b>0?u=e.__k[o]=Ws(u.type,u.props,u.key,u.ref?u.ref:null,u.__v):e.__k[o]=u,f=o+g,u.__=e,u.__b=e.__b+1,c=null,(d=u.__i=tJ(u,n,f,m))!=-1&&(m--,(c=n[d])&&(c.__u|=2)),c==null||c.__v==null?(d==-1&&(i>h?g--:i<h&&g++),typeof u.type!="function"&&(u.__u|=4)):d!=f&&(d==f-1?g--:d==f+1?g++:(d>f?g--:g++,u.__u|=4))):e.__k[o]=null;if(m)for(o=0;o<h;o++)(c=n[o])!=null&&(2&c.__u)==0&&(c.__e==a&&(a=Ql(c)),ZL(c,c));return a}function YL(e,r,n,a){var i,o;if(typeof e.type=="function"){for(i=e.__k,o=0;i&&o<i.length;o++)i[o]&&(i[o].__=e,r=YL(i[o],r,n,a));return r}e.__e!=r&&(a&&(r&&e.type&&!r.parentNode&&(r=Ql(e)),n.insertBefore(e.__e,r||null)),r=e.__e);do r=r&&r.nextSibling;while(r!=null&&r.nodeType==8);return r}function tJ(e,r,n,a){var i,o,u,c=e.key,f=e.type,d=r[n],h=d!=null&&(2&d.__u)==0;if(d===null&&c==null||h&&c==d.key&&f==d.type)return n;if(a>(h?1:0)){for(i=n-1,o=n+1;i>=0||o<r.length;)if((d=r[u=i>=0?i--:o++])!=null&&(2&d.__u)==0&&c==d.key&&f==d.type)return u}return-1}function e5(e,r,n){r[0]=="-"?e.setProperty(r,n??""):e[r]=n==null?"":typeof n!="number"||ZQ.test(r)?n:n+"px"}function Ad(e,r,n,a,i){var o,u;e:if(r=="style")if(typeof n=="string")e.style.cssText=n;else{if(typeof a=="string"&&(e.style.cssText=a=""),a)for(r in a)n&&r in n||e5(e.style,r,"");if(n)for(r in n)a&&n[r]==a[r]||e5(e.style,r,n[r])}else if(r[0]=="o"&&r[1]=="n")o=r!=(r=r.replace(GL,"$1")),u=r.toLowerCase(),r=u in e||r=="onFocusOut"||r=="onFocusIn"?u.slice(2):r.slice(2),e.l||(e.l={}),e.l[r+o]=n,n?a?n.u=a.u:(n.u=WS,e.addEventListener(r,o?A2:j2,o)):e.removeEventListener(r,o?A2:j2,o);else{if(i=="http://www.w3.org/2000/svg")r=r.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if(r!="width"&&r!="height"&&r!="href"&&r!="list"&&r!="form"&&r!="tabIndex"&&r!="download"&&r!="rowSpan"&&r!="colSpan"&&r!="role"&&r!="popover"&&r in e)try{e[r]=n??"";break e}catch{}typeof n=="function"||(n==null||n===!1&&r[4]!="-"?e.removeAttribute(r):e.setAttribute(r,r=="popover"&&n==1?"":n))}}function t5(e){return function(r){if(this.l){var n=this.l[r.type+e];if(r.t==null)r.t=WS++;else if(r.t<n.u)return;return n(dt.event?dt.event(r):r)}}}function QS(e,r,n,a,i,o,u,c,f,d){var h,m,g,y,x,E,w,_,A,O,T,C,N,M,R,L=r.type;if(r.constructor!==void 0)return null;128&n.__u&&(f=!!(32&n.__u),o=[c=r.__e=n.__e]),(h=dt.__b)&&h(r);e:if(typeof L=="function")try{if(_=r.props,A=L.prototype&&L.prototype.render,O=(h=L.contextType)&&a[h.__c],T=h?O?O.props.value:h.__:a,n.__c?w=(m=r.__c=n.__c).__=m.__E:(A?r.__c=m=new L(_,T):(r.__c=m=new Zd(_,T),m.constructor=L,m.render=nJ),O&&O.sub(m),m.state||(m.state={}),m.__n=a,g=m.__d=!0,m.__h=[],m._sb=[]),A&&m.__s==null&&(m.__s=m.state),A&&L.getDerivedStateFromProps!=null&&(m.__s==m.state&&(m.__s=Zn({},m.__s)),Zn(m.__s,L.getDerivedStateFromProps(_,m.__s))),y=m.props,x=m.state,m.__v=r,g)A&&L.getDerivedStateFromProps==null&&m.componentWillMount!=null&&m.componentWillMount(),A&&m.componentDidMount!=null&&m.__h.push(m.componentDidMount);else{if(A&&L.getDerivedStateFromProps==null&&_!==y&&m.componentWillReceiveProps!=null&&m.componentWillReceiveProps(_,T),r.__v==n.__v||!m.__e&&m.shouldComponentUpdate!=null&&m.shouldComponentUpdate(_,m.__s,T)===!1){r.__v!=n.__v&&(m.props=_,m.state=m.__s,m.__d=!1),r.__e=n.__e,r.__k=n.__k,r.__k.some(function(D){D&&(D.__=r)}),bh.push.apply(m.__h,m._sb),m._sb=[],m.__h.length&&u.push(m);break e}m.componentWillUpdate!=null&&m.componentWillUpdate(_,m.__s,T),A&&m.componentDidUpdate!=null&&m.__h.push(function(){m.componentDidUpdate(y,x,E)})}if(m.context=T,m.props=_,m.__P=e,m.__e=!1,C=dt.__r,N=0,A)m.state=m.__s,m.__d=!1,C&&C(r),h=m.render(m.props,m.state,m.context),bh.push.apply(m.__h,m._sb),m._sb=[];else do m.__d=!1,C&&C(r),h=m.render(m.props,m.state,m.context),m.state=m.__s;while(m.__d&&++N<25);m.state=m.__s,m.getChildContext!=null&&(a=Zn(Zn({},a),m.getChildContext())),A&&!g&&m.getSnapshotBeforeUpdate!=null&&(E=m.getSnapshotBeforeUpdate(y,x)),M=h!=null&&h.type===Ep&&h.key==null?WL(h.props.children):h,c=VL(e,Sp(M)?M:[M],r,n,a,i,o,u,c,f,d),m.base=r.__e,r.__u&=-161,m.__h.length&&u.push(m),w&&(m.__E=m.__=null)}catch(D){if(r.__v=null,f||o!=null)if(D.then){for(r.__u|=f?160:128;c&&c.nodeType==8&&c.nextSibling;)c=c.nextSibling;o[o.indexOf(c)]=null,r.__e=c}else{for(R=o.length;R--;)ZS(o[R]);O2(r)}else r.__e=n.__e,r.__k=n.__k,D.then||O2(r);dt.__e(D,r,n)}else o==null&&r.__v==n.__v?(r.__k=n.__k,r.__e=n.__e):c=r.__e=rJ(n.__e,r,n,a,i,o,u,f,d);return(h=dt.diffed)&&h(r),128&r.__u?void 0:c}function O2(e){e&&(e.__c&&(e.__c.__e=!0),e.__k&&e.__k.some(O2))}function XL(e,r,n){for(var a=0;a<n.length;a++)JS(n[a],n[++a],n[++a]);dt.__c&&dt.__c(r,e),e.some(function(i){try{e=i.__h,i.__h=[],e.some(function(o){o.call(i)})}catch(o){dt.__e(o,i.__v)}})}function WL(e){return typeof e!="object"||e==null||e.__b>0?e:Sp(e)?e.map(WL):Zn({},e)}function rJ(e,r,n,a,i,o,u,c,f){var d,h,m,g,y,x,E,w=n.props||yh,_=r.props,A=r.type;if(A=="svg"?i="http://www.w3.org/2000/svg":A=="math"?i="http://www.w3.org/1998/Math/MathML":i||(i="http://www.w3.org/1999/xhtml"),o!=null){for(d=0;d<o.length;d++)if((y=o[d])&&"setAttribute"in y==!!A&&(A?y.localName==A:y.nodeType==3)){e=y,o[d]=null;break}}if(e==null){if(A==null)return document.createTextNode(_);e=document.createElementNS(i,A,_.is&&_),c&&(dt.__m&&dt.__m(r,o),c=!1),o=null}if(A==null)w===_||c&&e.data==_||(e.data=_);else{if(o=o&&Cc.call(e.childNodes),!c&&o!=null)for(w={},d=0;d<e.attributes.length;d++)w[(y=e.attributes[d]).name]=y.value;for(d in w)y=w[d],d=="dangerouslySetInnerHTML"?m=y:d=="children"||d in _||d=="value"&&"defaultValue"in _||d=="checked"&&"defaultChecked"in _||Ad(e,d,null,y,i);for(d in _)y=_[d],d=="children"?g=y:d=="dangerouslySetInnerHTML"?h=y:d=="value"?x=y:d=="checked"?E=y:c&&typeof y!="function"||w[d]===y||Ad(e,d,y,w[d],i);if(h)c||m&&(h.__html==m.__html||h.__html==e.innerHTML)||(e.innerHTML=h.__html),r.__k=[];else if(m&&(e.innerHTML=""),VL(r.type=="template"?e.content:e,Sp(g)?g:[g],r,n,a,A=="foreignObject"?"http://www.w3.org/1999/xhtml":i,o,u,o?o[0]:n.__k&&Ql(n,0),c,f),o!=null)for(d=o.length;d--;)ZS(o[d]);c||(d="value",A=="progress"&&x==null?e.removeAttribute("value"):x!=null&&(x!==e[d]||A=="progress"&&!x||A=="option"&&x!=w[d])&&Ad(e,d,x,w[d],i),d="checked",E!=null&&E!=e[d]&&Ad(e,d,E,w[d],i))}return e}function JS(e,r,n){try{if(typeof e=="function"){var a=typeof e.__u=="function";a&&e.__u(),a&&r==null||(e.__u=e(r))}else e.current=r}catch(i){dt.__e(i,n)}}function ZL(e,r,n){var a,i;if(dt.unmount&&dt.unmount(e),(a=e.ref)&&(a.current&&a.current!=e.__e||JS(a,null,r)),(a=e.__c)!=null){if(a.componentWillUnmount)try{a.componentWillUnmount()}catch(o){dt.__e(o,r)}a.base=a.__P=null}if(a=e.__k)for(i=0;i<a.length;i++)a[i]&&ZL(a[i],r,n||typeof e.type!="function");n||ZS(e.__e),e.__c=e.__=e.__e=void 0}function nJ(e,r,n){return this.constructor(e,n)}function aJ(e,r,n){var a,i,o,u;r==document&&(r=document.documentElement),dt.__&&dt.__(e,r),i=(a=!1)?null:r.__k,o=[],u=[],QS(r,e=r.__k=QQ(Ep,null,[e]),i||yh,yh,r.namespaceURI,i?null:r.firstChild?Cc.call(r.childNodes):null,o,i?i.__e:r.firstChild,a,u),XL(o,e,u)}function QL(e,r,n){var a,i,o,u,c=Zn({},e.props);for(o in e.type&&e.type.defaultProps&&(u=e.type.defaultProps),r)o=="key"?a=r[o]:o=="ref"?i=r[o]:c[o]=r[o]===void 0&&u!=null?u[o]:r[o];return arguments.length>2&&(c.children=arguments.length>3?Cc.call(arguments,2):n),Ws(e.type,c,a||e.key,i||e.ref,null)}Cc=bh.slice,dt={__e:function(e,r,n,a){for(var i,o,u;r=r.__;)if((i=r.__c)&&!i.__)try{if((o=i.constructor)&&o.getDerivedStateFromError!=null&&(i.setState(o.getDerivedStateFromError(e)),u=i.__d),i.componentDidCatch!=null&&(i.componentDidCatch(e,a||{}),u=i.__d),u)return i.__E=i}catch(c){e=c}throw e}},$L=0,UL=function(e){return e!=null&&e.constructor===void 0},Zd.prototype.setState=function(e,r){var n;n=this.__s!=null&&this.__s!=this.state?this.__s:this.__s=Zn({},this.state),typeof e=="function"&&(e=e(Zn({},n),this.props)),e&&Zn(n,e),e!=null&&this.__v&&(r&&this._sb.push(r),JT(this))},Zd.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),JT(this))},Zd.prototype.render=Ep,Li=[],FL=typeof Promise=="function"?Promise.prototype.then.bind(Promise.resolve()):setTimeout,HL=function(e,r){return e.__v.__b-r.__v.__b},xh.__r=0,GL=/(PointerCapture)$|Capture$/i,WS=0,j2=t5(!1),A2=t5(!0);function r5(e,r){(r==null||r>e.length)&&(r=e.length);for(var n=0,a=Array(r);n<r;n++)a[n]=e[n];return a}function iJ(e){if(Array.isArray(e))return e}function oJ(e,r,n){return(r=dJ(r))in e?Object.defineProperty(e,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[r]=n,e}function lJ(e,r){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var a,i,o,u,c=[],f=!0,d=!1;try{if(o=(n=n.call(e)).next,r!==0)for(;!(f=(a=o.call(n)).done)&&(c.push(a.value),c.length!==r);f=!0);}catch(h){d=!0,i=h}finally{try{if(!f&&n.return!=null&&(u=n.return(),Object(u)!==u))return}finally{if(d)throw i}}return c}}function uJ(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
70
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function n5(e,r){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);r&&(a=a.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,a)}return n}function sJ(e){for(var r=1;r<arguments.length;r++){var n=arguments[r]!=null?arguments[r]:{};r%2?n5(Object(n),!0).forEach(function(a){oJ(e,a,n[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):n5(Object(n)).forEach(function(a){Object.defineProperty(e,a,Object.getOwnPropertyDescriptor(n,a))})}return e}function cJ(e,r){return iJ(e)||lJ(e,r)||hJ(e,r)||uJ()}function fJ(e,r){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var a=n.call(e,r);if(typeof a!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return(r==="string"?String:Number)(e)}function dJ(e){var r=fJ(e,"string");return typeof r=="symbol"?r:r+""}function _h(e){"@babel/helpers - typeof";return _h=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},_h(e)}function hJ(e,r){if(e){if(typeof e=="string")return r5(e,r);var n={}.toString.call(e).slice(8,-1);return n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set"?Array.from(e):n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?r5(e,r):void 0}}var C2=function(r){if(_h(r)!=="object")return r;var n=QL(r);if(n.props){var a;n.props=sJ({},n.props),n!=null&&(a=n.props)!==null&&a!==void 0&&a.children&&(n.props.children=Array.isArray(n.props.children)?n.props.children.map(C2):C2(n.props.children))}return n},pJ=function(r){return UL(QL(r))},mJ=function(r,n){delete n.__k,aJ(C2(r),n)};function vJ(e,r){r===void 0&&(r={});var n=r.insertAt;if(!(typeof document>"u")){var a=document.head||document.getElementsByTagName("head")[0],i=document.createElement("style");i.type="text/css",n==="top"&&a.firstChild?a.insertBefore(i,a.firstChild):a.appendChild(i),i.styleSheet?i.styleSheet.cssText=e:i.appendChild(document.createTextNode(e))}}var gJ=`.float-tooltip-kap {
71
+ position: absolute;
72
+ width: max-content; /* prevent shrinking near right edge */
73
+ max-width: max(50%, 150px);
74
+ padding: 3px 5px;
75
+ border-radius: 3px;
76
+ font: 12px sans-serif;
77
+ color: #eee;
78
+ background: rgba(0,0,0,0.6);
79
+ pointer-events: none;
80
+ }
81
+ `;vJ(gJ);var yJ=XS({props:{content:{default:!1},offsetX:{triggerUpdate:!1},offsetY:{triggerUpdate:!1}},init:function(r,n){var a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},i=a.style,o=i===void 0?{}:i,u=!!r&&_h(r)==="object"&&!!r.node&&typeof r.node=="function",c=dn(u?r.node():r);c.style("position")==="static"&&c.style("position","relative"),n.tooltipEl=c.append("div").attr("class","float-tooltip-kap"),Object.entries(o).forEach(function(d){var h=cJ(d,2),m=h[0],g=h[1];return n.tooltipEl.style(m,g)}),n.tooltipEl.style("left","-10000px").style("display","none");var f="tooltip-".concat(Math.round(Math.random()*1e12));n.mouseInside=!1,c.on("mousemove.".concat(f),function(d){n.mouseInside=!0;var h=Yn(d),m=c.node(),g=m.offsetWidth,y=m.offsetHeight,x=[n.offsetX===null||n.offsetX===void 0?"-".concat(h[0]/g*100,"%"):typeof n.offsetX=="number"?"calc(-50% + ".concat(n.offsetX,"px)"):n.offsetX,n.offsetY===null||n.offsetY===void 0?y>130&&y-h[1]<100?"calc(-100% - 6px)":"21px":typeof n.offsetY=="number"?n.offsetY<0?"calc(-100% - ".concat(Math.abs(n.offsetY),"px)"):"".concat(n.offsetY,"px"):n.offsetY];n.tooltipEl.style("left",h[0]+"px").style("top",h[1]+"px").style("transform","translate(".concat(x.join(","),")")),n.content&&n.tooltipEl.style("display","inline")}),c.on("mouseover.".concat(f),function(){n.mouseInside=!0,n.content&&n.tooltipEl.style("display","inline")}),c.on("mouseout.".concat(f),function(){n.mouseInside=!1,n.tooltipEl.style("display","none")})},update:function(r){r.tooltipEl.style("display",r.content&&r.mouseInside?"inline":"none"),r.content?r.content instanceof HTMLElement?(r.tooltipEl.text(""),r.tooltipEl.append(function(){return r.content})):typeof r.content=="string"?r.tooltipEl.html(r.content):pJ(r.content)?(r.tooltipEl.text(""),mJ(r.content,r.tooltipEl.node())):(r.tooltipEl.style("display","none"),console.warn("Tooltip content is invalid, skipping.",r.content,r.content.toString())):r.tooltipEl.text("")}});function bJ(e,r,n){var a,i=1;e==null&&(e=0),r==null&&(r=0),n==null&&(n=0);function o(){var u,c=a.length,f,d=0,h=0,m=0;for(u=0;u<c;++u)f=a[u],d+=f.x||0,h+=f.y||0,m+=f.z||0;for(d=(d/c-e)*i,h=(h/c-r)*i,m=(m/c-n)*i,u=0;u<c;++u)f=a[u],d&&(f.x-=d),h&&(f.y-=h),m&&(f.z-=m)}return o.initialize=function(u){a=u},o.x=function(u){return arguments.length?(e=+u,o):e},o.y=function(u){return arguments.length?(r=+u,o):r},o.z=function(u){return arguments.length?(n=+u,o):n},o.strength=function(u){return arguments.length?(i=+u,o):i},o}function xJ(e){const r=+this._x.call(null,e);return JL(this.cover(r),r,e)}function JL(e,r,n){if(isNaN(r))return e;var a,i=e._root,o={data:n},u=e._x0,c=e._x1,f,d,h,m,g;if(!i)return e._root=o,e;for(;i.length;)if((h=r>=(f=(u+c)/2))?u=f:c=f,a=i,!(i=i[m=+h]))return a[m]=o,e;if(d=+e._x.call(null,i.data),r===d)return o.next=i,a?a[m]=o:e._root=o,e;do a=a?a[m]=new Array(2):e._root=new Array(2),(h=r>=(f=(u+c)/2))?u=f:c=f;while((m=+h)==(g=+(d>=f)));return a[g]=i,a[m]=o,e}function _J(e){Array.isArray(e)||(e=Array.from(e));const r=e.length,n=new Float64Array(r);let a=1/0,i=-1/0;for(let o=0,u;o<r;++o)isNaN(u=+this._x.call(null,e[o]))||(n[o]=u,u<a&&(a=u),u>i&&(i=u));if(a>i)return this;this.cover(a).cover(i);for(let o=0;o<r;++o)JL(this,n[o],e[o]);return this}function wJ(e){if(isNaN(e=+e))return this;var r=this._x0,n=this._x1;if(isNaN(r))n=(r=Math.floor(e))+1;else{for(var a=n-r||1,i=this._root,o,u;r>e||e>=n;)switch(u=+(e<r),o=new Array(2),o[u]=i,i=o,a*=2,u){case 0:n=r+a;break;case 1:r=n-a;break}this._root&&this._root.length&&(this._root=i)}return this._x0=r,this._x1=n,this}function SJ(){var e=[];return this.visit(function(r){if(!r.length)do e.push(r.data);while(r=r.next)}),e}function EJ(e){return arguments.length?this.cover(+e[0][0]).cover(+e[1][0]):isNaN(this._x0)?void 0:[[this._x0],[this._x1]]}function Ua(e,r,n){this.node=e,this.x0=r,this.x1=n}function kJ(e,r){var n,a=this._x0,i,o,u=this._x1,c=[],f=this._root,d,h;for(f&&c.push(new Ua(f,a,u)),r==null?r=1/0:(a=e-r,u=e+r);d=c.pop();)if(!(!(f=d.node)||(i=d.x0)>u||(o=d.x1)<a))if(f.length){var m=(i+o)/2;c.push(new Ua(f[1],m,o),new Ua(f[0],i,m)),(h=+(e>=m))&&(d=c[c.length-1],c[c.length-1]=c[c.length-1-h],c[c.length-1-h]=d)}else{var g=Math.abs(e-+this._x.call(null,f.data));g<r&&(r=g,a=e-g,u=e+g,n=f.data)}return n}function jJ(e){if(isNaN(f=+this._x.call(null,e)))return this;var r,n=this._root,a,i,o,u=this._x0,c=this._x1,f,d,h,m,g;if(!n)return this;if(n.length)for(;;){if((h=f>=(d=(u+c)/2))?u=d:c=d,r=n,!(n=n[m=+h]))return this;if(!n.length)break;r[m+1&1]&&(a=r,g=m)}for(;n.data!==e;)if(i=n,!(n=n.next))return this;return(o=n.next)&&delete n.next,i?(o?i.next=o:delete i.next,this):r?(o?r[m]=o:delete r[m],(n=r[0]||r[1])&&n===(r[1]||r[0])&&!n.length&&(a?a[g]=n:this._root=n),this):(this._root=o,this)}function AJ(e){for(var r=0,n=e.length;r<n;++r)this.remove(e[r]);return this}function OJ(){return this._root}function CJ(){var e=0;return this.visit(function(r){if(!r.length)do++e;while(r=r.next)}),e}function TJ(e){var r=[],n,a=this._root,i,o,u;for(a&&r.push(new Ua(a,this._x0,this._x1));n=r.pop();)if(!e(a=n.node,o=n.x0,u=n.x1)&&a.length){var c=(o+u)/2;(i=a[1])&&r.push(new Ua(i,c,u)),(i=a[0])&&r.push(new Ua(i,o,c))}return this}function NJ(e){var r=[],n=[],a;for(this._root&&r.push(new Ua(this._root,this._x0,this._x1));a=r.pop();){var i=a.node;if(i.length){var o,u=a.x0,c=a.x1,f=(u+c)/2;(o=i[0])&&r.push(new Ua(o,u,f)),(o=i[1])&&r.push(new Ua(o,f,c))}n.push(a)}for(;a=n.pop();)e(a.node,a.x0,a.x1);return this}function MJ(e){return e[0]}function PJ(e){return arguments.length?(this._x=e,this):this._x}function eE(e,r){var n=new tE(r??MJ,NaN,NaN);return e==null?n:n.addAll(e)}function tE(e,r,n){this._x=e,this._x0=r,this._x1=n,this._root=void 0}function a5(e){for(var r={data:e.data},n=r;e=e.next;)n=n.next={data:e.data};return r}var Mr=eE.prototype=tE.prototype;Mr.copy=function(){var e=new tE(this._x,this._x0,this._x1),r=this._root,n,a;if(!r)return e;if(!r.length)return e._root=a5(r),e;for(n=[{source:r,target:e._root=new Array(2)}];r=n.pop();)for(var i=0;i<2;++i)(a=r.source[i])&&(a.length?n.push({source:a,target:r.target[i]=new Array(2)}):r.target[i]=a5(a));return e};Mr.add=xJ;Mr.addAll=_J;Mr.cover=wJ;Mr.data=SJ;Mr.extent=EJ;Mr.find=kJ;Mr.remove=jJ;Mr.removeAll=AJ;Mr.root=OJ;Mr.size=CJ;Mr.visit=TJ;Mr.visitAfter=NJ;Mr.x=PJ;function RJ(e){const r=+this._x.call(null,e),n=+this._y.call(null,e);return eI(this.cover(r,n),r,n,e)}function eI(e,r,n,a){if(isNaN(r)||isNaN(n))return e;var i,o=e._root,u={data:a},c=e._x0,f=e._y0,d=e._x1,h=e._y1,m,g,y,x,E,w,_,A;if(!o)return e._root=u,e;for(;o.length;)if((E=r>=(m=(c+d)/2))?c=m:d=m,(w=n>=(g=(f+h)/2))?f=g:h=g,i=o,!(o=o[_=w<<1|E]))return i[_]=u,e;if(y=+e._x.call(null,o.data),x=+e._y.call(null,o.data),r===y&&n===x)return u.next=o,i?i[_]=u:e._root=u,e;do i=i?i[_]=new Array(4):e._root=new Array(4),(E=r>=(m=(c+d)/2))?c=m:d=m,(w=n>=(g=(f+h)/2))?f=g:h=g;while((_=w<<1|E)===(A=(x>=g)<<1|y>=m));return i[A]=o,i[_]=u,e}function DJ(e){var r,n,a=e.length,i,o,u=new Array(a),c=new Array(a),f=1/0,d=1/0,h=-1/0,m=-1/0;for(n=0;n<a;++n)isNaN(i=+this._x.call(null,r=e[n]))||isNaN(o=+this._y.call(null,r))||(u[n]=i,c[n]=o,i<f&&(f=i),i>h&&(h=i),o<d&&(d=o),o>m&&(m=o));if(f>h||d>m)return this;for(this.cover(f,d).cover(h,m),n=0;n<a;++n)eI(this,u[n],c[n],e[n]);return this}function LJ(e,r){if(isNaN(e=+e)||isNaN(r=+r))return this;var n=this._x0,a=this._y0,i=this._x1,o=this._y1;if(isNaN(n))i=(n=Math.floor(e))+1,o=(a=Math.floor(r))+1;else{for(var u=i-n||1,c=this._root,f,d;n>e||e>=i||a>r||r>=o;)switch(d=(r<a)<<1|e<n,f=new Array(4),f[d]=c,c=f,u*=2,d){case 0:i=n+u,o=a+u;break;case 1:n=i-u,o=a+u;break;case 2:i=n+u,a=o-u;break;case 3:n=i-u,a=o-u;break}this._root&&this._root.length&&(this._root=c)}return this._x0=n,this._y0=a,this._x1=i,this._y1=o,this}function IJ(){var e=[];return this.visit(function(r){if(!r.length)do e.push(r.data);while(r=r.next)}),e}function zJ(e){return arguments.length?this.cover(+e[0][0],+e[0][1]).cover(+e[1][0],+e[1][1]):isNaN(this._x0)?void 0:[[this._x0,this._y0],[this._x1,this._y1]]}function dr(e,r,n,a,i){this.node=e,this.x0=r,this.y0=n,this.x1=a,this.y1=i}function qJ(e,r,n){var a,i=this._x0,o=this._y0,u,c,f,d,h=this._x1,m=this._y1,g=[],y=this._root,x,E;for(y&&g.push(new dr(y,i,o,h,m)),n==null?n=1/0:(i=e-n,o=r-n,h=e+n,m=r+n,n*=n);x=g.pop();)if(!(!(y=x.node)||(u=x.x0)>h||(c=x.y0)>m||(f=x.x1)<i||(d=x.y1)<o))if(y.length){var w=(u+f)/2,_=(c+d)/2;g.push(new dr(y[3],w,_,f,d),new dr(y[2],u,_,w,d),new dr(y[1],w,c,f,_),new dr(y[0],u,c,w,_)),(E=(r>=_)<<1|e>=w)&&(x=g[g.length-1],g[g.length-1]=g[g.length-1-E],g[g.length-1-E]=x)}else{var A=e-+this._x.call(null,y.data),O=r-+this._y.call(null,y.data),T=A*A+O*O;if(T<n){var C=Math.sqrt(n=T);i=e-C,o=r-C,h=e+C,m=r+C,a=y.data}}return a}function BJ(e){if(isNaN(h=+this._x.call(null,e))||isNaN(m=+this._y.call(null,e)))return this;var r,n=this._root,a,i,o,u=this._x0,c=this._y0,f=this._x1,d=this._y1,h,m,g,y,x,E,w,_;if(!n)return this;if(n.length)for(;;){if((x=h>=(g=(u+f)/2))?u=g:f=g,(E=m>=(y=(c+d)/2))?c=y:d=y,r=n,!(n=n[w=E<<1|x]))return this;if(!n.length)break;(r[w+1&3]||r[w+2&3]||r[w+3&3])&&(a=r,_=w)}for(;n.data!==e;)if(i=n,!(n=n.next))return this;return(o=n.next)&&delete n.next,i?(o?i.next=o:delete i.next,this):r?(o?r[w]=o:delete r[w],(n=r[0]||r[1]||r[2]||r[3])&&n===(r[3]||r[2]||r[1]||r[0])&&!n.length&&(a?a[_]=n:this._root=n),this):(this._root=o,this)}function $J(e){for(var r=0,n=e.length;r<n;++r)this.remove(e[r]);return this}function UJ(){return this._root}function FJ(){var e=0;return this.visit(function(r){if(!r.length)do++e;while(r=r.next)}),e}function HJ(e){var r=[],n,a=this._root,i,o,u,c,f;for(a&&r.push(new dr(a,this._x0,this._y0,this._x1,this._y1));n=r.pop();)if(!e(a=n.node,o=n.x0,u=n.y0,c=n.x1,f=n.y1)&&a.length){var d=(o+c)/2,h=(u+f)/2;(i=a[3])&&r.push(new dr(i,d,h,c,f)),(i=a[2])&&r.push(new dr(i,o,h,d,f)),(i=a[1])&&r.push(new dr(i,d,u,c,h)),(i=a[0])&&r.push(new dr(i,o,u,d,h))}return this}function GJ(e){var r=[],n=[],a;for(this._root&&r.push(new dr(this._root,this._x0,this._y0,this._x1,this._y1));a=r.pop();){var i=a.node;if(i.length){var o,u=a.x0,c=a.y0,f=a.x1,d=a.y1,h=(u+f)/2,m=(c+d)/2;(o=i[0])&&r.push(new dr(o,u,c,h,m)),(o=i[1])&&r.push(new dr(o,h,c,f,m)),(o=i[2])&&r.push(new dr(o,u,m,h,d)),(o=i[3])&&r.push(new dr(o,h,m,f,d))}n.push(a)}for(;a=n.pop();)e(a.node,a.x0,a.y0,a.x1,a.y1);return this}function KJ(e){return e[0]}function VJ(e){return arguments.length?(this._x=e,this):this._x}function YJ(e){return e[1]}function XJ(e){return arguments.length?(this._y=e,this):this._y}function rE(e,r,n){var a=new nE(r??KJ,n??YJ,NaN,NaN,NaN,NaN);return e==null?a:a.addAll(e)}function nE(e,r,n,a,i,o){this._x=e,this._y=r,this._x0=n,this._y0=a,this._x1=i,this._y1=o,this._root=void 0}function i5(e){for(var r={data:e.data},n=r;e=e.next;)n=n.next={data:e.data};return r}var vr=rE.prototype=nE.prototype;vr.copy=function(){var e=new nE(this._x,this._y,this._x0,this._y0,this._x1,this._y1),r=this._root,n,a;if(!r)return e;if(!r.length)return e._root=i5(r),e;for(n=[{source:r,target:e._root=new Array(4)}];r=n.pop();)for(var i=0;i<4;++i)(a=r.source[i])&&(a.length?n.push({source:a,target:r.target[i]=new Array(4)}):r.target[i]=i5(a));return e};vr.add=RJ;vr.addAll=DJ;vr.cover=LJ;vr.data=IJ;vr.extent=zJ;vr.find=qJ;vr.remove=BJ;vr.removeAll=$J;vr.root=UJ;vr.size=FJ;vr.visit=HJ;vr.visitAfter=GJ;vr.x=VJ;vr.y=XJ;function WJ(e){const r=+this._x.call(null,e),n=+this._y.call(null,e),a=+this._z.call(null,e);return tI(this.cover(r,n,a),r,n,a,e)}function tI(e,r,n,a,i){if(isNaN(r)||isNaN(n)||isNaN(a))return e;var o,u=e._root,c={data:i},f=e._x0,d=e._y0,h=e._z0,m=e._x1,g=e._y1,y=e._z1,x,E,w,_,A,O,T,C,N,M,R;if(!u)return e._root=c,e;for(;u.length;)if((T=r>=(x=(f+m)/2))?f=x:m=x,(C=n>=(E=(d+g)/2))?d=E:g=E,(N=a>=(w=(h+y)/2))?h=w:y=w,o=u,!(u=u[M=N<<2|C<<1|T]))return o[M]=c,e;if(_=+e._x.call(null,u.data),A=+e._y.call(null,u.data),O=+e._z.call(null,u.data),r===_&&n===A&&a===O)return c.next=u,o?o[M]=c:e._root=c,e;do o=o?o[M]=new Array(8):e._root=new Array(8),(T=r>=(x=(f+m)/2))?f=x:m=x,(C=n>=(E=(d+g)/2))?d=E:g=E,(N=a>=(w=(h+y)/2))?h=w:y=w;while((M=N<<2|C<<1|T)===(R=(O>=w)<<2|(A>=E)<<1|_>=x));return o[R]=u,o[M]=c,e}function ZJ(e){Array.isArray(e)||(e=Array.from(e));const r=e.length,n=new Float64Array(r),a=new Float64Array(r),i=new Float64Array(r);let o=1/0,u=1/0,c=1/0,f=-1/0,d=-1/0,h=-1/0;for(let m=0,g,y,x,E;m<r;++m)isNaN(y=+this._x.call(null,g=e[m]))||isNaN(x=+this._y.call(null,g))||isNaN(E=+this._z.call(null,g))||(n[m]=y,a[m]=x,i[m]=E,y<o&&(o=y),y>f&&(f=y),x<u&&(u=x),x>d&&(d=x),E<c&&(c=E),E>h&&(h=E));if(o>f||u>d||c>h)return this;this.cover(o,u,c).cover(f,d,h);for(let m=0;m<r;++m)tI(this,n[m],a[m],i[m],e[m]);return this}function QJ(e,r,n){if(isNaN(e=+e)||isNaN(r=+r)||isNaN(n=+n))return this;var a=this._x0,i=this._y0,o=this._z0,u=this._x1,c=this._y1,f=this._z1;if(isNaN(a))u=(a=Math.floor(e))+1,c=(i=Math.floor(r))+1,f=(o=Math.floor(n))+1;else{for(var d=u-a||1,h=this._root,m,g;a>e||e>=u||i>r||r>=c||o>n||n>=f;)switch(g=(n<o)<<2|(r<i)<<1|e<a,m=new Array(8),m[g]=h,h=m,d*=2,g){case 0:u=a+d,c=i+d,f=o+d;break;case 1:a=u-d,c=i+d,f=o+d;break;case 2:u=a+d,i=c-d,f=o+d;break;case 3:a=u-d,i=c-d,f=o+d;break;case 4:u=a+d,c=i+d,o=f-d;break;case 5:a=u-d,c=i+d,o=f-d;break;case 6:u=a+d,i=c-d,o=f-d;break;case 7:a=u-d,i=c-d,o=f-d;break}this._root&&this._root.length&&(this._root=h)}return this._x0=a,this._y0=i,this._z0=o,this._x1=u,this._y1=c,this._z1=f,this}function JJ(){var e=[];return this.visit(function(r){if(!r.length)do e.push(r.data);while(r=r.next)}),e}function eee(e){return arguments.length?this.cover(+e[0][0],+e[0][1],+e[0][2]).cover(+e[1][0],+e[1][1],+e[1][2]):isNaN(this._x0)?void 0:[[this._x0,this._y0,this._z0],[this._x1,this._y1,this._z1]]}function tt(e,r,n,a,i,o,u){this.node=e,this.x0=r,this.y0=n,this.z0=a,this.x1=i,this.y1=o,this.z1=u}function tee(e,r,n,a){var i,o=this._x0,u=this._y0,c=this._z0,f,d,h,m,g,y,x=this._x1,E=this._y1,w=this._z1,_=[],A=this._root,O,T;for(A&&_.push(new tt(A,o,u,c,x,E,w)),a==null?a=1/0:(o=e-a,u=r-a,c=n-a,x=e+a,E=r+a,w=n+a,a*=a);O=_.pop();)if(!(!(A=O.node)||(f=O.x0)>x||(d=O.y0)>E||(h=O.z0)>w||(m=O.x1)<o||(g=O.y1)<u||(y=O.z1)<c))if(A.length){var C=(f+m)/2,N=(d+g)/2,M=(h+y)/2;_.push(new tt(A[7],C,N,M,m,g,y),new tt(A[6],f,N,M,C,g,y),new tt(A[5],C,d,M,m,N,y),new tt(A[4],f,d,M,C,N,y),new tt(A[3],C,N,h,m,g,M),new tt(A[2],f,N,h,C,g,M),new tt(A[1],C,d,h,m,N,M),new tt(A[0],f,d,h,C,N,M)),(T=(n>=M)<<2|(r>=N)<<1|e>=C)&&(O=_[_.length-1],_[_.length-1]=_[_.length-1-T],_[_.length-1-T]=O)}else{var R=e-+this._x.call(null,A.data),L=r-+this._y.call(null,A.data),D=n-+this._z.call(null,A.data),z=R*R+L*L+D*D;if(z<a){var q=Math.sqrt(a=z);o=e-q,u=r-q,c=n-q,x=e+q,E=r+q,w=n+q,i=A.data}}return i}const ree=(e,r,n,a,i,o)=>Math.sqrt((e-a)**2+(r-i)**2+(n-o)**2);function nee(e,r,n,a){const i=[],o=e-a,u=r-a,c=n-a,f=e+a,d=r+a,h=n+a;return this.visit((m,g,y,x,E,w,_)=>{if(!m.length)do{const A=m.data;ree(e,r,n,this._x(A),this._y(A),this._z(A))<=a&&i.push(A)}while(m=m.next);return g>f||y>d||x>h||E<o||w<u||_<c}),i}function aee(e){if(isNaN(g=+this._x.call(null,e))||isNaN(y=+this._y.call(null,e))||isNaN(x=+this._z.call(null,e)))return this;var r,n=this._root,a,i,o,u=this._x0,c=this._y0,f=this._z0,d=this._x1,h=this._y1,m=this._z1,g,y,x,E,w,_,A,O,T,C,N;if(!n)return this;if(n.length)for(;;){if((A=g>=(E=(u+d)/2))?u=E:d=E,(O=y>=(w=(c+h)/2))?c=w:h=w,(T=x>=(_=(f+m)/2))?f=_:m=_,r=n,!(n=n[C=T<<2|O<<1|A]))return this;if(!n.length)break;(r[C+1&7]||r[C+2&7]||r[C+3&7]||r[C+4&7]||r[C+5&7]||r[C+6&7]||r[C+7&7])&&(a=r,N=C)}for(;n.data!==e;)if(i=n,!(n=n.next))return this;return(o=n.next)&&delete n.next,i?(o?i.next=o:delete i.next,this):r?(o?r[C]=o:delete r[C],(n=r[0]||r[1]||r[2]||r[3]||r[4]||r[5]||r[6]||r[7])&&n===(r[7]||r[6]||r[5]||r[4]||r[3]||r[2]||r[1]||r[0])&&!n.length&&(a?a[N]=n:this._root=n),this):(this._root=o,this)}function iee(e){for(var r=0,n=e.length;r<n;++r)this.remove(e[r]);return this}function oee(){return this._root}function lee(){var e=0;return this.visit(function(r){if(!r.length)do++e;while(r=r.next)}),e}function uee(e){var r=[],n,a=this._root,i,o,u,c,f,d,h;for(a&&r.push(new tt(a,this._x0,this._y0,this._z0,this._x1,this._y1,this._z1));n=r.pop();)if(!e(a=n.node,o=n.x0,u=n.y0,c=n.z0,f=n.x1,d=n.y1,h=n.z1)&&a.length){var m=(o+f)/2,g=(u+d)/2,y=(c+h)/2;(i=a[7])&&r.push(new tt(i,m,g,y,f,d,h)),(i=a[6])&&r.push(new tt(i,o,g,y,m,d,h)),(i=a[5])&&r.push(new tt(i,m,u,y,f,g,h)),(i=a[4])&&r.push(new tt(i,o,u,y,m,g,h)),(i=a[3])&&r.push(new tt(i,m,g,c,f,d,y)),(i=a[2])&&r.push(new tt(i,o,g,c,m,d,y)),(i=a[1])&&r.push(new tt(i,m,u,c,f,g,y)),(i=a[0])&&r.push(new tt(i,o,u,c,m,g,y))}return this}function see(e){var r=[],n=[],a;for(this._root&&r.push(new tt(this._root,this._x0,this._y0,this._z0,this._x1,this._y1,this._z1));a=r.pop();){var i=a.node;if(i.length){var o,u=a.x0,c=a.y0,f=a.z0,d=a.x1,h=a.y1,m=a.z1,g=(u+d)/2,y=(c+h)/2,x=(f+m)/2;(o=i[0])&&r.push(new tt(o,u,c,f,g,y,x)),(o=i[1])&&r.push(new tt(o,g,c,f,d,y,x)),(o=i[2])&&r.push(new tt(o,u,y,f,g,h,x)),(o=i[3])&&r.push(new tt(o,g,y,f,d,h,x)),(o=i[4])&&r.push(new tt(o,u,c,x,g,y,m)),(o=i[5])&&r.push(new tt(o,g,c,x,d,y,m)),(o=i[6])&&r.push(new tt(o,u,y,x,g,h,m)),(o=i[7])&&r.push(new tt(o,g,y,x,d,h,m))}n.push(a)}for(;a=n.pop();)e(a.node,a.x0,a.y0,a.z0,a.x1,a.y1,a.z1);return this}function cee(e){return e[0]}function fee(e){return arguments.length?(this._x=e,this):this._x}function dee(e){return e[1]}function hee(e){return arguments.length?(this._y=e,this):this._y}function pee(e){return e[2]}function mee(e){return arguments.length?(this._z=e,this):this._z}function aE(e,r,n,a){var i=new iE(r??cee,n??dee,a??pee,NaN,NaN,NaN,NaN,NaN,NaN);return e==null?i:i.addAll(e)}function iE(e,r,n,a,i,o,u,c,f){this._x=e,this._y=r,this._z=n,this._x0=a,this._y0=i,this._z0=o,this._x1=u,this._y1=c,this._z1=f,this._root=void 0}function o5(e){for(var r={data:e.data},n=r;e=e.next;)n=n.next={data:e.data};return r}var tr=aE.prototype=iE.prototype;tr.copy=function(){var e=new iE(this._x,this._y,this._z,this._x0,this._y0,this._z0,this._x1,this._y1,this._z1),r=this._root,n,a;if(!r)return e;if(!r.length)return e._root=o5(r),e;for(n=[{source:r,target:e._root=new Array(8)}];r=n.pop();)for(var i=0;i<8;++i)(a=r.source[i])&&(a.length?n.push({source:a,target:r.target[i]=new Array(8)}):r.target[i]=o5(a));return e};tr.add=WJ;tr.addAll=ZJ;tr.cover=QJ;tr.data=JJ;tr.extent=eee;tr.find=tee;tr.findAllWithinRadius=nee;tr.remove=aee;tr.removeAll=iee;tr.root=oee;tr.size=lee;tr.visit=uee;tr.visitAfter=see;tr.x=fee;tr.y=hee;tr.z=mee;function hr(e){return function(){return e}}function fn(e){return(e()-.5)*1e-6}function ny(e){return e.x+e.vx}function l5(e){return e.y+e.vy}function vee(e){return e.z+e.vz}function gee(e){var r,n,a,i,o=1,u=1;typeof e!="function"&&(e=hr(e==null?1:+e));function c(){for(var h,m=r.length,g,y,x,E,w,_,A,O=0;O<u;++O)for(g=(n===1?eE(r,ny):n===2?rE(r,ny,l5):n===3?aE(r,ny,l5,vee):null).visitAfter(f),h=0;h<m;++h)y=r[h],_=a[y.index],A=_*_,x=y.x+y.vx,n>1&&(E=y.y+y.vy),n>2&&(w=y.z+y.vz),g.visit(T);function T(C,N,M,R,L,D,z){var q=[N,M,R,L,D,z],G=q[0],U=q[1],Y=q[2],$=q[n],J=q[n+1],re=q[n+2],oe=C.data,fe=C.r,F=_+fe;if(oe){if(oe.index>y.index){var Z=x-oe.x-oe.vx,ce=n>1?E-oe.y-oe.vy:0,B=n>2?w-oe.z-oe.vz:0,H=Z*Z+ce*ce+B*B;H<F*F&&(Z===0&&(Z=fn(i),H+=Z*Z),n>1&&ce===0&&(ce=fn(i),H+=ce*ce),n>2&&B===0&&(B=fn(i),H+=B*B),H=(F-(H=Math.sqrt(H)))/H*o,y.vx+=(Z*=H)*(F=(fe*=fe)/(A+fe)),n>1&&(y.vy+=(ce*=H)*F),n>2&&(y.vz+=(B*=H)*F),oe.vx-=Z*(F=1-F),n>1&&(oe.vy-=ce*F),n>2&&(oe.vz-=B*F))}return}return G>x+F||$<x-F||n>1&&(U>E+F||J<E-F)||n>2&&(Y>w+F||re<w-F)}}function f(h){if(h.data)return h.r=a[h.data.index];for(var m=h.r=0;m<Math.pow(2,n);++m)h[m]&&h[m].r>h.r&&(h.r=h[m].r)}function d(){if(r){var h,m=r.length,g;for(a=new Array(m),h=0;h<m;++h)g=r[h],a[g.index]=+e(g,h,r)}}return c.initialize=function(h,...m){r=h,i=m.find(g=>typeof g=="function")||Math.random,n=m.find(g=>[1,2,3].includes(g))||2,d()},c.iterations=function(h){return arguments.length?(u=+h,c):u},c.strength=function(h){return arguments.length?(o=+h,c):o},c.radius=function(h){return arguments.length?(e=typeof h=="function"?h:hr(+h),d(),c):e},c}function yee(e){return e.index}function u5(e,r){var n=e.get(r);if(!n)throw new Error("node not found: "+r);return n}function bee(e){var r=yee,n=g,a,i=hr(30),o,u,c,f,d,h,m=1;e==null&&(e=[]);function g(_){return 1/Math.min(f[_.source.index],f[_.target.index])}function y(_){for(var A=0,O=e.length;A<m;++A)for(var T=0,C,N,M,R=0,L=0,D=0,z,q;T<O;++T)C=e[T],N=C.source,M=C.target,R=M.x+M.vx-N.x-N.vx||fn(h),c>1&&(L=M.y+M.vy-N.y-N.vy||fn(h)),c>2&&(D=M.z+M.vz-N.z-N.vz||fn(h)),z=Math.sqrt(R*R+L*L+D*D),z=(z-o[T])/z*_*a[T],R*=z,L*=z,D*=z,M.vx-=R*(q=d[T]),c>1&&(M.vy-=L*q),c>2&&(M.vz-=D*q),N.vx+=R*(q=1-q),c>1&&(N.vy+=L*q),c>2&&(N.vz+=D*q)}function x(){if(u){var _,A=u.length,O=e.length,T=new Map(u.map((N,M)=>[r(N,M,u),N])),C;for(_=0,f=new Array(A);_<O;++_)C=e[_],C.index=_,typeof C.source!="object"&&(C.source=u5(T,C.source)),typeof C.target!="object"&&(C.target=u5(T,C.target)),f[C.source.index]=(f[C.source.index]||0)+1,f[C.target.index]=(f[C.target.index]||0)+1;for(_=0,d=new Array(O);_<O;++_)C=e[_],d[_]=f[C.source.index]/(f[C.source.index]+f[C.target.index]);a=new Array(O),E(),o=new Array(O),w()}}function E(){if(u)for(var _=0,A=e.length;_<A;++_)a[_]=+n(e[_],_,e)}function w(){if(u)for(var _=0,A=e.length;_<A;++_)o[_]=+i(e[_],_,e)}return y.initialize=function(_,...A){u=_,h=A.find(O=>typeof O=="function")||Math.random,c=A.find(O=>[1,2,3].includes(O))||2,x()},y.links=function(_){return arguments.length?(e=_,x(),y):e},y.id=function(_){return arguments.length?(r=_,y):r},y.iterations=function(_){return arguments.length?(m=+_,y):m},y.strength=function(_){return arguments.length?(n=typeof _=="function"?_:hr(+_),E(),y):n},y.distance=function(_){return arguments.length?(i=typeof _=="function"?_:hr(+_),w(),y):i},y}const xee=1664525,_ee=1013904223,s5=4294967296;function wee(){let e=1;return()=>(e=(xee*e+_ee)%s5)/s5}var c5=3;function ay(e){return e.x}function f5(e){return e.y}function See(e){return e.z}var Eee=10,kee=Math.PI*(3-Math.sqrt(5)),jee=Math.PI*20/(9+Math.sqrt(221));function Aee(e,r){r=r||2;var n=Math.min(c5,Math.max(1,Math.round(r))),a,i=1,o=.001,u=1-Math.pow(o,1/300),c=0,f=.6,d=new Map,h=HS(y),m=jc("tick","end"),g=wee();e==null&&(e=[]);function y(){x(),m.call("tick",a),i<o&&(h.stop(),m.call("end",a))}function x(_){var A,O=e.length,T;_===void 0&&(_=1);for(var C=0;C<_;++C)for(i+=(c-i)*u,d.forEach(function(N){N(i)}),A=0;A<O;++A)T=e[A],T.fx==null?T.x+=T.vx*=f:(T.x=T.fx,T.vx=0),n>1&&(T.fy==null?T.y+=T.vy*=f:(T.y=T.fy,T.vy=0)),n>2&&(T.fz==null?T.z+=T.vz*=f:(T.z=T.fz,T.vz=0));return a}function E(){for(var _=0,A=e.length,O;_<A;++_){if(O=e[_],O.index=_,O.fx!=null&&(O.x=O.fx),O.fy!=null&&(O.y=O.fy),O.fz!=null&&(O.z=O.fz),isNaN(O.x)||n>1&&isNaN(O.y)||n>2&&isNaN(O.z)){var T=Eee*(n>2?Math.cbrt(.5+_):n>1?Math.sqrt(.5+_):_),C=_*kee,N=_*jee;n===1?O.x=T:n===2?(O.x=T*Math.cos(C),O.y=T*Math.sin(C)):(O.x=T*Math.sin(C)*Math.cos(N),O.y=T*Math.cos(C),O.z=T*Math.sin(C)*Math.sin(N))}(isNaN(O.vx)||n>1&&isNaN(O.vy)||n>2&&isNaN(O.vz))&&(O.vx=0,n>1&&(O.vy=0),n>2&&(O.vz=0))}}function w(_){return _.initialize&&_.initialize(e,g,n),_}return E(),a={tick:x,restart:function(){return h.restart(y),a},stop:function(){return h.stop(),a},numDimensions:function(_){return arguments.length?(n=Math.min(c5,Math.max(1,Math.round(_))),d.forEach(w),a):n},nodes:function(_){return arguments.length?(e=_,E(),d.forEach(w),a):e},alpha:function(_){return arguments.length?(i=+_,a):i},alphaMin:function(_){return arguments.length?(o=+_,a):o},alphaDecay:function(_){return arguments.length?(u=+_,a):+u},alphaTarget:function(_){return arguments.length?(c=+_,a):c},velocityDecay:function(_){return arguments.length?(f=1-_,a):1-f},randomSource:function(_){return arguments.length?(g=_,d.forEach(w),a):g},force:function(_,A){return arguments.length>1?(A==null?d.delete(_):d.set(_,w(A)),a):d.get(_)},find:function(){var _=Array.prototype.slice.call(arguments),A=_.shift()||0,O=(n>1?_.shift():null)||0,T=(n>2?_.shift():null)||0,C=_.shift()||1/0,N=0,M=e.length,R,L,D,z,q,G;for(C*=C,N=0;N<M;++N)q=e[N],R=A-q.x,L=O-(q.y||0),D=T-(q.z||0),z=R*R+L*L+D*D,z<C&&(G=q,C=z);return G},on:function(_,A){return arguments.length>1?(m.on(_,A),a):m.on(_)}}}function Oee(){var e,r,n,a,i,o=hr(-30),u,c=1,f=1/0,d=.81;function h(x){var E,w=e.length,_=(r===1?eE(e,ay):r===2?rE(e,ay,f5):r===3?aE(e,ay,f5,See):null).visitAfter(g);for(i=x,E=0;E<w;++E)n=e[E],_.visit(y)}function m(){if(e){var x,E=e.length,w;for(u=new Array(E),x=0;x<E;++x)w=e[x],u[w.index]=+o(w,x,e)}}function g(x){var E=0,w,_,A=0,O,T,C,N,M=x.length;if(M){for(O=T=C=N=0;N<M;++N)(w=x[N])&&(_=Math.abs(w.value))&&(E+=w.value,A+=_,O+=_*(w.x||0),T+=_*(w.y||0),C+=_*(w.z||0));E*=Math.sqrt(4/M),x.x=O/A,r>1&&(x.y=T/A),r>2&&(x.z=C/A)}else{w=x,w.x=w.data.x,r>1&&(w.y=w.data.y),r>2&&(w.z=w.data.z);do E+=u[w.data.index];while(w=w.next)}x.value=E}function y(x,E,w,_,A){if(!x.value)return!0;var O=[w,_,A][r-1],T=x.x-n.x,C=r>1?x.y-n.y:0,N=r>2?x.z-n.z:0,M=O-E,R=T*T+C*C+N*N;if(M*M/d<R)return R<f&&(T===0&&(T=fn(a),R+=T*T),r>1&&C===0&&(C=fn(a),R+=C*C),r>2&&N===0&&(N=fn(a),R+=N*N),R<c&&(R=Math.sqrt(c*R)),n.vx+=T*x.value*i/R,r>1&&(n.vy+=C*x.value*i/R),r>2&&(n.vz+=N*x.value*i/R)),!0;if(x.length||R>=f)return;(x.data!==n||x.next)&&(T===0&&(T=fn(a),R+=T*T),r>1&&C===0&&(C=fn(a),R+=C*C),r>2&&N===0&&(N=fn(a),R+=N*N),R<c&&(R=Math.sqrt(c*R)));do x.data!==n&&(M=u[x.data.index]*i/R,n.vx+=T*M,r>1&&(n.vy+=C*M),r>2&&(n.vz+=N*M));while(x=x.next)}return h.initialize=function(x,...E){e=x,a=E.find(w=>typeof w=="function")||Math.random,r=E.find(w=>[1,2,3].includes(w))||2,m()},h.strength=function(x){return arguments.length?(o=typeof x=="function"?x:hr(+x),m(),h):o},h.distanceMin=function(x){return arguments.length?(c=x*x,h):Math.sqrt(c)},h.distanceMax=function(x){return arguments.length?(f=x*x,h):Math.sqrt(f)},h.theta=function(x){return arguments.length?(d=x*x,h):Math.sqrt(d)},h}function Cee(e,r,n,a){var i,o,u=hr(.1),c,f;typeof e!="function"&&(e=hr(+e)),r==null&&(r=0),n==null&&(n=0),a==null&&(a=0);function d(m){for(var g=0,y=i.length;g<y;++g){var x=i[g],E=x.x-r||1e-6,w=(x.y||0)-n||1e-6,_=(x.z||0)-a||1e-6,A=Math.sqrt(E*E+w*w+_*_),O=(f[g]-A)*c[g]*m/A;x.vx+=E*O,o>1&&(x.vy+=w*O),o>2&&(x.vz+=_*O)}}function h(){if(i){var m,g=i.length;for(c=new Array(g),f=new Array(g),m=0;m<g;++m)f[m]=+e(i[m],m,i),c[m]=isNaN(f[m])?0:+u(i[m],m,i)}}return d.initialize=function(m,...g){i=m,o=g.find(y=>[1,2,3].includes(y))||2,h()},d.strength=function(m){return arguments.length?(u=typeof m=="function"?m:hr(+m),h(),d):u},d.radius=function(m){return arguments.length?(e=typeof m=="function"?m:hr(+m),h(),d):e},d.x=function(m){return arguments.length?(r=+m,d):r},d.y=function(m){return arguments.length?(n=+m,d):n},d.z=function(m){return arguments.length?(a=+m,d):a},d}function Tee(e){var r=hr(.1),n,a,i;typeof e!="function"&&(e=hr(e==null?0:+e));function o(c){for(var f=0,d=n.length,h;f<d;++f)h=n[f],h.vy+=(i[f]-h.y)*a[f]*c}function u(){if(n){var c,f=n.length;for(a=new Array(f),i=new Array(f),c=0;c<f;++c)a[c]=isNaN(i[c]=+e(n[c],c,n))?0:+r(n[c],c,n)}}return o.initialize=function(c){n=c,u()},o.strength=function(c){return arguments.length?(r=typeof c=="function"?c:hr(+c),u(),o):r},o.y=function(c){return arguments.length?(e=typeof c=="function"?c:hr(+c),u(),o):e},o}const{abs:Es,cos:Da,sin:Rl,acos:Nee,atan2:ks,sqrt:Pi,pow:cn}=Math;function js(e){return e<0?-cn(-e,1/3):cn(e,1/3)}const rI=Math.PI,Od=2*rI,Ri=rI/2,Mee=1e-6,iy=Number.MAX_SAFE_INTEGER||9007199254740991,oy=Number.MIN_SAFE_INTEGER||-9007199254740991,Pee={x:0,y:0,z:0},xe={Tvalues:[-.06405689286260563,.06405689286260563,-.1911188674736163,.1911188674736163,-.3150426796961634,.3150426796961634,-.4337935076260451,.4337935076260451,-.5454214713888396,.5454214713888396,-.6480936519369755,.6480936519369755,-.7401241915785544,.7401241915785544,-.820001985973903,.820001985973903,-.8864155270044011,.8864155270044011,-.9382745520027328,.9382745520027328,-.9747285559713095,.9747285559713095,-.9951872199970213,.9951872199970213],Cvalues:[.12793819534675216,.12793819534675216,.1258374563468283,.1258374563468283,.12167047292780339,.12167047292780339,.1155056680537256,.1155056680537256,.10744427011596563,.10744427011596563,.09761865210411388,.09761865210411388,.08619016153195327,.08619016153195327,.0733464814110803,.0733464814110803,.05929858491543678,.05929858491543678,.04427743881741981,.04427743881741981,.028531388628933663,.028531388628933663,.0123412297999872,.0123412297999872],arcfn:function(e,r){const n=r(e);let a=n.x*n.x+n.y*n.y;return typeof n.z<"u"&&(a+=n.z*n.z),Pi(a)},compute:function(e,r,n){if(e===0)return r[0].t=0,r[0];const a=r.length-1;if(e===1)return r[a].t=1,r[a];const i=1-e;let o=r;if(a===0)return r[0].t=e,r[0];if(a===1){const c={x:i*o[0].x+e*o[1].x,y:i*o[0].y+e*o[1].y,t:e};return n&&(c.z=i*o[0].z+e*o[1].z),c}if(a<4){let c=i*i,f=e*e,d,h,m,g=0;a===2?(o=[o[0],o[1],o[2],Pee],d=c,h=i*e*2,m=f):a===3&&(d=c*i,h=c*e*3,m=i*f*3,g=e*f);const y={x:d*o[0].x+h*o[1].x+m*o[2].x+g*o[3].x,y:d*o[0].y+h*o[1].y+m*o[2].y+g*o[3].y,t:e};return n&&(y.z=d*o[0].z+h*o[1].z+m*o[2].z+g*o[3].z),y}const u=JSON.parse(JSON.stringify(r));for(;u.length>1;){for(let c=0;c<u.length-1;c++)u[c]={x:u[c].x+(u[c+1].x-u[c].x)*e,y:u[c].y+(u[c+1].y-u[c].y)*e},typeof u[c].z<"u"&&(u[c].z=u[c].z+(u[c+1].z-u[c].z)*e);u.splice(u.length-1,1)}return u[0].t=e,u[0]},computeWithRatios:function(e,r,n,a){const i=1-e,o=n,u=r;let c=o[0],f=o[1],d=o[2],h=o[3],m;if(c*=i,f*=e,u.length===2)return m=c+f,{x:(c*u[0].x+f*u[1].x)/m,y:(c*u[0].y+f*u[1].y)/m,z:a?(c*u[0].z+f*u[1].z)/m:!1,t:e};if(c*=i,f*=2*i,d*=e*e,u.length===3)return m=c+f+d,{x:(c*u[0].x+f*u[1].x+d*u[2].x)/m,y:(c*u[0].y+f*u[1].y+d*u[2].y)/m,z:a?(c*u[0].z+f*u[1].z+d*u[2].z)/m:!1,t:e};if(c*=i,f*=1.5*i,d*=3*i,h*=e*e*e,u.length===4)return m=c+f+d+h,{x:(c*u[0].x+f*u[1].x+d*u[2].x+h*u[3].x)/m,y:(c*u[0].y+f*u[1].y+d*u[2].y+h*u[3].y)/m,z:a?(c*u[0].z+f*u[1].z+d*u[2].z+h*u[3].z)/m:!1,t:e}},derive:function(e,r){const n=[];for(let a=e,i=a.length,o=i-1;i>1;i--,o--){const u=[];for(let c=0,f;c<o;c++)f={x:o*(a[c+1].x-a[c].x),y:o*(a[c+1].y-a[c].y)},r&&(f.z=o*(a[c+1].z-a[c].z)),u.push(f);n.push(u),a=u}return n},between:function(e,r,n){return r<=e&&e<=n||xe.approximately(e,r)||xe.approximately(e,n)},approximately:function(e,r,n){return Es(e-r)<=(n||Mee)},length:function(e){const n=xe.Tvalues.length;let a=0;for(let i=0,o;i<n;i++)o=.5*xe.Tvalues[i]+.5,a+=xe.Cvalues[i]*xe.arcfn(o,e);return .5*a},map:function(e,r,n,a,i){const o=n-r,u=i-a,c=e-r,f=c/o;return a+u*f},lerp:function(e,r,n){const a={x:r.x+e*(n.x-r.x),y:r.y+e*(n.y-r.y)};return r.z!==void 0&&n.z!==void 0&&(a.z=r.z+e*(n.z-r.z)),a},pointToString:function(e){let r=e.x+"/"+e.y;return typeof e.z<"u"&&(r+="/"+e.z),r},pointsToString:function(e){return"["+e.map(xe.pointToString).join(", ")+"]"},copy:function(e){return JSON.parse(JSON.stringify(e))},angle:function(e,r,n){const a=r.x-e.x,i=r.y-e.y,o=n.x-e.x,u=n.y-e.y,c=a*u-i*o,f=a*o+i*u;return ks(c,f)},round:function(e,r){const n=""+e,a=n.indexOf(".");return parseFloat(n.substring(0,a+1+r))},dist:function(e,r){const n=e.x-r.x,a=e.y-r.y;return Pi(n*n+a*a)},closest:function(e,r){let n=cn(2,63),a,i;return e.forEach(function(o,u){i=xe.dist(r,o),i<n&&(n=i,a=u)}),{mdist:n,mpos:a}},abcratio:function(e,r){if(r!==2&&r!==3)return!1;if(typeof e>"u")e=.5;else if(e===0||e===1)return e;const n=cn(e,r)+cn(1-e,r),a=n-1;return Es(a/n)},projectionratio:function(e,r){if(r!==2&&r!==3)return!1;if(typeof e>"u")e=.5;else if(e===0||e===1)return e;const n=cn(1-e,r),a=cn(e,r)+n;return n/a},lli8:function(e,r,n,a,i,o,u,c){const f=(e*a-r*n)*(i-u)-(e-n)*(i*c-o*u),d=(e*a-r*n)*(o-c)-(r-a)*(i*c-o*u),h=(e-n)*(o-c)-(r-a)*(i-u);return h==0?!1:{x:f/h,y:d/h}},lli4:function(e,r,n,a){const i=e.x,o=e.y,u=r.x,c=r.y,f=n.x,d=n.y,h=a.x,m=a.y;return xe.lli8(i,o,u,c,f,d,h,m)},lli:function(e,r){return xe.lli4(e,e.c,r,r.c)},makeline:function(e,r){return new lt(e.x,e.y,(e.x+r.x)/2,(e.y+r.y)/2,r.x,r.y)},findbbox:function(e){let r=iy,n=iy,a=oy,i=oy;return e.forEach(function(o){const u=o.bbox();r>u.x.min&&(r=u.x.min),n>u.y.min&&(n=u.y.min),a<u.x.max&&(a=u.x.max),i<u.y.max&&(i=u.y.max)}),{x:{min:r,mid:(r+a)/2,max:a,size:a-r},y:{min:n,mid:(n+i)/2,max:i,size:i-n}}},shapeintersections:function(e,r,n,a,i){if(!xe.bboxoverlap(r,a))return[];const o=[],u=[e.startcap,e.forward,e.back,e.endcap],c=[n.startcap,n.forward,n.back,n.endcap];return u.forEach(function(f){f.virtual||c.forEach(function(d){if(d.virtual)return;const h=f.intersects(d,i);h.length>0&&(h.c1=f,h.c2=d,h.s1=e,h.s2=n,o.push(h))})}),o},makeshape:function(e,r,n){const a=r.points.length,i=e.points.length,o=xe.makeline(r.points[a-1],e.points[0]),u=xe.makeline(e.points[i-1],r.points[0]),c={startcap:o,forward:e,back:r,endcap:u,bbox:xe.findbbox([o,e,r,u])};return c.intersections=function(f){return xe.shapeintersections(c,c.bbox,f,f.bbox,n)},c},getminmax:function(e,r,n){if(!n)return{min:0,max:0};let a=iy,i=oy,o,u;n.indexOf(0)===-1&&(n=[0].concat(n)),n.indexOf(1)===-1&&n.push(1);for(let c=0,f=n.length;c<f;c++)o=n[c],u=e.get(o),u[r]<a&&(a=u[r]),u[r]>i&&(i=u[r]);return{min:a,mid:(a+i)/2,max:i,size:i-a}},align:function(e,r){const n=r.p1.x,a=r.p1.y,i=-ks(r.p2.y-a,r.p2.x-n),o=function(u){return{x:(u.x-n)*Da(i)-(u.y-a)*Rl(i),y:(u.x-n)*Rl(i)+(u.y-a)*Da(i)}};return e.map(o)},roots:function(e,r){r=r||{p1:{x:0,y:0},p2:{x:1,y:0}};const n=e.length-1,a=xe.align(e,r),i=function(M){return 0<=M&&M<=1};if(n===2){const M=a[0].y,R=a[1].y,L=a[2].y,D=M-2*R+L;if(D!==0){const z=-Pi(R*R-M*L),q=-M+R,G=-(z+q)/D,U=-(-z+q)/D;return[G,U].filter(i)}else if(R!==L&&D===0)return[(2*R-L)/(2*R-2*L)].filter(i);return[]}const o=a[0].y,u=a[1].y,c=a[2].y,f=a[3].y;let d=-o+3*u-3*c+f,h=3*o-6*u+3*c,m=-3*o+3*u,g=o;if(xe.approximately(d,0)){if(xe.approximately(h,0))return xe.approximately(m,0)?[]:[-g/m].filter(i);const M=Pi(m*m-4*h*g),R=2*h;return[(M-m)/R,(-m-M)/R].filter(i)}h/=d,m/=d,g/=d;const y=(3*m-h*h)/3,x=y/3,E=(2*h*h*h-9*h*m+27*g)/27,w=E/2,_=w*w+x*x*x;let A,O,T,C,N;if(_<0){const M=-y/3,R=M*M*M,L=Pi(R),D=-E/(2*L),z=D<-1?-1:D>1?1:D,q=Nee(z),G=js(L),U=2*G;return T=U*Da(q/3)-h/3,C=U*Da((q+Od)/3)-h/3,N=U*Da((q+2*Od)/3)-h/3,[T,C,N].filter(i)}else{if(_===0)return A=w<0?js(-w):-js(w),T=2*A-h/3,C=-A-h/3,[T,C].filter(i);{const M=Pi(_);return A=js(-w+M),O=js(w+M),[A-O-h/3].filter(i)}}},droots:function(e){if(e.length===3){const r=e[0],n=e[1],a=e[2],i=r-2*n+a;if(i!==0){const o=-Pi(n*n-r*a),u=-r+n,c=-(o+u)/i,f=-(-o+u)/i;return[c,f]}else if(n!==a&&i===0)return[(2*n-a)/(2*(n-a))];return[]}if(e.length===2){const r=e[0],n=e[1];return r!==n?[r/(r-n)]:[]}return[]},curvature:function(e,r,n,a,i){let o,u,c,f,d=0,h=0;const m=xe.compute(e,r),g=xe.compute(e,n),y=m.x*m.x+m.y*m.y;if(a?(o=Pi(cn(m.y*g.z-g.y*m.z,2)+cn(m.z*g.x-g.z*m.x,2)+cn(m.x*g.y-g.x*m.y,2)),u=cn(y+m.z*m.z,3/2)):(o=m.x*g.y-m.y*g.x,u=cn(y,3/2)),o===0||u===0)return{k:0,r:0};if(d=o/u,h=u/o,!i){const x=xe.curvature(e-.001,r,n,a,!0).k,E=xe.curvature(e+.001,r,n,a,!0).k;f=(E-d+(d-x))/2,c=(Es(E-d)+Es(d-x))/2}return{k:d,r:h,dk:f,adk:c}},inflections:function(e){if(e.length<4)return[];const r=xe.align(e,{p1:e[0],p2:e.slice(-1)[0]}),n=r[2].x*r[1].y,a=r[3].x*r[1].y,i=r[1].x*r[2].y,o=r[3].x*r[2].y,u=18*(-3*n+2*a+3*i-o),c=18*(3*n-a-3*i),f=18*(i-n);if(xe.approximately(u,0)){if(!xe.approximately(c,0)){let g=-f/c;if(0<=g&&g<=1)return[g]}return[]}const d=2*u;if(xe.approximately(d,0))return[];const h=c*c-4*u*f;if(h<0)return[];const m=Math.sqrt(h);return[(m-c)/d,-(c+m)/d].filter(function(g){return 0<=g&&g<=1})},bboxoverlap:function(e,r){const n=["x","y"],a=n.length;for(let i=0,o,u,c,f;i<a;i++)if(o=n[i],u=e[o].mid,c=r[o].mid,f=(e[o].size+r[o].size)/2,Es(u-c)>=f)return!1;return!0},expandbox:function(e,r){r.x.min<e.x.min&&(e.x.min=r.x.min),r.y.min<e.y.min&&(e.y.min=r.y.min),r.z&&r.z.min<e.z.min&&(e.z.min=r.z.min),r.x.max>e.x.max&&(e.x.max=r.x.max),r.y.max>e.y.max&&(e.y.max=r.y.max),r.z&&r.z.max>e.z.max&&(e.z.max=r.z.max),e.x.mid=(e.x.min+e.x.max)/2,e.y.mid=(e.y.min+e.y.max)/2,e.z&&(e.z.mid=(e.z.min+e.z.max)/2),e.x.size=e.x.max-e.x.min,e.y.size=e.y.max-e.y.min,e.z&&(e.z.size=e.z.max-e.z.min)},pairiteration:function(e,r,n){const a=e.bbox(),i=r.bbox(),o=1e5,u=n||.5;if(a.x.size+a.y.size<u&&i.x.size+i.y.size<u)return[(o*(e._t1+e._t2)/2|0)/o+"/"+(o*(r._t1+r._t2)/2|0)/o];let c=e.split(.5),f=r.split(.5),d=[{left:c.left,right:f.left},{left:c.left,right:f.right},{left:c.right,right:f.right},{left:c.right,right:f.left}];d=d.filter(function(m){return xe.bboxoverlap(m.left.bbox(),m.right.bbox())});let h=[];return d.length===0||(d.forEach(function(m){h=h.concat(xe.pairiteration(m.left,m.right,u))}),h=h.filter(function(m,g){return h.indexOf(m)===g})),h},getccenter:function(e,r,n){const a=r.x-e.x,i=r.y-e.y,o=n.x-r.x,u=n.y-r.y,c=a*Da(Ri)-i*Rl(Ri),f=a*Rl(Ri)+i*Da(Ri),d=o*Da(Ri)-u*Rl(Ri),h=o*Rl(Ri)+u*Da(Ri),m=(e.x+r.x)/2,g=(e.y+r.y)/2,y=(r.x+n.x)/2,x=(r.y+n.y)/2,E=m+c,w=g+f,_=y+d,A=x+h,O=xe.lli8(m,g,E,w,y,x,_,A),T=xe.dist(O,e);let C=ks(e.y-O.y,e.x-O.x),N=ks(r.y-O.y,r.x-O.x),M=ks(n.y-O.y,n.x-O.x),R;return C<M?((C>N||N>M)&&(C+=Od),C>M&&(R=M,M=C,C=R)):M<N&&N<C?(R=M,M=C,C=R):M+=Od,O.s=C,O.e=M,O.r=T,O},numberSort:function(e,r){return e-r}};class Zs{constructor(r){this.curves=[],this._3d=!1,r&&(this.curves=r,this._3d=this.curves[0]._3d)}valueOf(){return this.toString()}toString(){return"["+this.curves.map(function(r){return xe.pointsToString(r.points)}).join(", ")+"]"}addCurve(r){this.curves.push(r),this._3d=this._3d||r._3d}length(){return this.curves.map(function(r){return r.length()}).reduce(function(r,n){return r+n})}curve(r){return this.curves[r]}bbox(){const r=this.curves;for(var n=r[0].bbox(),a=1;a<r.length;a++)xe.expandbox(n,r[a].bbox());return n}offset(r){const n=[];return this.curves.forEach(function(a){n.push(...a.offset(r))}),new Zs(n)}}const{abs:As,min:d5,max:h5,cos:Ree,sin:Dee,acos:Lee,sqrt:Os}=Math,Iee=Math.PI;class lt{constructor(r){let n=r&&r.forEach?r:Array.from(arguments).slice(),a=!1;if(typeof n[0]=="object"){a=n.length;const y=[];n.forEach(function(x){["x","y","z"].forEach(function(E){typeof x[E]<"u"&&y.push(x[E])})}),n=y}let i=!1;const o=n.length;if(a){if(a>4){if(arguments.length!==1)throw new Error("Only new Bezier(point[]) is accepted for 4th and higher order curves");i=!0}}else if(o!==6&&o!==8&&o!==9&&o!==12&&arguments.length!==1)throw new Error("Only new Bezier(point[]) is accepted for 4th and higher order curves");const u=this._3d=!i&&(o===9||o===12)||r&&r[0]&&typeof r[0].z<"u",c=this.points=[];for(let y=0,x=u?3:2;y<o;y+=x){var f={x:n[y],y:n[y+1]};u&&(f.z=n[y+2]),c.push(f)}const d=this.order=c.length-1,h=this.dims=["x","y"];u&&h.push("z"),this.dimlen=h.length;const m=xe.align(c,{p1:c[0],p2:c[d]}),g=xe.dist(c[0],c[d]);this._linear=m.reduce((y,x)=>y+As(x.y),0)<g/50,this._lut=[],this._t1=0,this._t2=1,this.update()}static quadraticFromPoints(r,n,a,i){if(typeof i>"u"&&(i=.5),i===0)return new lt(n,n,a);if(i===1)return new lt(r,n,n);const o=lt.getABC(2,r,n,a,i);return new lt(r,o.A,a)}static cubicFromPoints(r,n,a,i,o){typeof i>"u"&&(i=.5);const u=lt.getABC(3,r,n,a,i);typeof o>"u"&&(o=xe.dist(n,u.C));const c=o*(1-i)/i,f=xe.dist(r,a),d=(a.x-r.x)/f,h=(a.y-r.y)/f,m=o*d,g=o*h,y=c*d,x=c*h,E={x:n.x-m,y:n.y-g},w={x:n.x+y,y:n.y+x},_=u.A,A={x:_.x+(E.x-_.x)/(1-i),y:_.y+(E.y-_.y)/(1-i)},O={x:_.x+(w.x-_.x)/i,y:_.y+(w.y-_.y)/i},T={x:r.x+(A.x-r.x)/i,y:r.y+(A.y-r.y)/i},C={x:a.x+(O.x-a.x)/(1-i),y:a.y+(O.y-a.y)/(1-i)};return new lt(r,T,C,a)}static getUtils(){return xe}getUtils(){return lt.getUtils()}static get PolyBezier(){return Zs}valueOf(){return this.toString()}toString(){return xe.pointsToString(this.points)}toSVG(){if(this._3d)return!1;const r=this.points,n=r[0].x,a=r[0].y,i=["M",n,a,this.order===2?"Q":"C"];for(let o=1,u=r.length;o<u;o++)i.push(r[o].x),i.push(r[o].y);return i.join(" ")}setRatios(r){if(r.length!==this.points.length)throw new Error("incorrect number of ratio values");this.ratios=r,this._lut=[]}verify(){const r=this.coordDigest();r!==this._print&&(this._print=r,this.update())}coordDigest(){return this.points.map(function(r,n){return""+n+r.x+r.y+(r.z?r.z:0)}).join("")}update(){this._lut=[],this.dpoints=xe.derive(this.points,this._3d),this.computedirection()}computedirection(){const r=this.points,n=xe.angle(r[0],r[this.order],r[1]);this.clockwise=n>0}length(){return xe.length(this.derivative.bind(this))}static getABC(r=2,n,a,i,o=.5){const u=xe.projectionratio(o,r),c=1-u,f={x:u*n.x+c*i.x,y:u*n.y+c*i.y},d=xe.abcratio(o,r);return{A:{x:a.x+(a.x-f.x)/d,y:a.y+(a.y-f.y)/d},B:a,C:f,S:n,E:i}}getABC(r,n){n=n||this.get(r);let a=this.points[0],i=this.points[this.order];return lt.getABC(this.order,a,n,i,r)}getLUT(r){if(this.verify(),r=r||100,this._lut.length===r+1)return this._lut;this._lut=[],r++,this._lut=[];for(let n=0,a,i;n<r;n++)i=n/(r-1),a=this.compute(i),a.t=i,this._lut.push(a);return this._lut}on(r,n){n=n||5;const a=this.getLUT(),i=[];for(let o=0,u,c=0;o<a.length;o++)u=a[o],xe.dist(u,r)<n&&(i.push(u),c+=o/a.length);return i.length?t/=i.length:!1}project(r){const n=this.getLUT(),a=n.length-1,i=xe.closest(n,r),o=i.mpos,u=(o-1)/a,c=(o+1)/a,f=.1/a;let d=i.mdist,h=u,m=h,g;d+=1;for(let y;h<c+f;h+=f)g=this.compute(h),y=xe.dist(r,g),y<d&&(d=y,m=h);return m=m<0?0:m>1?1:m,g=this.compute(m),g.t=m,g.d=d,g}get(r){return this.compute(r)}point(r){return this.points[r]}compute(r){return this.ratios?xe.computeWithRatios(r,this.points,this.ratios,this._3d):xe.compute(r,this.points,this._3d,this.ratios)}raise(){const r=this.points,n=[r[0]],a=r.length;for(let i=1,o,u;i<a;i++)o=r[i],u=r[i-1],n[i]={x:(a-i)/a*o.x+i/a*u.x,y:(a-i)/a*o.y+i/a*u.y};return n[a]=r[a-1],new lt(n)}derivative(r){return xe.compute(r,this.dpoints[0],this._3d)}dderivative(r){return xe.compute(r,this.dpoints[1],this._3d)}align(){let r=this.points;return new lt(xe.align(r,{p1:r[0],p2:r[r.length-1]}))}curvature(r){return xe.curvature(r,this.dpoints[0],this.dpoints[1],this._3d)}inflections(){return xe.inflections(this.points)}normal(r){return this._3d?this.__normal3(r):this.__normal2(r)}__normal2(r){const n=this.derivative(r),a=Os(n.x*n.x+n.y*n.y);return{t:r,x:-n.y/a,y:n.x/a}}__normal3(r){const n=this.derivative(r),a=this.derivative(r+.01),i=Os(n.x*n.x+n.y*n.y+n.z*n.z),o=Os(a.x*a.x+a.y*a.y+a.z*a.z);n.x/=i,n.y/=i,n.z/=i,a.x/=o,a.y/=o,a.z/=o;const u={x:a.y*n.z-a.z*n.y,y:a.z*n.x-a.x*n.z,z:a.x*n.y-a.y*n.x},c=Os(u.x*u.x+u.y*u.y+u.z*u.z);u.x/=c,u.y/=c,u.z/=c;const f=[u.x*u.x,u.x*u.y-u.z,u.x*u.z+u.y,u.x*u.y+u.z,u.y*u.y,u.y*u.z-u.x,u.x*u.z-u.y,u.y*u.z+u.x,u.z*u.z];return{t:r,x:f[0]*n.x+f[1]*n.y+f[2]*n.z,y:f[3]*n.x+f[4]*n.y+f[5]*n.z,z:f[6]*n.x+f[7]*n.y+f[8]*n.z}}hull(r){let n=this.points,a=[],i=[],o=0;for(i[o++]=n[0],i[o++]=n[1],i[o++]=n[2],this.order===3&&(i[o++]=n[3]);n.length>1;){a=[];for(let u=0,c,f=n.length-1;u<f;u++)c=xe.lerp(r,n[u],n[u+1]),i[o++]=c,a.push(c);n=a}return i}split(r,n){if(r===0&&n)return this.split(n).left;if(n===1)return this.split(r).right;const a=this.hull(r),i={left:this.order===2?new lt([a[0],a[3],a[5]]):new lt([a[0],a[4],a[7],a[9]]),right:this.order===2?new lt([a[5],a[4],a[2]]):new lt([a[9],a[8],a[6],a[3]]),span:a};return i.left._t1=xe.map(0,0,1,this._t1,this._t2),i.left._t2=xe.map(r,0,1,this._t1,this._t2),i.right._t1=xe.map(r,0,1,this._t1,this._t2),i.right._t2=xe.map(1,0,1,this._t1,this._t2),n?(n=xe.map(n,r,1,0,1),i.right.split(n).left):i}extrema(){const r={};let n=[];return this.dims.forEach((function(a){let i=function(u){return u[a]},o=this.dpoints[0].map(i);r[a]=xe.droots(o),this.order===3&&(o=this.dpoints[1].map(i),r[a]=r[a].concat(xe.droots(o))),r[a]=r[a].filter(function(u){return u>=0&&u<=1}),n=n.concat(r[a].sort(xe.numberSort))}).bind(this)),r.values=n.sort(xe.numberSort).filter(function(a,i){return n.indexOf(a)===i}),r}bbox(){const r=this.extrema(),n={};return this.dims.forEach((function(a){n[a]=xe.getminmax(this,a,r[a])}).bind(this)),n}overlaps(r){const n=this.bbox(),a=r.bbox();return xe.bboxoverlap(n,a)}offset(r,n){if(typeof n<"u"){const a=this.get(r),i=this.normal(r),o={c:a,n:i,x:a.x+i.x*n,y:a.y+i.y*n};return this._3d&&(o.z=a.z+i.z*n),o}if(this._linear){const a=this.normal(0),i=this.points.map(function(o){const u={x:o.x+r*a.x,y:o.y+r*a.y};return o.z&&a.z&&(u.z=o.z+r*a.z),u});return[new lt(i)]}return this.reduce().map(function(a){return a._linear?a.offset(r)[0]:a.scale(r)})}simple(){if(this.order===3){const i=xe.angle(this.points[0],this.points[3],this.points[1]),o=xe.angle(this.points[0],this.points[3],this.points[2]);if(i>0&&o<0||i<0&&o>0)return!1}const r=this.normal(0),n=this.normal(1);let a=r.x*n.x+r.y*n.y;return this._3d&&(a+=r.z*n.z),As(Lee(a))<Iee/3}reduce(){let r,n=0,a=0,i=.01,o,u=[],c=[],f=this.extrema().values;for(f.indexOf(0)===-1&&(f=[0].concat(f)),f.indexOf(1)===-1&&f.push(1),n=f[0],r=1;r<f.length;r++)a=f[r],o=this.split(n,a),o._t1=n,o._t2=a,u.push(o),n=a;return u.forEach(function(d){for(n=0,a=0;a<=1;)for(a=n+i;a<=1+i;a+=i)if(o=d.split(n,a),!o.simple()){if(a-=i,As(n-a)<i)return[];o=d.split(n,a),o._t1=xe.map(n,0,1,d._t1,d._t2),o._t2=xe.map(a,0,1,d._t1,d._t2),c.push(o),n=a;break}n<1&&(o=d.split(n,1),o._t1=xe.map(n,0,1,d._t1,d._t2),o._t2=d._t2,c.push(o))}),c}translate(r,n,a){a=typeof a=="number"?a:n;const i=this.order;let o=this.points.map((u,c)=>(1-c/i)*n+c/i*a);return new lt(this.points.map((u,c)=>({x:u.x+r.x*o[c],y:u.y+r.y*o[c]})))}scale(r){const n=this.order;let a=!1;if(typeof r=="function"&&(a=r),a&&n===2)return this.raise().scale(a);const i=this.clockwise,o=this.points;if(this._linear)return this.translate(this.normal(0),a?a(0):r,a?a(1):r);const u=a?a(0):r,c=a?a(1):r,f=[this.offset(0,10),this.offset(1,10)],d=[],h=xe.lli4(f[0],f[0].c,f[1],f[1].c);if(!h)throw new Error("cannot scale this curve. Try reducing it first.");return[0,1].forEach(function(m){const g=d[m*n]=xe.copy(o[m*n]);g.x+=(m?c:u)*f[m].n.x,g.y+=(m?c:u)*f[m].n.y}),a?([0,1].forEach(function(m){if(!(n===2&&m)){var g=o[m+1],y={x:g.x-h.x,y:g.y-h.y},x=a?a((m+1)/n):r;a&&!i&&(x=-x);var E=Os(y.x*y.x+y.y*y.y);y.x/=E,y.y/=E,d[m+1]={x:g.x+x*y.x,y:g.y+x*y.y}}}),new lt(d)):([0,1].forEach(m=>{if(n===2&&m)return;const g=d[m*n],y=this.derivative(m),x={x:g.x+y.x,y:g.y+y.y};d[m+1]=xe.lli4(g,x,h,o[m+1])}),new lt(d))}outline(r,n,a,i){if(n=n===void 0?r:n,this._linear){const C=this.normal(0),N=this.points[0],M=this.points[this.points.length-1];let R,L,D;a===void 0&&(a=r,i=n),R={x:N.x+C.x*r,y:N.y+C.y*r},D={x:M.x+C.x*a,y:M.y+C.y*a},L={x:(R.x+D.x)/2,y:(R.y+D.y)/2};const z=[R,L,D];R={x:N.x-C.x*n,y:N.y-C.y*n},D={x:M.x-C.x*i,y:M.y-C.y*i},L={x:(R.x+D.x)/2,y:(R.y+D.y)/2};const q=[D,L,R],G=xe.makeline(q[2],z[0]),U=xe.makeline(z[2],q[0]),Y=[G,new lt(z),U,new lt(q)];return new Zs(Y)}const o=this.reduce(),u=o.length,c=[];let f=[],d,h=0,m=this.length();const g=typeof a<"u"&&typeof i<"u";function y(C,N,M,R,L){return function(D){const z=R/M,q=(R+L)/M,G=N-C;return xe.map(D,0,1,C+z*G,C+q*G)}}o.forEach(function(C){const N=C.length();g?(c.push(C.scale(y(r,a,m,h,N))),f.push(C.scale(y(-n,-i,m,h,N)))):(c.push(C.scale(r)),f.push(C.scale(-n))),h+=N}),f=f.map(function(C){return d=C.points,d[3]?C.points=[d[3],d[2],d[1],d[0]]:C.points=[d[2],d[1],d[0]],C}).reverse();const x=c[0].points[0],E=c[u-1].points[c[u-1].points.length-1],w=f[u-1].points[f[u-1].points.length-1],_=f[0].points[0],A=xe.makeline(w,x),O=xe.makeline(E,_),T=[A].concat(c).concat([O]).concat(f);return new Zs(T)}outlineshapes(r,n,a){n=n||r;const i=this.outline(r,n).curves,o=[];for(let u=1,c=i.length;u<c/2;u++){const f=xe.makeshape(i[u],i[c-u],a);f.startcap.virtual=u>1,f.endcap.virtual=u<c/2-1,o.push(f)}return o}intersects(r,n){return r?r.p1&&r.p2?this.lineIntersects(r):(r instanceof lt&&(r=r.reduce()),this.curveintersects(this.reduce(),r,n)):this.selfintersects(n)}lineIntersects(r){const n=d5(r.p1.x,r.p2.x),a=d5(r.p1.y,r.p2.y),i=h5(r.p1.x,r.p2.x),o=h5(r.p1.y,r.p2.y);return xe.roots(this.points,r).filter(u=>{var c=this.get(u);return xe.between(c.x,n,i)&&xe.between(c.y,a,o)})}selfintersects(r){const n=this.reduce(),a=n.length-2,i=[];for(let o=0,u,c,f;o<a;o++)c=n.slice(o,o+1),f=n.slice(o+2),u=this.curveintersects(c,f,r),i.push(...u);return i}curveintersects(r,n,a){const i=[];r.forEach(function(u){n.forEach(function(c){u.overlaps(c)&&i.push({left:u,right:c})})});let o=[];return i.forEach(function(u){const c=xe.pairiteration(u.left,u.right,a);c.length>0&&(o=o.concat(c))}),o}arcs(r){return r=r||.5,this._iterate(r,[])}_error(r,n,a,i){const o=(i-a)/4,u=this.get(a+o),c=this.get(i-o),f=xe.dist(r,n),d=xe.dist(r,u),h=xe.dist(r,c);return As(d-f)+As(h-f)}_iterate(r,n){let a=0,i=1,o;do{o=0,i=1;let u=this.get(a),c,f,d,h,m=!1,g=!1,y,x=i,E=1;do if(g=m,h=d,x=(a+i)/2,c=this.get(x),f=this.get(i),d=xe.getccenter(u,c,f),d.interval={start:a,end:i},m=this._error(d,u,a,i)<=r,y=g&&!m,y||(E=i),m){if(i>=1){if(d.interval.end=E=1,h=d,i>1){let _={x:d.x+d.r*Ree(d.e),y:d.y+d.r*Dee(d.e)};d.e+=xe.angle({x:d.x,y:d.y},_,this.get(1))}break}i=i+(i-a)/2}else i=x;while(!y&&o++<100);if(o>=100)break;h=h||d,n.push(h),a=E}while(i<1);return n}}function T2(e,r){(r==null||r>e.length)&&(r=e.length);for(var n=0,a=Array(r);n<r;n++)a[n]=e[n];return a}function zee(e){if(Array.isArray(e))return e}function qee(e){if(Array.isArray(e))return T2(e)}function Bee(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function $ee(e,r){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var a,i,o,u,c=[],f=!0,d=!1;try{if(o=(n=n.call(e)).next,r!==0)for(;!(f=(a=o.call(n)).done)&&(c.push(a.value),c.length!==r);f=!0);}catch(h){d=!0,i=h}finally{try{if(!f&&n.return!=null&&(u=n.return(),Object(u)!==u))return}finally{if(d)throw i}}return c}}function Uee(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
82
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Fee(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
83
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Hee(e,r){if(e==null)return{};var n,a,i=Gee(e,r);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(a=0;a<o.length;a++)n=o[a],r.includes(n)||{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function Gee(e,r){if(e==null)return{};var n={};for(var a in e)if({}.hasOwnProperty.call(e,a)){if(r.includes(a))continue;n[a]=e[a]}return n}function Kee(e,r){return zee(e)||$ee(e,r)||nI(e,r)||Uee()}function Vee(e){return qee(e)||Bee(e)||nI(e)||Fee()}function Yee(e,r){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var a=n.call(e,r);if(typeof a!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}function Xee(e){var r=Yee(e,"string");return typeof r=="symbol"?r:r+""}function nI(e,r){if(e){if(typeof e=="string")return T2(e,r);var n={}.toString.call(e).slice(8,-1);return n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set"?Array.from(e):n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?T2(e,r):void 0}}var Wee=(function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,a=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1,i=(r instanceof Array?r.length?r:[void 0]:[r]).map(function(c){return{keyAccessor:c,isProp:!(c instanceof Function)}}),o=e.reduce(function(c,f){var d=c,h=f;return i.forEach(function(m,g){var y=m.keyAccessor,x=m.isProp,E;if(x){var w=h,_=w[y],A=Hee(w,[y].map(Xee));E=_,h=A}else E=y(h,g);g+1<i.length?(d.hasOwnProperty(E)||(d[E]={}),d=d[E]):n?(d.hasOwnProperty(E)||(d[E]=[]),d[E].push(h)):d[E]=h}),c},{});n instanceof Function&&(function c(f){var d=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1;d===i.length?Object.keys(f).forEach(function(h){return f[h]=n(f[h])}):Object.values(f).forEach(function(h){return c(h,d+1)})})(o);var u=o;return a&&(u=[],(function c(f){var d=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[];d.length===i.length?u.push({keys:d,vals:f}):Object.entries(f).forEach(function(h){var m=Kee(h,2),g=m[0],y=m[1];return c(y,[].concat(Vee(d),[g]))})})(o),r instanceof Array&&r.length===0&&u.length===1&&(u[0].keys=[])),u});function xn(e,r){switch(arguments.length){case 0:break;case 1:this.range(e);break;default:this.range(r).domain(e);break}return this}function ei(e,r){switch(arguments.length){case 0:break;case 1:{typeof e=="function"?this.interpolator(e):this.range(e);break}default:{this.domain(e),typeof r=="function"?this.interpolator(r):this.range(r);break}}return this}const N2=Symbol("implicit");function kp(){var e=new LT,r=[],n=[],a=N2;function i(o){let u=e.get(o);if(u===void 0){if(a!==N2)return a;e.set(o,u=r.push(o)-1)}return n[u%n.length]}return i.domain=function(o){if(!arguments.length)return r.slice();r=[],e=new LT;for(const u of o)e.has(u)||e.set(u,r.push(u)-1);return i},i.range=function(o){return arguments.length?(n=Array.from(o),i):n.slice()},i.unknown=function(o){return arguments.length?(a=o,i):a},i.copy=function(){return kp(r,n).unknown(a)},xn.apply(i,arguments),i}function oE(){var e=kp().unknown(void 0),r=e.domain,n=e.range,a=0,i=1,o,u,c=!1,f=0,d=0,h=.5;delete e.unknown;function m(){var g=r().length,y=i<a,x=y?i:a,E=y?a:i;o=(E-x)/Math.max(1,g-f+d*2),c&&(o=Math.floor(o)),x+=(E-x-o*(g-f))*h,u=o*(1-f),c&&(x=Math.round(x),u=Math.round(u));var w=CZ(g).map(function(_){return x+o*_});return n(y?w.reverse():w)}return e.domain=function(g){return arguments.length?(r(g),m()):r()},e.range=function(g){return arguments.length?([a,i]=g,a=+a,i=+i,m()):[a,i]},e.rangeRound=function(g){return[a,i]=g,a=+a,i=+i,c=!0,m()},e.bandwidth=function(){return u},e.step=function(){return o},e.round=function(g){return arguments.length?(c=!!g,m()):c},e.padding=function(g){return arguments.length?(f=Math.min(1,d=+g),m()):f},e.paddingInner=function(g){return arguments.length?(f=Math.min(1,g),m()):f},e.paddingOuter=function(g){return arguments.length?(d=+g,m()):d},e.align=function(g){return arguments.length?(h=Math.max(0,Math.min(1,g)),m()):h},e.copy=function(){return oE(r(),[a,i]).round(c).paddingInner(f).paddingOuter(d).align(h)},xn.apply(m(),arguments)}function aI(e){var r=e.copy;return e.padding=e.paddingOuter,delete e.paddingInner,delete e.paddingOuter,e.copy=function(){return aI(r())},e}function Zee(){return aI(oE.apply(null,arguments).paddingInner(1))}function Qee(e){return function(){return e}}function wh(e){return+e}var p5=[0,1];function pr(e){return e}function M2(e,r){return(r-=e=+e)?function(n){return(n-e)/r}:Qee(isNaN(r)?NaN:.5)}function Jee(e,r){var n;return e>r&&(n=e,e=r,r=n),function(a){return Math.max(e,Math.min(r,a))}}function ete(e,r,n){var a=e[0],i=e[1],o=r[0],u=r[1];return i<a?(a=M2(i,a),o=n(u,o)):(a=M2(a,i),o=n(o,u)),function(c){return o(a(c))}}function tte(e,r,n){var a=Math.min(e.length,r.length)-1,i=new Array(a),o=new Array(a),u=-1;for(e[a]<e[0]&&(e=e.slice().reverse(),r=r.slice().reverse());++u<a;)i[u]=M2(e[u],e[u+1]),o[u]=n(r[u],r[u+1]);return function(c){var f=Oc(e,c,1,a)-1;return o[f](i[f](c))}}function Tc(e,r){return r.domain(e.domain()).range(e.range()).interpolate(e.interpolate()).clamp(e.clamp()).unknown(e.unknown())}function jp(){var e=p5,r=p5,n=uu,a,i,o,u=pr,c,f,d;function h(){var g=Math.min(e.length,r.length);return u!==pr&&(u=Jee(e[0],e[g-1])),c=g>2?tte:ete,f=d=null,m}function m(g){return g==null||isNaN(g=+g)?o:(f||(f=c(e.map(a),r,n)))(a(u(g)))}return m.invert=function(g){return u(i((d||(d=c(r,e.map(a),On)))(g)))},m.domain=function(g){return arguments.length?(e=Array.from(g,wh),h()):e.slice()},m.range=function(g){return arguments.length?(r=Array.from(g),h()):r.slice()},m.rangeRound=function(g){return r=Array.from(g),n=US,h()},m.clamp=function(g){return arguments.length?(u=g?!0:pr,h()):u!==pr},m.interpolate=function(g){return arguments.length?(n=g,h()):n},m.unknown=function(g){return arguments.length?(o=g,m):o},function(g,y){return a=g,i=y,h()}}function lE(){return jp()(pr,pr)}function rte(e){return Math.abs(e=Math.round(e))>=1e21?e.toLocaleString("en").replace(/,/g,""):e.toString(10)}function Sh(e,r){if(!isFinite(e)||e===0)return null;var n=(e=r?e.toExponential(r-1):e.toExponential()).indexOf("e"),a=e.slice(0,n);return[a.length>1?a[0]+a.slice(2):a,+e.slice(n+1)]}function Jl(e){return e=Sh(Math.abs(e)),e?e[1]:NaN}function nte(e,r){return function(n,a){for(var i=n.length,o=[],u=0,c=e[0],f=0;i>0&&c>0&&(f+c+1>a&&(c=Math.max(1,a-f)),o.push(n.substring(i-=c,i+c)),!((f+=c+1)>a));)c=e[u=(u+1)%e.length];return o.reverse().join(r)}}function ate(e){return function(r){return r.replace(/[0-9]/g,function(n){return e[+n]})}}var ite=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function ic(e){if(!(r=ite.exec(e)))throw new Error("invalid format: "+e);var r;return new uE({fill:r[1],align:r[2],sign:r[3],symbol:r[4],zero:r[5],width:r[6],comma:r[7],precision:r[8]&&r[8].slice(1),trim:r[9],type:r[10]})}ic.prototype=uE.prototype;function uE(e){this.fill=e.fill===void 0?" ":e.fill+"",this.align=e.align===void 0?">":e.align+"",this.sign=e.sign===void 0?"-":e.sign+"",this.symbol=e.symbol===void 0?"":e.symbol+"",this.zero=!!e.zero,this.width=e.width===void 0?void 0:+e.width,this.comma=!!e.comma,this.precision=e.precision===void 0?void 0:+e.precision,this.trim=!!e.trim,this.type=e.type===void 0?"":e.type+""}uE.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(this.width===void 0?"":Math.max(1,this.width|0))+(this.comma?",":"")+(this.precision===void 0?"":"."+Math.max(0,this.precision|0))+(this.trim?"~":"")+this.type};function ote(e){e:for(var r=e.length,n=1,a=-1,i;n<r;++n)switch(e[n]){case".":a=i=n;break;case"0":a===0&&(a=n),i=n;break;default:if(!+e[n])break e;a>0&&(a=0);break}return a>0?e.slice(0,a)+e.slice(i+1):e}var Eh;function lte(e,r){var n=Sh(e,r);if(!n)return Eh=void 0,e.toPrecision(r);var a=n[0],i=n[1],o=i-(Eh=Math.max(-8,Math.min(8,Math.floor(i/3)))*3)+1,u=a.length;return o===u?a:o>u?a+new Array(o-u+1).join("0"):o>0?a.slice(0,o)+"."+a.slice(o):"0."+new Array(1-o).join("0")+Sh(e,Math.max(0,r+o-1))[0]}function m5(e,r){var n=Sh(e,r);if(!n)return e+"";var a=n[0],i=n[1];return i<0?"0."+new Array(-i).join("0")+a:a.length>i+1?a.slice(0,i+1)+"."+a.slice(i+1):a+new Array(i-a.length+2).join("0")}const v5={"%":(e,r)=>(e*100).toFixed(r),b:e=>Math.round(e).toString(2),c:e=>e+"",d:rte,e:(e,r)=>e.toExponential(r),f:(e,r)=>e.toFixed(r),g:(e,r)=>e.toPrecision(r),o:e=>Math.round(e).toString(8),p:(e,r)=>m5(e*100,r),r:m5,s:lte,X:e=>Math.round(e).toString(16).toUpperCase(),x:e=>Math.round(e).toString(16)};function g5(e){return e}var y5=Array.prototype.map,b5=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function ute(e){var r=e.grouping===void 0||e.thousands===void 0?g5:nte(y5.call(e.grouping,Number),e.thousands+""),n=e.currency===void 0?"":e.currency[0]+"",a=e.currency===void 0?"":e.currency[1]+"",i=e.decimal===void 0?".":e.decimal+"",o=e.numerals===void 0?g5:ate(y5.call(e.numerals,String)),u=e.percent===void 0?"%":e.percent+"",c=e.minus===void 0?"−":e.minus+"",f=e.nan===void 0?"NaN":e.nan+"";function d(m,g){m=ic(m);var y=m.fill,x=m.align,E=m.sign,w=m.symbol,_=m.zero,A=m.width,O=m.comma,T=m.precision,C=m.trim,N=m.type;N==="n"?(O=!0,N="g"):v5[N]||(T===void 0&&(T=12),C=!0,N="g"),(_||y==="0"&&x==="=")&&(_=!0,y="0",x="=");var M=(g&&g.prefix!==void 0?g.prefix:"")+(w==="$"?n:w==="#"&&/[boxX]/.test(N)?"0"+N.toLowerCase():""),R=(w==="$"?a:/[%p]/.test(N)?u:"")+(g&&g.suffix!==void 0?g.suffix:""),L=v5[N],D=/[defgprs%]/.test(N);T=T===void 0?6:/[gprs]/.test(N)?Math.max(1,Math.min(21,T)):Math.max(0,Math.min(20,T));function z(q){var G=M,U=R,Y,$,J;if(N==="c")U=L(q)+U,q="";else{q=+q;var re=q<0||1/q<0;if(q=isNaN(q)?f:L(Math.abs(q),T),C&&(q=ote(q)),re&&+q==0&&E!=="+"&&(re=!1),G=(re?E==="("?E:c:E==="-"||E==="("?"":E)+G,U=(N==="s"&&!isNaN(q)&&Eh!==void 0?b5[8+Eh/3]:"")+U+(re&&E==="("?")":""),D){for(Y=-1,$=q.length;++Y<$;)if(J=q.charCodeAt(Y),48>J||J>57){U=(J===46?i+q.slice(Y+1):q.slice(Y))+U,q=q.slice(0,Y);break}}}O&&!_&&(q=r(q,1/0));var oe=G.length+q.length+U.length,fe=oe<A?new Array(A-oe+1).join(y):"";switch(O&&_&&(q=r(fe+q,fe.length?A-U.length:1/0),fe=""),x){case"<":q=G+q+U+fe;break;case"=":q=G+fe+q+U;break;case"^":q=fe.slice(0,oe=fe.length>>1)+G+q+U+fe.slice(oe);break;default:q=fe+G+q+U;break}return o(q)}return z.toString=function(){return m+""},z}function h(m,g){var y=Math.max(-8,Math.min(8,Math.floor(Jl(g)/3)))*3,x=Math.pow(10,-y),E=d((m=ic(m),m.type="f",m),{suffix:b5[8+y/3]});return function(w){return E(x*w)}}return{format:d,formatPrefix:h}}var Cd,sE,iI;ste({thousands:",",grouping:[3],currency:["$",""]});function ste(e){return Cd=ute(e),sE=Cd.format,iI=Cd.formatPrefix,Cd}function cte(e){return Math.max(0,-Jl(Math.abs(e)))}function fte(e,r){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(Jl(r)/3)))*3-Jl(Math.abs(e)))}function dte(e,r){return e=Math.abs(e),r=Math.abs(r)-e,Math.max(0,Jl(r)-Jl(e))+1}function oI(e,r,n,a){var i=_2(e,r,n),o;switch(a=ic(a??",f"),a.type){case"s":{var u=Math.max(Math.abs(e),Math.abs(r));return a.precision==null&&!isNaN(o=fte(i,u))&&(a.precision=o),iI(a,u)}case"":case"e":case"g":case"p":case"r":{a.precision==null&&!isNaN(o=dte(i,Math.max(Math.abs(e),Math.abs(r))))&&(a.precision=o-(a.type==="e"));break}case"f":case"%":{a.precision==null&&!isNaN(o=cte(i))&&(a.precision=o-(a.type==="%")*2);break}}return sE(a)}function Gi(e){var r=e.domain;return e.ticks=function(n){var a=r();return b2(a[0],a[a.length-1],n??10)},e.tickFormat=function(n,a){var i=r();return oI(i[0],i[i.length-1],n??10,a)},e.nice=function(n){n==null&&(n=10);var a=r(),i=0,o=a.length-1,u=a[i],c=a[o],f,d,h=10;for(c<u&&(d=u,u=c,c=d,d=i,i=o,o=d);h-- >0;){if(d=x2(u,c,n),d===f)return a[i]=u,a[o]=c,r(a);if(d>0)u=Math.floor(u/d)*d,c=Math.ceil(c/d)*d;else if(d<0)u=Math.ceil(u*d)/d,c=Math.floor(c*d)/d;else break;f=d}return e},e}function lI(){var e=lE();return e.copy=function(){return Tc(e,lI())},xn.apply(e,arguments),Gi(e)}function uI(e){var r;function n(a){return a==null||isNaN(a=+a)?r:a}return n.invert=n,n.domain=n.range=function(a){return arguments.length?(e=Array.from(a,wh),n):e.slice()},n.unknown=function(a){return arguments.length?(r=a,n):r},n.copy=function(){return uI(e).unknown(r)},e=arguments.length?Array.from(e,wh):[0,1],Gi(n)}function sI(e,r){e=e.slice();var n=0,a=e.length-1,i=e[n],o=e[a],u;return o<i&&(u=n,n=a,a=u,u=i,i=o,o=u),e[n]=r.floor(i),e[a]=r.ceil(o),e}function x5(e){return Math.log(e)}function _5(e){return Math.exp(e)}function hte(e){return-Math.log(-e)}function pte(e){return-Math.exp(-e)}function mte(e){return isFinite(e)?+("1e"+e):e<0?0:e}function vte(e){return e===10?mte:e===Math.E?Math.exp:r=>Math.pow(e,r)}function gte(e){return e===Math.E?Math.log:e===10&&Math.log10||e===2&&Math.log2||(e=Math.log(e),r=>Math.log(r)/e)}function w5(e){return(r,n)=>-e(-r,n)}function cE(e){const r=e(x5,_5),n=r.domain;let a=10,i,o;function u(){return i=gte(a),o=vte(a),n()[0]<0?(i=w5(i),o=w5(o),e(hte,pte)):e(x5,_5),r}return r.base=function(c){return arguments.length?(a=+c,u()):a},r.domain=function(c){return arguments.length?(n(c),u()):n()},r.ticks=c=>{const f=n();let d=f[0],h=f[f.length-1];const m=h<d;m&&([d,h]=[h,d]);let g=i(d),y=i(h),x,E;const w=c==null?10:+c;let _=[];if(!(a%1)&&y-g<w){if(g=Math.floor(g),y=Math.ceil(y),d>0){for(;g<=y;++g)for(x=1;x<a;++x)if(E=g<0?x/o(-g):x*o(g),!(E<d)){if(E>h)break;_.push(E)}}else for(;g<=y;++g)for(x=a-1;x>=1;--x)if(E=g>0?x/o(-g):x*o(g),!(E<d)){if(E>h)break;_.push(E)}_.length*2<w&&(_=b2(d,h,w))}else _=b2(g,y,Math.min(y-g,w)).map(o);return m?_.reverse():_},r.tickFormat=(c,f)=>{if(c==null&&(c=10),f==null&&(f=a===10?"s":","),typeof f!="function"&&(!(a%1)&&(f=ic(f)).precision==null&&(f.trim=!0),f=sE(f)),c===1/0)return f;const d=Math.max(1,a*c/r.ticks().length);return h=>{let m=h/o(Math.round(i(h)));return m*a<a-.5&&(m*=a),m<=d?f(h):""}},r.nice=()=>n(sI(n(),{floor:c=>o(Math.floor(i(c))),ceil:c=>o(Math.ceil(i(c)))})),r}function cI(){const e=cE(jp()).domain([1,10]);return e.copy=()=>Tc(e,cI()).base(e.base()),xn.apply(e,arguments),e}function S5(e){return function(r){return Math.sign(r)*Math.log1p(Math.abs(r/e))}}function E5(e){return function(r){return Math.sign(r)*Math.expm1(Math.abs(r))*e}}function fE(e){var r=1,n=e(S5(r),E5(r));return n.constant=function(a){return arguments.length?e(S5(r=+a),E5(r)):r},Gi(n)}function fI(){var e=fE(jp());return e.copy=function(){return Tc(e,fI()).constant(e.constant())},xn.apply(e,arguments)}function k5(e){return function(r){return r<0?-Math.pow(-r,e):Math.pow(r,e)}}function yte(e){return e<0?-Math.sqrt(-e):Math.sqrt(e)}function bte(e){return e<0?-e*e:e*e}function dE(e){var r=e(pr,pr),n=1;function a(){return n===1?e(pr,pr):n===.5?e(yte,bte):e(k5(n),k5(1/n))}return r.exponent=function(i){return arguments.length?(n=+i,a()):n},Gi(r)}function hE(){var e=dE(jp());return e.copy=function(){return Tc(e,hE()).exponent(e.exponent())},xn.apply(e,arguments),e}function xte(){return hE.apply(null,arguments).exponent(.5)}function j5(e){return Math.sign(e)*e*e}function _te(e){return Math.sign(e)*Math.sqrt(Math.abs(e))}function dI(){var e=lE(),r=[0,1],n=!1,a;function i(o){var u=_te(e(o));return isNaN(u)?a:n?Math.round(u):u}return i.invert=function(o){return e.invert(j5(o))},i.domain=function(o){return arguments.length?(e.domain(o),i):e.domain()},i.range=function(o){return arguments.length?(e.range((r=Array.from(o,wh)).map(j5)),i):r.slice()},i.rangeRound=function(o){return i.range(o).round(!0)},i.round=function(o){return arguments.length?(n=!!o,i):n},i.clamp=function(o){return arguments.length?(e.clamp(o),i):e.clamp()},i.unknown=function(o){return arguments.length?(a=o,i):a},i.copy=function(){return dI(e.domain(),r).round(n).clamp(e.clamp()).unknown(a)},xn.apply(i,arguments),Gi(i)}function hI(){var e=[],r=[],n=[],a;function i(){var u=0,c=Math.max(1,r.length);for(n=new Array(c-1);++u<c;)n[u-1]=OZ(e,u/c);return o}function o(u){return u==null||isNaN(u=+u)?a:r[Oc(n,u)]}return o.invertExtent=function(u){var c=r.indexOf(u);return c<0?[NaN,NaN]:[c>0?n[c-1]:e[0],c<n.length?n[c]:e[e.length-1]]},o.domain=function(u){if(!arguments.length)return e.slice();e=[];for(let c of u)c!=null&&!isNaN(c=+c)&&e.push(c);return e.sort($i),i()},o.range=function(u){return arguments.length?(r=Array.from(u),i()):r.slice()},o.unknown=function(u){return arguments.length?(a=u,o):a},o.quantiles=function(){return n.slice()},o.copy=function(){return hI().domain(e).range(r).unknown(a)},xn.apply(o,arguments)}function pI(){var e=0,r=1,n=1,a=[.5],i=[0,1],o;function u(f){return f!=null&&f<=f?i[Oc(a,f,0,n)]:o}function c(){var f=-1;for(a=new Array(n);++f<n;)a[f]=((f+1)*r-(f-n)*e)/(n+1);return u}return u.domain=function(f){return arguments.length?([e,r]=f,e=+e,r=+r,c()):[e,r]},u.range=function(f){return arguments.length?(n=(i=Array.from(f)).length-1,c()):i.slice()},u.invertExtent=function(f){var d=i.indexOf(f);return d<0?[NaN,NaN]:d<1?[e,a[0]]:d>=n?[a[n-1],r]:[a[d-1],a[d]]},u.unknown=function(f){return arguments.length&&(o=f),u},u.thresholds=function(){return a.slice()},u.copy=function(){return pI().domain([e,r]).range(i).unknown(o)},xn.apply(Gi(u),arguments)}function mI(){var e=[.5],r=[0,1],n,a=1;function i(o){return o!=null&&o<=o?r[Oc(e,o,0,a)]:n}return i.domain=function(o){return arguments.length?(e=Array.from(o),a=Math.min(e.length,r.length-1),i):e.slice()},i.range=function(o){return arguments.length?(r=Array.from(o),a=Math.min(e.length,r.length-1),i):r.slice()},i.invertExtent=function(o){var u=r.indexOf(o);return[e[u-1],e[u]]},i.unknown=function(o){return arguments.length?(n=o,i):n},i.copy=function(){return mI().domain(e).range(r).unknown(n)},xn.apply(i,arguments)}const ly=new Date,uy=new Date;function Dt(e,r,n,a){function i(o){return e(o=arguments.length===0?new Date:new Date(+o)),o}return i.floor=o=>(e(o=new Date(+o)),o),i.ceil=o=>(e(o=new Date(o-1)),r(o,1),e(o),o),i.round=o=>{const u=i(o),c=i.ceil(o);return o-u<c-o?u:c},i.offset=(o,u)=>(r(o=new Date(+o),u==null?1:Math.floor(u)),o),i.range=(o,u,c)=>{const f=[];if(o=i.ceil(o),c=c==null?1:Math.floor(c),!(o<u)||!(c>0))return f;let d;do f.push(d=new Date(+o)),r(o,c),e(o);while(d<o&&o<u);return f},i.filter=o=>Dt(u=>{if(u>=u)for(;e(u),!o(u);)u.setTime(u-1)},(u,c)=>{if(u>=u)if(c<0)for(;++c<=0;)for(;r(u,-1),!o(u););else for(;--c>=0;)for(;r(u,1),!o(u););}),n&&(i.count=(o,u)=>(ly.setTime(+o),uy.setTime(+u),e(ly),e(uy),Math.floor(n(ly,uy))),i.every=o=>(o=Math.floor(o),!isFinite(o)||!(o>0)?null:o>1?i.filter(a?u=>a(u)%o===0:u=>i.count(0,u)%o===0):i)),i}const kh=Dt(()=>{},(e,r)=>{e.setTime(+e+r)},(e,r)=>r-e);kh.every=e=>(e=Math.floor(e),!isFinite(e)||!(e>0)?null:e>1?Dt(r=>{r.setTime(Math.floor(r/e)*e)},(r,n)=>{r.setTime(+r+n*e)},(r,n)=>(n-r)/e):kh);kh.range;const Ba=1e3,pn=Ba*60,$a=pn*60,Va=$a*24,pE=Va*7,A5=Va*30,sy=Va*365,ko=Dt(e=>{e.setTime(e-e.getMilliseconds())},(e,r)=>{e.setTime(+e+r*Ba)},(e,r)=>(r-e)/Ba,e=>e.getUTCSeconds());ko.range;const mE=Dt(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*Ba)},(e,r)=>{e.setTime(+e+r*pn)},(e,r)=>(r-e)/pn,e=>e.getMinutes());mE.range;const vE=Dt(e=>{e.setUTCSeconds(0,0)},(e,r)=>{e.setTime(+e+r*pn)},(e,r)=>(r-e)/pn,e=>e.getUTCMinutes());vE.range;const gE=Dt(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*Ba-e.getMinutes()*pn)},(e,r)=>{e.setTime(+e+r*$a)},(e,r)=>(r-e)/$a,e=>e.getHours());gE.range;const yE=Dt(e=>{e.setUTCMinutes(0,0,0)},(e,r)=>{e.setTime(+e+r*$a)},(e,r)=>(r-e)/$a,e=>e.getUTCHours());yE.range;const Nc=Dt(e=>e.setHours(0,0,0,0),(e,r)=>e.setDate(e.getDate()+r),(e,r)=>(r-e-(r.getTimezoneOffset()-e.getTimezoneOffset())*pn)/Va,e=>e.getDate()-1);Nc.range;const Ap=Dt(e=>{e.setUTCHours(0,0,0,0)},(e,r)=>{e.setUTCDate(e.getUTCDate()+r)},(e,r)=>(r-e)/Va,e=>e.getUTCDate()-1);Ap.range;const vI=Dt(e=>{e.setUTCHours(0,0,0,0)},(e,r)=>{e.setUTCDate(e.getUTCDate()+r)},(e,r)=>(r-e)/Va,e=>Math.floor(e/Va));vI.range;function $o(e){return Dt(r=>{r.setDate(r.getDate()-(r.getDay()+7-e)%7),r.setHours(0,0,0,0)},(r,n)=>{r.setDate(r.getDate()+n*7)},(r,n)=>(n-r-(n.getTimezoneOffset()-r.getTimezoneOffset())*pn)/pE)}const Op=$o(0),jh=$o(1),wte=$o(2),Ste=$o(3),eu=$o(4),Ete=$o(5),kte=$o(6);Op.range;jh.range;wte.range;Ste.range;eu.range;Ete.range;kte.range;function Uo(e){return Dt(r=>{r.setUTCDate(r.getUTCDate()-(r.getUTCDay()+7-e)%7),r.setUTCHours(0,0,0,0)},(r,n)=>{r.setUTCDate(r.getUTCDate()+n*7)},(r,n)=>(n-r)/pE)}const Cp=Uo(0),Ah=Uo(1),jte=Uo(2),Ate=Uo(3),tu=Uo(4),Ote=Uo(5),Cte=Uo(6);Cp.range;Ah.range;jte.range;Ate.range;tu.range;Ote.range;Cte.range;const bE=Dt(e=>{e.setDate(1),e.setHours(0,0,0,0)},(e,r)=>{e.setMonth(e.getMonth()+r)},(e,r)=>r.getMonth()-e.getMonth()+(r.getFullYear()-e.getFullYear())*12,e=>e.getMonth());bE.range;const xE=Dt(e=>{e.setUTCDate(1),e.setUTCHours(0,0,0,0)},(e,r)=>{e.setUTCMonth(e.getUTCMonth()+r)},(e,r)=>r.getUTCMonth()-e.getUTCMonth()+(r.getUTCFullYear()-e.getUTCFullYear())*12,e=>e.getUTCMonth());xE.range;const Ya=Dt(e=>{e.setMonth(0,1),e.setHours(0,0,0,0)},(e,r)=>{e.setFullYear(e.getFullYear()+r)},(e,r)=>r.getFullYear()-e.getFullYear(),e=>e.getFullYear());Ya.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:Dt(r=>{r.setFullYear(Math.floor(r.getFullYear()/e)*e),r.setMonth(0,1),r.setHours(0,0,0,0)},(r,n)=>{r.setFullYear(r.getFullYear()+n*e)});Ya.range;const Xa=Dt(e=>{e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)},(e,r)=>{e.setUTCFullYear(e.getUTCFullYear()+r)},(e,r)=>r.getUTCFullYear()-e.getUTCFullYear(),e=>e.getUTCFullYear());Xa.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:Dt(r=>{r.setUTCFullYear(Math.floor(r.getUTCFullYear()/e)*e),r.setUTCMonth(0,1),r.setUTCHours(0,0,0,0)},(r,n)=>{r.setUTCFullYear(r.getUTCFullYear()+n*e)});Xa.range;function gI(e,r,n,a,i,o){const u=[[ko,1,Ba],[ko,5,5*Ba],[ko,15,15*Ba],[ko,30,30*Ba],[o,1,pn],[o,5,5*pn],[o,15,15*pn],[o,30,30*pn],[i,1,$a],[i,3,3*$a],[i,6,6*$a],[i,12,12*$a],[a,1,Va],[a,2,2*Va],[n,1,pE],[r,1,A5],[r,3,3*A5],[e,1,sy]];function c(d,h,m){const g=h<d;g&&([d,h]=[h,d]);const y=m&&typeof m.range=="function"?m:f(d,h,m),x=y?y.range(d,+h+1):[];return g?x.reverse():x}function f(d,h,m){const g=Math.abs(h-d)/m,y=YS(([,,w])=>w).right(u,g);if(y===u.length)return e.every(_2(d/sy,h/sy,m));if(y===0)return kh.every(Math.max(_2(d,h,m),1));const[x,E]=u[g/u[y-1][2]<u[y][2]/g?y-1:y];return x.every(E)}return[c,f]}const[Tte,Nte]=gI(Xa,xE,Cp,vI,yE,vE),[Mte,Pte]=gI(Ya,bE,Op,Nc,gE,mE);function cy(e){if(0<=e.y&&e.y<100){var r=new Date(-1,e.m,e.d,e.H,e.M,e.S,e.L);return r.setFullYear(e.y),r}return new Date(e.y,e.m,e.d,e.H,e.M,e.S,e.L)}function fy(e){if(0<=e.y&&e.y<100){var r=new Date(Date.UTC(-1,e.m,e.d,e.H,e.M,e.S,e.L));return r.setUTCFullYear(e.y),r}return new Date(Date.UTC(e.y,e.m,e.d,e.H,e.M,e.S,e.L))}function Cs(e,r,n){return{y:e,m:r,d:n,H:0,M:0,S:0,L:0}}function Rte(e){var r=e.dateTime,n=e.date,a=e.time,i=e.periods,o=e.days,u=e.shortDays,c=e.months,f=e.shortMonths,d=Ts(i),h=Ns(i),m=Ts(o),g=Ns(o),y=Ts(u),x=Ns(u),E=Ts(c),w=Ns(c),_=Ts(f),A=Ns(f),O={a:J,A:re,b:oe,B:fe,c:null,d:P5,e:P5,f:nre,g:hre,G:mre,H:ere,I:tre,j:rre,L:yI,m:are,M:ire,p:F,q:Z,Q:L5,s:I5,S:ore,u:lre,U:ure,V:sre,w:cre,W:fre,x:null,X:null,y:dre,Y:pre,Z:vre,"%":D5},T={a:ce,A:B,b:H,B:te,c:null,d:R5,e:R5,f:xre,g:Tre,G:Mre,H:gre,I:yre,j:bre,L:xI,m:_re,M:wre,p:he,q:ge,Q:L5,s:I5,S:Sre,u:Ere,U:kre,V:jre,w:Are,W:Ore,x:null,X:null,y:Cre,Y:Nre,Z:Pre,"%":D5},C={a:D,A:z,b:q,B:G,c:U,d:N5,e:N5,f:Wte,g:T5,G:C5,H:M5,I:M5,j:Kte,L:Xte,m:Gte,M:Vte,p:L,q:Hte,Q:Qte,s:Jte,S:Yte,u:qte,U:Bte,V:$te,w:zte,W:Ute,x:Y,X:$,y:T5,Y:C5,Z:Fte,"%":Zte};O.x=N(n,O),O.X=N(a,O),O.c=N(r,O),T.x=N(n,T),T.X=N(a,T),T.c=N(r,T);function N(W,le){return function(ye){var K=[],be=-1,ve=0,_e=W.length,$e,Te,at;for(ye instanceof Date||(ye=new Date(+ye));++be<_e;)W.charCodeAt(be)===37&&(K.push(W.slice(ve,be)),(Te=O5[$e=W.charAt(++be)])!=null?$e=W.charAt(++be):Te=$e==="e"?" ":"0",(at=le[$e])&&($e=at(ye,Te)),K.push($e),ve=be+1);return K.push(W.slice(ve,be)),K.join("")}}function M(W,le){return function(ye){var K=Cs(1900,void 0,1),be=R(K,W,ye+="",0),ve,_e;if(be!=ye.length)return null;if("Q"in K)return new Date(K.Q);if("s"in K)return new Date(K.s*1e3+("L"in K?K.L:0));if(le&&!("Z"in K)&&(K.Z=0),"p"in K&&(K.H=K.H%12+K.p*12),K.m===void 0&&(K.m="q"in K?K.q:0),"V"in K){if(K.V<1||K.V>53)return null;"w"in K||(K.w=1),"Z"in K?(ve=fy(Cs(K.y,0,1)),_e=ve.getUTCDay(),ve=_e>4||_e===0?Ah.ceil(ve):Ah(ve),ve=Ap.offset(ve,(K.V-1)*7),K.y=ve.getUTCFullYear(),K.m=ve.getUTCMonth(),K.d=ve.getUTCDate()+(K.w+6)%7):(ve=cy(Cs(K.y,0,1)),_e=ve.getDay(),ve=_e>4||_e===0?jh.ceil(ve):jh(ve),ve=Nc.offset(ve,(K.V-1)*7),K.y=ve.getFullYear(),K.m=ve.getMonth(),K.d=ve.getDate()+(K.w+6)%7)}else("W"in K||"U"in K)&&("w"in K||(K.w="u"in K?K.u%7:"W"in K?1:0),_e="Z"in K?fy(Cs(K.y,0,1)).getUTCDay():cy(Cs(K.y,0,1)).getDay(),K.m=0,K.d="W"in K?(K.w+6)%7+K.W*7-(_e+5)%7:K.w+K.U*7-(_e+6)%7);return"Z"in K?(K.H+=K.Z/100|0,K.M+=K.Z%100,fy(K)):cy(K)}}function R(W,le,ye,K){for(var be=0,ve=le.length,_e=ye.length,$e,Te;be<ve;){if(K>=_e)return-1;if($e=le.charCodeAt(be++),$e===37){if($e=le.charAt(be++),Te=C[$e in O5?le.charAt(be++):$e],!Te||(K=Te(W,ye,K))<0)return-1}else if($e!=ye.charCodeAt(K++))return-1}return K}function L(W,le,ye){var K=d.exec(le.slice(ye));return K?(W.p=h.get(K[0].toLowerCase()),ye+K[0].length):-1}function D(W,le,ye){var K=y.exec(le.slice(ye));return K?(W.w=x.get(K[0].toLowerCase()),ye+K[0].length):-1}function z(W,le,ye){var K=m.exec(le.slice(ye));return K?(W.w=g.get(K[0].toLowerCase()),ye+K[0].length):-1}function q(W,le,ye){var K=_.exec(le.slice(ye));return K?(W.m=A.get(K[0].toLowerCase()),ye+K[0].length):-1}function G(W,le,ye){var K=E.exec(le.slice(ye));return K?(W.m=w.get(K[0].toLowerCase()),ye+K[0].length):-1}function U(W,le,ye){return R(W,r,le,ye)}function Y(W,le,ye){return R(W,n,le,ye)}function $(W,le,ye){return R(W,a,le,ye)}function J(W){return u[W.getDay()]}function re(W){return o[W.getDay()]}function oe(W){return f[W.getMonth()]}function fe(W){return c[W.getMonth()]}function F(W){return i[+(W.getHours()>=12)]}function Z(W){return 1+~~(W.getMonth()/3)}function ce(W){return u[W.getUTCDay()]}function B(W){return o[W.getUTCDay()]}function H(W){return f[W.getUTCMonth()]}function te(W){return c[W.getUTCMonth()]}function he(W){return i[+(W.getUTCHours()>=12)]}function ge(W){return 1+~~(W.getUTCMonth()/3)}return{format:function(W){var le=N(W+="",O);return le.toString=function(){return W},le},parse:function(W){var le=M(W+="",!1);return le.toString=function(){return W},le},utcFormat:function(W){var le=N(W+="",T);return le.toString=function(){return W},le},utcParse:function(W){var le=M(W+="",!0);return le.toString=function(){return W},le}}}var O5={"-":"",_:" ",0:"0"},Ft=/^\s*\d+/,Dte=/^%/,Lte=/[\\^$*+?|[\]().{}]/g;function He(e,r,n){var a=e<0?"-":"",i=(a?-e:e)+"",o=i.length;return a+(o<n?new Array(n-o+1).join(r)+i:i)}function Ite(e){return e.replace(Lte,"\\$&")}function Ts(e){return new RegExp("^(?:"+e.map(Ite).join("|")+")","i")}function Ns(e){return new Map(e.map((r,n)=>[r.toLowerCase(),n]))}function zte(e,r,n){var a=Ft.exec(r.slice(n,n+1));return a?(e.w=+a[0],n+a[0].length):-1}function qte(e,r,n){var a=Ft.exec(r.slice(n,n+1));return a?(e.u=+a[0],n+a[0].length):-1}function Bte(e,r,n){var a=Ft.exec(r.slice(n,n+2));return a?(e.U=+a[0],n+a[0].length):-1}function $te(e,r,n){var a=Ft.exec(r.slice(n,n+2));return a?(e.V=+a[0],n+a[0].length):-1}function Ute(e,r,n){var a=Ft.exec(r.slice(n,n+2));return a?(e.W=+a[0],n+a[0].length):-1}function C5(e,r,n){var a=Ft.exec(r.slice(n,n+4));return a?(e.y=+a[0],n+a[0].length):-1}function T5(e,r,n){var a=Ft.exec(r.slice(n,n+2));return a?(e.y=+a[0]+(+a[0]>68?1900:2e3),n+a[0].length):-1}function Fte(e,r,n){var a=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(r.slice(n,n+6));return a?(e.Z=a[1]?0:-(a[2]+(a[3]||"00")),n+a[0].length):-1}function Hte(e,r,n){var a=Ft.exec(r.slice(n,n+1));return a?(e.q=a[0]*3-3,n+a[0].length):-1}function Gte(e,r,n){var a=Ft.exec(r.slice(n,n+2));return a?(e.m=a[0]-1,n+a[0].length):-1}function N5(e,r,n){var a=Ft.exec(r.slice(n,n+2));return a?(e.d=+a[0],n+a[0].length):-1}function Kte(e,r,n){var a=Ft.exec(r.slice(n,n+3));return a?(e.m=0,e.d=+a[0],n+a[0].length):-1}function M5(e,r,n){var a=Ft.exec(r.slice(n,n+2));return a?(e.H=+a[0],n+a[0].length):-1}function Vte(e,r,n){var a=Ft.exec(r.slice(n,n+2));return a?(e.M=+a[0],n+a[0].length):-1}function Yte(e,r,n){var a=Ft.exec(r.slice(n,n+2));return a?(e.S=+a[0],n+a[0].length):-1}function Xte(e,r,n){var a=Ft.exec(r.slice(n,n+3));return a?(e.L=+a[0],n+a[0].length):-1}function Wte(e,r,n){var a=Ft.exec(r.slice(n,n+6));return a?(e.L=Math.floor(a[0]/1e3),n+a[0].length):-1}function Zte(e,r,n){var a=Dte.exec(r.slice(n,n+1));return a?n+a[0].length:-1}function Qte(e,r,n){var a=Ft.exec(r.slice(n));return a?(e.Q=+a[0],n+a[0].length):-1}function Jte(e,r,n){var a=Ft.exec(r.slice(n));return a?(e.s=+a[0],n+a[0].length):-1}function P5(e,r){return He(e.getDate(),r,2)}function ere(e,r){return He(e.getHours(),r,2)}function tre(e,r){return He(e.getHours()%12||12,r,2)}function rre(e,r){return He(1+Nc.count(Ya(e),e),r,3)}function yI(e,r){return He(e.getMilliseconds(),r,3)}function nre(e,r){return yI(e,r)+"000"}function are(e,r){return He(e.getMonth()+1,r,2)}function ire(e,r){return He(e.getMinutes(),r,2)}function ore(e,r){return He(e.getSeconds(),r,2)}function lre(e){var r=e.getDay();return r===0?7:r}function ure(e,r){return He(Op.count(Ya(e)-1,e),r,2)}function bI(e){var r=e.getDay();return r>=4||r===0?eu(e):eu.ceil(e)}function sre(e,r){return e=bI(e),He(eu.count(Ya(e),e)+(Ya(e).getDay()===4),r,2)}function cre(e){return e.getDay()}function fre(e,r){return He(jh.count(Ya(e)-1,e),r,2)}function dre(e,r){return He(e.getFullYear()%100,r,2)}function hre(e,r){return e=bI(e),He(e.getFullYear()%100,r,2)}function pre(e,r){return He(e.getFullYear()%1e4,r,4)}function mre(e,r){var n=e.getDay();return e=n>=4||n===0?eu(e):eu.ceil(e),He(e.getFullYear()%1e4,r,4)}function vre(e){var r=e.getTimezoneOffset();return(r>0?"-":(r*=-1,"+"))+He(r/60|0,"0",2)+He(r%60,"0",2)}function R5(e,r){return He(e.getUTCDate(),r,2)}function gre(e,r){return He(e.getUTCHours(),r,2)}function yre(e,r){return He(e.getUTCHours()%12||12,r,2)}function bre(e,r){return He(1+Ap.count(Xa(e),e),r,3)}function xI(e,r){return He(e.getUTCMilliseconds(),r,3)}function xre(e,r){return xI(e,r)+"000"}function _re(e,r){return He(e.getUTCMonth()+1,r,2)}function wre(e,r){return He(e.getUTCMinutes(),r,2)}function Sre(e,r){return He(e.getUTCSeconds(),r,2)}function Ere(e){var r=e.getUTCDay();return r===0?7:r}function kre(e,r){return He(Cp.count(Xa(e)-1,e),r,2)}function _I(e){var r=e.getUTCDay();return r>=4||r===0?tu(e):tu.ceil(e)}function jre(e,r){return e=_I(e),He(tu.count(Xa(e),e)+(Xa(e).getUTCDay()===4),r,2)}function Are(e){return e.getUTCDay()}function Ore(e,r){return He(Ah.count(Xa(e)-1,e),r,2)}function Cre(e,r){return He(e.getUTCFullYear()%100,r,2)}function Tre(e,r){return e=_I(e),He(e.getUTCFullYear()%100,r,2)}function Nre(e,r){return He(e.getUTCFullYear()%1e4,r,4)}function Mre(e,r){var n=e.getUTCDay();return e=n>=4||n===0?tu(e):tu.ceil(e),He(e.getUTCFullYear()%1e4,r,4)}function Pre(){return"+0000"}function D5(){return"%"}function L5(e){return+e}function I5(e){return Math.floor(+e/1e3)}var Dl,wI,SI;Rre({dateTime:"%x, %X",date:"%-m/%-d/%Y",time:"%-I:%M:%S %p",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]});function Rre(e){return Dl=Rte(e),wI=Dl.format,Dl.parse,SI=Dl.utcFormat,Dl.utcParse,Dl}function Dre(e){return new Date(e)}function Lre(e){return e instanceof Date?+e:+new Date(+e)}function _E(e,r,n,a,i,o,u,c,f,d){var h=lE(),m=h.invert,g=h.domain,y=d(".%L"),x=d(":%S"),E=d("%I:%M"),w=d("%I %p"),_=d("%a %d"),A=d("%b %d"),O=d("%B"),T=d("%Y");function C(N){return(f(N)<N?y:c(N)<N?x:u(N)<N?E:o(N)<N?w:a(N)<N?i(N)<N?_:A:n(N)<N?O:T)(N)}return h.invert=function(N){return new Date(m(N))},h.domain=function(N){return arguments.length?g(Array.from(N,Lre)):g().map(Dre)},h.ticks=function(N){var M=g();return e(M[0],M[M.length-1],N??10)},h.tickFormat=function(N,M){return M==null?C:d(M)},h.nice=function(N){var M=g();return(!N||typeof N.range!="function")&&(N=r(M[0],M[M.length-1],N??10)),N?g(sI(M,N)):h},h.copy=function(){return Tc(h,_E(e,r,n,a,i,o,u,c,f,d))},h}function Ire(){return xn.apply(_E(Mte,Pte,Ya,bE,Op,Nc,gE,mE,ko,wI).domain([new Date(2e3,0,1),new Date(2e3,0,2)]),arguments)}function zre(){return xn.apply(_E(Tte,Nte,Xa,xE,Cp,Ap,yE,vE,ko,SI).domain([Date.UTC(2e3,0,1),Date.UTC(2e3,0,2)]),arguments)}function Tp(){var e=0,r=1,n,a,i,o,u=pr,c=!1,f;function d(m){return m==null||isNaN(m=+m)?f:u(i===0?.5:(m=(o(m)-n)*i,c?Math.max(0,Math.min(1,m)):m))}d.domain=function(m){return arguments.length?([e,r]=m,n=o(e=+e),a=o(r=+r),i=n===a?0:1/(a-n),d):[e,r]},d.clamp=function(m){return arguments.length?(c=!!m,d):c},d.interpolator=function(m){return arguments.length?(u=m,d):u};function h(m){return function(g){var y,x;return arguments.length?([y,x]=g,u=m(y,x),d):[u(0),u(1)]}}return d.range=h(uu),d.rangeRound=h(US),d.unknown=function(m){return arguments.length?(f=m,d):f},function(m){return o=m,n=m(e),a=m(r),i=n===a?0:1/(a-n),d}}function Ki(e,r){return r.domain(e.domain()).interpolator(e.interpolator()).clamp(e.clamp()).unknown(e.unknown())}function EI(){var e=Gi(Tp()(pr));return e.copy=function(){return Ki(e,EI())},ei.apply(e,arguments)}function kI(){var e=cE(Tp()).domain([1,10]);return e.copy=function(){return Ki(e,kI()).base(e.base())},ei.apply(e,arguments)}function jI(){var e=fE(Tp());return e.copy=function(){return Ki(e,jI()).constant(e.constant())},ei.apply(e,arguments)}function wE(){var e=dE(Tp());return e.copy=function(){return Ki(e,wE()).exponent(e.exponent())},ei.apply(e,arguments)}function qre(){return wE.apply(null,arguments).exponent(.5)}function AI(){var e=[],r=pr;function n(a){if(a!=null&&!isNaN(a=+a))return r((Oc(e,a,1)-1)/(e.length-1))}return n.domain=function(a){if(!arguments.length)return e.slice();e=[];for(let i of a)i!=null&&!isNaN(i=+i)&&e.push(i);return e.sort($i),n},n.interpolator=function(a){return arguments.length?(r=a,n):r},n.range=function(){return e.map((a,i)=>r(i/(e.length-1)))},n.quantiles=function(a){return Array.from({length:a+1},(i,o)=>AZ(e,o/a))},n.copy=function(){return AI(r).domain(e)},ei.apply(n,arguments)}function Np(){var e=0,r=.5,n=1,a=1,i,o,u,c,f,d=pr,h,m=!1,g;function y(E){return isNaN(E=+E)?g:(E=.5+((E=+h(E))-o)*(a*E<a*o?c:f),d(m?Math.max(0,Math.min(1,E)):E))}y.domain=function(E){return arguments.length?([e,r,n]=E,i=h(e=+e),o=h(r=+r),u=h(n=+n),c=i===o?0:.5/(o-i),f=o===u?0:.5/(u-o),a=o<i?-1:1,y):[e,r,n]},y.clamp=function(E){return arguments.length?(m=!!E,y):m},y.interpolator=function(E){return arguments.length?(d=E,y):d};function x(E){return function(w){var _,A,O;return arguments.length?([_,A,O]=w,d=ZX(E,[_,A,O]),y):[d(0),d(.5),d(1)]}}return y.range=x(uu),y.rangeRound=x(US),y.unknown=function(E){return arguments.length?(g=E,y):g},function(E){return h=E,i=E(e),o=E(r),u=E(n),c=i===o?0:.5/(o-i),f=o===u?0:.5/(u-o),a=o<i?-1:1,y}}function OI(){var e=Gi(Np()(pr));return e.copy=function(){return Ki(e,OI())},ei.apply(e,arguments)}function CI(){var e=cE(Np()).domain([.1,1,10]);return e.copy=function(){return Ki(e,CI()).base(e.base())},ei.apply(e,arguments)}function TI(){var e=fE(Np());return e.copy=function(){return Ki(e,TI()).constant(e.constant())},ei.apply(e,arguments)}function SE(){var e=dE(Np());return e.copy=function(){return Ki(e,SE()).exponent(e.exponent())},ei.apply(e,arguments)}function Bre(){return SE.apply(null,arguments).exponent(.5)}function $re(e){for(var r=e.length/6|0,n=new Array(r),a=0;a<r;)n[a]="#"+e.slice(a*6,++a*6);return n}const Ure=$re("a6cee31f78b4b2df8a33a02cfb9a99e31a1cfdbf6fff7f00cab2d66a3d9affff99b15928");function Fre(e,r){r===void 0&&(r={});var n=r.insertAt;if(!(typeof document>"u")){var a=document.head||document.getElementsByTagName("head")[0],i=document.createElement("style");i.type="text/css",n==="top"&&a.firstChild?a.insertBefore(i,a.firstChild):a.appendChild(i),i.styleSheet?i.styleSheet.cssText=e:i.appendChild(document.createTextNode(e))}}var Hre=`.force-graph-container canvas {
84
+ display: block;
85
+ user-select: none;
86
+ outline: none;
87
+ -webkit-tap-highlight-color: transparent;
88
+ }
89
+
90
+ .force-graph-container .clickable {
91
+ cursor: pointer;
92
+ }
93
+
94
+ .force-graph-container .grabbable {
95
+ cursor: move;
96
+ cursor: grab;
97
+ cursor: -moz-grab;
98
+ cursor: -webkit-grab;
99
+ }
100
+
101
+ .force-graph-container .grabbable:active {
102
+ cursor: grabbing;
103
+ cursor: -moz-grabbing;
104
+ cursor: -webkit-grabbing;
105
+ }
106
+ `;Fre(Hre);function P2(e,r){(r==null||r>e.length)&&(r=e.length);for(var n=0,a=Array(r);n<r;n++)a[n]=e[n];return a}function Gre(e){if(Array.isArray(e))return e}function Kre(e){if(Array.isArray(e))return P2(e)}function z5(e,r,n){if(NI())return Reflect.construct.apply(null,arguments);var a=[null];a.push.apply(a,r);var i=new(e.bind.apply(e,a));return i}function oc(e,r,n){return(r=Qre(r))in e?Object.defineProperty(e,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[r]=n,e}function NI(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(NI=function(){return!!e})()}function Vre(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function Yre(e,r){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var a,i,o,u,c=[],f=!0,d=!1;try{if(o=(n=n.call(e)).next,r!==0)for(;!(f=(a=o.call(n)).done)&&(c.push(a.value),c.length!==r);f=!0);}catch(h){d=!0,i=h}finally{try{if(!f&&n.return!=null&&(u=n.return(),Object(u)!==u))return}finally{if(d)throw i}}return c}}function Xre(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
107
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Wre(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
108
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function q5(e,r){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);r&&(a=a.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,a)}return n}function Ll(e){for(var r=1;r<arguments.length;r++){var n=arguments[r]!=null?arguments[r]:{};r%2?q5(Object(n),!0).forEach(function(a){oc(e,a,n[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):q5(Object(n)).forEach(function(a){Object.defineProperty(e,a,Object.getOwnPropertyDescriptor(n,a))})}return e}function Qs(e,r){return Gre(e)||Yre(e,r)||MI(e,r)||Xre()}function hn(e){return Kre(e)||Vre(e)||MI(e)||Wre()}function Zre(e,r){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var a=n.call(e,r);if(typeof a!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return(r==="string"?String:Number)(e)}function Qre(e){var r=Zre(e,"string");return typeof r=="symbol"?r:r+""}function R2(e){"@babel/helpers - typeof";return R2=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},R2(e)}function MI(e,r){if(e){if(typeof e=="string")return P2(e,r);var n={}.toString.call(e).slice(8,-1);return n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set"?Array.from(e):n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?P2(e,r):void 0}}var Jre=kp(Ure);function B5(e,r,n){!r||typeof n!="string"||e.filter(function(a){return!a[n]}).forEach(function(a){a[n]=Jre(r(a))})}function ene(e,r){var n=e.nodes,a=e.links,i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},o=i.nodeFilter,u=o===void 0?function(){return!0}:o,c=i.onLoopError,f=c===void 0?function(y){throw"Invalid DAG structure! Found cycle in node path: ".concat(y.join(" -> "),".")}:c,d={};n.forEach(function(y){return d[r(y)]={data:y,out:[],depth:-1,skip:!u(y)}}),a.forEach(function(y){var x=y.source,E=y.target,w=T(x),_=T(E);if(!d.hasOwnProperty(w))throw"Missing source node with id: ".concat(w);if(!d.hasOwnProperty(_))throw"Missing target node with id: ".concat(_);var A=d[w],O=d[_];A.out.push(O);function T(C){return R2(C)==="object"?r(C):C}});var h=[];g(Object.values(d));var m=Object.assign.apply(Object,[{}].concat(hn(Object.entries(d).filter(function(y){var x=Qs(y,2),E=x[1];return!E.skip}).map(function(y){var x=Qs(y,2),E=x[0],w=x[1];return oc({},E,w.depth)}))));return m;function g(y){for(var x=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],E=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,w=function(){var T=y[_];if(x.indexOf(T)!==-1){var C=[].concat(hn(x.slice(x.indexOf(T))),[T]).map(function(N){return r(N.data)});return h.some(function(N){return N.length===C.length&&N.every(function(M,R){return M===C[R]})})||(h.push(C),f(C)),1}E>T.depth&&(T.depth=E,g(T.out,[].concat(hn(x),[T]),E+(T.skip?0:1)))},_=0,A=y.length;_<A;_++)w()}}var tne=2,ir=function(r,n){return n.onNeedsRedraw&&n.onNeedsRedraw()},$5=function(r,n){if(!n.isShadow){var a=Ke(n.linkDirectionalParticles);n.graphData.links.forEach(function(i){var o=Math.round(Math.abs(a(i)));o?i.__photons=hn(Array(o)).map(function(){return{}}):delete i.__photons})}},Oh=XS({props:{graphData:{default:{nodes:[],links:[]},onChange:function(r,n){n.engineRunning=!1,$5(r,n)}},dagMode:{onChange:function(r,n){!r&&(n.graphData.nodes||[]).forEach(function(a){return a.fx=a.fy=void 0})}},dagLevelDistance:{},dagNodeFilter:{default:function(r){return!0}},onDagError:{triggerUpdate:!1},nodeRelSize:{default:4,triggerUpdate:!1,onChange:ir},nodeId:{default:"id"},nodeVal:{default:"val",triggerUpdate:!1,onChange:ir},nodeColor:{default:"color",triggerUpdate:!1,onChange:ir},nodeAutoColorBy:{},nodeCanvasObject:{triggerUpdate:!1,onChange:ir},nodeCanvasObjectMode:{default:function(){return"replace"},triggerUpdate:!1,onChange:ir},nodeVisibility:{default:!0,triggerUpdate:!1,onChange:ir},linkSource:{default:"source"},linkTarget:{default:"target"},linkVisibility:{default:!0,triggerUpdate:!1,onChange:ir},linkColor:{default:"color",triggerUpdate:!1,onChange:ir},linkAutoColorBy:{},linkLineDash:{triggerUpdate:!1,onChange:ir},linkWidth:{default:1,triggerUpdate:!1,onChange:ir},linkCurvature:{default:0,triggerUpdate:!1,onChange:ir},linkCanvasObject:{triggerUpdate:!1,onChange:ir},linkCanvasObjectMode:{default:function(){return"replace"},triggerUpdate:!1,onChange:ir},linkDirectionalArrowLength:{default:0,triggerUpdate:!1,onChange:ir},linkDirectionalArrowColor:{triggerUpdate:!1,onChange:ir},linkDirectionalArrowRelPos:{default:.5,triggerUpdate:!1,onChange:ir},linkDirectionalParticles:{default:0,triggerUpdate:!1,onChange:$5},linkDirectionalParticleSpeed:{default:.01,triggerUpdate:!1},linkDirectionalParticleOffset:{default:0,triggerUpdate:!1},linkDirectionalParticleWidth:{default:4,triggerUpdate:!1},linkDirectionalParticleColor:{triggerUpdate:!1},linkDirectionalParticleCanvasObject:{triggerUpdate:!1},globalScale:{default:1,triggerUpdate:!1},d3AlphaMin:{default:0,triggerUpdate:!1},d3AlphaDecay:{default:.0228,triggerUpdate:!1,onChange:function(r,n){n.forceLayout.alphaDecay(r)}},d3AlphaTarget:{default:0,triggerUpdate:!1,onChange:function(r,n){n.forceLayout.alphaTarget(r)}},d3VelocityDecay:{default:.4,triggerUpdate:!1,onChange:function(r,n){n.forceLayout.velocityDecay(r)}},warmupTicks:{default:0,triggerUpdate:!1},cooldownTicks:{default:1/0,triggerUpdate:!1},cooldownTime:{default:15e3,triggerUpdate:!1},onUpdate:{default:function(){},triggerUpdate:!1},onFinishUpdate:{default:function(){},triggerUpdate:!1},onEngineTick:{default:function(){},triggerUpdate:!1},onEngineStop:{default:function(){},triggerUpdate:!1},onNeedsRedraw:{triggerUpdate:!1},isShadow:{default:!1,triggerUpdate:!1}},methods:{d3Force:function(r,n,a){return a===void 0?r.forceLayout.force(n):(r.forceLayout.force(n,a),this)},d3ReheatSimulation:function(r){return r.forceLayout.alpha(1),this.resetCountdown(),this},resetCountdown:function(r){return r.cntTicks=0,r.startTickTime=new Date,r.engineRunning=!0,this},isEngineRunning:function(r){return!!r.engineRunning},tickFrame:function(r){return!r.isShadow&&n(),i(),!r.isShadow&&o(),!r.isShadow&&u(),a(),this;function n(){r.engineRunning&&(++r.cntTicks>r.cooldownTicks||new Date-r.startTickTime>r.cooldownTime||r.d3AlphaMin>0&&r.forceLayout.alpha()<r.d3AlphaMin?(r.engineRunning=!1,r.onEngineStop()):(r.forceLayout.tick(),r.onEngineTick()))}function a(){var c=Ke(r.nodeVisibility),f=Ke(r.nodeVal),d=Ke(r.nodeColor),h=Ke(r.nodeCanvasObjectMode),m=r.ctx,g=r.isShadow/r.globalScale,y=r.graphData.nodes.filter(c);m.save(),y.forEach(function(x){var E=h(x);if(r.nodeCanvasObject&&(E==="before"||E==="replace")&&(r.nodeCanvasObject(x,m,r.globalScale),E==="replace")){m.restore();return}var w=Math.sqrt(Math.max(0,f(x)||1))*r.nodeRelSize+g;m.beginPath(),m.arc(x.x,x.y,w,0,2*Math.PI,!1),m.fillStyle=d(x)||"rgba(31, 120, 180, 0.92)",m.fill(),r.nodeCanvasObject&&E==="after"&&r.nodeCanvasObject(x,r.ctx,r.globalScale)}),m.restore()}function i(){var c=Ke(r.linkVisibility),f=Ke(r.linkColor),d=Ke(r.linkWidth),h=Ke(r.linkLineDash),m=Ke(r.linkCurvature),g=Ke(r.linkCanvasObjectMode),y=r.ctx,x=r.isShadow*2,E=r.graphData.links.filter(c);E.forEach(N);var w=[],_=[],A=E;if(r.linkCanvasObject){var O=[],T=[];E.forEach(function(M){return({before:w,after:_,replace:O}[g(M)]||T).push(M)}),A=[].concat(hn(w),_,T),w=w.concat(O)}y.save(),w.forEach(function(M){return r.linkCanvasObject(M,y,r.globalScale)}),y.restore();var C=Wee(A,[f,d,h]);y.save(),Object.entries(C).forEach(function(M){var R=Qs(M,2),L=R[0],D=R[1],z=!L||L==="undefined"?"rgba(0,0,0,0.15)":L;Object.entries(D).forEach(function(q){var G=Qs(q,2),U=G[0],Y=G[1],$=(U||1)/r.globalScale+x;Object.entries(Y).forEach(function(J){var re=Qs(J,2);re[0];var oe=re[1],fe=h(oe[0]);y.beginPath(),oe.forEach(function(F){var Z=F.source,ce=F.target;if(!(!Z||!ce||!Z.hasOwnProperty("x")||!ce.hasOwnProperty("x"))){y.moveTo(Z.x,Z.y);var B=F.__controlPoints;B?y[B.length===2?"quadraticCurveTo":"bezierCurveTo"].apply(y,hn(B).concat([ce.x,ce.y])):y.lineTo(ce.x,ce.y)}}),y.strokeStyle=z,y.lineWidth=$,y.setLineDash(fe||[]),y.stroke()})})}),y.restore(),y.save(),_.forEach(function(M){return r.linkCanvasObject(M,y,r.globalScale)}),y.restore();function N(M){var R=m(M);if(!R){M.__controlPoints=null;return}var L=M.source,D=M.target;if(!(!L||!D||!L.hasOwnProperty("x")||!D.hasOwnProperty("x"))){var z=Math.sqrt(Math.pow(D.x-L.x,2)+Math.pow(D.y-L.y,2));if(z>0){var q=Math.atan2(D.y-L.y,D.x-L.x),G=z*R,U={x:(L.x+D.x)/2+G*Math.cos(q-Math.PI/2),y:(L.y+D.y)/2+G*Math.sin(q-Math.PI/2)};M.__controlPoints=[U.x,U.y]}else{var Y=R*70;M.__controlPoints=[D.x,D.y-Y,D.x+Y,D.y]}}}}function o(){var c=1.6,f=.2,d=Ke(r.linkDirectionalArrowLength),h=Ke(r.linkDirectionalArrowRelPos),m=Ke(r.linkVisibility),g=Ke(r.linkDirectionalArrowColor||r.linkColor),y=Ke(r.nodeVal),x=r.ctx;x.save(),r.graphData.links.filter(m).forEach(function(E){var w=d(E);if(!(!w||w<0)){var _=E.source,A=E.target;if(!(!_||!A||!_.hasOwnProperty("x")||!A.hasOwnProperty("x"))){var O=Math.sqrt(Math.max(0,y(_)||1))*r.nodeRelSize,T=Math.sqrt(Math.max(0,y(A)||1))*r.nodeRelSize,C=Math.min(1,Math.max(0,h(E))),N=g(E)||"rgba(0,0,0,0.28)",M=w/c/2,R=E.__controlPoints&&z5(lt,[_.x,_.y].concat(hn(E.__controlPoints),[A.x,A.y])),L=R?function($){return R.get($)}:function($){return{x:_.x+(A.x-_.x)*$||0,y:_.y+(A.y-_.y)*$||0}},D=R?R.length():Math.sqrt(Math.pow(A.x-_.x,2)+Math.pow(A.y-_.y,2)),z=O+w+(D-O-T-w)*C,q=L(z/D),G=L((z-w)/D),U=L((z-w*(1-f))/D),Y=Math.atan2(q.y-G.y,q.x-G.x)-Math.PI/2;x.beginPath(),x.moveTo(q.x,q.y),x.lineTo(G.x+M*Math.cos(Y),G.y+M*Math.sin(Y)),x.lineTo(U.x,U.y),x.lineTo(G.x-M*Math.cos(Y),G.y-M*Math.sin(Y)),x.fillStyle=N,x.fill()}}}),x.restore()}function u(){var c=Ke(r.linkDirectionalParticles),f=Ke(r.linkDirectionalParticleSpeed),d=Ke(r.linkDirectionalParticleOffset),h=Ke(r.linkDirectionalParticleWidth),m=Ke(r.linkVisibility),g=Ke(r.linkDirectionalParticleColor||r.linkColor),y=r.ctx;y.save(),r.graphData.links.filter(m).forEach(function(x){var E=c(x);if(!(!x.hasOwnProperty("__photons")||!x.__photons.length)){var w=x.source,_=x.target;if(!(!w||!_||!w.hasOwnProperty("x")||!_.hasOwnProperty("x"))){var A=f(x),O=Math.abs(d(x)),T=x.__photons||[],C=Math.max(0,h(x)/2)/Math.sqrt(r.globalScale),N=g(x)||"rgba(0,0,0,0.28)";y.fillStyle=N;var M=x.__controlPoints?z5(lt,[w.x,w.y].concat(hn(x.__controlPoints),[_.x,_.y])):null,R=0,L=!1;T.forEach(function(D){var z=!!D.__singleHop;if(D.hasOwnProperty("__progressRatio")||(D.__progressRatio=z?0:(R+O)/E),!z&&R++,D.__progressRatio+=A,D.__progressRatio>=1)if(!z)D.__progressRatio=D.__progressRatio%1;else{L=!0;return}var q=D.__progressRatio,G=M?M.get(q):{x:w.x+(_.x-w.x)*q||0,y:w.y+(_.y-w.y)*q||0};r.linkDirectionalParticleCanvasObject?r.linkDirectionalParticleCanvasObject(G.x,G.y,x,y,r.globalScale):(y.beginPath(),y.arc(G.x,G.y,C,0,2*Math.PI,!1),y.fill())}),L&&(x.__photons=x.__photons.filter(function(D){return!D.__singleHop||D.__progressRatio<=1}))}}}),y.restore()}},emitParticle:function(r,n){return n&&(!n.__photons&&(n.__photons=[]),n.__photons.push({__singleHop:!0})),this}},stateInit:function(){return{forceLayout:Aee().force("link",bee()).force("charge",Oee()).force("center",bJ()).force("dagRadial",null).stop(),engineRunning:!1}},init:function(r,n){n.ctx=r},update:function(r,n){r.engineRunning=!1,r.onUpdate(),r.nodeAutoColorBy!==null&&B5(r.graphData.nodes,Ke(r.nodeAutoColorBy),r.nodeColor),r.linkAutoColorBy!==null&&B5(r.graphData.links,Ke(r.linkAutoColorBy),r.linkColor),r.graphData.links.forEach(function(g){g.source=g[r.linkSource],g.target=g[r.linkTarget]}),r.forceLayout.stop().alpha(1).nodes(r.graphData.nodes);var a=r.forceLayout.force("link");a&&a.id(function(g){return g[r.nodeId]}).links(r.graphData.links);var i=r.dagMode&&ene(r.graphData,function(g){return g[r.nodeId]},{nodeFilter:r.dagNodeFilter,onLoopError:r.onDagError||void 0}),o=Math.max.apply(Math,hn(Object.values(i||[]))),u=r.dagLevelDistance||r.graphData.nodes.length/(o||1)*tne*(["radialin","radialout"].indexOf(r.dagMode)!==-1?.7:1);if(["lr","rl","td","bu"].includes(n.dagMode)){var c=["lr","rl"].includes(n.dagMode)?"fx":"fy";r.graphData.nodes.filter(r.dagNodeFilter).forEach(function(g){return delete g[c]})}if(["lr","rl","td","bu"].includes(r.dagMode)){var f=["rl","bu"].includes(r.dagMode),d=function(y){return(i[y[r.nodeId]]-o/2)*u*(f?-1:1)},h=["lr","rl"].includes(r.dagMode)?"fx":"fy";r.graphData.nodes.filter(r.dagNodeFilter).forEach(function(g){return g[h]=d(g)})}r.forceLayout.force("dagRadial",["radialin","radialout"].indexOf(r.dagMode)!==-1?Cee(function(g){var y=i[g[r.nodeId]]||-1;return(r.dagMode==="radialin"?o-y:y)*u}).strength(function(g){return r.dagNodeFilter(g)?1:0}):null);for(var m=0;m<r.warmupTicks&&!(r.d3AlphaMin>0&&r.forceLayout.alpha()<r.d3AlphaMin);m++)r.forceLayout.tick();this.resetCountdown(),r.onFinishUpdate()}});function PI(e,r){var n=e instanceof Array?e:[e],a=new r;return a._destructor&&a._destructor(),{linkProp:function(o){return{default:a[o](),onChange:function(c,f){n.forEach(function(d){return f[d][o](c)})},triggerUpdate:!1}},linkMethod:function(o){return function(u){for(var c=arguments.length,f=new Array(c>1?c-1:0),d=1;d<c;d++)f[d-1]=arguments[d];var h=[];return n.forEach(function(m){var g=u[m],y=g[o].apply(g,f);y!==g&&h.push(y)}),h.length?h[0]:this}}}}var rne=800,nne=4,ane=5,RI=PI("forceGraph",Oh),ine=PI(["forceGraph","shadowGraph"],Oh),one=Object.assign.apply(Object,hn(["nodeColor","nodeAutoColorBy","nodeCanvasObject","nodeCanvasObjectMode","linkColor","linkAutoColorBy","linkLineDash","linkWidth","linkCanvasObject","linkCanvasObjectMode","linkDirectionalArrowLength","linkDirectionalArrowColor","linkDirectionalArrowRelPos","linkDirectionalParticles","linkDirectionalParticleSpeed","linkDirectionalParticleOffset","linkDirectionalParticleWidth","linkDirectionalParticleColor","linkDirectionalParticleCanvasObject","dagMode","dagLevelDistance","dagNodeFilter","onDagError","d3AlphaMin","d3AlphaDecay","d3VelocityDecay","warmupTicks","cooldownTicks","cooldownTime","onEngineTick","onEngineStop"].map(function(e){return oc({},e,RI.linkProp(e))})).concat(hn(["nodeRelSize","nodeId","nodeVal","nodeVisibility","linkSource","linkTarget","linkVisibility","linkCurvature"].map(function(e){return oc({},e,ine.linkProp(e))})))),lne=Object.assign.apply(Object,hn(["d3Force","d3ReheatSimulation","emitParticle"].map(function(e){return oc({},e,RI.linkMethod(e))})));function dy(e){if(e.canvas){var r=e.canvas.width,n=e.canvas.height;r===300&&n===150&&(r=n=0);var a=window.devicePixelRatio;r/=a,n/=a,[e.canvas,e.shadowCanvas].forEach(function(o){o.style.width="".concat(e.width,"px"),o.style.height="".concat(e.height,"px"),o.width=e.width*a,o.height=e.height*a,!r&&!n&&o.getContext("2d").scale(a,a)});var i=Vn(e.canvas).k;e.zoom.translateBy(e.zoom.__baseElem,(e.width-r)/2/i,(e.height-n)/2/i),e.needsRedraw=!0}}function DI(e){var r=window.devicePixelRatio;e.setTransform(r,0,0,r,0,0)}function U5(e,r,n){e.save(),DI(e),e.clearRect(0,0,r,n),e.restore()}var une=XS({props:Ll({width:{default:window.innerWidth,onChange:function(r,n){return dy(n)},triggerUpdate:!1},height:{default:window.innerHeight,onChange:function(r,n){return dy(n)},triggerUpdate:!1},graphData:{default:{nodes:[],links:[]},onChange:function(r,n){[r.nodes,r.links].every(function(i){return(i||[]).every(function(o){return!o.hasOwnProperty("__indexColor")})})&&n.colorTracker.reset(),[{type:"Node",objs:r.nodes},{type:"Link",objs:r.links}].forEach(a),n.forceGraph.graphData(r),n.shadowGraph.graphData(r);function a(i){var o=i.type,u=i.objs;u.filter(function(c){if(!c.hasOwnProperty("__indexColor"))return!0;var f=n.colorTracker.lookup(c.__indexColor);return!f||!f.hasOwnProperty("d")||f.d!==c}).forEach(function(c){c.__indexColor=n.colorTracker.register({type:o,d:c})})}},triggerUpdate:!1},backgroundColor:{onChange:function(r,n){n.canvas&&r&&(n.canvas.style.background=r)},triggerUpdate:!1},nodeLabel:{default:"name",triggerUpdate:!1},nodePointerAreaPaint:{onChange:function(r,n){n.shadowGraph.nodeCanvasObject(r?function(a,i,o){return r(a,a.__indexColor,i,o)}:null),n.flushShadowCanvas&&n.flushShadowCanvas()},triggerUpdate:!1},linkPointerAreaPaint:{onChange:function(r,n){n.shadowGraph.linkCanvasObject(r?function(a,i,o){return r(a,a.__indexColor,i,o)}:null),n.flushShadowCanvas&&n.flushShadowCanvas()},triggerUpdate:!1},linkLabel:{default:"name",triggerUpdate:!1},linkHoverPrecision:{default:4,triggerUpdate:!1},minZoom:{default:.01,onChange:function(r,n){n.zoom.scaleExtent([r,n.zoom.scaleExtent()[1]])},triggerUpdate:!1},maxZoom:{default:1e3,onChange:function(r,n){n.zoom.scaleExtent([n.zoom.scaleExtent()[0],r])},triggerUpdate:!1},enableNodeDrag:{default:!0,triggerUpdate:!1},enableZoomInteraction:{default:!0,triggerUpdate:!1},enablePanInteraction:{default:!0,triggerUpdate:!1},enableZoomPanInteraction:{default:!0,triggerUpdate:!1},enablePointerInteraction:{default:!0,onChange:function(r,n){n.hoverObj=null},triggerUpdate:!1},autoPauseRedraw:{default:!0,triggerUpdate:!1},onNodeDrag:{default:function(){},triggerUpdate:!1},onNodeDragEnd:{default:function(){},triggerUpdate:!1},onNodeClick:{triggerUpdate:!1},onNodeRightClick:{triggerUpdate:!1},onNodeHover:{triggerUpdate:!1},onLinkClick:{triggerUpdate:!1},onLinkRightClick:{triggerUpdate:!1},onLinkHover:{triggerUpdate:!1},onBackgroundClick:{triggerUpdate:!1},onBackgroundRightClick:{triggerUpdate:!1},showPointerCursor:{default:!0,triggerUpdate:!1},onZoom:{triggerUpdate:!1},onZoomEnd:{triggerUpdate:!1},onRenderFramePre:{triggerUpdate:!1},onRenderFramePost:{triggerUpdate:!1}},one),aliases:{stopAnimation:"pauseAnimation"},methods:Ll({graph2ScreenCoords:function(r,n,a){var i=Vn(r.canvas);return{x:n*i.k+i.x,y:a*i.k+i.y}},screen2GraphCoords:function(r,n,a){var i=Vn(r.canvas);return{x:(n-i.x)/i.k,y:(a-i.y)/i.k}},centerAt:function(r,n,a,i){if(!r.canvas)return null;if(n!==void 0||a!==void 0){var o=Object.assign({},n!==void 0?{x:n}:{},a!==void 0?{y:a}:{});return i?r.tweenGroup.add(new $T(u()).to(o,i).easing(Co.Quadratic.Out).onUpdate(c).onComplete(function(){r.tweenGroup.remove(this)}).start()):c(o),this}return u();function u(){var f=Vn(r.canvas);return{x:(r.width/2-f.x)/f.k,y:(r.height/2-f.y)/f.k}}function c(f){var d=f.x,h=f.y;r.zoom.translateTo(r.zoom.__baseElem,d===void 0?u().x:d,h===void 0?u().y:h),r.needsRedraw=!0}},zoom:function(r,n,a){if(!r.canvas)return null;if(n!==void 0)return a?r.tweenGroup.add(new $T({k:i()}).to({k:n},a).easing(Co.Quadratic.Out).onUpdate(function(u){var c=u.k;return o(c)}).onComplete(function(){r.tweenGroup.remove(this)}).start()):o(n),this;return i();function i(){return Vn(r.canvas).k}function o(u){r.zoom.scaleTo(r.zoom.__baseElem,u),r.needsRedraw=!0}},zoomToFit:function(r){for(var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:10,i=arguments.length,o=new Array(i>3?i-3:0),u=3;u<i;u++)o[u-3]=arguments[u];var c=this.getGraphBbox.apply(this,o);if(c){var f={x:(c.x[0]+c.x[1])/2,y:(c.y[0]+c.y[1])/2},d=Math.max(1e-12,Math.min(1e12,(r.width-a*2)/(c.x[1]-c.x[0]),(r.height-a*2)/(c.y[1]-c.y[0])));this.centerAt(f.x,f.y,n),this.zoom(d,n)}return this},getGraphBbox:function(r){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:function(){return!0},a=Ke(r.nodeVal),i=function(c){return Math.sqrt(Math.max(0,a(c)||1))*r.nodeRelSize},o=r.graphData.nodes.filter(n).map(function(u){return{x:u.x,y:u.y,r:i(u)}});return o.length?{x:[ph(o,function(u){return u.x-u.r}),hh(o,function(u){return u.x+u.r})],y:[ph(o,function(u){return u.y-u.r}),hh(o,function(u){return u.y+u.r})]}:null},pauseAnimation:function(r){return r.animationFrameRequestId&&(cancelAnimationFrame(r.animationFrameRequestId),r.animationFrameRequestId=null),this},resumeAnimation:function(r){return r.animationFrameRequestId||this._animationCycle(),this},_destructor:function(){this.pauseAnimation(),this.graphData({nodes:[],links:[]})}},lne),stateInit:function(){return{lastSetZoom:1,zoom:mZ(),forceGraph:new Oh,shadowGraph:new Oh().cooldownTicks(0).nodeColor("__indexColor").linkColor("__indexColor").isShadow(!0),colorTracker:new WQ,tweenGroup:new DL}},init:function(r,n){var a=this;r.innerHTML="";var i=document.createElement("div");i.classList.add("force-graph-container"),i.style.position="relative",r.appendChild(i),n.canvas=document.createElement("canvas"),n.backgroundColor&&(n.canvas.style.background=n.backgroundColor),i.appendChild(n.canvas),n.shadowCanvas=document.createElement("canvas");var o=n.canvas.getContext("2d"),u=n.shadowCanvas.getContext("2d",{willReadFrequently:!0}),c={x:-1e12,y:-1e12},f=function(){var m=null,g=window.devicePixelRatio,y=c.x>0&&c.y>0?u.getImageData(c.x*g,c.y*g,1,1):null;return y&&(m=n.colorTracker.lookup(y.data)),m};dn(n.canvas).call(xX().subject(function(){if(!n.enableNodeDrag)return null;var h=f();return h&&h.type==="Node"?h.d:null}).on("start",function(h){var m=h.subject;m.__initialDragPos={x:m.x,y:m.y,fx:m.fx,fy:m.fy},h.active||(m.fx=m.x,m.fy=m.y),n.canvas.classList.add("grabbable")}).on("drag",function(h){var m=h.subject,g=m.__initialDragPos,y=h,x=Vn(n.canvas).k,E={x:g.x+(y.x-g.x)/x-m.x,y:g.y+(y.y-g.y)/x-m.y};["x","y"].forEach(function(w){return m["f".concat(w)]=m[w]=g[w]+(y[w]-g[w])/x}),!(!m.__dragged&&ane>=Math.sqrt(TZ(["x","y"].map(function(w){return Math.pow(h[w]-g[w],2)}))))&&(n.forceGraph.d3AlphaTarget(.3).resetCountdown(),n.isPointerDragging=!0,m.__dragged=!0,n.onNodeDrag(m,E))}).on("end",function(h){var m=h.subject,g=m.__initialDragPos,y={x:m.x-g.x,y:m.y-g.y};g.fx===void 0&&(m.fx=void 0),g.fy===void 0&&(m.fy=void 0),delete m.__initialDragPos,n.forceGraph.d3AlphaTarget()&&n.forceGraph.d3AlphaTarget(0).resetCountdown(),n.canvas.classList.remove("grabbable"),n.isPointerDragging=!1,m.__dragged&&(delete m.__dragged,n.onNodeDragEnd(m,y))})),n.zoom(n.zoom.__baseElem=dn(n.canvas)),n.zoom.__baseElem.on("dblclick.zoom",null),n.zoom.filter(function(h){return!h.button&&n.enableZoomPanInteraction&&(h.type!=="wheel"||Ke(n.enableZoomInteraction)(h))&&(h.type==="wheel"||Ke(n.enablePanInteraction)(h))}).on("zoom",function(h){var m=h.transform;[o,u].forEach(function(g){DI(g),g.translate(m.x,m.y),g.scale(m.k,m.k)}),n.isPointerDragging=!0,n.onZoom&&n.onZoom(Ll(Ll({},m),a.centerAt())),n.needsRedraw=!0}).on("end",function(h){n.isPointerDragging=!1,n.onZoomEnd&&n.onZoomEnd(Ll(Ll({},h.transform),a.centerAt()))}),dy(n),n.forceGraph.onNeedsRedraw(function(){return n.needsRedraw=!0}).onFinishUpdate(function(){Vn(n.canvas).k===n.lastSetZoom&&n.graphData.nodes.length&&(n.zoom.scaleTo(n.zoom.__baseElem,n.lastSetZoom=nne/Math.cbrt(n.graphData.nodes.length)),n.needsRedraw=!0)}),n.tooltip=new yJ(i),["pointermove","pointerdown"].forEach(function(h){return i.addEventListener(h,function(m){h==="pointerdown"&&(n.isPointerPressed=!0,n.pointerDownEvent=m),!n.isPointerDragging&&m.type==="pointermove"&&n.onBackgroundClick&&(m.pressure>0||n.isPointerPressed)&&(m.pointerType==="mouse"||m.movementX===void 0||[m.movementX,m.movementY].some(function(x){return Math.abs(x)>1}))&&(n.isPointerDragging=!0);var g=y(i);c.x=m.pageX-g.left,c.y=m.pageY-g.top;function y(x){var E=x.getBoundingClientRect(),w=window.pageXOffset||document.documentElement.scrollLeft,_=window.pageYOffset||document.documentElement.scrollTop;return{top:E.top+_,left:E.left+w}}},{passive:!0})}),i.addEventListener("pointerup",function(h){if(n.isPointerPressed){if(n.isPointerPressed=!1,n.isPointerDragging){n.isPointerDragging=!1;return}var m=[h,n.pointerDownEvent];requestAnimationFrame(function(){if(h.button===0)if(n.hoverObj){var g=n["on".concat(n.hoverObj.type,"Click")];g&&g.apply(void 0,[n.hoverObj.d].concat(m))}else n.onBackgroundClick&&n.onBackgroundClick.apply(n,m);if(h.button===2)if(n.hoverObj){var y=n["on".concat(n.hoverObj.type,"RightClick")];y&&y.apply(void 0,[n.hoverObj.d].concat(m))}else n.onBackgroundRightClick&&n.onBackgroundRightClick.apply(n,m)})}},{passive:!0}),i.addEventListener("contextmenu",function(h){return!n.onBackgroundRightClick&&!n.onNodeRightClick&&!n.onLinkRightClick?!0:(h.preventDefault(),!1)}),n.forceGraph(o),n.shadowGraph(u);var d=nQ(function(){U5(u,n.width,n.height),n.shadowGraph.linkWidth(function(m){return Ke(n.linkWidth)(m)+n.linkHoverPrecision});var h=Vn(n.canvas);n.shadowGraph.globalScale(h.k).tickFrame()},rne);n.flushShadowCanvas=d.flush,(this._animationCycle=function h(){var m=!n.autoPauseRedraw||!!n.needsRedraw||n.forceGraph.isEngineRunning()||n.graphData.links.some(function(O){return O.__photons&&O.__photons.length});if(n.needsRedraw=!1,n.enablePointerInteraction){var g=n.isPointerDragging?null:f();if(g!==n.hoverObj){var y=n.hoverObj,x=y?y.type:null,E=g?g.type:null;if(x&&x!==E){var w=n["on".concat(x,"Hover")];w&&w(null,y.d)}if(E){var _=n["on".concat(E,"Hover")];_&&_(g.d,x===E?y.d:null)}n.tooltip.content(g&&Ke(n["".concat(g.type.toLowerCase(),"Label")])(g.d)||null),n.canvas.classList[(g&&n["on".concat(E,"Click")]||!g&&n.onBackgroundClick)&&Ke(n.showPointerCursor)(g==null?void 0:g.d)?"add":"remove"]("clickable"),n.hoverObj=g}m&&d()}if(m){U5(o,n.width,n.height);var A=Vn(n.canvas).k;n.onRenderFramePre&&n.onRenderFramePre(o,A),n.forceGraph.globalScale(A).tickFrame(),n.onRenderFramePost&&n.onRenderFramePost(o,A)}n.tweenGroup.update(),n.animationFrameRequestId=requestAnimationFrame(h)})()},update:function(r){}}),hy={exports:{}},py,F5;function sne(){if(F5)return py;F5=1;var e="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return py=e,py}var my,H5;function cne(){if(H5)return my;H5=1;var e=sne();function r(){}function n(){}return n.resetWarningCache=r,my=function(){function a(u,c,f,d,h,m){if(m!==e){var g=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw g.name="Invariant Violation",g}}a.isRequired=a;function i(){return a}var o={array:a,bigint:a,bool:a,func:a,number:a,object:a,string:a,symbol:a,any:a,arrayOf:i,element:a,elementType:a,instanceOf:i,node:a,objectOf:i,oneOf:i,oneOfType:i,shape:i,exact:i,checkPropTypes:n,resetWarningCache:r};return o.PropTypes=o,o},my}var G5;function fne(){return G5||(G5=1,hy.exports=cne()()),hy.exports}var dne=fne();const Q=Dn(dne),Mp={width:Q.number,height:Q.number,graphData:Q.shape({nodes:Q.arrayOf(Q.object).isRequired,links:Q.arrayOf(Q.object).isRequired}),backgroundColor:Q.string,nodeRelSize:Q.number,nodeId:Q.string,nodeLabel:Q.oneOfType([Q.string,Q.func]),nodeVal:Q.oneOfType([Q.number,Q.string,Q.func]),nodeVisibility:Q.oneOfType([Q.bool,Q.string,Q.func]),nodeColor:Q.oneOfType([Q.string,Q.func]),nodeAutoColorBy:Q.oneOfType([Q.string,Q.func]),onNodeHover:Q.func,onNodeClick:Q.func,linkSource:Q.string,linkTarget:Q.string,linkLabel:Q.oneOfType([Q.string,Q.func]),linkVisibility:Q.oneOfType([Q.bool,Q.string,Q.func]),linkColor:Q.oneOfType([Q.string,Q.func]),linkAutoColorBy:Q.oneOfType([Q.string,Q.func]),linkWidth:Q.oneOfType([Q.number,Q.string,Q.func]),linkCurvature:Q.oneOfType([Q.number,Q.string,Q.func]),linkDirectionalArrowLength:Q.oneOfType([Q.number,Q.string,Q.func]),linkDirectionalArrowColor:Q.oneOfType([Q.string,Q.func]),linkDirectionalArrowRelPos:Q.oneOfType([Q.number,Q.string,Q.func]),linkDirectionalParticles:Q.oneOfType([Q.number,Q.string,Q.func]),linkDirectionalParticleSpeed:Q.oneOfType([Q.number,Q.string,Q.func]),linkDirectionalParticleOffset:Q.oneOfType([Q.number,Q.string,Q.func]),linkDirectionalParticleWidth:Q.oneOfType([Q.number,Q.string,Q.func]),linkDirectionalParticleColor:Q.oneOfType([Q.string,Q.func]),onLinkHover:Q.func,onLinkClick:Q.func,dagMode:Q.oneOf(["td","bu","lr","rl","zin","zout","radialin","radialout"]),dagLevelDistance:Q.number,dagNodeFilter:Q.func,onDagError:Q.func,d3AlphaMin:Q.number,d3AlphaDecay:Q.number,d3VelocityDecay:Q.number,warmupTicks:Q.number,cooldownTicks:Q.number,cooldownTime:Q.number,onEngineTick:Q.func,onEngineStop:Q.func,getGraphBbox:Q.func},LI={zoomToFit:Q.func,onNodeRightClick:Q.func,onNodeDrag:Q.func,onNodeDragEnd:Q.func,onLinkRightClick:Q.func,linkHoverPrecision:Q.number,onBackgroundClick:Q.func,onBackgroundRightClick:Q.func,showPointerCursor:Q.oneOfType([Q.bool,Q.func]),enablePointerInteraction:Q.bool,enableNodeDrag:Q.bool},EE={showNavInfo:Q.bool,nodeOpacity:Q.number,nodeResolution:Q.number,nodeThreeObject:Q.oneOfType([Q.object,Q.string,Q.func]),nodeThreeObjectExtend:Q.oneOfType([Q.bool,Q.string,Q.func]),nodePositionUpdate:Q.func,linkOpacity:Q.number,linkResolution:Q.number,linkCurveRotation:Q.oneOfType([Q.number,Q.string,Q.func]),linkMaterial:Q.oneOfType([Q.object,Q.string,Q.func]),linkThreeObject:Q.oneOfType([Q.object,Q.string,Q.func]),linkThreeObjectExtend:Q.oneOfType([Q.bool,Q.string,Q.func]),linkPositionUpdate:Q.func,linkDirectionalArrowResolution:Q.number,linkDirectionalParticleResolution:Q.number,linkDirectionalParticleThreeObject:Q.oneOfType([Q.object,Q.string,Q.func]),forceEngine:Q.oneOf(["d3","ngraph"]),ngraphPhysics:Q.object,numDimensions:Q.oneOf([1,2,3])},hne=Object.assign({},Mp,LI,{linkLineDash:Q.oneOfType([Q.arrayOf(Q.number),Q.string,Q.func]),nodeCanvasObjectMode:Q.oneOfType([Q.string,Q.func]),nodeCanvasObject:Q.func,nodePointerAreaPaint:Q.func,linkCanvasObjectMode:Q.oneOfType([Q.string,Q.func]),linkCanvasObject:Q.func,linkPointerAreaPaint:Q.func,linkDirectionalParticleCanvasObject:Q.func,autoPauseRedraw:Q.bool,minZoom:Q.number,maxZoom:Q.number,enableZoomInteraction:Q.oneOfType([Q.bool,Q.func]),enablePanInteraction:Q.oneOfType([Q.bool,Q.func]),onZoom:Q.func,onZoomEnd:Q.func,onRenderFramePre:Q.func,onRenderFramePost:Q.func});Object.assign({},Mp,LI,EE,{enableNavigationControls:Q.bool,controlType:Q.oneOf(["trackball","orbit","fly"]),rendererConfig:Q.object,extraRenderers:Q.arrayOf(Q.shape({render:Q.func.isRequired}))});Object.assign({},Mp,EE,{nodeDesc:Q.oneOfType([Q.string,Q.func]),linkDesc:Q.oneOfType([Q.string,Q.func])});Object.assign({},Mp,EE,{markerAttrs:Q.object,yOffset:Q.number,glScale:Q.number});const kE=MV(une,{methodNames:["emitParticle","d3Force","d3ReheatSimulation","stopAnimation","pauseAnimation","resumeAnimation","centerAt","zoom","zoomToFit","getGraphBbox","screen2GraphCoords","graph2ScreenCoords"]});kE.displayName="ForceGraph2D";kE.propTypes=hne;function Td(e){let r=e.trim().toLowerCase();return r.startsWith("fleet-")&&(r=r.slice(6)),r}const vy=16,pne=4,mne=14,vne=10;function gne({edges:e,agents:r}){const n=k.useRef(void 0),a=k.useRef(null),[i,o]=k.useState({width:500,height:380}),u=k.useRef([]);k.useEffect(()=>{const _=a.current;if(!_)return;const A=new ResizeObserver(T=>{for(const C of T){const{width:N,height:M}=C.contentRect;N>0&&M>0&&o({width:Math.floor(N),height:Math.floor(M)})}});A.observe(_);const O=_.getBoundingClientRect();return O.width>0&&O.height>0&&o({width:Math.floor(O.width),height:Math.floor(O.height)}),()=>A.disconnect()},[]);const c=k.useMemo(()=>{const _=r.find(A=>{const O=Td(A.name);return O==="team-lead"||O==="coordinator"||O==="tl"});return(_==null?void 0:_.name)??(r.length>0?r[0].name:null)},[r]),f=k.useMemo(()=>{const _=r.map(T=>{const C=T.name===c;return{id:T.name,name:T.name,role:T.role,color:Ec(T.name,T.role),isActive:T.isActive,isTL:C,...C?{fx:0,fy:-40}:{}}}),A=[],O=new Map;for(const T of r)O.set(Td(T.name),T.name);for(const T of e){const C=O.get(Td(T.sender))??T.sender,N=O.get(Td(T.recipient))??T.recipient,M=r.some(L=>L.name===C),R=r.some(L=>L.name===N);!M||!R||A.push({source:C,target:N,count:T.count,lastSummary:T.lastSummary})}return{nodes:_,links:A}},[r,e,c]);k.useEffect(()=>{const _=n.current;if(!_||!e.length)return;const A=u.current,O=new Map;for(const T of A)O.set(`${T.sender}->${T.recipient}`,T.count);for(const T of e){const C=`${T.sender}->${T.recipient}`,N=O.get(C)??0;if(T.count>N){const M=f.links.find(R=>{const L=typeof R.source=="object"?R.source.id:R.source,D=typeof R.target=="object"?R.target.id:R.target;return L===T.sender&&D===T.recipient});if(M)try{_.emitParticle(M)}catch{}}}u.current=e},[e,f.links]),k.useEffect(()=>{const _=n.current;if(!_||r.length===0)return;const A=_.d3Force("charge");A&&typeof A.strength=="function"&&A.strength(-200),_.d3Force("collide",gee(vy+20)),_.d3Force("y",Tee(60).strength(.1)),_.d3ReheatSimulation()},[r.length]),k.useEffect(()=>{const _=n.current;if(!_||r.length===0)return;const A=setTimeout(()=>{_.zoomToFit(400,60)},500);return()=>clearTimeout(A)},[r.length]);const d=k.useCallback((_,A,O)=>{const T=_.x??0,C=_.y??0,N=vy,M=mne/O,R=vne/O;A.beginPath(),A.arc(T,C,N,0,2*Math.PI),A.fillStyle=_.color+"66",A.fill(),A.strokeStyle=_.isActive?_.color:"#484F58",A.lineWidth=2/O,A.stroke();const L=T+N*.65,D=C-N*.65,z=pne/O;A.beginPath(),A.arc(L,D,z,0,2*Math.PI),A.fillStyle=_.isActive?"#3FB950":"#484F58",A.fill(),A.strokeStyle="#0D1117",A.lineWidth=1.5/O,A.stroke(),A.font=`bold ${M}px sans-serif`,A.textAlign="center",A.textBaseline="middle",A.fillStyle=_.isActive?_.color:"#484F58",A.fillText(_.name.charAt(0).toUpperCase(),T,C),A.font=`${R}px sans-serif`,A.fillStyle="#8B949E",A.fillText(_.name,T,C+N+10/O),_.role&&(A.font=`${R*.85}px sans-serif`,A.fillStyle="#484F58",A.fillText(_.role,T,C+N+20/O))},[]),h=k.useCallback((_,A,O)=>{const T=_.x??0,C=_.y??0;O.beginPath(),O.arc(T,C,vy+4,0,2*Math.PI),O.fillStyle=A,O.fill()},[]),m=k.useCallback(_=>_.count>=9?3.5:_.count>=4?2:1,[]),g=k.useCallback(_=>"#8B949E",[]),y=k.useCallback(_=>null,[]),x=k.useCallback(_=>{const A=_.lastSummary?`<br/><i>${_.lastSummary}</i>`:"";return`<div style="padding:4px 8px;background:#161B22;border:1px solid #30363D;border-radius:4px;font-size:11px;color:#E6EDF3;">
109
+ <b>${typeof _.source=="object"?_.source.id:_.source}</b>
110
+ &rarr;
111
+ <b>${typeof _.target=="object"?_.target.id:_.target}</b>
112
+ <br/>${_.count} message${_.count!==1?"s":""}${A}
113
+ </div>`},[]),E=k.useCallback(_=>_.count>=6?3:_.count>=3?2:_.count>0?1:0,[]),w=k.useCallback(_=>6,[]);return r.length===0?b.jsx("div",{className:"flex items-center justify-center h-full text-dark-muted text-sm",children:"Waiting for agents to join the team..."}):b.jsx("div",{ref:a,className:"relative w-full h-full min-h-[300px]",children:b.jsx(kE,{ref:n,graphData:f,width:i.width,height:i.height,backgroundColor:"transparent",nodeCanvasObject:d,nodeCanvasObjectMode:()=>"replace",nodePointerAreaPaint:h,linkWidth:m,linkColor:g,linkLineDash:y,linkLabel:x,linkDirectionalParticles:E,linkDirectionalParticleWidth:3,linkDirectionalParticleSpeed:.005,linkDirectionalArrowLength:w,linkDirectionalArrowRelPos:1,linkDirectionalArrowColor:g,linkCurvature:.15,d3AlphaDecay:.02,d3VelocityDecay:.3,cooldownTicks:100,enableZoomInteraction:!0,enablePanInteraction:!0,enableNodeDrag:!0,minZoom:.5,maxZoom:4})})}function yne(e){if(e==null||e<0)return"0m";const r=Math.floor(e/60),n=Math.round(e%60);return r>0?`${r}h ${n}m`:`${n}m`}function bne(){var ge;const{selectedTeamId:e,setSelectedTeamId:r,lastEvent:n,lastEventTeamId:a,isThinking:i}=Sc(),o=Ut(),[u,c]=k.useState(null),[f,d]=k.useState(!1),[h,m]=k.useState(null),[g,y]=k.useState(null),[x,E]=k.useState(null),[w,_]=k.useState(null),[A,O]=k.useState(0),[T,C]=k.useState([]),[N,M]=k.useState([]),[R,L]=k.useState("session-log"),[D,z]=k.useState([]),[q,G]=k.useState(!1),[U,Y]=k.useState(new Set),$=k.useRef(null),J=k.useRef(null),re=k.useRef(null),oe=k.useRef(e),fe=e!==null;k.useEffect(()=>{oe.current=e},[e]),k.useEffect(()=>{if(e==null){C([]);return}let W=!1;async function le(){try{const ye=await o.get(`teams/${e}/transitions`);W||C(ye)}catch{}}return le(),()=>{W=!0}},[e,A,o]),k.useEffect(()=>{if(e==null){M([]);return}let W=!1;async function le(){try{const ye=await o.get(`teams/${e}/roster`);W||M(ye)}catch{}}return le(),()=>{W=!0}},[e,A,o]),k.useEffect(()=>{if(e==null){z([]);return}let W=!1;async function le(){try{const ye=await o.get(`teams/${e}/messages/summary`);W||z(ye)}catch{}}return le(),()=>{W=!0}},[e,A,o]),k.useEffect(()=>{L("session-log"),G(!1),Y(new Set)},[e]),k.useEffect(()=>{((u==null?void 0:u.status)==="done"||(u==null?void 0:u.status)==="failed")&&G(!0)},[u==null?void 0:u.status]),k.useEffect(()=>{if(e==null){c(null);return}let W=!1;async function le(){d(!0),m(null);try{const ye=await o.get(`teams/${e}`);W||c(ye)}catch(ye){W||m(ye instanceof Error?ye.message:"Failed to load team detail")}finally{W||d(!1)}}return le(),()=>{W=!0}},[e,o]),k.useEffect(()=>{if(e==null||!n||a!==e)return;re.current&&clearTimeout(re.current);const W=e;return re.current=setTimeout(async()=>{try{const le=await o.get(`teams/${W}`);oe.current===W&&(c(le),O(ye=>ye+1))}catch{}},2e3),()=>{re.current&&(clearTimeout(re.current),re.current=null)}},[n,a,e,o]);const F=k.useCallback(()=>{r(null)},[r]);k.useEffect(()=>{function W(le){le.key==="Escape"&&fe&&F()}return document.addEventListener("keydown",W),()=>document.removeEventListener("keydown",W)},[fe,F]);const Z=k.useCallback(W=>{J.current&&!J.current.contains(W.target)&&F()},[F]),ce=k.useCallback(async W=>{if(!e||g)return;const le=e;y(W);try{if(await o.post(`teams/${le}/${W}`),oe.current!==le)return;const ye=await o.get(`teams/${le}`);if(oe.current!==le)return;c(ye),O(K=>K+1)}catch{}finally{y(null)}},[e,g,o]),B=k.useCallback(async W=>{if(!(!e||!u||x)){E(W);try{let ye;const K=$.current;K&&Date.now()-K.fetchedAt<6e4?ye=K.data:(ye=await o.get("message-templates"),$.current={data:ye,fetchedAt:Date.now()});const be=ye.find(_e=>_e.id===W);if(!be||!be.enabled)return;let ve=be.template;ve=ve.replace(/\{\{ISSUE_NUMBER\}\}/g,String(u.issueNumber)),u.prNumber&&(ve=ve.replace(/\{\{PR_NUMBER\}\}/g,String(u.prNumber))),await o.post(`teams/${e}/send-message`,{message:ve}),_(W),setTimeout(()=>_(_e=>_e===W?null:_e),1500)}catch{}finally{E(null)}}},[e,u,x,o]),H=(u==null?void 0:u.status)==="running"||(u==null?void 0:u.status)==="idle"||(u==null?void 0:u.status)==="stuck"||(u==null?void 0:u.status)==="launching",te=(u==null?void 0:u.status)==="failed",he=u!=null&&u.pr&&u.pr.state!=="merged"&&u.pr.state!=="closed"?u.pr.mergeStatus??null:null;return b.jsxs(b.Fragment,{children:[fe&&b.jsx("div",{className:"fixed inset-0 bg-black/40 z-40 transition-opacity",onClick:Z,"aria-hidden":"true"}),b.jsxs("div",{ref:J,className:`fixed top-0 right-0 h-full w-[960px] max-w-full bg-dark-surface border-l border-dark-border z-50 flex flex-col shadow-2xl transition-transform duration-300 ease-in-out ${fe?"translate-x-0":"translate-x-full"}`,children:[b.jsxs("div",{className:"flex items-center justify-between px-5 py-4 border-b border-dark-border shrink-0",children:[b.jsx("h2",{className:"text-lg font-semibold text-dark-text truncate",children:"Team Detail"}),b.jsx("button",{onClick:F,className:"text-dark-muted hover:text-dark-text transition-colors p-1 rounded hover:bg-dark-border/30",title:"Close panel (Esc)",children:b.jsx("svg",{className:"w-5 h-5",viewBox:"0 0 20 20",fill:"currentColor",children:b.jsx("path",{fillRule:"evenodd",d:"M4.293 4.293a1 1 0 011.414 0L10 8.586l4.293-4.293a1 1 0 111.414 1.414L11.414 10l4.293 4.293a1 1 0 01-1.414 1.414L10 11.414l-4.293 4.293a1 1 0 01-1.414-1.414L8.586 10 4.293 5.707a1 1 0 010-1.414z",clipRule:"evenodd"})})})]}),b.jsxs("div",{className:"flex-1 flex flex-col min-h-0",children:[f&&!u&&b.jsx("div",{className:"flex items-center justify-center py-16",children:b.jsx("span",{className:"text-dark-muted",children:"Loading..."})}),h&&!u&&b.jsx("div",{className:"flex items-center justify-center py-16",children:b.jsx("span",{className:"text-[#F85149]",children:h})}),u&&b.jsxs(b.Fragment,{children:[b.jsxs("div",{className:"shrink-0",children:[b.jsxs("div",{className:"flex items-center justify-between px-5 py-3 cursor-pointer hover:bg-dark-border/10 transition-colors",onClick:()=>G(W=>!W),children:[b.jsxs("h3",{className:"text-base font-semibold text-dark-text",children:[b.jsxs("span",{className:"text-dark-muted mr-1.5",children:["#",u.issueNumber]}),u.issueTitle??"Untitled"]}),b.jsxs("div",{className:"flex items-center gap-2 shrink-0",children:[b.jsx(DS,{status:u.status}),b.jsx("svg",{className:`w-4 h-4 text-dark-muted transition-transform duration-200 ${q?"":"rotate-180"}`,viewBox:"0 0 20 20",fill:"currentColor",children:b.jsx("path",{fillRule:"evenodd",d:"M5.23 7.21a.75.75 0 011.06.02L10 11.168l3.71-3.938a.75.75 0 111.08 1.04l-4.25 4.5a.75.75 0 01-1.08 0l-4.25-4.5a.75.75 0 01.02-1.06z",clipRule:"evenodd"})})]})]}),b.jsx("div",{className:`overflow-y-auto custom-scrollbar transition-all duration-200 ${q?"max-h-0 overflow-hidden":"max-h-[2000px]"}`,children:b.jsxs("div",{className:"px-5 pb-4 space-y-4",children:[b.jsxs("section",{children:[b.jsxs("div",{className:"flex items-center gap-4 mt-3 text-sm",children:[b.jsxs("span",{className:"text-dark-muted",children:["Duration: ",b.jsx("span",{className:"text-dark-text",children:yne(u.durationMin)})]}),u.lastEventAt&&!te&&b.jsxs("span",{className:"text-dark-muted",children:["Last activity: ",b.jsx("span",{className:"text-dark-text",children:(()=>{const W=Math.floor((Date.now()-new Date(u.lastEventAt).getTime())/6e4);return W<1?"just now":`${W}m ago`})()})]})]}),b.jsxs("div",{className:"mt-2 text-xs text-dark-muted",children:[b.jsxs("span",{children:["Worktree: ",u.worktreeName]}),u.branchName&&b.jsxs("span",{className:"ml-3",children:["Branch: ",u.branchName]}),b.jsxs("span",{className:"ml-3",children:["Model: ",u.model??"—"]})]}),u.totalInputTokens+u.totalOutputTokens>0&&b.jsxs("div",{className:"mt-3 flex items-center gap-4 text-sm",children:[b.jsxs("span",{className:"text-dark-muted",children:["Input: ",b.jsx("span",{className:"text-dark-text",children:u.totalInputTokens.toLocaleString()})]}),b.jsxs("span",{className:"text-dark-muted",children:["Output: ",b.jsx("span",{className:"text-dark-text",children:u.totalOutputTokens.toLocaleString()})]}),u.totalCacheCreationTokens+u.totalCacheReadTokens>0&&b.jsxs("span",{className:"text-dark-muted",children:["Cache: ",b.jsx("span",{className:"text-dark-text",children:(u.totalCacheCreationTokens+u.totalCacheReadTokens).toLocaleString()})]}),u.totalCostUsd>0&&b.jsxs("span",{className:"text-dark-muted",children:["Cost: ",b.jsxs("span",{className:"text-[#3FB950]",children:["$",u.totalCostUsd.toFixed(4)]})]})]})]}),T.length>0&&b.jsxs("section",{className:"min-w-0",children:[b.jsx("h4",{className:"text-sm font-semibold text-dark-text mb-2 border-b border-dark-border/50 pb-1",children:"State Transitions"}),b.jsx("div",{className:"flex items-center gap-0 overflow-x-auto pb-1 custom-scrollbar max-w-full",children:T.map((W,le)=>{const ye=le===0,K=Wn[W.toStatus]??"#8B949E",be=(()=>{try{return new Date(W.createdAt).toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"})}catch{return""}})();return b.jsxs("div",{className:"flex items-center shrink-0",children:[ye&&b.jsxs(b.Fragment,{children:[b.jsx("div",{className:"flex flex-col items-center",children:b.jsx("span",{className:"text-[10px] font-medium px-1.5 py-0.5 rounded",style:{color:Wn[W.fromStatus]??"#8B949E",backgroundColor:(Wn[W.fromStatus]??"#8B949E")+"18"},children:W.fromStatus})}),b.jsx("svg",{className:"w-3 h-3 text-dark-muted shrink-0 mx-0.5",viewBox:"0 0 12 12",fill:"currentColor",children:b.jsx("path",{d:"M4.5 2l4 4-4 4",stroke:"currentColor",strokeWidth:"1.5",fill:"none"})})]}),b.jsxs("div",{className:"flex flex-col items-center group relative",children:[b.jsx("span",{className:"text-[10px] font-medium px-1.5 py-0.5 rounded",style:{color:K,backgroundColor:K+"18"},children:W.toStatus}),b.jsx("span",{className:"text-[9px] text-dark-muted mt-0.5 leading-none",children:be}),W.reason&&b.jsx("div",{className:"absolute bottom-full left-1/2 -translate-x-1/2 mb-1.5 px-2 py-1 bg-dark-surface border border-dark-border rounded text-[10px] text-dark-text whitespace-nowrap opacity-0 group-hover:opacity-100 transition-opacity pointer-events-none z-10 shadow-lg max-w-[240px] truncate",children:W.reason})]}),le<T.length-1&&b.jsx("svg",{className:"w-3 h-3 text-dark-muted shrink-0 mx-0.5",viewBox:"0 0 12 12",fill:"currentColor",children:b.jsx("path",{d:"M4.5 2l4 4-4 4",stroke:"currentColor",strokeWidth:"1.5",fill:"none"})})]},W.id)})})]}),u.pr&&b.jsxs("section",{children:[b.jsx("h4",{className:"text-sm font-semibold text-dark-text mb-2 border-b border-dark-border/50 pb-1",children:"Pull Request"}),b.jsxs("div",{className:"flex items-center gap-3 mb-3 text-sm",children:[b.jsxs("span",{className:"text-dark-accent font-medium",children:["PR #",u.pr.number]}),b.jsx("span",{className:"text-xs px-1.5 py-0.5 rounded border",style:{color:u.pr.state==="merged"?"#A371F7":u.pr.state==="open"?"#3FB950":u.pr.state==="closed"?"#F85149":"#8B949E",borderColor:(u.pr.state==="merged"?"#A371F7":u.pr.state==="open"?"#3FB950":u.pr.state==="closed"?"#F85149":"#8B949E")+"40"},children:((ge=u.pr.state)==null?void 0:ge.toUpperCase())??"UNKNOWN"}),he&&b.jsxs("span",{className:"text-xs text-dark-muted",children:["Merge: ",he]}),u.pr.autoMerge&&b.jsx("span",{className:"text-xs text-[#3FB950]",children:"Auto-merge"})]}),b.jsxs("div",{className:"ml-1",children:[b.jsx("p",{className:"text-xs text-dark-muted mb-1.5 uppercase tracking-wide",children:"CI Checks"}),b.jsx("div",{className:"max-h-[120px] overflow-y-auto custom-scrollbar",children:b.jsx(W6,{checks:u.pr.checks??[]})})]})]}),!u.pr&&u.prNumber&&b.jsxs("section",{children:[b.jsx("h4",{className:"text-sm font-semibold text-dark-text mb-2 border-b border-dark-border/50 pb-1",children:"Pull Request"}),b.jsxs("p",{className:"text-sm text-dark-muted",children:["PR #",u.prNumber," (details loading...)"]})]})]})})]}),b.jsxs("div",{className:"flex-1 min-h-0 flex flex-col",children:[b.jsxs("div",{className:"shrink-0 flex items-center gap-0 px-5 border-b border-dark-border",children:[b.jsx("button",{onClick:()=>L("session-log"),className:`px-3 py-2 text-sm font-medium border-b-2 transition-colors ${R==="session-log"?"border-dark-accent text-dark-text":"border-transparent text-dark-muted hover:text-dark-text"}`,children:"Session Log"}),b.jsx("button",{onClick:()=>L("team"),className:`px-3 py-2 text-sm font-medium border-b-2 transition-colors ${R==="team"?"border-dark-accent text-dark-text":"border-transparent text-dark-muted hover:text-dark-text"}`,children:"Team"})]}),R==="session-log"&&b.jsx("div",{className:"flex-1 min-h-0 flex flex-col px-5 py-3",children:b.jsx("div",{className:"flex-1 min-h-0 flex flex-col",children:b.jsx(dV,{teamId:u.id,teamStatus:u.status,isThinking:i(u.id),roster:N,agentFilters:U,onAgentFiltersChange:Y})})}),R==="team"&&b.jsx("div",{className:"flex-1 min-h-0 px-5 py-3",children:b.jsx(gne,{edges:D,agents:N})})]}),b.jsxs("div",{className:"shrink-0 border-t border-dark-border px-5 py-4 space-y-4",children:[b.jsx(hV,{teamId:u.id,disabled:!H}),b.jsxs("div",{className:"flex items-center gap-1.5 flex-wrap",children:[b.jsx("span",{className:"text-xs text-dark-muted mr-1",children:"Quick:"}),[{id:"nudge_progress",label:"Status?",color:"#58A6FF"},{id:"check_ci",label:"Fix CI",color:"#F85149",show:!!(u!=null&&u.prNumber)}].filter(W=>W.show!==!1).map(W=>b.jsx("button",{onClick:()=>B(W.id),disabled:!H||x!==null,className:"px-2.5 py-1 text-xs rounded-full border transition-colors disabled:opacity-40",style:{color:W.color,borderColor:W.color+"40"},title:`Send "${W.label}" message to TL`,children:x===W.id?"...":w===W.id?"Sent!":W.label},W.id))]}),b.jsxs("div",{className:"flex items-center gap-2 flex-wrap",children:[H&&b.jsx("button",{onClick:()=>ce("stop"),disabled:g!==null,className:"px-3 py-1.5 text-sm rounded border border-[#F85149]/40 text-[#F85149] hover:bg-[#F85149]/10 transition-colors disabled:opacity-40 disabled:cursor-not-allowed",children:g==="stop"?"Stopping...":"Stop"}),te&&b.jsx("button",{onClick:()=>ce("resume"),disabled:g!==null,className:"px-3 py-1.5 text-sm rounded border border-[#3FB950]/40 text-[#3FB950] hover:bg-[#3FB950]/10 transition-colors disabled:opacity-40 disabled:cursor-not-allowed",children:g==="resume"?"Resuming...":"Resume"}),(u==null?void 0:u.status)!=="done"&&b.jsx("button",{onClick:()=>ce("restart"),disabled:g!==null,className:"px-3 py-1.5 text-sm rounded border border-dark-accent/40 text-dark-accent hover:bg-dark-accent/10 transition-colors disabled:opacity-40 disabled:cursor-not-allowed",children:g==="restart"?"Restarting...":"Restart"}),b.jsxs("button",{onClick:()=>{window.open(`/api/teams/${u.id}/export?format=txt`,"_blank")},className:"px-3 py-1.5 text-sm rounded border border-dark-muted/40 text-dark-muted hover:text-dark-text hover:bg-dark-border/30 transition-colors flex items-center gap-1.5",title:"Export team log as text file",children:[b.jsxs("svg",{className:"w-3.5 h-3.5",viewBox:"0 0 16 16",fill:"currentColor",children:[b.jsx("path",{d:"M2.75 14A1.75 1.75 0 0 1 1 12.25v-2.5a.75.75 0 0 1 1.5 0v2.5c0 .138.112.25.25.25h10.5a.25.25 0 0 0 .25-.25v-2.5a.75.75 0 0 1 1.5 0v2.5A1.75 1.75 0 0 1 13.25 14Z"}),b.jsx("path",{d:"M7.25 7.689V2a.75.75 0 0 1 1.5 0v5.689l1.97-1.969a.749.749 0 1 1 1.06 1.06l-3.25 3.25a.749.749 0 0 1-1.06 0L4.22 6.78a.749.749 0 1 1 1.06-1.06l1.97 1.969Z"})]}),"Export Log"]})]})]})]})]})]})]})}const xne={open:{color:"#3FB950",label:"OPEN"},merged:{color:"#A371F7",label:"MERGED"},closed:{color:"#8B949E",label:"CLOSED"},draft:{color:"#8B949E",label:"DRAFT"}},_ne={clean:"#3FB950",behind:"#D29922",blocked:"#F85149",dirty:"#F85149",unstable:"#D29922",has_hooks:"#D29922",draft:"#8B949E",unknown:"#8B949E"};function wne({prNumber:e,teamId:r,onClose:n,githubRepo:a}){const i=Ut(),[o,u]=k.useState(null),[c,f]=k.useState(!0),[d,h]=k.useState(null),[m,g]=k.useState(null),y=k.useRef(null);k.useEffect(()=>{let N=!1;async function M(){f(!0),h(null);try{const R=await i.get(`teams/${r}`);N||u(R)}catch(R){N||h(R instanceof Error?R.message:"Failed to load PR detail")}finally{N||f(!1)}}return M(),()=>{N=!0}},[r,i]),k.useEffect(()=>{function N(M){M.key==="Escape"&&n()}return document.addEventListener("keydown",N),()=>document.removeEventListener("keydown",N)},[n]),k.useEffect(()=>{function N(R){y.current&&!y.current.contains(R.target)&&n()}const M=setTimeout(()=>{document.addEventListener("mousedown",N)},0);return()=>{clearTimeout(M),document.removeEventListener("mousedown",N)}},[n]);const x=k.useCallback(async N=>{if(m)return;const M=N?"enable-auto-merge":"disable-auto-merge";g(M);try{await i.post(`prs/${e}/${M}`);const R=await i.get(`teams/${r}`);u(R)}catch{}finally{g(null)}},[m,i,e,r]),E=k.useCallback(async()=>{if(!m){g("update-branch");try{await i.post(`prs/${e}/update-branch`);const N=await i.get(`teams/${r}`);u(N)}catch{}finally{g(null)}}},[m,i,e,r]),w=(o==null?void 0:o.pr)??null,_=a??(o==null?void 0:o.githubRepo)??null,A=_&&w?`https://github.com/${_}/pull/${w.number}`:null,O=xne[(w==null?void 0:w.state)??""]??{color:"#8B949E",label:"UNKNOWN"},T=_ne[((w==null?void 0:w.mergeStatus)??"unknown").toLowerCase()]??"#8B949E",C=(w==null?void 0:w.state)==="open";return b.jsxs("div",{ref:y,className:"absolute top-full left-0 mt-1.5 z-50 w-[360px] bg-[#1C2128] border border-dark-border rounded-lg shadow-2xl",onClick:N=>N.stopPropagation(),children:[c&&b.jsx("div",{className:"flex items-center justify-center py-8",children:b.jsx("span",{className:"text-dark-muted text-sm",children:"Loading PR details..."})}),d&&!c&&b.jsx("div",{className:"flex items-center justify-center py-8",children:b.jsx("span",{className:"text-[#F85149] text-sm",children:d})}),!c&&!d&&w&&b.jsxs("div",{className:"p-4 space-y-3",children:[b.jsxs("div",{className:"flex items-center justify-between",children:[A?b.jsxs("a",{href:A,target:"_blank",rel:"noopener noreferrer",onClick:N=>N.stopPropagation(),className:"text-sm font-semibold text-dark-accent hover:underline",children:["PR #",w.number]}):b.jsxs("span",{className:"text-sm font-semibold text-dark-accent",children:["PR #",w.number]}),b.jsx("button",{onClick:n,className:"text-dark-muted hover:text-dark-text transition-colors p-0.5 rounded hover:bg-dark-border/30",title:"Close",children:b.jsx("svg",{className:"w-4 h-4",viewBox:"0 0 20 20",fill:"currentColor",children:b.jsx("path",{fillRule:"evenodd",d:"M4.293 4.293a1 1 0 011.414 0L10 8.586l4.293-4.293a1 1 0 111.414 1.414L11.414 10l4.293 4.293a1 1 0 01-1.414 1.414L10 11.414l-4.293 4.293a1 1 0 01-1.414-1.414L8.586 10 4.293 5.707a1 1 0 010-1.414z",clipRule:"evenodd"})})})]}),b.jsxs("div",{className:"flex items-center gap-2 flex-wrap",children:[b.jsx("span",{className:"text-xs font-medium px-2 py-0.5 rounded border",style:{color:O.color,borderColor:O.color+"40",backgroundColor:O.color+"10"},children:O.label}),w.mergeStatus&&w.state!=="merged"&&w.state!=="closed"&&b.jsx("span",{className:"text-xs px-2 py-0.5 rounded border",style:{color:T,borderColor:T+"40",backgroundColor:T+"10"},children:w.mergeStatus.toUpperCase()}),w.autoMerge&&b.jsxs("span",{className:"text-xs text-[#3FB950] flex items-center gap-1",children:[b.jsx("svg",{className:"w-3 h-3",viewBox:"0 0 16 16",fill:"currentColor",children:b.jsx("path",{d:"M5.22 14.78a.75.75 0 001.06 0l7.22-7.22v5.69a.75.75 0 001.5 0v-7.5a.75.75 0 00-.75-.75h-7.5a.75.75 0 000 1.5h5.69l-7.22 7.22a.75.75 0 000 1.06z"})}),"Auto-merge"]})]}),b.jsxs("div",{children:[b.jsxs("p",{className:"text-xs text-dark-muted mb-1.5 uppercase tracking-wide font-medium",children:["CI Checks",w.ciFailCount>0&&b.jsxs("span",{className:"ml-1.5 text-[#F85149] normal-case",children:["(",w.ciFailCount," failing)"]})]}),b.jsx("div",{className:"max-h-[200px] overflow-y-auto custom-scrollbar",children:b.jsx(W6,{checks:w.checks??[]})})]}),C&&b.jsx("div",{className:"pt-2 border-t border-dark-border/50",children:b.jsxs("div",{className:"flex items-center gap-2",children:[w.autoMerge?b.jsx("button",{onClick:()=>x(!1),disabled:m!==null,className:"px-2.5 py-1 text-xs rounded border border-dark-border text-dark-muted hover:text-[#F85149] hover:border-[#F85149]/50 transition-colors disabled:opacity-40 disabled:cursor-not-allowed",children:m==="disable-auto-merge"?"Disabling...":"Disable Auto-merge"}):b.jsx("button",{onClick:()=>x(!0),disabled:m!==null,className:"px-2.5 py-1 text-xs rounded border border-[#3FB950]/40 text-[#3FB950] hover:bg-[#3FB950]/10 transition-colors disabled:opacity-40 disabled:cursor-not-allowed",children:m==="enable-auto-merge"?"Enabling...":"Enable Auto-merge"}),b.jsx("button",{onClick:E,disabled:m!==null,className:"px-2.5 py-1 text-xs rounded border border-dark-accent/40 text-dark-accent hover:bg-dark-accent/10 transition-colors disabled:opacity-40 disabled:cursor-not-allowed",children:m==="update-branch"?"Updating...":"Update Branch"})]})})]}),!c&&!d&&!w&&b.jsx("div",{className:"flex items-center justify-center py-8",children:b.jsxs("span",{className:"text-dark-muted text-sm",children:["PR #",e," details not available"]})})]})}const K5={passing:{icon:"✓",color:"#3FB950"},failing:{icon:"✕",color:"#F85149"},pending:{icon:"○",color:"#D29922"},none:{icon:"—",color:"#8B949E"}},Sne={open:"#3FB950",merged:"#A371F7",closed:"#8B949E",draft:"#8B949E"};function II({prNumber:e,ciStatus:r,teamId:n,prState:a,githubRepo:i}){const[o,u]=k.useState(!1),[c,f]=k.useState(!1),d=k.useCallback(E=>{E.stopPropagation(),e!=null&&n!=null&&u(w=>!w)},[e,n]),h=k.useCallback(()=>{u(!1)},[]);if(e==null)return b.jsx("span",{className:"text-dark-muted text-sm",children:"—"});const m=a==="merged"?{icon:"✓",color:"#A371F7"}:K5[r??"none"]??K5.none,g=n!=null,y=Sne[a??""]??"#8B949E",x=a?a.toUpperCase():null;return b.jsxs("span",{className:"relative inline-flex items-center gap-1.5",children:[b.jsxs("button",{type:"button",onClick:d,onMouseEnter:()=>f(!0),onMouseLeave:()=>f(!1),className:`inline-flex items-center gap-1.5 ${g?"cursor-pointer hover:bg-dark-border/30 rounded px-1.5 py-0.5 -mx-1.5 -my-0.5 transition-colors":""}`,title:g?"Click to view PR details":void 0,children:[b.jsxs("span",{className:"text-sm text-dark-accent",children:["#",e]}),b.jsx("span",{className:"text-sm font-bold",style:{color:m.color},children:m.icon})]}),c&&!o&&x&&b.jsx("span",{className:"absolute bottom-full left-1/2 -translate-x-1/2 mb-1.5 px-2 py-0.5 text-xs rounded whitespace-nowrap bg-[#1C2128] border border-dark-border shadow-lg pointer-events-none",style:{color:y},children:x}),o&&n!=null&&b.jsx(wne,{prNumber:e,teamId:n,onClose:h,githubRepo:i})]})}function Ene(e){if(e<0)return"0m";const r=Math.floor(e/60),n=Math.round(e%60);return r>0?`${r}h ${n}m`:`${n}m`}function kne(e,r){return e.length<=r?e:e.slice(0,r-1)+"…"}function Nd(e){return e<1e3?String(e):e<1e6?(e/1e3).toFixed(e<1e4?1:0)+"K":(e/1e6).toFixed(1)+"M"}function jne({team:e,selected:r,onClick:n}){const a=Ut(),{isThinking:i}=Sc(),[o,u]=k.useState(!1),[c,f]=k.useState(!1),d=i(e.id),h=async _=>{if(_.stopPropagation(),!o){u(!0);try{await a.post(`teams/${e.id}/stop`)}catch{}finally{u(!1)}}},m=async _=>{if(_.stopPropagation(),!c){f(!0);try{await a.post(`teams/${e.id}/force-launch`)}catch{}finally{f(!1)}}},g=e.status==="running"||e.status==="stuck"||e.status==="idle"||e.status==="launching",y=e.issueTitle?kne(e.issueTitle,40):"Untitled",x=e.status==="done"||e.status==="failed";let E="—",w="text-dark-muted";if(e.lastEventAt&&!x){const _=Date.now()-new Date(e.lastEventAt).getTime(),A=Math.floor(_/6e4);A<1?(E="just now",w="text-[#3FB950]"):A<5?(E=`${A}m ago`,w="text-[#3FB950]"):A<15?(E=`${A}m ago`,w="text-[#D29922]"):(E=`${A}m ago`,w="text-[#F85149]")}return b.jsxs("tr",{onClick:n,className:`h-16 border-b border-dark-border cursor-pointer transition-colors group ${r?"bg-dark-accent/10":"bg-dark-surface hover:bg-[#1C2128]"}`,children:[b.jsx("td",{className:"px-4 whitespace-nowrap",children:b.jsx(DS,{status:e.status})}),b.jsx("td",{className:"px-4 whitespace-nowrap",children:b.jsx("span",{className:"text-sm text-dark-muted",children:e.projectName??"—"})}),b.jsx("td",{className:"px-4 whitespace-nowrap",children:b.jsxs("span",{className:"text-sm",children:[b.jsxs("span",{className:"text-dark-muted mr-1.5",children:["#",e.issueNumber]}),b.jsx("span",{className:"text-dark-text",children:y})]})}),b.jsx("td",{className:"px-4 whitespace-nowrap",children:b.jsx("span",{className:"text-sm text-dark-muted",children:e.model??"—"})}),b.jsx("td",{className:"px-4 whitespace-nowrap",children:b.jsx("span",{className:"text-sm text-dark-muted",children:Ene(e.durationMin??0)})}),b.jsx("td",{className:"px-4 whitespace-nowrap",children:d?b.jsxs("span",{className:"inline-flex items-center gap-1.5 text-sm text-[#E8976C]",children:[b.jsx("span",{className:"inline-block w-2 h-2 rounded-full bg-[#E8976C] animate-thinking-dot"}),"thinking..."]}):b.jsx("span",{className:`text-sm ${w}`,title:e.lastEventAt??void 0,children:E})}),b.jsx("td",{className:"px-4 whitespace-nowrap",children:e.totalInputTokens+e.totalOutputTokens>0?b.jsx("span",{className:"text-sm text-dark-muted",title:`Input: ${Nd(e.totalInputTokens)}, Output: ${Nd(e.totalOutputTokens)}, Cache: ${Nd(e.totalCacheCreationTokens+e.totalCacheReadTokens)}`,children:Nd(e.totalInputTokens+e.totalOutputTokens)}):b.jsx("span",{className:"text-sm text-dark-muted",children:"—"})}),b.jsx("td",{className:"px-4 whitespace-nowrap",children:b.jsx(II,{prNumber:e.prNumber,ciStatus:e.ciStatus,teamId:e.id,prState:e.prState,githubRepo:e.githubRepo})}),b.jsx("td",{className:"px-4 whitespace-nowrap",children:b.jsxs("span",{className:"inline-flex items-center gap-2 opacity-0 group-hover:opacity-100 transition-opacity",children:[e.status==="queued"&&b.jsx("button",{onClick:m,disabled:c,className:"px-2 py-1 text-xs rounded border border-dark-border text-dark-muted hover:text-[#D29922] hover:border-[#D29922]/50 transition-colors disabled:opacity-50",title:"Launch immediately despite usage limit",children:c?"Launching…":"Force Launch"}),g&&b.jsx("button",{onClick:h,disabled:o,className:"px-2 py-1 text-xs rounded border border-dark-border text-dark-muted hover:text-[#F85149] hover:border-[#F85149]/50 transition-colors disabled:opacity-50",title:"Stop team",children:o?"Stopping…":"Stop"})]})})]})}const Ane=["Status","Project","Issue","Model","Duration","Activity","Tokens","PR","Actions"];function One({teams:e,selectedTeamId:r,onSelectTeam:n}){return b.jsx("div",{className:"w-full overflow-x-auto",children:b.jsxs("table",{className:"w-full table-auto",children:[b.jsx("thead",{children:b.jsx("tr",{className:"border-b border-dark-border",children:Ane.map(a=>b.jsx("th",{className:"px-4 py-3 text-left text-xs font-medium text-dark-muted uppercase tracking-wider",children:a},a))})}),b.jsx("tbody",{children:e.map(a=>b.jsx(jne,{team:a,selected:r===a.id,onClick:()=>n(a.id)},a.id))})]})})}function V5(e){if(e<1)return"<1m";const r=Math.floor(e/60),n=Math.round(e%60);return r>0?`${r}h ${n}m`:`${n}m`}function Cne(e,r){return e.toLocaleTimeString([],{hour12:!1,hour:"2-digit",minute:"2-digit"})}function Tne(e,r){return e.length<=r?e:e.slice(0,r-1)+"…"}function Nne({teams:e}){const[r,n]=k.useState(null),[a,i]=k.useState(()=>Date.now());k.useEffect(()=>{const d=setInterval(()=>i(Date.now()),15e3);return()=>clearInterval(d)},[]);const o=k.useMemo(()=>e.filter(d=>d.launchedAt).map(d=>{const h=new Date(d.launchedAt).getTime(),m=d.status==="running"||d.status==="launching"||d.status==="idle"||d.status==="stuck",g=(d.durationMin??0)*6e4,y=m?a:h+g;return{team:d,startMs:h,endMs:y,isRunning:m}}).sort((d,h)=>d.startMs-h.startMs),[e,a]),{rangeStart:u,rangeTotal:c}=k.useMemo(()=>{if(o.length===0)return{rangeStart:a-36e5,rangeTotal:36e5};const d=Math.min(...o.map(y=>y.startMs)),m=Math.max(...o.map(y=>y.endMs),a)-d||36e5,g=m*.05;return{rangeStart:d-g,rangeTotal:m+g*2}},[o,a]),f=k.useMemo(()=>{const h=c/5,m=[];for(let g=0;g<6;g++){const y=u+h*g,x=(y-u)/c*100;m.push({pct:x,text:Cne(new Date(y))})}return m},[u,c,a]);return o.length===0?b.jsx("div",{className:"flex items-center justify-center h-40 text-dark-muted text-sm",children:"No teams with timeline data"}):b.jsx("div",{className:"w-full overflow-x-auto",children:b.jsxs("div",{className:"min-w-[600px]",children:[o.map(({team:d,startMs:h,endMs:m,isRunning:g})=>{const y=(h-u)/c*100,x=(m-h)/c*100,E=Math.max(x,.5),w=Wn[d.status]??"#8B949E",_=r===d.id,A=d.issueTitle?Tne(d.issueTitle,30):"Untitled";return b.jsxs("div",{className:"flex items-center h-8 group",onMouseEnter:()=>n(d.id),onMouseLeave:()=>n(null),children:[b.jsxs("div",{className:"w-[120px] min-w-[120px] pr-2 text-right text-xs text-dark-muted truncate shrink-0",children:["#",d.issueNumber]}),b.jsxs("div",{className:"relative flex-1 h-5 bg-dark-base rounded overflow-visible",children:[b.jsx("div",{className:`absolute top-0 h-full rounded transition-opacity ${g?"timeline-bar-pulse":""}`,style:{left:`${y}%`,width:`${E}%`,backgroundColor:w,opacity:_?1:.8},children:E>8&&b.jsxs("span",{className:"absolute inset-0 flex items-center px-1.5 text-[10px] font-medium text-dark-base truncate",children:["#",d.issueNumber," ",V5(d.durationMin??0)]})}),_&&b.jsxs("div",{className:"absolute z-50 bottom-full mb-1 px-2.5 py-1.5 rounded bg-dark-surface border border-dark-border text-xs text-dark-text whitespace-nowrap shadow-lg pointer-events-none",style:{left:`${Math.min(y+E/2,90)}%`,transform:"translateX(-50%)"},children:[b.jsxs("div",{className:"font-medium",children:["#",d.issueNumber," ",A]}),b.jsxs("div",{className:"text-dark-muted mt-0.5",children:[d.status," · ",V5(d.durationMin??0)]}),d.prNumber&&b.jsxs("div",{className:"text-dark-muted",children:["PR #",d.prNumber," · CI: ",d.ciStatus??"none"]})]})]})]},d.id)}),b.jsxs("div",{className:"flex items-center h-6 mt-1",children:[b.jsx("div",{className:"w-[120px] min-w-[120px] shrink-0"}),b.jsx("div",{className:"relative flex-1 h-full border-t border-dark-border",children:f.map((d,h)=>b.jsx("span",{className:"absolute top-1 text-[10px] text-dark-muted -translate-x-1/2",style:{left:`${d.pct}%`},children:d.text},h))})]})]})})}const Y5={stuck:0,running:1,idle:2,launching:3,queued:4,failed:5,done:6};function Mne(e){return[...e].sort((r,n)=>{const a=Y5[r.status]??99,i=Y5[n.status]??99;if(a!==i)return a-i;const o=r.launchedAt?new Date(r.launchedAt).getTime():0;return(n.launchedAt?new Date(n.launchedAt).getTime():0)-o})}function Pne(){const{teams:e,selectedTeamId:r,setSelectedTeamId:n}=Sc(),[a,i]=k.useState("grid"),o=k.useMemo(()=>Mne(e),[e]);return o.length===0?b.jsxs("div",{className:"flex flex-col items-center justify-center h-full gap-3",children:[b.jsx("svg",{className:"w-12 h-12 text-dark-muted/40",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",children:b.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M3.75 6A2.25 2.25 0 0 1 6 3.75h2.25A2.25 2.25 0 0 1 10.5 6v2.25a2.25 2.25 0 0 1-2.25 2.25H6a2.25 2.25 0 0 1-2.25-2.25V6ZM3.75 15.75A2.25 2.25 0 0 1 6 13.5h2.25a2.25 2.25 0 0 1 2.25 2.25V18a2.25 2.25 0 0 1-2.25 2.25H6A2.25 2.25 0 0 1 3.75 18v-2.25ZM13.5 6a2.25 2.25 0 0 1 2.25-2.25H18A2.25 2.25 0 0 1 20.25 6v2.25A2.25 2.25 0 0 1 18 10.5h-2.25a2.25 2.25 0 0 1-2.25-2.25V6ZM13.5 15.75a2.25 2.25 0 0 1 2.25-2.25H18a2.25 2.25 0 0 1 2.25 2.25V18A2.25 2.25 0 0 1 18 20.25h-2.25A2.25 2.25 0 0 1 13.5 18v-2.25Z"})}),b.jsx("p",{className:"text-dark-muted text-lg",children:"No teams"}),b.jsx("p",{className:"text-dark-muted/60 text-sm",children:"Launch a team to get started"})]}):b.jsxs("div",{className:"p-4",children:[b.jsxs("div",{className:"flex items-center justify-between mb-3 px-4",children:[b.jsxs("div",{className:"text-xs text-dark-muted",children:[o.length," team",o.length!==1?"s":""]}),b.jsxs("div",{className:"inline-flex rounded border border-dark-border text-xs overflow-hidden",children:[b.jsx("button",{onClick:()=>i("grid"),className:`px-3 py-1 transition-colors ${a==="grid"?"bg-dark-accent/20 text-dark-accent":"text-dark-muted hover:text-dark-text"}`,children:"Grid"}),b.jsx("button",{onClick:()=>i("timeline"),className:`px-3 py-1 border-l border-dark-border transition-colors ${a==="timeline"?"bg-dark-accent/20 text-dark-accent":"text-dark-muted hover:text-dark-text"}`,children:"Timeline"})]})]}),a==="grid"?b.jsx(One,{teams:o,selectedTeamId:r,onSelectTeam:n}):b.jsx(Nne,{teams:o})]})}function zI(e){const r=[];for(const n of e)n.state==="open"&&r.push({number:n.number,title:n.title}),n.children.length>0&&r.push(...zI(n.children));return r}function qI(e){const r=[];for(const n of e)n.children.length>0?r.push(...qI(n.children)):n.state==="open"&&r.push({number:n.number,title:n.title});return r}function jE(e,r){return[...e].map(n=>({...n,children:jE(n.children,r)})).sort((n,a)=>{var u,c;const i=((u=r.get(n.number))==null?void 0:u.priority)??999,o=((c=r.get(a.number))==null?void 0:c.priority)??999;return i-o})}function BI(){const e=Ut(),[r,n]=k.useState({priorityMap:new Map,loading:!1,error:null,costUsd:null,durationMs:null,checkedIssues:new Set}),a=k.useCallback(async h=>{const m=zI(h);if(m.length!==0){n(g=>({...g,loading:!0,error:null}));try{const g=await e.post("query/prioritizeIssues",{issues:m});if(!g.success||!g.data){const E=g.error??"Prioritization returned no data",w=g.text?`
114
+
115
+ CC output: ${g.text}`:"";n(_=>({..._,loading:!1,error:E+w}));return}const y=new Map;for(const E of g.data)y.set(E.number,E);const x=new Set(g.data.map(E=>E.number));n({priorityMap:y,loading:!1,error:null,costUsd:g.costUsd,durationMs:g.durationMs,checkedIssues:x})}catch(g){n(y=>({...y,loading:!1,error:g instanceof Error?g.message:String(g)}))}}},[e]),i=k.useCallback(async h=>{const m=qI(h);if(m.length!==0){n(g=>({...g,loading:!0,error:null}));try{const g=await e.post("query/prioritizeIssues",{issues:m});if(!g.success||!g.data){const y=g.error??"Prioritization returned no data",x=g.text?`
116
+
117
+ CC output: ${g.text}`:"";n(E=>({...E,loading:!1,error:y+x}));return}n(y=>{const x=new Map(y.priorityMap),E=new Set(y.checkedIssues);for(const w of g.data)x.set(w.number,w),E.add(w.number);return{priorityMap:x,loading:!1,error:null,costUsd:g.costUsd,durationMs:g.durationMs,checkedIssues:E}})}catch(g){n(y=>({...y,loading:!1,error:g instanceof Error?g.message:String(g)}))}}},[e]),o=k.useCallback(()=>{n({priorityMap:new Map,loading:!1,error:null,costUsd:null,durationMs:null,checkedIssues:new Set})},[]),u=k.useCallback((h,m)=>{n(g=>{const y=new Set(g.checkedIssues);return m?y.add(h):y.delete(h),{...g,checkedIssues:y}})},[]),c=r.priorityMap.size>0,f=c?[...r.priorityMap.entries()].sort((h,m)=>h[1].priority-m[1].priority).map(([h])=>h):[],d=f.filter(h=>r.checkedIssues.has(h));return{...r,prioritize:a,prioritizeSubtree:i,reset:o,toggleCheck:u,hasPriority:c,sortedIssueNumbers:f,checkedSortedIssueNumbers:d}}const $I="fleet-issue-tree-collapsed";function Rne(){try{const e=localStorage.getItem($I);if(!e)return new Set;const r=JSON.parse(e);if(Array.isArray(r))return new Set(r.filter(n=>typeof n=="string"))}catch{}return new Set}function Dne(e){try{localStorage.setItem($I,JSON.stringify([...e]))}catch{}}function Lne(){const[e,r]=k.useState(()=>Rne()),n=k.useRef(!1);k.useEffect(()=>{if(!n.current){n.current=!0;return}Dne(e)},[e]);const a=k.useCallback(c=>{r(f=>{const d=new Set(f);return d.has(c)?d.delete(c):d.add(c),d})},[]),i=k.useCallback(()=>{r(new Set)},[]),o=k.useCallback(c=>{r(new Set(c))},[]),u=k.useCallback(c=>e.has(c),[e]);return{collapsedNodes:e,toggleCollapse:a,expandAll:i,collapseAll:o,isCollapsed:u}}function Ine({completed:e,total:r}){if(r<=0)return null;const n=Math.round(e/r*100),a=n===100?"#3FB950":n>=50?"#D29922":"#58A6FF";return b.jsxs("span",{className:"inline-flex items-center gap-1.5 text-xs text-dark-muted",children:[b.jsx("span",{className:"relative w-16 h-1.5 bg-dark-border rounded-full overflow-hidden",children:b.jsx("span",{className:"absolute inset-y-0 left-0 rounded-full transition-all duration-300",style:{width:`${n}%`,backgroundColor:a}})}),b.jsxs("span",{children:[e,"/",r]})]})}function zne({state:e}){return e==="open"?b.jsx("span",{className:"inline-flex items-center gap-1 text-xs font-medium text-[#3FB950]",children:b.jsxs("svg",{className:"w-3.5 h-3.5",viewBox:"0 0 16 16",fill:"currentColor",children:[b.jsx("path",{d:"M8 9.5a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3Z"}),b.jsx("path",{d:"M8 0a8 8 0 1 1 0 16A8 8 0 0 1 8 0ZM1.5 8a6.5 6.5 0 1 0 13 0 6.5 6.5 0 0 0-13 0Z"})]})}):b.jsx("span",{className:"inline-flex items-center gap-1 text-xs font-medium text-dark-muted",children:b.jsxs("svg",{className:"w-3.5 h-3.5",viewBox:"0 0 16 16",fill:"currentColor",children:[b.jsx("path",{d:"M11.28 6.78a.75.75 0 0 0-1.06-1.06L7.25 8.69 5.78 7.22a.75.75 0 0 0-1.06 1.06l2 2a.75.75 0 0 0 1.06 0l3.5-3.5Z"}),b.jsx("path",{d:"M16 8A8 8 0 1 1 0 8a8 8 0 0 1 16 0Zm-1.5 0a6.5 6.5 0 1 0-13 0 6.5 6.5 0 0 0 13 0Z"})]})})}function qne({dependencies:e}){return!e.blockedBy||e.blockedBy.length===0||e.resolved||e.openCount===0?null:b.jsxs("span",{className:"inline-flex items-center gap-1 text-xs text-dark-muted cursor-default flex-wrap",children:[b.jsx(HK,{size:12,className:"text-[#F85149] shrink-0"}),b.jsx("span",{children:"blocked by"}),e.blockedBy.map((r,n)=>{const a=`https://github.com/${r.owner}/${r.repo}/issues/${r.number}`,i=r.state==="closed",o=r.title?`${r.title} (${r.state})`:`#${r.number} (${r.state})`;return b.jsxs("span",{children:[b.jsxs("a",{href:a,target:"_blank",rel:"noopener noreferrer",title:o,className:`hover:text-dark-accent transition-colors ${i?"line-through text-dark-muted/60":"text-dark-muted"}`,onClick:u=>u.stopPropagation(),children:["#",r.number]}),n<e.blockedBy.length-1&&b.jsx("span",{className:"text-dark-muted",children:","})]},`${r.owner}/${r.repo}#${r.number}`)})]})}function Bne({data:e}){let r,n;return e.priority<=3?(r="rgba(248, 81, 73, 0.15)",n="#F85149"):e.priority<=6?(r="rgba(210, 153, 34, 0.15)",n="#D29922"):(r="rgba(139, 148, 158, 0.15)",n="#8B949E"),b.jsxs("span",{className:"inline-flex items-center gap-1 shrink-0 px-1.5 py-0.5 rounded text-xs font-medium cursor-default",style:{backgroundColor:r,color:n},title:`Priority ${e.priority}/10 (${e.category}): ${e.reason}`,children:["P",e.priority]})}const UI=vp.memo(function e({node:r,depth:n,onLaunch:a,launchingIssues:i,launchErrors:o,forceExpand:u,projectId:c,priorityMap:f,checkedIssues:d,onCheckChange:h,onPrioritizeSubtree:m,prioritizing:g,collapsedNodes:y,onToggleCollapse:x}){var q;const E=r.number.toString(),w=y!=null&&x!=null,[_,A]=k.useState(n<2),O=w?!y.has(E):_,T=u||O,C=r.children.length>0,N=r.activeTeam!=null,M=!!(r.dependencies&&!r.dependencies.resolved&&r.dependencies.openCount>0),R=i.has(r.number),L=o.get(r.number)??null,D=async G=>{G.stopPropagation(),!R&&await a(r.number,r.title,c)},z=((q=r.prReferences)==null?void 0:q[0])??null;return b.jsxs("div",{children:[b.jsxs("div",{className:`flex items-center gap-2 py-1.5 px-2 rounded hover:bg-dark-surface/80 group transition-colors ${M?"opacity-60 border-l-2 border-[#F85149]":""}`,style:{paddingLeft:`${n*20+8}px`},children:[b.jsx("button",{disabled:!C,onClick:()=>{w?x(E):A(!T)},className:`w-4 h-4 flex items-center justify-center text-dark-muted shrink-0 transition-transform duration-150 ${C?"cursor-pointer hover:text-dark-text":"invisible"} ${T?"rotate-90":""}`,"aria-label":T?"Collapse":"Expand",tabIndex:C?0:-1,children:b.jsx("svg",{className:"w-3 h-3",viewBox:"0 0 16 16",fill:"currentColor",children:b.jsx("path",{d:"M6.22 3.22a.75.75 0 0 1 1.06 0l4.25 4.25a.75.75 0 0 1 0 1.06l-4.25 4.25a.75.75 0 0 1-1.06-1.06L9.94 8 6.22 4.28a.75.75 0 0 1 0-1.06Z"})})}),h&&f&&b.jsx("input",{type:"checkbox",checked:(d==null?void 0:d.has(r.number))??!1,onChange:G=>{G.stopPropagation(),h(r.number,G.target.checked)},className:"w-3.5 h-3.5 shrink-0 accent-dark-accent cursor-pointer","aria-label":`Select issue #${r.number}`}),b.jsx(zne,{state:r.state}),b.jsxs("a",{href:r.url,target:"_blank",rel:"noopener noreferrer",className:"text-sm text-dark-muted hover:text-dark-accent transition-colors shrink-0",onClick:G=>G.stopPropagation(),children:["#",r.number]}),b.jsx("span",{className:`text-sm truncate ${r.state==="closed"?"text-dark-muted line-through":"text-dark-text"}`,children:r.title}),(f==null?void 0:f.get(r.number))&&b.jsx("span",{className:"shrink-0 ml-1",children:b.jsx(Bne,{data:f.get(r.number)})}),R&&b.jsx("span",{className:"shrink-0 ml-1 text-xs text-dark-accent/70 animate-pulse",children:"Launching..."}),N&&b.jsx("span",{className:"shrink-0 ml-1",children:b.jsx(DS,{status:r.activeTeam.status})}),r.dependencies&&!r.dependencies.resolved&&b.jsx("span",{className:"shrink-0 ml-1",children:b.jsx(qne,{dependencies:r.dependencies})}),z&&b.jsx("span",{className:"shrink-0 ml-1",children:b.jsx(II,{prNumber:z.number,ciStatus:z.state??null})}),r.subIssueSummary&&r.subIssueSummary.total>0&&b.jsx("span",{className:"shrink-0 ml-1",children:b.jsx(Ine,{completed:r.subIssueSummary.completed,total:r.subIssueSummary.total})}),C&&m&&b.jsxs("button",{onClick:G=>{G.stopPropagation(),m(r.children)},disabled:g,className:`ml-auto shrink-0 transition-opacity inline-flex items-center gap-1 px-1.5 py-0.5 text-xs rounded border border-[#A371F7]/50 text-[#A371F7] hover:bg-[#A371F7]/10 disabled:opacity-50 disabled:cursor-not-allowed ${g?"opacity-100":"opacity-0 group-hover:opacity-100"}`,title:`Prioritize sub-issues under #${r.number}`,children:[g?b.jsxs("svg",{className:"animate-spin w-3 h-3",viewBox:"0 0 24 24",fill:"none",children:[b.jsx("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),b.jsx("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8v4a4 4 0 00-4 4H4z"})]}):b.jsx("svg",{className:"w-3 h-3",viewBox:"0 0 16 16",fill:"currentColor",children:b.jsx("path",{d:"M7.823.9l4.584 4.584-7.636 7.636L.187 8.536 7.823.9ZM14.2 6.1l-1.3 1.3-4.584-4.584L9.6 1.5a1.5 1.5 0 012.122 0L14.2 3.978a1.5 1.5 0 010 2.122Z"})}),"Prioritize"]}),!N&&r.state==="open"&&!C&&b.jsx("button",{onClick:D,disabled:R,className:`ml-auto shrink-0 transition-opacity px-1.5 py-0.5 text-xs rounded border disabled:opacity-70 disabled:cursor-not-allowed ${R?"opacity-100":"opacity-0 group-hover:opacity-100"} ${M?"border-[#D29922]/50 text-[#D29922] hover:text-[#D29922] hover:border-[#D29922]":"border-dark-border text-dark-muted hover:text-[#3FB950] hover:border-[#3FB950]/50"}`,title:M?`Launch team for #${r.number} (blocked — will prompt for confirmation)`:`Launch team for #${r.number}`,children:R?b.jsxs("svg",{className:"animate-spin w-3 h-3",viewBox:"0 0 24 24",fill:"none",children:[b.jsx("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),b.jsx("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8v4a4 4 0 00-4 4H4z"})]}):b.jsx(IK,{size:12})})]}),L&&b.jsxs("div",{className:"flex items-center gap-1.5 py-1 text-xs text-[#F85149]",style:{paddingLeft:`${n*20+32}px`},children:[b.jsx("svg",{className:"w-3 h-3 shrink-0",viewBox:"0 0 16 16",fill:"currentColor",children:b.jsx("path",{d:"M2.343 13.657A8 8 0 1 1 13.657 2.343 8 8 0 0 1 2.343 13.657ZM6.03 4.97a.751.751 0 0 0-1.042.018.751.751 0 0 0-.018 1.042L6.94 8 4.97 9.97a.749.749 0 0 0 .326 1.275.749.749 0 0 0 .734-.215L8 9.06l1.97 1.97a.749.749 0 0 0 1.275-.326.749.749 0 0 0-.215-.734L9.06 8l1.97-1.97a.749.749 0 0 0-.326-1.275.749.749 0 0 0-.734.215L8 6.94Z"})}),b.jsx("span",{children:L})]}),C&&T&&b.jsx("div",{children:r.children.map(G=>b.jsx(e,{node:G,depth:n+1,onLaunch:a,launchingIssues:i,launchErrors:o,forceExpand:u,projectId:c,priorityMap:f,checkedIssues:d,onCheckChange:h,onPrioritizeSubtree:m,prioritizing:g,collapsedNodes:y,onToggleCollapse:x},G.number))})]})}),gy=[{key:"all",label:"All"},{key:"no-team",label:"No Team"},{key:"blocked-deps",label:"Blocked",color:"#F85149"},{key:"running",label:"Running",color:"#3FB950"},{key:"idle",label:"Idle",color:"#D29922"},{key:"stuck",label:"Stuck",color:"#F85149"},{key:"done",label:"Done",color:"#A371F7"},{key:"failed",label:"Failed",color:"#F85149"}];function $ne(){var ce,B;const e=Ut(),[r,n]=k.useState([]),[a,i]=k.useState(!0),[o,u]=k.useState(!1),[c,f]=k.useState(null),[d,h]=k.useState(null),[m,g]=k.useState(0),[y,x]=k.useState(new Set),[E,w]=k.useState(new Map),[_,A]=k.useState([]),[O,T]=k.useState([]),[C,N]=k.useState(""),[M,R]=k.useState("all"),L=Lne(),[D,z]=k.useState(null),q=k.useRef(new Set);k.useEffect(()=>()=>{for(const H of q.current)clearTimeout(H);q.current.clear()},[]),k.useEffect(()=>{e.get("projects").then(A).catch(()=>{})},[e]);const G=_.filter(H=>H.status==="active"),U=G.length===1?G[0].id:null,Y=k.useCallback(async()=>{try{f(null);const H=await e.get("issues");n(H.tree),T(H.groups??[]),h(H.cachedAt),g(H.count)}catch(H){const te=H instanceof Error?H.message:String(H);f(te)}finally{i(!1)}},[e]);k.useEffect(()=>{Y()},[Y]);const $=k.useCallback(H=>{H==="dependency_resolved"&&Y()},[Y]);PS({onEvent:$});const J=k.useCallback(async()=>{if(!o){u(!0);try{f(null),await e.post("issues/refresh"),await Y()}catch(H){const te=H instanceof Error?H.message:String(H);f(te)}finally{u(!1)}}},[e,o,Y]),re=k.useCallback(async(H,te,he)=>{const ge=he??U;if(!ge){const W=G.length>1?"Multiple projects exist — use the Launch Team dialog to select one":"No active project found";w(ye=>{const K=new Map(ye);return K.set(H,W),K});const le=setTimeout(()=>{q.current.delete(le),w(ye=>{const K=new Map(ye);return K.delete(H),K})},5e3);q.current.add(le);return}x(W=>new Set(W).add(H)),w(W=>{if(!W.has(H))return W;const le=new Map(W);return le.delete(H),le});try{await e.post("teams/launch",{issueNumber:H,issueTitle:te,projectId:ge});const W=setTimeout(()=>{q.current.delete(W),x(le=>{const ye=new Set(le);return ye.delete(H),ye}),Y()},5e3);q.current.add(W)}catch(W){const le=W instanceof Error?W.message:String(W);if(W.status===409&&ge){x(ve=>{const _e=new Set(ve);return _e.delete(H),_e}),z({issueNumber:H,title:te,projectId:ge,message:le,blockers:[]});return}console.error(`[IssueTree] Failed to launch team for #${H}:`,le),x(ve=>{const _e=new Set(ve);return _e.delete(H),_e}),w(ve=>{const _e=new Map(ve);return _e.set(H,le),_e});const be=setTimeout(()=>{q.current.delete(be),w(ve=>{const _e=new Map(ve);return _e.delete(H),_e})},5e3);q.current.add(be)}},[e,Y,U,G.length]),oe=k.useCallback(async()=>{if(!D)return;const{issueNumber:H,title:te,projectId:he}=D;z(null),x(ge=>new Set(ge).add(H));try{await e.post("teams/launch",{issueNumber:H,issueTitle:te,projectId:he,force:!0});const ge=setTimeout(()=>{q.current.delete(ge),x(W=>{const le=new Set(W);return le.delete(H),le}),Y()},5e3);q.current.add(ge)}catch(ge){const W=ge instanceof Error?ge.message:String(ge);x(ye=>{const K=new Set(ye);return K.delete(H),K}),w(ye=>{const K=new Map(ye);return K.set(H,W),K});const le=setTimeout(()=>{q.current.delete(le),w(ye=>{const K=new Map(ye);return K.delete(H),K})},5e3);q.current.add(le)}},[e,D,Y]),fe=k.useMemo(()=>D2(r,C,M),[r,C,M]),F=k.useMemo(()=>O.length===0?[]:O.map(H=>({...H,tree:D2(H.tree,C,M)})).filter(H=>H.tree.length>0),[O,C,M]),Z=k.useMemo(()=>O.length>0?O.flatMap(H=>[`project-${H.projectId}`,...L2(H.tree)]):L2(r),[r,O]);return a?b.jsx("div",{className:"flex items-center justify-center h-full",children:b.jsxs("div",{className:"flex flex-col items-center gap-3",children:[b.jsxs("svg",{className:"w-8 h-8 text-dark-accent animate-spin",viewBox:"0 0 24 24",fill:"none",children:[b.jsx("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),b.jsx("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 0 1 8-8v4a4 4 0 0 0-4 4H4Z"})]}),b.jsx("p",{className:"text-dark-muted text-sm",children:"Loading issue tree..."})]})}):b.jsxs("div",{className:"flex flex-col h-full",children:[b.jsxs("div",{className:"flex items-center justify-between px-4 py-3 border-b border-dark-border shrink-0 gap-3",children:[b.jsxs("div",{className:"flex items-center gap-3 shrink-0",children:[b.jsx("h2",{className:"text-sm font-semibold text-dark-text",children:"Issue Tree"}),b.jsx("span",{className:"text-xs text-dark-muted",children:C||M!=="all"?`${Ch(fe)} of ${m} issues`:`${m} issue${m!==1?"s":""}`}),d&&!C&&b.jsxs("span",{className:"text-xs text-dark-muted",title:d,children:["·"," cached ",Kne(d)]})]}),b.jsxs("div",{className:"relative flex-1 max-w-xs",children:[b.jsx("input",{type:"text",placeholder:"Search issues... (#number or title)",value:C,onChange:H=>N(H.target.value),"aria-label":"Search issues",className:"w-full px-3 py-1 text-xs bg-[#0D1117] border border-[#30363D] rounded text-[#E6EDF3] placeholder-[#8B949E] focus:outline-none focus:border-[#58A6FF]"}),C&&b.jsx("button",{onClick:()=>N(""),className:"absolute right-2 top-1/2 -translate-y-1/2 text-[#8B949E] hover:text-[#E6EDF3] transition-colors","aria-label":"Clear search",children:b.jsx("svg",{className:"w-3 h-3",viewBox:"0 0 16 16",fill:"currentColor",children:b.jsx("path",{d:"M3.72 3.72a.75.75 0 0 1 1.06 0L8 6.94l3.22-3.22a.749.749 0 0 1 1.275.326.749.749 0 0 1-.215.734L9.06 8l3.22 3.22a.749.749 0 0 1-.326 1.275.749.749 0 0 1-.734-.215L8 9.06l-3.22 3.22a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042L6.94 8 3.72 4.78a.75.75 0 0 1 0-1.06Z"})})})]}),b.jsx("div",{className:"flex items-center gap-1 flex-wrap",children:gy.map(H=>b.jsx("button",{onClick:()=>R(H.key),className:`px-2.5 py-1 text-xs rounded-full border transition-colors ${M===H.key?"border-dark-accent/50 bg-dark-accent/20 text-dark-accent":"border-dark-border text-dark-muted hover:text-dark-text hover:border-dark-muted"}`,style:M===H.key&&"color"in H?{color:H.color,borderColor:H.color+"50",backgroundColor:H.color+"15"}:void 0,children:H.label},H.key))}),b.jsxs("div",{className:"flex items-center gap-1.5 shrink-0",children:[b.jsxs("button",{onClick:L.expandAll,className:"inline-flex items-center gap-1 px-2.5 py-1.5 text-xs rounded border border-dark-border text-dark-muted hover:text-dark-text hover:border-dark-accent/50 transition-colors",title:"Expand all tree nodes",children:[b.jsx("svg",{className:"w-3 h-3",viewBox:"0 0 16 16",fill:"currentColor",children:b.jsx("path",{d:"M8.177 14.323a.75.75 0 0 1-1.06-.146l-3.5-4.5A.75.75 0 0 1 4.211 8.5h7.578a.75.75 0 0 1 .594 1.177l-3.5 4.5a.75.75 0 0 1-.706.146ZM7.823 1.677a.75.75 0 0 1 1.06.146l3.5 4.5A.75.75 0 0 1 11.789 7.5H4.211a.75.75 0 0 1-.594-1.177l3.5-4.5a.75.75 0 0 1 .706-.146Z"})}),"Expand All"]}),b.jsxs("button",{onClick:()=>L.collapseAll(Z),className:"inline-flex items-center gap-1 px-2.5 py-1.5 text-xs rounded border border-dark-border text-dark-muted hover:text-dark-text hover:border-dark-accent/50 transition-colors",title:"Collapse all tree nodes",children:[b.jsx("svg",{className:"w-3 h-3",viewBox:"0 0 16 16",fill:"currentColor",children:b.jsx("path",{d:"M4.177 7.823a.75.75 0 0 1 .146-1.06l3.5-3.5A.75.75 0 0 1 8.5 3.557V7.5h-3.5a.75.75 0 0 1-.823-.677ZM11.823 7.823a.75.75 0 0 0-.146-1.06l-3.5-3.5A.75.75 0 0 0 7.5 3.557V7.5h3.5a.75.75 0 0 0 .823-.677ZM4.177 8.177a.75.75 0 0 0 .146 1.06l3.5 3.5a.75.75 0 0 0 .677.823V9.5H5a.75.75 0 0 0-.823.677ZM11.823 8.177a.75.75 0 0 1-.146 1.06l-3.5 3.5a.75.75 0 0 1-.677.823V9.5H11a.75.75 0 0 1 .823.677Z"})}),"Collapse All"]})]}),b.jsxs("button",{onClick:J,disabled:o,className:"inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium rounded border border-dark-border text-dark-muted hover:text-dark-text hover:border-dark-accent/50 transition-colors disabled:opacity-50 disabled:cursor-not-allowed",children:[b.jsx("svg",{className:`w-3.5 h-3.5 ${o?"animate-spin":""}`,viewBox:"0 0 16 16",fill:"currentColor",children:b.jsx("path",{d:"M1.705 8.005a.75.75 0 0 1 .834.656 5.5 5.5 0 0 0 9.592 2.97l-1.204-1.204a.25.25 0 0 1 .177-.427h3.646a.25.25 0 0 1 .25.25v3.646a.25.25 0 0 1-.427.177l-1.38-1.38A7.002 7.002 0 0 1 1.05 8.84a.75.75 0 0 1 .656-.834ZM8 2.5a5.487 5.487 0 0 0-4.131 1.869l1.204 1.204A.25.25 0 0 1 4.896 6H1.25A.25.25 0 0 1 1 5.75V2.104a.25.25 0 0 1 .427-.177l1.38 1.38A7.002 7.002 0 0 1 14.95 7.16a.75.75 0 0 1-1.49.178A5.5 5.5 0 0 0 8 2.5Z"})}),o?"Refreshing...":"Refresh"]})]}),c&&b.jsx("div",{className:"mx-4 mt-3 px-3 py-2 rounded border border-[#F85149]/30 bg-[#F85149]/10 text-xs text-[#F85149]",children:c}),b.jsx("div",{className:"flex-1 overflow-auto p-2",children:r.length===0?b.jsxs("div",{className:"flex flex-col items-center justify-center h-full gap-3",children:[b.jsx("svg",{className:"w-12 h-12 text-dark-muted/40",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",children:b.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M3.75 12h16.5m-16.5 3.75h16.5M3.75 19.5h16.5M5.625 4.5h12.75a1.875 1.875 0 0 1 0 3.75H5.625a1.875 1.875 0 0 1 0-3.75Z"})}),b.jsx("p",{className:"text-dark-muted text-lg",children:"No issues found"}),b.jsx("p",{className:"text-dark-muted/60 text-sm",children:"Click Refresh to fetch issues from GitHub"})]}):fe.length===0?b.jsxs("div",{className:"flex flex-col items-center justify-center h-full gap-3",children:[b.jsx("p",{className:"text-dark-muted text-sm",children:C&&M!=="all"?b.jsxs(b.Fragment,{children:["No issues match “",C,"” with filter “",(ce=gy.find(H=>H.key===M))==null?void 0:ce.label,"”"]}):C?b.jsxs(b.Fragment,{children:["No issues match “",C,"”"]}):b.jsxs(b.Fragment,{children:["No issues match filter “",(B=gy.find(H=>H.key===M))==null?void 0:B.label,"”"]})}),b.jsx("button",{onClick:()=>{N(""),R("all")},className:"text-xs text-dark-accent hover:underline",children:"Clear filters"})]}):F.length>0?b.jsx("div",{className:"space-y-1",children:F.map(H=>b.jsx(Fne,{group:H,onLaunch:re,launchingIssues:y,launchErrors:E,forceExpand:!!C||M!=="all",fetchTree:Y,collapsedNodes:L.collapsedNodes,onToggleCollapse:L.toggleCollapse},H.projectId))}):b.jsx(Hne,{tree:fe,projectId:U,onLaunch:re,launchingIssues:y,launchErrors:E,forceExpand:!!C||M!=="all",fetchTree:Y,collapsedNodes:L.collapsedNodes,onToggleCollapse:L.toggleCollapse})}),D&&b.jsx(Une,{issueNumber:D.issueNumber,message:D.message,onForce:oe,onCancel:()=>z(null)})]})}function Une({issueNumber:e,message:r,onForce:n,onCancel:a}){return b.jsx("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-black/50",children:b.jsxs("div",{className:"w-[420px] max-w-[95vw] bg-dark-surface border border-dark-border rounded-lg shadow-2xl",children:[b.jsx("div",{className:"px-5 py-4 border-b border-dark-border",children:b.jsxs("h3",{className:"text-sm font-semibold text-dark-text flex items-center gap-2",children:[b.jsxs("svg",{className:"w-4 h-4 text-[#F85149]",viewBox:"0 0 16 16",fill:"currentColor",children:[b.jsx("path",{d:"M4.25 7.25a.75.75 0 0 0 0 1.5h7.5a.75.75 0 0 0 0-1.5h-7.5Z"}),b.jsx("path",{d:"M16 8A8 8 0 1 1 0 8a8 8 0 0 1 16 0Zm-1.5 0a6.5 6.5 0 1 0-13 0 6.5 6.5 0 0 0 13 0Z"})]}),"Issue #",e," has unresolved dependencies"]})}),b.jsxs("div",{className:"px-5 py-4",children:[b.jsx("p",{className:"text-sm text-dark-muted mb-3",children:r}),b.jsx("p",{className:"text-xs text-dark-muted",children:"You can force launch to bypass the dependency check, but the issue may not be ready to work on."})]}),b.jsxs("div",{className:"flex items-center justify-end gap-3 px-5 py-3 border-t border-dark-border",children:[b.jsx("button",{onClick:a,className:"px-3 py-1.5 text-sm rounded border border-dark-border text-dark-muted hover:text-dark-text hover:border-dark-muted transition-colors",children:"Cancel"}),b.jsx("button",{onClick:n,className:"px-4 py-1.5 text-sm font-medium rounded border border-[#F85149]/40 text-[#F85149] bg-[#F85149]/10 hover:bg-[#F85149]/20 transition-colors",children:"Force Launch"})]})]})})}function FI({issues:e,skippedActive:r,skippedBlocked:n,projectId:a,api:i,fetchTree:o,onClose:u}){const[c,f]=k.useState(!1),[d,h]=k.useState(null),m=k.useCallback(async()=>{f(!0),h(null);try{await i.post("teams/launch-batch",{projectId:a,issues:e.map(g=>({number:g.number,title:g.title}))}),u(),setTimeout(()=>o(),3e3)}catch(g){const y=g instanceof Error?g.message:String(g);h(y),f(!1)}},[i,a,e,u,o]);return e.length===0?null:b.jsx("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-black/50",children:b.jsxs("div",{className:"w-[480px] max-w-[95vw] bg-dark-surface border border-dark-border rounded-lg shadow-2xl",children:[b.jsx("div",{className:"px-5 py-4 border-b border-dark-border",children:b.jsxs("h3",{className:"text-sm font-semibold text-dark-text flex items-center gap-2",children:[b.jsx("svg",{className:"w-4 h-4 text-[#3FB950]",viewBox:"0 0 16 16",fill:"currentColor",children:b.jsx("path",{d:"M8 0a8 8 0 1 1 0 16A8 8 0 0 1 8 0ZM1.5 8a6.5 6.5 0 1 0 13 0 6.5 6.5 0 0 0-13 0Zm4.879-2.773 4.264 2.559a.25.25 0 0 1 0 .428l-4.264 2.559A.25.25 0 0 1 6 10.559V5.442a.25.25 0 0 1 .379-.215Z"})}),"Launch ",e.length," team",e.length!==1?"s":"","?"]})}),b.jsxs("div",{className:"px-5 py-4 max-h-[50vh] overflow-auto",children:[b.jsx("ul",{className:"space-y-1 mb-3",children:e.map(g=>b.jsxs("li",{className:"text-xs text-dark-text flex items-center gap-2",children:[b.jsxs("svg",{className:"w-3 h-3 text-[#3FB950] shrink-0",viewBox:"0 0 16 16",fill:"currentColor",children:[b.jsx("path",{d:"M8 9.5a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3Z"}),b.jsx("path",{d:"M8 0a8 8 0 1 1 0 16A8 8 0 0 1 8 0ZM1.5 8a6.5 6.5 0 1 0 13 0 6.5 6.5 0 0 0-13 0Z"})]}),b.jsxs("span",{className:"text-dark-muted",children:["#",g.number]}),b.jsx("span",{className:"truncate",children:g.title})]},g.number))}),(r>0||n>0)&&b.jsxs("div",{className:"text-xs text-dark-muted space-y-0.5 mb-3 border-t border-dark-border/40 pt-2",children:[r>0&&b.jsxs("p",{children:[r," issue",r!==1?"s":""," skipped (already have active teams)"]}),n>0&&b.jsxs("p",{children:[n," issue",n!==1?"s":""," skipped (blocked by dependencies)"]})]}),d&&b.jsx("div",{className:"px-3 py-2 rounded border border-[#F85149]/30 bg-[#F85149]/10 text-xs text-[#F85149] mb-3",children:d})]}),b.jsxs("div",{className:"flex items-center justify-end gap-3 px-5 py-3 border-t border-dark-border",children:[b.jsx("button",{onClick:u,disabled:c,className:"px-3 py-1.5 text-sm rounded border border-dark-border text-dark-muted hover:text-dark-text hover:border-dark-muted transition-colors disabled:opacity-50",children:"Cancel"}),b.jsxs("button",{onClick:m,disabled:c,className:"inline-flex items-center gap-1.5 px-4 py-1.5 text-sm font-medium rounded border border-[#3FB950]/40 text-[#3FB950] bg-[#3FB950]/10 hover:bg-[#3FB950]/20 transition-colors disabled:opacity-50 disabled:cursor-not-allowed",children:[c?b.jsxs("svg",{className:"w-3.5 h-3.5 animate-spin",viewBox:"0 0 24 24",fill:"none",children:[b.jsx("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),b.jsx("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8v4a4 4 0 00-4 4H4z"})]}):b.jsx("svg",{className:"w-3.5 h-3.5",viewBox:"0 0 16 16",fill:"currentColor",children:b.jsx("path",{d:"M8 0a8 8 0 1 1 0 16A8 8 0 0 1 8 0ZM1.5 8a6.5 6.5 0 1 0 13 0 6.5 6.5 0 0 0-13 0Zm4.879-2.773 4.264 2.559a.25.25 0 0 1 0 .428l-4.264 2.559A.25.25 0 0 1 6 10.559V5.442a.25.25 0 0 1 .379-.215Z"})}),c?"Launching...":"Launch All"]})]})]})})}function HI({prioritization:e,tree:r,className:n,onRunAll:a,runAllDisabled:i}){return b.jsxs("div",{className:`flex items-center gap-2 ${n??""}`,children:[b.jsxs("button",{onClick:()=>e.prioritize(r),disabled:e.loading||r.length===0,className:"inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium rounded border border-[#A371F7]/50 text-[#A371F7] hover:bg-[#A371F7]/10 transition-colors disabled:opacity-50 disabled:cursor-not-allowed",title:"AI-prioritize open issues",children:[e.loading?b.jsxs("svg",{className:"w-3.5 h-3.5 animate-spin",viewBox:"0 0 24 24",fill:"none",children:[b.jsx("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),b.jsx("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8v4a4 4 0 00-4 4H4z"})]}):b.jsx("svg",{className:"w-3.5 h-3.5",viewBox:"0 0 16 16",fill:"currentColor",children:b.jsx("path",{d:"M7.823.9l4.584 4.584-7.636 7.636L.187 8.536 7.823.9ZM14.2 6.1l-1.3 1.3-4.584-4.584L9.6 1.5a1.5 1.5 0 012.122 0L14.2 3.978a1.5 1.5 0 010 2.122Z"})}),e.loading?"Prioritizing...":"Prioritize"]}),a&&b.jsxs("button",{onClick:a,disabled:i,className:"inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium rounded border border-[#3FB950]/50 text-[#3FB950] hover:bg-[#3FB950]/10 transition-colors disabled:opacity-50 disabled:cursor-not-allowed",title:"Launch teams for all launchable issues",children:[b.jsx("svg",{className:"w-3.5 h-3.5",viewBox:"0 0 16 16",fill:"currentColor",children:b.jsx("path",{d:"M1.5 3.5a.5.5 0 0 1 .8-.4l4.5 3.4a.5.5 0 0 1 0 .8l-4.5 3.4a.5.5 0 0 1-.8-.4V3.5Zm7 0a.5.5 0 0 1 .8-.4l4.5 3.4a.5.5 0 0 1 0 .8l-4.5 3.4a.5.5 0 0 1-.8-.4V3.5Z"})}),"Run All"]}),e.hasPriority&&b.jsxs("button",{onClick:e.reset,className:"inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium rounded border border-dark-border text-dark-muted hover:text-dark-text hover:border-dark-accent/50 transition-colors",title:"Clear prioritization",children:[b.jsx("svg",{className:"w-3.5 h-3.5",viewBox:"0 0 16 16",fill:"currentColor",children:b.jsx("path",{d:"M3.72 3.72a.75.75 0 0 1 1.06 0L8 6.94l3.22-3.22a.749.749 0 0 1 1.275.326.749.749 0 0 1-.215.734L9.06 8l3.22 3.22a.749.749 0 0 1-.326 1.275.749.749 0 0 1-.734-.215L8 9.06l-3.22 3.22a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042L6.94 8 3.72 4.78a.75.75 0 0 1 0-1.06Z"})}),"Reset"]})]})}function GI({prioritization:e,projectId:r,api:n,fetchTree:a}){const[i,o]=k.useState(!1),u=k.useRef(new Set);k.useEffect(()=>()=>{for(const f of u.current)clearTimeout(f);u.current.clear()},[]);const c=k.useCallback(async()=>{const f=e.checkedSortedIssueNumbers;if(f.length!==0){o(!0);try{await n.post("teams/launch-batch",{projectId:r,issues:f.map(h=>{const m=e.priorityMap.get(h);return{number:h,title:m==null?void 0:m.title}})});const d=setTimeout(()=>{u.current.delete(d),a()},3e3);u.current.add(d)}catch(d){console.error("[IssueTree] Batch launch failed:",d instanceof Error?d.message:String(d))}finally{o(!1)}}},[n,e.checkedSortedIssueNumbers,e.priorityMap,r,a]);return e.hasPriority?b.jsxs("div",{className:"flex items-center gap-3 px-4 py-2 border-b border-dark-border/40 bg-[#A371F7]/5",children:[b.jsxs("span",{className:"text-xs text-dark-muted",children:[e.checkedIssues.size," of ",e.priorityMap.size," selected"]}),b.jsxs("button",{onClick:c,disabled:i||e.checkedIssues.size===0,className:"inline-flex items-center gap-1.5 px-3 py-1 text-xs font-medium rounded border border-[#3FB950]/50 text-[#3FB950] hover:bg-[#3FB950]/10 transition-colors disabled:opacity-50 disabled:cursor-not-allowed",children:[i?b.jsxs("svg",{className:"w-3 h-3 animate-spin",viewBox:"0 0 24 24",fill:"none",children:[b.jsx("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),b.jsx("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8v4a4 4 0 00-4 4H4z"})]}):b.jsx("svg",{className:"w-3 h-3",viewBox:"0 0 16 16",fill:"currentColor",children:b.jsx("path",{d:"M8 0a8 8 0 1 1 0 16A8 8 0 0 1 8 0ZM1.5 8a6.5 6.5 0 1 0 13 0 6.5 6.5 0 0 0-13 0Zm4.879-2.773 4.264 2.559a.25.25 0 0 1 0 .428l-4.264 2.559A.25.25 0 0 1 6 10.559V5.442a.25.25 0 0 1 .379-.215Z"})}),e.checkedIssues.size===e.priorityMap.size?"Launch all in order":`Launch ${e.checkedIssues.size} selected in order`]}),e.costUsd!=null&&b.jsxs("span",{className:"text-xs text-dark-muted ml-auto",children:["$",e.costUsd.toFixed(4)," · ",((e.durationMs??0)/1e3).toFixed(1),"s"]})]}):null}function Fne({group:e,onLaunch:r,launchingIssues:n,launchErrors:a,forceExpand:i,fetchTree:o,collapsedNodes:u,onToggleCollapse:c}){const f=Ut(),d=`project-${e.projectId}`,h=!u.has(d),m=BI(),[g,y]=k.useState(!1),x=k.useMemo(()=>m.hasPriority?jE(e.tree,m.priorityMap):e.tree,[e.tree,m.hasPriority,m.priorityMap]),E=k.useMemo(()=>KI(e.tree),[e.tree]);return b.jsxs("div",{children:[b.jsxs("div",{className:"flex items-center gap-2 py-2 px-2 rounded hover:bg-dark-surface/60 transition-colors",children:[b.jsxs("button",{onClick:()=>c(d),className:"flex items-center gap-2 flex-1 text-left min-w-0",children:[b.jsx("span",{className:`w-4 h-4 flex items-center justify-center text-dark-muted shrink-0 transition-transform duration-150 ${h?"rotate-90":""}`,children:b.jsx("svg",{className:"w-3 h-3",viewBox:"0 0 16 16",fill:"currentColor",children:b.jsx("path",{d:"M6.22 3.22a.75.75 0 0 1 1.06 0l4.25 4.25a.75.75 0 0 1 0 1.06l-4.25 4.25a.75.75 0 0 1-1.06-1.06L9.94 8 6.22 4.28a.75.75 0 0 1 0-1.06Z"})})}),b.jsx("svg",{className:"w-4 h-4 text-dark-muted shrink-0",viewBox:"0 0 16 16",fill:"currentColor",children:b.jsx("path",{d:"M2 2.5A2.5 2.5 0 0 1 4.5 0h8.75a.75.75 0 0 1 .75.75v12.5a.75.75 0 0 1-.75.75h-2.5a.75.75 0 0 1 0-1.5h1.75v-2h-8a1 1 0 0 0-.714 1.7.75.75 0 1 1-1.072 1.05A2.495 2.495 0 0 1 2 11.5Zm10.5-1h-8a1 1 0 0 0-1 1v6.708A2.486 2.486 0 0 1 4.5 9h8ZM5 12.25a.25.25 0 0 1 .25-.25h3.5a.25.25 0 0 1 .25.25v3.25a.25.25 0 0 1-.4.2l-1.45-1.087a.25.25 0 0 0-.3 0L5.4 15.7a.25.25 0 0 1-.4-.2Z"})}),b.jsx("span",{className:"text-sm font-semibold text-dark-text truncate",children:e.projectName}),b.jsxs("span",{className:"text-xs text-dark-muted shrink-0",children:[Ch(e.tree)," issue",Ch(e.tree)!==1?"s":""]})]}),b.jsx(HI,{prioritization:m,tree:e.tree,onRunAll:()=>y(!0),runAllDisabled:E.launchable.length===0})]}),m.error&&b.jsxs("div",{className:"mx-2 mb-1 px-3 py-2 rounded border border-[#F85149]/30 bg-[#F85149]/10 text-xs text-[#F85149]",children:["Prioritization failed: ",m.error]}),b.jsx(GI,{prioritization:m,projectId:e.projectId,api:f,fetchTree:o}),h&&b.jsx("div",{className:"ml-2 border-l border-dark-border/40 pl-1",children:x.map(w=>b.jsx(UI,{node:w,depth:0,onLaunch:r,launchingIssues:n,launchErrors:a,forceExpand:i,projectId:e.projectId,priorityMap:m.hasPriority?m.priorityMap:void 0,checkedIssues:m.hasPriority?m.checkedIssues:void 0,onCheckChange:m.hasPriority?m.toggleCheck:void 0,onPrioritizeSubtree:m.prioritizeSubtree,prioritizing:m.loading,collapsedNodes:u,onToggleCollapse:c},w.number))}),g&&b.jsx(FI,{issues:E.launchable,skippedActive:E.skippedActive,skippedBlocked:E.skippedBlocked,projectId:e.projectId,api:f,fetchTree:o,onClose:()=>y(!1)})]})}function Hne({tree:e,projectId:r,onLaunch:n,launchingIssues:a,launchErrors:i,forceExpand:o,fetchTree:u,collapsedNodes:c,onToggleCollapse:f}){const d=Ut(),h=BI(),[m,g]=k.useState(!1),y=k.useMemo(()=>h.hasPriority?jE(e,h.priorityMap):e,[e,h.hasPriority,h.priorityMap]),x=k.useMemo(()=>KI(e),[e]);return b.jsxs("div",{children:[b.jsx("div",{className:"flex items-center gap-2 px-2 pb-2",children:b.jsx(HI,{prioritization:h,tree:e,onRunAll:r?()=>g(!0):void 0,runAllDisabled:x.launchable.length===0})}),h.error&&b.jsxs("div",{className:"mx-2 mb-2 px-3 py-2 rounded border border-[#F85149]/30 bg-[#F85149]/10 text-xs text-[#F85149]",children:["Prioritization failed: ",h.error]}),r&&b.jsx(GI,{prioritization:h,projectId:r,api:d,fetchTree:u}),b.jsx("div",{className:"space-y-0",children:y.map(E=>b.jsx(UI,{node:E,depth:0,onLaunch:n,launchingIssues:a,launchErrors:i,forceExpand:o,priorityMap:h.hasPriority?h.priorityMap:void 0,checkedIssues:h.hasPriority?h.checkedIssues:void 0,onCheckChange:h.hasPriority?h.toggleCheck:void 0,onPrioritizeSubtree:h.prioritizeSubtree,prioritizing:h.loading,collapsedNodes:c,onToggleCollapse:f},E.number))}),m&&r&&b.jsx(FI,{issues:x.launchable,skippedActive:x.skippedActive,skippedBlocked:x.skippedBlocked,projectId:r,api:d,fetchTree:u,onClose:()=>g(!1)})]})}function Gne(e,r){var n;return r==="all"?!0:r==="no-team"?!e.activeTeam:r==="blocked-deps"?!!(e.dependencies&&!e.dependencies.resolved):((n=e.activeTeam)==null?void 0:n.status)===r}function D2(e,r,n){const a=r.trim().length>0;if(!a&&!(n!=="all"))return e;const o=r.toLowerCase().trim(),u=/^\d+$/.test(o),c=o.startsWith("#")?parseInt(o.slice(1),10):u?parseInt(o,10):NaN;return e.reduce((f,d)=>{const h=!a||!isNaN(c)&&d.number===c||d.title.toLowerCase().includes(o),m=Gne(d,n),g=h&&m,y=D2(d.children,r,n);return(g||y.length>0)&&f.push({...d,children:y}),f},[])}function L2(e){const r=[];for(const n of e)r.push(n.number.toString()),n.children.length>0&&r.push(...L2(n.children));return r}function Ch(e){let r=0;for(const n of e)r++,r+=Ch(n.children);return r}function KI(e){const r=[];let n=0,a=0;function i(o){for(const u of o)u.state==="open"&&(u.activeTeam?n++:u.dependencies&&!u.dependencies.resolved?a++:r.push(u)),i(u.children)}return i(e),{launchable:r,skippedActive:n,skippedBlocked:a}}function Kne(e){try{return new Date(e).toLocaleTimeString([],{hour12:!1,hour:"2-digit",minute:"2-digit"})}catch{return"--:--"}}function VI(e){var r,n,a="";if(typeof e=="string"||typeof e=="number")a+=e;else if(typeof e=="object")if(Array.isArray(e)){var i=e.length;for(r=0;r<i;r++)e[r]&&(n=VI(e[r]))&&(a&&(a+=" "),a+=n)}else for(n in e)e[n]&&(a&&(a+=" "),a+=n);return a}function Je(){for(var e,r,n=0,a="",i=arguments.length;n<i;n++)(e=arguments[n])&&(r=VI(e))&&(a&&(a+=" "),a+=r);return a}var Vne=["dangerouslySetInnerHTML","onCopy","onCopyCapture","onCut","onCutCapture","onPaste","onPasteCapture","onCompositionEnd","onCompositionEndCapture","onCompositionStart","onCompositionStartCapture","onCompositionUpdate","onCompositionUpdateCapture","onFocus","onFocusCapture","onBlur","onBlurCapture","onChange","onChangeCapture","onBeforeInput","onBeforeInputCapture","onInput","onInputCapture","onReset","onResetCapture","onSubmit","onSubmitCapture","onInvalid","onInvalidCapture","onLoad","onLoadCapture","onError","onErrorCapture","onKeyDown","onKeyDownCapture","onKeyPress","onKeyPressCapture","onKeyUp","onKeyUpCapture","onAbort","onAbortCapture","onCanPlay","onCanPlayCapture","onCanPlayThrough","onCanPlayThroughCapture","onDurationChange","onDurationChangeCapture","onEmptied","onEmptiedCapture","onEncrypted","onEncryptedCapture","onEnded","onEndedCapture","onLoadedData","onLoadedDataCapture","onLoadedMetadata","onLoadedMetadataCapture","onLoadStart","onLoadStartCapture","onPause","onPauseCapture","onPlay","onPlayCapture","onPlaying","onPlayingCapture","onProgress","onProgressCapture","onRateChange","onRateChangeCapture","onSeeked","onSeekedCapture","onSeeking","onSeekingCapture","onStalled","onStalledCapture","onSuspend","onSuspendCapture","onTimeUpdate","onTimeUpdateCapture","onVolumeChange","onVolumeChangeCapture","onWaiting","onWaitingCapture","onAuxClick","onAuxClickCapture","onClick","onClickCapture","onContextMenu","onContextMenuCapture","onDoubleClick","onDoubleClickCapture","onDrag","onDragCapture","onDragEnd","onDragEndCapture","onDragEnter","onDragEnterCapture","onDragExit","onDragExitCapture","onDragLeave","onDragLeaveCapture","onDragOver","onDragOverCapture","onDragStart","onDragStartCapture","onDrop","onDropCapture","onMouseDown","onMouseDownCapture","onMouseEnter","onMouseLeave","onMouseMove","onMouseMoveCapture","onMouseOut","onMouseOutCapture","onMouseOver","onMouseOverCapture","onMouseUp","onMouseUpCapture","onSelect","onSelectCapture","onTouchCancel","onTouchCancelCapture","onTouchEnd","onTouchEndCapture","onTouchMove","onTouchMoveCapture","onTouchStart","onTouchStartCapture","onPointerDown","onPointerDownCapture","onPointerMove","onPointerMoveCapture","onPointerUp","onPointerUpCapture","onPointerCancel","onPointerCancelCapture","onPointerEnter","onPointerEnterCapture","onPointerLeave","onPointerLeaveCapture","onPointerOver","onPointerOverCapture","onPointerOut","onPointerOutCapture","onGotPointerCapture","onGotPointerCaptureCapture","onLostPointerCapture","onLostPointerCaptureCapture","onScroll","onScrollCapture","onWheel","onWheelCapture","onAnimationStart","onAnimationStartCapture","onAnimationEnd","onAnimationEndCapture","onAnimationIteration","onAnimationIterationCapture","onTransitionEnd","onTransitionEndCapture"];function AE(e){if(typeof e!="string")return!1;var r=Vne;return r.includes(e)}var Yne=["aria-activedescendant","aria-atomic","aria-autocomplete","aria-busy","aria-checked","aria-colcount","aria-colindex","aria-colspan","aria-controls","aria-current","aria-describedby","aria-details","aria-disabled","aria-errormessage","aria-expanded","aria-flowto","aria-haspopup","aria-hidden","aria-invalid","aria-keyshortcuts","aria-label","aria-labelledby","aria-level","aria-live","aria-modal","aria-multiline","aria-multiselectable","aria-orientation","aria-owns","aria-placeholder","aria-posinset","aria-pressed","aria-readonly","aria-relevant","aria-required","aria-roledescription","aria-rowcount","aria-rowindex","aria-rowspan","aria-selected","aria-setsize","aria-sort","aria-valuemax","aria-valuemin","aria-valuenow","aria-valuetext","className","color","height","id","lang","max","media","method","min","name","style","target","width","role","tabIndex","accentHeight","accumulate","additive","alignmentBaseline","allowReorder","alphabetic","amplitude","arabicForm","ascent","attributeName","attributeType","autoReverse","azimuth","baseFrequency","baselineShift","baseProfile","bbox","begin","bias","by","calcMode","capHeight","clip","clipPath","clipPathUnits","clipRule","colorInterpolation","colorInterpolationFilters","colorProfile","colorRendering","contentScriptType","contentStyleType","cursor","cx","cy","d","decelerate","descent","diffuseConstant","direction","display","divisor","dominantBaseline","dur","dx","dy","edgeMode","elevation","enableBackground","end","exponent","externalResourcesRequired","fill","fillOpacity","fillRule","filter","filterRes","filterUnits","floodColor","floodOpacity","focusable","fontFamily","fontSize","fontSizeAdjust","fontStretch","fontStyle","fontVariant","fontWeight","format","from","fx","fy","g1","g2","glyphName","glyphOrientationHorizontal","glyphOrientationVertical","glyphRef","gradientTransform","gradientUnits","hanging","horizAdvX","horizOriginX","href","ideographic","imageRendering","in2","in","intercept","k1","k2","k3","k4","k","kernelMatrix","kernelUnitLength","kerning","keyPoints","keySplines","keyTimes","lengthAdjust","letterSpacing","lightingColor","limitingConeAngle","local","markerEnd","markerHeight","markerMid","markerStart","markerUnits","markerWidth","mask","maskContentUnits","maskUnits","mathematical","mode","numOctaves","offset","opacity","operator","order","orient","orientation","origin","overflow","overlinePosition","overlineThickness","paintOrder","panose1","pathLength","patternContentUnits","patternTransform","patternUnits","pointerEvents","pointsAtX","pointsAtY","pointsAtZ","preserveAlpha","preserveAspectRatio","primitiveUnits","r","radius","refX","refY","renderingIntent","repeatCount","repeatDur","requiredExtensions","requiredFeatures","restart","result","rotate","rx","ry","seed","shapeRendering","slope","spacing","specularConstant","specularExponent","speed","spreadMethod","startOffset","stdDeviation","stemh","stemv","stitchTiles","stopColor","stopOpacity","strikethroughPosition","strikethroughThickness","string","stroke","strokeDasharray","strokeDashoffset","strokeLinecap","strokeLinejoin","strokeMiterlimit","strokeOpacity","strokeWidth","surfaceScale","systemLanguage","tableValues","targetX","targetY","textAnchor","textDecoration","textLength","textRendering","to","transform","u1","u2","underlinePosition","underlineThickness","unicode","unicodeBidi","unicodeRange","unitsPerEm","vAlphabetic","values","vectorEffect","version","vertAdvY","vertOriginX","vertOriginY","vHanging","vIdeographic","viewTarget","visibility","vMathematical","widths","wordSpacing","writingMode","x1","x2","x","xChannelSelector","xHeight","xlinkActuate","xlinkArcrole","xlinkHref","xlinkRole","xlinkShow","xlinkTitle","xlinkType","xmlBase","xmlLang","xmlns","xmlnsXlink","xmlSpace","y1","y2","y","yChannelSelector","z","zoomAndPan","ref","key","angle"],Xne=new Set(Yne);function YI(e){return typeof e!="string"?!1:Xne.has(e)}function XI(e){return typeof e=="string"&&e.startsWith("data-")}function ia(e){if(typeof e!="object"||e===null)return{};var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(YI(n)||XI(n))&&(r[n]=e[n]);return r}function Pp(e){if(e==null)return null;if(k.isValidElement(e)&&typeof e.props=="object"&&e.props!==null){var r=e.props;return ia(r)}return typeof e=="object"&&!Array.isArray(e)?ia(e):null}function sr(e){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(YI(n)||XI(n)||AE(n))&&(r[n]=e[n]);return r}function Wne(e){return e==null?null:k.isValidElement(e)?sr(e.props):typeof e=="object"&&!Array.isArray(e)?sr(e):null}var Zne=["children","width","height","viewBox","className","style","title","desc"];function I2(){return I2=Object.assign?Object.assign.bind():function(e){for(var r=1;r<arguments.length;r++){var n=arguments[r];for(var a in n)({}).hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e},I2.apply(null,arguments)}function Qne(e,r){if(e==null)return{};var n,a,i=Jne(e,r);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(a=0;a<o.length;a++)n=o[a],r.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function Jne(e,r){if(e==null)return{};var n={};for(var a in e)if({}.hasOwnProperty.call(e,a)){if(r.indexOf(a)!==-1)continue;n[a]=e[a]}return n}var WI=k.forwardRef((e,r)=>{var{children:n,width:a,height:i,viewBox:o,className:u,style:c,title:f,desc:d}=e,h=Qne(e,Zne),m=o||{width:a,height:i,x:0,y:0},g=Je("recharts-surface",u);return k.createElement("svg",I2({},sr(h),{className:g,width:a,height:i,style:c,viewBox:"".concat(m.x," ").concat(m.y," ").concat(m.width," ").concat(m.height),ref:r}),k.createElement("title",null,f),k.createElement("desc",null,d),n)}),eae=["children","className"];function z2(){return z2=Object.assign?Object.assign.bind():function(e){for(var r=1;r<arguments.length;r++){var n=arguments[r];for(var a in n)({}).hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e},z2.apply(null,arguments)}function tae(e,r){if(e==null)return{};var n,a,i=rae(e,r);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(a=0;a<o.length;a++)n=o[a],r.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function rae(e,r){if(e==null)return{};var n={};for(var a in e)if({}.hasOwnProperty.call(e,a)){if(r.indexOf(a)!==-1)continue;n[a]=e[a]}return n}var oa=k.forwardRef((e,r)=>{var{children:n,className:a}=e,i=tae(e,eae),o=Je("recharts-layer",a);return k.createElement("g",z2({className:o},sr(i),{ref:r}),n)}),nae=k.createContext(null);function nt(e){return function(){return e}}const ZI=Math.cos,Th=Math.sin,In=Math.sqrt,Nh=Math.PI,Rp=2*Nh,q2=Math.PI,B2=2*q2,xo=1e-6,aae=B2-xo;function QI(e){this._+=e[0];for(let r=1,n=e.length;r<n;++r)this._+=arguments[r]+e[r]}function iae(e){let r=Math.floor(e);if(!(r>=0))throw new Error(`invalid digits: ${e}`);if(r>15)return QI;const n=10**r;return function(a){this._+=a[0];for(let i=1,o=a.length;i<o;++i)this._+=Math.round(arguments[i]*n)/n+a[i]}}class oae{constructor(r){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=r==null?QI:iae(r)}moveTo(r,n){this._append`M${this._x0=this._x1=+r},${this._y0=this._y1=+n}`}closePath(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._append`Z`)}lineTo(r,n){this._append`L${this._x1=+r},${this._y1=+n}`}quadraticCurveTo(r,n,a,i){this._append`Q${+r},${+n},${this._x1=+a},${this._y1=+i}`}bezierCurveTo(r,n,a,i,o,u){this._append`C${+r},${+n},${+a},${+i},${this._x1=+o},${this._y1=+u}`}arcTo(r,n,a,i,o){if(r=+r,n=+n,a=+a,i=+i,o=+o,o<0)throw new Error(`negative radius: ${o}`);let u=this._x1,c=this._y1,f=a-r,d=i-n,h=u-r,m=c-n,g=h*h+m*m;if(this._x1===null)this._append`M${this._x1=r},${this._y1=n}`;else if(g>xo)if(!(Math.abs(m*f-d*h)>xo)||!o)this._append`L${this._x1=r},${this._y1=n}`;else{let y=a-u,x=i-c,E=f*f+d*d,w=y*y+x*x,_=Math.sqrt(E),A=Math.sqrt(g),O=o*Math.tan((q2-Math.acos((E+g-w)/(2*_*A)))/2),T=O/A,C=O/_;Math.abs(T-1)>xo&&this._append`L${r+T*h},${n+T*m}`,this._append`A${o},${o},0,0,${+(m*y>h*x)},${this._x1=r+C*f},${this._y1=n+C*d}`}}arc(r,n,a,i,o,u){if(r=+r,n=+n,a=+a,u=!!u,a<0)throw new Error(`negative radius: ${a}`);let c=a*Math.cos(i),f=a*Math.sin(i),d=r+c,h=n+f,m=1^u,g=u?i-o:o-i;this._x1===null?this._append`M${d},${h}`:(Math.abs(this._x1-d)>xo||Math.abs(this._y1-h)>xo)&&this._append`L${d},${h}`,a&&(g<0&&(g=g%B2+B2),g>aae?this._append`A${a},${a},0,1,${m},${r-c},${n-f}A${a},${a},0,1,${m},${this._x1=d},${this._y1=h}`:g>xo&&this._append`A${a},${a},0,${+(g>=q2)},${m},${this._x1=r+a*Math.cos(o)},${this._y1=n+a*Math.sin(o)}`)}rect(r,n,a,i){this._append`M${this._x0=this._x1=+r},${this._y0=this._y1=+n}h${a=+a}v${+i}h${-a}Z`}toString(){return this._}}function OE(e){let r=3;return e.digits=function(n){if(!arguments.length)return r;if(n==null)r=null;else{const a=Math.floor(n);if(!(a>=0))throw new RangeError(`invalid digits: ${n}`);r=a}return e},()=>new oae(r)}function CE(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function JI(e){this._context=e}JI.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,r){switch(e=+e,r=+r,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,r):this._context.moveTo(e,r);break;case 1:this._point=2;default:this._context.lineTo(e,r);break}}};function Dp(e){return new JI(e)}function ez(e){return e[0]}function tz(e){return e[1]}function rz(e,r){var n=nt(!0),a=null,i=Dp,o=null,u=OE(c);e=typeof e=="function"?e:e===void 0?ez:nt(e),r=typeof r=="function"?r:r===void 0?tz:nt(r);function c(f){var d,h=(f=CE(f)).length,m,g=!1,y;for(a==null&&(o=i(y=u())),d=0;d<=h;++d)!(d<h&&n(m=f[d],d,f))===g&&((g=!g)?o.lineStart():o.lineEnd()),g&&o.point(+e(m,d,f),+r(m,d,f));if(y)return o=null,y+""||null}return c.x=function(f){return arguments.length?(e=typeof f=="function"?f:nt(+f),c):e},c.y=function(f){return arguments.length?(r=typeof f=="function"?f:nt(+f),c):r},c.defined=function(f){return arguments.length?(n=typeof f=="function"?f:nt(!!f),c):n},c.curve=function(f){return arguments.length?(i=f,a!=null&&(o=i(a)),c):i},c.context=function(f){return arguments.length?(f==null?a=o=null:o=i(a=f),c):a},c}function Md(e,r,n){var a=null,i=nt(!0),o=null,u=Dp,c=null,f=OE(d);e=typeof e=="function"?e:e===void 0?ez:nt(+e),r=typeof r=="function"?r:nt(r===void 0?0:+r),n=typeof n=="function"?n:n===void 0?tz:nt(+n);function d(m){var g,y,x,E=(m=CE(m)).length,w,_=!1,A,O=new Array(E),T=new Array(E);for(o==null&&(c=u(A=f())),g=0;g<=E;++g){if(!(g<E&&i(w=m[g],g,m))===_)if(_=!_)y=g,c.areaStart(),c.lineStart();else{for(c.lineEnd(),c.lineStart(),x=g-1;x>=y;--x)c.point(O[x],T[x]);c.lineEnd(),c.areaEnd()}_&&(O[g]=+e(w,g,m),T[g]=+r(w,g,m),c.point(a?+a(w,g,m):O[g],n?+n(w,g,m):T[g]))}if(A)return c=null,A+""||null}function h(){return rz().defined(i).curve(u).context(o)}return d.x=function(m){return arguments.length?(e=typeof m=="function"?m:nt(+m),a=null,d):e},d.x0=function(m){return arguments.length?(e=typeof m=="function"?m:nt(+m),d):e},d.x1=function(m){return arguments.length?(a=m==null?null:typeof m=="function"?m:nt(+m),d):a},d.y=function(m){return arguments.length?(r=typeof m=="function"?m:nt(+m),n=null,d):r},d.y0=function(m){return arguments.length?(r=typeof m=="function"?m:nt(+m),d):r},d.y1=function(m){return arguments.length?(n=m==null?null:typeof m=="function"?m:nt(+m),d):n},d.lineX0=d.lineY0=function(){return h().x(e).y(r)},d.lineY1=function(){return h().x(e).y(n)},d.lineX1=function(){return h().x(a).y(r)},d.defined=function(m){return arguments.length?(i=typeof m=="function"?m:nt(!!m),d):i},d.curve=function(m){return arguments.length?(u=m,o!=null&&(c=u(o)),d):u},d.context=function(m){return arguments.length?(m==null?o=c=null:c=u(o=m),d):o},d}class nz{constructor(r,n){this._context=r,this._x=n}areaStart(){this._line=0}areaEnd(){this._line=NaN}lineStart(){this._point=0}lineEnd(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line}point(r,n){switch(r=+r,n=+n,this._point){case 0:{this._point=1,this._line?this._context.lineTo(r,n):this._context.moveTo(r,n);break}case 1:this._point=2;default:{this._x?this._context.bezierCurveTo(this._x0=(this._x0+r)/2,this._y0,this._x0,n,r,n):this._context.bezierCurveTo(this._x0,this._y0=(this._y0+n)/2,r,this._y0,r,n);break}}this._x0=r,this._y0=n}}function lae(e){return new nz(e,!0)}function uae(e){return new nz(e,!1)}const TE={draw(e,r){const n=In(r/Nh);e.moveTo(n,0),e.arc(0,0,n,0,Rp)}},sae={draw(e,r){const n=In(r/5)/2;e.moveTo(-3*n,-n),e.lineTo(-n,-n),e.lineTo(-n,-3*n),e.lineTo(n,-3*n),e.lineTo(n,-n),e.lineTo(3*n,-n),e.lineTo(3*n,n),e.lineTo(n,n),e.lineTo(n,3*n),e.lineTo(-n,3*n),e.lineTo(-n,n),e.lineTo(-3*n,n),e.closePath()}},az=In(1/3),cae=az*2,fae={draw(e,r){const n=In(r/cae),a=n*az;e.moveTo(0,-n),e.lineTo(a,0),e.lineTo(0,n),e.lineTo(-a,0),e.closePath()}},dae={draw(e,r){const n=In(r),a=-n/2;e.rect(a,a,n,n)}},hae=.8908130915292852,iz=Th(Nh/10)/Th(7*Nh/10),pae=Th(Rp/10)*iz,mae=-ZI(Rp/10)*iz,vae={draw(e,r){const n=In(r*hae),a=pae*n,i=mae*n;e.moveTo(0,-n),e.lineTo(a,i);for(let o=1;o<5;++o){const u=Rp*o/5,c=ZI(u),f=Th(u);e.lineTo(f*n,-c*n),e.lineTo(c*a-f*i,f*a+c*i)}e.closePath()}},yy=In(3),gae={draw(e,r){const n=-In(r/(yy*3));e.moveTo(0,n*2),e.lineTo(-yy*n,-n),e.lineTo(yy*n,-n),e.closePath()}},ln=-.5,un=In(3)/2,$2=1/In(12),yae=($2/2+1)*3,bae={draw(e,r){const n=In(r/yae),a=n/2,i=n*$2,o=a,u=n*$2+n,c=-o,f=u;e.moveTo(a,i),e.lineTo(o,u),e.lineTo(c,f),e.lineTo(ln*a-un*i,un*a+ln*i),e.lineTo(ln*o-un*u,un*o+ln*u),e.lineTo(ln*c-un*f,un*c+ln*f),e.lineTo(ln*a+un*i,ln*i-un*a),e.lineTo(ln*o+un*u,ln*u-un*o),e.lineTo(ln*c+un*f,ln*f-un*c),e.closePath()}};function xae(e,r){let n=null,a=OE(i);e=typeof e=="function"?e:nt(e||TE),r=typeof r=="function"?r:nt(r===void 0?64:+r);function i(){let o;if(n||(n=o=a()),e.apply(this,arguments).draw(n,+r.apply(this,arguments)),o)return n=null,o+""||null}return i.type=function(o){return arguments.length?(e=typeof o=="function"?o:nt(o),i):e},i.size=function(o){return arguments.length?(r=typeof o=="function"?o:nt(+o),i):r},i.context=function(o){return arguments.length?(n=o??null,i):n},i}function Mh(){}function Ph(e,r,n){e._context.bezierCurveTo((2*e._x0+e._x1)/3,(2*e._y0+e._y1)/3,(e._x0+2*e._x1)/3,(e._y0+2*e._y1)/3,(e._x0+4*e._x1+r)/6,(e._y0+4*e._y1+n)/6)}function oz(e){this._context=e}oz.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){switch(this._point){case 3:Ph(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,r){switch(e=+e,r=+r,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,r):this._context.moveTo(e,r);break;case 1:this._point=2;break;case 2:this._point=3,this._context.lineTo((5*this._x0+this._x1)/6,(5*this._y0+this._y1)/6);default:Ph(this,e,r);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=r}};function _ae(e){return new oz(e)}function lz(e){this._context=e}lz.prototype={areaStart:Mh,areaEnd:Mh,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._y0=this._y1=this._y2=this._y3=this._y4=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x2,this._y2),this._context.closePath();break}case 2:{this._context.moveTo((this._x2+2*this._x3)/3,(this._y2+2*this._y3)/3),this._context.lineTo((this._x3+2*this._x2)/3,(this._y3+2*this._y2)/3),this._context.closePath();break}case 3:{this.point(this._x2,this._y2),this.point(this._x3,this._y3),this.point(this._x4,this._y4);break}}},point:function(e,r){switch(e=+e,r=+r,this._point){case 0:this._point=1,this._x2=e,this._y2=r;break;case 1:this._point=2,this._x3=e,this._y3=r;break;case 2:this._point=3,this._x4=e,this._y4=r,this._context.moveTo((this._x0+4*this._x1+e)/6,(this._y0+4*this._y1+r)/6);break;default:Ph(this,e,r);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=r}};function wae(e){return new lz(e)}function uz(e){this._context=e}uz.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(e,r){switch(e=+e,r=+r,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var n=(this._x0+4*this._x1+e)/6,a=(this._y0+4*this._y1+r)/6;this._line?this._context.lineTo(n,a):this._context.moveTo(n,a);break;case 3:this._point=4;default:Ph(this,e,r);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=r}};function Sae(e){return new uz(e)}function sz(e){this._context=e}sz.prototype={areaStart:Mh,areaEnd:Mh,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(e,r){e=+e,r=+r,this._point?this._context.lineTo(e,r):(this._point=1,this._context.moveTo(e,r))}};function Eae(e){return new sz(e)}function X5(e){return e<0?-1:1}function W5(e,r,n){var a=e._x1-e._x0,i=r-e._x1,o=(e._y1-e._y0)/(a||i<0&&-0),u=(n-e._y1)/(i||a<0&&-0),c=(o*i+u*a)/(a+i);return(X5(o)+X5(u))*Math.min(Math.abs(o),Math.abs(u),.5*Math.abs(c))||0}function Z5(e,r){var n=e._x1-e._x0;return n?(3*(e._y1-e._y0)/n-r)/2:r}function by(e,r,n){var a=e._x0,i=e._y0,o=e._x1,u=e._y1,c=(o-a)/3;e._context.bezierCurveTo(a+c,i+c*r,o-c,u-c*n,o,u)}function Rh(e){this._context=e}Rh.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=this._t0=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x1,this._y1);break;case 3:by(this,this._t0,Z5(this,this._t0));break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,r){var n=NaN;if(e=+e,r=+r,!(e===this._x1&&r===this._y1)){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(e,r):this._context.moveTo(e,r);break;case 1:this._point=2;break;case 2:this._point=3,by(this,Z5(this,n=W5(this,e,r)),n);break;default:by(this,this._t0,n=W5(this,e,r));break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=r,this._t0=n}}};function cz(e){this._context=new fz(e)}(cz.prototype=Object.create(Rh.prototype)).point=function(e,r){Rh.prototype.point.call(this,r,e)};function fz(e){this._context=e}fz.prototype={moveTo:function(e,r){this._context.moveTo(r,e)},closePath:function(){this._context.closePath()},lineTo:function(e,r){this._context.lineTo(r,e)},bezierCurveTo:function(e,r,n,a,i,o){this._context.bezierCurveTo(r,e,a,n,o,i)}};function kae(e){return new Rh(e)}function jae(e){return new cz(e)}function dz(e){this._context=e}dz.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var e=this._x,r=this._y,n=e.length;if(n)if(this._line?this._context.lineTo(e[0],r[0]):this._context.moveTo(e[0],r[0]),n===2)this._context.lineTo(e[1],r[1]);else for(var a=Q5(e),i=Q5(r),o=0,u=1;u<n;++o,++u)this._context.bezierCurveTo(a[0][o],i[0][o],a[1][o],i[1][o],e[u],r[u]);(this._line||this._line!==0&&n===1)&&this._context.closePath(),this._line=1-this._line,this._x=this._y=null},point:function(e,r){this._x.push(+e),this._y.push(+r)}};function Q5(e){var r,n=e.length-1,a,i=new Array(n),o=new Array(n),u=new Array(n);for(i[0]=0,o[0]=2,u[0]=e[0]+2*e[1],r=1;r<n-1;++r)i[r]=1,o[r]=4,u[r]=4*e[r]+2*e[r+1];for(i[n-1]=2,o[n-1]=7,u[n-1]=8*e[n-1]+e[n],r=1;r<n;++r)a=i[r]/o[r-1],o[r]-=a,u[r]-=a*u[r-1];for(i[n-1]=u[n-1]/o[n-1],r=n-2;r>=0;--r)i[r]=(u[r]-i[r+1])/o[r];for(o[n-1]=(e[n]+i[n-1])/2,r=0;r<n-1;++r)o[r]=2*e[r+1]-i[r+1];return[i,o]}function Aae(e){return new dz(e)}function Lp(e,r){this._context=e,this._t=r}Lp.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=this._y=NaN,this._point=0},lineEnd:function(){0<this._t&&this._t<1&&this._point===2&&this._context.lineTo(this._x,this._y),(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line>=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(e,r){switch(e=+e,r=+r,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,r):this._context.moveTo(e,r);break;case 1:this._point=2;default:{if(this._t<=0)this._context.lineTo(this._x,r),this._context.lineTo(e,r);else{var n=this._x*(1-this._t)+e*this._t;this._context.lineTo(n,this._y),this._context.lineTo(n,r)}break}}this._x=e,this._y=r}};function Oae(e){return new Lp(e,.5)}function Cae(e){return new Lp(e,0)}function Tae(e){return new Lp(e,1)}function Ro(e,r){if((u=e.length)>1)for(var n=1,a,i,o=e[r[0]],u,c=o.length;n<u;++n)for(i=o,o=e[r[n]],a=0;a<c;++a)o[a][1]+=o[a][0]=isNaN(i[a][1])?i[a][0]:i[a][1]}function U2(e){for(var r=e.length,n=new Array(r);--r>=0;)n[r]=r;return n}function Nae(e,r){return e[r]}function Mae(e){const r=[];return r.key=e,r}function Pae(){var e=nt([]),r=U2,n=Ro,a=Nae;function i(o){var u=Array.from(e.apply(this,arguments),Mae),c,f=u.length,d=-1,h;for(const m of o)for(c=0,++d;c<f;++c)(u[c][d]=[0,+a(m,u[c].key,d,o)]).data=m;for(c=0,h=CE(r(u));c<f;++c)u[h[c]].index=c;return n(u,h),u}return i.keys=function(o){return arguments.length?(e=typeof o=="function"?o:nt(Array.from(o)),i):e},i.value=function(o){return arguments.length?(a=typeof o=="function"?o:nt(+o),i):a},i.order=function(o){return arguments.length?(r=o==null?U2:typeof o=="function"?o:nt(Array.from(o)),i):r},i.offset=function(o){return arguments.length?(n=o??Ro,i):n},i}function Rae(e,r){if((a=e.length)>0){for(var n,a,i=0,o=e[0].length,u;i<o;++i){for(u=n=0;n<a;++n)u+=e[n][i][1]||0;if(u)for(n=0;n<a;++n)e[n][i][1]/=u}Ro(e,r)}}function Dae(e,r){if((i=e.length)>0){for(var n=0,a=e[r[0]],i,o=a.length;n<o;++n){for(var u=0,c=0;u<i;++u)c+=e[u][n][1]||0;a[n][1]+=a[n][0]=-c/2}Ro(e,r)}}function Lae(e,r){if(!(!((u=e.length)>0)||!((o=(i=e[r[0]]).length)>0))){for(var n=0,a=1,i,o,u;a<o;++a){for(var c=0,f=0,d=0;c<u;++c){for(var h=e[r[c]],m=h[a][1]||0,g=h[a-1][1]||0,y=(m-g)/2,x=0;x<c;++x){var E=e[r[x]],w=E[a][1]||0,_=E[a-1][1]||0;y+=w-_}f+=m,d+=y*m}i[a-1][1]+=i[a-1][0]=n,f&&(n-=d/f)}i[a-1][1]+=i[a-1][0]=n,Ro(e,r)}}var xy={},_y={},J5;function Iae(){return J5||(J5=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function r(n){return n==="__proto__"}e.isUnsafeProperty=r})(_y)),_y}var wy={},eN;function hz(){return eN||(eN=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function r(n){switch(typeof n){case"number":case"symbol":return!1;case"string":return n.includes(".")||n.includes("[")||n.includes("]")}}e.isDeepKey=r})(wy)),wy}var Sy={},tN;function NE(){return tN||(tN=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function r(n){var a;return typeof n=="string"||typeof n=="symbol"?n:Object.is((a=n==null?void 0:n.valueOf)==null?void 0:a.call(n),-0)?"-0":String(n)}e.toKey=r})(Sy)),Sy}var Ey={},ky={},rN;function zae(){return rN||(rN=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function r(n){if(n==null)return"";if(typeof n=="string")return n;if(Array.isArray(n))return n.map(r).join(",");const a=String(n);return a==="0"&&Object.is(Number(n),-0)?"-0":a}e.toString=r})(ky)),ky}var nN;function ME(){return nN||(nN=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const r=zae(),n=NE();function a(i){if(Array.isArray(i))return i.map(n.toKey);if(typeof i=="symbol")return[i];i=r.toString(i);const o=[],u=i.length;if(u===0)return o;let c=0,f="",d="",h=!1;for(i.charCodeAt(0)===46&&(o.push(""),c++);c<u;){const m=i[c];d?m==="\\"&&c+1<u?(c++,f+=i[c]):m===d?d="":f+=m:h?m==='"'||m==="'"?d=m:m==="]"?(h=!1,o.push(f),f=""):f+=m:m==="["?(h=!0,f&&(o.push(f),f="")):m==="."?f&&(o.push(f),f=""):f+=m,c++}return f&&o.push(f),o}e.toPath=a})(Ey)),Ey}var aN;function PE(){return aN||(aN=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const r=Iae(),n=hz(),a=NE(),i=ME();function o(c,f,d){if(c==null)return d;switch(typeof f){case"string":{if(r.isUnsafeProperty(f))return d;const h=c[f];return h===void 0?n.isDeepKey(f)?o(c,i.toPath(f),d):d:h}case"number":case"symbol":{typeof f=="number"&&(f=a.toKey(f));const h=c[f];return h===void 0?d:h}default:{if(Array.isArray(f))return u(c,f,d);if(Object.is(f==null?void 0:f.valueOf(),-0)?f="-0":f=String(f),r.isUnsafeProperty(f))return d;const h=c[f];return h===void 0?d:h}}}function u(c,f,d){if(f.length===0)return d;let h=c;for(let m=0;m<f.length;m++){if(h==null||r.isUnsafeProperty(f[m]))return d;h=h[f[m]]}return h===void 0?d:h}e.get=o})(xy)),xy}var jy,iN;function qae(){return iN||(iN=1,jy=PE().get),jy}var Bae=qae();const Ip=Dn(Bae);var $ae=4;function Bi(e){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:$ae,n=10**r,a=Math.round(e*n)/n;return Object.is(a,-0)?0:a}function xt(e){for(var r=arguments.length,n=new Array(r>1?r-1:0),a=1;a<r;a++)n[a-1]=arguments[a];return e.reduce((i,o,u)=>{var c=n[u-1];return typeof c=="string"?i+c+o:c!==void 0?i+Bi(c)+o:i+o},"")}var mn=e=>e===0?0:e>0?1:-1,Wa=e=>typeof e=="number"&&e!=+e,Do=e=>typeof e=="string"&&e.indexOf("%")===e.length-1,ke=e=>(typeof e=="number"||e instanceof Number)&&!Wa(e),gn=e=>ke(e)||typeof e=="string",Uae=0,lc=e=>{var r=++Uae;return"".concat(e||"").concat(r)},Fi=function(r,n){var a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;if(!ke(r)&&typeof r!="string")return a;var o;if(Do(r)){if(n==null)return a;var u=r.indexOf("%");o=n*parseFloat(r.slice(0,u))/100}else o=+r;return Wa(o)&&(o=a),i&&n!=null&&o>n&&(o=n),o},pz=e=>{if(!Array.isArray(e))return!1;for(var r=e.length,n={},a=0;a<r;a++)if(!n[String(e[a])])n[String(e[a])]=!0;else return!0;return!1};function Or(e,r,n){return ke(e)&&ke(r)?Bi(e+n*(r-e)):r}function mz(e,r,n){if(!(!e||!e.length))return e.find(a=>a&&(typeof r=="function"?r(a):Ip(a,r))===n)}var $t=e=>e===null||typeof e>"u",Mc=e=>$t(e)?e:"".concat(e.charAt(0).toUpperCase()).concat(e.slice(1));function Tr(e){return e!=null}function Fo(){}var Fae=["type","size","sizeType"];function F2(){return F2=Object.assign?Object.assign.bind():function(e){for(var r=1;r<arguments.length;r++){var n=arguments[r];for(var a in n)({}).hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e},F2.apply(null,arguments)}function oN(e,r){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);r&&(a=a.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,a)}return n}function lN(e){for(var r=1;r<arguments.length;r++){var n=arguments[r]!=null?arguments[r]:{};r%2?oN(Object(n),!0).forEach(function(a){Hae(e,a,n[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):oN(Object(n)).forEach(function(a){Object.defineProperty(e,a,Object.getOwnPropertyDescriptor(n,a))})}return e}function Hae(e,r,n){return(r=Gae(r))in e?Object.defineProperty(e,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[r]=n,e}function Gae(e){var r=Kae(e,"string");return typeof r=="symbol"?r:r+""}function Kae(e,r){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var a=n.call(e,r);if(typeof a!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return(r==="string"?String:Number)(e)}function Vae(e,r){if(e==null)return{};var n,a,i=Yae(e,r);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(a=0;a<o.length;a++)n=o[a],r.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function Yae(e,r){if(e==null)return{};var n={};for(var a in e)if({}.hasOwnProperty.call(e,a)){if(r.indexOf(a)!==-1)continue;n[a]=e[a]}return n}var vz={symbolCircle:TE,symbolCross:sae,symbolDiamond:fae,symbolSquare:dae,symbolStar:vae,symbolTriangle:gae,symbolWye:bae},Xae=Math.PI/180,Wae=e=>{var r="symbol".concat(Mc(e));return vz[r]||TE},Zae=(e,r,n)=>{if(r==="area")return e;switch(n){case"cross":return 5*e*e/9;case"diamond":return .5*e*e/Math.sqrt(3);case"square":return e*e;case"star":{var a=18*Xae;return 1.25*e*e*(Math.tan(a)-Math.tan(a*2)*Math.tan(a)**2)}case"triangle":return Math.sqrt(3)*e*e/4;case"wye":return(21-10*Math.sqrt(3))*e*e/8;default:return Math.PI*e*e/4}},Qae=(e,r)=>{vz["symbol".concat(Mc(e))]=r},gz=e=>{var{type:r="circle",size:n=64,sizeType:a="area"}=e,i=Vae(e,Fae),o=lN(lN({},i),{},{type:r,size:n,sizeType:a}),u="circle";typeof r=="string"&&(u=r);var c=()=>{var g=Wae(u),y=xae().type(g).size(Zae(n,a,u)),x=y();if(x!==null)return x},{className:f,cx:d,cy:h}=o,m=sr(o);return ke(d)&&ke(h)&&ke(n)?k.createElement("path",F2({},m,{className:Je("recharts-symbols",f),transform:"translate(".concat(d,", ").concat(h,")"),d:c()})):null};gz.registerSymbol=Qae;var yz=e=>"radius"in e&&"startAngle"in e&&"endAngle"in e,RE=(e,r)=>{if(!e||typeof e=="function"||typeof e=="boolean")return null;var n=e;if(k.isValidElement(e)&&(n=e.props),typeof n!="object"&&typeof n!="function")return null;var a={};return Object.keys(n).forEach(i=>{AE(i)&&typeof n[i]=="function"&&(a[i]=(o=>n[i](n,o)))}),a},Jae=(e,r,n)=>a=>(e(r,n,a),null),eie=(e,r,n)=>{if(e===null||typeof e!="object"&&typeof e!="function")return null;var a=null;return Object.keys(e).forEach(i=>{var o=e[i];AE(i)&&typeof o=="function"&&(a||(a={}),a[i]=Jae(o,r,n))}),a};function uN(e,r){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);r&&(a=a.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,a)}return n}function tie(e){for(var r=1;r<arguments.length;r++){var n=arguments[r]!=null?arguments[r]:{};r%2?uN(Object(n),!0).forEach(function(a){rie(e,a,n[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):uN(Object(n)).forEach(function(a){Object.defineProperty(e,a,Object.getOwnPropertyDescriptor(n,a))})}return e}function rie(e,r,n){return(r=nie(r))in e?Object.defineProperty(e,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[r]=n,e}function nie(e){var r=aie(e,"string");return typeof r=="symbol"?r:r+""}function aie(e,r){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var a=n.call(e,r);if(typeof a!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return(r==="string"?String:Number)(e)}function gr(e,r){var n=tie({},e),a=r,i=Object.keys(r),o=i.reduce((u,c)=>(u[c]===void 0&&a[c]!==void 0&&(u[c]=a[c]),u),n);return o}var Ay={},Oy={},sN;function iie(){return sN||(sN=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function r(n,a){const i=new Map;for(let o=0;o<n.length;o++){const u=n[o],c=a(u,o,n);i.has(c)||i.set(c,u)}return Array.from(i.values())}e.uniqBy=r})(Oy)),Oy}var Cy={},cN;function oie(){return cN||(cN=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function r(n,a){return function(...i){return n.apply(this,i.slice(0,a))}}e.ary=r})(Cy)),Cy}var Ty={},fN;function bz(){return fN||(fN=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function r(n){return n}e.identity=r})(Ty)),Ty}var Ny={},My={},Py={},dN;function lie(){return dN||(dN=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function r(n){return Number.isSafeInteger(n)&&n>=0}e.isLength=r})(Py)),Py}var hN;function xz(){return hN||(hN=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const r=lie();function n(a){return a!=null&&typeof a!="function"&&r.isLength(a.length)}e.isArrayLike=n})(My)),My}var Ry={},pN;function uie(){return pN||(pN=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function r(n){return typeof n=="object"&&n!==null}e.isObjectLike=r})(Ry)),Ry}var mN;function sie(){return mN||(mN=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const r=xz(),n=uie();function a(i){return n.isObjectLike(i)&&r.isArrayLike(i)}e.isArrayLikeObject=a})(Ny)),Ny}var Dy={},Ly={},vN;function cie(){return vN||(vN=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const r=PE();function n(a){return function(i){return r.get(i,a)}}e.property=n})(Ly)),Ly}var Iy={},zy={},qy={},By={},gN;function _z(){return gN||(gN=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function r(n){return n!==null&&(typeof n=="object"||typeof n=="function")}e.isObject=r})(By)),By}var $y={},yN;function wz(){return yN||(yN=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function r(n){return n==null||typeof n!="object"&&typeof n!="function"}e.isPrimitive=r})($y)),$y}var Uy={},bN;function Sz(){return bN||(bN=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function r(n,a){return n===a||Number.isNaN(n)&&Number.isNaN(a)}e.isEqualsSameValueZero=r})(Uy)),Uy}var xN;function fie(){return xN||(xN=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const r=_z(),n=wz(),a=Sz();function i(h,m,g){return typeof g!="function"?i(h,m,()=>{}):o(h,m,function y(x,E,w,_,A,O){const T=g(x,E,w,_,A,O);return T!==void 0?!!T:o(x,E,y,O)},new Map)}function o(h,m,g,y){if(m===h)return!0;switch(typeof m){case"object":return u(h,m,g,y);case"function":return Object.keys(m).length>0?o(h,{...m},g,y):a.isEqualsSameValueZero(h,m);default:return r.isObject(h)?typeof m=="string"?m==="":!0:a.isEqualsSameValueZero(h,m)}}function u(h,m,g,y){if(m==null)return!0;if(Array.isArray(m))return f(h,m,g,y);if(m instanceof Map)return c(h,m,g,y);if(m instanceof Set)return d(h,m,g,y);const x=Object.keys(m);if(h==null||n.isPrimitive(h))return x.length===0;if(x.length===0)return!0;if(y!=null&&y.has(m))return y.get(m)===h;y==null||y.set(m,h);try{for(let E=0;E<x.length;E++){const w=x[E];if(!n.isPrimitive(h)&&!(w in h)||m[w]===void 0&&h[w]!==void 0||m[w]===null&&h[w]!==null||!g(h[w],m[w],w,h,m,y))return!1}return!0}finally{y==null||y.delete(m)}}function c(h,m,g,y){if(m.size===0)return!0;if(!(h instanceof Map))return!1;for(const[x,E]of m.entries()){const w=h.get(x);if(g(w,E,x,h,m,y)===!1)return!1}return!0}function f(h,m,g,y){if(m.length===0)return!0;if(!Array.isArray(h))return!1;const x=new Set;for(let E=0;E<m.length;E++){const w=m[E];let _=!1;for(let A=0;A<h.length;A++){if(x.has(A))continue;const O=h[A];let T=!1;if(g(O,w,E,h,m,y)&&(T=!0),T){x.add(A),_=!0;break}}if(!_)return!1}return!0}function d(h,m,g,y){return m.size===0?!0:h instanceof Set?f([...h],[...m],g,y):!1}e.isMatchWith=i,e.isSetMatch=d})(qy)),qy}var _N;function Ez(){return _N||(_N=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const r=fie();function n(a,i){return r.isMatchWith(a,i,()=>{})}e.isMatch=n})(zy)),zy}var Fy={},Hy={},Gy={},wN;function die(){return wN||(wN=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function r(n){return Object.getOwnPropertySymbols(n).filter(a=>Object.prototype.propertyIsEnumerable.call(n,a))}e.getSymbols=r})(Gy)),Gy}var Ky={},SN;function DE(){return SN||(SN=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function r(n){return n==null?n===void 0?"[object Undefined]":"[object Null]":Object.prototype.toString.call(n)}e.getTag=r})(Ky)),Ky}var Vy={},EN;function kz(){return EN||(EN=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const r="[object RegExp]",n="[object String]",a="[object Number]",i="[object Boolean]",o="[object Arguments]",u="[object Symbol]",c="[object Date]",f="[object Map]",d="[object Set]",h="[object Array]",m="[object Function]",g="[object ArrayBuffer]",y="[object Object]",x="[object Error]",E="[object DataView]",w="[object Uint8Array]",_="[object Uint8ClampedArray]",A="[object Uint16Array]",O="[object Uint32Array]",T="[object BigUint64Array]",C="[object Int8Array]",N="[object Int16Array]",M="[object Int32Array]",R="[object BigInt64Array]",L="[object Float32Array]",D="[object Float64Array]";e.argumentsTag=o,e.arrayBufferTag=g,e.arrayTag=h,e.bigInt64ArrayTag=R,e.bigUint64ArrayTag=T,e.booleanTag=i,e.dataViewTag=E,e.dateTag=c,e.errorTag=x,e.float32ArrayTag=L,e.float64ArrayTag=D,e.functionTag=m,e.int16ArrayTag=N,e.int32ArrayTag=M,e.int8ArrayTag=C,e.mapTag=f,e.numberTag=a,e.objectTag=y,e.regexpTag=r,e.setTag=d,e.stringTag=n,e.symbolTag=u,e.uint16ArrayTag=A,e.uint32ArrayTag=O,e.uint8ArrayTag=w,e.uint8ClampedArrayTag=_})(Vy)),Vy}var Yy={},kN;function hie(){return kN||(kN=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function r(n){return ArrayBuffer.isView(n)&&!(n instanceof DataView)}e.isTypedArray=r})(Yy)),Yy}var jN;function jz(){return jN||(jN=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const r=die(),n=DE(),a=kz(),i=wz(),o=hie();function u(h,m){return c(h,void 0,h,new Map,m)}function c(h,m,g,y=new Map,x=void 0){const E=x==null?void 0:x(h,m,g,y);if(E!==void 0)return E;if(i.isPrimitive(h))return h;if(y.has(h))return y.get(h);if(Array.isArray(h)){const w=new Array(h.length);y.set(h,w);for(let _=0;_<h.length;_++)w[_]=c(h[_],_,g,y,x);return Object.hasOwn(h,"index")&&(w.index=h.index),Object.hasOwn(h,"input")&&(w.input=h.input),w}if(h instanceof Date)return new Date(h.getTime());if(h instanceof RegExp){const w=new RegExp(h.source,h.flags);return w.lastIndex=h.lastIndex,w}if(h instanceof Map){const w=new Map;y.set(h,w);for(const[_,A]of h)w.set(_,c(A,_,g,y,x));return w}if(h instanceof Set){const w=new Set;y.set(h,w);for(const _ of h)w.add(c(_,void 0,g,y,x));return w}if(typeof Buffer<"u"&&Buffer.isBuffer(h))return h.subarray();if(o.isTypedArray(h)){const w=new(Object.getPrototypeOf(h)).constructor(h.length);y.set(h,w);for(let _=0;_<h.length;_++)w[_]=c(h[_],_,g,y,x);return w}if(h instanceof ArrayBuffer||typeof SharedArrayBuffer<"u"&&h instanceof SharedArrayBuffer)return h.slice(0);if(h instanceof DataView){const w=new DataView(h.buffer.slice(0),h.byteOffset,h.byteLength);return y.set(h,w),f(w,h,g,y,x),w}if(typeof File<"u"&&h instanceof File){const w=new File([h],h.name,{type:h.type});return y.set(h,w),f(w,h,g,y,x),w}if(typeof Blob<"u"&&h instanceof Blob){const w=new Blob([h],{type:h.type});return y.set(h,w),f(w,h,g,y,x),w}if(h instanceof Error){const w=structuredClone(h);return y.set(h,w),w.message=h.message,w.name=h.name,w.stack=h.stack,w.cause=h.cause,w.constructor=h.constructor,f(w,h,g,y,x),w}if(h instanceof Boolean){const w=new Boolean(h.valueOf());return y.set(h,w),f(w,h,g,y,x),w}if(h instanceof Number){const w=new Number(h.valueOf());return y.set(h,w),f(w,h,g,y,x),w}if(h instanceof String){const w=new String(h.valueOf());return y.set(h,w),f(w,h,g,y,x),w}if(typeof h=="object"&&d(h)){const w=Object.create(Object.getPrototypeOf(h));return y.set(h,w),f(w,h,g,y,x),w}return h}function f(h,m,g=h,y,x){const E=[...Object.keys(m),...r.getSymbols(m)];for(let w=0;w<E.length;w++){const _=E[w],A=Object.getOwnPropertyDescriptor(h,_);(A==null||A.writable)&&(h[_]=c(m[_],_,g,y,x))}}function d(h){switch(n.getTag(h)){case a.argumentsTag:case a.arrayTag:case a.arrayBufferTag:case a.dataViewTag:case a.booleanTag:case a.dateTag:case a.float32ArrayTag:case a.float64ArrayTag:case a.int8ArrayTag:case a.int16ArrayTag:case a.int32ArrayTag:case a.mapTag:case a.numberTag:case a.objectTag:case a.regexpTag:case a.setTag:case a.stringTag:case a.symbolTag:case a.uint8ArrayTag:case a.uint8ClampedArrayTag:case a.uint16ArrayTag:case a.uint32ArrayTag:return!0;default:return!1}}e.cloneDeepWith=u,e.cloneDeepWithImpl=c,e.copyProperties=f})(Hy)),Hy}var AN;function pie(){return AN||(AN=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const r=jz();function n(a){return r.cloneDeepWithImpl(a,void 0,a,new Map,void 0)}e.cloneDeep=n})(Fy)),Fy}var ON;function mie(){return ON||(ON=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const r=Ez(),n=pie();function a(i){return i=n.cloneDeep(i),o=>r.isMatch(o,i)}e.matches=a})(Iy)),Iy}var Xy={},Wy={},Zy={},CN;function vie(){return CN||(CN=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const r=jz(),n=DE(),a=kz();function i(o,u){return r.cloneDeepWith(o,(c,f,d,h)=>{const m=u==null?void 0:u(c,f,d,h);if(m!==void 0)return m;if(typeof o=="object"){if(n.getTag(o)===a.objectTag&&typeof o.constructor!="function"){const g={};return h.set(o,g),r.copyProperties(g,o,d,h),g}switch(Object.prototype.toString.call(o)){case a.numberTag:case a.stringTag:case a.booleanTag:{const g=new o.constructor(o==null?void 0:o.valueOf());return r.copyProperties(g,o),g}case a.argumentsTag:{const g={};return r.copyProperties(g,o),g.length=o.length,g[Symbol.iterator]=o[Symbol.iterator],g}default:return}}})}e.cloneDeepWith=i})(Zy)),Zy}var TN;function gie(){return TN||(TN=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const r=vie();function n(a){return r.cloneDeepWith(a)}e.cloneDeep=n})(Wy)),Wy}var Qy={},Jy={},NN;function Az(){return NN||(NN=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const r=/^(?:0|[1-9]\d*)$/;function n(a,i=Number.MAX_SAFE_INTEGER){switch(typeof a){case"number":return Number.isInteger(a)&&a>=0&&a<i;case"symbol":return!1;case"string":return r.test(a)}}e.isIndex=n})(Jy)),Jy}var e0={},MN;function yie(){return MN||(MN=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const r=DE();function n(a){return a!==null&&typeof a=="object"&&r.getTag(a)==="[object Arguments]"}e.isArguments=n})(e0)),e0}var PN;function bie(){return PN||(PN=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const r=hz(),n=Az(),a=yie(),i=ME();function o(u,c){let f;if(Array.isArray(c)?f=c:typeof c=="string"&&r.isDeepKey(c)&&(u==null?void 0:u[c])==null?f=i.toPath(c):f=[c],f.length===0)return!1;let d=u;for(let h=0;h<f.length;h++){const m=f[h];if((d==null||!Object.hasOwn(d,m))&&!((Array.isArray(d)||a.isArguments(d))&&n.isIndex(m)&&m<d.length))return!1;d=d[m]}return!0}e.has=o})(Qy)),Qy}var RN;function xie(){return RN||(RN=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const r=Ez(),n=NE(),a=gie(),i=PE(),o=bie();function u(c,f){switch(typeof c){case"object":{Object.is(c==null?void 0:c.valueOf(),-0)&&(c="-0");break}case"number":{c=n.toKey(c);break}}return f=a.cloneDeep(f),function(d){const h=i.get(d,c);return h===void 0?o.has(d,c):f===void 0?h===void 0:r.isMatch(h,f)}}e.matchesProperty=u})(Xy)),Xy}var DN;function _ie(){return DN||(DN=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const r=bz(),n=cie(),a=mie(),i=xie();function o(u){if(u==null)return r.identity;switch(typeof u){case"function":return u;case"object":return Array.isArray(u)&&u.length===2?i.matchesProperty(u[0],u[1]):a.matches(u);case"string":case"symbol":case"number":return n.property(u)}}e.iteratee=o})(Dy)),Dy}var LN;function wie(){return LN||(LN=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const r=iie(),n=oie(),a=bz(),i=sie(),o=_ie();function u(c,f=a.identity){return i.isArrayLikeObject(c)?r.uniqBy(Array.from(c),n.ary(o.iteratee(f),1)):[]}e.uniqBy=u})(Ay)),Ay}var t0,IN;function Sie(){return IN||(IN=1,t0=wie().uniqBy),t0}var Eie=Sie();const zN=Dn(Eie);function kie(e,r,n){return r===!0?zN(e,n):typeof r=="function"?zN(e,r):e}var r0={exports:{}},n0={},a0={exports:{}},i0={};/**
118
+ * @license React
119
+ * use-sync-external-store-shim.production.js
120
+ *
121
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
122
+ *
123
+ * This source code is licensed under the MIT license found in the
124
+ * LICENSE file in the root directory of this source tree.
125
+ */var qN;function jie(){if(qN)return i0;qN=1;var e=iu();function r(m,g){return m===g&&(m!==0||1/m===1/g)||m!==m&&g!==g}var n=typeof Object.is=="function"?Object.is:r,a=e.useState,i=e.useEffect,o=e.useLayoutEffect,u=e.useDebugValue;function c(m,g){var y=g(),x=a({inst:{value:y,getSnapshot:g}}),E=x[0].inst,w=x[1];return o(function(){E.value=y,E.getSnapshot=g,f(E)&&w({inst:E})},[m,y,g]),i(function(){return f(E)&&w({inst:E}),m(function(){f(E)&&w({inst:E})})},[m]),u(y),y}function f(m){var g=m.getSnapshot;m=m.value;try{var y=g();return!n(m,y)}catch{return!0}}function d(m,g){return g()}var h=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?d:c;return i0.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:h,i0}var BN;function Aie(){return BN||(BN=1,a0.exports=jie()),a0.exports}/**
126
+ * @license React
127
+ * use-sync-external-store-shim/with-selector.production.js
128
+ *
129
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
130
+ *
131
+ * This source code is licensed under the MIT license found in the
132
+ * LICENSE file in the root directory of this source tree.
133
+ */var $N;function Oie(){if($N)return n0;$N=1;var e=iu(),r=Aie();function n(d,h){return d===h&&(d!==0||1/d===1/h)||d!==d&&h!==h}var a=typeof Object.is=="function"?Object.is:n,i=r.useSyncExternalStore,o=e.useRef,u=e.useEffect,c=e.useMemo,f=e.useDebugValue;return n0.useSyncExternalStoreWithSelector=function(d,h,m,g,y){var x=o(null);if(x.current===null){var E={hasValue:!1,value:null};x.current=E}else E=x.current;x=c(function(){function _(N){if(!A){if(A=!0,O=N,N=g(N),y!==void 0&&E.hasValue){var M=E.value;if(y(M,N))return T=M}return T=N}if(M=T,a(O,N))return M;var R=g(N);return y!==void 0&&y(M,R)?(O=N,M):(O=N,T=R)}var A=!1,O,T,C=m===void 0?null:m;return[function(){return _(h())},C===null?void 0:function(){return _(C())}]},[h,m,g,y]);var w=i(d,x[0],x[1]);return u(function(){E.hasValue=!0,E.value=w},[w]),f(w),w},n0}var UN;function Cie(){return UN||(UN=1,r0.exports=Oie()),r0.exports}var Tie=Cie(),LE=k.createContext(null),Nie=e=>e,Et=()=>{var e=k.useContext(LE);return e?e.store.dispatch:Nie},Qd=()=>{},Mie=()=>Qd,Pie=(e,r)=>e===r;function je(e){var r=k.useContext(LE),n=k.useMemo(()=>r?a=>{if(a!=null)return e(a)}:Qd,[r,e]);return Tie.useSyncExternalStoreWithSelector(r?r.subscription.addNestedSub:Mie,r?r.store.getState:Qd,r?r.store.getState:Qd,n,Pie)}function Rie(e,r=`expected a function, instead received ${typeof e}`){if(typeof e!="function")throw new TypeError(r)}function Die(e,r=`expected an object, instead received ${typeof e}`){if(typeof e!="object")throw new TypeError(r)}function Lie(e,r="expected all items to be functions, instead received the following types: "){if(!e.every(n=>typeof n=="function")){const n=e.map(a=>typeof a=="function"?`function ${a.name||"unnamed"}()`:typeof a).join(", ");throw new TypeError(`${r}[${n}]`)}}var FN=e=>Array.isArray(e)?e:[e];function Iie(e){const r=Array.isArray(e[0])?e[0]:e;return Lie(r,"createSelector expects all input-selectors to be functions, but received the following types: "),r}function zie(e,r){const n=[],{length:a}=e;for(let i=0;i<a;i++)n.push(e[i].apply(null,r));return n}var qie=class{constructor(e){this.value=e}deref(){return this.value}},Bie=typeof WeakRef<"u"?WeakRef:qie,$ie=0,HN=1;function Pd(){return{s:$ie,v:void 0,o:null,p:null}}function Oz(e,r={}){let n=Pd();const{resultEqualityCheck:a}=r;let i,o=0;function u(){var m;let c=n;const{length:f}=arguments;for(let g=0,y=f;g<y;g++){const x=arguments[g];if(typeof x=="function"||typeof x=="object"&&x!==null){let E=c.o;E===null&&(c.o=E=new WeakMap);const w=E.get(x);w===void 0?(c=Pd(),E.set(x,c)):c=w}else{let E=c.p;E===null&&(c.p=E=new Map);const w=E.get(x);w===void 0?(c=Pd(),E.set(x,c)):c=w}}const d=c;let h;if(c.s===HN)h=c.v;else if(h=e.apply(null,arguments),o++,a){const g=((m=i==null?void 0:i.deref)==null?void 0:m.call(i))??i;g!=null&&a(g,h)&&(h=g,o!==0&&o--),i=typeof h=="object"&&h!==null||typeof h=="function"?new Bie(h):h}return d.s=HN,d.v=h,h}return u.clearCache=()=>{n=Pd(),u.resetResultsCount()},u.resultsCount=()=>o,u.resetResultsCount=()=>{o=0},u}function Uie(e,...r){const n=typeof e=="function"?{memoize:e,memoizeOptions:r}:e,a=(...i)=>{let o=0,u=0,c,f={},d=i.pop();typeof d=="object"&&(f=d,d=i.pop()),Rie(d,`createSelector expects an output function after the inputs, but received: [${typeof d}]`);const h={...n,...f},{memoize:m,memoizeOptions:g=[],argsMemoize:y=Oz,argsMemoizeOptions:x=[]}=h,E=FN(g),w=FN(x),_=Iie(i),A=m(function(){return o++,d.apply(null,arguments)},...E),O=y(function(){u++;const C=zie(_,arguments);return c=A.apply(null,C),c},...w);return Object.assign(O,{resultFunc:d,memoizedResultFunc:A,dependencies:_,dependencyRecomputations:()=>u,resetDependencyRecomputations:()=>{u=0},lastResult:()=>c,recomputations:()=>o,resetRecomputations:()=>{o=0},memoize:m,argsMemoize:y})};return Object.assign(a,{withTypes:()=>a}),a}var ue=Uie(Oz),Fie=Object.assign((e,r=ue)=>{Die(e,`createStructuredSelector expects first argument to be an object where each property is a selector, instead received a ${typeof e}`);const n=Object.keys(e),a=n.map(o=>e[o]);return r(a,(...o)=>o.reduce((u,c,f)=>(u[n[f]]=c,u),{}))},{withTypes:()=>Fie}),o0={},l0={},u0={},GN;function Hie(){return GN||(GN=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function r(a){return typeof a=="symbol"?1:a===null?2:a===void 0?3:a!==a?4:0}const n=(a,i,o)=>{if(a!==i){const u=r(a),c=r(i);if(u===c&&u===0){if(a<i)return o==="desc"?1:-1;if(a>i)return o==="desc"?-1:1}return o==="desc"?c-u:u-c}return 0};e.compareValues=n})(u0)),u0}var s0={},c0={},KN;function Cz(){return KN||(KN=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function r(n){return typeof n=="symbol"||n instanceof Symbol}e.isSymbol=r})(c0)),c0}var VN;function Gie(){return VN||(VN=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const r=Cz(),n=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,a=/^\w*$/;function i(o,u){return Array.isArray(o)?!1:typeof o=="number"||typeof o=="boolean"||o==null||r.isSymbol(o)?!0:typeof o=="string"&&(a.test(o)||!n.test(o))||u!=null&&Object.hasOwn(u,o)}e.isKey=i})(s0)),s0}var YN;function Kie(){return YN||(YN=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const r=Hie(),n=Gie(),a=ME();function i(o,u,c,f){if(o==null)return[];c=f?void 0:c,Array.isArray(o)||(o=Object.values(o)),Array.isArray(u)||(u=u==null?[null]:[u]),u.length===0&&(u=[null]),Array.isArray(c)||(c=c==null?[]:[c]),c=c.map(y=>String(y));const d=(y,x)=>{let E=y;for(let w=0;w<x.length&&E!=null;++w)E=E[x[w]];return E},h=(y,x)=>x==null||y==null?x:typeof y=="object"&&"key"in y?Object.hasOwn(x,y.key)?x[y.key]:d(x,y.path):typeof y=="function"?y(x):Array.isArray(y)?d(x,y):typeof x=="object"?x[y]:x,m=u.map(y=>(Array.isArray(y)&&y.length===1&&(y=y[0]),y==null||typeof y=="function"||Array.isArray(y)||n.isKey(y)?y:{key:y,path:a.toPath(y)}));return o.map(y=>({original:y,criteria:m.map(x=>h(x,y))})).slice().sort((y,x)=>{for(let E=0;E<m.length;E++){const w=r.compareValues(y.criteria[E],x.criteria[E],c[E]);if(w!==0)return w}return 0}).map(y=>y.original)}e.orderBy=i})(l0)),l0}var f0={},XN;function Vie(){return XN||(XN=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function r(n,a=1){const i=[],o=Math.floor(a),u=(c,f)=>{for(let d=0;d<c.length;d++){const h=c[d];Array.isArray(h)&&f<o?u(h,f+1):i.push(h)}};return u(n,0),i}e.flatten=r})(f0)),f0}var d0={},WN;function Tz(){return WN||(WN=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const r=Az(),n=xz(),a=_z(),i=Sz();function o(u,c,f){return a.isObject(f)&&(typeof c=="number"&&n.isArrayLike(f)&&r.isIndex(c)&&c<f.length||typeof c=="string"&&c in f)?i.isEqualsSameValueZero(f[c],u):!1}e.isIterateeCall=o})(d0)),d0}var ZN;function Yie(){return ZN||(ZN=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const r=Kie(),n=Vie(),a=Tz();function i(o,...u){const c=u.length;return c>1&&a.isIterateeCall(o,u[0],u[1])?u=[]:c>2&&a.isIterateeCall(u[0],u[1],u[2])&&(u=[u[0]]),r.orderBy(o,n.flatten(u),["asc"])}e.sortBy=i})(o0)),o0}var h0,QN;function Xie(){return QN||(QN=1,h0=Yie().sortBy),h0}var Wie=Xie();const zp=Dn(Wie);var Nz=e=>e.legend.settings,Zie=e=>e.legend.size,Qie=e=>e.legend.payload;ue([Qie,Nz],(e,r)=>{var{itemSorter:n}=r,a=e.flat(1);return n?zp(a,n):a});var Rd=1;function Jie(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],[r,n]=k.useState({height:0,left:0,top:0,width:0}),a=k.useCallback(i=>{if(i!=null){var o=i.getBoundingClientRect(),u={height:o.height,left:o.left,top:o.top,width:o.width};(Math.abs(u.height-r.height)>Rd||Math.abs(u.left-r.left)>Rd||Math.abs(u.top-r.top)>Rd||Math.abs(u.width-r.width)>Rd)&&n({height:u.height,left:u.left,top:u.top,width:u.width})}},[r.width,r.height,r.top,r.left,...e]);return[r,a]}function Zt(e){return`Minified Redux error #${e}; visit https://redux.js.org/Errors?code=${e} for the full message or use the non-minified dev environment for full errors. `}var eoe=typeof Symbol=="function"&&Symbol.observable||"@@observable",JN=eoe,p0=()=>Math.random().toString(36).substring(7).split("").join("."),toe={INIT:`@@redux/INIT${p0()}`,REPLACE:`@@redux/REPLACE${p0()}`,PROBE_UNKNOWN_ACTION:()=>`@@redux/PROBE_UNKNOWN_ACTION${p0()}`},Dh=toe;function IE(e){if(typeof e!="object"||e===null)return!1;let r=e;for(;Object.getPrototypeOf(r)!==null;)r=Object.getPrototypeOf(r);return Object.getPrototypeOf(e)===r||Object.getPrototypeOf(e)===null}function Mz(e,r,n){if(typeof e!="function")throw new Error(Zt(2));if(typeof r=="function"&&typeof n=="function"||typeof n=="function"&&typeof arguments[3]=="function")throw new Error(Zt(0));if(typeof r=="function"&&typeof n>"u"&&(n=r,r=void 0),typeof n<"u"){if(typeof n!="function")throw new Error(Zt(1));return n(Mz)(e,r)}let a=e,i=r,o=new Map,u=o,c=0,f=!1;function d(){u===o&&(u=new Map,o.forEach((w,_)=>{u.set(_,w)}))}function h(){if(f)throw new Error(Zt(3));return i}function m(w){if(typeof w!="function")throw new Error(Zt(4));if(f)throw new Error(Zt(5));let _=!0;d();const A=c++;return u.set(A,w),function(){if(_){if(f)throw new Error(Zt(6));_=!1,d(),u.delete(A),o=null}}}function g(w){if(!IE(w))throw new Error(Zt(7));if(typeof w.type>"u")throw new Error(Zt(8));if(typeof w.type!="string")throw new Error(Zt(17));if(f)throw new Error(Zt(9));try{f=!0,i=a(i,w)}finally{f=!1}return(o=u).forEach(A=>{A()}),w}function y(w){if(typeof w!="function")throw new Error(Zt(10));a=w,g({type:Dh.REPLACE})}function x(){const w=m;return{subscribe(_){if(typeof _!="object"||_===null)throw new Error(Zt(11));function A(){const T=_;T.next&&T.next(h())}return A(),{unsubscribe:w(A)}},[JN](){return this}}}return g({type:Dh.INIT}),{dispatch:g,subscribe:m,getState:h,replaceReducer:y,[JN]:x}}function roe(e){Object.keys(e).forEach(r=>{const n=e[r];if(typeof n(void 0,{type:Dh.INIT})>"u")throw new Error(Zt(12));if(typeof n(void 0,{type:Dh.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(Zt(13))})}function Pz(e){const r=Object.keys(e),n={};for(let o=0;o<r.length;o++){const u=r[o];typeof e[u]=="function"&&(n[u]=e[u])}const a=Object.keys(n);let i;try{roe(n)}catch(o){i=o}return function(u={},c){if(i)throw i;let f=!1;const d={};for(let h=0;h<a.length;h++){const m=a[h],g=n[m],y=u[m],x=g(y,c);if(typeof x>"u")throw c&&c.type,new Error(Zt(14));d[m]=x,f=f||x!==y}return f=f||a.length!==Object.keys(u).length,f?d:u}}function Lh(...e){return e.length===0?r=>r:e.length===1?e[0]:e.reduce((r,n)=>(...a)=>r(n(...a)))}function noe(...e){return r=>(n,a)=>{const i=r(n,a);let o=()=>{throw new Error(Zt(15))};const u={getState:i.getState,dispatch:(f,...d)=>o(f,...d)},c=e.map(f=>f(u));return o=Lh(...c)(i.dispatch),{...i,dispatch:o}}}function Rz(e){return IE(e)&&"type"in e&&typeof e.type=="string"}var Dz=Symbol.for("immer-nothing"),e3=Symbol.for("immer-draftable"),mr=Symbol.for("immer-state");function Tn(e,...r){throw new Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var Fr=Object,ru=Fr.getPrototypeOf,Ih="constructor",qp="prototype",H2="configurable",zh="enumerable",Jd="writable",uc="value",Za=e=>!!e&&!!e[mr];function Pn(e){var r;return e?Lz(e)||$p(e)||!!e[e3]||!!((r=e[Ih])!=null&&r[e3])||Up(e)||Fp(e):!1}var aoe=Fr[qp][Ih].toString(),t3=new WeakMap;function Lz(e){if(!e||!zE(e))return!1;const r=ru(e);if(r===null||r===Fr[qp])return!0;const n=Fr.hasOwnProperty.call(r,Ih)&&r[Ih];if(n===Object)return!0;if(!Fl(n))return!1;let a=t3.get(n);return a===void 0&&(a=Function.toString.call(n),t3.set(n,a)),a===aoe}function Bp(e,r,n=!0){Pc(e)===0?(n?Reflect.ownKeys(e):Fr.keys(e)).forEach(i=>{r(i,e[i],e)}):e.forEach((a,i)=>r(i,a,e))}function Pc(e){const r=e[mr];return r?r.type_:$p(e)?1:Up(e)?2:Fp(e)?3:0}var r3=(e,r,n=Pc(e))=>n===2?e.has(r):Fr[qp].hasOwnProperty.call(e,r),G2=(e,r,n=Pc(e))=>n===2?e.get(r):e[r],qh=(e,r,n,a=Pc(e))=>{a===2?e.set(r,n):a===3?e.add(n):e[r]=n};function ioe(e,r){return e===r?e!==0||1/e===1/r:e!==e&&r!==r}var $p=Array.isArray,Up=e=>e instanceof Map,Fp=e=>e instanceof Set,zE=e=>typeof e=="object",Fl=e=>typeof e=="function",m0=e=>typeof e=="boolean";function ooe(e){const r=+e;return Number.isInteger(r)&&String(r)===e}var La=e=>e.copy_||e.base_,qE=e=>e.modified_?e.copy_:e.base_;function K2(e,r){if(Up(e))return new Map(e);if(Fp(e))return new Set(e);if($p(e))return Array[qp].slice.call(e);const n=Lz(e);if(r===!0||r==="class_only"&&!n){const a=Fr.getOwnPropertyDescriptors(e);delete a[mr];let i=Reflect.ownKeys(a);for(let o=0;o<i.length;o++){const u=i[o],c=a[u];c[Jd]===!1&&(c[Jd]=!0,c[H2]=!0),(c.get||c.set)&&(a[u]={[H2]:!0,[Jd]:!0,[zh]:c[zh],[uc]:e[u]})}return Fr.create(ru(e),a)}else{const a=ru(e);if(a!==null&&n)return{...e};const i=Fr.create(a);return Fr.assign(i,e)}}function BE(e,r=!1){return Hp(e)||Za(e)||!Pn(e)||(Pc(e)>1&&Fr.defineProperties(e,{set:Dd,add:Dd,clear:Dd,delete:Dd}),Fr.freeze(e),r&&Bp(e,(n,a)=>{BE(a,!0)},!1)),e}function loe(){Tn(2)}var Dd={[uc]:loe};function Hp(e){return e===null||!zE(e)?!0:Fr.isFrozen(e)}var Bh="MapSet",V2="Patches",n3="ArrayMethods",Iz={};function Lo(e){const r=Iz[e];return r||Tn(0,e),r}var a3=e=>!!Iz[e],sc,zz=()=>sc,uoe=(e,r)=>({drafts_:[],parent_:e,immer_:r,canAutoFreeze_:!0,unfinalizedDrafts_:0,handledSet_:new Set,processedForPatches_:new Set,mapSetPlugin_:a3(Bh)?Lo(Bh):void 0,arrayMethodsPlugin_:a3(n3)?Lo(n3):void 0});function i3(e,r){r&&(e.patchPlugin_=Lo(V2),e.patches_=[],e.inversePatches_=[],e.patchListener_=r)}function Y2(e){X2(e),e.drafts_.forEach(soe),e.drafts_=null}function X2(e){e===sc&&(sc=e.parent_)}var o3=e=>sc=uoe(sc,e);function soe(e){const r=e[mr];r.type_===0||r.type_===1?r.revoke_():r.revoked_=!0}function l3(e,r){r.unfinalizedDrafts_=r.drafts_.length;const n=r.drafts_[0];if(e!==void 0&&e!==n){n[mr].modified_&&(Y2(r),Tn(4)),Pn(e)&&(e=u3(r,e));const{patchPlugin_:i}=r;i&&i.generateReplacementPatches_(n[mr].base_,e,r)}else e=u3(r,n);return coe(r,e,!0),Y2(r),r.patches_&&r.patchListener_(r.patches_,r.inversePatches_),e!==Dz?e:void 0}function u3(e,r){if(Hp(r))return r;const n=r[mr];if(!n)return $h(r,e.handledSet_,e);if(!Gp(n,e))return r;if(!n.modified_)return n.base_;if(!n.finalized_){const{callbacks_:a}=n;if(a)for(;a.length>0;)a.pop()(e);$z(n,e)}return n.copy_}function coe(e,r,n=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&BE(r,n)}function qz(e){e.finalized_=!0,e.scope_.unfinalizedDrafts_--}var Gp=(e,r)=>e.scope_===r,foe=[];function Bz(e,r,n,a){const i=La(e),o=e.type_;if(a!==void 0&&G2(i,a,o)===r){qh(i,a,n,o);return}if(!e.draftLocations_){const c=e.draftLocations_=new Map;Bp(i,(f,d)=>{if(Za(d)){const h=c.get(d)||[];h.push(f),c.set(d,h)}})}const u=e.draftLocations_.get(r)??foe;for(const c of u)qh(i,c,n,o)}function doe(e,r,n){e.callbacks_.push(function(i){var c;const o=r;if(!o||!Gp(o,i))return;(c=i.mapSetPlugin_)==null||c.fixSetContents(o);const u=qE(o);Bz(e,o.draft_??o,u,n),$z(o,i)})}function $z(e,r){var a;if(e.modified_&&!e.finalized_&&(e.type_===3||e.type_===1&&e.allIndicesReassigned_||(((a=e.assigned_)==null?void 0:a.size)??0)>0)){const{patchPlugin_:i}=r;if(i){const o=i.getPath(e);o&&i.generatePatches_(e,o,r)}qz(e)}}function hoe(e,r,n){const{scope_:a}=e;if(Za(n)){const i=n[mr];Gp(i,a)&&i.callbacks_.push(function(){eh(e);const u=qE(i);Bz(e,n,u,r)})}else Pn(n)&&e.callbacks_.push(function(){const o=La(e);e.type_===3?o.has(n)&&$h(n,a.handledSet_,a):G2(o,r,e.type_)===n&&a.drafts_.length>1&&(e.assigned_.get(r)??!1)===!0&&e.copy_&&$h(G2(e.copy_,r,e.type_),a.handledSet_,a)})}function $h(e,r,n){return!n.immer_.autoFreeze_&&n.unfinalizedDrafts_<1||Za(e)||r.has(e)||!Pn(e)||Hp(e)||(r.add(e),Bp(e,(a,i)=>{if(Za(i)){const o=i[mr];if(Gp(o,n)){const u=qE(o);qh(e,a,u,e.type_),qz(o)}}else Pn(i)&&$h(i,r,n)})),e}function poe(e,r){const n=$p(e),a={type_:n?1:0,scope_:r?r.scope_:zz(),modified_:!1,finalized_:!1,assigned_:void 0,parent_:r,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1,callbacks_:void 0};let i=a,o=Uh;n&&(i=[a],o=cc);const{revoke:u,proxy:c}=Proxy.revocable(i,o);return a.draft_=c,a.revoke_=u,[c,a]}var Uh={get(e,r){if(r===mr)return e;let n=e.scope_.arrayMethodsPlugin_;const a=e.type_===1&&typeof r=="string";if(a&&n!=null&&n.isArrayOperationMethod(r))return n.createMethodInterceptor(e,r);const i=La(e);if(!r3(i,r,e.type_))return moe(e,i,r);const o=i[r];if(e.finalized_||!Pn(o)||a&&e.operationMethod&&(n!=null&&n.isMutatingArrayMethod(e.operationMethod))&&ooe(r))return o;if(o===v0(e.base_,r)){eh(e);const u=e.type_===1?+r:r,c=Z2(e.scope_,o,e,u);return e.copy_[u]=c}return o},has(e,r){return r in La(e)},ownKeys(e){return Reflect.ownKeys(La(e))},set(e,r,n){const a=Uz(La(e),r);if(a!=null&&a.set)return a.set.call(e.draft_,n),!0;if(!e.modified_){const i=v0(La(e),r),o=i==null?void 0:i[mr];if(o&&o.base_===n)return e.copy_[r]=n,e.assigned_.set(r,!1),!0;if(ioe(n,i)&&(n!==void 0||r3(e.base_,r,e.type_)))return!0;eh(e),W2(e)}return e.copy_[r]===n&&(n!==void 0||r in e.copy_)||Number.isNaN(n)&&Number.isNaN(e.copy_[r])||(e.copy_[r]=n,e.assigned_.set(r,!0),hoe(e,r,n)),!0},deleteProperty(e,r){return eh(e),v0(e.base_,r)!==void 0||r in e.base_?(e.assigned_.set(r,!1),W2(e)):e.assigned_.delete(r),e.copy_&&delete e.copy_[r],!0},getOwnPropertyDescriptor(e,r){const n=La(e),a=Reflect.getOwnPropertyDescriptor(n,r);return a&&{[Jd]:!0,[H2]:e.type_!==1||r!=="length",[zh]:a[zh],[uc]:n[r]}},defineProperty(){Tn(11)},getPrototypeOf(e){return ru(e.base_)},setPrototypeOf(){Tn(12)}},cc={};for(let e in Uh){let r=Uh[e];cc[e]=function(){const n=arguments;return n[0]=n[0][0],r.apply(this,n)}}cc.deleteProperty=function(e,r){return cc.set.call(this,e,r,void 0)};cc.set=function(e,r,n){return Uh.set.call(this,e[0],r,n,e[0])};function v0(e,r){const n=e[mr];return(n?La(n):e)[r]}function moe(e,r,n){var i;const a=Uz(r,n);return a?uc in a?a[uc]:(i=a.get)==null?void 0:i.call(e.draft_):void 0}function Uz(e,r){if(!(r in e))return;let n=ru(e);for(;n;){const a=Object.getOwnPropertyDescriptor(n,r);if(a)return a;n=ru(n)}}function W2(e){e.modified_||(e.modified_=!0,e.parent_&&W2(e.parent_))}function eh(e){e.copy_||(e.assigned_=new Map,e.copy_=K2(e.base_,e.scope_.immer_.useStrictShallowCopy_))}var voe=class{constructor(r){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.useStrictIteration_=!1,this.produce=(n,a,i)=>{if(Fl(n)&&!Fl(a)){const u=a;a=n;const c=this;return function(d=u,...h){return c.produce(d,m=>a.call(this,m,...h))}}Fl(a)||Tn(6),i!==void 0&&!Fl(i)&&Tn(7);let o;if(Pn(n)){const u=o3(this),c=Z2(u,n,void 0);let f=!0;try{o=a(c),f=!1}finally{f?Y2(u):X2(u)}return i3(u,i),l3(o,u)}else if(!n||!zE(n)){if(o=a(n),o===void 0&&(o=n),o===Dz&&(o=void 0),this.autoFreeze_&&BE(o,!0),i){const u=[],c=[];Lo(V2).generateReplacementPatches_(n,o,{patches_:u,inversePatches_:c}),i(u,c)}return o}else Tn(1,n)},this.produceWithPatches=(n,a)=>{if(Fl(n))return(c,...f)=>this.produceWithPatches(c,d=>n(d,...f));let i,o;return[this.produce(n,a,(c,f)=>{i=c,o=f}),i,o]},m0(r==null?void 0:r.autoFreeze)&&this.setAutoFreeze(r.autoFreeze),m0(r==null?void 0:r.useStrictShallowCopy)&&this.setUseStrictShallowCopy(r.useStrictShallowCopy),m0(r==null?void 0:r.useStrictIteration)&&this.setUseStrictIteration(r.useStrictIteration)}createDraft(r){Pn(r)||Tn(8),Za(r)&&(r=vn(r));const n=o3(this),a=Z2(n,r,void 0);return a[mr].isManual_=!0,X2(n),a}finishDraft(r,n){const a=r&&r[mr];(!a||!a.isManual_)&&Tn(9);const{scope_:i}=a;return i3(i,n),l3(void 0,i)}setAutoFreeze(r){this.autoFreeze_=r}setUseStrictShallowCopy(r){this.useStrictShallowCopy_=r}setUseStrictIteration(r){this.useStrictIteration_=r}shouldUseStrictIteration(){return this.useStrictIteration_}applyPatches(r,n){let a;for(a=n.length-1;a>=0;a--){const o=n[a];if(o.path.length===0&&o.op==="replace"){r=o.value;break}}a>-1&&(n=n.slice(a+1));const i=Lo(V2).applyPatches_;return Za(r)?i(r,n):this.produce(r,o=>i(o,n))}};function Z2(e,r,n,a){const[i,o]=Up(r)?Lo(Bh).proxyMap_(r,n):Fp(r)?Lo(Bh).proxySet_(r,n):poe(r,n);return((n==null?void 0:n.scope_)??zz()).drafts_.push(i),o.callbacks_=(n==null?void 0:n.callbacks_)??[],o.key_=a,n&&a!==void 0?doe(n,o,a):o.callbacks_.push(function(f){var h;(h=f.mapSetPlugin_)==null||h.fixSetContents(o);const{patchPlugin_:d}=f;o.modified_&&d&&d.generatePatches_(o,[],f)}),i}function vn(e){return Za(e)||Tn(10,e),Fz(e)}function Fz(e){if(!Pn(e)||Hp(e))return e;const r=e[mr];let n,a=!0;if(r){if(!r.modified_)return r.base_;r.finalized_=!0,n=K2(e,r.scope_.immer_.useStrictShallowCopy_),a=r.scope_.immer_.shouldUseStrictIteration()}else n=K2(e,!0);return Bp(n,(i,o)=>{qh(n,i,Fz(o))},a),r&&(r.finalized_=!1),n}var goe=new voe,Hz=goe.produce;function Gz(e){return({dispatch:n,getState:a})=>i=>o=>typeof o=="function"?o(n,a,e):i(o)}var yoe=Gz(),boe=Gz,xoe=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?Lh:Lh.apply(null,arguments)};function Kr(e,r){function n(...a){if(r){let i=r(...a);if(!i)throw new Error(Hr(0));return{type:e,payload:i.payload,..."meta"in i&&{meta:i.meta},..."error"in i&&{error:i.error}}}return{type:e,payload:a[0]}}return n.toString=()=>`${e}`,n.type=e,n.match=a=>Rz(a)&&a.type===e,n}var Kz=class Hs extends Array{constructor(...r){super(...r),Object.setPrototypeOf(this,Hs.prototype)}static get[Symbol.species](){return Hs}concat(...r){return super.concat.apply(this,r)}prepend(...r){return r.length===1&&Array.isArray(r[0])?new Hs(...r[0].concat(this)):new Hs(...r.concat(this))}};function s3(e){return Pn(e)?Hz(e,()=>{}):e}function Ld(e,r,n){return e.has(r)?e.get(r):e.set(r,n(r)).get(r)}function _oe(e){return typeof e=="boolean"}var woe=()=>function(r){const{thunk:n=!0,immutableCheck:a=!0,serializableCheck:i=!0,actionCreatorCheck:o=!0}=r??{};let u=new Kz;return n&&(_oe(n)?u.push(yoe):u.push(boe(n.extraArgument))),u},Vz="RTK_autoBatch",ut=()=>e=>({payload:e,meta:{[Vz]:!0}}),c3=e=>r=>{setTimeout(r,e)},Yz=(e={type:"raf"})=>r=>(...n)=>{const a=r(...n);let i=!0,o=!1,u=!1;const c=new Set,f=e.type==="tick"?queueMicrotask:e.type==="raf"?typeof window<"u"&&window.requestAnimationFrame?window.requestAnimationFrame:c3(10):e.type==="callback"?e.queueNotification:c3(e.timeout),d=()=>{u=!1,o&&(o=!1,c.forEach(h=>h()))};return Object.assign({},a,{subscribe(h){const m=()=>i&&h(),g=a.subscribe(m);return c.add(h),()=>{g(),c.delete(h)}},dispatch(h){var m;try{return i=!((m=h==null?void 0:h.meta)!=null&&m[Vz]),o=!i,o&&(u||(u=!0,f(d))),a.dispatch(h)}finally{i=!0}}})},Soe=e=>function(n){const{autoBatch:a=!0}=n??{};let i=new Kz(e);return a&&i.push(Yz(typeof a=="object"?a:void 0)),i};function Eoe(e){const r=woe(),{reducer:n=void 0,middleware:a,devTools:i=!0,preloadedState:o=void 0,enhancers:u=void 0}=e||{};let c;if(typeof n=="function")c=n;else if(IE(n))c=Pz(n);else throw new Error(Hr(1));let f;typeof a=="function"?f=a(r):f=r();let d=Lh;i&&(d=xoe({trace:!1,...typeof i=="object"&&i}));const h=noe(...f),m=Soe(h);let g=typeof u=="function"?u(m):m();const y=d(...g);return Mz(c,o,y)}function Xz(e){const r={},n=[];let a;const i={addCase(o,u){const c=typeof o=="string"?o:o.type;if(!c)throw new Error(Hr(28));if(c in r)throw new Error(Hr(29));return r[c]=u,i},addAsyncThunk(o,u){return u.pending&&(r[o.pending.type]=u.pending),u.rejected&&(r[o.rejected.type]=u.rejected),u.fulfilled&&(r[o.fulfilled.type]=u.fulfilled),u.settled&&n.push({matcher:o.settled,reducer:u.settled}),i},addMatcher(o,u){return n.push({matcher:o,reducer:u}),i},addDefaultCase(o){return a=o,i}};return e(i),[r,n,a]}function koe(e){return typeof e=="function"}function joe(e,r){let[n,a,i]=Xz(r),o;if(koe(e))o=()=>s3(e());else{const c=s3(e);o=()=>c}function u(c=o(),f){let d=[n[f.type],...a.filter(({matcher:h})=>h(f)).map(({reducer:h})=>h)];return d.filter(h=>!!h).length===0&&(d=[i]),d.reduce((h,m)=>{if(m)if(Za(h)){const y=m(h,f);return y===void 0?h:y}else{if(Pn(h))return Hz(h,g=>m(g,f));{const g=m(h,f);if(g===void 0){if(h===null)return h;throw Error("A case reducer on a non-draftable value must not return undefined")}return g}}return h},c)}return u.getInitialState=o,u}var Aoe="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",Ooe=(e=21)=>{let r="",n=e;for(;n--;)r+=Aoe[Math.random()*64|0];return r},Coe=Symbol.for("rtk-slice-createasyncthunk");function Toe(e,r){return`${e}/${r}`}function Noe({creators:e}={}){var n;const r=(n=e==null?void 0:e.asyncThunk)==null?void 0:n[Coe];return function(i){const{name:o,reducerPath:u=o}=i;if(!o)throw new Error(Hr(11));const c=(typeof i.reducers=="function"?i.reducers(Poe()):i.reducers)||{},f=Object.keys(c),d={sliceCaseReducersByName:{},sliceCaseReducersByType:{},actionCreators:{},sliceMatchers:[]},h={addCase(T,C){const N=typeof T=="string"?T:T.type;if(!N)throw new Error(Hr(12));if(N in d.sliceCaseReducersByType)throw new Error(Hr(13));return d.sliceCaseReducersByType[N]=C,h},addMatcher(T,C){return d.sliceMatchers.push({matcher:T,reducer:C}),h},exposeAction(T,C){return d.actionCreators[T]=C,h},exposeCaseReducer(T,C){return d.sliceCaseReducersByName[T]=C,h}};f.forEach(T=>{const C=c[T],N={reducerName:T,type:Toe(o,T),createNotation:typeof i.reducers=="function"};Doe(C)?Ioe(N,C,h,r):Roe(N,C,h)});function m(){const[T={},C=[],N=void 0]=typeof i.extraReducers=="function"?Xz(i.extraReducers):[i.extraReducers],M={...T,...d.sliceCaseReducersByType};return joe(i.initialState,R=>{for(let L in M)R.addCase(L,M[L]);for(let L of d.sliceMatchers)R.addMatcher(L.matcher,L.reducer);for(let L of C)R.addMatcher(L.matcher,L.reducer);N&&R.addDefaultCase(N)})}const g=T=>T,y=new Map,x=new WeakMap;let E;function w(T,C){return E||(E=m()),E(T,C)}function _(){return E||(E=m()),E.getInitialState()}function A(T,C=!1){function N(R){let L=R[T];return typeof L>"u"&&C&&(L=Ld(x,N,_)),L}function M(R=g){const L=Ld(y,C,()=>new WeakMap);return Ld(L,R,()=>{const D={};for(const[z,q]of Object.entries(i.selectors??{}))D[z]=Moe(q,R,()=>Ld(x,R,_),C);return D})}return{reducerPath:T,getSelectors:M,get selectors(){return M(N)},selectSlice:N}}const O={name:o,reducer:w,actions:d.actionCreators,caseReducers:d.sliceCaseReducersByName,getInitialState:_,...A(u),injectInto(T,{reducerPath:C,...N}={}){const M=C??u;return T.inject({reducerPath:M,reducer:w},N),{...O,...A(M,!0)}}};return O}}function Moe(e,r,n,a){function i(o,...u){let c=r(o);return typeof c>"u"&&a&&(c=n()),e(c,...u)}return i.unwrapped=e,i}var cr=Noe();function Poe(){function e(r,n){return{_reducerDefinitionType:"asyncThunk",payloadCreator:r,...n}}return e.withTypes=()=>e,{reducer(r){return Object.assign({[r.name](...n){return r(...n)}}[r.name],{_reducerDefinitionType:"reducer"})},preparedReducer(r,n){return{_reducerDefinitionType:"reducerWithPrepare",prepare:r,reducer:n}},asyncThunk:e}}function Roe({type:e,reducerName:r,createNotation:n},a,i){let o,u;if("reducer"in a){if(n&&!Loe(a))throw new Error(Hr(17));o=a.reducer,u=a.prepare}else o=a;i.addCase(e,o).exposeCaseReducer(r,o).exposeAction(r,u?Kr(e,u):Kr(e))}function Doe(e){return e._reducerDefinitionType==="asyncThunk"}function Loe(e){return e._reducerDefinitionType==="reducerWithPrepare"}function Ioe({type:e,reducerName:r},n,a,i){if(!i)throw new Error(Hr(18));const{payloadCreator:o,fulfilled:u,pending:c,rejected:f,settled:d,options:h}=n,m=i(e,o,h);a.exposeAction(r,m),u&&a.addCase(m.fulfilled,u),c&&a.addCase(m.pending,c),f&&a.addCase(m.rejected,f),d&&a.addMatcher(m.settled,d),a.exposeCaseReducer(r,{fulfilled:u||Id,pending:c||Id,rejected:f||Id,settled:d||Id})}function Id(){}var zoe="task",Wz="listener",Zz="completed",$E="cancelled",qoe=`task-${$E}`,Boe=`task-${Zz}`,Q2=`${Wz}-${$E}`,$oe=`${Wz}-${Zz}`,Kp=class{constructor(e){Ug(this,"name","TaskAbortError");Ug(this,"message");this.code=e,this.message=`${zoe} ${$E} (reason: ${e})`}},UE=(e,r)=>{if(typeof e!="function")throw new TypeError(Hr(32))},Fh=()=>{},Qz=(e,r=Fh)=>(e.catch(r),e),Jz=(e,r)=>(e.addEventListener("abort",r,{once:!0}),()=>e.removeEventListener("abort",r)),To=e=>{if(e.aborted)throw new Kp(e.reason)};function eq(e,r){let n=Fh;return new Promise((a,i)=>{const o=()=>i(new Kp(e.reason));if(e.aborted){o();return}n=Jz(e,o),r.finally(()=>n()).then(a,i)}).finally(()=>{n=Fh})}var Uoe=async(e,r)=>{try{return await Promise.resolve(),{status:"ok",value:await e()}}catch(n){return{status:n instanceof Kp?"cancelled":"rejected",error:n}}finally{r==null||r()}},Hh=e=>r=>Qz(eq(e,r).then(n=>(To(e),n))),tq=e=>{const r=Hh(e);return n=>r(new Promise(a=>setTimeout(a,n)))},{assign:Yl}=Object,f3={},Vp="listenerMiddleware",Foe=(e,r)=>{const n=a=>Jz(e,()=>a.abort(e.reason));return(a,i)=>{UE(a);const o=new AbortController;n(o);const u=Uoe(async()=>{To(e),To(o.signal);const c=await a({pause:Hh(o.signal),delay:tq(o.signal),signal:o.signal});return To(o.signal),c},()=>o.abort(Boe));return i!=null&&i.autoJoin&&r.push(u.catch(Fh)),{result:Hh(e)(u),cancel(){o.abort(qoe)}}}},Hoe=(e,r)=>{const n=async(a,i)=>{To(r);let o=()=>{};const c=[new Promise((f,d)=>{let h=e({predicate:a,effect:(m,g)=>{g.unsubscribe(),f([m,g.getState(),g.getOriginalState()])}});o=()=>{h(),d()}})];i!=null&&c.push(new Promise(f=>setTimeout(f,i,null)));try{const f=await eq(r,Promise.race(c));return To(r),f}finally{o()}};return(a,i)=>Qz(n(a,i))},rq=e=>{let{type:r,actionCreator:n,matcher:a,predicate:i,effect:o}=e;if(r)i=Kr(r).match;else if(n)r=n.type,i=n.match;else if(a)i=a;else if(!i)throw new Error(Hr(21));return UE(o),{predicate:i,type:r,effect:o}},nq=Yl(e=>{const{type:r,predicate:n,effect:a}=rq(e);return{id:Ooe(),effect:a,type:r,predicate:n,pending:new Set,unsubscribe:()=>{throw new Error(Hr(22))}}},{withTypes:()=>nq}),d3=(e,r)=>{const{type:n,effect:a,predicate:i}=rq(r);return Array.from(e.values()).find(o=>(typeof n=="string"?o.type===n:o.predicate===i)&&o.effect===a)},J2=e=>{e.pending.forEach(r=>{r.abort(Q2)})},Goe=(e,r)=>()=>{for(const n of r.keys())J2(n);e.clear()},h3=(e,r,n)=>{try{e(r,n)}catch(a){setTimeout(()=>{throw a},0)}},aq=Yl(Kr(`${Vp}/add`),{withTypes:()=>aq}),Koe=Kr(`${Vp}/removeAll`),iq=Yl(Kr(`${Vp}/remove`),{withTypes:()=>iq}),Voe=(...e)=>{console.error(`${Vp}/error`,...e)},Rc=(e={})=>{const r=new Map,n=new Map,a=y=>{const x=n.get(y)??0;n.set(y,x+1)},i=y=>{const x=n.get(y)??1;x===1?n.delete(y):n.set(y,x-1)},{extra:o,onError:u=Voe}=e;UE(u);const c=y=>(y.unsubscribe=()=>r.delete(y.id),r.set(y.id,y),x=>{y.unsubscribe(),x!=null&&x.cancelActive&&J2(y)}),f=y=>{const x=d3(r,y)??nq(y);return c(x)};Yl(f,{withTypes:()=>f});const d=y=>{const x=d3(r,y);return x&&(x.unsubscribe(),y.cancelActive&&J2(x)),!!x};Yl(d,{withTypes:()=>d});const h=async(y,x,E,w)=>{const _=new AbortController,A=Hoe(f,_.signal),O=[];try{y.pending.add(_),a(y),await Promise.resolve(y.effect(x,Yl({},E,{getOriginalState:w,condition:(T,C)=>A(T,C).then(Boolean),take:A,delay:tq(_.signal),pause:Hh(_.signal),extra:o,signal:_.signal,fork:Foe(_.signal,O),unsubscribe:y.unsubscribe,subscribe:()=>{r.set(y.id,y)},cancelActiveListeners:()=>{y.pending.forEach((T,C,N)=>{T!==_&&(T.abort(Q2),N.delete(T))})},cancel:()=>{_.abort(Q2),y.pending.delete(_)},throwIfCancelled:()=>{To(_.signal)}})))}catch(T){T instanceof Kp||h3(u,T,{raisedBy:"effect"})}finally{await Promise.all(O),_.abort($oe),i(y),y.pending.delete(_)}},m=Goe(r,n);return{middleware:y=>x=>E=>{if(!Rz(E))return x(E);if(aq.match(E))return f(E.payload);if(Koe.match(E)){m();return}if(iq.match(E))return d(E.payload);let w=y.getState();const _=()=>{if(w===f3)throw new Error(Hr(23));return w};let A;try{if(A=x(E),r.size>0){const O=y.getState(),T=Array.from(r.values());for(const C of T){let N=!1;try{N=C.predicate(E,O,w)}catch(M){N=!1,h3(u,M,{raisedBy:"predicate"})}N&&h(C,E,y,_)}}}finally{w=f3}return A},startListening:f,stopListening:d,clearListeners:m}};function Hr(e){return`Minified Redux Toolkit error #${e}; visit https://redux-toolkit.js.org/Errors?code=${e} for the full message or use the non-minified dev environment for full errors. `}var Yoe={layoutType:"horizontal",width:0,height:0,margin:{top:5,right:5,bottom:5,left:5},scale:1},oq=cr({name:"chartLayout",initialState:Yoe,reducers:{setLayout(e,r){e.layoutType=r.payload},setChartSize(e,r){e.width=r.payload.width,e.height=r.payload.height},setMargin(e,r){var n,a,i,o;e.margin.top=(n=r.payload.top)!==null&&n!==void 0?n:0,e.margin.right=(a=r.payload.right)!==null&&a!==void 0?a:0,e.margin.bottom=(i=r.payload.bottom)!==null&&i!==void 0?i:0,e.margin.left=(o=r.payload.left)!==null&&o!==void 0?o:0},setScale(e,r){e.scale=r.payload}}}),{setMargin:Xoe,setLayout:Woe,setChartSize:Zoe,setScale:Qoe}=oq.actions,Joe=oq.reducer;function lq(e,r,n){return Array.isArray(e)&&e&&r+n!==0?e.slice(r,n+1):e}function Re(e){return Number.isFinite(e)}function la(e){return typeof e=="number"&&e>0&&Number.isFinite(e)}function p3(e,r){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);r&&(a=a.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,a)}return n}function Hl(e){for(var r=1;r<arguments.length;r++){var n=arguments[r]!=null?arguments[r]:{};r%2?p3(Object(n),!0).forEach(function(a){ele(e,a,n[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):p3(Object(n)).forEach(function(a){Object.defineProperty(e,a,Object.getOwnPropertyDescriptor(n,a))})}return e}function ele(e,r,n){return(r=tle(r))in e?Object.defineProperty(e,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[r]=n,e}function tle(e){var r=rle(e,"string");return typeof r=="symbol"?r:r+""}function rle(e,r){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var a=n.call(e,r);if(typeof a!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return(r==="string"?String:Number)(e)}function er(e,r,n){return $t(e)||$t(r)?n:gn(r)?Ip(e,r,n):typeof r=="function"?r(e):n}var nle=(e,r,n)=>{if(r&&n){var{width:a,height:i}=n,{align:o,verticalAlign:u,layout:c}=r;if((c==="vertical"||c==="horizontal"&&u==="middle")&&o!=="center"&&ke(e[o]))return Hl(Hl({},e),{},{[o]:e[o]+(a||0)});if((c==="horizontal"||c==="vertical"&&o==="center")&&u!=="middle"&&ke(e[u]))return Hl(Hl({},e),{},{[u]:e[u]+(i||0)})}return e},ti=(e,r)=>e==="horizontal"&&r==="xAxis"||e==="vertical"&&r==="yAxis"||e==="centric"&&r==="angleAxis"||e==="radial"&&r==="radiusAxis",uq=(e,r,n,a)=>{if(a)return e.map(c=>c.coordinate);var i,o,u=e.map(c=>(c.coordinate===r&&(i=!0),c.coordinate===n&&(o=!0),c.coordinate));return i||u.push(r),o||u.push(n),u},sq=(e,r,n)=>{if(!e)return null;var{duplicateDomain:a,type:i,range:o,scale:u,realScaleType:c,isCategorical:f,categoricalDomain:d,tickCount:h,ticks:m,niceTicks:g,axisType:y}=e;if(!u)return null;var x=c==="scaleBand"&&u.bandwidth?u.bandwidth()/2:2,E=i==="category"&&u.bandwidth?u.bandwidth()/x:0;if(E=y==="angleAxis"&&o&&o.length>=2?mn(o[0]-o[1])*2*E:E,m||g){var w=(m||g||[]).map((_,A)=>{var O=a?a.indexOf(_):_,T=u.map(O);return Re(T)?{coordinate:T+E,value:_,offset:E,index:A}:null}).filter(Tr);return w}return f&&d?d.map((_,A)=>{var O=u.map(_);return Re(O)?{coordinate:O+E,value:_,index:A,offset:E}:null}).filter(Tr):u.ticks&&h!=null?u.ticks(h).map((_,A)=>{var O=u.map(_);return Re(O)?{coordinate:O+E,value:_,index:A,offset:E}:null}).filter(Tr):u.domain().map((_,A)=>{var O=u.map(_);return Re(O)?{coordinate:O+E,value:a?a[_]:_,index:A,offset:E}:null}).filter(Tr)},ale=e=>{var r,n=e.length;if(!(n<=0)){var a=(r=e[0])===null||r===void 0?void 0:r.length;if(!(a==null||a<=0))for(var i=0;i<a;++i)for(var o=0,u=0,c=0;c<n;++c){var f=e[c],d=f==null?void 0:f[i];if(d!=null){var h=d[1],m=d[0],g=Wa(h)?m:h;g>=0?(d[0]=o,o+=g,d[1]=o):(d[0]=u,u+=g,d[1]=u)}}}},ile=e=>{var r,n=e.length;if(!(n<=0)){var a=(r=e[0])===null||r===void 0?void 0:r.length;if(!(a==null||a<=0))for(var i=0;i<a;++i)for(var o=0,u=0;u<n;++u){var c=e[u],f=c==null?void 0:c[i];if(f!=null){var d=Wa(f[1])?f[0]:f[1];d>=0?(f[0]=o,o+=d,f[1]=o):(f[0]=0,f[1]=0)}}}},ole={sign:ale,expand:Rae,none:Ro,silhouette:Dae,wiggle:Lae,positive:ile},lle=(e,r,n)=>{var a,i=(a=ole[n])!==null&&a!==void 0?a:Ro,o=Pae().keys(r).value((c,f)=>Number(er(c,f,0))).order(U2).offset(i),u=o(e);return u.forEach((c,f)=>{c.forEach((d,h)=>{var m=er(e[h],r[f],0);Array.isArray(m)&&m.length===2&&ke(m[0])&&ke(m[1])&&(d[0]=m[0],d[1]=m[1])})}),u};function m3(e){var{axis:r,ticks:n,bandSize:a,entry:i,index:o,dataKey:u}=e;if(r.type==="category"){if(!r.allowDuplicatedCategory&&r.dataKey&&!$t(i[r.dataKey])){var c=mz(n,"value",i[r.dataKey]);if(c)return c.coordinate+a/2}return n!=null&&n[o]?n[o].coordinate+a/2:null}var f=er(i,$t(u)?r.dataKey:u),d=r.scale.map(f);return ke(d)?d:null}var ule=e=>{var r=e.flat(2).filter(ke);return[Math.min(...r),Math.max(...r)]},sle=e=>[e[0]===1/0?0:e[0],e[1]===-1/0?0:e[1]],cle=(e,r,n)=>{if(e!=null)return sle(Object.keys(e).reduce((a,i)=>{var o=e[i];if(!o)return a;var{stackedData:u}=o,c=u.reduce((f,d)=>{var h=lq(d,r,n),m=ule(h);return!Re(m[0])||!Re(m[1])?f:[Math.min(f[0],m[0]),Math.max(f[1],m[1])]},[1/0,-1/0]);return[Math.min(c[0],a[0]),Math.max(c[1],a[1])]},[1/0,-1/0]))},v3=/^dataMin[\s]*-[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,g3=/^dataMax[\s]*\+[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,Gh=(e,r,n)=>{if(e&&e.scale&&e.scale.bandwidth){var a=e.scale.bandwidth();if(!n||a>0)return a}if(e&&r&&r.length>=2){for(var i=zp(r,h=>h.coordinate),o=1/0,u=1,c=i.length;u<c;u++){var f=i[u],d=i[u-1];o=Math.min(((f==null?void 0:f.coordinate)||0)-((d==null?void 0:d.coordinate)||0),o)}return o===1/0?0:o}return n?void 0:0};function y3(e){var{tooltipEntrySettings:r,dataKey:n,payload:a,value:i,name:o}=e;return Hl(Hl({},r),{},{dataKey:n,payload:a,value:i,name:o})}function cq(e,r){if(e)return String(e);if(typeof r=="string")return r}var fle=(e,r)=>{if(r==="horizontal")return e.relativeX;if(r==="vertical")return e.relativeY},dle=(e,r)=>r==="centric"?e.angle:e.radius,ri=e=>e.layout.width,ni=e=>e.layout.height,hle=e=>e.layout.scale,fq=e=>e.layout.margin,Yp=ue(e=>e.cartesianAxis.xAxis,e=>Object.values(e)),Xp=ue(e=>e.cartesianAxis.yAxis,e=>Object.values(e)),ple="data-recharts-item-index",mle="data-recharts-item-id",Dc=60;function b3(e,r){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);r&&(a=a.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,a)}return n}function zd(e){for(var r=1;r<arguments.length;r++){var n=arguments[r]!=null?arguments[r]:{};r%2?b3(Object(n),!0).forEach(function(a){vle(e,a,n[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):b3(Object(n)).forEach(function(a){Object.defineProperty(e,a,Object.getOwnPropertyDescriptor(n,a))})}return e}function vle(e,r,n){return(r=gle(r))in e?Object.defineProperty(e,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[r]=n,e}function gle(e){var r=yle(e,"string");return typeof r=="symbol"?r:r+""}function yle(e,r){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var a=n.call(e,r);if(typeof a!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return(r==="string"?String:Number)(e)}var ble=e=>e.brush.height;function xle(e){var r=Xp(e);return r.reduce((n,a)=>{if(a.orientation==="left"&&!a.mirror&&!a.hide){var i=typeof a.width=="number"?a.width:Dc;return n+i}return n},0)}function _le(e){var r=Xp(e);return r.reduce((n,a)=>{if(a.orientation==="right"&&!a.mirror&&!a.hide){var i=typeof a.width=="number"?a.width:Dc;return n+i}return n},0)}function wle(e){var r=Yp(e);return r.reduce((n,a)=>a.orientation==="top"&&!a.mirror&&!a.hide?n+a.height:n,0)}function Sle(e){var r=Yp(e);return r.reduce((n,a)=>a.orientation==="bottom"&&!a.mirror&&!a.hide?n+a.height:n,0)}var rr=ue([ri,ni,fq,ble,xle,_le,wle,Sle,Nz,Zie],(e,r,n,a,i,o,u,c,f,d)=>{var h={left:(n.left||0)+i,right:(n.right||0)+o},m={top:(n.top||0)+u,bottom:(n.bottom||0)+c},g=zd(zd({},m),h),y=g.bottom;g.bottom+=a,g=nle(g,f,d);var x=e-g.left-g.right,E=r-g.top-g.bottom;return zd(zd({brushBottom:y},g),{},{width:Math.max(x,0),height:Math.max(E,0)})}),Ele=ue(rr,e=>({x:e.left,y:e.top,width:e.width,height:e.height})),dq=ue(ri,ni,(e,r)=>({x:0,y:0,width:e,height:r})),kle=k.createContext(null),yr=()=>k.useContext(kle)!=null,Wp=e=>e.brush,Zp=ue([Wp,rr,fq],(e,r,n)=>({height:e.height,x:ke(e.x)?e.x:r.left,y:ke(e.y)?e.y:r.top+r.height+r.brushBottom-((n==null?void 0:n.bottom)||0),width:ke(e.width)?e.width:r.width})),g0={},y0={},b0={},x3;function jle(){return x3||(x3=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function r(n,a,{signal:i,edges:o}={}){let u,c=null;const f=o!=null&&o.includes("leading"),d=o==null||o.includes("trailing"),h=()=>{c!==null&&(n.apply(u,c),u=void 0,c=null)},m=()=>{d&&h(),E()};let g=null;const y=()=>{g!=null&&clearTimeout(g),g=setTimeout(()=>{g=null,m()},a)},x=()=>{g!==null&&(clearTimeout(g),g=null)},E=()=>{x(),u=void 0,c=null},w=()=>{h()},_=function(...A){if(i!=null&&i.aborted)return;u=this,c=A;const O=g==null;y(),f&&O&&h()};return _.schedule=y,_.cancel=E,_.flush=w,i==null||i.addEventListener("abort",E,{once:!0}),_}e.debounce=r})(b0)),b0}var _3;function Ale(){return _3||(_3=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const r=jle();function n(a,i=0,o={}){typeof o!="object"&&(o={});const{leading:u=!1,trailing:c=!0,maxWait:f}=o,d=Array(2);u&&(d[0]="leading"),c&&(d[1]="trailing");let h,m=null;const g=r.debounce(function(...E){h=a.apply(this,E),m=null},i,{edges:d}),y=function(...E){return f!=null&&(m===null&&(m=Date.now()),Date.now()-m>=f)?(h=a.apply(this,E),m=Date.now(),g.cancel(),g.schedule(),h):(g.apply(this,E),h)},x=()=>(g.flush(),h);return y.cancel=g.cancel,y.flush=x,y}e.debounce=n})(y0)),y0}var w3;function Ole(){return w3||(w3=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const r=Ale();function n(a,i=0,o={}){const{leading:u=!0,trailing:c=!0}=o;return r.debounce(a,i,{leading:u,maxWait:i,trailing:c})}e.throttle=n})(g0)),g0}var x0,S3;function Cle(){return S3||(S3=1,x0=Ole().throttle),x0}var Tle=Cle();const Nle=Dn(Tle);var Kh=function(r,n){for(var a=arguments.length,i=new Array(a>2?a-2:0),o=2;o<a;o++)i[o-2]=arguments[o];if(typeof console<"u"&&console.warn&&(n===void 0&&console.warn("LogUtils requires an error message argument"),!r))if(n===void 0)console.warn("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var u=0;console.warn(n.replace(/%s/g,()=>i[u++]))}},Qn={width:"100%",height:"100%",debounce:0,minWidth:0,initialDimension:{width:-1,height:-1}},hq=(e,r,n)=>{var{width:a=Qn.width,height:i=Qn.height,aspect:o,maxHeight:u}=n,c=Do(a)?e:Number(a),f=Do(i)?r:Number(i);return o&&o>0&&(c?f=c/o:f&&(c=f*o),u&&f!=null&&f>u&&(f=u)),{calculatedWidth:c,calculatedHeight:f}},Mle={width:0,height:0,overflow:"visible"},Ple={width:0,overflowX:"visible"},Rle={height:0,overflowY:"visible"},Dle={},Lle=e=>{var{width:r,height:n}=e,a=Do(r),i=Do(n);return a&&i?Mle:a?Ple:i?Rle:Dle};function Ile(e){var{width:r,height:n,aspect:a}=e,i=r,o=n;return i===void 0&&o===void 0?(i=Qn.width,o=Qn.height):i===void 0?i=a&&a>0?void 0:Qn.width:o===void 0&&(o=a&&a>0?void 0:Qn.height),{width:i,height:o}}function eS(){return eS=Object.assign?Object.assign.bind():function(e){for(var r=1;r<arguments.length;r++){var n=arguments[r];for(var a in n)({}).hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e},eS.apply(null,arguments)}function E3(e,r){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);r&&(a=a.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,a)}return n}function k3(e){for(var r=1;r<arguments.length;r++){var n=arguments[r]!=null?arguments[r]:{};r%2?E3(Object(n),!0).forEach(function(a){zle(e,a,n[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):E3(Object(n)).forEach(function(a){Object.defineProperty(e,a,Object.getOwnPropertyDescriptor(n,a))})}return e}function zle(e,r,n){return(r=qle(r))in e?Object.defineProperty(e,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[r]=n,e}function qle(e){var r=Ble(e,"string");return typeof r=="symbol"?r:r+""}function Ble(e,r){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var a=n.call(e,r);if(typeof a!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return(r==="string"?String:Number)(e)}var pq=k.createContext(Qn.initialDimension);function $le(e){return la(e.width)&&la(e.height)}function mq(e){var{children:r,width:n,height:a}=e,i=k.useMemo(()=>({width:n,height:a}),[n,a]);return $le(i)?k.createElement(pq.Provider,{value:i},r):null}var FE=()=>k.useContext(pq),Ule=k.forwardRef((e,r)=>{var{aspect:n,initialDimension:a=Qn.initialDimension,width:i,height:o,minWidth:u=Qn.minWidth,minHeight:c,maxHeight:f,children:d,debounce:h=Qn.debounce,id:m,className:g,onResize:y,style:x={}}=e,E=k.useRef(null),w=k.useRef();w.current=y,k.useImperativeHandle(r,()=>E.current);var[_,A]=k.useState({containerWidth:a.width,containerHeight:a.height}),O=k.useCallback((R,L)=>{A(D=>{var z=Math.round(R),q=Math.round(L);return D.containerWidth===z&&D.containerHeight===q?D:{containerWidth:z,containerHeight:q}})},[]);k.useEffect(()=>{if(E.current==null||typeof ResizeObserver>"u")return Fo;var R=q=>{var G,U=q[0];if(U!=null){var{width:Y,height:$}=U.contentRect;O(Y,$),(G=w.current)===null||G===void 0||G.call(w,Y,$)}};h>0&&(R=Nle(R,h,{trailing:!0,leading:!1}));var L=new ResizeObserver(R),{width:D,height:z}=E.current.getBoundingClientRect();return O(D,z),L.observe(E.current),()=>{L.disconnect()}},[O,h]);var{containerWidth:T,containerHeight:C}=_;Kh(!n||n>0,"The aspect(%s) must be greater than zero.",n);var{calculatedWidth:N,calculatedHeight:M}=hq(T,C,{width:i,height:o,aspect:n,maxHeight:f});return Kh(N!=null&&N>0||M!=null&&M>0,`The width(%s) and height(%s) of chart should be greater than 0,
134
+ please check the style of container, or the props width(%s) and height(%s),
135
+ or add a minWidth(%s) or minHeight(%s) or use aspect(%s) to control the
136
+ height and width.`,N,M,i,o,u,c,n),k.createElement("div",{id:m?"".concat(m):void 0,className:Je("recharts-responsive-container",g),style:k3(k3({},x),{},{width:i,height:o,minWidth:u,minHeight:c,maxHeight:f}),ref:E},k.createElement("div",{style:Lle({width:i,height:o})},k.createElement(mq,{width:N,height:M},d)))}),Fle=k.forwardRef((e,r)=>{var n=FE();if(la(n.width)&&la(n.height))return e.children;var{width:a,height:i}=Ile({width:e.width,height:e.height,aspect:e.aspect}),{calculatedWidth:o,calculatedHeight:u}=hq(void 0,void 0,{width:a,height:i,aspect:e.aspect,maxHeight:e.maxHeight});return ke(o)&&ke(u)?k.createElement(mq,{width:o,height:u},e.children):k.createElement(Ule,eS({},e,{width:a,height:i,ref:r}))});function HE(e){if(e)return{x:e.x,y:e.y,upperWidth:"upperWidth"in e?e.upperWidth:e.width,lowerWidth:"lowerWidth"in e?e.lowerWidth:e.width,width:e.width,height:e.height}}var Lc=()=>{var e,r=yr(),n=je(Ele),a=je(Zp),i=(e=je(Wp))===null||e===void 0?void 0:e.padding;return!r||!a||!i?n:{width:a.width-i.left-i.right,height:a.height-i.top-i.bottom,x:i.left,y:i.top}},Hle={top:0,bottom:0,left:0,right:0,width:0,height:0,brushBottom:0},vq=()=>{var e;return(e=je(rr))!==null&&e!==void 0?e:Hle},gq=()=>je(ri),yq=()=>je(ni),vt=e=>e.layout.layoutType,su=()=>je(vt),bq=()=>{var e=su();if(e==="horizontal"||e==="vertical")return e},xq=e=>{var r=e.layout.layoutType;if(r==="centric"||r==="radial")return r},Gle=()=>{var e=su();return e!==void 0},Ic=e=>{var r=Et(),n=yr(),{width:a,height:i}=e,o=FE(),u=a,c=i;return o&&(u=o.width>0?o.width:a,c=o.height>0?o.height:i),k.useEffect(()=>{!n&&la(u)&&la(c)&&r(Zoe({width:u,height:c}))},[r,n,u,c]),null},_q=Symbol.for("immer-nothing"),j3=Symbol.for("immer-draftable"),Vr=Symbol.for("immer-state");function Nn(e,...r){throw new Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var fc=Object.getPrototypeOf;function nu(e){return!!e&&!!e[Vr]}function Io(e){var r;return e?wq(e)||Array.isArray(e)||!!e[j3]||!!((r=e.constructor)!=null&&r[j3])||zc(e)||Jp(e):!1}var Kle=Object.prototype.constructor.toString(),A3=new WeakMap;function wq(e){if(!e||typeof e!="object")return!1;const r=Object.getPrototypeOf(e);if(r===null||r===Object.prototype)return!0;const n=Object.hasOwnProperty.call(r,"constructor")&&r.constructor;if(n===Object)return!0;if(typeof n!="function")return!1;let a=A3.get(n);return a===void 0&&(a=Function.toString.call(n),A3.set(n,a)),a===Kle}function Vh(e,r,n=!0){Qp(e)===0?(n?Reflect.ownKeys(e):Object.keys(e)).forEach(i=>{r(i,e[i],e)}):e.forEach((a,i)=>r(i,a,e))}function Qp(e){const r=e[Vr];return r?r.type_:Array.isArray(e)?1:zc(e)?2:Jp(e)?3:0}function tS(e,r){return Qp(e)===2?e.has(r):Object.prototype.hasOwnProperty.call(e,r)}function Sq(e,r,n){const a=Qp(e);a===2?e.set(r,n):a===3?e.add(n):e[r]=n}function Vle(e,r){return e===r?e!==0||1/e===1/r:e!==e&&r!==r}function zc(e){return e instanceof Map}function Jp(e){return e instanceof Set}function _o(e){return e.copy_||e.base_}function rS(e,r){if(zc(e))return new Map(e);if(Jp(e))return new Set(e);if(Array.isArray(e))return Array.prototype.slice.call(e);const n=wq(e);if(r===!0||r==="class_only"&&!n){const a=Object.getOwnPropertyDescriptors(e);delete a[Vr];let i=Reflect.ownKeys(a);for(let o=0;o<i.length;o++){const u=i[o],c=a[u];c.writable===!1&&(c.writable=!0,c.configurable=!0),(c.get||c.set)&&(a[u]={configurable:!0,writable:!0,enumerable:c.enumerable,value:e[u]})}return Object.create(fc(e),a)}else{const a=fc(e);if(a!==null&&n)return{...e};const i=Object.create(a);return Object.assign(i,e)}}function GE(e,r=!1){return em(e)||nu(e)||!Io(e)||(Qp(e)>1&&Object.defineProperties(e,{set:qd,add:qd,clear:qd,delete:qd}),Object.freeze(e),r&&Object.values(e).forEach(n=>GE(n,!0))),e}function Yle(){Nn(2)}var qd={value:Yle};function em(e){return e===null||typeof e!="object"?!0:Object.isFrozen(e)}var Xle={};function zo(e){const r=Xle[e];return r||Nn(0,e),r}var dc;function Eq(){return dc}function Wle(e,r){return{drafts_:[],parent_:e,immer_:r,canAutoFreeze_:!0,unfinalizedDrafts_:0}}function O3(e,r){r&&(zo("Patches"),e.patches_=[],e.inversePatches_=[],e.patchListener_=r)}function nS(e){aS(e),e.drafts_.forEach(Zle),e.drafts_=null}function aS(e){e===dc&&(dc=e.parent_)}function C3(e){return dc=Wle(dc,e)}function Zle(e){const r=e[Vr];r.type_===0||r.type_===1?r.revoke_():r.revoked_=!0}function T3(e,r){r.unfinalizedDrafts_=r.drafts_.length;const n=r.drafts_[0];return e!==void 0&&e!==n?(n[Vr].modified_&&(nS(r),Nn(4)),Io(e)&&(e=Yh(r,e),r.parent_||Xh(r,e)),r.patches_&&zo("Patches").generateReplacementPatches_(n[Vr].base_,e,r.patches_,r.inversePatches_)):e=Yh(r,n,[]),nS(r),r.patches_&&r.patchListener_(r.patches_,r.inversePatches_),e!==_q?e:void 0}function Yh(e,r,n){if(em(r))return r;const a=e.immer_.shouldUseStrictIteration(),i=r[Vr];if(!i)return Vh(r,(o,u)=>N3(e,i,r,o,u,n),a),r;if(i.scope_!==e)return r;if(!i.modified_)return Xh(e,i.base_,!0),i.base_;if(!i.finalized_){i.finalized_=!0,i.scope_.unfinalizedDrafts_--;const o=i.copy_;let u=o,c=!1;i.type_===3&&(u=new Set(o),o.clear(),c=!0),Vh(u,(f,d)=>N3(e,i,o,f,d,n,c),a),Xh(e,o,!1),n&&e.patches_&&zo("Patches").generatePatches_(i,n,e.patches_,e.inversePatches_)}return i.copy_}function N3(e,r,n,a,i,o,u){if(i==null||typeof i!="object"&&!u)return;const c=em(i);if(!(c&&!u)){if(nu(i)){const f=o&&r&&r.type_!==3&&!tS(r.assigned_,a)?o.concat(a):void 0,d=Yh(e,i,f);if(Sq(n,a,d),nu(d))e.canAutoFreeze_=!1;else return}else u&&n.add(i);if(Io(i)&&!c){if(!e.immer_.autoFreeze_&&e.unfinalizedDrafts_<1||r&&r.base_&&r.base_[a]===i&&c)return;Yh(e,i),(!r||!r.scope_.parent_)&&typeof a!="symbol"&&(zc(n)?n.has(a):Object.prototype.propertyIsEnumerable.call(n,a))&&Xh(e,i)}}}function Xh(e,r,n=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&GE(r,n)}function Qle(e,r){const n=Array.isArray(e),a={type_:n?1:0,scope_:r?r.scope_:Eq(),modified_:!1,finalized_:!1,assigned_:{},parent_:r,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1};let i=a,o=KE;n&&(i=[a],o=hc);const{revoke:u,proxy:c}=Proxy.revocable(i,o);return a.draft_=c,a.revoke_=u,c}var KE={get(e,r){if(r===Vr)return e;const n=_o(e);if(!tS(n,r))return Jle(e,n,r);const a=n[r];return e.finalized_||!Io(a)?a:a===_0(e.base_,r)?(w0(e),e.copy_[r]=oS(a,e)):a},has(e,r){return r in _o(e)},ownKeys(e){return Reflect.ownKeys(_o(e))},set(e,r,n){const a=kq(_o(e),r);if(a!=null&&a.set)return a.set.call(e.draft_,n),!0;if(!e.modified_){const i=_0(_o(e),r),o=i==null?void 0:i[Vr];if(o&&o.base_===n)return e.copy_[r]=n,e.assigned_[r]=!1,!0;if(Vle(n,i)&&(n!==void 0||tS(e.base_,r)))return!0;w0(e),iS(e)}return e.copy_[r]===n&&(n!==void 0||r in e.copy_)||Number.isNaN(n)&&Number.isNaN(e.copy_[r])||(e.copy_[r]=n,e.assigned_[r]=!0),!0},deleteProperty(e,r){return _0(e.base_,r)!==void 0||r in e.base_?(e.assigned_[r]=!1,w0(e),iS(e)):delete e.assigned_[r],e.copy_&&delete e.copy_[r],!0},getOwnPropertyDescriptor(e,r){const n=_o(e),a=Reflect.getOwnPropertyDescriptor(n,r);return a&&{writable:!0,configurable:e.type_!==1||r!=="length",enumerable:a.enumerable,value:n[r]}},defineProperty(){Nn(11)},getPrototypeOf(e){return fc(e.base_)},setPrototypeOf(){Nn(12)}},hc={};Vh(KE,(e,r)=>{hc[e]=function(){return arguments[0]=arguments[0][0],r.apply(this,arguments)}});hc.deleteProperty=function(e,r){return hc.set.call(this,e,r,void 0)};hc.set=function(e,r,n){return KE.set.call(this,e[0],r,n,e[0])};function _0(e,r){const n=e[Vr];return(n?_o(n):e)[r]}function Jle(e,r,n){var i;const a=kq(r,n);return a?"value"in a?a.value:(i=a.get)==null?void 0:i.call(e.draft_):void 0}function kq(e,r){if(!(r in e))return;let n=fc(e);for(;n;){const a=Object.getOwnPropertyDescriptor(n,r);if(a)return a;n=fc(n)}}function iS(e){e.modified_||(e.modified_=!0,e.parent_&&iS(e.parent_))}function w0(e){e.copy_||(e.copy_=rS(e.base_,e.scope_.immer_.useStrictShallowCopy_))}var eue=class{constructor(e){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.useStrictIteration_=!0,this.produce=(r,n,a)=>{if(typeof r=="function"&&typeof n!="function"){const o=n;n=r;const u=this;return function(f=o,...d){return u.produce(f,h=>n.call(this,h,...d))}}typeof n!="function"&&Nn(6),a!==void 0&&typeof a!="function"&&Nn(7);let i;if(Io(r)){const o=C3(this),u=oS(r,void 0);let c=!0;try{i=n(u),c=!1}finally{c?nS(o):aS(o)}return O3(o,a),T3(i,o)}else if(!r||typeof r!="object"){if(i=n(r),i===void 0&&(i=r),i===_q&&(i=void 0),this.autoFreeze_&&GE(i,!0),a){const o=[],u=[];zo("Patches").generateReplacementPatches_(r,i,o,u),a(o,u)}return i}else Nn(1,r)},this.produceWithPatches=(r,n)=>{if(typeof r=="function")return(u,...c)=>this.produceWithPatches(u,f=>r(f,...c));let a,i;return[this.produce(r,n,(u,c)=>{a=u,i=c}),a,i]},typeof(e==null?void 0:e.autoFreeze)=="boolean"&&this.setAutoFreeze(e.autoFreeze),typeof(e==null?void 0:e.useStrictShallowCopy)=="boolean"&&this.setUseStrictShallowCopy(e.useStrictShallowCopy),typeof(e==null?void 0:e.useStrictIteration)=="boolean"&&this.setUseStrictIteration(e.useStrictIteration)}createDraft(e){Io(e)||Nn(8),nu(e)&&(e=tue(e));const r=C3(this),n=oS(e,void 0);return n[Vr].isManual_=!0,aS(r),n}finishDraft(e,r){const n=e&&e[Vr];(!n||!n.isManual_)&&Nn(9);const{scope_:a}=n;return O3(a,r),T3(void 0,a)}setAutoFreeze(e){this.autoFreeze_=e}setUseStrictShallowCopy(e){this.useStrictShallowCopy_=e}setUseStrictIteration(e){this.useStrictIteration_=e}shouldUseStrictIteration(){return this.useStrictIteration_}applyPatches(e,r){let n;for(n=r.length-1;n>=0;n--){const i=r[n];if(i.path.length===0&&i.op==="replace"){e=i.value;break}}n>-1&&(r=r.slice(n+1));const a=zo("Patches").applyPatches_;return nu(e)?a(e,r):this.produce(e,i=>a(i,r))}};function oS(e,r){const n=zc(e)?zo("MapSet").proxyMap_(e,r):Jp(e)?zo("MapSet").proxySet_(e,r):Qle(e,r);return(r?r.scope_:Eq()).drafts_.push(n),n}function tue(e){return nu(e)||Nn(10,e),jq(e)}function jq(e){if(!Io(e)||em(e))return e;const r=e[Vr];let n,a=!0;if(r){if(!r.modified_)return r.base_;r.finalized_=!0,n=rS(e,r.scope_.immer_.useStrictShallowCopy_),a=r.scope_.immer_.shouldUseStrictIteration()}else n=rS(e,!0);return Vh(n,(i,o)=>{Sq(n,i,jq(o))},a),r&&(r.finalized_=!1),n}var rue=new eue;rue.produce;var nue={settings:{layout:"horizontal",align:"center",verticalAlign:"middle",itemSorter:"value"},size:{width:0,height:0},payload:[]},Aq=cr({name:"legend",initialState:nue,reducers:{setLegendSize(e,r){e.size.width=r.payload.width,e.size.height=r.payload.height},setLegendSettings(e,r){e.settings.align=r.payload.align,e.settings.layout=r.payload.layout,e.settings.verticalAlign=r.payload.verticalAlign,e.settings.itemSorter=r.payload.itemSorter},addLegendPayload:{reducer(e,r){e.payload.push(r.payload)},prepare:ut()},replaceLegendPayload:{reducer(e,r){var{prev:n,next:a}=r.payload,i=vn(e).payload.indexOf(n);i>-1&&(e.payload[i]=a)},prepare:ut()},removeLegendPayload:{reducer(e,r){var n=vn(e).payload.indexOf(r.payload);n>-1&&e.payload.splice(n,1)},prepare:ut()}}}),{setLegendSize:k_e,setLegendSettings:j_e,addLegendPayload:aue,replaceLegendPayload:iue,removeLegendPayload:oue}=Aq.actions,lue=Aq.reducer,S0={exports:{}},E0={};/**
137
+ * @license React
138
+ * use-sync-external-store-with-selector.production.js
139
+ *
140
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
141
+ *
142
+ * This source code is licensed under the MIT license found in the
143
+ * LICENSE file in the root directory of this source tree.
144
+ */var M3;function uue(){if(M3)return E0;M3=1;var e=iu();function r(f,d){return f===d&&(f!==0||1/f===1/d)||f!==f&&d!==d}var n=typeof Object.is=="function"?Object.is:r,a=e.useSyncExternalStore,i=e.useRef,o=e.useEffect,u=e.useMemo,c=e.useDebugValue;return E0.useSyncExternalStoreWithSelector=function(f,d,h,m,g){var y=i(null);if(y.current===null){var x={hasValue:!1,value:null};y.current=x}else x=y.current;y=u(function(){function w(C){if(!_){if(_=!0,A=C,C=m(C),g!==void 0&&x.hasValue){var N=x.value;if(g(N,C))return O=N}return O=C}if(N=O,n(A,C))return N;var M=m(C);return g!==void 0&&g(N,M)?(A=C,N):(A=C,O=M)}var _=!1,A,O,T=h===void 0?null:h;return[function(){return w(d())},T===null?void 0:function(){return w(T())}]},[d,h,m,g]);var E=a(f,y[0],y[1]);return o(function(){x.hasValue=!0,x.value=E},[E]),c(E),E},E0}var P3;function sue(){return P3||(P3=1,S0.exports=uue()),S0.exports}sue();function cue(e){e()}function fue(){let e=null,r=null;return{clear(){e=null,r=null},notify(){cue(()=>{let n=e;for(;n;)n.callback(),n=n.next})},get(){const n=[];let a=e;for(;a;)n.push(a),a=a.next;return n},subscribe(n){let a=!0;const i=r={callback:n,next:null,prev:r};return i.prev?i.prev.next=i:e=i,function(){!a||e===null||(a=!1,i.next?i.next.prev=i.prev:r=i.prev,i.prev?i.prev.next=i.next:e=i.next)}}}}var R3={notify(){},get:()=>[]};function due(e,r){let n,a=R3,i=0,o=!1;function u(E){h();const w=a.subscribe(E);let _=!1;return()=>{_||(_=!0,w(),m())}}function c(){a.notify()}function f(){x.onStateChange&&x.onStateChange()}function d(){return o}function h(){i++,n||(n=e.subscribe(f),a=fue())}function m(){i--,n&&i===0&&(n(),n=void 0,a.clear(),a=R3)}function g(){o||(o=!0,h())}function y(){o&&(o=!1,m())}const x={addNestedSub:u,notifyNestedSubs:c,handleChangeWrapper:f,isSubscribed:d,trySubscribe:g,tryUnsubscribe:y,getListeners:()=>a};return x}var hue=()=>typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",pue=hue(),mue=()=>typeof navigator<"u"&&navigator.product==="ReactNative",vue=mue(),gue=()=>pue||vue?k.useLayoutEffect:k.useEffect,yue=gue();function D3(e,r){return e===r?e!==0||r!==0||1/e===1/r:e!==e&&r!==r}function bue(e,r){if(D3(e,r))return!0;if(typeof e!="object"||e===null||typeof r!="object"||r===null)return!1;const n=Object.keys(e),a=Object.keys(r);if(n.length!==a.length)return!1;for(let i=0;i<n.length;i++)if(!Object.prototype.hasOwnProperty.call(r,n[i])||!D3(e[n[i]],r[n[i]]))return!1;return!0}var k0=Symbol.for("react-redux-context"),j0=typeof globalThis<"u"?globalThis:{};function xue(){if(!k.createContext)return{};const e=j0[k0]??(j0[k0]=new Map);let r=e.get(k.createContext);return r||(r=k.createContext(null),e.set(k.createContext,r)),r}var _ue=xue();function wue(e){const{children:r,context:n,serverState:a,store:i}=e,o=k.useMemo(()=>{const f=due(i);return{store:i,subscription:f,getServerState:a?()=>a:void 0}},[i,a]),u=k.useMemo(()=>i.getState(),[i]);yue(()=>{const{subscription:f}=o;return f.onStateChange=f.notifyNestedSubs,f.trySubscribe(),u!==i.getState()&&f.notifyNestedSubs(),()=>{f.tryUnsubscribe(),f.onStateChange=void 0}},[o,u]);const c=n||_ue;return k.createElement(c.Provider,{value:o},r)}var Sue=wue,Eue=new Set(["axisLine","tickLine","activeBar","activeDot","activeLabel","activeShape","allowEscapeViewBox","background","cursor","dot","label","line","margin","padding","position","shape","style","tick","wrapperStyle","radius","throttledEvents"]);function kue(e,r){return e==null&&r==null?!0:typeof e=="number"&&typeof r=="number"?e===r||e!==e&&r!==r:e===r}function tm(e,r){var n=new Set([...Object.keys(e),...Object.keys(r)]);for(var a of n)if(Eue.has(a)){if(e[a]==null&&r[a]==null)continue;if(!bue(e[a],r[a]))return!1}else if(!kue(e[a],r[a]))return!1;return!0}function lS(){return lS=Object.assign?Object.assign.bind():function(e){for(var r=1;r<arguments.length;r++){var n=arguments[r];for(var a in n)({}).hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e},lS.apply(null,arguments)}function L3(e,r){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);r&&(a=a.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,a)}return n}function Ms(e){for(var r=1;r<arguments.length;r++){var n=arguments[r]!=null?arguments[r]:{};r%2?L3(Object(n),!0).forEach(function(a){jue(e,a,n[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):L3(Object(n)).forEach(function(a){Object.defineProperty(e,a,Object.getOwnPropertyDescriptor(n,a))})}return e}function jue(e,r,n){return(r=Aue(r))in e?Object.defineProperty(e,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[r]=n,e}function Aue(e){var r=Oue(e,"string");return typeof r=="symbol"?r:r+""}function Oue(e,r){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var a=n.call(e,r);if(typeof a!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return(r==="string"?String:Number)(e)}function Cue(e){return Array.isArray(e)&&gn(e[0])&&gn(e[1])?e.join(" ~ "):e}var Il={separator:" : ",contentStyle:{margin:0,padding:10,backgroundColor:"#fff",border:"1px solid #ccc",whiteSpace:"nowrap"},itemStyle:{display:"block",paddingTop:4,paddingBottom:4,color:"#000"},labelStyle:{},accessibilityLayer:!1};function Tue(e,r){return r==null?e:zp(e,r)}var Nue=e=>{var{separator:r=Il.separator,contentStyle:n,itemStyle:a,labelStyle:i=Il.labelStyle,payload:o,formatter:u,itemSorter:c,wrapperClassName:f,labelClassName:d,label:h,labelFormatter:m,accessibilityLayer:g=Il.accessibilityLayer}=e,y=()=>{if(o&&o.length){var C={padding:0,margin:0},N=Tue(o,c),M=N.map((R,L)=>{if(R.type==="none")return null;var D=R.formatter||u||Cue,{value:z,name:q}=R,G=z,U=q;if(D){var Y=D(z,q,R,L,o);if(Array.isArray(Y))[G,U]=Y;else if(Y!=null)G=Y;else return null}var $=Ms(Ms({},Il.itemStyle),{},{color:R.color||Il.itemStyle.color},a);return k.createElement("li",{className:"recharts-tooltip-item",key:"tooltip-item-".concat(L),style:$},gn(U)?k.createElement("span",{className:"recharts-tooltip-item-name"},U):null,gn(U)?k.createElement("span",{className:"recharts-tooltip-item-separator"},r):null,k.createElement("span",{className:"recharts-tooltip-item-value"},G),k.createElement("span",{className:"recharts-tooltip-item-unit"},R.unit||""))});return k.createElement("ul",{className:"recharts-tooltip-item-list",style:C},M)}return null},x=Ms(Ms({},Il.contentStyle),n),E=Ms({margin:0},i),w=!$t(h),_=w?h:"",A=Je("recharts-default-tooltip",f),O=Je("recharts-tooltip-label",d);w&&m&&o!==void 0&&o!==null&&(_=m(h,o));var T=g?{role:"status","aria-live":"assertive"}:{};return k.createElement("div",lS({className:A,style:x},T),k.createElement("p",{className:O,style:E},k.isValidElement(_)?_:"".concat(_)),y())},Ps="recharts-tooltip-wrapper",Mue={visibility:"hidden"};function Pue(e){var{coordinate:r,translateX:n,translateY:a}=e;return Je(Ps,{["".concat(Ps,"-right")]:ke(n)&&r&&ke(r.x)&&n>=r.x,["".concat(Ps,"-left")]:ke(n)&&r&&ke(r.x)&&n<r.x,["".concat(Ps,"-bottom")]:ke(a)&&r&&ke(r.y)&&a>=r.y,["".concat(Ps,"-top")]:ke(a)&&r&&ke(r.y)&&a<r.y})}function I3(e){var{allowEscapeViewBox:r,coordinate:n,key:a,offset:i,position:o,reverseDirection:u,tooltipDimension:c,viewBox:f,viewBoxDimension:d}=e;if(o&&ke(o[a]))return o[a];var h=n[a]-c-(i>0?i:0),m=n[a]+i;if(r[a])return u[a]?h:m;var g=f[a];if(g==null)return 0;if(u[a]){var y=h,x=g;return y<x?Math.max(m,g):Math.max(h,g)}if(d==null)return 0;var E=m+c,w=g+d;return E>w?Math.max(h,g):Math.max(m,g)}function Rue(e){var{translateX:r,translateY:n,useTranslate3d:a}=e;return{transform:a?"translate3d(".concat(r,"px, ").concat(n,"px, 0)"):"translate(".concat(r,"px, ").concat(n,"px)")}}function Due(e){var{allowEscapeViewBox:r,coordinate:n,offsetTop:a,offsetLeft:i,position:o,reverseDirection:u,tooltipBox:c,useTranslate3d:f,viewBox:d}=e,h,m,g;return c.height>0&&c.width>0&&n?(m=I3({allowEscapeViewBox:r,coordinate:n,key:"x",offset:i,position:o,reverseDirection:u,tooltipDimension:c.width,viewBox:d,viewBoxDimension:d.width}),g=I3({allowEscapeViewBox:r,coordinate:n,key:"y",offset:a,position:o,reverseDirection:u,tooltipDimension:c.height,viewBox:d,viewBoxDimension:d.height}),h=Rue({translateX:m,translateY:g,useTranslate3d:f})):h=Mue,{cssProperties:h,cssClasses:Pue({translateX:m,translateY:g,coordinate:n})}}var Lue=()=>!(typeof window<"u"&&window.document&&window.document.createElement&&window.setTimeout),qc={isSsr:Lue()};function Oq(){var[e,r]=k.useState(()=>qc.isSsr||!window.matchMedia?!1:window.matchMedia("(prefers-reduced-motion: reduce)").matches);return k.useEffect(()=>{if(window.matchMedia){var n=window.matchMedia("(prefers-reduced-motion: reduce)"),a=()=>{r(n.matches)};return n.addEventListener("change",a),()=>{n.removeEventListener("change",a)}}},[]),e}function z3(e,r){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);r&&(a=a.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,a)}return n}function zl(e){for(var r=1;r<arguments.length;r++){var n=arguments[r]!=null?arguments[r]:{};r%2?z3(Object(n),!0).forEach(function(a){Iue(e,a,n[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):z3(Object(n)).forEach(function(a){Object.defineProperty(e,a,Object.getOwnPropertyDescriptor(n,a))})}return e}function Iue(e,r,n){return(r=zue(r))in e?Object.defineProperty(e,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[r]=n,e}function zue(e){var r=que(e,"string");return typeof r=="symbol"?r:r+""}function que(e,r){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var a=n.call(e,r);if(typeof a!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return(r==="string"?String:Number)(e)}function Bue(e){if(!(e.prefersReducedMotion&&e.isAnimationActive==="auto")&&e.isAnimationActive&&e.active)return"transform ".concat(e.animationDuration,"ms ").concat(e.animationEasing)}function $ue(e){var r,n,a,i,o,u,c=Oq(),[f,d]=k.useState(()=>({dismissed:!1,dismissedAtCoordinate:{x:0,y:0}}));k.useEffect(()=>{var x=E=>{if(E.key==="Escape"){var w,_,A,O;d({dismissed:!0,dismissedAtCoordinate:{x:(w=(_=e.coordinate)===null||_===void 0?void 0:_.x)!==null&&w!==void 0?w:0,y:(A=(O=e.coordinate)===null||O===void 0?void 0:O.y)!==null&&A!==void 0?A:0}})}};return document.addEventListener("keydown",x),()=>{document.removeEventListener("keydown",x)}},[(r=e.coordinate)===null||r===void 0?void 0:r.x,(n=e.coordinate)===null||n===void 0?void 0:n.y]),f.dismissed&&(((a=(i=e.coordinate)===null||i===void 0?void 0:i.x)!==null&&a!==void 0?a:0)!==f.dismissedAtCoordinate.x||((o=(u=e.coordinate)===null||u===void 0?void 0:u.y)!==null&&o!==void 0?o:0)!==f.dismissedAtCoordinate.y)&&d(zl(zl({},f),{},{dismissed:!1}));var{cssClasses:h,cssProperties:m}=Due({allowEscapeViewBox:e.allowEscapeViewBox,coordinate:e.coordinate,offsetLeft:typeof e.offset=="number"?e.offset:e.offset.x,offsetTop:typeof e.offset=="number"?e.offset:e.offset.y,position:e.position,reverseDirection:e.reverseDirection,tooltipBox:{height:e.lastBoundingBox.height,width:e.lastBoundingBox.width},useTranslate3d:e.useTranslate3d,viewBox:e.viewBox}),g=e.hasPortalFromProps?{}:zl(zl({transition:Bue({prefersReducedMotion:c,isAnimationActive:e.isAnimationActive,active:e.active,animationDuration:e.animationDuration,animationEasing:e.animationEasing})},m),{},{pointerEvents:"none",position:"absolute",top:0,left:0}),y=zl(zl({},g),{},{visibility:!f.dismissed&&e.active&&e.hasPayload?"visible":"hidden"},e.wrapperStyle);return k.createElement("div",{xmlns:"http://www.w3.org/1999/xhtml",tabIndex:-1,className:h,style:y,ref:e.innerRef},e.children)}var Uue=k.memo($ue),Cq=()=>{var e;return(e=je(r=>r.rootProps.accessibilityLayer))!==null&&e!==void 0?e:!0};function uS(){return uS=Object.assign?Object.assign.bind():function(e){for(var r=1;r<arguments.length;r++){var n=arguments[r];for(var a in n)({}).hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e},uS.apply(null,arguments)}function q3(e,r){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);r&&(a=a.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,a)}return n}function B3(e){for(var r=1;r<arguments.length;r++){var n=arguments[r]!=null?arguments[r]:{};r%2?q3(Object(n),!0).forEach(function(a){Fue(e,a,n[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):q3(Object(n)).forEach(function(a){Object.defineProperty(e,a,Object.getOwnPropertyDescriptor(n,a))})}return e}function Fue(e,r,n){return(r=Hue(r))in e?Object.defineProperty(e,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[r]=n,e}function Hue(e){var r=Gue(e,"string");return typeof r=="symbol"?r:r+""}function Gue(e,r){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var a=n.call(e,r);if(typeof a!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return(r==="string"?String:Number)(e)}var $3={curveBasisClosed:wae,curveBasisOpen:Sae,curveBasis:_ae,curveBumpX:lae,curveBumpY:uae,curveLinearClosed:Eae,curveLinear:Dp,curveMonotoneX:kae,curveMonotoneY:jae,curveNatural:Aae,curveStep:Oae,curveStepAfter:Tae,curveStepBefore:Cae},Wh=e=>Re(e.x)&&Re(e.y),U3=e=>e.base!=null&&Wh(e.base)&&Wh(e),Rs=e=>e.x,Ds=e=>e.y,Kue=(e,r)=>{if(typeof e=="function")return e;var n="curve".concat(Mc(e));if((n==="curveMonotone"||n==="curveBump")&&r){var a=$3["".concat(n).concat(r==="vertical"?"Y":"X")];if(a)return a}return $3[n]||Dp},F3={connectNulls:!1,type:"linear"},Vue=e=>{var{type:r=F3.type,points:n=[],baseLine:a,layout:i,connectNulls:o=F3.connectNulls}=e,u=Kue(r,i),c=o?n.filter(Wh):n;if(Array.isArray(a)){var f,d=n.map((x,E)=>B3(B3({},x),{},{base:a[E]}));i==="vertical"?f=Md().y(Ds).x1(Rs).x0(x=>x.base.x):f=Md().x(Rs).y1(Ds).y0(x=>x.base.y);var h=f.defined(U3).curve(u),m=o?d.filter(U3):d;return h(m)}var g;i==="vertical"&&ke(a)?g=Md().y(Ds).x1(Rs).x0(a):ke(a)?g=Md().x(Rs).y1(Ds).y0(a):g=rz().x(Rs).y(Ds);var y=g.defined(Wh).curve(u);return y(c)},Tq=e=>{var{className:r,points:n,path:a,pathRef:i}=e,o=su();if((!n||!n.length)&&!a)return null;var u={type:e.type,points:e.points,baseLine:e.baseLine,layout:e.layout||o,connectNulls:e.connectNulls},c=n&&n.length?Vue(u):a;return k.createElement("path",uS({},ia(e),RE(e),{className:Je("recharts-curve",r),d:c===null?void 0:c,ref:i}))},Yue=["x","y","top","left","width","height","className"];function sS(){return sS=Object.assign?Object.assign.bind():function(e){for(var r=1;r<arguments.length;r++){var n=arguments[r];for(var a in n)({}).hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e},sS.apply(null,arguments)}function H3(e,r){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);r&&(a=a.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,a)}return n}function Xue(e){for(var r=1;r<arguments.length;r++){var n=arguments[r]!=null?arguments[r]:{};r%2?H3(Object(n),!0).forEach(function(a){Wue(e,a,n[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):H3(Object(n)).forEach(function(a){Object.defineProperty(e,a,Object.getOwnPropertyDescriptor(n,a))})}return e}function Wue(e,r,n){return(r=Zue(r))in e?Object.defineProperty(e,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[r]=n,e}function Zue(e){var r=Que(e,"string");return typeof r=="symbol"?r:r+""}function Que(e,r){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var a=n.call(e,r);if(typeof a!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return(r==="string"?String:Number)(e)}function Jue(e,r){if(e==null)return{};var n,a,i=ese(e,r);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(a=0;a<o.length;a++)n=o[a],r.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function ese(e,r){if(e==null)return{};var n={};for(var a in e)if({}.hasOwnProperty.call(e,a)){if(r.indexOf(a)!==-1)continue;n[a]=e[a]}return n}var tse=(e,r,n,a,i,o)=>"M".concat(e,",").concat(i,"v").concat(a,"M").concat(o,",").concat(r,"h").concat(n),rse=e=>{var{x:r=0,y:n=0,top:a=0,left:i=0,width:o=0,height:u=0,className:c}=e,f=Jue(e,Yue),d=Xue({x:r,y:n,top:a,left:i,width:o,height:u},f);return!ke(r)||!ke(n)||!ke(o)||!ke(u)||!ke(a)||!ke(i)?null:k.createElement("path",sS({},sr(d),{className:Je("recharts-cross",c),d:tse(r,n,o,u,a,i)}))};function nse(e,r,n,a){var i=a/2;return{stroke:"none",fill:"#ccc",x:e==="horizontal"?r.x-i:n.left+.5,y:e==="horizontal"?n.top+.5:r.y-i,width:e==="horizontal"?a:n.width-1,height:e==="horizontal"?n.height-1:a}}function G3(e,r){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);r&&(a=a.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,a)}return n}function K3(e){for(var r=1;r<arguments.length;r++){var n=arguments[r]!=null?arguments[r]:{};r%2?G3(Object(n),!0).forEach(function(a){ase(e,a,n[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):G3(Object(n)).forEach(function(a){Object.defineProperty(e,a,Object.getOwnPropertyDescriptor(n,a))})}return e}function ase(e,r,n){return(r=ise(r))in e?Object.defineProperty(e,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[r]=n,e}function ise(e){var r=ose(e,"string");return typeof r=="symbol"?r:r+""}function ose(e,r){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var a=n.call(e,r);if(typeof a!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return(r==="string"?String:Number)(e)}var lse=e=>e.replace(/([A-Z])/g,r=>"-".concat(r.toLowerCase())),Nq=(e,r,n)=>e.map(a=>"".concat(lse(a)," ").concat(r,"ms ").concat(n)).join(","),use=(e,r)=>[Object.keys(e),Object.keys(r)].reduce((n,a)=>n.filter(i=>a.includes(i))),pc=(e,r)=>Object.keys(r).reduce((n,a)=>K3(K3({},n),{},{[a]:e(a,r[a])}),{});function V3(e,r){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);r&&(a=a.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,a)}return n}function Rt(e){for(var r=1;r<arguments.length;r++){var n=arguments[r]!=null?arguments[r]:{};r%2?V3(Object(n),!0).forEach(function(a){sse(e,a,n[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):V3(Object(n)).forEach(function(a){Object.defineProperty(e,a,Object.getOwnPropertyDescriptor(n,a))})}return e}function sse(e,r,n){return(r=cse(r))in e?Object.defineProperty(e,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[r]=n,e}function cse(e){var r=fse(e,"string");return typeof r=="symbol"?r:r+""}function fse(e,r){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var a=n.call(e,r);if(typeof a!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return(r==="string"?String:Number)(e)}var Zh=(e,r,n)=>e+(r-e)*n,cS=e=>{var{from:r,to:n}=e;return r!==n},Mq=(e,r,n)=>{var a=pc((i,o)=>{if(cS(o)){var[u,c]=e(o.from,o.to,o.velocity);return Rt(Rt({},o),{},{from:u,velocity:c})}return o},r);return n<1?pc((i,o)=>cS(o)&&a[i]!=null?Rt(Rt({},o),{},{velocity:Zh(o.velocity,a[i].velocity,n),from:Zh(o.from,a[i].from,n)}):o,r):Mq(e,a,n-1)};function dse(e,r,n,a,i,o){var u,c=a.reduce((g,y)=>Rt(Rt({},g),{},{[y]:{from:e[y],velocity:0,to:r[y]}}),{}),f=()=>pc((g,y)=>y.from,c),d=()=>!Object.values(c).filter(cS).length,h=null,m=g=>{u||(u=g);var y=g-u,x=y/n.dt;c=Mq(n,c,x),i(Rt(Rt(Rt({},e),r),f())),u=g,d()||(h=o.setTimeout(m))};return()=>(h=o.setTimeout(m),()=>{var g;(g=h)===null||g===void 0||g()})}function hse(e,r,n,a,i,o,u){var c=null,f=i.reduce((m,g)=>{var y=e[g],x=r[g];return y==null||x==null?m:Rt(Rt({},m),{},{[g]:[y,x]})},{}),d,h=m=>{d||(d=m);var g=(m-d)/a,y=pc((E,w)=>Zh(...w,n(g)),f);if(o(Rt(Rt(Rt({},e),r),y)),g<1)c=u.setTimeout(h);else{var x=pc((E,w)=>Zh(...w,n(1)),f);o(Rt(Rt(Rt({},e),r),x))}};return()=>(c=u.setTimeout(h),()=>{var m;(m=c)===null||m===void 0||m()})}const pse=(e,r,n,a,i,o)=>{var u=use(e,r);return n==null?()=>(i(Rt(Rt({},e),r)),()=>{}):n.isStepper===!0?dse(e,r,n,u,i,o):hse(e,r,n,a,u,i,o)};var Qh=1e-4,Pq=(e,r)=>[0,3*e,3*r-6*e,3*e-3*r+1],Rq=(e,r)=>e.map((n,a)=>n*r**a).reduce((n,a)=>n+a),Y3=(e,r)=>n=>{var a=Pq(e,r);return Rq(a,n)},mse=(e,r)=>n=>{var a=Pq(e,r),i=[...a.map((o,u)=>o*u).slice(1),0];return Rq(i,n)},vse=e=>{var r,n=e.split("(");if(n.length!==2||n[0]!=="cubic-bezier")return null;var a=(r=n[1])===null||r===void 0||(r=r.split(")")[0])===null||r===void 0?void 0:r.split(",");if(a==null||a.length!==4)return null;var i=a.map(o=>parseFloat(o));return[i[0],i[1],i[2],i[3]]},gse=function(){for(var r=arguments.length,n=new Array(r),a=0;a<r;a++)n[a]=arguments[a];if(n.length===1)switch(n[0]){case"linear":return[0,0,1,1];case"ease":return[.25,.1,.25,1];case"ease-in":return[.42,0,1,1];case"ease-out":return[.42,0,.58,1];case"ease-in-out":return[0,0,.58,1];default:{var i=vse(n[0]);if(i)return i}}return n.length===4?n:[0,0,1,1]},yse=(e,r,n,a)=>{var i=Y3(e,n),o=Y3(r,a),u=mse(e,n),c=d=>d>1?1:d<0?0:d,f=d=>{for(var h=d>1?1:d,m=h,g=0;g<8;++g){var y=i(m)-h,x=u(m);if(Math.abs(y-h)<Qh||x<Qh)return o(m);m=c(m-y/x)}return o(m)};return f.isStepper=!1,f},X3=function(){return yse(...gse(...arguments))},bse=function(){var r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},{stiff:n=100,damping:a=8,dt:i=17}=r,o=(u,c,f)=>{var d=-(u-c)*n,h=f*a,m=f+(d-h)*i/1e3,g=f*i/1e3+u;return Math.abs(g-c)<Qh&&Math.abs(m)<Qh?[c,0]:[g,m]};return o.isStepper=!0,o.dt=i,o},xse=e=>{if(typeof e=="string")switch(e){case"ease":case"ease-in-out":case"ease-out":case"ease-in":case"linear":return X3(e);case"spring":return bse();default:if(e.split("(")[0]==="cubic-bezier")return X3(e)}return typeof e=="function"?e:null};function _se(e){var r,n=()=>null,a=!1,i=null,o=u=>{if(!a){if(Array.isArray(u)){if(!u.length)return;var c=u,[f,...d]=c;if(typeof f=="number"){i=e.setTimeout(o.bind(null,d),f);return}o(f),i=e.setTimeout(o.bind(null,d));return}typeof u=="string"&&(r=u,n(r)),typeof u=="object"&&(r=u,n(r)),typeof u=="function"&&u()}};return{stop:()=>{a=!0},start:u=>{a=!1,i&&(i(),i=null),o(u)},subscribe:u=>(n=u,()=>{n=()=>null}),getTimeoutController:()=>e}}class wse{setTimeout(r){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,a=performance.now(),i=null,o=u=>{u-a>=n?r(u):typeof requestAnimationFrame=="function"&&(i=requestAnimationFrame(o))};return i=requestAnimationFrame(o),()=>{i!=null&&cancelAnimationFrame(i)}}}function Sse(){return _se(new wse)}var Ese=k.createContext(Sse);function kse(e,r){var n=k.useContext(Ese);return k.useMemo(()=>r??n(e),[e,r,n])}var jse={begin:0,duration:1e3,easing:"ease",isActive:!0,canBegin:!0,onAnimationEnd:()=>{},onAnimationStart:()=>{}},W3={t:0},A0={t:1};function VE(e){var r=gr(e,jse),{isActive:n,canBegin:a,duration:i,easing:o,begin:u,onAnimationEnd:c,onAnimationStart:f,children:d}=r,h=Oq(),m=n==="auto"?!qc.isSsr&&!h:n,g=kse(r.animationId,r.animationManager),[y,x]=k.useState(m?W3:A0),E=k.useRef(null);return k.useEffect(()=>{m||x(A0)},[m]),k.useEffect(()=>{if(!m||!a)return Fo;var w=pse(W3,A0,xse(o),i,x,g.getTimeoutController()),_=()=>{E.current=w()};return g.start([f,u,_,i,c]),()=>{g.stop(),E.current&&E.current(),c()}},[m,a,i,o,u,f,c,g]),d(y.t)}function YE(e){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"animation-",n=k.useRef(lc(r)),a=k.useRef(e);return a.current!==e&&(n.current=lc(r),a.current=e),n.current}var Ase=["radius"],Ose=["radius"],Z3,Q3,J3,e4,t4,r4,n4,a4,i4,o4;function l4(e,r){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);r&&(a=a.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,a)}return n}function u4(e){for(var r=1;r<arguments.length;r++){var n=arguments[r]!=null?arguments[r]:{};r%2?l4(Object(n),!0).forEach(function(a){Cse(e,a,n[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):l4(Object(n)).forEach(function(a){Object.defineProperty(e,a,Object.getOwnPropertyDescriptor(n,a))})}return e}function Cse(e,r,n){return(r=Tse(r))in e?Object.defineProperty(e,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[r]=n,e}function Tse(e){var r=Nse(e,"string");return typeof r=="symbol"?r:r+""}function Nse(e,r){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var a=n.call(e,r);if(typeof a!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return(r==="string"?String:Number)(e)}function Jh(){return Jh=Object.assign?Object.assign.bind():function(e){for(var r=1;r<arguments.length;r++){var n=arguments[r];for(var a in n)({}).hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e},Jh.apply(null,arguments)}function s4(e,r){if(e==null)return{};var n,a,i=Mse(e,r);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(a=0;a<o.length;a++)n=o[a],r.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function Mse(e,r){if(e==null)return{};var n={};for(var a in e)if({}.hasOwnProperty.call(e,a)){if(r.indexOf(a)!==-1)continue;n[a]=e[a]}return n}function Hn(e,r){return r||(r=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(r)}}))}var c4=(e,r,n,a,i)=>{var o=Bi(n),u=Bi(a),c=Math.min(Math.abs(o)/2,Math.abs(u)/2),f=u>=0?1:-1,d=o>=0?1:-1,h=u>=0&&o>=0||u<0&&o<0?1:0,m;if(c>0&&Array.isArray(i)){for(var g=[0,0,0,0],y=0,x=4;y<x;y++){var E,w=(E=i[y])!==null&&E!==void 0?E:0;g[y]=w>c?c:w}m=xt(Z3||(Z3=Hn(["M",",",""])),e,r+f*g[0]),g[0]>0&&(m+=xt(Q3||(Q3=Hn(["A ",",",",0,0,",",",",",""])),g[0],g[0],h,e+d*g[0],r)),m+=xt(J3||(J3=Hn(["L ",",",""])),e+n-d*g[1],r),g[1]>0&&(m+=xt(e4||(e4=Hn(["A ",",",",0,0,",`,
145
+ `,",",""])),g[1],g[1],h,e+n,r+f*g[1])),m+=xt(t4||(t4=Hn(["L ",",",""])),e+n,r+a-f*g[2]),g[2]>0&&(m+=xt(r4||(r4=Hn(["A ",",",",0,0,",`,
146
+ `,",",""])),g[2],g[2],h,e+n-d*g[2],r+a)),m+=xt(n4||(n4=Hn(["L ",",",""])),e+d*g[3],r+a),g[3]>0&&(m+=xt(a4||(a4=Hn(["A ",",",",0,0,",`,
147
+ `,",",""])),g[3],g[3],h,e,r+a-f*g[3])),m+="Z"}else if(c>0&&i===+i&&i>0){var _=Math.min(c,i);m=xt(i4||(i4=Hn(["M ",",",`
148
+ A `,",",",0,0,",",",",",`
149
+ L `,",",`
150
+ A `,",",",0,0,",",",",",`
151
+ L `,",",`
152
+ A `,",",",0,0,",",",",",`
153
+ L `,",",`
154
+ A `,",",",0,0,",",",","," Z"])),e,r+f*_,_,_,h,e+d*_,r,e+n-d*_,r,_,_,h,e+n,r+f*_,e+n,r+a-f*_,_,_,h,e+n-d*_,r+a,e+d*_,r+a,_,_,h,e,r+a-f*_)}else m=xt(o4||(o4=Hn(["M ",","," h "," v "," h "," Z"])),e,r,n,a,-n);return m},f4={x:0,y:0,width:0,height:0,radius:0,isAnimationActive:!1,isUpdateAnimationActive:!1,animationBegin:0,animationDuration:1500,animationEasing:"ease"},Dq=e=>{var r=gr(e,f4),n=k.useRef(null),[a,i]=k.useState(-1);k.useEffect(()=>{if(n.current&&n.current.getTotalLength)try{var J=n.current.getTotalLength();J&&i(J)}catch{}},[]);var{x:o,y:u,width:c,height:f,radius:d,className:h}=r,{animationEasing:m,animationDuration:g,animationBegin:y,isAnimationActive:x,isUpdateAnimationActive:E}=r,w=k.useRef(c),_=k.useRef(f),A=k.useRef(o),O=k.useRef(u),T=k.useMemo(()=>({x:o,y:u,width:c,height:f,radius:d}),[o,u,c,f,d]),C=YE(T,"rectangle-");if(o!==+o||u!==+u||c!==+c||f!==+f||c===0||f===0)return null;var N=Je("recharts-rectangle",h);if(!E){var M=sr(r),{radius:R}=M,L=s4(M,Ase);return k.createElement("path",Jh({},L,{x:Bi(o),y:Bi(u),width:Bi(c),height:Bi(f),radius:typeof d=="number"?d:void 0,className:N,d:c4(o,u,c,f,d)}))}var D=w.current,z=_.current,q=A.current,G=O.current,U="0px ".concat(a===-1?1:a,"px"),Y="".concat(a,"px ").concat(a,"px"),$=Nq(["strokeDasharray"],g,typeof m=="string"?m:f4.animationEasing);return k.createElement(VE,{animationId:C,key:C,canBegin:a>0,duration:g,easing:m,isActive:E,begin:y},J=>{var re=Or(D,c,J),oe=Or(z,f,J),fe=Or(q,o,J),F=Or(G,u,J);n.current&&(w.current=re,_.current=oe,A.current=fe,O.current=F);var Z;x?J>0?Z={transition:$,strokeDasharray:Y}:Z={strokeDasharray:U}:Z={strokeDasharray:Y};var ce=sr(r),{radius:B}=ce,H=s4(ce,Ose);return k.createElement("path",Jh({},H,{radius:typeof d=="number"?d:void 0,className:N,d:c4(fe,F,re,oe,d),ref:n,style:u4(u4({},Z),r.style)}))})};function d4(e,r){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);r&&(a=a.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,a)}return n}function h4(e){for(var r=1;r<arguments.length;r++){var n=arguments[r]!=null?arguments[r]:{};r%2?d4(Object(n),!0).forEach(function(a){Pse(e,a,n[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):d4(Object(n)).forEach(function(a){Object.defineProperty(e,a,Object.getOwnPropertyDescriptor(n,a))})}return e}function Pse(e,r,n){return(r=Rse(r))in e?Object.defineProperty(e,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[r]=n,e}function Rse(e){var r=Dse(e,"string");return typeof r=="symbol"?r:r+""}function Dse(e,r){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var a=n.call(e,r);if(typeof a!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return(r==="string"?String:Number)(e)}var ep=Math.PI/180,Lse=e=>e*180/Math.PI,Jt=(e,r,n,a)=>({x:e+Math.cos(-ep*a)*n,y:r+Math.sin(-ep*a)*n}),Ise=function(r,n){var a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{top:0,right:0,bottom:0,left:0};return Math.min(Math.abs(r-(a.left||0)-(a.right||0)),Math.abs(n-(a.top||0)-(a.bottom||0)))/2},zse=(e,r)=>{var{x:n,y:a}=e,{x:i,y:o}=r;return Math.sqrt((n-i)**2+(a-o)**2)},qse=(e,r)=>{var{x:n,y:a}=e,{cx:i,cy:o}=r,u=zse({x:n,y:a},{x:i,y:o});if(u<=0)return{radius:u,angle:0};var c=(n-i)/u,f=Math.acos(c);return a>o&&(f=2*Math.PI-f),{radius:u,angle:Lse(f),angleInRadian:f}},Bse=e=>{var{startAngle:r,endAngle:n}=e,a=Math.floor(r/360),i=Math.floor(n/360),o=Math.min(a,i);return{startAngle:r-o*360,endAngle:n-o*360}},$se=(e,r)=>{var{startAngle:n,endAngle:a}=r,i=Math.floor(n/360),o=Math.floor(a/360),u=Math.min(i,o);return e+u*360},Use=(e,r)=>{var{relativeX:n,relativeY:a}=e,{radius:i,angle:o}=qse({x:n,y:a},r),{innerRadius:u,outerRadius:c}=r;if(i<u||i>c||i===0)return null;var{startAngle:f,endAngle:d}=Bse(r),h=o,m;if(f<=d){for(;h>d;)h-=360;for(;h<f;)h+=360;m=h>=f&&h<=d}else{for(;h>f;)h-=360;for(;h<d;)h+=360;m=h>=d&&h<=f}return m?h4(h4({},r),{},{radius:i,angle:$se(h,r)}):null};function Lq(e){var{cx:r,cy:n,radius:a,startAngle:i,endAngle:o}=e,u=Jt(r,n,a,i),c=Jt(r,n,a,o);return{points:[u,c],cx:r,cy:n,radius:a,startAngle:i,endAngle:o}}var p4,m4,v4,g4,y4,b4,x4;function fS(){return fS=Object.assign?Object.assign.bind():function(e){for(var r=1;r<arguments.length;r++){var n=arguments[r];for(var a in n)({}).hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e},fS.apply(null,arguments)}function jo(e,r){return r||(r=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(r)}}))}var Fse=(e,r)=>{var n=mn(r-e),a=Math.min(Math.abs(r-e),359.999);return n*a},Bd=e=>{var{cx:r,cy:n,radius:a,angle:i,sign:o,isExternal:u,cornerRadius:c,cornerIsExternal:f}=e,d=c*(u?1:-1)+a,h=Math.asin(c/d)/ep,m=f?i:i+o*h,g=Jt(r,n,d,m),y=Jt(r,n,a,m),x=f?i-o*h:i,E=Jt(r,n,d*Math.cos(h*ep),x);return{center:g,circleTangency:y,lineTangency:E,theta:h}},Iq=e=>{var{cx:r,cy:n,innerRadius:a,outerRadius:i,startAngle:o,endAngle:u}=e,c=Fse(o,u),f=o+c,d=Jt(r,n,i,o),h=Jt(r,n,i,f),m=xt(p4||(p4=jo(["M ",",",`
155
+ A `,",",`,0,
156
+ `,",",`,
157
+ `,",",`
158
+ `])),d.x,d.y,i,i,+(Math.abs(c)>180),+(o>f),h.x,h.y);if(a>0){var g=Jt(r,n,a,o),y=Jt(r,n,a,f);m+=xt(m4||(m4=jo(["L ",",",`
159
+ A `,",",`,0,
160
+ `,",",`,
161
+ `,","," Z"])),y.x,y.y,a,a,+(Math.abs(c)>180),+(o<=f),g.x,g.y)}else m+=xt(v4||(v4=jo(["L ",","," Z"])),r,n);return m},Hse=e=>{var{cx:r,cy:n,innerRadius:a,outerRadius:i,cornerRadius:o,forceCornerRadius:u,cornerIsExternal:c,startAngle:f,endAngle:d}=e,h=mn(d-f),{circleTangency:m,lineTangency:g,theta:y}=Bd({cx:r,cy:n,radius:i,angle:f,sign:h,cornerRadius:o,cornerIsExternal:c}),{circleTangency:x,lineTangency:E,theta:w}=Bd({cx:r,cy:n,radius:i,angle:d,sign:-h,cornerRadius:o,cornerIsExternal:c}),_=c?Math.abs(f-d):Math.abs(f-d)-y-w;if(_<0)return u?xt(g4||(g4=jo(["M ",",",`
162
+ a`,",",",0,0,1,",`,0
163
+ a`,",",",0,0,1,",`,0
164
+ `])),g.x,g.y,o,o,o*2,o,o,-o*2):Iq({cx:r,cy:n,innerRadius:a,outerRadius:i,startAngle:f,endAngle:d});var A=xt(y4||(y4=jo(["M ",",",`
165
+ A`,",",",0,0,",",",",",`
166
+ A`,",",",0,",",",",",",",`
167
+ A`,",",",0,0,",",",",",`
168
+ `])),g.x,g.y,o,o,+(h<0),m.x,m.y,i,i,+(_>180),+(h<0),x.x,x.y,o,o,+(h<0),E.x,E.y);if(a>0){var{circleTangency:O,lineTangency:T,theta:C}=Bd({cx:r,cy:n,radius:a,angle:f,sign:h,isExternal:!0,cornerRadius:o,cornerIsExternal:c}),{circleTangency:N,lineTangency:M,theta:R}=Bd({cx:r,cy:n,radius:a,angle:d,sign:-h,isExternal:!0,cornerRadius:o,cornerIsExternal:c}),L=c?Math.abs(f-d):Math.abs(f-d)-C-R;if(L<0&&o===0)return"".concat(A,"L").concat(r,",").concat(n,"Z");A+=xt(b4||(b4=jo(["L",",",`
169
+ A`,",",",0,0,",",",",",`
170
+ A`,",",",0,",",",",",",",`
171
+ A`,",",",0,0,",",",",","Z"])),M.x,M.y,o,o,+(h<0),N.x,N.y,a,a,+(L>180),+(h>0),O.x,O.y,o,o,+(h<0),T.x,T.y)}else A+=xt(x4||(x4=jo(["L",",","Z"])),r,n);return A},Gse={cx:0,cy:0,innerRadius:0,outerRadius:0,startAngle:0,endAngle:0,cornerRadius:0,forceCornerRadius:!1,cornerIsExternal:!1},zq=e=>{var r=gr(e,Gse),{cx:n,cy:a,innerRadius:i,outerRadius:o,cornerRadius:u,forceCornerRadius:c,cornerIsExternal:f,startAngle:d,endAngle:h,className:m}=r;if(o<i||d===h)return null;var g=Je("recharts-sector",m),y=o-i,x=Fi(u,y,0,!0),E;return x>0&&Math.abs(d-h)<360?E=Hse({cx:n,cy:a,innerRadius:i,outerRadius:o,cornerRadius:Math.min(x,y/2),forceCornerRadius:c,cornerIsExternal:f,startAngle:d,endAngle:h}):E=Iq({cx:n,cy:a,innerRadius:i,outerRadius:o,startAngle:d,endAngle:h}),k.createElement("path",fS({},sr(r),{className:g,d:E}))};function Kse(e,r,n){if(e==="horizontal")return[{x:r.x,y:n.top},{x:r.x,y:n.top+n.height}];if(e==="vertical")return[{x:n.left,y:r.y},{x:n.left+n.width,y:r.y}];if(yz(r)){if(e==="centric"){var{cx:a,cy:i,innerRadius:o,outerRadius:u,angle:c}=r,f=Jt(a,i,o,c),d=Jt(a,i,u,c);return[{x:f.x,y:f.y},{x:d.x,y:d.y}]}return Lq(r)}}var O0={},C0={},T0={},_4;function Vse(){return _4||(_4=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const r=Cz();function n(a){return r.isSymbol(a)?NaN:Number(a)}e.toNumber=n})(T0)),T0}var w4;function Yse(){return w4||(w4=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const r=Vse();function n(a){return a?(a=r.toNumber(a),a===1/0||a===-1/0?(a<0?-1:1)*Number.MAX_VALUE:a===a?a:0):a===0?a:0}e.toFinite=n})(C0)),C0}var S4;function Xse(){return S4||(S4=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const r=Tz(),n=Yse();function a(i,o,u){u&&typeof u!="number"&&r.isIterateeCall(i,o,u)&&(o=u=void 0),i=n.toFinite(i),o===void 0?(o=i,i=0):o=n.toFinite(o),u=u===void 0?i<o?1:-1:n.toFinite(u);const c=Math.max(Math.ceil((o-i)/(u||1)),0),f=new Array(c);for(let d=0;d<c;d++)f[d]=i,i+=u;return f}e.range=a})(O0)),O0}var N0,E4;function Wse(){return E4||(E4=1,N0=Xse().range),N0}var Zse=Wse();const qq=Dn(Zse);var Vi=e=>e.chartData,Qse=ue([Vi],e=>{var r=e.chartData!=null?e.chartData.length-1:0;return{chartData:e.chartData,computedData:e.computedData,dataEndIndex:r,dataStartIndex:0}}),XE=(e,r,n,a)=>a?Qse(e):Vi(e);function ra(e){if(Array.isArray(e)&&e.length===2){var[r,n]=e;if(Re(r)&&Re(n))return!0}return!1}function k4(e,r,n){return n?e:[Math.min(e[0],r[0]),Math.max(e[1],r[1])]}function Bq(e,r){if(r&&typeof e!="function"&&Array.isArray(e)&&e.length===2){var[n,a]=e,i,o;if(Re(n))i=n;else if(typeof n=="function")return;if(Re(a))o=a;else if(typeof a=="function")return;var u=[i,o];if(ra(u))return u}}function Jse(e,r,n){if(!(!n&&r==null)){if(typeof e=="function"&&r!=null)try{var a=e(r,n);if(ra(a))return k4(a,r,n)}catch{}if(Array.isArray(e)&&e.length===2){var[i,o]=e,u,c;if(i==="auto")r!=null&&(u=Math.min(...r));else if(ke(i))u=i;else if(typeof i=="function")try{r!=null&&(u=i(r==null?void 0:r[0]))}catch{}else if(typeof i=="string"&&v3.test(i)){var f=v3.exec(i);if(f==null||f[1]==null||r==null)u=void 0;else{var d=+f[1];u=r[0]-d}}else u=r==null?void 0:r[0];if(o==="auto")r!=null&&(c=Math.max(...r));else if(ke(o))c=o;else if(typeof o=="function")try{r!=null&&(c=o(r==null?void 0:r[1]))}catch{}else if(typeof o=="string"&&g3.test(o)){var h=g3.exec(o);if(h==null||h[1]==null||r==null)c=void 0;else{var m=+h[1];c=r[1]+m}}else c=r==null?void 0:r[1];var g=[u,c];if(ra(g))return r==null?g:k4(g,r,n)}}}var cu=1e9,ece={precision:20,rounding:4,toExpNeg:-7,toExpPos:21,LN10:"2.302585092994045684017991454684364207601101488628772976033327900967572609677352480235997205089598298341967784042286"},ZE,ht=!0,yn="[DecimalError] ",No=yn+"Invalid argument: ",WE=yn+"Exponent out of range: ",fu=Math.floor,wo=Math.pow,tce=/^(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,Ur,Bt=1e7,st=7,$q=9007199254740991,tp=fu($q/st),we={};we.absoluteValue=we.abs=function(){var e=new this.constructor(this);return e.s&&(e.s=1),e};we.comparedTo=we.cmp=function(e){var r,n,a,i,o=this;if(e=new o.constructor(e),o.s!==e.s)return o.s||-e.s;if(o.e!==e.e)return o.e>e.e^o.s<0?1:-1;for(a=o.d.length,i=e.d.length,r=0,n=a<i?a:i;r<n;++r)if(o.d[r]!==e.d[r])return o.d[r]>e.d[r]^o.s<0?1:-1;return a===i?0:a>i^o.s<0?1:-1};we.decimalPlaces=we.dp=function(){var e=this,r=e.d.length-1,n=(r-e.e)*st;if(r=e.d[r],r)for(;r%10==0;r/=10)n--;return n<0?0:n};we.dividedBy=we.div=function(e){return Fa(this,new this.constructor(e))};we.dividedToIntegerBy=we.idiv=function(e){var r=this,n=r.constructor;return rt(Fa(r,new n(e),0,1),n.precision)};we.equals=we.eq=function(e){return!this.cmp(e)};we.exponent=function(){return Ct(this)};we.greaterThan=we.gt=function(e){return this.cmp(e)>0};we.greaterThanOrEqualTo=we.gte=function(e){return this.cmp(e)>=0};we.isInteger=we.isint=function(){return this.e>this.d.length-2};we.isNegative=we.isneg=function(){return this.s<0};we.isPositive=we.ispos=function(){return this.s>0};we.isZero=function(){return this.s===0};we.lessThan=we.lt=function(e){return this.cmp(e)<0};we.lessThanOrEqualTo=we.lte=function(e){return this.cmp(e)<1};we.logarithm=we.log=function(e){var r,n=this,a=n.constructor,i=a.precision,o=i+5;if(e===void 0)e=new a(10);else if(e=new a(e),e.s<1||e.eq(Ur))throw Error(yn+"NaN");if(n.s<1)throw Error(yn+(n.s?"NaN":"-Infinity"));return n.eq(Ur)?new a(0):(ht=!1,r=Fa(mc(n,o),mc(e,o),o),ht=!0,rt(r,i))};we.minus=we.sub=function(e){var r=this;return e=new r.constructor(e),r.s==e.s?Hq(r,e):Uq(r,(e.s=-e.s,e))};we.modulo=we.mod=function(e){var r,n=this,a=n.constructor,i=a.precision;if(e=new a(e),!e.s)throw Error(yn+"NaN");return n.s?(ht=!1,r=Fa(n,e,0,1).times(e),ht=!0,n.minus(r)):rt(new a(n),i)};we.naturalExponential=we.exp=function(){return Fq(this)};we.naturalLogarithm=we.ln=function(){return mc(this)};we.negated=we.neg=function(){var e=new this.constructor(this);return e.s=-e.s||0,e};we.plus=we.add=function(e){var r=this;return e=new r.constructor(e),r.s==e.s?Uq(r,e):Hq(r,(e.s=-e.s,e))};we.precision=we.sd=function(e){var r,n,a,i=this;if(e!==void 0&&e!==!!e&&e!==1&&e!==0)throw Error(No+e);if(r=Ct(i)+1,a=i.d.length-1,n=a*st+1,a=i.d[a],a){for(;a%10==0;a/=10)n--;for(a=i.d[0];a>=10;a/=10)n++}return e&&r>n?r:n};we.squareRoot=we.sqrt=function(){var e,r,n,a,i,o,u,c=this,f=c.constructor;if(c.s<1){if(!c.s)return new f(0);throw Error(yn+"NaN")}for(e=Ct(c),ht=!1,i=Math.sqrt(+c),i==0||i==1/0?(r=Jn(c.d),(r.length+e)%2==0&&(r+="0"),i=Math.sqrt(r),e=fu((e+1)/2)-(e<0||e%2),i==1/0?r="5e"+e:(r=i.toExponential(),r=r.slice(0,r.indexOf("e")+1)+e),a=new f(r)):a=new f(i.toString()),n=f.precision,i=u=n+3;;)if(o=a,a=o.plus(Fa(c,o,u+2)).times(.5),Jn(o.d).slice(0,u)===(r=Jn(a.d)).slice(0,u)){if(r=r.slice(u-3,u+1),i==u&&r=="4999"){if(rt(o,n+1,0),o.times(o).eq(c)){a=o;break}}else if(r!="9999")break;u+=4}return ht=!0,rt(a,n)};we.times=we.mul=function(e){var r,n,a,i,o,u,c,f,d,h=this,m=h.constructor,g=h.d,y=(e=new m(e)).d;if(!h.s||!e.s)return new m(0);for(e.s*=h.s,n=h.e+e.e,f=g.length,d=y.length,f<d&&(o=g,g=y,y=o,u=f,f=d,d=u),o=[],u=f+d,a=u;a--;)o.push(0);for(a=d;--a>=0;){for(r=0,i=f+a;i>a;)c=o[i]+y[a]*g[i-a-1]+r,o[i--]=c%Bt|0,r=c/Bt|0;o[i]=(o[i]+r)%Bt|0}for(;!o[--u];)o.pop();return r?++n:o.shift(),e.d=o,e.e=n,ht?rt(e,m.precision):e};we.toDecimalPlaces=we.todp=function(e,r){var n=this,a=n.constructor;return n=new a(n),e===void 0?n:(ua(e,0,cu),r===void 0?r=a.rounding:ua(r,0,8),rt(n,e+Ct(n)+1,r))};we.toExponential=function(e,r){var n,a=this,i=a.constructor;return e===void 0?n=qo(a,!0):(ua(e,0,cu),r===void 0?r=i.rounding:ua(r,0,8),a=rt(new i(a),e+1,r),n=qo(a,!0,e+1)),n};we.toFixed=function(e,r){var n,a,i=this,o=i.constructor;return e===void 0?qo(i):(ua(e,0,cu),r===void 0?r=o.rounding:ua(r,0,8),a=rt(new o(i),e+Ct(i)+1,r),n=qo(a.abs(),!1,e+Ct(a)+1),i.isneg()&&!i.isZero()?"-"+n:n)};we.toInteger=we.toint=function(){var e=this,r=e.constructor;return rt(new r(e),Ct(e)+1,r.rounding)};we.toNumber=function(){return+this};we.toPower=we.pow=function(e){var r,n,a,i,o,u,c=this,f=c.constructor,d=12,h=+(e=new f(e));if(!e.s)return new f(Ur);if(c=new f(c),!c.s){if(e.s<1)throw Error(yn+"Infinity");return c}if(c.eq(Ur))return c;if(a=f.precision,e.eq(Ur))return rt(c,a);if(r=e.e,n=e.d.length-1,u=r>=n,o=c.s,u){if((n=h<0?-h:h)<=$q){for(i=new f(Ur),r=Math.ceil(a/st+4),ht=!1;n%2&&(i=i.times(c),A4(i.d,r)),n=fu(n/2),n!==0;)c=c.times(c),A4(c.d,r);return ht=!0,e.s<0?new f(Ur).div(i):rt(i,a)}}else if(o<0)throw Error(yn+"NaN");return o=o<0&&e.d[Math.max(r,n)]&1?-1:1,c.s=1,ht=!1,i=e.times(mc(c,a+d)),ht=!0,i=Fq(i),i.s=o,i};we.toPrecision=function(e,r){var n,a,i=this,o=i.constructor;return e===void 0?(n=Ct(i),a=qo(i,n<=o.toExpNeg||n>=o.toExpPos)):(ua(e,1,cu),r===void 0?r=o.rounding:ua(r,0,8),i=rt(new o(i),e,r),n=Ct(i),a=qo(i,e<=n||n<=o.toExpNeg,e)),a};we.toSignificantDigits=we.tosd=function(e,r){var n=this,a=n.constructor;return e===void 0?(e=a.precision,r=a.rounding):(ua(e,1,cu),r===void 0?r=a.rounding:ua(r,0,8)),rt(new a(n),e,r)};we.toString=we.valueOf=we.val=we.toJSON=we[Symbol.for("nodejs.util.inspect.custom")]=function(){var e=this,r=Ct(e),n=e.constructor;return qo(e,r<=n.toExpNeg||r>=n.toExpPos)};function Uq(e,r){var n,a,i,o,u,c,f,d,h=e.constructor,m=h.precision;if(!e.s||!r.s)return r.s||(r=new h(e)),ht?rt(r,m):r;if(f=e.d,d=r.d,u=e.e,i=r.e,f=f.slice(),o=u-i,o){for(o<0?(a=f,o=-o,c=d.length):(a=d,i=u,c=f.length),u=Math.ceil(m/st),c=u>c?u+1:c+1,o>c&&(o=c,a.length=1),a.reverse();o--;)a.push(0);a.reverse()}for(c=f.length,o=d.length,c-o<0&&(o=c,a=d,d=f,f=a),n=0;o;)n=(f[--o]=f[o]+d[o]+n)/Bt|0,f[o]%=Bt;for(n&&(f.unshift(n),++i),c=f.length;f[--c]==0;)f.pop();return r.d=f,r.e=i,ht?rt(r,m):r}function ua(e,r,n){if(e!==~~e||e<r||e>n)throw Error(No+e)}function Jn(e){var r,n,a,i=e.length-1,o="",u=e[0];if(i>0){for(o+=u,r=1;r<i;r++)a=e[r]+"",n=st-a.length,n&&(o+=Ii(n)),o+=a;u=e[r],a=u+"",n=st-a.length,n&&(o+=Ii(n))}else if(u===0)return"0";for(;u%10===0;)u/=10;return o+u}var Fa=(function(){function e(a,i){var o,u=0,c=a.length;for(a=a.slice();c--;)o=a[c]*i+u,a[c]=o%Bt|0,u=o/Bt|0;return u&&a.unshift(u),a}function r(a,i,o,u){var c,f;if(o!=u)f=o>u?1:-1;else for(c=f=0;c<o;c++)if(a[c]!=i[c]){f=a[c]>i[c]?1:-1;break}return f}function n(a,i,o){for(var u=0;o--;)a[o]-=u,u=a[o]<i[o]?1:0,a[o]=u*Bt+a[o]-i[o];for(;!a[0]&&a.length>1;)a.shift()}return function(a,i,o,u){var c,f,d,h,m,g,y,x,E,w,_,A,O,T,C,N,M,R,L=a.constructor,D=a.s==i.s?1:-1,z=a.d,q=i.d;if(!a.s)return new L(a);if(!i.s)throw Error(yn+"Division by zero");for(f=a.e-i.e,M=q.length,C=z.length,y=new L(D),x=y.d=[],d=0;q[d]==(z[d]||0);)++d;if(q[d]>(z[d]||0)&&--f,o==null?A=o=L.precision:u?A=o+(Ct(a)-Ct(i))+1:A=o,A<0)return new L(0);if(A=A/st+2|0,d=0,M==1)for(h=0,q=q[0],A++;(d<C||h)&&A--;d++)O=h*Bt+(z[d]||0),x[d]=O/q|0,h=O%q|0;else{for(h=Bt/(q[0]+1)|0,h>1&&(q=e(q,h),z=e(z,h),M=q.length,C=z.length),T=M,E=z.slice(0,M),w=E.length;w<M;)E[w++]=0;R=q.slice(),R.unshift(0),N=q[0],q[1]>=Bt/2&&++N;do h=0,c=r(q,E,M,w),c<0?(_=E[0],M!=w&&(_=_*Bt+(E[1]||0)),h=_/N|0,h>1?(h>=Bt&&(h=Bt-1),m=e(q,h),g=m.length,w=E.length,c=r(m,E,g,w),c==1&&(h--,n(m,M<g?R:q,g))):(h==0&&(c=h=1),m=q.slice()),g=m.length,g<w&&m.unshift(0),n(E,m,w),c==-1&&(w=E.length,c=r(q,E,M,w),c<1&&(h++,n(E,M<w?R:q,w))),w=E.length):c===0&&(h++,E=[0]),x[d++]=h,c&&E[0]?E[w++]=z[T]||0:(E=[z[T]],w=1);while((T++<C||E[0]!==void 0)&&A--)}return x[0]||x.shift(),y.e=f,rt(y,u?o+Ct(y)+1:o)}})();function Fq(e,r){var n,a,i,o,u,c,f=0,d=0,h=e.constructor,m=h.precision;if(Ct(e)>16)throw Error(WE+Ct(e));if(!e.s)return new h(Ur);for(ht=!1,c=m,u=new h(.03125);e.abs().gte(.1);)e=e.times(u),d+=5;for(a=Math.log(wo(2,d))/Math.LN10*2+5|0,c+=a,n=i=o=new h(Ur),h.precision=c;;){if(i=rt(i.times(e),c),n=n.times(++f),u=o.plus(Fa(i,n,c)),Jn(u.d).slice(0,c)===Jn(o.d).slice(0,c)){for(;d--;)o=rt(o.times(o),c);return h.precision=m,r==null?(ht=!0,rt(o,m)):o}o=u}}function Ct(e){for(var r=e.e*st,n=e.d[0];n>=10;n/=10)r++;return r}function M0(e,r,n){if(r>e.LN10.sd())throw ht=!0,n&&(e.precision=n),Error(yn+"LN10 precision limit exceeded");return rt(new e(e.LN10),r)}function Ii(e){for(var r="";e--;)r+="0";return r}function mc(e,r){var n,a,i,o,u,c,f,d,h,m=1,g=10,y=e,x=y.d,E=y.constructor,w=E.precision;if(y.s<1)throw Error(yn+(y.s?"NaN":"-Infinity"));if(y.eq(Ur))return new E(0);if(r==null?(ht=!1,d=w):d=r,y.eq(10))return r==null&&(ht=!0),M0(E,d);if(d+=g,E.precision=d,n=Jn(x),a=n.charAt(0),o=Ct(y),Math.abs(o)<15e14){for(;a<7&&a!=1||a==1&&n.charAt(1)>3;)y=y.times(e),n=Jn(y.d),a=n.charAt(0),m++;o=Ct(y),a>1?(y=new E("0."+n),o++):y=new E(a+"."+n.slice(1))}else return f=M0(E,d+2,w).times(o+""),y=mc(new E(a+"."+n.slice(1)),d-g).plus(f),E.precision=w,r==null?(ht=!0,rt(y,w)):y;for(c=u=y=Fa(y.minus(Ur),y.plus(Ur),d),h=rt(y.times(y),d),i=3;;){if(u=rt(u.times(h),d),f=c.plus(Fa(u,new E(i),d)),Jn(f.d).slice(0,d)===Jn(c.d).slice(0,d))return c=c.times(2),o!==0&&(c=c.plus(M0(E,d+2,w).times(o+""))),c=Fa(c,new E(m),d),E.precision=w,r==null?(ht=!0,rt(c,w)):c;c=f,i+=2}}function j4(e,r){var n,a,i;for((n=r.indexOf("."))>-1&&(r=r.replace(".","")),(a=r.search(/e/i))>0?(n<0&&(n=a),n+=+r.slice(a+1),r=r.substring(0,a)):n<0&&(n=r.length),a=0;r.charCodeAt(a)===48;)++a;for(i=r.length;r.charCodeAt(i-1)===48;)--i;if(r=r.slice(a,i),r){if(i-=a,n=n-a-1,e.e=fu(n/st),e.d=[],a=(n+1)%st,n<0&&(a+=st),a<i){for(a&&e.d.push(+r.slice(0,a)),i-=st;a<i;)e.d.push(+r.slice(a,a+=st));r=r.slice(a),a=st-r.length}else a-=i;for(;a--;)r+="0";if(e.d.push(+r),ht&&(e.e>tp||e.e<-tp))throw Error(WE+n)}else e.s=0,e.e=0,e.d=[0];return e}function rt(e,r,n){var a,i,o,u,c,f,d,h,m=e.d;for(u=1,o=m[0];o>=10;o/=10)u++;if(a=r-u,a<0)a+=st,i=r,d=m[h=0];else{if(h=Math.ceil((a+1)/st),o=m.length,h>=o)return e;for(d=o=m[h],u=1;o>=10;o/=10)u++;a%=st,i=a-st+u}if(n!==void 0&&(o=wo(10,u-i-1),c=d/o%10|0,f=r<0||m[h+1]!==void 0||d%o,f=n<4?(c||f)&&(n==0||n==(e.s<0?3:2)):c>5||c==5&&(n==4||f||n==6&&(a>0?i>0?d/wo(10,u-i):0:m[h-1])%10&1||n==(e.s<0?8:7))),r<1||!m[0])return f?(o=Ct(e),m.length=1,r=r-o-1,m[0]=wo(10,(st-r%st)%st),e.e=fu(-r/st)||0):(m.length=1,m[0]=e.e=e.s=0),e;if(a==0?(m.length=h,o=1,h--):(m.length=h+1,o=wo(10,st-a),m[h]=i>0?(d/wo(10,u-i)%wo(10,i)|0)*o:0),f)for(;;)if(h==0){(m[0]+=o)==Bt&&(m[0]=1,++e.e);break}else{if(m[h]+=o,m[h]!=Bt)break;m[h--]=0,o=1}for(a=m.length;m[--a]===0;)m.pop();if(ht&&(e.e>tp||e.e<-tp))throw Error(WE+Ct(e));return e}function Hq(e,r){var n,a,i,o,u,c,f,d,h,m,g=e.constructor,y=g.precision;if(!e.s||!r.s)return r.s?r.s=-r.s:r=new g(e),ht?rt(r,y):r;if(f=e.d,m=r.d,a=r.e,d=e.e,f=f.slice(),u=d-a,u){for(h=u<0,h?(n=f,u=-u,c=m.length):(n=m,a=d,c=f.length),i=Math.max(Math.ceil(y/st),c)+2,u>i&&(u=i,n.length=1),n.reverse(),i=u;i--;)n.push(0);n.reverse()}else{for(i=f.length,c=m.length,h=i<c,h&&(c=i),i=0;i<c;i++)if(f[i]!=m[i]){h=f[i]<m[i];break}u=0}for(h&&(n=f,f=m,m=n,r.s=-r.s),c=f.length,i=m.length-c;i>0;--i)f[c++]=0;for(i=m.length;i>u;){if(f[--i]<m[i]){for(o=i;o&&f[--o]===0;)f[o]=Bt-1;--f[o],f[i]+=Bt}f[i]-=m[i]}for(;f[--c]===0;)f.pop();for(;f[0]===0;f.shift())--a;return f[0]?(r.d=f,r.e=a,ht?rt(r,y):r):new g(0)}function qo(e,r,n){var a,i=Ct(e),o=Jn(e.d),u=o.length;return r?(n&&(a=n-u)>0?o=o.charAt(0)+"."+o.slice(1)+Ii(a):u>1&&(o=o.charAt(0)+"."+o.slice(1)),o=o+(i<0?"e":"e+")+i):i<0?(o="0."+Ii(-i-1)+o,n&&(a=n-u)>0&&(o+=Ii(a))):i>=u?(o+=Ii(i+1-u),n&&(a=n-i-1)>0&&(o=o+"."+Ii(a))):((a=i+1)<u&&(o=o.slice(0,a)+"."+o.slice(a)),n&&(a=n-u)>0&&(i+1===u&&(o+="."),o+=Ii(a))),e.s<0?"-"+o:o}function A4(e,r){if(e.length>r)return e.length=r,!0}function Gq(e){var r,n,a;function i(o){var u=this;if(!(u instanceof i))return new i(o);if(u.constructor=i,o instanceof i){u.s=o.s,u.e=o.e,u.d=(o=o.d)?o.slice():o;return}if(typeof o=="number"){if(o*0!==0)throw Error(No+o);if(o>0)u.s=1;else if(o<0)o=-o,u.s=-1;else{u.s=0,u.e=0,u.d=[0];return}if(o===~~o&&o<1e7){u.e=0,u.d=[o];return}return j4(u,o.toString())}else if(typeof o!="string")throw Error(No+o);if(o.charCodeAt(0)===45?(o=o.slice(1),u.s=-1):u.s=1,tce.test(o))j4(u,o);else throw Error(No+o)}if(i.prototype=we,i.ROUND_UP=0,i.ROUND_DOWN=1,i.ROUND_CEIL=2,i.ROUND_FLOOR=3,i.ROUND_HALF_UP=4,i.ROUND_HALF_DOWN=5,i.ROUND_HALF_EVEN=6,i.ROUND_HALF_CEIL=7,i.ROUND_HALF_FLOOR=8,i.clone=Gq,i.config=i.set=rce,e===void 0&&(e={}),e)for(a=["precision","rounding","toExpNeg","toExpPos","LN10"],r=0;r<a.length;)e.hasOwnProperty(n=a[r++])||(e[n]=this[n]);return i.config(e),i}function rce(e){if(!e||typeof e!="object")throw Error(yn+"Object expected");var r,n,a,i=["precision",1,cu,"rounding",0,8,"toExpNeg",-1/0,0,"toExpPos",0,1/0];for(r=0;r<i.length;r+=3)if((a=e[n=i[r]])!==void 0)if(fu(a)===a&&a>=i[r+1]&&a<=i[r+2])this[n]=a;else throw Error(No+n+": "+a);if((a=e[n="LN10"])!==void 0)if(a==Math.LN10)this[n]=new this(a);else throw Error(No+n+": "+a);return this}var ZE=Gq(ece);Ur=new ZE(1);const Be=ZE;function Kq(e){var r;return e===0?r=1:r=Math.floor(new Be(e).abs().log(10).toNumber())+1,r}function Vq(e,r,n){for(var a=new Be(e),i=0,o=[];a.lt(r)&&i<1e5;)o.push(a.toNumber()),a=a.add(n),i++;return o}var Yq=e=>{var[r,n]=e,[a,i]=[r,n];return r>n&&([a,i]=[n,r]),[a,i]},QE=(e,r,n)=>{if(e.lte(0))return new Be(0);var a=Kq(e.toNumber()),i=new Be(10).pow(a),o=e.div(i),u=a!==1?.05:.1,c=new Be(Math.ceil(o.div(u).toNumber())).add(n).mul(u),f=c.mul(i);return r?new Be(f.toNumber()):new Be(Math.ceil(f.toNumber()))},Xq=(e,r,n)=>{var a;if(e.lte(0))return new Be(0);var i=[1,2,2.5,5],o=e.toNumber(),u=Math.floor(new Be(o).abs().log(10).toNumber()),c=new Be(10).pow(u),f=e.div(c).toNumber(),d=i.findIndex(y=>y>=f-1e-10);if(d===-1&&(c=c.mul(10),d=0),d+=n,d>=i.length){var h=Math.floor(d/i.length);d%=i.length,c=c.mul(new Be(10).pow(h))}var m=(a=i[d])!==null&&a!==void 0?a:1,g=new Be(m).mul(c);return r?g:new Be(Math.ceil(g.toNumber()))},nce=(e,r,n)=>{var a=new Be(1),i=new Be(e);if(!i.isint()&&n){var o=Math.abs(e);o<1?(a=new Be(10).pow(Kq(e)-1),i=new Be(Math.floor(i.div(a).toNumber())).mul(a)):o>1&&(i=new Be(Math.floor(e)))}else e===0?i=new Be(Math.floor((r-1)/2)):n||(i=new Be(Math.floor(e)));for(var u=Math.floor((r-1)/2),c=[],f=0;f<r;f++)c.push(i.add(new Be(f-u).mul(a)).toNumber());return c},Wq=function(r,n,a,i){var o=arguments.length>4&&arguments[4]!==void 0?arguments[4]:0,u=arguments.length>5&&arguments[5]!==void 0?arguments[5]:QE;if(!Number.isFinite((n-r)/(a-1)))return{step:new Be(0),tickMin:new Be(0),tickMax:new Be(0)};var c=u(new Be(n).sub(r).div(a-1),i,o),f;r<=0&&n>=0?f=new Be(0):(f=new Be(r).add(n).div(2),f=f.sub(new Be(f).mod(c)));var d=Math.ceil(f.sub(r).div(c).toNumber()),h=Math.ceil(new Be(n).sub(f).div(c).toNumber()),m=d+h+1;return m>a?Wq(r,n,a,i,o+1,u):(m<a&&(h=n>0?h+(a-m):h,d=n>0?d:d+(a-m)),{step:c,tickMin:f.sub(new Be(d).mul(c)),tickMax:f.add(new Be(h).mul(c))})},O4=function(r){var[n,a]=r,i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:6,o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,u=arguments.length>3&&arguments[3]!==void 0?arguments[3]:"auto",c=Math.max(i,2),[f,d]=Yq([n,a]);if(f===-1/0||d===1/0){var h=d===1/0?[f,...Array(i-1).fill(1/0)]:[...Array(i-1).fill(-1/0),d];return n>a?h.reverse():h}if(f===d)return nce(f,i,o);var m=u==="snap125"?Xq:QE,{step:g,tickMin:y,tickMax:x}=Wq(f,d,c,o,0,m),E=Vq(y,x.add(new Be(.1).mul(g)),g);return n>a?E.reverse():E},C4=function(r,n){var[a,i]=r,o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,u=arguments.length>3&&arguments[3]!==void 0?arguments[3]:"auto",[c,f]=Yq([a,i]);if(c===-1/0||f===1/0)return[a,i];if(c===f)return[c];var d=u==="snap125"?Xq:QE,h=Math.max(n,2),m=d(new Be(f).sub(c).div(h-1),o,0),g=[...Vq(new Be(c),new Be(f),m),f];return o===!1&&(g=g.map(y=>Math.round(y))),a>i?g.reverse():g},ace=e=>e.rootProps.barCategoryGap,rm=e=>e.rootProps.stackOffset,Zq=e=>e.rootProps.reverseStackOrder,JE=e=>e.options.chartName,ek=e=>e.rootProps.syncId,Qq=e=>e.rootProps.syncMethod,tk=e=>e.options.eventEmitter,ur={grid:-100,barBackground:-50,area:100,cursorRectangle:200,bar:300,line:400,axis:500,scatter:600,activeBar:1e3,cursorLine:1100,activeDot:1200,label:2e3},mo={allowDecimals:!1,allowDataOverflow:!1,angleAxisId:0,reversed:!1,scale:"auto",tick:!0,type:"auto"},Gn={allowDataOverflow:!1,allowDecimals:!1,allowDuplicatedCategory:!0,includeHidden:!1,radiusAxisId:0,reversed:!1,scale:"auto",tick:!0,tickCount:5,type:"auto"},nm=(e,r)=>{if(!(!e||!r))return e!=null&&e.reversed?[r[1],r[0]]:r};function am(e,r,n){if(n!=="auto")return n;if(e!=null)return ti(e,r)?"category":"number"}function T4(e,r){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);r&&(a=a.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,a)}return n}function rp(e){for(var r=1;r<arguments.length;r++){var n=arguments[r]!=null?arguments[r]:{};r%2?T4(Object(n),!0).forEach(function(a){ice(e,a,n[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):T4(Object(n)).forEach(function(a){Object.defineProperty(e,a,Object.getOwnPropertyDescriptor(n,a))})}return e}function ice(e,r,n){return(r=oce(r))in e?Object.defineProperty(e,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[r]=n,e}function oce(e){var r=lce(e,"string");return typeof r=="symbol"?r:r+""}function lce(e,r){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var a=n.call(e,r);if(typeof a!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return(r==="string"?String:Number)(e)}var N4={allowDataOverflow:mo.allowDataOverflow,allowDecimals:mo.allowDecimals,allowDuplicatedCategory:!1,dataKey:void 0,domain:void 0,id:mo.angleAxisId,includeHidden:!1,name:void 0,reversed:mo.reversed,scale:mo.scale,tick:mo.tick,tickCount:void 0,ticks:void 0,type:mo.type,unit:void 0,niceTicks:"auto"},M4={allowDataOverflow:Gn.allowDataOverflow,allowDecimals:Gn.allowDecimals,allowDuplicatedCategory:Gn.allowDuplicatedCategory,dataKey:void 0,domain:void 0,id:Gn.radiusAxisId,includeHidden:Gn.includeHidden,name:void 0,reversed:Gn.reversed,scale:Gn.scale,tick:Gn.tick,tickCount:Gn.tickCount,ticks:void 0,type:Gn.type,unit:void 0,niceTicks:"auto"},uce=(e,r)=>{if(r!=null)return e.polarAxis.angleAxis[r]},rk=ue([uce,xq],(e,r)=>{var n;if(e!=null)return e;var a=(n=am(r,"angleAxis",N4.type))!==null&&n!==void 0?n:"category";return rp(rp({},N4),{},{type:a})}),sce=(e,r)=>e.polarAxis.radiusAxis[r],nk=ue([sce,xq],(e,r)=>{var n;if(e!=null)return e;var a=(n=am(r,"radiusAxis",M4.type))!==null&&n!==void 0?n:"category";return rp(rp({},M4),{},{type:a})}),im=e=>e.polarOptions,ak=ue([ri,ni,rr],Ise),Jq=ue([im,ak],(e,r)=>{if(e!=null)return Fi(e.innerRadius,r,0)}),e7=ue([im,ak],(e,r)=>{if(e!=null)return Fi(e.outerRadius,r,r*.8)}),cce=e=>{if(e==null)return[0,0];var{startAngle:r,endAngle:n}=e;return[r,n]},t7=ue([im],cce);ue([rk,t7],nm);var r7=ue([ak,Jq,e7],(e,r,n)=>{if(!(e==null||r==null||n==null))return[r,n]});ue([nk,r7],nm);var n7=ue([vt,im,Jq,e7,ri,ni],(e,r,n,a,i,o)=>{if(!(e!=="centric"&&e!=="radial"||r==null||n==null||a==null)){var{cx:u,cy:c,startAngle:f,endAngle:d}=r;return{cx:Fi(u,i,i/2),cy:Fi(c,o,o/2),innerRadius:n,outerRadius:a,startAngle:f,endAngle:d,clockWise:!1}}}),Ht=(e,r)=>r,om=(e,r,n)=>n;function a7(e){return e==null?void 0:e.id}function i7(e,r,n){var{chartData:a=[]}=r,{allowDuplicatedCategory:i,dataKey:o}=n,u=new Map;return e.forEach(c=>{var f,d=(f=c.data)!==null&&f!==void 0?f:a;if(!(d==null||d.length===0)){var h=a7(c);d.forEach((m,g)=>{var y=o==null||i?g:String(er(m,o,null)),x=er(m,c.dataKey,0),E;u.has(y)?E=u.get(y):E={},Object.assign(E,{[h]:x}),u.set(y,E)})}}),Array.from(u.values())}function ik(e){return"stackId"in e&&e.stackId!=null&&e.dataKey!=null}var lm=(e,r)=>e===r?!0:e==null||r==null?!1:e[0]===r[0]&&e[1]===r[1];function um(e,r){return Array.isArray(e)&&Array.isArray(r)&&e.length===0&&r.length===0?!0:e===r}function fce(e,r){if(e.length===r.length){for(var n=0;n<e.length;n++)if(e[n]!==r[n])return!1;return!0}return!1}var Gt=e=>{var r=vt(e);return r==="horizontal"?"xAxis":r==="vertical"?"yAxis":r==="centric"?"angleAxis":"radiusAxis"},du=e=>e.tooltip.settings.axisId;function ok(e){if(e!=null){var r=e.ticks,n=e.bandwidth,a=e.range(),i=[Math.min(...a),Math.max(...a)];return{domain:()=>e.domain(),range:(function(o){function u(){return o.apply(this,arguments)}return u.toString=function(){return o.toString()},u})(()=>i),rangeMin:()=>i[0],rangeMax:()=>i[1],isInRange(o){var u=i[0],c=i[1];return u<=c?o>=u&&o<=c:o>=c&&o<=u},bandwidth:n?()=>n.call(e):void 0,ticks:r?o=>r.call(e,o):void 0,map:(o,u)=>{var c=e(o);if(c!=null){if(e.bandwidth&&u!==null&&u!==void 0&&u.position){var f=e.bandwidth();switch(u.position){case"middle":c+=f/2;break;case"end":c+=f;break}}return c}}}}}var dce=(e,r)=>{if(r!=null)switch(e){case"linear":{if(!ra(r)){for(var n,a,i=0;i<r.length;i++){var o=r[i];Re(o)&&((n===void 0||o<n)&&(n=o),(a===void 0||o>a)&&(a=o))}return n!==void 0&&a!==void 0?[n,a]:void 0}return r}default:return r}};const Gs=Object.freeze(Object.defineProperty({__proto__:null,scaleBand:oE,scaleDiverging:OI,scaleDivergingLog:CI,scaleDivergingPow:SE,scaleDivergingSqrt:Bre,scaleDivergingSymlog:TI,scaleIdentity:uI,scaleImplicit:N2,scaleLinear:lI,scaleLog:cI,scaleOrdinal:kp,scalePoint:Zee,scalePow:hE,scaleQuantile:hI,scaleQuantize:pI,scaleRadial:dI,scaleSequential:EI,scaleSequentialLog:kI,scaleSequentialPow:wE,scaleSequentialQuantile:AI,scaleSequentialSqrt:qre,scaleSequentialSymlog:jI,scaleSqrt:xte,scaleSymlog:fI,scaleThreshold:mI,scaleTime:Ire,scaleUtc:zre,tickFormat:oI},Symbol.toStringTag,{value:"Module"}));function hce(e){if(e in Gs)return Gs[e]();var r="scale".concat(Mc(e));if(r in Gs)return Gs[r]()}function P4(e,r,n){if(typeof e=="function")return e.copy().domain(r).range(n);if(e!=null){var a=hce(e);if(a!=null)return a.domain(r).range(n),a}}function lk(e,r,n,a){if(!(n==null||a==null))return typeof e.scale=="function"?P4(e.scale,n,a):P4(r,n,a)}function pce(e){return"scale".concat(Mc(e))}function mce(e){return pce(e)in Gs}var o7=(e,r,n)=>{if(e!=null){var{scale:a,type:i}=e;if(a==="auto")return i==="category"&&n&&(n.indexOf("LineChart")>=0||n.indexOf("AreaChart")>=0||n.indexOf("ComposedChart")>=0&&!r)?"point":i==="category"?"band":"linear";if(typeof a=="string")return mce(a)?a:"point"}};function vce(e,r){for(var n=0,a=e.length,i=e[0]<e[e.length-1];n<a;){var o=Math.floor((n+a)/2);(i?e[o]<r:e[o]>r)?n=o+1:a=o}return n}function l7(e,r){if(e){var n=r??e.domain(),a=n.map(o=>{var u;return(u=e(o))!==null&&u!==void 0?u:0}),i=e.range();if(!(n.length===0||i.length<2))return o=>{var u,c,f=vce(a,o);if(f<=0)return n[0];if(f>=n.length)return n[n.length-1];var d=(u=a[f-1])!==null&&u!==void 0?u:0,h=(c=a[f])!==null&&c!==void 0?c:0;return Math.abs(o-d)<=Math.abs(o-h)?n[f-1]:n[f]}}}function gce(e){if(e!=null)return"invert"in e&&typeof e.invert=="function"?e.invert.bind(e):l7(e,void 0)}function R4(e,r){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);r&&(a=a.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,a)}return n}function np(e){for(var r=1;r<arguments.length;r++){var n=arguments[r]!=null?arguments[r]:{};r%2?R4(Object(n),!0).forEach(function(a){yce(e,a,n[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):R4(Object(n)).forEach(function(a){Object.defineProperty(e,a,Object.getOwnPropertyDescriptor(n,a))})}return e}function yce(e,r,n){return(r=bce(r))in e?Object.defineProperty(e,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[r]=n,e}function bce(e){var r=xce(e,"string");return typeof r=="symbol"?r:r+""}function xce(e,r){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var a=n.call(e,r);if(typeof a!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return(r==="string"?String:Number)(e)}var dS=[0,"auto"],Mt={allowDataOverflow:!1,allowDecimals:!0,allowDuplicatedCategory:!0,angle:0,dataKey:void 0,domain:void 0,height:30,hide:!0,id:0,includeHidden:!1,interval:"preserveEnd",minTickGap:5,mirror:!1,name:void 0,orientation:"bottom",padding:{left:0,right:0},reversed:!1,scale:"auto",tick:!0,tickCount:5,tickFormatter:void 0,ticks:void 0,type:"category",unit:void 0,niceTicks:"auto"},u7=(e,r)=>e.cartesianAxis.xAxis[r],ca=(e,r)=>{var n=u7(e,r);return n??Mt},Pt={allowDataOverflow:!1,allowDecimals:!0,allowDuplicatedCategory:!0,angle:0,dataKey:void 0,domain:dS,hide:!0,id:0,includeHidden:!1,interval:"preserveEnd",minTickGap:5,mirror:!1,name:void 0,orientation:"left",padding:{top:0,bottom:0},reversed:!1,scale:"auto",tick:!0,tickCount:5,tickFormatter:void 0,ticks:void 0,type:"number",unit:void 0,niceTicks:"auto",width:Dc},s7=(e,r)=>e.cartesianAxis.yAxis[r],fa=(e,r)=>{var n=s7(e,r);return n??Pt},_ce={domain:[0,"auto"],includeHidden:!1,reversed:!1,allowDataOverflow:!1,allowDuplicatedCategory:!1,dataKey:void 0,id:0,name:"",range:[64,64],scale:"auto",type:"number",unit:""},uk=(e,r)=>{var n=e.cartesianAxis.zAxis[r];return n??_ce},br=(e,r,n)=>{switch(r){case"xAxis":return ca(e,n);case"yAxis":return fa(e,n);case"zAxis":return uk(e,n);case"angleAxis":return rk(e,n);case"radiusAxis":return nk(e,n);default:throw new Error("Unexpected axis type: ".concat(r))}},wce=(e,r,n)=>{switch(r){case"xAxis":return ca(e,n);case"yAxis":return fa(e,n);default:throw new Error("Unexpected axis type: ".concat(r))}},Bc=(e,r,n)=>{switch(r){case"xAxis":return ca(e,n);case"yAxis":return fa(e,n);case"angleAxis":return rk(e,n);case"radiusAxis":return nk(e,n);default:throw new Error("Unexpected axis type: ".concat(r))}},c7=e=>e.graphicalItems.cartesianItems.some(r=>r.type==="bar")||e.graphicalItems.polarItems.some(r=>r.type==="radialBar");function f7(e,r){return n=>{switch(e){case"xAxis":return"xAxisId"in n&&n.xAxisId===r;case"yAxis":return"yAxisId"in n&&n.yAxisId===r;case"zAxis":return"zAxisId"in n&&n.zAxisId===r;case"angleAxis":return"angleAxisId"in n&&n.angleAxisId===r;case"radiusAxis":return"radiusAxisId"in n&&n.radiusAxisId===r;default:return!1}}}var d7=e=>e.graphicalItems.cartesianItems,Sce=ue([Ht,om],f7),h7=(e,r,n)=>e.filter(n).filter(a=>(r==null?void 0:r.includeHidden)===!0?!0:!a.hide),$c=ue([d7,br,Sce],h7,{memoizeOptions:{resultEqualityCheck:um}}),p7=ue([$c],e=>e.filter(r=>r.type==="area"||r.type==="bar").filter(ik)),m7=e=>e.filter(r=>!("stackId"in r)||r.stackId===void 0),Ece=ue([$c],m7),v7=e=>e.map(r=>r.data).filter(Boolean).flat(1),kce=ue([$c],v7,{memoizeOptions:{resultEqualityCheck:um}}),g7=(e,r)=>{var{chartData:n=[],dataStartIndex:a,dataEndIndex:i}=r;return e.length>0?e:n.slice(a,i+1)},sk=ue([kce,XE],g7),y7=(e,r,n)=>(r==null?void 0:r.dataKey)!=null?e.map(a=>({value:er(a,r.dataKey)})):n.length>0?n.map(a=>a.dataKey).flatMap(a=>e.map(i=>({value:er(i,a)}))):e.map(a=>({value:a})),Uc=ue([sk,br,$c],y7);function Xl(e){if(gn(e)||e instanceof Date){var r=Number(e);if(Re(r))return r}}function D4(e){if(Array.isArray(e)){var r=[Xl(e[0]),Xl(e[1])];return ra(r)?r:void 0}var n=Xl(e);if(n!=null)return[n,n]}function Qa(e){return e.map(Xl).filter(Tr)}function jce(e,r){var n=Xl(e),a=Xl(r);return n==null&&a==null?0:n==null?-1:a==null?1:n-a}var Ace=ue([Uc],e=>e==null?void 0:e.map(r=>r.value).sort(jce));function b7(e,r){switch(e){case"xAxis":return r.direction==="x";case"yAxis":return r.direction==="y";default:return!1}}function Oce(e,r,n){return!n||typeof r!="number"||Wa(r)?[]:n.length?Qa(n.flatMap(a=>{var i=er(e,a.dataKey),o,u;if(Array.isArray(i)?[o,u]=i:o=u=i,!(!Re(o)||!Re(u)))return[r-o,r+u]})):[]}var Lt=e=>{var r=Gt(e),n=du(e);return Bc(e,r,n)},Fc=ue([Lt],e=>e==null?void 0:e.dataKey),Cce=ue([p7,XE,Lt],i7),x7=(e,r,n,a)=>{var i={},o=r.reduce((u,c)=>{if(c.stackId==null)return u;var f=u[c.stackId];return f==null&&(f=[]),f.push(c),u[c.stackId]=f,u},i);return Object.fromEntries(Object.entries(o).map(u=>{var[c,f]=u,d=a?[...f].reverse():f,h=d.map(a7);return[c,{stackedData:lle(e,h,n),graphicalItems:d}]}))},Tce=ue([Cce,p7,rm,Zq],x7),_7=(e,r,n,a)=>{var{dataStartIndex:i,dataEndIndex:o}=r;if(a==null&&n!=="zAxis"){var u=cle(e,i,o);if(!(u!=null&&u[0]===0&&u[1]===0))return u}},Nce=ue([br],e=>e.allowDataOverflow),ck=e=>{var r;if(e==null||!("domain"in e))return dS;if(e.domain!=null)return e.domain;if("ticks"in e&&e.ticks!=null){if(e.type==="number"){var n=Qa(e.ticks);return[Math.min(...n),Math.max(...n)]}if(e.type==="category")return e.ticks.map(String)}return(r=e==null?void 0:e.domain)!==null&&r!==void 0?r:dS},w7=ue([br],ck),S7=ue([w7,Nce],Bq),Mce=ue([Tce,Vi,Ht,S7],_7,{memoizeOptions:{resultEqualityCheck:lm}}),fk=e=>e.errorBars,Pce=(e,r,n)=>e.flatMap(a=>r[a.id]).filter(Boolean).filter(a=>b7(n,a)),ap=function(){for(var r=arguments.length,n=new Array(r),a=0;a<r;a++)n[a]=arguments[a];var i=n.filter(Boolean);if(i.length!==0){var o=i.flat(),u=Math.min(...o),c=Math.max(...o);return[u,c]}},E7=(e,r,n,a,i)=>{var o,u;if(n.length>0&&e.forEach(c=>{n.forEach(f=>{var d,h,m=(d=a[f.id])===null||d===void 0?void 0:d.filter(_=>b7(i,_)),g=er(c,(h=r.dataKey)!==null&&h!==void 0?h:f.dataKey),y=Oce(c,g,m);if(y.length>=2){var x=Math.min(...y),E=Math.max(...y);(o==null||x<o)&&(o=x),(u==null||E>u)&&(u=E)}var w=D4(g);w!=null&&(o=o==null?w[0]:Math.min(o,w[0]),u=u==null?w[1]:Math.max(u,w[1]))})}),(r==null?void 0:r.dataKey)!=null&&e.forEach(c=>{var f=D4(er(c,r.dataKey));f!=null&&(o=o==null?f[0]:Math.min(o,f[0]),u=u==null?f[1]:Math.max(u,f[1]))}),Re(o)&&Re(u))return[o,u]},Rce=ue([sk,br,Ece,fk,Ht],E7,{memoizeOptions:{resultEqualityCheck:lm}});function Dce(e){var{value:r}=e;if(gn(r)||r instanceof Date)return r}var Lce=(e,r,n)=>{var a=e.map(Dce).filter(i=>i!=null);return n&&(r.dataKey==null||r.allowDuplicatedCategory&&pz(a))?qq(0,e.length):r.allowDuplicatedCategory?a:Array.from(new Set(a))},k7=e=>e.referenceElements.dots,hu=(e,r,n)=>e.filter(a=>a.ifOverflow==="extendDomain").filter(a=>r==="xAxis"?a.xAxisId===n:a.yAxisId===n),Ice=ue([k7,Ht,om],hu),j7=e=>e.referenceElements.areas,zce=ue([j7,Ht,om],hu),A7=e=>e.referenceElements.lines,qce=ue([A7,Ht,om],hu),O7=(e,r)=>{if(e!=null){var n=Qa(e.map(a=>r==="xAxis"?a.x:a.y));if(n.length!==0)return[Math.min(...n),Math.max(...n)]}},Bce=ue(Ice,Ht,O7),C7=(e,r)=>{if(e!=null){var n=Qa(e.flatMap(a=>[r==="xAxis"?a.x1:a.y1,r==="xAxis"?a.x2:a.y2]));if(n.length!==0)return[Math.min(...n),Math.max(...n)]}},$ce=ue([zce,Ht],C7);function Uce(e){var r;if(e.x!=null)return Qa([e.x]);var n=(r=e.segment)===null||r===void 0?void 0:r.map(a=>a.x);return n==null||n.length===0?[]:Qa(n)}function Fce(e){var r;if(e.y!=null)return Qa([e.y]);var n=(r=e.segment)===null||r===void 0?void 0:r.map(a=>a.y);return n==null||n.length===0?[]:Qa(n)}var T7=(e,r)=>{if(e!=null){var n=e.flatMap(a=>r==="xAxis"?Uce(a):Fce(a));if(n.length!==0)return[Math.min(...n),Math.max(...n)]}},Hce=ue([qce,Ht],T7),Gce=ue(Bce,Hce,$ce,(e,r,n)=>ap(e,n,r)),N7=(e,r,n,a,i,o,u,c)=>{if(n!=null)return n;var f=u==="vertical"&&c==="xAxis"||u==="horizontal"&&c==="yAxis",d=f?ap(a,o,i):ap(o,i);return Jse(r,d,e.allowDataOverflow)},Kce=ue([br,w7,S7,Mce,Rce,Gce,vt,Ht],N7,{memoizeOptions:{resultEqualityCheck:lm}}),Vce=[0,1],M7=(e,r,n,a,i,o,u)=>{if(!((e==null||n==null||n.length===0)&&u===void 0)){var{dataKey:c,type:f}=e,d=ti(r,o);if(d&&c==null){var h;return qq(0,(h=n==null?void 0:n.length)!==null&&h!==void 0?h:0)}return f==="category"?Lce(a,e,d):i==="expand"?Vce:u}},dk=ue([br,vt,sk,Uc,rm,Ht,Kce],M7),pu=ue([br,c7,JE],o7),P7=(e,r,n)=>{var{niceTicks:a}=r;if(a!=="none"){var i=ck(r),o=Array.isArray(i)&&(i[0]==="auto"||i[1]==="auto");if((a==="snap125"||a==="adaptive")&&r!=null&&r.tickCount&&ra(e)){if(o)return O4(e,r.tickCount,r.allowDecimals,a);if(r.type==="number")return C4(e,r.tickCount,r.allowDecimals,a)}if(a==="auto"&&n==="linear"&&r!=null&&r.tickCount){if(o&&ra(e))return O4(e,r.tickCount,r.allowDecimals,"adaptive");if(r.type==="number"&&ra(e))return C4(e,r.tickCount,r.allowDecimals,"adaptive")}}},hk=ue([dk,Bc,pu],P7),R7=(e,r,n,a)=>{if(a!=="angleAxis"&&(e==null?void 0:e.type)==="number"&&ra(r)&&Array.isArray(n)&&n.length>0){var i,o,u=r[0],c=(i=n[0])!==null&&i!==void 0?i:0,f=r[1],d=(o=n[n.length-1])!==null&&o!==void 0?o:0;return[Math.min(u,c),Math.max(f,d)]}return r},Yce=ue([br,dk,hk,Ht],R7),Xce=ue(Uc,br,(e,r)=>{if(!(!r||r.type!=="number")){var n=1/0,a=Array.from(Qa(e.map(m=>m.value))).sort((m,g)=>m-g),i=a[0],o=a[a.length-1];if(i==null||o==null)return 1/0;var u=o-i;if(u===0)return 1/0;for(var c=0;c<a.length-1;c++){var f=a[c],d=a[c+1];if(!(f==null||d==null)){var h=d-f;n=Math.min(n,h)}}return n/u}}),D7=ue(Xce,vt,ace,rr,(e,r,n,a,i)=>i,(e,r,n,a,i)=>{if(!Re(e))return 0;var o=r==="vertical"?a.height:a.width;if(i==="gap")return e*o/2;if(i==="no-gap"){var u=Fi(n,e*o),c=e*o/2;return c-u-(c-u)/o*u}return 0}),Wce=(e,r,n)=>{var a=ca(e,r);return a==null||typeof a.padding!="string"?0:D7(e,"xAxis",r,n,a.padding)},Zce=(e,r,n)=>{var a=fa(e,r);return a==null||typeof a.padding!="string"?0:D7(e,"yAxis",r,n,a.padding)},Qce=ue(ca,Wce,(e,r)=>{var n,a;if(e==null)return{left:0,right:0};var{padding:i}=e;return typeof i=="string"?{left:r,right:r}:{left:((n=i.left)!==null&&n!==void 0?n:0)+r,right:((a=i.right)!==null&&a!==void 0?a:0)+r}}),Jce=ue(fa,Zce,(e,r)=>{var n,a;if(e==null)return{top:0,bottom:0};var{padding:i}=e;return typeof i=="string"?{top:r,bottom:r}:{top:((n=i.top)!==null&&n!==void 0?n:0)+r,bottom:((a=i.bottom)!==null&&a!==void 0?a:0)+r}}),efe=ue([rr,Qce,Zp,Wp,(e,r,n)=>n],(e,r,n,a,i)=>{var{padding:o}=a;return i?[o.left,n.width-o.right]:[e.left+r.left,e.left+e.width-r.right]}),tfe=ue([rr,vt,Jce,Zp,Wp,(e,r,n)=>n],(e,r,n,a,i,o)=>{var{padding:u}=i;return o?[a.height-u.bottom,u.top]:r==="horizontal"?[e.top+e.height-n.bottom,e.top+n.top]:[e.top+n.top,e.top+e.height-n.bottom]}),Hc=(e,r,n,a)=>{var i;switch(r){case"xAxis":return efe(e,n,a);case"yAxis":return tfe(e,n,a);case"zAxis":return(i=uk(e,n))===null||i===void 0?void 0:i.range;case"angleAxis":return t7(e);case"radiusAxis":return r7(e,n);default:return}},L7=ue([br,Hc],nm),rfe=ue([pu,Yce],dce),pk=ue([br,pu,rfe,L7],lk),I7=(e,r,n,a)=>{if(!(n==null||n.dataKey==null)){var{type:i,scale:o}=n,u=ti(e,a);if(u&&(i==="number"||o!=="auto"))return r.map(c=>c.value)}},mk=ue([vt,Uc,Bc,Ht],I7),au=ue([pk],ok);ue([pk],gce);ue([pk,Ace],l7);ue([$c,fk,Ht],Pce);function z7(e,r){return e.id<r.id?-1:e.id>r.id?1:0}var sm=(e,r)=>r,cm=(e,r,n)=>n,nfe=ue(Yp,sm,cm,(e,r,n)=>e.filter(a=>a.orientation===r).filter(a=>a.mirror===n).sort(z7)),afe=ue(Xp,sm,cm,(e,r,n)=>e.filter(a=>a.orientation===r).filter(a=>a.mirror===n).sort(z7)),q7=(e,r)=>({width:e.width,height:r.height}),ife=(e,r)=>{var n=typeof r.width=="number"?r.width:Dc;return{width:n,height:e.height}},ofe=ue(rr,ca,q7),lfe=(e,r,n)=>{switch(r){case"top":return e.top;case"bottom":return n-e.bottom;default:return 0}},ufe=(e,r,n)=>{switch(r){case"left":return e.left;case"right":return n-e.right;default:return 0}},sfe=ue(ni,rr,nfe,sm,cm,(e,r,n,a,i)=>{var o={},u;return n.forEach(c=>{var f=q7(r,c);u==null&&(u=lfe(r,a,e));var d=a==="top"&&!i||a==="bottom"&&i;o[c.id]=u-Number(d)*f.height,u+=(d?-1:1)*f.height}),o}),cfe=ue(ri,rr,afe,sm,cm,(e,r,n,a,i)=>{var o={},u;return n.forEach(c=>{var f=ife(r,c);u==null&&(u=ufe(r,a,e));var d=a==="left"&&!i||a==="right"&&i;o[c.id]=u-Number(d)*f.width,u+=(d?-1:1)*f.width}),o}),ffe=(e,r)=>{var n=ca(e,r);if(n!=null)return sfe(e,n.orientation,n.mirror)},dfe=ue([rr,ca,ffe,(e,r)=>r],(e,r,n,a)=>{if(r!=null){var i=n==null?void 0:n[a];return i==null?{x:e.left,y:0}:{x:e.left,y:i}}}),hfe=(e,r)=>{var n=fa(e,r);if(n!=null)return cfe(e,n.orientation,n.mirror)},pfe=ue([rr,fa,hfe,(e,r)=>r],(e,r,n,a)=>{if(r!=null){var i=n==null?void 0:n[a];return i==null?{x:0,y:e.top}:{x:i,y:e.top}}}),mfe=ue(rr,fa,(e,r)=>{var n=typeof r.width=="number"?r.width:Dc;return{width:n,height:e.height}}),B7=(e,r,n,a)=>{if(n!=null){var{allowDuplicatedCategory:i,type:o,dataKey:u}=n,c=ti(e,a),f=r.map(d=>d.value);if(u&&c&&o==="category"&&i&&pz(f))return f}},vk=ue([vt,Uc,br,Ht],B7),L4=ue([vt,wce,pu,au,vk,mk,Hc,hk,Ht],(e,r,n,a,i,o,u,c,f)=>{if(r!=null){var d=ti(e,f);return{angle:r.angle,interval:r.interval,minTickGap:r.minTickGap,orientation:r.orientation,tick:r.tick,tickCount:r.tickCount,tickFormatter:r.tickFormatter,ticks:r.ticks,type:r.type,unit:r.unit,axisType:f,categoricalDomain:o,duplicateDomain:i,isCategorical:d,niceTicks:c,range:u,realScaleType:n,scale:a}}}),vfe=(e,r,n,a,i,o,u,c,f)=>{if(!(r==null||a==null)){var d=ti(e,f),{type:h,ticks:m,tickCount:g}=r,y=n==="scaleBand"&&typeof a.bandwidth=="function"?a.bandwidth()/2:2,x=h==="category"&&a.bandwidth?a.bandwidth()/y:0;x=f==="angleAxis"&&o!=null&&o.length>=2?mn(o[0]-o[1])*2*x:x;var E=m||i;return E?E.map((w,_)=>{var A=u?u.indexOf(w):w,O=a.map(A);return Re(O)?{index:_,coordinate:O+x,value:w,offset:x}:null}).filter(Tr):d&&c?c.map((w,_)=>{var A=a.map(w);return Re(A)?{coordinate:A+x,value:w,index:_,offset:x}:null}).filter(Tr):a.ticks?a.ticks(g).map((w,_)=>{var A=a.map(w);return Re(A)?{coordinate:A+x,value:w,index:_,offset:x}:null}).filter(Tr):a.domain().map((w,_)=>{var A=a.map(w);return Re(A)?{coordinate:A+x,value:u?u[w]:w,index:_,offset:x}:null}).filter(Tr)}},$7=ue([vt,Bc,pu,au,hk,Hc,vk,mk,Ht],vfe),gfe=(e,r,n,a,i,o,u)=>{if(!(r==null||n==null||a==null||a[0]===a[1])){var c=ti(e,u),{tickCount:f}=r,d=0;return d=u==="angleAxis"&&(a==null?void 0:a.length)>=2?mn(a[0]-a[1])*2*d:d,c&&o?o.map((h,m)=>{var g=n.map(h);return Re(g)?{coordinate:g+d,value:h,index:m,offset:d}:null}).filter(Tr):n.ticks?n.ticks(f).map((h,m)=>{var g=n.map(h);return Re(g)?{coordinate:g+d,value:h,index:m,offset:d}:null}).filter(Tr):n.domain().map((h,m)=>{var g=n.map(h);return Re(g)?{coordinate:g+d,value:i?i[h]:h,index:m,offset:d}:null}).filter(Tr)}},U7=ue([vt,Bc,au,Hc,vk,mk,Ht],gfe),F7=ue(br,au,(e,r)=>{if(!(e==null||r==null))return np(np({},e),{},{scale:r})}),yfe=ue([br,pu,dk,L7],lk),bfe=ue([yfe],ok);ue((e,r,n)=>uk(e,n),bfe,(e,r)=>{if(!(e==null||r==null))return np(np({},e),{},{scale:r})});var xfe=ue([vt,Yp,Xp],(e,r,n)=>{switch(e){case"horizontal":return r.some(a=>a.reversed)?"right-to-left":"left-to-right";case"vertical":return n.some(a=>a.reversed)?"bottom-to-top":"top-to-bottom";case"centric":case"radial":return"left-to-right";default:return}}),_fe=(e,r,n)=>{var a;return(a=e.renderedTicks[r])===null||a===void 0?void 0:a[n]};ue([_fe],e=>{if(!(!e||e.length===0))return r=>{var n,a=1/0,i=e[0];for(var o of e){var u=Math.abs(o.coordinate-r);u<a&&(a=u,i=o)}return(n=i)===null||n===void 0?void 0:n.value}});var H7=e=>e.options.defaultTooltipEventType,G7=e=>e.options.validateTooltipEventTypes;function K7(e,r,n){if(e==null)return r;var a=e?"axis":"item";return n==null?r:n.includes(a)?a:r}function gk(e,r){var n=H7(e),a=G7(e);return K7(r,n,a)}function wfe(e){return je(r=>gk(r,e))}var V7=(e,r)=>{var n,a=Number(r);if(!(Wa(a)||r==null))return a>=0?e==null||(n=e[a])===null||n===void 0?void 0:n.value:void 0},Sfe=e=>e.tooltip.settings,qi={active:!1,index:null,dataKey:void 0,graphicalItemId:void 0,coordinate:void 0},Efe={itemInteraction:{click:qi,hover:qi},axisInteraction:{click:qi,hover:qi},keyboardInteraction:qi,syncInteraction:{active:!1,index:null,dataKey:void 0,label:void 0,coordinate:void 0,sourceViewBox:void 0,graphicalItemId:void 0},tooltipItemPayloads:[],settings:{shared:void 0,trigger:"hover",axisId:0,active:!1,defaultIndex:void 0}},Y7=cr({name:"tooltip",initialState:Efe,reducers:{addTooltipEntrySettings:{reducer(e,r){e.tooltipItemPayloads.push(r.payload)},prepare:ut()},replaceTooltipEntrySettings:{reducer(e,r){var{prev:n,next:a}=r.payload,i=vn(e).tooltipItemPayloads.indexOf(n);i>-1&&(e.tooltipItemPayloads[i]=a)},prepare:ut()},removeTooltipEntrySettings:{reducer(e,r){var n=vn(e).tooltipItemPayloads.indexOf(r.payload);n>-1&&e.tooltipItemPayloads.splice(n,1)},prepare:ut()},setTooltipSettingsState(e,r){e.settings=r.payload},setActiveMouseOverItemIndex(e,r){e.syncInteraction.active=!1,e.keyboardInteraction.active=!1,e.itemInteraction.hover.active=!0,e.itemInteraction.hover.index=r.payload.activeIndex,e.itemInteraction.hover.dataKey=r.payload.activeDataKey,e.itemInteraction.hover.graphicalItemId=r.payload.activeGraphicalItemId,e.itemInteraction.hover.coordinate=r.payload.activeCoordinate},mouseLeaveChart(e){e.itemInteraction.hover.active=!1,e.axisInteraction.hover.active=!1},mouseLeaveItem(e){e.itemInteraction.hover.active=!1},setActiveClickItemIndex(e,r){e.syncInteraction.active=!1,e.itemInteraction.click.active=!0,e.keyboardInteraction.active=!1,e.itemInteraction.click.index=r.payload.activeIndex,e.itemInteraction.click.dataKey=r.payload.activeDataKey,e.itemInteraction.click.graphicalItemId=r.payload.activeGraphicalItemId,e.itemInteraction.click.coordinate=r.payload.activeCoordinate},setMouseOverAxisIndex(e,r){e.syncInteraction.active=!1,e.axisInteraction.hover.active=!0,e.keyboardInteraction.active=!1,e.axisInteraction.hover.index=r.payload.activeIndex,e.axisInteraction.hover.dataKey=r.payload.activeDataKey,e.axisInteraction.hover.coordinate=r.payload.activeCoordinate},setMouseClickAxisIndex(e,r){e.syncInteraction.active=!1,e.keyboardInteraction.active=!1,e.axisInteraction.click.active=!0,e.axisInteraction.click.index=r.payload.activeIndex,e.axisInteraction.click.dataKey=r.payload.activeDataKey,e.axisInteraction.click.coordinate=r.payload.activeCoordinate},setSyncInteraction(e,r){e.syncInteraction=r.payload},setKeyboardInteraction(e,r){e.keyboardInteraction.active=r.payload.active,e.keyboardInteraction.index=r.payload.activeIndex,e.keyboardInteraction.coordinate=r.payload.activeCoordinate}}}),{addTooltipEntrySettings:kfe,replaceTooltipEntrySettings:jfe,removeTooltipEntrySettings:Afe,setTooltipSettingsState:Ofe,setActiveMouseOverItemIndex:Cfe,mouseLeaveItem:A_e,mouseLeaveChart:X7,setActiveClickItemIndex:O_e,setMouseOverAxisIndex:W7,setMouseClickAxisIndex:Tfe,setSyncInteraction:hS,setKeyboardInteraction:ip}=Y7.actions,Nfe=Y7.reducer;function I4(e,r){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);r&&(a=a.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,a)}return n}function $d(e){for(var r=1;r<arguments.length;r++){var n=arguments[r]!=null?arguments[r]:{};r%2?I4(Object(n),!0).forEach(function(a){Mfe(e,a,n[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):I4(Object(n)).forEach(function(a){Object.defineProperty(e,a,Object.getOwnPropertyDescriptor(n,a))})}return e}function Mfe(e,r,n){return(r=Pfe(r))in e?Object.defineProperty(e,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[r]=n,e}function Pfe(e){var r=Rfe(e,"string");return typeof r=="symbol"?r:r+""}function Rfe(e,r){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var a=n.call(e,r);if(typeof a!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return(r==="string"?String:Number)(e)}function Dfe(e,r,n){return r==="axis"?n==="click"?e.axisInteraction.click:e.axisInteraction.hover:n==="click"?e.itemInteraction.click:e.itemInteraction.hover}function Lfe(e){return e.index!=null}var Z7=(e,r,n,a)=>{if(r==null)return qi;var i=Dfe(e,r,n);if(i==null)return qi;if(i.active)return i;if(e.keyboardInteraction.active)return e.keyboardInteraction;if(e.syncInteraction.active&&e.syncInteraction.index!=null)return e.syncInteraction;var o=e.settings.active===!0;if(Lfe(i)){if(o)return $d($d({},i),{},{active:!0})}else if(a!=null)return{active:!0,coordinate:void 0,dataKey:void 0,index:a,graphicalItemId:void 0};return $d($d({},qi),{},{coordinate:i.coordinate})};function Ife(e){if(typeof e=="number")return Number.isFinite(e)?e:void 0;if(e instanceof Date){var r=e.valueOf();return Number.isFinite(r)?r:void 0}var n=Number(e);return Number.isFinite(n)?n:void 0}function zfe(e,r){var n=Ife(e),a=r[0],i=r[1];if(n===void 0)return!1;var o=Math.min(a,i),u=Math.max(a,i);return n>=o&&n<=u}function qfe(e,r,n){if(n==null||r==null)return!0;var a=er(e,r);return a==null||!ra(n)?!0:zfe(a,n)}var yk=(e,r,n,a)=>{var i=e==null?void 0:e.index;if(i==null)return null;var o=Number(i);if(!Re(o))return i;var u=0,c=1/0;r.length>0&&(c=r.length-1);var f=Math.max(u,Math.min(o,c)),d=r[f];return d==null||qfe(d,n,a)?String(f):null},Q7=(e,r,n,a,i,o,u)=>{if(o!=null){var c=u[0],f=c==null?void 0:c.getPosition(o);if(f!=null)return f;var d=i==null?void 0:i[Number(o)];if(d)switch(n){case"horizontal":return{x:d.coordinate,y:(a.top+r)/2};default:return{x:(a.left+e)/2,y:d.coordinate}}}},J7=(e,r,n,a)=>{if(r==="axis")return e.tooltipItemPayloads;if(e.tooltipItemPayloads.length===0)return[];var i;if(n==="hover"?i=e.itemInteraction.hover.graphicalItemId:i=e.itemInteraction.click.graphicalItemId,e.syncInteraction.active&&i==null)return e.tooltipItemPayloads;if(i==null&&a!=null){var o=e.tooltipItemPayloads[0];return o!=null?[o]:[]}return e.tooltipItemPayloads.filter(u=>{var c;return((c=u.settings)===null||c===void 0?void 0:c.graphicalItemId)===i})},eB=e=>e.options.tooltipPayloadSearcher,mu=e=>e.tooltip;function z4(e,r){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);r&&(a=a.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,a)}return n}function q4(e){for(var r=1;r<arguments.length;r++){var n=arguments[r]!=null?arguments[r]:{};r%2?z4(Object(n),!0).forEach(function(a){Bfe(e,a,n[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):z4(Object(n)).forEach(function(a){Object.defineProperty(e,a,Object.getOwnPropertyDescriptor(n,a))})}return e}function Bfe(e,r,n){return(r=$fe(r))in e?Object.defineProperty(e,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[r]=n,e}function $fe(e){var r=Ufe(e,"string");return typeof r=="symbol"?r:r+""}function Ufe(e,r){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var a=n.call(e,r);if(typeof a!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return(r==="string"?String:Number)(e)}function Ffe(e){if(typeof e=="string"||typeof e=="number")return e}function Hfe(e){if(typeof e=="string"||typeof e=="number"||typeof e=="boolean")return e}function Gfe(e){if(typeof e=="string"||typeof e=="number")return e;if(typeof e=="function")return r=>e(r)}function B4(e){if(typeof e=="string")return e}function Kfe(e){if(!(e==null||typeof e!="object")){var r="name"in e?Ffe(e.name):void 0,n="unit"in e?Hfe(e.unit):void 0,a="dataKey"in e?Gfe(e.dataKey):void 0,i="payload"in e?e.payload:void 0,o="color"in e?B4(e.color):void 0,u="fill"in e?B4(e.fill):void 0;return{name:r,unit:n,dataKey:a,payload:i,color:o,fill:u}}}function Vfe(e,r){return e??r}var tB=(e,r,n,a,i,o,u)=>{if(!(r==null||o==null)){var{chartData:c,computedData:f,dataStartIndex:d,dataEndIndex:h}=n,m=[];return e.reduce((g,y)=>{var x,{dataDefinedOnItem:E,settings:w}=y,_=Vfe(E,c),A=Array.isArray(_)?lq(_,d,h):_,O=(x=w==null?void 0:w.dataKey)!==null&&x!==void 0?x:a,T=w==null?void 0:w.nameKey,C;if(a&&Array.isArray(A)&&!Array.isArray(A[0])&&u==="axis"?C=mz(A,a,i):C=o(A,r,f,T),Array.isArray(C))C.forEach(M=>{var R,L,D=Kfe(M),z=D==null?void 0:D.name,q=D==null?void 0:D.dataKey,G=D==null?void 0:D.payload,U=q4(q4({},w),{},{name:z,unit:D==null?void 0:D.unit,color:(R=D==null?void 0:D.color)!==null&&R!==void 0?R:w==null?void 0:w.color,fill:(L=D==null?void 0:D.fill)!==null&&L!==void 0?L:w==null?void 0:w.fill});g.push(y3({tooltipEntrySettings:U,dataKey:q,payload:G,value:er(G,q),name:z==null?void 0:String(z)}))});else{var N;g.push(y3({tooltipEntrySettings:w,dataKey:O,payload:C,value:er(C,O),name:(N=er(C,T))!==null&&N!==void 0?N:w==null?void 0:w.name}))}return g},m)}},bk=ue([Lt,c7,JE],o7),Yfe=ue([e=>e.graphicalItems.cartesianItems,e=>e.graphicalItems.polarItems],(e,r)=>[...e,...r]),Xfe=ue([Gt,du],f7),vu=ue([Yfe,Lt,Xfe],h7,{memoizeOptions:{resultEqualityCheck:um}}),Wfe=ue([vu],e=>e.filter(ik)),Zfe=ue([vu],v7,{memoizeOptions:{resultEqualityCheck:um}}),gu=ue([Zfe,Vi],g7),Qfe=ue([Wfe,Vi,Lt],i7),xk=ue([gu,Lt,vu],y7),rB=ue([Lt],ck),Jfe=ue([Lt],e=>e.allowDataOverflow),nB=ue([rB,Jfe],Bq),ede=ue([vu],e=>e.filter(ik)),tde=ue([Qfe,ede,rm,Zq],x7),rde=ue([tde,Vi,Gt,nB],_7),nde=ue([vu],m7),ade=ue([gu,Lt,nde,fk,Gt],E7,{memoizeOptions:{resultEqualityCheck:lm}}),ide=ue([k7,Gt,du],hu),ode=ue([ide,Gt],O7),lde=ue([j7,Gt,du],hu),ude=ue([lde,Gt],C7),sde=ue([A7,Gt,du],hu),cde=ue([sde,Gt],T7),fde=ue([ode,cde,ude],ap),dde=ue([Lt,rB,nB,rde,ade,fde,vt,Gt],N7),Gc=ue([Lt,vt,gu,xk,rm,Gt,dde],M7),hde=ue([Gc,Lt,bk],P7),pde=ue([Lt,Gc,hde,Gt],R7),aB=e=>{var r=Gt(e),n=du(e),a=!1;return Hc(e,r,n,a)},iB=ue([Lt,aB],nm),mde=ue([Lt,bk,pde,iB],lk),oB=ue([mde],ok),vde=ue([vt,xk,Lt,Gt],B7),gde=ue([vt,xk,Lt,Gt],I7),yde=(e,r,n,a,i,o,u,c)=>{if(r){var{type:f}=r,d=ti(e,c);if(a){var h=n==="scaleBand"&&a.bandwidth?a.bandwidth()/2:2,m=f==="category"&&a.bandwidth?a.bandwidth()/h:0;return m=c==="angleAxis"&&i!=null&&(i==null?void 0:i.length)>=2?mn(i[0]-i[1])*2*m:m,d&&u?u.map((g,y)=>{var x=a.map(g);return Re(x)?{coordinate:x+m,value:g,index:y,offset:m}:null}).filter(Tr):a.domain().map((g,y)=>{var x=a.map(g);return Re(x)?{coordinate:x+m,value:o?o[g]:g,index:y,offset:m}:null}).filter(Tr)}}},ai=ue([vt,Lt,bk,oB,aB,vde,gde,Gt],yde),_k=ue([H7,G7,Sfe],(e,r,n)=>K7(n.shared,e,r)),lB=e=>e.tooltip.settings.trigger,wk=e=>e.tooltip.settings.defaultIndex,Kc=ue([mu,_k,lB,wk],Z7),vc=ue([Kc,gu,Fc,Gc],yk),uB=ue([ai,vc],V7),bde=ue([Kc],e=>{if(e)return e.dataKey}),xde=ue([Kc],e=>{if(e)return e.graphicalItemId}),sB=ue([mu,_k,lB,wk],J7),_de=ue([ri,ni,vt,rr,ai,wk,sB],Q7),wde=ue([Kc,_de],(e,r)=>e!=null&&e.coordinate?e.coordinate:r),Sde=ue([Kc],e=>{var r;return(r=e==null?void 0:e.active)!==null&&r!==void 0?r:!1}),Ede=ue([sB,vc,Vi,Fc,uB,eB,_k],tB),kde=ue([Ede],e=>{if(e!=null){var r=e.map(n=>n.payload).filter(n=>n!=null);return Array.from(new Set(r))}});function $4(e,r){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);r&&(a=a.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,a)}return n}function U4(e){for(var r=1;r<arguments.length;r++){var n=arguments[r]!=null?arguments[r]:{};r%2?$4(Object(n),!0).forEach(function(a){jde(e,a,n[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):$4(Object(n)).forEach(function(a){Object.defineProperty(e,a,Object.getOwnPropertyDescriptor(n,a))})}return e}function jde(e,r,n){return(r=Ade(r))in e?Object.defineProperty(e,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[r]=n,e}function Ade(e){var r=Ode(e,"string");return typeof r=="symbol"?r:r+""}function Ode(e,r){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var a=n.call(e,r);if(typeof a!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return(r==="string"?String:Number)(e)}var Cde=()=>je(Lt),Tde=()=>{var e=Cde(),r=je(ai),n=je(oB);return Gh(!e||!n?void 0:U4(U4({},e),{},{scale:n}),r)};function F4(e,r){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);r&&(a=a.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,a)}return n}function ql(e){for(var r=1;r<arguments.length;r++){var n=arguments[r]!=null?arguments[r]:{};r%2?F4(Object(n),!0).forEach(function(a){Nde(e,a,n[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):F4(Object(n)).forEach(function(a){Object.defineProperty(e,a,Object.getOwnPropertyDescriptor(n,a))})}return e}function Nde(e,r,n){return(r=Mde(r))in e?Object.defineProperty(e,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[r]=n,e}function Mde(e){var r=Pde(e,"string");return typeof r=="symbol"?r:r+""}function Pde(e,r){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var a=n.call(e,r);if(typeof a!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return(r==="string"?String:Number)(e)}var Rde=(e,r,n,a)=>{var i=r.find(o=>o&&o.index===n);if(i){if(e==="horizontal")return{x:i.coordinate,y:a.relativeY};if(e==="vertical")return{x:a.relativeX,y:i.coordinate}}return{x:0,y:0}},Dde=(e,r,n,a)=>{var i=r.find(d=>d&&d.index===n);if(i){if(e==="centric"){var o=i.coordinate,{radius:u}=a;return ql(ql(ql({},a),Jt(a.cx,a.cy,u,o)),{},{angle:o,radius:u})}var c=i.coordinate,{angle:f}=a;return ql(ql(ql({},a),Jt(a.cx,a.cy,c,f)),{},{angle:f,radius:c})}return{angle:0,clockWise:!1,cx:0,cy:0,endAngle:0,innerRadius:0,outerRadius:0,radius:0,startAngle:0,x:0,y:0}};function Lde(e,r){var{relativeX:n,relativeY:a}=e;return n>=r.left&&n<=r.left+r.width&&a>=r.top&&a<=r.top+r.height}var cB=(e,r,n,a,i)=>{var o,u=(o=r==null?void 0:r.length)!==null&&o!==void 0?o:0;if(u<=1||e==null)return 0;if(a==="angleAxis"&&i!=null&&Math.abs(Math.abs(i[1]-i[0])-360)<=1e-6)for(var c=0;c<u;c++){var f,d,h,m,g,y=c>0?(f=n[c-1])===null||f===void 0?void 0:f.coordinate:(d=n[u-1])===null||d===void 0?void 0:d.coordinate,x=(h=n[c])===null||h===void 0?void 0:h.coordinate,E=c>=u-1?(m=n[0])===null||m===void 0?void 0:m.coordinate:(g=n[c+1])===null||g===void 0?void 0:g.coordinate,w=void 0;if(!(y==null||x==null||E==null))if(mn(x-y)!==mn(E-x)){var _=[];if(mn(E-x)===mn(i[1]-i[0])){w=E;var A=x+i[1]-i[0];_[0]=Math.min(A,(A+y)/2),_[1]=Math.max(A,(A+y)/2)}else{w=y;var O=E+i[1]-i[0];_[0]=Math.min(x,(O+x)/2),_[1]=Math.max(x,(O+x)/2)}var T=[Math.min(x,(w+x)/2),Math.max(x,(w+x)/2)];if(e>T[0]&&e<=T[1]||e>=_[0]&&e<=_[1]){var C;return(C=n[c])===null||C===void 0?void 0:C.index}}else{var N=Math.min(y,E),M=Math.max(y,E);if(e>(N+x)/2&&e<=(M+x)/2){var R;return(R=n[c])===null||R===void 0?void 0:R.index}}}else if(r)for(var L=0;L<u;L++){var D=r[L];if(D!=null){var z=r[L+1],q=r[L-1];if(L===0&&z!=null&&e<=(D.coordinate+z.coordinate)/2||L===u-1&&q!=null&&e>(D.coordinate+q.coordinate)/2||L>0&&L<u-1&&q!=null&&z!=null&&e>(D.coordinate+q.coordinate)/2&&e<=(D.coordinate+z.coordinate)/2)return D.index}}return-1},Ide=()=>je(JE),Sk=(e,r)=>r,fB=(e,r,n)=>n,Ek=(e,r,n,a)=>a,zde=ue(ai,e=>zp(e,r=>r.coordinate)),kk=ue([mu,Sk,fB,Ek],Z7),jk=ue([kk,gu,Fc,Gc],yk),qde=(e,r,n)=>{if(r!=null){var a=mu(e);return r==="axis"?n==="hover"?a.axisInteraction.hover.dataKey:a.axisInteraction.click.dataKey:n==="hover"?a.itemInteraction.hover.dataKey:a.itemInteraction.click.dataKey}},dB=ue([mu,Sk,fB,Ek],J7),op=ue([ri,ni,vt,rr,ai,Ek,dB],Q7),Bde=ue([kk,op],(e,r)=>{var n;return(n=e.coordinate)!==null&&n!==void 0?n:r}),hB=ue([ai,jk],V7),$de=ue([dB,jk,Vi,Fc,hB,eB,Sk],tB),Ude=ue([kk,jk],(e,r)=>({isActive:e.active&&r!=null,activeIndex:r})),Fde=(e,r,n,a,i,o,u)=>{if(!(!e||!n||!a||!i)&&Lde(e,u)){var c=fle(e,r),f=cB(c,o,i,n,a),d=Rde(r,i,f,e);return{activeIndex:String(f),activeCoordinate:d}}},Hde=(e,r,n,a,i,o,u)=>{if(!(!e||!a||!i||!o||!n)){var c=Use(e,n);if(c){var f=dle(c,r),d=cB(f,u,o,a,i),h=Dde(r,o,d,c);return{activeIndex:String(d),activeCoordinate:h}}}},Gde=(e,r,n,a,i,o,u,c)=>{if(!(!e||!r||!a||!i||!o))return r==="horizontal"||r==="vertical"?Fde(e,r,a,i,o,u,c):Hde(e,r,n,a,i,o,u)},Kde=ue(e=>e.zIndex.zIndexMap,(e,r)=>r,(e,r,n)=>n,(e,r,n)=>{if(r!=null){var a=e[r];if(a!=null)return n?a.panoramaElement:a.element}}),Vde=ue(e=>e.zIndex.zIndexMap,e=>{var r=Object.keys(e).map(a=>parseInt(a,10)).concat(Object.values(ur)),n=Array.from(new Set(r));return n.sort((a,i)=>a-i)},{memoizeOptions:{resultEqualityCheck:fce}});function H4(e,r){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);r&&(a=a.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,a)}return n}function G4(e){for(var r=1;r<arguments.length;r++){var n=arguments[r]!=null?arguments[r]:{};r%2?H4(Object(n),!0).forEach(function(a){Yde(e,a,n[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):H4(Object(n)).forEach(function(a){Object.defineProperty(e,a,Object.getOwnPropertyDescriptor(n,a))})}return e}function Yde(e,r,n){return(r=Xde(r))in e?Object.defineProperty(e,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[r]=n,e}function Xde(e){var r=Wde(e,"string");return typeof r=="symbol"?r:r+""}function Wde(e,r){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var a=n.call(e,r);if(typeof a!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return(r==="string"?String:Number)(e)}var Zde={},Qde={zIndexMap:Object.values(ur).reduce((e,r)=>G4(G4({},e),{},{[r]:{element:void 0,panoramaElement:void 0,consumers:0}}),Zde)},Jde=new Set(Object.values(ur));function ehe(e){return Jde.has(e)}var pB=cr({name:"zIndex",initialState:Qde,reducers:{registerZIndexPortal:{reducer:(e,r)=>{var{zIndex:n}=r.payload;e.zIndexMap[n]?e.zIndexMap[n].consumers+=1:e.zIndexMap[n]={consumers:1,element:void 0,panoramaElement:void 0}},prepare:ut()},unregisterZIndexPortal:{reducer:(e,r)=>{var{zIndex:n}=r.payload;e.zIndexMap[n]&&(e.zIndexMap[n].consumers-=1,e.zIndexMap[n].consumers<=0&&!ehe(n)&&delete e.zIndexMap[n])},prepare:ut()},registerZIndexPortalElement:{reducer:(e,r)=>{var{zIndex:n,element:a,isPanorama:i}=r.payload;e.zIndexMap[n]?i?e.zIndexMap[n].panoramaElement=a:e.zIndexMap[n].element=a:e.zIndexMap[n]={consumers:0,element:i?void 0:a,panoramaElement:i?a:void 0}},prepare:ut()},unregisterZIndexPortalElement:{reducer:(e,r)=>{var{zIndex:n}=r.payload;e.zIndexMap[n]&&(r.payload.isPanorama?e.zIndexMap[n].panoramaElement=void 0:e.zIndexMap[n].element=void 0)},prepare:ut()}}}),{registerZIndexPortal:the,unregisterZIndexPortal:rhe,registerZIndexPortalElement:nhe,unregisterZIndexPortalElement:ahe}=pB.actions,ihe=pB.reducer;function da(e){var{zIndex:r,children:n}=e,a=Gle(),i=a&&r!==void 0&&r!==0,o=yr(),u=Et();k.useLayoutEffect(()=>i?(u(the({zIndex:r})),()=>{u(rhe({zIndex:r}))}):Fo,[u,r,i]);var c=je(f=>Kde(f,r,o));return i?c?MS.createPortal(n,c):null:n}function pS(){return pS=Object.assign?Object.assign.bind():function(e){for(var r=1;r<arguments.length;r++){var n=arguments[r];for(var a in n)({}).hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e},pS.apply(null,arguments)}function K4(e,r){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);r&&(a=a.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,a)}return n}function Ud(e){for(var r=1;r<arguments.length;r++){var n=arguments[r]!=null?arguments[r]:{};r%2?K4(Object(n),!0).forEach(function(a){ohe(e,a,n[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):K4(Object(n)).forEach(function(a){Object.defineProperty(e,a,Object.getOwnPropertyDescriptor(n,a))})}return e}function ohe(e,r,n){return(r=lhe(r))in e?Object.defineProperty(e,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[r]=n,e}function lhe(e){var r=uhe(e,"string");return typeof r=="symbol"?r:r+""}function uhe(e,r){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var a=n.call(e,r);if(typeof a!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return(r==="string"?String:Number)(e)}function she(e){var{cursor:r,cursorComp:n,cursorProps:a}=e;return k.isValidElement(r)?k.cloneElement(r,a):k.createElement(n,a)}function che(e){var r,{coordinate:n,payload:a,index:i,offset:o,tooltipAxisBandSize:u,layout:c,cursor:f,tooltipEventType:d,chartName:h}=e,m=n,g=a,y=i;if(!f||!m||h!=="ScatterChart"&&d!=="axis")return null;var x,E,w;if(h==="ScatterChart")x=m,E=rse,w=ur.cursorLine;else if(h==="BarChart")x=nse(c,m,o,u),E=Dq,w=ur.cursorRectangle;else if(c==="radial"&&yz(m)){var{cx:_,cy:A,radius:O,startAngle:T,endAngle:C}=Lq(m);x={cx:_,cy:A,startAngle:T,endAngle:C,innerRadius:O,outerRadius:O},E=zq,w=ur.cursorLine}else x={points:Kse(c,m,o)},E=Tq,w=ur.cursorLine;var N=typeof f=="object"&&"className"in f?f.className:void 0,M=Ud(Ud(Ud(Ud({stroke:"#ccc",pointerEvents:"none"},o),x),Pp(f)),{},{payload:g,payloadIndex:y,className:Je("recharts-tooltip-cursor",N)});return k.createElement(da,{zIndex:(r=e.zIndex)!==null&&r!==void 0?r:w},k.createElement(she,{cursor:f,cursorComp:E,cursorProps:M}))}function fhe(e){var r=Tde(),n=vq(),a=su(),i=Ide();return r==null||n==null||a==null||i==null?null:k.createElement(che,pS({},e,{offset:n,layout:a,tooltipAxisBandSize:r,chartName:i}))}var mB=k.createContext(null),dhe=()=>k.useContext(mB),P0={exports:{}},V4;function hhe(){return V4||(V4=1,(function(e){var r=Object.prototype.hasOwnProperty,n="~";function a(){}Object.create&&(a.prototype=Object.create(null),new a().__proto__||(n=!1));function i(f,d,h){this.fn=f,this.context=d,this.once=h||!1}function o(f,d,h,m,g){if(typeof h!="function")throw new TypeError("The listener must be a function");var y=new i(h,m||f,g),x=n?n+d:d;return f._events[x]?f._events[x].fn?f._events[x]=[f._events[x],y]:f._events[x].push(y):(f._events[x]=y,f._eventsCount++),f}function u(f,d){--f._eventsCount===0?f._events=new a:delete f._events[d]}function c(){this._events=new a,this._eventsCount=0}c.prototype.eventNames=function(){var d=[],h,m;if(this._eventsCount===0)return d;for(m in h=this._events)r.call(h,m)&&d.push(n?m.slice(1):m);return Object.getOwnPropertySymbols?d.concat(Object.getOwnPropertySymbols(h)):d},c.prototype.listeners=function(d){var h=n?n+d:d,m=this._events[h];if(!m)return[];if(m.fn)return[m.fn];for(var g=0,y=m.length,x=new Array(y);g<y;g++)x[g]=m[g].fn;return x},c.prototype.listenerCount=function(d){var h=n?n+d:d,m=this._events[h];return m?m.fn?1:m.length:0},c.prototype.emit=function(d,h,m,g,y,x){var E=n?n+d:d;if(!this._events[E])return!1;var w=this._events[E],_=arguments.length,A,O;if(w.fn){switch(w.once&&this.removeListener(d,w.fn,void 0,!0),_){case 1:return w.fn.call(w.context),!0;case 2:return w.fn.call(w.context,h),!0;case 3:return w.fn.call(w.context,h,m),!0;case 4:return w.fn.call(w.context,h,m,g),!0;case 5:return w.fn.call(w.context,h,m,g,y),!0;case 6:return w.fn.call(w.context,h,m,g,y,x),!0}for(O=1,A=new Array(_-1);O<_;O++)A[O-1]=arguments[O];w.fn.apply(w.context,A)}else{var T=w.length,C;for(O=0;O<T;O++)switch(w[O].once&&this.removeListener(d,w[O].fn,void 0,!0),_){case 1:w[O].fn.call(w[O].context);break;case 2:w[O].fn.call(w[O].context,h);break;case 3:w[O].fn.call(w[O].context,h,m);break;case 4:w[O].fn.call(w[O].context,h,m,g);break;default:if(!A)for(C=1,A=new Array(_-1);C<_;C++)A[C-1]=arguments[C];w[O].fn.apply(w[O].context,A)}}return!0},c.prototype.on=function(d,h,m){return o(this,d,h,m,!1)},c.prototype.once=function(d,h,m){return o(this,d,h,m,!0)},c.prototype.removeListener=function(d,h,m,g){var y=n?n+d:d;if(!this._events[y])return this;if(!h)return u(this,y),this;var x=this._events[y];if(x.fn)x.fn===h&&(!g||x.once)&&(!m||x.context===m)&&u(this,y);else{for(var E=0,w=[],_=x.length;E<_;E++)(x[E].fn!==h||g&&!x[E].once||m&&x[E].context!==m)&&w.push(x[E]);w.length?this._events[y]=w.length===1?w[0]:w:u(this,y)}return this},c.prototype.removeAllListeners=function(d){var h;return d?(h=n?n+d:d,this._events[h]&&u(this,h)):(this._events=new a,this._eventsCount=0),this},c.prototype.off=c.prototype.removeListener,c.prototype.addListener=c.prototype.on,c.prefixed=n,c.EventEmitter=c,e.exports=c})(P0)),P0.exports}var phe=hhe();const mhe=Dn(phe);var gc=new mhe,mS="recharts.syncEvent.tooltip",Y4="recharts.syncEvent.brush",vhe=(e,r)=>{if(r&&Array.isArray(e)){var n=Number.parseInt(r,10);if(!Wa(n))return e[n]}},ghe={chartName:"",tooltipPayloadSearcher:()=>{},eventEmitter:void 0,defaultTooltipEventType:"axis"},vB=cr({name:"options",initialState:ghe,reducers:{createEventEmitter:e=>{e.eventEmitter==null&&(e.eventEmitter=Symbol("rechartsEventEmitter"))}}}),yhe=vB.reducer,{createEventEmitter:bhe}=vB.actions;function xhe(e){return e.tooltip.syncInteraction}var _he={chartData:void 0,computedData:void 0,dataStartIndex:0,dataEndIndex:0},gB=cr({name:"chartData",initialState:_he,reducers:{setChartData(e,r){if(e.chartData=r.payload,r.payload==null){e.dataStartIndex=0,e.dataEndIndex=0;return}r.payload.length>0&&e.dataEndIndex!==r.payload.length-1&&(e.dataEndIndex=r.payload.length-1)},setComputedData(e,r){e.computedData=r.payload},setDataStartEndIndexes(e,r){var{startIndex:n,endIndex:a}=r.payload;n!=null&&(e.dataStartIndex=n),a!=null&&(e.dataEndIndex=a)}}}),{setChartData:X4,setDataStartEndIndexes:whe,setComputedData:C_e}=gB.actions,She=gB.reducer,Ehe=["x","y"];function W4(e,r){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);r&&(a=a.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,a)}return n}function Bl(e){for(var r=1;r<arguments.length;r++){var n=arguments[r]!=null?arguments[r]:{};r%2?W4(Object(n),!0).forEach(function(a){khe(e,a,n[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):W4(Object(n)).forEach(function(a){Object.defineProperty(e,a,Object.getOwnPropertyDescriptor(n,a))})}return e}function khe(e,r,n){return(r=jhe(r))in e?Object.defineProperty(e,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[r]=n,e}function jhe(e){var r=Ahe(e,"string");return typeof r=="symbol"?r:r+""}function Ahe(e,r){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var a=n.call(e,r);if(typeof a!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return(r==="string"?String:Number)(e)}function Ohe(e,r){if(e==null)return{};var n,a,i=Che(e,r);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(a=0;a<o.length;a++)n=o[a],r.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function Che(e,r){if(e==null)return{};var n={};for(var a in e)if({}.hasOwnProperty.call(e,a)){if(r.indexOf(a)!==-1)continue;n[a]=e[a]}return n}function The(){var e=je(ek),r=je(tk),n=Et(),a=je(Qq),i=je(ai),o=su(),u=Lc(),c=je(f=>f.rootProps.className);k.useEffect(()=>{if(e==null)return Fo;var f=(d,h,m)=>{if(r!==m&&e===d){if(a==="index"){var g;if(u&&h!==null&&h!==void 0&&(g=h.payload)!==null&&g!==void 0&&g.coordinate&&h.payload.sourceViewBox){var y=h.payload.coordinate,{x,y:E}=y,w=Ohe(y,Ehe),{x:_,y:A,width:O,height:T}=h.payload.sourceViewBox,C=Bl(Bl({},w),{},{x:u.x+(O?(x-_)/O:0)*u.width,y:u.y+(T?(E-A)/T:0)*u.height});n(Bl(Bl({},h),{},{payload:Bl(Bl({},h.payload),{},{coordinate:C})}))}else n(h);return}if(i!=null){var N;if(typeof a=="function"){var M={activeTooltipIndex:h.payload.index==null?void 0:Number(h.payload.index),isTooltipActive:h.payload.active,activeIndex:h.payload.index==null?void 0:Number(h.payload.index),activeLabel:h.payload.label,activeDataKey:h.payload.dataKey,activeCoordinate:h.payload.coordinate},R=a(i,M);N=i[R]}else a==="value"&&(N=i.find($=>String($.value)===h.payload.label));var{coordinate:L}=h.payload;if(N==null||h.payload.active===!1||L==null||u==null){n(hS({active:!1,coordinate:void 0,dataKey:void 0,index:null,label:void 0,sourceViewBox:void 0,graphicalItemId:void 0}));return}var{x:D,y:z}=L,q=Math.min(D,u.x+u.width),G=Math.min(z,u.y+u.height),U={x:o==="horizontal"?N.coordinate:q,y:o==="horizontal"?G:N.coordinate},Y=hS({active:h.payload.active,coordinate:U,dataKey:h.payload.dataKey,index:String(N.index),label:h.payload.label,sourceViewBox:h.payload.sourceViewBox,graphicalItemId:h.payload.graphicalItemId});n(Y)}}};return gc.on(mS,f),()=>{gc.off(mS,f)}},[c,n,r,e,a,i,o,u])}function Nhe(){var e=je(ek),r=je(tk),n=Et();k.useEffect(()=>{if(e==null)return Fo;var a=(i,o,u)=>{r!==u&&e===i&&n(whe(o))};return gc.on(Y4,a),()=>{gc.off(Y4,a)}},[n,r,e])}function Mhe(){var e=Et();k.useEffect(()=>{e(bhe())},[e]),The(),Nhe()}function Phe(e,r,n,a,i,o){var u=je(x=>qde(x,e,r)),c=je(xde),f=je(tk),d=je(ek),h=je(Qq),m=je(xhe),g=m==null?void 0:m.active,y=Lc();k.useEffect(()=>{if(!g&&d!=null&&f!=null){var x=hS({active:o,coordinate:n,dataKey:u,index:i,label:typeof a=="number"?String(a):a,sourceViewBox:y,graphicalItemId:c});gc.emit(mS,d,x,f)}},[g,n,u,c,i,a,f,d,h,o,y])}function Z4(e,r){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);r&&(a=a.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,a)}return n}function Q4(e){for(var r=1;r<arguments.length;r++){var n=arguments[r]!=null?arguments[r]:{};r%2?Z4(Object(n),!0).forEach(function(a){Rhe(e,a,n[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Z4(Object(n)).forEach(function(a){Object.defineProperty(e,a,Object.getOwnPropertyDescriptor(n,a))})}return e}function Rhe(e,r,n){return(r=Dhe(r))in e?Object.defineProperty(e,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[r]=n,e}function Dhe(e){var r=Lhe(e,"string");return typeof r=="symbol"?r:r+""}function Lhe(e,r){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var a=n.call(e,r);if(typeof a!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return(r==="string"?String:Number)(e)}function Ihe(e){return e.dataKey}function zhe(e,r){return k.isValidElement(e)?k.cloneElement(e,r):typeof e=="function"?k.createElement(e,r):k.createElement(Nue,r)}var J4=[],qhe={allowEscapeViewBox:{x:!1,y:!1},animationDuration:400,animationEasing:"ease",axisId:0,contentStyle:{},cursor:!0,filterNull:!0,includeHidden:!1,isAnimationActive:"auto",itemSorter:"name",itemStyle:{},labelStyle:{},offset:10,reverseDirection:{x:!1,y:!1},separator:" : ",trigger:"hover",useTranslate3d:!1,wrapperStyle:{}};function Bhe(e){var r,n,a=gr(e,qhe),{active:i,allowEscapeViewBox:o,animationDuration:u,animationEasing:c,content:f,filterNull:d,isAnimationActive:h,offset:m,payloadUniqBy:g,position:y,reverseDirection:x,useTranslate3d:E,wrapperStyle:w,cursor:_,shared:A,trigger:O,defaultIndex:T,portal:C,axisId:N}=a,M=Et(),R=typeof T=="number"?String(T):T;k.useEffect(()=>{M(Ofe({shared:A,trigger:O,axisId:N,active:i,defaultIndex:R}))},[M,A,O,N,i,R]);var L=Lc(),D=Cq(),z=wfe(A),{activeIndex:q,isActive:G}=(r=je(ge=>Ude(ge,z,O,R)))!==null&&r!==void 0?r:{},U=je(ge=>$de(ge,z,O,R)),Y=je(ge=>hB(ge,z,O,R)),$=je(ge=>Bde(ge,z,O,R)),J=U,re=dhe(),oe=(n=i??G)!==null&&n!==void 0?n:!1,[fe,F]=Jie([J,oe]),Z=z==="axis"?Y:void 0;Phe(z,O,$,Z,q,oe);var ce=C??re;if(ce==null||L==null||z==null)return null;var B=J??J4;oe||(B=J4),d&&B.length&&(B=kie(B.filter(ge=>ge.value!=null&&(ge.hide!==!0||a.includeHidden)),g,Ihe));var H=B.length>0,te=Q4(Q4({},a),{},{payload:B,label:Z,active:oe,activeIndex:q,coordinate:$,accessibilityLayer:D}),he=k.createElement(Uue,{allowEscapeViewBox:o,animationDuration:u,animationEasing:c,isAnimationActive:h,active:oe,coordinate:$,hasPayload:H,offset:m,position:y,reverseDirection:x,useTranslate3d:E,viewBox:L,wrapperStyle:w,lastBoundingBox:fe,innerRef:F,hasPortalFromProps:!!C},zhe(f,te));return k.createElement(k.Fragment,null,MS.createPortal(he,ce),oe&&k.createElement(fhe,{cursor:_,tooltipEventType:z,coordinate:$,payload:B,index:q}))}function $he(e,r,n){return(r=Uhe(r))in e?Object.defineProperty(e,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[r]=n,e}function Uhe(e){var r=Fhe(e,"string");return typeof r=="symbol"?r:r+""}function Fhe(e,r){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var a=n.call(e,r);if(typeof a!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return(r==="string"?String:Number)(e)}class Hhe{constructor(r){$he(this,"cache",new Map),this.maxSize=r}get(r){var n=this.cache.get(r);return n!==void 0&&(this.cache.delete(r),this.cache.set(r,n)),n}set(r,n){if(this.cache.has(r))this.cache.delete(r);else if(this.cache.size>=this.maxSize){var a=this.cache.keys().next().value;a!=null&&this.cache.delete(a)}this.cache.set(r,n)}clear(){this.cache.clear()}size(){return this.cache.size}}function eM(e,r){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);r&&(a=a.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,a)}return n}function Ghe(e){for(var r=1;r<arguments.length;r++){var n=arguments[r]!=null?arguments[r]:{};r%2?eM(Object(n),!0).forEach(function(a){Khe(e,a,n[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):eM(Object(n)).forEach(function(a){Object.defineProperty(e,a,Object.getOwnPropertyDescriptor(n,a))})}return e}function Khe(e,r,n){return(r=Vhe(r))in e?Object.defineProperty(e,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[r]=n,e}function Vhe(e){var r=Yhe(e,"string");return typeof r=="symbol"?r:r+""}function Yhe(e,r){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var a=n.call(e,r);if(typeof a!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return(r==="string"?String:Number)(e)}var Xhe={cacheSize:2e3,enableCache:!0},yB=Ghe({},Xhe),tM=new Hhe(yB.cacheSize),Whe={position:"absolute",top:"-20000px",left:0,padding:0,margin:0,border:"none",whiteSpace:"pre"},rM="recharts_measurement_span";function Zhe(e,r){var n=r.fontSize||"",a=r.fontFamily||"",i=r.fontWeight||"",o=r.fontStyle||"",u=r.letterSpacing||"",c=r.textTransform||"";return"".concat(e,"|").concat(n,"|").concat(a,"|").concat(i,"|").concat(o,"|").concat(u,"|").concat(c)}var nM=(e,r)=>{try{var n=document.getElementById(rM);n||(n=document.createElement("span"),n.setAttribute("id",rM),n.setAttribute("aria-hidden","true"),document.body.appendChild(n)),Object.assign(n.style,Whe,r),n.textContent="".concat(e);var a=n.getBoundingClientRect();return{width:a.width,height:a.height}}catch{return{width:0,height:0}}},Js=function(r){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(r==null||qc.isSsr)return{width:0,height:0};if(!yB.enableCache)return nM(r,n);var a=Zhe(r,n),i=tM.get(a);if(i)return i;var o=nM(r,n);return tM.set(a,o),o},bB;function Qhe(e,r,n){return(r=Jhe(r))in e?Object.defineProperty(e,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[r]=n,e}function Jhe(e){var r=epe(e,"string");return typeof r=="symbol"?r:r+""}function epe(e,r){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var a=n.call(e,r);if(typeof a!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return(r==="string"?String:Number)(e)}var aM=/(-?\d+(?:\.\d+)?[a-zA-Z%]*)([*/])(-?\d+(?:\.\d+)?[a-zA-Z%]*)/,iM=/(-?\d+(?:\.\d+)?[a-zA-Z%]*)([+-])(-?\d+(?:\.\d+)?[a-zA-Z%]*)/,tpe=/^(px|cm|vh|vw|em|rem|%|mm|in|pt|pc|ex|ch|vmin|vmax|Q)$/,rpe=/(-?\d+(?:\.\d+)?)([a-zA-Z%]+)?/,npe={cm:96/2.54,mm:96/25.4,pt:96/72,pc:96/6,in:96,Q:96/(2.54*40),px:1},ape=["cm","mm","pt","pc","in","Q","px"];function ipe(e){return ape.includes(e)}var Gl="NaN";function ope(e,r){return e*npe[r]}class Qt{static parse(r){var n,[,a,i]=(n=rpe.exec(r))!==null&&n!==void 0?n:[];return a==null?Qt.NaN:new Qt(parseFloat(a),i??"")}constructor(r,n){this.num=r,this.unit=n,this.num=r,this.unit=n,Wa(r)&&(this.unit=""),n!==""&&!tpe.test(n)&&(this.num=NaN,this.unit=""),ipe(n)&&(this.num=ope(r,n),this.unit="px")}add(r){return this.unit!==r.unit?new Qt(NaN,""):new Qt(this.num+r.num,this.unit)}subtract(r){return this.unit!==r.unit?new Qt(NaN,""):new Qt(this.num-r.num,this.unit)}multiply(r){return this.unit!==""&&r.unit!==""&&this.unit!==r.unit?new Qt(NaN,""):new Qt(this.num*r.num,this.unit||r.unit)}divide(r){return this.unit!==""&&r.unit!==""&&this.unit!==r.unit?new Qt(NaN,""):new Qt(this.num/r.num,this.unit||r.unit)}toString(){return"".concat(this.num).concat(this.unit)}isNaN(){return Wa(this.num)}}bB=Qt;Qhe(Qt,"NaN",new bB(NaN,""));function xB(e){if(e==null||e.includes(Gl))return Gl;for(var r=e;r.includes("*")||r.includes("/");){var n,[,a,i,o]=(n=aM.exec(r))!==null&&n!==void 0?n:[],u=Qt.parse(a??""),c=Qt.parse(o??""),f=i==="*"?u.multiply(c):u.divide(c);if(f.isNaN())return Gl;r=r.replace(aM,f.toString())}for(;r.includes("+")||/.-\d+(?:\.\d+)?/.test(r);){var d,[,h,m,g]=(d=iM.exec(r))!==null&&d!==void 0?d:[],y=Qt.parse(h??""),x=Qt.parse(g??""),E=m==="+"?y.add(x):y.subtract(x);if(E.isNaN())return Gl;r=r.replace(iM,E.toString())}return r}var oM=/\(([^()]*)\)/;function lpe(e){for(var r=e,n;(n=oM.exec(r))!=null;){var[,a]=n;r=r.replace(oM,xB(a))}return r}function upe(e){var r=e.replace(/\s+/g,"");return r=lpe(r),r=xB(r),r}function spe(e){try{return upe(e)}catch{return Gl}}function R0(e){var r=spe(e.slice(5,-1));return r===Gl?"":r}var cpe=["x","y","lineHeight","capHeight","fill","scaleToFit","textAnchor","verticalAnchor"],fpe=["dx","dy","angle","className","breakAll"];function vS(){return vS=Object.assign?Object.assign.bind():function(e){for(var r=1;r<arguments.length;r++){var n=arguments[r];for(var a in n)({}).hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e},vS.apply(null,arguments)}function lM(e,r){if(e==null)return{};var n,a,i=dpe(e,r);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(a=0;a<o.length;a++)n=o[a],r.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function dpe(e,r){if(e==null)return{};var n={};for(var a in e)if({}.hasOwnProperty.call(e,a)){if(r.indexOf(a)!==-1)continue;n[a]=e[a]}return n}var _B=/[ \f\n\r\t\v\u2028\u2029]+/,wB=e=>{var{children:r,breakAll:n,style:a}=e;try{var i=[];$t(r)||(n?i=r.toString().split(""):i=r.toString().split(_B));var o=i.map(c=>({word:c,width:Js(c,a).width})),u=n?0:Js(" ",a).width;return{wordsWithComputedWidth:o,spaceWidth:u}}catch{return null}};function SB(e){return e==="start"||e==="middle"||e==="end"||e==="inherit"}function hpe(e){return $t(e)||typeof e=="string"||typeof e=="number"||typeof e=="boolean"}var EB=(e,r,n,a)=>e.reduce((i,o)=>{var{word:u,width:c}=o,f=i[i.length-1];if(f&&c!=null&&(r==null||a||f.width+c+n<Number(r)))f.words.push(u),f.width+=c+n;else{var d={words:[u],width:c};i.push(d)}return i},[]),kB=e=>e.reduce((r,n)=>r.width>n.width?r:n),ppe="…",uM=(e,r,n,a,i,o,u,c)=>{var f=e.slice(0,r),d=wB({breakAll:n,style:a,children:f+ppe});if(!d)return[!1,[]];var h=EB(d.wordsWithComputedWidth,o,u,c),m=h.length>i||kB(h).width>Number(o);return[m,h]},mpe=(e,r,n,a,i)=>{var{maxLines:o,children:u,style:c,breakAll:f}=e,d=ke(o),h=String(u),m=EB(r,a,n,i);if(!d||i)return m;var g=m.length>o||kB(m).width>Number(a);if(!g)return m;for(var y=0,x=h.length-1,E=0,w;y<=x&&E<=h.length-1;){var _=Math.floor((y+x)/2),A=_-1,[O,T]=uM(h,A,f,c,o,a,n,i),[C]=uM(h,_,f,c,o,a,n,i);if(!O&&!C&&(y=_+1),O&&C&&(x=_-1),!O&&C){w=T;break}E++}return w||m},sM=e=>{var r=$t(e)?[]:e.toString().split(_B);return[{words:r,width:void 0}]},vpe=e=>{var{width:r,scaleToFit:n,children:a,style:i,breakAll:o,maxLines:u}=e;if((r||n)&&!qc.isSsr){var c,f,d=wB({breakAll:o,children:a,style:i});if(d){var{wordsWithComputedWidth:h,spaceWidth:m}=d;c=h,f=m}else return sM(a);return mpe({breakAll:o,children:a,maxLines:u,style:i},c,f,r,!!n)}return sM(a)},jB="#808080",gpe={angle:0,breakAll:!1,capHeight:"0.71em",fill:jB,lineHeight:"1em",scaleToFit:!1,textAnchor:"start",verticalAnchor:"end",x:0,y:0},Ak=k.forwardRef((e,r)=>{var n=gr(e,gpe),{x:a,y:i,lineHeight:o,capHeight:u,fill:c,scaleToFit:f,textAnchor:d,verticalAnchor:h}=n,m=lM(n,cpe),g=k.useMemo(()=>vpe({breakAll:m.breakAll,children:m.children,maxLines:m.maxLines,scaleToFit:f,style:m.style,width:m.width}),[m.breakAll,m.children,m.maxLines,f,m.style,m.width]),{dx:y,dy:x,angle:E,className:w,breakAll:_}=m,A=lM(m,fpe);if(!gn(a)||!gn(i)||g.length===0)return null;var O=Number(a)+(ke(y)?y:0),T=Number(i)+(ke(x)?x:0);if(!Re(O)||!Re(T))return null;var C;switch(h){case"start":C=R0("calc(".concat(u,")"));break;case"middle":C=R0("calc(".concat((g.length-1)/2," * -").concat(o," + (").concat(u," / 2))"));break;default:C=R0("calc(".concat(g.length-1," * -").concat(o,")"));break}var N=[],M=g[0];if(f&&M!=null){var R=M.width,{width:L}=m;N.push("scale(".concat(ke(L)&&ke(R)?L/R:1,")"))}return E&&N.push("rotate(".concat(E,", ").concat(O,", ").concat(T,")")),N.length&&(A.transform=N.join(" ")),k.createElement("text",vS({},sr(A),{ref:r,x:O,y:T,className:Je("recharts-text",w),textAnchor:d,fill:c.includes("url")?jB:c}),g.map((D,z)=>{var q=D.words.join(_?"":" ");return k.createElement("tspan",{x:O,dy:z===0?C:o,key:"".concat(q,"-").concat(z)},q)}))});Ak.displayName="Text";function cM(e,r){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);r&&(a=a.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,a)}return n}function Kn(e){for(var r=1;r<arguments.length;r++){var n=arguments[r]!=null?arguments[r]:{};r%2?cM(Object(n),!0).forEach(function(a){ype(e,a,n[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):cM(Object(n)).forEach(function(a){Object.defineProperty(e,a,Object.getOwnPropertyDescriptor(n,a))})}return e}function ype(e,r,n){return(r=bpe(r))in e?Object.defineProperty(e,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[r]=n,e}function bpe(e){var r=xpe(e,"string");return typeof r=="symbol"?r:r+""}function xpe(e,r){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var a=n.call(e,r);if(typeof a!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return(r==="string"?String:Number)(e)}var _pe=e=>{var{viewBox:r,position:n,offset:a=0,parentViewBox:i}=e,{x:o,y:u,height:c,upperWidth:f,lowerWidth:d}=HE(r),h=o,m=o+(f-d)/2,g=(h+m)/2,y=(f+d)/2,x=h+f/2,E=c>=0?1:-1,w=E*a,_=E>0?"end":"start",A=E>0?"start":"end",O=f>=0?1:-1,T=O*a,C=O>0?"end":"start",N=O>0?"start":"end",M=i;if(n==="top"){var R={x:h+f/2,y:u-w,horizontalAnchor:"middle",verticalAnchor:_};return M&&(R.height=Math.max(u-M.y,0),R.width=f),R}if(n==="bottom"){var L={x:m+d/2,y:u+c+w,horizontalAnchor:"middle",verticalAnchor:A};return M&&(L.height=Math.max(M.y+M.height-(u+c),0),L.width=d),L}if(n==="left"){var D={x:g-T,y:u+c/2,horizontalAnchor:C,verticalAnchor:"middle"};return M&&(D.width=Math.max(D.x-M.x,0),D.height=c),D}if(n==="right"){var z={x:g+y+T,y:u+c/2,horizontalAnchor:N,verticalAnchor:"middle"};return M&&(z.width=Math.max(M.x+M.width-z.x,0),z.height=c),z}var q=M?{width:y,height:c}:{};return n==="insideLeft"?Kn({x:g+T,y:u+c/2,horizontalAnchor:N,verticalAnchor:"middle"},q):n==="insideRight"?Kn({x:g+y-T,y:u+c/2,horizontalAnchor:C,verticalAnchor:"middle"},q):n==="insideTop"?Kn({x:h+f/2,y:u+w,horizontalAnchor:"middle",verticalAnchor:A},q):n==="insideBottom"?Kn({x:m+d/2,y:u+c-w,horizontalAnchor:"middle",verticalAnchor:_},q):n==="insideTopLeft"?Kn({x:h+T,y:u+w,horizontalAnchor:N,verticalAnchor:A},q):n==="insideTopRight"?Kn({x:h+f-T,y:u+w,horizontalAnchor:C,verticalAnchor:A},q):n==="insideBottomLeft"?Kn({x:m+T,y:u+c-w,horizontalAnchor:N,verticalAnchor:_},q):n==="insideBottomRight"?Kn({x:m+d-T,y:u+c-w,horizontalAnchor:C,verticalAnchor:_},q):n&&typeof n=="object"&&(ke(n.x)||Do(n.x))&&(ke(n.y)||Do(n.y))?Kn({x:o+Fi(n.x,y),y:u+Fi(n.y,c),horizontalAnchor:"end",verticalAnchor:"end"},q):Kn({x,y:u+c/2,horizontalAnchor:"middle",verticalAnchor:"middle"},q)},wpe=["labelRef"],Spe=["content"];function fM(e,r){if(e==null)return{};var n,a,i=Epe(e,r);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(a=0;a<o.length;a++)n=o[a],r.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function Epe(e,r){if(e==null)return{};var n={};for(var a in e)if({}.hasOwnProperty.call(e,a)){if(r.indexOf(a)!==-1)continue;n[a]=e[a]}return n}function dM(e,r){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);r&&(a=a.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,a)}return n}function Ks(e){for(var r=1;r<arguments.length;r++){var n=arguments[r]!=null?arguments[r]:{};r%2?dM(Object(n),!0).forEach(function(a){kpe(e,a,n[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):dM(Object(n)).forEach(function(a){Object.defineProperty(e,a,Object.getOwnPropertyDescriptor(n,a))})}return e}function kpe(e,r,n){return(r=jpe(r))in e?Object.defineProperty(e,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[r]=n,e}function jpe(e){var r=Ape(e,"string");return typeof r=="symbol"?r:r+""}function Ape(e,r){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var a=n.call(e,r);if(typeof a!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return(r==="string"?String:Number)(e)}function za(){return za=Object.assign?Object.assign.bind():function(e){for(var r=1;r<arguments.length;r++){var n=arguments[r];for(var a in n)({}).hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e},za.apply(null,arguments)}var AB=k.createContext(null),OB=e=>{var{x:r,y:n,upperWidth:a,lowerWidth:i,width:o,height:u,children:c}=e,f=k.useMemo(()=>({x:r,y:n,upperWidth:a,lowerWidth:i,width:o,height:u}),[r,n,a,i,o,u]);return k.createElement(AB.Provider,{value:f},c)},CB=()=>{var e=k.useContext(AB),r=Lc();return e||(r?HE(r):void 0)},Ope=k.createContext(null),Cpe=()=>{var e=k.useContext(Ope),r=je(n7);return e||r},Tpe=e=>{var{value:r,formatter:n}=e,a=$t(e.children)?r:e.children;return typeof n=="function"?n(a):a},Ok=e=>e!=null&&typeof e=="function",Npe=(e,r)=>{var n=mn(r-e),a=Math.min(Math.abs(r-e),360);return n*a},Mpe=(e,r,n,a,i)=>{var{offset:o,className:u}=e,{cx:c,cy:f,innerRadius:d,outerRadius:h,startAngle:m,endAngle:g,clockWise:y}=i,x=(d+h)/2,E=Npe(m,g),w=E>=0?1:-1,_,A;switch(r){case"insideStart":_=m+w*o,A=y;break;case"insideEnd":_=g-w*o,A=!y;break;case"end":_=g+w*o,A=y;break;default:throw new Error("Unsupported position ".concat(r))}A=E<=0?A:!A;var O=Jt(c,f,x,_),T=Jt(c,f,x,_+(A?1:-1)*359),C="M".concat(O.x,",").concat(O.y,`
172
+ A`).concat(x,",").concat(x,",0,1,").concat(A?0:1,`,
173
+ `).concat(T.x,",").concat(T.y),N=$t(e.id)?lc("recharts-radial-line-"):e.id;return k.createElement("text",za({},a,{dominantBaseline:"central",className:Je("recharts-radial-bar-label",u)}),k.createElement("defs",null,k.createElement("path",{id:N,d:C})),k.createElement("textPath",{xlinkHref:"#".concat(N)},n))},Ppe=(e,r,n)=>{var{cx:a,cy:i,innerRadius:o,outerRadius:u,startAngle:c,endAngle:f}=e,d=(c+f)/2;if(n==="outside"){var{x:h,y:m}=Jt(a,i,u+r,d);return{x:h,y:m,textAnchor:h>=a?"start":"end",verticalAnchor:"middle"}}if(n==="center")return{x:a,y:i,textAnchor:"middle",verticalAnchor:"middle"};if(n==="centerTop")return{x:a,y:i,textAnchor:"middle",verticalAnchor:"start"};if(n==="centerBottom")return{x:a,y:i,textAnchor:"middle",verticalAnchor:"end"};var g=(o+u)/2,{x:y,y:x}=Jt(a,i,g,d);return{x:y,y:x,textAnchor:"middle",verticalAnchor:"middle"}},th=e=>e!=null&&"cx"in e&&ke(e.cx),Rpe={angle:0,offset:5,zIndex:ur.label,position:"middle",textBreakAll:!1};function Dpe(e){if(!th(e))return e;var{cx:r,cy:n,outerRadius:a}=e,i=a*2;return{x:r-a,y:n-a,width:i,upperWidth:i,lowerWidth:i,height:i}}function zi(e){var r=gr(e,Rpe),{viewBox:n,parentViewBox:a,position:i,value:o,children:u,content:c,className:f="",textBreakAll:d,labelRef:h}=r,m=Cpe(),g=CB(),y=i==="center"?g:m??g,x,E,w;n==null?x=y:th(n)?x=n:x=HE(n);var _=Dpe(x);if(!x||$t(o)&&$t(u)&&!k.isValidElement(c)&&typeof c!="function")return null;var A=Ks(Ks({},r),{},{viewBox:x});if(k.isValidElement(c)){var{labelRef:O}=A,T=fM(A,wpe);return k.cloneElement(c,T)}if(typeof c=="function"){var{content:C}=A,N=fM(A,Spe);if(E=k.createElement(c,N),k.isValidElement(E))return E}else E=Tpe(r);var M=sr(r);if(th(x)){if(i==="insideStart"||i==="insideEnd"||i==="end")return Mpe(r,i,E,M,x);w=Ppe(x,r.offset,r.position)}else{if(!_)return null;var R=_pe({viewBox:_,position:i,offset:r.offset,parentViewBox:th(a)?void 0:a});w=Ks(Ks({x:R.x,y:R.y,textAnchor:R.horizontalAnchor,verticalAnchor:R.verticalAnchor},R.width!==void 0?{width:R.width}:{}),R.height!==void 0?{height:R.height}:{})}return k.createElement(da,{zIndex:r.zIndex},k.createElement(Ak,za({ref:h,className:Je("recharts-label",f)},M,w,{textAnchor:SB(M.textAnchor)?M.textAnchor:w.textAnchor,breakAll:d}),E))}zi.displayName="Label";var Lpe=(e,r,n)=>{if(!e)return null;var a={viewBox:r,labelRef:n};return e===!0?k.createElement(zi,za({key:"label-implicit"},a)):gn(e)?k.createElement(zi,za({key:"label-implicit",value:e},a)):k.isValidElement(e)?e.type===zi?k.cloneElement(e,Ks({key:"label-implicit"},a)):k.createElement(zi,za({key:"label-implicit",content:e},a)):Ok(e)?k.createElement(zi,za({key:"label-implicit",content:e},a)):e&&typeof e=="object"?k.createElement(zi,za({},e,{key:"label-implicit"},a)):null};function TB(e){var{label:r,labelRef:n}=e,a=CB();return Lpe(r,a,n)||null}var Ipe=["valueAccessor"],zpe=["dataKey","clockWise","id","textBreakAll","zIndex"];function lp(){return lp=Object.assign?Object.assign.bind():function(e){for(var r=1;r<arguments.length;r++){var n=arguments[r];for(var a in n)({}).hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e},lp.apply(null,arguments)}function hM(e,r){if(e==null)return{};var n,a,i=qpe(e,r);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(a=0;a<o.length;a++)n=o[a],r.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function qpe(e,r){if(e==null)return{};var n={};for(var a in e)if({}.hasOwnProperty.call(e,a)){if(r.indexOf(a)!==-1)continue;n[a]=e[a]}return n}var Bpe=e=>{var r=Array.isArray(e.value)?e.value[e.value.length-1]:e.value;if(hpe(r))return r},NB=k.createContext(void 0),$pe=NB.Provider,MB=k.createContext(void 0);MB.Provider;function Upe(){return k.useContext(NB)}function Fpe(){return k.useContext(MB)}function rh(e){var{valueAccessor:r=Bpe}=e,n=hM(e,Ipe),{dataKey:a,clockWise:i,id:o,textBreakAll:u,zIndex:c}=n,f=hM(n,zpe),d=Upe(),h=Fpe(),m=d||h;return!m||!m.length?null:k.createElement(da,{zIndex:c??ur.label},k.createElement(oa,{className:"recharts-label-list"},m.map((g,y)=>{var x,E=$t(a)?r(g,y):er(g.payload,a),w=$t(o)?{}:{id:"".concat(o,"-").concat(y)};return k.createElement(zi,lp({key:"label-".concat(y)},sr(g),f,w,{fill:(x=n.fill)!==null&&x!==void 0?x:g.fill,parentViewBox:g.parentViewBox,value:E,textBreakAll:u,viewBox:g.viewBox,index:y,zIndex:0}))})))}rh.displayName="LabelList";function Hpe(e){var{label:r}=e;return r?r===!0?k.createElement(rh,{key:"labelList-implicit"}):k.isValidElement(r)||Ok(r)?k.createElement(rh,{key:"labelList-implicit",content:r}):typeof r=="object"?k.createElement(rh,lp({key:"labelList-implicit"},r,{type:String(r.type)})):null:null}function gS(){return gS=Object.assign?Object.assign.bind():function(e){for(var r=1;r<arguments.length;r++){var n=arguments[r];for(var a in n)({}).hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e},gS.apply(null,arguments)}var PB=e=>{var{cx:r,cy:n,r:a,className:i}=e,o=Je("recharts-dot",i);return ke(r)&&ke(n)&&ke(a)?k.createElement("circle",gS({},ia(e),RE(e),{className:o,cx:r,cy:n,r:a})):null},Gpe={radiusAxis:{},angleAxis:{}},RB=cr({name:"polarAxis",initialState:Gpe,reducers:{addRadiusAxis(e,r){e.radiusAxis[r.payload.id]=r.payload},removeRadiusAxis(e,r){delete e.radiusAxis[r.payload.id]},addAngleAxis(e,r){e.angleAxis[r.payload.id]=r.payload},removeAngleAxis(e,r){delete e.angleAxis[r.payload.id]}}}),{addRadiusAxis:T_e,removeRadiusAxis:N_e,addAngleAxis:M_e,removeAngleAxis:P_e}=RB.actions,Kpe=RB.reducer;function Vpe(e){return e&&typeof e=="object"&&"className"in e&&typeof e.className=="string"?e.className:""}var D0={exports:{}},Qe={};/** @license React v17.0.2
174
+ * react-is.production.min.js
175
+ *
176
+ * Copyright (c) Facebook, Inc. and its affiliates.
177
+ *
178
+ * This source code is licensed under the MIT license found in the
179
+ * LICENSE file in the root directory of this source tree.
180
+ */var pM;function Ype(){if(pM)return Qe;pM=1;var e=60103,r=60106,n=60107,a=60108,i=60114,o=60109,u=60110,c=60112,f=60113,d=60120,h=60115,m=60116,g=60121,y=60122,x=60117,E=60129,w=60131;if(typeof Symbol=="function"&&Symbol.for){var _=Symbol.for;e=_("react.element"),r=_("react.portal"),n=_("react.fragment"),a=_("react.strict_mode"),i=_("react.profiler"),o=_("react.provider"),u=_("react.context"),c=_("react.forward_ref"),f=_("react.suspense"),d=_("react.suspense_list"),h=_("react.memo"),m=_("react.lazy"),g=_("react.block"),y=_("react.server.block"),x=_("react.fundamental"),E=_("react.debug_trace_mode"),w=_("react.legacy_hidden")}function A(G){if(typeof G=="object"&&G!==null){var U=G.$$typeof;switch(U){case e:switch(G=G.type,G){case n:case i:case a:case f:case d:return G;default:switch(G=G&&G.$$typeof,G){case u:case c:case m:case h:case o:return G;default:return U}}case r:return U}}}var O=o,T=e,C=c,N=n,M=m,R=h,L=r,D=i,z=a,q=f;return Qe.ContextConsumer=u,Qe.ContextProvider=O,Qe.Element=T,Qe.ForwardRef=C,Qe.Fragment=N,Qe.Lazy=M,Qe.Memo=R,Qe.Portal=L,Qe.Profiler=D,Qe.StrictMode=z,Qe.Suspense=q,Qe.isAsyncMode=function(){return!1},Qe.isConcurrentMode=function(){return!1},Qe.isContextConsumer=function(G){return A(G)===u},Qe.isContextProvider=function(G){return A(G)===o},Qe.isElement=function(G){return typeof G=="object"&&G!==null&&G.$$typeof===e},Qe.isForwardRef=function(G){return A(G)===c},Qe.isFragment=function(G){return A(G)===n},Qe.isLazy=function(G){return A(G)===m},Qe.isMemo=function(G){return A(G)===h},Qe.isPortal=function(G){return A(G)===r},Qe.isProfiler=function(G){return A(G)===i},Qe.isStrictMode=function(G){return A(G)===a},Qe.isSuspense=function(G){return A(G)===f},Qe.isValidElementType=function(G){return typeof G=="string"||typeof G=="function"||G===n||G===i||G===E||G===a||G===f||G===d||G===w||typeof G=="object"&&G!==null&&(G.$$typeof===m||G.$$typeof===h||G.$$typeof===o||G.$$typeof===u||G.$$typeof===c||G.$$typeof===x||G.$$typeof===g||G[0]===y)},Qe.typeOf=A,Qe}var mM;function Xpe(){return mM||(mM=1,D0.exports=Ype()),D0.exports}Xpe();var DB=e=>e&&typeof e=="object"&&"clipDot"in e?!!e.clipDot:!0,L0={},vM;function Wpe(){return vM||(vM=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function r(n){var i;if(typeof n!="object"||n==null)return!1;if(Object.getPrototypeOf(n)===null)return!0;if(Object.prototype.toString.call(n)!=="[object Object]"){const o=n[Symbol.toStringTag];return o==null||!((i=Object.getOwnPropertyDescriptor(n,Symbol.toStringTag))!=null&&i.writable)?!1:n.toString()===`[object ${o}]`}let a=n;for(;Object.getPrototypeOf(a)!==null;)a=Object.getPrototypeOf(a);return Object.getPrototypeOf(n)===a}e.isPlainObject=r})(L0)),L0}var I0,gM;function Zpe(){return gM||(gM=1,I0=Wpe().isPlainObject),I0}var Qpe=Zpe();const Jpe=Dn(Qpe);var yM,bM,xM,_M,wM;function SM(e,r){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);r&&(a=a.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,a)}return n}function EM(e){for(var r=1;r<arguments.length;r++){var n=arguments[r]!=null?arguments[r]:{};r%2?SM(Object(n),!0).forEach(function(a){eme(e,a,n[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):SM(Object(n)).forEach(function(a){Object.defineProperty(e,a,Object.getOwnPropertyDescriptor(n,a))})}return e}function eme(e,r,n){return(r=tme(r))in e?Object.defineProperty(e,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[r]=n,e}function tme(e){var r=rme(e,"string");return typeof r=="symbol"?r:r+""}function rme(e,r){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var a=n.call(e,r);if(typeof a!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return(r==="string"?String:Number)(e)}function up(){return up=Object.assign?Object.assign.bind():function(e){for(var r=1;r<arguments.length;r++){var n=arguments[r];for(var a in n)({}).hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e},up.apply(null,arguments)}function Ls(e,r){return r||(r=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(r)}}))}var kM=(e,r,n,a,i)=>{var o=n-a,u;return u=xt(yM||(yM=Ls(["M ",",",""])),e,r),u+=xt(bM||(bM=Ls(["L ",",",""])),e+n,r),u+=xt(xM||(xM=Ls(["L ",",",""])),e+n-o/2,r+i),u+=xt(_M||(_M=Ls(["L ",",",""])),e+n-o/2-a,r+i),u+=xt(wM||(wM=Ls(["L ",","," Z"])),e,r),u},nme={x:0,y:0,upperWidth:0,lowerWidth:0,height:0,isUpdateAnimationActive:!1,animationBegin:0,animationDuration:1500,animationEasing:"ease"},ame=e=>{var r=gr(e,nme),{x:n,y:a,upperWidth:i,lowerWidth:o,height:u,className:c}=r,{animationEasing:f,animationDuration:d,animationBegin:h,isUpdateAnimationActive:m}=r,g=k.useRef(null),[y,x]=k.useState(-1),E=k.useRef(i),w=k.useRef(o),_=k.useRef(u),A=k.useRef(n),O=k.useRef(a),T=YE(e,"trapezoid-");if(k.useEffect(()=>{if(g.current&&g.current.getTotalLength)try{var U=g.current.getTotalLength();U&&x(U)}catch{}},[]),n!==+n||a!==+a||i!==+i||o!==+o||u!==+u||i===0&&o===0||u===0)return null;var C=Je("recharts-trapezoid",c);if(!m)return k.createElement("g",null,k.createElement("path",up({},sr(r),{className:C,d:kM(n,a,i,o,u)})));var N=E.current,M=w.current,R=_.current,L=A.current,D=O.current,z="0px ".concat(y===-1?1:y,"px"),q="".concat(y,"px ").concat(y,"px"),G=Nq(["strokeDasharray"],d,f);return k.createElement(VE,{animationId:T,key:T,canBegin:y>0,duration:d,easing:f,isActive:m,begin:h},U=>{var Y=Or(N,i,U),$=Or(M,o,U),J=Or(R,u,U),re=Or(L,n,U),oe=Or(D,a,U);g.current&&(E.current=Y,w.current=$,_.current=J,A.current=re,O.current=oe);var fe=U>0?{transition:G,strokeDasharray:q}:{strokeDasharray:z};return k.createElement("path",up({},sr(r),{className:C,d:kM(re,oe,Y,$,J),ref:g,style:EM(EM({},fe),r.style)}))})},ime=["option","shapeType","activeClassName","inActiveClassName"];function ome(e,r){if(e==null)return{};var n,a,i=lme(e,r);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(a=0;a<o.length;a++)n=o[a],r.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function lme(e,r){if(e==null)return{};var n={};for(var a in e)if({}.hasOwnProperty.call(e,a)){if(r.indexOf(a)!==-1)continue;n[a]=e[a]}return n}function jM(e,r){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);r&&(a=a.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,a)}return n}function sp(e){for(var r=1;r<arguments.length;r++){var n=arguments[r]!=null?arguments[r]:{};r%2?jM(Object(n),!0).forEach(function(a){ume(e,a,n[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):jM(Object(n)).forEach(function(a){Object.defineProperty(e,a,Object.getOwnPropertyDescriptor(n,a))})}return e}function ume(e,r,n){return(r=sme(r))in e?Object.defineProperty(e,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[r]=n,e}function sme(e){var r=cme(e,"string");return typeof r=="symbol"?r:r+""}function cme(e,r){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var a=n.call(e,r);if(typeof a!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return(r==="string"?String:Number)(e)}function fme(e,r){return sp(sp({},r),e)}function dme(e,r){return e==="symbols"}function AM(e){var{shapeType:r,elementProps:n}=e;switch(r){case"rectangle":return k.createElement(Dq,n);case"trapezoid":return k.createElement(ame,n);case"sector":return k.createElement(zq,n);case"symbols":if(dme(r))return k.createElement(gz,n);break;case"curve":return k.createElement(Tq,n);default:return null}}function hme(e){return k.isValidElement(e)?e.props:e}function pme(e){var{option:r,shapeType:n,activeClassName:a="recharts-active-shape",inActiveClassName:i="recharts-shape"}=e,o=ome(e,ime),u;if(k.isValidElement(r))u=k.cloneElement(r,sp(sp({},o),hme(r)));else if(typeof r=="function")u=r(o,o.index);else if(Jpe(r)&&typeof r!="boolean"){var c=fme(r,o);u=k.createElement(AM,{shapeType:n,elementProps:c})}else{var f=o;u=k.createElement(AM,{shapeType:n,elementProps:f})}return o.isActive?k.createElement(oa,{className:a},u):k.createElement(oa,{className:i},u)}function mme(e){var{tooltipEntrySettings:r}=e,n=Et(),a=yr(),i=k.useRef(null);return k.useLayoutEffect(()=>{a||(i.current===null?n(kfe(r)):i.current!==r&&n(jfe({prev:i.current,next:r})),i.current=r)},[r,n,a]),k.useLayoutEffect(()=>()=>{i.current&&(n(Afe(i.current)),i.current=null)},[n]),null}function vme(e){var{legendPayload:r}=e,n=Et(),a=yr(),i=k.useRef(null);return k.useLayoutEffect(()=>{a||(i.current===null?n(aue(r)):i.current!==r&&n(iue({prev:i.current,next:r})),i.current=r)},[n,a,r]),k.useLayoutEffect(()=>()=>{i.current&&(n(oue(i.current)),i.current=null)},[n]),null}var z0,gme=()=>{var[e]=k.useState(()=>lc("uid-"));return e},yme=(z0=qH.useId)!==null&&z0!==void 0?z0:gme;function bme(e,r){var n=yme();return r||(e?"".concat(e,"-").concat(n):n)}var xme=k.createContext(void 0),_me=e=>{var{id:r,type:n,children:a}=e,i=bme("recharts-".concat(n),r);return k.createElement(xme.Provider,{value:i},a(i))},wme={cartesianItems:[],polarItems:[]},LB=cr({name:"graphicalItems",initialState:wme,reducers:{addCartesianGraphicalItem:{reducer(e,r){e.cartesianItems.push(r.payload)},prepare:ut()},replaceCartesianGraphicalItem:{reducer(e,r){var{prev:n,next:a}=r.payload,i=vn(e).cartesianItems.indexOf(n);i>-1&&(e.cartesianItems[i]=a)},prepare:ut()},removeCartesianGraphicalItem:{reducer(e,r){var n=vn(e).cartesianItems.indexOf(r.payload);n>-1&&e.cartesianItems.splice(n,1)},prepare:ut()},addPolarGraphicalItem:{reducer(e,r){e.polarItems.push(r.payload)},prepare:ut()},removePolarGraphicalItem:{reducer(e,r){var n=vn(e).polarItems.indexOf(r.payload);n>-1&&e.polarItems.splice(n,1)},prepare:ut()},replacePolarGraphicalItem:{reducer(e,r){var{prev:n,next:a}=r.payload,i=vn(e).polarItems.indexOf(n);i>-1&&(e.polarItems[i]=a)},prepare:ut()}}}),{addCartesianGraphicalItem:Sme,replaceCartesianGraphicalItem:Eme,removeCartesianGraphicalItem:kme,addPolarGraphicalItem:R_e,removePolarGraphicalItem:D_e,replacePolarGraphicalItem:L_e}=LB.actions,jme=LB.reducer,Ame=e=>{var r=Et(),n=k.useRef(null);return k.useLayoutEffect(()=>{n.current===null?r(Sme(e)):n.current!==e&&r(Eme({prev:n.current,next:e})),n.current=e},[r,e]),k.useLayoutEffect(()=>()=>{n.current&&(r(kme(n.current)),n.current=null)},[r]),null},Ome=k.memo(Ame),Cme=["points"];function OM(e,r){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);r&&(a=a.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,a)}return n}function q0(e){for(var r=1;r<arguments.length;r++){var n=arguments[r]!=null?arguments[r]:{};r%2?OM(Object(n),!0).forEach(function(a){Tme(e,a,n[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):OM(Object(n)).forEach(function(a){Object.defineProperty(e,a,Object.getOwnPropertyDescriptor(n,a))})}return e}function Tme(e,r,n){return(r=Nme(r))in e?Object.defineProperty(e,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[r]=n,e}function Nme(e){var r=Mme(e,"string");return typeof r=="symbol"?r:r+""}function Mme(e,r){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var a=n.call(e,r);if(typeof a!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return(r==="string"?String:Number)(e)}function cp(){return cp=Object.assign?Object.assign.bind():function(e){for(var r=1;r<arguments.length;r++){var n=arguments[r];for(var a in n)({}).hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e},cp.apply(null,arguments)}function Pme(e,r){if(e==null)return{};var n,a,i=Rme(e,r);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(a=0;a<o.length;a++)n=o[a],r.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function Rme(e,r){if(e==null)return{};var n={};for(var a in e)if({}.hasOwnProperty.call(e,a)){if(r.indexOf(a)!==-1)continue;n[a]=e[a]}return n}function Dme(e){var{option:r,dotProps:n,className:a}=e;if(k.isValidElement(r))return k.cloneElement(r,n);if(typeof r=="function")return r(n);var i=Je(a,typeof r!="boolean"?r.className:""),o=n??{},{points:u}=o,c=Pme(o,Cme);return k.createElement(PB,cp({},c,{className:i}))}function Lme(e,r){return e==null?!1:r?!0:e.length===1}function Ime(e){var{points:r,dot:n,className:a,dotClassName:i,dataKey:o,baseProps:u,needClip:c,clipPathId:f,zIndex:d=ur.scatter}=e;if(!Lme(r,n))return null;var h=DB(n),m=Wne(n),g=r.map((x,E)=>{var w,_,A=q0(q0(q0({r:3},u),m),{},{index:E,cx:(w=x.x)!==null&&w!==void 0?w:void 0,cy:(_=x.y)!==null&&_!==void 0?_:void 0,dataKey:o,value:x.value,payload:x.payload,points:r});return k.createElement(Dme,{key:"dot-".concat(E),option:n,dotProps:A,className:i})}),y={};return c&&f!=null&&(y.clipPath="url(#clipPath-".concat(h?"":"dots-").concat(f,")")),k.createElement(da,{zIndex:d},k.createElement(oa,cp({className:a},y),g))}function CM(e,r){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);r&&(a=a.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,a)}return n}function TM(e){for(var r=1;r<arguments.length;r++){var n=arguments[r]!=null?arguments[r]:{};r%2?CM(Object(n),!0).forEach(function(a){zme(e,a,n[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):CM(Object(n)).forEach(function(a){Object.defineProperty(e,a,Object.getOwnPropertyDescriptor(n,a))})}return e}function zme(e,r,n){return(r=qme(r))in e?Object.defineProperty(e,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[r]=n,e}function qme(e){var r=Bme(e,"string");return typeof r=="symbol"?r:r+""}function Bme(e,r){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var a=n.call(e,r);if(typeof a!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return(r==="string"?String:Number)(e)}var $me={xAxis:{},yAxis:{},zAxis:{}},IB=cr({name:"cartesianAxis",initialState:$me,reducers:{addXAxis:{reducer(e,r){e.xAxis[r.payload.id]=r.payload},prepare:ut()},replaceXAxis:{reducer(e,r){var{prev:n,next:a}=r.payload;e.xAxis[n.id]!==void 0&&(n.id!==a.id&&delete e.xAxis[n.id],e.xAxis[a.id]=a)},prepare:ut()},removeXAxis:{reducer(e,r){delete e.xAxis[r.payload.id]},prepare:ut()},addYAxis:{reducer(e,r){e.yAxis[r.payload.id]=r.payload},prepare:ut()},replaceYAxis:{reducer(e,r){var{prev:n,next:a}=r.payload;e.yAxis[n.id]!==void 0&&(n.id!==a.id&&delete e.yAxis[n.id],e.yAxis[a.id]=a)},prepare:ut()},removeYAxis:{reducer(e,r){delete e.yAxis[r.payload.id]},prepare:ut()},addZAxis:{reducer(e,r){e.zAxis[r.payload.id]=r.payload},prepare:ut()},replaceZAxis:{reducer(e,r){var{prev:n,next:a}=r.payload;e.zAxis[n.id]!==void 0&&(n.id!==a.id&&delete e.zAxis[n.id],e.zAxis[a.id]=a)},prepare:ut()},removeZAxis:{reducer(e,r){delete e.zAxis[r.payload.id]},prepare:ut()},updateYAxisWidth(e,r){var{id:n,width:a}=r.payload,i=e.yAxis[n];if(i){var o,u=i.widthHistory||[];if(u.length===3&&u[0]===u[2]&&a===u[1]&&a!==i.width&&Math.abs(a-((o=u[0])!==null&&o!==void 0?o:0))<=1)return;var c=[...u,a].slice(-3);e.yAxis[n]=TM(TM({},i),{},{width:a,widthHistory:c})}}}}),{addXAxis:Ume,replaceXAxis:Fme,removeXAxis:Hme,addYAxis:Gme,replaceYAxis:Kme,removeYAxis:Vme,addZAxis:I_e,replaceZAxis:z_e,removeZAxis:q_e,updateYAxisWidth:Yme}=IB.actions,Xme=IB.reducer,Wme=ue([rr],e=>({top:e.top,bottom:e.bottom,left:e.left,right:e.right})),Zme=ue([Wme,ri,ni],(e,r,n)=>{if(!(!e||r==null||n==null))return{x:e.left,y:e.top,width:Math.max(0,r-e.left-e.right),height:Math.max(0,n-e.top-e.bottom)}}),Ck=()=>je(Zme),Qme=()=>je(kde);function NM(e,r){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);r&&(a=a.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,a)}return n}function B0(e){for(var r=1;r<arguments.length;r++){var n=arguments[r]!=null?arguments[r]:{};r%2?NM(Object(n),!0).forEach(function(a){Jme(e,a,n[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):NM(Object(n)).forEach(function(a){Object.defineProperty(e,a,Object.getOwnPropertyDescriptor(n,a))})}return e}function Jme(e,r,n){return(r=eve(r))in e?Object.defineProperty(e,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[r]=n,e}function eve(e){var r=tve(e,"string");return typeof r=="symbol"?r:r+""}function tve(e,r){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var a=n.call(e,r);if(typeof a!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return(r==="string"?String:Number)(e)}var rve=e=>{var{point:r,childIndex:n,mainColor:a,activeDot:i,dataKey:o,clipPath:u}=e;if(i===!1||r.x==null||r.y==null)return null;var c={index:n,dataKey:o,cx:r.x,cy:r.y,r:4,fill:a??"none",strokeWidth:2,stroke:"#fff",payload:r.payload,value:r.value},f=B0(B0(B0({},c),Pp(i)),RE(i)),d;return k.isValidElement(i)?d=k.cloneElement(i,f):typeof i=="function"?d=i(f):d=k.createElement(PB,f),k.createElement(oa,{className:"recharts-active-dot",clipPath:u},d)};function nve(e){var{points:r,mainColor:n,activeDot:a,itemDataKey:i,clipPath:o,zIndex:u=ur.activeDot}=e,c=je(vc),f=Qme();if(r==null||f==null)return null;var d=r.find(h=>f.includes(h.payload));return $t(d)?null:k.createElement(da,{zIndex:u},k.createElement(rve,{point:d,childIndex:Number(c),mainColor:n,dataKey:i,activeDot:a,clipPath:o}))}var ave=e=>{var{chartData:r}=e,n=Et(),a=yr();return k.useEffect(()=>a?()=>{}:(n(X4(r)),()=>{n(X4(void 0))}),[r,n,a]),null},MM={x:0,y:0,width:0,height:0,padding:{top:0,right:0,bottom:0,left:0}},zB=cr({name:"brush",initialState:MM,reducers:{setBrushSettings(e,r){return r.payload==null?MM:r.payload}}}),{setBrushSettings:B_e}=zB.actions,ive=zB.reducer,ove=(e,r)=>{var{x:n,y:a}=e,{x:i,y:o}=r;return{x:Math.min(n,i),y:Math.min(a,o),width:Math.abs(i-n),height:Math.abs(o-a)}},lve=e=>{var{x1:r,y1:n,x2:a,y2:i}=e;return ove({x:r,y:n},{x:a,y:i})};function uve(e){return(e%180+180)%180}var sve=function(r){var{width:n,height:a}=r,i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,o=uve(i),u=o*Math.PI/180,c=Math.atan(a/n),f=u>c&&u<Math.PI-c?a/Math.sin(u):n/Math.cos(u);return Math.abs(f)},cve={dots:[],areas:[],lines:[]},qB=cr({name:"referenceElements",initialState:cve,reducers:{addDot:(e,r)=>{e.dots.push(r.payload)},removeDot:(e,r)=>{var n=vn(e).dots.findIndex(a=>a===r.payload);n!==-1&&e.dots.splice(n,1)},addArea:(e,r)=>{e.areas.push(r.payload)},removeArea:(e,r)=>{var n=vn(e).areas.findIndex(a=>a===r.payload);n!==-1&&e.areas.splice(n,1)},addLine:(e,r)=>{e.lines.push(r.payload)},removeLine:(e,r)=>{var n=vn(e).lines.findIndex(a=>a===r.payload);n!==-1&&e.lines.splice(n,1)}}}),{addDot:$_e,removeDot:U_e,addArea:F_e,removeArea:H_e,addLine:fve,removeLine:dve}=qB.actions,hve=qB.reducer,BB=k.createContext(void 0),pve=e=>{var{children:r}=e,[n]=k.useState("".concat(lc("recharts"),"-clip")),a=Ck();if(a==null)return null;var{x:i,y:o,width:u,height:c}=a;return k.createElement(BB.Provider,{value:n},k.createElement("defs",null,k.createElement("clipPath",{id:n},k.createElement("rect",{x:i,y:o,height:c,width:u}))),r)},mve=()=>k.useContext(BB);class vve{constructor(r){var{x:n,y:a}=r;this.xAxisScale=n,this.yAxisScale=a}map(r,n){var a,i,{position:o}=n;return{x:(a=this.xAxisScale.map(r.x,{position:o}))!==null&&a!==void 0?a:0,y:(i=this.yAxisScale.map(r.y,{position:o}))!==null&&i!==void 0?i:0}}mapWithFallback(r,n){var a,i,{position:o,fallback:u}=n,c,f;return u==="rangeMin"?c=this.yAxisScale.rangeMin():u==="rangeMax"?c=this.yAxisScale.rangeMax():c=0,u==="rangeMin"?f=this.xAxisScale.rangeMin():u==="rangeMax"?f=this.xAxisScale.rangeMax():f=0,{x:(a=this.xAxisScale.map(r.x,{position:o}))!==null&&a!==void 0?a:f,y:(i=this.yAxisScale.map(r.y,{position:o}))!==null&&i!==void 0?i:c}}isInRange(r){var{x:n,y:a}=r,i=n==null||this.xAxisScale.isInRange(n),o=a==null||this.yAxisScale.isInRange(a);return i&&o}}function PM(e,r){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);r&&(a=a.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,a)}return n}function RM(e){for(var r=1;r<arguments.length;r++){var n=arguments[r]!=null?arguments[r]:{};r%2?PM(Object(n),!0).forEach(function(a){gve(e,a,n[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):PM(Object(n)).forEach(function(a){Object.defineProperty(e,a,Object.getOwnPropertyDescriptor(n,a))})}return e}function gve(e,r,n){return(r=yve(r))in e?Object.defineProperty(e,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[r]=n,e}function yve(e){var r=bve(e,"string");return typeof r=="symbol"?r:r+""}function bve(e,r){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var a=n.call(e,r);if(typeof a!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return(r==="string"?String:Number)(e)}function fp(){return fp=Object.assign?Object.assign.bind():function(e){for(var r=1;r<arguments.length;r++){var n=arguments[r];for(var a in n)({}).hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e},fp.apply(null,arguments)}var xve=(e,r)=>{var n;if(k.isValidElement(e))n=k.cloneElement(e,r);else if(typeof e=="function")n=e(r);else{if(!Re(r.x1)||!Re(r.y1)||!Re(r.x2)||!Re(r.y2))return null;n=k.createElement("line",fp({},r,{className:"recharts-reference-line-line"}))}return n},_ve=(e,r,n,a,i,o)=>{var{x:u,width:c}=o,f=i.map(e,{position:n});if(!Re(f)||r==="discard"&&!i.isInRange(f))return null;var d=[{x:u+c,y:f},{x:u,y:f}];return a==="left"?d.reverse():d},wve=(e,r,n,a,i,o)=>{var{y:u,height:c}=o,f=i.map(e,{position:n});if(!Re(f)||r==="discard"&&!i.isInRange(f))return null;var d=[{x:f,y:u+c},{x:f,y:u}];return a==="top"?d.reverse():d},Sve=(e,r,n,a)=>{var i=[a.mapWithFallback(e[0],{position:n,fallback:"rangeMin"}),a.mapWithFallback(e[1],{position:n,fallback:"rangeMax"})];return r==="discard"&&i.some(o=>!a.isInRange(o))?null:i},Eve=(e,r,n,a,i,o,u)=>{var{x:c,y:f,segment:d,ifOverflow:h}=u,m=gn(c),g=gn(f);return g?_ve(f,h,a,o,r,n):m?wve(c,h,a,i,e,n):d!=null&&d.length===2?Sve(d,h,a,new vve({x:e,y:r})):null};function kve(e){var r=Et();return k.useEffect(()=>(r(fve(e)),()=>{r(dve(e))})),null}function jve(e){var{xAxisId:r,yAxisId:n,shape:a,className:i,ifOverflow:o}=e,u=yr(),c=mve(),f=je(M=>ca(M,r)),d=je(M=>fa(M,n)),h=je(M=>au(M,"xAxis",r,u)),m=je(M=>au(M,"yAxis",n,u)),g=Lc();if(!c||!g||f==null||d==null||h==null||m==null)return null;var y=Eve(h,m,g,e.position,f.orientation,d.orientation,e);if(!y)return null;var x=y[0],E=y[1];if(x==null||E==null)return null;var{x:w,y:_}=x,{x:A,y:O}=E,T=o==="hidden"?"url(#".concat(c,")"):void 0,C=RM(RM({clipPath:T},sr(e)),{},{x1:w,y1:_,x2:A,y2:O}),N=lve({x1:w,y1:_,x2:A,y2:O});return k.createElement(da,{zIndex:e.zIndex},k.createElement(oa,{className:Je("recharts-reference-line",i)},xve(a,C),k.createElement(OB,fp({},N,{lowerWidth:N.width,upperWidth:N.width}),k.createElement(TB,{label:e.label}),e.children)))}var Ave={ifOverflow:"discard",xAxisId:0,yAxisId:0,fill:"none",label:!1,stroke:"#ccc",fillOpacity:1,strokeWidth:1,position:"middle",zIndex:ur.line};function yS(e){var r=gr(e,Ave);return k.createElement(k.Fragment,null,k.createElement(kve,{yAxisId:r.yAxisId,xAxisId:r.xAxisId,ifOverflow:r.ifOverflow,x:r.x,y:r.y,segment:r.segment}),k.createElement(jve,r))}yS.displayName="ReferenceLine";function $B(e,r){if(r<1)return[];if(r===1)return e;for(var n=[],a=0;a<e.length;a+=r){var i=e[a];i!==void 0&&n.push(i)}return n}function Ove(e,r,n){var a={width:e.width+r.width,height:e.height+r.height};return sve(a,n)}function Cve(e,r,n){var a=n==="width",{x:i,y:o,width:u,height:c}=e;return r===1?{start:a?i:o,end:a?i+u:o+c}:{start:a?i+u:o+c,end:a?i:o}}function yc(e,r,n,a,i){if(e*r<e*a||e*r>e*i)return!1;var o=n();return e*(r-e*o/2-a)>=0&&e*(r+e*o/2-i)<=0}function Tve(e,r){return $B(e,r+1)}function Nve(e,r,n,a,i){for(var o=(a||[]).slice(),{start:u,end:c}=r,f=0,d=1,h=u,m=function(){var x=a==null?void 0:a[f];if(x===void 0)return{v:$B(a,d)};var E=f,w,_=()=>(w===void 0&&(w=n(x,E)),w),A=x.coordinate,O=f===0||yc(e,A,_,h,c);O||(f=0,h=u,d+=1),O&&(h=A+e*(_()/2+i),f+=d)},g;d<=o.length;)if(g=m(),g)return g.v;return[]}function Mve(e,r,n,a,i){var o=(a||[]).slice(),u=o.length;if(u===0)return[];for(var{start:c,end:f}=r,d=1;d<=u;d++){for(var h=(u-1)%d,m=c,g=!0,y=function(){var T=a[E];if(T==null)return 0;var C=E,N,M=()=>(N===void 0&&(N=n(T,C)),N),R=T.coordinate,L=E===h||yc(e,R,M,m,f);if(!L)return g=!1,1;L&&(m=R+e*(M()/2+i))},x,E=h;E<u&&(x=y(),!(x!==0&&x===1));E+=d);if(g){for(var w=[],_=h;_<u;_+=d){var A=a[_];A!=null&&w.push(A)}return w}}return[]}function DM(e,r){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);r&&(a=a.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,a)}return n}function or(e){for(var r=1;r<arguments.length;r++){var n=arguments[r]!=null?arguments[r]:{};r%2?DM(Object(n),!0).forEach(function(a){Pve(e,a,n[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):DM(Object(n)).forEach(function(a){Object.defineProperty(e,a,Object.getOwnPropertyDescriptor(n,a))})}return e}function Pve(e,r,n){return(r=Rve(r))in e?Object.defineProperty(e,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[r]=n,e}function Rve(e){var r=Dve(e,"string");return typeof r=="symbol"?r:r+""}function Dve(e,r){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var a=n.call(e,r);if(typeof a!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return(r==="string"?String:Number)(e)}function Lve(e,r,n,a,i){for(var o=(a||[]).slice(),u=o.length,{start:c}=r,{end:f}=r,d=function(g){var y=o[g];if(y==null)return 1;var x=y,E,w=()=>(E===void 0&&(E=n(y,g)),E);if(g===u-1){var _=e*(x.coordinate+e*w()/2-f);o[g]=x=or(or({},x),{},{tickCoord:_>0?x.coordinate-_*e:x.coordinate})}else o[g]=x=or(or({},x),{},{tickCoord:x.coordinate});if(x.tickCoord!=null){var A=yc(e,x.tickCoord,w,c,f);A&&(f=x.tickCoord-e*(w()/2+i),o[g]=or(or({},x),{},{isShow:!0}))}},h=u-1;h>=0;h--)d(h);return o}function Ive(e,r,n,a,i,o){var u=(a||[]).slice(),c=u.length,{start:f,end:d}=r;if(o){var h=a[c-1];if(h!=null){var m=n(h,c-1),g=e*(h.coordinate+e*m/2-d);if(u[c-1]=h=or(or({},h),{},{tickCoord:g>0?h.coordinate-g*e:h.coordinate}),h.tickCoord!=null){var y=yc(e,h.tickCoord,()=>m,f,d);y&&(d=h.tickCoord-e*(m/2+i),u[c-1]=or(or({},h),{},{isShow:!0}))}}}for(var x=o?c-1:c,E=function(A){var O=u[A];if(O==null)return 1;var T=O,C,N=()=>(C===void 0&&(C=n(O,A)),C);if(A===0){var M=e*(T.coordinate-e*N()/2-f);u[A]=T=or(or({},T),{},{tickCoord:M<0?T.coordinate-M*e:T.coordinate})}else u[A]=T=or(or({},T),{},{tickCoord:T.coordinate});if(T.tickCoord!=null){var R=yc(e,T.tickCoord,N,f,d);R&&(f=T.tickCoord+e*(N()/2+i),u[A]=or(or({},T),{},{isShow:!0}))}},w=0;w<x;w++)E(w);return u}function Tk(e,r,n){var{tick:a,ticks:i,viewBox:o,minTickGap:u,orientation:c,interval:f,tickFormatter:d,unit:h,angle:m}=e;if(!i||!i.length||!a)return[];if(ke(f)||qc.isSsr){var g;return(g=Tve(i,ke(f)?f:0))!==null&&g!==void 0?g:[]}var y=[],x=c==="top"||c==="bottom"?"width":"height",E=h&&x==="width"?Js(h,{fontSize:r,letterSpacing:n}):{width:0,height:0},w=(C,N)=>{var M=typeof d=="function"?d(C.value,N):C.value;return x==="width"?Ove(Js(M,{fontSize:r,letterSpacing:n}),E,m):Js(M,{fontSize:r,letterSpacing:n})[x]},_=i[0],A=i[1],O=i.length>=2&&_!=null&&A!=null?mn(A.coordinate-_.coordinate):1,T=Cve(o,O,x);return f==="equidistantPreserveStart"?Nve(O,T,w,i,u):f==="equidistantPreserveEnd"?Mve(O,T,w,i,u):(f==="preserveStart"||f==="preserveStartEnd"?y=Ive(O,T,w,i,u,f==="preserveStartEnd"):y=Lve(O,T,w,i,u),y.filter(C=>C.isShow))}var zve=e=>{var{ticks:r,label:n,labelGapWithTick:a=5,tickSize:i=0,tickMargin:o=0}=e,u=0;if(r){Array.from(r).forEach(h=>{if(h){var m=h.getBoundingClientRect();m.width>u&&(u=m.width)}});var c=n?n.getBoundingClientRect().width:0,f=i+o,d=u+f+c+(n?a:0);return Math.round(d)}return 0},qve={xAxis:{},yAxis:{}},UB=cr({name:"renderedTicks",initialState:qve,reducers:{setRenderedTicks:(e,r)=>{var{axisType:n,axisId:a,ticks:i}=r.payload;e[n][a]=i},removeRenderedTicks:(e,r)=>{var{axisType:n,axisId:a}=r.payload;delete e[n][a]}}}),{setRenderedTicks:Bve,removeRenderedTicks:$ve}=UB.actions,Uve=UB.reducer,Fve=["axisLine","width","height","className","hide","ticks","axisType","axisId"];function Hve(e,r){if(e==null)return{};var n,a,i=Gve(e,r);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(a=0;a<o.length;a++)n=o[a],r.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function Gve(e,r){if(e==null)return{};var n={};for(var a in e)if({}.hasOwnProperty.call(e,a)){if(r.indexOf(a)!==-1)continue;n[a]=e[a]}return n}function Bo(){return Bo=Object.assign?Object.assign.bind():function(e){for(var r=1;r<arguments.length;r++){var n=arguments[r];for(var a in n)({}).hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e},Bo.apply(null,arguments)}function LM(e,r){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);r&&(a=a.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,a)}return n}function bt(e){for(var r=1;r<arguments.length;r++){var n=arguments[r]!=null?arguments[r]:{};r%2?LM(Object(n),!0).forEach(function(a){Kve(e,a,n[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):LM(Object(n)).forEach(function(a){Object.defineProperty(e,a,Object.getOwnPropertyDescriptor(n,a))})}return e}function Kve(e,r,n){return(r=Vve(r))in e?Object.defineProperty(e,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[r]=n,e}function Vve(e){var r=Yve(e,"string");return typeof r=="symbol"?r:r+""}function Yve(e,r){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var a=n.call(e,r);if(typeof a!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return(r==="string"?String:Number)(e)}var Ha={x:0,y:0,width:0,height:0,viewBox:{x:0,y:0,width:0,height:0},orientation:"bottom",ticks:[],stroke:"#666",tickLine:!0,axisLine:!0,tick:!0,mirror:!1,minTickGap:5,tickSize:6,tickMargin:2,interval:"preserveEnd",zIndex:ur.axis};function Xve(e){var{x:r,y:n,width:a,height:i,orientation:o,mirror:u,axisLine:c,otherSvgProps:f}=e;if(!c)return null;var d=bt(bt(bt({},f),ia(c)),{},{fill:"none"});if(o==="top"||o==="bottom"){var h=+(o==="top"&&!u||o==="bottom"&&u);d=bt(bt({},d),{},{x1:r,y1:n+h*i,x2:r+a,y2:n+h*i})}else{var m=+(o==="left"&&!u||o==="right"&&u);d=bt(bt({},d),{},{x1:r+m*a,y1:n,x2:r+m*a,y2:n+i})}return k.createElement("line",Bo({},d,{className:Je("recharts-cartesian-axis-line",Ip(c,"className"))}))}function Wve(e,r,n,a,i,o,u,c,f){var d,h,m,g,y,x,E=c?-1:1,w=e.tickSize||u,_=ke(e.tickCoord)?e.tickCoord:e.coordinate;switch(o){case"top":d=h=e.coordinate,g=n+ +!c*i,m=g-E*w,x=m-E*f,y=_;break;case"left":m=g=e.coordinate,h=r+ +!c*a,d=h-E*w,y=d-E*f,x=_;break;case"right":m=g=e.coordinate,h=r+ +c*a,d=h+E*w,y=d+E*f,x=_;break;default:d=h=e.coordinate,g=n+ +c*i,m=g+E*w,x=m+E*f,y=_;break}return{line:{x1:d,y1:m,x2:h,y2:g},tick:{x:y,y:x}}}function Zve(e,r){switch(e){case"left":return r?"start":"end";case"right":return r?"end":"start";default:return"middle"}}function Qve(e,r){switch(e){case"left":case"right":return"middle";case"top":return r?"start":"end";default:return r?"end":"start"}}function Jve(e){var{option:r,tickProps:n,value:a}=e,i,o=Je(n.className,"recharts-cartesian-axis-tick-value");if(k.isValidElement(r))i=k.cloneElement(r,bt(bt({},n),{},{className:o}));else if(typeof r=="function")i=r(bt(bt({},n),{},{className:o}));else{var u="recharts-cartesian-axis-tick-value";typeof r!="boolean"&&(u=Je(u,Vpe(r))),i=k.createElement(Ak,Bo({},n,{className:u}),a)}return i}function ege(e){var{ticks:r,axisType:n,axisId:a}=e,i=Et();return k.useEffect(()=>{if(a==null||n==null)return Fo;var o=r.map(u=>({value:u.value,coordinate:u.coordinate,offset:u.offset,index:u.index}));return i(Bve({ticks:o,axisId:a,axisType:n})),()=>{i($ve({axisId:a,axisType:n}))}},[i,r,a,n]),null}var tge=k.forwardRef((e,r)=>{var{ticks:n=[],tick:a,tickLine:i,stroke:o,tickFormatter:u,unit:c,padding:f,tickTextProps:d,orientation:h,mirror:m,x:g,y,width:x,height:E,tickSize:w,tickMargin:_,fontSize:A,letterSpacing:O,getTicksConfig:T,events:C,axisType:N,axisId:M}=e,R=Tk(bt(bt({},T),{},{ticks:n}),A,O),L=ia(T),D=Pp(a),z=SB(L.textAnchor)?L.textAnchor:Zve(h,m),q=Qve(h,m),G={};typeof i=="object"&&(G=i);var U=bt(bt({},L),{},{fill:"none"},G),Y=R.map(re=>bt({entry:re},Wve(re,g,y,x,E,h,w,m,_))),$=Y.map(re=>{var{entry:oe,line:fe}=re;return k.createElement(oa,{className:"recharts-cartesian-axis-tick",key:"tick-".concat(oe.value,"-").concat(oe.coordinate,"-").concat(oe.tickCoord)},i&&k.createElement("line",Bo({},U,fe,{className:Je("recharts-cartesian-axis-tick-line",Ip(i,"className"))})))}),J=Y.map((re,oe)=>{var fe,F,{entry:Z,tick:ce}=re,B=bt(bt(bt(bt({verticalAnchor:q},L),{},{textAnchor:z,stroke:"none",fill:o},ce),{},{index:oe,payload:Z,visibleTicksCount:R.length,tickFormatter:u,padding:f},d),{},{angle:(fe=(F=d==null?void 0:d.angle)!==null&&F!==void 0?F:L.angle)!==null&&fe!==void 0?fe:0}),H=bt(bt({},B),D);return k.createElement(oa,Bo({className:"recharts-cartesian-axis-tick-label",key:"tick-label-".concat(Z.value,"-").concat(Z.coordinate,"-").concat(Z.tickCoord)},eie(C,Z,oe)),a&&k.createElement(Jve,{option:a,tickProps:H,value:"".concat(typeof u=="function"?u(Z.value,oe):Z.value).concat(c||"")}))});return k.createElement("g",{className:"recharts-cartesian-axis-ticks recharts-".concat(N,"-ticks")},k.createElement(ege,{ticks:R,axisId:M,axisType:N}),J.length>0&&k.createElement(da,{zIndex:ur.label},k.createElement("g",{className:"recharts-cartesian-axis-tick-labels recharts-".concat(N,"-tick-labels"),ref:r},J)),$.length>0&&k.createElement("g",{className:"recharts-cartesian-axis-tick-lines recharts-".concat(N,"-tick-lines")},$))}),rge=k.forwardRef((e,r)=>{var{axisLine:n,width:a,height:i,className:o,hide:u,ticks:c,axisType:f,axisId:d}=e,h=Hve(e,Fve),[m,g]=k.useState(""),[y,x]=k.useState(""),E=k.useRef(null);k.useImperativeHandle(r,()=>({getCalculatedWidth:()=>{var _;return zve({ticks:E.current,label:(_=e.labelRef)===null||_===void 0?void 0:_.current,labelGapWithTick:5,tickSize:e.tickSize,tickMargin:e.tickMargin})}}));var w=k.useCallback(_=>{if(_){var A=_.getElementsByClassName("recharts-cartesian-axis-tick-value");E.current=A;var O=A[0];if(O){var T=window.getComputedStyle(O),C=T.fontSize,N=T.letterSpacing;(C!==m||N!==y)&&(g(C),x(N))}}},[m,y]);return u||a!=null&&a<=0||i!=null&&i<=0?null:k.createElement(da,{zIndex:e.zIndex},k.createElement(oa,{className:Je("recharts-cartesian-axis",o)},k.createElement(Xve,{x:e.x,y:e.y,width:a,height:i,orientation:e.orientation,mirror:e.mirror,axisLine:n,otherSvgProps:ia(e)}),k.createElement(tge,{ref:w,axisType:f,events:h,fontSize:m,getTicksConfig:e,height:e.height,letterSpacing:y,mirror:e.mirror,orientation:e.orientation,padding:e.padding,stroke:e.stroke,tick:e.tick,tickFormatter:e.tickFormatter,tickLine:e.tickLine,tickMargin:e.tickMargin,tickSize:e.tickSize,tickTextProps:e.tickTextProps,ticks:c,unit:e.unit,width:e.width,x:e.x,y:e.y,axisId:d}),k.createElement(OB,{x:e.x,y:e.y,width:e.width,height:e.height,lowerWidth:e.width,upperWidth:e.width},k.createElement(TB,{label:e.label,labelRef:e.labelRef}),e.children)))}),Nk=k.forwardRef((e,r)=>{var n=gr(e,Ha);return k.createElement(rge,Bo({},n,{ref:r}))});Nk.displayName="CartesianAxis";var nge=["x1","y1","x2","y2","key"],age=["offset"],ige=["xAxisId","yAxisId"],oge=["xAxisId","yAxisId"];function IM(e,r){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);r&&(a=a.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,a)}return n}function lr(e){for(var r=1;r<arguments.length;r++){var n=arguments[r]!=null?arguments[r]:{};r%2?IM(Object(n),!0).forEach(function(a){lge(e,a,n[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):IM(Object(n)).forEach(function(a){Object.defineProperty(e,a,Object.getOwnPropertyDescriptor(n,a))})}return e}function lge(e,r,n){return(r=uge(r))in e?Object.defineProperty(e,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[r]=n,e}function uge(e){var r=sge(e,"string");return typeof r=="symbol"?r:r+""}function sge(e,r){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var a=n.call(e,r);if(typeof a!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return(r==="string"?String:Number)(e)}function Ao(){return Ao=Object.assign?Object.assign.bind():function(e){for(var r=1;r<arguments.length;r++){var n=arguments[r];for(var a in n)({}).hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e},Ao.apply(null,arguments)}function dp(e,r){if(e==null)return{};var n,a,i=cge(e,r);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(a=0;a<o.length;a++)n=o[a],r.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function cge(e,r){if(e==null)return{};var n={};for(var a in e)if({}.hasOwnProperty.call(e,a)){if(r.indexOf(a)!==-1)continue;n[a]=e[a]}return n}var fge=e=>{var{fill:r}=e;if(!r||r==="none")return null;var{fillOpacity:n,x:a,y:i,width:o,height:u,ry:c}=e;return k.createElement("rect",{x:a,y:i,ry:c,width:o,height:u,stroke:"none",fill:r,fillOpacity:n,className:"recharts-cartesian-grid-bg"})};function FB(e){var{option:r,lineItemProps:n}=e,a;if(k.isValidElement(r))a=k.cloneElement(r,n);else if(typeof r=="function")a=r(n);else{var i,{x1:o,y1:u,x2:c,y2:f,key:d}=n,h=dp(n,nge),m=(i=ia(h))!==null&&i!==void 0?i:{},{offset:g}=m,y=dp(m,age);a=k.createElement("line",Ao({},y,{x1:o,y1:u,x2:c,y2:f,fill:"none",key:d}))}return a}function dge(e){var{x:r,width:n,horizontal:a=!0,horizontalPoints:i}=e;if(!a||!i||!i.length)return null;var{xAxisId:o,yAxisId:u}=e,c=dp(e,ige),f=i.map((d,h)=>{var m=lr(lr({},c),{},{x1:r,y1:d,x2:r+n,y2:d,key:"line-".concat(h),index:h});return k.createElement(FB,{key:"line-".concat(h),option:a,lineItemProps:m})});return k.createElement("g",{className:"recharts-cartesian-grid-horizontal"},f)}function hge(e){var{y:r,height:n,vertical:a=!0,verticalPoints:i}=e;if(!a||!i||!i.length)return null;var{xAxisId:o,yAxisId:u}=e,c=dp(e,oge),f=i.map((d,h)=>{var m=lr(lr({},c),{},{x1:d,y1:r,x2:d,y2:r+n,key:"line-".concat(h),index:h});return k.createElement(FB,{option:a,lineItemProps:m,key:"line-".concat(h)})});return k.createElement("g",{className:"recharts-cartesian-grid-vertical"},f)}function pge(e){var{horizontalFill:r,fillOpacity:n,x:a,y:i,width:o,height:u,horizontalPoints:c,horizontal:f=!0}=e;if(!f||!r||!r.length||c==null)return null;var d=c.map(m=>Math.round(m+i-i)).sort((m,g)=>m-g);i!==d[0]&&d.unshift(0);var h=d.map((m,g)=>{var y=d[g+1],x=y==null,E=x?i+u-m:y-m;if(E<=0)return null;var w=g%r.length;return k.createElement("rect",{key:"react-".concat(g),y:m,x:a,height:E,width:o,stroke:"none",fill:r[w],fillOpacity:n,className:"recharts-cartesian-grid-bg"})});return k.createElement("g",{className:"recharts-cartesian-gridstripes-horizontal"},h)}function mge(e){var{vertical:r=!0,verticalFill:n,fillOpacity:a,x:i,y:o,width:u,height:c,verticalPoints:f}=e;if(!r||!n||!n.length)return null;var d=f.map(m=>Math.round(m+i-i)).sort((m,g)=>m-g);i!==d[0]&&d.unshift(0);var h=d.map((m,g)=>{var y=d[g+1],x=y==null,E=x?i+u-m:y-m;if(E<=0)return null;var w=g%n.length;return k.createElement("rect",{key:"react-".concat(g),x:m,y:o,width:E,height:c,stroke:"none",fill:n[w],fillOpacity:a,className:"recharts-cartesian-grid-bg"})});return k.createElement("g",{className:"recharts-cartesian-gridstripes-vertical"},h)}var vge=(e,r)=>{var{xAxis:n,width:a,height:i,offset:o}=e;return uq(Tk(lr(lr(lr({},Ha),n),{},{ticks:sq(n),viewBox:{x:0,y:0,width:a,height:i}})),o.left,o.left+o.width,r)},gge=(e,r)=>{var{yAxis:n,width:a,height:i,offset:o}=e;return uq(Tk(lr(lr(lr({},Ha),n),{},{ticks:sq(n),viewBox:{x:0,y:0,width:a,height:i}})),o.top,o.top+o.height,r)},yge={horizontal:!0,vertical:!0,horizontalPoints:[],verticalPoints:[],stroke:"#ccc",fill:"none",verticalFill:[],horizontalFill:[],xAxisId:0,yAxisId:0,syncWithTicks:!1,zIndex:ur.grid};function HB(e){var r=gq(),n=yq(),a=vq(),i=lr(lr({},gr(e,yge)),{},{x:ke(e.x)?e.x:a.left,y:ke(e.y)?e.y:a.top,width:ke(e.width)?e.width:a.width,height:ke(e.height)?e.height:a.height}),{xAxisId:o,yAxisId:u,x:c,y:f,width:d,height:h,syncWithTicks:m,horizontalValues:g,verticalValues:y}=i,x=yr(),E=je(L=>L4(L,"xAxis",o,x)),w=je(L=>L4(L,"yAxis",u,x));if(!la(d)||!la(h)||!ke(c)||!ke(f))return null;var _=i.verticalCoordinatesGenerator||vge,A=i.horizontalCoordinatesGenerator||gge,{horizontalPoints:O,verticalPoints:T}=i;if((!O||!O.length)&&typeof A=="function"){var C=g&&g.length,N=A({yAxis:w?lr(lr({},w),{},{ticks:C?g:w.ticks}):void 0,width:r??d,height:n??h,offset:a},C?!0:m);Kh(Array.isArray(N),"horizontalCoordinatesGenerator should return Array but instead it returned [".concat(typeof N,"]")),Array.isArray(N)&&(O=N)}if((!T||!T.length)&&typeof _=="function"){var M=y&&y.length,R=_({xAxis:E?lr(lr({},E),{},{ticks:M?y:E.ticks}):void 0,width:r??d,height:n??h,offset:a},M?!0:m);Kh(Array.isArray(R),"verticalCoordinatesGenerator should return Array but instead it returned [".concat(typeof R,"]")),Array.isArray(R)&&(T=R)}return k.createElement(da,{zIndex:i.zIndex},k.createElement("g",{className:"recharts-cartesian-grid"},k.createElement(fge,{fill:i.fill,fillOpacity:i.fillOpacity,x:i.x,y:i.y,width:i.width,height:i.height,ry:i.ry}),k.createElement(pge,Ao({},i,{horizontalPoints:O})),k.createElement(mge,Ao({},i,{verticalPoints:T})),k.createElement(dge,Ao({},i,{offset:a,horizontalPoints:O,xAxis:E,yAxis:w})),k.createElement(hge,Ao({},i,{offset:a,verticalPoints:T,xAxis:E,yAxis:w}))))}HB.displayName="CartesianGrid";var bge={},GB=cr({name:"errorBars",initialState:bge,reducers:{addErrorBar:(e,r)=>{var{itemId:n,errorBar:a}=r.payload;e[n]||(e[n]=[]),e[n].push(a)},replaceErrorBar:(e,r)=>{var{itemId:n,prev:a,next:i}=r.payload;e[n]&&(e[n]=e[n].map(o=>o.dataKey===a.dataKey&&o.direction===a.direction?i:o))},removeErrorBar:(e,r)=>{var{itemId:n,errorBar:a}=r.payload;e[n]&&(e[n]=e[n].filter(i=>i.dataKey!==a.dataKey||i.direction!==a.direction))}}}),{addErrorBar:G_e,replaceErrorBar:K_e,removeErrorBar:V_e}=GB.actions,xge=GB.reducer,_ge=["children"];function wge(e,r){if(e==null)return{};var n,a,i=Sge(e,r);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(a=0;a<o.length;a++)n=o[a],r.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function Sge(e,r){if(e==null)return{};var n={};for(var a in e)if({}.hasOwnProperty.call(e,a)){if(r.indexOf(a)!==-1)continue;n[a]=e[a]}return n}var Ege={data:[],xAxisId:"xAxis-0",yAxisId:"yAxis-0",dataPointFormatter:()=>({x:0,y:0,value:0}),errorBarOffset:0},kge=k.createContext(Ege);function jge(e){var{children:r}=e,n=wge(e,_ge);return k.createElement(kge.Provider,{value:n},r)}function KB(e,r){var n,a,i=je(d=>ca(d,e)),o=je(d=>fa(d,r)),u=(n=i==null?void 0:i.allowDataOverflow)!==null&&n!==void 0?n:Mt.allowDataOverflow,c=(a=o==null?void 0:o.allowDataOverflow)!==null&&a!==void 0?a:Pt.allowDataOverflow,f=u||c;return{needClip:f,needClipX:u,needClipY:c}}function Age(e){var{xAxisId:r,yAxisId:n,clipPathId:a}=e,i=Ck(),{needClipX:o,needClipY:u,needClip:c}=KB(r,n);if(!c||!i)return null;var{x:f,y:d,width:h,height:m}=i;return k.createElement("clipPath",{id:"clipPath-".concat(a)},k.createElement("rect",{x:o?f:f-h/2,y:u?d:d-m/2,width:o?h:h*2,height:u?m:m*2}))}var VB=(e,r,n,a)=>F7(e,"xAxis",r,a),YB=(e,r,n,a)=>U7(e,"xAxis",r,a),XB=(e,r,n,a)=>F7(e,"yAxis",n,a),WB=(e,r,n,a)=>U7(e,"yAxis",n,a),Oge=ue([vt,VB,XB,YB,WB],(e,r,n,a,i)=>ti(e,"xAxis")?Gh(r,a,!1):Gh(n,i,!1)),Cge=(e,r,n,a,i)=>i;function Tge(e){return e.type==="line"}var Nge=ue([d7,Cge],(e,r)=>e.filter(Tge).find(n=>n.id===r)),Mge=ue([vt,VB,XB,YB,WB,Nge,Oge,XE],(e,r,n,a,i,o,u,c)=>{var{chartData:f,dataStartIndex:d,dataEndIndex:h}=c;if(!(o==null||r==null||n==null||a==null||i==null||a.length===0||i.length===0||u==null||e!=="horizontal"&&e!=="vertical")){var{dataKey:m,data:g}=o,y;if(g!=null&&g.length>0?y=g:y=f==null?void 0:f.slice(d,h+1),y!=null)return Jge({layout:e,xAxis:r,yAxis:n,xAxisTicks:a,yAxisTicks:i,dataKey:m,bandSize:u,displayedData:y})}});function Pge(e){var r=Pp(e),n=3,a=2;if(r!=null){var{r:i,strokeWidth:o}=r,u=Number(i),c=Number(o);return(Number.isNaN(u)||u<0)&&(u=n),(Number.isNaN(c)||c<0)&&(c=a),{r:u,strokeWidth:c}}return{r:n,strokeWidth:a}}var Rge=["id"],Dge=["type","layout","connectNulls","needClip","shape"],Lge=["activeDot","animateNewValues","animationBegin","animationDuration","animationEasing","connectNulls","dot","hide","isAnimationActive","label","legendType","xAxisId","yAxisId","id"];function bc(){return bc=Object.assign?Object.assign.bind():function(e){for(var r=1;r<arguments.length;r++){var n=arguments[r];for(var a in n)({}).hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e},bc.apply(null,arguments)}function zM(e,r){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);r&&(a=a.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,a)}return n}function Xn(e){for(var r=1;r<arguments.length;r++){var n=arguments[r]!=null?arguments[r]:{};r%2?zM(Object(n),!0).forEach(function(a){Ige(e,a,n[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):zM(Object(n)).forEach(function(a){Object.defineProperty(e,a,Object.getOwnPropertyDescriptor(n,a))})}return e}function Ige(e,r,n){return(r=zge(r))in e?Object.defineProperty(e,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[r]=n,e}function zge(e){var r=qge(e,"string");return typeof r=="symbol"?r:r+""}function qge(e,r){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var a=n.call(e,r);if(typeof a!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return(r==="string"?String:Number)(e)}function Mk(e,r){if(e==null)return{};var n,a,i=Bge(e,r);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(a=0;a<o.length;a++)n=o[a],r.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function Bge(e,r){if(e==null)return{};var n={};for(var a in e)if({}.hasOwnProperty.call(e,a)){if(r.indexOf(a)!==-1)continue;n[a]=e[a]}return n}var $ge=e=>{var{dataKey:r,name:n,stroke:a,legendType:i,hide:o}=e;return[{inactive:o,dataKey:r,type:i,color:a,value:cq(n,r),payload:e}]},Uge=k.memo(e=>{var{dataKey:r,data:n,stroke:a,strokeWidth:i,fill:o,name:u,hide:c,unit:f,tooltipType:d,id:h}=e,m={dataDefinedOnItem:n,getPosition:Fo,settings:{stroke:a,strokeWidth:i,fill:o,dataKey:r,nameKey:void 0,name:cq(u,r),hide:c,type:d,color:a,unit:f,graphicalItemId:h}};return k.createElement(mme,{tooltipEntrySettings:m})}),ZB=(e,r)=>"".concat(r,"px ").concat(e,"px");function Fge(e,r){for(var n=e.length%2!==0?[...e,0]:e,a=[],i=0;i<r;++i)a.push(...n);return a}var Hge=(e,r,n)=>{var a=n.reduce((g,y)=>g+y,0);if(!a)return ZB(r,e);for(var i=Math.floor(e/a),o=e%a,u=[],c=0,f=0;c<n.length;f+=(d=n[c])!==null&&d!==void 0?d:0,++c){var d,h=n[c];if(h!=null&&f+h>o){u=[...n.slice(0,c),o-f];break}}var m=u.length%2===0?[0,r]:[r];return[...Fge(n,i),...u,...m].map(g=>"".concat(g,"px")).join(", ")};function Gge(e){var{clipPathId:r,points:n,props:a}=e,{dot:i,dataKey:o,needClip:u}=a,{id:c}=a,f=Mk(a,Rge),d=ia(f);return k.createElement(Ime,{points:n,dot:i,className:"recharts-line-dots",dotClassName:"recharts-line-dot",dataKey:o,baseProps:d,needClip:u,clipPathId:r})}function Kge(e){var{showLabels:r,children:n,points:a}=e,i=k.useMemo(()=>a==null?void 0:a.map(o=>{var u,c,f={x:(u=o.x)!==null&&u!==void 0?u:0,y:(c=o.y)!==null&&c!==void 0?c:0,width:0,lowerWidth:0,upperWidth:0,height:0};return Xn(Xn({},f),{},{value:o.value,payload:o.payload,viewBox:f,parentViewBox:void 0,fill:void 0})}),[a]);return k.createElement($pe,{value:r?i:void 0},n)}function qM(e){var{clipPathId:r,pathRef:n,points:a,strokeDasharray:i,props:o}=e,{type:u,layout:c,connectNulls:f,needClip:d,shape:h}=o,m=Mk(o,Dge),g=Xn(Xn({},sr(m)),{},{fill:"none",className:"recharts-line-curve",clipPath:d?"url(#clipPath-".concat(r,")"):void 0,points:a,type:u,layout:c,connectNulls:f,strokeDasharray:i??o.strokeDasharray});return k.createElement(k.Fragment,null,(a==null?void 0:a.length)>1&&k.createElement(pme,bc({shapeType:"curve",option:h},g,{pathRef:n})),k.createElement(Gge,{points:a,clipPathId:r,props:o}))}function Vge(e){try{return e&&e.getTotalLength&&e.getTotalLength()||0}catch{return 0}}function Yge(e){var{clipPathId:r,props:n,pathRef:a,previousPointsRef:i,longestAnimatedLengthRef:o}=e,{points:u,strokeDasharray:c,isAnimationActive:f,animationBegin:d,animationDuration:h,animationEasing:m,animateNewValues:g,width:y,height:x,onAnimationEnd:E,onAnimationStart:w}=n,_=i.current,A=YE(u,"recharts-line-"),O=k.useRef(A),[T,C]=k.useState(!1),N=!T,M=k.useCallback(()=>{typeof E=="function"&&E(),C(!1)},[E]),R=k.useCallback(()=>{typeof w=="function"&&w(),C(!0)},[w]),L=Vge(a.current),D=k.useRef(0);O.current!==A&&(D.current=o.current,O.current=A);var z=D.current;return k.createElement(Kge,{points:u,showLabels:N},n.children,k.createElement(VE,{animationId:A,begin:d,duration:h,isActive:f,easing:m,onAnimationEnd:M,onAnimationStart:R,key:A},q=>{var G=Or(z,L+z,q),U=Math.min(G,L),Y;if(f)if(c){var $="".concat(c).split(/[,\s]+/gim).map(oe=>parseFloat(oe));Y=Hge(U,L,$)}else Y=ZB(L,U);else Y=c==null?void 0:String(c);if(q>0&&L>0&&(i.current=u,o.current=Math.max(o.current,U)),_){var J=_.length/u.length,re=q===1?u:u.map((oe,fe)=>{var F=Math.floor(fe*J);if(_[F]){var Z=_[F];return Xn(Xn({},oe),{},{x:Or(Z.x,oe.x,q),y:Or(Z.y,oe.y,q)})}return g?Xn(Xn({},oe),{},{x:Or(y*2,oe.x,q),y:Or(x/2,oe.y,q)}):Xn(Xn({},oe),{},{x:oe.x,y:oe.y})});return i.current=re,k.createElement(qM,{props:n,points:re,clipPathId:r,pathRef:a,strokeDasharray:Y})}return k.createElement(qM,{props:n,points:u,clipPathId:r,pathRef:a,strokeDasharray:Y})}),k.createElement(Hpe,{label:n.label}))}function Xge(e){var{clipPathId:r,props:n}=e,a=k.useRef(null),i=k.useRef(0),o=k.useRef(null);return k.createElement(Yge,{props:n,clipPathId:r,previousPointsRef:a,longestAnimatedLengthRef:i,pathRef:o})}var Wge=(e,r)=>{var n,a;return{x:(n=e.x)!==null&&n!==void 0?n:void 0,y:(a=e.y)!==null&&a!==void 0?a:void 0,value:e.value,errorVal:er(e.payload,r)}};class Zge extends k.Component{render(){var{hide:r,dot:n,points:a,className:i,xAxisId:o,yAxisId:u,top:c,left:f,width:d,height:h,id:m,needClip:g,zIndex:y}=this.props;if(r)return null;var x=Je("recharts-line",i),E=m,{r:w,strokeWidth:_}=Pge(n),A=DB(n),O=w*2+_,T=g?"url(#clipPath-".concat(A?"":"dots-").concat(E,")"):void 0;return k.createElement(da,{zIndex:y},k.createElement(oa,{className:x},g&&k.createElement("defs",null,k.createElement(Age,{clipPathId:E,xAxisId:o,yAxisId:u}),!A&&k.createElement("clipPath",{id:"clipPath-dots-".concat(E)},k.createElement("rect",{x:f-O/2,y:c-O/2,width:d+O,height:h+O}))),k.createElement(jge,{xAxisId:o,yAxisId:u,data:a,dataPointFormatter:Wge,errorBarOffset:0},k.createElement(Xge,{props:this.props,clipPathId:E}))),k.createElement(nve,{activeDot:this.props.activeDot,points:a,mainColor:this.props.stroke,itemDataKey:this.props.dataKey,clipPath:T}))}}var QB={activeDot:!0,animateNewValues:!0,animationBegin:0,animationDuration:1500,animationEasing:"ease",connectNulls:!1,dot:!0,fill:"#fff",hide:!1,isAnimationActive:"auto",label:!1,legendType:"line",stroke:"#3182bd",strokeWidth:1,xAxisId:0,yAxisId:0,zIndex:ur.line,type:"linear"};function Qge(e){var r=gr(e,QB),{activeDot:n,animateNewValues:a,animationBegin:i,animationDuration:o,animationEasing:u,connectNulls:c,dot:f,hide:d,isAnimationActive:h,label:m,legendType:g,xAxisId:y,yAxisId:x,id:E}=r,w=Mk(r,Lge),{needClip:_}=KB(y,x),A=Ck(),O=su(),T=yr(),C=je(D=>Mge(D,y,x,T,E));if(O!=="horizontal"&&O!=="vertical"||C==null||A==null)return null;var{height:N,width:M,x:R,y:L}=A;return k.createElement(Zge,bc({},w,{id:E,connectNulls:c,dot:f,activeDot:n,animateNewValues:a,animationBegin:i,animationDuration:o,animationEasing:u,isAnimationActive:h,hide:d,label:m,legendType:g,xAxisId:y,yAxisId:x,points:C,layout:O,height:N,width:M,left:R,top:L,needClip:_}))}function Jge(e){var{layout:r,xAxis:n,yAxis:a,xAxisTicks:i,yAxisTicks:o,dataKey:u,bandSize:c,displayedData:f}=e;return f.map((d,h)=>{var m=er(d,u);if(r==="horizontal"){var g=m3({axis:n,ticks:i,bandSize:c,entry:d,index:h}),y=$t(m)?null:a.scale.map(m);return{x:g,y:y??null,value:m,payload:d}}var x=$t(m)?null:n.scale.map(m),E=m3({axis:a,ticks:o,bandSize:c,entry:d,index:h});return x==null||E==null?null:{x,y:E,value:m,payload:d}}).filter(Boolean)}function eye(e){var r=gr(e,QB),n=yr();return k.createElement(_me,{id:r.id,type:"line"},a=>k.createElement(k.Fragment,null,k.createElement(vme,{legendPayload:$ge(r)}),k.createElement(Uge,{dataKey:r.dataKey,data:r.data,stroke:r.stroke,strokeWidth:r.strokeWidth,fill:r.fill,name:r.name,hide:r.hide,unit:r.unit,tooltipType:r.tooltipType,id:a}),k.createElement(Ome,{type:"line",id:a,data:r.data,xAxisId:r.xAxisId,yAxisId:r.yAxisId,zAxisId:0,dataKey:r.dataKey,hide:r.hide,isPanorama:n}),k.createElement(Qge,bc({},r,{id:a}))))}var JB=k.memo(eye,tm);JB.displayName="Line";var tye=["domain","range"],rye=["domain","range"];function BM(e,r){if(e==null)return{};var n,a,i=nye(e,r);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(a=0;a<o.length;a++)n=o[a],r.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function nye(e,r){if(e==null)return{};var n={};for(var a in e)if({}.hasOwnProperty.call(e,a)){if(r.indexOf(a)!==-1)continue;n[a]=e[a]}return n}function $M(e,r){return e===r?!0:Array.isArray(e)&&e.length===2&&Array.isArray(r)&&r.length===2?e[0]===r[0]&&e[1]===r[1]:!1}function e$(e,r){if(e===r)return!0;var{domain:n,range:a}=e,i=BM(e,tye),{domain:o,range:u}=r,c=BM(r,rye);return!$M(n,o)||!$M(a,u)?!1:tm(i,c)}var aye=["type"],iye=["dangerouslySetInnerHTML","ticks","scale"],oye=["id","scale"];function bS(){return bS=Object.assign?Object.assign.bind():function(e){for(var r=1;r<arguments.length;r++){var n=arguments[r];for(var a in n)({}).hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e},bS.apply(null,arguments)}function UM(e,r){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);r&&(a=a.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,a)}return n}function FM(e){for(var r=1;r<arguments.length;r++){var n=arguments[r]!=null?arguments[r]:{};r%2?UM(Object(n),!0).forEach(function(a){lye(e,a,n[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):UM(Object(n)).forEach(function(a){Object.defineProperty(e,a,Object.getOwnPropertyDescriptor(n,a))})}return e}function lye(e,r,n){return(r=uye(r))in e?Object.defineProperty(e,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[r]=n,e}function uye(e){var r=sye(e,"string");return typeof r=="symbol"?r:r+""}function sye(e,r){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var a=n.call(e,r);if(typeof a!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return(r==="string"?String:Number)(e)}function xS(e,r){if(e==null)return{};var n,a,i=cye(e,r);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(a=0;a<o.length;a++)n=o[a],r.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function cye(e,r){if(e==null)return{};var n={};for(var a in e)if({}.hasOwnProperty.call(e,a)){if(r.indexOf(a)!==-1)continue;n[a]=e[a]}return n}function fye(e){var r=Et(),n=k.useRef(null),a=bq(),{type:i}=e,o=xS(e,aye),u=am(a,"xAxis",i),c=k.useMemo(()=>{if(u!=null)return FM(FM({},o),{},{type:u})},[o,u]);return k.useLayoutEffect(()=>{c!=null&&(n.current===null?r(Ume(c)):n.current!==c&&r(Fme({prev:n.current,next:c})),n.current=c)},[c,r]),k.useLayoutEffect(()=>()=>{n.current&&(r(Hme(n.current)),n.current=null)},[r]),null}var dye=e=>{var{xAxisId:r,className:n}=e,a=je(dq),i=yr(),o="xAxis",u=je(_=>$7(_,o,r,i)),c=je(_=>ofe(_,r)),f=je(_=>dfe(_,r)),d=je(_=>u7(_,r));if(c==null||f==null||d==null)return null;var{dangerouslySetInnerHTML:h,ticks:m,scale:g}=e,y=xS(e,iye),{id:x,scale:E}=d,w=xS(d,oye);return k.createElement(Nk,bS({},y,w,{x:f.x,y:f.y,width:c.width,height:c.height,className:Je("recharts-".concat(o," ").concat(o),n),viewBox:a,ticks:u,axisType:o,axisId:r}))},hye={allowDataOverflow:Mt.allowDataOverflow,allowDecimals:Mt.allowDecimals,allowDuplicatedCategory:Mt.allowDuplicatedCategory,angle:Mt.angle,axisLine:Ha.axisLine,height:Mt.height,hide:!1,includeHidden:Mt.includeHidden,interval:Mt.interval,label:!1,minTickGap:Mt.minTickGap,mirror:Mt.mirror,orientation:Mt.orientation,padding:Mt.padding,reversed:Mt.reversed,scale:Mt.scale,tick:Mt.tick,tickCount:Mt.tickCount,tickLine:Ha.tickLine,tickSize:Ha.tickSize,type:Mt.type,niceTicks:Mt.niceTicks,xAxisId:0},pye=e=>{var r=gr(e,hye);return k.createElement(k.Fragment,null,k.createElement(fye,{allowDataOverflow:r.allowDataOverflow,allowDecimals:r.allowDecimals,allowDuplicatedCategory:r.allowDuplicatedCategory,angle:r.angle,dataKey:r.dataKey,domain:r.domain,height:r.height,hide:r.hide,id:r.xAxisId,includeHidden:r.includeHidden,interval:r.interval,minTickGap:r.minTickGap,mirror:r.mirror,name:r.name,orientation:r.orientation,padding:r.padding,reversed:r.reversed,scale:r.scale,tick:r.tick,tickCount:r.tickCount,tickFormatter:r.tickFormatter,ticks:r.ticks,type:r.type,unit:r.unit,niceTicks:r.niceTicks}),k.createElement(dye,r))},t$=k.memo(pye,e$);t$.displayName="XAxis";var mye=["type"],vye=["dangerouslySetInnerHTML","ticks","scale"],gye=["id","scale"];function _S(){return _S=Object.assign?Object.assign.bind():function(e){for(var r=1;r<arguments.length;r++){var n=arguments[r];for(var a in n)({}).hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e},_S.apply(null,arguments)}function HM(e,r){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);r&&(a=a.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,a)}return n}function GM(e){for(var r=1;r<arguments.length;r++){var n=arguments[r]!=null?arguments[r]:{};r%2?HM(Object(n),!0).forEach(function(a){yye(e,a,n[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):HM(Object(n)).forEach(function(a){Object.defineProperty(e,a,Object.getOwnPropertyDescriptor(n,a))})}return e}function yye(e,r,n){return(r=bye(r))in e?Object.defineProperty(e,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[r]=n,e}function bye(e){var r=xye(e,"string");return typeof r=="symbol"?r:r+""}function xye(e,r){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var a=n.call(e,r);if(typeof a!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return(r==="string"?String:Number)(e)}function wS(e,r){if(e==null)return{};var n,a,i=_ye(e,r);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(a=0;a<o.length;a++)n=o[a],r.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function _ye(e,r){if(e==null)return{};var n={};for(var a in e)if({}.hasOwnProperty.call(e,a)){if(r.indexOf(a)!==-1)continue;n[a]=e[a]}return n}function wye(e){var r=Et(),n=k.useRef(null),a=bq(),{type:i}=e,o=wS(e,mye),u=am(a,"yAxis",i),c=k.useMemo(()=>{if(u!=null)return GM(GM({},o),{},{type:u})},[u,o]);return k.useLayoutEffect(()=>{c!=null&&(n.current===null?r(Gme(c)):n.current!==c&&r(Kme({prev:n.current,next:c})),n.current=c)},[c,r]),k.useLayoutEffect(()=>()=>{n.current&&(r(Vme(n.current)),n.current=null)},[r]),null}function Sye(e){var{yAxisId:r,className:n,width:a,label:i}=e,o=k.useRef(null),u=k.useRef(null),c=je(dq),f=yr(),d=Et(),h="yAxis",m=je(N=>mfe(N,r)),g=je(N=>pfe(N,r)),y=je(N=>$7(N,h,r,f)),x=je(N=>s7(N,r));if(k.useLayoutEffect(()=>{if(!(a!=="auto"||!m||Ok(i)||k.isValidElement(i)||x==null)){var N=o.current;if(N){var M=N.getCalculatedWidth();Math.round(m.width)!==Math.round(M)&&d(Yme({id:r,width:M}))}}},[y,m,d,i,r,a,x]),m==null||g==null||x==null)return null;var{dangerouslySetInnerHTML:E,ticks:w,scale:_}=e,A=wS(e,vye),{id:O,scale:T}=x,C=wS(x,gye);return k.createElement(Nk,_S({},A,C,{ref:o,labelRef:u,x:g.x,y:g.y,tickTextProps:a==="auto"?{width:void 0}:{width:a},width:m.width,height:m.height,className:Je("recharts-".concat(h," ").concat(h),n),viewBox:c,ticks:y,axisType:h,axisId:r}))}var Eye={allowDataOverflow:Pt.allowDataOverflow,allowDecimals:Pt.allowDecimals,allowDuplicatedCategory:Pt.allowDuplicatedCategory,angle:Pt.angle,axisLine:Ha.axisLine,hide:!1,includeHidden:Pt.includeHidden,interval:Pt.interval,label:!1,minTickGap:Pt.minTickGap,mirror:Pt.mirror,orientation:Pt.orientation,padding:Pt.padding,reversed:Pt.reversed,scale:Pt.scale,tick:Pt.tick,tickCount:Pt.tickCount,tickLine:Ha.tickLine,tickSize:Ha.tickSize,type:Pt.type,niceTicks:Pt.niceTicks,width:Pt.width,yAxisId:0},kye=e=>{var r=gr(e,Eye);return k.createElement(k.Fragment,null,k.createElement(wye,{interval:r.interval,id:r.yAxisId,scale:r.scale,type:r.type,domain:r.domain,allowDataOverflow:r.allowDataOverflow,dataKey:r.dataKey,allowDuplicatedCategory:r.allowDuplicatedCategory,allowDecimals:r.allowDecimals,tickCount:r.tickCount,padding:r.padding,includeHidden:r.includeHidden,reversed:r.reversed,ticks:r.ticks,width:r.width,orientation:r.orientation,mirror:r.mirror,hide:r.hide,unit:r.unit,name:r.name,angle:r.angle,minTickGap:r.minTickGap,tick:r.tick,tickFormatter:r.tickFormatter,niceTicks:r.niceTicks}),k.createElement(Sye,r))},r$=k.memo(kye,e$);r$.displayName="YAxis";var jye=(e,r)=>r,Pk=ue([jye,vt,n7,Gt,iB,ai,zde,rr],Gde);function Aye(e){return"getBBox"in e.currentTarget&&typeof e.currentTarget.getBBox=="function"}function Rk(e){var r=e.currentTarget.getBoundingClientRect(),n,a;if(Aye(e)){var i=e.currentTarget.getBBox();n=i.width>0?r.width/i.width:1,a=i.height>0?r.height/i.height:1}else{var o=e.currentTarget;n=o.offsetWidth>0?r.width/o.offsetWidth:1,a=o.offsetHeight>0?r.height/o.offsetHeight:1}var u=(c,f)=>({relativeX:Math.round((c-r.left)/n),relativeY:Math.round((f-r.top)/a)});return"touches"in e?Array.from(e.touches).map(c=>u(c.clientX,c.clientY)):u(e.clientX,e.clientY)}var n$=Kr("mouseClick"),a$=Rc();a$.startListening({actionCreator:n$,effect:(e,r)=>{var n=e.payload,a=Pk(r.getState(),Rk(n));(a==null?void 0:a.activeIndex)!=null&&r.dispatch(Tfe({activeIndex:a.activeIndex,activeDataKey:void 0,activeCoordinate:a.activeCoordinate}))}});var SS=Kr("mouseMove"),i$=Rc(),$l=null,vo=null,$0=null;i$.startListening({actionCreator:SS,effect:(e,r)=>{var n=e.payload,a=r.getState(),{throttleDelay:i,throttledEvents:o}=a.eventSettings,u=o==="all"||(o==null?void 0:o.includes("mousemove"));$l!==null&&(cancelAnimationFrame($l),$l=null),vo!==null&&(typeof i!="number"||!u)&&(clearTimeout(vo),vo=null),$0=Rk(n);var c=()=>{var f=r.getState(),d=gk(f,f.tooltip.settings.shared);if(!$0){$l=null,vo=null;return}if(d==="axis"){var h=Pk(f,$0);(h==null?void 0:h.activeIndex)!=null?r.dispatch(W7({activeIndex:h.activeIndex,activeDataKey:void 0,activeCoordinate:h.activeCoordinate})):r.dispatch(X7())}$l=null,vo=null};if(!u){c();return}i==="raf"?$l=requestAnimationFrame(c):typeof i=="number"&&vo===null&&(vo=setTimeout(c,i))}});function Oye(e,r){return r instanceof HTMLElement?"HTMLElement <".concat(r.tagName,' class="').concat(r.className,'">'):r===window?"global.window":e==="children"&&typeof r=="object"&&r!==null?"<<CHILDREN>>":r}var KM={accessibilityLayer:!0,barCategoryGap:"10%",barGap:4,barSize:void 0,className:void 0,maxBarSize:void 0,stackOffset:"none",syncId:void 0,syncMethod:"index",baseValue:void 0,reverseStackOrder:!1},o$=cr({name:"rootProps",initialState:KM,reducers:{updateOptions:(e,r)=>{var n;e.accessibilityLayer=r.payload.accessibilityLayer,e.barCategoryGap=r.payload.barCategoryGap,e.barGap=(n=r.payload.barGap)!==null&&n!==void 0?n:KM.barGap,e.barSize=r.payload.barSize,e.maxBarSize=r.payload.maxBarSize,e.stackOffset=r.payload.stackOffset,e.syncId=r.payload.syncId,e.syncMethod=r.payload.syncMethod,e.className=r.payload.className,e.baseValue=r.payload.baseValue,e.reverseStackOrder=r.payload.reverseStackOrder}}}),Cye=o$.reducer,{updateOptions:Tye}=o$.actions,Nye=null,Mye={updatePolarOptions:(e,r)=>e===null?r.payload:(e.startAngle=r.payload.startAngle,e.endAngle=r.payload.endAngle,e.cx=r.payload.cx,e.cy=r.payload.cy,e.innerRadius=r.payload.innerRadius,e.outerRadius=r.payload.outerRadius,e)},l$=cr({name:"polarOptions",initialState:Nye,reducers:Mye}),{updatePolarOptions:Y_e}=l$.actions,Pye=l$.reducer,u$=Kr("keyDown"),s$=Kr("focus"),c$=Kr("blur"),fm=Rc(),Ul=null,go=null,Fd=null;fm.startListening({actionCreator:u$,effect:(e,r)=>{Fd=e.payload,Ul!==null&&(cancelAnimationFrame(Ul),Ul=null);var n=r.getState(),{throttleDelay:a,throttledEvents:i}=n.eventSettings,o=i==="all"||i.includes("keydown");go!==null&&(typeof a!="number"||!o)&&(clearTimeout(go),go=null);var u=()=>{try{var c=r.getState(),f=c.rootProps.accessibilityLayer!==!1;if(!f)return;var{keyboardInteraction:d}=c.tooltip,h=Fd;if(h!=="ArrowRight"&&h!=="ArrowLeft"&&h!=="Enter")return;var m=yk(d,gu(c),Fc(c),Gc(c)),g=m==null?-1:Number(m);if(!Number.isFinite(g)||g<0)return;var y=ai(c);if(h==="Enter"){var x=op(c,"axis","hover",String(d.index));r.dispatch(ip({active:!d.active,activeIndex:d.index,activeCoordinate:x}));return}var E=xfe(c),w=E==="left-to-right"?1:-1,_=h==="ArrowRight"?1:-1,A=g+_*w;if(y==null||A>=y.length||A<0)return;var O=op(c,"axis","hover",String(A));r.dispatch(ip({active:!0,activeIndex:A.toString(),activeCoordinate:O}))}finally{Ul=null,go=null}};if(!o){u();return}a==="raf"?Ul=requestAnimationFrame(u):typeof a=="number"&&go===null&&(u(),Fd=null,go=setTimeout(()=>{Fd?u():(go=null,Ul=null)},a))}});fm.startListening({actionCreator:s$,effect:(e,r)=>{var n=r.getState(),a=n.rootProps.accessibilityLayer!==!1;if(a){var{keyboardInteraction:i}=n.tooltip;if(!i.active&&i.index==null){var o="0",u=op(n,"axis","hover",String(o));r.dispatch(ip({active:!0,activeIndex:o,activeCoordinate:u}))}}}});fm.startListening({actionCreator:c$,effect:(e,r)=>{var n=r.getState(),a=n.rootProps.accessibilityLayer!==!1;if(a){var{keyboardInteraction:i}=n.tooltip;i.active&&r.dispatch(ip({active:!1,activeIndex:i.index,activeCoordinate:i.coordinate}))}}});function f$(e){e.persist();var{currentTarget:r}=e;return new Proxy(e,{get:(n,a)=>{if(a==="currentTarget")return r;var i=Reflect.get(n,a);return typeof i=="function"?i.bind(n):i}})}var sn=Kr("externalEvent"),d$=Rc(),Hd=new Map,Is=new Map,U0=new Map;d$.startListening({actionCreator:sn,effect:(e,r)=>{var{handler:n,reactEvent:a}=e.payload;if(n!=null){var i=a.type,o=f$(a);U0.set(i,{handler:n,reactEvent:o});var u=Hd.get(i);u!==void 0&&(cancelAnimationFrame(u),Hd.delete(i));var c=r.getState(),{throttleDelay:f,throttledEvents:d}=c.eventSettings,h=d,m=h==="all"||(h==null?void 0:h.includes(i)),g=Is.get(i);g!==void 0&&(typeof f!="number"||!m)&&(clearTimeout(g),Is.delete(i));var y=()=>{var w=U0.get(i);try{if(!w)return;var{handler:_,reactEvent:A}=w,O=r.getState(),T={activeCoordinate:wde(O),activeDataKey:bde(O),activeIndex:vc(O),activeLabel:uB(O),activeTooltipIndex:vc(O),isTooltipActive:Sde(O)};_&&_(T,A)}finally{Hd.delete(i),Is.delete(i),U0.delete(i)}};if(!m){y();return}if(f==="raf"){var x=requestAnimationFrame(y);Hd.set(i,x)}else if(typeof f=="number"){if(!Is.has(i)){y();var E=setTimeout(y,f);Is.set(i,E)}}else y()}}});var Rye=ue([mu],e=>e.tooltipItemPayloads),Dye=ue([Rye,(e,r)=>r,(e,r,n)=>n],(e,r,n)=>{if(r!=null){var a=e.find(o=>o.settings.graphicalItemId===n);if(a!=null){var{getPosition:i}=a;if(i!=null)return i(r)}}}),h$=Kr("touchMove"),p$=Rc(),yo=null,Di=null,VM=null,zs=null;p$.startListening({actionCreator:h$,effect:(e,r)=>{var n=e.payload;if(!(n.touches==null||n.touches.length===0)){zs=f$(n);var a=r.getState(),{throttleDelay:i,throttledEvents:o}=a.eventSettings,u=o==="all"||o.includes("touchmove");yo!==null&&(cancelAnimationFrame(yo),yo=null),Di!==null&&(typeof i!="number"||!u)&&(clearTimeout(Di),Di=null),VM=Array.from(n.touches).map(f=>Rk({clientX:f.clientX,clientY:f.clientY,currentTarget:n.currentTarget}));var c=()=>{if(zs!=null){var f=r.getState(),d=gk(f,f.tooltip.settings.shared);if(d==="axis"){var h,m=(h=VM)===null||h===void 0?void 0:h[0];if(m==null){yo=null,Di=null;return}var g=Pk(f,m);(g==null?void 0:g.activeIndex)!=null&&r.dispatch(W7({activeIndex:g.activeIndex,activeDataKey:void 0,activeCoordinate:g.activeCoordinate}))}else if(d==="item"){var y,x=zs.touches[0];if(document.elementFromPoint==null||x==null)return;var E=document.elementFromPoint(x.clientX,x.clientY);if(!E||!E.getAttribute)return;var w=E.getAttribute(ple),_=(y=E.getAttribute(mle))!==null&&y!==void 0?y:void 0,A=vu(f).find(C=>C.id===_);if(w==null||A==null||_==null)return;var{dataKey:O}=A,T=Dye(f,w,_);r.dispatch(Cfe({activeDataKey:O,activeIndex:w,activeCoordinate:T,activeGraphicalItemId:_}))}yo=null,Di=null}};if(!u){c();return}i==="raf"?yo=requestAnimationFrame(c):typeof i=="number"&&Di===null&&(c(),zs=null,Di=setTimeout(()=>{zs?c():(Di=null,yo=null)},i))}}});var m$={throttleDelay:"raf",throttledEvents:["mousemove","touchmove","pointermove","scroll","wheel"]},v$=cr({name:"eventSettings",initialState:m$,reducers:{setEventSettings:(e,r)=>{r.payload.throttleDelay!=null&&(e.throttleDelay=r.payload.throttleDelay),r.payload.throttledEvents!=null&&(e.throttledEvents=r.payload.throttledEvents)}}}),{setEventSettings:Lye}=v$.actions,Iye=v$.reducer,zye=Pz({brush:ive,cartesianAxis:Xme,chartData:She,errorBars:xge,eventSettings:Iye,graphicalItems:jme,layout:Joe,legend:lue,options:yhe,polarAxis:Kpe,polarOptions:Pye,referenceElements:hve,renderedTicks:Uve,rootProps:Cye,tooltip:Nfe,zIndex:ihe}),qye=function(r){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"Chart";return Eoe({reducer:zye,preloadedState:r,middleware:a=>{var i;return a({serializableCheck:!1,immutableCheck:!["commonjs","es6","production"].includes((i="es6")!==null&&i!==void 0?i:"")}).concat([a$.middleware,i$.middleware,fm.middleware,d$.middleware,p$.middleware])},enhancers:a=>{var i=a;return typeof a=="function"&&(i=a()),i.concat(Yz({type:"raf"}))},devTools:{serialize:{replacer:Oye},name:"recharts-".concat(n)}})};function Bye(e){var{preloadedState:r,children:n,reduxStoreName:a}=e,i=yr(),o=k.useRef(null);if(i)return n;o.current==null&&(o.current=qye(r,a));var u=LE;return k.createElement(Sue,{context:u,store:o.current},n)}function $ye(e){var{layout:r,margin:n}=e,a=Et(),i=yr();return k.useEffect(()=>{i||(a(Woe(r)),a(Xoe(n)))},[a,i,r,n]),null}var Uye=k.memo($ye,tm);function Fye(e){var r=Et();return k.useEffect(()=>{r(Tye(e))},[r,e]),null}var Hye=e=>{var r=Et();return k.useEffect(()=>{r(Lye(e))},[r,e]),null},Gye=k.memo(Hye,tm);function YM(e){var{zIndex:r,isPanorama:n}=e,a=k.useRef(null),i=Et();return k.useLayoutEffect(()=>(a.current&&i(nhe({zIndex:r,element:a.current,isPanorama:n})),()=>{i(ahe({zIndex:r,isPanorama:n}))}),[i,r,n]),k.createElement("g",{tabIndex:-1,ref:a,className:"recharts-zIndex-layer_".concat(r)})}function XM(e){var{children:r,isPanorama:n}=e,a=je(Vde);if(!a||a.length===0)return r;var i=a.filter(u=>u<0),o=a.filter(u=>u>0);return k.createElement(k.Fragment,null,i.map(u=>k.createElement(YM,{key:u,zIndex:u,isPanorama:n})),r,o.map(u=>k.createElement(YM,{key:u,zIndex:u,isPanorama:n})))}var Kye=["children"];function Vye(e,r){if(e==null)return{};var n,a,i=Yye(e,r);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(a=0;a<o.length;a++)n=o[a],r.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function Yye(e,r){if(e==null)return{};var n={};for(var a in e)if({}.hasOwnProperty.call(e,a)){if(r.indexOf(a)!==-1)continue;n[a]=e[a]}return n}function hp(){return hp=Object.assign?Object.assign.bind():function(e){for(var r=1;r<arguments.length;r++){var n=arguments[r];for(var a in n)({}).hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e},hp.apply(null,arguments)}var Xye={width:"100%",height:"100%",display:"block"},Wye=k.forwardRef((e,r)=>{var n=gq(),a=yq(),i=Cq();if(!la(n)||!la(a))return null;var{children:o,otherAttributes:u,title:c,desc:f}=e,d,h;return u!=null&&(typeof u.tabIndex=="number"?d=u.tabIndex:d=i?0:void 0,typeof u.role=="string"?h=u.role:h=i?"application":void 0),k.createElement(WI,hp({},u,{title:c,desc:f,role:h,tabIndex:d,width:n,height:a,style:Xye,ref:r}),o)}),Zye=e=>{var{children:r}=e,n=je(Zp);if(!n)return null;var{width:a,height:i,y:o,x:u}=n;return k.createElement(WI,{width:a,height:i,x:u,y:o},r)},WM=k.forwardRef((e,r)=>{var{children:n}=e,a=Vye(e,Kye),i=yr();return i?k.createElement(Zye,null,k.createElement(XM,{isPanorama:!0},n)):k.createElement(Wye,hp({ref:r},a),k.createElement(XM,{isPanorama:!1},n))});function Qye(){var e=Et(),[r,n]=k.useState(null),a=je(hle);return k.useEffect(()=>{if(r!=null){var i=r.getBoundingClientRect(),o=i.width/r.offsetWidth;Re(o)&&o!==a&&e(Qoe(o))}},[r,e,a]),n}function ZM(e,r){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);r&&(a=a.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,a)}return n}function Jye(e){for(var r=1;r<arguments.length;r++){var n=arguments[r]!=null?arguments[r]:{};r%2?ZM(Object(n),!0).forEach(function(a){e0e(e,a,n[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ZM(Object(n)).forEach(function(a){Object.defineProperty(e,a,Object.getOwnPropertyDescriptor(n,a))})}return e}function e0e(e,r,n){return(r=t0e(r))in e?Object.defineProperty(e,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[r]=n,e}function t0e(e){var r=r0e(e,"string");return typeof r=="symbol"?r:r+""}function r0e(e,r){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var a=n.call(e,r);if(typeof a!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return(r==="string"?String:Number)(e)}function Ui(){return Ui=Object.assign?Object.assign.bind():function(e){for(var r=1;r<arguments.length;r++){var n=arguments[r];for(var a in n)({}).hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e},Ui.apply(null,arguments)}var n0e=()=>(Mhe(),null);function pp(e){if(typeof e=="number")return e;if(typeof e=="string"){var r=parseFloat(e);if(!Number.isNaN(r))return r}return 0}var a0e=k.forwardRef((e,r)=>{var n,a,i=k.useRef(null),[o,u]=k.useState({containerWidth:pp((n=e.style)===null||n===void 0?void 0:n.width),containerHeight:pp((a=e.style)===null||a===void 0?void 0:a.height)}),c=k.useCallback((d,h)=>{u(m=>{var g=Math.round(d),y=Math.round(h);return m.containerWidth===g&&m.containerHeight===y?m:{containerWidth:g,containerHeight:y}})},[]),f=k.useCallback(d=>{if(typeof r=="function"&&r(d),d!=null&&typeof ResizeObserver<"u"){var{width:h,height:m}=d.getBoundingClientRect();c(h,m);var g=x=>{var E=x[0];if(E!=null){var{width:w,height:_}=E.contentRect;c(w,_)}},y=new ResizeObserver(g);y.observe(d),i.current=y}},[r,c]);return k.useEffect(()=>()=>{var d=i.current;d!=null&&d.disconnect()},[c]),k.createElement(k.Fragment,null,k.createElement(Ic,{width:o.containerWidth,height:o.containerHeight}),k.createElement("div",Ui({ref:f},e)))}),i0e=k.forwardRef((e,r)=>{var{width:n,height:a}=e,[i,o]=k.useState({containerWidth:pp(n),containerHeight:pp(a)}),u=k.useCallback((f,d)=>{o(h=>{var m=Math.round(f),g=Math.round(d);return h.containerWidth===m&&h.containerHeight===g?h:{containerWidth:m,containerHeight:g}})},[]),c=k.useCallback(f=>{if(typeof r=="function"&&r(f),f!=null){var{width:d,height:h}=f.getBoundingClientRect();u(d,h)}},[r,u]);return k.createElement(k.Fragment,null,k.createElement(Ic,{width:i.containerWidth,height:i.containerHeight}),k.createElement("div",Ui({ref:c},e)))}),o0e=k.forwardRef((e,r)=>{var{width:n,height:a}=e;return k.createElement(k.Fragment,null,k.createElement(Ic,{width:n,height:a}),k.createElement("div",Ui({ref:r},e)))}),l0e=k.forwardRef((e,r)=>{var{width:n,height:a}=e;return typeof n=="string"||typeof a=="string"?k.createElement(i0e,Ui({},e,{ref:r})):typeof n=="number"&&typeof a=="number"?k.createElement(o0e,Ui({},e,{width:n,height:a,ref:r})):k.createElement(k.Fragment,null,k.createElement(Ic,{width:n,height:a}),k.createElement("div",Ui({ref:r},e)))});function u0e(e){return e?a0e:l0e}var s0e=k.forwardRef((e,r)=>{var{children:n,className:a,height:i,onClick:o,onContextMenu:u,onDoubleClick:c,onMouseDown:f,onMouseEnter:d,onMouseLeave:h,onMouseMove:m,onMouseUp:g,onTouchEnd:y,onTouchMove:x,onTouchStart:E,style:w,width:_,responsive:A,dispatchTouchEvents:O=!0}=e,T=k.useRef(null),C=Et(),[N,M]=k.useState(null),[R,L]=k.useState(null),D=Qye(),z=FE(),q=(z==null?void 0:z.width)>0?z.width:_,G=(z==null?void 0:z.height)>0?z.height:i,U=k.useCallback(le=>{D(le),typeof r=="function"&&r(le),M(le),L(le),le!=null&&(T.current=le)},[D,r,M,L]),Y=k.useCallback(le=>{C(n$(le)),C(sn({handler:o,reactEvent:le}))},[C,o]),$=k.useCallback(le=>{C(SS(le)),C(sn({handler:d,reactEvent:le}))},[C,d]),J=k.useCallback(le=>{C(X7()),C(sn({handler:h,reactEvent:le}))},[C,h]),re=k.useCallback(le=>{C(SS(le)),C(sn({handler:m,reactEvent:le}))},[C,m]),oe=k.useCallback(()=>{C(s$())},[C]),fe=k.useCallback(()=>{C(c$())},[C]),F=k.useCallback(le=>{C(u$(le.key))},[C]),Z=k.useCallback(le=>{C(sn({handler:u,reactEvent:le}))},[C,u]),ce=k.useCallback(le=>{C(sn({handler:c,reactEvent:le}))},[C,c]),B=k.useCallback(le=>{C(sn({handler:f,reactEvent:le}))},[C,f]),H=k.useCallback(le=>{C(sn({handler:g,reactEvent:le}))},[C,g]),te=k.useCallback(le=>{C(sn({handler:E,reactEvent:le}))},[C,E]),he=k.useCallback(le=>{O&&C(h$(le)),C(sn({handler:x,reactEvent:le}))},[C,O,x]),ge=k.useCallback(le=>{C(sn({handler:y,reactEvent:le}))},[C,y]),W=u0e(A);return k.createElement(mB.Provider,{value:N},k.createElement(nae.Provider,{value:R},k.createElement(W,{width:q??(w==null?void 0:w.width),height:G??(w==null?void 0:w.height),className:Je("recharts-wrapper",a),style:Jye({position:"relative",cursor:"default",width:q,height:G},w),onClick:Y,onContextMenu:Z,onDoubleClick:ce,onFocus:oe,onBlur:fe,onKeyDown:F,onMouseDown:B,onMouseEnter:$,onMouseLeave:J,onMouseMove:re,onMouseUp:H,onTouchEnd:ge,onTouchMove:he,onTouchStart:te,ref:U},k.createElement(n0e,null),n)))}),c0e=["width","height","responsive","children","className","style","compact","title","desc"];function f0e(e,r){if(e==null)return{};var n,a,i=d0e(e,r);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(a=0;a<o.length;a++)n=o[a],r.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function d0e(e,r){if(e==null)return{};var n={};for(var a in e)if({}.hasOwnProperty.call(e,a)){if(r.indexOf(a)!==-1)continue;n[a]=e[a]}return n}var h0e=k.forwardRef((e,r)=>{var{width:n,height:a,responsive:i,children:o,className:u,style:c,compact:f,title:d,desc:h}=e,m=f0e(e,c0e),g=ia(m);return f?k.createElement(k.Fragment,null,k.createElement(Ic,{width:n,height:a}),k.createElement(WM,{otherAttributes:g,title:d,desc:h},o)):k.createElement(s0e,{className:u,style:c,width:n,height:a,responsive:i??!1,onClick:e.onClick,onMouseLeave:e.onMouseLeave,onMouseEnter:e.onMouseEnter,onMouseMove:e.onMouseMove,onMouseDown:e.onMouseDown,onMouseUp:e.onMouseUp,onContextMenu:e.onContextMenu,onDoubleClick:e.onDoubleClick,onTouchStart:e.onTouchStart,onTouchMove:e.onTouchMove,onTouchEnd:e.onTouchEnd},k.createElement(WM,{otherAttributes:g,title:d,desc:h,ref:r},k.createElement(pve,null,o)))});function ES(){return ES=Object.assign?Object.assign.bind():function(e){for(var r=1;r<arguments.length;r++){var n=arguments[r];for(var a in n)({}).hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e},ES.apply(null,arguments)}function QM(e,r){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);r&&(a=a.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,a)}return n}function p0e(e){for(var r=1;r<arguments.length;r++){var n=arguments[r]!=null?arguments[r]:{};r%2?QM(Object(n),!0).forEach(function(a){m0e(e,a,n[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):QM(Object(n)).forEach(function(a){Object.defineProperty(e,a,Object.getOwnPropertyDescriptor(n,a))})}return e}function m0e(e,r,n){return(r=v0e(r))in e?Object.defineProperty(e,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[r]=n,e}function v0e(e){var r=g0e(e,"string");return typeof r=="symbol"?r:r+""}function g0e(e,r){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var a=n.call(e,r);if(typeof a!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return(r==="string"?String:Number)(e)}var y0e={top:5,right:5,bottom:5,left:5},b0e=p0e({accessibilityLayer:!0,barCategoryGap:"10%",barGap:4,layout:"horizontal",margin:y0e,responsive:!1,reverseStackOrder:!1,stackOffset:"none",syncMethod:"index"},m$),x0e=k.forwardRef(function(r,n){var a,i=gr(r.categoricalChartProps,b0e),{chartName:o,defaultTooltipEventType:u,validateTooltipEventTypes:c,tooltipPayloadSearcher:f,categoricalChartProps:d}=r,h={chartName:o,defaultTooltipEventType:u,validateTooltipEventTypes:c,tooltipPayloadSearcher:f,eventEmitter:void 0};return k.createElement(Bye,{preloadedState:{options:h},reduxStoreName:(a=d.id)!==null&&a!==void 0?a:o},k.createElement(ave,{chartData:d.data}),k.createElement(Uye,{layout:i.layout,margin:i.margin}),k.createElement(Gye,{throttleDelay:i.throttleDelay,throttledEvents:i.throttledEvents}),k.createElement(Fye,{baseValue:i.baseValue,accessibilityLayer:i.accessibilityLayer,barCategoryGap:i.barCategoryGap,maxBarSize:i.maxBarSize,stackOffset:i.stackOffset,barGap:i.barGap,barSize:i.barSize,syncId:i.syncId,syncMethod:i.syncMethod,className:i.className,reverseStackOrder:i.reverseStackOrder}),k.createElement(h0e,ES({},i,{ref:n})))}),_0e=["axis"],w0e=k.forwardRef((e,r)=>k.createElement(x0e,{chartName:"LineChart",defaultTooltipEventType:"axis",validateTooltipEventTypes:_0e,tooltipPayloadSearcher:vhe,categoricalChartProps:e,ref:r}));const JM={dailyPercent:"#58A6FF",weeklyPercent:"#A371F7",sonnetPercent:"#3FB950",extraPercent:"#D29922"},S0e={dailyPercent:"Daily",weeklyPercent:"Weekly",sonnetPercent:"Sonnet",extraPercent:"Extra"},E0e=["dailyPercent","weeklyPercent","sonnetPercent","extraPercent"];function k0e(e){return e.toLocaleString(void 0,{month:"short",day:"numeric",hour:"2-digit",minute:"2-digit"})}function j0e(e){return new Date(e).toLocaleString(void 0,{month:"short",day:"numeric",hour:"2-digit",minute:"2-digit"})}function A0e({active:e,payload:r,label:n}){return!e||!r||r.length===0||n===void 0?null:b.jsxs("div",{className:"bg-dark-surface border border-dark-border rounded-md px-3 py-2 shadow-lg",children:[b.jsx("p",{className:"text-xs text-dark-muted mb-1",children:j0e(n)}),r.map(a=>b.jsxs("div",{className:"flex items-center gap-2 text-xs",children:[b.jsx("span",{className:"inline-block w-2 h-2 rounded-full",style:{backgroundColor:a.color}}),b.jsxs("span",{className:"text-dark-text",children:[S0e[a.dataKey]??a.dataKey,":"]}),b.jsxs("span",{className:"text-dark-text font-semibold tabular-nums",children:[a.value.toFixed(1),"%"]})]},a.dataKey))]})}function O0e({snapshots:e,redThresholds:r}){const n=k.useMemo(()=>{const o=Date.now()-10080*60*1e3;return e.map(u=>({time:new Date(u.recordedAt).getTime(),dailyPercent:u.dailyPercent,weeklyPercent:u.weeklyPercent,sonnetPercent:u.sonnetPercent,extraPercent:u.extraPercent})).filter(u=>u.time>=o).sort((u,c)=>u.time-c.time)},[e]),a=k.useMemo(()=>{const i=Date.now();return[i-10080*60*1e3,i]},[n]);return n.length===0?b.jsx("div",{className:"flex items-center justify-center py-12",children:b.jsx("p",{className:"text-dark-muted text-sm",children:"No usage data in the last 7 days"})}):b.jsx("div",{className:"w-full h-72",children:b.jsx(Fle,{width:"100%",height:"100%",children:b.jsxs(w0e,{data:n,margin:{top:8,right:16,bottom:8,left:0},children:[b.jsx(HB,{strokeDasharray:"3 3",stroke:"rgba(48, 54, 61, 0.6)",vertical:!1}),b.jsx(t$,{dataKey:"time",type:"number",domain:a,tickFormatter:i=>k0e(new Date(i)),stroke:"#8B949E",tick:{fill:"#8B949E",fontSize:11},axisLine:{stroke:"#30363D"},tickLine:{stroke:"#30363D"}}),b.jsx(r$,{domain:[0,100],ticks:[0,25,50,75,100],tickFormatter:i=>`${i}%`,stroke:"#8B949E",tick:{fill:"#8B949E",fontSize:11},axisLine:{stroke:"#30363D"},tickLine:{stroke:"#30363D"},width:48}),b.jsx(Bhe,{content:b.jsx(A0e,{}),cursor:{stroke:"rgba(139, 148, 158, 0.3)"}}),b.jsx(yS,{y:r.daily,stroke:"#F85149",strokeDasharray:"6 4",strokeOpacity:.6,label:{value:`Daily ${r.daily}%`,position:"right",fill:"#F85149",fontSize:10}}),b.jsx(yS,{y:r.weekly,stroke:"#A371F7",strokeDasharray:"6 4",strokeOpacity:.6,label:{value:`Weekly ${r.weekly}%`,position:"right",fill:"#A371F7",fontSize:10}}),E0e.map(i=>b.jsx(JB,{type:"monotone",dataKey:i,stroke:JM[i],strokeWidth:2,dot:!1,activeDot:{r:4,fill:JM[i],stroke:"#161B22",strokeWidth:2}},i))]})})})}const C0e=3e4,T0e={daily:85,weekly:95,sonnet:95,extra:95},N0e=[{label:"Daily Usage",key:"dailyPercent",thresholdKey:"daily",resetKey:"dailyResetsAt"},{label:"Weekly Usage",key:"weeklyPercent",thresholdKey:"weekly",resetKey:"weeklyResetsAt"},{label:"Sonnet Usage",key:"sonnetPercent",thresholdKey:"sonnet",resetKey:null},{label:"Extra Usage",key:"extraPercent",thresholdKey:"extra",resetKey:null}];function M0e(e){return new Date(e).toLocaleString(void 0,{month:"short",day:"numeric",hour:"2-digit",minute:"2-digit"})}function P0e(){const e=Ut(),[r,n]=k.useState(null),[a,i]=k.useState(T0e),[o,u]=k.useState([]),[c,f]=k.useState(!0),[d,h]=k.useState(null),m=k.useCallback(async()=>{try{const[y,x]=await Promise.all([e.get("usage"),e.get("usage/history?limit=1000")]);n(y),y.redThresholds&&i(y.redThresholds),u(x.snapshots),h(null)}catch(y){h(y instanceof Error?y.message:"Failed to fetch usage data")}finally{f(!1)}},[e]);k.useEffect(()=>{m();const y=setInterval(()=>{m()},C0e);return()=>clearInterval(y)},[m]);const g=k.useCallback(y=>{y==="usage_updated"&&m()},[m]);return PS({onEvent:g}),b.jsxs("div",{className:"p-6 max-w-4xl mx-auto flex flex-col gap-8",children:[b.jsxs("section",{className:"flex flex-col gap-2 py-4",children:[b.jsx("h2",{className:"text-xs font-medium text-dark-muted uppercase tracking-widest mb-4",children:"Usage Overview"}),c&&!r?b.jsx("p",{className:"text-dark-muted text-lg text-center py-8",children:"Loading..."}):d&&!r?b.jsx("p",{className:"text-[#F85149] text-sm text-center py-8",children:d}):r?b.jsxs("div",{className:"flex flex-col gap-4",children:[N0e.map(y=>{const x=r[y.key]??0,E=X6(x,a[y.thresholdKey]),w=Math.min(Math.max(x,0),100);return b.jsxs("div",{className:"flex flex-col gap-1",children:[b.jsxs("div",{className:"flex justify-between items-center",children:[b.jsx("span",{className:"text-sm font-medium text-dark-text",children:y.label}),b.jsxs("span",{className:"text-sm font-semibold tabular-nums",style:{color:E},children:[x.toFixed(1),"%"]})]}),b.jsx("div",{className:"w-full h-6 bg-dark-base rounded-md overflow-hidden border border-dark-border",children:b.jsx("div",{className:"h-full rounded-md transition-all duration-500 ease-out",style:{width:`${Math.max(w,.5)}%`,backgroundColor:E+"40",borderRight:w>0?`2px solid ${E}`:"none"}})}),y.resetKey&&(()=>{const _=u2(r[y.resetKey]);return _?b.jsx("p",{className:"text-xs text-gray-500 mt-0.5",children:_}):null})()]},y.key)}),r.recordedAt&&b.jsxs("p",{className:"text-xs text-dark-muted mt-2",children:["Last updated: ",M0e(r.recordedAt)]})]}):null]}),b.jsxs("section",{children:[b.jsx("h3",{className:"text-sm font-medium text-dark-muted uppercase tracking-wider mb-3",children:"Last 7 Days"}),b.jsx("div",{className:"bg-dark-surface rounded-lg border border-dark-border p-4",children:b.jsx(O0e,{snapshots:o,redThresholds:a})})]})]})}function eP(e){const[r,n]=k.useState(!1),[a,i]=k.useState(e),o=k.useRef(null),u=k.useRef(!1),c=k.useCallback(h=>{i(h),n(!0),u.current=!1,setTimeout(()=>{var m;return(m=o.current)==null?void 0:m.focus()},50)},[]),f=k.useCallback(()=>{n(!1),u.current=!1},[]),d=k.useCallback(()=>u.current?null:(u.current=!0,n(!1),a),[a]);return{isEditing:r,editValue:a,inputRef:o,startEdit:c,cancelEdit:f,confirmEdit:d,setEditValue:i}}function R0e({open:e,onClose:r,onAdded:n}){const a=Ut(),[i,o]=k.useState(""),[u,c]=k.useState(""),[f,d]=k.useState(""),[h,m]=k.useState(5),[g,y]=k.useState(""),[x,E]=k.useState(!1),[w,_]=k.useState(null),[A,O]=k.useState([]),[T,C]=k.useState(!1),[N,M]=k.useState(-1),[R,L]=k.useState(""),D=k.useRef(null),z=k.useRef(null),q=k.useRef(null),G=k.useRef(null),U=k.useRef(null);k.useEffect(()=>()=>{U.current&&clearTimeout(U.current)},[]),k.useEffect(()=>{if(e){const B=setTimeout(()=>{var H;return(H=D.current)==null?void 0:H.focus()},50);return()=>clearTimeout(B)}},[e]),k.useEffect(()=>{e&&(o(""),c(""),d(""),m(5),y(""),_(null),E(!1),O([]),C(!1),M(-1),L(""))},[e]),k.useEffect(()=>{if(!e)return;function B(H){H.key==="Escape"&&(T?C(!1):r())}return document.addEventListener("keydown",B),()=>document.removeEventListener("keydown",B)},[e,r,T]),k.useEffect(()=>{if(!T)return;function B(H){const te=H.target;q.current&&!q.current.contains(te)&&G.current&&!G.current.contains(te)&&C(!1)}return document.addEventListener("mousedown",B),()=>document.removeEventListener("mousedown",B)},[T]);const Y=k.useCallback(B=>{z.current&&!z.current.contains(B.target)&&r()},[r]),$=k.useCallback(async B=>{if(!B.trim()){O([]),C(!1);return}try{const H=encodeURIComponent(B),te=await a.get(`system/browse-dirs?path=${H}`);O(te.dirs),L(te.parentPath),C(te.dirs.length>0),M(-1)}catch{O([]),C(!1)}},[a]),J=k.useCallback(B=>{c(B),U.current&&clearTimeout(U.current);const H=B.endsWith("/")||B.endsWith("\\")?B:B.substring(0,Math.max(B.lastIndexOf("/"),B.lastIndexOf("\\"))+1);H?U.current=setTimeout(()=>{$(H)},300):(O([]),C(!1))},[$]),re=k.useCallback(B=>{var H;c(B.path),C(!1),M(-1),i.trim()||o(B.name),B.isGitRepo||setTimeout(()=>{$(B.path+"/")},100),(H=q.current)==null||H.focus()},[i,$]),oe=k.useCallback(()=>{if(!R)return;const B=R.replace(/\/[^/]+\/?$/,"");B&&B!==R&&(c(B),$(B+"/"))},[R,$]),fe=A.length===0||u===R?!1:A.some(B=>B.path===u&&B.isGitRepo),F=k.useCallback(async()=>{if(_(null),!i.trim()){_("Project name is required");return}if(!u.trim()){_("Repository path is required");return}E(!0);try{await a.post("projects",{name:i.trim(),repoPath:u.trim(),githubRepo:f.trim()||void 0,maxActiveTeams:h,model:g.trim()||void 0}),n()}catch(B){const H=B instanceof Error?B.message:String(B);_(H||"Failed to add project")}finally{E(!1)}},[i,u,f,h,g,a,n]),Z=k.useCallback(B=>{if(T&&A.length>0){if(B.key==="ArrowDown"){B.preventDefault(),M(H=>H<A.length-1?H+1:0);return}if(B.key==="ArrowUp"){B.preventDefault(),M(H=>H>0?H-1:A.length-1);return}if(B.key==="Enter"&&N>=0){B.preventDefault(),re(A[N]);return}if(B.key==="Tab"&&N>=0){B.preventDefault(),re(A[N]);return}}B.key==="Enter"&&!x&&F()},[T,A,N,re,x,F]),ce=k.useCallback(B=>{B.key==="Enter"&&!x&&F()},[x,F]);return e?b.jsx("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-black/50",onClick:Y,children:b.jsxs("div",{ref:z,className:"w-[480px] max-w-[95vw] bg-dark-surface border border-dark-border rounded-lg shadow-2xl",role:"dialog","aria-modal":"true","aria-label":"Add Project",children:[b.jsxs("div",{className:"flex items-center justify-between px-5 py-4 border-b border-dark-border",children:[b.jsx("h2",{className:"text-base font-semibold text-dark-text",children:"Add Project"}),b.jsx("button",{onClick:r,className:"text-dark-muted hover:text-dark-text transition-colors p-1 rounded hover:bg-dark-border/30",title:"Close (Esc)",children:b.jsx("svg",{className:"w-4 h-4",viewBox:"0 0 20 20",fill:"currentColor",children:b.jsx("path",{fillRule:"evenodd",d:"M4.293 4.293a1 1 0 011.414 0L10 8.586l4.293-4.293a1 1 0 111.414 1.414L11.414 10l4.293 4.293a1 1 0 01-1.414 1.414L10 11.414l-4.293 4.293a1 1 0 01-1.414-1.414L8.586 10 4.293 5.707a1 1 0 010-1.414z",clipRule:"evenodd"})})})]}),b.jsxs("div",{className:"px-5 py-4 space-y-4",children:[b.jsxs("div",{children:[b.jsxs("label",{className:"block text-sm text-dark-muted mb-1",children:["Project Name ",b.jsx("span",{className:"text-[#F85149]",children:"*"})]}),b.jsx("input",{ref:D,type:"text",value:i,onChange:B=>o(B.target.value),onKeyDown:ce,placeholder:"my-project",className:"w-full px-3 py-2 text-sm rounded border border-dark-border bg-dark-base text-dark-text placeholder:text-dark-muted/50 focus:outline-none focus:border-dark-accent focus:ring-1 focus:ring-dark-accent/30",disabled:x})]}),b.jsxs("div",{className:"relative",children:[b.jsxs("label",{className:"block text-sm text-dark-muted mb-1",children:["Repository Path ",b.jsx("span",{className:"text-[#F85149]",children:"*"})]}),b.jsxs("div",{className:"relative",children:[b.jsx("input",{ref:q,type:"text",value:u,onChange:B=>J(B.target.value),onKeyDown:Z,onFocus:()=>{A.length>0&&C(!0)},placeholder:"C:/Git/my-repo",className:`w-full px-3 py-2 text-sm rounded border bg-dark-base text-dark-text placeholder:text-dark-muted/50 focus:outline-none focus:ring-1 ${fe?"border-green-500/50 focus:border-green-500 focus:ring-green-500/30":"border-dark-border focus:border-dark-accent focus:ring-dark-accent/30"}`,disabled:x,autoComplete:"off"}),fe&&b.jsx("span",{className:"absolute right-2 top-1/2 -translate-y-1/2 text-green-400",title:"Valid git repository",children:b.jsx("svg",{className:"w-4 h-4",viewBox:"0 0 20 20",fill:"currentColor",children:b.jsx("path",{fillRule:"evenodd",d:"M16.707 5.293a1 1 0 010 1.414l-8 8a1 1 0 01-1.414 0l-4-4a1 1 0 011.414-1.414L8 12.586l7.293-7.293a1 1 0 011.414 0z",clipRule:"evenodd"})})})]}),b.jsx("p",{className:"mt-1 text-xs text-dark-muted/60",children:"Type a path and subdirectories will appear. End with / to browse."}),T&&A.length>0&&b.jsxs("div",{ref:G,className:"absolute z-10 left-0 right-0 mt-1 max-h-48 overflow-y-auto rounded border border-dark-border bg-dark-base shadow-lg",children:[R&&b.jsxs("button",{type:"button",onClick:oe,className:"w-full flex items-center gap-2 px-3 py-1.5 text-sm text-dark-muted hover:bg-dark-border/30 hover:text-dark-text transition-colors text-left",children:[b.jsx("svg",{className:"w-3.5 h-3.5 shrink-0",viewBox:"0 0 20 20",fill:"currentColor",children:b.jsx("path",{fillRule:"evenodd",d:"M9.707 14.707a1 1 0 01-1.414 0l-4-4a1 1 0 010-1.414l4-4a1 1 0 011.414 1.414L7.414 9H15a1 1 0 110 2H7.414l2.293 2.293a1 1 0 010 1.414z",clipRule:"evenodd"})}),b.jsx("span",{children:".."}),b.jsx("span",{className:"ml-auto text-xs text-dark-muted/50 truncate",children:R})]}),A.map((B,H)=>b.jsxs("button",{type:"button",onClick:()=>re(B),className:`w-full flex items-center gap-2 px-3 py-1.5 text-sm transition-colors text-left ${H===N?"bg-dark-accent/20 text-dark-text":"text-dark-text hover:bg-dark-border/30"}`,children:[B.isGitRepo?b.jsx("span",{className:"w-3.5 h-3.5 shrink-0 rounded-full bg-green-500/80 inline-flex items-center justify-center",title:"Git repository",children:b.jsx("svg",{className:"w-2 h-2 text-white",viewBox:"0 0 20 20",fill:"currentColor",children:b.jsx("path",{fillRule:"evenodd",d:"M16.707 5.293a1 1 0 010 1.414l-8 8a1 1 0 01-1.414 0l-4-4a1 1 0 011.414-1.414L8 12.586l7.293-7.293a1 1 0 011.414 0z",clipRule:"evenodd"})})}):b.jsx("svg",{className:"w-3.5 h-3.5 shrink-0 text-dark-muted/50",viewBox:"0 0 20 20",fill:"currentColor",children:b.jsx("path",{d:"M2 6a2 2 0 012-2h5l2 2h5a2 2 0 012 2v6a2 2 0 01-2 2H4a2 2 0 01-2-2V6z"})}),b.jsx("span",{className:"truncate",children:B.name}),B.isGitRepo&&b.jsx("span",{className:"ml-auto text-xs text-green-400/70 shrink-0",children:"git"})]},B.path))]})]}),b.jsxs("div",{children:[b.jsxs("label",{className:"block text-sm text-dark-muted mb-1",children:["GitHub Repo ",b.jsx("span",{className:"text-dark-muted/50",children:"(optional)"})]}),b.jsx("input",{type:"text",value:f,onChange:B=>d(B.target.value),onKeyDown:ce,placeholder:"org/repo (auto-detected)",className:"w-full px-3 py-2 text-sm rounded border border-dark-border bg-dark-base text-dark-text placeholder:text-dark-muted/50 focus:outline-none focus:border-dark-accent focus:ring-1 focus:ring-dark-accent/30",disabled:x})]}),b.jsxs("div",{children:[b.jsx("label",{className:"block text-sm text-dark-muted mb-1",children:"Max Active Teams"}),b.jsx("input",{type:"number",value:h,onChange:B=>m(Math.max(1,Math.min(50,parseInt(B.target.value,10)||1))),onKeyDown:ce,min:1,max:50,className:"w-full px-3 py-2 text-sm rounded border border-dark-border bg-dark-base text-dark-text placeholder:text-dark-muted/50 focus:outline-none focus:border-dark-accent focus:ring-1 focus:ring-dark-accent/30",disabled:x}),b.jsx("p",{className:"mt-1 text-xs text-dark-muted/60",children:"Max concurrent active teams before new launches are queued (1-50, default: 5)."})]}),b.jsxs("div",{children:[b.jsxs("label",{className:"block text-sm text-dark-muted mb-1",children:["Model ",b.jsx("span",{className:"text-dark-muted/50",children:"(optional)"})]}),b.jsx("input",{type:"text",value:g,onChange:B=>y(B.target.value),onKeyDown:ce,placeholder:"e.g. opus, sonnet, claude-opus-4-6",className:"w-full px-3 py-2 text-sm rounded border border-dark-border bg-dark-base text-dark-text placeholder:text-dark-muted/50 focus:outline-none focus:border-dark-accent focus:ring-1 focus:ring-dark-accent/30",disabled:x}),b.jsx("p",{className:"mt-1 text-xs text-dark-muted/60",children:"Claude model to use for teams in this project. Empty uses the default model."})]}),w&&b.jsx("div",{className:"px-3 py-2 rounded border border-[#F85149]/30 bg-[#F85149]/10 text-[#F85149] text-sm",children:w})]}),b.jsxs("div",{className:"flex items-center justify-end gap-3 px-5 py-4 border-t border-dark-border",children:[b.jsx("button",{onClick:r,className:"px-3 py-1.5 text-sm rounded border border-dark-border text-dark-muted hover:text-dark-text hover:border-dark-muted transition-colors",disabled:x,children:"Cancel"}),b.jsx("button",{onClick:F,disabled:x,className:"px-4 py-1.5 text-sm font-medium rounded border border-dark-accent/40 text-dark-accent bg-dark-accent/10 hover:bg-dark-accent/20 transition-colors disabled:opacity-40 disabled:cursor-not-allowed",children:x?"Adding...":"Add Project"})]})]})}):null}const tP={worktree:0,signal_file:1,stale_branch:2,team_record:3},D0e={worktree:"Worktrees",signal_file:"Signal Files",stale_branch:"Branches",team_record:"Database Records"},L0e={worktree:"📁",signal_file:"📄",stale_branch:"🌿",team_record:"🗑️"};function I0e(e){const r=[...e].sort((a,i)=>tP[a.type]-tP[i.type]),n=new Map;for(const a of r)n.has(a.type)||n.set(a.type,[]),n.get(a.type).push(a);return n}function z0e({projectId:e,open:r,onClose:n,onDone:a}){const i=Ut(),o=k.useRef(null),[u,c]=k.useState("loading"),[f,d]=k.useState(null),[h,m]=k.useState(new Set),[g,y]=k.useState(null),[x,E]=k.useState(null),[w,_]=k.useState(!1),A=k.useCallback(()=>{u==="result"&&a(),_(!1),n()},[u,n,a]);k.useEffect(()=>{if(!r)return;c("loading"),d(null),m(new Set),y(null),E(null);let L=!1;return(async()=>{try{const D=w?"?resetTeams=true":"",z=await i.get(`projects/${e}/cleanup-preview${D}`);if(L)return;d(z),m(new Set(z.items.map(q=>q.path))),c("preview")}catch(D){if(L)return;E(D instanceof Error?D.message:String(D)),c("preview")}})(),()=>{L=!0}},[r,e,i,w]),k.useEffect(()=>{if(!r)return;function L(D){D.key==="Escape"&&u!=="executing"&&A()}return document.addEventListener("keydown",L),()=>document.removeEventListener("keydown",L)},[r,u,A]);const O=k.useCallback(L=>{m(D=>{const z=new Set(D);return z.has(L)?z.delete(L):z.add(L),z})},[]),T=k.useCallback(()=>{f&&m(new Set(f.items.map(L=>L.path)))},[f]),C=k.useCallback(()=>{m(new Set)},[]),N=k.useCallback(async()=>{if(h.size!==0){c("executing"),E(null);try{const L=await i.post(`projects/${e}/cleanup`,{items:Array.from(h),resetTeams:w});y(L),c("result")}catch(L){E(L instanceof Error?L.message:String(L)),c("preview")}}},[i,e,h,w]),M=k.useCallback(L=>{o.current&&!o.current.contains(L.target)&&A()},[A]);if(!r)return null;const R=f?I0e(f.items):new Map;return b.jsx("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-black/60",onClick:M,children:b.jsxs("div",{ref:o,className:"w-[560px] max-w-[95vw] max-h-[80vh] flex flex-col bg-dark-surface border border-dark-border rounded-lg shadow-2xl",role:"dialog","aria-modal":"true","aria-label":"Clean Up",children:[b.jsxs("div",{className:"flex items-center justify-between px-5 py-4 border-b border-dark-border shrink-0",children:[b.jsxs("h2",{className:"text-base font-semibold text-dark-text",children:["Clean Up",f?` — ${f.projectName}`:""]}),b.jsx("button",{onClick:A,className:"text-dark-muted hover:text-dark-text transition-colors p-1 rounded hover:bg-dark-border/30",title:"Close (Esc)",children:b.jsx("svg",{className:"w-4 h-4",viewBox:"0 0 20 20",fill:"currentColor",children:b.jsx("path",{fillRule:"evenodd",d:"M4.293 4.293a1 1 0 011.414 0L10 8.586l4.293-4.293a1 1 0 111.414 1.414L11.414 10l4.293 4.293a1 1 0 01-1.414 1.414L10 11.414l-4.293 4.293a1 1 0 01-1.414-1.414L8.586 10 4.293 5.707a1 1 0 010-1.414z",clipRule:"evenodd"})})})]}),b.jsxs("div",{className:"flex-1 overflow-y-auto px-5 py-4 min-h-0",children:[u==="loading"&&b.jsx("div",{className:"flex items-center justify-center py-12",children:b.jsx("p",{className:"text-dark-muted text-sm",children:"Scanning for items to clean up..."})}),x&&b.jsx("div",{className:"mb-4 px-3 py-2 rounded border border-[#F85149]/30 bg-[#F85149]/10 text-[#F85149] text-sm",children:x}),u==="preview"&&f&&b.jsx("div",{className:"mb-4",children:b.jsxs("label",{className:"flex items-start gap-2.5 px-3 py-2.5 rounded border border-dark-border/50 hover:border-dark-border bg-dark-base/50 cursor-pointer transition-colors",children:[b.jsx("input",{type:"checkbox",checked:w,onChange:L=>_(L.target.checked),className:"mt-0.5 accent-[#F85149] shrink-0"}),b.jsxs("div",{className:"min-w-0 flex-1",children:[b.jsx("div",{className:"text-sm text-dark-text font-medium",children:"Reset team history"}),w&&b.jsx("div",{className:"text-xs text-[#F85149]/80 mt-1",children:"This will delete all team records, events, and commands for this project from the database. The project will be like freshly added."})]})]})}),u==="preview"&&f&&f.items.length===0&&!x&&b.jsxs("div",{className:"flex flex-col items-center justify-center py-12 gap-2",children:[b.jsx("span",{className:"text-3xl",children:"✨"}),b.jsx("p",{className:"text-dark-muted text-sm",children:"Nothing to clean up!"}),b.jsx("p",{className:"text-dark-muted/60 text-xs",children:"This project is already tidy."})]}),u==="preview"&&f&&f.items.length>0&&b.jsxs(b.Fragment,{children:[b.jsxs("div",{className:"flex items-center gap-3 mb-3",children:[b.jsx("button",{onClick:T,className:"text-xs text-dark-accent hover:underline",children:"Select All"}),b.jsx("button",{onClick:C,className:"text-xs text-dark-muted hover:underline",children:"Deselect All"}),b.jsxs("span",{className:"ml-auto text-xs text-dark-muted",children:[h.size," of ",f.items.length," selected"]})]}),Array.from(R.entries()).map(([L,D])=>b.jsxs("div",{className:"mb-4",children:[b.jsxs("h3",{className:"text-xs font-semibold text-dark-muted uppercase tracking-wider mb-2",children:[L0e[L]," ",D0e[L]," (",D.length,")"]}),b.jsx("div",{className:"space-y-1",children:D.map(z=>b.jsxs("label",{className:"flex items-start gap-2.5 px-3 py-2 rounded border border-dark-border/50 hover:border-dark-border bg-dark-base/50 cursor-pointer transition-colors",children:[b.jsx("input",{type:"checkbox",checked:h.has(z.path),onChange:()=>O(z.path),className:"mt-0.5 accent-[#F85149] shrink-0"}),b.jsxs("div",{className:"min-w-0 flex-1",children:[b.jsx("div",{className:"text-sm text-dark-text truncate",title:z.path,children:z.name}),b.jsx("div",{className:"text-xs text-dark-muted/70 truncate",children:z.reason})]})]},z.path))})]},L))]}),u==="executing"&&b.jsx("div",{className:"flex items-center justify-center py-12",children:b.jsxs("p",{className:"text-dark-muted text-sm",children:["Removing ",h.size," item",h.size!==1?"s":"","..."]})}),u==="result"&&g&&b.jsxs("div",{className:"py-4 space-y-3",children:[g.removed.length>0&&b.jsxs("div",{children:[b.jsxs("p",{className:"text-sm text-dark-text font-medium mb-1",children:["Removed ",g.removed.length," item",g.removed.length!==1?"s":""]}),b.jsx("ul",{className:"space-y-0.5",children:g.removed.map(L=>b.jsxs("li",{className:"text-xs text-dark-muted flex items-center gap-1.5",children:[b.jsx("span",{className:"text-green-400",children:"✓"})," ",L]},L))})]}),g.failed.length>0&&b.jsxs("div",{children:[b.jsxs("p",{className:"text-sm text-[#F85149] font-medium mb-1",children:[g.failed.length," failed"]}),b.jsx("ul",{className:"space-y-0.5",children:g.failed.map(L=>b.jsxs("li",{className:"text-xs text-[#F85149]/80 flex items-start gap-1.5",children:[b.jsx("span",{className:"shrink-0",children:"✗"}),b.jsxs("span",{className:"truncate",title:L.error,children:[L.name,": ",L.error]})]},L.name))})]}),g.removed.length===0&&g.failed.length===0&&b.jsx("p",{className:"text-sm text-dark-muted",children:"No items were removed."})]})]}),b.jsxs("div",{className:"flex items-center justify-end gap-3 px-5 py-4 border-t border-dark-border shrink-0",children:[u==="preview"&&f&&f.items.length>0&&b.jsxs(b.Fragment,{children:[b.jsx("button",{onClick:A,className:"px-3 py-1.5 text-sm rounded border border-dark-border text-dark-muted hover:text-dark-text hover:border-dark-muted transition-colors",children:"Cancel"}),b.jsxs("button",{onClick:N,disabled:h.size===0,className:"px-4 py-1.5 text-sm font-medium rounded border border-[#F85149]/40 text-[#F85149] bg-[#F85149]/10 hover:bg-[#F85149]/20 transition-colors disabled:opacity-40 disabled:cursor-not-allowed",children:["Remove Selected (",h.size,")"]})]}),(u==="result"||u==="preview"&&(!f||f.items.length===0))&&b.jsx("button",{onClick:A,className:"px-4 py-1.5 text-sm font-medium rounded border border-dark-border text-dark-muted hover:text-dark-text hover:border-dark-muted transition-colors",children:"Close"})]})]})})}function q0e({items:e}){const[r,n]=k.useState(!1),a=k.useRef(null),i=k.useCallback(o=>{o.stopPropagation(),n(u=>!u)},[]);return k.useEffect(()=>{if(!r)return;function o(u){a.current&&!a.current.contains(u.target)&&n(!1)}return document.addEventListener("mousedown",o),()=>document.removeEventListener("mousedown",o)},[r]),k.useEffect(()=>{if(!r)return;function o(u){u.key==="Escape"&&n(!1)}return document.addEventListener("keydown",o),()=>document.removeEventListener("keydown",o)},[r]),b.jsxs("div",{ref:a,className:"relative",children:[b.jsx("button",{onClick:i,className:"p-1 rounded text-dark-muted hover:text-dark-text hover:bg-dark-border/30 transition-colors",title:"More actions",children:b.jsx(FK,{size:16})}),r&&b.jsx("div",{className:"absolute right-0 top-full mt-1 z-20 min-w-[140px] bg-dark-surface border border-dark-border rounded-lg shadow-lg py-1",children:e.map(o=>b.jsx("button",{onClick:u=>{u.stopPropagation(),n(!1),o.onClick()},className:`w-full text-left px-3 py-1.5 text-xs transition-colors ${o.danger?"text-[#F85149] hover:bg-[#F85149]/10":"text-dark-muted hover:text-dark-text hover:bg-dark-border/30"}`,children:o.label},o.label))})]})}const rP={active:{bg:"#3FB95020",text:"#3FB950",border:"#3FB95040"},archived:{bg:"#8B949E20",text:"#8B949E",border:"#8B949E40"}};function B0e(e){var d,h,m,g,y,x;if(!e.installStatus)return"#8B949E";const r=e.installStatus,n=((d=r.hooks)==null?void 0:d.installed)??!1,a=((m=(h=r.hooks)==null?void 0:h.files)==null?void 0:m.some(E=>E.hasCrlf))??!1,i=((g=r.prompt)==null?void 0:g.installed)??!1,o=((y=r.agents)==null?void 0:y.installed)??!1,u=((x=r.settings)==null?void 0:x.exists)??!1;return n&&!a&&i&&o&&u?"#3FB950":n||i||o||u||a?"#D29922":"#F85149"}function $0e(e){switch(e){case"#3FB950":return"All installed";case"#D29922":return"Partially installed";case"#F85149":return"Not installed";default:return"Unknown"}}function U0e({project:e}){var o,u,c,f,d,h,m,g,y,x,E,w,_,A,O,T,C;if(!e.installStatus)return b.jsx("span",{className:"text-xs text-dark-muted",title:"Install status unknown",children:"Status unknown"});const r=e.installStatus,n=[{key:"hooks",label:"hooks",installed:((o=r.hooks)==null?void 0:o.installed)??!1,hasCrlf:((c=(u=r.hooks)==null?void 0:u.files)==null?void 0:c.some(N=>N.hasCrlf))??!1,somePresent:(((f=r.hooks)==null?void 0:f.found)??0)>0,files:((d=r.hooks)==null?void 0:d.files)??[],summary:`Hook Scripts (${((h=r.hooks)==null?void 0:h.found)??0}/${((m=r.hooks)==null?void 0:m.total)??0})`},{key:"prompt",label:"prompt",installed:((g=r.prompt)==null?void 0:g.installed)??!1,hasCrlf:!1,somePresent:((x=(y=r.prompt)==null?void 0:y.files)==null?void 0:x.some(N=>N.exists))??!1,files:((E=r.prompt)==null?void 0:E.files)??[],summary:"Prompt Files"},{key:"agents",label:"agents",installed:((w=r.agents)==null?void 0:w.installed)??!1,hasCrlf:!1,somePresent:((A=(_=r.agents)==null?void 0:_.files)==null?void 0:A.some(N=>N.exists))??!1,files:((O=r.agents)==null?void 0:O.files)??[],summary:"Agent Templates"}],a=[{key:"settings",label:"settings",exists:((T=r.settings)==null?void 0:T.exists)??!1,tooltip:(C=r.settings)!=null&&C.exists?"settings.json found":"settings.json missing"}],i=r.repoSettings;return b.jsxs("div",{className:"flex items-center gap-3 text-xs flex-wrap",children:[n.map(N=>{const M=N.installed&&!N.hasCrlf?"#3FB950":N.hasCrlf||N.somePresent?"#D29922":"#F85149",R=N.installed&&!N.hasCrlf?"✓":N.hasCrlf||N.somePresent?"⚠":"✗";return b.jsxs("div",{className:"relative group shrink-0",children:[b.jsxs("span",{className:"cursor-default",style:{color:M},children:[R," ",N.label]}),b.jsxs("div",{className:"hidden group-hover:block absolute z-10 bottom-full left-0 mb-1 p-2 rounded bg-[#1C2128] border border-[#30363D] shadow-lg text-xs min-w-48 max-h-64 overflow-auto",children:[b.jsx("div",{className:"font-medium mb-1 text-[#C9D1D9]",children:N.summary}),N.files.map(L=>{const D=L.exists?L.hasCrlf?"#D29922":"#3FB950":"#F85149",z=L.exists?L.hasCrlf?"⚠":"✓":"✗";return b.jsxs("div",{className:"flex items-center gap-1.5 py-0.5",children:[b.jsx("span",{style:{color:D},children:z}),b.jsxs("span",{className:"text-[#8B949E] font-mono",children:[L.name,L.hasCrlf?" (CRLF)":""]})]},L.name)})]})]},N.key)}),a.map(N=>{const M=N.exists?"#3FB950":"#F85149",R=N.exists?"✓":"✗";return b.jsxs("div",{className:"relative group shrink-0",children:[b.jsxs("span",{className:"cursor-default",style:{color:M},children:[R," ",N.label]}),b.jsx("div",{className:"hidden group-hover:block absolute z-10 bottom-full right-0 mb-1 p-2 rounded bg-[#1C2128] border border-[#30363D] shadow-lg text-xs whitespace-nowrap",children:b.jsx("span",{className:"text-[#C9D1D9]",children:N.tooltip})})]},N.key)}),i&&b.jsxs("div",{className:"relative group shrink-0",children:[b.jsxs("span",{className:"cursor-default",style:{color:i.autoMergeEnabled?"#3FB950":"#D29922"},children:[i.autoMergeEnabled?"✓":"⚠"," github"]}),b.jsxs("div",{className:"hidden group-hover:block absolute z-10 bottom-full right-0 mb-1 p-2 rounded bg-[#1C2128] border border-[#30363D] shadow-lg text-xs min-w-52",children:[b.jsx("div",{className:"font-medium mb-1 text-[#C9D1D9]",children:"GitHub Repo Settings"}),b.jsxs("div",{className:"flex items-center gap-1.5 py-0.5",children:[b.jsx("span",{style:{color:i.autoMergeEnabled?"#3FB950":"#D29922"},children:i.autoMergeEnabled?"✓":"⚠"}),b.jsx("span",{className:"text-[#8B949E]",children:i.autoMergeEnabled?"Auto-merge enabled":"Auto-merge disabled — required for gh pr merge --auto"})]}),b.jsxs("div",{className:"flex items-center gap-1.5 py-0.5",children:[b.jsx("span",{style:{color:"#8B949E"},children:"•"}),b.jsxs("span",{className:"text-[#8B949E]",children:["Default branch: ",i.defaultBranch]})]}),i.branchProtection&&b.jsxs("div",{className:"flex items-center gap-1.5 py-0.5",children:[b.jsx("span",{style:{color:i.branchProtection.enabled?"#3FB950":"#8B949E"},children:i.branchProtection.enabled?"✓":"•"}),b.jsx("span",{className:"text-[#8B949E]",children:i.branchProtection.enabled?`Branch protection (${i.branchProtection.requiredChecks.length} required check${i.branchProtection.requiredChecks.length!==1?"s":""})`:"No branch protection"})]})]})]})]})}function nP({project:e,groups:r,reinstalling:n,reinstallResult:a,onSaveLimit:i,onSaveModel:o,onReinstall:u,onCleanup:c,onDelete:f,onEditPrompt:d,onGroupChange:h}){const[m,g]=k.useState(!1),y=eP(e.maxActiveTeams),x=eP(e.model??""),E=rP[e.status]||rP.active,w=B0e(e),_=$0e(w),A=e.queuedTeamCount??0,O=`${e.activeTeamCount}/${e.maxActiveTeams} active${A>0?` · ${A} queued`:""}`,T=k.useCallback(()=>{const N=y.confirmEdit();if(N===null)return;const M=Math.max(1,Math.min(50,N));i(e.id,M)},[y,i,e.id]),C=k.useCallback(()=>{const N=x.confirmEdit();N!==null&&o(e.id,N)},[x,o,e.id]);return b.jsxs("div",{className:"bg-dark-surface border border-dark-border rounded-lg overflow-hidden",children:[b.jsxs("div",{className:"flex items-center gap-3 px-4 py-3 cursor-pointer hover:bg-dark-border/10 transition-colors",onClick:()=>g(!m),children:[b.jsx(GK,{size:14,className:`text-dark-muted shrink-0 transition-transform ${m?"rotate-90":""}`}),b.jsx("span",{className:"text-sm font-semibold text-dark-text truncate min-w-0",children:e.name}),b.jsx("span",{className:"px-2 py-0.5 rounded-full text-xs font-medium shrink-0",style:{backgroundColor:E.bg,color:E.text,border:`1px solid ${E.border}`},children:e.status}),b.jsx("span",{className:"text-xs text-dark-muted shrink-0",children:O}),b.jsx("span",{className:"w-2 h-2 rounded-full shrink-0",style:{backgroundColor:w},title:_}),b.jsx("span",{className:"flex-1"}),b.jsx("button",{onClick:N=>{N.stopPropagation(),u(e)},disabled:n===e.id,className:"px-3 py-1 text-xs rounded border border-dark-accent/40 text-dark-accent bg-dark-accent/10 hover:bg-dark-accent/20 transition-colors disabled:opacity-40 disabled:cursor-not-allowed shrink-0",title:"(Re)install hooks, settings, and workflow prompt",children:n===e.id?"Installing...":"Reinstall"}),b.jsx(q0e,{items:[{label:"Clean Up",onClick:()=>c(e)},{label:"Delete",onClick:()=>f(e),danger:!0}]})]}),(a==null?void 0:a.id)===e.id&&b.jsx("div",{className:`mx-4 mb-2 px-3 py-1.5 rounded text-xs ${a.ok?"border border-[#3FB950]/30 bg-[#3FB950]/10 text-[#3FB950]":"border border-[#F85149]/30 bg-[#F85149]/10 text-[#F85149]"}`,children:a.ok?"Installation completed successfully":`Installation failed: ${a.error}`}),m&&b.jsxs("div",{className:"border-t border-dark-border px-4 py-3 space-y-3",children:[b.jsxs("div",{children:[b.jsx("div",{className:"text-[10px] uppercase tracking-wider text-dark-muted/60 font-medium mb-1",children:"Repository"}),b.jsxs("div",{className:"flex items-center gap-4 text-xs text-dark-muted",children:[b.jsx("span",{className:"truncate",title:e.repoPath,children:e.repoPath}),e.githubRepo&&b.jsx("span",{className:"shrink-0",children:e.githubRepo})]})]}),b.jsxs("div",{children:[b.jsx("div",{className:"text-[10px] uppercase tracking-wider text-dark-muted/60 font-medium mb-1",children:"Configuration"}),b.jsxs("div",{className:"flex items-center gap-4 text-xs text-dark-muted flex-wrap",children:[x.isEditing?b.jsxs("span",{className:"shrink-0 inline-flex items-center gap-1",children:[b.jsx("span",{children:"Model:"}),b.jsx("input",{ref:x.inputRef,type:"text",value:x.editValue,onChange:N=>x.setEditValue(N.target.value),onKeyDown:N=>{N.key==="Enter"&&C(),N.key==="Escape"&&x.cancelEdit()},onBlur:C,placeholder:"default",className:"w-32 px-1 py-0 text-xs rounded border border-dark-accent bg-dark-base text-dark-text focus:outline-none"})]}):b.jsxs("span",{className:"shrink-0 inline-flex items-center gap-1 cursor-pointer hover:text-dark-text transition-colors group",onClick:()=>x.startEdit(e.model??""),title:"Click to edit model",children:["Model: ",e.model||"default",b.jsx(dT,{size:11,className:"text-dark-muted/40 group-hover:text-dark-muted transition-colors"})]}),y.isEditing?b.jsxs("span",{className:"shrink-0 inline-flex items-center gap-1",children:[b.jsx("span",{children:"Max teams:"}),b.jsx("input",{ref:y.inputRef,type:"number",value:y.editValue,onChange:N=>y.setEditValue(parseInt(N.target.value,10)||1),onKeyDown:N=>{N.key==="Enter"&&T(),N.key==="Escape"&&y.cancelEdit()},onBlur:T,min:1,max:50,className:"w-12 px-1 py-0 text-xs rounded border border-dark-accent bg-dark-base text-dark-text focus:outline-none"})]}):b.jsxs("span",{className:"shrink-0 inline-flex items-center gap-1 cursor-pointer hover:text-dark-text transition-colors group",onClick:()=>y.startEdit(e.maxActiveTeams),title:"Click to edit max active teams",children:["Max teams: ",e.maxActiveTeams,b.jsx(dT,{size:11,className:"text-dark-muted/40 group-hover:text-dark-muted transition-colors"})]}),b.jsxs("select",{value:e.groupId??"",onChange:N=>{const M=N.target.value;h(e.id,M===""?null:parseInt(M,10))},onClick:N=>N.stopPropagation(),className:"shrink-0 px-1 py-0 text-xs rounded border border-dark-border bg-dark-base text-dark-muted hover:text-dark-text focus:outline-none cursor-pointer",title:"Assign to group",children:[b.jsx("option",{value:"",children:"No group"}),r.map(N=>b.jsx("option",{value:N.id,children:N.name},N.id))]})]})]}),b.jsxs("div",{children:[b.jsx("div",{className:"text-[10px] uppercase tracking-wider text-dark-muted/60 font-medium mb-1",children:"Install Health"}),b.jsx(U0e,{project:e})]}),e.promptFile&&b.jsxs("div",{children:[b.jsx("div",{className:"text-[10px] uppercase tracking-wider text-dark-muted/60 font-medium mb-1",children:"Prompt"}),b.jsxs("div",{className:"flex items-center gap-2 text-xs text-dark-muted",children:[b.jsx("span",{className:"truncate text-dark-text/70",title:e.promptFile,children:e.promptFile}),b.jsx("button",{onClick:()=>d(e.id),className:"shrink-0 text-dark-accent/70 hover:text-dark-accent transition-colors",title:"Edit launch prompt",children:"Edit"})]})]})]})]})}function aP({title:e,description:r,projectCount:n,defaultExpanded:a,onEdit:i,onDelete:o,children:u}){const[c,f]=k.useState(a??!0);return b.jsxs("div",{className:"mb-4",children:[b.jsxs("button",{onClick:()=>f(!c),className:"flex items-center gap-2 w-full text-left py-2 group",children:[b.jsx("svg",{className:`w-3.5 h-3.5 text-dark-muted transition-transform ${c?"rotate-90":""}`,viewBox:"0 0 20 20",fill:"currentColor",children:b.jsx("path",{fillRule:"evenodd",d:"M7.21 14.77a.75.75 0 01.02-1.06L11.168 10 7.23 6.29a.75.75 0 111.04-1.08l4.5 4.25a.75.75 0 010 1.08l-4.5 4.25a.75.75 0 01-1.06-.02z",clipRule:"evenodd"})}),b.jsx("span",{className:"text-sm font-semibold text-dark-text",children:e}),b.jsxs("span",{className:"text-xs text-dark-muted",children:["(",n,")"]}),r&&b.jsx("span",{className:"text-xs text-dark-muted/60 truncate ml-2",children:r}),i&&b.jsx("span",{onClick:d=>{d.stopPropagation(),i()},className:"ml-auto text-xs text-dark-muted hover:text-dark-text transition-colors opacity-0 group-hover:opacity-100 px-1",title:"Edit group",children:"Edit"}),o&&b.jsx("span",{onClick:d=>{d.stopPropagation(),o()},className:"text-xs text-[#F85149]/70 hover:text-[#F85149] transition-colors opacity-0 group-hover:opacity-100 px-1",title:"Delete group",children:"Delete"})]}),c&&b.jsx("div",{className:"space-y-3 ml-5",children:u})]})}function F0e({open:e,group:r,onClose:n,onSave:a}){const[i,o]=k.useState((r==null?void 0:r.name)??""),[u,c]=k.useState((r==null?void 0:r.description)??""),[f,d]=k.useState(null),h=k.useRef(null);if(k.useEffect(()=>{e&&(o((r==null?void 0:r.name)??""),c((r==null?void 0:r.description)??""),d(null),setTimeout(()=>{var g;return(g=h.current)==null?void 0:g.focus()},50))},[e,r]),!e)return null;const m=()=>{if(!i.trim()){d("Name is required");return}a(i.trim(),u.trim()||null)};return b.jsx("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-black/50",onClick:g=>{g.target===g.currentTarget&&n()},children:b.jsxs("div",{className:"w-[400px] max-w-[95vw] bg-dark-surface border border-dark-border rounded-lg shadow-2xl",role:"dialog","aria-modal":"true",children:[b.jsxs("div",{className:"flex items-center justify-between px-5 py-4 border-b border-dark-border",children:[b.jsx("h2",{className:"text-base font-semibold text-dark-text",children:r?"Edit Group":"New Group"}),b.jsx("button",{onClick:n,className:"text-dark-muted hover:text-dark-text transition-colors p-1 rounded hover:bg-dark-border/30",children:b.jsx("svg",{className:"w-4 h-4",viewBox:"0 0 20 20",fill:"currentColor",children:b.jsx("path",{fillRule:"evenodd",d:"M4.293 4.293a1 1 0 011.414 0L10 8.586l4.293-4.293a1 1 0 111.414 1.414L11.414 10l4.293 4.293a1 1 0 01-1.414 1.414L10 11.414l-4.293 4.293a1 1 0 01-1.414-1.414L8.586 10 4.293 5.707a1 1 0 010-1.414z",clipRule:"evenodd"})})})]}),b.jsxs("div",{className:"px-5 py-4 space-y-3",children:[b.jsxs("div",{children:[b.jsx("label",{className:"block text-xs text-dark-muted mb-1",children:"Name"}),b.jsx("input",{ref:h,type:"text",value:i,onChange:g=>o(g.target.value),onKeyDown:g=>{g.key==="Enter"&&m(),g.key==="Escape"&&n()},className:"w-full px-3 py-1.5 text-sm rounded border border-dark-border bg-dark-base text-dark-text focus:outline-none focus:border-dark-accent",placeholder:"e.g. Backend Services"})]}),b.jsxs("div",{children:[b.jsx("label",{className:"block text-xs text-dark-muted mb-1",children:"Description (optional)"}),b.jsx("input",{type:"text",value:u,onChange:g=>c(g.target.value),onKeyDown:g=>{g.key==="Enter"&&m(),g.key==="Escape"&&n()},className:"w-full px-3 py-1.5 text-sm rounded border border-dark-border bg-dark-base text-dark-text focus:outline-none focus:border-dark-accent",placeholder:"Short description of this group"})]}),f&&b.jsx("div",{className:"text-xs text-[#F85149]",children:f})]}),b.jsxs("div",{className:"flex items-center justify-end gap-3 px-5 py-4 border-t border-dark-border",children:[b.jsx("button",{onClick:n,className:"px-3 py-1.5 text-sm rounded border border-dark-border text-dark-muted hover:text-dark-text hover:border-dark-muted transition-colors",children:"Cancel"}),b.jsx("button",{onClick:m,className:"px-4 py-1.5 text-sm font-medium rounded border border-dark-accent/40 text-dark-accent bg-dark-accent/10 hover:bg-dark-accent/20 transition-colors",children:r?"Save":"Create"})]})]})})}function H0e(){const e=Ut(),[r,n]=k.useState([]),[a,i]=k.useState([]),[o,u]=k.useState(!0),[c,f]=k.useState(!1),[d,h]=k.useState(!1),[m,g]=k.useState(null),[y,x]=k.useState(null),[E,w]=k.useState(null),[_,A]=k.useState(""),[O,T]=k.useState(!1),[C,N]=k.useState(!1),[M,R]=k.useState(null),[L,D]=k.useState(null),[z,q]=k.useState(null),G=k.useCallback(async()=>{try{const K=await e.get("projects");n(K)}catch{}finally{u(!1)}},[e]),U=k.useCallback(async()=>{try{const K=await e.get("project-groups");i(K)}catch{}},[e]);k.useEffect(()=>{G(),U()},[G,U]);const Y=k.useCallback(()=>{g(null),h(!0)},[]),$=k.useCallback(K=>{g(K),h(!0)},[]),J=k.useCallback(async K=>{if(window.confirm(`Delete group "${K.name}"? Projects in this group will become ungrouped.`))try{await e.del(`project-groups/${K.id}`),await U(),await G()}catch(ve){window.alert(`Failed to delete group: ${ve instanceof Error?ve.message:String(ve)}`)}},[e,U,G]),re=k.useCallback(async(K,be)=>{try{m?await e.put(`project-groups/${m.id}`,{name:K,description:be}):await e.post("project-groups",{name:K,description:be}),h(!1),await U()}catch(ve){window.alert(`Failed to save group: ${ve instanceof Error?ve.message:String(ve)}`)}},[e,m,U]),oe=k.useCallback(async(K,be)=>{try{await e.put(`projects/${K}`,{groupId:be}),await G(),await U()}catch{}},[e,G,U]),fe=k.useCallback(async K=>{if(window.confirm(`Delete project "${K.name}"? This will stop all active teams and remove the project.`))try{await e.del(`projects/${K.id}`),await G(),await U()}catch(ve){window.alert(`Failed to delete project: ${ve instanceof Error?ve.message:String(ve)}`)}},[e,G,U]),F=k.useCallback(()=>{f(!1),G()},[G]),Z=k.useCallback(async K=>{D(K.id),q(null);try{const be=await e.post(`projects/${K.id}/install`,{});q({id:K.id,ok:be.ok,error:be.error}),await G()}catch(be){q({id:K.id,ok:!1,error:be instanceof Error?be.message:String(be)})}finally{D(null)}},[e,G]),ce=k.useCallback(K=>{x(K.id)},[]),B=k.useCallback(()=>{x(null)},[]),H=k.useCallback(()=>{G()},[G]),te=k.useCallback(async(K,be)=>{try{await e.put(`projects/${K}`,{maxActiveTeams:be}),await G()}catch{}},[e,G]),he=k.useCallback(async(K,be)=>{try{await e.put(`projects/${K}`,{model:be.trim()||null}),await G()}catch{}},[e,G]);k.useEffect(()=>{E!==null&&(T(!0),R(null),e.get(`projects/${E}/prompt`).then(K=>{A(K.content)}).catch(K=>{R(K instanceof Error?K.message:String(K))}).finally(()=>{T(!1)}))},[E,e]),k.useEffect(()=>{if(E===null)return;function K(be){be.key==="Escape"&&w(null)}return document.addEventListener("keydown",K),()=>document.removeEventListener("keydown",K)},[E]);const ge=k.useCallback(async()=>{if(E!==null){N(!0),R(null);try{await e.put(`projects/${E}/prompt`,{content:_}),w(null)}catch(K){R(K instanceof Error?K.message:String(K))}finally{N(!1)}}},[E,_,e]),{groupedSections:W,ungroupedProjects:le}=k.useMemo(()=>{const K=r.filter(ve=>ve.groupId==null);return{groupedSections:a.map(ve=>({group:ve,projects:r.filter(_e=>_e.groupId===ve.id)})),ungroupedProjects:K}},[r,a]),ye={groups:a,reinstalling:L,reinstallResult:z,onSaveLimit:te,onSaveModel:he,onReinstall:Z,onCleanup:ce,onDelete:fe,onEditPrompt:w,onGroupChange:oe};return o?b.jsx("div",{className:"flex items-center justify-center h-full",children:b.jsx("p",{className:"text-dark-muted text-sm",children:"Loading projects..."})}):b.jsxs(b.Fragment,{children:[b.jsxs("div",{className:"p-6 max-w-5xl mx-auto",children:[b.jsxs("div",{className:"flex items-center justify-between mb-6",children:[b.jsx("h1",{className:"text-xl font-semibold text-dark-text",children:"Projects"}),b.jsxs("div",{className:"flex items-center gap-2",children:[b.jsx("button",{onClick:Y,className:"px-4 py-1.5 text-sm font-medium rounded border border-dark-border text-dark-muted hover:text-dark-text hover:border-dark-muted transition-colors",children:"New Group"}),b.jsx("button",{onClick:()=>f(!0),className:"px-4 py-1.5 text-sm font-medium rounded border border-dark-accent/40 text-dark-accent bg-dark-accent/10 hover:bg-dark-accent/20 transition-colors",children:"Add Project"})]})]}),r.length===0?b.jsxs("div",{className:"flex flex-col items-center justify-center py-24 gap-3",children:[b.jsx("svg",{className:"w-12 h-12 text-dark-muted/40",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",children:b.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M2.25 12.75V12A2.25 2.25 0 0 1 4.5 9.75h15A2.25 2.25 0 0 1 21.75 12v.75m-8.69-6.44-2.12-2.12a1.5 1.5 0 0 0-1.061-.44H4.5A2.25 2.25 0 0 0 2.25 6v12a2.25 2.25 0 0 0 2.25 2.25h15A2.25 2.25 0 0 0 21.75 18V9a2.25 2.25 0 0 0-2.25-2.25h-5.379a1.5 1.5 0 0 1-1.06-.44Z"})}),b.jsx("p",{className:"text-dark-muted text-lg",children:"No projects yet"}),b.jsx("p",{className:"text-dark-muted/60 text-sm",children:"Add your first project to get started."})]}):b.jsxs("div",{children:[W.map(({group:K,projects:be})=>b.jsx(aP,{title:K.name,description:K.description,projectCount:be.length,onEdit:()=>$(K),onDelete:()=>J(K),children:be.length===0?b.jsx("p",{className:"text-xs text-dark-muted/60 py-2",children:"No projects in this group"}):be.map(ve=>b.jsx(nP,{project:ve,...ye},ve.id))},K.id)),le.length>0&&b.jsx(aP,{title:"Ungrouped",projectCount:le.length,defaultExpanded:!0,children:le.map(K=>b.jsx(nP,{project:K,...ye},K.id))})]})]}),b.jsx(R0e,{open:c,onClose:()=>f(!1),onAdded:F}),y!==null&&b.jsx(z0e,{projectId:y,open:!0,onClose:B,onDone:H}),b.jsx(F0e,{open:d,group:m,onClose:()=>h(!1),onSave:re}),E!==null&&b.jsx("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-black/50",onClick:K=>{K.target===K.currentTarget&&w(null)},children:b.jsxs("div",{className:"w-[600px] max-w-[95vw] max-h-[80vh] bg-dark-surface border border-dark-border rounded-lg shadow-2xl flex flex-col",role:"dialog","aria-modal":"true",children:[b.jsxs("div",{className:"flex items-center justify-between px-5 py-4 border-b border-dark-border shrink-0",children:[b.jsx("h2",{className:"text-base font-semibold text-dark-text",children:"Edit Launch Prompt"}),b.jsx("button",{onClick:()=>w(null),className:"text-dark-muted hover:text-dark-text transition-colors p-1 rounded hover:bg-dark-border/30",title:"Close",children:b.jsx("svg",{className:"w-4 h-4",viewBox:"0 0 20 20",fill:"currentColor",children:b.jsx("path",{fillRule:"evenodd",d:"M4.293 4.293a1 1 0 011.414 0L10 8.586l4.293-4.293a1 1 0 111.414 1.414L11.414 10l4.293 4.293a1 1 0 01-1.414 1.414L10 11.414l-4.293 4.293a1 1 0 01-1.414-1.414L8.586 10 4.293 5.707a1 1 0 010-1.414z",clipRule:"evenodd"})})})]}),b.jsx("div",{className:"px-5 py-4 flex-1 overflow-y-auto",children:O?b.jsx("p",{className:"text-dark-muted text-sm",children:"Loading prompt..."}):b.jsxs(b.Fragment,{children:[b.jsxs("p",{className:"text-xs text-dark-muted mb-2",children:["Use ",b.jsx("code",{className:"text-dark-accent/70",children:"{{ISSUE_NUMBER}}"})," as a placeholder -- it will be replaced with the actual issue number at launch time."]}),b.jsx("textarea",{value:_,onChange:K=>A(K.target.value),className:"w-full h-48 px-3 py-2 text-sm rounded border border-dark-border bg-dark-base text-dark-text placeholder:text-dark-muted/50 focus:outline-none focus:border-dark-accent focus:ring-1 focus:ring-dark-accent/30 font-mono resize-y",disabled:C}),M&&b.jsx("div",{className:"mt-2 px-3 py-2 rounded border border-[#F85149]/30 bg-[#F85149]/10 text-[#F85149] text-sm",children:M})]})}),b.jsxs("div",{className:"flex items-center justify-end gap-3 px-5 py-4 border-t border-dark-border shrink-0",children:[b.jsx("button",{onClick:()=>w(null),className:"px-3 py-1.5 text-sm rounded border border-dark-border text-dark-muted hover:text-dark-text hover:border-dark-muted transition-colors",children:"Cancel"}),b.jsx("button",{onClick:ge,disabled:C||O,className:"px-4 py-1.5 text-sm font-medium rounded border border-dark-accent/40 text-dark-accent bg-dark-accent/10 hover:bg-dark-accent/20 transition-colors disabled:opacity-40 disabled:cursor-not-allowed",children:C?"Saving...":"Save Prompt"})]})]})})]})}function qs(e){const r=Number(e);return r>=6e4?`${r/1e3}s (${r/6e4}min)`:r>=1e3?`${r/1e3}s`:`${r}ms`}const G0e=[{title:"Server",rows:[{key:"host",label:"Host",envVar:"FLEET_HOST",description:"Network interface to bind to"},{key:"port",label:"Port",envVar:"PORT",description:"HTTP server port"},{key:"claudeCmd",label:"Claude Command",envVar:"FLEET_CLAUDE_CMD",description:"CLI command used to invoke Claude"},{key:"resolvedClaudeCmd",label:"Resolved Claude Path",envVar:"(auto-detected)",description:"Actual path used after auto-detection (Windows) or explicit override"},{key:"enableAgentTeams",label:"Agent Teams",envVar:"FLEET_ENABLE_AGENT_TEAMS",description:"Enable CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS env var for spawned CC processes",format:e=>e?"Enabled":"Disabled"},{key:"outputBufferLines",label:"Output Buffer Lines",envVar:"(hardcoded)",description:"Max lines kept in team output buffer"}]},{title:"Thresholds",rows:[{key:"idleThresholdMin",label:"Idle Threshold",envVar:"FLEET_IDLE_THRESHOLD_MIN",description:"Minutes before a team is considered idle",format:e=>`${e} min`},{key:"stuckThresholdMin",label:"Stuck Threshold",envVar:"FLEET_STUCK_THRESHOLD_MIN",description:"Minutes before a team is considered stuck",format:e=>`${e} min`},{key:"launchTimeoutMin",label:"Launch Timeout",envVar:"FLEET_LAUNCH_TIMEOUT_MIN",description:"Minutes before a launching team is marked failed",format:e=>`${e} min`},{key:"maxUniqueCiFailures",label:"Max CI Failures",envVar:"FLEET_MAX_CI_FAILURES",description:"Unique CI failures before a team is blocked"},{key:"earlyCrashThresholdSec",label:"Early Crash Threshold",envVar:"FLEET_EARLY_CRASH_THRESHOLD_SEC",description:"Seconds before a SubagentStop is considered an early crash",format:e=>`${e}s`},{key:"earlyCrashMinTools",label:"Early Crash Min Tools",envVar:"FLEET_EARLY_CRASH_MIN_TOOLS",description:"Minimum tool-use events for a subagent to be considered healthy"}]},{title:"Polling Intervals",rows:[{key:"githubPollIntervalMs",label:"GitHub Poll Interval",envVar:"FLEET_GITHUB_POLL_MS",description:"How often to poll GitHub for PR/CI updates",format:qs},{key:"issuePollIntervalMs",label:"Issue Poll Interval",envVar:"FLEET_ISSUE_POLL_MS",description:"How often to poll for new issues",format:qs},{key:"stuckCheckIntervalMs",label:"Stuck Check Interval",envVar:"FLEET_STUCK_CHECK_MS",description:"How often to check for stuck teams",format:qs},{key:"usagePollIntervalMs",label:"Usage Poll Interval",envVar:"FLEET_USAGE_POLL_MS",description:"How often to poll API usage data",format:qs},{key:"sseHeartbeatMs",label:"SSE Heartbeat",envVar:"(hardcoded)",description:"Interval between SSE keepalive pings",format:qs}]},{title:"Paths",rows:[{key:"fleetCommanderRoot",label:"Fleet Commander Root",envVar:"FLEET_COMMANDER_ROOT",description:"Installation root directory"},{key:"dbPath",label:"Database Path",envVar:"FLEET_DB_PATH",description:"SQLite database file location"}]}];function K0e(){const e=Ut(),[r,n]=k.useState(null),[a,i]=k.useState(!0),[o,u]=k.useState(null),[c,f]=k.useState(!1),d=k.useCallback(async()=>{try{const m=await e.get("settings");n(m),u(null)}catch(m){u(m instanceof Error?m.message:String(m))}finally{i(!1)}},[e]);k.useEffect(()=>{d()},[d]);const h=async()=>{if(!(!window.confirm(`FACTORY RESET
181
+
182
+ This will:
183
+ - Stop all running teams
184
+ - Uninstall hooks from all projects
185
+ - Delete ALL data (projects, teams, events)
186
+
187
+ This cannot be undone. Continue?`)||!window.confirm("Are you absolutely sure? All data will be permanently deleted."))){f(!0);try{await e.post("system/factory-reset"),window.location.href="/"}catch(y){alert("Factory reset failed: "+(y instanceof Error?y.message:String(y)))}finally{f(!1)}}};return a?b.jsx("div",{className:"flex items-center justify-center h-full",children:b.jsx("p",{className:"text-dark-muted text-sm",children:"Loading settings..."})}):o?b.jsx("div",{className:"flex items-center justify-center h-full",children:b.jsxs("div",{className:"text-center",children:[b.jsx("p",{className:"text-[#F85149] text-sm mb-2",children:"Failed to load settings"}),b.jsx("p",{className:"text-dark-muted text-xs",children:o})]})}):r?b.jsxs("div",{className:"p-6 max-w-4xl mx-auto",children:[b.jsxs("div",{className:"mb-6",children:[b.jsx("h1",{className:"text-xl font-semibold text-dark-text",children:"Settings"}),b.jsx("p",{className:"text-dark-muted text-sm mt-1",children:"Current runtime configuration. Set via environment variables — changes require a server restart."})]}),b.jsx("div",{className:"space-y-6",children:G0e.map(m=>b.jsxs("div",{children:[b.jsx("h2",{className:"text-sm font-semibold text-dark-muted uppercase tracking-wider mb-2",children:m.title}),b.jsx("div",{className:"bg-dark-surface border border-dark-border rounded-lg overflow-hidden",children:b.jsxs("table",{className:"w-full text-sm",children:[b.jsx("thead",{children:b.jsxs("tr",{className:"border-b border-dark-border",children:[b.jsx("th",{className:"text-left px-4 py-2 text-xs font-medium text-dark-muted uppercase tracking-wider w-[180px]",children:"Setting"}),b.jsx("th",{className:"text-left px-4 py-2 text-xs font-medium text-dark-muted uppercase tracking-wider w-[200px]",children:"Value"}),b.jsx("th",{className:"text-left px-4 py-2 text-xs font-medium text-dark-muted uppercase tracking-wider w-[200px]",children:"Env Variable"}),b.jsx("th",{className:"text-left px-4 py-2 text-xs font-medium text-dark-muted uppercase tracking-wider",children:"Description"})]})}),b.jsx("tbody",{children:m.rows.map((g,y)=>{const x=r[g.key],E=g.format?g.format(x):String(x);return b.jsxs("tr",{className:`border-b border-dark-border/50 last:border-b-0 ${y%2===1?"bg-dark-base/30":""}`,children:[b.jsx("td",{className:"px-4 py-2.5 text-dark-text font-medium",children:g.label}),b.jsx("td",{className:"px-4 py-2.5",children:b.jsx("code",{className:"text-dark-accent font-mono text-xs bg-dark-base/50 px-1.5 py-0.5 rounded",children:E})}),b.jsx("td",{className:"px-4 py-2.5",children:b.jsx("code",{className:"text-dark-muted font-mono text-xs",children:g.envVar})}),b.jsx("td",{className:"px-4 py-2.5 text-dark-muted",children:g.description})]},g.key)})})]})})]},m.title))}),b.jsxs("div",{className:"mt-6 bg-dark-surface border border-dark-border rounded-lg px-4 py-3",children:[b.jsx("h2",{className:"text-sm font-semibold text-dark-muted uppercase tracking-wider mb-1",children:"Launch Prompt"}),b.jsxs("p",{className:"text-dark-muted text-sm",children:["Configured per-project via prompt files:"," ",b.jsx("code",{className:"text-dark-accent font-mono text-xs bg-dark-base/50 px-1.5 py-0.5 rounded",children:"prompts/{slug}-prompt.md"})]})]}),b.jsxs("div",{className:"mt-8 border border-[#F85149]/30 rounded p-4",children:[b.jsx("h3",{className:"text-[#F85149] font-semibold mb-2",children:"Danger Zone"}),b.jsx("p",{className:"text-[#8B949E] text-sm mb-3",children:"Factory reset will stop all running teams, uninstall hooks from all projects, and delete all data. The database will be recreated fresh with default settings."}),b.jsx("button",{onClick:h,disabled:c,className:"px-4 py-2 text-sm bg-[#F85149]/10 text-[#F85149] border border-[#F85149]/40 rounded hover:bg-[#F85149]/20 disabled:opacity-50",children:c?"Resetting...":"Factory Reset"})]})]}):null}function Dk(e){throw new Error('Could not dynamically require "'+e+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var F0,iP;function V0e(){if(iP)return F0;iP=1;function e(){this.__data__=[],this.size=0}return F0=e,F0}var H0,oP;function yu(){if(oP)return H0;oP=1;function e(r,n){return r===n||r!==r&&n!==n}return H0=e,H0}var G0,lP;function dm(){if(lP)return G0;lP=1;var e=yu();function r(n,a){for(var i=n.length;i--;)if(e(n[i][0],a))return i;return-1}return G0=r,G0}var K0,uP;function Y0e(){if(uP)return K0;uP=1;var e=dm(),r=Array.prototype,n=r.splice;function a(i){var o=this.__data__,u=e(o,i);if(u<0)return!1;var c=o.length-1;return u==c?o.pop():n.call(o,u,1),--this.size,!0}return K0=a,K0}var V0,sP;function X0e(){if(sP)return V0;sP=1;var e=dm();function r(n){var a=this.__data__,i=e(a,n);return i<0?void 0:a[i][1]}return V0=r,V0}var Y0,cP;function W0e(){if(cP)return Y0;cP=1;var e=dm();function r(n){return e(this.__data__,n)>-1}return Y0=r,Y0}var X0,fP;function Z0e(){if(fP)return X0;fP=1;var e=dm();function r(n,a){var i=this.__data__,o=e(i,n);return o<0?(++this.size,i.push([n,a])):i[o][1]=a,this}return X0=r,X0}var W0,dP;function hm(){if(dP)return W0;dP=1;var e=V0e(),r=Y0e(),n=X0e(),a=W0e(),i=Z0e();function o(u){var c=-1,f=u==null?0:u.length;for(this.clear();++c<f;){var d=u[c];this.set(d[0],d[1])}}return o.prototype.clear=e,o.prototype.delete=r,o.prototype.get=n,o.prototype.has=a,o.prototype.set=i,W0=o,W0}var Z0,hP;function Q0e(){if(hP)return Z0;hP=1;var e=hm();function r(){this.__data__=new e,this.size=0}return Z0=r,Z0}var Q0,pP;function J0e(){if(pP)return Q0;pP=1;function e(r){var n=this.__data__,a=n.delete(r);return this.size=n.size,a}return Q0=e,Q0}var J0,mP;function ebe(){if(mP)return J0;mP=1;function e(r){return this.__data__.get(r)}return J0=e,J0}var eb,vP;function tbe(){if(vP)return eb;vP=1;function e(r){return this.__data__.has(r)}return eb=e,eb}var tb,gP;function g$(){if(gP)return tb;gP=1;var e=typeof yd=="object"&&yd&&yd.Object===Object&&yd;return tb=e,tb}var rb,yP;function zn(){if(yP)return rb;yP=1;var e=g$(),r=typeof self=="object"&&self&&self.Object===Object&&self,n=e||r||Function("return this")();return rb=n,rb}var nb,bP;function bu(){if(bP)return nb;bP=1;var e=zn(),r=e.Symbol;return nb=r,nb}var ab,xP;function rbe(){if(xP)return ab;xP=1;var e=bu(),r=Object.prototype,n=r.hasOwnProperty,a=r.toString,i=e?e.toStringTag:void 0;function o(u){var c=n.call(u,i),f=u[i];try{u[i]=void 0;var d=!0}catch{}var h=a.call(u);return d&&(c?u[i]=f:delete u[i]),h}return ab=o,ab}var ib,_P;function nbe(){if(_P)return ib;_P=1;var e=Object.prototype,r=e.toString;function n(a){return r.call(a)}return ib=n,ib}var ob,wP;function Ho(){if(wP)return ob;wP=1;var e=bu(),r=rbe(),n=nbe(),a="[object Null]",i="[object Undefined]",o=e?e.toStringTag:void 0;function u(c){return c==null?c===void 0?i:a:o&&o in Object(c)?r(c):n(c)}return ob=u,ob}var lb,SP;function _n(){if(SP)return lb;SP=1;function e(r){var n=typeof r;return r!=null&&(n=="object"||n=="function")}return lb=e,lb}var ub,EP;function Vc(){if(EP)return ub;EP=1;var e=Ho(),r=_n(),n="[object AsyncFunction]",a="[object Function]",i="[object GeneratorFunction]",o="[object Proxy]";function u(c){if(!r(c))return!1;var f=e(c);return f==a||f==i||f==n||f==o}return ub=u,ub}var sb,kP;function abe(){if(kP)return sb;kP=1;var e=zn(),r=e["__core-js_shared__"];return sb=r,sb}var cb,jP;function ibe(){if(jP)return cb;jP=1;var e=abe(),r=(function(){var a=/[^.]+$/.exec(e&&e.keys&&e.keys.IE_PROTO||"");return a?"Symbol(src)_1."+a:""})();function n(a){return!!r&&r in a}return cb=n,cb}var fb,AP;function y$(){if(AP)return fb;AP=1;var e=Function.prototype,r=e.toString;function n(a){if(a!=null){try{return r.call(a)}catch{}try{return a+""}catch{}}return""}return fb=n,fb}var db,OP;function obe(){if(OP)return db;OP=1;var e=Vc(),r=ibe(),n=_n(),a=y$(),i=/[\\^$.*+?()[\]{}|]/g,o=/^\[object .+?Constructor\]$/,u=Function.prototype,c=Object.prototype,f=u.toString,d=c.hasOwnProperty,h=RegExp("^"+f.call(d).replace(i,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function m(g){if(!n(g)||r(g))return!1;var y=e(g)?h:o;return y.test(a(g))}return db=m,db}var hb,CP;function lbe(){if(CP)return hb;CP=1;function e(r,n){return r==null?void 0:r[n]}return hb=e,hb}var pb,TP;function Go(){if(TP)return pb;TP=1;var e=obe(),r=lbe();function n(a,i){var o=r(a,i);return e(o)?o:void 0}return pb=n,pb}var mb,NP;function Lk(){if(NP)return mb;NP=1;var e=Go(),r=zn(),n=e(r,"Map");return mb=n,mb}var vb,MP;function pm(){if(MP)return vb;MP=1;var e=Go(),r=e(Object,"create");return vb=r,vb}var gb,PP;function ube(){if(PP)return gb;PP=1;var e=pm();function r(){this.__data__=e?e(null):{},this.size=0}return gb=r,gb}var yb,RP;function sbe(){if(RP)return yb;RP=1;function e(r){var n=this.has(r)&&delete this.__data__[r];return this.size-=n?1:0,n}return yb=e,yb}var bb,DP;function cbe(){if(DP)return bb;DP=1;var e=pm(),r="__lodash_hash_undefined__",n=Object.prototype,a=n.hasOwnProperty;function i(o){var u=this.__data__;if(e){var c=u[o];return c===r?void 0:c}return a.call(u,o)?u[o]:void 0}return bb=i,bb}var xb,LP;function fbe(){if(LP)return xb;LP=1;var e=pm(),r=Object.prototype,n=r.hasOwnProperty;function a(i){var o=this.__data__;return e?o[i]!==void 0:n.call(o,i)}return xb=a,xb}var _b,IP;function dbe(){if(IP)return _b;IP=1;var e=pm(),r="__lodash_hash_undefined__";function n(a,i){var o=this.__data__;return this.size+=this.has(a)?0:1,o[a]=e&&i===void 0?r:i,this}return _b=n,_b}var wb,zP;function hbe(){if(zP)return wb;zP=1;var e=ube(),r=sbe(),n=cbe(),a=fbe(),i=dbe();function o(u){var c=-1,f=u==null?0:u.length;for(this.clear();++c<f;){var d=u[c];this.set(d[0],d[1])}}return o.prototype.clear=e,o.prototype.delete=r,o.prototype.get=n,o.prototype.has=a,o.prototype.set=i,wb=o,wb}var Sb,qP;function pbe(){if(qP)return Sb;qP=1;var e=hbe(),r=hm(),n=Lk();function a(){this.size=0,this.__data__={hash:new e,map:new(n||r),string:new e}}return Sb=a,Sb}var Eb,BP;function mbe(){if(BP)return Eb;BP=1;function e(r){var n=typeof r;return n=="string"||n=="number"||n=="symbol"||n=="boolean"?r!=="__proto__":r===null}return Eb=e,Eb}var kb,$P;function mm(){if($P)return kb;$P=1;var e=mbe();function r(n,a){var i=n.__data__;return e(a)?i[typeof a=="string"?"string":"hash"]:i.map}return kb=r,kb}var jb,UP;function vbe(){if(UP)return jb;UP=1;var e=mm();function r(n){var a=e(this,n).delete(n);return this.size-=a?1:0,a}return jb=r,jb}var Ab,FP;function gbe(){if(FP)return Ab;FP=1;var e=mm();function r(n){return e(this,n).get(n)}return Ab=r,Ab}var Ob,HP;function ybe(){if(HP)return Ob;HP=1;var e=mm();function r(n){return e(this,n).has(n)}return Ob=r,Ob}var Cb,GP;function bbe(){if(GP)return Cb;GP=1;var e=mm();function r(n,a){var i=e(this,n),o=i.size;return i.set(n,a),this.size+=i.size==o?0:1,this}return Cb=r,Cb}var Tb,KP;function Ik(){if(KP)return Tb;KP=1;var e=pbe(),r=vbe(),n=gbe(),a=ybe(),i=bbe();function o(u){var c=-1,f=u==null?0:u.length;for(this.clear();++c<f;){var d=u[c];this.set(d[0],d[1])}}return o.prototype.clear=e,o.prototype.delete=r,o.prototype.get=n,o.prototype.has=a,o.prototype.set=i,Tb=o,Tb}var Nb,VP;function xbe(){if(VP)return Nb;VP=1;var e=hm(),r=Lk(),n=Ik(),a=200;function i(o,u){var c=this.__data__;if(c instanceof e){var f=c.__data__;if(!r||f.length<a-1)return f.push([o,u]),this.size=++c.size,this;c=this.__data__=new n(f)}return c.set(o,u),this.size=c.size,this}return Nb=i,Nb}var Mb,YP;function vm(){if(YP)return Mb;YP=1;var e=hm(),r=Q0e(),n=J0e(),a=ebe(),i=tbe(),o=xbe();function u(c){var f=this.__data__=new e(c);this.size=f.size}return u.prototype.clear=r,u.prototype.delete=n,u.prototype.get=a,u.prototype.has=i,u.prototype.set=o,Mb=u,Mb}var Pb,XP;function zk(){if(XP)return Pb;XP=1;function e(r,n){for(var a=-1,i=r==null?0:r.length;++a<i&&n(r[a],a,r)!==!1;);return r}return Pb=e,Pb}var Rb,WP;function b$(){if(WP)return Rb;WP=1;var e=Go(),r=(function(){try{var n=e(Object,"defineProperty");return n({},"",{}),n}catch{}})();return Rb=r,Rb}var Db,ZP;function gm(){if(ZP)return Db;ZP=1;var e=b$();function r(n,a,i){a=="__proto__"&&e?e(n,a,{configurable:!0,enumerable:!0,value:i,writable:!0}):n[a]=i}return Db=r,Db}var Lb,QP;function ym(){if(QP)return Lb;QP=1;var e=gm(),r=yu(),n=Object.prototype,a=n.hasOwnProperty;function i(o,u,c){var f=o[u];(!(a.call(o,u)&&r(f,c))||c===void 0&&!(u in o))&&e(o,u,c)}return Lb=i,Lb}var Ib,JP;function Yc(){if(JP)return Ib;JP=1;var e=ym(),r=gm();function n(a,i,o,u){var c=!o;o||(o={});for(var f=-1,d=i.length;++f<d;){var h=i[f],m=u?u(o[h],a[h],h,o,a):void 0;m===void 0&&(m=a[h]),c?r(o,h,m):e(o,h,m)}return o}return Ib=n,Ib}var zb,eR;function _be(){if(eR)return zb;eR=1;function e(r,n){for(var a=-1,i=Array(r);++a<r;)i[a]=n(a);return i}return zb=e,zb}var qb,tR;function ha(){if(tR)return qb;tR=1;function e(r){return r!=null&&typeof r=="object"}return qb=e,qb}var Bb,rR;function wbe(){if(rR)return Bb;rR=1;var e=Ho(),r=ha(),n="[object Arguments]";function a(i){return r(i)&&e(i)==n}return Bb=a,Bb}var $b,nR;function Xc(){if(nR)return $b;nR=1;var e=wbe(),r=ha(),n=Object.prototype,a=n.hasOwnProperty,i=n.propertyIsEnumerable,o=e((function(){return arguments})())?e:function(u){return r(u)&&a.call(u,"callee")&&!i.call(u,"callee")};return $b=o,$b}var Ub,aR;function Tt(){if(aR)return Ub;aR=1;var e=Array.isArray;return Ub=e,Ub}var Vs={exports:{}},Fb,iR;function Sbe(){if(iR)return Fb;iR=1;function e(){return!1}return Fb=e,Fb}Vs.exports;var oR;function xu(){return oR||(oR=1,(function(e,r){var n=zn(),a=Sbe(),i=r&&!r.nodeType&&r,o=i&&!0&&e&&!e.nodeType&&e,u=o&&o.exports===i,c=u?n.Buffer:void 0,f=c?c.isBuffer:void 0,d=f||a;e.exports=d})(Vs,Vs.exports)),Vs.exports}var Hb,lR;function bm(){if(lR)return Hb;lR=1;var e=9007199254740991,r=/^(?:0|[1-9]\d*)$/;function n(a,i){var o=typeof a;return i=i??e,!!i&&(o=="number"||o!="symbol"&&r.test(a))&&a>-1&&a%1==0&&a<i}return Hb=n,Hb}var Gb,uR;function qk(){if(uR)return Gb;uR=1;var e=9007199254740991;function r(n){return typeof n=="number"&&n>-1&&n%1==0&&n<=e}return Gb=r,Gb}var Kb,sR;function Ebe(){if(sR)return Kb;sR=1;var e=Ho(),r=qk(),n=ha(),a="[object Arguments]",i="[object Array]",o="[object Boolean]",u="[object Date]",c="[object Error]",f="[object Function]",d="[object Map]",h="[object Number]",m="[object Object]",g="[object RegExp]",y="[object Set]",x="[object String]",E="[object WeakMap]",w="[object ArrayBuffer]",_="[object DataView]",A="[object Float32Array]",O="[object Float64Array]",T="[object Int8Array]",C="[object Int16Array]",N="[object Int32Array]",M="[object Uint8Array]",R="[object Uint8ClampedArray]",L="[object Uint16Array]",D="[object Uint32Array]",z={};z[A]=z[O]=z[T]=z[C]=z[N]=z[M]=z[R]=z[L]=z[D]=!0,z[a]=z[i]=z[w]=z[o]=z[_]=z[u]=z[c]=z[f]=z[d]=z[h]=z[m]=z[g]=z[y]=z[x]=z[E]=!1;function q(G){return n(G)&&r(G.length)&&!!z[e(G)]}return Kb=q,Kb}var Vb,cR;function xm(){if(cR)return Vb;cR=1;function e(r){return function(n){return r(n)}}return Vb=e,Vb}var Ys={exports:{}};Ys.exports;var fR;function Bk(){return fR||(fR=1,(function(e,r){var n=g$(),a=r&&!r.nodeType&&r,i=a&&!0&&e&&!e.nodeType&&e,o=i&&i.exports===a,u=o&&n.process,c=(function(){try{var f=i&&i.require&&i.require("util").types;return f||u&&u.binding&&u.binding("util")}catch{}})();e.exports=c})(Ys,Ys.exports)),Ys.exports}var Yb,dR;function Wc(){if(dR)return Yb;dR=1;var e=Ebe(),r=xm(),n=Bk(),a=n&&n.isTypedArray,i=a?r(a):e;return Yb=i,Yb}var Xb,hR;function x$(){if(hR)return Xb;hR=1;var e=_be(),r=Xc(),n=Tt(),a=xu(),i=bm(),o=Wc(),u=Object.prototype,c=u.hasOwnProperty;function f(d,h){var m=n(d),g=!m&&r(d),y=!m&&!g&&a(d),x=!m&&!g&&!y&&o(d),E=m||g||y||x,w=E?e(d.length,String):[],_=w.length;for(var A in d)(h||c.call(d,A))&&!(E&&(A=="length"||y&&(A=="offset"||A=="parent")||x&&(A=="buffer"||A=="byteLength"||A=="byteOffset")||i(A,_)))&&w.push(A);return w}return Xb=f,Xb}var Wb,pR;function _m(){if(pR)return Wb;pR=1;var e=Object.prototype;function r(n){var a=n&&n.constructor,i=typeof a=="function"&&a.prototype||e;return n===i}return Wb=r,Wb}var Zb,mR;function _$(){if(mR)return Zb;mR=1;function e(r,n){return function(a){return r(n(a))}}return Zb=e,Zb}var Qb,vR;function kbe(){if(vR)return Qb;vR=1;var e=_$(),r=e(Object.keys,Object);return Qb=r,Qb}var Jb,gR;function $k(){if(gR)return Jb;gR=1;var e=_m(),r=kbe(),n=Object.prototype,a=n.hasOwnProperty;function i(o){if(!e(o))return r(o);var u=[];for(var c in Object(o))a.call(o,c)&&c!="constructor"&&u.push(c);return u}return Jb=i,Jb}var e1,yR;function ii(){if(yR)return e1;yR=1;var e=Vc(),r=qk();function n(a){return a!=null&&r(a.length)&&!e(a)}return e1=n,e1}var t1,bR;function Yi(){if(bR)return t1;bR=1;var e=x$(),r=$k(),n=ii();function a(i){return n(i)?e(i):r(i)}return t1=a,t1}var r1,xR;function jbe(){if(xR)return r1;xR=1;var e=Yc(),r=Yi();function n(a,i){return a&&e(i,r(i),a)}return r1=n,r1}var n1,_R;function Abe(){if(_R)return n1;_R=1;function e(r){var n=[];if(r!=null)for(var a in Object(r))n.push(a);return n}return n1=e,n1}var a1,wR;function Obe(){if(wR)return a1;wR=1;var e=_n(),r=_m(),n=Abe(),a=Object.prototype,i=a.hasOwnProperty;function o(u){if(!e(u))return n(u);var c=r(u),f=[];for(var d in u)d=="constructor"&&(c||!i.call(u,d))||f.push(d);return f}return a1=o,a1}var i1,SR;function Ko(){if(SR)return i1;SR=1;var e=x$(),r=Obe(),n=ii();function a(i){return n(i)?e(i,!0):r(i)}return i1=a,i1}var o1,ER;function Cbe(){if(ER)return o1;ER=1;var e=Yc(),r=Ko();function n(a,i){return a&&e(i,r(i),a)}return o1=n,o1}var Xs={exports:{}};Xs.exports;var kR;function w$(){return kR||(kR=1,(function(e,r){var n=zn(),a=r&&!r.nodeType&&r,i=a&&!0&&e&&!e.nodeType&&e,o=i&&i.exports===a,u=o?n.Buffer:void 0,c=u?u.allocUnsafe:void 0;function f(d,h){if(h)return d.slice();var m=d.length,g=c?c(m):new d.constructor(m);return d.copy(g),g}e.exports=f})(Xs,Xs.exports)),Xs.exports}var l1,jR;function S$(){if(jR)return l1;jR=1;function e(r,n){var a=-1,i=r.length;for(n||(n=Array(i));++a<i;)n[a]=r[a];return n}return l1=e,l1}var u1,AR;function E$(){if(AR)return u1;AR=1;function e(r,n){for(var a=-1,i=r==null?0:r.length,o=0,u=[];++a<i;){var c=r[a];n(c,a,r)&&(u[o++]=c)}return u}return u1=e,u1}var s1,OR;function k$(){if(OR)return s1;OR=1;function e(){return[]}return s1=e,s1}var c1,CR;function Uk(){if(CR)return c1;CR=1;var e=E$(),r=k$(),n=Object.prototype,a=n.propertyIsEnumerable,i=Object.getOwnPropertySymbols,o=i?function(u){return u==null?[]:(u=Object(u),e(i(u),function(c){return a.call(u,c)}))}:r;return c1=o,c1}var f1,TR;function Tbe(){if(TR)return f1;TR=1;var e=Yc(),r=Uk();function n(a,i){return e(a,r(a),i)}return f1=n,f1}var d1,NR;function Fk(){if(NR)return d1;NR=1;function e(r,n){for(var a=-1,i=n.length,o=r.length;++a<i;)r[o+a]=n[a];return r}return d1=e,d1}var h1,MR;function wm(){if(MR)return h1;MR=1;var e=_$(),r=e(Object.getPrototypeOf,Object);return h1=r,h1}var p1,PR;function j$(){if(PR)return p1;PR=1;var e=Fk(),r=wm(),n=Uk(),a=k$(),i=Object.getOwnPropertySymbols,o=i?function(u){for(var c=[];u;)e(c,n(u)),u=r(u);return c}:a;return p1=o,p1}var m1,RR;function Nbe(){if(RR)return m1;RR=1;var e=Yc(),r=j$();function n(a,i){return e(a,r(a),i)}return m1=n,m1}var v1,DR;function A$(){if(DR)return v1;DR=1;var e=Fk(),r=Tt();function n(a,i,o){var u=i(a);return r(a)?u:e(u,o(a))}return v1=n,v1}var g1,LR;function O$(){if(LR)return g1;LR=1;var e=A$(),r=Uk(),n=Yi();function a(i){return e(i,n,r)}return g1=a,g1}var y1,IR;function Mbe(){if(IR)return y1;IR=1;var e=A$(),r=j$(),n=Ko();function a(i){return e(i,n,r)}return y1=a,y1}var b1,zR;function Pbe(){if(zR)return b1;zR=1;var e=Go(),r=zn(),n=e(r,"DataView");return b1=n,b1}var x1,qR;function Rbe(){if(qR)return x1;qR=1;var e=Go(),r=zn(),n=e(r,"Promise");return x1=n,x1}var _1,BR;function C$(){if(BR)return _1;BR=1;var e=Go(),r=zn(),n=e(r,"Set");return _1=n,_1}var w1,$R;function Dbe(){if($R)return w1;$R=1;var e=Go(),r=zn(),n=e(r,"WeakMap");return w1=n,w1}var S1,UR;function _u(){if(UR)return S1;UR=1;var e=Pbe(),r=Lk(),n=Rbe(),a=C$(),i=Dbe(),o=Ho(),u=y$(),c="[object Map]",f="[object Object]",d="[object Promise]",h="[object Set]",m="[object WeakMap]",g="[object DataView]",y=u(e),x=u(r),E=u(n),w=u(a),_=u(i),A=o;return(e&&A(new e(new ArrayBuffer(1)))!=g||r&&A(new r)!=c||n&&A(n.resolve())!=d||a&&A(new a)!=h||i&&A(new i)!=m)&&(A=function(O){var T=o(O),C=T==f?O.constructor:void 0,N=C?u(C):"";if(N)switch(N){case y:return g;case x:return c;case E:return d;case w:return h;case _:return m}return T}),S1=A,S1}var E1,FR;function Lbe(){if(FR)return E1;FR=1;var e=Object.prototype,r=e.hasOwnProperty;function n(a){var i=a.length,o=new a.constructor(i);return i&&typeof a[0]=="string"&&r.call(a,"index")&&(o.index=a.index,o.input=a.input),o}return E1=n,E1}var k1,HR;function T$(){if(HR)return k1;HR=1;var e=zn(),r=e.Uint8Array;return k1=r,k1}var j1,GR;function Hk(){if(GR)return j1;GR=1;var e=T$();function r(n){var a=new n.constructor(n.byteLength);return new e(a).set(new e(n)),a}return j1=r,j1}var A1,KR;function Ibe(){if(KR)return A1;KR=1;var e=Hk();function r(n,a){var i=a?e(n.buffer):n.buffer;return new n.constructor(i,n.byteOffset,n.byteLength)}return A1=r,A1}var O1,VR;function zbe(){if(VR)return O1;VR=1;var e=/\w*$/;function r(n){var a=new n.constructor(n.source,e.exec(n));return a.lastIndex=n.lastIndex,a}return O1=r,O1}var C1,YR;function qbe(){if(YR)return C1;YR=1;var e=bu(),r=e?e.prototype:void 0,n=r?r.valueOf:void 0;function a(i){return n?Object(n.call(i)):{}}return C1=a,C1}var T1,XR;function N$(){if(XR)return T1;XR=1;var e=Hk();function r(n,a){var i=a?e(n.buffer):n.buffer;return new n.constructor(i,n.byteOffset,n.length)}return T1=r,T1}var N1,WR;function Bbe(){if(WR)return N1;WR=1;var e=Hk(),r=Ibe(),n=zbe(),a=qbe(),i=N$(),o="[object Boolean]",u="[object Date]",c="[object Map]",f="[object Number]",d="[object RegExp]",h="[object Set]",m="[object String]",g="[object Symbol]",y="[object ArrayBuffer]",x="[object DataView]",E="[object Float32Array]",w="[object Float64Array]",_="[object Int8Array]",A="[object Int16Array]",O="[object Int32Array]",T="[object Uint8Array]",C="[object Uint8ClampedArray]",N="[object Uint16Array]",M="[object Uint32Array]";function R(L,D,z){var q=L.constructor;switch(D){case y:return e(L);case o:case u:return new q(+L);case x:return r(L,z);case E:case w:case _:case A:case O:case T:case C:case N:case M:return i(L,z);case c:return new q;case f:case m:return new q(L);case d:return n(L);case h:return new q;case g:return a(L)}}return N1=R,N1}var M1,ZR;function M$(){if(ZR)return M1;ZR=1;var e=_n(),r=Object.create,n=(function(){function a(){}return function(i){if(!e(i))return{};if(r)return r(i);a.prototype=i;var o=new a;return a.prototype=void 0,o}})();return M1=n,M1}var P1,QR;function P$(){if(QR)return P1;QR=1;var e=M$(),r=wm(),n=_m();function a(i){return typeof i.constructor=="function"&&!n(i)?e(r(i)):{}}return P1=a,P1}var R1,JR;function $be(){if(JR)return R1;JR=1;var e=_u(),r=ha(),n="[object Map]";function a(i){return r(i)&&e(i)==n}return R1=a,R1}var D1,eD;function Ube(){if(eD)return D1;eD=1;var e=$be(),r=xm(),n=Bk(),a=n&&n.isMap,i=a?r(a):e;return D1=i,D1}var L1,tD;function Fbe(){if(tD)return L1;tD=1;var e=_u(),r=ha(),n="[object Set]";function a(i){return r(i)&&e(i)==n}return L1=a,L1}var I1,rD;function Hbe(){if(rD)return I1;rD=1;var e=Fbe(),r=xm(),n=Bk(),a=n&&n.isSet,i=a?r(a):e;return I1=i,I1}var z1,nD;function R$(){if(nD)return z1;nD=1;var e=vm(),r=zk(),n=ym(),a=jbe(),i=Cbe(),o=w$(),u=S$(),c=Tbe(),f=Nbe(),d=O$(),h=Mbe(),m=_u(),g=Lbe(),y=Bbe(),x=P$(),E=Tt(),w=xu(),_=Ube(),A=_n(),O=Hbe(),T=Yi(),C=Ko(),N=1,M=2,R=4,L="[object Arguments]",D="[object Array]",z="[object Boolean]",q="[object Date]",G="[object Error]",U="[object Function]",Y="[object GeneratorFunction]",$="[object Map]",J="[object Number]",re="[object Object]",oe="[object RegExp]",fe="[object Set]",F="[object String]",Z="[object Symbol]",ce="[object WeakMap]",B="[object ArrayBuffer]",H="[object DataView]",te="[object Float32Array]",he="[object Float64Array]",ge="[object Int8Array]",W="[object Int16Array]",le="[object Int32Array]",ye="[object Uint8Array]",K="[object Uint8ClampedArray]",be="[object Uint16Array]",ve="[object Uint32Array]",_e={};_e[L]=_e[D]=_e[B]=_e[H]=_e[z]=_e[q]=_e[te]=_e[he]=_e[ge]=_e[W]=_e[le]=_e[$]=_e[J]=_e[re]=_e[oe]=_e[fe]=_e[F]=_e[Z]=_e[ye]=_e[K]=_e[be]=_e[ve]=!0,_e[G]=_e[U]=_e[ce]=!1;function $e(Te,at,Yr,Su,li,qn){var nr,It=at&N,Yo=at&M,Qc=at&R;if(Yr&&(nr=li?Yr(Te,Su,li,qn):Yr(Te)),nr!==void 0)return nr;if(!A(Te))return Te;var Eu=E(Te);if(Eu){if(nr=g(Te),!It)return u(Te,nr)}else{var Sn=m(Te),Jc=Sn==U||Sn==Y;if(w(Te))return o(Te,It);if(Sn==re||Sn==L||Jc&&!li){if(nr=Yo||Jc?{}:x(Te),!It)return Yo?f(Te,i(nr,Te)):c(Te,a(nr,Te))}else{if(!_e[Sn])return li?Te:{};nr=y(Te,Sn,It)}}qn||(qn=new e);var ku=qn.get(Te);if(ku)return ku;qn.set(Te,nr),O(Te)?Te.forEach(function(xr){nr.add($e(xr,at,Yr,xr,Te,qn))}):_(Te)&&Te.forEach(function(xr,_t){nr.set(_t,$e(xr,at,Yr,_t,Te,qn))});var Cm=Qc?Yo?h:d:Yo?C:T,ef=Eu?void 0:Cm(Te);return r(ef||Te,function(xr,_t){ef&&(_t=xr,xr=Te[_t]),n(nr,_t,$e(xr,at,Yr,_t,Te,qn))}),nr}return z1=$e,z1}var q1,aD;function Gbe(){if(aD)return q1;aD=1;var e=R$(),r=4;function n(a){return e(a,r)}return q1=n,q1}var B1,iD;function Gk(){if(iD)return B1;iD=1;function e(r){return function(){return r}}return B1=e,B1}var $1,oD;function Kbe(){if(oD)return $1;oD=1;function e(r){return function(n,a,i){for(var o=-1,u=Object(n),c=i(n),f=c.length;f--;){var d=c[r?f:++o];if(a(u[d],d,u)===!1)break}return n}}return $1=e,$1}var U1,lD;function Kk(){if(lD)return U1;lD=1;var e=Kbe(),r=e();return U1=r,U1}var F1,uD;function Vk(){if(uD)return F1;uD=1;var e=Kk(),r=Yi();function n(a,i){return a&&e(a,i,r)}return F1=n,F1}var H1,sD;function Vbe(){if(sD)return H1;sD=1;var e=ii();function r(n,a){return function(i,o){if(i==null)return i;if(!e(i))return n(i,o);for(var u=i.length,c=a?u:-1,f=Object(i);(a?c--:++c<u)&&o(f[c],c,f)!==!1;);return i}}return H1=r,H1}var G1,cD;function Sm(){if(cD)return G1;cD=1;var e=Vk(),r=Vbe(),n=r(e);return G1=n,G1}var K1,fD;function Vo(){if(fD)return K1;fD=1;function e(r){return r}return K1=e,K1}var V1,dD;function D$(){if(dD)return V1;dD=1;var e=Vo();function r(n){return typeof n=="function"?n:e}return V1=r,V1}var Y1,hD;function L$(){if(hD)return Y1;hD=1;var e=zk(),r=Sm(),n=D$(),a=Tt();function i(o,u){var c=a(o)?e:r;return c(o,n(u))}return Y1=i,Y1}var X1,pD;function I$(){return pD||(pD=1,X1=L$()),X1}var W1,mD;function Ybe(){if(mD)return W1;mD=1;var e=Sm();function r(n,a){var i=[];return e(n,function(o,u,c){a(o,u,c)&&i.push(o)}),i}return W1=r,W1}var Z1,vD;function Xbe(){if(vD)return Z1;vD=1;var e="__lodash_hash_undefined__";function r(n){return this.__data__.set(n,e),this}return Z1=r,Z1}var Q1,gD;function Wbe(){if(gD)return Q1;gD=1;function e(r){return this.__data__.has(r)}return Q1=e,Q1}var J1,yD;function z$(){if(yD)return J1;yD=1;var e=Ik(),r=Xbe(),n=Wbe();function a(i){var o=-1,u=i==null?0:i.length;for(this.__data__=new e;++o<u;)this.add(i[o])}return a.prototype.add=a.prototype.push=r,a.prototype.has=n,J1=a,J1}var ex,bD;function Zbe(){if(bD)return ex;bD=1;function e(r,n){for(var a=-1,i=r==null?0:r.length;++a<i;)if(n(r[a],a,r))return!0;return!1}return ex=e,ex}var tx,xD;function q$(){if(xD)return tx;xD=1;function e(r,n){return r.has(n)}return tx=e,tx}var rx,_D;function B$(){if(_D)return rx;_D=1;var e=z$(),r=Zbe(),n=q$(),a=1,i=2;function o(u,c,f,d,h,m){var g=f&a,y=u.length,x=c.length;if(y!=x&&!(g&&x>y))return!1;var E=m.get(u),w=m.get(c);if(E&&w)return E==c&&w==u;var _=-1,A=!0,O=f&i?new e:void 0;for(m.set(u,c),m.set(c,u);++_<y;){var T=u[_],C=c[_];if(d)var N=g?d(C,T,_,c,u,m):d(T,C,_,u,c,m);if(N!==void 0){if(N)continue;A=!1;break}if(O){if(!r(c,function(M,R){if(!n(O,R)&&(T===M||h(T,M,f,d,m)))return O.push(R)})){A=!1;break}}else if(!(T===C||h(T,C,f,d,m))){A=!1;break}}return m.delete(u),m.delete(c),A}return rx=o,rx}var nx,wD;function Qbe(){if(wD)return nx;wD=1;function e(r){var n=-1,a=Array(r.size);return r.forEach(function(i,o){a[++n]=[o,i]}),a}return nx=e,nx}var ax,SD;function Yk(){if(SD)return ax;SD=1;function e(r){var n=-1,a=Array(r.size);return r.forEach(function(i){a[++n]=i}),a}return ax=e,ax}var ix,ED;function Jbe(){if(ED)return ix;ED=1;var e=bu(),r=T$(),n=yu(),a=B$(),i=Qbe(),o=Yk(),u=1,c=2,f="[object Boolean]",d="[object Date]",h="[object Error]",m="[object Map]",g="[object Number]",y="[object RegExp]",x="[object Set]",E="[object String]",w="[object Symbol]",_="[object ArrayBuffer]",A="[object DataView]",O=e?e.prototype:void 0,T=O?O.valueOf:void 0;function C(N,M,R,L,D,z,q){switch(R){case A:if(N.byteLength!=M.byteLength||N.byteOffset!=M.byteOffset)return!1;N=N.buffer,M=M.buffer;case _:return!(N.byteLength!=M.byteLength||!z(new r(N),new r(M)));case f:case d:case g:return n(+N,+M);case h:return N.name==M.name&&N.message==M.message;case y:case E:return N==M+"";case m:var G=i;case x:var U=L&u;if(G||(G=o),N.size!=M.size&&!U)return!1;var Y=q.get(N);if(Y)return Y==M;L|=c,q.set(N,M);var $=a(G(N),G(M),L,D,z,q);return q.delete(N),$;case w:if(T)return T.call(N)==T.call(M)}return!1}return ix=C,ix}var ox,kD;function e1e(){if(kD)return ox;kD=1;var e=O$(),r=1,n=Object.prototype,a=n.hasOwnProperty;function i(o,u,c,f,d,h){var m=c&r,g=e(o),y=g.length,x=e(u),E=x.length;if(y!=E&&!m)return!1;for(var w=y;w--;){var _=g[w];if(!(m?_ in u:a.call(u,_)))return!1}var A=h.get(o),O=h.get(u);if(A&&O)return A==u&&O==o;var T=!0;h.set(o,u),h.set(u,o);for(var C=m;++w<y;){_=g[w];var N=o[_],M=u[_];if(f)var R=m?f(M,N,_,u,o,h):f(N,M,_,o,u,h);if(!(R===void 0?N===M||d(N,M,c,f,h):R)){T=!1;break}C||(C=_=="constructor")}if(T&&!C){var L=o.constructor,D=u.constructor;L!=D&&"constructor"in o&&"constructor"in u&&!(typeof L=="function"&&L instanceof L&&typeof D=="function"&&D instanceof D)&&(T=!1)}return h.delete(o),h.delete(u),T}return ox=i,ox}var lx,jD;function t1e(){if(jD)return lx;jD=1;var e=vm(),r=B$(),n=Jbe(),a=e1e(),i=_u(),o=Tt(),u=xu(),c=Wc(),f=1,d="[object Arguments]",h="[object Array]",m="[object Object]",g=Object.prototype,y=g.hasOwnProperty;function x(E,w,_,A,O,T){var C=o(E),N=o(w),M=C?h:i(E),R=N?h:i(w);M=M==d?m:M,R=R==d?m:R;var L=M==m,D=R==m,z=M==R;if(z&&u(E)){if(!u(w))return!1;C=!0,L=!1}if(z&&!L)return T||(T=new e),C||c(E)?r(E,w,_,A,O,T):n(E,w,M,_,A,O,T);if(!(_&f)){var q=L&&y.call(E,"__wrapped__"),G=D&&y.call(w,"__wrapped__");if(q||G){var U=q?E.value():E,Y=G?w.value():w;return T||(T=new e),O(U,Y,_,A,T)}}return z?(T||(T=new e),a(E,w,_,A,O,T)):!1}return lx=x,lx}var ux,AD;function $$(){if(AD)return ux;AD=1;var e=t1e(),r=ha();function n(a,i,o,u,c){return a===i?!0:a==null||i==null||!r(a)&&!r(i)?a!==a&&i!==i:e(a,i,o,u,n,c)}return ux=n,ux}var sx,OD;function r1e(){if(OD)return sx;OD=1;var e=vm(),r=$$(),n=1,a=2;function i(o,u,c,f){var d=c.length,h=d,m=!f;if(o==null)return!h;for(o=Object(o);d--;){var g=c[d];if(m&&g[2]?g[1]!==o[g[0]]:!(g[0]in o))return!1}for(;++d<h;){g=c[d];var y=g[0],x=o[y],E=g[1];if(m&&g[2]){if(x===void 0&&!(y in o))return!1}else{var w=new e;if(f)var _=f(x,E,y,o,u,w);if(!(_===void 0?r(E,x,n|a,f,w):_))return!1}}return!0}return sx=i,sx}var cx,CD;function U$(){if(CD)return cx;CD=1;var e=_n();function r(n){return n===n&&!e(n)}return cx=r,cx}var fx,TD;function n1e(){if(TD)return fx;TD=1;var e=U$(),r=Yi();function n(a){for(var i=r(a),o=i.length;o--;){var u=i[o],c=a[u];i[o]=[u,c,e(c)]}return i}return fx=n,fx}var dx,ND;function F$(){if(ND)return dx;ND=1;function e(r,n){return function(a){return a==null?!1:a[r]===n&&(n!==void 0||r in Object(a))}}return dx=e,dx}var hx,MD;function a1e(){if(MD)return hx;MD=1;var e=r1e(),r=n1e(),n=F$();function a(i){var o=r(i);return o.length==1&&o[0][2]?n(o[0][0],o[0][1]):function(u){return u===i||e(u,i,o)}}return hx=a,hx}var px,PD;function wu(){if(PD)return px;PD=1;var e=Ho(),r=ha(),n="[object Symbol]";function a(i){return typeof i=="symbol"||r(i)&&e(i)==n}return px=a,px}var mx,RD;function Xk(){if(RD)return mx;RD=1;var e=Tt(),r=wu(),n=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,a=/^\w*$/;function i(o,u){if(e(o))return!1;var c=typeof o;return c=="number"||c=="symbol"||c=="boolean"||o==null||r(o)?!0:a.test(o)||!n.test(o)||u!=null&&o in Object(u)}return mx=i,mx}var vx,DD;function i1e(){if(DD)return vx;DD=1;var e=Ik(),r="Expected a function";function n(a,i){if(typeof a!="function"||i!=null&&typeof i!="function")throw new TypeError(r);var o=function(){var u=arguments,c=i?i.apply(this,u):u[0],f=o.cache;if(f.has(c))return f.get(c);var d=a.apply(this,u);return o.cache=f.set(c,d)||f,d};return o.cache=new(n.Cache||e),o}return n.Cache=e,vx=n,vx}var gx,LD;function o1e(){if(LD)return gx;LD=1;var e=i1e(),r=500;function n(a){var i=e(a,function(u){return o.size===r&&o.clear(),u}),o=i.cache;return i}return gx=n,gx}var yx,ID;function l1e(){if(ID)return yx;ID=1;var e=o1e(),r=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,n=/\\(\\)?/g,a=e(function(i){var o=[];return i.charCodeAt(0)===46&&o.push(""),i.replace(r,function(u,c,f,d){o.push(f?d.replace(n,"$1"):c||u)}),o});return yx=a,yx}var bx,zD;function Em(){if(zD)return bx;zD=1;function e(r,n){for(var a=-1,i=r==null?0:r.length,o=Array(i);++a<i;)o[a]=n(r[a],a,r);return o}return bx=e,bx}var xx,qD;function u1e(){if(qD)return xx;qD=1;var e=bu(),r=Em(),n=Tt(),a=wu(),i=e?e.prototype:void 0,o=i?i.toString:void 0;function u(c){if(typeof c=="string")return c;if(n(c))return r(c,u)+"";if(a(c))return o?o.call(c):"";var f=c+"";return f=="0"&&1/c==-1/0?"-0":f}return xx=u,xx}var _x,BD;function H$(){if(BD)return _x;BD=1;var e=u1e();function r(n){return n==null?"":e(n)}return _x=r,_x}var wx,$D;function km(){if($D)return wx;$D=1;var e=Tt(),r=Xk(),n=l1e(),a=H$();function i(o,u){return e(o)?o:r(o,u)?[o]:n(a(o))}return wx=i,wx}var Sx,UD;function Zc(){if(UD)return Sx;UD=1;var e=wu();function r(n){if(typeof n=="string"||e(n))return n;var a=n+"";return a=="0"&&1/n==-1/0?"-0":a}return Sx=r,Sx}var Ex,FD;function jm(){if(FD)return Ex;FD=1;var e=km(),r=Zc();function n(a,i){i=e(i,a);for(var o=0,u=i.length;a!=null&&o<u;)a=a[r(i[o++])];return o&&o==u?a:void 0}return Ex=n,Ex}var kx,HD;function s1e(){if(HD)return kx;HD=1;var e=jm();function r(n,a,i){var o=n==null?void 0:e(n,a);return o===void 0?i:o}return kx=r,kx}var jx,GD;function c1e(){if(GD)return jx;GD=1;function e(r,n){return r!=null&&n in Object(r)}return jx=e,jx}var Ax,KD;function G$(){if(KD)return Ax;KD=1;var e=km(),r=Xc(),n=Tt(),a=bm(),i=qk(),o=Zc();function u(c,f,d){f=e(f,c);for(var h=-1,m=f.length,g=!1;++h<m;){var y=o(f[h]);if(!(g=c!=null&&d(c,y)))break;c=c[y]}return g||++h!=m?g:(m=c==null?0:c.length,!!m&&i(m)&&a(y,m)&&(n(c)||r(c)))}return Ax=u,Ax}var Ox,VD;function K$(){if(VD)return Ox;VD=1;var e=c1e(),r=G$();function n(a,i){return a!=null&&r(a,i,e)}return Ox=n,Ox}var Cx,YD;function f1e(){if(YD)return Cx;YD=1;var e=$$(),r=s1e(),n=K$(),a=Xk(),i=U$(),o=F$(),u=Zc(),c=1,f=2;function d(h,m){return a(h)&&i(m)?o(u(h),m):function(g){var y=r(g,h);return y===void 0&&y===m?n(g,h):e(m,y,c|f)}}return Cx=d,Cx}var Tx,XD;function V$(){if(XD)return Tx;XD=1;function e(r){return function(n){return n==null?void 0:n[r]}}return Tx=e,Tx}var Nx,WD;function d1e(){if(WD)return Nx;WD=1;var e=jm();function r(n){return function(a){return e(a,n)}}return Nx=r,Nx}var Mx,ZD;function h1e(){if(ZD)return Mx;ZD=1;var e=V$(),r=d1e(),n=Xk(),a=Zc();function i(o){return n(o)?e(a(o)):r(o)}return Mx=i,Mx}var Px,QD;function oi(){if(QD)return Px;QD=1;var e=a1e(),r=f1e(),n=Vo(),a=Tt(),i=h1e();function o(u){return typeof u=="function"?u:u==null?n:typeof u=="object"?a(u)?r(u[0],u[1]):e(u):i(u)}return Px=o,Px}var Rx,JD;function Y$(){if(JD)return Rx;JD=1;var e=E$(),r=Ybe(),n=oi(),a=Tt();function i(o,u){var c=a(o)?e:r;return c(o,n(u,3))}return Rx=i,Rx}var Dx,e8;function p1e(){if(e8)return Dx;e8=1;var e=Object.prototype,r=e.hasOwnProperty;function n(a,i){return a!=null&&r.call(a,i)}return Dx=n,Dx}var Lx,t8;function X$(){if(t8)return Lx;t8=1;var e=p1e(),r=G$();function n(a,i){return a!=null&&r(a,i,e)}return Lx=n,Lx}var Ix,r8;function m1e(){if(r8)return Ix;r8=1;var e=$k(),r=_u(),n=Xc(),a=Tt(),i=ii(),o=xu(),u=_m(),c=Wc(),f="[object Map]",d="[object Set]",h=Object.prototype,m=h.hasOwnProperty;function g(y){if(y==null)return!0;if(i(y)&&(a(y)||typeof y=="string"||typeof y.splice=="function"||o(y)||c(y)||n(y)))return!y.length;var x=r(y);if(x==f||x==d)return!y.size;if(u(y))return!e(y).length;for(var E in y)if(m.call(y,E))return!1;return!0}return Ix=g,Ix}var zx,n8;function W$(){if(n8)return zx;n8=1;function e(r){return r===void 0}return zx=e,zx}var qx,a8;function Z$(){if(a8)return qx;a8=1;var e=Sm(),r=ii();function n(a,i){var o=-1,u=r(a)?Array(a.length):[];return e(a,function(c,f,d){u[++o]=i(c,f,d)}),u}return qx=n,qx}var Bx,i8;function Q$(){if(i8)return Bx;i8=1;var e=Em(),r=oi(),n=Z$(),a=Tt();function i(o,u){var c=a(o)?e:n;return c(o,r(u,3))}return Bx=i,Bx}var $x,o8;function v1e(){if(o8)return $x;o8=1;function e(r,n,a,i){var o=-1,u=r==null?0:r.length;for(i&&u&&(a=r[++o]);++o<u;)a=n(a,r[o],o,r);return a}return $x=e,$x}var Ux,l8;function g1e(){if(l8)return Ux;l8=1;function e(r,n,a,i,o){return o(r,function(u,c,f){a=i?(i=!1,u):n(a,u,c,f)}),a}return Ux=e,Ux}var Fx,u8;function J$(){if(u8)return Fx;u8=1;var e=v1e(),r=Sm(),n=oi(),a=g1e(),i=Tt();function o(u,c,f){var d=i(u)?e:a,h=arguments.length<3;return d(u,n(c,4),f,h,r)}return Fx=o,Fx}var Hx,s8;function y1e(){if(s8)return Hx;s8=1;var e=Ho(),r=Tt(),n=ha(),a="[object String]";function i(o){return typeof o=="string"||!r(o)&&n(o)&&e(o)==a}return Hx=i,Hx}var Gx,c8;function b1e(){if(c8)return Gx;c8=1;var e=V$(),r=e("length");return Gx=r,Gx}var Kx,f8;function x1e(){if(f8)return Kx;f8=1;var e="\\ud800-\\udfff",r="\\u0300-\\u036f",n="\\ufe20-\\ufe2f",a="\\u20d0-\\u20ff",i=r+n+a,o="\\ufe0e\\ufe0f",u="\\u200d",c=RegExp("["+u+e+i+o+"]");function f(d){return c.test(d)}return Kx=f,Kx}var Vx,d8;function _1e(){if(d8)return Vx;d8=1;var e="\\ud800-\\udfff",r="\\u0300-\\u036f",n="\\ufe20-\\ufe2f",a="\\u20d0-\\u20ff",i=r+n+a,o="\\ufe0e\\ufe0f",u="["+e+"]",c="["+i+"]",f="\\ud83c[\\udffb-\\udfff]",d="(?:"+c+"|"+f+")",h="[^"+e+"]",m="(?:\\ud83c[\\udde6-\\uddff]){2}",g="[\\ud800-\\udbff][\\udc00-\\udfff]",y="\\u200d",x=d+"?",E="["+o+"]?",w="(?:"+y+"(?:"+[h,m,g].join("|")+")"+E+x+")*",_=E+x+w,A="(?:"+[h+c+"?",c,m,g,u].join("|")+")",O=RegExp(f+"(?="+f+")|"+A+_,"g");function T(C){for(var N=O.lastIndex=0;O.test(C);)++N;return N}return Vx=T,Vx}var Yx,h8;function w1e(){if(h8)return Yx;h8=1;var e=b1e(),r=x1e(),n=_1e();function a(i){return r(i)?n(i):e(i)}return Yx=a,Yx}var Xx,p8;function S1e(){if(p8)return Xx;p8=1;var e=$k(),r=_u(),n=ii(),a=y1e(),i=w1e(),o="[object Map]",u="[object Set]";function c(f){if(f==null)return 0;if(n(f))return a(f)?i(f):f.length;var d=r(f);return d==o||d==u?f.size:e(f).length}return Xx=c,Xx}var Wx,m8;function E1e(){if(m8)return Wx;m8=1;var e=zk(),r=M$(),n=Vk(),a=oi(),i=wm(),o=Tt(),u=xu(),c=Vc(),f=_n(),d=Wc();function h(m,g,y){var x=o(m),E=x||u(m)||d(m);if(g=a(g,4),y==null){var w=m&&m.constructor;E?y=x?new w:[]:f(m)?y=c(w)?r(i(m)):{}:y={}}return(E?e:n)(m,function(_,A,O){return g(y,_,A,O)}),y}return Wx=h,Wx}var Zx,v8;function k1e(){if(v8)return Zx;v8=1;var e=bu(),r=Xc(),n=Tt(),a=e?e.isConcatSpreadable:void 0;function i(o){return n(o)||r(o)||!!(a&&o&&o[a])}return Zx=i,Zx}var Qx,g8;function Wk(){if(g8)return Qx;g8=1;var e=Fk(),r=k1e();function n(a,i,o,u,c){var f=-1,d=a.length;for(o||(o=r),c||(c=[]);++f<d;){var h=a[f];i>0&&o(h)?i>1?n(h,i-1,o,u,c):e(c,h):u||(c[c.length]=h)}return c}return Qx=n,Qx}var Jx,y8;function j1e(){if(y8)return Jx;y8=1;function e(r,n,a){switch(a.length){case 0:return r.call(n);case 1:return r.call(n,a[0]);case 2:return r.call(n,a[0],a[1]);case 3:return r.call(n,a[0],a[1],a[2])}return r.apply(n,a)}return Jx=e,Jx}var e_,b8;function eU(){if(b8)return e_;b8=1;var e=j1e(),r=Math.max;function n(a,i,o){return i=r(i===void 0?a.length-1:i,0),function(){for(var u=arguments,c=-1,f=r(u.length-i,0),d=Array(f);++c<f;)d[c]=u[i+c];c=-1;for(var h=Array(i+1);++c<i;)h[c]=u[c];return h[i]=o(d),e(a,this,h)}}return e_=n,e_}var t_,x8;function A1e(){if(x8)return t_;x8=1;var e=Gk(),r=b$(),n=Vo(),a=r?function(i,o){return r(i,"toString",{configurable:!0,enumerable:!1,value:e(o),writable:!0})}:n;return t_=a,t_}var r_,_8;function O1e(){if(_8)return r_;_8=1;var e=800,r=16,n=Date.now;function a(i){var o=0,u=0;return function(){var c=n(),f=r-(c-u);if(u=c,f>0){if(++o>=e)return arguments[0]}else o=0;return i.apply(void 0,arguments)}}return r_=a,r_}var n_,w8;function tU(){if(w8)return n_;w8=1;var e=A1e(),r=O1e(),n=r(e);return n_=n,n_}var a_,S8;function Am(){if(S8)return a_;S8=1;var e=Vo(),r=eU(),n=tU();function a(i,o){return n(r(i,o,e),i+"")}return a_=a,a_}var i_,E8;function rU(){if(E8)return i_;E8=1;function e(r,n,a,i){for(var o=r.length,u=a+(i?1:-1);i?u--:++u<o;)if(n(r[u],u,r))return u;return-1}return i_=e,i_}var o_,k8;function C1e(){if(k8)return o_;k8=1;function e(r){return r!==r}return o_=e,o_}var l_,j8;function T1e(){if(j8)return l_;j8=1;function e(r,n,a){for(var i=a-1,o=r.length;++i<o;)if(r[i]===n)return i;return-1}return l_=e,l_}var u_,A8;function N1e(){if(A8)return u_;A8=1;var e=rU(),r=C1e(),n=T1e();function a(i,o,u){return o===o?n(i,o,u):e(i,r,u)}return u_=a,u_}var s_,O8;function M1e(){if(O8)return s_;O8=1;var e=N1e();function r(n,a){var i=n==null?0:n.length;return!!i&&e(n,a,0)>-1}return s_=r,s_}var c_,C8;function P1e(){if(C8)return c_;C8=1;function e(r,n,a){for(var i=-1,o=r==null?0:r.length;++i<o;)if(a(n,r[i]))return!0;return!1}return c_=e,c_}var f_,T8;function R1e(){if(T8)return f_;T8=1;function e(){}return f_=e,f_}var d_,N8;function D1e(){if(N8)return d_;N8=1;var e=C$(),r=R1e(),n=Yk(),a=1/0,i=e&&1/n(new e([,-0]))[1]==a?function(o){return new e(o)}:r;return d_=i,d_}var h_,M8;function L1e(){if(M8)return h_;M8=1;var e=z$(),r=M1e(),n=P1e(),a=q$(),i=D1e(),o=Yk(),u=200;function c(f,d,h){var m=-1,g=r,y=f.length,x=!0,E=[],w=E;if(h)x=!1,g=n;else if(y>=u){var _=d?null:i(f);if(_)return o(_);x=!1,g=a,w=new e}else w=d?[]:E;e:for(;++m<y;){var A=f[m],O=d?d(A):A;if(A=h||A!==0?A:0,x&&O===O){for(var T=w.length;T--;)if(w[T]===O)continue e;d&&w.push(O),E.push(A)}else g(w,O,h)||(w!==E&&w.push(O),E.push(A))}return E}return h_=c,h_}var p_,P8;function nU(){if(P8)return p_;P8=1;var e=ii(),r=ha();function n(a){return r(a)&&e(a)}return p_=n,p_}var m_,R8;function I1e(){if(R8)return m_;R8=1;var e=Wk(),r=Am(),n=L1e(),a=nU(),i=r(function(o){return n(e(o,1,a,!0))});return m_=i,m_}var v_,D8;function z1e(){if(D8)return v_;D8=1;var e=Em();function r(n,a){return e(a,function(i){return n[i]})}return v_=r,v_}var g_,L8;function aU(){if(L8)return g_;L8=1;var e=z1e(),r=Yi();function n(a){return a==null?[]:e(a,r(a))}return g_=n,g_}var y_,I8;function wn(){if(I8)return y_;I8=1;var e;if(typeof Dk=="function")try{e={clone:Gbe(),constant:Gk(),each:I$(),filter:Y$(),has:X$(),isArray:Tt(),isEmpty:m1e(),isFunction:Vc(),isUndefined:W$(),keys:Yi(),map:Q$(),reduce:J$(),size:S1e(),transform:E1e(),union:I1e(),values:aU()}}catch{}return e||(e=window._),y_=e,y_}var b_,z8;function Zk(){if(z8)return b_;z8=1;var e=wn();b_=i;var r="\0",n="\0",a="";function i(h){this._isDirected=e.has(h,"directed")?h.directed:!0,this._isMultigraph=e.has(h,"multigraph")?h.multigraph:!1,this._isCompound=e.has(h,"compound")?h.compound:!1,this._label=void 0,this._defaultNodeLabelFn=e.constant(void 0),this._defaultEdgeLabelFn=e.constant(void 0),this._nodes={},this._isCompound&&(this._parent={},this._children={},this._children[n]={}),this._in={},this._preds={},this._out={},this._sucs={},this._edgeObjs={},this._edgeLabels={}}i.prototype._nodeCount=0,i.prototype._edgeCount=0,i.prototype.isDirected=function(){return this._isDirected},i.prototype.isMultigraph=function(){return this._isMultigraph},i.prototype.isCompound=function(){return this._isCompound},i.prototype.setGraph=function(h){return this._label=h,this},i.prototype.graph=function(){return this._label},i.prototype.setDefaultNodeLabel=function(h){return e.isFunction(h)||(h=e.constant(h)),this._defaultNodeLabelFn=h,this},i.prototype.nodeCount=function(){return this._nodeCount},i.prototype.nodes=function(){return e.keys(this._nodes)},i.prototype.sources=function(){var h=this;return e.filter(this.nodes(),function(m){return e.isEmpty(h._in[m])})},i.prototype.sinks=function(){var h=this;return e.filter(this.nodes(),function(m){return e.isEmpty(h._out[m])})},i.prototype.setNodes=function(h,m){var g=arguments,y=this;return e.each(h,function(x){g.length>1?y.setNode(x,m):y.setNode(x)}),this},i.prototype.setNode=function(h,m){return e.has(this._nodes,h)?(arguments.length>1&&(this._nodes[h]=m),this):(this._nodes[h]=arguments.length>1?m:this._defaultNodeLabelFn(h),this._isCompound&&(this._parent[h]=n,this._children[h]={},this._children[n][h]=!0),this._in[h]={},this._preds[h]={},this._out[h]={},this._sucs[h]={},++this._nodeCount,this)},i.prototype.node=function(h){return this._nodes[h]},i.prototype.hasNode=function(h){return e.has(this._nodes,h)},i.prototype.removeNode=function(h){var m=this;if(e.has(this._nodes,h)){var g=function(y){m.removeEdge(m._edgeObjs[y])};delete this._nodes[h],this._isCompound&&(this._removeFromParentsChildList(h),delete this._parent[h],e.each(this.children(h),function(y){m.setParent(y)}),delete this._children[h]),e.each(e.keys(this._in[h]),g),delete this._in[h],delete this._preds[h],e.each(e.keys(this._out[h]),g),delete this._out[h],delete this._sucs[h],--this._nodeCount}return this},i.prototype.setParent=function(h,m){if(!this._isCompound)throw new Error("Cannot set parent in a non-compound graph");if(e.isUndefined(m))m=n;else{m+="";for(var g=m;!e.isUndefined(g);g=this.parent(g))if(g===h)throw new Error("Setting "+m+" as parent of "+h+" would create a cycle");this.setNode(m)}return this.setNode(h),this._removeFromParentsChildList(h),this._parent[h]=m,this._children[m][h]=!0,this},i.prototype._removeFromParentsChildList=function(h){delete this._children[this._parent[h]][h]},i.prototype.parent=function(h){if(this._isCompound){var m=this._parent[h];if(m!==n)return m}},i.prototype.children=function(h){if(e.isUndefined(h)&&(h=n),this._isCompound){var m=this._children[h];if(m)return e.keys(m)}else{if(h===n)return this.nodes();if(this.hasNode(h))return[]}},i.prototype.predecessors=function(h){var m=this._preds[h];if(m)return e.keys(m)},i.prototype.successors=function(h){var m=this._sucs[h];if(m)return e.keys(m)},i.prototype.neighbors=function(h){var m=this.predecessors(h);if(m)return e.union(m,this.successors(h))},i.prototype.isLeaf=function(h){var m;return this.isDirected()?m=this.successors(h):m=this.neighbors(h),m.length===0},i.prototype.filterNodes=function(h){var m=new this.constructor({directed:this._isDirected,multigraph:this._isMultigraph,compound:this._isCompound});m.setGraph(this.graph());var g=this;e.each(this._nodes,function(E,w){h(w)&&m.setNode(w,E)}),e.each(this._edgeObjs,function(E){m.hasNode(E.v)&&m.hasNode(E.w)&&m.setEdge(E,g.edge(E))});var y={};function x(E){var w=g.parent(E);return w===void 0||m.hasNode(w)?(y[E]=w,w):w in y?y[w]:x(w)}return this._isCompound&&e.each(m.nodes(),function(E){m.setParent(E,x(E))}),m},i.prototype.setDefaultEdgeLabel=function(h){return e.isFunction(h)||(h=e.constant(h)),this._defaultEdgeLabelFn=h,this},i.prototype.edgeCount=function(){return this._edgeCount},i.prototype.edges=function(){return e.values(this._edgeObjs)},i.prototype.setPath=function(h,m){var g=this,y=arguments;return e.reduce(h,function(x,E){return y.length>1?g.setEdge(x,E,m):g.setEdge(x,E),E}),this},i.prototype.setEdge=function(){var h,m,g,y,x=!1,E=arguments[0];typeof E=="object"&&E!==null&&"v"in E?(h=E.v,m=E.w,g=E.name,arguments.length===2&&(y=arguments[1],x=!0)):(h=E,m=arguments[1],g=arguments[3],arguments.length>2&&(y=arguments[2],x=!0)),h=""+h,m=""+m,e.isUndefined(g)||(g=""+g);var w=c(this._isDirected,h,m,g);if(e.has(this._edgeLabels,w))return x&&(this._edgeLabels[w]=y),this;if(!e.isUndefined(g)&&!this._isMultigraph)throw new Error("Cannot set a named edge when isMultigraph = false");this.setNode(h),this.setNode(m),this._edgeLabels[w]=x?y:this._defaultEdgeLabelFn(h,m,g);var _=f(this._isDirected,h,m,g);return h=_.v,m=_.w,Object.freeze(_),this._edgeObjs[w]=_,o(this._preds[m],h),o(this._sucs[h],m),this._in[m][w]=_,this._out[h][w]=_,this._edgeCount++,this},i.prototype.edge=function(h,m,g){var y=arguments.length===1?d(this._isDirected,arguments[0]):c(this._isDirected,h,m,g);return this._edgeLabels[y]},i.prototype.hasEdge=function(h,m,g){var y=arguments.length===1?d(this._isDirected,arguments[0]):c(this._isDirected,h,m,g);return e.has(this._edgeLabels,y)},i.prototype.removeEdge=function(h,m,g){var y=arguments.length===1?d(this._isDirected,arguments[0]):c(this._isDirected,h,m,g),x=this._edgeObjs[y];return x&&(h=x.v,m=x.w,delete this._edgeLabels[y],delete this._edgeObjs[y],u(this._preds[m],h),u(this._sucs[h],m),delete this._in[m][y],delete this._out[h][y],this._edgeCount--),this},i.prototype.inEdges=function(h,m){var g=this._in[h];if(g){var y=e.values(g);return m?e.filter(y,function(x){return x.v===m}):y}},i.prototype.outEdges=function(h,m){var g=this._out[h];if(g){var y=e.values(g);return m?e.filter(y,function(x){return x.w===m}):y}},i.prototype.nodeEdges=function(h,m){var g=this.inEdges(h,m);if(g)return g.concat(this.outEdges(h,m))};function o(h,m){h[m]?h[m]++:h[m]=1}function u(h,m){--h[m]||delete h[m]}function c(h,m,g,y){var x=""+m,E=""+g;if(!h&&x>E){var w=x;x=E,E=w}return x+a+E+a+(e.isUndefined(y)?r:y)}function f(h,m,g,y){var x=""+m,E=""+g;if(!h&&x>E){var w=x;x=E,E=w}var _={v:x,w:E};return y&&(_.name=y),_}function d(h,m){return c(h,m.v,m.w,m.name)}return b_}var x_,q8;function q1e(){return q8||(q8=1,x_="2.1.8"),x_}var __,B8;function B1e(){return B8||(B8=1,__={Graph:Zk(),version:q1e()}),__}var w_,$8;function $1e(){if($8)return w_;$8=1;var e=wn(),r=Zk();w_={write:n,read:o};function n(u){var c={options:{directed:u.isDirected(),multigraph:u.isMultigraph(),compound:u.isCompound()},nodes:a(u),edges:i(u)};return e.isUndefined(u.graph())||(c.value=e.clone(u.graph())),c}function a(u){return e.map(u.nodes(),function(c){var f=u.node(c),d=u.parent(c),h={v:c};return e.isUndefined(f)||(h.value=f),e.isUndefined(d)||(h.parent=d),h})}function i(u){return e.map(u.edges(),function(c){var f=u.edge(c),d={v:c.v,w:c.w};return e.isUndefined(c.name)||(d.name=c.name),e.isUndefined(f)||(d.value=f),d})}function o(u){var c=new r(u.options).setGraph(u.value);return e.each(u.nodes,function(f){c.setNode(f.v,f.value),f.parent&&c.setParent(f.v,f.parent)}),e.each(u.edges,function(f){c.setEdge({v:f.v,w:f.w,name:f.name},f.value)}),c}return w_}var S_,U8;function U1e(){if(U8)return S_;U8=1;var e=wn();S_=r;function r(n){var a={},i=[],o;function u(c){e.has(a,c)||(a[c]=!0,o.push(c),e.each(n.successors(c),u),e.each(n.predecessors(c),u))}return e.each(n.nodes(),function(c){o=[],u(c),o.length&&i.push(o)}),i}return S_}var E_,F8;function iU(){if(F8)return E_;F8=1;var e=wn();E_=r;function r(){this._arr=[],this._keyIndices={}}return r.prototype.size=function(){return this._arr.length},r.prototype.keys=function(){return this._arr.map(function(n){return n.key})},r.prototype.has=function(n){return e.has(this._keyIndices,n)},r.prototype.priority=function(n){var a=this._keyIndices[n];if(a!==void 0)return this._arr[a].priority},r.prototype.min=function(){if(this.size()===0)throw new Error("Queue underflow");return this._arr[0].key},r.prototype.add=function(n,a){var i=this._keyIndices;if(n=String(n),!e.has(i,n)){var o=this._arr,u=o.length;return i[n]=u,o.push({key:n,priority:a}),this._decrease(u),!0}return!1},r.prototype.removeMin=function(){this._swap(0,this._arr.length-1);var n=this._arr.pop();return delete this._keyIndices[n.key],this._heapify(0),n.key},r.prototype.decrease=function(n,a){var i=this._keyIndices[n];if(a>this._arr[i].priority)throw new Error("New priority is greater than current priority. Key: "+n+" Old: "+this._arr[i].priority+" New: "+a);this._arr[i].priority=a,this._decrease(i)},r.prototype._heapify=function(n){var a=this._arr,i=2*n,o=i+1,u=n;i<a.length&&(u=a[i].priority<a[u].priority?i:u,o<a.length&&(u=a[o].priority<a[u].priority?o:u),u!==n&&(this._swap(n,u),this._heapify(u)))},r.prototype._decrease=function(n){for(var a=this._arr,i=a[n].priority,o;n!==0&&(o=n>>1,!(a[o].priority<i));)this._swap(n,o),n=o},r.prototype._swap=function(n,a){var i=this._arr,o=this._keyIndices,u=i[n],c=i[a];i[n]=c,i[a]=u,o[c.key]=n,o[u.key]=a},E_}var k_,H8;function oU(){if(H8)return k_;H8=1;var e=wn(),r=iU();k_=a;var n=e.constant(1);function a(o,u,c,f){return i(o,String(u),c||n,f||function(d){return o.outEdges(d)})}function i(o,u,c,f){var d={},h=new r,m,g,y=function(x){var E=x.v!==m?x.v:x.w,w=d[E],_=c(x),A=g.distance+_;if(_<0)throw new Error("dijkstra does not allow negative edge weights. Bad edge: "+x+" Weight: "+_);A<w.distance&&(w.distance=A,w.predecessor=m,h.decrease(E,A))};for(o.nodes().forEach(function(x){var E=x===u?0:Number.POSITIVE_INFINITY;d[x]={distance:E},h.add(x,E)});h.size()>0&&(m=h.removeMin(),g=d[m],g.distance!==Number.POSITIVE_INFINITY);)f(m).forEach(y);return d}return k_}var j_,G8;function F1e(){if(G8)return j_;G8=1;var e=oU(),r=wn();j_=n;function n(a,i,o){return r.transform(a.nodes(),function(u,c){u[c]=e(a,c,i,o)},{})}return j_}var A_,K8;function lU(){if(K8)return A_;K8=1;var e=wn();A_=r;function r(n){var a=0,i=[],o={},u=[];function c(f){var d=o[f]={onStack:!0,lowlink:a,index:a++};if(i.push(f),n.successors(f).forEach(function(g){e.has(o,g)?o[g].onStack&&(d.lowlink=Math.min(d.lowlink,o[g].index)):(c(g),d.lowlink=Math.min(d.lowlink,o[g].lowlink))}),d.lowlink===d.index){var h=[],m;do m=i.pop(),o[m].onStack=!1,h.push(m);while(f!==m);u.push(h)}}return n.nodes().forEach(function(f){e.has(o,f)||c(f)}),u}return A_}var O_,V8;function H1e(){if(V8)return O_;V8=1;var e=wn(),r=lU();O_=n;function n(a){return e.filter(r(a),function(i){return i.length>1||i.length===1&&a.hasEdge(i[0],i[0])})}return O_}var C_,Y8;function G1e(){if(Y8)return C_;Y8=1;var e=wn();C_=n;var r=e.constant(1);function n(i,o,u){return a(i,o||r,u||function(c){return i.outEdges(c)})}function a(i,o,u){var c={},f=i.nodes();return f.forEach(function(d){c[d]={},c[d][d]={distance:0},f.forEach(function(h){d!==h&&(c[d][h]={distance:Number.POSITIVE_INFINITY})}),u(d).forEach(function(h){var m=h.v===d?h.w:h.v,g=o(h);c[d][m]={distance:g,predecessor:d}})}),f.forEach(function(d){var h=c[d];f.forEach(function(m){var g=c[m];f.forEach(function(y){var x=g[d],E=h[y],w=g[y],_=x.distance+E.distance;_<w.distance&&(w.distance=_,w.predecessor=E.predecessor)})})}),c}return C_}var T_,X8;function uU(){if(X8)return T_;X8=1;var e=wn();T_=r,r.CycleException=n;function r(a){var i={},o={},u=[];function c(f){if(e.has(o,f))throw new n;e.has(i,f)||(o[f]=!0,i[f]=!0,e.each(a.predecessors(f),c),delete o[f],u.push(f))}if(e.each(a.sinks(),c),e.size(i)!==a.nodeCount())throw new n;return u}function n(){}return n.prototype=new Error,T_}var N_,W8;function K1e(){if(W8)return N_;W8=1;var e=uU();N_=r;function r(n){try{e(n)}catch(a){if(a instanceof e.CycleException)return!1;throw a}return!0}return N_}var M_,Z8;function sU(){if(Z8)return M_;Z8=1;var e=wn();M_=r;function r(a,i,o){e.isArray(i)||(i=[i]);var u=(a.isDirected()?a.successors:a.neighbors).bind(a),c=[],f={};return e.each(i,function(d){if(!a.hasNode(d))throw new Error("Graph does not have node: "+d);n(a,d,o==="post",f,u,c)}),c}function n(a,i,o,u,c,f){e.has(u,i)||(u[i]=!0,o||f.push(i),e.each(c(i),function(d){n(a,d,o,u,c,f)}),o&&f.push(i))}return M_}var P_,Q8;function V1e(){if(Q8)return P_;Q8=1;var e=sU();P_=r;function r(n,a){return e(n,a,"post")}return P_}var R_,J8;function Y1e(){if(J8)return R_;J8=1;var e=sU();R_=r;function r(n,a){return e(n,a,"pre")}return R_}var D_,e9;function X1e(){if(e9)return D_;e9=1;var e=wn(),r=Zk(),n=iU();D_=a;function a(i,o){var u=new r,c={},f=new n,d;function h(g){var y=g.v===d?g.w:g.v,x=f.priority(y);if(x!==void 0){var E=o(g);E<x&&(c[y]=d,f.decrease(y,E))}}if(i.nodeCount()===0)return u;e.each(i.nodes(),function(g){f.add(g,Number.POSITIVE_INFINITY),u.setNode(g)}),f.decrease(i.nodes()[0],0);for(var m=!1;f.size()>0;){if(d=f.removeMin(),e.has(c,d))u.setEdge(d,c[d]);else{if(m)throw new Error("Input graph is not connected: "+i);m=!0}i.nodeEdges(d).forEach(h)}return u}return D_}var L_,t9;function W1e(){return t9||(t9=1,L_={components:U1e(),dijkstra:oU(),dijkstraAll:F1e(),findCycles:H1e(),floydWarshall:G1e(),isAcyclic:K1e(),postorder:V1e(),preorder:Y1e(),prim:X1e(),tarjan:lU(),topsort:uU()}),L_}var I_,r9;function Z1e(){if(r9)return I_;r9=1;var e=B1e();return I_={Graph:e.Graph,json:$1e(),alg:W1e(),version:e.version},I_}var z_,n9;function Rn(){if(n9)return z_;n9=1;var e;if(typeof Dk=="function")try{e=Z1e()}catch{}return e||(e=window.graphlib),z_=e,z_}var q_,a9;function Q1e(){if(a9)return q_;a9=1;var e=R$(),r=1,n=4;function a(i){return e(i,r|n)}return q_=a,q_}var B_,i9;function Om(){if(i9)return B_;i9=1;var e=yu(),r=ii(),n=bm(),a=_n();function i(o,u,c){if(!a(c))return!1;var f=typeof u;return(f=="number"?r(c)&&n(u,c.length):f=="string"&&u in c)?e(c[u],o):!1}return B_=i,B_}var $_,o9;function J1e(){if(o9)return $_;o9=1;var e=Am(),r=yu(),n=Om(),a=Ko(),i=Object.prototype,o=i.hasOwnProperty,u=e(function(c,f){c=Object(c);var d=-1,h=f.length,m=h>2?f[2]:void 0;for(m&&n(f[0],f[1],m)&&(h=1);++d<h;)for(var g=f[d],y=a(g),x=-1,E=y.length;++x<E;){var w=y[x],_=c[w];(_===void 0||r(_,i[w])&&!o.call(c,w))&&(c[w]=g[w])}return c});return $_=u,$_}var U_,l9;function exe(){if(l9)return U_;l9=1;var e=oi(),r=ii(),n=Yi();function a(i){return function(o,u,c){var f=Object(o);if(!r(o)){var d=e(u,3);o=n(o),u=function(m){return d(f[m],m,f)}}var h=i(o,u,c);return h>-1?f[d?o[h]:h]:void 0}}return U_=a,U_}var F_,u9;function txe(){if(u9)return F_;u9=1;var e=/\s/;function r(n){for(var a=n.length;a--&&e.test(n.charAt(a)););return a}return F_=r,F_}var H_,s9;function rxe(){if(s9)return H_;s9=1;var e=txe(),r=/^\s+/;function n(a){return a&&a.slice(0,e(a)+1).replace(r,"")}return H_=n,H_}var G_,c9;function nxe(){if(c9)return G_;c9=1;var e=rxe(),r=_n(),n=wu(),a=NaN,i=/^[-+]0x[0-9a-f]+$/i,o=/^0b[01]+$/i,u=/^0o[0-7]+$/i,c=parseInt;function f(d){if(typeof d=="number")return d;if(n(d))return a;if(r(d)){var h=typeof d.valueOf=="function"?d.valueOf():d;d=r(h)?h+"":h}if(typeof d!="string")return d===0?d:+d;d=e(d);var m=o.test(d);return m||u.test(d)?c(d.slice(2),m?2:8):i.test(d)?a:+d}return G_=f,G_}var K_,f9;function cU(){if(f9)return K_;f9=1;var e=nxe(),r=1/0,n=17976931348623157e292;function a(i){if(!i)return i===0?i:0;if(i=e(i),i===r||i===-r){var o=i<0?-1:1;return o*n}return i===i?i:0}return K_=a,K_}var V_,d9;function axe(){if(d9)return V_;d9=1;var e=cU();function r(n){var a=e(n),i=a%1;return a===a?i?a-i:a:0}return V_=r,V_}var Y_,h9;function ixe(){if(h9)return Y_;h9=1;var e=rU(),r=oi(),n=axe(),a=Math.max;function i(o,u,c){var f=o==null?0:o.length;if(!f)return-1;var d=c==null?0:n(c);return d<0&&(d=a(f+d,0)),e(o,r(u,3),d)}return Y_=i,Y_}var X_,p9;function oxe(){if(p9)return X_;p9=1;var e=exe(),r=ixe(),n=e(r);return X_=n,X_}var W_,m9;function fU(){if(m9)return W_;m9=1;var e=Wk();function r(n){var a=n==null?0:n.length;return a?e(n,1):[]}return W_=r,W_}var Z_,v9;function lxe(){if(v9)return Z_;v9=1;var e=Kk(),r=D$(),n=Ko();function a(i,o){return i==null?i:e(i,r(o),n)}return Z_=a,Z_}var Q_,g9;function uxe(){if(g9)return Q_;g9=1;function e(r){var n=r==null?0:r.length;return n?r[n-1]:void 0}return Q_=e,Q_}var J_,y9;function sxe(){if(y9)return J_;y9=1;var e=gm(),r=Vk(),n=oi();function a(i,o){var u={};return o=n(o,3),r(i,function(c,f,d){e(u,f,o(c,f,d))}),u}return J_=a,J_}var ew,b9;function Qk(){if(b9)return ew;b9=1;var e=wu();function r(n,a,i){for(var o=-1,u=n.length;++o<u;){var c=n[o],f=a(c);if(f!=null&&(d===void 0?f===f&&!e(f):i(f,d)))var d=f,h=c}return h}return ew=r,ew}var tw,x9;function cxe(){if(x9)return tw;x9=1;function e(r,n){return r>n}return tw=e,tw}var rw,_9;function fxe(){if(_9)return rw;_9=1;var e=Qk(),r=cxe(),n=Vo();function a(i){return i&&i.length?e(i,n,r):void 0}return rw=a,rw}var nw,w9;function dU(){if(w9)return nw;w9=1;var e=gm(),r=yu();function n(a,i,o){(o!==void 0&&!r(a[i],o)||o===void 0&&!(i in a))&&e(a,i,o)}return nw=n,nw}var aw,S9;function dxe(){if(S9)return aw;S9=1;var e=Ho(),r=wm(),n=ha(),a="[object Object]",i=Function.prototype,o=Object.prototype,u=i.toString,c=o.hasOwnProperty,f=u.call(Object);function d(h){if(!n(h)||e(h)!=a)return!1;var m=r(h);if(m===null)return!0;var g=c.call(m,"constructor")&&m.constructor;return typeof g=="function"&&g instanceof g&&u.call(g)==f}return aw=d,aw}var iw,E9;function hU(){if(E9)return iw;E9=1;function e(r,n){if(!(n==="constructor"&&typeof r[n]=="function")&&n!="__proto__")return r[n]}return iw=e,iw}var ow,k9;function hxe(){if(k9)return ow;k9=1;var e=Yc(),r=Ko();function n(a){return e(a,r(a))}return ow=n,ow}var lw,j9;function pxe(){if(j9)return lw;j9=1;var e=dU(),r=w$(),n=N$(),a=S$(),i=P$(),o=Xc(),u=Tt(),c=nU(),f=xu(),d=Vc(),h=_n(),m=dxe(),g=Wc(),y=hU(),x=hxe();function E(w,_,A,O,T,C,N){var M=y(w,A),R=y(_,A),L=N.get(R);if(L){e(w,A,L);return}var D=C?C(M,R,A+"",w,_,N):void 0,z=D===void 0;if(z){var q=u(R),G=!q&&f(R),U=!q&&!G&&g(R);D=R,q||G||U?u(M)?D=M:c(M)?D=a(M):G?(z=!1,D=r(R,!0)):U?(z=!1,D=n(R,!0)):D=[]:m(R)||o(R)?(D=M,o(M)?D=x(M):(!h(M)||d(M))&&(D=i(R))):z=!1}z&&(N.set(R,D),T(D,R,O,C,N),N.delete(R)),e(w,A,D)}return lw=E,lw}var uw,A9;function mxe(){if(A9)return uw;A9=1;var e=vm(),r=dU(),n=Kk(),a=pxe(),i=_n(),o=Ko(),u=hU();function c(f,d,h,m,g){f!==d&&n(d,function(y,x){if(g||(g=new e),i(y))a(f,d,x,h,c,m,g);else{var E=m?m(u(f,x),y,x+"",f,d,g):void 0;E===void 0&&(E=y),r(f,x,E)}},o)}return uw=c,uw}var sw,O9;function vxe(){if(O9)return sw;O9=1;var e=Am(),r=Om();function n(a){return e(function(i,o){var u=-1,c=o.length,f=c>1?o[c-1]:void 0,d=c>2?o[2]:void 0;for(f=a.length>3&&typeof f=="function"?(c--,f):void 0,d&&r(o[0],o[1],d)&&(f=c<3?void 0:f,c=1),i=Object(i);++u<c;){var h=o[u];h&&a(i,h,u,f)}return i})}return sw=n,sw}var cw,C9;function gxe(){if(C9)return cw;C9=1;var e=mxe(),r=vxe(),n=r(function(a,i,o){e(a,i,o)});return cw=n,cw}var fw,T9;function pU(){if(T9)return fw;T9=1;function e(r,n){return r<n}return fw=e,fw}var dw,N9;function yxe(){if(N9)return dw;N9=1;var e=Qk(),r=pU(),n=Vo();function a(i){return i&&i.length?e(i,n,r):void 0}return dw=a,dw}var hw,M9;function bxe(){if(M9)return hw;M9=1;var e=Qk(),r=oi(),n=pU();function a(i,o){return i&&i.length?e(i,r(o,2),n):void 0}return hw=a,hw}var pw,P9;function xxe(){if(P9)return pw;P9=1;var e=zn(),r=function(){return e.Date.now()};return pw=r,pw}var mw,R9;function _xe(){if(R9)return mw;R9=1;var e=ym(),r=km(),n=bm(),a=_n(),i=Zc();function o(u,c,f,d){if(!a(u))return u;c=r(c,u);for(var h=-1,m=c.length,g=m-1,y=u;y!=null&&++h<m;){var x=i(c[h]),E=f;if(x==="__proto__"||x==="constructor"||x==="prototype")return u;if(h!=g){var w=y[x];E=d?d(w,x,y):void 0,E===void 0&&(E=a(w)?w:n(c[h+1])?[]:{})}e(y,x,E),y=y[x]}return u}return mw=o,mw}var vw,D9;function wxe(){if(D9)return vw;D9=1;var e=jm(),r=_xe(),n=km();function a(i,o,u){for(var c=-1,f=o.length,d={};++c<f;){var h=o[c],m=e(i,h);u(m,h)&&r(d,n(h,i),m)}return d}return vw=a,vw}var gw,L9;function Sxe(){if(L9)return gw;L9=1;var e=wxe(),r=K$();function n(a,i){return e(a,i,function(o,u){return r(a,u)})}return gw=n,gw}var yw,I9;function Exe(){if(I9)return yw;I9=1;var e=fU(),r=eU(),n=tU();function a(i){return n(r(i,void 0,e),i+"")}return yw=a,yw}var bw,z9;function kxe(){if(z9)return bw;z9=1;var e=Sxe(),r=Exe(),n=r(function(a,i){return a==null?{}:e(a,i)});return bw=n,bw}var xw,q9;function jxe(){if(q9)return xw;q9=1;var e=Math.ceil,r=Math.max;function n(a,i,o,u){for(var c=-1,f=r(e((i-a)/(o||1)),0),d=Array(f);f--;)d[u?f:++c]=a,a+=o;return d}return xw=n,xw}var _w,B9;function Axe(){if(B9)return _w;B9=1;var e=jxe(),r=Om(),n=cU();function a(i){return function(o,u,c){return c&&typeof c!="number"&&r(o,u,c)&&(u=c=void 0),o=n(o),u===void 0?(u=o,o=0):u=n(u),c=c===void 0?o<u?1:-1:n(c),e(o,u,c,i)}}return _w=a,_w}var ww,$9;function Oxe(){if($9)return ww;$9=1;var e=Axe(),r=e();return ww=r,ww}var Sw,U9;function Cxe(){if(U9)return Sw;U9=1;function e(r,n){var a=r.length;for(r.sort(n);a--;)r[a]=r[a].value;return r}return Sw=e,Sw}var Ew,F9;function Txe(){if(F9)return Ew;F9=1;var e=wu();function r(n,a){if(n!==a){var i=n!==void 0,o=n===null,u=n===n,c=e(n),f=a!==void 0,d=a===null,h=a===a,m=e(a);if(!d&&!m&&!c&&n>a||c&&f&&h&&!d&&!m||o&&f&&h||!i&&h||!u)return 1;if(!o&&!c&&!m&&n<a||m&&i&&u&&!o&&!c||d&&i&&u||!f&&u||!h)return-1}return 0}return Ew=r,Ew}var kw,H9;function Nxe(){if(H9)return kw;H9=1;var e=Txe();function r(n,a,i){for(var o=-1,u=n.criteria,c=a.criteria,f=u.length,d=i.length;++o<f;){var h=e(u[o],c[o]);if(h){if(o>=d)return h;var m=i[o];return h*(m=="desc"?-1:1)}}return n.index-a.index}return kw=r,kw}var jw,G9;function Mxe(){if(G9)return jw;G9=1;var e=Em(),r=jm(),n=oi(),a=Z$(),i=Cxe(),o=xm(),u=Nxe(),c=Vo(),f=Tt();function d(h,m,g){m.length?m=e(m,function(E){return f(E)?function(w){return r(w,E.length===1?E[0]:E)}:E}):m=[c];var y=-1;m=e(m,o(n));var x=a(h,function(E,w,_){var A=e(m,function(O){return O(E)});return{criteria:A,index:++y,value:E}});return i(x,function(E,w){return u(E,w,g)})}return jw=d,jw}var Aw,K9;function Pxe(){if(K9)return Aw;K9=1;var e=Wk(),r=Mxe(),n=Am(),a=Om(),i=n(function(o,u){if(o==null)return[];var c=u.length;return c>1&&a(o,u[0],u[1])?u=[]:c>2&&a(u[0],u[1],u[2])&&(u=[u[0]]),r(o,e(u,1),[])});return Aw=i,Aw}var Ow,V9;function Rxe(){if(V9)return Ow;V9=1;var e=H$(),r=0;function n(a){var i=++r;return e(a)+i}return Ow=n,Ow}var Cw,Y9;function Dxe(){if(Y9)return Cw;Y9=1;function e(r,n,a){for(var i=-1,o=r.length,u=n.length,c={};++i<o;){var f=i<u?n[i]:void 0;a(c,r[i],f)}return c}return Cw=e,Cw}var Tw,X9;function Lxe(){if(X9)return Tw;X9=1;var e=ym(),r=Dxe();function n(a,i){return r(a||[],i||[],e)}return Tw=n,Tw}var Nw,W9;function pt(){if(W9)return Nw;W9=1;var e;if(typeof Dk=="function")try{e={cloneDeep:Q1e(),constant:Gk(),defaults:J1e(),each:I$(),filter:Y$(),find:oxe(),flatten:fU(),forEach:L$(),forIn:lxe(),has:X$(),isUndefined:W$(),last:uxe(),map:Q$(),mapValues:sxe(),max:fxe(),merge:gxe(),min:yxe(),minBy:bxe(),now:xxe(),pick:kxe(),range:Oxe(),reduce:J$(),sortBy:Pxe(),uniqueId:Rxe(),values:aU(),zipObject:Lxe()}}catch{}return e||(e=window._),Nw=e,Nw}var Mw,Z9;function Ixe(){if(Z9)return Mw;Z9=1,Mw=e;function e(){var a={};a._next=a._prev=a,this._sentinel=a}e.prototype.dequeue=function(){var a=this._sentinel,i=a._prev;if(i!==a)return r(i),i},e.prototype.enqueue=function(a){var i=this._sentinel;a._prev&&a._next&&r(a),a._next=i._next,i._next._prev=a,i._next=a,a._prev=i},e.prototype.toString=function(){for(var a=[],i=this._sentinel,o=i._prev;o!==i;)a.push(JSON.stringify(o,n)),o=o._prev;return"["+a.join(", ")+"]"};function r(a){a._prev._next=a._next,a._next._prev=a._prev,delete a._next,delete a._prev}function n(a,i){if(a!=="_next"&&a!=="_prev")return i}return Mw}var Pw,Q9;function zxe(){if(Q9)return Pw;Q9=1;var e=pt(),r=Rn().Graph,n=Ixe();Pw=i;var a=e.constant(1);function i(d,h){if(d.nodeCount()<=1)return[];var m=c(d,h||a),g=o(m.graph,m.buckets,m.zeroIdx);return e.flatten(e.map(g,function(y){return d.outEdges(y.v,y.w)}),!0)}function o(d,h,m){for(var g=[],y=h[h.length-1],x=h[0],E;d.nodeCount();){for(;E=x.dequeue();)u(d,h,m,E);for(;E=y.dequeue();)u(d,h,m,E);if(d.nodeCount()){for(var w=h.length-2;w>0;--w)if(E=h[w].dequeue(),E){g=g.concat(u(d,h,m,E,!0));break}}}return g}function u(d,h,m,g,y){var x=y?[]:void 0;return e.forEach(d.inEdges(g.v),function(E){var w=d.edge(E),_=d.node(E.v);y&&x.push({v:E.v,w:E.w}),_.out-=w,f(h,m,_)}),e.forEach(d.outEdges(g.v),function(E){var w=d.edge(E),_=E.w,A=d.node(_);A.in-=w,f(h,m,A)}),d.removeNode(g.v),x}function c(d,h){var m=new r,g=0,y=0;e.forEach(d.nodes(),function(w){m.setNode(w,{v:w,in:0,out:0})}),e.forEach(d.edges(),function(w){var _=m.edge(w.v,w.w)||0,A=h(w),O=_+A;m.setEdge(w.v,w.w,O),y=Math.max(y,m.node(w.v).out+=A),g=Math.max(g,m.node(w.w).in+=A)});var x=e.range(y+g+3).map(function(){return new n}),E=g+1;return e.forEach(m.nodes(),function(w){f(x,E,m.node(w))}),{graph:m,buckets:x,zeroIdx:E}}function f(d,h,m){m.out?m.in?d[m.out-m.in+h].enqueue(m):d[d.length-1].enqueue(m):d[0].enqueue(m)}return Pw}var Rw,J9;function qxe(){if(J9)return Rw;J9=1;var e=pt(),r=zxe();Rw={run:n,undo:i};function n(o){var u=o.graph().acyclicer==="greedy"?r(o,c(o)):a(o);e.forEach(u,function(f){var d=o.edge(f);o.removeEdge(f),d.forwardName=f.name,d.reversed=!0,o.setEdge(f.w,f.v,d,e.uniqueId("rev"))});function c(f){return function(d){return f.edge(d).weight}}}function a(o){var u=[],c={},f={};function d(h){e.has(f,h)||(f[h]=!0,c[h]=!0,e.forEach(o.outEdges(h),function(m){e.has(c,m.w)?u.push(m):d(m.w)}),delete c[h])}return e.forEach(o.nodes(),d),u}function i(o){e.forEach(o.edges(),function(u){var c=o.edge(u);if(c.reversed){o.removeEdge(u);var f=c.forwardName;delete c.reversed,delete c.forwardName,o.setEdge(u.w,u.v,c,f)}})}return Rw}var Dw,e6;function Nr(){if(e6)return Dw;e6=1;var e=pt(),r=Rn().Graph;Dw={addDummyNode:n,simplify:a,asNonCompoundGraph:i,successorWeights:o,predecessorWeights:u,intersectRect:c,buildLayerMatrix:f,normalizeRanks:d,removeEmptyRanks:h,addBorderNode:m,maxRank:g,partition:y,time:x,notime:E};function n(w,_,A,O){var T;do T=e.uniqueId(O);while(w.hasNode(T));return A.dummy=_,w.setNode(T,A),T}function a(w){var _=new r().setGraph(w.graph());return e.forEach(w.nodes(),function(A){_.setNode(A,w.node(A))}),e.forEach(w.edges(),function(A){var O=_.edge(A.v,A.w)||{weight:0,minlen:1},T=w.edge(A);_.setEdge(A.v,A.w,{weight:O.weight+T.weight,minlen:Math.max(O.minlen,T.minlen)})}),_}function i(w){var _=new r({multigraph:w.isMultigraph()}).setGraph(w.graph());return e.forEach(w.nodes(),function(A){w.children(A).length||_.setNode(A,w.node(A))}),e.forEach(w.edges(),function(A){_.setEdge(A,w.edge(A))}),_}function o(w){var _=e.map(w.nodes(),function(A){var O={};return e.forEach(w.outEdges(A),function(T){O[T.w]=(O[T.w]||0)+w.edge(T).weight}),O});return e.zipObject(w.nodes(),_)}function u(w){var _=e.map(w.nodes(),function(A){var O={};return e.forEach(w.inEdges(A),function(T){O[T.v]=(O[T.v]||0)+w.edge(T).weight}),O});return e.zipObject(w.nodes(),_)}function c(w,_){var A=w.x,O=w.y,T=_.x-A,C=_.y-O,N=w.width/2,M=w.height/2;if(!T&&!C)throw new Error("Not possible to find intersection inside of the rectangle");var R,L;return Math.abs(C)*N>Math.abs(T)*M?(C<0&&(M=-M),R=M*T/C,L=M):(T<0&&(N=-N),R=N,L=N*C/T),{x:A+R,y:O+L}}function f(w){var _=e.map(e.range(g(w)+1),function(){return[]});return e.forEach(w.nodes(),function(A){var O=w.node(A),T=O.rank;e.isUndefined(T)||(_[T][O.order]=A)}),_}function d(w){var _=e.min(e.map(w.nodes(),function(A){return w.node(A).rank}));e.forEach(w.nodes(),function(A){var O=w.node(A);e.has(O,"rank")&&(O.rank-=_)})}function h(w){var _=e.min(e.map(w.nodes(),function(C){return w.node(C).rank})),A=[];e.forEach(w.nodes(),function(C){var N=w.node(C).rank-_;A[N]||(A[N]=[]),A[N].push(C)});var O=0,T=w.graph().nodeRankFactor;e.forEach(A,function(C,N){e.isUndefined(C)&&N%T!==0?--O:O&&e.forEach(C,function(M){w.node(M).rank+=O})})}function m(w,_,A,O){var T={width:0,height:0};return arguments.length>=4&&(T.rank=A,T.order=O),n(w,"border",T,_)}function g(w){return e.max(e.map(w.nodes(),function(_){var A=w.node(_).rank;if(!e.isUndefined(A))return A}))}function y(w,_){var A={lhs:[],rhs:[]};return e.forEach(w,function(O){_(O)?A.lhs.push(O):A.rhs.push(O)}),A}function x(w,_){var A=e.now();try{return _()}finally{console.log(w+" time: "+(e.now()-A)+"ms")}}function E(w,_){return _()}return Dw}var Lw,t6;function Bxe(){if(t6)return Lw;t6=1;var e=pt(),r=Nr();Lw={run:n,undo:i};function n(o){o.graph().dummyChains=[],e.forEach(o.edges(),function(u){a(o,u)})}function a(o,u){var c=u.v,f=o.node(c).rank,d=u.w,h=o.node(d).rank,m=u.name,g=o.edge(u),y=g.labelRank;if(h!==f+1){o.removeEdge(u);var x,E,w;for(w=0,++f;f<h;++w,++f)g.points=[],E={width:0,height:0,edgeLabel:g,edgeObj:u,rank:f},x=r.addDummyNode(o,"edge",E,"_d"),f===y&&(E.width=g.width,E.height=g.height,E.dummy="edge-label",E.labelpos=g.labelpos),o.setEdge(c,x,{weight:g.weight},m),w===0&&o.graph().dummyChains.push(x),c=x;o.setEdge(c,d,{weight:g.weight},m)}}function i(o){e.forEach(o.graph().dummyChains,function(u){var c=o.node(u),f=c.edgeLabel,d;for(o.setEdge(c.edgeObj,f);c.dummy;)d=o.successors(u)[0],o.removeNode(u),f.points.push({x:c.x,y:c.y}),c.dummy==="edge-label"&&(f.x=c.x,f.y=c.y,f.width=c.width,f.height=c.height),u=d,c=o.node(u)})}return Lw}var Iw,r6;function mp(){if(r6)return Iw;r6=1;var e=pt();Iw={longestPath:r,slack:n};function r(a){var i={};function o(u){var c=a.node(u);if(e.has(i,u))return c.rank;i[u]=!0;var f=e.min(e.map(a.outEdges(u),function(d){return o(d.w)-a.edge(d).minlen}));return(f===Number.POSITIVE_INFINITY||f===void 0||f===null)&&(f=0),c.rank=f}e.forEach(a.sources(),o)}function n(a,i){return a.node(i.w).rank-a.node(i.v).rank-a.edge(i).minlen}return Iw}var zw,n6;function mU(){if(n6)return zw;n6=1;var e=pt(),r=Rn().Graph,n=mp().slack;zw=a;function a(c){var f=new r({directed:!1}),d=c.nodes()[0],h=c.nodeCount();f.setNode(d,{});for(var m,g;i(f,c)<h;)m=o(f,c),g=f.hasNode(m.v)?n(c,m):-n(c,m),u(f,c,g);return f}function i(c,f){function d(h){e.forEach(f.nodeEdges(h),function(m){var g=m.v,y=h===g?m.w:g;!c.hasNode(y)&&!n(f,m)&&(c.setNode(y,{}),c.setEdge(h,y,{}),d(y))})}return e.forEach(c.nodes(),d),c.nodeCount()}function o(c,f){return e.minBy(f.edges(),function(d){if(c.hasNode(d.v)!==c.hasNode(d.w))return n(f,d)})}function u(c,f,d){e.forEach(c.nodes(),function(h){f.node(h).rank+=d})}return zw}var qw,a6;function $xe(){if(a6)return qw;a6=1;var e=pt(),r=mU(),n=mp().slack,a=mp().longestPath,i=Rn().alg.preorder,o=Rn().alg.postorder,u=Nr().simplify;qw=c,c.initLowLimValues=m,c.initCutValues=f,c.calcCutValue=h,c.leaveEdge=y,c.enterEdge=x,c.exchangeEdges=E;function c(O){O=u(O),a(O);var T=r(O);m(T),f(T,O);for(var C,N;C=y(T);)N=x(T,O,C),E(T,O,C,N)}function f(O,T){var C=o(O,O.nodes());C=C.slice(0,C.length-1),e.forEach(C,function(N){d(O,T,N)})}function d(O,T,C){var N=O.node(C),M=N.parent;O.edge(C,M).cutvalue=h(O,T,C)}function h(O,T,C){var N=O.node(C),M=N.parent,R=!0,L=T.edge(C,M),D=0;return L||(R=!1,L=T.edge(M,C)),D=L.weight,e.forEach(T.nodeEdges(C),function(z){var q=z.v===C,G=q?z.w:z.v;if(G!==M){var U=q===R,Y=T.edge(z).weight;if(D+=U?Y:-Y,_(O,C,G)){var $=O.edge(C,G).cutvalue;D+=U?-$:$}}}),D}function m(O,T){arguments.length<2&&(T=O.nodes()[0]),g(O,{},1,T)}function g(O,T,C,N,M){var R=C,L=O.node(N);return T[N]=!0,e.forEach(O.neighbors(N),function(D){e.has(T,D)||(C=g(O,T,C,D,N))}),L.low=R,L.lim=C++,M?L.parent=M:delete L.parent,C}function y(O){return e.find(O.edges(),function(T){return O.edge(T).cutvalue<0})}function x(O,T,C){var N=C.v,M=C.w;T.hasEdge(N,M)||(N=C.w,M=C.v);var R=O.node(N),L=O.node(M),D=R,z=!1;R.lim>L.lim&&(D=L,z=!0);var q=e.filter(T.edges(),function(G){return z===A(O,O.node(G.v),D)&&z!==A(O,O.node(G.w),D)});return e.minBy(q,function(G){return n(T,G)})}function E(O,T,C,N){var M=C.v,R=C.w;O.removeEdge(M,R),O.setEdge(N.v,N.w,{}),m(O),f(O,T),w(O,T)}function w(O,T){var C=e.find(O.nodes(),function(M){return!T.node(M).parent}),N=i(O,C);N=N.slice(1),e.forEach(N,function(M){var R=O.node(M).parent,L=T.edge(M,R),D=!1;L||(L=T.edge(R,M),D=!0),T.node(M).rank=T.node(R).rank+(D?L.minlen:-L.minlen)})}function _(O,T,C){return O.hasEdge(T,C)}function A(O,T,C){return C.low<=T.lim&&T.lim<=C.lim}return qw}var Bw,i6;function Uxe(){if(i6)return Bw;i6=1;var e=mp(),r=e.longestPath,n=mU(),a=$xe();Bw=i;function i(f){switch(f.graph().ranker){case"network-simplex":c(f);break;case"tight-tree":u(f);break;case"longest-path":o(f);break;default:c(f)}}var o=r;function u(f){r(f),n(f)}function c(f){a(f)}return Bw}var $w,o6;function Fxe(){if(o6)return $w;o6=1;var e=pt();$w=r;function r(i){var o=a(i);e.forEach(i.graph().dummyChains,function(u){for(var c=i.node(u),f=c.edgeObj,d=n(i,o,f.v,f.w),h=d.path,m=d.lca,g=0,y=h[g],x=!0;u!==f.w;){if(c=i.node(u),x){for(;(y=h[g])!==m&&i.node(y).maxRank<c.rank;)g++;y===m&&(x=!1)}if(!x){for(;g<h.length-1&&i.node(y=h[g+1]).minRank<=c.rank;)g++;y=h[g]}i.setParent(u,y),u=i.successors(u)[0]}})}function n(i,o,u,c){var f=[],d=[],h=Math.min(o[u].low,o[c].low),m=Math.max(o[u].lim,o[c].lim),g,y;g=u;do g=i.parent(g),f.push(g);while(g&&(o[g].low>h||m>o[g].lim));for(y=g,g=c;(g=i.parent(g))!==y;)d.push(g);return{path:f.concat(d.reverse()),lca:y}}function a(i){var o={},u=0;function c(f){var d=u;e.forEach(i.children(f),c),o[f]={low:d,lim:u++}}return e.forEach(i.children(),c),o}return $w}var Uw,l6;function Hxe(){if(l6)return Uw;l6=1;var e=pt(),r=Nr();Uw={run:n,cleanup:u};function n(c){var f=r.addDummyNode(c,"root",{},"_root"),d=i(c),h=e.max(e.values(d))-1,m=2*h+1;c.graph().nestingRoot=f,e.forEach(c.edges(),function(y){c.edge(y).minlen*=m});var g=o(c)+1;e.forEach(c.children(),function(y){a(c,f,m,g,h,d,y)}),c.graph().nodeRankFactor=m}function a(c,f,d,h,m,g,y){var x=c.children(y);if(!x.length){y!==f&&c.setEdge(f,y,{weight:0,minlen:d});return}var E=r.addBorderNode(c,"_bt"),w=r.addBorderNode(c,"_bb"),_=c.node(y);c.setParent(E,y),_.borderTop=E,c.setParent(w,y),_.borderBottom=w,e.forEach(x,function(A){a(c,f,d,h,m,g,A);var O=c.node(A),T=O.borderTop?O.borderTop:A,C=O.borderBottom?O.borderBottom:A,N=O.borderTop?h:2*h,M=T!==C?1:m-g[y]+1;c.setEdge(E,T,{weight:N,minlen:M,nestingEdge:!0}),c.setEdge(C,w,{weight:N,minlen:M,nestingEdge:!0})}),c.parent(y)||c.setEdge(f,E,{weight:0,minlen:m+g[y]})}function i(c){var f={};function d(h,m){var g=c.children(h);g&&g.length&&e.forEach(g,function(y){d(y,m+1)}),f[h]=m}return e.forEach(c.children(),function(h){d(h,1)}),f}function o(c){return e.reduce(c.edges(),function(f,d){return f+c.edge(d).weight},0)}function u(c){var f=c.graph();c.removeNode(f.nestingRoot),delete f.nestingRoot,e.forEach(c.edges(),function(d){var h=c.edge(d);h.nestingEdge&&c.removeEdge(d)})}return Uw}var Fw,u6;function Gxe(){if(u6)return Fw;u6=1;var e=pt(),r=Nr();Fw=n;function n(i){function o(u){var c=i.children(u),f=i.node(u);if(c.length&&e.forEach(c,o),e.has(f,"minRank")){f.borderLeft=[],f.borderRight=[];for(var d=f.minRank,h=f.maxRank+1;d<h;++d)a(i,"borderLeft","_bl",u,f,d),a(i,"borderRight","_br",u,f,d)}}e.forEach(i.children(),o)}function a(i,o,u,c,f,d){var h={width:0,height:0,rank:d,borderType:o},m=f[o][d-1],g=r.addDummyNode(i,"border",h,u);f[o][d]=g,i.setParent(g,c),m&&i.setEdge(m,g,{weight:1})}return Fw}var Hw,s6;function Kxe(){if(s6)return Hw;s6=1;var e=pt();Hw={adjust:r,undo:n};function r(d){var h=d.graph().rankdir.toLowerCase();(h==="lr"||h==="rl")&&a(d)}function n(d){var h=d.graph().rankdir.toLowerCase();(h==="bt"||h==="rl")&&o(d),(h==="lr"||h==="rl")&&(c(d),a(d))}function a(d){e.forEach(d.nodes(),function(h){i(d.node(h))}),e.forEach(d.edges(),function(h){i(d.edge(h))})}function i(d){var h=d.width;d.width=d.height,d.height=h}function o(d){e.forEach(d.nodes(),function(h){u(d.node(h))}),e.forEach(d.edges(),function(h){var m=d.edge(h);e.forEach(m.points,u),e.has(m,"y")&&u(m)})}function u(d){d.y=-d.y}function c(d){e.forEach(d.nodes(),function(h){f(d.node(h))}),e.forEach(d.edges(),function(h){var m=d.edge(h);e.forEach(m.points,f),e.has(m,"x")&&f(m)})}function f(d){var h=d.x;d.x=d.y,d.y=h}return Hw}var Gw,c6;function Vxe(){if(c6)return Gw;c6=1;var e=pt();Gw=r;function r(n){var a={},i=e.filter(n.nodes(),function(d){return!n.children(d).length}),o=e.max(e.map(i,function(d){return n.node(d).rank})),u=e.map(e.range(o+1),function(){return[]});function c(d){if(!e.has(a,d)){a[d]=!0;var h=n.node(d);u[h.rank].push(d),e.forEach(n.successors(d),c)}}var f=e.sortBy(i,function(d){return n.node(d).rank});return e.forEach(f,c),u}return Gw}var Kw,f6;function Yxe(){if(f6)return Kw;f6=1;var e=pt();Kw=r;function r(a,i){for(var o=0,u=1;u<i.length;++u)o+=n(a,i[u-1],i[u]);return o}function n(a,i,o){for(var u=e.zipObject(o,e.map(o,function(g,y){return y})),c=e.flatten(e.map(i,function(g){return e.sortBy(e.map(a.outEdges(g),function(y){return{pos:u[y.w],weight:a.edge(y).weight}}),"pos")}),!0),f=1;f<o.length;)f<<=1;var d=2*f-1;f-=1;var h=e.map(new Array(d),function(){return 0}),m=0;return e.forEach(c.forEach(function(g){var y=g.pos+f;h[y]+=g.weight;for(var x=0;y>0;)y%2&&(x+=h[y+1]),y=y-1>>1,h[y]+=g.weight;m+=g.weight*x})),m}return Kw}var Vw,d6;function Xxe(){if(d6)return Vw;d6=1;var e=pt();Vw=r;function r(n,a){return e.map(a,function(i){var o=n.inEdges(i);if(o.length){var u=e.reduce(o,function(c,f){var d=n.edge(f),h=n.node(f.v);return{sum:c.sum+d.weight*h.order,weight:c.weight+d.weight}},{sum:0,weight:0});return{v:i,barycenter:u.sum/u.weight,weight:u.weight}}else return{v:i}})}return Vw}var Yw,h6;function Wxe(){if(h6)return Yw;h6=1;var e=pt();Yw=r;function r(i,o){var u={};e.forEach(i,function(f,d){var h=u[f.v]={indegree:0,in:[],out:[],vs:[f.v],i:d};e.isUndefined(f.barycenter)||(h.barycenter=f.barycenter,h.weight=f.weight)}),e.forEach(o.edges(),function(f){var d=u[f.v],h=u[f.w];!e.isUndefined(d)&&!e.isUndefined(h)&&(h.indegree++,d.out.push(u[f.w]))});var c=e.filter(u,function(f){return!f.indegree});return n(c)}function n(i){var o=[];function u(d){return function(h){h.merged||(e.isUndefined(h.barycenter)||e.isUndefined(d.barycenter)||h.barycenter>=d.barycenter)&&a(d,h)}}function c(d){return function(h){h.in.push(d),--h.indegree===0&&i.push(h)}}for(;i.length;){var f=i.pop();o.push(f),e.forEach(f.in.reverse(),u(f)),e.forEach(f.out,c(f))}return e.map(e.filter(o,function(d){return!d.merged}),function(d){return e.pick(d,["vs","i","barycenter","weight"])})}function a(i,o){var u=0,c=0;i.weight&&(u+=i.barycenter*i.weight,c+=i.weight),o.weight&&(u+=o.barycenter*o.weight,c+=o.weight),i.vs=o.vs.concat(i.vs),i.barycenter=u/c,i.weight=c,i.i=Math.min(o.i,i.i),o.merged=!0}return Yw}var Xw,p6;function Zxe(){if(p6)return Xw;p6=1;var e=pt(),r=Nr();Xw=n;function n(o,u){var c=r.partition(o,function(E){return e.has(E,"barycenter")}),f=c.lhs,d=e.sortBy(c.rhs,function(E){return-E.i}),h=[],m=0,g=0,y=0;f.sort(i(!!u)),y=a(h,d,y),e.forEach(f,function(E){y+=E.vs.length,h.push(E.vs),m+=E.barycenter*E.weight,g+=E.weight,y=a(h,d,y)});var x={vs:e.flatten(h,!0)};return g&&(x.barycenter=m/g,x.weight=g),x}function a(o,u,c){for(var f;u.length&&(f=e.last(u)).i<=c;)u.pop(),o.push(f.vs),c++;return c}function i(o){return function(u,c){return u.barycenter<c.barycenter?-1:u.barycenter>c.barycenter?1:o?c.i-u.i:u.i-c.i}}return Xw}var Ww,m6;function Qxe(){if(m6)return Ww;m6=1;var e=pt(),r=Xxe(),n=Wxe(),a=Zxe();Ww=i;function i(c,f,d,h){var m=c.children(f),g=c.node(f),y=g?g.borderLeft:void 0,x=g?g.borderRight:void 0,E={};y&&(m=e.filter(m,function(C){return C!==y&&C!==x}));var w=r(c,m);e.forEach(w,function(C){if(c.children(C.v).length){var N=i(c,C.v,d,h);E[C.v]=N,e.has(N,"barycenter")&&u(C,N)}});var _=n(w,d);o(_,E);var A=a(_,h);if(y&&(A.vs=e.flatten([y,A.vs,x],!0),c.predecessors(y).length)){var O=c.node(c.predecessors(y)[0]),T=c.node(c.predecessors(x)[0]);e.has(A,"barycenter")||(A.barycenter=0,A.weight=0),A.barycenter=(A.barycenter*A.weight+O.order+T.order)/(A.weight+2),A.weight+=2}return A}function o(c,f){e.forEach(c,function(d){d.vs=e.flatten(d.vs.map(function(h){return f[h]?f[h].vs:h}),!0)})}function u(c,f){e.isUndefined(c.barycenter)?(c.barycenter=f.barycenter,c.weight=f.weight):(c.barycenter=(c.barycenter*c.weight+f.barycenter*f.weight)/(c.weight+f.weight),c.weight+=f.weight)}return Ww}var Zw,v6;function Jxe(){if(v6)return Zw;v6=1;var e=pt(),r=Rn().Graph;Zw=n;function n(i,o,u){var c=a(i),f=new r({compound:!0}).setGraph({root:c}).setDefaultNodeLabel(function(d){return i.node(d)});return e.forEach(i.nodes(),function(d){var h=i.node(d),m=i.parent(d);(h.rank===o||h.minRank<=o&&o<=h.maxRank)&&(f.setNode(d),f.setParent(d,m||c),e.forEach(i[u](d),function(g){var y=g.v===d?g.w:g.v,x=f.edge(y,d),E=e.isUndefined(x)?0:x.weight;f.setEdge(y,d,{weight:i.edge(g).weight+E})}),e.has(h,"minRank")&&f.setNode(d,{borderLeft:h.borderLeft[o],borderRight:h.borderRight[o]}))}),f}function a(i){for(var o;i.hasNode(o=e.uniqueId("_root")););return o}return Zw}var Qw,g6;function e_e(){if(g6)return Qw;g6=1;var e=pt();Qw=r;function r(n,a,i){var o={},u;e.forEach(i,function(c){for(var f=n.parent(c),d,h;f;){if(d=n.parent(f),d?(h=o[d],o[d]=f):(h=u,u=f),h&&h!==f){a.setEdge(h,f);return}f=d}})}return Qw}var Jw,y6;function t_e(){if(y6)return Jw;y6=1;var e=pt(),r=Vxe(),n=Yxe(),a=Qxe(),i=Jxe(),o=e_e(),u=Rn().Graph,c=Nr();Jw=f;function f(g){var y=c.maxRank(g),x=d(g,e.range(1,y+1),"inEdges"),E=d(g,e.range(y-1,-1,-1),"outEdges"),w=r(g);m(g,w);for(var _=Number.POSITIVE_INFINITY,A,O=0,T=0;T<4;++O,++T){h(O%2?x:E,O%4>=2),w=c.buildLayerMatrix(g);var C=n(g,w);C<_&&(T=0,A=e.cloneDeep(w),_=C)}m(g,A)}function d(g,y,x){return e.map(y,function(E){return i(g,E,x)})}function h(g,y){var x=new u;e.forEach(g,function(E){var w=E.graph().root,_=a(E,w,x,y);e.forEach(_.vs,function(A,O){E.node(A).order=O}),o(E,x,_.vs)})}function m(g,y){e.forEach(y,function(x){e.forEach(x,function(E,w){g.node(E).order=w})})}return Jw}var e2,b6;function r_e(){if(b6)return e2;b6=1;var e=pt(),r=Rn().Graph,n=Nr();e2={positionX:x,findType1Conflicts:a,findType2Conflicts:i,addConflict:u,hasConflict:c,verticalAlignment:f,horizontalCompaction:d,alignCoordinates:g,findSmallestWidthAlignment:m,balance:y};function a(_,A){var O={};function T(C,N){var M=0,R=0,L=C.length,D=e.last(N);return e.forEach(N,function(z,q){var G=o(_,z),U=G?_.node(G).order:L;(G||z===D)&&(e.forEach(N.slice(R,q+1),function(Y){e.forEach(_.predecessors(Y),function($){var J=_.node($),re=J.order;(re<M||U<re)&&!(J.dummy&&_.node(Y).dummy)&&u(O,$,Y)})}),R=q+1,M=U)}),N}return e.reduce(A,T),O}function i(_,A){var O={};function T(N,M,R,L,D){var z;e.forEach(e.range(M,R),function(q){z=N[q],_.node(z).dummy&&e.forEach(_.predecessors(z),function(G){var U=_.node(G);U.dummy&&(U.order<L||U.order>D)&&u(O,G,z)})})}function C(N,M){var R=-1,L,D=0;return e.forEach(M,function(z,q){if(_.node(z).dummy==="border"){var G=_.predecessors(z);G.length&&(L=_.node(G[0]).order,T(M,D,q,R,L),D=q,R=L)}T(M,D,M.length,L,N.length)}),M}return e.reduce(A,C),O}function o(_,A){if(_.node(A).dummy)return e.find(_.predecessors(A),function(O){return _.node(O).dummy})}function u(_,A,O){if(A>O){var T=A;A=O,O=T}var C=_[A];C||(_[A]=C={}),C[O]=!0}function c(_,A,O){if(A>O){var T=A;A=O,O=T}return e.has(_[A],O)}function f(_,A,O,T){var C={},N={},M={};return e.forEach(A,function(R){e.forEach(R,function(L,D){C[L]=L,N[L]=L,M[L]=D})}),e.forEach(A,function(R){var L=-1;e.forEach(R,function(D){var z=T(D);if(z.length){z=e.sortBy(z,function($){return M[$]});for(var q=(z.length-1)/2,G=Math.floor(q),U=Math.ceil(q);G<=U;++G){var Y=z[G];N[D]===D&&L<M[Y]&&!c(O,D,Y)&&(N[Y]=D,N[D]=C[D]=C[Y],L=M[Y])}}})}),{root:C,align:N}}function d(_,A,O,T,C){var N={},M=h(_,A,O,C),R=C?"borderLeft":"borderRight";function L(q,G){for(var U=M.nodes(),Y=U.pop(),$={};Y;)$[Y]?q(Y):($[Y]=!0,U.push(Y),U=U.concat(G(Y))),Y=U.pop()}function D(q){N[q]=M.inEdges(q).reduce(function(G,U){return Math.max(G,N[U.v]+M.edge(U))},0)}function z(q){var G=M.outEdges(q).reduce(function(Y,$){return Math.min(Y,N[$.w]-M.edge($))},Number.POSITIVE_INFINITY),U=_.node(q);G!==Number.POSITIVE_INFINITY&&U.borderType!==R&&(N[q]=Math.max(N[q],G))}return L(D,M.predecessors.bind(M)),L(z,M.successors.bind(M)),e.forEach(T,function(q){N[q]=N[O[q]]}),N}function h(_,A,O,T){var C=new r,N=_.graph(),M=E(N.nodesep,N.edgesep,T);return e.forEach(A,function(R){var L;e.forEach(R,function(D){var z=O[D];if(C.setNode(z),L){var q=O[L],G=C.edge(q,z);C.setEdge(q,z,Math.max(M(_,D,L),G||0))}L=D})}),C}function m(_,A){return e.minBy(e.values(A),function(O){var T=Number.NEGATIVE_INFINITY,C=Number.POSITIVE_INFINITY;return e.forIn(O,function(N,M){var R=w(_,M)/2;T=Math.max(N+R,T),C=Math.min(N-R,C)}),T-C})}function g(_,A){var O=e.values(A),T=e.min(O),C=e.max(O);e.forEach(["u","d"],function(N){e.forEach(["l","r"],function(M){var R=N+M,L=_[R],D;if(L!==A){var z=e.values(L);D=M==="l"?T-e.min(z):C-e.max(z),D&&(_[R]=e.mapValues(L,function(q){return q+D}))}})})}function y(_,A){return e.mapValues(_.ul,function(O,T){if(A)return _[A.toLowerCase()][T];var C=e.sortBy(e.map(_,T));return(C[1]+C[2])/2})}function x(_){var A=n.buildLayerMatrix(_),O=e.merge(a(_,A),i(_,A)),T={},C;e.forEach(["u","d"],function(M){C=M==="u"?A:e.values(A).reverse(),e.forEach(["l","r"],function(R){R==="r"&&(C=e.map(C,function(q){return e.values(q).reverse()}));var L=(M==="u"?_.predecessors:_.successors).bind(_),D=f(_,C,O,L),z=d(_,C,D.root,D.align,R==="r");R==="r"&&(z=e.mapValues(z,function(q){return-q})),T[M+R]=z})});var N=m(_,T);return g(T,N),y(T,_.graph().align)}function E(_,A,O){return function(T,C,N){var M=T.node(C),R=T.node(N),L=0,D;if(L+=M.width/2,e.has(M,"labelpos"))switch(M.labelpos.toLowerCase()){case"l":D=-M.width/2;break;case"r":D=M.width/2;break}if(D&&(L+=O?D:-D),D=0,L+=(M.dummy?A:_)/2,L+=(R.dummy?A:_)/2,L+=R.width/2,e.has(R,"labelpos"))switch(R.labelpos.toLowerCase()){case"l":D=R.width/2;break;case"r":D=-R.width/2;break}return D&&(L+=O?D:-D),D=0,L}}function w(_,A){return _.node(A).width}return e2}var t2,x6;function n_e(){if(x6)return t2;x6=1;var e=pt(),r=Nr(),n=r_e().positionX;t2=a;function a(o){o=r.asNonCompoundGraph(o),i(o),e.forEach(n(o),function(u,c){o.node(c).x=u})}function i(o){var u=r.buildLayerMatrix(o),c=o.graph().ranksep,f=0;e.forEach(u,function(d){var h=e.max(e.map(d,function(m){return o.node(m).height}));e.forEach(d,function(m){o.node(m).y=f+h/2}),f+=h+c})}return t2}var r2,_6;function a_e(){if(_6)return r2;_6=1;var e=pt(),r=qxe(),n=Bxe(),a=Uxe(),i=Nr().normalizeRanks,o=Fxe(),u=Nr().removeEmptyRanks,c=Hxe(),f=Gxe(),d=Kxe(),h=t_e(),m=n_e(),g=Nr(),y=Rn().Graph;r2=x;function x(B,H){var te=H&&H.debugTiming?g.time:g.notime;te("layout",function(){var he=te(" buildLayoutGraph",function(){return L(B)});te(" runLayout",function(){E(he,te)}),te(" updateInputGraph",function(){w(B,he)})})}function E(B,H){H(" makeSpaceForEdgeLabels",function(){D(B)}),H(" removeSelfEdges",function(){oe(B)}),H(" acyclic",function(){r.run(B)}),H(" nestingGraph.run",function(){c.run(B)}),H(" rank",function(){a(g.asNonCompoundGraph(B))}),H(" injectEdgeLabelProxies",function(){z(B)}),H(" removeEmptyRanks",function(){u(B)}),H(" nestingGraph.cleanup",function(){c.cleanup(B)}),H(" normalizeRanks",function(){i(B)}),H(" assignRankMinMax",function(){q(B)}),H(" removeEdgeLabelProxies",function(){G(B)}),H(" normalize.run",function(){n.run(B)}),H(" parentDummyChains",function(){o(B)}),H(" addBorderSegments",function(){f(B)}),H(" order",function(){h(B)}),H(" insertSelfEdges",function(){fe(B)}),H(" adjustCoordinateSystem",function(){d.adjust(B)}),H(" position",function(){m(B)}),H(" positionSelfEdges",function(){F(B)}),H(" removeBorderNodes",function(){re(B)}),H(" normalize.undo",function(){n.undo(B)}),H(" fixupEdgeLabelCoords",function(){$(B)}),H(" undoCoordinateSystem",function(){d.undo(B)}),H(" translateGraph",function(){U(B)}),H(" assignNodeIntersects",function(){Y(B)}),H(" reversePoints",function(){J(B)}),H(" acyclic.undo",function(){r.undo(B)})}function w(B,H){e.forEach(B.nodes(),function(te){var he=B.node(te),ge=H.node(te);he&&(he.x=ge.x,he.y=ge.y,H.children(te).length&&(he.width=ge.width,he.height=ge.height))}),e.forEach(B.edges(),function(te){var he=B.edge(te),ge=H.edge(te);he.points=ge.points,e.has(ge,"x")&&(he.x=ge.x,he.y=ge.y)}),B.graph().width=H.graph().width,B.graph().height=H.graph().height}var _=["nodesep","edgesep","ranksep","marginx","marginy"],A={ranksep:50,edgesep:20,nodesep:50,rankdir:"tb"},O=["acyclicer","ranker","rankdir","align"],T=["width","height"],C={width:0,height:0},N=["minlen","weight","width","height","labeloffset"],M={minlen:1,weight:1,width:0,height:0,labeloffset:10,labelpos:"r"},R=["labelpos"];function L(B){var H=new y({multigraph:!0,compound:!0}),te=ce(B.graph());return H.setGraph(e.merge({},A,Z(te,_),e.pick(te,O))),e.forEach(B.nodes(),function(he){var ge=ce(B.node(he));H.setNode(he,e.defaults(Z(ge,T),C)),H.setParent(he,B.parent(he))}),e.forEach(B.edges(),function(he){var ge=ce(B.edge(he));H.setEdge(he,e.merge({},M,Z(ge,N),e.pick(ge,R)))}),H}function D(B){var H=B.graph();H.ranksep/=2,e.forEach(B.edges(),function(te){var he=B.edge(te);he.minlen*=2,he.labelpos.toLowerCase()!=="c"&&(H.rankdir==="TB"||H.rankdir==="BT"?he.width+=he.labeloffset:he.height+=he.labeloffset)})}function z(B){e.forEach(B.edges(),function(H){var te=B.edge(H);if(te.width&&te.height){var he=B.node(H.v),ge=B.node(H.w),W={rank:(ge.rank-he.rank)/2+he.rank,e:H};g.addDummyNode(B,"edge-proxy",W,"_ep")}})}function q(B){var H=0;e.forEach(B.nodes(),function(te){var he=B.node(te);he.borderTop&&(he.minRank=B.node(he.borderTop).rank,he.maxRank=B.node(he.borderBottom).rank,H=e.max(H,he.maxRank))}),B.graph().maxRank=H}function G(B){e.forEach(B.nodes(),function(H){var te=B.node(H);te.dummy==="edge-proxy"&&(B.edge(te.e).labelRank=te.rank,B.removeNode(H))})}function U(B){var H=Number.POSITIVE_INFINITY,te=0,he=Number.POSITIVE_INFINITY,ge=0,W=B.graph(),le=W.marginx||0,ye=W.marginy||0;function K(be){var ve=be.x,_e=be.y,$e=be.width,Te=be.height;H=Math.min(H,ve-$e/2),te=Math.max(te,ve+$e/2),he=Math.min(he,_e-Te/2),ge=Math.max(ge,_e+Te/2)}e.forEach(B.nodes(),function(be){K(B.node(be))}),e.forEach(B.edges(),function(be){var ve=B.edge(be);e.has(ve,"x")&&K(ve)}),H-=le,he-=ye,e.forEach(B.nodes(),function(be){var ve=B.node(be);ve.x-=H,ve.y-=he}),e.forEach(B.edges(),function(be){var ve=B.edge(be);e.forEach(ve.points,function(_e){_e.x-=H,_e.y-=he}),e.has(ve,"x")&&(ve.x-=H),e.has(ve,"y")&&(ve.y-=he)}),W.width=te-H+le,W.height=ge-he+ye}function Y(B){e.forEach(B.edges(),function(H){var te=B.edge(H),he=B.node(H.v),ge=B.node(H.w),W,le;te.points?(W=te.points[0],le=te.points[te.points.length-1]):(te.points=[],W=ge,le=he),te.points.unshift(g.intersectRect(he,W)),te.points.push(g.intersectRect(ge,le))})}function $(B){e.forEach(B.edges(),function(H){var te=B.edge(H);if(e.has(te,"x"))switch((te.labelpos==="l"||te.labelpos==="r")&&(te.width-=te.labeloffset),te.labelpos){case"l":te.x-=te.width/2+te.labeloffset;break;case"r":te.x+=te.width/2+te.labeloffset;break}})}function J(B){e.forEach(B.edges(),function(H){var te=B.edge(H);te.reversed&&te.points.reverse()})}function re(B){e.forEach(B.nodes(),function(H){if(B.children(H).length){var te=B.node(H),he=B.node(te.borderTop),ge=B.node(te.borderBottom),W=B.node(e.last(te.borderLeft)),le=B.node(e.last(te.borderRight));te.width=Math.abs(le.x-W.x),te.height=Math.abs(ge.y-he.y),te.x=W.x+te.width/2,te.y=he.y+te.height/2}}),e.forEach(B.nodes(),function(H){B.node(H).dummy==="border"&&B.removeNode(H)})}function oe(B){e.forEach(B.edges(),function(H){if(H.v===H.w){var te=B.node(H.v);te.selfEdges||(te.selfEdges=[]),te.selfEdges.push({e:H,label:B.edge(H)}),B.removeEdge(H)}})}function fe(B){var H=g.buildLayerMatrix(B);e.forEach(H,function(te){var he=0;e.forEach(te,function(ge,W){var le=B.node(ge);le.order=W+he,e.forEach(le.selfEdges,function(ye){g.addDummyNode(B,"selfedge",{width:ye.label.width,height:ye.label.height,rank:le.rank,order:W+ ++he,e:ye.e,label:ye.label},"_se")}),delete le.selfEdges})})}function F(B){e.forEach(B.nodes(),function(H){var te=B.node(H);if(te.dummy==="selfedge"){var he=B.node(te.e.v),ge=he.x+he.width/2,W=he.y,le=te.x-ge,ye=he.height/2;B.setEdge(te.e,te.label),B.removeNode(H),te.label.points=[{x:ge+2*le/3,y:W-ye},{x:ge+5*le/6,y:W-ye},{x:ge+le,y:W},{x:ge+5*le/6,y:W+ye},{x:ge+2*le/3,y:W+ye}],te.label.x=te.x,te.label.y=te.y}})}function Z(B,H){return e.mapValues(e.pick(B,H),Number)}function ce(B){var H={};return e.forEach(B,function(te,he){H[he.toLowerCase()]=te}),H}return r2}var n2,w6;function i_e(){if(w6)return n2;w6=1;var e=pt(),r=Nr(),n=Rn().Graph;n2={debugOrdering:a};function a(i){var o=r.buildLayerMatrix(i),u=new n({compound:!0,multigraph:!0}).setGraph({});return e.forEach(i.nodes(),function(c){u.setNode(c,{label:c}),u.setParent(c,"layer"+i.node(c).rank)}),e.forEach(i.edges(),function(c){u.setEdge(c.v,c.w,{},c.name)}),e.forEach(o,function(c,f){var d="layer"+f;u.setNode(d,{rank:"same"}),e.reduce(c,function(h,m){return u.setEdge(h,m,{style:"invis"}),m})}),u}return n2}var a2,S6;function o_e(){return S6||(S6=1,a2="0.8.5"),a2}var i2,E6;function l_e(){return E6||(E6=1,i2={graphlib:Rn(),layout:a_e(),debug:i_e(),util:{time:Nr().time,notime:Nr().notime},version:o_e()}),i2}var u_e=l_e();const k6=Dn(u_e),s_e=[{id:"ci_green",eventName:"CI Passed",description:"When CI checks pass on a PR"},{id:"ci_red",eventName:"CI Failed",description:"When CI checks fail on a PR"},{id:"pr_merged",eventName:"PR Merged",description:"When a PR is merged"},{id:"ci_blocked",eventName:"CI Blocked",description:"When CI failure count exceeds threshold"},{id:"stuck_nudge",eventName:"Stuck Nudge",description:"When a team has been idle too long"},{id:"nudge_progress",eventName:"Nudge Progress",description:"Ask TL for a status update"},{id:"ask_for_pr",eventName:"Ask for PR",description:"Request TL to open a pull request"},{id:"check_ci",eventName:"Check CI",description:"Tell TL to fix failing CI"},{id:"wrap_up",eventName:"Wrap Up",description:"Tell TL to finish and push"}],c_e=130,f_e=50;function kS({trigger:e,size:r=14,className:n}){switch(e){case"hook":return b.jsx(BK,{size:r,className:n});case"timer":return b.jsx(UK,{size:r,className:n});case"poller":return b.jsx(zK,{size:r,className:n});case"pm_action":return b.jsx($K,{size:r,className:n});case"system":return b.jsx(RS,{size:r,className:n});default:return null}}function d_e(e,r,n,a,i,o){const u=a/24,c=r-a/2,f=n-a/2,d={fill:"none",stroke:i,strokeWidth:2/u,strokeLinecap:"round",strokeLinejoin:"round",opacity:o};switch(e){case"hook":return b.jsx("g",{transform:`translate(${c},${f}) scale(${u})`,...d,children:b.jsx("path",{d:"M13 2L3 14h9l-1 8 10-12h-9l1-8z"})});case"timer":return b.jsxs("g",{transform:`translate(${c},${f}) scale(${u})`,...d,children:[b.jsx("circle",{cx:"12",cy:"12",r:"10"}),b.jsx("polyline",{points:"12 6 12 12 16 14"})]});case"poller":return b.jsxs("g",{transform:`translate(${c},${f}) scale(${u})`,...d,children:[b.jsx("path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8"}),b.jsx("path",{d:"M21 3v5h-5"}),b.jsx("path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16"}),b.jsx("path",{d:"M8 16H3v5"})]});case"pm_action":return b.jsxs("g",{transform:`translate(${c},${f}) scale(${u})`,...d,children:[b.jsx("path",{d:"M20 21v-2a4 4 0 0 0-4-4H8a4 4 0 0 0-4 4v2"}),b.jsx("circle",{cx:"12",cy:"7",r:"4"})]});case"system":return b.jsxs("g",{transform:`translate(${c},${f}) scale(${u})`,...d,children:[b.jsx("path",{d:"M12.22 2h-.44a2 2 0 0 0-2 2v.18a2 2 0 0 1-1 1.73l-.43.25a2 2 0 0 1-2 0l-.15-.08a2 2 0 0 0-2.73.73l-.22.38a2 2 0 0 0 .73 2.73l.15.1a2 2 0 0 1 1 1.72v.51a2 2 0 0 1-1 1.74l-.15.09a2 2 0 0 0-.73 2.73l.22.38a2 2 0 0 0 2.73.73l.15-.08a2 2 0 0 1 2 0l.43.25a2 2 0 0 1 1 1.73V20a2 2 0 0 0 2 2h.44a2 2 0 0 0 2-2v-.18a2 2 0 0 1 1-1.73l.43-.25a2 2 0 0 1 2 0l.15.08a2 2 0 0 0 2.73-.73l.22-.39a2 2 0 0 0-.73-2.73l-.15-.08a2 2 0 0 1-1-1.74v-.5a2 2 0 0 1 1-1.74l.15-.09a2 2 0 0 0 .73-2.73l-.22-.38a2 2 0 0 0-2.73-.73l-.15.08a2 2 0 0 1-2 0l-.43-.25a2 2 0 0 1-1-1.73V4a2 2 0 0 0-2-2z"}),b.jsx("circle",{cx:"12",cy:"12",r:"3"})]});default:return null}}const h_e={hook:"Hook event",timer:"Timer (stuck detector)",poller:"Poller (GitHub)",pm_action:"PM action (API call)",system:"System (queue, recovery)"};function p_e(e,r){const n=e.map(h=>h.id),a=r.flatMap(h=>h.from==="*"?n.map(m=>({...h,from:m,id:`${h.id}-${m}`})):[h]),i=new Map;for(const h of a){const m=`${h.from}|${h.trigger}|${h.to}`,g=i.get(m);if(!g)i.set(m,h);else{const y=g.id.includes(`-${g.from}`),x=h.id.includes(`-${h.from}`);y&&!x&&i.set(m,h)}}const o=[...i.values()],u=h=>`${h.trigger}|${h.to}`,c=new Map;for(const h of o){const m=u(h);c.has(m)||c.set(m,[]),c.get(m).push(h)}const f=[];for(const[,h]of c){const m=new Set(h.map(y=>y.from));if(n.every(y=>m.has(y))&&h.length>=n.length){const y=h[0],x=y.id.replace(/-[^-]+$/,"");f.push({...y,from:"*",id:x})}else f.push(...h)}const d=[...f].sort((h,m)=>h.from==="*"&&m.from!=="*"?-1:h.from!=="*"&&m.from==="*"?1:h.from<m.from?-1:h.from>m.from?1:h.to<m.to?-1:h.to>m.to?1:0);return{transitions:f,tableTransitions:d}}function m_e(e,r){const n=[],a=e.map(d=>d.id),i=new Map;for(const d of r){if(d.from==="*")continue;const h=`${d.id}|${d.from}|${d.to}|${d.trigger}`;i.has(h)||i.set(h,[]),i.get(h).push(d)}for(const[,d]of i)if(d.length>1){const h=d.map(m=>m.id).join(", ");n.push({type:"duplicate",message:`Duplicate transition: ${d[0].from} -> ${d[0].to} (${d[0].trigger}) defined ${d.length} times [${h}]`})}const o=new Set,u=new Set;for(const d of r)d.from==="*"?a.forEach(h=>o.add(h)):o.add(d.from),u.add(d.to);const c=new Set(["done","failed"]);for(const d of a)!o.has(d)&&!c.has(d)&&n.push({type:"orphan",message:`Orphan state: "${d}" has no outgoing transitions`});const f=new Set(["queued"]);for(const d of a)!u.has(d)&&!f.has(d)&&n.push({type:"unreachable",message:`Unreachable state: "${d}" has no incoming transitions`});return n}const v_e=70,g_e=30;function y_e(e,r){const n=new k6.graphlib.Graph({multigraph:!0});n.setGraph({rankdir:"LR",nodesep:60,ranksep:120,marginx:40,marginy:40}),n.setDefaultEdgeLabel(()=>({}));const a=new Set(e.map(m=>m.id));for(const m of e)n.setNode(m.id,{label:m.id,width:c_e,height:f_e});r.some(m=>m.from==="*")&&n.setNode("*",{label:"All",width:v_e,height:g_e});const o=new Map;for(const m of r){const g=m.from==="*"?"*":m.from;if(g!=="*"&&!a.has(g)||!a.has(m.to))continue;const y=`${g}->${m.to}|${m.trigger}`;o.has(y)||o.set(y,[]),o.get(y).push(m)}o.forEach((m,g)=>{const[y,x]=g.split("|"),[E,w]=y.split("->");n.setEdge(E,w,{},x)}),k6.layout(n);const u=n.nodes().map(m=>{const g=n.node(m);return{id:m,x:g.x,y:g.y,width:g.width,height:g.height}}),c=n.edges().map(m=>{const g=n.edge(m),y=`${m.v}->${m.w}|${m.name}`;return{from:m.v,to:m.w,trigger:m.name||"",points:g.points||[],transitions:o.get(y)||[]}}),f=n.graph(),d=(f.width||800)+80,h=(f.height||400)+80;return{nodes:u,edges:c,width:d,height:h}}function b_e({info:e,stateColorMap:r,onClose:n}){const a=k.useRef(null);return k.useEffect(()=>{const o=setTimeout(n,5e3);return()=>clearTimeout(o)},[n]),k.useEffect(()=>{function o(u){a.current&&!a.current.contains(u.target)&&n()}return document.addEventListener("mousedown",o),()=>document.removeEventListener("mousedown",o)},[n]),e.transitions[0]?b.jsx("div",{ref:a,className:"absolute z-50 bg-[#161B22] border border-[#30363D] rounded-lg shadow-xl p-3 min-w-[240px] max-w-[340px]",style:{left:e.x,top:e.y,transform:"translate(-50%, -100%) translateY(-8px)"},children:e.transitions.map((o,u)=>b.jsxs("div",{className:u>0?"mt-3 pt-3 border-t border-[#30363D]":"",children:[b.jsxs("div",{className:"flex items-center gap-2 mb-2",children:[b.jsx("span",{className:"px-2 py-0.5 rounded-full text-xs font-semibold",style:{backgroundColor:`${r[o.from]||"#8B949E"}20`,color:r[o.from]||"#8B949E",border:`1px solid ${r[o.from]||"#8B949E"}40`},children:o.from==="*"?"All":o.from}),b.jsxs("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"#8B949E",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[b.jsx("path",{d:"M5 12h14"}),b.jsx("path",{d:"m12 5 7 7-7 7"})]}),b.jsx("span",{className:"px-2 py-0.5 rounded-full text-xs font-semibold",style:{backgroundColor:`${r[o.to]||"#8B949E"}20`,color:r[o.to]||"#8B949E",border:`1px solid ${r[o.to]||"#8B949E"}40`},children:o.to})]}),b.jsxs("div",{className:"flex items-center gap-1.5 text-xs text-dark-text mb-1",children:[b.jsx(kS,{trigger:o.trigger,size:12,className:"text-[#8B949E]"}),b.jsx("span",{className:"font-medium",children:o.triggerLabel})]}),b.jsx("p",{className:"text-xs text-dark-muted mb-1",children:o.description}),b.jsx("p",{className:"text-xs font-mono text-dark-muted bg-[#0D1117] px-1.5 py-0.5 rounded",children:o.condition})]},o.id))}):null}function x_e({cardDef:e,templateData:r,onSave:n}){const[a,i]=k.useState((r==null?void 0:r.template)??""),[o,u]=k.useState((r==null?void 0:r.enabled)??!0),[c,f]=k.useState(!1),[d,h]=k.useState(null);k.useEffect(()=>{r&&(i(r.template),u(r.enabled))},[r]);const m=k.useCallback(async()=>{f(!0),h(null);try{await n(e.id,a,o),h("Saved successfully")}catch(y){h(y instanceof Error?y.message:"Failed to save")}finally{f(!1)}},[e.id,a,o,n]),g=(r==null?void 0:r.placeholders)??[];return b.jsxs("div",{className:"bg-[#161B22] border border-[#30363D] rounded-lg p-4",children:[b.jsxs("div",{className:"flex items-start justify-between mb-2",children:[b.jsxs("div",{children:[b.jsx("h3",{className:"text-sm font-semibold text-dark-text",children:e.eventName}),b.jsx("p",{className:"text-xs text-dark-muted mt-0.5",children:e.description}),b.jsxs("p",{className:"text-[10px] text-dark-muted font-mono mt-0.5",children:["(",e.id,")"]})]}),b.jsx("button",{type:"button",role:"switch","aria-checked":o,"aria-label":`Toggle ${e.eventName} message`,onClick:()=>u(!o),className:`relative inline-flex h-5 w-9 items-center rounded-full transition-colors shrink-0 mt-0.5 ${o?"bg-[#3FB950]":"bg-[#30363D]"}`,children:b.jsx("span",{className:`inline-block h-3.5 w-3.5 rounded-full bg-white transition-transform ${o?"translate-x-[18px]":"translate-x-[3px]"}`})})]}),b.jsx("textarea",{value:a,onChange:y=>{i(y.target.value),h(null)},rows:3,className:`w-full text-sm font-mono rounded px-3 py-2 resize-y bg-[#0D1117] border ${o?"border-[#30363D] text-dark-text":"border-[#30363D] text-dark-muted opacity-60"} focus:outline-none focus:ring-1 focus:ring-[#58A6FF]/50`}),g.length>0&&b.jsx("div",{className:"mt-2 flex flex-wrap gap-1.5",children:g.map(y=>b.jsx("code",{className:"text-[11px] font-mono px-1.5 py-0.5 rounded bg-[#30363D] text-[#58A6FF]",children:`{{${y}}}`},y))}),b.jsxs("div",{className:"flex items-center gap-3 mt-3",children:[b.jsx("button",{type:"button",onClick:m,disabled:c,className:"px-3 py-1 text-xs font-medium rounded border border-[#58A6FF]/50 text-[#58A6FF] hover:bg-[#58A6FF]/10 disabled:opacity-50 disabled:cursor-not-allowed transition-colors",children:c?"Saving...":"Save"}),d&&b.jsx("span",{className:`text-xs ${d.includes("success")?"text-[#3FB950]":"text-[#F85149]"}`,children:d})]})]})}function __e(){const e=Ut(),[r,n]=k.useState("diagram"),[a,i]=k.useState(null),[o,u]=k.useState(!0),[c,f]=k.useState(null),[d,h]=k.useState([]),[m,g]=k.useState(null),[y,x]=k.useState(null),E=k.useRef(null),w=k.useCallback(async()=>{try{const D=await e.get("state-machine");i(D),f(null)}catch(D){f(D instanceof Error?D.message:String(D))}finally{u(!1)}},[e]),_=k.useCallback(async()=>{try{const D=await e.get("message-templates");h(D)}catch{}},[e]);k.useEffect(()=>{w(),_()},[w,_]);const A=k.useMemo(()=>a?p_e(a.states,a.transitions):null,[a]),O=k.useMemo(()=>a?m_e(a.states,a.transitions):[],[a]),T=k.useMemo(()=>!a||!A?null:y_e(a.states,A.transitions),[a,A]),C=k.useMemo(()=>{if(!a)return{};const D={"*":"#8B949E"};for(const z of a.states)D[z.id]=z.color;return D},[a]),N=k.useMemo(()=>{const D=new Map;for(const z of d)D.set(z.id,z);return D},[d]),M=k.useCallback((D,z)=>{if(!E.current)return;const q=E.current.getBoundingClientRect();x({transitions:z,x:D.clientX-q.left,y:D.clientY-q.top})},[]),R=k.useCallback(()=>x(null),[]),L=k.useCallback(async(D,z,q)=>{await e.put(`message-templates/${D}`,{template:z,enabled:q}),await _()},[e,_]);return o?b.jsx("div",{className:"flex items-center justify-center h-full",children:b.jsx("p",{className:"text-dark-muted text-sm",children:"Loading state machine..."})}):c?b.jsx("div",{className:"flex items-center justify-center h-full",children:b.jsxs("div",{className:"text-center",children:[b.jsx("p",{className:"text-[#F85149] text-sm mb-2",children:"Failed to load state machine"}),b.jsx("p",{className:"text-dark-muted text-xs",children:c})]})}):!a||!T?null:b.jsxs("div",{className:"h-full flex flex-col overflow-hidden",children:[b.jsxs("div",{className:"px-6 py-4 border-b border-dark-border shrink-0",children:[b.jsx("h1",{className:"text-xl font-semibold text-dark-text",children:"Lifecycle"}),b.jsx("p",{className:"text-dark-muted text-sm mt-1",children:"Team lifecycle transitions and PM message templates"})]}),b.jsxs("div",{className:"flex items-center gap-1 px-4 py-2 border-b border-[#30363D] shrink-0",children:[b.jsx("button",{onClick:()=>n("diagram"),className:`px-3 py-1.5 text-xs font-medium rounded ${r==="diagram"?"bg-[#58A6FF20] text-[#58A6FF] border border-[#58A6FF40]":"text-[#8B949E] hover:text-[#E6EDF3]"}`,children:"State Machine"}),b.jsx("button",{onClick:()=>n("table"),className:`px-3 py-1.5 text-xs font-medium rounded ${r==="table"?"bg-[#58A6FF20] text-[#58A6FF] border border-[#58A6FF40]":"text-[#8B949E] hover:text-[#E6EDF3]"}`,children:"Transition Table"}),b.jsx("button",{onClick:()=>n("messages"),className:`px-3 py-1.5 text-xs font-medium rounded ${r==="messages"?"bg-[#58A6FF20] text-[#58A6FF] border border-[#58A6FF40]":"text-[#8B949E] hover:text-[#E6EDF3]"}`,children:"PM Messages"})]}),b.jsx("div",{className:"flex-1 min-h-0 overflow-auto",children:r==="diagram"?b.jsxs("div",{className:"flex flex-col h-full",children:[b.jsx("div",{className:"flex items-center gap-4 text-xs text-dark-muted px-6 py-3 border-b border-dark-border shrink-0",children:Object.entries(h_e).map(([D,z])=>b.jsxs("div",{className:"flex items-center gap-1.5",children:[b.jsx(kS,{trigger:D,size:14,className:"text-[#8B949E]"}),b.jsx("span",{children:z})]},D))}),b.jsxs("div",{ref:E,className:"relative flex-1 min-h-0 p-4 overflow-auto",children:[b.jsxs("svg",{viewBox:`0 0 ${T.width} ${T.height}`,className:"w-full h-auto",style:{minHeight:300},children:[b.jsxs("defs",{children:[b.jsx("marker",{id:"arrowhead",markerWidth:"10",markerHeight:"7",refX:"10",refY:"3.5",orient:"auto",children:b.jsx("polygon",{points:"0 0, 10 3.5, 0 7",fill:"#8B949E"})}),b.jsx("marker",{id:"arrowhead-hover",markerWidth:"10",markerHeight:"7",refX:"10",refY:"3.5",orient:"auto",children:b.jsx("polygon",{points:"0 0, 10 3.5, 0 7",fill:"#C9D1D9"})})]}),T.edges.map(D=>{const z=`${D.from}->${D.to}|${D.trigger}`,q=z===m,G=D.points;if(G.length===0)return null;const U=G.map((F,Z)=>`${Z===0?"M":"L"} ${F.x} ${F.y}`).join(" "),Y=Math.floor(G.length/2),$=G[Y];let J="#30363D",re=1.5,oe="url(#arrowhead)";q&&(J="#C9D1D9",re=2,oe="url(#arrowhead-hover)");const fe=D.transitions.length;return b.jsxs("g",{className:"cursor-pointer",onClick:F=>M(F,D.transitions),onMouseEnter:()=>g(z),onMouseLeave:()=>g(null),children:[b.jsx("path",{d:U,fill:"none",stroke:"transparent",strokeWidth:"16"}),b.jsx("path",{d:U,fill:"none",stroke:J,strokeWidth:re,markerEnd:oe,strokeLinejoin:"round",strokeLinecap:"round"}),$&&D.transitions.length>0&&d_e(D.transitions[0].trigger,$.x,$.y-12,14,q?"#C9D1D9":"#8B949E",1),fe>1&&$&&b.jsxs("g",{children:[b.jsx("rect",{x:$.x+6,y:$.y-22,width:fe>=10?30:18,height:16,rx:8,fill:"#30363D"}),b.jsx("text",{x:$.x+6+(fe>=10?15:9),y:$.y-22+12,textAnchor:"middle",fontSize:10,fontWeight:600,fill:"#8B949E",children:fe})]})]},z)}),T.nodes.map(D=>{const z=D.x-D.width/2,q=D.y-D.height/2;if(D.id==="*")return b.jsxs("g",{children:[b.jsx("rect",{x:z,y:q,width:D.width,height:D.height,rx:15,ry:15,fill:"none",stroke:"#8B949E",strokeWidth:1.5,strokeDasharray:"4 2"}),b.jsx("text",{x:D.x,y:D.y,textAnchor:"middle",dominantBaseline:"central",fill:"#8B949E",fontSize:11,fontWeight:600,className:"select-none",children:"All"})]},"all-node");const G=C[D.id]||"#8B949E",U=`${G}18`;return b.jsxs("g",{children:[b.jsx("rect",{x:z,y:q,width:D.width,height:D.height,rx:8,ry:8,fill:"#0D1117"}),b.jsx("rect",{x:z,y:q,width:D.width,height:D.height,rx:8,ry:8,fill:U}),b.jsx("rect",{x:z,y:q,width:D.width,height:D.height,rx:8,ry:8,fill:"none",stroke:G,strokeWidth:2}),b.jsx("text",{x:D.x,y:D.y,textAnchor:"middle",dominantBaseline:"central",fontSize:14,fontWeight:700,fill:G,className:"select-none",children:D.id})]},D.id)})]}),y&&b.jsx(b_e,{info:y,stateColorMap:C,onClose:R})]}),O.length>0&&b.jsxs("div",{className:"px-6 py-3 border-t border-dark-border shrink-0",children:[b.jsx("h3",{className:"text-sm font-medium text-[#D29922] mb-2",children:"Validation Warnings"}),b.jsx("ul",{className:"space-y-1",children:O.map((D,z)=>b.jsxs("li",{className:"flex items-start gap-2 text-xs",children:[b.jsx("span",{className:`shrink-0 mt-0.5 px-1.5 py-0.5 rounded font-mono text-[10px] ${D.type==="duplicate"?"bg-[#F8514920] text-[#F85149]":D.type==="orphan"?"bg-[#D2992220] text-[#D29922]":"bg-[#58A6FF20] text-[#58A6FF]"}`,children:D.type}),b.jsx("span",{className:"text-dark-muted",children:D.message})]},z))})]})]}):r==="table"?b.jsxs("div",{className:"flex flex-col h-full",children:[A&&b.jsxs("div",{className:"px-6 py-4 flex-1 min-h-0 overflow-auto",children:[b.jsxs("h2",{className:"text-sm font-medium text-dark-text mb-3",children:["Transition Table (",A.tableTransitions.length," transitions)"]}),b.jsx("div",{className:"overflow-x-auto",children:b.jsxs("table",{className:"w-full text-xs border-collapse",children:[b.jsx("thead",{children:b.jsxs("tr",{className:"text-left text-dark-muted border-b border-[#30363D]",children:[b.jsx("th",{className:"py-2 pr-4 font-medium",children:"From"}),b.jsx("th",{className:"py-2 pr-4 font-medium",children:"To"}),b.jsx("th",{className:"py-2 pr-4 font-medium",children:"Trigger"}),b.jsx("th",{className:"py-2 font-medium",children:"Description"})]})}),b.jsx("tbody",{children:A.tableTransitions.map(D=>b.jsxs("tr",{className:"border-b border-[#30363D]/50 hover:bg-[#161B22]",children:[b.jsx("td",{className:"py-1.5 pr-4",children:b.jsx("span",{className:"px-2 py-0.5 rounded-full text-xs font-semibold",style:{backgroundColor:`${C[D.from]||"#8B949E"}20`,color:C[D.from]||"#8B949E",border:`1px solid ${C[D.from]||"#8B949E"}40`},children:D.from==="*"?"ALL":D.from})}),b.jsx("td",{className:"py-1.5 pr-4",children:b.jsx("span",{className:"px-2 py-0.5 rounded-full text-xs font-semibold",style:{backgroundColor:`${C[D.to]||"#8B949E"}20`,color:C[D.to]||"#8B949E",border:`1px solid ${C[D.to]||"#8B949E"}40`},children:D.to})}),b.jsx("td",{className:"py-1.5 pr-4",children:b.jsxs("div",{className:"flex items-center gap-1.5",children:[b.jsx(kS,{trigger:D.trigger,size:12,className:"text-[#8B949E]"}),b.jsx("span",{className:"text-dark-text",children:D.triggerLabel})]})}),b.jsx("td",{className:"py-1.5 text-dark-muted",children:D.description})]},D.id))})]})})]}),O.length>0&&b.jsxs("div",{className:"px-6 py-3 border-t border-dark-border shrink-0",children:[b.jsx("h3",{className:"text-sm font-medium text-[#D29922] mb-2",children:"Validation Warnings"}),b.jsx("ul",{className:"space-y-1",children:O.map((D,z)=>b.jsxs("li",{className:"flex items-start gap-2 text-xs",children:[b.jsx("span",{className:`shrink-0 mt-0.5 px-1.5 py-0.5 rounded font-mono text-[10px] ${D.type==="duplicate"?"bg-[#F8514920] text-[#F85149]":D.type==="orphan"?"bg-[#D2992220] text-[#D29922]":"bg-[#58A6FF20] text-[#58A6FF]"}`,children:D.type}),b.jsx("span",{className:"text-dark-muted",children:D.message})]},z))})]})]}):b.jsxs("div",{className:"px-6 py-4",children:[b.jsxs("div",{className:"mb-4",children:[b.jsx("h2",{className:"text-lg font-semibold text-dark-text",children:"PM → Team Leader Messages"}),b.jsx("p",{className:"text-dark-muted text-sm mt-0.5",children:"Messages automatically sent to your team leads when events occur"})]}),b.jsx("div",{className:"grid grid-cols-1 lg:grid-cols-2 xl:grid-cols-3 gap-4",children:s_e.map(D=>b.jsx(x_e,{cardDef:D,templateData:N.get(D.id),onSave:L},D.id))})]})})]})}function w_e(){return b.jsx(pK,{children:b.jsxs(EK,{children:[b.jsxs("div",{className:"h-screen w-screen flex flex-col bg-dark-base text-dark-text overflow-hidden",children:[b.jsx(VK,{}),b.jsxs("div",{className:"flex flex-1 min-h-0",children:[b.jsx(XK,{}),b.jsx("main",{className:"flex-1 min-w-0 overflow-auto",children:b.jsxs(HG,{children:[b.jsx(bo,{path:"/",element:b.jsx(Pne,{})}),b.jsx(bo,{path:"/issues",element:b.jsx($ne,{})}),b.jsx(bo,{path:"/usage",element:b.jsx(P0e,{})}),b.jsx(bo,{path:"/projects",element:b.jsx(H0e,{})}),b.jsx(bo,{path:"/lifecycle",element:b.jsx(__e,{})}),b.jsx(bo,{path:"/settings",element:b.jsx(K0e,{})})]})})]}),b.jsx(WK,{})]}),b.jsx(bne,{})]})})}const vU=document.getElementById("root");if(!vU)throw new Error("Root element not found");KH.createRoot(vU).render(b.jsx(vp.StrictMode,{children:b.jsx(w_e,{})}));
188
+ //# sourceMappingURL=index-CHukC8Hq.js.map