@omnitron-dev/omnitron 0.3.0 → 0.3.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (374) hide show
  1. package/README.md +4 -0
  2. package/dist/BUILD.json +2 -2
  3. package/dist/cli/omnitron.js +26 -2
  4. package/dist/cli/omnitron.js.map +1 -1
  5. package/dist/cluster/mesh-link.js +1 -1
  6. package/dist/cluster/slave-connector.d.ts +2 -2
  7. package/dist/cluster/slave-connector.js +1 -1
  8. package/dist/commands/deploy.d.ts +4 -4
  9. package/dist/commands/deploy.js +4 -4
  10. package/dist/commands/discover.d.ts +2 -2
  11. package/dist/commands/discover.js +2 -2
  12. package/dist/commands/fleet-asking.d.ts +2 -2
  13. package/dist/commands/fleet-asking.js +2 -2
  14. package/dist/commands/fleet-recover.d.ts +2 -0
  15. package/dist/commands/fleet-recover.d.ts.map +1 -0
  16. package/dist/commands/fleet-recover.js +30 -0
  17. package/dist/commands/fleet-recover.js.map +1 -0
  18. package/dist/commands/host-ingress.d.ts +3 -0
  19. package/dist/commands/host-ingress.d.ts.map +1 -0
  20. package/dist/commands/host-ingress.js +31 -0
  21. package/dist/commands/host-ingress.js.map +1 -0
  22. package/dist/commands/infra.d.ts +2 -2
  23. package/dist/commands/infra.js +7 -7
  24. package/dist/commands/infra.js.map +1 -1
  25. package/dist/commands/logs.d.ts +1 -1
  26. package/dist/commands/logs.js +3 -3
  27. package/dist/commands/logs.js.map +1 -1
  28. package/dist/commands/node.d.ts +2 -14
  29. package/dist/commands/node.d.ts.map +1 -1
  30. package/dist/commands/node.js +33 -22
  31. package/dist/commands/node.js.map +1 -1
  32. package/dist/commands/pipeline.d.ts.map +1 -1
  33. package/dist/commands/pipeline.js +8 -1
  34. package/dist/commands/pipeline.js.map +1 -1
  35. package/dist/commands/project.d.ts +2 -2
  36. package/dist/commands/project.js +2 -2
  37. package/dist/commands/release.d.ts +1 -1
  38. package/dist/commands/release.js +4 -4
  39. package/dist/commands/release.js.map +1 -1
  40. package/dist/commands/remote.d.ts +3 -3
  41. package/dist/commands/remote.js +3 -3
  42. package/dist/commands/tor.d.ts +1 -1
  43. package/dist/commands/tor.js +2 -2
  44. package/dist/config/types.d.ts +9 -6
  45. package/dist/config/types.d.ts.map +1 -1
  46. package/dist/daemon/daemon-entry.js +1 -1
  47. package/dist/daemon/daemon-entry.js.map +1 -1
  48. package/dist/daemon/daemon.d.ts +5 -19
  49. package/dist/daemon/daemon.d.ts.map +1 -1
  50. package/dist/daemon/daemon.js +54 -51
  51. package/dist/daemon/daemon.js.map +1 -1
  52. package/dist/daemon/daemon.module.d.ts.map +1 -1
  53. package/dist/daemon/daemon.module.js +3 -5
  54. package/dist/daemon/daemon.module.js.map +1 -1
  55. package/dist/daemon/daemon.rpc-service.d.ts +2 -2
  56. package/dist/daemon/daemon.rpc-service.js +6 -6
  57. package/dist/daemon/daemon.rpc-service.js.map +1 -1
  58. package/dist/execution/data-channel.d.ts +1 -1
  59. package/dist/execution/data-channel.js +1 -1
  60. package/dist/execution/execution.service.d.ts +10 -3
  61. package/dist/execution/execution.service.d.ts.map +1 -1
  62. package/dist/execution/execution.service.js +101 -44
  63. package/dist/execution/execution.service.js.map +1 -1
  64. package/dist/infrastructure/bare-metal-plan.js +1 -1
  65. package/dist/infrastructure/bare-metal-plan.js.map +1 -1
  66. package/dist/infrastructure/config-payload.d.ts +4 -4
  67. package/dist/infrastructure/config-payload.js +4 -4
  68. package/dist/infrastructure/container-runtime.d.ts +2 -10
  69. package/dist/infrastructure/container-runtime.d.ts.map +1 -1
  70. package/dist/infrastructure/container-runtime.js +41 -20
  71. package/dist/infrastructure/container-runtime.js.map +1 -1
  72. package/dist/infrastructure/gateway-redis-db.d.ts +2 -2
  73. package/dist/infrastructure/gateway-redis-db.js +2 -2
  74. package/dist/infrastructure/host-ingress-config.d.ts +12 -0
  75. package/dist/infrastructure/host-ingress-config.d.ts.map +1 -0
  76. package/dist/infrastructure/host-ingress-config.js +197 -0
  77. package/dist/infrastructure/host-ingress-config.js.map +1 -0
  78. package/dist/infrastructure/host-ingress-lock.d.ts +4 -0
  79. package/dist/infrastructure/host-ingress-lock.d.ts.map +1 -0
  80. package/dist/infrastructure/host-ingress-lock.js +36 -0
  81. package/dist/infrastructure/host-ingress-lock.js.map +1 -0
  82. package/dist/infrastructure/host-ingress-runtime.d.ts +25 -0
  83. package/dist/infrastructure/host-ingress-runtime.d.ts.map +1 -0
  84. package/dist/infrastructure/host-ingress-runtime.js +114 -0
  85. package/dist/infrastructure/host-ingress-runtime.js.map +1 -0
  86. package/dist/infrastructure/host-ingress-takeover.d.ts +18 -0
  87. package/dist/infrastructure/host-ingress-takeover.d.ts.map +1 -0
  88. package/dist/infrastructure/host-ingress-takeover.js +142 -0
  89. package/dist/infrastructure/host-ingress-takeover.js.map +1 -0
  90. package/dist/infrastructure/host-ingress-types.d.ts +173 -0
  91. package/dist/infrastructure/host-ingress-types.d.ts.map +1 -0
  92. package/dist/infrastructure/host-ingress-types.js +2 -0
  93. package/dist/infrastructure/host-ingress-types.js.map +1 -0
  94. package/dist/infrastructure/host-ingress.service.d.ts +47 -0
  95. package/dist/infrastructure/host-ingress.service.d.ts.map +1 -0
  96. package/dist/infrastructure/host-ingress.service.js +514 -0
  97. package/dist/infrastructure/host-ingress.service.js.map +1 -0
  98. package/dist/infrastructure/infrastructure.service.d.ts +21 -5
  99. package/dist/infrastructure/infrastructure.service.d.ts.map +1 -1
  100. package/dist/infrastructure/infrastructure.service.js +91 -10
  101. package/dist/infrastructure/infrastructure.service.js.map +1 -1
  102. package/dist/infrastructure/orphan-containers.d.ts +7 -7
  103. package/dist/infrastructure/orphan-containers.js +6 -6
  104. package/dist/infrastructure/presets/minio.js +1 -1
  105. package/dist/infrastructure/presets/minio.js.map +1 -1
  106. package/dist/infrastructure/provisioning-outcome.d.ts +1 -1
  107. package/dist/infrastructure/provisioning-outcome.js +1 -1
  108. package/dist/infrastructure/service-binding.js +1 -1
  109. package/dist/infrastructure/service-resolver.d.ts +10 -4
  110. package/dist/infrastructure/service-resolver.d.ts.map +1 -1
  111. package/dist/infrastructure/service-resolver.js +88 -45
  112. package/dist/infrastructure/service-resolver.js.map +1 -1
  113. package/dist/infrastructure/shipped-config.js +4 -4
  114. package/dist/infrastructure/stack-infra-manager.d.ts +10 -1
  115. package/dist/infrastructure/stack-infra-manager.d.ts.map +1 -1
  116. package/dist/infrastructure/stack-infra-manager.js +53 -43
  117. package/dist/infrastructure/stack-infra-manager.js.map +1 -1
  118. package/dist/infrastructure/types.d.ts +8 -6
  119. package/dist/infrastructure/types.d.ts.map +1 -1
  120. package/dist/monitoring/log-line.d.ts +3 -3
  121. package/dist/monitoring/log-line.js +3 -3
  122. package/dist/monitoring/log-manager.d.ts +3 -3
  123. package/dist/monitoring/log-manager.js +3 -3
  124. package/dist/operations.d.ts +16 -0
  125. package/dist/operations.d.ts.map +1 -0
  126. package/dist/operations.js +13 -0
  127. package/dist/operations.js.map +1 -0
  128. package/dist/orchestrator/app-handle.d.ts +3 -3
  129. package/dist/orchestrator/app-handle.js +3 -3
  130. package/dist/orchestrator/bootstrap-loader.d.ts +2 -2
  131. package/dist/orchestrator/bootstrap-loader.js +3 -3
  132. package/dist/orchestrator/bootstrap-loader.js.map +1 -1
  133. package/dist/orchestrator/bootstrap-process.d.ts +1 -1
  134. package/dist/orchestrator/bootstrap-process.d.ts.map +1 -1
  135. package/dist/orchestrator/bootstrap-process.js +3 -2
  136. package/dist/orchestrator/bootstrap-process.js.map +1 -1
  137. package/dist/orchestrator/build-service.d.ts +6 -12
  138. package/dist/orchestrator/build-service.d.ts.map +1 -1
  139. package/dist/orchestrator/build-service.js +120 -83
  140. package/dist/orchestrator/build-service.js.map +1 -1
  141. package/dist/orchestrator/call-exposed-service.js +1 -1
  142. package/dist/orchestrator/classic-launcher.d.ts.map +1 -1
  143. package/dist/orchestrator/classic-launcher.js +6 -1
  144. package/dist/orchestrator/classic-launcher.js.map +1 -1
  145. package/dist/orchestrator/file-watcher.d.ts +1 -0
  146. package/dist/orchestrator/file-watcher.d.ts.map +1 -1
  147. package/dist/orchestrator/file-watcher.js +14 -3
  148. package/dist/orchestrator/file-watcher.js.map +1 -1
  149. package/dist/orchestrator/http-routes.d.ts +4 -0
  150. package/dist/orchestrator/http-routes.d.ts.map +1 -0
  151. package/dist/orchestrator/http-routes.js +19 -0
  152. package/dist/orchestrator/http-routes.js.map +1 -0
  153. package/dist/orchestrator/orchestrator.service.d.ts +18 -4
  154. package/dist/orchestrator/orchestrator.service.d.ts.map +1 -1
  155. package/dist/orchestrator/orchestrator.service.js +151 -110
  156. package/dist/orchestrator/orchestrator.service.js.map +1 -1
  157. package/dist/orchestrator/service-router.d.ts +1 -1
  158. package/dist/orchestrator/service-router.js +1 -1
  159. package/dist/orchestrator/topology-query.d.ts +1 -1
  160. package/dist/orchestrator/topology-query.js +1 -1
  161. package/dist/project/artifact-builder.js +2 -2
  162. package/dist/project/artifact-builder.js.map +1 -1
  163. package/dist/project/build-decision.d.ts +1 -1
  164. package/dist/project/build-decision.js +1 -1
  165. package/dist/project/config-resolver.js +1 -1
  166. package/dist/project/config-resolver.js.map +1 -1
  167. package/dist/project/declared-config.d.ts +2 -2
  168. package/dist/project/declared-config.js +2 -2
  169. package/dist/project/deploy-phases.d.ts +1 -1
  170. package/dist/project/deploy-phases.js +1 -1
  171. package/dist/project/exec-in-group.d.ts +1 -1
  172. package/dist/project/exec-in-group.js +1 -1
  173. package/dist/project/node-app-config.d.ts +2 -2
  174. package/dist/project/node-app-config.js +2 -2
  175. package/dist/project/node-app-config.js.map +1 -1
  176. package/dist/project/node-app-health.d.ts +1 -1
  177. package/dist/project/node-app-health.js +1 -1
  178. package/dist/project/operator-account.d.ts +9 -3
  179. package/dist/project/operator-account.d.ts.map +1 -1
  180. package/dist/project/operator-account.js +9 -9
  181. package/dist/project/operator-account.js.map +1 -1
  182. package/dist/project/registry.d.ts.map +1 -1
  183. package/dist/project/registry.js +4 -22
  184. package/dist/project/registry.js.map +1 -1
  185. package/dist/project/stack-env.d.ts +1 -1
  186. package/dist/project/stack-env.js +1 -1
  187. package/dist/project/stand-containers.d.ts +9 -2
  188. package/dist/project/stand-containers.d.ts.map +1 -1
  189. package/dist/project/stand-containers.js +17 -17
  190. package/dist/project/stand-containers.js.map +1 -1
  191. package/dist/release/artifact-store.d.ts +1 -1
  192. package/dist/release/artifact-store.d.ts.map +1 -1
  193. package/dist/release/artifact-store.js +1 -1
  194. package/dist/release/artifact-store.js.map +1 -1
  195. package/dist/release/attest-on-node.d.ts +3 -2
  196. package/dist/release/attest-on-node.d.ts.map +1 -1
  197. package/dist/release/attest-on-node.js +6 -6
  198. package/dist/release/attest-on-node.js.map +1 -1
  199. package/dist/release/attest.d.ts +3 -3
  200. package/dist/release/attest.js +1 -1
  201. package/dist/release/build-run.d.ts +2 -2
  202. package/dist/release/build-run.js +4 -4
  203. package/dist/release/build-run.js.map +1 -1
  204. package/dist/release/builder.d.ts +1 -1
  205. package/dist/release/builder.d.ts.map +1 -1
  206. package/dist/release/builder.js +1 -1
  207. package/dist/release/builder.js.map +1 -1
  208. package/dist/release/daemon-omni.d.ts +1 -1
  209. package/dist/release/daemon-omni.js +1 -1
  210. package/dist/release/definition-inputs.d.ts +1 -1
  211. package/dist/release/definition-inputs.js +1 -1
  212. package/dist/release/layout.d.ts +2 -2
  213. package/dist/release/layout.js +2 -2
  214. package/dist/release/manifest.d.ts +1 -1
  215. package/dist/release/manifest.js +1 -1
  216. package/dist/release/publish.d.ts +1 -1
  217. package/dist/release/publish.js +1 -1
  218. package/dist/release/store.d.ts +1 -1
  219. package/dist/release/store.d.ts.map +1 -1
  220. package/dist/release/store.js +3 -3
  221. package/dist/release/store.js.map +1 -1
  222. package/dist/services/alert.service.d.ts +2 -2
  223. package/dist/services/alert.service.js +2 -2
  224. package/dist/services/backup-pipeline.d.ts +1 -1
  225. package/dist/services/backup-pipeline.js +1 -1
  226. package/dist/services/backup.service.d.ts +3 -3
  227. package/dist/services/backup.service.js +3 -3
  228. package/dist/services/bundle-builder.d.ts +15 -12
  229. package/dist/services/bundle-builder.d.ts.map +1 -1
  230. package/dist/services/bundle-builder.js +124 -48
  231. package/dist/services/bundle-builder.js.map +1 -1
  232. package/dist/services/discovery.service.d.ts +1 -1
  233. package/dist/services/discovery.service.js +1 -1
  234. package/dist/services/host-operation-barrier.d.ts +8 -0
  235. package/dist/services/host-operation-barrier.d.ts.map +1 -0
  236. package/dist/services/host-operation-barrier.js +44 -0
  237. package/dist/services/host-operation-barrier.js.map +1 -0
  238. package/dist/services/host-upgrade.d.ts +129 -0
  239. package/dist/services/host-upgrade.d.ts.map +1 -0
  240. package/dist/services/host-upgrade.js +352 -0
  241. package/dist/services/host-upgrade.js.map +1 -0
  242. package/dist/services/infrastructure.rpc-service.d.ts +16 -1
  243. package/dist/services/infrastructure.rpc-service.d.ts.map +1 -1
  244. package/dist/services/infrastructure.rpc-service.js +71 -10
  245. package/dist/services/infrastructure.rpc-service.js.map +1 -1
  246. package/dist/services/local-bundle.d.ts +9 -0
  247. package/dist/services/local-bundle.d.ts.map +1 -1
  248. package/dist/services/local-bundle.js +11 -2
  249. package/dist/services/local-bundle.js.map +1 -1
  250. package/dist/services/log-collector.service.d.ts +1 -1
  251. package/dist/services/log-collector.service.js +1 -1
  252. package/dist/services/maintenance-lock.d.ts +2 -2
  253. package/dist/services/maintenance-lock.d.ts.map +1 -1
  254. package/dist/services/maintenance-lock.js +1 -1
  255. package/dist/services/migration-output.d.ts +2 -2
  256. package/dist/services/migration-output.js +2 -2
  257. package/dist/services/node-deploy-lease.d.ts +19 -2
  258. package/dist/services/node-deploy-lease.d.ts.map +1 -1
  259. package/dist/services/node-deploy-lease.js +84 -10
  260. package/dist/services/node-deploy-lease.js.map +1 -1
  261. package/dist/services/node-manager.rpc-service.d.ts +6 -1
  262. package/dist/services/node-manager.rpc-service.d.ts.map +1 -1
  263. package/dist/services/node-manager.rpc-service.js +25 -1
  264. package/dist/services/node-manager.rpc-service.js.map +1 -1
  265. package/dist/services/node-manager.service.d.ts +1 -1
  266. package/dist/services/node-manager.service.js +1 -1
  267. package/dist/services/node-upgrade.d.ts +1 -1
  268. package/dist/services/pipeline.rpc-service.d.ts +4 -0
  269. package/dist/services/pipeline.rpc-service.d.ts.map +1 -1
  270. package/dist/services/pipeline.rpc-service.js +9 -0
  271. package/dist/services/pipeline.rpc-service.js.map +1 -1
  272. package/dist/services/pipeline.service.d.ts +2 -0
  273. package/dist/services/pipeline.service.d.ts.map +1 -1
  274. package/dist/services/pipeline.service.js +12 -0
  275. package/dist/services/pipeline.service.js.map +1 -1
  276. package/dist/services/project.rpc-service.d.ts +7 -0
  277. package/dist/services/project.rpc-service.d.ts.map +1 -1
  278. package/dist/services/project.rpc-service.js +11 -0
  279. package/dist/services/project.rpc-service.js.map +1 -1
  280. package/dist/services/project.service.d.ts +21 -11
  281. package/dist/services/project.service.d.ts.map +1 -1
  282. package/dist/services/project.service.js +74 -59
  283. package/dist/services/project.service.js.map +1 -1
  284. package/dist/services/redeploy-decision.d.ts +2 -2
  285. package/dist/services/redeploy-decision.js +1 -1
  286. package/dist/services/release.rpc-service.d.ts +1 -1
  287. package/dist/services/release.rpc-service.js +1 -1
  288. package/dist/services/remote-deployer.service.d.ts +27 -16
  289. package/dist/services/remote-deployer.service.d.ts.map +1 -1
  290. package/dist/services/remote-deployer.service.js +269 -101
  291. package/dist/services/remote-deployer.service.js.map +1 -1
  292. package/dist/services/remote-provisioner.d.ts +2 -0
  293. package/dist/services/remote-provisioner.d.ts.map +1 -1
  294. package/dist/services/remote-provisioner.js +1 -1
  295. package/dist/services/remote-provisioner.js.map +1 -1
  296. package/dist/services/static-carry-forward.d.ts +26 -1
  297. package/dist/services/static-carry-forward.d.ts.map +1 -1
  298. package/dist/services/static-carry-forward.js +275 -1
  299. package/dist/services/static-carry-forward.js.map +1 -1
  300. package/dist/shared/dto/nodes.d.ts +2 -2
  301. package/dist/shared/dto/services.d.ts +27 -0
  302. package/dist/shared/dto/services.d.ts.map +1 -1
  303. package/dist/shared/local-infra-host.d.ts +2 -2
  304. package/dist/shared/local-infra-host.js +2 -2
  305. package/dist/shared/release-reading.d.ts +1 -1
  306. package/dist/shared/release-reading.js +1 -1
  307. package/package.json +16 -12
  308. package/webapp/dist/BUILD.json +2 -2
  309. package/webapp/dist/assets/FormControlLabel-BbSxpQwN.js +1 -0
  310. package/webapp/dist/assets/{Grid-BZ7xhoHQ.js → Grid-DizFZYue.js} +1 -1
  311. package/webapp/dist/assets/{Switch-DGSAxQPM.js → Switch-Bfiqzx8l.js} +1 -1
  312. package/webapp/dist/assets/alerts-DH_RVRS3.js +1 -0
  313. package/webapp/dist/assets/apps-B96355sz.js +1 -0
  314. package/webapp/dist/assets/audit-CYGtbi4k.js +1 -0
  315. package/webapp/dist/assets/client-BmqFExWT.js +1 -0
  316. package/webapp/dist/assets/containers-B_TpThln.js +2 -0
  317. package/webapp/dist/assets/dashboard-DHf2_65N.js +1 -0
  318. package/webapp/dist/assets/dashboard-builder-CWY2pjeG.js +1 -0
  319. package/webapp/dist/assets/{deploy-release-dialog-D6C-XcKY.js → deploy-release-dialog-Dp-zpSAd.js} +1 -1
  320. package/webapp/dist/assets/deployments-tJI6O3fK.js +1 -0
  321. package/webapp/dist/assets/detail-B2zP1Hto.js +8 -0
  322. package/webapp/dist/assets/detail-CoIrwmsy.js +1 -0
  323. package/webapp/dist/assets/detail-DWaGaOtL.js +2 -0
  324. package/webapp/dist/assets/index-Dvo0iprx.css +1 -0
  325. package/webapp/dist/assets/index-vMnY_4jR.js +412 -0
  326. package/webapp/dist/assets/logs-DTRjOfX8.js +12 -0
  327. package/webapp/dist/assets/maplibre-gl-DowHoZAx.js +814 -0
  328. package/webapp/dist/assets/{metrics-CQgjz2Lz.js → metrics-UCajtdox.js} +2 -2
  329. package/webapp/dist/assets/nodes-DuTVU0f6.js +7 -0
  330. package/webapp/dist/assets/pipelines-C8BeDcAl.js +4 -0
  331. package/webapp/dist/assets/projects-Dp_zFfLY.js +1 -0
  332. package/webapp/dist/assets/react-DlmbjZJV.js +1 -0
  333. package/webapp/dist/assets/react-apexcharts.esm-C8pn45ml.js +97 -0
  334. package/webapp/dist/assets/{release-bits-Dj4EOhhb.js → release-bits-BzTKz5fM.js} +1 -1
  335. package/webapp/dist/assets/release-build-panel-DcW9YcXQ.js +1 -0
  336. package/webapp/dist/assets/releases-B4hcr1bE.js +2 -0
  337. package/webapp/dist/assets/rolldown-runtime-XKyaHtl9.js +1 -0
  338. package/webapp/dist/assets/settings-DIteZTbe.js +1 -0
  339. package/webapp/dist/assets/sign-in-D4kMBOHp.js +1 -0
  340. package/webapp/dist/assets/stacks-Brnf-EB7.js +1 -0
  341. package/webapp/dist/assets/{system-info-BtE3dgfw.js → system-info-CFDNVKkU.js} +1 -1
  342. package/webapp/dist/assets/topology-7WeTUsDN.js +12 -0
  343. package/webapp/dist/assets/traces-9c3gwCN-.js +1 -0
  344. package/webapp/dist/assets/{use-stack-context-CZUgPq88.js → use-stack-context-CnA5FTHu.js} +1 -1
  345. package/webapp/dist/index.html +6 -6
  346. package/webapp/dist/assets/FormControlLabel-BrH2diyl.js +0 -1
  347. package/webapp/dist/assets/alerts-sXqHJbsa.js +0 -1
  348. package/webapp/dist/assets/apps-B_Ah8Flh.js +0 -1
  349. package/webapp/dist/assets/audit-YXihwyui.js +0 -1
  350. package/webapp/dist/assets/client-CGbBvy9k.js +0 -1
  351. package/webapp/dist/assets/containers-Di4NOTLf.js +0 -2
  352. package/webapp/dist/assets/dashboard-Cfuf95N3.js +0 -1
  353. package/webapp/dist/assets/dashboard-builder-CowaYb-M.js +0 -1
  354. package/webapp/dist/assets/deployments-ChTq5kCw.js +0 -1
  355. package/webapp/dist/assets/detail-BsGWv7Dj.js +0 -1
  356. package/webapp/dist/assets/detail-CyVf_cw5.js +0 -2
  357. package/webapp/dist/assets/detail-D027j6aO.js +0 -8
  358. package/webapp/dist/assets/index-B8AHIPc-.css +0 -1
  359. package/webapp/dist/assets/index-DiZbrwxT.js +0 -414
  360. package/webapp/dist/assets/logs-L2b8Oqmo.js +0 -12
  361. package/webapp/dist/assets/maplibre-gl-MlmG2kbn.js +0 -801
  362. package/webapp/dist/assets/nodes-Nwia2Ty6.js +0 -7
  363. package/webapp/dist/assets/pipelines-DCu_rXOr.js +0 -4
  364. package/webapp/dist/assets/projects-Bb4aV76h.js +0 -1
  365. package/webapp/dist/assets/react-CwJFpaho.js +0 -1
  366. package/webapp/dist/assets/react-apexcharts.esm-Dy0Fez42.js +0 -1956
  367. package/webapp/dist/assets/release-build-panel-D6OCVlhT.js +0 -1
  368. package/webapp/dist/assets/releases-CnAt3yO6.js +0 -2
  369. package/webapp/dist/assets/rolldown-runtime-hePW80VL.js +0 -1
  370. package/webapp/dist/assets/settings-DU-mjiwb.js +0 -1
  371. package/webapp/dist/assets/sign-in-Bcvjrr4C.js +0 -1
  372. package/webapp/dist/assets/stacks-B-e8p50I.js +0 -1
  373. package/webapp/dist/assets/topology-Cwch-uF1.js +0 -12
  374. package/webapp/dist/assets/traces-BbShR-4P.js +0 -1
@@ -1,7 +0,0 @@
1
- import{r as e}from"./rolldown-runtime-hePW80VL.js";import{t}from"./react-CwJFpaho.js";import{t as n}from"./Grid-BZ7xhoHQ.js";import{c as r,h as i}from"./client-CGbBvy9k.js";import{$n as a,B as o,Bt as s,Cn as c,Dn as l,Ft as u,Ht as d,Jt as f,Lt as p,M as m,Nt as h,On as g,Ot as _,P as v,Qn as ee,Qt as te,R as y,Rt as ne,S as b,St as x,Ut as S,Wn as C,Yt as w,Zt as T,_n as E,_t as D,b as re,en as ie,h as O,hn as k,in as A,it as j,k as M,ln as N,nn as ae,nt as P,on as F,pn as oe,rt as I,sn as L,tn as se,vn as R,wn as ce,wt as le,y as z,yn as B,yt as V,zn as H,zt as U}from"./index-DiZbrwxT.js";import{t as ue}from"./daemon-memory-CCPZ4cV_.js";import{f as W}from"./release-bits-Dj4EOhhb.js";var G=e(t(),1),K=ee(),de={queued:`default`,building:`info`,transferring:`info`,activating:`warning`,done:`success`,failed:`error`,refused:`error`};function fe(e){return r.invoke(`daemon`,`OmnitronNodes`,`planUpgrade`,[{...e,build:!0}],{timeout:18e4})}function q(e){return e!==`done`&&e!==`failed`&&e!==`refused`}function pe({nodes:e}){let[t,n]=(0,G.useState)(!1),[r,a]=(0,G.useState)(null),[c,l]=(0,G.useState)(!1),{data:u,refresh:d}=P(async()=>{let e=await i.getUpgradeProgress();return l(e.some(e=>q(e.phase))),e},{intervalMs:c?3e3:2e4}),p=u??[],m=p.filter(e=>q(e.phase)),h=(0,G.useMemo)(()=>new Map(e.map(e=>[e.id,e])),[e]),g=(0,G.useCallback)(async e=>{try{let t=await i.cancelUpgrade({nodeId:e});a(t.stopped?null:t.because),await d()}catch(e){a(e.message)}},[d]);return(0,K.jsxs)(F,{variant:`outlined`,children:[(0,K.jsxs)(A,{children:[(0,K.jsxs)(U,{direction:`row`,spacing:1.5,sx:{alignItems:`center`,mb:m.length>0||p.length>0?1.5:0},children:[(0,K.jsx)(E,{variant:`overline`,sx:{color:`text.secondary`,fontSize:`0.65rem`},children:`Fleet upgrade`}),m.length>0&&(0,K.jsx)(R,{size:`small`,color:`info`,label:`${m.length} of ${p.length} in flight`,sx:{height:20,fontSize:11}}),(0,K.jsx)(L,{sx:{flex:1}}),(0,K.jsx)(B,{size:`small`,variant:`contained`,startIcon:(0,K.jsx)(re,{}),onClick:()=>n(!0),children:`Upgrade nodes…`})]}),r&&(0,K.jsx)(N,{severity:`warning`,variant:`outlined`,sx:{mb:1.5},onClose:()=>a(null),children:r}),p.length===0?(0,K.jsx)(E,{variant:`body2`,sx:{color:`text.secondary`},children:`No upgrade has been run from this master since it started.`}):(0,K.jsx)(U,{spacing:1,children:p.map(e=>{let t=h.get(e.nodeId);return(0,K.jsxs)(L,{children:[(0,K.jsxs)(U,{direction:`row`,spacing:1,sx:{alignItems:`center`,flexWrap:`wrap`},children:[(0,K.jsx)(E,{variant:`body2`,sx:{fontWeight:600,minWidth:140},children:t?.name??e.nodeId}),(0,K.jsx)(R,{size:`small`,color:de[e.phase],label:e.phase,sx:{height:20,fontSize:11}}),e.phase===`queued`&&e.position!=null&&(0,K.jsxs)(E,{variant:`caption`,sx:{color:`text.secondary`},children:[`#`,e.position,` in the queue`]}),(0,K.jsx)(E,{variant:`caption`,sx:{color:`text.secondary`},children:e.message}),e.version&&(0,K.jsx)(E,{variant:`caption`,sx:{fontFamily:`monospace`,color:`text.secondary`},children:e.version}),(0,K.jsx)(L,{sx:{flex:1}}),(0,K.jsx)(E,{variant:`caption`,sx:{color:`text.disabled`},children:W(e.at)}),q(e.phase)&&(0,K.jsx)(s,{title:e.phase===`queued`?`Drop this node from the queue`:`A node already installing is not interrupted — the daemon will say so`,arrow:!0,children:(0,K.jsx)(`span`,{children:(0,K.jsx)(B,{size:`small`,color:`warning`,startIcon:(0,K.jsx)(o,{}),onClick:()=>void g(e.nodeId),children:`Cancel`})})})]}),q(e.phase)&&e.phase!==`queued`&&(0,K.jsx)(f,{variant:`determinate`,value:e.percent,sx:{mt:.5,height:4,borderRadius:2}})]},e.nodeId)})})]}),(0,K.jsx)(me,{open:t,onClose:()=>n(!1),nodes:e,onStarted:()=>{l(!0),d()}})]})}function me({open:e,onClose:t,nodes:n,onStarted:r}){let[a,o]=(0,G.useState)(new Set),[l,d]=(0,G.useState)(null),[f,m]=(0,G.useState)(!1),[_,v]=(0,G.useState)(!1),[ee,y]=(0,G.useState)(1),[b,x]=(0,G.useState)(null),[C,w]=(0,G.useState)(null),D=(0,G.useMemo)(()=>n.filter(e=>!e.isLocal),[n]),O=(0,G.useMemo)(()=>new Map(n.map(e=>[e.id,e])),[n]),k=e=>o(t=>{let n=new Set(t);return n.has(e)?n.delete(e):n.add(e),d(null),n}),A=a.size>0&&a.size===D.length,j=(0,G.useCallback)(async e=>{m(!0),x(null);let t=a.size>0?{nodeIds:[...a]}:{};try{d(e?await fe(t):await i.planUpgrade(t))}catch(e){x(e.message),d(null)}finally{m(!1)}},[a]),M=l?.rows.filter(e=>e.action===`upgrade`)??[];return(0,K.jsxs)(ae,{open:e,onClose:_?void 0:t,maxWidth:`md`,fullWidth:!0,children:[(0,K.jsx)(te,{children:`Upgrade nodes`}),(0,K.jsx)(ie,{children:(0,K.jsxs)(U,{spacing:2.5,sx:{mt:1},children:[(0,K.jsx)(E,{variant:`body2`,sx:{color:`text.secondary`},children:`The master builds one bundle and installs it on each node in turn. The rollout runs in the daemon — closing this window does not stop it.`}),(0,K.jsxs)(L,{children:[(0,K.jsxs)(U,{direction:`row`,spacing:1,sx:{alignItems:`center`,mb:.5},children:[(0,K.jsx)(oe,{size:`small`,checked:A,indeterminate:a.size>0&&!A,onChange:()=>{d(null),o(A?new Set:new Set(D.map(e=>e.id)))}}),(0,K.jsx)(E,{variant:`body2`,children:a.size===0?`every node`:`${a.size} of ${D.length} selected`})]}),(0,K.jsx)(L,{sx:{maxHeight:220,overflowY:`auto`},children:(0,K.jsx)(ne,{size:`small`,children:(0,K.jsx)(p,{children:D.map(e=>(0,K.jsxs)(ce,{hover:!0,onClick:()=>k(e.id),sx:{cursor:`pointer`},children:[(0,K.jsx)(c,{padding:`checkbox`,children:(0,K.jsx)(oe,{size:`small`,checked:a.has(e.id)})}),(0,K.jsx)(c,{sx:{fontWeight:600},children:e.name}),(0,K.jsxs)(c,{sx:{fontFamily:`monospace`,fontSize:12},children:[e.host,`:`,e.sshPort]}),(0,K.jsx)(c,{sx:{fontFamily:`monospace`,fontSize:12},children:e.status?.omnitronVersion??`—`}),(0,K.jsx)(c,{children:(0,K.jsx)(R,{size:`small`,label:e.status?.pingReachable?`reachable`:`not reachable`,color:e.status?.pingReachable?`success`:`default`,variant:`outlined`,sx:{height:18,fontSize:10}})})]},e.id))})})})]}),(0,K.jsxs)(U,{direction:`row`,spacing:1.5,sx:{alignItems:`center`},children:[(0,K.jsx)(B,{size:`small`,variant:`outlined`,onClick:()=>void j(!1),disabled:f||_,children:f?`Planning…`:`Plan`}),(0,K.jsx)(s,{title:`Builds the bundle so each node can be compared to it. It runs on the master's own thread and stops it answering anything else for a minute or two.`,arrow:!0,children:(0,K.jsx)(`span`,{children:(0,K.jsx)(B,{size:`small`,onClick:()=>void j(!0),disabled:f||_,children:`Compare versions`})})}),f&&(0,K.jsx)(g,{size:16}),(0,K.jsx)(h,{select:!0,label:`At once`,size:`small`,value:ee,onChange:e=>y(Number(e.target.value)),sx:{width:120},disabled:_,children:[1,2,3,4,6,8].map(e=>(0,K.jsx)(S,{value:e,children:e},e))}),(0,K.jsx)(E,{variant:`caption`,sx:{color:`text.secondary`},children:f?`The master is building the bundle so the plan can name a target version — up to a few minutes.`:`An upgrade restarts the node's daemon, so one at a time is the safe default.`})]}),l&&(0,K.jsxs)(L,{children:[l.refusal&&(0,K.jsx)(N,{severity:`error`,sx:{mb:1},children:(0,K.jsx)(E,{variant:`body2`,sx:{whiteSpace:`pre-wrap`},children:l.refusal})}),l.compared?(0,K.jsxs)(E,{variant:`body2`,sx:{mb:1},children:[`Target `,(0,K.jsx)(`strong`,{style:{fontFamily:`monospace`},children:l.targetVersion}),` —`,` `,M.length,` would be upgraded, `,l.rows.filter(e=>e.action===`skip`).length,` already there,`,` `,l.rows.filter(e=>e.action===`refuse`).length,` refused.`]}):(0,K.jsxs)(L,{sx:{mb:1},children:[(0,K.jsxs)(E,{variant:`body2`,children:[M.length,` would be attempted, `,l.rows.filter(e=>e.action===`refuse`).length,` refused —`,` `,(0,K.jsx)(`strong`,{children:`nothing was compared`}),`.`]}),(0,K.jsx)(E,{variant:`caption`,sx:{color:`text.secondary`},children:`No bundle has been built, so no row can say «already on the target version». Twelve rows reading «upgrade» here mean twelve nodes that would be touched, not twelve that are out of date.`})]}),(0,K.jsxs)(ne,{size:`small`,children:[(0,K.jsx)(u,{children:(0,K.jsxs)(ce,{children:[(0,K.jsx)(c,{children:`Node`}),(0,K.jsx)(c,{children:l.compared?`Now → target`:`Now`}),(0,K.jsx)(c,{children:`Action`}),(0,K.jsx)(c,{children:`Why`})]})}),(0,K.jsx)(p,{children:l.rows.map(e=>(0,K.jsxs)(ce,{children:[(0,K.jsxs)(c,{children:[(0,K.jsx)(E,{variant:`body2`,sx:{fontWeight:600},children:e.label}),(0,K.jsx)(E,{variant:`caption`,sx:{color:`text.secondary`,fontFamily:`monospace`},children:e.host??`no address`})]}),(0,K.jsxs)(c,{sx:{fontFamily:`monospace`,fontSize:12},children:[e.currentVersion??`—`,l.compared&&e.targetVersion&&e.targetVersion!==e.currentVersion&&(0,K.jsxs)(E,{component:`span`,variant:`caption`,sx:{color:`text.secondary`,fontFamily:`monospace`},children:[` → `,e.targetVersion]})]}),(0,K.jsx)(c,{children:(0,K.jsx)(R,{size:`small`,label:e.action,color:e.action===`upgrade`?`info`:e.action===`skip`?`success`:`warning`,variant:`outlined`,sx:{height:18,fontSize:10}})}),(0,K.jsx)(c,{children:(0,K.jsx)(E,{variant:`caption`,sx:{color:`text.secondary`},children:e.because})})]},e.nodeId))})]})]}),C&&(0,K.jsxs)(L,{children:[(0,K.jsx)(T,{sx:{mb:1.5}}),(0,K.jsxs)(N,{severity:C.refused.length>0?`warning`:`success`,children:[`Queued `,C.accepted.length,` node`,C.accepted.length===1?``:`s`,C.refused.length>0?`; ${C.refused.length} not taken`:``,`.`]}),C.refused.map(e=>(0,K.jsxs)(E,{variant:`caption`,sx:{display:`block`,mt:.5,color:`text.secondary`},children:[(0,K.jsx)(`strong`,{children:O.get(e.nodeId)?.name??e.nodeId}),` — `,e.because]},e.nodeId))]}),b&&(0,K.jsxs)(N,{severity:`error`,children:[(0,K.jsx)(E,{variant:`body2`,sx:{whiteSpace:`pre-wrap`},children:b}),/^(HTTP 50\d|Request timeout)/.test(b)&&(0,K.jsxs)(E,{variant:`caption`,sx:{display:`block`,mt:.5},children:[`The plan builds the bundle first — that is how it can say «already on the target version» instead of listing every node as an upgrade — and the request outlived the gateway's 120-second deadline. The master is still building; the CLI (`,(0,K.jsx)(`code`,{children:`omnitron fleet upgrade --dry-run`}),`) has no such deadline.`]})]})]})}),(0,K.jsxs)(se,{children:[(0,K.jsx)(B,{onClick:t,size:`small`,disabled:_,children:C?`Close`:`Cancel`}),(0,K.jsx)(B,{variant:`contained`,size:`small`,startIcon:_?(0,K.jsx)(g,{size:14,color:`inherit`}):(0,K.jsx)(re,{}),disabled:_||!l||M.length===0||!!l.refusal||C!==null,onClick:async()=>{v(!0),x(null);try{let e=await i.upgradeNodes({nodeIds:M.map(e=>e.nodeId),concurrency:ee});w(e),r()}catch(e){x(e.message)}finally{v(!1)}},children:_?`Queueing…`:`Start rollout (${M.length})`})]})]})}function he(e){if(e.omnitronConnected===!0)return`running`;let t=e.omnitronError??``;return t.startsWith(`omnitron: command not found`)?`not-installed`:e.sshConnected===!1?`unreachable`:e.omnitronConnected===!1&&t===`omnitron status reported no running daemon`?`not-running`:`unread`}function J(e,t){return e==null?t?`failed`:`unmeasured`:e?`ok`:`failed`}function ge(e){let t=he({sshConnected:e.sshConnected??null,omnitronConnected:e.omnitronConnected??null,omnitronError:e.omnitronError??null});switch(t){case`running`:return`ok`;case`not-running`:case`not-installed`:return`failed`;case`unreachable`:return`unmeasured`;case`unread`:return e.omnitronConnected==null&&!e.omnitronError?`unmeasured`:`unknown`;default:return t}}function _e(e){return e.pingError??e.sshError??e.omnitronError??null}function ve(e){let t=e.filter(e=>e.reachable&&e.cluster);if(t.length<2)return{kind:`none`};let n=new Map,r=new Set;for(let e of t){let t=e.cluster.leaderId??`(none)`;n.has(t)||n.set(t,[]),n.get(t).push(e.nodeId),typeof e.cluster.term==`number`&&r.add(e.cluster.term)}return n.size>1?{kind:`leaders`,answered:t.length,groups:[...n]}:r.size>1?{kind:`terms`,answered:t.length,terms:[...r].sort((e,t)=>e-t)}:{kind:`none`}}var ye=864e5,be=90;function xe(e,t){let n=e*864e5;return Math.max(1,Math.min(400,Math.ceil(n/Math.max(1,t))))}var Se=3e5,Y=3e5;function Ce(e){if(!e)return`never`;let t=Date.now()-Date.parse(e);if(!Number.isFinite(t))return`never`;if(t<6e4)return`just now`;let n=Math.floor(t/6e4);if(n<60)return`${n}m ago`;let r=Math.floor(n/60);return r<24?`${r}h ago`:`${Math.floor(r/24)}d ago`}function X(e){if(!e)return!0;let t=Date.parse(e);return!Number.isFinite(t)||Date.now()-t>Y}var we=a`
2
- from { transform: rotate(0deg); }
3
- to { transform: rotate(360deg); }
4
- `,Te=a`
5
- 0%, 100% { opacity: 1; }
6
- 50% { opacity: 0.3; }
7
- `;function Ee({state:e,label:t,tooltip:n}){return(0,K.jsx)(s,{title:n??{online:`Connected`,offline:`Offline`,unknown:`Unknown`,unchecked:`Not checked`,checking:`Checking...`,"not-installed":`Not installed`}[e],arrow:!0,children:(0,K.jsxs)(U,{direction:`row`,spacing:.5,sx:{alignItems:`center`},children:[(0,K.jsx)(L,{sx:{width:8,height:8,borderRadius:`50%`,bgcolor:{online:`success.main`,offline:`error.main`,unknown:`warning.light`,unchecked:`text.disabled`,checking:`warning.main`,"not-installed":`text.disabled`}[e],flexShrink:0,...e===`checking`&&{animation:`${Te} 1s ease-in-out infinite`},...e===`not-installed`&&{border:`1px dashed`,borderColor:`text.disabled`,bgcolor:`transparent`}}}),(0,K.jsx)(E,{variant:`caption`,noWrap:!0,sx:{color:`text.secondary`},children:t})]})})}function De(e,t,n){if(e<0)return n===`absent`?C(t.palette.info.main,.35):n===`unreachable`?C(t.palette.warning.main,.3):n===`unread`?C(t.palette.text.disabled,.25):t.palette.action.disabledBackground;let r=Z(t.palette.success.main),i=Z(t.palette.error.main),a=i[0]+(r[0]-i[0])*e,o=i[1]+(r[1]-i[1])*e,s=i[2]+(r[2]-i[2])*e;return`hsl(${Math.round(a)}, ${Math.round(o)}%, ${Math.round(s)}%)`}function Z(e){let t=e.replace(`#`,``),n=parseInt(t.slice(0,2),16)/255,r=parseInt(t.slice(2,4),16)/255,i=parseInt(t.slice(4,6),16)/255,a=Math.max(n,r,i),o=Math.min(n,r,i),s=(a+o)/2;if(a===o)return[0,0,s*100];let c=a-o,l=s>.5?c/(2-a-o):c/(a+o),u;return u=a===n?(r-i)/c+(r<i?6:0):a===r?(i-n)/c+2:(n-r)/c+4,u*=60,[u,l*100,s*100]}function Q({data:e,metric:t,label:n,segWidth:r=6,gap:i=4,height:a=10,lastCheckAt:o}){let c=H(),l=(0,G.useRef)(null),[u,d]=(0,G.useState)(0);(0,G.useEffect)(()=>{let e=l.current;if(!e)return;let t=()=>{let t=e.clientWidth;d(Math.max(1,Math.floor((t+i)/(r+i))))};t();let n=new ResizeObserver(t);return n.observe(e),()=>n.disconnect()},[r,i]);let f=[];if(u>0){let n=e.slice(-u);for(let e=0;e<u-n.length;e++)f.push({val:-1,time:``});for(let e of n){let n=e[t],r=e.t?new Date(e.t).toLocaleTimeString([],{hour:`2-digit`,minute:`2-digit`}):``;f.push({val:n,time:r,...e.t?{iso:e.t}:{},checks:e.checks,unmeasured:e.omnitronUnmeasured})}}let p=f.filter(e=>e.val>=0),m=p.length>0?Math.round(p.reduce((e,t)=>e+t.val,0)/p.length*100):-1,h=m<0&&f.some(e=>e.unmeasured===`absent`),g=m>=0&&o&&Date.now()-new Date(o).getTime()>3e5?Date.now()-new Date(o).getTime():null,_=o?{time:new Date(o).toLocaleTimeString([],{hour:`2-digit`,minute:`2-digit`})}:null,v=g==null?null:g>=36e5?`${Math.round(g/36e5)}h`:`${Math.max(1,Math.round(g/6e4))}m`;return(0,K.jsxs)(U,{spacing:.25,children:[(0,K.jsxs)(U,{direction:`row`,sx:{justifyContent:`space-between`,alignItems:`center`},children:[(0,K.jsx)(E,{variant:`caption`,sx:{color:`text.disabled`,fontSize:9,textTransform:`uppercase`,letterSpacing:.5},children:n}),v?(0,K.jsx)(s,{title:`Nothing has been recorded for ${v} — the last check was at ${_?.time}. The strip shows what was measured before that, not the node now.`,arrow:!0,children:(0,K.jsxs)(E,{variant:`caption`,sx:{fontSize:9,color:`warning.main`},children:[`no checks for `,v]})}):m>=0?(0,K.jsxs)(E,{variant:`caption`,sx:{fontSize:9,color:m>=95?`success.main`:m>=50?`warning.main`:`error.main`},children:[m,`%`]}):h?(0,K.jsx)(E,{variant:`caption`,sx:{fontSize:9,color:`info.main`},children:`not installed`}):null]}),(0,K.jsx)(U,{ref:l,direction:`row`,sx:{height:a,gap:`${i}px`},children:f.map((e,t)=>{let n=De(e.val,c,e.unmeasured),i=e.checks==null?``:` (${e.checks} checks)`,a=e.val<0?e.unmeasured===`absent`?`${e.time} — omnitron not installed${i}`:e.unmeasured===`unreachable`?`${e.time} — could not reach the node${i}`:e.unmeasured===`unread`?`${e.time} — not measured: the node was reached and nothing could be read${i}`:e.time?`${e.time} — no data`:`No data`:`${e.time} — ${Math.round(e.val*100)}% up${i}`;return(0,K.jsx)(s,{title:a,arrow:!0,children:(0,K.jsx)(L,{sx:{width:r,minWidth:r,height:`100%`,bgcolor:n,borderRadius:`2px`,transition:`opacity 0.15s`,"&:hover":{opacity:.6}}})},t)})})]})}function Oe(e){return/\+local\.[0-9a-zA-Z]+\.(\d{12})$/.exec(e??``)?.[1]??null}function ke(e,t){if(!e||!t)return`unknown`;if(e===t)return`current`;let n=Oe(e),r=Oe(t);return n&&r?n<r?`behind`:`current`:`differs`}function Ae(e){let t,n=``;for(let r of e){if(!r)continue;let e=Oe(r);if(!e){t??=r;continue}e>n&&(n=e,t=r)}return t}function je(e,t){if(!e)return{state:`unchecked`,tooltip:`Not checked`};if(t)return e.omnitronConnected?{state:`online`,tooltip:`v${e.omnitronVersion??`?`} PID ${e.omnitronPid??`?`}`}:{state:`offline`,tooltip:e.omnitronError??`Not running`};let n=he(e);switch(n){case`running`:return{state:`online`,tooltip:`v${e.omnitronVersion??`?`} (${e.omnitronRole??`?`})`};case`not-running`:return{state:`offline`,tooltip:e.omnitronError??`Not running`};case`not-installed`:return{state:`not-installed`,tooltip:`Not installed on this node`};case`unreachable`:return{state:`unchecked`,tooltip:e.sshError?`SSH refused: ${e.sshError}`:`SSH refused`};case`unread`:return e.omnitronError?{state:`unknown`,tooltip:`Unknown — ${e.omnitronError}`}:{state:`unchecked`,tooltip:`Not checked yet`};default:return{state:`unchecked`,tooltip:String(n)}}}var Me=6,Ne=4,Pe=10,Fe=[50,200,500],Ie={ok:`success`,failed:`error`,unknown:`warning`,unmeasured:`default`},Le={ok:`reachable`,failed:`failed`,unknown:`unknown`,unmeasured:`not measured`},Re=e=>e===`unmeasured`||e===`unknown`;function ze({label:e,verdict:t,latencyMs:n,error:r,detail:i}){return(0,K.jsxs)(L,{sx:{py:1},children:[(0,K.jsxs)(U,{direction:`row`,spacing:1,sx:{alignItems:`center`},children:[(0,K.jsx)(E,{variant:`body2`,sx:{fontWeight:600,minWidth:96},children:e}),(0,K.jsx)(R,{size:`small`,label:Le[t],color:Ie[t],variant:Re(t)?`outlined`:`filled`,sx:{height:20,fontSize:11}}),n!=null&&(0,K.jsxs)(E,{variant:`caption`,sx:{color:`text.secondary`},children:[n,`ms`]}),i&&(0,K.jsx)(E,{variant:`caption`,noWrap:!0,sx:{color:`text.secondary`},children:i})]}),r&&(0,K.jsx)(E,{variant:`caption`,component:`pre`,sx:{mt:.5,ml:`104px`,p:1,borderRadius:1,bgcolor:e=>C(e.palette.error.main,.08),color:`error.main`,fontFamily:`monospace`,fontSize:11,whiteSpace:`pre-wrap`,wordBreak:`break-word`},children:r})]})}function Be({row:e,isLocal:t}){let n=J(e.pingReachable,e.pingError),r=J(e.sshConnected,e.sshError),i=ge(e),a=_e(e),o=t?[[`OMNITRON`,i]]:[[`PING`,n],[`SSH`,r],[`OMNITRON`,i]];return(0,K.jsxs)(L,{sx:{py:.75,borderBottom:e=>`1px solid ${e.palette.divider}`},children:[(0,K.jsxs)(U,{direction:`row`,spacing:1,sx:{alignItems:`center`,flexWrap:`wrap`},children:[(0,K.jsx)(E,{variant:`caption`,sx:{fontFamily:`monospace`,minWidth:148,color:`text.secondary`},children:new Date(e.checkedAt).toLocaleString()}),o.map(([e,t])=>(0,K.jsx)(R,{size:`small`,label:e,color:Ie[t],variant:Re(t)?`outlined`:`filled`,sx:{height:18,fontSize:10}},e)),(0,K.jsxs)(E,{variant:`caption`,sx:{color:`text.disabled`,ml:`auto`},children:[e.checkDurationMs,`ms`]})]}),a&&(0,K.jsx)(E,{variant:`caption`,sx:{display:`block`,mt:.25,ml:`156px`,color:`error.main`,fontFamily:`monospace`,fontSize:11,wordBreak:`break-word`},children:a})]})}function Ve({data:e}){if(!e)return(0,K.jsx)(E,{variant:`body2`,sx:{py:1,color:`text.secondary`},children:`Not read.`});if(!e.reachable||!e.answer)return(0,K.jsxs)(U,{direction:`row`,spacing:1,sx:{py:1,alignItems:`baseline`},children:[(0,K.jsx)(R,{size:`small`,label:`not asked`,variant:`outlined`,sx:{height:20,fontSize:11}}),(0,K.jsx)(E,{variant:`caption`,sx:{color:`text.secondary`,fontFamily:`monospace`},children:e.error??`no reason given`})]});let t=e.answer;if(t.apps.length===0)return(0,K.jsx)(E,{variant:`body2`,sx:{py:1,color:`text.secondary`},children:`The node answered and is running no applications.`});let n=e=>e===`online`?`success`:e===`starting`?`warning`:e===`stopped`?`default`:`error`;return(0,K.jsxs)(L,{sx:{py:.5},children:[(0,K.jsxs)(E,{variant:`caption`,sx:{display:`block`,mb:1,color:`text.secondary`},children:[t.apps.length,` app(s) · `,t.totalCpu.toFixed(1),`% CPU ·`,` `,(ue(t)/1024/1024).toFixed(0),` MB`]}),t.apps.map(e=>(0,K.jsxs)(U,{direction:`row`,spacing:1,sx:{py:.5,alignItems:`baseline`,flexWrap:`wrap`},children:[(0,K.jsx)(R,{size:`small`,label:e.status,color:n(e.status),sx:{height:20,fontSize:11}}),(0,K.jsx)(E,{variant:`body2`,sx:{fontFamily:`monospace`},children:e.name}),(0,K.jsx)(E,{variant:`caption`,sx:{color:`text.secondary`,fontFamily:`monospace`},children:[e.pid?`pid ${e.pid}`:null,e.port?`:${e.port}`:null,e.uptime>0?`up ${$e(e.uptime)}`:null,e.restarts>0?`${e.restarts} restarts`:null].filter(Boolean).join(` · `)})]},e.name))]})}function He({data:e}){let t=e.phase===`done`?`success`:e.phase===`failed`||e.phase===`refused`?`error`:`warning`,n=e.phase!==`done`&&e.phase!==`failed`&&e.phase!==`refused`;return(0,K.jsxs)(L,{sx:{py:.5},children:[(0,K.jsxs)(U,{direction:`row`,spacing:1,sx:{alignItems:`center`,flexWrap:`wrap`},children:[(0,K.jsx)(R,{size:`small`,label:e.phase,color:t,sx:{height:20,fontSize:11}}),(0,K.jsx)(E,{variant:`body2`,children:e.message})]}),e.version&&(0,K.jsx)(E,{variant:`caption`,sx:{display:`block`,mt:.5,color:`text.secondary`,fontFamily:`monospace`},children:e.version}),n&&(0,K.jsx)(f,{variant:`determinate`,value:e.percent,sx:{mt:1,height:4,borderRadius:2}}),(0,K.jsx)(E,{variant:`caption`,sx:{display:`block`,mt:.5,color:`text.disabled`},children:new Date(e.at).toLocaleString()})]})}function Ue({data:e}){if(!e)return(0,K.jsx)(E,{variant:`body2`,sx:{py:1,color:`text.secondary`},children:`Not read.`});if(!e.reachable)return(0,K.jsxs)(U,{direction:`row`,spacing:1,sx:{py:1,alignItems:`baseline`},children:[(0,K.jsx)(R,{size:`small`,label:`not asked`,variant:`outlined`,sx:{height:20,fontSize:11}}),(0,K.jsx)(E,{variant:`caption`,sx:{color:`text.secondary`,fontFamily:`monospace`},children:e.error??`no reason given`})]});let t=Object.entries(e.indicators??{});if(t.length===0)return(0,K.jsx)(E,{variant:`body2`,sx:{py:1,color:`text.secondary`},children:`The node answered and registered no indicators.`});let n=e=>e===`healthy`?`success`:e===`degraded`?`warning`:e===`unhealthy`?`error`:`default`;return(0,K.jsxs)(L,{sx:{py:.5},children:[e.status&&(0,K.jsx)(R,{size:`small`,label:`overall: ${e.status}`,color:n(e.status),sx:{height:20,fontSize:11,mb:1}}),t.map(([e,t])=>(0,K.jsxs)(U,{direction:`row`,spacing:1,sx:{py:.4,alignItems:`baseline`,flexWrap:`wrap`},children:[(0,K.jsx)(E,{variant:`body2`,sx:{minWidth:120,fontWeight:500},children:e}),(0,K.jsx)(R,{size:`small`,label:t?.status??`unknown`,color:n(t?.status),variant:t?.status?`filled`:`outlined`,sx:{height:18,fontSize:10}}),t?.message&&(0,K.jsx)(E,{variant:`caption`,sx:{color:t.status===`healthy`?`text.secondary`:`error.main`},children:t.message})]},e))]})}function We({data:e}){if(!e)return(0,K.jsx)(E,{variant:`body2`,sx:{py:1,color:`text.secondary`},children:`Not read.`});if(!e.reachable||!e.sync)return(0,K.jsxs)(U,{direction:`row`,spacing:1,sx:{py:1,alignItems:`baseline`},children:[(0,K.jsx)(R,{size:`small`,label:`not asked`,variant:`outlined`,sx:{height:20,fontSize:11}}),(0,K.jsx)(E,{variant:`caption`,sx:{color:`text.secondary`,fontFamily:`monospace`},children:e.error??`no reason given`})]});let t=e.sync,n=t.pendingItems>0&&!t.connected;return(0,K.jsxs)(L,{sx:{py:.5},children:[(0,K.jsxs)(U,{direction:`row`,spacing:1,sx:{alignItems:`center`,flexWrap:`wrap`,mb:.5},children:[(0,K.jsx)(R,{size:`small`,label:t.connected?`delivering`:t.pendingItems>0?`holding`:`idle`,color:n?`warning`:t.connected?`success`:`default`,sx:{height:20,fontSize:11}}),(0,K.jsxs)(E,{variant:`caption`,sx:{color:`text.secondary`},children:[t.pendingItems,` pending · `,Math.round(t.bufferSize/1024),` KB · last delivery`,` `,t.lastSyncAt?Ce(new Date(t.lastSyncAt).toISOString()):`never`]}),t.failedAttempts>0&&(0,K.jsx)(R,{size:`small`,color:`error`,label:`${t.failedAttempts} failed attempts`,sx:{height:18,fontSize:10}})]}),t.lastError&&(0,K.jsx)(E,{variant:`caption`,sx:{display:`block`,color:`error.main`,fontFamily:`monospace`,fontSize:11,wordBreak:`break-word`},children:t.lastError})]})}function Ge({states:e}){let t=ve(Object.values(e));return t.kind===`none`?null:(0,K.jsx)(V,{severity:`warning`,children:t.kind===`leaders`?`${t.answered} nodes name ${t.groups.length} different leaders: `+t.groups.map(([e,t])=>`${e} (${t.length})`).join(`, `):`${t.answered} nodes are in ${t.terms.length} different election terms: ${t.terms.join(`, `)}`})}function Ke({data:e}){if(!e)return null;if(!e.reachable||!e.relay)return(0,K.jsxs)(U,{direction:`row`,spacing:1,sx:{py:.5,alignItems:`center`,flexWrap:`wrap`},children:[(0,K.jsx)(E,{variant:`caption`,sx:{minWidth:96,color:`text.secondary`},children:`telemetry`}),(0,K.jsx)(R,{size:`small`,label:`not asked`,variant:`outlined`,sx:{height:18,fontSize:10}}),(0,K.jsx)(E,{variant:`caption`,sx:{color:`text.secondary`,fontFamily:`monospace`},children:e.error??`no reason given`})]});let t=e.relay,n=t.buffer?.totalDropped??0;return(0,K.jsxs)(U,{direction:`row`,spacing:1,sx:{py:.5,alignItems:`center`,flexWrap:`wrap`},children:[(0,K.jsx)(E,{variant:`caption`,sx:{minWidth:96,color:`text.secondary`},children:`telemetry`}),(0,K.jsx)(R,{size:`small`,label:t.transportConnected?`transport up`:`transport down`,color:t.transportConnected?`success`:`default`,variant:t.transportConnected?`filled`:`outlined`,sx:{height:18,fontSize:10}}),(0,K.jsxs)(E,{variant:`caption`,sx:{color:`text.secondary`},children:[t.buffer?.size??0,` buffered · `,t.totalSent??0,` sent · `,t.totalFailed??0,` failed`]}),n>0&&(0,K.jsx)(R,{size:`small`,color:`error`,label:`${n} DROPPED`,sx:{height:18,fontSize:10}})]})}function qe({open:e,onClose:t,node:n}){let[r,a]=(0,G.useState)([]),[o,s]=(0,G.useState)(null),[c,l]=(0,G.useState)(null),[u,f]=(0,G.useState)(null),[p,m]=(0,G.useState)(null),[h,g]=(0,G.useState)(50),[_,ee]=(0,G.useState)(null),[y,ne]=(0,G.useState)(null),[b,C]=(0,G.useState)(!1),[D,O]=(0,G.useState)(!1),[k,A]=(0,G.useState)(!1),[j,M]=(0,G.useState)(null),N=le(),P=(0,G.useCallback)(async(e,t)=>{O(!0),M(null);try{let[n,r,o,c,u,d,p]=await Promise.allSettled([i.getCheckHistory({nodeId:e,limit:t}),i.getNodeIndicators({nodeId:e}),i.getNodeSyncStatus({nodeId:e}),i.getNodeRelayStats({nodeId:e}),i.getNodeHealthSummaries(),i.getNodeDaemonStatus({nodeId:e}),i.getUpgradeProgress()]);if(ee(d.status===`fulfilled`?d.value:null),ne(p.status===`fulfilled`?p.value.find(t=>t.nodeId===e)??null:null),s(r.status===`fulfilled`?r.value:null),l(o.status===`fulfilled`?o.value:null),f(c.status===`fulfilled`?c.value:null),m(u.status===`fulfilled`?u.value.find(t=>t.nodeId===e)??null:null),n.status===`rejected`)throw n.reason;a(n.value)}catch(e){M(e instanceof Error?e.message:String(e)),a([])}finally{O(!1)}},[]);(0,G.useEffect)(()=>{e&&n&&P(n.id,h)},[e,n,h,P]);let F=y!==null&&y.phase!==`done`&&y.phase!==`failed`&&y.phase!==`refused`;I(()=>{e&&n&&P(n.id,h)},{intervalMs:5e3,enabled:e&&F});let oe=(0,G.useCallback)(async()=>{if(n){C(!0);try{let e=await i.upgradeNode({nodeId:n.id});if(!e.started){N.warning(e.reason??`The daemon refused to start an upgrade`);return}N.info(`Building a bundle — this takes a few minutes`),await P(n.id,h)}catch(e){N.error(e instanceof Error?e.message:`Could not start the upgrade`)}finally{C(!1)}}},[n,h,P,N]),ce=(0,G.useCallback)(async()=>{if(n){A(!0);try{await i.triggerNodeCheck({nodeId:n.id}),await P(n.id,h),N.success(`Check complete`)}catch(e){N.error(e instanceof Error?e.message:`Check failed`)}finally{A(!1)}}},[n,h,P,N]);if(!n)return null;let z=n.status,H=n.isLocal;return(0,K.jsxs)(ae,{open:e,onClose:t,maxWidth:`md`,fullWidth:!0,children:[(0,K.jsx)(te,{children:(0,K.jsxs)(U,{direction:`row`,spacing:1,sx:{alignItems:`center`},children:[(0,K.jsxs)(L,{component:`span`,children:[`Diagnostics — `,n.name]}),(0,K.jsx)(E,{variant:`caption`,sx:{color:`text.secondary`},children:H?`this daemon`:`${n.host}:${n.daemonPort}`})]})}),(0,K.jsxs)(ie,{dividers:!0,children:[(0,K.jsx)(E,{variant:`overline`,sx:{color:`text.secondary`},children:`Last check`}),p&&(p.consecutiveFailures>0||p.lastSeenOnline)&&(0,K.jsxs)(U,{direction:`row`,spacing:1,sx:{mb:1,alignItems:`center`,flexWrap:`wrap`},children:[p.consecutiveFailures>0&&(0,K.jsx)(R,{size:`small`,color:p.consecutiveFailures>3?`error`:`warning`,label:`${p.consecutiveFailures} consecutive failures`,sx:{height:20,fontSize:11}}),p.lastSeenOnline&&(0,K.jsxs)(E,{variant:`caption`,sx:{color:`text.secondary`},children:[`last seen online `,Ce(p.lastSeenOnline)]})]}),z?(0,K.jsxs)(L,{sx:{mb:2},children:[!H&&(0,K.jsxs)(K.Fragment,{children:[(0,K.jsx)(ze,{label:`PING`,verdict:J(z.pingReachable,z.pingError),latencyMs:z.pingLatencyMs,error:z.pingError??null}),(0,K.jsx)(ze,{label:`SSH`,verdict:J(z.sshConnected,z.sshError),latencyMs:z.sshLatencyMs,error:z.sshError??null,detail:z.sshConnected==null&&!z.sshError?`this check reaches the node over Netron`:void 0})]}),(0,K.jsx)(ze,{label:`OMNITRON`,verdict:ge(z),error:z.omnitronError??null,detail:z.omnitronConnected?[z.omnitronVersion&&`v${z.omnitronVersion}`,z.omnitronPid&&`pid ${z.omnitronPid}`,z.omnitronUptime!=null&&z.omnitronUptime>0&&`up ${$e(z.omnitronUptime)}`].filter(Boolean).join(` · `):void 0}),(0,K.jsx)(E,{variant:`caption`,sx:{display:`block`,mt:1,color:`text.disabled`},children:z.checkedAt?`Taken ${new Date(z.checkedAt).toLocaleString()}`:`Never checked`})]}):(0,K.jsx)(E,{variant:`body2`,sx:{mb:2,color:`text.secondary`},children:`This node has never been checked.`}),(0,K.jsx)(T,{sx:{my:2}}),(0,K.jsx)(E,{variant:`overline`,sx:{color:`text.secondary`},children:`Indicators, from the node's own titan-health`}),(0,K.jsx)(Ue,{data:o}),(0,K.jsx)(T,{sx:{my:2}}),(0,K.jsx)(E,{variant:`overline`,sx:{color:`text.secondary`},children:`Running on this node`}),(0,K.jsx)(Ve,{data:_}),(0,K.jsx)(T,{sx:{my:2}}),(0,K.jsx)(E,{variant:`overline`,sx:{color:`text.secondary`},children:`Replication`}),(0,K.jsx)(We,{data:c}),(0,K.jsx)(Ke,{data:u}),(0,K.jsx)(T,{sx:{my:2}}),(0,K.jsxs)(U,{direction:`row`,spacing:1,sx:{alignItems:`center`,mb:1},children:[(0,K.jsx)(E,{variant:`overline`,sx:{color:`text.secondary`},children:`History`}),(0,K.jsx)(w,{size:`small`,sx:{ml:`auto`,minWidth:120},children:(0,K.jsx)(d,{value:h,onChange:e=>g(Number(e.target.value)),sx:{height:30,fontSize:12},children:Fe.map(e=>(0,K.jsxs)(S,{value:e,sx:{fontSize:12},children:[`last `,e,` checks`]},e))})})]}),j&&(0,K.jsx)(V,{onClose:()=>M(null),children:j}),D&&r.length===0?(0,K.jsx)(x,{height:120}):r.length===0&&!j?(0,K.jsx)(E,{variant:`body2`,sx:{py:2,color:`text.secondary`},children:`No checks recorded. History is kept by the daemon that runs the health worker.`}):(0,K.jsx)(L,{sx:{maxHeight:360,overflowY:`auto`},children:r.map(e=>(0,K.jsx)(Be,{row:e,isLocal:H},`${e.nodeId}-${e.checkedAt}`))}),y&&(0,K.jsxs)(K.Fragment,{children:[(0,K.jsx)(T,{sx:{my:2}}),(0,K.jsx)(E,{variant:`overline`,sx:{color:`text.secondary`},children:`Omnitron upgrade`}),(0,K.jsx)(He,{data:y})]})]}),(0,K.jsxs)(se,{children:[(0,K.jsx)(B,{onClick:ce,disabled:k,startIcon:(0,K.jsx)(v,{sx:{fontSize:16}}),children:k?`Checking…`:`Check now`}),!H&&(0,K.jsx)(B,{onClick:oe,disabled:b||F,startIcon:(0,K.jsx)(re,{sx:{fontSize:16}}),children:F?`Upgrading…`:`Upgrade omnitron`}),(0,K.jsx)(L,{sx:{flexGrow:1}}),(0,K.jsx)(B,{onClick:t,children:`Close`})]})]})}function Je({node:e,onEdit:t,onRemove:n,onCheckSsh:r,onDiagnose:i,checking:a,uptimeData:o,lastCheckAt:c,newest:u,mesh:d}){let{status:f}=e,p=je(f,e.isLocal),m=f?.pingReachable==null?`unchecked`:f.pingReachable?`online`:`offline`,h=!e.isLocal&&X(f?.checkedAt);return(0,K.jsx)(F,{sx:{height:`100%`,display:`flex`,flexDirection:`column`,transition:`box-shadow 0.2s`,"&:hover":{boxShadow:e=>e.shadows[8]}},children:(0,K.jsxs)(A,{sx:{pb:`12px !important`,flexGrow:1,display:`flex`,flexDirection:`column`},children:[(0,K.jsxs)(U,{direction:`row`,sx:{alignItems:`flex-start`,justifyContent:`space-between`,mb:1.5},children:[(0,K.jsxs)(U,{direction:`row`,spacing:1,sx:{alignItems:`center`,minWidth:0},children:[e.isLocal?(0,K.jsx)(O,{sx:{fontSize:24,color:`primary.main`,flexShrink:0}}):(0,K.jsx)(M,{sx:{fontSize:24,color:`text.secondary`,flexShrink:0}}),(0,K.jsxs)(L,{sx:{minWidth:0},children:[(0,K.jsx)(E,{variant:`subtitle2`,noWrap:!0,children:e.name}),(0,K.jsxs)(E,{variant:`caption`,noWrap:!0,sx:{color:`text.disabled`},children:[e.host,e.isLocal?``:`:${e.sshPort}`]})]})]}),(0,K.jsxs)(U,{direction:`row`,spacing:0,children:[!e.isLocal&&(0,K.jsx)(s,{title:a?`Checking...`:`Check SSH connection`,children:(0,K.jsx)(`span`,{children:(0,K.jsx)(l,{size:`small`,"aria-label":`Check SSH connection`,onClick:()=>r(e.id),disabled:a,children:(0,K.jsx)(v,{sx:{fontSize:18,...a&&{animation:`${we} 1s linear infinite`}}})})})}),(0,K.jsx)(s,{title:`Diagnostics`,children:(0,K.jsx)(l,{size:`small`,onClick:()=>i(e),children:(0,K.jsx)(b,{sx:{fontSize:18}})})}),!e.isLocal&&(0,K.jsxs)(K.Fragment,{children:[(0,K.jsx)(s,{title:`Edit`,children:(0,K.jsx)(l,{size:`small`,onClick:()=>t(e),children:(0,K.jsx)(y,{sx:{fontSize:18}})})}),(0,K.jsx)(s,{title:`Remove`,children:(0,K.jsx)(l,{size:`small`,onClick:()=>n(e.id),color:`error`,children:(0,K.jsx)(z,{sx:{fontSize:18}})})})]})]})]}),(0,K.jsxs)(U,{direction:`row`,spacing:2,sx:{mb:1.5,alignItems:`center`},children:[e.isLocal?(0,K.jsx)(Ee,{state:p.state,label:`OMNITRON`,tooltip:p.tooltip}):(0,K.jsxs)(K.Fragment,{children:[(0,K.jsx)(Ee,{state:m,label:`PING`,tooltip:f?.pingReachable?`${f.pingLatencyMs??`?`}ms`:f?.pingError??`Not checked`}),(0,K.jsx)(Ee,{state:p.state,label:`OMNITRON`,tooltip:p.tooltip})]}),(0,K.jsx)(s,{arrow:!0,title:f?.checkedAt?`Last checked ${new Date(f.checkedAt).toLocaleString()}`:`This node has never been checked`,children:(0,K.jsx)(E,{variant:`caption`,noWrap:!0,sx:{ml:`auto`,fontSize:10,color:h?`warning.main`:`text.disabled`},children:Ce(f?.checkedAt)})})]}),(0,K.jsx)(T,{sx:{mb:1.5}}),(0,K.jsxs)(U,{spacing:.5,children:[f?.omnitronVersion&&(0,K.jsx)(Qe,{version:f.omnitronVersion,standing:ke(f.omnitronVersion,u)}),(0,K.jsx)($,{label:`Runtime`,value:e.runtime}),(0,K.jsx)($,{label:`Daemon Port`,value:String(e.daemonPort)}),!e.isLocal&&(0,K.jsx)($,{label:`SSH User`,value:e.sshUser}),f?.os&&(0,K.jsx)($,{label:`OS`,value:`${f.os.platform} ${f.os.arch}`}),f?.omnitronUptime!=null&&f.omnitronUptime>0&&(0,K.jsx)($,{label:`Uptime`,value:$e(f.omnitronUptime)}),!e.isLocal&&(0,K.jsx)(Ze,{mesh:d})]}),e.tags.length>0&&(0,K.jsx)(U,{direction:`row`,spacing:.5,useFlexGap:!0,sx:{mt:1.5,flexWrap:`wrap`},children:e.tags.map(e=>(0,K.jsx)(R,{label:e,size:`small`,variant:`outlined`,sx:{height:22,fontSize:11}},e))}),!e.isLocal&&(0,K.jsx)(L,{sx:{mt:`auto`,pt:1.5},children:(0,K.jsxs)(U,{spacing:.75,children:[(0,K.jsx)(Q,{data:o,metric:`ping`,label:`PING`,segWidth:Me,gap:Ne,height:Pe,lastCheckAt:c}),(0,K.jsx)(Q,{data:o,metric:`omnitron`,label:`OMNITRON`,segWidth:Me,gap:Ne,height:Pe,lastCheckAt:c})]})})]})})}function Ye(e){let t=e.lastHeartbeat?` Last heartbeat ${Ce(new Date(e.lastHeartbeat).toISOString())}.`:``;return!e.inMesh||e.status===`disconnected`?{text:`not joined`,tone:`idle`,tooltip:e.lastError??`This master is not connected to the node. Nothing it collects is being replicated.`}:e.status===`error`?{text:`failing`,tone:`bad`,tooltip:e.lastError??`The connection to this node is failing.`}:e.status===`connecting`?{text:`joining`,tone:`quiet`,tooltip:`Connecting.`}:e.authenticated?e.via===`ssh-tunnel`?{text:`over SSH`,tone:`info`,tooltip:`Replicating through an SSH tunnel: this node's daemon port is not open to this master.${t}`}:{text:`direct`,tone:`good`,tooltip:`Replicating over a direct connection to the daemon port.${t}`}:{text:`unauthenticated`,tone:`warn`,tooltip:`Connected, but without a credential this node accepts — it answers pings and replicates nothing.`}}var Xe={idle:`text.disabled`,quiet:`text.secondary`,bad:`error.main`,warn:`warning.main`,info:`info.main`,good:`success.main`};function Ze({mesh:e}){if(!e)return null;let t=Ye(e);return(0,K.jsxs)(U,{direction:`row`,sx:{justifyContent:`space-between`,alignItems:`center`},children:[(0,K.jsx)(E,{variant:`caption`,sx:{color:`text.disabled`,fontSize:11},children:`Mesh`}),(0,K.jsx)(s,{arrow:!0,title:t.tooltip,children:(0,K.jsx)(E,{variant:`caption`,noWrap:!0,sx:{fontSize:11,color:Xe[t.tone],maxWidth:190},children:t.text})})]})}function Qe({version:e,standing:t}){let[n,r]=e.split(`+`),i=r?.split(`.`)[1],a=i?`${n} · ${i.slice(0,7)}`:n,o=t===`behind`?{text:`behind`,color:`warning.main`}:t===`differs`?{text:`differs`,color:`info.main`}:null;return(0,K.jsxs)(U,{direction:`row`,sx:{justifyContent:`space-between`,alignItems:`center`},children:[(0,K.jsx)(E,{variant:`caption`,sx:{color:`text.disabled`,fontSize:11},children:`Version`}),(0,K.jsx)(s,{arrow:!0,title:e,children:(0,K.jsxs)(U,{direction:`row`,spacing:.75,sx:{alignItems:`center`},children:[o&&(0,K.jsx)(E,{variant:`caption`,sx:{fontSize:10,color:o.color},children:o.text}),(0,K.jsx)(E,{variant:`caption`,noWrap:!0,sx:{fontSize:11,maxWidth:190},children:a})]})})]})}function $({label:e,value:t}){return(0,K.jsxs)(U,{direction:`row`,sx:{justifyContent:`space-between`,alignItems:`center`},children:[(0,K.jsx)(E,{variant:`caption`,sx:{color:`text.disabled`},children:e}),(0,K.jsx)(E,{variant:`caption`,sx:{fontWeight:500},children:t})]})}function $e(e){let t=Math.floor(e/1e3);if(t<60)return`${t}s`;let n=Math.floor(t/60);if(n<60)return`${n}m`;let r=Math.floor(n/60);return r<24?`${r}h ${n%60}m`:`${Math.floor(r/24)}d ${r%24}h`}var et={name:``,host:``,sshPort:22,sshUser:`root`,sshAuthMethod:`key`,sshPrivateKey:``,sshPassphrase:``,sshPassword:``,runtime:`node`,daemonPort:9700,tags:``};function tt({open:e,onClose:t,onSubmit:n,editNode:r,sshKeys:i,loading:a,error:o,onDismissError:s}){let[c,l]=(0,G.useState)(et);(0,G.useEffect)(()=>{e&&l(r?{name:r.name,host:r.host,sshPort:r.sshPort,sshUser:r.sshUser,sshAuthMethod:r.sshAuthMethod,sshPrivateKey:r.sshPrivateKey??``,sshPassphrase:``,sshPassword:``,runtime:r.runtime,daemonPort:r.daemonPort,tags:r.tags.join(`, `)}:{...et,sshPrivateKey:i[0]?.path??``})},[r,i,e]);let u=(e,t)=>l(n=>({...n,[e]:t})),f=!!r,p=c.name.trim()&&c.host.trim();return(0,K.jsxs)(ae,{open:e,onClose:t,maxWidth:`sm`,fullWidth:!0,children:[(0,K.jsx)(te,{children:f?`Edit "${r.name}"`:`Add Node`}),(0,K.jsxs)(ie,{sx:{pt:`8px !important`},children:[o&&(0,K.jsx)(V,{onClose:s,children:o}),(0,K.jsxs)(U,{spacing:2.5,sx:{mt:1},children:[(0,K.jsx)(h,{label:`Name`,value:c.name,onChange:e=>u(`name`,e.target.value),fullWidth:!0,placeholder:`production-server-1`,autoFocus:!0}),(0,K.jsxs)(U,{direction:`row`,spacing:2,children:[(0,K.jsx)(h,{label:`Host`,value:c.host,onChange:e=>u(`host`,e.target.value),fullWidth:!0,placeholder:`192.168.1.100`}),(0,K.jsx)(h,{label:`SSH Port`,value:c.sshPort,onChange:e=>u(`sshPort`,parseInt(e.target.value,10)||22),sx:{width:120},type:`number`})]}),(0,K.jsxs)(U,{direction:`row`,spacing:2,children:[(0,K.jsx)(h,{label:`SSH User`,value:c.sshUser,onChange:e=>u(`sshUser`,e.target.value),fullWidth:!0}),(0,K.jsxs)(w,{sx:{minWidth:160},children:[(0,K.jsx)(k,{children:`Auth Method`}),(0,K.jsxs)(d,{value:c.sshAuthMethod,label:`Auth Method`,onChange:e=>u(`sshAuthMethod`,e.target.value),children:[(0,K.jsx)(S,{value:`key`,children:`SSH Key`}),(0,K.jsx)(S,{value:`password`,children:`Password`})]})]})]}),c.sshAuthMethod===`key`?(0,K.jsxs)(K.Fragment,{children:[(0,K.jsxs)(w,{fullWidth:!0,children:[(0,K.jsx)(k,{children:`SSH Private Key`}),(0,K.jsxs)(d,{value:c.sshPrivateKey,label:`SSH Private Key`,onChange:e=>u(`sshPrivateKey`,e.target.value),children:[i.map(e=>(0,K.jsx)(S,{value:e.path,children:(0,K.jsxs)(U,{direction:`row`,spacing:1,sx:{alignItems:`center`,width:`100%`},children:[(0,K.jsx)(E,{variant:`body2`,sx:{fontWeight:500},children:e.name}),(0,K.jsx)(R,{label:e.type,size:`small`,sx:{height:20,fontSize:11}}),(0,K.jsx)(E,{variant:`caption`,noWrap:!0,sx:{color:`text.disabled`,ml:`auto`},children:e.path})]})},e.path)),i.length===0&&(0,K.jsx)(S,{disabled:!0,children:(0,K.jsx)(E,{variant:`body2`,sx:{color:`text.secondary`},children:`No SSH keys found`})})]})]}),(0,K.jsx)(h,{label:`Key Passphrase`,value:c.sshPassphrase,onChange:e=>u(`sshPassphrase`,e.target.value),fullWidth:!0,type:`password`,placeholder:r?.hasPassphrase?`Encrypted — leave empty to keep`:`Leave empty if key is not encrypted`,size:`small`,helperText:r?.hasPassphrase?`Passphrase is stored encrypted. Enter new value to change.`:void 0})]}):(0,K.jsx)(h,{label:`SSH Password`,value:c.sshPassword,onChange:e=>u(`sshPassword`,e.target.value),fullWidth:!0,type:`password`,placeholder:r?.hasPassword?`Stored — leave empty to keep`:``,helperText:r?.hasPassword?`Password is stored encrypted. Enter a new value to change it.`:void 0}),(0,K.jsx)(T,{}),(0,K.jsxs)(U,{direction:`row`,spacing:2,children:[(0,K.jsxs)(w,{sx:{minWidth:140},children:[(0,K.jsx)(k,{children:`Runtime`}),(0,K.jsxs)(d,{value:c.runtime,label:`Runtime`,onChange:e=>u(`runtime`,e.target.value),children:[(0,K.jsx)(S,{value:`node`,children:`Node.js`}),(0,K.jsx)(S,{value:`bun`,children:`Bun`})]})]}),(0,K.jsx)(h,{label:`Daemon Port`,value:c.daemonPort,onChange:e=>u(`daemonPort`,parseInt(e.target.value,10)||9700),sx:{width:140},type:`number`}),(0,K.jsx)(h,{label:`Tags`,value:c.tags,onChange:e=>u(`tags`,e.target.value),fullWidth:!0,placeholder:`production, gpu`,helperText:`Comma-separated`})]})]})]}),(0,K.jsxs)(se,{sx:{px:3,pb:2},children:[(0,K.jsx)(B,{onClick:t,color:`inherit`,children:`Cancel`}),(0,K.jsx)(B,{variant:`contained`,onClick:()=>n(c),disabled:!p||a,children:f?`Save`:`Add Node`})]})]})}function nt({open:e,onClose:t,onSaved:n}){let[r,a]=(0,G.useState)(null),[o,s]=(0,G.useState)(!1),[c,l]=(0,G.useState)(null);(0,G.useEffect)(()=>{e&&(l(null),i.getCheckConfig().then(e=>a(e)).catch(e=>l(e?.message??`Could not read the current settings`)))},[e]);let u=(e,t)=>a(n=>n&&{...n,[e]:t});return(0,K.jsxs)(ae,{open:e,onClose:o?void 0:t,maxWidth:`xs`,fullWidth:!0,children:[(0,K.jsx)(te,{children:`Check Settings`}),(0,K.jsxs)(ie,{sx:{pt:`8px !important`},children:[c&&(0,K.jsx)(V,{onClose:()=>l(null),children:c}),r?(0,K.jsxs)(U,{spacing:2.5,sx:{mt:1},children:[(0,K.jsxs)(w,{fullWidth:!0,children:[(0,K.jsx)(k,{children:`ICMP Ping`}),(0,K.jsxs)(d,{value:r.pingEnabled?`on`:`off`,label:`ICMP Ping`,onChange:e=>u(`pingEnabled`,e.target.value===`on`),children:[(0,K.jsx)(S,{value:`on`,children:`Enabled`}),(0,K.jsx)(S,{value:`off`,children:`Disabled`})]})]}),(0,K.jsx)(h,{label:`Ping timeout (ms)`,type:`number`,fullWidth:!0,value:r.pingTimeout,onChange:e=>u(`pingTimeout`,parseInt(e.target.value,10)||0),helperText:`250-60000`,disabled:!r.pingEnabled}),(0,K.jsx)(h,{label:`SSH timeout (ms)`,type:`number`,fullWidth:!0,value:r.sshTimeout,onChange:e=>u(`sshTimeout`,parseInt(e.target.value,10)||0),helperText:`1000-120000`}),(0,K.jsx)(h,{label:`Omnitron probe timeout (ms)`,type:`number`,fullWidth:!0,value:r.omnitronCheckTimeout,onChange:e=>u(`omnitronCheckTimeout`,parseInt(e.target.value,10)||0),helperText:`1000-120000`}),(0,K.jsx)(h,{label:`Concurrent checks`,type:`number`,fullWidth:!0,value:r.concurrency,onChange:e=>u(`concurrency`,parseInt(e.target.value,10)||0),helperText:`1-100 - how many nodes are checked at once`})]}):(0,K.jsx)(x,{variant:`rounded`,height:220})]}),(0,K.jsxs)(se,{sx:{px:3,pb:2},children:[(0,K.jsx)(B,{onClick:t,color:`inherit`,disabled:o,children:`Cancel`}),(0,K.jsx)(B,{variant:`contained`,onClick:async()=>{if(r){s(!0),l(null);try{n(await i.setCheckConfig(r)),t()}catch(e){l(e?.message??`Failed to save settings.`)}finally{s(!1)}}},disabled:!r||o,children:o?`Saving...`:`Save`})]})]})}function rt(){let[e,t]=(0,G.useState)([]),[r,a]=(0,G.useState)([]),[o,s]=(0,G.useState)(!0),[c,l]=(0,G.useState)(null),[u,d]=(0,G.useState)(!1),[f,p]=(0,G.useState)(null),[h,g]=(0,G.useState)(null),[ee,ne]=(0,G.useState)(!1),[b,S]=(0,G.useState)(null),[C,w]=(0,G.useState)({}),[T,re]=(0,G.useState)({}),[O,k]=(0,G.useState)(null),[A,M]=(0,G.useState)(!1),[N,P]=(0,G.useState)({uptimeIntervalMs:ye,retentionDays:be}),F=(0,G.useRef)(N);F.current=N;let[oe,L]=(0,G.useState)(null),R=(0,G.useRef)([]);R.current=e;let[ce,z]=(0,G.useState)({}),[H,ue]=(0,G.useState)({}),W=(0,G.useCallback)(async()=>{try{let e=await i.listNodes();return t(e),k(null),e}catch(e){return k(e?.message??`Could not reach the daemon`),R.current}finally{s(!1)}},[]),de=(0,G.useCallback)(async()=>{try{let e=await i.getMeshStatus();z(Object.fromEntries(e.map(e=>[e.nodeId,e])))}catch{}},[]),fe=(0,G.useCallback)(async e=>{let t=await Promise.allSettled(e.map(e=>i.getNodeClusterState({nodeId:e.id}))),n={};for(let e of t)e.status===`fulfilled`&&e.value&&(n[e.value.nodeId]=e.value);Object.keys(n).length>0&&ue(n)},[]),q=(0,G.useCallback)(async e=>{let t={},n={},r=null;await Promise.allSettled(e.map(async e=>{try{let{uptimeIntervalMs:r,retentionDays:a}=F.current,[o,s]=await Promise.all([i.getUptimeBar({nodeId:e.id,bucketCount:xe(a,r),intervalMs:r}),i.getCheckHistory({nodeId:e.id,limit:1}).catch(()=>null)]);t[e.id]=o,s&&(n[e.id]=s[0]?.checkedAt??null)}catch(e){r??=e?.message??`Could not load uptime history`}})),w(e=>({...e,...t})),re(e=>({...e,...n})),L(r)},[]),me=(0,G.useCallback)(async()=>{try{a(await i.listSshKeys())}catch{}},[]),he=j(e=>e.connected),J=j(e=>e.lastNodeEvent),ge=j(e=>e.initialize);(0,G.useEffect)(()=>ge(),[ge]),I(()=>void W(),{intervalMs:he?12e4:3e4}),I(()=>void de(),{intervalMs:15e3}),I(()=>void fe(R.current),{intervalMs:6e4}),(0,G.useEffect)(()=>{J&&W()},[J,W]),I(()=>void(async()=>{await q(R.current)})(),{intervalMs:Se});let _e=e.map(e=>e.id).sort().join(`,`);(0,G.useEffect)(()=>{_e&&q(R.current)},[_e,q]),(0,G.useEffect)(()=>{me()},[me]),(0,G.useEffect)(()=>{Promise.resolve().then(()=>i.getHistoryConfig()).then(e=>P(e)).catch(()=>{})},[]);let ve=(0,G.useMemo)(()=>Ae(e.map(e=>e.status?.omnitronVersion)),[e]),Y=le(),Ce=(0,G.useCallback)(async t=>{let n=e.find(e=>e.id===t)?.name??t;l(t);try{let e=await i.checkNodeStatus({id:t});if(e.sshConnected){let t=e.sshLatencyMs==null?``:` (${e.sshLatencyMs}ms)`;Y.success(`${n}: SSH connected${t}`)}else e.sshConnected===!1?Y.error(`${n}: SSH failed — ${e.sshError??`Connection refused`}`):Y.warning(`${n}: this check did not use SSH — ${e.omnitronConnected?`omnitron answered on its Netron port`:e.omnitronError??`no answer on the Netron port`}`)}catch(e){Y.error(`${n}: ${e?.message??`Check failed`}`)}finally{l(null)}},[e,Y]),[X,we]=(0,G.useState)(null),[Te,Ee]=(0,G.useState)(!1),[De,Z]=(0,G.useState)(null),Q=(0,G.useRef)(!1),Oe=e.find(e=>e.id===X),ke=(0,G.useCallback)(async()=>{if(X&&!Q.current){Q.current=!0,Ee(!0),Z(null);try{await i.removeNode({id:X}),await W(),we(null)}catch(e){Z(e?.message??`Failed to remove node.`)}finally{Q.current=!1,Ee(!1)}}},[X,W]),je=(0,G.useCallback)(()=>{Q.current||(we(null),Z(null))},[]),Me=(0,G.useCallback)(()=>{p(null),S(null),d(!0)},[]),Ne=(0,G.useCallback)(e=>{p(e),S(null),d(!0)},[]),Pe=(0,G.useCallback)(()=>{d(!1),p(null),S(null)},[]),Fe=(0,G.useCallback)(async e=>{ne(!0),S(null);try{let t={name:e.name.trim(),host:e.host.trim(),sshPort:e.sshPort,sshUser:e.sshUser.trim(),sshAuthMethod:e.sshAuthMethod,sshPrivateKey:e.sshAuthMethod===`key`?e.sshPrivateKey:void 0,sshPassphrase:e.sshAuthMethod===`key`&&e.sshPassphrase?e.sshPassphrase:void 0,sshPassword:e.sshAuthMethod===`password`&&e.sshPassword?e.sshPassword:void 0,runtime:e.runtime,daemonPort:e.daemonPort,tags:e.tags.split(`,`).map(e=>e.trim()).filter(Boolean)};f?await i.updateNode({id:f.id,...t}):await i.addNode(t),Pe(),await W()}catch(e){S(e?.message??`Failed to save node.`)}finally{ne(!1)}},[f,W,Pe]),Ie=[...e].sort((e,t)=>e.isLocal===t.isLocal?e.name.localeCompare(t.name):e.isLocal?-1:1);return(0,K.jsxs)(U,{spacing:3,children:[(0,K.jsx)(D,{links:[{name:`Nodes`}],action:(0,K.jsxs)(U,{direction:`row`,spacing:1,children:[(0,K.jsx)(B,{variant:`outlined`,size:`small`,startIcon:(0,K.jsx)(y,{sx:{fontSize:18}}),onClick:()=>M(!0),children:`Check Settings`}),(0,K.jsx)(B,{variant:`outlined`,size:`small`,startIcon:(0,K.jsx)(v,{sx:{fontSize:18}}),onClick:async()=>{let e=await W();await q(e)},children:`Refresh`}),(0,K.jsx)(B,{variant:`contained`,size:`small`,startIcon:(0,K.jsx)(m,{sx:{fontSize:18}}),onClick:Me,children:`Add Node`})]})}),(0,K.jsx)(Ge,{states:H}),(0,K.jsx)(pe,{nodes:e}),O&&(0,K.jsxs)(V,{severity:`warning`,onClose:()=>k(null),children:[`Could not refresh the node list — `,O,`. The cards below are the last state the daemon reported.`]}),oe&&(0,K.jsxs)(V,{severity:`warning`,onClose:()=>L(null),children:[`Could not refresh the uptime history — `,oe,`. The strips below are the last aggregation that arrived, and may be behind the cards.`]}),o?(0,K.jsx)(n,{container:!0,spacing:3,children:[1,2,3].map(e=>(0,K.jsx)(n,{size:{xs:12,sm:6,md:4},children:(0,K.jsx)(x,{variant:`rounded`,height:300})},e))}):Ie.length===0?(0,K.jsx)(_,{title:O?`No nodes to show`:`No nodes registered`,description:O?`The list could not be refreshed, so this may not be the whole picture.`:`Add a node to manage a remote host from here.`}):(0,K.jsx)(n,{container:!0,spacing:3,children:Ie.map(e=>(0,K.jsx)(n,{size:{xs:12,sm:6,md:4},children:(0,K.jsx)(Je,{node:e,onEdit:Ne,onRemove:we,onCheckSsh:Ce,onDiagnose:g,checking:c===e.id,uptimeData:C[e.id]??[],lastCheckAt:T[e.id]??null,newest:ve,mesh:ce[e.id]})},e.id))}),(0,K.jsx)(qe,{open:!!h,onClose:()=>g(null),node:h?e.find(e=>e.id===h.id)??h:null}),(0,K.jsxs)(ae,{open:!!X,onClose:je,maxWidth:`xs`,fullWidth:!0,children:[(0,K.jsx)(te,{children:`Remove Node`}),(0,K.jsxs)(ie,{children:[(0,K.jsxs)(E,{variant:`body2`,children:[`Remove `,(0,K.jsx)(`strong`,{children:Oe?.name??X}),`? This cannot be undone.`]}),De&&(0,K.jsx)(V,{onClose:()=>Z(null),children:De})]}),(0,K.jsxs)(se,{children:[(0,K.jsx)(B,{onClick:je,color:`inherit`,disabled:Te,children:`Cancel`}),(0,K.jsx)(B,{onClick:ke,color:`error`,variant:`contained`,disabled:Te,children:Te?`Removing…`:`Remove`})]})]}),(0,K.jsx)(tt,{open:u,onClose:Pe,onSubmit:Fe,editNode:f,sshKeys:r,loading:ee,error:b,onDismissError:()=>S(null)}),(0,K.jsx)(nt,{open:A,onClose:()=>M(!1),onSaved:e=>{Y.success(`Check settings saved — ping ${e.pingEnabled?`on`:`off`}, SSH timeout ${e.sshTimeout}ms`),W()}})]})}export{Ke as NodeRelay,Oe as buildStampOf,rt as default,Ye as meshStanding,Ae as newestVersion,ke as versionStanding};
@@ -1,4 +0,0 @@
1
- import{r as e}from"./rolldown-runtime-hePW80VL.js";import{t}from"./react-CwJFpaho.js";import{g as n}from"./client-CGbBvy9k.js";import{A as r,Dn as i,Jt as a,M as o,Nt as s,P as c,Qn as l,Qt as u,_ as d,_n as f,_t as p,en as m,j as h,jt as g,kn as _,kt as v,nn as y,nt as b,on as x,rn as S,sn as C,tn as w,vn as T,vt as E,yn as D,zt as O}from"./index-DiZbrwxT.js";import{r as k,t as A}from"./formatters-BqjL73N3.js";import{t as j}from"./settled-pair-C7SjZuns.js";var M=e(t(),1),N=l(),P={success:`success`,failed:`error`,running:`info`,pending:`warning`,cancelled:`default`};function F({open:e,onClose:t,onCreated:r}){let[i,a]=(0,M.useState)(``),[o,c]=(0,M.useState)(``),[l,d]=(0,M.useState)(`[
2
- { "name": "build", "run": "echo building..." },
3
- { "name": "test", "run": "echo testing...", "dependsOn": ["build"] }
4
- ]`),[f,p]=(0,M.useState)(null);return(0,N.jsxs)(y,{open:e,onClose:t,maxWidth:`sm`,fullWidth:!0,children:[(0,N.jsx)(u,{children:`Create Pipeline`}),(0,N.jsx)(m,{children:(0,N.jsxs)(O,{spacing:2.5,sx:{mt:1},children:[f&&(0,N.jsx)(E,{severity:`error`,variant:`outlined`,children:f}),(0,N.jsx)(s,{label:`Name`,value:i,onChange:e=>a(e.target.value),size:`small`,fullWidth:!0}),(0,N.jsx)(s,{label:`Description`,value:o,onChange:e=>c(e.target.value),size:`small`,fullWidth:!0}),(0,N.jsx)(s,{label:`Steps (JSON)`,value:l,onChange:e=>d(e.target.value),size:`small`,fullWidth:!0,multiline:!0,rows:6,slotProps:{input:{sx:{fontFamily:`monospace`,fontSize:12}}}})]})}),(0,N.jsxs)(w,{children:[(0,N.jsx)(D,{onClick:t,size:`small`,children:`Cancel`}),(0,N.jsx)(D,{variant:`contained`,onClick:async()=>{try{let e=JSON.parse(l);await n.createPipeline({name:i,description:o||void 0,steps:e}),a(``),c(``),p(null),r(),t()}catch(e){p(e?.message??`Failed to create pipeline`)}},size:`small`,disabled:!i,children:`Create`})]})]})}function I({run:e}){return(0,N.jsxs)(C,{sx:{pl:4,pr:2,pb:2},children:[e.status===`running`&&(0,N.jsx)(a,{sx:{mb:1}}),(0,N.jsxs)(f,{variant:`caption`,sx:{color:`text.secondary`,mb:1,display:`block`},children:[`Triggered by: `,e.triggeredBy,` | Started: `,A(e.startedAt),e.completedAt&&` | Completed: ${A(e.completedAt)}`]}),e.steps.map((e,t)=>(0,N.jsxs)(O,{direction:`row`,spacing:1,sx:{alignItems:`center`,py:.5},children:[(0,N.jsx)(T,{label:e.status,size:`small`,color:P[e.status]??`default`,variant:`filled`,sx:{minWidth:70,fontWeight:600,fontSize:11}}),(0,N.jsx)(f,{variant:`body2`,sx:{fontWeight:500},children:e.name}),(0,N.jsx)(f,{variant:`caption`,sx:{color:`text.secondary`,fontFamily:`monospace`},children:k(e.duration)}),e.error&&(0,N.jsx)(f,{variant:`caption`,sx:{color:`error.main`,fontFamily:`monospace`},children:e.error})]},t))]})}function L(){let[e,t]=(0,M.useState)(!1),[a,s]=(0,M.useState)(null),{data:l,loading:u,error:m,refresh:y}=b(async()=>{let{first:e,second:t,partialFailure:r}=await j([n.listPipelines(),n.listRuns({limit:50})],[[],[]]);return{pipelineList:e,runs:t,partialFailure:r}},{intervalMs:1e4}),[C,w]=(0,M.useState)(null),[k,L]=(0,M.useState)(null),[R,z]=(0,M.useState)(0),[B,V]=(0,M.useState)(25),[H,U]=(0,M.useState)(0),[W,G]=(0,M.useState)(25),K=l?.pipelineList??[],q=l?.runs??[],J=l?.partialFailure??null,Y=async e=>{try{await n.executePipeline({id:e}),y()}catch(e){w(e?.message??`Failed to execute pipeline`)}},X=async()=>{let e=k;if(e)try{await n.deletePipeline({id:e}),L(null),await y()}catch(e){w(e?.message??`Failed to delete pipeline`)}},Z=K.find(e=>e.id===k),Q=q.slice(H*W,H*W+W),$=[{key:`pipeline`,header:`Pipeline`,render:e=>{let t=K.find(t=>t.id===e.pipelineId);return(0,N.jsx)(_,{"aria-expanded":a===e.id,onClick:()=>s(a===e.id?null:e.id),sx:{fontWeight:600,fontSize:`0.8125rem`,textAlign:`left`},children:t?.name??e.pipelineId.slice(0,8)})}},{key:`status`,header:`Status`,render:e=>(0,N.jsx)(T,{label:e.status,size:`small`,color:P[e.status]??`default`,variant:`filled`,sx:{fontWeight:600}})},{key:`startedAt`,header:`Started`,render:e=>(0,N.jsx)(f,{variant:`caption`,sx:{color:`text.secondary`},children:A(e.startedAt)})},{key:`completedAt`,header:`Completed`,render:e=>(0,N.jsx)(f,{variant:`caption`,sx:{color:`text.secondary`},children:e.completedAt?A(e.completedAt):`--`})},{key:`triggeredBy`,header:`Triggered By`,render:e=>(0,N.jsx)(f,{variant:`caption`,sx:{color:`text.secondary`},children:e.triggeredBy})}],ee=K.slice(R*B,R*B+B);return(0,N.jsxs)(O,{spacing:3,children:[(0,N.jsx)(v,{open:k!==null,onClose:()=>L(null),onConfirm:X,title:`Delete pipeline?`,content:(0,N.jsxs)(N.Fragment,{children:[(0,N.jsx)(`b`,{children:Z?.name??k}),` and its run history will be removed.`]}),confirmLabel:`Delete`,confirmColor:`error`}),(0,N.jsx)(p,{links:[{name:`Pipelines`}],action:(0,N.jsxs)(O,{direction:`row`,spacing:1,children:[(0,N.jsx)(i,{size:`small`,onClick:y,title:`Refresh`,children:(0,N.jsx)(c,{})}),(0,N.jsx)(D,{variant:`contained`,size:`small`,startIcon:(0,N.jsx)(o,{}),onClick:()=>t(!0),children:`New Pipeline`})]})}),(m||C||J)&&(0,N.jsx)(E,{closable:!0,severity:`warning`,variant:`outlined`,onClose:()=>w(null),children:C??m??`Some data is unavailable: ${J}`}),(0,N.jsxs)(x,{variant:`outlined`,children:[(0,N.jsx)(S,{slotProps:{title:{variant:`subtitle1`,fontWeight:600}},title:`Pipeline Definitions`,avatar:(0,N.jsx)(r,{})}),(0,N.jsx)(g,{columns:[{key:`name`,header:`Name`,render:e=>(0,N.jsx)(f,{variant:`body2`,sx:{fontWeight:600},children:e.name})},{key:`description`,header:`Description`,render:e=>(0,N.jsx)(f,{variant:`caption`,sx:{color:`text.secondary`},children:e.description??`--`})},{key:`steps`,header:`Steps`,render:e=>e.steps.length},{key:`triggers`,header:`Triggers`,render:e=>e.triggers.length},{key:`createdAt`,header:`Created`,render:e=>(0,N.jsx)(f,{variant:`caption`,sx:{color:`text.secondary`},children:A(e.createdAt)})},{key:`actions`,header:`Actions`,align:`right`,render:e=>(0,N.jsxs)(O,{direction:`row`,spacing:.5,sx:{justifyContent:`flex-end`},children:[(0,N.jsx)(i,{size:`small`,color:`error`,onClick:()=>L(e.id),title:`Delete`,children:(0,N.jsx)(d,{})}),(0,N.jsx)(i,{size:`small`,onClick:()=>Y(e.id),title:`Run`,children:(0,N.jsx)(h,{})})]})}],data:ee,total:K.length,loading:u,loadError:m??J??null,emptyMessage:`No pipelines defined`,rowKey:e=>e.id,page:R,pageSize:B,onPageChange:z,onPageSizeChange:e=>{V(e),z(0)},dense:!0})]}),(0,N.jsxs)(x,{variant:`outlined`,children:[(0,N.jsx)(S,{slotProps:{title:{variant:`subtitle1`,fontWeight:600}},title:`Run History`}),(0,N.jsx)(g,{columns:$,data:Q,total:q.length,loading:u,loadError:m??J??null,emptyMessage:`No pipeline runs yet`,rowKey:e=>e.id,renderExpanded:e=>a===e.id?(0,N.jsx)(I,{run:e}):null,page:H,pageSize:W,onPageChange:U,onPageSizeChange:e=>{G(e),U(0)},dense:!0})]}),(0,N.jsx)(F,{open:e,onClose:()=>t(!1),onCreated:y})]})}export{L as default};
@@ -1 +0,0 @@
1
- import{r as e}from"./rolldown-runtime-hePW80VL.js";import{t}from"./react-CwJFpaho.js";import{t as n}from"./Grid-BZ7xhoHQ.js";import{Bt as r,Dn as i,Et as a,M as o,N as s,Nt as c,Ot as l,P as u,Qn as d,Qt as f,R as p,St as m,Wn as h,Zt as g,_n as _,_t as v,an as y,ct as b,en as x,in as S,nn as C,nr as w,on as T,rt as E,sn as D,tn as O,tr as k,vn as A,vt as j,wt as M,y as N,yn as P,zt as F}from"./index-DiZbrwxT.js";import{c as I}from"./formatters-BqjL73N3.js";var L=e(t(),1),R=d();function z({project:e,onEdit:t,onRemove:n,onOpen:o}){let c=e.runningStacks>0;return(0,R.jsxs)(T,{sx:{height:`100%`,display:`flex`,flexDirection:`column`,cursor:`pointer`,transition:`border-color 0.2s, box-shadow 0.2s`,"&:hover":{borderColor:e=>h(e.palette.primary.main,.3),boxShadow:e=>e.shadows[8]}},variant:`outlined`,onClick:()=>o(e.name),children:[(0,R.jsxs)(S,{sx:{flex:1,pb:`12px !important`},children:[(0,R.jsxs)(F,{direction:`row`,sx:{alignItems:`flex-start`,justifyContent:`space-between`,mb:1.5},children:[(0,R.jsxs)(F,{direction:`row`,spacing:1,sx:{alignItems:`center`,minWidth:0},children:[(0,R.jsx)(s,{sx:{fontSize:28,color:c?`primary.main`:`text.secondary`,flexShrink:0}}),(0,R.jsxs)(D,{sx:{minWidth:0},children:[(0,R.jsx)(_,{variant:`subtitle2`,noWrap:!0,sx:{fontWeight:700},children:e.displayName}),(0,R.jsx)(_,{variant:`caption`,noWrap:!0,sx:{color:`text.disabled`},children:e.name})]})]}),(0,R.jsx)(a,{color:c?`success`:`default`,sx:{flexShrink:0},children:c?`${e.runningStacks} live`:`idle`})]}),(0,R.jsx)(g,{sx:{mb:1.5}}),(0,R.jsx)(B,{label:`Path`,value:e.path,mono:!0}),(0,R.jsxs)(F,{spacing:.5,sx:{mt:1},children:[(0,R.jsx)(B,{label:`Stacks`,value:`${e.runningStacks} / ${e.totalStacks}`}),e.enabledStacks.length>0&&(0,R.jsx)(B,{label:`Enabled`,value:e.enabledStacks.join(`, `)}),(0,R.jsx)(B,{label:`Registered`,value:I(e.registeredAt)})]}),e.enabledStacks.length>0&&(0,R.jsx)(F,{direction:`row`,spacing:.5,useFlexGap:!0,sx:{mt:1.5,flexWrap:`wrap`},children:e.enabledStacks.map(e=>(0,R.jsx)(A,{label:e,size:`small`,variant:`outlined`,sx:{height:22,fontSize:11}},e))})]}),(0,R.jsxs)(y,{sx:{px:2,pb:1.5,justifyContent:`space-between`},onClick:e=>e.stopPropagation(),children:[(0,R.jsx)(r,{title:`Remove project`,children:(0,R.jsx)(i,{size:`small`,color:`error`,onClick:()=>n(e.name),disabled:c,children:(0,R.jsx)(N,{sx:{fontSize:18}})})}),(0,R.jsx)(r,{title:`Settings`,children:(0,R.jsx)(i,{size:`small`,onClick:()=>t(e),children:(0,R.jsx)(p,{sx:{fontSize:18}})})})]})]})}function B({label:e,value:t,mono:n}){return(0,R.jsxs)(F,{direction:`row`,spacing:1,sx:{justifyContent:`space-between`,alignItems:`center`},children:[(0,R.jsx)(_,{variant:`caption`,sx:{color:`text.disabled`,flexShrink:0},children:e}),(0,R.jsx)(_,{variant:`caption`,noWrap:!0,title:t,sx:{fontWeight:500,textAlign:`right`,minWidth:0,...n&&{fontFamily:`monospace`,fontSize:11}},children:t})]})}function V({open:e,onClose:t,project:n,onSave:r,loading:i}){let[a,o]=(0,L.useState)(``);if((0,L.useEffect)(()=>{e&&n&&o(n.path)},[e,n]),!n)return null;let s=a.trim()!==n.path,l=a.trim().length>0&&s;return(0,R.jsxs)(C,{open:e,onClose:t,maxWidth:`sm`,fullWidth:!0,children:[(0,R.jsxs)(f,{children:[`Project Settings — `,n.displayName]}),(0,R.jsx)(x,{sx:{pt:`8px !important`},children:(0,R.jsxs)(F,{spacing:2.5,sx:{mt:1},children:[(0,R.jsx)(c,{label:`Project Name`,value:n.displayName,disabled:!0,fullWidth:!0,helperText:`Derived from omnitron.config.ts — change it there to rename.`}),(0,R.jsx)(c,{label:`Registry Name`,value:n.name,disabled:!0,fullWidth:!0,size:`small`}),(0,R.jsx)(c,{label:`Project Path`,value:a,onChange:e=>o(e.target.value),fullWidth:!0,placeholder:`/absolute/path/to/project`,helperText:`Absolute path to the monorepo root containing omnitron.config.ts`,slotProps:{input:{sx:{fontFamily:`monospace`,fontSize:14}}}}),(0,R.jsx)(c,{label:`Registered`,value:new Date(n.registeredAt).toLocaleString(),disabled:!0,fullWidth:!0,size:`small`})]})}),(0,R.jsxs)(O,{sx:{px:3,pb:2},children:[(0,R.jsx)(P,{onClick:t,color:`inherit`,children:`Cancel`}),(0,R.jsx)(P,{variant:`contained`,onClick:()=>r(n.name,{path:a.trim()}),disabled:!l||i,children:`Save`})]})]})}function H({open:e,onClose:t,onAdd:n,loading:r}){let[i,a]=(0,L.useState)(``),[o,s]=(0,L.useState)(``);(0,L.useEffect)(()=>{e&&(a(``),s(``))},[e]);let l=i.trim().length>0&&o.trim().length>0;return(0,R.jsxs)(C,{open:e,onClose:t,maxWidth:`sm`,fullWidth:!0,children:[(0,R.jsx)(f,{children:`Add Project`}),(0,R.jsx)(x,{sx:{pt:`8px !important`},children:(0,R.jsxs)(F,{spacing:2.5,sx:{mt:1},children:[(0,R.jsx)(c,{label:`Project Name`,value:i,onChange:e=>a(e.target.value),fullWidth:!0,autoFocus:!0,placeholder:`my-project`,helperText:`Unique identifier for the project registry`}),(0,R.jsx)(c,{label:`Project Path`,value:o,onChange:e=>s(e.target.value),fullWidth:!0,placeholder:`/absolute/path/to/project`,helperText:`Absolute path to the monorepo root containing omnitron.config.ts`,slotProps:{input:{sx:{fontFamily:`monospace`,fontSize:14}}}})]})}),(0,R.jsxs)(O,{sx:{px:3,pb:2},children:[(0,R.jsx)(P,{onClick:t,color:`inherit`,children:`Cancel`}),(0,R.jsx)(P,{variant:`contained`,onClick:()=>n(i.trim(),o.trim()),disabled:!l||r,children:`Add Project`})]})]})}function U(){let e=b(e=>e.projects),t=b(e=>e.loading),r=b(e=>e.error),i=b(e=>e.clearError),a=b(e=>e.fetchProjects),s=b(e=>e.addProject),c=b(e=>e.updateProject),d=b(e=>e.removeProject),p=b(e=>e.selectProject),h=w(),{pathname:g}=k(),y=M(),[S,T]=(0,L.useState)(null),[A,N]=(0,L.useState)(!1),[I,B]=(0,L.useState)(null),[U,W]=(0,L.useState)(!1);E(()=>void a(),{intervalMs:15e3});let G=(0,L.useCallback)(e=>{let t=p(e,g);h(t)},[p,h,g]),K=(0,L.useCallback)(async(e,t)=>{W(!0);try{await s(e,t),N(!1),y.success(`Project "${e}" added`)}catch(e){y.error(e?.message??`Failed to add project`)}finally{W(!1)}},[s,y]),q=(0,L.useCallback)(async(e,t)=>{W(!0);try{await c(e,t),T(null),y.success(`Project "${e}" updated`)}catch(e){y.error(e?.message??`Failed to update project`)}finally{W(!1)}},[c,y]),J=(0,L.useCallback)(async()=>{if(I){W(!0);try{await d(I),y.success(`Project "${I}" removed`)}catch(e){y.error(e?.message??`Failed to remove project`)}finally{B(null),W(!1)}}},[I,d,y]),Y=e.find(e=>e.name===I);return(0,R.jsxs)(F,{spacing:3,children:[(0,R.jsx)(v,{links:[{name:`Projects`}],action:(0,R.jsxs)(F,{direction:`row`,spacing:1,children:[(0,R.jsx)(P,{variant:`outlined`,size:`small`,startIcon:(0,R.jsx)(u,{sx:{fontSize:18}}),onClick:()=>a(),children:`Refresh`}),(0,R.jsx)(P,{variant:`contained`,size:`small`,startIcon:(0,R.jsx)(o,{sx:{fontSize:18}}),onClick:()=>N(!0),children:`Add Project`})]})}),r&&(0,R.jsx)(j,{closable:!0,severity:`error`,onClose:i,children:r}),t&&e.length===0?(0,R.jsx)(n,{container:!0,spacing:3,children:[1,2,3].map(e=>(0,R.jsx)(n,{size:{xs:12,sm:6,md:4},children:(0,R.jsx)(m,{variant:`rounded`,height:260})},e))}):e.length===0?(0,R.jsx)(D,{sx:{flex:1,display:`flex`,alignItems:`center`,justifyContent:`center`,minHeight:300},children:(0,R.jsx)(l,{title:`No projects`,description:`Register your first project to get started. A project is a monorepo with omnitron.config.ts at the root.`})}):(0,R.jsx)(n,{container:!0,spacing:3,children:e.map(e=>(0,R.jsx)(n,{size:{xs:12,sm:6,md:4},children:(0,R.jsx)(z,{project:e,onEdit:T,onRemove:B,onOpen:G})},e.name))}),(0,R.jsx)(V,{open:!!S,onClose:()=>T(null),project:S,onSave:q,loading:U}),(0,R.jsx)(H,{open:A,onClose:()=>N(!1),onAdd:K,loading:U}),(0,R.jsxs)(C,{open:!!I,onClose:()=>B(null),maxWidth:`xs`,fullWidth:!0,children:[(0,R.jsx)(f,{children:`Remove Project`}),(0,R.jsxs)(x,{children:[(0,R.jsxs)(_,{variant:`body2`,children:[`Remove `,(0,R.jsx)(`strong`,{children:Y?.displayName??I}),` from the registry? This does not delete any files on disk.`]}),Y&&Y.runningStacks>0&&(0,R.jsxs)(j,{severity:`warning`,sx:{mt:2},children:[`This project has `,Y.runningStacks,` running stack(s). Stop them first.`]})]}),(0,R.jsxs)(O,{children:[(0,R.jsx)(P,{onClick:()=>B(null),color:`inherit`,children:`Cancel`}),(0,R.jsx)(P,{onClick:J,color:`error`,variant:`contained`,disabled:U||(Y?.runningStacks??0)>0,children:`Remove`})]})]})]})}export{U as default};
@@ -1 +0,0 @@
1
- import{t as e}from"./rolldown-runtime-hePW80VL.js";var t=e((e=>{var t=Symbol.for(`react.transitional.element`),n=Symbol.for(`react.portal`),r=Symbol.for(`react.fragment`),i=Symbol.for(`react.strict_mode`),a=Symbol.for(`react.profiler`),o=Symbol.for(`react.consumer`),s=Symbol.for(`react.context`),c=Symbol.for(`react.forward_ref`),l=Symbol.for(`react.suspense`),u=Symbol.for(`react.memo`),d=Symbol.for(`react.lazy`),f=Symbol.for(`react.activity`),p=Symbol.iterator;function m(e){return typeof e!=`object`||!e?null:(e=p&&e[p]||e[`@@iterator`],typeof e==`function`?e:null)}var h={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},g=Object.assign,_={};function v(e,t,n){this.props=e,this.context=t,this.refs=_,this.updater=n||h}v.prototype.isReactComponent={},v.prototype.setState=function(e,t){if(typeof e!=`object`&&typeof e!=`function`&&e!=null)throw Error(`takes an object of state variables to update or a function which returns an object of state variables.`);this.updater.enqueueSetState(this,e,t,`setState`)},v.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,`forceUpdate`)};function y(){}y.prototype=v.prototype;function b(e,t,n){this.props=e,this.context=t,this.refs=_,this.updater=n||h}var x=b.prototype=new y;x.constructor=b,g(x,v.prototype),x.isPureReactComponent=!0;var S=Array.isArray;function C(){}var w={H:null,A:null,T:null,S:null},T=Object.prototype.hasOwnProperty;function E(e,n,r){var i=r.ref;return{$$typeof:t,type:e,key:n,ref:i===void 0?null:i,props:r}}function D(e,t){return E(e.type,t,e.props)}function O(e){return typeof e==`object`&&!!e&&e.$$typeof===t}function k(e){var t={"=":`=0`,":":`=2`};return`$`+e.replace(/[=:]/g,function(e){return t[e]})}var A=/\/+/g;function j(e,t){return typeof e==`object`&&e&&e.key!=null?k(``+e.key):t.toString(36)}function M(e){switch(e.status){case`fulfilled`:return e.value;case`rejected`:throw e.reason;default:switch(typeof e.status==`string`?e.then(C,C):(e.status=`pending`,e.then(function(t){e.status===`pending`&&(e.status=`fulfilled`,e.value=t)},function(t){e.status===`pending`&&(e.status=`rejected`,e.reason=t)})),e.status){case`fulfilled`:return e.value;case`rejected`:throw e.reason}}throw e}function N(e,r,i,a,o){var s=typeof e;(s===`undefined`||s===`boolean`)&&(e=null);var c=!1;if(e===null)c=!0;else switch(s){case`bigint`:case`string`:case`number`:c=!0;break;case`object`:switch(e.$$typeof){case t:case n:c=!0;break;case d:return c=e._init,N(c(e._payload),r,i,a,o)}}if(c)return o=o(e),c=a===``?`.`+j(e,0):a,S(o)?(i=``,c!=null&&(i=c.replace(A,`$&/`)+`/`),N(o,r,i,``,function(e){return e})):o!=null&&(O(o)&&(o=D(o,i+(o.key==null||e&&e.key===o.key?``:(``+o.key).replace(A,`$&/`)+`/`)+c)),r.push(o)),1;c=0;var l=a===``?`.`:a+`:`;if(S(e))for(var u=0;u<e.length;u++)a=e[u],s=l+j(a,u),c+=N(a,r,i,s,o);else if(u=m(e),typeof u==`function`)for(e=u.call(e),u=0;!(a=e.next()).done;)a=a.value,s=l+j(a,u++),c+=N(a,r,i,s,o);else if(s===`object`){if(typeof e.then==`function`)return N(M(e),r,i,a,o);throw r=String(e),Error(`Objects are not valid as a React child (found: `+(r===`[object Object]`?`object with keys {`+Object.keys(e).join(`, `)+`}`:r)+`). If you meant to render a collection of children, use an array instead.`)}return c}function P(e,t,n){if(e==null)return e;var r=[],i=0;return N(e,r,``,``,function(e){return t.call(n,e,i++)}),r}function F(e){if(e._status===-1){var t=e._result;t=t(),t.then(function(t){(e._status===0||e._status===-1)&&(e._status=1,e._result=t)},function(t){(e._status===0||e._status===-1)&&(e._status=2,e._result=t)}),e._status===-1&&(e._status=0,e._result=t)}if(e._status===1)return e._result.default;throw e._result}var I=typeof reportError==`function`?reportError:function(e){if(typeof window==`object`&&typeof window.ErrorEvent==`function`){var t=new window.ErrorEvent(`error`,{bubbles:!0,cancelable:!0,message:typeof e==`object`&&e&&typeof e.message==`string`?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if(typeof process==`object`&&typeof process.emit==`function`){process.emit(`uncaughtException`,e);return}console.error(e)},L={map:P,forEach:function(e,t,n){P(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return P(e,function(){t++}),t},toArray:function(e){return P(e,function(e){return e})||[]},only:function(e){if(!O(e))throw Error(`React.Children.only expected to receive a single React element child.`);return e}};e.Activity=f,e.Children=L,e.Component=v,e.Fragment=r,e.Profiler=a,e.PureComponent=b,e.StrictMode=i,e.Suspense=l,e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=w,e.__COMPILER_RUNTIME={__proto__:null,c:function(e){return w.H.useMemoCache(e)}},e.cache=function(e){return function(){return e.apply(null,arguments)}},e.cacheSignal=function(){return null},e.cloneElement=function(e,t,n){if(e==null)throw Error(`The argument must be a React element, but you passed `+e+`.`);var r=g({},e.props),i=e.key;if(t!=null)for(a in t.key!==void 0&&(i=``+t.key),t)!T.call(t,a)||a===`key`||a===`__self`||a===`__source`||a===`ref`&&t.ref===void 0||(r[a]=t[a]);var a=arguments.length-2;if(a===1)r.children=n;else if(1<a){for(var o=Array(a),s=0;s<a;s++)o[s]=arguments[s+2];r.children=o}return E(e.type,i,r)},e.createContext=function(e){return e={$$typeof:s,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null},e.Provider=e,e.Consumer={$$typeof:o,_context:e},e},e.createElement=function(e,t,n){var r,i={},a=null;if(t!=null)for(r in t.key!==void 0&&(a=``+t.key),t)T.call(t,r)&&r!==`key`&&r!==`__self`&&r!==`__source`&&(i[r]=t[r]);var o=arguments.length-2;if(o===1)i.children=n;else if(1<o){for(var s=Array(o),c=0;c<o;c++)s[c]=arguments[c+2];i.children=s}if(e&&e.defaultProps)for(r in o=e.defaultProps,o)i[r]===void 0&&(i[r]=o[r]);return E(e,a,i)},e.createRef=function(){return{current:null}},e.forwardRef=function(e){return{$$typeof:c,render:e}},e.isValidElement=O,e.lazy=function(e){return{$$typeof:d,_payload:{_status:-1,_result:e},_init:F}},e.memo=function(e,t){return{$$typeof:u,type:e,compare:t===void 0?null:t}},e.startTransition=function(e){var t=w.T,n={};w.T=n;try{var r=e(),i=w.S;i!==null&&i(n,r),typeof r==`object`&&r&&typeof r.then==`function`&&r.then(C,I)}catch(e){I(e)}finally{t!==null&&n.types!==null&&(t.types=n.types),w.T=t}},e.unstable_useCacheRefresh=function(){return w.H.useCacheRefresh()},e.use=function(e){return w.H.use(e)},e.useActionState=function(e,t,n){return w.H.useActionState(e,t,n)},e.useCallback=function(e,t){return w.H.useCallback(e,t)},e.useContext=function(e){return w.H.useContext(e)},e.useDebugValue=function(){},e.useDeferredValue=function(e,t){return w.H.useDeferredValue(e,t)},e.useEffect=function(e,t){return w.H.useEffect(e,t)},e.useEffectEvent=function(e){return w.H.useEffectEvent(e)},e.useId=function(){return w.H.useId()},e.useImperativeHandle=function(e,t,n){return w.H.useImperativeHandle(e,t,n)},e.useInsertionEffect=function(e,t){return w.H.useInsertionEffect(e,t)},e.useLayoutEffect=function(e,t){return w.H.useLayoutEffect(e,t)},e.useMemo=function(e,t){return w.H.useMemo(e,t)},e.useOptimistic=function(e,t){return w.H.useOptimistic(e,t)},e.useReducer=function(e,t,n){return w.H.useReducer(e,t,n)},e.useRef=function(e){return w.H.useRef(e)},e.useState=function(e){return w.H.useState(e)},e.useSyncExternalStore=function(e,t,n){return w.H.useSyncExternalStore(e,t,n)},e.useTransition=function(){return w.H.useTransition()},e.version=`19.2.8`})),n=e(((e,n)=>{n.exports=t()}));export{n as t};