maestro-flow 0.4.2 → 0.4.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (302) hide show
  1. package/.claude/commands/maestro-analyze.md +1 -1
  2. package/.claude/commands/maestro-brainstorm.md +1 -1
  3. package/.claude/commands/maestro-collab.md +1 -1
  4. package/.claude/commands/maestro-execute.md +10 -1
  5. package/.claude/commands/maestro-guard.md +101 -0
  6. package/.claude/commands/maestro-impeccable.md +1 -1
  7. package/.claude/commands/maestro-plan.md +15 -2
  8. package/.claude/commands/maestro-ralph-execute.md +9 -2
  9. package/.claude/commands/maestro-ralph.md +8 -1
  10. package/.claude/commands/maestro-verify.md +15 -1
  11. package/.claude/commands/quality-auto-test.md +1 -1
  12. package/.claude/commands/quality-debug.md +1 -1
  13. package/.claude/commands/quality-refactor.md +1 -1
  14. package/.claude/commands/quality-retrospective.md +1 -1
  15. package/.claude/commands/quality-review.md +15 -1
  16. package/.claude/commands/quality-test.md +1 -1
  17. package/.claude/commands/security-audit.md +154 -0
  18. package/.claude/skills/maestro-help/index/catalog.json +2 -0
  19. package/.codex/skills/maestro-analyze/SKILL.md +18 -1
  20. package/.codex/skills/maestro-brainstorm/SKILL.md +17 -4
  21. package/.codex/skills/maestro-collab/SKILL.md +7 -1
  22. package/.codex/skills/maestro-execute/SKILL.md +365 -348
  23. package/.codex/skills/maestro-guard/SKILL.md +97 -0
  24. package/.codex/skills/maestro-impeccable/SKILL.md +1 -1
  25. package/.codex/skills/maestro-plan/SKILL.md +66 -7
  26. package/.codex/skills/maestro-ralph/SKILL.md +1 -1
  27. package/.codex/skills/maestro-verify/SKILL.md +18 -1
  28. package/.codex/skills/quality-auto-test/SKILL.md +13 -3
  29. package/.codex/skills/quality-debug/SKILL.md +362 -346
  30. package/.codex/skills/quality-refactor/SKILL.md +1 -1
  31. package/.codex/skills/quality-retrospective/SKILL.md +292 -292
  32. package/.codex/skills/quality-review/SKILL.md +374 -365
  33. package/.codex/skills/quality-test/SKILL.md +1 -1
  34. package/.codex/skills/security-audit/SKILL.md +154 -0
  35. package/bin/maestro-hook-runner.js +21 -1
  36. package/dashboard/dist/assets/{ArtifactsPage-iJZtYsmR.js → ArtifactsPage-CVh0Z2I2.js} +3 -3
  37. package/dashboard/dist/assets/{ChatInput-DNnDLdQF.js → ChatInput-CBI3qHQQ.js} +2 -2
  38. package/dashboard/dist/assets/ChatPage-BjJ9CYox.js +22 -0
  39. package/dashboard/dist/assets/CollabPage-CprGGO9y.js +1 -0
  40. package/dashboard/dist/assets/{ExecutionPanel-BKV3GZ7Q.js → ExecutionPanel-CClxD7cH.js} +1 -1
  41. package/dashboard/dist/assets/KanbanPage-copqjdPg.js +16 -0
  42. package/dashboard/dist/assets/MaestroCoordinatePage-CioZjQ9N.js +4 -0
  43. package/dashboard/dist/assets/{MarkdownRenderer-cYFfe1uX.js → MarkdownRenderer-CtUhoxCT.js} +1 -1
  44. package/dashboard/dist/assets/McpPage-BcPPcJpr.js +21 -0
  45. package/dashboard/dist/assets/{MeetingRoomPage-wnvT7wlB.js → MeetingRoomPage-BgmAKxU-.js} +1 -1
  46. package/dashboard/dist/assets/{OutputPanel-DDL90Idy.js → OutputPanel-DgT3gMyp.js} +1 -1
  47. package/dashboard/dist/assets/{ProblemsPanel-zFN9IIs0.js → ProblemsPanel-BmG7rxoG.js} +1 -1
  48. package/dashboard/dist/assets/{RequirementBoardPage-DOPJoT0I.js → RequirementBoardPage-k8YoeQ0r.js} +1 -1
  49. package/dashboard/dist/assets/{RequirementPage-CEVquRgM.js → RequirementPage-Da2354px.js} +1 -1
  50. package/dashboard/dist/assets/{RoomsPage-D5USEWDh.js → RoomsPage-BtqDiYaU.js} +1 -1
  51. package/dashboard/dist/assets/SpecsPage-ByPVH_M3.js +36 -0
  52. package/dashboard/dist/assets/{TeamsPage-DlcEmr_Q.js → TeamsPage-sFDLN30L.js} +1 -1
  53. package/dashboard/dist/assets/{TreeBrowser-Y48Wz-QY.js → TreeBrowser-oEx8YJXV.js} +1 -1
  54. package/dashboard/dist/assets/WorkflowPage-JrX7CVHh.js +6 -0
  55. package/dashboard/dist/assets/{arrow-left-NCUOENvg.js → arrow-left-DYvgSdIH.js} +1 -1
  56. package/dashboard/dist/assets/{check-o7nfGNHf.js → check-jcgYBWVR.js} +1 -1
  57. package/dashboard/dist/assets/{chevron-right-BXySK2fn.js → chevron-right-DvZ5sMOg.js} +1 -1
  58. package/dashboard/dist/assets/{circle-cooAwnAR.js → circle-DYT-zoRZ.js} +1 -1
  59. package/dashboard/dist/assets/{circle-alert-DcSBokh4.js → circle-alert-Bfbv3gt4.js} +1 -1
  60. package/dashboard/dist/assets/{circle-check-Cd-jce4j.js → circle-check-D82WnpbI.js} +1 -1
  61. package/dashboard/dist/assets/{circle-check-big-BN7Mdp4i.js → circle-check-big-CPVD1GKF.js} +1 -1
  62. package/dashboard/dist/assets/{code-BQa9oL1n.js → code-B3bKFGI4.js} +1 -1
  63. package/dashboard/dist/assets/{columns-3-BzgxelGx.js → columns-3-BeMAQCix.js} +1 -1
  64. package/dashboard/dist/assets/{download-swRJnate.js → download-BCtpoWYB.js} +1 -1
  65. package/dashboard/dist/assets/en-2h6fD0j8.js +1 -0
  66. package/dashboard/dist/assets/{folder-DbGbLNFN.js → folder-CTj6SNNu.js} +1 -1
  67. package/dashboard/dist/assets/index-6-yE5Yl9.css +1 -0
  68. package/dashboard/dist/assets/{index-DIoMBMbv.js → index-BxR_3IbJ.js} +1 -1
  69. package/dashboard/dist/assets/{index-DLBN_7fb.js → index-CWBJLu42.js} +1 -1
  70. package/dashboard/dist/assets/index-DpcPd-UG.js +236 -0
  71. package/dashboard/dist/assets/{list-BTRAIvDq.js → list-BMv8pIQn.js} +1 -1
  72. package/dashboard/dist/assets/{loader-NHtB6Mdn.js → loader-DdM4VOgF.js} +1 -1
  73. package/dashboard/dist/assets/{minus-BjMxRTET.js → minus-D15s2E__.js} +1 -1
  74. package/dashboard/dist/assets/{pen-line-C4_O16H0.js → pen-line-DO6o4xWz.js} +1 -1
  75. package/dashboard/dist/assets/{pencil-DTmKhyDY.js → pencil-qGxg9jOe.js} +1 -1
  76. package/dashboard/dist/assets/{proxy-Dtx5p6IO.js → proxy-DOffTzwA.js} +1 -1
  77. package/dashboard/dist/assets/refresh-cw-C9UNdLCy.js +6 -0
  78. package/dashboard/dist/assets/{rows-2-GR1dZtRu.js → rows-2-CifAA5SL.js} +1 -1
  79. package/dashboard/dist/assets/{search-DVtgy2W7.js → search-pe7pU1YN.js} +1 -1
  80. package/dashboard/dist/assets/{shallow-BOmvDNsv.js → shallow-r7YynQYA.js} +1 -1
  81. package/dashboard/dist/assets/table-Bh772iIw.js +6 -0
  82. package/dashboard/dist/assets/{team-types-BPeOvVdA.js → team-types-C_HqX2p2.js} +1 -1
  83. package/dashboard/dist/assets/{terminal-CzogW4cl.js → terminal-EpmtGBlw.js} +1 -1
  84. package/dashboard/dist/assets/{trash-2-52LATVfW.js → trash-2-Xen46iNQ.js} +1 -1
  85. package/dashboard/dist/assets/{users-DLFE2voE.js → users-BLueDPxF.js} +1 -1
  86. package/dashboard/dist/assets/{zap-DhiYlgyZ.js → zap-DsQCPF61.js} +1 -1
  87. package/dashboard/dist/assets/zh-CN-r3AvxxOL.js +1 -0
  88. package/dashboard/dist/index.html +2 -2
  89. package/dashboard/dist-server/dashboard/src/server/routes/settings.js +70 -1
  90. package/dashboard/dist-server/dashboard/src/server/routes/settings.js.map +1 -1
  91. package/dashboard/dist-server/src/coordinator/output-parser.js +27 -0
  92. package/dashboard/dist-server/src/coordinator/output-parser.js.map +1 -1
  93. package/dashboard/dist-server/src/types/index.d.ts +48 -6
  94. package/dist/src/commands/coordinate.d.ts.map +1 -1
  95. package/dist/src/commands/coordinate.js +4 -0
  96. package/dist/src/commands/coordinate.js.map +1 -1
  97. package/dist/src/commands/hooks.d.ts.map +1 -1
  98. package/dist/src/commands/hooks.js +239 -8
  99. package/dist/src/commands/hooks.js.map +1 -1
  100. package/dist/src/commands/spec.d.ts.map +1 -1
  101. package/dist/src/commands/spec.js +466 -0
  102. package/dist/src/commands/spec.js.map +1 -1
  103. package/dist/src/config/index.d.ts +5 -1
  104. package/dist/src/config/index.d.ts.map +1 -1
  105. package/dist/src/config/index.js +42 -0
  106. package/dist/src/config/index.js.map +1 -1
  107. package/dist/src/coordinator/output-parser.d.ts.map +1 -1
  108. package/dist/src/coordinator/output-parser.js +27 -0
  109. package/dist/src/coordinator/output-parser.js.map +1 -1
  110. package/dist/src/hooks/delegate-monitor.d.ts +1 -0
  111. package/dist/src/hooks/delegate-monitor.d.ts.map +1 -1
  112. package/dist/src/hooks/delegate-monitor.js +1 -1
  113. package/dist/src/hooks/delegate-monitor.js.map +1 -1
  114. package/dist/src/hooks/guards/workflow-guard.d.ts +15 -0
  115. package/dist/src/hooks/guards/workflow-guard.d.ts.map +1 -1
  116. package/dist/src/hooks/guards/workflow-guard.js +61 -1
  117. package/dist/src/hooks/guards/workflow-guard.js.map +1 -1
  118. package/dist/src/hooks/keyword-spec-injector.d.ts.map +1 -1
  119. package/dist/src/hooks/keyword-spec-injector.js +63 -4
  120. package/dist/src/hooks/keyword-spec-injector.js.map +1 -1
  121. package/dist/src/hooks/plugins/decision-log-plugin.d.ts +19 -0
  122. package/dist/src/hooks/plugins/decision-log-plugin.d.ts.map +1 -0
  123. package/dist/src/hooks/plugins/decision-log-plugin.js +28 -0
  124. package/dist/src/hooks/plugins/decision-log-plugin.js.map +1 -0
  125. package/dist/src/hooks/plugins/index.d.ts +2 -0
  126. package/dist/src/hooks/plugins/index.d.ts.map +1 -1
  127. package/dist/src/hooks/plugins/index.js +1 -0
  128. package/dist/src/hooks/plugins/index.js.map +1 -1
  129. package/dist/src/hooks/plugins/spec-analytics-plugin.d.ts +13 -0
  130. package/dist/src/hooks/plugins/spec-analytics-plugin.d.ts.map +1 -0
  131. package/dist/src/hooks/plugins/spec-analytics-plugin.js +92 -0
  132. package/dist/src/hooks/plugins/spec-analytics-plugin.js.map +1 -0
  133. package/dist/src/hooks/plugins/spec-injection-plugin.d.ts.map +1 -1
  134. package/dist/src/hooks/plugins/spec-injection-plugin.js +57 -4
  135. package/dist/src/hooks/plugins/spec-injection-plugin.js.map +1 -1
  136. package/dist/src/hooks/session-context.d.ts +1 -0
  137. package/dist/src/hooks/session-context.d.ts.map +1 -1
  138. package/dist/src/hooks/session-context.js +1 -1
  139. package/dist/src/hooks/session-context.js.map +1 -1
  140. package/dist/src/hooks/skill-context.d.ts +1 -0
  141. package/dist/src/hooks/skill-context.d.ts.map +1 -1
  142. package/dist/src/hooks/skill-context.js +1 -1
  143. package/dist/src/hooks/skill-context.js.map +1 -1
  144. package/dist/src/hooks/spec-analytics.d.ts +128 -0
  145. package/dist/src/hooks/spec-analytics.d.ts.map +1 -0
  146. package/dist/src/hooks/spec-analytics.js +311 -0
  147. package/dist/src/hooks/spec-analytics.js.map +1 -0
  148. package/dist/src/hooks/spec-injector.d.ts.map +1 -1
  149. package/dist/src/hooks/spec-injector.js +129 -5
  150. package/dist/src/hooks/spec-injector.js.map +1 -1
  151. package/dist/src/tools/spec-loader.d.ts +20 -0
  152. package/dist/src/tools/spec-loader.d.ts.map +1 -1
  153. package/dist/src/tools/spec-loader.js +58 -7
  154. package/dist/src/tools/spec-loader.js.map +1 -1
  155. package/dist/src/tui/config-ui/ConfigHub.d.ts +1 -1
  156. package/dist/src/tui/config-ui/ConfigHub.d.ts.map +1 -1
  157. package/dist/src/tui/config-ui/ConfigHub.js +16 -10
  158. package/dist/src/tui/config-ui/ConfigHub.js.map +1 -1
  159. package/dist/src/tui/config-ui/ConfigSourcesView.d.ts.map +1 -1
  160. package/dist/src/tui/config-ui/ConfigSourcesView.js +3 -2
  161. package/dist/src/tui/config-ui/ConfigSourcesView.js.map +1 -1
  162. package/dist/src/tui/config-ui/HooksPanel.d.ts.map +1 -1
  163. package/dist/src/tui/config-ui/HooksPanel.js +15 -19
  164. package/dist/src/tui/config-ui/HooksPanel.js.map +1 -1
  165. package/dist/src/tui/config-ui/SkillConfigDashboard.d.ts.map +1 -1
  166. package/dist/src/tui/config-ui/SkillConfigDashboard.js +5 -9
  167. package/dist/src/tui/config-ui/SkillConfigDashboard.js.map +1 -1
  168. package/dist/src/tui/config-ui/SkillParamEditor.d.ts.map +1 -1
  169. package/dist/src/tui/config-ui/SkillParamEditor.js +1 -3
  170. package/dist/src/tui/config-ui/SkillParamEditor.js.map +1 -1
  171. package/dist/src/tui/config-ui/SkillsList.d.ts.map +1 -1
  172. package/dist/src/tui/config-ui/SkillsList.js +7 -9
  173. package/dist/src/tui/config-ui/SkillsList.js.map +1 -1
  174. package/dist/src/tui/config-ui/SpecAnalyticsPanel.d.ts +6 -0
  175. package/dist/src/tui/config-ui/SpecAnalyticsPanel.d.ts.map +1 -0
  176. package/dist/src/tui/config-ui/SpecAnalyticsPanel.js +164 -0
  177. package/dist/src/tui/config-ui/SpecAnalyticsPanel.js.map +1 -0
  178. package/dist/src/tui/config-ui/SpecPanel.d.ts.map +1 -1
  179. package/dist/src/tui/config-ui/SpecPanel.js +918 -20
  180. package/dist/src/tui/config-ui/SpecPanel.js.map +1 -1
  181. package/dist/src/tui/config-ui/index.d.ts +3 -1
  182. package/dist/src/tui/config-ui/index.d.ts.map +1 -1
  183. package/dist/src/tui/config-ui/index.js +4 -0
  184. package/dist/src/tui/config-ui/index.js.map +1 -1
  185. package/dist/src/tui/install-ui/BackupConfig.d.ts.map +1 -1
  186. package/dist/src/tui/install-ui/BackupConfig.js +3 -2
  187. package/dist/src/tui/install-ui/BackupConfig.js.map +1 -1
  188. package/dist/src/tui/install-ui/BlueprintPreview.d.ts.map +1 -1
  189. package/dist/src/tui/install-ui/BlueprintPreview.js +7 -6
  190. package/dist/src/tui/install-ui/BlueprintPreview.js.map +1 -1
  191. package/dist/src/tui/install-ui/ComponentGrid.d.ts.map +1 -1
  192. package/dist/src/tui/install-ui/ComponentGrid.js +3 -2
  193. package/dist/src/tui/install-ui/ComponentGrid.js.map +1 -1
  194. package/dist/src/tui/install-ui/ConfigPanel.d.ts.map +1 -1
  195. package/dist/src/tui/install-ui/ConfigPanel.js +4 -3
  196. package/dist/src/tui/install-ui/ConfigPanel.js.map +1 -1
  197. package/dist/src/tui/install-ui/CyberItem.d.ts.map +1 -1
  198. package/dist/src/tui/install-ui/CyberItem.js +7 -6
  199. package/dist/src/tui/install-ui/CyberItem.js.map +1 -1
  200. package/dist/src/tui/install-ui/CyberdeckBlueprint.d.ts.map +1 -1
  201. package/dist/src/tui/install-ui/CyberdeckBlueprint.js +2 -1
  202. package/dist/src/tui/install-ui/CyberdeckBlueprint.js.map +1 -1
  203. package/dist/src/tui/install-ui/ExecutionView.d.ts.map +1 -1
  204. package/dist/src/tui/install-ui/ExecutionView.js +3 -2
  205. package/dist/src/tui/install-ui/ExecutionView.js.map +1 -1
  206. package/dist/src/tui/install-ui/GradientHeader.d.ts.map +1 -1
  207. package/dist/src/tui/install-ui/GradientHeader.js +2 -1
  208. package/dist/src/tui/install-ui/GradientHeader.js.map +1 -1
  209. package/dist/src/tui/install-ui/HooksConfig.d.ts.map +1 -1
  210. package/dist/src/tui/install-ui/HooksConfig.js +8 -8
  211. package/dist/src/tui/install-ui/HooksConfig.js.map +1 -1
  212. package/dist/src/tui/install-ui/InstallConfirm.d.ts.map +1 -1
  213. package/dist/src/tui/install-ui/InstallConfirm.js +4 -3
  214. package/dist/src/tui/install-ui/InstallConfirm.js.map +1 -1
  215. package/dist/src/tui/install-ui/InstallExecution.d.ts.map +1 -1
  216. package/dist/src/tui/install-ui/InstallExecution.js +3 -2
  217. package/dist/src/tui/install-ui/InstallExecution.js.map +1 -1
  218. package/dist/src/tui/install-ui/InstallFlow.d.ts.map +1 -1
  219. package/dist/src/tui/install-ui/InstallFlow.js +3 -2
  220. package/dist/src/tui/install-ui/InstallFlow.js.map +1 -1
  221. package/dist/src/tui/install-ui/InstallHub.d.ts.map +1 -1
  222. package/dist/src/tui/install-ui/InstallHub.js +9 -8
  223. package/dist/src/tui/install-ui/InstallHub.js.map +1 -1
  224. package/dist/src/tui/install-ui/InstallResult.d.ts.map +1 -1
  225. package/dist/src/tui/install-ui/InstallResult.js +3 -2
  226. package/dist/src/tui/install-ui/InstallResult.js.map +1 -1
  227. package/dist/src/tui/install-ui/McpConfig.d.ts.map +1 -1
  228. package/dist/src/tui/install-ui/McpConfig.js +4 -3
  229. package/dist/src/tui/install-ui/McpConfig.js.map +1 -1
  230. package/dist/src/tui/install-ui/ResultDashboard.d.ts.map +1 -1
  231. package/dist/src/tui/install-ui/ResultDashboard.js +3 -2
  232. package/dist/src/tui/install-ui/ResultDashboard.js.map +1 -1
  233. package/dist/src/tui/install-ui/ReviewPanel.d.ts.map +1 -1
  234. package/dist/src/tui/install-ui/ReviewPanel.js +2 -1
  235. package/dist/src/tui/install-ui/ReviewPanel.js.map +1 -1
  236. package/dist/src/tui/install-ui/StatuslineConfig.d.ts.map +1 -1
  237. package/dist/src/tui/install-ui/StatuslineConfig.js +3 -2
  238. package/dist/src/tui/install-ui/StatuslineConfig.js.map +1 -1
  239. package/dist/src/tui/install-ui/StepSelector.d.ts.map +1 -1
  240. package/dist/src/tui/install-ui/StepSelector.js +11 -10
  241. package/dist/src/tui/install-ui/StepSelector.js.map +1 -1
  242. package/dist/src/tui/overlay-ui/OverlayList.d.ts.map +1 -1
  243. package/dist/src/tui/overlay-ui/OverlayList.js +8 -12
  244. package/dist/src/tui/overlay-ui/OverlayList.js.map +1 -1
  245. package/dist/src/tui/shared/components.d.ts +56 -0
  246. package/dist/src/tui/shared/components.d.ts.map +1 -0
  247. package/dist/src/tui/shared/components.js +55 -0
  248. package/dist/src/tui/shared/components.js.map +1 -0
  249. package/dist/src/tui/shared/helpers.d.ts +24 -0
  250. package/dist/src/tui/shared/helpers.d.ts.map +1 -0
  251. package/dist/src/tui/shared/helpers.js +49 -0
  252. package/dist/src/tui/shared/helpers.js.map +1 -0
  253. package/dist/src/tui/shared/index.d.ts +4 -0
  254. package/dist/src/tui/shared/index.d.ts.map +1 -0
  255. package/dist/src/tui/shared/index.js +7 -0
  256. package/dist/src/tui/shared/index.js.map +1 -0
  257. package/dist/src/tui/shared/tokens.d.ts +79 -0
  258. package/dist/src/tui/shared/tokens.d.ts.map +1 -0
  259. package/dist/src/tui/shared/tokens.js +81 -0
  260. package/dist/src/tui/shared/tokens.js.map +1 -0
  261. package/dist/src/tui/tools-ui/CommandReference.d.ts.map +1 -1
  262. package/dist/src/tui/tools-ui/CommandReference.js +2 -4
  263. package/dist/src/tui/tools-ui/CommandReference.js.map +1 -1
  264. package/dist/src/tui/tools-ui/ConfigSources.d.ts.map +1 -1
  265. package/dist/src/tui/tools-ui/ConfigSources.js +3 -2
  266. package/dist/src/tui/tools-ui/ConfigSources.js.map +1 -1
  267. package/dist/src/tui/tools-ui/RegisterSettings.d.ts.map +1 -1
  268. package/dist/src/tui/tools-ui/RegisterSettings.js +2 -1
  269. package/dist/src/tui/tools-ui/RegisterSettings.js.map +1 -1
  270. package/dist/src/tui/tools-ui/RoleMappings.d.ts.map +1 -1
  271. package/dist/src/tui/tools-ui/RoleMappings.js +3 -5
  272. package/dist/src/tui/tools-ui/RoleMappings.js.map +1 -1
  273. package/dist/src/tui/tools-ui/ToolsDashboard.d.ts.map +1 -1
  274. package/dist/src/tui/tools-ui/ToolsDashboard.js +3 -5
  275. package/dist/src/tui/tools-ui/ToolsDashboard.js.map +1 -1
  276. package/dist/src/tui/tools-ui/ToolsOverview.d.ts.map +1 -1
  277. package/dist/src/tui/tools-ui/ToolsOverview.js +3 -5
  278. package/dist/src/tui/tools-ui/ToolsOverview.js.map +1 -1
  279. package/dist/src/tui/uninstall-ui/UninstallFlow.d.ts.map +1 -1
  280. package/dist/src/tui/uninstall-ui/UninstallFlow.js +8 -7
  281. package/dist/src/tui/uninstall-ui/UninstallFlow.js.map +1 -1
  282. package/dist/src/types/index.d.ts +48 -6
  283. package/dist/src/types/index.d.ts.map +1 -1
  284. package/package.json +1 -1
  285. package/workflows/debug.md +73 -0
  286. package/workflows/execute.md +27 -0
  287. package/workflows/plan.md +11 -0
  288. package/workflows/review.md +33 -1
  289. package/workflows/tdd.md +257 -0
  290. package/workflows/verify.md +57 -0
  291. package/dashboard/dist/assets/ChatPage-BjBibfE4.js +0 -22
  292. package/dashboard/dist/assets/CollabPage-8lUMUol_.js +0 -1
  293. package/dashboard/dist/assets/KanbanPage-diY3QmGd.js +0 -21
  294. package/dashboard/dist/assets/McpPage-COjuIf7U.js +0 -21
  295. package/dashboard/dist/assets/SpecsPage-BOwBin_o.js +0 -36
  296. package/dashboard/dist/assets/SupervisorPage-5iRyMU5T.js +0 -6
  297. package/dashboard/dist/assets/WorkflowPage-CmQaRVgL.js +0 -6
  298. package/dashboard/dist/assets/en-C_BD3UCD.js +0 -1
  299. package/dashboard/dist/assets/index-BEUaOz_b.css +0 -1
  300. package/dashboard/dist/assets/index-uIqUCT8y.js +0 -236
  301. package/dashboard/dist/assets/table-DCzuJAFh.js +0 -6
  302. package/dashboard/dist/assets/zh-CN-DvQKfow3.js +0 -1
@@ -0,0 +1,236 @@
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/KanbanPage-copqjdPg.js","assets/shallow-r7YynQYA.js","assets/table-Bh772iIw.js","assets/circle-check-big-CPVD1GKF.js","assets/ChatInput-CBI3qHQQ.js","assets/index-CWBJLu42.js","assets/zap-DsQCPF61.js","assets/MarkdownRenderer-CtUhoxCT.js","assets/chevron-right-DvZ5sMOg.js","assets/terminal-EpmtGBlw.js","assets/circle-alert-Bfbv3gt4.js","assets/refresh-cw-C9UNdLCy.js","assets/download-BCtpoWYB.js","assets/ArtifactsPage-CVh0Z2I2.js","assets/code-B3bKFGI4.js","assets/search-pe7pU1YN.js","assets/TreeBrowser-oEx8YJXV.js","assets/folder-CTj6SNNu.js","assets/circle-DYT-zoRZ.js","assets/circle-check-D82WnpbI.js","assets/index-BxR_3IbJ.js","assets/proxy-DOffTzwA.js","assets/ChatPage-BjJ9CYox.js","assets/rows-2-CifAA5SL.js","assets/pencil-qGxg9jOe.js","assets/trash-2-Xen46iNQ.js","assets/WorkflowPage-JrX7CVHh.js","assets/check-jcgYBWVR.js","assets/list-BMv8pIQn.js","assets/columns-3-BeMAQCix.js","assets/McpPage-BcPPcJpr.js","assets/pen-line-DO6o4xWz.js","assets/minus-D15s2E__.js","assets/SpecsPage-ByPVH_M3.js","assets/TeamsPage-sFDLN30L.js","assets/team-types-C_HqX2p2.js","assets/arrow-left-DYvgSdIH.js","assets/users-BLueDPxF.js","assets/loader-DdM4VOgF.js","assets/RequirementPage-Da2354px.js","assets/RequirementBoardPage-k8YoeQ0r.js","assets/MaestroCoordinatePage-CioZjQ9N.js","assets/CollabPage-CprGGO9y.js","assets/MeetingRoomPage-BgmAKxU-.js","assets/RoomsPage-BtqDiYaU.js"])))=>i.map(i=>d[i]);
2
+ function Yy(n,i){for(var s=0;s<i.length;s++){const r=i[s];if(typeof r!="string"&&!Array.isArray(r)){for(const d in r)if(d!=="default"&&!(d in n)){const f=Object.getOwnPropertyDescriptor(r,d);f&&Object.defineProperty(n,d,f.get?f:{enumerable:!0,get:()=>r[d]})}}}return Object.freeze(Object.defineProperty(n,Symbol.toStringTag,{value:"Module"}))}(function(){const i=document.createElement("link").relList;if(i&&i.supports&&i.supports("modulepreload"))return;for(const d of document.querySelectorAll('link[rel="modulepreload"]'))r(d);new MutationObserver(d=>{for(const f of d)if(f.type==="childList")for(const p of f.addedNodes)p.tagName==="LINK"&&p.rel==="modulepreload"&&r(p)}).observe(document,{childList:!0,subtree:!0});function s(d){const f={};return d.integrity&&(f.integrity=d.integrity),d.referrerPolicy&&(f.referrerPolicy=d.referrerPolicy),d.crossOrigin==="use-credentials"?f.credentials="include":d.crossOrigin==="anonymous"?f.credentials="omit":f.credentials="same-origin",f}function r(d){if(d.ep)return;d.ep=!0;const f=s(d);fetch(d.href,f)}})();function ag(n){return n&&n.__esModule&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n}var su={exports:{}},Us={};/**
3
+ * @license React
4
+ * react-jsx-runtime.production.js
5
+ *
6
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
7
+ *
8
+ * This source code is licensed under the MIT license found in the
9
+ * LICENSE file in the root directory of this source tree.
10
+ */var eh;function Vy(){if(eh)return Us;eh=1;var n=Symbol.for("react.transitional.element"),i=Symbol.for("react.fragment");function s(r,d,f){var p=null;if(f!==void 0&&(p=""+f),d.key!==void 0&&(p=""+d.key),"key"in d){f={};for(var h in d)h!=="key"&&(f[h]=d[h])}else f=d;return d=f.ref,{$$typeof:n,type:r,key:p,ref:d!==void 0?d:null,props:f}}return Us.Fragment=i,Us.jsx=s,Us.jsxs=s,Us}var th;function Xy(){return th||(th=1,su.exports=Vy()),su.exports}var c=Xy();(function(){if(!(typeof window>"u"))try{const i=localStorage.getItem("theme");let s;i==="dark"||i==="light"?s=i:s=window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light",document.documentElement.dataset.theme=s}catch{}})();var ru={exports:{}},he={};/**
11
+ * @license React
12
+ * react.production.js
13
+ *
14
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
15
+ *
16
+ * This source code is licensed under the MIT license found in the
17
+ * LICENSE file in the root directory of this source tree.
18
+ */var ah;function Qy(){if(ah)return he;ah=1;var n=Symbol.for("react.transitional.element"),i=Symbol.for("react.portal"),s=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),d=Symbol.for("react.profiler"),f=Symbol.for("react.consumer"),p=Symbol.for("react.context"),h=Symbol.for("react.forward_ref"),x=Symbol.for("react.suspense"),g=Symbol.for("react.memo"),S=Symbol.for("react.lazy"),b=Symbol.for("react.activity"),E=Symbol.iterator;function w(N){return N===null||typeof N!="object"?null:(N=E&&N[E]||N["@@iterator"],typeof N=="function"?N:null)}var C={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},A=Object.assign,O={};function T(N,I,ee){this.props=N,this.context=I,this.refs=O,this.updater=ee||C}T.prototype.isReactComponent={},T.prototype.setState=function(N,I){if(typeof N!="object"&&typeof N!="function"&&N!=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,N,I,"setState")},T.prototype.forceUpdate=function(N){this.updater.enqueueForceUpdate(this,N,"forceUpdate")};function X(){}X.prototype=T.prototype;function Y(N,I,ee){this.props=N,this.context=I,this.refs=O,this.updater=ee||C}var P=Y.prototype=new X;P.constructor=Y,A(P,T.prototype),P.isPureReactComponent=!0;var Z=Array.isArray;function te(){}var H={H:null,A:null,T:null,S:null},Q=Object.prototype.hasOwnProperty;function fe(N,I,ee){var D=ee.ref;return{$$typeof:n,type:N,key:I,ref:D!==void 0?D:null,props:ee}}function He(N,I){return fe(N.type,I,N.props)}function Ae(N){return typeof N=="object"&&N!==null&&N.$$typeof===n}function ze(N){var I={"=":"=0",":":"=2"};return"$"+N.replace(/[=:]/g,function(ee){return I[ee]})}var F=/\/+/g;function Te(N,I){return typeof N=="object"&&N!==null&&N.key!=null?ze(""+N.key):I.toString(36)}function qe(N){switch(N.status){case"fulfilled":return N.value;case"rejected":throw N.reason;default:switch(typeof N.status=="string"?N.then(te,te):(N.status="pending",N.then(function(I){N.status==="pending"&&(N.status="fulfilled",N.value=I)},function(I){N.status==="pending"&&(N.status="rejected",N.reason=I)})),N.status){case"fulfilled":return N.value;case"rejected":throw N.reason}}throw N}function L(N,I,ee,D,B){var q=typeof N;(q==="undefined"||q==="boolean")&&(N=null);var ae=!1;if(N===null)ae=!0;else switch(q){case"bigint":case"string":case"number":ae=!0;break;case"object":switch(N.$$typeof){case n:case i:ae=!0;break;case S:return ae=N._init,L(ae(N._payload),I,ee,D,B)}}if(ae)return B=B(N),ae=D===""?"."+Te(N,0):D,Z(B)?(ee="",ae!=null&&(ee=ae.replace(F,"$&/")+"/"),L(B,I,ee,"",function(Ie){return Ie})):B!=null&&(Ae(B)&&(B=He(B,ee+(B.key==null||N&&N.key===B.key?"":(""+B.key).replace(F,"$&/")+"/")+ae)),I.push(B)),1;ae=0;var Se=D===""?".":D+":";if(Z(N))for(var oe=0;oe<N.length;oe++)D=N[oe],q=Se+Te(D,oe),ae+=L(D,I,ee,q,B);else if(oe=w(N),typeof oe=="function")for(N=oe.call(N),oe=0;!(D=N.next()).done;)D=D.value,q=Se+Te(D,oe++),ae+=L(D,I,ee,q,B);else if(q==="object"){if(typeof N.then=="function")return L(qe(N),I,ee,D,B);throw I=String(N),Error("Objects are not valid as a React child (found: "+(I==="[object Object]"?"object with keys {"+Object.keys(N).join(", ")+"}":I)+"). If you meant to render a collection of children, use an array instead.")}return ae}function J(N,I,ee){if(N==null)return N;var D=[],B=0;return L(N,D,"","",function(q){return I.call(ee,q,B++)}),D}function ie(N){if(N._status===-1){var I=N._result;I=I(),I.then(function(ee){(N._status===0||N._status===-1)&&(N._status=1,N._result=ee)},function(ee){(N._status===0||N._status===-1)&&(N._status=2,N._result=ee)}),N._status===-1&&(N._status=0,N._result=I)}if(N._status===1)return N._result.default;throw N._result}var be=typeof reportError=="function"?reportError:function(N){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var I=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof N=="object"&&N!==null&&typeof N.message=="string"?String(N.message):String(N),error:N});if(!window.dispatchEvent(I))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",N);return}console.error(N)},$={map:J,forEach:function(N,I,ee){J(N,function(){I.apply(this,arguments)},ee)},count:function(N){var I=0;return J(N,function(){I++}),I},toArray:function(N){return J(N,function(I){return I})||[]},only:function(N){if(!Ae(N))throw Error("React.Children.only expected to receive a single React element child.");return N}};return he.Activity=b,he.Children=$,he.Component=T,he.Fragment=s,he.Profiler=d,he.PureComponent=Y,he.StrictMode=r,he.Suspense=x,he.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=H,he.__COMPILER_RUNTIME={__proto__:null,c:function(N){return H.H.useMemoCache(N)}},he.cache=function(N){return function(){return N.apply(null,arguments)}},he.cacheSignal=function(){return null},he.cloneElement=function(N,I,ee){if(N==null)throw Error("The argument must be a React element, but you passed "+N+".");var D=A({},N.props),B=N.key;if(I!=null)for(q in I.key!==void 0&&(B=""+I.key),I)!Q.call(I,q)||q==="key"||q==="__self"||q==="__source"||q==="ref"&&I.ref===void 0||(D[q]=I[q]);var q=arguments.length-2;if(q===1)D.children=ee;else if(1<q){for(var ae=Array(q),Se=0;Se<q;Se++)ae[Se]=arguments[Se+2];D.children=ae}return fe(N.type,B,D)},he.createContext=function(N){return N={$$typeof:p,_currentValue:N,_currentValue2:N,_threadCount:0,Provider:null,Consumer:null},N.Provider=N,N.Consumer={$$typeof:f,_context:N},N},he.createElement=function(N,I,ee){var D,B={},q=null;if(I!=null)for(D in I.key!==void 0&&(q=""+I.key),I)Q.call(I,D)&&D!=="key"&&D!=="__self"&&D!=="__source"&&(B[D]=I[D]);var ae=arguments.length-2;if(ae===1)B.children=ee;else if(1<ae){for(var Se=Array(ae),oe=0;oe<ae;oe++)Se[oe]=arguments[oe+2];B.children=Se}if(N&&N.defaultProps)for(D in ae=N.defaultProps,ae)B[D]===void 0&&(B[D]=ae[D]);return fe(N,q,B)},he.createRef=function(){return{current:null}},he.forwardRef=function(N){return{$$typeof:h,render:N}},he.isValidElement=Ae,he.lazy=function(N){return{$$typeof:S,_payload:{_status:-1,_result:N},_init:ie}},he.memo=function(N,I){return{$$typeof:g,type:N,compare:I===void 0?null:I}},he.startTransition=function(N){var I=H.T,ee={};H.T=ee;try{var D=N(),B=H.S;B!==null&&B(ee,D),typeof D=="object"&&D!==null&&typeof D.then=="function"&&D.then(te,be)}catch(q){be(q)}finally{I!==null&&ee.types!==null&&(I.types=ee.types),H.T=I}},he.unstable_useCacheRefresh=function(){return H.H.useCacheRefresh()},he.use=function(N){return H.H.use(N)},he.useActionState=function(N,I,ee){return H.H.useActionState(N,I,ee)},he.useCallback=function(N,I){return H.H.useCallback(N,I)},he.useContext=function(N){return H.H.useContext(N)},he.useDebugValue=function(){},he.useDeferredValue=function(N,I){return H.H.useDeferredValue(N,I)},he.useEffect=function(N,I){return H.H.useEffect(N,I)},he.useEffectEvent=function(N){return H.H.useEffectEvent(N)},he.useId=function(){return H.H.useId()},he.useImperativeHandle=function(N,I,ee){return H.H.useImperativeHandle(N,I,ee)},he.useInsertionEffect=function(N,I){return H.H.useInsertionEffect(N,I)},he.useLayoutEffect=function(N,I){return H.H.useLayoutEffect(N,I)},he.useMemo=function(N,I){return H.H.useMemo(N,I)},he.useOptimistic=function(N,I){return H.H.useOptimistic(N,I)},he.useReducer=function(N,I,ee){return H.H.useReducer(N,I,ee)},he.useRef=function(N){return H.H.useRef(N)},he.useState=function(N){return H.H.useState(N)},he.useSyncExternalStore=function(N,I,ee){return H.H.useSyncExternalStore(N,I,ee)},he.useTransition=function(){return H.H.useTransition()},he.version="19.2.4",he}var nh;function Yu(){return nh||(nh=1,ru.exports=Qy()),ru.exports}var v=Yu();const Vs=ag(v),Vu=Yy({__proto__:null,default:Vs},[v]);var iu={exports:{}},Bs={},ou={exports:{}},cu={};/**
19
+ * @license React
20
+ * scheduler.production.js
21
+ *
22
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
23
+ *
24
+ * This source code is licensed under the MIT license found in the
25
+ * LICENSE file in the root directory of this source tree.
26
+ */var lh;function Py(){return lh||(lh=1,(function(n){function i(L,J){var ie=L.length;L.push(J);e:for(;0<ie;){var be=ie-1>>>1,$=L[be];if(0<d($,J))L[be]=J,L[ie]=$,ie=be;else break e}}function s(L){return L.length===0?null:L[0]}function r(L){if(L.length===0)return null;var J=L[0],ie=L.pop();if(ie!==J){L[0]=ie;e:for(var be=0,$=L.length,N=$>>>1;be<N;){var I=2*(be+1)-1,ee=L[I],D=I+1,B=L[D];if(0>d(ee,ie))D<$&&0>d(B,ee)?(L[be]=B,L[D]=ie,be=D):(L[be]=ee,L[I]=ie,be=I);else if(D<$&&0>d(B,ie))L[be]=B,L[D]=ie,be=D;else break e}}return J}function d(L,J){var ie=L.sortIndex-J.sortIndex;return ie!==0?ie:L.id-J.id}if(n.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var f=performance;n.unstable_now=function(){return f.now()}}else{var p=Date,h=p.now();n.unstable_now=function(){return p.now()-h}}var x=[],g=[],S=1,b=null,E=3,w=!1,C=!1,A=!1,O=!1,T=typeof setTimeout=="function"?setTimeout:null,X=typeof clearTimeout=="function"?clearTimeout:null,Y=typeof setImmediate<"u"?setImmediate:null;function P(L){for(var J=s(g);J!==null;){if(J.callback===null)r(g);else if(J.startTime<=L)r(g),J.sortIndex=J.expirationTime,i(x,J);else break;J=s(g)}}function Z(L){if(A=!1,P(L),!C)if(s(x)!==null)C=!0,te||(te=!0,ze());else{var J=s(g);J!==null&&qe(Z,J.startTime-L)}}var te=!1,H=-1,Q=5,fe=-1;function He(){return O?!0:!(n.unstable_now()-fe<Q)}function Ae(){if(O=!1,te){var L=n.unstable_now();fe=L;var J=!0;try{e:{C=!1,A&&(A=!1,X(H),H=-1),w=!0;var ie=E;try{t:{for(P(L),b=s(x);b!==null&&!(b.expirationTime>L&&He());){var be=b.callback;if(typeof be=="function"){b.callback=null,E=b.priorityLevel;var $=be(b.expirationTime<=L);if(L=n.unstable_now(),typeof $=="function"){b.callback=$,P(L),J=!0;break t}b===s(x)&&r(x),P(L)}else r(x);b=s(x)}if(b!==null)J=!0;else{var N=s(g);N!==null&&qe(Z,N.startTime-L),J=!1}}break e}finally{b=null,E=ie,w=!1}J=void 0}}finally{J?ze():te=!1}}}var ze;if(typeof Y=="function")ze=function(){Y(Ae)};else if(typeof MessageChannel<"u"){var F=new MessageChannel,Te=F.port2;F.port1.onmessage=Ae,ze=function(){Te.postMessage(null)}}else ze=function(){T(Ae,0)};function qe(L,J){H=T(function(){L(n.unstable_now())},J)}n.unstable_IdlePriority=5,n.unstable_ImmediatePriority=1,n.unstable_LowPriority=4,n.unstable_NormalPriority=3,n.unstable_Profiling=null,n.unstable_UserBlockingPriority=2,n.unstable_cancelCallback=function(L){L.callback=null},n.unstable_forceFrameRate=function(L){0>L||125<L?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):Q=0<L?Math.floor(1e3/L):5},n.unstable_getCurrentPriorityLevel=function(){return E},n.unstable_next=function(L){switch(E){case 1:case 2:case 3:var J=3;break;default:J=E}var ie=E;E=J;try{return L()}finally{E=ie}},n.unstable_requestPaint=function(){O=!0},n.unstable_runWithPriority=function(L,J){switch(L){case 1:case 2:case 3:case 4:case 5:break;default:L=3}var ie=E;E=L;try{return J()}finally{E=ie}},n.unstable_scheduleCallback=function(L,J,ie){var be=n.unstable_now();switch(typeof ie=="object"&&ie!==null?(ie=ie.delay,ie=typeof ie=="number"&&0<ie?be+ie:be):ie=be,L){case 1:var $=-1;break;case 2:$=250;break;case 5:$=1073741823;break;case 4:$=1e4;break;default:$=5e3}return $=ie+$,L={id:S++,callback:J,priorityLevel:L,startTime:ie,expirationTime:$,sortIndex:-1},ie>be?(L.sortIndex=ie,i(g,L),s(x)===null&&L===s(g)&&(A?(X(H),H=-1):A=!0,qe(Z,ie-be))):(L.sortIndex=$,i(x,L),C||w||(C=!0,te||(te=!0,ze()))),L},n.unstable_shouldYield=He,n.unstable_wrapCallback=function(L){var J=E;return function(){var ie=E;E=J;try{return L.apply(this,arguments)}finally{E=ie}}}})(cu)),cu}var sh;function Zy(){return sh||(sh=1,ou.exports=Py()),ou.exports}var uu={exports:{}},wt={};/**
27
+ * @license React
28
+ * react-dom.production.js
29
+ *
30
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
31
+ *
32
+ * This source code is licensed under the MIT license found in the
33
+ * LICENSE file in the root directory of this source tree.
34
+ */var rh;function Jy(){if(rh)return wt;rh=1;var n=Yu();function i(x){var g="https://react.dev/errors/"+x;if(1<arguments.length){g+="?args[]="+encodeURIComponent(arguments[1]);for(var S=2;S<arguments.length;S++)g+="&args[]="+encodeURIComponent(arguments[S])}return"Minified React error #"+x+"; visit "+g+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function s(){}var r={d:{f:s,r:function(){throw Error(i(522))},D:s,C:s,L:s,m:s,X:s,S:s,M:s},p:0,findDOMNode:null},d=Symbol.for("react.portal");function f(x,g,S){var b=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:d,key:b==null?null:""+b,children:x,containerInfo:g,implementation:S}}var p=n.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function h(x,g){if(x==="font")return"";if(typeof g=="string")return g==="use-credentials"?g:""}return wt.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=r,wt.createPortal=function(x,g){var S=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!g||g.nodeType!==1&&g.nodeType!==9&&g.nodeType!==11)throw Error(i(299));return f(x,g,null,S)},wt.flushSync=function(x){var g=p.T,S=r.p;try{if(p.T=null,r.p=2,x)return x()}finally{p.T=g,r.p=S,r.d.f()}},wt.preconnect=function(x,g){typeof x=="string"&&(g?(g=g.crossOrigin,g=typeof g=="string"?g==="use-credentials"?g:"":void 0):g=null,r.d.C(x,g))},wt.prefetchDNS=function(x){typeof x=="string"&&r.d.D(x)},wt.preinit=function(x,g){if(typeof x=="string"&&g&&typeof g.as=="string"){var S=g.as,b=h(S,g.crossOrigin),E=typeof g.integrity=="string"?g.integrity:void 0,w=typeof g.fetchPriority=="string"?g.fetchPriority:void 0;S==="style"?r.d.S(x,typeof g.precedence=="string"?g.precedence:void 0,{crossOrigin:b,integrity:E,fetchPriority:w}):S==="script"&&r.d.X(x,{crossOrigin:b,integrity:E,fetchPriority:w,nonce:typeof g.nonce=="string"?g.nonce:void 0})}},wt.preinitModule=function(x,g){if(typeof x=="string")if(typeof g=="object"&&g!==null){if(g.as==null||g.as==="script"){var S=h(g.as,g.crossOrigin);r.d.M(x,{crossOrigin:S,integrity:typeof g.integrity=="string"?g.integrity:void 0,nonce:typeof g.nonce=="string"?g.nonce:void 0})}}else g==null&&r.d.M(x)},wt.preload=function(x,g){if(typeof x=="string"&&typeof g=="object"&&g!==null&&typeof g.as=="string"){var S=g.as,b=h(S,g.crossOrigin);r.d.L(x,S,{crossOrigin:b,integrity:typeof g.integrity=="string"?g.integrity:void 0,nonce:typeof g.nonce=="string"?g.nonce:void 0,type:typeof g.type=="string"?g.type:void 0,fetchPriority:typeof g.fetchPriority=="string"?g.fetchPriority:void 0,referrerPolicy:typeof g.referrerPolicy=="string"?g.referrerPolicy:void 0,imageSrcSet:typeof g.imageSrcSet=="string"?g.imageSrcSet:void 0,imageSizes:typeof g.imageSizes=="string"?g.imageSizes:void 0,media:typeof g.media=="string"?g.media:void 0})}},wt.preloadModule=function(x,g){if(typeof x=="string")if(g){var S=h(g.as,g.crossOrigin);r.d.m(x,{as:typeof g.as=="string"&&g.as!=="script"?g.as:void 0,crossOrigin:S,integrity:typeof g.integrity=="string"?g.integrity:void 0})}else r.d.m(x)},wt.requestFormReset=function(x){r.d.r(x)},wt.unstable_batchedUpdates=function(x,g){return x(g)},wt.useFormState=function(x,g,S){return p.H.useFormState(x,g,S)},wt.useFormStatus=function(){return p.H.useHostTransitionStatus()},wt.version="19.2.4",wt}var ih;function ng(){if(ih)return uu.exports;ih=1;function n(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(i){console.error(i)}}return n(),uu.exports=Jy(),uu.exports}/**
35
+ * @license React
36
+ * react-dom-client.production.js
37
+ *
38
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
39
+ *
40
+ * This source code is licensed under the MIT license found in the
41
+ * LICENSE file in the root directory of this source tree.
42
+ */var oh;function Fy(){if(oh)return Bs;oh=1;var n=Zy(),i=Yu(),s=ng();function r(e){var t="https://react.dev/errors/"+e;if(1<arguments.length){t+="?args[]="+encodeURIComponent(arguments[1]);for(var a=2;a<arguments.length;a++)t+="&args[]="+encodeURIComponent(arguments[a])}return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function d(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function f(e){var t=e,a=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,(t.flags&4098)!==0&&(a=t.return),e=t.return;while(e)}return t.tag===3?a:null}function p(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function h(e){if(e.tag===31){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function x(e){if(f(e)!==e)throw Error(r(188))}function g(e){var t=e.alternate;if(!t){if(t=f(e),t===null)throw Error(r(188));return t!==e?null:e}for(var a=e,l=t;;){var o=a.return;if(o===null)break;var u=o.alternate;if(u===null){if(l=o.return,l!==null){a=l;continue}break}if(o.child===u.child){for(u=o.child;u;){if(u===a)return x(o),e;if(u===l)return x(o),t;u=u.sibling}throw Error(r(188))}if(a.return!==l.return)a=o,l=u;else{for(var m=!1,y=o.child;y;){if(y===a){m=!0,a=o,l=u;break}if(y===l){m=!0,l=o,a=u;break}y=y.sibling}if(!m){for(y=u.child;y;){if(y===a){m=!0,a=u,l=o;break}if(y===l){m=!0,l=u,a=o;break}y=y.sibling}if(!m)throw Error(r(189))}}if(a.alternate!==l)throw Error(r(190))}if(a.tag!==3)throw Error(r(188));return a.stateNode.current===a?e:t}function S(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=S(e),t!==null)return t;e=e.sibling}return null}var b=Object.assign,E=Symbol.for("react.element"),w=Symbol.for("react.transitional.element"),C=Symbol.for("react.portal"),A=Symbol.for("react.fragment"),O=Symbol.for("react.strict_mode"),T=Symbol.for("react.profiler"),X=Symbol.for("react.consumer"),Y=Symbol.for("react.context"),P=Symbol.for("react.forward_ref"),Z=Symbol.for("react.suspense"),te=Symbol.for("react.suspense_list"),H=Symbol.for("react.memo"),Q=Symbol.for("react.lazy"),fe=Symbol.for("react.activity"),He=Symbol.for("react.memo_cache_sentinel"),Ae=Symbol.iterator;function ze(e){return e===null||typeof e!="object"?null:(e=Ae&&e[Ae]||e["@@iterator"],typeof e=="function"?e:null)}var F=Symbol.for("react.client.reference");function Te(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===F?null:e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case A:return"Fragment";case T:return"Profiler";case O:return"StrictMode";case Z:return"Suspense";case te:return"SuspenseList";case fe:return"Activity"}if(typeof e=="object")switch(e.$$typeof){case C:return"Portal";case Y:return e.displayName||"Context";case X:return(e._context.displayName||"Context")+".Consumer";case P:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case H:return t=e.displayName||null,t!==null?t:Te(e.type)||"Memo";case Q:t=e._payload,e=e._init;try{return Te(e(t))}catch{}}return null}var qe=Array.isArray,L=i.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,J=s.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,ie={pending:!1,data:null,method:null,action:null},be=[],$=-1;function N(e){return{current:e}}function I(e){0>$||(e.current=be[$],be[$]=null,$--)}function ee(e,t){$++,be[$]=e.current,e.current=t}var D=N(null),B=N(null),q=N(null),ae=N(null);function Se(e,t){switch(ee(q,t),ee(B,e),ee(D,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?wp(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=wp(t),e=jp(t,e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}I(D),ee(D,e)}function oe(){I(D),I(B),I(q)}function Ie(e){e.memoizedState!==null&&ee(ae,e);var t=D.current,a=jp(t,e.type);t!==a&&(ee(B,e),ee(D,a))}function je(e){B.current===e&&(I(D),I(B)),ae.current===e&&(I(ae),Ms._currentValue=ie)}var Qe,it;function $e(e){if(Qe===void 0)try{throw Error()}catch(a){var t=a.stack.trim().match(/\n( *(at )?)/);Qe=t&&t[1]||"",it=-1<a.stack.indexOf(`
43
+ at`)?" (<anonymous>)":-1<a.stack.indexOf("@")?"@unknown:0:0":""}return`
44
+ `+Qe+e+it}var Sn=!1;function na(e,t){if(!e||Sn)return"";Sn=!0;var a=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var l={DetermineComponentFrameRoot:function(){try{if(t){var V=function(){throw Error()};if(Object.defineProperty(V.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(V,[])}catch(U){var z=U}Reflect.construct(e,[],V)}else{try{V.call()}catch(U){z=U}e.call(V.prototype)}}else{try{throw Error()}catch(U){z=U}(V=e())&&typeof V.catch=="function"&&V.catch(function(){})}}catch(U){if(U&&z&&typeof U.stack=="string")return[U.stack,z.stack]}return[null,null]}};l.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var o=Object.getOwnPropertyDescriptor(l.DetermineComponentFrameRoot,"name");o&&o.configurable&&Object.defineProperty(l.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var u=l.DetermineComponentFrameRoot(),m=u[0],y=u[1];if(m&&y){var j=m.split(`
45
+ `),R=y.split(`
46
+ `);for(o=l=0;l<j.length&&!j[l].includes("DetermineComponentFrameRoot");)l++;for(;o<R.length&&!R[o].includes("DetermineComponentFrameRoot");)o++;if(l===j.length||o===R.length)for(l=j.length-1,o=R.length-1;1<=l&&0<=o&&j[l]!==R[o];)o--;for(;1<=l&&0<=o;l--,o--)if(j[l]!==R[o]){if(l!==1||o!==1)do if(l--,o--,0>o||j[l]!==R[o]){var G=`
47
+ `+j[l].replace(" at new "," at ");return e.displayName&&G.includes("<anonymous>")&&(G=G.replace("<anonymous>",e.displayName)),G}while(1<=l&&0<=o);break}}}finally{Sn=!1,Error.prepareStackTrace=a}return(a=e?e.displayName||e.name:"")?$e(a):""}function Pn(e,t){switch(e.tag){case 26:case 27:case 5:return $e(e.type);case 16:return $e("Lazy");case 13:return e.child!==t&&t!==null?$e("Suspense Fallback"):$e("Suspense");case 19:return $e("SuspenseList");case 0:case 15:return na(e.type,!1);case 11:return na(e.type.render,!1);case 1:return na(e.type,!0);case 31:return $e("Activity");default:return""}}function Ws(e){try{var t="",a=null;do t+=Pn(e,a),a=e,e=e.return;while(e);return t}catch(l){return`
48
+ Error generating stack: `+l.message+`
49
+ `+l.stack}}var ce=Object.prototype.hasOwnProperty,ut=n.unstable_scheduleCallback,tt=n.unstable_cancelCallback,W=n.unstable_shouldYield,jt=n.unstable_requestPaint,Ve=n.unstable_now,Et=n.unstable_getCurrentPriorityLevel,Zn=n.unstable_ImmediatePriority,Xt=n.unstable_UserBlockingPriority,dt=n.unstable_NormalPriority,Yl=n.unstable_LowPriority,er=n.unstable_IdlePriority,Vi=n.log,Cv=n.unstable_setDisableYieldValue,Vl=null,zt=null;function qa(e){if(typeof Vi=="function"&&Cv(e),zt&&typeof zt.setStrictMode=="function")try{zt.setStrictMode(Vl,e)}catch{}}var Lt=Math.clz32?Math.clz32:kv,Tv=Math.log,Av=Math.LN2;function kv(e){return e>>>=0,e===0?32:31-(Tv(e)/Av|0)|0}var tr=256,ar=262144,nr=4194304;function En(e){var t=e&42;if(t!==0)return t;switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return e&261888;case 262144:case 524288:case 1048576:case 2097152:return e&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return e&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return e}}function lr(e,t,a){var l=e.pendingLanes;if(l===0)return 0;var o=0,u=e.suspendedLanes,m=e.pingedLanes;e=e.warmLanes;var y=l&134217727;return y!==0?(l=y&~u,l!==0?o=En(l):(m&=y,m!==0?o=En(m):a||(a=y&~e,a!==0&&(o=En(a))))):(y=l&~u,y!==0?o=En(y):m!==0?o=En(m):a||(a=l&~e,a!==0&&(o=En(a)))),o===0?0:t!==0&&t!==o&&(t&u)===0&&(u=o&-o,a=t&-t,u>=a||u===32&&(a&4194048)!==0)?t:o}function Xl(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function Ov(e,t){switch(e){case 1:case 2:case 4:case 8:case 64:return t+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 t+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 nd(){var e=nr;return nr<<=1,(nr&62914560)===0&&(nr=4194304),e}function Xi(e){for(var t=[],a=0;31>a;a++)t.push(e);return t}function Ql(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function Dv(e,t,a,l,o,u){var m=e.pendingLanes;e.pendingLanes=a,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=a,e.entangledLanes&=a,e.errorRecoveryDisabledLanes&=a,e.shellSuspendCounter=0;var y=e.entanglements,j=e.expirationTimes,R=e.hiddenUpdates;for(a=m&~a;0<a;){var G=31-Lt(a),V=1<<G;y[G]=0,j[G]=-1;var z=R[G];if(z!==null)for(R[G]=null,G=0;G<z.length;G++){var U=z[G];U!==null&&(U.lane&=-536870913)}a&=~V}l!==0&&ld(e,l,0),u!==0&&o===0&&e.tag!==0&&(e.suspendedLanes|=u&~(m&~t))}function ld(e,t,a){e.pendingLanes|=t,e.suspendedLanes&=~t;var l=31-Lt(t);e.entangledLanes|=t,e.entanglements[l]=e.entanglements[l]|1073741824|a&261930}function sd(e,t){var a=e.entangledLanes|=t;for(e=e.entanglements;a;){var l=31-Lt(a),o=1<<l;o&t|e[l]&t&&(e[l]|=t),a&=~o}}function rd(e,t){var a=t&-t;return a=(a&42)!==0?1:Qi(a),(a&(e.suspendedLanes|t))!==0?0:a}function Qi(e){switch(e){case 2:e=1;break;case 8:e=4;break;case 32:e=16;break;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:e=128;break;case 268435456:e=134217728;break;default:e=0}return e}function Pi(e){return e&=-e,2<e?8<e?(e&134217727)!==0?32:268435456:8:2}function id(){var e=J.p;return e!==0?e:(e=window.event,e===void 0?32:Qp(e.type))}function od(e,t){var a=J.p;try{return J.p=e,t()}finally{J.p=a}}var Ia=Math.random().toString(36).slice(2),gt="__reactFiber$"+Ia,Tt="__reactProps$"+Ia,Jn="__reactContainer$"+Ia,Zi="__reactEvents$"+Ia,Mv="__reactListeners$"+Ia,Rv="__reactHandles$"+Ia,cd="__reactResources$"+Ia,Pl="__reactMarker$"+Ia;function Ji(e){delete e[gt],delete e[Tt],delete e[Zi],delete e[Mv],delete e[Rv]}function Fn(e){var t=e[gt];if(t)return t;for(var a=e.parentNode;a;){if(t=a[Jn]||a[gt]){if(a=t.alternate,t.child!==null||a!==null&&a.child!==null)for(e=Op(e);e!==null;){if(a=e[gt])return a;e=Op(e)}return t}e=a,a=e.parentNode}return null}function $n(e){if(e=e[gt]||e[Jn]){var t=e.tag;if(t===5||t===6||t===13||t===31||t===26||t===27||t===3)return e}return null}function Zl(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(r(33))}function Wn(e){var t=e[cd];return t||(t=e[cd]={hoistableStyles:new Map,hoistableScripts:new Map}),t}function ft(e){e[Pl]=!0}var ud=new Set,dd={};function wn(e,t){el(e,t),el(e+"Capture",t)}function el(e,t){for(dd[e]=t,e=0;e<t.length;e++)ud.add(t[e])}var zv=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]*$"),fd={},md={};function Lv(e){return ce.call(md,e)?!0:ce.call(fd,e)?!1:zv.test(e)?md[e]=!0:(fd[e]=!0,!1)}function sr(e,t,a){if(Lv(t))if(a===null)e.removeAttribute(t);else{switch(typeof a){case"undefined":case"function":case"symbol":e.removeAttribute(t);return;case"boolean":var l=t.toLowerCase().slice(0,5);if(l!=="data-"&&l!=="aria-"){e.removeAttribute(t);return}}e.setAttribute(t,""+a)}}function rr(e,t,a){if(a===null)e.removeAttribute(t);else{switch(typeof a){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(t);return}e.setAttribute(t,""+a)}}function xa(e,t,a,l){if(l===null)e.removeAttribute(a);else{switch(typeof l){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(a);return}e.setAttributeNS(t,a,""+l)}}function Qt(e){switch(typeof e){case"bigint":case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function pd(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function Uv(e,t,a){var l=Object.getOwnPropertyDescriptor(e.constructor.prototype,t);if(!e.hasOwnProperty(t)&&typeof l<"u"&&typeof l.get=="function"&&typeof l.set=="function"){var o=l.get,u=l.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return o.call(this)},set:function(m){a=""+m,u.call(this,m)}}),Object.defineProperty(e,t,{enumerable:l.enumerable}),{getValue:function(){return a},setValue:function(m){a=""+m},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function Fi(e){if(!e._valueTracker){var t=pd(e)?"checked":"value";e._valueTracker=Uv(e,t,""+e[t])}}function hd(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var a=t.getValue(),l="";return e&&(l=pd(e)?e.checked?"true":"false":e.value),e=l,e!==a?(t.setValue(e),!0):!1}function ir(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}var Bv=/[\n"\\]/g;function Pt(e){return e.replace(Bv,function(t){return"\\"+t.charCodeAt(0).toString(16)+" "})}function $i(e,t,a,l,o,u,m,y){e.name="",m!=null&&typeof m!="function"&&typeof m!="symbol"&&typeof m!="boolean"?e.type=m:e.removeAttribute("type"),t!=null?m==="number"?(t===0&&e.value===""||e.value!=t)&&(e.value=""+Qt(t)):e.value!==""+Qt(t)&&(e.value=""+Qt(t)):m!=="submit"&&m!=="reset"||e.removeAttribute("value"),t!=null?Wi(e,m,Qt(t)):a!=null?Wi(e,m,Qt(a)):l!=null&&e.removeAttribute("value"),o==null&&u!=null&&(e.defaultChecked=!!u),o!=null&&(e.checked=o&&typeof o!="function"&&typeof o!="symbol"),y!=null&&typeof y!="function"&&typeof y!="symbol"&&typeof y!="boolean"?e.name=""+Qt(y):e.removeAttribute("name")}function gd(e,t,a,l,o,u,m,y){if(u!=null&&typeof u!="function"&&typeof u!="symbol"&&typeof u!="boolean"&&(e.type=u),t!=null||a!=null){if(!(u!=="submit"&&u!=="reset"||t!=null)){Fi(e);return}a=a!=null?""+Qt(a):"",t=t!=null?""+Qt(t):a,y||t===e.value||(e.value=t),e.defaultValue=t}l=l??o,l=typeof l!="function"&&typeof l!="symbol"&&!!l,e.checked=y?e.checked:!!l,e.defaultChecked=!!l,m!=null&&typeof m!="function"&&typeof m!="symbol"&&typeof m!="boolean"&&(e.name=m),Fi(e)}function Wi(e,t,a){t==="number"&&ir(e.ownerDocument)===e||e.defaultValue===""+a||(e.defaultValue=""+a)}function tl(e,t,a,l){if(e=e.options,t){t={};for(var o=0;o<a.length;o++)t["$"+a[o]]=!0;for(a=0;a<e.length;a++)o=t.hasOwnProperty("$"+e[a].value),e[a].selected!==o&&(e[a].selected=o),o&&l&&(e[a].defaultSelected=!0)}else{for(a=""+Qt(a),t=null,o=0;o<e.length;o++){if(e[o].value===a){e[o].selected=!0,l&&(e[o].defaultSelected=!0);return}t!==null||e[o].disabled||(t=e[o])}t!==null&&(t.selected=!0)}}function vd(e,t,a){if(t!=null&&(t=""+Qt(t),t!==e.value&&(e.value=t),a==null)){e.defaultValue!==t&&(e.defaultValue=t);return}e.defaultValue=a!=null?""+Qt(a):""}function xd(e,t,a,l){if(t==null){if(l!=null){if(a!=null)throw Error(r(92));if(qe(l)){if(1<l.length)throw Error(r(93));l=l[0]}a=l}a==null&&(a=""),t=a}a=Qt(t),e.defaultValue=a,l=e.textContent,l===a&&l!==""&&l!==null&&(e.value=l),Fi(e)}function al(e,t){if(t){var a=e.firstChild;if(a&&a===e.lastChild&&a.nodeType===3){a.nodeValue=t;return}}e.textContent=t}var Hv=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 yd(e,t,a){var l=t.indexOf("--")===0;a==null||typeof a=="boolean"||a===""?l?e.setProperty(t,""):t==="float"?e.cssFloat="":e[t]="":l?e.setProperty(t,a):typeof a!="number"||a===0||Hv.has(t)?t==="float"?e.cssFloat=a:e[t]=(""+a).trim():e[t]=a+"px"}function bd(e,t,a){if(t!=null&&typeof t!="object")throw Error(r(62));if(e=e.style,a!=null){for(var l in a)!a.hasOwnProperty(l)||t!=null&&t.hasOwnProperty(l)||(l.indexOf("--")===0?e.setProperty(l,""):l==="float"?e.cssFloat="":e[l]="");for(var o in t)l=t[o],t.hasOwnProperty(o)&&a[o]!==l&&yd(e,o,l)}else for(var u in t)t.hasOwnProperty(u)&&yd(e,u,t[u])}function eo(e){if(e.indexOf("-")===-1)return!1;switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var Gv=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"]]),qv=/^[\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 or(e){return qv.test(""+e)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":e}function ya(){}var to=null;function ao(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var nl=null,ll=null;function Sd(e){var t=$n(e);if(t&&(e=t.stateNode)){var a=e[Tt]||null;e:switch(e=t.stateNode,t.type){case"input":if($i(e,a.value,a.defaultValue,a.defaultValue,a.checked,a.defaultChecked,a.type,a.name),t=a.name,a.type==="radio"&&t!=null){for(a=e;a.parentNode;)a=a.parentNode;for(a=a.querySelectorAll('input[name="'+Pt(""+t)+'"][type="radio"]'),t=0;t<a.length;t++){var l=a[t];if(l!==e&&l.form===e.form){var o=l[Tt]||null;if(!o)throw Error(r(90));$i(l,o.value,o.defaultValue,o.defaultValue,o.checked,o.defaultChecked,o.type,o.name)}}for(t=0;t<a.length;t++)l=a[t],l.form===e.form&&hd(l)}break e;case"textarea":vd(e,a.value,a.defaultValue);break e;case"select":t=a.value,t!=null&&tl(e,!!a.multiple,t,!1)}}}var no=!1;function Ed(e,t,a){if(no)return e(t,a);no=!0;try{var l=e(t);return l}finally{if(no=!1,(nl!==null||ll!==null)&&(Zr(),nl&&(t=nl,e=ll,ll=nl=null,Sd(t),e)))for(t=0;t<e.length;t++)Sd(e[t])}}function Jl(e,t){var a=e.stateNode;if(a===null)return null;var l=a[Tt]||null;if(l===null)return null;a=l[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(l=!l.disabled)||(e=e.type,l=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!l;break e;default:e=!1}if(e)return null;if(a&&typeof a!="function")throw Error(r(231,t,typeof a));return a}var ba=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),lo=!1;if(ba)try{var Fl={};Object.defineProperty(Fl,"passive",{get:function(){lo=!0}}),window.addEventListener("test",Fl,Fl),window.removeEventListener("test",Fl,Fl)}catch{lo=!1}var Ka=null,so=null,cr=null;function wd(){if(cr)return cr;var e,t=so,a=t.length,l,o="value"in Ka?Ka.value:Ka.textContent,u=o.length;for(e=0;e<a&&t[e]===o[e];e++);var m=a-e;for(l=1;l<=m&&t[a-l]===o[u-l];l++);return cr=o.slice(e,1<l?1-l:void 0)}function ur(e){var t=e.keyCode;return"charCode"in e?(e=e.charCode,e===0&&t===13&&(e=13)):e=t,e===10&&(e=13),32<=e||e===13?e:0}function dr(){return!0}function jd(){return!1}function At(e){function t(a,l,o,u,m){this._reactName=a,this._targetInst=o,this.type=l,this.nativeEvent=u,this.target=m,this.currentTarget=null;for(var y in e)e.hasOwnProperty(y)&&(a=e[y],this[y]=a?a(u):u[y]);return this.isDefaultPrevented=(u.defaultPrevented!=null?u.defaultPrevented:u.returnValue===!1)?dr:jd,this.isPropagationStopped=jd,this}return b(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var a=this.nativeEvent;a&&(a.preventDefault?a.preventDefault():typeof a.returnValue!="unknown"&&(a.returnValue=!1),this.isDefaultPrevented=dr)},stopPropagation:function(){var a=this.nativeEvent;a&&(a.stopPropagation?a.stopPropagation():typeof a.cancelBubble!="unknown"&&(a.cancelBubble=!0),this.isPropagationStopped=dr)},persist:function(){},isPersistent:dr}),t}var jn={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},fr=At(jn),$l=b({},jn,{view:0,detail:0}),Iv=At($l),ro,io,Wl,mr=b({},$l,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:co,button:0,buttons:0,relatedTarget:function(e){return e.relatedTarget===void 0?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return"movementX"in e?e.movementX:(e!==Wl&&(Wl&&e.type==="mousemove"?(ro=e.screenX-Wl.screenX,io=e.screenY-Wl.screenY):io=ro=0,Wl=e),ro)},movementY:function(e){return"movementY"in e?e.movementY:io}}),Nd=At(mr),Kv=b({},mr,{dataTransfer:0}),Yv=At(Kv),Vv=b({},$l,{relatedTarget:0}),oo=At(Vv),Xv=b({},jn,{animationName:0,elapsedTime:0,pseudoElement:0}),Qv=At(Xv),Pv=b({},jn,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),Zv=At(Pv),Jv=b({},jn,{data:0}),_d=At(Jv),Fv={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},$v={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"},Wv={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function ex(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=Wv[e])?!!t[e]:!1}function co(){return ex}var tx=b({},$l,{key:function(e){if(e.key){var t=Fv[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=ur(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?$v[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:co,charCode:function(e){return e.type==="keypress"?ur(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?ur(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),ax=At(tx),nx=b({},mr,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Cd=At(nx),lx=b({},$l,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:co}),sx=At(lx),rx=b({},jn,{propertyName:0,elapsedTime:0,pseudoElement:0}),ix=At(rx),ox=b({},mr,{deltaX:function(e){return"deltaX"in e?e.deltaX:"wheelDeltaX"in e?-e.wheelDeltaX:0},deltaY:function(e){return"deltaY"in e?e.deltaY:"wheelDeltaY"in e?-e.wheelDeltaY:"wheelDelta"in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0}),cx=At(ox),ux=b({},jn,{newState:0,oldState:0}),dx=At(ux),fx=[9,13,27,32],uo=ba&&"CompositionEvent"in window,es=null;ba&&"documentMode"in document&&(es=document.documentMode);var mx=ba&&"TextEvent"in window&&!es,Td=ba&&(!uo||es&&8<es&&11>=es),Ad=" ",kd=!1;function Od(e,t){switch(e){case"keyup":return fx.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Dd(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var sl=!1;function px(e,t){switch(e){case"compositionend":return Dd(t);case"keypress":return t.which!==32?null:(kd=!0,Ad);case"textInput":return e=t.data,e===Ad&&kd?null:e;default:return null}}function hx(e,t){if(sl)return e==="compositionend"||!uo&&Od(e,t)?(e=wd(),cr=so=Ka=null,sl=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case"compositionend":return Td&&t.locale!=="ko"?null:t.data;default:return null}}var gx={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 Md(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!gx[e.type]:t==="textarea"}function Rd(e,t,a,l){nl?ll?ll.push(l):ll=[l]:nl=l,t=ai(t,"onChange"),0<t.length&&(a=new fr("onChange","change",null,a,l),e.push({event:a,listeners:t}))}var ts=null,as=null;function vx(e){vp(e,0)}function pr(e){var t=Zl(e);if(hd(t))return e}function zd(e,t){if(e==="change")return t}var Ld=!1;if(ba){var fo;if(ba){var mo="oninput"in document;if(!mo){var Ud=document.createElement("div");Ud.setAttribute("oninput","return;"),mo=typeof Ud.oninput=="function"}fo=mo}else fo=!1;Ld=fo&&(!document.documentMode||9<document.documentMode)}function Bd(){ts&&(ts.detachEvent("onpropertychange",Hd),as=ts=null)}function Hd(e){if(e.propertyName==="value"&&pr(as)){var t=[];Rd(t,as,e,ao(e)),Ed(vx,t)}}function xx(e,t,a){e==="focusin"?(Bd(),ts=t,as=a,ts.attachEvent("onpropertychange",Hd)):e==="focusout"&&Bd()}function yx(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return pr(as)}function bx(e,t){if(e==="click")return pr(t)}function Sx(e,t){if(e==="input"||e==="change")return pr(t)}function Ex(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var Ut=typeof Object.is=="function"?Object.is:Ex;function ns(e,t){if(Ut(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var a=Object.keys(e),l=Object.keys(t);if(a.length!==l.length)return!1;for(l=0;l<a.length;l++){var o=a[l];if(!ce.call(t,o)||!Ut(e[o],t[o]))return!1}return!0}function Gd(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function qd(e,t){var a=Gd(e);e=0;for(var l;a;){if(a.nodeType===3){if(l=e+a.textContent.length,e<=t&&l>=t)return{node:a,offset:t-e};e=l}e:{for(;a;){if(a.nextSibling){a=a.nextSibling;break e}a=a.parentNode}a=void 0}a=Gd(a)}}function Id(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Id(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Kd(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=ir(e.document);t instanceof e.HTMLIFrameElement;){try{var a=typeof t.contentWindow.location.href=="string"}catch{a=!1}if(a)e=t.contentWindow;else break;t=ir(e.document)}return t}function po(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}var wx=ba&&"documentMode"in document&&11>=document.documentMode,rl=null,ho=null,ls=null,go=!1;function Yd(e,t,a){var l=a.window===a?a.document:a.nodeType===9?a:a.ownerDocument;go||rl==null||rl!==ir(l)||(l=rl,"selectionStart"in l&&po(l)?l={start:l.selectionStart,end:l.selectionEnd}:(l=(l.ownerDocument&&l.ownerDocument.defaultView||window).getSelection(),l={anchorNode:l.anchorNode,anchorOffset:l.anchorOffset,focusNode:l.focusNode,focusOffset:l.focusOffset}),ls&&ns(ls,l)||(ls=l,l=ai(ho,"onSelect"),0<l.length&&(t=new fr("onSelect","select",null,t,a),e.push({event:t,listeners:l}),t.target=rl)))}function Nn(e,t){var a={};return a[e.toLowerCase()]=t.toLowerCase(),a["Webkit"+e]="webkit"+t,a["Moz"+e]="moz"+t,a}var il={animationend:Nn("Animation","AnimationEnd"),animationiteration:Nn("Animation","AnimationIteration"),animationstart:Nn("Animation","AnimationStart"),transitionrun:Nn("Transition","TransitionRun"),transitionstart:Nn("Transition","TransitionStart"),transitioncancel:Nn("Transition","TransitionCancel"),transitionend:Nn("Transition","TransitionEnd")},vo={},Vd={};ba&&(Vd=document.createElement("div").style,"AnimationEvent"in window||(delete il.animationend.animation,delete il.animationiteration.animation,delete il.animationstart.animation),"TransitionEvent"in window||delete il.transitionend.transition);function _n(e){if(vo[e])return vo[e];if(!il[e])return e;var t=il[e],a;for(a in t)if(t.hasOwnProperty(a)&&a in Vd)return vo[e]=t[a];return e}var Xd=_n("animationend"),Qd=_n("animationiteration"),Pd=_n("animationstart"),jx=_n("transitionrun"),Nx=_n("transitionstart"),_x=_n("transitioncancel"),Zd=_n("transitionend"),Jd=new Map,xo="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(" ");xo.push("scrollEnd");function la(e,t){Jd.set(e,t),wn(t,[e])}var hr=typeof reportError=="function"?reportError:function(e){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var t=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof e=="object"&&e!==null&&typeof e.message=="string"?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",e);return}console.error(e)},Zt=[],ol=0,yo=0;function gr(){for(var e=ol,t=yo=ol=0;t<e;){var a=Zt[t];Zt[t++]=null;var l=Zt[t];Zt[t++]=null;var o=Zt[t];Zt[t++]=null;var u=Zt[t];if(Zt[t++]=null,l!==null&&o!==null){var m=l.pending;m===null?o.next=o:(o.next=m.next,m.next=o),l.pending=o}u!==0&&Fd(a,o,u)}}function vr(e,t,a,l){Zt[ol++]=e,Zt[ol++]=t,Zt[ol++]=a,Zt[ol++]=l,yo|=l,e.lanes|=l,e=e.alternate,e!==null&&(e.lanes|=l)}function bo(e,t,a,l){return vr(e,t,a,l),xr(e)}function Cn(e,t){return vr(e,null,null,t),xr(e)}function Fd(e,t,a){e.lanes|=a;var l=e.alternate;l!==null&&(l.lanes|=a);for(var o=!1,u=e.return;u!==null;)u.childLanes|=a,l=u.alternate,l!==null&&(l.childLanes|=a),u.tag===22&&(e=u.stateNode,e===null||e._visibility&1||(o=!0)),e=u,u=u.return;return e.tag===3?(u=e.stateNode,o&&t!==null&&(o=31-Lt(a),e=u.hiddenUpdates,l=e[o],l===null?e[o]=[t]:l.push(t),t.lane=a|536870912),u):null}function xr(e){if(50<_s)throw _s=0,Ac=null,Error(r(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var cl={};function Cx(e,t,a,l){this.tag=e,this.key=a,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=l,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Bt(e,t,a,l){return new Cx(e,t,a,l)}function So(e){return e=e.prototype,!(!e||!e.isReactComponent)}function Sa(e,t){var a=e.alternate;return a===null?(a=Bt(e.tag,t,e.key,e.mode),a.elementType=e.elementType,a.type=e.type,a.stateNode=e.stateNode,a.alternate=e,e.alternate=a):(a.pendingProps=t,a.type=e.type,a.flags=0,a.subtreeFlags=0,a.deletions=null),a.flags=e.flags&65011712,a.childLanes=e.childLanes,a.lanes=e.lanes,a.child=e.child,a.memoizedProps=e.memoizedProps,a.memoizedState=e.memoizedState,a.updateQueue=e.updateQueue,t=e.dependencies,a.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},a.sibling=e.sibling,a.index=e.index,a.ref=e.ref,a.refCleanup=e.refCleanup,a}function $d(e,t){e.flags&=65011714;var a=e.alternate;return a===null?(e.childLanes=0,e.lanes=t,e.child=null,e.subtreeFlags=0,e.memoizedProps=null,e.memoizedState=null,e.updateQueue=null,e.dependencies=null,e.stateNode=null):(e.childLanes=a.childLanes,e.lanes=a.lanes,e.child=a.child,e.subtreeFlags=0,e.deletions=null,e.memoizedProps=a.memoizedProps,e.memoizedState=a.memoizedState,e.updateQueue=a.updateQueue,e.type=a.type,t=a.dependencies,e.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext}),e}function yr(e,t,a,l,o,u){var m=0;if(l=e,typeof e=="function")So(e)&&(m=1);else if(typeof e=="string")m=Dy(e,a,D.current)?26:e==="html"||e==="head"||e==="body"?27:5;else e:switch(e){case fe:return e=Bt(31,a,t,o),e.elementType=fe,e.lanes=u,e;case A:return Tn(a.children,o,u,t);case O:m=8,o|=24;break;case T:return e=Bt(12,a,t,o|2),e.elementType=T,e.lanes=u,e;case Z:return e=Bt(13,a,t,o),e.elementType=Z,e.lanes=u,e;case te:return e=Bt(19,a,t,o),e.elementType=te,e.lanes=u,e;default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case Y:m=10;break e;case X:m=9;break e;case P:m=11;break e;case H:m=14;break e;case Q:m=16,l=null;break e}m=29,a=Error(r(130,e===null?"null":typeof e,"")),l=null}return t=Bt(m,a,t,o),t.elementType=e,t.type=l,t.lanes=u,t}function Tn(e,t,a,l){return e=Bt(7,e,l,t),e.lanes=a,e}function Eo(e,t,a){return e=Bt(6,e,null,t),e.lanes=a,e}function Wd(e){var t=Bt(18,null,null,0);return t.stateNode=e,t}function wo(e,t,a){return t=Bt(4,e.children!==null?e.children:[],e.key,t),t.lanes=a,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var ef=new WeakMap;function Jt(e,t){if(typeof e=="object"&&e!==null){var a=ef.get(e);return a!==void 0?a:(t={value:e,source:t,stack:Ws(t)},ef.set(e,t),t)}return{value:e,source:t,stack:Ws(t)}}var ul=[],dl=0,br=null,ss=0,Ft=[],$t=0,Ya=null,da=1,fa="";function Ea(e,t){ul[dl++]=ss,ul[dl++]=br,br=e,ss=t}function tf(e,t,a){Ft[$t++]=da,Ft[$t++]=fa,Ft[$t++]=Ya,Ya=e;var l=da;e=fa;var o=32-Lt(l)-1;l&=~(1<<o),a+=1;var u=32-Lt(t)+o;if(30<u){var m=o-o%5;u=(l&(1<<m)-1).toString(32),l>>=m,o-=m,da=1<<32-Lt(t)+o|a<<o|l,fa=u+e}else da=1<<u|a<<o|l,fa=e}function jo(e){e.return!==null&&(Ea(e,1),tf(e,1,0))}function No(e){for(;e===br;)br=ul[--dl],ul[dl]=null,ss=ul[--dl],ul[dl]=null;for(;e===Ya;)Ya=Ft[--$t],Ft[$t]=null,fa=Ft[--$t],Ft[$t]=null,da=Ft[--$t],Ft[$t]=null}function af(e,t){Ft[$t++]=da,Ft[$t++]=fa,Ft[$t++]=Ya,da=t.id,fa=t.overflow,Ya=e}var vt=null,Ke=null,Ce=!1,Va=null,Wt=!1,_o=Error(r(519));function Xa(e){var t=Error(r(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw rs(Jt(t,e)),_o}function nf(e){var t=e.stateNode,a=e.type,l=e.memoizedProps;switch(t[gt]=e,t[Tt]=l,a){case"dialog":we("cancel",t),we("close",t);break;case"iframe":case"object":case"embed":we("load",t);break;case"video":case"audio":for(a=0;a<Ts.length;a++)we(Ts[a],t);break;case"source":we("error",t);break;case"img":case"image":case"link":we("error",t),we("load",t);break;case"details":we("toggle",t);break;case"input":we("invalid",t),gd(t,l.value,l.defaultValue,l.checked,l.defaultChecked,l.type,l.name,!0);break;case"select":we("invalid",t);break;case"textarea":we("invalid",t),xd(t,l.value,l.defaultValue,l.children)}a=l.children,typeof a!="string"&&typeof a!="number"&&typeof a!="bigint"||t.textContent===""+a||l.suppressHydrationWarning===!0||Sp(t.textContent,a)?(l.popover!=null&&(we("beforetoggle",t),we("toggle",t)),l.onScroll!=null&&we("scroll",t),l.onScrollEnd!=null&&we("scrollend",t),l.onClick!=null&&(t.onclick=ya),t=!0):t=!1,t||Xa(e,!0)}function lf(e){for(vt=e.return;vt;)switch(vt.tag){case 5:case 31:case 13:Wt=!1;return;case 27:case 3:Wt=!0;return;default:vt=vt.return}}function fl(e){if(e!==vt)return!1;if(!Ce)return lf(e),Ce=!0,!1;var t=e.tag,a;if((a=t!==3&&t!==27)&&((a=t===5)&&(a=e.type,a=!(a!=="form"&&a!=="button")||Yc(e.type,e.memoizedProps)),a=!a),a&&Ke&&Xa(e),lf(e),t===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(r(317));Ke=kp(e)}else if(t===31){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(r(317));Ke=kp(e)}else t===27?(t=Ke,rn(e.type)?(e=Zc,Zc=null,Ke=e):Ke=t):Ke=vt?ta(e.stateNode.nextSibling):null;return!0}function An(){Ke=vt=null,Ce=!1}function Co(){var e=Va;return e!==null&&(Mt===null?Mt=e:Mt.push.apply(Mt,e),Va=null),e}function rs(e){Va===null?Va=[e]:Va.push(e)}var To=N(null),kn=null,wa=null;function Qa(e,t,a){ee(To,t._currentValue),t._currentValue=a}function ja(e){e._currentValue=To.current,I(To)}function Ao(e,t,a){for(;e!==null;){var l=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,l!==null&&(l.childLanes|=t)):l!==null&&(l.childLanes&t)!==t&&(l.childLanes|=t),e===a)break;e=e.return}}function ko(e,t,a,l){var o=e.child;for(o!==null&&(o.return=e);o!==null;){var u=o.dependencies;if(u!==null){var m=o.child;u=u.firstContext;e:for(;u!==null;){var y=u;u=o;for(var j=0;j<t.length;j++)if(y.context===t[j]){u.lanes|=a,y=u.alternate,y!==null&&(y.lanes|=a),Ao(u.return,a,e),l||(m=null);break e}u=y.next}}else if(o.tag===18){if(m=o.return,m===null)throw Error(r(341));m.lanes|=a,u=m.alternate,u!==null&&(u.lanes|=a),Ao(m,a,e),m=null}else m=o.child;if(m!==null)m.return=o;else for(m=o;m!==null;){if(m===e){m=null;break}if(o=m.sibling,o!==null){o.return=m.return,m=o;break}m=m.return}o=m}}function ml(e,t,a,l){e=null;for(var o=t,u=!1;o!==null;){if(!u){if((o.flags&524288)!==0)u=!0;else if((o.flags&262144)!==0)break}if(o.tag===10){var m=o.alternate;if(m===null)throw Error(r(387));if(m=m.memoizedProps,m!==null){var y=o.type;Ut(o.pendingProps.value,m.value)||(e!==null?e.push(y):e=[y])}}else if(o===ae.current){if(m=o.alternate,m===null)throw Error(r(387));m.memoizedState.memoizedState!==o.memoizedState.memoizedState&&(e!==null?e.push(Ms):e=[Ms])}o=o.return}e!==null&&ko(t,e,a,l),t.flags|=262144}function Sr(e){for(e=e.firstContext;e!==null;){if(!Ut(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function On(e){kn=e,wa=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function xt(e){return sf(kn,e)}function Er(e,t){return kn===null&&On(e),sf(e,t)}function sf(e,t){var a=t._currentValue;if(t={context:t,memoizedValue:a,next:null},wa===null){if(e===null)throw Error(r(308));wa=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else wa=wa.next=t;return a}var Tx=typeof AbortController<"u"?AbortController:function(){var e=[],t=this.signal={aborted:!1,addEventListener:function(a,l){e.push(l)}};this.abort=function(){t.aborted=!0,e.forEach(function(a){return a()})}},Ax=n.unstable_scheduleCallback,kx=n.unstable_NormalPriority,at={$$typeof:Y,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Oo(){return{controller:new Tx,data:new Map,refCount:0}}function is(e){e.refCount--,e.refCount===0&&Ax(kx,function(){e.controller.abort()})}var os=null,Do=0,pl=0,hl=null;function Ox(e,t){if(os===null){var a=os=[];Do=0,pl=zc(),hl={status:"pending",value:void 0,then:function(l){a.push(l)}}}return Do++,t.then(rf,rf),t}function rf(){if(--Do===0&&os!==null){hl!==null&&(hl.status="fulfilled");var e=os;os=null,pl=0,hl=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function Dx(e,t){var a=[],l={status:"pending",value:null,reason:null,then:function(o){a.push(o)}};return e.then(function(){l.status="fulfilled",l.value=t;for(var o=0;o<a.length;o++)(0,a[o])(t)},function(o){for(l.status="rejected",l.reason=o,o=0;o<a.length;o++)(0,a[o])(void 0)}),l}var of=L.S;L.S=function(e,t){Vm=Ve(),typeof t=="object"&&t!==null&&typeof t.then=="function"&&Ox(e,t),of!==null&&of(e,t)};var Dn=N(null);function Mo(){var e=Dn.current;return e!==null?e:Ge.pooledCache}function wr(e,t){t===null?ee(Dn,Dn.current):ee(Dn,t.pool)}function cf(){var e=Mo();return e===null?null:{parent:at._currentValue,pool:e}}var gl=Error(r(460)),Ro=Error(r(474)),jr=Error(r(542)),Nr={then:function(){}};function uf(e){return e=e.status,e==="fulfilled"||e==="rejected"}function df(e,t,a){switch(a=e[a],a===void 0?e.push(t):a!==t&&(t.then(ya,ya),t=a),t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,mf(e),e;default:if(typeof t.status=="string")t.then(ya,ya);else{if(e=Ge,e!==null&&100<e.shellSuspendCounter)throw Error(r(482));e=t,e.status="pending",e.then(function(l){if(t.status==="pending"){var o=t;o.status="fulfilled",o.value=l}},function(l){if(t.status==="pending"){var o=t;o.status="rejected",o.reason=l}})}switch(t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,mf(e),e}throw Rn=t,gl}}function Mn(e){try{var t=e._init;return t(e._payload)}catch(a){throw a!==null&&typeof a=="object"&&typeof a.then=="function"?(Rn=a,gl):a}}var Rn=null;function ff(){if(Rn===null)throw Error(r(459));var e=Rn;return Rn=null,e}function mf(e){if(e===gl||e===jr)throw Error(r(483))}var vl=null,cs=0;function _r(e){var t=cs;return cs+=1,vl===null&&(vl=[]),df(vl,e,t)}function us(e,t){t=t.props.ref,e.ref=t!==void 0?t:null}function Cr(e,t){throw t.$$typeof===E?Error(r(525)):(e=Object.prototype.toString.call(t),Error(r(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e)))}function pf(e){function t(k,_){if(e){var M=k.deletions;M===null?(k.deletions=[_],k.flags|=16):M.push(_)}}function a(k,_){if(!e)return null;for(;_!==null;)t(k,_),_=_.sibling;return null}function l(k){for(var _=new Map;k!==null;)k.key!==null?_.set(k.key,k):_.set(k.index,k),k=k.sibling;return _}function o(k,_){return k=Sa(k,_),k.index=0,k.sibling=null,k}function u(k,_,M){return k.index=M,e?(M=k.alternate,M!==null?(M=M.index,M<_?(k.flags|=67108866,_):M):(k.flags|=67108866,_)):(k.flags|=1048576,_)}function m(k){return e&&k.alternate===null&&(k.flags|=67108866),k}function y(k,_,M,K){return _===null||_.tag!==6?(_=Eo(M,k.mode,K),_.return=k,_):(_=o(_,M),_.return=k,_)}function j(k,_,M,K){var ue=M.type;return ue===A?G(k,_,M.props.children,K,M.key):_!==null&&(_.elementType===ue||typeof ue=="object"&&ue!==null&&ue.$$typeof===Q&&Mn(ue)===_.type)?(_=o(_,M.props),us(_,M),_.return=k,_):(_=yr(M.type,M.key,M.props,null,k.mode,K),us(_,M),_.return=k,_)}function R(k,_,M,K){return _===null||_.tag!==4||_.stateNode.containerInfo!==M.containerInfo||_.stateNode.implementation!==M.implementation?(_=wo(M,k.mode,K),_.return=k,_):(_=o(_,M.children||[]),_.return=k,_)}function G(k,_,M,K,ue){return _===null||_.tag!==7?(_=Tn(M,k.mode,K,ue),_.return=k,_):(_=o(_,M),_.return=k,_)}function V(k,_,M){if(typeof _=="string"&&_!==""||typeof _=="number"||typeof _=="bigint")return _=Eo(""+_,k.mode,M),_.return=k,_;if(typeof _=="object"&&_!==null){switch(_.$$typeof){case w:return M=yr(_.type,_.key,_.props,null,k.mode,M),us(M,_),M.return=k,M;case C:return _=wo(_,k.mode,M),_.return=k,_;case Q:return _=Mn(_),V(k,_,M)}if(qe(_)||ze(_))return _=Tn(_,k.mode,M,null),_.return=k,_;if(typeof _.then=="function")return V(k,_r(_),M);if(_.$$typeof===Y)return V(k,Er(k,_),M);Cr(k,_)}return null}function z(k,_,M,K){var ue=_!==null?_.key:null;if(typeof M=="string"&&M!==""||typeof M=="number"||typeof M=="bigint")return ue!==null?null:y(k,_,""+M,K);if(typeof M=="object"&&M!==null){switch(M.$$typeof){case w:return M.key===ue?j(k,_,M,K):null;case C:return M.key===ue?R(k,_,M,K):null;case Q:return M=Mn(M),z(k,_,M,K)}if(qe(M)||ze(M))return ue!==null?null:G(k,_,M,K,null);if(typeof M.then=="function")return z(k,_,_r(M),K);if(M.$$typeof===Y)return z(k,_,Er(k,M),K);Cr(k,M)}return null}function U(k,_,M,K,ue){if(typeof K=="string"&&K!==""||typeof K=="number"||typeof K=="bigint")return k=k.get(M)||null,y(_,k,""+K,ue);if(typeof K=="object"&&K!==null){switch(K.$$typeof){case w:return k=k.get(K.key===null?M:K.key)||null,j(_,k,K,ue);case C:return k=k.get(K.key===null?M:K.key)||null,R(_,k,K,ue);case Q:return K=Mn(K),U(k,_,M,K,ue)}if(qe(K)||ze(K))return k=k.get(M)||null,G(_,k,K,ue,null);if(typeof K.then=="function")return U(k,_,M,_r(K),ue);if(K.$$typeof===Y)return U(k,_,M,Er(_,K),ue);Cr(_,K)}return null}function ne(k,_,M,K){for(var ue=null,ke=null,re=_,xe=_=0,_e=null;re!==null&&xe<M.length;xe++){re.index>xe?(_e=re,re=null):_e=re.sibling;var Oe=z(k,re,M[xe],K);if(Oe===null){re===null&&(re=_e);break}e&&re&&Oe.alternate===null&&t(k,re),_=u(Oe,_,xe),ke===null?ue=Oe:ke.sibling=Oe,ke=Oe,re=_e}if(xe===M.length)return a(k,re),Ce&&Ea(k,xe),ue;if(re===null){for(;xe<M.length;xe++)re=V(k,M[xe],K),re!==null&&(_=u(re,_,xe),ke===null?ue=re:ke.sibling=re,ke=re);return Ce&&Ea(k,xe),ue}for(re=l(re);xe<M.length;xe++)_e=U(re,k,xe,M[xe],K),_e!==null&&(e&&_e.alternate!==null&&re.delete(_e.key===null?xe:_e.key),_=u(_e,_,xe),ke===null?ue=_e:ke.sibling=_e,ke=_e);return e&&re.forEach(function(fn){return t(k,fn)}),Ce&&Ea(k,xe),ue}function de(k,_,M,K){if(M==null)throw Error(r(151));for(var ue=null,ke=null,re=_,xe=_=0,_e=null,Oe=M.next();re!==null&&!Oe.done;xe++,Oe=M.next()){re.index>xe?(_e=re,re=null):_e=re.sibling;var fn=z(k,re,Oe.value,K);if(fn===null){re===null&&(re=_e);break}e&&re&&fn.alternate===null&&t(k,re),_=u(fn,_,xe),ke===null?ue=fn:ke.sibling=fn,ke=fn,re=_e}if(Oe.done)return a(k,re),Ce&&Ea(k,xe),ue;if(re===null){for(;!Oe.done;xe++,Oe=M.next())Oe=V(k,Oe.value,K),Oe!==null&&(_=u(Oe,_,xe),ke===null?ue=Oe:ke.sibling=Oe,ke=Oe);return Ce&&Ea(k,xe),ue}for(re=l(re);!Oe.done;xe++,Oe=M.next())Oe=U(re,k,xe,Oe.value,K),Oe!==null&&(e&&Oe.alternate!==null&&re.delete(Oe.key===null?xe:Oe.key),_=u(Oe,_,xe),ke===null?ue=Oe:ke.sibling=Oe,ke=Oe);return e&&re.forEach(function(Ky){return t(k,Ky)}),Ce&&Ea(k,xe),ue}function Be(k,_,M,K){if(typeof M=="object"&&M!==null&&M.type===A&&M.key===null&&(M=M.props.children),typeof M=="object"&&M!==null){switch(M.$$typeof){case w:e:{for(var ue=M.key;_!==null;){if(_.key===ue){if(ue=M.type,ue===A){if(_.tag===7){a(k,_.sibling),K=o(_,M.props.children),K.return=k,k=K;break e}}else if(_.elementType===ue||typeof ue=="object"&&ue!==null&&ue.$$typeof===Q&&Mn(ue)===_.type){a(k,_.sibling),K=o(_,M.props),us(K,M),K.return=k,k=K;break e}a(k,_);break}else t(k,_);_=_.sibling}M.type===A?(K=Tn(M.props.children,k.mode,K,M.key),K.return=k,k=K):(K=yr(M.type,M.key,M.props,null,k.mode,K),us(K,M),K.return=k,k=K)}return m(k);case C:e:{for(ue=M.key;_!==null;){if(_.key===ue)if(_.tag===4&&_.stateNode.containerInfo===M.containerInfo&&_.stateNode.implementation===M.implementation){a(k,_.sibling),K=o(_,M.children||[]),K.return=k,k=K;break e}else{a(k,_);break}else t(k,_);_=_.sibling}K=wo(M,k.mode,K),K.return=k,k=K}return m(k);case Q:return M=Mn(M),Be(k,_,M,K)}if(qe(M))return ne(k,_,M,K);if(ze(M)){if(ue=ze(M),typeof ue!="function")throw Error(r(150));return M=ue.call(M),de(k,_,M,K)}if(typeof M.then=="function")return Be(k,_,_r(M),K);if(M.$$typeof===Y)return Be(k,_,Er(k,M),K);Cr(k,M)}return typeof M=="string"&&M!==""||typeof M=="number"||typeof M=="bigint"?(M=""+M,_!==null&&_.tag===6?(a(k,_.sibling),K=o(_,M),K.return=k,k=K):(a(k,_),K=Eo(M,k.mode,K),K.return=k,k=K),m(k)):a(k,_)}return function(k,_,M,K){try{cs=0;var ue=Be(k,_,M,K);return vl=null,ue}catch(re){if(re===gl||re===jr)throw re;var ke=Bt(29,re,null,k.mode);return ke.lanes=K,ke.return=k,ke}finally{}}}var zn=pf(!0),hf=pf(!1),Pa=!1;function zo(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Lo(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,callbacks:null})}function Za(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function Ja(e,t,a){var l=e.updateQueue;if(l===null)return null;if(l=l.shared,(De&2)!==0){var o=l.pending;return o===null?t.next=t:(t.next=o.next,o.next=t),l.pending=t,t=xr(e),Fd(e,null,a),t}return vr(e,l,t,a),xr(e)}function ds(e,t,a){if(t=t.updateQueue,t!==null&&(t=t.shared,(a&4194048)!==0)){var l=t.lanes;l&=e.pendingLanes,a|=l,t.lanes=a,sd(e,a)}}function Uo(e,t){var a=e.updateQueue,l=e.alternate;if(l!==null&&(l=l.updateQueue,a===l)){var o=null,u=null;if(a=a.firstBaseUpdate,a!==null){do{var m={lane:a.lane,tag:a.tag,payload:a.payload,callback:null,next:null};u===null?o=u=m:u=u.next=m,a=a.next}while(a!==null);u===null?o=u=t:u=u.next=t}else o=u=t;a={baseState:l.baseState,firstBaseUpdate:o,lastBaseUpdate:u,shared:l.shared,callbacks:l.callbacks},e.updateQueue=a;return}e=a.lastBaseUpdate,e===null?a.firstBaseUpdate=t:e.next=t,a.lastBaseUpdate=t}var Bo=!1;function fs(){if(Bo){var e=hl;if(e!==null)throw e}}function ms(e,t,a,l){Bo=!1;var o=e.updateQueue;Pa=!1;var u=o.firstBaseUpdate,m=o.lastBaseUpdate,y=o.shared.pending;if(y!==null){o.shared.pending=null;var j=y,R=j.next;j.next=null,m===null?u=R:m.next=R,m=j;var G=e.alternate;G!==null&&(G=G.updateQueue,y=G.lastBaseUpdate,y!==m&&(y===null?G.firstBaseUpdate=R:y.next=R,G.lastBaseUpdate=j))}if(u!==null){var V=o.baseState;m=0,G=R=j=null,y=u;do{var z=y.lane&-536870913,U=z!==y.lane;if(U?(Ne&z)===z:(l&z)===z){z!==0&&z===pl&&(Bo=!0),G!==null&&(G=G.next={lane:0,tag:y.tag,payload:y.payload,callback:null,next:null});e:{var ne=e,de=y;z=t;var Be=a;switch(de.tag){case 1:if(ne=de.payload,typeof ne=="function"){V=ne.call(Be,V,z);break e}V=ne;break e;case 3:ne.flags=ne.flags&-65537|128;case 0:if(ne=de.payload,z=typeof ne=="function"?ne.call(Be,V,z):ne,z==null)break e;V=b({},V,z);break e;case 2:Pa=!0}}z=y.callback,z!==null&&(e.flags|=64,U&&(e.flags|=8192),U=o.callbacks,U===null?o.callbacks=[z]:U.push(z))}else U={lane:z,tag:y.tag,payload:y.payload,callback:y.callback,next:null},G===null?(R=G=U,j=V):G=G.next=U,m|=z;if(y=y.next,y===null){if(y=o.shared.pending,y===null)break;U=y,y=U.next,U.next=null,o.lastBaseUpdate=U,o.shared.pending=null}}while(!0);G===null&&(j=V),o.baseState=j,o.firstBaseUpdate=R,o.lastBaseUpdate=G,u===null&&(o.shared.lanes=0),tn|=m,e.lanes=m,e.memoizedState=V}}function gf(e,t){if(typeof e!="function")throw Error(r(191,e));e.call(t)}function vf(e,t){var a=e.callbacks;if(a!==null)for(e.callbacks=null,e=0;e<a.length;e++)gf(a[e],t)}var xl=N(null),Tr=N(0);function xf(e,t){e=Ma,ee(Tr,e),ee(xl,t),Ma=e|t.baseLanes}function Ho(){ee(Tr,Ma),ee(xl,xl.current)}function Go(){Ma=Tr.current,I(xl),I(Tr)}var Ht=N(null),ea=null;function Fa(e){var t=e.alternate;ee(We,We.current&1),ee(Ht,e),ea===null&&(t===null||xl.current!==null||t.memoizedState!==null)&&(ea=e)}function qo(e){ee(We,We.current),ee(Ht,e),ea===null&&(ea=e)}function yf(e){e.tag===22?(ee(We,We.current),ee(Ht,e),ea===null&&(ea=e)):$a()}function $a(){ee(We,We.current),ee(Ht,Ht.current)}function Gt(e){I(Ht),ea===e&&(ea=null),I(We)}var We=N(0);function Ar(e){for(var t=e;t!==null;){if(t.tag===13){var a=t.memoizedState;if(a!==null&&(a=a.dehydrated,a===null||Qc(a)||Pc(a)))return t}else if(t.tag===19&&(t.memoizedProps.revealOrder==="forwards"||t.memoizedProps.revealOrder==="backwards"||t.memoizedProps.revealOrder==="unstable_legacy-backwards"||t.memoizedProps.revealOrder==="together")){if((t.flags&128)!==0)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var Na=0,ve=null,Le=null,nt=null,kr=!1,yl=!1,Ln=!1,Or=0,ps=0,bl=null,Mx=0;function Je(){throw Error(r(321))}function Io(e,t){if(t===null)return!1;for(var a=0;a<t.length&&a<e.length;a++)if(!Ut(e[a],t[a]))return!1;return!0}function Ko(e,t,a,l,o,u){return Na=u,ve=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,L.H=e===null||e.memoizedState===null?am:lc,Ln=!1,u=a(l,o),Ln=!1,yl&&(u=Sf(t,a,l,o)),bf(e),u}function bf(e){L.H=vs;var t=Le!==null&&Le.next!==null;if(Na=0,nt=Le=ve=null,kr=!1,ps=0,bl=null,t)throw Error(r(300));e===null||lt||(e=e.dependencies,e!==null&&Sr(e)&&(lt=!0))}function Sf(e,t,a,l){ve=e;var o=0;do{if(yl&&(bl=null),ps=0,yl=!1,25<=o)throw Error(r(301));if(o+=1,nt=Le=null,e.updateQueue!=null){var u=e.updateQueue;u.lastEffect=null,u.events=null,u.stores=null,u.memoCache!=null&&(u.memoCache.index=0)}L.H=nm,u=t(a,l)}while(yl);return u}function Rx(){var e=L.H,t=e.useState()[0];return t=typeof t.then=="function"?hs(t):t,e=e.useState()[0],(Le!==null?Le.memoizedState:null)!==e&&(ve.flags|=1024),t}function Yo(){var e=Or!==0;return Or=0,e}function Vo(e,t,a){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~a}function Xo(e){if(kr){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}kr=!1}Na=0,nt=Le=ve=null,yl=!1,ps=Or=0,bl=null}function Nt(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return nt===null?ve.memoizedState=nt=e:nt=nt.next=e,nt}function et(){if(Le===null){var e=ve.alternate;e=e!==null?e.memoizedState:null}else e=Le.next;var t=nt===null?ve.memoizedState:nt.next;if(t!==null)nt=t,Le=e;else{if(e===null)throw ve.alternate===null?Error(r(467)):Error(r(310));Le=e,e={memoizedState:Le.memoizedState,baseState:Le.baseState,baseQueue:Le.baseQueue,queue:Le.queue,next:null},nt===null?ve.memoizedState=nt=e:nt=nt.next=e}return nt}function Dr(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function hs(e){var t=ps;return ps+=1,bl===null&&(bl=[]),e=df(bl,e,t),t=ve,(nt===null?t.memoizedState:nt.next)===null&&(t=t.alternate,L.H=t===null||t.memoizedState===null?am:lc),e}function Mr(e){if(e!==null&&typeof e=="object"){if(typeof e.then=="function")return hs(e);if(e.$$typeof===Y)return xt(e)}throw Error(r(438,String(e)))}function Qo(e){var t=null,a=ve.updateQueue;if(a!==null&&(t=a.memoCache),t==null){var l=ve.alternate;l!==null&&(l=l.updateQueue,l!==null&&(l=l.memoCache,l!=null&&(t={data:l.data.map(function(o){return o.slice()}),index:0})))}if(t==null&&(t={data:[],index:0}),a===null&&(a=Dr(),ve.updateQueue=a),a.memoCache=t,a=t.data[t.index],a===void 0)for(a=t.data[t.index]=Array(e),l=0;l<e;l++)a[l]=He;return t.index++,a}function _a(e,t){return typeof t=="function"?t(e):t}function Rr(e){var t=et();return Po(t,Le,e)}function Po(e,t,a){var l=e.queue;if(l===null)throw Error(r(311));l.lastRenderedReducer=a;var o=e.baseQueue,u=l.pending;if(u!==null){if(o!==null){var m=o.next;o.next=u.next,u.next=m}t.baseQueue=o=u,l.pending=null}if(u=e.baseState,o===null)e.memoizedState=u;else{t=o.next;var y=m=null,j=null,R=t,G=!1;do{var V=R.lane&-536870913;if(V!==R.lane?(Ne&V)===V:(Na&V)===V){var z=R.revertLane;if(z===0)j!==null&&(j=j.next={lane:0,revertLane:0,gesture:null,action:R.action,hasEagerState:R.hasEagerState,eagerState:R.eagerState,next:null}),V===pl&&(G=!0);else if((Na&z)===z){R=R.next,z===pl&&(G=!0);continue}else V={lane:0,revertLane:R.revertLane,gesture:null,action:R.action,hasEagerState:R.hasEagerState,eagerState:R.eagerState,next:null},j===null?(y=j=V,m=u):j=j.next=V,ve.lanes|=z,tn|=z;V=R.action,Ln&&a(u,V),u=R.hasEagerState?R.eagerState:a(u,V)}else z={lane:V,revertLane:R.revertLane,gesture:R.gesture,action:R.action,hasEagerState:R.hasEagerState,eagerState:R.eagerState,next:null},j===null?(y=j=z,m=u):j=j.next=z,ve.lanes|=V,tn|=V;R=R.next}while(R!==null&&R!==t);if(j===null?m=u:j.next=y,!Ut(u,e.memoizedState)&&(lt=!0,G&&(a=hl,a!==null)))throw a;e.memoizedState=u,e.baseState=m,e.baseQueue=j,l.lastRenderedState=u}return o===null&&(l.lanes=0),[e.memoizedState,l.dispatch]}function Zo(e){var t=et(),a=t.queue;if(a===null)throw Error(r(311));a.lastRenderedReducer=e;var l=a.dispatch,o=a.pending,u=t.memoizedState;if(o!==null){a.pending=null;var m=o=o.next;do u=e(u,m.action),m=m.next;while(m!==o);Ut(u,t.memoizedState)||(lt=!0),t.memoizedState=u,t.baseQueue===null&&(t.baseState=u),a.lastRenderedState=u}return[u,l]}function Ef(e,t,a){var l=ve,o=et(),u=Ce;if(u){if(a===void 0)throw Error(r(407));a=a()}else a=t();var m=!Ut((Le||o).memoizedState,a);if(m&&(o.memoizedState=a,lt=!0),o=o.queue,$o(Nf.bind(null,l,o,e),[e]),o.getSnapshot!==t||m||nt!==null&&nt.memoizedState.tag&1){if(l.flags|=2048,Sl(9,{destroy:void 0},jf.bind(null,l,o,a,t),null),Ge===null)throw Error(r(349));u||(Na&127)!==0||wf(l,t,a)}return a}function wf(e,t,a){e.flags|=16384,e={getSnapshot:t,value:a},t=ve.updateQueue,t===null?(t=Dr(),ve.updateQueue=t,t.stores=[e]):(a=t.stores,a===null?t.stores=[e]:a.push(e))}function jf(e,t,a,l){t.value=a,t.getSnapshot=l,_f(t)&&Cf(e)}function Nf(e,t,a){return a(function(){_f(t)&&Cf(e)})}function _f(e){var t=e.getSnapshot;e=e.value;try{var a=t();return!Ut(e,a)}catch{return!0}}function Cf(e){var t=Cn(e,2);t!==null&&Rt(t,e,2)}function Jo(e){var t=Nt();if(typeof e=="function"){var a=e;if(e=a(),Ln){qa(!0);try{a()}finally{qa(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:_a,lastRenderedState:e},t}function Tf(e,t,a,l){return e.baseState=a,Po(e,Le,typeof l=="function"?l:_a)}function zx(e,t,a,l,o){if(Ur(e))throw Error(r(485));if(e=t.action,e!==null){var u={payload:o,action:e,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(m){u.listeners.push(m)}};L.T!==null?a(!0):u.isTransition=!1,l(u),a=t.pending,a===null?(u.next=t.pending=u,Af(t,u)):(u.next=a.next,t.pending=a.next=u)}}function Af(e,t){var a=t.action,l=t.payload,o=e.state;if(t.isTransition){var u=L.T,m={};L.T=m;try{var y=a(o,l),j=L.S;j!==null&&j(m,y),kf(e,t,y)}catch(R){Fo(e,t,R)}finally{u!==null&&m.types!==null&&(u.types=m.types),L.T=u}}else try{u=a(o,l),kf(e,t,u)}catch(R){Fo(e,t,R)}}function kf(e,t,a){a!==null&&typeof a=="object"&&typeof a.then=="function"?a.then(function(l){Of(e,t,l)},function(l){return Fo(e,t,l)}):Of(e,t,a)}function Of(e,t,a){t.status="fulfilled",t.value=a,Df(t),e.state=a,t=e.pending,t!==null&&(a=t.next,a===t?e.pending=null:(a=a.next,t.next=a,Af(e,a)))}function Fo(e,t,a){var l=e.pending;if(e.pending=null,l!==null){l=l.next;do t.status="rejected",t.reason=a,Df(t),t=t.next;while(t!==l)}e.action=null}function Df(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function Mf(e,t){return t}function Rf(e,t){if(Ce){var a=Ge.formState;if(a!==null){e:{var l=ve;if(Ce){if(Ke){t:{for(var o=Ke,u=Wt;o.nodeType!==8;){if(!u){o=null;break t}if(o=ta(o.nextSibling),o===null){o=null;break t}}u=o.data,o=u==="F!"||u==="F"?o:null}if(o){Ke=ta(o.nextSibling),l=o.data==="F!";break e}}Xa(l)}l=!1}l&&(t=a[0])}}return a=Nt(),a.memoizedState=a.baseState=t,l={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Mf,lastRenderedState:t},a.queue=l,a=Wf.bind(null,ve,l),l.dispatch=a,l=Jo(!1),u=nc.bind(null,ve,!1,l.queue),l=Nt(),o={state:t,dispatch:null,action:e,pending:null},l.queue=o,a=zx.bind(null,ve,o,u,a),o.dispatch=a,l.memoizedState=e,[t,a,!1]}function zf(e){var t=et();return Lf(t,Le,e)}function Lf(e,t,a){if(t=Po(e,t,Mf)[0],e=Rr(_a)[0],typeof t=="object"&&t!==null&&typeof t.then=="function")try{var l=hs(t)}catch(m){throw m===gl?jr:m}else l=t;t=et();var o=t.queue,u=o.dispatch;return a!==t.memoizedState&&(ve.flags|=2048,Sl(9,{destroy:void 0},Lx.bind(null,o,a),null)),[l,u,e]}function Lx(e,t){e.action=t}function Uf(e){var t=et(),a=Le;if(a!==null)return Lf(t,a,e);et(),t=t.memoizedState,a=et();var l=a.queue.dispatch;return a.memoizedState=e,[t,l,!1]}function Sl(e,t,a,l){return e={tag:e,create:a,deps:l,inst:t,next:null},t=ve.updateQueue,t===null&&(t=Dr(),ve.updateQueue=t),a=t.lastEffect,a===null?t.lastEffect=e.next=e:(l=a.next,a.next=e,e.next=l,t.lastEffect=e),e}function Bf(){return et().memoizedState}function zr(e,t,a,l){var o=Nt();ve.flags|=e,o.memoizedState=Sl(1|t,{destroy:void 0},a,l===void 0?null:l)}function Lr(e,t,a,l){var o=et();l=l===void 0?null:l;var u=o.memoizedState.inst;Le!==null&&l!==null&&Io(l,Le.memoizedState.deps)?o.memoizedState=Sl(t,u,a,l):(ve.flags|=e,o.memoizedState=Sl(1|t,u,a,l))}function Hf(e,t){zr(8390656,8,e,t)}function $o(e,t){Lr(2048,8,e,t)}function Ux(e){ve.flags|=4;var t=ve.updateQueue;if(t===null)t=Dr(),ve.updateQueue=t,t.events=[e];else{var a=t.events;a===null?t.events=[e]:a.push(e)}}function Gf(e){var t=et().memoizedState;return Ux({ref:t,nextImpl:e}),function(){if((De&2)!==0)throw Error(r(440));return t.impl.apply(void 0,arguments)}}function qf(e,t){return Lr(4,2,e,t)}function If(e,t){return Lr(4,4,e,t)}function Kf(e,t){if(typeof t=="function"){e=e();var a=t(e);return function(){typeof a=="function"?a():t(null)}}if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function Yf(e,t,a){a=a!=null?a.concat([e]):null,Lr(4,4,Kf.bind(null,t,e),a)}function Wo(){}function Vf(e,t){var a=et();t=t===void 0?null:t;var l=a.memoizedState;return t!==null&&Io(t,l[1])?l[0]:(a.memoizedState=[e,t],e)}function Xf(e,t){var a=et();t=t===void 0?null:t;var l=a.memoizedState;if(t!==null&&Io(t,l[1]))return l[0];if(l=e(),Ln){qa(!0);try{e()}finally{qa(!1)}}return a.memoizedState=[l,t],l}function ec(e,t,a){return a===void 0||(Na&1073741824)!==0&&(Ne&261930)===0?e.memoizedState=t:(e.memoizedState=a,e=Qm(),ve.lanes|=e,tn|=e,a)}function Qf(e,t,a,l){return Ut(a,t)?a:xl.current!==null?(e=ec(e,a,l),Ut(e,t)||(lt=!0),e):(Na&42)===0||(Na&1073741824)!==0&&(Ne&261930)===0?(lt=!0,e.memoizedState=a):(e=Qm(),ve.lanes|=e,tn|=e,t)}function Pf(e,t,a,l,o){var u=J.p;J.p=u!==0&&8>u?u:8;var m=L.T,y={};L.T=y,nc(e,!1,t,a);try{var j=o(),R=L.S;if(R!==null&&R(y,j),j!==null&&typeof j=="object"&&typeof j.then=="function"){var G=Dx(j,l);gs(e,t,G,Kt(e))}else gs(e,t,l,Kt(e))}catch(V){gs(e,t,{then:function(){},status:"rejected",reason:V},Kt())}finally{J.p=u,m!==null&&y.types!==null&&(m.types=y.types),L.T=m}}function Bx(){}function tc(e,t,a,l){if(e.tag!==5)throw Error(r(476));var o=Zf(e).queue;Pf(e,o,t,ie,a===null?Bx:function(){return Jf(e),a(l)})}function Zf(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:ie,baseState:ie,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:_a,lastRenderedState:ie},next:null};var a={};return t.next={memoizedState:a,baseState:a,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:_a,lastRenderedState:a},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function Jf(e){var t=Zf(e);t.next===null&&(t=e.alternate.memoizedState),gs(e,t.next.queue,{},Kt())}function ac(){return xt(Ms)}function Ff(){return et().memoizedState}function $f(){return et().memoizedState}function Hx(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var a=Kt();e=Za(a);var l=Ja(t,e,a);l!==null&&(Rt(l,t,a),ds(l,t,a)),t={cache:Oo()},e.payload=t;return}t=t.return}}function Gx(e,t,a){var l=Kt();a={lane:l,revertLane:0,gesture:null,action:a,hasEagerState:!1,eagerState:null,next:null},Ur(e)?em(t,a):(a=bo(e,t,a,l),a!==null&&(Rt(a,e,l),tm(a,t,l)))}function Wf(e,t,a){var l=Kt();gs(e,t,a,l)}function gs(e,t,a,l){var o={lane:l,revertLane:0,gesture:null,action:a,hasEagerState:!1,eagerState:null,next:null};if(Ur(e))em(t,o);else{var u=e.alternate;if(e.lanes===0&&(u===null||u.lanes===0)&&(u=t.lastRenderedReducer,u!==null))try{var m=t.lastRenderedState,y=u(m,a);if(o.hasEagerState=!0,o.eagerState=y,Ut(y,m))return vr(e,t,o,0),Ge===null&&gr(),!1}catch{}finally{}if(a=bo(e,t,o,l),a!==null)return Rt(a,e,l),tm(a,t,l),!0}return!1}function nc(e,t,a,l){if(l={lane:2,revertLane:zc(),gesture:null,action:l,hasEagerState:!1,eagerState:null,next:null},Ur(e)){if(t)throw Error(r(479))}else t=bo(e,a,l,2),t!==null&&Rt(t,e,2)}function Ur(e){var t=e.alternate;return e===ve||t!==null&&t===ve}function em(e,t){yl=kr=!0;var a=e.pending;a===null?t.next=t:(t.next=a.next,a.next=t),e.pending=t}function tm(e,t,a){if((a&4194048)!==0){var l=t.lanes;l&=e.pendingLanes,a|=l,t.lanes=a,sd(e,a)}}var vs={readContext:xt,use:Mr,useCallback:Je,useContext:Je,useEffect:Je,useImperativeHandle:Je,useLayoutEffect:Je,useInsertionEffect:Je,useMemo:Je,useReducer:Je,useRef:Je,useState:Je,useDebugValue:Je,useDeferredValue:Je,useTransition:Je,useSyncExternalStore:Je,useId:Je,useHostTransitionStatus:Je,useFormState:Je,useActionState:Je,useOptimistic:Je,useMemoCache:Je,useCacheRefresh:Je};vs.useEffectEvent=Je;var am={readContext:xt,use:Mr,useCallback:function(e,t){return Nt().memoizedState=[e,t===void 0?null:t],e},useContext:xt,useEffect:Hf,useImperativeHandle:function(e,t,a){a=a!=null?a.concat([e]):null,zr(4194308,4,Kf.bind(null,t,e),a)},useLayoutEffect:function(e,t){return zr(4194308,4,e,t)},useInsertionEffect:function(e,t){zr(4,2,e,t)},useMemo:function(e,t){var a=Nt();t=t===void 0?null:t;var l=e();if(Ln){qa(!0);try{e()}finally{qa(!1)}}return a.memoizedState=[l,t],l},useReducer:function(e,t,a){var l=Nt();if(a!==void 0){var o=a(t);if(Ln){qa(!0);try{a(t)}finally{qa(!1)}}}else o=t;return l.memoizedState=l.baseState=o,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:o},l.queue=e,e=e.dispatch=Gx.bind(null,ve,e),[l.memoizedState,e]},useRef:function(e){var t=Nt();return e={current:e},t.memoizedState=e},useState:function(e){e=Jo(e);var t=e.queue,a=Wf.bind(null,ve,t);return t.dispatch=a,[e.memoizedState,a]},useDebugValue:Wo,useDeferredValue:function(e,t){var a=Nt();return ec(a,e,t)},useTransition:function(){var e=Jo(!1);return e=Pf.bind(null,ve,e.queue,!0,!1),Nt().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,a){var l=ve,o=Nt();if(Ce){if(a===void 0)throw Error(r(407));a=a()}else{if(a=t(),Ge===null)throw Error(r(349));(Ne&127)!==0||wf(l,t,a)}o.memoizedState=a;var u={value:a,getSnapshot:t};return o.queue=u,Hf(Nf.bind(null,l,u,e),[e]),l.flags|=2048,Sl(9,{destroy:void 0},jf.bind(null,l,u,a,t),null),a},useId:function(){var e=Nt(),t=Ge.identifierPrefix;if(Ce){var a=fa,l=da;a=(l&~(1<<32-Lt(l)-1)).toString(32)+a,t="_"+t+"R_"+a,a=Or++,0<a&&(t+="H"+a.toString(32)),t+="_"}else a=Mx++,t="_"+t+"r_"+a.toString(32)+"_";return e.memoizedState=t},useHostTransitionStatus:ac,useFormState:Rf,useActionState:Rf,useOptimistic:function(e){var t=Nt();t.memoizedState=t.baseState=e;var a={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=a,t=nc.bind(null,ve,!0,a),a.dispatch=t,[e,t]},useMemoCache:Qo,useCacheRefresh:function(){return Nt().memoizedState=Hx.bind(null,ve)},useEffectEvent:function(e){var t=Nt(),a={impl:e};return t.memoizedState=a,function(){if((De&2)!==0)throw Error(r(440));return a.impl.apply(void 0,arguments)}}},lc={readContext:xt,use:Mr,useCallback:Vf,useContext:xt,useEffect:$o,useImperativeHandle:Yf,useInsertionEffect:qf,useLayoutEffect:If,useMemo:Xf,useReducer:Rr,useRef:Bf,useState:function(){return Rr(_a)},useDebugValue:Wo,useDeferredValue:function(e,t){var a=et();return Qf(a,Le.memoizedState,e,t)},useTransition:function(){var e=Rr(_a)[0],t=et().memoizedState;return[typeof e=="boolean"?e:hs(e),t]},useSyncExternalStore:Ef,useId:Ff,useHostTransitionStatus:ac,useFormState:zf,useActionState:zf,useOptimistic:function(e,t){var a=et();return Tf(a,Le,e,t)},useMemoCache:Qo,useCacheRefresh:$f};lc.useEffectEvent=Gf;var nm={readContext:xt,use:Mr,useCallback:Vf,useContext:xt,useEffect:$o,useImperativeHandle:Yf,useInsertionEffect:qf,useLayoutEffect:If,useMemo:Xf,useReducer:Zo,useRef:Bf,useState:function(){return Zo(_a)},useDebugValue:Wo,useDeferredValue:function(e,t){var a=et();return Le===null?ec(a,e,t):Qf(a,Le.memoizedState,e,t)},useTransition:function(){var e=Zo(_a)[0],t=et().memoizedState;return[typeof e=="boolean"?e:hs(e),t]},useSyncExternalStore:Ef,useId:Ff,useHostTransitionStatus:ac,useFormState:Uf,useActionState:Uf,useOptimistic:function(e,t){var a=et();return Le!==null?Tf(a,Le,e,t):(a.baseState=e,[e,a.queue.dispatch])},useMemoCache:Qo,useCacheRefresh:$f};nm.useEffectEvent=Gf;function sc(e,t,a,l){t=e.memoizedState,a=a(l,t),a=a==null?t:b({},t,a),e.memoizedState=a,e.lanes===0&&(e.updateQueue.baseState=a)}var rc={enqueueSetState:function(e,t,a){e=e._reactInternals;var l=Kt(),o=Za(l);o.payload=t,a!=null&&(o.callback=a),t=Ja(e,o,l),t!==null&&(Rt(t,e,l),ds(t,e,l))},enqueueReplaceState:function(e,t,a){e=e._reactInternals;var l=Kt(),o=Za(l);o.tag=1,o.payload=t,a!=null&&(o.callback=a),t=Ja(e,o,l),t!==null&&(Rt(t,e,l),ds(t,e,l))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var a=Kt(),l=Za(a);l.tag=2,t!=null&&(l.callback=t),t=Ja(e,l,a),t!==null&&(Rt(t,e,a),ds(t,e,a))}};function lm(e,t,a,l,o,u,m){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(l,u,m):t.prototype&&t.prototype.isPureReactComponent?!ns(a,l)||!ns(o,u):!0}function sm(e,t,a,l){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(a,l),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(a,l),t.state!==e&&rc.enqueueReplaceState(t,t.state,null)}function Un(e,t){var a=t;if("ref"in t){a={};for(var l in t)l!=="ref"&&(a[l]=t[l])}if(e=e.defaultProps){a===t&&(a=b({},a));for(var o in e)a[o]===void 0&&(a[o]=e[o])}return a}function rm(e){hr(e)}function im(e){console.error(e)}function om(e){hr(e)}function Br(e,t){try{var a=e.onUncaughtError;a(t.value,{componentStack:t.stack})}catch(l){setTimeout(function(){throw l})}}function cm(e,t,a){try{var l=e.onCaughtError;l(a.value,{componentStack:a.stack,errorBoundary:t.tag===1?t.stateNode:null})}catch(o){setTimeout(function(){throw o})}}function ic(e,t,a){return a=Za(a),a.tag=3,a.payload={element:null},a.callback=function(){Br(e,t)},a}function um(e){return e=Za(e),e.tag=3,e}function dm(e,t,a,l){var o=a.type.getDerivedStateFromError;if(typeof o=="function"){var u=l.value;e.payload=function(){return o(u)},e.callback=function(){cm(t,a,l)}}var m=a.stateNode;m!==null&&typeof m.componentDidCatch=="function"&&(e.callback=function(){cm(t,a,l),typeof o!="function"&&(an===null?an=new Set([this]):an.add(this));var y=l.stack;this.componentDidCatch(l.value,{componentStack:y!==null?y:""})})}function qx(e,t,a,l,o){if(a.flags|=32768,l!==null&&typeof l=="object"&&typeof l.then=="function"){if(t=a.alternate,t!==null&&ml(t,a,o,!0),a=Ht.current,a!==null){switch(a.tag){case 31:case 13:return ea===null?Jr():a.alternate===null&&Fe===0&&(Fe=3),a.flags&=-257,a.flags|=65536,a.lanes=o,l===Nr?a.flags|=16384:(t=a.updateQueue,t===null?a.updateQueue=new Set([l]):t.add(l),Dc(e,l,o)),!1;case 22:return a.flags|=65536,l===Nr?a.flags|=16384:(t=a.updateQueue,t===null?(t={transitions:null,markerInstances:null,retryQueue:new Set([l])},a.updateQueue=t):(a=t.retryQueue,a===null?t.retryQueue=new Set([l]):a.add(l)),Dc(e,l,o)),!1}throw Error(r(435,a.tag))}return Dc(e,l,o),Jr(),!1}if(Ce)return t=Ht.current,t!==null?((t.flags&65536)===0&&(t.flags|=256),t.flags|=65536,t.lanes=o,l!==_o&&(e=Error(r(422),{cause:l}),rs(Jt(e,a)))):(l!==_o&&(t=Error(r(423),{cause:l}),rs(Jt(t,a))),e=e.current.alternate,e.flags|=65536,o&=-o,e.lanes|=o,l=Jt(l,a),o=ic(e.stateNode,l,o),Uo(e,o),Fe!==4&&(Fe=2)),!1;var u=Error(r(520),{cause:l});if(u=Jt(u,a),Ns===null?Ns=[u]:Ns.push(u),Fe!==4&&(Fe=2),t===null)return!0;l=Jt(l,a),a=t;do{switch(a.tag){case 3:return a.flags|=65536,e=o&-o,a.lanes|=e,e=ic(a.stateNode,l,e),Uo(a,e),!1;case 1:if(t=a.type,u=a.stateNode,(a.flags&128)===0&&(typeof t.getDerivedStateFromError=="function"||u!==null&&typeof u.componentDidCatch=="function"&&(an===null||!an.has(u))))return a.flags|=65536,o&=-o,a.lanes|=o,o=um(o),dm(o,e,a,l),Uo(a,o),!1}a=a.return}while(a!==null);return!1}var oc=Error(r(461)),lt=!1;function yt(e,t,a,l){t.child=e===null?hf(t,null,a,l):zn(t,e.child,a,l)}function fm(e,t,a,l,o){a=a.render;var u=t.ref;if("ref"in l){var m={};for(var y in l)y!=="ref"&&(m[y]=l[y])}else m=l;return On(t),l=Ko(e,t,a,m,u,o),y=Yo(),e!==null&&!lt?(Vo(e,t,o),Ca(e,t,o)):(Ce&&y&&jo(t),t.flags|=1,yt(e,t,l,o),t.child)}function mm(e,t,a,l,o){if(e===null){var u=a.type;return typeof u=="function"&&!So(u)&&u.defaultProps===void 0&&a.compare===null?(t.tag=15,t.type=u,pm(e,t,u,l,o)):(e=yr(a.type,null,l,t,t.mode,o),e.ref=t.ref,e.return=t,t.child=e)}if(u=e.child,!gc(e,o)){var m=u.memoizedProps;if(a=a.compare,a=a!==null?a:ns,a(m,l)&&e.ref===t.ref)return Ca(e,t,o)}return t.flags|=1,e=Sa(u,l),e.ref=t.ref,e.return=t,t.child=e}function pm(e,t,a,l,o){if(e!==null){var u=e.memoizedProps;if(ns(u,l)&&e.ref===t.ref)if(lt=!1,t.pendingProps=l=u,gc(e,o))(e.flags&131072)!==0&&(lt=!0);else return t.lanes=e.lanes,Ca(e,t,o)}return cc(e,t,a,l,o)}function hm(e,t,a,l){var o=l.children,u=e!==null?e.memoizedState:null;if(e===null&&t.stateNode===null&&(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),l.mode==="hidden"){if((t.flags&128)!==0){if(u=u!==null?u.baseLanes|a:a,e!==null){for(l=t.child=e.child,o=0;l!==null;)o=o|l.lanes|l.childLanes,l=l.sibling;l=o&~u}else l=0,t.child=null;return gm(e,t,u,a,l)}if((a&536870912)!==0)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&wr(t,u!==null?u.cachePool:null),u!==null?xf(t,u):Ho(),yf(t);else return l=t.lanes=536870912,gm(e,t,u!==null?u.baseLanes|a:a,a,l)}else u!==null?(wr(t,u.cachePool),xf(t,u),$a(),t.memoizedState=null):(e!==null&&wr(t,null),Ho(),$a());return yt(e,t,o,a),t.child}function xs(e,t){return e!==null&&e.tag===22||t.stateNode!==null||(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function gm(e,t,a,l,o){var u=Mo();return u=u===null?null:{parent:at._currentValue,pool:u},t.memoizedState={baseLanes:a,cachePool:u},e!==null&&wr(t,null),Ho(),yf(t),e!==null&&ml(e,t,l,!0),t.childLanes=o,null}function Hr(e,t){return t=qr({mode:t.mode,children:t.children},e.mode),t.ref=e.ref,e.child=t,t.return=e,t}function vm(e,t,a){return zn(t,e.child,null,a),e=Hr(t,t.pendingProps),e.flags|=2,Gt(t),t.memoizedState=null,e}function Ix(e,t,a){var l=t.pendingProps,o=(t.flags&128)!==0;if(t.flags&=-129,e===null){if(Ce){if(l.mode==="hidden")return e=Hr(t,l),t.lanes=536870912,xs(null,e);if(qo(t),(e=Ke)?(e=Ap(e,Wt),e=e!==null&&e.data==="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:Ya!==null?{id:da,overflow:fa}:null,retryLane:536870912,hydrationErrors:null},a=Wd(e),a.return=t,t.child=a,vt=t,Ke=null)):e=null,e===null)throw Xa(t);return t.lanes=536870912,null}return Hr(t,l)}var u=e.memoizedState;if(u!==null){var m=u.dehydrated;if(qo(t),o)if(t.flags&256)t.flags&=-257,t=vm(e,t,a);else if(t.memoizedState!==null)t.child=e.child,t.flags|=128,t=null;else throw Error(r(558));else if(lt||ml(e,t,a,!1),o=(a&e.childLanes)!==0,lt||o){if(l=Ge,l!==null&&(m=rd(l,a),m!==0&&m!==u.retryLane))throw u.retryLane=m,Cn(e,m),Rt(l,e,m),oc;Jr(),t=vm(e,t,a)}else e=u.treeContext,Ke=ta(m.nextSibling),vt=t,Ce=!0,Va=null,Wt=!1,e!==null&&af(t,e),t=Hr(t,l),t.flags|=4096;return t}return e=Sa(e.child,{mode:l.mode,children:l.children}),e.ref=t.ref,t.child=e,e.return=t,e}function Gr(e,t){var a=t.ref;if(a===null)e!==null&&e.ref!==null&&(t.flags|=4194816);else{if(typeof a!="function"&&typeof a!="object")throw Error(r(284));(e===null||e.ref!==a)&&(t.flags|=4194816)}}function cc(e,t,a,l,o){return On(t),a=Ko(e,t,a,l,void 0,o),l=Yo(),e!==null&&!lt?(Vo(e,t,o),Ca(e,t,o)):(Ce&&l&&jo(t),t.flags|=1,yt(e,t,a,o),t.child)}function xm(e,t,a,l,o,u){return On(t),t.updateQueue=null,a=Sf(t,l,a,o),bf(e),l=Yo(),e!==null&&!lt?(Vo(e,t,u),Ca(e,t,u)):(Ce&&l&&jo(t),t.flags|=1,yt(e,t,a,u),t.child)}function ym(e,t,a,l,o){if(On(t),t.stateNode===null){var u=cl,m=a.contextType;typeof m=="object"&&m!==null&&(u=xt(m)),u=new a(l,u),t.memoizedState=u.state!==null&&u.state!==void 0?u.state:null,u.updater=rc,t.stateNode=u,u._reactInternals=t,u=t.stateNode,u.props=l,u.state=t.memoizedState,u.refs={},zo(t),m=a.contextType,u.context=typeof m=="object"&&m!==null?xt(m):cl,u.state=t.memoizedState,m=a.getDerivedStateFromProps,typeof m=="function"&&(sc(t,a,m,l),u.state=t.memoizedState),typeof a.getDerivedStateFromProps=="function"||typeof u.getSnapshotBeforeUpdate=="function"||typeof u.UNSAFE_componentWillMount!="function"&&typeof u.componentWillMount!="function"||(m=u.state,typeof u.componentWillMount=="function"&&u.componentWillMount(),typeof u.UNSAFE_componentWillMount=="function"&&u.UNSAFE_componentWillMount(),m!==u.state&&rc.enqueueReplaceState(u,u.state,null),ms(t,l,u,o),fs(),u.state=t.memoizedState),typeof u.componentDidMount=="function"&&(t.flags|=4194308),l=!0}else if(e===null){u=t.stateNode;var y=t.memoizedProps,j=Un(a,y);u.props=j;var R=u.context,G=a.contextType;m=cl,typeof G=="object"&&G!==null&&(m=xt(G));var V=a.getDerivedStateFromProps;G=typeof V=="function"||typeof u.getSnapshotBeforeUpdate=="function",y=t.pendingProps!==y,G||typeof u.UNSAFE_componentWillReceiveProps!="function"&&typeof u.componentWillReceiveProps!="function"||(y||R!==m)&&sm(t,u,l,m),Pa=!1;var z=t.memoizedState;u.state=z,ms(t,l,u,o),fs(),R=t.memoizedState,y||z!==R||Pa?(typeof V=="function"&&(sc(t,a,V,l),R=t.memoizedState),(j=Pa||lm(t,a,j,l,z,R,m))?(G||typeof u.UNSAFE_componentWillMount!="function"&&typeof u.componentWillMount!="function"||(typeof u.componentWillMount=="function"&&u.componentWillMount(),typeof u.UNSAFE_componentWillMount=="function"&&u.UNSAFE_componentWillMount()),typeof u.componentDidMount=="function"&&(t.flags|=4194308)):(typeof u.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=l,t.memoizedState=R),u.props=l,u.state=R,u.context=m,l=j):(typeof u.componentDidMount=="function"&&(t.flags|=4194308),l=!1)}else{u=t.stateNode,Lo(e,t),m=t.memoizedProps,G=Un(a,m),u.props=G,V=t.pendingProps,z=u.context,R=a.contextType,j=cl,typeof R=="object"&&R!==null&&(j=xt(R)),y=a.getDerivedStateFromProps,(R=typeof y=="function"||typeof u.getSnapshotBeforeUpdate=="function")||typeof u.UNSAFE_componentWillReceiveProps!="function"&&typeof u.componentWillReceiveProps!="function"||(m!==V||z!==j)&&sm(t,u,l,j),Pa=!1,z=t.memoizedState,u.state=z,ms(t,l,u,o),fs();var U=t.memoizedState;m!==V||z!==U||Pa||e!==null&&e.dependencies!==null&&Sr(e.dependencies)?(typeof y=="function"&&(sc(t,a,y,l),U=t.memoizedState),(G=Pa||lm(t,a,G,l,z,U,j)||e!==null&&e.dependencies!==null&&Sr(e.dependencies))?(R||typeof u.UNSAFE_componentWillUpdate!="function"&&typeof u.componentWillUpdate!="function"||(typeof u.componentWillUpdate=="function"&&u.componentWillUpdate(l,U,j),typeof u.UNSAFE_componentWillUpdate=="function"&&u.UNSAFE_componentWillUpdate(l,U,j)),typeof u.componentDidUpdate=="function"&&(t.flags|=4),typeof u.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof u.componentDidUpdate!="function"||m===e.memoizedProps&&z===e.memoizedState||(t.flags|=4),typeof u.getSnapshotBeforeUpdate!="function"||m===e.memoizedProps&&z===e.memoizedState||(t.flags|=1024),t.memoizedProps=l,t.memoizedState=U),u.props=l,u.state=U,u.context=j,l=G):(typeof u.componentDidUpdate!="function"||m===e.memoizedProps&&z===e.memoizedState||(t.flags|=4),typeof u.getSnapshotBeforeUpdate!="function"||m===e.memoizedProps&&z===e.memoizedState||(t.flags|=1024),l=!1)}return u=l,Gr(e,t),l=(t.flags&128)!==0,u||l?(u=t.stateNode,a=l&&typeof a.getDerivedStateFromError!="function"?null:u.render(),t.flags|=1,e!==null&&l?(t.child=zn(t,e.child,null,o),t.child=zn(t,null,a,o)):yt(e,t,a,o),t.memoizedState=u.state,e=t.child):e=Ca(e,t,o),e}function bm(e,t,a,l){return An(),t.flags|=256,yt(e,t,a,l),t.child}var uc={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function dc(e){return{baseLanes:e,cachePool:cf()}}function fc(e,t,a){return e=e!==null?e.childLanes&~a:0,t&&(e|=It),e}function Sm(e,t,a){var l=t.pendingProps,o=!1,u=(t.flags&128)!==0,m;if((m=u)||(m=e!==null&&e.memoizedState===null?!1:(We.current&2)!==0),m&&(o=!0,t.flags&=-129),m=(t.flags&32)!==0,t.flags&=-33,e===null){if(Ce){if(o?Fa(t):$a(),(e=Ke)?(e=Ap(e,Wt),e=e!==null&&e.data!=="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:Ya!==null?{id:da,overflow:fa}:null,retryLane:536870912,hydrationErrors:null},a=Wd(e),a.return=t,t.child=a,vt=t,Ke=null)):e=null,e===null)throw Xa(t);return Pc(e)?t.lanes=32:t.lanes=536870912,null}var y=l.children;return l=l.fallback,o?($a(),o=t.mode,y=qr({mode:"hidden",children:y},o),l=Tn(l,o,a,null),y.return=t,l.return=t,y.sibling=l,t.child=y,l=t.child,l.memoizedState=dc(a),l.childLanes=fc(e,m,a),t.memoizedState=uc,xs(null,l)):(Fa(t),mc(t,y))}var j=e.memoizedState;if(j!==null&&(y=j.dehydrated,y!==null)){if(u)t.flags&256?(Fa(t),t.flags&=-257,t=pc(e,t,a)):t.memoizedState!==null?($a(),t.child=e.child,t.flags|=128,t=null):($a(),y=l.fallback,o=t.mode,l=qr({mode:"visible",children:l.children},o),y=Tn(y,o,a,null),y.flags|=2,l.return=t,y.return=t,l.sibling=y,t.child=l,zn(t,e.child,null,a),l=t.child,l.memoizedState=dc(a),l.childLanes=fc(e,m,a),t.memoizedState=uc,t=xs(null,l));else if(Fa(t),Pc(y)){if(m=y.nextSibling&&y.nextSibling.dataset,m)var R=m.dgst;m=R,l=Error(r(419)),l.stack="",l.digest=m,rs({value:l,source:null,stack:null}),t=pc(e,t,a)}else if(lt||ml(e,t,a,!1),m=(a&e.childLanes)!==0,lt||m){if(m=Ge,m!==null&&(l=rd(m,a),l!==0&&l!==j.retryLane))throw j.retryLane=l,Cn(e,l),Rt(m,e,l),oc;Qc(y)||Jr(),t=pc(e,t,a)}else Qc(y)?(t.flags|=192,t.child=e.child,t=null):(e=j.treeContext,Ke=ta(y.nextSibling),vt=t,Ce=!0,Va=null,Wt=!1,e!==null&&af(t,e),t=mc(t,l.children),t.flags|=4096);return t}return o?($a(),y=l.fallback,o=t.mode,j=e.child,R=j.sibling,l=Sa(j,{mode:"hidden",children:l.children}),l.subtreeFlags=j.subtreeFlags&65011712,R!==null?y=Sa(R,y):(y=Tn(y,o,a,null),y.flags|=2),y.return=t,l.return=t,l.sibling=y,t.child=l,xs(null,l),l=t.child,y=e.child.memoizedState,y===null?y=dc(a):(o=y.cachePool,o!==null?(j=at._currentValue,o=o.parent!==j?{parent:j,pool:j}:o):o=cf(),y={baseLanes:y.baseLanes|a,cachePool:o}),l.memoizedState=y,l.childLanes=fc(e,m,a),t.memoizedState=uc,xs(e.child,l)):(Fa(t),a=e.child,e=a.sibling,a=Sa(a,{mode:"visible",children:l.children}),a.return=t,a.sibling=null,e!==null&&(m=t.deletions,m===null?(t.deletions=[e],t.flags|=16):m.push(e)),t.child=a,t.memoizedState=null,a)}function mc(e,t){return t=qr({mode:"visible",children:t},e.mode),t.return=e,e.child=t}function qr(e,t){return e=Bt(22,e,null,t),e.lanes=0,e}function pc(e,t,a){return zn(t,e.child,null,a),e=mc(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function Em(e,t,a){e.lanes|=t;var l=e.alternate;l!==null&&(l.lanes|=t),Ao(e.return,t,a)}function hc(e,t,a,l,o,u){var m=e.memoizedState;m===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:l,tail:a,tailMode:o,treeForkCount:u}:(m.isBackwards=t,m.rendering=null,m.renderingStartTime=0,m.last=l,m.tail=a,m.tailMode=o,m.treeForkCount=u)}function wm(e,t,a){var l=t.pendingProps,o=l.revealOrder,u=l.tail;l=l.children;var m=We.current,y=(m&2)!==0;if(y?(m=m&1|2,t.flags|=128):m&=1,ee(We,m),yt(e,t,l,a),l=Ce?ss:0,!y&&e!==null&&(e.flags&128)!==0)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&Em(e,a,t);else if(e.tag===19)Em(e,a,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;e.sibling===null;){if(e.return===null||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}switch(o){case"forwards":for(a=t.child,o=null;a!==null;)e=a.alternate,e!==null&&Ar(e)===null&&(o=a),a=a.sibling;a=o,a===null?(o=t.child,t.child=null):(o=a.sibling,a.sibling=null),hc(t,!1,o,a,u,l);break;case"backwards":case"unstable_legacy-backwards":for(a=null,o=t.child,t.child=null;o!==null;){if(e=o.alternate,e!==null&&Ar(e)===null){t.child=o;break}e=o.sibling,o.sibling=a,a=o,o=e}hc(t,!0,a,null,u,l);break;case"together":hc(t,!1,null,null,void 0,l);break;default:t.memoizedState=null}return t.child}function Ca(e,t,a){if(e!==null&&(t.dependencies=e.dependencies),tn|=t.lanes,(a&t.childLanes)===0)if(e!==null){if(ml(e,t,a,!1),(a&t.childLanes)===0)return null}else return null;if(e!==null&&t.child!==e.child)throw Error(r(153));if(t.child!==null){for(e=t.child,a=Sa(e,e.pendingProps),t.child=a,a.return=t;e.sibling!==null;)e=e.sibling,a=a.sibling=Sa(e,e.pendingProps),a.return=t;a.sibling=null}return t.child}function gc(e,t){return(e.lanes&t)!==0?!0:(e=e.dependencies,!!(e!==null&&Sr(e)))}function Kx(e,t,a){switch(t.tag){case 3:Se(t,t.stateNode.containerInfo),Qa(t,at,e.memoizedState.cache),An();break;case 27:case 5:Ie(t);break;case 4:Se(t,t.stateNode.containerInfo);break;case 10:Qa(t,t.type,t.memoizedProps.value);break;case 31:if(t.memoizedState!==null)return t.flags|=128,qo(t),null;break;case 13:var l=t.memoizedState;if(l!==null)return l.dehydrated!==null?(Fa(t),t.flags|=128,null):(a&t.child.childLanes)!==0?Sm(e,t,a):(Fa(t),e=Ca(e,t,a),e!==null?e.sibling:null);Fa(t);break;case 19:var o=(e.flags&128)!==0;if(l=(a&t.childLanes)!==0,l||(ml(e,t,a,!1),l=(a&t.childLanes)!==0),o){if(l)return wm(e,t,a);t.flags|=128}if(o=t.memoizedState,o!==null&&(o.rendering=null,o.tail=null,o.lastEffect=null),ee(We,We.current),l)break;return null;case 22:return t.lanes=0,hm(e,t,a,t.pendingProps);case 24:Qa(t,at,e.memoizedState.cache)}return Ca(e,t,a)}function jm(e,t,a){if(e!==null)if(e.memoizedProps!==t.pendingProps)lt=!0;else{if(!gc(e,a)&&(t.flags&128)===0)return lt=!1,Kx(e,t,a);lt=(e.flags&131072)!==0}else lt=!1,Ce&&(t.flags&1048576)!==0&&tf(t,ss,t.index);switch(t.lanes=0,t.tag){case 16:e:{var l=t.pendingProps;if(e=Mn(t.elementType),t.type=e,typeof e=="function")So(e)?(l=Un(e,l),t.tag=1,t=ym(null,t,e,l,a)):(t.tag=0,t=cc(null,t,e,l,a));else{if(e!=null){var o=e.$$typeof;if(o===P){t.tag=11,t=fm(null,t,e,l,a);break e}else if(o===H){t.tag=14,t=mm(null,t,e,l,a);break e}}throw t=Te(e)||e,Error(r(306,t,""))}}return t;case 0:return cc(e,t,t.type,t.pendingProps,a);case 1:return l=t.type,o=Un(l,t.pendingProps),ym(e,t,l,o,a);case 3:e:{if(Se(t,t.stateNode.containerInfo),e===null)throw Error(r(387));l=t.pendingProps;var u=t.memoizedState;o=u.element,Lo(e,t),ms(t,l,null,a);var m=t.memoizedState;if(l=m.cache,Qa(t,at,l),l!==u.cache&&ko(t,[at],a,!0),fs(),l=m.element,u.isDehydrated)if(u={element:l,isDehydrated:!1,cache:m.cache},t.updateQueue.baseState=u,t.memoizedState=u,t.flags&256){t=bm(e,t,l,a);break e}else if(l!==o){o=Jt(Error(r(424)),t),rs(o),t=bm(e,t,l,a);break e}else{switch(e=t.stateNode.containerInfo,e.nodeType){case 9:e=e.body;break;default:e=e.nodeName==="HTML"?e.ownerDocument.body:e}for(Ke=ta(e.firstChild),vt=t,Ce=!0,Va=null,Wt=!0,a=hf(t,null,l,a),t.child=a;a;)a.flags=a.flags&-3|4096,a=a.sibling}else{if(An(),l===o){t=Ca(e,t,a);break e}yt(e,t,l,a)}t=t.child}return t;case 26:return Gr(e,t),e===null?(a=zp(t.type,null,t.pendingProps,null))?t.memoizedState=a:Ce||(a=t.type,e=t.pendingProps,l=ni(q.current).createElement(a),l[gt]=t,l[Tt]=e,bt(l,a,e),ft(l),t.stateNode=l):t.memoizedState=zp(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return Ie(t),e===null&&Ce&&(l=t.stateNode=Dp(t.type,t.pendingProps,q.current),vt=t,Wt=!0,o=Ke,rn(t.type)?(Zc=o,Ke=ta(l.firstChild)):Ke=o),yt(e,t,t.pendingProps.children,a),Gr(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&Ce&&((o=l=Ke)&&(l=yy(l,t.type,t.pendingProps,Wt),l!==null?(t.stateNode=l,vt=t,Ke=ta(l.firstChild),Wt=!1,o=!0):o=!1),o||Xa(t)),Ie(t),o=t.type,u=t.pendingProps,m=e!==null?e.memoizedProps:null,l=u.children,Yc(o,u)?l=null:m!==null&&Yc(o,m)&&(t.flags|=32),t.memoizedState!==null&&(o=Ko(e,t,Rx,null,null,a),Ms._currentValue=o),Gr(e,t),yt(e,t,l,a),t.child;case 6:return e===null&&Ce&&((e=a=Ke)&&(a=by(a,t.pendingProps,Wt),a!==null?(t.stateNode=a,vt=t,Ke=null,e=!0):e=!1),e||Xa(t)),null;case 13:return Sm(e,t,a);case 4:return Se(t,t.stateNode.containerInfo),l=t.pendingProps,e===null?t.child=zn(t,null,l,a):yt(e,t,l,a),t.child;case 11:return fm(e,t,t.type,t.pendingProps,a);case 7:return yt(e,t,t.pendingProps,a),t.child;case 8:return yt(e,t,t.pendingProps.children,a),t.child;case 12:return yt(e,t,t.pendingProps.children,a),t.child;case 10:return l=t.pendingProps,Qa(t,t.type,l.value),yt(e,t,l.children,a),t.child;case 9:return o=t.type._context,l=t.pendingProps.children,On(t),o=xt(o),l=l(o),t.flags|=1,yt(e,t,l,a),t.child;case 14:return mm(e,t,t.type,t.pendingProps,a);case 15:return pm(e,t,t.type,t.pendingProps,a);case 19:return wm(e,t,a);case 31:return Ix(e,t,a);case 22:return hm(e,t,a,t.pendingProps);case 24:return On(t),l=xt(at),e===null?(o=Mo(),o===null&&(o=Ge,u=Oo(),o.pooledCache=u,u.refCount++,u!==null&&(o.pooledCacheLanes|=a),o=u),t.memoizedState={parent:l,cache:o},zo(t),Qa(t,at,o)):((e.lanes&a)!==0&&(Lo(e,t),ms(t,null,null,a),fs()),o=e.memoizedState,u=t.memoizedState,o.parent!==l?(o={parent:l,cache:l},t.memoizedState=o,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=o),Qa(t,at,l)):(l=u.cache,Qa(t,at,l),l!==o.cache&&ko(t,[at],a,!0))),yt(e,t,t.pendingProps.children,a),t.child;case 29:throw t.pendingProps}throw Error(r(156,t.tag))}function Ta(e){e.flags|=4}function vc(e,t,a,l,o){if((t=(e.mode&32)!==0)&&(t=!1),t){if(e.flags|=16777216,(o&335544128)===o)if(e.stateNode.complete)e.flags|=8192;else if(Fm())e.flags|=8192;else throw Rn=Nr,Ro}else e.flags&=-16777217}function Nm(e,t){if(t.type!=="stylesheet"||(t.state.loading&4)!==0)e.flags&=-16777217;else if(e.flags|=16777216,!Gp(t))if(Fm())e.flags|=8192;else throw Rn=Nr,Ro}function Ir(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag!==22?nd():536870912,e.lanes|=t,Nl|=t)}function ys(e,t){if(!Ce)switch(e.tailMode){case"hidden":t=e.tail;for(var a=null;t!==null;)t.alternate!==null&&(a=t),t=t.sibling;a===null?e.tail=null:a.sibling=null;break;case"collapsed":a=e.tail;for(var l=null;a!==null;)a.alternate!==null&&(l=a),a=a.sibling;l===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:l.sibling=null}}function Ye(e){var t=e.alternate!==null&&e.alternate.child===e.child,a=0,l=0;if(t)for(var o=e.child;o!==null;)a|=o.lanes|o.childLanes,l|=o.subtreeFlags&65011712,l|=o.flags&65011712,o.return=e,o=o.sibling;else for(o=e.child;o!==null;)a|=o.lanes|o.childLanes,l|=o.subtreeFlags,l|=o.flags,o.return=e,o=o.sibling;return e.subtreeFlags|=l,e.childLanes=a,t}function Yx(e,t,a){var l=t.pendingProps;switch(No(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Ye(t),null;case 1:return Ye(t),null;case 3:return a=t.stateNode,l=null,e!==null&&(l=e.memoizedState.cache),t.memoizedState.cache!==l&&(t.flags|=2048),ja(at),oe(),a.pendingContext&&(a.context=a.pendingContext,a.pendingContext=null),(e===null||e.child===null)&&(fl(t)?Ta(t):e===null||e.memoizedState.isDehydrated&&(t.flags&256)===0||(t.flags|=1024,Co())),Ye(t),null;case 26:var o=t.type,u=t.memoizedState;return e===null?(Ta(t),u!==null?(Ye(t),Nm(t,u)):(Ye(t),vc(t,o,null,l,a))):u?u!==e.memoizedState?(Ta(t),Ye(t),Nm(t,u)):(Ye(t),t.flags&=-16777217):(e=e.memoizedProps,e!==l&&Ta(t),Ye(t),vc(t,o,e,l,a)),null;case 27:if(je(t),a=q.current,o=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==l&&Ta(t);else{if(!l){if(t.stateNode===null)throw Error(r(166));return Ye(t),null}e=D.current,fl(t)?nf(t):(e=Dp(o,l,a),t.stateNode=e,Ta(t))}return Ye(t),null;case 5:if(je(t),o=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==l&&Ta(t);else{if(!l){if(t.stateNode===null)throw Error(r(166));return Ye(t),null}if(u=D.current,fl(t))nf(t);else{var m=ni(q.current);switch(u){case 1:u=m.createElementNS("http://www.w3.org/2000/svg",o);break;case 2:u=m.createElementNS("http://www.w3.org/1998/Math/MathML",o);break;default:switch(o){case"svg":u=m.createElementNS("http://www.w3.org/2000/svg",o);break;case"math":u=m.createElementNS("http://www.w3.org/1998/Math/MathML",o);break;case"script":u=m.createElement("div"),u.innerHTML="<script><\/script>",u=u.removeChild(u.firstChild);break;case"select":u=typeof l.is=="string"?m.createElement("select",{is:l.is}):m.createElement("select"),l.multiple?u.multiple=!0:l.size&&(u.size=l.size);break;default:u=typeof l.is=="string"?m.createElement(o,{is:l.is}):m.createElement(o)}}u[gt]=t,u[Tt]=l;e:for(m=t.child;m!==null;){if(m.tag===5||m.tag===6)u.appendChild(m.stateNode);else if(m.tag!==4&&m.tag!==27&&m.child!==null){m.child.return=m,m=m.child;continue}if(m===t)break e;for(;m.sibling===null;){if(m.return===null||m.return===t)break e;m=m.return}m.sibling.return=m.return,m=m.sibling}t.stateNode=u;e:switch(bt(u,o,l),o){case"button":case"input":case"select":case"textarea":l=!!l.autoFocus;break e;case"img":l=!0;break e;default:l=!1}l&&Ta(t)}}return Ye(t),vc(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,a),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==l&&Ta(t);else{if(typeof l!="string"&&t.stateNode===null)throw Error(r(166));if(e=q.current,fl(t)){if(e=t.stateNode,a=t.memoizedProps,l=null,o=vt,o!==null)switch(o.tag){case 27:case 5:l=o.memoizedProps}e[gt]=t,e=!!(e.nodeValue===a||l!==null&&l.suppressHydrationWarning===!0||Sp(e.nodeValue,a)),e||Xa(t,!0)}else e=ni(e).createTextNode(l),e[gt]=t,t.stateNode=e}return Ye(t),null;case 31:if(a=t.memoizedState,e===null||e.memoizedState!==null){if(l=fl(t),a!==null){if(e===null){if(!l)throw Error(r(318));if(e=t.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(r(557));e[gt]=t}else An(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;Ye(t),e=!1}else a=Co(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=a),e=!0;if(!e)return t.flags&256?(Gt(t),t):(Gt(t),null);if((t.flags&128)!==0)throw Error(r(558))}return Ye(t),null;case 13:if(l=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(o=fl(t),l!==null&&l.dehydrated!==null){if(e===null){if(!o)throw Error(r(318));if(o=t.memoizedState,o=o!==null?o.dehydrated:null,!o)throw Error(r(317));o[gt]=t}else An(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;Ye(t),o=!1}else o=Co(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=o),o=!0;if(!o)return t.flags&256?(Gt(t),t):(Gt(t),null)}return Gt(t),(t.flags&128)!==0?(t.lanes=a,t):(a=l!==null,e=e!==null&&e.memoizedState!==null,a&&(l=t.child,o=null,l.alternate!==null&&l.alternate.memoizedState!==null&&l.alternate.memoizedState.cachePool!==null&&(o=l.alternate.memoizedState.cachePool.pool),u=null,l.memoizedState!==null&&l.memoizedState.cachePool!==null&&(u=l.memoizedState.cachePool.pool),u!==o&&(l.flags|=2048)),a!==e&&a&&(t.child.flags|=8192),Ir(t,t.updateQueue),Ye(t),null);case 4:return oe(),e===null&&Hc(t.stateNode.containerInfo),Ye(t),null;case 10:return ja(t.type),Ye(t),null;case 19:if(I(We),l=t.memoizedState,l===null)return Ye(t),null;if(o=(t.flags&128)!==0,u=l.rendering,u===null)if(o)ys(l,!1);else{if(Fe!==0||e!==null&&(e.flags&128)!==0)for(e=t.child;e!==null;){if(u=Ar(e),u!==null){for(t.flags|=128,ys(l,!1),e=u.updateQueue,t.updateQueue=e,Ir(t,e),t.subtreeFlags=0,e=a,a=t.child;a!==null;)$d(a,e),a=a.sibling;return ee(We,We.current&1|2),Ce&&Ea(t,l.treeForkCount),t.child}e=e.sibling}l.tail!==null&&Ve()>Qr&&(t.flags|=128,o=!0,ys(l,!1),t.lanes=4194304)}else{if(!o)if(e=Ar(u),e!==null){if(t.flags|=128,o=!0,e=e.updateQueue,t.updateQueue=e,Ir(t,e),ys(l,!0),l.tail===null&&l.tailMode==="hidden"&&!u.alternate&&!Ce)return Ye(t),null}else 2*Ve()-l.renderingStartTime>Qr&&a!==536870912&&(t.flags|=128,o=!0,ys(l,!1),t.lanes=4194304);l.isBackwards?(u.sibling=t.child,t.child=u):(e=l.last,e!==null?e.sibling=u:t.child=u,l.last=u)}return l.tail!==null?(e=l.tail,l.rendering=e,l.tail=e.sibling,l.renderingStartTime=Ve(),e.sibling=null,a=We.current,ee(We,o?a&1|2:a&1),Ce&&Ea(t,l.treeForkCount),e):(Ye(t),null);case 22:case 23:return Gt(t),Go(),l=t.memoizedState!==null,e!==null?e.memoizedState!==null!==l&&(t.flags|=8192):l&&(t.flags|=8192),l?(a&536870912)!==0&&(t.flags&128)===0&&(Ye(t),t.subtreeFlags&6&&(t.flags|=8192)):Ye(t),a=t.updateQueue,a!==null&&Ir(t,a.retryQueue),a=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(a=e.memoizedState.cachePool.pool),l=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(l=t.memoizedState.cachePool.pool),l!==a&&(t.flags|=2048),e!==null&&I(Dn),null;case 24:return a=null,e!==null&&(a=e.memoizedState.cache),t.memoizedState.cache!==a&&(t.flags|=2048),ja(at),Ye(t),null;case 25:return null;case 30:return null}throw Error(r(156,t.tag))}function Vx(e,t){switch(No(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return ja(at),oe(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return je(t),null;case 31:if(t.memoizedState!==null){if(Gt(t),t.alternate===null)throw Error(r(340));An()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(Gt(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(r(340));An()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return I(We),null;case 4:return oe(),null;case 10:return ja(t.type),null;case 22:case 23:return Gt(t),Go(),e!==null&&I(Dn),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return ja(at),null;case 25:return null;default:return null}}function _m(e,t){switch(No(t),t.tag){case 3:ja(at),oe();break;case 26:case 27:case 5:je(t);break;case 4:oe();break;case 31:t.memoizedState!==null&&Gt(t);break;case 13:Gt(t);break;case 19:I(We);break;case 10:ja(t.type);break;case 22:case 23:Gt(t),Go(),e!==null&&I(Dn);break;case 24:ja(at)}}function bs(e,t){try{var a=t.updateQueue,l=a!==null?a.lastEffect:null;if(l!==null){var o=l.next;a=o;do{if((a.tag&e)===e){l=void 0;var u=a.create,m=a.inst;l=u(),m.destroy=l}a=a.next}while(a!==o)}}catch(y){Re(t,t.return,y)}}function Wa(e,t,a){try{var l=t.updateQueue,o=l!==null?l.lastEffect:null;if(o!==null){var u=o.next;l=u;do{if((l.tag&e)===e){var m=l.inst,y=m.destroy;if(y!==void 0){m.destroy=void 0,o=t;var j=a,R=y;try{R()}catch(G){Re(o,j,G)}}}l=l.next}while(l!==u)}}catch(G){Re(t,t.return,G)}}function Cm(e){var t=e.updateQueue;if(t!==null){var a=e.stateNode;try{vf(t,a)}catch(l){Re(e,e.return,l)}}}function Tm(e,t,a){a.props=Un(e.type,e.memoizedProps),a.state=e.memoizedState;try{a.componentWillUnmount()}catch(l){Re(e,t,l)}}function Ss(e,t){try{var a=e.ref;if(a!==null){switch(e.tag){case 26:case 27:case 5:var l=e.stateNode;break;case 30:l=e.stateNode;break;default:l=e.stateNode}typeof a=="function"?e.refCleanup=a(l):a.current=l}}catch(o){Re(e,t,o)}}function ma(e,t){var a=e.ref,l=e.refCleanup;if(a!==null)if(typeof l=="function")try{l()}catch(o){Re(e,t,o)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof a=="function")try{a(null)}catch(o){Re(e,t,o)}else a.current=null}function Am(e){var t=e.type,a=e.memoizedProps,l=e.stateNode;try{e:switch(t){case"button":case"input":case"select":case"textarea":a.autoFocus&&l.focus();break e;case"img":a.src?l.src=a.src:a.srcSet&&(l.srcset=a.srcSet)}}catch(o){Re(e,e.return,o)}}function xc(e,t,a){try{var l=e.stateNode;my(l,e.type,a,t),l[Tt]=t}catch(o){Re(e,e.return,o)}}function km(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&rn(e.type)||e.tag===4}function yc(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||km(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.tag===27&&rn(e.type)||e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function bc(e,t,a){var l=e.tag;if(l===5||l===6)e=e.stateNode,t?(a.nodeType===9?a.body:a.nodeName==="HTML"?a.ownerDocument.body:a).insertBefore(e,t):(t=a.nodeType===9?a.body:a.nodeName==="HTML"?a.ownerDocument.body:a,t.appendChild(e),a=a._reactRootContainer,a!=null||t.onclick!==null||(t.onclick=ya));else if(l!==4&&(l===27&&rn(e.type)&&(a=e.stateNode,t=null),e=e.child,e!==null))for(bc(e,t,a),e=e.sibling;e!==null;)bc(e,t,a),e=e.sibling}function Kr(e,t,a){var l=e.tag;if(l===5||l===6)e=e.stateNode,t?a.insertBefore(e,t):a.appendChild(e);else if(l!==4&&(l===27&&rn(e.type)&&(a=e.stateNode),e=e.child,e!==null))for(Kr(e,t,a),e=e.sibling;e!==null;)Kr(e,t,a),e=e.sibling}function Om(e){var t=e.stateNode,a=e.memoizedProps;try{for(var l=e.type,o=t.attributes;o.length;)t.removeAttributeNode(o[0]);bt(t,l,a),t[gt]=e,t[Tt]=a}catch(u){Re(e,e.return,u)}}var Aa=!1,st=!1,Sc=!1,Dm=typeof WeakSet=="function"?WeakSet:Set,mt=null;function Xx(e,t){if(e=e.containerInfo,Ic=ui,e=Kd(e),po(e)){if("selectionStart"in e)var a={start:e.selectionStart,end:e.selectionEnd};else e:{a=(a=e.ownerDocument)&&a.defaultView||window;var l=a.getSelection&&a.getSelection();if(l&&l.rangeCount!==0){a=l.anchorNode;var o=l.anchorOffset,u=l.focusNode;l=l.focusOffset;try{a.nodeType,u.nodeType}catch{a=null;break e}var m=0,y=-1,j=-1,R=0,G=0,V=e,z=null;t:for(;;){for(var U;V!==a||o!==0&&V.nodeType!==3||(y=m+o),V!==u||l!==0&&V.nodeType!==3||(j=m+l),V.nodeType===3&&(m+=V.nodeValue.length),(U=V.firstChild)!==null;)z=V,V=U;for(;;){if(V===e)break t;if(z===a&&++R===o&&(y=m),z===u&&++G===l&&(j=m),(U=V.nextSibling)!==null)break;V=z,z=V.parentNode}V=U}a=y===-1||j===-1?null:{start:y,end:j}}else a=null}a=a||{start:0,end:0}}else a=null;for(Kc={focusedElem:e,selectionRange:a},ui=!1,mt=t;mt!==null;)if(t=mt,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,mt=e;else for(;mt!==null;){switch(t=mt,u=t.alternate,e=t.flags,t.tag){case 0:if((e&4)!==0&&(e=t.updateQueue,e=e!==null?e.events:null,e!==null))for(a=0;a<e.length;a++)o=e[a],o.ref.impl=o.nextImpl;break;case 11:case 15:break;case 1:if((e&1024)!==0&&u!==null){e=void 0,a=t,o=u.memoizedProps,u=u.memoizedState,l=a.stateNode;try{var ne=Un(a.type,o);e=l.getSnapshotBeforeUpdate(ne,u),l.__reactInternalSnapshotBeforeUpdate=e}catch(de){Re(a,a.return,de)}}break;case 3:if((e&1024)!==0){if(e=t.stateNode.containerInfo,a=e.nodeType,a===9)Xc(e);else if(a===1)switch(e.nodeName){case"HEAD":case"HTML":case"BODY":Xc(e);break;default:e.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((e&1024)!==0)throw Error(r(163))}if(e=t.sibling,e!==null){e.return=t.return,mt=e;break}mt=t.return}}function Mm(e,t,a){var l=a.flags;switch(a.tag){case 0:case 11:case 15:Oa(e,a),l&4&&bs(5,a);break;case 1:if(Oa(e,a),l&4)if(e=a.stateNode,t===null)try{e.componentDidMount()}catch(m){Re(a,a.return,m)}else{var o=Un(a.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(o,t,e.__reactInternalSnapshotBeforeUpdate)}catch(m){Re(a,a.return,m)}}l&64&&Cm(a),l&512&&Ss(a,a.return);break;case 3:if(Oa(e,a),l&64&&(e=a.updateQueue,e!==null)){if(t=null,a.child!==null)switch(a.child.tag){case 27:case 5:t=a.child.stateNode;break;case 1:t=a.child.stateNode}try{vf(e,t)}catch(m){Re(a,a.return,m)}}break;case 27:t===null&&l&4&&Om(a);case 26:case 5:Oa(e,a),t===null&&l&4&&Am(a),l&512&&Ss(a,a.return);break;case 12:Oa(e,a);break;case 31:Oa(e,a),l&4&&Lm(e,a);break;case 13:Oa(e,a),l&4&&Um(e,a),l&64&&(e=a.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(a=ty.bind(null,a),Sy(e,a))));break;case 22:if(l=a.memoizedState!==null||Aa,!l){t=t!==null&&t.memoizedState!==null||st,o=Aa;var u=st;Aa=l,(st=t)&&!u?Da(e,a,(a.subtreeFlags&8772)!==0):Oa(e,a),Aa=o,st=u}break;case 30:break;default:Oa(e,a)}}function Rm(e){var t=e.alternate;t!==null&&(e.alternate=null,Rm(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&Ji(t)),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}var Xe=null,kt=!1;function ka(e,t,a){for(a=a.child;a!==null;)zm(e,t,a),a=a.sibling}function zm(e,t,a){if(zt&&typeof zt.onCommitFiberUnmount=="function")try{zt.onCommitFiberUnmount(Vl,a)}catch{}switch(a.tag){case 26:st||ma(a,t),ka(e,t,a),a.memoizedState?a.memoizedState.count--:a.stateNode&&(a=a.stateNode,a.parentNode.removeChild(a));break;case 27:st||ma(a,t);var l=Xe,o=kt;rn(a.type)&&(Xe=a.stateNode,kt=!1),ka(e,t,a),ks(a.stateNode),Xe=l,kt=o;break;case 5:st||ma(a,t);case 6:if(l=Xe,o=kt,Xe=null,ka(e,t,a),Xe=l,kt=o,Xe!==null)if(kt)try{(Xe.nodeType===9?Xe.body:Xe.nodeName==="HTML"?Xe.ownerDocument.body:Xe).removeChild(a.stateNode)}catch(u){Re(a,t,u)}else try{Xe.removeChild(a.stateNode)}catch(u){Re(a,t,u)}break;case 18:Xe!==null&&(kt?(e=Xe,Cp(e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,a.stateNode),Ml(e)):Cp(Xe,a.stateNode));break;case 4:l=Xe,o=kt,Xe=a.stateNode.containerInfo,kt=!0,ka(e,t,a),Xe=l,kt=o;break;case 0:case 11:case 14:case 15:Wa(2,a,t),st||Wa(4,a,t),ka(e,t,a);break;case 1:st||(ma(a,t),l=a.stateNode,typeof l.componentWillUnmount=="function"&&Tm(a,t,l)),ka(e,t,a);break;case 21:ka(e,t,a);break;case 22:st=(l=st)||a.memoizedState!==null,ka(e,t,a),st=l;break;default:ka(e,t,a)}}function Lm(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{Ml(e)}catch(a){Re(t,t.return,a)}}}function Um(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{Ml(e)}catch(a){Re(t,t.return,a)}}function Qx(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new Dm),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new Dm),t;default:throw Error(r(435,e.tag))}}function Yr(e,t){var a=Qx(e);t.forEach(function(l){if(!a.has(l)){a.add(l);var o=ay.bind(null,e,l);l.then(o,o)}})}function Ot(e,t){var a=t.deletions;if(a!==null)for(var l=0;l<a.length;l++){var o=a[l],u=e,m=t,y=m;e:for(;y!==null;){switch(y.tag){case 27:if(rn(y.type)){Xe=y.stateNode,kt=!1;break e}break;case 5:Xe=y.stateNode,kt=!1;break e;case 3:case 4:Xe=y.stateNode.containerInfo,kt=!0;break e}y=y.return}if(Xe===null)throw Error(r(160));zm(u,m,o),Xe=null,kt=!1,u=o.alternate,u!==null&&(u.return=null),o.return=null}if(t.subtreeFlags&13886)for(t=t.child;t!==null;)Bm(t,e),t=t.sibling}var sa=null;function Bm(e,t){var a=e.alternate,l=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:Ot(t,e),Dt(e),l&4&&(Wa(3,e,e.return),bs(3,e),Wa(5,e,e.return));break;case 1:Ot(t,e),Dt(e),l&512&&(st||a===null||ma(a,a.return)),l&64&&Aa&&(e=e.updateQueue,e!==null&&(l=e.callbacks,l!==null&&(a=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=a===null?l:a.concat(l))));break;case 26:var o=sa;if(Ot(t,e),Dt(e),l&512&&(st||a===null||ma(a,a.return)),l&4){var u=a!==null?a.memoizedState:null;if(l=e.memoizedState,a===null)if(l===null)if(e.stateNode===null){e:{l=e.type,a=e.memoizedProps,o=o.ownerDocument||o;t:switch(l){case"title":u=o.getElementsByTagName("title")[0],(!u||u[Pl]||u[gt]||u.namespaceURI==="http://www.w3.org/2000/svg"||u.hasAttribute("itemprop"))&&(u=o.createElement(l),o.head.insertBefore(u,o.querySelector("head > title"))),bt(u,l,a),u[gt]=e,ft(u),l=u;break e;case"link":var m=Bp("link","href",o).get(l+(a.href||""));if(m){for(var y=0;y<m.length;y++)if(u=m[y],u.getAttribute("href")===(a.href==null||a.href===""?null:a.href)&&u.getAttribute("rel")===(a.rel==null?null:a.rel)&&u.getAttribute("title")===(a.title==null?null:a.title)&&u.getAttribute("crossorigin")===(a.crossOrigin==null?null:a.crossOrigin)){m.splice(y,1);break t}}u=o.createElement(l),bt(u,l,a),o.head.appendChild(u);break;case"meta":if(m=Bp("meta","content",o).get(l+(a.content||""))){for(y=0;y<m.length;y++)if(u=m[y],u.getAttribute("content")===(a.content==null?null:""+a.content)&&u.getAttribute("name")===(a.name==null?null:a.name)&&u.getAttribute("property")===(a.property==null?null:a.property)&&u.getAttribute("http-equiv")===(a.httpEquiv==null?null:a.httpEquiv)&&u.getAttribute("charset")===(a.charSet==null?null:a.charSet)){m.splice(y,1);break t}}u=o.createElement(l),bt(u,l,a),o.head.appendChild(u);break;default:throw Error(r(468,l))}u[gt]=e,ft(u),l=u}e.stateNode=l}else Hp(o,e.type,e.stateNode);else e.stateNode=Up(o,l,e.memoizedProps);else u!==l?(u===null?a.stateNode!==null&&(a=a.stateNode,a.parentNode.removeChild(a)):u.count--,l===null?Hp(o,e.type,e.stateNode):Up(o,l,e.memoizedProps)):l===null&&e.stateNode!==null&&xc(e,e.memoizedProps,a.memoizedProps)}break;case 27:Ot(t,e),Dt(e),l&512&&(st||a===null||ma(a,a.return)),a!==null&&l&4&&xc(e,e.memoizedProps,a.memoizedProps);break;case 5:if(Ot(t,e),Dt(e),l&512&&(st||a===null||ma(a,a.return)),e.flags&32){o=e.stateNode;try{al(o,"")}catch(ne){Re(e,e.return,ne)}}l&4&&e.stateNode!=null&&(o=e.memoizedProps,xc(e,o,a!==null?a.memoizedProps:o)),l&1024&&(Sc=!0);break;case 6:if(Ot(t,e),Dt(e),l&4){if(e.stateNode===null)throw Error(r(162));l=e.memoizedProps,a=e.stateNode;try{a.nodeValue=l}catch(ne){Re(e,e.return,ne)}}break;case 3:if(ri=null,o=sa,sa=li(t.containerInfo),Ot(t,e),sa=o,Dt(e),l&4&&a!==null&&a.memoizedState.isDehydrated)try{Ml(t.containerInfo)}catch(ne){Re(e,e.return,ne)}Sc&&(Sc=!1,Hm(e));break;case 4:l=sa,sa=li(e.stateNode.containerInfo),Ot(t,e),Dt(e),sa=l;break;case 12:Ot(t,e),Dt(e);break;case 31:Ot(t,e),Dt(e),l&4&&(l=e.updateQueue,l!==null&&(e.updateQueue=null,Yr(e,l)));break;case 13:Ot(t,e),Dt(e),e.child.flags&8192&&e.memoizedState!==null!=(a!==null&&a.memoizedState!==null)&&(Xr=Ve()),l&4&&(l=e.updateQueue,l!==null&&(e.updateQueue=null,Yr(e,l)));break;case 22:o=e.memoizedState!==null;var j=a!==null&&a.memoizedState!==null,R=Aa,G=st;if(Aa=R||o,st=G||j,Ot(t,e),st=G,Aa=R,Dt(e),l&8192)e:for(t=e.stateNode,t._visibility=o?t._visibility&-2:t._visibility|1,o&&(a===null||j||Aa||st||Bn(e)),a=null,t=e;;){if(t.tag===5||t.tag===26){if(a===null){j=a=t;try{if(u=j.stateNode,o)m=u.style,typeof m.setProperty=="function"?m.setProperty("display","none","important"):m.display="none";else{y=j.stateNode;var V=j.memoizedProps.style,z=V!=null&&V.hasOwnProperty("display")?V.display:null;y.style.display=z==null||typeof z=="boolean"?"":(""+z).trim()}}catch(ne){Re(j,j.return,ne)}}}else if(t.tag===6){if(a===null){j=t;try{j.stateNode.nodeValue=o?"":j.memoizedProps}catch(ne){Re(j,j.return,ne)}}}else if(t.tag===18){if(a===null){j=t;try{var U=j.stateNode;o?Tp(U,!0):Tp(j.stateNode,!1)}catch(ne){Re(j,j.return,ne)}}}else if((t.tag!==22&&t.tag!==23||t.memoizedState===null||t===e)&&t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break e;for(;t.sibling===null;){if(t.return===null||t.return===e)break e;a===t&&(a=null),t=t.return}a===t&&(a=null),t.sibling.return=t.return,t=t.sibling}l&4&&(l=e.updateQueue,l!==null&&(a=l.retryQueue,a!==null&&(l.retryQueue=null,Yr(e,a))));break;case 19:Ot(t,e),Dt(e),l&4&&(l=e.updateQueue,l!==null&&(e.updateQueue=null,Yr(e,l)));break;case 30:break;case 21:break;default:Ot(t,e),Dt(e)}}function Dt(e){var t=e.flags;if(t&2){try{for(var a,l=e.return;l!==null;){if(km(l)){a=l;break}l=l.return}if(a==null)throw Error(r(160));switch(a.tag){case 27:var o=a.stateNode,u=yc(e);Kr(e,u,o);break;case 5:var m=a.stateNode;a.flags&32&&(al(m,""),a.flags&=-33);var y=yc(e);Kr(e,y,m);break;case 3:case 4:var j=a.stateNode.containerInfo,R=yc(e);bc(e,R,j);break;default:throw Error(r(161))}}catch(G){Re(e,e.return,G)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function Hm(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;Hm(t),t.tag===5&&t.flags&1024&&t.stateNode.reset(),e=e.sibling}}function Oa(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)Mm(e,t.alternate,t),t=t.sibling}function Bn(e){for(e=e.child;e!==null;){var t=e;switch(t.tag){case 0:case 11:case 14:case 15:Wa(4,t,t.return),Bn(t);break;case 1:ma(t,t.return);var a=t.stateNode;typeof a.componentWillUnmount=="function"&&Tm(t,t.return,a),Bn(t);break;case 27:ks(t.stateNode);case 26:case 5:ma(t,t.return),Bn(t);break;case 22:t.memoizedState===null&&Bn(t);break;case 30:Bn(t);break;default:Bn(t)}e=e.sibling}}function Da(e,t,a){for(a=a&&(t.subtreeFlags&8772)!==0,t=t.child;t!==null;){var l=t.alternate,o=e,u=t,m=u.flags;switch(u.tag){case 0:case 11:case 15:Da(o,u,a),bs(4,u);break;case 1:if(Da(o,u,a),l=u,o=l.stateNode,typeof o.componentDidMount=="function")try{o.componentDidMount()}catch(R){Re(l,l.return,R)}if(l=u,o=l.updateQueue,o!==null){var y=l.stateNode;try{var j=o.shared.hiddenCallbacks;if(j!==null)for(o.shared.hiddenCallbacks=null,o=0;o<j.length;o++)gf(j[o],y)}catch(R){Re(l,l.return,R)}}a&&m&64&&Cm(u),Ss(u,u.return);break;case 27:Om(u);case 26:case 5:Da(o,u,a),a&&l===null&&m&4&&Am(u),Ss(u,u.return);break;case 12:Da(o,u,a);break;case 31:Da(o,u,a),a&&m&4&&Lm(o,u);break;case 13:Da(o,u,a),a&&m&4&&Um(o,u);break;case 22:u.memoizedState===null&&Da(o,u,a),Ss(u,u.return);break;case 30:break;default:Da(o,u,a)}t=t.sibling}}function Ec(e,t){var a=null;e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(a=e.memoizedState.cachePool.pool),e=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(e=t.memoizedState.cachePool.pool),e!==a&&(e!=null&&e.refCount++,a!=null&&is(a))}function wc(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&is(e))}function ra(e,t,a,l){if(t.subtreeFlags&10256)for(t=t.child;t!==null;)Gm(e,t,a,l),t=t.sibling}function Gm(e,t,a,l){var o=t.flags;switch(t.tag){case 0:case 11:case 15:ra(e,t,a,l),o&2048&&bs(9,t);break;case 1:ra(e,t,a,l);break;case 3:ra(e,t,a,l),o&2048&&(e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&is(e)));break;case 12:if(o&2048){ra(e,t,a,l),e=t.stateNode;try{var u=t.memoizedProps,m=u.id,y=u.onPostCommit;typeof y=="function"&&y(m,t.alternate===null?"mount":"update",e.passiveEffectDuration,-0)}catch(j){Re(t,t.return,j)}}else ra(e,t,a,l);break;case 31:ra(e,t,a,l);break;case 13:ra(e,t,a,l);break;case 23:break;case 22:u=t.stateNode,m=t.alternate,t.memoizedState!==null?u._visibility&2?ra(e,t,a,l):Es(e,t):u._visibility&2?ra(e,t,a,l):(u._visibility|=2,El(e,t,a,l,(t.subtreeFlags&10256)!==0||!1)),o&2048&&Ec(m,t);break;case 24:ra(e,t,a,l),o&2048&&wc(t.alternate,t);break;default:ra(e,t,a,l)}}function El(e,t,a,l,o){for(o=o&&((t.subtreeFlags&10256)!==0||!1),t=t.child;t!==null;){var u=e,m=t,y=a,j=l,R=m.flags;switch(m.tag){case 0:case 11:case 15:El(u,m,y,j,o),bs(8,m);break;case 23:break;case 22:var G=m.stateNode;m.memoizedState!==null?G._visibility&2?El(u,m,y,j,o):Es(u,m):(G._visibility|=2,El(u,m,y,j,o)),o&&R&2048&&Ec(m.alternate,m);break;case 24:El(u,m,y,j,o),o&&R&2048&&wc(m.alternate,m);break;default:El(u,m,y,j,o)}t=t.sibling}}function Es(e,t){if(t.subtreeFlags&10256)for(t=t.child;t!==null;){var a=e,l=t,o=l.flags;switch(l.tag){case 22:Es(a,l),o&2048&&Ec(l.alternate,l);break;case 24:Es(a,l),o&2048&&wc(l.alternate,l);break;default:Es(a,l)}t=t.sibling}}var ws=8192;function wl(e,t,a){if(e.subtreeFlags&ws)for(e=e.child;e!==null;)qm(e,t,a),e=e.sibling}function qm(e,t,a){switch(e.tag){case 26:wl(e,t,a),e.flags&ws&&e.memoizedState!==null&&My(a,sa,e.memoizedState,e.memoizedProps);break;case 5:wl(e,t,a);break;case 3:case 4:var l=sa;sa=li(e.stateNode.containerInfo),wl(e,t,a),sa=l;break;case 22:e.memoizedState===null&&(l=e.alternate,l!==null&&l.memoizedState!==null?(l=ws,ws=16777216,wl(e,t,a),ws=l):wl(e,t,a));break;default:wl(e,t,a)}}function Im(e){var t=e.alternate;if(t!==null&&(e=t.child,e!==null)){t.child=null;do t=e.sibling,e.sibling=null,e=t;while(e!==null)}}function js(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var a=0;a<t.length;a++){var l=t[a];mt=l,Ym(l,e)}Im(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)Km(e),e=e.sibling}function Km(e){switch(e.tag){case 0:case 11:case 15:js(e),e.flags&2048&&Wa(9,e,e.return);break;case 3:js(e);break;case 12:js(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,Vr(e)):js(e);break;default:js(e)}}function Vr(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var a=0;a<t.length;a++){var l=t[a];mt=l,Ym(l,e)}Im(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:Wa(8,t,t.return),Vr(t);break;case 22:a=t.stateNode,a._visibility&2&&(a._visibility&=-3,Vr(t));break;default:Vr(t)}e=e.sibling}}function Ym(e,t){for(;mt!==null;){var a=mt;switch(a.tag){case 0:case 11:case 15:Wa(8,a,t);break;case 23:case 22:if(a.memoizedState!==null&&a.memoizedState.cachePool!==null){var l=a.memoizedState.cachePool.pool;l!=null&&l.refCount++}break;case 24:is(a.memoizedState.cache)}if(l=a.child,l!==null)l.return=a,mt=l;else e:for(a=e;mt!==null;){l=mt;var o=l.sibling,u=l.return;if(Rm(l),l===a){mt=null;break e}if(o!==null){o.return=u,mt=o;break e}mt=u}}}var Px={getCacheForType:function(e){var t=xt(at),a=t.data.get(e);return a===void 0&&(a=e(),t.data.set(e,a)),a},cacheSignal:function(){return xt(at).controller.signal}},Zx=typeof WeakMap=="function"?WeakMap:Map,De=0,Ge=null,Ee=null,Ne=0,Me=0,qt=null,en=!1,jl=!1,jc=!1,Ma=0,Fe=0,tn=0,Hn=0,Nc=0,It=0,Nl=0,Ns=null,Mt=null,_c=!1,Xr=0,Vm=0,Qr=1/0,Pr=null,an=null,ot=0,nn=null,_l=null,Ra=0,Cc=0,Tc=null,Xm=null,_s=0,Ac=null;function Kt(){return(De&2)!==0&&Ne!==0?Ne&-Ne:L.T!==null?zc():id()}function Qm(){if(It===0)if((Ne&536870912)===0||Ce){var e=ar;ar<<=1,(ar&3932160)===0&&(ar=262144),It=e}else It=536870912;return e=Ht.current,e!==null&&(e.flags|=32),It}function Rt(e,t,a){(e===Ge&&(Me===2||Me===9)||e.cancelPendingCommit!==null)&&(Cl(e,0),ln(e,Ne,It,!1)),Ql(e,a),((De&2)===0||e!==Ge)&&(e===Ge&&((De&2)===0&&(Hn|=a),Fe===4&&ln(e,Ne,It,!1)),pa(e))}function Pm(e,t,a){if((De&6)!==0)throw Error(r(327));var l=!a&&(t&127)===0&&(t&e.expiredLanes)===0||Xl(e,t),o=l?$x(e,t):Oc(e,t,!0),u=l;do{if(o===0){jl&&!l&&ln(e,t,0,!1);break}else{if(a=e.current.alternate,u&&!Jx(a)){o=Oc(e,t,!1),u=!1;continue}if(o===2){if(u=t,e.errorRecoveryDisabledLanes&u)var m=0;else m=e.pendingLanes&-536870913,m=m!==0?m:m&536870912?536870912:0;if(m!==0){t=m;e:{var y=e;o=Ns;var j=y.current.memoizedState.isDehydrated;if(j&&(Cl(y,m).flags|=256),m=Oc(y,m,!1),m!==2){if(jc&&!j){y.errorRecoveryDisabledLanes|=u,Hn|=u,o=4;break e}u=Mt,Mt=o,u!==null&&(Mt===null?Mt=u:Mt.push.apply(Mt,u))}o=m}if(u=!1,o!==2)continue}}if(o===1){Cl(e,0),ln(e,t,0,!0);break}e:{switch(l=e,u=o,u){case 0:case 1:throw Error(r(345));case 4:if((t&4194048)!==t)break;case 6:ln(l,t,It,!en);break e;case 2:Mt=null;break;case 3:case 5:break;default:throw Error(r(329))}if((t&62914560)===t&&(o=Xr+300-Ve(),10<o)){if(ln(l,t,It,!en),lr(l,0,!0)!==0)break e;Ra=t,l.timeoutHandle=Np(Zm.bind(null,l,a,Mt,Pr,_c,t,It,Hn,Nl,en,u,"Throttled",-0,0),o);break e}Zm(l,a,Mt,Pr,_c,t,It,Hn,Nl,en,u,null,-0,0)}}break}while(!0);pa(e)}function Zm(e,t,a,l,o,u,m,y,j,R,G,V,z,U){if(e.timeoutHandle=-1,V=t.subtreeFlags,V&8192||(V&16785408)===16785408){V={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:ya},qm(t,u,V);var ne=(u&62914560)===u?Xr-Ve():(u&4194048)===u?Vm-Ve():0;if(ne=Ry(V,ne),ne!==null){Ra=u,e.cancelPendingCommit=ne(np.bind(null,e,t,u,a,l,o,m,y,j,G,V,null,z,U)),ln(e,u,m,!R);return}}np(e,t,u,a,l,o,m,y,j)}function Jx(e){for(var t=e;;){var a=t.tag;if((a===0||a===11||a===15)&&t.flags&16384&&(a=t.updateQueue,a!==null&&(a=a.stores,a!==null)))for(var l=0;l<a.length;l++){var o=a[l],u=o.getSnapshot;o=o.value;try{if(!Ut(u(),o))return!1}catch{return!1}}if(a=t.child,t.subtreeFlags&16384&&a!==null)a.return=t,t=a;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function ln(e,t,a,l){t&=~Nc,t&=~Hn,e.suspendedLanes|=t,e.pingedLanes&=~t,l&&(e.warmLanes|=t),l=e.expirationTimes;for(var o=t;0<o;){var u=31-Lt(o),m=1<<u;l[u]=-1,o&=~m}a!==0&&ld(e,a,t)}function Zr(){return(De&6)===0?(Cs(0),!1):!0}function kc(){if(Ee!==null){if(Me===0)var e=Ee.return;else e=Ee,wa=kn=null,Xo(e),vl=null,cs=0,e=Ee;for(;e!==null;)_m(e.alternate,e),e=e.return;Ee=null}}function Cl(e,t){var a=e.timeoutHandle;a!==-1&&(e.timeoutHandle=-1,gy(a)),a=e.cancelPendingCommit,a!==null&&(e.cancelPendingCommit=null,a()),Ra=0,kc(),Ge=e,Ee=a=Sa(e.current,null),Ne=t,Me=0,qt=null,en=!1,jl=Xl(e,t),jc=!1,Nl=It=Nc=Hn=tn=Fe=0,Mt=Ns=null,_c=!1,(t&8)!==0&&(t|=t&32);var l=e.entangledLanes;if(l!==0)for(e=e.entanglements,l&=t;0<l;){var o=31-Lt(l),u=1<<o;t|=e[o],l&=~u}return Ma=t,gr(),a}function Jm(e,t){ve=null,L.H=vs,t===gl||t===jr?(t=ff(),Me=3):t===Ro?(t=ff(),Me=4):Me=t===oc?8:t!==null&&typeof t=="object"&&typeof t.then=="function"?6:1,qt=t,Ee===null&&(Fe=1,Br(e,Jt(t,e.current)))}function Fm(){var e=Ht.current;return e===null?!0:(Ne&4194048)===Ne?ea===null:(Ne&62914560)===Ne||(Ne&536870912)!==0?e===ea:!1}function $m(){var e=L.H;return L.H=vs,e===null?vs:e}function Wm(){var e=L.A;return L.A=Px,e}function Jr(){Fe=4,en||(Ne&4194048)!==Ne&&Ht.current!==null||(jl=!0),(tn&134217727)===0&&(Hn&134217727)===0||Ge===null||ln(Ge,Ne,It,!1)}function Oc(e,t,a){var l=De;De|=2;var o=$m(),u=Wm();(Ge!==e||Ne!==t)&&(Pr=null,Cl(e,t)),t=!1;var m=Fe;e:do try{if(Me!==0&&Ee!==null){var y=Ee,j=qt;switch(Me){case 8:kc(),m=6;break e;case 3:case 2:case 9:case 6:Ht.current===null&&(t=!0);var R=Me;if(Me=0,qt=null,Tl(e,y,j,R),a&&jl){m=0;break e}break;default:R=Me,Me=0,qt=null,Tl(e,y,j,R)}}Fx(),m=Fe;break}catch(G){Jm(e,G)}while(!0);return t&&e.shellSuspendCounter++,wa=kn=null,De=l,L.H=o,L.A=u,Ee===null&&(Ge=null,Ne=0,gr()),m}function Fx(){for(;Ee!==null;)ep(Ee)}function $x(e,t){var a=De;De|=2;var l=$m(),o=Wm();Ge!==e||Ne!==t?(Pr=null,Qr=Ve()+500,Cl(e,t)):jl=Xl(e,t);e:do try{if(Me!==0&&Ee!==null){t=Ee;var u=qt;t:switch(Me){case 1:Me=0,qt=null,Tl(e,t,u,1);break;case 2:case 9:if(uf(u)){Me=0,qt=null,tp(t);break}t=function(){Me!==2&&Me!==9||Ge!==e||(Me=7),pa(e)},u.then(t,t);break e;case 3:Me=7;break e;case 4:Me=5;break e;case 7:uf(u)?(Me=0,qt=null,tp(t)):(Me=0,qt=null,Tl(e,t,u,7));break;case 5:var m=null;switch(Ee.tag){case 26:m=Ee.memoizedState;case 5:case 27:var y=Ee;if(m?Gp(m):y.stateNode.complete){Me=0,qt=null;var j=y.sibling;if(j!==null)Ee=j;else{var R=y.return;R!==null?(Ee=R,Fr(R)):Ee=null}break t}}Me=0,qt=null,Tl(e,t,u,5);break;case 6:Me=0,qt=null,Tl(e,t,u,6);break;case 8:kc(),Fe=6;break e;default:throw Error(r(462))}}Wx();break}catch(G){Jm(e,G)}while(!0);return wa=kn=null,L.H=l,L.A=o,De=a,Ee!==null?0:(Ge=null,Ne=0,gr(),Fe)}function Wx(){for(;Ee!==null&&!W();)ep(Ee)}function ep(e){var t=jm(e.alternate,e,Ma);e.memoizedProps=e.pendingProps,t===null?Fr(e):Ee=t}function tp(e){var t=e,a=t.alternate;switch(t.tag){case 15:case 0:t=xm(a,t,t.pendingProps,t.type,void 0,Ne);break;case 11:t=xm(a,t,t.pendingProps,t.type.render,t.ref,Ne);break;case 5:Xo(t);default:_m(a,t),t=Ee=$d(t,Ma),t=jm(a,t,Ma)}e.memoizedProps=e.pendingProps,t===null?Fr(e):Ee=t}function Tl(e,t,a,l){wa=kn=null,Xo(t),vl=null,cs=0;var o=t.return;try{if(qx(e,o,t,a,Ne)){Fe=1,Br(e,Jt(a,e.current)),Ee=null;return}}catch(u){if(o!==null)throw Ee=o,u;Fe=1,Br(e,Jt(a,e.current)),Ee=null;return}t.flags&32768?(Ce||l===1?e=!0:jl||(Ne&536870912)!==0?e=!1:(en=e=!0,(l===2||l===9||l===3||l===6)&&(l=Ht.current,l!==null&&l.tag===13&&(l.flags|=16384))),ap(t,e)):Fr(t)}function Fr(e){var t=e;do{if((t.flags&32768)!==0){ap(t,en);return}e=t.return;var a=Yx(t.alternate,t,Ma);if(a!==null){Ee=a;return}if(t=t.sibling,t!==null){Ee=t;return}Ee=t=e}while(t!==null);Fe===0&&(Fe=5)}function ap(e,t){do{var a=Vx(e.alternate,e);if(a!==null){a.flags&=32767,Ee=a;return}if(a=e.return,a!==null&&(a.flags|=32768,a.subtreeFlags=0,a.deletions=null),!t&&(e=e.sibling,e!==null)){Ee=e;return}Ee=e=a}while(e!==null);Fe=6,Ee=null}function np(e,t,a,l,o,u,m,y,j){e.cancelPendingCommit=null;do $r();while(ot!==0);if((De&6)!==0)throw Error(r(327));if(t!==null){if(t===e.current)throw Error(r(177));if(u=t.lanes|t.childLanes,u|=yo,Dv(e,a,u,m,y,j),e===Ge&&(Ee=Ge=null,Ne=0),_l=t,nn=e,Ra=a,Cc=u,Tc=o,Xm=l,(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?(e.callbackNode=null,e.callbackPriority=0,ny(dt,function(){return op(),null})):(e.callbackNode=null,e.callbackPriority=0),l=(t.flags&13878)!==0,(t.subtreeFlags&13878)!==0||l){l=L.T,L.T=null,o=J.p,J.p=2,m=De,De|=4;try{Xx(e,t,a)}finally{De=m,J.p=o,L.T=l}}ot=1,lp(),sp(),rp()}}function lp(){if(ot===1){ot=0;var e=nn,t=_l,a=(t.flags&13878)!==0;if((t.subtreeFlags&13878)!==0||a){a=L.T,L.T=null;var l=J.p;J.p=2;var o=De;De|=4;try{Bm(t,e);var u=Kc,m=Kd(e.containerInfo),y=u.focusedElem,j=u.selectionRange;if(m!==y&&y&&y.ownerDocument&&Id(y.ownerDocument.documentElement,y)){if(j!==null&&po(y)){var R=j.start,G=j.end;if(G===void 0&&(G=R),"selectionStart"in y)y.selectionStart=R,y.selectionEnd=Math.min(G,y.value.length);else{var V=y.ownerDocument||document,z=V&&V.defaultView||window;if(z.getSelection){var U=z.getSelection(),ne=y.textContent.length,de=Math.min(j.start,ne),Be=j.end===void 0?de:Math.min(j.end,ne);!U.extend&&de>Be&&(m=Be,Be=de,de=m);var k=qd(y,de),_=qd(y,Be);if(k&&_&&(U.rangeCount!==1||U.anchorNode!==k.node||U.anchorOffset!==k.offset||U.focusNode!==_.node||U.focusOffset!==_.offset)){var M=V.createRange();M.setStart(k.node,k.offset),U.removeAllRanges(),de>Be?(U.addRange(M),U.extend(_.node,_.offset)):(M.setEnd(_.node,_.offset),U.addRange(M))}}}}for(V=[],U=y;U=U.parentNode;)U.nodeType===1&&V.push({element:U,left:U.scrollLeft,top:U.scrollTop});for(typeof y.focus=="function"&&y.focus(),y=0;y<V.length;y++){var K=V[y];K.element.scrollLeft=K.left,K.element.scrollTop=K.top}}ui=!!Ic,Kc=Ic=null}finally{De=o,J.p=l,L.T=a}}e.current=t,ot=2}}function sp(){if(ot===2){ot=0;var e=nn,t=_l,a=(t.flags&8772)!==0;if((t.subtreeFlags&8772)!==0||a){a=L.T,L.T=null;var l=J.p;J.p=2;var o=De;De|=4;try{Mm(e,t.alternate,t)}finally{De=o,J.p=l,L.T=a}}ot=3}}function rp(){if(ot===4||ot===3){ot=0,jt();var e=nn,t=_l,a=Ra,l=Xm;(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?ot=5:(ot=0,_l=nn=null,ip(e,e.pendingLanes));var o=e.pendingLanes;if(o===0&&(an=null),Pi(a),t=t.stateNode,zt&&typeof zt.onCommitFiberRoot=="function")try{zt.onCommitFiberRoot(Vl,t,void 0,(t.current.flags&128)===128)}catch{}if(l!==null){t=L.T,o=J.p,J.p=2,L.T=null;try{for(var u=e.onRecoverableError,m=0;m<l.length;m++){var y=l[m];u(y.value,{componentStack:y.stack})}}finally{L.T=t,J.p=o}}(Ra&3)!==0&&$r(),pa(e),o=e.pendingLanes,(a&261930)!==0&&(o&42)!==0?e===Ac?_s++:(_s=0,Ac=e):_s=0,Cs(0)}}function ip(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,is(t)))}function $r(){return lp(),sp(),rp(),op()}function op(){if(ot!==5)return!1;var e=nn,t=Cc;Cc=0;var a=Pi(Ra),l=L.T,o=J.p;try{J.p=32>a?32:a,L.T=null,a=Tc,Tc=null;var u=nn,m=Ra;if(ot=0,_l=nn=null,Ra=0,(De&6)!==0)throw Error(r(331));var y=De;if(De|=4,Km(u.current),Gm(u,u.current,m,a),De=y,Cs(0,!1),zt&&typeof zt.onPostCommitFiberRoot=="function")try{zt.onPostCommitFiberRoot(Vl,u)}catch{}return!0}finally{J.p=o,L.T=l,ip(e,t)}}function cp(e,t,a){t=Jt(a,t),t=ic(e.stateNode,t,2),e=Ja(e,t,2),e!==null&&(Ql(e,2),pa(e))}function Re(e,t,a){if(e.tag===3)cp(e,e,a);else for(;t!==null;){if(t.tag===3){cp(t,e,a);break}else if(t.tag===1){var l=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof l.componentDidCatch=="function"&&(an===null||!an.has(l))){e=Jt(a,e),a=um(2),l=Ja(t,a,2),l!==null&&(dm(a,l,t,e),Ql(l,2),pa(l));break}}t=t.return}}function Dc(e,t,a){var l=e.pingCache;if(l===null){l=e.pingCache=new Zx;var o=new Set;l.set(t,o)}else o=l.get(t),o===void 0&&(o=new Set,l.set(t,o));o.has(a)||(jc=!0,o.add(a),e=ey.bind(null,e,t,a),t.then(e,e))}function ey(e,t,a){var l=e.pingCache;l!==null&&l.delete(t),e.pingedLanes|=e.suspendedLanes&a,e.warmLanes&=~a,Ge===e&&(Ne&a)===a&&(Fe===4||Fe===3&&(Ne&62914560)===Ne&&300>Ve()-Xr?(De&2)===0&&Cl(e,0):Nc|=a,Nl===Ne&&(Nl=0)),pa(e)}function up(e,t){t===0&&(t=nd()),e=Cn(e,t),e!==null&&(Ql(e,t),pa(e))}function ty(e){var t=e.memoizedState,a=0;t!==null&&(a=t.retryLane),up(e,a)}function ay(e,t){var a=0;switch(e.tag){case 31:case 13:var l=e.stateNode,o=e.memoizedState;o!==null&&(a=o.retryLane);break;case 19:l=e.stateNode;break;case 22:l=e.stateNode._retryCache;break;default:throw Error(r(314))}l!==null&&l.delete(t),up(e,a)}function ny(e,t){return ut(e,t)}var Wr=null,Al=null,Mc=!1,ei=!1,Rc=!1,sn=0;function pa(e){e!==Al&&e.next===null&&(Al===null?Wr=Al=e:Al=Al.next=e),ei=!0,Mc||(Mc=!0,sy())}function Cs(e,t){if(!Rc&&ei){Rc=!0;do for(var a=!1,l=Wr;l!==null;){if(e!==0){var o=l.pendingLanes;if(o===0)var u=0;else{var m=l.suspendedLanes,y=l.pingedLanes;u=(1<<31-Lt(42|e)+1)-1,u&=o&~(m&~y),u=u&201326741?u&201326741|1:u?u|2:0}u!==0&&(a=!0,pp(l,u))}else u=Ne,u=lr(l,l===Ge?u:0,l.cancelPendingCommit!==null||l.timeoutHandle!==-1),(u&3)===0||Xl(l,u)||(a=!0,pp(l,u));l=l.next}while(a);Rc=!1}}function ly(){dp()}function dp(){ei=Mc=!1;var e=0;sn!==0&&hy()&&(e=sn);for(var t=Ve(),a=null,l=Wr;l!==null;){var o=l.next,u=fp(l,t);u===0?(l.next=null,a===null?Wr=o:a.next=o,o===null&&(Al=a)):(a=l,(e!==0||(u&3)!==0)&&(ei=!0)),l=o}ot!==0&&ot!==5||Cs(e),sn!==0&&(sn=0)}function fp(e,t){for(var a=e.suspendedLanes,l=e.pingedLanes,o=e.expirationTimes,u=e.pendingLanes&-62914561;0<u;){var m=31-Lt(u),y=1<<m,j=o[m];j===-1?((y&a)===0||(y&l)!==0)&&(o[m]=Ov(y,t)):j<=t&&(e.expiredLanes|=y),u&=~y}if(t=Ge,a=Ne,a=lr(e,e===t?a:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),l=e.callbackNode,a===0||e===t&&(Me===2||Me===9)||e.cancelPendingCommit!==null)return l!==null&&l!==null&&tt(l),e.callbackNode=null,e.callbackPriority=0;if((a&3)===0||Xl(e,a)){if(t=a&-a,t===e.callbackPriority)return t;switch(l!==null&&tt(l),Pi(a)){case 2:case 8:a=Xt;break;case 32:a=dt;break;case 268435456:a=er;break;default:a=dt}return l=mp.bind(null,e),a=ut(a,l),e.callbackPriority=t,e.callbackNode=a,t}return l!==null&&l!==null&&tt(l),e.callbackPriority=2,e.callbackNode=null,2}function mp(e,t){if(ot!==0&&ot!==5)return e.callbackNode=null,e.callbackPriority=0,null;var a=e.callbackNode;if($r()&&e.callbackNode!==a)return null;var l=Ne;return l=lr(e,e===Ge?l:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),l===0?null:(Pm(e,l,t),fp(e,Ve()),e.callbackNode!=null&&e.callbackNode===a?mp.bind(null,e):null)}function pp(e,t){if($r())return null;Pm(e,t,!0)}function sy(){vy(function(){(De&6)!==0?ut(Zn,ly):dp()})}function zc(){if(sn===0){var e=pl;e===0&&(e=tr,tr<<=1,(tr&261888)===0&&(tr=256)),sn=e}return sn}function hp(e){return e==null||typeof e=="symbol"||typeof e=="boolean"?null:typeof e=="function"?e:or(""+e)}function gp(e,t){var a=t.ownerDocument.createElement("input");return a.name=t.name,a.value=t.value,e.id&&a.setAttribute("form",e.id),t.parentNode.insertBefore(a,t),e=new FormData(e),a.parentNode.removeChild(a),e}function ry(e,t,a,l,o){if(t==="submit"&&a&&a.stateNode===o){var u=hp((o[Tt]||null).action),m=l.submitter;m&&(t=(t=m[Tt]||null)?hp(t.formAction):m.getAttribute("formAction"),t!==null&&(u=t,m=null));var y=new fr("action","action",null,l,o);e.push({event:y,listeners:[{instance:null,listener:function(){if(l.defaultPrevented){if(sn!==0){var j=m?gp(o,m):new FormData(o);tc(a,{pending:!0,data:j,method:o.method,action:u},null,j)}}else typeof u=="function"&&(y.preventDefault(),j=m?gp(o,m):new FormData(o),tc(a,{pending:!0,data:j,method:o.method,action:u},u,j))},currentTarget:o}]})}}for(var Lc=0;Lc<xo.length;Lc++){var Uc=xo[Lc],iy=Uc.toLowerCase(),oy=Uc[0].toUpperCase()+Uc.slice(1);la(iy,"on"+oy)}la(Xd,"onAnimationEnd"),la(Qd,"onAnimationIteration"),la(Pd,"onAnimationStart"),la("dblclick","onDoubleClick"),la("focusin","onFocus"),la("focusout","onBlur"),la(jx,"onTransitionRun"),la(Nx,"onTransitionStart"),la(_x,"onTransitionCancel"),la(Zd,"onTransitionEnd"),el("onMouseEnter",["mouseout","mouseover"]),el("onMouseLeave",["mouseout","mouseover"]),el("onPointerEnter",["pointerout","pointerover"]),el("onPointerLeave",["pointerout","pointerover"]),wn("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),wn("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),wn("onBeforeInput",["compositionend","keypress","textInput","paste"]),wn("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),wn("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),wn("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Ts="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(" "),cy=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(Ts));function vp(e,t){t=(t&4)!==0;for(var a=0;a<e.length;a++){var l=e[a],o=l.event;l=l.listeners;e:{var u=void 0;if(t)for(var m=l.length-1;0<=m;m--){var y=l[m],j=y.instance,R=y.currentTarget;if(y=y.listener,j!==u&&o.isPropagationStopped())break e;u=y,o.currentTarget=R;try{u(o)}catch(G){hr(G)}o.currentTarget=null,u=j}else for(m=0;m<l.length;m++){if(y=l[m],j=y.instance,R=y.currentTarget,y=y.listener,j!==u&&o.isPropagationStopped())break e;u=y,o.currentTarget=R;try{u(o)}catch(G){hr(G)}o.currentTarget=null,u=j}}}}function we(e,t){var a=t[Zi];a===void 0&&(a=t[Zi]=new Set);var l=e+"__bubble";a.has(l)||(xp(t,e,2,!1),a.add(l))}function Bc(e,t,a){var l=0;t&&(l|=4),xp(a,e,l,t)}var ti="_reactListening"+Math.random().toString(36).slice(2);function Hc(e){if(!e[ti]){e[ti]=!0,ud.forEach(function(a){a!=="selectionchange"&&(cy.has(a)||Bc(a,!1,e),Bc(a,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[ti]||(t[ti]=!0,Bc("selectionchange",!1,t))}}function xp(e,t,a,l){switch(Qp(t)){case 2:var o=Uy;break;case 8:o=By;break;default:o=eu}a=o.bind(null,t,a,e),o=void 0,!lo||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(o=!0),l?o!==void 0?e.addEventListener(t,a,{capture:!0,passive:o}):e.addEventListener(t,a,!0):o!==void 0?e.addEventListener(t,a,{passive:o}):e.addEventListener(t,a,!1)}function Gc(e,t,a,l,o){var u=l;if((t&1)===0&&(t&2)===0&&l!==null)e:for(;;){if(l===null)return;var m=l.tag;if(m===3||m===4){var y=l.stateNode.containerInfo;if(y===o)break;if(m===4)for(m=l.return;m!==null;){var j=m.tag;if((j===3||j===4)&&m.stateNode.containerInfo===o)return;m=m.return}for(;y!==null;){if(m=Fn(y),m===null)return;if(j=m.tag,j===5||j===6||j===26||j===27){l=u=m;continue e}y=y.parentNode}}l=l.return}Ed(function(){var R=u,G=ao(a),V=[];e:{var z=Jd.get(e);if(z!==void 0){var U=fr,ne=e;switch(e){case"keypress":if(ur(a)===0)break e;case"keydown":case"keyup":U=ax;break;case"focusin":ne="focus",U=oo;break;case"focusout":ne="blur",U=oo;break;case"beforeblur":case"afterblur":U=oo;break;case"click":if(a.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":U=Nd;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":U=Yv;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":U=sx;break;case Xd:case Qd:case Pd:U=Qv;break;case Zd:U=ix;break;case"scroll":case"scrollend":U=Iv;break;case"wheel":U=cx;break;case"copy":case"cut":case"paste":U=Zv;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":U=Cd;break;case"toggle":case"beforetoggle":U=dx}var de=(t&4)!==0,Be=!de&&(e==="scroll"||e==="scrollend"),k=de?z!==null?z+"Capture":null:z;de=[];for(var _=R,M;_!==null;){var K=_;if(M=K.stateNode,K=K.tag,K!==5&&K!==26&&K!==27||M===null||k===null||(K=Jl(_,k),K!=null&&de.push(As(_,K,M))),Be)break;_=_.return}0<de.length&&(z=new U(z,ne,null,a,G),V.push({event:z,listeners:de}))}}if((t&7)===0){e:{if(z=e==="mouseover"||e==="pointerover",U=e==="mouseout"||e==="pointerout",z&&a!==to&&(ne=a.relatedTarget||a.fromElement)&&(Fn(ne)||ne[Jn]))break e;if((U||z)&&(z=G.window===G?G:(z=G.ownerDocument)?z.defaultView||z.parentWindow:window,U?(ne=a.relatedTarget||a.toElement,U=R,ne=ne?Fn(ne):null,ne!==null&&(Be=f(ne),de=ne.tag,ne!==Be||de!==5&&de!==27&&de!==6)&&(ne=null)):(U=null,ne=R),U!==ne)){if(de=Nd,K="onMouseLeave",k="onMouseEnter",_="mouse",(e==="pointerout"||e==="pointerover")&&(de=Cd,K="onPointerLeave",k="onPointerEnter",_="pointer"),Be=U==null?z:Zl(U),M=ne==null?z:Zl(ne),z=new de(K,_+"leave",U,a,G),z.target=Be,z.relatedTarget=M,K=null,Fn(G)===R&&(de=new de(k,_+"enter",ne,a,G),de.target=M,de.relatedTarget=Be,K=de),Be=K,U&&ne)t:{for(de=uy,k=U,_=ne,M=0,K=k;K;K=de(K))M++;K=0;for(var ue=_;ue;ue=de(ue))K++;for(;0<M-K;)k=de(k),M--;for(;0<K-M;)_=de(_),K--;for(;M--;){if(k===_||_!==null&&k===_.alternate){de=k;break t}k=de(k),_=de(_)}de=null}else de=null;U!==null&&yp(V,z,U,de,!1),ne!==null&&Be!==null&&yp(V,Be,ne,de,!0)}}e:{if(z=R?Zl(R):window,U=z.nodeName&&z.nodeName.toLowerCase(),U==="select"||U==="input"&&z.type==="file")var ke=zd;else if(Md(z))if(Ld)ke=Sx;else{ke=yx;var re=xx}else U=z.nodeName,!U||U.toLowerCase()!=="input"||z.type!=="checkbox"&&z.type!=="radio"?R&&eo(R.elementType)&&(ke=zd):ke=bx;if(ke&&(ke=ke(e,R))){Rd(V,ke,a,G);break e}re&&re(e,z,R),e==="focusout"&&R&&z.type==="number"&&R.memoizedProps.value!=null&&Wi(z,"number",z.value)}switch(re=R?Zl(R):window,e){case"focusin":(Md(re)||re.contentEditable==="true")&&(rl=re,ho=R,ls=null);break;case"focusout":ls=ho=rl=null;break;case"mousedown":go=!0;break;case"contextmenu":case"mouseup":case"dragend":go=!1,Yd(V,a,G);break;case"selectionchange":if(wx)break;case"keydown":case"keyup":Yd(V,a,G)}var xe;if(uo)e:{switch(e){case"compositionstart":var _e="onCompositionStart";break e;case"compositionend":_e="onCompositionEnd";break e;case"compositionupdate":_e="onCompositionUpdate";break e}_e=void 0}else sl?Od(e,a)&&(_e="onCompositionEnd"):e==="keydown"&&a.keyCode===229&&(_e="onCompositionStart");_e&&(Td&&a.locale!=="ko"&&(sl||_e!=="onCompositionStart"?_e==="onCompositionEnd"&&sl&&(xe=wd()):(Ka=G,so="value"in Ka?Ka.value:Ka.textContent,sl=!0)),re=ai(R,_e),0<re.length&&(_e=new _d(_e,e,null,a,G),V.push({event:_e,listeners:re}),xe?_e.data=xe:(xe=Dd(a),xe!==null&&(_e.data=xe)))),(xe=mx?px(e,a):hx(e,a))&&(_e=ai(R,"onBeforeInput"),0<_e.length&&(re=new _d("onBeforeInput","beforeinput",null,a,G),V.push({event:re,listeners:_e}),re.data=xe)),ry(V,e,R,a,G)}vp(V,t)})}function As(e,t,a){return{instance:e,listener:t,currentTarget:a}}function ai(e,t){for(var a=t+"Capture",l=[];e!==null;){var o=e,u=o.stateNode;if(o=o.tag,o!==5&&o!==26&&o!==27||u===null||(o=Jl(e,a),o!=null&&l.unshift(As(e,o,u)),o=Jl(e,t),o!=null&&l.push(As(e,o,u))),e.tag===3)return l;e=e.return}return[]}function uy(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function yp(e,t,a,l,o){for(var u=t._reactName,m=[];a!==null&&a!==l;){var y=a,j=y.alternate,R=y.stateNode;if(y=y.tag,j!==null&&j===l)break;y!==5&&y!==26&&y!==27||R===null||(j=R,o?(R=Jl(a,u),R!=null&&m.unshift(As(a,R,j))):o||(R=Jl(a,u),R!=null&&m.push(As(a,R,j)))),a=a.return}m.length!==0&&e.push({event:t,listeners:m})}var dy=/\r\n?/g,fy=/\u0000|\uFFFD/g;function bp(e){return(typeof e=="string"?e:""+e).replace(dy,`
50
+ `).replace(fy,"")}function Sp(e,t){return t=bp(t),bp(e)===t}function Ue(e,t,a,l,o,u){switch(a){case"children":typeof l=="string"?t==="body"||t==="textarea"&&l===""||al(e,l):(typeof l=="number"||typeof l=="bigint")&&t!=="body"&&al(e,""+l);break;case"className":rr(e,"class",l);break;case"tabIndex":rr(e,"tabindex",l);break;case"dir":case"role":case"viewBox":case"width":case"height":rr(e,a,l);break;case"style":bd(e,l,u);break;case"data":if(t!=="object"){rr(e,"data",l);break}case"src":case"href":if(l===""&&(t!=="a"||a!=="href")){e.removeAttribute(a);break}if(l==null||typeof l=="function"||typeof l=="symbol"||typeof l=="boolean"){e.removeAttribute(a);break}l=or(""+l),e.setAttribute(a,l);break;case"action":case"formAction":if(typeof l=="function"){e.setAttribute(a,"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 u=="function"&&(a==="formAction"?(t!=="input"&&Ue(e,t,"name",o.name,o,null),Ue(e,t,"formEncType",o.formEncType,o,null),Ue(e,t,"formMethod",o.formMethod,o,null),Ue(e,t,"formTarget",o.formTarget,o,null)):(Ue(e,t,"encType",o.encType,o,null),Ue(e,t,"method",o.method,o,null),Ue(e,t,"target",o.target,o,null)));if(l==null||typeof l=="symbol"||typeof l=="boolean"){e.removeAttribute(a);break}l=or(""+l),e.setAttribute(a,l);break;case"onClick":l!=null&&(e.onclick=ya);break;case"onScroll":l!=null&&we("scroll",e);break;case"onScrollEnd":l!=null&&we("scrollend",e);break;case"dangerouslySetInnerHTML":if(l!=null){if(typeof l!="object"||!("__html"in l))throw Error(r(61));if(a=l.__html,a!=null){if(o.children!=null)throw Error(r(60));e.innerHTML=a}}break;case"multiple":e.multiple=l&&typeof l!="function"&&typeof l!="symbol";break;case"muted":e.muted=l&&typeof l!="function"&&typeof l!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(l==null||typeof l=="function"||typeof l=="boolean"||typeof l=="symbol"){e.removeAttribute("xlink:href");break}a=or(""+l),e.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",a);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":l!=null&&typeof l!="function"&&typeof l!="symbol"?e.setAttribute(a,""+l):e.removeAttribute(a);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":l&&typeof l!="function"&&typeof l!="symbol"?e.setAttribute(a,""):e.removeAttribute(a);break;case"capture":case"download":l===!0?e.setAttribute(a,""):l!==!1&&l!=null&&typeof l!="function"&&typeof l!="symbol"?e.setAttribute(a,l):e.removeAttribute(a);break;case"cols":case"rows":case"size":case"span":l!=null&&typeof l!="function"&&typeof l!="symbol"&&!isNaN(l)&&1<=l?e.setAttribute(a,l):e.removeAttribute(a);break;case"rowSpan":case"start":l==null||typeof l=="function"||typeof l=="symbol"||isNaN(l)?e.removeAttribute(a):e.setAttribute(a,l);break;case"popover":we("beforetoggle",e),we("toggle",e),sr(e,"popover",l);break;case"xlinkActuate":xa(e,"http://www.w3.org/1999/xlink","xlink:actuate",l);break;case"xlinkArcrole":xa(e,"http://www.w3.org/1999/xlink","xlink:arcrole",l);break;case"xlinkRole":xa(e,"http://www.w3.org/1999/xlink","xlink:role",l);break;case"xlinkShow":xa(e,"http://www.w3.org/1999/xlink","xlink:show",l);break;case"xlinkTitle":xa(e,"http://www.w3.org/1999/xlink","xlink:title",l);break;case"xlinkType":xa(e,"http://www.w3.org/1999/xlink","xlink:type",l);break;case"xmlBase":xa(e,"http://www.w3.org/XML/1998/namespace","xml:base",l);break;case"xmlLang":xa(e,"http://www.w3.org/XML/1998/namespace","xml:lang",l);break;case"xmlSpace":xa(e,"http://www.w3.org/XML/1998/namespace","xml:space",l);break;case"is":sr(e,"is",l);break;case"innerText":case"textContent":break;default:(!(2<a.length)||a[0]!=="o"&&a[0]!=="O"||a[1]!=="n"&&a[1]!=="N")&&(a=Gv.get(a)||a,sr(e,a,l))}}function qc(e,t,a,l,o,u){switch(a){case"style":bd(e,l,u);break;case"dangerouslySetInnerHTML":if(l!=null){if(typeof l!="object"||!("__html"in l))throw Error(r(61));if(a=l.__html,a!=null){if(o.children!=null)throw Error(r(60));e.innerHTML=a}}break;case"children":typeof l=="string"?al(e,l):(typeof l=="number"||typeof l=="bigint")&&al(e,""+l);break;case"onScroll":l!=null&&we("scroll",e);break;case"onScrollEnd":l!=null&&we("scrollend",e);break;case"onClick":l!=null&&(e.onclick=ya);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!dd.hasOwnProperty(a))e:{if(a[0]==="o"&&a[1]==="n"&&(o=a.endsWith("Capture"),t=a.slice(2,o?a.length-7:void 0),u=e[Tt]||null,u=u!=null?u[a]:null,typeof u=="function"&&e.removeEventListener(t,u,o),typeof l=="function")){typeof u!="function"&&u!==null&&(a in e?e[a]=null:e.hasAttribute(a)&&e.removeAttribute(a)),e.addEventListener(t,l,o);break e}a in e?e[a]=l:l===!0?e.setAttribute(a,""):sr(e,a,l)}}}function bt(e,t,a){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":we("error",e),we("load",e);var l=!1,o=!1,u;for(u in a)if(a.hasOwnProperty(u)){var m=a[u];if(m!=null)switch(u){case"src":l=!0;break;case"srcSet":o=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(r(137,t));default:Ue(e,t,u,m,a,null)}}o&&Ue(e,t,"srcSet",a.srcSet,a,null),l&&Ue(e,t,"src",a.src,a,null);return;case"input":we("invalid",e);var y=u=m=o=null,j=null,R=null;for(l in a)if(a.hasOwnProperty(l)){var G=a[l];if(G!=null)switch(l){case"name":o=G;break;case"type":m=G;break;case"checked":j=G;break;case"defaultChecked":R=G;break;case"value":u=G;break;case"defaultValue":y=G;break;case"children":case"dangerouslySetInnerHTML":if(G!=null)throw Error(r(137,t));break;default:Ue(e,t,l,G,a,null)}}gd(e,u,y,j,R,m,o,!1);return;case"select":we("invalid",e),l=m=u=null;for(o in a)if(a.hasOwnProperty(o)&&(y=a[o],y!=null))switch(o){case"value":u=y;break;case"defaultValue":m=y;break;case"multiple":l=y;default:Ue(e,t,o,y,a,null)}t=u,a=m,e.multiple=!!l,t!=null?tl(e,!!l,t,!1):a!=null&&tl(e,!!l,a,!0);return;case"textarea":we("invalid",e),u=o=l=null;for(m in a)if(a.hasOwnProperty(m)&&(y=a[m],y!=null))switch(m){case"value":l=y;break;case"defaultValue":o=y;break;case"children":u=y;break;case"dangerouslySetInnerHTML":if(y!=null)throw Error(r(91));break;default:Ue(e,t,m,y,a,null)}xd(e,l,o,u);return;case"option":for(j in a)if(a.hasOwnProperty(j)&&(l=a[j],l!=null))switch(j){case"selected":e.selected=l&&typeof l!="function"&&typeof l!="symbol";break;default:Ue(e,t,j,l,a,null)}return;case"dialog":we("beforetoggle",e),we("toggle",e),we("cancel",e),we("close",e);break;case"iframe":case"object":we("load",e);break;case"video":case"audio":for(l=0;l<Ts.length;l++)we(Ts[l],e);break;case"image":we("error",e),we("load",e);break;case"details":we("toggle",e);break;case"embed":case"source":case"link":we("error",e),we("load",e);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(R in a)if(a.hasOwnProperty(R)&&(l=a[R],l!=null))switch(R){case"children":case"dangerouslySetInnerHTML":throw Error(r(137,t));default:Ue(e,t,R,l,a,null)}return;default:if(eo(t)){for(G in a)a.hasOwnProperty(G)&&(l=a[G],l!==void 0&&qc(e,t,G,l,a,void 0));return}}for(y in a)a.hasOwnProperty(y)&&(l=a[y],l!=null&&Ue(e,t,y,l,a,null))}function my(e,t,a,l){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var o=null,u=null,m=null,y=null,j=null,R=null,G=null;for(U in a){var V=a[U];if(a.hasOwnProperty(U)&&V!=null)switch(U){case"checked":break;case"value":break;case"defaultValue":j=V;default:l.hasOwnProperty(U)||Ue(e,t,U,null,l,V)}}for(var z in l){var U=l[z];if(V=a[z],l.hasOwnProperty(z)&&(U!=null||V!=null))switch(z){case"type":u=U;break;case"name":o=U;break;case"checked":R=U;break;case"defaultChecked":G=U;break;case"value":m=U;break;case"defaultValue":y=U;break;case"children":case"dangerouslySetInnerHTML":if(U!=null)throw Error(r(137,t));break;default:U!==V&&Ue(e,t,z,U,l,V)}}$i(e,m,y,j,R,G,u,o);return;case"select":U=m=y=z=null;for(u in a)if(j=a[u],a.hasOwnProperty(u)&&j!=null)switch(u){case"value":break;case"multiple":U=j;default:l.hasOwnProperty(u)||Ue(e,t,u,null,l,j)}for(o in l)if(u=l[o],j=a[o],l.hasOwnProperty(o)&&(u!=null||j!=null))switch(o){case"value":z=u;break;case"defaultValue":y=u;break;case"multiple":m=u;default:u!==j&&Ue(e,t,o,u,l,j)}t=y,a=m,l=U,z!=null?tl(e,!!a,z,!1):!!l!=!!a&&(t!=null?tl(e,!!a,t,!0):tl(e,!!a,a?[]:"",!1));return;case"textarea":U=z=null;for(y in a)if(o=a[y],a.hasOwnProperty(y)&&o!=null&&!l.hasOwnProperty(y))switch(y){case"value":break;case"children":break;default:Ue(e,t,y,null,l,o)}for(m in l)if(o=l[m],u=a[m],l.hasOwnProperty(m)&&(o!=null||u!=null))switch(m){case"value":z=o;break;case"defaultValue":U=o;break;case"children":break;case"dangerouslySetInnerHTML":if(o!=null)throw Error(r(91));break;default:o!==u&&Ue(e,t,m,o,l,u)}vd(e,z,U);return;case"option":for(var ne in a)if(z=a[ne],a.hasOwnProperty(ne)&&z!=null&&!l.hasOwnProperty(ne))switch(ne){case"selected":e.selected=!1;break;default:Ue(e,t,ne,null,l,z)}for(j in l)if(z=l[j],U=a[j],l.hasOwnProperty(j)&&z!==U&&(z!=null||U!=null))switch(j){case"selected":e.selected=z&&typeof z!="function"&&typeof z!="symbol";break;default:Ue(e,t,j,z,l,U)}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 de in a)z=a[de],a.hasOwnProperty(de)&&z!=null&&!l.hasOwnProperty(de)&&Ue(e,t,de,null,l,z);for(R in l)if(z=l[R],U=a[R],l.hasOwnProperty(R)&&z!==U&&(z!=null||U!=null))switch(R){case"children":case"dangerouslySetInnerHTML":if(z!=null)throw Error(r(137,t));break;default:Ue(e,t,R,z,l,U)}return;default:if(eo(t)){for(var Be in a)z=a[Be],a.hasOwnProperty(Be)&&z!==void 0&&!l.hasOwnProperty(Be)&&qc(e,t,Be,void 0,l,z);for(G in l)z=l[G],U=a[G],!l.hasOwnProperty(G)||z===U||z===void 0&&U===void 0||qc(e,t,G,z,l,U);return}}for(var k in a)z=a[k],a.hasOwnProperty(k)&&z!=null&&!l.hasOwnProperty(k)&&Ue(e,t,k,null,l,z);for(V in l)z=l[V],U=a[V],!l.hasOwnProperty(V)||z===U||z==null&&U==null||Ue(e,t,V,z,l,U)}function Ep(e){switch(e){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function py(){if(typeof performance.getEntriesByType=="function"){for(var e=0,t=0,a=performance.getEntriesByType("resource"),l=0;l<a.length;l++){var o=a[l],u=o.transferSize,m=o.initiatorType,y=o.duration;if(u&&y&&Ep(m)){for(m=0,y=o.responseEnd,l+=1;l<a.length;l++){var j=a[l],R=j.startTime;if(R>y)break;var G=j.transferSize,V=j.initiatorType;G&&Ep(V)&&(j=j.responseEnd,m+=G*(j<y?1:(y-R)/(j-R)))}if(--l,t+=8*(u+m)/(o.duration/1e3),e++,10<e)break}}if(0<e)return t/e/1e6}return navigator.connection&&(e=navigator.connection.downlink,typeof e=="number")?e:5}var Ic=null,Kc=null;function ni(e){return e.nodeType===9?e:e.ownerDocument}function wp(e){switch(e){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function jp(e,t){if(e===0)switch(t){case"svg":return 1;case"math":return 2;default:return 0}return e===1&&t==="foreignObject"?0:e}function Yc(e,t){return e==="textarea"||e==="noscript"||typeof t.children=="string"||typeof t.children=="number"||typeof t.children=="bigint"||typeof t.dangerouslySetInnerHTML=="object"&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var Vc=null;function hy(){var e=window.event;return e&&e.type==="popstate"?e===Vc?!1:(Vc=e,!0):(Vc=null,!1)}var Np=typeof setTimeout=="function"?setTimeout:void 0,gy=typeof clearTimeout=="function"?clearTimeout:void 0,_p=typeof Promise=="function"?Promise:void 0,vy=typeof queueMicrotask=="function"?queueMicrotask:typeof _p<"u"?function(e){return _p.resolve(null).then(e).catch(xy)}:Np;function xy(e){setTimeout(function(){throw e})}function rn(e){return e==="head"}function Cp(e,t){var a=t,l=0;do{var o=a.nextSibling;if(e.removeChild(a),o&&o.nodeType===8)if(a=o.data,a==="/$"||a==="/&"){if(l===0){e.removeChild(o),Ml(t);return}l--}else if(a==="$"||a==="$?"||a==="$~"||a==="$!"||a==="&")l++;else if(a==="html")ks(e.ownerDocument.documentElement);else if(a==="head"){a=e.ownerDocument.head,ks(a);for(var u=a.firstChild;u;){var m=u.nextSibling,y=u.nodeName;u[Pl]||y==="SCRIPT"||y==="STYLE"||y==="LINK"&&u.rel.toLowerCase()==="stylesheet"||a.removeChild(u),u=m}}else a==="body"&&ks(e.ownerDocument.body);a=o}while(a);Ml(t)}function Tp(e,t){var a=e;e=0;do{var l=a.nextSibling;if(a.nodeType===1?t?(a._stashedDisplay=a.style.display,a.style.display="none"):(a.style.display=a._stashedDisplay||"",a.getAttribute("style")===""&&a.removeAttribute("style")):a.nodeType===3&&(t?(a._stashedText=a.nodeValue,a.nodeValue=""):a.nodeValue=a._stashedText||""),l&&l.nodeType===8)if(a=l.data,a==="/$"){if(e===0)break;e--}else a!=="$"&&a!=="$?"&&a!=="$~"&&a!=="$!"||e++;a=l}while(a)}function Xc(e){var t=e.firstChild;for(t&&t.nodeType===10&&(t=t.nextSibling);t;){var a=t;switch(t=t.nextSibling,a.nodeName){case"HTML":case"HEAD":case"BODY":Xc(a),Ji(a);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(a.rel.toLowerCase()==="stylesheet")continue}e.removeChild(a)}}function yy(e,t,a,l){for(;e.nodeType===1;){var o=a;if(e.nodeName.toLowerCase()!==t.toLowerCase()){if(!l&&(e.nodeName!=="INPUT"||e.type!=="hidden"))break}else if(l){if(!e[Pl])switch(t){case"meta":if(!e.hasAttribute("itemprop"))break;return e;case"link":if(u=e.getAttribute("rel"),u==="stylesheet"&&e.hasAttribute("data-precedence"))break;if(u!==o.rel||e.getAttribute("href")!==(o.href==null||o.href===""?null:o.href)||e.getAttribute("crossorigin")!==(o.crossOrigin==null?null:o.crossOrigin)||e.getAttribute("title")!==(o.title==null?null:o.title))break;return e;case"style":if(e.hasAttribute("data-precedence"))break;return e;case"script":if(u=e.getAttribute("src"),(u!==(o.src==null?null:o.src)||e.getAttribute("type")!==(o.type==null?null:o.type)||e.getAttribute("crossorigin")!==(o.crossOrigin==null?null:o.crossOrigin))&&u&&e.hasAttribute("async")&&!e.hasAttribute("itemprop"))break;return e;default:return e}}else if(t==="input"&&e.type==="hidden"){var u=o.name==null?null:""+o.name;if(o.type==="hidden"&&e.getAttribute("name")===u)return e}else return e;if(e=ta(e.nextSibling),e===null)break}return null}function by(e,t,a){if(t==="")return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!a||(e=ta(e.nextSibling),e===null))return null;return e}function Ap(e,t){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!t||(e=ta(e.nextSibling),e===null))return null;return e}function Qc(e){return e.data==="$?"||e.data==="$~"}function Pc(e){return e.data==="$!"||e.data==="$?"&&e.ownerDocument.readyState!=="loading"}function Sy(e,t){var a=e.ownerDocument;if(e.data==="$~")e._reactRetry=t;else if(e.data!=="$?"||a.readyState!=="loading")t();else{var l=function(){t(),a.removeEventListener("DOMContentLoaded",l)};a.addEventListener("DOMContentLoaded",l),e._reactRetry=l}}function ta(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t==="$"||t==="$!"||t==="$?"||t==="$~"||t==="&"||t==="F!"||t==="F")break;if(t==="/$"||t==="/&")return null}}return e}var Zc=null;function kp(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var a=e.data;if(a==="/$"||a==="/&"){if(t===0)return ta(e.nextSibling);t--}else a!=="$"&&a!=="$!"&&a!=="$?"&&a!=="$~"&&a!=="&"||t++}e=e.nextSibling}return null}function Op(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var a=e.data;if(a==="$"||a==="$!"||a==="$?"||a==="$~"||a==="&"){if(t===0)return e;t--}else a!=="/$"&&a!=="/&"||t++}e=e.previousSibling}return null}function Dp(e,t,a){switch(t=ni(a),e){case"html":if(e=t.documentElement,!e)throw Error(r(452));return e;case"head":if(e=t.head,!e)throw Error(r(453));return e;case"body":if(e=t.body,!e)throw Error(r(454));return e;default:throw Error(r(451))}}function ks(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);Ji(e)}var aa=new Map,Mp=new Set;function li(e){return typeof e.getRootNode=="function"?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var za=J.d;J.d={f:Ey,r:wy,D:jy,C:Ny,L:_y,m:Cy,X:Ay,S:Ty,M:ky};function Ey(){var e=za.f(),t=Zr();return e||t}function wy(e){var t=$n(e);t!==null&&t.tag===5&&t.type==="form"?Jf(t):za.r(e)}var kl=typeof document>"u"?null:document;function Rp(e,t,a){var l=kl;if(l&&typeof t=="string"&&t){var o=Pt(t);o='link[rel="'+e+'"][href="'+o+'"]',typeof a=="string"&&(o+='[crossorigin="'+a+'"]'),Mp.has(o)||(Mp.add(o),e={rel:e,crossOrigin:a,href:t},l.querySelector(o)===null&&(t=l.createElement("link"),bt(t,"link",e),ft(t),l.head.appendChild(t)))}}function jy(e){za.D(e),Rp("dns-prefetch",e,null)}function Ny(e,t){za.C(e,t),Rp("preconnect",e,t)}function _y(e,t,a){za.L(e,t,a);var l=kl;if(l&&e&&t){var o='link[rel="preload"][as="'+Pt(t)+'"]';t==="image"&&a&&a.imageSrcSet?(o+='[imagesrcset="'+Pt(a.imageSrcSet)+'"]',typeof a.imageSizes=="string"&&(o+='[imagesizes="'+Pt(a.imageSizes)+'"]')):o+='[href="'+Pt(e)+'"]';var u=o;switch(t){case"style":u=Ol(e);break;case"script":u=Dl(e)}aa.has(u)||(e=b({rel:"preload",href:t==="image"&&a&&a.imageSrcSet?void 0:e,as:t},a),aa.set(u,e),l.querySelector(o)!==null||t==="style"&&l.querySelector(Os(u))||t==="script"&&l.querySelector(Ds(u))||(t=l.createElement("link"),bt(t,"link",e),ft(t),l.head.appendChild(t)))}}function Cy(e,t){za.m(e,t);var a=kl;if(a&&e){var l=t&&typeof t.as=="string"?t.as:"script",o='link[rel="modulepreload"][as="'+Pt(l)+'"][href="'+Pt(e)+'"]',u=o;switch(l){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":u=Dl(e)}if(!aa.has(u)&&(e=b({rel:"modulepreload",href:e},t),aa.set(u,e),a.querySelector(o)===null)){switch(l){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(a.querySelector(Ds(u)))return}l=a.createElement("link"),bt(l,"link",e),ft(l),a.head.appendChild(l)}}}function Ty(e,t,a){za.S(e,t,a);var l=kl;if(l&&e){var o=Wn(l).hoistableStyles,u=Ol(e);t=t||"default";var m=o.get(u);if(!m){var y={loading:0,preload:null};if(m=l.querySelector(Os(u)))y.loading=5;else{e=b({rel:"stylesheet",href:e,"data-precedence":t},a),(a=aa.get(u))&&Jc(e,a);var j=m=l.createElement("link");ft(j),bt(j,"link",e),j._p=new Promise(function(R,G){j.onload=R,j.onerror=G}),j.addEventListener("load",function(){y.loading|=1}),j.addEventListener("error",function(){y.loading|=2}),y.loading|=4,si(m,t,l)}m={type:"stylesheet",instance:m,count:1,state:y},o.set(u,m)}}}function Ay(e,t){za.X(e,t);var a=kl;if(a&&e){var l=Wn(a).hoistableScripts,o=Dl(e),u=l.get(o);u||(u=a.querySelector(Ds(o)),u||(e=b({src:e,async:!0},t),(t=aa.get(o))&&Fc(e,t),u=a.createElement("script"),ft(u),bt(u,"link",e),a.head.appendChild(u)),u={type:"script",instance:u,count:1,state:null},l.set(o,u))}}function ky(e,t){za.M(e,t);var a=kl;if(a&&e){var l=Wn(a).hoistableScripts,o=Dl(e),u=l.get(o);u||(u=a.querySelector(Ds(o)),u||(e=b({src:e,async:!0,type:"module"},t),(t=aa.get(o))&&Fc(e,t),u=a.createElement("script"),ft(u),bt(u,"link",e),a.head.appendChild(u)),u={type:"script",instance:u,count:1,state:null},l.set(o,u))}}function zp(e,t,a,l){var o=(o=q.current)?li(o):null;if(!o)throw Error(r(446));switch(e){case"meta":case"title":return null;case"style":return typeof a.precedence=="string"&&typeof a.href=="string"?(t=Ol(a.href),a=Wn(o).hoistableStyles,l=a.get(t),l||(l={type:"style",instance:null,count:0,state:null},a.set(t,l)),l):{type:"void",instance:null,count:0,state:null};case"link":if(a.rel==="stylesheet"&&typeof a.href=="string"&&typeof a.precedence=="string"){e=Ol(a.href);var u=Wn(o).hoistableStyles,m=u.get(e);if(m||(o=o.ownerDocument||o,m={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},u.set(e,m),(u=o.querySelector(Os(e)))&&!u._p&&(m.instance=u,m.state.loading=5),aa.has(e)||(a={rel:"preload",as:"style",href:a.href,crossOrigin:a.crossOrigin,integrity:a.integrity,media:a.media,hrefLang:a.hrefLang,referrerPolicy:a.referrerPolicy},aa.set(e,a),u||Oy(o,e,a,m.state))),t&&l===null)throw Error(r(528,""));return m}if(t&&l!==null)throw Error(r(529,""));return null;case"script":return t=a.async,a=a.src,typeof a=="string"&&t&&typeof t!="function"&&typeof t!="symbol"?(t=Dl(a),a=Wn(o).hoistableScripts,l=a.get(t),l||(l={type:"script",instance:null,count:0,state:null},a.set(t,l)),l):{type:"void",instance:null,count:0,state:null};default:throw Error(r(444,e))}}function Ol(e){return'href="'+Pt(e)+'"'}function Os(e){return'link[rel="stylesheet"]['+e+"]"}function Lp(e){return b({},e,{"data-precedence":e.precedence,precedence:null})}function Oy(e,t,a,l){e.querySelector('link[rel="preload"][as="style"]['+t+"]")?l.loading=1:(t=e.createElement("link"),l.preload=t,t.addEventListener("load",function(){return l.loading|=1}),t.addEventListener("error",function(){return l.loading|=2}),bt(t,"link",a),ft(t),e.head.appendChild(t))}function Dl(e){return'[src="'+Pt(e)+'"]'}function Ds(e){return"script[async]"+e}function Up(e,t,a){if(t.count++,t.instance===null)switch(t.type){case"style":var l=e.querySelector('style[data-href~="'+Pt(a.href)+'"]');if(l)return t.instance=l,ft(l),l;var o=b({},a,{"data-href":a.href,"data-precedence":a.precedence,href:null,precedence:null});return l=(e.ownerDocument||e).createElement("style"),ft(l),bt(l,"style",o),si(l,a.precedence,e),t.instance=l;case"stylesheet":o=Ol(a.href);var u=e.querySelector(Os(o));if(u)return t.state.loading|=4,t.instance=u,ft(u),u;l=Lp(a),(o=aa.get(o))&&Jc(l,o),u=(e.ownerDocument||e).createElement("link"),ft(u);var m=u;return m._p=new Promise(function(y,j){m.onload=y,m.onerror=j}),bt(u,"link",l),t.state.loading|=4,si(u,a.precedence,e),t.instance=u;case"script":return u=Dl(a.src),(o=e.querySelector(Ds(u)))?(t.instance=o,ft(o),o):(l=a,(o=aa.get(u))&&(l=b({},a),Fc(l,o)),e=e.ownerDocument||e,o=e.createElement("script"),ft(o),bt(o,"link",l),e.head.appendChild(o),t.instance=o);case"void":return null;default:throw Error(r(443,t.type))}else t.type==="stylesheet"&&(t.state.loading&4)===0&&(l=t.instance,t.state.loading|=4,si(l,a.precedence,e));return t.instance}function si(e,t,a){for(var l=a.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),o=l.length?l[l.length-1]:null,u=o,m=0;m<l.length;m++){var y=l[m];if(y.dataset.precedence===t)u=y;else if(u!==o)break}u?u.parentNode.insertBefore(e,u.nextSibling):(t=a.nodeType===9?a.head:a,t.insertBefore(e,t.firstChild))}function Jc(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.title==null&&(e.title=t.title)}function Fc(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.integrity==null&&(e.integrity=t.integrity)}var ri=null;function Bp(e,t,a){if(ri===null){var l=new Map,o=ri=new Map;o.set(a,l)}else o=ri,l=o.get(a),l||(l=new Map,o.set(a,l));if(l.has(e))return l;for(l.set(e,null),a=a.getElementsByTagName(e),o=0;o<a.length;o++){var u=a[o];if(!(u[Pl]||u[gt]||e==="link"&&u.getAttribute("rel")==="stylesheet")&&u.namespaceURI!=="http://www.w3.org/2000/svg"){var m=u.getAttribute(t)||"";m=e+m;var y=l.get(m);y?y.push(u):l.set(m,[u])}}return l}function Hp(e,t,a){e=e.ownerDocument||e,e.head.insertBefore(a,t==="title"?e.querySelector("head > title"):null)}function Dy(e,t,a){if(a===1||t.itemProp!=null)return!1;switch(e){case"meta":case"title":return!0;case"style":if(typeof t.precedence!="string"||typeof t.href!="string"||t.href==="")break;return!0;case"link":if(typeof t.rel!="string"||typeof t.href!="string"||t.href===""||t.onLoad||t.onError)break;switch(t.rel){case"stylesheet":return e=t.disabled,typeof t.precedence=="string"&&e==null;default:return!0}case"script":if(t.async&&typeof t.async!="function"&&typeof t.async!="symbol"&&!t.onLoad&&!t.onError&&t.src&&typeof t.src=="string")return!0}return!1}function Gp(e){return!(e.type==="stylesheet"&&(e.state.loading&3)===0)}function My(e,t,a,l){if(a.type==="stylesheet"&&(typeof l.media!="string"||matchMedia(l.media).matches!==!1)&&(a.state.loading&4)===0){if(a.instance===null){var o=Ol(l.href),u=t.querySelector(Os(o));if(u){t=u._p,t!==null&&typeof t=="object"&&typeof t.then=="function"&&(e.count++,e=ii.bind(e),t.then(e,e)),a.state.loading|=4,a.instance=u,ft(u);return}u=t.ownerDocument||t,l=Lp(l),(o=aa.get(o))&&Jc(l,o),u=u.createElement("link"),ft(u);var m=u;m._p=new Promise(function(y,j){m.onload=y,m.onerror=j}),bt(u,"link",l),a.instance=u}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(a,t),(t=a.state.preload)&&(a.state.loading&3)===0&&(e.count++,a=ii.bind(e),t.addEventListener("load",a),t.addEventListener("error",a))}}var $c=0;function Ry(e,t){return e.stylesheets&&e.count===0&&ci(e,e.stylesheets),0<e.count||0<e.imgCount?function(a){var l=setTimeout(function(){if(e.stylesheets&&ci(e,e.stylesheets),e.unsuspend){var u=e.unsuspend;e.unsuspend=null,u()}},6e4+t);0<e.imgBytes&&$c===0&&($c=62500*py());var o=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&ci(e,e.stylesheets),e.unsuspend)){var u=e.unsuspend;e.unsuspend=null,u()}},(e.imgBytes>$c?50:800)+t);return e.unsuspend=a,function(){e.unsuspend=null,clearTimeout(l),clearTimeout(o)}}:null}function ii(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)ci(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var oi=null;function ci(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,oi=new Map,t.forEach(zy,e),oi=null,ii.call(e))}function zy(e,t){if(!(t.state.loading&4)){var a=oi.get(e);if(a)var l=a.get(null);else{a=new Map,oi.set(e,a);for(var o=e.querySelectorAll("link[data-precedence],style[data-precedence]"),u=0;u<o.length;u++){var m=o[u];(m.nodeName==="LINK"||m.getAttribute("media")!=="not all")&&(a.set(m.dataset.precedence,m),l=m)}l&&a.set(null,l)}o=t.instance,m=o.getAttribute("data-precedence"),u=a.get(m)||l,u===l&&a.set(null,o),a.set(m,o),this.count++,l=ii.bind(this),o.addEventListener("load",l),o.addEventListener("error",l),u?u.parentNode.insertBefore(o,u.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(o,e.firstChild)),t.state.loading|=4}}var Ms={$$typeof:Y,Provider:null,Consumer:null,_currentValue:ie,_currentValue2:ie,_threadCount:0};function Ly(e,t,a,l,o,u,m,y,j){this.tag=1,this.containerInfo=e,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=Xi(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Xi(0),this.hiddenUpdates=Xi(null),this.identifierPrefix=l,this.onUncaughtError=o,this.onCaughtError=u,this.onRecoverableError=m,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=j,this.incompleteTransitions=new Map}function qp(e,t,a,l,o,u,m,y,j,R,G,V){return e=new Ly(e,t,a,m,j,R,G,V,y),t=1,u===!0&&(t|=24),u=Bt(3,null,null,t),e.current=u,u.stateNode=e,t=Oo(),t.refCount++,e.pooledCache=t,t.refCount++,u.memoizedState={element:l,isDehydrated:a,cache:t},zo(u),e}function Ip(e){return e?(e=cl,e):cl}function Kp(e,t,a,l,o,u){o=Ip(o),l.context===null?l.context=o:l.pendingContext=o,l=Za(t),l.payload={element:a},u=u===void 0?null:u,u!==null&&(l.callback=u),a=Ja(e,l,t),a!==null&&(Rt(a,e,t),ds(a,e,t))}function Yp(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var a=e.retryLane;e.retryLane=a!==0&&a<t?a:t}}function Wc(e,t){Yp(e,t),(e=e.alternate)&&Yp(e,t)}function Vp(e){if(e.tag===13||e.tag===31){var t=Cn(e,67108864);t!==null&&Rt(t,e,67108864),Wc(e,67108864)}}function Xp(e){if(e.tag===13||e.tag===31){var t=Kt();t=Qi(t);var a=Cn(e,t);a!==null&&Rt(a,e,t),Wc(e,t)}}var ui=!0;function Uy(e,t,a,l){var o=L.T;L.T=null;var u=J.p;try{J.p=2,eu(e,t,a,l)}finally{J.p=u,L.T=o}}function By(e,t,a,l){var o=L.T;L.T=null;var u=J.p;try{J.p=8,eu(e,t,a,l)}finally{J.p=u,L.T=o}}function eu(e,t,a,l){if(ui){var o=tu(l);if(o===null)Gc(e,t,l,di,a),Pp(e,l);else if(Gy(o,e,t,a,l))l.stopPropagation();else if(Pp(e,l),t&4&&-1<Hy.indexOf(e)){for(;o!==null;){var u=$n(o);if(u!==null)switch(u.tag){case 3:if(u=u.stateNode,u.current.memoizedState.isDehydrated){var m=En(u.pendingLanes);if(m!==0){var y=u;for(y.pendingLanes|=2,y.entangledLanes|=2;m;){var j=1<<31-Lt(m);y.entanglements[1]|=j,m&=~j}pa(u),(De&6)===0&&(Qr=Ve()+500,Cs(0))}}break;case 31:case 13:y=Cn(u,2),y!==null&&Rt(y,u,2),Zr(),Wc(u,2)}if(u=tu(l),u===null&&Gc(e,t,l,di,a),u===o)break;o=u}o!==null&&l.stopPropagation()}else Gc(e,t,l,null,a)}}function tu(e){return e=ao(e),au(e)}var di=null;function au(e){if(di=null,e=Fn(e),e!==null){var t=f(e);if(t===null)e=null;else{var a=t.tag;if(a===13){if(e=p(t),e!==null)return e;e=null}else if(a===31){if(e=h(t),e!==null)return e;e=null}else if(a===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null)}}return di=e,null}function Qp(e){switch(e){case"beforetoggle":case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"toggle":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 2;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 8;case"message":switch(Et()){case Zn:return 2;case Xt:return 8;case dt:case Yl:return 32;case er:return 268435456;default:return 32}default:return 32}}var nu=!1,on=null,cn=null,un=null,Rs=new Map,zs=new Map,dn=[],Hy="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 Pp(e,t){switch(e){case"focusin":case"focusout":on=null;break;case"dragenter":case"dragleave":cn=null;break;case"mouseover":case"mouseout":un=null;break;case"pointerover":case"pointerout":Rs.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":zs.delete(t.pointerId)}}function Ls(e,t,a,l,o,u){return e===null||e.nativeEvent!==u?(e={blockedOn:t,domEventName:a,eventSystemFlags:l,nativeEvent:u,targetContainers:[o]},t!==null&&(t=$n(t),t!==null&&Vp(t)),e):(e.eventSystemFlags|=l,t=e.targetContainers,o!==null&&t.indexOf(o)===-1&&t.push(o),e)}function Gy(e,t,a,l,o){switch(t){case"focusin":return on=Ls(on,e,t,a,l,o),!0;case"dragenter":return cn=Ls(cn,e,t,a,l,o),!0;case"mouseover":return un=Ls(un,e,t,a,l,o),!0;case"pointerover":var u=o.pointerId;return Rs.set(u,Ls(Rs.get(u)||null,e,t,a,l,o)),!0;case"gotpointercapture":return u=o.pointerId,zs.set(u,Ls(zs.get(u)||null,e,t,a,l,o)),!0}return!1}function Zp(e){var t=Fn(e.target);if(t!==null){var a=f(t);if(a!==null){if(t=a.tag,t===13){if(t=p(a),t!==null){e.blockedOn=t,od(e.priority,function(){Xp(a)});return}}else if(t===31){if(t=h(a),t!==null){e.blockedOn=t,od(e.priority,function(){Xp(a)});return}}else if(t===3&&a.stateNode.current.memoizedState.isDehydrated){e.blockedOn=a.tag===3?a.stateNode.containerInfo:null;return}}}e.blockedOn=null}function fi(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var a=tu(e.nativeEvent);if(a===null){a=e.nativeEvent;var l=new a.constructor(a.type,a);to=l,a.target.dispatchEvent(l),to=null}else return t=$n(a),t!==null&&Vp(t),e.blockedOn=a,!1;t.shift()}return!0}function Jp(e,t,a){fi(e)&&a.delete(t)}function qy(){nu=!1,on!==null&&fi(on)&&(on=null),cn!==null&&fi(cn)&&(cn=null),un!==null&&fi(un)&&(un=null),Rs.forEach(Jp),zs.forEach(Jp)}function mi(e,t){e.blockedOn===t&&(e.blockedOn=null,nu||(nu=!0,n.unstable_scheduleCallback(n.unstable_NormalPriority,qy)))}var pi=null;function Fp(e){pi!==e&&(pi=e,n.unstable_scheduleCallback(n.unstable_NormalPriority,function(){pi===e&&(pi=null);for(var t=0;t<e.length;t+=3){var a=e[t],l=e[t+1],o=e[t+2];if(typeof l!="function"){if(au(l||a)===null)continue;break}var u=$n(a);u!==null&&(e.splice(t,3),t-=3,tc(u,{pending:!0,data:o,method:a.method,action:l},l,o))}}))}function Ml(e){function t(j){return mi(j,e)}on!==null&&mi(on,e),cn!==null&&mi(cn,e),un!==null&&mi(un,e),Rs.forEach(t),zs.forEach(t);for(var a=0;a<dn.length;a++){var l=dn[a];l.blockedOn===e&&(l.blockedOn=null)}for(;0<dn.length&&(a=dn[0],a.blockedOn===null);)Zp(a),a.blockedOn===null&&dn.shift();if(a=(e.ownerDocument||e).$$reactFormReplay,a!=null)for(l=0;l<a.length;l+=3){var o=a[l],u=a[l+1],m=o[Tt]||null;if(typeof u=="function")m||Fp(a);else if(m){var y=null;if(u&&u.hasAttribute("formAction")){if(o=u,m=u[Tt]||null)y=m.formAction;else if(au(o)!==null)continue}else y=m.action;typeof y=="function"?a[l+1]=y:(a.splice(l,3),l-=3),Fp(a)}}}function $p(){function e(u){u.canIntercept&&u.info==="react-transition"&&u.intercept({handler:function(){return new Promise(function(m){return o=m})},focusReset:"manual",scroll:"manual"})}function t(){o!==null&&(o(),o=null),l||setTimeout(a,20)}function a(){if(!l&&!navigation.transition){var u=navigation.currentEntry;u&&u.url!=null&&navigation.navigate(u.url,{state:u.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var l=!1,o=null;return navigation.addEventListener("navigate",e),navigation.addEventListener("navigatesuccess",t),navigation.addEventListener("navigateerror",t),setTimeout(a,100),function(){l=!0,navigation.removeEventListener("navigate",e),navigation.removeEventListener("navigatesuccess",t),navigation.removeEventListener("navigateerror",t),o!==null&&(o(),o=null)}}}function lu(e){this._internalRoot=e}hi.prototype.render=lu.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(r(409));var a=t.current,l=Kt();Kp(a,l,e,t,null,null)},hi.prototype.unmount=lu.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;Kp(e.current,2,null,e,null,null),Zr(),t[Jn]=null}};function hi(e){this._internalRoot=e}hi.prototype.unstable_scheduleHydration=function(e){if(e){var t=id();e={blockedOn:null,target:e,priority:t};for(var a=0;a<dn.length&&t!==0&&t<dn[a].priority;a++);dn.splice(a,0,e),a===0&&Zp(e)}};var Wp=i.version;if(Wp!=="19.2.4")throw Error(r(527,Wp,"19.2.4"));J.findDOMNode=function(e){var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(r(188)):(e=Object.keys(e).join(","),Error(r(268,e)));return e=g(t),e=e!==null?S(e):null,e=e===null?null:e.stateNode,e};var Iy={bundleType:0,version:"19.2.4",rendererPackageName:"react-dom",currentDispatcherRef:L,reconcilerVersion:"19.2.4"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var gi=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!gi.isDisabled&&gi.supportsFiber)try{Vl=gi.inject(Iy),zt=gi}catch{}}return Bs.createRoot=function(e,t){if(!d(e))throw Error(r(299));var a=!1,l="",o=rm,u=im,m=om;return t!=null&&(t.unstable_strictMode===!0&&(a=!0),t.identifierPrefix!==void 0&&(l=t.identifierPrefix),t.onUncaughtError!==void 0&&(o=t.onUncaughtError),t.onCaughtError!==void 0&&(u=t.onCaughtError),t.onRecoverableError!==void 0&&(m=t.onRecoverableError)),t=qp(e,1,!1,null,null,a,l,null,o,u,m,$p),e[Jn]=t.current,Hc(e),new lu(t)},Bs.hydrateRoot=function(e,t,a){if(!d(e))throw Error(r(299));var l=!1,o="",u=rm,m=im,y=om,j=null;return a!=null&&(a.unstable_strictMode===!0&&(l=!0),a.identifierPrefix!==void 0&&(o=a.identifierPrefix),a.onUncaughtError!==void 0&&(u=a.onUncaughtError),a.onCaughtError!==void 0&&(m=a.onCaughtError),a.onRecoverableError!==void 0&&(y=a.onRecoverableError),a.formState!==void 0&&(j=a.formState)),t=qp(e,1,!0,t,a??null,l,o,j,u,m,y,$p),t.context=Ip(null),a=t.current,l=Kt(),l=Qi(l),o=Za(l),o.callback=null,Ja(a,o,l),a=l,t.current.lanes=a,Ql(t,a),pa(t),e[Jn]=t.current,Hc(e),new hi(t)},Bs.version="19.2.4",Bs}var ch;function $y(){if(ch)return iu.exports;ch=1;function n(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(i){console.error(i)}}return n(),iu.exports=Fy(),iu.exports}var Wy=$y();const eb="modulepreload",tb=function(n){return"/"+n},uh={},ht=function(i,s,r){let d=Promise.resolve();if(s&&s.length>0){let p=function(g){return Promise.all(g.map(S=>Promise.resolve(S).then(b=>({status:"fulfilled",value:b}),b=>({status:"rejected",reason:b}))))};document.getElementsByTagName("link");const h=document.querySelector("meta[property=csp-nonce]"),x=(h==null?void 0:h.nonce)||(h==null?void 0:h.getAttribute("nonce"));d=p(s.map(g=>{if(g=tb(g),g in uh)return;uh[g]=!0;const S=g.endsWith(".css"),b=S?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${g}"]${b}`))return;const E=document.createElement("link");if(E.rel=S?"stylesheet":eb,S||(E.as="script"),E.crossOrigin="",E.href=g,x&&E.setAttribute("nonce",x),document.head.appendChild(E),S)return new Promise((w,C)=>{E.addEventListener("load",w),E.addEventListener("error",()=>C(new Error(`Unable to preload CSS for ${g}`)))})}))}function f(p){const h=new Event("vite:preloadError",{cancelable:!0});if(h.payload=p,window.dispatchEvent(h),!h.defaultPrevented)throw p}return d.then(p=>{for(const h of p||[])h.status==="rejected"&&f(h.reason);return i().catch(f)})},lg=v.createContext(null);function ab(){const n=v.useContext(lg);if(!n)throw new Error("useI18nContext must be used within I18nProvider");return n}const dh="maestro-locale",du="en";async function fh(n){switch(n){case"zh-CN":return(await ht(async()=>{const{default:i}=await import("./zh-CN-r3AvxxOL.js");return{default:i}},[])).default;case"en":default:return(await ht(async()=>{const{default:i}=await import("./en-2h6fD0j8.js");return{default:i}},[])).default}}function nb(n,i){const s=i.split(".");let r=n;for(const d of s){if(r==null||typeof r!="object")return i;r=r[d]}return typeof r=="string"?r:i}function lb(n,i){return i?n.replace(/\{\{(\w+)\}\}/g,(s,r)=>{var d;return((d=i[r])==null?void 0:d.toString())??`{{${r}}}`}):n}function sb({children:n,initialLocale:i}){const[s,r]=v.useState(()=>{if(i)return i;try{const b=localStorage.getItem(dh);if(b==="en"||b==="zh-CN")return b}catch{}return du}),[d,f]=v.useState({}),[p,h]=v.useState(!0);v.useEffect(()=>{let b=!1;async function E(){h(!0);try{const w=await fh(s);b||(f(w),h(!1))}catch(w){if(console.error(`Failed to load locale "${s}":`,w),!b){if(s!==du){const C=await fh(du);f(C)}h(!1)}}}return E(),()=>{b=!0}},[s]);const x=v.useMemo(()=>(b,E)=>{const w=nb(d,b);return lb(w,E)},[d]),g=v.useMemo(()=>b=>{try{localStorage.setItem(dh,b)}catch{}r(b)},[]),S=v.useMemo(()=>({locale:s,setLocale:g,t:x}),[s,g,x]);return p?null:c.jsx(lg.Provider,{value:S,children:n})}function St(){const{locale:n,setLocale:i,t:s}=ab();return{locale:n,setLocale:i,t:s}}var sg=ng();const rb=ag(sg);/**
51
+ * @remix-run/router v1.23.2
52
+ *
53
+ * Copyright (c) Remix Software Inc.
54
+ *
55
+ * This source code is licensed under the MIT license found in the
56
+ * LICENSE.md file in the root directory of this source tree.
57
+ *
58
+ * @license MIT
59
+ */function Zs(){return Zs=Object.assign?Object.assign.bind():function(n){for(var i=1;i<arguments.length;i++){var s=arguments[i];for(var r in s)Object.prototype.hasOwnProperty.call(s,r)&&(n[r]=s[r])}return n},Zs.apply(this,arguments)}var vn;(function(n){n.Pop="POP",n.Push="PUSH",n.Replace="REPLACE"})(vn||(vn={}));const mh="popstate";function ib(n){n===void 0&&(n={});function i(r,d){let{pathname:f,search:p,hash:h}=r.location;return ku("",{pathname:f,search:p,hash:h},d.state&&d.state.usr||null,d.state&&d.state.key||"default")}function s(r,d){return typeof d=="string"?d:Ri(d)}return cb(i,s,null,n)}function Ze(n,i){if(n===!1||n===null||typeof n>"u")throw new Error(i)}function Xu(n,i){if(!n){typeof console<"u"&&console.warn(i);try{throw new Error(i)}catch{}}}function ob(){return Math.random().toString(36).substr(2,8)}function ph(n,i){return{usr:n.state,key:n.key,idx:i}}function ku(n,i,s,r){return s===void 0&&(s=null),Zs({pathname:typeof n=="string"?n:n.pathname,search:"",hash:""},typeof i=="string"?Il(i):i,{state:s,key:i&&i.key||r||ob()})}function Ri(n){let{pathname:i="/",search:s="",hash:r=""}=n;return s&&s!=="?"&&(i+=s.charAt(0)==="?"?s:"?"+s),r&&r!=="#"&&(i+=r.charAt(0)==="#"?r:"#"+r),i}function Il(n){let i={};if(n){let s=n.indexOf("#");s>=0&&(i.hash=n.substr(s),n=n.substr(0,s));let r=n.indexOf("?");r>=0&&(i.search=n.substr(r),n=n.substr(0,r)),n&&(i.pathname=n)}return i}function cb(n,i,s,r){r===void 0&&(r={});let{window:d=document.defaultView,v5Compat:f=!1}=r,p=d.history,h=vn.Pop,x=null,g=S();g==null&&(g=0,p.replaceState(Zs({},p.state,{idx:g}),""));function S(){return(p.state||{idx:null}).idx}function b(){h=vn.Pop;let O=S(),T=O==null?null:O-g;g=O,x&&x({action:h,location:A.location,delta:T})}function E(O,T){h=vn.Push;let X=ku(A.location,O,T);g=S()+1;let Y=ph(X,g),P=A.createHref(X);try{p.pushState(Y,"",P)}catch(Z){if(Z instanceof DOMException&&Z.name==="DataCloneError")throw Z;d.location.assign(P)}f&&x&&x({action:h,location:A.location,delta:1})}function w(O,T){h=vn.Replace;let X=ku(A.location,O,T);g=S();let Y=ph(X,g),P=A.createHref(X);p.replaceState(Y,"",P),f&&x&&x({action:h,location:A.location,delta:0})}function C(O){let T=d.location.origin!=="null"?d.location.origin:d.location.href,X=typeof O=="string"?O:Ri(O);return X=X.replace(/ $/,"%20"),Ze(T,"No window.location.(origin|href) available to create URL for href: "+X),new URL(X,T)}let A={get action(){return h},get location(){return n(d,p)},listen(O){if(x)throw new Error("A history only accepts one active listener");return d.addEventListener(mh,b),x=O,()=>{d.removeEventListener(mh,b),x=null}},createHref(O){return i(d,O)},createURL:C,encodeLocation(O){let T=C(O);return{pathname:T.pathname,search:T.search,hash:T.hash}},push:E,replace:w,go(O){return p.go(O)}};return A}var hh;(function(n){n.data="data",n.deferred="deferred",n.redirect="redirect",n.error="error"})(hh||(hh={}));function ub(n,i,s){return s===void 0&&(s="/"),db(n,i,s)}function db(n,i,s,r){let d=typeof i=="string"?Il(i):i,f=ql(d.pathname||"/",s);if(f==null)return null;let p=rg(n);fb(p);let h=null;for(let x=0;h==null&&x<p.length;++x){let g=wb(f);h=Sb(p[x],g)}return h}function rg(n,i,s,r){i===void 0&&(i=[]),s===void 0&&(s=[]),r===void 0&&(r="");let d=(f,p,h)=>{let x={relativePath:h===void 0?f.path||"":h,caseSensitive:f.caseSensitive===!0,childrenIndex:p,route:f};x.relativePath.startsWith("/")&&(Ze(x.relativePath.startsWith(r),'Absolute route path "'+x.relativePath+'" nested under path '+('"'+r+'" is not valid. An absolute child route path ')+"must start with the combined path of all its parent routes."),x.relativePath=x.relativePath.slice(r.length));let g=xn([r,x.relativePath]),S=s.concat(x);f.children&&f.children.length>0&&(Ze(f.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+g+'".')),rg(f.children,i,S,g)),!(f.path==null&&!f.index)&&i.push({path:g,score:yb(g,f.index),routesMeta:S})};return n.forEach((f,p)=>{var h;if(f.path===""||!((h=f.path)!=null&&h.includes("?")))d(f,p);else for(let x of ig(f.path))d(f,p,x)}),i}function ig(n){let i=n.split("/");if(i.length===0)return[];let[s,...r]=i,d=s.endsWith("?"),f=s.replace(/\?$/,"");if(r.length===0)return d?[f,""]:[f];let p=ig(r.join("/")),h=[];return h.push(...p.map(x=>x===""?f:[f,x].join("/"))),d&&h.push(...p),h.map(x=>n.startsWith("/")&&x===""?"/":x)}function fb(n){n.sort((i,s)=>i.score!==s.score?s.score-i.score:bb(i.routesMeta.map(r=>r.childrenIndex),s.routesMeta.map(r=>r.childrenIndex)))}const mb=/^:[\w-]+$/,pb=3,hb=2,gb=1,vb=10,xb=-2,gh=n=>n==="*";function yb(n,i){let s=n.split("/"),r=s.length;return s.some(gh)&&(r+=xb),i&&(r+=hb),s.filter(d=>!gh(d)).reduce((d,f)=>d+(mb.test(f)?pb:f===""?gb:vb),r)}function bb(n,i){return n.length===i.length&&n.slice(0,-1).every((r,d)=>r===i[d])?n[n.length-1]-i[i.length-1]:0}function Sb(n,i,s){let{routesMeta:r}=n,d={},f="/",p=[];for(let h=0;h<r.length;++h){let x=r[h],g=h===r.length-1,S=f==="/"?i:i.slice(f.length)||"/",b=Ou({path:x.relativePath,caseSensitive:x.caseSensitive,end:g},S),E=x.route;if(!b)return null;Object.assign(d,b.params),p.push({params:d,pathname:xn([f,b.pathname]),pathnameBase:Tb(xn([f,b.pathnameBase])),route:E}),b.pathnameBase!=="/"&&(f=xn([f,b.pathnameBase]))}return p}function Ou(n,i){typeof n=="string"&&(n={path:n,caseSensitive:!1,end:!0});let[s,r]=Eb(n.path,n.caseSensitive,n.end),d=i.match(s);if(!d)return null;let f=d[0],p=f.replace(/(.)\/+$/,"$1"),h=d.slice(1);return{params:r.reduce((g,S,b)=>{let{paramName:E,isOptional:w}=S;if(E==="*"){let A=h[b]||"";p=f.slice(0,f.length-A.length).replace(/(.)\/+$/,"$1")}const C=h[b];return w&&!C?g[E]=void 0:g[E]=(C||"").replace(/%2F/g,"/"),g},{}),pathname:f,pathnameBase:p,pattern:n}}function Eb(n,i,s){i===void 0&&(i=!1),s===void 0&&(s=!0),Xu(n==="*"||!n.endsWith("*")||n.endsWith("/*"),'Route path "'+n+'" will be treated as if it were '+('"'+n.replace(/\*$/,"/*")+'" because the `*` character must ')+"always follow a `/` in the pattern. To get rid of this warning, "+('please change the route path to "'+n.replace(/\*$/,"/*")+'".'));let r=[],d="^"+n.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(p,h,x)=>(r.push({paramName:h,isOptional:x!=null}),x?"/?([^\\/]+)?":"/([^\\/]+)"));return n.endsWith("*")?(r.push({paramName:"*"}),d+=n==="*"||n==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):s?d+="\\/*$":n!==""&&n!=="/"&&(d+="(?:(?=\\/|$))"),[new RegExp(d,i?void 0:"i"),r]}function wb(n){try{return n.split("/").map(i=>decodeURIComponent(i).replace(/\//g,"%2F")).join("/")}catch(i){return Xu(!1,'The URL path "'+n+'" could not be decoded because it is is a malformed URL segment. This is probably due to a bad percent '+("encoding ("+i+").")),n}}function ql(n,i){if(i==="/")return n;if(!n.toLowerCase().startsWith(i.toLowerCase()))return null;let s=i.endsWith("/")?i.length-1:i.length,r=n.charAt(s);return r&&r!=="/"?null:n.slice(s)||"/"}const jb=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Nb=n=>jb.test(n);function _b(n,i){i===void 0&&(i="/");let{pathname:s,search:r="",hash:d=""}=typeof n=="string"?Il(n):n,f;if(s)if(Nb(s))f=s;else{if(s.includes("//")){let p=s;s=s.replace(/\/\/+/g,"/"),Xu(!1,"Pathnames cannot have embedded double slashes - normalizing "+(p+" -> "+s))}s.startsWith("/")?f=vh(s.substring(1),"/"):f=vh(s,i)}else f=i;return{pathname:f,search:Ab(r),hash:kb(d)}}function vh(n,i){let s=i.replace(/\/+$/,"").split("/");return n.split("/").forEach(d=>{d===".."?s.length>1&&s.pop():d!=="."&&s.push(d)}),s.length>1?s.join("/"):"/"}function fu(n,i,s,r){return"Cannot include a '"+n+"' character in a manually specified "+("`to."+i+"` field ["+JSON.stringify(r)+"]. Please separate it out to the ")+("`to."+s+"` field. Alternatively you may provide the full path as ")+'a string in <Link to="..."> and the router will parse it for you.'}function Cb(n){return n.filter((i,s)=>s===0||i.route.path&&i.route.path.length>0)}function Qu(n,i){let s=Cb(n);return i?s.map((r,d)=>d===s.length-1?r.pathname:r.pathnameBase):s.map(r=>r.pathnameBase)}function Pu(n,i,s,r){r===void 0&&(r=!1);let d;typeof n=="string"?d=Il(n):(d=Zs({},n),Ze(!d.pathname||!d.pathname.includes("?"),fu("?","pathname","search",d)),Ze(!d.pathname||!d.pathname.includes("#"),fu("#","pathname","hash",d)),Ze(!d.search||!d.search.includes("#"),fu("#","search","hash",d)));let f=n===""||d.pathname==="",p=f?"/":d.pathname,h;if(p==null)h=s;else{let b=i.length-1;if(!r&&p.startsWith("..")){let E=p.split("/");for(;E[0]==="..";)E.shift(),b-=1;d.pathname=E.join("/")}h=b>=0?i[b]:"/"}let x=_b(d,h),g=p&&p!=="/"&&p.endsWith("/"),S=(f||p===".")&&s.endsWith("/");return!x.pathname.endsWith("/")&&(g||S)&&(x.pathname+="/"),x}const xn=n=>n.join("/").replace(/\/\/+/g,"/"),Tb=n=>n.replace(/\/+$/,"").replace(/^\/*/,"/"),Ab=n=>!n||n==="?"?"":n.startsWith("?")?n:"?"+n,kb=n=>!n||n==="#"?"":n.startsWith("#")?n:"#"+n;function Ob(n){return n!=null&&typeof n.status=="number"&&typeof n.statusText=="string"&&typeof n.internal=="boolean"&&"data"in n}const og=["post","put","patch","delete"];new Set(og);const Db=["get",...og];new Set(Db);/**
60
+ * React Router v6.30.3
61
+ *
62
+ * Copyright (c) Remix Software Inc.
63
+ *
64
+ * This source code is licensed under the MIT license found in the
65
+ * LICENSE.md file in the root directory of this source tree.
66
+ *
67
+ * @license MIT
68
+ */function Js(){return Js=Object.assign?Object.assign.bind():function(n){for(var i=1;i<arguments.length;i++){var s=arguments[i];for(var r in s)Object.prototype.hasOwnProperty.call(s,r)&&(n[r]=s[r])}return n},Js.apply(this,arguments)}const Bi=v.createContext(null),cg=v.createContext(null),Ba=v.createContext(null),Hi=v.createContext(null),va=v.createContext({outlet:null,matches:[],isDataRoute:!1}),ug=v.createContext(null);function Mb(n,i){let{relative:s}=i===void 0?{}:i;Kl()||Ze(!1);let{basename:r,navigator:d}=v.useContext(Ba),{hash:f,pathname:p,search:h}=qi(n,{relative:s}),x=p;return r!=="/"&&(x=p==="/"?r:xn([r,p])),d.createHref({pathname:x,search:h,hash:f})}function Kl(){return v.useContext(Hi)!=null}function Ha(){return Kl()||Ze(!1),v.useContext(Hi).location}function dg(n){v.useContext(Ba).static||v.useLayoutEffect(n)}function Gi(){let{isDataRoute:n}=v.useContext(va);return n?Pb():Rb()}function Rb(){Kl()||Ze(!1);let n=v.useContext(Bi),{basename:i,future:s,navigator:r}=v.useContext(Ba),{matches:d}=v.useContext(va),{pathname:f}=Ha(),p=JSON.stringify(Qu(d,s.v7_relativeSplatPath)),h=v.useRef(!1);return dg(()=>{h.current=!0}),v.useCallback(function(g,S){if(S===void 0&&(S={}),!h.current)return;if(typeof g=="number"){r.go(g);return}let b=Pu(g,JSON.parse(p),f,S.relative==="path");n==null&&i!=="/"&&(b.pathname=b.pathname==="/"?i:xn([i,b.pathname])),(S.replace?r.replace:r.push)(b,S.state,S)},[i,r,p,f,n])}const zb=v.createContext(null);function Lb(n){let i=v.useContext(va).outlet;return i&&v.createElement(zb.Provider,{value:n},i)}function Qj(){let{matches:n}=v.useContext(va),i=n[n.length-1];return i?i.params:{}}function qi(n,i){let{relative:s}=i===void 0?{}:i,{future:r}=v.useContext(Ba),{matches:d}=v.useContext(va),{pathname:f}=Ha(),p=JSON.stringify(Qu(d,r.v7_relativeSplatPath));return v.useMemo(()=>Pu(n,JSON.parse(p),f,s==="path"),[n,p,f,s])}function Ub(n,i){return Bb(n,i)}function Bb(n,i,s,r){Kl()||Ze(!1);let{navigator:d}=v.useContext(Ba),{matches:f}=v.useContext(va),p=f[f.length-1],h=p?p.params:{};p&&p.pathname;let x=p?p.pathnameBase:"/";p&&p.route;let g=Ha(),S;if(i){var b;let O=typeof i=="string"?Il(i):i;x==="/"||(b=O.pathname)!=null&&b.startsWith(x)||Ze(!1),S=O}else S=g;let E=S.pathname||"/",w=E;if(x!=="/"){let O=x.replace(/^\//,"").split("/");w="/"+E.replace(/^\//,"").split("/").slice(O.length).join("/")}let C=ub(n,{pathname:w}),A=Kb(C&&C.map(O=>Object.assign({},O,{params:Object.assign({},h,O.params),pathname:xn([x,d.encodeLocation?d.encodeLocation(O.pathname).pathname:O.pathname]),pathnameBase:O.pathnameBase==="/"?x:xn([x,d.encodeLocation?d.encodeLocation(O.pathnameBase).pathname:O.pathnameBase])})),f,s,r);return i&&A?v.createElement(Hi.Provider,{value:{location:Js({pathname:"/",search:"",hash:"",state:null,key:"default"},S),navigationType:vn.Pop}},A):A}function Hb(){let n=Qb(),i=Ob(n)?n.status+" "+n.statusText:n instanceof Error?n.message:JSON.stringify(n),s=n instanceof Error?n.stack:null,d={padding:"0.5rem",backgroundColor:"rgba(200,200,200, 0.5)"};return v.createElement(v.Fragment,null,v.createElement("h2",null,"Unexpected Application Error!"),v.createElement("h3",{style:{fontStyle:"italic"}},i),s?v.createElement("pre",{style:d},s):null,null)}const Gb=v.createElement(Hb,null);class qb extends v.Component{constructor(i){super(i),this.state={location:i.location,revalidation:i.revalidation,error:i.error}}static getDerivedStateFromError(i){return{error:i}}static getDerivedStateFromProps(i,s){return s.location!==i.location||s.revalidation!=="idle"&&i.revalidation==="idle"?{error:i.error,location:i.location,revalidation:i.revalidation}:{error:i.error!==void 0?i.error:s.error,location:s.location,revalidation:i.revalidation||s.revalidation}}componentDidCatch(i,s){console.error("React Router caught the following error during render",i,s)}render(){return this.state.error!==void 0?v.createElement(va.Provider,{value:this.props.routeContext},v.createElement(ug.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function Ib(n){let{routeContext:i,match:s,children:r}=n,d=v.useContext(Bi);return d&&d.static&&d.staticContext&&(s.route.errorElement||s.route.ErrorBoundary)&&(d.staticContext._deepestRenderedBoundaryId=s.route.id),v.createElement(va.Provider,{value:i},r)}function Kb(n,i,s,r){var d;if(i===void 0&&(i=[]),s===void 0&&(s=null),r===void 0&&(r=null),n==null){var f;if(!s)return null;if(s.errors)n=s.matches;else if((f=r)!=null&&f.v7_partialHydration&&i.length===0&&!s.initialized&&s.matches.length>0)n=s.matches;else return null}let p=n,h=(d=s)==null?void 0:d.errors;if(h!=null){let S=p.findIndex(b=>b.route.id&&(h==null?void 0:h[b.route.id])!==void 0);S>=0||Ze(!1),p=p.slice(0,Math.min(p.length,S+1))}let x=!1,g=-1;if(s&&r&&r.v7_partialHydration)for(let S=0;S<p.length;S++){let b=p[S];if((b.route.HydrateFallback||b.route.hydrateFallbackElement)&&(g=S),b.route.id){let{loaderData:E,errors:w}=s,C=b.route.loader&&E[b.route.id]===void 0&&(!w||w[b.route.id]===void 0);if(b.route.lazy||C){x=!0,g>=0?p=p.slice(0,g+1):p=[p[0]];break}}}return p.reduceRight((S,b,E)=>{let w,C=!1,A=null,O=null;s&&(w=h&&b.route.id?h[b.route.id]:void 0,A=b.route.errorElement||Gb,x&&(g<0&&E===0?(Zb("route-fallback"),C=!0,O=null):g===E&&(C=!0,O=b.route.hydrateFallbackElement||null)));let T=i.concat(p.slice(0,E+1)),X=()=>{let Y;return w?Y=A:C?Y=O:b.route.Component?Y=v.createElement(b.route.Component,null):b.route.element?Y=b.route.element:Y=S,v.createElement(Ib,{match:b,routeContext:{outlet:S,matches:T,isDataRoute:s!=null},children:Y})};return s&&(b.route.ErrorBoundary||b.route.errorElement||E===0)?v.createElement(qb,{location:s.location,revalidation:s.revalidation,component:A,error:w,children:X(),routeContext:{outlet:null,matches:T,isDataRoute:!0}}):X()},null)}var fg=(function(n){return n.UseBlocker="useBlocker",n.UseRevalidator="useRevalidator",n.UseNavigateStable="useNavigate",n})(fg||{}),mg=(function(n){return n.UseBlocker="useBlocker",n.UseLoaderData="useLoaderData",n.UseActionData="useActionData",n.UseRouteError="useRouteError",n.UseNavigation="useNavigation",n.UseRouteLoaderData="useRouteLoaderData",n.UseMatches="useMatches",n.UseRevalidator="useRevalidator",n.UseNavigateStable="useNavigate",n.UseRouteId="useRouteId",n})(mg||{});function Yb(n){let i=v.useContext(Bi);return i||Ze(!1),i}function Vb(n){let i=v.useContext(cg);return i||Ze(!1),i}function Xb(n){let i=v.useContext(va);return i||Ze(!1),i}function pg(n){let i=Xb(),s=i.matches[i.matches.length-1];return s.route.id||Ze(!1),s.route.id}function Qb(){var n;let i=v.useContext(ug),s=Vb(),r=pg();return i!==void 0?i:(n=s.errors)==null?void 0:n[r]}function Pb(){let{router:n}=Yb(fg.UseNavigateStable),i=pg(mg.UseNavigateStable),s=v.useRef(!1);return dg(()=>{s.current=!0}),v.useCallback(function(d,f){f===void 0&&(f={}),s.current&&(typeof d=="number"?n.navigate(d):n.navigate(d,Js({fromRouteId:i},f)))},[n,i])}const xh={};function Zb(n,i,s){xh[n]||(xh[n]=!0)}function Jb(n,i){n==null||n.v7_startTransition,n==null||n.v7_relativeSplatPath}function mu(n){let{to:i,replace:s,state:r,relative:d}=n;Kl()||Ze(!1);let{future:f,static:p}=v.useContext(Ba),{matches:h}=v.useContext(va),{pathname:x}=Ha(),g=Gi(),S=Pu(i,Qu(h,f.v7_relativeSplatPath),x,d==="path"),b=JSON.stringify(S);return v.useEffect(()=>g(JSON.parse(b),{replace:s,state:r,relative:d}),[g,b,d,s,r]),null}function Fb(n){return Lb(n.context)}function pt(n){Ze(!1)}function $b(n){let{basename:i="/",children:s=null,location:r,navigationType:d=vn.Pop,navigator:f,static:p=!1,future:h}=n;Kl()&&Ze(!1);let x=i.replace(/^\/*/,"/"),g=v.useMemo(()=>({basename:x,navigator:f,static:p,future:Js({v7_relativeSplatPath:!1},h)}),[x,h,f,p]);typeof r=="string"&&(r=Il(r));let{pathname:S="/",search:b="",hash:E="",state:w=null,key:C="default"}=r,A=v.useMemo(()=>{let O=ql(S,x);return O==null?null:{location:{pathname:O,search:b,hash:E,state:w,key:C},navigationType:d}},[x,S,b,E,w,C,d]);return A==null?null:v.createElement(Ba.Provider,{value:g},v.createElement(Hi.Provider,{children:s,value:A}))}function Wb(n){let{children:i,location:s}=n;return Ub(Du(i),s)}new Promise(()=>{});function Du(n,i){i===void 0&&(i=[]);let s=[];return v.Children.forEach(n,(r,d)=>{if(!v.isValidElement(r))return;let f=[...i,d];if(r.type===v.Fragment){s.push.apply(s,Du(r.props.children,f));return}r.type!==pt&&Ze(!1),!r.props.index||!r.props.children||Ze(!1);let p={id:r.props.id||f.join("-"),caseSensitive:r.props.caseSensitive,element:r.props.element,Component:r.props.Component,index:r.props.index,path:r.props.path,loader:r.props.loader,action:r.props.action,errorElement:r.props.errorElement,ErrorBoundary:r.props.ErrorBoundary,hasErrorBoundary:r.props.ErrorBoundary!=null||r.props.errorElement!=null,shouldRevalidate:r.props.shouldRevalidate,handle:r.props.handle,lazy:r.props.lazy};r.props.children&&(p.children=Du(r.props.children,f)),s.push(p)}),s}/**
69
+ * React Router DOM v6.30.3
70
+ *
71
+ * Copyright (c) Remix Software Inc.
72
+ *
73
+ * This source code is licensed under the MIT license found in the
74
+ * LICENSE.md file in the root directory of this source tree.
75
+ *
76
+ * @license MIT
77
+ */function zi(){return zi=Object.assign?Object.assign.bind():function(n){for(var i=1;i<arguments.length;i++){var s=arguments[i];for(var r in s)Object.prototype.hasOwnProperty.call(s,r)&&(n[r]=s[r])}return n},zi.apply(this,arguments)}function hg(n,i){if(n==null)return{};var s={},r=Object.keys(n),d,f;for(f=0;f<r.length;f++)d=r[f],!(i.indexOf(d)>=0)&&(s[d]=n[d]);return s}function e0(n){return!!(n.metaKey||n.altKey||n.ctrlKey||n.shiftKey)}function t0(n,i){return n.button===0&&(!i||i==="_self")&&!e0(n)}const a0=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset","viewTransition"],n0=["aria-current","caseSensitive","className","end","style","to","viewTransition","children"],l0="6";try{window.__reactRouterVersion=l0}catch{}const s0=v.createContext({isTransitioning:!1}),r0="startTransition",yh=Vu[r0];function i0(n){let{basename:i,children:s,future:r,window:d}=n,f=v.useRef();f.current==null&&(f.current=ib({window:d,v5Compat:!0}));let p=f.current,[h,x]=v.useState({action:p.action,location:p.location}),{v7_startTransition:g}=r||{},S=v.useCallback(b=>{g&&yh?yh(()=>x(b)):x(b)},[x,g]);return v.useLayoutEffect(()=>p.listen(S),[p,S]),v.useEffect(()=>Jb(r),[r]),v.createElement($b,{basename:i,children:s,location:h.location,navigationType:h.action,navigator:p,future:r})}const o0=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",c0=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,gg=v.forwardRef(function(i,s){let{onClick:r,relative:d,reloadDocument:f,replace:p,state:h,target:x,to:g,preventScrollReset:S,viewTransition:b}=i,E=hg(i,a0),{basename:w}=v.useContext(Ba),C,A=!1;if(typeof g=="string"&&c0.test(g)&&(C=g,o0))try{let Y=new URL(window.location.href),P=g.startsWith("//")?new URL(Y.protocol+g):new URL(g),Z=ql(P.pathname,w);P.origin===Y.origin&&Z!=null?g=Z+P.search+P.hash:A=!0}catch{}let O=Mb(g,{relative:d}),T=f0(g,{replace:p,state:h,target:x,preventScrollReset:S,relative:d,viewTransition:b});function X(Y){r&&r(Y),Y.defaultPrevented||T(Y)}return v.createElement("a",zi({},E,{href:C||O,onClick:A||f?r:X,ref:s,target:x}))}),u0=v.forwardRef(function(i,s){let{"aria-current":r="page",caseSensitive:d=!1,className:f="",end:p=!1,style:h,to:x,viewTransition:g,children:S}=i,b=hg(i,n0),E=qi(x,{relative:b.relative}),w=Ha(),C=v.useContext(cg),{navigator:A,basename:O}=v.useContext(Ba),T=C!=null&&m0(E)&&g===!0,X=A.encodeLocation?A.encodeLocation(E).pathname:E.pathname,Y=w.pathname,P=C&&C.navigation&&C.navigation.location?C.navigation.location.pathname:null;d||(Y=Y.toLowerCase(),P=P?P.toLowerCase():null,X=X.toLowerCase()),P&&O&&(P=ql(P,O)||P);const Z=X!=="/"&&X.endsWith("/")?X.length-1:X.length;let te=Y===X||!p&&Y.startsWith(X)&&Y.charAt(Z)==="/",H=P!=null&&(P===X||!p&&P.startsWith(X)&&P.charAt(X.length)==="/"),Q={isActive:te,isPending:H,isTransitioning:T},fe=te?r:void 0,He;typeof f=="function"?He=f(Q):He=[f,te?"active":null,H?"pending":null,T?"transitioning":null].filter(Boolean).join(" ");let Ae=typeof h=="function"?h(Q):h;return v.createElement(gg,zi({},b,{"aria-current":fe,className:He,ref:s,style:Ae,to:x,viewTransition:g}),typeof S=="function"?S(Q):S)});var Mu;(function(n){n.UseScrollRestoration="useScrollRestoration",n.UseSubmit="useSubmit",n.UseSubmitFetcher="useSubmitFetcher",n.UseFetcher="useFetcher",n.useViewTransitionState="useViewTransitionState"})(Mu||(Mu={}));var bh;(function(n){n.UseFetcher="useFetcher",n.UseFetchers="useFetchers",n.UseScrollRestoration="useScrollRestoration"})(bh||(bh={}));function d0(n){let i=v.useContext(Bi);return i||Ze(!1),i}function f0(n,i){let{target:s,replace:r,state:d,preventScrollReset:f,relative:p,viewTransition:h}=i===void 0?{}:i,x=Gi(),g=Ha(),S=qi(n,{relative:p});return v.useCallback(b=>{if(t0(b,s)){b.preventDefault();let E=r!==void 0?r:Ri(g)===Ri(S);x(n,{replace:E,state:d,preventScrollReset:f,relative:p,viewTransition:h})}},[g,x,S,r,d,s,n,f,p,h])}function m0(n,i){i===void 0&&(i={});let s=v.useContext(s0);s==null&&Ze(!1);let{basename:r}=d0(Mu.useViewTransitionState),d=qi(n,{relative:i.relative});if(!s.isTransitioning)return!1;let f=ql(s.currentLocation.pathname,r)||s.currentLocation.pathname,p=ql(s.nextLocation.pathname,r)||s.nextLocation.pathname;return Ou(d.pathname,p)!=null||Ou(d.pathname,f)!=null}const Sh=n=>{let i;const s=new Set,r=(g,S)=>{const b=typeof g=="function"?g(i):g;if(!Object.is(b,i)){const E=i;i=S??(typeof b!="object"||b===null)?b:Object.assign({},i,b),s.forEach(w=>w(i,E))}},d=()=>i,h={setState:r,getState:d,getInitialState:()=>x,subscribe:g=>(s.add(g),()=>s.delete(g))},x=i=n(r,d,h);return h},p0=(n=>n?Sh(n):Sh),h0=n=>n;function g0(n,i=h0){const s=Vs.useSyncExternalStore(n.subscribe,Vs.useCallback(()=>i(n.getState()),[n,i]),Vs.useCallback(()=>i(n.getInitialState()),[n,i]));return Vs.useDebugValue(s),s}const Eh=n=>{const i=p0(n),s=r=>g0(i,r);return Object.assign(s,i),s},_t=(n=>n?Eh(n):Eh);function pu(n){return Array.isArray(n)?n.map(i=>{if(typeof i=="string")return i;if(i&&typeof i=="object"){const s=i;if(typeof s.description=="string")return s.description;if(typeof s.requirement=="string")return s.requirement;if(typeof s.text=="string")return s.text;if(typeof s.id=="string")return`Gap ${s.id}`}return String(i)}):[]}function wh(n){const i=n,s=i.verification??{},r=i.validation??{},d=i.uat??{};return{...n,goal:n.goal??"",success_criteria:n.success_criteria??[],requirements:n.requirements??[],spec_ref:n.spec_ref??null,plan:n.plan??{task_ids:[],task_count:0,complexity:null,waves:[]},execution:n.execution??{method:"",started_at:null,completed_at:null,tasks_completed:0,tasks_total:0,current_wave:0,commits:[]},verification:{status:String(s.status??"pending"),verified_at:s.verified_at??null,must_haves:Array.isArray(s.must_haves)?s.must_haves:[],gaps:pu(s.gaps)},validation:{status:String(r.status??"pending"),test_coverage:typeof r.test_coverage=="number"||r.test_coverage&&typeof r.test_coverage=="object"?r.test_coverage:null,gaps:pu(r.gaps)},uat:{status:String(d.status??"pending"),test_count:typeof d.test_count=="number"?d.test_count:0,passed:typeof d.passed=="number"?d.passed:0,gaps:pu(d.gaps)},reflection:i.reflection??{rounds:0,strategy_adjustments:[]}}}const Vt=_t(n=>({board:null,connected:!1,selectedPhase:null,workspace:null,setBoard:i=>{i&&(i={...i,phases:i.phases.map(s=>wh(s))}),n({board:i})},updatePhase:(i,s)=>n(r=>{if(!r.board)return r;const d=r.board.phases.map(f=>f.phase===i?wh({...f,...s}):f);return{board:{...r.board,phases:d}}}),updateTask:(i,s)=>n(r=>{if(!r.board)return r;const d=r.board.phases.map(f=>f.plan.task_ids.indexOf(i)===-1?f:{...f,updated_at:new Date().toISOString()});return{board:{...r.board,phases:d}}}),setConnected:i=>n({connected:i}),setSelectedPhase:i=>n({selectedPhase:i}),setWorkspace:i=>n({workspace:i})})),ki={pollIntervalMs:3e4,maxConcurrentWorkers:3,stallTimeoutMs:3e5,maxRetries:2,retryBackoffMs:6e4,decisionModel:"sonnet",assessMaxTurns:5,autoApproveThreshold:"low",defaultExecutor:"claude-code",safety:{eventDebounceMs:5e3,circuitBreakerThreshold:3,maxTicksPerHour:120,maxTokensPerHour:5e5,protectedPaths:[".env",".env.*","*.key","*.pem","credentials.*"]},workspace:{enabled:!1,useWorktree:!0,autoCleanup:!0,strict:!1},profile:"development"},vg={"claude-code":{model:"",approvalMode:"suggest",baseUrl:"",apiKey:"",settingsFile:"",envFile:""},codex:{model:"",approvalMode:"suggest",baseUrl:"",apiKey:"",settingsFile:"",envFile:""},"codex-server":{model:"",approvalMode:"suggest",baseUrl:"",apiKey:"",settingsFile:"",envFile:""},gemini:{model:"",approvalMode:"suggest",baseUrl:"",apiKey:"",settingsFile:"",envFile:""},"gemini-a2a":{model:"",approvalMode:"suggest",baseUrl:"",apiKey:"",settingsFile:"",envFile:""},qwen:{model:"",approvalMode:"suggest",baseUrl:"",apiKey:"",settingsFile:"",envFile:""},opencode:{model:"",approvalMode:"suggest",baseUrl:"",apiKey:"",settingsFile:"",envFile:""},"agent-sdk":{model:"",approvalMode:"suggest",baseUrl:"",apiKey:"",settingsFile:"",envFile:""}},vi={general:{theme:"system",language:"en",hiddenNavItems:["/maestro-coordinate","/requirement","/rooms"]},agents:vg,cliTools:"{}",linear:{apiKey:""},searchTool:"mcp__ace-tool__search_context",commander:ki};function Hs(n){return JSON.parse(JSON.stringify(n))}const pe=_t((n,i)=>({open:!1,activeSection:"general",config:null,draft:null,loading:!1,saving:!1,error:null,chineseResponse:null,setOpen:s=>{n({open:s}),s&&!i().config&&i().loadConfig()},setActiveSection:s=>n({activeSection:s}),loadConfig:async()=>{n({loading:!0,error:null});try{const s=await fetch("/api/settings");if(!s.ok)throw new Error(`Failed to load settings: ${s.status}`);const r=await s.json(),d=Object.fromEntries(Object.entries(vg).map(([S,b])=>{var E;return[S,{...b,...((E=r.agents)==null?void 0:E[S])||{}}]})),f=typeof r.searchTool=="string"?r.searchTool:vi.searchTool,p=r.commander,h={...ki,...p,safety:{...ki.safety,...p==null?void 0:p.safety},workspace:{...ki.workspace,...p==null?void 0:p.workspace}},x={...vi.general,...r.general},g={...vi,...r,general:x,agents:d,searchTool:f,commander:h};n({config:g,draft:Hs(g),loading:!1})}catch(s){const r=Hs(vi);n({config:r,draft:Hs(r),loading:!1,error:String(s)})}},updateDraft:(s,r)=>{const{draft:d}=i();d&&n({draft:{...d,[s]:r}})},saveConfig:async s=>{const{draft:r}=i();if(r){n({saving:!0,error:null});try{const d=s==="cliTools"?"/api/settings/cli-tools":s==="searchTool"?"/api/settings/search-tool":`/api/settings/${s}`,f=s==="searchTool"?{name:r[s]}:r[s],p=await fetch(d,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(typeof f=="string"?{content:f}:f)});if(!p.ok)throw new Error(`Failed to save: ${p.status}`);const{config:h}=i();if(h){const x={...h,[s]:Hs(r[s])};n({config:x,saving:!1})}else n({saving:!1})}catch(d){n({saving:!1,error:String(d)})}}},discardDraft:s=>{const{config:r,draft:d}=i();!r||!d||n({draft:{...d,[s]:Hs(r[s])}})},isDirty:s=>{const{config:r,draft:d}=i();return!r||!d?!1:JSON.stringify(r[s])!==JSON.stringify(d[s])},loadChineseResponse:async()=>{try{const s=await fetch("/api/language/chinese-response");if(!s.ok)return;const r=await s.json();n({chineseResponse:r})}catch{}},toggleChineseResponse:async(s,r)=>{try{const d=await fetch("/api/language/chinese-response",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({enabled:s,target:r})});if(!d.ok)throw new Error(`Failed: ${d.status}`);await i().loadChineseResponse()}catch(d){n({error:String(d)})}}}));function hu(n){return JSON.parse(JSON.stringify(n))}const ia=_t((n,i)=>({open:!1,config:null,draft:null,loading:!1,saving:!1,error:null,setOpen:s=>{n({open:s}),s&&!i().config&&i().loadConfig()},loadConfig:async()=>{n({loading:!0,error:null});try{const s=await fetch("/api/workflow-config");if(!s.ok)throw new Error(`Failed to load: ${s.status}`);const r=await s.json();n({config:r,draft:hu(r),loading:!1})}catch(s){n({config:null,draft:null,loading:!1,error:String(s)})}},updateDraft:(s,r)=>{const{draft:d}=i();d&&n({draft:{...d,[s]:r}})},save:async()=>{const{draft:s}=i();if(s){n({saving:!0,error:null});try{const r=await fetch("/api/workflow-config",{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(s)});if(!r.ok)throw new Error(`Failed to save: ${r.status}`);n({config:hu(s),saving:!1})}catch(r){n({saving:!1,error:String(r)})}}},discard:()=>{const{config:s}=i();s&&n({draft:hu(s)})},isDirty:()=>{const{config:s,draft:r}=i();return!s||!r?!1:JSON.stringify(s)!==JSON.stringify(r)}})),xg=v.createContext({config:null,register:()=>{},unregister:()=>{}});function v0(){const[n,i]=v.useState(null),s=v.useCallback(d=>i(d),[]),r=v.useCallback(()=>i(null),[]);return{config:n,register:s,unregister:r}}function x0(){return v.useContext(xg).config}function y0(){const n=x0();return v.useEffect(()=>{if(!n)return;function i(s){if(s.target instanceof HTMLInputElement||s.target instanceof HTMLTextAreaElement)return;const r=parseInt(s.key,10);r>=1&&r<=n.items.length&&n.onSwitch(r-1)}return window.addEventListener("keydown",i),()=>window.removeEventListener("keydown",i)},[n]),!n||n.items.length===0?null:c.jsx("div",{className:"inline-flex items-center bg-bg-tertiary rounded-[10px] p-[3px] gap-[2px]",children:n.items.map((i,s)=>{const r=s===n.activeIndex;return c.jsxs("button",{type:"button",onClick:()=>n.onSwitch(s),className:["relative flex items-center gap-[var(--spacing-1-5)] px-[var(--spacing-3)] py-[var(--spacing-1)] rounded-[8px]","text-[length:var(--font-size-xs)] font-[var(--font-weight-medium)]","transition-colors duration-[var(--duration-fast)] ease-[var(--ease-notion)]","focus-visible:outline-none focus-visible:shadow-[var(--shadow-focus-ring)]",r?"text-text-primary":"text-text-tertiary hover:text-text-secondary"].join(" "),children:[c.jsx("div",{className:"absolute inset-0 rounded-[8px] shadow-sm",style:{backgroundColor:r?"var(--color-bg-card)":"transparent",opacity:r?1:0,transition:"opacity 150ms ease, background-color 150ms ease"}}),c.jsxs("span",{className:"relative z-10 flex items-center gap-[var(--spacing-1-5)]",children:[c.jsx("span",{className:"w-[14px] h-[14px] flex items-center justify-center",children:i.icon}),c.jsx("span",{children:i.label}),c.jsx("kbd",{className:"text-[length:9px] text-text-placeholder font-mono ml-[var(--spacing-0-5)]",children:i.shortcut})]})]},i.label)})})}const yg="maestro.recentWorkspaces",b0=5;function S0(n){return n.split(/[\\/]/).filter(Boolean).at(-1)??n}function bg(){try{const n=localStorage.getItem(yg);if(!n)return[];const i=JSON.parse(n);return Array.isArray(i)?i:[]}catch{return[]}}function E0(n){try{localStorage.setItem(yg,JSON.stringify(n))}catch{}}function w0(n){const i=bg().filter(s=>s!==n);i.unshift(n),E0(i.slice(0,b0))}function j0(){const n=Vt(H=>H.workspace),i=Vt(H=>H.setWorkspace),[s,r]=v.useState(!1),[d,f]=v.useState(""),[p,h]=v.useState(null),[x,g]=v.useState(!1),[S,b]=v.useState([]),[E,w]=v.useState(!1),[C,A]=v.useState(null),[O,T]=v.useState(!1),X=v.useRef(null);v.useEffect(()=>{s&&(b(bg()),f(""),h(null),w(!1),A(null))},[s]),v.useEffect(()=>{if(!s)return;function H(Q){X.current&&!X.current.contains(Q.target)&&r(!1)}return document.addEventListener("mousedown",H),()=>document.removeEventListener("mousedown",H)},[s]);const Y=v.useCallback(async H=>{if(H.trim()){g(!0),h(null);try{const Q=await fetch("/api/workspace",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({path:H.trim()})});if(!Q.ok){const fe=await Q.json().catch(()=>({}));h(fe.error??`Error ${Q.status}`);return}w0(H.trim()),i(H.trim()),r(!1)}catch(Q){h(Q instanceof Error?Q.message:"Network error")}finally{g(!1)}}},[i]),P=v.useCallback(async H=>{T(!0);try{const Q=H?`/api/workspace/browse?path=${encodeURIComponent(H)}`:"/api/workspace/browse",fe=await fetch(Q);if(!fe.ok){h("Failed to browse directory");return}const He=await fe.json();A(He),w(!0)}catch{h("Failed to browse directory")}finally{T(!1)}},[]),Z=v.useCallback(H=>{H.key==="Escape"&&(E?w(!1):r(!1))},[E]),te=n?S0(n):"—";return c.jsxs("div",{ref:X,className:"relative flex items-center",onKeyDown:Z,children:[c.jsxs("button",{type:"button",onClick:()=>r(H=>!H),className:["flex items-center gap-[var(--spacing-1)] px-[var(--spacing-2)] py-[var(--spacing-1)] rounded-[var(--radius-sm)]","text-[length:var(--font-size-sm)] text-text-secondary","transition-colors duration-[var(--duration-fast)] ease-[var(--ease-notion)]","hover:bg-bg-hover hover:text-text-primary","focus-visible:outline-none focus-visible:shadow-[var(--shadow-focus-ring)]"].join(" "),"aria-haspopup":"listbox","aria-expanded":s,children:[c.jsx("span",{className:"text-text-placeholder",children:"/"}),c.jsx("span",{className:"max-w-[160px] truncate",children:te}),c.jsx("span",{className:"text-[length:9px] text-text-placeholder ml-[2px]",children:"▼"})]}),s&&c.jsx("div",{role:"dialog","aria-label":"Switch workspace",className:["absolute top-full left-0 mt-[4px] w-[360px] z-50","bg-bg-secondary border border-border rounded-[var(--radius-md)]","shadow-[var(--shadow-lg,0_8px_24px_rgba(0,0,0,0.18))]","p-[var(--spacing-2)]"].join(" "),children:E&&C?c.jsxs("div",{children:[c.jsxs("div",{className:"flex items-center gap-[var(--spacing-1)] mb-[var(--spacing-2)] px-[var(--spacing-1)]",children:[c.jsx("button",{type:"button",onClick:()=>w(!1),className:"text-[length:var(--font-size-xs)] text-text-secondary hover:text-text-primary px-[var(--spacing-1)] py-[2px] rounded-[var(--radius-sm)] hover:bg-bg-hover",children:"← Back"}),c.jsx("span",{className:"text-[length:var(--font-size-xs)] text-text-placeholder truncate flex-1 text-right",children:C.current})]}),C.parent&&c.jsxs("button",{type:"button",onClick:()=>P(C.parent),disabled:O,className:["w-full text-left flex items-center gap-[var(--spacing-2)]","px-[var(--spacing-2)] py-[var(--spacing-1-5)] rounded-[var(--radius-sm)]","text-[length:var(--font-size-sm)] text-text-secondary","transition-colors duration-[var(--duration-fast)]","hover:bg-bg-hover cursor-pointer"].join(" "),children:[c.jsx("span",{className:"text-text-placeholder text-[length:var(--font-size-xs)]",children:"📂"}),c.jsx("span",{children:".."})]}),c.jsx("div",{className:"max-h-[240px] overflow-y-auto",children:C.entries.length===0?c.jsx("p",{className:"text-[length:var(--font-size-xs)] text-text-placeholder px-[var(--spacing-2)] py-[var(--spacing-2)] text-center",children:"No subdirectories"}):C.entries.map(H=>c.jsxs("div",{className:"flex items-center gap-[2px]",children:[c.jsxs("button",{type:"button",onClick:()=>P(H.path),disabled:O,className:["flex-1 text-left flex items-center gap-[var(--spacing-2)]","px-[var(--spacing-2)] py-[var(--spacing-1-5)] rounded-[var(--radius-sm)]","text-[length:var(--font-size-sm)]","transition-colors duration-[var(--duration-fast)]","hover:bg-bg-hover cursor-pointer",H.hasWorkflow?"text-text-primary":"text-text-secondary"].join(" "),children:[c.jsx("span",{className:"text-[length:var(--font-size-xs)]",children:H.hasWorkflow?"📂":"📁"}),c.jsx("span",{className:"truncate",children:H.name}),H.hasWorkflow&&c.jsx("span",{className:"text-[length:9px] text-accent-blue bg-[rgba(55,120,220,0.1)] px-[4px] py-[1px] rounded-[3px] shrink-0",children:".workflow"})]}),H.hasWorkflow&&c.jsx("button",{type:"button",onClick:()=>Y(H.path),disabled:x,className:["shrink-0 px-[var(--spacing-1-5)] py-[var(--spacing-1)] rounded-[var(--radius-sm)]","text-[length:var(--font-size-xs)] text-accent-blue","hover:bg-[rgba(55,120,220,0.1)] cursor-pointer","transition-colors duration-[var(--duration-fast)]"].join(" "),children:"Open"})]},H.path))})]}):c.jsxs(c.Fragment,{children:[c.jsxs("div",{className:"mb-[var(--spacing-2)]",children:[c.jsx("p",{className:"text-[length:var(--font-size-xs)] text-text-placeholder px-[var(--spacing-2)] mb-[var(--spacing-1)]",children:"Recent"}),S.length>0?c.jsx("ul",{role:"listbox",children:S.map(H=>c.jsx("li",{children:c.jsxs("button",{type:"button",role:"option","aria-selected":H===n,onClick:()=>Y(H),disabled:x,className:["w-full text-left flex items-center gap-[var(--spacing-2)]","px-[var(--spacing-2)] py-[var(--spacing-1-5)] rounded-[var(--radius-sm)]","text-[length:var(--font-size-sm)]","transition-colors duration-[var(--duration-fast)]","hover:bg-bg-hover focus-visible:outline-none focus-visible:shadow-[var(--shadow-focus-ring)]",H===n?"text-text-primary":"text-text-secondary",x?"opacity-50 cursor-not-allowed":"cursor-pointer"].join(" "),children:[c.jsx("span",{className:"text-text-placeholder text-[length:var(--font-size-xs)]",children:"📁"}),c.jsx("span",{className:"truncate flex-1",children:H}),H===n&&c.jsx("span",{className:"text-[length:var(--font-size-xs)] text-text-placeholder shrink-0",children:"current"})]})},H))}):c.jsx("p",{className:"text-[length:var(--font-size-xs)] text-text-placeholder px-[var(--spacing-2)] py-[var(--spacing-1)] italic",children:"No recent workspaces"}),c.jsx("div",{className:"border-t border-border mt-[var(--spacing-2)] mb-[var(--spacing-2)]"})]}),c.jsxs("div",{className:"px-[var(--spacing-1)] flex flex-col gap-[var(--spacing-2)]",children:[c.jsx("label",{className:"text-[length:var(--font-size-xs)] text-text-placeholder",children:"Path"}),c.jsxs("div",{className:"flex gap-[var(--spacing-1)]",children:[c.jsx("input",{type:"text",value:d,onChange:H=>f(H.target.value),onKeyDown:H=>{H.key==="Enter"&&Y(d)},placeholder:"/path/to/workspace",autoFocus:!0,className:["flex-1 min-w-0 px-[var(--spacing-2)] py-[var(--spacing-1)] rounded-[var(--radius-sm)]","bg-bg-tertiary border border-border","text-[length:var(--font-size-sm)] text-text-primary placeholder:text-text-placeholder","focus:outline-none focus:border-accent-blue","transition-colors duration-[var(--duration-fast)]"].join(" ")}),c.jsx("button",{type:"button",onClick:()=>P(d.trim()||void 0),disabled:O,title:"Browse folders",className:["shrink-0 flex items-center justify-center w-[32px] rounded-[var(--radius-sm)]","bg-bg-tertiary border border-border text-text-secondary","hover:bg-bg-hover hover:text-text-primary cursor-pointer","transition-colors duration-[var(--duration-fast)]","focus-visible:outline-none focus-visible:shadow-[var(--shadow-focus-ring)]"].join(" "),children:c.jsx("svg",{className:"w-4 h-4",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:c.jsx("path",{d:"M22 19a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h5l2 3h9a2 2 0 0 1 2 2z"})})})]}),p&&c.jsx("p",{className:"text-[length:var(--font-size-xs)] text-status-blocked px-[var(--spacing-1)]",children:p}),c.jsx("button",{type:"button",onClick:()=>Y(d),disabled:x||!d.trim(),className:["w-full px-[var(--spacing-3)] py-[var(--spacing-1-5)] rounded-[var(--radius-sm)]","text-[length:var(--font-size-sm)] font-[var(--font-weight-medium)]","bg-bg-tertiary border border-border text-text-secondary","transition-colors duration-[var(--duration-fast)]","focus-visible:outline-none focus-visible:shadow-[var(--shadow-focus-ring)]",x||!d.trim()?"opacity-40 cursor-not-allowed":"hover:bg-bg-hover hover:text-text-primary cursor-pointer"].join(" "),children:x?"Switching...":"Switch workspace"})]})]})})]})}const Pj=[{id:"backlog",label:"Backlog",statuses:["not_started"]},{id:"triage",label:"Triage",statuses:[]},{id:"in-progress",label:"In Progress",statuses:["planning","executing"]},{id:"review",label:"Review",statuses:["verifying","reviewing"]},{id:"done",label:"Done",statuses:["completed","blocked"]},{id:"deferred",label:"Deferred",statuses:[]}],jh={HEALTH:"/api/health",BOARD:"/api/board",PROJECT:"/api/project",PHASES:"/api/phases",PHASE:"/api/phases/:n",PHASE_TASKS:"/api/phases/:n/tasks",ARTIFACTS:"/api/artifacts",SCRATCH:"/api/scratch",SETTINGS:"/api/settings",SETTINGS_GENERAL:"/api/settings/general",SETTINGS_AGENTS:"/api/settings/agents",SETTINGS_CLI_TOOLS:"/api/settings/cli-tools",SETTINGS_SPECS:"/api/settings/specs"},Zj={SPECS:"/api/specs",SPECS_FILES:"/api/specs/files",SPECS_FILE:"/api/specs/file/:name"},Jj={WIKI:"/api/wiki",WIKI_STATS:"/api/wiki/stats",WIKI_HEALTH:"/api/wiki/health",WIKI_GRAPH:"/api/wiki/graph",WIKI_ORPHANS:"/api/wiki/orphans",WIKI_HUBS:"/api/wiki/hubs",WIKI_DETAIL:"/api/wiki/:id",WIKI_BACKLINKS:"/api/wiki/:id/backlinks",WIKI_FORWARD:"/api/wiki/:id/forward"},Fj={CONFIG:"/api/mcp-config",TOGGLE:"/api/mcp-toggle",COPY_SERVER:"/api/mcp-copy-server",REMOVE_SERVER:"/api/mcp-remove-server",ADD_GLOBAL:"/api/mcp-add-global-server",REMOVE_GLOBAL:"/api/mcp-remove-global-server",UPDATE_SERVER:"/api/mcp-update-server",INSTALL_MAESTRO:"/api/mcp-install-maestro",CODEX_CONFIG:"/api/codex-mcp-config",CODEX_ADD:"/api/codex-mcp-add",CODEX_REMOVE:"/api/codex-mcp-remove",CODEX_TOGGLE:"/api/codex-mcp-toggle",TEMPLATES:"/api/mcp-templates",TEMPLATES_SEARCH:"/api/mcp-templates/search",TEMPLATES_CATEGORIES:"/api/mcp-templates/categories",TEMPLATES_INSTALL:"/api/mcp-templates/install",DETECT_COMMANDS:"/api/mcp/detect-commands"},ge={AGENT_SPAWNED:"agent:spawned",AGENT_ENTRY:"agent:entry",AGENT_APPROVAL:"agent:approval",AGENT_STATUS:"agent:status",AGENT_STOPPED:"agent:stopped",AGENT_THOUGHT:"agent:thought",AGENT_STREAMING:"agent:streaming",EXECUTION_STARTED:"execution:started",EXECUTION_COMPLETED:"execution:completed",EXECUTION_FAILED:"execution:failed",EXECUTION_SCHEDULER_STATUS:"execution:scheduler_status",SUPERVISOR_STATUS:"supervisor:status",COMMANDER_STATUS:"commander:status",COMMANDER_DECISION:"commander:decision",COORDINATE_STATUS:"coordinate:status",COORDINATE_STEP:"coordinate:step",COORDINATE_ANALYSIS:"coordinate:analysis",COORDINATE_CLARIFICATION_NEEDED:"coordinate:clarification_needed",REQUIREMENT_EXPANDED:"requirement:expanded",REQUIREMENT_COMMITTED:"requirement:committed",REQUIREMENT_PROGRESS:"requirement:progress",BOARD_FULL:"board:full",PHASE_UPDATED:"phase:updated",TASK_UPDATED:"task:updated",PROJECT_UPDATED:"project:updated",HEARTBEAT:"heartbeat",CONNECTED:"connected",TEAM_MESSAGE:"team:message",TEAM_DISPATCH:"team:dispatch",TEAM_PHASE:"team:phase",TEAM_AGENT_STATUS:"team:agent_status",ROOM_CREATED:"room:created",ROOM_CLOSED:"room:closed",ROOM_AGENT_JOINED:"room:agent_joined",ROOM_AGENT_LEFT:"room:agent_left",ROOM_AGENT_STATUS:"room:agent_status",ROOM_MESSAGE:"room:message",ROOM_BROADCAST:"room:broadcast",ROOM_TASK_CREATED:"room:task_created",ROOM_TASK_UPDATED:"room:task_updated",ROOM_SNAPSHOT:"room:snapshot"},Gs={ISSUES:"/api/issues",ISSUE:"/api/issues/:id"},gu={STATUS:"/api/linear/status",TEAMS:"/api/linear/teams",BOARD:"/api/linear/board",IMPORT:"/api/linear/import",EXPORT:"/api/linear/export"},vu={SESSIONS:"/api/teams/sessions",SESSION:"/api/teams/sessions/:sessionId",SESSION_MESSAGES:"/api/teams/sessions/:sessionId/messages",SESSION_FILE:"/api/teams/sessions/:sessionId/files"},Rl={MEMBERS:"/api/collab/members",ACTIVITY:"/api/collab/activity",STATUS:"/api/collab/status",AGGREGATED:"/api/collab/activity/aggregated",PREFLIGHT:"/api/collab/preflight"},$j={DETECT:"/api/install/detect",EXECUTE:"/api/install/execute",MANIFESTS:"/api/install/manifests",ADDONS:"/api/install/addons",ADDON_INSTALL:"/api/install/addon"},Sg={not_started:"#A09D97",planning:"#9178B5",executing:"#B89540",verifying:"#C8863A",reviewing:"#5B8DB8",completed:"#5A9E78",blocked:"#C46555"},Eg={"claude-code":"var(--color-accent-purple)",codex:"var(--color-accent-green)","codex-server":"var(--color-accent-green)",gemini:"var(--color-accent-blue)","gemini-a2a":"var(--color-accent-blue)",qwen:"var(--color-accent-orange)",opencode:"var(--color-text-tertiary)","agent-sdk":"var(--color-accent-purple)"},Wj={"claude-code":"Claude Code",codex:"Codex","codex-server":"Codex Server",gemini:"Gemini","gemini-a2a":"Gemini (A2A)",qwen:"Qwen",opencode:"OpenCode","agent-sdk":"Agent SDK"},e2={open:"#A09D97",registered:"#C8863A",analyzing:"#5B8DB8",planned:"#9178B5",in_progress:"#B89540",resolved:"#5A9E78",closed:"#6B6966",deferred:"#8B8685"};function t2(n){switch(n.status){case"closed":return"closed";case"resolved":return"resolved";case"in_progress":return"in_progress";case"deferred":return"deferred";case"registered":return n.solution?"planned":n.analysis?"analyzing":"registered";case"open":return n.solution?"planned":n.analysis?"analyzing":"open";default:return"open"}}const xi=_t((n,i)=>({members:[],activity:[],presence:[],aggregated:[],tasks:[],loading:!1,error:null,activeTab:"overview",statusFilter:"all",typeFilter:"all",memberFilter:"all",taskStatusFilter:"all",taskAssigneeFilter:"all",selectedTaskId:null,fetchMembers:async()=>{n({loading:!0,error:null});try{const s=await fetch(Rl.MEMBERS);if(!s.ok)throw new Error(`Failed: ${s.status}`);const r=await s.json();n({members:r,loading:!1})}catch(s){n({loading:!1,error:String(s)})}},fetchActivity:async(s,r)=>{n({loading:!0,error:null});try{const d=new URLSearchParams;s!==void 0&&d.set("limit",String(s)),r!==void 0&&d.set("since",r);const f=d.toString(),p=f?`${Rl.ACTIVITY}?${f}`:Rl.ACTIVITY,h=await fetch(p);if(!h.ok)throw new Error(`Failed: ${h.status}`);const x=await h.json();n({activity:x,loading:!1})}catch(d){n({loading:!1,error:String(d)})}},fetchPresence:async()=>{n({loading:!0,error:null});try{const s=await fetch(Rl.STATUS);if(!s.ok)throw new Error(`Failed: ${s.status}`);const r=await s.json(),d=Array.isArray(r)?r:r.members??[];n({presence:d,loading:!1})}catch(s){n({loading:!1,error:String(s)})}},fetchAggregated:async()=>{n({loading:!0,error:null});try{const s=await fetch(Rl.AGGREGATED);if(!s.ok)throw new Error(`Failed: ${s.status}`);const r=await s.json();n({aggregated:r,loading:!1})}catch(s){n({loading:!1,error:String(s)})}},fetchPreflight:async()=>{try{const s=await fetch(Rl.PREFLIGHT);if(!s.ok)throw new Error(`Failed: ${s.status}`);return await s.json()}catch(s){return n({error:String(s)}),null}},fetchTasks:async()=>{try{const s=await fetch("/api/collab/tasks");if(!s.ok)throw new Error(`Failed: ${s.status}`);const r=await s.json();n({tasks:r})}catch{}},createTask:async(s,r,d,f)=>{try{const p=await fetch("/api/collab/tasks",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({title:s,description:r,priority:d,tags:f})}),h=await p.json();return p.ok?(await i().fetchTasks(),{success:!0}):{success:!1,error:h.error??`HTTP ${p.status}`}}catch(p){return{success:!1,error:String(p)}}},updateTaskStatus:async(s,r)=>{try{await fetch(`/api/collab/tasks/${encodeURIComponent(s)}`,{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({status:r})}),await i().fetchTasks()}catch{}},assignTask:async(s,r)=>{try{await fetch(`/api/collab/tasks/${encodeURIComponent(s)}`,{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({assignee:r})}),await i().fetchTasks()}catch{}},deleteTask:async s=>{try{await fetch(`/api/collab/tasks/${encodeURIComponent(s)}`,{method:"DELETE"}),await i().fetchTasks()}catch{}},addTaskCheck:async(s,r,d)=>{try{await fetch(`/api/collab/tasks/${encodeURIComponent(s)}/checks`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({action:r,comment:d})}),await i().fetchTasks()}catch{}},initCollab:async()=>{try{const s=await fetch("/api/collab/init",{method:"POST"}),r=await s.json();return s.ok?{success:!0}:{success:!1,error:r.error??`HTTP ${s.status}`}}catch(s){return{success:!1,error:String(s)}}},disableCollab:async()=>{try{const s=await fetch("/api/collab/disable",{method:"POST"}),r=await s.json();return s.ok?(i().clearAll(),{success:!0}):{success:!1,error:r.error??`HTTP ${s.status}`}}catch(s){return{success:!1,error:String(s)}}},addMember:async(s,r,d)=>{try{const f=await fetch("/api/collab/members",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({name:s,email:r||"",role:d||"member"})}),p=await f.json();return f.ok?(await i().fetchMembers(),{success:!0}):{success:!1,error:p.error??`HTTP ${f.status}`}}catch(f){return{success:!1,error:String(f)}}},removeMember:async s=>{try{const r=await fetch(`/api/collab/members/${encodeURIComponent(s)}`,{method:"DELETE"}),d=await r.json();return r.ok?(await i().fetchMembers(),{success:!0}):{success:!1,error:d.error??`HTTP ${r.status}`}}catch(r){return{success:!1,error:String(r)}}},setActiveTab:s=>n({activeTab:s}),setStatusFilter:s=>n({statusFilter:s}),setTypeFilter:s=>n({typeFilter:s}),setMemberFilter:s=>n({memberFilter:s}),setTaskStatusFilter:s=>n({taskStatusFilter:s}),setTaskAssigneeFilter:s=>n({taskAssigneeFilter:s}),setSelectedTaskId:s=>n({selectedTaskId:s}),filteredMembers:()=>{const{members:s,statusFilter:r}=i();return r==="all"?s:s.filter(d=>d.status===r)},filteredActivity:()=>{const{activity:s,typeFilter:r,memberFilter:d}=i();let f=s;return r!=="all"&&(f=f.filter(p=>p.action===r)),d!=="all"&&(f=f.filter(p=>p.user===d)),f},recentActivity:s=>{const{activity:r}=i();return r.slice(-s)},tasksByColumn:()=>{const{tasks:s,taskStatusFilter:r,taskAssigneeFilter:d}=i(),f=new Map;for(const p of s){if(r!=="all"&&p.status!==r||d===""&&p.assignee!==null||d!=="all"&&d!==""&&p.assignee!==d)continue;const h=f.get(p.status);h?h.push(p):f.set(p.status,[p])}return f},clearAll:()=>n({members:[],activity:[],presence:[],aggregated:[],tasks:[],loading:!1,error:null,activeTab:"overview",statusFilter:"all",typeFilter:"all",memberFilter:"all",taskStatusFilter:"all",taskAssigneeFilter:"all",selectedTaskId:null})})),N0={online:"#22c55e",offline:"#9ca3af",away:"#eab308"},a2={join:"#22c55e",phase_change:"#a78bfa",task_update:"#34d399",message:"#60a5fa",discussion:"#60a5fa",report:"#f59e0b",sync:"#06b6d4"},Nh=4,yi=32,_h=-8,_0=6e4,Ch=N0;function C0(){const n=xi(b=>b.presence),i=xi(b=>b.fetchPreflight),s=xi(b=>b.fetchPresence),r=xi(b=>b.disableCollab),[d,f]=v.useState(null),[p,h]=v.useState(!1);if(v.useEffect(()=>{let b=!1;return(async()=>{const E=await i();if(b)return;const w=(E==null?void 0:E.exists)??!1;f(w),w&&s()})(),()=>{b=!0}},[]),v.useEffect(()=>{if(!d)return;const b=setInterval(()=>{s()},_0);return()=>clearInterval(b)},[d,s]),!d||n.length===0)return null;const x=n.slice(0,Nh),g=n.length-Nh;async function S(){h(!1),(await r()).success&&f(!1)}return c.jsxs("div",{className:"relative flex items-center flex-shrink-0",children:[c.jsxs("button",{type:"button",onClick:()=>h(b=>!b),className:"flex items-center cursor-pointer",role:"group","aria-label":"Online members",children:[x.map((b,E)=>c.jsxs("div",{title:`${b.name} — ${b.status}`,className:"relative rounded-full border-2 border-bg-secondary",style:{width:yi,height:yi,marginLeft:E===0?0:_h,backgroundColor:"#6b7280",zIndex:x.length-E},children:[c.jsx("span",{className:"absolute inset-0 flex items-center justify-center text-white text-[10px] font-semibold select-none",children:b.name.charAt(0).toUpperCase()}),c.jsx("span",{className:"absolute bottom-0 right-0 w-2 h-2 rounded-full border-[1.5px] border-bg-secondary",style:{backgroundColor:Ch[b.status]}})]},b.uid)),g>0&&c.jsx("div",{className:"relative flex items-center justify-center rounded-full border-2 border-bg-secondary bg-bg-hover",style:{width:yi,height:yi,marginLeft:_h,zIndex:0},children:c.jsxs("span",{className:"text-text-secondary text-[9px] font-semibold",children:["+",g]})})]}),p&&c.jsxs(c.Fragment,{children:[c.jsx("div",{className:"fixed inset-0 z-40",onClick:()=>h(!1)}),c.jsxs("div",{className:"absolute right-0 top-full mt-1 z-50 min-w-[180px] rounded-[var(--radius-md,6px)] border border-border bg-bg-primary shadow-lg py-1",children:[c.jsxs("div",{className:"px-3 py-1.5 text-[10px] text-text-quaternary uppercase tracking-wider",children:["Team (",n.length,")"]}),n.map(b=>c.jsxs("div",{className:"flex items-center gap-2 px-3 py-1.5",children:[c.jsx("span",{className:"w-1.5 h-1.5 rounded-full shrink-0",style:{backgroundColor:Ch[b.status]}}),c.jsx("span",{className:"text-[length:var(--font-size-xs)] text-text-primary truncate",children:b.name}),c.jsx("span",{className:"text-[10px] text-text-quaternary ml-auto",children:b.status})]},b.uid)),c.jsx("div",{className:"h-px bg-border my-1"}),c.jsx("button",{type:"button",onClick:S,className:"w-full text-left px-3 py-1.5 text-[length:var(--font-size-xs)] text-accent-red hover:bg-bg-hover transition-colors",children:"Disable Team Mode"})]})]})]})}function wg(n){var i,s,r="";if(typeof n=="string"||typeof n=="number")r+=n;else if(typeof n=="object")if(Array.isArray(n)){var d=n.length;for(i=0;i<d;i++)n[i]&&(s=wg(n[i]))&&(r&&(r+=" "),r+=s)}else for(s in n)n[s]&&(r&&(r+=" "),r+=s);return r}function T0(){for(var n,i,s=0,r="",d=arguments.length;s<d;s++)(n=arguments[s])&&(i=wg(n))&&(r&&(r+=" "),r+=i);return r}const A0=(n,i)=>{const s=new Array(n.length+i.length);for(let r=0;r<n.length;r++)s[r]=n[r];for(let r=0;r<i.length;r++)s[n.length+r]=i[r];return s},k0=(n,i)=>({classGroupId:n,validator:i}),jg=(n=new Map,i=null,s)=>({nextPart:n,validators:i,classGroupId:s}),Li="-",Th=[],O0="arbitrary..",D0=n=>{const i=R0(n),{conflictingClassGroups:s,conflictingClassGroupModifiers:r}=n;return{getClassGroupId:p=>{if(p.startsWith("[")&&p.endsWith("]"))return M0(p);const h=p.split(Li),x=h[0]===""&&h.length>1?1:0;return Ng(h,x,i)},getConflictingClassGroupIds:(p,h)=>{if(h){const x=r[p],g=s[p];return x?g?A0(g,x):x:g||Th}return s[p]||Th}}},Ng=(n,i,s)=>{if(n.length-i===0)return s.classGroupId;const d=n[i],f=s.nextPart.get(d);if(f){const g=Ng(n,i+1,f);if(g)return g}const p=s.validators;if(p===null)return;const h=i===0?n.join(Li):n.slice(i).join(Li),x=p.length;for(let g=0;g<x;g++){const S=p[g];if(S.validator(h))return S.classGroupId}},M0=n=>n.slice(1,-1).indexOf(":")===-1?void 0:(()=>{const i=n.slice(1,-1),s=i.indexOf(":"),r=i.slice(0,s);return r?O0+r:void 0})(),R0=n=>{const{theme:i,classGroups:s}=n;return z0(s,i)},z0=(n,i)=>{const s=jg();for(const r in n){const d=n[r];Zu(d,s,r,i)}return s},Zu=(n,i,s,r)=>{const d=n.length;for(let f=0;f<d;f++){const p=n[f];L0(p,i,s,r)}},L0=(n,i,s,r)=>{if(typeof n=="string"){U0(n,i,s);return}if(typeof n=="function"){B0(n,i,s,r);return}H0(n,i,s,r)},U0=(n,i,s)=>{const r=n===""?i:_g(i,n);r.classGroupId=s},B0=(n,i,s,r)=>{if(G0(n)){Zu(n(r),i,s,r);return}i.validators===null&&(i.validators=[]),i.validators.push(k0(s,n))},H0=(n,i,s,r)=>{const d=Object.entries(n),f=d.length;for(let p=0;p<f;p++){const[h,x]=d[p];Zu(x,_g(i,h),s,r)}},_g=(n,i)=>{let s=n;const r=i.split(Li),d=r.length;for(let f=0;f<d;f++){const p=r[f];let h=s.nextPart.get(p);h||(h=jg(),s.nextPart.set(p,h)),s=h}return s},G0=n=>"isThemeGetter"in n&&n.isThemeGetter===!0,q0=n=>{if(n<1)return{get:()=>{},set:()=>{}};let i=0,s=Object.create(null),r=Object.create(null);const d=(f,p)=>{s[f]=p,i++,i>n&&(i=0,r=s,s=Object.create(null))};return{get(f){let p=s[f];if(p!==void 0)return p;if((p=r[f])!==void 0)return d(f,p),p},set(f,p){f in s?s[f]=p:d(f,p)}}},Ru="!",Ah=":",I0=[],kh=(n,i,s,r,d)=>({modifiers:n,hasImportantModifier:i,baseClassName:s,maybePostfixModifierPosition:r,isExternal:d}),K0=n=>{const{prefix:i,experimentalParseClassName:s}=n;let r=d=>{const f=[];let p=0,h=0,x=0,g;const S=d.length;for(let A=0;A<S;A++){const O=d[A];if(p===0&&h===0){if(O===Ah){f.push(d.slice(x,A)),x=A+1;continue}if(O==="/"){g=A;continue}}O==="["?p++:O==="]"?p--:O==="("?h++:O===")"&&h--}const b=f.length===0?d:d.slice(x);let E=b,w=!1;b.endsWith(Ru)?(E=b.slice(0,-1),w=!0):b.startsWith(Ru)&&(E=b.slice(1),w=!0);const C=g&&g>x?g-x:void 0;return kh(f,w,E,C)};if(i){const d=i+Ah,f=r;r=p=>p.startsWith(d)?f(p.slice(d.length)):kh(I0,!1,p,void 0,!0)}if(s){const d=r;r=f=>s({className:f,parseClassName:d})}return r},Y0=n=>{const i=new Map;return n.orderSensitiveModifiers.forEach((s,r)=>{i.set(s,1e6+r)}),s=>{const r=[];let d=[];for(let f=0;f<s.length;f++){const p=s[f],h=p[0]==="[",x=i.has(p);h||x?(d.length>0&&(d.sort(),r.push(...d),d=[]),r.push(p)):d.push(p)}return d.length>0&&(d.sort(),r.push(...d)),r}},V0=n=>({cache:q0(n.cacheSize),parseClassName:K0(n),sortModifiers:Y0(n),...D0(n)}),X0=/\s+/,Q0=(n,i)=>{const{parseClassName:s,getClassGroupId:r,getConflictingClassGroupIds:d,sortModifiers:f}=i,p=[],h=n.trim().split(X0);let x="";for(let g=h.length-1;g>=0;g-=1){const S=h[g],{isExternal:b,modifiers:E,hasImportantModifier:w,baseClassName:C,maybePostfixModifierPosition:A}=s(S);if(b){x=S+(x.length>0?" "+x:x);continue}let O=!!A,T=r(O?C.substring(0,A):C);if(!T){if(!O){x=S+(x.length>0?" "+x:x);continue}if(T=r(C),!T){x=S+(x.length>0?" "+x:x);continue}O=!1}const X=E.length===0?"":E.length===1?E[0]:f(E).join(":"),Y=w?X+Ru:X,P=Y+T;if(p.indexOf(P)>-1)continue;p.push(P);const Z=d(T,O);for(let te=0;te<Z.length;++te){const H=Z[te];p.push(Y+H)}x=S+(x.length>0?" "+x:x)}return x},P0=(...n)=>{let i=0,s,r,d="";for(;i<n.length;)(s=n[i++])&&(r=Cg(s))&&(d&&(d+=" "),d+=r);return d},Cg=n=>{if(typeof n=="string")return n;let i,s="";for(let r=0;r<n.length;r++)n[r]&&(i=Cg(n[r]))&&(s&&(s+=" "),s+=i);return s},Z0=(n,...i)=>{let s,r,d,f;const p=x=>{const g=i.reduce((S,b)=>b(S),n());return s=V0(g),r=s.cache.get,d=s.cache.set,f=h,h(x)},h=x=>{const g=r(x);if(g)return g;const S=Q0(x,s);return d(x,S),S};return f=p,(...x)=>f(P0(...x))},J0=[],ct=n=>{const i=s=>s[n]||J0;return i.isThemeGetter=!0,i},Tg=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,Ag=/^\((?:(\w[\w-]*):)?(.+)\)$/i,F0=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,$0=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,W0=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,e1=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,t1=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,a1=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,mn=n=>F0.test(n),ye=n=>!!n&&!Number.isNaN(Number(n)),pn=n=>!!n&&Number.isInteger(Number(n)),xu=n=>n.endsWith("%")&&ye(n.slice(0,-1)),La=n=>$0.test(n),kg=()=>!0,n1=n=>W0.test(n)&&!e1.test(n),Ju=()=>!1,l1=n=>t1.test(n),s1=n=>a1.test(n),r1=n=>!le(n)&&!se(n),i1=n=>bn(n,Mg,Ju),le=n=>Tg.test(n),Gn=n=>bn(n,Rg,n1),Oh=n=>bn(n,h1,ye),o1=n=>bn(n,Lg,kg),c1=n=>bn(n,zg,Ju),Dh=n=>bn(n,Og,Ju),u1=n=>bn(n,Dg,s1),bi=n=>bn(n,Ug,l1),se=n=>Ag.test(n),qs=n=>Xn(n,Rg),d1=n=>Xn(n,zg),Mh=n=>Xn(n,Og),f1=n=>Xn(n,Mg),m1=n=>Xn(n,Dg),Si=n=>Xn(n,Ug,!0),p1=n=>Xn(n,Lg,!0),bn=(n,i,s)=>{const r=Tg.exec(n);return r?r[1]?i(r[1]):s(r[2]):!1},Xn=(n,i,s=!1)=>{const r=Ag.exec(n);return r?r[1]?i(r[1]):s:!1},Og=n=>n==="position"||n==="percentage",Dg=n=>n==="image"||n==="url",Mg=n=>n==="length"||n==="size"||n==="bg-size",Rg=n=>n==="length",h1=n=>n==="number",zg=n=>n==="family-name",Lg=n=>n==="number"||n==="weight",Ug=n=>n==="shadow",g1=()=>{const n=ct("color"),i=ct("font"),s=ct("text"),r=ct("font-weight"),d=ct("tracking"),f=ct("leading"),p=ct("breakpoint"),h=ct("container"),x=ct("spacing"),g=ct("radius"),S=ct("shadow"),b=ct("inset-shadow"),E=ct("text-shadow"),w=ct("drop-shadow"),C=ct("blur"),A=ct("perspective"),O=ct("aspect"),T=ct("ease"),X=ct("animate"),Y=()=>["auto","avoid","all","avoid-page","page","left","right","column"],P=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],Z=()=>[...P(),se,le],te=()=>["auto","hidden","clip","visible","scroll"],H=()=>["auto","contain","none"],Q=()=>[se,le,x],fe=()=>[mn,"full","auto",...Q()],He=()=>[pn,"none","subgrid",se,le],Ae=()=>["auto",{span:["full",pn,se,le]},pn,se,le],ze=()=>[pn,"auto",se,le],F=()=>["auto","min","max","fr",se,le],Te=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],qe=()=>["start","end","center","stretch","center-safe","end-safe"],L=()=>["auto",...Q()],J=()=>[mn,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...Q()],ie=()=>[mn,"screen","full","dvw","lvw","svw","min","max","fit",...Q()],be=()=>[mn,"screen","full","lh","dvh","lvh","svh","min","max","fit",...Q()],$=()=>[n,se,le],N=()=>[...P(),Mh,Dh,{position:[se,le]}],I=()=>["no-repeat",{repeat:["","x","y","space","round"]}],ee=()=>["auto","cover","contain",f1,i1,{size:[se,le]}],D=()=>[xu,qs,Gn],B=()=>["","none","full",g,se,le],q=()=>["",ye,qs,Gn],ae=()=>["solid","dashed","dotted","double"],Se=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],oe=()=>[ye,xu,Mh,Dh],Ie=()=>["","none",C,se,le],je=()=>["none",ye,se,le],Qe=()=>["none",ye,se,le],it=()=>[ye,se,le],$e=()=>[mn,"full",...Q()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[La],breakpoint:[La],color:[kg],container:[La],"drop-shadow":[La],ease:["in","out","in-out"],font:[r1],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[La],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[La],shadow:[La],spacing:["px",ye],text:[La],"text-shadow":[La],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",mn,le,se,O]}],container:["container"],columns:[{columns:[ye,le,se,h]}],"break-after":[{"break-after":Y()}],"break-before":[{"break-before":Y()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:Z()}],overflow:[{overflow:te()}],"overflow-x":[{"overflow-x":te()}],"overflow-y":[{"overflow-y":te()}],overscroll:[{overscroll:H()}],"overscroll-x":[{"overscroll-x":H()}],"overscroll-y":[{"overscroll-y":H()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:fe()}],"inset-x":[{"inset-x":fe()}],"inset-y":[{"inset-y":fe()}],start:[{"inset-s":fe(),start:fe()}],end:[{"inset-e":fe(),end:fe()}],"inset-bs":[{"inset-bs":fe()}],"inset-be":[{"inset-be":fe()}],top:[{top:fe()}],right:[{right:fe()}],bottom:[{bottom:fe()}],left:[{left:fe()}],visibility:["visible","invisible","collapse"],z:[{z:[pn,"auto",se,le]}],basis:[{basis:[mn,"full","auto",h,...Q()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[ye,mn,"auto","initial","none",le]}],grow:[{grow:["",ye,se,le]}],shrink:[{shrink:["",ye,se,le]}],order:[{order:[pn,"first","last","none",se,le]}],"grid-cols":[{"grid-cols":He()}],"col-start-end":[{col:Ae()}],"col-start":[{"col-start":ze()}],"col-end":[{"col-end":ze()}],"grid-rows":[{"grid-rows":He()}],"row-start-end":[{row:Ae()}],"row-start":[{"row-start":ze()}],"row-end":[{"row-end":ze()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":F()}],"auto-rows":[{"auto-rows":F()}],gap:[{gap:Q()}],"gap-x":[{"gap-x":Q()}],"gap-y":[{"gap-y":Q()}],"justify-content":[{justify:[...Te(),"normal"]}],"justify-items":[{"justify-items":[...qe(),"normal"]}],"justify-self":[{"justify-self":["auto",...qe()]}],"align-content":[{content:["normal",...Te()]}],"align-items":[{items:[...qe(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...qe(),{baseline:["","last"]}]}],"place-content":[{"place-content":Te()}],"place-items":[{"place-items":[...qe(),"baseline"]}],"place-self":[{"place-self":["auto",...qe()]}],p:[{p:Q()}],px:[{px:Q()}],py:[{py:Q()}],ps:[{ps:Q()}],pe:[{pe:Q()}],pbs:[{pbs:Q()}],pbe:[{pbe:Q()}],pt:[{pt:Q()}],pr:[{pr:Q()}],pb:[{pb:Q()}],pl:[{pl:Q()}],m:[{m:L()}],mx:[{mx:L()}],my:[{my:L()}],ms:[{ms:L()}],me:[{me:L()}],mbs:[{mbs:L()}],mbe:[{mbe:L()}],mt:[{mt:L()}],mr:[{mr:L()}],mb:[{mb:L()}],ml:[{ml:L()}],"space-x":[{"space-x":Q()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":Q()}],"space-y-reverse":["space-y-reverse"],size:[{size:J()}],"inline-size":[{inline:["auto",...ie()]}],"min-inline-size":[{"min-inline":["auto",...ie()]}],"max-inline-size":[{"max-inline":["none",...ie()]}],"block-size":[{block:["auto",...be()]}],"min-block-size":[{"min-block":["auto",...be()]}],"max-block-size":[{"max-block":["none",...be()]}],w:[{w:[h,"screen",...J()]}],"min-w":[{"min-w":[h,"screen","none",...J()]}],"max-w":[{"max-w":[h,"screen","none","prose",{screen:[p]},...J()]}],h:[{h:["screen","lh",...J()]}],"min-h":[{"min-h":["screen","lh","none",...J()]}],"max-h":[{"max-h":["screen","lh",...J()]}],"font-size":[{text:["base",s,qs,Gn]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[r,p1,o1]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",xu,le]}],"font-family":[{font:[d1,c1,i]}],"font-features":[{"font-features":[le]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[d,se,le]}],"line-clamp":[{"line-clamp":[ye,"none",se,Oh]}],leading:[{leading:[f,...Q()]}],"list-image":[{"list-image":["none",se,le]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",se,le]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:$()}],"text-color":[{text:$()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...ae(),"wavy"]}],"text-decoration-thickness":[{decoration:[ye,"from-font","auto",se,Gn]}],"text-decoration-color":[{decoration:$()}],"underline-offset":[{"underline-offset":[ye,"auto",se,le]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:Q()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",se,le]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",se,le]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:N()}],"bg-repeat":[{bg:I()}],"bg-size":[{bg:ee()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},pn,se,le],radial:["",se,le],conic:[pn,se,le]},m1,u1]}],"bg-color":[{bg:$()}],"gradient-from-pos":[{from:D()}],"gradient-via-pos":[{via:D()}],"gradient-to-pos":[{to:D()}],"gradient-from":[{from:$()}],"gradient-via":[{via:$()}],"gradient-to":[{to:$()}],rounded:[{rounded:B()}],"rounded-s":[{"rounded-s":B()}],"rounded-e":[{"rounded-e":B()}],"rounded-t":[{"rounded-t":B()}],"rounded-r":[{"rounded-r":B()}],"rounded-b":[{"rounded-b":B()}],"rounded-l":[{"rounded-l":B()}],"rounded-ss":[{"rounded-ss":B()}],"rounded-se":[{"rounded-se":B()}],"rounded-ee":[{"rounded-ee":B()}],"rounded-es":[{"rounded-es":B()}],"rounded-tl":[{"rounded-tl":B()}],"rounded-tr":[{"rounded-tr":B()}],"rounded-br":[{"rounded-br":B()}],"rounded-bl":[{"rounded-bl":B()}],"border-w":[{border:q()}],"border-w-x":[{"border-x":q()}],"border-w-y":[{"border-y":q()}],"border-w-s":[{"border-s":q()}],"border-w-e":[{"border-e":q()}],"border-w-bs":[{"border-bs":q()}],"border-w-be":[{"border-be":q()}],"border-w-t":[{"border-t":q()}],"border-w-r":[{"border-r":q()}],"border-w-b":[{"border-b":q()}],"border-w-l":[{"border-l":q()}],"divide-x":[{"divide-x":q()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":q()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...ae(),"hidden","none"]}],"divide-style":[{divide:[...ae(),"hidden","none"]}],"border-color":[{border:$()}],"border-color-x":[{"border-x":$()}],"border-color-y":[{"border-y":$()}],"border-color-s":[{"border-s":$()}],"border-color-e":[{"border-e":$()}],"border-color-bs":[{"border-bs":$()}],"border-color-be":[{"border-be":$()}],"border-color-t":[{"border-t":$()}],"border-color-r":[{"border-r":$()}],"border-color-b":[{"border-b":$()}],"border-color-l":[{"border-l":$()}],"divide-color":[{divide:$()}],"outline-style":[{outline:[...ae(),"none","hidden"]}],"outline-offset":[{"outline-offset":[ye,se,le]}],"outline-w":[{outline:["",ye,qs,Gn]}],"outline-color":[{outline:$()}],shadow:[{shadow:["","none",S,Si,bi]}],"shadow-color":[{shadow:$()}],"inset-shadow":[{"inset-shadow":["none",b,Si,bi]}],"inset-shadow-color":[{"inset-shadow":$()}],"ring-w":[{ring:q()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:$()}],"ring-offset-w":[{"ring-offset":[ye,Gn]}],"ring-offset-color":[{"ring-offset":$()}],"inset-ring-w":[{"inset-ring":q()}],"inset-ring-color":[{"inset-ring":$()}],"text-shadow":[{"text-shadow":["none",E,Si,bi]}],"text-shadow-color":[{"text-shadow":$()}],opacity:[{opacity:[ye,se,le]}],"mix-blend":[{"mix-blend":[...Se(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":Se()}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[ye]}],"mask-image-linear-from-pos":[{"mask-linear-from":oe()}],"mask-image-linear-to-pos":[{"mask-linear-to":oe()}],"mask-image-linear-from-color":[{"mask-linear-from":$()}],"mask-image-linear-to-color":[{"mask-linear-to":$()}],"mask-image-t-from-pos":[{"mask-t-from":oe()}],"mask-image-t-to-pos":[{"mask-t-to":oe()}],"mask-image-t-from-color":[{"mask-t-from":$()}],"mask-image-t-to-color":[{"mask-t-to":$()}],"mask-image-r-from-pos":[{"mask-r-from":oe()}],"mask-image-r-to-pos":[{"mask-r-to":oe()}],"mask-image-r-from-color":[{"mask-r-from":$()}],"mask-image-r-to-color":[{"mask-r-to":$()}],"mask-image-b-from-pos":[{"mask-b-from":oe()}],"mask-image-b-to-pos":[{"mask-b-to":oe()}],"mask-image-b-from-color":[{"mask-b-from":$()}],"mask-image-b-to-color":[{"mask-b-to":$()}],"mask-image-l-from-pos":[{"mask-l-from":oe()}],"mask-image-l-to-pos":[{"mask-l-to":oe()}],"mask-image-l-from-color":[{"mask-l-from":$()}],"mask-image-l-to-color":[{"mask-l-to":$()}],"mask-image-x-from-pos":[{"mask-x-from":oe()}],"mask-image-x-to-pos":[{"mask-x-to":oe()}],"mask-image-x-from-color":[{"mask-x-from":$()}],"mask-image-x-to-color":[{"mask-x-to":$()}],"mask-image-y-from-pos":[{"mask-y-from":oe()}],"mask-image-y-to-pos":[{"mask-y-to":oe()}],"mask-image-y-from-color":[{"mask-y-from":$()}],"mask-image-y-to-color":[{"mask-y-to":$()}],"mask-image-radial":[{"mask-radial":[se,le]}],"mask-image-radial-from-pos":[{"mask-radial-from":oe()}],"mask-image-radial-to-pos":[{"mask-radial-to":oe()}],"mask-image-radial-from-color":[{"mask-radial-from":$()}],"mask-image-radial-to-color":[{"mask-radial-to":$()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":P()}],"mask-image-conic-pos":[{"mask-conic":[ye]}],"mask-image-conic-from-pos":[{"mask-conic-from":oe()}],"mask-image-conic-to-pos":[{"mask-conic-to":oe()}],"mask-image-conic-from-color":[{"mask-conic-from":$()}],"mask-image-conic-to-color":[{"mask-conic-to":$()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:N()}],"mask-repeat":[{mask:I()}],"mask-size":[{mask:ee()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",se,le]}],filter:[{filter:["","none",se,le]}],blur:[{blur:Ie()}],brightness:[{brightness:[ye,se,le]}],contrast:[{contrast:[ye,se,le]}],"drop-shadow":[{"drop-shadow":["","none",w,Si,bi]}],"drop-shadow-color":[{"drop-shadow":$()}],grayscale:[{grayscale:["",ye,se,le]}],"hue-rotate":[{"hue-rotate":[ye,se,le]}],invert:[{invert:["",ye,se,le]}],saturate:[{saturate:[ye,se,le]}],sepia:[{sepia:["",ye,se,le]}],"backdrop-filter":[{"backdrop-filter":["","none",se,le]}],"backdrop-blur":[{"backdrop-blur":Ie()}],"backdrop-brightness":[{"backdrop-brightness":[ye,se,le]}],"backdrop-contrast":[{"backdrop-contrast":[ye,se,le]}],"backdrop-grayscale":[{"backdrop-grayscale":["",ye,se,le]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[ye,se,le]}],"backdrop-invert":[{"backdrop-invert":["",ye,se,le]}],"backdrop-opacity":[{"backdrop-opacity":[ye,se,le]}],"backdrop-saturate":[{"backdrop-saturate":[ye,se,le]}],"backdrop-sepia":[{"backdrop-sepia":["",ye,se,le]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":Q()}],"border-spacing-x":[{"border-spacing-x":Q()}],"border-spacing-y":[{"border-spacing-y":Q()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",se,le]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[ye,"initial",se,le]}],ease:[{ease:["linear","initial",T,se,le]}],delay:[{delay:[ye,se,le]}],animate:[{animate:["none",X,se,le]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[A,se,le]}],"perspective-origin":[{"perspective-origin":Z()}],rotate:[{rotate:je()}],"rotate-x":[{"rotate-x":je()}],"rotate-y":[{"rotate-y":je()}],"rotate-z":[{"rotate-z":je()}],scale:[{scale:Qe()}],"scale-x":[{"scale-x":Qe()}],"scale-y":[{"scale-y":Qe()}],"scale-z":[{"scale-z":Qe()}],"scale-3d":["scale-3d"],skew:[{skew:it()}],"skew-x":[{"skew-x":it()}],"skew-y":[{"skew-y":it()}],transform:[{transform:[se,le,"","none","gpu","cpu"]}],"transform-origin":[{origin:Z()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:$e()}],"translate-x":[{"translate-x":$e()}],"translate-y":[{"translate-y":$e()}],"translate-z":[{"translate-z":$e()}],"translate-none":["translate-none"],accent:[{accent:$()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:$()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",se,le]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":Q()}],"scroll-mx":[{"scroll-mx":Q()}],"scroll-my":[{"scroll-my":Q()}],"scroll-ms":[{"scroll-ms":Q()}],"scroll-me":[{"scroll-me":Q()}],"scroll-mbs":[{"scroll-mbs":Q()}],"scroll-mbe":[{"scroll-mbe":Q()}],"scroll-mt":[{"scroll-mt":Q()}],"scroll-mr":[{"scroll-mr":Q()}],"scroll-mb":[{"scroll-mb":Q()}],"scroll-ml":[{"scroll-ml":Q()}],"scroll-p":[{"scroll-p":Q()}],"scroll-px":[{"scroll-px":Q()}],"scroll-py":[{"scroll-py":Q()}],"scroll-ps":[{"scroll-ps":Q()}],"scroll-pe":[{"scroll-pe":Q()}],"scroll-pbs":[{"scroll-pbs":Q()}],"scroll-pbe":[{"scroll-pbe":Q()}],"scroll-pt":[{"scroll-pt":Q()}],"scroll-pr":[{"scroll-pr":Q()}],"scroll-pb":[{"scroll-pb":Q()}],"scroll-pl":[{"scroll-pl":Q()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",se,le]}],fill:[{fill:["none",...$()]}],"stroke-w":[{stroke:[ye,qs,Gn,Oh]}],stroke:[{stroke:["none",...$()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","inset-bs","inset-be","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pbs","pbe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mbs","mbe","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-bs","border-w-be","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-bs","border-color-be","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mbs","scroll-mbe","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pbs","scroll-pbe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}},v1=Z0(g1);function me(...n){return v1(T0(n))}const x1={mode:[{value:"interactive",label:"Interactive"},{value:"auto",label:"Auto"},{value:"review",label:"Review"}],granularity:[{value:"minimal",label:"Minimal"},{value:"standard",label:"Standard"},{value:"detailed",label:"Detailed"}],model_profile:[{value:"fast",label:"Fast"},{value:"balanced",label:"Balanced"},{value:"quality",label:"Quality"}],"execution.method":[{value:"agent",label:"Agent"},{value:"direct",label:"Direct"}],"git.branching":[{value:"none",label:"None"},{value:"per-milestone",label:"Per Milestone"},{value:"per-phase",label:"Per Phase"}]};function y1({label:n,checked:i,onChange:s}){return c.jsxs("div",{className:"flex items-center justify-between py-[3px]",children:[c.jsx("span",{className:"text-[length:var(--font-size-xs)] text-text-secondary truncate mr-2",children:n}),c.jsx("button",{type:"button",onClick:()=>s(!i),className:me("relative inline-flex h-[18px] w-[32px] shrink-0 cursor-pointer rounded-full border-2 border-transparent","transition-colors duration-[var(--duration-fast)]",i?"bg-accent-blue":"bg-border"),children:c.jsx("span",{className:me("pointer-events-none inline-block h-[14px] w-[14px] rounded-full bg-white shadow-sm","transition-transform duration-[var(--duration-fast)]",i?"translate-x-[14px]":"translate-x-0")})})]})}function b1({value:n,onChange:i,options:s}){return c.jsx("select",{value:n,onChange:r=>i(r.target.value),className:me("px-[var(--spacing-1-5)] py-0.5 rounded-[var(--radius-sm)] text-[length:var(--font-size-xs)]","border border-border bg-bg-primary text-text-primary","focus:outline-none focus:border-accent-blue"),children:s.map(r=>c.jsx("option",{value:r.value,children:r.label},r.value))})}function S1({value:n,onChange:i}){return c.jsx("input",{type:"number",value:n,onChange:s=>i(Number(s.target.value)),className:me("w-16 px-[var(--spacing-1-5)] py-0.5 rounded-[var(--radius-sm)] text-[length:var(--font-size-xs)]","border border-border bg-bg-primary text-text-primary text-right","focus:outline-none focus:border-accent-blue")})}function E1({value:n,onChange:i}){return c.jsx("input",{type:"text",value:n,onChange:s=>i(s.target.value),className:me("w-28 px-[var(--spacing-1-5)] py-0.5 rounded-[var(--radius-sm)] text-[length:var(--font-size-xs)]","border border-border bg-bg-primary text-text-primary","focus:outline-none focus:border-accent-blue")})}function Ei({label:n,children:i}){return c.jsxs("div",{className:"flex items-center justify-between py-[3px]",children:[c.jsx("span",{className:"text-[length:var(--font-size-xs)] text-text-secondary truncate mr-2",children:n}),i]})}function Fu(){const{t:n}=St();return(i,s)=>{const r=n(i);return r===i?s.replace(/_/g," ").replace(/\b\w/g,d=>d.toUpperCase()):r}}function Bg({fieldKey:n,value:i,path:s,onChange:r}){const d=Fu(),f=`workflow_config.${s}`,p=d(f,n);if(typeof i=="boolean")return c.jsx(y1,{label:p,checked:i,onChange:r});if(typeof i=="number")return c.jsx(Ei,{label:p,children:c.jsx(S1,{value:i,onChange:h=>r(h)})});if(typeof i=="string"){const h=x1[s];return h?c.jsx(Ei,{label:p,children:c.jsx(b1,{value:i,onChange:r,options:h})}):c.jsx(Ei,{label:p,children:c.jsx(E1,{value:i,onChange:r})})}return c.jsx(Ei,{label:p,children:c.jsx("span",{className:"text-[length:var(--font-size-xs)] text-text-tertiary",children:String(i)})})}function Hg({sectionKey:n,obj:i,parentPath:s,onChange:r}){const d=Fu(),f=`workflow_config.${s}.title`,p=d(f,n);return c.jsxs("div",{children:[c.jsx("h4",{className:"text-[length:var(--font-size-xs)] font-[var(--font-weight-semibold)] text-text-primary mb-[var(--spacing-1)] uppercase tracking-wide",children:p}),c.jsx("div",{className:"flex flex-col",children:Object.entries(i).map(([h,x])=>{const g=`${s}.${h}`;return x!==null&&typeof x=="object"&&!Array.isArray(x)?c.jsx(Hg,{sectionKey:h,obj:x,parentPath:g,onChange:S=>r({...i,[h]:S})},h):c.jsx(Bg,{fieldKey:h,value:x,path:g,onChange:S=>r({...i,[h]:S})},h)})})]})}function w1(){const{t:n}=St(),i=ia(C=>C.open),s=ia(C=>C.setOpen),r=ia(C=>C.draft),d=ia(C=>C.loading),f=ia(C=>C.saving),p=ia(C=>C.isDirty()),h=ia(C=>C.updateDraft),x=ia(C=>C.save),g=ia(C=>C.discard),S=v.useRef(null),b=v.useCallback(C=>{if(S.current&&!S.current.contains(C.target)){if(C.target.closest("[data-workflow-config-trigger]"))return;s(!1)}},[s]);if(v.useEffect(()=>{if(i)return document.addEventListener("mousedown",b),()=>document.removeEventListener("mousedown",b)},[i,b]),v.useEffect(()=>{if(!i)return;const C=A=>{A.key==="Escape"&&s(!1)};return window.addEventListener("keydown",C),()=>window.removeEventListener("keydown",C)},[i,s]),!i)return null;const E=Fu(),w=r&&Object.keys(r).length>0;return c.jsxs("div",{ref:S,className:me("absolute top-[calc(var(--size-topbar-height)+4px)] right-[var(--spacing-4)] z-50","w-[340px] max-h-[calc(100vh-var(--size-topbar-height)-40px)]","rounded-[var(--radius-lg)] border border-border bg-bg-primary shadow-[var(--style-modal-shadow)]","flex flex-col overflow-hidden","animate-in fade-in-0 zoom-in-95 duration-150"),children:[c.jsxs("div",{className:"flex items-center justify-between px-[var(--spacing-3)] py-[var(--spacing-2)] border-b border-border shrink-0",children:[c.jsx("h3",{className:"text-[length:var(--font-size-sm)] font-[var(--font-weight-semibold)] text-text-primary",children:n("workflow_config.title")}),c.jsx("button",{type:"button",onClick:()=>s(!1),className:"w-6 h-6 flex items-center justify-center rounded-[var(--radius-sm)] text-text-secondary hover:text-text-primary hover:bg-bg-hover transition-colors duration-[var(--duration-fast)]",children:c.jsxs("svg",{className:"w-3.5 h-3.5",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[c.jsx("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),c.jsx("line",{x1:"6",y1:"6",x2:"18",y2:"18"})]})})]}),c.jsx("div",{className:"flex-1 overflow-y-auto px-[var(--spacing-3)] py-[var(--spacing-2)] space-y-[var(--spacing-3)]",children:d&&!r?c.jsx("p",{className:"text-[length:var(--font-size-xs)] text-text-secondary text-center py-4",children:n("workflow_config.loading")}):w?c.jsxs(c.Fragment,{children:[(()=>{const C=Object.entries(r).filter(([,A])=>A===null||typeof A!="object");return C.length===0?null:c.jsxs("div",{children:[c.jsx("h4",{className:"text-[length:var(--font-size-xs)] font-[var(--font-weight-semibold)] text-text-primary mb-[var(--spacing-1)] uppercase tracking-wide",children:E("workflow_config.top.title","Profile")}),c.jsx("div",{className:"flex flex-col",children:C.map(([A,O])=>c.jsx(Bg,{fieldKey:A,value:O,path:A,onChange:T=>h(A,T)},A))})]})})(),Object.entries(r).filter(([,C])=>C!==null&&typeof C=="object"&&!Array.isArray(C)).map(([C,A])=>c.jsx(Hg,{sectionKey:C,obj:A,parentPath:C,onChange:O=>h(C,O)},C))]}):c.jsx("p",{className:"text-[length:var(--font-size-xs)] text-text-secondary text-center py-4",children:n("workflow_config.empty")})}),p&&c.jsxs("div",{className:"flex items-center justify-end gap-[var(--spacing-2)] px-[var(--spacing-3)] py-[var(--spacing-2)] border-t border-border shrink-0 bg-bg-secondary/95",children:[c.jsx("button",{type:"button",onClick:g,disabled:f,className:me("px-[var(--spacing-2)] py-[var(--spacing-1)] rounded-[var(--radius-sm)]","text-[length:var(--font-size-xs)] font-[var(--font-weight-medium)]","border border-border text-text-secondary hover:text-text-primary hover:bg-bg-hover","transition-colors duration-[var(--duration-fast)]","disabled:opacity-50"),children:n("workflow_config.discard")}),c.jsx("button",{type:"button",onClick:()=>void x(),disabled:f,className:me("px-[var(--spacing-2)] py-[var(--spacing-1)] rounded-[var(--radius-sm)]","text-[length:var(--font-size-xs)] font-[var(--font-weight-medium)]","bg-accent-blue text-white hover:opacity-90","transition-colors duration-[var(--duration-fast)]","disabled:opacity-50"),children:n(f?"workflow_config.saving":"workflow_config.save")})]})]})}function j1(){const n=Vt(S=>S.board),i=Vt(S=>S.connected),s=pe(S=>S.setOpen),r=ia(S=>S.open),d=ia(S=>S.setOpen),{t:f,locale:p,setLocale:h}=St(),x=n==null?void 0:n.project,g=()=>{h(p==="en"?"zh-CN":"en")};return c.jsxs("header",{role:"banner",className:"relative flex items-center justify-between px-[var(--spacing-4)] h-[var(--size-topbar-height)] bg-bg-secondary border-b border-border shrink-0",children:[c.jsxs("div",{className:"flex items-center gap-[var(--spacing-3)]",children:[c.jsx("span",{className:"font-[800] text-[length:var(--font-size-base)] text-text-primary tracking-[-0.02em]","aria-hidden":"true",children:"Maestro"}),c.jsx(j0,{}),x&&c.jsxs(c.Fragment,{children:[c.jsx("span",{className:"text-text-placeholder text-[length:var(--font-size-sm)]",children:"·"}),c.jsx("span",{className:"text-text-secondary text-[length:var(--font-size-sm)] truncate max-w-[200px]",children:x.current_milestone||x.project_name})]})]}),c.jsx("div",{className:"flex-1 flex justify-center",children:c.jsx(y0,{})}),c.jsxs("div",{className:"flex items-center gap-[var(--spacing-4)]",children:[c.jsxs("button",{type:"button",onClick:g,"aria-label":f("language_switcher.aria_label"),className:["flex items-center gap-[var(--spacing-1-5)] px-[var(--spacing-2)] py-[var(--spacing-1)] rounded-[var(--radius-sm)]","text-[length:var(--font-size-xs)] font-[var(--font-weight-medium)]","transition-all duration-[var(--duration-fast)] ease-[var(--ease-notion)]","focus-visible:outline-none focus-visible:shadow-[var(--shadow-focus-ring)]","hover:bg-bg-hover",p==="zh-CN"?"text-accent-blue":"text-text-secondary"].join(" "),children:[c.jsx("span",{className:"tabular-nums",children:f(p==="en"?"language_switcher.en":"language_switcher.zh")}),c.jsx("span",{className:"text-text-tertiary",children:"/"}),c.jsx("span",{className:"tabular-nums",children:f(p==="en"?"language_switcher.zh":"language_switcher.en")})]}),x&&c.jsx(C0,{}),x&&c.jsxs("span",{className:"text-[length:var(--font-size-sm)] text-text-secondary transition-opacity duration-[var(--duration-normal)] ease-[var(--ease-in-out)] hidden sm:inline",children:[f("topbar.phase")," ",x.current_phase," ",f("topbar.of")," ",x.phases_summary.total]}),c.jsx("button",{type:"button","data-workflow-config-trigger":!0,onClick:()=>d(!r),"aria-label":f("workflow_config.btn_aria"),className:["flex items-center justify-center w-8 h-8 rounded-[var(--radius-sm)]",r?"text-accent-blue bg-accent-blue/10":"text-text-secondary hover:text-text-primary hover:bg-bg-hover","transition-colors duration-[var(--duration-fast)] ease-[var(--ease-notion)]","focus-visible:outline-none focus-visible:shadow-[var(--shadow-focus-ring)]"].join(" "),children:c.jsxs("svg",{className:"w-4 h-4",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[c.jsx("line",{x1:"4",y1:"21",x2:"4",y2:"14"}),c.jsx("line",{x1:"4",y1:"10",x2:"4",y2:"3"}),c.jsx("line",{x1:"12",y1:"21",x2:"12",y2:"12"}),c.jsx("line",{x1:"12",y1:"8",x2:"12",y2:"3"}),c.jsx("line",{x1:"20",y1:"21",x2:"20",y2:"16"}),c.jsx("line",{x1:"20",y1:"12",x2:"20",y2:"3"}),c.jsx("line",{x1:"1",y1:"14",x2:"7",y2:"14"}),c.jsx("line",{x1:"9",y1:"8",x2:"15",y2:"8"}),c.jsx("line",{x1:"17",y1:"16",x2:"23",y2:"16"})]})}),c.jsx("button",{type:"button",onClick:()=>s(!0),"aria-label":"Open settings",className:["flex items-center justify-center w-8 h-8 rounded-[var(--radius-sm)]","text-text-secondary hover:text-text-primary hover:bg-bg-hover","transition-colors duration-[var(--duration-fast)] ease-[var(--ease-notion)]","focus-visible:outline-none focus-visible:shadow-[var(--shadow-focus-ring)]"].join(" "),children:c.jsxs("svg",{className:"w-4 h-4",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[c.jsx("circle",{cx:"12",cy:"12",r:"3"}),c.jsx("path",{d:"M19.4 15a1.65 1.65 0 0 0 .33 1.82l.06.06a2 2 0 1 1-2.83 2.83l-.06-.06a1.65 1.65 0 0 0-1.82-.33 1.65 1.65 0 0 0-1 1.51V21a2 2 0 0 1-4 0v-.09A1.65 1.65 0 0 0 9 19.4a1.65 1.65 0 0 0-1.82.33l-.06.06a2 2 0 1 1-2.83-2.83l.06-.06A1.65 1.65 0 0 0 4.68 15a1.65 1.65 0 0 0-1.51-1H3a2 2 0 0 1 0-4h.09A1.65 1.65 0 0 0 4.6 9a1.65 1.65 0 0 0-.33-1.82l-.06-.06a2 2 0 1 1 2.83-2.83l.06.06A1.65 1.65 0 0 0 9 4.68a1.65 1.65 0 0 0 1-1.51V3a2 2 0 0 1 4 0v.09a1.65 1.65 0 0 0 1 1.51 1.65 1.65 0 0 0 1.82-.33l.06-.06a2 2 0 1 1 2.83 2.83l-.06.06A1.65 1.65 0 0 0 19.4 9a1.65 1.65 0 0 0 1.51 1H21a2 2 0 0 1 0 4h-.09a1.65 1.65 0 0 0-1.51 1z"})]})}),c.jsxs("span",{role:"status","aria-live":"polite","aria-label":f(i?"topbar.connection.aria_connected":"topbar.connection.aria_disconnected"),className:["flex items-center gap-[5px] text-[length:10px] font-[var(--font-weight-semibold)] px-[10px] py-[3px] rounded-full","transition-colors duration-[var(--duration-smooth)] ease-[var(--ease-notion)]",i?"bg-[rgba(90,158,120,0.12)] text-status-completed":"bg-[rgba(196,101,85,0.12)] text-status-blocked"].join(" "),children:[c.jsx("span",{className:`w-1.5 h-1.5 rounded-full bg-current ${i?"animate-pulse":""}`}),f(i?"topbar.connection.connected":"topbar.connection.disconnected")]})]}),c.jsx(w1,{})]})}/**
78
+ * @license lucide-react v0.577.0 - ISC
79
+ *
80
+ * This source code is licensed under the ISC license.
81
+ * See the LICENSE file in the root directory of this source tree.
82
+ */const Gg=(...n)=>n.filter((i,s,r)=>!!i&&i.trim()!==""&&r.indexOf(i)===s).join(" ").trim();/**
83
+ * @license lucide-react v0.577.0 - ISC
84
+ *
85
+ * This source code is licensed under the ISC license.
86
+ * See the LICENSE file in the root directory of this source tree.
87
+ */const N1=n=>n.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase();/**
88
+ * @license lucide-react v0.577.0 - ISC
89
+ *
90
+ * This source code is licensed under the ISC license.
91
+ * See the LICENSE file in the root directory of this source tree.
92
+ */const _1=n=>n.replace(/^([A-Z])|[\s-_]+(\w)/g,(i,s,r)=>r?r.toUpperCase():s.toLowerCase());/**
93
+ * @license lucide-react v0.577.0 - ISC
94
+ *
95
+ * This source code is licensed under the ISC license.
96
+ * See the LICENSE file in the root directory of this source tree.
97
+ */const Rh=n=>{const i=_1(n);return i.charAt(0).toUpperCase()+i.slice(1)};/**
98
+ * @license lucide-react v0.577.0 - ISC
99
+ *
100
+ * This source code is licensed under the ISC license.
101
+ * See the LICENSE file in the root directory of this source tree.
102
+ */var C1={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};/**
103
+ * @license lucide-react v0.577.0 - ISC
104
+ *
105
+ * This source code is licensed under the ISC license.
106
+ * See the LICENSE file in the root directory of this source tree.
107
+ */const T1=n=>{for(const i in n)if(i.startsWith("aria-")||i==="role"||i==="title")return!0;return!1};/**
108
+ * @license lucide-react v0.577.0 - ISC
109
+ *
110
+ * This source code is licensed under the ISC license.
111
+ * See the LICENSE file in the root directory of this source tree.
112
+ */const A1=v.forwardRef(({color:n="currentColor",size:i=24,strokeWidth:s=2,absoluteStrokeWidth:r,className:d="",children:f,iconNode:p,...h},x)=>v.createElement("svg",{ref:x,...C1,width:i,height:i,stroke:n,strokeWidth:r?Number(s)*24/Number(i):s,className:Gg("lucide",d),...!f&&!T1(h)&&{"aria-hidden":"true"},...h},[...p.map(([g,S])=>v.createElement(g,S)),...Array.isArray(f)?f:[f]]));/**
113
+ * @license lucide-react v0.577.0 - ISC
114
+ *
115
+ * This source code is licensed under the ISC license.
116
+ * See the LICENSE file in the root directory of this source tree.
117
+ */const Ct=(n,i)=>{const s=v.forwardRef(({className:r,...d},f)=>v.createElement(A1,{ref:f,iconNode:i,className:Gg(`lucide-${N1(Rh(n))}`,`lucide-${n}`,r),...d}));return s.displayName=Rh(n),s};/**
118
+ * @license lucide-react v0.577.0 - ISC
119
+ *
120
+ * This source code is licensed under the ISC license.
121
+ * See the LICENSE file in the root directory of this source tree.
122
+ */const k1=[["rect",{width:"7",height:"7",x:"3",y:"3",rx:"1",key:"1g98yp"}],["rect",{width:"7",height:"7",x:"14",y:"3",rx:"1",key:"6d4xhi"}],["rect",{width:"7",height:"7",x:"14",y:"14",rx:"1",key:"nxv5o0"}],["rect",{width:"7",height:"7",x:"3",y:"14",rx:"1",key:"1bb6yr"}]],O1=Ct("layout-grid",k1);/**
123
+ * @license lucide-react v0.577.0 - ISC
124
+ *
125
+ * This source code is licensed under the ISC license.
126
+ * See the LICENSE file in the root directory of this source tree.
127
+ */const D1=[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]],M1=Ct("file-text",D1);/**
128
+ * @license lucide-react v0.577.0 - ISC
129
+ *
130
+ * This source code is licensed under the ISC license.
131
+ * See the LICENSE file in the root directory of this source tree.
132
+ */const R1=[["path",{d:"M22 17a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 21.286V5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2z",key:"18887p"}]],z1=Ct("message-square",R1);/**
133
+ * @license lucide-react v0.577.0 - ISC
134
+ *
135
+ * This source code is licensed under the ISC license.
136
+ * See the LICENSE file in the root directory of this source tree.
137
+ */const L1=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 6v6l4 2",key:"mmk7yg"}]],U1=Ct("clock",L1);/**
138
+ * @license lucide-react v0.577.0 - ISC
139
+ *
140
+ * This source code is licensed under the ISC license.
141
+ * See the LICENSE file in the root directory of this source tree.
142
+ */const B1=[["path",{d:"M12.83 2.18a2 2 0 0 0-1.66 0L2.6 6.08a1 1 0 0 0 0 1.83l8.58 3.91a2 2 0 0 0 1.66 0l8.58-3.9a1 1 0 0 0 0-1.83z",key:"zw3jo"}],["path",{d:"M2 12a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 12",key:"1wduqc"}],["path",{d:"M2 17a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 17",key:"kqbvx6"}]],H1=Ct("layers",B1);/**
143
+ * @license lucide-react v0.577.0 - ISC
144
+ *
145
+ * This source code is licensed under the ISC license.
146
+ * See the LICENSE file in the root directory of this source tree.
147
+ */const G1=[["path",{d:"M12 7v14",key:"1akyts"}],["path",{d:"M3 18a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1h5a4 4 0 0 1 4 4 4 4 0 0 1 4-4h5a1 1 0 0 1 1 1v13a1 1 0 0 1-1 1h-6a3 3 0 0 0-3 3 3 3 0 0 0-3-3z",key:"ruj8y"}]],q1=Ct("book-open",G1);/**
148
+ * @license lucide-react v0.577.0 - ISC
149
+ *
150
+ * This source code is licensed under the ISC license.
151
+ * See the LICENSE file in the root directory of this source tree.
152
+ */const I1=[["path",{d:"M12 8V4H8",key:"hb8ula"}],["rect",{width:"16",height:"12",x:"4",y:"8",rx:"2",key:"enze0r"}],["path",{d:"M2 14h2",key:"vft8re"}],["path",{d:"M20 14h2",key:"4cs60a"}],["path",{d:"M15 13v2",key:"1xurst"}],["path",{d:"M9 13v2",key:"rq6x2g"}]],K1=Ct("bot",I1);/**
153
+ * @license lucide-react v0.577.0 - ISC
154
+ *
155
+ * This source code is licensed under the ISC license.
156
+ * See the LICENSE file in the root directory of this source tree.
157
+ */const Y1=[["path",{d:"M13 5h8",key:"a7qcls"}],["path",{d:"M13 12h8",key:"h98zly"}],["path",{d:"M13 19h8",key:"c3s6r1"}],["path",{d:"m3 17 2 2 4-4",key:"1jhpwq"}],["path",{d:"m3 7 2 2 4-4",key:"1obspn"}]],V1=Ct("list-checks",Y1);/**
158
+ * @license lucide-react v0.577.0 - ISC
159
+ *
160
+ * This source code is licensed under the ISC license.
161
+ * See the LICENSE file in the root directory of this source tree.
162
+ */const X1=[["path",{d:"M22 12h-2.48a2 2 0 0 0-1.93 1.46l-2.35 8.36a.25.25 0 0 1-.48 0L9.24 2.18a.25.25 0 0 0-.48 0l-2.35 8.36A2 2 0 0 1 4.49 12H2",key:"169zse"}]],Q1=Ct("activity",X1);/**
163
+ * @license lucide-react v0.577.0 - ISC
164
+ *
165
+ * This source code is licensed under the ISC license.
166
+ * See the LICENSE file in the root directory of this source tree.
167
+ */const P1=[["path",{d:"M18 21a8 8 0 0 0-16 0",key:"3ypg7q"}],["circle",{cx:"10",cy:"8",r:"5",key:"o932ke"}],["path",{d:"M22 20c0-3.37-2-6.5-4-8a5 5 0 0 0-.45-8.3",key:"10s06x"}]],Z1=Ct("users-round",P1);/**
168
+ * @license lucide-react v0.577.0 - ISC
169
+ *
170
+ * This source code is licensed under the ISC license.
171
+ * See the LICENSE file in the root directory of this source tree.
172
+ */const J1=[["path",{d:"M2 3h20",key:"91anmk"}],["path",{d:"M21 3v11a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V3",key:"2k9sn8"}],["path",{d:"m7 21 5-5 5 5",key:"bip4we"}]],F1=Ct("presentation",J1);/**
173
+ * @license lucide-react v0.577.0 - ISC
174
+ *
175
+ * This source code is licensed under the ISC license.
176
+ * See the LICENSE file in the root directory of this source tree.
177
+ */const $1=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M9 3v18",key:"fh3hqa"}]],W1=Ct("panel-left",$1);/**
178
+ * @license lucide-react v0.577.0 - ISC
179
+ *
180
+ * This source code is licensed under the ISC license.
181
+ * See the LICENSE file in the root directory of this source tree.
182
+ */const eS=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]],tS=Ct("plus",eS);/**
183
+ * @license lucide-react v0.577.0 - ISC
184
+ *
185
+ * This source code is licensed under the ISC license.
186
+ * See the LICENSE file in the root directory of this source tree.
187
+ */const aS=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],nS=Ct("x",aS);/**
188
+ * @license lucide-react v0.577.0 - ISC
189
+ *
190
+ * This source code is licensed under the ISC license.
191
+ * See the LICENSE file in the root directory of this source tree.
192
+ */const lS=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],sS=Ct("chevron-down",lS),zl=500,rS=1800*1e3,qg="maestro-session-titles";function iS(){try{const n=localStorage.getItem(qg);return n?JSON.parse(n):{}}catch{return{}}}function oS(n){try{localStorage.setItem(qg,JSON.stringify(n))}catch{}}const Ua=new Map,oa=_t(n=>({processes:{},entries:{},pendingApprovals:{},activeProcessId:null,processThoughts:{},processStreaming:{},processTokenUsage:{},selectedProcessIds:new Set,processTitles:iS(),addProcess:i=>n(s=>{var p;const r=s.entries[i.id];if(r&&r.length>0)return{processes:{...s.processes,[i.id]:i}};const d=(p=i.config)==null?void 0:p.prompt,f=d?[{id:`synth-user-${i.id}`,processId:i.id,timestamp:i.startedAt,type:"user_message",content:d}]:[];return{processes:{...s.processes,[i.id]:i},entries:{...s.entries,[i.id]:f}}}),removeProcess:i=>n(s=>{const{[i]:r,...d}=s.processes;return{processes:d}}),updateProcessStatus:(i,s)=>{if(s==="stopped"||s==="error"){if(!Ua.has(i)){const r=setTimeout(()=>{Ua.delete(i);const{processes:d,activeProcessId:f,dismissProcess:p}=oa.getState(),h=d[i];h&&(h.status==="stopped"||h.status==="error")&&f!==i&&p(i)},rS);Ua.set(i,r)}}else{const r=Ua.get(i);r&&(clearTimeout(r),Ua.delete(i))}n(r=>{const d=r.processes[i];return d?{processes:{...r.processes,[i]:{...d,status:s}}}:r})},addEntry:(i,s)=>n(r=>{const d=r.entries[i]??[];if(s.id&&d.some(p=>p.id===s.id))return r;let f;if(s.type==="assistant_message"){const p=d.length-1,h=p>=0?d[p]:null;if(s.partial&&(h==null?void 0:h.type)==="assistant_message"&&h.partial){const x={...h,content:h.content+s.content,id:s.id};f=d.slice(),f[p]=x}else!s.partial&&(h==null?void 0:h.type)==="assistant_message"&&h.partial?(f=d.slice(),f[p]=s):f=[...d,s]}else f=[...d,s];return{entries:{...r.entries,[i]:f.length>zl?f.slice(-zl):f}}}),setEntries:(i,s)=>n(r=>({entries:{...r.entries,[i]:s.length>zl?s.slice(-zl):s}})),batchAddEntries:i=>n(s=>{const r={...s.entries};for(const[d,f]of Object.entries(i)){const p=r[d]??[],h=new Set(p.map(S=>S.id).filter(Boolean)),x=f.filter(S=>!S.id||!h.has(S.id));if(x.length===0)continue;const g=[...p,...x];r[d]=g.length>zl?g.slice(-zl):g}return{entries:r}}),setApproval:i=>n(s=>({pendingApprovals:{...s.pendingApprovals,[i.id]:i}})),clearApproval:i=>n(s=>{const{[i]:r,...d}=s.pendingApprovals;return{pendingApprovals:d}}),setActiveProcessId:i=>n({activeProcessId:i}),setProcessThought:(i,s)=>n(r=>({processThoughts:{...r.processThoughts,[i]:s}})),setProcessStreaming:(i,s)=>n(r=>({processStreaming:{...r.processStreaming,[i]:s}})),updateProcessTokenUsage:(i,s,r,d,f)=>n(p=>{const h=p.processTokenUsage[i]??{input:0,output:0,cacheRead:0,cacheWrite:0};return{processTokenUsage:{...p.processTokenUsage,[i]:{input:h.input+s,output:h.output+r,cacheRead:h.cacheRead+d,cacheWrite:h.cacheWrite+f}}}}),dismissProcess:i=>{const s=Ua.get(i);if(s&&(clearTimeout(s),Ua.delete(i)),i.startsWith("cli-history-")){const r=i.slice(12);fetch(`/api/cli-history/${encodeURIComponent(r)}`,{method:"DELETE"}).catch(()=>{})}fetch(`/api/agents/${encodeURIComponent(i)}`,{method:"DELETE"}).catch(()=>{}),n(r=>{const{[i]:d,...f}=r.processes,{[i]:p,...h}=r.entries,{[i]:x,...g}=r.processThoughts,{[i]:S,...b}=r.processStreaming,{[i]:E,...w}=r.processTokenUsage,C={};for(const[A,O]of Object.entries(r.pendingApprovals))O.processId!==i&&(C[A]=O);return{processes:f,entries:h,processThoughts:g,processStreaming:b,processTokenUsage:w,pendingApprovals:C,activeProcessId:r.activeProcessId===i?null:r.activeProcessId}})},cleanupStaleProcesses:()=>{const{processes:i,activeProcessId:s,dismissProcess:r}=oa.getState();for(const[d,f]of Object.entries(i))(f.status==="stopped"||f.status==="error")&&s!==d&&r(d)},toggleProcessSelection:i=>n(s=>{const r=new Set(s.selectedProcessIds);return r.has(i)?r.delete(i):r.add(i),{selectedProcessIds:r}}),clearProcessSelection:()=>n({selectedProcessIds:new Set}),renameProcess:(i,s)=>n(r=>{const d={...r.processTitles,[i]:s};return oS(d),{processTitles:d}}),batchDismissProcesses:i=>{const{dismissProcess:s}=oa.getState();for(const r of i)s(r);n({selectedProcessIds:new Set})},getProcessTitle:i=>oa.getState().processTitles[i]||void 0,clearAll:()=>{for(const i of Ua.values())clearTimeout(i);Ua.clear(),n({processes:{},entries:{},pendingApprovals:{},activeProcessId:null,processThoughts:{},processStreaming:{},processTokenUsage:{},selectedProcessIds:new Set})}})),zu=_t((n,i)=>({issues:[],loading:!1,error:null,patchIssue:s=>n(r=>{const d=r.issues.findIndex(f=>f.id===s.id);if(d>=0){const f=[...r.issues];return f[d]=s,{issues:f}}return{issues:[...r.issues,s]}}),fetchIssues:async s=>{n({loading:!0,error:null});try{const r=new URLSearchParams;s!=null&&s.status&&r.set("status",s.status),s!=null&&s.type&&r.set("type",s.type);const d=r.toString(),f=Gs.ISSUES+(d?`?${d}`:""),p=await fetch(f);if(!p.ok)throw new Error(`Failed to fetch issues: ${p.status}`);const h=await p.json();n({issues:h,loading:!1})}catch(r){n({loading:!1,error:String(r)})}},createIssue:async s=>{n({error:null});try{const r=await fetch(Gs.ISSUES,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(s)});if(!r.ok){const f=await r.json().catch(()=>({error:`HTTP ${r.status}`}));throw new Error(f.error)}const d=await r.json();return n(f=>({issues:[...f.issues,d]})),d}catch(r){return n({error:String(r)}),null}},updateIssue:async(s,r)=>{n({error:null});const d=i().issues;n(f=>({issues:f.issues.map(p=>p.id===s?{...p,...r,updated_at:new Date().toISOString()}:p)}));try{const f=Gs.ISSUES+`/${s}`,p=await fetch(f,{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify(r)});if(!p.ok)throw new Error(`Failed to update issue: ${p.status}`);const h=await p.json();n(x=>({issues:x.issues.map(g=>g.id===s?h:g)}))}catch(f){n({issues:d,error:String(f)})}},deleteIssue:async s=>{n({error:null});const r=i().issues;n(d=>({issues:d.issues.filter(f=>f.id!==s)}));try{const d=Gs.ISSUES+`/${s}`,f=await fetch(d,{method:"DELETE"});if(!f.ok)throw new Error(`Failed to delete issue: ${f.status}`)}catch(d){n({issues:r,error:String(d)})}},addSupplement:async(s,r,d,f)=>{const p=i().issues.find(S=>S.id===s);if(!p)return;const h=p.supplements??[],x={content:r,stage:d,author:f,created_at:new Date().toISOString()},g=[...h,x];n(S=>({issues:S.issues.map(b=>b.id===s?{...b,supplements:g,updated_at:new Date().toISOString()}:b)}));try{const S=Gs.ISSUES+`/${s}`;await fetch(S,{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({supplements:g})})}catch(S){n({error:String(S)})}}})),cS=[],uS=[{labelKey:"nav.kanban",tooltipKey:"dock.kanban_tooltip",path:"/kanban",icon:"kanban",shortcut:"K"},{labelKey:"nav.artifacts",tooltipKey:"dock.artifacts_tooltip",path:"/artifacts",icon:"artifacts",shortcut:"A"},{labelKey:"nav.chat",tooltipKey:"dock.chat_tooltip",path:"/chat",icon:"chat",shortcut:"C"},{labelKey:"nav.workflow",tooltipKey:"dock.workflow_tooltip",path:"/workflow",icon:"workflow",shortcut:"W"},{labelKey:"nav.mcp",tooltipKey:"dock.mcp_tooltip",path:"/mcp",icon:"mcp",shortcut:"M"},{labelKey:"nav.specs",tooltipKey:"dock.specs_tooltip",path:"/specs",icon:"specs",shortcut:"S"},{labelKey:"nav.teams",tooltipKey:"dock.teams_tooltip",path:"/teams",icon:"teams",shortcut:"T"},{labelKey:"nav.collab",tooltipKey:"dock.collab_tooltip",path:"/collab",icon:"collab",shortcut:"L"},{labelKey:"nav.requirement",tooltipKey:"dock.requirement_tooltip",path:"/requirement",icon:"requirement",shortcut:"R"},{labelKey:"nav.maestro_coordinate",tooltipKey:"dock.maestro_coordinate_tooltip",path:"/maestro-coordinate",icon:"maestro-coordinate",shortcut:"V"},{labelKey:"nav.rooms",tooltipKey:"dock.rooms_tooltip",path:"/rooms",icon:"rooms",shortcut:"O"}];function dS({isPinned:n,onTogglePin:i}){const{t:s}=St(),r=Vt(F=>{var Te;return((Te=F.board)==null?void 0:Te.phases)??cS}),d=oa(F=>F.processes),f=oa(F=>F.activeProcessId),p=Vt(F=>F.selectedPhase),h=Vt(F=>F.setSelectedPhase),x=zu(F=>F.issues),g=zu(F=>F.fetchIssues),S=Gi(),b=Ha();v.useEffect(()=>{g()},[g]);const E=v.useMemo(()=>{const F={open:0,in_progress:0,resolved:0,closed:0,total:0};for(const Te of x)F.total++,Te.status in F&&F[Te.status]++;return F},[x]),w=v.useRef(null),C=v.useRef(null),[A,O]=v.useState(!1),T=v.useMemo(()=>{const F=Date.now()-864e5;return Object.values(d).filter(Te=>new Date(Te.startedAt).getTime()>F)},[d]),X=pe(F=>{var qe,L,J,ie;return((L=(qe=F.draft)==null?void 0:qe.general)==null?void 0:L.hiddenNavItems)??((ie=(J=F.config)==null?void 0:J.general)==null?void 0:ie.hiddenNavItems)}),Y=v.useMemo(()=>["/maestro-coordinate","/requirement","/rooms"],[]),P=X??Y,Z=v.useMemo(()=>uS.filter(F=>!P.includes(F.path)),[P]),[te,H]=v.useState(!1),Q=5,fe=v.useCallback(()=>{n||O(!0)},[n]),He=v.useCallback(F=>{var Te;!n&&!(F.relatedTarget instanceof Node&&((Te=C.current)!=null&&Te.contains(F.relatedTarget)))&&O(!1)},[n]),Ae=v.useCallback(F=>{var Te;!n&&!(F.relatedTarget instanceof Node&&((Te=w.current)!=null&&Te.contains(F.relatedTarget)))&&O(!1)},[n]),ze=v.useCallback(F=>{S(F),O(!1)},[S]);return c.jsxs("div",{className:"relative flex",children:[c.jsxs("nav",{ref:w,role:"navigation","aria-label":s("nav.views"),className:"w-[var(--size-rail-width)] bg-bg-secondary border-r border-border flex-shrink-0 flex flex-col items-center pt-2 gap-0.5 z-50",onMouseEnter:fe,onMouseLeave:He,children:[Z.map(F=>c.jsx(fS,{item:F,isActive:b.pathname.startsWith(F.path),onActivate:()=>ze(F.path),t:s},F.path)),c.jsx("div",{className:"w-6 h-px bg-border-divider my-1.5","aria-hidden":"true"}),c.jsx("div",{className:"flex flex-col items-center gap-1.5 py-1",role:"list","aria-label":s("dock.phases_label"),children:T.length>0?T.slice(0,Q).map(F=>c.jsx(hS,{process:F,isActive:F.id===f,onSelect:()=>{oa.getState().setActiveProcessId(F.id),S("/chat")}},F.id)):r.map(F=>c.jsx(gS,{phase:F,t:s},F.phase))}),c.jsx("button",{type:"button",onClick:i,"aria-label":s("dock.toggle_sidebar"),className:["mt-auto mb-2 flex items-center justify-center w-9 h-9 rounded-[6px]","transition-colors duration-[var(--duration-fast)] ease-[var(--ease-notion)]","focus-visible:outline-none focus-visible:shadow-[var(--shadow-focus-ring)]",n?"text-text-primary bg-bg-active":"text-text-tertiary hover:bg-bg-hover hover:text-text-primary"].join(" "),children:c.jsx(W1,{size:16,strokeWidth:1.8})})]}),c.jsxs("aside",{ref:C,"aria-label":s("dock.views_label"),className:["dock-floating-panel","absolute left-[var(--size-rail-width)] top-0 bottom-0","w-[calc(var(--size-panel-width)-var(--size-rail-width))]","bg-bg-secondary border-r border-border overflow-y-auto z-40","shadow-[4px_0_16px_rgba(0,0,0,0.06)]","transition-[transform,opacity] duration-[200ms] ease-[var(--ease-spring)]",n||A?"translate-x-0 opacity-100 pointer-events-auto":"-translate-x-full opacity-0 pointer-events-none"].join(" "),onMouseLeave:Ae,children:[c.jsxs("div",{className:"px-2 py-2.5 border-b border-border-divider",children:[c.jsx("h2",{className:"text-[length:var(--font-size-xs)] font-[var(--font-weight-semibold)] text-text-tertiary uppercase tracking-[var(--letter-spacing-wide)] px-2 mb-1",children:s("dock.views_label")}),c.jsx("nav",{className:"flex flex-col gap-0.5",children:Z.map(F=>c.jsx(yS,{item:F,t:s},F.path))})]}),T.length>0&&c.jsxs("div",{className:"px-2 py-2.5 border-b border-border-divider",children:[c.jsxs("div",{className:"flex items-center justify-between px-2 mb-1",children:[c.jsxs("h2",{className:"text-[length:var(--font-size-xs)] font-[var(--font-weight-semibold)] text-text-tertiary uppercase tracking-[var(--letter-spacing-wide)]",children:["Sessions",T.length>Q&&c.jsx("span",{className:"ml-1 font-normal text-text-placeholder",children:T.length})]}),c.jsx("button",{type:"button",className:"w-[18px] h-[18px] rounded flex items-center justify-center border-none bg-transparent cursor-pointer transition-all duration-100",style:{color:"var(--color-text-placeholder)"},onMouseEnter:F=>{F.currentTarget.style.color="var(--color-text-primary)",F.currentTarget.style.backgroundColor="var(--color-bg-hover)"},onMouseLeave:F=>{F.currentTarget.style.color="var(--color-text-placeholder)",F.currentTarget.style.backgroundColor="transparent"},"aria-label":"New session",children:c.jsx(tS,{size:12,strokeWidth:2})})]}),c.jsx("nav",{className:"flex flex-col gap-0.5",children:(te?T:T.slice(0,Q)).map(F=>c.jsx(vS,{process:F,isActive:F.id===f},F.id))}),T.length>Q&&c.jsxs("button",{type:"button",onClick:()=>H(F=>!F),className:"flex items-center gap-1 px-2 py-1 mt-0.5 w-full text-[10px] text-text-placeholder hover:text-text-secondary transition-colors",children:[c.jsx(sS,{size:12,strokeWidth:2,className:`transition-transform duration-150 ${te?"rotate-180":""}`}),c.jsx("span",{children:te?"Show less":`${T.length-Q} more…`})]})]}),x.length>0&&c.jsxs("div",{className:"px-2 py-2.5 border-b border-border-divider",children:[c.jsx("h2",{className:"text-[length:var(--font-size-xs)] font-[var(--font-weight-semibold)] text-text-tertiary uppercase tracking-[var(--letter-spacing-wide)] px-2 mb-1",children:"Issues"}),c.jsxs("button",{type:"button",onClick:()=>{S("/kanban"),O(!1)},className:"flex items-center gap-2 px-2 py-1.5 rounded-[var(--radius-default)] text-left text-[length:var(--font-size-sm)] w-full hover:bg-bg-hover transition-colors",children:[c.jsxs("span",{className:"flex-1 text-text-secondary",children:[E.total," issues"]}),c.jsxs("span",{className:"flex items-center gap-2 text-[10px]",children:[E.open>0&&c.jsxs("span",{style:{color:"var(--color-accent-blue)"},children:[E.open," open"]}),E.in_progress>0&&c.jsxs("span",{style:{color:"var(--color-accent-yellow)"},children:[E.in_progress," active"]}),E.resolved>0&&c.jsxs("span",{style:{color:"var(--color-accent-green)"},children:[E.resolved," done"]})]})]})]}),c.jsxs("div",{className:"px-2 py-2.5",children:[c.jsx("h2",{className:"text-[length:var(--font-size-xs)] font-[var(--font-weight-semibold)] text-text-tertiary uppercase tracking-[var(--letter-spacing-wide)] px-2 mb-1",children:s("dock.phases_label")}),c.jsxs("nav",{className:"flex flex-col gap-0.5","aria-label":"Project phases",children:[r.map(F=>c.jsx(bS,{phase:F,selected:p===F.phase,onSelect:()=>{h(p===F.phase?null:F.phase),O(!1)}},F.phase)),r.length===0&&c.jsx("p",{className:"text-[length:var(--font-size-xs)] text-text-secondary italic px-2",children:s("sidebar.no_phases_loaded")})]})]})]})]})}function fS({item:n,isActive:i,onActivate:s,t:r}){return c.jsx("button",{type:"button",onClick:s,"aria-label":r(n.tooltipKey),"aria-current":i?"page":void 0,className:["relative flex items-center justify-center w-9 h-9 rounded-[8px]","transition-colors duration-150","focus-visible:outline-none focus-visible:shadow-[var(--shadow-focus-ring)]",i?"bg-bg-active text-text-primary":"text-text-tertiary hover:bg-bg-hover hover:text-text-primary"].join(" "),children:c.jsx(pS,{icon:n.icon})})}const mS={kanban:O1,artifacts:M1,chat:z1,workflow:U1,mcp:H1,specs:q1,teams:K1,requirement:V1,"maestro-coordinate":Q1,collab:Z1,rooms:F1};function pS({icon:n}){const i=mS[n];return c.jsx(i,{size:18,strokeWidth:1.8})}function hS({process:n,isActive:i,onSelect:s}){const r=Eg[n.type]??"var(--color-text-tertiary)",d=n.status==="running"||n.status==="spawning",f=n.id.startsWith("cli-history-");return c.jsx("span",{role:"listitem",title:`${n.type}${f?" — async delegate":""} — ${n.status}`,onClick:s,className:["relative w-2 h-2 rounded-full cursor-pointer transition-transform duration-150 hover:scale-[1.4]",i?"ring-2 ring-offset-2 ring-offset-bg-secondary":""].join(" "),style:{backgroundColor:d?r:"var(--color-text-placeholder)",color:r,...i?{boxShadow:`0 0 0 2px var(--color-bg-secondary), 0 0 0 3.5px ${r}`}:{}},children:d&&c.jsx("span",{className:"absolute inset-[-2px] rounded-full animate-[sdot-ping_2s_ease_infinite]",style:{background:r,opacity:.4}})})}function gS({phase:n,t:i}){return c.jsx("span",{role:"listitem","aria-label":i("dock.phase_dot_aria",{phase:n.phase,title:n.title,status:n.status}),className:"w-[7px] h-[7px] rotate-45 rounded-[1px] cursor-pointer transition-transform duration-150 hover:scale-[1.4]",style:{backgroundColor:Sg[n.status]}})}function vS({process:n,isActive:i}){const s=Eg[n.type]??"var(--color-text-tertiary)",r=oa(x=>x.setActiveProcessId),d=oa(x=>x.removeProcess),f=Gi(),p=SS(n.startedAt),h=n.id.startsWith("cli-history-");return c.jsxs("div",{className:["group flex items-center gap-2 px-2.5 py-1.5 rounded-[8px] text-left text-[12px] w-full","transition-all duration-150 cursor-pointer",i?"bg-bg-active":"hover:bg-bg-hover"].join(" "),onClick:()=>{r(n.id),f("/chat")},children:[c.jsx("span",{className:"w-[7px] h-[7px] rounded-full shrink-0",style:{backgroundColor:s}}),c.jsx("span",{className:"flex-1 font-medium text-text-primary truncate",children:n.type}),h&&c.jsx("span",{className:"text-[9px] font-semibold px-[4px] py-[1px] rounded shrink-0",style:{backgroundColor:"var(--color-tint-exploring)",color:"var(--color-accent-blue)"},children:"ASYNC"}),c.jsx("span",{className:"text-[10px] text-text-placeholder shrink-0",children:p}),c.jsx("button",{type:"button",onClick:x=>{x.stopPropagation(),d(n.id)},className:"w-4 h-4 rounded flex items-center justify-center shrink-0 opacity-0 group-hover:opacity-100 text-text-placeholder hover:text-text-primary hover:bg-bg-active transition-all duration-100","aria-label":"Close session",children:c.jsx(nS,{size:10,strokeWidth:2})})]})}const xS=["flex items-center gap-2 px-2 py-1.5 rounded-[var(--radius-default)]","text-[length:var(--font-size-sm)] font-[var(--font-weight-medium)] w-full","transition-colors duration-[var(--duration-fast)] ease-[var(--ease-notion)]","focus-visible:outline-none focus-visible:shadow-[var(--shadow-focus-ring)]"].join(" ");function yS({item:n,t:i}){return c.jsxs(u0,{to:n.path,className:({isActive:s})=>`${xS} ${s?"bg-bg-active text-text-primary font-semibold":"text-text-secondary hover:text-text-primary hover:bg-bg-hover"}`,children:[c.jsx("span",{className:"truncate",children:i(n.labelKey)}),n.shortcut&&c.jsx("span",{className:"ml-auto text-[10px] text-text-placeholder",children:n.shortcut})]})}function bS({phase:n,selected:i,onSelect:s}){const r=Sg[n.status];return c.jsxs("button",{type:"button",onClick:s,"aria-current":i?"true":void 0,className:["flex items-center gap-[var(--spacing-2)] px-[var(--spacing-2)] py-[var(--spacing-1-5)] rounded-[var(--radius-default)] text-left text-[length:var(--font-size-sm)] font-[var(--font-weight-medium)] w-full","transition-all duration-[var(--duration-fast)] ease-[var(--ease-notion)]","focus-visible:outline-none focus-visible:shadow-[var(--shadow-focus-ring)]","disabled:opacity-[var(--opacity-disabled)] disabled:pointer-events-none",i?"bg-bg-active text-text-primary border-l-2 border-l-accent-blue":"text-text-secondary hover:text-text-primary hover:bg-bg-hover"].join(" "),children:[c.jsx("span",{className:"w-2 h-2 rounded-full shrink-0","aria-hidden":"true",style:{backgroundColor:r}}),c.jsxs("span",{className:"truncate",children:[n.phase,". ",n.title]})]})}function SS(n){const i=Date.now()-new Date(n).getTime(),s=Math.floor(i/6e4);return s<1?"<1m":s<60?`${s}m`:`${Math.floor(s/60)}h`}const ES=["/maestro-coordinate","/chat","/meeting-room","/rooms"];function wS({children:n}){const{t:i}=St(),{pathname:s}=Ha(),r=ES.some(d=>s.startsWith(d));return c.jsx("main",{role:"main","aria-label":i("accessibility.main_content"),className:r?"flex-1 overflow-hidden bg-bg-primary":"flex-1 overflow-y-auto bg-bg-primary p-[var(--spacing-4)] sm:p-[var(--spacing-4)] max-sm:p-[var(--spacing-2)]",children:n})}const Ig="maestro-layout-state",jS=500,Kg=5;function Lu(n){return{type:"leaf",id:n,tabs:[],activeTabId:null}}function Yg(){return{version:Kg,primarySidebar:{visible:!0,width:260,activePanelId:"explorer"},secondarySidebar:{visible:!1,width:300,activePanelId:null},activityBar:{activePanelId:"explorer"},editorArea:Lu("editor-group-1"),panel:{visible:!1,height:200,activeTabId:null,isMaximized:!1},focusedGroupId:"editor-group-1",workspaceMode:"conversation"}}function NS(n){const i=n.version??0;let s=n;if(i<2&&(s={...s,secondarySidebar:s.secondarySidebar??{visible:!1,width:300,activePanelId:null},version:2}),s.version<3&&(s={...s,focusedGroupId:s.focusedGroupId??"editor-group-1",version:3}),s.version<4){const r=Yg();s={...r,...s,version:4,primarySidebar:{...r.primarySidebar,...s.primarySidebar},secondarySidebar:{...r.secondarySidebar,...s.secondarySidebar},activityBar:{...r.activityBar,...s.activityBar},panel:{...r.panel,...s.panel}}}return s.version<5&&(s={...s,workspaceMode:s.workspaceMode??"conversation",version:5}),s}function Qs(n,i){return n.type==="leaf"?n.id===i?n:null:Qs(n.first,i)??Qs(n.second,i)}let _S=2;function CS(){return`editor-group-${_S++}`}function TS(n,i){var s;switch(i.type){case"SET_SIDEBAR_VISIBLE":{const r=i.side==="primary"?"primarySidebar":"secondarySidebar";return{...n,[r]:{...n[r],visible:i.visible}}}case"SET_SIDEBAR_WIDTH":{const r=i.side==="primary"?"primarySidebar":"secondarySidebar";return{...n,[r]:{...n[r],width:i.width}}}case"SET_ACTIVE_PANEL":{const r=i.side==="primary"?"primarySidebar":"secondarySidebar";return{...n,[r]:{...n[r],activePanelId:i.panelId}}}case"SET_FOCUSED_GROUP":return{...n,focusedGroupId:i.groupId};case"SET_PANEL_VISIBLE":return{...n,panel:{...n.panel,visible:i.visible}};case"SET_PANEL_HEIGHT":return{...n,panel:{...n.panel,height:i.height}};case"SET_PANEL_ACTIVE_TAB":return{...n,panel:{...n.panel,activeTabId:i.tabId}};case"SET_PANEL_MAXIMIZED":return{...n,panel:{...n.panel,isMaximized:i.maximized}};case"OPEN_TAB":{const r=Qs(n.editorArea,i.groupId);return r?r.tabs.find(f=>f.id===i.tab.id)?{...n,focusedGroupId:i.groupId,editorArea:qn(n.editorArea,i.groupId,{activeTabId:i.tab.id})}:{...n,focusedGroupId:i.groupId,editorArea:qn(n.editorArea,i.groupId,{tabs:[...r.tabs,i.tab],activeTabId:i.tab.id})}:n}case"CLOSE_TAB":{const r=Qs(n.editorArea,i.groupId);if(!r)return n;const d=r.tabs.filter(p=>p.id!==i.tabId);if(d.length===r.tabs.length)return n;const f=r.activeTabId===i.tabId?((s=d[d.length-1])==null?void 0:s.id)??null:r.activeTabId;return{...n,editorArea:qn(n.editorArea,i.groupId,{tabs:d,activeTabId:f})}}case"SET_ACTIVE_TAB":return{...n,focusedGroupId:i.groupId,editorArea:qn(n.editorArea,i.groupId,{activeTabId:i.tabId})};case"SET_WORKSPACE_MODE":{let r={...n,workspaceMode:i.mode};switch(i.mode){case"conversation":r={...r,panel:{...r.panel,visible:!1}};break;case"files":r={...r,panel:{...r.panel,visible:!1}};break;case"fusion":r={...r,panel:{...r.panel,visible:!0}};break}return r}case"SPLIT_GROUP":{const r=CS(),d=Qs(n.editorArea,i.groupId);let f,p=n.editorArea;if(d&&d.activeTabId){const x=d.tabs.find(g=>g.id===d.activeTabId);if(x){f={type:"leaf",id:r,tabs:[x],activeTabId:x.id};const g=d.tabs.filter(b=>b.id!==d.activeTabId),S=g.length>0?g[g.length-1].id:null;p=qn(n.editorArea,i.groupId,{tabs:g,activeTabId:S})}else f=Lu(r)}else f=Lu(r);const h=Bu(p,i.groupId,i.direction,f);return h?{...n,editorArea:h,focusedGroupId:r}:n}case"CLOSE_GROUP":{const r=Hu(n.editorArea,i.groupId);return r?{...n,editorArea:r,focusedGroupId:Vg(r).id}:n}case"RESIZE_GROUP":{const r=Uu(n.editorArea,i.branchId,{ratio:i.ratio});return r?{...n,editorArea:r}:n}case"MOVE_PANEL":{const d=(i.toSide==="primary"?"secondary":"primary")==="primary"?"primarySidebar":"secondarySidebar",f={},p=n[d];return p.activePanelId===i.panelId&&(f[d]={...p,activePanelId:null}),{...n,...f}}case"RESTORE_STATE":return{...i.state,version:Kg};default:return n}}function qn(n,i,s){return n.type==="leaf"?n.id===i?{...n,...s}:n:{...n,first:qn(n.first,i,s),second:qn(n.second,i,s)}}function Uu(n,i,s){if(n.type==="leaf")return null;if(n.id===i)return{...n,...s};const r=Uu(n.first,i,s);if(r)return{...n,first:r};const d=Uu(n.second,i,s);return d?{...n,second:d}:null}function Bu(n,i,s,r){if(n.type==="leaf")return n.id!==i?null:{type:"branch",id:`branch-${i}`,direction:s,ratio:.5,first:n,second:r};const d=Bu(n.first,i,s,r);if(d)return{...n,first:d};const f=Bu(n.second,i,s,r);return f?{...n,second:f}:null}function Hu(n,i){if(n.type==="leaf")return null;if(n.first.type==="leaf"&&n.first.id===i)return n.second;if(n.second.type==="leaf"&&n.second.id===i)return n.first;const s=Hu(n.first,i);if(s)return{...n,first:s};const r=Hu(n.second,i);return r?{...n,second:r}:null}function Vg(n){return n.type==="leaf"?n:Vg(n.first)}const Xg=v.createContext(null);function AS(){try{const n=localStorage.getItem(Ig);if(!n)return null;const i=JSON.parse(n);return NS(i)}catch{return null}}function kS({children:n}){const[i,s]=v.useReducer(TS,null,()=>AS()??Yg()),r=v.useRef(null),d=v.useRef(i);return d.current=i,v.useEffect(()=>(r.current&&clearTimeout(r.current),r.current=setTimeout(()=>{try{localStorage.setItem(Ig,JSON.stringify(d.current))}catch{}},jS),()=>{r.current&&clearTimeout(r.current)}),[i]),c.jsx(Xg,{value:{state:i,dispatch:s},children:n})}function $u(){const n=v.useContext(Xg);if(!n)throw new Error("useLayoutContext must be used within a LayoutProvider");return n}function Xs(n){const{state:i}=$u();return n(i)}const OS=[];function zh(n){return OS.filter(i=>i.alignment===n).filter(i=>i.visible?i.visible():!0).sort((i,s)=>s.priority-i.priority)}function Lh({children:n,tooltip:i,clickable:s=!1,onClick:r}){const d=s&&r,f=["flex items-center gap-[var(--spacing-1)]","h-full px-[var(--spacing-1-5)]","text-[11px] font-medium leading-none whitespace-nowrap",d?"cursor-pointer hover:bg-bg-hover transition-colors duration-[var(--duration-fast)] ease-[var(--ease-notion)]":"cursor-default"].join(" ");return c.jsx("span",{role:d?"button":void 0,tabIndex:d?0:void 0,title:i,onClick:d?r:void 0,onKeyDown:d?p=>{(p.key==="Enter"||p.key===" ")&&(p.preventDefault(),r(p))}:void 0,className:f,children:n})}function DS(){const{dispatch:n}=$u(),i=Xs(f=>f.panel.visible),s=zh("left"),r=zh("right");function d(f){f&&(n({type:"SET_PANEL_ACTIVE_TAB",tabId:f}),i||n({type:"SET_PANEL_VISIBLE",visible:!0}))}return c.jsxs("div",{role:"status","aria-live":"polite",className:["flex items-center justify-between shrink-0 select-none","h-[22px] bg-bg-secondary border-t border-border","text-text-secondary text-[11px] font-medium"].join(" "),children:[c.jsx("div",{className:"flex items-center h-full",children:s.map(f=>{const p=f.component,h=!!f.panelTabId;return c.jsx(Lh,{tooltip:f.id,clickable:h,onClick:h?()=>d(f.panelTabId):void 0,children:c.jsx(p,{})},f.id)})}),c.jsx("div",{className:"flex items-center h-full",children:r.map(f=>{const p=f.component,h=!!f.panelTabId;return c.jsx(Lh,{tooltip:f.id,clickable:h,onClick:h?()=>d(f.panelTabId):void 0,children:c.jsx(p,{})},f.id)})})]})}const MS=v.lazy(()=>ht(()=>import("./OutputPanel-DgT3gMyp.js"),[]).then(n=>({default:n.OutputPanel}))),RS=v.lazy(()=>ht(()=>import("./ProblemsPanel-BmG7rxoG.js"),[]).then(n=>({default:n.ProblemsPanel}))),zS=v.lazy(()=>ht(()=>import("./ExecutionPanel-CClxD7cH.js"),[]).then(n=>({default:n.ExecutionPanel}))),yu=[{id:"output",label:"Output",panel:MS},{id:"problems",label:"Problems",panel:RS},{id:"execution",label:"Execution",panel:zS}],LS=200,US=100,BS=500,HS=4;function GS(){const{dispatch:n}=$u(),i=Xs(T=>T.panel.visible),s=Xs(T=>T.panel.activeTabId),r=Xs(T=>T.panel.isMaximized),d=Xs(T=>T.panel.height),f=v.useRef(null),p=v.useRef(!1),h=v.useRef(0),x=v.useRef(0),g=s??"output",S=yu.find(T=>T.id===g)??yu[0];v.useEffect(()=>{function T(X){X.ctrlKey&&!X.shiftKey&&!X.altKey&&X.key==="j"&&(X.preventDefault(),n({type:"SET_PANEL_VISIBLE",visible:!i}))}return window.addEventListener("keydown",T),()=>window.removeEventListener("keydown",T)},[n,i]);const b=v.useCallback(()=>{n({type:"SET_PANEL_VISIBLE",visible:!1})},[n]),E=v.useCallback(()=>{n({type:"SET_PANEL_MAXIMIZED",maximized:!r})},[n,r]),w=v.useCallback(T=>{n({type:"SET_PANEL_ACTIVE_TAB",tabId:T})},[n]),C=v.useCallback(T=>{T.preventDefault(),p.current=!0,h.current=T.clientY,x.current=d;function X(P){if(!p.current)return;const Z=h.current-P.clientY,te=Math.max(US,Math.min(BS,x.current+Z));n({type:"SET_PANEL_HEIGHT",height:te})}function Y(){p.current=!1,document.removeEventListener("mousemove",X),document.removeEventListener("mouseup",Y),document.body.style.cursor="",document.body.style.userSelect=""}document.body.style.cursor="ns-resize",document.body.style.userSelect="none",document.addEventListener("mousemove",X),document.addEventListener("mouseup",Y)},[n,d]),A=v.useCallback(()=>{n({type:"SET_PANEL_HEIGHT",height:LS})},[n]);if(!i)return null;const O=r?"100%":`${d}px`;return c.jsxs("div",{ref:f,className:["flex flex-col shrink-0 border-t border-border bg-bg-primary",r?"absolute inset-0 z-10":""].join(" "),style:r?void 0:{height:O},children:[c.jsxs("div",{className:"flex items-center justify-between h-[30px] px-[var(--spacing-1)] border-b border-border shrink-0",children:[c.jsx("div",{role:"tablist","aria-label":"Panel tabs",className:"flex items-center h-full",children:yu.map(T=>c.jsx("button",{role:"tab",type:"button","aria-selected":T.id===g,"aria-controls":`panel-tabpanel-${T.id}`,id:`panel-tab-${T.id}`,onClick:()=>w(T.id),className:["h-full px-[var(--spacing-2)] text-[11px] font-medium transition-colors duration-[var(--duration-fast)]",T.id===g?"text-text-primary border-b-2 border-text-primary":"text-text-secondary hover:text-text-primary"].join(" "),children:T.label},T.id))}),c.jsxs("div",{className:"flex items-center gap-[var(--spacing-0-5)]",children:[c.jsx("button",{type:"button",onClick:E,title:r?"Restore Panel":"Maximize Panel",className:"flex items-center justify-center w-[22px] h-[22px] rounded-[var(--radius-sm)] text-text-secondary hover:text-text-primary hover:bg-bg-hover transition-colors duration-[var(--duration-fast)]",children:r?c.jsx(IS,{}):c.jsx(qS,{})}),c.jsx("button",{type:"button",onClick:b,title:"Close Panel",className:"flex items-center justify-center w-[22px] h-[22px] rounded-[var(--radius-sm)] text-text-secondary hover:text-text-primary hover:bg-bg-hover transition-colors duration-[var(--duration-fast)]",children:c.jsx(KS,{})})]})]}),c.jsx("div",{role:"tabpanel",id:`panel-tabpanel-${g}`,"aria-labelledby":`panel-tab-${g}`,className:"flex-1 overflow-hidden",children:c.jsx(v.Suspense,{fallback:c.jsx(YS,{}),children:i&&c.jsx(S.panel,{})})}),!r&&c.jsx("div",{className:"absolute top-0 left-0 right-0 cursor-ns-resize hover:bg-border-focused/30 transition-colors duration-[var(--duration-fast)]",style:{height:HS},onMouseDown:C,onDoubleClick:A,title:"Drag to resize. Double-click to reset."})]})}function qS(){return c.jsx("svg",{width:"14",height:"14",viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:"1.5",children:c.jsx("rect",{x:"2",y:"2",width:"12",height:"12",rx:"1"})})}function IS(){return c.jsxs("svg",{width:"14",height:"14",viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:"1.5",children:[c.jsx("rect",{x:"4",y:"1",width:"10",height:"10",rx:"1"}),c.jsx("rect",{x:"2",y:"5",width:"10",height:"10",rx:"1"})]})}function KS(){return c.jsxs("svg",{width:"14",height:"14",viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",children:[c.jsx("line",{x1:"4",y1:"4",x2:"12",y2:"12"}),c.jsx("line",{x1:"12",y1:"4",x2:"4",y2:"12"})]})}function YS(){return c.jsx("div",{className:"flex items-center justify-center h-full text-text-secondary text-[11px] animate-pulse",children:"Loading..."})}const Gu=_t((n,i)=>({slots:{},queue:[],supervisorStatus:null,commanderState:null,commanderConfig:null,recentDecisions:[],selectedIssueIds:new Set,cliPanelIssueId:null,addSlot:s=>n(r=>({slots:{...r.slots,[s.processId]:s}})),removeSlot:s=>n(r=>{const{[s]:d,...f}=r.slots;return{slots:f}}),setQueue:s=>n({queue:s}),setSupervisorStatus:s=>n({supervisorStatus:s,queue:s.queued}),setCommanderState:s=>n({commanderState:s}),setCommanderConfig:s=>n({commanderConfig:s}),fetchCommanderConfig:async()=>{try{const s=await fetch("/api/commander/config");if(s.ok){const r=await s.json();n({commanderConfig:r})}}catch{}},toggleSupervisor:async s=>{try{const r=await fetch("/api/execution/supervisor",{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({enabled:s})});if(r.ok){const d=await r.json();d.status&&n({supervisorStatus:d.status})}}catch{}},addDecision:s=>n(r=>{const d=[...r.recentDecisions,s];return d.length>20&&d.shift(),{recentDecisions:d}}),toggleSelect:s=>n(r=>{const d=new Set(r.selectedIssueIds);return d.has(s)?d.delete(s):d.add(s),{selectedIssueIds:d}}),selectAll:s=>n({selectedIssueIds:new Set(s)}),clearSelection:()=>n({selectedIssueIds:new Set}),openCliPanel:s=>n({cliPanelIssueId:s}),closeCliPanel:()=>n({cliPanelIssueId:null}),getSlotForIssue:s=>{const r=i().slots;for(const d of Object.values(r))if(d.issueId===s)return d},isIssueRunning:s=>{const r=i().slots;return Object.values(r).some(d=>d.issueId===s)}})),Qg=_t(n=>({session:null,selectedStepIndex:null,clarificationQuestion:null,currentGraph:null,selectedNodeId:null,onStatus:i=>n({session:i}),onStep:i=>n(s=>{if(!s.session||s.session.sessionId!==i.sessionId)return s;const r=[...s.session.steps],d=r.findIndex(f=>f.index===i.step.index);return d>=0?r[d]=i.step:r.push(i.step),{session:{...s.session,steps:r}}}),onAnalysis:i=>n(s=>{if(!s.session||s.session.sessionId!==i.sessionId)return s;const r=i.steps.map((d,f)=>({index:f,cmd:d.cmd,args:d.args,status:"pending",processId:null,analysis:null,summary:null}));return{session:{...s.session,chainName:i.chainName,intent:i.intent,steps:r}}}),onClarificationNeeded:i=>n(s=>!s.session||s.session.sessionId!==i.sessionId?s:{clarificationQuestion:i.question}),start:(i,s,r)=>{ca({action:"coordinate:start",intent:i,tool:s,autoMode:r})},stop:()=>{ca({action:"coordinate:stop"})},resume:i=>{var r;const s=i??((r=Qg.getState().session)==null?void 0:r.sessionId);ca({action:"coordinate:resume",sessionId:s})},sendClarification:(i,s)=>{ca({action:"coordinate:clarify",sessionId:i,response:s}),n({clarificationQuestion:null})},selectStep:i=>n({selectedStepIndex:i}),setCurrentGraph:i=>n({currentGraph:i}),selectNode:i=>n({selectedNodeId:i})}));function Uh(n,i){const s=n.findIndex(r=>r.id===i.id);if(s>=0){const r=[...n];return r[s]=i,r}return[i,...n]}const VS=_t((n,i)=>({currentRequirement:null,history:[],isLoading:!1,error:null,progressMessage:null,committedResult:null,continueFrom:null,expand:(s,r,d)=>{const f=i().continueFrom;n({isLoading:!0,error:null,progressMessage:null,committedResult:null,continueFrom:null,currentRequirement:{id:"",status:"expanding",userInput:s,title:"",summary:"",items:[],depth:r??"standard",createdAt:new Date().toISOString(),updatedAt:new Date().toISOString()}});try{ca({action:"requirement:expand",text:s,depth:r,method:d??"sdk",...f?{previousRequirementId:f.id}:{}})}catch(p){n({isLoading:!1,error:p instanceof Error?p.message:String(p)})}},refine:s=>{const r=i().currentRequirement;if(r){n({isLoading:!0,error:null,progressMessage:null,currentRequirement:{...r,status:"expanding"}});try{ca({action:"requirement:refine",requirementId:r.id,feedback:s})}catch(d){n({isLoading:!1,error:d instanceof Error?d.message:String(d)})}}},commit:s=>{const r=i().currentRequirement;if(r){n({isLoading:!0,error:null,progressMessage:null,currentRequirement:{...r,status:"committing"}});try{ca({action:"requirement:commit",requirementId:r.id,mode:s})}catch(d){n({isLoading:!1,error:d instanceof Error?d.message:String(d)})}}},resetRequirement:()=>{n({currentRequirement:null,isLoading:!1,error:null,progressMessage:null,committedResult:null,continueFrom:null})},setContinueFrom:s=>{n({continueFrom:s})},loadHistory:s=>{const r=i().history.find(d=>d.id===s);r&&n({currentRequirement:r,isLoading:!1,error:null,progressMessage:null,committedResult:null})},fetchHistory:async()=>{try{const s=await fetch("/api/requirements");if(!s.ok)return;const r=await s.json();Array.isArray(r)&&r.length>0&&n({history:r})}catch{}},onProgress:s=>{n(r=>{const d=r.currentRequirement;if(!d)return r;const f=s.status==="failed";return{currentRequirement:{...d,status:s.status,...f&&s.message?{error:s.message}:{}},progressMessage:s.message??null,...f?{isLoading:!1,error:s.message??"Expansion failed"}:{}}})},onExpanded:s=>{n(r=>({currentRequirement:s.requirement,isLoading:!1,progressMessage:null,history:Uh(r.history,s.requirement)}))},onCommitted:s=>{n(r=>{const d=r.currentRequirement;if(!d||d.id!==s.requirementId)return r;const f={...d,status:"done"};return{currentRequirement:f,isLoading:!1,progressMessage:null,committedResult:{requirementId:s.requirementId,mode:s.mode,issueIds:s.issueIds,coordinateSessionId:s.coordinateSessionId},history:Uh(r.history,f)}})},onError:s=>{n(r=>{const d=r.currentRequirement;return{currentRequirement:d?{...d,status:"failed",error:s.error}:null,isLoading:!1,error:s.error,progressMessage:null}})},updateItem:(s,r)=>{n(d=>{const f=d.currentRequirement;return f?{currentRequirement:{...f,items:f.items.map(p=>p.id===s?{...p,...r}:p)}}:d})}})),XS=_t((n,i)=>({sessions:[],activeSession:null,activeSessionId:null,activeView:"cards",loading:!1,error:null,statusFilter:"all",skillFilter:null,searchQuery:"",mailboxMessages:[],phaseState:null,agentStatuses:[],roleToProcessMap:{},setActiveView:s=>n({activeView:s}),setStatusFilter:s=>n({statusFilter:s}),setSkillFilter:s=>n({skillFilter:s}),setSearchQuery:s=>n({searchQuery:s}),clearActiveSession:()=>n({activeSession:null,activeSessionId:null}),fetchSessions:async()=>{n({loading:!0,error:null});try{const s=await fetch(vu.SESSIONS);if(!s.ok)throw new Error(`Failed: ${s.status}`);const r=await s.json();n({sessions:r,loading:!1})}catch(s){n({loading:!1,error:String(s)})}},deleteSession:async s=>{const r=i().sessions;n(d=>({sessions:d.sessions.filter(f=>f.sessionId!==s)}));try{(await fetch(vu.SESSIONS+"/"+s,{method:"DELETE"})).ok||n({sessions:r})}catch{n({sessions:r})}},fetchSessionDetail:async s=>{n({loading:!0,error:null,activeSessionId:s});try{const r=await fetch(vu.SESSIONS+"/"+s);if(!r.ok)throw new Error(`Failed: ${r.status}`);const d=await r.json();n({activeSession:d,loading:!1})}catch(r){n({loading:!1,error:String(r)})}},filteredSessions:()=>{const{sessions:s,statusFilter:r,skillFilter:d,searchQuery:f}=i();let p=s;if(r!=="all"&&(p=p.filter(h=>h.status===r)),d&&(p=p.filter(h=>h.skill===d)),f){const h=f.toLowerCase();p=p.filter(x=>x.title.toLowerCase().includes(h)||x.sessionId.toLowerCase().includes(h)||x.roles.some(g=>g.toLowerCase().includes(h)))}return p},registerAgentProcess:(s,r,d)=>{n(f=>{const p=f.roleToProcessMap[s]??{};return{roleToProcessMap:{...f.roleToProcessMap,[s]:{...p,[r]:d}}}})},getProcessIdForRole:(s,r)=>{var d;return(d=i().roleToProcessMap[s])==null?void 0:d[r]},handleTeamMessage:s=>{n(r=>{const d=r.mailboxMessages.findIndex(f=>f.id===s.id);if(d>=0){const f=[...r.mailboxMessages];return f[d]=s,{mailboxMessages:f}}return{mailboxMessages:[...r.mailboxMessages,s]}})},handleDispatchUpdate:s=>{n(r=>{const d=r.mailboxMessages.findIndex(f=>f.id===s.id);if(d>=0){const f=[...r.mailboxMessages];return f[d]=s,{mailboxMessages:f}}return{mailboxMessages:[...r.mailboxMessages,s]}})},handlePhaseTransition:s=>{n({phaseState:s})},handleAgentStatusUpdate:s=>{n(r=>{const d=r.agentStatuses.findIndex(f=>f.role===s.role);if(d>=0){const f=[...r.agentStatuses];return f[d]=s,{agentStatuses:f}}return{agentStatuses:[...r.agentStatuses,s]}})}})),Bh={sessionId:null,sessionStatus:null,layoutMode:"split",terminalLayoutMode:"grid-2x2",expandedTerminals:[],splitRatio:60,inputTarget:{mode:"broadcast"},agents:[],messages:[],tasks:[]},QS=_t((n,i)=>({...Bh,setSessionId:s=>n({sessionId:s}),setSessionStatus:s=>n({sessionStatus:s}),setLayoutMode:s=>n({layoutMode:s}),setTerminalLayoutMode:s=>n({terminalLayoutMode:s}),expandTerminal:s=>n(r=>r.expandedTerminals.includes(s)?r:{expandedTerminals:[...r.expandedTerminals,s]}),collapseTerminal:s=>n(r=>({expandedTerminals:r.expandedTerminals.filter(d=>d!==s)})),setSplitRatio:s=>n({splitRatio:s}),setInputTarget:s=>n({inputTarget:s}),sendMessage:s=>{const{sessionId:r,inputTarget:d,agents:f}=i();if(!r||!s.trim())return;const p=s.trim(),h=p.match(/^@(\S+)\s+([\s\S]+)/);if(h){const x=h[1],g=h[2].trim();if(f.some(S=>S.role===x)&&g){ca({action:"room:send_message",sessionId:r,to:x,content:g});return}}d.mode==="broadcast"?ca({action:"room:broadcast",sessionId:r,content:p}):d.role&&ca({action:"room:send_message",sessionId:r,to:d.role,content:p})},handleSnapshot:s=>n({sessionId:s.sessionId,sessionStatus:s.status,agents:s.agents,messages:s.messages,tasks:s.tasks}),handleAgentJoined:s=>n(r=>r.agents.some(f=>f.role===s.role)?{agents:r.agents.map(f=>f.role===s.role?s:f)}:{agents:[...r.agents,s]}),handleAgentLeft:s=>n(r=>({agents:r.agents.filter(d=>d.role!==s)})),handleAgentStatus:(s,r)=>n(d=>({agents:d.agents.map(f=>f.role===s?{...f,status:r,lastActivityAt:new Date().toISOString()}:f)})),handleMessage:s=>n(r=>r.messages.some(f=>f.id===s.id)?r:{messages:[...r.messages,s]}),handleTaskCreated:s=>n(r=>({tasks:[...r.tasks,s]})),handleTaskUpdated:(s,r)=>n(d=>({tasks:d.tasks.map(f=>f.id===s?{...f,...r}:f)})),handleRoomClosed:()=>n({sessionStatus:"destroyed"}),reset:()=>n({...Bh,expandedTerminals:[]})})),PS=_t((n,i)=>({rooms:[],loading:!1,fetchRooms:async()=>{n({loading:!0});try{const s=await fetch("/api/rooms");if(s.ok){const r=await s.json();n({rooms:r,loading:!1})}else n({loading:!1})}catch{n({loading:!1})}},deleteRoom:async s=>{try{if((await fetch(`/api/rooms/${encodeURIComponent(s)}`,{method:"DELETE"})).ok)return n(d=>({rooms:d.rooms.filter(f=>f.sessionId!==s)})),!0}catch{}return!1},handleRoomCreated:s=>n(r=>r.rooms.some(d=>d.sessionId===s.sessionId)?r:{rooms:[...r.rooms,s]}),handleRoomClosed:s=>n(r=>({rooms:r.rooms.map(d=>d.sessionId===s?{...d,status:"destroyed"}:d)}))})),ZS=_t((n,i)=>({sessions:[],selectedDir:null,sessionDetail:null,isLoading:!1,error:null,fetchSessions:async()=>{n({isLoading:!0,error:null});try{const s=await fetch("/api/maestro-coordinate/sessions");if(!s.ok){n({error:`Failed to fetch sessions: ${s.status}`,isLoading:!1});return}const r=await s.json(),d=Array.isArray(r)?r:[];n({sessions:d,isLoading:!1,error:null})}catch(s){n({error:`Failed to fetch sessions: ${s instanceof Error?s.message:String(s)}`,isLoading:!1})}},fetchSessionDetail:async s=>{try{const r=await fetch(`/api/maestro-coordinate/sessions/${encodeURIComponent(s)}`);if(!r.ok){n({error:`Failed to fetch session detail: ${r.status}`});return}const d=await r.json();d&&typeof d=="object"&&"source"in d&&"data"in d&&n({sessionDetail:d,selectedDir:s,error:null})}catch(r){n({error:`Failed to fetch session detail: ${r instanceof Error?r.message:String(r)}`})}},selectSession:s=>{if(s===null){n({selectedDir:null,sessionDetail:null});return}const r=i().selectedDir;n({selectedDir:s}),r!==s&&i().fetchSessionDetail(s)},onSessionUpdated:s=>n(r=>{const d=s.session,f=r.sessions.findIndex(h=>h.dirName===d.dirName);let p;return f>=0?(p=[...r.sessions],p[f]=d):p=[d,...r.sessions],p.sort((h,x)=>new Date(x.updatedAt).getTime()-new Date(h.updatedAt).getTime()),r.selectedDir===d.dirName&&i().fetchSessionDetail(d.dirName),{sessions:p}}),clearError:()=>n({error:null})})),Hh=1e3,JS=3e4,FS=["# Analysis Mode Protocol","# Write Mode Protocol"];function $S(n){return FS.some(i=>n.trimStart().startsWith(i))}function WS(n,i){const s=[];for(const r of n){const d={...r,processId:i};if(d.type==="assistant_message"){const f=d.content??"";if($S(f))continue;d.partial=!1;const p=s[s.length-1];if(p&&p.type==="assistant_message"){p.content+=d.content;continue}}if(d.type==="tool_use"&&(d.status==="completed"||d.status==="failed")){const f=s.findLastIndex(p=>p.type==="tool_use"&&p.status==="running");if(f!==-1){const p=s[f];s[f]={...p,status:d.status,result:d.result??p.result,input:p.input&&Object.keys(p.input).length>0?p.input:d.input};continue}}s.push(d)}return s}let Ps=null;function ca(n){Ps?Ps(n):console.warn("[WS] Cannot send — no active WebSocket connection")}const Gh=new Set([ge.AGENT_APPROVAL]);function eE(){const n=v.useRef(null),i=v.useRef(null),s=v.useRef(Hh);v.useEffect(()=>{let r=!1,d=!1;const f=[];let p=[],h=null;const{setBoard:x,updatePhase:g,updateTask:S,setConnected:b}=Vt.getState(),{addProcess:E,removeProcess:w,updateProcessStatus:C,addEntry:A,setApproval:O,setProcessThought:T,setProcessStreaming:X,updateProcessTokenUsage:Y}=oa.getState(),{addSlot:P,removeSlot:Z,setSupervisorStatus:te,setCommanderState:H,addDecision:Q}=Gu.getState(),{onStatus:fe,onStep:He,onAnalysis:Ae,onClarificationNeeded:ze}=Qg.getState(),{fetchIssues:F,patchIssue:Te}=zu.getState(),{onProgress:qe,onExpanded:L,onCommitted:J,onError:ie}=VS.getState(),{handleTeamMessage:be,handleDispatchUpdate:$,handlePhaseTransition:N,handleAgentStatusUpdate:I,registerAgentProcess:ee}=XS.getState(),{handleSnapshot:D,handleAgentJoined:B,handleAgentLeft:q,handleAgentStatus:ae,handleMessage:Se,handleTaskCreated:oe,handleTaskUpdated:Ie,handleRoomClosed:je}=QS.getState(),{handleRoomCreated:Qe,handleRoomClosed:it}=PS.getState();function $e(){if(r)return;const Sn=window.location.protocol==="https:"?"wss:":"ws:",na=new WebSocket(`${Sn}//${window.location.host}/ws`);n.current=na,Ps=ce=>{na.readyState===WebSocket.OPEN&&na.send(JSON.stringify(ce))},na.onopen=()=>{b(!0),s.current=Hh,d=!1;const ce=fetch("/api/board").then(tt=>tt.ok?tt.json():null).then(tt=>{tt&&x(tt)}).catch(()=>{}),ut=fetch("/api/agents").then(tt=>tt.ok?tt.json():null).then(async tt=>{if(!Array.isArray(tt))return;let W=[];try{const Ve=await fetch("/api/cli-history?limit=50");Ve.ok&&(W=await Ve.json())}catch{}const jt=new Map(W.map(Ve=>[Ve.execId,Ve]));for(const Ve of tt){const Et=Ve,Zn=Et.id.startsWith("cli-history-");if(Et.status==="stopped"||Et.status,Zn&&Et.status==="running"){const Xt=Et.id.slice(12),dt=jt.get(Xt);dt!=null&&dt.completedAt&&(Et.status=dt.exitCode!=null&&dt.exitCode!==0?"error":"stopped")}if(E(Et),!(Zn&&(Et.status==="stopped"||Et.status==="error")))if(Zn){const Xt=Et.id.slice(12);fetch(`/api/cli-history/${encodeURIComponent(Xt)}/entries`).then(dt=>dt.ok?dt.json():null).then(dt=>{const Yl=Array.isArray(dt)?dt:[],er=WS(Yl,Et.id);for(const Vi of er)A(Et.id,Vi)}).catch(()=>{})}else fetch(`/api/agents/${encodeURIComponent(Et.id)}/entries`).then(Xt=>Xt.ok?Xt.json():null).then(Xt=>{const dt=Array.isArray(Xt)?Xt:[];for(const Yl of dt)A(Et.id,Yl)}).catch(()=>{})}}).catch(()=>{});Promise.all([ce,ut]).finally(()=>{d=!0;const tt=f.splice(0);for(const W of tt)Pn(W)})};function Pn(ce){var ut,tt;switch(ce.type){case ge.BOARD_FULL:x(ce.data);break;case ge.PHASE_UPDATED:{const W=ce.data;g(W.phase,W);break}case ge.TASK_UPDATED:{const W=ce.data;W.id&&S(W.id,W);break}case ge.PROJECT_UPDATED:{const W=ce.data,jt=Vt.getState().board;jt&&x({...jt,project:W});break}case ge.HEARTBEAT:case ge.CONNECTED:break;case ge.AGENT_SPAWNED:{const W=ce.data;E(W);const jt=(ut=W.metadata)==null?void 0:ut.teamSessionId,Ve=(tt=W.metadata)==null?void 0:tt.teamRole;jt&&Ve&&ee(jt,Ve,W.id);break}case ge.AGENT_ENTRY:{const W=ce.data;if(A(W.processId,W),W.type==="token_usage"){const jt=W;Y(jt.processId,jt.inputTokens,jt.outputTokens,jt.cacheReadTokens??0,jt.cacheWriteTokens??0)}break}case ge.AGENT_APPROVAL:O(ce.data);break;case ge.AGENT_STATUS:{const W=ce.data;C(W.processId,W.status);break}case ge.AGENT_STOPPED:{const W=ce.data;C(W.processId,"stopped");break}case ge.AGENT_THOUGHT:{const W=ce.data;T(W.processId,W.thought);break}case ge.AGENT_STREAMING:{const W=ce.data;X(W.processId,W.streaming);break}case ge.EXECUTION_STARTED:{const W=ce.data;P({issueId:W.issueId,processId:W.processId,executor:W.executor,startedAt:new Date().toISOString(),lastActivityAt:new Date().toISOString(),turnNumber:1,maxTurns:3}),W.issue?Te(W.issue):F();break}case ge.EXECUTION_COMPLETED:{const W=ce.data;Z(W.processId),W.issue?Te(W.issue):F();break}case ge.EXECUTION_FAILED:{const W=ce.data;Z(W.processId),W.issue?Te(W.issue):F();break}case ge.SUPERVISOR_STATUS:case ge.EXECUTION_SCHEDULER_STATUS:{const W=ce.data;te(W);break}case ge.COMMANDER_STATUS:{const W=ce.data;H(W);break}case ge.COMMANDER_DECISION:{const W=ce.data;Q(W);break}case ge.COORDINATE_STATUS:{const W=ce.data;fe(W.session);break}case ge.COORDINATE_STEP:{const W=ce.data;He(W);break}case ge.COORDINATE_ANALYSIS:{const W=ce.data;Ae(W);break}case ge.COORDINATE_CLARIFICATION_NEEDED:{const W=ce.data;ze(W);break}case ge.REQUIREMENT_PROGRESS:qe(ce.data);break;case ge.REQUIREMENT_EXPANDED:L(ce.data);break;case ge.REQUIREMENT_COMMITTED:J(ce.data);break;case ge.TEAM_MESSAGE:be(ce.data);break;case ge.TEAM_DISPATCH:$(ce.data);break;case ge.TEAM_PHASE:N(ce.data);break;case ge.TEAM_AGENT_STATUS:I(ce.data);break;case ge.ROOM_CREATED:Qe(ce.data);break;case ge.ROOM_SNAPSHOT:D(ce.data);break;case ge.ROOM_AGENT_JOINED:{const W=ce.data;B(W.agent);break}case ge.ROOM_AGENT_LEFT:{const W=ce.data;q(W.role);break}case ge.ROOM_AGENT_STATUS:{const W=ce.data;ae(W.role,W.status);break}case ge.ROOM_MESSAGE:case ge.ROOM_BROADCAST:{const W=ce.data;Se(W.message);break}case ge.ROOM_TASK_CREATED:{const W=ce.data;oe(W.task);break}case ge.ROOM_TASK_UPDATED:{const W=ce.data;Ie(W.task.id,W.task);break}case ge.ROOM_CLOSED:{const W=ce.data;je(),it(W.sessionId);break}case ge.MAESTRO_SESSION_UPDATED:{const W=ce.data;ZS.getState().onSessionUpdated(W);break}}}function Ws(){if(p.length===0)return;const ce=p;p=[];for(const ut of ce)Pn(ut)}h=setInterval(Ws,100),na.onmessage=ce=>{let ut;try{ut=JSON.parse(ce.data)}catch{console.warn("[WS] Failed to parse message",ce.data);return}if(!d){Gh.has(ut.type)?Pn(ut):f.push(ut);return}if(Gh.has(ut.type)){Pn(ut);return}p.push(ut)},na.onclose=()=>{if(r)return;b(!1),n.current=null,Ps=null,h&&(clearInterval(h),h=null),p=[],f.length=0,d=!1;const ce=s.current;s.current=Math.min(ce*2,JS),i.current=setTimeout($e,ce)},na.onerror=()=>{}}return $e(),()=>{r=!0,Ps=null,h&&(clearInterval(h),h=null),i.current&&clearTimeout(i.current),n.current&&(n.current.onopen=null,n.current.onmessage=null,n.current.onerror=null,n.current.onclose=null,n.current.close(),n.current=null),b(!1)}},[])}function yn(n,i,{checkForDefaultPrevented:s=!0}={}){return function(d){if(n==null||n(d),s===!1||!d.defaultPrevented)return i==null?void 0:i(d)}}function qh(n,i){if(typeof n=="function")return n(i);n!=null&&(n.current=i)}function Wu(...n){return i=>{let s=!1;const r=n.map(d=>{const f=qh(d,i);return!s&&typeof f=="function"&&(s=!0),f});if(s)return()=>{for(let d=0;d<r.length;d++){const f=r[d];typeof f=="function"?f():qh(n[d],null)}}}}function Qn(...n){return v.useCallback(Wu(...n),n)}function tE(n,i){const s=v.createContext(i),r=f=>{const{children:p,...h}=f,x=v.useMemo(()=>h,Object.values(h));return c.jsx(s.Provider,{value:x,children:p})};r.displayName=n+"Provider";function d(f){const p=v.useContext(s);if(p)return p;if(i!==void 0)return i;throw new Error(`\`${f}\` must be used within \`${n}\``)}return[r,d]}function aE(n,i=[]){let s=[];function r(f,p){const h=v.createContext(p),x=s.length;s=[...s,p];const g=b=>{var T;const{scope:E,children:w,...C}=b,A=((T=E==null?void 0:E[n])==null?void 0:T[x])||h,O=v.useMemo(()=>C,Object.values(C));return c.jsx(A.Provider,{value:O,children:w})};g.displayName=f+"Provider";function S(b,E){var A;const w=((A=E==null?void 0:E[n])==null?void 0:A[x])||h,C=v.useContext(w);if(C)return C;if(p!==void 0)return p;throw new Error(`\`${b}\` must be used within \`${f}\``)}return[g,S]}const d=()=>{const f=s.map(p=>v.createContext(p));return function(h){const x=(h==null?void 0:h[n])||f;return v.useMemo(()=>({[`__scope${n}`]:{...h,[n]:x}}),[h,x])}};return d.scopeName=n,[r,nE(d,...i)]}function nE(...n){const i=n[0];if(n.length===1)return i;const s=()=>{const r=n.map(d=>({useScope:d(),scopeName:d.scopeName}));return function(f){const p=r.reduce((h,{useScope:x,scopeName:g})=>{const b=x(f)[`__scope${g}`];return{...h,...b}},{});return v.useMemo(()=>({[`__scope${i.scopeName}`]:p}),[p])}};return s.scopeName=i.scopeName,s}var Fs=globalThis!=null&&globalThis.document?v.useLayoutEffect:()=>{},lE=Vu[" useId ".trim().toString()]||(()=>{}),sE=0;function bu(n){const[i,s]=v.useState(lE());return Fs(()=>{s(r=>r??String(sE++))},[n]),n||(i?`radix-${i}`:"")}var rE=Vu[" useInsertionEffect ".trim().toString()]||Fs;function iE({prop:n,defaultProp:i,onChange:s=()=>{},caller:r}){const[d,f,p]=oE({defaultProp:i,onChange:s}),h=n!==void 0,x=h?n:d;{const S=v.useRef(n!==void 0);v.useEffect(()=>{const b=S.current;b!==h&&console.warn(`${r} is changing from ${b?"controlled":"uncontrolled"} to ${h?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),S.current=h},[h,r])}const g=v.useCallback(S=>{var b;if(h){const E=cE(S)?S(n):S;E!==n&&((b=p.current)==null||b.call(p,E))}else f(S)},[h,n,f,p]);return[x,g]}function oE({defaultProp:n,onChange:i}){const[s,r]=v.useState(n),d=v.useRef(s),f=v.useRef(i);return rE(()=>{f.current=i},[i]),v.useEffect(()=>{var p;d.current!==s&&((p=f.current)==null||p.call(f,s),d.current=s)},[s,d]),[s,r,f]}function cE(n){return typeof n=="function"}function uE(n){const i=dE(n),s=v.forwardRef((r,d)=>{const{children:f,...p}=r,h=v.Children.toArray(f),x=h.find(mE);if(x){const g=x.props.children,S=h.map(b=>b===x?v.Children.count(g)>1?v.Children.only(null):v.isValidElement(g)?g.props.children:null:b);return c.jsx(i,{...p,ref:d,children:v.isValidElement(g)?v.cloneElement(g,void 0,S):null})}return c.jsx(i,{...p,ref:d,children:f})});return s.displayName=`${n}.Slot`,s}function dE(n){const i=v.forwardRef((s,r)=>{const{children:d,...f}=s;if(v.isValidElement(d)){const p=hE(d),h=pE(f,d.props);return d.type!==v.Fragment&&(h.ref=r?Wu(r,p):p),v.cloneElement(d,h)}return v.Children.count(d)>1?v.Children.only(null):null});return i.displayName=`${n}.SlotClone`,i}var fE=Symbol("radix.slottable");function mE(n){return v.isValidElement(n)&&typeof n.type=="function"&&"__radixId"in n.type&&n.type.__radixId===fE}function pE(n,i){const s={...i};for(const r in i){const d=n[r],f=i[r];/^on[A-Z]/.test(r)?d&&f?s[r]=(...h)=>{const x=f(...h);return d(...h),x}:d&&(s[r]=d):r==="style"?s[r]={...d,...f}:r==="className"&&(s[r]=[d,f].filter(Boolean).join(" "))}return{...n,...s}}function hE(n){var r,d;let i=(r=Object.getOwnPropertyDescriptor(n.props,"ref"))==null?void 0:r.get,s=i&&"isReactWarning"in i&&i.isReactWarning;return s?n.ref:(i=(d=Object.getOwnPropertyDescriptor(n,"ref"))==null?void 0:d.get,s=i&&"isReactWarning"in i&&i.isReactWarning,s?n.props.ref:n.props.ref||n.ref)}var gE=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],Ga=gE.reduce((n,i)=>{const s=uE(`Primitive.${i}`),r=v.forwardRef((d,f)=>{const{asChild:p,...h}=d,x=p?s:i;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),c.jsx(x,{...h,ref:f})});return r.displayName=`Primitive.${i}`,{...n,[i]:r}},{});function vE(n,i){n&&sg.flushSync(()=>n.dispatchEvent(i))}function $s(n){const i=v.useRef(n);return v.useEffect(()=>{i.current=n}),v.useMemo(()=>(...s)=>{var r;return(r=i.current)==null?void 0:r.call(i,...s)},[])}function xE(n,i=globalThis==null?void 0:globalThis.document){const s=$s(n);v.useEffect(()=>{const r=d=>{d.key==="Escape"&&s(d)};return i.addEventListener("keydown",r,{capture:!0}),()=>i.removeEventListener("keydown",r,{capture:!0})},[s,i])}var yE="DismissableLayer",qu="dismissableLayer.update",bE="dismissableLayer.pointerDownOutside",SE="dismissableLayer.focusOutside",Ih,Pg=v.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Zg=v.forwardRef((n,i)=>{const{disableOutsidePointerEvents:s=!1,onEscapeKeyDown:r,onPointerDownOutside:d,onFocusOutside:f,onInteractOutside:p,onDismiss:h,...x}=n,g=v.useContext(Pg),[S,b]=v.useState(null),E=(S==null?void 0:S.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,w]=v.useState({}),C=Qn(i,H=>b(H)),A=Array.from(g.layers),[O]=[...g.layersWithOutsidePointerEventsDisabled].slice(-1),T=A.indexOf(O),X=S?A.indexOf(S):-1,Y=g.layersWithOutsidePointerEventsDisabled.size>0,P=X>=T,Z=jE(H=>{const Q=H.target,fe=[...g.branches].some(He=>He.contains(Q));!P||fe||(d==null||d(H),p==null||p(H),H.defaultPrevented||h==null||h())},E),te=NE(H=>{const Q=H.target;[...g.branches].some(He=>He.contains(Q))||(f==null||f(H),p==null||p(H),H.defaultPrevented||h==null||h())},E);return xE(H=>{X===g.layers.size-1&&(r==null||r(H),!H.defaultPrevented&&h&&(H.preventDefault(),h()))},E),v.useEffect(()=>{if(S)return s&&(g.layersWithOutsidePointerEventsDisabled.size===0&&(Ih=E.body.style.pointerEvents,E.body.style.pointerEvents="none"),g.layersWithOutsidePointerEventsDisabled.add(S)),g.layers.add(S),Kh(),()=>{s&&g.layersWithOutsidePointerEventsDisabled.size===1&&(E.body.style.pointerEvents=Ih)}},[S,E,s,g]),v.useEffect(()=>()=>{S&&(g.layers.delete(S),g.layersWithOutsidePointerEventsDisabled.delete(S),Kh())},[S,g]),v.useEffect(()=>{const H=()=>w({});return document.addEventListener(qu,H),()=>document.removeEventListener(qu,H)},[]),c.jsx(Ga.div,{...x,ref:C,style:{pointerEvents:Y?P?"auto":"none":void 0,...n.style},onFocusCapture:yn(n.onFocusCapture,te.onFocusCapture),onBlurCapture:yn(n.onBlurCapture,te.onBlurCapture),onPointerDownCapture:yn(n.onPointerDownCapture,Z.onPointerDownCapture)})});Zg.displayName=yE;var EE="DismissableLayerBranch",wE=v.forwardRef((n,i)=>{const s=v.useContext(Pg),r=v.useRef(null),d=Qn(i,r);return v.useEffect(()=>{const f=r.current;if(f)return s.branches.add(f),()=>{s.branches.delete(f)}},[s.branches]),c.jsx(Ga.div,{...n,ref:d})});wE.displayName=EE;function jE(n,i=globalThis==null?void 0:globalThis.document){const s=$s(n),r=v.useRef(!1),d=v.useRef(()=>{});return v.useEffect(()=>{const f=h=>{if(h.target&&!r.current){let x=function(){Jg(bE,s,g,{discrete:!0})};const g={originalEvent:h};h.pointerType==="touch"?(i.removeEventListener("click",d.current),d.current=x,i.addEventListener("click",d.current,{once:!0})):x()}else i.removeEventListener("click",d.current);r.current=!1},p=window.setTimeout(()=>{i.addEventListener("pointerdown",f)},0);return()=>{window.clearTimeout(p),i.removeEventListener("pointerdown",f),i.removeEventListener("click",d.current)}},[i,s]),{onPointerDownCapture:()=>r.current=!0}}function NE(n,i=globalThis==null?void 0:globalThis.document){const s=$s(n),r=v.useRef(!1);return v.useEffect(()=>{const d=f=>{f.target&&!r.current&&Jg(SE,s,{originalEvent:f},{discrete:!1})};return i.addEventListener("focusin",d),()=>i.removeEventListener("focusin",d)},[i,s]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function Kh(){const n=new CustomEvent(qu);document.dispatchEvent(n)}function Jg(n,i,s,{discrete:r}){const d=s.originalEvent.target,f=new CustomEvent(n,{bubbles:!1,cancelable:!0,detail:s});i&&d.addEventListener(n,i,{once:!0}),r?vE(d,f):d.dispatchEvent(f)}var Su="focusScope.autoFocusOnMount",Eu="focusScope.autoFocusOnUnmount",Yh={bubbles:!1,cancelable:!0},_E="FocusScope",Fg=v.forwardRef((n,i)=>{const{loop:s=!1,trapped:r=!1,onMountAutoFocus:d,onUnmountAutoFocus:f,...p}=n,[h,x]=v.useState(null),g=$s(d),S=$s(f),b=v.useRef(null),E=Qn(i,A=>x(A)),w=v.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;v.useEffect(()=>{if(r){let A=function(Y){if(w.paused||!h)return;const P=Y.target;h.contains(P)?b.current=P:hn(b.current,{select:!0})},O=function(Y){if(w.paused||!h)return;const P=Y.relatedTarget;P!==null&&(h.contains(P)||hn(b.current,{select:!0}))},T=function(Y){if(document.activeElement===document.body)for(const Z of Y)Z.removedNodes.length>0&&hn(h)};document.addEventListener("focusin",A),document.addEventListener("focusout",O);const X=new MutationObserver(T);return h&&X.observe(h,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",A),document.removeEventListener("focusout",O),X.disconnect()}}},[r,h,w.paused]),v.useEffect(()=>{if(h){Xh.add(w);const A=document.activeElement;if(!h.contains(A)){const T=new CustomEvent(Su,Yh);h.addEventListener(Su,g),h.dispatchEvent(T),T.defaultPrevented||(CE(DE($g(h)),{select:!0}),document.activeElement===A&&hn(h))}return()=>{h.removeEventListener(Su,g),setTimeout(()=>{const T=new CustomEvent(Eu,Yh);h.addEventListener(Eu,S),h.dispatchEvent(T),T.defaultPrevented||hn(A??document.body,{select:!0}),h.removeEventListener(Eu,S),Xh.remove(w)},0)}}},[h,g,S,w]);const C=v.useCallback(A=>{if(!s&&!r||w.paused)return;const O=A.key==="Tab"&&!A.altKey&&!A.ctrlKey&&!A.metaKey,T=document.activeElement;if(O&&T){const X=A.currentTarget,[Y,P]=TE(X);Y&&P?!A.shiftKey&&T===P?(A.preventDefault(),s&&hn(Y,{select:!0})):A.shiftKey&&T===Y&&(A.preventDefault(),s&&hn(P,{select:!0})):T===X&&A.preventDefault()}},[s,r,w.paused]);return c.jsx(Ga.div,{tabIndex:-1,...p,ref:E,onKeyDown:C})});Fg.displayName=_E;function CE(n,{select:i=!1}={}){const s=document.activeElement;for(const r of n)if(hn(r,{select:i}),document.activeElement!==s)return}function TE(n){const i=$g(n),s=Vh(i,n),r=Vh(i.reverse(),n);return[s,r]}function $g(n){const i=[],s=document.createTreeWalker(n,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const d=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||d?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;s.nextNode();)i.push(s.currentNode);return i}function Vh(n,i){for(const s of n)if(!AE(s,{upTo:i}))return s}function AE(n,{upTo:i}){if(getComputedStyle(n).visibility==="hidden")return!0;for(;n;){if(i!==void 0&&n===i)return!1;if(getComputedStyle(n).display==="none")return!0;n=n.parentElement}return!1}function kE(n){return n instanceof HTMLInputElement&&"select"in n}function hn(n,{select:i=!1}={}){if(n&&n.focus){const s=document.activeElement;n.focus({preventScroll:!0}),n!==s&&kE(n)&&i&&n.select()}}var Xh=OE();function OE(){let n=[];return{add(i){const s=n[0];i!==s&&(s==null||s.pause()),n=Qh(n,i),n.unshift(i)},remove(i){var s;n=Qh(n,i),(s=n[0])==null||s.resume()}}}function Qh(n,i){const s=[...n],r=s.indexOf(i);return r!==-1&&s.splice(r,1),s}function DE(n){return n.filter(i=>i.tagName!=="A")}var ME="Portal",Wg=v.forwardRef((n,i)=>{var h;const{container:s,...r}=n,[d,f]=v.useState(!1);Fs(()=>f(!0),[]);const p=s||d&&((h=globalThis==null?void 0:globalThis.document)==null?void 0:h.body);return p?rb.createPortal(c.jsx(Ga.div,{...r,ref:i}),p):null});Wg.displayName=ME;function RE(n,i){return v.useReducer((s,r)=>i[s][r]??s,n)}var Ii=n=>{const{present:i,children:s}=n,r=zE(i),d=typeof s=="function"?s({present:r.isPresent}):v.Children.only(s),f=Qn(r.ref,LE(d));return typeof s=="function"||r.isPresent?v.cloneElement(d,{ref:f}):null};Ii.displayName="Presence";function zE(n){const[i,s]=v.useState(),r=v.useRef(null),d=v.useRef(n),f=v.useRef("none"),p=n?"mounted":"unmounted",[h,x]=RE(p,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return v.useEffect(()=>{const g=wi(r.current);f.current=h==="mounted"?g:"none"},[h]),Fs(()=>{const g=r.current,S=d.current;if(S!==n){const E=f.current,w=wi(g);n?x("MOUNT"):w==="none"||(g==null?void 0:g.display)==="none"?x("UNMOUNT"):x(S&&E!==w?"ANIMATION_OUT":"UNMOUNT"),d.current=n}},[n,x]),Fs(()=>{if(i){let g;const S=i.ownerDocument.defaultView??window,b=w=>{const A=wi(r.current).includes(CSS.escape(w.animationName));if(w.target===i&&A&&(x("ANIMATION_END"),!d.current)){const O=i.style.animationFillMode;i.style.animationFillMode="forwards",g=S.setTimeout(()=>{i.style.animationFillMode==="forwards"&&(i.style.animationFillMode=O)})}},E=w=>{w.target===i&&(f.current=wi(r.current))};return i.addEventListener("animationstart",E),i.addEventListener("animationcancel",b),i.addEventListener("animationend",b),()=>{S.clearTimeout(g),i.removeEventListener("animationstart",E),i.removeEventListener("animationcancel",b),i.removeEventListener("animationend",b)}}else x("ANIMATION_END")},[i,x]),{isPresent:["mounted","unmountSuspended"].includes(h),ref:v.useCallback(g=>{r.current=g?getComputedStyle(g):null,s(g)},[])}}function wi(n){return(n==null?void 0:n.animationName)||"none"}function LE(n){var r,d;let i=(r=Object.getOwnPropertyDescriptor(n.props,"ref"))==null?void 0:r.get,s=i&&"isReactWarning"in i&&i.isReactWarning;return s?n.ref:(i=(d=Object.getOwnPropertyDescriptor(n,"ref"))==null?void 0:d.get,s=i&&"isReactWarning"in i&&i.isReactWarning,s?n.props.ref:n.props.ref||n.ref)}var wu=0;function UE(){v.useEffect(()=>{const n=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",n[0]??Ph()),document.body.insertAdjacentElement("beforeend",n[1]??Ph()),wu++,()=>{wu===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(i=>i.remove()),wu--}},[])}function Ph(){const n=document.createElement("span");return n.setAttribute("data-radix-focus-guard",""),n.tabIndex=0,n.style.outline="none",n.style.opacity="0",n.style.position="fixed",n.style.pointerEvents="none",n}var ga=function(){return ga=Object.assign||function(i){for(var s,r=1,d=arguments.length;r<d;r++){s=arguments[r];for(var f in s)Object.prototype.hasOwnProperty.call(s,f)&&(i[f]=s[f])}return i},ga.apply(this,arguments)};function ev(n,i){var s={};for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&i.indexOf(r)<0&&(s[r]=n[r]);if(n!=null&&typeof Object.getOwnPropertySymbols=="function")for(var d=0,r=Object.getOwnPropertySymbols(n);d<r.length;d++)i.indexOf(r[d])<0&&Object.prototype.propertyIsEnumerable.call(n,r[d])&&(s[r[d]]=n[r[d]]);return s}function BE(n,i,s){if(s||arguments.length===2)for(var r=0,d=i.length,f;r<d;r++)(f||!(r in i))&&(f||(f=Array.prototype.slice.call(i,0,r)),f[r]=i[r]);return n.concat(f||Array.prototype.slice.call(i))}var Oi="right-scroll-bar-position",Di="width-before-scroll-bar",HE="with-scroll-bars-hidden",GE="--removed-body-scroll-bar-size";function ju(n,i){return typeof n=="function"?n(i):n&&(n.current=i),n}function qE(n,i){var s=v.useState(function(){return{value:n,callback:i,facade:{get current(){return s.value},set current(r){var d=s.value;d!==r&&(s.value=r,s.callback(r,d))}}}})[0];return s.callback=i,s.facade}var IE=typeof window<"u"?v.useLayoutEffect:v.useEffect,Zh=new WeakMap;function KE(n,i){var s=qE(null,function(r){return n.forEach(function(d){return ju(d,r)})});return IE(function(){var r=Zh.get(s);if(r){var d=new Set(r),f=new Set(n),p=s.current;d.forEach(function(h){f.has(h)||ju(h,null)}),f.forEach(function(h){d.has(h)||ju(h,p)})}Zh.set(s,n)},[n]),s}function YE(n){return n}function VE(n,i){i===void 0&&(i=YE);var s=[],r=!1,d={read:function(){if(r)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return s.length?s[s.length-1]:n},useMedium:function(f){var p=i(f,r);return s.push(p),function(){s=s.filter(function(h){return h!==p})}},assignSyncMedium:function(f){for(r=!0;s.length;){var p=s;s=[],p.forEach(f)}s={push:function(h){return f(h)},filter:function(){return s}}},assignMedium:function(f){r=!0;var p=[];if(s.length){var h=s;s=[],h.forEach(f),p=s}var x=function(){var S=p;p=[],S.forEach(f)},g=function(){return Promise.resolve().then(x)};g(),s={push:function(S){p.push(S),g()},filter:function(S){return p=p.filter(S),s}}}};return d}function XE(n){n===void 0&&(n={});var i=VE(null);return i.options=ga({async:!0,ssr:!1},n),i}var tv=function(n){var i=n.sideCar,s=ev(n,["sideCar"]);if(!i)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var r=i.read();if(!r)throw new Error("Sidecar medium not found");return v.createElement(r,ga({},s))};tv.isSideCarExport=!0;function QE(n,i){return n.useMedium(i),tv}var av=XE(),Nu=function(){},Ki=v.forwardRef(function(n,i){var s=v.useRef(null),r=v.useState({onScrollCapture:Nu,onWheelCapture:Nu,onTouchMoveCapture:Nu}),d=r[0],f=r[1],p=n.forwardProps,h=n.children,x=n.className,g=n.removeScrollBar,S=n.enabled,b=n.shards,E=n.sideCar,w=n.noRelative,C=n.noIsolation,A=n.inert,O=n.allowPinchZoom,T=n.as,X=T===void 0?"div":T,Y=n.gapMode,P=ev(n,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),Z=E,te=KE([s,i]),H=ga(ga({},P),d);return v.createElement(v.Fragment,null,S&&v.createElement(Z,{sideCar:av,removeScrollBar:g,shards:b,noRelative:w,noIsolation:C,inert:A,setCallbacks:f,allowPinchZoom:!!O,lockRef:s,gapMode:Y}),p?v.cloneElement(v.Children.only(h),ga(ga({},H),{ref:te})):v.createElement(X,ga({},H,{className:x,ref:te}),h))});Ki.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};Ki.classNames={fullWidth:Di,zeroRight:Oi};var PE=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function ZE(){if(!document)return null;var n=document.createElement("style");n.type="text/css";var i=PE();return i&&n.setAttribute("nonce",i),n}function JE(n,i){n.styleSheet?n.styleSheet.cssText=i:n.appendChild(document.createTextNode(i))}function FE(n){var i=document.head||document.getElementsByTagName("head")[0];i.appendChild(n)}var $E=function(){var n=0,i=null;return{add:function(s){n==0&&(i=ZE())&&(JE(i,s),FE(i)),n++},remove:function(){n--,!n&&i&&(i.parentNode&&i.parentNode.removeChild(i),i=null)}}},WE=function(){var n=$E();return function(i,s){v.useEffect(function(){return n.add(i),function(){n.remove()}},[i&&s])}},nv=function(){var n=WE(),i=function(s){var r=s.styles,d=s.dynamic;return n(r,d),null};return i},ew={left:0,top:0,right:0,gap:0},_u=function(n){return parseInt(n||"",10)||0},tw=function(n){var i=window.getComputedStyle(document.body),s=i[n==="padding"?"paddingLeft":"marginLeft"],r=i[n==="padding"?"paddingTop":"marginTop"],d=i[n==="padding"?"paddingRight":"marginRight"];return[_u(s),_u(r),_u(d)]},aw=function(n){if(n===void 0&&(n="margin"),typeof window>"u")return ew;var i=tw(n),s=document.documentElement.clientWidth,r=window.innerWidth;return{left:i[0],top:i[1],right:i[2],gap:Math.max(0,r-s+i[2]-i[0])}},nw=nv(),Gl="data-scroll-locked",lw=function(n,i,s,r){var d=n.left,f=n.top,p=n.right,h=n.gap;return s===void 0&&(s="margin"),`
193
+ .`.concat(HE,` {
194
+ overflow: hidden `).concat(r,`;
195
+ padding-right: `).concat(h,"px ").concat(r,`;
196
+ }
197
+ body[`).concat(Gl,`] {
198
+ overflow: hidden `).concat(r,`;
199
+ overscroll-behavior: contain;
200
+ `).concat([i&&"position: relative ".concat(r,";"),s==="margin"&&`
201
+ padding-left: `.concat(d,`px;
202
+ padding-top: `).concat(f,`px;
203
+ padding-right: `).concat(p,`px;
204
+ margin-left:0;
205
+ margin-top:0;
206
+ margin-right: `).concat(h,"px ").concat(r,`;
207
+ `),s==="padding"&&"padding-right: ".concat(h,"px ").concat(r,";")].filter(Boolean).join(""),`
208
+ }
209
+
210
+ .`).concat(Oi,` {
211
+ right: `).concat(h,"px ").concat(r,`;
212
+ }
213
+
214
+ .`).concat(Di,` {
215
+ margin-right: `).concat(h,"px ").concat(r,`;
216
+ }
217
+
218
+ .`).concat(Oi," .").concat(Oi,` {
219
+ right: 0 `).concat(r,`;
220
+ }
221
+
222
+ .`).concat(Di," .").concat(Di,` {
223
+ margin-right: 0 `).concat(r,`;
224
+ }
225
+
226
+ body[`).concat(Gl,`] {
227
+ `).concat(GE,": ").concat(h,`px;
228
+ }
229
+ `)},Jh=function(){var n=parseInt(document.body.getAttribute(Gl)||"0",10);return isFinite(n)?n:0},sw=function(){v.useEffect(function(){return document.body.setAttribute(Gl,(Jh()+1).toString()),function(){var n=Jh()-1;n<=0?document.body.removeAttribute(Gl):document.body.setAttribute(Gl,n.toString())}},[])},rw=function(n){var i=n.noRelative,s=n.noImportant,r=n.gapMode,d=r===void 0?"margin":r;sw();var f=v.useMemo(function(){return aw(d)},[d]);return v.createElement(nw,{styles:lw(f,!i,d,s?"":"!important")})},Iu=!1;if(typeof window<"u")try{var ji=Object.defineProperty({},"passive",{get:function(){return Iu=!0,!0}});window.addEventListener("test",ji,ji),window.removeEventListener("test",ji,ji)}catch{Iu=!1}var Ll=Iu?{passive:!1}:!1,iw=function(n){return n.tagName==="TEXTAREA"},lv=function(n,i){if(!(n instanceof Element))return!1;var s=window.getComputedStyle(n);return s[i]!=="hidden"&&!(s.overflowY===s.overflowX&&!iw(n)&&s[i]==="visible")},ow=function(n){return lv(n,"overflowY")},cw=function(n){return lv(n,"overflowX")},Fh=function(n,i){var s=i.ownerDocument,r=i;do{typeof ShadowRoot<"u"&&r instanceof ShadowRoot&&(r=r.host);var d=sv(n,r);if(d){var f=rv(n,r),p=f[1],h=f[2];if(p>h)return!0}r=r.parentNode}while(r&&r!==s.body);return!1},uw=function(n){var i=n.scrollTop,s=n.scrollHeight,r=n.clientHeight;return[i,s,r]},dw=function(n){var i=n.scrollLeft,s=n.scrollWidth,r=n.clientWidth;return[i,s,r]},sv=function(n,i){return n==="v"?ow(i):cw(i)},rv=function(n,i){return n==="v"?uw(i):dw(i)},fw=function(n,i){return n==="h"&&i==="rtl"?-1:1},mw=function(n,i,s,r,d){var f=fw(n,window.getComputedStyle(i).direction),p=f*r,h=s.target,x=i.contains(h),g=!1,S=p>0,b=0,E=0;do{if(!h)break;var w=rv(n,h),C=w[0],A=w[1],O=w[2],T=A-O-f*C;(C||T)&&sv(n,h)&&(b+=T,E+=C);var X=h.parentNode;h=X&&X.nodeType===Node.DOCUMENT_FRAGMENT_NODE?X.host:X}while(!x&&h!==document.body||x&&(i.contains(h)||i===h));return(S&&Math.abs(b)<1||!S&&Math.abs(E)<1)&&(g=!0),g},Ni=function(n){return"changedTouches"in n?[n.changedTouches[0].clientX,n.changedTouches[0].clientY]:[0,0]},$h=function(n){return[n.deltaX,n.deltaY]},Wh=function(n){return n&&"current"in n?n.current:n},pw=function(n,i){return n[0]===i[0]&&n[1]===i[1]},hw=function(n){return`
230
+ .block-interactivity-`.concat(n,` {pointer-events: none;}
231
+ .allow-interactivity-`).concat(n,` {pointer-events: all;}
232
+ `)},gw=0,Ul=[];function vw(n){var i=v.useRef([]),s=v.useRef([0,0]),r=v.useRef(),d=v.useState(gw++)[0],f=v.useState(nv)[0],p=v.useRef(n);v.useEffect(function(){p.current=n},[n]),v.useEffect(function(){if(n.inert){document.body.classList.add("block-interactivity-".concat(d));var A=BE([n.lockRef.current],(n.shards||[]).map(Wh),!0).filter(Boolean);return A.forEach(function(O){return O.classList.add("allow-interactivity-".concat(d))}),function(){document.body.classList.remove("block-interactivity-".concat(d)),A.forEach(function(O){return O.classList.remove("allow-interactivity-".concat(d))})}}},[n.inert,n.lockRef.current,n.shards]);var h=v.useCallback(function(A,O){if("touches"in A&&A.touches.length===2||A.type==="wheel"&&A.ctrlKey)return!p.current.allowPinchZoom;var T=Ni(A),X=s.current,Y="deltaX"in A?A.deltaX:X[0]-T[0],P="deltaY"in A?A.deltaY:X[1]-T[1],Z,te=A.target,H=Math.abs(Y)>Math.abs(P)?"h":"v";if("touches"in A&&H==="h"&&te.type==="range")return!1;var Q=window.getSelection(),fe=Q&&Q.anchorNode,He=fe?fe===te||fe.contains(te):!1;if(He)return!1;var Ae=Fh(H,te);if(!Ae)return!0;if(Ae?Z=H:(Z=H==="v"?"h":"v",Ae=Fh(H,te)),!Ae)return!1;if(!r.current&&"changedTouches"in A&&(Y||P)&&(r.current=Z),!Z)return!0;var ze=r.current||Z;return mw(ze,O,A,ze==="h"?Y:P)},[]),x=v.useCallback(function(A){var O=A;if(!(!Ul.length||Ul[Ul.length-1]!==f)){var T="deltaY"in O?$h(O):Ni(O),X=i.current.filter(function(Z){return Z.name===O.type&&(Z.target===O.target||O.target===Z.shadowParent)&&pw(Z.delta,T)})[0];if(X&&X.should){O.cancelable&&O.preventDefault();return}if(!X){var Y=(p.current.shards||[]).map(Wh).filter(Boolean).filter(function(Z){return Z.contains(O.target)}),P=Y.length>0?h(O,Y[0]):!p.current.noIsolation;P&&O.cancelable&&O.preventDefault()}}},[]),g=v.useCallback(function(A,O,T,X){var Y={name:A,delta:O,target:T,should:X,shadowParent:xw(T)};i.current.push(Y),setTimeout(function(){i.current=i.current.filter(function(P){return P!==Y})},1)},[]),S=v.useCallback(function(A){s.current=Ni(A),r.current=void 0},[]),b=v.useCallback(function(A){g(A.type,$h(A),A.target,h(A,n.lockRef.current))},[]),E=v.useCallback(function(A){g(A.type,Ni(A),A.target,h(A,n.lockRef.current))},[]);v.useEffect(function(){return Ul.push(f),n.setCallbacks({onScrollCapture:b,onWheelCapture:b,onTouchMoveCapture:E}),document.addEventListener("wheel",x,Ll),document.addEventListener("touchmove",x,Ll),document.addEventListener("touchstart",S,Ll),function(){Ul=Ul.filter(function(A){return A!==f}),document.removeEventListener("wheel",x,Ll),document.removeEventListener("touchmove",x,Ll),document.removeEventListener("touchstart",S,Ll)}},[]);var w=n.removeScrollBar,C=n.inert;return v.createElement(v.Fragment,null,C?v.createElement(f,{styles:hw(d)}):null,w?v.createElement(rw,{noRelative:n.noRelative,gapMode:n.gapMode}):null)}function xw(n){for(var i=null;n!==null;)n instanceof ShadowRoot&&(i=n.host,n=n.host),n=n.parentNode;return i}const yw=QE(av,vw);var iv=v.forwardRef(function(n,i){return v.createElement(Ki,ga({},n,{ref:i,sideCar:yw}))});iv.classNames=Ki.classNames;var bw=function(n){if(typeof document>"u")return null;var i=Array.isArray(n)?n[0]:n;return i.ownerDocument.body},Bl=new WeakMap,_i=new WeakMap,Ci={},Cu=0,ov=function(n){return n&&(n.host||ov(n.parentNode))},Sw=function(n,i){return i.map(function(s){if(n.contains(s))return s;var r=ov(s);return r&&n.contains(r)?r:(console.error("aria-hidden",s,"in not contained inside",n,". Doing nothing"),null)}).filter(function(s){return!!s})},Ew=function(n,i,s,r){var d=Sw(i,Array.isArray(n)?n:[n]);Ci[s]||(Ci[s]=new WeakMap);var f=Ci[s],p=[],h=new Set,x=new Set(d),g=function(b){!b||h.has(b)||(h.add(b),g(b.parentNode))};d.forEach(g);var S=function(b){!b||x.has(b)||Array.prototype.forEach.call(b.children,function(E){if(h.has(E))S(E);else try{var w=E.getAttribute(r),C=w!==null&&w!=="false",A=(Bl.get(E)||0)+1,O=(f.get(E)||0)+1;Bl.set(E,A),f.set(E,O),p.push(E),A===1&&C&&_i.set(E,!0),O===1&&E.setAttribute(s,"true"),C||E.setAttribute(r,"true")}catch(T){console.error("aria-hidden: cannot operate on ",E,T)}})};return S(i),h.clear(),Cu++,function(){p.forEach(function(b){var E=Bl.get(b)-1,w=f.get(b)-1;Bl.set(b,E),f.set(b,w),E||(_i.has(b)||b.removeAttribute(r),_i.delete(b)),w||b.removeAttribute(s)}),Cu--,Cu||(Bl=new WeakMap,Bl=new WeakMap,_i=new WeakMap,Ci={})}},ww=function(n,i,s){s===void 0&&(s="data-aria-hidden");var r=Array.from(Array.isArray(n)?n:[n]),d=bw(n);return d?(r.push.apply(r,Array.from(d.querySelectorAll("[aria-live], script"))),Ew(r,d,s,"aria-hidden")):function(){return null}};function jw(n){const i=Nw(n),s=v.forwardRef((r,d)=>{const{children:f,...p}=r,h=v.Children.toArray(f),x=h.find(Cw);if(x){const g=x.props.children,S=h.map(b=>b===x?v.Children.count(g)>1?v.Children.only(null):v.isValidElement(g)?g.props.children:null:b);return c.jsx(i,{...p,ref:d,children:v.isValidElement(g)?v.cloneElement(g,void 0,S):null})}return c.jsx(i,{...p,ref:d,children:f})});return s.displayName=`${n}.Slot`,s}function Nw(n){const i=v.forwardRef((s,r)=>{const{children:d,...f}=s;if(v.isValidElement(d)){const p=Aw(d),h=Tw(f,d.props);return d.type!==v.Fragment&&(h.ref=r?Wu(r,p):p),v.cloneElement(d,h)}return v.Children.count(d)>1?v.Children.only(null):null});return i.displayName=`${n}.SlotClone`,i}var _w=Symbol("radix.slottable");function Cw(n){return v.isValidElement(n)&&typeof n.type=="function"&&"__radixId"in n.type&&n.type.__radixId===_w}function Tw(n,i){const s={...i};for(const r in i){const d=n[r],f=i[r];/^on[A-Z]/.test(r)?d&&f?s[r]=(...h)=>{const x=f(...h);return d(...h),x}:d&&(s[r]=d):r==="style"?s[r]={...d,...f}:r==="className"&&(s[r]=[d,f].filter(Boolean).join(" "))}return{...n,...s}}function Aw(n){var r,d;let i=(r=Object.getOwnPropertyDescriptor(n.props,"ref"))==null?void 0:r.get,s=i&&"isReactWarning"in i&&i.isReactWarning;return s?n.ref:(i=(d=Object.getOwnPropertyDescriptor(n,"ref"))==null?void 0:d.get,s=i&&"isReactWarning"in i&&i.isReactWarning,s?n.props.ref:n.props.ref||n.ref)}var Yi="Dialog",[cv]=aE(Yi),[kw,ua]=cv(Yi),uv=n=>{const{__scopeDialog:i,children:s,open:r,defaultOpen:d,onOpenChange:f,modal:p=!0}=n,h=v.useRef(null),x=v.useRef(null),[g,S]=iE({prop:r,defaultProp:d??!1,onChange:f,caller:Yi});return c.jsx(kw,{scope:i,triggerRef:h,contentRef:x,contentId:bu(),titleId:bu(),descriptionId:bu(),open:g,onOpenChange:S,onOpenToggle:v.useCallback(()=>S(b=>!b),[S]),modal:p,children:s})};uv.displayName=Yi;var dv="DialogTrigger",Ow=v.forwardRef((n,i)=>{const{__scopeDialog:s,...r}=n,d=ua(dv,s),f=Qn(i,d.triggerRef);return c.jsx(Ga.button,{type:"button","aria-haspopup":"dialog","aria-expanded":d.open,"aria-controls":d.contentId,"data-state":ad(d.open),...r,ref:f,onClick:yn(n.onClick,d.onOpenToggle)})});Ow.displayName=dv;var ed="DialogPortal",[Dw,fv]=cv(ed,{forceMount:void 0}),mv=n=>{const{__scopeDialog:i,forceMount:s,children:r,container:d}=n,f=ua(ed,i);return c.jsx(Dw,{scope:i,forceMount:s,children:v.Children.map(r,p=>c.jsx(Ii,{present:s||f.open,children:c.jsx(Wg,{asChild:!0,container:d,children:p})}))})};mv.displayName=ed;var Ui="DialogOverlay",pv=v.forwardRef((n,i)=>{const s=fv(Ui,n.__scopeDialog),{forceMount:r=s.forceMount,...d}=n,f=ua(Ui,n.__scopeDialog);return f.modal?c.jsx(Ii,{present:r||f.open,children:c.jsx(Rw,{...d,ref:i})}):null});pv.displayName=Ui;var Mw=jw("DialogOverlay.RemoveScroll"),Rw=v.forwardRef((n,i)=>{const{__scopeDialog:s,...r}=n,d=ua(Ui,s);return c.jsx(iv,{as:Mw,allowPinchZoom:!0,shards:[d.contentRef],children:c.jsx(Ga.div,{"data-state":ad(d.open),...r,ref:i,style:{pointerEvents:"auto",...r.style}})})}),Yn="DialogContent",hv=v.forwardRef((n,i)=>{const s=fv(Yn,n.__scopeDialog),{forceMount:r=s.forceMount,...d}=n,f=ua(Yn,n.__scopeDialog);return c.jsx(Ii,{present:r||f.open,children:f.modal?c.jsx(zw,{...d,ref:i}):c.jsx(Lw,{...d,ref:i})})});hv.displayName=Yn;var zw=v.forwardRef((n,i)=>{const s=ua(Yn,n.__scopeDialog),r=v.useRef(null),d=Qn(i,s.contentRef,r);return v.useEffect(()=>{const f=r.current;if(f)return ww(f)},[]),c.jsx(gv,{...n,ref:d,trapFocus:s.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:yn(n.onCloseAutoFocus,f=>{var p;f.preventDefault(),(p=s.triggerRef.current)==null||p.focus()}),onPointerDownOutside:yn(n.onPointerDownOutside,f=>{const p=f.detail.originalEvent,h=p.button===0&&p.ctrlKey===!0;(p.button===2||h)&&f.preventDefault()}),onFocusOutside:yn(n.onFocusOutside,f=>f.preventDefault())})}),Lw=v.forwardRef((n,i)=>{const s=ua(Yn,n.__scopeDialog),r=v.useRef(!1),d=v.useRef(!1);return c.jsx(gv,{...n,ref:i,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:f=>{var p,h;(p=n.onCloseAutoFocus)==null||p.call(n,f),f.defaultPrevented||(r.current||(h=s.triggerRef.current)==null||h.focus(),f.preventDefault()),r.current=!1,d.current=!1},onInteractOutside:f=>{var x,g;(x=n.onInteractOutside)==null||x.call(n,f),f.defaultPrevented||(r.current=!0,f.detail.originalEvent.type==="pointerdown"&&(d.current=!0));const p=f.target;((g=s.triggerRef.current)==null?void 0:g.contains(p))&&f.preventDefault(),f.detail.originalEvent.type==="focusin"&&d.current&&f.preventDefault()}})}),gv=v.forwardRef((n,i)=>{const{__scopeDialog:s,trapFocus:r,onOpenAutoFocus:d,onCloseAutoFocus:f,...p}=n,h=ua(Yn,s),x=v.useRef(null),g=Qn(i,x);return UE(),c.jsxs(c.Fragment,{children:[c.jsx(Fg,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:d,onUnmountAutoFocus:f,children:c.jsx(Zg,{role:"dialog",id:h.contentId,"aria-describedby":h.descriptionId,"aria-labelledby":h.titleId,"data-state":ad(h.open),...p,ref:g,onDismiss:()=>h.onOpenChange(!1)})}),c.jsxs(c.Fragment,{children:[c.jsx(Bw,{titleId:h.titleId}),c.jsx(Gw,{contentRef:x,descriptionId:h.descriptionId})]})]})}),td="DialogTitle",vv=v.forwardRef((n,i)=>{const{__scopeDialog:s,...r}=n,d=ua(td,s);return c.jsx(Ga.h2,{id:d.titleId,...r,ref:i})});vv.displayName=td;var xv="DialogDescription",Uw=v.forwardRef((n,i)=>{const{__scopeDialog:s,...r}=n,d=ua(xv,s);return c.jsx(Ga.p,{id:d.descriptionId,...r,ref:i})});Uw.displayName=xv;var yv="DialogClose",bv=v.forwardRef((n,i)=>{const{__scopeDialog:s,...r}=n,d=ua(yv,s);return c.jsx(Ga.button,{type:"button",...r,ref:i,onClick:yn(n.onClick,()=>d.onOpenChange(!1))})});bv.displayName=yv;function ad(n){return n?"open":"closed"}var Sv="DialogTitleWarning",[n2,Ev]=tE(Sv,{contentName:Yn,titleName:td,docsSlug:"dialog"}),Bw=({titleId:n})=>{const i=Ev(Sv),s=`\`${i.contentName}\` requires a \`${i.titleName}\` for the component to be accessible for screen reader users.
233
+
234
+ If you want to hide the \`${i.titleName}\`, you can wrap it with our VisuallyHidden component.
235
+
236
+ For more information, see https://radix-ui.com/primitives/docs/components/${i.docsSlug}`;return v.useEffect(()=>{n&&(document.getElementById(n)||console.error(s))},[s,n]),null},Hw="DialogDescriptionWarning",Gw=({contentRef:n,descriptionId:i})=>{const r=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${Ev(Hw).contentName}}.`;return v.useEffect(()=>{var f;const d=(f=n.current)==null?void 0:f.getAttribute("aria-describedby");i&&d&&(document.getElementById(i)||console.warn(r))},[r,n,i]),null},qw=uv,Iw=mv,Kw=pv,Yw=hv,Vw=vv,Xw=bv;const wv="maestro-ui-prefs";function jv(){try{const n=localStorage.getItem(wv);return n?JSON.parse(n):{}}catch{return{}}}function Tu(n){try{localStorage.setItem(wv,JSON.stringify({...jv(),...n}))}catch{}}const Mi=jv(),Hl=_t(n=>({createModalStyle:Mi.createModalStyle??2,detailModalStyle:Mi.detailModalStyle??1,stylePreset:Mi.stylePreset??"default",setCreateModalStyle:i=>{n({createModalStyle:i}),Tu({createModalStyle:i})},setDetailModalStyle:i=>{n({detailModalStyle:i}),Tu({detailModalStyle:i})},setStylePreset:i=>{n({stylePreset:i}),Tu({stylePreset:i}),document.documentElement.dataset.style=i}}));document.documentElement.dataset.style=Mi.stylePreset??"default";function In({enabled:n,onClick:i}){return c.jsx("button",{type:"button",onClick:i,className:me("relative inline-flex h-6 w-11 shrink-0 cursor-pointer rounded-full border-2 border-transparent","transition-colors duration-[var(--duration-fast)]","focus-visible:outline-none focus-visible:shadow-[var(--shadow-focus-ring)]",n?"bg-accent-blue":"bg-border"),children:c.jsx("span",{className:me("pointer-events-none inline-block h-5 w-5 rounded-full bg-white shadow-sm","transition-transform duration-[var(--duration-fast)]",n?"translate-x-5":"translate-x-0")})})}function rt({title:n,description:i,children:s,className:r}){return c.jsxs("div",{className:me("rounded-[var(--radius-default)] border border-border bg-bg-secondary p-[var(--spacing-4)]",r),children:[c.jsxs("div",{className:"mb-[var(--spacing-3)]",children:[c.jsx("h3",{className:"text-[length:var(--font-size-sm)] font-[var(--font-weight-semibold)] text-text-primary",children:n}),i&&c.jsx("p",{className:"mt-[var(--spacing-1)] text-[length:var(--font-size-xs)] text-text-secondary",children:i})]}),s]})}function Pe({label:n,description:i,htmlFor:s,children:r}){return c.jsxs("div",{className:"flex items-start justify-between gap-[var(--spacing-4)] py-[var(--spacing-2)]",children:[c.jsxs("div",{className:"flex-1 min-w-0",children:[c.jsx("label",{htmlFor:s,className:"text-[length:var(--font-size-sm)] font-[var(--font-weight-medium)] text-text-primary",children:n}),i&&c.jsx("p",{className:"mt-[var(--spacing-0-5)] text-[length:var(--font-size-xs)] text-text-secondary",children:i})]}),c.jsx("div",{className:"shrink-0",children:r})]})}function gn({id:n,value:i,onChange:s,placeholder:r,className:d,type:f="text"}){return c.jsx("input",{id:n,type:f,value:i,onChange:p=>s(p.target.value),placeholder:r,className:me("w-48 px-[var(--spacing-2)] py-[var(--spacing-1)] rounded-[var(--radius-sm)]","border border-border bg-bg-primary text-text-primary text-[length:var(--font-size-sm)]","focus:outline-none focus:border-accent-blue focus:shadow-[var(--shadow-focus-ring)]","transition-colors duration-[var(--duration-fast)]","placeholder:text-text-tertiary",d)})}function Kn({id:n,value:i,onChange:s,options:r,className:d}){return c.jsx("select",{id:n,value:i,onChange:f=>s(f.target.value),className:me("w-48 px-[var(--spacing-2)] py-[var(--spacing-1)] rounded-[var(--radius-sm)]","border border-border bg-bg-primary text-text-primary text-[length:var(--font-size-sm)]","focus:outline-none focus:border-accent-blue focus:shadow-[var(--shadow-focus-ring)]","transition-colors duration-[var(--duration-fast)]",d),children:r.map(f=>c.jsx("option",{value:f.value,children:f.label},f.value))})}function Vn({dirty:n,saving:i,onSave:s,onDiscard:r}){if(!n)return null;const{t:d}=St();return c.jsxs("div",{className:"sticky bottom-0 left-0 right-0 flex items-center justify-end gap-[var(--spacing-2)] px-[var(--spacing-4)] py-[var(--spacing-3)] border-t border-border bg-bg-secondary/95 backdrop-blur-sm",children:[c.jsx("button",{type:"button",onClick:r,disabled:i,className:me("px-[var(--spacing-3)] py-[var(--spacing-1-5)] rounded-[var(--radius-sm)]","text-[length:var(--font-size-sm)] font-[var(--font-weight-medium)]","border border-border text-text-secondary","hover:bg-bg-hover hover:text-text-primary","transition-colors duration-[var(--duration-fast)]","disabled:opacity-50 disabled:pointer-events-none"),children:d("settings.discard")}),c.jsx("button",{type:"button",onClick:s,disabled:i,className:me("px-[var(--spacing-3)] py-[var(--spacing-1-5)] rounded-[var(--radius-sm)]","text-[length:var(--font-size-sm)] font-[var(--font-weight-medium)]","bg-accent-blue text-white","hover:opacity-90","transition-colors duration-[var(--duration-fast)]","disabled:opacity-50 disabled:pointer-events-none"),children:d(i?"settings.saving":"settings.save")})]})}const Qw=["default","cowork"],Pw={default:"settings.general.style_default",cowork:"settings.general.style_cowork"};function Zw(){const{t:n}=St(),i=Hl(r=>r.stylePreset),s=Hl(r=>r.setStylePreset);return c.jsx(Pe,{label:n("settings.general.style_preset_label"),description:n("settings.general.style_preset_desc"),children:c.jsx("div",{className:"flex items-center gap-[var(--spacing-1)]",children:Qw.map(r=>c.jsx("button",{type:"button",onClick:()=>s(r),className:me("px-3 py-1 rounded-[var(--radius-sm)] text-[length:var(--font-size-xs)] font-[var(--font-weight-medium)] transition-all duration-[var(--duration-fast)]","focus-visible:outline-none focus-visible:shadow-[var(--shadow-focus-ring)]",i===r?"bg-accent-blue text-white":"text-text-secondary hover:text-text-primary hover:bg-bg-hover"),children:n(Pw[r])},r))})})}function Jw(){const{t:n}=St(),i=Vt(C=>C.connected),s=pe(C=>{var A;return(A=C.draft)==null?void 0:A.general}),r=pe(C=>C.saving),d=pe(C=>C.isDirty("general")),f=pe(C=>C.updateDraft),p=pe(C=>C.saveConfig),h=pe(C=>C.discardDraft),x=pe(C=>{var A;return((A=C.draft)==null?void 0:A.searchTool)??"mcp__ace-tool__search_context"}),g=pe(C=>C.isDirty("searchTool")),S=pe(C=>C.chineseResponse),b=pe(C=>C.loadChineseResponse),E=pe(C=>C.toggleChineseResponse);if(v.useEffect(()=>{b()},[b]),!s)return null;const w=C=>{f("general",{...s,...C})};return c.jsxs("div",{className:"flex flex-col gap-[var(--spacing-4)]",children:[c.jsx(rt,{title:n("settings.general.connection_card"),description:n("settings.general.connection_desc"),children:c.jsxs("div",{className:"flex items-center gap-[var(--spacing-2)]",children:[c.jsx("span",{className:`w-2.5 h-2.5 rounded-full ${i?"bg-status-completed":"bg-status-blocked"}`}),c.jsx("span",{className:"text-[length:var(--font-size-sm)] text-text-primary",children:n(i?"settings.general.connected":"settings.general.disconnected")})]})}),c.jsxs(rt,{title:n("settings.general.appearance_card"),description:n("settings.general.appearance_desc"),children:[c.jsx(Pe,{label:n("settings.general.theme_label"),description:n("settings.general.theme_desc"),htmlFor:"settings-theme",children:c.jsx(Kn,{id:"settings-theme",value:s.theme,onChange:C=>w({theme:C}),options:[{value:"system",label:n("settings.general.theme_system")},{value:"dark",label:n("settings.general.theme_dark")},{value:"light",label:n("settings.general.theme_light")}]})}),c.jsx(Pe,{label:n("settings.general.language_label"),description:n("settings.general.language_desc"),htmlFor:"settings-language",children:c.jsx(Kn,{id:"settings-language",value:s.language,onChange:C=>w({language:C}),options:[{value:"en",label:"English"},{value:"zh-CN",label:"中文"}]})}),c.jsx(Zw,{})]}),c.jsx(rt,{title:"Navigation",description:"Show or hide navigation items from the sidebar.",children:c.jsx($w,{draft:s,update:w})}),c.jsxs(rt,{title:n("settings.general.search_tool_card"),description:n("settings.general.search_tool_desc"),children:[c.jsx(Pe,{label:n("settings.general.search_tool_label"),description:n("settings.general.search_tool_desc"),htmlFor:"settings-search-tool",children:c.jsx(gn,{id:"settings-search-tool",value:x,onChange:C=>f("searchTool",C),placeholder:"mcp__ace-tool__search_context",className:"w-72 font-mono text-[length:var(--font-size-xs)]"})}),c.jsx(Vn,{dirty:g,saving:r,onSave:()=>void p("searchTool"),onDiscard:()=>h("searchTool")})]}),S&&c.jsxs(rt,{title:n("settings.general.response_lang_card"),description:n("settings.general.response_lang_desc"),children:[c.jsx(Pe,{label:n("settings.general.chinese_claude_label"),description:n("settings.general.chinese_claude_desc"),children:c.jsxs("div",{className:"flex items-center gap-[var(--spacing-2)]",children:[c.jsx("span",{className:"text-[length:var(--font-size-xs)] font-[var(--font-weight-medium)] text-accent-blue bg-accent-blue/10 px-[var(--spacing-1-5)] py-0.5 rounded-[var(--radius-sm)]",children:"Claude"}),c.jsx(In,{enabled:S.claudeEnabled,onClick:()=>void E(!S.claudeEnabled,"claude")})]})}),c.jsx(Pe,{label:n("settings.general.chinese_codex_label"),description:n("settings.general.chinese_codex_desc"),children:c.jsxs("div",{className:"flex items-center gap-[var(--spacing-2)]",children:[c.jsx("span",{className:"text-[length:var(--font-size-xs)] font-[var(--font-weight-medium)] text-green-400 bg-green-400/10 px-[var(--spacing-1-5)] py-0.5 rounded-[var(--radius-sm)]",children:"Codex"}),c.jsx(In,{enabled:S.codexEnabled,onClick:()=>void E(!S.codexEnabled,"codex")})]})}),S.codexNeedsMigration&&c.jsx("div",{className:"mt-[var(--spacing-2)] px-[var(--spacing-3)] py-[var(--spacing-2)] rounded-[var(--radius-sm)] bg-status-blocked/10 border border-status-blocked/30",children:c.jsx("p",{className:"text-[length:var(--font-size-xs)] text-status-blocked",children:n("settings.general.codex_migrate_hint")})}),!S.guidelinesExists&&c.jsx("div",{className:"mt-[var(--spacing-2)] px-[var(--spacing-3)] py-[var(--spacing-2)] rounded-[var(--radius-sm)] bg-status-blocked/10 border border-status-blocked/30",children:c.jsx("p",{className:"text-[length:var(--font-size-xs)] text-status-blocked",children:n("settings.general.guidelines_missing")})})]}),c.jsx(Vn,{dirty:d,saving:r,onSave:()=>void p("general"),onDiscard:()=>h("general")})]})}const Fw=[{path:"/maestro-coordinate",label:"Dispatch Center"},{path:"/requirement",label:"Requirement"},{path:"/rooms",label:"Meeting Room"}];function $w({draft:n,update:i}){const s=n.hiddenNavItems??["/maestro-coordinate","/requirement","/rooms"],r=d=>{const f=s.includes(d)?s.filter(p=>p!==d):[...s,d];i({hiddenNavItems:f})};return c.jsx("div",{className:"flex flex-col gap-2",children:Fw.map(d=>{const f=!s.includes(d.path);return c.jsxs("div",{className:"flex items-center justify-between",children:[c.jsx("span",{className:"text-[length:var(--font-size-sm)] text-text-primary",children:d.label}),c.jsx(In,{enabled:f,onClick:()=>r(d.path)})]},d.path)})})}const Ww={"claude-code":{apiKeyLabel:"API Key",apiKeyPlaceholder:"sk-ant-...",apiKeyEnvHint:"ANTHROPIC_API_KEY",showBaseUrl:!0,baseUrlPlaceholder:"https://api.anthropic.com",showSettingsFile:!0,settingsFileDescription:"Path to Claude Code settings JSON (maps model aliases, sets env vars)"},"agent-sdk":{apiKeyLabel:"API Key",apiKeyPlaceholder:"sk-ant-...",apiKeyEnvHint:"ANTHROPIC_API_KEY",showBaseUrl:!0,baseUrlPlaceholder:"https://api.anthropic.com",showSettingsFile:!0,settingsFileDescription:"Path to Claude Code settings JSON (maps model aliases, sets env vars)"},codex:{apiKeyLabel:"OpenAI API Key",apiKeyPlaceholder:"sk-...",apiKeyEnvHint:"OPENAI_API_KEY",showBaseUrl:!1,showSettingsFile:!0,settingsFileLabel:"Profile",settingsFilePlaceholder:"my-profile",settingsFileDescription:"Profile name from ~/.codex/config.toml (passed as --profile)"},"codex-server":{apiKeyLabel:"OpenAI API Key",apiKeyPlaceholder:"sk-...",apiKeyEnvHint:"OPENAI_API_KEY",showBaseUrl:!1,showSettingsFile:!0,settingsFileLabel:"Profile",settingsFilePlaceholder:"my-profile",settingsFileDescription:"Profile name from ~/.codex/config.toml"},gemini:{apiKeyLabel:"Gemini API Key",apiKeyPlaceholder:"AIza...",apiKeyEnvHint:"GEMINI_API_KEY",showBaseUrl:!1,showSettingsFile:!1},"gemini-a2a":{apiKeyLabel:"Gemini API Key",apiKeyPlaceholder:"AIza...",apiKeyEnvHint:"GEMINI_API_KEY",showBaseUrl:!1,showSettingsFile:!1},qwen:{apiKeyLabel:"DashScope API Key",apiKeyPlaceholder:"sk-...",apiKeyEnvHint:"DASHSCOPE_API_KEY",showBaseUrl:!1,showSettingsFile:!1},opencode:{apiKeyLabel:"API Key",apiKeyPlaceholder:"",apiKeyEnvHint:"OPENAI_API_KEY",showBaseUrl:!1,showSettingsFile:!1}},ej=[{type:"claude-code",label:"Claude Code"},{type:"agent-sdk",label:"Agent SDK"},{type:"codex",label:"Codex"},{type:"gemini",label:"Gemini"},{type:"gemini-a2a",label:"Gemini (A2A)"},{type:"qwen",label:"Qwen"},{type:"opencode",label:"OpenCode"}];function tj(){const{t:n}=St(),i=pe(E=>{var w;return(w=E.draft)==null?void 0:w.agents}),s=pe(E=>E.saving),r=pe(E=>E.isDirty("agents")),d=pe(E=>E.updateDraft),f=pe(E=>E.saveConfig),p=pe(E=>E.discardDraft),[h,x]=v.useState(null),g=E=>n({"claude-code":"settings.agents.claude_code_desc","agent-sdk":"settings.agents.agent_sdk_desc",codex:"settings.agents.codex_desc",gemini:"settings.agents.gemini_desc","gemini-a2a":"settings.agents.gemini_desc",qwen:"settings.agents.qwen_desc",opencode:"settings.agents.opencode_desc"}[E]??"settings.agents.claude_code_desc");if(!i)return null;const S=(E,w)=>{d("agents",{...i,[E]:{...i[E],...w}})},b=E=>{x(w=>w===E?null:E)};return c.jsxs("div",{className:"flex flex-col gap-[var(--spacing-3)]",children:[ej.map(({type:E,label:w})=>{const C=i[E],A=h===E,O=Ww[E];return c.jsxs(rt,{title:w,description:g(E),children:[c.jsx("button",{type:"button",onClick:()=>b(E),className:me("w-full text-left text-[length:var(--font-size-xs)] font-[var(--font-weight-medium)]","text-accent-blue hover:underline","focus-visible:outline-none focus-visible:shadow-[var(--shadow-focus-ring)] rounded-[var(--radius-sm)]"),children:n(A?"settings.agents.hide_config":"settings.agents.show_config")}),A&&c.jsxs("div",{className:"mt-[var(--spacing-3)] border-t border-border-divider pt-[var(--spacing-3)]",children:[c.jsx(Pe,{label:n("settings.agents.model_label"),description:n("settings.agents.model_desc"),htmlFor:`agent-model-${E}`,children:c.jsx(gn,{id:`agent-model-${E}`,value:C.model,onChange:T=>S(E,{model:T}),placeholder:n("settings.agents.model_placeholder")})}),c.jsx(Pe,{label:n("settings.agents.approval_label"),description:n("settings.agents.approval_desc"),htmlFor:`agent-approval-${E}`,children:c.jsx(Kn,{id:`agent-approval-${E}`,value:C.approvalMode,onChange:T=>S(E,{approvalMode:T}),options:[{value:"suggest",label:n("settings.agents.approval_suggest")},{value:"auto",label:n("settings.agents.approval_auto")}]})}),(O==null?void 0:O.showBaseUrl)&&c.jsx(Pe,{label:n("settings.agents.base_url_label"),description:n("settings.agents.base_url_desc"),htmlFor:`agent-baseurl-${E}`,children:c.jsx(gn,{id:`agent-baseurl-${E}`,value:C.baseUrl??"",onChange:T=>S(E,{baseUrl:T}),placeholder:O.baseUrlPlaceholder??""})}),O&&c.jsx(Pe,{label:O.apiKeyLabel,description:`Overrides ${O.apiKeyEnvHint} env var`,htmlFor:`agent-apikey-${E}`,children:c.jsx(gn,{id:`agent-apikey-${E}`,value:C.apiKey??"",onChange:T=>S(E,{apiKey:T}),placeholder:O.apiKeyPlaceholder,type:"password"})}),(O==null?void 0:O.showSettingsFile)&&c.jsx(Pe,{label:O.settingsFileLabel??n("settings.agents.settings_file_label"),description:O.settingsFileDescription??n("settings.agents.settings_file_desc"),htmlFor:`agent-settings-file-${E}`,children:c.jsx(gn,{id:`agent-settings-file-${E}`,value:C.settingsFile??"",onChange:T=>S(E,{settingsFile:T}),placeholder:O.settingsFilePlaceholder??"D:\\settings.json"})}),c.jsx(Pe,{label:n("settings.agents.env_file_label"),description:n("settings.agents.env_file_desc"),htmlFor:`agent-envfile-${E}`,children:c.jsx(gn,{id:`agent-envfile-${E}`,value:C.envFile??"",onChange:T=>S(E,{envFile:T}),placeholder:"~/.env.gemini"})})]})]},E)}),c.jsx(Vn,{dirty:r,saving:s,onSave:()=>void f("agents"),onDiscard:()=>p("agents")})]})}function aj(){const{t:n}=St(),i=pe(b=>{var E;return((E=b.draft)==null?void 0:E.cliTools)??"{}"}),s=pe(b=>b.saving),r=pe(b=>b.isDirty("cliTools")),d=pe(b=>b.updateDraft),f=pe(b=>b.saveConfig),p=pe(b=>b.discardDraft),[h,x]=v.useState(null),g=v.useCallback(b=>{d("cliTools",b);try{JSON.parse(b),x(null)}catch(E){x(E instanceof Error?E.message:"Invalid JSON")}},[d]),S=v.useCallback(()=>{try{const b=JSON.parse(i),E=JSON.stringify(b,null,2);d("cliTools",E),x(null)}catch{}},[i,d]);return c.jsxs("div",{className:"flex flex-col gap-[var(--spacing-4)]",children:[c.jsxs(rt,{title:n("settings.cli_tools.config_card"),description:n("settings.cli_tools.config_desc"),children:[c.jsxs("div",{className:"flex items-center justify-between mb-[var(--spacing-2)]",children:[c.jsx("span",{className:"text-[length:var(--font-size-xs)] text-text-tertiary",children:"~/.maestro/cli-tools.json"}),c.jsx("button",{type:"button",onClick:S,className:me("text-[length:var(--font-size-xs)] font-[var(--font-weight-medium)]","text-accent-blue hover:underline","focus-visible:outline-none focus-visible:shadow-[var(--shadow-focus-ring)] rounded-[var(--radius-sm)]"),children:n("settings.cli_tools.format_json")})]}),c.jsx("textarea",{value:i,onChange:b=>g(b.target.value),spellCheck:!1,className:me("w-full h-80 px-[var(--spacing-3)] py-[var(--spacing-2)] rounded-[var(--radius-sm)]","border bg-bg-primary text-text-primary text-[length:var(--font-size-sm)]","font-mono leading-relaxed resize-y","focus:outline-none focus:shadow-[var(--shadow-focus-ring)]","transition-colors duration-[var(--duration-fast)]",h?"border-status-blocked":"border-border focus:border-accent-blue")}),h&&c.jsx("p",{className:"mt-[var(--spacing-1)] text-[length:var(--font-size-xs)] text-status-blocked",children:h})]}),c.jsx(Vn,{dirty:r&&!h,saving:s,onSave:()=>void f("cliTools"),onDiscard:()=>{p("cliTools"),x(null)}})]})}function nj(){const{t:n}=St(),[i,s]=v.useState([]),[r,d]=v.useState(!0),[f,p]=v.useState(null);return v.useEffect(()=>{let h=!1;async function x(){try{const g=await fetch("/api/settings/specs");if(!g.ok)throw new Error(`Failed to load specs: ${g.status}`);const S=await g.json();h||(s(S.specs??[]),d(!1))}catch(g){h||(p(g instanceof Error?g.message:"Failed to load specs"),d(!1))}}return x(),()=>{h=!0}},[]),r?c.jsx("div",{className:"flex items-center justify-center py-[var(--spacing-8)]",children:c.jsx("span",{className:"text-[length:var(--font-size-sm)] text-text-secondary",children:n("settings.specs.loading")})}):f?c.jsx(rt,{title:n("settings.specs.error_card"),description:n("settings.specs.error_desc"),children:c.jsx("p",{className:"text-[length:var(--font-size-sm)] text-status-blocked",children:f})}):i.length===0?c.jsxs("div",{className:"flex flex-col gap-[var(--spacing-6)]",children:[c.jsx(rt,{title:n("settings.specs.empty_card"),description:n("settings.specs.empty_desc"),children:c.jsx("p",{className:"text-[length:var(--font-size-sm)] text-text-secondary italic",children:n("settings.specs.empty_hint")})}),c.jsx(eg,{})]}):c.jsxs("div",{className:"flex flex-col gap-[var(--spacing-6)]",children:[c.jsx("div",{className:"flex flex-col gap-[var(--spacing-3)]",children:i.map(h=>c.jsx(rt,{title:h.name,description:h.path,children:h.createdAt&&c.jsxs("span",{className:"text-[length:var(--font-size-xs)] text-text-tertiary",children:[n("settings.specs.created"),": ",h.createdAt]})},h.name))}),c.jsx(eg,{})]})}function Is({label:n,onRemove:i,variant:s="default"}){const r=s==="include"?"bg-status-active/15 text-status-active border-status-active/30":s==="exclude"?"bg-status-blocked/15 text-status-blocked border-status-blocked/30":"bg-bg-hover text-text-secondary border-border";return c.jsxs("span",{className:me("inline-flex items-center gap-[var(--spacing-1)] px-[var(--spacing-2)] py-[var(--spacing-0-5)]","rounded-[var(--radius-sm)] border text-[length:var(--font-size-xs)]",r),children:[n,c.jsx("button",{type:"button",onClick:i,className:"ml-[var(--spacing-0-5)] text-current opacity-60 hover:opacity-100 focus-visible:outline-none","aria-label":`Remove ${n}`,children:"x"})]})}function Ks({placeholder:n,onAdd:i}){const[s,r]=v.useState(""),d=f=>{f.key==="Enter"&&s.trim()&&(f.preventDefault(),i(s.trim()),r(""))};return c.jsx("input",{type:"text",value:s,onChange:f=>r(f.target.value),onKeyDown:d,placeholder:n,className:me("px-[var(--spacing-2)] py-[var(--spacing-1)] rounded-[var(--radius-sm)]","border border-border bg-bg-primary text-text-primary text-[length:var(--font-size-xs)]","focus:outline-none focus:border-accent-blue focus:shadow-[var(--shadow-focus-ring)]","transition-colors duration-[var(--duration-fast)]","placeholder:text-text-tertiary w-40")})}function Ys({title:n,description:i,expanded:s,onToggle:r,children:d}){return c.jsxs("div",{className:"border border-border rounded-[var(--radius-default)] overflow-hidden",children:[c.jsxs("button",{type:"button",onClick:r,className:me("w-full flex items-center justify-between px-[var(--spacing-4)] py-[var(--spacing-3)]","bg-bg-secondary hover:bg-bg-hover transition-colors duration-[var(--duration-fast)]","focus-visible:outline-none focus-visible:shadow-[var(--shadow-focus-ring)]"),children:[c.jsxs("div",{className:"text-left",children:[c.jsx("span",{className:"text-[length:var(--font-size-sm)] font-[var(--font-weight-semibold)] text-text-primary",children:n}),i&&c.jsx("p",{className:"mt-[var(--spacing-0-5)] text-[length:var(--font-size-xs)] text-text-secondary",children:i})]}),c.jsx("span",{className:"text-[length:var(--font-size-xs)] text-text-tertiary shrink-0 ml-[var(--spacing-2)]",children:s?"[-]":"[+]"})]}),s&&c.jsx("div",{className:"px-[var(--spacing-4)] py-[var(--spacing-3)] border-t border-border bg-bg-primary",children:d})]})}const lj={coding:"bg-accent-blue/15 text-accent-blue border-accent-blue/30",arch:"bg-accent-purple/15 text-accent-purple border-accent-purple/30",debug:"bg-accent-orange/15 text-accent-orange border-accent-orange/30",test:"bg-accent-green/15 text-accent-green border-accent-green/30",review:"bg-accent-yellow/15 text-accent-yellow border-accent-yellow/30",learning:"bg-status-active/15 text-status-active border-status-active/30",ui:"bg-accent-purple/15 text-accent-purple border-accent-purple/30"};function Nv(n){return lj[n]??"bg-bg-hover text-text-secondary border-border"}function Ku({name:n}){return c.jsx("span",{className:me("inline-flex items-center px-[var(--spacing-1-5)] py-[var(--spacing-0-5)]","rounded-full border text-[length:var(--font-size-xs)]",Nv(n)),children:n})}function Ti({paths:n,onChange:i,placeholder:s,suggestions:r}){const[d,f]=v.useState(""),[p,h]=v.useState(!1),x=b=>b.trim()?/^[.\/~]|^\w/.test(b)&&!b.includes(" ")||b.includes("/")||b.includes("."):!1,g=b=>{const E=b.trim();E&&!n.includes(E)&&i([...n,E]),f(""),h(!1)},S=(r??[]).filter(b=>!n.includes(b)&&(!d||b.toLowerCase().includes(d.toLowerCase())));return c.jsxs("div",{className:"flex flex-col gap-[var(--spacing-1-5)]",children:[n.map((b,E)=>c.jsxs("div",{className:"flex items-center gap-[var(--spacing-2)]",children:[c.jsx("span",{className:"text-[length:var(--font-size-xs)] text-text-secondary font-mono truncate flex-1 min-w-0",children:b}),c.jsx("span",{className:me("text-[length:var(--font-size-xs)] shrink-0",x(b)?"text-accent-green":"text-accent-orange"),children:x(b)?"[ok]":"[?]"}),c.jsx("button",{type:"button",onClick:()=>i(n.filter((w,C)=>C!==E)),className:"text-[length:var(--font-size-xs)] text-status-blocked opacity-60 hover:opacity-100 shrink-0 focus-visible:outline-none","aria-label":`Remove ${b}`,children:"x"})]},`${b}-${E}`)),c.jsxs("div",{className:"relative",children:[c.jsxs("div",{className:"flex items-center gap-[var(--spacing-1)]",children:[c.jsx("input",{type:"text",value:d,onChange:b=>{f(b.target.value),h(!0)},onFocus:()=>h(!0),onBlur:()=>{setTimeout(()=>h(!1),200)},onKeyDown:b=>{b.key==="Enter"&&d.trim()&&(b.preventDefault(),g(d))},placeholder:s,className:me("px-[var(--spacing-2)] py-[var(--spacing-1)] rounded-[var(--radius-sm)]","border border-border bg-bg-primary text-text-primary text-[length:var(--font-size-xs)]","focus:outline-none focus:border-accent-blue focus:shadow-[var(--shadow-focus-ring)]","transition-colors duration-[var(--duration-fast)]","placeholder:text-text-tertiary w-56")}),d&&c.jsx("span",{className:me("text-[length:var(--font-size-xs)] shrink-0",x(d)?"text-accent-green":"text-accent-orange"),children:x(d)?"[ok]":"[?]"})]}),p&&S.length>0&&c.jsx("div",{className:me("absolute top-full left-0 mt-[var(--spacing-0-5)] z-10","border border-border rounded-[var(--radius-sm)] bg-bg-secondary shadow-lg","max-h-32 overflow-y-auto w-56"),children:S.map(b=>c.jsx("button",{type:"button",onMouseDown:E=>E.preventDefault(),onClick:()=>g(b),className:me("w-full text-left px-[var(--spacing-2)] py-[var(--spacing-1)]","text-[length:var(--font-size-xs)] text-text-secondary font-mono","hover:bg-bg-hover hover:text-text-primary","transition-colors duration-[var(--duration-fast)]"),children:b},b))})]})]})}function sj({config:n,defaults:i,onQuickBind:s}){const[r,d]=v.useState(""),[f,p]=v.useState(null),[h,x]=v.useState({}),g=v.useMemo(()=>{var C,A;const E=new Map,w=(O,T,X,Y)=>{E.has(O)||E.set(O,[]),E.get(O).push({agents:[T],type:X,source:Y})};for(const[O,T]of Object.entries(n.mapping??{})){for(const X of T.includeKeywords??[])w(X,O,"include","agent");for(const X of T.excludeKeywords??[])w(X,O,"exclude","agent")}for(const O of((C=n.keywordFilters)==null?void 0:C.include)??[])w(O,"(global)","include","global");for(const O of((A=n.keywordFilters)==null?void 0:A.exclude)??[])w(O,"(global)","exclude","global");return E},[n]),S=v.useMemo(()=>{const E=Array.from(g.keys()).sort();if(!r.trim())return E;const w=r.toLowerCase();return E.filter(C=>C.toLowerCase().includes(w))},[g,r]),b=Object.keys(i.agentCategoryMap);return c.jsxs("div",{className:"flex flex-col gap-[var(--spacing-3)]",children:[c.jsx("div",{children:c.jsx("input",{type:"text",value:r,onChange:E=>d(E.target.value),placeholder:"Filter or type a new keyword...",className:me("w-full px-[var(--spacing-2)] py-[var(--spacing-1)] rounded-[var(--radius-sm)]","border border-border bg-bg-primary text-text-primary text-[length:var(--font-size-xs)]","focus:outline-none focus:border-accent-blue focus:shadow-[var(--shadow-focus-ring)]","transition-colors duration-[var(--duration-fast)]","placeholder:text-text-tertiary")})}),S.length===0?c.jsx("p",{className:"text-[length:var(--font-size-xs)] text-text-tertiary italic",children:g.size===0?"No keywords configured yet. Add keywords to agent mappings or global filters below.":"No keywords match the filter."}):c.jsx("div",{className:"flex flex-wrap gap-[var(--spacing-1-5)]",children:S.map(E=>{const w=g.get(E)??[],C=w.some(Y=>Y.type==="include"),A=w.some(Y=>Y.type==="exclude"),O=f===E,T=A&&!C?"exclude":C?"include":"default",X=T==="include"?"bg-status-active/15 text-status-active border-status-active/30":T==="exclude"?"bg-status-blocked/15 text-status-blocked border-status-blocked/30":"bg-bg-hover text-text-secondary border-border";return c.jsxs("div",{className:"relative",children:[c.jsxs("button",{type:"button",onClick:()=>p(O?null:E),className:me("inline-flex items-center gap-[var(--spacing-1)] px-[var(--spacing-2)] py-[var(--spacing-0-5)]","rounded-[var(--radius-sm)] border text-[length:var(--font-size-xs)]","cursor-pointer transition-opacity duration-[var(--duration-fast)]","focus-visible:outline-none focus-visible:shadow-[var(--shadow-focus-ring)]",X,O&&"ring-1 ring-accent-blue"),children:[E,c.jsxs("span",{className:"text-[length:10px] opacity-60",children:["(",w.length,")"]})]}),O&&c.jsx("div",{className:me("absolute top-full left-0 mt-[var(--spacing-1)] z-20","border border-border rounded-[var(--radius-sm)] bg-bg-secondary shadow-lg","p-[var(--spacing-2)] min-w-48"),children:c.jsxs("div",{className:"flex flex-col gap-[var(--spacing-1-5)]",children:[c.jsx("span",{className:"text-[length:var(--font-size-xs)] font-[var(--font-weight-medium)] text-text-primary",children:"Referenced by:"}),w.map((Y,P)=>c.jsxs("div",{className:"flex items-center gap-[var(--spacing-1)] text-[length:var(--font-size-xs)]",children:[c.jsx("span",{className:me("px-[var(--spacing-1)] rounded-[2px]",Y.type==="include"?"bg-status-active/15 text-status-active":"bg-status-blocked/15 text-status-blocked"),children:Y.type}),c.jsx("span",{className:"text-text-secondary",children:Y.agents[0]})]},P)),c.jsxs("div",{className:"border-t border-border-divider pt-[var(--spacing-1-5)] mt-[var(--spacing-0-5)]",children:[c.jsx("span",{className:"text-[length:var(--font-size-xs)] font-[var(--font-weight-medium)] text-text-secondary block mb-[var(--spacing-1)]",children:"Quick Bind:"}),c.jsxs("div",{className:"flex items-center gap-[var(--spacing-1)]",children:[c.jsxs("select",{value:h[E]??"",onChange:Y=>x(P=>({...P,[E]:Y.target.value})),className:me("flex-1 px-[var(--spacing-1)] py-[var(--spacing-0-5)] rounded-[var(--radius-sm)]","border border-border bg-bg-primary text-text-primary text-[length:var(--font-size-xs)]","focus:outline-none focus:border-accent-blue"),children:[c.jsx("option",{value:"",disabled:!0,children:"Agent..."}),b.map(Y=>c.jsx("option",{value:Y,children:Y},Y))]}),c.jsx("button",{type:"button",disabled:!h[E],onClick:()=>{h[E]&&(s(E,h[E]),p(null),x(Y=>{const P={...Y};return delete P[E],P}))},className:me("px-[var(--spacing-1-5)] py-[var(--spacing-0-5)] rounded-[var(--radius-sm)]","text-[length:var(--font-size-xs)] font-[var(--font-weight-medium)]","bg-accent-blue text-white","hover:opacity-90 transition-opacity duration-[var(--duration-fast)]","disabled:opacity-40 disabled:pointer-events-none","focus-visible:outline-none"),children:"+Add"})]})]})]})})]},E)})})]})}function rj({agent:n,mapping:i,defaults:s,config:r,onClose:d}){var A,O,T,X,Y,P;const f=s.agentCategoryMap[n]??[],p=i.categories??f,h=[...((A=r.keywordFilters)==null?void 0:A.include)??[],...i.includeKeywords??[]],x=[...((O=r.keywordFilters)==null?void 0:O.exclude)??[],...i.excludeKeywords??[]],g=[];for(const Z of p){const te=s.categoryFileMap[Z];te&&g.push(te);const H=(T=r.categoryDocs)==null?void 0:T[Z];H!=null&&H.specFiles&&g.push(...H.specFiles),H!=null&&H.docs&&g.push(...H.docs)}const S=((X=r.always)==null?void 0:X.docs)??[],b=((Y=r.always)==null?void 0:Y.keywords)??[],E=((P=r.always)==null?void 0:P.categories)??[],w=i.extras??[],C=v.useRef(null);return v.useEffect(()=>{const Z=te=>{C.current&&!C.current.contains(te.target)&&d()};return document.addEventListener("mousedown",Z),()=>document.removeEventListener("mousedown",Z)},[d]),c.jsxs("div",{ref:C,className:me("absolute top-full right-0 mt-[var(--spacing-1)] z-20","border border-border rounded-[var(--radius-sm)] bg-bg-secondary shadow-lg","p-[var(--spacing-3)] min-w-64 max-w-80"),children:[c.jsxs("div",{className:"flex items-center justify-between mb-[var(--spacing-2)]",children:[c.jsxs("span",{className:"text-[length:var(--font-size-xs)] font-[var(--font-weight-semibold)] text-text-primary",children:["Effective Injection: ",n]}),c.jsx("button",{type:"button",onClick:d,className:"text-[length:var(--font-size-xs)] text-text-tertiary hover:text-text-primary focus-visible:outline-none",children:"[x]"})]}),c.jsxs("div",{className:"flex flex-col gap-[var(--spacing-2)] text-[length:var(--font-size-xs)]",children:[c.jsxs("div",{children:[c.jsx("span",{className:"font-[var(--font-weight-medium)] text-text-secondary block mb-[var(--spacing-0-5)]",children:"Categories:"}),c.jsx("div",{className:"flex flex-wrap gap-[var(--spacing-1)]",children:p.length>0?p.map(Z=>c.jsx(Ku,{name:Z},Z)):c.jsx("span",{className:"text-text-tertiary italic",children:"none"})})]}),c.jsxs("div",{children:[c.jsxs("span",{className:"font-[var(--font-weight-medium)] text-text-secondary block mb-[var(--spacing-0-5)]",children:["Spec Files (",g.length,"):"]}),g.length>0?c.jsx("div",{className:"flex flex-col gap-[var(--spacing-0-5)]",children:g.map((Z,te)=>c.jsx("span",{className:"text-text-secondary font-mono truncate",children:Z},`${Z}-${te}`))}):c.jsx("span",{className:"text-text-tertiary italic",children:"none"})]}),(h.length>0||x.length>0)&&c.jsxs("div",{children:[c.jsx("span",{className:"font-[var(--font-weight-medium)] text-text-secondary block mb-[var(--spacing-0-5)]",children:"Keyword Filters:"}),h.length>0&&c.jsx("div",{className:"flex flex-wrap gap-[var(--spacing-0-5)] mb-[var(--spacing-0-5)]",children:h.map((Z,te)=>c.jsxs("span",{className:"px-[var(--spacing-1)] rounded-[2px] bg-status-active/15 text-status-active",children:["+",Z]},`inc-${Z}-${te}`))}),x.length>0&&c.jsx("div",{className:"flex flex-wrap gap-[var(--spacing-0-5)]",children:x.map((Z,te)=>c.jsxs("span",{className:"px-[var(--spacing-1)] rounded-[2px] bg-status-blocked/15 text-status-blocked",children:["-",Z]},`exc-${Z}-${te}`))})]}),(S.length>0||b.length>0||E.length>0)&&c.jsxs("div",{children:[c.jsx("span",{className:"font-[var(--font-weight-medium)] text-text-secondary block mb-[var(--spacing-0-5)]",children:"Always (session start):"}),c.jsxs("div",{className:"flex flex-col gap-[var(--spacing-0-5)]",children:[S.map((Z,te)=>c.jsx("span",{className:"text-text-secondary font-mono truncate",children:Z},`doc-${Z}-${te}`)),b.map((Z,te)=>c.jsxs("span",{className:"text-accent-green text-[length:var(--font-size-xs)]",children:["kw:",Z]},`kw-${Z}-${te}`)),E.map((Z,te)=>c.jsxs("span",{className:"text-accent-purple text-[length:var(--font-size-xs)]",children:["cat:",Z]},`cat-${Z}-${te}`))]})]}),w.length>0&&c.jsxs("div",{children:[c.jsxs("span",{className:"font-[var(--font-weight-medium)] text-text-secondary block mb-[var(--spacing-0-5)]",children:["Extra Docs (",w.length,"):"]}),c.jsx("div",{className:"flex flex-col gap-[var(--spacing-0-5)]",children:w.map((Z,te)=>c.jsx("span",{className:"text-text-secondary font-mono truncate",children:Z},`${Z}-${te}`))})]})]})]})}const Au=[".workflow/docs/",".workflow/knowhow/","docs/",".workflow/specs/",".maestro/specs/",".maestro/knowhow/"];function eg(){var $,N,I,ee;St();const[n,i]=v.useState({}),[s,r]=v.useState(null),[d,f]=v.useState("{}"),[p,h]=v.useState(!0),[x,g]=v.useState(null),[S,b]=v.useState(!1),[E,w]=v.useState({}),[C,A]=v.useState({}),[O,T]=v.useState(!1),[X,Y]=v.useState(!1),[P,Z]=v.useState(null),te=JSON.stringify(n)!==d;v.useEffect(()=>{let D=!1;async function B(){try{const q=await fetch("/api/settings/spec-injection");if(!q.ok)throw new Error(`Failed to load spec injection config: ${q.status}`);const ae=await q.json();D||(i(ae.config??{}),f(JSON.stringify(ae.config??{})),r(ae.defaults),h(!1))}catch(q){D||(g(q instanceof Error?q.message:"Failed to load config"),h(!1))}}return B(),()=>{D=!0}},[]);const H=v.useCallback(async()=>{b(!0);try{const D=await fetch("/api/settings/spec-injection",{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(n)});if(!D.ok)throw new Error(`Save failed: ${D.status}`);f(JSON.stringify(n))}catch(D){g(D instanceof Error?D.message:"Save failed")}finally{b(!1)}},[n]),Q=v.useCallback(()=>{i(JSON.parse(d)),g(null)},[d]),fe=D=>{w(B=>({...B,[D]:!B[D]}))},He=D=>{A(B=>({...B,[D]:!B[D]}))},Ae=(D,B)=>{i(q=>{var ae;return{...q,mapping:{...q.mapping,[D]:{...(ae=q.mapping)==null?void 0:ae[D],...B}}}})},ze=D=>{i(B=>{const q={...B.mapping};return delete q[D],{...B,mapping:Object.keys(q).length>0?q:void 0}})},F=(D,B)=>{i(q=>{var ae;return{...q,categoryDocs:{...q.categoryDocs,[D]:{...(ae=q.categoryDocs)==null?void 0:ae[D],...B}}}})},Te=D=>{i(B=>{const q={...B.categoryDocs};return delete q[D],{...B,categoryDocs:Object.keys(q).length>0?q:void 0}})},qe=v.useCallback((D,B)=>{i(q=>{var Ie;const ae=((Ie=q.mapping)==null?void 0:Ie[B])??{},Se=ae.includeKeywords??[];if(Se.includes(D))return q;const oe=(s==null?void 0:s.agentCategoryMap[B])??[];return{...q,mapping:{...q.mapping,[B]:{...ae,categories:ae.categories??[...oe],includeKeywords:[...Se,D]}}}})},[s]);if(p)return c.jsx("div",{className:"flex items-center justify-center py-[var(--spacing-4)]",children:c.jsx("span",{className:"text-[length:var(--font-size-sm)] text-text-secondary",children:"Loading injection config..."})});if(!s)return null;const L=Object.keys(n.mapping??{}),J=Object.keys(s.agentCategoryMap).filter(D=>!L.includes(D)),ie=Object.keys(n.categoryDocs??{}),be=s.validCategories.filter(D=>!ie.includes(D));return c.jsxs("div",{className:"flex flex-col gap-[var(--spacing-3)]",children:[c.jsxs("div",{className:"mb-[var(--spacing-1)]",children:[c.jsx("h3",{className:"text-[length:var(--font-size-sm)] font-[var(--font-weight-semibold)] text-text-primary",children:"Spec Injection Config"}),c.jsx("p",{className:"mt-[var(--spacing-0-5)] text-[length:var(--font-size-xs)] text-text-secondary",children:"Configure which specs and docs are injected into agent contexts"})]}),x&&c.jsx("p",{className:"text-[length:var(--font-size-xs)] text-status-blocked px-[var(--spacing-1)]",children:x}),c.jsx(Ys,{title:"Keyword Browser",description:"Discover and manage keywords referenced across agent mappings and global filters",expanded:!!E["keywords-browser"],onToggle:()=>fe("keywords-browser"),children:c.jsx(sj,{config:n,defaults:s,onQuickBind:qe})}),c.jsxs(Ys,{title:"Agent Mappings",description:"Per-agent category overrides, keyword filters, and extra docs",expanded:!!E.agents,onToggle:()=>fe("agents"),children:[L.length===0&&c.jsx("p",{className:"text-[length:var(--font-size-xs)] text-text-tertiary italic mb-[var(--spacing-2)]",children:"No custom agent mappings. Defaults are used for all agents."}),c.jsx("div",{className:"flex flex-col gap-[var(--spacing-2)]",children:L.map(D=>{const B=n.mapping[D],q=s.agentCategoryMap[D]??[],ae=!!C[D],Se=B.categories??q,oe=(B.includeKeywords??[]).length,Ie=(B.excludeKeywords??[]).length;return c.jsxs("div",{className:"border border-border-divider rounded-[var(--radius-sm)]",children:[c.jsxs("div",{className:"flex items-center justify-between px-[var(--spacing-3)] py-[var(--spacing-2)]",children:[c.jsxs("div",{className:"flex-1 min-w-0",children:[c.jsx("button",{type:"button",onClick:()=>He(D),className:"text-left text-[length:var(--font-size-sm)] font-[var(--font-weight-medium)] text-text-primary hover:text-accent-blue focus-visible:outline-none",children:D}),c.jsxs("div",{className:"flex flex-wrap items-center gap-[var(--spacing-1)] mt-[var(--spacing-0-5)]",children:[Se.map(je=>c.jsx(Ku,{name:je},je)),oe>0&&c.jsxs("span",{className:"text-[length:10px] px-[var(--spacing-1)] rounded-[2px] bg-status-active/15 text-status-active",children:["+",oe," kw"]}),Ie>0&&c.jsxs("span",{className:"text-[length:10px] px-[var(--spacing-1)] rounded-[2px] bg-status-blocked/15 text-status-blocked",children:["-",Ie," kw"]}),(B.extras??[]).length>0&&c.jsxs("span",{className:"text-[length:10px] px-[var(--spacing-1)] rounded-[2px] bg-bg-hover text-text-tertiary",children:[(B.extras??[]).length," docs"]})]})]}),c.jsxs("div",{className:"flex items-center gap-[var(--spacing-2)] shrink-0 relative",children:[c.jsx("button",{type:"button",onClick:()=>Z(P===D?null:D),className:me("text-[length:var(--font-size-xs)] font-[var(--font-weight-medium)]","text-accent-purple hover:text-accent-purple/80 focus-visible:outline-none"),children:"test"}),c.jsx("span",{className:"text-[length:var(--font-size-xs)] text-text-tertiary",children:ae?"[-]":"[+]"}),c.jsx("button",{type:"button",onClick:()=>ze(D),className:"text-[length:var(--font-size-xs)] text-status-blocked opacity-60 hover:opacity-100 focus-visible:outline-none","aria-label":`Remove ${D}`,children:"remove"}),P===D&&c.jsx(rj,{agent:D,mapping:B,defaults:s,config:n,onClose:()=>Z(null)})]})]}),ae&&c.jsxs("div",{className:"px-[var(--spacing-3)] pb-[var(--spacing-3)] border-t border-border-divider pt-[var(--spacing-2)] flex flex-col gap-[var(--spacing-3)]",children:[c.jsxs("div",{children:[c.jsxs("span",{className:"text-[length:var(--font-size-xs)] font-[var(--font-weight-medium)] text-text-secondary block mb-[var(--spacing-1)]",children:["Categories",c.jsxs("span",{className:"font-normal text-text-tertiary ml-[var(--spacing-1)]",children:["(default: ",q.join(", ")||"none",")"]})]}),c.jsx("div",{className:"flex flex-wrap gap-[var(--spacing-1-5)]",children:s.validCategories.map(je=>{const Qe=(B.categories??q).includes(je);return c.jsxs("label",{className:me("flex items-center gap-[var(--spacing-1)] text-[length:var(--font-size-xs)] cursor-pointer","px-[var(--spacing-1-5)] py-[var(--spacing-0-5)] rounded-[var(--radius-sm)]","border transition-colors duration-[var(--duration-fast)]",Qe?Nv(je):"border-transparent text-text-tertiary hover:text-text-secondary"),children:[c.jsx("input",{type:"checkbox",checked:Qe,onChange:()=>{const it=B.categories??[...q],$e=Qe?it.filter(Sn=>Sn!==je):[...it,je];Ae(D,{categories:$e})},className:"accent-accent-blue"}),je]},je)})})]}),c.jsxs("div",{children:[c.jsx("span",{className:"text-[length:var(--font-size-xs)] font-[var(--font-weight-medium)] text-text-secondary block mb-[var(--spacing-1)]",children:"Include Keywords"}),c.jsxs("div",{className:"flex flex-wrap items-center gap-[var(--spacing-1)]",children:[(B.includeKeywords??[]).map((je,Qe)=>c.jsx(Is,{label:je,variant:"include",onRemove:()=>Ae(D,{includeKeywords:B.includeKeywords.filter((it,$e)=>$e!==Qe)})},`${je}-${Qe}`)),c.jsx(Ks,{placeholder:"Add keyword...",onAdd:je=>Ae(D,{includeKeywords:[...B.includeKeywords??[],je]})})]})]}),c.jsxs("div",{children:[c.jsx("span",{className:"text-[length:var(--font-size-xs)] font-[var(--font-weight-medium)] text-text-secondary block mb-[var(--spacing-1)]",children:"Exclude Keywords"}),c.jsxs("div",{className:"flex flex-wrap items-center gap-[var(--spacing-1)]",children:[(B.excludeKeywords??[]).map((je,Qe)=>c.jsx(Is,{label:je,variant:"exclude",onRemove:()=>Ae(D,{excludeKeywords:B.excludeKeywords.filter((it,$e)=>$e!==Qe)})},`${je}-${Qe}`)),c.jsx(Ks,{placeholder:"Add keyword...",onAdd:je=>Ae(D,{excludeKeywords:[...B.excludeKeywords??[],je]})})]})]}),c.jsxs("div",{children:[c.jsx("span",{className:"text-[length:var(--font-size-xs)] font-[var(--font-weight-medium)] text-text-secondary block mb-[var(--spacing-1)]",children:"Extra Docs"}),c.jsx(Ti,{paths:B.extras??[],onChange:je=>Ae(D,{extras:je}),placeholder:"Add path (e.g. .workflow/docs/...)",suggestions:Au})]})]})]},D)})}),J.length>0&&c.jsx("div",{className:"mt-[var(--spacing-2)]",children:O?c.jsxs("div",{className:"flex items-center gap-[var(--spacing-2)]",children:[c.jsxs("select",{className:me("px-[var(--spacing-2)] py-[var(--spacing-1)] rounded-[var(--radius-sm)]","border border-border bg-bg-primary text-text-primary text-[length:var(--font-size-xs)]","focus:outline-none focus:border-accent-blue"),defaultValue:"",onChange:D=>{if(D.target.value){const B=D.target.value,q=s.agentCategoryMap[B]??[];Ae(B,{categories:[...q]}),T(!1),A(ae=>({...ae,[B]:!0}))}},children:[c.jsx("option",{value:"",disabled:!0,children:"Select agent type..."}),J.map(D=>c.jsx("option",{value:D,children:D},D))]}),c.jsx("button",{type:"button",onClick:()=>T(!1),className:"text-[length:var(--font-size-xs)] text-text-tertiary hover:text-text-secondary focus-visible:outline-none",children:"cancel"})]}):c.jsx("button",{type:"button",onClick:()=>T(!0),className:me("text-[length:var(--font-size-xs)] font-[var(--font-weight-medium)]","text-accent-blue hover:underline","focus-visible:outline-none focus-visible:shadow-[var(--shadow-focus-ring)] rounded-[var(--radius-sm)]"),children:"+ Customize Agent"})})]}),c.jsxs(Ys,{title:"Category Documents",description:"Extra spec files and docs injected per category",expanded:!!E.categories,onToggle:()=>fe("categories"),children:[ie.length===0&&c.jsx("p",{className:"text-[length:var(--font-size-xs)] text-text-tertiary italic mb-[var(--spacing-2)]",children:"No custom category documents configured."}),c.jsx("div",{className:"flex flex-col gap-[var(--spacing-3)]",children:ie.map(D=>{const B=n.categoryDocs[D],q=s.categoryFileMap[D];return c.jsxs("div",{className:"border border-border-divider rounded-[var(--radius-sm)] p-[var(--spacing-3)]",children:[c.jsxs("div",{className:"flex items-center justify-between mb-[var(--spacing-2)]",children:[c.jsxs("div",{className:"flex items-center gap-[var(--spacing-2)]",children:[c.jsx(Ku,{name:D}),c.jsx("span",{className:"text-[length:var(--font-size-sm)] font-[var(--font-weight-medium)] text-text-primary",children:D})]}),c.jsx("button",{type:"button",onClick:()=>Te(D),className:"text-[length:var(--font-size-xs)] text-status-blocked opacity-60 hover:opacity-100 focus-visible:outline-none","aria-label":`Remove ${D}`,children:"remove"})]}),q&&c.jsxs("p",{className:"text-[length:var(--font-size-xs)] text-text-tertiary mb-[var(--spacing-2)]",children:["Default spec: ",q]}),c.jsxs("div",{className:"flex flex-col gap-[var(--spacing-2)]",children:[c.jsxs("div",{children:[c.jsx("span",{className:"text-[length:var(--font-size-xs)] font-[var(--font-weight-medium)] text-text-secondary block mb-[var(--spacing-1)]",children:"Extra Spec Files"}),c.jsx(Ti,{paths:B.specFiles??[],onChange:ae=>F(D,{specFiles:ae}),placeholder:"Add spec file...",suggestions:[".workflow/specs/",".maestro/specs/"]})]}),c.jsxs("div",{children:[c.jsx("span",{className:"text-[length:var(--font-size-xs)] font-[var(--font-weight-medium)] text-text-secondary block mb-[var(--spacing-1)]",children:"Extra Docs"}),c.jsx(Ti,{paths:B.docs??[],onChange:ae=>F(D,{docs:ae}),placeholder:"Add doc path...",suggestions:Au})]})]})]},D)})}),be.length>0&&c.jsx("div",{className:"mt-[var(--spacing-2)]",children:X?c.jsxs("div",{className:"flex items-center gap-[var(--spacing-2)]",children:[c.jsxs("select",{className:me("px-[var(--spacing-2)] py-[var(--spacing-1)] rounded-[var(--radius-sm)]","border border-border bg-bg-primary text-text-primary text-[length:var(--font-size-xs)]","focus:outline-none focus:border-accent-blue"),defaultValue:"",onChange:D=>{D.target.value&&(F(D.target.value,{specFiles:[],docs:[]}),Y(!1))},children:[c.jsx("option",{value:"",disabled:!0,children:"Select category..."}),be.map(D=>c.jsx("option",{value:D,children:D},D))]}),c.jsx("button",{type:"button",onClick:()=>Y(!1),className:"text-[length:var(--font-size-xs)] text-text-tertiary hover:text-text-secondary focus-visible:outline-none",children:"cancel"})]}):c.jsx("button",{type:"button",onClick:()=>Y(!0),className:me("text-[length:var(--font-size-xs)] font-[var(--font-weight-medium)]","text-accent-blue hover:underline","focus-visible:outline-none focus-visible:shadow-[var(--shadow-focus-ring)] rounded-[var(--radius-sm)]"),children:"+ Add Category"})})]}),c.jsx(Ys,{title:"Always Inject (Session Start)",description:"Documents, keywords, and categories always injected at session start",expanded:!!E.always,onToggle:()=>fe("always"),children:c.jsxs("div",{className:"flex flex-col gap-[var(--spacing-4)]",children:[c.jsxs("div",{children:[c.jsx("p",{className:"text-[length:var(--font-size-xs)] font-[var(--font-weight-semibold)] text-text-secondary mb-[var(--spacing-1)]",children:"Documents"}),c.jsx(Ti,{paths:(($=n.always)==null?void 0:$.docs)??[],onChange:D=>{var q,ae;const B={...n.always,docs:D.length>0?D:void 0};!B.docs&&!((q=B.keywords)!=null&&q.length)&&!((ae=B.categories)!=null&&ae.length)?i(Se=>({...Se,always:void 0})):i(Se=>({...Se,always:B}))},placeholder:"Add doc path...",suggestions:Au})]}),c.jsxs("div",{children:[c.jsx("p",{className:"text-[length:var(--font-size-xs)] font-[var(--font-weight-semibold)] text-text-secondary mb-[var(--spacing-1)]",children:"Keywords (always inject matching entries)"}),c.jsx("div",{className:"flex flex-wrap gap-[var(--spacing-1)] mb-[var(--spacing-1)]",children:(((N=n.always)==null?void 0:N.keywords)??[]).map(D=>c.jsx(Is,{label:D,variant:"include",onRemove:()=>{var ae,Se,oe;const B=(((ae=n.always)==null?void 0:ae.keywords)??[]).filter(Ie=>Ie!==D),q={...n.always,keywords:B.length>0?B:void 0};!((Se=q.docs)!=null&&Se.length)&&!q.keywords&&!((oe=q.categories)!=null&&oe.length)?i(Ie=>({...Ie,always:void 0})):i(Ie=>({...Ie,always:q}))}},D))}),c.jsx(Ks,{placeholder:"Add keyword...",onAdd:D=>{var q;const B=((q=n.always)==null?void 0:q.keywords)??[];B.includes(D)||i(ae=>({...ae,always:{...ae.always,keywords:[...B,D]}}))}})]}),c.jsxs("div",{children:[c.jsx("p",{className:"text-[length:var(--font-size-xs)] font-[var(--font-weight-semibold)] text-text-secondary mb-[var(--spacing-1)]",children:"Categories (always inject all entries from these)"}),c.jsx("div",{className:"flex flex-wrap gap-[var(--spacing-1)]",children:((s==null?void 0:s.validCategories)??[]).map(D=>{var q;const B=(((q=n.always)==null?void 0:q.categories)??[]).includes(D);return c.jsx("button",{type:"button",onClick:()=>{var Ie,je,Qe;const ae=((Ie=n.always)==null?void 0:Ie.categories)??[],Se=B?ae.filter(it=>it!==D):[...ae,D],oe={...n.always,categories:Se.length>0?Se:void 0};!((je=oe.docs)!=null&&je.length)&&!((Qe=oe.keywords)!=null&&Qe.length)&&!oe.categories?i(it=>({...it,always:void 0})):i(it=>({...it,always:oe}))},className:`px-[var(--spacing-2)] py-[var(--spacing-0-5)] rounded-full text-[length:var(--font-size-xs)] font-[var(--font-weight-medium)] transition-all ${B?"bg-accent-purple/20 text-accent-purple border border-accent-purple/40":"bg-bg-secondary text-text-tertiary border border-border-default hover:text-text-secondary"}`,children:D},D)})})]})]})}),c.jsx(Ys,{title:"Global Keyword Filters",description:"Include or exclude spec entries by keyword across all agents",expanded:!!E.keywords,onToggle:()=>fe("keywords"),children:c.jsxs("div",{className:"flex flex-col gap-[var(--spacing-3)]",children:[c.jsxs("div",{children:[c.jsx("span",{className:"text-[length:var(--font-size-xs)] font-[var(--font-weight-medium)] text-text-secondary block mb-[var(--spacing-1)]",children:"Include Keywords"}),c.jsxs("div",{className:"flex flex-wrap items-center gap-[var(--spacing-1)]",children:[(((I=n.keywordFilters)==null?void 0:I.include)??[]).map((D,B)=>c.jsx(Is,{label:D,variant:"include",onRemove:()=>i(q=>{var ae;return{...q,keywordFilters:{...q.keywordFilters,include:(((ae=q.keywordFilters)==null?void 0:ae.include)??[]).filter((Se,oe)=>oe!==B)}}})},`${D}-${B}`)),c.jsx(Ks,{placeholder:"Add keyword...",onAdd:D=>i(B=>{var q;return{...B,keywordFilters:{...B.keywordFilters,include:[...((q=B.keywordFilters)==null?void 0:q.include)??[],D]}}})})]})]}),c.jsxs("div",{children:[c.jsx("span",{className:"text-[length:var(--font-size-xs)] font-[var(--font-weight-medium)] text-text-secondary block mb-[var(--spacing-1)]",children:"Exclude Keywords"}),c.jsxs("div",{className:"flex flex-wrap items-center gap-[var(--spacing-1)]",children:[(((ee=n.keywordFilters)==null?void 0:ee.exclude)??[]).map((D,B)=>c.jsx(Is,{label:D,variant:"exclude",onRemove:()=>i(q=>{var ae;return{...q,keywordFilters:{...q.keywordFilters,exclude:(((ae=q.keywordFilters)==null?void 0:ae.exclude)??[]).filter((Se,oe)=>oe!==B)}}})},`${D}-${B}`)),c.jsx(Ks,{placeholder:"Add keyword...",onAdd:D=>i(B=>{var q;return{...B,keywordFilters:{...B.keywordFilters,exclude:[...((q=B.keywordFilters)==null?void 0:q.exclude)??[],D]}}})})]})]}),c.jsxs("div",{className:"flex items-center gap-[var(--spacing-3)]",children:[c.jsx("span",{className:"text-[length:var(--font-size-xs)] font-[var(--font-weight-medium)] text-text-secondary",children:"Max Content Length"}),c.jsx("input",{type:"number",value:n.maxContentLength??"",onChange:D=>{const B=D.target.value?parseInt(D.target.value,10):void 0;i(q=>({...q,maxContentLength:B&&B>0?B:void 0}))},placeholder:"8000",className:me("w-24 px-[var(--spacing-2)] py-[var(--spacing-1)] rounded-[var(--radius-sm)]","border border-border bg-bg-primary text-text-primary text-[length:var(--font-size-xs)]","focus:outline-none focus:border-accent-blue focus:shadow-[var(--shadow-focus-ring)]","transition-colors duration-[var(--duration-fast)]")})]})]})}),c.jsx(Vn,{dirty:te,saving:S,onSave:()=>void H(),onDiscard:Q})]})}const Ai=_t((n,i)=>({configured:null,teams:[],selectedTeamId:null,board:null,selectedIssue:null,loading:!1,error:null,checkStatus:async()=>{try{const s=await fetch(gu.STATUS);if(!s.ok)throw new Error(`HTTP ${s.status}`);const r=await s.json();n({configured:r.configured})}catch(s){n({configured:!1,error:String(s)})}},fetchTeams:async()=>{n({loading:!0,error:null});try{const s=await fetch(gu.TEAMS);if(!s.ok)throw new Error(`HTTP ${s.status}`);const r=await s.json();if(n({teams:r,loading:!1}),r.length>0&&!i().selectedTeamId){const d=r[0].id;n({selectedTeamId:d}),i().fetchBoard(d)}}catch(s){n({loading:!1,error:String(s)})}},selectTeam:s=>{n({selectedTeamId:s,board:null,selectedIssue:null}),i().fetchBoard(s)},fetchBoard:async s=>{n({loading:!0,error:null});try{const r=await fetch(`${gu.BOARD}?teamId=${s}`);if(!r.ok){const f=await r.json().catch(()=>({error:`HTTP ${r.status}`}));throw new Error(f.error)}const d=await r.json();n({board:d,loading:!1})}catch(r){n({loading:!1,error:String(r)})}},selectIssue:s=>{n({selectedIssue:s})},refresh:async()=>{const s=i().selectedTeamId;s&&await i().fetchBoard(s)},importIssues:async s=>{const r=await fetch("/api/linear/import",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({issues:s})});if(!r.ok){const d=await r.json().catch(()=>({error:`HTTP ${r.status}`}));throw new Error(d.error)}return await r.json()},exportIssues:async(s,r)=>{const d=await fetch("/api/linear/export",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({issues:s,teamId:r})});if(!d.ok){const f=await d.json().catch(()=>({error:`HTTP ${d.status}`}));throw new Error(f.error)}return await d.json()}}));function ij(){const{t:n}=St(),i=pe(T=>{var X;return(X=T.draft)==null?void 0:X.linear}),s=pe(T=>T.saving),r=pe(T=>T.isDirty("linear")),d=pe(T=>T.updateDraft),f=pe(T=>T.saveConfig),p=pe(T=>T.discardDraft),h=Ai(T=>T.configured),x=Ai(T=>T.teams),g=Ai(T=>T.checkStatus),S=Ai(T=>T.fetchTeams),[b,E]=v.useState(!1),[w,C]=v.useState(null);if(!i)return null;const A=async()=>{E(!0),C(null);try{await g();const T=await fetch("/api/linear/teams");if(!T.ok){const Y=await T.json().catch(()=>({error:`HTTP ${T.status}`}));throw new Error(Y.error)}const X=await T.json();await S(),C({ok:!0,message:`Connected! Found ${X.length} team(s)`})}catch(T){C({ok:!1,message:String(T)})}finally{E(!1)}},O=async()=>{await f("linear"),await g(),i.apiKey&&await S()};return c.jsxs("div",{className:"flex flex-col gap-[var(--spacing-4)]",children:[c.jsxs(rt,{title:n("settings.linear.integration_card"),description:n("settings.linear.integration_desc"),children:[c.jsx(Pe,{label:n("settings.linear.api_key_label"),description:n("settings.linear.api_key_desc"),htmlFor:"settings-linear-api-key",children:c.jsx("input",{id:"settings-linear-api-key",type:"password",value:i.apiKey,onChange:T=>d("linear",{...i,apiKey:T.target.value}),placeholder:"lin_api_...",className:me("w-48 px-[var(--spacing-2)] py-[var(--spacing-1)] rounded-[var(--radius-sm)]","border border-border bg-bg-primary text-text-primary text-[length:var(--font-size-sm)]","focus:outline-none focus:border-accent-blue focus:shadow-[var(--shadow-focus-ring)]","transition-colors duration-[var(--duration-fast)]","placeholder:text-text-tertiary")})}),c.jsxs("div",{className:"flex items-center gap-[var(--spacing-2)] pt-[var(--spacing-2)]",children:[c.jsx("span",{className:`w-2.5 h-2.5 rounded-full ${h===!0?"bg-status-completed":h===!1?"bg-status-blocked":"bg-bg-hover"}`}),c.jsx("span",{className:"text-[length:var(--font-size-sm)] text-text-secondary",children:n(h===!0?"settings.linear.connected":h===!1?"settings.linear.not_configured":"settings.linear.checking")})]}),c.jsxs("div",{className:"flex items-center gap-[var(--spacing-2)] pt-[var(--spacing-2)]",children:[c.jsx("button",{type:"button",onClick:()=>void A(),disabled:b,className:me("px-[var(--spacing-3)] py-[var(--spacing-1-5)] rounded-[var(--radius-sm)]","text-[length:var(--font-size-sm)] font-[var(--font-weight-medium)]","border border-border text-text-secondary","hover:bg-bg-hover hover:text-text-primary","transition-colors duration-[var(--duration-fast)]","disabled:opacity-50 disabled:pointer-events-none"),children:n(b?"settings.linear.testing":"settings.linear.test_connection")}),w&&c.jsx("span",{className:me("text-[length:var(--font-size-xs)]",w.ok?"text-status-completed":"text-status-blocked"),children:w.message})]})]}),h&&x.length>0&&c.jsx(rt,{title:n("settings.linear.teams_card"),description:n("settings.linear.teams_desc"),children:c.jsx("div",{className:"flex flex-col gap-[var(--spacing-1)]",children:x.map(T=>c.jsxs("div",{className:"flex items-center gap-[var(--spacing-2)] py-[var(--spacing-1-5)] text-[length:var(--font-size-sm)]",children:[c.jsx("span",{className:"font-mono text-text-tertiary text-[length:var(--font-size-xs)]",children:T.key}),c.jsx("span",{className:"text-text-primary",children:T.name})]},T.id))})}),c.jsx(Vn,{dirty:r,saving:s,onSave:()=>void O(),onDiscard:()=>p("linear")})]})}function oj(){return c.jsxs("div",{className:"w-full h-full rounded-[6px] overflow-hidden flex flex-col",style:{backgroundColor:"#1D1B18",borderTop:"2px solid #C8863A"},children:[c.jsxs("div",{className:"px-2.5 py-2 flex-1",children:[c.jsx("div",{className:"h-[7px] rounded w-[72%] mb-2",style:{backgroundColor:"rgba(255,255,255,0.18)"}}),c.jsx("div",{className:"flex gap-1 mt-2 flex-wrap",children:["#C46555","#5B8DB8","#9178B5","#A09D97"].map(n=>c.jsx("div",{className:"h-[5px] rounded-full",style:{width:22,backgroundColor:`${n}55`}},n))})]}),c.jsxs("div",{className:"px-2.5 py-1.5 border-t flex items-center gap-1",style:{borderColor:"rgba(255,255,255,0.07)"},children:[c.jsx("div",{className:"h-[4px] rounded w-6",style:{backgroundColor:"rgba(255,255,255,0.15)"}}),c.jsx("div",{className:"h-[4px] rounded w-6 ml-1",style:{backgroundColor:"rgba(255,255,255,0.15)"}})]})]})}function cj(){return c.jsxs("div",{className:"w-full h-full rounded-[6px] overflow-hidden flex flex-col",style:{backgroundColor:"var(--color-bg-card)",border:"1px solid var(--color-border)"},children:[c.jsxs("div",{className:"flex items-center justify-between px-2 py-1.5 border-b",style:{borderColor:"var(--color-border-divider)"},children:[c.jsx("div",{className:"h-[5px] rounded w-14",style:{backgroundColor:"var(--color-text-primary)",opacity:.7}}),c.jsx("div",{className:"w-3 h-3 rounded-sm",style:{backgroundColor:"var(--color-bg-hover)"}})]}),c.jsxs("div",{className:"px-2 py-1.5 flex-1 space-y-1.5",children:[c.jsx("div",{className:"h-[3px] rounded w-6",style:{backgroundColor:"var(--color-text-tertiary)"}}),c.jsx("div",{className:"h-[6px] rounded border w-full",style:{borderColor:"var(--color-border)"}}),c.jsx("div",{className:"h-[3px] rounded w-8",style:{backgroundColor:"var(--color-text-tertiary)"}}),c.jsx("div",{className:"h-[12px] rounded border w-full",style:{borderColor:"var(--color-border)"}}),c.jsx("div",{className:"flex gap-1",children:["#C46555","#5B8DB8","#9178B5","#A09D97"].map(n=>c.jsx("div",{className:"h-[5px] rounded",style:{width:16,backgroundColor:`${n}25`}},n))})]}),c.jsxs("div",{className:"flex justify-end gap-1 px-2 py-1.5 border-t",style:{borderColor:"var(--color-border-divider)"},children:[c.jsx("div",{className:"h-[6px] rounded w-8",style:{backgroundColor:"var(--color-bg-secondary)",border:"1px solid var(--color-border)"}}),c.jsx("div",{className:"h-[6px] rounded w-10",style:{backgroundColor:"#C8863A"}})]})]})}function uj(){return c.jsx("div",{className:"w-full h-full rounded-[6px] overflow-hidden flex flex-col items-center justify-center px-3",style:{backgroundColor:"var(--color-bg-primary)"},children:c.jsxs("div",{className:"w-full",children:[c.jsx("div",{className:"h-[3px] rounded w-10 mb-2",style:{backgroundColor:"var(--color-text-tertiary)",opacity:.5}}),c.jsx("div",{className:"h-[10px] rounded w-[85%] mb-1.5",style:{backgroundColor:"var(--color-text-primary)",opacity:.55}}),c.jsx("div",{className:"h-[4px] rounded w-full mb-1",style:{backgroundColor:"var(--color-text-secondary)",opacity:.3}}),c.jsx("div",{className:"h-[4px] rounded w-[70%] mb-3",style:{backgroundColor:"var(--color-text-secondary)",opacity:.3}}),c.jsxs("div",{className:"flex gap-1 items-center pt-1.5 border-t",style:{borderColor:"var(--color-border-divider)"},children:[["#C46555","#5B8DB8","#9178B5"].map(n=>c.jsx("div",{className:"h-[4px] rounded-full",style:{width:18,backgroundColor:`${n}45`}},n)),c.jsx("div",{className:"ml-auto h-[5px] rounded w-8",style:{backgroundColor:"#C8863A",opacity:.7}})]})]})})}function dj(){return c.jsxs("div",{className:"w-full h-full rounded-[6px] overflow-hidden flex relative",style:{backgroundColor:"var(--color-bg-secondary)"},children:[c.jsx("div",{className:"flex-1",style:{backgroundColor:"rgba(0,0,0,0.12)"}}),c.jsxs("div",{className:"w-[45%] h-full flex flex-col",style:{backgroundColor:"var(--color-bg-card)",borderLeft:"1px solid var(--color-border)"},children:[c.jsxs("div",{className:"px-2 py-1.5 border-b flex items-center gap-1",style:{borderColor:"var(--color-border-divider)"},children:[c.jsx("div",{className:"h-[3px] rounded w-10",style:{backgroundColor:"var(--color-text-tertiary)"}}),c.jsx("div",{className:"h-[4px] rounded-full w-7 ml-1",style:{backgroundColor:"#5B8DB825"}})]}),c.jsxs("div",{className:"px-2 py-1.5 space-y-1.5 flex-1",children:[c.jsx("div",{className:"h-[6px] rounded w-[85%]",style:{backgroundColor:"var(--color-text-primary)",opacity:.6}}),c.jsx("div",{className:"h-[3px] rounded w-8 mt-1",style:{backgroundColor:"var(--color-text-tertiary)"}}),c.jsx("div",{className:"h-[4px] rounded w-12",style:{backgroundColor:"var(--color-bg-secondary)"}}),c.jsx("div",{className:"h-[3px] rounded w-8",style:{backgroundColor:"var(--color-text-tertiary)"}}),c.jsx("div",{className:"h-[4px] rounded w-16",style:{backgroundColor:"var(--color-bg-secondary)"}})]})]})]})}function fj(){return c.jsx("div",{className:"w-full h-full rounded-[6px] overflow-hidden flex items-center justify-center",style:{backgroundColor:"rgba(0,0,0,0.35)"},children:c.jsxs("div",{className:"w-[88%] h-[78%] rounded-[5px] overflow-hidden flex",style:{backgroundColor:"var(--color-bg-card)",border:"1px solid var(--color-border)"},children:[c.jsxs("div",{className:"flex-1 px-2 py-1.5 border-r",style:{borderColor:"var(--color-border-divider)"},children:[c.jsx("div",{className:"flex gap-1 mb-1.5",children:["#C46555","#5B8DB8"].map(n=>c.jsx("div",{className:"h-[4px] rounded-full w-8",style:{backgroundColor:`${n}30`}},n))}),c.jsx("div",{className:"h-[7px] rounded w-[90%] mb-1",style:{backgroundColor:"var(--color-text-primary)",opacity:.6}}),c.jsx("div",{className:"h-[3px] rounded w-full mb-1",style:{backgroundColor:"var(--color-text-secondary)",opacity:.35}}),c.jsx("div",{className:"h-[3px] rounded w-[80%]",style:{backgroundColor:"var(--color-text-secondary)",opacity:.35}})]}),c.jsxs("div",{className:"w-[36%] px-1.5 py-1.5 space-y-1.5",style:{backgroundColor:"var(--color-bg-secondary)"},children:[c.jsx("div",{className:"h-[3px] rounded w-10",style:{backgroundColor:"var(--color-text-tertiary)"}}),[["#C46555",18],["#5B8DB8",14],["#A09D97",20]].map(([n,i],s)=>c.jsx("div",{className:"h-[4px] rounded-full",style:{width:i,backgroundColor:`${n}35`}},s))]})]})})}function mj(){return c.jsxs("div",{className:"w-full h-full rounded-[6px] overflow-hidden flex flex-col",style:{backgroundColor:"var(--color-bg-primary)"},children:[c.jsxs("div",{className:"flex items-center justify-between px-2 py-1 border-b shrink-0",style:{borderColor:"var(--color-border-divider)",backgroundColor:"var(--color-bg-card)"},children:[c.jsxs("div",{className:"flex items-center gap-1",children:[c.jsx("div",{className:"h-[3px] rounded w-6",style:{backgroundColor:"var(--color-text-tertiary)"}}),c.jsx("span",{className:"text-[6px]",style:{color:"var(--color-text-tertiary)"},children:"›"}),c.jsx("div",{className:"h-[3px] rounded w-8",style:{backgroundColor:"var(--color-text-primary)",opacity:.5}})]}),c.jsxs("div",{className:"flex gap-1",children:[c.jsx("div",{className:"h-[4px] rounded-full w-8",style:{backgroundColor:"#C4655525"}}),c.jsx("div",{className:"h-[4px] rounded-full w-6",style:{backgroundColor:"#5B8DB825"}})]})]}),c.jsxs("div",{className:"flex flex-1 overflow-hidden",children:[c.jsxs("div",{className:"flex-1 px-3 py-2 space-y-1.5",children:[c.jsx("div",{className:"h-[3px] rounded w-16",style:{backgroundColor:"var(--color-text-tertiary)",opacity:.5}}),c.jsx("div",{className:"h-[8px] rounded w-[80%]",style:{backgroundColor:"var(--color-text-primary)",opacity:.55}}),c.jsx("div",{className:"h-[3px] rounded w-full",style:{backgroundColor:"var(--color-text-secondary)",opacity:.28}}),c.jsx("div",{className:"h-[3px] rounded w-[75%]",style:{backgroundColor:"var(--color-text-secondary)",opacity:.28}})]}),c.jsx("div",{className:"w-[30%] px-1.5 py-2 border-l space-y-1.5",style:{borderColor:"var(--color-border)",backgroundColor:"var(--color-bg-secondary)"},children:[12,16,10,14].map((n,i)=>c.jsx("div",{className:"h-[3px] rounded",style:{width:n,backgroundColor:"var(--color-text-tertiary)",opacity:.5}},i))})]})]})}function tg({value:n,current:i,label:s,description:r,accentColor:d,children:f,onSelect:p}){const h=n===i;return c.jsxs("button",{type:"button",onClick:()=>p(n),className:"flex-1 min-w-0 rounded-[10px] overflow-hidden border-2 transition-all duration-200 text-left focus-visible:outline-none",style:{borderColor:h?d:"var(--color-border)",backgroundColor:h?`${d}06`:"var(--color-bg-card)",boxShadow:h?`0 0 0 3px ${d}20`:"var(--shadow-sm)",transform:h?"translateY(-1px)":"none"},children:[c.jsx("div",{className:"h-[100px] p-2",style:{backgroundColor:h?`${d}08`:"var(--color-bg-secondary)"},children:f}),c.jsxs("div",{className:"px-3 py-2.5 border-t",style:{borderColor:"var(--color-border-divider)"},children:[c.jsxs("div",{className:"flex items-center gap-1.5 mb-0.5",children:[h&&c.jsx("div",{className:"w-2 h-2 rounded-full shrink-0",style:{backgroundColor:d}}),c.jsx("span",{className:"text-[11px] font-semibold",style:{color:h?d:"var(--color-text-primary)"},children:s})]}),c.jsx("p",{className:"text-[10px] leading-snug",style:{color:"var(--color-text-tertiary)"},children:r})]})]})}function pj(){const n=[{color:"#A09D97",cards:[72,60,85]},{color:"#B89540",cards:[90,65]},{color:"#5A9E78",cards:[55]}];return c.jsx("div",{className:"absolute inset-0 flex gap-2 p-3",style:{backgroundColor:"var(--color-bg-secondary)"},children:n.map((i,s)=>c.jsxs("div",{className:"flex-1 rounded-[8px] overflow-hidden",style:{backgroundColor:"var(--color-bg-primary)"},children:[c.jsxs("div",{className:"flex items-center gap-1.5 px-2 py-1.5 border-b",style:{borderColor:"var(--color-border-divider)"},children:[c.jsx("div",{className:"w-2 h-2 rounded-full",style:{backgroundColor:i.color}}),c.jsx("div",{className:"h-[5px] rounded w-12",style:{backgroundColor:"var(--color-text-secondary)",opacity:.4}})]}),c.jsx("div",{className:"p-1.5 space-y-1.5",children:i.cards.map((r,d)=>c.jsxs("div",{className:"rounded-[5px] p-1.5",style:{backgroundColor:"var(--color-bg-card)",border:"1px solid var(--color-border)"},children:[c.jsxs("div",{className:"flex gap-1 mb-1",children:[c.jsx("div",{className:"h-[4px] rounded-full w-10",style:{backgroundColor:`${i.color}35`}}),c.jsx("div",{className:"h-[4px] rounded-full w-7 ml-auto",style:{backgroundColor:"rgba(160,157,151,0.25)"}})]}),c.jsx("div",{className:"h-[4px] rounded",style:{width:`${r}%`,backgroundColor:"var(--color-text-secondary)",opacity:.3}})]},d))})]},s))})}function hj({style:n,animKey:i}){return n===1?c.jsx("div",{className:"absolute inset-0 flex items-start justify-center pt-[14%]",style:{backgroundColor:"rgba(0,0,0,0.65)"},children:c.jsxs("div",{className:"w-[70%] rounded-[10px] overflow-hidden motion-safe:animate-[modal-enter_240ms_ease-out_both]",style:{backgroundColor:"#1D1B18",borderTop:"2px solid #C8863A",boxShadow:"0 16px 50px rgba(0,0,0,0.5)"},children:[c.jsx("div",{className:"px-4 py-3",children:c.jsx("div",{className:"h-[8px] rounded w-[60%]",style:{backgroundColor:"rgba(255,255,255,0.22)"}})}),c.jsx("div",{className:"px-4 pb-3 pt-2 border-t",style:{borderColor:"rgba(255,255,255,0.07)"},children:c.jsx("div",{className:"flex gap-1.5",children:["#C46555","#5B8DB8","#9178B5","#A09D97"].map(s=>c.jsx("div",{className:"h-[6px] rounded-full w-8",style:{backgroundColor:`${s}45`}},s))})}),c.jsx("div",{className:"px-4 py-2 border-t flex items-center",style:{borderColor:"rgba(255,255,255,0.07)"},children:c.jsx("div",{className:"h-[4px] rounded w-24",style:{backgroundColor:"rgba(255,255,255,0.12)"}})})]},i)}):n===2?c.jsx("div",{className:"absolute inset-0 flex items-center justify-center",style:{backgroundColor:"rgba(0,0,0,0.38)"},children:c.jsxs("div",{className:"w-[72%] rounded-[12px] overflow-hidden motion-safe:animate-[modal-enter_240ms_ease-out_both]",style:{backgroundColor:"var(--color-bg-card)",border:"1px solid var(--color-border)",boxShadow:"0 12px 40px rgba(0,0,0,0.2)"},children:[c.jsxs("div",{className:"flex items-center justify-between px-4 py-2.5 border-b",style:{borderColor:"var(--color-border-divider)"},children:[c.jsx("div",{className:"h-[7px] rounded w-16",style:{backgroundColor:"var(--color-text-primary)",opacity:.65}}),c.jsx("div",{className:"w-4 h-4 rounded",style:{backgroundColor:"var(--color-bg-hover)"}})]}),c.jsxs("div",{className:"px-4 py-3 space-y-2",children:[c.jsx("div",{className:"h-[4px] rounded w-8",style:{backgroundColor:"var(--color-text-tertiary)"}}),c.jsx("div",{className:"h-[8px] rounded border w-full",style:{borderColor:"var(--color-border)"}}),c.jsx("div",{className:"h-[4px] rounded w-10",style:{backgroundColor:"var(--color-text-tertiary)"}}),c.jsx("div",{className:"h-[16px] rounded border w-full",style:{borderColor:"var(--color-border)"}}),c.jsx("div",{className:"flex gap-1.5",children:["#C46555","#5B8DB8","#9178B5","#A09D97"].map(s=>c.jsx("div",{className:"h-[7px] rounded w-12",style:{backgroundColor:`${s}22`}},s))})]}),c.jsxs("div",{className:"flex justify-end gap-2 px-4 py-2.5 border-t",style:{borderColor:"var(--color-border-divider)"},children:[c.jsx("div",{className:"h-[8px] rounded w-10",style:{backgroundColor:"var(--color-bg-secondary)",border:"1px solid var(--color-border)"}}),c.jsx("div",{className:"h-[8px] rounded w-16",style:{backgroundColor:"#C8863A"}})]})]},i)}):c.jsx("div",{className:"absolute inset-0 flex items-center justify-center motion-safe:animate-[modal-enter_240ms_ease-out_both]",style:{backgroundColor:"var(--color-bg-primary)"},children:c.jsxs("div",{className:"w-[80%]",children:[c.jsx("div",{className:"h-[4px] rounded w-20 mb-3",style:{backgroundColor:"var(--color-text-tertiary)",opacity:.5}}),c.jsx("div",{className:"h-[14px] rounded w-[70%] mb-3",style:{backgroundColor:"var(--color-text-primary)",opacity:.55}}),c.jsxs("div",{className:"space-y-1.5 mb-6",children:[c.jsx("div",{className:"h-[5px] rounded w-full",style:{backgroundColor:"var(--color-text-secondary)",opacity:.25}}),c.jsx("div",{className:"h-[5px] rounded w-[85%]",style:{backgroundColor:"var(--color-text-secondary)",opacity:.25}})]}),c.jsxs("div",{className:"flex items-center gap-2 pt-2 border-t",style:{borderColor:"var(--color-border-divider)"},children:[["#C46555","#5B8DB8","#9178B5"].map(s=>c.jsx("div",{className:"h-[6px] rounded-full w-10",style:{backgroundColor:`${s}35`}},s)),c.jsx("div",{className:"ml-auto h-[8px] rounded w-12",style:{backgroundColor:"#C8863A"}})]})]})},i)}function gj({style:n,animKey:i}){return n===1?c.jsxs(c.Fragment,{children:[c.jsx("div",{className:"absolute inset-0",style:{backgroundColor:"rgba(0,0,0,0.2)"}}),c.jsxs("div",{className:"absolute top-0 right-0 bottom-0 w-[42%] flex flex-col motion-safe:animate-[slide-in-right_240ms_ease-out_both]",style:{backgroundColor:"var(--color-bg-card)",borderLeft:"1px solid var(--color-border)",boxShadow:"0 0 30px rgba(0,0,0,0.15)"},children:[c.jsxs("div",{className:"flex items-center justify-between px-3 py-2 border-b",style:{borderColor:"var(--color-border-divider)"},children:[c.jsx("div",{className:"h-[4px] rounded w-16",style:{backgroundColor:"var(--color-text-tertiary)"}}),c.jsxs("div",{className:"flex gap-1",children:[c.jsx("div",{className:"h-[5px] rounded-full w-8",style:{backgroundColor:"#C4655530"}}),c.jsx("div",{className:"h-[5px] rounded-full w-8",style:{backgroundColor:"#5B8DB830"}})]})]}),c.jsxs("div",{className:"px-3 py-3 space-y-2.5 flex-1",children:[c.jsx("div",{className:"h-[8px] rounded w-[85%]",style:{backgroundColor:"var(--color-text-primary)",opacity:.55}}),c.jsx("div",{className:"h-[4px] rounded w-10",style:{backgroundColor:"var(--color-text-tertiary)"}}),c.jsx("div",{className:"h-[6px] rounded w-16",style:{backgroundColor:"var(--color-bg-secondary)"}}),c.jsx("div",{className:"h-[4px] rounded w-10",style:{backgroundColor:"var(--color-text-tertiary)"}}),c.jsxs("div",{className:"space-y-1",children:[c.jsx("div",{className:"h-[4px] rounded w-full",style:{backgroundColor:"var(--color-text-secondary)",opacity:.25}}),c.jsx("div",{className:"h-[4px] rounded w-[80%]",style:{backgroundColor:"var(--color-text-secondary)",opacity:.25}})]})]})]},i)]}):n===2?c.jsx("div",{className:"absolute inset-0 flex items-center justify-center",style:{backgroundColor:"rgba(0,0,0,0.45)"},children:c.jsxs("div",{className:"w-[88%] h-[78%] rounded-[10px] overflow-hidden flex motion-safe:animate-[modal-enter_240ms_ease-out_both]",style:{backgroundColor:"var(--color-bg-card)",border:"1px solid var(--color-border)",boxShadow:"0 12px 40px rgba(0,0,0,0.25)"},children:[c.jsxs("div",{className:"flex-1 flex flex-col border-r",style:{borderColor:"var(--color-border-divider)"},children:[c.jsx("div",{className:"flex items-center justify-between px-3 py-2 border-b shrink-0",style:{borderColor:"var(--color-border-divider)"},children:c.jsx("div",{className:"h-[4px] rounded w-14",style:{backgroundColor:"var(--color-text-tertiary)"}})}),c.jsxs("div",{className:"flex-1 px-3 py-3 space-y-2",children:[c.jsx("div",{className:"flex gap-1",children:["#C46555","#5B8DB8"].map(s=>c.jsx("div",{className:"h-[5px] rounded-full w-10",style:{backgroundColor:`${s}30`}},s))}),c.jsx("div",{className:"h-[9px] rounded w-[80%]",style:{backgroundColor:"var(--color-text-primary)",opacity:.55}}),c.jsxs("div",{className:"space-y-1",children:[c.jsx("div",{className:"h-[4px] rounded w-full",style:{backgroundColor:"var(--color-text-secondary)",opacity:.25}}),c.jsx("div",{className:"h-[4px] rounded w-[75%]",style:{backgroundColor:"var(--color-text-secondary)",opacity:.25}})]})]})]}),c.jsxs("div",{className:"w-[36%] px-2.5 py-3 space-y-2.5",style:{backgroundColor:"var(--color-bg-secondary)"},children:[c.jsx("div",{className:"h-[4px] rounded w-14",style:{backgroundColor:"var(--color-text-tertiary)"}}),[["#C46555",20],["#5B8DB8",16],["#A09D97",22]].map(([s,r],d)=>c.jsx("div",{className:"h-[6px] rounded-full",style:{width:r,backgroundColor:`${s}35`}},d)),c.jsxs("div",{className:"pt-2 border-t space-y-1.5",style:{borderColor:"var(--color-border-divider)"},children:[c.jsx("div",{className:"h-[4px] rounded w-10",style:{backgroundColor:"var(--color-text-tertiary)"}}),c.jsx("div",{className:"h-[4px] rounded w-12",style:{backgroundColor:"var(--color-text-secondary)",opacity:.35}})]})]})]},i)}):c.jsxs("div",{className:"absolute inset-0 flex flex-col motion-safe:animate-[slide-up_240ms_ease-out_both]",style:{backgroundColor:"var(--color-bg-primary)"},children:[c.jsxs("div",{className:"flex items-center justify-between px-3 py-2 border-b shrink-0",style:{borderColor:"var(--color-border-divider)",backgroundColor:"var(--color-bg-card)"},children:[c.jsxs("div",{className:"flex items-center gap-1.5",children:[c.jsx("div",{className:"h-[4px] rounded w-8",style:{backgroundColor:"var(--color-text-tertiary)"}}),c.jsx("span",{className:"text-[8px]",style:{color:"var(--color-text-tertiary)"},children:"›"}),c.jsx("div",{className:"h-[4px] rounded w-10",style:{backgroundColor:"var(--color-text-tertiary)"}}),c.jsx("span",{className:"text-[8px]",style:{color:"var(--color-text-tertiary)"},children:"›"}),c.jsx("div",{className:"h-[4px] rounded w-16",style:{backgroundColor:"var(--color-text-primary)",opacity:.5}})]}),c.jsxs("div",{className:"flex gap-1.5",children:[c.jsx("div",{className:"h-[5px] rounded-full w-9",style:{backgroundColor:"#C4655525"}}),c.jsx("div",{className:"h-[5px] rounded-full w-8",style:{backgroundColor:"#5B8DB825"}}),c.jsx("div",{className:"h-[6px] rounded w-10",style:{backgroundColor:"var(--color-bg-secondary)",border:"1px solid var(--color-border)"}})]})]}),c.jsxs("div",{className:"flex flex-1 overflow-hidden",children:[c.jsxs("div",{className:"flex-1 px-6 py-4 space-y-2",children:[c.jsx("div",{className:"h-[4px] rounded w-16",style:{backgroundColor:"var(--color-text-tertiary)",opacity:.5}}),c.jsx("div",{className:"h-[11px] rounded w-[65%]",style:{backgroundColor:"var(--color-text-primary)",opacity:.55}}),c.jsxs("div",{className:"space-y-1.5 pt-1",children:[c.jsx("div",{className:"h-[4px] rounded w-full",style:{backgroundColor:"var(--color-text-secondary)",opacity:.22}}),c.jsx("div",{className:"h-[4px] rounded w-[80%]",style:{backgroundColor:"var(--color-text-secondary)",opacity:.22}}),c.jsx("div",{className:"h-[4px] rounded w-[60%]",style:{backgroundColor:"var(--color-text-secondary)",opacity:.22}})]})]}),c.jsx("div",{className:"w-[28%] border-l px-2.5 py-4 space-y-2.5",style:{borderColor:"var(--color-border)",backgroundColor:"var(--color-bg-secondary)"},children:[["#C46555",22],["#5B8DB8",18],["#A09D97",24]].map(([s,r],d)=>c.jsxs("div",{children:[c.jsx("div",{className:"h-[3px] rounded w-8 mb-1",style:{backgroundColor:"var(--color-text-tertiary)",opacity:.6}}),c.jsx("div",{className:"h-[5px] rounded-full",style:{width:r,backgroundColor:`${s}35`}})]},d))})]})]},i)}function vj({target:n,createStyle:i,detailStyle:s,animKey:r,labels:d,captions:f,createBtnLabel:p,detailBtnLabel:h}){const x=n==="create"?i:s,g=n==="create"?"var(--color-accent-orange)":"var(--color-accent-blue)";return c.jsxs("div",{children:[c.jsxs("div",{className:"flex items-center gap-2 mb-3",children:[c.jsx("div",{className:"h-px flex-1",style:{backgroundColor:"var(--color-border-divider)"}}),c.jsxs("div",{className:"flex items-center gap-1.5",children:[c.jsx("div",{className:"w-1.5 h-1.5 rounded-full",style:{backgroundColor:g}}),c.jsxs("span",{className:"text-[10px] font-semibold uppercase tracking-wider",style:{color:"var(--color-text-tertiary)"},children:["Live Preview — ",d[n][x]]})]}),c.jsx("div",{className:"h-px flex-1",style:{backgroundColor:"var(--color-border-divider)"}})]}),c.jsxs("div",{className:"relative rounded-[10px] overflow-hidden border",style:{height:220,borderColor:"var(--color-border)",backgroundColor:"var(--color-bg-secondary)"},children:[c.jsx(pj,{}),n==="create"?c.jsx(hj,{style:i,animKey:r}):c.jsx(gj,{style:s,animKey:r})]}),c.jsx("p",{className:"mt-2 text-[10px] text-center",style:{color:"var(--color-text-tertiary)"},children:f[n][x]})]})}function xj(){const{t:n}=St(),i=Hl(w=>w.createModalStyle),s=Hl(w=>w.detailModalStyle),r=Hl(w=>w.setCreateModalStyle),d=Hl(w=>w.setDetailModalStyle),[f,p]=v.useState("create"),[h,x]=v.useState("initial");function g(w){r(w),p("create"),x(`create-${w}-${Date.now()}`)}function S(w){d(w),p("detail"),x(`detail-${w}-${Date.now()}`)}const b=[{value:1,label:n("settings.kanban.create_command"),description:n("settings.kanban.create_command_desc"),thumb:c.jsx(oj,{})},{value:2,label:n("settings.kanban.create_form"),description:n("settings.kanban.create_form_desc"),thumb:c.jsx(cj,{})},{value:3,label:n("settings.kanban.create_focus"),description:n("settings.kanban.create_focus_desc"),thumb:c.jsx(uj,{})}],E=[{value:1,label:n("settings.kanban.detail_panel"),description:n("settings.kanban.detail_panel_desc"),thumb:c.jsx(dj,{})},{value:2,label:n("settings.kanban.detail_overlay"),description:n("settings.kanban.detail_overlay_desc"),thumb:c.jsx(fj,{})},{value:3,label:n("settings.kanban.detail_page"),description:n("settings.kanban.detail_page_desc"),thumb:c.jsx(mj,{})}];return c.jsxs("div",{className:"flex flex-col gap-[var(--spacing-5)]",children:[c.jsx(rt,{title:n("settings.kanban.create_card"),description:n("settings.kanban.create_desc"),children:c.jsx("div",{className:"flex gap-3 mt-1",children:b.map(w=>c.jsx(tg,{value:w.value,current:i,label:w.label,description:w.description,accentColor:"var(--color-accent-orange)",onSelect:g,children:w.thumb},w.value))})}),c.jsx(rt,{title:n("settings.kanban.detail_card"),description:n("settings.kanban.detail_desc"),children:c.jsx("div",{className:"flex gap-3 mt-1",children:E.map(w=>c.jsx(tg,{value:w.value,current:s,label:w.label,description:w.description,accentColor:"var(--color-accent-blue)",onSelect:S,children:w.thumb},w.value))})}),c.jsxs(rt,{title:n("settings.kanban.preview_card"),description:n("settings.kanban.preview_desc"),children:[c.jsx("div",{className:"flex gap-1 mb-4",children:["create","detail"].map(w=>c.jsx("button",{type:"button",onClick:()=>{p(w),x(`${w}-${i}-${s}-${Date.now()}`)},className:"px-3 py-1 rounded-[var(--radius-sm)] text-[11px] font-medium transition-all",style:{backgroundColor:f===w?"var(--color-bg-active)":"transparent",color:f===w?"var(--color-text-primary)":"var(--color-text-tertiary)"},children:n(w==="create"?"settings.kanban.preview_create":"settings.kanban.preview_detail")},w))}),c.jsx(vj,{target:f,createStyle:i,detailStyle:s,animKey:h,labels:{create:{1:n("settings.kanban.create_command"),2:n("settings.kanban.create_form"),3:n("settings.kanban.create_focus")},detail:{1:n("settings.kanban.detail_panel"),2:n("settings.kanban.detail_overlay"),3:n("settings.kanban.detail_page")}},captions:{create:{1:n("settings.kanban.create_caption_1"),2:n("settings.kanban.create_caption_2"),3:n("settings.kanban.create_caption_3")},detail:{1:n("settings.kanban.detail_caption_1"),2:n("settings.kanban.detail_caption_2"),3:n("settings.kanban.detail_caption_3")}},createBtnLabel:n("settings.kanban.preview_create"),detailBtnLabel:n("settings.kanban.preview_detail")})]})]})}const yj=["development","staging","production","custom"],bj=["haiku","sonnet","opus"],Sj=["low","medium","high"],Ej=[{value:"claude-code",label:"Claude Code"},{value:"agent-sdk",label:"Agent SDK"},{value:"codex",label:"Codex"},{value:"gemini",label:"Gemini"},{value:"qwen",label:"Qwen"},{value:"opencode",label:"OpenCode"}];function ha({label:n,description:i,value:s,onChange:r,id:d,min:f=0}){return c.jsx(Pe,{label:n,description:i,htmlFor:d,children:c.jsx(gn,{id:d,type:"text",value:String(s),onChange:p=>{const h=Number(p);!isNaN(h)&&h>=f&&r(h)},className:"w-32 font-mono"})})}function wj(){const{t:n}=St(),i=pe(w=>{var C;return(C=w.draft)==null?void 0:C.commander}),s=pe(w=>w.saving),r=pe(w=>w.isDirty("commander")),d=pe(w=>w.updateDraft),f=pe(w=>w.saveConfig),p=pe(w=>w.discardDraft),h=yj.map(w=>({value:w,label:n(`settings.commander.profile_${w}`)})),x=bj.map(w=>({value:w,label:n(`settings.commander.model_${w}`)})),g=Sj.map(w=>({value:w,label:n(`settings.commander.threshold_${w}`)}));if(!i)return null;const S=w=>{d("commander",{...i,...w})},b=w=>{d("commander",{...i,safety:{...i.safety,...w}})},E=w=>{d("commander",{...i,workspace:{...i.workspace,...w}})};return c.jsxs("div",{className:"flex flex-col gap-[var(--spacing-4)]",children:[c.jsx(rt,{title:n("settings.commander.profile_card"),description:n("settings.commander.profile_desc"),children:c.jsx(Pe,{label:n("settings.commander.environment_label"),description:n("settings.commander.environment_desc"),htmlFor:"cmd-profile",children:c.jsx(Kn,{id:"cmd-profile",value:i.profile,onChange:w=>S({profile:w}),options:h})})}),c.jsxs(rt,{title:n("settings.commander.core_card"),description:n("settings.commander.core_desc"),children:[c.jsx(ha,{id:"cmd-poll-interval",label:n("settings.commander.poll_interval_label"),description:n("settings.commander.poll_interval_desc"),value:i.pollIntervalMs,onChange:w=>S({pollIntervalMs:w})}),c.jsx(ha,{id:"cmd-max-workers",label:n("settings.commander.max_workers_label"),description:n("settings.commander.max_workers_desc"),value:i.maxConcurrentWorkers,onChange:w=>S({maxConcurrentWorkers:w})}),c.jsx(ha,{id:"cmd-stall-timeout",label:n("settings.commander.stall_timeout_label"),description:n("settings.commander.stall_timeout_desc"),value:i.stallTimeoutMs,onChange:w=>S({stallTimeoutMs:w})}),c.jsx(ha,{id:"cmd-max-retries",label:n("settings.commander.max_retries_label"),description:n("settings.commander.max_retries_desc"),value:i.maxRetries,onChange:w=>S({maxRetries:w})}),c.jsx(ha,{id:"cmd-retry-backoff",label:n("settings.commander.retry_backoff_label"),description:n("settings.commander.retry_backoff_desc"),value:i.retryBackoffMs,onChange:w=>S({retryBackoffMs:w})})]}),c.jsxs(rt,{title:n("settings.commander.decision_card"),description:n("settings.commander.decision_desc"),children:[c.jsx(Pe,{label:n("settings.commander.decision_model_label"),description:n("settings.commander.decision_model_desc"),htmlFor:"cmd-decision-model",children:c.jsx(Kn,{id:"cmd-decision-model",value:i.decisionModel,onChange:w=>S({decisionModel:w}),options:x})}),c.jsx(ha,{id:"cmd-assess-turns",label:n("settings.commander.assess_turns_label"),description:n("settings.commander.assess_turns_desc"),value:i.assessMaxTurns,onChange:w=>S({assessMaxTurns:w})}),c.jsx(Pe,{label:n("settings.commander.threshold_label"),description:n("settings.commander.threshold_desc"),htmlFor:"cmd-approve-threshold",children:c.jsx(Kn,{id:"cmd-approve-threshold",value:i.autoApproveThreshold,onChange:w=>S({autoApproveThreshold:w}),options:g})}),c.jsx(Pe,{label:n("settings.commander.executor_label"),description:n("settings.commander.executor_desc"),htmlFor:"cmd-executor",children:c.jsx(Kn,{id:"cmd-executor",value:i.defaultExecutor,onChange:w=>S({defaultExecutor:w}),options:Ej})})]}),c.jsxs(rt,{title:n("settings.commander.safety_card"),description:n("settings.commander.safety_desc"),children:[c.jsx(ha,{id:"cmd-debounce",label:n("settings.commander.debounce_label"),description:n("settings.commander.debounce_desc"),value:i.safety.eventDebounceMs,onChange:w=>b({eventDebounceMs:w})}),c.jsx(ha,{id:"cmd-circuit-breaker",label:n("settings.commander.circuit_breaker_label"),description:n("settings.commander.circuit_breaker_desc"),value:i.safety.circuitBreakerThreshold,onChange:w=>b({circuitBreakerThreshold:w})}),c.jsx(ha,{id:"cmd-max-ticks",label:n("settings.commander.max_ticks_label"),description:n("settings.commander.max_ticks_desc"),value:i.safety.maxTicksPerHour,onChange:w=>b({maxTicksPerHour:w})}),c.jsx(ha,{id:"cmd-max-tokens",label:n("settings.commander.max_tokens_label"),description:n("settings.commander.max_tokens_desc"),value:i.safety.maxTokensPerHour,onChange:w=>b({maxTokensPerHour:w})}),c.jsx(Pe,{label:n("settings.commander.protected_paths_label"),description:n("settings.commander.protected_paths_desc"),htmlFor:"cmd-protected-paths",children:c.jsx(gn,{id:"cmd-protected-paths",value:i.safety.protectedPaths.join(", "),onChange:w=>b({protectedPaths:w.split(",").map(C=>C.trim()).filter(Boolean)}),placeholder:".env, *.key, credentials.*",className:"w-72 font-mono text-[length:var(--font-size-xs)]"})})]}),c.jsxs(rt,{title:n("settings.commander.workspace_card"),description:n("settings.commander.workspace_desc"),children:[c.jsx(Pe,{label:n("settings.commander.workspace_enabled_label"),description:n("settings.commander.workspace_enabled_desc"),children:c.jsx(In,{enabled:i.workspace.enabled,onClick:()=>E({enabled:!i.workspace.enabled})})}),c.jsx(Pe,{label:n("settings.commander.workspace_worktree_label"),description:n("settings.commander.workspace_worktree_desc"),children:c.jsx(In,{enabled:i.workspace.useWorktree,onClick:()=>E({useWorktree:!i.workspace.useWorktree})})}),c.jsx(Pe,{label:n("settings.commander.workspace_autocleanup_label"),description:n("settings.commander.workspace_autocleanup_desc"),children:c.jsx(In,{enabled:i.workspace.autoCleanup,onClick:()=>E({autoCleanup:!i.workspace.autoCleanup})})}),c.jsx(Pe,{label:n("settings.commander.workspace_strict_label"),description:n("settings.commander.workspace_strict_desc"),children:c.jsx(In,{enabled:i.workspace.strict,onClick:()=>E({strict:!i.workspace.strict})})})]}),c.jsx(Vn,{dirty:r,saving:s,onSave:()=>void f("commander"),onDiscard:()=>p("commander")})]})}function jj({section:n}){switch(n){case"general":return c.jsx(Jw,{});case"agents":return c.jsx(tj,{});case"cli-tools":return c.jsx(aj,{});case"specs":return c.jsx(nj,{});case"linear":return c.jsx(ij,{});case"kanban":return c.jsx(xj,{});case"commander":return c.jsx(wj,{});default:return null}}const Nj=["general","agents","commander","cli-tools","specs","linear","kanban"],_j={general:"cog",agents:"bot",commander:"commander","cli-tools":"terminal",specs:"file-text",linear:"linear",kanban:"kanban"};function Cj({icon:n}){const i="w-4 h-4 shrink-0";switch(n){case"cog":return c.jsxs("svg",{className:i,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[c.jsx("circle",{cx:"12",cy:"12",r:"3"}),c.jsx("path",{d:"M19.4 15a1.65 1.65 0 0 0 .33 1.82l.06.06a2 2 0 1 1-2.83 2.83l-.06-.06a1.65 1.65 0 0 0-1.82-.33 1.65 1.65 0 0 0-1 1.51V21a2 2 0 0 1-4 0v-.09A1.65 1.65 0 0 0 9 19.4a1.65 1.65 0 0 0-1.82.33l-.06.06a2 2 0 1 1-2.83-2.83l.06-.06A1.65 1.65 0 0 0 4.68 15a1.65 1.65 0 0 0-1.51-1H3a2 2 0 0 1 0-4h.09A1.65 1.65 0 0 0 4.6 9a1.65 1.65 0 0 0-.33-1.82l-.06-.06a2 2 0 1 1 2.83-2.83l.06.06A1.65 1.65 0 0 0 9 4.68a1.65 1.65 0 0 0 1-1.51V3a2 2 0 0 1 4 0v.09a1.65 1.65 0 0 0 1 1.51 1.65 1.65 0 0 0 1.82-.33l.06-.06a2 2 0 1 1 2.83 2.83l-.06.06A1.65 1.65 0 0 0 19.4 9a1.65 1.65 0 0 0 1.51 1H21a2 2 0 0 1 0 4h-.09a1.65 1.65 0 0 0-1.51 1z"})]});case"bot":return c.jsxs("svg",{className:i,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[c.jsx("rect",{x:"3",y:"11",width:"18",height:"10",rx:"2"}),c.jsx("circle",{cx:"12",cy:"5",r:"2"}),c.jsx("path",{d:"M12 7v4"}),c.jsx("line",{x1:"8",y1:"16",x2:"8",y2:"16"}),c.jsx("line",{x1:"16",y1:"16",x2:"16",y2:"16"})]});case"terminal":return c.jsxs("svg",{className:i,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[c.jsx("polyline",{points:"4 17 10 11 4 5"}),c.jsx("line",{x1:"12",y1:"19",x2:"20",y2:"19"})]});case"file-text":return c.jsxs("svg",{className:i,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[c.jsx("path",{d:"M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z"}),c.jsx("polyline",{points:"14 2 14 8 20 8"}),c.jsx("line",{x1:"16",y1:"13",x2:"8",y2:"13"}),c.jsx("line",{x1:"16",y1:"17",x2:"8",y2:"17"}),c.jsx("polyline",{points:"10 9 9 9 8 9"})]});case"linear":return c.jsxs("svg",{className:i,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[c.jsx("path",{d:"M3 17l6-6"}),c.jsx("path",{d:"M10 18l4-4"}),c.jsx("path",{d:"M14 20l7-7"})]});case"kanban":return c.jsxs("svg",{className:i,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[c.jsx("rect",{x:"3",y:"3",width:"5",height:"18",rx:"1"}),c.jsx("rect",{x:"10",y:"3",width:"5",height:"12",rx:"1"}),c.jsx("rect",{x:"17",y:"3",width:"5",height:"15",rx:"1"})]});case"commander":return c.jsxs("svg",{className:i,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[c.jsx("rect",{x:"4",y:"4",width:"16",height:"16",rx:"2"}),c.jsx("path",{d:"M9 9h6"}),c.jsx("path",{d:"M9 13h6"}),c.jsx("circle",{cx:"9",cy:"9",r:"0.5",fill:"currentColor"}),c.jsx("circle",{cx:"9",cy:"13",r:"0.5",fill:"currentColor"}),c.jsx("circle",{cx:"15",cy:"9",r:"0.5",fill:"currentColor"}),c.jsx("circle",{cx:"15",cy:"13",r:"0.5",fill:"currentColor"})]});default:return null}}function Tj(){const{t:n}=St(),i=pe(S=>S.open),s=pe(S=>S.setOpen),r=pe(S=>S.activeSection),d=pe(S=>S.setActiveSection),f=pe(S=>S.loading),p=pe(S=>S.config),h=pe(S=>S.draft),x=pe(S=>!S.config||!S.draft?!1:JSON.stringify(S.config.general)!==JSON.stringify(S.draft.general)||JSON.stringify(S.config.agents)!==JSON.stringify(S.draft.agents)||S.config.cliTools!==S.draft.cliTools||JSON.stringify(S.config.linear)!==JSON.stringify(S.draft.linear)||S.config.searchTool!==S.draft.searchTool||JSON.stringify(S.config.commander)!==JSON.stringify(S.draft.commander)),g=v.useCallback(S=>{!S&&x&&!window.confirm(n("settings.unsaved_confirm"))||s(S)},[x,s]);return v.useEffect(()=>{function S(b){(b.metaKey||b.ctrlKey)&&b.key===","&&(b.preventDefault(),s(!i))}return window.addEventListener("keydown",S),()=>window.removeEventListener("keydown",S)},[i,s]),c.jsx(qw,{open:i,onOpenChange:g,children:c.jsxs(Iw,{children:[c.jsx(Kw,{className:"fixed inset-0 z-50 bg-black/50 backdrop-blur-sm data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0"}),c.jsxs(Yw,{className:me("fixed left-1/2 top-1/2 z-50 -translate-x-1/2 -translate-y-1/2","w-[900px] max-w-[95vw] h-[700px] max-h-[90vh]","rounded-[var(--radius-lg)] border border-border bg-bg-primary shadow-[var(--style-modal-shadow)]","flex flex-col overflow-hidden","focus:outline-none","data-[state=open]:animate-in data-[state=closed]:animate-out","data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0","data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95"),children:[c.jsxs("div",{className:"flex items-center justify-between px-[var(--spacing-6)] py-[var(--spacing-4)] border-b border-border shrink-0",children:[c.jsx(Vw,{className:"text-[length:var(--font-size-lg)] font-[var(--font-weight-semibold)] text-text-primary",children:n("settings.title")}),c.jsx(Xw,{className:me("w-8 h-8 flex items-center justify-center rounded-[var(--radius-sm)]","text-text-secondary hover:text-text-primary hover:bg-bg-hover","transition-colors duration-[var(--duration-fast)]","focus-visible:outline-none focus-visible:shadow-[var(--shadow-focus-ring)]"),"aria-label":"Close settings",children:c.jsxs("svg",{className:"w-4 h-4",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[c.jsx("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),c.jsx("line",{x1:"6",y1:"6",x2:"18",y2:"18"})]})})]}),c.jsxs("div",{className:"flex flex-1 overflow-hidden",children:[c.jsx("nav",{className:"w-56 shrink-0 border-r border-border bg-bg-secondary p-[var(--spacing-3)] overflow-y-auto","aria-label":"Settings sections",children:c.jsx("div",{className:"flex flex-col gap-[var(--spacing-0-5)]",children:Nj.map(S=>c.jsxs("button",{type:"button",onClick:()=>d(S),className:me("flex items-center gap-[var(--spacing-2)] px-[var(--spacing-2)] py-[var(--spacing-1-5)] rounded-[var(--radius-default)] text-left text-[length:var(--font-size-sm)] font-[var(--font-weight-medium)] w-full","transition-all duration-[var(--duration-fast)] ease-[var(--ease-notion)]","focus-visible:outline-none focus-visible:shadow-[var(--shadow-focus-ring)]",r===S?"bg-bg-active text-text-primary":"text-text-secondary hover:text-text-primary hover:bg-bg-hover"),"aria-current":r===S?"page":void 0,children:[c.jsx(Cj,{icon:_j[S]}),c.jsx("span",{className:"truncate",children:n(`settings.nav.${S==="cli-tools"?"cli_tools":S}`)})]},S))})}),c.jsx("div",{className:"flex-1 overflow-y-auto p-[var(--spacing-6)]",children:f&&!p?c.jsx("div",{className:"flex items-center justify-center h-full",children:c.jsx("span",{className:"text-[length:var(--font-size-sm)] text-text-secondary",children:n("settings.loading")})}):h?c.jsx(jj,{section:r}):c.jsx("div",{className:"flex items-center justify-center h-full",children:c.jsx("span",{className:"text-[length:var(--font-size-sm)] text-text-secondary",children:n("settings.failed")})})})]})]})]})})}const Aj={idle:"#5A9E78",thinking:"#B89540",dispatching:"#5A84B8",paused:"var(--color-text-tertiary)"};function kj(){var d;const n=Gu(f=>f.supervisorStatus),i=Gu(f=>f.commanderState),s=v.useCallback(()=>{ca({action:"supervisor:toggle",enabled:!(n!=null&&n.enabled)})},[n==null?void 0:n.enabled]),r=n!=null&&n.lastTickAt?Oj(n.lastTickAt):"never";return c.jsx("div",{className:"shrink-0",children:c.jsxs("div",{className:"flex items-center gap-[var(--spacing-3)] px-[var(--spacing-4)] py-[var(--spacing-1-5)] border-t border-border-divider bg-bg-secondary text-[length:var(--font-size-xs)] shrink-0",children:[c.jsxs("button",{type:"button",onClick:s,className:"flex items-center gap-[var(--spacing-1)] text-text-secondary hover:text-text-primary transition-colors",children:[c.jsx("span",{className:["w-2 h-2 rounded-full",n!=null&&n.enabled?"bg-[#5A9E78]":"bg-text-tertiary"].join(" ")}),c.jsxs("span",{className:"font-[var(--font-weight-medium)]",children:["Supervisor ",n!=null&&n.enabled?"ON":"OFF"]})]}),(n==null?void 0:n.enabled)&&c.jsxs(c.Fragment,{children:[c.jsx("div",{className:"w-px h-3 bg-border-divider"}),c.jsxs("span",{className:"text-text-secondary",children:["Running: ",c.jsx("span",{className:"text-text-primary font-[var(--font-weight-medium)]",children:n.running.length})]}),c.jsxs("span",{className:"text-text-secondary",children:["Queued: ",c.jsx("span",{className:"text-text-primary font-[var(--font-weight-medium)]",children:n.queued.length})]}),n.retrying.length>0&&c.jsxs("span",{className:"text-[#B89540]",children:["Retrying: ",c.jsx("span",{className:"font-[var(--font-weight-medium)]",children:n.retrying.length})]}),c.jsxs("span",{className:"text-text-tertiary",children:["Last tick: ",r]}),n.stats.totalDispatched>0&&c.jsxs(c.Fragment,{children:[c.jsx("div",{className:"w-px h-3 bg-border-divider"}),c.jsxs("span",{className:"text-text-tertiary",children:[n.stats.totalCompleted,"/",n.stats.totalDispatched," done",n.stats.totalFailed>0&&c.jsxs("span",{className:"text-[#C46555]",children:[" (",n.stats.totalFailed," failed)"]})]})]})]}),i&&c.jsxs(c.Fragment,{children:[c.jsx("div",{className:"w-px h-3 bg-border-divider"}),c.jsxs("div",{className:"flex items-center gap-[var(--spacing-1)] text-text-secondary",children:[c.jsx("span",{className:"w-2 h-2 rounded-full",style:{backgroundColor:Aj[i.status]??"var(--color-text-tertiary)"}}),c.jsxs("span",{className:"font-[var(--font-weight-medium)]",children:["Commander ",i.status]})]}),c.jsxs("span",{className:"text-text-tertiary",children:["Tick #",i.tickCount]}),((d=i.lastDecision)==null?void 0:d.actions[0])&&c.jsxs("span",{className:"text-text-tertiary",children:["Last: ",i.lastDecision.actions[0].type]})]}),c.jsx("div",{className:"flex-1"}),c.jsx(gg,{to:"/supervisor",className:"text-text-secondary hover:text-text-primary transition-colors font-[var(--font-weight-medium)]",children:"Supervisor →"})]})})}function Oj(n){const i=Date.now(),s=new Date(n).getTime();if(isNaN(s))return"never";const r=i-s;if(r<0)return"just now";const d=Math.floor(r/1e3);return d<5?"just now":d<60?`${d}s ago`:`${Math.floor(d/60)}m ago`}function Dj(){const{t:n}=St(),i=Vt(T=>T.connected),[s,r]=v.useState(!1),[d,f]=v.useState(null),[p,h]=v.useState(!1),[x,g]=v.useState(!1),S=()=>g(T=>!T),b=v0(),E=Ha(),w=E.pathname.startsWith("/kanban"),C=E.pathname.startsWith("/chat"),A=pe(T=>T.loadConfig),O=pe(T=>{var X,Y,P,Z;return((Y=(X=T.draft)==null?void 0:X.general)==null?void 0:Y.theme)??((Z=(P=T.config)==null?void 0:P.general)==null?void 0:Z.theme)});return v.useEffect(()=>{A()},[A]),v.useEffect(()=>{if(O){if(O==="system"){const T=window.matchMedia("(prefers-color-scheme: dark)"),X=()=>{document.documentElement.dataset.theme=T.matches?"dark":"light"};return X(),T.addEventListener("change",X),localStorage.setItem("theme","system"),()=>T.removeEventListener("change",X)}document.documentElement.dataset.theme=O,localStorage.setItem("theme",O)}},[O]),eE(),v.useEffect(()=>{async function T(){try{const[X,Y,P]=await Promise.all([fetch(jh.BOARD),fetch("/api/agents"),fetch(jh.HEALTH)]);if(!X.ok){r(!0);return}const Z=await X.json();if(Vt.getState().setBoard(Z),r(!1),Y.ok){const te=await Y.json(),{addProcess:H}=oa.getState();for(const Q of te)H(Q)}if(P.ok){const te=await P.json();te.workspace&&Vt.getState().setWorkspace(te.workspace),te.latestVersion&&te.version&&te.latestVersion!==te.version&&localStorage.getItem("maestro-update-dismissed")!==te.latestVersion&&f(te.latestVersion)}}catch{r(!0)}}T()},[]),c.jsx(kS,{children:c.jsx(xg,{value:b,children:c.jsxs("div",{className:"h-screen w-screen flex flex-col overflow-hidden bg-bg-primary",children:[c.jsx(Tj,{}),s&&!i&&c.jsx("div",{role:"alert","aria-live":"assertive",className:"px-[var(--spacing-4)] py-[var(--spacing-2)] border-b text-[length:var(--font-size-xs)] text-center shrink-0 rounded-[var(--radius-default)] mx-[var(--spacing-3)] mt-[var(--spacing-2)]",style:{backgroundColor:"var(--color-status-bg-blocked)",color:"var(--color-status-blocked)",borderColor:"var(--color-status-blocked)"},children:n("connection_error")}),d&&!p&&c.jsxs("div",{role:"status",className:"px-[var(--spacing-4)] py-[var(--spacing-2)] border-b text-[length:var(--font-size-xs)] shrink-0 rounded-[var(--radius-default)] mx-[var(--spacing-3)] mt-[var(--spacing-2)] flex items-center justify-center gap-[var(--spacing-2)]",style:{backgroundColor:"var(--color-status-bg-exploring)",color:"var(--color-status-exploring)",borderColor:"var(--color-status-exploring)"},children:[c.jsx("span",{children:n("update_available",{version:d})}),c.jsx("button",{type:"button",onClick:()=>{h(!0),localStorage.setItem("maestro-update-dismissed",d)},className:"ml-[var(--spacing-1)] hover:opacity-70 transition-opacity duration-[var(--duration-fast)]","aria-label":n("dismiss"),children:"×"})]}),c.jsx(j1,{}),c.jsxs("div",{className:"flex flex-1 overflow-hidden relative",children:[c.jsx(dS,{isPinned:x,onTogglePin:S}),c.jsxs(wS,{children:[c.jsx(Fb,{}),w&&c.jsx(kj,{})]})]}),!C&&c.jsx(DS,{}),!C&&c.jsx(GS,{})]})})})}const Mj=v.lazy(()=>ht(()=>import("./KanbanPage-copqjdPg.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12])).then(n=>({default:n.KanbanPage}))),Rj=v.lazy(()=>ht(()=>import("./ArtifactsPage-CVh0Z2I2.js"),__vite__mapDeps([13,14,15,1,16,17,7,8,18,19,20,21])).then(n=>({default:n.ArtifactsPage}))),zj=v.lazy(()=>ht(()=>import("./ChatPage-BjJ9CYox.js"),__vite__mapDeps([22,4,5,6,7,8,9,10,23,16,15,17,24,25])).then(n=>({default:n.ChatPage}))),Lj=v.lazy(()=>ht(()=>import("./WorkflowPage-JrX7CVHh.js"),__vite__mapDeps([26,1,2,27,28,19,10,29])).then(n=>({default:n.WorkflowPage}))),Uj=v.lazy(()=>ht(()=>import("./McpPage-BcPPcJpr.js"),__vite__mapDeps([30,28,9,15,25,8,17,12,21,31,20,27,14,32])).then(n=>({default:n.McpPage}))),Bj=v.lazy(()=>ht(()=>import("./SpecsPage-ByPVH_M3.js"),__vite__mapDeps([33,1,29,28,15,18,21,10,25,31,27])).then(n=>({default:n.SpecsPage}))),Hj=v.lazy(()=>ht(()=>import("./TeamsPage-sFDLN30L.js"),__vite__mapDeps([34,28,15,8,25,35,36,37,38,21,20])).then(n=>({default:n.TeamsPage}))),Gj=v.lazy(()=>ht(()=>import("./RequirementPage-Da2354px.js"),__vite__mapDeps([39,1,6,24,25,14])).then(n=>({default:n.RequirementPage}))),qj=v.lazy(()=>ht(()=>import("./RequirementBoardPage-k8YoeQ0r.js"),__vite__mapDeps([40,18,38,32,36,3])).then(n=>({default:n.RequirementBoardPage}))),Ij=v.lazy(()=>ht(()=>import("./MaestroCoordinatePage-CioZjQ9N.js"),__vite__mapDeps([41,11])).then(n=>({default:n.MaestroCoordinatePage}))),Kj=v.lazy(()=>ht(()=>import("./CollabPage-CprGGO9y.js"),__vite__mapDeps([42,20,21])).then(n=>({default:n.CollabPage}))),Yj=v.lazy(()=>ht(()=>import("./MeetingRoomPage-BgmAKxU-.js"),__vite__mapDeps([43,9,35,36,20,21,5,6,7,8,10,23])).then(n=>({default:n.MeetingRoomPage}))),Vj=v.lazy(()=>ht(()=>import("./RoomsPage-BtqDiYaU.js"),__vite__mapDeps([44,25,37,8])).then(n=>({default:n.RoomsPage})));function Yt(){return c.jsx("div",{className:"flex items-center justify-center h-full text-text-tertiary text-[length:var(--font-size-sm)]",children:"Loading..."})}function Xj(){return c.jsx(i0,{children:c.jsx(Wb,{children:c.jsxs(pt,{element:c.jsx(Dj,{}),children:[c.jsx(pt,{index:!0,element:c.jsx(mu,{to:"/kanban",replace:!0})}),c.jsx(pt,{path:"kanban",element:c.jsx(v.Suspense,{fallback:c.jsx(Yt,{}),children:c.jsx(Mj,{})})}),c.jsx(pt,{path:"artifacts",element:c.jsx(v.Suspense,{fallback:c.jsx(Yt,{}),children:c.jsx(Rj,{})})}),c.jsx(pt,{path:"chat",element:c.jsx(v.Suspense,{fallback:c.jsx(Yt,{}),children:c.jsx(zj,{})})}),c.jsx(pt,{path:"workflow",element:c.jsx(v.Suspense,{fallback:c.jsx(Yt,{}),children:c.jsx(Lj,{})})}),c.jsx(pt,{path:"mcp",element:c.jsx(v.Suspense,{fallback:c.jsx(Yt,{}),children:c.jsx(Uj,{})})}),c.jsx(pt,{path:"specs",element:c.jsx(v.Suspense,{fallback:c.jsx(Yt,{}),children:c.jsx(Bj,{})})}),c.jsx(pt,{path:"wiki",element:c.jsx(mu,{to:"/artifacts",replace:!0})}),c.jsx(pt,{path:"teams",element:c.jsx(v.Suspense,{fallback:c.jsx(Yt,{}),children:c.jsx(Hj,{})})}),c.jsx(pt,{path:"requirement",element:c.jsx(v.Suspense,{fallback:c.jsx(Yt,{}),children:c.jsx(Gj,{})})}),c.jsx(pt,{path:"requirement/:id/board",element:c.jsx(v.Suspense,{fallback:c.jsx(Yt,{}),children:c.jsx(qj,{})})}),c.jsx(pt,{path:"maestro-coordinate",element:c.jsx(v.Suspense,{fallback:c.jsx(Yt,{}),children:c.jsx(Ij,{})})}),c.jsx(pt,{path:"collab",element:c.jsx(v.Suspense,{fallback:c.jsx(Yt,{}),children:c.jsx(Kj,{})})}),c.jsx(pt,{path:"rooms",element:c.jsx(v.Suspense,{fallback:c.jsx(Yt,{}),children:c.jsx(Vj,{})})}),c.jsx(pt,{path:"meeting-room/:sessionId",element:c.jsx(v.Suspense,{fallback:c.jsx(Yt,{}),children:c.jsx(Yj,{})})}),c.jsx(pt,{path:"*",element:c.jsx(mu,{to:"/kanban",replace:!0})})]})})})}const _v=document.getElementById("root");if(!_v)throw new Error("Root element not found");Wy.createRoot(_v).render(c.jsx(v.StrictMode,{children:c.jsx(sb,{children:c.jsx(Xj,{})})}));export{Fg as $,jh as A,q1 as B,Pj as C,Qn as D,Ga as E,M1 as F,Fs as G,$s as H,e2 as I,bu as J,yn as K,gg as L,z1 as M,iE as N,Kw as O,Iw as P,Ii as Q,qw as R,Sg as S,Vw as T,Wg as U,xg as V,Jj as W,nS as X,ww as Y,UE as Z,iv as _,Vt as a,Zg as a0,vE as a1,rb as a2,Eg as a3,tS as a4,Fj as a5,$j as a6,Zj as a7,U1 as a8,H1 as a9,XS as aa,vu as ab,sS as ac,VS as ad,Qj as ae,kj as af,Qg as ag,ZS as ah,N0 as ai,xi as aj,a2 as ak,QS as al,ag as am,V1 as an,PS as ao,F1 as ap,Gu as b,zu as c,Ct as d,Ai as e,Yw as f,t2 as g,Xw as h,me as i,c as j,oa as k,Gi as l,Hl as m,O1 as n,_t as o,Q1 as p,$u as q,v as r,ca as s,sg as t,St as u,Xs as v,Wj as w,Wu as x,aE as y,Vs as z};