@lunora/studio 1.0.0-alpha.59 → 1.0.0-alpha.60

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 (381) hide show
  1. package/dist/index.d.ts +1 -1
  2. package/dist/index.js +1 -43
  3. package/dist/mount.js +1 -27
  4. package/dist/packem_chunks/ApiTab.js +1 -251
  5. package/dist/packem_chunks/AuditPanel.js +1 -200
  6. package/dist/packem_chunks/DeploymentHealthPanel.js +1 -664
  7. package/dist/packem_chunks/ExportImportPanel.js +3 -198
  8. package/dist/packem_chunks/FileBrowser.js +4 -2955
  9. package/dist/packem_chunks/FunctionRunner.js +1 -326
  10. package/dist/packem_chunks/FunctionStatsPanel.js +1 -377
  11. package/dist/packem_chunks/HealthPanel.js +1 -648
  12. package/dist/packem_chunks/InsightsPanel.js +1 -462
  13. package/dist/packem_chunks/LogsPanel.js +1 -1303
  14. package/dist/packem_chunks/MailPanel.js +2 -353
  15. package/dist/packem_chunks/MetricsPanel.js +1 -1960
  16. package/dist/packem_chunks/MigrationsPanel.js +1 -239
  17. package/dist/packem_chunks/NotificationsPanel.js +1 -306
  18. package/dist/packem_chunks/PitrPanel.js +1 -252
  19. package/dist/packem_chunks/SchemaViewer.js +1 -2512
  20. package/dist/packem_chunks/SecurityAdvisorPanel.js +1 -95
  21. package/dist/packem_chunks/SettingsPanel.js +1 -391
  22. package/dist/packem_chunks/SqlEditorPanel.js +4 -2340
  23. package/dist/packem_chunks/TableEditor.js +1 -290
  24. package/dist/packem_chunks/agents-panel.js +1 -326
  25. package/dist/packem_chunks/analytics-panel.js +1 -261
  26. package/dist/packem_chunks/auth-audit-panel.js +1 -247
  27. package/dist/packem_chunks/auth-config-panel.js +1 -365
  28. package/dist/packem_chunks/auth-sessions-panel.js +1 -175
  29. package/dist/packem_chunks/containers-panel.js +1 -261
  30. package/dist/packem_chunks/dashboards-panel.js +1 -781
  31. package/dist/packem_chunks/fanout-panel.js +1 -482
  32. package/dist/packem_chunks/flags-panel.js +1 -176
  33. package/dist/packem_chunks/issues-panel.js +1 -427
  34. package/dist/packem_chunks/kv-browser.js +1 -1896
  35. package/dist/packem_chunks/log-drains-panel.js +4 -273
  36. package/dist/packem_chunks/organizations-panel.js +1 -3209
  37. package/dist/packem_chunks/payments-panel.js +1 -213
  38. package/dist/packem_chunks/permissions-panel.js +1 -805
  39. package/dist/packem_chunks/queues-panel.js +1 -1075
  40. package/dist/packem_chunks/rls-panel.js +1 -315
  41. package/dist/packem_chunks/schedule-panel.js +1 -831
  42. package/dist/packem_chunks/sparkline.js +1 -79
  43. package/dist/packem_chunks/storage-rules-panel.js +1 -140
  44. package/dist/packem_chunks/subscriptions-panel.js +1 -238
  45. package/dist/packem_chunks/sync-client-panel.js +1 -0
  46. package/dist/packem_chunks/traces-panel.js +1 -747
  47. package/dist/packem_chunks/users-panel.js +1 -1731
  48. package/dist/packem_chunks/vector-browser.js +1 -281
  49. package/dist/packem_chunks/workflows-panel.js +1 -562
  50. package/dist/packem_shared/ADMIN_FUNCTIONS-BYNSbBVE.js +1 -0
  51. package/dist/packem_shared/ApiDocsPanel-eJYZlylw.js +2 -0
  52. package/dist/packem_shared/ApiReferencePanel-C42v1jr6.js +1 -0
  53. package/dist/packem_shared/CommandPalette-CVIaY3j8.js +1 -0
  54. package/dist/packem_shared/ConfirmButton-CTL3f3kr.js +1 -0
  55. package/dist/packem_shared/ConnectionBadge-DOk0CQWo.js +1 -0
  56. package/dist/packem_shared/DEFAULT_AUTO_REFRESH_MS-BCC8_4BQ.js +1 -0
  57. package/dist/packem_shared/DEFAULT_INSIGHT_THRESHOLDS-B-hcFVoi.js +1 -0
  58. package/dist/packem_shared/DEFAULT_LOCALE-BZ4NojpD.js +1 -0
  59. package/dist/packem_shared/DataBrowser-B8J5lHjP.js +1 -0
  60. package/dist/packem_shared/DataFilters-Csb30F0C.js +1 -0
  61. package/dist/packem_shared/ErrorBoundary-DvzYskH7.js +1 -0
  62. package/dist/packem_shared/GlobalDataBrowser-RLJ6NvOs.js +1 -0
  63. package/dist/packem_shared/HomePanel-DL1HupAN.js +1 -0
  64. package/dist/packem_shared/OpenRpcReferencePanel-sGsIgYWj.js +1 -0
  65. package/dist/packem_shared/STUDIO_ROOT_CLASS-C6MccdVk.js +1 -0
  66. package/dist/packem_shared/ScheduledJobs-DUbo6epc.js +1 -0
  67. package/dist/packem_shared/ShardInput-BVn2iCU0.js +1 -0
  68. package/dist/packem_shared/Studio-BWBclm_C.js +1 -0
  69. package/dist/packem_shared/StudioApp-BFm73yVr.js +1 -0
  70. package/dist/packem_shared/StudioI18nProvider-CZ5h4nrV.js +1 -0
  71. package/dist/packem_shared/advisor-view-DaCX9Jy5.js +1 -0
  72. package/dist/packem_shared/aggregateMetrics-BNfajLa2.js +1 -0
  73. package/dist/packem_shared/alert-CVcOFuDR.js +1 -0
  74. package/dist/packem_shared/badge-BbuuAio7.js +1 -0
  75. package/dist/packem_shared/bar-chart-AryFCeoa.js +9 -0
  76. package/dist/packem_shared/browser-storage-xjTyMKY0.js +1 -0
  77. package/dist/packem_shared/button-BkCrNcAs.js +1 -0
  78. package/dist/packem_shared/card-CIDGUN6K.js +1 -0
  79. package/dist/packem_shared/cf-links-gbDy51nR.js +1 -0
  80. package/dist/packem_shared/checkbox-StT4Gob6.js +1 -0
  81. package/dist/packem_shared/data-grid-BMBKzMEJ.js +1 -0
  82. package/dist/packem_shared/data-view-params-C8T3bW1z.js +1 -0
  83. package/dist/packem_shared/dropdown-menu-C3RQ_HlW.js +2 -0
  84. package/dist/packem_shared/empty-state-Cg7t_8qu.js +1 -0
  85. package/dist/packem_shared/error-alert-B59DnrDI.js +1 -0
  86. package/dist/packem_shared/grid-features-uZCUj955.js +6 -0
  87. package/dist/packem_shared/home-panel-B-8BCffw.js +3 -0
  88. package/dist/packem_shared/input-JHu63lTv.js +1 -0
  89. package/dist/packem_shared/internal-AtZ4bTal.js +2 -0
  90. package/dist/packem_shared/label-6uP1obNF.js +1 -0
  91. package/dist/packem_shared/live-status-CGW2JHf_.js +1 -0
  92. package/dist/packem_shared/log-fields-CoL3hsIQ.js +1 -0
  93. package/dist/packem_shared/modal-shell-CUwwWC2o.js +1 -0
  94. package/dist/packem_shared/reference-view-KvhektwF.js +12 -0
  95. package/dist/packem_shared/result-chart-CwKhhKM0.js +1 -0
  96. package/dist/packem_shared/scroll-area-DTEq6Jec.js +2 -0
  97. package/dist/packem_shared/select-Bul-DeII.js +2 -0
  98. package/dist/packem_shared/shard-history-DMEW5VBE.js +1 -0
  99. package/dist/packem_shared/skeleton-C1wQ9M5t.js +1 -0
  100. package/dist/packem_shared/sparkline-DtcZoU48.js +1 -0
  101. package/dist/packem_shared/storage-tier-DznqOf-q.js +1 -0
  102. package/dist/packem_shared/studio-BHA7hnI3.js +2 -0
  103. package/dist/packem_shared/table-DdJBrClo.js +2 -0
  104. package/dist/packem_shared/table-list-sidebar-CMCcNALK.js +1 -0
  105. package/dist/packem_shared/textarea-Bu2-jKAs.js +1 -0
  106. package/dist/packem_shared/trace-handoff-Dw7mwjxu.js +1 -0
  107. package/dist/packem_shared/use-admin-query-Di3fLE8H.js +1 -0
  108. package/dist/packem_shared/use-async-submit-H68GHPz8.js +1 -0
  109. package/dist/packem_shared/useDebounced-Ihdiid_k.js +1 -0
  110. package/dist/packem_shared/utils-bhneXptQ.js +1 -0
  111. package/dist/packem_shared/virtual-rect-1o1veP7R.js +1 -0
  112. package/dist/standalone/chunk-23HKRH5H.js +13 -0
  113. package/dist/standalone/chunk-2A4RKII2.js +1 -0
  114. package/dist/standalone/chunk-3DTM4GI5.js +1 -0
  115. package/dist/standalone/chunk-3MHKT76P.js +1 -0
  116. package/dist/standalone/chunk-46IB4C4Q.js +1 -0
  117. package/dist/standalone/chunk-4AYEV5UN.js +1 -0
  118. package/dist/standalone/chunk-4FNHHFWR.js +1 -0
  119. package/dist/standalone/chunk-6CLVIOCB.js +1 -0
  120. package/dist/standalone/chunk-6I62RSI5.js +1 -0
  121. package/dist/standalone/chunk-6OKDCV7J.js +1 -0
  122. package/dist/standalone/chunk-6P7HIPUE.js +1 -0
  123. package/dist/standalone/chunk-6UYILUSX.js +1 -0
  124. package/dist/standalone/chunk-725RLB7D.js +1 -0
  125. package/dist/standalone/chunk-7AZZ7OJO.js +1 -0
  126. package/dist/standalone/chunk-7CRLAMGB.js +1 -0
  127. package/dist/standalone/chunk-7Z5QEFR4.js +2 -0
  128. package/dist/standalone/chunk-AGVJJQFL.js +1 -0
  129. package/dist/standalone/chunk-AKTGRZXN.js +1 -0
  130. package/dist/standalone/chunk-BAIN7UJ4.js +1 -0
  131. package/dist/standalone/chunk-BHWSIIDT.js +1 -0
  132. package/dist/standalone/{chunk-L7SK4ZZD.js → chunk-C4O5UR4Y.js} +1 -1
  133. package/dist/standalone/chunk-C4VURT57.js +1 -0
  134. package/dist/standalone/chunk-CKO3F55C.js +4 -0
  135. package/dist/standalone/chunk-CVMRZUF5.js +4 -0
  136. package/dist/standalone/chunk-CWWGDW4V.js +1 -0
  137. package/dist/standalone/chunk-CYET4BRZ.js +1 -0
  138. package/dist/standalone/chunk-CZEUVNCQ.js +1 -0
  139. package/dist/standalone/chunk-FXFK4M4E.js +1 -0
  140. package/dist/standalone/chunk-FYAJPWE7.js +1 -0
  141. package/dist/standalone/chunk-GS7OBQO5.js +1 -0
  142. package/dist/standalone/chunk-GTXVH7I5.js +1 -0
  143. package/dist/standalone/chunk-H6SIM4BT.js +1 -0
  144. package/dist/standalone/chunk-H6WOFY6A.js +8 -0
  145. package/dist/standalone/chunk-HA34GYEX.js +1 -0
  146. package/dist/standalone/chunk-HMIOF5GV.js +1 -0
  147. package/dist/standalone/chunk-HY46NTNW.js +6 -0
  148. package/dist/standalone/chunk-IBCKC2BO.js +1 -0
  149. package/dist/standalone/chunk-ICKBVXPP.js +1 -0
  150. package/dist/standalone/chunk-IE4ROTQD.js +1 -0
  151. package/dist/standalone/chunk-IYYTWZ2E.js +2 -0
  152. package/dist/standalone/chunk-J2LMP2A7.js +1 -0
  153. package/dist/standalone/chunk-JC6WYIHM.js +1 -0
  154. package/dist/standalone/chunk-JKPK25JO.js +1 -0
  155. package/dist/standalone/chunk-JLFCXBNQ.js +1 -0
  156. package/dist/standalone/chunk-JRWBGR5B.js +1 -0
  157. package/dist/standalone/chunk-K5PFWU5J.js +1 -0
  158. package/dist/standalone/chunk-KJTLW5W2.js +11 -0
  159. package/dist/standalone/{chunk-HBGS4SEX.js → chunk-KLLYGWNF.js} +9 -9
  160. package/dist/standalone/chunk-KNN3ZEQ7.js +1 -0
  161. package/dist/standalone/{chunk-4QHKBC77.js → chunk-KOC5KV3E.js} +1 -1
  162. package/dist/standalone/chunk-KSRXMTBV.js +1 -0
  163. package/dist/standalone/chunk-KYCAYNXM.js +1 -0
  164. package/dist/standalone/chunk-KZ2YUNMR.js +1 -0
  165. package/dist/standalone/chunk-LKHUVEHX.js +1 -0
  166. package/dist/standalone/chunk-LPOKAJT4.js +4 -0
  167. package/dist/standalone/chunk-MZEK4SGD.js +1 -0
  168. package/dist/standalone/chunk-NCCUM26H.js +1 -0
  169. package/dist/standalone/chunk-O62HJZV3.js +1 -0
  170. package/dist/standalone/chunk-OTJOI23O.js +62 -0
  171. package/dist/standalone/chunk-P2NBOUGZ.js +1 -0
  172. package/dist/standalone/chunk-P4J6XNG3.js +1 -0
  173. package/dist/standalone/chunk-PGDWFWH5.js +1 -0
  174. package/dist/standalone/chunk-PR2SE2MD.js +1 -0
  175. package/dist/standalone/chunk-PTTDIYGP.js +1 -0
  176. package/dist/standalone/chunk-PWDMXMRD.js +1 -0
  177. package/dist/standalone/chunk-Q34MSC2F.js +1 -0
  178. package/dist/standalone/chunk-Q5WXTZWX.js +1 -0
  179. package/dist/standalone/chunk-QC5HCNJZ.js +4 -0
  180. package/dist/standalone/chunk-QJKRHZYV.js +1 -0
  181. package/dist/standalone/chunk-R43KHQDA.js +1 -0
  182. package/dist/standalone/chunk-RC2K5RBE.js +1 -0
  183. package/dist/standalone/chunk-RE6UWCMG.js +1 -0
  184. package/dist/standalone/chunk-RUP3M2GF.js +3 -0
  185. package/dist/standalone/chunk-SA6MBPBL.js +1 -0
  186. package/dist/standalone/{chunk-BJGBHGK3.js → chunk-SEDZDNQF.js} +1 -1
  187. package/dist/standalone/chunk-SKHEGARW.js +1 -0
  188. package/dist/standalone/chunk-SKJZDOHG.js +1 -0
  189. package/dist/standalone/chunk-SNDYNCAA.js +1 -0
  190. package/dist/standalone/chunk-SZUHZ2OG.js +1 -0
  191. package/dist/standalone/chunk-TAE2H7PU.js +1 -0
  192. package/dist/standalone/chunk-TEIBKU46.js +1 -0
  193. package/dist/standalone/chunk-TO6NLVFD.js +1 -0
  194. package/dist/standalone/chunk-TYTJDFX2.js +1 -0
  195. package/dist/standalone/{chunk-LXULVPEM.js → chunk-UDZY7MKE.js} +3 -3
  196. package/dist/standalone/chunk-UHHTEBC3.js +1 -0
  197. package/dist/standalone/chunk-UNDFOYRI.js +1 -0
  198. package/dist/standalone/chunk-UNN4CESU.js +1 -0
  199. package/dist/standalone/chunk-UNXX5GQH.js +1 -0
  200. package/dist/standalone/{chunk-ZHVTQ37P.js → chunk-UREY4GLG.js} +1 -1
  201. package/dist/standalone/chunk-UWF5DOGV.js +1 -0
  202. package/dist/standalone/chunk-UY2Y5CXB.js +1 -0
  203. package/dist/standalone/{chunk-VLXV72QE.js → chunk-UZYGEOWY.js} +1 -1
  204. package/dist/standalone/chunk-V66TSUKV.js +1 -0
  205. package/dist/standalone/chunk-VEFNSN7P.js +1 -0
  206. package/dist/standalone/chunk-VUJGR4PB.js +1 -0
  207. package/dist/standalone/chunk-VUXJER3D.js +1 -0
  208. package/dist/standalone/chunk-W572365D.js +1 -0
  209. package/dist/standalone/chunk-WYFLGXZ3.js +3 -0
  210. package/dist/standalone/chunk-XDKFPBIL.js +1 -0
  211. package/dist/standalone/chunk-XRKCGQM2.js +1 -0
  212. package/dist/standalone/chunk-YNBJ6ICE.js +1 -0
  213. package/dist/standalone/chunk-YQ5PILIJ.js +1 -0
  214. package/dist/standalone/chunk-YT7VXQVX.js +1 -0
  215. package/dist/standalone/chunk-Z7MUQMLE.js +1 -0
  216. package/dist/standalone/chunk-ZFWEPGWG.js +1 -0
  217. package/dist/standalone/chunk-ZMFZRGAN.js +1 -0
  218. package/dist/standalone/studio.js +9 -214
  219. package/package.json +4 -4
  220. package/dist/packem_shared/ADMIN_FUNCTIONS-P2UzJscH.js +0 -62
  221. package/dist/packem_shared/ApiDocsPanel-DNDpeR5O.js +0 -842
  222. package/dist/packem_shared/ApiReferencePanel-ChlRsAXU.js +0 -230
  223. package/dist/packem_shared/CommandPalette-BpkopP5f.js +0 -373
  224. package/dist/packem_shared/ConfirmButton-C2eVi2Qv.js +0 -59
  225. package/dist/packem_shared/ConnectionBadge-B2DDM2Tn.js +0 -111
  226. package/dist/packem_shared/DEFAULT_AUTO_REFRESH_MS-Vxwaxx51.js +0 -50
  227. package/dist/packem_shared/DEFAULT_INSIGHT_THRESHOLDS-DjF0h-gA.js +0 -89
  228. package/dist/packem_shared/DEFAULT_LOCALE-CiX4W7Kr.js +0 -27
  229. package/dist/packem_shared/DataBrowser-obTn4sKX.js +0 -4493
  230. package/dist/packem_shared/DataFilters-B1Q7mrt7.js +0 -253
  231. package/dist/packem_shared/ErrorBoundary-BzAApI7J.js +0 -66
  232. package/dist/packem_shared/GlobalDataBrowser-BCaohHZ5.js +0 -293
  233. package/dist/packem_shared/HomePanel-DCRj3hGB.js +0 -14
  234. package/dist/packem_shared/OpenRpcReferencePanel-CIeQE1aE.js +0 -192
  235. package/dist/packem_shared/STUDIO_ROOT_CLASS-D12gX2dV.js +0 -3
  236. package/dist/packem_shared/ScheduledJobs-BQzQo84k.js +0 -262
  237. package/dist/packem_shared/ShardInput-CZnpHILL.js +0 -107
  238. package/dist/packem_shared/Studio-DnlPCbID.js +0 -16
  239. package/dist/packem_shared/StudioApp-CzqlB4zO.js +0 -708
  240. package/dist/packem_shared/StudioI18nProvider-B-tDCZIi.js +0 -48
  241. package/dist/packem_shared/advisor-view-D95sN-wO.js +0 -159
  242. package/dist/packem_shared/aggregateMetrics-D4nUHEKU.js +0 -108
  243. package/dist/packem_shared/alert-CdAET2K_.js +0 -68
  244. package/dist/packem_shared/badge-B2PKA1-5.js +0 -49
  245. package/dist/packem_shared/bar-chart-DSwcWIRy.js +0 -3246
  246. package/dist/packem_shared/browser-storage-L4gOP5gJ.js +0 -105
  247. package/dist/packem_shared/button-BhsN2uZH.js +0 -49
  248. package/dist/packem_shared/card-F2vH_aj2.js +0 -175
  249. package/dist/packem_shared/cf-links-SIbyi4Y1.js +0 -8
  250. package/dist/packem_shared/checkbox-UNkzAxl-.js +0 -63
  251. package/dist/packem_shared/data-grid-BywzWfek.js +0 -183
  252. package/dist/packem_shared/data-view-params-Cd6yRVbv.js +0 -96
  253. package/dist/packem_shared/dropdown-menu-WY4B_eJO.js +0 -280
  254. package/dist/packem_shared/empty-state-DY_oe0k6.js +0 -98
  255. package/dist/packem_shared/error-alert-D9uIFJUS.js +0 -114
  256. package/dist/packem_shared/grid-features-ZOLhHKrR.js +0 -809
  257. package/dist/packem_shared/home-panel-BRAA2UlM.js +0 -1889
  258. package/dist/packem_shared/input-XH4r1Pt1.js +0 -53
  259. package/dist/packem_shared/internal-DzHCc2Rq.js +0 -131
  260. package/dist/packem_shared/label-D8ykjn5J.js +0 -46
  261. package/dist/packem_shared/live-status-FZ0psC1z.js +0 -44
  262. package/dist/packem_shared/log-fields-jEH83H2G.js +0 -18
  263. package/dist/packem_shared/modal-shell-hyaJvIJ6.js +0 -100
  264. package/dist/packem_shared/reference-view-DfXN7oWP.js +0 -2127
  265. package/dist/packem_shared/result-chart-Bf9mbCIo.js +0 -119
  266. package/dist/packem_shared/scroll-area-DLhcy-ml.js +0 -93
  267. package/dist/packem_shared/select-D9OwHEch.js +0 -273
  268. package/dist/packem_shared/shard-history-AxiJ1WPP.js +0 -16
  269. package/dist/packem_shared/skeleton-CGhL0p20.js +0 -45
  270. package/dist/packem_shared/sparkline-BnA1kC9X.js +0 -93
  271. package/dist/packem_shared/storage-tier-CL98eOvn.js +0 -85
  272. package/dist/packem_shared/studio-8QSXbZ98.js +0 -4192
  273. package/dist/packem_shared/table-DsCa9Qp9.js +0 -246
  274. package/dist/packem_shared/table-list-sidebar-gCE17v9B.js +0 -842
  275. package/dist/packem_shared/textarea-D3gaCU_-.js +0 -46
  276. package/dist/packem_shared/trace-handoff-CGolF3KS.js +0 -38
  277. package/dist/packem_shared/use-admin-query-C7JNuQp-.js +0 -106
  278. package/dist/packem_shared/use-async-submit-rnSk_jXl.js +0 -91
  279. package/dist/packem_shared/useDebounced-Dxncpg6z.js +0 -32
  280. package/dist/packem_shared/utils-B05Dmz_H.js +0 -8
  281. package/dist/packem_shared/virtual-rect-CVMUskSm.js +0 -10
  282. package/dist/standalone/chunk-2K47A3P6.js +0 -1
  283. package/dist/standalone/chunk-2MLA6WFH.js +0 -1
  284. package/dist/standalone/chunk-2NGUNNGW.js +0 -1
  285. package/dist/standalone/chunk-2TJVFKD2.js +0 -1
  286. package/dist/standalone/chunk-2YTF6LJ6.js +0 -1
  287. package/dist/standalone/chunk-3GXGLNKW.js +0 -1
  288. package/dist/standalone/chunk-3HGNPZBN.js +0 -1
  289. package/dist/standalone/chunk-3LJEGSMK.js +0 -11
  290. package/dist/standalone/chunk-3OA7PECS.js +0 -6
  291. package/dist/standalone/chunk-4PC7IXNY.js +0 -1
  292. package/dist/standalone/chunk-56XQYNUJ.js +0 -1
  293. package/dist/standalone/chunk-5OIBXYZM.js +0 -1
  294. package/dist/standalone/chunk-5QT5JRXD.js +0 -3
  295. package/dist/standalone/chunk-6RLPR7PL.js +0 -1
  296. package/dist/standalone/chunk-6V74EUPK.js +0 -1
  297. package/dist/standalone/chunk-7EE33WLB.js +0 -1
  298. package/dist/standalone/chunk-7TJJXVSE.js +0 -1
  299. package/dist/standalone/chunk-AHILM3ZP.js +0 -1
  300. package/dist/standalone/chunk-AN4RKMKW.js +0 -1
  301. package/dist/standalone/chunk-APSSZB6Z.js +0 -1
  302. package/dist/standalone/chunk-AXNGWSBM.js +0 -1
  303. package/dist/standalone/chunk-AXZILWRM.js +0 -1
  304. package/dist/standalone/chunk-C7RHEBOH.js +0 -1
  305. package/dist/standalone/chunk-CKSHCYGC.js +0 -2
  306. package/dist/standalone/chunk-CSWIYOB3.js +0 -1
  307. package/dist/standalone/chunk-D3VAON25.js +0 -1
  308. package/dist/standalone/chunk-DDLQN67F.js +0 -1
  309. package/dist/standalone/chunk-DGHW5JG5.js +0 -1
  310. package/dist/standalone/chunk-DMCSOTAE.js +0 -3
  311. package/dist/standalone/chunk-E3BKETAS.js +0 -1
  312. package/dist/standalone/chunk-E3OXNN6O.js +0 -1
  313. package/dist/standalone/chunk-E6BOGDIS.js +0 -1
  314. package/dist/standalone/chunk-F2YMCQ6B.js +0 -1
  315. package/dist/standalone/chunk-F7GE4X2U.js +0 -1
  316. package/dist/standalone/chunk-FAVUOGJR.js +0 -1
  317. package/dist/standalone/chunk-FXP6256Q.js +0 -1
  318. package/dist/standalone/chunk-G6CTAYHJ.js +0 -1
  319. package/dist/standalone/chunk-GTM65MVX.js +0 -1
  320. package/dist/standalone/chunk-H42W62SE.js +0 -1
  321. package/dist/standalone/chunk-HTF5ZX4I.js +0 -8
  322. package/dist/standalone/chunk-HV7G6DFP.js +0 -5
  323. package/dist/standalone/chunk-I2PS4L74.js +0 -1
  324. package/dist/standalone/chunk-IYHPYY4A.js +0 -1
  325. package/dist/standalone/chunk-J6J54MBP.js +0 -1
  326. package/dist/standalone/chunk-J7OGP4NN.js +0 -1
  327. package/dist/standalone/chunk-JSEXCW5Q.js +0 -1
  328. package/dist/standalone/chunk-JZLGLG4T.js +0 -1
  329. package/dist/standalone/chunk-KEGAWN6Y.js +0 -1
  330. package/dist/standalone/chunk-KZ6INM5M.js +0 -1
  331. package/dist/standalone/chunk-L2LN3MK4.js +0 -4
  332. package/dist/standalone/chunk-LT3FH6MW.js +0 -1
  333. package/dist/standalone/chunk-LZUWZBPE.js +0 -1
  334. package/dist/standalone/chunk-M4JM3TOY.js +0 -1
  335. package/dist/standalone/chunk-MLA5ZAEB.js +0 -1
  336. package/dist/standalone/chunk-MRBI5HNQ.js +0 -1
  337. package/dist/standalone/chunk-N5XX4HOL.js +0 -6
  338. package/dist/standalone/chunk-N7SVJOHN.js +0 -1
  339. package/dist/standalone/chunk-NKFXMDOD.js +0 -1
  340. package/dist/standalone/chunk-NPSNKFHE.js +0 -1
  341. package/dist/standalone/chunk-O3NAGRTR.js +0 -1
  342. package/dist/standalone/chunk-O7FVPUCO.js +0 -1
  343. package/dist/standalone/chunk-OKQXTLFX.js +0 -1
  344. package/dist/standalone/chunk-OXHHSUXO.js +0 -1
  345. package/dist/standalone/chunk-QAFAJBAW.js +0 -1
  346. package/dist/standalone/chunk-QAIM6KWT.js +0 -1
  347. package/dist/standalone/chunk-QCPMTB6W.js +0 -1
  348. package/dist/standalone/chunk-QQ2LOSZL.js +0 -1
  349. package/dist/standalone/chunk-QVIPA6UJ.js +0 -1
  350. package/dist/standalone/chunk-QVUQXJCT.js +0 -4
  351. package/dist/standalone/chunk-R2GMHLJY.js +0 -1
  352. package/dist/standalone/chunk-RD5UG2YL.js +0 -1
  353. package/dist/standalone/chunk-RJTIP3WF.js +0 -1
  354. package/dist/standalone/chunk-RRCPZMC2.js +0 -22
  355. package/dist/standalone/chunk-SHERR7ZP.js +0 -1
  356. package/dist/standalone/chunk-SOC5CY3F.js +0 -1
  357. package/dist/standalone/chunk-SS7JLF2I.js +0 -4
  358. package/dist/standalone/chunk-SWWYUGPL.js +0 -2
  359. package/dist/standalone/chunk-TAD43CG5.js +0 -1
  360. package/dist/standalone/chunk-TTXRHJUP.js +0 -4
  361. package/dist/standalone/chunk-UK64ZSUW.js +0 -1
  362. package/dist/standalone/chunk-UKDHGVOC.js +0 -1
  363. package/dist/standalone/chunk-UPNTMJFF.js +0 -1
  364. package/dist/standalone/chunk-V43BLH4J.js +0 -1
  365. package/dist/standalone/chunk-VL23Y44O.js +0 -4
  366. package/dist/standalone/chunk-VXM5H542.js +0 -4
  367. package/dist/standalone/chunk-WMDH2CIZ.js +0 -1
  368. package/dist/standalone/chunk-WVTPZ6CM.js +0 -1
  369. package/dist/standalone/chunk-XN6QYJQ6.js +0 -13
  370. package/dist/standalone/chunk-XNJNSCLM.js +0 -1
  371. package/dist/standalone/chunk-Y4U6CC22.js +0 -1
  372. package/dist/standalone/chunk-Y572GMZE.js +0 -1
  373. package/dist/standalone/chunk-Y7PD5KP4.js +0 -76
  374. package/dist/standalone/chunk-YFIPHCEC.js +0 -1
  375. package/dist/standalone/chunk-YJXOWLFJ.js +0 -1
  376. package/dist/standalone/chunk-YNN6NFRZ.js +0 -1
  377. package/dist/standalone/chunk-YUGHRVPD.js +0 -1
  378. package/dist/standalone/chunk-ZIGWVHCS.js +0 -1
  379. package/dist/standalone/chunk-ZPP2KOR4.js +0 -1
  380. package/dist/standalone/chunk-ZPUO7FNI.js +0 -1
  381. /package/dist/standalone/{chunk-TEWVD66F.js → chunk-GXZAXNZI.js} +0 -0
@@ -1,831 +1 @@
1
- import { c } from 'react/compiler-runtime';
2
- import { useState, useMemo } from 'react';
3
- import { B as Button } from '../packem_shared/button-BhsN2uZH.js';
4
- import { useT } from '../packem_shared/DEFAULT_LOCALE-CiX4W7Kr.js';
5
- import { useLunora } from '@lunora/react';
6
- import { ConfirmButton } from '../packem_shared/ConfirmButton-C2eVi2Qv.js';
7
- import { B as Badge } from '../packem_shared/badge-B2PKA1-5.js';
8
- import { C as Card, a as CardContent } from '../packem_shared/card-F2vH_aj2.js';
9
- import { E as EmptyState } from '../packem_shared/empty-state-DY_oe0k6.js';
10
- import { T as Table, a as TableHeader, b as TableRow, c as TableHead, d as TableBody, e as TableCell } from '../packem_shared/table-DsCa9Qp9.js';
11
- import { a as useClientQuery } from '../packem_shared/use-admin-query-C7JNuQp-.js';
12
- import { f as fireAndForget, e as errorMessage, i as formatTimestamp } from '../packem_shared/internal-DzHCc2Rq.js';
13
- import { jsxDEV } from 'react/jsx-dev-runtime';
14
- import { useAutoRefresh } from '../packem_shared/DEFAULT_AUTO_REFRESH_MS-Vxwaxx51.js';
15
- import { ScheduledJobs } from '../packem_shared/ScheduledJobs-BQzQo84k.js';
16
-
17
- const IDLE = {
18
- kind: "idle"
19
- };
20
- const CronTriggersPanel = ({
21
- loadCronJobs,
22
- runCronJob
23
- } = {}) => {
24
- const client = useLunora();
25
- const t = useT();
26
- const [runStates, setRunStates] = useState({});
27
- const jobsQuery = useClientQuery(["lunora-cron-jobs", loadCronJobs ? "custom" : "default"], () => (loadCronJobs ?? (() => client.getCronJobs()))());
28
- const {
29
- data: jobs,
30
- error
31
- } = jobsQuery;
32
- const runImpl = useMemo(() => {
33
- if (runCronJob !== void 0) {
34
- return runCronJob;
35
- }
36
- return loadCronJobs === void 0 ? (name) => client.runCronJob(name) : void 0;
37
- }, [client, loadCronJobs, runCronJob]);
38
- const run = async (name_0) => {
39
- if (runImpl === void 0) {
40
- return;
41
- }
42
- setRunStates((previous) => {
43
- return {
44
- ...previous,
45
- [name_0]: {
46
- kind: "running"
47
- }
48
- };
49
- });
50
- try {
51
- await runImpl(name_0);
52
- setRunStates((previous_1) => {
53
- return {
54
- ...previous_1,
55
- [name_0]: {
56
- kind: "ok"
57
- }
58
- };
59
- });
60
- jobsQuery.refetch();
61
- } catch (error_) {
62
- setRunStates((previous_0) => {
63
- return {
64
- ...previous_0,
65
- [name_0]: {
66
- kind: "error",
67
- message: errorMessage(error_)
68
- }
69
- };
70
- });
71
- }
72
- };
73
- return /* @__PURE__ */ jsxDEV("div", {
74
- className: "flex flex-col gap-3",
75
- "data-testid": "lunora-cron-triggers",
76
- children: [error !== null && /* @__PURE__ */ jsxDEV("p", {
77
- className: "text-sm text-destructive",
78
- "data-testid": "cron-error",
79
- role: "alert",
80
- children: error
81
- }, void 0, false), jobs?.length === 0 && /* @__PURE__ */ jsxDEV(EmptyState, {
82
- description: t("Triggers declared with the cronJobs() builder appear here."),
83
- icon: /* @__PURE__ */ jsxDEV("svg", {
84
- "aria-hidden": "true",
85
- fill: "none",
86
- stroke: "currentColor",
87
- strokeLinecap: "round",
88
- strokeLinejoin: "round",
89
- strokeWidth: 1.6,
90
- viewBox: "0 0 24 24",
91
- children: [/* @__PURE__ */ jsxDEV("circle", {
92
- cx: "12",
93
- cy: "12",
94
- r: "9"
95
- }, void 0, false), /* @__PURE__ */ jsxDEV("path", {
96
- d: "M12 7.5V12l4 2"
97
- }, void 0, false)]
98
- }, void 0, true),
99
- testId: "cron-empty",
100
- title: t("No cron triggers.")
101
- }, void 0, false), jobs !== void 0 && jobs.length > 0 && /* @__PURE__ */ jsxDEV(Card, {
102
- className: "overflow-hidden py-0",
103
- children: /* @__PURE__ */ jsxDEV(CardContent, {
104
- className: "px-0",
105
- children: /* @__PURE__ */ jsxDEV(Table, {
106
- "data-testid": "cron-table",
107
- children: [/* @__PURE__ */ jsxDEV(TableHeader, {
108
- children: /* @__PURE__ */ jsxDEV(TableRow, {
109
- children: [/* @__PURE__ */ jsxDEV(TableHead, {
110
- children: t("name")
111
- }, void 0, false), /* @__PURE__ */ jsxDEV(TableHead, {
112
- children: t("schedule")
113
- }, void 0, false), /* @__PURE__ */ jsxDEV(TableHead, {
114
- children: t("target")
115
- }, void 0, false), /* @__PURE__ */ jsxDEV(TableHead, {
116
- children: t("shard")
117
- }, void 0, false), runImpl !== void 0 && /* @__PURE__ */ jsxDEV(TableHead, {
118
- "aria-label": t("Actions")
119
- }, void 0, false)]
120
- }, void 0, true)
121
- }, void 0, false), /* @__PURE__ */ jsxDEV(TableBody, {
122
- children: jobs.map((job) => {
123
- const state = runStates[job.name] ?? IDLE;
124
- return /* @__PURE__ */ jsxDEV(TableRow, {
125
- "data-testid": `cron-row-${job.name}`,
126
- children: [/* @__PURE__ */ jsxDEV(TableCell, {
127
- children: job.name
128
- }, void 0, false), /* @__PURE__ */ jsxDEV(TableCell, {
129
- className: "font-mono text-xs tabular-nums",
130
- children: job.cron
131
- }, void 0, false), /* @__PURE__ */ jsxDEV(TableCell, {
132
- children: /* @__PURE__ */ jsxDEV("span", {
133
- className: "flex items-center gap-2",
134
- children: [job.workflow === void 0 ? /* @__PURE__ */ jsxDEV(Badge, {
135
- variant: "outline",
136
- children: t("function")
137
- }, void 0, false) : /* @__PURE__ */ jsxDEV(Badge, {
138
- variant: "secondary",
139
- children: t("workflow")
140
- }, void 0, false), /* @__PURE__ */ jsxDEV("span", {
141
- className: "font-mono text-xs",
142
- children: job.workflow ?? job.functionPath
143
- }, void 0, false)]
144
- }, void 0, true)
145
- }, void 0, false), /* @__PURE__ */ jsxDEV(TableCell, {
146
- children: job.shardKey ?? ""
147
- }, void 0, false), runImpl !== void 0 && /* @__PURE__ */ jsxDEV(TableCell, {
148
- className: "text-right",
149
- children: /* @__PURE__ */ jsxDEV("span", {
150
- className: "flex items-center justify-end gap-2",
151
- children: [state.kind === "ok" && /* @__PURE__ */ jsxDEV("span", {
152
- className: "text-xs text-muted-foreground",
153
- "data-testid": `cron-ran-${job.name}`,
154
- children: t("ran")
155
- }, void 0, false), state.kind === "error" && /* @__PURE__ */ jsxDEV("span", {
156
- className: "text-xs text-destructive",
157
- "data-testid": `cron-run-error-${job.name}`,
158
- role: "alert",
159
- children: state.message
160
- }, void 0, false), /* @__PURE__ */ jsxDEV(ConfirmButton, {
161
- confirmLabel: t("Run now?"),
162
- disabled: state.kind === "running",
163
- onConfirm: () => {
164
- fireAndForget(run(job.name));
165
- },
166
- testId: `cron-run-${job.name}`,
167
- children: state.kind === "running" ? t("Running…") : t("Run now")
168
- }, void 0, false)]
169
- }, void 0, true)
170
- }, void 0, false)]
171
- }, `${job.cron}:${job.name}`, true);
172
- })
173
- }, void 0, false)]
174
- }, void 0, true)
175
- }, void 0, false)
176
- }, void 0, false)]
177
- }, void 0, true);
178
- };
179
-
180
- const formatScheduledFor = (value) => Number.isFinite(value) ? formatTimestamp(value, "—") : "—";
181
- const DeadLetterJobs = (t0) => {
182
- const $ = c(34);
183
- let t1;
184
- if ($[0] !== t0) {
185
- t1 = t0 === void 0 ? {} : t0;
186
- $[0] = t0;
187
- $[1] = t1;
188
- } else {
189
- t1 = $[1];
190
- }
191
- const {
192
- loadJobs,
193
- removeJob,
194
- retryJob
195
- } = t1;
196
- const client = useLunora();
197
- const t = useT();
198
- let t2;
199
- if ($[2] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel")) {
200
- t2 = ["lunora-dead-jobs"];
201
- $[2] = t2;
202
- } else {
203
- t2 = $[2];
204
- }
205
- let t3;
206
- if ($[3] !== client || $[4] !== loadJobs) {
207
- t3 = async () => {
208
- const records = await (loadJobs ?? (() => client.listDeadJobs()))();
209
- return records.toSorted(_temp$1);
210
- };
211
- $[3] = client;
212
- $[4] = loadJobs;
213
- $[5] = t3;
214
- } else {
215
- t3 = $[5];
216
- }
217
- const jobsQuery = useClientQuery(t2, t3);
218
- const jobs = jobsQuery.data;
219
- const [actionError, setActionError] = useState(void 0);
220
- const error = jobsQuery.error ?? actionError;
221
- const clientOwned = loadJobs === void 0;
222
- let t4;
223
- if ($[6] !== client || $[7] !== clientOwned || $[8] !== retryJob) {
224
- t4 = retryJob ?? (clientOwned ? (id) => client.retryDeadJob(id) : void 0);
225
- $[6] = client;
226
- $[7] = clientOwned;
227
- $[8] = retryJob;
228
- $[9] = t4;
229
- } else {
230
- t4 = $[9];
231
- }
232
- const retryImpl = t4;
233
- let t5;
234
- if ($[10] !== client || $[11] !== clientOwned || $[12] !== removeJob) {
235
- t5 = removeJob ?? (clientOwned ? (id_0) => client.removeDeadJob(id_0) : void 0);
236
- $[10] = client;
237
- $[11] = clientOwned;
238
- $[12] = removeJob;
239
- $[13] = t5;
240
- } else {
241
- t5 = $[13];
242
- }
243
- const removeImpl = t5;
244
- let t6;
245
- if ($[14] !== jobsQuery) {
246
- t6 = () => {
247
- jobsQuery.refetch();
248
- };
249
- $[14] = jobsQuery;
250
- $[15] = t6;
251
- } else {
252
- t6 = $[15];
253
- }
254
- useAutoRefresh(t6, true);
255
- let t7;
256
- if ($[16] !== jobsQuery) {
257
- t7 = async (operation) => {
258
- setActionError(void 0);
259
- try {
260
- await operation;
261
- jobsQuery.refetch();
262
- } catch (t82) {
263
- const error_ = t82;
264
- setActionError(errorMessage(error_));
265
- }
266
- };
267
- $[16] = jobsQuery;
268
- $[17] = t7;
269
- } else {
270
- t7 = $[17];
271
- }
272
- const act = t7;
273
- const hasActions = retryImpl !== void 0 || removeImpl !== void 0;
274
- let t8;
275
- if ($[18] !== error) {
276
- t8 = error !== void 0 && /* @__PURE__ */ jsxDEV("p", {
277
- className: "text-sm text-destructive",
278
- "data-testid": "dlq-error",
279
- role: "alert",
280
- children: error
281
- }, void 0, false);
282
- $[18] = error;
283
- $[19] = t8;
284
- } else {
285
- t8 = $[19];
286
- }
287
- let t9;
288
- if ($[20] !== jobs?.length || $[21] !== t) {
289
- t9 = jobs?.length === 0 && /* @__PURE__ */ jsxDEV(EmptyState, {
290
- description: t("Jobs that exhaust their retry budget are parked here instead of being dropped."),
291
- icon: /* @__PURE__ */ jsxDEV("svg", {
292
- "aria-hidden": "true",
293
- fill: "none",
294
- stroke: "currentColor",
295
- strokeLinecap: "round",
296
- strokeLinejoin: "round",
297
- strokeWidth: 1.6,
298
- viewBox: "0 0 24 24",
299
- children: /* @__PURE__ */ jsxDEV("path", {
300
- d: "M3 6h18M8 6V4h8v2M6 6l1 14h10l1-14"
301
- }, void 0, false)
302
- }, void 0, false),
303
- testId: "dlq-empty",
304
- title: t("No dead-letter jobs.")
305
- }, void 0, false);
306
- $[20] = jobs?.length;
307
- $[21] = t;
308
- $[22] = t9;
309
- } else {
310
- t9 = $[22];
311
- }
312
- let t10;
313
- if ($[23] !== act || $[24] !== hasActions || $[25] !== jobs || $[26] !== removeImpl || $[27] !== retryImpl || $[28] !== t) {
314
- t10 = jobs !== void 0 && jobs.length > 0 && /* @__PURE__ */ jsxDEV(Card, {
315
- className: "overflow-hidden py-0",
316
- children: /* @__PURE__ */ jsxDEV(CardContent, {
317
- className: "px-0",
318
- children: /* @__PURE__ */ jsxDEV(Table, {
319
- "data-testid": "dlq-table",
320
- children: [/* @__PURE__ */ jsxDEV(TableHeader, {
321
- children: /* @__PURE__ */ jsxDEV(TableRow, {
322
- children: [/* @__PURE__ */ jsxDEV(TableHead, {
323
- children: t("function")
324
- }, void 0, false), /* @__PURE__ */ jsxDEV(TableHead, {
325
- children: t("attempts")
326
- }, void 0, false), /* @__PURE__ */ jsxDEV(TableHead, {
327
- children: t("last tried")
328
- }, void 0, false), /* @__PURE__ */ jsxDEV(TableHead, {
329
- children: t("pool")
330
- }, void 0, false), /* @__PURE__ */ jsxDEV(TableHead, {
331
- children: t("shard")
332
- }, void 0, false), /* @__PURE__ */ jsxDEV(TableHead, {
333
- children: t("id")
334
- }, void 0, false), hasActions && /* @__PURE__ */ jsxDEV(TableHead, {
335
- "aria-label": t("Actions")
336
- }, void 0, false)]
337
- }, void 0, true)
338
- }, void 0, false), /* @__PURE__ */ jsxDEV(TableBody, {
339
- children: jobs.map((job) => /* @__PURE__ */ jsxDEV(TableRow, {
340
- "data-testid": `dlq-row-${job.id}`,
341
- children: [/* @__PURE__ */ jsxDEV(TableCell, {
342
- className: "font-mono text-xs",
343
- children: job.functionPath
344
- }, void 0, false), /* @__PURE__ */ jsxDEV(TableCell, {
345
- className: "tabular-nums",
346
- children: job.attempts ?? 0
347
- }, void 0, false), /* @__PURE__ */ jsxDEV(TableCell, {
348
- className: "text-muted-foreground tabular-nums",
349
- children: formatScheduledFor(job.scheduledFor)
350
- }, void 0, false), /* @__PURE__ */ jsxDEV(TableCell, {
351
- className: "font-mono text-xs",
352
- children: job.pool ?? ""
353
- }, void 0, false), /* @__PURE__ */ jsxDEV(TableCell, {
354
- children: job.shardKey ?? ""
355
- }, void 0, false), /* @__PURE__ */ jsxDEV(TableCell, {
356
- className: "font-mono text-xs",
357
- children: job.id
358
- }, void 0, false), hasActions && /* @__PURE__ */ jsxDEV(TableCell, {
359
- className: "text-right",
360
- children: /* @__PURE__ */ jsxDEV("div", {
361
- className: "flex justify-end gap-1.5",
362
- children: [retryImpl !== void 0 && /* @__PURE__ */ jsxDEV(Button, {
363
- "data-testid": `dlq-retry-${job.id}`,
364
- onClick: () => {
365
- fireAndForget(act(retryImpl(job.id)));
366
- },
367
- size: "sm",
368
- type: "button",
369
- variant: "outline",
370
- children: t("Retry")
371
- }, void 0, false), removeImpl !== void 0 && /* @__PURE__ */ jsxDEV(ConfirmButton, {
372
- confirmLabel: t("Drop job?"),
373
- onConfirm: () => {
374
- fireAndForget(act(removeImpl(job.id)));
375
- },
376
- testId: `dlq-remove-${job.id}`,
377
- children: t("Drop")
378
- }, void 0, false)]
379
- }, void 0, true)
380
- }, void 0, false)]
381
- }, job.id, true))
382
- }, void 0, false)]
383
- }, void 0, true)
384
- }, void 0, false)
385
- }, void 0, false);
386
- $[23] = act;
387
- $[24] = hasActions;
388
- $[25] = jobs;
389
- $[26] = removeImpl;
390
- $[27] = retryImpl;
391
- $[28] = t;
392
- $[29] = t10;
393
- } else {
394
- t10 = $[29];
395
- }
396
- let t11;
397
- if ($[30] !== t10 || $[31] !== t8 || $[32] !== t9) {
398
- t11 = /* @__PURE__ */ jsxDEV("div", {
399
- className: "flex flex-col gap-3",
400
- "data-testid": "lunora-dead-letter",
401
- children: [t8, t9, t10]
402
- }, void 0, true);
403
- $[30] = t10;
404
- $[31] = t8;
405
- $[32] = t9;
406
- $[33] = t11;
407
- } else {
408
- t11 = $[33];
409
- }
410
- return t11;
411
- };
412
- function _temp$1(a, b) {
413
- return (b.attempts ?? 0) - (a.attempts ?? 0);
414
- }
415
-
416
- const StatTile = (t0) => {
417
- const $ = c(8);
418
- const {
419
- label,
420
- testId,
421
- value
422
- } = t0;
423
- let t1;
424
- if ($[0] !== label) {
425
- t1 = /* @__PURE__ */ jsxDEV("span", {
426
- className: "text-xs text-muted-foreground",
427
- children: label
428
- }, void 0, false);
429
- $[0] = label;
430
- $[1] = t1;
431
- } else {
432
- t1 = $[1];
433
- }
434
- let t2;
435
- if ($[2] !== testId || $[3] !== value) {
436
- t2 = /* @__PURE__ */ jsxDEV("span", {
437
- className: "text-2xl font-semibold tabular-nums",
438
- "data-testid": testId,
439
- children: value
440
- }, void 0, false);
441
- $[2] = testId;
442
- $[3] = value;
443
- $[4] = t2;
444
- } else {
445
- t2 = $[4];
446
- }
447
- let t3;
448
- if ($[5] !== t1 || $[6] !== t2) {
449
- t3 = /* @__PURE__ */ jsxDEV(Card, {
450
- className: "flex-1 py-0",
451
- children: /* @__PURE__ */ jsxDEV(CardContent, {
452
- className: "flex flex-col gap-1 p-4",
453
- children: [t1, t2]
454
- }, void 0, true)
455
- }, void 0, false);
456
- $[5] = t1;
457
- $[6] = t2;
458
- $[7] = t3;
459
- } else {
460
- t3 = $[7];
461
- }
462
- return t3;
463
- };
464
- const SchedulerPoolsPanel = (t0) => {
465
- const $ = c(25);
466
- let t1;
467
- if ($[0] !== t0) {
468
- t1 = t0 === void 0 ? {} : t0;
469
- $[0] = t0;
470
- $[1] = t1;
471
- } else {
472
- t1 = $[1];
473
- }
474
- const {
475
- loadStatus
476
- } = t1;
477
- const client = useLunora();
478
- const t = useT();
479
- const t2 = loadStatus === void 0;
480
- let t3;
481
- if ($[2] !== t2) {
482
- t3 = ["lunora-scheduler-status", t2];
483
- $[2] = t2;
484
- $[3] = t3;
485
- } else {
486
- t3 = $[3];
487
- }
488
- let t4;
489
- if ($[4] !== client || $[5] !== loadStatus) {
490
- t4 = async () => {
491
- const next = await (loadStatus ?? (() => client.schedulerStatus()))();
492
- return {
493
- ...next,
494
- pools: next.pools.toSorted(_temp)
495
- };
496
- };
497
- $[4] = client;
498
- $[5] = loadStatus;
499
- $[6] = t4;
500
- } else {
501
- t4 = $[6];
502
- }
503
- const statusQuery = useClientQuery(t3, t4);
504
- const {
505
- data: status,
506
- error
507
- } = statusQuery;
508
- let t5;
509
- if ($[7] !== statusQuery) {
510
- t5 = () => {
511
- statusQuery.refetch();
512
- };
513
- $[7] = statusQuery;
514
- $[8] = t5;
515
- } else {
516
- t5 = $[8];
517
- }
518
- useAutoRefresh(t5, true);
519
- let t6;
520
- if ($[9] !== error) {
521
- t6 = error !== null && /* @__PURE__ */ jsxDEV("p", {
522
- className: "text-sm text-destructive",
523
- "data-testid": "pools-error",
524
- role: "alert",
525
- children: error
526
- }, void 0, false);
527
- $[9] = error;
528
- $[10] = t6;
529
- } else {
530
- t6 = $[10];
531
- }
532
- let t7;
533
- if ($[11] !== status || $[12] !== t) {
534
- t7 = status !== void 0 && /* @__PURE__ */ jsxDEV("div", {
535
- className: "flex gap-3",
536
- "data-testid": "pools-totals",
537
- children: [/* @__PURE__ */ jsxDEV(StatTile, {
538
- label: t("backlog"),
539
- testId: "pools-backlog",
540
- value: status.backlog
541
- }, void 0, false), /* @__PURE__ */ jsxDEV(StatTile, {
542
- label: t("in flight"),
543
- testId: "pools-inflight",
544
- value: status.inFlight
545
- }, void 0, false), /* @__PURE__ */ jsxDEV(StatTile, {
546
- label: t("pools"),
547
- testId: "pools-count",
548
- value: status.pools.length
549
- }, void 0, false)]
550
- }, void 0, true);
551
- $[11] = status;
552
- $[12] = t;
553
- $[13] = t7;
554
- } else {
555
- t7 = $[13];
556
- }
557
- let t8;
558
- if ($[14] !== status?.pools.length || $[15] !== t) {
559
- t8 = status?.pools.length === 0 && /* @__PURE__ */ jsxDEV(EmptyState, {
560
- description: t("Pools created with createWorkpool appear here once they have activity."),
561
- icon: /* @__PURE__ */ jsxDEV("svg", {
562
- "aria-hidden": "true",
563
- fill: "none",
564
- stroke: "currentColor",
565
- strokeLinecap: "round",
566
- strokeLinejoin: "round",
567
- strokeWidth: 1.6,
568
- viewBox: "0 0 24 24",
569
- children: /* @__PURE__ */ jsxDEV("path", {
570
- d: "M4 7h16M4 12h16M4 17h16"
571
- }, void 0, false)
572
- }, void 0, false),
573
- testId: "pools-empty",
574
- title: t("No workpools.")
575
- }, void 0, false);
576
- $[14] = status?.pools.length;
577
- $[15] = t;
578
- $[16] = t8;
579
- } else {
580
- t8 = $[16];
581
- }
582
- let t9;
583
- if ($[17] !== status || $[18] !== t) {
584
- t9 = status !== void 0 && status.pools.length > 0 && /* @__PURE__ */ jsxDEV(Card, {
585
- className: "overflow-hidden py-0",
586
- children: /* @__PURE__ */ jsxDEV(CardContent, {
587
- className: "px-0",
588
- children: /* @__PURE__ */ jsxDEV(Table, {
589
- "data-testid": "pools-table",
590
- children: [/* @__PURE__ */ jsxDEV(TableHeader, {
591
- children: /* @__PURE__ */ jsxDEV(TableRow, {
592
- children: [/* @__PURE__ */ jsxDEV(TableHead, {
593
- children: t("pool")
594
- }, void 0, false), /* @__PURE__ */ jsxDEV(TableHead, {
595
- children: t("queued")
596
- }, void 0, false), /* @__PURE__ */ jsxDEV(TableHead, {
597
- children: t("in flight")
598
- }, void 0, false), /* @__PURE__ */ jsxDEV(TableHead, {
599
- children: t("max concurrency")
600
- }, void 0, false)]
601
- }, void 0, true)
602
- }, void 0, false), /* @__PURE__ */ jsxDEV(TableBody, {
603
- children: status.pools.map(_temp2)
604
- }, void 0, false)]
605
- }, void 0, true)
606
- }, void 0, false)
607
- }, void 0, false);
608
- $[17] = status;
609
- $[18] = t;
610
- $[19] = t9;
611
- } else {
612
- t9 = $[19];
613
- }
614
- let t10;
615
- if ($[20] !== t6 || $[21] !== t7 || $[22] !== t8 || $[23] !== t9) {
616
- t10 = /* @__PURE__ */ jsxDEV("div", {
617
- className: "flex flex-col gap-3",
618
- "data-testid": "lunora-scheduler-pools",
619
- children: [t6, t7, t8, t9]
620
- }, void 0, true);
621
- $[20] = t6;
622
- $[21] = t7;
623
- $[22] = t8;
624
- $[23] = t9;
625
- $[24] = t10;
626
- } else {
627
- t10 = $[24];
628
- }
629
- return t10;
630
- };
631
- function _temp(a, b) {
632
- return b.queued - a.queued;
633
- }
634
- function _temp2(pool) {
635
- return /* @__PURE__ */ jsxDEV(TableRow, {
636
- "data-testid": `pools-row-${pool.name}`,
637
- children: [/* @__PURE__ */ jsxDEV(TableCell, {
638
- className: "font-mono text-xs",
639
- children: pool.name
640
- }, void 0, false), /* @__PURE__ */ jsxDEV(TableCell, {
641
- className: "tabular-nums",
642
- children: pool.queued
643
- }, void 0, false), /* @__PURE__ */ jsxDEV(TableCell, {
644
- className: "tabular-nums",
645
- children: [pool.inFlight, " / ", pool.maxConcurrency]
646
- }, void 0, true), /* @__PURE__ */ jsxDEV(TableCell, {
647
- className: "tabular-nums",
648
- children: pool.maxConcurrency
649
- }, void 0, false)]
650
- }, pool.name, true);
651
- }
652
-
653
- const VIEW_KEYS = ["jobs", "dead", "pools", "cron"];
654
- const SchedulePanel = (t0) => {
655
- const $ = c(41);
656
- let t1;
657
- if ($[0] !== t0) {
658
- t1 = t0 === void 0 ? {} : t0;
659
- $[0] = t0;
660
- $[1] = t1;
661
- } else {
662
- t1 = $[1];
663
- }
664
- const {
665
- loadCronJobs,
666
- scheduledCancel,
667
- scheduledLoad
668
- } = t1;
669
- const t = useT();
670
- const [view, setView] = useState("jobs");
671
- let t2;
672
- if ($[2] !== t) {
673
- t2 = t("Cron triggers");
674
- $[2] = t;
675
- $[3] = t2;
676
- } else {
677
- t2 = $[3];
678
- }
679
- let t3;
680
- if ($[4] !== t) {
681
- t3 = t("Dead letter");
682
- $[4] = t;
683
- $[5] = t3;
684
- } else {
685
- t3 = $[5];
686
- }
687
- let t4;
688
- if ($[6] !== t) {
689
- t4 = t("Scheduled jobs");
690
- $[6] = t;
691
- $[7] = t4;
692
- } else {
693
- t4 = $[7];
694
- }
695
- let t5;
696
- if ($[8] !== t) {
697
- t5 = t("Pools");
698
- $[8] = t;
699
- $[9] = t5;
700
- } else {
701
- t5 = $[9];
702
- }
703
- let t6;
704
- if ($[10] !== t2 || $[11] !== t3 || $[12] !== t4 || $[13] !== t5) {
705
- t6 = {
706
- cron: t2,
707
- dead: t3,
708
- jobs: t4,
709
- pools: t5
710
- };
711
- $[10] = t2;
712
- $[11] = t3;
713
- $[12] = t4;
714
- $[13] = t5;
715
- $[14] = t6;
716
- } else {
717
- t6 = $[14];
718
- }
719
- const viewLabel = t6;
720
- let t7;
721
- if ($[15] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel")) {
722
- t7 = (event) => {
723
- setView(event.currentTarget.dataset.view);
724
- };
725
- $[15] = t7;
726
- } else {
727
- t7 = $[15];
728
- }
729
- const selectView = t7;
730
- let t8;
731
- if ($[16] !== t) {
732
- t8 = t("Schedule view");
733
- $[16] = t;
734
- $[17] = t8;
735
- } else {
736
- t8 = $[17];
737
- }
738
- let t9;
739
- if ($[18] !== view || $[19] !== viewLabel) {
740
- t9 = VIEW_KEYS.map((key) => /* @__PURE__ */ jsxDEV(Button, {
741
- "aria-selected": view === key,
742
- "data-testid": `schedule-view-${key}`,
743
- "data-view": key,
744
- onClick: selectView,
745
- role: "tab",
746
- size: "sm",
747
- type: "button",
748
- variant: view === key ? "default" : "outline",
749
- children: viewLabel[key]
750
- }, key, false));
751
- $[18] = view;
752
- $[19] = viewLabel;
753
- $[20] = t9;
754
- } else {
755
- t9 = $[20];
756
- }
757
- let t10;
758
- if ($[21] !== t8 || $[22] !== t9) {
759
- t10 = /* @__PURE__ */ jsxDEV("div", {
760
- "aria-label": t8,
761
- className: "flex gap-1.5",
762
- "data-testid": "schedule-view-toggle",
763
- role: "tablist",
764
- children: t9
765
- }, void 0, false);
766
- $[21] = t8;
767
- $[22] = t9;
768
- $[23] = t10;
769
- } else {
770
- t10 = $[23];
771
- }
772
- let t11;
773
- if ($[24] !== scheduledCancel || $[25] !== scheduledLoad || $[26] !== view) {
774
- t11 = view === "jobs" && /* @__PURE__ */ jsxDEV(ScheduledJobs, {
775
- cancelJob: scheduledCancel,
776
- loadJobs: scheduledLoad
777
- }, void 0, false);
778
- $[24] = scheduledCancel;
779
- $[25] = scheduledLoad;
780
- $[26] = view;
781
- $[27] = t11;
782
- } else {
783
- t11 = $[27];
784
- }
785
- let t12;
786
- if ($[28] !== view) {
787
- t12 = view === "dead" && /* @__PURE__ */ jsxDEV(DeadLetterJobs, {}, void 0, false);
788
- $[28] = view;
789
- $[29] = t12;
790
- } else {
791
- t12 = $[29];
792
- }
793
- let t13;
794
- if ($[30] !== view) {
795
- t13 = view === "pools" && /* @__PURE__ */ jsxDEV(SchedulerPoolsPanel, {}, void 0, false);
796
- $[30] = view;
797
- $[31] = t13;
798
- } else {
799
- t13 = $[31];
800
- }
801
- let t14;
802
- if ($[32] !== loadCronJobs || $[33] !== view) {
803
- t14 = view === "cron" && /* @__PURE__ */ jsxDEV(CronTriggersPanel, {
804
- loadCronJobs
805
- }, void 0, false);
806
- $[32] = loadCronJobs;
807
- $[33] = view;
808
- $[34] = t14;
809
- } else {
810
- t14 = $[34];
811
- }
812
- let t15;
813
- if ($[35] !== t10 || $[36] !== t11 || $[37] !== t12 || $[38] !== t13 || $[39] !== t14) {
814
- t15 = /* @__PURE__ */ jsxDEV("div", {
815
- className: "flex flex-col gap-4",
816
- "data-testid": "lunora-schedule",
817
- children: [t10, t11, t12, t13, t14]
818
- }, void 0, true);
819
- $[35] = t10;
820
- $[36] = t11;
821
- $[37] = t12;
822
- $[38] = t13;
823
- $[39] = t14;
824
- $[40] = t15;
825
- } else {
826
- t15 = $[40];
827
- }
828
- return t15;
829
- };
830
-
831
- export { SchedulePanel };
1
+ import{c as D}from"react/compiler-runtime";import{useState as _,useMemo as X}from"react";import{u as G}from"../packem_shared/button-BkCrNcAs.js";import{useT as T}from"../packem_shared/DEFAULT_LOCALE-BZ4NojpD.js";import{useLunora as W}from"@lunora/react";import{ConfirmButton as H}from"../packem_shared/ConfirmButton-CTL3f3kr.js";import{g as Z}from"../packem_shared/badge-BbuuAio7.js";import{c as B,u as A}from"../packem_shared/card-CIDGUN6K.js";import{E as z}from"../packem_shared/empty-state-Cg7t_8qu.js";import{n as E,d as K,m as P,p as x,f as V,u as b}from"../packem_shared/table-DdJBrClo.js";import{T as Y}from"../packem_shared/use-admin-query-Di3fLE8H.js";import{f as R,e as O,i as ee}from"../packem_shared/internal-AtZ4bTal.js";import{jsxs as m,jsx as t}from"react/jsx-runtime";import{useAutoRefresh as Q}from"../packem_shared/DEFAULT_AUTO_REFRESH_MS-BCC8_4BQ.js";import{ScheduledJobs as te}from"../packem_shared/ScheduledJobs-DUbo6epc.js";const oe={kind:"idle"},le=({loadCronJobs:n,runCronJob:e}={})=>{const c=W(),i=T(),[f,a]=_({}),r=Y(["lunora-cron-jobs",n?"custom":"default"],()=>(n??(()=>c.getCronJobs()))()),{data:o,error:k}=r,h=X(()=>e!==void 0?e:n===void 0?l=>c.runCronJob(l):void 0,[c,n,e]),d=async l=>{if(h!==void 0){a(s=>({...s,[l]:{kind:"running"}}));try{await h(l),a(s=>({...s,[l]:{kind:"ok"}})),r.refetch()}catch(s){a(v=>({...v,[l]:{kind:"error",message:O(s)}}))}}};return m("div",{className:"flex flex-col gap-3","data-testid":"lunora-cron-triggers",children:[k!==null&&t("p",{className:"text-sm text-destructive","data-testid":"cron-error",role:"alert",children:k}),o?.length===0&&t(z,{description:i("Triggers declared with the cronJobs() builder appear here."),icon:m("svg",{"aria-hidden":"true",fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.6,viewBox:"0 0 24 24",children:[t("circle",{cx:"12",cy:"12",r:"9"}),t("path",{d:"M12 7.5V12l4 2"})]}),testId:"cron-empty",title:i("No cron triggers.")}),o!==void 0&&o.length>0&&t(B,{className:"overflow-hidden py-0",children:t(A,{className:"px-0",children:m(E,{"data-testid":"cron-table",children:[t(K,{children:m(P,{children:[t(x,{children:i("name")}),t(x,{children:i("schedule")}),t(x,{children:i("target")}),t(x,{children:i("shard")}),h!==void 0&&t(x,{"aria-label":i("Actions")})]})}),t(V,{children:o.map(l=>{const s=f[l.name]??oe;return m(P,{"data-testid":`cron-row-${l.name}`,children:[t(b,{children:l.name}),t(b,{className:"font-mono text-xs tabular-nums",children:l.cron}),t(b,{children:m("span",{className:"flex items-center gap-2",children:[l.workflow===void 0?t(Z,{variant:"outline",children:i("function")}):t(Z,{variant:"secondary",children:i("workflow")}),t("span",{className:"font-mono text-xs",children:l.workflow??l.functionPath})]})}),t(b,{children:l.shardKey??""}),h!==void 0&&t(b,{className:"text-right",children:m("span",{className:"flex items-center justify-end gap-2",children:[s.kind==="ok"&&t("span",{className:"text-xs text-muted-foreground","data-testid":`cron-ran-${l.name}`,children:i("ran")}),s.kind==="error"&&t("span",{className:"text-xs text-destructive","data-testid":`cron-run-error-${l.name}`,role:"alert",children:s.message}),t(H,{confirmLabel:i("Run now?"),disabled:s.kind==="running",onConfirm:()=>{R(d(l.name))},testId:`cron-run-${l.name}`,children:s.kind==="running"?i("Running…"):i("Run now")})]})})]},`${l.cron}:${l.name}`)})})]})})})]})},re=n=>Number.isFinite(n)?ee(n,"—"):"—",ne=n=>{const e=D(34);let c;e[0]!==n?(c=n===void 0?{}:n,e[0]=n,e[1]=c):c=e[1];const{loadJobs:i,removeJob:f,retryJob:a}=c,r=W(),o=T();let k;e[2]===Symbol.for("react.memo_cache_sentinel")?(k=["lunora-dead-jobs"],e[2]=k):k=e[2];let h;e[3]!==r||e[4]!==i?(h=async()=>(await(i??(()=>r.listDeadJobs()))()).toSorted(ae),e[3]=r,e[4]=i,e[5]=h):h=e[5];const d=Y(k,h),l=d.data,[s,v]=_(void 0),N=d.error??s,u=i===void 0;let $;e[6]!==r||e[7]!==u||e[8]!==a?($=a??(u?p=>r.retryDeadJob(p):void 0),e[6]=r,e[7]=u,e[8]=a,e[9]=$):$=e[9];const g=$;let w;e[10]!==r||e[11]!==u||e[12]!==f?(w=f??(u?p=>r.removeDeadJob(p):void 0),e[10]=r,e[11]=u,e[12]=f,e[13]=w):w=e[13];const C=w;let J;e[14]!==d?(J=()=>{d.refetch()},e[14]=d,e[15]=J):J=e[15],Q(J,!0);let j;e[16]!==d?(j=async p=>{v(void 0);try{await p,d.refetch()}catch(U){v(O(U))}},e[16]=d,e[17]=j):j=e[17];const S=j,L=g!==void 0||C!==void 0;let q;e[18]!==N?(q=N!==void 0&&t("p",{className:"text-sm text-destructive","data-testid":"dlq-error",role:"alert",children:N}),e[18]=N,e[19]=q):q=e[19];let y;e[20]!==l?.length||e[21]!==o?(y=l?.length===0&&t(z,{description:o("Jobs that exhaust their retry budget are parked here instead of being dropped."),icon:t("svg",{"aria-hidden":"true",fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.6,viewBox:"0 0 24 24",children:t("path",{d:"M3 6h18M8 6V4h8v2M6 6l1 14h10l1-14"})}),testId:"dlq-empty",title:o("No dead-letter jobs.")}),e[20]=l?.length,e[21]=o,e[22]=y):y=e[22];let M;e[23]!==S||e[24]!==L||e[25]!==l||e[26]!==C||e[27]!==g||e[28]!==o?(M=l!==void 0&&l.length>0&&t(B,{className:"overflow-hidden py-0",children:t(A,{className:"px-0",children:m(E,{"data-testid":"dlq-table",children:[t(K,{children:m(P,{children:[t(x,{children:o("function")}),t(x,{children:o("attempts")}),t(x,{children:o("last tried")}),t(x,{children:o("pool")}),t(x,{children:o("shard")}),t(x,{children:o("id")}),L&&t(x,{"aria-label":o("Actions")})]})}),t(V,{children:l.map(p=>m(P,{"data-testid":`dlq-row-${p.id}`,children:[t(b,{className:"font-mono text-xs",children:p.functionPath}),t(b,{className:"tabular-nums",children:p.attempts??0}),t(b,{className:"text-muted-foreground tabular-nums",children:re(p.scheduledFor)}),t(b,{className:"font-mono text-xs",children:p.pool??""}),t(b,{children:p.shardKey??""}),t(b,{className:"font-mono text-xs",children:p.id}),L&&t(b,{className:"text-right",children:m("div",{className:"flex justify-end gap-1.5",children:[g!==void 0&&t(G,{"data-testid":`dlq-retry-${p.id}`,onClick:()=>{R(S(g(p.id)))},size:"sm",type:"button",variant:"outline",children:o("Retry")}),C!==void 0&&t(H,{confirmLabel:o("Drop job?"),onConfirm:()=>{R(S(C(p.id)))},testId:`dlq-remove-${p.id}`,children:o("Drop")})]})})]},p.id))})]})})}),e[23]=S,e[24]=L,e[25]=l,e[26]=C,e[27]=g,e[28]=o,e[29]=M):M=e[29];let I;return e[30]!==M||e[31]!==q||e[32]!==y?(I=m("div",{className:"flex flex-col gap-3","data-testid":"lunora-dead-letter",children:[q,y,M]}),e[30]=M,e[31]=q,e[32]=y,e[33]=I):I=e[33],I};function ae(n,e){return(e.attempts??0)-(n.attempts??0)}const F=n=>{const e=D(8),{label:c,testId:i,value:f}=n;let a;e[0]!==c?(a=t("span",{className:"text-xs text-muted-foreground",children:c}),e[0]=c,e[1]=a):a=e[1];let r;e[2]!==i||e[3]!==f?(r=t("span",{className:"text-2xl font-semibold tabular-nums","data-testid":i,children:f}),e[2]=i,e[3]=f,e[4]=r):r=e[4];let o;return e[5]!==a||e[6]!==r?(o=t(B,{className:"flex-1 py-0",children:m(A,{className:"flex flex-col gap-1 p-4",children:[a,r]})}),e[5]=a,e[6]=r,e[7]=o):o=e[7],o},de=n=>{const e=D(25);let c;e[0]!==n?(c=n===void 0?{}:n,e[0]=n,e[1]=c):c=e[1];const{loadStatus:i}=c,f=W(),a=T(),r=i===void 0;let o;e[2]!==r?(o=["lunora-scheduler-status",r],e[2]=r,e[3]=o):o=e[3];let k;e[4]!==f||e[5]!==i?(k=async()=>{const w=await(i??(()=>f.schedulerStatus()))();return{...w,pools:w.pools.toSorted(ie)}},e[4]=f,e[5]=i,e[6]=k):k=e[6];const h=Y(o,k),{data:d,error:l}=h;let s;e[7]!==h?(s=()=>{h.refetch()},e[7]=h,e[8]=s):s=e[8],Q(s,!0);let v;e[9]!==l?(v=l!==null&&t("p",{className:"text-sm text-destructive","data-testid":"pools-error",role:"alert",children:l}),e[9]=l,e[10]=v):v=e[10];let N;e[11]!==d||e[12]!==a?(N=d!==void 0&&m("div",{className:"flex gap-3","data-testid":"pools-totals",children:[t(F,{label:a("backlog"),testId:"pools-backlog",value:d.backlog}),t(F,{label:a("in flight"),testId:"pools-inflight",value:d.inFlight}),t(F,{label:a("pools"),testId:"pools-count",value:d.pools.length})]}),e[11]=d,e[12]=a,e[13]=N):N=e[13];let u;e[14]!==d?.pools.length||e[15]!==a?(u=d?.pools.length===0&&t(z,{description:a("Pools created with createWorkpool appear here once they have activity."),icon:t("svg",{"aria-hidden":"true",fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.6,viewBox:"0 0 24 24",children:t("path",{d:"M4 7h16M4 12h16M4 17h16"})}),testId:"pools-empty",title:a("No workpools.")}),e[14]=d?.pools.length,e[15]=a,e[16]=u):u=e[16];let $;e[17]!==d||e[18]!==a?($=d!==void 0&&d.pools.length>0&&t(B,{className:"overflow-hidden py-0",children:t(A,{className:"px-0",children:m(E,{"data-testid":"pools-table",children:[t(K,{children:m(P,{children:[t(x,{children:a("pool")}),t(x,{children:a("queued")}),t(x,{children:a("in flight")}),t(x,{children:a("max concurrency")})]})}),t(V,{children:d.pools.map(se)})]})})}),e[17]=d,e[18]=a,e[19]=$):$=e[19];let g;return e[20]!==v||e[21]!==N||e[22]!==u||e[23]!==$?(g=m("div",{className:"flex flex-col gap-3","data-testid":"lunora-scheduler-pools",children:[v,N,u,$]}),e[20]=v,e[21]=N,e[22]=u,e[23]=$,e[24]=g):g=e[24],g};function ie(n,e){return e.queued-n.queued}function se(n){return m(P,{"data-testid":`pools-row-${n.name}`,children:[t(b,{className:"font-mono text-xs",children:n.name}),t(b,{className:"tabular-nums",children:n.queued}),m(b,{className:"tabular-nums",children:[n.inFlight," / ",n.maxConcurrency]}),t(b,{className:"tabular-nums",children:n.maxConcurrency})]},n.name)}const ce=["jobs","dead","pools","cron"],Je=n=>{const e=D(41);let c;e[0]!==n?(c=n===void 0?{}:n,e[0]=n,e[1]=c):c=e[1];const{loadCronJobs:i,scheduledCancel:f,scheduledLoad:a}=c,r=T(),[o,k]=_("jobs");let h;e[2]!==r?(h=r("Cron triggers"),e[2]=r,e[3]=h):h=e[3];let d;e[4]!==r?(d=r("Dead letter"),e[4]=r,e[5]=d):d=e[5];let l;e[6]!==r?(l=r("Scheduled jobs"),e[6]=r,e[7]=l):l=e[7];let s;e[8]!==r?(s=r("Pools"),e[8]=r,e[9]=s):s=e[9];let v;e[10]!==h||e[11]!==d||e[12]!==l||e[13]!==s?(v={cron:h,dead:d,jobs:l,pools:s},e[10]=h,e[11]=d,e[12]=l,e[13]=s,e[14]=v):v=e[14];const N=v;let u;e[15]===Symbol.for("react.memo_cache_sentinel")?(u=y=>{k(y.currentTarget.dataset.view)},e[15]=u):u=e[15];const $=u;let g;e[16]!==r?(g=r("Schedule view"),e[16]=r,e[17]=g):g=e[17];let w;e[18]!==o||e[19]!==N?(w=ce.map(y=>t(G,{"aria-selected":o===y,"data-testid":`schedule-view-${y}`,"data-view":y,onClick:$,role:"tab",size:"sm",type:"button",variant:o===y?"default":"outline",children:N[y]},y)),e[18]=o,e[19]=N,e[20]=w):w=e[20];let C;e[21]!==g||e[22]!==w?(C=t("div",{"aria-label":g,className:"flex gap-1.5","data-testid":"schedule-view-toggle",role:"tablist",children:w}),e[21]=g,e[22]=w,e[23]=C):C=e[23];let J;e[24]!==f||e[25]!==a||e[26]!==o?(J=o==="jobs"&&t(te,{cancelJob:f,loadJobs:a}),e[24]=f,e[25]=a,e[26]=o,e[27]=J):J=e[27];let j;e[28]!==o?(j=o==="dead"&&t(ne,{}),e[28]=o,e[29]=j):j=e[29];let S;e[30]!==o?(S=o==="pools"&&t(de,{}),e[30]=o,e[31]=S):S=e[31];let L;e[32]!==i||e[33]!==o?(L=o==="cron"&&t(le,{loadCronJobs:i}),e[32]=i,e[33]=o,e[34]=L):L=e[34];let q;return e[35]!==C||e[36]!==J||e[37]!==j||e[38]!==S||e[39]!==L?(q=m("div",{className:"flex flex-col gap-4","data-testid":"lunora-schedule",children:[C,J,j,S,L]}),e[35]=C,e[36]=J,e[37]=j,e[38]=S,e[39]=L,e[40]=q):q=e[40],q};export{Je as SchedulePanel};