@overlordai/server 1.0.178 → 1.0.179

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 (123) hide show
  1. package/dist/adapters/help-text.d.ts.map +1 -1
  2. package/dist/adapters/help-text.js +3 -2
  3. package/dist/adapters/help-text.js.map +1 -1
  4. package/dist/adapters/nlu.service.js +4 -4
  5. package/dist/dispatcher/task-creation.service.d.ts.map +1 -1
  6. package/dist/dispatcher/task-creation.service.js +3 -1
  7. package/dist/dispatcher/task-creation.service.js.map +1 -1
  8. package/package.json +4 -4
  9. package/public/assets/{AccessTokensPage-1EKC1hiZ.js → AccessTokensPage-BbryzvnM.js} +1 -1
  10. package/public/assets/{AdminPage-51tboyFu.js → AdminPage-BultWF7a.js} +1 -1
  11. package/public/assets/AgentCliPage-SW_JKwzo.js +5 -0
  12. package/public/assets/{ApiReferencePage-TgiwRipe.js → ApiReferencePage-BawqrcYL.js} +1 -1
  13. package/public/assets/{ArchitecturePage-BzeZql6h.js → ArchitecturePage-FWLevT4m.js} +1 -1
  14. package/public/assets/{AuditLogPage-y6n7Px8g.js → AuditLogPage-DrxyZ_N_.js} +1 -1
  15. package/public/assets/{AutomationCreatePage-CajNO4bS.js → AutomationCreatePage-CWA--vuT.js} +1 -1
  16. package/public/assets/{AutomationDetailPage-Dgf3Tb9C.js → AutomationDetailPage-BFNJn9l0.js} +1 -1
  17. package/public/assets/{AutomationEditPage-DYaZj31T.js → AutomationEditPage-y5p6I8v9.js} +1 -1
  18. package/public/assets/{AutomationListPage-DxPUmPbs.js → AutomationListPage-Bhgxxu6_.js} +1 -1
  19. package/public/assets/{AutomationRunDetailPage-DmNxMDk5.js → AutomationRunDetailPage-eRVHSPgi.js} +1 -1
  20. package/public/assets/{BindPlatformPage-MYeCpBFT.js → BindPlatformPage-JgPH-GyV.js} +1 -1
  21. package/public/assets/{BotIntegrationPage-Dnk8iYbr.js → BotIntegrationPage-yO7OUlpc.js} +1 -1
  22. package/public/assets/{BotManage-96DyyPVc.js → BotManage-BwplAxcP.js} +1 -1
  23. package/public/assets/{BotSetupPage-esAmTt5X.js → BotSetupPage-vF-1zbQt.js} +1 -1
  24. package/public/assets/{ChangelogPage-BZmrhbzu.js → ChangelogPage-Dvz1CT1l.js} +1 -1
  25. package/public/assets/{Checkbox-CQt3GUhI.js → Checkbox-Cv1IaY0N.js} +1 -1
  26. package/public/assets/{CliReferencePage-D-PUOTbI.js → CliReferencePage-CcCgOSoY.js} +3 -3
  27. package/public/assets/{ConfirmStageDialog-DIsZM7QS.js → ConfirmStageDialog-pDcoEYGK.js} +1 -1
  28. package/public/assets/{ConnectorsManage-v8CzbHwB.js → ConnectorsManage-B8aIKAfR.js} +1 -1
  29. package/public/assets/{ConnectorsPage-Czxmo0rf.js → ConnectorsPage-DpvBzw0u.js} +1 -1
  30. package/public/assets/{DeploymentPage-BmfGIQ--.js → DeploymentPage-2CGTHVvc.js} +1 -1
  31. package/public/assets/{DevWorkflowPage-BwP87xBb.js → DevWorkflowPage-C9dwRqkd.js} +1 -1
  32. package/public/assets/{DeveloperManage-Bu-dU6qo.js → DeveloperManage-CP4AFGVd.js} +1 -1
  33. package/public/assets/{DeveloperSetupPage-PXns-tkJ.js → DeveloperSetupPage-CAUfLPib.js} +1 -1
  34. package/public/assets/{DocsIndexPage-DHYB2eq5.js → DocsIndexPage-_KFl66Pi.js} +1 -1
  35. package/public/assets/{DocsLayout-DLxSnG0D.js → DocsLayout-yhAysfLb.js} +1 -1
  36. package/public/assets/{DocsPrimitives-D7h19aXG.js → DocsPrimitives-BLjrk7dq.js} +1 -1
  37. package/public/assets/{EditProjectPage-BC0UDNOv.js → EditProjectPage-C-i9mvrD.js} +1 -1
  38. package/public/assets/{EmptyState-CMDagsi4.js → EmptyState-DCvtEuqr.js} +1 -1
  39. package/public/assets/{EnvVariablesPage-BB7ahnB1.js → EnvVariablesPage-DHlRltEG.js} +1 -1
  40. package/public/assets/{HomePage-CssNquOH.js → HomePage-zVLfdxgB.js} +1 -1
  41. package/public/assets/{InfoRow-BxIE0xaA.js → InfoRow-0V76rcDX.js} +1 -1
  42. package/public/assets/{InstallationPage-CcJ0J1Zn.js → InstallationPage-CF5KJSiH.js} +1 -1
  43. package/public/assets/{LandingPage-BiMt64NW.js → LandingPage-BZ2OW2Tp.js} +1 -1
  44. package/public/assets/{LocalDevelopmentPage-D4FSxH3d.js → LocalDevelopmentPage-CHzphJ7-.js} +1 -1
  45. package/public/assets/{LoginPage-dLNo1JNx.js → LoginPage-BvkNtbOH.js} +1 -1
  46. package/public/assets/{MetricBar-kakUenDO.js → MetricBar-8IDBuyjQ.js} +1 -1
  47. package/public/assets/{MultiSelect-CmPlPDVq.js → MultiSelect-DqMAwXWW.js} +1 -1
  48. package/public/assets/{NotFoundPage-ohSBiBT-.js → NotFoundPage-3hbcgIgf.js} +1 -1
  49. package/public/assets/{OnboardingGuide-cHKCR0M5.js → OnboardingGuide-BZhFBXTO.js} +1 -1
  50. package/public/assets/{PermissionsPage-7-IPdVXg.js → PermissionsPage-CrRmJEWi.js} +1 -1
  51. package/public/assets/{PipelineConfigPage-BX6JMHM4.js → PipelineConfigPage-QOFAuIzF.js} +1 -1
  52. package/public/assets/{PipelineEditorPage-BeNxSKH5.js → PipelineEditorPage-BiDBe2GM.js} +1 -1
  53. package/public/assets/{PlanPage-B7z3l_2F.js → PlanPage-Bi6aA-yb.js} +1 -1
  54. package/public/assets/{ProfilePage-DwsnCrys.js → ProfilePage-D3BwamWo.js} +1 -1
  55. package/public/assets/{ProjectDetailPage-CzLqL69C.js → ProjectDetailPage-Crv53lJf.js} +1 -1
  56. package/public/assets/{ProjectListPage-Do-9PkUN.js → ProjectListPage-BHkBlY4i.js} +1 -1
  57. package/public/assets/{PtyTerminal-Z14rUlQy.js → PtyTerminal-fX-mJfnE.js} +1 -1
  58. package/public/assets/{QuickAuth-CX1phe7h.js → QuickAuth-Bg6-rI5M.js} +1 -1
  59. package/public/assets/{RemoveMemberConfirmDialog-DI3-C2N9.js → RemoveMemberConfirmDialog-DCvjYeqR.js} +1 -1
  60. package/public/assets/{ReviewAggregatePage-tiy7PRsr.js → ReviewAggregatePage-vilyKtbQ.js} +1 -1
  61. package/public/assets/{ReviewPage-CmbUljfI.js → ReviewPage-B1moD3qH.js} +1 -1
  62. package/public/assets/{Select-LGk_EawR.js → Select-Buxh6kTz.js} +1 -1
  63. package/public/assets/{SettingsPage-BpS56Ttu.js → SettingsPage-e_KlSeOd.js} +1 -1
  64. package/public/assets/{Skeleton-DaeQHyTP.js → Skeleton-Cxko1u3z.js} +1 -1
  65. package/public/assets/{SkillPage-BexkozUK.js → SkillPage-BLXLZ_br.js} +1 -1
  66. package/public/assets/TaskDetailPage-DSf2vDDR.js +21 -0
  67. package/public/assets/{TaskGuidePage-C5Ed0gO0.js → TaskGuidePage-BW1rBO-9.js} +1 -1
  68. package/public/assets/{TaskListPage-CdajIIwz.js → TaskListPage-hB72kn3H.js} +1 -1
  69. package/public/assets/{TaskStatusBadge-CuTVIvqD.js → TaskStatusBadge-C_WHXkor.js} +1 -1
  70. package/public/assets/{TerminalHomePage-Cs3JoG8j.js → TerminalHomePage-DQ7h-pKm.js} +1 -1
  71. package/public/assets/{TokenManage-BeDY8n-U.js → TokenManage-BS68pVIn.js} +1 -1
  72. package/public/assets/{Tooltip-DjIk-pqB.js → Tooltip-CoGldvyP.js} +1 -1
  73. package/public/assets/{TotpSetupPage-C_NjLBdt.js → TotpSetupPage-DSO6vRsM.js} +1 -1
  74. package/public/assets/{WorkerDetailPage-CuuvI6Fx.js → WorkerDetailPage-CtSdGuiT.js} +1 -1
  75. package/public/assets/{WorkerListPage-70g7vy3m.js → WorkerListPage-BPjiOimX.js} +1 -1
  76. package/public/assets/{WorkerOperationsPage-BL4BZ45w.js → WorkerOperationsPage-S0sYpBVA.js} +1 -1
  77. package/public/assets/{WorkerSetupGuidePage-jnyL_uM0.js → WorkerSetupGuidePage-Cz8jZzlP.js} +1 -1
  78. package/public/assets/{WorkerSetupPage-ChyjqvnS.js → WorkerSetupPage-DP-Gua4N.js} +1 -1
  79. package/public/assets/agent-type-options-BO0L8qFm.js +1 -0
  80. package/public/assets/{arrow-left-BL1QzlAp.js → arrow-left-DsnDpdp1.js} +1 -1
  81. package/public/assets/{arrow-right-BrrN-7YA.js → arrow-right-SYbE07-f.js} +1 -1
  82. package/public/assets/{bot-D-zp4qz4.js → bot-Te-gb92X.js} +1 -1
  83. package/public/assets/{chevron-down-BOgq_PNA.js → chevron-down-BOM9LZkG.js} +1 -1
  84. package/public/assets/{chevron-left-BPO7Bb6l.js → chevron-left-D9tS8E5I.js} +1 -1
  85. package/public/assets/{chevron-right-DHCIokyJ.js → chevron-right-Cjz_w39s.js} +1 -1
  86. package/public/assets/{chevron-up-wO9VgMYB.js → chevron-up-DP7_Tzsv.js} +1 -1
  87. package/public/assets/{circle-alert-DkW4_zyQ.js → circle-alert-7ekwM0mg.js} +1 -1
  88. package/public/assets/{clock-BbJkwoCd.js → clock-BSGAvAVI.js} +1 -1
  89. package/public/assets/{copy-BBOWX6ou.js → copy-CYXyA9yV.js} +1 -1
  90. package/public/assets/{developer-options-PMfL5Zv7.js → developer-options-DMIpNxfA.js} +1 -1
  91. package/public/assets/{download-CbWraeN_.js → download-BiTSnXRZ.js} +1 -1
  92. package/public/assets/{external-link-CEkNn2LX.js → external-link-BjNbjJjr.js} +1 -1
  93. package/public/assets/{git-fork-B775P9bq.js → git-fork-Cl-h0DTv.js} +1 -1
  94. package/public/assets/{index-Dh1GMLID.js → index--5cyM8L1.js} +3 -3
  95. package/public/assets/{index-DwFw8jxe.css → index-CTXH5Ib6.css} +1 -1
  96. package/public/assets/{key-Dl9aLBg3.js → key-BzsEyvw2.js} +1 -1
  97. package/public/assets/{link-2-BBq5JW-o.js → link-2-CmHbsrSO.js} +1 -1
  98. package/public/assets/{loader-circle-wSNLBiy-.js → loader-circle-DgwRTB3H.js} +1 -1
  99. package/public/assets/{pencil-ZFPPMxtk.js → pencil-CxmtoC0o.js} +1 -1
  100. package/public/assets/{play-DX-9yzZV.js → play-Ba8VDpNy.js} +1 -1
  101. package/public/assets/{plug-BxGp3gAo.js → plug-B19phlnq.js} +1 -1
  102. package/public/assets/{plus-Cn46sPb9.js → plus-jUKyQIr2.js} +1 -1
  103. package/public/assets/{power-PnMndXJz.js → power-DQyycfkW.js} +1 -1
  104. package/public/assets/{rotate-ccw-zdevuzi_.js → rotate-ccw-EMxH_to4.js} +1 -1
  105. package/public/assets/{scroll-text-BGkAQAvr.js → scroll-text-pA_y69Ov.js} +1 -1
  106. package/public/assets/{settings-CfrsrJUV.js → settings-DAb4HsMD.js} +1 -1
  107. package/public/assets/{skip-forward-ckOfJ8QF.js → skip-forward-CqSyF3tK.js} +1 -1
  108. package/public/assets/{status-colors-DC-m2CdG.js → status-colors-B460F2ZH.js} +1 -1
  109. package/public/assets/{task-agent-ZWBurVoa.js → task-agent-Cx6Aibwn.js} +1 -1
  110. package/public/assets/{task-constants-DfpO4NY9.js → task-constants-BNLUt-jR.js} +1 -1
  111. package/public/assets/{task.store-B461yHYH.js → task.store-DzA1A6GX.js} +1 -1
  112. package/public/assets/{timer-BFPhC5N0.js → timer-DSCxqEFg.js} +1 -1
  113. package/public/assets/{trash-2-CaIOqYj_.js → trash-2-DKVPzjZC.js} +1 -1
  114. package/public/assets/{useFetch-CJMNf1mK.js → useFetch-O3XBp_Gw.js} +1 -1
  115. package/public/assets/{users-BCrPK5sS.js → users-2xZaXYNg.js} +1 -1
  116. package/public/assets/{wifi-Cm-x6iNY.js → wifi-BJaHHkkn.js} +1 -1
  117. package/public/assets/{workflow-Burj_14o.js → workflow-D7dtHNTX.js} +1 -1
  118. package/public/assets/{zap-BAYG3kyF.js → zap-BLh2ptQ-.js} +1 -1
  119. package/public/index.html +10 -2
  120. package/public/sw.js +1 -1
  121. package/public/assets/AgentCliPage-HVXHK2Or.js +0 -3
  122. package/public/assets/TaskDetailPage-CElleGRa.js +0 -21
  123. package/public/assets/agent-type-options-BpMI3Naw.js +0 -1
@@ -1,4 +1,4 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/LandingPage-BiMt64NW.js","assets/arrow-right-BrrN-7YA.js","assets/zap-BAYG3kyF.js","assets/bot-D-zp4qz4.js","assets/workflow-Burj_14o.js","assets/users-BCrPK5sS.js","assets/copy-BBOWX6ou.js","assets/HomePage-CssNquOH.js","assets/TaskStatusBadge-CuTVIvqD.js","assets/status-colors-DC-m2CdG.js","assets/Skeleton-DaeQHyTP.js","assets/OnboardingGuide-cHKCR0M5.js","assets/chevron-right-DHCIokyJ.js","assets/date-CmcdoD87.js","assets/useFetch-CJMNf1mK.js","assets/Tooltip-DjIk-pqB.js","assets/TerminalHomePage-Cs3JoG8j.js","assets/task-agent-ZWBurVoa.js","assets/task.store-B461yHYH.js","assets/PtyTerminal-Z14rUlQy.js","assets/PtyTerminal-6GBZ9nXN.css","assets/ConfirmStageDialog-DIsZM7QS.js","assets/clock-BbJkwoCd.js","assets/Select-LGk_EawR.js","assets/chevron-down-BOgq_PNA.js","assets/task-constants-DfpO4NY9.js","assets/agent-type-options-BpMI3Naw.js","assets/plus-Cn46sPb9.js","assets/chevron-up-wO9VgMYB.js","assets/rotate-ccw-zdevuzi_.js","assets/wifi-Cm-x6iNY.js","assets/TaskListPage-CdajIIwz.js","assets/git-fork-B775P9bq.js","assets/developer-options-PMfL5Zv7.js","assets/EmptyState-CMDagsi4.js","assets/chevron-left-BPO7Bb6l.js","assets/TaskDetailPage-CElleGRa.js","assets/Checkbox-CQt3GUhI.js","assets/arrow-left-BL1QzlAp.js","assets/play-DX-9yzZV.js","assets/external-link-CEkNn2LX.js","assets/loader-circle-wSNLBiy-.js","assets/skip-forward-ckOfJ8QF.js","assets/PlanPage-B7z3l_2F.js","assets/ReviewPage-CmbUljfI.js","assets/ReviewAggregatePage-tiy7PRsr.js","assets/circle-alert-DkW4_zyQ.js","assets/WorkerListPage-70g7vy3m.js","assets/MetricBar-kakUenDO.js","assets/WorkerSetupGuidePage-jnyL_uM0.js","assets/key-Dl9aLBg3.js","assets/download-CbWraeN_.js","assets/settings-CfrsrJUV.js","assets/WorkerDetailPage-CuuvI6Fx.js","assets/InfoRow-BxIE0xaA.js","assets/trash-2-CaIOqYj_.js","assets/ProjectListPage-Do-9PkUN.js","assets/ProjectDetailPage-CzLqL69C.js","assets/RemoveMemberConfirmDialog-DI3-C2N9.js","assets/pencil-ZFPPMxtk.js","assets/EditProjectPage-BC0UDNOv.js","assets/PipelineEditorPage-BeNxSKH5.js","assets/AutomationListPage-DxPUmPbs.js","assets/MultiSelect-CmPlPDVq.js","assets/automationFindings-DfyQvLZV.js","assets/timer-BFPhC5N0.js","assets/AutomationCreatePage-CajNO4bS.js","assets/AutomationDetailPage-Dgf3Tb9C.js","assets/power-PnMndXJz.js","assets/AutomationEditPage-DYaZj31T.js","assets/AutomationRunDetailPage-DmNxMDk5.js","assets/ProfilePage-DwsnCrys.js","assets/password-CHk45-jw.js","assets/AccessTokensPage-1EKC1hiZ.js","assets/CliReferencePage-D-PUOTbI.js","assets/DocsPrimitives-D7h19aXG.js","assets/QuickAuth-CX1phe7h.js","assets/ApiReferencePage-TgiwRipe.js","assets/SkillPage-BexkozUK.js","assets/DocsLayout-DLxSnG0D.js","assets/InstallationPage-CcJ0J1Zn.js","assets/DeveloperSetupPage-PXns-tkJ.js","assets/WorkerSetupPage-ChyjqvnS.js","assets/BotSetupPage-esAmTt5X.js","assets/LocalDevelopmentPage-D4FSxH3d.js","assets/DeploymentPage-BmfGIQ--.js","assets/PipelineConfigPage-BX6JMHM4.js","assets/DevWorkflowPage-BwP87xBb.js","assets/EnvVariablesPage-BB7ahnB1.js","assets/ArchitecturePage-BzeZql6h.js","assets/AgentCliPage-HVXHK2Or.js","assets/TaskGuidePage-C5Ed0gO0.js","assets/DocsIndexPage-DHYB2eq5.js","assets/plug-BxGp3gAo.js","assets/ConnectorsPage-Czxmo0rf.js","assets/AdminPage-51tboyFu.js","assets/scroll-text-BGkAQAvr.js","assets/DeveloperManage-Bu-dU6qo.js","assets/BotManage-96DyyPVc.js","assets/link-2-BBq5JW-o.js","assets/TokenManage-BeDY8n-U.js","assets/AuditLogPage-y6n7Px8g.js","assets/ConnectorsManage-v8CzbHwB.js"])))=>i.map(i=>d[i]);
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/LandingPage-BZ2OW2Tp.js","assets/arrow-right-SYbE07-f.js","assets/zap-BLh2ptQ-.js","assets/bot-Te-gb92X.js","assets/workflow-D7dtHNTX.js","assets/users-2xZaXYNg.js","assets/copy-CYXyA9yV.js","assets/HomePage-zVLfdxgB.js","assets/TaskStatusBadge-C_WHXkor.js","assets/status-colors-B460F2ZH.js","assets/Skeleton-Cxko1u3z.js","assets/OnboardingGuide-BZhFBXTO.js","assets/chevron-right-Cjz_w39s.js","assets/date-CmcdoD87.js","assets/useFetch-O3XBp_Gw.js","assets/Tooltip-CoGldvyP.js","assets/TerminalHomePage-DQ7h-pKm.js","assets/task-agent-Cx6Aibwn.js","assets/task.store-DzA1A6GX.js","assets/PtyTerminal-fX-mJfnE.js","assets/PtyTerminal-6GBZ9nXN.css","assets/ConfirmStageDialog-pDcoEYGK.js","assets/clock-BSGAvAVI.js","assets/Select-Buxh6kTz.js","assets/chevron-down-BOM9LZkG.js","assets/task-constants-BNLUt-jR.js","assets/agent-type-options-BO0L8qFm.js","assets/plus-jUKyQIr2.js","assets/chevron-up-DP7_Tzsv.js","assets/rotate-ccw-EMxH_to4.js","assets/wifi-BJaHHkkn.js","assets/TaskListPage-hB72kn3H.js","assets/git-fork-Cl-h0DTv.js","assets/developer-options-DMIpNxfA.js","assets/EmptyState-DCvtEuqr.js","assets/chevron-left-D9tS8E5I.js","assets/TaskDetailPage-DSf2vDDR.js","assets/Checkbox-Cv1IaY0N.js","assets/arrow-left-DsnDpdp1.js","assets/play-Ba8VDpNy.js","assets/external-link-BjNbjJjr.js","assets/loader-circle-DgwRTB3H.js","assets/skip-forward-CqSyF3tK.js","assets/PlanPage-Bi6aA-yb.js","assets/ReviewPage-B1moD3qH.js","assets/ReviewAggregatePage-vilyKtbQ.js","assets/circle-alert-7ekwM0mg.js","assets/WorkerListPage-BPjiOimX.js","assets/MetricBar-8IDBuyjQ.js","assets/WorkerSetupGuidePage-Cz8jZzlP.js","assets/key-BzsEyvw2.js","assets/download-BiTSnXRZ.js","assets/settings-DAb4HsMD.js","assets/WorkerDetailPage-CtSdGuiT.js","assets/InfoRow-0V76rcDX.js","assets/trash-2-DKVPzjZC.js","assets/ProjectListPage-BHkBlY4i.js","assets/ProjectDetailPage-Crv53lJf.js","assets/RemoveMemberConfirmDialog-DCvjYeqR.js","assets/pencil-CxmtoC0o.js","assets/EditProjectPage-C-i9mvrD.js","assets/PipelineEditorPage-BiDBe2GM.js","assets/AutomationListPage-Bhgxxu6_.js","assets/MultiSelect-DqMAwXWW.js","assets/automationFindings-DfyQvLZV.js","assets/timer-DSCxqEFg.js","assets/AutomationCreatePage-CWA--vuT.js","assets/AutomationDetailPage-BFNJn9l0.js","assets/power-DQyycfkW.js","assets/AutomationEditPage-y5p6I8v9.js","assets/AutomationRunDetailPage-eRVHSPgi.js","assets/ProfilePage-D3BwamWo.js","assets/password-CHk45-jw.js","assets/AccessTokensPage-BbryzvnM.js","assets/CliReferencePage-CcCgOSoY.js","assets/DocsPrimitives-BLjrk7dq.js","assets/QuickAuth-Bg6-rI5M.js","assets/ApiReferencePage-BawqrcYL.js","assets/SkillPage-BLXLZ_br.js","assets/DocsLayout-yhAysfLb.js","assets/InstallationPage-CF5KJSiH.js","assets/DeveloperSetupPage-CAUfLPib.js","assets/WorkerSetupPage-DP-Gua4N.js","assets/BotSetupPage-vF-1zbQt.js","assets/LocalDevelopmentPage-CHzphJ7-.js","assets/DeploymentPage-2CGTHVvc.js","assets/PipelineConfigPage-QOFAuIzF.js","assets/DevWorkflowPage-C9dwRqkd.js","assets/EnvVariablesPage-DHlRltEG.js","assets/ArchitecturePage-FWLevT4m.js","assets/AgentCliPage-SW_JKwzo.js","assets/TaskGuidePage-BW1rBO-9.js","assets/DocsIndexPage-_KFl66Pi.js","assets/plug-B19phlnq.js","assets/ConnectorsPage-DpvBzw0u.js","assets/AdminPage-BultWF7a.js","assets/scroll-text-pA_y69Ov.js","assets/DeveloperManage-CP4AFGVd.js","assets/BotManage-BwplAxcP.js","assets/link-2-CmHbsrSO.js","assets/TokenManage-BS68pVIn.js","assets/AuditLogPage-DrxyZ_N_.js","assets/ConnectorsManage-B8aIKAfR.js"])))=>i.map(i=>d[i]);
2
2
  var ay=Object.defineProperty;var eh=i=>{throw TypeError(i)};var ny=(i,o,s)=>o in i?ay(i,o,{enumerable:!0,configurable:!0,writable:!0,value:s}):i[o]=s;var Ge=(i,o,s)=>ny(i,typeof o!="symbol"?o+"":o,s),ys=(i,o,s)=>o.has(i)||eh("Cannot "+s);var L=(i,o,s)=>(ys(i,o,"read from private field"),s?s.call(i):o.get(i)),ea=(i,o,s)=>o.has(i)?eh("Cannot add the same private member more than once"):o instanceof WeakSet?o.add(i):o.set(i,s),Jt=(i,o,s,u)=>(ys(i,o,"write to private field"),u?u.call(i,s):o.set(i,s),s),ke=(i,o,s)=>(ys(i,o,"access private method"),s);var th=(i,o,s,u)=>({set _(f){Jt(i,o,f,s)},get _(){return L(i,o,u)}});(function(){const o=document.createElement("link").relList;if(o&&o.supports&&o.supports("modulepreload"))return;for(const f of document.querySelectorAll('link[rel="modulepreload"]'))u(f);new MutationObserver(f=>{for(const d of f)if(d.type==="childList")for(const p of d.addedNodes)p.tagName==="LINK"&&p.rel==="modulepreload"&&u(p)}).observe(document,{childList:!0,subtree:!0});function s(f){const d={};return f.integrity&&(d.integrity=f.integrity),f.referrerPolicy&&(d.referrerPolicy=f.referrerPolicy),f.crossOrigin==="use-credentials"?d.credentials="include":f.crossOrigin==="anonymous"?d.credentials="omit":d.credentials="same-origin",d}function u(f){if(f.ep)return;f.ep=!0;const d=s(f);fetch(f.href,d)}})();function ly(i){return i&&i.__esModule&&Object.prototype.hasOwnProperty.call(i,"default")?i.default:i}var vs={exports:{}},ai={};/**
3
3
  * @license React
4
4
  * react-jsx-runtime.production.js
@@ -253,10 +253,10 @@ Please change the parent <Route path="${U}"> to <Route path="${U==="/"?"*":`${U}
253
253
  *
254
254
  * This source code is licensed under the ISC license.
255
255
  * See the LICENSE file in the root directory of this source tree.
256
- */const rp=ye("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]),bh=i=>{let o;const s=new Set,u=(_,E)=>{const S=typeof _=="function"?_(o):_;if(!Object.is(S,o)){const D=o;o=E??(typeof S!="object"||S===null)?S:Object.assign({},o,S),s.forEach(Y=>Y(o,D))}},f=()=>o,v={setState:u,getState:f,getInitialState:()=>y,subscribe:_=>(s.add(_),()=>s.delete(_))},y=o=i(u,f,v);return v},Eb=(i=>i?bh(i):bh),Tb=i=>i;function jb(i,o=Tb){const s=Cr.useSyncExternalStore(i.subscribe,Cr.useCallback(()=>o(i.getState()),[i,o]),Cr.useCallback(()=>o(i.getInitialState()),[i,o]));return Cr.useDebugValue(s),s}const xh=i=>{const o=Eb(i),s=u=>jb(o,u);return Object.assign(s,o),s},di=(i=>i?xh(i):xh),Dr="overlord-access-token",Nr="overlord-refresh-token",Fe={getAccessToken(){return localStorage.getItem(Dr)},setAccessToken(i){localStorage.setItem(Dr,i)},getRefreshToken(){return localStorage.getItem(Nr)},setRefreshToken(i){localStorage.setItem(Nr,i)},setTokens(i,o){localStorage.setItem(Dr,i),localStorage.setItem(Nr,o)},clearTokens(){localStorage.removeItem(Dr),localStorage.removeItem(Nr)},parseToken(i){try{const o=i.split(".")[1];return JSON.parse(atob(o))}catch{return null}},hasScope(i,o){const s=Fe.parseToken(i);return s?s.scope===o:!1},isExpired(i){const o=Fe.parseToken(i);return!o||typeof o.exp!="number"?!0:Date.now()/1e3>o.exp-30}};function Rs(i){const o=Fe.parseToken(i);if(!o)return null;const s=o.name??"";return{id:o.sub,username:s,display_name:s,role:o.role}}const Sa=di((i,o)=>({accessToken:null,user:null,requireTotpSetup:!1,sessionExpired:!1,initializing:!0,initialize:()=>{const s=Fe.getAccessToken();s&&!Fe.isExpired(s)?i({accessToken:s,user:Rs(s),requireTotpSetup:Fe.hasScope(s,"totp_setup"),initializing:!1}):Fe.getRefreshToken()?o().refresh().catch(()=>{Fe.clearTokens()}).finally(()=>{i({initializing:!1})}):i({initializing:!1})},login:async s=>{var d;const u=await fetch("/api/auth/login",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(s)});if(!u.ok){const p=await u.json().catch(()=>({message:"Login failed"})),v=((d=p.error)==null?void 0:d.message)??p.message??"Login failed";throw new Error(v)}const f=await u.json();if(f.totpSetup){Fe.setAccessToken(f.accessToken),i({accessToken:f.accessToken,user:null,requireTotpSetup:!0});return}Fe.setTokens(f.accessToken,f.refreshToken),i({accessToken:f.accessToken,user:Rs(f.accessToken),requireTotpSetup:!1,sessionExpired:!1})},logout:()=>{const s=Fe.getRefreshToken();s&&fetch("/api/auth/logout",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({refreshToken:s})}).catch(()=>{}),Fe.clearTokens(),i({accessToken:null,user:null,requireTotpSetup:!1,sessionExpired:!1})},refresh:(()=>{let s=null;return async()=>s||(s=(async()=>{const u=Fe.getRefreshToken();if(!u)throw Fe.clearTokens(),i({accessToken:null,user:null,requireTotpSetup:!1,sessionExpired:!0}),new Error("No refresh token");let f=null;for(let d=0;d<2;d++)try{const p=await fetch("/api/auth/refresh",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({refreshToken:u})});if(!p.ok){if(f=new Error(`Refresh failed: ${p.status}`),d===0){await new Promise(y=>setTimeout(y,1e3));continue}break}const v=await p.json();Fe.setTokens(v.accessToken,v.refreshToken),i({accessToken:v.accessToken,user:Rs(v.accessToken)});return}catch(p){if(f=p instanceof Error?p:new Error(String(p)),d===0){await new Promise(v=>setTimeout(v,1e3));continue}}throw Fe.clearTokens(),i({accessToken:null,user:null,requireTotpSetup:!1,sessionExpired:!0}),f??new Error("Refresh failed")})().finally(()=>{s=null}),s)})(),setSessionExpired:s=>{i({sessionExpired:s})}})),ax={QUEUED:"QUEUED",ASSIGNED:"ASSIGNED",RUNNING:"RUNNING",SUSPENDED:"SUSPENDED",COMPLETED:"COMPLETED",FAILED:"FAILED",CANCELLED:"CANCELLED"},nx={ONLINE:"online",OFFLINE:"offline",DRAINING:"draining",DECOMMISSIONED:"decommissioned"},op={DEVELOPER:"developer",LEAD:"lead",ADMIN:"admin"},lx={MAINTAINER:"maintainer",MEMBER:"member"},ix={CLAUDE:"claude",CURSOR:"cursor",CODEX:"codex",PI:"pi"},rx={ACTIVE:"active",USED:"used",REVOKED:"revoked",EXPIRED:"expired"},ox={GITLAB:"gitlab",GITHUB:"github",GITEA:"gitea"},ux={ACTIVE:"active",DISABLED:"disabled"},sx={ACTIVE:"active"},cx={DEVELOP:"develop",PLAN:"plan",REVIEW:"review",AUTOMATION:"automation"},fx={IDLE:"IDLE",STARTING:"STARTING",CONNECTED:"CONNECTED",EXPIRED:"EXPIRED",CLOSING:"CLOSING",CLOSED:"CLOSED"};function Rb(){return Sa(i=>{var o;return((o=i.user)==null?void 0:o.role)===op.ADMIN})??!1}const up="overlord-sidebar-collapsed";function Ab(){try{return localStorage.getItem(up)==="true"}catch{return!1}}const zb=di((i,o)=>({sidebarCollapsed:Ab(),toggleSidebar:()=>{const s=!o().sidebarCollapsed;try{localStorage.setItem(up,String(s))}catch{}i({sidebarCollapsed:s})}}));class Cb{constructor(){Ge(this,"ws",null);Ge(this,"reconnectAttempts",0);Ge(this,"maxReconnectAttempts",15);Ge(this,"reconnectTimer",null);Ge(this,"disposed",!1);Ge(this,"authenticated",!1);Ge(this,"eventHandlers",new Set);Ge(this,"statusHandlers",new Set)}onEvent(o){return this.eventHandlers.add(o),()=>this.eventHandlers.delete(o)}onStatus(o){return this.statusHandlers.add(o),()=>this.statusHandlers.delete(o)}get isConnected(){var o;return this.authenticated&&((o=this.ws)==null?void 0:o.readyState)===WebSocket.OPEN}connect(){var f,d;if(this.disposed||((f=this.ws)==null?void 0:f.readyState)===WebSocket.OPEN||((d=this.ws)==null?void 0:d.readyState)===WebSocket.CONNECTING)return;const o=Fe.getAccessToken();if(!o||Fe.isExpired(o))return;const u=`${window.location.protocol==="https:"?"wss:":"ws:"}//${window.location.host}/ws/events`;this.notifyStatus("connecting"),this.authenticated=!1,this.ws=new WebSocket(u),this.ws.onopen=()=>{var v,y;const p=Fe.getAccessToken();p?(v=this.ws)==null||v.send(JSON.stringify({type:"auth",token:p})):(y=this.ws)==null||y.close()},this.ws.onmessage=p=>{var v;if(typeof p.data=="string")try{const y=JSON.parse(p.data);if(y.type==="auth_ok"){this.authenticated=!0,this.reconnectAttempts=0,this.notifyStatus("connected");return}if(y.type==="auth_error"){(v=this.ws)==null||v.close();return}if(y.type==="event")for(const _ of this.eventHandlers)try{_(y)}catch{}}catch{}},this.ws.onclose=()=>{this.authenticated=!1,this.notifyStatus("disconnected"),this.scheduleReconnect()},this.ws.onerror=()=>{var p;(p=this.ws)==null||p.close()}}disconnect(){var o;this.clearReconnectTimer(),this.authenticated=!1,(o=this.ws)==null||o.close(),this.ws=null}dispose(){this.disposed=!0,this.disconnect(),this.eventHandlers.clear(),this.statusHandlers.clear()}reconnect(){this.disconnect(),this.reconnectAttempts=0,this.connect()}scheduleReconnect(){if(this.disposed||this.reconnectAttempts>=this.maxReconnectAttempts)return;const o=Math.min(1e3*2**this.reconnectAttempts,3e4);this.reconnectAttempts++,this.reconnectTimer=setTimeout(()=>{this.disposed||this.connect()},o)}clearReconnectTimer(){this.reconnectTimer&&(clearTimeout(this.reconnectTimer),this.reconnectTimer=null)}notifyStatus(o){for(const s of this.statusHandlers)try{s(o)}catch{}}}const Mr=new Cb;class Ns extends Error{constructor(s,u,f){const d=s.status||s.status===0?s.status:"",p=s.statusText??"",v=`${d} ${p}`.trim(),y=v?`status code ${v}`:"an unknown error";super(`Request failed with ${y}: ${u.method} ${u.url}`);Ge(this,"response");Ge(this,"request");Ge(this,"options");this.name="HTTPError",this.response=s,this.request=u,this.options=f}}class sp extends Error{constructor(s){let u="Non-error value was thrown";try{typeof s=="string"?u=s:s&&typeof s=="object"&&"message"in s&&typeof s.message=="string"&&(u=s.message)}catch{}super(u);Ge(this,"name","NonError");Ge(this,"value");this.value=s}}class As extends Error{constructor(s){const u=s!=null&&s.cause?s.cause instanceof Error?s.cause:new sp(s.cause):void 0;super(s!=null&&s.code?`Forced retry: ${s.code}`:"Forced retry",u?{cause:u}:void 0);Ge(this,"name","ForceRetryError");Ge(this,"customDelay");Ge(this,"code");Ge(this,"customRequest");this.customDelay=s==null?void 0:s.delay,this.code=s==null?void 0:s.code,this.customRequest=s==null?void 0:s.request}}const Sh=(()=>{let i=!1,o=!1;const s=typeof globalThis.ReadableStream=="function",u=typeof globalThis.Request=="function";if(s&&u)try{o=new globalThis.Request("https://empty.invalid",{body:new globalThis.ReadableStream,method:"POST",get duplex(){return i=!0,"half"}}).headers.has("Content-Type")}catch(f){if(f instanceof Error&&f.message==="unsupported BodyInit type")return!1;throw f}return i&&!o})(),Ob=typeof globalThis.AbortController=="function",cp=typeof globalThis.AbortSignal=="function"&&typeof globalThis.AbortSignal.any=="function",Db=typeof globalThis.ReadableStream=="function",Nb=typeof globalThis.FormData=="function",fp=["get","post","put","patch","head","delete"],Mb={json:"application/json",text:"text/*",formData:"multipart/form-data",arrayBuffer:"*/*",blob:"*/*",bytes:"*/*"},zs=2147483647,Ub=new TextEncoder().encode("------WebKitFormBoundaryaxpyiPgbbPti10Rw").length,dp=Symbol("stop");class mp{constructor(o){Ge(this,"options");this.options=o}}const Lb=i=>new mp(i),qb={json:!0,parseJson:!0,stringifyJson:!0,searchParams:!0,prefixUrl:!0,retry:!0,timeout:!0,hooks:!0,throwHttpErrors:!0,onDownloadProgress:!0,onUploadProgress:!0,fetch:!0,context:!0},Hb={next:!0},Bb={method:!0,headers:!0,body:!0,mode:!0,credentials:!0,cache:!0,redirect:!0,referrer:!0,referrerPolicy:!0,integrity:!0,keepalive:!0,signal:!0,window:!0,duplex:!0},Yb=i=>{if(!i)return 0;if(i instanceof FormData){let o=0;for(const[s,u]of i)o+=Ub,o+=new TextEncoder().encode(`Content-Disposition: form-data; name="${s}"`).length,o+=typeof u=="string"?new TextEncoder().encode(u).length:u.size;return o}if(i instanceof Blob)return i.size;if(i instanceof ArrayBuffer)return i.byteLength;if(typeof i=="string")return new TextEncoder().encode(i).length;if(i instanceof URLSearchParams)return new TextEncoder().encode(i.toString()).length;if("byteLength"in i)return i.byteLength;if(typeof i=="object"&&i!==null)try{const o=JSON.stringify(i);return new TextEncoder().encode(o).length}catch{return 0}return 0},hp=(i,o,s)=>{let u,f=0;return i.pipeThrough(new TransformStream({transform(d,p){if(p.enqueue(d),u){f+=u.byteLength;let v=o===0?0:f/o;v>=1&&(v=1-Number.EPSILON),s==null||s({percent:v,totalBytes:Math.max(o,f),transferredBytes:f},u)}u=d},flush(){u&&(f+=u.byteLength,s==null||s({percent:1,totalBytes:Math.max(o,f),transferredBytes:f},u))}}))},Vb=(i,o)=>{if(!i.body)return i;if(i.status===204)return new Response(null,{status:i.status,statusText:i.statusText,headers:i.headers});const s=Math.max(0,Number(i.headers.get("content-length"))||0);return new Response(hp(i.body,s,o),{status:i.status,statusText:i.statusText,headers:i.headers})},Gb=(i,o,s)=>{if(!i.body)return i;const u=Yb(s??i.body);return new Request(i,{duplex:"half",body:hp(i.body,u,o)})},vn=i=>i!==null&&typeof i=="object",Ur=(...i)=>{for(const o of i)if((!vn(o)||Array.isArray(o))&&o!==void 0)throw new TypeError("The `options` argument must be an object");return Ws({},...i)},pp=(i={},o={})=>{const s=new globalThis.Headers(i),u=o instanceof globalThis.Headers,f=new globalThis.Headers(o);for(const[d,p]of f.entries())u&&p==="undefined"||p===void 0?s.delete(d):s.set(d,p);return s};function Lr(i,o,s){return Object.hasOwn(o,s)&&o[s]===void 0?[]:Ws(i[s]??[],o[s]??[])}const _p=(i={},o={})=>({beforeRequest:Lr(i,o,"beforeRequest"),beforeRetry:Lr(i,o,"beforeRetry"),afterResponse:Lr(i,o,"afterResponse"),beforeError:Lr(i,o,"beforeError")}),Xb=(i,o)=>{const s=new URLSearchParams;for(const u of[i,o])if(u!==void 0)if(u instanceof URLSearchParams)for(const[f,d]of u.entries())s.append(f,d);else if(Array.isArray(u))for(const f of u){if(!Array.isArray(f)||f.length!==2)throw new TypeError("Array search parameters must be provided in [[key, value], ...] format");s.append(String(f[0]),String(f[1]))}else if(vn(u))for(const[f,d]of Object.entries(u))d!==void 0&&s.append(f,String(d));else{const f=new URLSearchParams(u);for(const[d,p]of f.entries())s.append(d,p)}return s},Ws=(...i)=>{let o={},s={},u={},f;const d=[];for(const p of i)if(Array.isArray(p))Array.isArray(o)||(o=[]),o=[...o,...p];else if(vn(p)){for(let[v,y]of Object.entries(p)){if(v==="signal"&&y instanceof globalThis.AbortSignal){d.push(y);continue}if(v==="context"){if(y!=null&&(!vn(y)||Array.isArray(y)))throw new TypeError("The `context` option must be an object");o={...o,context:y==null?{}:{...o.context,...y}};continue}if(v==="searchParams"){y==null?f=void 0:f=f===void 0?y:Xb(f,y);continue}vn(y)&&v in o&&(y=Ws(o[v],y)),o={...o,[v]:y}}vn(p.hooks)&&(u=_p(u,p.hooks),o.hooks=u),vn(p.headers)&&(s=pp(s,p.headers),o.headers=s)}return f!==void 0&&(o.searchParams=f),d.length>0&&(d.length===1?o.signal=d[0]:cp?o.signal=AbortSignal.any(d):o.signal=d.at(-1)),o},Qb=i=>fp.includes(i)?i.toUpperCase():i,Zb=["get","put","head","delete","options","trace"],Kb=[408,413,429,500,502,503,504],Jb=[413,429,503],kh={limit:2,methods:Zb,statusCodes:Kb,afterStatusCodes:Jb,maxRetryAfter:Number.POSITIVE_INFINITY,backoffLimit:Number.POSITIVE_INFINITY,delay:i=>.3*2**(i-1)*1e3,jitter:void 0,retryOnTimeout:!1},$b=(i={})=>{if(typeof i=="number")return{...kh,limit:i};if(i.methods&&!Array.isArray(i.methods))throw new Error("retry.methods must be an array");if(i.methods&&(i.methods=i.methods.map(s=>s.toLowerCase())),i.statusCodes&&!Array.isArray(i.statusCodes))throw new Error("retry.statusCodes must be an array");const o=Object.fromEntries(Object.entries(i).filter(([,s])=>s!==void 0));return{...kh,...o}};class Ms extends Error{constructor(s){super(`Request timed out: ${s.method} ${s.url}`);Ge(this,"request");this.name="TimeoutError",this.request=s}}async function Wb(i,o,s,u){return new Promise((f,d)=>{const p=setTimeout(()=>{s&&s.abort(),d(new Ms(i))},u.timeout);u.fetch(i,o).then(f).catch(d).then(()=>{clearTimeout(p)})})}async function Fb(i,{signal:o}){return new Promise((s,u)=>{o&&(o.throwIfAborted(),o.addEventListener("abort",f,{once:!0}));function f(){clearTimeout(d),u(o.reason)}const d=setTimeout(()=>{o==null||o.removeEventListener("abort",f),s()},i)})}const Ib=(i,o)=>{const s={};for(const u in o)Object.hasOwn(o,u)&&!(u in Bb)&&!(u in qb)&&(!(u in i)||u in Hb)&&(s[u]=o[u]);return s},Pb=i=>i===void 0?!1:Array.isArray(i)?i.length>0:i instanceof URLSearchParams?i.size>0:typeof i=="object"?Object.keys(i).length>0:typeof i=="string"?i.trim().length>0:!!i;function e0(i){return i instanceof Ns||(i==null?void 0:i.name)===Ns.name}function t0(i){return i instanceof Ms||(i==null?void 0:i.name)===Ms.name}var $r,gp,$t,Yt,ot,Q,Wa,ta,bn,ue,Gr,yp,Us,Xr,$a,Ls,vp,oi,Qr,qs;const ui=class ui{constructor(o,s={}){ea(this,ue);Ge(this,"request");ea(this,$t);ea(this,Yt,0);ea(this,ot);ea(this,Q);ea(this,Wa);ea(this,ta);ea(this,bn);var f,d,p;if(Jt(this,ot,o),Jt(this,Q,{...s,headers:pp(L(this,ot).headers,s.headers),hooks:_p({beforeRequest:[],beforeRetry:[],beforeError:[],afterResponse:[]},s.hooks),method:Qb(s.method??L(this,ot).method??"GET"),prefixUrl:String(s.prefixUrl||""),retry:$b(s.retry),throwHttpErrors:s.throwHttpErrors??!0,timeout:s.timeout??1e4,fetch:s.fetch??globalThis.fetch.bind(globalThis),context:s.context??{}}),typeof L(this,ot)!="string"&&!(L(this,ot)instanceof URL||L(this,ot)instanceof globalThis.Request))throw new TypeError("`input` must be a string, URL, or Request");if(L(this,Q).prefixUrl&&typeof L(this,ot)=="string"){if(L(this,ot).startsWith("/"))throw new Error("`input` must not begin with a slash when using `prefixUrl`");L(this,Q).prefixUrl.endsWith("/")||(L(this,Q).prefixUrl+="/"),Jt(this,ot,L(this,Q).prefixUrl+L(this,ot))}Ob&&cp&&(Jt(this,ta,L(this,Q).signal??L(this,ot).signal),Jt(this,$t,new globalThis.AbortController),L(this,Q).signal=L(this,ta)?AbortSignal.any([L(this,ta),L(this,$t).signal]):L(this,$t).signal),Sh&&(L(this,Q).duplex="half"),L(this,Q).json!==void 0&&(L(this,Q).body=((d=(f=L(this,Q)).stringifyJson)==null?void 0:d.call(f,L(this,Q).json))??JSON.stringify(L(this,Q).json),L(this,Q).headers.set("content-type",L(this,Q).headers.get("content-type")??"application/json"));const u=s.headers&&new globalThis.Headers(s.headers).has("content-type");if(L(this,ot)instanceof globalThis.Request&&(Nb&&L(this,Q).body instanceof globalThis.FormData||L(this,Q).body instanceof URLSearchParams)&&!u&&L(this,Q).headers.delete("content-type"),this.request=new globalThis.Request(L(this,ot),L(this,Q)),Pb(L(this,Q).searchParams)){const y="?"+(typeof L(this,Q).searchParams=="string"?L(this,Q).searchParams.replace(/^\?/,""):new URLSearchParams(ke(p=ui,$r,gp).call(p,L(this,Q).searchParams)).toString()),_=this.request.url.replace(/(?:\?.*?)?(?=#|$)/,y);this.request=new globalThis.Request(_,L(this,Q))}if(L(this,Q).onUploadProgress){if(typeof L(this,Q).onUploadProgress!="function")throw new TypeError("The `onUploadProgress` option must be a function");if(!Sh)throw new Error("Request streams are not supported in your environment. The `duplex` option for `Request` is not available.");this.request=ke(this,ue,qs).call(this,this.request,L(this,Q).body??void 0)}}static create(o,s){var p,v,y;const u=new ui(o,s),f=async()=>{var E,S,D,Y,q,H,B,U,K,X,oe,ce;if(typeof L(u,Q).timeout=="number"&&L(u,Q).timeout>zs)throw new RangeError(`The \`timeout\` option cannot be greater than ${zs}`);await Promise.resolve();let _=await ke(E=u,ue,vp).call(E);for(const _e of L(u,Q).hooks.afterResponse){const I=ke(S=u,ue,Us).call(S,_.clone());let F;try{F=await _e(u.request,ke(D=u,ue,oi).call(D),I,{retryCount:L(u,Yt)})}catch(et){throw ke(Y=u,ue,$a).call(Y,I),ke(q=u,ue,$a).call(q,_),et}if(F instanceof mp)throw ke(H=u,ue,$a).call(H,I),ke(B=u,ue,$a).call(B,_),new As(F.options);const se=F instanceof globalThis.Response?F:_;I!==se&&ke(U=u,ue,$a).call(U,I),_!==se&&ke(K=u,ue,$a).call(K,_),_=se}if(ke(X=u,ue,Us).call(X,_),!_.ok&&(typeof L(u,Q).throwHttpErrors=="function"?L(u,Q).throwHttpErrors(_.status):L(u,Q).throwHttpErrors)){let _e=new Ns(_,u.request,ke(oe=u,ue,oi).call(oe));for(const I of L(u,Q).hooks.beforeError)_e=await I(_e,{retryCount:L(u,Yt)});throw _e}if(L(u,Q).onDownloadProgress){if(typeof L(u,Q).onDownloadProgress!="function")throw new TypeError("The `onDownloadProgress` option must be a function");if(!Db)throw new Error("Streams are not supported in your environment. `ReadableStream` is missing.");const _e=_.clone();return ke(ce=u,ue,$a).call(ce,_),Vb(_e,L(u,Q).onDownloadProgress)}return _},d=ke(p=u,ue,Ls).call(p,f).finally(()=>{var E,S;const _=L(u,Wa);ke(E=u,ue,Xr).call(E,(_==null?void 0:_.body)??void 0),ke(S=u,ue,Xr).call(S,u.request.body??void 0)});for(const[_,E]of Object.entries(Mb))_==="bytes"&&typeof((y=(v=globalThis.Response)==null?void 0:v.prototype)==null?void 0:y.bytes)!="function"||(d[_]=async()=>{u.request.headers.set("accept",u.request.headers.get("accept")||E);const S=await d;if(_==="json"){if(S.status===204)return"";const D=await S.text();return D===""?"":s.parseJson?s.parseJson(D):JSON.parse(D)}return S[_]()});return d}};$r=new WeakSet,gp=function(o){return o&&typeof o=="object"&&!Array.isArray(o)&&!(o instanceof URLSearchParams)?Object.fromEntries(Object.entries(o).filter(([,s])=>s!==void 0)):o},$t=new WeakMap,Yt=new WeakMap,ot=new WeakMap,Q=new WeakMap,Wa=new WeakMap,ta=new WeakMap,bn=new WeakMap,ue=new WeakSet,Gr=function(){const o=L(this,Q).retry.delay(L(this,Yt));let s=o;L(this,Q).retry.jitter===!0?s=Math.random()*o:typeof L(this,Q).retry.jitter=="function"&&(s=L(this,Q).retry.jitter(o),(!Number.isFinite(s)||s<0)&&(s=o));const u=L(this,Q).retry.backoffLimit??Number.POSITIVE_INFINITY;return Math.min(u,s)},yp=async function(o){if(th(this,Yt)._++,L(this,Yt)>L(this,Q).retry.limit)throw o;const s=o instanceof Error?o:new sp(o);if(s instanceof As)return s.customDelay??ke(this,ue,Gr).call(this);if(!L(this,Q).retry.methods.includes(this.request.method.toLowerCase()))throw o;if(L(this,Q).retry.shouldRetry!==void 0){const u=await L(this,Q).retry.shouldRetry({error:s,retryCount:L(this,Yt)});if(u===!1)throw o;if(u===!0)return ke(this,ue,Gr).call(this)}if(t0(o)&&!L(this,Q).retry.retryOnTimeout)throw o;if(e0(o)){if(!L(this,Q).retry.statusCodes.includes(o.response.status))throw o;const u=o.response.headers.get("Retry-After")??o.response.headers.get("RateLimit-Reset")??o.response.headers.get("X-RateLimit-Retry-After")??o.response.headers.get("X-RateLimit-Reset")??o.response.headers.get("X-Rate-Limit-Reset");if(u&&L(this,Q).retry.afterStatusCodes.includes(o.response.status)){let f=Number(u)*1e3;Number.isNaN(f)?f=Date.parse(u)-Date.now():f>=Date.parse("2024-01-01")&&(f-=Date.now());const d=L(this,Q).retry.maxRetryAfter??f;return f<d?f:d}if(o.response.status===413)throw o}return ke(this,ue,Gr).call(this)},Us=function(o){return L(this,Q).parseJson&&(o.json=async()=>L(this,Q).parseJson(await o.text())),o},Xr=function(o){o&&o.cancel().catch(()=>{})},$a=function(o){ke(this,ue,Xr).call(this,o.body??void 0)},Ls=async function(o){try{return await o()}catch(s){const u=Math.min(await ke(this,ue,yp).call(this,s),zs);if(L(this,Yt)<1)throw s;if(await Fb(u,L(this,ta)?{signal:L(this,ta)}:{}),s instanceof As&&s.customRequest){const f=L(this,Q).signal?new globalThis.Request(s.customRequest,{signal:L(this,Q).signal}):new globalThis.Request(s.customRequest);ke(this,ue,Qr).call(this,f)}for(const f of L(this,Q).hooks.beforeRetry){const d=await f({request:this.request,options:ke(this,ue,oi).call(this),error:s,retryCount:L(this,Yt)});if(d instanceof globalThis.Request){ke(this,ue,Qr).call(this,d);break}if(d instanceof globalThis.Response)return d;if(d===dp)return}return ke(this,ue,Ls).call(this,o)}},vp=async function(){var s;(s=L(this,$t))!=null&&s.signal.aborted&&(Jt(this,$t,new globalThis.AbortController),L(this,Q).signal=L(this,ta)?AbortSignal.any([L(this,ta),L(this,$t).signal]):L(this,$t).signal,this.request=new globalThis.Request(this.request,{signal:L(this,Q).signal}));for(const u of L(this,Q).hooks.beforeRequest){const f=await u(this.request,ke(this,ue,oi).call(this),{retryCount:L(this,Yt)});if(f instanceof Response)return f;if(f instanceof globalThis.Request){ke(this,ue,Qr).call(this,f);break}}const o=Ib(this.request,L(this,Q));return Jt(this,Wa,this.request),this.request=L(this,Wa).clone(),L(this,Q).timeout===!1?L(this,Q).fetch(L(this,Wa),o):Wb(L(this,Wa),o,L(this,$t),L(this,Q))},oi=function(){if(!L(this,bn)){const{hooks:o,...s}=L(this,Q);Jt(this,bn,Object.freeze(s))}return L(this,bn)},Qr=function(o){Jt(this,bn,void 0),this.request=ke(this,ue,qs).call(this,o)},qs=function(o,s){return!L(this,Q).onUploadProgress||!o.body?o:Gb(o,L(this,Q).onUploadProgress,s??L(this,Q).body??void 0)},ea(ui,$r);let Jr=ui;/*! MIT License © Sindre Sorhus */const Hs=i=>{const o=(s,u)=>Jr.create(s,Ur(i,u));for(const s of fp)o[s]=(u,f)=>Jr.create(u,Ur(i,f,{method:s}));return o.create=s=>Hs(Ur(s)),o.extend=s=>(typeof s=="function"&&(s=s(i??{})),Hs(Ur(i,s))),o.stop=dp,o.retry=Lb,o},wh=Hs();let qr=null;const We=wh.create({prefixUrl:"/api",timeout:3e4,hooks:{beforeRequest:[i=>{const o=Sa.getState().accessToken;o&&i.headers.set("Authorization",`Bearer ${o}`)}],afterResponse:[async(i,o,s)=>{if(s.status===401&&!i.headers.has("X-Retry-After-Refresh")){qr||(qr=Sa.getState().refresh().finally(()=>{qr=null}));try{await qr}catch{throw s}const u=Sa.getState().accessToken;return u&&i.headers.set("Authorization",`Bearer ${u}`),i.headers.set("X-Retry-After-Refresh","1"),wh(i,o)}}]}}),Fs=di((i,o)=>({automations:[],currentAutomation:null,runs:[],templates:[],inboxUnreadCount:0,loading:!1,error:null,nextCursor:null,_fetchAbort:null,_fetchRequestId:0,_runFetchAbort:null,_runFetchRequestId:0,_accessibleProjectKeys:null,_lastRunQuery:null,fetchAutomations:async s=>{const u=o()._fetchAbort;u&&u.abort();const f=new AbortController,d=o()._fetchRequestId+1;i({loading:!0,error:null,_fetchAbort:f,_fetchRequestId:d});try{const p={};s!=null&&s.projectKey&&(p.projectKey=s.projectKey),(s==null?void 0:s.enabled)!==void 0&&(p.enabled=String(s.enabled)),s!=null&&s.triggerType&&(p.triggerType=s.triggerType),s!=null&&s.limit&&(p.limit=String(s.limit)),s!=null&&s.cursor&&(p.cursor=String(s.cursor));const v=await We.get("web/automations",{searchParams:p,signal:f.signal}).json();if(o()._fetchRequestId!==d)return;i({automations:v,_fetchAbort:null})}catch(p){if(p instanceof DOMException&&p.name==="AbortError")return;o()._fetchRequestId===d&&i({error:p instanceof Error?p.message:"failed to fetch automations"})}finally{o()._fetchRequestId===d&&i({loading:!1,_fetchAbort:null})}},fetchAutomation:async s=>{i({loading:!0,error:null});try{const u=await We.get(`web/automations/${s}`).json();i({currentAutomation:u})}catch(u){i({error:u instanceof Error?u.message:"failed to fetch automation"})}finally{i({loading:!1})}},createAutomation:async s=>{i({error:null});try{const u=await We.post("web/automations",{json:s}).json();return i(f=>({automations:[u,...f.automations]})),u}catch(u){throw i({error:u instanceof Error?u.message:"failed to create automation"}),u}},updateAutomation:async(s,u)=>{i({error:null});try{const f=await We.patch(`web/automations/${s}`,{json:u}).json();return i(d=>{var p;return{automations:d.automations.map(v=>v.id===s?f:v),currentAutomation:((p=d.currentAutomation)==null?void 0:p.id)===s?f:d.currentAutomation}}),f}catch(f){throw i({error:f instanceof Error?f.message:"failed to update automation"}),f}},deleteAutomation:async s=>{i({error:null});try{await We.delete(`web/automations/${s}`),i(u=>{var f;return{automations:u.automations.filter(d=>d.id!==s),currentAutomation:((f=u.currentAutomation)==null?void 0:f.id)===s?null:u.currentAutomation}})}catch(u){throw i({error:u instanceof Error?u.message:"failed to delete automation"}),u}},enableAutomation:async s=>{i({error:null});try{const u=await We.post(`web/automations/${s}/enable`).json();i(f=>{var d;return{automations:f.automations.map(p=>p.id===s?u:p),currentAutomation:((d=f.currentAutomation)==null?void 0:d.id)===s?u:f.currentAutomation}})}catch(u){throw i({error:u instanceof Error?u.message:"failed to enable automation"}),u}},disableAutomation:async s=>{i({error:null});try{const u=await We.post(`web/automations/${s}/disable`).json();i(f=>{var d;return{automations:f.automations.map(p=>p.id===s?u:p),currentAutomation:((d=f.currentAutomation)==null?void 0:d.id)===s?u:f.currentAutomation}})}catch(u){throw i({error:u instanceof Error?u.message:"failed to disable automation"}),u}},triggerAutomation:async s=>{i({error:null});try{await We.post(`web/automations/${s}/trigger`)}catch(u){throw i({error:u instanceof Error?u.message:"failed to trigger automation"}),u}},fetchRuns:async s=>{const u=o()._runFetchAbort;u&&u.abort();const f=new AbortController,d=o()._runFetchRequestId+1;i({loading:!0,error:null,_lastRunQuery:s??null,_runFetchAbort:f,_runFetchRequestId:d});try{const p={};(s==null?void 0:s.automationId)!==void 0&&(p.automationId=String(s.automationId)),s!=null&&s.inboxStatus&&(p.inboxStatus=s.inboxStatus),(s==null?void 0:s.hasFindings)!==void 0&&(p.hasFindings=String(s.hasFindings)),s!=null&&s.status&&(p.status=s.status),s!=null&&s.limit&&(p.limit=String(s.limit)),s!=null&&s.cursor&&(p.cursor=String(s.cursor));const v=await We.get("web/automation-runs",{searchParams:p,signal:f.signal}).json();if(o()._runFetchRequestId!==d)return;i({runs:v.data,nextCursor:v.nextCursor??null,_runFetchAbort:null})}catch(p){if(p instanceof DOMException&&p.name==="AbortError")return;o()._runFetchRequestId===d&&i({error:p instanceof Error?p.message:"failed to fetch runs"})}finally{o()._runFetchRequestId===d&&i({loading:!1,_runFetchAbort:null})}},updateRunStatus:async(s,u)=>{i({error:null});try{await We.patch(`web/automation-runs/${s}`,{json:{inboxStatus:u}}),i(f=>({runs:f.runs.map(d=>d.id===s?{...d,inboxStatus:u}:d),inboxUnreadCount:u!=="unread"?Math.max(0,f.inboxUnreadCount-1):f.inboxUnreadCount}))}catch(f){throw i({error:f instanceof Error?f.message:"failed to update run"}),f}},batchUpdateRuns:async(s,u)=>{i({error:null});try{await We.post("web/automation-runs/batch",{json:{ids:s,inboxStatus:u}}),i(f=>({runs:f.runs.map(d=>s.includes(d.id)?{...d,inboxStatus:u}:d),inboxUnreadCount:u!=="unread"?Math.max(0,f.inboxUnreadCount-f.runs.filter(d=>s.includes(d.id)&&d.inboxStatus==="unread").length):f.inboxUnreadCount}))}catch(f){throw i({error:f instanceof Error?f.message:"failed to batch update runs"}),f}},fetchTemplates:async s=>{i({loading:!0,error:null});try{const u={};s!=null&&s.category&&(u.category=s.category),s!=null&&s.projectKey&&(u.projectKey=s.projectKey);const f=await We.get("web/automation-templates",{searchParams:u}).json();i({templates:f})}catch(u){i({error:u instanceof Error?u.message:"failed to fetch templates"})}finally{i({loading:!1})}},fetchInboxCount:async()=>{try{const s=await We.get("web/automation-runs/count",{searchParams:{inboxStatus:"unread"}}).json();i({inboxUnreadCount:s.count})}catch{}},initInbox:async()=>{try{const[s,u]=await Promise.all([We.get("web/automation-runs/count",{searchParams:{inboxStatus:"unread"}}).json(),We.get("web/projects").json()]);i({inboxUnreadCount:s.count,_accessibleProjectKeys:new Set(u.map(f=>f.key))})}catch{}},handleRunUpdate:s=>{const{runId:u,projectKey:f,status:d,hasFindings:p,inboxStatus:v}=s,y=o();if(y._accessibleProjectKeys&&!y._accessibleProjectKeys.has(f))return;const _=y.runs.findIndex(E=>E.id===u);if(_>=0){const E=y.runs[_],S=[...y.runs];S[_]={...E,status:d,hasFindings:p,inboxStatus:v};let D=0;v==="unread"&&E.inboxStatus!=="unread"?D=1:v!=="unread"&&E.inboxStatus==="unread"&&(D=-1),i({runs:S,inboxUnreadCount:Math.max(0,y.inboxUnreadCount+D)})}else v==="unread"&&o().fetchInboxCount(),y._lastRunQuery&&o().fetchRuns(y._lastRunQuery)},clearRunQuery:()=>i({_lastRunQuery:null}),reset:()=>{i({automations:[],currentAutomation:null,runs:[],templates:[],inboxUnreadCount:0,loading:!1,error:null,nextCursor:null,_fetchAbort:null,_fetchRequestId:0,_runFetchAbort:null,_runFetchRequestId:0,_accessibleProjectKeys:null,_lastRunQuery:null})}})),bp=di(i=>({status:"disconnected",lastEvent:null,eventSeq:0,taskSeq:0,workerSeq:0,init:()=>{const o=Mr.onEvent(u=>{const f=u.event==="task_status_changed"||u.event==="task_created"||u.event==="review_round_complete",d=u.event==="worker_status_changed";u.event==="automation_run_update"&&"runId"in u&&Fs.getState().handleRunUpdate(u),i(p=>({lastEvent:u,eventSeq:p.eventSeq+1,...f&&{taskSeq:p.taskSeq+1},...d&&{workerSeq:p.workerSeq+1}}))}),s=Mr.onStatus(u=>{const f=bp.getState().status;i({status:u}),f==="disconnected"&&u==="connected"&&i(d=>({eventSeq:d.eventSeq+1,taskSeq:d.taskSeq+1,workerSeq:d.workerSeq+1}))});return Mr.connect(),()=>{o(),s(),Mr.disconnect()}}})),xp="overlord-theme";function a0(){try{const i=localStorage.getItem(xp);if(i==="light"||i==="dark"||i==="system")return i}catch{}return"dark"}function Eh(){return typeof window>"u"?"light":window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"}const Sp=di(i=>{const o=a0(),s=o==="system"?Eh():o;return{theme:o,resolved:s,setTheme:u=>{localStorage.setItem(xp,u);const f=u==="system"?Eh():u;i({theme:u,resolved:f})},setResolved:u=>{i({resolved:u})}}}),n0={common:{cancel:"cancel",confirm:"confirm",save:"save",delete:"delete",edit:"edit",create:"create",copy:"copy",copied:"copied",close:"close",back:"back",go_back:"go back",go_home:"go home",dismiss:"dismiss",retry:"retry",loading:"// thinking...",processing:"processing...",creating:"creating...",saving:"saving...",updating:"updating...",verifying:"verifying...",signing_in:"signing in...",just_now:"just now",never:"never",previous:"previous",next:"next",enabled:"enabled",disabled:"disabled",runtime_error:"// runtime error",an_unexpected_error_occurred:"an unexpected error occurred",reload:"reload",not_found:"404",page_not_found:"// page not found",the_page_does_not_exist:"the page you are looking for does not exist or has been moved.",not_found_terminal_error:"error: requested not found - page does not exist",not_set:"not set",view_all:"view all",discard:"discard",save_changes:"save changes",remove:"remove",actions:"actions",name:"name",status:"status",role:"role",created_at:"created at",m_ago:"{n}m ago",h_ago:"{n}h ago",d_ago:"{n}d ago",loop_section:"// loop",tasks_section:"// tasks",fleet_section:"// fleet",docs_section:"// docs",admin_section:"// admin",overlord:"overlord",logout:"logout",logout_title:"// logout",logout_message:"are you sure you want to log out?",log_out:"log out",profile:"profile",search_placeholder:"search",search_input_placeholder:"search tasks, workers, projects...",no_search_results:'// no results for "{query}"',navigate_hint:"navigate",select_hint:"select",close_hint:"close",notifications:"notifications",mark_all_read:"mark all read",no_notifications:"// no notifications",mark_as_read:"mark as read",switch_to_light:"switch to light mode",switch_to_dark:"switch to dark mode",light_mode:"light mode",dark_mode:"dark mode",dismiss_notification:"dismiss",breadcrumb_terminal:"terminal",breadcrumb_terminal_sub:"active sessions",breadcrumb_dashboard:"dashboard",breadcrumb_dashboard_sub:"active overview",breadcrumb_tasks:"tasks",breadcrumb_tasks_sub:"queue management",breadcrumb_workers:"workers",breadcrumb_workers_sub:"fleet status",breadcrumb_projects:"projects",breadcrumb_projects_sub:"repository index",breadcrumb_admin:"admin",breadcrumb_admin_sub:"system control",breadcrumb_profile:"profile",breadcrumb_profile_sub:"user settings",breadcrumb_tokens:"tokens",breadcrumb_tokens_sub:"personal api tokens",breadcrumb_docs:"docs",breadcrumb_docs_sub:"documentation",breadcrumb_docs_cli:"docs",breadcrumb_docs_cli_sub:"cli",breadcrumb_docs_api:"docs",breadcrumb_docs_api_sub:"api",breadcrumb_docs_skill:"docs",breadcrumb_docs_skill_sub:"skill",breadcrumb_docs_bot_sub:"bot",breadcrumb_docs_all_sub:"all"},auth:{sign_in:"sign in",username:"username",enter_username:"enter username",password:"password",enter_password:"enter password",ai_powered_development_system:"// ai-powered development system",username_and_password_required:"username and password are required.",login_failed:"login failed",invalid_totp_code:"invalid totp code",two_factor_verification:"// 2fa verification",enter_totp_code:"enter your totp code",please_enter_valid_6_digit_code:"please enter a valid 6-digit code.",session_expired:"session expired",session_expired_message:"// your session has expired. please log in again.",go_to_login:"go to login",totp_setup_subtitle:"// scan the qr code with your authenticator app",verification_code:"verification code",verify_and_enable:"verify and enable",totp_setup_complete_login_again:"2fa setup complete! please log in again.",totp_setup_failed:"verification failed. please try again.",totp_setup_footer:"// you must complete this setup before accessing the application",totp_manual_entry:"// or enter this key manually",verify:"verify",initializing:"// initializing...",failed_to_init_totp:"failed to initialize totp setup"},dashboard:{title:"dashboard",tasks_active_queued:"active / queued",online_workers:"online workers",completed_all_today:"completed all today",completed_by_you_today:"completed by you today",task_count:"> task count",success_rate:"success rate",last_7_days:"last 14 days",recent_tasks:"> recent tasks",no_tasks_yet:"// no tasks yet",workers:"> workers",no_workers_registered:"// no workers registered",projects:"> projects",recent_activity:"> recent activity",no_recent_activity:"// no recent activity",daily_breakdown_not_available:"// daily breakdown not available",task_total:"task",tasks_total:"tasks",slots:"slots",online:"online",idle:"idle",offline:"offline"},tasks:{title:"tasks",create_task:"create task",new_task:"new task",task_description:"task description",describe_task_placeholder:"describe the development task in detail...",project:"project",select_project:"select project...",task_type:"type",branch_slug:"branch name (optional)",branch_slug_placeholder:"auto-generated from description",target_branch:"target branch (optional)",target_branch_placeholder:"defaults to project default branch",issue_ref:"external issue (optional)",issue_ref_placeholder:"e.g. PROJ-123 or Jira/Sentry URL",target_worker:"target worker (optional)",any_able:"any able",assign_developer:"assign developer (admin only)",select_developer:"select developer...",search_tasks:"search tasks...",filter_project:"all projects",filter_developer:"all developers",filter_mode:"all modes",mode_develop:"develop",mode_plan:"plan",mode_review:"review",mode_automation:"automation",id:"id",description_col:"description",status_col:"status",project_col:"project",assignee:"assignee",worker:"worker",time:"time",stage:"stage",no_tasks_found:"no tasks found",try_adjusting_search:"try adjusting your search query",create_first_task:"create your first task to get started",tab_all:"all",tab_running:"running",tab_queued:"queued",tab_completed:"completed",tab_failed:"failed",tab_cancelled:"cancelled",status_queued:"queued",status_assigned:"assigned",status_running:"running",status_suspended:"suspended",status_completed:"completed",status_failed:"failed",status_cancelled:"cancelled",similar_task_exists:"a similar task already exists.",view_existing:"view existing",cancel_task:"cancel",retry_task:"retry",cursor_tunnel:"IDE tunnel",skip_stage:"skip stage",take_over:"take over",connected:"connected",disconnected:"disconnected",connecting:"connecting",terminal:"terminal",pipeline_tab:"pipeline",logs:"logs",task_not_found:"// task not found",back_to_tasks:"back to tasks",cancel_task_title:"cancel task",fork_task:"fork task",fork_task_desc:"create a new task based on this one. new text appends to the original detail by default.",fork_description_placeholder:"enter extra detail to append (leave empty to reuse original)",fork_agent_type_placeholder:"same as source ({agent})",fork_replace_description:"replace original detail instead of appending",fork_append_hint:"without replace enabled, your input is appended after the original detail",fork_success:"task forked successfully",fork_error:"failed to fork task",activity_log:"> activity log",external_refs:"> external refs",no_activity:"// no activity yet",confirm_stage_message:'confirm execution of stage "{name}"? this will proceed with the pipeline.',plan_review_message:'review the implementation plan for stage "{name}". approve to proceed or provide feedback.',plan_decompose_message:"spec document has been generated and pushed. would you like to decompose it into development tasks?",plan_decompose_push_failed_message:"spec document has been generated but failed to push to the default branch. the spec is saved in the task worktree. would you like to decompose it into development tasks?",code_review_message:'review the changes for stage "{name}". approve to proceed or provide feedback.',feedback_placeholder:"provide feedback (optional)...",approve_plan:"approve plan",approve_plan_decompose:"decompose into tasks",reject_plan_decompose:"save spec only",approve_review:"approve changes",request_changes:"request changes",loading_task:"// thinking...",task_suspended_banner:"// task suspended — waiting for user confirmation",pending_confirmation:"> pending confirmation",pipeline_requires_confirmation:"the pipeline requires confirmation before proceeding.",confirm_and_proceed:"confirm and proceed",confirm_failed:"failed to confirm stage",reject:"reject",pty_terminal:"// pty terminal",view_terminal:"switch to terminal tab",restore_auto:"restore auto",requesting_takeover:"requesting...",pipeline_stages:"// pipeline stages",task_info:"> task info",stage_timeline:"> stage timeline",workspace_section:"> workspace",mr_link:"MR link",queue_position:"queue position: #{position} of {total}",queue_ahead:"{count} task(s) ahead",queue_next:"next to be processed",queue_position_banner:"// queued — position #{position} of {total}",no_worker_assigned:"// no worker assigned",no_output:"// no output",pty_output:"> PTY output",stage_progress:"> stage progress",task_logs:"> task logs",search_logs:"search logs...",no_log_entries:"// no log entries",prev:"prev",cursor_tunnel_section:"> IDE tunnel",auto_pipeline:"auto pipeline",manual_takeover:"manual takeover",takeover_denied:"takeover denied",form_project_label:"project",form_description_label:"description",form_description_placeholder:"describe the task for the ai agent...",form_worker_preference:"worker preference",form_worker_placeholder:"optional: worker id or name (--on)",form_worker_hint:"leave empty for automatic worker selection.",form_agent_type:"agent",form_agent_type_placeholder:"default",form_select_project:"select a project",form_create_task:"create task",project_and_description_required:"project and description are required.",failed_to_create_task:"failed to create task.",tunnel_idle:"idle",tunnel_starting:"starting...",tunnel_connected:"connected",tunnel_expired:"expired",tunnel_closing:"closing...",tunnel_start:"start",tunnel_open_in_cursor:"open in IDE",tunnel_header:"> IDE tunnel",tunnel_copied:"// copied to clipboard",tunnel_waiting:"// waiting for connection url...",tunnel_start_button:"> start tunnel",tunnel_starting_button:"// starting...",tunnel_stopping:"// stopping...",tunnel_cancel:"> cancel",tunnel_open_cursor:"> open in IDE",tunnel_open_vscode:"> open in vscode",tunnel_stop:"> stop tunnel",tunnel_restart:"> restart tunnel",tunnel_copy_url:"copy url",tunnel_expires_hm:"expires in {h}h {m}m",tunnel_expires_m:"expires in {m}m",tunnel_start_failed:"failed to start tunnel",tunnel_install_code_hint:'install the VS Code CLI ("code" command) to enable tunnels',dedup_title:"> similar task exists",dedup_description:"// a similar task was found that may already address your request",dedup_create_anyway:"create anyway",stage_submitting:"submitting...",cancel_task_message:"are you sure you want to cancel task #{id}? this will terminate the running agent and cannot be undone.",cancel_task_confirm_label:"cancel task",retry_title:"retry task",retry_confirm_label:"retry",retry_message_with_mr:"task #{id} has an existing mr ({url}). retrying will create a new attempt on the same branch. continue?",retry_message_without_mr:"are you sure you want to retry task #{id}? this will create a new execution attempt.",reuse_workspace_label:"reuse existing workspace (skip worktree recreation, continue on current branch)",detail_tab:"detail",detail_basic_info:"> basic info",detail_creator:"creator",detail_project:"project",detail_worker:"worker",detail_time_cost:"time cost",detail_branch:"branch",detail_task_name:"> task name & description",detail_ai_name:"ai-generated name",detail_task_id:"task id",detail_source:"source platform",detail_description:"> description"},workers:{title:"workers",fleet:"fleet",setup_guide:"setup guide",all_statuses:"all",register_worker:"register worker",no_workers_found:"no workers found",no_workers_registered:"no workers have registered yet",try_changing_status_filter:"try changing the status filter",view_setup_guide:"view setup guide",online:"online",offline:"offline",draining:"draining",cpu:"cpu",mem:"mem",disk:"disk",tasks_slots:"tasks: {active}/{max} slots",back_to_workers:"back to workers",drain:"drain",undrain:"undrain",last_heartbeat:"last heartbeat: {time}",resource_usage:"> resource usage",connection_info:"> connection info",capabilities:"> capabilities",current_tasks:"> tasks",host:"host",os:"os",cpu_model:"CPU model",cpu_cores:"CPU cores",memory:"memory",loading_worker:"// thinking...",worker_not_found:"// worker not found",draining_warning:"// this worker is draining — no new tasks will be assigned",draining_active_tasks:"active tasks will continue to run until completion",active_tasks:"> active tasks",no_active_tasks:"// no active tasks on this worker",worker_info:"> worker info",unknown:"unknown",n_a:"n/a",id:"id",description:"description",stage:"stage",no_capabilities_short:"// no capabilities",slots:"slots",status_label:"status",undrain_worker_title:"> undrain worker",drain_worker_title:"> drain worker",undrain_confirm:"are you sure you want to undrain {name}? the worker will start accepting new tasks again.",drain_confirm:"are you sure you want to drain {name}? running tasks will complete, but no new tasks will be assigned until the worker is undrained.",decommission:"decommission",decommission_title:"> decommission worker",decommission_confirm:'permanently decommission "{name}"? active tasks will be failed or re-queued, and the worker will be disconnected. this cannot be undone.',restore_capability:"restore capability",restore_capability_title:"> restore capability",restore_capability_confirm:"restore {capability} on {name}? this only clears the degradation flag. it does not fix the underlying issue.",awaiting_auto_recovery:"awaiting auto-recovery",manual_restore_required:"manual restore required",worker_id:"worker ID",setup_header_desc:"// follow these steps to add a new worker to your overlord cluster.",prerequisites:"// prerequisites",prereq_machine:"linux or macos machine with at least 2 cpu cores and 4gb ram",prereq_node:"node.js 18+ and pnpm installed",prereq_git:"git installed (2.25+)",prereq_network:"network access to the overlord server",prereq_token:"admin-generated worker registration token",step_generate_token:"generate worker token",step_generate_token_desc:"// create a one-time registration token from the admin panel. each token can register exactly one worker.",go_to_token_management:"go to token management",step_install_worker:"install worker package",step_install_worker_desc:"// install the overlord worker package globally via npm.",step_configure_env:"configure environment",step_configure_env_desc:"// create a .env file in ~/.overlord-worker/ or set environment variables.",env_host:"overlord server address (required)",env_worker_token:"one-time registration token (required for first run)",env_worker_name:"display name (defaults to hostname)",env_workspace_root:"task workspace directory (defaults to ~/.overlord-worker/workspaces)",env_max_slots:"max concurrent tasks (defaults to 2)",step_start_worker:"start worker",step_start_worker_desc:"// start the worker process. it will register with the server and begin accepting tasks.",setup_wizard_option:"// option a: interactive setup wizard (recommended)",manual_config_option:"// option b: manual configuration",start_note_setup_wizard:"// if you used the setup wizard, the worker may already be running.",step_verify_connection:"verify connection",step_verify_connection_desc:'// once the worker connects, it will appear in the workers list with a "healthy" status.',verify_how_to:"// how to verify:",verify_check_workers:"check the workers page for your new worker",verify_status:'status should show "healthy" within 30 seconds',verify_capabilities:"worker capabilities are auto-detected on first heartbeat",last_heartbeat_label:"last heartbeat",worker_version:"worker version",reg_title:"// worker registration",reg_subtitle:"> register a new worker node",reg_step_generate_token:"generate token",reg_step_install_worker:"install worker",reg_step_waiting_activation:"waiting activation",reg_step_activated:"activated",reg_click_to_generate:"// click to generate a one-time registration token",reg_token_generated:"// token generated successfully",reg_running_installation:"// running installation on target worker",reg_installed_wait:"i've installed → wait for activation",reg_listening_for_worker:"listening for worker connection...",reg_worker_connected:"// worker connected",reg_waiting_for_worker:"// waiting for worker to connect...",reg_worker_activated:"worker {name} activated!",reg_worker_registered:"// worker successfully registered",reg_done:"done",reg_completed:"// completed"},projects:{title:"projects",create_project:"create project",no_projects_yet:"no projects yet",create_first_project:"create your first project to get started",key:"key",name:"name",project_info:"> project info",repo_url:"repo URL",default_branch:"default branch",git_platform:"git platform",agent_type:"agent type",max_turns:"max turns",allowed_tools:"allowed tools",default_project:"default project",tasks_count:"tasks",last_activity:"last activity",members:"> members",developer:"developer",role:"role",added_at:"added at",add_member:"add member",remove_member:"remove member",remove_member_confirm:"remove {name} from this project?",failed_to_add_member:"failed to add member.",member_already_exists:"this developer is already a member of this project.",pipeline:"> pipeline",add_stage:"+ add stage",recent_tasks:"> recent tasks",edit_project:"edit project",delete_project:"delete project",delete_project_confirm:'delete project "{name}"? this cannot be undone.',project_name:"project name",project_name_placeholder:"my awesome project",project_key:"project key",project_key_placeholder:"my-project",project_key_hint:"// unique identifier (lowercase, alphanumeric, hyphens)",ssh_url:"SSH URL",ssh_url_placeholder:"git@github.com:org/repo.git",ssh_url_hint:"// optional — workers prefer ssh for git operations",repo_url_placeholder:"https://github.com/org/repo.git",main:"main",github:"github",gitlab:"gitlab",gitea:"gitea",tools_placeholder:"tool1, tool2, ...",add_project_desc:"// add a new project to overlord",failed_to_create_project:"failed to create project.",update_project_desc:"// update project configuration",save_changes:"save changes",basic_info:"> basic info",agent_config:"> agent config",security:"> security",git_token:"> git token",git_token_label:"current token",git_token_hint:"// personal access token for git operations (push, clone, etc.)",git_token_set:"set token",git_token_clear:"clear token",git_token_saved:"git token saved.",git_token_cleared:"git token cleared.",git_token_failed:"failed to update git token.",pipeline_section:"> pipeline",edit_pipeline:"> edit pipeline",pty_output_filter:"PTY output filter",workspace_root:"workspace root",member_role:"member",maintainer_role:"maintainer",select_developer:"select developer...",adding:"adding...",project_not_found:"// project not found",back_to_projects:"back to projects",no_members_yet:"// no members yet",no_tasks_for_project:"// no tasks for this project yet",no_pipeline_configured:"// no pipeline configured",confirm_label:"confirm",id:"id",description:"description",status:"status",created:"created",project_saved:"project saved",failed_to_save_project:"failed to save project",invalid_pipeline_json:"invalid pipeline json",setup_commands:"setup commands",post_command:"post command",environment:"> environment",add_member_title:"// add member",edit_project_title:"edit project"},pipeline:{title:"pipeline editor",subtitle:"-- {key}",save:"save",cancel:"cancel",json_toggle:"json",add_stage:"add stage",stage_properties:"> stage properties",stage_name:"stage name",timeout:"timeout",confirm_required:"confirm required",on_failure:"on failure",goto:"goto",max_loops:"max loops",stop:"stop",select_stage:"// select a stage to edit properties",saved:"pipeline saved",failed_to_save:"failed to save pipeline",loading_pipeline:"// thinking...",unnamed:"unnamed",editing:"// editing: {name}",name:"name",on_failure_section:"// on failure",goto_stage:"goto stage",up:"up",down:"down",failed_to_load_project:"failed to load project",delete_stage:"delete stage"},profile:{title:"profile",profile_info:"> profile info",username:"username",git_name:"git name",git_email:"git email",status:"status",created_at:"created at",change_password:"> change password",current_password:"current password",new_password:"new password",confirm_password:"confirm password",current_password_required:"current password is required.",new_password_required:"new password is required.",passwords_do_not_match:"new passwords do not match.",password_changed:"password changed successfully.",failed_to_change_password:"failed to change password.",update_password:"update password",two_factor_auth:"> two-factor authentication",two_fa_enabled:"2fa is enabled",two_fa_not_setup:"2fa is not set up",regenerate_2fa_warning:`// regenerating 2fa will invalidate your current authenticator app setup.
256
+ */const rp=ye("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]),bh=i=>{let o;const s=new Set,u=(_,E)=>{const S=typeof _=="function"?_(o):_;if(!Object.is(S,o)){const D=o;o=E??(typeof S!="object"||S===null)?S:Object.assign({},o,S),s.forEach(Y=>Y(o,D))}},f=()=>o,v={setState:u,getState:f,getInitialState:()=>y,subscribe:_=>(s.add(_),()=>s.delete(_))},y=o=i(u,f,v);return v},Eb=(i=>i?bh(i):bh),Tb=i=>i;function jb(i,o=Tb){const s=Cr.useSyncExternalStore(i.subscribe,Cr.useCallback(()=>o(i.getState()),[i,o]),Cr.useCallback(()=>o(i.getInitialState()),[i,o]));return Cr.useDebugValue(s),s}const xh=i=>{const o=Eb(i),s=u=>jb(o,u);return Object.assign(s,o),s},di=(i=>i?xh(i):xh),Dr="overlord-access-token",Nr="overlord-refresh-token",Fe={getAccessToken(){return localStorage.getItem(Dr)},setAccessToken(i){localStorage.setItem(Dr,i)},getRefreshToken(){return localStorage.getItem(Nr)},setRefreshToken(i){localStorage.setItem(Nr,i)},setTokens(i,o){localStorage.setItem(Dr,i),localStorage.setItem(Nr,o)},clearTokens(){localStorage.removeItem(Dr),localStorage.removeItem(Nr)},parseToken(i){try{const o=i.split(".")[1];return JSON.parse(atob(o))}catch{return null}},hasScope(i,o){const s=Fe.parseToken(i);return s?s.scope===o:!1},isExpired(i){const o=Fe.parseToken(i);return!o||typeof o.exp!="number"?!0:Date.now()/1e3>o.exp-30}};function Rs(i){const o=Fe.parseToken(i);if(!o)return null;const s=o.name??"";return{id:o.sub,username:s,display_name:s,role:o.role}}const Sa=di((i,o)=>({accessToken:null,user:null,requireTotpSetup:!1,sessionExpired:!1,initializing:!0,initialize:()=>{const s=Fe.getAccessToken();s&&!Fe.isExpired(s)?i({accessToken:s,user:Rs(s),requireTotpSetup:Fe.hasScope(s,"totp_setup"),initializing:!1}):Fe.getRefreshToken()?o().refresh().catch(()=>{Fe.clearTokens()}).finally(()=>{i({initializing:!1})}):i({initializing:!1})},login:async s=>{var d;const u=await fetch("/api/auth/login",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(s)});if(!u.ok){const p=await u.json().catch(()=>({message:"Login failed"})),v=((d=p.error)==null?void 0:d.message)??p.message??"Login failed";throw new Error(v)}const f=await u.json();if(f.totpSetup){Fe.setAccessToken(f.accessToken),i({accessToken:f.accessToken,user:null,requireTotpSetup:!0});return}Fe.setTokens(f.accessToken,f.refreshToken),i({accessToken:f.accessToken,user:Rs(f.accessToken),requireTotpSetup:!1,sessionExpired:!1})},logout:()=>{const s=Fe.getRefreshToken();s&&fetch("/api/auth/logout",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({refreshToken:s})}).catch(()=>{}),Fe.clearTokens(),i({accessToken:null,user:null,requireTotpSetup:!1,sessionExpired:!1})},refresh:(()=>{let s=null;return async()=>s||(s=(async()=>{const u=Fe.getRefreshToken();if(!u)throw Fe.clearTokens(),i({accessToken:null,user:null,requireTotpSetup:!1,sessionExpired:!0}),new Error("No refresh token");let f=null;for(let d=0;d<2;d++)try{const p=await fetch("/api/auth/refresh",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({refreshToken:u})});if(!p.ok){if(f=new Error(`Refresh failed: ${p.status}`),d===0){await new Promise(y=>setTimeout(y,1e3));continue}break}const v=await p.json();Fe.setTokens(v.accessToken,v.refreshToken),i({accessToken:v.accessToken,user:Rs(v.accessToken)});return}catch(p){if(f=p instanceof Error?p:new Error(String(p)),d===0){await new Promise(v=>setTimeout(v,1e3));continue}}throw Fe.clearTokens(),i({accessToken:null,user:null,requireTotpSetup:!1,sessionExpired:!0}),f??new Error("Refresh failed")})().finally(()=>{s=null}),s)})(),setSessionExpired:s=>{i({sessionExpired:s})}})),ax={QUEUED:"QUEUED",ASSIGNED:"ASSIGNED",RUNNING:"RUNNING",SUSPENDED:"SUSPENDED",COMPLETED:"COMPLETED",FAILED:"FAILED",CANCELLED:"CANCELLED"},nx={ONLINE:"online",OFFLINE:"offline",DRAINING:"draining",DECOMMISSIONED:"decommissioned"},op={DEVELOPER:"developer",LEAD:"lead",ADMIN:"admin"},lx={MAINTAINER:"maintainer",MEMBER:"member"},ix={CLAUDE:"claude",CURSOR:"cursor",CODEX:"codex",PI:"pi",QODER:"qoder"},rx={ACTIVE:"active",USED:"used",REVOKED:"revoked",EXPIRED:"expired"},ox={GITLAB:"gitlab",GITHUB:"github",GITEA:"gitea"},ux={ACTIVE:"active",DISABLED:"disabled"},sx={ACTIVE:"active"},cx={DEVELOP:"develop",PLAN:"plan",REVIEW:"review",AUTOMATION:"automation"},fx={IDLE:"IDLE",STARTING:"STARTING",CONNECTED:"CONNECTED",EXPIRED:"EXPIRED",CLOSING:"CLOSING",CLOSED:"CLOSED"};function Rb(){return Sa(i=>{var o;return((o=i.user)==null?void 0:o.role)===op.ADMIN})??!1}const up="overlord-sidebar-collapsed";function Ab(){try{return localStorage.getItem(up)==="true"}catch{return!1}}const zb=di((i,o)=>({sidebarCollapsed:Ab(),toggleSidebar:()=>{const s=!o().sidebarCollapsed;try{localStorage.setItem(up,String(s))}catch{}i({sidebarCollapsed:s})}}));class Cb{constructor(){Ge(this,"ws",null);Ge(this,"reconnectAttempts",0);Ge(this,"maxReconnectAttempts",15);Ge(this,"reconnectTimer",null);Ge(this,"disposed",!1);Ge(this,"authenticated",!1);Ge(this,"eventHandlers",new Set);Ge(this,"statusHandlers",new Set)}onEvent(o){return this.eventHandlers.add(o),()=>this.eventHandlers.delete(o)}onStatus(o){return this.statusHandlers.add(o),()=>this.statusHandlers.delete(o)}get isConnected(){var o;return this.authenticated&&((o=this.ws)==null?void 0:o.readyState)===WebSocket.OPEN}connect(){var f,d;if(this.disposed||((f=this.ws)==null?void 0:f.readyState)===WebSocket.OPEN||((d=this.ws)==null?void 0:d.readyState)===WebSocket.CONNECTING)return;const o=Fe.getAccessToken();if(!o||Fe.isExpired(o))return;const u=`${window.location.protocol==="https:"?"wss:":"ws:"}//${window.location.host}/ws/events`;this.notifyStatus("connecting"),this.authenticated=!1,this.ws=new WebSocket(u),this.ws.onopen=()=>{var v,y;const p=Fe.getAccessToken();p?(v=this.ws)==null||v.send(JSON.stringify({type:"auth",token:p})):(y=this.ws)==null||y.close()},this.ws.onmessage=p=>{var v;if(typeof p.data=="string")try{const y=JSON.parse(p.data);if(y.type==="auth_ok"){this.authenticated=!0,this.reconnectAttempts=0,this.notifyStatus("connected");return}if(y.type==="auth_error"){(v=this.ws)==null||v.close();return}if(y.type==="event")for(const _ of this.eventHandlers)try{_(y)}catch{}}catch{}},this.ws.onclose=()=>{this.authenticated=!1,this.notifyStatus("disconnected"),this.scheduleReconnect()},this.ws.onerror=()=>{var p;(p=this.ws)==null||p.close()}}disconnect(){var o;this.clearReconnectTimer(),this.authenticated=!1,(o=this.ws)==null||o.close(),this.ws=null}dispose(){this.disposed=!0,this.disconnect(),this.eventHandlers.clear(),this.statusHandlers.clear()}reconnect(){this.disconnect(),this.reconnectAttempts=0,this.connect()}scheduleReconnect(){if(this.disposed||this.reconnectAttempts>=this.maxReconnectAttempts)return;const o=Math.min(1e3*2**this.reconnectAttempts,3e4);this.reconnectAttempts++,this.reconnectTimer=setTimeout(()=>{this.disposed||this.connect()},o)}clearReconnectTimer(){this.reconnectTimer&&(clearTimeout(this.reconnectTimer),this.reconnectTimer=null)}notifyStatus(o){for(const s of this.statusHandlers)try{s(o)}catch{}}}const Mr=new Cb;class Ns extends Error{constructor(s,u,f){const d=s.status||s.status===0?s.status:"",p=s.statusText??"",v=`${d} ${p}`.trim(),y=v?`status code ${v}`:"an unknown error";super(`Request failed with ${y}: ${u.method} ${u.url}`);Ge(this,"response");Ge(this,"request");Ge(this,"options");this.name="HTTPError",this.response=s,this.request=u,this.options=f}}class sp extends Error{constructor(s){let u="Non-error value was thrown";try{typeof s=="string"?u=s:s&&typeof s=="object"&&"message"in s&&typeof s.message=="string"&&(u=s.message)}catch{}super(u);Ge(this,"name","NonError");Ge(this,"value");this.value=s}}class As extends Error{constructor(s){const u=s!=null&&s.cause?s.cause instanceof Error?s.cause:new sp(s.cause):void 0;super(s!=null&&s.code?`Forced retry: ${s.code}`:"Forced retry",u?{cause:u}:void 0);Ge(this,"name","ForceRetryError");Ge(this,"customDelay");Ge(this,"code");Ge(this,"customRequest");this.customDelay=s==null?void 0:s.delay,this.code=s==null?void 0:s.code,this.customRequest=s==null?void 0:s.request}}const Sh=(()=>{let i=!1,o=!1;const s=typeof globalThis.ReadableStream=="function",u=typeof globalThis.Request=="function";if(s&&u)try{o=new globalThis.Request("https://empty.invalid",{body:new globalThis.ReadableStream,method:"POST",get duplex(){return i=!0,"half"}}).headers.has("Content-Type")}catch(f){if(f instanceof Error&&f.message==="unsupported BodyInit type")return!1;throw f}return i&&!o})(),Ob=typeof globalThis.AbortController=="function",cp=typeof globalThis.AbortSignal=="function"&&typeof globalThis.AbortSignal.any=="function",Db=typeof globalThis.ReadableStream=="function",Nb=typeof globalThis.FormData=="function",fp=["get","post","put","patch","head","delete"],Mb={json:"application/json",text:"text/*",formData:"multipart/form-data",arrayBuffer:"*/*",blob:"*/*",bytes:"*/*"},zs=2147483647,Ub=new TextEncoder().encode("------WebKitFormBoundaryaxpyiPgbbPti10Rw").length,dp=Symbol("stop");class mp{constructor(o){Ge(this,"options");this.options=o}}const Lb=i=>new mp(i),qb={json:!0,parseJson:!0,stringifyJson:!0,searchParams:!0,prefixUrl:!0,retry:!0,timeout:!0,hooks:!0,throwHttpErrors:!0,onDownloadProgress:!0,onUploadProgress:!0,fetch:!0,context:!0},Hb={next:!0},Bb={method:!0,headers:!0,body:!0,mode:!0,credentials:!0,cache:!0,redirect:!0,referrer:!0,referrerPolicy:!0,integrity:!0,keepalive:!0,signal:!0,window:!0,duplex:!0},Yb=i=>{if(!i)return 0;if(i instanceof FormData){let o=0;for(const[s,u]of i)o+=Ub,o+=new TextEncoder().encode(`Content-Disposition: form-data; name="${s}"`).length,o+=typeof u=="string"?new TextEncoder().encode(u).length:u.size;return o}if(i instanceof Blob)return i.size;if(i instanceof ArrayBuffer)return i.byteLength;if(typeof i=="string")return new TextEncoder().encode(i).length;if(i instanceof URLSearchParams)return new TextEncoder().encode(i.toString()).length;if("byteLength"in i)return i.byteLength;if(typeof i=="object"&&i!==null)try{const o=JSON.stringify(i);return new TextEncoder().encode(o).length}catch{return 0}return 0},hp=(i,o,s)=>{let u,f=0;return i.pipeThrough(new TransformStream({transform(d,p){if(p.enqueue(d),u){f+=u.byteLength;let v=o===0?0:f/o;v>=1&&(v=1-Number.EPSILON),s==null||s({percent:v,totalBytes:Math.max(o,f),transferredBytes:f},u)}u=d},flush(){u&&(f+=u.byteLength,s==null||s({percent:1,totalBytes:Math.max(o,f),transferredBytes:f},u))}}))},Vb=(i,o)=>{if(!i.body)return i;if(i.status===204)return new Response(null,{status:i.status,statusText:i.statusText,headers:i.headers});const s=Math.max(0,Number(i.headers.get("content-length"))||0);return new Response(hp(i.body,s,o),{status:i.status,statusText:i.statusText,headers:i.headers})},Gb=(i,o,s)=>{if(!i.body)return i;const u=Yb(s??i.body);return new Request(i,{duplex:"half",body:hp(i.body,u,o)})},vn=i=>i!==null&&typeof i=="object",Ur=(...i)=>{for(const o of i)if((!vn(o)||Array.isArray(o))&&o!==void 0)throw new TypeError("The `options` argument must be an object");return Ws({},...i)},pp=(i={},o={})=>{const s=new globalThis.Headers(i),u=o instanceof globalThis.Headers,f=new globalThis.Headers(o);for(const[d,p]of f.entries())u&&p==="undefined"||p===void 0?s.delete(d):s.set(d,p);return s};function Lr(i,o,s){return Object.hasOwn(o,s)&&o[s]===void 0?[]:Ws(i[s]??[],o[s]??[])}const _p=(i={},o={})=>({beforeRequest:Lr(i,o,"beforeRequest"),beforeRetry:Lr(i,o,"beforeRetry"),afterResponse:Lr(i,o,"afterResponse"),beforeError:Lr(i,o,"beforeError")}),Xb=(i,o)=>{const s=new URLSearchParams;for(const u of[i,o])if(u!==void 0)if(u instanceof URLSearchParams)for(const[f,d]of u.entries())s.append(f,d);else if(Array.isArray(u))for(const f of u){if(!Array.isArray(f)||f.length!==2)throw new TypeError("Array search parameters must be provided in [[key, value], ...] format");s.append(String(f[0]),String(f[1]))}else if(vn(u))for(const[f,d]of Object.entries(u))d!==void 0&&s.append(f,String(d));else{const f=new URLSearchParams(u);for(const[d,p]of f.entries())s.append(d,p)}return s},Ws=(...i)=>{let o={},s={},u={},f;const d=[];for(const p of i)if(Array.isArray(p))Array.isArray(o)||(o=[]),o=[...o,...p];else if(vn(p)){for(let[v,y]of Object.entries(p)){if(v==="signal"&&y instanceof globalThis.AbortSignal){d.push(y);continue}if(v==="context"){if(y!=null&&(!vn(y)||Array.isArray(y)))throw new TypeError("The `context` option must be an object");o={...o,context:y==null?{}:{...o.context,...y}};continue}if(v==="searchParams"){y==null?f=void 0:f=f===void 0?y:Xb(f,y);continue}vn(y)&&v in o&&(y=Ws(o[v],y)),o={...o,[v]:y}}vn(p.hooks)&&(u=_p(u,p.hooks),o.hooks=u),vn(p.headers)&&(s=pp(s,p.headers),o.headers=s)}return f!==void 0&&(o.searchParams=f),d.length>0&&(d.length===1?o.signal=d[0]:cp?o.signal=AbortSignal.any(d):o.signal=d.at(-1)),o},Qb=i=>fp.includes(i)?i.toUpperCase():i,Zb=["get","put","head","delete","options","trace"],Kb=[408,413,429,500,502,503,504],Jb=[413,429,503],kh={limit:2,methods:Zb,statusCodes:Kb,afterStatusCodes:Jb,maxRetryAfter:Number.POSITIVE_INFINITY,backoffLimit:Number.POSITIVE_INFINITY,delay:i=>.3*2**(i-1)*1e3,jitter:void 0,retryOnTimeout:!1},$b=(i={})=>{if(typeof i=="number")return{...kh,limit:i};if(i.methods&&!Array.isArray(i.methods))throw new Error("retry.methods must be an array");if(i.methods&&(i.methods=i.methods.map(s=>s.toLowerCase())),i.statusCodes&&!Array.isArray(i.statusCodes))throw new Error("retry.statusCodes must be an array");const o=Object.fromEntries(Object.entries(i).filter(([,s])=>s!==void 0));return{...kh,...o}};class Ms extends Error{constructor(s){super(`Request timed out: ${s.method} ${s.url}`);Ge(this,"request");this.name="TimeoutError",this.request=s}}async function Wb(i,o,s,u){return new Promise((f,d)=>{const p=setTimeout(()=>{s&&s.abort(),d(new Ms(i))},u.timeout);u.fetch(i,o).then(f).catch(d).then(()=>{clearTimeout(p)})})}async function Fb(i,{signal:o}){return new Promise((s,u)=>{o&&(o.throwIfAborted(),o.addEventListener("abort",f,{once:!0}));function f(){clearTimeout(d),u(o.reason)}const d=setTimeout(()=>{o==null||o.removeEventListener("abort",f),s()},i)})}const Ib=(i,o)=>{const s={};for(const u in o)Object.hasOwn(o,u)&&!(u in Bb)&&!(u in qb)&&(!(u in i)||u in Hb)&&(s[u]=o[u]);return s},Pb=i=>i===void 0?!1:Array.isArray(i)?i.length>0:i instanceof URLSearchParams?i.size>0:typeof i=="object"?Object.keys(i).length>0:typeof i=="string"?i.trim().length>0:!!i;function e0(i){return i instanceof Ns||(i==null?void 0:i.name)===Ns.name}function t0(i){return i instanceof Ms||(i==null?void 0:i.name)===Ms.name}var $r,gp,$t,Yt,ot,Q,Wa,ta,bn,ue,Gr,yp,Us,Xr,$a,Ls,vp,oi,Qr,qs;const ui=class ui{constructor(o,s={}){ea(this,ue);Ge(this,"request");ea(this,$t);ea(this,Yt,0);ea(this,ot);ea(this,Q);ea(this,Wa);ea(this,ta);ea(this,bn);var f,d,p;if(Jt(this,ot,o),Jt(this,Q,{...s,headers:pp(L(this,ot).headers,s.headers),hooks:_p({beforeRequest:[],beforeRetry:[],beforeError:[],afterResponse:[]},s.hooks),method:Qb(s.method??L(this,ot).method??"GET"),prefixUrl:String(s.prefixUrl||""),retry:$b(s.retry),throwHttpErrors:s.throwHttpErrors??!0,timeout:s.timeout??1e4,fetch:s.fetch??globalThis.fetch.bind(globalThis),context:s.context??{}}),typeof L(this,ot)!="string"&&!(L(this,ot)instanceof URL||L(this,ot)instanceof globalThis.Request))throw new TypeError("`input` must be a string, URL, or Request");if(L(this,Q).prefixUrl&&typeof L(this,ot)=="string"){if(L(this,ot).startsWith("/"))throw new Error("`input` must not begin with a slash when using `prefixUrl`");L(this,Q).prefixUrl.endsWith("/")||(L(this,Q).prefixUrl+="/"),Jt(this,ot,L(this,Q).prefixUrl+L(this,ot))}Ob&&cp&&(Jt(this,ta,L(this,Q).signal??L(this,ot).signal),Jt(this,$t,new globalThis.AbortController),L(this,Q).signal=L(this,ta)?AbortSignal.any([L(this,ta),L(this,$t).signal]):L(this,$t).signal),Sh&&(L(this,Q).duplex="half"),L(this,Q).json!==void 0&&(L(this,Q).body=((d=(f=L(this,Q)).stringifyJson)==null?void 0:d.call(f,L(this,Q).json))??JSON.stringify(L(this,Q).json),L(this,Q).headers.set("content-type",L(this,Q).headers.get("content-type")??"application/json"));const u=s.headers&&new globalThis.Headers(s.headers).has("content-type");if(L(this,ot)instanceof globalThis.Request&&(Nb&&L(this,Q).body instanceof globalThis.FormData||L(this,Q).body instanceof URLSearchParams)&&!u&&L(this,Q).headers.delete("content-type"),this.request=new globalThis.Request(L(this,ot),L(this,Q)),Pb(L(this,Q).searchParams)){const y="?"+(typeof L(this,Q).searchParams=="string"?L(this,Q).searchParams.replace(/^\?/,""):new URLSearchParams(ke(p=ui,$r,gp).call(p,L(this,Q).searchParams)).toString()),_=this.request.url.replace(/(?:\?.*?)?(?=#|$)/,y);this.request=new globalThis.Request(_,L(this,Q))}if(L(this,Q).onUploadProgress){if(typeof L(this,Q).onUploadProgress!="function")throw new TypeError("The `onUploadProgress` option must be a function");if(!Sh)throw new Error("Request streams are not supported in your environment. The `duplex` option for `Request` is not available.");this.request=ke(this,ue,qs).call(this,this.request,L(this,Q).body??void 0)}}static create(o,s){var p,v,y;const u=new ui(o,s),f=async()=>{var E,S,D,Y,q,H,B,U,K,X,oe,ce;if(typeof L(u,Q).timeout=="number"&&L(u,Q).timeout>zs)throw new RangeError(`The \`timeout\` option cannot be greater than ${zs}`);await Promise.resolve();let _=await ke(E=u,ue,vp).call(E);for(const _e of L(u,Q).hooks.afterResponse){const I=ke(S=u,ue,Us).call(S,_.clone());let F;try{F=await _e(u.request,ke(D=u,ue,oi).call(D),I,{retryCount:L(u,Yt)})}catch(et){throw ke(Y=u,ue,$a).call(Y,I),ke(q=u,ue,$a).call(q,_),et}if(F instanceof mp)throw ke(H=u,ue,$a).call(H,I),ke(B=u,ue,$a).call(B,_),new As(F.options);const se=F instanceof globalThis.Response?F:_;I!==se&&ke(U=u,ue,$a).call(U,I),_!==se&&ke(K=u,ue,$a).call(K,_),_=se}if(ke(X=u,ue,Us).call(X,_),!_.ok&&(typeof L(u,Q).throwHttpErrors=="function"?L(u,Q).throwHttpErrors(_.status):L(u,Q).throwHttpErrors)){let _e=new Ns(_,u.request,ke(oe=u,ue,oi).call(oe));for(const I of L(u,Q).hooks.beforeError)_e=await I(_e,{retryCount:L(u,Yt)});throw _e}if(L(u,Q).onDownloadProgress){if(typeof L(u,Q).onDownloadProgress!="function")throw new TypeError("The `onDownloadProgress` option must be a function");if(!Db)throw new Error("Streams are not supported in your environment. `ReadableStream` is missing.");const _e=_.clone();return ke(ce=u,ue,$a).call(ce,_),Vb(_e,L(u,Q).onDownloadProgress)}return _},d=ke(p=u,ue,Ls).call(p,f).finally(()=>{var E,S;const _=L(u,Wa);ke(E=u,ue,Xr).call(E,(_==null?void 0:_.body)??void 0),ke(S=u,ue,Xr).call(S,u.request.body??void 0)});for(const[_,E]of Object.entries(Mb))_==="bytes"&&typeof((y=(v=globalThis.Response)==null?void 0:v.prototype)==null?void 0:y.bytes)!="function"||(d[_]=async()=>{u.request.headers.set("accept",u.request.headers.get("accept")||E);const S=await d;if(_==="json"){if(S.status===204)return"";const D=await S.text();return D===""?"":s.parseJson?s.parseJson(D):JSON.parse(D)}return S[_]()});return d}};$r=new WeakSet,gp=function(o){return o&&typeof o=="object"&&!Array.isArray(o)&&!(o instanceof URLSearchParams)?Object.fromEntries(Object.entries(o).filter(([,s])=>s!==void 0)):o},$t=new WeakMap,Yt=new WeakMap,ot=new WeakMap,Q=new WeakMap,Wa=new WeakMap,ta=new WeakMap,bn=new WeakMap,ue=new WeakSet,Gr=function(){const o=L(this,Q).retry.delay(L(this,Yt));let s=o;L(this,Q).retry.jitter===!0?s=Math.random()*o:typeof L(this,Q).retry.jitter=="function"&&(s=L(this,Q).retry.jitter(o),(!Number.isFinite(s)||s<0)&&(s=o));const u=L(this,Q).retry.backoffLimit??Number.POSITIVE_INFINITY;return Math.min(u,s)},yp=async function(o){if(th(this,Yt)._++,L(this,Yt)>L(this,Q).retry.limit)throw o;const s=o instanceof Error?o:new sp(o);if(s instanceof As)return s.customDelay??ke(this,ue,Gr).call(this);if(!L(this,Q).retry.methods.includes(this.request.method.toLowerCase()))throw o;if(L(this,Q).retry.shouldRetry!==void 0){const u=await L(this,Q).retry.shouldRetry({error:s,retryCount:L(this,Yt)});if(u===!1)throw o;if(u===!0)return ke(this,ue,Gr).call(this)}if(t0(o)&&!L(this,Q).retry.retryOnTimeout)throw o;if(e0(o)){if(!L(this,Q).retry.statusCodes.includes(o.response.status))throw o;const u=o.response.headers.get("Retry-After")??o.response.headers.get("RateLimit-Reset")??o.response.headers.get("X-RateLimit-Retry-After")??o.response.headers.get("X-RateLimit-Reset")??o.response.headers.get("X-Rate-Limit-Reset");if(u&&L(this,Q).retry.afterStatusCodes.includes(o.response.status)){let f=Number(u)*1e3;Number.isNaN(f)?f=Date.parse(u)-Date.now():f>=Date.parse("2024-01-01")&&(f-=Date.now());const d=L(this,Q).retry.maxRetryAfter??f;return f<d?f:d}if(o.response.status===413)throw o}return ke(this,ue,Gr).call(this)},Us=function(o){return L(this,Q).parseJson&&(o.json=async()=>L(this,Q).parseJson(await o.text())),o},Xr=function(o){o&&o.cancel().catch(()=>{})},$a=function(o){ke(this,ue,Xr).call(this,o.body??void 0)},Ls=async function(o){try{return await o()}catch(s){const u=Math.min(await ke(this,ue,yp).call(this,s),zs);if(L(this,Yt)<1)throw s;if(await Fb(u,L(this,ta)?{signal:L(this,ta)}:{}),s instanceof As&&s.customRequest){const f=L(this,Q).signal?new globalThis.Request(s.customRequest,{signal:L(this,Q).signal}):new globalThis.Request(s.customRequest);ke(this,ue,Qr).call(this,f)}for(const f of L(this,Q).hooks.beforeRetry){const d=await f({request:this.request,options:ke(this,ue,oi).call(this),error:s,retryCount:L(this,Yt)});if(d instanceof globalThis.Request){ke(this,ue,Qr).call(this,d);break}if(d instanceof globalThis.Response)return d;if(d===dp)return}return ke(this,ue,Ls).call(this,o)}},vp=async function(){var s;(s=L(this,$t))!=null&&s.signal.aborted&&(Jt(this,$t,new globalThis.AbortController),L(this,Q).signal=L(this,ta)?AbortSignal.any([L(this,ta),L(this,$t).signal]):L(this,$t).signal,this.request=new globalThis.Request(this.request,{signal:L(this,Q).signal}));for(const u of L(this,Q).hooks.beforeRequest){const f=await u(this.request,ke(this,ue,oi).call(this),{retryCount:L(this,Yt)});if(f instanceof Response)return f;if(f instanceof globalThis.Request){ke(this,ue,Qr).call(this,f);break}}const o=Ib(this.request,L(this,Q));return Jt(this,Wa,this.request),this.request=L(this,Wa).clone(),L(this,Q).timeout===!1?L(this,Q).fetch(L(this,Wa),o):Wb(L(this,Wa),o,L(this,$t),L(this,Q))},oi=function(){if(!L(this,bn)){const{hooks:o,...s}=L(this,Q);Jt(this,bn,Object.freeze(s))}return L(this,bn)},Qr=function(o){Jt(this,bn,void 0),this.request=ke(this,ue,qs).call(this,o)},qs=function(o,s){return!L(this,Q).onUploadProgress||!o.body?o:Gb(o,L(this,Q).onUploadProgress,s??L(this,Q).body??void 0)},ea(ui,$r);let Jr=ui;/*! MIT License © Sindre Sorhus */const Hs=i=>{const o=(s,u)=>Jr.create(s,Ur(i,u));for(const s of fp)o[s]=(u,f)=>Jr.create(u,Ur(i,f,{method:s}));return o.create=s=>Hs(Ur(s)),o.extend=s=>(typeof s=="function"&&(s=s(i??{})),Hs(Ur(i,s))),o.stop=dp,o.retry=Lb,o},wh=Hs();let qr=null;const We=wh.create({prefixUrl:"/api",timeout:3e4,hooks:{beforeRequest:[i=>{const o=Sa.getState().accessToken;o&&i.headers.set("Authorization",`Bearer ${o}`)}],afterResponse:[async(i,o,s)=>{if(s.status===401&&!i.headers.has("X-Retry-After-Refresh")){qr||(qr=Sa.getState().refresh().finally(()=>{qr=null}));try{await qr}catch{throw s}const u=Sa.getState().accessToken;return u&&i.headers.set("Authorization",`Bearer ${u}`),i.headers.set("X-Retry-After-Refresh","1"),wh(i,o)}}]}}),Fs=di((i,o)=>({automations:[],currentAutomation:null,runs:[],templates:[],inboxUnreadCount:0,loading:!1,error:null,nextCursor:null,_fetchAbort:null,_fetchRequestId:0,_runFetchAbort:null,_runFetchRequestId:0,_accessibleProjectKeys:null,_lastRunQuery:null,fetchAutomations:async s=>{const u=o()._fetchAbort;u&&u.abort();const f=new AbortController,d=o()._fetchRequestId+1;i({loading:!0,error:null,_fetchAbort:f,_fetchRequestId:d});try{const p={};s!=null&&s.projectKey&&(p.projectKey=s.projectKey),(s==null?void 0:s.enabled)!==void 0&&(p.enabled=String(s.enabled)),s!=null&&s.triggerType&&(p.triggerType=s.triggerType),s!=null&&s.limit&&(p.limit=String(s.limit)),s!=null&&s.cursor&&(p.cursor=String(s.cursor));const v=await We.get("web/automations",{searchParams:p,signal:f.signal}).json();if(o()._fetchRequestId!==d)return;i({automations:v,_fetchAbort:null})}catch(p){if(p instanceof DOMException&&p.name==="AbortError")return;o()._fetchRequestId===d&&i({error:p instanceof Error?p.message:"failed to fetch automations"})}finally{o()._fetchRequestId===d&&i({loading:!1,_fetchAbort:null})}},fetchAutomation:async s=>{i({loading:!0,error:null});try{const u=await We.get(`web/automations/${s}`).json();i({currentAutomation:u})}catch(u){i({error:u instanceof Error?u.message:"failed to fetch automation"})}finally{i({loading:!1})}},createAutomation:async s=>{i({error:null});try{const u=await We.post("web/automations",{json:s}).json();return i(f=>({automations:[u,...f.automations]})),u}catch(u){throw i({error:u instanceof Error?u.message:"failed to create automation"}),u}},updateAutomation:async(s,u)=>{i({error:null});try{const f=await We.patch(`web/automations/${s}`,{json:u}).json();return i(d=>{var p;return{automations:d.automations.map(v=>v.id===s?f:v),currentAutomation:((p=d.currentAutomation)==null?void 0:p.id)===s?f:d.currentAutomation}}),f}catch(f){throw i({error:f instanceof Error?f.message:"failed to update automation"}),f}},deleteAutomation:async s=>{i({error:null});try{await We.delete(`web/automations/${s}`),i(u=>{var f;return{automations:u.automations.filter(d=>d.id!==s),currentAutomation:((f=u.currentAutomation)==null?void 0:f.id)===s?null:u.currentAutomation}})}catch(u){throw i({error:u instanceof Error?u.message:"failed to delete automation"}),u}},enableAutomation:async s=>{i({error:null});try{const u=await We.post(`web/automations/${s}/enable`).json();i(f=>{var d;return{automations:f.automations.map(p=>p.id===s?u:p),currentAutomation:((d=f.currentAutomation)==null?void 0:d.id)===s?u:f.currentAutomation}})}catch(u){throw i({error:u instanceof Error?u.message:"failed to enable automation"}),u}},disableAutomation:async s=>{i({error:null});try{const u=await We.post(`web/automations/${s}/disable`).json();i(f=>{var d;return{automations:f.automations.map(p=>p.id===s?u:p),currentAutomation:((d=f.currentAutomation)==null?void 0:d.id)===s?u:f.currentAutomation}})}catch(u){throw i({error:u instanceof Error?u.message:"failed to disable automation"}),u}},triggerAutomation:async s=>{i({error:null});try{await We.post(`web/automations/${s}/trigger`)}catch(u){throw i({error:u instanceof Error?u.message:"failed to trigger automation"}),u}},fetchRuns:async s=>{const u=o()._runFetchAbort;u&&u.abort();const f=new AbortController,d=o()._runFetchRequestId+1;i({loading:!0,error:null,_lastRunQuery:s??null,_runFetchAbort:f,_runFetchRequestId:d});try{const p={};(s==null?void 0:s.automationId)!==void 0&&(p.automationId=String(s.automationId)),s!=null&&s.inboxStatus&&(p.inboxStatus=s.inboxStatus),(s==null?void 0:s.hasFindings)!==void 0&&(p.hasFindings=String(s.hasFindings)),s!=null&&s.status&&(p.status=s.status),s!=null&&s.limit&&(p.limit=String(s.limit)),s!=null&&s.cursor&&(p.cursor=String(s.cursor));const v=await We.get("web/automation-runs",{searchParams:p,signal:f.signal}).json();if(o()._runFetchRequestId!==d)return;i({runs:v.data,nextCursor:v.nextCursor??null,_runFetchAbort:null})}catch(p){if(p instanceof DOMException&&p.name==="AbortError")return;o()._runFetchRequestId===d&&i({error:p instanceof Error?p.message:"failed to fetch runs"})}finally{o()._runFetchRequestId===d&&i({loading:!1,_runFetchAbort:null})}},updateRunStatus:async(s,u)=>{i({error:null});try{await We.patch(`web/automation-runs/${s}`,{json:{inboxStatus:u}}),i(f=>({runs:f.runs.map(d=>d.id===s?{...d,inboxStatus:u}:d),inboxUnreadCount:u!=="unread"?Math.max(0,f.inboxUnreadCount-1):f.inboxUnreadCount}))}catch(f){throw i({error:f instanceof Error?f.message:"failed to update run"}),f}},batchUpdateRuns:async(s,u)=>{i({error:null});try{await We.post("web/automation-runs/batch",{json:{ids:s,inboxStatus:u}}),i(f=>({runs:f.runs.map(d=>s.includes(d.id)?{...d,inboxStatus:u}:d),inboxUnreadCount:u!=="unread"?Math.max(0,f.inboxUnreadCount-f.runs.filter(d=>s.includes(d.id)&&d.inboxStatus==="unread").length):f.inboxUnreadCount}))}catch(f){throw i({error:f instanceof Error?f.message:"failed to batch update runs"}),f}},fetchTemplates:async s=>{i({loading:!0,error:null});try{const u={};s!=null&&s.category&&(u.category=s.category),s!=null&&s.projectKey&&(u.projectKey=s.projectKey);const f=await We.get("web/automation-templates",{searchParams:u}).json();i({templates:f})}catch(u){i({error:u instanceof Error?u.message:"failed to fetch templates"})}finally{i({loading:!1})}},fetchInboxCount:async()=>{try{const s=await We.get("web/automation-runs/count",{searchParams:{inboxStatus:"unread"}}).json();i({inboxUnreadCount:s.count})}catch{}},initInbox:async()=>{try{const[s,u]=await Promise.all([We.get("web/automation-runs/count",{searchParams:{inboxStatus:"unread"}}).json(),We.get("web/projects").json()]);i({inboxUnreadCount:s.count,_accessibleProjectKeys:new Set(u.map(f=>f.key))})}catch{}},handleRunUpdate:s=>{const{runId:u,projectKey:f,status:d,hasFindings:p,inboxStatus:v}=s,y=o();if(y._accessibleProjectKeys&&!y._accessibleProjectKeys.has(f))return;const _=y.runs.findIndex(E=>E.id===u);if(_>=0){const E=y.runs[_],S=[...y.runs];S[_]={...E,status:d,hasFindings:p,inboxStatus:v};let D=0;v==="unread"&&E.inboxStatus!=="unread"?D=1:v!=="unread"&&E.inboxStatus==="unread"&&(D=-1),i({runs:S,inboxUnreadCount:Math.max(0,y.inboxUnreadCount+D)})}else v==="unread"&&o().fetchInboxCount(),y._lastRunQuery&&o().fetchRuns(y._lastRunQuery)},clearRunQuery:()=>i({_lastRunQuery:null}),reset:()=>{i({automations:[],currentAutomation:null,runs:[],templates:[],inboxUnreadCount:0,loading:!1,error:null,nextCursor:null,_fetchAbort:null,_fetchRequestId:0,_runFetchAbort:null,_runFetchRequestId:0,_accessibleProjectKeys:null,_lastRunQuery:null})}})),bp=di(i=>({status:"disconnected",lastEvent:null,eventSeq:0,taskSeq:0,workerSeq:0,init:()=>{const o=Mr.onEvent(u=>{const f=u.event==="task_status_changed"||u.event==="task_created"||u.event==="review_round_complete",d=u.event==="worker_status_changed";u.event==="automation_run_update"&&"runId"in u&&Fs.getState().handleRunUpdate(u),i(p=>({lastEvent:u,eventSeq:p.eventSeq+1,...f&&{taskSeq:p.taskSeq+1},...d&&{workerSeq:p.workerSeq+1}}))}),s=Mr.onStatus(u=>{const f=bp.getState().status;i({status:u}),f==="disconnected"&&u==="connected"&&i(d=>({eventSeq:d.eventSeq+1,taskSeq:d.taskSeq+1,workerSeq:d.workerSeq+1}))});return Mr.connect(),()=>{o(),s(),Mr.disconnect()}}})),xp="overlord-theme";function a0(){try{const i=localStorage.getItem(xp);if(i==="light"||i==="dark"||i==="system")return i}catch{}return"dark"}function Eh(){return typeof window>"u"?"light":window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"}const Sp=di(i=>{const o=a0(),s=o==="system"?Eh():o;return{theme:o,resolved:s,setTheme:u=>{localStorage.setItem(xp,u);const f=u==="system"?Eh():u;i({theme:u,resolved:f})},setResolved:u=>{i({resolved:u})}}}),n0={common:{cancel:"cancel",confirm:"confirm",save:"save",delete:"delete",edit:"edit",create:"create",copy:"copy",copied:"copied",close:"close",back:"back",go_back:"go back",go_home:"go home",dismiss:"dismiss",retry:"retry",loading:"// thinking...",processing:"processing...",creating:"creating...",saving:"saving...",updating:"updating...",verifying:"verifying...",signing_in:"signing in...",just_now:"just now",never:"never",previous:"previous",next:"next",enabled:"enabled",disabled:"disabled",runtime_error:"// runtime error",an_unexpected_error_occurred:"an unexpected error occurred",reload:"reload",not_found:"404",page_not_found:"// page not found",the_page_does_not_exist:"the page you are looking for does not exist or has been moved.",not_found_terminal_error:"error: requested not found - page does not exist",not_set:"not set",view_all:"view all",discard:"discard",save_changes:"save changes",remove:"remove",actions:"actions",name:"name",status:"status",role:"role",created_at:"created at",m_ago:"{n}m ago",h_ago:"{n}h ago",d_ago:"{n}d ago",loop_section:"// loop",tasks_section:"// tasks",fleet_section:"// fleet",docs_section:"// docs",admin_section:"// admin",overlord:"overlord",logout:"logout",logout_title:"// logout",logout_message:"are you sure you want to log out?",log_out:"log out",profile:"profile",search_placeholder:"search",search_input_placeholder:"search tasks, workers, projects...",no_search_results:'// no results for "{query}"',navigate_hint:"navigate",select_hint:"select",close_hint:"close",notifications:"notifications",mark_all_read:"mark all read",no_notifications:"// no notifications",mark_as_read:"mark as read",switch_to_light:"switch to light mode",switch_to_dark:"switch to dark mode",light_mode:"light mode",dark_mode:"dark mode",dismiss_notification:"dismiss",breadcrumb_terminal:"terminal",breadcrumb_terminal_sub:"active sessions",breadcrumb_dashboard:"dashboard",breadcrumb_dashboard_sub:"active overview",breadcrumb_tasks:"tasks",breadcrumb_tasks_sub:"queue management",breadcrumb_workers:"workers",breadcrumb_workers_sub:"fleet status",breadcrumb_projects:"projects",breadcrumb_projects_sub:"repository index",breadcrumb_admin:"admin",breadcrumb_admin_sub:"system control",breadcrumb_profile:"profile",breadcrumb_profile_sub:"user settings",breadcrumb_tokens:"tokens",breadcrumb_tokens_sub:"personal api tokens",breadcrumb_docs:"docs",breadcrumb_docs_sub:"documentation",breadcrumb_docs_cli:"docs",breadcrumb_docs_cli_sub:"cli",breadcrumb_docs_api:"docs",breadcrumb_docs_api_sub:"api",breadcrumb_docs_skill:"docs",breadcrumb_docs_skill_sub:"skill",breadcrumb_docs_bot_sub:"bot",breadcrumb_docs_all_sub:"all"},auth:{sign_in:"sign in",username:"username",enter_username:"enter username",password:"password",enter_password:"enter password",ai_powered_development_system:"// ai-powered development system",username_and_password_required:"username and password are required.",login_failed:"login failed",invalid_totp_code:"invalid totp code",two_factor_verification:"// 2fa verification",enter_totp_code:"enter your totp code",please_enter_valid_6_digit_code:"please enter a valid 6-digit code.",session_expired:"session expired",session_expired_message:"// your session has expired. please log in again.",go_to_login:"go to login",totp_setup_subtitle:"// scan the qr code with your authenticator app",verification_code:"verification code",verify_and_enable:"verify and enable",totp_setup_complete_login_again:"2fa setup complete! please log in again.",totp_setup_failed:"verification failed. please try again.",totp_setup_footer:"// you must complete this setup before accessing the application",totp_manual_entry:"// or enter this key manually",verify:"verify",initializing:"// initializing...",failed_to_init_totp:"failed to initialize totp setup"},dashboard:{title:"dashboard",tasks_active_queued:"active / queued",online_workers:"online workers",completed_all_today:"completed all today",completed_by_you_today:"completed by you today",task_count:"> task count",success_rate:"success rate",last_7_days:"last 14 days",recent_tasks:"> recent tasks",no_tasks_yet:"// no tasks yet",workers:"> workers",no_workers_registered:"// no workers registered",projects:"> projects",recent_activity:"> recent activity",no_recent_activity:"// no recent activity",daily_breakdown_not_available:"// daily breakdown not available",task_total:"task",tasks_total:"tasks",slots:"slots",online:"online",idle:"idle",offline:"offline"},tasks:{title:"tasks",create_task:"create task",new_task:"new task",task_description:"task description",describe_task_placeholder:"describe the development task in detail...",project:"project",select_project:"select project...",task_type:"type",branch_slug:"branch name (optional)",branch_slug_placeholder:"auto-generated from description",target_branch:"target branch (optional)",target_branch_placeholder:"defaults to project default branch",issue_ref:"external issue (optional)",issue_ref_placeholder:"e.g. PROJ-123 or Jira/Sentry URL",target_worker:"target worker (optional)",any_able:"any able",assign_developer:"assign developer (admin only)",select_developer:"select developer...",search_tasks:"search tasks...",filter_project:"all projects",filter_developer:"all developers",filter_mode:"all modes",mode_develop:"develop",mode_plan:"plan",mode_review:"review",mode_automation:"automation",id:"id",description_col:"description",status_col:"status",project_col:"project",assignee:"assignee",worker:"worker",time:"time",stage:"stage",no_tasks_found:"no tasks found",try_adjusting_search:"try adjusting your search query",create_first_task:"create your first task to get started",tab_all:"all",tab_running:"running",tab_queued:"queued",tab_completed:"completed",tab_failed:"failed",tab_cancelled:"cancelled",status_queued:"queued",status_assigned:"assigned",status_running:"running",status_suspended:"suspended",status_completed:"completed",status_failed:"failed",status_cancelled:"cancelled",similar_task_exists:"a similar task already exists.",view_existing:"view existing",cancel_task:"cancel",retry_task:"retry",cursor_tunnel:"IDE tunnel",skip_stage:"skip stage",take_over:"take over",connected:"connected",disconnected:"disconnected",connecting:"connecting",terminal:"terminal",pipeline_tab:"pipeline",logs:"logs",task_not_found:"// task not found",back_to_tasks:"back to tasks",cancel_task_title:"cancel task",fork_task:"fork task",fork_task_desc:"create a new task based on this one. new text appends to the original detail by default.",fork_description_placeholder:"enter extra detail to append (leave empty to reuse original)",fork_agent_type_placeholder:"same as source ({agent})",fork_replace_description:"replace original detail instead of appending",fork_append_hint:"without replace enabled, your input is appended after the original detail",fork_success:"task forked successfully",fork_error:"failed to fork task",activity_log:"> activity log",external_refs:"> external refs",no_activity:"// no activity yet",confirm_stage_message:'confirm execution of stage "{name}"? this will proceed with the pipeline.',plan_review_message:'review the implementation plan for stage "{name}". approve to proceed or provide feedback.',plan_decompose_message:"spec document has been generated and pushed. would you like to decompose it into development tasks?",plan_decompose_push_failed_message:"spec document has been generated but failed to push to the default branch. the spec is saved in the task worktree. would you like to decompose it into development tasks?",code_review_message:'review the changes for stage "{name}". approve to proceed or provide feedback.',feedback_placeholder:"provide feedback (optional)...",approve_plan:"approve plan",approve_plan_decompose:"decompose into tasks",reject_plan_decompose:"save spec only",approve_review:"approve changes",request_changes:"request changes",loading_task:"// thinking...",task_suspended_banner:"// task suspended — waiting for user confirmation",pending_confirmation:"> pending confirmation",pipeline_requires_confirmation:"the pipeline requires confirmation before proceeding.",confirm_and_proceed:"confirm and proceed",confirm_failed:"failed to confirm stage",reject:"reject",pty_terminal:"// pty terminal",view_terminal:"switch to terminal tab",restore_auto:"restore auto",requesting_takeover:"requesting...",pipeline_stages:"// pipeline stages",task_info:"> task info",stage_timeline:"> stage timeline",workspace_section:"> workspace",mr_link:"MR link",queue_position:"queue position: #{position} of {total}",queue_ahead:"{count} task(s) ahead",queue_next:"next to be processed",queue_position_banner:"// queued — position #{position} of {total}",no_worker_assigned:"// no worker assigned",no_output:"// no output",pty_output:"> PTY output",stage_progress:"> stage progress",task_logs:"> task logs",search_logs:"search logs...",no_log_entries:"// no log entries",prev:"prev",cursor_tunnel_section:"> IDE tunnel",auto_pipeline:"auto pipeline",manual_takeover:"manual takeover",takeover_denied:"takeover denied",form_project_label:"project",form_description_label:"description",form_description_placeholder:"describe the task for the ai agent...",form_worker_preference:"worker preference",form_worker_placeholder:"optional: worker id or name (--on)",form_worker_hint:"leave empty for automatic worker selection.",form_agent_type:"agent",form_agent_type_placeholder:"default",form_select_project:"select a project",form_create_task:"create task",project_and_description_required:"project and description are required.",failed_to_create_task:"failed to create task.",tunnel_idle:"idle",tunnel_starting:"starting...",tunnel_connected:"connected",tunnel_expired:"expired",tunnel_closing:"closing...",tunnel_start:"start",tunnel_open_in_cursor:"open in IDE",tunnel_header:"> IDE tunnel",tunnel_copied:"// copied to clipboard",tunnel_waiting:"// waiting for connection url...",tunnel_start_button:"> start tunnel",tunnel_starting_button:"// starting...",tunnel_stopping:"// stopping...",tunnel_cancel:"> cancel",tunnel_open_cursor:"> open in IDE",tunnel_open_vscode:"> open in vscode",tunnel_stop:"> stop tunnel",tunnel_restart:"> restart tunnel",tunnel_copy_url:"copy url",tunnel_expires_hm:"expires in {h}h {m}m",tunnel_expires_m:"expires in {m}m",tunnel_start_failed:"failed to start tunnel",tunnel_install_code_hint:'install the VS Code CLI ("code" command) to enable tunnels',dedup_title:"> similar task exists",dedup_description:"// a similar task was found that may already address your request",dedup_create_anyway:"create anyway",stage_submitting:"submitting...",cancel_task_message:"are you sure you want to cancel task #{id}? this will terminate the running agent and cannot be undone.",cancel_task_confirm_label:"cancel task",retry_title:"retry task",retry_confirm_label:"retry",retry_message_with_mr:"task #{id} has an existing mr ({url}). retrying will create a new attempt on the same branch. continue?",retry_message_without_mr:"are you sure you want to retry task #{id}? this will create a new execution attempt.",reuse_workspace_label:"reuse existing workspace (skip worktree recreation, continue on current branch)",detail_tab:"detail",detail_basic_info:"> basic info",detail_creator:"creator",detail_project:"project",detail_worker:"worker",detail_time_cost:"time cost",detail_branch:"branch",detail_task_name:"> task name & description",detail_ai_name:"ai-generated name",detail_task_id:"task id",detail_source:"source platform",detail_description:"> description"},workers:{title:"workers",fleet:"fleet",setup_guide:"setup guide",all_statuses:"all",register_worker:"register worker",no_workers_found:"no workers found",no_workers_registered:"no workers have registered yet",try_changing_status_filter:"try changing the status filter",view_setup_guide:"view setup guide",online:"online",offline:"offline",draining:"draining",cpu:"cpu",mem:"mem",disk:"disk",tasks_slots:"tasks: {active}/{max} slots",back_to_workers:"back to workers",drain:"drain",undrain:"undrain",last_heartbeat:"last heartbeat: {time}",resource_usage:"> resource usage",connection_info:"> connection info",capabilities:"> capabilities",current_tasks:"> tasks",host:"host",os:"os",cpu_model:"CPU model",cpu_cores:"CPU cores",memory:"memory",loading_worker:"// thinking...",worker_not_found:"// worker not found",draining_warning:"// this worker is draining — no new tasks will be assigned",draining_active_tasks:"active tasks will continue to run until completion",active_tasks:"> active tasks",no_active_tasks:"// no active tasks on this worker",worker_info:"> worker info",unknown:"unknown",n_a:"n/a",id:"id",description:"description",stage:"stage",no_capabilities_short:"// no capabilities",slots:"slots",status_label:"status",undrain_worker_title:"> undrain worker",drain_worker_title:"> drain worker",undrain_confirm:"are you sure you want to undrain {name}? the worker will start accepting new tasks again.",drain_confirm:"are you sure you want to drain {name}? running tasks will complete, but no new tasks will be assigned until the worker is undrained.",decommission:"decommission",decommission_title:"> decommission worker",decommission_confirm:'permanently decommission "{name}"? active tasks will be failed or re-queued, and the worker will be disconnected. this cannot be undone.',restore_capability:"restore capability",restore_capability_title:"> restore capability",restore_capability_confirm:"restore {capability} on {name}? this only clears the degradation flag. it does not fix the underlying issue.",awaiting_auto_recovery:"awaiting auto-recovery",manual_restore_required:"manual restore required",worker_id:"worker ID",setup_header_desc:"// follow these steps to add a new worker to your overlord cluster.",prerequisites:"// prerequisites",prereq_machine:"linux or macos machine with at least 2 cpu cores and 4gb ram",prereq_node:"node.js 18+ and pnpm installed",prereq_git:"git installed (2.25+)",prereq_network:"network access to the overlord server",prereq_token:"admin-generated worker registration token",step_generate_token:"generate worker token",step_generate_token_desc:"// create a one-time registration token from the admin panel. each token can register exactly one worker.",go_to_token_management:"go to token management",step_install_worker:"install worker package",step_install_worker_desc:"// install the overlord worker package globally via npm.",step_configure_env:"configure environment",step_configure_env_desc:"// create a .env file in ~/.overlord-worker/ or set environment variables.",env_host:"overlord server address (required)",env_worker_token:"one-time registration token (required for first run)",env_worker_name:"display name (defaults to hostname)",env_workspace_root:"task workspace directory (defaults to ~/.overlord-worker/workspaces)",env_max_slots:"max concurrent tasks (defaults to 2)",step_start_worker:"start worker",step_start_worker_desc:"// start the worker process. it will register with the server and begin accepting tasks.",setup_wizard_option:"// option a: interactive setup wizard (recommended)",manual_config_option:"// option b: manual configuration",start_note_setup_wizard:"// if you used the setup wizard, the worker may already be running.",step_verify_connection:"verify connection",step_verify_connection_desc:'// once the worker connects, it will appear in the workers list with a "healthy" status.',verify_how_to:"// how to verify:",verify_check_workers:"check the workers page for your new worker",verify_status:'status should show "healthy" within 30 seconds',verify_capabilities:"worker capabilities are auto-detected on first heartbeat",last_heartbeat_label:"last heartbeat",worker_version:"worker version",reg_title:"// worker registration",reg_subtitle:"> register a new worker node",reg_step_generate_token:"generate token",reg_step_install_worker:"install worker",reg_step_waiting_activation:"waiting activation",reg_step_activated:"activated",reg_click_to_generate:"// click to generate a one-time registration token",reg_token_generated:"// token generated successfully",reg_running_installation:"// running installation on target worker",reg_installed_wait:"i've installed → wait for activation",reg_listening_for_worker:"listening for worker connection...",reg_worker_connected:"// worker connected",reg_waiting_for_worker:"// waiting for worker to connect...",reg_worker_activated:"worker {name} activated!",reg_worker_registered:"// worker successfully registered",reg_done:"done",reg_completed:"// completed"},projects:{title:"projects",create_project:"create project",no_projects_yet:"no projects yet",create_first_project:"create your first project to get started",key:"key",name:"name",project_info:"> project info",repo_url:"repo URL",default_branch:"default branch",git_platform:"git platform",agent_type:"agent type",max_turns:"max turns",allowed_tools:"allowed tools",default_project:"default project",tasks_count:"tasks",last_activity:"last activity",members:"> members",developer:"developer",role:"role",added_at:"added at",add_member:"add member",remove_member:"remove member",remove_member_confirm:"remove {name} from this project?",failed_to_add_member:"failed to add member.",member_already_exists:"this developer is already a member of this project.",pipeline:"> pipeline",add_stage:"+ add stage",recent_tasks:"> recent tasks",edit_project:"edit project",delete_project:"delete project",delete_project_confirm:'delete project "{name}"? this cannot be undone.',project_name:"project name",project_name_placeholder:"my awesome project",project_key:"project key",project_key_placeholder:"my-project",project_key_hint:"// unique identifier (lowercase, alphanumeric, hyphens)",ssh_url:"SSH URL",ssh_url_placeholder:"git@github.com:org/repo.git",ssh_url_hint:"// optional — workers prefer ssh for git operations",repo_url_placeholder:"https://github.com/org/repo.git",main:"main",github:"github",gitlab:"gitlab",gitea:"gitea",tools_placeholder:"tool1, tool2, ...",add_project_desc:"// add a new project to overlord",failed_to_create_project:"failed to create project.",update_project_desc:"// update project configuration",save_changes:"save changes",basic_info:"> basic info",agent_config:"> agent config",security:"> security",git_token:"> git token",git_token_label:"current token",git_token_hint:"// personal access token for git operations (push, clone, etc.)",git_token_set:"set token",git_token_clear:"clear token",git_token_saved:"git token saved.",git_token_cleared:"git token cleared.",git_token_failed:"failed to update git token.",pipeline_section:"> pipeline",edit_pipeline:"> edit pipeline",pty_output_filter:"PTY output filter",workspace_root:"workspace root",member_role:"member",maintainer_role:"maintainer",select_developer:"select developer...",adding:"adding...",project_not_found:"// project not found",back_to_projects:"back to projects",no_members_yet:"// no members yet",no_tasks_for_project:"// no tasks for this project yet",no_pipeline_configured:"// no pipeline configured",confirm_label:"confirm",id:"id",description:"description",status:"status",created:"created",project_saved:"project saved",failed_to_save_project:"failed to save project",invalid_pipeline_json:"invalid pipeline json",setup_commands:"setup commands",post_command:"post command",environment:"> environment",add_member_title:"// add member",edit_project_title:"edit project"},pipeline:{title:"pipeline editor",subtitle:"-- {key}",save:"save",cancel:"cancel",json_toggle:"json",add_stage:"add stage",stage_properties:"> stage properties",stage_name:"stage name",timeout:"timeout",confirm_required:"confirm required",on_failure:"on failure",goto:"goto",max_loops:"max loops",stop:"stop",select_stage:"// select a stage to edit properties",saved:"pipeline saved",failed_to_save:"failed to save pipeline",loading_pipeline:"// thinking...",unnamed:"unnamed",editing:"// editing: {name}",name:"name",on_failure_section:"// on failure",goto_stage:"goto stage",up:"up",down:"down",failed_to_load_project:"failed to load project",delete_stage:"delete stage"},profile:{title:"profile",profile_info:"> profile info",username:"username",git_name:"git name",git_email:"git email",status:"status",created_at:"created at",change_password:"> change password",current_password:"current password",new_password:"new password",confirm_password:"confirm password",current_password_required:"current password is required.",new_password_required:"new password is required.",passwords_do_not_match:"new passwords do not match.",password_changed:"password changed successfully.",failed_to_change_password:"failed to change password.",update_password:"update password",two_factor_auth:"> two-factor authentication",two_fa_enabled:"2fa is enabled",two_fa_not_setup:"2fa is not set up",regenerate_2fa_warning:`// regenerating 2fa will invalidate your current authenticator app setup.
257
257
  you will need to set up 2fa again on your next login.`,regenerate_2fa:"regenerate 2FA",regenerating:"regenerating...",access_tokens:"access tokens",access_tokens_desc:"// manage personal access tokens for cli & api",unable_to_load_profile:"// unable to load profile information",personal_settings:"// personal settings",password_hint_10_20:"// 10-20 characters, letters, numbers, and special characters",current_totp_code:"current TOTP code",totp_code_placeholder:"6-digit code",totp_code_required:"please enter your current 6-digit totp code to regenerate 2fa.",two_fa_regenerated:"2fa regenerated. you will need to set it up again on next login.",totp_code_invalid:"invalid totp code or failed to regenerate 2fa.",platform_accounts:"platform accounts",not_linked:"not linked",bind_hint:'send "bind" to the bot in lark or slack to link your account.'},access_tokens:{create_token:"create token",no_tokens:"no personal access tokens",create_token_desc:"create a token to authenticate with the cli or api",copy_token_warning:"// copy your token now. you will not be able to see it again.",token_name:"token name",token_name_placeholder:"my-cli-token",days_30:"30 days",days_90:"90 days",days_365:"365 days",no_expiry:"no expiry",failed_to_create_token:"failed to create token.",token_revoked:"token revoked.",failed_to_revoke_token:"failed to revoke token.",revoke:"revoke",last_used:"last used",created:"created",expires:"expires",revoke_confirm:'are you sure you want to revoke "{name}"? this action cannot be undone.',create_personal_access_token:"// create personal access token",tokens_authenticate_desc:"// tokens authenticate the ov cli and api requests",revoke_token_title:"// revoke token",token_label_required:"token label is required."},admin:{tab_developers:"developers",tab_bots:"bots",tab_tokens:"worker tokens",tab_audit_logs:"audit logs",tab_settings:"settings",developers_title:"admin / developers",developers_subtitle:"// developer account management",create_developer:"create developer",search_developers:"search developers...",no_matching_developers:"no matching developers",no_developers_found:"no developers found",try_adjusting_search:"try adjusting your search query",username:"username",role:"role",status:"status",all_statuses:"all statuses",status_active:"active",status_disabled:"disabled",totp:"totp",reset_2fa:"reset 2fa",deactivate:"deactivate",activate:"activate",create_developer_title:"create developer",edit_developer_title:"edit developer",failed_to_create_developer:"failed to create developer",failed_to_update_developer:"failed to update developer",failed_to_reset_2fa:"failed to reset 2fa",create_first_developer:"create your first developer to get started",all_fields_required:"all fields are required.",password_length_error:"password must be between 10 and 20 characters.",password_complexity_error:"password must contain at least one letter, one digit, and one special character.",password_hint:"// must be 10-20 characters with letters, digits, and special characters.",demote_self_warning:"you are about to demote yourself from admin. the system must have at least one admin. please verify another admin exists before proceeding.",demote_self_inline_warning:"// warning: you are demoting yourself from admin. ensure at least one other admin exists.",lark_uid:"lark open ID",slack_uid:"slack user ID",platform_accounts:"platform accounts",reset_2fa_confirm_message:"are you sure you want to reset two-factor authentication for",reset_2fa_audit_note:"// the user will be required to set up 2fa again on their next login. this action is recorded in the audit log.",resetting:"resetting...",bots_title:"admin / bots",bots_subtitle:"// bot instance management",create_bot:"create bot",no_bots_configured:"no bots configured",add_bot_desc:"add a bot instance to enable chat integrations with lark or slack",bot_name:"bot name",platform:"platform",app_id:"app ID",delete_bot:"delete bot",delete_bot_confirm:'delete bot "{name}"? this cannot be undone.',failed_to_delete_bot:"failed to delete bot.",failed_to_create_bot:"failed to create bot",chat_bindings:"group bindings",chat_bindings_subtitle:"// all integrations",no_chat_bindings:"// no group bindings configured",chat_id:"chat ID",chat_name:"chat name",project:"project",bot:"bot",edit_bot:"edit bot",name_and_app_id_required:"name and app id are required.",app_secret_required:"app secret is required for new bots.",app_secret:"app secret",app_secret_keep_current:"app secret (leave empty to keep current)",failed_to_update_bot:"failed to update bot",bot_token:"bot token",bot_token_keep_current:"bot token (leave empty to keep current)",bot_token_placeholder:"xoxb-...",bot_token_hint:"// OAuth & Permissions → Bot User OAuth Token",signing_secret:"signing secret",signing_secret_keep_current:"signing secret (leave empty to keep current)",signing_secret_placeholder:"your signing secret",signing_secret_hint:"// Basic Information → App Credentials → Signing Secret",app_secret_hint_lark:"// lark open platform → app credentials → app secret",encrypt_key:"encrypt key",encrypt_key_keep_current:"encrypt key (leave empty to keep current)",encrypt_key_hint:"events & callbacks → encryption strategy → encrypt key",encrypt_key_placeholder:"encrypt key from encryption strategy",app_id_hint_slack:"// Basic Information → App ID",app_id_hint_lark:"// lark open platform → app id",webhook_config:"// webhook configuration",webhook_config_hint_slack:"// copy these URLs to your Slack app settings",webhook_config_hint_lark:"// copy this URL to event subscriptions → request url",webhook_events_url:"events url",webhook_interact_url:"interactivity url",webhook_commands_url:"slash commands url",webhook_request_url:"request url",slack_events_hint:"// paste in Event Subscriptions → Request URL",slack_interact_hint:"// paste in Interactivity & Shortcuts → Request URL",slack_commands_hint:"// paste in Slash Commands → Request URL",invalid_bot_token:"// bot token must start with xoxb-",signing_secret_required:"// signing secret is required for Slack bots",add_binding:"add binding",failed_to_add_binding:"failed to add binding",failed_to_delete_binding:"failed to delete binding",tokens_title:"admin / worker tokens",tokens_subtitle:"// worker registration token management",generate_token:"generate token",no_worker_tokens:"no worker tokens",generate_token_desc:"generate a token to register a new worker",label:"label",purpose:"purpose",expires_at:"expires at",revoke_token:"revoke token",revoke_token_confirm:'revoke token "{label}"? this cannot be undone.',show_revoked:"show revoked",hide_revoked:"hide revoked",audit_title:"admin / audit logs",audit_subtitle:"// system activity audit trail",all_actions:"all actions",filter_by_user:"filter by user...",no_audit_entries:"no audit log entries",audit_logs_appear:"audit logs will appear here as actions are performed in the system",timestamp:"timestamp",user_id:"user ID",action:"action",resource:"resource",detail:"detail",ip:"ip",action_login:"login",action_logout:"logout",action_create:"create",action_update:"update",action_delete:"delete",action_revoke:"revoke",action_reset_2fa:"reset 2FA",action_generate_token:"generate token",showing_entries:"showing {count} entries",revoke:"revoke",generate_worker_token_title:"> generate worker token",create_one_time_token:"// create a one-time registration token",label_identifies_worker:"// identifies which worker this token is for",generating:"generating...",generate:"generate",worker_registered:"> worker registered",worker_token_generated:"> worker token generated",run_command_desc:"// run this command on the target machine to register the worker",token_shown_once:"// this token will only be shown once. copy the command before closing.",setup_command:"setup command",waiting_for_worker:"// waiting for worker to register...",token_not_yet_used:"// token not yet used. the worker can still register later using this token.",worker_registered_success:"// worker registered successfully",worker:"worker",copied_wait_for_worker:"copied — wait for worker",close_worker_can_register:"close // worker can still register",view_worker:"view worker",settings_title:"admin / settings",settings_subtitle:"// global system configuration",save_settings:"save settings",settings_saved:"settings saved",failed_to_save_settings:"failed to save settings",loading_settings:"// thinking...",scheduling:"> scheduling",heartbeat:"> heartbeat",output:"> output",defaults:"> defaults",max_concurrent_tasks:"max concurrent tasks per worker",max_concurrent_tasks_desc:"// maximum number of tasks a single worker can run simultaneously",task_timeout:"task timeout minutes",task_timeout_desc:"// auto-cancel tasks after this many minutes of inactivity",heartbeat_interval:"heartbeat interval seconds",heartbeat_interval_desc:"// expected interval between worker heartbeats",worker_offline_threshold:"worker offline threshold seconds",worker_offline_threshold_desc:"// mark worker offline after missing heartbeats for this duration",default_agent_type:"default agent type",default_agent_type_desc:"// default agent type for new projects",chat_binding_title:"// group bindings — {name}",chat_binding_no_bindings:"// no group bindings configured for this bot.",chat_binding_add:"// add group binding",chat_binding_id_placeholder:"platform chat/group id",chat_binding_name_placeholder:"display name for the chat",chat_binding_select_project:"select project...",chat_binding_all_fields_required:"all fields are required.",chat_binding_adding:"adding...",chat_binding_projects:"projects",chat_binding_default_project:"default project",chat_binding_set_default:"set default",chat_binding_default_badge:"default",chat_binding_set_default_failed:"failed to set default project",chat_binding_notify_group:"notify group",chat_binding_set_notify_default:"set notify default",chat_binding_notify_default_badge:"notify default",chat_binding_set_notify_default_failed:"failed to set notify default group",pat_label_required:"label is required.",pat_failed_to_generate:"failed to generate token",pat_label_placeholder:"e.g. build-server-03",tab_connectors:"connectors",connectors_title:"admin / connectors",connectors_subtitle:"// external connector management",connectors_empty:"no connectors configured",connectors_empty_desc:"add a connector to integrate with jira, sentry, or figma",connector_create:"add connector",connector_edit:"edit connector",connector_delete:"delete connector",connector_delete_confirm:'delete connector "{name}" and all its bindings? this cannot be undone.',connector_failed_to_create:"failed to create connector",connector_failed_to_update:"failed to update connector",connector_failed_to_delete:"failed to delete connector",connector_name:"connector name",connector_name_required:"name is required.",connector_base_url:"base URL",connector_webhook_secret:"webhook secret",connector_webhook_secret_keep:"webhook secret (leave empty to keep current)",connector_webhook_secret_clear:"clear webhook secret (disable signature verification)",connector_mention_keyword:"mention keyword",connector_mention_keyword_hint:"// keyword that triggers this connector in comments",connector_validate:"validate credentials",connector_valid:"credentials are valid",connector_invalid:"credentials are invalid",connector_validate_failed:"failed to validate credentials",connector_jira_email:"jira email",connector_jira_email_keep:"jira email (leave empty to keep current)",connector_jira_token:"jira api token",connector_jira_token_keep:"jira api token (leave empty to keep current)",connector_jira_cloud_label:"// jira cloud (email + api token)",connector_jira_pat_label:"// or jira server / data center (pat)",connector_jira_pat:"personal access token",connector_jira_pat_keep:"personal access token (leave empty to keep current)",connector_jira_creds_required:"provide either email + api token (cloud) or personal access token (server).",connector_sentry_token:"sentry auth token",connector_sentry_token_keep:"sentry auth token (leave empty to keep current)",connector_sentry_org:"sentry organization",connector_sentry_org_keep:"sentry organization (leave empty to keep current)",connector_sentry_creds_required:"sentry auth token and organization are required.",connector_figma_token:"figma personal access token",connector_figma_token_keep:"figma token (leave empty to keep current)",connector_figma_creds_required:"figma personal access token is required.",connector_figma_webhook_required:"figma connectors require a webhook secret.",connector_bindings:"connector bindings",connector_bindings_subtitle:"// all project bindings",connector_bindings_title:"// bindings — {name}",connector_no_bindings:"// no bindings configured",connector_add_binding:"add binding",connector_binding_project:"project",connector_binding_external_key:"external project key",connector_binding_select_project:"select project...",connector_binding_is_default:"set as default binding",connector_binding_default:"default",connector_binding_project_required:"project is required.",connector_binding_adding:"adding...",connector_binding_failed_to_add:"failed to add binding",connector_binding_failed_to_delete:"failed to delete binding",connector_binding_failed_to_update:"failed to update binding",connector_binding_status_done:"status on done",connector_binding_auto_review:"auto design review",connector_enable:"enable connector",connector_disable:"disable connector",connector_webhook_url:"webhook url"},landing:{overlord:"overlord",version_badge:"self-hosted · bring your own subscriptions and machines",hero_turn_your:"turn your",hero_into:"into",hero_word_subscriptions:"subscriptions",hero_word_machines:"machines",hero_highlight:"a dev team that never sleeps.",hero_desc:"dispatch coding tasks across your machine fleet. ai agents execute in parallel — you watch, jump in, or come back to finished pull requests.",get_started:"get started",read_docs:"read docs",how_it_works:"how it works",three_steps:"from task description to merged pull request.",step_n:"step {n}",step_define:"connect your fleet",step_define_desc:"register your machines as workers. each one runs ai agents — claude code, cursor, codex, pi — using your existing subscriptions.",step_dispatch:"send a task",step_dispatch_desc:"describe what you want from slack, lark, cli, or the web dashboard. overlord finds the best available machine and starts the ai agent automatically.",step_monitor:"watch or walk away",step_monitor_desc:"live terminal streams agent output to your browser. jump in to guide the agent, or come back later to a finished pull request.",everything_you_need:"everything you need",complete_platform:"self-hosted. your machines, your ai subscriptions, your control.",feature_terminal:"real-time pty terminal",feature_terminal_desc:"stream live agent output directly in the browser. full xterm.js integration with scrollback and search.",feature_multi_agent:"multi-agent support",feature_multi_agent_desc:"first-class support for claude code, cursor, codex, and pi. route tasks to the right agent automatically.",feature_routing:"smart task routing",feature_routing_desc:"intelligent scheduling across your machine fleet. tasks land on the best available worker every time.",feature_pipeline:"pipeline automation",feature_pipeline_desc:"chain tasks into multi-stage pipelines. build, test, and deploy in one continuous flow.",feature_collab:"team collaboration",feature_collab_desc:"project-level permissions, audit logs, and shared dashboards. keep your whole team in sync.",feature_pool:"pool subscriptions, maximize value",feature_pool_desc:"every team member's ai subscription goes into a shared pool — everyone can use any seat. no idle subscriptions, no duplicate costs. the bigger your team, the more you save.",feature_trigger:"trigger from everywhere",feature_trigger_desc:"slack message, lark bot, cli command, or web dashboard — create tasks from whatever tool you already use. phone, laptop, tablet, it all works.",feature_remote:"code from anywhere",feature_remote_desc:"on the bus, at a café, or away from your desk — dispatch tasks from your phone or laptop and your fleet keeps coding. come back to finished pull requests.",feature_security:"secure by design",feature_security_desc:"totp two-factor auth, scoped api tokens, and full audit trail. enterprise-ready from day one.",install_title:"get up and running",install_desc:"three components, three commands. deploy in minutes.",setup_step_1_title:"deploy the server",setup_step_1_desc:"install overlord and start the central server. it manages all tasks, authentication, and real-time communication.",setup_step_1_command:`npm install -g @overlordai/cli @overlordai/server
258
258
  overlord install`,setup_step_1_link:"installation guide",setup_step_2_title:"register workers",setup_step_2_desc:"set up worker machines that execute tasks. each worker runs ai agents in isolated workspaces with full git integration.",setup_step_2_command:`npm install -g @overlordai/cli @overlordai/worker
259
259
  overlord setup worker`,setup_step_2_link:"worker setup guide",setup_step_3_title:"connect as developer",setup_step_3_desc:"install the developer cli to create tasks, attach to running sessions, and monitor progress from your terminal.",setup_step_3_command:`npm install -g @overlordai/developer-cli
260
260
  ov login https://overlord.yourdomain.com`,setup_step_3_link:"development workflow",go_to_app:"open app",documentation:"documentation",api:"api",copy_install_command:"copy install command"},docs:{quick_start:"// quick start",developer_cli:"developer cli (ov)",admin_cli:"admin cli (overlord)",authentication:"// authentication",usage:"usage",flags:"flags",example:"example",request_body:"request body",response:"response",quick_start_with_token:"// quick start with your token",replace_token_hint:"// replace <your-token> with the actual token value from your access tokens page",cli_tools_desc:"// overlord provides two cli tools: {ov} (developer cli) and {overlord} (admin/ops cli)",api_base_url_desc:"// base url: {url} · all endpoints return json · auth via bearer token in authorization header",docs_nav_changelog:"// changelog",docs_nav_getting_started:"// getting started",docs_nav_guides:"// guides",docs_nav_reference:"// reference",docs_nav_other:"// other",docs_installation:"installation",docs_developer_setup:"developer setup",docs_worker_setup:"worker setup",docs_bot_setup:"bot setup",docs_local_dev:"local development",docs_worker_ops:"worker operations",docs_deployment:"deployment",docs_bot_integration:"bot integration",docs_pipeline:"pipeline config",docs_dev_workflow:"dev workflow",docs_cli:"cli reference",docs_api:"api reference",docs_task_guide:"task guide",docs_skill:"skill reference",docs_permissions:"permissions & roles",docs_env_vars:"environment variables",docs_architecture:"architecture",docs_changelog:"changelog",docs_back:"< back",docs_all_title:"// all documentation",docs_all_subtitle:"browse all guides, references, and resources",docs_desc_installation:"install overlord server and cli tools",docs_desc_developer_setup:"set up your local development environment",docs_desc_worker_setup:"register and configure worker machines",docs_desc_bot_setup:"connect lark or slack bots to overlord",docs_desc_local_dev:"run and debug overlord locally",docs_desc_worker_ops:"manage worker lifecycle and monitoring",docs_desc_deployment:"deploy overlord to production servers",docs_desc_bot_integration:"interactive cards, adapter pattern, troubleshooting",docs_desc_pipeline:"define multi-stage task pipelines",docs_desc_dev_workflow:"git workflow, branching, and merge requests",docs_desc_cli:"cli command reference",docs_desc_api:"http api endpoint reference",docs_desc_task_guide:"task modes, task types, forks, and task relationships",docs_desc_skill:"custom skill definitions and configuration",docs_desc_permissions:"roles, access control, and authorization",docs_desc_env_vars:"environment variables for server and worker",docs_desc_architecture:"system architecture and component overview",docs_desc_changelog:"version history and release notes",docs_agent_cli:"agent cli",docs_desc_agent_cli:"claude, cursor, codex, and pi cli integration and flag mapping",docs_connectors:"external connectors",docs_desc_connectors:"jira, sentry, and figma integration — webhooks, bindings, design context, and closure actions"},onboarding:{getting_started:"// getting started",dismiss:"dismiss",all_done:"all set! you're ready to go.",admin_create_project_title:"create your first project",admin_create_project_desc:"set up a project with a git repo and pipeline",admin_register_worker_title:"register a worker",admin_register_worker_desc:"generate a token and set up a worker to run tasks",admin_create_developer_title:"create a developer account",admin_create_developer_desc:"add team members who can create and monitor tasks",admin_configure_bot_title:"configure a chat bot",admin_configure_bot_desc:"register a Lark or Slack bot to enable task management via chat",admin_first_task_title:"create your first task",admin_first_task_desc:"verify the full pipeline works end-to-end",lead_view_projects_title:"view your projects",lead_view_projects_desc:"check the projects assigned to you",lead_configure_pipeline_title:"configure a pipeline",lead_configure_pipeline_desc:"set up stages for your project workflow",lead_add_member_title:"add a team member",lead_add_member_desc:"invite developers to your project",lead_first_task_title:"create your first task",lead_first_task_desc:"submit a task and watch it execute",dev_install_cli_title:"install the ov cli",dev_install_cli_desc:"npm install -g @overlordai/developer-cli",dev_setup_cli_title:"run ov setup",dev_setup_cli_desc:"connect to the server and authenticate",dev_link_chat_title:"link your chat account",dev_link_chat_desc:'send "bind" to the bot in Lark or Slack to connect your account',dev_view_projects_title:"explore projects",dev_view_projects_desc:"browse available projects and their pipelines",dev_first_task_title:"create your first task",dev_first_task_desc:"submit a task via web or cli",go_to_projects:"go to projects",go_to_workers:"go to workers",go_to_tasks:"go to tasks",go_to_bots:"manage bots",manage_developers:"manage developers",cli:"cli",setup_guide:"setup guide"},bind:{title:"// link platform account",linking:"linking your account...",success:"account linked successfully!",success_detail:"your {platform} account has been connected. you can now use bot commands.",error:"failed to link account",invalid_token:'this link is invalid or has expired. send "bind" to the bot again to get a new link.',back_to_home:"go to dashboard",no_token:"no bind token provided."},pwa_install:{title:"overlord://install",command:"overlord --install",desc_1:"add to home screen for standalone app experience",desc_2:"works offline · full-screen · instant launch",install:"y — install",skip:"n — skip",ios_command:"install --manual",ios_step_1:"tap share button in safari toolbar",ios_step_2:'scroll down → tap "add to home screen"',ios_step_3:'tap "add" to confirm'},pwa_update:{message:"new version available",reload:"reload"},terminal_home:{title:"terminal",select_project:"project...",all_projects:"all projects",task_description_placeholder:"describe the task...",new_task:"new task",no_active_tasks:"no active tasks",create_task_hint:"create a task using the bar above to get started",confirm_create_title:"create task",confirm_create_message:`create a [{taskType}] task in project [{projectKey}]?
261
261
 
262
- "{description}"`},plan:{title:"plan",create:"create plan",description_placeholder:"describe what you want to build...",spec_generated:"spec generated",decompose:"decompose into tasks",save_only:"save spec only",no_plans:"no plan tasks yet",view_spec:"view spec"},automation:{title:"automations",new_automation:"new automation",tab_inbox:"inbox",tab_automations:"automations",tab_templates:"templates",no_unread_findings:"no unread findings",inbox_description:"automation runs with findings will appear here",select_all:"select all",deselect_all:"deselect all",mark_all_read:"mark all read",marked_as_read:"marked as read",failed_mark_read:"failed to mark as read",archived:"archived",failed_archive:"failed to archive",marked_n_read:"marked {n} as read",failed_batch_update:"failed to batch update",run_label:"run #{id} -- automation #{automationId}",finding_count:"{count} finding",findings_count:"{count} findings",mark_read:"mark read",archive:"archive",no_automations:"no automations",create_first_description:"create your first automation to get started",automation_disabled:"automation disabled",automation_enabled:"automation enabled",failed_toggle:"failed to toggle automation",last_run:"last run: {time}",next_run:"next run: {time}",no_runs_yet:"no runs yet",no_templates:"no templates",templates_description:"builtin and project templates will appear here once available",templates_suggested:"suggested",templates_suggested_title:"start from a template instead of a blank automation",templates_suggested_description:"pick one of the built-in automations below, then tune the schedule, project, and execution mode to match how your team works.",templates_ready_count:"{count} templates ready",templates_browse:"browse by category",templates_browse_description:"jump to the automation set that matches the workflow you want to automate.",template_preview:"template preview",template_prompt:"automation prompt",template_source_builtin:"builtin",template_source_custom:"custom",template_category_status_reports:"status reports",template_category_status_reports_description:"summaries, digests, and weekly rollups that turn repository activity into updates people can actually read.",template_category_release_prep:"release prep",template_category_release_prep_description:"release notes, pre-flight checks, and changelog work that help teams ship with fewer surprises.",template_category_incidents_triage:"incidents & triage",template_category_incidents_triage_description:"ci investigations and failure summaries that help you separate signal from operational noise.",template_category_code_quality:"code quality",template_category_code_quality_description:"bug scans, coverage work, security reviews, and invariants that keep changes from quietly eroding reliability.",template_category_repo_maintenance:"repo maintenance",template_category_repo_maintenance_description:"feature-flag cleanup, dependency upkeep, docs refreshes, and recurring chores that usually slip between releases.",template_category_growth_exploration:"growth & exploration",template_category_growth_exploration_description:"performance audits and coaching prompts that help teams find their next high-leverage improvement.",template_category_other:"other",template_category_other_description:"templates without a stronger home still show up here so they remain easy to discover.",use_template:"use template",create_title:"new automation",project:"project",select_project:"select project",name:"name",name_placeholder:"e.g. nightly security scan",name_required:"name is required",description:"description",description_placeholder:"describe what the automation agent should do. use {{project_name}}, {{date}}, {{trigger_event}} as needed.",template_vars:"template vars: {{date}}, {{time}}, {{weekday}}, {{project_name}}, {{trigger_event}}, {{source_task_id}}",trigger_type:"trigger type",cron_config:"cron config",preset:"preset",cron_expression:"cron expression",cron_expression_required:"cron expression is required",cron_expression_invalid:"invalid cron expression: must have 5 or 6 space-separated fields",timezone:"timezone",task_event_config:"task event config",event_type:"event type",all_projects:"all projects",filter_project_key:"filter project key (optional)",filter_task_mode:"filter task mode (optional)",all_modes:"all modes",execution_mode:"execution mode",writable_hint:"agent can create branches and merge requests",readonly_hint:"agent runs in read-only mode, reports findings only",agent_type:"agent type",notify_project_chats:"notify default chats",notify_project_chats_hint:"send completion and failure cards to each bot's notify-default chat for this project",notify_project_chats_enabled:"notifications on",notify_project_chats_disabled:"notifications off",project_required:"project is required",creating:"creating...",create_from_template:"create from template",create_automation:"create automation",cancel:"cancel",automation_created:"automation created",failed_create:"failed to create automation",failed_load_projects:"failed to load projects",edit_title:"edit automation",saving:"saving...",save_changes:"save changes",automation_updated:"automation updated",failed_update:"failed to update automation",automation_not_found:"automation not found",enabled:"enabled",disabled:"disabled",disable:"disable",enable:"enable",edit:"edit",trigger_now:"trigger now",delete:"delete",configuration:"// configuration",schedule:"schedule",event:"event",automation_triggered:"automation triggered",failed_trigger:"failed to trigger automation",automation_deleted:"automation deleted",failed_delete:"failed to delete automation",run_history:"// run history",no_runs:"no runs yet",col_time:"time",col_status:"status",col_findings:"findings",col_task:"task",delete_title:"delete automation",delete_confirm:'are you sure you want to delete "{name}"? this action cannot be undone.',run_title:"run #{id}",run_not_found:"run not found",run_metadata:"// run metadata",status:"status",triggered_at:"triggered at",duration:"duration",task_label:"task #{id}",merge_request:"merge request",findings_title:"// findings ({count})",no_findings:"no findings"},review:{title:"review",pending:"pending review",in_progress:"in progress",history:"history",launch:"launch review",launch_short:"review",select_agents:"select review agents",approve_fix:"fix issues",skip_fix:"no fix needed",review_again:"review again",round:"round",no_reviews:"no reviews yet",issues_summary:"{critical} critical · {warning} warning · {suggestion} suggestion",description_placeholder:"review instructions (optional)...",empty_report_warning:"review completed but no structured report was produced. check the terminal output for details.",fix_push_info:"selected agent will push fixes to the source branch",waiting_agents:"waiting for review agents to finish...",skip_fix_label:"review only (skip fix stage)"}};function l0(i,o){const s=o.split(".");let u=i;for(const f of s){if(u==null||typeof u!="object")return o;u=u[f]}return typeof u=="string"?u:o}function i0(i,o){return o?i.replace(/\{(\w+)\}/g,(s,u)=>o[u]!=null?String(o[u]):`{${u}}`):i}function Zr(i,o){return i0(l0(n0,i),o)}function Xt(){return{t:g.useCallback((o,s)=>Zr(o,s),[])}}function kp(){const{theme:i,setTheme:o}=Sp(),{t:s}=Xt(),u=i==="dark"||i==="system"&&typeof window<"u"&&window.matchMedia("(prefers-color-scheme: dark)").matches;function f(){o(u?"light":"dark")}return m.jsx("button",{onClick:f,className:"flex items-center gap-1.5 rounded-[4px] p-2 text-[var(--text-secondary)] transition-colors hover:bg-[var(--border)] hover:text-[var(--text-primary)]","aria-label":s(u?"common.switch_to_light":"common.switch_to_dark"),title:s(u?"common.light_mode":"common.dark_mode"),children:u?m.jsx(kb,{size:16}):m.jsx(gb,{size:16})})}const r0=3e4;function o0(i){if(i.link)return i.link;const o=(i.title+" "+i.body).match(/task\s*#?(\d+)/i);if(o)return`/tasks/${o[1]}`;const s=(i.title+" "+i.body).match(/worker\s+(\S+)/i);return s?`/workers/${s[1]}`:null}function wp(){const i=Ia(),[o,s]=g.useState([]),[u,f]=g.useState(0),[d,p]=g.useState(!1),[v,y]=g.useState(!1),_=g.useRef(null),{t:E}=Xt(),S=g.useRef(async()=>{try{y(!0);const H=(await We.get("web/notifications",{searchParams:{limit:"20"}}).json()).data,B=H.filter(U=>!U.isRead).length;s(U=>U.length===H.length&&U.every((K,X)=>K.id===H[X].id&&K.isRead===H[X].isRead)?U:H),f(U=>U===B?U:B)}catch{}finally{y(!1)}});g.useEffect(()=>{S.current();const q=setInterval(()=>S.current(),r0);return()=>clearInterval(q)},[]),g.useEffect(()=>{function q(H){_.current&&!_.current.contains(H.target)&&p(!1)}return document.addEventListener("mousedown",q),()=>document.removeEventListener("mousedown",q)},[]);async function D(q){try{await We.post(`web/notifications/${q}/read`),s(H=>H.map(B=>B.id===q?{...B,isRead:!0}:B)),f(H=>Math.max(0,H-1))}catch{}}async function Y(){try{await We.post("web/notifications/read-all"),s(q=>q.map(H=>({...H,isRead:!0}))),f(0)}catch{}}return m.jsxs("div",{className:"relative",ref:_,children:[m.jsxs("button",{type:"button",onClick:()=>p(q=>!q),"aria-label":E("common.notifications"),className:"relative inline-flex items-center justify-center rounded-[4px] p-2 text-[var(--text-secondary)] transition-colors hover:bg-[var(--border)] hover:text-[var(--text-primary)]",children:[m.jsx(Pv,{size:16}),u>0&&m.jsx("span",{className:"absolute right-0 top-0 flex h-3 min-w-3 items-center justify-center rounded-full bg-[var(--destructive)] px-0.5 text-[8px] font-semibold leading-none text-white",children:u})]}),d&&m.jsxs("div",{className:"absolute right-0 top-full z-50 mt-2 w-[min(320px,calc(100vw-2rem))] rounded-[4px] border border-[var(--border)] bg-[var(--bg-card)] shadow-lg",children:[m.jsxs("div",{className:"flex items-center justify-between border-b border-[var(--border)] px-4 py-3",children:[m.jsx("span",{className:"text-sm font-semibold",children:E("common.notifications")}),u>0&&m.jsxs("button",{type:"button",onClick:Y,"aria-label":E("common.mark_all_read"),className:"inline-flex items-center gap-1.5 text-xs text-[var(--text-secondary)] hover:text-[var(--text-primary)]",children:[m.jsx(eb,{className:"h-3.5 w-3.5"}),E("common.mark_all_read")]})]}),m.jsx("div",{className:"max-h-80 overflow-y-auto",children:v&&o.length===0?m.jsx("div",{className:"flex justify-center py-8",children:m.jsx("div",{className:"h-4 w-4 animate-spin rounded-full border-2 border-[var(--border)] border-t-[var(--accent)]"})}):o.length===0?m.jsxs("div",{className:"flex flex-col items-center gap-3 py-8",children:[m.jsx("span",{className:"text-xl font-bold text-[var(--border)]",children:"[ ]"}),m.jsx("span",{className:"text-xs text-[var(--text-muted)]",children:E("common.no_notifications")})]}):o.map(q=>{const H=o0(q);return m.jsxs("div",{className:`flex items-start gap-3 border-b border-[var(--border)] px-4 py-3 last:border-b-0 transition-colors ${H?"cursor-pointer hover:bg-[var(--bg-input)]":""} ${q.isRead?"opacity-60":"bg-[var(--accent)]/5"}`,onClick:()=>{H&&(q.isRead||D(q.id),p(!1),i(H))},children:[m.jsxs("div",{className:"min-w-0 flex-1",children:[m.jsx("p",{className:"truncate text-sm font-medium",title:q.title,children:q.title}),m.jsx("p",{className:"truncate text-xs text-[var(--text-secondary)]",title:q.body,children:q.body}),m.jsx("p",{className:"mt-1 text-xs text-[var(--text-secondary)] opacity-60",children:new Date(q.createdAt).toLocaleString()})]}),!q.isRead&&m.jsx("button",{type:"button",onClick:B=>{B.stopPropagation(),D(q.id)},"aria-label":E("common.mark_as_read"),className:"shrink-0 rounded-[4px] p-1 text-[var(--text-secondary)] hover:text-[var(--text-primary)]",children:m.jsx(tb,{className:"h-3.5 w-3.5"})})]},q.id)})})]})]})}function u0(i){return i&&i.trim().length>0?i:null}function Ep(i,o=50){return u0(i.name)??Fh(i.description,o)}function Tp(i){return`#${i.id} ${i.description}`}function dx(i,o=100){return{text:`#${i.id} ${Ep(i,o)}`,title:Tp(i)}}function s0(i){return{tasks:i.tasks.map(o=>({type:"task",id:o.id,title:`#${o.id} ${Ep(o)}`,subtitle:`${o.status} · ${o.project_key}`,hoverTitle:Tp(o)})),workers:(i.workers??[]).map(o=>({type:"worker",id:o.id,title:o.name,subtitle:`${o.hostname} · ${o.status}`})),projects:i.projects.map(o=>({type:"project",id:o.key,title:o.name,subtitle:o.repository}))}}const c0=300,Th={tasks:Sb,workers:lp,projects:sb},f0={tasks:"tasks",workers:"workers",projects:"projects"};function jp({renderTrigger:i}={}){const[o,s]=g.useState(""),[u,f]=g.useState({tasks:[],workers:[],projects:[]}),[d,p]=g.useState(!1),[v,y]=g.useState(!1),[_,E]=g.useState(0),S=g.useRef(null),D=g.useRef(null),Y=g.useRef(void 0),q=g.useRef(void 0),H=Ia(),{t:B}=Xt(),U=g.useMemo(()=>[...u.tasks,...u.workers,...u.projects],[u]),K=g.useCallback(async F=>{var et;if(!F.trim()){f({tasks:[],workers:[],projects:[]});return}(et=q.current)==null||et.abort();const se=new AbortController;q.current=se;try{p(!0);const Je=await We.get("web/search",{searchParams:{q:F},signal:se.signal}).json();f(s0(Je)),E(0)}catch(Je){if(Je instanceof DOMException&&Je.name==="AbortError")return}finally{se.signal.aborted||p(!1)}},[]);g.useEffect(()=>(Y.current&&clearTimeout(Y.current),Y.current=setTimeout(()=>K(o),c0),()=>{Y.current&&clearTimeout(Y.current)}),[o,K]),g.useEffect(()=>{function F(se){se.key==="/"&&!v&&!(se.target instanceof HTMLInputElement||se.target instanceof HTMLTextAreaElement)&&(se.preventDefault(),y(!0)),se.key==="Escape"&&v&&(se.preventDefault(),X())}return document.addEventListener("keydown",F),()=>document.removeEventListener("keydown",F)},[v]),g.useEffect(()=>{v&&setTimeout(()=>{var F;return(F=D.current)==null?void 0:F.focus()},50)},[v]);function X(){y(!1),s(""),f({tasks:[],workers:[],projects:[]}),E(0)}function oe(F){switch(X(),F.type){case"task":H(`/tasks/${F.id}`);break;case"worker":H(`/workers/${F.id}`);break;case"project":H(`/projects/${F.id}`);break}}function ce(F){F.key==="ArrowDown"?(F.preventDefault(),E(se=>Math.min(se+1,U.length-1))):F.key==="ArrowUp"?(F.preventDefault(),E(se=>Math.max(se-1,0))):F.key==="Enter"&&U[_]&&(F.preventDefault(),oe(U[_]))}const _e=U.length>0;let I=0;return m.jsxs(m.Fragment,{children:[i?i(()=>y(!0)):m.jsxs("button",{type:"button",onClick:()=>y(!0),className:"flex items-center gap-2 rounded-[4px] border border-[var(--border)] bg-[var(--bg-input)] px-3 py-1.5 text-xs text-[var(--text-muted)] transition-colors hover:border-[var(--text-muted)]",children:[m.jsx(np,{className:"h-3.5 w-3.5"}),m.jsx("span",{children:B("common.search_placeholder")}),m.jsx("kbd",{className:"ml-2 rounded-[4px] border border-[var(--border)] bg-[var(--bg-primary)] px-1.5 py-0.5 text-[11px] text-[var(--text-muted)]",children:"/"})]}),v&&m.jsx("div",{ref:S,className:"fixed inset-0 z-[100] flex items-start justify-center pt-[calc(var(--safe-area-top,0px)+16px)] md:pt-[15vh]",style:{backgroundColor:"rgba(0, 0, 0, 0.6)"},onClick:F=>{F.target===S.current&&X()},children:m.jsxs("div",{className:"mx-3 w-full max-w-[640px] rounded-[4px] border border-[var(--border)] bg-[var(--bg-card)] shadow-2xl sm:mx-4 md:mx-0",children:[m.jsxs("div",{className:"flex items-center gap-3 border-b border-[var(--border)] px-4 py-3",children:[m.jsx("span",{className:"text-sm text-[var(--accent)]",children:"/"}),m.jsx("input",{ref:D,type:"text",placeholder:B("common.search_input_placeholder"),value:o,onChange:F=>s(F.target.value),onKeyDown:ce,className:"flex-1 bg-transparent text-sm text-[var(--text-primary)] placeholder:text-[var(--text-muted)] outline-none"}),d&&m.jsx("div",{className:"h-4 w-4 animate-spin rounded-full border-2 border-[var(--border)] border-t-[var(--accent)]"})]}),m.jsx("div",{className:"max-h-[50vh] overflow-y-auto sm:max-h-[60vh] md:max-h-[400px]",children:o.trim()&&!_e&&!d?m.jsx("div",{className:"py-10 text-center text-xs text-[var(--text-muted)]",children:B("common.no_search_results",{query:o})}):Object.keys(Th).map(F=>{const se=u[F];if(se.length===0)return null;const et=Th[F],Je=I;return I+=se.length,m.jsxs("div",{children:[m.jsxs("div",{className:"flex items-center gap-2 px-4 py-2 text-[var(--text-muted)]",children:[m.jsx(et,{className:"h-3 w-3"}),m.jsx("span",{className:"text-[11px] lowercase tracking-wider",children:f0[F]})]}),se.map((Oe,zt)=>{const ut=Je+zt,Me=ut===_;return m.jsxs("button",{type:"button",className:`flex w-full items-center gap-3 px-4 py-2.5 text-left transition-colors ${Me?"bg-[var(--accent)]/10 text-[var(--accent)]":"hover:bg-[var(--bg-input)]"}`,onClick:()=>oe(Oe),onMouseEnter:()=>E(ut),children:[m.jsx("span",{className:`text-xs ${Me?"text-[var(--accent)]":"text-[var(--text-muted)]"}`,children:Me?">":" "}),m.jsxs("div",{className:"min-w-0 flex-1",children:[m.jsx("p",{className:"truncate text-sm preserve-case",title:Oe.hoverTitle??Oe.title,children:Oe.title}),Oe.subtitle&&m.jsx("p",{className:"truncate text-xs text-[var(--text-muted)]",title:Oe.subtitle,children:Oe.subtitle})]})]},`${Oe.type}-${Oe.id}`)})]},F)})}),m.jsxs("div",{className:"hidden items-center gap-4 border-t border-[var(--border)] px-4 py-2 md:flex",children:[m.jsxs("span",{className:"flex items-center gap-1 text-[11px] text-[var(--text-muted)]",children:[m.jsx("kbd",{className:"rounded-[4px] border border-[var(--border)] px-1",children:"↑↓"})," ",B("common.navigate_hint")]}),m.jsxs("span",{className:"flex items-center gap-1 text-[11px] text-[var(--text-muted)]",children:[m.jsx("kbd",{className:"rounded-[4px] border border-[var(--border)] px-1",children:"↵"})," ",B("common.select_hint")]}),m.jsxs("span",{className:"flex items-center gap-1 text-[11px] text-[var(--text-muted)]",children:[m.jsx("kbd",{className:"rounded-[4px] border border-[var(--border)] px-1",children:"esc"})," ",B("common.close_hint")]})]})]})})]})}function d0(i){g.useEffect(()=>{if(!i)return;function o(s){s.preventDefault(),s.returnValue=""}return window.addEventListener("beforeunload",o),()=>window.removeEventListener("beforeunload",o)},[i])}const m0={danger:"var(--destructive)",warning:"var(--warning)",accent:"var(--accent)"};function jh(i){return Array.from(i.querySelectorAll('button:not([disabled]), [href], input:not([disabled]), select:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex="-1"])'))}function h0({isOpen:i,onClose:o,onConfirm:s,title:u,message:f,confirmLabel:d,cancelLabel:p,confirmVariant:v="danger",isLoading:y,children:_}){const{t:E}=Xt(),S=g.useId(),D=d??E("common.confirm"),Y=p??E("common.cancel"),q=g.useRef(null),H=g.useRef(null),B=m0[v];d0(i),g.useEffect(()=>{if(!i)return;H.current=document.activeElement;const K=requestAnimationFrame(()=>{if(q.current){const X=jh(q.current);X.length>0&&X[0].focus()}});return()=>{var X;cancelAnimationFrame(K),(X=H.current)==null||X.focus()}},[i]);const U=g.useCallback(K=>{if(K.key==="Escape"&&!y){o();return}if(K.key==="Tab"&&q.current){const X=jh(q.current);if(X.length===0)return;const oe=X[0],ce=X[X.length-1];K.shiftKey?document.activeElement===oe&&(K.preventDefault(),ce.focus()):document.activeElement===ce&&(K.preventDefault(),oe.focus())}},[o,y]);return i?m.jsx("div",{style:{position:"fixed",inset:0,zIndex:50,display:"flex",alignItems:"flex-start",justifyContent:"center",paddingTop:"max(1rem, 10vh)",paddingLeft:"1rem",paddingRight:"1rem",backgroundColor:"var(--modal-backdrop, rgba(12,12,12,0.6))"},children:m.jsxs("div",{ref:q,role:"dialog","aria-modal":"true","aria-labelledby":S,onClick:K=>K.stopPropagation(),onKeyDown:U,style:{width:"100%",maxWidth:"480px",backgroundColor:"var(--bg-card)",border:"1px solid var(--border)",borderRadius:"4px",padding:"1.5rem"},children:[m.jsx("div",{style:{marginBottom:"1.25rem"},children:m.jsxs("div",{id:S,style:{color:"var(--accent)",fontSize:"0.875rem",fontWeight:600,display:"flex",alignItems:"center",gap:"0.5rem"},children:[m.jsx(ip,{style:{width:"1rem",height:"1rem"}}),u]})}),m.jsxs("div",{style:{marginBottom:"1.25rem"},children:[m.jsx("p",{style:{color:"var(--text-muted)",fontSize:"0.75rem",lineHeight:"1.5"},children:f}),_]}),m.jsxs("div",{style:{display:"flex",gap:"0.75rem"},children:[m.jsx("button",{type:"button",onClick:o,disabled:y,className:"text-[var(--text-muted)] hover:text-[var(--text-primary)] hover:border-[var(--text-muted)]",style:{flex:1,padding:"0.5rem",backgroundColor:"transparent",border:"1px solid var(--border)",borderRadius:"4px",fontSize:"0.75rem",cursor:y?"not-allowed":"pointer",opacity:y?.7:1,transition:"color 0.15s, border-color 0.15s"},children:Y}),m.jsx("button",{type:"button",onClick:s,disabled:y,style:{flex:1,padding:"0.5rem",backgroundColor:B,color:"#0C0C0C",border:"none",borderRadius:"4px",fontSize:"0.75rem",fontWeight:600,cursor:y?"not-allowed":"pointer",opacity:y?.7:1},children:y?E("common.processing"):D})]})]})}):null}const Rh="overlord-pwa-install-dismissed";function p0(){const i=navigator.userAgent;return/iP(hone|od|ad)/.test(i)&&/WebKit/.test(i)&&!/(CriOS|FxiOS|OPiOS|mercury)/.test(i)}function _0(){return navigator.standalone===!0||window.matchMedia("(display-mode: standalone)").matches}function g0(){const{t:i}=Xt(),[o,s]=g.useState("hidden"),[u,f]=g.useState(!1),d=g.useRef(null),p=g.useRef(void 0);g.useEffect(()=>{if(_0()||localStorage.getItem(Rh)||window.innerWidth>=768)return;const _=S=>{S.preventDefault(),d.current=S};window.addEventListener("beforeinstallprompt",_);const E=setTimeout(()=>s("visible"),1e3);return()=>{window.removeEventListener("beforeinstallprompt",_),clearTimeout(E),clearTimeout(p.current)}},[]);function v(){localStorage.setItem(Rh,"1"),s("dismissing"),p.current=setTimeout(()=>s("hidden"),200)}async function y(){if(d.current){await d.current.prompt();const{outcome:_}=await d.current.userChoice;_==="accepted"&&v(),d.current=null}else p0()&&f(!0)}return o==="hidden"?null:m.jsx("div",{className:`fixed bottom-4 left-4 right-4 z-40 md:hidden ${o==="dismissing"?"animate-slide-down":"animate-slide-up"}`,role:"dialog","aria-label":i("pwa_install.title"),children:m.jsxs("div",{className:"overflow-hidden rounded-[4px] border border-[var(--accent)]/40 bg-[var(--bg-card)] shadow-[0_8px_32px_rgba(0,0,0,0.2)]",children:[m.jsxs("div",{className:"flex items-center justify-between border-b border-[var(--accent)]/20 bg-[var(--accent)]/[0.06] px-3 py-1.5",children:[m.jsxs("div",{className:"flex items-center gap-1.5",children:[m.jsx("div",{className:"h-1.5 w-1.5 rounded-full bg-[var(--accent)]"}),m.jsx("span",{className:"text-[9px] font-medium text-[var(--accent)]",children:i("pwa_install.title")})]}),m.jsx("button",{onClick:v,className:"p-1 text-[var(--text-muted)] transition-colors hover:text-[var(--text-primary)]",children:m.jsx(rp,{size:14})})]}),m.jsx("div",{className:"px-3.5 py-3",children:u?m.jsxs(m.Fragment,{children:[m.jsxs("div",{className:"text-[10px] text-[var(--text-muted)]",children:[m.jsx("span",{className:"text-[var(--accent)]",children:"$"})," ",i("pwa_install.ios_command")]}),m.jsx("div",{className:"mt-2.5 flex flex-col gap-2.5",children:[i("pwa_install.ios_step_1"),i("pwa_install.ios_step_2"),i("pwa_install.ios_step_3")].map((_,E)=>m.jsxs("div",{className:"flex items-center gap-2.5",children:[m.jsx("div",{className:"flex h-7 w-7 shrink-0 items-center justify-center rounded-[4px] bg-[var(--accent)]/[0.08]",children:m.jsx("span",{className:"text-xs font-semibold text-[var(--accent)]",children:E+1})}),m.jsxs("span",{className:"text-[10px] leading-snug text-[var(--text-secondary)]",children:[E===0&&m.jsx(vb,{size:12,className:"mr-1 inline-block align-text-bottom text-[var(--text-muted)]"}),_]})]},E))})]}):m.jsxs(m.Fragment,{children:[m.jsxs("div",{className:"text-[10px] text-[var(--text-muted)]",children:[m.jsx("span",{className:"text-[var(--accent)]",children:"$"})," ",i("pwa_install.command")]}),m.jsxs("div",{className:"mt-1.5 text-[10px] leading-relaxed text-[var(--text-secondary)]",children:["→ ",i("pwa_install.desc_1"),m.jsx("br",{}),"→ ",i("pwa_install.desc_2")]}),m.jsxs("div",{className:"mt-2.5 flex gap-2",children:[m.jsx("button",{onClick:y,className:"rounded-[4px] bg-[var(--accent)] px-4 py-1.5 text-[10px] font-semibold text-black transition-all hover:brightness-110",children:i("pwa_install.install")}),m.jsx("button",{onClick:v,className:"rounded-[4px] border border-[var(--border)] px-3 py-1.5 text-[10px] text-[var(--text-muted)] transition-colors hover:border-[var(--text-muted)]",children:i("pwa_install.skip")})]})]})})]})})}function y0(){const{t:i}=Xt(),[o,s]=g.useState(!1);return g.useEffect(()=>{if(!("serviceWorker"in navigator))return;let u=!1,f=null,d=null,p=null,v=null;function y(){u||s(!0)}navigator.serviceWorker.addEventListener("controllerchange",y);function _(S){if(f=S,S.waiting){s(!0);return}p=()=>{const D=S.installing;D&&(d=D,v=()=>{D.state==="installed"&&navigator.serviceWorker.controller&&(u||s(!0))},D.addEventListener("statechange",v))},S.addEventListener("updatefound",p)}navigator.serviceWorker.getRegistration().then(S=>{S&&!u&&_(S)});const E=setInterval(()=>{navigator.serviceWorker.getRegistration().then(S=>{!S||u||(S.update().catch(()=>{}),S.waiting&&s(!0))})},3e4);return()=>{u=!0,clearInterval(E),navigator.serviceWorker.removeEventListener("controllerchange",y),f&&p&&f.removeEventListener("updatefound",p),d&&v&&d.removeEventListener("statechange",v)}},[]),o?m.jsx("div",{className:"animate-slide-up fixed bottom-20 left-4 right-4 z-50 md:bottom-4 md:left-auto md:right-4 md:w-80",children:m.jsxs("div",{className:"flex items-center gap-3 rounded-[4px] border border-[var(--accent)]/40 bg-[var(--bg-card)] px-3.5 py-3 shadow-[0_8px_32px_rgba(0,0,0,0.2)]",children:[m.jsx(ap,{size:14,className:"shrink-0 text-[var(--accent)]"}),m.jsx("span",{className:"flex-1 text-[10px] text-[var(--text-secondary)]",children:i("pwa_update.message")}),m.jsx("button",{onClick:()=>window.location.reload(),className:"shrink-0 rounded-[4px] bg-[var(--accent)] px-3 py-1 text-[10px] font-semibold text-black transition-all hover:brightness-110",children:i("pwa_update.reload")})]})}):null}const Hr=64,v0=96,Ah=32;function b0({children:i,className:o}){const s=g.useRef(null),u=g.useRef(0),f=g.useRef("idle"),[d,p]=g.useState(0),[v,y]=g.useState("idle"),_=g.useCallback(U=>{f.current=U,y(U)},[]),E=g.useCallback(()=>{const U=s.current;return U?U.scrollTop<=0:!0},[]),S=g.useCallback(U=>{if(!E()){u.current=0;return}u.current=U.touches[0].clientY},[E]),D=g.useCallback(U=>{if(f.current==="refreshing"||u.current===0)return;const X=U.touches[0].clientY-u.current;if(X<=0){f.current!=="idle"&&(p(0),_("idle"));return}if(!E())return;U.preventDefault();const oe=Math.min(X*.5,v0);p(oe),_(oe>=Hr?"ready":"pulling")},[E,_]),Y=g.useCallback(()=>{f.current!=="refreshing"&&(f.current==="ready"?(_("refreshing"),p(Hr),setTimeout(()=>{window.location.reload()},300)):(p(0),_("idle")),u.current=0)},[_]);g.useEffect(()=>{const U=s.current;if(U)return U.addEventListener("touchstart",S,{passive:!0}),U.addEventListener("touchmove",D,{passive:!1}),U.addEventListener("touchend",Y,{passive:!0}),()=>{U.removeEventListener("touchstart",S),U.removeEventListener("touchmove",D),U.removeEventListener("touchend",Y)}},[S,D,Y]);const q=Math.min(d/Hr,1),H=v==="refreshing"?0:d/Hr*180,B=d>0||v==="refreshing";return m.jsxs("div",{ref:s,className:o,style:{overscrollBehaviorY:"contain"},children:[B&&m.jsx("div",{className:"pointer-events-none flex items-center justify-center md:hidden",style:{height:d,transition:v==="idle"?"height 200ms ease-out":void 0},children:m.jsx("div",{className:"flex items-center justify-center rounded-full bg-[var(--bg-card)] border border-[var(--border)]",style:{width:Ah,height:Ah,opacity:q,transition:v==="idle"?"opacity 200ms ease-out":void 0},children:v==="refreshing"?m.jsxs("svg",{width:16,height:16,viewBox:"0 0 16 16",className:"animate-spin",style:{color:"var(--accent)"},children:[m.jsx("circle",{cx:"8",cy:"8",r:"6",fill:"none",stroke:"currentColor",strokeWidth:"2",opacity:"0.3"}),m.jsx("path",{d:"M8 2a6 6 0 0 1 6 6",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round"})]}):m.jsx("svg",{width:16,height:16,viewBox:"0 0 16 16",style:{color:v==="ready"?"var(--accent)":"var(--text-muted)",transform:`rotate(${H}deg)`,transition:"color 150ms"},children:m.jsx("path",{d:"M8 3v8M5 8l3 3 3-3",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})})})}),i]})}const Rp=g.createContext({setActions:()=>{}});function mx(i){const{setActions:o}=g.useContext(Rp);g.useEffect(()=>(o(i),()=>o(null)),[i,o])}const Ap=g.createContext({setSubtitle:()=>{}});function hx(i){const{setSubtitle:o}=g.useContext(Ap),s=typeof i=="string"?i:(i==null?void 0:i.text)??null,u=typeof i=="string"?i:(i==null?void 0:i.title)??(i==null?void 0:i.text)??null;g.useEffect(()=>s?(o(u&&u!==s?{text:s,title:u}:s),()=>o(null)):(o(null),()=>o(null)),[s,u,o])}const x0=[{to:"/plan",label:"plan",icon:rb},{to:"/review",label:"review",icon:Ph},{to:"/automations",label:"automations",icon:yb}],S0=[{to:"/home",label:"terminal",icon:$s},{to:"/tasks",label:"tasks",icon:tp},{to:"/dashboard",label:"dashboard",icon:ep}],k0=[{to:"/workers",label:"workers",icon:lp},{to:"/projects",label:"projects",icon:cb},{to:"/access-tokens",label:"tokens",icon:db}],w0=[{to:"/docs/changelog",label:"changelog",icon:ub},{to:"/docs/cli",label:"cli",icon:$s},{to:"/docs/api",label:"api",icon:ob},{to:"/docs/bot",label:"bot",icon:_b},{to:"/docs/skill",label:"skill",icon:xb},{to:"/docs/all",label:"all",icon:mb}],E0=[{to:"/admin",label:"admin",icon:bb}],T0=[{to:"/home",label:"terminal",icon:$s},{to:"/tasks",label:"tasks",icon:tp},{to:"/review",label:"review",icon:Ph},{to:"/dashboard",label:"dashboard",icon:ep}],Br={"/home":{title:"common.breadcrumb_terminal",subtitle:"common.breadcrumb_terminal_sub"},"/dashboard":{title:"common.breadcrumb_dashboard",subtitle:"common.breadcrumb_dashboard_sub"},"/tasks":{title:"common.breadcrumb_tasks",subtitle:"common.breadcrumb_tasks_sub"},"/plan":{title:"plan.title",subtitle:"plan.title"},"/review":{title:"review.title",subtitle:"review.title"},"/workers":{title:"common.breadcrumb_workers",subtitle:"common.breadcrumb_workers_sub"},"/projects":{title:"common.breadcrumb_projects",subtitle:"common.breadcrumb_projects_sub"},"/admin":{title:"common.breadcrumb_admin",subtitle:"common.breadcrumb_admin_sub"},"/profile":{title:"common.breadcrumb_profile",subtitle:"common.breadcrumb_profile_sub"},"/access-tokens":{title:"common.breadcrumb_tokens",subtitle:"common.breadcrumb_tokens_sub"},"/docs":{title:"common.breadcrumb_docs",subtitle:"common.breadcrumb_docs_sub"},"/docs/cli":{title:"common.breadcrumb_docs_cli",subtitle:"common.breadcrumb_docs_cli_sub"},"/docs/api":{title:"common.breadcrumb_docs_api",subtitle:"common.breadcrumb_docs_api_sub"},"/docs/skill":{title:"common.breadcrumb_docs_skill",subtitle:"common.breadcrumb_docs_skill_sub"},"/docs/bot":{title:"common.breadcrumb_docs",subtitle:"common.breadcrumb_docs_bot_sub"},"/docs/all":{title:"common.breadcrumb_docs",subtitle:"common.breadcrumb_docs_all_sub"}};function j0(i){const{t:o}=Xt();if(Br[i]){const u=Br[i];return{title:o(u.title),subtitle:o(u.subtitle)}}const s="/"+i.split("/").filter(Boolean)[0];if(Br[s]){const u=Br[s],f=i.split("/").filter(Boolean).slice(1).join(" / ");return{title:o(u.title),subtitle:f||o(u.subtitle)}}return{title:i.slice(1).replace(/\//g," // ")||"home"}}function R0(i,o){return i==="/home"?o==="/home":i==="/dashboard"?o==="/dashboard":o.startsWith(i)}function A0(){const i=yt(),{t:o}=Xt(),s={terminal:o("terminal_home.title"),dashboard:o("dashboard.title"),tasks:o("tasks.title"),workers:o("workers.title"),plan:o("plan.title"),review:o("review.title")};return m.jsxs("nav",{className:"flex items-center justify-around border-t border-[var(--border)] bg-[var(--bg-card)]",style:{height:48,paddingTop:4},children:[T0.map(({to:u,label:f,icon:d})=>{const p=R0(u,i.pathname);return m.jsxs(Js,{to:u,className:"flex flex-1 flex-col items-center gap-1",children:[m.jsx(d,{size:18,className:p?"text-[var(--accent)]":"text-[var(--text-muted)]"}),m.jsx("span",{className:`text-[11px] lowercase ${p?"font-bold text-[var(--accent)]":"text-[var(--text-muted)]"}`,children:s[f]??f})]},u)}),m.jsx(jp,{renderTrigger:u=>m.jsxs("button",{type:"button",onClick:u,className:"flex flex-1 flex-col items-center gap-1",children:[m.jsx(np,{size:18,className:"text-[var(--text-muted)]"}),m.jsx("span",{className:"text-[11px] lowercase text-[var(--text-muted)]",children:o("common.search_placeholder")})]})})]})}function z0(){const i=Ia(),{t:o}=Xt();return m.jsxs("header",{className:"flex items-center justify-between border-b border-[var(--border)] bg-[var(--bg-card)] px-4 md:hidden",style:{height:"calc(56px + env(safe-area-inset-top, 0px))",minHeight:"calc(56px + env(safe-area-inset-top, 0px))",paddingTop:"env(safe-area-inset-top, 0px)"},children:[m.jsxs("button",{onClick:()=>i("/home"),className:"flex items-center gap-2",style:{background:"none",border:"none",padding:0},children:[m.jsx("div",{className:"flex h-6 w-6 items-center justify-center rounded-[4px] bg-[var(--accent)]",children:m.jsx("span",{className:"text-sm font-semibold",style:{color:"#0C0C0C"},children:"~"})}),m.jsx("span",{className:"text-sm font-bold lowercase text-[var(--text-primary)]",children:o("common.overlord")})]}),m.jsxs("div",{className:"flex items-center gap-1",children:[m.jsx("button",{onClick:()=>i("/profile"),className:"p-2 text-[var(--text-secondary)] transition-colors hover:text-[var(--text-primary)]","aria-label":o("common.profile"),children:m.jsx(wb,{size:18})}),m.jsx(wp,{}),m.jsx(kp,{})]})]})}function C0({collapsed:i}){const o=Fs(s=>s.inboxUnreadCount);return o<=0?null:i?m.jsx("span",{className:"h-1.5 w-1.5 rounded-full bg-[var(--accent)]"}):m.jsx("span",{className:"ml-auto flex h-4 min-w-[16px] items-center justify-center rounded-full bg-[var(--accent)] px-1 text-[10px] font-bold text-black",children:o>99?"99+":o})}function ii({label:i,items:o,collapsed:s}){return m.jsxs("div",{className:"mt-4 first:mt-0",children:[m.jsx("div",{className:`overflow-hidden transition-all duration-300 ${s?"max-h-0 mb-0 opacity-0":"max-h-6 mb-2 opacity-100"}`,children:m.jsx("div",{className:"px-3 text-xs lowercase",style:{color:"var(--text-muted)"},children:i})}),o.map(({to:u,label:f,icon:d})=>m.jsx(Js,{to:u,className:({isActive:p})=>`flex items-center text-sm lowercase transition-all duration-300 ${s?"justify-center py-3":"gap-2.5 px-3 py-1.5"} ${p?"text-[var(--accent)] bg-[var(--accent)]/5":"text-[var(--text-secondary)] hover:text-[var(--text-primary)]"}`,children:({isActive:p})=>m.jsxs(m.Fragment,{children:[m.jsx(d,{size:14,style:{flexShrink:0}}),!s&&m.jsx("span",{children:p?`> ${f}`:` ${f}`}),u==="/automations"&&m.jsx(C0,{collapsed:s})]})},u))]})}function O0(){const{user:i,logout:o}=Sa(),s=Ia(),[u,f]=g.useState(!1),d=Rb(),{t:p}=Xt(),{sidebarCollapsed:v,toggleSidebar:y}=zb();function _(){o(),s("/login")}return m.jsxs("aside",{className:"hidden md:flex flex-col border-r border-[var(--border)] transition-[width,min-width] duration-300 overflow-hidden",style:{width:v?56:240,minWidth:v?56:240,backgroundColor:"var(--bg-card)"},children:[m.jsx("div",{className:"flex items-center px-5",style:{height:48},children:m.jsxs("button",{onClick:()=>s("/home"),className:"flex items-center gap-2.5",style:{background:"none",border:"none",padding:0},children:[m.jsx("div",{className:"flex h-7 w-7 items-center justify-center rounded-[4px] bg-[var(--accent)]",style:{flexShrink:0},children:m.jsx("span",{className:"text-lg font-semibold",style:{color:"#0C0C0C"},children:"~"})}),!v&&m.jsx("span",{className:"text-base font-bold lowercase tracking-tight",style:{color:"var(--text-primary)"},children:p("common.overlord")})]})}),m.jsxs("nav",{className:"flex-1 px-3 pt-2",children:[m.jsx(ii,{label:p("common.loop_section"),items:x0,collapsed:v}),m.jsx(ii,{label:p("common.tasks_section"),items:S0,collapsed:v}),m.jsx(ii,{label:p("common.fleet_section"),items:k0,collapsed:v}),m.jsx(ii,{label:p("common.docs_section"),items:w0,collapsed:v}),d&&m.jsx(ii,{label:p("common.admin_section"),items:E0,collapsed:v})]}),m.jsx("div",{className:"flex px-3 py-1",children:m.jsx("button",{onClick:y,className:"flex items-center justify-center w-full py-1.5 rounded-[4px] text-[var(--text-secondary)] transition-colors hover:text-[var(--accent)] hover:bg-[var(--accent)]/5","aria-label":v?"expand sidebar":"collapse sidebar",children:v?m.jsx(nb,{size:14}):m.jsx(ab,{size:14})})}),m.jsx("div",{className:"border-t border-[var(--border)] p-3",children:m.jsxs("div",{className:`flex min-h-[44px] items-center px-3 transition-[gap] duration-300 ${v?"gap-0":"gap-3"}`,children:[m.jsx("button",{onClick:()=>s("/profile"),className:"flex h-7 w-7 items-center justify-center text-xs font-bold text-black transition-opacity hover:opacity-80",style:{backgroundColor:"var(--accent)",borderRadius:4,flexShrink:0},title:p("common.profile"),children:((i==null?void 0:i.username)??"u")[0].toUpperCase()}),m.jsxs("div",{className:`flex min-w-0 flex-1 items-center overflow-hidden transition-[max-width,opacity] duration-300 ${v?"pointer-events-none max-w-0 opacity-0":"max-w-[calc(100%-28px)] opacity-100"}`,"aria-hidden":v,children:[m.jsxs("button",{onClick:()=>s("/profile"),className:"min-w-0 flex-1 text-left transition-colors hover:opacity-80",title:p("common.profile"),tabIndex:v?-1:void 0,children:[m.jsx("div",{className:"truncate text-sm lowercase",style:{color:"var(--text-primary)"},children:(i==null?void 0:i.username)??"user"}),m.jsx("div",{className:"truncate text-xs lowercase",style:{color:"var(--text-muted)"},children:(i==null?void 0:i.role)??"user"})]}),m.jsx("button",{onClick:()=>f(!0),className:"ml-2 p-1 text-[var(--text-secondary)] transition-colors hover:text-[var(--accent)]","aria-label":p("common.log_out"),tabIndex:v?-1:void 0,children:m.jsx(pb,{size:14})})]})]})}),m.jsx(h0,{isOpen:u,onClose:()=>f(!1),onConfirm:_,title:p("common.logout_title"),message:p("common.logout_message"),confirmLabel:p("common.logout"),confirmVariant:"warning"})]})}function D0({headerActions:i,subtitleOverride:o}){const s=yt(),{title:u,subtitle:f}=j0(s.pathname),d=o??f,p=typeof d=="string"?d:d==null?void 0:d.text,v=typeof d=="string"?d:(d==null?void 0:d.title)??(d==null?void 0:d.text);return m.jsxs("header",{className:"hidden md:flex items-center justify-between border-b border-[var(--border)] px-5",style:{height:48,minHeight:48,backgroundColor:"var(--bg-card)"},children:[m.jsxs("div",{className:"text-sm lowercase",children:[m.jsx("span",{style:{color:"var(--text-primary)"},children:u}),p&&m.jsxs("span",{style:{color:"var(--text-muted)"},title:v,children:[" ","// ",Fh(p,40)]})]}),m.jsxs("div",{className:"flex items-center gap-3",children:[i,m.jsxs("div",{className:"flex items-center gap-1",children:[m.jsx(jp,{}),m.jsx(wp,{}),m.jsx(kp,{})]})]})]})}function N0(){const[i,o]=g.useState(null),[s,u]=g.useState(null),f=yt(),d=f.pathname==="/home",p=/^\/tasks\/\d+$/.test(f.pathname),v=f.pathname.startsWith("/docs");return g.useEffect(()=>bp.getState().init(),[]),g.useEffect(()=>{Fs.getState().initInbox()},[]),m.jsxs("div",{className:"fixed inset-x-0 top-0 flex w-full overflow-hidden font-mono md:flex-row",style:{height:"var(--app-height, 100dvh)",minHeight:"var(--app-height, 100dvh)"},children:[m.jsx(O0,{}),m.jsxs("div",{"data-testid":"app-main-column",className:"flex min-h-0 flex-1 flex-col overflow-hidden pb-[calc(48px+var(--safe-area-bottom,0px))] md:pb-0",children:[m.jsx(z0,{}),!v&&m.jsx(D0,{headerActions:i,subtitleOverride:s}),m.jsx(b0,{className:d||p?"min-h-0 flex-1 overflow-hidden bg-[var(--bg-primary)]":"min-h-0 flex-1 overflow-auto bg-[var(--bg-primary)] p-4 pb-6 md:p-6 md:pb-6",children:m.jsx(Rp.Provider,{value:{setActions:o},children:m.jsx(Ap.Provider,{value:{setSubtitle:u},children:m.jsx(hv,{})})})}),m.jsx(g0,{}),m.jsx(y0,{}),m.jsx("div",{className:"safe-area-bottom-fill fixed inset-x-0 bottom-0 z-30 bg-[var(--bg-card)] md:hidden",children:m.jsx(A0,{})})]})]})}function zh(i){var s;const o=(s=i.state)==null?void 0:s.from;return o?{from:o}:{from:{pathname:i.pathname,search:i.search}}}function ri({children:i,requireAdmin:o=!1}){const{accessToken:s,user:u,requireTotpSetup:f,initializing:d}=Sa(),p=yt();if(d)return m.jsx("div",{className:"flex h-screen items-center justify-center",children:m.jsx("div",{className:"h-8 w-8 animate-spin rounded-full border-4 border-[var(--border)] border-t-[var(--accent)]"})});if(!s)return m.jsx(il,{to:"/login",state:zh(p),replace:!0});if(f){const v=zh(p);return p.pathname!=="/totp-setup"&&p.pathname!=="/bind"?m.jsx(il,{to:"/totp-setup",state:v,replace:!0}):p.pathname==="/bind"?(sessionStorage.setItem("overlord_bind_redirect",JSON.stringify(v.from)),m.jsx(il,{to:"/totp-setup",state:v,replace:!0})):m.jsx(m.Fragment,{children:i})}return o&&(u==null?void 0:u.role)!==op.ADMIN?m.jsx(il,{to:"/home",replace:!0}):m.jsx(m.Fragment,{children:i})}function M0({children:i}){const{theme:o,resolved:s,setResolved:u}=Sp();return g.useEffect(()=>{if(o!=="system"){u(o);return}const f=window.matchMedia("(prefers-color-scheme: dark)");u(f.matches?"dark":"light");const d=p=>u(p.matches?"dark":"light");return f.addEventListener("change",d),()=>f.removeEventListener("change",d)},[o,u]),g.useEffect(()=>{document.documentElement.classList.toggle("dark",s==="dark")},[s]),m.jsx(m.Fragment,{children:i})}class U0 extends g.Component{constructor(o){super(o),this.state={hasError:!1,error:null}}static getDerivedStateFromError(o){return{hasError:!0,error:o}}render(){var o;return this.state.hasError?m.jsxs("div",{className:"flex h-full min-h-[300px] flex-col items-center justify-center gap-4 p-8 font-mono",children:[m.jsx("span",{className:"text-lg font-bold text-[var(--destructive)]",children:Zr("common.runtime_error")}),m.jsx("p",{className:"max-w-md text-center text-xs text-[var(--text-muted)]",children:((o=this.state.error)==null?void 0:o.message)||Zr("common.an_unexpected_error_occurred")}),m.jsxs("button",{onClick:()=>{this.setState({hasError:!1,error:null}),window.location.reload()},className:"flex items-center gap-1.5 rounded-[4px] border border-[var(--border)] px-4 py-2 text-xs text-[var(--text-secondary)] hover:text-[var(--text-primary)]",children:[m.jsx(ap,{className:"h-3.5 w-3.5"}),Zr("common.reload")]})]}):this.props.children}}function L0({isOpen:i}){const o=Ia(),{logout:s,setSessionExpired:u}=Sa(),{t:f}=Xt();function d(){s(),u(!1),o("/login")}return i?m.jsxs("div",{className:"fixed inset-0 z-50 flex items-center justify-center",children:[m.jsx("div",{className:"fixed inset-0 bg-[var(--modal-backdrop)]"}),m.jsx("div",{className:"relative z-10 w-full max-w-[480px] rounded-[4px] border border-[var(--border)] bg-[var(--bg-card)]",children:m.jsxs("div",{className:"flex flex-col items-center px-8 py-10",children:[m.jsx("div",{className:"mb-5 flex h-14 w-14 items-center justify-center rounded-full bg-[var(--warning)]/10",children:m.jsx(hb,{className:"h-7 w-7 text-[var(--warning)]"})}),m.jsx("h3",{className:"mb-2 text-base font-bold text-[var(--text-primary)]",children:f("auth.session_expired")}),m.jsx("p",{className:"mb-8 text-center text-xs text-[var(--text-secondary)]",children:f("auth.session_expired_message")}),m.jsx("button",{type:"button",className:"w-full rounded-[4px] bg-[var(--accent)] px-3 py-2.5 text-xs font-medium text-black hover:opacity-90 transition-opacity",onClick:d,children:f("auth.go_to_login")})]})})]}):null}const Ch=5;let xa=[];const Bs=new Set;function zp(){Bs.forEach(i=>i())}function q0(){return`${Date.now()}-${Math.random().toString(36).slice(2,9)}`}function Fa(i,o,s=4e3){const u=q0();return xa=[...xa,{id:u,variant:i,message:o,duration:s}],xa.length>Ch&&(xa=xa.slice(xa.length-Ch)),zp(),u}Fa.success=(i,o)=>Fa("success",i,o);Fa.error=(i,o)=>Fa("error",i,o);Fa.warning=(i,o)=>Fa("warning",i,o);Fa.info=(i,o)=>Fa("info",i,o);function H0(i){xa=xa.filter(o=>o.id!==i),zp()}function B0(){const[,i]=g.useState(0);return g.useEffect(()=>{const o=()=>i(s=>s+1);return Bs.add(o),()=>{Bs.delete(o)}},[]),xa}const Y0={success:{icon:lb,borderColor:"var(--accent)"},error:{icon:ib,borderColor:"var(--destructive)"},warning:{icon:ip,borderColor:"var(--warning)"},info:{icon:fb,borderColor:"var(--info)"}};function V0({item:i}){const o=Y0[i.variant],s=o.icon,{t:u}=Xt(),f=g.useCallback(()=>H0(i.id),[i.id]);return g.useEffect(()=>{if(!i.duration)return;const d=setTimeout(f,i.duration);return()=>clearTimeout(d)},[i.duration,f]),m.jsxs("div",{className:"flex items-center gap-3 rounded-[4px] bg-[var(--bg-card)] px-4 py-3 shadow-lg",style:{borderLeft:`3px solid ${o.borderColor}`},role:"alert",children:[m.jsx(s,{className:"h-4 w-4 shrink-0",style:{color:o.borderColor}}),m.jsx("p",{className:"flex-1 text-xs text-[var(--text-primary)]",children:i.message}),m.jsx("button",{onClick:f,className:"shrink-0 rounded-[4px] p-0.5 text-[var(--text-muted)] transition-colors hover:text-[var(--text-primary)]","aria-label":u("common.dismiss_notification"),children:m.jsx(rp,{className:"h-3.5 w-3.5"})})]})}function G0(){const i=B0();return i.length===0?null:m.jsx("div",{className:"pointer-events-none fixed right-4 top-4 z-[9999] flex w-80 max-w-[calc(100vw-2rem)] flex-col gap-2",children:i.map(o=>m.jsx("div",{className:"pointer-events-auto",children:m.jsx(V0,{item:o})},o.id))})}const X0=g.lazy(()=>ee(()=>import("./LandingPage-BiMt64NW.js"),__vite__mapDeps([0,1,2,3,4,5,6]))),Q0=g.lazy(()=>ee(()=>import("./LoginPage-dLNo1JNx.js"),[])),Z0=g.lazy(()=>ee(()=>import("./TotpSetupPage-C_NjLBdt.js"),[])),K0=g.lazy(()=>ee(()=>import("./NotFoundPage-ohSBiBT-.js"),[])),J0=g.lazy(()=>ee(()=>import("./HomePage-CssNquOH.js"),__vite__mapDeps([7,8,9,10,11,12,13,14,15,1]))),$0=g.lazy(()=>ee(()=>import("./TerminalHomePage-Cs3JoG8j.js"),__vite__mapDeps([16,17,18,19,20,11,12,21,13,22,23,24,9,25,26,14,27,28,29,30]))),W0=g.lazy(()=>ee(()=>import("./TaskListPage-CdajIIwz.js"),__vite__mapDeps([31,18,8,9,13,15,32,23,24,33,25,26,6,34,10,27,35,12]))),F0=g.lazy(()=>ee(()=>import("./TaskDetailPage-CElleGRa.js"),__vite__mapDeps([36,18,19,20,21,13,22,37,23,24,9,17,26,25,15,38,29,32,39,40,41,42]))),I0=g.lazy(()=>ee(()=>import("./PlanPage-B7z3l_2F.js"),__vite__mapDeps([43,34,10,21,13,22,23,24,27,40,35,12]))),P0=g.lazy(()=>ee(()=>import("./ReviewPage-CmbUljfI.js"),__vite__mapDeps([44,33,34,10,37,23,24,13,15,26,25,27,39,35,12]))),e1=g.lazy(()=>ee(()=>import("./ReviewAggregatePage-tiy7PRsr.js"),__vite__mapDeps([45,19,20,10,37,13,26,25,38,41,39,42,29,28,24,46]))),t1=g.lazy(()=>ee(()=>import("./WorkerListPage-70g7vy3m.js"),__vite__mapDeps([47,9,48,49,50,51,52,39,30,6,41,23,24,34,10,14,27,38]))),a1=g.lazy(()=>ee(()=>import("./WorkerDetailPage-CuuvI6Fx.js"),__vite__mapDeps([53,13,9,54,48,14,15,55,38,35,12]))),n1=g.lazy(()=>ee(()=>import("./WorkerSetupGuidePage-jnyL_uM0.js"),__vite__mapDeps([49,50,51,52,39,30]))),l1=g.lazy(()=>ee(()=>import("./ProjectListPage-Do-9PkUN.js"),__vite__mapDeps([56,23,24,26,34,10,13,14,27,38]))),i1=g.lazy(()=>ee(()=>import("./ProjectDetailPage-CzLqL69C.js"),__vite__mapDeps([57,58,23,24,15,13,9,54,14,59,55,38,27]))),r1=g.lazy(()=>ee(()=>import("./EditProjectPage-BC0UDNOv.js"),__vite__mapDeps([60,23,24,58,26,27]))),o1=g.lazy(()=>ee(()=>import("./PipelineEditorPage-BeNxSKH5.js"),__vite__mapDeps([61,23,24]))),u1=g.lazy(()=>ee(()=>import("./AutomationListPage-DxPUmPbs.js"),__vite__mapDeps([62,34,10,8,9,13,23,24,63,37,64,27,39,2,65,22,12]))),s1=g.lazy(()=>ee(()=>import("./AutomationCreatePage-CajNO4bS.js"),__vite__mapDeps([66,23,24,63,37,38]))),c1=g.lazy(()=>ee(()=>import("./AutomationDetailPage-Dgf3Tb9C.js"),__vite__mapDeps([67,34,10,13,64,22,38,68,39,55,65,2,40]))),f1=g.lazy(()=>ee(()=>import("./AutomationEditPage-DYaZj31T.js"),__vite__mapDeps([69,23,24,63,37,10,34,22,38]))),d1=g.lazy(()=>ee(()=>import("./AutomationRunDetailPage-DmNxMDk5.js"),__vite__mapDeps([70,34,10,13,64,22,38,40,46]))),m1=g.lazy(()=>ee(()=>import("./ProfilePage-DwsnCrys.js"),__vite__mapDeps([71,72,54,14]))),h1=g.lazy(()=>ee(()=>import("./BindPlatformPage-MYeCpBFT.js"),[])),p1=g.lazy(()=>ee(()=>import("./AccessTokensPage-1EKC1hiZ.js"),__vite__mapDeps([73,23,24,34,10,13,14,27,6,55]))),_1=g.lazy(()=>ee(()=>import("./CliReferencePage-D-PUOTbI.js"),__vite__mapDeps([74,75,6,76,27]))),g1=g.lazy(()=>ee(()=>import("./ApiReferencePage-TgiwRipe.js"),__vite__mapDeps([77,76,6,27]))),y1=g.lazy(()=>ee(()=>import("./SkillPage-BexkozUK.js"),__vite__mapDeps([78,75,6,40]))),v1=g.lazy(()=>ee(()=>import("./DocsLayout-DLxSnG0D.js"),__vite__mapDeps([79,38]))),b1=g.lazy(()=>ee(()=>import("./InstallationPage-CcJ0J1Zn.js"),__vite__mapDeps([80,75,6]))),x1=g.lazy(()=>ee(()=>import("./DeveloperSetupPage-PXns-tkJ.js"),__vite__mapDeps([81,75,6]))),S1=g.lazy(()=>ee(()=>import("./WorkerSetupPage-ChyjqvnS.js"),__vite__mapDeps([82,75,6]))),k1=g.lazy(()=>ee(()=>import("./BotSetupPage-esAmTt5X.js"),__vite__mapDeps([83,75,6]))),w1=g.lazy(()=>ee(()=>import("./LocalDevelopmentPage-D4FSxH3d.js"),__vite__mapDeps([84,75,6]))),E1=g.lazy(()=>ee(()=>import("./WorkerOperationsPage-BL4BZ45w.js"),[])),T1=g.lazy(()=>ee(()=>import("./DeploymentPage-BmfGIQ--.js"),__vite__mapDeps([85,75,6]))),Oh=g.lazy(()=>ee(()=>import("./BotIntegrationPage-Dnk8iYbr.js"),[])),j1=g.lazy(()=>ee(()=>import("./PipelineConfigPage-BX6JMHM4.js"),__vite__mapDeps([86,75,6]))),R1=g.lazy(()=>ee(()=>import("./DevWorkflowPage-BwP87xBb.js"),__vite__mapDeps([87,75,6]))),A1=g.lazy(()=>ee(()=>import("./PermissionsPage-7-IPdVXg.js"),[])),z1=g.lazy(()=>ee(()=>import("./EnvVariablesPage-BB7ahnB1.js"),__vite__mapDeps([88,75,6]))),C1=g.lazy(()=>ee(()=>import("./ArchitecturePage-BzeZql6h.js"),__vite__mapDeps([89,75,6]))),O1=g.lazy(()=>ee(()=>import("./ChangelogPage-BZmrhbzu.js"),[])),D1=g.lazy(()=>ee(()=>import("./AgentCliPage-HVXHK2Or.js"),__vite__mapDeps([90,75,6]))),N1=g.lazy(()=>ee(()=>import("./TaskGuidePage-C5Ed0gO0.js"),__vite__mapDeps([91,75,6]))),M1=g.lazy(()=>ee(()=>import("./DocsIndexPage-DHYB2eq5.js"),__vite__mapDeps([92,51,3,4,52,93]))),U1=g.lazy(()=>ee(()=>import("./ConnectorsPage-Czxmo0rf.js"),__vite__mapDeps([94,75,6]))),L1=g.lazy(()=>ee(()=>import("./AdminPage-51tboyFu.js"),__vite__mapDeps([95,5,3,93,96,52]))),q1=g.lazy(()=>ee(()=>import("./DeveloperManage-Bu-dU6qo.js"),__vite__mapDeps([97,23,24,72,34,10,14,9,27,5,59,29]))),H1=g.lazy(()=>ee(()=>import("./BotManage-96DyyPVc.js"),__vite__mapDeps([98,23,24,75,6,55,27,34,10,14,9,3,59,99]))),B1=g.lazy(()=>ee(()=>import("./TokenManage-BeDY8n-U.js"),__vite__mapDeps([100,50,6,40,34,10,14,9,27]))),Y1=g.lazy(()=>ee(()=>import("./AuditLogPage-y6n7Px8g.js"),__vite__mapDeps([101,23,24,34,10,96,35,12]))),V1=g.lazy(()=>ee(()=>import("./SettingsPage-BpS56Ttu.js"),[])),G1=g.lazy(()=>ee(()=>import("./ConnectorsManage-v8CzbHwB.js"),__vite__mapDeps([102,23,24,14,55,27,34,10,93,41,68,59,99])));function X1(){return m.jsx("div",{className:"flex h-full items-center justify-center",children:m.jsx("div",{className:"h-8 w-8 animate-spin rounded-full border-4 border-[var(--border)] border-t-[var(--accent)]"})})}function Q1(){const i=Sa(o=>o.sessionExpired);return m.jsxs(M0,{children:[m.jsx(G0,{}),m.jsx(U0,{children:m.jsxs(Yv,{children:[m.jsx(L0,{isOpen:i}),m.jsx(g.Suspense,{fallback:m.jsx(X1,{}),children:m.jsxs(_v,{children:[m.jsx(W,{path:"/",element:m.jsx(X0,{})}),m.jsx(W,{path:"/login",element:m.jsx(Q0,{})}),m.jsx(W,{path:"/totp-setup",element:m.jsx(ri,{children:m.jsx(Z0,{})})}),m.jsx(W,{path:"/bind",element:m.jsx(ri,{children:m.jsx(h1,{})})}),m.jsxs(W,{element:m.jsx(ri,{children:m.jsx(N0,{})}),children:[m.jsx(W,{path:"/home",element:m.jsx($0,{})}),m.jsx(W,{path:"/dashboard",element:m.jsx(J0,{})}),m.jsx(W,{path:"/tasks",element:m.jsx(W0,{})}),m.jsx(W,{path:"/tasks/:id",element:m.jsx(F0,{})}),m.jsx(W,{path:"/plan",element:m.jsx(I0,{})}),m.jsx(W,{path:"/review",element:m.jsx(P0,{})}),m.jsx(W,{path:"/review/:sourceTaskId",element:m.jsx(e1,{})}),m.jsx(W,{path:"/automations",element:m.jsx(u1,{})}),m.jsx(W,{path:"/automations/new",element:m.jsx(s1,{})}),m.jsx(W,{path:"/automations/runs/:runId",element:m.jsx(d1,{})}),m.jsx(W,{path:"/automations/:id",element:m.jsx(c1,{})}),m.jsx(W,{path:"/automations/:id/edit",element:m.jsx(f1,{})}),m.jsx(W,{path:"/workers",element:m.jsx(t1,{})}),m.jsx(W,{path:"/workers/setup",element:m.jsx(ri,{requireAdmin:!0,children:m.jsx(n1,{})})}),m.jsx(W,{path:"/workers/:id",element:m.jsx(a1,{})}),m.jsx(W,{path:"/projects",element:m.jsx(l1,{})}),m.jsx(W,{path:"/projects/:key",element:m.jsx(i1,{})}),m.jsx(W,{path:"/projects/:key/edit",element:m.jsx(r1,{})}),m.jsx(W,{path:"/projects/:key/pipeline",element:m.jsx(o1,{})}),m.jsx(W,{path:"/profile",element:m.jsx(m1,{})}),m.jsx(W,{path:"/access-tokens",element:m.jsx(p1,{})}),m.jsxs(W,{path:"/docs",element:m.jsx(v1,{}),children:[m.jsx(W,{index:!0,element:m.jsx(il,{to:"cli",replace:!0})}),m.jsx(W,{path:"cli",element:m.jsx(_1,{})}),m.jsx(W,{path:"api",element:m.jsx(g1,{})}),m.jsx(W,{path:"bot",element:m.jsx(Oh,{})}),m.jsx(W,{path:"all",element:m.jsx(M1,{})}),m.jsx(W,{path:"skill",element:m.jsx(y1,{})}),m.jsx(W,{path:"installation",element:m.jsx(b1,{})}),m.jsx(W,{path:"developer-setup",element:m.jsx(x1,{})}),m.jsx(W,{path:"worker-setup",element:m.jsx(S1,{})}),m.jsx(W,{path:"bot-setup",element:m.jsx(k1,{})}),m.jsx(W,{path:"local-development",element:m.jsx(w1,{})}),m.jsx(W,{path:"worker-operations",element:m.jsx(E1,{})}),m.jsx(W,{path:"deployment",element:m.jsx(T1,{})}),m.jsx(W,{path:"bot-integration",element:m.jsx(Oh,{})}),m.jsx(W,{path:"pipeline-config",element:m.jsx(j1,{})}),m.jsx(W,{path:"dev-workflow",element:m.jsx(R1,{})}),m.jsx(W,{path:"permissions",element:m.jsx(A1,{})}),m.jsx(W,{path:"env-variables",element:m.jsx(z1,{})}),m.jsx(W,{path:"architecture",element:m.jsx(C1,{})}),m.jsx(W,{path:"task-guide",element:m.jsx(N1,{})}),m.jsx(W,{path:"agent-cli",element:m.jsx(D1,{})}),m.jsx(W,{path:"connectors",element:m.jsx(U1,{})}),m.jsx(W,{path:"changelog",element:m.jsx(O1,{})})]}),m.jsxs(W,{path:"/admin",element:m.jsx(ri,{requireAdmin:!0,children:m.jsx(L1,{})}),children:[m.jsx(W,{index:!0,element:m.jsx(il,{to:"developers",replace:!0})}),m.jsx(W,{path:"developers",element:m.jsx(q1,{})}),m.jsx(W,{path:"bots",element:m.jsx(H1,{})}),m.jsx(W,{path:"tokens",element:m.jsx(B1,{})}),m.jsx(W,{path:"connectors",element:m.jsx(G1,{})}),m.jsx(W,{path:"audit-logs",element:m.jsx(Y1,{})}),m.jsx(W,{path:"settings",element:m.jsx(V1,{})})]})]}),m.jsx(W,{path:"*",element:m.jsx(K0,{})})]})})]})})]})}function Cp(i=window){var o,s;return((o=i.matchMedia)==null?void 0:o.call(i,"(display-mode: standalone)").matches)===!0||((s=i.navigator)==null?void 0:s.standalone)===!0}async function Z1(i=window,o="portrait"){var u,f;if(!Cp(i))return!1;const s=(f=(u=i.screen)==null?void 0:u.orientation)==null?void 0:f.lock;if(typeof s!="function")return!1;try{return await s.call(i.screen.orientation,o),!0}catch{return!1}}function K1(i){var o,s;return((o=i.matchMedia)==null?void 0:o.call(i,"(display-mode: standalone)").matches)===!0||((s=i.navigator)==null?void 0:s.standalone)===!0}function J1(i){var s,u;const o=((s=i.navigator)==null?void 0:s.userAgent)??"";return/iPhone|iPad|iPod/i.test(o)||/Macintosh/i.test(o)&&(((u=i.navigator)==null?void 0:u.maxTouchPoints)??0)>1}function $1(i){const o=i.activeElement;if(!(o instanceof HTMLElement))return!1;const s=o.tagName;return o.isContentEditable||s==="INPUT"||s==="TEXTAREA"||s==="SELECT"}function W1(i){const o=i.screen;if(!o)return null;const s=Math.round(o.width),u=Math.round(o.height);return i.innerHeight>=i.innerWidth?Math.max(s,u):Math.min(s,u)}function F1(i=window,o=document){const s=o.documentElement,u=i.visualViewport??null;let f=-1;const d=()=>{const p=Math.round((u==null?void 0:u.height)??0),v=Math.round(i.innerHeight);let y=p>0?p:v;if(K1(i)&&J1(i)&&!$1(o)){const _=W1(i);_!==null&&(y=Math.max(y,v,_))}y!==f&&(f=y,s.style.setProperty("--app-height",`${y}px`))};return d(),i.addEventListener("resize",d),i.addEventListener("orientationchange",d),u==null||u.addEventListener("resize",d),()=>{i.removeEventListener("resize",d),i.removeEventListener("orientationchange",d),u==null||u.removeEventListener("resize",d)}}Sa.getState().initialize();F1(window,document);const Op=window,I1=Cp(Op);Z1(Op);if(I1){document.documentElement.classList.add("pwa-standalone");const i=window.matchMedia("(prefers-color-scheme: dark)").matches,o=localStorage.getItem("overlord-theme"),s=o==="dark"||o!=="light"&&i;document.body.style.backgroundColor=s?"#171717":"#FFFFFF",new MutationObserver(()=>{const u=document.documentElement.classList.contains("dark");document.body.style.backgroundColor=u?"#171717":"#FFFFFF"}).observe(document.documentElement,{attributes:!0,attributeFilter:["class"]})}hy.createRoot(document.getElementById("root")).render(m.jsx(g.StrictMode,{children:m.jsx(Q1,{})}));export{ap as $,fx as A,ex as B,tb as C,op as D,Ph as E,tx as F,ub as G,Ns as H,ox as I,lb as J,rb as K,$h as L,ob as M,il as N,_b as O,g0 as P,ix as Q,Cr as R,lp as S,kp as T,wb as U,ux as V,nx as W,rp as X,ip as Y,fb as Z,lx as _,Xt as a,fy as a0,Fh as a1,Fs as a2,Mr as a3,eb as a4,yb as a5,xb as a6,db as a7,pb as a8,rx as a9,Js as aa,hv as ab,sx as ac,ib as ad,$s as b,ye as c,bb as d,mb as e,Ia as f,yt as g,We as h,Rb as i,m as j,bp as k,Ep as l,Tp as m,di as n,ax as o,hx as p,dx as q,g as r,h0 as s,Fa as t,Sa as u,d0 as v,cx as w,mx as x,np as y,tp as z};
262
+ "{description}"`},plan:{title:"plan",create:"create plan",description_placeholder:"describe what you want to build...",spec_generated:"spec generated",decompose:"decompose into tasks",save_only:"save spec only",no_plans:"no plan tasks yet",view_spec:"view spec"},automation:{title:"automations",new_automation:"new automation",tab_inbox:"inbox",tab_automations:"automations",tab_templates:"templates",no_unread_findings:"no unread findings",inbox_description:"automation runs with findings will appear here",select_all:"select all",deselect_all:"deselect all",mark_all_read:"mark all read",marked_as_read:"marked as read",failed_mark_read:"failed to mark as read",archived:"archived",failed_archive:"failed to archive",marked_n_read:"marked {n} as read",failed_batch_update:"failed to batch update",run_label:"run #{id} -- automation #{automationId}",finding_count:"{count} finding",findings_count:"{count} findings",mark_read:"mark read",archive:"archive",no_automations:"no automations",create_first_description:"create your first automation to get started",automation_disabled:"automation disabled",automation_enabled:"automation enabled",failed_toggle:"failed to toggle automation",last_run:"last run: {time}",next_run:"next run: {time}",no_runs_yet:"no runs yet",no_templates:"no templates",templates_description:"builtin and project templates will appear here once available",templates_suggested:"suggested",templates_suggested_title:"start from a template instead of a blank automation",templates_suggested_description:"pick one of the built-in automations below, then tune the schedule, project, and execution mode to match how your team works.",templates_ready_count:"{count} templates ready",templates_browse:"browse by category",templates_browse_description:"jump to the automation set that matches the workflow you want to automate.",template_preview:"template preview",template_prompt:"automation prompt",template_source_builtin:"builtin",template_source_custom:"custom",template_category_status_reports:"status reports",template_category_status_reports_description:"summaries, digests, and weekly rollups that turn repository activity into updates people can actually read.",template_category_release_prep:"release prep",template_category_release_prep_description:"release notes, pre-flight checks, and changelog work that help teams ship with fewer surprises.",template_category_incidents_triage:"incidents & triage",template_category_incidents_triage_description:"ci investigations and failure summaries that help you separate signal from operational noise.",template_category_code_quality:"code quality",template_category_code_quality_description:"bug scans, coverage work, security reviews, and invariants that keep changes from quietly eroding reliability.",template_category_repo_maintenance:"repo maintenance",template_category_repo_maintenance_description:"feature-flag cleanup, dependency upkeep, docs refreshes, and recurring chores that usually slip between releases.",template_category_growth_exploration:"growth & exploration",template_category_growth_exploration_description:"performance audits and coaching prompts that help teams find their next high-leverage improvement.",template_category_other:"other",template_category_other_description:"templates without a stronger home still show up here so they remain easy to discover.",use_template:"use template",create_title:"new automation",project:"project",select_project:"select project",name:"name",name_placeholder:"e.g. nightly security scan",name_required:"name is required",description:"description",description_placeholder:"describe what the automation agent should do. use {{project_name}}, {{date}}, {{trigger_event}} as needed.",template_vars:"template vars: {{date}}, {{time}}, {{weekday}}, {{project_name}}, {{trigger_event}}, {{source_task_id}}",trigger_type:"trigger type",cron_config:"cron config",preset:"preset",cron_expression:"cron expression",cron_expression_required:"cron expression is required",cron_expression_invalid:"invalid cron expression: must have 5 or 6 space-separated fields",timezone:"timezone",task_event_config:"task event config",event_type:"event type",all_projects:"all projects",filter_project_key:"filter project key (optional)",filter_task_mode:"filter task mode (optional)",all_modes:"all modes",execution_mode:"execution mode",writable_hint:"agent can create branches and merge requests",readonly_hint:"agent runs in read-only mode, reports findings only",agent_type:"agent type",notify_project_chats:"notify default chats",notify_project_chats_hint:"send completion and failure cards to each bot's notify-default chat for this project",notify_project_chats_enabled:"notifications on",notify_project_chats_disabled:"notifications off",project_required:"project is required",creating:"creating...",create_from_template:"create from template",create_automation:"create automation",cancel:"cancel",automation_created:"automation created",failed_create:"failed to create automation",failed_load_projects:"failed to load projects",edit_title:"edit automation",saving:"saving...",save_changes:"save changes",automation_updated:"automation updated",failed_update:"failed to update automation",automation_not_found:"automation not found",enabled:"enabled",disabled:"disabled",disable:"disable",enable:"enable",edit:"edit",trigger_now:"trigger now",delete:"delete",configuration:"// configuration",schedule:"schedule",event:"event",automation_triggered:"automation triggered",failed_trigger:"failed to trigger automation",automation_deleted:"automation deleted",failed_delete:"failed to delete automation",run_history:"// run history",no_runs:"no runs yet",col_time:"time",col_status:"status",col_findings:"findings",col_task:"task",delete_title:"delete automation",delete_confirm:'are you sure you want to delete "{name}"? this action cannot be undone.',run_title:"run #{id}",run_not_found:"run not found",run_metadata:"// run metadata",status:"status",triggered_at:"triggered at",duration:"duration",task_label:"task #{id}",merge_request:"merge request",findings_title:"// findings ({count})",no_findings:"no findings"},review:{title:"review",pending:"pending review",in_progress:"in progress",history:"history",launch:"launch review",launch_short:"review",select_agents:"select review agents",approve_fix:"fix issues",skip_fix:"no fix needed",review_again:"review again",round:"round",no_reviews:"no reviews yet",issues_summary:"{critical} critical · {warning} warning · {suggestion} suggestion",description_placeholder:"review instructions (optional)...",empty_report_warning:"review completed but no structured report was produced. check the terminal output for details.",fix_push_info:"selected agent will push fixes to the source branch",waiting_agents:"waiting for review agents to finish...",skip_fix_label:"review only (skip fix stage)"}};function l0(i,o){const s=o.split(".");let u=i;for(const f of s){if(u==null||typeof u!="object")return o;u=u[f]}return typeof u=="string"?u:o}function i0(i,o){return o?i.replace(/\{(\w+)\}/g,(s,u)=>o[u]!=null?String(o[u]):`{${u}}`):i}function Zr(i,o){return i0(l0(n0,i),o)}function Xt(){return{t:g.useCallback((o,s)=>Zr(o,s),[])}}function kp(){const{theme:i,setTheme:o}=Sp(),{t:s}=Xt(),u=i==="dark"||i==="system"&&typeof window<"u"&&window.matchMedia("(prefers-color-scheme: dark)").matches;function f(){o(u?"light":"dark")}return m.jsx("button",{onClick:f,className:"flex items-center gap-1.5 rounded-[4px] p-2 text-[var(--text-secondary)] transition-colors hover:bg-[var(--border)] hover:text-[var(--text-primary)]","aria-label":s(u?"common.switch_to_light":"common.switch_to_dark"),title:s(u?"common.light_mode":"common.dark_mode"),children:u?m.jsx(kb,{size:16}):m.jsx(gb,{size:16})})}const r0=3e4;function o0(i){if(i.link)return i.link;const o=(i.title+" "+i.body).match(/task\s*#?(\d+)/i);if(o)return`/tasks/${o[1]}`;const s=(i.title+" "+i.body).match(/worker\s+(\S+)/i);return s?`/workers/${s[1]}`:null}function wp(){const i=Ia(),[o,s]=g.useState([]),[u,f]=g.useState(0),[d,p]=g.useState(!1),[v,y]=g.useState(!1),_=g.useRef(null),{t:E}=Xt(),S=g.useRef(async()=>{try{y(!0);const H=(await We.get("web/notifications",{searchParams:{limit:"20"}}).json()).data,B=H.filter(U=>!U.isRead).length;s(U=>U.length===H.length&&U.every((K,X)=>K.id===H[X].id&&K.isRead===H[X].isRead)?U:H),f(U=>U===B?U:B)}catch{}finally{y(!1)}});g.useEffect(()=>{S.current();const q=setInterval(()=>S.current(),r0);return()=>clearInterval(q)},[]),g.useEffect(()=>{function q(H){_.current&&!_.current.contains(H.target)&&p(!1)}return document.addEventListener("mousedown",q),()=>document.removeEventListener("mousedown",q)},[]);async function D(q){try{await We.post(`web/notifications/${q}/read`),s(H=>H.map(B=>B.id===q?{...B,isRead:!0}:B)),f(H=>Math.max(0,H-1))}catch{}}async function Y(){try{await We.post("web/notifications/read-all"),s(q=>q.map(H=>({...H,isRead:!0}))),f(0)}catch{}}return m.jsxs("div",{className:"relative",ref:_,children:[m.jsxs("button",{type:"button",onClick:()=>p(q=>!q),"aria-label":E("common.notifications"),className:"relative inline-flex items-center justify-center rounded-[4px] p-2 text-[var(--text-secondary)] transition-colors hover:bg-[var(--border)] hover:text-[var(--text-primary)]",children:[m.jsx(Pv,{size:16}),u>0&&m.jsx("span",{className:"absolute right-0 top-0 flex h-3 min-w-3 items-center justify-center rounded-full bg-[var(--destructive)] px-0.5 text-[8px] font-semibold leading-none text-white",children:u})]}),d&&m.jsxs("div",{className:"absolute right-0 top-full z-50 mt-2 w-[min(320px,calc(100vw-2rem))] rounded-[4px] border border-[var(--border)] bg-[var(--bg-card)] shadow-lg",children:[m.jsxs("div",{className:"flex items-center justify-between border-b border-[var(--border)] px-4 py-3",children:[m.jsx("span",{className:"text-sm font-semibold",children:E("common.notifications")}),u>0&&m.jsxs("button",{type:"button",onClick:Y,"aria-label":E("common.mark_all_read"),className:"inline-flex items-center gap-1.5 text-xs text-[var(--text-secondary)] hover:text-[var(--text-primary)]",children:[m.jsx(eb,{className:"h-3.5 w-3.5"}),E("common.mark_all_read")]})]}),m.jsx("div",{className:"max-h-80 overflow-y-auto",children:v&&o.length===0?m.jsx("div",{className:"flex justify-center py-8",children:m.jsx("div",{className:"h-4 w-4 animate-spin rounded-full border-2 border-[var(--border)] border-t-[var(--accent)]"})}):o.length===0?m.jsxs("div",{className:"flex flex-col items-center gap-3 py-8",children:[m.jsx("span",{className:"text-xl font-bold text-[var(--border)]",children:"[ ]"}),m.jsx("span",{className:"text-xs text-[var(--text-muted)]",children:E("common.no_notifications")})]}):o.map(q=>{const H=o0(q);return m.jsxs("div",{className:`flex items-start gap-3 border-b border-[var(--border)] px-4 py-3 last:border-b-0 transition-colors ${H?"cursor-pointer hover:bg-[var(--bg-input)]":""} ${q.isRead?"opacity-60":"bg-[var(--accent)]/5"}`,onClick:()=>{H&&(q.isRead||D(q.id),p(!1),i(H))},children:[m.jsxs("div",{className:"min-w-0 flex-1",children:[m.jsx("p",{className:"truncate text-sm font-medium",title:q.title,children:q.title}),m.jsx("p",{className:"truncate text-xs text-[var(--text-secondary)]",title:q.body,children:q.body}),m.jsx("p",{className:"mt-1 text-xs text-[var(--text-secondary)] opacity-60",children:new Date(q.createdAt).toLocaleString()})]}),!q.isRead&&m.jsx("button",{type:"button",onClick:B=>{B.stopPropagation(),D(q.id)},"aria-label":E("common.mark_as_read"),className:"shrink-0 rounded-[4px] p-1 text-[var(--text-secondary)] hover:text-[var(--text-primary)]",children:m.jsx(tb,{className:"h-3.5 w-3.5"})})]},q.id)})})]})]})}function u0(i){return i&&i.trim().length>0?i:null}function Ep(i,o=50){return u0(i.name)??Fh(i.description,o)}function Tp(i){return`#${i.id} ${i.description}`}function dx(i,o=100){return{text:`#${i.id} ${Ep(i,o)}`,title:Tp(i)}}function s0(i){return{tasks:i.tasks.map(o=>({type:"task",id:o.id,title:`#${o.id} ${Ep(o)}`,subtitle:`${o.status} · ${o.project_key}`,hoverTitle:Tp(o)})),workers:(i.workers??[]).map(o=>({type:"worker",id:o.id,title:o.name,subtitle:`${o.hostname} · ${o.status}`})),projects:i.projects.map(o=>({type:"project",id:o.key,title:o.name,subtitle:o.repository}))}}const c0=300,Th={tasks:Sb,workers:lp,projects:sb},f0={tasks:"tasks",workers:"workers",projects:"projects"};function jp({renderTrigger:i}={}){const[o,s]=g.useState(""),[u,f]=g.useState({tasks:[],workers:[],projects:[]}),[d,p]=g.useState(!1),[v,y]=g.useState(!1),[_,E]=g.useState(0),S=g.useRef(null),D=g.useRef(null),Y=g.useRef(void 0),q=g.useRef(void 0),H=Ia(),{t:B}=Xt(),U=g.useMemo(()=>[...u.tasks,...u.workers,...u.projects],[u]),K=g.useCallback(async F=>{var et;if(!F.trim()){f({tasks:[],workers:[],projects:[]});return}(et=q.current)==null||et.abort();const se=new AbortController;q.current=se;try{p(!0);const Je=await We.get("web/search",{searchParams:{q:F},signal:se.signal}).json();f(s0(Je)),E(0)}catch(Je){if(Je instanceof DOMException&&Je.name==="AbortError")return}finally{se.signal.aborted||p(!1)}},[]);g.useEffect(()=>(Y.current&&clearTimeout(Y.current),Y.current=setTimeout(()=>K(o),c0),()=>{Y.current&&clearTimeout(Y.current)}),[o,K]),g.useEffect(()=>{function F(se){se.key==="/"&&!v&&!(se.target instanceof HTMLInputElement||se.target instanceof HTMLTextAreaElement)&&(se.preventDefault(),y(!0)),se.key==="Escape"&&v&&(se.preventDefault(),X())}return document.addEventListener("keydown",F),()=>document.removeEventListener("keydown",F)},[v]),g.useEffect(()=>{v&&setTimeout(()=>{var F;return(F=D.current)==null?void 0:F.focus()},50)},[v]);function X(){y(!1),s(""),f({tasks:[],workers:[],projects:[]}),E(0)}function oe(F){switch(X(),F.type){case"task":H(`/tasks/${F.id}`);break;case"worker":H(`/workers/${F.id}`);break;case"project":H(`/projects/${F.id}`);break}}function ce(F){F.key==="ArrowDown"?(F.preventDefault(),E(se=>Math.min(se+1,U.length-1))):F.key==="ArrowUp"?(F.preventDefault(),E(se=>Math.max(se-1,0))):F.key==="Enter"&&U[_]&&(F.preventDefault(),oe(U[_]))}const _e=U.length>0;let I=0;return m.jsxs(m.Fragment,{children:[i?i(()=>y(!0)):m.jsxs("button",{type:"button",onClick:()=>y(!0),className:"flex items-center gap-2 rounded-[4px] border border-[var(--border)] bg-[var(--bg-input)] px-3 py-1.5 text-xs text-[var(--text-muted)] transition-colors hover:border-[var(--text-muted)]",children:[m.jsx(np,{className:"h-3.5 w-3.5"}),m.jsx("span",{children:B("common.search_placeholder")}),m.jsx("kbd",{className:"ml-2 rounded-[4px] border border-[var(--border)] bg-[var(--bg-primary)] px-1.5 py-0.5 text-[11px] text-[var(--text-muted)]",children:"/"})]}),v&&m.jsx("div",{ref:S,className:"fixed inset-0 z-[100] flex items-start justify-center pt-[calc(var(--safe-area-top,0px)+16px)] md:pt-[15vh]",style:{backgroundColor:"rgba(0, 0, 0, 0.6)"},onClick:F=>{F.target===S.current&&X()},children:m.jsxs("div",{className:"mx-3 w-full max-w-[640px] rounded-[4px] border border-[var(--border)] bg-[var(--bg-card)] shadow-2xl sm:mx-4 md:mx-0",children:[m.jsxs("div",{className:"flex items-center gap-3 border-b border-[var(--border)] px-4 py-3",children:[m.jsx("span",{className:"text-sm text-[var(--accent)]",children:"/"}),m.jsx("input",{ref:D,type:"text",placeholder:B("common.search_input_placeholder"),value:o,onChange:F=>s(F.target.value),onKeyDown:ce,className:"flex-1 bg-transparent text-sm text-[var(--text-primary)] placeholder:text-[var(--text-muted)] outline-none"}),d&&m.jsx("div",{className:"h-4 w-4 animate-spin rounded-full border-2 border-[var(--border)] border-t-[var(--accent)]"})]}),m.jsx("div",{className:"max-h-[50vh] overflow-y-auto sm:max-h-[60vh] md:max-h-[400px]",children:o.trim()&&!_e&&!d?m.jsx("div",{className:"py-10 text-center text-xs text-[var(--text-muted)]",children:B("common.no_search_results",{query:o})}):Object.keys(Th).map(F=>{const se=u[F];if(se.length===0)return null;const et=Th[F],Je=I;return I+=se.length,m.jsxs("div",{children:[m.jsxs("div",{className:"flex items-center gap-2 px-4 py-2 text-[var(--text-muted)]",children:[m.jsx(et,{className:"h-3 w-3"}),m.jsx("span",{className:"text-[11px] lowercase tracking-wider",children:f0[F]})]}),se.map((Oe,zt)=>{const ut=Je+zt,Me=ut===_;return m.jsxs("button",{type:"button",className:`flex w-full items-center gap-3 px-4 py-2.5 text-left transition-colors ${Me?"bg-[var(--accent)]/10 text-[var(--accent)]":"hover:bg-[var(--bg-input)]"}`,onClick:()=>oe(Oe),onMouseEnter:()=>E(ut),children:[m.jsx("span",{className:`text-xs ${Me?"text-[var(--accent)]":"text-[var(--text-muted)]"}`,children:Me?">":" "}),m.jsxs("div",{className:"min-w-0 flex-1",children:[m.jsx("p",{className:"truncate text-sm preserve-case",title:Oe.hoverTitle??Oe.title,children:Oe.title}),Oe.subtitle&&m.jsx("p",{className:"truncate text-xs text-[var(--text-muted)]",title:Oe.subtitle,children:Oe.subtitle})]})]},`${Oe.type}-${Oe.id}`)})]},F)})}),m.jsxs("div",{className:"hidden items-center gap-4 border-t border-[var(--border)] px-4 py-2 md:flex",children:[m.jsxs("span",{className:"flex items-center gap-1 text-[11px] text-[var(--text-muted)]",children:[m.jsx("kbd",{className:"rounded-[4px] border border-[var(--border)] px-1",children:"↑↓"})," ",B("common.navigate_hint")]}),m.jsxs("span",{className:"flex items-center gap-1 text-[11px] text-[var(--text-muted)]",children:[m.jsx("kbd",{className:"rounded-[4px] border border-[var(--border)] px-1",children:"↵"})," ",B("common.select_hint")]}),m.jsxs("span",{className:"flex items-center gap-1 text-[11px] text-[var(--text-muted)]",children:[m.jsx("kbd",{className:"rounded-[4px] border border-[var(--border)] px-1",children:"esc"})," ",B("common.close_hint")]})]})]})})]})}function d0(i){g.useEffect(()=>{if(!i)return;function o(s){s.preventDefault(),s.returnValue=""}return window.addEventListener("beforeunload",o),()=>window.removeEventListener("beforeunload",o)},[i])}const m0={danger:"var(--destructive)",warning:"var(--warning)",accent:"var(--accent)"};function jh(i){return Array.from(i.querySelectorAll('button:not([disabled]), [href], input:not([disabled]), select:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex="-1"])'))}function h0({isOpen:i,onClose:o,onConfirm:s,title:u,message:f,confirmLabel:d,cancelLabel:p,confirmVariant:v="danger",isLoading:y,children:_}){const{t:E}=Xt(),S=g.useId(),D=d??E("common.confirm"),Y=p??E("common.cancel"),q=g.useRef(null),H=g.useRef(null),B=m0[v];d0(i),g.useEffect(()=>{if(!i)return;H.current=document.activeElement;const K=requestAnimationFrame(()=>{if(q.current){const X=jh(q.current);X.length>0&&X[0].focus()}});return()=>{var X;cancelAnimationFrame(K),(X=H.current)==null||X.focus()}},[i]);const U=g.useCallback(K=>{if(K.key==="Escape"&&!y){o();return}if(K.key==="Tab"&&q.current){const X=jh(q.current);if(X.length===0)return;const oe=X[0],ce=X[X.length-1];K.shiftKey?document.activeElement===oe&&(K.preventDefault(),ce.focus()):document.activeElement===ce&&(K.preventDefault(),oe.focus())}},[o,y]);return i?m.jsx("div",{style:{position:"fixed",inset:0,zIndex:50,display:"flex",alignItems:"flex-start",justifyContent:"center",paddingTop:"max(1rem, 10vh)",paddingLeft:"1rem",paddingRight:"1rem",backgroundColor:"var(--modal-backdrop, rgba(12,12,12,0.6))"},children:m.jsxs("div",{ref:q,role:"dialog","aria-modal":"true","aria-labelledby":S,onClick:K=>K.stopPropagation(),onKeyDown:U,style:{width:"100%",maxWidth:"480px",backgroundColor:"var(--bg-card)",border:"1px solid var(--border)",borderRadius:"4px",padding:"1.5rem"},children:[m.jsx("div",{style:{marginBottom:"1.25rem"},children:m.jsxs("div",{id:S,style:{color:"var(--accent)",fontSize:"0.875rem",fontWeight:600,display:"flex",alignItems:"center",gap:"0.5rem"},children:[m.jsx(ip,{style:{width:"1rem",height:"1rem"}}),u]})}),m.jsxs("div",{style:{marginBottom:"1.25rem"},children:[m.jsx("p",{style:{color:"var(--text-muted)",fontSize:"0.75rem",lineHeight:"1.5"},children:f}),_]}),m.jsxs("div",{style:{display:"flex",gap:"0.75rem"},children:[m.jsx("button",{type:"button",onClick:o,disabled:y,className:"text-[var(--text-muted)] hover:text-[var(--text-primary)] hover:border-[var(--text-muted)]",style:{flex:1,padding:"0.5rem",backgroundColor:"transparent",border:"1px solid var(--border)",borderRadius:"4px",fontSize:"0.75rem",cursor:y?"not-allowed":"pointer",opacity:y?.7:1,transition:"color 0.15s, border-color 0.15s"},children:Y}),m.jsx("button",{type:"button",onClick:s,disabled:y,style:{flex:1,padding:"0.5rem",backgroundColor:B,color:"#0C0C0C",border:"none",borderRadius:"4px",fontSize:"0.75rem",fontWeight:600,cursor:y?"not-allowed":"pointer",opacity:y?.7:1},children:y?E("common.processing"):D})]})]})}):null}const Rh="overlord-pwa-install-dismissed";function p0(){const i=navigator.userAgent;return/iP(hone|od|ad)/.test(i)&&/WebKit/.test(i)&&!/(CriOS|FxiOS|OPiOS|mercury)/.test(i)}function _0(){return navigator.standalone===!0||window.matchMedia("(display-mode: standalone)").matches}function g0(){const{t:i}=Xt(),[o,s]=g.useState("hidden"),[u,f]=g.useState(!1),d=g.useRef(null),p=g.useRef(void 0);g.useEffect(()=>{if(_0()||localStorage.getItem(Rh)||window.innerWidth>=768)return;const _=S=>{S.preventDefault(),d.current=S};window.addEventListener("beforeinstallprompt",_);const E=setTimeout(()=>s("visible"),1e3);return()=>{window.removeEventListener("beforeinstallprompt",_),clearTimeout(E),clearTimeout(p.current)}},[]);function v(){localStorage.setItem(Rh,"1"),s("dismissing"),p.current=setTimeout(()=>s("hidden"),200)}async function y(){if(d.current){await d.current.prompt();const{outcome:_}=await d.current.userChoice;_==="accepted"&&v(),d.current=null}else p0()&&f(!0)}return o==="hidden"?null:m.jsx("div",{className:`fixed bottom-4 left-4 right-4 z-40 md:hidden ${o==="dismissing"?"animate-slide-down":"animate-slide-up"}`,role:"dialog","aria-label":i("pwa_install.title"),children:m.jsxs("div",{className:"overflow-hidden rounded-[4px] border border-[var(--accent)]/40 bg-[var(--bg-card)] shadow-[0_8px_32px_rgba(0,0,0,0.2)]",children:[m.jsxs("div",{className:"flex items-center justify-between border-b border-[var(--accent)]/20 bg-[var(--accent)]/[0.06] px-3 py-1.5",children:[m.jsxs("div",{className:"flex items-center gap-1.5",children:[m.jsx("div",{className:"h-1.5 w-1.5 rounded-full bg-[var(--accent)]"}),m.jsx("span",{className:"text-[9px] font-medium text-[var(--accent)]",children:i("pwa_install.title")})]}),m.jsx("button",{onClick:v,className:"p-1 text-[var(--text-muted)] transition-colors hover:text-[var(--text-primary)]",children:m.jsx(rp,{size:14})})]}),m.jsx("div",{className:"px-3.5 py-3",children:u?m.jsxs(m.Fragment,{children:[m.jsxs("div",{className:"text-[10px] text-[var(--text-muted)]",children:[m.jsx("span",{className:"text-[var(--accent)]",children:"$"})," ",i("pwa_install.ios_command")]}),m.jsx("div",{className:"mt-2.5 flex flex-col gap-2.5",children:[i("pwa_install.ios_step_1"),i("pwa_install.ios_step_2"),i("pwa_install.ios_step_3")].map((_,E)=>m.jsxs("div",{className:"flex items-center gap-2.5",children:[m.jsx("div",{className:"flex h-7 w-7 shrink-0 items-center justify-center rounded-[4px] bg-[var(--accent)]/[0.08]",children:m.jsx("span",{className:"text-xs font-semibold text-[var(--accent)]",children:E+1})}),m.jsxs("span",{className:"text-[10px] leading-snug text-[var(--text-secondary)]",children:[E===0&&m.jsx(vb,{size:12,className:"mr-1 inline-block align-text-bottom text-[var(--text-muted)]"}),_]})]},E))})]}):m.jsxs(m.Fragment,{children:[m.jsxs("div",{className:"text-[10px] text-[var(--text-muted)]",children:[m.jsx("span",{className:"text-[var(--accent)]",children:"$"})," ",i("pwa_install.command")]}),m.jsxs("div",{className:"mt-1.5 text-[10px] leading-relaxed text-[var(--text-secondary)]",children:["→ ",i("pwa_install.desc_1"),m.jsx("br",{}),"→ ",i("pwa_install.desc_2")]}),m.jsxs("div",{className:"mt-2.5 flex gap-2",children:[m.jsx("button",{onClick:y,className:"rounded-[4px] bg-[var(--accent)] px-4 py-1.5 text-[10px] font-semibold text-black transition-all hover:brightness-110",children:i("pwa_install.install")}),m.jsx("button",{onClick:v,className:"rounded-[4px] border border-[var(--border)] px-3 py-1.5 text-[10px] text-[var(--text-muted)] transition-colors hover:border-[var(--text-muted)]",children:i("pwa_install.skip")})]})]})})]})})}function y0(){const{t:i}=Xt(),[o,s]=g.useState(!1);return g.useEffect(()=>{if(!("serviceWorker"in navigator))return;let u=!1,f=null,d=null,p=null,v=null;function y(){u||s(!0)}navigator.serviceWorker.addEventListener("controllerchange",y);function _(S){if(f=S,S.waiting){s(!0);return}p=()=>{const D=S.installing;D&&(d=D,v=()=>{D.state==="installed"&&navigator.serviceWorker.controller&&(u||s(!0))},D.addEventListener("statechange",v))},S.addEventListener("updatefound",p)}navigator.serviceWorker.getRegistration().then(S=>{S&&!u&&_(S)});const E=setInterval(()=>{navigator.serviceWorker.getRegistration().then(S=>{!S||u||(S.update().catch(()=>{}),S.waiting&&s(!0))})},3e4);return()=>{u=!0,clearInterval(E),navigator.serviceWorker.removeEventListener("controllerchange",y),f&&p&&f.removeEventListener("updatefound",p),d&&v&&d.removeEventListener("statechange",v)}},[]),o?m.jsx("div",{className:"animate-slide-up fixed bottom-20 left-4 right-4 z-50 md:bottom-4 md:left-auto md:right-4 md:w-80",children:m.jsxs("div",{className:"flex items-center gap-3 rounded-[4px] border border-[var(--accent)]/40 bg-[var(--bg-card)] px-3.5 py-3 shadow-[0_8px_32px_rgba(0,0,0,0.2)]",children:[m.jsx(ap,{size:14,className:"shrink-0 text-[var(--accent)]"}),m.jsx("span",{className:"flex-1 text-[10px] text-[var(--text-secondary)]",children:i("pwa_update.message")}),m.jsx("button",{onClick:()=>window.location.reload(),className:"shrink-0 rounded-[4px] bg-[var(--accent)] px-3 py-1 text-[10px] font-semibold text-black transition-all hover:brightness-110",children:i("pwa_update.reload")})]})}):null}const Hr=64,v0=96,Ah=32;function b0({children:i,className:o}){const s=g.useRef(null),u=g.useRef(0),f=g.useRef("idle"),[d,p]=g.useState(0),[v,y]=g.useState("idle"),_=g.useCallback(U=>{f.current=U,y(U)},[]),E=g.useCallback(()=>{const U=s.current;return U?U.scrollTop<=0:!0},[]),S=g.useCallback(U=>{if(!E()){u.current=0;return}u.current=U.touches[0].clientY},[E]),D=g.useCallback(U=>{if(f.current==="refreshing"||u.current===0)return;const X=U.touches[0].clientY-u.current;if(X<=0){f.current!=="idle"&&(p(0),_("idle"));return}if(!E())return;U.preventDefault();const oe=Math.min(X*.5,v0);p(oe),_(oe>=Hr?"ready":"pulling")},[E,_]),Y=g.useCallback(()=>{f.current!=="refreshing"&&(f.current==="ready"?(_("refreshing"),p(Hr),setTimeout(()=>{window.location.reload()},300)):(p(0),_("idle")),u.current=0)},[_]);g.useEffect(()=>{const U=s.current;if(U)return U.addEventListener("touchstart",S,{passive:!0}),U.addEventListener("touchmove",D,{passive:!1}),U.addEventListener("touchend",Y,{passive:!0}),()=>{U.removeEventListener("touchstart",S),U.removeEventListener("touchmove",D),U.removeEventListener("touchend",Y)}},[S,D,Y]);const q=Math.min(d/Hr,1),H=v==="refreshing"?0:d/Hr*180,B=d>0||v==="refreshing";return m.jsxs("div",{ref:s,className:o,style:{overscrollBehaviorY:"contain"},children:[B&&m.jsx("div",{className:"pointer-events-none flex items-center justify-center md:hidden",style:{height:d,transition:v==="idle"?"height 200ms ease-out":void 0},children:m.jsx("div",{className:"flex items-center justify-center rounded-full bg-[var(--bg-card)] border border-[var(--border)]",style:{width:Ah,height:Ah,opacity:q,transition:v==="idle"?"opacity 200ms ease-out":void 0},children:v==="refreshing"?m.jsxs("svg",{width:16,height:16,viewBox:"0 0 16 16",className:"animate-spin",style:{color:"var(--accent)"},children:[m.jsx("circle",{cx:"8",cy:"8",r:"6",fill:"none",stroke:"currentColor",strokeWidth:"2",opacity:"0.3"}),m.jsx("path",{d:"M8 2a6 6 0 0 1 6 6",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round"})]}):m.jsx("svg",{width:16,height:16,viewBox:"0 0 16 16",style:{color:v==="ready"?"var(--accent)":"var(--text-muted)",transform:`rotate(${H}deg)`,transition:"color 150ms"},children:m.jsx("path",{d:"M8 3v8M5 8l3 3 3-3",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})})})}),i]})}const Rp=g.createContext({setActions:()=>{}});function mx(i){const{setActions:o}=g.useContext(Rp);g.useEffect(()=>(o(i),()=>o(null)),[i,o])}const Ap=g.createContext({setSubtitle:()=>{}});function hx(i){const{setSubtitle:o}=g.useContext(Ap),s=typeof i=="string"?i:(i==null?void 0:i.text)??null,u=typeof i=="string"?i:(i==null?void 0:i.title)??(i==null?void 0:i.text)??null;g.useEffect(()=>s?(o(u&&u!==s?{text:s,title:u}:s),()=>o(null)):(o(null),()=>o(null)),[s,u,o])}const x0=[{to:"/plan",label:"plan",icon:rb},{to:"/review",label:"review",icon:Ph},{to:"/automations",label:"automations",icon:yb}],S0=[{to:"/home",label:"terminal",icon:$s},{to:"/tasks",label:"tasks",icon:tp},{to:"/dashboard",label:"dashboard",icon:ep}],k0=[{to:"/workers",label:"workers",icon:lp},{to:"/projects",label:"projects",icon:cb},{to:"/access-tokens",label:"tokens",icon:db}],w0=[{to:"/docs/changelog",label:"changelog",icon:ub},{to:"/docs/cli",label:"cli",icon:$s},{to:"/docs/api",label:"api",icon:ob},{to:"/docs/bot",label:"bot",icon:_b},{to:"/docs/skill",label:"skill",icon:xb},{to:"/docs/all",label:"all",icon:mb}],E0=[{to:"/admin",label:"admin",icon:bb}],T0=[{to:"/home",label:"terminal",icon:$s},{to:"/tasks",label:"tasks",icon:tp},{to:"/review",label:"review",icon:Ph},{to:"/dashboard",label:"dashboard",icon:ep}],Br={"/home":{title:"common.breadcrumb_terminal",subtitle:"common.breadcrumb_terminal_sub"},"/dashboard":{title:"common.breadcrumb_dashboard",subtitle:"common.breadcrumb_dashboard_sub"},"/tasks":{title:"common.breadcrumb_tasks",subtitle:"common.breadcrumb_tasks_sub"},"/plan":{title:"plan.title",subtitle:"plan.title"},"/review":{title:"review.title",subtitle:"review.title"},"/workers":{title:"common.breadcrumb_workers",subtitle:"common.breadcrumb_workers_sub"},"/projects":{title:"common.breadcrumb_projects",subtitle:"common.breadcrumb_projects_sub"},"/admin":{title:"common.breadcrumb_admin",subtitle:"common.breadcrumb_admin_sub"},"/profile":{title:"common.breadcrumb_profile",subtitle:"common.breadcrumb_profile_sub"},"/access-tokens":{title:"common.breadcrumb_tokens",subtitle:"common.breadcrumb_tokens_sub"},"/docs":{title:"common.breadcrumb_docs",subtitle:"common.breadcrumb_docs_sub"},"/docs/cli":{title:"common.breadcrumb_docs_cli",subtitle:"common.breadcrumb_docs_cli_sub"},"/docs/api":{title:"common.breadcrumb_docs_api",subtitle:"common.breadcrumb_docs_api_sub"},"/docs/skill":{title:"common.breadcrumb_docs_skill",subtitle:"common.breadcrumb_docs_skill_sub"},"/docs/bot":{title:"common.breadcrumb_docs",subtitle:"common.breadcrumb_docs_bot_sub"},"/docs/all":{title:"common.breadcrumb_docs",subtitle:"common.breadcrumb_docs_all_sub"}};function j0(i){const{t:o}=Xt();if(Br[i]){const u=Br[i];return{title:o(u.title),subtitle:o(u.subtitle)}}const s="/"+i.split("/").filter(Boolean)[0];if(Br[s]){const u=Br[s],f=i.split("/").filter(Boolean).slice(1).join(" / ");return{title:o(u.title),subtitle:f||o(u.subtitle)}}return{title:i.slice(1).replace(/\//g," // ")||"home"}}function R0(i,o){return i==="/home"?o==="/home":i==="/dashboard"?o==="/dashboard":o.startsWith(i)}function A0(){const i=yt(),{t:o}=Xt(),s={terminal:o("terminal_home.title"),dashboard:o("dashboard.title"),tasks:o("tasks.title"),workers:o("workers.title"),plan:o("plan.title"),review:o("review.title")};return m.jsxs("nav",{className:"flex items-center justify-around border-t border-[var(--border)] bg-[var(--bg-card)]",style:{height:48,paddingTop:4},children:[T0.map(({to:u,label:f,icon:d})=>{const p=R0(u,i.pathname);return m.jsxs(Js,{to:u,className:"flex flex-1 flex-col items-center gap-1",children:[m.jsx(d,{size:18,className:p?"text-[var(--accent)]":"text-[var(--text-muted)]"}),m.jsx("span",{className:`text-[11px] lowercase ${p?"font-bold text-[var(--accent)]":"text-[var(--text-muted)]"}`,children:s[f]??f})]},u)}),m.jsx(jp,{renderTrigger:u=>m.jsxs("button",{type:"button",onClick:u,className:"flex flex-1 flex-col items-center gap-1",children:[m.jsx(np,{size:18,className:"text-[var(--text-muted)]"}),m.jsx("span",{className:"text-[11px] lowercase text-[var(--text-muted)]",children:o("common.search_placeholder")})]})})]})}function z0(){const i=Ia(),{t:o}=Xt();return m.jsxs("header",{className:"flex items-center justify-between border-b border-[var(--border)] bg-[var(--bg-card)] px-4 md:hidden",style:{height:"calc(56px + env(safe-area-inset-top, 0px))",minHeight:"calc(56px + env(safe-area-inset-top, 0px))",paddingTop:"env(safe-area-inset-top, 0px)"},children:[m.jsxs("button",{onClick:()=>i("/home"),className:"flex items-center gap-2",style:{background:"none",border:"none",padding:0},children:[m.jsx("div",{className:"flex h-6 w-6 items-center justify-center rounded-[4px] bg-[var(--accent)]",children:m.jsx("span",{className:"text-sm font-semibold",style:{color:"#0C0C0C"},children:"~"})}),m.jsx("span",{className:"text-sm font-bold lowercase text-[var(--text-primary)]",children:o("common.overlord")})]}),m.jsxs("div",{className:"flex items-center gap-1",children:[m.jsx("button",{onClick:()=>i("/profile"),className:"p-2 text-[var(--text-secondary)] transition-colors hover:text-[var(--text-primary)]","aria-label":o("common.profile"),children:m.jsx(wb,{size:18})}),m.jsx(wp,{}),m.jsx(kp,{})]})]})}function C0({collapsed:i}){const o=Fs(s=>s.inboxUnreadCount);return o<=0?null:i?m.jsx("span",{className:"h-1.5 w-1.5 rounded-full bg-[var(--accent)]"}):m.jsx("span",{className:"ml-auto flex h-4 min-w-[16px] items-center justify-center rounded-full bg-[var(--accent)] px-1 text-[10px] font-bold text-black",children:o>99?"99+":o})}function ii({label:i,items:o,collapsed:s}){return m.jsxs("div",{className:"mt-4 first:mt-0",children:[m.jsx("div",{className:`overflow-hidden transition-all duration-300 ${s?"max-h-0 mb-0 opacity-0":"max-h-6 mb-2 opacity-100"}`,children:m.jsx("div",{className:"px-3 text-xs lowercase",style:{color:"var(--text-muted)"},children:i})}),o.map(({to:u,label:f,icon:d})=>m.jsx(Js,{to:u,className:({isActive:p})=>`flex items-center text-sm lowercase transition-all duration-300 ${s?"justify-center py-3":"gap-2.5 px-3 py-1.5"} ${p?"text-[var(--accent)] bg-[var(--accent)]/5":"text-[var(--text-secondary)] hover:text-[var(--text-primary)]"}`,children:({isActive:p})=>m.jsxs(m.Fragment,{children:[m.jsx(d,{size:14,style:{flexShrink:0}}),!s&&m.jsx("span",{children:p?`> ${f}`:` ${f}`}),u==="/automations"&&m.jsx(C0,{collapsed:s})]})},u))]})}function O0(){const{user:i,logout:o}=Sa(),s=Ia(),[u,f]=g.useState(!1),d=Rb(),{t:p}=Xt(),{sidebarCollapsed:v,toggleSidebar:y}=zb();function _(){o(),s("/login")}return m.jsxs("aside",{className:"hidden md:flex flex-col border-r border-[var(--border)] transition-[width,min-width] duration-300 overflow-hidden",style:{width:v?56:240,minWidth:v?56:240,backgroundColor:"var(--bg-card)"},children:[m.jsx("div",{className:"flex items-center px-5",style:{height:48},children:m.jsxs("button",{onClick:()=>s("/home"),className:"flex items-center gap-2.5",style:{background:"none",border:"none",padding:0},children:[m.jsx("div",{className:"flex h-7 w-7 items-center justify-center rounded-[4px] bg-[var(--accent)]",style:{flexShrink:0},children:m.jsx("span",{className:"text-lg font-semibold",style:{color:"#0C0C0C"},children:"~"})}),!v&&m.jsx("span",{className:"text-base font-bold lowercase tracking-tight",style:{color:"var(--text-primary)"},children:p("common.overlord")})]})}),m.jsxs("nav",{className:"flex-1 px-3 pt-2",children:[m.jsx(ii,{label:p("common.loop_section"),items:x0,collapsed:v}),m.jsx(ii,{label:p("common.tasks_section"),items:S0,collapsed:v}),m.jsx(ii,{label:p("common.fleet_section"),items:k0,collapsed:v}),m.jsx(ii,{label:p("common.docs_section"),items:w0,collapsed:v}),d&&m.jsx(ii,{label:p("common.admin_section"),items:E0,collapsed:v})]}),m.jsx("div",{className:"flex px-3 py-1",children:m.jsx("button",{onClick:y,className:"flex items-center justify-center w-full py-1.5 rounded-[4px] text-[var(--text-secondary)] transition-colors hover:text-[var(--accent)] hover:bg-[var(--accent)]/5","aria-label":v?"expand sidebar":"collapse sidebar",children:v?m.jsx(nb,{size:14}):m.jsx(ab,{size:14})})}),m.jsx("div",{className:"border-t border-[var(--border)] p-3",children:m.jsxs("div",{className:`flex min-h-[44px] items-center px-3 transition-[gap] duration-300 ${v?"gap-0":"gap-3"}`,children:[m.jsx("button",{onClick:()=>s("/profile"),className:"flex h-7 w-7 items-center justify-center text-xs font-bold text-black transition-opacity hover:opacity-80",style:{backgroundColor:"var(--accent)",borderRadius:4,flexShrink:0},title:p("common.profile"),children:((i==null?void 0:i.username)??"u")[0].toUpperCase()}),m.jsxs("div",{className:`flex min-w-0 flex-1 items-center overflow-hidden transition-[max-width,opacity] duration-300 ${v?"pointer-events-none max-w-0 opacity-0":"max-w-[calc(100%-28px)] opacity-100"}`,"aria-hidden":v,children:[m.jsxs("button",{onClick:()=>s("/profile"),className:"min-w-0 flex-1 text-left transition-colors hover:opacity-80",title:p("common.profile"),tabIndex:v?-1:void 0,children:[m.jsx("div",{className:"truncate text-sm lowercase",style:{color:"var(--text-primary)"},children:(i==null?void 0:i.username)??"user"}),m.jsx("div",{className:"truncate text-xs lowercase",style:{color:"var(--text-muted)"},children:(i==null?void 0:i.role)??"user"})]}),m.jsx("button",{onClick:()=>f(!0),className:"ml-2 p-1 text-[var(--text-secondary)] transition-colors hover:text-[var(--accent)]","aria-label":p("common.log_out"),tabIndex:v?-1:void 0,children:m.jsx(pb,{size:14})})]})]})}),m.jsx(h0,{isOpen:u,onClose:()=>f(!1),onConfirm:_,title:p("common.logout_title"),message:p("common.logout_message"),confirmLabel:p("common.logout"),confirmVariant:"warning"})]})}function D0({headerActions:i,subtitleOverride:o}){const s=yt(),{title:u,subtitle:f}=j0(s.pathname),d=o??f,p=typeof d=="string"?d:d==null?void 0:d.text,v=typeof d=="string"?d:(d==null?void 0:d.title)??(d==null?void 0:d.text);return m.jsxs("header",{className:"hidden md:flex items-center justify-between border-b border-[var(--border)] px-5",style:{height:48,minHeight:48,backgroundColor:"var(--bg-card)"},children:[m.jsxs("div",{className:"text-sm lowercase",children:[m.jsx("span",{style:{color:"var(--text-primary)"},children:u}),p&&m.jsxs("span",{style:{color:"var(--text-muted)"},title:v,children:[" ","// ",Fh(p,40)]})]}),m.jsxs("div",{className:"flex items-center gap-3",children:[i,m.jsxs("div",{className:"flex items-center gap-1",children:[m.jsx(jp,{}),m.jsx(wp,{}),m.jsx(kp,{})]})]})]})}function N0(){const[i,o]=g.useState(null),[s,u]=g.useState(null),f=yt(),d=f.pathname==="/home",p=/^\/tasks\/\d+$/.test(f.pathname),v=f.pathname.startsWith("/docs");return g.useEffect(()=>bp.getState().init(),[]),g.useEffect(()=>{Fs.getState().initInbox()},[]),m.jsxs("div",{className:"fixed inset-x-0 top-0 flex w-full overflow-hidden font-mono md:flex-row",style:{height:"var(--app-height, 100dvh)",minHeight:"var(--app-height, 100dvh)"},children:[m.jsx(O0,{}),m.jsxs("div",{"data-testid":"app-main-column",className:"flex min-h-0 flex-1 flex-col overflow-hidden pb-[calc(48px+var(--safe-area-bottom,0px))] md:pb-0",children:[m.jsx(z0,{}),!v&&m.jsx(D0,{headerActions:i,subtitleOverride:s}),m.jsx(b0,{className:d||p?"min-h-0 flex-1 overflow-hidden bg-[var(--bg-primary)]":"min-h-0 flex-1 overflow-auto bg-[var(--bg-primary)] p-4 pb-6 md:p-6 md:pb-6",children:m.jsx(Rp.Provider,{value:{setActions:o},children:m.jsx(Ap.Provider,{value:{setSubtitle:u},children:m.jsx(hv,{})})})}),m.jsx(g0,{}),m.jsx(y0,{}),m.jsx("div",{className:"safe-area-bottom-fill fixed inset-x-0 bottom-0 z-30 bg-[var(--bg-card)] md:hidden",children:m.jsx(A0,{})})]})]})}function zh(i){var s;const o=(s=i.state)==null?void 0:s.from;return o?{from:o}:{from:{pathname:i.pathname,search:i.search}}}function ri({children:i,requireAdmin:o=!1}){const{accessToken:s,user:u,requireTotpSetup:f,initializing:d}=Sa(),p=yt();if(d)return m.jsx("div",{className:"flex h-screen items-center justify-center",children:m.jsx("div",{className:"h-8 w-8 animate-spin rounded-full border-4 border-[var(--border)] border-t-[var(--accent)]"})});if(!s)return m.jsx(il,{to:"/login",state:zh(p),replace:!0});if(f){const v=zh(p);return p.pathname!=="/totp-setup"&&p.pathname!=="/bind"?m.jsx(il,{to:"/totp-setup",state:v,replace:!0}):p.pathname==="/bind"?(sessionStorage.setItem("overlord_bind_redirect",JSON.stringify(v.from)),m.jsx(il,{to:"/totp-setup",state:v,replace:!0})):m.jsx(m.Fragment,{children:i})}return o&&(u==null?void 0:u.role)!==op.ADMIN?m.jsx(il,{to:"/home",replace:!0}):m.jsx(m.Fragment,{children:i})}function M0({children:i}){const{theme:o,resolved:s,setResolved:u}=Sp();return g.useEffect(()=>{if(o!=="system"){u(o);return}const f=window.matchMedia("(prefers-color-scheme: dark)");u(f.matches?"dark":"light");const d=p=>u(p.matches?"dark":"light");return f.addEventListener("change",d),()=>f.removeEventListener("change",d)},[o,u]),g.useEffect(()=>{document.documentElement.classList.toggle("dark",s==="dark")},[s]),m.jsx(m.Fragment,{children:i})}class U0 extends g.Component{constructor(o){super(o),this.state={hasError:!1,error:null}}static getDerivedStateFromError(o){return{hasError:!0,error:o}}render(){var o;return this.state.hasError?m.jsxs("div",{className:"flex h-full min-h-[300px] flex-col items-center justify-center gap-4 p-8 font-mono",children:[m.jsx("span",{className:"text-lg font-bold text-[var(--destructive)]",children:Zr("common.runtime_error")}),m.jsx("p",{className:"max-w-md text-center text-xs text-[var(--text-muted)]",children:((o=this.state.error)==null?void 0:o.message)||Zr("common.an_unexpected_error_occurred")}),m.jsxs("button",{onClick:()=>{this.setState({hasError:!1,error:null}),window.location.reload()},className:"flex items-center gap-1.5 rounded-[4px] border border-[var(--border)] px-4 py-2 text-xs text-[var(--text-secondary)] hover:text-[var(--text-primary)]",children:[m.jsx(ap,{className:"h-3.5 w-3.5"}),Zr("common.reload")]})]}):this.props.children}}function L0({isOpen:i}){const o=Ia(),{logout:s,setSessionExpired:u}=Sa(),{t:f}=Xt();function d(){s(),u(!1),o("/login")}return i?m.jsxs("div",{className:"fixed inset-0 z-50 flex items-center justify-center",children:[m.jsx("div",{className:"fixed inset-0 bg-[var(--modal-backdrop)]"}),m.jsx("div",{className:"relative z-10 w-full max-w-[480px] rounded-[4px] border border-[var(--border)] bg-[var(--bg-card)]",children:m.jsxs("div",{className:"flex flex-col items-center px-8 py-10",children:[m.jsx("div",{className:"mb-5 flex h-14 w-14 items-center justify-center rounded-full bg-[var(--warning)]/10",children:m.jsx(hb,{className:"h-7 w-7 text-[var(--warning)]"})}),m.jsx("h3",{className:"mb-2 text-base font-bold text-[var(--text-primary)]",children:f("auth.session_expired")}),m.jsx("p",{className:"mb-8 text-center text-xs text-[var(--text-secondary)]",children:f("auth.session_expired_message")}),m.jsx("button",{type:"button",className:"w-full rounded-[4px] bg-[var(--accent)] px-3 py-2.5 text-xs font-medium text-black hover:opacity-90 transition-opacity",onClick:d,children:f("auth.go_to_login")})]})})]}):null}const Ch=5;let xa=[];const Bs=new Set;function zp(){Bs.forEach(i=>i())}function q0(){return`${Date.now()}-${Math.random().toString(36).slice(2,9)}`}function Fa(i,o,s=4e3){const u=q0();return xa=[...xa,{id:u,variant:i,message:o,duration:s}],xa.length>Ch&&(xa=xa.slice(xa.length-Ch)),zp(),u}Fa.success=(i,o)=>Fa("success",i,o);Fa.error=(i,o)=>Fa("error",i,o);Fa.warning=(i,o)=>Fa("warning",i,o);Fa.info=(i,o)=>Fa("info",i,o);function H0(i){xa=xa.filter(o=>o.id!==i),zp()}function B0(){const[,i]=g.useState(0);return g.useEffect(()=>{const o=()=>i(s=>s+1);return Bs.add(o),()=>{Bs.delete(o)}},[]),xa}const Y0={success:{icon:lb,borderColor:"var(--accent)"},error:{icon:ib,borderColor:"var(--destructive)"},warning:{icon:ip,borderColor:"var(--warning)"},info:{icon:fb,borderColor:"var(--info)"}};function V0({item:i}){const o=Y0[i.variant],s=o.icon,{t:u}=Xt(),f=g.useCallback(()=>H0(i.id),[i.id]);return g.useEffect(()=>{if(!i.duration)return;const d=setTimeout(f,i.duration);return()=>clearTimeout(d)},[i.duration,f]),m.jsxs("div",{className:"flex items-center gap-3 rounded-[4px] bg-[var(--bg-card)] px-4 py-3 shadow-lg",style:{borderLeft:`3px solid ${o.borderColor}`},role:"alert",children:[m.jsx(s,{className:"h-4 w-4 shrink-0",style:{color:o.borderColor}}),m.jsx("p",{className:"flex-1 text-xs text-[var(--text-primary)]",children:i.message}),m.jsx("button",{onClick:f,className:"shrink-0 rounded-[4px] p-0.5 text-[var(--text-muted)] transition-colors hover:text-[var(--text-primary)]","aria-label":u("common.dismiss_notification"),children:m.jsx(rp,{className:"h-3.5 w-3.5"})})]})}function G0(){const i=B0();return i.length===0?null:m.jsx("div",{className:"pointer-events-none fixed right-4 top-4 z-[9999] flex w-80 max-w-[calc(100vw-2rem)] flex-col gap-2",children:i.map(o=>m.jsx("div",{className:"pointer-events-auto",children:m.jsx(V0,{item:o})},o.id))})}const X0=g.lazy(()=>ee(()=>import("./LandingPage-BZ2OW2Tp.js"),__vite__mapDeps([0,1,2,3,4,5,6]))),Q0=g.lazy(()=>ee(()=>import("./LoginPage-BvkNtbOH.js"),[])),Z0=g.lazy(()=>ee(()=>import("./TotpSetupPage-DSO6vRsM.js"),[])),K0=g.lazy(()=>ee(()=>import("./NotFoundPage-3hbcgIgf.js"),[])),J0=g.lazy(()=>ee(()=>import("./HomePage-zVLfdxgB.js"),__vite__mapDeps([7,8,9,10,11,12,13,14,15,1]))),$0=g.lazy(()=>ee(()=>import("./TerminalHomePage-DQ7h-pKm.js"),__vite__mapDeps([16,17,18,19,20,11,12,21,13,22,23,24,9,25,26,14,27,28,29,30]))),W0=g.lazy(()=>ee(()=>import("./TaskListPage-hB72kn3H.js"),__vite__mapDeps([31,18,8,9,13,15,32,23,24,33,25,26,6,34,10,27,35,12]))),F0=g.lazy(()=>ee(()=>import("./TaskDetailPage-DSf2vDDR.js"),__vite__mapDeps([36,18,19,20,21,13,22,37,23,24,9,17,26,25,15,38,29,32,39,40,41,42]))),I0=g.lazy(()=>ee(()=>import("./PlanPage-Bi6aA-yb.js"),__vite__mapDeps([43,34,10,21,13,22,23,24,27,40,35,12]))),P0=g.lazy(()=>ee(()=>import("./ReviewPage-B1moD3qH.js"),__vite__mapDeps([44,33,34,10,37,23,24,13,15,26,25,27,39,35,12]))),e1=g.lazy(()=>ee(()=>import("./ReviewAggregatePage-vilyKtbQ.js"),__vite__mapDeps([45,19,20,10,37,13,26,25,38,41,39,42,29,28,24,46]))),t1=g.lazy(()=>ee(()=>import("./WorkerListPage-BPjiOimX.js"),__vite__mapDeps([47,9,48,49,50,51,52,39,30,6,41,23,24,34,10,14,27,38]))),a1=g.lazy(()=>ee(()=>import("./WorkerDetailPage-CtSdGuiT.js"),__vite__mapDeps([53,13,9,54,48,14,15,55,38,35,12]))),n1=g.lazy(()=>ee(()=>import("./WorkerSetupGuidePage-Cz8jZzlP.js"),__vite__mapDeps([49,50,51,52,39,30]))),l1=g.lazy(()=>ee(()=>import("./ProjectListPage-BHkBlY4i.js"),__vite__mapDeps([56,23,24,26,34,10,13,14,27,38]))),i1=g.lazy(()=>ee(()=>import("./ProjectDetailPage-Crv53lJf.js"),__vite__mapDeps([57,58,23,24,15,13,9,54,14,59,55,38,27]))),r1=g.lazy(()=>ee(()=>import("./EditProjectPage-C-i9mvrD.js"),__vite__mapDeps([60,23,24,58,26,27]))),o1=g.lazy(()=>ee(()=>import("./PipelineEditorPage-BiDBe2GM.js"),__vite__mapDeps([61,23,24]))),u1=g.lazy(()=>ee(()=>import("./AutomationListPage-Bhgxxu6_.js"),__vite__mapDeps([62,34,10,8,9,13,23,24,63,37,64,27,39,2,65,22,12]))),s1=g.lazy(()=>ee(()=>import("./AutomationCreatePage-CWA--vuT.js"),__vite__mapDeps([66,23,24,63,37,38]))),c1=g.lazy(()=>ee(()=>import("./AutomationDetailPage-BFNJn9l0.js"),__vite__mapDeps([67,34,10,13,64,22,38,68,39,55,65,2,40]))),f1=g.lazy(()=>ee(()=>import("./AutomationEditPage-y5p6I8v9.js"),__vite__mapDeps([69,23,24,63,37,10,34,22,38]))),d1=g.lazy(()=>ee(()=>import("./AutomationRunDetailPage-eRVHSPgi.js"),__vite__mapDeps([70,34,10,13,64,22,38,40,46]))),m1=g.lazy(()=>ee(()=>import("./ProfilePage-D3BwamWo.js"),__vite__mapDeps([71,72,54,14]))),h1=g.lazy(()=>ee(()=>import("./BindPlatformPage-JgPH-GyV.js"),[])),p1=g.lazy(()=>ee(()=>import("./AccessTokensPage-BbryzvnM.js"),__vite__mapDeps([73,23,24,34,10,13,14,27,6,55]))),_1=g.lazy(()=>ee(()=>import("./CliReferencePage-CcCgOSoY.js"),__vite__mapDeps([74,75,6,76,27]))),g1=g.lazy(()=>ee(()=>import("./ApiReferencePage-BawqrcYL.js"),__vite__mapDeps([77,76,6,27]))),y1=g.lazy(()=>ee(()=>import("./SkillPage-BLXLZ_br.js"),__vite__mapDeps([78,75,6,40]))),v1=g.lazy(()=>ee(()=>import("./DocsLayout-yhAysfLb.js"),__vite__mapDeps([79,38]))),b1=g.lazy(()=>ee(()=>import("./InstallationPage-CF5KJSiH.js"),__vite__mapDeps([80,75,6]))),x1=g.lazy(()=>ee(()=>import("./DeveloperSetupPage-CAUfLPib.js"),__vite__mapDeps([81,75,6]))),S1=g.lazy(()=>ee(()=>import("./WorkerSetupPage-DP-Gua4N.js"),__vite__mapDeps([82,75,6]))),k1=g.lazy(()=>ee(()=>import("./BotSetupPage-vF-1zbQt.js"),__vite__mapDeps([83,75,6]))),w1=g.lazy(()=>ee(()=>import("./LocalDevelopmentPage-CHzphJ7-.js"),__vite__mapDeps([84,75,6]))),E1=g.lazy(()=>ee(()=>import("./WorkerOperationsPage-S0sYpBVA.js"),[])),T1=g.lazy(()=>ee(()=>import("./DeploymentPage-2CGTHVvc.js"),__vite__mapDeps([85,75,6]))),Oh=g.lazy(()=>ee(()=>import("./BotIntegrationPage-yO7OUlpc.js"),[])),j1=g.lazy(()=>ee(()=>import("./PipelineConfigPage-QOFAuIzF.js"),__vite__mapDeps([86,75,6]))),R1=g.lazy(()=>ee(()=>import("./DevWorkflowPage-C9dwRqkd.js"),__vite__mapDeps([87,75,6]))),A1=g.lazy(()=>ee(()=>import("./PermissionsPage-CrRmJEWi.js"),[])),z1=g.lazy(()=>ee(()=>import("./EnvVariablesPage-DHlRltEG.js"),__vite__mapDeps([88,75,6]))),C1=g.lazy(()=>ee(()=>import("./ArchitecturePage-FWLevT4m.js"),__vite__mapDeps([89,75,6]))),O1=g.lazy(()=>ee(()=>import("./ChangelogPage-Dvz1CT1l.js"),[])),D1=g.lazy(()=>ee(()=>import("./AgentCliPage-SW_JKwzo.js"),__vite__mapDeps([90,75,6]))),N1=g.lazy(()=>ee(()=>import("./TaskGuidePage-BW1rBO-9.js"),__vite__mapDeps([91,75,6]))),M1=g.lazy(()=>ee(()=>import("./DocsIndexPage-_KFl66Pi.js"),__vite__mapDeps([92,51,3,4,52,93]))),U1=g.lazy(()=>ee(()=>import("./ConnectorsPage-DpvBzw0u.js"),__vite__mapDeps([94,75,6]))),L1=g.lazy(()=>ee(()=>import("./AdminPage-BultWF7a.js"),__vite__mapDeps([95,5,3,93,96,52]))),q1=g.lazy(()=>ee(()=>import("./DeveloperManage-CP4AFGVd.js"),__vite__mapDeps([97,23,24,72,34,10,14,9,27,5,59,29]))),H1=g.lazy(()=>ee(()=>import("./BotManage-BwplAxcP.js"),__vite__mapDeps([98,23,24,75,6,55,27,34,10,14,9,3,59,99]))),B1=g.lazy(()=>ee(()=>import("./TokenManage-BS68pVIn.js"),__vite__mapDeps([100,50,6,40,34,10,14,9,27]))),Y1=g.lazy(()=>ee(()=>import("./AuditLogPage-DrxyZ_N_.js"),__vite__mapDeps([101,23,24,34,10,96,35,12]))),V1=g.lazy(()=>ee(()=>import("./SettingsPage-e_KlSeOd.js"),[])),G1=g.lazy(()=>ee(()=>import("./ConnectorsManage-B8aIKAfR.js"),__vite__mapDeps([102,23,24,14,55,27,34,10,93,41,68,59,99])));function X1(){return m.jsx("div",{className:"flex h-full items-center justify-center",children:m.jsx("div",{className:"h-8 w-8 animate-spin rounded-full border-4 border-[var(--border)] border-t-[var(--accent)]"})})}function Q1(){const i=Sa(o=>o.sessionExpired);return m.jsxs(M0,{children:[m.jsx(G0,{}),m.jsx(U0,{children:m.jsxs(Yv,{children:[m.jsx(L0,{isOpen:i}),m.jsx(g.Suspense,{fallback:m.jsx(X1,{}),children:m.jsxs(_v,{children:[m.jsx(W,{path:"/",element:m.jsx(X0,{})}),m.jsx(W,{path:"/login",element:m.jsx(Q0,{})}),m.jsx(W,{path:"/totp-setup",element:m.jsx(ri,{children:m.jsx(Z0,{})})}),m.jsx(W,{path:"/bind",element:m.jsx(ri,{children:m.jsx(h1,{})})}),m.jsxs(W,{element:m.jsx(ri,{children:m.jsx(N0,{})}),children:[m.jsx(W,{path:"/home",element:m.jsx($0,{})}),m.jsx(W,{path:"/dashboard",element:m.jsx(J0,{})}),m.jsx(W,{path:"/tasks",element:m.jsx(W0,{})}),m.jsx(W,{path:"/tasks/:id",element:m.jsx(F0,{})}),m.jsx(W,{path:"/plan",element:m.jsx(I0,{})}),m.jsx(W,{path:"/review",element:m.jsx(P0,{})}),m.jsx(W,{path:"/review/:sourceTaskId",element:m.jsx(e1,{})}),m.jsx(W,{path:"/automations",element:m.jsx(u1,{})}),m.jsx(W,{path:"/automations/new",element:m.jsx(s1,{})}),m.jsx(W,{path:"/automations/runs/:runId",element:m.jsx(d1,{})}),m.jsx(W,{path:"/automations/:id",element:m.jsx(c1,{})}),m.jsx(W,{path:"/automations/:id/edit",element:m.jsx(f1,{})}),m.jsx(W,{path:"/workers",element:m.jsx(t1,{})}),m.jsx(W,{path:"/workers/setup",element:m.jsx(ri,{requireAdmin:!0,children:m.jsx(n1,{})})}),m.jsx(W,{path:"/workers/:id",element:m.jsx(a1,{})}),m.jsx(W,{path:"/projects",element:m.jsx(l1,{})}),m.jsx(W,{path:"/projects/:key",element:m.jsx(i1,{})}),m.jsx(W,{path:"/projects/:key/edit",element:m.jsx(r1,{})}),m.jsx(W,{path:"/projects/:key/pipeline",element:m.jsx(o1,{})}),m.jsx(W,{path:"/profile",element:m.jsx(m1,{})}),m.jsx(W,{path:"/access-tokens",element:m.jsx(p1,{})}),m.jsxs(W,{path:"/docs",element:m.jsx(v1,{}),children:[m.jsx(W,{index:!0,element:m.jsx(il,{to:"cli",replace:!0})}),m.jsx(W,{path:"cli",element:m.jsx(_1,{})}),m.jsx(W,{path:"api",element:m.jsx(g1,{})}),m.jsx(W,{path:"bot",element:m.jsx(Oh,{})}),m.jsx(W,{path:"all",element:m.jsx(M1,{})}),m.jsx(W,{path:"skill",element:m.jsx(y1,{})}),m.jsx(W,{path:"installation",element:m.jsx(b1,{})}),m.jsx(W,{path:"developer-setup",element:m.jsx(x1,{})}),m.jsx(W,{path:"worker-setup",element:m.jsx(S1,{})}),m.jsx(W,{path:"bot-setup",element:m.jsx(k1,{})}),m.jsx(W,{path:"local-development",element:m.jsx(w1,{})}),m.jsx(W,{path:"worker-operations",element:m.jsx(E1,{})}),m.jsx(W,{path:"deployment",element:m.jsx(T1,{})}),m.jsx(W,{path:"bot-integration",element:m.jsx(Oh,{})}),m.jsx(W,{path:"pipeline-config",element:m.jsx(j1,{})}),m.jsx(W,{path:"dev-workflow",element:m.jsx(R1,{})}),m.jsx(W,{path:"permissions",element:m.jsx(A1,{})}),m.jsx(W,{path:"env-variables",element:m.jsx(z1,{})}),m.jsx(W,{path:"architecture",element:m.jsx(C1,{})}),m.jsx(W,{path:"task-guide",element:m.jsx(N1,{})}),m.jsx(W,{path:"agent-cli",element:m.jsx(D1,{})}),m.jsx(W,{path:"connectors",element:m.jsx(U1,{})}),m.jsx(W,{path:"changelog",element:m.jsx(O1,{})})]}),m.jsxs(W,{path:"/admin",element:m.jsx(ri,{requireAdmin:!0,children:m.jsx(L1,{})}),children:[m.jsx(W,{index:!0,element:m.jsx(il,{to:"developers",replace:!0})}),m.jsx(W,{path:"developers",element:m.jsx(q1,{})}),m.jsx(W,{path:"bots",element:m.jsx(H1,{})}),m.jsx(W,{path:"tokens",element:m.jsx(B1,{})}),m.jsx(W,{path:"connectors",element:m.jsx(G1,{})}),m.jsx(W,{path:"audit-logs",element:m.jsx(Y1,{})}),m.jsx(W,{path:"settings",element:m.jsx(V1,{})})]})]}),m.jsx(W,{path:"*",element:m.jsx(K0,{})})]})})]})})]})}function Cp(i=window){var o,s;return((o=i.matchMedia)==null?void 0:o.call(i,"(display-mode: standalone)").matches)===!0||((s=i.navigator)==null?void 0:s.standalone)===!0}async function Z1(i=window,o="portrait"){var u,f;if(!Cp(i))return!1;const s=(f=(u=i.screen)==null?void 0:u.orientation)==null?void 0:f.lock;if(typeof s!="function")return!1;try{return await s.call(i.screen.orientation,o),!0}catch{return!1}}function K1(i){var o,s;return((o=i.matchMedia)==null?void 0:o.call(i,"(display-mode: standalone)").matches)===!0||((s=i.navigator)==null?void 0:s.standalone)===!0}function J1(i){var s,u;const o=((s=i.navigator)==null?void 0:s.userAgent)??"";return/iPhone|iPad|iPod/i.test(o)||/Macintosh/i.test(o)&&(((u=i.navigator)==null?void 0:u.maxTouchPoints)??0)>1}function $1(i){const o=i.activeElement;if(!(o instanceof HTMLElement))return!1;const s=o.tagName;return o.isContentEditable||s==="INPUT"||s==="TEXTAREA"||s==="SELECT"}function W1(i){const o=i.screen;if(!o)return null;const s=Math.round(o.width),u=Math.round(o.height);return i.innerHeight>=i.innerWidth?Math.max(s,u):Math.min(s,u)}function F1(i=window,o=document){const s=o.documentElement,u=i.visualViewport??null;let f=-1;const d=()=>{const p=Math.round((u==null?void 0:u.height)??0),v=Math.round(i.innerHeight);let y=p>0?p:v;if(K1(i)&&J1(i)&&!$1(o)){const _=W1(i);_!==null&&(y=Math.max(y,v,_))}y!==f&&(f=y,s.style.setProperty("--app-height",`${y}px`))};return d(),i.addEventListener("resize",d),i.addEventListener("orientationchange",d),u==null||u.addEventListener("resize",d),()=>{i.removeEventListener("resize",d),i.removeEventListener("orientationchange",d),u==null||u.removeEventListener("resize",d)}}Sa.getState().initialize();F1(window,document);const Op=window,I1=Cp(Op);Z1(Op);if(I1){document.documentElement.classList.add("pwa-standalone");const i=window.matchMedia("(prefers-color-scheme: dark)").matches,o=localStorage.getItem("overlord-theme"),s=o==="dark"||o!=="light"&&i;document.body.style.backgroundColor=s?"#171717":"#FFFFFF",new MutationObserver(()=>{const u=document.documentElement.classList.contains("dark");document.body.style.backgroundColor=u?"#171717":"#FFFFFF"}).observe(document.documentElement,{attributes:!0,attributeFilter:["class"]})}hy.createRoot(document.getElementById("root")).render(m.jsx(g.StrictMode,{children:m.jsx(Q1,{})}));export{ap as $,fx as A,ex as B,tb as C,op as D,Ph as E,tx as F,ub as G,Ns as H,ox as I,lb as J,rb as K,$h as L,ob as M,il as N,_b as O,g0 as P,ix as Q,Cr as R,lp as S,kp as T,wb as U,ux as V,nx as W,rp as X,ip as Y,fb as Z,lx as _,Xt as a,fy as a0,Fh as a1,Fs as a2,Mr as a3,eb as a4,yb as a5,xb as a6,db as a7,pb as a8,rx as a9,Js as aa,hv as ab,sx as ac,ib as ad,$s as b,ye as c,bb as d,mb as e,Ia as f,yt as g,We as h,Rb as i,m as j,bp as k,Ep as l,Tp as m,di as n,ax as o,hx as p,dx as q,g as r,h0 as s,Fa as t,Sa as u,d0 as v,cx as w,mx as x,np as y,tp as z};