@open-mercato/cezar 0.17.0-pr976.3708 → 0.17.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (367) hide show
  1. package/README.md +4 -0
  2. package/dist/agent-config/validate.d.ts +2 -1
  3. package/dist/agent-config/validate.js.map +1 -1
  4. package/dist/api-origin.d.ts +0 -4
  5. package/dist/api-origin.js +0 -22
  6. package/dist/api-origin.js.map +1 -1
  7. package/dist/cockpit-address.d.ts +5 -0
  8. package/dist/cockpit-address.js +7 -0
  9. package/dist/cockpit-address.js.map +1 -1
  10. package/dist/contract/health.d.ts +30 -0
  11. package/dist/contract/index.d.ts +1 -0
  12. package/dist/contract/index.js +2370 -2054
  13. package/dist/contract/projects.d.ts +1 -0
  14. package/dist/contract/runs.d.ts +178 -2
  15. package/dist/contract/skills.d.ts +23 -0
  16. package/dist/contract/webhooks.d.ts +1136 -0
  17. package/dist/contract/workspace.d.ts +2 -0
  18. package/dist/core/agent-errors.d.ts +6 -0
  19. package/dist/core/agent-errors.js +13 -0
  20. package/dist/core/agent-errors.js.map +1 -1
  21. package/dist/core/agent-failure-class.d.ts +24 -0
  22. package/dist/core/agent-failure-class.js +99 -0
  23. package/dist/core/agent-failure-class.js.map +1 -0
  24. package/dist/core/agent-runner.d.ts +1 -1
  25. package/dist/core/claude-cli-runner.d.ts +2 -2
  26. package/dist/core/claude-cli-runner.js +17 -21
  27. package/dist/core/claude-cli-runner.js.map +1 -1
  28. package/dist/core/codex-app-server-runner.d.ts +1 -1
  29. package/dist/core/codex-app-server-runner.js +20 -23
  30. package/dist/core/codex-app-server-runner.js.map +1 -1
  31. package/dist/core/copilot-acp-runner.d.ts +1 -1
  32. package/dist/core/copilot-acp-runner.js +10 -10
  33. package/dist/core/copilot-acp-runner.js.map +1 -1
  34. package/dist/core/cursor-agent-runner.js +18 -22
  35. package/dist/core/cursor-agent-runner.js.map +1 -1
  36. package/dist/core/inactivity-deadline.d.ts +21 -0
  37. package/dist/core/inactivity-deadline.js +49 -0
  38. package/dist/core/inactivity-deadline.js.map +1 -0
  39. package/dist/core/junie-runner.d.ts +1 -1
  40. package/dist/core/junie-runner.js +16 -20
  41. package/dist/core/junie-runner.js.map +1 -1
  42. package/dist/core/opencode-server-runner.d.ts +2 -2
  43. package/dist/core/opencode-server-runner.js +23 -15
  44. package/dist/core/opencode-server-runner.js.map +1 -1
  45. package/dist/core/pi-runner.d.ts +1 -1
  46. package/dist/core/pi-runner.js +8 -10
  47. package/dist/core/pi-runner.js.map +1 -1
  48. package/dist/core/provider-auth.js +18 -6
  49. package/dist/core/provider-auth.js.map +1 -1
  50. package/dist/core/runner-factory.d.ts +2 -0
  51. package/dist/core/runner-factory.js +39 -0
  52. package/dist/core/runner-factory.js.map +1 -1
  53. package/dist/core/secret-redaction.js +38 -6
  54. package/dist/core/secret-redaction.js.map +1 -1
  55. package/dist/data-gitignore.d.ts +1 -1
  56. package/dist/data-gitignore.js +1 -0
  57. package/dist/data-gitignore.js.map +1 -1
  58. package/dist/disk-space.d.ts +38 -0
  59. package/dist/disk-space.js +113 -0
  60. package/dist/disk-space.js.map +1 -0
  61. package/dist/dispatch/prompts.js +1 -1
  62. package/dist/git-worktree.d.ts +2 -0
  63. package/dist/git-worktree.js +16 -0
  64. package/dist/git-worktree.js.map +1 -1
  65. package/dist/handoff.d.ts +2 -2
  66. package/dist/handoff.js +1 -1
  67. package/dist/index.js +24 -3
  68. package/dist/index.js.map +1 -1
  69. package/dist/pack-check.d.ts +10 -0
  70. package/dist/pack-check.js +7 -0
  71. package/dist/pack-check.js.map +1 -1
  72. package/dist/release/backport.d.ts +34 -0
  73. package/dist/release/backport.js +33 -0
  74. package/dist/release/backport.js.map +1 -0
  75. package/dist/runs/agent-error-telemetry.d.ts +5 -1
  76. package/dist/runs/agent-error-telemetry.js +17 -10
  77. package/dist/runs/agent-error-telemetry.js.map +1 -1
  78. package/dist/runs/failure-kind.d.ts +1 -1
  79. package/dist/runs/failure-kind.js +5 -8
  80. package/dist/runs/failure-kind.js.map +1 -1
  81. package/dist/runs/lifecycle.d.ts +55 -0
  82. package/dist/runs/lifecycle.js +24 -0
  83. package/dist/runs/lifecycle.js.map +1 -0
  84. package/dist/runs/retention.js +36 -4
  85. package/dist/runs/retention.js.map +1 -1
  86. package/dist/runs/store.d.ts +31 -0
  87. package/dist/runs/store.js +59 -5
  88. package/dist/runs/store.js.map +1 -1
  89. package/dist/server/capabilities.js +3 -0
  90. package/dist/server/capabilities.js.map +1 -1
  91. package/dist/server/disk-health.d.ts +11 -0
  92. package/dist/server/disk-health.js +26 -0
  93. package/dist/server/disk-health.js.map +1 -0
  94. package/dist/server/forge/github.d.ts +9 -1
  95. package/dist/server/forge/github.js +42 -3
  96. package/dist/server/forge/github.js.map +1 -1
  97. package/dist/server/message-receipts.d.ts +27 -0
  98. package/dist/server/message-receipts.js +54 -0
  99. package/dist/server/message-receipts.js.map +1 -0
  100. package/dist/server/project-context.d.ts +5 -0
  101. package/dist/server/project-context.js +35 -1
  102. package/dist/server/project-context.js.map +1 -1
  103. package/dist/server/server.d.ts +2744 -866
  104. package/dist/server/server.js +191 -148
  105. package/dist/server/server.js.map +1 -1
  106. package/dist/server/webhooks.d.ts +817 -0
  107. package/dist/server/webhooks.js +91 -0
  108. package/dist/server/webhooks.js.map +1 -0
  109. package/dist/server/worktree-lifecycle.d.ts +88 -88
  110. package/dist/startup-port.d.ts +12 -0
  111. package/dist/startup-port.js +33 -0
  112. package/dist/startup-port.js.map +1 -0
  113. package/dist/telemetry-service.json +1 -0
  114. package/dist/webhooks/admission.d.ts +360 -0
  115. package/dist/webhooks/admission.js +294 -0
  116. package/dist/webhooks/admission.js.map +1 -0
  117. package/dist/webhooks/coordinator.d.ts +39 -0
  118. package/dist/webhooks/coordinator.js +215 -0
  119. package/dist/webhooks/coordinator.js.map +1 -0
  120. package/dist/webhooks/destination.d.ts +24 -0
  121. package/dist/webhooks/destination.js +111 -0
  122. package/dist/webhooks/destination.js.map +1 -0
  123. package/dist/webhooks/discord.d.ts +4 -0
  124. package/dist/webhooks/discord.js +102 -0
  125. package/dist/webhooks/discord.js.map +1 -0
  126. package/dist/webhooks/endpoints.d.ts +201 -0
  127. package/dist/webhooks/endpoints.js +345 -0
  128. package/dist/webhooks/endpoints.js.map +1 -0
  129. package/dist/webhooks/history.d.ts +42 -0
  130. package/dist/webhooks/history.js +222 -0
  131. package/dist/webhooks/history.js.map +1 -0
  132. package/dist/webhooks/lifecycle.d.ts +34 -0
  133. package/dist/webhooks/lifecycle.js +60 -0
  134. package/dist/webhooks/lifecycle.js.map +1 -0
  135. package/dist/webhooks/limits.d.ts +19 -0
  136. package/dist/webhooks/limits.js +101 -0
  137. package/dist/webhooks/limits.js.map +1 -0
  138. package/dist/webhooks/links.d.ts +12 -0
  139. package/dist/webhooks/links.js +40 -0
  140. package/dist/webhooks/links.js.map +1 -0
  141. package/dist/webhooks/operations.d.ts +24 -0
  142. package/dist/webhooks/operations.js +128 -0
  143. package/dist/webhooks/operations.js.map +1 -0
  144. package/dist/webhooks/outbox.d.ts +37 -0
  145. package/dist/webhooks/outbox.js +221 -0
  146. package/dist/webhooks/outbox.js.map +1 -0
  147. package/dist/webhooks/ownership.d.ts +17 -0
  148. package/dist/webhooks/ownership.js +254 -0
  149. package/dist/webhooks/ownership.js.map +1 -0
  150. package/dist/webhooks/payload.d.ts +6 -0
  151. package/dist/webhooks/payload.js +112 -0
  152. package/dist/webhooks/payload.js.map +1 -0
  153. package/dist/webhooks/platform.d.ts +9 -0
  154. package/dist/webhooks/platform.js +12 -0
  155. package/dist/webhooks/platform.js.map +1 -0
  156. package/dist/webhooks/privacy.d.ts +4 -0
  157. package/dist/webhooks/privacy.js +43 -0
  158. package/dist/webhooks/privacy.js.map +1 -0
  159. package/dist/webhooks/process-identity.d.ts +36 -0
  160. package/dist/webhooks/process-identity.js +240 -0
  161. package/dist/webhooks/process-identity.js.map +1 -0
  162. package/dist/webhooks/scheduler.d.ts +10 -0
  163. package/dist/webhooks/scheduler.js +43 -0
  164. package/dist/webhooks/scheduler.js.map +1 -0
  165. package/dist/webhooks/service.d.ts +313 -0
  166. package/dist/webhooks/service.js +1005 -0
  167. package/dist/webhooks/service.js.map +1 -0
  168. package/dist/webhooks/signing.d.ts +3 -0
  169. package/dist/webhooks/signing.js +36 -0
  170. package/dist/webhooks/signing.js.map +1 -0
  171. package/dist/webhooks/slack.d.ts +4 -0
  172. package/dist/webhooks/slack.js +56 -0
  173. package/dist/webhooks/slack.js.map +1 -0
  174. package/dist/webhooks/source.d.ts +178 -0
  175. package/dist/webhooks/source.js +23 -0
  176. package/dist/webhooks/source.js.map +1 -0
  177. package/dist/webhooks/storage.d.ts +21 -0
  178. package/dist/webhooks/storage.js +202 -0
  179. package/dist/webhooks/storage.js.map +1 -0
  180. package/dist/webhooks/transport.d.ts +30 -0
  181. package/dist/webhooks/transport.js +235 -0
  182. package/dist/webhooks/transport.js.map +1 -0
  183. package/dist/workflows/completion-reason.d.ts +4 -0
  184. package/dist/workflows/completion-reason.js +39 -0
  185. package/dist/workflows/completion-reason.js.map +1 -0
  186. package/dist/workflows/queued-bounds.d.ts +31 -0
  187. package/dist/workflows/queued-bounds.js +81 -0
  188. package/dist/workflows/queued-bounds.js.map +1 -0
  189. package/dist/workflows/run.d.ts +113 -20
  190. package/dist/workflows/run.js +726 -191
  191. package/dist/workflows/run.js.map +1 -1
  192. package/dist/workspace/config.d.ts +8 -0
  193. package/dist/workspace/config.js +62 -19
  194. package/dist/workspace/config.js.map +1 -1
  195. package/dist/workspace/ui-state.d.ts +4 -2
  196. package/dist/workspace/ui-state.js +13 -9
  197. package/dist/workspace/ui-state.js.map +1 -1
  198. package/package.json +4 -3
  199. package/scripts/check-pack.mjs +2 -4
  200. package/scripts/mock-claude.mjs +30 -5
  201. package/scripts/webhooks-schema.mjs +5 -0
  202. package/web/dist/assets/23I4SOAX-B4MCXPfc.js +2 -0
  203. package/web/dist/assets/26H2HVXD-DnN7AaEY.js +2 -0
  204. package/web/dist/assets/2IZ5MNOH-CgfSuFFL.js +1 -0
  205. package/web/dist/assets/2P3CZEXH-kInGrvHu.js +2 -0
  206. package/web/dist/assets/3E5HRNYT-DLbBxF6y.js +5 -0
  207. package/web/dist/assets/3JIRLDUO-B9tVJ8E_.js +1 -0
  208. package/web/dist/assets/5MJ3UKSG-nDfsJSF7.js +2 -0
  209. package/web/dist/assets/5THPTBWS-Ce_hS451.js +1 -0
  210. package/web/dist/assets/7OAKGN26-t-mlpHkx.js +25 -0
  211. package/web/dist/assets/7WLXJQOR-D6QVYUu9.js +1 -0
  212. package/web/dist/assets/A255FCTW-Bx0Z-P1v.js +1 -0
  213. package/web/dist/assets/AM43MQ64-C_UmP8Ka.js +2 -0
  214. package/web/dist/assets/AOZTNTMC-Di2iVwCo.js +5 -0
  215. package/web/dist/assets/AQNLM6KG-CcWg0kGq.js +4 -0
  216. package/web/dist/assets/BNU2RHQB-M1l5nkNs.js +2 -0
  217. package/web/dist/assets/C5HTQT3I-B50g1XeK.js +4 -0
  218. package/web/dist/assets/CPKRWH5G-DHdVktma.js +12 -0
  219. package/web/dist/assets/CUVCMPQX-75g4RQep.js +1 -0
  220. package/web/dist/assets/D4V2MWCI-Bm34L6wL.js +1 -0
  221. package/web/dist/assets/DHKBVIA3-Db-JqVOb.js +1 -0
  222. package/web/dist/assets/DKTLEL5E-DciMwFJ1.js +1 -0
  223. package/web/dist/assets/DUZNPW7S-4AKJemkg.js +2 -0
  224. package/web/dist/assets/E3FWOBN4-AT8jzYgb.js +4 -0
  225. package/web/dist/assets/E65FQMJL-eiWd8F8c.js +1 -0
  226. package/web/dist/assets/FTXIJQGB-CggtIYAM.js +1 -0
  227. package/web/dist/assets/G3MDBVQH-BZmnMkFw.js +1 -0
  228. package/web/dist/assets/G3OATVW2-D5zJu3ib.js +8 -0
  229. package/web/dist/assets/GUJTEFZK-DPEFMf5Q.js +1 -0
  230. package/web/dist/assets/IHVFDU4A-pP0Mb5Iu.js +10 -0
  231. package/web/dist/assets/IV52FOAS-jWHN2JLM.js +5 -0
  232. package/web/dist/assets/JTJEEBDN-DZeTEWqk.js +2 -0
  233. package/web/dist/assets/K7FUICZ3-C9JebvoP.js +2 -0
  234. package/web/dist/assets/LHH2HHRB-DZSZGD4x.js +2 -0
  235. package/web/dist/assets/MSPQPZZY-DOCBMJ70.js +4 -0
  236. package/web/dist/assets/OB6ZFVKF-D6V5f56z.js +2 -0
  237. package/web/dist/assets/PLTZDMI2-DltbYIQQ.js +1 -0
  238. package/web/dist/assets/R7EPXMMD-Dk_RDmvY.js +5 -0
  239. package/web/dist/assets/RVARI57O-CgA1WoRv.js +1 -0
  240. package/web/dist/assets/SPBWZ4VS-8FnOEPzw.js +1 -0
  241. package/web/dist/assets/SR7OOV3Q-3uZPNU1G.js +4 -0
  242. package/web/dist/assets/STAXBNH4-C4N6ZLTR.js +2 -0
  243. package/web/dist/assets/SXFARSFO-DHdVQB4G.js +1 -0
  244. package/web/dist/assets/TC77ISAL-BgUbI3Of.js +2 -0
  245. package/web/dist/assets/TYIQQHVC-S2gy0AUp.js +13 -0
  246. package/web/dist/assets/TZUXETIT-C6qyTEYa.js +2 -0
  247. package/web/dist/assets/U7N72BGE-8vTdAst9.js +6 -0
  248. package/web/dist/assets/UFPIB6EZ-BVjLTP07.js +3 -0
  249. package/web/dist/assets/UO52YEYL-EHYBNpY5.js +3 -0
  250. package/web/dist/assets/VIK3ONSK-Cton0Rgg.js +2 -0
  251. package/web/dist/assets/VVVO4ZVP-CdFWI9EE.js +2 -0
  252. package/web/dist/assets/WRGXZO53-DYQ4OW92.js +3 -0
  253. package/web/dist/assets/X5SG7MGC-DtC_vaXe.js +2 -0
  254. package/web/dist/assets/XLHPVVFU-MQkW7HpM.js +2 -0
  255. package/web/dist/assets/XXYPNCD5-Ib-xj97c.js +5 -0
  256. package/web/dist/assets/Z6WRYFJC-C6TE3q4J.js +7 -0
  257. package/web/dist/assets/ZI2QNEGF-DwOKsV8B.js +8 -0
  258. package/web/dist/assets/{agent-task-pickers-CJAx53eR.js → agent-task-pickers-C_2o0KYX.js} +1 -1
  259. package/web/dist/assets/{alert-dialog-BugYooRk.js → alert-dialog-fzSWCIyG.js} +1 -1
  260. package/web/dist/assets/arrow-left-CpV00riO.js +1 -0
  261. package/web/dist/assets/{automation-format-Bxe-TVRX.js → automation-format-BgAhuFNq.js} +1 -1
  262. package/web/dist/assets/automations-route-Ca648Wyc.js +1 -0
  263. package/web/dist/assets/bundle-mjs-rHxsej31.js +1 -0
  264. package/web/dist/assets/button-vdGgKu1b.js +100 -0
  265. package/web/dist/assets/{centered-state-Cm8_dS47.js → centered-state-C1nDqaTs.js} +1 -1
  266. package/web/dist/assets/check-DA3yaTey.js +1 -0
  267. package/web/dist/assets/chevron-left-D1eW2pzs.js +1 -0
  268. package/web/dist/assets/chevron-right-DwqBinJp.js +1 -0
  269. package/web/dist/assets/{chunk-BO2N2NFS-CFvlB0rH.js → chunk-BO2N2NFS-Bde6epwZ.js} +4 -4
  270. package/web/dist/assets/circle-check-G0BDdNX3.js +1 -0
  271. package/web/dist/assets/clipboard-B9AGRj3s.js +1 -0
  272. package/web/dist/assets/{collapsible-BoDLSmkP.js → collapsible-Ci-k9Y0m.js} +1 -1
  273. package/web/dist/assets/{commit-list-C_l41PzR.js → commit-list-B8qutNJ9.js} +1 -1
  274. package/web/dist/assets/{compare-variants-Du6vJ7FF.js → compare-variants-CD-H9QV0.js} +1 -1
  275. package/web/dist/assets/dashboard-BuNIEyIc.js +44 -0
  276. package/web/dist/assets/diff-DdDwJ41q.js +3 -0
  277. package/web/dist/assets/{diff-view-D7b6T1ik.js → diff-view-D4eUaNtD.js} +4 -4
  278. package/web/dist/assets/{download-CHsOA7RH.js → download-C9cyRK4D.js} +1 -1
  279. package/web/dist/assets/facet-filter-BpaMiUU2.js +5 -0
  280. package/web/dist/assets/{file-Bu00nVUj.js → file-CcDDcqzK.js} +1 -1
  281. package/web/dist/assets/file-preview-DyqTWb0f.js +2 -0
  282. package/web/dist/assets/{file-text-CISqp5LY.js → file-text-C5N0APxx.js} +1 -1
  283. package/web/dist/assets/{git-pull-request-draft-D2Lm-pPz.js → git-pull-request-draft-Bqwhflhv.js} +1 -1
  284. package/web/dist/assets/git-tab-loading-BXSixY5p.js +1 -0
  285. package/web/dist/assets/git-toolbar-CB3F5Ztu.js +1 -0
  286. package/web/dist/assets/github-CjHl4MMe.js +1 -0
  287. package/web/dist/assets/{highlighted-body-OFNGDK62-CDHv8VkT.js → highlighted-body-OFNGDK62-k8gmH63p.js} +1 -1
  288. package/web/dist/assets/{host-usage-CRNpjHr0.js → host-usage-EIcPz8s9.js} +1 -1
  289. package/web/dist/assets/{icon-tooltip-BrV8FoZY.js → icon-tooltip-CCXhXgac.js} +1 -1
  290. package/web/dist/assets/index-C_k6g6fh.js +29 -0
  291. package/web/dist/assets/index-DvagaaKL.css +2 -0
  292. package/web/dist/assets/{input-6sILF4ZL.js → input-DXFchFdf.js} +1 -1
  293. package/web/dist/assets/layout-cards-DrC84hQa.js +1 -0
  294. package/web/dist/assets/lazy-DaFjwB-q.js +11 -0
  295. package/web/dist/assets/lib-xgA2N1t8.js +1 -0
  296. package/web/dist/assets/loader-circle-B2Lhi0xN.js +1 -0
  297. package/web/dist/assets/{markdown-DDUUmNxl.js → markdown-3VbTQcD0.js} +1 -1
  298. package/web/dist/assets/markdown-DxPHdOwB.js +4 -0
  299. package/web/dist/assets/mermaid-GHXKKRXX-CQo8vsdt.js +1 -0
  300. package/web/dist/assets/{message-square-CUcOsOeK.js → message-square-9JNzSy42.js} +1 -1
  301. package/web/dist/assets/plus-BHSN5Uog.js +1 -0
  302. package/web/dist/assets/preload-helper-Czpn1I53.js +1 -0
  303. package/web/dist/assets/{project-router-Uv5K_t7U.js → project-router-BzcW5R3O.js} +2 -2
  304. package/web/dist/assets/queries-XYjXpa8s.js +1 -0
  305. package/web/dist/assets/reference-chip-JX3G6Wkk.js +1 -0
  306. package/web/dist/assets/repo-git-CZTtXETi.js +1 -0
  307. package/web/dist/assets/{run-diff-CaQSFkcv.js → run-diff-C_s9tHfS.js} +2 -2
  308. package/web/dist/assets/{save-D8UGIAXq.js → save-B4O7rFCS.js} +1 -1
  309. package/web/dist/assets/{scroll-within-CEDDAUiO.js → scroll-within-DTBX-TR6.js} +1 -1
  310. package/web/dist/assets/{search-x-CG0S6SUu.js → search-x-CQPbQgV6.js} +1 -1
  311. package/web/dist/assets/{settings-2-ogt1zu3P.js → settings-2-CrmZbb_8.js} +1 -1
  312. package/web/dist/assets/skills-DXkSdyb8.js +1 -0
  313. package/web/dist/assets/{square-VAdlYQJn.js → square-DCg6avOT.js} +1 -1
  314. package/web/dist/assets/{tabs-BP29AtfS.js → tabs-Cb8MmIEQ.js} +1 -1
  315. package/web/dist/assets/{tag-4juVmU06.js → tag-CEWhwfVf.js} +1 -1
  316. package/web/dist/assets/task-commits-BruCWCkF.js +1 -0
  317. package/web/dist/assets/{task-graph-4GzVwwdu.js → task-graph-D_OLXJSk.js} +1 -1
  318. package/web/dist/assets/{task-notes-CCT7q8Fr.js → task-notes-DzOdZjqZ.js} +1 -1
  319. package/web/dist/assets/task-workspace-C5Conyc1.js +29 -0
  320. package/web/dist/assets/{terminal-DEjD4n5K.js → terminal-BVAfyHZI.js} +1 -1
  321. package/web/dist/assets/terminal-drawer-Dcg67RS8.js +3 -0
  322. package/web/dist/assets/{textarea-DJjpA11v.js → textarea-DywMDkfl.js} +1 -1
  323. package/web/dist/assets/{token-metrics-BJ1naBNS.js → token-metrics-BiFl2ovY.js} +1 -1
  324. package/web/dist/assets/{tooltip-BieGyrAz.js → tooltip-7suUQClM.js} +1 -1
  325. package/web/dist/assets/{tracker-DitRxloO.js → tracker-BFYcbTEV.js} +2 -2
  326. package/web/dist/assets/{triangle-alert-lwmk_SnN.js → triangle-alert-hMpQrXJS.js} +1 -1
  327. package/web/dist/assets/{upload-Dx8IzFX_.js → upload-Ddh5Fb-A.js} +1 -1
  328. package/web/dist/assets/use-now-BlhSvP80.js +1 -0
  329. package/web/dist/assets/{use-submit-shortcut-B-uDwQhP.js → use-submit-shortcut-BC7gmgDS.js} +1 -1
  330. package/web/dist/assets/workflow-graph-BljUjNdF.js +13 -0
  331. package/web/dist/assets/worktree-lifecycle-operation-psNUwGwT.js +18 -0
  332. package/web/dist/index.html +41 -41
  333. package/web/dist/assets/arrow-left-FG-BtI91.js +0 -1
  334. package/web/dist/assets/automations-route-BRN9qRg1.js +0 -1
  335. package/web/dist/assets/bundle-mjs-BT31bpU6.js +0 -1
  336. package/web/dist/assets/button-DFlig-3W.js +0 -100
  337. package/web/dist/assets/check-Bg7-Ecuy.js +0 -1
  338. package/web/dist/assets/chevron-left-Cd_qkrfl.js +0 -1
  339. package/web/dist/assets/chevron-right-7BUoNLSN.js +0 -1
  340. package/web/dist/assets/circle-check-D3dWBsEI.js +0 -1
  341. package/web/dist/assets/dashboard-BDtFQg4f.js +0 -44
  342. package/web/dist/assets/diff-DZjcij_W.js +0 -3
  343. package/web/dist/assets/diff-stat-BIAV32IP.js +0 -1
  344. package/web/dist/assets/facet-filter-BCQvQXmA.js +0 -5
  345. package/web/dist/assets/file-preview-B0UXYkxB.js +0 -2
  346. package/web/dist/assets/git-tab-loading-Dcf8fCoC.js +0 -1
  347. package/web/dist/assets/git-toolbar-aXyXLu2P.js +0 -1
  348. package/web/dist/assets/github-PjL79xgT.js +0 -1
  349. package/web/dist/assets/index-DvwYGTi3.css +0 -2
  350. package/web/dist/assets/index-DxwI2MZD.js +0 -25
  351. package/web/dist/assets/layout-cards-Det2whh-.js +0 -1
  352. package/web/dist/assets/lib-BQXq3kEf.js +0 -1
  353. package/web/dist/assets/loader-circle-DDkRpp8X.js +0 -1
  354. package/web/dist/assets/markdown-lc7gwiQQ.js +0 -4
  355. package/web/dist/assets/mermaid-GHXKKRXX-CbLTa2tM.js +0 -1
  356. package/web/dist/assets/plus-BqHBcC4w.js +0 -1
  357. package/web/dist/assets/queries-C09jaXiS.js +0 -1
  358. package/web/dist/assets/reference-chip-CHF-Sbml.js +0 -1
  359. package/web/dist/assets/repo-git-DT0rQqvz.js +0 -1
  360. package/web/dist/assets/skills-Cf8xEPei.js +0 -1
  361. package/web/dist/assets/task-commits-CyO2Q8jS.js +0 -1
  362. package/web/dist/assets/task-workspace-C6o0DzgB.js +0 -29
  363. package/web/dist/assets/terminal-drawer-TV4K7S4u.js +0 -3
  364. package/web/dist/assets/use-now-Cr9QvR5I.js +0 -1
  365. package/web/dist/assets/workflow-graph-g3f0xPwZ.js +0 -13
  366. package/web/dist/assets/worktree-lifecycle-operation-COUqhS7A.js +0 -18
  367. package/web/dist/assets/x-BrRT8S7Q.js +0 -1
@@ -0,0 +1,18 @@
1
+ import{r as e}from"./rolldown-runtime-QTnfLwEv.js";import{i as t,t as n}from"./react-runtime-CCIEwYL0.js";import{Cr as r,Dr as i,Nt as a,Oi as o,Qt as s,Ut as c,it as l,ja as u,r as ee,s as te,ta as d,u as f}from"./queries-XYjXpa8s.js";import{F as p,bt as m,r as h,t as g,yt as _}from"./button-vdGgKu1b.js";import{f as v,t as y}from"./project-router-BzcW5R3O.js";import{D as b,E as x,T as ne,a as re,i as ie,r as ae,w as S}from"./reference-chip-JX3G6Wkk.js";import{h as oe,l as se,m as ce,t as le}from"./use-now-BlhSvP80.js";import{Vt as ue,cn as de,d as fe,dn as C,f as pe,fn as me,h as he,m as ge,p as _e,sn as w}from"./git-tab-loading-BXSixY5p.js";import{n as ve}from"./file-CcDDcqzK.js";import{t as ye}from"./check-DA3yaTey.js";import{t as be}from"./icon-tooltip-CCXhXgac.js";import{t as xe}from"./loader-circle-B2Lhi0xN.js";import{t as Se}from"./use-submit-shortcut-BC7gmgDS.js";import{t as Ce}from"./square-DCg6avOT.js";import{n as we}from"./clipboard-B9AGRj3s.js";import{a as Te,c as T,i as E,n as Ee,o as D,r as De,s as Oe,t as O}from"./alert-dialog-fzSWCIyG.js";import{t as k}from"./centered-state-C1nDqaTs.js";var ke=p(`arrow-right`,[[`path`,{d:`M5 12h14`,key:`1ays0h`}],[`path`,{d:`m12 5 7 7-7 7`,key:`xquz4c`}]]),A=p(`grip-vertical`,[[`circle`,{cx:`9`,cy:`12`,r:`1`,key:`1vctgf`}],[`circle`,{cx:`9`,cy:`5`,r:`1`,key:`hp0tcf`}],[`circle`,{cx:`9`,cy:`19`,r:`1`,key:`fkjjf6`}],[`circle`,{cx:`15`,cy:`12`,r:`1`,key:`1tmaij`}],[`circle`,{cx:`15`,cy:`5`,r:`1`,key:`19l28e`}],[`circle`,{cx:`15`,cy:`19`,r:`1`,key:`f4zoj3`}]]),Ae=p(`mic`,[[`path`,{d:`M12 19v3`,key:`npa21l`}],[`path`,{d:`M19 10v2a7 7 0 0 1-14 0v-2`,key:`1vc78b`}],[`rect`,{x:`9`,y:`2`,width:`6`,height:`13`,rx:`3`,key:`s6n7sd`}]]),je=p(`paperclip`,[[`path`,{d:`m16 6-8.414 8.586a2 2 0 0 0 2.829 2.829l8.414-8.586a4 4 0 1 0-5.657-5.657l-8.379 8.551a6 6 0 1 0 8.485 8.485l8.379-8.551`,key:`1miecu`}]]),j=e(t(),1),M=new Set([`ai`,`cezar`,`agents`,`team`]);function N(e){return M.has(e.source)}function Me(e){return[...e].sort((e,t)=>Number(!N(e))-Number(!N(t)))}var P=5;function F(e,t,{mostUsedLimit:n=P}={}){let r=e.map((e,n)=>({skill:e,index:n,count:L(t,e.name)})).filter(e=>e.count>0).sort((e,t)=>t.count-e.count||Number(!N(e.skill))-Number(!N(t.skill))||e.index-t.index).slice(0,n).map(e=>e.skill),i=new Set(r),a=e.filter(e=>!i.has(e));return{mostUsed:r,project:a.filter(N),global:a.filter(e=>!N(e))}}function I(e,t){let n=F(e,t);return[...n.mostUsed,...n.project,...n.global]}function L(e,t){if(!e||!Object.hasOwn(e,t))return 0;let n=e[t];return typeof n==`number`?n:0}function Ne(e,t){return{...e,[t]:L(e,t)+1}}function Pe(e,t){if(t===``)return!0;let n=e.toLowerCase(),r=t.toLowerCase(),i=0;for(let e of r){if(i=n.indexOf(e,i),i===-1)return!1;i+=1}return!0}function Fe(e,t){let n=[];for(let r of e)for(let e of r.steps??[])e.skill===t&&n.push(`${r.name} › ${e.name??e.id}`);return n}var R=/[\s\-/_.]/;function z(e,t){let n=0;for(let r=e.indexOf(t);r!==-1;r=e.indexOf(t,r+1)){let i=1,a=e[r-1];if(r===0||a!==void 0&&R.test(a)){let n=e[r+t.length];i=n===void 0||R.test(n)?3:2}if(i>n&&(n=i),n===3)break}return n}function Ie(e,t,n){let r=t.toLowerCase().split(/\s+/).filter(Boolean);if(r.length===0)return 1;let i=[e,...n??[]].join(` `).toLowerCase(),a=0;for(let e of r){let t=z(i,e);if(t===0)return 0;a+=t}return a/(r.length*3)}function B(e,t){if(t===``)return 1;let n=e.toLowerCase(),r=t.toLowerCase();if(n===r)return 6;if(n.startsWith(r))return 5;let i=n.indexOf(r);if(i>0){let e=n[i-1];return e!==void 0&&R.test(e)?4:3}return+!!Pe(n,r)}function V(e,t){let n=e.split(`-`).filter(Boolean);return t?[...n,t]:n}var Le=10;function H(e,t,n){let r=n.toLowerCase().split(/\s+/).filter(Boolean);if(r.length===0)return 1;let i=0;for(let n of r){let r=B(e,n),a=t?B(t,n):0;if(r===0&&a===0)return 0;i+=r>0?r+Le:a}return i}var Re=.5;function U(e,t,n){return t.trim()===``?[...e]:e.map((e,r)=>{let i=H(e.name,e.description,t),a=L(n,e.name),o=Math.min(a,P)*Re;return{item:e,index:r,count:a,score:i>0?i+o:0}}).filter(e=>e.score>0).sort((e,t)=>t.score-e.score||t.count-e.count||e.index-t.index).map(e=>e.item)}function ze(e,t,n){return U(e,t,n)}function W(e,t){return U(e,t)}function Be(e,t,n){return U(I(e,n),t,n)}function G(e){let t=new Map;for(let n of e){let e=n.team?.repo??``,r=t.get(e)??{key:e,label:e===``?`This project & machine`:e,skills:[]};r.skills.push(n),t.set(e,r)}return[...t.values()].sort((e,t)=>Number(e.key!==``)-Number(t.key!==``))}function Ve(e){if(!(e instanceof HTMLElement))return!1;let t=e.tagName;return t===`INPUT`||t===`TEXTAREA`||t===`SELECT`||e.isContentEditable?!0:e.closest(`[contenteditable=""], [contenteditable="true"]`)!==null}function K(e){return e instanceof HTMLElement&&e.closest(`[cmdk-input]`)!==null}function He(e,t,{inEditable:n=!1}={}){if(typeof e.key!=`string`||e.key.toLowerCase()!==t.toLowerCase()||!e.metaKey&&!e.ctrlKey||e.altKey||e.shiftKey||e.repeat)return!1;if(Ve(e.target)&&!K(e.target)){if(!n)return!1;let t=ue();if(e.target instanceof HTMLElement&&e.target.closest(`.xterm`))return t&&e.metaKey;if(t?!e.metaKey:!e.ctrlKey)return!1}return!0}function Ue(e,t,n={}){let r=j.useRef(t);j.useLayoutEffect(()=>{r.current=t});let i=n.inEditable===!0;j.useEffect(()=>{let t=t=>{He(t,e,{inEditable:i})&&(t.preventDefault(),r.current(t))};return window.addEventListener(`keydown`,t),()=>window.removeEventListener(`keydown`,t)},[e,i])}function We(e,t){return!(typeof e.key!=`string`||e.key.toLowerCase()!==t.toLowerCase()||e.metaKey||e.ctrlKey||e.altKey||e.shiftKey||e.repeat||Ve(e.target))}function Ge(e,t=typeof navigator>`u`?``:navigator.platform){let n=e.toUpperCase();return/mac|iphone|ipad|ipod/i.test(t)?`⌘${n}`:`Ctrl+${n}`}function Ke(e,t){let n=j.useRef(t);j.useLayoutEffect(()=>{n.current=t}),j.useEffect(()=>{let t=t=>{We(t,e)&&n.current(t)};return window.addEventListener(`keydown`,t),()=>window.removeEventListener(`keydown`,t)},[e])}var q=`cezar:recent-tasks:v1`,J=null;function qe(){if(J)return J;try{let e=JSON.parse(window.localStorage.getItem(q)??`[]`);J=Array.isArray(e)?e.filter(e=>typeof e==`string`):[]}catch{J=[]}return J}function Je(){return qe()}function Y(e){let t=[e,...qe().filter(t=>t!==e)].slice(0,30);J=t;try{window.localStorage.setItem(q,JSON.stringify(t))}catch{}}function Ye(e,t,n){let r=new Map(n.map((e,t)=>[e,t])),i=e.filter(e=>r.has(t(e)));return i.sort((e,n)=>r.get(t(e))-r.get(t(n))),[...i,...e.filter(e=>!r.has(t(e)))]}var X=null,Z=null;function Xe(e){X=e}function Ze(e){X===e&&(X=null)}function Qe(e){return e!==void 0&&X?.runId===e?X:null}function $e(e,t){Z={runId:e,path:t}}function et(e){if(Z?.runId!==e)return null;let{path:t}=Z;return Z=null,t}var tt=[`claude`,`codex`,`junie`,`opencode`,`cursor`,`pi`,`copilot`],nt={claude:`Claude Code`,codex:`Codex`,opencode:`OpenCode`,cursor:`Cursor`,pi:`pi`,junie:`Junie`,copilot:`GitHub Copilot CLI`};function rt(e){if(typeof e!=`object`||!e||Array.isArray(e))return{};let t=e,n={};for(let e of tt){let r=t[e];typeof r==`string`&&r.length>0&&r.length<=128&&(n[e]=r)}return n}function it(e,t){if(!e)return[];let n=new Map(e.providers.map(e=>[e.provider,e]));return tt.flatMap(e=>{let r=n.get(e);return r?.status!==`disconnected`||!r.authFailureId||t[e]===r.authFailureId?[]:[{provider:e,label:nt[e],authFailureId:r.authFailureId}]})}function at(e,t){return{...e,...Object.fromEntries(t.map(({provider:e,authFailureId:t})=>[e,t]))}}function ot(e,t){if(!e)return;if(e.kind===`account-resume`)return`Waiting for this account's automatic resume`;t??=e.timeZone;let n=new Date(e.until);return`Waiting for usage limit reset · ${t?`${n.toLocaleTimeString(`en-GB`,{hour:`2-digit`,minute:`2-digit`,timeZone:t})} · ${t}`:n.toLocaleTimeString([],{hour:`2-digit`,minute:`2-digit`,timeZoneName:`short`})}`}function st(){let e=f(),t=l(),n=(e.data?.profiles??[]).map(e=>({provider:e.provider,id:e.id,label:e.label,configDir:e.configDir})),r=t.data?.info?.root;return{accounts:n,repoAccount:ct(r?e.data?.selections?.[r]:void 0,e.data?.defaults)}}function ct(e,t){let n={};for(let r of[t,e])for(let[e,t]of Object.entries(r??{}))t&&(n[e]=t);return Object.keys(n).length>0?n:void 0}function lt(e,t){return`${nt[e]} account "${t.replace(/"/g,``)}" is not signed in. Sign it in under Settings → Agent accounts, or choose another account for this task.`}function ut(e,t){let n=u(),r=f().data?.profiles.find(n=>n.provider===e&&n.id===t&&!n.isDefault),a=r?_(r):``,o=r?.status,c=te(a,r!==void 0&&o?.status!==`connected`).data?.status??(o?.status===`connected`?o:void 0),l=t=>r&&t!==void 0&&t!==`connected`?lt(e,r.label||r.id):null;return{blocked:l(c?.status),verify:async()=>{if(!r)return null;try{let e=await i(a,{refresh:!0});return n.setQueryData(s.agentAccountStatus(a),e),l(e.status.status)}catch{return null}}}}function dt(e,t){return e.filter(e=>e.provider===t).length>1}var ft=80,pt=m,mt=50,ht=200,gt=50,_t=[{id:`add-tests`,label:`Add tests`,text:`Also add or update tests covering this change.`},{id:`explain-change`,label:`Explain the change`,text:`Explain what changed and why before finishing.`},{id:`keep-minimal`,label:`Keep it minimal`,text:`Keep the change as small and targeted as possible — no unrelated refactors.`},{id:`update-docs`,label:`Update docs`,text:`Also update any relevant documentation or comments.`},{id:`check-edge-cases`,label:`Double-check edge cases`,text:`Double-check edge cases and error handling before finishing.`},{id:`review-open-prs`,label:`Review open PRs`,text:'Check this repository\'s open pull requests that still need a review (use `gh pr list --state open --json number,title,headRefName,isDraft,reviewDecision` and skip drafts and PRs already approved). For each one, dispatch a separate review task with `cez task create --kind review --review-of <headRefName> --title "Review PR #<number>" "Review pull request #<number> (<title>) on branch <headRefName>: read the diff, run the tests, and report a verdict with findings."`, at most 4 at a time. Then end your turn with CEZ:MONITORING and, when their reports arrive, summarise every verdict in one message. If `cez task create` is refused or unavailable, stop and report that dispatch is disabled on this cockpit — do not review the PRs yourself and do not use sub-agents instead.'},{id:`create-automation`,label:`Create an automation`,skills:[`create-cezar-automation`],text:`Create an automation for this repository.
2
+ Trigger: <when — e.g. every new pull request; every issue labelled \`needs-agent\`; every day at 04:00; weekdays at 07:30; every 6 hours>.
3
+ Task for each run: <what the launched task must do — e.g. review the diff, run the tests and post findings as a review comment>.
4
+ Leave it paused and, for a GitHub trigger, preview its matches so I can check the filter before enabling it.`}],vt=new Set([`review-open-prs`]),yt=new Set([`create-automation`]);function bt(e,t){return e.filter(e=>(t?.dispatch===!0||!vt.has(e.id))&&(t?.automations===!0||!yt.has(e.id)))}function xt(e){return!!e&&typeof e==`object`}function St(e){if(e===void 0||!Array.isArray(e))return _t.map(e=>({...e}));let t=new Set,n=[];for(let r of e){if(!xt(r))continue;let e=typeof r.id==`string`?r.id.trim():``,i=typeof r.label==`string`?r.label.trim():``,a=typeof r.text==`string`?r.text.trim():``;if(!e||!i||!a||t.has(e))continue;t.add(e);let o=Ct(r.skills);if(n.push({id:e,label:i.slice(0,ft),text:a.slice(0,pt),...o.length>0?{skills:o}:{}}),n.length>=mt)break}return n}function Ct(e){if(!Array.isArray(e))return[];let t=new Set;for(let n of e){if(typeof n!=`string`)continue;let e=n.trim();if(!(!e||t.has(e))&&(t.add(e.slice(0,ht)),t.size>=gt))break}return[...t]}function wt(e,t){if(t.length===0)return[];let n=new Set(t);return e.filter(e=>e.skills?.some(e=>n.has(e)))}function Tt(e,t){return wt(e,t).map(e=>e.text).join(`
5
+
6
+ `)}function Et(e,t,n,r=``){if(e===``||e===r||e===t){let e=r&&n?`${r}\n\n${n}`:r||n;return{text:e,applied:n?e:``}}return{text:e,applied:t}}function Dt(){return`tpl-${Date.now().toString(36)}-${Math.random().toString(36).slice(2,8)}`}function Ot(e,t,n){let r=Math.max(0,Math.min(t,e.length)),i=e.slice(0,r),a=e.slice(r),o=``;i.length>0&&(o=i.endsWith(`
7
+
8
+ `)?``:i.endsWith(`
9
+ `)?`
10
+ `:`
11
+
12
+ `);let s=a.replace(/^[ \t]+/,``),c=``;return s.length>0&&(c=s.startsWith(`
13
+
14
+ `)?``:s.startsWith(`
15
+ `)?`
16
+ `:`
17
+
18
+ `),{text:i+o+n+c+s,caret:i.length+o.length+n.length}}var Q=new Map;function kt(e){let t=Q.get(e.data);return t||(t=d(he(e)).then(e=>typeof e?.uploadId==`string`?e.uploadId:null,e=>(w(e),null)),Q.set(e.data,t),t.then(n=>{n===null&&Q.get(e.data)===t&&Q.delete(e.data)})),t}async function At(e){let t=await kt(e);return t===null?he(e):{uploadId:t,...e.originalName?{name:e.originalName}:{}}}function jt(e){for(let t of e){let e=Q.get(t.data);e&&(Q.delete(t.data),e.then(e=>e===null?void 0:r(e)).catch(()=>{}))}}function Mt(e){for(let t of e)Q.delete(t.data)}function Nt(e){return e instanceof Error&&e.message.includes(`attachment upload expired — attach the file again`)}async function Pt(e,t){if(e.length===0)return t([]);try{return await t(await Promise.all(e.map(At)))}catch(n){if(!Nt(n))throw n;Mt(e);try{let n=await t(await Promise.all(e.map(At)));return C(`recovered`),n}catch(e){throw C(`failed`),e}}}var Ft=new Set([`/`,`@`]);function It(e,t){for(let n=t-1;n>=0;--n){let r=e[n];if(/\s/.test(r))return null;if(Ft.has(r))return n>0&&!/\s/.test(e[n-1])?null:{trigger:r,start:n,query:e.slice(n+1,t)}}return null}function Lt(e,t,n,r){let i=`${t.trigger}${r} `;return{text:e.slice(0,t.start)+i+e.slice(n),caret:t.start+i.length}}function Rt(){let e=window;return e.SpeechRecognition??e.webkitSpeechRecognition}function zt(e,t){let n=e,r=``;for(let e=t.resultIndex;e<t.results.length;e+=1){let i=t.results[e],a=i[0]?.transcript??``;i.isFinal?n+=a:r+=a}return{finalText:n,interim:r}}var Bt=`Dictation needs https or localhost`,Vt=`Dictation is not available in this browser`,Ht=`Dictation needs a newer Cezar app — update it to use the microphone`;function Ut(){let e=window.__CEZ_DESKTOP__;return e?.platform!==`macos`&&document.documentElement.dataset.cezDesktop!==`macos`?null:{microphone:e?.microphone===!0}}function Wt(){return window.isSecureContext===!1?Bt:Kt?Vt:Ut()?.microphone===!1?Ht:null}function Gt(e){switch(e){case`aborted`:return null;case`no-speech`:return{message:`Dictation heard nothing — try again`,failure:null};case`not-allowed`:return{message:Ut()?`Microphone blocked — allow Cezar in System Settings → Privacy & Security → Microphone and Speech Recognition`:`Microphone blocked — allow it for this site in the browser's site settings`,failure:null};case`service-not-allowed`:return{message:Vt,failure:null};case`audio-capture`:return{message:`Dictation failed — no microphone was found`,failure:e};case`network`:return{message:`Dictation failed — the speech service could not be reached`,failure:e};default:return{message:`Dictation failed${e?` — ${e}`:``}`,failure:e||`unknown`}}}var Kt=!1;function qt(e){let[t,n]=j.useState(null),r=j.useRef(null),i=j.useRef(``),[a]=j.useState(()=>Rt()!==void 0),[o,s]=j.useState(Wt),c=j.useCallback(()=>{let e=r.current;r.current=null,i.current=``,n(null),e&&(e.onresult=null,e.onerror=null,e.onend=null,e.abort())},[]);return j.useEffect(()=>c,[c]),{supported:a,unavailable:o,recording:t,start:j.useCallback(()=>{if(r.current||o)return;let t=Rt();if(!t)return;let a;try{a=new t,a.lang=navigator.language||`en-US`,a.continuous=!0,a.interimResults=!0;let o=Date.now();a.onresult=e=>{let t=zt(i.current,e);i.current=t.finalText,n({transcript:t.finalText+t.interim,startedAt:o})},a.onerror=t=>{c(),t.error===`service-not-allowed`&&(Kt=!0,s(Vt));let n=Gt(t.error);n&&e(n)},a.start(),r.current=a,n({transcript:``,startedAt:o})}catch{e({message:`Dictation failed — the microphone could not be started`,failure:`start-threw`}),c()}},[e,c,o]),cancel:j.useCallback(()=>c(),[c]),finish:j.useCallback(()=>{let e=r.current,a=(i.current+``).trim()===``?``:i.current,o=t?.transcript??a;return e&&(e.onresult=null,e.onerror=null,e.onend=null,e.stop()),r.current=null,i.current=``,n(null),o.trim()},[t])}}function Jt(e,t){let n=Math.max(0,Math.floor((t-e)/1e3));return`${Math.floor(n/60)}:${String(n%60).padStart(2,`0`)}`}var $=n(),Yt={KeyA:`Yes, approved.`,KeyC:`Continue.`};function Xt(e){let t=[];for(let n=e.parentElement;n;n=n.parentElement)n.scrollTop>0&&t.push([n,n.scrollTop]);return t}function Zt({onSubmit:e,value:t,onValueChange:n,images:r,onImagesChange:i,autoFocus:s=!1,draftItems:l,footerStart:te,footerEnd:d,sendAriaLabel:f=`Send`,sendLabel:p,sendMenu:m,sendShortcut:_,stop:y,disabled:b=!1,submitDisabled:x=!1,disabledReason:ne=`Session closed — Continue to reopen.`,allowEmptySubmit:S=!1,placeholder:le=`Reply — / for skills, @ for files…`,ariaLabel:ue=`Reply to the agent`,autocompleteSkills:C=!0,quickReplies:he=!1,getMentionCandidates:w,ref:ye}){let[xe,Te]=(0,j.useState)(``),T=t??xe,E=(0,j.useRef)(T);E.current=T;let Ee=(0,j.useRef)(n);Ee.current=n;let D=(0,j.useCallback)(e=>{let t=typeof e==`function`?e(E.current):e;Te(t),Ee.current?.(t)},[]),[De,Oe]=(0,j.useState)([]),O=r??De,k=(0,j.useRef)(O);k.current=O;let ke=(0,j.useRef)(i);ke.current=i;let A=(0,j.useCallback)((e,t=`edit`)=>{let n=typeof e==`function`?e(k.current):e;k.current=n,Oe(n),ke.current?.(n,t)},[]),[M,Me]=(0,j.useState)(!1),[P,F]=(0,j.useState)(null),[I,L]=(0,j.useState)(``),[Fe,R]=(0,j.useState)(!1),z=(0,j.useRef)(null),Ie=(0,j.useRef)(null),B=(0,j.useRef)(null),V=(0,j.useRef)(new Map),Le=a(C&&Fe),H=c(),Re=u(),U=qt(({message:e,failure:t})=>{t&&de(t),v(e,t?{tone:`danger`,reported:!0}:{})});(0,j.useEffect)(()=>{s&&z.current?.focus()},[]),(0,j.useImperativeHandle)(ye,()=>({insertAtCaret:e=>{let t=z.current,n=Ot(E.current,t?.selectionStart??E.current.length,e);D(n.text),B.current=n.caret,t?.focus()}}),[D]);let ze=(0,j.useCallback)(()=>{let e=z.current;if(!e||b){F(null);return}let t=It(e.value,e.selectionStart??e.value.length);if(t?.trigger===`/`&&!C||t?.trigger===`@`&&w===void 0)return F(null);t?.trigger===`/`&&R(!0),F(t)},[C,b,w]),W=(0,j.useMemo)(()=>P===null?[]:P.trigger===`/`?Be(Le.data??[],P.query,H.data?.skillUsage).map(e=>({value:`${e.name} ${e.path}`,insert:e.name,label:e.name,description:e.description,emphasized:N(e)})):(w?.()??[]).filter(e=>Pe(e,P.query)).map(e=>({value:e,insert:e,label:e,emphasized:!1})),[w,Le.data,P,H.data?.skillUsage]),G=W.some(e=>e.value===I)?I:W[0]?.value,K=P!==null,He=(0,j.useCallback)(()=>F(null),[]),Ue=e=>{let t=z.current;if(!t||P===null)return;let n=t.selectionStart??t.value.length,r=Lt(t.value,P,n,e.insert);P.trigger===`/`&&H.data!==void 0&&o({skillUsage:Ne(H.data.skillUsage,e.insert)}).then(()=>Re.invalidateQueries({queryKey:ee.uiState})).catch(()=>{}),D(r.text),B.current=r.caret,F(null),t.focus()};(0,j.useEffect)(()=>{!K||G==null||V.current.get(G)?.scrollIntoView({block:`nearest`})},[G,K]),(0,j.useLayoutEffect)(()=>{let e=B.current,t=z.current;e!==null&&t&&(t.setSelectionRange(e,e),B.current=null)},[T]),(0,j.useLayoutEffect)(()=>{let e=z.current;if(!e)return;let t=Xt(e);e.style.height=`auto`,e.style.height=`${Math.min(e.scrollHeight,220)}px`;for(let[e,n]of t)e.scrollTop!==n&&(e.scrollTop=n)},[T]);let We=(0,j.useCallback)((e,t=`file`)=>{if(b)return;let n=ge(e,k.current.length,pe(k.current));for(let e of n.rejected)v(e,{tone:`danger`,expected:!0});for(let e of n.accepted)_e(e,t).then(e=>{let t=fe(k.current,e);t&&(kt(e),A(t))},t=>{let n=t instanceof DOMException&&t.name===`NotFoundError`;v(`“${e.name}” could not be read${n?` — a folder, or a file that no longer exists`:``}`,{tone:`danger`,expected:n})})},[b]),Ge=e=>{let t=[...e.clipboardData?.items??[]].filter(e=>e.kind===`file`).map(e=>e.getAsFile()).filter(e=>e!==null);t.length!==0&&(e.preventDefault(),We(t,`clipboard`))},Ke=e=>{let t=[...e.dataTransfer?.files??[]];t.length!==0&&(e.preventDefault(),We(t))},q=(0,j.useCallback)(async(t,n,r,i)=>{let a=t.trim();if(!(b||x||M)&&!(a===``&&n.length===0&&!S)){Me(!0);try{await Pt(n,t=>i?e(a,t,i):e(a,t)),jt(n),me(n.length)}catch(e){if(v(e instanceof Error?e.message:String(e),{tone:`danger`}),r){D(e=>e===``?t:`${t}\n${e}`);let e=[],r=k.current.reduce((t,n)=>{let r=fe(t,n);return r||e.push(n),r??t},n);for(let t of e)v(`“${t.name}” removed — the restored message fills the attachment limit`,{tone:`danger`});A(r)}}finally{Me(!1)}}},[S,M,b,x,e]),J=(0,j.useCallback)(()=>{if(b||x||M||T.trim()===``&&O.length===0&&!S)return;let e=T,t=O;D(``),A([],`submit`),F(null),q(e,t,!0)},[S,M,b,x,O,q,T]),qe=e=>{if(K){if(e.key===`ArrowDown`||e.key===`ArrowUp`){if(e.preventDefault(),W.length===0)return;let t=W.findIndex(e=>e.value===G),n=e.key===`ArrowDown`?1:-1,r=W[(t+n+W.length)%W.length];L(r.value);return}if(e.key===`Escape`){e.preventDefault(),He();return}if((e.key===`Enter`||e.key===`Tab`)&&!e.shiftKey){let t=W.find(e=>e.value===G);if(t){e.preventDefault(),Ue(t);return}He()}}if(e.key===`Escape`&&!e.nativeEvent.isComposing&&!e.shiftKey&&!e.metaKey&&!e.ctrlKey&&!e.altKey){e.currentTarget.blur();return}Se({key:e.key,shiftKey:e.shiftKey,metaKey:e.metaKey,ctrlKey:e.ctrlKey,altKey:e.altKey,repeat:e.repeat,isComposing:e.nativeEvent.isComposing})&&(e.preventDefault(),J())};(0,j.useEffect)(()=>{if(!he||b)return;let e=e=>{if(!e.altKey||e.metaKey||e.ctrlKey||e.repeat||Ve(e.target))return;let t=Yt[e.code];t!==void 0&&(e.preventDefault(),q(t,[],!1,{quickReply:!0}))};return window.addEventListener(`keydown`,e),()=>window.removeEventListener(`keydown`,e)},[b,he,q]);let Je=e=>{let t=U.finish();if(t===``)return;let n=T.trim()===``?t:`${T.replace(/\s*$/,``)} ${t}`;if(e){D(``),A([],`submit`),q(n,O,!0);return}D(n),B.current=n.length,z.current?.focus()},Y=U.recording,Ye=b||x||M||T.trim()===``&&O.length===0&&!S,X=(0,$.jsxs)(g,{type:`button`,size:p?`sm`:`icon-sm`,"aria-label":f,disabled:Ye,className:h(p?`h-8`:`size-8`,m&&`rounded-r-none`),onClick:J,children:[(0,$.jsx)(ve,{"aria-hidden":`true`}),p]}),Z=_?(0,$.jsx)(be,{side:`top`,label:(0,$.jsxs)(`span`,{"data-slot":`composer-send-shortcut`,className:`flex items-center gap-2`,children:[p??f,(0,$.jsx)(`kbd`,{className:`font-sans opacity-70`,children:_})]}),children:X}):X;return(0,$.jsxs)(ae,{open:K,onOpenChange:e=>e?void 0:He(),children:[(0,$.jsx)(ie,{asChild:!0,children:(0,$.jsxs)(`div`,{ref:Ie,"data-slot":`composer`,"data-disabled":b||void 0,onDrop:Ke,onDragOver:e=>e.preventDefault(),className:h(`rounded-xl border border-border bg-card shadow-xs transition-[border-color,box-shadow]`,`focus-within:border-ring focus-within:ring-[3px] focus-within:ring-ring/15`,b&&`opacity-80`),children:[O.length>0||l?(0,$.jsxs)(`div`,{"data-slot":`composer-thumbs`,className:`flex flex-wrap items-center gap-2 px-4 pt-3`,children:[l,O.map((e,t)=>(0,$.jsxs)(`button`,{type:`button`,"aria-label":`Remove ${e.name}`,title:`Click to remove`,className:h(`group relative overflow-hidden rounded-md border border-border`,e.isImage?`size-12`:`flex h-12 max-w-[200px] items-center gap-1.5 bg-muted/40 px-2.5 text-xs text-muted-foreground`),onClick:()=>{jt([e]),A(e=>e.filter((e,n)=>n!==t))},children:[e.isImage?(0,$.jsx)(`img`,{src:e.preview,alt:``,className:`size-full object-cover`}):(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(je,{"aria-hidden":`true`,className:`size-3.5 shrink-0`}),(0,$.jsx)(`span`,{className:`truncate`,children:e.name})]}),(0,$.jsx)(`span`,{className:`absolute inset-0 hidden items-center justify-center bg-background/70 group-hover:flex group-focus-visible:flex`,children:(0,$.jsx)(we,{"aria-hidden":`true`,className:`size-4`})})]},`${e.name}-${t}`))]}):null,(0,$.jsx)(`textarea`,{ref:z,rows:1,value:T,disabled:b,"aria-label":ue,placeholder:b?ne:le,className:`block max-h-[220px] min-h-11 w-full resize-none bg-transparent px-3 pt-2.5 pb-1 text-base leading-normal outline-none placeholder:text-muted-foreground disabled:cursor-not-allowed md:min-h-[54px] md:px-4 md:pt-3 md:text-sm`,onChange:e=>{D(e.target.value),ze()},onKeyDown:qe,onSelect:ze,onPaste:Ge}),Y?(0,$.jsx)($t,{transcript:Y.transcript,startedAt:Y.startedAt,onCancel:U.cancel,onInsert:()=>Je(!1),onInsertAndSend:()=>Je(!0)}):(0,$.jsxs)(`div`,{className:`flex flex-wrap items-center gap-1 gap-y-1 px-1.5 pt-1 pb-1.5 md:gap-y-1.5 md:px-2 md:pt-1.5 md:pb-2`,children:[(0,$.jsxs)(`div`,{"data-slot":`composer-footer-start`,className:`flex min-w-0 flex-wrap items-center gap-1`,children:[(0,$.jsx)(Qt,{disabled:b,onFiles:We}),te]}),(0,$.jsxs)(`div`,{className:`ml-auto flex items-center gap-1`,children:[U.supported&&U.unavailable?(0,$.jsx)(be,{label:U.unavailable,side:`top`,children:(0,$.jsxs)(g,{type:`button`,variant:`ghost`,size:`sm`,"aria-disabled":`true`,"aria-label":`Start dictation`,className:`h-8 cursor-not-allowed gap-1.5 px-2.5 text-xs font-medium text-muted-foreground opacity-50 hover:bg-transparent`,children:[(0,$.jsx)(Ae,{"aria-hidden":`true`,className:`size-3.5`}),`Dictation`]})}):U.supported?(0,$.jsxs)(g,{type:`button`,variant:`ghost`,size:`sm`,disabled:b,"aria-label":`Start dictation`,title:`Dictation`,className:`h-8 gap-1.5 px-2.5 text-xs font-medium text-muted-foreground`,onClick:U.start,children:[(0,$.jsx)(Ae,{"aria-hidden":`true`,className:`size-3.5`}),`Dictation`]}):null,d?(0,$.jsx)(`div`,{"data-slot":`composer-footer-end`,className:`flex items-center gap-1.5`,children:d}):null,y?(0,$.jsx)(be,{label:y.label,side:`top`,children:(0,$.jsx)(g,{type:`button`,size:`icon-sm`,variant:`contrast`,"data-slot":`composer-stop`,"aria-label":y.label,disabled:y.pending,className:`size-8`,onClick:y.onStop,children:(0,$.jsx)(Ce,{"aria-hidden":`true`,className:`size-3 fill-current`})})}):null,!y||T.trim()!==``||O.length>0||S?m?(0,$.jsxs)(`div`,{"data-slot":`composer-send`,className:`flex transform-gpu items-center`,children:[Z,(0,$.jsx)(`div`,{"data-slot":`composer-send-menu`,className:h(`flex`,Ye&&`opacity-50 hover:opacity-100 focus-within:opacity-100`),children:m})]}):Z:null]})]})]})}),(0,$.jsx)(re,{side:`top`,align:`start`,sideOffset:8,className:`w-80 max-w-[calc(100vw-2rem)] p-0`,onOpenAutoFocus:e=>e.preventDefault(),onInteractOutside:e=>{Ie.current?.contains(e.target)&&e.preventDefault()},children:(0,$.jsx)(se,{shouldFilter:!1,value:G??``,onValueChange:L,children:(0,$.jsx)(oe,{"data-slot":`composer-menu`,"data-trigger":P?.trigger,className:`max-h-[min(16rem,var(--radix-popover-content-available-height))] p-1`,children:W.length===0?(0,$.jsx)(`p`,{className:`px-3 py-4 text-center text-xs text-muted-foreground`,children:P?.trigger===`@`?`No files seen in this session yet — full file search arrives with the Files tab.`:Le.isPending?`Loading skills…`:`No matching skills.`}):W.map(e=>(0,$.jsxs)(ce,{ref:t=>{t?V.current.set(e.value,t):V.current.delete(e.value)},value:e.value,"data-slot":`composer-menu-item`,"data-emphasized":e.emphasized||void 0,onSelect:()=>Ue(e),children:[(0,$.jsx)(`span`,{className:h(`shrink-0 truncate`,e.emphasized&&`font-semibold`,P?.trigger===`@`&&`font-mono text-xs`),children:e.label}),e.description?(0,$.jsx)(`span`,{className:`min-w-0 flex-1 truncate text-xs text-soft-foreground`,children:e.description}):null]},e.value))})})})]})}function Qt({disabled:e,onFiles:t}){let n=(0,j.useRef)(null);return(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(g,{type:`button`,variant:`ghost`,size:`icon-sm`,"aria-label":`Attach files`,title:`Attach images or files (or paste a screenshot)`,disabled:e,className:`size-8 text-muted-foreground`,onClick:()=>n.current?.click(),children:(0,$.jsx)(je,{"aria-hidden":`true`,className:`size-[15px]`})}),(0,$.jsx)(`input`,{ref:n,type:`file`,multiple:!0,className:`hidden`,"aria-hidden":`true`,tabIndex:-1,onChange:e=>{t([...e.target.files??[]]),e.target.value=``}})]})}function $t({transcript:e,startedAt:t,onCancel:n,onInsert:r,onInsertAndSend:i}){let a=le(1e3);return(0,$.jsxs)(`div`,{"data-slot":`dictation-overlay`,role:`status`,"aria-label":`Dictation in progress`,className:`flex items-center gap-2.5 rounded-b-xl border-t border-border bg-muted/60 px-3 py-2`,children:[(0,$.jsx)(`span`,{"aria-hidden":`true`,className:`size-2 flex-none animate-pulse rounded-full bg-danger motion-reduce:animate-none`}),(0,$.jsx)(`span`,{"data-slot":`dictation-timer`,className:`text-xs font-medium text-muted-foreground tabular-nums`,children:Jt(t,a)}),(0,$.jsx)(`span`,{"data-slot":`dictation-transcript`,"aria-live":`polite`,className:`min-w-0 flex-1 truncate text-sm text-foreground`,children:e===``?(0,$.jsx)(`span`,{className:`text-muted-foreground`,children:`Listening…`}):e}),(0,$.jsx)(g,{type:`button`,variant:`ghost`,size:`icon-sm`,"aria-label":`Cancel dictation`,className:`size-8 text-muted-foreground`,onClick:n,children:(0,$.jsx)(we,{"aria-hidden":`true`})}),(0,$.jsx)(g,{type:`button`,variant:`outline`,size:`icon-sm`,"aria-label":`Insert transcription`,className:`size-8`,onClick:r,children:(0,$.jsx)(ye,{"aria-hidden":`true`})}),(0,$.jsx)(g,{type:`button`,size:`icon-sm`,"aria-label":`Insert transcription and send`,className:`size-8`,onClick:i,children:(0,$.jsx)(ve,{"aria-hidden":`true`})})]})}function en(){return(0,$.jsx)(`div`,{"data-route":`task-thread`,className:`flex min-h-full flex-col`,children:(0,$.jsx)(k,{icon:(0,$.jsx)(xe,{className:`motion-safe:animate-spin`}),tone:`neutral`,title:`Loading task…`,subtitle:`Fetching the run and its session transcript.`})})}var tn={retry:`Retry`,"start-anyway":`Start task anyway`,"cancel-task":`Cancel task`,"keep-worktree":`Keep worktree`,"force-delete":`Force delete`,stop:`Stop scripts`},nn=new Set([`start-anyway`,`cancel-task`,`keep-worktree`,`force-delete`]);function rn(e,t){switch(e){case`force-delete`:return`Skip remaining cleanup commands and ${t.intent===`delete-task`?`delete this task and its worktree`:`remove this worktree`}? Containers, volumes, and other resources may remain. ${t.intent===`reclaim`?`The task branch is kept.`:`The managed task branch is removed.`}`;case`start-anyway`:return`Start the task with an incomplete environment? Remaining setup commands will be skipped.`;case`cancel-task`:return`Cancel this task? The worktree and resources already created are kept; cleanup remains explicit.`;case`keep-worktree`:return`Keep this worktree and suppress automatic cleanup for this generation? Some resources may already have been stopped.`;default:return``}}function an(e){return e.state===`completed`?e.phase===`setup`?`Worktree ready`:`Worktree cleanup complete`:e.state===`bypassed`?`Setup bypassed`:e.state===`kept`?`Worktree kept — automatic cleanup suppressed`:e.state===`cancelled`?`Task cancelled — worktree retained`:e.state===`needs_attention`||e.state===`interrupted`?e.phase===`setup`?`Setup needs attention`:`Cleanup needs attention`:e.state===`committing`?e.phase===`setup`?`Finishing worktree preparation`:`Removing worktree`:e.phase===`setup`?`Preparing worktree`:`Cleaning up worktree`}function on({operationId:e,worktreePath:t,taskTitle:n}){let r=ne(e),i=S(e),[a,o]=(0,j.useState)(null),[s,c]=(0,j.useState)(!1),l=x(e,s),u=(0,j.useRef)(null),[ee,te]=(0,j.useState)(Date.now()),d=r.data?.operation.state===`running`;if((0,j.useEffect)(()=>{if(!d)return;let e=setInterval(()=>te(Date.now()),1e3);return()=>clearInterval(e)},[d]),r.isPending)return(0,$.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:`Loading worktree operation…`});if(r.isError)return(0,$.jsxs)(`p`,{role:`alert`,className:`text-xs text-danger`,children:[`Worktree operation could not load: `,r.error.message]});let f=r.data.operation,p=async e=>{o(null);try{await i.mutateAsync({action:e,requestId:crypto.randomUUID(),expectedRevision:f.revision}),u.current?.focus()}catch{}},m=[...new Map((l.data?.pages.flatMap(e=>e.items)??[]).map(e=>[e.seq,e])).values()].sort((e,t)=>e.seq-t.seq),h=[`queued`,`running`,`committing`].includes(f.state),_=[`completed`,`bypassed`,`cancelled`,`kept`].includes(f.state);return(0,$.jsxs)(`section`,{"data-slot":`worktree-lifecycle-operation`,className:`rounded-lg border border-border bg-card p-3 text-sm`,children:[(0,$.jsx)(`h2`,{ref:u,tabIndex:-1,className:`font-medium outline-none`,"aria-live":`polite`,children:an(f)}),n?(0,$.jsx)(`p`,{className:`mt-1 break-words text-xs text-muted-foreground`,children:n}):null,t?(0,$.jsx)(`p`,{className:`mt-1 break-all font-mono text-[11px] text-muted-foreground`,children:t}):null,f.phase===`setup`&&h?(0,$.jsx)(`p`,{className:`mt-1 text-xs text-muted-foreground`,children:`The agent starts after worktree preparation finishes.`}):null,f.error?_?(0,$.jsxs)(`details`,{className:`mt-2 break-words text-xs text-muted-foreground`,children:[(0,$.jsx)(`summary`,{className:`cursor-pointer`,children:`Previous operation error`}),(0,$.jsx)(`p`,{className:`mt-1`,children:f.error})]}):(0,$.jsxs)(`p`,{role:`alert`,className:`mt-2 break-words text-xs text-danger`,children:[f.failureStage===`commit`?`Scripts completed, but the worktree transition failed. `:``,f.error]}):null,(0,$.jsx)(`ol`,{className:`mt-3 space-y-2`,children:f.entries.map(e=>{let t=[...f.history].reverse().find(t=>t.entryId===e.entryId&&t.commandPreview===e.commandPreview),n=t?Math.max(0,Math.round(((t.finishedAt?Date.parse(t.finishedAt):ee)-Date.parse(t.startedAt))/1e3)):void 0;return(0,$.jsxs)(`li`,{className:`rounded border border-border px-2 py-1.5`,children:[(0,$.jsxs)(`div`,{className:`flex flex-wrap justify-between gap-1 text-xs`,children:[(0,$.jsx)(`span`,{className:`break-words font-medium`,children:e.label}),(0,$.jsxs)(`span`,{className:`text-muted-foreground`,children:[e.state.replaceAll(`-`,` `),e.attempt?` · attempt ${e.attempt}`:``,n===void 0?``:` · ${n}s`]})]}),(0,$.jsx)(`pre`,{className:`mt-1 whitespace-pre-wrap break-all text-[11px] text-muted-foreground`,children:e.commandPreview})]},e.entryId)})}),f.history.length?(0,$.jsxs)(`details`,{className:`mt-3 text-xs`,children:[(0,$.jsxs)(`summary`,{className:`cursor-pointer text-muted-foreground`,children:[`Attempt history (`,f.history.length,`)`]}),(0,$.jsx)(`ol`,{className:`mt-2 space-y-2`,children:f.history.map(e=>(0,$.jsxs)(`li`,{children:[(0,$.jsxs)(`span`,{children:[e.label,` · attempt `,e.attempt,` · `,e.state]}),(0,$.jsx)(`pre`,{className:`whitespace-pre-wrap break-all text-[11px] text-muted-foreground`,children:e.commandPreview}),e.reason?(0,$.jsx)(`p`,{className:`text-danger`,children:e.reason}):null]},e.id))})]}):null,f.allowedActions.includes(`retry`)?(0,$.jsx)(`p`,{className:`mt-2 text-xs text-muted-foreground`,children:`Retry loads current saved scripts. Unchanged completed commands stay completed; edited commands run again.`}):null,(0,$.jsxs)(`div`,{className:`mt-3 flex flex-wrap gap-2`,children:[f.allowedActions.map(e=>(0,$.jsx)(g,{size:`sm`,variant:e===`force-delete`||e===`cancel-task`?`danger-ghost`:`outline`,disabled:i.isPending,onClick:()=>nn.has(e)?o(e):void p(e),children:tn[e]},e)),(0,$.jsx)(g,{size:`sm`,variant:`ghost`,asChild:!0,children:(0,$.jsx)(y,{to:`/settings/worktrees?operation=${encodeURIComponent(e)}`,children:`Edit scripts`})}),(0,$.jsx)(g,{size:`sm`,variant:`ghost`,"aria-expanded":s,onClick:()=>c(e=>!e),children:s?`Hide output`:`Show output`})]}),i.isError?(0,$.jsx)(`p`,{role:`alert`,className:`mt-2 text-xs text-danger`,children:i.error.message}):null,s?(0,$.jsxs)(`div`,{className:`mt-3`,children:[l.isPending?(0,$.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:`Loading output…`}):null,l.isError?(0,$.jsxs)(`p`,{role:`alert`,className:`text-xs text-danger`,children:[`Output could not load: `,l.error.message]}):null,l.data?.pages.some(e=>e.truncated)?(0,$.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:`Some earlier output was truncated.`}):null,(0,$.jsx)(`pre`,{"aria-label":`Script output`,className:`max-h-64 overflow-auto whitespace-pre-wrap break-all rounded bg-muted p-2 text-[11px]`,children:m.map(e=>e.text).join(``)||`No output recorded.`}),l.hasNextPage?(0,$.jsx)(g,{size:`sm`,variant:`ghost`,disabled:l.isFetchingNextPage,onClick:()=>void l.fetchNextPage(),children:`Load more output`}):null]}):null,(0,$.jsx)(O,{open:a!==null,onOpenChange:e=>{e||o(null)},children:(0,$.jsxs)(E,{children:[(0,$.jsxs)(Oe,{children:[(0,$.jsx)(T,{children:a?tn[a]:`Confirm action`}),(0,$.jsxs)(Te,{children:[a?rn(a,f):``,(0,$.jsx)(`span`,{className:`mt-2 block break-all font-medium`,children:n??t??`Worktree operation ${e}`})]})]}),(0,$.jsxs)(D,{children:[(0,$.jsx)(De,{children:`Go back`}),(0,$.jsx)(Ee,{onClick:()=>{a&&p(a)},children:a?tn[a]:`Continue`})]})]})})]})}function sn({worktreeId:e,operationId:t,worktreePath:n,taskTitle:r}){let i=b(e,!t),a=t??[...i.data?.worktree.history??[]].sort((e,t)=>t.createdAt.localeCompare(e.createdAt))[0]?.id;return a?(0,$.jsx)(on,{operationId:a,worktreePath:n,taskTitle:r}):null}export{Ue as A,H as B,Qe as C,Y as D,Je as E,N as F,je as G,W as H,Ie as I,A as K,Me as L,Ne as M,Be as N,Ge as O,G as P,I as R,et as S,Ye as T,V as U,ze as V,Fe as W,at as _,_t as a,Xe as b,bt as c,St as d,Et as f,ot as g,ut as h,Zt as i,Ke as j,Ve as k,Ot as l,st as m,sn as n,pt as o,dt as p,ke as q,en as r,Tt as s,on as t,Dt as u,rt as v,Ze as w,$e as x,it as y,F as z};
@@ -44,51 +44,51 @@
44
44
  }
45
45
  })()
46
46
  </script>
47
- <script type="module" crossorigin src="/assets/index-DxwI2MZD.js"></script>
47
+ <script type="module" crossorigin src="/assets/index-C_k6g6fh.js"></script>
48
48
  <link rel="modulepreload" crossorigin href="/assets/rolldown-runtime-QTnfLwEv.js">
49
49
  <link rel="modulepreload" crossorigin href="/assets/react-runtime-CCIEwYL0.js">
50
- <link rel="modulepreload" crossorigin href="/assets/bundle-mjs-BT31bpU6.js">
51
- <link rel="modulepreload" crossorigin href="/assets/button-DFlig-3W.js">
52
- <link rel="modulepreload" crossorigin href="/assets/queries-C09jaXiS.js">
53
- <link rel="modulepreload" crossorigin href="/assets/project-router-Uv5K_t7U.js">
54
- <link rel="modulepreload" crossorigin href="/assets/tooltip-BieGyrAz.js">
55
- <link rel="modulepreload" crossorigin href="/assets/circle-check-D3dWBsEI.js">
56
- <link rel="modulepreload" crossorigin href="/assets/triangle-alert-lwmk_SnN.js">
57
- <link rel="modulepreload" crossorigin href="/assets/git-pull-request-draft-D2Lm-pPz.js">
58
- <link rel="modulepreload" crossorigin href="/assets/x-BrRT8S7Q.js">
59
- <link rel="modulepreload" crossorigin href="/assets/token-metrics-BJ1naBNS.js">
60
- <link rel="modulepreload" crossorigin href="/assets/reference-chip-CHF-Sbml.js">
61
- <link rel="modulepreload" crossorigin href="/assets/use-now-Cr9QvR5I.js">
62
- <link rel="modulepreload" crossorigin href="/assets/check-Bg7-Ecuy.js">
63
- <link rel="modulepreload" crossorigin href="/assets/facet-filter-BCQvQXmA.js">
50
+ <link rel="modulepreload" crossorigin href="/assets/bundle-mjs-rHxsej31.js">
51
+ <link rel="modulepreload" crossorigin href="/assets/button-vdGgKu1b.js">
52
+ <link rel="modulepreload" crossorigin href="/assets/queries-XYjXpa8s.js">
53
+ <link rel="modulepreload" crossorigin href="/assets/preload-helper-Czpn1I53.js">
54
+ <link rel="modulepreload" crossorigin href="/assets/project-router-BzcW5R3O.js">
55
+ <link rel="modulepreload" crossorigin href="/assets/tooltip-7suUQClM.js">
56
+ <link rel="modulepreload" crossorigin href="/assets/circle-check-G0BDdNX3.js">
57
+ <link rel="modulepreload" crossorigin href="/assets/triangle-alert-hMpQrXJS.js">
58
+ <link rel="modulepreload" crossorigin href="/assets/git-pull-request-draft-Bqwhflhv.js">
59
+ <link rel="modulepreload" crossorigin href="/assets/clipboard-B9AGRj3s.js">
60
+ <link rel="modulepreload" crossorigin href="/assets/token-metrics-BiFl2ovY.js">
61
+ <link rel="modulepreload" crossorigin href="/assets/reference-chip-JX3G6Wkk.js">
62
+ <link rel="modulepreload" crossorigin href="/assets/use-now-BlhSvP80.js">
63
+ <link rel="modulepreload" crossorigin href="/assets/check-DA3yaTey.js">
64
+ <link rel="modulepreload" crossorigin href="/assets/facet-filter-BpaMiUU2.js">
64
65
  <link rel="modulepreload" crossorigin href="/assets/use-desktop-BNN3U2y9.js">
65
- <link rel="modulepreload" crossorigin href="/assets/host-usage-CRNpjHr0.js">
66
- <link rel="modulepreload" crossorigin href="/assets/textarea-DJjpA11v.js">
67
- <link rel="modulepreload" crossorigin href="/assets/icon-tooltip-BrV8FoZY.js">
68
- <link rel="modulepreload" crossorigin href="/assets/terminal-DEjD4n5K.js">
69
- <link rel="modulepreload" crossorigin href="/assets/upload-Dx8IzFX_.js">
70
- <link rel="modulepreload" crossorigin href="/assets/loader-circle-DDkRpp8X.js">
71
- <link rel="modulepreload" crossorigin href="/assets/diff-stat-BIAV32IP.js">
72
- <link rel="modulepreload" crossorigin href="/assets/git-toolbar-aXyXLu2P.js">
73
- <link rel="modulepreload" crossorigin href="/assets/use-submit-shortcut-B-uDwQhP.js">
74
- <link rel="modulepreload" crossorigin href="/assets/search-x-CG0S6SUu.js">
75
- <link rel="modulepreload" crossorigin href="/assets/collapsible-BoDLSmkP.js">
76
- <link rel="modulepreload" crossorigin href="/assets/alert-dialog-BugYooRk.js">
77
- <link rel="modulepreload" crossorigin href="/assets/centered-state-Cm8_dS47.js">
78
- <link rel="modulepreload" crossorigin href="/assets/git-tab-loading-Dcf8fCoC.js">
79
- <link rel="modulepreload" crossorigin href="/assets/arrow-left-FG-BtI91.js">
80
- <link rel="modulepreload" crossorigin href="/assets/file-Bu00nVUj.js">
81
- <link rel="modulepreload" crossorigin href="/assets/square-VAdlYQJn.js">
82
- <link rel="modulepreload" crossorigin href="/assets/worktree-lifecycle-operation-COUqhS7A.js">
83
- <link rel="modulepreload" crossorigin href="/assets/chevron-right-7BUoNLSN.js">
84
- <link rel="modulepreload" crossorigin href="/assets/plus-BqHBcC4w.js">
85
- <link rel="modulepreload" crossorigin href="/assets/tabs-BP29AtfS.js">
86
- <link rel="modulepreload" crossorigin href="/assets/input-6sILF4ZL.js">
66
+ <link rel="modulepreload" crossorigin href="/assets/host-usage-EIcPz8s9.js">
67
+ <link rel="modulepreload" crossorigin href="/assets/textarea-DywMDkfl.js">
68
+ <link rel="modulepreload" crossorigin href="/assets/icon-tooltip-CCXhXgac.js">
69
+ <link rel="modulepreload" crossorigin href="/assets/terminal-BVAfyHZI.js">
70
+ <link rel="modulepreload" crossorigin href="/assets/upload-Ddh5Fb-A.js">
71
+ <link rel="modulepreload" crossorigin href="/assets/loader-circle-B2Lhi0xN.js">
72
+ <link rel="modulepreload" crossorigin href="/assets/lib-xgA2N1t8.js">
73
+ <link rel="modulepreload" crossorigin href="/assets/git-toolbar-CB3F5Ztu.js">
74
+ <link rel="modulepreload" crossorigin href="/assets/use-submit-shortcut-BC7gmgDS.js">
75
+ <link rel="modulepreload" crossorigin href="/assets/search-x-CQPbQgV6.js">
76
+ <link rel="modulepreload" crossorigin href="/assets/collapsible-Ci-k9Y0m.js">
77
+ <link rel="modulepreload" crossorigin href="/assets/alert-dialog-fzSWCIyG.js">
78
+ <link rel="modulepreload" crossorigin href="/assets/centered-state-C1nDqaTs.js">
79
+ <link rel="modulepreload" crossorigin href="/assets/git-tab-loading-BXSixY5p.js">
80
+ <link rel="modulepreload" crossorigin href="/assets/arrow-left-CpV00riO.js">
81
+ <link rel="modulepreload" crossorigin href="/assets/file-CcDDcqzK.js">
82
+ <link rel="modulepreload" crossorigin href="/assets/square-DCg6avOT.js">
83
+ <link rel="modulepreload" crossorigin href="/assets/worktree-lifecycle-operation-psNUwGwT.js">
84
+ <link rel="modulepreload" crossorigin href="/assets/chevron-right-DwqBinJp.js">
85
+ <link rel="modulepreload" crossorigin href="/assets/plus-BHSN5Uog.js">
86
+ <link rel="modulepreload" crossorigin href="/assets/tabs-Cb8MmIEQ.js">
87
+ <link rel="modulepreload" crossorigin href="/assets/input-DXFchFdf.js">
87
88
  <link rel="modulepreload" crossorigin href="/assets/lib-BxQXEXDF.js">
88
- <link rel="modulepreload" crossorigin href="/assets/chunk-BO2N2NFS-CFvlB0rH.js">
89
- <link rel="modulepreload" crossorigin href="/assets/markdown-lc7gwiQQ.js">
90
- <link rel="modulepreload" crossorigin href="/assets/lib-BQXq3kEf.js">
91
- <link rel="stylesheet" crossorigin href="/assets/index-DvwYGTi3.css">
89
+ <link rel="modulepreload" crossorigin href="/assets/chunk-BO2N2NFS-Bde6epwZ.js">
90
+ <link rel="modulepreload" crossorigin href="/assets/markdown-DxPHdOwB.js">
91
+ <link rel="stylesheet" crossorigin href="/assets/index-DvagaaKL.css">
92
92
  </head>
93
93
  <body>
94
94
  <div id="root"></div>
@@ -1 +0,0 @@
1
- import{F as e}from"./button-DFlig-3W.js";var t=e(`arrow-left`,[[`path`,{d:`m12 19-7-7 7-7`,key:`1l729n`}],[`path`,{d:`M19 12H5`,key:`x3x0zl`}]]);export{t};
@@ -1 +0,0 @@
1
- import{r as e}from"./rolldown-runtime-QTnfLwEv.js";import{i as t,t as n}from"./react-runtime-CCIEwYL0.js";import{$r as r,Dr as i,Ea as a,Hi as o,Nt as s,Oa as c,Or as l,Ta as u,Ut as d,Xn as f,fr as p,it as m,j as ee,qt as h,sa as te,ti as g,wa as _}from"./queries-C09jaXiS.js";import{B as v,F as y,ct as b,dt as x,ft as S,gt as ne,ht as C,lt as re,pt as ie,r as w,st as T,t as E,ut as D}from"./button-DFlig-3W.js";import{T as ae,c as O,f as oe,s as se,t as k,w as ce}from"./project-router-Uv5K_t7U.js";import{S as A}from"./reference-chip-CHF-Sbml.js";import{O as le,a as ue,c as de,i as fe,l as pe,o as me,s as he,u as ge}from"./facet-filter-BCQvQXmA.js";import{a as _e,i as ve,n as ye,o as be,s as xe,t as Se}from"./use-now-Cr9QvR5I.js";import{I as j,In as Ce,Nn as we,_ as Te,wn as M,y as N}from"./git-tab-loading-Dcf8fCoC.js";import{t as Ee}from"./arrow-left-FG-BtI91.js";import{R as De,c as Oe,d as ke,l as Ae}from"./worktree-lifecycle-operation-COUqhS7A.js";import{r as je,t as Me}from"./textarea-DJjpA11v.js";import{a as Ne,c as Pe,d as Fe,f as P,i as Ie,l as Le,n as Re,o as ze,p as Be,r as Ve,s as He,t as Ue,u as We}from"./automation-format-Bxe-TVRX.js";import{t as Ge}from"./chevron-left-Cd_qkrfl.js";import{f as Ke}from"./tooltip-BieGyrAz.js";import{t as qe}from"./chevron-right-7BUoNLSN.js";import{c as Je,i as F,n as Ye,r as Xe,u as Ze}from"./icon-tooltip-BrV8FoZY.js";import{t as Qe}from"./terminal-DEjD4n5K.js";import{m as $e}from"./git-toolbar-aXyXLu2P.js";import{t as et}from"./file-text-CISqp5LY.js";import{n as tt,t as nt}from"./settings-2-ogt1zu3P.js";import{r as rt}from"./use-submit-shortcut-B-uDwQhP.js";import{n as it}from"./square-VAdlYQJn.js";import{t as at}from"./plus-BqHBcC4w.js";import{n as ot,o as I,r as st,t as ct}from"./collapsible-BoDLSmkP.js";import{a as lt,c as ut,i as dt,n as ft,o as pt,r as mt,s as ht,t as gt}from"./alert-dialog-BugYooRk.js";import{t as L}from"./input-6sILF4ZL.js";import{i as R,r as _t}from"./token-metrics-BJ1naBNS.js";import{t as vt}from"./centered-state-Cm8_dS47.js";import{C as z,D as yt,E as bt,F as xt,O as B,P as St,S as V,T as H,d as Ct,o as wt,r as Tt,w as U,x as W}from"./index-DxwI2MZD.js";var Et=y(`layout-template`,[[`rect`,{width:`18`,height:`7`,x:`3`,y:`3`,rx:`1`,key:`f1a2em`}],[`rect`,{width:`9`,height:`7`,x:`3`,y:`14`,rx:`1`,key:`jqznyg`}],[`rect`,{width:`5`,height:`7`,x:`16`,y:`14`,rx:`1`,key:`q5h2i8`}]]),Dt=y(`pause`,[[`rect`,{x:`14`,y:`3`,width:`5`,height:`18`,rx:`1`,key:`kaeet6`}],[`rect`,{x:`5`,y:`3`,width:`5`,height:`18`,rx:`1`,key:`1wsw3u`}]]),Ot=y(`power`,[[`path`,{d:`M12 2v10`,key:`mnfbl`}],[`path`,{d:`M18.4 6.6a9 9 0 1 1-12.77.04`,key:`obofu9`}]]),kt=y(`scroll-text`,[[`path`,{d:`M15 12h-5`,key:`r7krc0`}],[`path`,{d:`M15 8h-5`,key:`1khuty`}],[`path`,{d:`M19 17V5a2 2 0 0 0-2-2H4`,key:`zz82l3`}],[`path`,{d:`M8 21h12a2 2 0 0 0 2-2v-1a1 1 0 0 0-1-1H11a1 1 0 0 0-1 1v1a2 2 0 1 1-4 0V5a2 2 0 1 0-4 0v2a1 1 0 0 0 1 1h3`,key:`1ph1d7`}]]),G=e(t(),1),K=n();function At({association:e,selected:t,onSelect:n,onRemove:r}){let i=_({queryKey:[`tracker`,v(),`label-suggestions`,e],initialPageParam:void 0,queryFn:({pageParam:t,signal:n})=>g({association:e,state:`all`,limit:50,cursor:t},{signal:n}),getNextPageParam:e=>e.available&&e.truncated?e.nextCursor:void 0,retry:!1,staleTime:6e4}),a=i.data?.pages??[],o=a.at(-1),s=a.find(e=>!e.available),c=i.isError||!!s,l=[...new Set([...t,...c?[]:a.flatMap(e=>e.available?e.items.flatMap(e=>e.labels):[])])].filter(e=>t.includes(e)||e.length>0&&e.length<=200).sort((e,t)=>e.localeCompare(t));return(0,K.jsxs)(`div`,{className:`flex flex-col gap-2`,"aria-label":`Project label suggestions`,children:[(0,K.jsx)(`span`,{className:`font-medium`,children:`Required labels`}),(0,K.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:`All selected labels must match. Leave unselected to allow any label.`}),(0,K.jsx)(`div`,{role:`group`,"aria-label":`Required labels`,className:`flex flex-wrap gap-1.5`,children:l.map(e=>(0,K.jsx)(N,{active:t.includes(e),"aria-pressed":t.includes(e),disabled:!t.includes(e)&&t.length>=100,onClick:()=>t.includes(e)?r(e):n(e),children:e},e))}),i.isFetching?(0,K.jsx)(`p`,{role:`status`,children:`Loading labels…`}):null,c?(0,K.jsxs)(`div`,{role:`alert`,children:[(0,K.jsx)(`p`,{children:`Could not load labels. Your selection is preserved.`}),(0,K.jsx)(E,{type:`button`,variant:`outline`,size:`sm`,onClick:()=>void i.refetch(),children:`Retry label suggestions`})]}):(0,K.jsxs)(K.Fragment,{children:[!i.isPending&&!i.isFetching&&l.length===0?(0,K.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:`No labels found in the loaded tasks.`}):null,i.hasNextPage?(0,K.jsx)(E,{type:`button`,variant:`outline`,size:`sm`,disabled:i.isFetching,onClick:()=>void i.fetchNextPage(),children:`Load labels from more tasks`}):null,!i.hasNextPage&&o?.available&&o.truncated?(0,K.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:`The provider returned a limited task list.`}):null]})]})}var jt=[`pull_request.opened`,`issue.opened`,`issue.labeled`,`issue.unlabeled`,`pull_request.reviewed`,`pull_request.review_requested`,`pull_request.rereview_requested`,`pull_request.closed`,`pull_request.merged`];function Mt(e){return[{id:`task`,name:e,skill:e,prompt:`{{task}}`}]}function Nt(e){let[t,...n]=e??[];return t&&n.length===0&&t.skill&&t.prompt===`{{task}}`?t.skill:null}function Pt(e){return e.skill?{source:`skill`,ref:e.skill}:e.workflow&&e.workflow!==`quick-task`?{source:`workflow`,ref:e.workflow}:null}function Ft(e){return e?.source===`skill`?{skill:e.ref,workflow:j,customSteps:null}:{skill:null,workflow:e?.ref??`quick-task`,customSteps:null}}var It=[2,5,10,15,30,60],Lt=[1,2,4,6,8],Rt={authors:``,assignees:``,anyLabels:``,allLabels:``,excludeLabels:``,changedLabels:``,reviewers:``,lookbackDays:7,maxRecords:25},zt={type:`daily`,hour:4,minute:0};function Bt(){return{name:``,kind:`schedule`,schedule:{...zt},events:[`issue.opened`],intervalSeconds:300,filters:{...Rt},prompt:``,workflow:j,skill:null,customSteps:null,runner:null,account:null,model:null,autonomous:!0,dispatch:!1,maxSubtasks:4,reviewChild:!0,enabled:!1}}var q=e=>(e??[]).join(`, `);function Vt(e){return e.split(`,`).map(e=>e.trim()).filter(e=>e.length>0)}function Ht(e){return{authors:q(e.authors),assignees:q(e.assignees),anyLabels:q(e.anyLabels),allLabels:q(e.allLabels),excludeLabels:q(e.excludeLabels),changedLabels:q(e.changedLabels),reviewers:q(e.reviewers),lookbackDays:e.lookbackDays,maxRecords:e.maxRecords}}function Ut(e){let t=Bt(),{task:n,filters:r}=e,i=Nt(n.steps);return{...t,name:e.name,kind:e.kind,trackerTrigger:e.trackerTrigger,schedule:e.schedule?{...e.schedule}:t.schedule,events:e.events?.length?[...e.events]:t.events,intervalSeconds:e.intervalSeconds??t.intervalSeconds,filters:r?Ht(r):t.filters,prompt:n.prompt,workflow:n.workflow??t.workflow,skill:i,customSteps:n.steps&&!i?n.steps:null,runner:n.runner??null,account:n.agentProfile??null,model:n.model??null,autonomous:n.autonomous??!1,dispatch:n.dispatch!==void 0,maxSubtasks:n.dispatch?.maxSubtasks??t.maxSubtasks,reviewChild:n.dispatch?.reviewChild??t.reviewChild,enabled:e.enabled,...n.checkout===void 0?{}:{checkout:n.checkout},...n.allowForkHeads===void 0?{}:{allowForkHeads:n.allowForkHeads}}}function Wt(e){return{name:e.name,kind:e.kind,...e.schedule?{schedule:e.schedule}:{},...e.events?{events:e.events}:{},...e.intervalSeconds===void 0?{}:{intervalSeconds:e.intervalSeconds},...e.filters?{filters:e.filters}:{},prompt:e.task.prompt,...e.task.workflow?{workflow:e.task.workflow}:{},...e.task.steps?{steps:e.task.steps}:{},...e.task.runner?{runner:e.task.runner}:{},...e.task.model===void 0?{}:{model:e.task.model},...e.task.autonomous===void 0?{}:{autonomous:e.task.autonomous},...e.task.dispatch?{dispatch:e.task.dispatch}:{},...e.task.checkout?{checkout:e.task.checkout}:{},...e.task.allowForkHeads===void 0?{}:{allowForkHeads:e.task.allowForkHeads}}}var Gt=e=>e===`claude`||e===`codex`||e===`junie`||e===`opencode`||e===`cursor`||e===`pi`||e===`copilot`;function Kt(e,t){let n=Nt(t.steps);return{...e,name:t.name,kind:t.kind,schedule:t.schedule?{...t.schedule}:e.schedule,events:t.events?.length?[...t.events]:e.events,intervalSeconds:t.intervalSeconds??e.intervalSeconds,filters:t.filters?Ht(t.filters):{...Rt},prompt:t.prompt,...t.steps?{skill:n,customSteps:n?null:t.steps,workflow:j}:Ft(t.workflow?{source:`workflow`,ref:t.workflow}:null),checkout:t.checkout,allowForkHeads:t.allowForkHeads,runner:t.runner!==void 0&&Gt(t.runner)?t.runner:e.runner,account:t.runner!==void 0&&Gt(t.runner)?null:e.account,model:t.model??e.model,autonomous:t.autonomous??e.autonomous,dispatch:t.dispatch!==void 0,maxSubtasks:t.dispatch?.maxSubtasks??e.maxSubtasks,reviewChild:t.dispatch?.reviewChild??e.reviewChild}}function qt(e){let t=S(e);switch(t.type){case`hours`:return{type:`hours`,every:t.every};case`weekly`:return{type:`weekly`,hour:t.hour,minute:t.minute,day:t.day};case`once`:return{type:`once`,hour:t.hour,minute:t.minute,...t.date?{date:t.date}:{}};default:return{type:t.type,hour:t.hour,minute:t.minute}}}function Jt(e){let t={prompt:e.prompt,...e.skill?{steps:Mt(e.skill)}:e.customSteps?{steps:e.customSteps}:e.workflow?{workflow:e.workflow}:{},...e.runner?{runner:e.runner}:{},...e.account?{agentProfile:e.account}:{},...e.model?{model:e.model}:{},autonomous:e.autonomous,...e.dispatch?{dispatch:{maxSubtasks:e.maxSubtasks,reviewChild:e.reviewChild}}:{}};if(e.kind===`schedule`)return{name:e.name.trim(),kind:`schedule`,schedule:qt(e.schedule),task:t};if(e.kind===`tracker`)return{name:e.name.trim(),kind:`tracker`,trackerTrigger:e.trackerTrigger,intervalSeconds:e.intervalSeconds,filters:{lookbackDays:J(e.filters.lookbackDays,1,90),maxRecords:J(e.filters.maxRecords,1,100)},task:t};let n=e.filters,r=(e,t)=>{let n=Vt(e);return n.length>0?{[t]:n}:{}};return{name:e.name.trim(),kind:`github`,events:[...e.events],intervalSeconds:e.intervalSeconds,filters:{...r(n.authors,`authors`),...r(n.assignees,`assignees`),...r(n.anyLabels,`anyLabels`),...r(n.allLabels,`allLabels`),...r(n.excludeLabels,`excludeLabels`),...r(n.changedLabels,`changedLabels`),...r(n.reviewers,`reviewers`),lookbackDays:J(n.lookbackDays,1,90),maxRecords:J(n.maxRecords,1,100)},task:{...t,...e.checkout===void 0?{}:{checkout:e.checkout},...e.allowForkHeads===void 0?{}:{allowForkHeads:e.allowForkHeads}}}}function J(e,t,n){return Number.isFinite(e)?Math.min(n,Math.max(t,Math.round(e))):t}function Yt(e){let t=Jt(e);return{name:t.name,kind:e.kind,...t.trackerTrigger?{trackerTrigger:t.trackerTrigger}:{},...t.schedule?{schedule:t.schedule}:{},...t.events?{events:t.events}:{},...t.intervalSeconds===void 0?{}:{intervalSeconds:t.intervalSeconds},...t.filters?{filters:t.filters}:{},task:t.task,...e.enabled?{enable:!0}:{}}}var Xt=`([a-z\\d](?:[a-z\\d]|-(?=[a-z\\d])){0,38})`,Zt=RegExp(`\\b(?:user|author|by)\\s+(?:\`@?${Xt}\`|@${Xt}(?![\\w/-]))`,`gi`);function Qt(e){if(e.kind!==`github`)return[];let t=new Set([e.filters.authors,e.filters.assignees,e.filters.reviewers].flatMap(Vt).map(e=>e.replace(/^@/,``).toLowerCase())),n=new Map;for(let r of e.prompt.matchAll(Zt)){let e=r[1]??r[2];e&&!t.has(e.toLowerCase())&&!n.has(e.toLowerCase())&&n.set(e.toLowerCase(),e)}return[...n.values()]}function $t(e){return e.includes(`issue.labeled`)||e.includes(`issue.unlabeled`)}var en=e=>[1,2,3,4,6,8,12].includes(e);function tn({trigger:e,intervalSeconds:t,onChange:n,onValid:i}){let[a,o]=(0,G.useState)(``),s=v(),c=_({queryKey:[`tracker`,s,`automation-options`,``],initialPageParam:void 0,queryFn:({signal:e,pageParam:t})=>r({...t?{cursor:t}:{}},{signal:e}),getNextPageParam:e=>e.available?e.nextCursor:void 0,retry:!1}),l=_({queryKey:[`tracker`,s,`automation-options`,a],enabled:!!a&&c.data?.pages[0]?.available===!0,initialPageParam:void 0,queryFn:({signal:e,pageParam:t})=>r({...a?{search:a}:{},...t?{cursor:t}:{}},{signal:e}),getNextPageParam:e=>e.available?e.nextCursor:void 0,retry:!1}),u=a?l:c,d=c.data?.pages[0],f=d?.available?d:void 0,p=!!f&&!!e&&JSON.stringify(f.association)===JSON.stringify(e.association),m=p&&!!e?.events.length&&e.events.every(e=>f?.events.includes(e))&&(e.requiredLabels?.length??0)<=100&&(e.requiredLabels??[]).every(e=>e.length>0&&e.length<=200)&&(!e.events.includes(`issue.status_changed`)||!!e.targetStatusIds?.length)&&(!(e.events.includes(`issue.labeled`)||e.events.includes(`issue.unlabeled`))||!!e.changedLabelIds?.length);(0,G.useEffect)(()=>(i(m),()=>i(!1)),[m,i]);let ee=u.data?.pages.flatMap(e=>e.available?[e]:[])??[],h=[...new Map(ee.flatMap(e=>e.statuses).map(e=>[e.id,e])).values()],te=new Map((c.data?.pages.flatMap(e=>e.available?e.statuses:[])??[]).map(e=>[e.id,e.name])),g=(e?.targetStatusIds??[]).filter(e=>!h.some(t=>t.id===e)),y=[...new Map(ee.flatMap(e=>e.labels).map(e=>[e.id,e])).values()],b=e?.events.includes(`issue.status_changed`),x=e?.events.some(e=>e===`issue.labeled`||e===`issue.unlabeled`),S=b&&x?`Search tracker statuses and labels`:x?`Search tracker labels`:`Search tracker statuses`;return(0,K.jsxs)(`div`,{"data-slot":`editor-tracker`,className:`flex flex-col gap-3 text-sm`,children:[c.isPending?(0,K.jsx)(`p`,{children:`Loading tracker events…`}):null,c.isError||d&&!d.available?(0,K.jsxs)(`div`,{role:`alert`,children:[(0,K.jsxs)(`p`,{children:[d&&!d.available?d.reason:`Could not load tracker events.`,` Check the project’s Issue tracker settings.`]}),(0,K.jsx)(E,{variant:`outline`,size:`sm`,onClick:()=>void c.refetch(),children:`Retry`})]}):null,f?(0,K.jsxs)(K.Fragment,{children:[(0,K.jsxs)(`p`,{children:[f.association.kind===`jira`?`Jira`:`Linear`,` · `,f.association.externalName]}),e&&!p?(0,K.jsx)(`p`,{role:`alert`,children:`The tracker connection changed. Select an event again before saving.`}):null,e?null:(0,K.jsx)(`p`,{children:`Select an event to complete this automation.`}),(0,K.jsx)(`div`,{role:`group`,"aria-label":`Tracker events`,className:`flex flex-wrap gap-1.5`,children:f.events.map(t=>(0,K.jsx)(N,{active:p&&e?.events.includes(t),"aria-pressed":p&&e?.events.includes(t),onClick:()=>{let r=p?e.events:[],i=r.includes(t)?r.filter(e=>e!==t):[...r,t],a={...p?e:{},association:f.association,events:i};t===`issue.status_changed`&&!i.includes(t)&&delete a.targetStatusIds,n({trackerTrigger:a,...p?{}:{enabled:!1}})},children:t},t))}),p&&e?(0,K.jsx)(At,{association:f.association,selected:e.requiredLabels??[],onRemove:t=>n({trackerTrigger:{...e,requiredLabels:(e.requiredLabels??[]).filter(e=>e!==t)}}),onSelect:t=>n({trackerTrigger:{...e,requiredLabels:[...new Set([...e.requiredLabels??[],t])]}})},JSON.stringify(f.association)):null,(0,K.jsxs)(`details`,{className:`text-xs text-muted-foreground`,children:[(0,K.jsx)(`summary`,{className:`cursor-pointer`,children:`Integration details`}),(0,K.jsxs)(`div`,{className:`mt-2 flex flex-col gap-2`,children:[(0,K.jsx)(`p`,{children:`Label choices come from loaded tasks in this project, including closed tasks. Saved selections remain available.`}),f.limitations.map(e=>(0,K.jsx)(`p`,{children:e},e))]})]}),e?.events.some(e=>e!==`issue.opened`)?(0,K.jsxs)(K.Fragment,{children:[(0,K.jsx)(L,{"aria-label":S,placeholder:S,value:a,onChange:e=>o(e.target.value)}),u.isFetching?(0,K.jsx)(`p`,{role:`status`,children:`Searching…`}):null,u.isError||u.data?.pages[0]&&!u.data.pages[0].available?(0,K.jsxs)(`div`,{role:`alert`,children:[`Could not load search results. `,(0,K.jsx)(E,{variant:`outline`,size:`sm`,onClick:()=>void u.refetch(),children:`Retry search`})]}):null,!u.isFetching&&u.data?.pages[0]?.available&&b&&h.length===0?(0,K.jsx)(`p`,{children:`No matching statuses.`}):null,!u.isFetching&&u.data?.pages[0]?.available&&x&&y.length===0?(0,K.jsx)(`p`,{children:`No matching labels.`}):null,e.events.includes(`issue.status_changed`)?(0,K.jsxs)(`div`,{role:`group`,"aria-label":`Target statuses`,className:`flex flex-wrap gap-1.5`,children:[h.map(t=>(0,K.jsx)(N,{active:e.targetStatusIds?.includes(t.id),"aria-pressed":e.targetStatusIds?.includes(t.id),onClick:()=>{let r=e.targetStatusIds??[];n({trackerTrigger:{...e,targetStatusIds:r.includes(t.id)?r.filter(e=>e!==t.id):[...r,t.id]}})},children:t.name},t.id)),g.map(t=>(0,K.jsxs)(N,{active:!0,"aria-pressed":!0,onClick:()=>{n({trackerTrigger:{...e,targetStatusIds:(e.targetStatusIds??[]).filter(e=>e!==t)}})},children:[te.get(t)??t,` (not in current results)`]},t))]}):null,e.events.some(e=>e===`issue.labeled`||e===`issue.unlabeled`)?(0,K.jsx)(`div`,{role:`group`,"aria-label":`Changed labels`,className:`flex flex-wrap gap-1.5`,children:y.map(t=>(0,K.jsx)(N,{active:e.changedLabelIds?.includes(t.id),"aria-pressed":e.changedLabelIds?.includes(t.id),onClick:()=>{let r=e.changedLabelIds??[];n({trackerTrigger:{...e,changedLabelIds:r.includes(t.id)?r.filter(e=>e!==t.id):[...r,t.id]}})},children:t.name},t.id))}):null,u.hasNextPage?(0,K.jsx)(E,{variant:`outline`,size:`sm`,disabled:u.isFetchingNextPage,onClick:()=>void u.fetchNextPage(),children:`Load more`}):null]}):null]}):null,(0,K.jsxs)(`div`,{className:`flex items-center gap-2`,children:[`Check every`,(0,K.jsxs)(W,{value:String(t/60),onValueChange:e=>n({intervalSeconds:Number(e)*60}),children:[(0,K.jsx)(U,{"aria-label":`Tracker poll interval`,className:`w-28`,children:(0,K.jsx)(H,{})}),(0,K.jsx)(V,{children:It.map(e=>(0,K.jsxs)(z,{value:String(e),children:[e,` min`]},e))})]})]}),(0,K.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:`Only events after enabling are eligible. Existing backlog is not launched. The workflow agent receives this project’s tracker credentials to carry out your instructions; status updates are not guaranteed by the scheduler.`})]})}function nn({definition:e}){let t=(0,G.useMemo)(()=>ge(e),[e]);return(0,K.jsxs)(P,{flush:!0,"data-slot":`copy-as-cli`,className:`px-3.5 py-3`,children:[(0,K.jsxs)(`div`,{className:`mb-2 flex items-center`,children:[(0,K.jsx)(`span`,{className:`text-[11px] font-semibold tracking-[.05em] uppercase text-soft-foreground`,children:`Copy as CLI`}),(0,K.jsxs)(E,{variant:`ghost`,size:`sm`,className:`ml-auto h-6`,onClick:()=>void me(t),children:[(0,K.jsx)(Ce,{"aria-hidden":`true`,className:`size-3`}),`Copy`]})]}),(0,K.jsx)(`pre`,{className:`m-0 rounded-lg border border-border bg-card-2 px-2.5 py-2 font-mono text-[11.5px] leading-[1.6] break-words whitespace-pre-wrap text-muted-foreground`,children:t}),(0,K.jsxs)(`p`,{className:`mt-2 mb-0 text-[11.5px] leading-[1.5] text-soft-foreground`,children:[`The same definition the cockpit saves — `,(0,K.jsx)(`code`,{className:`text-[11px]`,children:`cez automation schema`}),` prints its shape.`]})]})}function rn({available:e,enabled:t,maxSubtasks:n,reviewChild:r,onChange:i}){if(!e)return null;let a=Lt.includes(n)?Lt:[...Lt,n].sort((e,t)=>e-t);return(0,K.jsxs)(`div`,{"data-slot":`editor-dispatch`,"data-enabled":t?`true`:void 0,title:`Let this run start its own subtasks with cez task create — each in a worktree forked off its branch, reporting back into the parent session.`,className:`flex flex-wrap items-center gap-2.5 border-t border-border pt-3 text-[13px] text-muted-foreground`,children:[(0,K.jsxs)(B,{className:`text-[13px] font-medium text-foreground`,children:[(0,K.jsx)(tt,{"aria-hidden":`true`,className:w(`size-3.5`,t?`text-violet`:`text-soft-foreground`)}),`Dispatch`,(0,K.jsx)(yt,{"aria-label":`Dispatch`,checked:t,onCheckedChange:e=>i({dispatch:e})})]}),t?(0,K.jsxs)(K.Fragment,{children:[(0,K.jsx)(`span`,{className:`text-soft-foreground`,children:`·`}),(0,K.jsxs)(`span`,{className:`inline-flex items-center gap-1.5`,children:[`up to`,(0,K.jsxs)(W,{value:String(n),onValueChange:e=>i({maxSubtasks:Number(e)}),children:[(0,K.jsx)(U,{size:`sm`,"aria-label":`Max subtasks`,className:`h-7 px-2 text-[12.5px]`,children:(0,K.jsx)(H,{})}),(0,K.jsx)(V,{children:a.map(e=>(0,K.jsx)(z,{value:String(e),children:e},e))})]}),`subtasks`]}),(0,K.jsx)(`span`,{className:`text-soft-foreground`,children:`·`}),(0,K.jsxs)(B,{className:`text-[13px] font-normal text-muted-foreground`,children:[(0,K.jsx)(yt,{size:`sm`,"aria-label":`Review child`,checked:r,onCheckedChange:e=>i({reviewChild:e})}),`review child`]}),(0,K.jsxs)(`span`,{"data-slot":`editor-dispatch-hint`,className:`ml-auto text-[11.5px] whitespace-nowrap text-soft-foreground`,children:[`≤ `,n+1,` agents`]})]}):null]})}function an({events:e,intervalSeconds:t,filters:n,onChange:r}){let[i,a]=(0,G.useState)([`authors`,`assignees`,`anyLabels`,`allLabels`,`excludeLabels`,`changedLabels`,`reviewers`].some(e=>n[e].trim().length>0)||n.lookbackDays!==7||n.maxRecords!==25),o=(e,t)=>r({filters:{...n,[e]:t}}),s=t=>{let n=e.includes(t)?e.filter(e=>e!==t):[...e,t];r({events:jt.filter(e=>n.includes(e))})},c=$t(e),l=c&&n.changedLabels.trim().length===0;return(0,K.jsxs)(`div`,{"data-slot":`editor-github`,className:`flex flex-col gap-3.5`,children:[(0,K.jsx)(`div`,{role:`group`,"aria-label":`GitHub events`,className:`flex flex-wrap gap-1.5`,children:jt.map(t=>(0,K.jsx)(N,{active:e.includes(t),"aria-pressed":e.includes(t),className:`font-mono`,onClick:()=>s(t),children:t},t))}),(0,K.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2 text-[13px] text-muted-foreground`,children:[`poll every`,(0,K.jsxs)(W,{value:String(Math.round(t/60)),onValueChange:e=>r({intervalSeconds:Number(e)*60}),children:[(0,K.jsx)(U,{size:`sm`,"aria-label":`Poll interval`,className:`text-[13px]`,children:(0,K.jsx)(H,{})}),(0,K.jsx)(V,{children:It.map(e=>(0,K.jsxs)(z,{value:String(e),children:[e,` min`]},e))})]}),(0,K.jsxs)(`span`,{children:[`· last `,n.lookbackDays,` days · maximum `,n.maxRecords,` records`]})]}),(0,K.jsxs)(ct,{open:i,onOpenChange:a,children:[(0,K.jsx)(st,{asChild:!0,children:(0,K.jsxs)(`button`,{type:`button`,className:`inline-flex h-6 items-center gap-1 text-xs font-medium text-muted-foreground hover:text-foreground`,children:[(0,K.jsx)(Ke,{"aria-hidden":`true`,className:w(`size-3 transition-transform`,i?``:`-rotate-90`)}),`Filters`,l?(0,K.jsx)(`span`,{className:`text-danger`,children:`· changed labels required`}):null]})}),(0,K.jsx)(ot,{children:(0,K.jsxs)(`div`,{"data-slot":`editor-github-filters`,className:`grid grid-cols-1 gap-3 pt-2 sm:grid-cols-2`,children:[(0,K.jsx)(Y,{id:`filter-authors`,label:`Authors`,value:n.authors,onChange:e=>o(`authors`,e)}),(0,K.jsx)(Y,{id:`filter-assignees`,label:`Assignees`,value:n.assignees,onChange:e=>o(`assignees`,e)}),(0,K.jsx)(Y,{id:`filter-any-labels`,label:`Any of labels`,value:n.anyLabels,onChange:e=>o(`anyLabels`,e)}),(0,K.jsx)(Y,{id:`filter-all-labels`,label:`All of labels`,value:n.allLabels,onChange:e=>o(`allLabels`,e)}),(0,K.jsx)(Y,{id:`filter-exclude-labels`,label:`Exclude labels`,value:n.excludeLabels,onChange:e=>o(`excludeLabels`,e)}),(0,K.jsx)(Y,{id:`filter-changed-labels`,label:c?`Changed labels (required)`:`Changed labels`,value:n.changedLabels,invalid:l,onChange:e=>o(`changedLabels`,e)}),(0,K.jsx)(Y,{id:`filter-reviewers`,label:`Reviewers`,value:n.reviewers,onChange:e=>o(`reviewers`,e)}),(0,K.jsx)(on,{id:`filter-lookback`,label:`Lookback days (1–90)`,value:n.lookbackDays,min:1,max:90,onChange:e=>o(`lookbackDays`,e)}),(0,K.jsx)(on,{id:`filter-max-records`,label:`Max records (1–100)`,value:n.maxRecords,min:1,max:100,onChange:e=>o(`maxRecords`,e)})]})})]})]})}function Y({id:e,label:t,value:n,invalid:r=!1,onChange:i}){return(0,K.jsxs)(`div`,{className:`flex flex-col gap-1.5`,children:[(0,K.jsx)(B,{htmlFor:e,className:`text-xs text-muted-foreground`,children:t}),(0,K.jsx)(L,{id:e,value:n,placeholder:`comma-separated`,"aria-invalid":r||void 0,onChange:e=>i(e.target.value),className:`h-8 text-[13px]`})]})}function on({id:e,label:t,value:n,min:r,max:i,onChange:a}){return(0,K.jsxs)(`div`,{className:`flex flex-col gap-1.5`,children:[(0,K.jsx)(B,{htmlFor:e,className:`text-xs text-muted-foreground`,children:t}),(0,K.jsx)(L,{id:e,type:`number`,min:r,max:i,value:n,onChange:e=>a(J(Number(e.target.value),r,i)),className:`h-8 w-28 font-mono text-[13px] tabular-nums`})]})}function sn({source:e,sourcesReady:t,skills:n,skillUsage:r,workflows:i,onSource:a,pick:o,onPick:s,baseBranch:c,autonomous:l,onAutonomous:u}){return(0,K.jsxs)(`div`,{"data-slot":`editor-run-as`,className:`flex flex-wrap items-center gap-2`,children:[(0,K.jsx)(wt,{source:e,ready:t,skills:n,skillUsage:r,workflows:i,onPick:a}),(0,K.jsx)(Ct,{pick:o,onChange:s,accounts:!0}),(0,K.jsx)(Te,{slot:`editor-base-pill`,ariaLabel:`Base branch`,readOnly:!0,hint:`Every run branches off the project's base branch.`,label:(0,K.jsxs)(`span`,{className:`font-mono text-[11.5px]`,children:[`base: `,c??`…`]}),value:c??``,options:[],onPick:()=>void 0}),(0,K.jsx)(`span`,{className:`flex-1`}),(0,K.jsxs)(B,{className:`text-[13px] font-medium`,children:[`Autonomous`,(0,K.jsx)(yt,{"aria-label":`Autonomous`,checked:l,onCheckedChange:u})]})]})}function cn({className:e,...t}){return(0,K.jsx)(`span`,{"data-slot":`branch-chip`,className:w(`inline-block rounded-md bg-muted px-1.5 py-0.5 font-mono text-[11.5px] leading-[1.3] font-medium whitespace-nowrap text-muted-foreground`,e),...t})}var ln=[[`daily`,`Every day`],[`weekdays`,`Weekdays`],[`weekly`,`Weekly`],[`hours`,`Every N hours`],[`once`,`Once`]],un=e=>String(e).padStart(2,`0`);function dn(e){let t=Date.now()+864e5,n=C(t,e);return n?`${n.year}-${un(n.month)}-${un(n.day)}`:new Date(t).toISOString().slice(0,10)}function fn({schedule:e,timeZone:t,onChange:n}){let r=S(e),i=e=>{let{date:i,...a}=r,o={...a,...i?{date:i}:{},...e};o.type===`once`&&!o.date&&(o.date=dn(t)),n(o)},a=r.type===`once`&&r.date!==null&&x({type:`once`,date:r.date,hour:r.hour,minute:r.minute},Date.now(),t)===null;return(0,K.jsxs)(`div`,{"data-slot":`editor-schedule`,className:`flex flex-col gap-3.5`,children:[(0,K.jsx)(`div`,{role:`group`,"aria-label":`Schedule type`,className:`flex flex-wrap gap-1.5`,children:ln.map(([e,t])=>(0,K.jsx)(N,{active:r.type===e,"aria-pressed":r.type===e,onClick:()=>i({type:e}),children:t},e))}),r.type===`weekly`?(0,K.jsx)(`div`,{role:`group`,"aria-label":`Weekday`,className:`flex flex-wrap gap-1.5`,children:b.map((e,t)=>(0,K.jsx)(N,{active:r.day===t+1,"aria-pressed":r.day===t+1,className:`px-[9px]`,onClick:()=>i({day:t+1}),children:e},e))}):null,r.type===`once`?(0,K.jsxs)(`div`,{className:`flex items-center gap-2 text-[13px] text-muted-foreground`,children:[`on`,(0,K.jsx)(L,{type:`date`,"aria-label":`Date`,value:r.date??``,onChange:e=>{e.target.value&&i({date:e.target.value})},className:`w-40 font-mono`})]}):null,r.type===`hours`?(0,K.jsxs)(`div`,{className:`flex items-center gap-2 text-[13px] text-muted-foreground`,children:[`every`,(0,K.jsxs)(W,{value:String(r.every),onValueChange:e=>{let t=Number(e);en(t)&&i({every:t})},children:[(0,K.jsx)(U,{size:`sm`,"aria-label":`Every N hours`,className:`text-[13px]`,children:(0,K.jsx)(H,{})}),(0,K.jsx)(V,{children:T.map(e=>(0,K.jsxs)(z,{value:String(e),children:[e,` h`]},e))})]}),`starting at 00:00`]}):(0,K.jsxs)(`div`,{className:`flex items-center gap-2 text-[13px] text-muted-foreground`,children:[`at`,(0,K.jsx)(L,{"aria-label":`Hour`,inputMode:`numeric`,value:un(r.hour),onChange:e=>i({hour:Math.min(23,Math.max(0,Number(e.target.value)||0))}),className:`w-14 text-center font-mono`}),`:`,(0,K.jsx)(L,{"aria-label":`Minute`,inputMode:`numeric`,value:un(r.minute),onChange:e=>i({minute:Math.min(59,Math.max(0,Number(e.target.value)||0))}),className:`w-14 text-center font-mono`}),(0,K.jsx)(`span`,{className:`font-mono text-xs`,children:t})]}),r.type===`once`?(0,K.jsx)(`p`,{"data-slot":`editor-once-note`,className:`m-0 text-xs ${a?`text-danger`:`text-soft-foreground`}`,children:a?`This time has passed — pick a later one to enable it.`:`Runs a single time, then pauses itself.`}):(0,K.jsxs)(`div`,{className:`flex items-center gap-2.5 font-mono text-xs text-soft-foreground`,children:[(0,K.jsx)(`span`,{children:`cron`}),(0,K.jsx)(cn,{"data-slot":`editor-cron`,children:re(e)})]})]})}function pn({lastRun:e,onRunNow:t,onLog:n,busy:r=!1,now:i}){return(0,K.jsxs)(P,{flush:!0,"data-slot":`last-run-card`,className:`px-3.5 py-3`,children:[(0,K.jsx)(`div`,{className:`mb-2 text-[11px] font-semibold tracking-[.05em] uppercase text-soft-foreground`,children:`Last run`}),(0,K.jsxs)(`div`,{className:`flex items-center gap-2 text-[13px]`,children:[(0,K.jsx)(R,{tone:Pe(e.status)}),He(e.status),(0,K.jsx)(`span`,{className:`text-[11.5px] text-soft-foreground`,children:_t(e.ts,i)}),null]}),(0,K.jsxs)(`div`,{className:`mt-2.5 flex gap-1.5`,children:[(0,K.jsxs)(E,{variant:`outline`,size:`sm`,disabled:r,onClick:t,children:[(0,K.jsx)(it,{"aria-hidden":`true`,className:`size-3`}),`Run now`]}),n?(0,K.jsxs)(E,{variant:`ghost`,size:`sm`,onClick:n,children:[(0,K.jsx)(kt,{"aria-hidden":`true`,className:`size-3`}),`View log`]}):null]})]})}var mn=864e5;function hn({kind:e,schedule:t,intervalSeconds:n,timeZone:r,now:i}){let[a,o]=(0,G.useState)(()=>Date.now());(0,G.useEffect)(()=>{if(i!==void 0)return;let e=setInterval(()=>o(Date.now()),6e4);return()=>clearInterval(e)},[i]);let s=i??a,c=(0,G.useMemo)(()=>{if(e!==`schedule`)return[];if(t.type===`once`){let e=x(t,s,r);return e===null?[]:[e]}return ie(t,s,s+9*mn,r,5)},[e,t,s,r]);return(0,K.jsxs)(P,{flush:!0,"data-slot":`next-runs-preview`,className:`pt-3 pb-2`,children:[(0,K.jsx)(`div`,{className:`px-3.5 pb-2 text-[11px] font-semibold tracking-[.05em] uppercase text-soft-foreground`,children:e===`schedule`?t.type===`once`?`Runs once`:`Next 5 runs`:`How it polls`}),e===`schedule`?c.length===0?(0,K.jsx)(`p`,{className:`m-0 px-3.5 pb-1.5 text-[12.5px] leading-[1.5] text-muted-foreground`,children:t.type===`once`?`This time has already passed.`:`Nothing in the next nine days.`}):c.map(e=>(0,K.jsxs)(`div`,{"data-slot":`next-run`,className:`flex gap-2.5 px-3.5 py-[5px] text-[13px]`,children:[(0,K.jsx)(`span`,{className:`w-[82px] shrink-0 font-mono text-xs font-medium whitespace-nowrap text-foreground tabular-nums`,children:Ve(e,r)}),(0,K.jsx)(`span`,{className:`text-[11.5px] whitespace-nowrap text-soft-foreground`,children:Ne(e,s)})]},e)):(0,K.jsx)(`p`,{className:`m-0 px-3.5 pb-1.5 text-[12.5px] leading-[1.5] text-muted-foreground`,children:e===`tracker`?(0,K.jsxs)(K.Fragment,{children:[`Checks the project tracker every `,Math.round(n/60),` min while this cockpit is open. No webhook or public URL required.`]}):(0,K.jsxs)(K.Fragment,{children:[`Checks GitHub every `,Math.round(n/60),` min while this cockpit is open, through your `,(0,K.jsx)(`code`,{className:`text-xs`,children:`gh`}),`. No webhook or public URL required.`]})})]})}var gn=[{name:`Nightly dependency bump`,when:`Every day at 04:00`,kind:`schedule`,schedule:{type:`daily`,hour:4,minute:0},prompt:`Run npm outdated, bump patch and minor versions, run the test suite, open a draft PR if anything changed.`},{name:`Triage new issues`,when:`On issue.opened · every 5 min`,kind:`github`,events:[`issue.opened`],intervalSeconds:300,prompt:`Read {{github.url}}. Label it, add a repro or a clarification request. Never close it.`},{name:`Weekly changelog draft`,when:`Fridays at 16:00`,kind:`schedule`,schedule:{type:`weekly`,day:5,hour:16,minute:0},prompt:`Collect merged PRs since last week, write CHANGELOG entries, open a draft PR.`},{name:`Stale PR nudge`,when:`Every 6 hours`,kind:`schedule`,schedule:{type:`hours`,every:6},prompt:`Comment on PRs idle for 48h with what is blocking them.`},{name:`Flaky test hunt`,when:`Tuesdays at 02:00`,kind:`schedule`,schedule:{type:`weekly`,day:2,hour:2,minute:0},prompt:`Run the suite 5×, quarantine intermittent tests, open an issue per test.`,dispatch:{maxSubtasks:8,reviewChild:!0}},{name:`Security advisories`,when:`Every day at 06:00`,kind:`schedule`,schedule:{type:`daily`,hour:6,minute:0},prompt:`Run npm audit; for each high/critical advisory open a task with the upgrade path.`}],_n=e=>[v(),`automation-templates`,e??``];function vn({onPick:e}){let[t,n]=(0,G.useState)(`builtin`),r=se(),i=a({queryKey:_n(r),queryFn:({signal:e})=>l(r,{signal:e}),enabled:t===`mine`}),o=t===`builtin`?gn.map(e=>({...e,key:e.name})):(i.data?.templates??[]).map(e=>({...Wt(e),key:`${e.project.id}:${e.id}`,when:We(e),project:e.project.name}));return(0,K.jsxs)(P,{flush:!0,"data-slot":`template-palette`,className:`pb-3`,children:[(0,K.jsxs)(`div`,{className:`flex items-end gap-3 border-b border-border px-4 pt-2.5`,children:[(0,K.jsxs)(`div`,{role:`tablist`,"aria-label":`Template source`,className:`flex shrink-0`,children:[(0,K.jsx)(yn,{active:t===`builtin`,onClick:()=>n(`builtin`),children:`Built-in`}),(0,K.jsx)(yn,{active:t===`mine`,onClick:()=>n(`mine`),children:`From your other projects`})]}),(0,K.jsx)(`span`,{className:`ml-auto min-w-0 overflow-hidden pb-2 text-xs text-ellipsis whitespace-nowrap text-soft-foreground`,children:t===`builtin`?`Built-in`:`Registered in ~/.cezar/config.json`})]}),t===`mine`&&i.isPending?(0,K.jsx)(`p`,{className:`px-4 pt-3 text-xs text-soft-foreground`,children:`Loading…`}):t===`mine`&&i.isError?(0,K.jsx)(`p`,{role:`alert`,className:`px-4 pt-3 text-xs text-danger`,children:i.error.message}):o.length===0?(0,K.jsx)(`p`,{className:`px-4 pt-3 text-xs text-soft-foreground`,children:`No automations in your other projects yet.`}):(0,K.jsx)(`div`,{className:`grid grid-cols-[repeat(auto-fill,minmax(240px,1fr))] gap-2.5 px-4 pt-3`,children:o.map(t=>(0,K.jsxs)(`div`,{"data-slot":`template-card`,className:`flex flex-col gap-1.5 rounded-[10px] border border-border bg-card-2 px-3 py-2.5`,children:[(0,K.jsxs)(`div`,{className:`flex items-center gap-2 text-[13px] font-semibold`,children:[t.kind===`github`?(0,K.jsx)(bt,{"aria-hidden":`true`,className:`size-[13px] shrink-0 text-soft-foreground`}):(0,K.jsx)(xt,{"aria-hidden":`true`,className:`size-[13px] shrink-0 text-soft-foreground`}),(0,K.jsx)(`span`,{className:`min-w-0 overflow-hidden text-ellipsis whitespace-nowrap`,children:t.name}),t.project?(0,K.jsx)(cn,{className:`ml-auto`,children:t.project}):null]}),(0,K.jsx)(`div`,{className:`font-mono text-[11.5px] text-muted-foreground`,children:t.when}),(0,K.jsx)(`div`,{className:`line-clamp-2 text-xs leading-[1.45] text-soft-foreground`,children:t.prompt}),(0,K.jsx)(E,{variant:`outline`,size:`sm`,className:`mt-0.5 self-start`,"aria-label":`Use this: ${t.name}`,onClick:()=>e(t),children:`Use this`})]},t.key))})]})}function yn({active:e,onClick:t,children:n}){return(0,K.jsx)(`button`,{type:`button`,role:`tab`,"aria-selected":e,onClick:t,className:w(`-mb-px flex h-8 items-center rounded-t-md border-b-2 px-3 text-[13px] font-medium`,e?`border-foreground font-semibold text-foreground`:`border-transparent text-muted-foreground hover:bg-muted hover:text-foreground`),children:n})}function bn(e){let t=e.toLowerCase();return/\b(events?|filters?|schedule|interval|changedlabels|changed labels|lookback|maxrecords)\b/.test(t)?`when`:/\b(prompt|workflow|runner|model|dispatch)\b/.test(t)?`what`:`top`}var xn={tracker:`Implement {{tracker.key}} and prepare a pull request.`,schedule:`Describe the task the agent should do each time. Placeholders: {{date}}, {{project}}`,github:`Describe the task the agent should do for each match. Placeholders: {{github.url}}, {{github.title}}, {{github.number}}, {{github.labels}}`};function Sn({data:e,automation:t,actions:n,onBack:r,onSaved:i,onLog:a}){let o=c(),l=O(),u=ee(),g=d(),_=h(),v=s(),y=m(),[b,x]=(0,G.useState)(()=>t?Ut(t):Bt()),[S,ne]=(0,G.useState)(!t),[C,re]=(0,G.useState)(!1),[ie,w]=(0,G.useState)(!1),[T,D]=(0,G.useState)(null),[ae,oe]=(0,G.useState)(!1),se=(0,G.useRef)(null),k=t?.revision,ce=(0,G.useRef)(k);(0,G.useEffect)(()=>{!t||k===ce.current||(ce.current=k,x(Ut(t)),oe(!1),D(null))},[t,k]);let A=e=>x(t=>({...t,...e})),le=e?.timeZone??`UTC`,de=e?.available!==!1,fe=u.data?.capabilities.dispatch===!0,pe=(0,G.useMemo)(()=>Oe(ke(g.data?.promptTemplates),u.data?.capabilities),[g.data?.promptTemplates,u.data?.capabilities]),me=_.data?.workflows??[],he=me.map(e=>e.name),ge=v.data,_e=(ge??[]).map(e=>e.name),ve=g.data?.skillUsage,ye=(0,G.useMemo)(()=>De(ge??[],ve),[ge,ve]),be=v.data!==void 0&&_.data!==void 0&&!g.isPending,xe=y.data?.baseBranch??y.data?.info?.branch??void 0,Se=(0,G.useMemo)(()=>Yt(b),[b]),j=(0,G.useMemo)(()=>Qt(b),[b]),Ce=b.name.trim().length>0&&b.prompt.trim().length>0&&!ie&&(b.kind!==`tracker`||C),we=e=>{let t=se.current,n=t?.selectionStart??b.prompt.length,r=Ae(b.prompt,n,e);A({prompt:r.text}),requestAnimationFrame(()=>{t&&(t.focus(),t.setSelectionRange(r.caret,r.caret))})},Te=async()=>{w(!0),D(null),oe(!1);try{let e=Jt(b);t?await te(t.id,{...e,enabled:b.enabled,expectedRevision:t.revision}):await p({...e,enable:b.enabled}),await o.invalidateQueries({queryKey:ue()}),i()}catch(e){if(t&&e instanceof f&&e.status===409)oe(!0);else{let t=e instanceof Error?e.message:String(e);D({message:t,section:e instanceof f&&e.status===400?bn(t):`top`})}}finally{w(!1)}},M=()=>void o.invalidateQueries({queryKey:ue()}),je=t?`Save changes`:b.enabled?`Save and enable`:`Save paused`;return(0,K.jsxs)(`div`,{"data-route":`automations`,"data-slot":`automation-editor`,className:`flex min-h-full flex-col`,children:[(0,K.jsxs)(`header`,{className:`sticky top-0 z-10 flex min-h-14 shrink-0 flex-wrap items-center gap-3 border-b border-border bg-background px-5 max-md:py-2 md:h-14 md:flex-nowrap`,children:[(0,K.jsx)(E,{variant:`ghost`,size:`icon-sm`,"aria-label":`Back`,onClick:r,children:(0,K.jsx)(Ee,{"aria-hidden":`true`,className:`size-[15px]`})}),(0,K.jsx)(`h1`,{className:`truncate text-base font-semibold`,children:t?`Edit automation`:`New automation`}),t?(0,K.jsx)(I,{dot:t.enabled?`success`:`neutral`,children:t.enabled?`enabled`:`paused`}):null,(0,K.jsx)(`span`,{className:`flex-1`}),t?null:(0,K.jsxs)(E,{variant:`ghost`,size:`sm`,"aria-expanded":S,"aria-label":S?`Hide templates`:`Start from a template`,onClick:()=>ne(e=>!e),children:[(0,K.jsx)(Et,{"aria-hidden":`true`,className:`size-3.5`}),(0,K.jsx)(`span`,{className:`max-md:hidden`,children:S?`Hide templates`:`Start from a template`})]}),(0,K.jsx)(E,{variant:`outline`,onClick:r,children:`Cancel`}),(0,K.jsx)(E,{disabled:!Ce,onClick:()=>void Te(),children:je})]}),(0,K.jsx)(`div`,{className:`flex justify-center p-5`,children:(0,K.jsxs)(`div`,{className:`grid w-full max-w-[1080px] grid-cols-1 items-start gap-4 lg:grid-cols-[minmax(0,1fr)_320px]`,children:[(0,K.jsxs)(`div`,{className:`flex min-w-0 flex-col gap-4`,children:[ae?(0,K.jsxs)(`div`,{role:`alert`,"data-slot":`editor-conflict`,className:`flex flex-wrap items-center gap-3 rounded-lg border border-danger/40 bg-danger/10 px-3.5 py-2.5 text-[13px] text-foreground`,children:[`Edited elsewhere — reload to see the latest version`,(0,K.jsx)(E,{variant:`outline`,size:`sm`,className:`ml-auto`,onClick:M,children:`Reload`})]}):null,T?.section===`top`?(0,K.jsx)(wn,{children:T.message}):null,S&&!t?(0,K.jsx)(vn,{onPick:e=>{let t=e.workflow&&he.includes(e.workflow)?e.workflow:void 0,n=e.steps?.every(e=>!e.skill||_e.includes(e.skill))?e.steps:void 0;x(r=>Kt(r,{...e,workflow:t,steps:n})),ne(!1)}}):null,(0,K.jsx)(Cn,{title:`Name`,children:(0,K.jsx)(L,{"aria-label":`Name`,placeholder:`Nightly dependency bump`,value:b.name,onChange:e=>A({name:e.target.value}),className:`max-w-[420px] text-[15px] md:text-[15px]`})}),(0,K.jsxs)(Cn,{title:`When`,children:[(0,K.jsx)(Tn,{value:b.kind,editing:!!t,githubAvailable:de,githubReason:e?.reason,onChange:e=>A({kind:e,...e===`tracker`?{intervalSeconds:1800,enabled:!1}:{}})}),b.kind===`schedule`?(0,K.jsx)(fn,{schedule:b.schedule,timeZone:le,onChange:e=>A({schedule:e})}):b.kind===`tracker`?(0,K.jsx)(tn,{trigger:b.trackerTrigger,intervalSeconds:b.intervalSeconds,onChange:A,onValid:re}):(0,K.jsx)(an,{events:b.events,intervalSeconds:b.intervalSeconds,filters:b.filters,onChange:e=>A(e)}),T?.section===`when`?(0,K.jsx)(wn,{children:T.message}):null]}),(0,K.jsxs)(Cn,{title:`What to run`,children:[(0,K.jsxs)(`div`,{"data-slot":`editor-prompt-templates`,className:`flex flex-wrap items-center gap-1.5 text-xs text-soft-foreground`,children:[(0,K.jsx)(et,{"aria-hidden":`true`,className:`size-3`}),`Prompt templates`,pe.map(e=>(0,K.jsx)(N,{className:`h-6 text-[11.5px]`,title:e.text,onClick:()=>we(e.text),children:e.label},e.id)),(0,K.jsx)(N,{dashed:!0,className:`h-6 text-[11.5px]`,icon:(0,K.jsx)(nt,{"aria-hidden":`true`,className:`size-3`}),onClick:()=>l(`${Tt(`project`,`instructions`)}#prompt-templates`),children:`Manage…`})]}),(0,K.jsx)(Me,{ref:se,"aria-label":`Prompt`,rows:5,placeholder:xn[b.kind],value:b.prompt,onChange:e=>A({prompt:e.target.value}),className:`min-h-[104px] text-sm leading-[1.55] md:text-sm`}),j.length>0?(0,K.jsxs)(`div`,{role:`status`,"data-slot":`editor-prompt-condition`,className:`flex flex-wrap items-center gap-2 rounded-md border border-warning/40 bg-warning/10 px-3 py-2 text-[12.5px] text-foreground`,children:[(0,K.jsxs)(`span`,{className:`min-w-0 flex-1`,children:[`The prompt names `,j.map(e=>`@${e}`).join(`, `),`, but prompt text does not decide what launches — without a filter every matching event starts a task.`]}),(0,K.jsx)(E,{variant:`outline`,size:`sm`,onClick:()=>A({filters:{...b.filters,authors:[...Vt(b.filters.authors),...j].join(`, `)}}),children:`Add to Authors`})]}):null,(0,K.jsx)(sn,{source:Pt(b),sourcesReady:be,skills:ye,skillUsage:ve,workflows:me,onSource:e=>A(Ft(e)),pick:{runner:b.runner,model:b.model,account:b.account},onPick:e=>A({runner:e.runner,model:e.model,account:e.account}),baseBranch:xe,autonomous:b.autonomous,onAutonomous:e=>A({autonomous:e})}),(0,K.jsx)(`p`,{className:`m-0 text-xs leading-[1.5] text-soft-foreground`,children:`Each run is an ordinary cezar task in its own worktree — it queues behind the parallel cap like anything else and never auto-merges.`}),(0,K.jsx)(rn,{available:fe,enabled:b.dispatch,maxSubtasks:b.maxSubtasks,reviewChild:b.reviewChild,onChange:e=>A(e)}),T?.section===`what`?(0,K.jsx)(wn,{children:T.message}):null]}),(0,K.jsx)(Cn,{title:`Enable`,children:(0,K.jsxs)(B,{className:`text-[13px] font-medium`,children:[(0,K.jsx)(yt,{"aria-label":`Enabled`,checked:b.enabled,onCheckedChange:e=>A({enabled:e})}),`Enabled`,b.kind===`schedule`?null:(0,K.jsx)(`span`,{className:`text-xs font-normal text-muted-foreground`,children:`— from a current-time baseline; existing matches will not launch`})]})})]}),(0,K.jsxs)(`div`,{className:`flex flex-col gap-3 lg:sticky lg:top-[76px]`,children:[(0,K.jsx)(hn,{kind:b.kind,schedule:b.schedule,intervalSeconds:b.intervalSeconds,timeZone:le}),(0,K.jsx)(nn,{definition:Se}),t&&t.kind!==`schedule`&&n?(0,K.jsx)(E,{variant:`outline`,disabled:n.busy,onClick:()=>void n.preview(t),children:`Preview saved matches`}):null,t?.lastRun?(0,K.jsx)(pn,{lastRun:t.lastRun,busy:n?.busy,onRunNow:()=>void n?.runNow(t),onLog:a}):null]})]})})]})}function Cn({title:e,children:t}){return(0,K.jsxs)(P,{"data-slot":`editor-section`,className:`gap-0 px-6 py-0`,children:[(0,K.jsx)(`div`,{className:`pt-4 pb-1 text-sm font-semibold`,children:e}),(0,K.jsx)(`div`,{className:`flex flex-col gap-3.5 pt-2.5 pb-5`,children:t})]})}function wn({children:e}){return(0,K.jsx)(`p`,{role:`alert`,className:`m-0 rounded-md border border-danger/40 bg-danger/10 px-3 py-2 text-[12.5px] text-danger`,children:e})}function Tn({value:e,editing:t,githubAvailable:n,githubReason:r,onChange:i}){let a=`Change the kind by creating a new automation`;return(0,K.jsx)(`div`,{"data-slot":`editor-kind`,role:`group`,"aria-label":`Trigger`,className:`inline-flex flex-wrap gap-0.5 self-start rounded-md bg-muted p-[3px]`,children:[{value:`schedule`,label:`On a schedule`,disabled:t&&e!==`schedule`,...t&&e!==`schedule`?{title:a}:{}},{value:`github`,label:`When GitHub changes`,disabled:!n||t&&e!==`github`,...n?t&&e!==`github`?{title:a}:{}:{title:r??`GitHub is unavailable`}},{value:`tracker`,label:`When Jira / Linear changes`,disabled:t&&e!==`tracker`,...t&&e!==`tracker`?{title:a}:{}}].map(t=>(0,K.jsx)(`button`,{type:`button`,"data-value":t.value,"aria-pressed":t.value===e,disabled:t.disabled,title:t.title,onClick:()=>{t.value!==e&&i(t.value)},className:w(`flex h-7 items-center justify-center gap-1.5 rounded-[7px] px-3 text-[12.5px] font-medium whitespace-nowrap text-muted-foreground transition-colors hover:text-foreground disabled:opacity-50`,t.value===e&&`bg-card font-semibold text-foreground shadow-xs`),children:t.label},t.value))})}function En({automationId:e,automation:t,timeZone:n,onBack:r}){let s=O(),l=c(),d=v(),f=(0,G.useMemo)(()=>[d,`automation-log`,e],[d,e]),p=a({queryKey:f,queryFn:({signal:t})=>i(e,{signal:t})}),[m,ee]=(0,G.useState)(`all`),[h,te]=(0,G.useState)(`all`);(0,G.useEffect)(()=>le((t,n)=>{t===`automation-change`&&n.automationId===e&&l.invalidateQueries({queryKey:f})}),[e,l,f]);let g=u({mutationFn:e=>o(e),onSuccess:()=>l.invalidateQueries({queryKey:f}),onError:e=>oe(e instanceof Error?e.message:String(e),{tone:`danger`})}),_=n??`UTC`,y=p.data?.records.filter(e=>(m===`all`||e.result===m)&&(h===`all`||e.event===h));return(0,K.jsxs)(`div`,{"data-route":`automations`,"data-slot":`automation-log`,className:`flex min-h-full flex-col`,children:[(0,K.jsxs)(`header`,{className:`sticky top-0 z-10 flex h-14 shrink-0 items-center gap-3 border-b border-border bg-background px-5`,children:[(0,K.jsx)(E,{variant:`ghost`,size:`icon-sm`,"aria-label":`Back`,onClick:r,children:(0,K.jsx)(Ee,{className:`size-[15px]`})}),(0,K.jsx)(`h1`,{className:`m-0 text-base font-semibold`,children:t?t.name:`Automation`}),(0,K.jsx)(`span`,{className:`text-[13px] text-muted-foreground`,children:`· execution log`}),(0,K.jsxs)(`div`,{className:`flex flex-1 items-center justify-end gap-2`,children:[(0,K.jsxs)(W,{value:m,onValueChange:e=>ee(e),children:[(0,K.jsx)(U,{size:`sm`,"aria-label":`Filter by result`,className:`text-[12.5px]`,children:(0,K.jsx)(H,{placeholder:`All results`})}),(0,K.jsxs)(V,{children:[(0,K.jsx)(z,{value:`all`,children:`All results`}),Dn.map(e=>(0,K.jsx)(z,{value:e,children:e},e))]})]}),(0,K.jsxs)(W,{value:h,onValueChange:e=>te(e),children:[(0,K.jsx)(U,{size:`sm`,"aria-label":`Filter by event`,className:`text-[12.5px]`,children:(0,K.jsx)(H,{placeholder:`All events`})}),(0,K.jsxs)(V,{children:[(0,K.jsx)(z,{value:`all`,children:`All events`}),On.map(e=>(0,K.jsx)(z,{value:e,children:e},e))]})]})]}),(0,K.jsxs)(E,{variant:`outline`,size:`sm`,onClick:()=>s(`/automations/${encodeURIComponent(e)}`),children:[(0,K.jsx)(rt,{className:`size-[13px]`}),`Edit`]})]}),(0,K.jsx)(`div`,{className:`flex justify-center p-5`,children:p.isError?(0,K.jsx)(`div`,{className:`w-full max-w-[820px]`,children:(0,K.jsx)($,{text:p.error instanceof Error?p.error.message:String(p.error)})}):y===void 0?(0,K.jsx)(`div`,{className:`w-full max-w-[820px]`,children:(0,K.jsx)($,{text:`Loading execution log…`})}):y.length===0?(0,K.jsx)(`div`,{className:`w-full max-w-[820px]`,children:(0,K.jsx)($,{text:`No checks have run yet.`})}):(0,K.jsx)(P,{flush:!0,className:`w-full max-w-[820px]`,children:y.map((e,t)=>(0,K.jsx)(An,{record:e,run:e.runId===void 0?void 0:p.data?.runs[e.runId],last:t===y.length-1,timeZone:_,retrying:g.isPending&&g.variables===e.receiptId,onRetry:e=>g.mutate(e)},e.seq))})})]})}var Dn=[`launched`,`no-match`,`duplicate`,`rate-limited`,`error`,`baseline`,`preview`,`manual`,`catch-up`,`skipped`,`failed`],On=[`pull_request.opened`,`issue.opened`,`issue.labeled`,`issue.unlabeled`,`pull_request.reviewed`,`pull_request.review_requested`,`pull_request.rereview_requested`,`pull_request.closed`,`pull_request.merged`];function kn(e){return e.result===`failed`&&e.runId===void 0?e.receiptId:void 0}function An({record:e,run:t,last:n,timeZone:r,retrying:i,onRetry:a}){let o=ze(e.result),s=t?.children??[],c=kn(e);return(0,K.jsxs)(`div`,{"data-slot":`log-row`,"data-result":e.result,className:`grid grid-cols-[90px_110px_1fr_auto] items-center gap-x-3 gap-y-2 px-4 py-3 text-[13px] ${n?``:`border-b border-border`}`,children:[(0,K.jsx)(`span`,{className:`font-mono text-xs font-medium text-muted-foreground tabular-nums`,children:Ie(e.ts,r)}),(0,K.jsx)(I,{dot:o,className:`w-fit`,children:e.result}),(0,K.jsx)(`span`,{className:`overflow-hidden text-ellipsis whitespace-nowrap ${o===`danger`?`text-danger`:`text-muted-foreground`}`,title:e.reason,children:e.reason??``}),null,e.runId===void 0?c===void 0?(0,K.jsx)(`span`,{}):(0,K.jsxs)(E,{variant:`ghost`,size:`sm`,disabled:i,onClick:()=>a(c),children:[(0,K.jsx)(St,{className:`size-3`}),`Retry task`]}):(0,K.jsx)(E,{variant:`ghost`,size:`sm`,asChild:!0,children:(0,K.jsxs)(k,{to:`/tasks/${encodeURIComponent(e.runId)}`,children:[`Open task`,(0,K.jsx)(A,{className:`size-3`})]})}),s.length>0?(0,K.jsx)(`div`,{className:`col-span-full flex flex-col gap-1 pl-3.5`,children:s.map(e=>(0,K.jsxs)(`div`,{"data-slot":`log-child`,className:`grid grid-cols-[14px_70px_1fr_auto] items-center gap-2.5 text-[12.5px]`,children:[(0,K.jsx)(`span`,{className:`font-mono text-[11px] text-soft-foreground`,children:`└`}),(0,K.jsx)(`span`,{className:`w-fit rounded-full bg-muted px-1.5 py-px text-[10.5px] font-medium text-muted-foreground`,children:e.kind??`implement`}),(0,K.jsxs)(`span`,{className:`flex min-w-0 items-center gap-2`,children:[(0,K.jsx)(R,{tone:Pe(e.status)}),(0,K.jsx)(`span`,{className:`overflow-hidden text-ellipsis whitespace-nowrap`,children:e.title})]}),null,(0,K.jsx)(E,{variant:`ghost`,size:`sm`,className:`h-6`,asChild:!0,children:(0,K.jsxs)(k,{to:`/tasks/${encodeURIComponent(e.runId)}`,children:[`Open`,(0,K.jsx)(A,{className:`size-[11px]`})]})})]},e.runId))}):null]})}function jn({automation:e,actions:t}){let n=O(),[r,i]=(0,G.useState)(!1),a=e=>e.stopPropagation(),o=`/automations/${encodeURIComponent(e.id)}`;return(0,K.jsxs)(`span`,{"data-slot":`row-actions`,className:`inline-flex gap-0.5`,onClick:a,children:[e.kind===`schedule`?null:(0,K.jsx)(E,{variant:`ghost`,size:`icon-sm`,title:`Preview matches`,"aria-label":`Preview matches`,disabled:t.busy,onClick:()=>void t.preview(e),children:(0,K.jsx)($e,{className:`size-[13px]`})}),(0,K.jsx)(E,{variant:`ghost`,size:`icon-sm`,title:`Run now`,"aria-label":`Run now`,disabled:t.busy,onClick:()=>void t.runNow(e),children:(0,K.jsx)(it,{className:`size-[13px]`})}),(0,K.jsx)(E,{variant:`ghost`,size:`icon-sm`,title:e.enabled?`Pause`:`Enable`,"aria-label":e.enabled?`Pause`:`Enable`,disabled:t.busy,onClick:()=>void t.toggleEnabled(e),children:e.enabled?(0,K.jsx)(Dt,{className:`size-[13px]`}):(0,K.jsx)(Ot,{className:`size-[13px]`})}),(0,K.jsxs)(Ye,{children:[(0,K.jsx)(Ze,{asChild:!0,children:(0,K.jsx)(E,{variant:`ghost`,size:`icon-sm`,"aria-label":`More`,children:(0,K.jsx)(we,{className:`size-3.5`})})}),(0,K.jsxs)(Xe,{align:`end`,className:`w-[200px]`,onClick:a,children:[(0,K.jsxs)(F,{onSelect:()=>n(o),children:[(0,K.jsx)(rt,{}),`Edit`]}),(0,K.jsxs)(F,{onSelect:()=>n(`${o}/log`),children:[(0,K.jsx)(kt,{}),`View log`]}),(0,K.jsxs)(F,{onSelect:()=>void t.duplicate(e),children:[(0,K.jsx)(Ce,{}),`Duplicate`]}),(0,K.jsxs)(F,{onSelect:()=>void t.copyCli(e),children:[(0,K.jsx)(Qe,{}),`Copy as CLI`]}),(0,K.jsx)(Je,{}),(0,K.jsxs)(F,{variant:`destructive`,onSelect:()=>i(!0),children:[(0,K.jsx)(je,{}),`Delete`]})]})]}),(0,K.jsx)(gt,{open:r,onOpenChange:i,children:(0,K.jsxs)(dt,{onClick:a,children:[(0,K.jsxs)(ht,{children:[(0,K.jsxs)(ut,{children:[`Delete “`,e.name,`”?`]}),(0,K.jsx)(lt,{children:`The automation is removed for good. Tasks it already launched and its execution log stay.`})]}),(0,K.jsxs)(pt,{children:[(0,K.jsx)(mt,{children:`Cancel`}),(0,K.jsx)(ft,{className:`bg-danger text-danger-foreground hover:brightness-[0.96]`,onClick:()=>void t.remove(e),children:`Delete`})]})]})})]})}var X=`h-[38px] border-b border-border px-[10px] text-left text-[11px] leading-none font-semibold tracking-[.05em] whitespace-nowrap text-soft-foreground uppercase`,Z=`h-12 border-b border-border px-[10px] text-[13px] leading-none whitespace-nowrap`,Q=`cz-auto-wide max-[1280px]:hidden`,Mn=(0,K.jsx)(`span`,{className:`text-xs text-soft-foreground`,children:`—`});function Nn({data:e,actions:t,now:n=Date.now()}){return(0,K.jsx)(P,{flush:!0,"data-slot":`automations-table`,className:`min-w-0 overflow-x-auto`,children:(0,K.jsxs)(`table`,{className:`w-full border-collapse [&_tbody_tr:last-child>td]:border-b-0`,children:[(0,K.jsx)(`thead`,{children:(0,K.jsxs)(`tr`,{children:[(0,K.jsx)(`th`,{className:w(X,`pl-4`),children:`State`}),(0,K.jsx)(`th`,{className:X,children:`Automation`}),(0,K.jsx)(`th`,{className:X,children:`Trigger`}),(0,K.jsx)(`th`,{className:w(X,Q),children:`Runs as`}),(0,K.jsx)(`th`,{className:X,children:`Next run`}),(0,K.jsx)(`th`,{className:X,children:`Last run`}),(0,K.jsx)(`th`,{className:w(X,Q,`text-right`),children:`Runs 7d`}),null,(0,K.jsx)(`th`,{className:w(X,`pr-4`)})]})}),(0,K.jsx)(`tbody`,{children:e.automations.map(r=>(0,K.jsx)(Pn,{automation:r,actions:t,timeZone:e.timeZone,available:e.available,showCost:!1,now:n},r.id))})]})})}function Pn({automation:e,actions:t,timeZone:n,available:r,showCost:i,now:a}){let o=O(),s=e.kind===`github`,c=s&&!r,l=e.task.dispatch,u=We(e),d=[e.task.workflow,e.task.runner].filter(Boolean);return(0,K.jsxs)(`tr`,{"data-slot":`automation-row`,"data-automation":e.id,"data-enabled":e.enabled?`true`:`false`,className:w(`cursor-pointer hover:bg-muted`,!e.enabled&&`opacity-60`),onClick:()=>o(`/automations/${encodeURIComponent(e.id)}`),children:[(0,K.jsx)(`td`,{className:w(Z,`pl-4`),children:c?(0,K.jsx)(I,{dot:`neutral`,children:`paused by capability`}):(0,K.jsx)(I,{dot:e.enabled?`success`:`neutral`,pulse:e.enabled&&s,children:e.enabled?`enabled`:`paused`})}),(0,K.jsx)(`td`,{className:w(Z,`max-w-0 min-w-[200px]`),children:(0,K.jsxs)(`span`,{className:`flex min-w-0 items-center gap-2`,children:[s?(0,K.jsx)(bt,{className:`size-3.5 shrink-0 text-soft-foreground`}):e.kind===`tracker`?(0,K.jsx)(M,{className:`size-3.5 shrink-0 text-soft-foreground`}):(0,K.jsx)(xt,{className:`size-3.5 shrink-0 text-soft-foreground`}),(0,K.jsx)(`span`,{className:`overflow-hidden text-[13px] font-medium text-ellipsis whitespace-nowrap`,children:e.name}),l?(0,K.jsxs)(`span`,{"data-slot":`dispatch-badge`,title:`dispatch · up to ${l.maxSubtasks??1} subtasks`,className:`inline-flex shrink-0 items-center gap-[3px] rounded-full bg-muted px-1.5 py-px text-[10.5px] font-medium text-muted-foreground`,children:[(0,K.jsx)(tt,{className:`size-2.5`}),`×`,l.maxSubtasks??1]}):null]})}),(0,K.jsx)(`td`,{className:w(Z,`max-w-[260px] overflow-hidden font-mono text-xs text-ellipsis text-muted-foreground`),title:u,children:u}),(0,K.jsx)(`td`,{className:w(Z,Q,`text-xs text-muted-foreground`),children:d.length?(0,K.jsxs)(`span`,{className:`inline-flex items-center gap-1.5`,children:[d.map((e,t)=>(0,K.jsxs)(`span`,{className:`contents`,children:[t>0?(0,K.jsx)(`span`,{className:`text-soft-foreground`,children:`·`}):null,e]},e)),e.task.autonomous?(0,K.jsxs)(K.Fragment,{children:[(0,K.jsx)(`span`,{className:`text-soft-foreground`,children:`·`}),(0,K.jsx)(`span`,{title:`autonomous`,"data-slot":`autonomous-mark`,className:`inline-flex`,children:(0,K.jsx)(M,{"aria-hidden":`true`,className:`size-[11px] text-soft-foreground`})})]}):null]}):Mn}),(0,K.jsx)(`td`,{"data-slot":`next-run`,className:w(Z,`font-mono text-xs tabular-nums`,e.enabled?`text-foreground`:`text-soft-foreground`),children:Fn(e,n,a)}),(0,K.jsx)(`td`,{className:Z,children:e.lastRun?(0,K.jsxs)(`span`,{className:`inline-flex items-center gap-2`,children:[(0,K.jsx)(R,{tone:Pe(e.lastRun.status)}),(0,K.jsx)(`span`,{className:`text-[12.5px] text-muted-foreground`,children:He(e.lastRun.status)}),(0,K.jsx)(`span`,{className:`text-[11.5px] text-soft-foreground`,children:_t(e.lastRun.ts,a)}),(0,K.jsxs)(k,{to:`/tasks/${encodeURIComponent(e.lastRun.runId)}`,"data-slot":`task-link`,onClick:e=>e.stopPropagation(),className:`inline-flex items-center gap-0.5 rounded-full border border-violet/40 px-1.5 py-px font-mono text-[10.5px] font-semibold text-violet`,children:[`task`,(0,K.jsx)(A,{className:`size-[9px]`})]})]}):Mn}),(0,K.jsx)(`td`,{className:w(Z,Q,`text-right font-mono text-xs text-muted-foreground tabular-nums`),children:e.runs7d}),i?(0,K.jsx)(`td`,{className:w(Z,Q,`text-right font-mono text-xs text-muted-foreground tabular-nums`),children:e.costUsd7d===void 0?Mn:Fe(e.costUsd7d)}):null,(0,K.jsx)(`td`,{className:w(Z,`pr-3 text-right`),children:(0,K.jsx)(jn,{automation:e,actions:t})})]})}function Fn(e,t,n){if(!e.enabled)return`—`;if(e.kind!==`schedule`)return`continuous`;if(e.nextRunAt)return Ve(e.nextRunAt,t)||`—`;let r=e.schedule?x(e.schedule,n,t):null;return r===null?`—`:Ve(r,t)||`—`}function In(e){return e.hour*60+e.minute}function Ln(e,t,n=0){let r=C(e,t);if(!r)return null;let i=new Date(Date.UTC(r.year,r.month-1,r.day+n));return ne(i.getUTCFullYear(),i.getUTCMonth()+1,i.getUTCDate(),0,0,t)}function Rn(e,t,n,r){let i=[];for(let a of e)if(!(a.kind!==`schedule`||!a.schedule))for(let e of ie(a.schedule,t,n,r)){let t=C(e,r);t&&i.push({automation:a,at:e,parts:t})}return i.sort((e,t)=>e.at-t.at)}function zn(e){let t=new Map;return e.map(e=>{let n=In(e.parts),r=t.get(n)??0;return t.set(n,r+1),{occurrence:e,stack:r}})}function Bn({automation:e,minute:t,stack:n=0,wide:r=!1}){let i=O(),a=D(Math.floor(t/60),t%60),o=[e.task.workflow,e.task.runner].filter(Boolean).join(` · `);return(0,K.jsxs)(`button`,{type:`button`,"data-slot":`event-block`,"data-automation":e.id,"data-enabled":e.enabled?`true`:`false`,title:`${e.name} · ${a}`,onClick:()=>i(`/automations/${encodeURIComponent(e.id)}`),className:w(`absolute right-[3px] left-[3px] flex cursor-pointer overflow-hidden rounded-[6px] border border-border bg-card text-left text-[11.5px] leading-[1.3] font-medium text-foreground shadow-xs`,r?`h-12 flex-col items-start gap-[3px] px-2 py-[5px]`:`h-6 flex-row items-center gap-1.5 px-1.5`,!e.enabled&&`opacity-50`),style:{top:t/60*34+1+26*n},children:[(0,K.jsxs)(`span`,{className:`inline-flex min-w-0 items-center gap-1.5`,children:[(0,K.jsx)(R,{tone:e.task.runner===`codex`?`violet`:`success`}),(0,K.jsx)(`span`,{className:`overflow-hidden text-ellipsis whitespace-nowrap`,children:e.name})]}),r?(0,K.jsxs)(`span`,{className:`max-w-full overflow-hidden font-mono text-[10.5px] leading-[1.3] font-normal text-ellipsis whitespace-nowrap text-muted-foreground`,children:[a,o?` · ${o}`:``]}):null]})}function Vn(){return(0,K.jsx)(`div`,{"data-slot":`hour-gutter`,className:`w-12 shrink-0`,children:Array.from({length:24},(e,t)=>(0,K.jsx)(`div`,{className:`-translate-y-[6px] pr-2 text-right font-mono text-[10.5px] text-soft-foreground`,style:{height:34},children:t?D(t):``},t))})}function Hn({minute:e}){return(0,K.jsx)(`div`,{"aria-hidden":`true`,"data-slot":`now-line`,className:`absolute inset-x-0 z-[2] h-[2px] bg-primary`,style:{top:e/60*34},children:(0,K.jsx)(`span`,{className:`absolute -top-[3px] -left-[3px] size-[8px] rounded-full bg-primary`})})}function Un(){return(0,K.jsx)(K.Fragment,{children:Array.from({length:24},(e,t)=>(0,K.jsx)(`div`,{"aria-hidden":`true`,className:`absolute inset-x-0 h-px bg-border`,style:{top:t*34}},t))})}function Wn({automations:e}){let t=e.filter(e=>e.kind===`github`&&e.enabled);return t.length?(0,K.jsxs)(`div`,{"data-slot":`poll-band`,className:`grid grid-cols-[48px_minmax(0,1fr)] border-b border-border`,children:[(0,K.jsx)(`div`,{className:`py-2 pr-2 text-right font-mono text-[10.5px] text-soft-foreground`,children:`poll`}),(0,K.jsx)(`div`,{className:`flex flex-col gap-1 border-l border-border px-2 py-1.5`,children:t.map(e=>(0,K.jsxs)(`div`,{"data-slot":`poll-row`,className:`flex h-[22px] min-w-0 items-center gap-2 overflow-hidden rounded-[6px] border border-violet/25 bg-violet/8 px-2 text-[11.5px] font-medium`,children:[(0,K.jsx)(bt,{className:`size-3 shrink-0 text-violet`}),(0,K.jsx)(`span`,{className:`overflow-hidden text-ellipsis whitespace-nowrap`,children:e.name}),(0,K.jsx)(`span`,{className:`overflow-hidden font-mono text-[10.5px] font-normal text-ellipsis whitespace-nowrap text-muted-foreground`,children:We(e)}),(0,K.jsxs)(`span`,{className:`ml-auto shrink-0 font-mono text-[10.5px] font-normal whitespace-nowrap text-soft-foreground`,children:[e.runs7d,` runs`]})]},e.id))})]}):null}var Gn=[`Jan`,`Feb`,`Mar`,`Apr`,`May`,`Jun`,`Jul`,`Aug`,`Sep`,`Oct`,`Nov`,`Dec`];function Kn({data:e}){let t=Se(6e4),n=O(),[r,i]=(0,G.useState)(0),a=e.timeZone,o=Ln(t,a,r),s=Ln(t,a,r+1),c=o===null?null:C(o,a),l=C(t,a);if(o===null||s===null||!c||!l)return(0,K.jsx)(`div`,{"data-slot":`day-view`,className:`p-5`,children:(0,K.jsxs)(`p`,{className:`rounded-xl border border-dashed p-8 text-center text-sm text-muted-foreground`,children:[`Cannot draw the day: unknown time zone “`,a,`”.`]})});let u=r===0,d=zn(Rn(e.automations,o,s,a)),f=e.automations.filter(e=>e.kind===`github`&&e.enabled),p=`${Re(c.weekday)} ${c.day} ${Gn[c.month-1]??``}`;return(0,K.jsxs)(`div`,{"data-slot":`day-view`,className:`grid grid-cols-[minmax(0,1fr)_320px] items-start gap-4 p-5 max-md:grid-cols-1`,children:[(0,K.jsxs)(P,{flush:!0,children:[(0,K.jsxs)(`div`,{className:`flex items-center gap-2 border-b border-border px-3.5 py-2.5`,children:[(0,K.jsx)(E,{variant:`ghost`,size:`icon-sm`,"aria-label":`Previous day`,onClick:()=>i(e=>e-1),children:(0,K.jsx)(Ge,{className:`size-3.5`})}),(0,K.jsx)(E,{variant:`ghost`,size:`icon-sm`,"aria-label":`Next day`,onClick:()=>i(e=>e+1),children:(0,K.jsx)(qe,{className:`size-3.5`})}),(0,K.jsx)(`span`,{"data-slot":`day-title`,className:`text-sm font-semibold whitespace-nowrap`,children:p}),u?(0,K.jsx)(I,{dot:`success`,children:`today`}):null,(0,K.jsxs)(`span`,{className:`ml-auto text-xs whitespace-nowrap text-muted-foreground`,children:[d.length,` scheduled runs`,f.length?` · ${f.length} GitHub poll${f.length===1?``:`s`}`:``]})]}),(0,K.jsx)(Wn,{automations:e.automations}),(0,K.jsxs)(`div`,{className:`flex max-h-[600px] overflow-y-auto`,children:[(0,K.jsx)(Vn,{}),(0,K.jsxs)(`div`,{"data-slot":`day-column`,"data-today":u?`true`:void 0,className:`relative flex-1 border-l border-border`,style:{height:816},children:[(0,K.jsx)(Un,{}),u?(0,K.jsx)(Hn,{minute:In(l)}):null,d.map(({occurrence:e,stack:t})=>(0,K.jsx)(Bn,{automation:e.automation,minute:In(e.parts),stack:t,wide:!0},`${e.automation.id}-${e.at}`))]})]})]}),(0,K.jsxs)(P,{flush:!0,"data-slot":`agenda`,className:`py-3`,children:[(0,K.jsx)(`div`,{className:`px-3.5 pb-2 text-[11px] font-semibold tracking-[.05em] text-soft-foreground uppercase`,children:`Agenda`}),f.map(e=>(0,K.jsxs)(`button`,{type:`button`,"data-slot":`agenda-poll`,onClick:()=>n(`/automations/${encodeURIComponent(e.id)}`),className:`grid w-full cursor-pointer grid-cols-[48px_1fr] gap-2.5 px-3.5 py-2 text-left hover:bg-muted`,children:[(0,K.jsx)(`span`,{className:`font-mono text-[10.5px] font-medium text-soft-foreground`,children:`poll`}),(0,K.jsxs)(`span`,{className:`min-w-0`,children:[(0,K.jsxs)(`span`,{className:`flex items-center gap-2 text-[13px] font-medium`,children:[(0,K.jsx)(bt,{className:`size-3 shrink-0 text-violet`}),(0,K.jsx)(`span`,{className:`overflow-hidden text-ellipsis whitespace-nowrap`,children:e.name})]}),(0,K.jsxs)(`span`,{className:`mt-0.5 block overflow-hidden font-mono text-[11.5px] leading-[1.4] text-ellipsis whitespace-nowrap text-soft-foreground`,children:[We(e),` · continuous`]})]})]},e.id)),d.map(({occurrence:e})=>{let r=e.at<t,{automation:i}=e;return(0,K.jsxs)(`button`,{type:`button`,"data-slot":`agenda-row`,"data-past":r?`true`:`false`,onClick:()=>n(`/automations/${encodeURIComponent(i.id)}`),className:`grid w-full cursor-pointer grid-cols-[48px_1fr] gap-2.5 px-3.5 py-2 text-left hover:bg-muted`,children:[(0,K.jsx)(`span`,{className:w(`font-mono text-xs font-medium tabular-nums`,r?`text-soft-foreground`:`text-foreground`),children:D(e.parts.hour,e.parts.minute)}),(0,K.jsxs)(`span`,{className:`min-w-0`,children:[(0,K.jsxs)(`span`,{className:w(`flex items-center gap-2 text-[13px] font-medium`,r&&`text-muted-foreground`),children:[(0,K.jsx)(R,{tone:r&&i.lastRun?Pe(i.lastRun.status):`neutral`}),(0,K.jsx)(`span`,{className:`overflow-hidden text-ellipsis whitespace-nowrap`,children:i.name})]}),(0,K.jsx)(`span`,{className:`mt-0.5 block overflow-hidden text-[11.5px] leading-[1.4] text-ellipsis whitespace-nowrap text-soft-foreground`,children:i.task.prompt})]})]},`${i.id}-${e.at}`)}),d.length===0?(0,K.jsx)(`p`,{className:`px-3.5 py-2 text-[12.5px] text-soft-foreground`,children:f.length?`Nothing scheduled — the GitHub polls above still run.`:`Nothing scheduled.`}):null]})]})}function qn(e,t,n,r=12){let i=[];for(let a of e)if(!(!a.enabled||a.kind!==`schedule`||!a.schedule))for(let e of ie(a.schedule,t,t+14*864e5,n,r))i.push({automation:a,at:e});return i.sort((e,t)=>e.at-t.at).slice(0,r)}function Jn({open:e,onOpenChange:t,upcoming:n,pollCount:r,timeZone:i,now:a}){let o=O(),s=C(a,i);return(0,K.jsx)(ye,{open:e,onOpenChange:t,children:(0,K.jsxs)(ve,{side:`right`,"data-slot":`next-runs-rail`,"aria-describedby":void 0,className:`w-[360px] gap-0 sm:max-w-[360px]`,children:[(0,K.jsxs)(be,{className:`px-4 pt-4 pb-2`,children:[(0,K.jsxs)(xe,{className:`inline-flex items-center gap-2 text-sm`,children:[(0,K.jsx)(Be,{className:`size-4`}),`Next runs`]}),(0,K.jsx)(_e,{className:`sr-only`,children:`Upcoming scheduled runs, soonest first.`})]}),(0,K.jsxs)(`div`,{className:`overflow-y-auto`,children:[n.map((e,n)=>{let r=C(e.at,i),c=r!==null&&s!==null&&r.year===s.year&&r.month===s.month&&r.day===s.day,l=r?`${c?``:`${Re(r.weekday)} `}${D(r.hour,r.minute)}`:``;return(0,K.jsxs)(`button`,{type:`button`,"data-slot":`next-run-row`,"data-automation":e.automation.id,onClick:()=>{t(!1),o(`/automations/${encodeURIComponent(e.automation.id)}`)},className:`grid w-full cursor-pointer grid-cols-[76px_1fr_auto] items-center gap-2 px-4 py-2 text-left text-[13px] hover:bg-muted`,children:[(0,K.jsx)(`span`,{className:`font-mono text-xs font-medium whitespace-nowrap text-muted-foreground tabular-nums`,children:l}),(0,K.jsx)(`span`,{className:`overflow-hidden text-[13px] font-medium text-ellipsis whitespace-nowrap`,children:e.automation.name}),(0,K.jsx)(`span`,{className:`text-[11px] whitespace-nowrap text-soft-foreground`,children:Ne(e.at,a)})]},`${e.automation.id}-${n}`)}),n.length===0?(0,K.jsx)(`p`,{className:`px-4 py-2 text-[12.5px] text-soft-foreground`,children:`No scheduled runs in the next two weeks.`}):null,(0,K.jsxs)(`div`,{"data-slot":`next-runs-footer`,className:`mt-1.5 flex items-center gap-2 border-t border-border px-3.5 pt-2.5 pb-1 text-xs text-muted-foreground`,children:[(0,K.jsx)(R,{tone:`pending`,pulse:!0}),r,` GitHub polls running continuously`]})]})]})})}function Yn({stats:e,pollCount:t,upcoming:n,timeZone:r,railOpen:i,onOpenRail:a}){let o=n[0];return(0,K.jsxs)(`div`,{"data-slot":`stats-strip`,className:`flex flex-wrap items-center gap-4 text-[12.5px] text-muted-foreground`,children:[(0,K.jsx)(`span`,{className:`text-[11px] font-semibold tracking-[.05em] text-soft-foreground uppercase`,children:`This week`}),(0,K.jsx)(Xn,{label:`runs`,value:String(e.runs)}),null,(0,K.jsx)(Xn,{label:`failed`,value:String(e.failed),danger:e.failed>0}),(0,K.jsx)(Xn,{label:`agent time`,value:Ue(e.agentSeconds)}),(0,K.jsxs)(`span`,{"data-slot":`stats-polls`,className:`inline-flex shrink-0 items-center gap-1.5 whitespace-nowrap`,children:[(0,K.jsx)(R,{tone:`pending`,pulse:!0}),t,` GitHub polls continuous`]}),(0,K.jsx)(`span`,{className:`flex-1`}),(0,K.jsxs)(`span`,{"data-slot":`stats-next`,className:`inline-flex min-w-0 shrink-0 items-center gap-1.5 whitespace-nowrap`,children:[(0,K.jsx)(xt,{className:`size-[13px] text-soft-foreground`}),`next`,` `,(0,K.jsx)(`b`,{className:`font-mono text-[12.5px] font-medium text-foreground`,children:o?Le(o.at,r):`—`}),` `,(0,K.jsx)(`span`,{className:`max-w-[180px] overflow-hidden text-ellipsis`,children:o?.automation.name??``})]}),(0,K.jsxs)(E,{variant:`outline`,size:`sm`,"aria-expanded":i,className:`shrink-0`,onClick:a,children:[(0,K.jsx)(Be,{className:`size-3.5`}),`Next runs`,(0,K.jsx)(`span`,{className:`font-mono text-[11px] font-medium text-muted-foreground`,children:n.length})]})]})}function Xn({label:e,value:t,danger:n=!1}){return(0,K.jsxs)(`span`,{"data-slot":`stat`,"data-label":e,className:`inline-flex shrink-0 items-baseline gap-[5px] whitespace-nowrap`,children:[(0,K.jsx)(`b`,{className:w(`font-mono text-sm font-semibold tabular-nums`,n?`text-danger`:`text-foreground`),children:t}),e]})}var Zn=[`Mon`,`Tue`,`Wed`,`Thu`,`Fri`,`Sat`,`Sun`];function Qn({data:e}){let t=Se(6e4),n=e.timeZone,r=C(t,n),i=r?Array.from({length:8},(e,i)=>Ln(t,n,i-(r.weekday-1))):[],a=i[0],o=i[7];if(!r||a==null||o==null)return(0,K.jsx)(`div`,{"data-slot":`week-view`,className:`p-5`,children:(0,K.jsxs)(`p`,{className:`rounded-xl border border-dashed p-8 text-center text-sm text-muted-foreground`,children:[`Cannot draw the week: unknown time zone “`,n,`”.`]})});let s=r.weekday-1,c=Rn(e.automations,a,o,n),l=Zn.map((e,t)=>{let r=i[t];return{label:e,dayOfMonth:r==null?null:C(r,n)?.day??null,isToday:t===s,blocks:zn(c.filter(e=>e.parts.weekday-1===t))}});return(0,K.jsx)(`div`,{"data-slot":`week-view`,className:`p-5`,children:(0,K.jsxs)(P,{flush:!0,children:[(0,K.jsxs)(`div`,{className:`grid grid-cols-[48px_repeat(7,minmax(0,1fr))] border-b border-border`,children:[(0,K.jsx)(`div`,{}),l.map(e=>(0,K.jsxs)(`div`,{"data-slot":`week-day-header`,"data-today":e.isToday?`true`:void 0,className:w(`flex items-center gap-2 border-l border-border px-2 py-2.5 text-[11px] font-semibold tracking-[.05em] uppercase`,e.isToday?`text-foreground`:`text-soft-foreground`),children:[e.label,(0,K.jsx)(`span`,{className:w(`rounded-full px-[7px] py-px text-[13px] font-medium tracking-normal normal-case`,e.isToday?`bg-primary text-primary-foreground`:`text-muted-foreground`),children:e.dayOfMonth??``})]},e.label))]}),(0,K.jsx)(Wn,{automations:e.automations}),(0,K.jsxs)(`div`,{className:`flex max-h-[560px] overflow-y-auto`,children:[(0,K.jsx)(Vn,{}),l.map(e=>(0,K.jsxs)(`div`,{"data-slot":`week-column`,"data-today":e.isToday?`true`:void 0,className:w(`relative min-w-0 flex-1 border-l border-border`,e.isToday&&`bg-muted/35`),style:{height:816},children:[(0,K.jsx)(Un,{}),e.isToday?(0,K.jsx)(Hn,{minute:In(r)}):null,e.blocks.map(({occurrence:e,stack:t})=>(0,K.jsx)(Bn,{automation:e.automation,minute:In(e.parts),stack:t},`${e.automation.id}-${e.at}`))]},e.label))]})]})})}function $n(e){return[{value:`list`,label:`List`,...e===void 0?{}:{count:e}},{value:`week`,label:`Week`},{value:`day`,label:`Day`}]}function er({data:e,error:t,actions:n,view:r,onViewChange:i}){let[a,o]=(0,G.useState)(!1),s=Date.now(),c=e?qn(e.automations,s,e.timeZone,12):[],l=e?e.automations.filter(e=>e.kind===`github`&&e.enabled).length:0;return(0,K.jsxs)(`div`,{"data-route":`automations`,className:`flex min-h-full flex-col`,children:[(0,K.jsxs)(`header`,{className:`sticky top-0 z-10 flex h-14 shrink-0 items-center gap-3 border-b border-border bg-background px-5`,children:[(0,K.jsx)(`h1`,{className:`text-base font-semibold`,children:`Automations`}),(0,K.jsx)(fe,{slot:`automations-view`,label:`View`,value:r,options:$n(e?.automations.length),onChange:i}),(0,K.jsx)(`div`,{className:`flex-1`}),e?(0,K.jsxs)(`span`,{"data-slot":`automations-status`,className:`inline-flex min-w-0 items-center gap-2 overflow-hidden text-[12.5px] text-ellipsis whitespace-nowrap text-muted-foreground max-[1280px]:hidden`,children:[(0,K.jsx)(R,{tone:e.scheduler.state===`scheduled`?`success`:`neutral`}),e.scheduler.state===`scheduled`?`Scheduler running`:`Scheduler idle`,(0,K.jsx)(`span`,{className:`text-soft-foreground`,children:`·`}),e.available?`GitHub available`:`GitHub unavailable${e.reason?` · ${e.reason}`:``}`,(0,K.jsx)(`span`,{className:`text-soft-foreground`,children:`·`}),(0,K.jsx)(`span`,{className:`font-mono text-xs`,children:e.timeZone})]}):null,(0,K.jsx)(E,{asChild:!0,className:`shrink-0`,children:(0,K.jsxs)(k,{to:`/automations/new`,children:[(0,K.jsx)(at,{className:`size-[15px]`}),`New automation`]})})]}),t===void 0?e?e.automations.length===0?(0,K.jsx)(vt,{icon:(0,K.jsx)(M,{}),tone:`neutral`,title:`No automations yet`,subtitle:`Create one paused, preview it, then enable it.`,heading:`h2`,actions:(0,K.jsx)(E,{asChild:!0,children:(0,K.jsxs)(k,{to:`/automations/new`,children:[(0,K.jsx)(at,{className:`size-[15px]`}),`New automation`]})})}):r===`week`?(0,K.jsx)(Qn,{data:e}):r===`day`?(0,K.jsx)(Kn,{data:e}):(0,K.jsxs)(`div`,{"data-slot":`automations-list`,className:`flex flex-col gap-3 p-5`,children:[(0,K.jsx)(Yn,{stats:e.stats,pollCount:l,upcoming:c,timeZone:e.timeZone,railOpen:a,onOpenRail:()=>o(!0)}),(0,K.jsx)(Nn,{data:e,actions:n,now:s}),(0,K.jsx)(Jn,{open:a,onOpenChange:o,upcoming:c,pollCount:l,timeZone:e.timeZone,now:s})]}):(0,K.jsx)(`div`,{className:`p-5`,children:(0,K.jsx)($,{text:`Loading automations…`})}):(0,K.jsx)(`div`,{className:`p-5`,children:(0,K.jsx)($,{text:t})})]})}function tr({mode:e=`list`}){let{automationId:t}=ce(),n=O(),r=de(),i=pe(r.known&&!r.off),a=i.data?{...i.data,automations:i.data.automations.filter(e=>!e.deferredStart)}:void 0,o=he(a),[s,c]=ae(),l=nr(s.get(`view`));if(!r.known)return(0,K.jsx)(`div`,{"data-route":`automations`,className:`flex min-h-full flex-col p-3 md:p-5`,children:(0,K.jsx)($,{text:`Loading automations…`})});if(r.off)return(0,K.jsx)(`div`,{"data-route":`automations`,className:`flex min-h-full flex-col p-3 md:p-5`,children:(0,K.jsx)(vt,{icon:(0,K.jsx)(M,{}),tone:`neutral`,title:`Automations are off`,subtitle:`This cockpit was started with CEZ_AUTOMATIONS=0. Unset it and restart the service to turn automations on.`,heading:`h2`})});let u=()=>n(`/automations`);if(e===`new`)return(0,K.jsx)(Sn,{data:a,onBack:u,onSaved:u});if(e===`edit`){let e=a?.automations.find(e=>e.id===t);return a&&!e?(0,K.jsx)(`div`,{"data-route":`automations`,className:`p-5`,children:(0,K.jsx)($,{text:`Automation not found.`})}):e?(0,K.jsx)(Sn,{data:a,automation:e,actions:o,onBack:u,onSaved:u,onLog:()=>n(`/automations/${encodeURIComponent(e.id)}/log`)}):(0,K.jsx)(`div`,{"data-route":`automations`,className:`p-5`,children:(0,K.jsx)($,{text:`Loading automation…`})})}if(e===`log`){let e=a?.automations.find(e=>e.id===t);return t?(0,K.jsx)(En,{automationId:t,automation:e,timeZone:a?.timeZone,onBack:u}):(0,K.jsx)(`div`,{"data-route":`automations`,className:`p-5`,children:(0,K.jsx)($,{text:`Automation not found.`})})}return(0,K.jsx)(er,{data:a,error:i.error?String(i.error instanceof Error?i.error.message:i.error):void 0,actions:o,view:l,onViewChange:e=>c(t=>{let n=new URLSearchParams(t);return e===`list`?n.delete(`view`):n.set(`view`,e),n},{replace:!0})})}function nr(e){return e===`week`||e===`day`?e:`list`}function $({text:e}){return(0,K.jsx)(`div`,{className:`rounded-xl border border-dashed p-8 text-center text-sm text-muted-foreground`,children:e})}export{tr as AutomationsRoute};
@@ -1 +0,0 @@
1
- var e=function(e){return`/`+e},t={},n=function(n,r,i){let a=Promise.resolve();if(r&&r.length>0){let n=document.getElementsByTagName(`link`),o=document.querySelector(`meta[property=csp-nonce]`),s=o?.nonce||o?.getAttribute(`nonce`);function c(e){return Promise.all(e.map(e=>Promise.resolve(e).then(e=>({status:`fulfilled`,value:e}),e=>({status:`rejected`,reason:e}))))}function l(e){return import.meta.resolve?import.meta.resolve(e):new URL(e,import.meta.url).href}a=c(r.map(r=>{if(r=e(r,i),r=l(r),r in t)return;t[r]=!0;let a=r.endsWith(`.css`);for(let e=n.length-1;e>=0;e--){let t=n[e];if(t.href===r&&(!a||t.rel===`stylesheet`))return}let o=document.createElement(`link`);if(o.rel=a?`stylesheet`:`modulepreload`,a||(o.as=`script`),o.crossOrigin=``,o.href=r,s&&o.setAttribute(`nonce`,s),document.head.appendChild(o),a)return new Promise((e,t)=>{o.addEventListener(`load`,e),o.addEventListener(`error`,()=>t(Error(`Unable to preload CSS for ${r}`)))})}))}function o(e){let t=new Event(`vite:preloadError`,{cancelable:!0});if(t.payload=e,window.dispatchEvent(t),!t.defaultPrevented)throw e}return a.then(e=>{for(let t of e||[])t.status===`rejected`&&o(t.reason);return n().catch(o)})};function r(e){var t,n,i=``;if(typeof e==`string`||typeof e==`number`)i+=e;else if(typeof e==`object`)if(Array.isArray(e)){var a=e.length;for(t=0;t<a;t++)e[t]&&(n=r(e[t]))&&(i&&(i+=` `),i+=n)}else for(n in e)e[n]&&(i&&(i+=` `),i+=n);return i}function i(){for(var e,t,n=0,i=``,a=arguments.length;n<a;n++)(e=arguments[n])&&(t=r(e))&&(i&&(i+=` `),i+=t);return i}var a=(e,t)=>{let n=Array(e.length+t.length);for(let t=0;t<e.length;t++)n[t]=e[t];for(let r=0;r<t.length;r++)n[e.length+r]=t[r];return n},o=(e,t)=>({classGroupId:e,validator:t}),s=(e=new Map,t=null,n)=>({nextPart:e,validators:t,classGroupId:n}),c=`-`,l=[],ee=`arbitrary..`,u=e=>{let t=f(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:e=>{if(e.startsWith(`[`)&&e.endsWith(`]`))return d(e);let n=e.split(c);return te(n,+(n[0]===``&&n.length>1),t)},getConflictingClassGroupIds:(e,t)=>{if(t){let t=r[e],i=n[e];return t?i?a(i,t):t:i||l}return n[e]||l}}},te=(e,t,n)=>{if(e.length-t===0)return n.classGroupId;let r=e[t],i=n.nextPart.get(r);if(i){let n=te(e,t+1,i);if(n)return n}let a=n.validators;if(a===null)return;let o=t===0?e.join(c):e.slice(t).join(c),s=a.length;for(let e=0;e<s;e++){let t=a[e];if(t.validator(o))return t.classGroupId}},d=e=>e.slice(1,-1).indexOf(`:`)===-1?void 0:(()=>{let t=e.slice(1,-1),n=t.indexOf(`:`),r=t.slice(0,n);return r?ee+r:void 0})(),f=e=>{let{theme:t,classGroups:n}=e;return p(n,t)},p=(e,t)=>{let n=s();for(let r in e){let i=e[r];m(i,n,r,t)}return n},m=(e,t,n,r)=>{let i=e.length;for(let a=0;a<i;a++){let i=e[a];ne(i,t,n,r)}},ne=(e,t,n,r)=>{if(typeof e==`string`){h(e,t,n);return}if(typeof e==`function`){g(e,t,n,r);return}_(e,t,n,r)},h=(e,t,n)=>{let r=e===``?t:v(t,e);r.classGroupId=n},g=(e,t,n,r)=>{if(y(e)){m(e(r),t,n,r);return}t.validators===null&&(t.validators=[]),t.validators.push(o(n,e))},_=(e,t,n,r)=>{let i=Object.entries(e),a=i.length;for(let e=0;e<a;e++){let[a,o]=i[e];m(o,v(t,a),n,r)}},v=(e,t)=>{let n=e,r=t.split(c),i=r.length;for(let e=0;e<i;e++){let t=r[e],i=n.nextPart.get(t);i||(i=s(),n.nextPart.set(t,i)),n=i}return n},y=e=>`isThemeGetter`in e&&e.isThemeGetter===!0,b=e=>{if(e<1)return{get:()=>void 0,set:()=>{}};let t=0,n=Object.create(null),r=Object.create(null),i=(i,a)=>{n[i]=a,t++,t>e&&(t=0,r=n,n=Object.create(null))};return{get(e){let t=n[e];if(t!==void 0)return t;if((t=r[e])!==void 0)return i(e,t),t},set(e,t){e in n?n[e]=t:i(e,t)}}},x=`!`,S=`:`,re=[],C=(e,t,n,r,i)=>({modifiers:e,hasImportantModifier:t,baseClassName:n,maybePostfixModifierPosition:r,isExternal:i}),w=e=>{let{prefix:t,experimentalParseClassName:n}=e,r=e=>{let t=[],n=0,r=0,i=0,a,o=e.length;for(let s=0;s<o;s++){let o=e[s];if(n===0&&r===0){if(o===S){t.push(e.slice(i,s)),i=s+1;continue}if(o===`/`){a=s;continue}}o===`[`?n++:o===`]`?n--:o===`(`?r++:o===`)`&&r--}let s=t.length===0?e:e.slice(i),c=s,l=!1;s.endsWith(x)?(c=s.slice(0,-1),l=!0):s.startsWith(x)&&(c=s.slice(1),l=!0);let ee=a&&a>i?a-i:void 0;return C(t,l,c,ee)};if(t){let e=t+S,n=r;r=t=>t.startsWith(e)?n(t.slice(e.length)):C(re,!1,t,void 0,!0)}if(n){let e=r;r=t=>n({className:t,parseClassName:e})}return r},ie=e=>{let t=new Map;return e.orderSensitiveModifiers.forEach((e,n)=>{t.set(e,1e6+n)}),e=>{let n=[],r=[];for(let i=0;i<e.length;i++){let a=e[i],o=a[0]===`[`,s=t.has(a);o||s?(r.length>0&&(r.sort(),n.push(...r),r=[]),n.push(a)):r.push(a)}return r.length>0&&(r.sort(),n.push(...r)),n}},T=e=>({cache:b(e.cacheSize),parseClassName:w(e),sortModifiers:ie(e),postfixLookupClassGroupIds:E(e),...u(e)}),E=e=>{let t=Object.create(null),n=e.postfixLookupClassGroups;if(n)for(let e=0;e<n.length;e++)t[n[e]]=!0;return t},D=/\s+/,O=(e,t)=>{let{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:i,sortModifiers:a,postfixLookupClassGroupIds:o}=t,s=[],c=e.trim().split(D),l=``;for(let e=c.length-1;e>=0;--e){let t=c[e],{isExternal:ee,modifiers:u,hasImportantModifier:te,baseClassName:d,maybePostfixModifierPosition:f}=n(t);if(ee){l=t+(l.length>0?` `+l:l);continue}let p=!!f,m;if(p){m=r(d.substring(0,f));let e=m&&o[m]?r(d):void 0;e&&e!==m&&(m=e,p=!1)}else m=r(d);if(!m){if(!p){l=t+(l.length>0?` `+l:l);continue}if(m=r(d),!m){l=t+(l.length>0?` `+l:l);continue}p=!1}let ne=u.length===0?``:u.length===1?u[0]:a(u).join(`:`),h=te?ne+x:ne,g=h+m;if(s.indexOf(g)>-1)continue;s.push(g);let _=i(m,p);for(let e=0;e<_.length;++e){let t=_[e];s.push(h+t)}l=t+(l.length>0?` `+l:l)}return l},ae=(...e)=>{let t=0,n,r,i=``;for(;t<e.length;)(n=e[t++])&&(r=k(n))&&(i&&(i+=` `),i+=r);return i},k=e=>{if(typeof e==`string`)return e;let t,n=``;for(let r=0;r<e.length;r++)e[r]&&(t=k(e[r]))&&(n&&(n+=` `),n+=t);return n},A=(e,...t)=>{let n,r,i,a,o=o=>(n=T(t.reduce((e,t)=>t(e),e())),r=n.cache.get,i=n.cache.set,a=s,s(o)),s=e=>{let t=r(e);if(t)return t;let a=O(e,n);return i(e,a),a};return a=o,(...e)=>a(ae(...e))},oe=[],j=e=>{let t=t=>t[e]||oe;return t.isThemeGetter=!0,t},M=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,N=/^\((?:(\w[\w-]*):)?(.+)\)$/i,P=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,F=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,I=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,L=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,se=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,R=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,z=e=>P.test(e),B=e=>!!e&&!Number.isNaN(Number(e)),V=e=>!!e&&Number.isInteger(Number(e)),ce=e=>e.endsWith(`%`)&&B(e.slice(0,-1)),H=e=>F.test(e),le=()=>!0,ue=e=>I.test(e)&&!L.test(e),U=()=>!1,W=e=>se.test(e),G=e=>R.test(e),de=e=>!K(e)&&!Y(e),fe=e=>e.startsWith(`@container`)&&(e[10]===`/`&&e[11]!==void 0||e[11]===`s`&&e[16]!==void 0&&e.startsWith(`-size/`,10)||e[11]===`n`&&e[18]!==void 0&&e.startsWith(`-normal/`,10)),pe=e=>Z(e,De,U),K=e=>M.test(e),q=e=>Z(e,Oe,ue),me=e=>Z(e,ke,B),he=e=>Z(e,je,le),ge=e=>Z(e,Ae,U),_e=e=>Z(e,Te,U),ve=e=>Z(e,Ee,G),J=e=>Z(e,Me,W),Y=e=>N.test(e),X=e=>Q(e,Oe),ye=e=>Q(e,Ae),be=e=>Q(e,Te),xe=e=>Q(e,De),Se=e=>Q(e,Ee),Ce=e=>Q(e,Me,!0),we=e=>Q(e,je,!0),Z=(e,t,n)=>{let r=M.exec(e);return r?r[1]?t(r[1]):n(r[2]):!1},Q=(e,t,n=!1)=>{let r=N.exec(e);return r?r[1]?t(r[1]):n:!1},Te=e=>e===`position`||e===`percentage`,Ee=e=>e===`image`||e===`url`,De=e=>e===`length`||e===`size`||e===`bg-size`,Oe=e=>e===`length`,ke=e=>e===`number`,Ae=e=>e===`family-name`,je=e=>e===`number`||e===`weight`,Me=e=>e===`shadow`,Ne=()=>{let e=j(`color`),t=j(`font`),n=j(`text`),r=j(`font-weight`),i=j(`tracking`),a=j(`leading`),o=j(`breakpoint`),s=j(`container`),c=j(`spacing`),l=j(`radius`),ee=j(`shadow`),u=j(`inset-shadow`),te=j(`text-shadow`),d=j(`drop-shadow`),f=j(`blur`),p=j(`perspective`),m=j(`aspect`),ne=j(`ease`),h=j(`animate`),g=()=>[`auto`,`avoid`,`all`,`avoid-page`,`page`,`left`,`right`,`column`],_=()=>[`center`,`top`,`bottom`,`left`,`right`,`top-left`,`left-top`,`top-right`,`right-top`,`bottom-right`,`right-bottom`,`bottom-left`,`left-bottom`],v=()=>[..._(),Y,K],y=()=>[`auto`,`hidden`,`clip`,`visible`,`scroll`],b=()=>[`auto`,`contain`,`none`],x=()=>[Y,K,c],S=()=>[z,`full`,`auto`,...x()],re=()=>[V,`none`,`subgrid`,Y,K],C=()=>[`auto`,{span:[`full`,V,Y,K]},V,Y,K],w=()=>[V,`auto`,Y,K],ie=()=>[`auto`,`min`,`max`,`fr`,Y,K],T=()=>[`start`,`end`,`center`,`between`,`around`,`evenly`,`stretch`,`baseline`,`center-safe`,`end-safe`],E=()=>[`start`,`end`,`center`,`stretch`,`center-safe`,`end-safe`],D=()=>[`auto`,...x()],O=()=>[z,`auto`,`full`,`dvw`,`dvh`,`lvw`,`lvh`,`svw`,`svh`,`min`,`max`,`fit`,...x()],ae=()=>[z,`screen`,`full`,`dvw`,`lvw`,`svw`,`min`,`max`,`fit`,...x()],k=()=>[z,`screen`,`full`,`lh`,`dvh`,`lvh`,`svh`,`min`,`max`,`fit`,...x()],A=()=>[e,Y,K],oe=()=>[..._(),be,_e,{position:[Y,K]}],M=()=>[`no-repeat`,{repeat:[``,`x`,`y`,`space`,`round`]}],N=()=>[`auto`,`cover`,`contain`,xe,pe,{size:[Y,K]}],P=()=>[ce,X,q],F=()=>[``,`none`,`full`,l,Y,K],I=()=>[``,B,X,q],L=()=>[`solid`,`dashed`,`dotted`,`double`],se=()=>[`normal`,`multiply`,`screen`,`overlay`,`darken`,`lighten`,`color-dodge`,`color-burn`,`hard-light`,`soft-light`,`difference`,`exclusion`,`hue`,`saturation`,`color`,`luminosity`],R=()=>[B,ce,be,_e],ue=()=>[``,`none`,f,Y,K],U=()=>[`none`,B,Y,K],W=()=>[`none`,B,Y,K],G=()=>[B,Y,K],Z=()=>[z,`full`,...x()];return{cacheSize:500,theme:{animate:[`spin`,`ping`,`pulse`,`bounce`],aspect:[`video`],blur:[H],breakpoint:[H],color:[le],container:[H],"drop-shadow":[H],ease:[`in`,`out`,`in-out`],font:[de],"font-weight":[`thin`,`extralight`,`light`,`normal`,`medium`,`semibold`,`bold`,`extrabold`,`black`],"inset-shadow":[H],leading:[`none`,`tight`,`snug`,`normal`,`relaxed`,`loose`],perspective:[`dramatic`,`near`,`normal`,`midrange`,`distant`,`none`],radius:[H],shadow:[H],spacing:[`px`,B],text:[H],"text-shadow":[H],tracking:[`tighter`,`tight`,`normal`,`wide`,`wider`,`widest`]},classGroups:{aspect:[{aspect:[`auto`,`square`,z,K,Y,m]}],container:[`container`],"container-type":[{"@container":[``,`normal`,`size`,Y,K]}],"container-named":[fe],columns:[{columns:[B,K,Y,s]}],"break-after":[{"break-after":g()}],"break-before":[{"break-before":g()}],"break-inside":[{"break-inside":[`auto`,`avoid`,`avoid-page`,`avoid-column`]}],"box-decoration":[{"box-decoration":[`slice`,`clone`]}],box:[{box:[`border`,`content`]}],display:[`block`,`inline-block`,`inline`,`flex`,`inline-flex`,`table`,`inline-table`,`table-caption`,`table-cell`,`table-column`,`table-column-group`,`table-footer-group`,`table-header-group`,`table-row-group`,`table-row`,`flow-root`,`grid`,`inline-grid`,`contents`,`list-item`,`hidden`],sr:[`sr-only`,`not-sr-only`],float:[{float:[`right`,`left`,`none`,`start`,`end`]}],clear:[{clear:[`left`,`right`,`both`,`none`,`start`,`end`]}],isolation:[`isolate`,`isolation-auto`],"object-fit":[{object:[`contain`,`cover`,`fill`,`none`,`scale-down`]}],"object-position":[{object:v()}],overflow:[{overflow:y()}],"overflow-x":[{"overflow-x":y()}],"overflow-y":[{"overflow-y":y()}],overscroll:[{overscroll:b()}],"overscroll-x":[{"overscroll-x":b()}],"overscroll-y":[{"overscroll-y":b()}],position:[`static`,`fixed`,`absolute`,`relative`,`sticky`],inset:[{inset:S()}],"inset-x":[{"inset-x":S()}],"inset-y":[{"inset-y":S()}],start:[{"inset-s":S(),start:S()}],end:[{"inset-e":S(),end:S()}],"inset-bs":[{"inset-bs":S()}],"inset-be":[{"inset-be":S()}],top:[{top:S()}],right:[{right:S()}],bottom:[{bottom:S()}],left:[{left:S()}],visibility:[`visible`,`invisible`,`collapse`],z:[{z:[V,`auto`,Y,K]}],basis:[{basis:[z,`full`,`auto`,s,...x()]}],"flex-direction":[{flex:[`row`,`row-reverse`,`col`,`col-reverse`]}],"flex-wrap":[{flex:[`nowrap`,`wrap`,`wrap-reverse`]}],flex:[{flex:[B,z,`auto`,`initial`,`none`,K]}],grow:[{grow:[``,B,Y,K]}],shrink:[{shrink:[``,B,Y,K]}],order:[{order:[V,`first`,`last`,`none`,Y,K]}],"grid-cols":[{"grid-cols":re()}],"col-start-end":[{col:C()}],"col-start":[{"col-start":w()}],"col-end":[{"col-end":w()}],"grid-rows":[{"grid-rows":re()}],"row-start-end":[{row:C()}],"row-start":[{"row-start":w()}],"row-end":[{"row-end":w()}],"grid-flow":[{"grid-flow":[`row`,`col`,`dense`,`row-dense`,`col-dense`]}],"auto-cols":[{"auto-cols":ie()}],"auto-rows":[{"auto-rows":ie()}],gap:[{gap:x()}],"gap-x":[{"gap-x":x()}],"gap-y":[{"gap-y":x()}],"justify-content":[{justify:[...T(),`normal`]}],"justify-items":[{"justify-items":[...E(),`normal`]}],"justify-self":[{"justify-self":[`auto`,...E()]}],"align-content":[{content:[`normal`,...T()]}],"align-items":[{items:[...E(),{baseline:[``,`last`]}]}],"align-self":[{self:[`auto`,...E(),{baseline:[``,`last`]}]}],"place-content":[{"place-content":T()}],"place-items":[{"place-items":[...E(),`baseline`]}],"place-self":[{"place-self":[`auto`,...E()]}],p:[{p:x()}],px:[{px:x()}],py:[{py:x()}],ps:[{ps:x()}],pe:[{pe:x()}],pbs:[{pbs:x()}],pbe:[{pbe:x()}],pt:[{pt:x()}],pr:[{pr:x()}],pb:[{pb:x()}],pl:[{pl:x()}],m:[{m:D()}],mx:[{mx:D()}],my:[{my:D()}],ms:[{ms:D()}],me:[{me:D()}],mbs:[{mbs:D()}],mbe:[{mbe:D()}],mt:[{mt:D()}],mr:[{mr:D()}],mb:[{mb:D()}],ml:[{ml:D()}],"space-x":[{"space-x":x()}],"space-x-reverse":[`space-x-reverse`],"space-y":[{"space-y":x()}],"space-y-reverse":[`space-y-reverse`],size:[{size:O()}],"inline-size":[{inline:[`auto`,...ae()]}],"min-inline-size":[{"min-inline":[`auto`,...ae()]}],"max-inline-size":[{"max-inline":[`none`,...ae()]}],"block-size":[{block:[`auto`,...k()]}],"min-block-size":[{"min-block":[`auto`,...k()]}],"max-block-size":[{"max-block":[`none`,...k()]}],w:[{w:[s,`screen`,...O()]}],"min-w":[{"min-w":[s,`screen`,`none`,...O()]}],"max-w":[{"max-w":[s,`screen`,`none`,`prose`,{screen:[o]},...O()]}],h:[{h:[`screen`,`lh`,...O()]}],"min-h":[{"min-h":[`screen`,`lh`,`none`,...O()]}],"max-h":[{"max-h":[`screen`,`lh`,...O()]}],"font-size":[{text:[`base`,n,X,q]}],"font-smoothing":[`antialiased`,`subpixel-antialiased`],"font-style":[`italic`,`not-italic`],"font-weight":[{font:[r,we,he]}],"font-stretch":[{"font-stretch":[`ultra-condensed`,`extra-condensed`,`condensed`,`semi-condensed`,`normal`,`semi-expanded`,`expanded`,`extra-expanded`,`ultra-expanded`,ce,K]}],"font-family":[{font:[ye,ge,t]}],"font-features":[{"font-features":[K]}],"fvn-normal":[`normal-nums`],"fvn-ordinal":[`ordinal`],"fvn-slashed-zero":[`slashed-zero`],"fvn-figure":[`lining-nums`,`oldstyle-nums`],"fvn-spacing":[`proportional-nums`,`tabular-nums`],"fvn-fraction":[`diagonal-fractions`,`stacked-fractions`],tracking:[{tracking:[i,Y,K]}],"line-clamp":[{"line-clamp":[B,`none`,Y,me]}],leading:[{leading:[a,...x()]}],"list-image":[{"list-image":[`none`,Y,K]}],"list-style-position":[{list:[`inside`,`outside`]}],"list-style-type":[{list:[`disc`,`decimal`,`none`,Y,K]}],"text-alignment":[{text:[`left`,`center`,`right`,`justify`,`start`,`end`]}],"placeholder-color":[{placeholder:A()}],"text-color":[{text:A()}],"text-decoration":[`underline`,`overline`,`line-through`,`no-underline`],"text-decoration-style":[{decoration:[...L(),`wavy`]}],"text-decoration-thickness":[{decoration:[B,`from-font`,`auto`,Y,q]}],"text-decoration-color":[{decoration:A()}],"underline-offset":[{"underline-offset":[B,`auto`,Y,K]}],"text-transform":[`uppercase`,`lowercase`,`capitalize`,`normal-case`],"text-overflow":[`truncate`,`text-ellipsis`,`text-clip`],"text-wrap":[{text:[`wrap`,`nowrap`,`balance`,`pretty`]}],indent:[{indent:x()}],"tab-size":[{tab:[V,Y,K]}],"vertical-align":[{align:[`baseline`,`top`,`middle`,`bottom`,`text-top`,`text-bottom`,`sub`,`super`,Y,K]}],whitespace:[{whitespace:[`normal`,`nowrap`,`pre`,`pre-line`,`pre-wrap`,`break-spaces`]}],break:[{break:[`normal`,`words`,`all`,`keep`]}],wrap:[{wrap:[`break-word`,`anywhere`,`normal`]}],hyphens:[{hyphens:[`none`,`manual`,`auto`]}],content:[{content:[`none`,Y,K]}],"bg-attachment":[{bg:[`fixed`,`local`,`scroll`]}],"bg-clip":[{"bg-clip":[`border`,`padding`,`content`,`text`]}],"bg-origin":[{"bg-origin":[`border`,`padding`,`content`]}],"bg-position":[{bg:oe()}],"bg-repeat":[{bg:M()}],"bg-size":[{bg:N()}],"bg-image":[{bg:[`none`,{linear:[{to:[`t`,`tr`,`r`,`br`,`b`,`bl`,`l`,`tl`]},V,Y,K],radial:[``,Y,K],conic:[V,Y,K]},Se,ve]}],"bg-color":[{bg:A()}],"gradient-from-pos":[{from:P()}],"gradient-via-pos":[{via:P()}],"gradient-to-pos":[{to:P()}],"gradient-from":[{from:A()}],"gradient-via":[{via:A()}],"gradient-to":[{to:A()}],rounded:[{rounded:F()}],"rounded-s":[{"rounded-s":F()}],"rounded-e":[{"rounded-e":F()}],"rounded-t":[{"rounded-t":F()}],"rounded-r":[{"rounded-r":F()}],"rounded-b":[{"rounded-b":F()}],"rounded-l":[{"rounded-l":F()}],"rounded-ss":[{"rounded-ss":F()}],"rounded-se":[{"rounded-se":F()}],"rounded-ee":[{"rounded-ee":F()}],"rounded-es":[{"rounded-es":F()}],"rounded-tl":[{"rounded-tl":F()}],"rounded-tr":[{"rounded-tr":F()}],"rounded-br":[{"rounded-br":F()}],"rounded-bl":[{"rounded-bl":F()}],"border-w":[{border:I()}],"border-w-x":[{"border-x":I()}],"border-w-y":[{"border-y":I()}],"border-w-s":[{"border-s":I()}],"border-w-e":[{"border-e":I()}],"border-w-bs":[{"border-bs":I()}],"border-w-be":[{"border-be":I()}],"border-w-t":[{"border-t":I()}],"border-w-r":[{"border-r":I()}],"border-w-b":[{"border-b":I()}],"border-w-l":[{"border-l":I()}],"divide-x":[{"divide-x":I()}],"divide-x-reverse":[`divide-x-reverse`],"divide-y":[{"divide-y":I()}],"divide-y-reverse":[`divide-y-reverse`],"border-style":[{border:[...L(),`hidden`,`none`]}],"divide-style":[{divide:[...L(),`hidden`,`none`]}],"border-color":[{border:A()}],"border-color-x":[{"border-x":A()}],"border-color-y":[{"border-y":A()}],"border-color-s":[{"border-s":A()}],"border-color-e":[{"border-e":A()}],"border-color-bs":[{"border-bs":A()}],"border-color-be":[{"border-be":A()}],"border-color-t":[{"border-t":A()}],"border-color-r":[{"border-r":A()}],"border-color-b":[{"border-b":A()}],"border-color-l":[{"border-l":A()}],"divide-color":[{divide:A()}],"outline-style":[{outline:[...L(),`none`,`hidden`]}],"outline-offset":[{"outline-offset":[B,Y,K]}],"outline-w":[{outline:[``,B,X,q]}],"outline-color":[{outline:A()}],shadow:[{shadow:[``,`none`,ee,Ce,J]}],"shadow-color":[{shadow:A()}],"inset-shadow":[{"inset-shadow":[`none`,u,Ce,J]}],"inset-shadow-color":[{"inset-shadow":A()}],"ring-w":[{ring:I()}],"ring-w-inset":[`ring-inset`],"ring-color":[{ring:A()}],"ring-offset-w":[{"ring-offset":[B,q]}],"ring-offset-color":[{"ring-offset":A()}],"inset-ring-w":[{"inset-ring":I()}],"inset-ring-color":[{"inset-ring":A()}],"text-shadow":[{"text-shadow":[`none`,te,Ce,J]}],"text-shadow-color":[{"text-shadow":A()}],opacity:[{opacity:[B,Y,K]}],"mix-blend":[{"mix-blend":[...se(),`plus-darker`,`plus-lighter`]}],"bg-blend":[{"bg-blend":se()}],"mask-clip":[{"mask-clip":[`border`,`padding`,`content`,`fill`,`stroke`,`view`]},`mask-no-clip`],"mask-composite":[{mask:[`add`,`subtract`,`intersect`,`exclude`]}],"mask-image-linear-pos":[{"mask-linear":[B]}],"mask-image-linear-from-pos":[{"mask-linear-from":R()}],"mask-image-linear-to-pos":[{"mask-linear-to":R()}],"mask-image-linear-from-color":[{"mask-linear-from":A()}],"mask-image-linear-to-color":[{"mask-linear-to":A()}],"mask-image-t-from-pos":[{"mask-t-from":R()}],"mask-image-t-to-pos":[{"mask-t-to":R()}],"mask-image-t-from-color":[{"mask-t-from":A()}],"mask-image-t-to-color":[{"mask-t-to":A()}],"mask-image-r-from-pos":[{"mask-r-from":R()}],"mask-image-r-to-pos":[{"mask-r-to":R()}],"mask-image-r-from-color":[{"mask-r-from":A()}],"mask-image-r-to-color":[{"mask-r-to":A()}],"mask-image-b-from-pos":[{"mask-b-from":R()}],"mask-image-b-to-pos":[{"mask-b-to":R()}],"mask-image-b-from-color":[{"mask-b-from":A()}],"mask-image-b-to-color":[{"mask-b-to":A()}],"mask-image-l-from-pos":[{"mask-l-from":R()}],"mask-image-l-to-pos":[{"mask-l-to":R()}],"mask-image-l-from-color":[{"mask-l-from":A()}],"mask-image-l-to-color":[{"mask-l-to":A()}],"mask-image-x-from-pos":[{"mask-x-from":R()}],"mask-image-x-to-pos":[{"mask-x-to":R()}],"mask-image-x-from-color":[{"mask-x-from":A()}],"mask-image-x-to-color":[{"mask-x-to":A()}],"mask-image-y-from-pos":[{"mask-y-from":R()}],"mask-image-y-to-pos":[{"mask-y-to":R()}],"mask-image-y-from-color":[{"mask-y-from":A()}],"mask-image-y-to-color":[{"mask-y-to":A()}],"mask-image-radial":[{"mask-radial":[Y,K]}],"mask-image-radial-from-pos":[{"mask-radial-from":R()}],"mask-image-radial-to-pos":[{"mask-radial-to":R()}],"mask-image-radial-from-color":[{"mask-radial-from":A()}],"mask-image-radial-to-color":[{"mask-radial-to":A()}],"mask-image-radial-shape":[{"mask-radial":[`circle`,`ellipse`]}],"mask-image-radial-size":[{"mask-radial":[{closest:[`side`,`corner`],farthest:[`side`,`corner`]}]}],"mask-image-radial-pos":[{"mask-radial-at":_()}],"mask-image-conic-pos":[{"mask-conic":[B]}],"mask-image-conic-from-pos":[{"mask-conic-from":R()}],"mask-image-conic-to-pos":[{"mask-conic-to":R()}],"mask-image-conic-from-color":[{"mask-conic-from":A()}],"mask-image-conic-to-color":[{"mask-conic-to":A()}],"mask-mode":[{mask:[`alpha`,`luminance`,`match`]}],"mask-origin":[{"mask-origin":[`border`,`padding`,`content`,`fill`,`stroke`,`view`]}],"mask-position":[{mask:oe()}],"mask-repeat":[{mask:M()}],"mask-size":[{mask:N()}],"mask-type":[{"mask-type":[`alpha`,`luminance`]}],"mask-image":[{mask:[`none`,Y,K]}],filter:[{filter:[``,`none`,Y,K]}],blur:[{blur:ue()}],brightness:[{brightness:[B,Y,K]}],contrast:[{contrast:[B,Y,K]}],"drop-shadow":[{"drop-shadow":[``,`none`,d,Ce,J]}],"drop-shadow-color":[{"drop-shadow":A()}],grayscale:[{grayscale:[``,B,Y,K]}],"hue-rotate":[{"hue-rotate":[B,Y,K]}],invert:[{invert:[``,B,Y,K]}],saturate:[{saturate:[B,Y,K]}],sepia:[{sepia:[``,B,Y,K]}],"backdrop-filter":[{"backdrop-filter":[``,`none`,Y,K]}],"backdrop-blur":[{"backdrop-blur":ue()}],"backdrop-brightness":[{"backdrop-brightness":[B,Y,K]}],"backdrop-contrast":[{"backdrop-contrast":[B,Y,K]}],"backdrop-grayscale":[{"backdrop-grayscale":[``,B,Y,K]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[B,Y,K]}],"backdrop-invert":[{"backdrop-invert":[``,B,Y,K]}],"backdrop-opacity":[{"backdrop-opacity":[B,Y,K]}],"backdrop-saturate":[{"backdrop-saturate":[B,Y,K]}],"backdrop-sepia":[{"backdrop-sepia":[``,B,Y,K]}],"border-collapse":[{border:[`collapse`,`separate`]}],"border-spacing":[{"border-spacing":x()}],"border-spacing-x":[{"border-spacing-x":x()}],"border-spacing-y":[{"border-spacing-y":x()}],"table-layout":[{table:[`auto`,`fixed`]}],caption:[{caption:[`top`,`bottom`]}],transition:[{transition:[``,`all`,`colors`,`opacity`,`shadow`,`transform`,`none`,Y,K]}],"transition-behavior":[{transition:[`normal`,`discrete`]}],duration:[{duration:[B,`initial`,Y,K]}],ease:[{ease:[`linear`,`initial`,ne,Y,K]}],delay:[{delay:[B,Y,K]}],animate:[{animate:[`none`,h,Y,K]}],backface:[{backface:[`hidden`,`visible`]}],perspective:[{perspective:[p,Y,K]}],"perspective-origin":[{"perspective-origin":v()}],rotate:[{rotate:U()}],"rotate-x":[{"rotate-x":U()}],"rotate-y":[{"rotate-y":U()}],"rotate-z":[{"rotate-z":U()}],scale:[{scale:W()}],"scale-x":[{"scale-x":W()}],"scale-y":[{"scale-y":W()}],"scale-z":[{"scale-z":W()}],"scale-3d":[`scale-3d`],skew:[{skew:G()}],"skew-x":[{"skew-x":G()}],"skew-y":[{"skew-y":G()}],transform:[{transform:[Y,K,``,`none`,`gpu`,`cpu`]}],"transform-origin":[{origin:v()}],"transform-style":[{transform:[`3d`,`flat`]}],translate:[{translate:Z()}],"translate-x":[{"translate-x":Z()}],"translate-y":[{"translate-y":Z()}],"translate-z":[{"translate-z":Z()}],"translate-none":[`translate-none`],zoom:[{zoom:[V,Y,K]}],accent:[{accent:A()}],appearance:[{appearance:[`none`,`auto`]}],"caret-color":[{caret:A()}],"color-scheme":[{scheme:[`normal`,`dark`,`light`,`light-dark`,`only-dark`,`only-light`]}],cursor:[{cursor:[`auto`,`default`,`pointer`,`wait`,`text`,`move`,`help`,`not-allowed`,`none`,`context-menu`,`progress`,`cell`,`crosshair`,`vertical-text`,`alias`,`copy`,`no-drop`,`grab`,`grabbing`,`all-scroll`,`col-resize`,`row-resize`,`n-resize`,`e-resize`,`s-resize`,`w-resize`,`ne-resize`,`nw-resize`,`se-resize`,`sw-resize`,`ew-resize`,`ns-resize`,`nesw-resize`,`nwse-resize`,`zoom-in`,`zoom-out`,Y,K]}],"field-sizing":[{"field-sizing":[`fixed`,`content`]}],"pointer-events":[{"pointer-events":[`auto`,`none`]}],resize:[{resize:[`none`,``,`y`,`x`]}],"scroll-behavior":[{scroll:[`auto`,`smooth`]}],"scrollbar-thumb-color":[{"scrollbar-thumb":A()}],"scrollbar-track-color":[{"scrollbar-track":A()}],"scrollbar-gutter":[{"scrollbar-gutter":[`auto`,`stable`,`both`]}],"scrollbar-w":[{scrollbar:[`auto`,`thin`,`none`]}],"scroll-m":[{"scroll-m":x()}],"scroll-mx":[{"scroll-mx":x()}],"scroll-my":[{"scroll-my":x()}],"scroll-ms":[{"scroll-ms":x()}],"scroll-me":[{"scroll-me":x()}],"scroll-mbs":[{"scroll-mbs":x()}],"scroll-mbe":[{"scroll-mbe":x()}],"scroll-mt":[{"scroll-mt":x()}],"scroll-mr":[{"scroll-mr":x()}],"scroll-mb":[{"scroll-mb":x()}],"scroll-ml":[{"scroll-ml":x()}],"scroll-p":[{"scroll-p":x()}],"scroll-px":[{"scroll-px":x()}],"scroll-py":[{"scroll-py":x()}],"scroll-ps":[{"scroll-ps":x()}],"scroll-pe":[{"scroll-pe":x()}],"scroll-pbs":[{"scroll-pbs":x()}],"scroll-pbe":[{"scroll-pbe":x()}],"scroll-pt":[{"scroll-pt":x()}],"scroll-pr":[{"scroll-pr":x()}],"scroll-pb":[{"scroll-pb":x()}],"scroll-pl":[{"scroll-pl":x()}],"snap-align":[{snap:[`start`,`end`,`center`,`align-none`]}],"snap-stop":[{snap:[`normal`,`always`]}],"snap-type":[{snap:[`none`,`x`,`y`,`both`]}],"snap-strictness":[{snap:[`mandatory`,`proximity`]}],touch:[{touch:[`auto`,`none`,`manipulation`]}],"touch-x":[{"touch-pan":[`x`,`left`,`right`]}],"touch-y":[{"touch-pan":[`y`,`up`,`down`]}],"touch-pz":[`touch-pinch-zoom`],select:[{select:[`none`,`text`,`all`,`auto`]}],"will-change":[{"will-change":[`auto`,`scroll`,`contents`,`transform`,Y,K]}],fill:[{fill:[`none`,...A()]}],"stroke-w":[{stroke:[B,X,q,me]}],stroke:[{stroke:[`none`,...A()]}],"forced-color-adjust":[{"forced-color-adjust":[`auto`,`none`]}]},conflictingClassGroups:{"container-named":[`container-type`],overflow:[`overflow-x`,`overflow-y`],overscroll:[`overscroll-x`,`overscroll-y`],inset:[`inset-x`,`inset-y`,`inset-bs`,`inset-be`,`start`,`end`,`top`,`right`,`bottom`,`left`],"inset-x":[`right`,`left`],"inset-y":[`top`,`bottom`],flex:[`basis`,`grow`,`shrink`],gap:[`gap-x`,`gap-y`],p:[`px`,`py`,`ps`,`pe`,`pbs`,`pbe`,`pt`,`pr`,`pb`,`pl`],px:[`pr`,`pl`],py:[`pt`,`pb`],m:[`mx`,`my`,`ms`,`me`,`mbs`,`mbe`,`mt`,`mr`,`mb`,`ml`],mx:[`mr`,`ml`],my:[`mt`,`mb`],size:[`w`,`h`],"font-size":[`leading`],"fvn-normal":[`fvn-ordinal`,`fvn-slashed-zero`,`fvn-figure`,`fvn-spacing`,`fvn-fraction`],"fvn-ordinal":[`fvn-normal`],"fvn-slashed-zero":[`fvn-normal`],"fvn-figure":[`fvn-normal`],"fvn-spacing":[`fvn-normal`],"fvn-fraction":[`fvn-normal`],"line-clamp":[`display`,`overflow`],rounded:[`rounded-s`,`rounded-e`,`rounded-t`,`rounded-r`,`rounded-b`,`rounded-l`,`rounded-ss`,`rounded-se`,`rounded-ee`,`rounded-es`,`rounded-tl`,`rounded-tr`,`rounded-br`,`rounded-bl`],"rounded-s":[`rounded-ss`,`rounded-es`],"rounded-e":[`rounded-se`,`rounded-ee`],"rounded-t":[`rounded-tl`,`rounded-tr`],"rounded-r":[`rounded-tr`,`rounded-br`],"rounded-b":[`rounded-br`,`rounded-bl`],"rounded-l":[`rounded-tl`,`rounded-bl`],"border-spacing":[`border-spacing-x`,`border-spacing-y`],"border-w":[`border-w-x`,`border-w-y`,`border-w-s`,`border-w-e`,`border-w-bs`,`border-w-be`,`border-w-t`,`border-w-r`,`border-w-b`,`border-w-l`],"border-w-x":[`border-w-r`,`border-w-l`],"border-w-y":[`border-w-t`,`border-w-b`],"border-color":[`border-color-x`,`border-color-y`,`border-color-s`,`border-color-e`,`border-color-bs`,`border-color-be`,`border-color-t`,`border-color-r`,`border-color-b`,`border-color-l`],"border-color-x":[`border-color-r`,`border-color-l`],"border-color-y":[`border-color-t`,`border-color-b`],translate:[`translate-x`,`translate-y`,`translate-none`],"translate-none":[`translate`,`translate-x`,`translate-y`,`translate-z`],"scroll-m":[`scroll-mx`,`scroll-my`,`scroll-ms`,`scroll-me`,`scroll-mbs`,`scroll-mbe`,`scroll-mt`,`scroll-mr`,`scroll-mb`,`scroll-ml`],"scroll-mx":[`scroll-mr`,`scroll-ml`],"scroll-my":[`scroll-mt`,`scroll-mb`],"scroll-p":[`scroll-px`,`scroll-py`,`scroll-ps`,`scroll-pe`,`scroll-pbs`,`scroll-pbe`,`scroll-pt`,`scroll-pr`,`scroll-pb`,`scroll-pl`],"scroll-px":[`scroll-pr`,`scroll-pl`],"scroll-py":[`scroll-pt`,`scroll-pb`],touch:[`touch-x`,`touch-y`,`touch-pz`],"touch-x":[`touch`],"touch-y":[`touch`],"touch-pz":[`touch`]},conflictingClassGroupModifiers:{"font-size":[`leading`]},postfixLookupClassGroups:[`container-type`],orderSensitiveModifiers:[`*`,`**`,`after`,`backdrop`,`before`,`details-content`,`file`,`first-letter`,`first-line`,`marker`,`placeholder`,`selection`]}},Pe=(e,{cacheSize:t,prefix:n,experimentalParseClassName:r,extend:i={},override:a={}})=>($(e,`cacheSize`,t),$(e,`prefix`,n),$(e,`experimentalParseClassName`,r),Fe(e.theme,a.theme),Fe(e.classGroups,a.classGroups),Fe(e.conflictingClassGroups,a.conflictingClassGroups),Fe(e.conflictingClassGroupModifiers,a.conflictingClassGroupModifiers),$(e,`postfixLookupClassGroups`,a.postfixLookupClassGroups),$(e,`orderSensitiveModifiers`,a.orderSensitiveModifiers),Ie(e.theme,i.theme),Ie(e.classGroups,i.classGroups),Ie(e.conflictingClassGroups,i.conflictingClassGroups),Ie(e.conflictingClassGroupModifiers,i.conflictingClassGroupModifiers),Le(e,i,`postfixLookupClassGroups`),Le(e,i,`orderSensitiveModifiers`),e),$=(e,t,n)=>{n!==void 0&&(e[t]=n)},Fe=(e,t)=>{if(t)for(let n in t)$(e,n,t[n])},Ie=(e,t)=>{if(t)for(let n in t)Le(e,t,n)},Le=(e,t,n)=>{let r=t[n];r!==void 0&&(e[n]=e[n]?e[n].concat(r):r)},Re=(e,...t)=>typeof e==`function`?A(Ne,e,...t):A(()=>Pe(Ne(),e),...t),ze=A(Ne);export{n as i,ze as n,i as r,Re as t};