@ashlr/hub 3.11.5 → 3.13.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (408) hide show
  1. package/CHANGELOG.md +153 -0
  2. package/README.md +29 -16
  3. package/dist/authority-surface.json +91 -45
  4. package/dist/build-identity.json +2 -2
  5. package/dist/cli/authority.d.ts +145 -33
  6. package/dist/cli/authority.js +1196 -313
  7. package/dist/cli/authority.js.map +1 -1
  8. package/dist/cli/cloud.js +12 -3
  9. package/dist/cli/cloud.js.map +1 -1
  10. package/dist/core/authority/protected-paths.js +11 -0
  11. package/dist/core/authority/protected-paths.js.map +1 -1
  12. package/dist/core/authority/resident.d.ts +101 -0
  13. package/dist/core/authority/resident.js +246 -0
  14. package/dist/core/authority/resident.js.map +1 -0
  15. package/dist/core/authority/trust-roots.js +7 -1
  16. package/dist/core/authority/trust-roots.js.map +1 -1
  17. package/dist/core/authority/types.d.ts +43 -0
  18. package/dist/core/authority/types.js +6 -0
  19. package/dist/core/authority/types.js.map +1 -1
  20. package/dist/core/cloud/budget.js +11 -1
  21. package/dist/core/cloud/budget.js.map +1 -1
  22. package/dist/core/cloud/cloud-api.d.ts +25 -2
  23. package/dist/core/cloud/cloud-api.js +139 -5
  24. package/dist/core/cloud/cloud-api.js.map +1 -1
  25. package/dist/core/cloud/pr-actions.d.ts +93 -0
  26. package/dist/core/cloud/pr-actions.js +436 -0
  27. package/dist/core/cloud/pr-actions.js.map +1 -0
  28. package/dist/core/cloud/pr-preview.d.ts +128 -0
  29. package/dist/core/cloud/pr-preview.js +228 -0
  30. package/dist/core/cloud/pr-preview.js.map +1 -0
  31. package/dist/core/cloud/store.d.ts +2 -0
  32. package/dist/core/cloud/store.js +28 -0
  33. package/dist/core/cloud/store.js.map +1 -1
  34. package/dist/core/cloud/timeline-api.d.ts +24 -0
  35. package/dist/core/cloud/timeline-api.js +46 -0
  36. package/dist/core/cloud/timeline-api.js.map +1 -0
  37. package/dist/core/cloud/timeline-types.d.ts +62 -0
  38. package/dist/core/cloud/timeline-types.js +36 -0
  39. package/dist/core/cloud/timeline-types.js.map +1 -0
  40. package/dist/core/cloud/timeline.d.ts +102 -0
  41. package/dist/core/cloud/timeline.js +919 -0
  42. package/dist/core/cloud/timeline.js.map +1 -0
  43. package/dist/core/cloud/tracker.js +67 -0
  44. package/dist/core/cloud/tracker.js.map +1 -1
  45. package/dist/core/cloud/types.d.ts +38 -0
  46. package/dist/core/cloud/types.js +1 -1
  47. package/dist/core/cloud/types.js.map +1 -1
  48. package/dist/core/daemon/service-install-authority.d.ts +10 -2
  49. package/dist/core/daemon/service-install-authority.js +14 -5
  50. package/dist/core/daemon/service-install-authority.js.map +1 -1
  51. package/dist/core/daemon/service.d.ts +15 -0
  52. package/dist/core/daemon/service.js +26 -0
  53. package/dist/core/daemon/service.js.map +1 -1
  54. package/dist/core/fleet/cloud-intake.d.ts +95 -0
  55. package/dist/core/fleet/cloud-intake.js +557 -0
  56. package/dist/core/fleet/cloud-intake.js.map +1 -0
  57. package/dist/core/fleet/dispatch-router.d.ts +13 -0
  58. package/dist/core/fleet/dispatch-router.js +32 -8
  59. package/dist/core/fleet/dispatch-router.js.map +1 -1
  60. package/dist/core/fleet/fleet-merge-state.d.ts +10 -0
  61. package/dist/core/fleet/fleet-merge-state.js.map +1 -1
  62. package/dist/core/fleet/host-merge.d.ts +5 -0
  63. package/dist/core/fleet/host-merge.js +11 -0
  64. package/dist/core/fleet/host-merge.js.map +1 -1
  65. package/dist/core/fleet/merge-gates.d.ts +8 -0
  66. package/dist/core/fleet/merge-gates.js +25 -5
  67. package/dist/core/fleet/merge-gates.js.map +1 -1
  68. package/dist/core/fleet/standing-merge-pass.js +30 -0
  69. package/dist/core/fleet/standing-merge-pass.js.map +1 -1
  70. package/dist/core/fleet/tick-hooks-live.d.ts +9 -0
  71. package/dist/core/fleet/tick-hooks-live.js +44 -5
  72. package/dist/core/fleet/tick-hooks-live.js.map +1 -1
  73. package/dist/core/fleet/verify-check-run.d.ts +90 -0
  74. package/dist/core/fleet/verify-check-run.js +274 -0
  75. package/dist/core/fleet/verify-check-run.js.map +1 -0
  76. package/dist/core/routing/budget-api.d.ts +11 -0
  77. package/dist/core/routing/budget-api.js +64 -8
  78. package/dist/core/routing/budget-api.js.map +1 -1
  79. package/dist/core/routing/budget-store.d.ts +22 -1
  80. package/dist/core/routing/budget-store.js +22 -8
  81. package/dist/core/routing/budget-store.js.map +1 -1
  82. package/dist/core/universe/builtins/preparation/manifest.json +1 -1
  83. package/dist/core/universe/builtins/preparation/preparation-bridge.mjs +8 -2
  84. package/dist/core/universe/builtins/preparation/preparation-verification-fixtures.mjs +7 -1
  85. package/dist/core/verse/account-health.js +9 -3
  86. package/dist/core/verse/account-health.js.map +1 -1
  87. package/dist/core/verse/activity-api.d.ts +5 -1
  88. package/dist/core/verse/activity-api.js +62 -14
  89. package/dist/core/verse/activity-api.js.map +1 -1
  90. package/dist/core/verse/authority-api.d.ts +9 -1
  91. package/dist/core/verse/authority-api.js +82 -2
  92. package/dist/core/verse/authority-api.js.map +1 -1
  93. package/dist/core/verse/seat-readiness.d.ts +25 -0
  94. package/dist/core/verse/seat-readiness.js +43 -6
  95. package/dist/core/verse/seat-readiness.js.map +1 -1
  96. package/dist/core/verse/verse-api.d.ts +3 -1
  97. package/dist/core/verse/verse-api.js +6 -0
  98. package/dist/core/verse/verse-api.js.map +1 -1
  99. package/dist/core/web/public/next/assets/{ActionMenu-DffwPklw.js → ActionMenu-Dwjk6rUQ.js} +2 -2
  100. package/dist/core/web/public/next/assets/{ActionMenu-DffwPklw.js.map → ActionMenu-Dwjk6rUQ.js.map} +1 -1
  101. package/dist/core/web/public/next/assets/Advanced-cVYTAsfB.js +2 -0
  102. package/dist/core/web/public/next/assets/{Advanced-CxzE6ekM.js.map → Advanced-cVYTAsfB.js.map} +1 -1
  103. package/dist/core/web/public/next/assets/App-IsaWDsdF.js +7 -0
  104. package/dist/core/web/public/next/assets/{App-DFlp-vdv.js.map → App-IsaWDsdF.js.map} +1 -1
  105. package/dist/core/web/public/next/assets/AppsSection-DDqeSrty.js +2 -0
  106. package/dist/core/web/public/next/assets/{AppsSection-Ct2O605-.js.map → AppsSection-DDqeSrty.js.map} +1 -1
  107. package/dist/core/web/public/next/assets/{AreaTrend-o-GLl2Is.js → AreaTrend-C32rUaxm.js} +2 -2
  108. package/dist/core/web/public/next/assets/{AreaTrend-o-GLl2Is.js.map → AreaTrend-C32rUaxm.js.map} +1 -1
  109. package/dist/core/web/public/next/assets/AutonomyOffState-CmSSTHVe.css +1 -0
  110. package/dist/core/web/public/next/assets/AutonomyOffState-CpFYS3tQ.js +3 -0
  111. package/dist/core/web/public/next/assets/AutonomyOffState-CpFYS3tQ.js.map +1 -0
  112. package/dist/core/web/public/next/assets/AutonomySection-Dwn8UtOy.js +2 -0
  113. package/dist/core/web/public/next/assets/{AutonomySection-BTg7yVa1.js.map → AutonomySection-Dwn8UtOy.js.map} +1 -1
  114. package/dist/core/web/public/next/assets/{BranchBar-BjPFtGsj.js → BranchBar-ISZ7xUCj.js} +2 -2
  115. package/dist/core/web/public/next/assets/{BranchBar-BjPFtGsj.js.map → BranchBar-ISZ7xUCj.js.map} +1 -1
  116. package/dist/core/web/public/next/assets/BudgetControl-BARVp-En.js +2 -0
  117. package/dist/core/web/public/next/assets/BudgetControl-BARVp-En.js.map +1 -0
  118. package/dist/core/web/public/next/assets/{Button-OjVJSrFq.js → Button-DtE0rlWD.js} +2 -2
  119. package/dist/core/web/public/next/assets/{Button-OjVJSrFq.js.map → Button-DtE0rlWD.js.map} +1 -1
  120. package/dist/core/web/public/next/assets/{CapacityStrip-Bx4c3dxD.js → CapacityStrip-DKbKA_Aa.js} +2 -2
  121. package/dist/core/web/public/next/assets/{CapacityStrip-Bx4c3dxD.js.map → CapacityStrip-DKbKA_Aa.js.map} +1 -1
  122. package/dist/core/web/public/next/assets/{ChartFrame-B_w2Siqg.js → ChartFrame-DK_BDXCt.js} +2 -2
  123. package/dist/core/web/public/next/assets/{ChartFrame-B_w2Siqg.js.map → ChartFrame-DK_BDXCt.js.map} +1 -1
  124. package/dist/core/web/public/next/assets/ChatSection-C9myY4ei.js +3 -0
  125. package/dist/core/web/public/next/assets/ChatSection-C9myY4ei.js.map +1 -0
  126. package/dist/core/web/public/next/assets/{CloudBudgetForm-5Gf4iAok.js → CloudBudgetForm-CvjK4Oh6.js} +2 -2
  127. package/dist/core/web/public/next/assets/{CloudBudgetForm-5Gf4iAok.js.map → CloudBudgetForm-CvjK4Oh6.js.map} +1 -1
  128. package/dist/core/web/public/next/assets/{CommandPalette-iTpk6I8r.js → CommandPalette-DzPsth0u.js} +2 -2
  129. package/dist/core/web/public/next/assets/{CommandPalette-iTpk6I8r.js.map → CommandPalette-DzPsth0u.js.map} +1 -1
  130. package/dist/core/web/public/next/assets/CommandSection-Brp73iox.js +3 -0
  131. package/dist/core/web/public/next/assets/CommandSection-Brp73iox.js.map +1 -0
  132. package/dist/core/web/public/next/assets/{ConfirmDialog-_S9iE-cJ.js → ConfirmDialog-CLUhzaBj.js} +2 -2
  133. package/dist/core/web/public/next/assets/{ConfirmDialog-_S9iE-cJ.js.map → ConfirmDialog-CLUhzaBj.js.map} +1 -1
  134. package/dist/core/web/public/next/assets/{DeleteChatDialog-KUYUygiA.js → DeleteChatDialog-C_eDhV8b.js} +2 -2
  135. package/dist/core/web/public/next/assets/{DeleteChatDialog-KUYUygiA.js.map → DeleteChatDialog-C_eDhV8b.js.map} +1 -1
  136. package/dist/core/web/public/next/assets/{Dialog-BuIaG6HF.js → Dialog-BRd_B9OE.js} +2 -2
  137. package/dist/core/web/public/next/assets/{Dialog-BuIaG6HF.js.map → Dialog-BRd_B9OE.js.map} +1 -1
  138. package/dist/core/web/public/next/assets/{DiffPane-De4IQt82.js → DiffPane-Cpr9soB2.js} +2 -2
  139. package/dist/core/web/public/next/assets/{DiffPane-De4IQt82.js.map → DiffPane-Cpr9soB2.js.map} +1 -1
  140. package/dist/core/web/public/next/assets/{DiffViewer-B75t6Ile.js → DiffViewer-CNwd0W3Q.js} +2 -2
  141. package/dist/core/web/public/next/assets/{DiffViewer-B75t6Ile.js.map → DiffViewer-CNwd0W3Q.js.map} +1 -1
  142. package/dist/core/web/public/next/assets/DockHost-BcEq2qaS.js +2 -0
  143. package/dist/core/web/public/next/assets/{DockHost-BPqyhtCP.js.map → DockHost-BcEq2qaS.js.map} +1 -1
  144. package/dist/core/web/public/next/assets/{EmptyState-DXkT4vhW.js → EmptyState-DsN1H6MC.js} +2 -2
  145. package/dist/core/web/public/next/assets/{EmptyState-DXkT4vhW.js.map → EmptyState-DsN1H6MC.js.map} +1 -1
  146. package/dist/core/web/public/next/assets/{Epistemic-CfqFe_aP.js → Epistemic-fycQTBRO.js} +2 -2
  147. package/dist/core/web/public/next/assets/{Epistemic-CfqFe_aP.js.map → Epistemic-fycQTBRO.js.map} +1 -1
  148. package/dist/core/web/public/next/assets/EvidenceTimeline-PBDAiSuG.css +1 -0
  149. package/dist/core/web/public/next/assets/EvidenceTimeline-sCCAdnBK.js +2 -0
  150. package/dist/core/web/public/next/assets/EvidenceTimeline-sCCAdnBK.js.map +1 -0
  151. package/dist/core/web/public/next/assets/{FleetSection-B7f-XBiX.js → FleetSection-BG8iGraG.js} +3 -3
  152. package/dist/core/web/public/next/assets/{FleetSection-B7f-XBiX.js.map → FleetSection-BG8iGraG.js.map} +1 -1
  153. package/dist/core/web/public/next/assets/{Funnel-pXYySwXQ.js → Funnel-B88_wpA4.js} +2 -2
  154. package/dist/core/web/public/next/assets/{Funnel-pXYySwXQ.js.map → Funnel-B88_wpA4.js.map} +1 -1
  155. package/dist/core/web/public/next/assets/{GearTray-gj6lT7ba.js → GearTray-CpDt0xwj.js} +2 -2
  156. package/dist/core/web/public/next/assets/{GearTray-gj6lT7ba.js.map → GearTray-CpDt0xwj.js.map} +1 -1
  157. package/dist/core/web/public/next/assets/{GrowthSection-D8e9m9Wy.js → GrowthSection-BvZezOsX.js} +2 -2
  158. package/dist/core/web/public/next/assets/{GrowthSection-D8e9m9Wy.js.map → GrowthSection-BvZezOsX.js.map} +1 -1
  159. package/dist/core/web/public/next/assets/{HandoffDialog-VfKxKhxF.js → HandoffDialog-B1G6gQyk.js} +2 -2
  160. package/dist/core/web/public/next/assets/{HandoffDialog-VfKxKhxF.js.map → HandoffDialog-B1G6gQyk.js.map} +1 -1
  161. package/dist/core/web/public/next/assets/{Input-u1YR_Ogl.js → Input-CI0yBHmn.js} +2 -2
  162. package/dist/core/web/public/next/assets/{Input-u1YR_Ogl.js.map → Input-CI0yBHmn.js.map} +1 -1
  163. package/dist/core/web/public/next/assets/{LeaderCard-BDELBrnx.js → LeaderCard-BxxiEg4e.js} +2 -2
  164. package/dist/core/web/public/next/assets/{LeaderCard-BDELBrnx.js.map → LeaderCard-BxxiEg4e.js.map} +1 -1
  165. package/dist/core/web/public/next/assets/{MatrixHeatmap-NKLF2srR.js → MatrixHeatmap-iPFEU2Tv.js} +2 -2
  166. package/dist/core/web/public/next/assets/{MatrixHeatmap-NKLF2srR.js.map → MatrixHeatmap-iPFEU2Tv.js.map} +1 -1
  167. package/dist/core/web/public/next/assets/McpSection-nuXer4K-.js +2 -0
  168. package/dist/core/web/public/next/assets/{McpSection-D1tDvlRa.js.map → McpSection-nuXer4K-.js.map} +1 -1
  169. package/dist/core/web/public/next/assets/{MessageMarkdown-DlfLEJxu.js → MessageMarkdown-BCe4TsXk.js} +3 -3
  170. package/dist/core/web/public/next/assets/{MessageMarkdown-DlfLEJxu.js.map → MessageMarkdown-BCe4TsXk.js.map} +1 -1
  171. package/dist/core/web/public/next/assets/{MessageMarkdownRenderer-BYZzI115.js → MessageMarkdownRenderer-DL3LU5kL.js} +2 -2
  172. package/dist/core/web/public/next/assets/{MessageMarkdownRenderer-BYZzI115.js.map → MessageMarkdownRenderer-DL3LU5kL.js.map} +1 -1
  173. package/dist/core/web/public/next/assets/{Meter-BSVhU43Q.js → Meter-b69LM0mU.js} +2 -2
  174. package/dist/core/web/public/next/assets/{Meter-BSVhU43Q.js.map → Meter-b69LM0mU.js.map} +1 -1
  175. package/dist/core/web/public/next/assets/{MindSection-lqV2e_Sq.js → MindSection-Dc5v5rH3.js} +2 -2
  176. package/dist/core/web/public/next/assets/{MindSection-lqV2e_Sq.js.map → MindSection-Dc5v5rH3.js.map} +1 -1
  177. package/dist/core/web/public/next/assets/{MutationTokenDialog-CLGP72g6.js → MutationTokenDialog-Bm34BNVV.js} +2 -2
  178. package/dist/core/web/public/next/assets/{MutationTokenDialog-CLGP72g6.js.map → MutationTokenDialog-Bm34BNVV.js.map} +1 -1
  179. package/dist/core/web/public/next/assets/NeedsYouDrawer-N1cWJjpz.js +3 -0
  180. package/dist/core/web/public/next/assets/NeedsYouDrawer-N1cWJjpz.js.map +1 -0
  181. package/dist/core/web/public/next/assets/NeedsYouList-CH6Mq-E_.css +1 -0
  182. package/dist/core/web/public/next/assets/NeedsYouList-D5Kk549g.js +2 -0
  183. package/dist/core/web/public/next/assets/{NeedsYouList-eBOlJr0b.js.map → NeedsYouList-D5Kk549g.js.map} +1 -1
  184. package/dist/core/web/public/next/assets/{NewChatDialog-DoYTH26M.js → NewChatDialog-BqFTWgHU.js} +2 -2
  185. package/dist/core/web/public/next/assets/{NewChatDialog-DoYTH26M.js.map → NewChatDialog-BqFTWgHU.js.map} +1 -1
  186. package/dist/core/web/public/next/assets/OnboardingFlow-DcDsguAM.js +3 -0
  187. package/dist/core/web/public/next/assets/OnboardingFlow-DcDsguAM.js.map +1 -0
  188. package/dist/core/web/public/next/assets/OnboardingGate-BZafM1Vf.js +3 -0
  189. package/dist/core/web/public/next/assets/{OnboardingGate-DrDEVBqw.js.map → OnboardingGate-BZafM1Vf.js.map} +1 -1
  190. package/dist/core/web/public/next/assets/{PreviewPane-ULN673zm.js → PreviewPane-zT3gK9TD.js} +2 -2
  191. package/dist/core/web/public/next/assets/{PreviewPane-ULN673zm.js.map → PreviewPane-zT3gK9TD.js.map} +1 -1
  192. package/dist/core/web/public/next/assets/{ProviderLogo-8WaUjTlN.js → ProviderLogo-AwHn2sKm.js} +2 -2
  193. package/dist/core/web/public/next/assets/{ProviderLogo-8WaUjTlN.js.map → ProviderLogo-AwHn2sKm.js.map} +1 -1
  194. package/dist/core/web/public/next/assets/{RailStatus-Ckw9nvYU.js → RailStatus-xHrovWvI.js} +2 -2
  195. package/dist/core/web/public/next/assets/{RailStatus-Ckw9nvYU.js.map → RailStatus-xHrovWvI.js.map} +1 -1
  196. package/dist/core/web/public/next/assets/{RefreshIndicator-DGubF4vR.js → RefreshIndicator-SEFZlMB2.js} +2 -2
  197. package/dist/core/web/public/next/assets/{RefreshIndicator-DGubF4vR.js.map → RefreshIndicator-SEFZlMB2.js.map} +1 -1
  198. package/dist/core/web/public/next/assets/{ResourcePoolConsoleApp-BahEaY4d.js → ResourcePoolConsoleApp-CAxPQ4sZ.js} +3 -3
  199. package/dist/core/web/public/next/assets/{ResourcePoolConsoleApp-BahEaY4d.js.map → ResourcePoolConsoleApp-CAxPQ4sZ.js.map} +1 -1
  200. package/dist/core/web/public/next/assets/ResourcesChrome-BnhnEdJe.js +3 -0
  201. package/dist/core/web/public/next/assets/{ResourcesChrome-C2ZrA7la.js.map → ResourcesChrome-BnhnEdJe.js.map} +1 -1
  202. package/dist/core/web/public/next/assets/{ResourcesDrawer-BC93fzwQ.js → ResourcesDrawer-BAFGodny.js} +2 -2
  203. package/dist/core/web/public/next/assets/{ResourcesDrawer-BC93fzwQ.js.map → ResourcesDrawer-BAFGodny.js.map} +1 -1
  204. package/dist/core/web/public/next/assets/{RouteErrorBoundary-BvhHNpE_.js → RouteErrorBoundary-C8WGiixc.js} +2 -2
  205. package/dist/core/web/public/next/assets/{RouteErrorBoundary-BvhHNpE_.js.map → RouteErrorBoundary-C8WGiixc.js.map} +1 -1
  206. package/dist/core/web/public/next/assets/{RunInCloudAction-Dywfnw0C.js → RunInCloudAction-1-IPLYhf.js} +2 -2
  207. package/dist/core/web/public/next/assets/{RunInCloudAction-Dywfnw0C.js.map → RunInCloudAction-1-IPLYhf.js.map} +1 -1
  208. package/dist/core/web/public/next/assets/{SeatSelector-CH7hTgwy.js → SeatSelector-DpwNiX8F.js} +2 -2
  209. package/dist/core/web/public/next/assets/{SeatSelector-CH7hTgwy.js.map → SeatSelector-DpwNiX8F.js.map} +1 -1
  210. package/dist/core/web/public/next/assets/{Segmented-Wynbg0F5.js → Segmented-Wt1ATod9.js} +2 -2
  211. package/dist/core/web/public/next/assets/{Segmented-Wynbg0F5.js.map → Segmented-Wt1ATod9.js.map} +1 -1
  212. package/dist/core/web/public/next/assets/{Select-DMyLCkId.js → Select-By-V9lMc.js} +2 -2
  213. package/dist/core/web/public/next/assets/{Select-DMyLCkId.js.map → Select-By-V9lMc.js.map} +1 -1
  214. package/dist/core/web/public/next/assets/{SessionGate-8RtQFWeZ.js → SessionGate-WROS02tK.js} +2 -2
  215. package/dist/core/web/public/next/assets/{SessionGate-8RtQFWeZ.js.map → SessionGate-WROS02tK.js.map} +1 -1
  216. package/dist/core/web/public/next/assets/{SessionInsightChip-zBJbKv2L.js → SessionInsightChip-DNUcruwp.js} +2 -2
  217. package/dist/core/web/public/next/assets/{SessionInsightChip-zBJbKv2L.js.map → SessionInsightChip-DNUcruwp.js.map} +1 -1
  218. package/dist/core/web/public/next/assets/{SessionSearch-DfJIcxxM.js → SessionSearch-UHtt7a8f.js} +2 -2
  219. package/dist/core/web/public/next/assets/{SessionSearch-DfJIcxxM.js.map → SessionSearch-UHtt7a8f.js.map} +1 -1
  220. package/dist/core/web/public/next/assets/{SettingsSection-Da9RYyH5.js → SettingsSection-Bf74l0Gj.js} +2 -2
  221. package/dist/core/web/public/next/assets/{SettingsSection-Da9RYyH5.js.map → SettingsSection-Bf74l0Gj.js.map} +1 -1
  222. package/dist/core/web/public/next/assets/SetupChecklist-BhZpFLsj.css +1 -0
  223. package/dist/core/web/public/next/assets/SetupChecklist-CzpEcfOl.js +2 -0
  224. package/dist/core/web/public/next/assets/SetupChecklist-CzpEcfOl.js.map +1 -0
  225. package/dist/core/web/public/next/assets/{Sheet-DhXyIDmq.js → Sheet-HkBOBMTT.js} +2 -2
  226. package/dist/core/web/public/next/assets/{Sheet-DhXyIDmq.js.map → Sheet-HkBOBMTT.js.map} +1 -1
  227. package/dist/core/web/public/next/assets/{ShortcutsOverlay-Bi5f-wUw.js → ShortcutsOverlay-DiigiT8H.js} +2 -2
  228. package/dist/core/web/public/next/assets/{ShortcutsOverlay-Bi5f-wUw.js.map → ShortcutsOverlay-DiigiT8H.js.map} +1 -1
  229. package/dist/core/web/public/next/assets/Sidebar-C9YtBYVZ.js +3 -0
  230. package/dist/core/web/public/next/assets/Sidebar-C9YtBYVZ.js.map +1 -0
  231. package/dist/core/web/public/next/assets/{Slider-Bd9YFWEV.js → Slider-DaEDws-b.js} +2 -2
  232. package/dist/core/web/public/next/assets/{Slider-Bd9YFWEV.js.map → Slider-DaEDws-b.js.map} +1 -1
  233. package/dist/core/web/public/next/assets/{StatTile-DScTd3c-.js → StatTile-CTX41O6y.js} +2 -2
  234. package/dist/core/web/public/next/assets/{StatTile-DScTd3c-.js.map → StatTile-CTX41O6y.js.map} +1 -1
  235. package/dist/core/web/public/next/assets/{StatusBadge-DQ1UtQAJ.js → StatusBadge-CXG3iNL4.js} +2 -2
  236. package/dist/core/web/public/next/assets/{StatusBadge-DQ1UtQAJ.js.map → StatusBadge-CXG3iNL4.js.map} +1 -1
  237. package/dist/core/web/public/next/assets/{StepBand-BB3IJxhr.js → StepBand-jJTqYIdX.js} +2 -2
  238. package/dist/core/web/public/next/assets/{StepBand-BB3IJxhr.js.map → StepBand-jJTqYIdX.js.map} +1 -1
  239. package/dist/core/web/public/next/assets/{Surface-DWMtQe3Q.js → Surface-5bNA08tK.js} +2 -2
  240. package/dist/core/web/public/next/assets/{Surface-DWMtQe3Q.js.map → Surface-5bNA08tK.js.map} +1 -1
  241. package/dist/core/web/public/next/assets/{Swimlane-DcENqtdp.js → Swimlane-LrslsGxw.js} +2 -2
  242. package/dist/core/web/public/next/assets/{Swimlane-DcENqtdp.js.map → Swimlane-LrslsGxw.js.map} +1 -1
  243. package/dist/core/web/public/next/assets/{Switch-CenChEYf.js → Switch-BmCzfFnu.js} +2 -2
  244. package/dist/core/web/public/next/assets/{Switch-CenChEYf.js.map → Switch-BmCzfFnu.js.map} +1 -1
  245. package/dist/core/web/public/next/assets/{Tag-D4k5E3u0.js → Tag-WSUIaMVy.js} +2 -2
  246. package/dist/core/web/public/next/assets/{Tag-D4k5E3u0.js.map → Tag-WSUIaMVy.js.map} +1 -1
  247. package/dist/core/web/public/next/assets/{TerminalPane-DCQTukcE.js → TerminalPane-BVFgYX6K.js} +5 -5
  248. package/dist/core/web/public/next/assets/{TerminalPane-DCQTukcE.js.map → TerminalPane-BVFgYX6K.js.map} +1 -1
  249. package/dist/core/web/public/next/assets/{UniverseConsoleApp-DsuWT0pi.js → UniverseConsoleApp-BpphLqoz.js} +2 -2
  250. package/dist/core/web/public/next/assets/{UniverseConsoleApp-DsuWT0pi.js.map → UniverseConsoleApp-BpphLqoz.js.map} +1 -1
  251. package/dist/core/web/public/next/assets/{UniverseView-DyI5ApsA.js → UniverseView-DbpbSMwO.js} +4 -4
  252. package/dist/core/web/public/next/assets/{UniverseView-DyI5ApsA.js.map → UniverseView-DbpbSMwO.js.map} +1 -1
  253. package/dist/core/web/public/next/assets/{UsageSection-Imr28nwK.js → UsageSection-CUlaKtws.js} +3 -3
  254. package/dist/core/web/public/next/assets/{UsageSection-Imr28nwK.js.map → UsageSection-CUlaKtws.js.map} +1 -1
  255. package/dist/core/web/public/next/assets/VerseConsoleApp-DXDv1aOi.js +3 -0
  256. package/dist/core/web/public/next/assets/VerseConsoleApp-DXDv1aOi.js.map +1 -0
  257. package/dist/core/web/public/next/assets/{Workspace-CpxBO98E.js → Workspace-RXy0pqp6.js} +5 -5
  258. package/dist/core/web/public/next/assets/{Workspace-CpxBO98E.js.map → Workspace-RXy0pqp6.js.map} +1 -1
  259. package/dist/core/web/public/next/assets/{actions-DE8NoWV_.js → actions-BZTidCXZ.js} +2 -2
  260. package/dist/core/web/public/next/assets/{actions-DE8NoWV_.js.map → actions-BZTidCXZ.js.map} +1 -1
  261. package/dist/core/web/public/next/assets/{apps-model-CFGCUu9p.js → apps-model-CHO133qt.js} +2 -2
  262. package/dist/core/web/public/next/assets/{apps-model-CFGCUu9p.js.map → apps-model-CHO133qt.js.map} +1 -1
  263. package/dist/core/web/public/next/assets/{authority-model-CmnfJzmM.js → authority-model-8NeAEwAF.js} +2 -2
  264. package/dist/core/web/public/next/assets/{authority-model-CmnfJzmM.js.map → authority-model-8NeAEwAF.js.map} +1 -1
  265. package/dist/core/web/public/next/assets/{budget-queries-DjrPRFwl.js → budget-queries-DFF-3ICg.js} +2 -2
  266. package/dist/core/web/public/next/assets/{budget-queries-DjrPRFwl.js.map → budget-queries-DFF-3ICg.js.map} +1 -1
  267. package/dist/core/web/public/next/assets/{capacity-strip-model-C7cdQnuK.js → capacity-strip-model-5ViUgUlP.js} +2 -2
  268. package/dist/core/web/public/next/assets/{capacity-strip-model-C7cdQnuK.js.map → capacity-strip-model-5ViUgUlP.js.map} +1 -1
  269. package/dist/core/web/public/next/assets/{charts-DUD_jprE.js → charts-CzxWrZn7.js} +2 -2
  270. package/dist/core/web/public/next/assets/{charts-DUD_jprE.js.map → charts-CzxWrZn7.js.map} +1 -1
  271. package/dist/core/web/public/next/assets/cloud-model-CfRydq8N.js +2 -0
  272. package/dist/core/web/public/next/assets/{cloud-model-DoxBMDvx.js.map → cloud-model-CfRydq8N.js.map} +1 -1
  273. package/dist/core/web/public/next/assets/{cloud-queries-CTGvO-k-.js → cloud-queries-DmptbjS8.js} +2 -2
  274. package/dist/core/web/public/next/assets/{cloud-queries-CTGvO-k-.js.map → cloud-queries-DmptbjS8.js.map} +1 -1
  275. package/dist/core/web/public/next/assets/{command-catalog-CmrHNFzh.js → command-catalog-ffCAijVY.js} +2 -2
  276. package/dist/core/web/public/next/assets/{command-catalog-CmrHNFzh.js.map → command-catalog-ffCAijVY.js.map} +1 -1
  277. package/dist/core/web/public/next/assets/{context-model-2Owp2jYF.js → context-model-Bb15chFt.js} +2 -2
  278. package/dist/core/web/public/next/assets/{context-model-2Owp2jYF.js.map → context-model-Bb15chFt.js.map} +1 -1
  279. package/dist/core/web/public/next/assets/{context-model-9xywbXxX.js → context-model-CDeyP0cA.js} +2 -2
  280. package/dist/core/web/public/next/assets/{context-model-9xywbXxX.js.map → context-model-CDeyP0cA.js.map} +1 -1
  281. package/dist/core/web/public/next/assets/{context-queries-wvcRnV-I.js → context-queries-_9bFWb9v.js} +2 -2
  282. package/dist/core/web/public/next/assets/{context-queries-wvcRnV-I.js.map → context-queries-_9bFWb9v.js.map} +1 -1
  283. package/dist/core/web/public/next/assets/{control-queries-DB6Kh7UN.js → control-queries-CXtmZZH6.js} +2 -2
  284. package/dist/core/web/public/next/assets/{control-queries-DB6Kh7UN.js.map → control-queries-CXtmZZH6.js.map} +1 -1
  285. package/dist/core/web/public/next/assets/copy-setup-BIp0iaiZ.js +2 -0
  286. package/dist/core/web/public/next/assets/copy-setup-BIp0iaiZ.js.map +1 -0
  287. package/dist/core/web/public/next/assets/{dock-icons-BBUGl4tE.js → dock-icons-Cc43W7r4.js} +2 -2
  288. package/dist/core/web/public/next/assets/{dock-icons-BBUGl4tE.js.map → dock-icons-Cc43W7r4.js.map} +1 -1
  289. package/dist/core/web/public/next/assets/{fleet-model-BRfRWkZl.js → fleet-model-DOK8ZtEt.js} +2 -2
  290. package/dist/core/web/public/next/assets/{fleet-model-BRfRWkZl.js.map → fleet-model-DOK8ZtEt.js.map} +1 -1
  291. package/dist/core/web/public/next/assets/{fleet-queries-tU6UEXN2.js → fleet-queries-BeEAqD6y.js} +2 -2
  292. package/dist/core/web/public/next/assets/{fleet-queries-tU6UEXN2.js.map → fleet-queries-BeEAqD6y.js.map} +1 -1
  293. package/dist/core/web/public/next/assets/{focus-trap-BGOceFvj.js → focus-trap-ChZ5EFfM.js} +2 -2
  294. package/dist/core/web/public/next/assets/{focus-trap-BGOceFvj.js.map → focus-trap-ChZ5EFfM.js.map} +1 -1
  295. package/dist/core/web/public/next/assets/format-BmH2yWL6.js +2 -0
  296. package/dist/core/web/public/next/assets/format-BmH2yWL6.js.map +1 -0
  297. package/dist/core/web/public/next/assets/{git-model-53iRLInY.js → git-model-BFwAVbxF.js} +2 -2
  298. package/dist/core/web/public/next/assets/{git-model-53iRLInY.js.map → git-model-BFwAVbxF.js.map} +1 -1
  299. package/dist/core/web/public/next/assets/global-y_exIyAP.js +2 -0
  300. package/dist/core/web/public/next/assets/{global-CXHHMz9o.js.map → global-y_exIyAP.js.map} +1 -1
  301. package/dist/core/web/public/next/assets/{guarded-runners-B8zFVBVZ.js → guarded-runners-Cd4POBtI.js} +2 -2
  302. package/dist/core/web/public/next/assets/{guarded-runners-B8zFVBVZ.js.map → guarded-runners-Cd4POBtI.js.map} +1 -1
  303. package/dist/core/web/public/next/assets/{icons-D4s-jlxX.js → icons-CygCEFWs.js} +2 -2
  304. package/dist/core/web/public/next/assets/{icons-D4s-jlxX.js.map → icons-CygCEFWs.js.map} +1 -1
  305. package/dist/core/web/public/next/assets/{index-BG177cPN.js → index-CyK31YRm.js} +3 -3
  306. package/dist/core/web/public/next/assets/{index-BG177cPN.js.map → index-CyK31YRm.js.map} +1 -1
  307. package/dist/core/web/public/next/assets/{live-model-CEf01wrW.js → live-model-D7hilYFk.js} +2 -2
  308. package/dist/core/web/public/next/assets/live-model-D7hilYFk.js.map +1 -0
  309. package/dist/core/web/public/next/assets/{mind.module-D_xk6HIQ.js → mind.module-B15k0Y9q.js} +2 -2
  310. package/dist/core/web/public/next/assets/{mind.module-D_xk6HIQ.js.map → mind.module-B15k0Y9q.js.map} +1 -1
  311. package/dist/core/web/public/next/assets/mutations-CWlxEMEm.js +2 -0
  312. package/dist/core/web/public/next/assets/{mutations-CbTSofVH.js.map → mutations-CWlxEMEm.js.map} +1 -1
  313. package/dist/core/web/public/next/assets/{nav-CmZcbPFJ.js → nav-mimleI0R.js} +2 -2
  314. package/dist/core/web/public/next/assets/{nav-CmZcbPFJ.js.map → nav-mimleI0R.js.map} +1 -1
  315. package/dist/core/web/public/next/assets/{overnight-queries-CR0b_j-V.js → overnight-queries-DJ4mZKSj.js} +2 -2
  316. package/dist/core/web/public/next/assets/{overnight-queries-CR0b_j-V.js.map → overnight-queries-DJ4mZKSj.js.map} +1 -1
  317. package/dist/core/web/public/next/assets/primitives-DMijqcu0.js +1 -0
  318. package/dist/core/web/public/next/assets/{queries-rvRsAGW2.js → queries-Bw1McHTj.js} +2 -2
  319. package/dist/core/web/public/next/assets/{queries-rvRsAGW2.js.map → queries-Bw1McHTj.js.map} +1 -1
  320. package/dist/core/web/public/next/assets/{reasoning-pref-DMPQkujg.js → reasoning-pref-KkhI_5-j.js} +2 -2
  321. package/dist/core/web/public/next/assets/{reasoning-pref-DMPQkujg.js.map → reasoning-pref-KkhI_5-j.js.map} +1 -1
  322. package/dist/core/web/public/next/assets/{reveal-anchor-BKk2wZZZ.js → reveal-anchor-CCCx_kfT.js} +2 -2
  323. package/dist/core/web/public/next/assets/{reveal-anchor-BKk2wZZZ.js.map → reveal-anchor-CCCx_kfT.js.map} +1 -1
  324. package/dist/core/web/public/next/assets/{seat-subscription-CLn2ReSZ.js → seat-subscription-BhUUz7VL.js} +2 -2
  325. package/dist/core/web/public/next/assets/{seat-subscription-CLn2ReSZ.js.map → seat-subscription-BhUUz7VL.js.map} +1 -1
  326. package/dist/core/web/public/next/assets/{sidebar-model-CjQLvdag.js → sidebar-model-Dcd437cf.js} +2 -2
  327. package/dist/core/web/public/next/assets/{sidebar-model-CjQLvdag.js.map → sidebar-model-Dcd437cf.js.map} +1 -1
  328. package/dist/core/web/public/next/assets/{slots-DRxNosZg.js → slots-BL_J5mmV.js} +3 -3
  329. package/dist/core/web/public/next/assets/{slots-DRxNosZg.js.map → slots-BL_J5mmV.js.map} +1 -1
  330. package/dist/core/web/public/next/assets/{surface-data-DshUC_TU.js → surface-data-C3UAQ4QX.js} +2 -2
  331. package/dist/core/web/public/next/assets/{surface-data-DshUC_TU.js.map → surface-data-C3UAQ4QX.js.map} +1 -1
  332. package/dist/core/web/public/next/assets/surface-prefetch-BXKjPsV5.js +2 -0
  333. package/dist/core/web/public/next/assets/{surface-prefetch-DO8r4ttQ.js.map → surface-prefetch-BXKjPsV5.js.map} +1 -1
  334. package/dist/core/web/public/next/assets/{tasks-model-BKPFZAmZ.js → tasks-model-CzHvclVm.js} +2 -2
  335. package/dist/core/web/public/next/assets/{tasks-model-BKPFZAmZ.js.map → tasks-model-CzHvclVm.js.map} +1 -1
  336. package/dist/core/web/public/next/assets/{terminal-icons-DoeQkP3y.js → terminal-icons-BwgQTQP0.js} +2 -2
  337. package/dist/core/web/public/next/assets/{terminal-icons-DoeQkP3y.js.map → terminal-icons-BwgQTQP0.js.map} +1 -1
  338. package/dist/core/web/public/next/assets/types-IYKrYLku.js +2 -0
  339. package/dist/core/web/public/next/assets/types-IYKrYLku.js.map +1 -0
  340. package/dist/core/web/public/next/assets/{usage-queries-MnUeYzwp.js → usage-queries-pXxvy54x.js} +2 -2
  341. package/dist/core/web/public/next/assets/{usage-queries-MnUeYzwp.js.map → usage-queries-pXxvy54x.js.map} +1 -1
  342. package/dist/core/web/public/next/assets/{use-guarded-action-P12MfNwU.js → use-guarded-action-EgVWjM5c.js} +2 -2
  343. package/dist/core/web/public/next/assets/{use-guarded-action-P12MfNwU.js.map → use-guarded-action-EgVWjM5c.js.map} +1 -1
  344. package/dist/core/web/public/next/assets/{use-ticker-DIvAZ4Ey.js → use-ticker-BoqFxRFG.js} +2 -2
  345. package/dist/core/web/public/next/assets/{use-ticker-DIvAZ4Ey.js.map → use-ticker-BoqFxRFG.js.map} +1 -1
  346. package/dist/core/web/public/next/assets/{use-token-gate-DfEja7Wr.js → use-token-gate-DSNIIpI6.js} +2 -2
  347. package/dist/core/web/public/next/assets/{use-token-gate-DfEja7Wr.js.map → use-token-gate-DSNIIpI6.js.map} +1 -1
  348. package/dist/core/web/public/next/assets/{useOnboarding-CkOHadqC.js → useOnboarding-Bk0VnkxQ.js} +2 -2
  349. package/dist/core/web/public/next/assets/{useOnboarding-CkOHadqC.js.map → useOnboarding-Bk0VnkxQ.js.map} +1 -1
  350. package/dist/core/web/public/next/assets/{useSeatsRefresh-BDlbDlIU.js → useSeatsRefresh-q7Id9RcW.js} +2 -2
  351. package/dist/core/web/public/next/assets/{useSeatsRefresh-BDlbDlIU.js.map → useSeatsRefresh-q7Id9RcW.js.map} +1 -1
  352. package/dist/core/web/public/next/assets/{useVerseTranscript-BGtA55k2.js → useVerseTranscript-CqH51rt9.js} +2 -2
  353. package/dist/core/web/public/next/assets/{useVerseTranscript-BGtA55k2.js.map → useVerseTranscript-CqH51rt9.js.map} +1 -1
  354. package/dist/core/web/public/next/assets/{verse-icons-wOet9JZy.js → verse-icons-DsG1dOQx.js} +2 -2
  355. package/dist/core/web/public/next/assets/{verse-icons-wOet9JZy.js.map → verse-icons-DsG1dOQx.js.map} +1 -1
  356. package/dist/core/web/public/next/assets/{verse-model-CSzzdyu2.js → verse-model-JTuvRBVK.js} +2 -2
  357. package/dist/core/web/public/next/assets/{verse-model-CSzzdyu2.js.map → verse-model-JTuvRBVK.js.map} +1 -1
  358. package/dist/core/web/public/next/assets/{warmup-CecO_Nk0.js → warmup-Bv1RumVq.js} +3 -3
  359. package/dist/core/web/public/next/assets/{warmup-CecO_Nk0.js.map → warmup-Bv1RumVq.js.map} +1 -1
  360. package/dist/core/web/public/next/assets/why-seat-model-Cau8qG6O.js +2 -0
  361. package/dist/core/web/public/next/assets/why-seat-model-Cau8qG6O.js.map +1 -0
  362. package/dist/core/web/public/next/assets/{workspace-model-BdIVybKr.js → workspace-model-D-SLfads.js} +2 -2
  363. package/dist/core/web/public/next/assets/{workspace-model-BdIVybKr.js.map → workspace-model-D-SLfads.js.map} +1 -1
  364. package/dist/core/web/public/next/index.html +1 -1
  365. package/dist/release-dependency-inventory.json +1 -1
  366. package/docs/AUTONOMY-GAP.md +1 -1
  367. package/package.json +1 -1
  368. package/dist/core/web/public/next/assets/Advanced-CxzE6ekM.js +0 -2
  369. package/dist/core/web/public/next/assets/App-DFlp-vdv.js +0 -7
  370. package/dist/core/web/public/next/assets/AppsSection-Ct2O605-.js +0 -2
  371. package/dist/core/web/public/next/assets/AutonomyOffState-CXhXpsim.js +0 -2
  372. package/dist/core/web/public/next/assets/AutonomyOffState-CXhXpsim.js.map +0 -1
  373. package/dist/core/web/public/next/assets/AutonomyOffState-DmbE71vI.css +0 -1
  374. package/dist/core/web/public/next/assets/AutonomySection-BTg7yVa1.js +0 -2
  375. package/dist/core/web/public/next/assets/BudgetControl-ng6swoZp.js +0 -2
  376. package/dist/core/web/public/next/assets/BudgetControl-ng6swoZp.js.map +0 -1
  377. package/dist/core/web/public/next/assets/ChatSection-Bisj9R6E.js +0 -3
  378. package/dist/core/web/public/next/assets/ChatSection-Bisj9R6E.js.map +0 -1
  379. package/dist/core/web/public/next/assets/CommandSection-D8ZihzvE.js +0 -2
  380. package/dist/core/web/public/next/assets/CommandSection-D8ZihzvE.js.map +0 -1
  381. package/dist/core/web/public/next/assets/DockHost-BPqyhtCP.js +0 -2
  382. package/dist/core/web/public/next/assets/McpSection-D1tDvlRa.js +0 -2
  383. package/dist/core/web/public/next/assets/NeedsYouDrawer-D992XTOn.js +0 -2
  384. package/dist/core/web/public/next/assets/NeedsYouDrawer-D992XTOn.js.map +0 -1
  385. package/dist/core/web/public/next/assets/NeedsYouList-CruOt4JT.css +0 -1
  386. package/dist/core/web/public/next/assets/NeedsYouList-eBOlJr0b.js +0 -2
  387. package/dist/core/web/public/next/assets/OnboardingFlow-D3yfITK1.js +0 -2
  388. package/dist/core/web/public/next/assets/OnboardingFlow-D3yfITK1.js.map +0 -1
  389. package/dist/core/web/public/next/assets/OnboardingGate-DrDEVBqw.js +0 -3
  390. package/dist/core/web/public/next/assets/ResourcesChrome-C2ZrA7la.js +0 -3
  391. package/dist/core/web/public/next/assets/Sidebar-BuO3sViG.js +0 -3
  392. package/dist/core/web/public/next/assets/Sidebar-BuO3sViG.js.map +0 -1
  393. package/dist/core/web/public/next/assets/VerseConsoleApp-DeuBEvAO.js +0 -3
  394. package/dist/core/web/public/next/assets/VerseConsoleApp-DeuBEvAO.js.map +0 -1
  395. package/dist/core/web/public/next/assets/cloud-model-DoxBMDvx.js +0 -2
  396. package/dist/core/web/public/next/assets/copy-setup-CJQhFl-4.js +0 -2
  397. package/dist/core/web/public/next/assets/copy-setup-CJQhFl-4.js.map +0 -1
  398. package/dist/core/web/public/next/assets/format-DEAaVF6X.js +0 -2
  399. package/dist/core/web/public/next/assets/format-DEAaVF6X.js.map +0 -1
  400. package/dist/core/web/public/next/assets/global-CXHHMz9o.js +0 -2
  401. package/dist/core/web/public/next/assets/live-model-CEf01wrW.js.map +0 -1
  402. package/dist/core/web/public/next/assets/mutations-CbTSofVH.js +0 -2
  403. package/dist/core/web/public/next/assets/primitives-DNI-uJBd.js +0 -1
  404. package/dist/core/web/public/next/assets/surface-prefetch-DO8r4ttQ.js +0 -2
  405. package/dist/core/web/public/next/assets/types-D5XOdyw8.js +0 -2
  406. package/dist/core/web/public/next/assets/types-D5XOdyw8.js.map +0 -1
  407. package/dist/core/web/public/next/assets/why-seat-model-D68ZA7G8.js +0 -2
  408. package/dist/core/web/public/next/assets/why-seat-model-D68ZA7G8.js.map +0 -1
@@ -0,0 +1,7 @@
1
+ import{a as e,c as t,i as n,n as r,t as i}from"./index-CyK31YRm.js";import{A as a,H as o,O as s,_ as c,a as l,f as u,h as d,i as f,k as p,m,o as h,p as g,q as _,r as v,s as y,t as b,x}from"./global-y_exIyAP.js";import{t as S}from"./Dialog-BRd_B9OE.js";import{n as C,r as w,t as T}from"./Epistemic-fycQTBRO.js";import{n as E,r as ee,t as D}from"./StatusBadge-CXG3iNL4.js";import{C as te,_ as ne,a as O,b as re,c as ie,d as ae,f as oe,g as se,h as ce,i as le,l as k,m as ue,n as de,o as fe,p as pe,r as me,s as he,t as ge,u as _e,v as ve,y as ye}from"./queries-Bw1McHTj.js";import{i as be,n as xe,r as Se,t as Ce}from"./mutations-CWlxEMEm.js";import{t as we}from"./MutationTokenDialog-Bm34BNVV.js";import{t as Te}from"./ConfirmDialog-CLUhzaBj.js";import{n as Ee,r as De,t as Oe}from"./RouteErrorBoundary-C8WGiixc.js";import{r as ke,t as Ae}from"./UniverseView-DbpbSMwO.js";import{t as A}from"./RefreshIndicator-SEFZlMB2.js";import{c as je}from"./ChartFrame-DK_BDXCt.js";import{a as Me,n as Ne,r as Pe}from"./charts-CzxWrZn7.js";import{n as Fe,r as Ie,s as Le,t as Re}from"./format-DKrNjdwD.js";import{t as j}from"./StatTile-CTX41O6y.js";import{t as ze}from"./calendar-day-BxBYHfX1.js";import{t as Be}from"./DiffViewer-CNwd0W3Q.js";import{SessionGate as Ve}from"./SessionGate-WROS02tK.js";var M=t(e(),1),He=/^(?:[a-z][a-z0-9+.-]*:|[\\/]{2})/i,Ue=/^[\\/]{2}/;function We(e,t){return t+e.replace(/\\/g,`/`)}var Ge=`popstate`;function Ke(e){return typeof e==`object`&&!!e&&`pathname`in e&&`search`in e&&`hash`in e&&`state`in e&&`key`in e}function qe(e={}){function t(e,t){let{pathname:n=`/`,search:r=``,hash:i=``}=$e(e.location.hash.substring(1));return!n.startsWith(`/`)&&!n.startsWith(`.`)&&(n=`/`+n),Ze(``,{pathname:n,search:r,hash:i},t.state&&t.state.usr||null,t.state&&t.state.key||`default`)}function n(e,t){let n=e.document.querySelector(`base`),r=``;if(n&&n.getAttribute(`href`)){let t=e.location.href,n=t.indexOf(`#`);r=n===-1?t:t.slice(0,n)}return r+`#`+(typeof t==`string`?t:Qe(t))}function r(e,t){Je(e.pathname.charAt(0)===`/`,`relative pathnames are not supported in hash history.push(${JSON.stringify(t)})`)}return et(t,n,r,e)}function N(e,t){if(e===!1||e==null)throw Error(t)}function Je(e,t){if(!e){typeof console<`u`&&console.warn(t);try{throw Error(t)}catch{}}}function Ye(){return Math.random().toString(36).substring(2,10)}function Xe(e,t){return{usr:e.state,key:e.key,idx:t,masked:e.mask?{pathname:e.pathname,search:e.search,hash:e.hash}:void 0}}function Ze(e,t,n=null,r,i){return{pathname:typeof e==`string`?e:e.pathname,search:``,hash:``,...typeof t==`string`?$e(t):t,state:n,key:t&&t.key||r||Ye(),mask:i}}function Qe({pathname:e=`/`,search:t=``,hash:n=``}){return t&&t!==`?`&&(e+=t.charAt(0)===`?`?t:`?`+t),n&&n!==`#`&&(e+=n.charAt(0)===`#`?n:`#`+n),e}function $e(e){let t={};if(e){let n=e.indexOf(`#`);n>=0&&(t.hash=e.substring(n),e=e.substring(0,n));let r=e.indexOf(`?`);r>=0&&(t.search=e.substring(r),e=e.substring(0,r)),e&&(t.pathname=e)}return t}function et(e,t,n,r={}){let{window:i=document.defaultView,v5Compat:a=!1}=r,o=i.history,s=`POP`,c=null,l=u();l??(l=0,o.replaceState({...o.state,idx:l},``));function u(){return(o.state||{idx:null}).idx}function d(){s=`POP`;let e=u(),t=e==null?null:e-l;l=e,c&&c({action:s,location:h.location,delta:t})}function f(e,t){s=`PUSH`;let r=Ke(e)?e:Ze(h.location,e,t);n&&n(r,e),l=u()+1;let d=Xe(r,l),f=h.createHref(r.mask||r);try{o.pushState(d,``,f)}catch(e){if(e instanceof DOMException&&e.name===`DataCloneError`)throw e;i.location.assign(f)}a&&c&&c({action:s,location:h.location,delta:1})}function p(e,t){s=`REPLACE`;let r=Ke(e)?e:Ze(h.location,e,t);n&&n(r,e),l=u();let i=Xe(r,l),d=h.createHref(r.mask||r);o.replaceState(i,``,d),a&&c&&c({action:s,location:h.location,delta:0})}function m(e){return tt(i,e)}let h={get action(){return s},get location(){return e(i,o)},listen(e){if(c)throw Error(`A history only accepts one active listener`);return i.addEventListener(Ge,d),c=e,()=>{i.removeEventListener(Ge,d),c=null}},createHref(e){return t(i,e)},createURL:m,encodeLocation(e){let t=m(e);return{pathname:t.pathname,search:t.search,hash:t.hash}},push:f,replace:p,go(e){return o.go(e)}};return h}function tt(e,t,n=!1){let r=`http://localhost`;e&&(r=e.location.origin===`null`?e.location.href:e.location.origin),N(r,`No window.location.(origin|href) available to create URL`);let i=typeof t==`string`?t:Qe(t);return i=i.replace(/ $/,`%20`),!n&&Ue.test(i)&&(i=r+i),new URL(i,r)}function nt(e,t,n=`/`){return rt(e,t,n,!1)}function rt(e,t,n,r,i){let a=St((typeof t==`string`?$e(t):t).pathname||`/`,n);if(a==null)return null;let o=i??it(e),s=null,c=xt(a);for(let e=0;s==null&&e<o.length;++e)s=_t(o[e],c,r);return s}function it(e){let t=at(e);return st(t),t}function at(e,t=[],n=[],r=``,i=!1){let a=(e,a,o=i,s)=>{let c={relativePath:s===void 0?e.path||``:s,caseSensitive:e.caseSensitive===!0,childrenIndex:a,route:e};if(c.relativePath.startsWith(`/`)){if(!c.relativePath.startsWith(r)&&o)return;N(c.relativePath.startsWith(r),`Absolute route path "${c.relativePath}" nested under path "${r}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),c.relativePath=c.relativePath.slice(r.length)}let l=At([r,c.relativePath]),u=n.concat(c);e.children&&e.children.length>0&&(N(e.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${l}".`),at(e.children,t,u,l,o)),(e.path!=null||e.index)&&t.push({path:l,score:ht(l,e.index),routesMeta:u.map((e,t)=>{let[n,r]=bt(e.relativePath,e.caseSensitive,t===u.length-1);return{...e,matcher:n,compiledParams:r}})})};return e.forEach((e,t)=>{if(e.path===``||!e.path?.includes(`?`))a(e,t);else for(let n of ot(e.path))a(e,t,!0,n)}),t}function ot(e){let t=e.split(`/`);if(t.length===0)return[];let[n,...r]=t,i=n.endsWith(`?`),a=n.replace(/\?$/,``);if(r.length===0)return i?[a,``]:[a];let o=ot(r.join(`/`)),s=[];return s.push(...o.map(e=>e===``?a:[a,e].join(`/`))),i&&s.push(...o),s.map(t=>e.startsWith(`/`)&&t===``?`/`:t)}function st(e){e.sort((e,t)=>e.score===t.score?gt(e.routesMeta.map(e=>e.childrenIndex),t.routesMeta.map(e=>e.childrenIndex)):t.score-e.score)}var ct=/^:[\w-]+$/,lt=3,ut=2,dt=1,ft=10,pt=-2,mt=e=>e===`*`;function ht(e,t){let n=e.split(`/`),r=n.length;return n.some(mt)&&(r+=pt),t&&(r+=ut),n.filter(e=>!mt(e)).reduce((e,t)=>e+(ct.test(t)?lt:t===``?dt:ft),r)}function gt(e,t){return e.length===t.length&&e.slice(0,-1).every((e,n)=>e===t[n])?e[e.length-1]-t[t.length-1]:0}function _t(e,t,n=!1){let{routesMeta:r}=e,i={},a=`/`,o=[];for(let e=0;e<r.length;++e){let s=r[e],c=e===r.length-1,l=a===`/`?t:t.slice(a.length)||`/`,u={path:s.relativePath,caseSensitive:s.caseSensitive,end:c},d=s.matcher&&s.compiledParams?yt(u,l,s.matcher,s.compiledParams):vt(u,l),f=s.route;if(!d&&c&&n&&!r[r.length-1].route.index&&(d=vt({path:s.relativePath,caseSensitive:s.caseSensitive,end:!1},l)),!d)return null;Object.assign(i,d.params),o.push({params:i,pathname:At([a,d.pathname]),pathnameBase:Mt(At([a,d.pathnameBase])),route:f}),d.pathnameBase!==`/`&&(a=At([a,d.pathnameBase]))}return o}function vt(e,t){typeof e==`string`&&(e={path:e,caseSensitive:!1,end:!0});let[n,r]=bt(e.path,e.caseSensitive,e.end);return yt(e,t,n,r)}function yt(e,t,n,r){let i=t.match(n);if(!i)return null;let a=i[0],o=jt(a,1),s=i.slice(1);return{params:r.reduce((e,{paramName:t,isOptional:n},r)=>{if(t===`*`){let e=s[r]||``;o=jt(a.slice(0,a.length-e.length),1)}let i=s[r];return e[t]=n&&!i?void 0:(i||``).replace(/%2F/g,`/`),e},{}),pathname:a,pathnameBase:o,pattern:e}}function bt(e,t=!1,n=!0){Je(e===`*`||!e.endsWith(`*`)||e.endsWith(`/*`),`Route path "${e}" will be treated as if it were "${e.replace(/\*$/,`/*`)}" because the \`*\` character must always follow a \`/\` in the pattern. To get rid of this warning, please change the route path to "${e.replace(/\*$/,`/*`)}".`);let r=[],i=`^`+e.replace(/\/*\*?$/,``).replace(/^\/*/,`/`).replace(/[\\.*+^${}|()[\]]/g,`\\$&`).replace(/\/:([\w-]+)(\?)?/g,(e,t,n,i,a)=>{if(r.push({paramName:t,isOptional:n!=null}),n){let t=a.charAt(i+e.length);return t&&t!==`/`?`/([^\\/]*)`:`(?:/([^\\/]*))?`}return`/([^\\/]+)`}).replace(/\/([\w-]+)\?(\/|$)/g,`(/$1)?$2`);return e.endsWith(`*`)?(r.push({paramName:`*`}),i+=e===`*`||e===`/*`?`(.*)$`:`(?:\\/(.+)|\\/*)$`):n?i+=`\\/*$`:e!==``&&e!==`/`&&(i+=`(?:(?=\\/|$))`),[new RegExp(i,t?void 0:`i`),r]}function xt(e){try{return e.split(`/`).map(e=>decodeURIComponent(e).replace(/\//g,`%2F`)).join(`/`)}catch(t){return Je(!1,`The URL path "${e}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${t}).`),e}}function St(e,t){if(t===`/`)return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let n=t.endsWith(`/`)?t.length-1:t.length,r=e.charAt(n);return r&&r!==`/`?null:e.slice(n)||`/`}function Ct(e,t=`/`){let{pathname:n,search:r=``,hash:i=``}=typeof e==`string`?$e(e):e,a;return n?(n=kt(n),a=n.startsWith(`/`)||n.startsWith(`\\`)?wt(n.substring(1),`/`):wt(n,t)):a=t,{pathname:a,search:Nt(r),hash:Pt(i)}}function wt(e,t){let n=jt(t).split(`/`);return e.split(`/`).forEach(e=>{e===`..`?n.length>1&&n.pop():e!==`.`&&n.push(e)}),n.length>1?n.join(`/`):`/`}function Tt(e,t,n,r){return`Cannot include a '${e}' character in a manually specified \`to.${t}\` field [${JSON.stringify(r)}]. Please separate it out to the \`to.${n}\` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.`}function Et(e){return e.filter((e,t)=>t===0||e.route.path&&e.route.path.length>0)}function Dt(e){let t=Et(e);return t.map((e,n)=>n===t.length-1?e.pathname:e.pathnameBase)}function Ot(e,t,n,r=!1){let i;typeof e==`string`?i=$e(e):(i={...e},N(!i.pathname||!i.pathname.includes(`?`),Tt(`?`,`pathname`,`search`,i)),N(!i.pathname||!i.pathname.includes(`#`),Tt(`#`,`pathname`,`hash`,i)),N(!i.search||!i.search.includes(`#`),Tt(`#`,`search`,`hash`,i)));let a=e===``||i.pathname===``,o=a?`/`:i.pathname,s;if(o==null)s=n;else{let e=t.length-1;if(!r&&o.startsWith(`..`)){let t=o.split(`/`);for(;t[0]===`..`;)t.shift(),--e;i.pathname=t.join(`/`)}s=e>=0?t[e]:`/`}let c=Ct(i,s),l=o&&o!==`/`&&o.endsWith(`/`),u=(a||o===`.`)&&n.endsWith(`/`);return!c.pathname.endsWith(`/`)&&(l||u)&&(c.pathname+=`/`),c}var kt=e=>e.replace(/[\\/]{2,}/g,`/`),At=e=>kt(e.join(`/`));function jt(e,t=0){let n=e.length;for(;n>t&&e.charCodeAt(n-1)===47;)n--;return n===e.length?e:e.slice(0,n)}var Mt=e=>jt(e).replace(/^\/*/,`/`),Nt=e=>!e||e===`?`?``:e.startsWith(`?`)?e:`?`+e,Pt=e=>!e||e===`#`?``:e.startsWith(`#`)?e:`#`+e,Ft=class{constructor(e,t,n,r=!1){this.status=e,this.statusText=t||``,this.internal=r,n instanceof Error?(this.data=n.toString(),this.error=n):this.data=n}};function It(e){return e!=null&&typeof e.status==`number`&&typeof e.statusText==`string`&&typeof e.internal==`boolean`&&`data`in e}function Lt(e){return At(e.map(e=>e.route.path).filter(Boolean))||`/`}var Rt=typeof window<`u`&&window.document!==void 0&&window.document.createElement!==void 0;function zt(e,t){let n=e;if(typeof n!=`string`||!He.test(n))return{absoluteURL:void 0,isExternal:!1,to:n};let r=n,i=!1;if(Rt)try{let e=new URL(window.location.href),r=Ue.test(n)?new URL(We(n,e.protocol)):new URL(n),a=St(r.pathname,t);r.origin===e.origin&&a!=null?n=a+r.search+r.hash:i=!0}catch{Je(!1,`<Link to="${n}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}return{absoluteURL:r,isExternal:i,to:n}}Object.getOwnPropertyNames(Object.prototype).sort().join(`\0`);var Bt=new URL(`http://localhost`);function Vt(e){if(e.createURL)return e.createURL(`/`);try{return new URL(e.createHref(`/`),Bt)}catch{return Bt}}function Ht(e,t){return e.origin===t.origin&&(e.origin!==`null`||e.protocol===t.protocol&&e.host===t.host)}function Ut(e,t){if(e.startsWith(`//`))return!0;let n=t.protocol.toLowerCase();return e.toLowerCase().startsWith(n)?t.host===``||e.slice(n.length).startsWith(`//`):!1}function Wt(e,t,n,r){let i=null;try{i=e==null?null:new URL(e,n)}catch{}let a=new URL(t,n),o=i!=null&&!Ht(i,n),s=!Ht(a,n);if(r===`reject`){if(o||s)throw Error(`External navigation is not allowed`)}else if(s&&(i==null||!Ut(e,i)||!Ht(i,a)))throw Error(`External navigation is not allowed`)}var Gt=[`POST`,`PUT`,`PATCH`,`DELETE`];new Set(Gt);var Kt=[`GET`,...Gt];new Set(Kt);var qt=[`about:`,`blob:`,`chrome:`,`chrome-untrusted:`,`content:`,`data:`,`devtools:`,`file:`,`filesystem:`,`javascript:`];function Jt(e){try{return qt.includes(new URL(e).protocol)}catch{return!1}}var Yt=M.createContext(null);Yt.displayName=`DataRouter`;var Xt=M.createContext(null);Xt.displayName=`DataRouterState`;var Zt=M.createContext(!1);function Qt(){return M.useContext(Zt)}var $t=M.createContext({isTransitioning:!1});$t.displayName=`ViewTransition`;var en=M.createContext(new Map);en.displayName=`Fetchers`;var tn=M.createContext(null);tn.displayName=`Await`;var P=M.createContext(null);P.displayName=`Navigation`;var nn=M.createContext(null);nn.displayName=`Location`;var rn=M.createContext({outlet:null,matches:[],isDataRoute:!1});rn.displayName=`Route`;var an=M.createContext(null);an.displayName=`RouteError`;var on=`REACT_ROUTER_ERROR`,sn=`REDIRECT`,cn=`ROUTE_ERROR_RESPONSE`;function ln(e){if(e.startsWith(`${on}:${sn}:{`))try{let t=JSON.parse(e.slice(28));if(typeof t==`object`&&t&&typeof t.status==`number`&&typeof t.statusText==`string`&&typeof t.location==`string`&&typeof t.reloadDocument==`boolean`&&typeof t.replace==`boolean`)return t}catch{}}function un(e){if(e.startsWith(`${on}:${cn}:{`))try{let t=JSON.parse(e.slice(40));if(typeof t==`object`&&t&&typeof t.status==`number`&&typeof t.statusText==`string`)return new Ft(t.status,t.statusText,t.data)}catch{}}function dn(e,{relative:t}={}){N(fn(),`useHref() may be used only in the context of a <Router> component.`);let{basename:n,navigator:r}=M.useContext(P),{hash:i,pathname:a,search:o}=xn(e,{relative:t}),s=a;return n!==`/`&&(s=a===`/`?n:At([n,a])),r.createHref({pathname:s,search:o,hash:i})}function fn(){return M.useContext(nn)!=null}function pn(){return N(fn(),`useLocation() may be used only in the context of a <Router> component.`),M.useContext(nn).location}var mn=`You should call navigate() in a React.useEffect(), not when your component is first rendered.`;function hn(e){M.useContext(P).static||M.useLayoutEffect(e)}function gn(){let{isDataRoute:e}=M.useContext(rn);return e?Rn():_n()}function _n(){N(fn(),`useNavigate() may be used only in the context of a <Router> component.`);let e=M.useContext(Yt),{basename:t,navigator:n}=M.useContext(P),{matches:r}=M.useContext(rn),{pathname:i}=pn(),a=JSON.stringify(Dt(r)),o=M.useRef(!1);return hn(()=>{o.current=!0}),M.useCallback((r,s={})=>{if(Je(o.current,mn),!o.current)return;if(typeof r==`number`){n.go(r);return}let c=Ot(r,JSON.parse(a),i,s.relative===`path`);e==null&&t!==`/`&&(c.pathname=c.pathname===`/`?t:At([t,c.pathname])),Wt(typeof r==`string`?r:Qe(r),n.createHref(c),Vt(n),`reject`),(s.replace?n.replace:n.push)(c,s.state,s)},[t,n,a,i,e])}var vn=M.createContext(null);function yn(e){let t=M.useContext(rn).outlet;return M.useMemo(()=>t&&M.createElement(vn.Provider,{value:e},t),[t,e])}function bn(){let{matches:e}=M.useContext(rn);return e[e.length-1]?.params??{}}function xn(e,{relative:t}={}){let{matches:n}=M.useContext(rn),{pathname:r}=pn(),i=JSON.stringify(Dt(n));return M.useMemo(()=>Ot(e,JSON.parse(i),r,t===`path`),[e,i,r,t])}function Sn(e,t){return Cn(e,t)}function Cn(e,t,n){N(fn(),`useRoutes() may be used only in the context of a <Router> component.`);let{navigator:r}=M.useContext(P),{matches:i}=M.useContext(rn),a=i[i.length-1],o=a?a.params:{},s=a?a.pathname:`/`,c=a?a.pathnameBase:`/`,l=a&&a.route;{let e=l&&l.path||``;Bn(s,!l||e.endsWith(`*`)||e.endsWith(`*?`),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${s}" (under <Route path="${e}">) but the parent route path has no trailing "*". This means if you navigate deeper, the parent won't match anymore and therefore the child routes will never render.
2
+
3
+ Please change the parent <Route path="${e}"> to <Route path="${e===`/`?`*`:`${e}/*`}">.`)}let u=pn(),d;if(t){let e=typeof t==`string`?$e(t):t;N(c===`/`||e.pathname?.startsWith(c),`When overriding the location using \`<Routes location>\` or \`useRoutes(routes, location)\`, the location pathname must begin with the portion of the URL pathname that was matched by all parent routes. The current pathname base is "${c}" but pathname "${e.pathname}" was given in the \`location\` prop.`),d=e}else d=u;let f=d.pathname||`/`,p=f;if(c!==`/`){let e=c.replace(/^\//,``).split(`/`);p=`/`+f.replace(/^\//,``).split(`/`).slice(e.length).join(`/`)}let m=n&&n.state.matches.length?n.state.matches.map(e=>Object.assign(e,{route:n.manifest[e.route.id]||e.route})):nt(e,{pathname:p});Je(l||m!=null,`No routes matched location "${d.pathname}${d.search}${d.hash}" `),Je(m==null||m[m.length-1].route.element!==void 0||m[m.length-1].route.Component!==void 0||m[m.length-1].route.lazy!==void 0,`Matched leaf route at location "${d.pathname}${d.search}${d.hash}" does not have an element or Component. This means it will render an <Outlet /> with a null value by default resulting in an "empty" page.`);let h=An(m&&m.map(e=>Object.assign({},e,{params:Object.assign({},o,e.params),pathname:At([c,r.encodeLocation?r.encodeLocation(e.pathname.replace(/%/g,`%25`).replace(/\?/g,`%3F`).replace(/#/g,`%23`)).pathname:e.pathname]),pathnameBase:e.pathnameBase===`/`?c:At([c,r.encodeLocation?r.encodeLocation(e.pathnameBase.replace(/%/g,`%25`).replace(/\?/g,`%3F`).replace(/#/g,`%23`)).pathname:e.pathnameBase])})),i,n);return t&&h?M.createElement(nn.Provider,{value:{location:{pathname:`/`,search:``,hash:``,state:null,key:`default`,mask:void 0,...d},navigationType:`POP`}},h):h}function wn(){let e=Ln(),t=It(e)?`${e.status} ${e.statusText}`:e instanceof Error?e.message:JSON.stringify(e),n=e instanceof Error?e.stack:null,r=`rgba(200,200,200, 0.5)`,i={padding:`0.5rem`,backgroundColor:r},a={padding:`2px 4px`,backgroundColor:r},o=null;return console.error(`Error handled by React Router default ErrorBoundary:`,e),o=M.createElement(M.Fragment,null,M.createElement(`p`,null,`💿 Hey developer 👋`),M.createElement(`p`,null,`You can provide a way better UX than this when your app throws errors by providing your own `,M.createElement(`code`,{style:a},`ErrorBoundary`),` or`,` `,M.createElement(`code`,{style:a},`errorElement`),` prop on your route.`)),M.createElement(M.Fragment,null,M.createElement(`h2`,null,`Unexpected Application Error!`),M.createElement(`h3`,{style:{fontStyle:`italic`}},t),n?M.createElement(`pre`,{style:i},n):null,o)}var Tn=M.createElement(wn,null),En=class extends M.Component{constructor(e){super(e),this.state={location:e.location,revalidation:e.revalidation,error:e.error}}static getDerivedStateFromError(e){return{error:e}}static getDerivedStateFromProps(e,t){return t.location!==e.location||t.revalidation!==`idle`&&e.revalidation===`idle`?{error:e.error,location:e.location,revalidation:e.revalidation}:{error:e.error===void 0?t.error:e.error,location:t.location,revalidation:e.revalidation||t.revalidation}}componentDidCatch(e,t){this.props.onError?this.props.onError(e,t):console.error(`React Router caught the following error during render`,e)}render(){let e=this.state.error;if(this.context&&typeof e==`object`&&e&&`digest`in e&&typeof e.digest==`string`){let t=un(e.digest);t&&(e=t)}let t=e===void 0?this.props.children:M.createElement(rn.Provider,{value:this.props.routeContext},M.createElement(an.Provider,{value:e,children:this.props.component}));return this.context?M.createElement(On,{error:e},t):t}};En.contextType=Zt;var Dn=new WeakMap;function On({children:e,error:t}){let{basename:n,navigator:r}=M.useContext(P);if(typeof t==`object`&&t&&`digest`in t&&typeof t.digest==`string`){let e=ln(t.digest);if(e){let i=Dn.get(t);if(i)throw i;let a=zt(e.location,n),o=a.absoluteURL||a.to;if(Wt(e.location,o,Vt(r),`allow-explicit`),Jt(o))throw Error(`Invalid redirect location`);if(Rt&&!Dn.get(t)){if(a.isExternal||e.reloadDocument)window.location.href=o;else{let n=Promise.resolve().then(()=>window.__reactRouterDataRouter.navigate(a.to,{replace:e.replace}));throw Dn.set(t,n),n}}return M.createElement(`meta`,{httpEquiv:`refresh`,content:`0;url=${o}`})}}return e}function kn({routeContext:e,match:t,children:n}){let r=M.useContext(Yt);return r&&r.static&&r.staticContext&&(t.route.errorElement||t.route.ErrorBoundary)&&(r.staticContext._deepestRenderedBoundaryId=t.route.id),M.createElement(rn.Provider,{value:e},n)}function An(e,t=[],n){let r=n?.state;if(e==null){if(!r)return null;if(r.errors)e=r.matches;else if(t.length===0&&!r.initialized&&r.matches.length>0)e=r.matches;else return null}let i=e,a=r?.errors;if(a!=null){let e=i.findIndex(e=>e.route.id&&a?.[e.route.id]!==void 0);N(e>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(a).join(`,`)}`),i=i.slice(0,Math.min(i.length,e+1))}let o=!1,s=-1;if(n&&r){o=r.renderFallback;for(let e=0;e<i.length;e++){let t=i[e];if((t.route.HydrateFallback||t.route.hydrateFallbackElement)&&(s=e),t.route.id){let{loaderData:e,errors:a}=r,c=t.route.loader&&!e.hasOwnProperty(t.route.id)&&(!a||a[t.route.id]===void 0);if(t.route.lazy||c){n.isStatic&&(o=!0),i=s>=0?i.slice(0,s+1):[i[0]];break}}}}let c=n?.onError,l=r&&c?(e,t)=>{c(e,{location:r.location,params:r.matches?.[0]?.params??{},pattern:Lt(r.matches),errorInfo:t})}:void 0;return i.reduceRight((e,n,c)=>{let u,d=!1,f=null,p=null;r&&(u=a&&n.route.id?a[n.route.id]:void 0,f=n.route.errorElement||Tn,o&&(s<0&&c===0?(Bn(`route-fallback`,!1,"No `HydrateFallback` element provided to render during initial hydration"),d=!0,p=null):s===c&&(d=!0,p=n.route.hydrateFallbackElement||null)));let m=t.concat(i.slice(0,c+1)),h=()=>{let t;return t=u?f:d?p:n.route.Component?M.createElement(n.route.Component,null):n.route.element?n.route.element:e,M.createElement(kn,{match:n,routeContext:{outlet:e,matches:m,isDataRoute:r!=null},children:t})};return r&&(n.route.ErrorBoundary||n.route.errorElement||c===0)?M.createElement(En,{location:r.location,revalidation:r.revalidation,component:f,error:u,children:h(),routeContext:{outlet:null,matches:m,isDataRoute:!0},onError:l}):h()},null)}function jn(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function Mn(e){let t=M.useContext(Yt);return N(t,jn(e)),t}function Nn(e){let t=M.useContext(Xt);return N(t,jn(e)),t}function Pn(e){let t=M.useContext(rn);return N(t,jn(e)),t}function Fn(e){let t=Pn(e),n=t.matches[t.matches.length-1];return N(n.route.id,`${e} can only be used on routes that contain a unique "id"`),n.route.id}function In(){return Fn(`useRouteId`)}function Ln(){let e=M.useContext(an),t=Nn(`useRouteError`),n=Fn(`useRouteError`);return e===void 0?t.errors?.[n]:e}function Rn(){let{router:e}=Mn(`useNavigate`),t=Fn(`useNavigate`),n=M.useRef(!1);return hn(()=>{n.current=!0}),M.useCallback(async(r,i={})=>{Je(n.current,mn),n.current&&(typeof r==`number`?await e.navigate(r):await e.navigate(r,{fromRouteId:t,...i}))},[e,t])}var zn={};function Bn(e,t,n){!t&&!zn[e]&&(zn[e]=!0,Je(!1,n))}M.memo(Vn);function Vn({routes:e,manifest:t,future:n,state:r,isStatic:i,onError:a}){return Cn(e,void 0,{manifest:t,state:r,isStatic:i,onError:a,future:n})}function Hn({to:e,replace:t,state:n,relative:r}){N(fn(),`<Navigate> may be used only in the context of a <Router> component.`);let{static:i,navigator:a}=M.useContext(P);Je(!i,`<Navigate> must not be used on the initial render in a <StaticRouter>. This is a no-op, but you should modify your code so the <Navigate> is only ever rendered in response to some user interaction or state change.`);let{matches:o}=M.useContext(rn),{pathname:s}=pn(),c=gn(),l=Ot(e,Dt(o),s,r===`path`);Wt(typeof e==`string`?e:Qe(e),a.createHref(l),Vt(a),`reject`);let u=JSON.stringify(l);return M.useEffect(()=>{c(JSON.parse(u),{replace:t,state:n,relative:r})},[c,u,r,t,n]),null}function Un(e){return yn(e.context)}function F(e){N(!1,`A <Route> is only ever to be used as the child of <Routes> element, never rendered directly. Please wrap your <Route> in a <Routes>.`)}function Wn({basename:e=`/`,children:t=null,location:n,navigationType:r=`POP`,navigator:i,static:a=!1,useTransitions:o}){N(!fn(),`You cannot render a <Router> inside another <Router>. You should never have more than one in your app.`);let s=e.replace(/^\/*/,`/`),c=M.useMemo(()=>({basename:s,navigator:i,static:a,useTransitions:o,future:{}}),[s,i,a,o]);typeof n==`string`&&(n=$e(n));let{pathname:l=`/`,search:u=``,hash:d=``,state:f=null,key:p=`default`,mask:m}=n,h=M.useMemo(()=>{let e=St(l,s);return e==null?null:{location:{pathname:e,search:u,hash:d,state:f,key:p,mask:m},navigationType:r}},[s,l,u,d,f,p,r,m]);return Je(h!=null,`<Router basename="${s}"> is not able to match the URL "${l}${u}${d}" because it does not start with the basename, so the <Router> won't render anything.`),h==null?null:M.createElement(P.Provider,{value:c},M.createElement(nn.Provider,{children:t,value:h}))}function Gn({children:e,location:t}){return Sn(Kn(e),t)}M.Component;function Kn(e,t=[]){let n=[];return M.Children.forEach(e,(e,r)=>{if(!M.isValidElement(e))return;let i=[...t,r];if(e.type===M.Fragment){n.push.apply(n,Kn(e.props.children,i));return}N(e.type===F,`[${typeof e.type==`string`?e.type:e.type.name}] is not a <Route> component. All component children of <Routes> must be a <Route> or <React.Fragment>`),N(!e.props.index||!e.props.children,`An index route cannot have child routes.`);let a={id:e.props.id||i.join(`-`),caseSensitive:e.props.caseSensitive,element:e.props.element,Component:e.props.Component,index:e.props.index,path:e.props.path,middleware:e.props.middleware,loader:e.props.loader,action:e.props.action,hydrateFallbackElement:e.props.hydrateFallbackElement,HydrateFallback:e.props.HydrateFallback,errorElement:e.props.errorElement,ErrorBoundary:e.props.ErrorBoundary,hasErrorBoundary:e.props.hasErrorBoundary===!0||e.props.ErrorBoundary!=null||e.props.errorElement!=null,shouldRevalidate:e.props.shouldRevalidate,handle:e.props.handle,lazy:e.props.lazy};e.props.children&&(a.children=Kn(e.props.children,i)),n.push(a)}),n}var qn=`get`,Jn=`application/x-www-form-urlencoded`;function Yn(e){return typeof HTMLElement<`u`&&e instanceof HTMLElement}function Xn(e){return Yn(e)&&e.tagName.toLowerCase()===`button`}function Zn(e){return Yn(e)&&e.tagName.toLowerCase()===`form`}function Qn(e){return Yn(e)&&e.tagName.toLowerCase()===`input`}function $n(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function er(e,t){return e.button===0&&(!t||t===`_self`)&&!$n(e)}var tr=null;function nr(){if(tr===null)try{new FormData(document.createElement(`form`),0),tr=!1}catch{tr=!0}return tr}var rr=new Set([`application/x-www-form-urlencoded`,`multipart/form-data`,`text/plain`]);function ir(e){return e!=null&&!rr.has(e)?(Je(!1,`"${e}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${Jn}"`),null):e}function ar(e,t){let n,r,i,a,o;if(Zn(e)){let o=e.getAttribute(`action`);r=o?St(o,t):null,n=e.getAttribute(`method`)||qn,i=ir(e.getAttribute(`enctype`))||Jn,a=new FormData(e)}else if(Xn(e)||Qn(e)&&(e.type===`submit`||e.type===`image`)){let o=e.form;if(o==null)throw Error(`Cannot submit a <button> or <input type="submit"> without a <form>`);let s=e.getAttribute(`formaction`)||o.getAttribute(`action`);if(r=s?St(s,t):null,n=e.getAttribute(`formmethod`)||o.getAttribute(`method`)||qn,i=ir(e.getAttribute(`formenctype`))||ir(o.getAttribute(`enctype`))||Jn,a=new FormData(o,e),!nr()){let{name:t,type:n,value:r}=e;if(n===`image`){let e=t?`${t}.`:``;a.append(`${e}x`,`0`),a.append(`${e}y`,`0`)}else t&&a.append(t,r)}}else if(Yn(e))throw Error(`Cannot submit element that is not <form>, <button>, or <input type="submit|image">`);else n=qn,r=null,i=Jn,o=e;return a&&i===`text/plain`&&(o=a,a=void 0),{action:r,method:n.toLowerCase(),encType:i,formData:a,body:o}}Object.getOwnPropertyNames(Object.prototype).sort().join(`\0`);function or(e,t){if(e===!1||e==null)throw Error(t)}function sr(e,t,n,r){let i=typeof e==`string`?new URL(e,typeof window>`u`?`server://singlefetch/`:window.location.origin):e;return i.pathname=n?i.pathname.endsWith(`/`)?`${i.pathname}_.${r}`:`${i.pathname}.${r}`:i.pathname===`/`?`_root.${r}`:t&&St(i.pathname,t)===`/`?`${jt(t)}/_root.${r}`:`${jt(i.pathname)}.${r}`,i}async function cr(e,t){if(e.id in t)return t[e.id];try{let n=await i(()=>import(e.module),[]);return t[e.id]=n,n}catch(t){return console.error(`Error loading route module \`${e.module}\`, reloading page...`),console.error(t),window.__reactRouterContext&&window.__reactRouterContext.isSpaMode,window.location.reload(),new Promise(()=>{})}}function lr(e){return e!=null&&typeof e.page==`string`}function ur(e){return e==null?!1:e.href==null?e.rel===`preload`&&typeof e.imageSrcSet==`string`&&typeof e.imageSizes==`string`:typeof e.rel==`string`&&typeof e.href==`string`}async function dr(e,t,n){return gr((await Promise.all(e.map(async e=>{let r=t.routes[e.route.id];if(r){let e=await cr(r,n);return e.links?e.links():[]}return[]}))).flat(1).filter(ur).filter(e=>e.rel===`stylesheet`||e.rel===`preload`).map(e=>e.rel===`stylesheet`?{...e,rel:`prefetch`,as:`style`}:{...e,rel:`prefetch`}))}function fr(e,t,n,r,i,a){let o=(e,t)=>!n[t]||e.route.id!==n[t].route.id,s=(e,t)=>n[t].pathname!==e.pathname||n[t].route.path?.endsWith(`*`)&&n[t].params[`*`]!==e.params[`*`];return a===`assets`?t.filter((e,t)=>o(e,t)||s(e,t)):a===`data`?t.filter((t,a)=>{let c=r.routes[t.route.id];if(!c||!c.hasLoader)return!1;if(o(t,a)||s(t,a))return!0;if(t.route.shouldRevalidate){let r=t.route.shouldRevalidate({currentUrl:new URL(i.pathname+i.search+i.hash,window.origin),currentParams:n[0]?.params||{},nextUrl:new URL(e,window.origin),nextParams:t.params,defaultShouldRevalidate:!0});if(typeof r==`boolean`)return r}return!0}):[]}function pr(e,t,{includeHydrateFallback:n}={}){return mr(e.map(e=>{let r=t.routes[e.route.id];if(!r)return[];let i=[r.module];return r.clientActionModule&&(i=i.concat(r.clientActionModule)),r.clientLoaderModule&&(i=i.concat(r.clientLoaderModule)),n&&r.hydrateFallbackModule&&(i=i.concat(r.hydrateFallbackModule)),r.imports&&(i=i.concat(r.imports)),i}).flat(1))}function mr(e){return[...new Set(e)]}function hr(e){let t={},n=Object.keys(e).sort();for(let r of n)t[r]=e[r];return t}function gr(e,t){let n=new Set,r=new Set(t);return e.reduce((e,i)=>{if(t&&!lr(i)&&i.as===`script`&&i.href&&r.has(i.href))return e;let a=JSON.stringify(hr(i));return n.has(a)||(n.add(a),e.push({key:a,link:i})),e},[])}function _r(){let e=M.useContext(Yt);return or(e,`You must render this element inside a <DataRouterContext.Provider> element`),e}function vr(){let e=M.useContext(Xt);return or(e,`You must render this element inside a <DataRouterStateContext.Provider> element`),e}var yr=M.createContext(void 0);yr.displayName=`FrameworkContext`;function br(){let e=M.useContext(yr);return or(e,`You must render this element inside a <HydratedRouter> element`),e}function xr(e,t){let n=M.useContext(yr),[r,i]=M.useState(!1),[a,o]=M.useState(!1),{onFocus:s,onBlur:c,onMouseEnter:l,onMouseLeave:u,onTouchStart:d}=t,f=M.useRef(null);M.useEffect(()=>{if(e===`render`&&o(!0),e===`viewport`){let e=new IntersectionObserver(e=>{e.forEach(e=>{o(e.isIntersecting)})},{threshold:.5});return f.current&&e.observe(f.current),()=>{e.disconnect()}}},[e]),M.useEffect(()=>{if(r){let e=setTimeout(()=>{o(!0)},100);return()=>{clearTimeout(e)}}},[r]);let p=()=>{i(!0)},m=()=>{i(!1),o(!1)};return n?e===`intent`?[a,f,{onFocus:Sr(s,p),onBlur:Sr(c,m),onMouseEnter:Sr(l,p),onMouseLeave:Sr(u,m),onTouchStart:Sr(d,p)}]:[a,f,{}]:[!1,f,{}]}function Sr(e,t){return n=>{e&&e(n),n.defaultPrevented||t(n)}}function Cr({page:e,...t}){let n=Qt(),{nonce:r}=br(),{router:i}=_r(),a=M.useMemo(()=>nt(i.routes,e,i.basename),[i.routes,e,i.basename]);return a?(t.nonce==null&&r&&(t={...t,nonce:r}),n?M.createElement(Tr,{page:e,matches:a,...t}):M.createElement(Er,{page:e,matches:a,...t})):null}function wr(e){let{manifest:t,routeModules:n}=br(),[r,i]=M.useState([]);return M.useEffect(()=>{let r=!1;return dr(e,t,n).then(e=>{r||i(e)}),()=>{r=!0}},[e,t,n]),r}function Tr({page:e,matches:t,...n}){let r=pn(),{future:i}=br(),{basename:a}=_r(),o=M.useMemo(()=>{if(e===r.pathname+r.search+r.hash)return[];let n=sr(e,a,i.v8_trailingSlashAwareDataRequests,`rsc`),o=!1,s=[];for(let e of t)typeof e.route.shouldRevalidate==`function`?o=!0:s.push(e.route.id);return o&&s.length>0&&n.searchParams.set(`_routes`,s.join(`,`)),[n.pathname+n.search]},[a,i.v8_trailingSlashAwareDataRequests,e,r,t]);return M.createElement(M.Fragment,null,o.map(e=>M.createElement(`link`,{key:e,rel:`prefetch`,as:`fetch`,href:e,...n})))}function Er({page:e,matches:t,...n}){let r=pn(),{future:i,manifest:a,routeModules:o}=br(),{basename:s}=_r(),{loaderData:c,matches:l}=vr(),u=M.useMemo(()=>fr(e,t,l,a,r,`data`),[e,t,l,a,r]),d=M.useMemo(()=>fr(e,t,l,a,r,`assets`),[e,t,l,a,r]),f=M.useMemo(()=>{if(e===r.pathname+r.search+r.hash)return[];let n=new Set,l=!1;if(t.forEach(e=>{let t=a.routes[e.route.id];t&&t.hasLoader&&(!u.some(t=>t.route.id===e.route.id)&&e.route.id in c&&o[e.route.id]?.shouldRevalidate||t.hasClientLoader?l=!0:n.add(e.route.id))}),n.size===0)return[];let d=sr(e,s,i.v8_trailingSlashAwareDataRequests,`data`);return l&&n.size>0&&d.searchParams.set(`_routes`,t.filter(e=>n.has(e.route.id)).map(e=>e.route.id).join(`,`)),[d.pathname+d.search]},[s,i.v8_trailingSlashAwareDataRequests,c,r,a,u,t,e,o]),p=M.useMemo(()=>pr(d,a),[d,a]),m=wr(d);return M.createElement(M.Fragment,null,f.map(e=>M.createElement(`link`,{key:e,rel:`prefetch`,as:`fetch`,href:e,...n})),p.map(e=>M.createElement(`link`,{key:e,rel:`modulepreload`,href:e,...n})),m.map(({key:e,link:t})=>M.createElement(`link`,{key:e,nonce:n.nonce,...t,crossOrigin:t.crossOrigin??n.crossOrigin})))}function Dr(...e){return t=>{e.forEach(e=>{typeof e==`function`?e(t):e!=null&&(e.current=t)})}}M.Component;var Or=typeof window<`u`&&window.document!==void 0&&window.document.createElement!==void 0;try{Or&&(window.__reactRouterVersion=`7.18.4`)}catch{}function kr({basename:e,children:t,useTransitions:n,window:r}){let i=M.useRef();i.current??=qe({window:r,v5Compat:!0});let a=i.current,[o,s]=M.useState({action:a.action,location:a.location}),c=M.useCallback(e=>{n===!1?s(e):M.startTransition(()=>s(e))},[n]);return M.useLayoutEffect(()=>a.listen(c),[a,c]),M.createElement(Wn,{basename:e,children:t,location:o.location,navigationType:o.action,navigator:a,useTransitions:n})}var Ar=M.forwardRef(function({onClick:e,discover:t=`render`,prefetch:n=`none`,relative:r,reloadDocument:i,replace:a,mask:o,state:s,target:c,to:l,preventScrollReset:u,viewTransition:d,defaultShouldRevalidate:f,...p},m){let{basename:h,navigator:g,useTransitions:_}=M.useContext(P),v=typeof l==`string`&&He.test(l),y=zt(l,h);l=y.to;let b=dn(l,{relative:r}),x=pn(),S=null;if(o){let e=Ot(o,[],x.mask?x.mask.pathname:`/`,!0);h!==`/`&&(e.pathname=e.pathname===`/`?h:At([h,e.pathname])),S=g.createHref(e)}let[C,w,T]=xr(n,p),E=Fr(l,{replace:a,mask:o,state:s,target:c,preventScrollReset:u,relative:r,viewTransition:d,defaultShouldRevalidate:f,useTransitions:_});function ee(t){e&&e(t),t.defaultPrevented||E(t)}let D=!(y.isExternal||i),te=M.createElement(`a`,{...p,...T,href:(D?S:void 0)||y.absoluteURL||b,onClick:D?ee:e,ref:Dr(m,w),target:c,"data-discover":!v&&t===`render`?`true`:void 0});return C&&!v?M.createElement(M.Fragment,null,te,M.createElement(Cr,{page:b})):te});Ar.displayName=`Link`;var jr=M.forwardRef(function({"aria-current":e=`page`,caseSensitive:t=!1,className:n=``,end:r=!1,style:i,to:a,viewTransition:o,children:s,...c},l){let u=xn(a,{relative:c.relative}),d=pn(),f=M.useContext(Xt),{navigator:p,basename:m}=M.useContext(P),h=f!=null&&Br(u)&&o===!0,g=p.encodeLocation?p.encodeLocation(u).pathname:u.pathname,_=d.pathname,v=f&&f.navigation&&f.navigation.location?f.navigation.location.pathname:null;t||(_=_.toLowerCase(),v=v?v.toLowerCase():null,g=g.toLowerCase()),v&&m&&(v=St(v,m)||v);let y=g!==`/`&&g.endsWith(`/`)?g.length-1:g.length,b=_===g||!r&&_.startsWith(g)&&_.charAt(y)===`/`,x=v!=null&&(v===g||!r&&v.startsWith(g)&&v.charAt(g.length)===`/`),S={isActive:b,isPending:x,isTransitioning:h},C=b?e:void 0,w;w=typeof n==`function`?n(S):[n,b?`active`:null,x?`pending`:null,h?`transitioning`:null].filter(Boolean).join(` `);let T=typeof i==`function`?i(S):i;return M.createElement(Ar,{...c,"aria-current":C,className:w,ref:l,style:T,to:a,viewTransition:o},typeof s==`function`?s(S):s)});jr.displayName=`NavLink`;var Mr=M.forwardRef(({discover:e=`render`,fetcherKey:t,navigate:n,reloadDocument:r,replace:i,state:a,method:o=qn,action:s,onSubmit:c,relative:l,preventScrollReset:u,viewTransition:d,defaultShouldRevalidate:f,...p},m)=>{let{useTransitions:h}=M.useContext(P),g=Rr(),_=zr(s,{relative:l}),v=o.toLowerCase()===`get`?`get`:`post`,y=typeof s==`string`&&He.test(s);return M.createElement(`form`,{ref:m,method:v,action:_,onSubmit:r?c:e=>{if(c&&c(e),e.defaultPrevented)return;e.preventDefault();let r=e.nativeEvent.submitter,s=r?.getAttribute(`formmethod`)||o,p=()=>g(r||e.currentTarget,{fetcherKey:t,method:s,navigate:n,replace:i,state:a,relative:l,preventScrollReset:u,viewTransition:d,defaultShouldRevalidate:f});h&&n!==!1?M.startTransition(()=>p()):p()},...p,"data-discover":!y&&e===`render`?`true`:void 0})});Mr.displayName=`Form`;function Nr(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function Pr(e){let t=M.useContext(Yt);return N(t,Nr(e)),t}function Fr(e,{target:t,replace:n,mask:r,state:i,preventScrollReset:a,relative:o,viewTransition:s,defaultShouldRevalidate:c,useTransitions:l}={}){let u=gn(),d=pn(),f=xn(e,{relative:o});return M.useCallback(p=>{if(er(p,t)){p.preventDefault();let t=n===void 0?Qe(d)===Qe(f):n,m=()=>u(e,{replace:t,mask:r,state:i,preventScrollReset:a,relative:o,viewTransition:s,defaultShouldRevalidate:c});l?M.startTransition(()=>m()):m()}},[d,u,f,n,r,i,t,e,a,o,s,c,l])}var Ir=0,Lr=()=>`__${String(++Ir)}__`;function Rr(){let{router:e}=Pr(`useSubmit`),{basename:t}=M.useContext(P),n=In(),r=e.fetch,i=e.navigate;return M.useCallback(async(e,a={})=>{let{action:o,method:s,encType:c,formData:l,body:u}=ar(e,t);if(a.navigate===!1){let e=a.fetcherKey||Lr();await r(e,n,a.action||o,{defaultShouldRevalidate:a.defaultShouldRevalidate,preventScrollReset:a.preventScrollReset,formData:l,body:u,formMethod:a.method||s,formEncType:a.encType||c,flushSync:a.flushSync})}else await i(a.action||o,{defaultShouldRevalidate:a.defaultShouldRevalidate,preventScrollReset:a.preventScrollReset,formData:l,body:u,formMethod:a.method||s,formEncType:a.encType||c,replace:a.replace,state:a.state,fromRouteId:n,flushSync:a.flushSync,viewTransition:a.viewTransition})},[r,i,t,n])}function zr(e,{relative:t}={}){let{basename:n}=M.useContext(P),r=M.useContext(rn);N(r,`useFormAction must be used inside a RouteContext`);let[i]=r.matches.slice(-1),a={...xn(e||`.`,{relative:t})},o=pn();if(e==null){a.search=o.search;let e=new URLSearchParams(a.search),t=e.getAll(`index`);if(t.some(e=>e===``)){e.delete(`index`),t.filter(e=>e).forEach(t=>e.append(`index`,t));let n=e.toString();a.search=n?`?${n}`:``}}return(!e||e===`.`)&&i.route.index&&(a.search=a.search?a.search.replace(/^\?/,`?index&`):`?index`),n!==`/`&&(a.pathname=a.pathname===`/`?n:At([n,a.pathname])),Qe(a)}function Br(e,{relative:t}={}){let n=M.useContext($t);N(n!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:r}=Pr(`useViewTransitionState`),i=xn(e,{relative:t});if(!n.isTransitioning)return!1;let a=St(n.currentLocation.pathname,r)||n.currentLocation.pathname,o=St(n.nextLocation.pathname,r)||n.nextLocation.pathname;return vt(i.pathname,o)!=null||vt(i.pathname,a)!=null}var Vr=[{id:`overview`,label:`Overview`,leaves:[{path:`/overview`,label:`Fleet Dashboard`,description:`Repos, activity, runs, swarms, MCP health, genome, and daemon status at a glance.`,implemented:!0},{path:`/agent-os`,label:`Agent OS`,description:`Authenticated, observation-only decision spine for capability runway and value bets.`,implemented:!0},{path:`/universe`,label:`Universe`,description:`Compare experiments, follow variant lineages, and inspect the retained population.`,implemented:!0}]},{id:`journal`,label:`Journal`,leaves:[{path:`/journal`,label:`Work Journal`,description:`Chronological, filterable, scrubable record of runs, merges, judge verdicts, and daemon ticks — with live streaming into any in-progress run.`,implemented:!0}]},{id:`work`,label:`Work`,leaves:[{path:`/work/runs`,label:`Runs`,description:`Dispatched goal runs and their token burn.`,implemented:!0},{path:`/work/swarms`,label:`Swarms`,description:`Multi-task DAG runs with live burndown.`,implemented:!0}]},{id:`inbox`,label:`Inbox`,leaves:[{path:`/inbox`,label:`Proposals`,description:`Review, filter, and approve/reject proposals — including history (rejected/approved).`,implemented:!0}]},{id:`control`,label:`Control`,leaves:[{path:`/control/daemon`,label:`Daemon`,description:`Autonomous operator state, spend, and direction mode.`,implemented:!0},{path:`/control/fleet`,label:`Fleet`,description:`Queue depth, lease health, and the kill switch.`,implemented:!0},{path:`/control/security`,label:`Security`,description:`Supply-chain / binshield findings from the cached backlog.`,implemented:!0}]},{id:`intelligence`,label:`Intelligence`,leaves:[{path:`/intelligence/pulse`,label:`Pulse`,description:`Activity rollups over the dashboard window.`,implemented:!0},{path:`/intelligence/genome`,label:`Genome`,description:`Cross-repo knowledge search and recall.`,implemented:!0},{path:`/intelligence/production`,label:`Production`,description:`Ships-per-day, judge verdicts, auto-merges.`,implemented:!0}]},{id:`portfolio`,label:`Portfolio`,leaves:[{path:`/portfolio`,label:`Portfolio`,description:`Org-level roll-up across enrolled repos.`,implemented:!0}]},{id:`goals`,label:`Goals`,leaves:[{path:`/goals`,label:`Goals`,description:`Active goals and milestone progress.`,implemented:!0}]}],Hr=Vr.flatMap(e=>e.leaves),Ur={sidebar:`_sidebar_vbjva_1`,brand:`_brand_vbjva_11`,brandMark:`_brandMark_vbjva_19`,group:`_group_vbjva_23`,groupLabel:`_groupLabel_vbjva_27`,leaves:`_leaves_vbjva_37`,link:`_link_vbjva_43`,active:`_active_vbjva_60`,soon:`_soon_vbjva_66`},I=r();function Wr(){return(0,I.jsxs)(`nav`,{className:Ur.sidebar,"aria-label":`Primary`,children:[(0,I.jsxs)(`div`,{className:Ur.brand,children:[(0,I.jsx)(`span`,{className:Ur.brandMark,"aria-hidden":`true`,children:`▲`}),(0,I.jsx)(`span`,{className:Ur.brandName,children:`ashlr`})]}),Vr.map(e=>(0,I.jsxs)(`div`,{className:Ur.group,children:[(0,I.jsx)(`h2`,{className:Ur.groupLabel,children:e.label}),(0,I.jsx)(`ul`,{className:Ur.leaves,children:e.leaves.map(e=>(0,I.jsx)(`li`,{children:(0,I.jsxs)(jr,{to:e.path,className:({isActive:e})=>`${Ur.link} ${e?Ur.active:``}`,children:[e.label,e.implemented?null:(0,I.jsx)(`span`,{className:Ur.soon,children:`soon`})]})},e.path))})]},e.id))]})}var Gr=18e4,Kr=72e5,qr=864e5;function Jr(e){let t=e.toLowerCase();return t.includes(`proposal`)||t.includes(`inbox`)?`/inbox`:t.includes(`security`)||t.includes(`audit`)?`/control/security`:t.includes(`evidence`)||t.includes(`fleet`)||t.includes(`queue`)?`/control/fleet`:`/control/daemon`}function Yr(e){let t=[],n=Date.now();for(let r of e.fleet?.nextActions??[])t.push({id:`next-action-${r.id}`,category:`action-required`,severity:r.priority,title:r.label,detail:r.detail,ts:new Date(n).toISOString(),actionHref:Jr(r.id),actionLabel:`Inspect`});let r=e.fleet?.autonomousShipReadiness;r&&(r.verdict===`blocked`&&r.topBlocker?t.push({id:`readiness-blocked-${r.topBlocker.id}`,category:`readiness`,severity:r.topBlocker.severity,title:`Autonomous readiness is blocked`,detail:r.topBlocker.detail,ts:r.freshness.generatedAt,actionHref:`/control/fleet`,actionLabel:`Inspect fleet`}):r.verdict===`unknown`&&t.push({id:`readiness-unknown`,category:`readiness`,severity:`medium`,title:`Autonomous readiness is unknown`,detail:`Fresh, authoritative state is required before autonomous operation can be treated as clear.`,ts:r.freshness.generatedAt,actionHref:`/control/fleet`,actionLabel:`Inspect fleet`}));let i=e.control?.security;if(i?.available){if(i.counts.critical>0){let e=i.findings.find(e=>e.severity===`critical`);t.push({id:`security-critical`,category:`security`,severity:`critical`,title:`${i.counts.critical} critical security finding${i.counts.critical===1?``:`s`}`,detail:e?`${e.repo}: ${e.title}`:`See the security backlog for details.`,ts:new Date(n).toISOString(),actionHref:`/control/security`,actionLabel:`Review findings`})}else if(i.counts.high>0){let e=i.findings.find(e=>e.severity===`high`);t.push({id:`security-high`,category:`security`,severity:`high`,title:`${i.counts.high} high-severity security finding${i.counts.high===1?``:`s`}`,detail:e?`${e.repo}: ${e.title}`:`See the security backlog for details.`,ts:new Date(n).toISOString(),actionHref:`/control/security`,actionLabel:`Review findings`})}}for(let r of e.control?.limits??[])r.standing===`over`?t.push({id:`budget-over-${r.backend}-${r.window}`,category:`budget`,severity:`high`,title:`${r.backend} is over its ${r.window} limit`,detail:`${r.used.toLocaleString()} / ${r.max.toLocaleString()} used.`,ts:new Date(n).toISOString(),actionHref:`/control/daemon`,actionLabel:`Review usage`}):r.standing===`warn`&&t.push({id:`budget-warn-${r.backend}-${r.window}`,category:`budget`,severity:`medium`,title:`${r.backend} is approaching its ${r.window} limit`,detail:`${r.used.toLocaleString()} / ${r.max.toLocaleString()} used.`,ts:new Date(n).toISOString(),actionHref:`/control/daemon`,actionLabel:`Review usage`});let a=e.control?.daemon;if(a&&(a.sourceQuality.sourceState!==`healthy`||a.sourceQuality.complete===!1)){let e=a.sourceQuality.reason;t.push({id:`daemon-health-degraded`,category:`daemon-health`,severity:e===`missing`||e===`unavailable`?`high`:`medium`,title:`Daemon state cannot be confirmed`,detail:e?`Source: ${e}.`:`The daemon state source is degraded or incomplete.`,ts:new Date(n).toISOString(),actionHref:`/control/daemon`,actionLabel:`Inspect daemon`,sourceQuality:a.sourceQuality})}if(e.inbox&&e.inbox.pending>0){let r=e.inbox.proposals.reduce((e,t)=>{let n=new Date(t.createdAt).getTime();return e===null||n<e?n:e},null),i=r===null?0:n-r,a=i>Kr?`high`:`medium`;t.push({id:`proposal-backlog`,category:`proposal`,severity:a,title:`${e.inbox.pending} proposal${e.inbox.pending===1?``:`s`} awaiting review`,detail:i>Kr?`Oldest has been waiting ${Math.round(i/36e5)}h.`:`Approve, reject, or leave for autonomous handling per policy.`,ts:r===null?new Date(n).toISOString():new Date(r).toISOString(),actionHref:`/inbox`,actionLabel:`Open inbox`})}for(let r of e.runs??[]){if(r.status===`failed`||r.status===`aborted`){if(n-new Date(r.updatedAt).getTime()>qr)continue;t.push({id:`run-failed-${r.id}`,category:`run`,severity:r.status===`failed`?`high`:`medium`,title:`Run ${r.status}: ${r.goal}`,detail:r.result??r.terminationReason??`Run ${r.id} ${r.status}.`,ts:r.updatedAt,actionHref:`/work/runs/${r.id}`,actionLabel:`Open run`});continue}if(r.status===`running`){let e=n-new Date(r.updatedAt).getTime();e>Gr&&t.push({id:`run-stalled-${r.id}`,category:`run`,severity:`medium`,title:`No update from a running run in ${Math.round(e/6e4)}m`,detail:r.goal,ts:r.updatedAt,actionHref:`/work/runs/${r.id}`,actionLabel:`Watch live`})}}return t}function Xr(e){let t={critical:0,high:1,medium:2,low:3,info:4};return[...e].sort((e,n)=>{let r=t[e.severity]-t[n.severity];return r===0?new Date(n.ts).getTime()-new Date(e.ts).getTime():r})}var Zr=`ashlr.notifications.mutedCategories.v1`,Qr=`ashlr.notifications.desktopEnabled.v1`;function $r(){try{let e=localStorage.getItem(Zr);if(!e)return new Set;let t=JSON.parse(e);if(Array.isArray(t))return new Set(t)}catch{}return new Set}function ei(e){try{localStorage.setItem(Zr,JSON.stringify([...e]))}catch{}}function ti(){try{return localStorage.getItem(Qr)===`1`}catch{return!1}}function ni(){return typeof Notification>`u`?`unsupported`:Notification.permission}var ri=$r(),ii=[],ai=!1,oi=ti(),si=new Set,ci={items:[],panelOpen:!1,mutedCategories:[...ri],desktopEnabled:oi,desktopPermission:ni()},li=new Set;function ui(){for(let e of li)e()}function di(){ci={items:Xr(ii.filter(e=>!ri.has(e.category))),panelOpen:ai,mutedCategories:[...ri],desktopEnabled:oi,desktopPermission:ni()},ui()}function fi(e){return li.add(e),()=>li.delete(e)}function pi(){return ci}function mi(e){let t=new Set(ii.map(e=>e.id));if(ii=e,oi&&ni()===`granted`){for(let n of e)if(!ri.has(n.category)&&(n.severity===`critical`||n.severity===`high`)&&!(t.has(n.id)||si.has(n.id))){si.add(n.id);try{new Notification(n.title,{body:n.detail,tag:n.id})}catch{}}}for(let t of e)si.add(t.id);di()}function hi(){ai=!0,di()}function gi(){ai=!1,di()}function _i(){ai=!ai,di()}function vi(e){return ri.has(e)}function yi(e,t){t?ri.add(e):ri.delete(e),ei(ri),di()}async function bi(){if(typeof Notification>`u`)return`unsupported`;let e=Notification.permission;e==="default"&&(e=await Notification.requestPermission()),oi=e===`granted`;try{localStorage.setItem(Qr,oi?`1`:`0`)}catch{}return di(),e}function xi(){oi=!1;try{localStorage.setItem(Qr,`0`)}catch{}di()}function Si(){return(0,M.useSyncExternalStore)(fi,pi,pi)}var Ci={bell:`_bell_c1uhc_1`,badge:`_badge_c1uhc_25`,badgeUrgent:`_badgeUrgent_c1uhc_41`};function wi(){let{items:e}=Si(),t=e.filter(e=>e.severity===`critical`||e.severity===`high`).length,n=e.length,r=(0,M.useRef)(t),[i,a]=(0,M.useState)(``);return(0,M.useEffect)(()=>{if(t>r.current){let e=t-r.current;a(`${e} new urgent notification${e===1?``:`s`}, ${t} urgent total.`)}r.current=t},[t]),(0,I.jsxs)(I.Fragment,{children:[(0,I.jsxs)(`button`,{type:`button`,className:Ci.bell,onClick:_i,"aria-haspopup":`dialog`,"aria-label":n===0?`Notifications, none open`:`Notifications, ${n} open, ${t} urgent`,children:[(0,I.jsx)(`span`,{"aria-hidden":`true`,children:`🔔`}),n>0?(0,I.jsx)(`span`,{className:`${Ci.badge} ${t>0?Ci.badgeUrgent:``}`,"aria-hidden":`true`,children:n>99?`99+`:n}):null]}),(0,I.jsx)(`div`,{"aria-live":`polite`,className:`visually-hidden`,children:i})]})}function Ti(e){switch(e){case`critical`:return`danger`;case`high`:return`warning`;case`medium`:return`running`;case`low`:return`neutral`;case`info`:return`info`}}var Ei={"action-required":`Action required`,readiness:`Autonomous readiness`,security:`Security`,budget:`Budget & limits`,"daemon-health":`Daemon health`,proposal:`Proposals`,run:`Runs`,"log-source":`Log source`},Di={item:`_item_1gxz9_1`,top:`_top_1gxz9_15`,category:`_category_1gxz9_21`,time:`_time_1gxz9_26`,title:`_title_1gxz9_32`,detail:`_detail_1gxz9_39`,actions:`_actions_1gxz9_45`,actionLink:`_actionLink_1gxz9_52`,muteBtn:`_muteBtn_1gxz9_58`};function Oi(e){let t=Math.max(0,Math.round((Date.now()-new Date(e).getTime())/1e3));if(t<5)return`just now`;if(t<60)return`${t}s ago`;let n=Math.round(t/60);if(n<60)return`${n}m ago`;let r=Math.round(n/60);return r<48?`${r}h ago`:`${Math.round(r/24)}d ago`}function ki({item:e}){let t=vi(e.category);return(0,I.jsxs)(`article`,{className:Di.item,"data-focus-key":`notification-${e.id}`,children:[(0,I.jsxs)(`div`,{className:Di.top,children:[(0,I.jsx)(E,{status:e.severity,tone:Ti(e.severity),children:e.severity.toUpperCase()}),(0,I.jsx)(`span`,{className:Di.category,children:Ei[e.category]}),(0,I.jsx)(`span`,{className:Di.time,title:new Date(e.ts).toLocaleString(),children:Oi(e.ts)})]}),(0,I.jsx)(`h3`,{className:Di.title,children:e.title}),(0,I.jsx)(`p`,{className:Di.detail,children:e.sourceQuality?(0,I.jsx)(T,{quality:e.sourceQuality,label:e.title,children:e.detail}):e.detail}),(0,I.jsxs)(`div`,{className:Di.actions,children:[e.actionHref?(0,I.jsx)(`a`,{className:Di.actionLink,href:`#${e.actionHref}`,"data-focus-key":`notification-${e.id}-action`,children:e.actionLabel??`Open`}):null,(0,I.jsx)(`button`,{type:`button`,className:Di.muteBtn,onClick:()=>yi(e.category,!t),"aria-pressed":t,children:t?`Unmute ${Ei[e.category]}`:`Mute ${Ei[e.category]}`})]})]})}function Ai(){let e=m(me),t=m(he),n=m(ve),r=m(ae),i=e.data,a=t.data,o=n.data,s=r.data;(0,M.useEffect)(()=>{mi(Yr({control:i,fleet:a,runs:o,inbox:s}))},[i,a,o,s])}var ji={drawer:`_drawer_itt3q_1`,titleRow:`_titleRow_itt3q_16`,closeBtn:`_closeBtn_itt3q_23`,header:`_header_itt3q_37`,desktopToggle:`_desktopToggle_itt3q_42`,clear:`_clear_itt3q_57`,list:`_list_itt3q_66`,journalLink:`_journalLink_itt3q_77`};function Mi(){Ai();let{items:e,panelOpen:t,desktopEnabled:n,desktopPermission:r}=Si(),i=(0,M.useRef)(null);async function a(){n?xi():await bi()}return(0,I.jsxs)(S,{open:t,onClose:gi,titleId:`notification-center-title`,title:(0,I.jsxs)(`span`,{className:ji.titleRow,children:[(0,I.jsx)(`span`,{children:`Notifications`}),(0,I.jsx)(`button`,{type:`button`,ref:i,className:ji.closeBtn,onClick:gi,"aria-label":`Close notifications`,children:`×`})]}),widthClassName:ji.drawer,initialFocusRef:i,children:[(0,I.jsx)(`div`,{className:ji.header,children:(0,I.jsx)(`button`,{type:`button`,className:ji.desktopToggle,onClick:()=>void a(),disabled:r===`unsupported`||r===`denied`,children:r===`unsupported`?`Desktop alerts not supported in this browser`:r===`denied`?`Desktop alerts blocked in browser settings`:n?`🔔 Desktop alerts on`:`🔕 Desktop alerts off — enable`})}),e.length===0?(0,I.jsxs)(`div`,{className:ji.clear,children:[(0,I.jsx)(`strong`,{children:`Nothing needs you right now.`}),(0,I.jsx)(`span`,{children:`The fleet is operating within its observed authority.`})]}):(0,I.jsx)(`ul`,{className:ji.list,children:e.map(e=>(0,I.jsx)(`li`,{children:(0,I.jsx)(ki,{item:e})},e.id))}),(0,I.jsx)(`a`,{href:`#/journal`,className:ji.journalLink,onClick:gi,children:`See full history in the Work Journal →`})]})}var Ni={topbar:`_topbar_nwlse_1`,paletteTrigger:`_paletteTrigger_nwlse_12`,kbd:`_kbd_nwlse_32`,actions:`_actions_nwlse_41`,lockedIndicator:`_lockedIndicator_nwlse_47`,lockBtn:`_lockBtn_nwlse_52`,themeBtn:`_themeBtn_nwlse_60`};function Pi({onOpenPalette:e}){let{theme:t,cycle:n}=c(),r=g();return(0,I.jsxs)(`header`,{className:Ni.topbar,children:[(0,I.jsxs)(`button`,{type:`button`,className:Ni.paletteTrigger,onClick:e,children:[(0,I.jsx)(`span`,{children:`Search or run a command`}),(0,I.jsx)(`kbd`,{className:Ni.kbd,children:`⌘K`})]}),(0,I.jsxs)(`div`,{className:Ni.actions,children:[(0,I.jsx)(wi,{}),r.hasHold?(0,I.jsx)(`button`,{type:`button`,className:Ni.lockBtn,onClick:r.clear,title:`Lock actions now`,children:`🔓 Unlocked`}):(0,I.jsx)(`span`,{className:Ni.lockedIndicator,title:`Actions require the dispatch token`,children:`🔒 Locked`}),(0,I.jsx)(`button`,{type:`button`,className:Ni.themeBtn,onClick:n,"aria-label":`Theme: ${t}`,children:t===`system`?`🖥️`:t===`light`?`☀️`:`🌙`})]}),(0,I.jsx)(Mi,{})]})}var Fi=t(n(),1),Ii=Hr.map(e=>({id:`nav:${e.path}`,title:e.label,subtitle:e.description,group:`Navigate`,run:t=>t(e.path)})),Li=[{id:`action:pause-fleet`,title:`Pause fleet`,subtitle:`Engage the fleet kill switch`,group:`Actions`,keywords:[`stop`,`kill`,`halt`],requiresConfirm:{title:`Pause the fleet?`,body:`This engages the global kill switch. Autonomous dispatch halts fleet-wide until explicitly resumed.`,confirmLabel:`Yes, pause`},requiresMutationToken:!0,run:async()=>{await xe()}},{id:`action:resume-fleet`,title:`Resume fleet`,subtitle:`Clear the fleet kill switch`,group:`Actions`,keywords:[`start`,`unpause`],requiresConfirm:{title:`Resume the fleet?`,body:`This clears the global kill switch. Autonomous dispatch will resume across the fleet.`,confirmLabel:`Yes, resume`},requiresMutationToken:!0,run:async()=>{await be()}},{id:`action:open-notifications`,title:`Open notification centre`,subtitle:`What needs you right now, ranked by severity`,group:`Actions`,keywords:[`alerts`,`attention`,`bell`,`needs you`],run:()=>{hi()}},{id:`action:toggle-theme`,title:`Toggle theme`,subtitle:`Cycle system → light → dark`,group:`Actions`,keywords:[`dark mode`,`light mode`,`appearance`,`dark`,`light`],run:()=>{x()}},{id:`action:open-journal-today`,title:`Open journal — today`,subtitle:`Work journal filtered to today`,group:`Actions`,keywords:[`journal`,`today`,`log`,`history`],run:e=>{e(`/journal`,{state:{windowToday:!0}})}}],Ri=[...Ii,...Li];function zi(){_(ve.key,ve.fetch),_(k.key,k.fetch);let e=_e({status:`all`,limit:500});_(e.key,e.fetch)}var Bi=5,Vi=2;function Hi(e,t){return e.toLowerCase().includes(t)}function Ui(e){let t=e.trim().toLowerCase();if(t.length<Vi)return[];let n=[],r=o(ve.key).data??[];for(let e of r){if(n.length>=Bi)break;(Hi(e.id,t)||Hi(e.goal,t))&&n.push({id:`jump:run:${e.id}`,title:e.goal,subtitle:`Run ${e.id} · ${e.status}`,group:`Jump to`,run:t=>t(`/work/runs/${e.id}`)})}let i=o(k.key).data??[],a=0;for(let e of i){if(a>=Bi)break;(Hi(e.id,t)||Hi(e.objective,t))&&(a++,n.push({id:`jump:goal:${e.id}`,title:e.objective,subtitle:`Goal ${e.id} · ${e.status}`,group:`Jump to`,run:e=>e(`/goals`)}))}let s=_e({status:`all`,limit:500}).key,c=o(s).data?.proposals??[],l=0;for(let e of c){if(l>=Bi)break;(Hi(e.id,t)||Hi(e.title,t))&&(l++,n.push({id:`jump:proposal:${e.id}`,title:e.title,subtitle:`Proposal ${e.id} · ${e.status}`,group:`Jump to`,run:t=>t(`/inbox/${encodeURIComponent(e.id)}`)}))}return n}var Wi=/^\/inbox\/([^/]+)$/;function Gi(e){let t=Wi.exec(e);if(!t)return[];let n=decodeURIComponent(t[1]),r=o(`proposal-detail-${n}`).data;return!r||r.status!==`pending`?[]:[{id:`action:approve-proposal:${n}`,title:`Approve "${r.title}"`,subtitle:`Writes the diff to disk and dispatches it`,group:`Actions`,keywords:[`approve`,`ship`,`proposal`],requiresConfirm:{title:`Approve this proposal?`,body:`"${r.title}" will be applied. This writes the diff to disk and dispatches it.`,confirmLabel:`Approve`},requiresMutationToken:!0,run:async()=>{await Ce(n)}},{id:`action:reject-proposal:${n}`,title:`Reject "${r.title}"`,subtitle:`Cannot be undone`,group:`Actions`,keywords:[`reject`,`decline`,`proposal`],requiresConfirm:{title:`Reject this proposal?`,body:`"${r.title}" will be rejected. This cannot be undone.`,confirmLabel:`Reject`,destructive:!0},requiresMutationToken:!0,run:async()=>{await Se(n)}}]}function Ki(e,t=[]){let n=e.trim().toLowerCase(),r=[...t,...Ri];return[...n?r.filter(e=>{let t=[e.title,e.subtitle??``,...e.keywords??[]].join(` `).toLowerCase();return n.split(/\s+/).every(e=>t.includes(e))}):r,...Ui(e)]}var qi={backdrop:`_backdrop_1odjm_1`,panel:`_panel_1odjm_12`,input:`_input_1odjm_24`,list:`_list_1odjm_37`,item:`_item_1odjm_42`,active:`_active_1odjm_51`,itemTitle:`_itemTitle_1odjm_55`,itemSubtitle:`_itemSubtitle_1odjm_61`,itemGroup:`_itemGroup_1odjm_67`,empty:`_empty_1odjm_75`};function Ji(e){(0,M.useEffect)(()=>{function t(t){(t.metaKey||t.ctrlKey)&&t.key.toLowerCase()===`k`&&(t.preventDefault(),e(!0))}return document.addEventListener(`keydown`,t),()=>document.removeEventListener(`keydown`,t)},[e])}function Yi({open:e,onClose:t}){let[n,r]=(0,M.useState)(``),[i,a]=(0,M.useState)(0),[o,s]=(0,M.useState)(null),[c,l]=(0,M.useState)(!1),[u,d]=(0,M.useState)(!1),f=(0,M.useRef)(null),m=(0,M.useId)(),h=gn(),g=pn(),_=De(),v=(0,M.useMemo)(()=>e?Gi(g.pathname):[],[e,g.pathname]),y=(0,M.useMemo)(()=>Ki(n,v),[n,v]);(0,M.useEffect)(()=>{if(!e)return;let t=document.activeElement;r(``),a(0),zi();let n=requestAnimationFrame(()=>f.current?.focus());return()=>{cancelAnimationFrame(n),t?.focus()}},[e]),(0,M.useEffect)(()=>{a(0)},[n]),(0,M.useEffect)(()=>{a(e=>Math.min(e,Math.max(y.length-1,0)))},[y.length]);async function b(e){try{await e.run((e,t)=>h(e,t))}catch(e){_.show(e instanceof Error?e.message:`Command failed.`,`danger`)}finally{s(null)}}function x(e){if(t(),e.requiresConfirm){s(e),l(!0);return}if(e.requiresMutationToken&&!p()){s(e),d(!0);return}b(e)}function S(){l(!1),o&&(o.requiresMutationToken&&!p()?d(!0):b(o))}function C(){l(!1),s(null)}function w(e){if(e.key===`Escape`){t();return}if(e.key===`Tab`){e.preventDefault();return}if(e.key===`ArrowDown`)e.preventDefault(),a(e=>Math.min(e+1,y.length-1));else if(e.key===`ArrowUp`)e.preventDefault(),a(e=>Math.max(e-1,0));else if(e.key===`Enter`){e.preventDefault();let t=y[i];t&&x(t)}}return(0,I.jsxs)(I.Fragment,{children:[e?(0,Fi.createPortal)((0,I.jsx)(`div`,{className:qi.backdrop,onMouseDown:e=>e.target===e.currentTarget&&t(),children:(0,I.jsxs)(`div`,{className:qi.panel,role:`dialog`,"aria-modal":`true`,"aria-label":`Command palette`,children:[(0,I.jsx)(`input`,{ref:f,className:qi.input,value:n,onChange:e=>r(e.target.value),onKeyDown:w,placeholder:`Navigate or run a command…`,role:`combobox`,"aria-expanded":`true`,"aria-controls":m,"aria-activedescendant":y[i]?`cmd-${y[i].id}`:void 0,autoComplete:`off`}),(0,I.jsx)(`ul`,{id:m,role:`listbox`,className:qi.list,children:y.length===0?(0,I.jsx)(`li`,{className:qi.empty,children:`No matching commands.`}):y.map((e,t)=>(0,I.jsxs)(`li`,{id:`cmd-${e.id}`,role:`option`,"aria-selected":t===i,className:`${qi.item} ${t===i?qi.active:``}`,onMouseEnter:()=>a(t),onMouseDown:t=>{t.preventDefault(),x(e)},children:[(0,I.jsx)(`span`,{className:qi.itemTitle,children:e.title}),e.subtitle?(0,I.jsx)(`span`,{className:qi.itemSubtitle,children:e.subtitle}):null,(0,I.jsx)(`span`,{className:qi.itemGroup,children:e.group})]},e.id))})]})}),document.body):null,o?.requiresConfirm?(0,I.jsx)(Te,{open:c,onClose:C,title:o.requiresConfirm.title,body:o.requiresConfirm.body,confirmLabel:o.requiresConfirm.confirmLabel,destructive:o.requiresConfirm.destructive,onConfirm:S}):null,(0,I.jsx)(we,{open:u,onClose:()=>{d(!1),s(null)},onUnlocked:()=>{let e=o;d(!1),s(null),e&&b(e)},reason:o?`"${o.title}" requires the dispatch token.`:void 0})]})}var Xi={shell:`_shell_2db09_1`,body:`_body_2db09_9`,main:`_main_2db09_17`};function Zi(){let e=(0,M.useRef)(null),t=pn(),[n,r]=(0,M.useState)(!1);return ke(t.pathname,e),Ji(r),(0,I.jsxs)(`div`,{className:Xi.shell,children:[(0,I.jsx)(Wr,{}),(0,I.jsxs)(`div`,{className:Xi.body,children:[(0,I.jsx)(Pi,{onOpenPalette:()=>r(!0)}),(0,I.jsx)(`main`,{ref:e,className:Xi.main,id:`main-content`,tabIndex:-1,children:(0,I.jsx)(Oe,{resetKey:t.pathname,children:(0,I.jsx)(Un,{})})})]}),(0,I.jsx)(Yi,{open:n,onClose:()=>r(!1)})]})}var Qi={wrap:`_wrap_152mr_1`,title:`_title_152mr_6`,description:`_description_152mr_13`,note:`_note_152mr_19`};function $i({title:e,description:t}){return(0,I.jsxs)(`div`,{className:Qi.wrap,children:[(0,I.jsx)(`h1`,{className:Qi.title,children:e}),(0,I.jsx)(`p`,{className:Qi.description,children:t}),(0,I.jsx)(`p`,{className:Qi.note,children:`Not built yet — this route, its nav entry, and its ⌘K command all already work.`})]})}var ea={grid:`_grid_1exd8_1`,stat:`_stat_1exd8_7`,statLabel:`_statLabel_1exd8_17`,statValue:`_statValue_1exd8_24`,statCaption:`_statCaption_1exd8_30`};function ta(){return(0,I.jsx)(v,{count:6})}function na({label:e,value:t,caption:n}){return(0,I.jsxs)(`div`,{className:ea.stat,children:[(0,I.jsx)(`span`,{className:ea.statLabel,children:e}),(0,I.jsx)(`span`,{className:ea.statValue,children:t}),n?(0,I.jsx)(`span`,{className:ea.statCaption,children:n}):null]})}function ra({snapshot:e}){let t=e.mcp.filter(e=>e.ok).length;return(0,I.jsxs)(`div`,{className:ea.grid,children:[(0,I.jsx)(na,{label:`Repos`,value:String(e.repos.total),caption:`${e.repos.dirty} dirty · ${e.repos.stale} stale`}),(0,I.jsx)(na,{label:`Tools`,value:`${e.tools.installed}/${e.tools.total}`,caption:`installed`}),(0,I.jsx)(na,{label:`Activity`,value:String(e.activity.sessions),caption:`${e.activity.tokens.toLocaleString()} tok · $${e.activity.estCostUsd.toFixed(2)}`}),(0,I.jsx)(na,{label:`MCP`,value:`${t}/${e.mcp.length}`,caption:`reachable`}),(0,I.jsx)(na,{label:`Genome`,value:String(e.genome.entries),caption:`${e.genome.projects} projects`}),(0,I.jsx)(na,{label:`Inbox`,value:String(e.inbox.pending),caption:`pending`})]})}var L={panel:`_panel_1gx0q_3`,panelHeader:`_panelHeader_1gx0q_10`,panelTitle:`_panelTitle_1gx0q_25`,panelBody:`_panelBody_1gx0q_33`,emptyState:`_emptyState_1gx0q_37`},ia={table:`_table_78j3m_1`,statusCol:`_statusCol_78j3m_27`,tokensCol:`_tokensCol_78j3m_31`,goalLink:`_goalLink_78j3m_35`,tokens:`_tokens_78j3m_31`};function aa(){return(0,I.jsxs)(`details`,{className:L.panel,open:!0,"data-state-key":`fleet-dashboard-runs`,children:[(0,I.jsx)(`summary`,{className:L.panelHeader,children:(0,I.jsx)(`span`,{className:L.panelTitle,children:`Recent runs`})}),(0,I.jsxs)(`div`,{className:L.panelBody,children:[(0,I.jsx)(l,{}),(0,I.jsx)(l,{}),(0,I.jsx)(l,{})]})]})}function oa({runs:e}){return(0,I.jsxs)(`details`,{className:L.panel,open:!0,"data-state-key":`fleet-dashboard-runs`,children:[(0,I.jsxs)(`summary`,{className:L.panelHeader,children:[(0,I.jsx)(`span`,{className:L.panelTitle,children:`Recent runs`}),(0,I.jsx)(`span`,{className:`text-tertiary text-xs`,children:e.length})]}),(0,I.jsx)(`div`,{className:L.panelBody,children:e.length===0?(0,I.jsx)(`p`,{className:L.emptyState,children:`No runs yet.`}):(0,I.jsxs)(`table`,{className:ia.table,children:[(0,I.jsx)(`thead`,{children:(0,I.jsxs)(`tr`,{children:[(0,I.jsx)(`th`,{scope:`col`,children:`Goal`}),(0,I.jsx)(`th`,{scope:`col`,className:ia.statusCol,children:`Status`}),(0,I.jsx)(`th`,{scope:`col`,className:ia.tokensCol,children:`Tokens`})]})}),(0,I.jsx)(`tbody`,{children:e.map(e=>(0,I.jsxs)(`tr`,{children:[(0,I.jsx)(`td`,{children:(0,I.jsx)(`a`,{href:`#/work/runs/${e.id}`,"data-focus-key":`run-${e.id}`,className:ia.goalLink,title:e.goal,children:e.goal})}),(0,I.jsx)(`td`,{children:(0,I.jsx)(E,{status:e.status})}),(0,I.jsx)(`td`,{className:ia.tokens,children:e.tokens.toLocaleString()})]},e.id))})]})})]})}var sa={list:`_list_1fq6m_1`,item:`_item_1fq6m_7`,itemHeader:`_itemHeader_1fq6m_13`,goal:`_goal_1fq6m_21`,burndown:`_burndown_1fq6m_42`,burndownTrack:`_burndownTrack_1fq6m_48`,burndownFill:`_burndownFill_1fq6m_56`,burndownLabel:`_burndownLabel_1fq6m_63`};function ca({swarms:e}){return(0,I.jsxs)(`details`,{className:L.panel,open:!0,"data-state-key":`fleet-dashboard-swarms`,children:[(0,I.jsxs)(`summary`,{className:L.panelHeader,children:[(0,I.jsx)(`span`,{className:L.panelTitle,children:`Swarms`}),(0,I.jsx)(`span`,{className:`text-tertiary text-xs`,children:e.length})]}),(0,I.jsx)(`div`,{className:L.panelBody,children:e.length===0?(0,I.jsx)(`p`,{className:L.emptyState,children:`No active swarms.`}):(0,I.jsx)(`ul`,{className:sa.list,children:e.map((e,t)=>{let n=e.tasksTotal>0?Math.round(e.tasksDone/e.tasksTotal*100):0;return(0,I.jsxs)(`li`,{className:sa.item,children:[(0,I.jsxs)(`a`,{href:`#/work/swarms/${e.id}`,"data-focus-key":`swarm-${e.id}`,className:sa.itemHeader,title:e.goal,children:[e.phase?(0,I.jsx)(D,{index:t}):null,(0,I.jsx)(`span`,{className:sa.goal,children:e.goal}),(0,I.jsx)(E,{status:e.status})]}),(0,I.jsxs)(`div`,{className:sa.burndown,children:[(0,I.jsx)(`div`,{className:sa.burndownTrack,children:(0,I.jsx)(`div`,{className:sa.burndownFill,style:{width:`${n}%`}})}),(0,I.jsxs)(`span`,{className:sa.burndownLabel,children:[e.tasksDone,`/`,e.tasksTotal,e.phase?` · ${e.phase}`:``]})]})]},e.id)})})})]})}var la={grid:`_grid_qy4m7_1`};function ua(){return(0,I.jsxs)(`details`,{className:L.panel,open:!0,"data-state-key":`fleet-dashboard-daemon`,children:[(0,I.jsx)(`summary`,{className:L.panelHeader,children:(0,I.jsx)(`span`,{className:L.panelTitle,children:`Daemon`})}),(0,I.jsx)(`div`,{className:L.panelBody,children:(0,I.jsx)(f,{width:`40%`})})]})}function da({daemon:e}){return(0,I.jsxs)(`details`,{className:L.panel,open:!0,"data-state-key":`fleet-dashboard-daemon`,children:[(0,I.jsxs)(`summary`,{className:L.panelHeader,children:[(0,I.jsx)(`span`,{className:L.panelTitle,children:`Daemon`}),(0,I.jsx)(T,{quality:e.sourceQuality,label:`daemon state`,children:(0,I.jsx)(E,{status:e.running?`running`:`pending`,children:e.running?`running`:`stopped`})})]}),(0,I.jsx)(`div`,{className:L.panelBody,children:(0,I.jsxs)(`dl`,{className:la.grid,children:[(0,I.jsxs)(`div`,{children:[(0,I.jsx)(`dt`,{children:`Runtime state`}),(0,I.jsx)(`dd`,{children:(0,I.jsx)(T,{quality:e.sourceQuality,label:`runtime state`,children:e.runtimeState})})]}),(0,I.jsxs)(`div`,{children:[(0,I.jsx)(`dt`,{children:`PID`}),(0,I.jsx)(`dd`,{children:(0,I.jsx)(T,{quality:e.sourceQuality,label:`pid`,children:e.pid??`—`})})]}),(0,I.jsxs)(`div`,{children:[(0,I.jsx)(`dt`,{children:`Today's spend`}),(0,I.jsx)(`dd`,{children:(0,I.jsxs)(T,{quality:e.sourceQuality,label:`spend`,children:[`$`,e.todaySpentUsd.toFixed(2)]})})]}),(0,I.jsxs)(`div`,{children:[(0,I.jsx)(`dt`,{children:`Direction mode`}),(0,I.jsx)(`dd`,{children:(0,I.jsx)(T,{quality:e.sourceQuality,label:`direction mode`,children:e.activeDirectionMode??`none`})})]})]})})]})}var fa={view:`_view_1nttk_1`,header:`_header_1nttk_8`,title:`_title_1nttk_14`,freshness:`_freshness_1nttk_20`,freshnessLabel:`_freshnessLabel_1nttk_26`,panels:`_panels_1nttk_32`,error:`_error_1nttk_39`};function pa(){let e=m(O),t=m(me);return(0,I.jsxs)(`div`,{className:fa.view,children:[(0,I.jsxs)(`header`,{className:fa.header,children:[(0,I.jsx)(`h1`,{className:fa.title,children:`Fleet Dashboard`}),(0,I.jsxs)(`div`,{className:fa.freshness,"aria-live":`polite`,children:[e.status===`refreshing`?(0,I.jsx)(A,{}):null,e.updatedAt?(0,I.jsxs)(`span`,{className:fa.freshnessLabel,children:[`Updated `,ha(e.updatedAt)]}):null]})]}),e.status===`loading`?(0,I.jsx)(ta,{}):e.status===`error`?(0,I.jsx)(ma,{message:e.error?.message??`Failed to load snapshot.`}):e.data?(0,I.jsx)(ra,{snapshot:e.data}):null,(0,I.jsxs)(`div`,{className:fa.panels,children:[e.status===`loading`?(0,I.jsx)(aa,{}):e.data?(0,I.jsx)(oa,{runs:e.data.runs}):null,e.data?(0,I.jsx)(ca,{swarms:e.data.swarms}):null,t.status===`loading`?(0,I.jsx)(ua,{}):t.status===`error`?(0,I.jsx)(ma,{message:t.error?.message??`Failed to load control snapshot.`}):t.data?(0,I.jsx)(da,{daemon:t.data.daemon}):null]})]})}function ma({message:e}){return(0,I.jsx)(`div`,{className:fa.error,role:`alert`,children:e})}function ha(e){let t=Math.max(0,Math.round((Date.now()-e)/1e3));return t<5?`just now`:t<60?`${t}s ago`:`${Math.round(t/60)}m ago`}var ga={status:`connecting`,chunks:[],outputChunks:[],starts:[],stall:null,runDone:null,version:0};function _a(e){let t=e;try{return JSON.parse(t.data)}catch{return null}}function va(e,t){let[n,r]=(0,M.useState)(ga);return(0,M.useEffect)(()=>{if(!t){r(ga);return}if(r(ga),typeof EventSource>`u`){r(e=>({...e,status:`unavailable`}));return}let n=`/api/run/${encodeURIComponent(e)}/events?client=${encodeURIComponent(s())}`,i=new EventSource(n,{withCredentials:!0});return i.onopen=()=>{r(e=>e.status===`unavailable`?e:{...e,status:`open`})},i.onerror=()=>{r(e=>e.status===`open`?e:{...e,status:`unavailable`})},i.addEventListener(`step-started`,e=>{let t=_a(e);t&&r(e=>({...e,starts:[...e.starts,t],version:e.version+1}))}),i.addEventListener(`step-output-chunk`,e=>{let t=_a(e);t&&r(e=>({...e,chunks:[...e.chunks,t],version:e.version+1}))}),i.addEventListener(`step-done`,()=>{r(e=>({...e,stall:null,version:e.version+1}))}),i.addEventListener(`output-chunk`,e=>{let t=_a(e);t&&r(e=>({...e,outputChunks:[...e.outputChunks,t],version:e.version+1}))}),i.addEventListener(`stall`,e=>{let t=_a(e);t&&r(e=>({...e,stall:{ageMs:t.ageMs,at:Date.now()},version:e.version+1}))}),i.addEventListener(`run-done`,e=>{let t=_a(e);r(e=>({...e,runDone:t??{status:`done`,result:null,terminationReason:null},stall:null,version:e.version+1}))}),()=>{i.close()}},[e,t]),n}var ya=2e3,ba=ya*4;function xa(e){return e?`${e.status}:${e.steps.length}:${e.updatedAt}`:null}function Sa(e){let t=(0,M.useMemo)(()=>ne(e),[e]),n=m(t),r=d(t),[i,a]=(0,M.useState)(null),[o,s]=(0,M.useState)(null),[,c]=(0,M.useState)(0),l=n.data?n.data.status!==`running`:!1,u=n.error instanceof h&&n.error.status===404,f=va(e,!l&&!u),p=f.status===`open`?`sse`:`polling`,g=xa(n.data);(0,M.useEffect)(()=>{g!==null&&a(Date.now())},[g]),(0,M.useEffect)(()=>{if(l||u||p===`sse`)return;let e=setInterval(()=>{r(),s(Date.now()),c(e=>e+1)},ya);return()=>clearInterval(e)},[r,l,u,p]),(0,M.useEffect)(()=>{p===`sse`&&f.version!==0&&(r(),s(Date.now()))},[f.version,p,r]);let _=ya*6,v=p===`sse`&&f.stall!==null&&Date.now()-f.stall.at<_,y;return y=u?`not-found`:n.status===`error`&&n.data===void 0?`error`:n.status===`loading`?`connecting`:n.data?n.data.status===`running`?p===`sse`?v?`stalled`:`live`:i!==null&&Date.now()-i>ba?`stalled`:`live`:`done`:`connecting`,{phase:y,run:n.data,error:n.error,lastChangedAt:i,lastPolledAt:o,pollNow:()=>{r(),s(Date.now())},transport:p,chunks:f.chunks,outputChunks:f.outputChunks,stallAgeMs:v?f.stall.ageMs:null}}var R={panel:`_panel_z6jlr_1`,header:`_header_z6jlr_12`,headerTop:`_headerTop_z6jlr_18`,title:`_title_z6jlr_25`,statRow:`_statRow_z6jlr_35`,banner:`_banner_z6jlr_53`,bannerWarning:`_bannerWarning_z6jlr_64`,bannerDanger:`_bannerDanger_z6jlr_69`,bannerDot:`_bannerDot_z6jlr_74`,livePulse:`_livePulse_z6jlr_1`,transcriptWrap:`_transcriptWrap_z6jlr_102`,transcript:`_transcript_z6jlr_102`,followButton:`_followButton_z6jlr_122`,empty:`_empty_z6jlr_151`,step:`_step_z6jlr_158`,stepKind:`_stepKind_z6jlr_171`,stepTime:`_stepTime_z6jlr_191`,stepTask:`_stepTask_z6jlr_195`,stepSummary:`_stepSummary_z6jlr_202`,stepUsage:`_stepUsage_z6jlr_207`},Ca={plan:`Plan`,model:`Model`,tool:`Tool`,synthesize:`Synthesize`};function wa(e,t){let n=new Date(e).getTime(),r=t?new Date(t).getTime():Date.now(),i=Math.max(0,Math.round((r-n)/1e3));return i<60?`${i}s`:`${Math.floor(i/60)}m ${i%60}s`}function Ta(e){try{return new Date(e).toLocaleTimeString(void 0,{hour12:!1})}catch{return e}}function Ea({phase:e,lastChangedAt:t,stallAgeMs:n,transport:r,error:i}){if(e===`connecting`)return(0,I.jsxs)(`div`,{className:R.banner,role:`status`,children:[(0,I.jsx)(`span`,{className:R.bannerDot,"data-tone":`connecting`,"aria-hidden":`true`}),`Connecting to run…`]});if(e===`not-found`)return(0,I.jsxs)(`div`,{className:`${R.banner} ${R.bannerDanger}`,role:`alert`,children:[(0,I.jsx)(`span`,{className:R.bannerDot,"data-tone":`danger`,"aria-hidden":`true`}),`Run not found. It may have been pruned from disk since this link was opened.`]});if(e===`error`)return(0,I.jsxs)(`div`,{className:`${R.banner} ${R.bannerDanger}`,role:`alert`,children:[(0,I.jsx)(`span`,{className:R.bannerDot,"data-tone":`danger`,"aria-hidden":`true`}),`Stream disconnected`,i?`: ${i.message}`:``,`. Retrying every `,ya/1e3,`s…`]});if(e===`stalled`){let e=n===null?t===null?null:Math.round((Date.now()-t)/1e3):Math.round(n/1e3);return(0,I.jsxs)(`div`,{className:`${R.banner} ${R.bannerWarning}`,role:`status`,"aria-live":`polite`,children:[(0,I.jsx)(`span`,{className:R.bannerDot,"data-tone":`warning`,"aria-hidden":`true`}),`No change observed`,e===null?``:` in ${e}s`,` — this run may be stalled, or is simply quiet between steps. Still `,r===`sse`?`watching`:`polling`,`.`]})}return e===`live`?(0,I.jsxs)(`div`,{className:R.banner,role:`status`,children:[(0,I.jsx)(`span`,{className:R.bannerDot,"data-tone":`live`,"aria-hidden":`true`}),r===`sse`?`Live · streaming (server tail ~500ms)`:`Live · polling every ${ya/1e3}s (server refresh floor ~1.5s — this cannot be faster than that)`]}):(0,I.jsxs)(`div`,{className:R.banner,role:`status`,children:[(0,I.jsx)(`span`,{className:R.bannerDot,"data-tone":`done`,"aria-hidden":`true`}),`Run finished — no longer `,r===`sse`?`streaming`:`polling`,`.`]})}function Da(){return(0,I.jsxs)(`div`,{className:R.panel,children:[(0,I.jsx)(f,{width:`40%`}),(0,I.jsx)(f,{width:`90%`}),(0,I.jsx)(f,{width:`70%`})]})}function Oa({runId:e}){let{phase:t,run:n,error:r,lastChangedAt:i,transport:a,stallAgeMs:o,outputChunks:s}=Sa(e),c=(0,M.useRef)(null),l=(0,M.useRef)(!0),[u,d]=(0,M.useState)(!0),f=(0,M.useRef)(null),p=(0,M.useRef)(!0),[m,h]=(0,M.useState)(!0);(0,M.useEffect)(()=>{let e=c.current;e&&l.current&&(e.scrollTop=e.scrollHeight)},[n?.steps.length]),(0,M.useEffect)(()=>{let e=f.current;e&&p.current&&(e.scrollTop=e.scrollHeight)},[s.length]);function g(){let e=c.current;if(!e)return;let t=e.scrollHeight-e.scrollTop-e.clientHeight<48;l.current=t,d(t)}function _(){let e=f.current;if(!e)return;let t=e.scrollHeight-e.scrollTop-e.clientHeight<48;p.current=t,h(t)}function v(){l.current=!0,d(!0);let e=c.current;e&&(e.scrollTop=e.scrollHeight)}function y(){p.current=!0,h(!0);let e=f.current;e&&(e.scrollTop=e.scrollHeight)}return!n&&t===`connecting`?(0,I.jsx)(Da,{}):(0,I.jsxs)(`div`,{className:R.panel,children:[(0,I.jsxs)(`header`,{className:R.header,children:[(0,I.jsxs)(`div`,{className:R.headerTop,children:[(0,I.jsx)(`h3`,{className:R.title,children:n?.goal??`Run ${e}`}),n?(0,I.jsx)(E,{status:n.status}):null]}),n?(0,I.jsxs)(`dl`,{className:R.statRow,children:[(0,I.jsxs)(`div`,{children:[(0,I.jsx)(`dt`,{children:`Elapsed`}),(0,I.jsx)(`dd`,{children:wa(n.createdAt,n.status===`running`?void 0:n.updatedAt)})]}),(0,I.jsxs)(`div`,{children:[(0,I.jsx)(`dt`,{children:`Tokens`}),(0,I.jsxs)(`dd`,{children:[n.usage.tokensIn.toLocaleString(),` in / `,n.usage.tokensOut.toLocaleString(),` out`]})]}),(0,I.jsxs)(`div`,{children:[(0,I.jsx)(`dt`,{children:`Cost`}),(0,I.jsxs)(`dd`,{children:[`$`,n.usage.estCostUsd.toFixed(3)]})]}),(0,I.jsxs)(`div`,{children:[(0,I.jsx)(`dt`,{children:`Steps`}),(0,I.jsx)(`dd`,{children:n.steps.length})]}),(0,I.jsxs)(`div`,{children:[(0,I.jsx)(`dt`,{children:`Tasks`}),(0,I.jsxs)(`dd`,{children:[n.tasks.filter(e=>e.status===`done`).length,`/`,n.tasks.length]})]})]}):null]}),(0,I.jsx)(Ea,{phase:t,lastChangedAt:i,stallAgeMs:o,transport:a,error:r}),s.length>0?(0,I.jsxs)(`div`,{className:R.transcriptWrap,children:[(0,I.jsx)(`div`,{ref:f,className:R.transcript,onScroll:_,tabIndex:0,role:`log`,"aria-label":`Live engine output`,"aria-live":m?`polite`:`off`,children:s.map((e,t)=>(0,I.jsxs)(`div`,{className:R.step,"data-focus-key":`run-output-chunk-${t}`,children:[(0,I.jsx)(`span`,{className:R.stepKind,"data-kind":e.kind,children:e.kind}),(0,I.jsx)(`span`,{className:R.stepTime,title:e.ts,children:Ta(e.ts)}),(0,I.jsx)(`span`,{className:R.stepTask,children:e.taskId??``}),(0,I.jsx)(`span`,{className:R.stepSummary,children:e.text})]},`${e.ts}-${t}`))}),m?null:(0,I.jsx)(`button`,{type:`button`,className:R.followButton,onClick:y,children:`↓ Follow`})]}):null,(0,I.jsxs)(`div`,{className:R.transcriptWrap,children:[(0,I.jsx)(`div`,{ref:c,className:R.transcript,onScroll:g,tabIndex:0,role:`log`,"aria-label":`Run step transcript`,"aria-live":u?`polite`:`off`,children:!n||n.steps.length===0?(0,I.jsx)(`p`,{className:R.empty,children:`No steps recorded yet.`}):n.steps.map((e,t)=>(0,I.jsxs)(`div`,{className:R.step,"data-focus-key":`run-stream-step-${t}`,children:[(0,I.jsx)(`span`,{className:R.stepKind,"data-kind":e.kind,children:Ca[e.kind]??e.kind}),(0,I.jsx)(`span`,{className:R.stepTime,title:e.ts,children:Ta(e.ts)}),(0,I.jsx)(`span`,{className:R.stepTask,children:e.taskId}),(0,I.jsx)(`span`,{className:R.stepSummary,children:e.summary}),e.usage?(0,I.jsxs)(`span`,{className:R.stepUsage,children:[(e.usage.tokensIn+e.usage.tokensOut).toLocaleString(),` tok`]}):null]},`${e.ts}-${t}`))}),u?null:(0,I.jsx)(`button`,{type:`button`,className:R.followButton,onClick:v,children:`↓ Follow`})]})]})}var ka={strip:`_strip_21e8x_1`,label:`_label_21e8x_11`,list:`_list_21e8x_20`,watchBtn:`_watchBtn_21e8x_29`,pulse:`_pulse_21e8x_46`,dialogWidth:`_dialogWidth_21e8x_70`};function Aa(){let e=m(O),[t,n]=(0,M.useState)(null),r=(e.data?.runs??[]).filter(e=>e.status===`running`);return r.length===0?null:(0,I.jsxs)(`div`,{className:ka.strip,children:[(0,I.jsx)(`span`,{className:ka.label,children:`Live now`}),(0,I.jsx)(`ul`,{className:ka.list,"aria-live":`polite`,"aria-label":`Currently running`,children:r.map(e=>(0,I.jsx)(`li`,{children:(0,I.jsxs)(`button`,{type:`button`,className:ka.watchBtn,onClick:()=>n(e.id),children:[(0,I.jsx)(`span`,{className:ka.pulse,"aria-hidden":`true`}),e.goal]})},e.id))}),(0,I.jsx)(S,{open:t!==null,onClose:()=>n(null),titleId:`live-now-title`,title:`Watching live`,widthClassName:ka.dialogWidth,children:t?(0,I.jsx)(Oa,{runId:t}):null})]})}function ja(e){switch(e){case`merge`:return`merged`;case`dispatch`:return`running`;case`tick`:return`info`;default:return`pending`}}function Ma(e){let t=[];for(let[n,r]of(e.logs?.entries??[]).entries())t.push({id:`log-${r.ts}-${n}`,ts:r.ts,source:`daemon-tick`,title:r.kind===`merge`?`Daemon merge`:r.kind===`dispatch`?`Daemon dispatch`:`Daemon tick`,detail:r.msg+(r.dryRun?` (dry run)`:``),statusLabel:ja(r.kind),sourceQuality:e.logs?.sourceQuality});for(let[n,r]of(e.fleetActivity?.recentTicks??[]).entries())t.push({id:`fleet-tick-${r.ts}-${n}`,ts:r.ts,source:`daemon-tick`,title:`Fleet tick`,detail:[r.reason,r.directionReason].filter(Boolean).join(` — `)||`${r.merged} merged, $${r.spentUsd.toFixed(2)} spent`,statusLabel:r.dryRun?`pending`:`info`,sourceQuality:e.fleetActivity?.recentTicksSourceQuality});for(let[n,r]of(e.fleetActivity?.recentMerges??[]).entries())t.push({id:`merge-${r.ts}-${n}`,ts:r.ts,source:`merge`,title:`Merged in ${r.repo??`unknown repo`}`,detail:`${r.engine??`unknown engine`}${r.proposalId?` · proposal ${r.proposalId}`:``}`,repo:r.repo??void 0,statusLabel:`merged`,sourceQuality:e.fleetActivity?.recentMergesSourceQuality,drillIn:r.proposalId?{proposalId:r.proposalId}:void 0});for(let[n,r]of(e.fleetActivity?.recentActions??[]).entries())t.push({id:`action-${r.ts}-${n}`,ts:r.ts,source:`agent-action`,title:r.proseDigest??r.summary??r.action,detail:r.summary,repo:r.repo,statusLabel:r.outcome,sourceQuality:e.fleetActivity?.recentActionsSource,drillIn:r.proposalId?{proposalId:r.proposalId}:r.runId?{runId:r.runId}:void 0});for(let n of e.runs??[])t.push({id:`run-${n.id}`,ts:n.updatedAt,source:`run`,title:n.goal,detail:n.result??n.terminationReason??`${n.steps.length} step(s), ${n.tasks.length} task(s)`,statusLabel:n.status,drillIn:{runId:n.id}});for(let n of e.inbox?.proposals??[])t.push({id:`proposal-pending-${n.id}`,ts:n.createdAt,source:`proposal`,title:n.title,detail:`${n.kind} · ${n.origin}`,repo:n.repo,statusLabel:`pending`,drillIn:{proposalId:n.id}});return t.sort((e,t)=>new Date(t.ts).getTime()-new Date(e.ts).getTime()),t}function Na(e=new Date){let t=new Date(e.getFullYear(),e.getMonth(),e.getDate());return e.getTime()-t.getTime()}function Pa(e,t){let n=Date.now(),r=t.query.trim().toLowerCase();return e.filter(e=>!(!t.sources.has(e.source)||t.windowMs!==null&&n-new Date(e.ts).getTime()>t.windowMs||r&&!`${e.title} ${e.detail} ${e.repo??``} ${e.statusLabel}`.toLowerCase().includes(r)))}function Fa(e,t){let n=Date.now(),r=36e5,i=[];for(let e=t-1;e>=0;e--)i.push({bucketStartMs:n-e*r,count:0});for(let a of e){let e=n-new Date(a.ts).getTime();if(e<0||e>t*r)continue;let o=t-1-Math.floor(e/r);o>=0&&o<i.length&&(i[o].count+=1)}return i}var Ia={bar:`_bar_1kce8_1`,search:`_search_1kce8_12`,sources:`_sources_1kce8_28`,sourceOption:`_sourceOption_1kce8_34`,windowSelect:`_windowSelect_1kce8_43`},La=[{value:`run`,label:`Runs`},{value:`merge`,label:`Merges`},{value:`proposal`,label:`Proposals`},{value:`agent-action`,label:`Agent actions`},{value:`daemon-tick`,label:`Daemon ticks`}],Ra=[{value:`1h`,label:`Last hour`,ms:36e5},{value:`today`,label:`Today`,ms:null,dynamic:!0},{value:`24h`,label:`Last 24h`,ms:864e5},{value:`7d`,label:`Last 7 days`,ms:6048e5},{value:`all`,label:`All available`,ms:null}];function za({sources:e,onSourcesChange:t,query:n,onQueryChange:r,windowValue:i,onWindowChange:a}){function o(n){let r=new Set(e);r.has(n)?r.delete(n):r.add(n),t(r)}return(0,I.jsxs)(`div`,{className:Ia.bar,children:[(0,I.jsx)(`input`,{type:`search`,className:Ia.search,placeholder:`Search title, detail, repo…`,value:n,onChange:e=>r(e.target.value),"aria-label":`Search the work journal`}),(0,I.jsx)(`div`,{className:Ia.sources,role:`group`,"aria-label":`Filter by source`,children:La.map(t=>(0,I.jsxs)(`label`,{className:Ia.sourceOption,children:[(0,I.jsx)(`input`,{type:`checkbox`,checked:e.has(t.value),onChange:()=>o(t.value)}),t.label]},t.value))}),(0,I.jsx)(`select`,{className:Ia.windowSelect,value:i,onChange:e=>{let t=Ra.find(t=>t.value===e.target.value);a(e.target.value,t?.dynamic?Na():t?.ms??null)},"aria-label":`Time window`,children:Ra.map(e=>(0,I.jsx)(`option`,{value:e.value,children:e.label},e.value))})]})}var Ba=new Set(La.map(e=>e.value)),Va={strip:`_strip_h22ae_1`,bar:`_bar_h22ae_12`,fill:`_fill_h22ae_33`};function Ha({entries:e,hours:t,onScrubTo:n}){let r=Fa(e,t),i=Math.max(1,...r.map(e=>e.count));return(0,I.jsx)(`div`,{className:Va.strip,role:`group`,"aria-label":`Activity density over the last ${t} hours`,children:r.map(e=>{let t=Math.round(e.count/i*100),r=new Date(e.bucketStartMs).toLocaleTimeString(void 0,{hour:`numeric`});return(0,I.jsx)(`button`,{type:`button`,className:Va.bar,onClick:()=>n(e.bucketStartMs),disabled:e.count===0,title:`${r}: ${e.count} entr${e.count===1?`y`:`ies`}`,"aria-label":`${r}: ${e.count} entries`,children:(0,I.jsx)(`span`,{className:Va.fill,style:{height:`${Math.max(t,e.count>0?8:0)}%`}})},e.bucketStartMs)})})}var Ua={detailBody:`_detailBody_bgyq9_1`,grid:`_grid_bgyq9_10`,rationale:`_rationale_bgyq9_27`,diffDetails:`_diffDetails_bgyq9_34`,diff:`_diff_bgyq9_34`,error:`_error_bgyq9_56`};function Wa({proposalId:e}){let t=m(ce(e));if(t.status===`loading`)return(0,I.jsx)(f,{width:`80%`});if(t.status===`error`)return(0,I.jsxs)(`p`,{className:Ua.error,children:[`Could not load proposal `,e,`: `,t.error?.message??`not found on disk (it may have been pruned).`]});let n=t.data;return n?(0,I.jsxs)(`div`,{className:Ua.detailBody,children:[(0,I.jsxs)(`dl`,{className:Ua.grid,children:[(0,I.jsxs)(`div`,{children:[(0,I.jsx)(`dt`,{children:`Status`}),(0,I.jsx)(`dd`,{children:(0,I.jsx)(E,{status:n.status})})]}),n.riskClass?(0,I.jsxs)(`div`,{children:[(0,I.jsx)(`dt`,{children:`Risk`}),(0,I.jsx)(`dd`,{children:n.riskClass})]}):null,n.taste?(0,I.jsxs)(`div`,{children:[(0,I.jsx)(`dt`,{children:`Judge verdict`}),(0,I.jsxs)(`dd`,{children:[n.taste.verdict,` · alignment `,n.taste.alignment,`/10 · ambition `,n.taste.ambition,`/10 · design`,` `,n.taste.design,`/10`]})]}):null,n.decisionReason?(0,I.jsxs)(`div`,{children:[(0,I.jsx)(`dt`,{children:`Decision`}),(0,I.jsx)(`dd`,{children:n.decisionReason})]}):null,n.learningSource?(0,I.jsxs)(`div`,{children:[(0,I.jsx)(`dt`,{children:`Learning source`}),(0,I.jsx)(`dd`,{children:n.learningSource})]}):null]}),n.taste?.rationale?(0,I.jsx)(`p`,{className:Ua.rationale,children:n.taste.rationale}):null,n.diff?(0,I.jsxs)(`details`,{className:Ua.diffDetails,children:[(0,I.jsxs)(`summary`,{children:[`Diff (`,n.diff.split(`
4
+ `).length,` lines)`]}),(0,I.jsx)(`pre`,{className:Ua.diff,children:n.diff})]}):(0,I.jsx)(`p`,{className:Ua.error,children:`No diff recorded for this proposal.`})]}):null}function Ga({drillIn:e}){return e.runId?(0,I.jsx)(Oa,{runId:e.runId}):e.proposalId?(0,I.jsx)(Wa,{proposalId:e.proposalId}):null}var Ka={row:`_row_194dy_1`,summary:`_summary_194dy_9`,sourceTag:`_sourceTag_194dy_31`,when:`_when_194dy_53`,repo:`_repo_194dy_61`,title:`_title_194dy_70`,expandHint:`_expandHint_194dy_80`,body:`_body_194dy_86`,detailText:`_detailText_194dy_90`},qa={"daemon-tick":`Daemon`,merge:`Merge`,"agent-action":`Agent`,run:`Run`,proposal:`Proposal`};function Ja(e){let t=new Date(e);return`${t.toLocaleDateString(void 0,{month:`short`,day:`numeric`})} ${t.toLocaleTimeString(void 0,{hour:`2-digit`,minute:`2-digit`})}`}function Ya({entry:e}){let t=!!e.drillIn,[n,r]=(0,M.useState)(!1);return(0,I.jsxs)(`details`,{className:Ka.row,"data-state-key":`journal-${e.id}`,onToggle:e=>r(e.currentTarget.open),children:[(0,I.jsxs)(`summary`,{className:Ka.summary,"data-focus-key":`journal-${e.id}`,children:[(0,I.jsx)(`span`,{className:Ka.sourceTag,"data-source":e.source,children:qa[e.source]}),(0,I.jsx)(`span`,{className:Ka.when,title:e.ts,children:Ja(e.ts)}),(0,I.jsx)(E,{status:e.statusLabel}),e.repo?(0,I.jsx)(`span`,{className:Ka.repo,children:e.repo}):null,(0,I.jsx)(`span`,{className:Ka.title,children:e.title}),(0,I.jsx)(C,{quality:e.sourceQuality}),t?(0,I.jsx)(`span`,{className:Ka.expandHint,"aria-hidden":`true`,children:`why? ▾`}):null]}),(0,I.jsxs)(`div`,{className:Ka.body,children:[(0,I.jsx)(`p`,{className:Ka.detailText,children:e.detail}),n&&e.drillIn?(0,I.jsx)(Ga,{drillIn:e.drillIn}):null]})]})}var Xa={view:`_view_1omi1_1`,header:`_header_1omi1_9`,title:`_title_1omi1_16`,windowNote:`_windowNote_1omi1_23`,freshness:`_freshness_1omi1_30`,freshnessLabel:`_freshnessLabel_1omi1_37`,errorBanner:`_errorBanner_1omi1_42`,panel:`_panel_1omi1_50`,list:`_list_1omi1_57`,empty:`_empty_1omi1_63`},Za=8e3;function Qa(e){let t=Math.max(0,Math.round((Date.now()-e)/1e3));return t<5?`just now`:t<60?`${t}s ago`:`${Math.round(t/60)}m ago`}function $a(){let e=pn().state?.windowToday===!0,t=m(de),n=m(fe),r=m(ve),i=m(ae),a=d(de);(0,M.useEffect)(()=>{let e=setInterval(a,Za);return()=>clearInterval(e)},[a]);let[o,s]=(0,M.useState)(new Set(Ba)),[c,u]=(0,M.useState)(``),[f,p]=(0,M.useState)(e?`today`:`24h`),[h,g]=(0,M.useState)(e?Na():864e5),_=(0,M.useMemo)(()=>Ma({logs:t.data,fleetActivity:n.data,runs:r.data,inbox:i.data}),[t.data,n.data,r.data,i.data]),v=(0,M.useMemo)(()=>Pa(_,{sources:o,query:c,windowMs:h}),[_,o,c,h]),y=(0,M.useRef)(new Map);function b(e){let t=v.find(t=>new Date(t.ts).getTime()<=e+36e5);t&&y.current.get(t.id)?.scrollIntoView({behavior:`smooth`,block:`center`})}let x=t.status===`loading`&&n.status===`loading`&&r.status===`loading`&&i.status===`loading`,S=[t,n,r,i].some(e=>e.status===`refreshing`),C=Math.max(t.updatedAt??0,n.updatedAt??0,r.updatedAt??0,i.updatedAt??0),w=[t.status===`error`?`daemon log: ${t.error?.message}`:null,n.status===`error`?`fleet activity: ${n.error?.message}`:null,r.status===`error`?`runs: ${r.error?.message}`:null,i.status===`error`?`inbox: ${i.error?.message}`:null].filter(e=>e!==null);return(0,I.jsxs)(`div`,{className:Xa.view,children:[(0,I.jsxs)(`header`,{className:Xa.header,children:[(0,I.jsxs)(`div`,{children:[(0,I.jsx)(`h1`,{className:Xa.title,children:`Work Journal`}),(0,I.jsx)(`p`,{className:Xa.windowNote,children:`Merges the daemon log (last 200 lines), fleet activity (last ~20 merges/ticks/agent actions), recent runs (last 200), and the pending-proposal inbox. The read API does not expose the full on-disk history beyond this window.`})]}),(0,I.jsxs)(`div`,{className:Xa.freshness,"aria-live":`polite`,children:[S?(0,I.jsx)(A,{}):null,C>0?(0,I.jsxs)(`span`,{className:Xa.freshnessLabel,children:[`Updated `,Qa(C)]}):null]})]}),w.length>0?(0,I.jsxs)(`div`,{className:Xa.errorBanner,role:`alert`,children:[`Some sources failed to load: `,w.join(`; `)]}):null,(0,I.jsx)(Aa,{}),x?(0,I.jsxs)(`div`,{className:Xa.panel,children:[(0,I.jsx)(l,{}),(0,I.jsx)(l,{}),(0,I.jsx)(l,{}),(0,I.jsx)(l,{})]}):(0,I.jsxs)(I.Fragment,{children:[(0,I.jsx)(Ha,{entries:_,hours:24,onScrubTo:b}),(0,I.jsx)(za,{sources:o,onSourcesChange:s,query:c,onQueryChange:u,windowValue:f,onWindowChange:(e,t)=>{p(e),g(t)}}),(0,I.jsx)(`div`,{className:Xa.panel,children:v.length===0?(0,I.jsx)(`p`,{className:Xa.empty,children:`Nothing matches the current filters in this window.`}):(0,I.jsx)(`ul`,{className:Xa.list,children:v.map(e=>(0,I.jsx)(`li`,{ref:t=>{t?y.current.set(e.id,t):y.current.delete(e.id)},children:(0,I.jsx)(Ya,{entry:e})},e.id))})})]})]})}var eo={view:`_view_7836g_1`,header:`_header_7836g_7`,title:`_title_7836g_15`,freshness:`_freshness_7836g_21`,freshnessLabel:`_freshnessLabel_7836g_27`,filterRow:`_filterRow_7836g_32`,windowGroup:`_windowGroup_7836g_38`,windowButton:`_windowButton_7836g_45`,windowButtonActive:`_windowButtonActive_7836g_64`,kpiGrid:`_kpiGrid_7836g_70`,chartsGrid:`_chartsGrid_7836g_76`,error:`_error_7836g_82`},to=[`1d`,`7d`,`30d`],no={ok:`success`,warn:`warning`,over:`danger`};function ro(e){let t=e.replace(/\/+$/,``).split(`/`);return t[t.length-1]||e}function io(){let[e,t]=(0,M.useState)(`7d`),n=m(se(e));return(0,I.jsxs)(`div`,{className:eo.view,children:[(0,I.jsxs)(`header`,{className:eo.header,children:[(0,I.jsx)(`h1`,{className:eo.title,children:`Pulse`}),(0,I.jsxs)(`div`,{className:eo.freshness,"aria-live":`polite`,children:[n.status===`refreshing`?(0,I.jsx)(A,{}):null,n.updatedAt?(0,I.jsxs)(`span`,{className:eo.freshnessLabel,children:[`Updated `,oo(n.updatedAt)]}):null]})]}),(0,I.jsxs)(`div`,{className:eo.filterRow,role:`group`,"aria-label":`Time window`,children:[(0,I.jsx)(`div`,{className:eo.windowGroup,children:to.map(n=>(0,I.jsx)(`button`,{type:`button`,className:`${eo.windowButton} ${n===e?eo.windowButtonActive:``}`,"aria-pressed":n===e,onClick:()=>t(n),children:n},n))}),n.data?(0,I.jsx)(E,{status:n.data.budget.level,tone:no[n.data.budget.level],children:n.data.budget.message}):null]}),n.status===`loading`?(0,I.jsx)(v,{count:4}):n.status===`error`?(0,I.jsx)(`div`,{className:eo.error,role:`alert`,children:n.error?.message??`Failed to load pulse data.`}):n.data?(0,I.jsx)(ao,{rollup:n.data}):null]})}function ao({rollup:e}){let t=[{id:`cost`,label:`Est. cost (USD)`,points:e.byDay.map(e=>({x:ze(e.day),y:e.estCostUsd}))}],n=[...e.byProject].sort((e,t)=>t.estCostUsd-e.estCostUsd).slice(0,8),r=n.map(e=>({label:ro(e.project),value:e.estCostUsd})),i=[...e.byModel].sort((e,t)=>t.estCostUsd-e.estCostUsd).slice(0,8),a=i.map(e=>({label:e.model,value:e.estCostUsd}));return(0,I.jsxs)(I.Fragment,{children:[(0,I.jsxs)(`div`,{className:eo.kpiGrid,children:[(0,I.jsx)(j,{label:`Est. cost`,value:Le(e.totals.estCostUsd),caption:e.window}),(0,I.jsx)(j,{label:`Tokens`,value:Re(e.totals.tokensIn+e.totals.tokensOut),caption:`${Re(e.totals.tokensIn)} in / ${Re(e.totals.tokensOut)} out`}),(0,I.jsx)(j,{label:`Sessions`,value:String(e.totals.sessions)}),(0,I.jsx)(j,{label:`Commits`,value:String(e.totals.commits)})]}),(0,I.jsxs)(`div`,{className:eo.chartsGrid,children:[(0,I.jsx)(Me,{title:`Cost over time`,description:`since ${new Date(e.since).toLocaleDateString()}`,empty:e.byDay.length===0,emptyMessage:`No activity recorded in this window.`,table:(0,I.jsx)(je,{caption:`Daily cost`,rowKey:e=>e.day,rows:e.byDay,columns:[{key:`day`,label:`Day`,render:e=>e.day},{key:`cost`,label:`Cost`,numeric:!0,render:e=>Le(e.estCostUsd)},{key:`sessions`,label:`Sessions`,numeric:!0,render:e=>String(e.sessions)}]}),children:(0,I.jsx)(Pe,{series:t,area:!0,ariaLabel:`Estimated cost over time`,formatX:e=>new Date(e).toLocaleDateString(void 0,{month:`short`,day:`numeric`}),formatY:e=>Le(e)})}),(0,I.jsx)(Me,{title:`Top projects by cost`,empty:r.length===0,emptyMessage:`No project activity in this window.`,table:(0,I.jsx)(je,{caption:`Cost by project`,rowKey:e=>e.project,rows:n,columns:[{key:`project`,label:`Project`,render:e=>ro(e.project)},{key:`sessions`,label:`Sessions`,numeric:!0,render:e=>String(e.sessions)},{key:`commits`,label:`Commits`,numeric:!0,render:e=>String(e.commits)},{key:`cost`,label:`Cost`,numeric:!0,render:e=>Le(e.estCostUsd)}]}),children:(0,I.jsx)(Ne,{data:r,orientation:`horizontal`,ariaLabel:`Top projects by estimated cost`,formatValue:e=>Le(e)})}),(0,I.jsx)(Me,{title:`Cost by model`,empty:a.length===0,emptyMessage:`No model activity in this window.`,table:(0,I.jsx)(je,{caption:`Cost by model`,rowKey:e=>e.model,rows:i,columns:[{key:`model`,label:`Model`,render:e=>e.model},{key:`calls`,label:`Calls`,numeric:!0,render:e=>String(e.calls)},{key:`tokens`,label:`Tokens`,numeric:!0,render:e=>Re(e.tokensIn+e.tokensOut)},{key:`cost`,label:`Cost`,numeric:!0,render:e=>Le(e.estCostUsd)}]}),children:(0,I.jsx)(Ne,{data:a,ariaLabel:`Cost by model`,formatValue:e=>Le(e)})})]})]})}function oo(e){let t=Math.max(0,Math.round((Date.now()-e)/1e3));return t<5?`just now`:t<60?`${t}s ago`:`${Math.round(t/60)}m ago`}var z={view:`_view_44i9i_1`,header:`_header_44i9i_7`,title:`_title_44i9i_15`,searchRow:`_searchRow_44i9i_21`,searchInput:`_searchInput_44i9i_27`,resultCount:`_resultCount_44i9i_43`,results:`_results_44i9i_48`,row:`_row_44i9i_57`,rowHeader:`_rowHeader_44i9i_64`,rowTitle:`_rowTitle_44i9i_72`,rowMeta:`_rowMeta_44i9i_78`,badge:`_badge_44i9i_87`,snippet:`_snippet_44i9i_97`,tags:`_tags_44i9i_107`,tag:`_tag_44i9i_107`,skeletons:`_skeletons_44i9i_123`,empty:`_empty_44i9i_129`,error:`_error_44i9i_136`},so=50,co=300;function lo(e,t){let[n,r]=(0,M.useState)(e);return(0,M.useEffect)(()=>{let n=setTimeout(()=>r(e),t);return()=>clearTimeout(n)},[e,t]),n}function uo(e,t=220){let n=e.trim();return n.length>t?`${n.slice(0,t-1)}…`:n}function fo(e){let t=Date.parse(e);if(Number.isNaN(t))return e;let n=Math.floor((Date.now()-t)/864e5);return n<=0?`today`:n===1?`yesterday`:n<30?`${n}d ago`:`${Math.floor(n/30)}mo ago`}function po(){let[e,t]=(0,M.useState)(``),n=lo(e,co),r=m(ie(n)),i=n.trim().length>0,a=r.data,{rows:o,totalCount:s}=(0,M.useMemo)(()=>{if(!a)return{rows:[],totalCount:0};if(i)return{rows:a,totalCount:a.length};let e=a;return{rows:[...e].sort((e,t)=>Date.parse(t.ts)-Date.parse(e.ts)).slice(0,so),totalCount:e.length}},[a,i]),c=(0,M.useMemo)(()=>{if(!a||i)return[];let e=a,t=new Map;for(let n of e){let e=n.project??`(unscoped)`;t.set(e,(t.get(e)??0)+1)}return[...t.entries()].sort((e,t)=>t[1]-e[1]).slice(0,8).map(([e,t])=>({label:e,value:t}))},[a,i]);return(0,I.jsxs)(`div`,{className:z.view,children:[(0,I.jsxs)(`header`,{className:z.header,children:[(0,I.jsx)(`h1`,{className:z.title,children:`Genome`}),(0,I.jsx)(`div`,{"aria-live":`polite`,children:r.status===`refreshing`?(0,I.jsx)(A,{}):null})]}),(0,I.jsxs)(`div`,{className:z.searchRow,children:[(0,I.jsx)(`input`,{type:`search`,className:z.searchInput,placeholder:`Search the genome (title, tags, body text)…`,value:e,onChange:e=>t(e.target.value),"aria-label":`Search cross-repo knowledge`}),a?(0,I.jsx)(`span`,{className:z.resultCount,children:i?`${s} match${s===1?``:`es`}`:`showing ${o.length} of ${s}`}):null]}),!i&&c.length>0?(0,I.jsx)(Me,{title:`Top projects by genome entries`,description:`browse mode — all loaded entries`,children:(0,I.jsx)(Ne,{data:c,orientation:`horizontal`,ariaLabel:`Top projects by genome entry count`,formatValue:e=>Re(e)})}):null,r.status===`loading`?(0,I.jsxs)(`div`,{className:z.skeletons,"aria-hidden":`true`,children:[(0,I.jsx)(l,{}),(0,I.jsx)(l,{}),(0,I.jsx)(l,{}),(0,I.jsx)(l,{})]}):r.status===`error`?(0,I.jsx)(`div`,{className:z.error,role:`alert`,children:r.error?.message??`Failed to load genome data.`}):o.length===0?(0,I.jsx)(`p`,{className:z.empty,children:i?`No genome entries match "${n}".`:`No genome entries recorded yet.`}):(0,I.jsx)(`ul`,{className:z.results,children:o.map(e=>{let t=oe(e)?e:null,n=t?t.entry:e;return(0,I.jsxs)(`li`,{className:z.row,children:[(0,I.jsxs)(`div`,{className:z.rowHeader,children:[(0,I.jsx)(`span`,{className:z.rowTitle,children:n.title}),(0,I.jsxs)(`span`,{className:z.rowMeta,children:[t?(0,I.jsxs)(`span`,{className:z.badge,children:[t.method,` · `,t.score.toFixed(2)]}):null,(0,I.jsx)(`span`,{children:fo(n.ts)})]})]}),(0,I.jsxs)(`div`,{className:z.rowMeta,children:[(0,I.jsx)(`span`,{className:z.badge,children:n.project??`unscoped`}),(0,I.jsx)(`span`,{className:z.badge,children:n.source})]}),(0,I.jsx)(`p`,{className:z.snippet,children:uo(n.text)}),n.tags.length>0?(0,I.jsx)(`div`,{className:z.tags,children:n.tags.map(e=>(0,I.jsx)(`span`,{className:z.tag,children:e},e))}):null]},n.id)})})]})}var B={view:`_view_1frm3_1`,header:`_header_1frm3_7`,title:`_title_1frm3_15`,filterRow:`_filterRow_1frm3_21`,windowGroup:`_windowGroup_1frm3_27`,windowButton:`_windowButton_1frm3_34`,windowButtonActive:`_windowButtonActive_1frm3_53`,kpiGrid:`_kpiGrid_1frm3_59`,chartsGrid:`_chartsGrid_1frm3_65`,section:`_section_1frm3_71`,sectionTitle:`_sectionTitle_1frm3_77`,goalsList:`_goalsList_1frm3_83`,goalRow:`_goalRow_1frm3_92`,goalObjective:`_goalObjective_1frm3_102`,meterTrack:`_meterTrack_1frm3_107`,meterFill:`_meterFill_1frm3_115`,goalMeta:`_goalMeta_1frm3_121`,error:`_error_1frm3_126`,notAvailable:`_notAvailable_1frm3_135`},mo=[`7d`,`30d`,`all`];function ho(e){return`${e.engine}:${e.model}`}function go(){let[e,t]=(0,M.useState)(`30d`),n=m(O),r=m(pe(e)),i=n.data?.production;return(0,I.jsxs)(`div`,{className:B.view,children:[(0,I.jsxs)(`header`,{className:B.header,children:[(0,I.jsx)(`h1`,{className:B.title,children:`Production`}),(0,I.jsx)(`div`,{"aria-live":`polite`,children:n.status===`refreshing`||r.status===`refreshing`?(0,I.jsx)(A,{}):null})]}),n.status===`loading`?(0,I.jsx)(v,{count:4}):n.status===`error`?(0,I.jsx)(`div`,{className:B.error,role:`alert`,children:n.error?.message??`Failed to load production summary.`}):i?(0,I.jsx)(_o,{production:i}):(0,I.jsx)(`p`,{className:B.notAvailable,children:`Production summary not available on this server (older producer, or not yet populated).`}),(0,I.jsx)(`div`,{className:B.filterRow,role:`group`,"aria-label":`Model stats window`,children:(0,I.jsx)(`div`,{className:B.windowGroup,children:mo.map(n=>(0,I.jsx)(`button`,{type:`button`,className:`${B.windowButton} ${n===e?B.windowButtonActive:``}`,"aria-pressed":n===e,onClick:()=>t(n),children:n},n))})}),r.status===`loading`?(0,I.jsx)(v,{count:3}):r.status===`error`?(0,I.jsx)(`div`,{className:B.error,role:`alert`,children:r.error?.message??`Failed to load per-model stats.`}):r.data?(0,I.jsx)(vo,{result:r.data}):null]})}function _o({production:e}){let t=e.judgeVerdicts24h,n=e.judgeFailures24h??{total:0,parse:0,network:0},r=[{label:`ship`,value:t.ship},{label:`review`,value:t.review},{label:`noise`,value:t.noise},{label:`harmful`,value:t.harmful}],i=e.shipsPerDayTrend.map(e=>({label:Fe(e.date),value:e.count})),a=e.shipsPerDayTrend.reduce((e,t)=>e+t.count,0),o=w(e.proposalSourceQuality),s=w(e.judgeTraceSourceQuality);return(0,I.jsxs)(I.Fragment,{children:[(0,I.jsxs)(`div`,{className:B.kpiGrid,children:[(0,I.jsx)(j,{label:`Proposals (24h)`,value:(0,I.jsx)(T,{quality:e.proposalSourceQuality,label:`proposals`,children:String(e.proposals24h.total)}),caption:(0,I.jsx)(T,{quality:e.proposalSourceQuality,label:`pending proposals`,children:`${e.proposals24h.pending} pending`})}),(0,I.jsx)(j,{label:`Auto-merges today`,value:(0,I.jsx)(T,{quality:e.proposalSourceQuality,label:`auto-merges`,children:String(e.autoMergesToday.count)})}),(0,I.jsx)(j,{label:`Judged (24h)`,value:(0,I.jsx)(T,{quality:e.judgeTraceSourceQuality,label:`judge verdicts`,children:String(t.total)})}),(0,I.jsx)(j,{label:`Judge failures (24h)`,value:(0,I.jsx)(T,{quality:e.judgeFailureSourceQuality,label:`judge failures`,children:String(n.total)}),caption:(0,I.jsx)(T,{quality:e.judgeFailureSourceQuality,children:`${n.parse} parse · ${n.network} network`})}),(0,I.jsx)(j,{label:`Active goals`,value:(0,I.jsx)(T,{quality:e.activeGoalsSourceQuality,label:`active goals`,children:String(e.activeGoals.length)})})]}),(0,I.jsxs)(`div`,{className:B.chartsGrid,children:[(0,I.jsxs)(Me,{title:`Ships per day`,description:`last 7 days`,empty:o&&i.length===0,emptyMessage:`No ship history recorded yet.`,table:o?(0,I.jsx)(je,{caption:`Ships per day`,rowKey:e=>e.label,rows:i,columns:[{key:`day`,label:`Day`,render:e=>e.label},{key:`count`,label:`Ships`,numeric:!0,render:e=>String(e.value??0)}]}):void 0,children:[o?a===0?(0,I.jsx)(`p`,{className:B.notAvailable,children:`0 ships in the last 7 days — this is the real number, not a loading state.`}):null:(0,I.jsx)(T,{quality:e.proposalSourceQuality,label:`ship history`,children:`ship history`}),o?(0,I.jsx)(Ne,{data:i,ariaLabel:`Ships per day, last 7 days`,formatValue:e=>String(e)}):null]}),(0,I.jsx)(Me,{title:`Judge verdict breakdown`,description:`last 24h`,empty:s&&t.total===0,emptyMessage:`No judge verdicts recorded in the last 24h.`,children:s?(0,I.jsx)(Ne,{data:r,ariaLabel:`Judge verdict breakdown, last 24h`,formatValue:e=>String(e)}):(0,I.jsx)(T,{quality:e.judgeTraceSourceQuality,label:`judge verdicts`,children:`judge verdicts`})})]}),w(e.activeGoalsSourceQuality)?e.activeGoals.length>0?(0,I.jsxs)(`div`,{className:B.section,children:[(0,I.jsx)(`h2`,{className:B.sectionTitle,children:`Active goals`}),(0,I.jsx)(`ul`,{className:B.goalsList,children:e.activeGoals.map(e=>{let t=e.totalMilestones>0?e.doneMilestones/e.totalMilestones:0;return(0,I.jsxs)(`li`,{className:B.goalRow,children:[(0,I.jsx)(`span`,{className:B.goalObjective,children:e.objective}),(0,I.jsx)(`div`,{className:B.meterTrack,children:(0,I.jsx)(`div`,{className:B.meterFill,style:{width:`${Math.round(t*100)}%`}})}),(0,I.jsxs)(`span`,{className:B.goalMeta,children:[e.doneMilestones,` / `,e.totalMilestones,` milestones`]})]},e.goalId)})})]}):null:(0,I.jsxs)(`div`,{className:B.section,children:[(0,I.jsx)(`h2`,{className:B.sectionTitle,children:`Active goals`}),(0,I.jsx)(T,{quality:e.activeGoalsSourceQuality,label:`active goals`,children:`active goals`})]})]})}function vo({result:e}){let t=[...e.models].sort((e,t)=>t.dispatches-e.dispatches).slice(0,12),n=t.map(e=>({label:ho(e),value:e.judged>0?e.shipRate:null}));return(0,I.jsx)(`div`,{className:B.chartsGrid,children:(0,I.jsx)(Me,{title:`Ship rate by model`,description:`judged proposals in the selected window`,empty:t.length===0,emptyMessage:`No dispatch history for this window.`,table:(0,I.jsx)(je,{caption:`Per-model economics`,rowKey:ho,rows:t,columns:[{key:`model`,label:`Model`,render:e=>ho(e)},{key:`dispatches`,label:`Dispatches`,numeric:!0,render:e=>String(e.dispatches)},{key:`shipRate`,label:`Ship rate`,numeric:!0,render:e=>e.judged>0?Ie(e.shipRate):`—`},{key:`merged`,label:`Merged`,numeric:!0,render:e=>String(e.merged)},{key:`costPerMerged`,label:`Cost / merge`,numeric:!0,render:e=>e.costPerMergedUsd===null?`—`:Le(e.costPerMergedUsd)},{key:`bestOfN`,label:`Best-of-N win rate`,numeric:!0,render:t=>t.bestOfNAvailable?(0,I.jsx)(T,{quality:e.bestOfNSource,label:`best-of-N win rate`,children:Ie(t.bestOfN.winRate)}):`—`}]}),children:(0,I.jsx)(Ne,{data:n,ariaLabel:`Ship rate by model`,formatValue:e=>Ie(e)})})})}var V={view:`_view_ruego_1`,header:`_header_ruego_7`,title:`_title_ruego_15`,freshness:`_freshness_ruego_21`,freshnessLabel:`_freshnessLabel_ruego_27`,kpiGrid:`_kpiGrid_ruego_32`,chartsGrid:`_chartsGrid_ruego_38`,section:`_section_ruego_44`,sectionTitle:`_sectionTitle_ruego_50`,list:`_list_ruego_56`,row:`_row_ruego_65`,rowTitle:`_rowTitle_ruego_75`,meterTrack:`_meterTrack_ruego_84`,meterFill:`_meterFill_ruego_92`,rowMeta:`_rowMeta_ruego_98`,effectiveness:`_effectiveness_ruego_103`,effectivenessHeadline:`_effectivenessHeadline_ruego_110`,error:`_error_ruego_116`,notAvailable:`_notAvailable_ruego_125`};function yo(e){let t=Math.max(0,Math.round((Date.now()-e)/1e3));return t<5?`just now`:t<60?`${t}s ago`:`${Math.round(t/60)}m ago`}function bo(){let e=m(ue),t=m(O);return(0,I.jsxs)(`div`,{className:V.view,children:[(0,I.jsxs)(`header`,{className:V.header,children:[(0,I.jsx)(`h1`,{className:V.title,children:`Portfolio`}),(0,I.jsxs)(`div`,{className:V.freshness,"aria-live":`polite`,children:[e.status===`refreshing`||t.status===`refreshing`?(0,I.jsx)(A,{}):null,e.updatedAt?(0,I.jsxs)(`span`,{className:V.freshnessLabel,children:[`Updated `,yo(e.updatedAt)]}):null]})]}),e.status===`loading`?(0,I.jsx)(v,{count:6}):e.status===`error`?(0,I.jsx)(`div`,{className:V.error,role:`alert`,children:e.error?.message??`Failed to load portfolio.`}):e.data===null?(0,I.jsx)(`p`,{className:V.notAvailable,children:`No portfolio roll-up available — either this server has no enrolled repos, or it predates the portfolio feature.`}):e.data?(0,I.jsx)(xo,{portfolio:e.data}):null]})}function xo({portfolio:e}){let{health:t,goalsInFlight:n,backlogTop:r,cost:i,effectiveness:a,today:o}=e,s=t.worstRepos.map(e=>({label:e.repo.split(`/`).filter(Boolean).pop()??e.repo,value:e.score}));return(0,I.jsxs)(I.Fragment,{children:[(0,I.jsxs)(`div`,{className:V.kpiGrid,children:[(0,I.jsx)(j,{label:`Portfolio health`,value:`${t.averageScore.toFixed(0)} (${t.averageGrade})`,caption:`${t.reposScored} repos scored`,delta:o.healthScoreDelta===null?null:{value:o.healthScoreDelta,goodWhenPositive:!0}}),(0,I.jsx)(j,{label:`Goals in flight`,value:String(n.length)}),(0,I.jsx)(j,{label:`Backlog top items`,value:String(r.length),delta:o.pendingProposalsDelta===null?null:{value:o.pendingProposalsDelta,versus:`pending proposals`}}),(0,I.jsx)(j,{label:`Spend`,value:Le(i.spentUsd),caption:`${i.window} window`,delta:o.spendUsdDelta===null?null:{value:o.spendUsdDelta,goodWhenPositive:!1}}),(0,I.jsx)(j,{label:`Local savings`,value:Le(i.localSavingsUsd)}),(0,I.jsx)(j,{label:`Projected monthly`,value:Le(i.projectedMonthlyUsd)})]}),a?(0,I.jsxs)(`div`,{className:V.effectiveness,children:[(0,I.jsx)(`p`,{className:V.effectivenessHeadline,children:a.headline}),(0,I.jsxs)(`span`,{className:V.rowMeta,children:[`Success rate `,Ie(a.successRate),a.effectivenessDeltaPct===null?``:` (${a.effectivenessDeltaPct>=0?`+`:``}${a.effectivenessDeltaPct.toFixed(1)}pp)`]})]}):null,(0,I.jsxs)(`div`,{className:V.chartsGrid,children:[(0,I.jsx)(Me,{title:`Worst-scoring repos`,empty:s.length===0,emptyMessage:`No enrolled repos scored yet.`,table:(0,I.jsx)(je,{caption:`Worst-scoring repos`,rowKey:e=>e.repo,rows:t.worstRepos,columns:[{key:`repo`,label:`Repo`,render:e=>e.repo},{key:`score`,label:`Score`,numeric:!0,render:e=>e.score.toFixed(0)},{key:`grade`,label:`Grade`,render:e=>e.grade}]}),children:(0,I.jsx)(Ne,{data:s,orientation:`horizontal`,ariaLabel:`Worst-scoring repos by health score`,formatValue:e=>e.toFixed(0)})}),(0,I.jsxs)(`div`,{className:V.section,children:[(0,I.jsx)(`h2`,{className:V.sectionTitle,children:`In-flight goals`}),n.length===0?(0,I.jsx)(`p`,{className:V.notAvailable,children:`No goals currently in flight.`}):(0,I.jsx)(`ul`,{className:V.list,children:n.map(e=>(0,I.jsxs)(`li`,{className:V.row,children:[(0,I.jsxs)(`span`,{className:V.rowTitle,children:[e.objective,(0,I.jsxs)(`span`,{className:V.rowMeta,children:[Math.round(e.fractionDone*100),`%`]})]}),(0,I.jsx)(`div`,{className:V.meterTrack,children:(0,I.jsx)(`div`,{className:V.meterFill,style:{width:`${Math.round(e.fractionDone*100)}%`}})}),(0,I.jsx)(`span`,{className:V.rowMeta,children:e.nextActionable?`Next: ${e.nextActionable}`:`Nothing actionable queued`})]},e.goalId))})]})]}),(0,I.jsxs)(`div`,{className:V.section,children:[(0,I.jsx)(`h2`,{className:V.sectionTitle,children:`Top backlog`}),r.length===0?(0,I.jsx)(`p`,{className:V.notAvailable,children:`Backlog is empty.`}):(0,I.jsx)(je,{caption:`Top backlog items`,rowKey:e=>e.title,rows:r,columns:[{key:`title`,label:`Item`,render:e=>e.title},{key:`repo`,label:`Repo`,render:e=>e.repo??`—`},{key:`score`,label:`Score`,numeric:!0,render:e=>e.score.toFixed(1)}]})]})]})}var H={view:`_view_1eb19_1`,header:`_header_1eb19_8`,title:`_title_1eb19_16`,freshness:`_freshness_1eb19_22`,count:`_count_1eb19_28`,filters:`_filters_1eb19_34`,field:`_field_1eb19_45`,fieldLabel:`_fieldLabel_1eb19_51`,input:`_input_1eb19_56`,select:`_select_1eb19_57`,clear:`_clear_1eb19_74`,tableWrap:`_tableWrap_1eb19_87`,table:`_table_1eb19_87`,statusCol:`_statusCol_1eb19_101`,engineCol:`_engineCol_1eb19_104`,providerCol:`_providerCol_1eb19_107`,tokensCol:`_tokensCol_1eb19_110`,costCol:`_costCol_1eb19_113`,stepsCol:`_stepsCol_1eb19_116`,createdCol:`_createdCol_1eb19_119`,row:`_row_1eb19_143`,sortHeader:`_sortHeader_1eb19_151`,goalLink:`_goalLink_1eb19_168`,numeric:`_numeric_1eb19_180`,date:`_date_1eb19_186`,empty:`_empty_1eb19_192`,error:`_error_1eb19_199`};function So(e){return e.usage.tokensIn+e.usage.tokensOut}function Co(e,t){if(!t)return!0;let n=t.toLowerCase();return e.id.toLowerCase().includes(n)||e.goal.toLowerCase().includes(n)}function wo(e){let t=new Date(e);return Number.isNaN(t.getTime())?e:t.toLocaleString(void 0,{month:`short`,day:`numeric`,hour:`2-digit`,minute:`2-digit`})}function To(){let e=(0,M.useRef)(null);ke(`/work/runs`,e);let t=gn(),n=m(ve),[r,i]=(0,M.useState)(0),a=(0,M.useRef)(new Map),[o,s]=(0,M.useState)(``),[c,u]=(0,M.useState)(`all`),[d,f]=(0,M.useState)(`all`),[p,h]=(0,M.useState)(`all`),[g,_]=(0,M.useState)(``),[v,y]=(0,M.useState)(`createdAt`),[b,x]=(0,M.useState)(`desc`),S=(0,M.useMemo)(()=>n.data??[],[n.data]),{statuses:C,engines:w,providers:T}=(0,M.useMemo)(()=>{let e=new Set,t=new Set,n=new Set;for(let r of S)e.add(r.status),t.add(r.engine),n.add(r.provider);return{statuses:Array.from(e).sort(),engines:Array.from(t).sort(),providers:Array.from(n).sort()}},[S]),ee=g?new Date(g).getTime():null,D=(0,M.useMemo)(()=>{let e=S.filter(e=>{if(c!==`all`&&e.status!==c||d!==`all`&&e.engine!==d||p!==`all`&&e.provider!==p)return!1;if(ee!==null){let t=new Date(e.createdAt).getTime();if(Number.isNaN(t)||t<ee)return!1}return!!Co(e,o.trim())});return e=[...e].sort((e,t)=>{let n=0;switch(v){case`createdAt`:n=e.createdAt.localeCompare(t.createdAt);break;case`updatedAt`:n=e.updatedAt.localeCompare(t.updatedAt);break;case`tokens`:n=So(e)-So(t);break;case`estCostUsd`:n=e.usage.estCostUsd-t.usage.estCostUsd;break;case`steps`:n=e.steps.length-t.steps.length;break;case`status`:n=e.status.localeCompare(t.status)}return b===`asc`?n:-n}),e},[S,c,d,p,ee,o,v,b]);(0,M.useEffect)(()=>{i(e=>Math.min(e,Math.max(D.length-1,0)))},[D.length]);function te(e){if(D.length!==0){if(e.key===`ArrowDown`){e.preventDefault();let t=Math.min(r+1,D.length-1);i(t),a.current.get(D[t].id)?.focus()}else if(e.key===`ArrowUp`){e.preventDefault();let t=Math.max(r-1,0);i(t),a.current.get(D[t].id)?.focus()}else if(e.key===`Enter`){let e=D[r];e&&t(`/work/runs/${e.id}`)}}}function ne(e){e===v?x(e=>e===`asc`?`desc`:`asc`):(y(e),x(`desc`))}function O(e){return e===v?b===`asc`?` ↑`:` ↓`:``}return(0,I.jsxs)(`div`,{ref:e,className:H.view,children:[(0,I.jsxs)(`header`,{className:H.header,children:[(0,I.jsx)(`h1`,{className:H.title,children:`Runs`}),(0,I.jsxs)(`div`,{className:H.freshness,"aria-live":`polite`,children:[n.status===`refreshing`?(0,I.jsx)(A,{}):null,(0,I.jsxs)(`span`,{className:H.count,children:[D.length,` of `,S.length,` runs (server caps at 200 most recent)`]})]})]}),(0,I.jsxs)(`form`,{className:H.filters,role:`search`,"aria-label":`Filter runs`,onSubmit:e=>e.preventDefault(),children:[(0,I.jsxs)(`label`,{className:H.field,children:[(0,I.jsx)(`span`,{className:H.fieldLabel,children:`Search`}),(0,I.jsx)(`input`,{type:`text`,className:H.input,placeholder:`goal or run id (e.g. repo/project name)`,value:o,onChange:e=>s(e.target.value)})]}),(0,I.jsxs)(`label`,{className:H.field,children:[(0,I.jsx)(`span`,{className:H.fieldLabel,children:`Status`}),(0,I.jsxs)(`select`,{className:H.select,value:c,onChange:e=>u(e.target.value),children:[(0,I.jsx)(`option`,{value:`all`,children:`All`}),C.map(e=>(0,I.jsx)(`option`,{value:e,children:e},e))]})]}),(0,I.jsxs)(`label`,{className:H.field,children:[(0,I.jsx)(`span`,{className:H.fieldLabel,children:`Engine`}),(0,I.jsxs)(`select`,{className:H.select,value:d,onChange:e=>f(e.target.value),children:[(0,I.jsx)(`option`,{value:`all`,children:`All`}),w.map(e=>(0,I.jsx)(`option`,{value:e,children:e},e))]})]}),(0,I.jsxs)(`label`,{className:H.field,children:[(0,I.jsx)(`span`,{className:H.fieldLabel,children:`Provider`}),(0,I.jsxs)(`select`,{className:H.select,value:p,onChange:e=>h(e.target.value),children:[(0,I.jsx)(`option`,{value:`all`,children:`All`}),T.map(e=>(0,I.jsx)(`option`,{value:e,children:e},e))]})]}),(0,I.jsxs)(`label`,{className:H.field,children:[(0,I.jsx)(`span`,{className:H.fieldLabel,children:`Since`}),(0,I.jsx)(`input`,{type:`date`,className:H.input,value:g,onChange:e=>_(e.target.value)})]}),(c!==`all`||d!==`all`||p!==`all`||g||o)&&(0,I.jsx)(`button`,{type:`button`,className:H.clear,onClick:()=>{s(``),u(`all`),f(`all`),h(`all`),_(``)},children:`Clear filters`})]}),n.status===`loading`?(0,I.jsxs)(`div`,{className:H.tableWrap,children:[(0,I.jsx)(l,{}),(0,I.jsx)(l,{}),(0,I.jsx)(l,{})]}):n.status===`error`?(0,I.jsx)(`div`,{className:H.error,role:`alert`,children:n.error?.message??`Failed to load runs.`}):D.length===0?(0,I.jsx)(`p`,{className:H.empty,children:`No runs match the current filters.`}):(0,I.jsx)(`div`,{className:H.tableWrap,children:(0,I.jsxs)(`table`,{className:H.table,onKeyDown:te,children:[(0,I.jsx)(`thead`,{children:(0,I.jsxs)(`tr`,{children:[(0,I.jsx)(`th`,{scope:`col`,children:`Goal`}),(0,I.jsx)(`th`,{scope:`col`,className:H.statusCol,children:(0,I.jsxs)(`button`,{type:`button`,className:H.sortHeader,onClick:()=>ne(`status`),children:[`Status`,O(`status`)]})}),(0,I.jsx)(`th`,{scope:`col`,className:H.engineCol,children:`Engine`}),(0,I.jsx)(`th`,{scope:`col`,className:H.providerCol,children:`Provider`}),(0,I.jsx)(`th`,{scope:`col`,className:H.tokensCol,children:(0,I.jsxs)(`button`,{type:`button`,className:H.sortHeader,onClick:()=>ne(`tokens`),children:[`Tokens in/out`,O(`tokens`)]})}),(0,I.jsx)(`th`,{scope:`col`,className:H.costCol,children:(0,I.jsxs)(`button`,{type:`button`,className:H.sortHeader,onClick:()=>ne(`estCostUsd`),children:[`Est cost`,O(`estCostUsd`)]})}),(0,I.jsx)(`th`,{scope:`col`,className:H.stepsCol,children:(0,I.jsxs)(`button`,{type:`button`,className:H.sortHeader,onClick:()=>ne(`steps`),children:[`Steps`,O(`steps`)]})}),(0,I.jsx)(`th`,{scope:`col`,className:H.createdCol,children:(0,I.jsxs)(`button`,{type:`button`,className:H.sortHeader,onClick:()=>ne(`createdAt`),children:[`Created`,O(`createdAt`)]})})]})}),(0,I.jsx)(`tbody`,{children:D.map((e,t)=>(0,I.jsxs)(`tr`,{ref:t=>{t?a.current.set(e.id,t):a.current.delete(e.id)},tabIndex:t===r?0:-1,onFocus:()=>i(t),"aria-current":t===r?`true`:void 0,className:H.row,children:[(0,I.jsx)(`td`,{children:(0,I.jsx)(Ar,{to:`/work/runs/${e.id}`,"data-focus-key":`run-${e.id}`,className:H.goalLink,title:e.goal,tabIndex:-1,children:e.goal})}),(0,I.jsx)(`td`,{children:(0,I.jsx)(E,{status:e.status})}),(0,I.jsx)(`td`,{children:e.engine}),(0,I.jsx)(`td`,{children:e.provider}),(0,I.jsxs)(`td`,{className:H.numeric,children:[e.usage.tokensIn.toLocaleString(),` / `,e.usage.tokensOut.toLocaleString()]}),(0,I.jsxs)(`td`,{className:H.numeric,children:[`$`,e.usage.estCostUsd.toFixed(4)]}),(0,I.jsx)(`td`,{className:H.numeric,children:e.steps.length}),(0,I.jsx)(`td`,{className:H.date,children:wo(e.createdAt)})]},e.id))})]})})]})}var U={view:`_view_16nop_1`,header:`_header_16nop_8`,eyebrow:`_eyebrow_16nop_16`,title:`_title_16nop_22`,freshness:`_freshness_16nop_29`,metaGrid:`_metaGrid_16nop_35`,numeric:`_numeric_16nop_55`,section:`_section_16nop_59`,sectionTitle:`_sectionTitle_16nop_65`,resultText:`_resultText_16nop_70`,taskList:`_taskList_16nop_79`,taskItem:`_taskItem_16nop_85`,taskHeader:`_taskHeader_16nop_98`,taskId:`_taskId_16nop_105`,taskGoal:`_taskGoal_16nop_111`,taskDeps:`_taskDeps_16nop_116`,depLink:`_depLink_16nop_122`,depMissing:`_depMissing_16nop_127`,taskError:`_taskError_16nop_132`,taskUsage:`_taskUsage_16nop_141`,stepList:`_stepList_16nop_148`,stepItem:`_stepItem_16nop_155`,stepTs:`_stepTs_16nop_164`,stepKind:`_stepKind_16nop_170`,stepTask:`_stepTask_16nop_176`,stepSummary:`_stepSummary_16nop_180`,empty:`_empty_16nop_185`,error:`_error_16nop_190`};function Eo(e){if(!e)return`—`;let t=new Date(e);return Number.isNaN(t.getTime())?e:t.toLocaleString()}function Do(e){return`task-${encodeURIComponent(e)}`}function Oo(){let{id:e}=bn(),t=(0,M.useRef)(null);ke(`/work/runs/${e??``}`,t);let n=m(ne(e??``));if(!e)return(0,I.jsx)(`div`,{className:U.view,children:(0,I.jsx)(`p`,{className:U.error,role:`alert`,children:`No run id in URL.`})});if(n.status===`loading`)return(0,I.jsxs)(`div`,{ref:t,className:U.view,children:[(0,I.jsx)(f,{width:`60%`}),(0,I.jsx)(f,{width:`30%`}),(0,I.jsx)(f,{width:`80%`})]});if(n.status===`error`||!n.data)return(0,I.jsx)(`div`,{ref:t,className:U.view,children:(0,I.jsx)(`p`,{className:U.error,role:`alert`,children:n.error?.message??`Run ${e} not found.`})});let r=n.data,i=new Map(r.tasks.map(e=>[e.id,e]));return(0,I.jsxs)(`div`,{ref:t,className:U.view,children:[(0,I.jsxs)(`header`,{className:U.header,children:[(0,I.jsxs)(`div`,{children:[(0,I.jsxs)(`p`,{className:U.eyebrow,children:[`Run `,r.id]}),(0,I.jsx)(`h1`,{className:U.title,children:r.goal})]}),(0,I.jsxs)(`div`,{className:U.freshness,"aria-live":`polite`,children:[n.status===`refreshing`?(0,I.jsx)(A,{}):null,(0,I.jsx)(E,{status:r.status})]})]}),(0,I.jsxs)(`dl`,{className:U.metaGrid,children:[(0,I.jsxs)(`div`,{children:[(0,I.jsx)(`dt`,{children:`Engine`}),(0,I.jsx)(`dd`,{children:r.engine})]}),(0,I.jsxs)(`div`,{children:[(0,I.jsx)(`dt`,{children:`Provider`}),(0,I.jsx)(`dd`,{children:r.provider})]}),r.engineModel?(0,I.jsxs)(`div`,{children:[(0,I.jsx)(`dt`,{children:`Model`}),(0,I.jsx)(`dd`,{children:r.engineModel})]}):null,(0,I.jsxs)(`div`,{children:[(0,I.jsx)(`dt`,{children:`Tokens in / out`}),(0,I.jsxs)(`dd`,{className:U.numeric,children:[r.usage.tokensIn.toLocaleString(),` / `,r.usage.tokensOut.toLocaleString()]})]}),(0,I.jsxs)(`div`,{children:[(0,I.jsx)(`dt`,{children:`Est cost`}),(0,I.jsxs)(`dd`,{className:U.numeric,children:[`$`,r.usage.estCostUsd.toFixed(4)]})]}),(0,I.jsxs)(`div`,{children:[(0,I.jsx)(`dt`,{children:`Steps`}),(0,I.jsx)(`dd`,{className:U.numeric,children:r.usage.steps})]}),(0,I.jsxs)(`div`,{children:[(0,I.jsx)(`dt`,{children:`Budget (tokens / steps)`}),(0,I.jsxs)(`dd`,{className:U.numeric,children:[r.budget.maxTokens.toLocaleString(),` / `,r.budget.maxSteps]})]}),(0,I.jsxs)(`div`,{children:[(0,I.jsx)(`dt`,{children:`Created`}),(0,I.jsx)(`dd`,{children:Eo(r.createdAt)})]}),(0,I.jsxs)(`div`,{children:[(0,I.jsx)(`dt`,{children:`Updated`}),(0,I.jsx)(`dd`,{children:Eo(r.updatedAt)})]}),r.terminationReason?(0,I.jsxs)(`div`,{children:[(0,I.jsx)(`dt`,{children:`Termination reason`}),(0,I.jsx)(`dd`,{children:r.terminationReason})]}):null]}),r.result?(0,I.jsxs)(`section`,{className:U.section,children:[(0,I.jsx)(`h2`,{className:U.sectionTitle,children:`Result`}),(0,I.jsx)(`p`,{className:U.resultText,children:r.result})]}):null,(0,I.jsxs)(`section`,{className:U.section,children:[(0,I.jsxs)(`h2`,{className:U.sectionTitle,children:[`Tasks (`,r.tasks.length,`)`]}),r.tasks.length===0?(0,I.jsx)(`p`,{className:U.empty,children:`No tasks recorded.`}):(0,I.jsx)(`ul`,{className:U.taskList,children:r.tasks.map(e=>(0,I.jsxs)(`li`,{id:Do(e.id),className:U.taskItem,tabIndex:-1,children:[(0,I.jsxs)(`div`,{className:U.taskHeader,children:[(0,I.jsx)(`span`,{className:U.taskId,children:e.id}),(0,I.jsx)(E,{status:e.status})]}),(0,I.jsx)(`p`,{className:U.taskGoal,children:e.goal}),e.deps.length>0?(0,I.jsxs)(`p`,{className:U.taskDeps,children:[`depends on:`,` `,e.deps.map((e,t)=>(0,I.jsxs)(`span`,{children:[t>0?`, `:``,i.has(e)?(0,I.jsx)(`a`,{href:`#${Do(e)}`,className:U.depLink,children:e}):(0,I.jsxs)(`span`,{className:U.depMissing,children:[e,` (unresolved)`]})]},e))]}):null,e.error?(0,I.jsx)(`p`,{className:U.taskError,role:`alert`,children:e.error}):null,e.usage?(0,I.jsxs)(`p`,{className:U.taskUsage,children:[e.usage.tokensIn.toLocaleString(),` / `,e.usage.tokensOut.toLocaleString(),` tokens · $`,e.usage.estCostUsd.toFixed(4)]}):null]},e.id))})]}),(0,I.jsxs)(`section`,{className:U.section,children:[(0,I.jsxs)(`h2`,{className:U.sectionTitle,children:[`Step log (`,r.steps.length,`)`]}),r.steps.length===0?(0,I.jsx)(`p`,{className:U.empty,children:`No steps recorded.`}):(0,I.jsx)(`ol`,{className:U.stepList,children:r.steps.map((e,t)=>(0,I.jsxs)(`li`,{className:U.stepItem,children:[(0,I.jsx)(`span`,{className:U.stepTs,children:Eo(e.ts)}),(0,I.jsx)(`span`,{className:U.stepKind,children:e.kind}),(0,I.jsx)(`span`,{className:U.stepTask,children:e.taskId?(0,I.jsx)(`a`,{href:`#${Do(e.taskId)}`,className:U.depLink,children:e.taskId}):null}),(0,I.jsx)(`span`,{className:U.stepSummary,children:e.summary})]},`${e.ts}-${t}`))})]})]})}var W={view:`_view_1kj6a_1`,header:`_header_1kj6a_8`,title:`_title_1kj6a_16`,freshness:`_freshness_1kj6a_22`,count:`_count_1kj6a_28`,filters:`_filters_1kj6a_34`,field:`_field_1kj6a_45`,fieldLabel:`_fieldLabel_1kj6a_51`,input:`_input_1kj6a_56`,select:`_select_1kj6a_57`,listWrap:`_listWrap_1kj6a_73`,listHeader:`_listHeader_1kj6a_80`,sortHeader:`_sortHeader_1kj6a_90`,list:`_list_1kj6a_73`,item:`_item_1kj6a_112`,goalLink:`_goalLink_1kj6a_124`,goalText:`_goalText_1kj6a_140`,burndown:`_burndown_1kj6a_150`,burndownTrack:`_burndownTrack_1kj6a_156`,burndownFill:`_burndownFill_1kj6a_164`,burndownLabel:`_burndownLabel_1kj6a_170`,numeric:`_numeric_1kj6a_177`,date:`_date_1kj6a_184`,empty:`_empty_1kj6a_191`,error:`_error_1kj6a_198`};function ko(e){return e.tasks.filter(e=>e.status===`done`).length}function Ao(e){return Math.max(e.plan?.tasks.length??0,e.tasks.length)}function jo(e){return e.usage??{tokensIn:0,tokensOut:0,estCostUsd:0}}function Mo(e){let t=jo(e);return t.tokensIn+t.tokensOut}function No(e){let t=new Date(e);return Number.isNaN(t.getTime())?e:t.toLocaleString(void 0,{month:`short`,day:`numeric`,hour:`2-digit`,minute:`2-digit`})}function Po(){let e=(0,M.useRef)(null);ke(`/work/swarms`,e);let t=m(re),n=(0,M.useMemo)(()=>t.data??[],[t.data]),[r,i]=(0,M.useState)(``),[a,o]=(0,M.useState)(`all`),[s,c]=(0,M.useState)(`createdAt`),[u,d]=(0,M.useState)(`desc`),f=(0,M.useMemo)(()=>Array.from(new Set(n.map(e=>e.status))).sort(),[n]),p=(0,M.useMemo)(()=>{let e=n.filter(e=>{if(a!==`all`&&e.status!==a)return!1;if(!r.trim())return!0;let t=r.trim().toLowerCase();return e.id.toLowerCase().includes(t)||e.goal.toLowerCase().includes(t)});return e=[...e].sort((e,t)=>{let n=0;switch(s){case`createdAt`:n=e.createdAt.localeCompare(t.createdAt);break;case`updatedAt`:n=e.updatedAt.localeCompare(t.updatedAt);break;case`progress`:n=(Ao(e)>0?ko(e)/Ao(e):0)-(Ao(t)>0?ko(t)/Ao(t):0);break;case`tokens`:n=Mo(e)-Mo(t);break;case`estCostUsd`:n=jo(e).estCostUsd-jo(t).estCostUsd}return u===`asc`?n:-n}),e},[n,a,r,s,u]);function h(e){e===s?d(e=>e===`asc`?`desc`:`asc`):(c(e),d(`desc`))}function g(e){return e===s?u===`asc`?` ↑`:` ↓`:``}return(0,I.jsxs)(`div`,{ref:e,className:W.view,children:[(0,I.jsxs)(`header`,{className:W.header,children:[(0,I.jsx)(`h1`,{className:W.title,children:`Swarms`}),(0,I.jsxs)(`div`,{className:W.freshness,"aria-live":`polite`,children:[t.status===`refreshing`?(0,I.jsx)(A,{}):null,(0,I.jsxs)(`span`,{className:W.count,children:[p.length,` of `,n.length,` swarms`]})]})]}),(0,I.jsxs)(`form`,{className:W.filters,role:`search`,"aria-label":`Filter swarms`,onSubmit:e=>e.preventDefault(),children:[(0,I.jsxs)(`label`,{className:W.field,children:[(0,I.jsx)(`span`,{className:W.fieldLabel,children:`Search`}),(0,I.jsx)(`input`,{type:`text`,className:W.input,placeholder:`goal or swarm id`,value:r,onChange:e=>i(e.target.value)})]}),(0,I.jsxs)(`label`,{className:W.field,children:[(0,I.jsx)(`span`,{className:W.fieldLabel,children:`Status`}),(0,I.jsxs)(`select`,{className:W.select,value:a,onChange:e=>o(e.target.value),children:[(0,I.jsx)(`option`,{value:`all`,children:`All`}),f.map(e=>(0,I.jsx)(`option`,{value:e,children:e},e))]})]})]}),t.status===`loading`?(0,I.jsxs)(`div`,{className:W.listWrap,children:[(0,I.jsx)(l,{}),(0,I.jsx)(l,{}),(0,I.jsx)(l,{})]}):t.status===`error`?(0,I.jsx)(`div`,{className:W.error,role:`alert`,children:t.error?.message??`Failed to load swarms.`}):p.length===0?(0,I.jsx)(`p`,{className:W.empty,children:`No swarms match the current filters.`}):(0,I.jsxs)(`div`,{className:W.listWrap,children:[(0,I.jsxs)(`div`,{className:W.listHeader,children:[(0,I.jsx)(`span`,{children:`Goal`}),(0,I.jsxs)(`button`,{type:`button`,className:W.sortHeader,onClick:()=>h(`progress`),children:[`Progress`,g(`progress`)]}),(0,I.jsxs)(`button`,{type:`button`,className:W.sortHeader,onClick:()=>h(`tokens`),children:[`Tokens`,g(`tokens`)]}),(0,I.jsxs)(`button`,{type:`button`,className:W.sortHeader,onClick:()=>h(`estCostUsd`),children:[`Cost`,g(`estCostUsd`)]}),(0,I.jsxs)(`button`,{type:`button`,className:W.sortHeader,onClick:()=>h(`createdAt`),children:[`Created`,g(`createdAt`)]})]}),(0,I.jsx)(`ul`,{className:W.list,children:p.map(e=>{let t=ko(e),n=Ao(e),r=n>0?Math.round(t/n*100):0,i=jo(e);return(0,I.jsxs)(`li`,{className:W.item,children:[(0,I.jsxs)(Ar,{to:`/work/swarms/${e.id}`,"data-focus-key":`swarm-${e.id}`,className:W.goalLink,title:e.goal,children:[(0,I.jsx)(`span`,{className:W.goalText,children:e.goal}),(0,I.jsx)(E,{status:e.status})]}),(0,I.jsxs)(`div`,{className:W.burndown,children:[(0,I.jsx)(`div`,{className:W.burndownTrack,children:(0,I.jsx)(`div`,{className:W.burndownFill,style:{width:`${r}%`}})}),(0,I.jsxs)(`span`,{className:W.burndownLabel,children:[t,`/`,n]})]}),(0,I.jsxs)(`span`,{className:W.numeric,children:[i.tokensIn.toLocaleString(),`/`,i.tokensOut.toLocaleString()]}),(0,I.jsxs)(`span`,{className:W.numeric,children:[`$`,i.estCostUsd.toFixed(4)]}),(0,I.jsx)(`span`,{className:W.date,children:No(e.createdAt)})]},e.id)})})]})]})}var Fo={svg:`_svg_2w2xr_1`,phaseLabel:`_phaseLabel_2w2xr_7`,edge:`_edge_2w2xr_14`,arrowHead:`_arrowHead_2w2xr_19`,nodeLink:`_nodeLink_2w2xr_23`,nodeRect:`_nodeRect_2w2xr_26`,nodeId:`_nodeId_2w2xr_31`,nodeGoal:`_nodeGoal_2w2xr_37`,neutral:`_neutral_2w2xr_45`,statusDot:`_statusDot_2w2xr_49`,info:`_info_2w2xr_53`,running:`_running_2w2xr_61`,success:`_success_2w2xr_69`,warning:`_warning_2w2xr_77`,danger:`_danger_2w2xr_85`,unknown:`_unknown_2w2xr_93`,empty:`_empty_2w2xr_105`},Io={scaffold:0,build:1,integrate:2,verify:3,review:4};function Lo(e,t){let n=new Map;for(let t of e?.tasks??[])n.set(t.id,{id:t.id,phase:t.phase,goal:t.goal,deps:t.deps,status:`pending`});for(let e of t){let t=n.get(e.id);n.set(e.id,{id:e.id,phase:e.phase||t?.phase||`build`,goal:t?.goal??``,deps:t?.deps??[],status:e.status})}return Array.from(n.values())}function Ro(e,t){return e.length>t?`${e.slice(0,t-1)}…`:e}var zo=140,Bo=48,Vo=20;function Ho({tasks:e,taskAnchorPrefix:t=`dag-task`}){if(e.length===0)return(0,I.jsx)(`p`,{className:Fo.empty,children:`No tasks in this swarm.`});let n=new Map;for(let t of e){let e=t.phase||`build`,r=n.get(e)??[];r.push(t),n.set(e,r)}let r=Array.from(n.keys()).sort((e,t)=>(Io[e]??99)-(Io[t]??99)),i=new Map,a=Vo;for(let e of r)i.set(e,a),a+=200;let o=a+Vo,s=new Map;for(let e of r){let t=Vo;for(let r of n.get(e)){let n=i.get(e);s.set(r.id,{x:n,y:t,cx:n+zo/2,cy:t+Bo/2}),t+=68}}let c=Math.max(...Array.from(s.values()).map(e=>e.y+Bo))+40,l=[];for(let t of e){let e=s.get(t.id);if(e)for(let n of t.deps){let r=s.get(n);if(!r)continue;let i=r.x+zo,a=r.cy,o=e.x,c=e.cy,u=(i+o)/2;l.push({key:`${n}->${t.id}`,d:`M ${i} ${a} C ${u} ${a}, ${u} ${c}, ${o} ${c}`})}}return(0,I.jsxs)(`svg`,{width:o,height:c,viewBox:`0 0 ${o} ${c}`,className:Fo.svg,role:`img`,"aria-label":`Swarm task dependency graph`,children:[(0,I.jsx)(`defs`,{children:(0,I.jsx)(`marker`,{id:`dag-arrow`,markerWidth:`8`,markerHeight:`8`,refX:`6`,refY:`3`,orient:`auto`,children:(0,I.jsx)(`path`,{d:`M0,0 L0,6 L8,3 z`,className:Fo.arrowHead})})}),r.map(e=>(0,I.jsx)(`text`,{x:i.get(e)+zo/2,y:14,textAnchor:`middle`,className:Fo.phaseLabel,children:e},e)),l.map(e=>(0,I.jsx)(`path`,{d:e.d,className:Fo.edge,fill:`none`,markerEnd:`url(#dag-arrow)`},e.key)),e.map(e=>{let n=s.get(e.id);if(!n)return null;let r=ee(e.status);return(0,I.jsx)(`g`,{transform:`translate(${n.x},${n.y})`,children:(0,I.jsxs)(`a`,{href:`#${t}-${encodeURIComponent(e.id)}`,className:Fo.nodeLink,children:[(0,I.jsx)(`title`,{children:`${e.id} — ${e.goal} (${e.status})`}),(0,I.jsx)(`rect`,{width:zo,height:Bo,rx:6,ry:6,className:`${Fo.nodeRect} ${Fo[r]}`}),(0,I.jsx)(`circle`,{cx:10,cy:Bo/2,r:4,className:`${Fo.statusDot} ${Fo[r]}`}),(0,I.jsx)(`text`,{x:20,y:17,className:Fo.nodeId,children:Ro(e.id,18)}),(0,I.jsx)(`text`,{x:20,y:33,className:Fo.nodeGoal,children:Ro(e.goal,20)})]})},e.id)})]})}var G={view:`_view_19up6_1`,header:`_header_19up6_8`,eyebrow:`_eyebrow_19up6_16`,title:`_title_19up6_22`,freshness:`_freshness_19up6_29`,burndownRow:`_burndownRow_19up6_35`,burndownTrack:`_burndownTrack_19up6_41`,burndownFill:`_burndownFill_19up6_49`,burndownLabel:`_burndownLabel_19up6_55`,metaGrid:`_metaGrid_19up6_62`,numeric:`_numeric_19up6_80`,mono:`_mono_19up6_84`,section:`_section_19up6_90`,sectionTitle:`_sectionTitle_19up6_96`,resultText:`_resultText_19up6_101`,escalationList:`_escalationList_19up6_110`,escalationItem:`_escalationItem_19up6_115`,escalationJson:`_escalationJson_19up6_120`,dagWrap:`_dagWrap_19up6_130`,taskList:`_taskList_19up6_138`,taskItem:`_taskItem_19up6_144`,taskHeader:`_taskHeader_19up6_157`,taskId:`_taskId_19up6_163`,taskPhase:`_taskPhase_19up6_169`,taskGoal:`_taskGoal_19up6_176`,taskDeps:`_taskDeps_19up6_181`,error:`_error_19up6_188`},Uo=`dag-task`;function Wo(e){if(!e)return`—`;let t=new Date(e);return Number.isNaN(t.getTime())?e:t.toLocaleString()}function Go(){let{id:e}=bn(),t=(0,M.useRef)(null);ke(`/work/swarms/${e??``}`,t);let n=m(ye(e??``));if(!e)return(0,I.jsx)(`div`,{className:G.view,children:(0,I.jsx)(`p`,{className:G.error,role:`alert`,children:`No swarm id in URL.`})});if(n.status===`loading`)return(0,I.jsxs)(`div`,{ref:t,className:G.view,children:[(0,I.jsx)(f,{width:`60%`}),(0,I.jsx)(f,{width:`30%`}),(0,I.jsx)(f,{width:`80%`})]});if(n.status===`error`||!n.data)return(0,I.jsx)(`div`,{ref:t,className:G.view,children:(0,I.jsx)(`p`,{className:G.error,role:`alert`,children:n.error?.message??`Swarm ${e} not found.`})});let r=n.data,i=r.tasks.filter(e=>e.status===`done`).length,a=Math.max(r.plan?.tasks.length??0,r.tasks.length),o=a>0?Math.round(i/a*100):0,s=Lo(r.plan,r.tasks),c=r.usage??{tokensIn:0,tokensOut:0,estCostUsd:0};return(0,I.jsxs)(`div`,{ref:t,className:G.view,children:[(0,I.jsxs)(`header`,{className:G.header,children:[(0,I.jsxs)(`div`,{children:[(0,I.jsxs)(`p`,{className:G.eyebrow,children:[`Swarm `,r.id]}),(0,I.jsx)(`h1`,{className:G.title,children:r.goal})]}),(0,I.jsxs)(`div`,{className:G.freshness,"aria-live":`polite`,children:[n.status===`refreshing`?(0,I.jsx)(A,{}):null,(0,I.jsx)(E,{status:r.status})]})]}),(0,I.jsxs)(`div`,{className:G.burndownRow,children:[(0,I.jsx)(`div`,{className:G.burndownTrack,children:(0,I.jsx)(`div`,{className:G.burndownFill,style:{width:`${o}%`}})}),(0,I.jsxs)(`span`,{className:G.burndownLabel,children:[i,`/`,a,` tasks done (`,o,`%)`]})]}),(0,I.jsxs)(`dl`,{className:G.metaGrid,children:[(0,I.jsxs)(`div`,{children:[(0,I.jsx)(`dt`,{children:`Tokens in / out`}),(0,I.jsxs)(`dd`,{className:G.numeric,children:[c.tokensIn.toLocaleString(),` / `,c.tokensOut.toLocaleString()]})]}),(0,I.jsxs)(`div`,{children:[(0,I.jsx)(`dt`,{children:`Est cost`}),(0,I.jsxs)(`dd`,{className:G.numeric,children:[`$`,c.estCostUsd.toFixed(4)]})]}),(0,I.jsxs)(`div`,{children:[(0,I.jsx)(`dt`,{children:`Parallelism`}),(0,I.jsx)(`dd`,{className:G.numeric,children:r.parallel})]}),(0,I.jsxs)(`div`,{children:[(0,I.jsx)(`dt`,{children:`Created`}),(0,I.jsx)(`dd`,{children:Wo(r.createdAt)})]}),(0,I.jsxs)(`div`,{children:[(0,I.jsx)(`dt`,{children:`Updated`}),(0,I.jsx)(`dd`,{children:Wo(r.updatedAt)})]}),r.project?(0,I.jsxs)(`div`,{children:[(0,I.jsx)(`dt`,{children:`Project`}),(0,I.jsx)(`dd`,{className:G.mono,children:r.project})]}):null]}),r.escalations&&r.escalations.length>0?(0,I.jsxs)(`section`,{className:G.section,children:[(0,I.jsxs)(`h2`,{className:G.sectionTitle,children:[`Escalations (`,r.escalations.length,`)`]}),(0,I.jsx)(`ul`,{className:G.escalationList,children:r.escalations.map((e,t)=>(0,I.jsx)(`li`,{className:G.escalationItem,children:(0,I.jsx)(`pre`,{className:G.escalationJson,children:JSON.stringify(e,null,2)})},t))})]}):null,r.result?(0,I.jsxs)(`section`,{className:G.section,children:[(0,I.jsx)(`h2`,{className:G.sectionTitle,children:`Result`}),(0,I.jsx)(`p`,{className:G.resultText,children:r.result})]}):null,(0,I.jsxs)(`section`,{className:G.section,children:[(0,I.jsx)(`h2`,{className:G.sectionTitle,children:`Task graph`}),(0,I.jsx)(`div`,{className:G.dagWrap,children:(0,I.jsx)(Ho,{tasks:s,taskAnchorPrefix:Uo})})]}),(0,I.jsxs)(`section`,{className:G.section,children:[(0,I.jsxs)(`h2`,{className:G.sectionTitle,children:[`Tasks (`,s.length,`)`]}),(0,I.jsx)(`ul`,{className:G.taskList,children:s.map(e=>(0,I.jsxs)(`li`,{id:`${Uo}-${e.id}`,"data-focus-key":`swarm-task-${e.id}`,className:G.taskItem,tabIndex:-1,children:[(0,I.jsxs)(`div`,{className:G.taskHeader,children:[(0,I.jsx)(`span`,{className:G.taskId,children:e.id}),(0,I.jsx)(`span`,{className:G.taskPhase,children:e.phase}),(0,I.jsx)(E,{status:e.status})]}),(0,I.jsx)(`p`,{className:G.taskGoal,children:e.goal}),e.deps.length>0?(0,I.jsxs)(`p`,{className:G.taskDeps,children:[`depends on: `,e.deps.join(`, `)]}):null]},e.id))})]})]})}var K={view:`_view_1bwoy_1`,header:`_header_1bwoy_8`,title:`_title_1bwoy_16`,freshness:`_freshness_1bwoy_22`,callout:`_callout_1bwoy_28`,calloutTitle:`_calloutTitle_1bwoy_39`,calloutBody:`_calloutBody_1bwoy_44`,calloutCommand:`_calloutCommand_1bwoy_48`,metaGrid:`_metaGrid_1bwoy_59`,section:`_section_1bwoy_77`,sectionTitle:`_sectionTitle_1bwoy_83`,serviceError:`_serviceError_1bwoy_88`,tickTableWrap:`_tickTableWrap_1bwoy_96`,tickTable:`_tickTable_1bwoy_96`,date:`_date_1bwoy_124`,numeric:`_numeric_1bwoy_130`,dryRun:`_dryRun_1bwoy_135`,empty:`_empty_1bwoy_140`,error:`_error_1bwoy_145`},Ko={missing:`No daemon state file has been written yet — the daemon may never have run on this machine.`,malformed:`The daemon state file exists but failed to parse.`,unreadable:`The daemon state file could not be read. This is also the exact signal produced when a state-recovery marker is present (a prior repair left a quarantine in progress) — the API does not distinguish the two cases, so treat this as "inspect before trusting displayed daemon state."`,inconsistent:`The daemon state file and the live lock/activity check disagree — the daemon may be mid-restart.`,unavailable:`The daemon state read path itself failed (I/O error or similar).`};function qo(e){if(!e)return`—`;let t=new Date(e);return Number.isNaN(t.getTime())?e:t.toLocaleString()}function Jo({quality:e}){let t=e.reason,n=Ko[t]??`Daemon state could not be verified.`;return(0,I.jsxs)(`section`,{className:K.callout,role:`alert`,children:[(0,I.jsxs)(`p`,{className:K.calloutTitle,children:[`Daemon state is unknown (`,t,`)`]}),(0,I.jsx)(`p`,{className:K.calloutBody,children:n}),(0,I.jsx)(`p`,{className:K.calloutBody,children:`Real remedy — preview or execute a state recovery from a terminal on this machine:`}),(0,I.jsx)(`pre`,{className:K.calloutCommand,children:`ashlr daemon recover-state --dry-run --expected-sha256 <sha256> [--json]
5
+ ashlr daemon recover-state --execute --plan-id <uuid> --plan-sha256 <sha256> --authorize <plan-sha256> [--json]`}),(0,I.jsx)(`p`,{className:K.calloutBody,children:`If a quarantine already exists and needs resolving instead:`}),(0,I.jsx)(`pre`,{className:K.calloutCommand,children:`ashlr daemon resolve-state --dry-run --quarantine-plan-id <uuid> --quarantine-receipt-sha256 <sha256> [--json]
6
+ ashlr daemon resolve-state --execute --plan-id <uuid> --plan-sha256 <sha256> --authorize <plan-sha256> --confirm <plan-sha256> [--json]`})]})}function Yo(){let e=(0,M.useRef)(null);ke(`/control/daemon`,e);let t=m(me),n=m(le),r=t.data?.daemon,i=n.data;return(0,I.jsxs)(`div`,{ref:e,className:K.view,children:[(0,I.jsxs)(`header`,{className:K.header,children:[(0,I.jsx)(`h1`,{className:K.title,children:`Daemon`}),(0,I.jsxs)(`div`,{className:K.freshness,"aria-live":`polite`,children:[t.status===`refreshing`||n.status===`refreshing`?(0,I.jsx)(A,{}):null,r?(0,I.jsx)(T,{quality:r.sourceQuality,label:`daemon state`,children:(0,I.jsx)(E,{status:r.running?`running`:`pending`,children:r.running?`running`:`stopped`})}):null]})]}),t.status===`loading`?(0,I.jsx)(f,{width:`60%`}):t.status===`error`||!r?(0,I.jsx)(`p`,{className:K.error,role:`alert`,children:t.error?.message??`Failed to load control snapshot.`}):(0,I.jsxs)(I.Fragment,{children:[w(r.sourceQuality)?null:(0,I.jsx)(Jo,{quality:r.sourceQuality}),(0,I.jsxs)(`dl`,{className:K.metaGrid,children:[(0,I.jsxs)(`div`,{children:[(0,I.jsx)(`dt`,{children:`Runtime state`}),(0,I.jsx)(`dd`,{children:(0,I.jsx)(T,{quality:r.sourceQuality,label:`runtime state`,children:r.runtimeState})})]}),(0,I.jsxs)(`div`,{children:[(0,I.jsx)(`dt`,{children:`PID`}),(0,I.jsx)(`dd`,{children:(0,I.jsx)(T,{quality:r.sourceQuality,label:`pid`,children:r.pid??`—`})})]}),(0,I.jsxs)(`div`,{children:[(0,I.jsx)(`dt`,{children:`Last tick`}),(0,I.jsx)(`dd`,{children:(0,I.jsx)(T,{quality:r.sourceQuality,label:`last tick`,children:qo(r.lastTickAt)})})]}),(0,I.jsxs)(`div`,{children:[(0,I.jsx)(`dt`,{children:`Today's spend`}),(0,I.jsx)(`dd`,{children:(0,I.jsxs)(T,{quality:r.sourceQuality,label:`spend`,children:[`$`,r.todaySpentUsd.toFixed(2)]})})]}),(0,I.jsxs)(`div`,{children:[(0,I.jsx)(`dt`,{children:`Direction mode`}),(0,I.jsx)(`dd`,{children:(0,I.jsx)(T,{quality:r.sourceQuality,label:`direction mode`,children:r.activeDirectionMode??`none`})})]}),(0,I.jsxs)(`div`,{children:[(0,I.jsx)(`dt`,{children:`Direction reason`}),(0,I.jsx)(`dd`,{children:(0,I.jsx)(T,{quality:r.sourceQuality,label:`direction reason`,children:r.activeDirectionReason??`—`})})]}),(0,I.jsxs)(`div`,{children:[(0,I.jsx)(`dt`,{children:`Autonomy control loop`}),(0,I.jsx)(`dd`,{children:(0,I.jsx)(T,{quality:r.sourceQuality,label:`autonomy control loop`,children:r.autonomyControlLoop?`enabled`:`disabled`})})]}),(0,I.jsxs)(`div`,{children:[(0,I.jsx)(`dt`,{children:`Autonomy control mode`}),(0,I.jsx)(`dd`,{children:(0,I.jsx)(T,{quality:r.sourceQuality,label:`autonomy control mode`,children:r.autonomyControlMode})})]})]}),(0,I.jsxs)(`section`,{className:K.section,children:[(0,I.jsx)(`h2`,{className:K.sectionTitle,children:`OS service`}),(0,I.jsxs)(`dl`,{className:K.metaGrid,children:[(0,I.jsxs)(`div`,{children:[(0,I.jsx)(`dt`,{children:`Registration state`}),(0,I.jsx)(`dd`,{children:r.service.registrationState})]}),(0,I.jsxs)(`div`,{children:[(0,I.jsx)(`dt`,{children:`Installed`}),(0,I.jsx)(`dd`,{children:r.service.installed?`yes`:`no`})]}),(0,I.jsxs)(`div`,{children:[(0,I.jsx)(`dt`,{children:`Running`}),(0,I.jsx)(`dd`,{children:r.service.running?`yes`:`no`})]}),(0,I.jsxs)(`div`,{children:[(0,I.jsx)(`dt`,{children:`Runtime state`}),(0,I.jsx)(`dd`,{children:r.service.runtimeState??`unknown`})]}),(0,I.jsxs)(`div`,{children:[(0,I.jsx)(`dt`,{children:`Platform`}),(0,I.jsx)(`dd`,{children:r.service.platformSpec})]})]}),r.service.errorLog?(0,I.jsx)(`p`,{className:K.serviceError,role:`alert`,children:r.service.errorLog}):null]})]}),(0,I.jsxs)(`section`,{className:K.section,children:[(0,I.jsx)(`h2`,{className:K.sectionTitle,children:`Recent ticks`}),n.status===`loading`?(0,I.jsx)(f,{width:`80%`}):!i||!i.ticks||i.ticks.length===0?(0,I.jsx)(`p`,{className:K.empty,children:`No tick history available.`}):(0,I.jsx)(`div`,{className:K.tickTableWrap,children:(0,I.jsxs)(`table`,{className:K.tickTable,children:[(0,I.jsx)(`thead`,{children:(0,I.jsxs)(`tr`,{children:[(0,I.jsx)(`th`,{scope:`col`,children:`Time`}),(0,I.jsx)(`th`,{scope:`col`,children:`Reason`}),(0,I.jsx)(`th`,{scope:`col`,children:`Items`}),(0,I.jsx)(`th`,{scope:`col`,children:`Proposals`}),(0,I.jsx)(`th`,{scope:`col`,children:`Spend`})]})}),(0,I.jsx)(`tbody`,{children:[...i.ticks].reverse().slice(0,20).map((e,t)=>(0,I.jsxs)(`tr`,{children:[(0,I.jsx)(`td`,{className:K.date,children:qo(e.ts)}),(0,I.jsxs)(`td`,{children:[e.reason,e.dryRun?(0,I.jsx)(`span`,{className:K.dryRun,children:` (dry-run)`}):null]}),(0,I.jsx)(`td`,{className:K.numeric,children:e.itemsConsidered}),(0,I.jsx)(`td`,{className:K.numeric,children:e.proposalsCreated}),(0,I.jsxs)(`td`,{className:K.numeric,children:[`$`,e.spentUsd.toFixed(4)]})]},`${e.ts}-${t}`))})]})})]})]})}var q={view:`_view_ssrhq_1`,header:`_header_ssrhq_8`,title:`_title_ssrhq_14`,freshness:`_freshness_ssrhq_20`,section:`_section_ssrhq_26`,sectionTitle:`_sectionTitle_ssrhq_32`,killSwitchRow:`_killSwitchRow_ssrhq_37`,pauseButton:`_pauseButton_ssrhq_47`,resumeButton:`_resumeButton_ssrhq_65`,mutationError:`_mutationError_ssrhq_83`,metaGrid:`_metaGrid_ssrhq_91`,numeric:`_numeric_ssrhq_109`,lockWarning:`_lockWarning_ssrhq_113`,tableWrap:`_tableWrap_ssrhq_117`,table:`_table_ssrhq_117`,mono:`_mono_ssrhq_144`,empty:`_empty_ssrhq_149`,error:`_error_ssrhq_154`,confirmBody:`_confirmBody_ssrhq_162`,confirmActions:`_confirmActions_ssrhq_168`,cancelButton:`_cancelButton_ssrhq_174`,confirmButton:`_confirmButton_ssrhq_186`};function Xo(e){if(!e)return`—`;let t=new Date(e);return Number.isNaN(t.getTime())?e:t.toLocaleString()}function Zo(){let e=(0,M.useRef)(null);ke(`/control/fleet`,e);let t=m(he),n=m(fe),r=g(),[i,a]=(0,M.useState)(null),[o,s]=(0,M.useState)(!1),[c,l]=(0,M.useState)(!1),[u,d]=(0,M.useState)(!1),[p,h]=(0,M.useState)(null);async function _(e){d(!0),h(null);try{e===`pause`?await xe():await be()}catch(e){h(e instanceof Error?e.message:String(e))}finally{d(!1),a(null)}}function v(e){h(null),a(e),s(!0)}function y(){s(!1),r.hasHold?i&&_(i):l(!0)}(0,M.useEffect)(()=>{c||i&&(r.hasHold?_(i):a(null))},[c]);let b=t.data,x=b?.killSwitch,C=x?{sourceState:x.sourceState,complete:x.sourceState===`healthy`,reason:x.reason}:void 0,w=b?.killed===!0;return(0,I.jsxs)(`div`,{ref:e,className:q.view,children:[(0,I.jsxs)(`header`,{className:q.header,children:[(0,I.jsx)(`h1`,{className:q.title,children:`Fleet`}),(0,I.jsx)(`div`,{className:q.freshness,"aria-live":`polite`,children:t.status===`refreshing`||n.status===`refreshing`?(0,I.jsx)(A,{}):null})]}),t.status===`loading`?(0,I.jsx)(f,{width:`60%`}):t.status===`error`||!b?(0,I.jsx)(`p`,{className:q.error,role:`alert`,children:t.error?.message??`Failed to load fleet status.`}):(0,I.jsxs)(I.Fragment,{children:[(0,I.jsxs)(`section`,{className:q.section,children:[(0,I.jsx)(`h2`,{className:q.sectionTitle,children:`Kill switch`}),(0,I.jsx)(`div`,{className:q.killSwitchRow,children:(0,I.jsx)(T,{quality:C,label:`kill switch`,renderControl:()=>(0,I.jsx)(`button`,{type:`button`,className:w?q.resumeButton:q.pauseButton,onClick:()=>v(w?`resume`:`pause`),disabled:u,children:u?`Working…`:w?`Resume fleet`:`Pause fleet`}),children:(0,I.jsx)(E,{status:w?`paused`:`running`,children:w?`engaged — fleet paused`:`clear — fleet active`})})}),p?(0,I.jsx)(`p`,{className:q.mutationError,role:`alert`,children:p}):null]}),(0,I.jsxs)(`section`,{className:q.section,children:[(0,I.jsx)(`h2`,{className:q.sectionTitle,children:`Queue depth`}),(0,I.jsxs)(`dl`,{className:q.metaGrid,children:[(0,I.jsxs)(`div`,{children:[(0,I.jsx)(`dt`,{children:`Backlog items`}),(0,I.jsx)(`dd`,{className:q.numeric,children:b.queue.backlogItems})]}),b.queue.eligibleBacklogItems===void 0?null:(0,I.jsxs)(`div`,{children:[(0,I.jsx)(`dt`,{children:`Eligible`}),(0,I.jsx)(`dd`,{className:q.numeric,children:b.queue.eligibleBacklogItems})]}),b.queue.cooldownItems===void 0?null:(0,I.jsxs)(`div`,{children:[(0,I.jsx)(`dt`,{children:`Cooldown`}),(0,I.jsx)(`dd`,{className:q.numeric,children:b.queue.cooldownItems})]}),b.queue.pendingItems===void 0?null:(0,I.jsxs)(`div`,{children:[(0,I.jsx)(`dt`,{children:`Pending`}),(0,I.jsx)(`dd`,{className:q.numeric,children:b.queue.pendingItems})]}),b.queue.nextEligibleAt===void 0?null:(0,I.jsxs)(`div`,{children:[(0,I.jsx)(`dt`,{children:`Next eligible`}),(0,I.jsx)(`dd`,{children:Xo(b.queue.nextEligibleAt)})]})]})]}),(0,I.jsxs)(`section`,{className:q.section,children:[(0,I.jsx)(`h2`,{className:q.sectionTitle,children:`Lease health`}),b.queue.shared?(0,I.jsxs)(I.Fragment,{children:[(0,I.jsxs)(`dl`,{className:q.metaGrid,children:[(0,I.jsxs)(`div`,{children:[(0,I.jsx)(`dt`,{children:`Active claims`}),(0,I.jsx)(`dd`,{className:q.numeric,children:b.queue.shared.activeClaims})]}),(0,I.jsxs)(`div`,{children:[(0,I.jsx)(`dt`,{children:`Owned by this machine`}),(0,I.jsx)(`dd`,{className:q.numeric,children:b.queue.shared.ownedClaims})]}),(0,I.jsxs)(`div`,{children:[(0,I.jsx)(`dt`,{children:`Reclaimable (expired)`}),(0,I.jsx)(`dd`,{className:q.numeric,children:b.queue.shared.reclaimableClaims})]}),b.queue.shared.executingClaims===void 0?null:(0,I.jsxs)(`div`,{children:[(0,I.jsx)(`dt`,{children:`Executing`}),(0,I.jsx)(`dd`,{className:q.numeric,children:b.queue.shared.executingClaims})]}),b.queue.shared.ambiguousClaims===void 0?null:(0,I.jsxs)(`div`,{children:[(0,I.jsx)(`dt`,{children:`Ambiguous (needs reconciliation)`}),(0,I.jsx)(`dd`,{className:q.numeric,children:b.queue.shared.ambiguousClaims})]}),(0,I.jsxs)(`div`,{children:[(0,I.jsx)(`dt`,{children:`Next lease expiry`}),(0,I.jsx)(`dd`,{children:Xo(b.queue.shared.nextLeaseExpiryAt)})]}),(0,I.jsxs)(`div`,{children:[(0,I.jsx)(`dt`,{children:`Advisory lock`}),(0,I.jsxs)(`dd`,{children:[b.queue.shared.lock.present?b.queue.shared.lock.stale?`present, stale`:`present, healthy`:`absent`,b.queue.shared.lock.recoveryRequired?(0,I.jsx)(`span`,{className:q.lockWarning,children:` — recovery required`}):null]})]})]}),b.queue.shared.claimsByMachine.length>0?(0,I.jsx)(`div`,{className:q.tableWrap,children:(0,I.jsxs)(`table`,{className:q.table,children:[(0,I.jsx)(`thead`,{children:(0,I.jsxs)(`tr`,{children:[(0,I.jsx)(`th`,{scope:`col`,children:`Machine`}),(0,I.jsx)(`th`,{scope:`col`,children:`Active`}),(0,I.jsx)(`th`,{scope:`col`,children:`Expired`}),(0,I.jsx)(`th`,{scope:`col`,children:`Executing`})]})}),(0,I.jsx)(`tbody`,{children:b.queue.shared.claimsByMachine.map(e=>(0,I.jsxs)(`tr`,{children:[(0,I.jsx)(`td`,{className:q.mono,children:e.machineId}),(0,I.jsx)(`td`,{className:q.numeric,children:e.active}),(0,I.jsx)(`td`,{className:q.numeric,children:e.expired}),(0,I.jsx)(`td`,{className:q.numeric,children:e.executing??`—`})]},e.machineId))})]})}):null]}):(0,I.jsx)(`p`,{className:q.empty,children:`Shared fleet queue is not in use on this deployment.`})]})]}),(0,I.jsxs)(`section`,{className:q.section,children:[(0,I.jsx)(`h2`,{className:q.sectionTitle,children:`Recent activity`}),n.status===`loading`?(0,I.jsx)(f,{width:`70%`}):n.status===`error`||!n.data?(0,I.jsx)(`p`,{className:q.error,role:`alert`,children:n.error?.message??`Failed to load fleet activity.`}):(0,I.jsxs)(`dl`,{className:q.metaGrid,children:[(0,I.jsxs)(`div`,{children:[(0,I.jsx)(`dt`,{children:`Cooldown items`}),(0,I.jsx)(`dd`,{className:q.numeric,children:n.data.cooldownCount})]}),(0,I.jsxs)(`div`,{children:[(0,I.jsx)(`dt`,{children:`Engines ready`}),(0,I.jsxs)(`dd`,{className:q.numeric,children:[n.data.engineReadiness.filter(e=>e.installed&&e.authed===!0).length,` /`,` `,n.data.engineReadiness.length]})]}),(0,I.jsxs)(`div`,{children:[(0,I.jsx)(`dt`,{children:`Recent auto-merges`}),(0,I.jsx)(`dd`,{className:q.numeric,children:b?.merges.recent??`—`})]})]})]}),(0,I.jsxs)(S,{open:o,onClose:()=>{s(!1),a(null)},titleId:`fleet-kill-switch-confirm`,title:i===`resume`?`Resume the fleet?`:`Pause the fleet?`,children:[(0,I.jsx)(`p`,{className:q.confirmBody,children:i===`resume`?`This clears the global kill switch. Autonomous dispatch will resume across the fleet.`:`This engages the global kill switch. Autonomous dispatch halts fleet-wide until explicitly resumed.`}),(0,I.jsxs)(`div`,{className:q.confirmActions,children:[(0,I.jsx)(`button`,{type:`button`,className:q.cancelButton,onClick:()=>{s(!1),a(null)},children:`Cancel`}),(0,I.jsx)(`button`,{type:`button`,className:q.confirmButton,onClick:y,children:i===`resume`?`Yes, resume`:`Yes, pause`})]})]}),(0,I.jsx)(we,{open:c,onClose:()=>l(!1),reason:i===`resume`?`Resuming the fleet requires the dispatch token.`:`Pausing the fleet requires the dispatch token.`})]})}var J={view:`_view_1fet3_1`,header:`_header_1fet3_8`,title:`_title_1fet3_14`,freshness:`_freshness_1fet3_20`,unavailable:`_unavailable_1fet3_26`,counts:`_counts_1fet3_35`,countTile:`_countTile_1fet3_41`,countValue:`_countValue_1fet3_51`,countLabel:`_countLabel_1fet3_57`,critical:`_critical_1fet3_64`,high:`_high_1fet3_65`,medium:`_medium_1fet3_68`,low:`_low_1fet3_71`,filters:`_filters_1fet3_75`,field:`_field_1fet3_86`,fieldLabel:`_fieldLabel_1fet3_92`,input:`_input_1fet3_97`,select:`_select_1fet3_98`,tableWrap:`_tableWrap_1fet3_114`,table:`_table_1fet3_114`,mono:`_mono_1fet3_141`,empty:`_empty_1fet3_146`,error:`_error_1fet3_153`},Qo={critical:`danger`,high:`danger`,medium:`warning`,low:`neutral`},$o={critical:0,high:1,medium:2,low:3};function es(){let e=(0,M.useRef)(null);ke(`/control/security`,e);let t=m(me),n=t.data?.security,[r,i]=(0,M.useState)(``),[a,o]=(0,M.useState)(`all`),[s,c]=(0,M.useState)(`all`),l=(0,M.useMemo)(()=>Array.from(new Set((n?.findings??[]).map(e=>e.repo))).sort(),[n]),u=(0,M.useMemo)(()=>(n?.findings??[]).filter(e=>a===`all`||e.severity===a).filter(e=>s===`all`||e.repo===s).filter(e=>{if(!r.trim())return!0;let t=r.trim().toLowerCase();return e.title.toLowerCase().includes(t)||e.repo.toLowerCase().includes(t)}).sort((e,t)=>($o[e.severity]??9)-($o[t.severity]??9)),[n,a,s,r]);return(0,I.jsxs)(`div`,{ref:e,className:J.view,children:[(0,I.jsxs)(`header`,{className:J.header,children:[(0,I.jsx)(`h1`,{className:J.title,children:`Security`}),(0,I.jsx)(`div`,{className:J.freshness,"aria-live":`polite`,children:t.status===`refreshing`?(0,I.jsx)(A,{}):null})]}),t.status===`loading`?(0,I.jsx)(f,{width:`60%`}):t.status===`error`||!n?(0,I.jsx)(`p`,{className:J.error,role:`alert`,children:t.error?.message??`Failed to load control snapshot.`}):n.available?(0,I.jsxs)(I.Fragment,{children:[(0,I.jsxs)(`div`,{className:J.counts,children:[(0,I.jsxs)(`div`,{className:`${J.countTile} ${J.critical}`,children:[(0,I.jsx)(`span`,{className:J.countValue,children:n.counts.critical}),(0,I.jsx)(`span`,{className:J.countLabel,children:`Critical`})]}),(0,I.jsxs)(`div`,{className:`${J.countTile} ${J.high}`,children:[(0,I.jsx)(`span`,{className:J.countValue,children:n.counts.high}),(0,I.jsx)(`span`,{className:J.countLabel,children:`High`})]}),(0,I.jsxs)(`div`,{className:`${J.countTile} ${J.medium}`,children:[(0,I.jsx)(`span`,{className:J.countValue,children:n.counts.medium}),(0,I.jsx)(`span`,{className:J.countLabel,children:`Medium`})]}),(0,I.jsxs)(`div`,{className:`${J.countTile} ${J.low}`,children:[(0,I.jsx)(`span`,{className:J.countValue,children:n.counts.low}),(0,I.jsx)(`span`,{className:J.countLabel,children:`Low`})]})]}),(0,I.jsxs)(`form`,{className:J.filters,role:`search`,"aria-label":`Filter findings`,onSubmit:e=>e.preventDefault(),children:[(0,I.jsxs)(`label`,{className:J.field,children:[(0,I.jsx)(`span`,{className:J.fieldLabel,children:`Search`}),(0,I.jsx)(`input`,{type:`text`,className:J.input,placeholder:`title or repo`,value:r,onChange:e=>i(e.target.value)})]}),(0,I.jsxs)(`label`,{className:J.field,children:[(0,I.jsx)(`span`,{className:J.fieldLabel,children:`Severity`}),(0,I.jsxs)(`select`,{className:J.select,value:a,onChange:e=>o(e.target.value),children:[(0,I.jsx)(`option`,{value:`all`,children:`All`}),(0,I.jsx)(`option`,{value:`critical`,children:`Critical`}),(0,I.jsx)(`option`,{value:`high`,children:`High`}),(0,I.jsx)(`option`,{value:`medium`,children:`Medium`}),(0,I.jsx)(`option`,{value:`low`,children:`Low`})]})]}),(0,I.jsxs)(`label`,{className:J.field,children:[(0,I.jsx)(`span`,{className:J.fieldLabel,children:`Repo`}),(0,I.jsxs)(`select`,{className:J.select,value:s,onChange:e=>c(e.target.value),children:[(0,I.jsx)(`option`,{value:`all`,children:`All`}),l.map(e=>(0,I.jsx)(`option`,{value:e,children:e},e))]})]})]}),u.length===0?(0,I.jsx)(`p`,{className:J.empty,children:`No findings match the current filters.`}):(0,I.jsx)(`div`,{className:J.tableWrap,children:(0,I.jsxs)(`table`,{className:J.table,children:[(0,I.jsx)(`thead`,{children:(0,I.jsxs)(`tr`,{children:[(0,I.jsx)(`th`,{scope:`col`,children:`Severity`}),(0,I.jsx)(`th`,{scope:`col`,children:`Repo`}),(0,I.jsx)(`th`,{scope:`col`,children:`Finding`})]})}),(0,I.jsx)(`tbody`,{children:u.map((e,t)=>(0,I.jsxs)(`tr`,{children:[(0,I.jsx)(`td`,{children:(0,I.jsx)(E,{status:e.severity,tone:Qo[e.severity]??`neutral`})}),(0,I.jsx)(`td`,{className:J.mono,children:e.repo}),(0,I.jsx)(`td`,{children:e.title})]},`${e.repo}-${e.title}-${t}`))})]})})]}):(0,I.jsx)(`p`,{className:J.unavailable,children:`No cached security data available — the backlog is absent, empty, or has no security-source findings. This is not the same as "clean": it means binshield hasn't produced cached findings for this fleet yet.`})]})}var Y={view:`_view_1yeql_1`,header:`_header_1yeql_8`,title:`_title_1yeql_14`,freshness:`_freshness_1yeql_20`,count:`_count_1yeql_26`,missionCard:`_missionCard_1yeql_31`,sectionTitle:`_sectionTitle_1yeql_41`,missionState:`_missionState_1yeql_49`,sourceGrid:`_sourceGrid_1yeql_54`,list:`_list_1yeql_68`,goalCard:`_goalCard_1yeql_74`,goalHeader:`_goalHeader_1yeql_88`,goalObjective:`_goalObjective_1yeql_95`,progressRow:`_progressRow_1yeql_100`,progressTrack:`_progressTrack_1yeql_106`,progressFill:`_progressFill_1yeql_114`,progressLabel:`_progressLabel_1yeql_120`,nextActionable:`_nextActionable_1yeql_127`,mono:`_mono_1yeql_132`,milestoneList:`_milestoneList_1yeql_136`,milestoneItem:`_milestoneItem_1yeql_142`,milestoneTitle:`_milestoneTitle_1yeql_149`,noMilestones:`_noMilestones_1yeql_153`,empty:`_empty_1yeql_158`,error:`_error_1yeql_165`};function ts(){let e=(0,M.useRef)(null);ke(`/goals`,e);let t=m(k),n=m(te),r=t.data??[],i=n.data;return(0,I.jsxs)(`div`,{ref:e,className:Y.view,children:[(0,I.jsxs)(`header`,{className:Y.header,children:[(0,I.jsx)(`h1`,{className:Y.title,children:`Goals`}),(0,I.jsxs)(`div`,{className:Y.freshness,"aria-live":`polite`,children:[t.status===`refreshing`||n.status===`refreshing`?(0,I.jsx)(A,{}):null,(0,I.jsxs)(`span`,{className:Y.count,children:[r.length,` goals`]})]})]}),n.status===`loading`?(0,I.jsx)(f,{width:`50%`}):n.status===`success`&&i?(0,I.jsxs)(`section`,{className:Y.missionCard,children:[(0,I.jsx)(`h2`,{className:Y.sectionTitle,children:`Mission state`}),(0,I.jsx)(`p`,{className:Y.missionState,children:i.state}),(0,I.jsxs)(`dl`,{className:Y.sourceGrid,children:[(0,I.jsxs)(`div`,{children:[(0,I.jsx)(`dt`,{children:`Briefing`}),(0,I.jsx)(`dd`,{children:(0,I.jsx)(T,{quality:i.sources.briefing??void 0,label:`briefing source`,children:`available`})})]}),(0,I.jsxs)(`div`,{children:[(0,I.jsx)(`dt`,{children:`Goals source`}),(0,I.jsx)(`dd`,{children:(0,I.jsx)(T,{quality:i.sources.goals??void 0,label:`goals source`,children:`available`})})]}),(0,I.jsxs)(`div`,{children:[(0,I.jsx)(`dt`,{children:`Enrollment`}),(0,I.jsx)(`dd`,{children:(0,I.jsx)(T,{quality:i.sources.enrollment??void 0,label:`enrollment source`,children:`available`})})]}),(0,I.jsxs)(`div`,{children:[(0,I.jsx)(`dt`,{children:`Proposals`}),(0,I.jsx)(`dd`,{children:(0,I.jsx)(T,{quality:i.sources.proposals??void 0,label:`proposals source`,children:`available`})})]})]})]}):null,t.status===`loading`?(0,I.jsxs)(`div`,{className:Y.list,children:[(0,I.jsx)(f,{width:`90%`}),(0,I.jsx)(f,{width:`70%`})]}):t.status===`error`?(0,I.jsx)(`p`,{className:Y.error,role:`alert`,children:t.error?.message??`Failed to load goals.`}):r.length===0?(0,I.jsx)(`p`,{className:Y.empty,children:`No active goals.`}):(0,I.jsx)(`ul`,{className:Y.list,children:r.map(e=>{let t=Math.round((e.progress.fractionDone??0)*100);return(0,I.jsxs)(`li`,{className:Y.goalCard,"data-focus-key":`goal-${e.id}`,tabIndex:0,children:[(0,I.jsxs)(`div`,{className:Y.goalHeader,children:[(0,I.jsx)(`h3`,{className:Y.goalObjective,children:e.objective}),(0,I.jsx)(E,{status:e.status})]}),(0,I.jsxs)(`div`,{className:Y.progressRow,children:[(0,I.jsx)(`div`,{className:Y.progressTrack,children:(0,I.jsx)(`div`,{className:Y.progressFill,style:{width:`${t}%`}})}),(0,I.jsxs)(`span`,{className:Y.progressLabel,children:[t,`%`]})]}),e.progress.nextActionableId?(0,I.jsxs)(`p`,{className:Y.nextActionable,children:[`Next actionable milestone id: `,(0,I.jsx)(`span`,{className:Y.mono,children:e.progress.nextActionableId})]}):null,e.milestones.length>0?(0,I.jsx)(`ol`,{className:Y.milestoneList,children:[...e.milestones].sort((e,t)=>e.order-t.order).map(e=>(0,I.jsxs)(`li`,{className:Y.milestoneItem,children:[(0,I.jsx)(E,{status:e.status}),(0,I.jsx)(`span`,{className:Y.milestoneTitle,children:e.title})]},e.title))}):(0,I.jsx)(`p`,{className:Y.noMilestones,children:`No milestones yet.`})]},e.id)})})]})}var X={list:`_list_1nh33_1`,filters:`_filters_1nh33_8`,filterField:`_filterField_1nh33_14`,filterLabel:`_filterLabel_1nh33_21`,summary:`_summary_1nh33_36`,batchBar:`_batchBar_1nh33_44`,batchApprove:`_batchApprove_1nh33_61`,batchReject:`_batchReject_1nh33_66`,skeletons:`_skeletons_1nh33_71`,error:`_error_1nh33_77`,empty:`_empty_1nh33_85`,table:`_table_1nh33_94`,checkboxCol:`_checkboxCol_1nh33_121`,repoCol:`_repoCol_1nh33_125`,kindCol:`_kindCol_1nh33_129`,ageCol:`_ageCol_1nh33_133`,statusCol:`_statusCol_1nh33_137`,whyCol:`_whyCol_1nh33_141`,row:`_row_1nh33_145`,rowActive:`_rowActive_1nh33_155`,titleLink:`_titleLink_1nh33_159`,repoCell:`_repoCell_1nh33_172`,age:`_age_1nh33_133`,why:`_why_1nh33_141`},ns=[{value:`pending`,label:`Pending`},{value:`rejected`,label:`Rejected`},{value:`approved`,label:`Approved`},{value:`applied`,label:`Applied`},{value:`failed`,label:`Failed`},{value:`awaiting-host-merge`,label:`Awaiting host merge`},{value:`all`,label:`All statuses`}];function rs(e){let t=Date.parse(e);if(Number.isNaN(t))return`—`;let n=Math.max(0,Math.round((Date.now()-t)/1e3));if(n<60)return`${n}s`;let r=Math.round(n/60);if(r<60)return`${r}m`;let i=Math.round(r/60);return i<24?`${i}h`:`${Math.round(i/24)}d`}function is({selectedId:e,onDispatchDisabled:t}){let[n,r]=(0,M.useState)(`pending`),[i,a]=(0,M.useState)(``),[o,s]=(0,M.useState)(``),[c,u]=(0,M.useState)(``),[d,f]=(0,M.useState)(new Set),[h,g]=(0,M.useState)(0),[_,v]=(0,M.useState)(null),[b,x]=(0,M.useState)(!1),[S,C]=(0,M.useState)(!1),[w,T]=(0,M.useState)(!1),[ee,D]=(0,M.useState)(null),te=(0,M.useRef)(null),ne=(0,M.useRef)(new Map),O=gn(),re=m(_e({status:n,since:i||void 0,limit:500})),ie=(0,M.useMemo)(()=>{let e=re.data?.proposals??[],t=o.trim().toLowerCase(),n=c.trim().toLowerCase();return e.filter(e=>!(t&&!e.title.toLowerCase().includes(t)&&!(e.summary??``).toLowerCase().includes(t)||n&&!(e.repo??``).toLowerCase().includes(n)))},[re.data,o,c]);(0,M.useEffect)(()=>{g(e=>Math.min(e,Math.max(ie.length-1,0)))},[ie.length]);function ae(e,t){t===`pending`&&f(t=>{let n=new Set(t);return n.has(e)?n.delete(e):n.add(e),n})}function oe(e){if(ie.length!==0){if(e.key===`ArrowDown`){e.preventDefault();let t=Math.min(h+1,ie.length-1);g(t),ne.current.get(ie[t].id)?.focus()}else if(e.key===`ArrowUp`){e.preventDefault();let t=Math.max(h-1,0);g(t),ne.current.get(ie[t].id)?.focus()}else if(e.key===`Enter`){let e=ie[h];e&&O(`/inbox/${encodeURIComponent(e.id)}`)}else if(e.key===` `){let t=ie[h];t&&(e.preventDefault(),ae(t.id,t.status))}else e.key===`/`&&(e.preventDefault(),te.current?.focus())}}function se(e){d.size!==0&&(D(null),v(e),p()?C(!0):x(!0))}function ce(){x(!1),p()?C(!0):v(null)}async function le(){if(!_)return;T(!0),D(null);let e=Array.from(d),n=[];for(let r of e)try{_===`approve`?await Ce(r):await Se(r)}catch(e){if(e instanceof y){T(!1),C(!1),v(null),t();return}n.push(r)}T(!1),n.length>0?(D(`${n.length} of ${e.length} failed (already decided, or a transient error). Selection kept for retry.`),f(new Set(n))):(C(!1),v(null),f(new Set))}let k=d.size;return(0,I.jsxs)(`div`,{className:X.list,children:[(0,I.jsxs)(`div`,{className:X.filters,children:[(0,I.jsxs)(`label`,{className:X.filterField,children:[(0,I.jsx)(`span`,{className:X.filterLabel,children:`Status`}),(0,I.jsx)(`select`,{value:n,onChange:e=>r(e.target.value),children:ns.map(e=>(0,I.jsx)(`option`,{value:e.value,children:e.label},e.value))})]}),(0,I.jsxs)(`label`,{className:X.filterField,children:[(0,I.jsx)(`span`,{className:X.filterLabel,children:`Since`}),(0,I.jsx)(`input`,{type:`date`,value:i,onChange:e=>a(e.target.value)})]}),(0,I.jsxs)(`label`,{className:X.filterField,children:[(0,I.jsx)(`span`,{className:X.filterLabel,children:`Repo`}),(0,I.jsx)(`input`,{type:`text`,placeholder:`filter by repo`,value:c,onChange:e=>u(e.target.value)})]}),(0,I.jsxs)(`label`,{className:X.filterField,children:[(0,I.jsx)(`span`,{className:X.filterLabel,children:`Search`}),(0,I.jsx)(`input`,{ref:te,type:`search`,placeholder:`title or summary — press / to focus`,value:o,onChange:e=>s(e.target.value)})]})]}),(0,I.jsxs)(`div`,{className:X.summary,"aria-live":`polite`,children:[re.status===`refreshing`?(0,I.jsx)(A,{}):null,re.data?(0,I.jsxs)(`span`,{children:[ie.length,` shown of `,re.data.total,` total`,re.data.truncated?` · narrow filters to see more`:``]}):null]}),k>0?(0,I.jsxs)(`div`,{className:X.batchBar,children:[(0,I.jsxs)(`span`,{children:[k,` selected`]}),(0,I.jsx)(`button`,{type:`button`,onClick:()=>f(new Set),children:`Clear`}),(0,I.jsxs)(`button`,{type:`button`,className:X.batchReject,onClick:()=>se(`reject`),children:[`Reject `,k]}),(0,I.jsxs)(`button`,{type:`button`,className:X.batchApprove,onClick:()=>se(`approve`),children:[`Approve `,k]})]}):null,re.status===`loading`?(0,I.jsxs)(`div`,{className:X.skeletons,children:[(0,I.jsx)(l,{}),(0,I.jsx)(l,{}),(0,I.jsx)(l,{}),(0,I.jsx)(l,{})]}):re.status===`error`?(0,I.jsx)(`div`,{className:X.error,role:`alert`,children:re.error?.message??`Failed to load proposals.`}):ie.length===0?(0,I.jsxs)(`p`,{className:X.empty,children:[`No `,n===`all`?``:n+` `,`proposals match`,o||c?` this filter`:``,`.`]}):(0,I.jsxs)(`table`,{className:X.table,role:`grid`,"aria-label":`Proposals`,onKeyDown:oe,children:[(0,I.jsx)(`thead`,{children:(0,I.jsxs)(`tr`,{children:[(0,I.jsx)(`th`,{scope:`col`,className:X.checkboxCol}),(0,I.jsx)(`th`,{scope:`col`,children:`Title`}),(0,I.jsx)(`th`,{scope:`col`,className:X.repoCol,children:`Repo`}),(0,I.jsx)(`th`,{scope:`col`,className:X.kindCol,children:`Kind`}),(0,I.jsx)(`th`,{scope:`col`,className:X.ageCol,children:`Age`}),(0,I.jsx)(`th`,{scope:`col`,className:X.statusCol,children:`Status`}),(0,I.jsx)(`th`,{scope:`col`,className:X.whyCol,children:`Why`})]})}),(0,I.jsx)(`tbody`,{children:ie.map((t,n)=>(0,I.jsxs)(`tr`,{ref:e=>{e?ne.current.set(t.id,e):ne.current.delete(t.id)},"data-focus-key":`proposal-${t.id}`,tabIndex:n===h?0:-1,className:`${X.row} ${t.id===e?X.rowActive:``}`,onFocus:()=>g(n),"aria-selected":t.id===e,children:[(0,I.jsx)(`td`,{className:X.checkboxCol,children:(0,I.jsx)(`input`,{type:`checkbox`,checked:d.has(t.id),disabled:t.status!==`pending`,title:t.status===`pending`?void 0:`Only pending proposals can be approved/rejected`,onChange:()=>ae(t.id,t.status),onClick:e=>e.stopPropagation()})}),(0,I.jsx)(`td`,{children:(0,I.jsx)(Ar,{to:`/inbox/${encodeURIComponent(t.id)}`,className:X.titleLink,title:t.title,children:t.title})}),(0,I.jsx)(`td`,{className:X.repoCell,title:t.repo??void 0,children:t.repo?t.repo.split(`/`).pop():`—`}),(0,I.jsx)(`td`,{children:t.kind}),(0,I.jsx)(`td`,{className:X.age,children:rs(t.createdAt)}),(0,I.jsx)(`td`,{children:(0,I.jsx)(E,{status:t.status})}),(0,I.jsx)(`td`,{className:X.why,title:t.decisionReason??void 0,children:t.decisionReason??`—`})]},t.id))})]}),(0,I.jsx)(we,{open:b,onClose:ce,reason:`${_===`approve`?`Approving`:`Rejecting`} ${k} proposals requires the dispatch token.`}),(0,I.jsx)(Te,{open:S,onClose:()=>{C(!1),v(null),D(null)},title:_===`approve`?`Approve ${k} proposals?`:`Reject ${k} proposals?`,body:_===`approve`?(0,I.jsxs)(I.Fragment,{children:[`This applies all `,k,` selected proposals to their repos now, one at a time. This cannot be undone from this dialog.`]}):(0,I.jsxs)(I.Fragment,{children:[`This rejects all `,k,` selected proposals. They stay visible in history as rejected.`]}),confirmLabel:_===`approve`?`Approve ${k}`:`Reject ${k}`,destructive:_===`reject`,busy:w,error:ee,onConfirm:()=>void le()})]})}var Z={panel:`_panel_1n6q8_1`,error:`_error_1n6q8_8`,header:`_header_1n6q8_16`,titleRow:`_titleRow_1n6q8_22`,title:`_title_1n6q8_22`,metaRow:`_metaRow_1n6q8_35`,metaItem:`_metaItem_1n6q8_44`,riskBadge:`_riskBadge_1n6q8_48`,risk_low:`_risk_low_1n6q8_54`,risk_medium:`_risk_medium_1n6q8_55`,risk_high:`_risk_high_1n6q8_56`,summary:`_summary_1n6q8_58`,evidence:`_evidence_1n6q8_64`,evidenceRow:`_evidenceRow_1n6q8_74`,evidenceLabel:`_evidenceLabel_1n6q8_81`,muted:`_muted_1n6q8_89`,rationaleNote:`_rationaleNote_1n6q8_94`,failedChecks:`_failedChecks_1n6q8_101`,diffSection:`_diffSection_1n6q8_107`,actions:`_actions_1n6q8_111`,actionConsequence:`_actionConsequence_1n6q8_124`,actionError:`_actionError_1n6q8_133`,rejectButton:`_rejectButton_1n6q8_144`,approveButton:`_approveButton_1n6q8_165`,decided:`_decided_1n6q8_176`},as={"judge-ship-would-merge":{label:`Ship (would merge)`,tone:`success`},"judge-ship-review-required":{label:`Ship (review required)`,tone:`success`},"judge-review":{label:`Review`,tone:`warning`},"judge-noise":{label:`Noise`,tone:`neutral`},"judge-harmful":{label:`Harmful`,tone:`danger`},"judge-verdict-unrecognized":{label:`Unrecognized verdict`,tone:`unknown`},"judge-parse-failure":{label:`Judge parse failure — not a review`,tone:`unknown`},"judge-network-failure":{label:`Judge network failure — not a review`,tone:`unknown`}};function os(e){let t=e.filter(e=>e.action===`judged`&&e.judgeReasonCode);return t.length===0?null:t.reduce((e,t)=>Date.parse(t.ts)>Date.parse(e.ts)?t:e)}function ss(e){if(!e)return`—`;let t=Date.parse(e);if(Number.isNaN(t))return`—`;let n=Math.max(0,Math.round((Date.now()-t)/1e3));if(n<60)return`${n}s ago`;let r=Math.round(n/60);if(r<60)return`${r}m ago`;let i=Math.round(r/60);return i<24?`${i}h ago`:`${Math.round(i/24)}d ago`}function cs(e,t){let n=t&&t.length>0?t:`the target repository`;return e===`pr`?`Approving pushes a branch to ${n}'s remote and opens a real pull request. Other people can see it immediately, and it cannot be undone from here.`:e===`patch`?`Approving writes this diff to ${n} on disk now. Nothing is pushed, but the working tree changes.`:`Approving applies this ${e} proposal to ${n} now.`}function ls({id:e,onDispatchDisabled:t}){let n=m(ce(e)),[r,i]=(0,M.useState)(null),[a,o]=(0,M.useState)(!1),[s,c]=(0,M.useState)(!1),[l,u]=(0,M.useState)(!1),[d,h]=(0,M.useState)(null);function g(e){h(null),i(e),p()?c(!0):o(!0)}function _(){o(!1),p()?c(!0):i(null)}async function v(){if(r){u(!0),h(null);try{r===`approve`?await Ce(e):await Se(e),c(!1),i(null)}catch(e){e instanceof y?(c(!1),i(null),t()):h(e instanceof Error?e.message:`Action failed. Try again.`)}finally{u(!1)}}}if(n.status===`loading`)return(0,I.jsxs)(`div`,{className:Z.panel,children:[(0,I.jsx)(f,{width:`60%`}),(0,I.jsx)(f,{width:`30%`}),(0,I.jsx)(f,{width:`90%`})]});if(n.status===`error`||!n.data)return(0,I.jsx)(`div`,{className:Z.error,role:`alert`,children:n.error?.message??`Failed to load this proposal.`});let b=n.data,x=b.decisionEvidence,S=os(x.decisions),C=S?.judgeReasonCode?as[S.judgeReasonCode]:null,w=b.status===`pending`;return(0,I.jsxs)(`div`,{className:Z.panel,children:[(0,I.jsxs)(`header`,{className:Z.header,children:[(0,I.jsxs)(`div`,{className:Z.titleRow,children:[(0,I.jsx)(`h2`,{className:Z.title,children:b.title}),n.status===`refreshing`?(0,I.jsx)(A,{}):null]}),(0,I.jsxs)(`div`,{className:Z.metaRow,children:[(0,I.jsx)(E,{status:b.status}),(0,I.jsx)(`span`,{className:Z.metaItem,children:b.kind}),(0,I.jsx)(`span`,{className:Z.metaItem,title:b.repo??void 0,children:b.repo??`no repo`}),(0,I.jsxs)(`span`,{className:Z.metaItem,children:[`created `,ss(b.createdAt)]}),b.decidedAt?(0,I.jsxs)(`span`,{className:Z.metaItem,children:[`decided `,ss(b.decidedAt)]}):null,b.riskClass?(0,I.jsxs)(`span`,{className:`${Z.riskBadge} ${Z[`risk_${b.riskClass}`]}`,children:[b.riskClass,` risk`]}):null]}),b.summary?(0,I.jsx)(`p`,{className:Z.summary,children:b.summary}):null]}),(0,I.jsxs)(`section`,{className:Z.evidence,"aria-label":`Evidence`,children:[(0,I.jsxs)(`div`,{className:Z.evidenceRow,children:[(0,I.jsx)(`span`,{className:Z.evidenceLabel,children:`Judge verdict`}),(0,I.jsx)(T,{quality:x.sourceQuality,label:`judge verdict`,children:C?(0,I.jsx)(E,{status:S.judgeReasonCode,tone:C.tone,children:C.label}):(0,I.jsx)(`span`,{className:Z.muted,children:`not yet judged`})})]}),S?.judgeRationaleState?(0,I.jsxs)(`p`,{className:Z.rationaleNote,children:[`Model rationale:`,` `,S.judgeRationaleState===`not-persisted`?`not persisted`:`legacy (redacted)`]}):null,b.decisionReason?(0,I.jsxs)(`div`,{className:Z.evidenceRow,children:[(0,I.jsx)(`span`,{className:Z.evidenceLabel,children:`Decision reason`}),(0,I.jsx)(`span`,{children:b.decisionReason})]}):null,b.verifyResult?(0,I.jsxs)(`div`,{className:Z.evidenceRow,children:[(0,I.jsx)(`span`,{className:Z.evidenceLabel,children:`Verification`}),(0,I.jsxs)(`div`,{children:[(0,I.jsx)(E,{status:b.verifyResult.passed?`success`:`failed`,children:b.verifyResult.passed?`passed`:`failed`}),b.verifyResult.ran&&b.verifyResult.ran.length>0?(0,I.jsxs)(`span`,{className:Z.muted,children:[` · ran `,b.verifyResult.ran.map(e=>e.kind).join(`, `)]}):null,b.verifyResult.failed&&b.verifyResult.failed.length>0?(0,I.jsxs)(`p`,{className:Z.failedChecks,children:[`Failed: `,b.verifyResult.failed.join(`, `)]}):null]})]}):null,b.evidenceOutcome?(0,I.jsxs)(`div`,{className:Z.evidenceRow,children:[(0,I.jsx)(`span`,{className:Z.evidenceLabel,children:`Gates`}),(0,I.jsxs)(`span`,{className:Z.muted,children:[b.evidenceOutcome.gateCount??0,` gate`,b.evidenceOutcome.gateCount===1?``:`s`,b.evidenceOutcome.policyAction?` · policy: ${b.evidenceOutcome.policyAction}`:``,b.evidenceOutcome.trustBasis?` · trust: ${b.evidenceOutcome.trustBasis}`:``]})]}):null,b.result?(0,I.jsxs)(`div`,{className:Z.evidenceRow,children:[(0,I.jsx)(`span`,{className:Z.evidenceLabel,children:`Result`}),(0,I.jsx)(`span`,{children:b.result})]}):null]}),(0,I.jsx)(`section`,{className:Z.diffSection,"aria-label":`Diff`,children:(0,I.jsx)(Be,{diff:b.diff,proposalKind:b.kind})}),w?(0,I.jsxs)(`footer`,{className:Z.actions,children:[d&&!s?(0,I.jsx)(`p`,{className:Z.actionError,role:`alert`,children:d}):null,(0,I.jsx)(`p`,{className:Z.actionConsequence,children:cs(b.kind,b.repo)}),(0,I.jsx)(`button`,{type:`button`,className:Z.rejectButton,onClick:()=>g(`reject`),children:`Reject`}),(0,I.jsx)(`button`,{type:`button`,className:Z.approveButton,onClick:()=>g(`approve`),children:`Approve`})]}):(0,I.jsxs)(`footer`,{className:Z.decided,children:[`This proposal is already `,(0,I.jsx)(`strong`,{children:b.status}),` — no further action available.`]}),(0,I.jsx)(we,{open:a,onClose:_,reason:r===`approve`?`Approving a proposal mutates the fleet and requires the dispatch token.`:`Rejecting a proposal requires the dispatch token.`}),(0,I.jsx)(Te,{open:s,onClose:()=>{c(!1),i(null),h(null)},title:r===`approve`?`Approve this proposal?`:`Reject this proposal?`,body:r===`approve`?(0,I.jsxs)(I.Fragment,{children:[`This applies `,(0,I.jsx)(`strong`,{children:b.title}),` to `,(0,I.jsx)(`code`,{children:b.repo}),` now.`,` `,cs(b.kind,b.repo),` Review the diff above before confirming.`]}):(0,I.jsxs)(I.Fragment,{children:[`This rejects `,(0,I.jsx)(`strong`,{children:b.title}),` and discards it. It stays visible in history (status: rejected) but will never be applied. Nothing is written to `,(0,I.jsx)(`code`,{children:b.repo}),`.`]}),confirmLabel:r===`approve`?b.kind===`pr`?`Approve and open the pull request`:`Approve and apply`:`Reject`,destructive:r===`approve`,busy:l,error:d,onConfirm:()=>void v()})]})}var us={view:`_view_19z5m_1`,header:`_header_19z5m_8`,title:`_title_19z5m_14`,subtitle:`_subtitle_19z5m_20`,dispatchBanner:`_dispatchBanner_19z5m_25`,layout:`_layout_19z5m_39`,listPane:`_listPane_19z5m_57`,detailPane:`_detailPane_19z5m_61`,emptyDetail:`_emptyDetail_19z5m_69`,hint:`_hint_19z5m_81`};function ds(){let{id:e}=bn(),[t,n]=(0,M.useState)(!1);return(0,I.jsxs)(`div`,{className:us.view,children:[(0,I.jsxs)(`header`,{className:us.header,children:[(0,I.jsx)(`h1`,{className:us.title,children:`Inbox`}),(0,I.jsx)(`p`,{className:us.subtitle,children:`Review proposals, inspect diffs and judge evidence, approve or reject.`})]}),t?(0,I.jsxs)(`div`,{className:us.dispatchBanner,role:`alert`,children:[`This server was started without `,(0,I.jsx)(`code`,{children:`--allow-dispatch`}),`, so approve/reject are read-only right now. Restart `,(0,I.jsx)(`code`,{children:`ashlr serve --allow-dispatch`}),` to enable them. Browsing and diff review still work.`]}):null,(0,I.jsxs)(`div`,{className:us.layout,children:[(0,I.jsx)(`div`,{className:us.listPane,children:(0,I.jsx)(is,{selectedId:e??null,onDispatchDisabled:()=>n(!0)})}),(0,I.jsx)(`div`,{className:us.detailPane,children:e?(0,I.jsx)(ls,{id:e,onDispatchDisabled:()=>n(!0)}):(0,I.jsxs)(`div`,{className:us.emptyDetail,children:[(0,I.jsx)(`p`,{children:`Select a proposal to review its diff and evidence.`}),(0,I.jsx)(`p`,{className:us.hint,children:`↑/↓ to move · Enter to open · Space to select · / to search`})]})})]})]})}var Q={cockpit:`_cockpit_1km3b_1`,decisionSpine:`_decisionSpine_1km3b_9`,mission:`_mission_1km3b_18`,titleLine:`_titleLine_1km3b_25`,revision:`_revision_1km3b_39`,northStar:`_northStar_1km3b_44`,bottleneck:`_bottleneck_1km3b_52`,nextActionLabel:`_nextActionLabel_1km3b_60`,fieldLabel:`_fieldLabel_1km3b_61`,nextAction:`_nextAction_1km3b_60`,exception:`_exception_1km3b_79`,attention:`_attention_1km3b_84`,clear:`_clear_1km3b_89`,spectrum:`_spectrum_1km3b_106`,bets:`_bets_1km3b_107`,sectionHeading:`_sectionHeading_1km3b_113`,capabilityList:`_capabilityList_1km3b_133`,betList:`_betList_1km3b_134`,capabilityLane:`_capabilityLane_1km3b_141`,bet:`_bet_1km3b_107`,laneIdentity:`_laneIdentity_1km3b_155`,laneName:`_laneName_1km3b_162`,headroomTrack:`_headroomTrack_1km3b_167`,headroomFill:`_headroomFill_1km3b_174`,ample:`_ample_1km3b_181`,usable:`_usable_1km3b_182`,tight:`_tight_1km3b_183`,none:`_none_1km3b_184`,unknown:`_unknown_1km3b_185`,allocation:`_allocation_1km3b_187`,reset:`_reset_1km3b_188`,betAllocation:`_betAllocation_1km3b_189`,assurance:`_assurance_1km3b_190`,betDecision:`_betDecision_1km3b_216`,betEvidence:`_betEvidence_1km3b_217`,betThesis:`_betThesis_1km3b_227`,empty:`_empty_1km3b_251`,omitted:`_omitted_1km3b_252`,authorityNote:`_authorityNote_1km3b_253`};function fs(e){return e===`complete`?`success`:e===`pending`?`running`:e===`incomplete`?`warning`:`unknown`}function ps(e){return e===`ready`?`success`:e===`tight`?`warning`:e===`unavailable`?`danger`:`unknown`}function ms(e){return e===`continue`?`running`:e===`observing`?`info`:`warning`}function hs(e){return e===`effective`?`success`:e===`refuted`?`danger`:e===`pending`?`running`:`unknown`}function gs({capability:e}){return(0,I.jsxs)(`li`,{className:Q.capabilityLane,children:[(0,I.jsxs)(`div`,{className:Q.laneIdentity,children:[(0,I.jsx)(`span`,{className:Q.laneName,children:e.label}),(0,I.jsx)(E,{status:e.state,tone:ps(e.state)})]}),(0,I.jsx)(`div`,{className:Q.headroomTrack,role:`img`,"aria-label":`${e.label} headroom: ${e.headroom}`,children:(0,I.jsx)(`span`,{className:`${Q.headroomFill} ${Q[e.headroom]}`})}),(0,I.jsx)(`span`,{className:Q.allocation,children:e.allocationLabel}),(0,I.jsx)(`span`,{className:Q.reset,"data-urgency":e.resetUrgency,children:e.resetLabel})]})}function _s({bet:e}){return(0,I.jsxs)(`li`,{className:Q.bet,children:[(0,I.jsxs)(`div`,{className:Q.betDecision,children:[(0,I.jsx)(E,{status:e.decision,tone:ms(e.decision)}),(0,I.jsx)(`span`,{className:Q.assurance,children:e.assurance})]}),(0,I.jsxs)(`div`,{className:Q.betThesis,children:[(0,I.jsx)(`h3`,{children:e.title}),(0,I.jsx)(`p`,{children:e.valueCase})]}),(0,I.jsx)(`span`,{className:Q.betAllocation,children:e.allocationLabel}),(0,I.jsxs)(`div`,{className:Q.betEvidence,children:[(0,I.jsxs)(`span`,{children:[(0,I.jsx)(`span`,{className:Q.fieldLabel,children:`Outcome`}),(0,I.jsx)(E,{status:e.outcome.state,tone:hs(e.outcome.state),children:e.outcome.label})]}),(0,I.jsxs)(`span`,{children:[(0,I.jsx)(`span`,{className:Q.fieldLabel,children:`Evidence`}),(0,I.jsx)(E,{status:e.evidence.state,tone:fs(e.evidence.state),children:e.evidence.label})]})]})]})}function vs({snapshot:e}){let t=e.activeValueBets.slice(0,3),n=Math.max(0,e.activeValueBets.length-t.length),r=e.nextAction;return(0,I.jsxs)(`section`,{className:Q.cockpit,"aria-labelledby":`agent-os-title`,children:[(0,I.jsxs)(`header`,{className:Q.decisionSpine,children:[(0,I.jsxs)(`div`,{className:Q.mission,children:[(0,I.jsxs)(`div`,{className:Q.titleLine,children:[(0,I.jsx)(`h2`,{id:`agent-os-title`,children:`Agent OS`}),(0,I.jsx)(E,{status:e.sourceState,tone:e.sourceState===`healthy`?`success`:e.sourceState===`degraded`?`warning`:`unknown`}),(0,I.jsx)(`span`,{className:Q.revision,children:e.livingEndState.revisionLabel})]}),(0,I.jsx)(`p`,{className:Q.northStar,children:e.livingEndState.northStar}),(0,I.jsxs)(`p`,{className:Q.bottleneck,children:[(0,I.jsx)(`span`,{children:`Current bottleneck`}),e.livingEndState.currentBottleneck]})]}),(0,I.jsxs)(`aside`,{className:`${Q.nextAction} ${r?Q[r.kind]:Q.clear}`,"aria-label":`Exception-first next action`,children:[(0,I.jsx)(`span`,{className:Q.nextActionLabel,children:`Next action`}),(0,I.jsx)(`strong`,{children:r?.title??`No verified next action available`}),(0,I.jsx)(`p`,{children:r?.reason??`No exception or clearance evidence was provided.`}),r?(0,I.jsxs)(E,{status:r.evidenceState,tone:fs(r.evidenceState),children:[r.evidenceState,` evidence`]}):null]})]}),(0,I.jsxs)(`section`,{className:Q.spectrum,"aria-labelledby":`capability-spectrum-title`,children:[(0,I.jsxs)(`div`,{className:Q.sectionHeading,children:[(0,I.jsx)(`h3`,{id:`capability-spectrum-title`,children:`Capability spectrum`}),(0,I.jsx)(`p`,{children:`Usable model runway, ordered by reset urgency`})]}),e.capabilitySpectrum.length>0?(0,I.jsx)(`ul`,{className:Q.capabilityList,children:e.capabilitySpectrum.map(e=>(0,I.jsx)(gs,{capability:e},e.lane))}):(0,I.jsx)(`p`,{className:Q.empty,children:`Capability evidence is not available.`})]}),(0,I.jsxs)(`section`,{className:Q.bets,"aria-labelledby":`active-value-bets-title`,children:[(0,I.jsxs)(`div`,{className:Q.sectionHeading,children:[(0,I.jsx)(`h3`,{id:`active-value-bets-title`,children:`Active value bets`}),(0,I.jsxs)(`p`,{children:[t.length,` of 3 portfolio slots visible`]})]}),t.length>0?(0,I.jsx)(`ol`,{className:Q.betList,children:t.map(e=>(0,I.jsx)(_s,{bet:e},e.key))}):(0,I.jsx)(`p`,{className:Q.empty,children:`No active value bet is verified.`}),n>0?(0,I.jsxs)(`p`,{className:Q.omitted,children:[n,` lower-ranked `,n===1?`bet is`:`bets are`,` held outside this view.`]}):null]}),(0,I.jsx)(`p`,{className:Q.authorityNote,children:`Observation only. This view cannot dispatch, merge, release, deploy, or change policy.`})]})}var $={view:`_view_k4f4y_1`,header:`_header_k4f4y_8`,eyebrow:`_eyebrow_k4f4y_15`,title:`_title_k4f4y_24`,subtitle:`_subtitle_k4f4y_31`,freshness:`_freshness_k4f4y_37`,loading:`_loading_k4f4y_44`,unavailable:`_unavailable_k4f4y_45`,unavailableHeading:`_unavailableHeading_k4f4y_75`,boundary:`_boundary_k4f4y_82`};function ys(e){return e.authority===`observation-only`&&e.sameUserTamperResistant===!1&&e.rollbackProtected===!1&&e.historicalAuthority===!1&&e.executionAuthority===!1&&e.proposalAuthority===!1&&e.mergeAuthority===!1&&e.deployAuthority===!1&&e.publicationAuthority===!1&&e.externalMutationAuthority===!1}function bs(e){return e.reason?e.reason:e.sourceState===`missing`?`No authenticated Agent OS snapshot has been recorded.`:e.authentication===`authenticated`?e.sameUserTamperResistant===!1?ys(e)?e.complete?e.snapshot?`The Agent OS snapshot is degraded.`:`No verified Agent OS snapshot is available.`:`The snapshot chain is incomplete.`:`The response crossed the observation-only authority boundary.`:`The response made an unsupported same-user tamper-resistance claim.`:`Snapshot authentication is unavailable or invalid.`}function xs(e){return e.sourceState===`healthy`&&e.complete&&e.authentication===`authenticated`&&ys(e)&&e.snapshot!==null?`success`:e.sourceState===`degraded`||e.authentication===`invalid`||!ys(e)?`warning`:`unknown`}function Ss(){let e=(0,M.useRef)(null);ke(`/agent-os`,e);let t=m(ge),n=t.data,r=n?.sourceState===`healthy`&&n.complete&&n.authentication===`authenticated`&&ys(n)&&n.snapshot!==null;return(0,I.jsxs)(`div`,{ref:e,className:$.view,children:[(0,I.jsxs)(`header`,{className:$.header,children:[(0,I.jsxs)(`div`,{children:[(0,I.jsx)(`p`,{className:$.eyebrow,children:`Overview`}),(0,I.jsx)(`h1`,{className:$.title,children:`Agent-native engineering OS`}),(0,I.jsx)(`p`,{className:$.subtitle,children:`Authenticated fleet intelligence. Observation only.`})]}),(0,I.jsxs)(`div`,{className:$.freshness,"aria-live":`polite`,children:[t.status===`refreshing`?(0,I.jsx)(A,{}):null,n?(0,I.jsx)(E,{status:n.sourceState,tone:xs(n),children:n.sourceState}):null]})]}),t.status===`loading`?(0,I.jsxs)(`section`,{className:$.loading,"aria-label":`Loading Agent OS snapshot`,children:[(0,I.jsx)(f,{width:`65%`}),(0,I.jsx)(f,{width:`90%`}),(0,I.jsx)(f,{width:`75%`})]}):t.status===`error`?(0,I.jsxs)(`section`,{className:$.unavailable,role:`alert`,children:[(0,I.jsx)(`h2`,{children:`Agent OS snapshot unavailable`}),(0,I.jsx)(`p`,{children:t.error?.message??`The read-only Agent OS endpoint could not be reached.`}),(0,I.jsx)(`p`,{className:$.boundary,children:`No capability, value, or next-action values are inferred when the source cannot be read.`})]}):n&&r&&n.snapshot?(0,I.jsx)(vs,{snapshot:n.snapshot}):n?(0,I.jsxs)(`section`,{className:$.unavailable,role:`status`,children:[(0,I.jsxs)(`div`,{className:$.unavailableHeading,children:[(0,I.jsx)(`h2`,{children:n.sourceState===`missing`?`No Agent OS snapshot yet`:`Agent OS snapshot degraded`}),(0,I.jsx)(E,{status:n.authentication,tone:n.authentication===`authenticated`?`success`:`warning`})]}),(0,I.jsx)(`p`,{children:bs(n)}),(0,I.jsx)(`p`,{className:$.boundary,children:`The cockpit remains hidden until a complete authenticated observation-only snapshot is available.`})]}):(0,I.jsxs)(`section`,{className:$.unavailable,role:`status`,children:[(0,I.jsx)(`h2`,{children:`Agent OS snapshot unavailable`}),(0,I.jsx)(`p`,{children:`No response was provided by the read-only Agent OS endpoint.`})]})]})}function Cs(){return(0,I.jsx)(Gn,{children:(0,I.jsxs)(F,{element:(0,I.jsx)(Zi,{}),children:[(0,I.jsx)(F,{index:!0,element:(0,I.jsx)(Hn,{to:`/overview`,replace:!0})}),Hr.map(e=>e.implemented?null:(0,I.jsx)(F,{path:e.path,element:(0,I.jsx)($i,{title:e.label,description:e.description})},e.path)),(0,I.jsx)(F,{path:`/overview`,element:(0,I.jsx)(pa,{})}),(0,I.jsx)(F,{path:`/agent-os`,element:(0,I.jsx)(Ss,{})}),(0,I.jsx)(F,{path:`/universe`,element:(0,I.jsx)(Ae,{})}),(0,I.jsx)(F,{path:`/journal`,element:(0,I.jsx)($a,{})}),(0,I.jsx)(F,{path:`/intelligence/pulse`,element:(0,I.jsx)(io,{})}),(0,I.jsx)(F,{path:`/intelligence/genome`,element:(0,I.jsx)(po,{})}),(0,I.jsx)(F,{path:`/intelligence/production`,element:(0,I.jsx)(go,{})}),(0,I.jsx)(F,{path:`/portfolio`,element:(0,I.jsx)(bo,{})}),(0,I.jsx)(F,{path:`/work/runs`,element:(0,I.jsx)(To,{})}),(0,I.jsx)(F,{path:`/work/runs/:id`,element:(0,I.jsx)(Oo,{})}),(0,I.jsx)(F,{path:`/work/swarms`,element:(0,I.jsx)(Po,{})}),(0,I.jsx)(F,{path:`/work/swarms/:id`,element:(0,I.jsx)(Go,{})}),(0,I.jsx)(F,{path:`/control/daemon`,element:(0,I.jsx)(Yo,{})}),(0,I.jsx)(F,{path:`/control/fleet`,element:(0,I.jsx)(Zo,{})}),(0,I.jsx)(F,{path:`/control/security`,element:(0,I.jsx)(es,{})}),(0,I.jsx)(F,{path:`/goals`,element:(0,I.jsx)(ts,{})}),(0,I.jsx)(F,{path:`/inbox`,element:(0,I.jsx)(ds,{})}),(0,I.jsx)(F,{path:`/inbox/:id`,element:(0,I.jsx)(ds,{})}),(0,I.jsx)(F,{path:`*`,element:(0,I.jsx)(Hn,{to:`/overview`,replace:!0})})]})})}function ws(e){(0,M.useEffect)(()=>{if(e!==`checking`)return;let t=!1;return _(O.key,O.fetch).then(()=>{if(t)return;let e=o(O.key);a(e.status===`success`)}),()=>{t=!0}},[e])}function Ts(){let e=u();return ws(e),(0,I.jsx)(Ee,{children:e===`checking`?(0,I.jsx)(`div`,{"aria-live":`polite`,className:`visually-hidden`,children:`Checking for an existing session…`}):e===`unauthenticated`?(0,I.jsx)(Ve,{}):(0,I.jsxs)(kr,{children:[(0,I.jsx)(b,{}),(0,I.jsx)(Cs,{})]})})}export{Ts as App};
7
+ //# sourceMappingURL=App-IsaWDsdF.js.map