@ai-development-environment/server 0.0.27 → 0.0.29

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 (243) hide show
  1. package/package.json +1 -1
  2. package/prisma-runtime/prisma/migrations/20260718220000_add_build_freshness/migration.sql +1 -0
  3. package/prisma-runtime/prisma/schema.prisma +1 -0
  4. package/standalone/.next/BUILD_ID +1 -1
  5. package/standalone/.next/build-manifest.json +3 -3
  6. package/standalone/.next/prerender-manifest.json +3 -3
  7. package/standalone/.next/server/app/[locale]/actions/page.js.nft.json +1 -1
  8. package/standalone/.next/server/app/[locale]/actions/page_client-reference-manifest.js +1 -1
  9. package/standalone/.next/server/app/[locale]/agents/[id]/page.js.nft.json +1 -1
  10. package/standalone/.next/server/app/[locale]/agents/[id]/page_client-reference-manifest.js +1 -1
  11. package/standalone/.next/server/app/[locale]/agents/page.js.nft.json +1 -1
  12. package/standalone/.next/server/app/[locale]/agents/page_client-reference-manifest.js +1 -1
  13. package/standalone/.next/server/app/[locale]/build-data/page.js.nft.json +1 -1
  14. package/standalone/.next/server/app/[locale]/build-data/page_client-reference-manifest.js +1 -1
  15. package/standalone/.next/server/app/[locale]/builds/[buildId]/page.js.nft.json +1 -1
  16. package/standalone/.next/server/app/[locale]/builds/[buildId]/page_client-reference-manifest.js +1 -1
  17. package/standalone/.next/server/app/[locale]/builds/page.js.nft.json +1 -1
  18. package/standalone/.next/server/app/[locale]/builds/page_client-reference-manifest.js +1 -1
  19. package/standalone/.next/server/app/[locale]/codebases/[codebaseId]/page.js.nft.json +1 -1
  20. package/standalone/.next/server/app/[locale]/codebases/[codebaseId]/page_client-reference-manifest.js +1 -1
  21. package/standalone/.next/server/app/[locale]/codebases/page.js.nft.json +1 -1
  22. package/standalone/.next/server/app/[locale]/codebases/page_client-reference-manifest.js +1 -1
  23. package/standalone/.next/server/app/[locale]/codebases/repositories/[repositoryId]/page_client-reference-manifest.js +1 -1
  24. package/standalone/.next/server/app/[locale]/comments/page.js.nft.json +1 -1
  25. package/standalone/.next/server/app/[locale]/comments/page_client-reference-manifest.js +1 -1
  26. package/standalone/.next/server/app/[locale]/jira/cache/page_client-reference-manifest.js +1 -1
  27. package/standalone/.next/server/app/[locale]/jira/cache/tickets/[issueKey]/page_client-reference-manifest.js +1 -1
  28. package/standalone/.next/server/app/[locale]/jira/tickets/[issueKey]/page.js.nft.json +1 -1
  29. package/standalone/.next/server/app/[locale]/jira/tickets/[issueKey]/page_client-reference-manifest.js +1 -1
  30. package/standalone/.next/server/app/[locale]/jira/tickets/page.js.nft.json +1 -1
  31. package/standalone/.next/server/app/[locale]/jira/tickets/page_client-reference-manifest.js +1 -1
  32. package/standalone/.next/server/app/[locale]/jobs/[jobId]/page_client-reference-manifest.js +1 -1
  33. package/standalone/.next/server/app/[locale]/page_client-reference-manifest.js +1 -1
  34. package/standalone/.next/server/app/[locale]/pull-requests/[owner]/[repository]/[number]/page.js.nft.json +1 -1
  35. package/standalone/.next/server/app/[locale]/pull-requests/[owner]/[repository]/[number]/page_client-reference-manifest.js +1 -1
  36. package/standalone/.next/server/app/[locale]/pull-requests/page.js.nft.json +1 -1
  37. package/standalone/.next/server/app/[locale]/pull-requests/page_client-reference-manifest.js +1 -1
  38. package/standalone/.next/server/app/[locale]/settings/page_client-reference-manifest.js +1 -1
  39. package/standalone/.next/server/app/[locale]/skills/[skillId]/page_client-reference-manifest.js +1 -1
  40. package/standalone/.next/server/app/[locale]/skills/groups/[groupId]/page_client-reference-manifest.js +1 -1
  41. package/standalone/.next/server/app/[locale]/skills/groups/page_client-reference-manifest.js +1 -1
  42. package/standalone/.next/server/app/[locale]/skills/page_client-reference-manifest.js +1 -1
  43. package/standalone/.next/server/app/[locale]/skills/sync/[runId]/page_client-reference-manifest.js +1 -1
  44. package/standalone/.next/server/app/[locale]/tools/page_client-reference-manifest.js +1 -1
  45. package/standalone/.next/server/app/[locale]/usage/page.js.nft.json +1 -1
  46. package/standalone/.next/server/app/[locale]/usage/page_client-reference-manifest.js +1 -1
  47. package/standalone/.next/server/app/[locale]/worktrees/[worktreeId]/page.js.nft.json +1 -1
  48. package/standalone/.next/server/app/[locale]/worktrees/[worktreeId]/page_client-reference-manifest.js +1 -1
  49. package/standalone/.next/server/app/[locale]/worktrees/page.js.nft.json +1 -1
  50. package/standalone/.next/server/app/[locale]/worktrees/page_client-reference-manifest.js +1 -1
  51. package/standalone/.next/server/app/_global-error.html +1 -1
  52. package/standalone/.next/server/app/_global-error.rsc +1 -1
  53. package/standalone/.next/server/app/_global-error.segments/__PAGE__.segment.rsc +1 -1
  54. package/standalone/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
  55. package/standalone/.next/server/app/_global-error.segments/_head.segment.rsc +1 -1
  56. package/standalone/.next/server/app/_global-error.segments/_index.segment.rsc +1 -1
  57. package/standalone/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
  58. package/standalone/.next/server/app/_not-found.html +1 -1
  59. package/standalone/.next/server/app/_not-found.rsc +1 -1
  60. package/standalone/.next/server/app/_not-found.segments/_full.segment.rsc +1 -1
  61. package/standalone/.next/server/app/_not-found.segments/_head.segment.rsc +1 -1
  62. package/standalone/.next/server/app/_not-found.segments/_index.segment.rsc +1 -1
  63. package/standalone/.next/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +1 -1
  64. package/standalone/.next/server/app/_not-found.segments/_not-found.segment.rsc +1 -1
  65. package/standalone/.next/server/app/_not-found.segments/_tree.segment.rsc +1 -1
  66. package/standalone/.next/server/app/api/build-artifact-uploads/[uploadId]/route.js +2 -2
  67. package/standalone/.next/server/app/api/build-artifact-uploads/[uploadId]/route.js.nft.json +1 -1
  68. package/standalone/.next/server/app/api/builds/[buildId]/artifacts/[artifactId]/route.js +2 -2
  69. package/standalone/.next/server/app/api/builds/[buildId]/artifacts/[artifactId]/route.js.nft.json +1 -1
  70. package/standalone/.next/server/app/api/codebases/by-path/route.js +2 -2
  71. package/standalone/.next/server/app/api/codebases/by-path/route.js.nft.json +1 -1
  72. package/standalone/.next/server/app/api/codebases/route.js +2 -2
  73. package/standalone/.next/server/app/api/codebases/route.js.nft.json +1 -1
  74. package/standalone/.next/server/app/api/graphql/route.js +2 -2
  75. package/standalone/.next/server/app/api/graphql/route.js.nft.json +1 -1
  76. package/standalone/.next/server/app/api/mcp/route.js +2 -2
  77. package/standalone/.next/server/app/api/mcp/route.js.nft.json +1 -1
  78. package/standalone/.next/server/app/api/tools/call/route.js +2 -2
  79. package/standalone/.next/server/app/api/tools/call/route.js.nft.json +1 -1
  80. package/standalone/.next/server/app/api/tools/catalog/route.js +2 -2
  81. package/standalone/.next/server/app/api/tools/catalog/route.js.nft.json +1 -1
  82. package/standalone/.next/server/chunks/{[root-of-the-server]__1iv83x0._.js → [root-of-the-server]__0-ypkf7._.js} +1 -1
  83. package/standalone/.next/server/chunks/{[root-of-the-server]__08w_8a-._.js → [root-of-the-server]__00ku6-v._.js} +1 -1
  84. package/standalone/.next/server/chunks/{[root-of-the-server]__0yfvw4a._.js → [root-of-the-server]__0138gz-._.js} +1 -1
  85. package/standalone/.next/server/chunks/{[root-of-the-server]__0r5s0h6._.js → [root-of-the-server]__02vqwey._.js} +2 -2
  86. package/standalone/.next/server/chunks/{[root-of-the-server]__098f8w4._.js → [root-of-the-server]__056cnsc._.js} +1 -1
  87. package/standalone/.next/server/chunks/{[root-of-the-server]__1l6ed2g._.js → [root-of-the-server]__08mfybr._.js} +2 -2
  88. package/standalone/.next/server/chunks/{[root-of-the-server]__0cs2bfc._.js → [root-of-the-server]__08u874i._.js} +1 -1
  89. package/standalone/.next/server/chunks/{[root-of-the-server]__01h2pl1._.js → [root-of-the-server]__09skp6r._.js} +1 -1
  90. package/standalone/.next/server/chunks/{[root-of-the-server]__14-aq4c._.js → [root-of-the-server]__0cyubup._.js} +1 -1
  91. package/standalone/.next/server/chunks/{[root-of-the-server]__0_l5rqe._.js → [root-of-the-server]__0da1wsf._.js} +1 -1
  92. package/standalone/.next/server/chunks/{[root-of-the-server]__1mgcft0._.js → [root-of-the-server]__0e1fqyr._.js} +1 -1
  93. package/standalone/.next/server/chunks/{[root-of-the-server]__1frrx8s._.js → [root-of-the-server]__0f3ptor._.js} +2 -2
  94. package/standalone/.next/server/chunks/{[root-of-the-server]__0k01mi-._.js → [root-of-the-server]__0fih0li._.js} +1 -1
  95. package/standalone/.next/server/chunks/{[root-of-the-server]__02qjyhj._.js → [root-of-the-server]__0g0tnct._.js} +1 -1
  96. package/standalone/.next/server/chunks/{[root-of-the-server]__1ehdq4c._.js → [root-of-the-server]__0gbor-2._.js} +1 -1
  97. package/standalone/.next/server/chunks/{[root-of-the-server]__09lyzw2._.js → [root-of-the-server]__0mj6qcr._.js} +2 -2
  98. package/standalone/.next/server/chunks/{[root-of-the-server]__14uwobw._.js → [root-of-the-server]__0p_h088._.js} +1 -1
  99. package/standalone/.next/server/chunks/{[root-of-the-server]__0i4bd9d._.js → [root-of-the-server]__0vvjqp5._.js} +1 -1
  100. package/standalone/.next/server/chunks/{[root-of-the-server]__04rx7b9._.js → [root-of-the-server]__0w20bq-._.js} +2 -2
  101. package/standalone/.next/server/chunks/{[root-of-the-server]__0hmrx3m._.js → [root-of-the-server]__0wf0pka._.js} +1 -1
  102. package/standalone/.next/server/chunks/{[root-of-the-server]__0nxj1ky._.js → [root-of-the-server]__0wg2umj._.js} +1 -1
  103. package/standalone/.next/server/chunks/{[root-of-the-server]__17bgip6._.js → [root-of-the-server]__0xa_els._.js} +1 -1
  104. package/standalone/.next/server/chunks/{[root-of-the-server]__0wx4-1l._.js → [root-of-the-server]__0xukz2x._.js} +2 -2
  105. package/standalone/.next/server/chunks/[root-of-the-server]__1-z6lg_._.js +3 -0
  106. package/standalone/.next/server/chunks/{[root-of-the-server]__020ggc3._.js → [root-of-the-server]__15aat79._.js} +1 -1
  107. package/standalone/.next/server/chunks/{[root-of-the-server]__00_-x1w._.js → [root-of-the-server]__15bbm2q._.js} +2 -2
  108. package/standalone/.next/server/chunks/{[root-of-the-server]__09c7zmy._.js → [root-of-the-server]__16l4wed._.js} +1 -1
  109. package/standalone/.next/server/chunks/{[root-of-the-server]__04hrhu3._.js → [root-of-the-server]__19zwwdv._.js} +1 -1
  110. package/standalone/.next/server/chunks/{[root-of-the-server]__0d4_f1e._.js → [root-of-the-server]__1a5_am-._.js} +1 -1
  111. package/standalone/.next/server/chunks/{[root-of-the-server]__0kxltc8._.js → [root-of-the-server]__1ajaiy1._.js} +1 -1
  112. package/standalone/.next/server/chunks/[root-of-the-server]__1dtlzq1._.js +3 -0
  113. package/standalone/.next/server/chunks/[root-of-the-server]__1kpqohm._.js +3 -0
  114. package/standalone/.next/server/chunks/[root-of-the-server]__1l7234r._.js +3 -0
  115. package/standalone/.next/server/chunks/{[root-of-the-server]__0qjhcow._.js → [root-of-the-server]__1oahp4o._.js} +2 -2
  116. package/standalone/.next/server/chunks/[root-of-the-server]__1vip3sa._.js +3 -0
  117. package/standalone/.next/server/chunks/{[root-of-the-server]__0cryh-d._.js → [root-of-the-server]__1wtng3p._.js} +1 -1
  118. package/standalone/.next/server/chunks/[root-of-the-server]__1wu654b._.js +3 -0
  119. package/standalone/.next/server/chunks/[root-of-the-server]__1x2nph5._.js +3 -0
  120. package/standalone/.next/server/chunks/[root-of-the-server]__1xk-0be._.js +3 -0
  121. package/standalone/.next/server/chunks/{[root-of-the-server]__0h0mvv8._.js → [root-of-the-server]__210dhdj._.js} +1 -1
  122. package/standalone/.next/server/chunks/_0exkna-._.js +29 -8
  123. package/standalone/.next/server/chunks/{_0bru086._.js → _0jurkow._.js} +26 -26
  124. package/standalone/.next/server/chunks/{_00mzn-u._.js → _0rx5rfm._.js} +27 -27
  125. package/standalone/.next/server/chunks/_0tufgj0._.js +68 -47
  126. package/standalone/.next/server/chunks/_0w2eghf._.js +29 -8
  127. package/standalone/.next/server/chunks/_152rnkf._.js +3 -3
  128. package/standalone/.next/server/chunks/{_1_g2i-t._.js → _16x77b_._.js} +27 -27
  129. package/standalone/.next/server/chunks/_1dbqy8c._.js +3 -3
  130. package/standalone/.next/server/chunks/_1vrixpc._.js +3 -3
  131. package/standalone/.next/server/chunks/_1yfz-9u._.js +3 -3
  132. package/standalone/.next/server/chunks/ssr/{[root-of-the-server]__1osx7qy._.js → [root-of-the-server]__0361lgt._.js} +8 -2
  133. package/standalone/.next/server/chunks/ssr/[root-of-the-server]__0ay4_3d._.js +37 -0
  134. package/standalone/.next/server/chunks/ssr/[root-of-the-server]__0dm8osz._.js +3 -0
  135. package/standalone/.next/server/chunks/ssr/{[root-of-the-server]__0oj1os4._.js → [root-of-the-server]__1xv798-._.js} +2 -2
  136. package/standalone/.next/server/chunks/ssr/[root-of-the-server]__1z955gh._.js +3 -0
  137. package/standalone/.next/server/chunks/ssr/_00ye62k._.js +35 -0
  138. package/standalone/.next/server/chunks/ssr/_07tglcd._.js +35 -0
  139. package/standalone/.next/server/chunks/ssr/_0bvpmhm._.js +29 -25
  140. package/standalone/.next/server/chunks/ssr/{_0hoc_fd._.js → _0ddgabq._.js} +2 -2
  141. package/standalone/.next/server/chunks/ssr/{_1x13g5y._.js → _0eb36qa._.js} +2 -2
  142. package/standalone/.next/server/chunks/ssr/{_1dnm1d4._.js → _0mr9u9p._.js} +2 -2
  143. package/standalone/.next/server/chunks/ssr/_0nm6upn._.js +3 -0
  144. package/standalone/.next/server/chunks/ssr/_0quhjav._.js +3 -0
  145. package/standalone/.next/server/chunks/ssr/_0w05v7m._.js +3 -0
  146. package/standalone/.next/server/chunks/ssr/_0xozjkz._.js +3 -0
  147. package/standalone/.next/server/chunks/ssr/_0xrpdyy._.js +3 -0
  148. package/standalone/.next/server/chunks/ssr/_1-2qcpf._.js +3 -0
  149. package/standalone/.next/server/chunks/ssr/{_1vhf014._.js → _1-grolz._.js} +2 -2
  150. package/standalone/.next/server/chunks/ssr/_12ws_f2._.js +11 -0
  151. package/standalone/.next/server/chunks/ssr/_17p59oz._.js +3 -0
  152. package/standalone/.next/server/chunks/ssr/_19fwji0._.js +11 -0
  153. package/standalone/.next/server/chunks/ssr/_1_1j9nd._.js +13 -0
  154. package/standalone/.next/server/chunks/ssr/_1g3i459._.js +15 -0
  155. package/standalone/.next/server/chunks/ssr/{_1oh35yj._.js → _1g_aflc._.js} +2 -2
  156. package/standalone/.next/server/chunks/ssr/{_1dsdn7w._.js → _1lcwubl._.js} +2 -2
  157. package/standalone/.next/server/chunks/ssr/{_0sp1ojg._.js → _1r2rmfp._.js} +8 -2
  158. package/standalone/.next/server/chunks/ssr/_1za3z6k._.js +28 -24
  159. package/standalone/.next/server/chunks/ssr/{_13jl9nw._.js → _1zyjq9y._.js} +2 -2
  160. package/standalone/.next/server/chunks/ssr/_20ufqtr._.js +3 -0
  161. package/standalone/.next/server/chunks/ssr/messages_de_json_[json]_cjs_1uig1ud._.js +1 -1
  162. package/standalone/.next/server/chunks/ssr/messages_en_json_[json]_cjs_206072-._.js +1 -1
  163. package/standalone/.next/server/chunks/ssr/messages_es_json_[json]_cjs_082yukd._.js +1 -1
  164. package/standalone/.next/server/chunks/ssr/messages_fr_json_[json]_cjs_0j6-w0i._.js +1 -1
  165. package/standalone/.next/server/chunks/ssr/src_components_agents_agent-detail_tsx_0lfa4ui._.js +2 -2
  166. package/standalone/.next/server/chunks/ssr/src_components_builds_build-detail-page_tsx_0q1lvps._.js +9 -13
  167. package/standalone/.next/server/chunks/ssr/src_components_builds_builds-page_tsx_17qzmsl._.js +8 -12
  168. package/standalone/.next/server/chunks/ssr/src_components_github_actions-page_tsx_18434xt._.js +5 -5
  169. package/standalone/.next/server/chunks/ssr/src_components_github_pull-requests-page_tsx_1il3ga-._.js +12 -12
  170. package/standalone/.next/server/chunks/ssr/src_components_tools_tools-page_tsx_0k1jqcz._.js +2 -2
  171. package/standalone/.next/server/chunks/ssr/src_components_worktrees_worktree-detail-page_tsx_1oexgu_._.js +13 -4
  172. package/standalone/.next/server/middleware-build-manifest.js +3 -3
  173. package/standalone/.next/server/pages/404.html +1 -1
  174. package/standalone/.next/server/pages/500.html +1 -1
  175. package/standalone/.next/server/server-reference-manifest.js +1 -1
  176. package/standalone/.next/server/server-reference-manifest.json +1 -1
  177. package/standalone/.next/static/chunks/{0sp_r-c6262te.js → 0newuocvg03xy.js} +1 -1
  178. package/standalone/.next/static/chunks/{3oyhf7rk2xr_g.js → 0rlomhlt6030e.js} +1 -1
  179. package/standalone/.next/static/chunks/16tfdsma_h0r5.js +33 -0
  180. package/standalone/.next/static/chunks/{1xjd6ye7mxyf5.js → 1802j8gq2g47d.js} +2 -2
  181. package/standalone/.next/static/chunks/1_tnhhn4f122y.js +9 -0
  182. package/standalone/.next/static/chunks/1eny65xy2ho48.js +1 -0
  183. package/standalone/.next/static/chunks/1l4bkigul15i3.js +25 -0
  184. package/standalone/.next/static/chunks/{3td_-1s61zkpa.js → 1nnp0crt0mi_-.js} +1 -1
  185. package/standalone/.next/static/chunks/1qd6cse_d9ae1.js +99 -0
  186. package/standalone/.next/static/chunks/{2dwchs_6y_o5f.js → 2-mxmazwsh-wz.js} +1 -1
  187. package/standalone/.next/static/chunks/2fzwgr2iq_783.css +1 -0
  188. package/standalone/.next/static/chunks/{278dxvyf095b_.js → 2jbygfc0lzu0t.js} +7 -7
  189. package/standalone/.next/static/chunks/2n7u72nxziv_5.js +7 -0
  190. package/standalone/.next/static/chunks/{1rivge68m21sm.js → 2rjf8o4g23no8.js} +10 -10
  191. package/standalone/.next/static/chunks/{42flok13o-l0b.js → 2x8qovg070057.js} +1 -1
  192. package/standalone/.next/static/chunks/{091l-ij_cv0b6.js → 3-u7pvogc5_bx.js} +12 -12
  193. package/standalone/.next/static/chunks/3-zh9b0tcttiw.js +33 -0
  194. package/standalone/.next/static/chunks/31wyih3wwkeid.js +1 -0
  195. package/standalone/.next/static/chunks/{1nqkxeuycfmrt.js → 36_1bjzx79v18.js} +5 -5
  196. package/standalone/.next/static/chunks/3ajj69p_sj615.js +1 -0
  197. package/standalone/.next/static/chunks/3jd8_7lna-j_x.js +40 -0
  198. package/standalone/.next/static/chunks/3jv2gnnn4vx-j.js +43 -0
  199. package/standalone/.next/static/chunks/3k0oakdayt9yt.js +40 -0
  200. package/standalone/.next/static/chunks/3pgngh8lg3be3.js +99 -0
  201. package/standalone/.next/static/chunks/{0w8rd_g6hnvmz.js → 4013cp3x6bvuw.js} +1 -1
  202. package/standalone/src/services/builds/build-freshness.test.ts +107 -0
  203. package/standalone/src/services/builds/build-freshness.ts +73 -0
  204. package/standalone/src/services/builds/builds.service.test.ts +167 -8
  205. package/standalone/src/services/builds/builds.service.ts +115 -3
  206. package/standalone/.next/server/chunks/[root-of-the-server]__1878s0b._.js +0 -3
  207. package/standalone/.next/server/chunks/[root-of-the-server]__18zrtty._.js +0 -3
  208. package/standalone/.next/server/chunks/[root-of-the-server]__1_xz_m2._.js +0 -3
  209. package/standalone/.next/server/chunks/[root-of-the-server]__1mx1hqe._.js +0 -3
  210. package/standalone/.next/server/chunks/[root-of-the-server]__1sjjkyp._.js +0 -3
  211. package/standalone/.next/server/chunks/[root-of-the-server]__1vk9266._.js +0 -3
  212. package/standalone/.next/server/chunks/[root-of-the-server]__1yn6pds._.js +0 -3
  213. package/standalone/.next/server/chunks/[root-of-the-server]__1zwpjfo._.js +0 -3
  214. package/standalone/.next/server/chunks/ssr/[root-of-the-server]__03m5q8h._.js +0 -27
  215. package/standalone/.next/server/chunks/ssr/[root-of-the-server]__06bk7ik._.js +0 -3
  216. package/standalone/.next/server/chunks/ssr/_09l5w5d._.js +0 -3
  217. package/standalone/.next/server/chunks/ssr/_0_726fj._.js +0 -3
  218. package/standalone/.next/server/chunks/ssr/_0a1zku5._.js +0 -3
  219. package/standalone/.next/server/chunks/ssr/_0pu14lm._.js +0 -3
  220. package/standalone/.next/server/chunks/ssr/_1eol9we._.js +0 -3
  221. package/standalone/.next/server/chunks/ssr/_1h3t5g1._.js +0 -3
  222. package/standalone/.next/server/chunks/ssr/_1kemhyd._.js +0 -39
  223. package/standalone/.next/server/chunks/ssr/_1kmkrz5._.js +0 -3
  224. package/standalone/.next/server/chunks/ssr/_1r9ohdr._.js +0 -3
  225. package/standalone/.next/server/chunks/ssr/_1yzb5-u._.js +0 -11
  226. package/standalone/.next/server/chunks/ssr/src_components_0wvh73y._.js +0 -11
  227. package/standalone/.next/server/chunks/ssr/src_components_github_167_ydi._.js +0 -35
  228. package/standalone/.next/static/chunks/00dx8gu-2oyqe.js +0 -45
  229. package/standalone/.next/static/chunks/0j5n6p9i-vyzo.js +0 -9
  230. package/standalone/.next/static/chunks/0weklluydd2mf.js +0 -23
  231. package/standalone/.next/static/chunks/1eehbcjby4go8.js +0 -95
  232. package/standalone/.next/static/chunks/23_75iur2dq8p.js +0 -1
  233. package/standalone/.next/static/chunks/2lgsgstcvc7uk.css +0 -1
  234. package/standalone/.next/static/chunks/32agjzrkphjrl.js +0 -9
  235. package/standalone/.next/static/chunks/399uxexoo8x7f.js +0 -33
  236. package/standalone/.next/static/chunks/39ecics7n8z5m.js +0 -1
  237. package/standalone/.next/static/chunks/3_kaby2qep1pd.js +0 -34
  238. package/standalone/.next/static/chunks/3q7vh58-5dkv2.js +0 -25
  239. package/standalone/.next/static/chunks/3xkoiasuwi3ms.js +0 -95
  240. package/standalone/.next/static/chunks/41s57pssydrel.js +0 -43
  241. /package/standalone/.next/static/{AxIbPSeZUHq852SCBMR8d → 8uBWJ8MOV-OEPe88M3PhU}/_buildManifest.js +0 -0
  242. /package/standalone/.next/static/{AxIbPSeZUHq852SCBMR8d → 8uBWJ8MOV-OEPe88M3PhU}/_clientMiddlewareManifest.js +0 -0
  243. /package/standalone/.next/static/{AxIbPSeZUHq852SCBMR8d → 8uBWJ8MOV-OEPe88M3PhU}/_ssgManifest.js +0 -0
@@ -1,4 +1,4 @@
1
- (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,573474,e=>{"use strict";let t=(0,e.i(456420).default)("trash-2",[["path",{d:"M10 11v6",key:"nco0om"}],["path",{d:"M14 11v6",key:"outv1u"}],["path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6",key:"miytrc"}],["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2",key:"e791ji"}]]);e.s(["Trash2",0,t],573474)},340953,e=>{"use strict";var t=e.i(843476),a=e.i(271645),n=e.i(30030);function r(e,t){if("function"==typeof e)return e(t);null!=e&&(e.current=t)}function i(...e){return a.useCallback(function(...e){return t=>{let a=!1,n=e.map(e=>{let n=r(e,t);return a||"function"!=typeof n||(a=!0),n});if(a)return()=>{for(let t=0;t<n.length;t++){let a=n[t];"function"==typeof a?a():r(e[t],null)}}}}(...e),e)}var s=e.i(326999);"u">typeof window&&window.document&&window.document.createElement;var l="AlertDialog",[o,d]=(0,n.createContextScope)(l,[s.createDialogScope]),c=(0,s.createDialogScope)(),u=e=>{let{__scopeAlertDialog:a,...n}=e,r=c(a);return(0,t.jsx)(s.Root,{...r,...n,modal:!0})};u.displayName=l;var p=a.forwardRef((e,a)=>{let{__scopeAlertDialog:n,...r}=e,i=c(n);return(0,t.jsx)(s.Trigger,{...i,...r,ref:a})});p.displayName="AlertDialogTrigger";var h=e=>{let{__scopeAlertDialog:a,...n}=e,r=c(a);return(0,t.jsx)(s.Portal,{...r,...n})};h.displayName="AlertDialogPortal";var f=a.forwardRef((e,a)=>{let{__scopeAlertDialog:n,...r}=e,i=c(n);return(0,t.jsx)(s.Overlay,{...i,...r,ref:a})});f.displayName="AlertDialogOverlay";var m="AlertDialogContent",[x,g]=o(m),v=a.forwardRef((e,n)=>{let{__scopeAlertDialog:r,children:l,...o}=e,d=c(r),u=i(n,a.useRef(null)),p=a.useRef(null);return(0,t.jsx)(x,{scope:r,cancelRef:p,children:(0,t.jsx)(s.Content,{role:"alertdialog",...d,...o,ref:u,onOpenAutoFocus:function(e,t,{checkForDefaultPrevented:a=!0}={}){return function(n){if(e?.(n),!1===a||!n||!n.defaultPrevented)return t?.(n)}}(o.onOpenAutoFocus,e=>{e.preventDefault(),p.current?.focus({preventScroll:!0})}),onPointerDownOutside:e=>e.preventDefault(),onInteractOutside:e=>e.preventDefault(),children:l})})});v.displayName=m;var b=a.forwardRef((e,a)=>{let{__scopeAlertDialog:n,...r}=e,i=c(n);return(0,t.jsx)(s.Title,{...i,...r,ref:a})});b.displayName="AlertDialogTitle";var y=a.forwardRef((e,a)=>{let{__scopeAlertDialog:n,...r}=e,i=c(n);return(0,t.jsx)(s.Description,{...i,...r,ref:a})});y.displayName="AlertDialogDescription";var j=a.forwardRef((e,a)=>{let{__scopeAlertDialog:n,...r}=e,i=c(n);return(0,t.jsx)(s.Close,{...i,...r,ref:a})});j.displayName="AlertDialogAction";var E="AlertDialogCancel",C=a.forwardRef((e,a)=>{let{__scopeAlertDialog:n,...r}=e,{cancelRef:l}=g(E,n),o=c(n),d=i(a,l);return(0,t.jsx)(s.Close,{...o,...r,ref:d})});C.displayName=E,e.s(["Action",0,j,"AlertDialog",0,u,"AlertDialogAction",0,j,"AlertDialogCancel",0,C,"AlertDialogContent",0,v,"AlertDialogDescription",0,y,"AlertDialogOverlay",0,f,"AlertDialogPortal",0,h,"AlertDialogTitle",0,b,"AlertDialogTrigger",0,p,"Cancel",0,C,"Content",0,v,"Description",0,y,"Overlay",0,f,"Portal",0,h,"Root",0,u,"Title",0,b,"Trigger",0,p,"createAlertDialogScope",0,d],691162);var N=e.i(691162),N=N,S=e.i(975157),D=e.i(519455);function _({...e}){return(0,t.jsx)(N.Root,{"data-slot":"alert-dialog",...e})}function A({...e}){return(0,t.jsx)(N.Trigger,{"data-slot":"alert-dialog-trigger",...e})}function R({...e}){return(0,t.jsx)(N.Portal,{"data-slot":"alert-dialog-portal",...e})}function w({className:e,...a}){return(0,t.jsx)(N.Overlay,{"data-slot":"alert-dialog-overlay",className:(0,S.cn)("fixed inset-0 z-50 bg-black/10 duration-100 supports-backdrop-filter:backdrop-blur-xs data-open:animate-in data-open:fade-in-0 data-closed:animate-out data-closed:fade-out-0",e),...a})}function I({className:e,size:a="default",...n}){return(0,t.jsxs)(R,{children:[(0,t.jsx)(w,{}),(0,t.jsx)(N.Content,{"data-slot":"alert-dialog-content","data-size":a,className:(0,S.cn)("group/alert-dialog-content fixed top-1/2 left-1/2 z-50 grid w-full -translate-x-1/2 -translate-y-1/2 gap-4 rounded-xl bg-popover p-4 text-popover-foreground ring-1 ring-foreground/10 duration-100 outline-none data-[size=default]:max-w-xs data-[size=sm]:max-w-xs data-[size=default]:sm:max-w-sm data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95",e),...n})]})}function O({className:e,...a}){return(0,t.jsx)("div",{"data-slot":"alert-dialog-header",className:(0,S.cn)("grid grid-rows-[auto_1fr] place-items-center gap-1.5 text-center has-data-[slot=alert-dialog-media]:grid-rows-[auto_auto_1fr] has-data-[slot=alert-dialog-media]:gap-x-4 sm:group-data-[size=default]/alert-dialog-content:place-items-start sm:group-data-[size=default]/alert-dialog-content:text-left sm:group-data-[size=default]/alert-dialog-content:has-data-[slot=alert-dialog-media]:grid-rows-[auto_1fr]",e),...a})}function T({className:e,...a}){return(0,t.jsx)("div",{"data-slot":"alert-dialog-footer",className:(0,S.cn)("-mx-4 -mb-4 flex flex-col-reverse gap-2 rounded-b-xl border-t bg-muted/50 p-4 group-data-[size=sm]/alert-dialog-content:grid group-data-[size=sm]/alert-dialog-content:grid-cols-2 sm:flex-row sm:justify-end",e),...a})}function k({className:e,...a}){return(0,t.jsx)(N.Title,{"data-slot":"alert-dialog-title",className:(0,S.cn)("font-heading text-base font-medium sm:group-data-[size=default]/alert-dialog-content:group-has-data-[slot=alert-dialog-media]/alert-dialog-content:col-start-2",e),...a})}function B({className:e,...a}){return(0,t.jsx)(N.Description,{"data-slot":"alert-dialog-description",className:(0,S.cn)("text-sm text-balance text-muted-foreground md:text-pretty *:[a]:underline *:[a]:underline-offset-3 *:[a]:hover:text-foreground",e),...a})}function L({className:e,variant:a="default",size:n="default",...r}){return(0,t.jsx)(D.Button,{variant:a,size:n,asChild:!0,children:(0,t.jsx)(N.Action,{"data-slot":"alert-dialog-action",className:(0,S.cn)(e),...r})})}function F({className:e,variant:a="outline",size:n="default",...r}){return(0,t.jsx)(D.Button,{variant:a,size:n,asChild:!0,children:(0,t.jsx)(N.Cancel,{"data-slot":"alert-dialog-cancel",className:(0,S.cn)(e),...r})})}e.s(["ConfirmationDialog",0,function({actionLabel:e,cancelLabel:a,description:n,onConfirm:r,onOpenChange:i,open:s,title:l,trigger:o}){return(0,t.jsxs)(_,{onOpenChange:i,open:s,children:[o&&(0,t.jsx)(A,{asChild:!0,children:o}),(0,t.jsxs)(I,{children:[(0,t.jsxs)(O,{children:[(0,t.jsx)(k,{children:l}),(0,t.jsx)(B,{children:n})]}),(0,t.jsxs)(T,{children:[(0,t.jsx)(F,{children:a}),(0,t.jsx)(L,{onClick:()=>void r(),variant:"destructive",children:e})]})]})]})}],340953)},741120,e=>{"use strict";let t=(0,e.i(456420).default)("refresh-cw",[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]]);e.s(["RefreshCw",0,t],741120)},82612,e=>{"use strict";var t=e.i(843476),a=e.i(225913),n=e.i(975157);let r=(0,a.cva)("mb-2 flex shrink-0 items-center justify-center [&_svg]:pointer-events-none [&_svg]:shrink-0",{variants:{variant:{default:"bg-transparent",icon:"flex size-8 shrink-0 items-center justify-center rounded-lg bg-muted text-foreground [&_svg:not([class*='size-'])]:size-4"}},defaultVariants:{variant:"default"}});e.s(["Empty",0,function({className:e,...a}){return(0,t.jsx)("div",{"data-slot":"empty",className:(0,n.cn)("flex w-full min-w-0 flex-1 flex-col items-center justify-center gap-4 rounded-xl border-dashed p-6 text-center text-balance",e),...a})},"EmptyDescription",0,function({className:e,...a}){return(0,t.jsx)("div",{"data-slot":"empty-description",className:(0,n.cn)("text-sm/relaxed text-muted-foreground [&>a]:underline [&>a]:underline-offset-4 [&>a:hover]:text-primary",e),...a})},"EmptyHeader",0,function({className:e,...a}){return(0,t.jsx)("div",{"data-slot":"empty-header",className:(0,n.cn)("flex max-w-sm flex-col items-center gap-2",e),...a})},"EmptyMedia",0,function({className:e,variant:a="default",...i}){return(0,t.jsx)("div",{"data-slot":"empty-icon","data-variant":a,className:(0,n.cn)(r({variant:a,className:e})),...i})},"EmptyTitle",0,function({className:e,...a}){return(0,t.jsx)("div",{"data-slot":"empty-title",className:(0,n.cn)("font-heading text-sm font-medium tracking-tight",e),...a})}])},462777,e=>{"use strict";async function t(e){if(navigator.clipboard?.writeText)try{await navigator.clipboard.writeText(e);return}catch{}let t=document.createElement("textarea");t.value=e,t.style.position="fixed",t.style.opacity="0",document.body.append(t),t.select();let a=document.execCommand("copy");if(t.remove(),!a)throw Error("Copy is not supported by this browser")}e.s(["copyText",0,t,"createClientId",0,function(){try{if(globalThis.crypto?.randomUUID)return globalThis.crypto.randomUUID()}catch{}if(globalThis.crypto?.getRandomValues)try{let e=globalThis.crypto.getRandomValues(new Uint8Array(16));return Array.from(e,e=>e.toString(16).padStart(2,"0")).join("")}catch{}return`${Date.now().toString(36)}-${Math.random().toString(36).slice(2)}`}])},778434,e=>{"use strict";e.s(["AGENT_FIELDS",0,"id name hostname version osVersion architecture cpuModel memoryTotalBytes memoryFreeBytes diskTotalBytes diskFreeBytes capabilities baseRepoDirectory derivedDataLocationMode derivedDataPath buildsDirectory defaultBuildsDirectory effectiveBuildsDirectory connectionStatus ipAddress lastSeenAt disconnectedAt createdAt","JOB_FIELDS",0,"id agentId kind payload status error result timeoutSeconds createdAt startedAt finishedAt updatedAt","JOB_LOG_FIELDS",0,"id jobId sequence stream message createdAt"])},250832,e=>{"use strict";let t=(0,e.i(456420).default)("settings-2",[["path",{d:"M14 17H5",key:"gfn3mx"}],["path",{d:"M19 7h-9",key:"6i9tg"}],["circle",{cx:"17",cy:"17",r:"3",key:"18b49y"}],["circle",{cx:"7",cy:"7",r:"3",key:"dfmy0x"}]]);e.s(["Settings2",0,t],250832)},77071,e=>{"use strict";let t=(0,e.i(456420).default)("plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]);e.s(["Plus",0,t],77071)},776639,e=>{"use strict";var t=e.i(843476),a=e.i(560964),n=e.i(964053),r=e.i(519455),i=e.i(975157);function s({...e}){return(0,t.jsx)(n.Dialog.Portal,{"data-slot":"dialog-portal",...e})}function l({className:e,...a}){return(0,t.jsx)(n.Dialog.Overlay,{className:(0,i.cn)("fixed inset-0 isolate z-50 bg-black/10 duration-100 supports-backdrop-filter:backdrop-blur-xs data-open:animate-in data-open:fade-in-0 data-closed:animate-out data-closed:fade-out-0",e),"data-slot":"dialog-overlay",...a})}e.s(["Dialog",0,function({...e}){return(0,t.jsx)(n.Dialog.Root,{"data-slot":"dialog",...e})},"DialogContent",0,function({className:e,children:o,showCloseButton:d=!0,...c}){return(0,t.jsxs)(s,{children:[(0,t.jsx)(l,{}),(0,t.jsxs)(n.Dialog.Content,{className:(0,i.cn)("fixed top-1/2 left-1/2 z-50 grid max-h-[85dvh] w-full max-w-[calc(100%-2rem)] -translate-x-1/2 -translate-y-1/2 gap-4 overflow-y-auto rounded-xl bg-popover p-4 text-sm text-popover-foreground ring-1 ring-foreground/10 duration-100 outline-none sm:max-w-sm data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95",e),"data-slot":"dialog-content",...c,children:[o,d&&(0,t.jsx)(n.Dialog.Close,{asChild:!0,"data-slot":"dialog-close",children:(0,t.jsxs)(r.Button,{className:"absolute top-2 right-2",size:"icon-sm",variant:"ghost",children:[(0,t.jsx)(a.XIcon,{}),(0,t.jsx)("span",{className:"sr-only",children:"Close"})]})})]})]})},"DialogDescription",0,function({className:e,...a}){return(0,t.jsx)(n.Dialog.Description,{className:(0,i.cn)("text-sm text-muted-foreground *:[a]:underline *:[a]:underline-offset-3 *:[a]:hover:text-foreground",e),"data-slot":"dialog-description",...a})},"DialogFooter",0,function({className:e,showCloseButton:a=!1,children:s,...l}){return(0,t.jsxs)("div",{className:(0,i.cn)("-mx-4 -mb-4 flex flex-col-reverse gap-2 rounded-b-xl border-t bg-muted/50 p-4 sm:flex-row sm:justify-end",e),"data-slot":"dialog-footer",...l,children:[s,a&&(0,t.jsx)(n.Dialog.Close,{asChild:!0,children:(0,t.jsx)(r.Button,{variant:"outline",children:"Close"})})]})},"DialogHeader",0,function({className:e,...a}){return(0,t.jsx)("div",{className:(0,i.cn)("flex flex-col gap-2",e),"data-slot":"dialog-header",...a})},"DialogTitle",0,function({className:e,...a}){return(0,t.jsx)(n.Dialog.Title,{className:(0,i.cn)("font-heading text-base leading-none font-medium",e),"data-slot":"dialog-title",...a})}])},59497,e=>{"use strict";var t=e.i(843476),a=e.i(271645);function n(e,t){if("function"==typeof e)return e(t);null!=e&&(e.current=t)}function r(...e){return a.useCallback(function(...e){return t=>{let a=!1,r=e.map(e=>{let r=n(e,t);return a||"function"!=typeof r||(a=!0),r});if(a)return()=>{for(let t=0;t<r.length;t++){let a=r[t];"function"==typeof a?a():n(e[t],null)}}}}(...e),e)}var i=e.i(30030);function s(e,t,{checkForDefaultPrevented:a=!0}={}){return function(n){if(e?.(n),!1===a||!n||!n.defaultPrevented)return t?.(n)}}"u">typeof window&&window.document&&window.document.createElement;var l=globalThis?.document?a.useLayoutEffect:()=>{};a[" useEffectEvent ".trim().toString()],a[" useInsertionEffect ".trim().toString()];var o=a[" useInsertionEffect ".trim().toString()]||l;Symbol("RADIX:SYNC_STATE");var d=e.i(999682),c=e.i(635804),u=e.i(296626);e.i(174080);var p=Symbol.for("radix.slottable"),h=Symbol.for("react.lazy");function f(e){var t;return null!=e&&"object"==typeof e&&"$$typeof"in e&&e.$$typeof===h&&"_payload"in e&&"object"==typeof(t=e._payload)&&null!==t&&"then"in t}var m=a[" use ".trim().toString()],x=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"].reduce((e,n)=>{var i;let s,l=(i=`Primitive.${n}`,(s=a.forwardRef((e,t)=>{var n;let s,l,{children:o,...d}=e,c=null,u=!1,h=[];f(o)&&"function"==typeof m&&(o=m(o._payload)),a.Children.forEach(o,e=>{var t;if(t=e,a.isValidElement(t)&&"function"==typeof t.type&&"__radixId"in t.type&&t.type.__radixId===p){u=!0;let t="child"in e.props?e.props.child:e.props.children;f(t)&&"function"==typeof m&&(t=m(t._payload)),c=((e,t)=>{if("child"in e.props){let t=e.props.child;return a.isValidElement(t)?a.cloneElement(t,void 0,e.props.children(t.props.children)):null}return a.isValidElement(t)?t:null})(e,t),h.push(c?.props?.children)}else h.push(e)}),c?c=a.cloneElement(c,void 0,h):!u&&1===a.Children.count(o)&&a.isValidElement(o)&&(c=o);let x=c?(n=c,(l=(s=Object.getOwnPropertyDescriptor(n.props,"ref")?.get)&&"isReactWarning"in s&&s.isReactWarning)?n.ref:(l=(s=Object.getOwnPropertyDescriptor(n,"ref")?.get)&&"isReactWarning"in s&&s.isReactWarning)?n.props.ref:n.props.ref||n.ref):void 0,g=r(t,x);if(!c){if(o||0===o){let e,t;throw Error(u?(e=i,`${e} failed to slot onto its \`Slottable\`. Expected \`Slottable\` to receive a single React element child.`):(t=i,`${t} failed to slot onto its children. Expected a single React element child or \`Slottable\`.`))}return o}let v=function(e,t){let a={...t};for(let n in t){let r=e[n],i=t[n];/^on[A-Z]/.test(n)?r&&i?a[n]=(...e)=>{let t=i(...e);return r(...e),t}:r&&(a[n]=r):"style"===n?a[n]={...r,...i}:"className"===n&&(a[n]=[r,i].filter(Boolean).join(" "))}return{...e,...a}}(d,c.props??{});return c.type!==a.Fragment&&(v.ref=t?g:x),a.cloneElement(c,v)})).displayName=`${i}.Slot`,s),o=a.forwardRef((e,a)=>{let{asChild:r,...i}=e;return"u">typeof window&&(window[Symbol.for("radix-ui")]=!0),(0,t.jsx)(r?l:n,{...i,ref:a})});return o.displayName=`Primitive.${n}`,{...e,[n]:o}},{}),g="Checkbox",[v,b]=(0,i.createContextScope)(g),[y,j]=v(g);function E(e){let{__scopeCheckbox:n,checked:r,children:i,defaultChecked:s,disabled:l,form:d,name:c,onCheckedChange:u,required:p,value:h="on",internal_do_not_use_render:f}=e,[m,x]=function({prop:e,defaultProp:t,onChange:n=()=>{},caller:r}){let[i,s,l]=function({defaultProp:e,onChange:t}){let[n,r]=a.useState(e),i=a.useRef(n),s=a.useRef(t);return o(()=>{s.current=t},[t]),a.useEffect(()=>{i.current!==n&&(s.current?.(n),i.current=n)},[n,i]),[n,r,s]}({defaultProp:t,onChange:n}),d=void 0!==e,c=d?e:i;{let t=a.useRef(void 0!==e);a.useEffect(()=>{let e=t.current;if(e!==d){let t=d?"controlled":"uncontrolled";console.warn(`${r} is changing from ${e?"controlled":"uncontrolled"} to ${t}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`)}t.current=d},[d,r])}return[c,a.useCallback(t=>{if(d){let a="function"==typeof t?t(e):t;a!==e&&l.current?.(a)}else s(t)},[d,e,s,l])]}({prop:r,defaultProp:s??!1,onChange:u,caller:g}),[v,b]=a.useState(null),[j,E]=a.useState(null),C=a.useRef(!1),N=!v||!!d||!!v.closest("form"),S={checked:m,disabled:l,setChecked:x,control:v,setControl:b,name:c,form:d,value:h,hasConsumerStoppedPropagationRef:C,required:p,defaultChecked:!w(s)&&s,isFormControl:N,bubbleInput:j,setBubbleInput:E};return(0,t.jsx)(y,{scope:n,...S,children:"function"==typeof f?f(S):i})}var C="CheckboxTrigger",N=a.forwardRef(({__scopeCheckbox:e,onKeyDown:n,onClick:i,...l},o)=>{let{control:d,value:c,disabled:u,checked:p,required:h,setControl:f,setChecked:m,hasConsumerStoppedPropagationRef:g,isFormControl:v,bubbleInput:b}=j(C,e),y=r(o,f),E=a.useRef(p);return a.useEffect(()=>{let e=d?.form;if(e){let t=()=>m(E.current);return e.addEventListener("reset",t),()=>e.removeEventListener("reset",t)}},[d,m]),(0,t.jsx)(x.button,{type:"button",role:"checkbox","aria-checked":w(p)?"mixed":p,"aria-required":h,"data-state":I(p),"data-disabled":u?"":void 0,disabled:u,value:c,...l,ref:y,onKeyDown:s(n,e=>{"Enter"===e.key&&e.preventDefault()}),onClick:s(i,e=>{m(e=>!!w(e)||!e),b&&v&&(g.current=e.isPropagationStopped(),g.current||e.stopPropagation())})})});N.displayName=C;var S=a.forwardRef((e,a)=>{let{__scopeCheckbox:n,name:r,checked:i,defaultChecked:s,required:l,disabled:o,value:d,onCheckedChange:c,form:u,...p}=e;return(0,t.jsx)(E,{__scopeCheckbox:n,checked:i,defaultChecked:s,disabled:o,required:l,onCheckedChange:c,name:r,form:u,value:d,internal_do_not_use_render:({isFormControl:e})=>(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(N,{...p,ref:a,__scopeCheckbox:n}),e&&(0,t.jsx)(R,{__scopeCheckbox:n})]})})});S.displayName=g;var D="CheckboxIndicator",_=a.forwardRef((e,a)=>{let{__scopeCheckbox:n,forceMount:r,...i}=e,s=j(D,n);return(0,t.jsx)(u.Presence,{present:r||w(s.checked)||!0===s.checked,children:(0,t.jsx)(x.span,{"data-state":I(s.checked),"data-disabled":s.disabled?"":void 0,...i,ref:a,style:{pointerEvents:"none",...e.style}})})});_.displayName=D;var A="CheckboxBubbleInput",R=a.forwardRef(({__scopeCheckbox:e,...n},i)=>{let{control:s,hasConsumerStoppedPropagationRef:l,checked:o,defaultChecked:u,required:p,disabled:h,name:f,value:m,form:g,bubbleInput:v,setBubbleInput:b}=j(A,e),y=r(i,b),E=(0,d.usePrevious)(o),C=(0,c.useSize)(s);a.useEffect(()=>{if(!v)return;let e=Object.getOwnPropertyDescriptor(window.HTMLInputElement.prototype,"checked").set,t=!l.current;if(E!==o&&e){let a=new Event("click",{bubbles:t});v.indeterminate=w(o),e.call(v,!w(o)&&o),v.dispatchEvent(a)}},[v,E,o,l]);let N=a.useRef(!w(o)&&o);return(0,t.jsx)(x.input,{type:"checkbox","aria-hidden":!0,defaultChecked:u??N.current,required:p,disabled:h,name:f,value:m,form:g,...n,tabIndex:-1,ref:y,style:{...n.style,...C,position:"absolute",pointerEvents:"none",opacity:0,margin:0,transform:"translateX(-100%)"}})});function w(e){return"indeterminate"===e}function I(e){return w(e)?"indeterminate":e?"checked":"unchecked"}R.displayName=A,e.s(["Checkbox",0,S,"CheckboxIndicator",0,_,"Indicator",0,_,"Root",0,S,"createCheckboxScope",0,b,"unstable_BubbleInput",0,R,"unstable_CheckboxBubbleInput",0,R,"unstable_CheckboxProvider",0,E,"unstable_CheckboxTrigger",0,N,"unstable_Provider",0,E,"unstable_Trigger",0,N],388474);var O=e.i(388474),O=O,T=e.i(975157),k=e.i(593698);e.s(["Checkbox",0,function({className:e,...a}){return(0,t.jsx)(O.Root,{"data-slot":"checkbox",className:(0,T.cn)("peer relative flex size-4 shrink-0 items-center justify-center rounded-[4px] border border-input transition-colors outline-none group-has-disabled/field:opacity-50 after:absolute after:-inset-x-3 after:-inset-y-2 focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 aria-invalid:aria-checked:border-primary dark:bg-input/30 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 data-checked:border-primary data-checked:bg-primary data-checked:text-primary-foreground dark:data-checked:bg-primary",e),...a,children:(0,t.jsx)(O.Indicator,{"data-slot":"checkbox-indicator",className:"grid place-content-center text-current transition-none [&>svg]:size-3.5",children:(0,t.jsx)(k.CheckIcon,{})})})}],59497)},986253,e=>{"use strict";let t=(0,e.i(456420).default)("chevron-right",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);e.s(["default",0,t])},867927,e=>{"use strict";var t=e.i(986253);e.s(["ChevronRight",()=>t.default])},515281,e=>{"use strict";let t=(0,e.i(456420).default)("pencil",[["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",key:"1a8usu"}],["path",{d:"m15 5 4 4",key:"1mk7zo"}]]);e.s(["Pencil",0,t],515281)},762368,e=>{"use strict";let t=(0,e.i(456420).default)("download",[["path",{d:"M12 15V3",key:"m9g1x1"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["path",{d:"m7 10 5 5 5-5",key:"brsn70"}]]);e.s(["Download",0,t],762368)},768877,e=>{"use strict";let t=(0,e.i(456420).default)("arrow-right",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]]);e.s(["ArrowRight",0,t],768877)},434719,e=>{"use strict";let t=String.raw`\b([A-Z][A-Z0-9_]*-\d+)\b`;e.s(["DEFAULT_JIRA_BRANCH_REGEX",0,t,"DEFAULT_WORKTREE_FETCH_INTERVAL_SECONDS",0,300,"MAX_WORKTREE_FETCH_INTERVAL_SECONDS",0,86400,"MIN_WORKTREE_FETCH_INTERVAL_SECONDS",0,60,"WORKTREE_BRANCH_JOB_KIND",0,"worktree.branch","WORKTREE_DELETE_JOB_KIND",0,"worktree.delete","WORKTREE_INSPECT_JOB_KIND",0,"worktree.inspect","WORKTREE_MOVE_CHECKOUT_JOB_KIND",0,"worktree.move.checkout","WORKTREE_MOVE_PUSH_JOB_KIND",0,"worktree.move.push","WORKTREE_OPERATION_JOB_KIND",0,"worktree.operation","WORKTREE_WATCH_JOB_KIND",0,"worktree.watch"])},421645,e=>{"use strict";e.s(["CODEBASE_BROWSE_JOB_KIND",0,"codebase.browse","CODEBASE_FETCH_JOB_KIND",0,"codebase.fetch","CODEBASE_GIT_INSPECT_JOB_KIND",0,"codebase.git.inspect","CODEBASE_GIT_OPERATION_JOB_KIND",0,"codebase.git.operation","CODEBASE_INSPECT_JOB_KIND",0,"codebase.inspect","CODEBASE_RECONCILE_EVENT_CAPABILITY",0,"codebase.reconcile.requested","CODEBASE_REFRESH_JOB_KIND",0,"codebase.refresh","DEFAULT_CODEBASE_RECONCILE_INTERVAL_SECONDS",0,30,"MAX_CODEBASE_RECONCILE_INTERVAL_SECONDS",0,3600,"MIN_CODEBASE_RECONCILE_INTERVAL_SECONDS",0,10])},874801,e=>{"use strict";var t=e.i(843476),a=e.i(867927),n=e.i(456420);let r=(0,n.default)("folder",[["path",{d:"M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z",key:"1kt360"}]]),i=(0,n.default)("folder-check",[["path",{d:"M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z",key:"1kt360"}],["path",{d:"m9 13 2 2 4-4",key:"6343dt"}]]);var s=e.i(902434),s=s,l=e.i(948148),o=e.i(271645),d=e.i(929592),c=e.i(519455),u=e.i(59497),p=e.i(110204),h=e.i(987968),f=e.i(462777),m=e.i(637611);e.s(["AgentDirectoryBrowser",0,function({agentId:e,browseLabel:n,disabled:x=!1,initialPath:g=null,onPathChange:v,onSelect:b,selectIcon:y,selectLabel:j}){var E;let C=(0,l.useTranslations)("codebases"),[N,S]=(0,o.useState)(null),[D,_]=(0,o.useState)(!1),[A,R]=(0,o.useState)(!1),[w,I]=(0,o.useState)(null),O=(0,o.useRef)(0),T=(0,o.useCallback)(async t=>{let a=++O.current;R(!0);try{let n=await (0,m.controlPlaneRequest)(`mutation BrowseAgentDirectory($input: BrowseAgentDirectoryInput!) {
1
+ (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,573474,e=>{"use strict";let t=(0,e.i(456420).default)("trash-2",[["path",{d:"M10 11v6",key:"nco0om"}],["path",{d:"M14 11v6",key:"outv1u"}],["path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6",key:"miytrc"}],["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2",key:"e791ji"}]]);e.s(["Trash2",0,t],573474)},340953,e=>{"use strict";var t=e.i(843476),a=e.i(271645),n=e.i(30030);function r(e,t){if("function"==typeof e)return e(t);null!=e&&(e.current=t)}function i(...e){return a.useCallback(function(...e){return t=>{let a=!1,n=e.map(e=>{let n=r(e,t);return a||"function"!=typeof n||(a=!0),n});if(a)return()=>{for(let t=0;t<n.length;t++){let a=n[t];"function"==typeof a?a():r(e[t],null)}}}}(...e),e)}var s=e.i(326999);"u">typeof window&&window.document&&window.document.createElement;var l="AlertDialog",[o,d]=(0,n.createContextScope)(l,[s.createDialogScope]),c=(0,s.createDialogScope)(),u=e=>{let{__scopeAlertDialog:a,...n}=e,r=c(a);return(0,t.jsx)(s.Root,{...r,...n,modal:!0})};u.displayName=l;var p=a.forwardRef((e,a)=>{let{__scopeAlertDialog:n,...r}=e,i=c(n);return(0,t.jsx)(s.Trigger,{...i,...r,ref:a})});p.displayName="AlertDialogTrigger";var h=e=>{let{__scopeAlertDialog:a,...n}=e,r=c(a);return(0,t.jsx)(s.Portal,{...r,...n})};h.displayName="AlertDialogPortal";var f=a.forwardRef((e,a)=>{let{__scopeAlertDialog:n,...r}=e,i=c(n);return(0,t.jsx)(s.Overlay,{...i,...r,ref:a})});f.displayName="AlertDialogOverlay";var m="AlertDialogContent",[x,g]=o(m),v=a.forwardRef((e,n)=>{let{__scopeAlertDialog:r,children:l,...o}=e,d=c(r),u=i(n,a.useRef(null)),p=a.useRef(null);return(0,t.jsx)(x,{scope:r,cancelRef:p,children:(0,t.jsx)(s.Content,{role:"alertdialog",...d,...o,ref:u,onOpenAutoFocus:function(e,t,{checkForDefaultPrevented:a=!0}={}){return function(n){if(e?.(n),!1===a||!n||!n.defaultPrevented)return t?.(n)}}(o.onOpenAutoFocus,e=>{e.preventDefault(),p.current?.focus({preventScroll:!0})}),onPointerDownOutside:e=>e.preventDefault(),onInteractOutside:e=>e.preventDefault(),children:l})})});v.displayName=m;var b=a.forwardRef((e,a)=>{let{__scopeAlertDialog:n,...r}=e,i=c(n);return(0,t.jsx)(s.Title,{...i,...r,ref:a})});b.displayName="AlertDialogTitle";var y=a.forwardRef((e,a)=>{let{__scopeAlertDialog:n,...r}=e,i=c(n);return(0,t.jsx)(s.Description,{...i,...r,ref:a})});y.displayName="AlertDialogDescription";var j=a.forwardRef((e,a)=>{let{__scopeAlertDialog:n,...r}=e,i=c(n);return(0,t.jsx)(s.Close,{...i,...r,ref:a})});j.displayName="AlertDialogAction";var E="AlertDialogCancel",C=a.forwardRef((e,a)=>{let{__scopeAlertDialog:n,...r}=e,{cancelRef:l}=g(E,n),o=c(n),d=i(a,l);return(0,t.jsx)(s.Close,{...o,...r,ref:d})});C.displayName=E,e.s(["Action",0,j,"AlertDialog",0,u,"AlertDialogAction",0,j,"AlertDialogCancel",0,C,"AlertDialogContent",0,v,"AlertDialogDescription",0,y,"AlertDialogOverlay",0,f,"AlertDialogPortal",0,h,"AlertDialogTitle",0,b,"AlertDialogTrigger",0,p,"Cancel",0,C,"Content",0,v,"Description",0,y,"Overlay",0,f,"Portal",0,h,"Root",0,u,"Title",0,b,"Trigger",0,p,"createAlertDialogScope",0,d],691162);var N=e.i(691162),N=N,S=e.i(975157),D=e.i(519455);function _({...e}){return(0,t.jsx)(N.Root,{"data-slot":"alert-dialog",...e})}function A({...e}){return(0,t.jsx)(N.Trigger,{"data-slot":"alert-dialog-trigger",...e})}function R({...e}){return(0,t.jsx)(N.Portal,{"data-slot":"alert-dialog-portal",...e})}function w({className:e,...a}){return(0,t.jsx)(N.Overlay,{"data-slot":"alert-dialog-overlay",className:(0,S.cn)("fixed inset-0 z-50 bg-black/10 duration-100 supports-backdrop-filter:backdrop-blur-xs data-open:animate-in data-open:fade-in-0 data-closed:animate-out data-closed:fade-out-0",e),...a})}function I({className:e,size:a="default",...n}){return(0,t.jsxs)(R,{children:[(0,t.jsx)(w,{}),(0,t.jsx)(N.Content,{"data-slot":"alert-dialog-content","data-size":a,className:(0,S.cn)("group/alert-dialog-content fixed top-1/2 left-1/2 z-50 grid w-full -translate-x-1/2 -translate-y-1/2 gap-4 rounded-xl bg-popover p-4 text-popover-foreground ring-1 ring-foreground/10 duration-100 outline-none data-[size=default]:max-w-xs data-[size=sm]:max-w-xs data-[size=default]:sm:max-w-sm data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95",e),...n})]})}function O({className:e,...a}){return(0,t.jsx)("div",{"data-slot":"alert-dialog-header",className:(0,S.cn)("grid grid-rows-[auto_1fr] place-items-center gap-1.5 text-center has-data-[slot=alert-dialog-media]:grid-rows-[auto_auto_1fr] has-data-[slot=alert-dialog-media]:gap-x-4 sm:group-data-[size=default]/alert-dialog-content:place-items-start sm:group-data-[size=default]/alert-dialog-content:text-left sm:group-data-[size=default]/alert-dialog-content:has-data-[slot=alert-dialog-media]:grid-rows-[auto_1fr]",e),...a})}function T({className:e,...a}){return(0,t.jsx)("div",{"data-slot":"alert-dialog-footer",className:(0,S.cn)("-mx-4 -mb-4 flex flex-col-reverse gap-2 rounded-b-xl border-t bg-muted/50 p-4 group-data-[size=sm]/alert-dialog-content:grid group-data-[size=sm]/alert-dialog-content:grid-cols-2 sm:flex-row sm:justify-end",e),...a})}function k({className:e,...a}){return(0,t.jsx)(N.Title,{"data-slot":"alert-dialog-title",className:(0,S.cn)("font-heading text-base font-medium sm:group-data-[size=default]/alert-dialog-content:group-has-data-[slot=alert-dialog-media]/alert-dialog-content:col-start-2",e),...a})}function B({className:e,...a}){return(0,t.jsx)(N.Description,{"data-slot":"alert-dialog-description",className:(0,S.cn)("text-sm text-balance text-muted-foreground md:text-pretty *:[a]:underline *:[a]:underline-offset-3 *:[a]:hover:text-foreground",e),...a})}function L({className:e,variant:a="default",size:n="default",...r}){return(0,t.jsx)(D.Button,{variant:a,size:n,asChild:!0,children:(0,t.jsx)(N.Action,{"data-slot":"alert-dialog-action",className:(0,S.cn)(e),...r})})}function F({className:e,variant:a="outline",size:n="default",...r}){return(0,t.jsx)(D.Button,{variant:a,size:n,asChild:!0,children:(0,t.jsx)(N.Cancel,{"data-slot":"alert-dialog-cancel",className:(0,S.cn)(e),...r})})}e.s(["ConfirmationDialog",0,function({actionLabel:e,cancelLabel:a,description:n,onConfirm:r,onOpenChange:i,open:s,title:l,trigger:o}){return(0,t.jsxs)(_,{onOpenChange:i,open:s,children:[o&&(0,t.jsx)(A,{asChild:!0,children:o}),(0,t.jsxs)(I,{children:[(0,t.jsxs)(O,{children:[(0,t.jsx)(k,{children:l}),(0,t.jsx)(B,{children:n})]}),(0,t.jsxs)(T,{children:[(0,t.jsx)(F,{children:a}),(0,t.jsx)(L,{onClick:()=>void r(),variant:"destructive",children:e})]})]})]})}],340953)},741120,e=>{"use strict";let t=(0,e.i(456420).default)("refresh-cw",[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]]);e.s(["RefreshCw",0,t],741120)},82612,e=>{"use strict";var t=e.i(843476),a=e.i(225913),n=e.i(975157);let r=(0,a.cva)("mb-2 flex shrink-0 items-center justify-center [&_svg]:pointer-events-none [&_svg]:shrink-0",{variants:{variant:{default:"bg-transparent",icon:"flex size-8 shrink-0 items-center justify-center rounded-lg bg-muted text-foreground [&_svg:not([class*='size-'])]:size-4"}},defaultVariants:{variant:"default"}});e.s(["Empty",0,function({className:e,...a}){return(0,t.jsx)("div",{"data-slot":"empty",className:(0,n.cn)("flex w-full min-w-0 flex-1 flex-col items-center justify-center gap-4 rounded-xl border-dashed p-6 text-center text-balance",e),...a})},"EmptyDescription",0,function({className:e,...a}){return(0,t.jsx)("div",{"data-slot":"empty-description",className:(0,n.cn)("text-sm/relaxed text-muted-foreground [&>a]:underline [&>a]:underline-offset-4 [&>a:hover]:text-primary",e),...a})},"EmptyHeader",0,function({className:e,...a}){return(0,t.jsx)("div",{"data-slot":"empty-header",className:(0,n.cn)("flex max-w-sm flex-col items-center gap-2",e),...a})},"EmptyMedia",0,function({className:e,variant:a="default",...i}){return(0,t.jsx)("div",{"data-slot":"empty-icon","data-variant":a,className:(0,n.cn)(r({variant:a,className:e})),...i})},"EmptyTitle",0,function({className:e,...a}){return(0,t.jsx)("div",{"data-slot":"empty-title",className:(0,n.cn)("font-heading text-sm font-medium tracking-tight",e),...a})}])},462777,e=>{"use strict";async function t(e){if(navigator.clipboard?.writeText)try{await navigator.clipboard.writeText(e);return}catch{}let t=document.createElement("textarea");t.value=e,t.style.position="fixed",t.style.opacity="0",document.body.append(t),t.select();let a=document.execCommand("copy");if(t.remove(),!a)throw Error("Copy is not supported by this browser")}e.s(["copyText",0,t,"createClientId",0,function(){try{if(globalThis.crypto?.randomUUID)return globalThis.crypto.randomUUID()}catch{}if(globalThis.crypto?.getRandomValues)try{let e=globalThis.crypto.getRandomValues(new Uint8Array(16));return Array.from(e,e=>e.toString(16).padStart(2,"0")).join("")}catch{}return`${Date.now().toString(36)}-${Math.random().toString(36).slice(2)}`}])},778434,e=>{"use strict";e.s(["AGENT_FIELDS",0,"id name hostname version osVersion architecture cpuModel memoryTotalBytes memoryFreeBytes diskTotalBytes diskFreeBytes capabilities baseRepoDirectory derivedDataLocationMode derivedDataPath buildsDirectory defaultBuildsDirectory effectiveBuildsDirectory connectionStatus ipAddress lastSeenAt disconnectedAt createdAt","JOB_FIELDS",0,"id agentId kind payload status error result timeoutSeconds createdAt startedAt finishedAt updatedAt","JOB_LOG_FIELDS",0,"id jobId sequence stream message createdAt"])},250832,e=>{"use strict";let t=(0,e.i(456420).default)("settings-2",[["path",{d:"M14 17H5",key:"gfn3mx"}],["path",{d:"M19 7h-9",key:"6i9tg"}],["circle",{cx:"17",cy:"17",r:"3",key:"18b49y"}],["circle",{cx:"7",cy:"7",r:"3",key:"dfmy0x"}]]);e.s(["Settings2",0,t],250832)},762368,e=>{"use strict";let t=(0,e.i(456420).default)("download",[["path",{d:"M12 15V3",key:"m9g1x1"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["path",{d:"m7 10 5 5 5-5",key:"brsn70"}]]);e.s(["Download",0,t],762368)},59497,e=>{"use strict";var t=e.i(843476),a=e.i(271645);function n(e,t){if("function"==typeof e)return e(t);null!=e&&(e.current=t)}function r(...e){return a.useCallback(function(...e){return t=>{let a=!1,r=e.map(e=>{let r=n(e,t);return a||"function"!=typeof r||(a=!0),r});if(a)return()=>{for(let t=0;t<r.length;t++){let a=r[t];"function"==typeof a?a():n(e[t],null)}}}}(...e),e)}var i=e.i(30030);function s(e,t,{checkForDefaultPrevented:a=!0}={}){return function(n){if(e?.(n),!1===a||!n||!n.defaultPrevented)return t?.(n)}}"u">typeof window&&window.document&&window.document.createElement;var l=globalThis?.document?a.useLayoutEffect:()=>{};a[" useEffectEvent ".trim().toString()],a[" useInsertionEffect ".trim().toString()];var o=a[" useInsertionEffect ".trim().toString()]||l;Symbol("RADIX:SYNC_STATE");var d=e.i(999682),c=e.i(635804),u=e.i(296626);e.i(174080);var p=Symbol.for("radix.slottable"),h=Symbol.for("react.lazy");function f(e){var t;return null!=e&&"object"==typeof e&&"$$typeof"in e&&e.$$typeof===h&&"_payload"in e&&"object"==typeof(t=e._payload)&&null!==t&&"then"in t}var m=a[" use ".trim().toString()],x=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"].reduce((e,n)=>{var i;let s,l=(i=`Primitive.${n}`,(s=a.forwardRef((e,t)=>{var n;let s,l,{children:o,...d}=e,c=null,u=!1,h=[];f(o)&&"function"==typeof m&&(o=m(o._payload)),a.Children.forEach(o,e=>{var t;if(t=e,a.isValidElement(t)&&"function"==typeof t.type&&"__radixId"in t.type&&t.type.__radixId===p){u=!0;let t="child"in e.props?e.props.child:e.props.children;f(t)&&"function"==typeof m&&(t=m(t._payload)),c=((e,t)=>{if("child"in e.props){let t=e.props.child;return a.isValidElement(t)?a.cloneElement(t,void 0,e.props.children(t.props.children)):null}return a.isValidElement(t)?t:null})(e,t),h.push(c?.props?.children)}else h.push(e)}),c?c=a.cloneElement(c,void 0,h):!u&&1===a.Children.count(o)&&a.isValidElement(o)&&(c=o);let x=c?(n=c,(l=(s=Object.getOwnPropertyDescriptor(n.props,"ref")?.get)&&"isReactWarning"in s&&s.isReactWarning)?n.ref:(l=(s=Object.getOwnPropertyDescriptor(n,"ref")?.get)&&"isReactWarning"in s&&s.isReactWarning)?n.props.ref:n.props.ref||n.ref):void 0,g=r(t,x);if(!c){if(o||0===o){let e,t;throw Error(u?(e=i,`${e} failed to slot onto its \`Slottable\`. Expected \`Slottable\` to receive a single React element child.`):(t=i,`${t} failed to slot onto its children. Expected a single React element child or \`Slottable\`.`))}return o}let v=function(e,t){let a={...t};for(let n in t){let r=e[n],i=t[n];/^on[A-Z]/.test(n)?r&&i?a[n]=(...e)=>{let t=i(...e);return r(...e),t}:r&&(a[n]=r):"style"===n?a[n]={...r,...i}:"className"===n&&(a[n]=[r,i].filter(Boolean).join(" "))}return{...e,...a}}(d,c.props??{});return c.type!==a.Fragment&&(v.ref=t?g:x),a.cloneElement(c,v)})).displayName=`${i}.Slot`,s),o=a.forwardRef((e,a)=>{let{asChild:r,...i}=e;return"u">typeof window&&(window[Symbol.for("radix-ui")]=!0),(0,t.jsx)(r?l:n,{...i,ref:a})});return o.displayName=`Primitive.${n}`,{...e,[n]:o}},{}),g="Checkbox",[v,b]=(0,i.createContextScope)(g),[y,j]=v(g);function E(e){let{__scopeCheckbox:n,checked:r,children:i,defaultChecked:s,disabled:l,form:d,name:c,onCheckedChange:u,required:p,value:h="on",internal_do_not_use_render:f}=e,[m,x]=function({prop:e,defaultProp:t,onChange:n=()=>{},caller:r}){let[i,s,l]=function({defaultProp:e,onChange:t}){let[n,r]=a.useState(e),i=a.useRef(n),s=a.useRef(t);return o(()=>{s.current=t},[t]),a.useEffect(()=>{i.current!==n&&(s.current?.(n),i.current=n)},[n,i]),[n,r,s]}({defaultProp:t,onChange:n}),d=void 0!==e,c=d?e:i;{let t=a.useRef(void 0!==e);a.useEffect(()=>{let e=t.current;if(e!==d){let t=d?"controlled":"uncontrolled";console.warn(`${r} is changing from ${e?"controlled":"uncontrolled"} to ${t}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`)}t.current=d},[d,r])}return[c,a.useCallback(t=>{if(d){let a="function"==typeof t?t(e):t;a!==e&&l.current?.(a)}else s(t)},[d,e,s,l])]}({prop:r,defaultProp:s??!1,onChange:u,caller:g}),[v,b]=a.useState(null),[j,E]=a.useState(null),C=a.useRef(!1),N=!v||!!d||!!v.closest("form"),S={checked:m,disabled:l,setChecked:x,control:v,setControl:b,name:c,form:d,value:h,hasConsumerStoppedPropagationRef:C,required:p,defaultChecked:!w(s)&&s,isFormControl:N,bubbleInput:j,setBubbleInput:E};return(0,t.jsx)(y,{scope:n,...S,children:"function"==typeof f?f(S):i})}var C="CheckboxTrigger",N=a.forwardRef(({__scopeCheckbox:e,onKeyDown:n,onClick:i,...l},o)=>{let{control:d,value:c,disabled:u,checked:p,required:h,setControl:f,setChecked:m,hasConsumerStoppedPropagationRef:g,isFormControl:v,bubbleInput:b}=j(C,e),y=r(o,f),E=a.useRef(p);return a.useEffect(()=>{let e=d?.form;if(e){let t=()=>m(E.current);return e.addEventListener("reset",t),()=>e.removeEventListener("reset",t)}},[d,m]),(0,t.jsx)(x.button,{type:"button",role:"checkbox","aria-checked":w(p)?"mixed":p,"aria-required":h,"data-state":I(p),"data-disabled":u?"":void 0,disabled:u,value:c,...l,ref:y,onKeyDown:s(n,e=>{"Enter"===e.key&&e.preventDefault()}),onClick:s(i,e=>{m(e=>!!w(e)||!e),b&&v&&(g.current=e.isPropagationStopped(),g.current||e.stopPropagation())})})});N.displayName=C;var S=a.forwardRef((e,a)=>{let{__scopeCheckbox:n,name:r,checked:i,defaultChecked:s,required:l,disabled:o,value:d,onCheckedChange:c,form:u,...p}=e;return(0,t.jsx)(E,{__scopeCheckbox:n,checked:i,defaultChecked:s,disabled:o,required:l,onCheckedChange:c,name:r,form:u,value:d,internal_do_not_use_render:({isFormControl:e})=>(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(N,{...p,ref:a,__scopeCheckbox:n}),e&&(0,t.jsx)(R,{__scopeCheckbox:n})]})})});S.displayName=g;var D="CheckboxIndicator",_=a.forwardRef((e,a)=>{let{__scopeCheckbox:n,forceMount:r,...i}=e,s=j(D,n);return(0,t.jsx)(u.Presence,{present:r||w(s.checked)||!0===s.checked,children:(0,t.jsx)(x.span,{"data-state":I(s.checked),"data-disabled":s.disabled?"":void 0,...i,ref:a,style:{pointerEvents:"none",...e.style}})})});_.displayName=D;var A="CheckboxBubbleInput",R=a.forwardRef(({__scopeCheckbox:e,...n},i)=>{let{control:s,hasConsumerStoppedPropagationRef:l,checked:o,defaultChecked:u,required:p,disabled:h,name:f,value:m,form:g,bubbleInput:v,setBubbleInput:b}=j(A,e),y=r(i,b),E=(0,d.usePrevious)(o),C=(0,c.useSize)(s);a.useEffect(()=>{if(!v)return;let e=Object.getOwnPropertyDescriptor(window.HTMLInputElement.prototype,"checked").set,t=!l.current;if(E!==o&&e){let a=new Event("click",{bubbles:t});v.indeterminate=w(o),e.call(v,!w(o)&&o),v.dispatchEvent(a)}},[v,E,o,l]);let N=a.useRef(!w(o)&&o);return(0,t.jsx)(x.input,{type:"checkbox","aria-hidden":!0,defaultChecked:u??N.current,required:p,disabled:h,name:f,value:m,form:g,...n,tabIndex:-1,ref:y,style:{...n.style,...C,position:"absolute",pointerEvents:"none",opacity:0,margin:0,transform:"translateX(-100%)"}})});function w(e){return"indeterminate"===e}function I(e){return w(e)?"indeterminate":e?"checked":"unchecked"}R.displayName=A,e.s(["Checkbox",0,S,"CheckboxIndicator",0,_,"Indicator",0,_,"Root",0,S,"createCheckboxScope",0,b,"unstable_BubbleInput",0,R,"unstable_CheckboxBubbleInput",0,R,"unstable_CheckboxProvider",0,E,"unstable_CheckboxTrigger",0,N,"unstable_Provider",0,E,"unstable_Trigger",0,N],388474);var O=e.i(388474),O=O,T=e.i(975157),k=e.i(593698);e.s(["Checkbox",0,function({className:e,...a}){return(0,t.jsx)(O.Root,{"data-slot":"checkbox",className:(0,T.cn)("peer relative flex size-4 shrink-0 items-center justify-center rounded-[4px] border border-input transition-colors outline-none group-has-disabled/field:opacity-50 after:absolute after:-inset-x-3 after:-inset-y-2 focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 aria-invalid:aria-checked:border-primary dark:bg-input/30 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 data-checked:border-primary data-checked:bg-primary data-checked:text-primary-foreground dark:data-checked:bg-primary",e),...a,children:(0,t.jsx)(O.Indicator,{"data-slot":"checkbox-indicator",className:"grid place-content-center text-current transition-none [&>svg]:size-3.5",children:(0,t.jsx)(k.CheckIcon,{})})})}],59497)},77071,e=>{"use strict";let t=(0,e.i(456420).default)("plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]);e.s(["Plus",0,t],77071)},776639,e=>{"use strict";var t=e.i(843476),a=e.i(560964),n=e.i(964053),r=e.i(519455),i=e.i(975157);function s({...e}){return(0,t.jsx)(n.Dialog.Portal,{"data-slot":"dialog-portal",...e})}function l({className:e,...a}){return(0,t.jsx)(n.Dialog.Overlay,{className:(0,i.cn)("fixed inset-0 isolate z-50 bg-black/10 duration-100 supports-backdrop-filter:backdrop-blur-xs data-open:animate-in data-open:fade-in-0 data-closed:animate-out data-closed:fade-out-0",e),"data-slot":"dialog-overlay",...a})}e.s(["Dialog",0,function({...e}){return(0,t.jsx)(n.Dialog.Root,{"data-slot":"dialog",...e})},"DialogContent",0,function({className:e,children:o,showCloseButton:d=!0,...c}){return(0,t.jsxs)(s,{children:[(0,t.jsx)(l,{}),(0,t.jsxs)(n.Dialog.Content,{className:(0,i.cn)("fixed top-1/2 left-1/2 z-50 grid max-h-[85dvh] w-full max-w-[calc(100%-2rem)] -translate-x-1/2 -translate-y-1/2 gap-4 overflow-y-auto rounded-xl bg-popover p-4 text-sm text-popover-foreground ring-1 ring-foreground/10 duration-100 outline-none sm:max-w-sm data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95",e),"data-slot":"dialog-content",...c,children:[o,d&&(0,t.jsx)(n.Dialog.Close,{asChild:!0,"data-slot":"dialog-close",children:(0,t.jsxs)(r.Button,{className:"absolute top-2 right-2",size:"icon-sm",variant:"ghost",children:[(0,t.jsx)(a.XIcon,{}),(0,t.jsx)("span",{className:"sr-only",children:"Close"})]})})]})]})},"DialogDescription",0,function({className:e,...a}){return(0,t.jsx)(n.Dialog.Description,{className:(0,i.cn)("text-sm text-muted-foreground *:[a]:underline *:[a]:underline-offset-3 *:[a]:hover:text-foreground",e),"data-slot":"dialog-description",...a})},"DialogFooter",0,function({className:e,showCloseButton:a=!1,children:s,...l}){return(0,t.jsxs)("div",{className:(0,i.cn)("-mx-4 -mb-4 flex flex-col-reverse gap-2 rounded-b-xl border-t bg-muted/50 p-4 sm:flex-row sm:justify-end",e),"data-slot":"dialog-footer",...l,children:[s,a&&(0,t.jsx)(n.Dialog.Close,{asChild:!0,children:(0,t.jsx)(r.Button,{variant:"outline",children:"Close"})})]})},"DialogHeader",0,function({className:e,...a}){return(0,t.jsx)("div",{className:(0,i.cn)("flex flex-col gap-2",e),"data-slot":"dialog-header",...a})},"DialogTitle",0,function({className:e,...a}){return(0,t.jsx)(n.Dialog.Title,{className:(0,i.cn)("font-heading text-base leading-none font-medium",e),"data-slot":"dialog-title",...a})}])},986253,e=>{"use strict";let t=(0,e.i(456420).default)("chevron-right",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);e.s(["default",0,t])},867927,e=>{"use strict";var t=e.i(986253);e.s(["ChevronRight",()=>t.default])},515281,e=>{"use strict";let t=(0,e.i(456420).default)("pencil",[["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",key:"1a8usu"}],["path",{d:"m15 5 4 4",key:"1mk7zo"}]]);e.s(["Pencil",0,t],515281)},768877,e=>{"use strict";let t=(0,e.i(456420).default)("arrow-right",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]]);e.s(["ArrowRight",0,t],768877)},434719,e=>{"use strict";let t=String.raw`\b([A-Z][A-Z0-9_]*-\d+)\b`;e.s(["DEFAULT_JIRA_BRANCH_REGEX",0,t,"DEFAULT_WORKTREE_FETCH_INTERVAL_SECONDS",0,300,"MAX_WORKTREE_FETCH_INTERVAL_SECONDS",0,86400,"MIN_WORKTREE_FETCH_INTERVAL_SECONDS",0,60,"WORKTREE_BRANCH_JOB_KIND",0,"worktree.branch","WORKTREE_DELETE_JOB_KIND",0,"worktree.delete","WORKTREE_INSPECT_JOB_KIND",0,"worktree.inspect","WORKTREE_MOVE_CHECKOUT_JOB_KIND",0,"worktree.move.checkout","WORKTREE_MOVE_PUSH_JOB_KIND",0,"worktree.move.push","WORKTREE_OPERATION_JOB_KIND",0,"worktree.operation","WORKTREE_WATCH_JOB_KIND",0,"worktree.watch"])},421645,e=>{"use strict";e.s(["CODEBASE_BROWSE_JOB_KIND",0,"codebase.browse","CODEBASE_FETCH_JOB_KIND",0,"codebase.fetch","CODEBASE_GIT_INSPECT_JOB_KIND",0,"codebase.git.inspect","CODEBASE_GIT_OPERATION_JOB_KIND",0,"codebase.git.operation","CODEBASE_INSPECT_JOB_KIND",0,"codebase.inspect","CODEBASE_RECONCILE_EVENT_CAPABILITY",0,"codebase.reconcile.requested","CODEBASE_REFRESH_JOB_KIND",0,"codebase.refresh","DEFAULT_CODEBASE_RECONCILE_INTERVAL_SECONDS",0,30,"MAX_CODEBASE_RECONCILE_INTERVAL_SECONDS",0,3600,"MIN_CODEBASE_RECONCILE_INTERVAL_SECONDS",0,10])},874801,e=>{"use strict";var t=e.i(843476),a=e.i(867927),n=e.i(456420);let r=(0,n.default)("folder",[["path",{d:"M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z",key:"1kt360"}]]),i=(0,n.default)("folder-check",[["path",{d:"M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z",key:"1kt360"}],["path",{d:"m9 13 2 2 4-4",key:"6343dt"}]]);var s=e.i(902434),s=s,l=e.i(948148),o=e.i(271645),d=e.i(929592),c=e.i(519455),u=e.i(59497),p=e.i(110204),h=e.i(987968),f=e.i(462777),m=e.i(637611);e.s(["AgentDirectoryBrowser",0,function({agentId:e,browseLabel:n,disabled:x=!1,initialPath:g=null,onPathChange:v,onSelect:b,selectIcon:y,selectLabel:j}){var E;let C=(0,l.useTranslations)("codebases"),[N,S]=(0,o.useState)(null),[D,_]=(0,o.useState)(!1),[A,R]=(0,o.useState)(!1),[w,I]=(0,o.useState)(null),O=(0,o.useRef)(0),T=(0,o.useCallback)(async t=>{let a=++O.current;R(!0);try{let n=await (0,m.controlPlaneRequest)(`mutation BrowseAgentDirectory($input: BrowseAgentDirectoryInput!) {
2
2
  browseAgentDirectory(input: $input) {
3
3
  path parentPath homePath truncated entries { name path hidden }
4
4
  }
@@ -0,0 +1,99 @@
1
+ (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,942230,455329,756283,e=>{"use strict";var t=e.i(843476),a=e.i(861745),r=e.i(948148),s=e.i(487486),n=e.i(784774),i=e.i(975157);function l({label:e,additions:a,deletions:r}){return(0,t.jsxs)("span",{className:"inline-flex items-center gap-1 whitespace-nowrap text-muted-foreground",children:[(0,t.jsx)("span",{children:e}),(0,t.jsx)(o,{additions:a,deletions:r})]})}function o({additions:e,deletions:a}){return null===e&&null===a?(0,t.jsx)("span",{className:"text-muted-foreground",children:"—"}):(0,t.jsxs)("span",{className:"inline-flex gap-1 tabular-nums",children:[(0,t.jsxs)("span",{className:"text-emerald-700 dark:text-emerald-400",children:["+",e??0]}),(0,t.jsxs)("span",{className:"text-red-700 dark:text-red-400",children:["−",a??0]})]})}e.s(["WorktreeDetailPanel",0,function({detail:e,inline:d=!1}){let c=(0,r.useTranslations)("worktrees"),u=(0,a.useLocale)();return(0,t.jsxs)("div",{className:(0,i.cn)("w-full space-y-4",d&&"border-t pt-4"),"data-testid":"worktree-detail","data-worktree-navigation-ignore":d?"true":void 0,children:[(0,t.jsxs)("section",{className:"w-full",children:[(0,t.jsx)("h2",{className:"mb-2 font-medium",children:c("changes",{count:e.changes.length})}),(0,t.jsx)("div",{className:(0,i.cn)("overflow-auto rounded-md border",d&&"max-h-80"),children:e.changes.length?(0,t.jsx)(n.Table,{"aria-label":c("changes",{count:e.changes.length}),className:"min-w-[36rem] table-fixed text-xs",children:(0,t.jsx)(n.TableBody,{children:e.changes.map(e=>(0,t.jsxs)(n.TableRow,{children:[(0,t.jsx)(n.TableCell,{className:"max-w-0 px-2 py-1.5 font-mono",children:(0,t.jsx)("span",{className:"block truncate",title:e.path,children:e.path})}),(0,t.jsx)(n.TableCell,{className:"w-px px-2 py-1.5",children:(0,t.jsxs)("div",{className:"flex items-center justify-end gap-2",children:[e.conflicted&&(0,t.jsx)(s.Badge,{className:"px-1.5",variant:"destructive",children:c("conflicted")}),e.staged&&(0,t.jsx)(l,{additions:e.stagedAdditions,deletions:e.stagedDeletions,label:c("staged")}),e.unstaged&&(0,t.jsx)(l,{additions:e.unstagedAdditions,deletions:e.unstagedDeletions,label:c("unstaged")}),e.untracked&&(0,t.jsx)(l,{additions:e.unstagedAdditions,deletions:e.unstagedDeletions,label:c("untracked")})]})})]},e.path))})}):(0,t.jsx)("p",{className:"p-3 text-sm text-muted-foreground",children:c("noChanges")})})]}),(0,t.jsxs)("section",{className:"w-full",children:[(0,t.jsx)("h2",{className:"mb-2 font-medium",children:c("commits",{count:e.commits.length})}),(0,t.jsx)("div",{className:(0,i.cn)("overflow-auto rounded-md border",d&&"max-h-80"),children:e.commits.length?(0,t.jsx)(n.Table,{"aria-label":c("commits",{count:e.commits.length}),className:"min-w-[36rem] table-fixed text-xs",children:(0,t.jsx)(n.TableBody,{children:e.commits.map(e=>(0,t.jsxs)(n.TableRow,{children:[(0,t.jsx)(n.TableCell,{className:"w-24 px-2 py-1.5 font-mono text-muted-foreground",children:e.sha.slice(0,8)}),(0,t.jsx)(n.TableCell,{className:"max-w-0 px-2 py-1.5",children:(0,t.jsxs)("div",{className:"flex min-w-0 items-baseline gap-2",children:[(0,t.jsx)("span",{className:"truncate font-medium",children:e.subject}),(0,t.jsxs)("span",{className:"shrink-0 text-muted-foreground",children:[e.authorName," ·"," ",new Date(e.authoredAt).toLocaleString(u)]})]})}),(0,t.jsx)(n.TableCell,{className:"w-24 px-2 py-1.5 text-right",children:(0,t.jsx)(o,{additions:e.additions,deletions:e.deletions})})]},e.sha))})}):(0,t.jsx)("p",{className:"p-3 text-sm text-muted-foreground",children:c("noCommits")})})]}),(e.commitsTruncated||e.changesTruncated)&&(0,t.jsx)("p",{className:"text-xs text-muted-foreground",children:c("truncated")})]})}],942230);let d=`
2
+ id codebaseId gitDirectory folder relativePath primary branch headSha upstream ahead behind syncState
3
+ baseBranch baseBranchOverride baseAhead baseBehind hasStagedChanges hasUnstagedChanges highlightColor availability statusError
4
+ pushStatus
5
+ ticketKey ticketTitle ticketStatus lastCheckedAt missingAt createdAt updatedAt
6
+ tags { id name color createdAt updatedAt }
7
+ activeJob { id agentId kind payload status idempotencyKey result error timeoutSeconds createdAt startedAt finishedAt updatedAt }
8
+ pullRequest { id number title url repositoryGithubId repositoryNameWithOwner repositoryUrl labels jiraKey pipelineStatus pipelines { id name status url checkSuiteId canRetry retryUnavailableReason jobs { id name status url canRetry retryUnavailableReason steps { number name status } } } reviewDecision unresolvedReviewThreadCount createdAt }
9
+ latestBuild {
10
+ id status action destinationType destination outOfDate createdAt
11
+ artifacts { id kind }
12
+ }
13
+ `,c=`
14
+ id folder observedOrigin branch headSha upstream ahead behind syncState availability statusError
15
+ defaultBranch localBranches remoteBranches lastCheckedAt lastFetchedAt lastFetchAttemptAt lastFetchError createdAt updatedAt
16
+ `,u=`mutation InspectWorktree($id: ID!, $requestId: ID!) {
17
+ inspectWorktree(id: $id, requestId: $requestId) {
18
+ commits { sha subject authorName authoredAt additions deletions }
19
+ changes { path staged unstaged untracked conflicted stagedAdditions stagedDeletions unstagedAdditions unstagedDeletions }
20
+ commitsTruncated changesTruncated
21
+ }
22
+ }`;e.s(["CODEBASE_FIELDS",0,c,"INSPECT_WORKTREE_MUTATION",0,u,"WORKTREE_FIELDS",0,d],455329);var h=e.i(271645),g=e.i(462777),p=e.i(637611);async function m(e){return(await (0,p.controlPlaneRequest)(u,{id:e,requestId:(0,g.createClientId)()})).inspectWorktree}e.s(["inspectWorktree",0,m,"useLiveWorktree",0,function(e){let[t,a]=(0,h.useState)(null),r=(0,h.useCallback)(t=>{a(a=>({sourceUpdatedAt:e.updatedAt,value:a?.sourceUpdatedAt===e.updatedAt?{...a.value,...t}:t}))},[e.updatedAt]),s=(0,h.useCallback)(e=>{let t={};null!==e.hasStagedChanges&&(t.hasStagedChanges=e.hasStagedChanges),null!==e.hasUnstagedChanges&&(t.hasUnstagedChanges=e.hasUnstagedChanges),null!==e.pushStatus&&(t.pushStatus=e.pushStatus),"string"==typeof e.headSha&&Object.assign(t,{branch:e.branch,headSha:e.headSha,upstream:e.upstream,ahead:e.ahead,behind:e.behind,syncState:e.syncState??"UNKNOWN",baseAhead:e.baseAhead,baseBehind:e.baseBehind}),Object.keys(t).length&&r(t)},[r]);return{worktree:t?.sourceUpdatedAt===e.updatedAt?{...e,...t.value}:e,applyActivity:s,setUnstagedChanges:(0,h.useCallback)(e=>r({hasUnstagedChanges:e}),[r])}},"useQueuedWorktreeInspection",0,function(e){let t=(0,h.useRef)(!1),a=(0,h.useRef)(!1);return(0,h.useCallback)(async()=>{if(t.current){a.current=!0;return}t.current=!0;try{do a.current=!1,await e();while(a.current)}finally{t.current=!1}},[e])},"useWorktreeActivitySubscription",0,function(e,t,a){let r=(0,h.useRef)(a);(0,h.useEffect)(()=>{r.current=a},[a]),(0,h.useEffect)(()=>{if(!t)return;let a=!1,s=0,n=null,i=()=>void 0,l=e=>{a||e!==s||null!==n||(n=window.setTimeout(()=>{n=null,o()},1e3))},o=()=>{let t=++s;i=(0,p.controlPlaneSubscriptions)().subscribe({query:`subscription WorktreeInspectionChanged($worktreeId: ID!) {
23
+ worktreeInspectionChanged(worktreeId: $worktreeId) {
24
+ worktreeId branch headSha upstream ahead behind syncState baseAhead baseBehind
25
+ hasStagedChanges hasUnstagedChanges pushStatus observedAt
26
+ }
27
+ }`,variables:{worktreeId:e}},{next:e=>{let t=e.data?.worktreeInspectionChanged;t&&r.current(t)},error:()=>l(t),complete:()=>l(t)})};return o(),()=>{a=!0,s+=1,null!==n&&window.clearTimeout(n),i()}},[t,e])}],756283)},635416,96892,939050,506184,868401,448295,e=>{"use strict";var t=e.i(456420);let a=(0,t.default)("arrow-down",[["path",{d:"M12 5v14",key:"s699le"}],["path",{d:"m19 12-7 7-7-7",key:"1idqje"}]]);e.s(["ArrowDown",0,a],635416);let r=(0,t.default)("arrow-up",[["path",{d:"m5 12 7-7 7 7",key:"hav0vg"}],["path",{d:"M12 19V5",key:"x0mq9r"}]]);e.s(["ArrowUp",0,r],96892);let s=(0,t.default)("move-right",[["path",{d:"M18 8L22 12L18 16",key:"1r0oui"}],["path",{d:"M2 12H22",key:"1m8cig"}]]);e.s(["MoveRight",0,s],939050);let n=(0,t.default)("paintbrush",[["path",{d:"m14.622 17.897-10.68-2.913",key:"vj2p1u"}],["path",{d:"M18.376 2.622a1 1 0 1 1 3.002 3.002L17.36 9.643a.5.5 0 0 0 0 .707l.944.944a2.41 2.41 0 0 1 0 3.408l-.944.944a.5.5 0 0 1-.707 0L8.354 7.348a.5.5 0 0 1 0-.707l.944-.944a2.41 2.41 0 0 1 3.408 0l.944.944a.5.5 0 0 0 .707 0z",key:"18tc5c"}],["path",{d:"M9 8c-1.804 2.71-3.97 3.46-6.583 3.948a.507.507 0 0 0-.302.819l7.32 8.883a1 1 0 0 0 1.185.204C12.735 20.405 16 16.792 16 15",key:"ytzfxy"}]]);e.s(["Paintbrush",0,n],506184);let i=(0,t.default)("tags",[["path",{d:"M13.172 2a2 2 0 0 1 1.414.586l6.71 6.71a2.4 2.4 0 0 1 0 3.408l-4.592 4.592a2.4 2.4 0 0 1-3.408 0l-6.71-6.71A2 2 0 0 1 6 9.172V3a1 1 0 0 1 1-1z",key:"16rjxf"}],["path",{d:"M2 7v6.172a2 2 0 0 0 .586 1.414l6.71 6.71a2.4 2.4 0 0 0 3.191.193",key:"178nd4"}],["circle",{cx:"10.5",cy:"6.5",r:".5",fill:"currentColor",key:"12ikhr"}]]);e.s(["Tags",0,i],868401);var l=e.i(843476),o=e.i(93384),d=e.i(741120),c=e.i(948148),u=e.i(271645),h=e.i(929592),g=e.i(487486),p=e.i(519455),m=e.i(515288),x=e.i(59497),b=e.i(776639),j=e.i(793479),v=e.i(110204),f=e.i(337822),w=e.i(967489),k=e.i(987968),y=e.i(624687),S=e.i(520133),C=e.i(462777),I=e.i(637611),T=e.i(920950);let N=`
28
+ id type
29
+ configurations {
30
+ id name iconKey scheme buildConfiguration defaultAction advancedSettings createdAt updatedAt
31
+ source { id kind relativePath }
32
+ observation { id scopeKey status schemes configurations testPlans error stale headSha xcodeVersion lastParseAttemptAt lastParsedAt }
33
+ }
34
+ allowedScripts {
35
+ position
36
+ script { id name preBuildScript postBuildScript enabledByDefault timeoutSeconds failureBehavior }
37
+ }
38
+ `,A=`
39
+ id scopeKey status schemes configurations testPlans error stale headSha xcodeVersion lastParseAttemptAt lastParsedAt
40
+ `,E=["BUILD","TEST","ANALYZE","ARCHIVE","BUILD_FOR_TESTING","TEST_WITHOUT_BUILDING"];function D({codebaseId:e,worktreeId:t,open:a,onOpenChange:r,onStarted:s}){let n=(0,c.useTranslations)("builds"),[i,o]=(0,u.useState)(null),[f,S]=(0,u.useState)([]),[B,R]=(0,u.useState)(""),[L,W]=(0,u.useState)("BUILD"),[P,_]=(0,u.useState)({}),[$,O]=(0,u.useState)([]),[M,U]=(0,u.useState)("SIMULATOR"),[q,F]=(0,u.useState)(""),[H,V]=(0,u.useState)(new Set),[G,z]=(0,u.useState)({}),[K,J]=(0,u.useState)("{}"),[Y,Q]=(0,u.useState)(!0),[X,Z]=(0,u.useState)(!1),[ee,et]=(0,u.useState)(!1),[ea,er]=(0,u.useState)(null),es=i?.configurations.find(e=>e.id===B),en=es?P[es.id]??es.observation:null;(0,u.useEffect)(()=>{let a=!1;return(0,I.controlPlaneRequest)(`query StartBuildProject($codebaseId: ID!, $worktreeId: ID!) {
41
+ iosAppProject(codebaseId: $codebaseId) { ${N} }
42
+ builds(first: 50, status: SUCCEEDED, worktreeId: $worktreeId) {
43
+ items { id action destinationType snapshot createdAt }
44
+ }
45
+ }`,{codebaseId:e,worktreeId:t}).then(e=>{if(a)return;o(e.iosAppProject),S(e.builds.items);let t=e.iosAppProject?.configurations[0];t&&(R(t.id),W(t.defaultAction),z(t.advancedSettings??{}),V(new Set(e.iosAppProject.allowedScripts.filter(e=>e.script.enabledByDefault).map(e=>e.script.id))))}).catch(e=>er(e instanceof Error?e.message:String(e))).finally(()=>{a||Q(!1)}),()=>{a=!0}},[e,t]);let ei=(0,u.useMemo)(()=>f.filter(e=>{if("BUILD_FOR_TESTING"!==e.action||e.destinationType!==M)return!1;let t=e.snapshot.configuration,a="string"==typeof G.testPlan?G.testPlan:null,r=t?.advancedSettings?.testPlan;return t?.id===B&&(!a||!r||a===r)}),[G.testPlan,B,M,f]),el=ei.find(e=>e.id===G.priorBuildForTestingId)?.id??ei[0]?.id??null,eo=async(e,a)=>{Z(!0),er(null),O([]),F("");try{let r=await (0,I.controlPlaneRequest)(`mutation InspectStartBuildDestinations($input: InspectBuildDestinationsInput!) {
46
+ inspectBuildDestinations(input: $input)
47
+ }`,{input:{worktreeId:t,configurationId:e.id,action:a,requestId:(0,C.createClientId)()}});O(r.inspectBuildDestinations);let s="ARCHIVE"===a?"PHYSICAL_DEVICE":r.inspectBuildDestinations.some(e=>"SIMULATOR"===e.type)?"SIMULATOR":"PHYSICAL_DEVICE";U(s),F(r.inspectBuildDestinations.find(e=>e.type===s)?.id??"")}catch(e){er(e instanceof Error?e.message:String(e))}finally{Z(!1)}},ed=async e=>{Z(!0),er(null);try{let a=(await (0,I.controlPlaneRequest)(`mutation ReparseStartBuild($configurationId: ID!, $worktreeId: ID!, $requestId: ID!) {
48
+ reparseBuildConfiguration(configurationId: $configurationId, worktreeId: $worktreeId, requestId: $requestId) {
49
+ ${A}
50
+ }
51
+ }`,{configurationId:e.id,worktreeId:t,requestId:(0,C.createClientId)()})).reparseBuildConfiguration;if(_(t=>({...t,[e.id]:a})),"VALID"!==a.status)throw Error(a.error||n("configurationInvalid"));await eo(e,L)}catch(e){er(e instanceof Error?e.message:String(e))}finally{Z(!1)}};(0,u.useEffect)(()=>{if(!es||Y)return;let e=window.setTimeout(()=>void eo(es,L),0);return()=>window.clearTimeout(e)},[B,L,Y]);let ec=(0,u.useMemo)(()=>$.filter(e=>e.type===M),[$,M]),eu=$.find(e=>e.id===q),eh=es?`xcrun xcodebuild ${"PROJECT"===es.source.kind?`-project ${es.source.relativePath}`:"WORKSPACE"===es.source.kind?`-workspace ${es.source.relativePath}`:""} -scheme ${JSON.stringify(es.scheme)} -configuration ${JSON.stringify(es.buildConfiguration)} -destination ${JSON.stringify(eu?.name??"<destination>")} -hideShellScriptEnvironment ${L.toLowerCase().replaceAll("_","-")}${"TEST_WITHOUT_BUILDING"===L&&el?` \xb7 ${n("priorBuildSummary",{id:el})}`:""}`:"",eg=async()=>{if(es&&eu){et(!0),er(null);try{let e={};try{let t=JSON.parse(K);if(!t||"object"!=typeof t||Array.isArray(t))throw Error();e=t}catch{throw Error(n("overridesInvalid"))}let a=await (0,I.controlPlaneRequest)(`mutation StartIosBuild($input: StartBuildInput!) {
52
+ startBuild(input: $input) { id }
53
+ }`,{input:{worktreeId:t,configurationId:es.id,destination:eu,scriptIds:[...H],action:L,advancedSettings:{...G,buildSettingOverrides:e,..."TEST_WITHOUT_BUILDING"===L?{priorBuildForTestingId:el,priorTestProductsPath:null,priorXctestrunPath:null}:{}},requestId:(0,C.createClientId)()}});r(!1),s(a.startBuild.id)}catch(e){er(e instanceof Error?e.message:String(e))}finally{et(!1)}}};return(0,l.jsx)(b.Dialog,{onOpenChange:r,open:a,children:(0,l.jsxs)(b.DialogContent,{className:"sm:max-w-3xl",children:[(0,l.jsxs)(b.DialogHeader,{children:[(0,l.jsx)(b.DialogTitle,{children:n("startBuild")}),(0,l.jsx)(b.DialogDescription,{children:n("startBuildDescription")})]}),ea&&(0,l.jsx)(h.Alert,{variant:"destructive",children:(0,l.jsx)(h.AlertDescription,{children:ea})}),Y?(0,l.jsxs)("p",{className:"flex items-center gap-2 text-muted-foreground",children:[(0,l.jsx)(k.Spinner,{})," ",n("loading")]}):i?.configurations.length?(0,l.jsxs)("div",{className:"space-y-5",children:[(0,l.jsxs)("section",{className:"space-y-2",children:[(0,l.jsx)(v.Label,{children:n("configuration")}),(0,l.jsx)("div",{className:"grid gap-2 sm:grid-cols-2",children:i.configurations.map(e=>(0,l.jsxs)("button",{className:`rounded-xl border p-3 text-left transition-colors ${e.id===B?"border-primary bg-primary/5":"hover:bg-muted/50"}`,onClick:()=>{R(e.id),W(e.defaultAction),z(e.advancedSettings??{})},type:"button",children:[(0,l.jsxs)("div",{className:"flex items-center justify-between gap-2",children:[(0,l.jsxs)("span",{className:"flex items-center gap-2 font-medium",children:[(0,l.jsx)(T.ConfigurationIcon,{iconKey:e.iconKey}),e.name]}),(0,l.jsx)(g.Badge,{variant:"outline",children:((P[e.id]??e.observation)?.status??"UNPARSED").toLocaleLowerCase().split("_").filter(Boolean).map(e=>`${e.charAt(0).toLocaleUpperCase()}${e.slice(1)}`).join(" ")})]}),(0,l.jsxs)("p",{className:"mt-1 text-xs text-muted-foreground",children:[e.scheme," · ",e.buildConfiguration]})]},e.id))})]}),es&&(0,l.jsx)(m.Card,{children:(0,l.jsxs)(m.CardContent,{className:"space-y-2 text-sm",children:[(0,l.jsxs)("div",{className:"flex items-center justify-between gap-2",children:[(0,l.jsxs)("div",{children:[(0,l.jsx)("p",{className:"font-mono text-xs",children:es.source.relativePath}),(0,l.jsxs)("p",{className:"text-xs text-muted-foreground",children:[es.scheme," ·"," ",es.buildConfiguration]})]}),(0,l.jsxs)(p.Button,{disabled:X,onClick:()=>void ed(es),size:"sm",type:"button",variant:"outline",children:[X?(0,l.jsx)(k.Spinner,{}):(0,l.jsx)(d.RefreshCw,{})," ",n("reparse")]})]}),en?.error&&(0,l.jsx)("p",{className:"text-xs text-destructive",children:en.error})]})}),(0,l.jsxs)("div",{className:"grid gap-4 sm:grid-cols-3",children:[(0,l.jsxs)("div",{className:"space-y-2",children:[(0,l.jsx)(v.Label,{children:n("action")}),(0,l.jsxs)(w.Select,{onValueChange:e=>W(e),value:L,children:[(0,l.jsx)(w.SelectTrigger,{children:(0,l.jsx)(w.SelectValue,{})}),(0,l.jsx)(w.SelectContent,{children:E.map(e=>(0,l.jsx)(w.SelectItem,{value:e,children:n(`actions.${e}`)},e))})]})]}),(0,l.jsxs)("div",{className:"space-y-2",children:[(0,l.jsx)(v.Label,{children:n("destinationType")}),(0,l.jsxs)(w.Select,{disabled:"ARCHIVE"===L,onValueChange:e=>{U(e),F($.find(t=>t.type===e)?.id??"")},value:M,children:[(0,l.jsx)(w.SelectTrigger,{children:(0,l.jsx)(w.SelectValue,{})}),(0,l.jsxs)(w.SelectContent,{children:[(0,l.jsx)(w.SelectItem,{value:"SIMULATOR",children:n("simulator")}),(0,l.jsx)(w.SelectItem,{value:"PHYSICAL_DEVICE",children:n("physicalDevice")})]})]})]}),(0,l.jsxs)("div",{className:"space-y-2",children:[(0,l.jsx)(v.Label,{children:n("device")}),(0,l.jsxs)(w.Select,{disabled:X||!ec.length,onValueChange:F,value:q,children:[(0,l.jsx)(w.SelectTrigger,{children:(0,l.jsx)(w.SelectValue,{placeholder:n("selectDevice")})}),(0,l.jsx)(w.SelectContent,{children:ec.map(e=>(0,l.jsxs)(w.SelectItem,{value:e.id,children:[e.generic?"SIMULATOR"===e.type?n("anySimulator"):n("anyPhysicalDevice"):e.name,e.osVersion?` \xb7 ${e.osVersion}`:""]},e.id))})]})]})]}),"TEST_WITHOUT_BUILDING"===L&&(0,l.jsxs)("div",{className:"space-y-2",children:[(0,l.jsx)(v.Label,{children:n("priorBuildForTesting")}),(0,l.jsxs)(w.Select,{disabled:!ei.length,onValueChange:e=>z(t=>({...t,priorBuildForTestingId:e,priorTestProductsPath:null,priorXctestrunPath:null})),value:el??"",children:[(0,l.jsx)(w.SelectTrigger,{children:(0,l.jsx)(w.SelectValue,{placeholder:n("selectPriorBuildForTesting")})}),(0,l.jsx)(w.SelectContent,{children:ei.map(e=>(0,l.jsxs)(w.SelectItem,{value:e.id,children:[new Date(e.createdAt).toLocaleString()," ·"," ",e.id]},e.id))})]}),!ei.length&&(0,l.jsx)("p",{className:"text-xs text-destructive",children:n("noPriorBuildForTesting")})]}),["TEST","BUILD_FOR_TESTING","TEST_WITHOUT_BUILDING"].includes(L)&&(0,l.jsxs)("div",{className:"space-y-2",children:[(0,l.jsx)(v.Label,{children:n("testPlan")}),(0,l.jsxs)(w.Select,{onValueChange:e=>z(t=>({...t,testPlan:"__SCHEME_DEFAULT__"===e?null:e})),value:String(G.testPlan??"__SCHEME_DEFAULT__"),children:[(0,l.jsx)(w.SelectTrigger,{children:(0,l.jsx)(w.SelectValue,{})}),(0,l.jsxs)(w.SelectContent,{children:[(0,l.jsx)(w.SelectItem,{value:"__SCHEME_DEFAULT__",children:n("schemeDefaultTestPlan")}),"string"==typeof G.testPlan&&G.testPlan&&!en?.testPlans.includes(G.testPlan)&&(0,l.jsxs)(w.SelectItem,{value:G.testPlan,children:[G.testPlan," · ",n("savedValueUnavailable")]}),en?.testPlans.map(e=>(0,l.jsx)(w.SelectItem,{value:e,children:e},e))]})]})]}),i.allowedScripts.length>0&&(0,l.jsxs)("section",{className:"space-y-2",children:[(0,l.jsx)(v.Label,{children:n("scripts")}),(0,l.jsx)("div",{className:"grid gap-2 sm:grid-cols-2",children:i.allowedScripts.map(({script:e})=>(0,l.jsxs)("label",{className:"flex items-start gap-2 rounded-lg border p-2",children:[(0,l.jsx)(x.Checkbox,{checked:H.has(e.id),onCheckedChange:t=>{V(a=>{let r=new Set(a);return t?r.add(e.id):r.delete(e.id),r})}}),(0,l.jsxs)("span",{children:[(0,l.jsx)("span",{className:"block text-sm font-medium",children:e.name}),(0,l.jsxs)("span",{className:"text-xs text-muted-foreground",children:[e.preBuildScript?n("preBuild"):"",e.preBuildScript&&e.postBuildScript?" · ":"",e.postBuildScript?n("postBuild"):""]})]})]},e.id))})]}),(0,l.jsxs)("details",{className:"rounded-xl border p-3",children:[(0,l.jsx)("summary",{className:"cursor-pointer font-medium",children:n("advancedSettings")}),(0,l.jsxs)("div",{className:"mt-4 grid gap-4 sm:grid-cols-2",children:[(0,l.jsxs)("div",{className:"space-y-2",children:[(0,l.jsx)(v.Label,{htmlFor:"development-team",children:n("developmentTeam")}),(0,l.jsx)(j.Input,{id:"development-team",onChange:e=>z(t=>({...t,developmentTeam:e.target.value||null})),value:String(G.developmentTeam??"")})]}),(0,l.jsxs)("div",{className:"space-y-2",children:[(0,l.jsx)(v.Label,{children:n("packageResolution")}),(0,l.jsxs)(w.Select,{onValueChange:e=>z(t=>({...t,packageResolution:e})),value:String(G.packageResolution??"DEFAULT"),children:[(0,l.jsx)(w.SelectTrigger,{children:(0,l.jsx)(w.SelectValue,{})}),(0,l.jsx)(w.SelectContent,{children:["DEFAULT","RESOLVED_ONLY","SKIP_UPDATES","DISABLE_AUTOMATIC"].map(e=>(0,l.jsx)(w.SelectItem,{value:e,children:e},e))})]})]}),(0,l.jsxs)("label",{className:"flex items-center gap-2",children:[(0,l.jsx)(x.Checkbox,{checked:!!G.codeCoverage,onCheckedChange:e=>z(t=>({...t,codeCoverage:!!e}))}),n("codeCoverage")]}),(0,l.jsxs)("label",{className:"flex items-center gap-2",children:[(0,l.jsx)(x.Checkbox,{checked:!!G.allowProvisioningUpdates,onCheckedChange:e=>z(t=>({...t,allowProvisioningUpdates:!!e}))}),n("allowProvisioningUpdates")]}),(0,l.jsxs)("div",{className:"space-y-2 sm:col-span-2",children:[(0,l.jsx)(v.Label,{htmlFor:"build-setting-overrides",children:n("buildSettingOverrides")}),(0,l.jsx)(y.Textarea,{className:"font-mono text-xs",id:"build-setting-overrides",onChange:e=>J(e.target.value),rows:4,value:K})]})]})]}),(0,l.jsxs)("section",{className:"space-y-2",children:[(0,l.jsx)(v.Label,{children:n("commandPreview")}),(0,l.jsx)("pre",{className:"overflow-x-auto rounded-lg bg-muted p-3 text-xs whitespace-pre-wrap",children:eh})]})]}):(0,l.jsx)(h.Alert,{children:(0,l.jsx)(h.AlertDescription,{children:n("noConfigurations")})}),(0,l.jsxs)(b.DialogFooter,{children:[(0,l.jsx)(p.Button,{onClick:()=>r(!1),type:"button",variant:"outline",children:n("cancel")}),(0,l.jsxs)(p.Button,{disabled:Y||X||ee||!es||!eu||"TEST_WITHOUT_BUILDING"===L&&!el,onClick:()=>void eg(),type:"button",children:[ee&&(0,l.jsx)(k.Spinner,{})," ",n("startBuild")]})]})]})})}e.s(["StartBuildButton",0,function({codebaseId:e,worktreeId:t,disabled:a,disabledReason:r,buildSettingsHref:s,size:n="sm"}){let i=(0,c.useTranslations)("builds"),d=(0,S.useRouter)(),[h,g]=(0,u.useState)(!1),[m,x]=(0,u.useState)(!1),b=(0,u.useRef)(null),j=()=>{null!==b.current&&(window.clearTimeout(b.current),b.current=null)},v=()=>{j(),x(!0)},w=()=>{j(),b.current=window.setTimeout(()=>x(!1),150)};return(0,u.useEffect)(()=>()=>{null!==b.current&&window.clearTimeout(b.current)},[]),(0,l.jsxs)(l.Fragment,{children:[a&&s?(0,l.jsxs)(f.Popover,{onOpenChange:x,open:m,children:[(0,l.jsx)(f.PopoverAnchor,{asChild:!0,children:(0,l.jsxs)(p.Button,{"aria-disabled":"true","aria-expanded":m,"aria-haspopup":"dialog",className:"cursor-not-allowed opacity-50",onClick:v,onFocus:v,onMouseEnter:v,onMouseLeave:w,size:n,title:r??void 0,type:"button",children:[(0,l.jsx)(o.Hammer,{})," ",i("build")]})}),(0,l.jsx)(f.PopoverContent,{align:"start",className:"w-auto max-w-64 p-2 text-xs",onBlurCapture:w,onFocusCapture:j,onMouseEnter:j,onMouseLeave:w,onOpenAutoFocus:e=>e.preventDefault(),side:"top",children:(0,l.jsx)(S.Link,{className:"font-medium underline-offset-4 hover:underline",href:s,children:i("configureBuilds")})})]}):(0,l.jsxs)(p.Button,{disabled:a,onClick:()=>g(!0),size:n,title:r??void 0,type:"button",children:[(0,l.jsx)(o.Hammer,{})," ",i("build")]}),h&&(0,l.jsx)(D,{codebaseId:e,onOpenChange:g,onStarted:e=>d.push(`/builds/${e}`),open:h,worktreeId:t})]})}],448295)},267572,e=>{"use strict";var t=e.i(843476),a=e.i(271645),r=e.i(876561),s=e.i(635416),n=e.i(768877),i=e.i(96892),l=e.i(689664),o=e.i(716327),d=e.i(867927),c=e.i(452330),u=e.i(482022),h=e.i(269846),g=e.i(634398),p=e.i(851817),m=e.i(882505),x=e.i(648119),b=e.i(939050),j=e.i(506184),v=e.i(515281),f=e.i(77071),w=e.i(741120),k=e.i(395925),y=e.i(856522),S=e.i(566595),C=e.i(868401),I=e.i(573474),T=e.i(725981),N=e.i(861745),A=e.i(948148),E=e.i(778434),D=e.i(771777),B=e.i(866026),R=e.i(448295),L=e.i(346194),W=e.i(647776),P=e.i(948812),_=e.i(356505),$=e.i(929592),O=e.i(487486),M=e.i(519455),U=e.i(515288),q=e.i(59497),F=e.i(776639),H=e.i(755146),V=e.i(82612),G=e.i(793479),z=e.i(906197),K=e.i(110204),J=e.i(337822),Y=e.i(337355),Q=e.i(987968),X=e.i(967489),Z=e.i(784774),ee=e.i(808562),et=e.i(462777),ea=e.i(637611),er=e.i(975157),es=e.i(520133),en=e.i(284494),ei=e.i(942230),el=e.i(455329),eo=e.i(756283),ed=e.i(440289),ec=e.i(940276);let eu=["gray","stone","red","rose","orange","amber","yellow","lime","green","emerald","teal","cyan","sky","blue","indigo","violet","purple","fuchsia","pink"],eh="worktrees-layout",eg="__all__";function ep(e,t){return e.some(e=>("string"==typeof e||"number"==typeof e)&&String(e).toLocaleLowerCase().includes(t))}function em(e,t){let a=t.query.trim().toLocaleLowerCase();return a||t.agentId||t.repositoryId?e.flatMap(e=>{if(t.agentId&&e.agent.id!==t.agentId)return[];let r=a.length>0&&ep([e.agent.id,e.agent.name,e.agent.hostname],a),s=e.codebases.flatMap(e=>{if(t.repositoryId&&e.repository.id!==t.repositoryId)return[];let s=a.length>0&&ep([e.repository.id,e.repository.name,e.repository.description,e.repository.canonicalOrigin,e.repository.displayOrigin,e.codebase.id,e.codebase.folder,e.codebase.observedOrigin,e.codebase.branch,e.codebase.defaultBranch],a),n=!a||r||s?e.worktrees:e.worktrees.filter(e=>ep([e.id,e.branch,e.folder,e.relativePath,e.ticketKey,e.ticketTitle,e.ticketStatus,e.pullRequest?.number,e.pullRequest?.title,e.pullRequest?.repositoryNameWithOwner,e.pullRequest?.jiraKey,...e.tags.map(e=>e.name)],a));return n.length?[{...e,worktrees:n}]:[]});return s.length?[{...e,codebases:s}]:[]}):e}function ex(e,t){if(!t)return e;let a=/^[A-Za-z]:[\\/]/.test(t)||t.startsWith("\\\\"),r=a?"\\":"/",s=e=>a?e.replaceAll("/","\\"):e,n=e=>(a?/^[A-Za-z]:\\$/.test(e):"/"===e)?e:e.replace(/[\\/]+$/,""),i=n(s(t)),l=n(s(e)),o=a?i.toLocaleLowerCase():i,d=a?l.toLocaleLowerCase():l;if(d===o)return".";let c=i.endsWith(r)?i:`${i}${r}`,u=a?c.toLocaleLowerCase():c;return d.startsWith(u)?l.slice(c.length):e}function eb(e){return{hasChanges:e.hasStagedChanges||e.hasUnstagedChanges,stageOperation:e.hasStagedChanges&&!e.hasUnstagedChanges?"UNSTAGE_ALL":"STAGE_ALL"}}let ej={gray:"border-slate-500/30 bg-slate-500/10 hover:border-slate-500/50 hover:bg-slate-500/20",stone:"border-stone-500/30 bg-stone-500/10 hover:border-stone-500/50 hover:bg-stone-500/20",red:"border-red-500/30 bg-red-500/10 hover:border-red-500/50 hover:bg-red-500/20",rose:"border-rose-500/30 bg-rose-500/10 hover:border-rose-500/50 hover:bg-rose-500/20",orange:"border-orange-500/30 bg-orange-500/10 hover:border-orange-500/50 hover:bg-orange-500/20",amber:"border-amber-500/30 bg-amber-500/10 hover:border-amber-500/50 hover:bg-amber-500/20",yellow:"border-yellow-500/30 bg-yellow-500/10 hover:border-yellow-500/50 hover:bg-yellow-500/20",lime:"border-lime-500/30 bg-lime-500/10 hover:border-lime-500/50 hover:bg-lime-500/20",green:"border-green-500/30 bg-green-500/10 hover:border-green-500/50 hover:bg-green-500/20",emerald:"border-emerald-500/30 bg-emerald-500/10 hover:border-emerald-500/50 hover:bg-emerald-500/20",teal:"border-teal-500/30 bg-teal-500/10 hover:border-teal-500/50 hover:bg-teal-500/20",cyan:"border-cyan-500/30 bg-cyan-500/10 hover:border-cyan-500/50 hover:bg-cyan-500/20",sky:"border-sky-500/30 bg-sky-500/10 hover:border-sky-500/50 hover:bg-sky-500/20",blue:"border-blue-500/30 bg-blue-500/10 hover:border-blue-500/50 hover:bg-blue-500/20",indigo:"border-indigo-500/30 bg-indigo-500/10 hover:border-indigo-500/50 hover:bg-indigo-500/20",violet:"border-violet-500/30 bg-violet-500/10 hover:border-violet-500/50 hover:bg-violet-500/20",purple:"border-purple-500/30 bg-purple-500/10 hover:border-purple-500/50 hover:bg-purple-500/20",fuchsia:"border-fuchsia-500/30 bg-fuchsia-500/10 hover:border-fuchsia-500/50 hover:bg-fuchsia-500/20",pink:"border-pink-500/30 bg-pink-500/10 hover:border-pink-500/50 hover:bg-pink-500/20"},ev={gray:"border-slate-500/40 bg-slate-500/15 text-slate-700 dark:text-slate-300",stone:"border-stone-500/40 bg-stone-500/15 text-stone-700 dark:text-stone-300",red:"border-red-500/40 bg-red-500/15 text-red-700 dark:text-red-300",rose:"border-rose-500/40 bg-rose-500/15 text-rose-700 dark:text-rose-300",orange:"border-orange-500/40 bg-orange-500/15 text-orange-700 dark:text-orange-300",amber:"border-amber-500/40 bg-amber-500/15 text-amber-800 dark:text-amber-300",yellow:"border-yellow-500/40 bg-yellow-500/15 text-yellow-800 dark:text-yellow-300",lime:"border-lime-500/40 bg-lime-500/15 text-lime-800 dark:text-lime-300",green:"border-green-500/40 bg-green-500/15 text-green-700 dark:text-green-300",emerald:"border-emerald-500/40 bg-emerald-500/15 text-emerald-700 dark:text-emerald-300",teal:"border-teal-500/40 bg-teal-500/15 text-teal-700 dark:text-teal-300",cyan:"border-cyan-500/40 bg-cyan-500/15 text-cyan-700 dark:text-cyan-300",sky:"border-sky-500/40 bg-sky-500/15 text-sky-700 dark:text-sky-300",blue:"border-blue-500/40 bg-blue-500/15 text-blue-700 dark:text-blue-300",indigo:"border-indigo-500/40 bg-indigo-500/15 text-indigo-700 dark:text-indigo-300",violet:"border-violet-500/40 bg-violet-500/15 text-violet-700 dark:text-violet-300",purple:"border-purple-500/40 bg-purple-500/15 text-purple-700 dark:text-purple-300",fuchsia:"border-fuchsia-500/40 bg-fuchsia-500/15 text-fuchsia-700 dark:text-fuchsia-300",pink:"border-pink-500/40 bg-pink-500/15 text-pink-700 dark:text-pink-300"},ef={gray:"border-slate-600 bg-slate-500",stone:"border-stone-600 bg-stone-500",red:"border-red-600 bg-red-500",rose:"border-rose-600 bg-rose-500",orange:"border-orange-600 bg-orange-500",amber:"border-amber-600 bg-amber-500",yellow:"border-yellow-600 bg-yellow-500",lime:"border-lime-600 bg-lime-500",green:"border-green-600 bg-green-500",emerald:"border-emerald-600 bg-emerald-500",teal:"border-teal-600 bg-teal-500",cyan:"border-cyan-600 bg-cyan-500",sky:"border-sky-600 bg-sky-500",blue:"border-blue-600 bg-blue-500",indigo:"border-indigo-600 bg-indigo-500",violet:"border-violet-600 bg-violet-500",purple:"border-purple-600 bg-purple-500",fuchsia:"border-fuchsia-600 bg-fuchsia-500",pink:"border-pink-600 bg-pink-500"};function ew({moves:e,onReload:r,onError:s,onNotice:n}){let i=(0,A.useTranslations)("worktrees"),[l,o]=(0,a.useState)(null),d=async e=>{o(e.id);try{await (0,ea.controlPlaneRequest)(`mutation RetryWorktreeMove($id: ID!) {
54
+ retryWorktreeMoveWithStash(id: $id) { id status }
55
+ }`,{id:e.id});let t=await (0,ed.waitForWorktreeMove)(e.id);if("FAILED"===t.status)throw Error(t.error||i("moveFailed"));n("SUCCEEDED_WITH_WARNING"===t.status?t.warning||i("moveCompletedWithWarning"):i("moveCompleted")),s(null),await r()}catch(e){s(e instanceof Error?e.message:String(e))}finally{o(null)}},c=async e=>{o(e.id);try{await (0,ea.controlPlaneRequest)(`mutation CancelWorktreeMove($id: ID!) {
56
+ cancelWorktreeMove(id: $id) { id status }
57
+ }`,{id:e.id}),n(i("moveCancelled")),s(null),await r()}catch(e){s(e instanceof Error?e.message:String(e))}finally{o(null)}};return(0,t.jsx)("div",{className:"space-y-2",children:e.map(e=>(0,t.jsx)($.Alert,{children:(0,t.jsxs)($.AlertDescription,{className:"flex flex-wrap items-center justify-between gap-3",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)("p",{className:"font-medium",children:i("moveProgress",{branch:e.branch})}),(0,t.jsx)("p",{className:"text-muted-foreground",children:"AWAITING_STASH"===e.status?e.error||i("moveNeedsStash"):i(`moveStatus.${e.status}`)})]}),"AWAITING_STASH"===e.status?(0,t.jsxs)("div",{className:"flex gap-2",children:[(0,t.jsx)(M.Button,{disabled:l===e.id,onClick:()=>void c(e),size:"sm",variant:"outline",children:i("cancelMove")}),(0,t.jsxs)(M.Button,{disabled:l===e.id,onClick:()=>void d(e),size:"sm",children:[l===e.id&&(0,t.jsx)(Q.Spinner,{}),i("stashAndContinue")]})]}):(0,t.jsx)(Q.Spinner,{})]})},e.id))})}function ek(e,t){return{codebaseId:e.codebase.id,...t?{worktreeId:t.id}:{},defaultBranch:e.codebase.defaultBranch,currentBranch:t?.branch,currentBaseBranch:t?.baseBranch,localBranches:e.codebase.localBranches,remoteBranches:e.codebase.remoteBranches,unavailableBranches:e.worktrees.flatMap(e=>e.branch&&e.id!==t?.id?[e.branch]:[])}}function ey({overview:e,onCreated:r}){let s=(0,A.useTranslations)("worktrees"),n=e.agents.flatMap(e=>e.codebases.flatMap(t=>"ONLINE"===e.agent.connectionStatus&&e.agent.capabilities.includes("worktree.branch")&&"AVAILABLE"===t.codebase.availability&&!t.worktrees.some(e=>e.activeJob)?[{agentGroup:e,group:t}]:[])),[i,l]=(0,a.useState)(1===n.length?n[0].group.codebase.id:""),[o,d]=(0,a.useState)(!1),c=n.some(e=>e.group.codebase.id===i)?i:1===n.length?n[0].group.codebase.id:"",u=n.find(e=>e.group.codebase.id===c),h=n.map(({agentGroup:e,group:t})=>({value:t.codebase.id,label:`${t.repository.name} \xb7 ${e.agent.name}`,description:t.codebase.folder,keywords:`${t.repository.displayOrigin} ${e.agent.hostname}`})),g=async e=>{if(!u)throw Error(s("selectCodebase"));d(!0);try{let t=await (0,ea.controlPlaneRequest)(`mutation CreateWorktree($input: CreateWorktreeInput!) {
58
+ createWorktree(input: $input) { id }
59
+ }`,{input:{codebaseId:u.group.codebase.id,selection:e,requestId:(0,et.createClientId)()}});await (0,ed.waitForWorktreeJob)(t.createWorktree.id),await r()}finally{d(!1)}};return(0,t.jsxs)(U.Card,{children:[(0,t.jsx)(U.CardHeader,{className:"border-b",children:(0,t.jsxs)(U.CardTitle,{className:"flex items-center gap-2",children:[(0,t.jsx)(f.Plus,{})," ",s("createWorktree")]})}),(0,t.jsxs)(U.CardContent,{className:"space-y-4",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)(K.Label,{className:"mb-1.5 block",children:s("repositoryCheckout")}),(0,t.jsx)(Y.SearchableSelect,{ariaLabel:s("repositoryCheckout"),disabled:o||0===h.length,emptyMessage:s("noEligibleCodebases"),onValueChange:l,options:h,placeholder:s("selectCodebase"),searchPlaceholder:s("searchCodebases"),value:c})]}),u?(0,t.jsx)(en.WorktreeBranchForm,{busy:o,onSubmit:g,submitLabel:s("createWorktree"),target:ek(u.group)},u.group.codebase.id):(0,t.jsx)("p",{className:"text-sm text-muted-foreground",children:h.length?s("selectCodebaseHelp"):s("noEligibleCodebases")})]})]})}function eS({agentGroup:e,layout:a,allTags:r,editorVariant:s,inspectionRefreshToken:n,onReload:i,onUpdate:l,onError:o,onManageTags:d,onOpenTicket:c,overview:u}){let h=(0,A.useTranslations)("worktrees"),g="ONLINE"===e.agent.connectionStatus&&e.agent.capabilities.includes("worktree.watch"),p="ONLINE"===e.agent.connectionStatus&&e.agent.capabilities.includes("worktree.branch");return(0,t.jsxs)("section",{className:"space-y-4",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2 border-b pb-2",children:[(0,t.jsx)("h2",{className:"text-lg font-semibold",children:e.agent.name}),(0,t.jsx)(O.Badge,{children:h("ONLINE"===e.agent.connectionStatus?"online":"offline")}),(0,t.jsx)("span",{className:"text-xs text-muted-foreground",children:e.agent.hostname})]}),e.codebases.map(h=>(0,t.jsxs)("section",{className:"space-y-3",children:[(0,t.jsxs)("div",{className:"flex flex-wrap items-center justify-between gap-3",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)("h3",{className:"font-medium",children:h.repository.name}),(0,t.jsx)("p",{className:"font-mono text-xs text-muted-foreground",children:h.repository.displayOrigin})]}),(0,t.jsx)(eC,{codebase:h.codebase})]}),"cards"===a?(0,t.jsx)("div",{className:"space-y-3",children:h.worktrees.map(a=>(0,t.jsx)(eI,{allTags:r,baseRepoDirectory:e.agent.baseRepoDirectory,branchManagementEnabled:p,editorVariant:s,group:h,inspectionRefreshToken:n,liveUpdatesEnabled:g,onError:o,onManageTags:d,onOpenTicket:c,onReload:i,onUpdate:l,overview:u,worktree:a},a.id))}):(0,t.jsx)(eH,{allTags:r,baseRepoDirectory:e.agent.baseRepoDirectory,branchManagementEnabled:p,editorVariant:s,group:h,inspectionRefreshToken:n,liveUpdatesEnabled:g,onError:o,onManageTags:d,onOpenTicket:c,onReload:i,onUpdate:l,overview:u})]},h.codebase.id))]})}function eC({codebase:e}){let r=(0,A.useTranslations)("worktrees"),s=(0,N.useLocale)(),[n,i]=(0,a.useState)(null);(0,a.useEffect)(()=>{let e=()=>i(new Date().getTime()),t=window.setTimeout(e,0),a=window.setInterval(e,1e3);return()=>{window.clearTimeout(t),window.clearInterval(a)}},[]);let l=e.lastFetchedAt&&null!==n?Math.max(0,n-new Date(e.lastFetchedAt).getTime()):null,o=null===l?r("neverFetched"):l<6e4?r("secondsAgo",{count:Math.floor(l/1e3)}):new Intl.RelativeTimeFormat(s,{numeric:"auto"}).format(-Math.floor(l/6e4),"minute");return(0,t.jsx)("span",{className:(0,er.cn)("text-xs text-muted-foreground",e.lastFetchError&&"text-destructive"),title:e.lastFetchError??void 0,children:r("lastFetched",{value:o})})}function eI(e){let{inspectionRefreshToken:r,onError:s}=e,{worktree:n,applyActivity:i,setUnstagedChanges:l}=(0,eo.useLiveWorktree)(e.worktree),c={...e,worktree:n},[u,h]=(0,a.useState)(!1),[g,p]=(0,a.useState)(null),[m,x]=(0,a.useState)(!1),b=(0,a.useRef)(0),j=(0,a.useRef)(r),v=(0,A.useTranslations)("worktrees"),f=(0,es.useRouter)(),w=(0,a.useCallback)(async()=>{let e=++b.current;x(!0);try{let t=await (0,eo.inspectWorktree)(n.id);if(e!==b.current)return;p(t),l(t.changes.some(e=>e.unstaged||e.untracked||e.conflicted)),s(null)}catch(t){e===b.current&&s(t instanceof Error?t.message:String(t))}finally{e===b.current&&x(!1)}},[s,l,n.id]),k=(0,eo.useQueuedWorktreeInspection)(w),y=(0,a.useCallback)(e=>{i(e),u&&k()},[i,u,k]);(0,eo.useWorktreeActivitySubscription)(n.id,e.liveUpdatesEnabled&&"AVAILABLE"===n.availability,y),(0,a.useEffect)(()=>{if(j.current===r||(j.current=r,!u))return;let e=window.setTimeout(()=>void k(),0);return()=>window.clearTimeout(e)},[u,r,k]);let S=()=>{let e=!u;h(e),e&&!g&&k()};return(0,t.jsxs)(U.Card,{className:(0,er.cn)("cursor-pointer transition-colors hover:bg-muted/30",n.highlightColor&&ej[n.highlightColor]),onClick:e=>{(0,ec.shouldNavigateWorktreeSurface)(e)&&f.push((0,ec.worktreeDetailHref)(n.id))},children:[(0,t.jsxs)(U.CardHeader,{className:"grid-cols-1! border-b @md/card-header:grid-cols-[minmax(0,1fr)_auto]!",children:[(0,t.jsxs)(U.CardTitle,{className:"min-w-0",children:[(0,t.jsxs)(M.Button,{"aria-expanded":u,className:"h-auto w-full max-w-full justify-start gap-1 p-1 text-left",onClick:()=>void S(),variant:"ghost",children:[u?(0,t.jsx)(o.ChevronDown,{}):(0,t.jsx)(d.ChevronRight,{}),(0,t.jsx)("span",{className:"truncate font-mono",children:n.branch??n.headSha?.slice(0,10)??v("detached")})]}),(n.ticketKey||n.ticketTitle)&&(0,t.jsx)(eN,{...c})]}),(0,t.jsxs)(U.CardAction,{className:"col-start-1 row-span-1 row-start-auto flex max-w-full flex-wrap items-center justify-start gap-1 justify-self-start @md/card-header:col-start-2 @md/card-header:row-span-2 @md/card-header:row-start-1 @md/card-header:justify-end @md/card-header:justify-self-end",children:[(0,t.jsx)(eP,{worktree:n}),n.hasUnstagedChanges&&(0,t.jsx)(O.Badge,{variant:"destructive",children:v("dirty")}),(0,t.jsx)(eT,{worktree:n}),(0,t.jsx)(eO,{...c})]})]}),(0,t.jsxs)(U.CardContent,{className:"space-y-4",children:[(0,t.jsx)(eA,{...c,detailsExpanded:u,onToggleDetails:S}),m&&(0,t.jsxs)("p",{className:"flex items-center gap-2 text-sm text-muted-foreground",children:[(0,t.jsx)(Q.Spinner,{})," ",v("loadingDetails")]}),u&&g&&(0,t.jsx)(ei.WorktreeDetailPanel,{detail:g,inline:!0})]}),(0,t.jsx)(U.CardFooter,{className:"flex-wrap gap-2","data-worktree-navigation-ignore":!0,children:(0,t.jsx)(eq,{...c,onCompleted:async()=>{await e.onReload(),u&&await k()}})})]})}function eT({worktree:e}){let a=(0,A.useTranslations)("worktrees"),r=e.branch??e.headSha?.slice(0,10)??a("detached"),s=a("openWorktreeDetails",{branch:r});return(0,t.jsx)(M.Button,{asChild:!0,size:"icon-sm",variant:"ghost",children:(0,t.jsx)(es.Link,{"aria-label":s,href:(0,ec.worktreeDetailHref)(e.id),title:s,children:(0,t.jsx)(n.ArrowRight,{})})})}function eN({worktree:e,onOpenTicket:a,compact:r=!1}){let s=`${e.ticketKey??""}${e.ticketTitle?`${e.ticketKey?" — ":""}${e.ticketTitle}`:""}`;return(0,t.jsxs)("div",{className:(0,er.cn)("flex max-w-full flex-wrap items-center gap-1.5 font-normal",r?"mt-0.5 text-xs":"mt-1 text-sm"),children:[e.ticketKey?(0,t.jsx)(M.Button,{className:"h-auto min-w-0 justify-start truncate p-0 text-left font-normal",onClick:()=>a(e.ticketKey),title:s,type:"button",variant:"link",children:s}):(0,t.jsx)("p",{className:"min-w-0 truncate text-muted-foreground",title:s,children:s}),e.ticketStatus&&(e.ticketKey?(0,t.jsx)(O.Badge,{asChild:!0,variant:"secondary",children:(0,t.jsx)("button",{onClick:()=>a(e.ticketKey),type:"button",children:e.ticketStatus})}):(0,t.jsx)(O.Badge,{variant:"secondary",children:e.ticketStatus}))]})}function eA(e){let{worktree:a,group:r,baseRepoDirectory:s,detailsExpanded:n,onToggleDetails:i}=e,l=(0,A.useTranslations)("worktrees");return(0,t.jsxs)("div",{className:"space-y-3 text-sm",children:[(0,t.jsxs)("div",{className:"grid gap-3 md:grid-cols-2",children:[(0,t.jsx)(ez,{label:l("path"),mono:!0,value:ex(a.folder,s)}),(0,t.jsx)(e_,{...e})]}),(0,t.jsx)(eD,{label:l("upToDate"),children:(0,t.jsx)(eR,{worktree:a})}),(0,t.jsx)(eB,{...e}),(0,t.jsx)(eD,{label:l("pullRequest"),children:(0,t.jsx)(eL,{detailsExpanded:n,onToggleDetails:i,worktree:a})}),a.latestBuild&&(0,t.jsx)(eE,{build:a.latestBuild,onCompleted:e.onReload,onError:e.onError}),(0,t.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[a.statusError&&(0,t.jsx)("span",{className:"text-xs text-destructive",children:a.statusError}),!r.codebase.defaultBranch&&!a.baseBranchOverride&&(0,t.jsx)("span",{className:"text-xs text-destructive",children:l("baseUnavailable")})]})]})}function eE({build:e,onCompleted:a,onError:r}){let s=(0,A.useTranslations)("worktrees"),n=(0,A.useTranslations)("builds"),i="SUCCEEDED"===e.status&&e.artifacts.some(e=>"RUNNABLE_APP"===e.kind);return(0,t.jsxs)(eD,{label:s("latestBuild"),children:[(0,t.jsx)(O.Badge,{asChild:!0,variant:"outline",children:(0,t.jsx)(es.Link,{href:`/builds/${e.id}`,children:n(`actions.${e.action}`)})}),(0,t.jsx)(O.Badge,{variant:"FAILED"===e.status?"destructive":"SUCCEEDED"===e.status?"default":"secondary",children:n(`statuses.${e.status}`)}),e.outOfDate&&(0,t.jsx)(O.Badge,{className:"border-amber-500/40 text-amber-700 dark:text-amber-300",variant:"outline",children:n("outOfDate")}),(0,t.jsx)(D.RebuildButton,{buildId:e.id,onCompleted:()=>a(),onError:r,size:"sm"}),i&&(0,t.jsx)(B.RunBuildControls,{buildId:e.id,destinationType:e.destinationType,onCompleted:a,onError:r,preferredDestination:e.destination,size:"sm"})]})}function eD({label:e,children:a}){return(0,t.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[(0,t.jsx)("p",{className:"w-24 shrink-0 text-xs text-muted-foreground",children:e}),(0,t.jsx)("div",{className:"flex min-w-0 flex-wrap items-center gap-1.5",children:a})]})}function eB({compact:e=!1,...a}){let{worktree:r}=a,s=(0,A.useTranslations)("worktrees");return(0,t.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[!e&&(0,t.jsx)("span",{className:"w-24 shrink-0 text-xs text-muted-foreground",children:s("tags")}),(0,t.jsx)(eO,{...a,contentAlign:e?"end":"start",contentAlignOffset:e?0:-100,trigger:(0,t.jsx)(M.Button,{"aria-label":`${s("tags")}: ${r.branch??s("detached")}`,className:(0,er.cn)("h-auto min-h-7 max-w-full justify-start px-1 py-1 text-left font-normal",!e&&"-mx-1"),type:"button",variant:"ghost",children:(0,t.jsxs)("span",{className:"flex min-w-0 flex-wrap items-center gap-1.5",children:[r.tags.map(e=>(0,t.jsx)(eG,{tag:e},e.id)),!r.tags.length&&(0,t.jsx)("span",{className:"text-muted-foreground",children:"—"})]})})})]})}function eR({worktree:e}){let a=(0,A.useTranslations)("worktrees"),r=0===e.baseBehind;return(0,t.jsx)(O.Badge,{className:r?"border-emerald-500/30 bg-emerald-500/10 text-emerald-700 dark:text-emerald-300":null===e.baseBehind?void 0:"border-amber-500/30 bg-amber-500/10 text-amber-700 dark:text-amber-300",variant:"outline",children:null===e.baseBehind?a("unknown"):r?a("yes"):a("notUpToDate",{count:e.baseBehind})})}function eL({worktree:e,detailsExpanded:a,onToggleDetails:r}){var s;let n=(0,A.useTranslations)("worktrees");return(0,t.jsxs)(t.Fragment,{children:[e.pullRequest?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(eW,{pullRequest:e.pullRequest}),(0,t.jsx)(W.PipelineMenu,{pipelineStatus:e.pullRequest.pipelineStatus,pipelines:e.pullRequest.pipelines,repositoryId:e.pullRequest.repositoryGithubId}),(0,t.jsx)(O.Badge,{className:"APPROVED"===(s=e.pullRequest.reviewDecision)?"border-emerald-500/30 bg-emerald-500/10 text-emerald-700 dark:text-emerald-300":"CHANGES_REQUESTED"===s?"border-red-500/30 bg-red-500/10 text-red-700 dark:text-red-300":"border-amber-500/30 bg-amber-500/10 text-amber-700 dark:text-amber-300",children:n(`review.${e.pullRequest.reviewDecision}`)}),(0,t.jsx)(O.Badge,{asChild:!0,className:0===e.pullRequest.unresolvedReviewThreadCount?"border-emerald-500/30 bg-emerald-500/10 text-emerald-700 dark:text-emerald-300":"border-amber-500/30 bg-amber-500/10 text-amber-700 dark:text-amber-300",children:(0,t.jsx)(es.Link,{href:(0,P.pullRequestCommentsHref)(e.pullRequest),children:n("comments",{count:e.pullRequest.unresolvedReviewThreadCount})})})]}):(0,t.jsx)("span",{className:"text-muted-foreground",children:"—"}),r?(0,t.jsx)(O.Badge,{asChild:!0,variant:"secondary",children:(0,t.jsx)("button",{"aria-expanded":a,onClick:r,type:"button",children:n("branchCommits",{count:e.baseAhead??0})})}):(0,t.jsx)(O.Badge,{variant:"secondary",children:n("branchCommits",{count:e.baseAhead??0})})]})}function eW({pullRequest:e}){let a=(0,A.useTranslations)("worktrees");return(0,t.jsxs)(H.DropdownMenu,{children:[(0,t.jsx)(H.DropdownMenuTrigger,{asChild:!0,children:(0,t.jsx)(O.Badge,{asChild:!0,children:(0,t.jsxs)("button",{type:"button",children:["PR #",e.number]})})}),(0,t.jsxs)(H.DropdownMenuContent,{align:"start",className:"w-44",children:[(0,t.jsx)(H.DropdownMenuItem,{asChild:!0,children:(0,t.jsxs)("a",{href:e.url,rel:"noreferrer",target:"_blank",children:[(0,t.jsx)(u.ExternalLink,{}),a("openInGitHub")]})}),(0,t.jsx)(H.DropdownMenuItem,{asChild:!0,children:(0,t.jsxs)(es.Link,{href:(0,P.pullRequestDetailHref)(e),children:[(0,t.jsx)(g.GitPullRequest,{}),a("openDetails")]})})]})]})}function eP({worktree:e}){var a,r;let n=(0,A.useTranslations)("worktrees");return"IN_SYNC"===e.syncState||0===e.ahead&&0===e.behind?(0,t.jsx)(O.Badge,{className:"border-emerald-500/30 bg-emerald-500/10 text-emerald-700 dark:text-emerald-300",variant:"outline",children:n("inSync")}):null!==e.ahead||null!==e.behind?(0,t.jsxs)(t.Fragment,{children:[null!==e.ahead&&(0,t.jsxs)(O.Badge,{className:"border-blue-500/30 bg-blue-500/10 text-blue-700 dark:text-blue-300",variant:"outline",children:[(0,t.jsx)(i.ArrowUp,{"data-icon":"inline-start"}),n("ahead",{count:e.ahead})]}),null!==e.behind&&(0,t.jsxs)(O.Badge,{className:"border-blue-500/30 bg-blue-500/10 text-blue-700 dark:text-blue-300",variant:"outline",children:[(0,t.jsx)(s.ArrowDown,{"data-icon":"inline-start"}),n("behind",{count:e.behind})]})]}):(0,t.jsx)(O.Badge,{variant:"outline",children:(a=e,r=n,"AHEAD"===a.syncState?r("ahead",{count:a.ahead??0}):"BEHIND"===a.syncState?r("behind",{count:a.behind??0}):r("DIVERGED"===a.syncState?"diverged":"IN_SYNC"===a.syncState?"upToDate":"NO_UPSTREAM"===a.syncState?"unpublished":"DETACHED"===a.syncState?"detached":"unknown"))})}function e_(e){let{worktree:r,group:s,onUpdate:n,onError:i,compact:l=!1}=e,o=(0,A.useTranslations)("worktrees"),[d,c]=(0,a.useState)(!1),[u,h]=(0,a.useState)(!1),g="__inherit_remote_default__",p=Array.from(new Set([r.baseBranchOverride,s.codebase.defaultBranch,...s.codebase.remoteBranches].filter(e=>!!e))),m=async e=>{h(!0);try{let t=await (0,ea.controlPlaneRequest)(`mutation UpdateWorktreeBase($id: ID!, $baseBranch: String) {
60
+ updateWorktreeBaseBranch(id: $id, baseBranch: $baseBranch) { ${el.WORKTREE_FIELDS} }
61
+ }`,{id:r.id,baseBranch:e||null});n(t.updateWorktreeBaseBranch),i(null),c(!1)}catch(e){i(e instanceof Error?e.message:String(e))}finally{h(!1)}};return(0,t.jsxs)("div",{className:"min-w-0",children:[!l&&(0,t.jsx)("p",{className:"text-xs text-muted-foreground",children:o("baseBranch")}),(0,t.jsx)("div",{className:(0,er.cn)("flex min-h-6 min-w-0 items-center gap-1",!l&&"mt-0.5"),children:d?(0,t.jsxs)(X.Select,{disabled:u,onOpenChange:c,onValueChange:e=>void m(e===g?"":e),open:d,value:r.baseBranchOverride??(s.codebase.defaultBranch?g:void 0),children:[(0,t.jsx)(X.SelectTrigger,{"aria-label":o("baseBranch"),className:"h-7 min-w-40 max-w-full font-mono text-xs",size:"sm",children:(0,t.jsx)(X.SelectValue,{placeholder:o("baseUnavailable")})}),(0,t.jsxs)(X.SelectContent,{align:"start",children:[s.codebase.defaultBranch&&(0,t.jsxs)(X.SelectItem,{value:g,children:[s.codebase.defaultBranch," · ",o("inheritBase")]}),p.map(e=>(0,t.jsx)(X.SelectItem,{value:e,children:e},e))]})]}):(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("span",{className:"truncate font-mono text-xs",title:r.baseBranch??void 0,children:r.baseBranch??"—"}),(0,t.jsx)(M.Button,{"aria-label":o("editBase"),onClick:()=>c(!0),size:"icon-xs",variant:"ghost",children:(0,t.jsx)(v.Pencil,{})})]})})]})}function e$(e,t){let a=t.activeMoves.some(t=>t.sourceCodebaseId===e.group.codebase.id||t.targetCodebaseId===e.group.codebase.id);return"ONLINE"===e.agentGroup.agent.connectionStatus&&e.agentGroup.agent.capabilities.includes("worktree.move.checkout")&&"AVAILABLE"===e.group.codebase.availability&&!e.group.worktrees.some(e=>e.activeJob)&&!a}function eO(e){let r,s,{worktree:n,allTags:i,onUpdate:l,onError:o,onManageTags:d,contentAlign:c="end",contentAlignOffset:u=0,trigger:g}=e,p=(0,A.useTranslations)("worktrees"),[m,v]=(0,a.useState)(!1),[w,k]=(0,a.useState)(!1),[y,S]=(0,a.useState)(!1),[T,N]=(0,a.useState)(!1),[E,D]=(0,a.useState)(null),[B,R]=(0,a.useState)(null),L=(0,a.useRef)(!1),W=(r=e.overview.agents.find(t=>t.codebases.some(t=>t.codebase.id===e.group.codebase.id)))?e.overview.agents.flatMap(t=>t.agent.id===r.agent.id?[]:t.codebases.flatMap(a=>a.repository.id===e.group.repository.id?[{agentGroup:t,group:a}]:[])):[],P=(s=e.overview.agents.find(t=>t.codebases.some(t=>t.codebase.id===e.group.codebase.id)))&&"ONLINE"===s.agent.connectionStatus&&s.agent.capabilities.includes("worktree.move.push")?"AVAILABLE"!==e.worktree.availability||e.worktree.activeJob||e.overview.activeMoves.some(t=>t.sourceCodebaseId===e.group.codebase.id||t.targetCodebaseId===e.group.codebase.id)?p("moveBlocked.busy"):e.worktree.branch&&e.worktree.headSha?e.worktree.hasStagedChanges||e.worktree.hasUnstagedChanges||"DIRTY"===e.worktree.pushStatus?p("moveBlocked.dirty"):"BEHIND"===e.worktree.pushStatus?p("moveBlocked.behind"):"DIVERGED"===e.worktree.pushStatus?p("moveBlocked.diverged"):"READY"!==e.worktree.pushStatus?p("moveBlocked.unknown"):W.some(t=>e$(t,e.overview))?null:p("moveBlocked.destination"):p("moveBlocked.detached"):p("moveBlocked.agent"),_=e.overview.agents.find(t=>t.codebases.some(t=>t.codebase.id===e.group.codebase.id)),O=!_||"ONLINE"!==_.agent.connectionStatus||!_.agent.capabilities.includes("worktree.delete")||"AVAILABLE"!==n.availability||!!n.activeJob||e.overview.activeMoves.some(t=>t.sourceCodebaseId===e.group.codebase.id||t.targetCodebaseId===e.group.codebase.id),U=new Set(n.tags.map(e=>e.id)),q=async(e,t)=>{let a=t?[...U,e]:[...U].filter(t=>t!==e);try{let e=await (0,ea.controlPlaneRequest)(`mutation SetWorktreeTags($id: ID!, $tagIds: [ID!]!) { setWorktreeTags(id: $id, tagIds: $tagIds) { ${el.WORKTREE_FIELDS} } }`,{id:n.id,tagIds:a});l(e.setWorktreeTags),o(null)}catch(e){o(e instanceof Error?e.message:String(e))}},F=async e=>{try{let t=await (0,ea.controlPlaneRequest)(`mutation HighlightWorktree($id: ID!, $color: String) { updateWorktreeHighlight(id: $id, color: $color) { ${el.WORKTREE_FIELDS} } }`,{id:n.id,color:e});l(t.updateWorktreeHighlight),o(null)}catch(e){o(e instanceof Error?e.message:String(e))}},V=async(t,a=!1)=>{N(!0);try{let r=await (0,ea.controlPlaneRequest)(`mutation ChangeWorktreeBranch($input: ChangeWorktreeBranchInput!) {
62
+ changeWorktreeBranch(input: $input) { id }
63
+ }`,{input:{worktreeId:n.id,selection:t,requestId:(0,et.createClientId)(),stashOnFailure:a}});await (0,ed.waitForWorktreeJob)(r.changeWorktreeBranch.id),await e.onReload(),D(null),R(null),v(!1),o(null)}finally{N(!1)}},G=async()=>{if(E)try{R(null),await V(E,!0)}catch(e){R(e instanceof Error?e.message:String(e))}};return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)(J.Popover,{onOpenChange:e=>{v(e),e||(D(null),R(null))},open:m,children:[(0,t.jsxs)(H.DropdownMenu,{children:[(0,t.jsx)(H.DropdownMenuTrigger,{asChild:!0,children:(0,t.jsx)(J.PopoverAnchor,{asChild:!0,children:g??(0,t.jsx)(M.Button,{"aria-label":p("customize"),size:"icon-sm",variant:"ghost",children:(0,t.jsx)(x.MoreHorizontal,{})})})}),(0,t.jsxs)(H.DropdownMenuContent,{align:c,alignOffset:u,className:"w-72",onCloseAutoFocus:e=>{L.current&&(L.current=!1,e.preventDefault(),v(!0))},children:[W.length>0&&(0,t.jsxs)(H.DropdownMenuItem,{disabled:!!P,onSelect:()=>k(!0),title:P??void 0,children:[(0,t.jsx)(b.MoveRight,{})," ",p("moveToAgent")]}),(0,t.jsxs)(H.DropdownMenuItem,{disabled:!e.branchManagementEnabled||"AVAILABLE"!==n.availability||!!n.activeJob,onSelect:()=>{L.current=!0},children:[(0,t.jsx)(h.GitBranch,{})," ",p("changeBranch")]}),(0,t.jsx)(H.DropdownMenuSeparator,{}),(0,t.jsxs)(H.DropdownMenuLabel,{className:"flex items-center gap-1.5 leading-none",children:[(0,t.jsx)(C.Tags,{className:"size-3"}),(0,t.jsx)("span",{children:p("tags")})]}),i.map(e=>(0,t.jsxs)(H.DropdownMenuCheckboxItem,{checked:U.has(e.id),onCheckedChange:t=>void q(e.id,!!t),children:[(0,t.jsx)("span",{className:(0,er.cn)("size-3 rounded-full border",ef[e.color])})," ",e.name]},e.id)),(0,t.jsxs)(H.DropdownMenuItem,{onSelect:d,children:[(0,t.jsx)(f.Plus,{})," ",p("manageTags")]}),(0,t.jsx)(H.DropdownMenuSeparator,{}),(0,t.jsxs)(H.DropdownMenuLabel,{className:"flex items-center gap-1.5 leading-none",children:[(0,t.jsx)(j.Paintbrush,{className:"size-3"}),(0,t.jsx)("span",{children:p("highlight")})]}),(0,t.jsxs)(ee.ToggleGroup,{"aria-label":p("highlight"),className:"grid grid-cols-7 gap-1 p-2",onClick:e=>e.stopPropagation(),onValueChange:e=>{e&&F("__none__"===e?null:e)},size:"sm",spacing:1,type:"single",value:n.highlightColor??"__none__",variant:"outline",children:[(0,t.jsx)(ee.ToggleGroupItem,{"aria-label":p("clearHighlight"),className:"size-7 min-w-0 p-0",value:"__none__",children:(0,t.jsx)(I.Trash2,{className:"size-3"})}),eu.map(e=>(0,t.jsx)(ee.ToggleGroupItem,{"aria-label":e,className:(0,er.cn)("size-7 min-w-0 p-0",ef[e],"data-[state=on]:ring-2 data-[state=on]:ring-foreground"),value:e},e))]}),!n.primary&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(H.DropdownMenuSeparator,{}),(0,t.jsxs)(H.DropdownMenuItem,{disabled:O,onSelect:()=>S(!0),variant:"destructive",children:[(0,t.jsx)(I.Trash2,{})," ",p("deleteWorktree")]})]})]})]}),(0,t.jsxs)(J.PopoverContent,{align:c,className:"z-60 w-[min(28rem,calc(100vw-2rem))]",children:[(0,t.jsxs)("div",{className:"mb-4",children:[(0,t.jsx)("h3",{className:"font-semibold",children:p("changeBranch")}),(0,t.jsx)("p",{className:"mt-1 truncate font-mono text-xs text-muted-foreground",children:ex(n.folder,e.baseRepoDirectory)})]}),(0,t.jsx)(en.WorktreeBranchForm,{busy:T,onSubmit:e=>V(e),onSubmitError:e=>{D(n.hasStagedChanges||n.hasUnstagedChanges?e:null)},recovery:E?(0,t.jsx)($.Alert,{children:(0,t.jsxs)($.AlertDescription,{className:"space-y-2",children:[(0,t.jsx)("p",{children:p("stashRetryHelp")}),B&&(0,t.jsx)("p",{className:"text-destructive",children:B}),(0,t.jsxs)(M.Button,{disabled:T,onClick:()=>void G(),size:"sm",type:"button",variant:"outline",children:[T&&(0,t.jsx)(Q.Spinner,{}),p("stashAndRetry")]})]})}):null,submitLabel:p("changeBranch"),target:ek(e.group,n)})]})]}),w&&(0,t.jsx)(eM,{onOpenChange:k,open:w,props:e,targets:W.filter(t=>e$(t,e.overview))}),!n.primary&&y&&(0,t.jsx)(eU,{onOpenChange:S,open:y,props:e})]})}function eM({props:e,targets:r,open:s,onOpenChange:n}){let i=(0,A.useTranslations)("worktrees"),l=1===r.length?r[0].group.codebase.id:"",[o,d]=(0,a.useState)(l),[c,u]=(0,a.useState)("__new__"),[h,g]=(0,a.useState)(!1),[p,m]=(0,a.useState)(!1),[x,b]=(0,a.useState)(null),[j,v]=(0,a.useState)(null),f=r.some(e=>e.group.codebase.id===o)?o:1===r.length?r[0].group.codebase.id:"",w=r.find(e=>e.group.codebase.id===f),k=r.map(e=>({value:e.group.codebase.id,label:`${e.agentGroup.agent.name} \xb7 ${e.group.repository.name}`,description:e.group.codebase.folder,keywords:`${e.agentGroup.agent.hostname} ${e.group.repository.displayOrigin}`})),y=w?.group.worktrees.find(e=>e.id===c),S=w?.group.worktrees.find(t=>t.branch===e.worktree.branch),C=!e.worktree.primary&&e.overview.agents.some(t=>t.codebases.some(t=>t.codebase.id===e.group.codebase.id)&&t.agent.capabilities.includes("worktree.delete")),I=async t=>{if("AWAITING_STASH"===t.status){v(t),await e.onReload();return}if("FAILED"===t.status)throw Error(t.error||i("moveFailed"));if("CANCELLED"===t.status)throw Error(i("moveCancelled"));e.onError("SUCCEEDED_WITH_WARNING"===t.status?t.warning:null),await e.onReload(),e.onMoved?.(t),n(!1)},T=async()=>{if(w){m(!0),b(null);try{let t=await (0,ea.controlPlaneRequest)(`mutation MoveWorktree($input: MoveWorktreeInput!) {
64
+ moveWorktree(input: $input) {
65
+ id sourceWorktreeId sourceCodebaseId targetCodebaseId targetWorktreeId destinationMode
66
+ branch headSha deleteSource status sourceJobId targetJobId cleanupJobId error warning
67
+ createdAt updatedAt finishedAt
68
+ }
69
+ }`,{input:{sourceWorktreeId:e.worktree.id,targetCodebaseId:w.group.codebase.id,targetWorktreeId:"__new__"===c?null:c,deleteSource:h,requestId:(0,et.createClientId)()}});await I(await (0,ed.waitForWorktreeMove)(t.moveWorktree.id))}catch(e){b(e instanceof Error?e.message:String(e))}finally{m(!1)}}},N=async()=>{if(j){m(!0),b(null);try{await (0,ea.controlPlaneRequest)(`mutation RetryMove($id: ID!) {
70
+ retryWorktreeMoveWithStash(id: $id) { id status }
71
+ }`,{id:j.id}),await I(await (0,ed.waitForWorktreeMove)(j.id))}catch(e){b(e instanceof Error?e.message:String(e))}finally{m(!1)}}},E=async()=>{if(j){m(!0);try{await (0,ea.controlPlaneRequest)(`mutation CancelMove($id: ID!) {
72
+ cancelWorktreeMove(id: $id) { id status }
73
+ }`,{id:j.id}),await e.onReload(),n(!1)}catch(e){b(e instanceof Error?e.message:String(e))}finally{m(!1)}}};return(0,t.jsx)(F.Dialog,{onOpenChange:e=>!p&&n(e),open:s,children:(0,t.jsxs)(F.DialogContent,{className:"sm:max-w-xl",children:[(0,t.jsxs)(F.DialogHeader,{children:[(0,t.jsx)(F.DialogTitle,{children:i("moveToAgent")}),(0,t.jsx)(F.DialogDescription,{children:i("moveDescription",{branch:e.worktree.branch??""})})]}),j?(0,t.jsx)($.Alert,{children:(0,t.jsxs)($.AlertDescription,{className:"space-y-3",children:[(0,t.jsx)("p",{children:j.error||i("moveNeedsStash")}),(0,t.jsx)("p",{className:"text-muted-foreground",children:i("moveStashHelp")})]})}):(0,t.jsxs)("div",{className:"space-y-4",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)(K.Label,{className:"mb-1.5 block",children:i("destinationAgent")}),(0,t.jsx)(Y.SearchableSelect,{ariaLabel:i("destinationAgent"),disabled:p,emptyMessage:i("noMoveDestinations"),onValueChange:e=>{d(e),u("__new__")},options:k,placeholder:i("selectDestinationAgent"),searchPlaceholder:i("searchDestinationAgents"),value:f})]}),w&&(0,t.jsxs)("div",{children:[(0,t.jsx)(K.Label,{className:"mb-1.5 block",children:i("destinationWorktree")}),(0,t.jsxs)(X.Select,{disabled:p,onValueChange:u,value:c,children:[(0,t.jsx)(X.SelectTrigger,{"aria-label":i("destinationWorktree"),children:(0,t.jsx)(X.SelectValue,{})}),(0,t.jsxs)(X.SelectContent,{children:[(0,t.jsx)(X.SelectItem,{disabled:!!S,value:"__new__",children:i("createDestinationWorktree")}),w.group.worktrees.filter(e=>"AVAILABLE"===e.availability).map(e=>(0,t.jsxs)(X.SelectItem,{disabled:!!S&&S.id!==e.id,value:e.id,children:[e.branch??i("detached")," ·"," ",e.relativePath]},e.id))]})]})]}),y&&(y.hasStagedChanges||y.hasUnstagedChanges)&&(0,t.jsx)($.Alert,{children:(0,t.jsx)($.AlertDescription,{children:i("dirtyDestinationWarning")})}),(0,t.jsxs)("div",{className:"flex items-start gap-2",children:[(0,t.jsx)(q.Checkbox,{checked:h,disabled:!C||p,id:`delete-source-${e.worktree.id}`,onCheckedChange:e=>g(!!e)}),(0,t.jsxs)("div",{children:[(0,t.jsx)(K.Label,{htmlFor:`delete-source-${e.worktree.id}`,children:i("deleteOldWorktree")}),!C&&(0,t.jsx)("p",{className:"text-xs text-muted-foreground",children:i("deleteOldWorktreeDisabled")})]})]})]}),x&&(0,t.jsx)($.Alert,{variant:"destructive",children:(0,t.jsx)($.AlertDescription,{children:x})}),(0,t.jsxs)(F.DialogFooter,{children:[(0,t.jsx)(M.Button,{disabled:p,onClick:()=>j?void E():n(!1),variant:"outline",children:j?i("cancelMove"):i("cancel")}),(0,t.jsxs)(M.Button,{disabled:p||!j&&!w,onClick:()=>j?void N():void T(),children:[p&&(0,t.jsx)(Q.Spinner,{}),j?i("stashAndContinue"):i("moveWorktree")]})]})]})})}function eU({props:e,open:r,onOpenChange:s}){let n=(0,A.useTranslations)("worktrees"),[i,l]=(0,a.useState)(!1),[o,d]=(0,a.useState)(!1),[c,u]=(0,a.useState)(null),h=!!(e.worktree.branch&&(e.group.codebase.remoteBranches.includes(e.worktree.branch)||e.worktree.upstream===`origin/${e.worktree.branch}`)),g=e.worktree.branch===e.group.codebase.defaultBranch,p=async()=>{d(!0),u(null);try{let t=await (0,ea.controlPlaneRequest)(`mutation DeleteWorktree($input: DeleteWorktreeInput!) {
74
+ deleteWorktree(input: $input) { id }
75
+ }`,{input:{worktreeId:e.worktree.id,deleteRemoteBranch:i,requestId:(0,et.createClientId)()}});await (0,ed.waitForWorktreeJob)(t.deleteWorktree.id),await e.onReload(),e.onError(null),e.onDeleted?.(),s(!1)}catch(e){u(e instanceof Error?e.message:String(e))}finally{d(!1)}};return(0,t.jsx)(F.Dialog,{onOpenChange:e=>!o&&s(e),open:r,children:(0,t.jsxs)(F.DialogContent,{children:[(0,t.jsxs)(F.DialogHeader,{children:[(0,t.jsx)(F.DialogTitle,{children:n("deleteWorktree")}),(0,t.jsx)(F.DialogDescription,{children:n("deleteWorktreeDescription",{path:ex(e.worktree.folder,e.baseRepoDirectory)})})]}),(0,t.jsx)($.Alert,{variant:"destructive",children:(0,t.jsx)($.AlertDescription,{children:n("deleteWorktreeWarning")})}),h&&(0,t.jsxs)("div",{className:"flex items-start gap-2",children:[(0,t.jsx)(q.Checkbox,{checked:i,disabled:o||g,id:`delete-remote-${e.worktree.id}`,onCheckedChange:e=>l(!!e)}),(0,t.jsxs)("div",{children:[(0,t.jsx)(K.Label,{htmlFor:`delete-remote-${e.worktree.id}`,children:n("deleteRemoteBranch",{branch:e.worktree.branch??""})}),g&&(0,t.jsx)("p",{className:"text-xs text-muted-foreground",children:n("defaultRemoteProtected")})]})]}),c&&(0,t.jsx)($.Alert,{variant:"destructive",children:(0,t.jsx)($.AlertDescription,{children:c})}),(0,t.jsxs)(F.DialogFooter,{children:[(0,t.jsx)(M.Button,{disabled:o,onClick:()=>s(!1),variant:"outline",children:n("cancel")}),(0,t.jsxs)(M.Button,{disabled:o,onClick:()=>void p(),variant:"destructive",children:[o&&(0,t.jsx)(Q.Spinner,{}),n("deleteWorktree")]})]})]})})}function eq(e){let{worktree:a,editorVariant:s}=e,n=(0,A.useTranslations)("worktrees"),i="AVAILABLE"!==a.availability||!!a.activeJob,o=eb(a),d=e.overview.agents.find(t=>t.codebases.some(t=>t.codebase.id===e.group.codebase.id))?.agent,u=d?.connectionStatus==="ONLINE"&&d.capabilities.includes("ios.build.run")&&!1===e.group.iosBuildConfigured,h="AVAILABLE"!==a.availability||!d||"ONLINE"!==d.connectionStatus||!d.capabilities.includes("ios.build.run")||!1===e.group.iosBuildConfigured;return(0,t.jsxs)("div",{className:"flex flex-wrap gap-2",children:[(0,t.jsx)(R.StartBuildButton,{buildSettingsHref:u?`/codebases/repositories/${e.group.repository.id}`:void 0,codebaseId:e.group.codebase.id,disabled:h,disabledReason:d&&"ONLINE"===d.connectionStatus?d.capabilities.includes("ios.build.run")?!1===e.group.iosBuildConfigured?n("iosBuildNotConfigured"):"AVAILABLE"!==a.availability?n("worktreeUnavailable"):null:n("agentUnsupported"):n("agentOffline"),worktreeId:a.id}),a.pullRequest&&(0,t.jsx)(L.MergePullRequestButton,{onMerged:e.onCompleted,pullRequest:a.pullRequest}),"NONE"!==s&&(0,t.jsx)(eF,{icon:(0,t.jsx)(c.Code2,{}),label:n("CODE_INSIDERS"===s?"openInsiders":"openCode"),operation:"OPEN_EDITOR",props:e}),(0,t.jsx)(eF,{confirm:!0,icon:(0,t.jsx)(T.Upload,{}),label:n("forcePush"),operation:"FORCE_PUSH",props:e,disabled:i||!a.upstream}),(0,t.jsx)(eF,{confirm:!0,icon:(0,t.jsx)(w.RefreshCw,{}),label:n("sync"),operation:"SYNC",props:e,disabled:i||!a.upstream||!a.baseBranch||0===a.baseBehind}),(0,t.jsx)(eF,{icon:(0,t.jsx)(T.Upload,{}),label:n(a.upstream?"push":"publish"),operation:"PUSH",props:e,disabled:i||!a.branch}),(0,t.jsx)(eF,{confirm:!0,icon:(0,t.jsx)(k.RotateCcw,{}),label:n("reset"),operation:"RESET",props:e,disabled:i||!a.upstream}),(0,t.jsx)(eF,{icon:(0,t.jsx)(r.Archive,{}),label:n("stashAll"),operation:"STASH_ALL",props:e,disabled:i||!o.hasChanges}),(0,t.jsx)(eF,{icon:(0,t.jsx)(l.Check,{}),label:n("UNSTAGE_ALL"===o.stageOperation?"unstageAll":"stageAll"),operation:o.stageOperation,props:e,disabled:i||!o.hasChanges}),a.activeJob&&(0,t.jsxs)("span",{className:"flex items-center gap-1 text-xs text-muted-foreground",children:[(0,t.jsx)(Q.Spinner,{})," ",n("operationRunning")]})]})}function eF({props:e,operation:r,label:s,icon:n,confirm:i=!1,disabled:o=!1}){let d=(0,A.useTranslations)("worktrees"),[c,u]=(0,a.useState)(!1),[h,g]=(0,a.useState)(!1),p=(0,a.useRef)(null);(0,a.useEffect)(()=>()=>{p.current&&window.clearTimeout(p.current)},[]);let m=async()=>{if(i&&!c){u(!0),p.current=window.setTimeout(()=>u(!1),5e3);return}g(!0),u(!1);try{let t=await (0,ea.controlPlaneRequest)("mutation RunWorktreeOperation($input: RunWorktreeOperationInput!) { runWorktreeOperation(input: $input) { id } }",{input:{worktreeId:e.worktree.id,operation:r,requestId:(0,et.createClientId)()}});e.onError(null),await e.onCompleted(),await (0,ed.waitForWorktreeJob)(t.runWorktreeOperation.id),await e.onCompleted()}catch(t){e.onError(t instanceof Error?t.message:String(t))}finally{g(!1)}};return(0,t.jsxs)(M.Button,{disabled:o||h,onClick:()=>void m(),size:"sm",variant:c?"destructive":"outline",children:[h?(0,t.jsx)(Q.Spinner,{}):c?(0,t.jsx)(l.Check,{}):n," ",c?d("confirmAction"):s]})}function eH(e){let r=(0,A.useTranslations)("worktrees");return(0,t.jsx)("div",{className:"rounded-xl border",children:(0,t.jsxs)(Z.Table,{children:[(0,t.jsx)(Z.TableHeader,{children:(0,t.jsxs)(Z.TableRow,{children:[(0,t.jsx)(Z.TableHead,{children:r("branch")}),(0,t.jsx)(Z.TableHead,{children:r("path")}),(0,t.jsx)(Z.TableHead,{children:r("baseBranch")}),(0,t.jsx)(Z.TableHead,{children:r("upToDate")}),(0,t.jsx)(Z.TableHead,{children:r("tags")}),(0,t.jsx)(Z.TableHead,{children:r("pullRequest")}),(0,t.jsx)(Z.TableHead,{children:r("origin")}),(0,t.jsx)(Z.TableHead,{})]})}),(0,t.jsx)(Z.TableBody,{children:e.group.worktrees.map(t=>(0,a.createElement)(eV,{...e,key:t.id,worktree:t}))})]})})}function eV(e){let{baseRepoDirectory:r,inspectionRefreshToken:s,onError:n}=e,{worktree:i,applyActivity:l,setUnstagedChanges:c}=(0,eo.useLiveWorktree)(e.worktree),u={...e,worktree:i},h=(0,A.useTranslations)("worktrees"),g=(0,es.useRouter)(),[p,m]=(0,a.useState)(!1),[x,b]=(0,a.useState)(null),[j,v]=(0,a.useState)(!1),f=(0,a.useRef)(0),w=(0,a.useRef)(s),k=(0,a.useCallback)(async()=>{let e=++f.current;v(!0);try{let t=await (0,eo.inspectWorktree)(i.id);if(e!==f.current)return;b(t),c(t.changes.some(e=>e.unstaged||e.untracked||e.conflicted)),n(null)}catch(t){e===f.current&&n(t instanceof Error?t.message:String(t))}finally{e===f.current&&v(!1)}},[n,c,i.id]),y=(0,eo.useQueuedWorktreeInspection)(k),S=(0,a.useCallback)(e=>{l(e),p&&y()},[l,p,y]);(0,eo.useWorktreeActivitySubscription)(i.id,e.liveUpdatesEnabled&&"AVAILABLE"===i.availability,S),(0,a.useEffect)(()=>{if(w.current===s||(w.current=s,!p))return;let e=window.setTimeout(()=>void y(),0);return()=>window.clearTimeout(e)},[p,s,y]);let C=()=>{let e=!p;m(e),e&&!x&&y()},I=i.highlightColor&&ej[i.highlightColor];return(0,t.jsxs)(a.Fragment,{children:[(0,t.jsxs)(Z.TableRow,{className:(0,er.cn)("cursor-pointer transition-colors hover:bg-muted/50",I),onClick:e=>{(0,ec.shouldNavigateWorktreeSurface)(e)&&g.push((0,ec.worktreeDetailHref)(i.id))},children:[(0,t.jsxs)(Z.TableCell,{children:[(0,t.jsxs)(M.Button,{"aria-expanded":p,className:"max-w-full px-0 font-mono",onClick:()=>void C(),variant:"ghost",children:[p?(0,t.jsx)(o.ChevronDown,{}):(0,t.jsx)(d.ChevronRight,{}),(0,t.jsx)("span",{className:"truncate",children:i.branch??h("detached")})]}),(i.ticketKey||i.ticketTitle)&&(0,t.jsx)(eN,{...u,compact:!0})]}),(0,t.jsx)(Z.TableCell,{className:"font-mono text-xs",children:ex(i.folder,r)}),(0,t.jsx)(Z.TableCell,{children:(0,t.jsx)(e_,{...u,compact:!0})}),(0,t.jsx)(Z.TableCell,{children:(0,t.jsx)(eR,{worktree:i})}),(0,t.jsx)(Z.TableCell,{children:(0,t.jsx)(eB,{...u,compact:!0})}),(0,t.jsx)(Z.TableCell,{children:(0,t.jsx)("div",{className:"flex flex-wrap items-center gap-1.5",children:(0,t.jsx)(eL,{detailsExpanded:p,onToggleDetails:C,worktree:i})})}),(0,t.jsx)(Z.TableCell,{children:(0,t.jsxs)("div",{className:"flex flex-wrap items-center gap-1",children:[(0,t.jsx)(eP,{worktree:i}),i.hasUnstagedChanges&&(0,t.jsx)(O.Badge,{variant:"destructive",children:h("dirty")})]})}),(0,t.jsx)(Z.TableCell,{children:(0,t.jsxs)("div",{className:"flex items-center justify-end gap-1",children:[(0,t.jsx)(eT,{worktree:i}),(0,t.jsx)(eO,{...u})]})})]}),(0,t.jsx)(Z.TableRow,{className:(0,er.cn)(I),children:(0,t.jsx)(Z.TableCell,{colSpan:8,children:(0,t.jsx)(eq,{...u,onCompleted:async()=>{await e.onReload(),p&&await y()}})})}),p&&(0,t.jsx)(Z.TableRow,{className:(0,er.cn)(I),children:(0,t.jsx)(Z.TableCell,{colSpan:8,children:j&&!x?(0,t.jsx)(Q.Spinner,{}):x?(0,t.jsx)(ei.WorktreeDetailPanel,{detail:x,inline:!0}):null})})]})}function eG({tag:e}){return(0,t.jsx)(O.Badge,{className:ev[e.color],children:e.name})}function ez({label:e,value:a,mono:r=!1}){return(0,t.jsxs)("div",{className:"min-w-0",children:[(0,t.jsx)("p",{className:"text-xs text-muted-foreground",children:e}),(0,t.jsx)("p",{className:(0,er.cn)("flex min-h-6 items-center truncate",r&&"font-mono text-xs"),title:a,children:a})]})}function eK({open:e,onOpenChange:r,tags:s,onChanged:n}){let i=(0,A.useTranslations)("worktrees"),[l,o]=(0,a.useState)(null),[d,c]=(0,a.useState)(""),[u,h]=(0,a.useState)("blue"),[g,p]=(0,a.useState)(null),m=async e=>{e.preventDefault();try{await (0,ea.controlPlaneRequest)("mutation SaveTag($input: SaveWorktreeTagInput!) { saveWorktreeTag(input: $input) { id } }",{input:{id:l?.id??null,name:d,color:u}}),o(null),c(""),h("blue"),p(null),await n()}catch(e){p(e instanceof Error?e.message:String(e))}},x=async e=>{try{await (0,ea.controlPlaneRequest)("mutation DeleteTag($id: ID!) { deleteWorktreeTag(id: $id) }",{id:e}),await n()}catch(e){p(e instanceof Error?e.message:String(e))}};return(0,t.jsx)(F.Dialog,{onOpenChange:r,open:e,children:(0,t.jsxs)(F.DialogContent,{children:[(0,t.jsxs)(F.DialogHeader,{children:[(0,t.jsx)(F.DialogTitle,{children:i("manageTags")}),(0,t.jsx)(F.DialogDescription,{children:i("manageTagsDescription")})]}),g&&(0,t.jsx)($.Alert,{variant:"destructive",children:(0,t.jsx)($.AlertDescription,{children:g})}),(0,t.jsx)(z.ItemGroup,{className:"gap-2",children:s.map(e=>(0,t.jsxs)(z.Item,{size:"sm",variant:"outline",children:[(0,t.jsx)(z.ItemContent,{children:(0,t.jsx)(z.ItemTitle,{children:(0,t.jsx)(eG,{tag:e})})}),(0,t.jsxs)(z.ItemActions,{children:[(0,t.jsx)(M.Button,{onClick:()=>{o(e),c(e.name),h(e.color)},size:"sm",variant:"outline",children:i("edit")}),(0,t.jsx)(M.Button,{onClick:()=>void x(e.id),size:"icon-sm",variant:"destructive",children:(0,t.jsx)(I.Trash2,{})})]})]},e.id))}),(0,t.jsxs)("form",{className:"space-y-3 border-t pt-3",onSubmit:m,children:[(0,t.jsx)(K.Label,{htmlFor:"tag-name",children:l?i("editTag"):i("createTag")}),(0,t.jsx)(G.Input,{id:"tag-name",maxLength:40,onChange:e=>c(e.target.value),required:!0,value:d}),(0,t.jsx)(ee.ToggleGroup,{"aria-label":i("highlight"),className:"grid grid-cols-12 gap-1",onValueChange:e=>{e&&h(e)},size:"sm",spacing:1,type:"single",value:u,variant:"outline",children:eu.map(e=>(0,t.jsx)(ee.ToggleGroupItem,{"aria-label":e,className:(0,er.cn)("size-7 min-w-0 p-0",ef[e],"data-[state=on]:ring-2 data-[state=on]:ring-foreground"),value:e},e))}),(0,t.jsx)(F.DialogFooter,{children:(0,t.jsxs)(M.Button,{type:"submit",children:[(0,t.jsx)(y.Save,{})," ",i("saveTag")]})})]})]})})}function eJ({open:e,onOpenChange:s,onChanged:n}){let i=(0,A.useTranslations)("worktrees"),[l,o]=(0,a.useState)([]),[d,c]=(0,a.useState)(null),u=(0,a.useCallback)(async()=>{try{let e=await (0,ea.controlPlaneRequest)(`query HiddenWorktrees { hiddenWorktrees { ${el.WORKTREE_FIELDS} } }`);o(e.hiddenWorktrees),c(null)}catch(e){c(e instanceof Error?e.message:String(e))}},[]);(0,a.useEffect)(()=>{if(!e)return;let t=window.setTimeout(()=>void u(),0);return()=>window.clearTimeout(t)},[e,u]);let g=async e=>{try{await (0,ea.controlPlaneRequest)(e?"mutation PurgeHidden($id: ID!) { purgeHiddenWorktree(id: $id) }":"mutation PurgeAllHidden { purgeAllHiddenWorktrees }",e?{id:e}:void 0),await u(),await n()}catch(e){c(e instanceof Error?e.message:String(e))}};return(0,t.jsx)(F.Dialog,{onOpenChange:s,open:e,children:(0,t.jsxs)(F.DialogContent,{className:"sm:max-w-3xl",children:[(0,t.jsxs)(F.DialogHeader,{children:[(0,t.jsx)(F.DialogTitle,{children:i("hiddenTitle")}),(0,t.jsx)(F.DialogDescription,{children:i("hiddenDescription")})]}),d&&(0,t.jsx)($.Alert,{variant:"destructive",children:(0,t.jsx)($.AlertDescription,{children:d})}),(0,t.jsx)("div",{className:"max-h-96 overflow-y-auto",children:l.length?(0,t.jsx)(z.ItemGroup,{className:"gap-2",children:l.map(e=>(0,t.jsxs)(z.Item,{variant:"outline",children:[(0,t.jsx)(z.ItemMedia,{variant:"icon",children:(0,t.jsx)(h.GitBranch,{})}),(0,t.jsxs)(z.ItemContent,{className:"min-w-0",children:[(0,t.jsx)(z.ItemTitle,{className:"font-mono",children:e.branch??i("detached")}),(0,t.jsx)(z.ItemDescription,{className:"truncate",title:e.folder,children:e.folder})]}),(0,t.jsx)(z.ItemActions,{children:(0,t.jsxs)(M.Button,{onClick:()=>void g(e.id),size:"sm",variant:"destructive",children:[(0,t.jsx)(I.Trash2,{})," ",i("purge")]})})]},e.id))}):(0,t.jsx)(V.Empty,{className:"border-0 py-8",children:(0,t.jsxs)(V.EmptyHeader,{children:[(0,t.jsx)(V.EmptyMedia,{variant:"icon",children:(0,t.jsx)(r.Archive,{})}),(0,t.jsx)(V.EmptyTitle,{children:i("noHidden")})]})})}),(0,t.jsx)(F.DialogFooter,{children:l.length>0&&(0,t.jsxs)(M.Button,{onClick:()=>void g(),variant:"destructive",children:[(0,t.jsx)(I.Trash2,{})," ",i("purgeAll")]})})]})})}e.s(["ActionRow",0,eq,"BaseBranchControl",0,e_,"BaseFreshnessBadge",0,eR,"OriginStatusBadges",0,eP,"PullRequestBadges",0,eL,"TagManagerDialog",0,eK,"WorktreeMenus",0,eO,"WorktreeMetadata",0,eA,"WorktreeTagsMenu",0,eB,"WorktreeTicketLink",0,eN,"WorktreesPage",0,function(){let e=(0,A.useTranslations)("worktrees"),[s,n]=(0,a.useState)(()=>new URLSearchParams(window.location.search).get("issue")),[i,l]=(0,a.useState)(null),[o,d]=(0,a.useState)(()=>"table"===window.localStorage.getItem(eh)?"table":"cards"),[c,u]=(0,a.useState)(!0),[g,x]=(0,a.useState)(!1),[b,j]=(0,a.useState)(null),[v,f]=(0,a.useState)(null),[k,y]=(0,a.useState)(0),[C,I]=(0,a.useState)(!1),[N,D]=(0,a.useState)(!1),[B,R]=(0,a.useState)(""),[L,W]=(0,a.useState)(eg),[P,O]=(0,a.useState)(eg),U=(0,a.useRef)(0),q=(0,a.useCallback)(async()=>{let e=++U.current;try{let t=await (0,ea.controlPlaneRequest)(`query WorktreeOverview {
76
+ worktreeOverview {
77
+ hiddenCount
78
+ settings { editorVariant updatedAt }
79
+ tags { id name color createdAt updatedAt }
80
+ activeMoves {
81
+ id sourceWorktreeId sourceCodebaseId targetCodebaseId targetWorktreeId destinationMode
82
+ branch headSha deleteSource status sourceJobId targetJobId cleanupJobId error warning
83
+ createdAt updatedAt finishedAt
84
+ }
85
+ agents {
86
+ agent { ${E.AGENT_FIELDS} }
87
+ codebases {
88
+ iosBuildConfigured
89
+ repository { id canonicalOrigin displayOrigin name description jiraBranchRegex keepBaseBranchUpToDate createdAt updatedAt }
90
+ codebase { ${el.CODEBASE_FIELDS} }
91
+ worktrees { ${el.WORKTREE_FIELDS} }
92
+ }
93
+ }
94
+ }
95
+ }`);if(e!==U.current)return;l(t.worktreeOverview),j(null)}catch(t){e===U.current&&j(t instanceof Error?t.message:String(t))}finally{e===U.current&&u(!1)}},[]);(0,a.useEffect)(()=>{let e=window.setTimeout(()=>void q(),0),t=window.setInterval(()=>void q(),3e4),a=(0,ea.controlPlaneSubscriptions)(),r=a.subscribe({query:"subscription WorktreesChanged { worktreeOverviewChanged { worktreeId codebaseId } }"},{next:()=>void q(),error:()=>void 0,complete:()=>void 0}),s=a.subscribe({query:"subscription WorktreeBuildsChanged { buildsChanged { id } }"},{next:()=>void q(),error:()=>void 0,complete:()=>void 0});return()=>{window.clearTimeout(e),window.clearInterval(t),U.current+=1,r(),s()}},[q]),(0,a.useEffect)(()=>{let e=()=>n(new URLSearchParams(window.location.search).get("issue"));return window.addEventListener("popstate",e),()=>window.removeEventListener("popstate",e)},[]);let F=e=>{let t,a;t=new URLSearchParams(window.location.search),e?t.set("issue",e):t.delete("issue"),a=t.toString(),window.history.pushState(null,"",`${window.location.pathname}${a?`?${a}`:""}`),n(e)},H=async()=>{u(!0),x(!0);try{await (0,ea.controlPlaneRequest)(`mutation RefreshWorktrees {
96
+ refreshWorktrees
97
+ }`),await q(),y(e=>e+1),j(null)}catch(e){j(e instanceof Error?e.message:String(e))}finally{x(!1),u(!1)}},z=async()=>{let t=i?.agents.flatMap(e=>e.codebases.map(e=>e.codebase.id))??[];if(t.length){x(!0);try{await (0,ea.controlPlaneRequest)(`mutation FetchWorktreeCodebases($input: RunCodebaseOperationInput!) {
98
+ fetchCodebases(input: $input) { jobs { id } skipped { codebaseId reason } }
99
+ }`,{input:{codebaseIds:t,requestId:(0,et.createClientId)()}}),f(e("fetchStarted")),j(null),await q()}catch(e){j(e instanceof Error?e.message:String(e)),f(null)}finally{x(!1)}}},K=e=>{l(t=>t?{...t,agents:t.agents.map(t=>({...t,codebases:t.codebases.map(t=>({...t,worktrees:t.worktrees.map(t=>t.id===e.id?{...t,...e,ticketKey:e.ticketKey??t.ticketKey,ticketTitle:e.ticketTitle??t.ticketTitle,ticketStatus:e.ticketStatus??t.ticketStatus,pullRequest:e.pullRequest??t.pullRequest}:t)}))}))}:t)},J=(0,a.useMemo)(()=>{let e=new Map;return i?.agents.forEach(t=>t.codebases.forEach(t=>e.set(t.repository.id,{id:t.repository.id,name:t.repository.name}))),[...e.values()].sort((e,t)=>e.name.localeCompare(t.name))},[i]),Y=(0,a.useMemo)(()=>em(i?.agents??[],{query:B,agentId:L===eg?null:L,repositoryId:P===eg?null:P}),[L,i,B,P]),Z=!!B.trim()||L!==eg||P!==eg;return(0,t.jsxs)("section",{className:"flex w-full flex-col gap-6",children:[(0,t.jsxs)("div",{className:"flex flex-wrap items-start justify-between gap-4",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)("h1",{className:"text-2xl font-semibold tracking-tight",children:e("title")}),(0,t.jsx)("p",{className:"mt-1 text-sm text-muted-foreground",children:e("description")})]}),(0,t.jsxs)("div",{className:"flex flex-wrap gap-2",children:[(0,t.jsxs)(M.Button,{disabled:g,onClick:()=>void H(),variant:"outline",children:[(0,t.jsx)(w.RefreshCw,{className:c?"animate-spin":void 0})," ",e("refresh")]}),(0,t.jsxs)(M.Button,{disabled:g||!i?.agents.length,onClick:()=>void z(),variant:"outline",children:[(0,t.jsx)(T.Upload,{})," ",e("fetchNow")]}),(0,t.jsxs)(M.Button,{onClick:()=>D(!0),variant:"outline",children:[(0,t.jsx)(r.Archive,{})," ",e("hidden",{count:i?.hiddenCount??0})]}),(0,t.jsxs)(ee.ToggleGroup,{"aria-label":`${e("cards")} / ${e("table")}`,onValueChange:e=>{("cards"===e||"table"===e)&&(d(e),window.localStorage.setItem(eh,e))},size:"sm",spacing:0,type:"single",value:o,variant:"outline",children:[(0,t.jsx)(ee.ToggleGroupItem,{"aria-label":e("cards"),className:"px-2",value:"cards",children:(0,t.jsx)(p.Grid2X2,{})}),(0,t.jsx)(ee.ToggleGroupItem,{"aria-label":e("table"),className:"px-2",value:"table",children:(0,t.jsx)(m.List,{})})]})]})]}),b&&(0,t.jsx)($.Alert,{variant:"destructive",children:(0,t.jsx)($.AlertDescription,{children:b})}),v&&(0,t.jsx)($.Alert,{children:(0,t.jsx)($.AlertDescription,{children:v})}),i&&i.agents.length>0&&(0,t.jsxs)("div",{"aria-label":e("filters"),className:"flex flex-wrap gap-2",role:"search",children:[(0,t.jsxs)("div",{className:"relative min-w-0 flex-[2_1_18rem]",children:[(0,t.jsx)(S.Search,{className:"pointer-events-none absolute top-1/2 left-3 size-4 -translate-y-1/2 text-muted-foreground"}),(0,t.jsx)(G.Input,{"aria-label":e("searchWorktrees"),className:"pl-9",onChange:e=>R(e.target.value),placeholder:e("searchWorktreesPlaceholder"),type:"search",value:B})]}),(0,t.jsx)("div",{className:"min-w-0 flex-[1_1_12rem]",children:(0,t.jsxs)(X.Select,{onValueChange:W,value:L,children:[(0,t.jsx)(X.SelectTrigger,{"aria-label":e("filterByAgent"),className:"w-full",children:(0,t.jsx)(X.SelectValue,{})}),(0,t.jsxs)(X.SelectContent,{children:[(0,t.jsx)(X.SelectItem,{value:eg,children:e("allAgents")}),i.agents.map(e=>(0,t.jsx)(X.SelectItem,{value:e.agent.id,children:e.agent.name},e.agent.id))]})]})}),(0,t.jsx)("div",{className:"min-w-0 flex-[1_1_12rem]",children:(0,t.jsxs)(X.Select,{onValueChange:O,value:P,children:[(0,t.jsx)(X.SelectTrigger,{"aria-label":e("filterByRepository"),className:"w-full",children:(0,t.jsx)(X.SelectValue,{})}),(0,t.jsxs)(X.SelectContent,{children:[(0,t.jsx)(X.SelectItem,{value:eg,children:e("allRepositories")}),J.map(e=>(0,t.jsx)(X.SelectItem,{value:e.id,children:e.name},e.id))]})]})})]}),i&&i.activeMoves.length>0&&(0,t.jsx)(ew,{moves:i.activeMoves,onError:j,onNotice:f,onReload:q}),i&&(0,t.jsx)(ey,{onCreated:async()=>{await q(),f(e("worktreeCreated"))},overview:i}),c&&!i?(0,t.jsxs)("p",{className:"flex items-center gap-2 text-sm text-muted-foreground",children:[(0,t.jsx)(Q.Spinner,{})," ",e("loading")]}):i?.agents.length?Z&&0===Y.length?(0,t.jsx)(V.Empty,{className:"border py-12",children:(0,t.jsxs)(V.EmptyHeader,{children:[(0,t.jsx)(V.EmptyMedia,{variant:"icon",children:(0,t.jsx)(S.Search,{})}),(0,t.jsx)(V.EmptyTitle,{children:e("noMatchingWorktrees")}),(0,t.jsx)(V.EmptyDescription,{children:e("noMatchingWorktreesDescription")})]})}):Y.map(e=>(0,t.jsx)(eS,{agentGroup:e,allTags:i.tags,editorVariant:i.settings.editorVariant,inspectionRefreshToken:k,layout:o,onError:j,onManageTags:()=>I(!0),onOpenTicket:e=>F(e),onReload:q,onUpdate:K,overview:i},e.agent.id)):(0,t.jsx)(V.Empty,{className:"border py-12",children:(0,t.jsxs)(V.EmptyHeader,{children:[(0,t.jsx)(V.EmptyMedia,{variant:"icon",children:(0,t.jsx)(h.GitBranch,{})}),(0,t.jsx)(V.EmptyTitle,{children:e("emptyTitle")}),(0,t.jsx)(V.EmptyDescription,{children:e("emptyDescription")})]})}),(0,t.jsx)(eK,{onChanged:q,onOpenChange:I,open:C,tags:i?.tags??[]}),(0,t.jsx)(eJ,{onChanged:q,onOpenChange:D,open:N}),(0,t.jsx)(_.JiraTicketDrawer,{issueKey:s,onClose:()=>F(null)})]})},"displayedWorktreePath",0,ex,"filterWorktreeAgentGroups",0,em,"worktreeChangeActionState",0,eb])}]);
@@ -1 +1 @@
1
- (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,778434,e=>{"use strict";e.s(["AGENT_FIELDS",0,"id name hostname version osVersion architecture cpuModel memoryTotalBytes memoryFreeBytes diskTotalBytes diskFreeBytes capabilities baseRepoDirectory derivedDataLocationMode derivedDataPath buildsDirectory defaultBuildsDirectory effectiveBuildsDirectory connectionStatus ipAddress lastSeenAt disconnectedAt createdAt","JOB_FIELDS",0,"id agentId kind payload status error result timeoutSeconds createdAt startedAt finishedAt updatedAt","JOB_LOG_FIELDS",0,"id jobId sequence stream message createdAt"])},929592,e=>{"use strict";var t=e.i(843476),r=e.i(225913),o=e.i(975157);let a=(0,r.cva)("group/alert relative grid w-full gap-0.5 rounded-lg border px-2.5 py-2 text-left text-sm has-data-[slot=alert-action]:relative has-data-[slot=alert-action]:pr-18 has-[>svg]:grid-cols-[auto_1fr] has-[>svg]:gap-x-2 *:[svg]:row-span-2 *:[svg]:translate-y-0.5 *:[svg]:text-current *:[svg:not([class*='size-'])]:size-4",{variants:{variant:{default:"bg-card text-card-foreground",destructive:"bg-card text-destructive *:data-[slot=alert-description]:text-destructive/90 *:[svg]:text-current"}},defaultVariants:{variant:"default"}});e.s(["Alert",0,function({className:e,variant:r,...n}){return(0,t.jsx)("div",{"data-slot":"alert",role:"alert",className:(0,o.cn)(a({variant:r}),e),...n})},"AlertDescription",0,function({className:e,...r}){return(0,t.jsx)("div",{"data-slot":"alert-description",className:(0,o.cn)("text-sm text-balance text-muted-foreground md:text-pretty [&_a]:underline [&_a]:underline-offset-3 [&_a]:hover:text-foreground [&_p:not(:last-child)]:mb-4",e),...r})}])},515288,e=>{"use strict";var t=e.i(843476),r=e.i(975157);e.s(["Card",0,function({className:e,size:o="default",...a}){return(0,t.jsx)("div",{"data-slot":"card","data-size":o,className:(0,r.cn)("group/card flex flex-col gap-(--card-spacing) overflow-hidden rounded-xl bg-card py-(--card-spacing) text-sm text-card-foreground ring-1 ring-foreground/10 [--card-spacing:--spacing(4)] has-data-[slot=card-footer]:pb-0 has-[>img:first-child]:pt-0 data-[size=sm]:[--card-spacing:--spacing(3)] data-[size=sm]:has-data-[slot=card-footer]:pb-0 *:[img:first-child]:rounded-t-xl *:[img:last-child]:rounded-b-xl",e),...a})},"CardAction",0,function({className:e,...o}){return(0,t.jsx)("div",{"data-slot":"card-action",className:(0,r.cn)("col-start-2 row-span-2 row-start-1 self-start justify-self-end",e),...o})},"CardContent",0,function({className:e,...o}){return(0,t.jsx)("div",{"data-slot":"card-content",className:(0,r.cn)("px-(--card-spacing)",e),...o})},"CardDescription",0,function({className:e,...o}){return(0,t.jsx)("div",{"data-slot":"card-description",className:(0,r.cn)("text-sm text-muted-foreground",e),...o})},"CardFooter",0,function({className:e,...o}){return(0,t.jsx)("div",{"data-slot":"card-footer",className:(0,r.cn)("flex items-center rounded-b-xl border-t bg-muted/50 p-(--card-spacing)",e),...o})},"CardHeader",0,function({className:e,...o}){return(0,t.jsx)("div",{"data-slot":"card-header",className:(0,r.cn)("group/card-header @container/card-header grid auto-rows-min items-start gap-1 rounded-t-xl px-(--card-spacing) has-data-[slot=card-action]:grid-cols-[1fr_auto] has-data-[slot=card-description]:grid-rows-[auto_auto] [.border-b]:pb-(--card-spacing)",e),...o})},"CardTitle",0,function({className:e,...o}){return(0,t.jsx)("div",{"data-slot":"card-title",className:(0,r.cn)("font-heading text-base leading-snug font-medium group-data-[size=sm]/card:text-sm",e),...o})}])},758379,e=>{"use strict";let t=(0,e.i(456420).default)("loader-circle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]]);e.s(["default",0,t])},987968,e=>{"use strict";var t=e.i(843476),r=e.i(975157),o=e.i(758379),o=o;e.s(["Spinner",0,function({className:e,...a}){return(0,t.jsx)(o.default,{"data-slot":"spinner",role:"status","aria-label":"Loading",className:(0,r.cn)("size-4 animate-spin",e),...a})}],987968)},637611,e=>{"use strict";var t,r,o=e.i(247167);function a(e){return null===e?"null":Array.isArray(e)?"array":typeof e}function n(e){return"object"===a(e)}function s(e,t){return e.length<124?e:t}var i=((t=i||{})[t.InternalServerError=4500]="InternalServerError",t[t.InternalClientError=4005]="InternalClientError",t[t.BadRequest=4400]="BadRequest",t[t.BadResponse=4004]="BadResponse",t[t.Unauthorized=4401]="Unauthorized",t[t.Forbidden=4403]="Forbidden",t[t.SubprotocolNotAcceptable=4406]="SubprotocolNotAcceptable",t[t.ConnectionInitialisationTimeout=4408]="ConnectionInitialisationTimeout",t[t.ConnectionAcknowledgementTimeout=4504]="ConnectionAcknowledgementTimeout",t[t.SubscriberAlreadyExists=4409]="SubscriberAlreadyExists",t[t.TooManyInitialisationRequests=4429]="TooManyInitialisationRequests",t),c=((r=c||{}).ConnectionInit="connection_init",r.ConnectionAck="connection_ack",r.Ping="ping",r.Pong="pong",r.Subscribe="subscribe",r.Next="next",r.Error="error",r.Complete="complete",r);function l(e){if(!n(e))throw Error(`Message is expected to be an object, but got ${a(e)}`);if(!e.type)throw Error("Message is missing the 'type' property");if("string"!=typeof e.type)throw Error(`Message is expects the 'type' property to be a string, but got ${a(e.type)}`);switch(e.type){case"connection_init":case"connection_ack":case"ping":case"pong":if(null!=e.payload&&!n(e.payload))throw Error(`"${e.type}" message expects the 'payload' property to be an object or nullish or missing, but got "${e.payload}"`);break;case"subscribe":if("string"!=typeof e.id)throw Error(`"${e.type}" message expects the 'id' property to be a string, but got ${a(e.id)}`);if(!e.id)throw Error(`"${e.type}" message requires a non-empty 'id' property`);if(!n(e.payload))throw Error(`"${e.type}" message expects the 'payload' property to be an object, but got ${a(e.payload)}`);if("string"!=typeof e.payload.query)throw Error(`"${e.type}" message payload expects the 'query' property to be a string, but got ${a(e.payload.query)}`);if(null!=e.payload.variables&&!n(e.payload.variables))throw Error(`"${e.type}" message payload expects the 'variables' property to be a an object or nullish or missing, but got ${a(e.payload.variables)}`);if(null!=e.payload.operationName&&"string"!==a(e.payload.operationName))throw Error(`"${e.type}" message payload expects the 'operationName' property to be a string or nullish or missing, but got ${a(e.payload.operationName)}`);if(null!=e.payload.extensions&&!n(e.payload.extensions))throw Error(`"${e.type}" message payload expects the 'extensions' property to be a an object or nullish or missing, but got ${a(e.payload.extensions)}`);break;case"next":if("string"!=typeof e.id)throw Error(`"${e.type}" message expects the 'id' property to be a string, but got ${a(e.id)}`);if(!e.id)throw Error(`"${e.type}" message requires a non-empty 'id' property`);if(!n(e.payload))throw Error(`"${e.type}" message expects the 'payload' property to be an object, but got ${a(e.payload)}`);break;case"error":var t;if("string"!=typeof e.id)throw Error(`"${e.type}" message expects the 'id' property to be a string, but got ${a(e.id)}`);if(!e.id)throw Error(`"${e.type}" message requires a non-empty 'id' property`);if(!(Array.isArray(t=e.payload)&&t.length>0&&t.every(e=>"message"in e)))throw Error(`"${e.type}" message expects the 'payload' property to be an array of GraphQL errors, but got ${JSON.stringify(e.payload)}`);break;case"complete":if("string"!=typeof e.id)throw Error(`"${e.type}" message expects the 'id' property to be a string, but got ${a(e.id)}`);if(!e.id)throw Error(`"${e.type}" message requires a non-empty 'id' property`);break;default:throw Error(`Invalid message 'type' property "${e.type}"`)}return e}function d(e,t){return l(e),JSON.stringify(e,t)}class p extends Error{name="TerminatedCloseEvent";message="4499: Terminated";code=4499;reason="Terminated";wasClean=!1}function u(e){return n(e)&&"code"in e&&"reason"in e}async function m(e,t){let r=await fetch("/api/graphql",{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({query:e,variables:t})}),o=await r.json();if(!r.ok||o.errors?.length||!o.data)throw Error(o.errors?.map(e=>e.message).join("; ")||`HTTP ${r.status}`);return o.data}let y=null;function g(){let e=o.default.env.NEXT_PUBLIC_AGENT_WS_URL;return e||("https:"===window.location.protocol?`wss://${window.location.host}/graphql`:`ws://${window.location.hostname}:3091/graphql`)}e.s(["controlPlaneRequest",0,m,"controlPlaneSubscriptions",0,function(){return y??=function(t){let r,o,a,n,{url:m,connectionParams:y,lazy:g=!0,onNonLazyError:f=console.error,lazyCloseTimeout:h=0,keepAlive:x=0,disablePong:b,connectionAckWaitTimeout:v=0,retryAttempts:w=5,retryWait:E=async function(e){let t=Math.pow(2,e);await new Promise(e=>setTimeout(e,1e3*t+Math.floor(2700*Math.random()+300)))},shouldRetry:N=u,on:C,webSocketImpl:S,generateID:T=function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,e=>{let t=16*Math.random()|0;return("x"==e?t:3&t|8).toString(16)})},jsonMessageReplacer:j,jsonMessageReviver:A}=t;if(S){var $;if(!("function"==typeof($=S)&&"constructor"in $&&"CLOSED"in $&&"CLOSING"in $&&"CONNECTING"in $&&"OPEN"in $))throw Error("Invalid WebSocket implementation provided");r=S}else r="u">typeof WebSocket?WebSocket:e.g.WebSocket||e.g.MozWebSocket;if(!r)throw Error("WebSocket implementation missing; on Node you can `import WebSocket from 'ws';` and pass `webSocketImpl: WebSocket` to `createClient`");let k=r,I=(o={},a={on:(e,t)=>(o[e]=t,()=>{delete o[e]}),emit(e){"id"in e&&o[e.id]?.(e)}},n={connecting:C?.connecting?[C.connecting]:[],opened:C?.opened?[C.opened]:[],connected:C?.connected?[C.connected]:[],ping:C?.ping?[C.ping]:[],pong:C?.pong?[C.pong]:[],message:C?.message?[a.emit,C.message]:[a.emit],closed:C?.closed?[C.closed]:[],error:C?.error?[C.error]:[]},{onMessage:a.on,on(e,t){let r=n[e];return r.push(t),()=>{r.splice(r.indexOf(t),1)}},emit(e,...t){for(let r of[...n[e]])r(...t)}});function R(e){let t=[I.on("error",r=>{t.forEach(e=>e()),e(r)}),I.on("closed",r=>{t.forEach(e=>e()),e(r)})]}let _,O=0,P,M=!1,q=0,B=!1;async function z(){clearTimeout(P);let[e,t]=await (_??(_=new Promise((e,t)=>(async()=>{let r,o;if(M){if(await E(q),!O)return _=void 0,t({code:1e3,reason:"All Subscriptions Gone"});q++}I.emit("connecting",M);let a=new k("function"==typeof m?await m():m,"graphql-transport-ws");function n(){isFinite(x)&&x>0&&(clearTimeout(o),o=setTimeout(()=>{a.readyState===k.OPEN&&(a.send(d({type:c.Ping})),I.emit("ping",!1,void 0))},x))}R(e=>{_=void 0,clearTimeout(r),clearTimeout(o),t(e),e instanceof p&&(a.close(4499,"Terminated"),a.onerror=null,a.onclose=null)}),a.onerror=e=>I.emit("error",e),a.onclose=e=>I.emit("closed",e),a.onopen=async()=>{try{I.emit("opened",a);let e="function"==typeof y?await y():y;if(a.readyState!==k.OPEN)return;a.send(d(e?{type:c.ConnectionInit,payload:e}:{type:c.ConnectionInit},j)),isFinite(v)&&v>0&&(r=setTimeout(()=>{a.close(i.ConnectionAcknowledgementTimeout,"Connection acknowledgement timeout")},v)),n()}catch(e){I.emit("error",e),a.close(i.InternalClientError,s(e instanceof Error?e.message:String(e),"Internal client error"))}};let u=!1;a.onmessage=({data:t})=>{try{let o=l("string"==typeof t?JSON.parse(t,A):t);if(I.emit("message",o),"ping"===o.type||"pong"===o.type){I.emit(o.type,!0,o.payload),"pong"===o.type?n():b||(a.send(d(o.payload?{type:c.Pong,payload:o.payload}:{type:c.Pong})),I.emit("pong",!1,o.payload));return}if(u)return;if(o.type!==c.ConnectionAck)throw Error(`First message cannot be of type ${o.type}`);clearTimeout(r),u=!0,I.emit("connected",a,o.payload,M),M=!1,q=0,e([a,new Promise((e,t)=>R(t))])}catch(e){a.onmessage=null,I.emit("error",e),a.close(i.BadResponse,s(e instanceof Error?e.message:String(e),"Bad response"))}}})())));e.readyState===k.CLOSING&&await t;let r=()=>{},o=new Promise(e=>r=e);return[e,r,Promise.race([o.then(()=>{O||(isFinite(h)&&h>0?P=setTimeout(()=>{e.readyState===k.OPEN&&e.close(1e3,"Normal Closure")},h):e.close(1e3,"Normal Closure"))}),t])]}function D(e){var t;if(u(e)&&(![1e3,1001,1006,1005,1012,1013,1014].includes(t=e.code)&&t>=1e3&&t<=1999||[i.InternalServerError,i.InternalClientError,i.BadRequest,i.BadResponse,i.Unauthorized,i.SubprotocolNotAcceptable,i.SubscriberAlreadyExists,i.TooManyInitialisationRequests].includes(e.code)))throw e;if(B)return!1;if(u(e)&&1e3===e.code)return O>0;if(!w||q>=w||!N(e))throw e;return M=!0}function L(e,t){let r=T(e),o=!1,a=!1,n=()=>{O--,o=!0};return(async()=>{for(O++;;)try{let[s,i,l]=await z();if(o)return i();let p=I.onMessage(r,e=>{switch(e.type){case c.Next:return void t.next(e.payload);case c.Error:a=!0,o=!0,t.error(e.payload),n();return;case c.Complete:o=!0,n();return}});s.send(d({id:r,type:c.Subscribe,payload:e},j)),n=()=>{o||s.readyState!==k.OPEN||s.send(d({id:r,type:c.Complete},j)),O--,o=!0,i()},await l.finally(p);return}catch(e){if(!D(e))return}})().then(()=>{a||t.complete()}).catch(e=>{t.error(e)}),()=>{o||n()}}return g||(async()=>{for(O++;;)try{let[,,e]=await z();await e}catch(e){try{if(!D(e))return}catch(e){return f?.(e)}}})(),{on:I.on,subscribe:L,iterate(e){let t=[],r={done:!1,error:null,resolve:()=>{}},o=L(e,{next(e){t.push(e),r.resolve()},error(e){r.done=!0,r.error=e,r.resolve()},complete(){r.done=!0,r.resolve()}}),a=async function*(){for(;;){for(t.length||await new Promise(e=>r.resolve=e);t.length;)yield t.shift();if(r.error)throw r.error;if(r.done)return}}();return a.throw=async e=>(r.done||(r.done=!0,r.error=e,r.resolve()),{done:!0,value:void 0}),a.return=async()=>(o(),{done:!0,value:void 0}),a},async dispose(){if(B=!0,_){let[e]=await _;e.close(1e3,"Normal Closure")}},terminate(){_&&I.emit("closed",new p)}}}({url:g,lazy:!0,retryAttempts:1/0,shouldRetry:()=>!0})}],637611)},784774,e=>{"use strict";var t=e.i(843476),r=e.i(975157);e.s(["Table",0,function({className:e,containerClassName:o,...a}){return(0,t.jsx)("div",{className:(0,r.cn)("w-full overflow-x-auto",o),children:(0,t.jsx)("table",{className:(0,r.cn)("w-full caption-bottom text-sm",e),...a})})},"TableBody",0,function({className:e,...o}){return(0,t.jsx)("tbody",{className:(0,r.cn)("divide-y",e),...o})},"TableCell",0,function({className:e,...o}){return(0,t.jsx)("td",{className:(0,r.cn)("whitespace-nowrap px-3 py-3 align-middle",e),...o})},"TableFooter",0,function({className:e,...o}){return(0,t.jsx)("tfoot",{className:(0,r.cn)("border-t bg-muted/50 font-medium",e),...o})},"TableHead",0,function({className:e,...o}){return(0,t.jsx)("th",{className:(0,r.cn)("h-10 whitespace-nowrap px-3 text-left align-middle text-xs font-medium text-muted-foreground",e),...o})},"TableHeader",0,function({className:e,...o}){return(0,t.jsx)("thead",{className:(0,r.cn)("border-b",e),...o})},"TableRow",0,function({className:e,...o}){return(0,t.jsx)("tr",{className:(0,r.cn)("transition-colors hover:bg-muted/40",e),...o})}])},741120,e=>{"use strict";let t=(0,e.i(456420).default)("refresh-cw",[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]]);e.s(["RefreshCw",0,t],741120)},867927,e=>{"use strict";var t=e.i(986253);e.s(["ChevronRight",()=>t.default])},26495,e=>{"use strict";let t=(0,e.i(456420).default)("chevron-down",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);e.s(["default",0,t])},82612,e=>{"use strict";var t=e.i(843476),r=e.i(225913),o=e.i(975157);let a=(0,r.cva)("mb-2 flex shrink-0 items-center justify-center [&_svg]:pointer-events-none [&_svg]:shrink-0",{variants:{variant:{default:"bg-transparent",icon:"flex size-8 shrink-0 items-center justify-center rounded-lg bg-muted text-foreground [&_svg:not([class*='size-'])]:size-4"}},defaultVariants:{variant:"default"}});e.s(["Empty",0,function({className:e,...r}){return(0,t.jsx)("div",{"data-slot":"empty",className:(0,o.cn)("flex w-full min-w-0 flex-1 flex-col items-center justify-center gap-4 rounded-xl border-dashed p-6 text-center text-balance",e),...r})},"EmptyDescription",0,function({className:e,...r}){return(0,t.jsx)("div",{"data-slot":"empty-description",className:(0,o.cn)("text-sm/relaxed text-muted-foreground [&>a]:underline [&>a]:underline-offset-4 [&>a:hover]:text-primary",e),...r})},"EmptyHeader",0,function({className:e,...r}){return(0,t.jsx)("div",{"data-slot":"empty-header",className:(0,o.cn)("flex max-w-sm flex-col items-center gap-2",e),...r})},"EmptyMedia",0,function({className:e,variant:r="default",...n}){return(0,t.jsx)("div",{"data-slot":"empty-icon","data-variant":r,className:(0,o.cn)(a({variant:r,className:e})),...n})},"EmptyTitle",0,function({className:e,...r}){return(0,t.jsx)("div",{"data-slot":"empty-title",className:(0,o.cn)("font-heading text-sm font-medium tracking-tight",e),...r})}])},462777,e=>{"use strict";async function t(e){if(navigator.clipboard?.writeText)try{await navigator.clipboard.writeText(e);return}catch{}let t=document.createElement("textarea");t.value=e,t.style.position="fixed",t.style.opacity="0",document.body.append(t),t.select();let r=document.execCommand("copy");if(t.remove(),!r)throw Error("Copy is not supported by this browser")}e.s(["copyText",0,t,"createClientId",0,function(){try{if(globalThis.crypto?.randomUUID)return globalThis.crypto.randomUUID()}catch{}if(globalThis.crypto?.getRandomValues)try{let e=globalThis.crypto.getRandomValues(new Uint8Array(16));return Array.from(e,e=>e.toString(16).padStart(2,"0")).join("")}catch{}return`${Date.now().toString(36)}-${Math.random().toString(36).slice(2)}`}])},986253,e=>{"use strict";let t=(0,e.i(456420).default)("chevron-right",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);e.s(["default",0,t])},716327,e=>{"use strict";var t=e.i(26495);e.s(["ChevronDown",()=>t.default])},990142,e=>{"use strict";RegExp("^[A-Za-z0-9][A-Za-z0-9_-]{0,127}$"),e.s(["CCUSAGE_REPORT_JOB_KIND",0,"ccusage.report"])}]);
1
+ (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,778434,e=>{"use strict";e.s(["AGENT_FIELDS",0,"id name hostname version osVersion architecture cpuModel memoryTotalBytes memoryFreeBytes diskTotalBytes diskFreeBytes capabilities baseRepoDirectory derivedDataLocationMode derivedDataPath buildsDirectory defaultBuildsDirectory effectiveBuildsDirectory connectionStatus ipAddress lastSeenAt disconnectedAt createdAt","JOB_FIELDS",0,"id agentId kind payload status error result timeoutSeconds createdAt startedAt finishedAt updatedAt","JOB_LOG_FIELDS",0,"id jobId sequence stream message createdAt"])},929592,e=>{"use strict";var t=e.i(843476),r=e.i(225913),o=e.i(975157);let a=(0,r.cva)("group/alert relative grid w-full gap-0.5 rounded-lg border px-2.5 py-2 text-left text-sm has-data-[slot=alert-action]:relative has-data-[slot=alert-action]:pr-18 has-[>svg]:grid-cols-[auto_1fr] has-[>svg]:gap-x-2 *:[svg]:row-span-2 *:[svg]:translate-y-0.5 *:[svg]:text-current *:[svg:not([class*='size-'])]:size-4",{variants:{variant:{default:"bg-card text-card-foreground",destructive:"bg-card text-destructive *:data-[slot=alert-description]:text-destructive/90 *:[svg]:text-current"}},defaultVariants:{variant:"default"}});e.s(["Alert",0,function({className:e,variant:r,...n}){return(0,t.jsx)("div",{"data-slot":"alert",role:"alert",className:(0,o.cn)(a({variant:r}),e),...n})},"AlertDescription",0,function({className:e,...r}){return(0,t.jsx)("div",{"data-slot":"alert-description",className:(0,o.cn)("text-sm text-balance text-muted-foreground md:text-pretty [&_a]:underline [&_a]:underline-offset-3 [&_a]:hover:text-foreground [&_p:not(:last-child)]:mb-4",e),...r})}])},515288,e=>{"use strict";var t=e.i(843476),r=e.i(975157);e.s(["Card",0,function({className:e,size:o="default",...a}){return(0,t.jsx)("div",{"data-slot":"card","data-size":o,className:(0,r.cn)("group/card flex flex-col gap-(--card-spacing) overflow-hidden rounded-xl bg-card py-(--card-spacing) text-sm text-card-foreground ring-1 ring-foreground/10 [--card-spacing:--spacing(4)] has-data-[slot=card-footer]:pb-0 has-[>img:first-child]:pt-0 data-[size=sm]:[--card-spacing:--spacing(3)] data-[size=sm]:has-data-[slot=card-footer]:pb-0 *:[img:first-child]:rounded-t-xl *:[img:last-child]:rounded-b-xl",e),...a})},"CardAction",0,function({className:e,...o}){return(0,t.jsx)("div",{"data-slot":"card-action",className:(0,r.cn)("col-start-2 row-span-2 row-start-1 self-start justify-self-end",e),...o})},"CardContent",0,function({className:e,...o}){return(0,t.jsx)("div",{"data-slot":"card-content",className:(0,r.cn)("px-(--card-spacing)",e),...o})},"CardDescription",0,function({className:e,...o}){return(0,t.jsx)("div",{"data-slot":"card-description",className:(0,r.cn)("text-sm text-muted-foreground",e),...o})},"CardFooter",0,function({className:e,...o}){return(0,t.jsx)("div",{"data-slot":"card-footer",className:(0,r.cn)("flex items-center rounded-b-xl border-t bg-muted/50 p-(--card-spacing)",e),...o})},"CardHeader",0,function({className:e,...o}){return(0,t.jsx)("div",{"data-slot":"card-header",className:(0,r.cn)("group/card-header @container/card-header grid auto-rows-min items-start gap-1 rounded-t-xl px-(--card-spacing) has-data-[slot=card-action]:grid-cols-[1fr_auto] has-data-[slot=card-description]:grid-rows-[auto_auto] [.border-b]:pb-(--card-spacing)",e),...o})},"CardTitle",0,function({className:e,...o}){return(0,t.jsx)("div",{"data-slot":"card-title",className:(0,r.cn)("font-heading text-base leading-snug font-medium group-data-[size=sm]/card:text-sm",e),...o})}])},758379,e=>{"use strict";let t=(0,e.i(456420).default)("loader-circle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]]);e.s(["default",0,t])},987968,e=>{"use strict";var t=e.i(843476),r=e.i(975157),o=e.i(758379),o=o;e.s(["Spinner",0,function({className:e,...a}){return(0,t.jsx)(o.default,{"data-slot":"spinner",role:"status","aria-label":"Loading",className:(0,r.cn)("size-4 animate-spin",e),...a})}],987968)},637611,e=>{"use strict";var t,r,o=e.i(247167);function a(e){return null===e?"null":Array.isArray(e)?"array":typeof e}function n(e){return"object"===a(e)}function s(e,t){return e.length<124?e:t}var i=((t=i||{})[t.InternalServerError=4500]="InternalServerError",t[t.InternalClientError=4005]="InternalClientError",t[t.BadRequest=4400]="BadRequest",t[t.BadResponse=4004]="BadResponse",t[t.Unauthorized=4401]="Unauthorized",t[t.Forbidden=4403]="Forbidden",t[t.SubprotocolNotAcceptable=4406]="SubprotocolNotAcceptable",t[t.ConnectionInitialisationTimeout=4408]="ConnectionInitialisationTimeout",t[t.ConnectionAcknowledgementTimeout=4504]="ConnectionAcknowledgementTimeout",t[t.SubscriberAlreadyExists=4409]="SubscriberAlreadyExists",t[t.TooManyInitialisationRequests=4429]="TooManyInitialisationRequests",t),c=((r=c||{}).ConnectionInit="connection_init",r.ConnectionAck="connection_ack",r.Ping="ping",r.Pong="pong",r.Subscribe="subscribe",r.Next="next",r.Error="error",r.Complete="complete",r);function l(e){if(!n(e))throw Error(`Message is expected to be an object, but got ${a(e)}`);if(!e.type)throw Error("Message is missing the 'type' property");if("string"!=typeof e.type)throw Error(`Message is expects the 'type' property to be a string, but got ${a(e.type)}`);switch(e.type){case"connection_init":case"connection_ack":case"ping":case"pong":if(null!=e.payload&&!n(e.payload))throw Error(`"${e.type}" message expects the 'payload' property to be an object or nullish or missing, but got "${e.payload}"`);break;case"subscribe":if("string"!=typeof e.id)throw Error(`"${e.type}" message expects the 'id' property to be a string, but got ${a(e.id)}`);if(!e.id)throw Error(`"${e.type}" message requires a non-empty 'id' property`);if(!n(e.payload))throw Error(`"${e.type}" message expects the 'payload' property to be an object, but got ${a(e.payload)}`);if("string"!=typeof e.payload.query)throw Error(`"${e.type}" message payload expects the 'query' property to be a string, but got ${a(e.payload.query)}`);if(null!=e.payload.variables&&!n(e.payload.variables))throw Error(`"${e.type}" message payload expects the 'variables' property to be a an object or nullish or missing, but got ${a(e.payload.variables)}`);if(null!=e.payload.operationName&&"string"!==a(e.payload.operationName))throw Error(`"${e.type}" message payload expects the 'operationName' property to be a string or nullish or missing, but got ${a(e.payload.operationName)}`);if(null!=e.payload.extensions&&!n(e.payload.extensions))throw Error(`"${e.type}" message payload expects the 'extensions' property to be a an object or nullish or missing, but got ${a(e.payload.extensions)}`);break;case"next":if("string"!=typeof e.id)throw Error(`"${e.type}" message expects the 'id' property to be a string, but got ${a(e.id)}`);if(!e.id)throw Error(`"${e.type}" message requires a non-empty 'id' property`);if(!n(e.payload))throw Error(`"${e.type}" message expects the 'payload' property to be an object, but got ${a(e.payload)}`);break;case"error":var t;if("string"!=typeof e.id)throw Error(`"${e.type}" message expects the 'id' property to be a string, but got ${a(e.id)}`);if(!e.id)throw Error(`"${e.type}" message requires a non-empty 'id' property`);if(!(Array.isArray(t=e.payload)&&t.length>0&&t.every(e=>"message"in e)))throw Error(`"${e.type}" message expects the 'payload' property to be an array of GraphQL errors, but got ${JSON.stringify(e.payload)}`);break;case"complete":if("string"!=typeof e.id)throw Error(`"${e.type}" message expects the 'id' property to be a string, but got ${a(e.id)}`);if(!e.id)throw Error(`"${e.type}" message requires a non-empty 'id' property`);break;default:throw Error(`Invalid message 'type' property "${e.type}"`)}return e}function d(e,t){return l(e),JSON.stringify(e,t)}class p extends Error{name="TerminatedCloseEvent";message="4499: Terminated";code=4499;reason="Terminated";wasClean=!1}function u(e){return n(e)&&"code"in e&&"reason"in e}async function m(e,t){let r=await fetch("/api/graphql",{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({query:e,variables:t})}),o=await r.json();if(!r.ok||o.errors?.length||!o.data)throw Error(o.errors?.map(e=>e.message).join("; ")||`HTTP ${r.status}`);return o.data}let y=null;function g(){let e=o.default.env.NEXT_PUBLIC_AGENT_WS_URL;return e||("https:"===window.location.protocol?`wss://${window.location.host}/graphql`:`ws://${window.location.hostname}:3091/graphql`)}e.s(["controlPlaneRequest",0,m,"controlPlaneSubscriptions",0,function(){return y??=function(t){let r,o,a,n,{url:m,connectionParams:y,lazy:g=!0,onNonLazyError:f=console.error,lazyCloseTimeout:h=0,keepAlive:x=0,disablePong:b,connectionAckWaitTimeout:v=0,retryAttempts:w=5,retryWait:E=async function(e){let t=Math.pow(2,e);await new Promise(e=>setTimeout(e,1e3*t+Math.floor(2700*Math.random()+300)))},shouldRetry:N=u,on:C,webSocketImpl:S,generateID:T=function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,e=>{let t=16*Math.random()|0;return("x"==e?t:3&t|8).toString(16)})},jsonMessageReplacer:j,jsonMessageReviver:A}=t;if(S){var $;if(!("function"==typeof($=S)&&"constructor"in $&&"CLOSED"in $&&"CLOSING"in $&&"CONNECTING"in $&&"OPEN"in $))throw Error("Invalid WebSocket implementation provided");r=S}else r="u">typeof WebSocket?WebSocket:e.g.WebSocket||e.g.MozWebSocket;if(!r)throw Error("WebSocket implementation missing; on Node you can `import WebSocket from 'ws';` and pass `webSocketImpl: WebSocket` to `createClient`");let k=r,I=(o={},a={on:(e,t)=>(o[e]=t,()=>{delete o[e]}),emit(e){"id"in e&&o[e.id]?.(e)}},n={connecting:C?.connecting?[C.connecting]:[],opened:C?.opened?[C.opened]:[],connected:C?.connected?[C.connected]:[],ping:C?.ping?[C.ping]:[],pong:C?.pong?[C.pong]:[],message:C?.message?[a.emit,C.message]:[a.emit],closed:C?.closed?[C.closed]:[],error:C?.error?[C.error]:[]},{onMessage:a.on,on(e,t){let r=n[e];return r.push(t),()=>{r.splice(r.indexOf(t),1)}},emit(e,...t){for(let r of[...n[e]])r(...t)}});function R(e){let t=[I.on("error",r=>{t.forEach(e=>e()),e(r)}),I.on("closed",r=>{t.forEach(e=>e()),e(r)})]}let _,O=0,P,M=!1,q=0,B=!1;async function z(){clearTimeout(P);let[e,t]=await (_??(_=new Promise((e,t)=>(async()=>{let r,o;if(M){if(await E(q),!O)return _=void 0,t({code:1e3,reason:"All Subscriptions Gone"});q++}I.emit("connecting",M);let a=new k("function"==typeof m?await m():m,"graphql-transport-ws");function n(){isFinite(x)&&x>0&&(clearTimeout(o),o=setTimeout(()=>{a.readyState===k.OPEN&&(a.send(d({type:c.Ping})),I.emit("ping",!1,void 0))},x))}R(e=>{_=void 0,clearTimeout(r),clearTimeout(o),t(e),e instanceof p&&(a.close(4499,"Terminated"),a.onerror=null,a.onclose=null)}),a.onerror=e=>I.emit("error",e),a.onclose=e=>I.emit("closed",e),a.onopen=async()=>{try{I.emit("opened",a);let e="function"==typeof y?await y():y;if(a.readyState!==k.OPEN)return;a.send(d(e?{type:c.ConnectionInit,payload:e}:{type:c.ConnectionInit},j)),isFinite(v)&&v>0&&(r=setTimeout(()=>{a.close(i.ConnectionAcknowledgementTimeout,"Connection acknowledgement timeout")},v)),n()}catch(e){I.emit("error",e),a.close(i.InternalClientError,s(e instanceof Error?e.message:String(e),"Internal client error"))}};let u=!1;a.onmessage=({data:t})=>{try{let o=l("string"==typeof t?JSON.parse(t,A):t);if(I.emit("message",o),"ping"===o.type||"pong"===o.type){I.emit(o.type,!0,o.payload),"pong"===o.type?n():b||(a.send(d(o.payload?{type:c.Pong,payload:o.payload}:{type:c.Pong})),I.emit("pong",!1,o.payload));return}if(u)return;if(o.type!==c.ConnectionAck)throw Error(`First message cannot be of type ${o.type}`);clearTimeout(r),u=!0,I.emit("connected",a,o.payload,M),M=!1,q=0,e([a,new Promise((e,t)=>R(t))])}catch(e){a.onmessage=null,I.emit("error",e),a.close(i.BadResponse,s(e instanceof Error?e.message:String(e),"Bad response"))}}})())));e.readyState===k.CLOSING&&await t;let r=()=>{},o=new Promise(e=>r=e);return[e,r,Promise.race([o.then(()=>{O||(isFinite(h)&&h>0?P=setTimeout(()=>{e.readyState===k.OPEN&&e.close(1e3,"Normal Closure")},h):e.close(1e3,"Normal Closure"))}),t])]}function D(e){var t;if(u(e)&&(![1e3,1001,1006,1005,1012,1013,1014].includes(t=e.code)&&t>=1e3&&t<=1999||[i.InternalServerError,i.InternalClientError,i.BadRequest,i.BadResponse,i.Unauthorized,i.SubprotocolNotAcceptable,i.SubscriberAlreadyExists,i.TooManyInitialisationRequests].includes(e.code)))throw e;if(B)return!1;if(u(e)&&1e3===e.code)return O>0;if(!w||q>=w||!N(e))throw e;return M=!0}function L(e,t){let r=T(e),o=!1,a=!1,n=()=>{O--,o=!0};return(async()=>{for(O++;;)try{let[s,i,l]=await z();if(o)return i();let p=I.onMessage(r,e=>{switch(e.type){case c.Next:return void t.next(e.payload);case c.Error:a=!0,o=!0,t.error(e.payload),n();return;case c.Complete:o=!0,n();return}});s.send(d({id:r,type:c.Subscribe,payload:e},j)),n=()=>{o||s.readyState!==k.OPEN||s.send(d({id:r,type:c.Complete},j)),O--,o=!0,i()},await l.finally(p);return}catch(e){if(!D(e))return}})().then(()=>{a||t.complete()}).catch(e=>{t.error(e)}),()=>{o||n()}}return g||(async()=>{for(O++;;)try{let[,,e]=await z();await e}catch(e){try{if(!D(e))return}catch(e){return f?.(e)}}})(),{on:I.on,subscribe:L,iterate(e){let t=[],r={done:!1,error:null,resolve:()=>{}},o=L(e,{next(e){t.push(e),r.resolve()},error(e){r.done=!0,r.error=e,r.resolve()},complete(){r.done=!0,r.resolve()}}),a=async function*(){for(;;){for(t.length||await new Promise(e=>r.resolve=e);t.length;)yield t.shift();if(r.error)throw r.error;if(r.done)return}}();return a.throw=async e=>(r.done||(r.done=!0,r.error=e,r.resolve()),{done:!0,value:void 0}),a.return=async()=>(o(),{done:!0,value:void 0}),a},async dispose(){if(B=!0,_){let[e]=await _;e.close(1e3,"Normal Closure")}},terminate(){_&&I.emit("closed",new p)}}}({url:g,lazy:!0,retryAttempts:1/0,shouldRetry:()=>!0})}],637611)},784774,e=>{"use strict";var t=e.i(843476),r=e.i(975157);e.s(["Table",0,function({className:e,containerClassName:o,...a}){return(0,t.jsx)("div",{className:(0,r.cn)("w-full overflow-x-auto",o),children:(0,t.jsx)("table",{className:(0,r.cn)("w-full caption-bottom text-sm",e),...a})})},"TableBody",0,function({className:e,...o}){return(0,t.jsx)("tbody",{className:(0,r.cn)("divide-y",e),...o})},"TableCell",0,function({className:e,...o}){return(0,t.jsx)("td",{className:(0,r.cn)("whitespace-nowrap px-3 py-3 align-middle",e),...o})},"TableFooter",0,function({className:e,...o}){return(0,t.jsx)("tfoot",{className:(0,r.cn)("border-t bg-muted/50 font-medium",e),...o})},"TableHead",0,function({className:e,...o}){return(0,t.jsx)("th",{className:(0,r.cn)("h-10 whitespace-nowrap px-3 text-left align-middle text-xs font-medium text-muted-foreground",e),...o})},"TableHeader",0,function({className:e,...o}){return(0,t.jsx)("thead",{className:(0,r.cn)("border-b",e),...o})},"TableRow",0,function({className:e,...o}){return(0,t.jsx)("tr",{className:(0,r.cn)("transition-colors hover:bg-muted/40",e),...o})}])},741120,e=>{"use strict";let t=(0,e.i(456420).default)("refresh-cw",[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]]);e.s(["RefreshCw",0,t],741120)},26495,e=>{"use strict";let t=(0,e.i(456420).default)("chevron-down",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);e.s(["default",0,t])},82612,e=>{"use strict";var t=e.i(843476),r=e.i(225913),o=e.i(975157);let a=(0,r.cva)("mb-2 flex shrink-0 items-center justify-center [&_svg]:pointer-events-none [&_svg]:shrink-0",{variants:{variant:{default:"bg-transparent",icon:"flex size-8 shrink-0 items-center justify-center rounded-lg bg-muted text-foreground [&_svg:not([class*='size-'])]:size-4"}},defaultVariants:{variant:"default"}});e.s(["Empty",0,function({className:e,...r}){return(0,t.jsx)("div",{"data-slot":"empty",className:(0,o.cn)("flex w-full min-w-0 flex-1 flex-col items-center justify-center gap-4 rounded-xl border-dashed p-6 text-center text-balance",e),...r})},"EmptyDescription",0,function({className:e,...r}){return(0,t.jsx)("div",{"data-slot":"empty-description",className:(0,o.cn)("text-sm/relaxed text-muted-foreground [&>a]:underline [&>a]:underline-offset-4 [&>a:hover]:text-primary",e),...r})},"EmptyHeader",0,function({className:e,...r}){return(0,t.jsx)("div",{"data-slot":"empty-header",className:(0,o.cn)("flex max-w-sm flex-col items-center gap-2",e),...r})},"EmptyMedia",0,function({className:e,variant:r="default",...n}){return(0,t.jsx)("div",{"data-slot":"empty-icon","data-variant":r,className:(0,o.cn)(a({variant:r,className:e})),...n})},"EmptyTitle",0,function({className:e,...r}){return(0,t.jsx)("div",{"data-slot":"empty-title",className:(0,o.cn)("font-heading text-sm font-medium tracking-tight",e),...r})}])},462777,e=>{"use strict";async function t(e){if(navigator.clipboard?.writeText)try{await navigator.clipboard.writeText(e);return}catch{}let t=document.createElement("textarea");t.value=e,t.style.position="fixed",t.style.opacity="0",document.body.append(t),t.select();let r=document.execCommand("copy");if(t.remove(),!r)throw Error("Copy is not supported by this browser")}e.s(["copyText",0,t,"createClientId",0,function(){try{if(globalThis.crypto?.randomUUID)return globalThis.crypto.randomUUID()}catch{}if(globalThis.crypto?.getRandomValues)try{let e=globalThis.crypto.getRandomValues(new Uint8Array(16));return Array.from(e,e=>e.toString(16).padStart(2,"0")).join("")}catch{}return`${Date.now().toString(36)}-${Math.random().toString(36).slice(2)}`}])},986253,e=>{"use strict";let t=(0,e.i(456420).default)("chevron-right",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);e.s(["default",0,t])},716327,e=>{"use strict";var t=e.i(26495);e.s(["ChevronDown",()=>t.default])},867927,e=>{"use strict";var t=e.i(986253);e.s(["ChevronRight",()=>t.default])},990142,e=>{"use strict";RegExp("^[A-Za-z0-9][A-Za-z0-9_-]{0,127}$"),e.s(["CCUSAGE_REPORT_JOB_KIND",0,"ccusage.report"])}]);