tower-studio 0.2.46 → 0.2.47

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 (290) hide show
  1. package/.next/standalone/.next/BUILD_ID +1 -1
  2. package/.next/standalone/.next/build-manifest.json +3 -3
  3. package/.next/standalone/.next/prerender-manifest.json +3 -3
  4. package/.next/standalone/.next/server/app/_global-error.html +1 -1
  5. package/.next/standalone/.next/server/app/_global-error.rsc +1 -1
  6. package/.next/standalone/.next/server/app/_global-error.segments/__PAGE__.segment.rsc +1 -1
  7. package/.next/standalone/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
  8. package/.next/standalone/.next/server/app/_global-error.segments/_head.segment.rsc +1 -1
  9. package/.next/standalone/.next/server/app/_global-error.segments/_index.segment.rsc +1 -1
  10. package/.next/standalone/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
  11. package/.next/standalone/.next/server/app/_not-found/page/react-loadable-manifest.json +3 -3
  12. package/.next/standalone/.next/server/app/_not-found/page/server-reference-manifest.json +82 -70
  13. package/.next/standalone/.next/server/app/_not-found/page.js +2 -1
  14. package/.next/standalone/.next/server/app/_not-found/page.js.nft.json +1 -1
  15. package/.next/standalone/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
  16. package/.next/standalone/.next/server/app/api/browse-fs/route.js.nft.json +1 -1
  17. package/.next/standalone/.next/server/app/api/git/route.js.nft.json +1 -1
  18. package/.next/standalone/.next/server/app/api/tasks/[taskId]/merge/route.js.nft.json +1 -1
  19. package/.next/standalone/.next/server/app/harness/page/react-loadable-manifest.json +3 -3
  20. package/.next/standalone/.next/server/app/harness/page/server-reference-manifest.json +92 -80
  21. package/.next/standalone/.next/server/app/harness/page.js +2 -1
  22. package/.next/standalone/.next/server/app/harness/page.js.nft.json +1 -1
  23. package/.next/standalone/.next/server/app/harness/page_client-reference-manifest.js +1 -1
  24. package/.next/standalone/.next/server/app/missions/page/react-loadable-manifest.json +3 -3
  25. package/.next/standalone/.next/server/app/missions/page/server-reference-manifest.json +150 -138
  26. package/.next/standalone/.next/server/app/missions/page.js +5 -4
  27. package/.next/standalone/.next/server/app/missions/page.js.nft.json +1 -1
  28. package/.next/standalone/.next/server/app/missions/page_client-reference-manifest.js +1 -1
  29. package/.next/standalone/.next/server/app/onboarding/page/react-loadable-manifest.json +3 -3
  30. package/.next/standalone/.next/server/app/onboarding/page/server-reference-manifest.json +82 -70
  31. package/.next/standalone/.next/server/app/onboarding/page.js +2 -1
  32. package/.next/standalone/.next/server/app/onboarding/page.js.nft.json +1 -1
  33. package/.next/standalone/.next/server/app/onboarding/page_client-reference-manifest.js +1 -1
  34. package/.next/standalone/.next/server/app/page/react-loadable-manifest.json +3 -3
  35. package/.next/standalone/.next/server/app/page/server-reference-manifest.json +82 -70
  36. package/.next/standalone/.next/server/app/page.js +2 -1
  37. package/.next/standalone/.next/server/app/page.js.nft.json +1 -1
  38. package/.next/standalone/.next/server/app/page_client-reference-manifest.js +1 -1
  39. package/.next/standalone/.next/server/app/settings/page/react-loadable-manifest.json +3 -3
  40. package/.next/standalone/.next/server/app/settings/page/server-reference-manifest.json +128 -116
  41. package/.next/standalone/.next/server/app/settings/page.js +4 -3
  42. package/.next/standalone/.next/server/app/settings/page.js.nft.json +1 -1
  43. package/.next/standalone/.next/server/app/settings/page_client-reference-manifest.js +1 -1
  44. package/.next/standalone/.next/server/app/workspaces/[workspaceId]/archive/page/react-loadable-manifest.json +3 -3
  45. package/.next/standalone/.next/server/app/workspaces/[workspaceId]/archive/page/server-reference-manifest.json +190 -178
  46. package/.next/standalone/.next/server/app/workspaces/[workspaceId]/archive/page.js +3 -2
  47. package/.next/standalone/.next/server/app/workspaces/[workspaceId]/archive/page.js.nft.json +1 -1
  48. package/.next/standalone/.next/server/app/workspaces/[workspaceId]/archive/page_client-reference-manifest.js +1 -1
  49. package/.next/standalone/.next/server/app/workspaces/[workspaceId]/assets/page/react-loadable-manifest.json +3 -3
  50. package/.next/standalone/.next/server/app/workspaces/[workspaceId]/assets/page/server-reference-manifest.json +166 -154
  51. package/.next/standalone/.next/server/app/workspaces/[workspaceId]/assets/page.js +3 -2
  52. package/.next/standalone/.next/server/app/workspaces/[workspaceId]/assets/page.js.nft.json +1 -1
  53. package/.next/standalone/.next/server/app/workspaces/[workspaceId]/assets/page_client-reference-manifest.js +1 -1
  54. package/.next/standalone/.next/server/app/workspaces/[workspaceId]/groups/page/react-loadable-manifest.json +3 -3
  55. package/.next/standalone/.next/server/app/workspaces/[workspaceId]/groups/page/server-reference-manifest.json +86 -74
  56. package/.next/standalone/.next/server/app/workspaces/[workspaceId]/groups/page.js +2 -1
  57. package/.next/standalone/.next/server/app/workspaces/[workspaceId]/groups/page.js.nft.json +1 -1
  58. package/.next/standalone/.next/server/app/workspaces/[workspaceId]/groups/page_client-reference-manifest.js +1 -1
  59. package/.next/standalone/.next/server/app/workspaces/[workspaceId]/notes/page/react-loadable-manifest.json +3 -3
  60. package/.next/standalone/.next/server/app/workspaces/[workspaceId]/notes/page/server-reference-manifest.json +150 -138
  61. package/.next/standalone/.next/server/app/workspaces/[workspaceId]/notes/page.js +3 -2
  62. package/.next/standalone/.next/server/app/workspaces/[workspaceId]/notes/page.js.nft.json +1 -1
  63. package/.next/standalone/.next/server/app/workspaces/[workspaceId]/notes/page_client-reference-manifest.js +1 -1
  64. package/.next/standalone/.next/server/app/workspaces/[workspaceId]/page/react-loadable-manifest.json +3 -3
  65. package/.next/standalone/.next/server/app/workspaces/[workspaceId]/page/server-reference-manifest.json +162 -162
  66. package/.next/standalone/.next/server/app/workspaces/[workspaceId]/page.js +4 -3
  67. package/.next/standalone/.next/server/app/workspaces/[workspaceId]/page.js.nft.json +1 -1
  68. package/.next/standalone/.next/server/app/workspaces/[workspaceId]/page_client-reference-manifest.js +1 -1
  69. package/.next/standalone/.next/server/app/workspaces/[workspaceId]/projects/[projectId]/page/react-loadable-manifest.json +3 -3
  70. package/.next/standalone/.next/server/app/workspaces/[workspaceId]/projects/[projectId]/page/server-reference-manifest.json +82 -70
  71. package/.next/standalone/.next/server/app/workspaces/[workspaceId]/projects/[projectId]/page.js +3 -2
  72. package/.next/standalone/.next/server/app/workspaces/[workspaceId]/projects/[projectId]/page.js.nft.json +1 -1
  73. package/.next/standalone/.next/server/app/workspaces/[workspaceId]/projects/[projectId]/page_client-reference-manifest.js +1 -1
  74. package/.next/standalone/.next/server/app/workspaces/[workspaceId]/projects/[projectId]/versions/page/react-loadable-manifest.json +3 -3
  75. package/.next/standalone/.next/server/app/workspaces/[workspaceId]/projects/[projectId]/versions/page/server-reference-manifest.json +140 -140
  76. package/.next/standalone/.next/server/app/workspaces/[workspaceId]/projects/[projectId]/versions/page.js +3 -2
  77. package/.next/standalone/.next/server/app/workspaces/[workspaceId]/projects/[projectId]/versions/page.js.nft.json +1 -1
  78. package/.next/standalone/.next/server/app/workspaces/[workspaceId]/projects/[projectId]/versions/page_client-reference-manifest.js +1 -1
  79. package/.next/standalone/.next/server/app/workspaces/[workspaceId]/tasks/[taskId]/page/react-loadable-manifest.json +4 -4
  80. package/.next/standalone/.next/server/app/workspaces/[workspaceId]/tasks/[taskId]/page/server-reference-manifest.json +182 -170
  81. package/.next/standalone/.next/server/app/workspaces/[workspaceId]/tasks/[taskId]/page.js +6 -5
  82. package/.next/standalone/.next/server/app/workspaces/[workspaceId]/tasks/[taskId]/page.js.nft.json +1 -1
  83. package/.next/standalone/.next/server/app/workspaces/[workspaceId]/tasks/[taskId]/page_client-reference-manifest.js +1 -1
  84. package/.next/standalone/.next/server/app/workspaces/page/react-loadable-manifest.json +3 -3
  85. package/.next/standalone/.next/server/app/workspaces/page/server-reference-manifest.json +108 -96
  86. package/.next/standalone/.next/server/app/workspaces/page.js +2 -1
  87. package/.next/standalone/.next/server/app/workspaces/page.js.nft.json +1 -1
  88. package/.next/standalone/.next/server/app/workspaces/page_client-reference-manifest.js +1 -1
  89. package/.next/standalone/.next/server/chunks/0se9_next_dist_esm_build_templates_app-route_0eh8dj_.js +7 -7
  90. package/.next/standalone/.next/server/chunks/0se9_next_dist_esm_build_templates_app-route_0gr2wxq.js +1 -1
  91. package/.next/standalone/.next/server/chunks/[root-of-the-server]__0esywxf._.js +1 -1
  92. package/.next/standalone/.next/server/chunks/[root-of-the-server]__0kkrbn-._.js +1 -1
  93. package/.next/standalone/.next/server/chunks/_0_w835g._.js +1 -1
  94. package/.next/standalone/.next/server/chunks/src_05balzk._.js +1 -1
  95. package/.next/standalone/.next/server/chunks/src_0gif-f5._.js +1 -1
  96. package/.next/standalone/.next/server/chunks/src_0pg9w-x._.js +1 -1
  97. package/.next/standalone/.next/server/chunks/src_0vp6.co._.js +1 -1
  98. package/.next/standalone/.next/server/chunks/src_11k6i~l._.js +1 -1
  99. package/.next/standalone/.next/server/chunks/src_actions_agent-actions_ts_10q9r5b._.js +3 -3
  100. package/.next/standalone/.next/server/chunks/ssr/0iu._[workspaceId]_projects_[projectId]_versions_version-timeline-client_tsx_07o_kyi._.js +1 -1
  101. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__00qdvw7._.js +3 -0
  102. package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__07rk6ic._.js → [root-of-the-server]__0282989._.js} +1 -1
  103. package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__0hzwoy5._.js → [root-of-the-server]__03jikql._.js} +1 -1
  104. package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__0trmndk._.js → [root-of-the-server]__04dod9d._.js} +1 -1
  105. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__05tx27l._.js +3 -0
  106. package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__0m8m7vc._.js → [root-of-the-server]__07ha-7q._.js} +1 -1
  107. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__07~giyb._.js +3 -0
  108. package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__0bx_h2u._.js → [root-of-the-server]__0872sqe._.js} +2 -2
  109. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__090y_.y._.js +1 -1
  110. package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__0b6hugs._.js → [root-of-the-server]__09qoc8v._.js} +1 -1
  111. package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__0.0m12b._.js → [root-of-the-server]__0bl842b._.js} +1 -1
  112. package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__0br5e7w._.js → [root-of-the-server]__0c81jqz._.js} +1 -1
  113. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0dh0alq._.js +3 -0
  114. package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__0u3~-.g._.js → [root-of-the-server]__0fy8mj6._.js} +1 -1
  115. package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__0kqp70x._.js → [root-of-the-server]__0gsk~9d._.js} +1 -1
  116. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0h4ltpn._.js +5 -0
  117. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0hx2p17._.js +3 -0
  118. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0ie8~g5._.js +3 -0
  119. package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__0n02kfa._.js → [root-of-the-server]__0j1w7ro._.js} +1 -1
  120. package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__0esg88l._.js → [root-of-the-server]__0jxfeb6._.js} +1 -1
  121. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0jymb~t._.js +1 -1
  122. package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__00qzvly._.js → [root-of-the-server]__0mi.v4q._.js} +1 -1
  123. package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__06sew6r._.js → [root-of-the-server]__0nell0t._.js} +1 -1
  124. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0odoa97._.js +30 -0
  125. package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__12viys4._.js → [root-of-the-server]__0q8o5us._.js} +1 -1
  126. package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__0b6fbjv._.js → [root-of-the-server]__0qjjy1r._.js} +1 -1
  127. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0rg73f.._.js +3 -0
  128. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0t3q30a._.js +3 -0
  129. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0tpho3f._.js +3 -0
  130. package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__0dhq_gl._.js → [root-of-the-server]__0tusyj0._.js} +1 -1
  131. package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__0~edc3d._.js → [root-of-the-server]__0x6eyvj._.js} +1 -1
  132. package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__0n3uc.v._.js → [root-of-the-server]__0xftcya._.js} +2 -2
  133. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0xiiocg._.js +30 -0
  134. package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__0x7br99._.js → [root-of-the-server]__0znl9us._.js} +2 -2
  135. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0zsnp~d._.js +1 -1
  136. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0~fdua7._.js +3 -0
  137. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__11fp64w._.js +1 -1
  138. package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__0vyl8to._.js → [root-of-the-server]__1290yo~._.js} +2 -2
  139. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__12s3kky._.js +3 -0
  140. package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__0s_q09t._.js → [root-of-the-server]__136sh9u._.js} +1 -1
  141. package/.next/standalone/.next/server/chunks/ssr/_0-~9em3._.js +1 -1
  142. package/.next/standalone/.next/server/chunks/ssr/_0.-.0zk._.js +3 -0
  143. package/.next/standalone/.next/server/chunks/ssr/_0..h3hk._.js +1 -1
  144. package/.next/standalone/.next/server/chunks/ssr/{_0b660g4._.js → _0111pr2._.js} +1 -1
  145. package/.next/standalone/.next/server/chunks/ssr/{_0czsddm._.js → _029yl-g._.js} +1 -1
  146. package/.next/standalone/.next/server/chunks/ssr/{_0q2pep_._.js → _02mcoex._.js} +2 -2
  147. package/.next/standalone/.next/server/chunks/ssr/_02t7f2_._.js +3 -0
  148. package/.next/standalone/.next/server/chunks/ssr/{_0gomvsp._.js → _04brhyt._.js} +2 -2
  149. package/.next/standalone/.next/server/chunks/ssr/{_1118hto._.js → _08b3kyv._.js} +1 -1
  150. package/.next/standalone/.next/server/chunks/ssr/{_0-5.hgb._.js → _0a___34._.js} +2 -2
  151. package/.next/standalone/.next/server/chunks/ssr/{_0ami9yt._.js → _0b4v~ls._.js} +2 -2
  152. package/.next/standalone/.next/server/chunks/ssr/_0bdyusg._.js +6 -0
  153. package/.next/standalone/.next/server/chunks/ssr/{_0hsuip_._.js → _0c8-9m9._.js} +2 -2
  154. package/.next/standalone/.next/server/chunks/ssr/{_0j7m~u6._.js → _0gcox_6._.js} +1 -1
  155. package/.next/standalone/.next/server/chunks/ssr/{_0snv7nt._.js → _0gte_c4._.js} +1 -1
  156. package/.next/standalone/.next/server/chunks/ssr/{_0g~p9_x._.js → _0hyn4md._.js} +2 -2
  157. package/.next/standalone/.next/server/chunks/ssr/{_0l6byg1._.js → _0lqjtwo._.js} +1 -1
  158. package/.next/standalone/.next/server/chunks/ssr/_0noar.v._.js +3 -0
  159. package/.next/standalone/.next/server/chunks/ssr/_0os43sb._.js +1 -1
  160. package/.next/standalone/.next/server/chunks/ssr/{_0o_c3b2._.js → _0rilhs1._.js} +2 -2
  161. package/.next/standalone/.next/server/chunks/ssr/{_0ak77.u._.js → _0sbkase._.js} +1 -1
  162. package/.next/standalone/.next/server/chunks/ssr/{_00_h2nx._.js → _0t-0.1o._.js} +2 -2
  163. package/.next/standalone/.next/server/chunks/ssr/_0wbcp88._.js +1 -1
  164. package/.next/standalone/.next/server/chunks/ssr/{_0mmy~98._.js → _0w~~xn0._.js} +2 -2
  165. package/.next/standalone/.next/server/chunks/ssr/{_0awn2mm._.js → _0xexuoi._.js} +2 -2
  166. package/.next/standalone/.next/server/chunks/ssr/_0xu906p._.js +4 -0
  167. package/.next/standalone/.next/server/chunks/ssr/_0z-z415._.js +3 -0
  168. package/.next/standalone/.next/server/chunks/ssr/_0zx1ubq._.js +3 -0
  169. package/.next/standalone/.next/server/chunks/ssr/{_0ty4xe6._.js → _0~2k74h._.js} +1 -1
  170. package/.next/standalone/.next/server/chunks/ssr/{_0hx2o_8._.js → _0~rpgs_._.js} +2 -2
  171. package/.next/standalone/.next/server/chunks/ssr/_10a_vqn._.js +3 -0
  172. package/.next/standalone/.next/server/chunks/ssr/{_0p5ft59._.js → _10or.ne._.js} +1 -1
  173. package/.next/standalone/.next/server/chunks/ssr/_11.knhq._.js +1 -1
  174. package/.next/standalone/.next/server/chunks/ssr/{_12s8n8g._.js → _124j7aj._.js} +1 -1
  175. package/.next/standalone/.next/server/chunks/ssr/_13yv8at._.js +3 -0
  176. package/.next/standalone/.next/server/chunks/ssr/src_11j0qlp._.js +1 -1
  177. package/.next/standalone/.next/server/chunks/ssr/src_actions_07_wts6._.js +47 -0
  178. package/.next/standalone/.next/server/chunks/ssr/src_actions_agent-actions_ts_0~wc.sy._.js +1 -1
  179. package/.next/standalone/.next/server/chunks/ssr/src_actions_file-actions_ts_0gcvqwm._.js +1 -1
  180. package/.next/standalone/.next/server/chunks/ssr/src_app_missions_missions-client_tsx_11429lj._.js +1 -1
  181. package/.next/standalone/.next/server/chunks/ssr/src_app_onboarding_page_tsx_0xf7hpz._.js +1 -1
  182. package/.next/standalone/.next/server/chunks/ssr/src_app_settings_page_tsx_0h9v7dr._.js +1 -1
  183. package/.next/standalone/.next/server/chunks/ssr/src_app_workspaces_[workspaceId]_assets_assets-page-client_tsx_0wyzpam._.js +1 -1
  184. package/.next/standalone/.next/server/chunks/ssr/src_app_workspaces_[workspaceId]_board-page-client_tsx_0gips66._.js +1 -1
  185. package/.next/standalone/.next/server/chunks/ssr/src_app_workspaces_[workspaceId]_notes_notes-page-client_tsx_10gyo3v._.js +1 -1
  186. package/.next/standalone/.next/server/chunks/ssr/src_app_workspaces_[workspaceId]_tasks_[taskId]_task-page-client_tsx_02t7blt._.js +1 -1
  187. package/.next/standalone/.next/server/chunks/ssr/src_components_0rowjw~._.js +1 -1
  188. package/.next/standalone/.next/server/chunks/ssr/{src_lib_0cld9rt._.js → src_lib_0-3zx.v._.js} +1 -1
  189. package/.next/standalone/.next/server/chunks/ssr/{src_lib_0_px2pz._.js → src_lib_00ial55._.js} +1 -1
  190. package/.next/standalone/.next/server/chunks/ssr/{src_lib_0a.zy31._.js → src_lib_01-0ix1._.js} +1 -1
  191. package/.next/standalone/.next/server/chunks/ssr/{src_lib_0b73q0a._.js → src_lib_01d~ml9._.js} +1 -1
  192. package/.next/standalone/.next/server/chunks/ssr/{src_lib_04nzvfd._.js → src_lib_0278czx._.js} +1 -1
  193. package/.next/standalone/.next/server/chunks/ssr/src_lib_07o.0r6._.js +3 -0
  194. package/.next/standalone/.next/server/chunks/ssr/src_lib_09jpiip._.js +3 -0
  195. package/.next/standalone/.next/server/chunks/ssr/src_lib_0bmg7ix._.js +3 -0
  196. package/.next/standalone/.next/server/chunks/ssr/src_lib_0cb~2g1._.js +3 -0
  197. package/.next/standalone/.next/server/chunks/ssr/src_lib_0fdsvpu._.js +3 -0
  198. package/.next/standalone/.next/server/chunks/ssr/src_lib_0fyrfen._.js +3 -0
  199. package/.next/standalone/.next/server/chunks/ssr/{src_lib_0dbf2qa._.js → src_lib_0gqe-g3._.js} +1 -1
  200. package/.next/standalone/.next/server/chunks/ssr/src_lib_0ixnmd0._.js +3 -0
  201. package/.next/standalone/.next/server/chunks/ssr/src_lib_0lpxsj~._.js +1 -1
  202. package/.next/standalone/.next/server/chunks/ssr/src_lib_0pgz5n6._.js +3 -0
  203. package/.next/standalone/.next/server/chunks/ssr/{src_lib_0h2u7a0._.js → src_lib_0tq69ek._.js} +1 -1
  204. package/.next/standalone/.next/server/middleware-build-manifest.js +3 -3
  205. package/.next/standalone/.next/server/pages/500.html +1 -1
  206. package/.next/standalone/.next/server/server-reference-manifest.js +1 -1
  207. package/.next/standalone/.next/server/server-reference-manifest.json +1146 -1068
  208. package/.next/standalone/.next/static/chunks/{0oyskd~8~j.j7.js → 00agq5_c-.llc.js} +1 -1
  209. package/.next/standalone/.next/static/chunks/015i97g3voot2.js +2 -0
  210. package/.next/standalone/.next/static/chunks/{02v-9v~885t9c.js → 01wvj~s3skc-5.js} +1 -1
  211. package/.next/standalone/.next/static/chunks/{0.gedys.tq.~k.js → 031br6.h-zycv.js} +1 -1
  212. package/.next/standalone/.next/static/chunks/{07qijq9o5jccu.js → 054ztat09k8d8.js} +1 -1
  213. package/.next/standalone/.next/static/chunks/07f592yv~pptf.js +1 -0
  214. package/.next/standalone/.next/static/chunks/{06x7oq8_iu~9d.js → 08j4ettv1zbmn.js} +1 -1
  215. package/.next/standalone/.next/static/chunks/{03uix~1ru.ovv.js → 08kc0~d-bpqxd.js} +1 -1
  216. package/.next/standalone/.next/static/chunks/{0j5olwb~d3~3j.js → 08s_oyki61yjf.js} +1 -1
  217. package/.next/standalone/.next/static/chunks/09bc_~h466~tj.js +1 -0
  218. package/.next/standalone/.next/static/chunks/{0q1872yhybt55.js → 0_hj_1l73v-on.js} +1 -1
  219. package/.next/standalone/.next/static/chunks/{00o_eiv12t~.1.js → 0a54zbhpg7-ql.js} +1 -1
  220. package/.next/standalone/.next/static/chunks/0c2po53wqe-op.js +1 -0
  221. package/.next/standalone/.next/static/chunks/0clhvl~13pwv2.js +1 -0
  222. package/.next/standalone/.next/static/chunks/0fi1kdxrc9m~d.js +1 -0
  223. package/.next/standalone/.next/static/chunks/0j56_.0_wup.m.js +1 -0
  224. package/.next/standalone/.next/static/chunks/{17z9uivez~kp3.js → 0lokkque~1fox.js} +1 -1
  225. package/.next/standalone/.next/static/chunks/0m5k~sgt78d8a.js +1 -0
  226. package/.next/standalone/.next/static/chunks/{0d9u2xspag~4h.js → 0mzzaly9-cwhd.js} +1 -1
  227. package/.next/standalone/.next/static/chunks/0pg~fc3o64-u0.js +1 -0
  228. package/.next/standalone/.next/static/chunks/{0-kkc.ibted8y.js → 0pvc93qomwhkq.js} +1 -1
  229. package/.next/standalone/.next/static/chunks/0smoiulyzysrc.js +2 -0
  230. package/.next/standalone/.next/static/chunks/0ufatfbq87c84.js +1 -0
  231. package/.next/standalone/.next/static/chunks/{09om2gfwimh7k.js → 0ujznvfinjpzn.js} +1 -1
  232. package/.next/standalone/.next/static/chunks/{0cf7e1scao3zk.js → 0ux~8zee88x-j.js} +1 -1
  233. package/.next/standalone/.next/static/chunks/0vy01_a6xhhrr.js +1 -0
  234. package/.next/standalone/.next/static/chunks/0xd_tk4asn0qj.js +1 -0
  235. package/.next/standalone/.next/static/chunks/{12-mlz2vukuga.js → 0~l470bpaoz9f.js} +1 -1
  236. package/.next/standalone/.next/static/chunks/118j.0w2pbdea.js +1 -0
  237. package/.next/standalone/.next/static/chunks/13yfli6~6o4z~.js +1 -0
  238. package/.next/standalone/.next/static/chunks/{0t1awv68pnn-e.js → 15rlbf5rw1dd..js} +1 -1
  239. package/.next/standalone/package.json +1 -1
  240. package/dist/mcp-server.cjs +6 -0
  241. package/package.json +1 -1
  242. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0-geq20._.js +0 -3
  243. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__02~hdzx._.js +0 -3
  244. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0h_pt4a._.js +0 -3
  245. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0idkp76._.js +0 -3
  246. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0j4m.1s._.js +0 -3
  247. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0kmonje._.js +0 -3
  248. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0lh3mlq._.js +0 -3
  249. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0muf4wq._.js +0 -49
  250. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0o5ohqy._.js +0 -47
  251. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0ta_mpj._.js +0 -30
  252. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0ws0_c1._.js +0 -3
  253. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0~mhv4m._.js +0 -3
  254. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__1013v_g._.js +0 -47
  255. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__123rmn-._.js +0 -30
  256. package/.next/standalone/.next/server/chunks/ssr/_05~lqg-._.js +0 -4
  257. package/.next/standalone/.next/server/chunks/ssr/_0771b4a._.js +0 -47
  258. package/.next/standalone/.next/server/chunks/ssr/_0fmko25._.js +0 -3
  259. package/.next/standalone/.next/server/chunks/ssr/_0hg~.4w._.js +0 -6
  260. package/.next/standalone/.next/server/chunks/ssr/_0nrxhfb._.js +0 -47
  261. package/.next/standalone/.next/server/chunks/ssr/_0vkl7.h._.js +0 -47
  262. package/.next/standalone/.next/server/chunks/ssr/_0x09t_o._.js +0 -47
  263. package/.next/standalone/.next/server/chunks/ssr/_0zn.4bi._.js +0 -47
  264. package/.next/standalone/.next/server/chunks/ssr/_1086w4p._.js +0 -47
  265. package/.next/standalone/.next/server/chunks/ssr/src_lib_0er7rzd._.js +0 -3
  266. package/.next/standalone/.next/server/chunks/ssr/src_lib_0f0v8_~._.js +0 -3
  267. package/.next/standalone/.next/server/chunks/ssr/src_lib_0fr6fzy._.js +0 -3
  268. package/.next/standalone/.next/server/chunks/ssr/src_lib_0k04rl3._.js +0 -3
  269. package/.next/standalone/.next/server/chunks/ssr/src_lib_0sq6aqm._.js +0 -3
  270. package/.next/standalone/.next/server/chunks/ssr/src_lib_0ui-~7g._.js +0 -3
  271. package/.next/standalone/.next/server/chunks/ssr/src_lib_0z-gn78._.js +0 -3
  272. package/.next/standalone/.next/server/chunks/ssr/src_lib_13c4a4g._.js +0 -3
  273. package/.next/standalone/.next/static/chunks/00g58.es_hxli.js +0 -1
  274. package/.next/standalone/.next/static/chunks/01qtgj0xv1fsm.js +0 -2
  275. package/.next/standalone/.next/static/chunks/024euw7po0d0w.js +0 -1
  276. package/.next/standalone/.next/static/chunks/03ct4d8znb7tp.js +0 -1
  277. package/.next/standalone/.next/static/chunks/0alhq.h4~iogi.js +0 -1
  278. package/.next/standalone/.next/static/chunks/0ck~sr0nkabl~.js +0 -1
  279. package/.next/standalone/.next/static/chunks/0d1ok-v-u-xe~.js +0 -1
  280. package/.next/standalone/.next/static/chunks/0ftptcpntzaux.js +0 -1
  281. package/.next/standalone/.next/static/chunks/0gk~m5bwgoafi.js +0 -1
  282. package/.next/standalone/.next/static/chunks/0in_7s8n4lmfr.js +0 -1
  283. package/.next/standalone/.next/static/chunks/0mtrtl-jl46in.js +0 -2
  284. package/.next/standalone/.next/static/chunks/0~2l3wz-gxs2j.js +0 -1
  285. package/.next/standalone/.next/static/chunks/0~7h_a_dofg-4.js +0 -1
  286. package/.next/standalone/.next/static/chunks/15gztq9f12uhe.js +0 -1
  287. package/.next/standalone/.next/static/chunks/15ue90qe1sh-9.js +0 -1
  288. /package/.next/standalone/.next/static/{Pf_z-PYy0CJhvcyPEi-LM → dFewkdixeBoRBY6Fvw11J}/_buildManifest.js +0 -0
  289. /package/.next/standalone/.next/static/{Pf_z-PYy0CJhvcyPEi-LM → dFewkdixeBoRBY6Fvw11J}/_clientMiddlewareManifest.js +0 -0
  290. /package/.next/standalone/.next/static/{Pf_z-PYy0CJhvcyPEi-LM → dFewkdixeBoRBY6Fvw11J}/_ssgManifest.js +0 -0
@@ -1,2 +0,0 @@
1
- (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,368490,e=>{"use strict";var t=e.i(776405);e.s(["ChevronRight",()=>t.default])},922541,e=>{"use strict";let t=(0,e.i(572989).default)("rotate-ccw",[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}]]);e.s(["RotateCcw",0,t],922541)},487486,e=>{"use strict";var t=e.i(565455),r=e.i(581263),n=e.i(294237),i=e.i(975157);let s=(0,n.cva)("group/badge inline-flex h-5 w-fit shrink-0 items-center justify-center gap-1 overflow-hidden rounded-4xl border border-transparent px-2 py-0.5 text-xs font-medium whitespace-nowrap transition-all focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 [&>svg]:pointer-events-none [&>svg]:size-3!",{variants:{variant:{default:"bg-primary text-primary-foreground [a]:hover:bg-primary/80",secondary:"bg-secondary text-secondary-foreground [a]:hover:bg-secondary/80",destructive:"bg-destructive/10 text-destructive focus-visible:ring-destructive/20 dark:bg-destructive/20 dark:focus-visible:ring-destructive/40 [a]:hover:bg-destructive/20",outline:"border-border text-foreground [a]:hover:bg-muted [a]:hover:text-muted-foreground",ghost:"hover:bg-muted hover:text-muted-foreground dark:hover:bg-muted/50",link:"text-primary underline-offset-4 hover:underline"}},defaultVariants:{variant:"default"}});e.s(["Badge",0,function({className:e,variant:n="default",render:o,...u}){var c;return c={defaultTagName:"span",props:(0,t.mergeProps)({className:(0,i.cn)(s({variant:n}),e)},u),render:o,state:{slot:"badge",variant:n}},(0,r.useRenderElement)(c.defaultTagName??"div",c,c)}],487486)},184331,e=>{"use strict";var t=e.i(514798);let r=(0,t.createServerReference)("404c5f6bb80cc0d10b604e5640d83816a765fc59f3",t.callServer,void 0,t.findSourceMapURL,"openInTerminal");e.s(["openInTerminal",0,r])},567860,e=>{"use strict";let t=(0,e.i(572989).default)("terminal",[["path",{d:"M12 19h8",key:"baeox8"}],["path",{d:"m4 17 6-6-6-6",key:"1yngyt"}]]);e.s(["Terminal",0,t],567860)},867533,e=>{"use strict";let t=(0,e.i(572989).default)("eye",[["path",{d:"M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0",key:"1nclc0"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]);e.s(["Eye",0,t],867533)},259846,e=>{"use strict";let t=(0,e.i(572989).default)("arrow-left",[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]]);e.s(["ArrowLeft",0,t],259846)},736061,460707,e=>{"use strict";var t=e.i(572989);let r=(0,t.default)("folder-search",[["path",{d:"M10.7 20H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H20a2 2 0 0 1 2 2v4.1",key:"1bw5m7"}],["path",{d:"m21 21-1.9-1.9",key:"1g2n9r"}],["circle",{cx:"17",cy:"17",r:"3",key:"18b49y"}]]);e.s(["FolderSearch",0,r],736061);let n=(0,t.default)("code",[["path",{d:"m16 18 6-6-6-6",key:"eg8j8"}],["path",{d:"m8 6-6 6 6 6",key:"ppft3o"}]]);e.s(["Code",0,n],460707)},35967,e=>{"use strict";var t=e.i(289721);let r=(0,e.i(572989).default)("milestone",[["path",{d:"M12 13v8",key:"1l5pq0"}],["path",{d:"M12 3v3",key:"1n5kay"}],["path",{d:"M18.172 6a2 2 0 0 1 1.414.586l2.06 2.06a1.207 1.207 0 0 1 0 1.708l-2.06 2.06a2 2 0 0 1-1.414.586H4a1 1 0 0 1-1-1V7a1 1 0 0 1 1-1z",key:"8gz4t4"}]]);var n=e.i(533499);let i=["bg-sky-500/20 text-sky-300 border border-sky-500/30","bg-amber-500/20 text-amber-300 border border-amber-500/30","bg-violet-500/20 text-violet-300 border border-violet-500/30","bg-emerald-500/20 text-emerald-300 border border-emerald-500/30","bg-rose-500/20 text-rose-300 border border-rose-500/30","bg-cyan-500/20 text-cyan-300 border border-cyan-500/30","bg-indigo-500/20 text-indigo-300 border border-indigo-500/30"];function s(e){return i[function(e){let t=0;for(let r=0;r<e.length;r++)t=31*t+e.charCodeAt(r)>>>0;return t}(e)%i.length]}let o={PLANNED:"bg-slate-500/20 text-slate-300 border border-slate-500/30",ACTIVE:"bg-emerald-500/20 text-emerald-300 border border-emerald-500/30",RELEASED:"bg-zinc-500/20 text-zinc-400 border border-zinc-500/30"};e.s(["TaskVersionTag",0,function({number:e,name:n,showName:i=!1,className:s="",title:o}){return(0,t.jsxs)("span",{className:`inline-flex items-center gap-1 rounded-md border border-border bg-muted px-1.5 py-0.5 text-[10px] font-medium text-muted-foreground ${s}`,title:o??(n?`${e} \xb7 ${n}`:e),children:[(0,t.jsx)(r,{className:"h-2.5 w-2.5 shrink-0"}),(0,t.jsx)("span",{className:"font-mono",children:e}),i&&n?(0,t.jsx)("span",{className:"max-w-[140px] truncate",children:n}):null]})},"VersionStatusBadge",0,function({status:e}){let{t:r}=(0,n.useI18n)();return(0,t.jsx)("span",{className:`inline-flex items-center rounded-full px-2 py-0.5 text-xs font-medium ${o[e]}`,children:r(`version.status.${e}`)})},"VersionTypeBadge",0,function({name:e}){let{t:r}=(0,n.useI18n)();return e?(0,t.jsx)("span",{className:`inline-flex items-center rounded-full px-2 py-0.5 text-xs font-medium ${s(e)}`,children:e}):(0,t.jsx)("span",{className:"inline-flex items-center rounded-full border border-border bg-muted/40 px-2 py-0.5 text-xs font-medium text-muted-foreground",children:r("version.type.uncategorized")})},"typeBadgeColor",0,s],35967)},950481,938238,12659,e=>{"use strict";var t=e.i(514798);let r=(0,t.createServerReference)("408215e48e1a623e4bbb685a78e3a3ada2ed9a5e8a",t.callServer,void 0,t.findSourceMapURL,"openInFileManager");e.s(["openInFileManager",0,r],950481);let n=(0,t.createServerReference)("40a305711044d42074dc8b719a62360ee159d7fe96",t.callServer,void 0,t.findSourceMapURL,"openInEditor");e.s(["openInEditor",0,n],938238);let i=(0,e.i(572989).default)("circle-play",[["path",{d:"M9 9.003a1 1 0 0 1 1.517-.859l4.997 2.997a1 1 0 0 1 0 1.718l-4.997 2.997A1 1 0 0 1 9 14.996z",key:"kmsa83"}],["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]]);e.s(["PlayCircle",0,i],12659)},912505,e=>{"use strict";var t=e.i(289721),r=e.i(975157);e.s(["EmptyState",0,function({icon:e,title:n,description:i,action:s,className:o}){return(0,t.jsxs)("div",{className:(0,r.cn)("flex h-48 flex-col items-center justify-center gap-2 text-center",o),children:[e&&(0,t.jsx)(e,{className:"h-10 w-10 text-muted-foreground/40"}),(0,t.jsx)("p",{className:"text-sm font-medium text-muted-foreground",children:n}),i&&(0,t.jsx)("p",{className:"text-xs text-muted-foreground/60",children:i}),s&&(0,t.jsx)("div",{className:"mt-2",children:s})]})}])},313029,e=>{"use strict";let t=(0,e.i(572989).default)("square",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}]]);e.s(["Square",0,t],313029)},486077,e=>{"use strict";let t=(0,e.i(572989).default)("lightbulb",[["path",{d:"M15 14c.2-1 .7-1.7 1.5-2.5 1-.9 1.5-2.2 1.5-3.5A6 6 0 0 0 6 8c0 1 .2 2.2 1.5 3.5.7.7 1.3 1.5 1.5 2.5",key:"1gvzjb"}],["path",{d:"M9 18h6",key:"x1upvd"}],["path",{d:"M10 22h4",key:"ceow96"}]]);e.s(["Lightbulb",0,t],486077)},77597,485599,e=>{"use strict";function t(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function r(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function n(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?r(Object(n),!0).forEach(function(t){var r,i;r=t,i=n[t],(r=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t);if("object"!=typeof n)return n;throw TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}(r))in e?Object.defineProperty(e,r,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[r]=i}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):r(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function i(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function s(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?i(Object(r),!0).forEach(function(t){var n;n=r[t],t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):i(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function o(e){return function t(){for(var r=this,n=arguments.length,i=Array(n),s=0;s<n;s++)i[s]=arguments[s];return i.length>=e.length?e.apply(this,i):function(){for(var e=arguments.length,n=Array(e),s=0;s<e;s++)n[s]=arguments[s];return t.apply(r,[].concat(i,n))}}}function u(e){return({}).toString.call(e).includes("Object")}function c(e){return"function"==typeof e}var a,l,d=o(function(e,t){throw Error(e[t]||e.default)})({initialIsRequired:"initial state is required",initialType:"initial state should be an object",initialContent:"initial state shouldn't be an empty object",handlerType:"handler should be an object or a function",handlersType:"all handlers should be a functions",selectorType:"selector should be a function",changeType:"provided value of changes should be an object",changeField:'it seams you want to change a field in the state which is not specified in the "initial" state',default:"an unknown error accured in `state-local` package"}),h=function(e,t){return u(t)||d("changeType"),Object.keys(t).some(function(t){return!Object.prototype.hasOwnProperty.call(e,t)})&&d("changeField"),t},f=function(e){c(e)||d("selectorType")},g=function(e){c(e)||u(e)||d("handlerType"),u(e)&&Object.values(e).some(function(e){return!c(e)})&&d("handlersType")},p=function(e){e||d("initialIsRequired"),u(e)||d("initialType"),Object.keys(e).length||d("initialContent")};function m(e,t){return c(t)?t(e.current):t}function y(e,t){return e.current=s(s({},e.current),t),t}function v(e,t,r){return c(t)?t(e.current):Object.keys(r).forEach(function(r){var n;return null==(n=t[r])?void 0:n.call(t,e.current[r])}),r}var b={configIsRequired:"the configuration object is required",configType:"the configuration object should be an object",default:"an unknown error accured in `@monaco-editor/loader` package",deprecation:"Deprecation warning!\n You are using deprecated way of configuration.\n\n Instead of using\n monaco.config({ urls: { monacoBase: '...' } })\n use\n monaco.config({ paths: { vs: '...' } })\n\n For more please check the link https://github.com/suren-atoyan/monaco-loader#config\n "},x=(a=function(e,t){throw Error(e[t]||e.default)},function e(){for(var t=this,r=arguments.length,n=Array(r),i=0;i<r;i++)n[i]=arguments[i];return n.length>=a.length?a.apply(this,n):function(){for(var r=arguments.length,i=Array(r),s=0;s<r;s++)i[s]=arguments[s];return e.apply(t,[].concat(n,i))}})(b),A=function(e){return(e||x("configIsRequired"),({}).toString.call(e).includes("Object")||x("configType"),e.urls)?(console.warn(b.deprecation),{paths:{vs:e.urls.monacoBase}}):e},M=function(){for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];return function(e){return t.reduceRight(function(e,t){return t(e)},e)}},C={type:"cancelation",msg:"operation is manually canceled"};function k(e){var t=!1,r=new Promise(function(r,n){e.then(function(e){return t?n(C):r(e)}),e.catch(n)});return r.cancel=function(){return t=!0},r}var w=["monaco"],E=function(e){if(Array.isArray(e))return e}(l=({create:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};p(e),g(t);var r={current:e},n=o(v)(r,t),i=o(y)(r),s=o(h)(e),u=o(m)(r);return[function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:function(e){return e};return f(e),e(r.current)},function(e){(function(){for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];return function(e){return t.reduceRight(function(e,t){return t(e)},e)}})(n,i,s,u)(e)}]}}).create({config:{paths:{vs:"https://cdn.jsdelivr.net/npm/monaco-editor@0.55.1/min/vs"}},isInitialized:!1,resolve:null,reject:null,monaco:null}))||function(e){var t=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=t){var r,n,i,s,o=[],u=!0,c=!1;try{i=(t=t.call(e)).next,!1;for(;!(u=(r=i.call(t)).done)&&(o.push(r.value),2!==o.length);u=!0);}catch(e){c=!0,n=e}finally{try{if(!u&&null!=t.return&&(s=t.return(),Object(s)!==s))return}finally{if(c)throw n}}return o}}(l)||function(e){if(e){if("string"==typeof e)return t(e,2);var r=({}).toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?t(e,2):void 0}}(l)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(),S=E[0],j=E[1];function D(e){return document.body.appendChild(e)}function F(e){var t,r,n=S(function(e){return{config:e.config,reject:e.reject}}),i=(t="".concat(n.config.paths.vs,"/loader.js"),r=document.createElement("script"),t&&(r.src=t),r);return i.onload=function(){return e()},i.onerror=n.reject,i}function _(){var e=S(function(e){return{config:e.config,resolve:e.resolve,reject:e.reject}}),t=window.require;t.config(e.config),t(["vs/editor/editor.main"],function(t){var r=t.m||t;B(r),e.resolve(r)},function(t){e.reject(t)})}function B(e){S().monaco||j({monaco:e})}var R=new Promise(function(e,t){return j({resolve:e,reject:t})}),O={config:function(e){var t=A(e),r=t.monaco,i=function(e,t){if(null==e)return{};var r,n,i=function(e,t){if(null==e)return{};var r={};for(var n in e)if(({}).hasOwnProperty.call(e,n)){if(-1!==t.indexOf(n))continue;r[n]=e[n]}return r}(e,t);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);for(n=0;n<s.length;n++)r=s[n],-1===t.indexOf(r)&&({}).propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}(t,w);j(function(e){return{config:function e(t,r){return Object.keys(r).forEach(function(n){r[n]instanceof Object&&t[n]&&Object.assign(r[n],e(t[n],r[n]))}),n(n({},t),r)}(e.config,i),monaco:r}})},init:function(){var e=S(function(e){return{monaco:e.monaco,isInitialized:e.isInitialized,resolve:e.resolve}});if(!e.isInitialized){if(j({isInitialized:!0}),e.monaco)return e.resolve(e.monaco),k(R);if(window.monaco&&window.monaco.editor)return B(window.monaco),e.resolve(window.monaco),k(R);M(D,F)(_)}return k(R)},__getMonacoInstance:function(){return S(function(e){return e.monaco})}};e.s(["default",0,O],485599);var I=e.i(965652),L={display:"flex",position:"relative",textAlign:"initial"},N={width:"100%"},$={display:"none"},P={display:"flex",height:"100%",width:"100%",justifyContent:"center",alignItems:"center"},z=function({children:e}){return I.default.createElement("div",{style:P},e)},T=(0,I.memo)(function({width:e,height:t,isEditorReady:r,loading:n,_ref:i,className:s,wrapperProps:o}){return I.default.createElement("section",{style:{...L,width:e,height:t},...o},!r&&I.default.createElement(z,null,n),I.default.createElement("div",{ref:i,style:{...N,...!r&&$},className:s}))}),U=function(e){(0,I.useEffect)(e,[])},V=function(e,t,r=!0){let n=(0,I.useRef)(!0);(0,I.useEffect)(n.current||!r?()=>{n.current=!1}:e,t)};function W(){}function q(e,t,r,n){var i,s,o,u,c,a;return i=e,s=n,i.editor.getModel(H(i,s))||(o=e,u=t,c=r,a=n,o.editor.createModel(u,c,a?H(o,a):void 0))}function H(e,t){return e.Uri.parse(t)}var K=(0,I.memo)(function({original:e,modified:t,language:r,originalLanguage:n,modifiedLanguage:i,originalModelPath:s,modifiedModelPath:o,keepCurrentOriginalModel:u=!1,keepCurrentModifiedModel:c=!1,theme:a="light",loading:l="Loading...",options:d={},height:h="100%",width:f="100%",className:g,wrapperProps:p={},beforeMount:m=W,onMount:y=W}){let[v,b]=(0,I.useState)(!1),[x,A]=(0,I.useState)(!0),M=(0,I.useRef)(null),C=(0,I.useRef)(null),k=(0,I.useRef)(null),w=(0,I.useRef)(y),E=(0,I.useRef)(m),S=(0,I.useRef)(!1);U(()=>{let e=O.init();return e.then(e=>(C.current=e)&&A(!1)).catch(e=>e?.type!=="cancelation"&&console.error("Monaco initialization: error:",e)),()=>{let t;return M.current?(t=M.current?.getModel(),void(u||t?.original?.dispose(),c||t?.modified?.dispose(),M.current?.dispose())):e.cancel()}}),V(()=>{if(M.current&&C.current){let t=M.current.getOriginalEditor(),i=q(C.current,e||"",n||r||"text",s||"");i!==t.getModel()&&t.setModel(i)}},[s],v),V(()=>{if(M.current&&C.current){let e=M.current.getModifiedEditor(),n=q(C.current,t||"",i||r||"text",o||"");n!==e.getModel()&&e.setModel(n)}},[o],v),V(()=>{let e=M.current.getModifiedEditor();e.getOption(C.current.editor.EditorOption.readOnly)?e.setValue(t||""):t!==e.getValue()&&(e.executeEdits("",[{range:e.getModel().getFullModelRange(),text:t||"",forceMoveMarkers:!0}]),e.pushUndoStop())},[t],v),V(()=>{M.current?.getModel()?.original.setValue(e||"")},[e],v),V(()=>{let{original:e,modified:t}=M.current.getModel();C.current.editor.setModelLanguage(e,n||r||"text"),C.current.editor.setModelLanguage(t,i||r||"text")},[r,n,i],v),V(()=>{C.current?.editor.setTheme(a)},[a],v),V(()=>{M.current?.updateOptions(d)},[d],v);let j=(0,I.useCallback)(()=>{if(!C.current)return;E.current(C.current);let u=q(C.current,e||"",n||r||"text",s||""),c=q(C.current,t||"",i||r||"text",o||"");M.current?.setModel({original:u,modified:c})},[r,t,i,e,n,s,o]),D=(0,I.useCallback)(()=>{!S.current&&k.current&&(M.current=C.current.editor.createDiffEditor(k.current,{automaticLayout:!0,...d}),j(),C.current?.editor.setTheme(a),b(!0),S.current=!0)},[d,a,j]);return(0,I.useEffect)(()=>{v&&w.current(M.current,C.current)},[v]),(0,I.useEffect)(()=>{x||v||D()},[x,v,D]),I.default.createElement(T,{width:f,height:h,isEditorReady:v,loading:l,_ref:k,className:g,wrapperProps:p})}),G=function(e){let t=(0,I.useRef)();return(0,I.useEffect)(()=>{t.current=e},[e]),t.current},J=new Map,Q=(0,I.memo)(function({defaultValue:e,defaultLanguage:t,defaultPath:r,value:n,language:i,path:s,theme:o="light",line:u,loading:c="Loading...",options:a={},overrideServices:l={},saveViewState:d=!0,keepCurrentModel:h=!1,width:f="100%",height:g="100%",className:p,wrapperProps:m={},beforeMount:y=W,onMount:v=W,onChange:b,onValidate:x=W}){let[A,M]=(0,I.useState)(!1),[C,k]=(0,I.useState)(!0),w=(0,I.useRef)(null),E=(0,I.useRef)(null),S=(0,I.useRef)(null),j=(0,I.useRef)(v),D=(0,I.useRef)(y),F=(0,I.useRef)(void 0),_=(0,I.useRef)(n),B=G(s),R=(0,I.useRef)(!1),L=(0,I.useRef)(!1);U(()=>{let e=O.init();return e.then(e=>(w.current=e)&&k(!1)).catch(e=>e?.type!=="cancelation"&&console.error("Monaco initialization: error:",e)),()=>E.current?void(F.current?.dispose(),h?d&&J.set(s,E.current.saveViewState()):E.current.getModel()?.dispose(),E.current.dispose(),E.current=null,R.current=!1,M(!1)):e.cancel()}),V(()=>{let o=q(w.current,e||n||"",t||i||"",s||r||"");o!==E.current?.getModel()&&(d&&J.set(B,E.current?.saveViewState()),E.current?.setModel(o),d&&E.current?.restoreViewState(J.get(s)))},[s],A),V(()=>{E.current?.updateOptions(a)},[a],A),V(()=>{E.current&&void 0!==n&&(E.current.getOption(w.current.editor.EditorOption.readOnly)?E.current.setValue(n):n!==E.current.getValue()&&(L.current=!0,E.current.executeEdits("",[{range:E.current.getModel().getFullModelRange(),text:n,forceMoveMarkers:!0}]),E.current.pushUndoStop(),L.current=!1))},[n],A),V(()=>{let e=E.current?.getModel();A&&e&&i&&w.current?.editor.setModelLanguage(e,i)},[i,A],A),V(()=>{void 0!==u&&E.current?.revealLine(u)},[u],A),V(()=>{w.current?.editor.setTheme(o)},[o],A);let N=(0,I.useCallback)(()=>{if(!(!S.current||!w.current)&&!R.current){D.current(w.current);let c=s||r,h=q(w.current,n||e||"",t||i||"",c||"");E.current=w.current?.editor.create(S.current,{model:h,automaticLayout:!0,...a},l),d&&E.current.restoreViewState(J.get(c)),w.current.editor.setTheme(o),void 0!==u&&E.current.revealLine(u),M(!0),R.current=!0}},[e,t,r,n,i,s,a,l,d,o,u]);return(0,I.useEffect)(()=>{A&&j.current(E.current,w.current)},[A]),(0,I.useEffect)(()=>{C||A||N()},[C,A,N]),_.current=n,(0,I.useEffect)(()=>{A&&b&&(F.current?.dispose(),F.current=E.current?.onDidChangeModelContent(e=>{L.current||b(E.current.getValue(),e)}))},[A,b]),(0,I.useEffect)(()=>{if(A){let e=w.current.editor.onDidChangeMarkers(e=>{let t=E.current.getModel()?.uri;if(t&&e.find(e=>e.path===t.path)){let e=w.current.editor.getModelMarkers({resource:t});x?.(e)}});return()=>{e?.dispose()}}return()=>{}},[A,x]),I.default.createElement(T,{width:f,height:g,isEditorReady:A,loading:c,_ref:S,className:p,wrapperProps:m})});e.s(["DiffEditor",0,K,"Editor",0,Q,"default",0,Q,"useMonaco",0,function(){let[e,t]=(0,I.useState)(O.__getMonacoInstance());return U(()=>{let r;return e||(r=O.init()).then(e=>{t(e)}),()=>r?.cancel()}),e}],77597)},461526,e=>{"use strict";e.s(["PREVIEW_TASK_ID",0,"__preview__"])},882651,960995,181209,e=>{"use strict";var t=e.i(59737);e.s(["CheckCircle2",()=>t.default],882651);let r=(0,e.i(572989).default)("circle-x",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]]);e.s(["default",0,r],960995),e.s(["XCircle",0,r],181209)},759686,e=>{"use strict";var t=e.i(567098);e.s(["AlertTriangle",()=>t.default])},779570,e=>{"use strict";var t=e.i(514798);let r=(0,t.createServerReference)("404cffeebf9cd5b11929ed56c5dbcb3e79b820450e",t.callServer,void 0,t.findSourceMapURL,"getPrompts");e.s(["getPrompts",0,r])},991838,e=>{"use strict";var t=e.i(965652),r=e.i(770303);e.s(["useExtension",0,function(e){let n=(0,t.useContext)(r.ExtensionContext);if(!n)throw Error("useExtension must be used inside <ExtensionProvider>");return{status:n.statusMap[e],loading:n.loading,isInstalling:n.installing.has(e),install:()=>n.install(e),uninstall:()=>n.uninstall(e),refresh:()=>n.refresh(e)}}])},960518,e=>{"use strict";let t=(0,e.i(572989).default)("git-compare",[["circle",{cx:"18",cy:"18",r:"3",key:"1xkwt0"}],["circle",{cx:"6",cy:"6",r:"3",key:"1lh9wr"}],["path",{d:"M13 6h3a2 2 0 0 1 2 2v7",key:"1yeb86"}],["path",{d:"M11 18H8a2 2 0 0 1-2-2V9",key:"19pyzm"}]]);e.s(["GitCompare",0,t],960518)},340873,e=>{"use strict";let t=(0,e.i(572989).default)("git-commit-horizontal",[["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}],["line",{x1:"3",x2:"9",y1:"12",y2:"12",key:"1dyftd"}],["line",{x1:"15",x2:"21",y1:"12",y2:"12",key:"oup4p8"}]]);e.s(["GitCommitHorizontal",0,t],340873)},707631,(e,t,r)=>{t.exports=e=>{if(!e||"string"!=typeof e||e.match(/^\s+$/))return[];let t=e.split(`
2
- `);if(0===t.length)return[];let r=[],n=null,i=null,o=0,c=0,a=null,l=e=>{let[t,i]=s(e)??[];n={chunks:[],deletions:0,additions:0,from:t,to:i},r.push(n)},d=()=>{(!n||n.chunks.length)&&l()},h=e=>{if(!i)return;let[t]=i.changes.slice(-1);i.changes.push({type:t.type,[t.type]:!0,ln1:t.ln1,ln2:t.ln2,ln:t.ln,content:e})},f=[[/^diff\s/,l],[/^new file mode (\d+)$/,(e,t)=>{d(),n.new=!0,n.newMode=t[1],n.from="/dev/null"}],[/^deleted file mode (\d+)$/,(e,t)=>{d(),n.deleted=!0,n.oldMode=t[1],n.to="/dev/null"}],[/^old mode (\d+)$/,(e,t)=>{d(),n.oldMode=t[1]}],[/^new mode (\d+)$/,(e,t)=>{d(),n.newMode=t[1]}],[/^index\s[\da-zA-Z]+\.\.[\da-zA-Z]+(\s(\d+))?$/,(e,t)=>{d(),n.index=e.split(" ").slice(1),t[1]&&(n.oldMode=n.newMode=t[1].trim())}],[/^---\s/,e=>{d(),n.from=u(e)}],[/^\+\+\+\s/,e=>{d(),n.to=u(e)}],[/^@@\s+-(\d+),?(\d+)?\s+\+(\d+),?(\d+)?\s@@/,(e,t)=>{n||l(e);let[r,s,u,d]=t.slice(1);o=+r,c=+u,i={content:e,changes:[],oldStart:+r,oldLines:+(s||1),newStart:+u,newLines:+(d||1)},a={oldLines:+(s||1),newLines:+(d||1)},n.chunks.push(i)}],[/^\$/,h]],g=[[/^\$/,h],[/^-/,e=>{i&&(i.changes.push({type:"del",del:!0,ln:o++,content:e}),n.deletions++,a.oldLines--)}],[/^\+/,e=>{i&&(i.changes.push({type:"add",add:!0,ln:c++,content:e}),n.additions++,a.newLines--)}],[/^\s*/,e=>{i?.changes.push({type:"normal",normal:!0,ln1:o++,ln2:c++,content:e}),a.oldLines--,a.newLines--}]],p=e=>{a?(e=>{for(let[t,r]of g){let n=e.match(t);if(n){r(e,n);break}}0===a.oldLines&&0===a.newLines&&(a=null)})(e):(e=>{for(let[t,r]of f){let n=e.match(t);if(n){r(e,n);break}}})(e)};for(let e of t)p(e);return r};let n=/(a|i|w|c|o|1|2)\/.*(?=["']? ["']?(b|i|w|c|o|1|2)\/)|(b|i|w|c|o|1|2)\/.*$/g,i=/^(a|b|i|w|c|o|1|2)\//,s=e=>e?.match(n)?.map(e=>e.replace(i,"").replace(/("|')$/,"")),o=/^\\?['"]|\\?['"]$/g,u=e=>{let t=c(e,"-+").trim();return(t=l(t)).replace(o,"").replace(i,"")},c=(e,t)=>{if(e=h(e),!t&&String.prototype.trimLeft)return e.trimLeft();let r=d(t);return e.replace(RegExp(`^${r}+`),"")},a=/\t.*|\d{4}-\d\d-\d\d\s\d\d:\d\d:\d\d(.\d+)?\s(\+|-)\d\d\d\d/,l=e=>{let t=a.exec(e);return t&&(e=e.substring(0,t.index).trim()),e},d=e=>null==e?"\\s":e instanceof RegExp?e.source:`[${h(e).replace(/([.*+?^=!:${}()|[\]/\\])/g,"\\$1")}]`,h=e=>`${e??""}`},196199,e=>{"use strict";var t=e.i(707631);function r(e){return e.replace(/\r\n/g,"\n")}e.s(["normalizeLF",0,r,"parseUnifiedDiff",0,function(e){return(0,t.default)(r(e))}])},673087,947679,915083,972088,437116,73191,818873,7267,e=>{"use strict";var t=e.i(514798);let r=(0,t.createServerReference)("6027cc49ddb74d8bded5d8ad563e66f5765ef5e95e",t.callServer,void 0,t.findSourceMapURL,"listDirectory");e.s(["listDirectory",0,r],673087);let n=(0,t.createServerReference)("70e9e765159a33c6e2ce9d4f9c9bcd967b3f07438e",t.callServer,void 0,t.findSourceMapURL,"getGitStatus");e.s(["getGitStatus",0,n],947679);let i=(0,t.createServerReference)("60615228392ec08da945787a56064cf05c79625eae",t.callServer,void 0,t.findSourceMapURL,"createFile");e.s(["createFile",0,i],915083);let s=(0,t.createServerReference)("60ad166951880d2dabc4566edb741b45f859714079",t.callServer,void 0,t.findSourceMapURL,"createDirectory");e.s(["createDirectory",0,s],972088);let o=(0,t.createServerReference)("700eba4866e7155bcb476734432fd01b072502b8d9",t.callServer,void 0,t.findSourceMapURL,"renameEntry");e.s(["renameEntry",0,o],437116);let u=(0,t.createServerReference)("6004182a3bce876e0f48dfc1200ec4dd4cd0f53b3a",t.callServer,void 0,t.findSourceMapURL,"deleteEntry");e.s(["deleteEntry",0,u],73191);let c=(0,t.createServerReference)("40494327a212cb6df25bdaa58d6730e716ad858443",t.callServer,void 0,t.findSourceMapURL,"listAllFiles");e.s(["listAllFiles",0,c],818873);let a=(0,t.createServerReference)("6062cab48aa6208df83d05e32f80e68a3dcdfed4a1",t.callServer,void 0,t.findSourceMapURL,"readFileContent");e.s(["readFileContent",0,a],7267)},767664,e=>{"use strict";var t=e.i(514798);let r=(0,t.createServerReference)("701337fd0644c7346135bfeaca5847b420e9269cc8",t.callServer,void 0,t.findSourceMapURL,"writeFileContent");e.s(["writeFileContent",0,r])},744220,e=>{"use strict";var t=e.i(514798);let r=(0,t.createServerReference)("60943bdcf93774abc1f4c5685f24da700f883d3220",t.callServer,void 0,t.findSourceMapURL,"readFileContentForce");e.s(["readFileContentForce",0,r])},865514,e=>{"use strict";var t=e.i(289721),r=e.i(965652),n=e.i(538059),i=e.i(776639),s=e.i(519455);let o=(0,e.i(572989).default)("git-merge",[["circle",{cx:"18",cy:"18",r:"3",key:"1xkwt0"}],["circle",{cx:"6",cy:"6",r:"3",key:"1lh9wr"}],["path",{d:"M6 21V9a9 9 0 0 0 9 9",key:"7kw0sc"}]]);var u=e.i(400355);e.s(["TaskMergeConfirmDialog",0,function({open:e,onOpenChange:c,taskId:a,taskTitle:l,baseBranch:d,fileCount:h,commitCount:f,commitLog:g=[],onMergeComplete:p}){let m=(0,n.useRouter)(),[y,v]=(0,r.useState)(!1),[b,x]=(0,r.useState)(null),A=async()=>{v(!0),x(null);try{let e=await fetch(`/api/tasks/${a}/merge`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({})});if(e.ok){c(!1),p(),m.refresh();return}let t=await e.json().catch(()=>({error:"Merge failed"}));409===e.status?x(`Merge conflicts detected: ${Array.isArray(t.conflictFiles)?t.conflictFiles.join(", "):"unknown files"}`):x(t.error??"Merge failed")}catch{x("Network error — merge failed")}finally{v(!1)}};return(0,t.jsx)(i.Dialog,{open:e,onOpenChange:c,children:(0,t.jsxs)(i.DialogContent,{showCloseButton:!0,className:"sm:max-w-md",children:[(0,t.jsx)(i.DialogHeader,{children:(0,t.jsxs)(i.DialogTitle,{className:"flex items-center gap-2",children:[(0,t.jsx)(o,{className:"h-4 w-4 text-emerald-400"}),"Confirm Merge"]})}),(0,t.jsxs)("div",{className:"space-y-3 py-2",children:[(0,t.jsxs)("div",{className:"rounded-lg border border-border bg-muted/30 p-3 space-y-2.5",children:[(0,t.jsxs)("div",{className:"flex items-start justify-between gap-4",children:[(0,t.jsx)("span",{className:"text-xs text-muted-foreground whitespace-nowrap",children:"Target branch"}),(0,t.jsx)("code",{className:"text-xs font-mono bg-muted px-2 py-0.5 rounded text-foreground",children:d})]}),(0,t.jsxs)("div",{className:"flex items-start justify-between gap-4",children:[(0,t.jsx)("span",{className:"text-xs text-muted-foreground whitespace-nowrap",children:"Changed files"}),(0,t.jsx)("span",{className:"text-xs font-medium text-foreground",children:h})]}),(0,t.jsxs)("div",{className:"flex items-start justify-between gap-4",children:[(0,t.jsx)("span",{className:"text-xs text-muted-foreground whitespace-nowrap",children:"Commits"}),(0,t.jsx)("span",{className:"text-xs font-medium text-foreground",children:f})]})]}),g.length>0&&(0,t.jsxs)("div",{children:[(0,t.jsx)("span",{className:"text-xs text-muted-foreground mb-1 block",children:"Commits"}),(0,t.jsx)("div",{className:"rounded-md border border-border bg-muted/30 p-2 space-y-1 max-h-32 overflow-y-auto",children:g.map((e,r)=>(0,t.jsx)("div",{className:"text-xs font-mono text-foreground/80",children:e},r))})]}),b&&(0,t.jsx)("div",{className:"rounded-lg border border-red-500/20 bg-red-500/10 px-3 py-2",children:(0,t.jsx)("p",{className:"text-xs text-red-400",children:b})})]}),(0,t.jsxs)(i.DialogFooter,{children:[(0,t.jsx)(s.Button,{variant:"outline",onClick:()=>c(!1),disabled:y,children:"Cancel"}),(0,t.jsx)(s.Button,{onClick:A,disabled:y,className:"gap-2",children:y?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(u.Loader2,{className:"h-4 w-4 animate-spin"}),"Merging..."]}):(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(o,{className:"h-4 w-4"}),"Confirm Merge"]})})]})]})})}],865514)},74593,e=>{"use strict";var t=e.i(514798);let r=(0,t.createServerReference)("4062d13cdbe45c1cfb8386e810495e72befcfbec91",t.callServer,void 0,t.findSourceMapURL,"stopPtyExecution");e.s(["stopPtyExecution",0,r])},929127,e=>{"use strict";var t=e.i(514798);let r=(0,t.createServerReference)("60efa135082b65911a52ff807ef8c96f9c3585f6a1",t.callServer,void 0,t.findSourceMapURL,"resumePtyExecution");e.s(["resumePtyExecution",0,r])},483361,e=>{"use strict";var t=e.i(514798);let r=(0,t.createServerReference)("60e4b2ed8000953c03639b7e7fbc5233720fd9370a",t.callServer,void 0,t.findSourceMapURL,"updateTaskStatus");e.s(["updateTaskStatus",0,r])},58308,e=>{"use strict";var t=e.i(514798);let r=(0,t.createServerReference)("401acf2b7191c3fbfd39c3f254a5628d15465f16bb",t.callServer,void 0,t.findSourceMapURL,"checkWorktreeClean");e.s(["checkWorktreeClean",0,r])},100839,e=>{"use strict";var t=e.i(514798);let r=(0,t.createServerReference)("6031d4644cd423486c800f9dcad4ed01df4562a880",t.callServer,void 0,t.findSourceMapURL,"commitWorktreeChanges");e.s(["commitWorktreeChanges",0,r])},169751,e=>{"use strict";function t(e){return Array.isArray?Array.isArray(e):"[object Array]"===c(e)}function r(e){return null==e?"":function(e){if("string"==typeof e)return e;if("bigint"==typeof e)return e.toString();let t=e+"";return"0"==t&&1/e==-1/0?"-0":t}(e)}function n(e){return"string"==typeof e}function i(e){return"number"==typeof e}function s(e){return"object"==typeof e}function o(e){return null!=e}function u(e){return!e.trim().length}function c(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":Object.prototype.toString.call(e)}let a=Object.prototype.hasOwnProperty;class l{constructor(e){this._keys=[],this._keyMap={};let t=0;e.forEach(e=>{let r=d(e);this._keys.push(r),this._keyMap[r.id]=r,t+=r.weight}),this._keys.forEach(e=>{e.weight/=t})}get(e){return this._keyMap[e]}keys(){return this._keys}toJSON(){return JSON.stringify(this._keys)}}function d(e){let r=null,i=null,s=null,o=1,u=null;if(n(e)||t(e))s=e,r=h(e),i=f(e);else{if(!a.call(e,"name"))throw Error("Missing name property in key");let t=e.name;if(s=t,a.call(e,"weight")&&(o=e.weight)<=0)throw Error(`Property 'weight' in key '${t}' must be a positive integer`);r=h(t),i=f(t),u=e.getFn}return{path:r,id:i,weight:o,src:s,getFn:u}}function h(e){return t(e)?e:e.split(".")}function f(e){return t(e)?e.join("."):e}let g=Object.freeze({isCaseSensitive:!1,ignoreDiacritics:!1,includeScore:!1,keys:[],shouldSort:!0,sortFn:(e,t)=>e.score===t.score?e.idx<t.idx?-1:1:e.score<t.score?-1:1,includeMatches:!1,findAllMatches:!1,minMatchCharLength:1,location:0,threshold:.6,distance:100,useExtendedSearch:!1,useTokenSearch:!1,getFn:function(e,u){let a=[],l=!1,d=(e,u,h,f)=>{if(o(e))if(u[h]){var g,p;let m=e[u[h]];if(!o(m))return;if(h===u.length-1&&(n(m)||i(m)||!0===(g=m)||!1===g||s(p=g)&&null!==p&&"[object Boolean]"==c(g)||"bigint"==typeof m))a.push(void 0!==f?{v:r(m),i:f}:r(m));else if(t(m)){l=!0;for(let e=0,t=m.length;e<t;e+=1)d(m[e],u,h+1,e)}else u.length&&d(m,u,h+1,f)}else a.push(void 0!==f?{v:e,i:f}:e)};return d(e,n(u)?u.split("."):u,0),l?a:a[0]},ignoreLocation:!1,ignoreFieldNorm:!1,fieldNormWeight:1}),p=/[^ ]+/g;class m{constructor({getFn:e=g.getFn,fieldNormWeight:t=g.fieldNormWeight}={}){this.norm=function(e=1,t=3){let r=new Map,n=Math.pow(10,t);return{get(t){let i=t.match(p).length;if(r.has(i))return r.get(i);let s=parseFloat(Math.round(1/Math.pow(i,.5*e)*n)/n);return r.set(i,s),s},clear(){r.clear()}}}(t,3),this.getFn=e,this.isCreated=!1,this.docs=[],this.keys=[],this._keysMap={},this.setIndexRecords()}setSources(e=[]){this.docs=e}setIndexRecords(e=[]){this.records=e}setKeys(e=[]){this.keys=e,this._keysMap={},e.forEach((e,t)=>{this._keysMap[e.id]=t})}create(){!this.isCreated&&this.docs.length&&(this.isCreated=!0,n(this.docs[0])?this.docs.forEach((e,t)=>{this._addString(e,t)}):this.docs.forEach((e,t)=>{this._addObject(e,t)}),this.norm.clear())}add(e){let t=this.size();n(e)?this._addString(e,t):this._addObject(e,t)}removeAt(e){this.records.splice(e,1);for(let t=e,r=this.size();t<r;t+=1)this.records[t].i-=1}removeAll(e){for(let t=e.length-1;t>=0;t-=1)this.records.splice(e[t],1);for(let e=0,t=this.records.length;e<t;e+=1)this.records[e].i=e}getValueForItemAtKeyId(e,t){return e[this._keysMap[t]]}size(){return this.records.length}_addString(e,t){if(!o(e)||u(e))return;let r={v:e,i:t,n:this.norm.get(e)};this.records.push(r)}_addObject(e,i){let s={i:i,$:{}};this.keys.forEach((i,c)=>{let a=i.getFn?i.getFn(e):this.getFn(e,i.path);if(o(a)){if(t(a)){let e=[];for(let t=0,i=a.length;t<i;t+=1){let i=a[t];if(o(i)){if(n(i)){if(!u(i)){let r={v:i,i:t,n:this.norm.get(i)};e.push(r)}}else if(o(i.v)){let t=n(i.v)?i.v:r(i.v);if(!u(t)){let r={v:t,i:i.i,n:this.norm.get(t)};e.push(r)}}}}s.$[c]=e}else if(n(a)&&!u(a)){let e={v:a,n:this.norm.get(a)};s.$[c]=e}}}),this.records.push(s)}toJSON(){return{keys:this.keys.map(({getFn:e,...t})=>t),records:this.records}}}function y(e,t,{getFn:r=g.getFn,fieldNormWeight:n=g.fieldNormWeight}={}){let i=new m({getFn:r,fieldNormWeight:n});return i.setKeys(e.map(d)),i.setSources(t),i.create(),i}function v(e){if(e.length<=1)return e;e.sort((e,t)=>e[0]-t[0]||e[1]-t[1]);let t=[e[0]];for(let r=1,n=e.length;r<n;r+=1){let n=t[t.length-1],i=e[r];i[0]<=n[1]+1?n[1]=Math.max(n[1],i[1]):t.push(i)}return t}let b={ł:"l",Ł:"L",đ:"d",Đ:"D",ø:"o",Ø:"O",ħ:"h",Ħ:"H",ŧ:"t",Ŧ:"T",ı:"i",ß:"ss"},x=RegExp("["+Object.keys(b).join("")+"]","g"),A=String.prototype.normalize?e=>e.normalize("NFD").replace(/[\u0300-\u036F\u0483-\u0489\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u0610-\u061A\u064B-\u065F\u0670\u06D6-\u06DC\u06DF-\u06E4\u06E7\u06E8\u06EA-\u06ED\u0711\u0730-\u074A\u07A6-\u07B0\u07EB-\u07F3\u07FD\u0816-\u0819\u081B-\u0823\u0825-\u0827\u0829-\u082D\u0859-\u085B\u08D3-\u08E1\u08E3-\u0903\u093A-\u093C\u093E-\u094F\u0951-\u0957\u0962\u0963\u0981-\u0983\u09BC\u09BE-\u09C4\u09C7\u09C8\u09CB-\u09CD\u09D7\u09E2\u09E3\u09FE\u0A01-\u0A03\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A70\u0A71\u0A75\u0A81-\u0A83\u0ABC\u0ABE-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AE2\u0AE3\u0AFA-\u0AFF\u0B01-\u0B03\u0B3C\u0B3E-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B62\u0B63\u0B82\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD7\u0C00-\u0C04\u0C3E-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C62\u0C63\u0C81-\u0C83\u0CBC\u0CBE-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CE2\u0CE3\u0D00-\u0D03\u0D3B\u0D3C\u0D3E-\u0D44\u0D46-\u0D48\u0D4A-\u0D4D\u0D57\u0D62\u0D63\u0D82\u0D83\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DF2\u0DF3\u0E31\u0E34-\u0E3A\u0E47-\u0E4E\u0EB1\u0EB4-\u0EB9\u0EBB\u0EBC\u0EC8-\u0ECD\u0F18\u0F19\u0F35\u0F37\u0F39\u0F3E\u0F3F\u0F71-\u0F84\u0F86\u0F87\u0F8D-\u0F97\u0F99-\u0FBC\u0FC6\u102B-\u103E\u1056-\u1059\u105E-\u1060\u1062-\u1064\u1067-\u106D\u1071-\u1074\u1082-\u108D\u108F\u109A-\u109D\u135D-\u135F\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17B4-\u17D3\u17DD\u180B-\u180D\u1885\u1886\u18A9\u1920-\u192B\u1930-\u193B\u1A17-\u1A1B\u1A55-\u1A5E\u1A60-\u1A7C\u1A7F\u1AB0-\u1ABE\u1B00-\u1B04\u1B34-\u1B44\u1B6B-\u1B73\u1B80-\u1B82\u1BA1-\u1BAD\u1BE6-\u1BF3\u1C24-\u1C37\u1CD0-\u1CD2\u1CD4-\u1CE8\u1CED\u1CF2-\u1CF4\u1CF7-\u1CF9\u1DC0-\u1DF9\u1DFB-\u1DFF\u20D0-\u20F0\u2CEF-\u2CF1\u2D7F\u2DE0-\u2DFF\u302A-\u302F\u3099\u309A\uA66F-\uA672\uA674-\uA67D\uA69E\uA69F\uA6F0\uA6F1\uA802\uA806\uA80B\uA823-\uA827\uA880\uA881\uA8B4-\uA8C5\uA8E0-\uA8F1\uA8FF\uA926-\uA92D\uA947-\uA953\uA980-\uA983\uA9B3-\uA9C0\uA9E5\uAA29-\uAA36\uAA43\uAA4C\uAA4D\uAA7B-\uAA7D\uAAB0\uAAB2-\uAAB4\uAAB7\uAAB8\uAABE\uAABF\uAAC1\uAAEB-\uAAEF\uAAF5\uAAF6\uABE3-\uABEA\uABEC\uABED\uFB1E\uFE00-\uFE0F\uFE20-\uFE2F]/g,"").replace(x,e=>b[e]):e=>e;class M{constructor(e,{location:t=g.location,threshold:r=g.threshold,distance:n=g.distance,includeMatches:i=g.includeMatches,findAllMatches:s=g.findAllMatches,minMatchCharLength:o=g.minMatchCharLength,isCaseSensitive:u=g.isCaseSensitive,ignoreDiacritics:c=g.ignoreDiacritics,ignoreLocation:a=g.ignoreLocation}={}){if(this.options={location:t,threshold:r,distance:n,includeMatches:i,findAllMatches:s,minMatchCharLength:o,isCaseSensitive:u,ignoreDiacritics:c,ignoreLocation:a},e=u?e:e.toLowerCase(),e=c?A(e):e,this.pattern=e,this.chunks=[],!this.pattern.length)return;const l=(e,t)=>{this.chunks.push({pattern:e,alphabet:function(e){let t={};for(let r=0,n=e.length;r<n;r+=1){let i=e.charAt(r);t[i]=(t[i]||0)|1<<n-r-1}return t}(e),startIndex:t})},d=this.pattern.length;if(d>32){let e=0;const t=d%32,r=d-t;for(;e<r;)l(this.pattern.substr(e,32),e),e+=32;if(t){const e=d-32;l(this.pattern.substr(e),e)}}else l(this.pattern,0)}searchIn(e){let{isCaseSensitive:t,ignoreDiacritics:r,includeMatches:n}=this.options;if(e=t?e:e.toLowerCase(),e=r?A(e):e,this.pattern===e){let t={isMatch:!0,score:0};return n&&(t.indices=[[0,e.length-1]]),t}let{location:i,distance:s,threshold:o,findAllMatches:u,minMatchCharLength:c,ignoreLocation:a}=this.options,l=[],d=0,h=!1;this.chunks.forEach(({pattern:t,alphabet:r,startIndex:f})=>{let{isMatch:p,score:m,indices:y}=function(e,t,r,{location:n=g.location,distance:i=g.distance,threshold:s=g.threshold,findAllMatches:o=g.findAllMatches,minMatchCharLength:u=g.minMatchCharLength,includeMatches:c=g.includeMatches,ignoreLocation:a=g.ignoreLocation}={}){let l;if(t.length>32)throw Error("Pattern length exceeds max of 32.");let d=t.length,h=e.length,f=Math.max(0,Math.min(n,h)),p=s,m=f,y=(e,t)=>{let r=e/d;if(a)return r;let n=Math.abs(f-t);return i?r+n/i:n?1:r},v=u>1||c,b=v?Array(h):[];for(;(l=e.indexOf(t,m))>-1;)if(p=Math.min(y(0,l),p),m=l+d,v){let e=0;for(;e<d;)b[l+e]=1,e+=1}m=-1;let x=[],A=1,M=d+h,C=1<<d-1;for(let t=0;t<d;t+=1){let n=0,i=M;for(;n<i;)y(t,f+i)<=p?n=i:M=i,i=Math.floor((M-n)/2+n);M=i;let s=Math.max(1,f-i+1),u=o?h:Math.min(f+i,h)+d,c=Array(u+2);c[u+1]=(1<<t)-1;for(let n=u;n>=s;n-=1){let i=n-1,o=r[e[i]];if(v&&(b[i]=+!!o),c[n]=(c[n+1]<<1|1)&o,t&&(c[n]|=(x[n+1]|x[n])<<1|1|x[n+1]),c[n]&C&&(A=y(t,i))<=p){if(p=A,(m=i)<=f)break;s=Math.max(1,2*f-m)}}if(y(t+1,f)>p)break;x=c}let k={isMatch:m>=0,score:Math.max(.001,A)};if(v){let e=function(e=[],t=g.minMatchCharLength){let r=[],n=-1,i=-1,s=0;for(let o=e.length;s<o;s+=1){let o=e[s];o&&-1===n?n=s:o||-1===n||((i=s-1)-n+1>=t&&r.push([n,i]),n=-1)}return e[s-1]&&s-n>=t&&r.push([n,s-1]),r}(b,u);e.length?c&&(k.indices=e):k.isMatch=!1}return k}(e,t,r,{location:i+f,distance:s,threshold:o,findAllMatches:u,minMatchCharLength:c,includeMatches:n,ignoreLocation:a});p&&(h=!0),d+=m,p&&y&&l.push(...y)});let f={isMatch:h,score:h?d/this.chunks.length:1};return h&&n&&(f.indices=v(l)),f}}class C{constructor(e){this.pattern=e}static isMultiMatch(e){return k(e,this.multiRegex)}static isSingleMatch(e){return k(e,this.singleRegex)}search(e){return{isMatch:!1,score:1}}}function k(e,t){let r=e.match(t);return r?r[1]:null}class w extends C{constructor(e,{location:t=g.location,threshold:r=g.threshold,distance:n=g.distance,includeMatches:i=g.includeMatches,findAllMatches:s=g.findAllMatches,minMatchCharLength:o=g.minMatchCharLength,isCaseSensitive:u=g.isCaseSensitive,ignoreDiacritics:c=g.ignoreDiacritics,ignoreLocation:a=g.ignoreLocation}={}){super(e),this._bitapSearch=new M(e,{location:t,threshold:r,distance:n,includeMatches:i,findAllMatches:s,minMatchCharLength:o,isCaseSensitive:u,ignoreDiacritics:c,ignoreLocation:a})}static get type(){return"fuzzy"}static get multiRegex(){return/^"(.*)"$/}static get singleRegex(){return/^(.*)$/}search(e){return this._bitapSearch.searchIn(e)}}class E extends C{constructor(e){super(e)}static get type(){return"include"}static get multiRegex(){return/^'"(.*)"$/}static get singleRegex(){return/^'(.*)$/}search(e){let t,r=0,n=[],i=this.pattern.length;for(;(t=e.indexOf(this.pattern,r))>-1;)r=t+i,n.push([t,r-1]);let s=!!n.length;return{isMatch:s,score:+!s,indices:n}}}let S=[class extends C{constructor(e){super(e)}static get type(){return"exact"}static get multiRegex(){return/^="(.*)"$/}static get singleRegex(){return/^=(.*)$/}search(e){let t=e===this.pattern;return{isMatch:t,score:+!t,indices:[0,this.pattern.length-1]}}},E,class extends C{constructor(e){super(e)}static get type(){return"prefix-exact"}static get multiRegex(){return/^\^"(.*)"$/}static get singleRegex(){return/^\^(.*)$/}search(e){let t=e.startsWith(this.pattern);return{isMatch:t,score:+!t,indices:[0,this.pattern.length-1]}}},class extends C{constructor(e){super(e)}static get type(){return"inverse-prefix-exact"}static get multiRegex(){return/^!\^"(.*)"$/}static get singleRegex(){return/^!\^(.*)$/}search(e){let t=!e.startsWith(this.pattern);return{isMatch:t,score:+!t,indices:[0,e.length-1]}}},class extends C{constructor(e){super(e)}static get type(){return"inverse-suffix-exact"}static get multiRegex(){return/^!"(.*)"\$$/}static get singleRegex(){return/^!(.*)\$$/}search(e){let t=!e.endsWith(this.pattern);return{isMatch:t,score:+!t,indices:[0,e.length-1]}}},class extends C{constructor(e){super(e)}static get type(){return"suffix-exact"}static get multiRegex(){return/^"(.*)"\$$/}static get singleRegex(){return/^(.*)\$$/}search(e){let t=e.endsWith(this.pattern);return{isMatch:t,score:+!t,indices:[e.length-this.pattern.length,e.length-1]}}},class extends C{constructor(e){super(e)}static get type(){return"inverse-exact"}static get multiRegex(){return/^!"(.*)"$/}static get singleRegex(){return/^!(.*)$/}search(e){let t=-1===e.indexOf(this.pattern);return{isMatch:t,score:+!t,indices:[0,e.length-1]}}},w],j=S.length,D=new Set([w.type,E.type]),F=[];function _(...e){F.push(...e)}function B(e,t){for(let r=0,n=F.length;r<n;r+=1){let n=F[r];if(n.condition(e,t))return new n(e,t)}return new M(e,t)}let R="$and",O="$path",I=e=>!!(e[R]||e.$or),L=e=>({[R]:Object.keys(e).map(t=>({[t]:e[t]}))});function N(e,r,{auto:i=!0}={}){let o=e=>{if(n(e)){let t={keyId:null,pattern:e};return i&&(t.searcher=B(e,r)),t}let u=Object.keys(e),c=!!e[O];if(!c&&u.length>1&&!I(e))return o(L(e));if(!t(e)&&s(e)&&!I(e)){let t=c?e[O]:u[0],s=c?e.$val:e[t];if(!n(s))throw Error(`Invalid value for key ${t}`);let o={keyId:f(t),pattern:s};return i&&(o.searcher=B(s,r)),o}let a={children:[],operator:u[0]};return u.forEach(r=>{let n=e[r];t(n)&&n.forEach(e=>{a.children.push(o(e))})}),a};return I(e)||(e=L(e)),o(e)}function $(e,{ignoreFieldNorm:t=g.ignoreFieldNorm}){let r=1;return e.forEach(({key:e,norm:n,score:i})=>{let s=e?e.weight:null;r*=Math.pow(0===i&&s?Number.EPSILON:i,(s||1)*(t?1:n))}),r}class P{constructor(e){this.limit=e,this.heap=[]}get size(){return this.heap.length}shouldInsert(e){return this.size<this.limit||e<this.heap[0].score}insert(e){this.size<this.limit?(this.heap.push(e),this._bubbleUp(this.size-1)):e.score<this.heap[0].score&&(this.heap[0]=e,this._sinkDown(0))}extractSorted(e){return this.heap.sort(e)}_bubbleUp(e){let t=this.heap;for(;e>0;){let r=e-1>>1;if(t[e].score<=t[r].score)break;let n=t[e];t[e]=t[r],t[r]=n,e=r}}_sinkDown(e){let t=this.heap,r=t.length,n=e;do{let i=2*(e=n)+1,s=2*e+2;if(i<r&&t[i].score>t[n].score&&(n=i),s<r&&t[s].score>t[n].score&&(n=s),n!==e){let r=t[e];t[e]=t[n],t[n]=r}}while(n!==e)}}function z(e,t){let r=e.matches;t.matches=[],o(r)&&r.forEach(e=>{if(!o(e.indices)||!e.indices.length)return;let{indices:r,value:n}=e,i={indices:r,value:n};e.key&&(i.key=e.key.src),e.idx>-1&&(i.refIndex=e.idx),t.matches.push(i)})}function T(e,t){t.score=e.score}let U=/\b\w+\b/g;function V({isCaseSensitive:e=!1,ignoreDiacritics:t=!1}={}){return{tokenize:r=>(e||(r=r.toLowerCase()),t&&(r=A(r)),r.match(U)||[])}}function W(e,t){for(let[r,n]of e.terms){let i=n.filter(e=>e.docIdx!==t),s=n.length-i.length;s>0&&(e.fieldCount-=s,e.df.set(r,(e.df.get(r)||0)-s),0===i.length?(e.terms.delete(r),e.df.delete(r)):e.terms.set(r,i))}}class q{constructor(e,t,r){this.options={...g,...t},this.options.useExtendedSearch,this.options.useTokenSearch,this._keyStore=new l(this.options.keys),this._docs=e,this._myIndex=null,this._invertedIndex=null,this.setCollection(e,r),this._lastQuery=null,this._lastSearcher=null}_getSearcher(e){if(this._lastQuery===e)return this._lastSearcher;let t=B(e,this._invertedIndex?{...this.options,_invertedIndex:this._invertedIndex}:this.options);return this._lastQuery=e,this._lastSearcher=t,t}setCollection(e,t){if(this._docs=e,t&&!(t instanceof m))throw Error("Incorrect 'index' type");if(this._myIndex=t||y(this.options.keys,this._docs,{getFn:this.options.getFn,fieldNormWeight:this.options.fieldNormWeight}),this.options.useTokenSearch){let e=V({isCaseSensitive:this.options.isCaseSensitive,ignoreDiacritics:this.options.ignoreDiacritics});this._invertedIndex=function(e,t,r){let n=new Map,i=new Map,s=0;function o(e,t,o,u){let c=r.tokenize(e);if(!c.length)return;s++;let a=new Map;for(let e of c)a.set(e,(a.get(e)||0)+1);for(let[e,r]of a){let s={docIdx:t,keyIdx:o,subIdx:u,tf:r},c=n.get(e);c||(c=[],n.set(e,c)),c.push(s),i.set(e,(i.get(e)||0)+1)}}for(let r of e){let{i:e,v:n,$:i}=r;if(void 0!==n){o(n,e,-1,-1);continue}if(i)for(let r=0;r<t;r++){let t=i[r];if(t)if(Array.isArray(t))for(let n of t)o(n.v,e,r,n.i??-1);else o(t.v,e,r,-1)}}return{terms:n,fieldCount:s,df:i}}(this._myIndex.records,this._myIndex.keys.length,e)}}add(e){if(o(e)&&(this._docs.push(e),this._myIndex.add(e),this._invertedIndex)){let e=this._myIndex.records[this._myIndex.records.length-1],t=V({isCaseSensitive:this.options.isCaseSensitive,ignoreDiacritics:this.options.ignoreDiacritics});!function(e,t,r,n){let{i:i,v:s,$:o}=t;function u(t,r,s){let o=n.tokenize(t);if(!o.length)return;e.fieldCount++;let u=new Map;for(let e of o)u.set(e,(u.get(e)||0)+1);for(let[t,n]of u){let o={docIdx:i,keyIdx:r,subIdx:s,tf:n},u=e.terms.get(t);u||(u=[],e.terms.set(t,u)),u.push(o),e.df.set(t,(e.df.get(t)||0)+1)}}if(void 0!==s)return u(s,-1,-1);if(o)for(let e=0;e<r;e++){let t=o[e];if(t)if(Array.isArray(t))for(let r of t)u(r.v,e,r.i??-1);else u(t.v,e,-1)}}(this._invertedIndex,e,this._myIndex.keys.length,t)}}remove(e=()=>!1){let t=[],r=[];for(let n=0,i=this._docs.length;n<i;n+=1)e(this._docs[n],n)&&(t.push(this._docs[n]),r.push(n));if(r.length){if(this._invertedIndex)for(let e of r)W(this._invertedIndex,e);for(let e=r.length-1;e>=0;e-=1)this._docs.splice(r[e],1);this._myIndex.removeAll(r)}return t}removeAt(e){this._invertedIndex&&W(this._invertedIndex,e);let t=this._docs.splice(e,1)[0];return this._myIndex.removeAt(e),t}getIndex(){return this._myIndex}search(e,t){let r,{limit:s=-1}=t||{},{includeMatches:o,includeScore:u,shouldSort:c,sortFn:a,ignoreFieldNorm:l}=this.options;if(n(e)&&!e.trim()){let e=this._docs.map((e,t)=>({item:e,refIndex:t}));return i(s)&&s>-1&&(e=e.slice(0,s)),e}if(i(s)&&s>0&&n(e)){let t=new P(s);n(this._docs[0])?this._searchStringList(e,{heap:t,ignoreFieldNorm:l}):this._searchObjectList(e,{heap:t,ignoreFieldNorm:l}),r=t.extractSorted(a)}else!function(e,{ignoreFieldNorm:t=g.ignoreFieldNorm}){e.forEach(e=>{e.score=$(e.matches,{ignoreFieldNorm:t})})}(r=n(e)?n(this._docs[0])?this._searchStringList(e):this._searchObjectList(e):this._searchLogical(e),{ignoreFieldNorm:l}),c&&r.sort(a),i(s)&&s>-1&&(r=r.slice(0,s));return function(e,t,{includeMatches:r=g.includeMatches,includeScore:n=g.includeScore}={}){let i=[];return r&&i.push(z),n&&i.push(T),e.map(e=>{let{idx:r}=e,n={item:t[r],refIndex:r};return i.length&&i.forEach(t=>{t(e,n)}),n})}(r,this._docs,{includeMatches:o,includeScore:u})}_searchStringList(e,{heap:t,ignoreFieldNorm:r}={}){let n=this._getSearcher(e),{records:i}=this._myIndex,s=t?null:[];return i.forEach(({v:e,i:i,n:u})=>{if(!o(e))return;let{isMatch:c,score:a,indices:l}=n.searchIn(e);if(c){let n={item:e,idx:i,matches:[{score:a,value:e,norm:u,indices:l}]};t?(n.score=$(n.matches,{ignoreFieldNorm:r}),t.shouldInsert(n.score)&&t.insert(n)):s.push(n)}}),s}_searchLogical(e){let t=N(e,this.options),r=(e,t,n)=>{if(!("children"in e)){let r,{keyId:i,searcher:s}=e;return(null===i?(r=[],this._myIndex.keys.forEach((e,n)=>{r.push(...this._findMatches({key:e,value:t[n],searcher:s}))})):r=this._findMatches({key:this._keyStore.get(i),value:this._myIndex.getValueForItemAtKeyId(t,i),searcher:s}),r&&r.length)?[{idx:n,item:t,matches:r}]:[]}let{children:i,operator:s}=e,o=[];for(let e=0,u=i.length;e<u;e+=1){let u=r(i[e],t,n);if(u.length)o.push(...u);else if(s===R)return[]}return o},n=this._myIndex.records,i=new Map,s=[];return n.forEach(({$:e,i:n})=>{if(o(e)){let o=r(t,e,n);o.length&&(i.has(n)||(i.set(n,{idx:n,item:e,matches:[]}),s.push(i.get(n))),o.forEach(({matches:e})=>{i.get(n).matches.push(...e)}))}}),s}_searchObjectList(e,{heap:t,ignoreFieldNorm:r}={}){let n=this._getSearcher(e),{keys:i,records:s}=this._myIndex,u=t?null:[];return s.forEach(({$:e,i:s})=>{if(!o(e))return;let c=[],a=!1,l=!1;if(i.forEach((t,r)=>{let i=this._findMatches({key:t,value:e[r],searcher:n});i.length?(c.push(...i),i[0].hasInverse&&(l=!0)):a=!0}),(!l||!a)&&c.length){let n={idx:s,item:e,matches:c};t?(n.score=$(n.matches,{ignoreFieldNorm:r}),t.shouldInsert(n.score)&&t.insert(n)):u.push(n)}}),u}_findMatches({key:e,value:r,searcher:n}){if(!o(r))return[];let i=[];if(t(r))r.forEach(({v:t,i:r,n:s})=>{if(!o(t))return;let{isMatch:u,score:c,indices:a,hasInverse:l}=n.searchIn(t);u&&i.push({score:c,key:e,value:t,idx:r,norm:s,indices:a,hasInverse:l})});else{let{v:t,n:s}=r,{isMatch:o,score:u,indices:c,hasInverse:a}=n.searchIn(t);o&&i.push({score:u,key:e,value:t,norm:s,indices:c,hasInverse:a})}return i}}q.version="7.3.0",q.createIndex=y,q.parseIndex=function(e,{getFn:t=g.getFn,fieldNormWeight:r=g.fieldNormWeight}={}){let{keys:n,records:i}=e,s=new m({getFn:t,fieldNormWeight:r});return s.setKeys(n),s.setIndexRecords(i),s},q.config=g,q.match=function(e,t,r){return B(e,{...g,...r}).searchIn(t)},q.parseQuery=N,_(class{constructor(e,{isCaseSensitive:t=g.isCaseSensitive,ignoreDiacritics:r=g.ignoreDiacritics,includeMatches:n=g.includeMatches,minMatchCharLength:i=g.minMatchCharLength,ignoreLocation:s=g.ignoreLocation,findAllMatches:o=g.findAllMatches,location:u=g.location,threshold:c=g.threshold,distance:a=g.distance}={}){this.query=null,this.options={isCaseSensitive:t,ignoreDiacritics:r,includeMatches:n,minMatchCharLength:i,findAllMatches:o,ignoreLocation:s,location:u,threshold:c,distance:a},e=t?e:e.toLowerCase(),e=r?A(e):e,this.pattern=e,this.query=function(e,t={}){return e.replace(/\\\|/g,"\0").split("|").map(e=>{let r=(function(e){let t=[],r=e.length,n=0;for(;n<r;){for(;n<r&&" "===e[n];)n++;if(n>=r)break;let i=n;for(;i<r&&" "!==e[i]&&'"'!==e[i];)i++;if(i<r&&'"'===e[i]){for(i++;i<r;){if('"'===e[i]){let t=i+1;if(t>=r||" "===e[t]){i++;break}if("$"===e[t]&&(t+1>=r||" "===e[t+1])){i+=2;break}}i++}t.push(e.substring(n,i)),n=i}else{for(;i<r&&" "!==e[i];)i++;t.push(e.substring(n,i)),n=i}}return t})(e.replace(/\u0000/g,"|").trim()).filter(e=>e&&!!e.trim()),n=[];for(let e=0,i=r.length;e<i;e+=1){let i=r[e],s=!1,o=-1;for(;!s&&++o<j;){let e=S[o],r=e.isMultiMatch(i);r&&(n.push(new e(r,t)),s=!0)}if(!s)for(o=-1;++o<j;){let e=S[o],r=e.isSingleMatch(i);if(r){n.push(new e(r,t));break}}}return n})}(this.pattern,this.options)}static condition(e,t){return t.useExtendedSearch}searchIn(e){let t=this.query;if(!t)return{isMatch:!1,score:1};let{includeMatches:r,isCaseSensitive:n,ignoreDiacritics:i}=this.options;e=n?e:e.toLowerCase(),e=i?A(e):e;let s=0,o=[],u=0,c=!1;for(let n=0,i=t.length;n<i;n+=1){let i=t[n];o.length=0,s=0,c=!1;for(let t=0,n=i.length;t<n;t+=1){let n=i[t],{isMatch:a,indices:l,score:d}=n.search(e);if(a){s+=1,u+=d;let e=n.constructor.type;e.startsWith("inverse")&&(c=!0),r&&(D.has(e)?o.push(...l):o.push(l))}else{u=0,s=0,o.length=0,c=!1;break}}if(s){let e={isMatch:!0,score:u/s};return c&&(e.hasInverse=!0),r&&(e.indices=v(o)),e}}return{isMatch:!1,score:1}}}),_(class{static condition(e,t){return t.useTokenSearch}constructor(e,t){this.options=t,this.analyzer=V({isCaseSensitive:t.isCaseSensitive,ignoreDiacritics:t.ignoreDiacritics});const r=this.analyzer.tokenize(e),{df:n,fieldCount:i}=t._invertedIndex;for(const e of(this.termSearchers=[],this.idfWeights=[],r)){this.termSearchers.push(new M(e,{location:t.location,threshold:t.threshold,distance:t.distance,includeMatches:t.includeMatches,findAllMatches:t.findAllMatches,minMatchCharLength:t.minMatchCharLength,isCaseSensitive:t.isCaseSensitive,ignoreDiacritics:t.ignoreDiacritics,ignoreLocation:!0}));const r=n.get(e)||0,s=Math.log(1+(i-r+.5)/(r+.5));this.idfWeights.push(s)}}searchIn(e){if(!this.termSearchers.length)return{isMatch:!1,score:1};let t=[],r=0,n=0,i=0;for(let s=0;s<this.termSearchers.length;s++){let o=this.termSearchers[s].searchIn(e),u=this.idfWeights[s];n+=u,o.isMatch&&(i++,r+=u*(1-o.score),o.indices&&t.push(...o.indices))}if(0===i)return{isMatch:!1,score:1};let s={isMatch:!0,score:Math.max(.001,n>0?1-r/n:0)};return this.options.includeMatches&&t.length&&(s.indices=v(t)),s}}),q.use=function(...e){e.forEach(e=>_(e))},e.s(["default",0,q])},922088,e=>{e.v(t=>Promise.all(["static/chunks/0ck~sr0nkabl~.js"].map(t=>e.l(t))).then(()=>t(69466)))},84973,e=>{e.v(t=>Promise.all(["static/chunks/06.0rr3vc.77j.js"].map(t=>e.l(t))).then(()=>t(609403)))},574372,e=>{e.v(t=>Promise.all(["static/chunks/167~e_c5qi8o2.js"].map(t=>e.l(t))).then(()=>t(318135)))},732137,e=>{e.v(t=>Promise.all(["static/chunks/0.gedys.tq.~k.js","static/chunks/0ep-qrl_zzch8.js","static/chunks/17oc2l.ekcs8b.css"].map(t=>e.l(t))).then(()=>t(461834)))}]);
@@ -1 +0,0 @@
1
- (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,565893,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n={assign:function(){return l},searchParamsToUrlQuery:function(){return a},urlQueryToSearchParams:function(){return i}};for(var o in n)Object.defineProperty(r,o,{enumerable:!0,get:n[o]});function a(e){let t={};for(let[r,n]of e.entries()){let e=t[r];void 0===e?t[r]=n:Array.isArray(e)?e.push(n):t[r]=[e,n]}return t}function s(e){return"string"==typeof e?e:("number"!=typeof e||isNaN(e))&&"boolean"!=typeof e?"":String(e)}function i(e){let t=new URLSearchParams;for(let[r,n]of Object.entries(e))if(Array.isArray(n))for(let e of n)t.append(r,s(e));else t.set(r,s(n));return t}function l(e,...t){for(let r of t){for(let t of r.keys())e.delete(t);for(let[t,n]of r.entries())e.append(t,n)}return e}},204575,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n={DecodeError:function(){return y},MiddlewareNotFoundError:function(){return w},MissingStaticPage:function(){return x},NormalizeError:function(){return v},PageNotFoundError:function(){return b},SP:function(){return m},ST:function(){return g},WEB_VITALS:function(){return a},execOnce:function(){return s},getDisplayName:function(){return d},getLocationOrigin:function(){return c},getURL:function(){return u},isAbsoluteUrl:function(){return l},isResSent:function(){return f},loadGetInitialProps:function(){return p},normalizeRepeatedSlashes:function(){return h},stringifyError:function(){return S}};for(var o in n)Object.defineProperty(r,o,{enumerable:!0,get:n[o]});let a=["CLS","FCP","FID","INP","LCP","TTFB"];function s(e){let t,r=!1;return(...n)=>(r||(r=!0,t=e(...n)),t)}let i=/^[a-zA-Z][a-zA-Z\d+\-.]*?:/,l=e=>i.test(e);function c(){let{protocol:e,hostname:t,port:r}=window.location;return`${e}//${t}${r?":"+r:""}`}function u(){let{href:e}=window.location,t=c();return e.substring(t.length)}function d(e){return"string"==typeof e?e:e.displayName||e.name||"Unknown"}function f(e){return e.finished||e.headersSent}function h(e){let t=e.split("?");return t[0].replace(/\\/g,"/").replace(/\/\/+/g,"/")+(t[1]?`?${t.slice(1).join("?")}`:"")}async function p(e,t){let r=t.res||t.ctx&&t.ctx.res;if(!e.getInitialProps)return t.ctx&&t.Component?{pageProps:await p(t.Component,t.ctx)}:{};let n=await e.getInitialProps(t);if(r&&f(r))return n;if(!n)throw Object.defineProperty(Error(`"${d(e)}.getInitialProps()" should resolve to an object. But found "${n}" instead.`),"__NEXT_ERROR_CODE",{value:"E1025",enumerable:!1,configurable:!0});return n}let m="u">typeof performance,g=m&&["mark","measure","getEntriesByName"].every(e=>"function"==typeof performance[e]);class y extends Error{}class v extends Error{}class b extends Error{constructor(e){super(),this.code="ENOENT",this.name="PageNotFoundError",this.message=`Cannot find module for page: ${e}`}}class x extends Error{constructor(e,t){super(),this.message=`Failed to load static file for page: ${e} ${t}`}}class w extends Error{constructor(){super(),this.code="ENOENT",this.message="Cannot find the middleware module"}}function S(e){return JSON.stringify({message:e.message,stack:e.stack})}},619172,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"warnOnce",{enumerable:!0,get:function(){return n}});let n=e=>{}},821957,e=>{"use strict";var t=e.i(965652),r=(e,t,r,n,o,a,s,i)=>{let l=document.documentElement,c=["light","dark"];function u(t){var r;(Array.isArray(e)?e:[e]).forEach(e=>{let r="class"===e,n=r&&a?o.map(e=>a[e]||e):o;r?(l.classList.remove(...n),l.classList.add(a&&a[t]?a[t]:t)):l.setAttribute(e,t)}),r=t,i&&c.includes(r)&&(l.style.colorScheme=r)}if(n)u(n);else try{let e=localStorage.getItem(t)||r,n=s&&"system"===e?window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light":e;u(n)}catch(e){}},n=["light","dark"],o="(prefers-color-scheme: dark)",a="u"<typeof window,s=t.createContext(void 0),i={setTheme:e=>{},themes:[]},l=["light","dark"],c=({forcedTheme:e,disableTransitionOnChange:r=!1,enableSystem:a=!0,enableColorScheme:i=!0,storageKey:c="theme",themes:p=l,defaultTheme:m=a?"system":"light",attribute:g="data-theme",value:y,children:v,nonce:b,scriptProps:x})=>{let[w,S]=t.useState(()=>d(c,m)),[k,j]=t.useState(()=>"system"===w?h():w),C=y?Object.values(y):p,E=t.useCallback(e=>{let t=e;if(!t)return;"system"===e&&a&&(t=h());let o=y?y[t]:t,s=r?f(b):null,l=document.documentElement,c=e=>{"class"===e?(l.classList.remove(...C),o&&l.classList.add(o)):e.startsWith("data-")&&(o?l.setAttribute(e,o):l.removeAttribute(e))};if(Array.isArray(g)?g.forEach(c):c(g),i){let e=n.includes(m)?m:null,r=n.includes(t)?t:e;l.style.colorScheme=r}null==s||s()},[b]),P=t.useCallback(e=>{let t="function"==typeof e?e(w):e;S(t);try{localStorage.setItem(c,t)}catch(e){}},[w]),N=t.useCallback(t=>{j(h(t)),"system"===w&&a&&!e&&E("system")},[w,e]);t.useEffect(()=>{let e=window.matchMedia(o);return e.addListener(N),N(e),()=>e.removeListener(N)},[N]),t.useEffect(()=>{let e=e=>{e.key===c&&(e.newValue?S(e.newValue):P(m))};return window.addEventListener("storage",e),()=>window.removeEventListener("storage",e)},[P]),t.useEffect(()=>{E(null!=e?e:w)},[e,w]);let M=t.useMemo(()=>({theme:w,setTheme:P,forcedTheme:e,resolvedTheme:"system"===w?k:w,themes:a?[...p,"system"]:p,systemTheme:a?k:void 0}),[w,P,e,k,a,p]);return t.createElement(s.Provider,{value:M},t.createElement(u,{forcedTheme:e,storageKey:c,attribute:g,enableSystem:a,enableColorScheme:i,defaultTheme:m,value:y,themes:p,nonce:b,scriptProps:x}),v)},u=t.memo(({forcedTheme:e,storageKey:n,attribute:o,enableSystem:a,enableColorScheme:s,defaultTheme:i,value:l,themes:c,nonce:u,scriptProps:d})=>{let f=JSON.stringify([o,n,i,e,c,l,a,s]).slice(1,-1);return t.createElement("script",{...d,suppressHydrationWarning:!0,nonce:"u"<typeof window?u:"",dangerouslySetInnerHTML:{__html:`(${r.toString()})(${f})`}})}),d=(e,t)=>{let r;if(!a){try{r=localStorage.getItem(e)||void 0}catch(e){}return r||t}},f=e=>{let t=document.createElement("style");return e&&t.setAttribute("nonce",e),t.appendChild(document.createTextNode("*,*::before,*::after{-webkit-transition:none!important;-moz-transition:none!important;-o-transition:none!important;-ms-transition:none!important;transition:none!important}")),document.head.appendChild(t),()=>{window.getComputedStyle(document.body),setTimeout(()=>{document.head.removeChild(t)},1)}},h=e=>(e||(e=window.matchMedia(o)),e.matches?"dark":"light");e.s(["ThemeProvider",0,e=>t.useContext(s)?t.createElement(t.Fragment,null,e.children):t.createElement(c,{...e}),"useTheme",0,()=>{var e;return null!=(e=t.useContext(s))?e:i}])},729739,e=>{"use strict";var t=e.i(514798);let r=(0,t.createServerReference)("00106d4fcb4d66916535f592a22f2432e998f5c560",t.callServer,void 0,t.findSourceMapURL,"getActualWsPort");e.s(["getActualWsPort",0,r])},776405,e=>{"use strict";let t=(0,e.i(572989).default)("chevron-right",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);e.s(["default",0,t])},759684,e=>{"use strict";var t,r,n,o,a,s=e.i(289721);e.s([],40274),e.i(40274),e.i(708878);var i=e.i(965652),l=e.i(887642),c=e.i(161476),u=e.i(462902);let d=i.createContext(void 0);function f(){let e=i.useContext(d);if(void 0===e)throw Error((0,u.default)(53));return e}var h=e.i(581263);let p=((t={}).scrollAreaCornerHeight="--scroll-area-corner-height",t.scrollAreaCornerWidth="--scroll-area-corner-width",t);function m(e,t,r){if(!e)return 0;let n=getComputedStyle(e),o="x"===r?"Inline":"Block";return"x"===r&&"margin"===t?2*parseFloat(n[`${t}InlineStart`]):parseFloat(n[`${t}${o}Start`])+parseFloat(n[`${t}${o}End`])}let g=((r={}).orientation="data-orientation",r.hovering="data-hovering",r.scrolling="data-scrolling",r.hasOverflowX="data-has-overflow-x",r.hasOverflowY="data-has-overflow-y",r.overflowXStart="data-overflow-x-start",r.overflowXEnd="data-overflow-x-end",r.overflowYStart="data-overflow-y-start",r.overflowYEnd="data-overflow-y-end",r);var y=e.i(685668),v=e.i(207516);let b=((n={}).scrolling="data-scrolling",n.hasOverflowX="data-has-overflow-x",n.hasOverflowY="data-has-overflow-y",n.overflowXStart="data-overflow-x-start",n.overflowXEnd="data-overflow-x-end",n.overflowYStart="data-overflow-y-start",n.overflowYEnd="data-overflow-y-end",n),x={hasOverflowX:e=>e?{[b.hasOverflowX]:""}:null,hasOverflowY:e=>e?{[b.hasOverflowY]:""}:null,overflowXStart:e=>e?{[b.overflowXStart]:""}:null,overflowXEnd:e=>e?{[b.overflowXEnd]:""}:null,overflowYStart:e=>e?{[b.overflowYStart]:""}:null,overflowYEnd:e=>e?{[b.overflowYEnd]:""}:null,cornerHidden:()=>null};var w=e.i(682354),S=e.i(743945);let k={x:0,y:0},j={width:0,height:0},C={xStart:!1,xEnd:!1,yStart:!1,yEnd:!1},E={x:!0,y:!0,corner:!0},P=i.forwardRef(function(e,t){let{render:r,className:n,overflowEdgeThreshold:o,...a}=e,u=function(e){if("number"==typeof e){let t=Math.max(0,e);return{xStart:t,xEnd:t,yStart:t,yEnd:t}}return{xStart:Math.max(0,e?.xStart||0),xEnd:Math.max(0,e?.xEnd||0),yStart:Math.max(0,e?.yStart||0),yEnd:Math.max(0,e?.yEnd||0)}}(o),f=(0,v.useBaseUiId)(),b=(0,c.useTimeout)(),P=(0,c.useTimeout)(),{nonce:N,disableStyleElements:M}=(0,S.useCSPContext)(),[A,I]=i.useState(!1),[R,T]=i.useState(!1),[O,L]=i.useState(!1),[z,K]=i.useState(!1),[$,D]=i.useState(!1),[_,F]=i.useState(j),[U,H]=i.useState(j),[W,B]=i.useState(C),[X,Y]=i.useState(E),V=i.useRef(null),J=i.useRef(null),G=i.useRef(null),q=i.useRef(null),Z=i.useRef(null),Q=i.useRef(null),ee=i.useRef(null),et=i.useRef(!1),er=i.useRef(0),en=i.useRef(0),eo=i.useRef(0),ea=i.useRef(0),es=i.useRef("vertical"),ei=i.useRef(k),el=(0,l.useStableCallback)(e=>{let t=e.x-ei.current.x,r=e.y-ei.current.y;ei.current=e,0!==r&&(L(!0),b.start(500,()=>{L(!1)})),0!==t&&(T(!0),P.start(500,()=>{T(!1)}))}),ec=(0,l.useStableCallback)(e=>{0===e.button&&(et.current=!0,er.current=e.clientY,en.current=e.clientX,es.current=e.currentTarget.getAttribute(g.orientation),J.current&&(eo.current=J.current.scrollTop,ea.current=J.current.scrollLeft),Z.current&&"vertical"===es.current&&Z.current.setPointerCapture(e.pointerId),Q.current&&"horizontal"===es.current&&Q.current.setPointerCapture(e.pointerId))}),eu=(0,l.useStableCallback)(e=>{if(!et.current)return;let t=e.clientY-er.current,r=e.clientX-en.current;if(J.current){let n=J.current.scrollHeight,o=J.current.clientHeight,a=J.current.scrollWidth,s=J.current.clientWidth;if(Z.current&&G.current&&"vertical"===es.current){let r=m(G.current,"padding","y"),a=m(Z.current,"margin","y"),s=Z.current.offsetHeight,i=G.current.offsetHeight-s-r-a;J.current.scrollTop=eo.current+t/i*(n-o),e.preventDefault(),L(!0),b.start(500,()=>{L(!1)})}if(Q.current&&q.current&&"horizontal"===es.current){let t=m(q.current,"padding","x"),n=m(Q.current,"margin","x"),o=Q.current.offsetWidth,i=q.current.offsetWidth-o-t-n;J.current.scrollLeft=ea.current+r/i*(a-s),e.preventDefault(),T(!0),P.start(500,()=>{T(!1)})}}}),ed=(0,l.useStableCallback)(e=>{et.current=!1,Z.current&&"vertical"===es.current&&Z.current.releasePointerCapture(e.pointerId),Q.current&&"horizontal"===es.current&&Q.current.releasePointerCapture(e.pointerId)});function ef(e){K("touch"===e.pointerType)}function eh(e){ef(e),"touch"!==e.pointerType&&I((0,w.contains)(V.current,e.target))}let ep=i.useMemo(()=>({scrolling:R||O,hasOverflowX:!X.x,hasOverflowY:!X.y,overflowXStart:W.xStart,overflowXEnd:W.xEnd,overflowYStart:W.yStart,overflowYEnd:W.yEnd,cornerHidden:X.corner}),[R,O,X.x,X.y,X.corner,W]),em={role:"presentation",onPointerEnter:eh,onPointerMove:eh,onPointerDown:ef,onPointerLeave(){I(!1)},style:{position:"relative",[p.scrollAreaCornerHeight]:`${_.height}px`,[p.scrollAreaCornerWidth]:`${_.width}px`}},eg=(0,h.useRenderElement)("div",e,{state:ep,ref:[t,V],props:[em,a],stateAttributesMapping:x}),ey=i.useMemo(()=>({handlePointerDown:ec,handlePointerMove:eu,handlePointerUp:ed,handleScroll:el,cornerSize:_,setCornerSize:F,thumbSize:U,setThumbSize:H,hasMeasuredScrollbar:$,setHasMeasuredScrollbar:D,touchModality:z,cornerRef:ee,scrollingX:R,setScrollingX:T,scrollingY:O,setScrollingY:L,hovering:A,setHovering:I,viewportRef:J,rootRef:V,scrollbarYRef:G,scrollbarXRef:q,thumbYRef:Z,thumbXRef:Q,rootId:f,hiddenState:X,setHiddenState:Y,overflowEdges:W,setOverflowEdges:B,viewportState:ep,overflowEdgeThreshold:u}),[ec,eu,ed,el,_,U,$,z,R,T,O,L,A,I,f,X,W,ep,u]);return(0,s.jsxs)(d.Provider,{value:ey,children:[!M&&y.styleDisableScrollbar.getElement(N),eg]})});var N=e.i(804849),M=e.i(442383);let A=i.createContext(void 0);var I=e.i(824047),R=e.i(867467);let T=((o={}).scrollAreaOverflowXStart="--scroll-area-overflow-x-start",o.scrollAreaOverflowXEnd="--scroll-area-overflow-x-end",o.scrollAreaOverflowYStart="--scroll-area-overflow-y-start",o.scrollAreaOverflowYEnd="--scroll-area-overflow-y-end",o);function O(e,t){if(t<=0)return 0;let r=(0,R.clamp)(e,0,t),n=t-r,o=r<=1,a=n<=1;return o&&a?r<=n?0:t:o?0:a?t:r}let L=!1,z="u">typeof ResizeObserver,K=i.forwardRef(function(e,t){let{render:r,className:n,...o}=e,{viewportRef:a,scrollbarYRef:u,scrollbarXRef:d,thumbYRef:p,thumbXRef:g,cornerRef:v,cornerSize:b,setCornerSize:w,setThumbSize:S,rootId:k,setHiddenState:j,hiddenState:C,setHasMeasuredScrollbar:E,handleScroll:P,setHovering:K,setOverflowEdges:$,overflowEdges:D,overflowEdgeThreshold:_,scrollingX:F,scrollingY:U}=f(),H=(0,I.useDirection)(),W=i.useRef(!0),B=i.useRef([NaN,NaN,NaN,NaN]),X=(0,c.useTimeout)(),Y=(0,c.useTimeout)(),V=(0,l.useStableCallback)(()=>{var e;let t,r,n=a.current,o=u.current,s=d.current,i=p.current,l=g.current,c=v.current;if(!n)return;let f=n.scrollHeight,h=n.scrollWidth,y=n.clientHeight,x=n.clientWidth,k=n.scrollTop,C=n.scrollLeft,P=B.current,N=Number.isNaN(P[0]);if(P[0]=y,P[1]=f,P[2]=x,P[3]=h,N&&E(!0),0===f||0===h)return;let M=(t=(e=n).clientHeight>=e.scrollHeight,{y:t,x:r=e.clientWidth>=e.scrollWidth,corner:t||r}),A=M.y,I=M.x,L=x/h,z=y/f,K=Math.max(0,h-x),D=Math.max(0,f-y),F=0,U=0;!I&&(F=O("rtl"===H?(0,R.clamp)(-C,0,K):(0,R.clamp)(C,0,K),K),U=K-F);let W=A?0:(0,R.clamp)(k,0,D),X=A?0:O(W,D),Y=A?0:D-X,V=I?0:x,J=A?0:y,G=0,q=0;I||A||(G=o?.offsetWidth||0,q=s?.offsetHeight||0);let Z=0===b.width&&0===b.height,Q=Z?G:0,ee=Z?q:0,et=m(s,"padding","x"),er=m(o,"padding","y"),en=m(l,"margin","x"),eo=m(i,"margin","y"),ea=V-et-en,es=J-er-eo,ei=s?Math.min(s.offsetWidth-Q,ea):ea,el=o?Math.min(o.offsetHeight-ee,es):es,ec=Math.max(16,ei*L),eu=Math.max(16,el*z);if(S(e=>e.height===eu&&e.width===ec?e:{width:ec,height:eu}),o&&i){let e=o.offsetHeight-eu-er-eo,t=f-y,r=Math.min(e,Math.max(0,(0===t?0:k/t)*e));i.style.transform=`translate3d(0,${r}px,0)`}if(s&&l){let e=s.offsetWidth-ec-et-en,t=h-x,r=0===t?0:C/t,n="rtl"===H?(0,R.clamp)(r*e,-e,0):(0,R.clamp)(r*e,0,e);l.style.transform=`translate3d(${n}px,0,0)`}for(let[e,t]of[[T.scrollAreaOverflowXStart,F],[T.scrollAreaOverflowXEnd,U],[T.scrollAreaOverflowYStart,X],[T.scrollAreaOverflowYEnd,Y]])n.style.setProperty(e,`${t}px`);c&&(I||A?w({width:0,height:0}):I||A||w({width:G,height:q})),j(e=>{var t,r;return t=e,r=M,t.y===r.y&&t.x===r.x&&t.corner===r.corner?t:r});let ed={xStart:!I&&F>_.xStart,xEnd:!I&&U>_.xEnd,yStart:!A&&X>_.yStart,yEnd:!A&&Y>_.yEnd};$(e=>e.xStart===ed.xStart&&e.xEnd===ed.xEnd&&e.yStart===ed.yStart&&e.yEnd===ed.yEnd?e:ed)});function J(){W.current=!1}(0,N.useIsoLayoutEffect)(()=>{if(a.current&&(L||M.isWebKit||("u">typeof CSS&&"registerProperty"in CSS&&[T.scrollAreaOverflowXStart,T.scrollAreaOverflowXEnd,T.scrollAreaOverflowYStart,T.scrollAreaOverflowYEnd].forEach(e=>{try{CSS.registerProperty({name:e,syntax:"<length>",inherits:!1,initialValue:"0px"})}catch{}}),L=!0),!z))return function(e,t){if("u"<typeof IntersectionObserver)return()=>{};let r=new IntersectionObserver(e=>{e.forEach(e=>{e.intersectionRatio>0&&(t(),r.disconnect())})});return r.observe(e),()=>{r.disconnect()}}(a.current,()=>{V()})},[V,a]),(0,N.useIsoLayoutEffect)(()=>{queueMicrotask(V)},[V,C,H]),(0,N.useIsoLayoutEffect)(()=>{a.current?.matches(":hover")&&K(!0)},[a,K]),i.useEffect(()=>{let e=a.current;if(!z||!e)return;let t=!1,r=new ResizeObserver(()=>{if(!t){t=!0;let r=B.current;if(r[0]===e.clientHeight&&r[1]===e.scrollHeight&&r[2]===e.clientWidth&&r[3]===e.scrollWidth)return}V()});return r.observe(e),Y.start(0,()=>{let t=e.getAnimations({subtree:!0});0!==t.length&&Promise.allSettled(t.map(e=>e.finished)).then(V).catch(()=>{})}),()=>{r.disconnect(),Y.clear()}},[V,a,Y]);let G={role:"presentation",...k&&{"data-id":`${k}-viewport`},tabIndex:C.x&&C.y?-1:0,className:y.styleDisableScrollbar.className,style:{overflow:"scroll"},onScroll(){a.current&&(V(),W.current||P({x:a.current.scrollLeft,y:a.current.scrollTop}),X.start(100,()=>{W.current=!0}))},onWheel:J,onTouchMove:J,onPointerMove:J,onPointerEnter:J,onKeyDown:J},q=i.useMemo(()=>({scrolling:F||U,hasOverflowX:!C.x,hasOverflowY:!C.y,overflowXStart:D.xStart,overflowXEnd:D.xEnd,overflowYStart:D.yStart,overflowYEnd:D.yEnd,cornerHidden:C.corner}),[F,U,C.x,C.y,C.corner,D]),Z=(0,h.useRenderElement)("div",e,{ref:[t,a],state:q,props:[G,o],stateAttributesMapping:x}),Q=i.useMemo(()=>({computeThumbPosition:V}),[V]);return(0,s.jsx)(A.Provider,{value:Q,children:Z})}),$=i.createContext(void 0),D=((a={}).scrollAreaThumbHeight="--scroll-area-thumb-height",a.scrollAreaThumbWidth="--scroll-area-thumb-width",a),_=i.forwardRef(function(e,t){let{render:r,className:n,orientation:o="vertical",keepMounted:a=!1,...l}=e,{hovering:c,scrollingX:u,scrollingY:d,hiddenState:g,overflowEdges:y,scrollbarYRef:v,scrollbarXRef:b,viewportRef:w,thumbYRef:S,thumbXRef:k,handlePointerDown:j,handlePointerUp:C,rootId:E,thumbSize:P,hasMeasuredScrollbar:N}=f(),M={hovering:c,scrolling:{horizontal:u,vertical:d}[o],orientation:o,hasOverflowX:!g.x,hasOverflowY:!g.y,overflowXStart:y.xStart,overflowXEnd:y.xEnd,overflowYStart:y.yStart,overflowYEnd:y.yEnd,cornerHidden:g.corner},A=(0,I.useDirection)();i.useEffect(()=>{let e=w.current,t="vertical"===o?v.current:b.current;if(t)return t.addEventListener("wheel",r,{passive:!1}),()=>{t.removeEventListener("wheel",r)};function r(r){if(e&&t&&!r.ctrlKey){if(r.preventDefault(),"vertical"===o){if(0===e.scrollTop&&r.deltaY<0)return}else if(0===e.scrollLeft&&r.deltaX<0)return;if("vertical"===o){if(e.scrollTop===e.scrollHeight-e.clientHeight&&r.deltaY>0)return}else if(e.scrollLeft===e.scrollWidth-e.clientWidth&&r.deltaX>0)return;"vertical"===o?e.scrollTop+=r.deltaY:e.scrollLeft+=r.deltaX}}},[o,b,v,w]);let R={...E&&{"data-id":`${E}-scrollbar`},onPointerDown(e){if(0===e.button&&e.currentTarget===e.target&&w.current){if(S.current&&v.current&&"vertical"===o){let t=m(S.current,"margin","y"),r=m(v.current,"padding","y"),n=S.current.offsetHeight,o=v.current.getBoundingClientRect(),a=e.clientY-o.top-n/2-r+t/2,s=w.current.scrollHeight,i=w.current.clientHeight,l=v.current.offsetHeight-n-r-t;w.current.scrollTop=a/l*(s-i)}if(k.current&&b.current&&"horizontal"===o){let t,r=m(k.current,"margin","x"),n=m(b.current,"padding","x"),o=k.current.offsetWidth,a=b.current.getBoundingClientRect(),s=e.clientX-a.left-o/2-n+r/2,i=w.current.scrollWidth,l=w.current.clientWidth,c=s/(b.current.offsetWidth-o-n-r);"rtl"===A?(t=(1-c)*(i-l),w.current.scrollLeft<=0&&(t=-t)):t=c*(i-l),w.current.scrollLeft=t}j(e)}},onPointerUp:C,style:{position:"absolute",touchAction:"none",WebkitUserSelect:"none",userSelect:"none",visibility:N||a?void 0:"hidden",..."vertical"===o&&{top:0,bottom:`var(${p.scrollAreaCornerHeight})`,insetInlineEnd:0,[D.scrollAreaThumbHeight]:`${P.height}px`},..."horizontal"===o&&{insetInlineStart:0,insetInlineEnd:`var(${p.scrollAreaCornerWidth})`,bottom:0,[D.scrollAreaThumbWidth]:`${P.width}px`}}},T=(0,h.useRenderElement)("div",e,{ref:[t,"vertical"===o?v:b],state:M,props:[R,l],stateAttributesMapping:x}),O=i.useMemo(()=>({orientation:o}),[o]),L="vertical"===o?g.y:g.x;return a||!L?(0,s.jsx)($.Provider,{value:O,children:T}):null}),F=i.forwardRef(function(e,t){let{render:r,className:n,...o}=e,a=i.useRef(null),{computeThumbPosition:s}=function(){let e=i.useContext(A);if(void 0===e)throw Error((0,u.default)(55));return e}(),{viewportState:l}=f();return(0,N.useIsoLayoutEffect)(()=>{if("u"<typeof ResizeObserver)return;let e=!1,t=new ResizeObserver(()=>{if(!e){e=!0;return}s()});return a.current&&t.observe(a.current),()=>{t.disconnect()}},[s]),(0,h.useRenderElement)("div",e,{ref:[t,a],state:l,stateAttributesMapping:x,props:[{role:"presentation",style:{minWidth:"fit-content"}},o]})}),U=i.forwardRef(function(e,t){let{render:r,className:n,...o}=e,{thumbYRef:a,thumbXRef:s,handlePointerDown:l,handlePointerMove:c,handlePointerUp:d,setScrollingX:p,setScrollingY:m,hasMeasuredScrollbar:g}=f(),{orientation:y}=function(){let e=i.useContext($);if(void 0===e)throw Error((0,u.default)(54));return e}();return(0,h.useRenderElement)("div",e,{ref:[t,"vertical"===y?a:s],state:{orientation:y},props:[{onPointerDown:l,onPointerMove:c,onPointerUp(e){"vertical"===y&&m(!1),"horizontal"===y&&p(!1),d(e)},style:{visibility:g?void 0:"hidden",..."vertical"===y&&{height:`var(${D.scrollAreaThumbHeight})`},..."horizontal"===y&&{width:`var(${D.scrollAreaThumbWidth})`}}},o]})}),H=i.forwardRef(function(e,t){let{render:r,className:n,...o}=e,{cornerRef:a,cornerSize:s,hiddenState:i}=f(),l=(0,h.useRenderElement)("div",e,{ref:[t,a],props:[{style:{position:"absolute",bottom:0,insetInlineEnd:0,width:s.width,height:s.height}},o]});return i.corner?null:l});e.s(["Content",0,F,"Corner",0,H,"Root",0,P,"Scrollbar",0,_,"Thumb",0,U,"Viewport",0,K],273835);var W=e.i(273835),W=W,B=e.i(975157);function X({className:e,orientation:t="vertical",...r}){return(0,s.jsx)(W.Scrollbar,{"data-slot":"scroll-area-scrollbar","data-orientation":t,orientation:t,className:(0,B.cn)("flex touch-none p-px transition-opacity select-none opacity-0 group-hover/scroll:opacity-100 data-horizontal:h-2.5 data-horizontal:flex-col data-horizontal:border-t data-horizontal:border-t-transparent data-vertical:h-full data-vertical:w-2.5 data-vertical:border-l data-vertical:border-l-transparent",e),...r,children:(0,s.jsx)(W.Thumb,{"data-slot":"scroll-area-thumb",className:"relative flex-1 rounded-full bg-border"})})}e.s(["ScrollArea",0,function({className:e,children:t,...r}){return(0,s.jsxs)(W.Root,{"data-slot":"scroll-area",className:(0,B.cn)("group/scroll relative",e),...r,children:[(0,s.jsx)(W.Viewport,{"data-slot":"scroll-area-viewport",className:"size-full rounded-[inherit] transition-[color,box-shadow] outline-none focus-visible:ring-[3px] focus-visible:ring-ring/50 focus-visible:outline-1",children:t}),(0,s.jsx)(X,{}),(0,s.jsx)(W.Corner,{})]})}],759684)},298751,e=>{"use strict";let t=(0,e.i(572989).default)("search",[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]]);e.s(["default",0,t])},597746,e=>{"use strict";var t=e.i(152279);e.s(["Check",()=>t.default])},738690,e=>{"use strict";var t=e.i(298751);e.s(["Search",()=>t.default])},902539,e=>{"use strict";let t=(0,e.i(572989).default)("chevrons-left",[["path",{d:"m11 17-5-5 5-5",key:"13zhaf"}],["path",{d:"m18 17-5-5 5-5",key:"h8a8et"}]]);e.s(["ChevronsLeft",0,t],902539)},242407,e=>{"use strict";var t=e.i(514798);let r=(0,t.createServerReference)("40a4ee923ff0b325baafa490ce673265b4bf3061a2",t.callServer,void 0,t.findSourceMapURL,"getLabelsForWorkspace");e.s(["getLabelsForWorkspace",0,r])},911219,e=>{"use strict";let t=(0,e.i(572989).default)("boxes",[["path",{d:"M2.97 12.92A2 2 0 0 0 2 14.63v3.24a2 2 0 0 0 .97 1.71l3 1.8a2 2 0 0 0 2.06 0L12 19v-5.5l-5-3-4.03 2.42Z",key:"lc1i9w"}],["path",{d:"m7 16.5-4.74-2.85",key:"1o9zyk"}],["path",{d:"m7 16.5 5-3",key:"va8pkn"}],["path",{d:"M7 16.5v5.17",key:"jnp8gn"}],["path",{d:"M12 13.5V19l3.97 2.38a2 2 0 0 0 2.06 0l3-1.8a2 2 0 0 0 .97-1.71v-3.24a2 2 0 0 0-.97-1.71L17 10.5l-5 3Z",key:"8zsnat"}],["path",{d:"m17 16.5-5-3",key:"8arw3v"}],["path",{d:"m17 16.5 4.74-2.85",key:"8rfmw"}],["path",{d:"M17 16.5v5.17",key:"k6z78m"}],["path",{d:"M7.97 4.42A2 2 0 0 0 7 6.13v4.37l5 3 5-3V6.13a2 2 0 0 0-.97-1.71l-3-1.8a2 2 0 0 0-2.06 0l-3 1.8Z",key:"1xygjf"}],["path",{d:"M12 8 7.26 5.15",key:"1vbdud"}],["path",{d:"m12 8 4.74-2.85",key:"3rx089"}],["path",{d:"M12 13.5V8",key:"1io7kd"}]]);e.s(["Boxes",0,t],911219)},468443,e=>{"use strict";let t=(0,e.i(572989).default)("bell-ring",[["path",{d:"M10.268 21a2 2 0 0 0 3.464 0",key:"vwvbt9"}],["path",{d:"M22 8c0-2.3-.8-4.3-2-6",key:"5bb3ad"}],["path",{d:"M3.262 15.326A1 1 0 0 0 4 17h16a1 1 0 0 0 .74-1.673C19.41 13.956 18 12.499 18 8A6 6 0 0 0 6 8c0 4.499-1.411 5.956-2.738 7.326",key:"11g9vi"}],["path",{d:"M4 2C2.8 3.7 2 5.7 2 8",key:"tap9e0"}]]);e.s(["BellRing",0,t],468443)},464249,e=>{"use strict";let t=(0,e.i(572989).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],464249)},894677,359562,e=>{"use strict";var t=e.i(514798);let r=(0,t.createServerReference)("40e3cf8e78797104c14a8e7539e4e904ca54efa90c",t.callServer,void 0,t.findSourceMapURL,"createProductGroup");e.s(["createProductGroup",0,r],894677);let n=(0,t.createServerReference)("609f47ef812de3d5f05ec0e95d0b9bc0490c684bdc",t.callServer,void 0,t.findSourceMapURL,"setProjectGroup");e.s(["setProjectGroup",0,n],359562)},233274,e=>{"use strict";let t=(0,e.i(572989).default)("sparkles",[["path",{d:"M11.017 2.814a1 1 0 0 1 1.966 0l1.051 5.558a2 2 0 0 0 1.594 1.594l5.558 1.051a1 1 0 0 1 0 1.966l-5.558 1.051a2 2 0 0 0-1.594 1.594l-1.051 5.558a1 1 0 0 1-1.966 0l-1.051-5.558a2 2 0 0 0-1.594-1.594l-5.558-1.051a1 1 0 0 1 0-1.966l5.558-1.051a2 2 0 0 0 1.594-1.594z",key:"1s2grr"}],["path",{d:"M20 2v4",key:"1rf3ol"}],["path",{d:"M22 4h-4",key:"gwowj6"}],["circle",{cx:"4",cy:"20",r:"2",key:"6kqj1y"}]]);e.s(["Sparkles",0,t],233274)},19919,113184,e=>{"use strict";var t=e.i(514798);let r=(0,t.createServerReference)("6036f5d613735f83ba2f8cc49ca9b64fd1c0c0beab",t.callServer,void 0,t.findSourceMapURL,"analyzeProjectDirectory");e.s(["analyzeProjectDirectory",0,r],19919);var n=e.i(289721),o=e.i(965652),a=e.i(597746),s=e.i(657153),i=e.i(400355),l=e.i(519455),c=e.i(793479),u=e.i(967489),d=e.i(533499),f=e.i(360112);let h=(0,t.createServerReference)("40ff151b677eeaf0636f04e8d87327f4046c314c92",t.callServer,void 0,t.findSourceMapURL,"getProductGroups");var p=e.i(894677);let m="__none__",g="__new_group__";e.s(["GroupSelect",0,function({workspaceId:e,value:t,onChange:r}){let{t:y}=(0,d.useI18n)(),[v,b]=(0,o.useState)([]),[x,w]=(0,o.useState)(!1),[S,k]=(0,o.useState)(!1),[j,C]=(0,o.useState)(""),[E,P]=(0,o.useState)(!1);(0,o.useEffect)(()=>{if(!e)return void b([]);let t=!1;return w(!0),h(e).then(e=>{t||b(e.map(e=>({id:e.id,name:e.name})))}).catch(()=>{t||b([])}).finally(()=>{t||w(!1)}),()=>{t=!0}},[e]);let N=async()=>{let t=j.trim();if(t&&!E){P(!0);try{let n=await (0,p.createProductGroup)({name:t,workspaceId:e});b(e=>[...e,{id:n.id,name:n.name}]),r(n.id),k(!1),C("")}catch(e){f.toast.error(e instanceof Error?e.message:y("group.createError"))}finally{P(!1)}}};if(S)return(0,n.jsxs)("div",{className:"mt-1.5 flex gap-2",children:[(0,n.jsx)(c.Input,{autoFocus:!0,value:j,onChange:e=>C(e.target.value),onKeyDown:e=>{"Enter"===e.key&&(e.preventDefault(),N())},placeholder:y("group.namePlaceholder"),className:"flex-1 min-w-0"}),(0,n.jsx)(l.Button,{type:"button",onClick:N,disabled:!j.trim()||E,className:"shrink-0 px-2.5",children:E?(0,n.jsx)(i.Loader2,{className:"h-4 w-4 animate-spin"}):(0,n.jsx)(a.Check,{className:"h-4 w-4"})}),(0,n.jsx)(l.Button,{type:"button",variant:"outline",onClick:()=>{k(!1),C("")},className:"shrink-0 px-2.5",children:(0,n.jsx)(s.X,{className:"h-4 w-4"})})]});let M=v.find(e=>e.id===t);return(0,n.jsxs)(u.Select,{value:t||m,onValueChange:e=>{if(e===g){k(!0),C("");return}r(e&&e!==m?e:"")},disabled:!e||x,children:[(0,n.jsx)(u.SelectTrigger,{className:"mt-1.5 w-full",children:(0,n.jsx)("span",{className:"truncate",children:M?.name??y("group.none")})}),(0,n.jsxs)(u.SelectContent,{children:[(0,n.jsx)(u.SelectItem,{value:m,children:y("group.none")}),v.map(e=>(0,n.jsx)(u.SelectItem,{value:e.id,children:e.name},e.id)),(0,n.jsxs)(u.SelectItem,{value:g,children:["+ ",y("group.new")]})]})]})}],113184)},121318,e=>{"use strict";var t=e.i(514798);let r=(0,t.createServerReference)("40b03ac97723fe879d9efe21b71e56c5a984151d22",t.callServer,void 0,t.findSourceMapURL,"createProject");e.s(["createProject",0,r])},469051,e=>{"use strict";let t=(0,e.i(572989).default)("layout-grid",[["rect",{width:"7",height:"7",x:"3",y:"3",rx:"1",key:"1g98yp"}],["rect",{width:"7",height:"7",x:"14",y:"3",rx:"1",key:"6d4xhi"}],["rect",{width:"7",height:"7",x:"14",y:"14",rx:"1",key:"nxv5o0"}],["rect",{width:"7",height:"7",x:"3",y:"14",rx:"1",key:"1bb6yr"}]]);e.s(["LayoutGrid",0,t],469051)},699375,e=>{"use strict";var t,r=e.i(289721);e.s([],159880),e.i(159880),e.i(708878);var n=e.i(965652),o=e.i(314757),a=e.i(887642),s=e.i(362891),i=e.i(804849),l=e.i(416369),c=e.i(954588),u=e.i(581263),d=e.i(565455),f=e.i(207516),h=e.i(282109),p=e.i(462902);let m=n.createContext(void 0);var g=e.i(551974);let y=((t={}).checked="data-checked",t.unchecked="data-unchecked",t.disabled="data-disabled",t.readonly="data-readonly",t.required="data-required",t.valid="data-valid",t.invalid="data-invalid",t.touched="data-touched",t.dirty="data-dirty",t.filled="data-filled",t.focused="data-focused",t),v={...g.fieldValidityMapping,checked:e=>e?{[y.checked]:""}:{[y.unchecked]:""}};var b=e.i(421689),x=e.i(890514),w=e.i(571870),S=e.i(179279),k=e.i(689401),j=e.i(103353),C=e.i(67077),E=e.i(586622),P=e.i(353052);let N=n.forwardRef(function(e,t){let{checked:p,className:g,defaultChecked:y,"aria-labelledby":N,id:M,inputRef:A,name:I,nativeButton:R=!1,onCheckedChange:T,readOnly:O=!1,required:L=!1,disabled:z=!1,render:K,uncheckedValue:$,value:D,..._}=e,{clearErrors:F}=(0,w.useFormContext)(),{state:U,setTouched:H,setDirty:W,validityData:B,setFilled:X,setFocused:Y,shouldValidateOnChange:V,validationMode:J,disabled:G,name:q,validation:Z}=(0,x.useFieldRootContext)(),{labelId:Q}=(0,S.useLabelableContext)(),ee=G||z,et=q??I,er=(0,a.useStableCallback)(T),en=n.useRef(null),eo=(0,s.useMergedRefs)(en,A,Z.inputRef),ea=n.useRef(null),es=(0,f.useBaseUiId)(),ei=(0,j.useLabelableId)({id:M,implicit:!1,controlRef:ea}),el=R?void 0:ei,[ec,eu]=(0,o.useControlled)({controlled:p,default:!!y,name:"Switch",state:"checked"});(0,b.useField)({id:es,commit:Z.commit,value:ec,controlRef:ea,name:et,getValue:()=>ec}),(0,i.useIsoLayoutEffect)(()=>{en.current&&X(en.current.checked)},[en,X]),(0,P.useValueChanged)(ec,()=>{F(et),W(ec!==B.initialValue),X(ec),V()?Z.commit(ec):Z.commit(ec,!0)});let{getButtonProps:ed,buttonRef:ef}=(0,h.useButton)({disabled:ee,native:R}),eh=(0,k.useAriaLabelledBy)(N,Q,en,!R,el),ep=n.useMemo(()=>(0,d.mergeProps)({checked:ec,disabled:ee,id:el,name:et,required:L,style:et?l.visuallyHiddenInput:l.visuallyHidden,tabIndex:-1,type:"checkbox","aria-hidden":!0,ref:eo,onChange(e){if(e.nativeEvent.defaultPrevented)return;let t=e.target.checked,r=(0,C.createChangeEventDetails)(E.REASONS.none,e.nativeEvent);er?.(t,r),r.isCanceled||eu(t)},onFocus(){ea.current?.focus()}},Z.getInputValidationProps,void 0!==D?{value:D}:c.EMPTY_OBJECT),[ec,ee,eo,el,et,er,L,eu,Z,D]),em=n.useMemo(()=>({...U,checked:ec,disabled:ee,readOnly:O,required:L}),[U,ec,ee,O,L]),eg=(0,u.useRenderElement)("span",e,{state:em,ref:[t,ea,ef],props:[{id:R?ei:es,role:"switch","aria-checked":ec,"aria-readonly":O||void 0,"aria-required":L||void 0,"aria-labelledby":eh,onFocus(){ee||Y(!0)},onBlur(){let e=en.current;e&&!ee&&(H(!0),Y(!1),"onBlur"===J&&Z.commit(e.checked))},onClick(e){O||ee||(e.preventDefault(),en.current?.dispatchEvent(new PointerEvent("click",{bubbles:!0,shiftKey:e.shiftKey,ctrlKey:e.ctrlKey,altKey:e.altKey,metaKey:e.metaKey})))}},Z.getValidationProps,_,ed],stateAttributesMapping:v});return(0,r.jsxs)(m.Provider,{value:em,children:[eg,!ec&&et&&void 0!==$&&(0,r.jsx)("input",{type:"hidden",name:et,value:$}),(0,r.jsx)("input",{...ep})]})}),M=n.forwardRef(function(e,t){let{render:r,className:o,...a}=e,{state:s}=(0,x.useFieldRootContext)(),i=function(){let e=n.useContext(m);if(void 0===e)throw Error((0,p.default)(63));return e}(),l={...s,...i};return(0,u.useRenderElement)("span",e,{state:l,ref:t,stateAttributesMapping:v,props:a})});e.s(["Root",0,N,"Thumb",0,M],803205);var A=e.i(803205),A=A,I=e.i(975157);e.s(["Switch",0,function({className:e,size:t="default",...n}){return(0,r.jsx)(A.Root,{"data-slot":"switch","data-size":t,className:(0,I.cn)("peer group/switch relative inline-flex shrink-0 items-center rounded-full border border-transparent transition-all outline-none after:absolute after:-inset-x-3 after:-inset-y-2 focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 data-[size=default]:h-[18.4px] data-[size=default]:w-[32px] data-[size=sm]:h-[14px] data-[size=sm]:w-[24px] dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 data-checked:bg-primary data-unchecked:bg-input dark:data-unchecked:bg-input/80 data-disabled:cursor-not-allowed data-disabled:opacity-50",e),...n,children:(0,r.jsx)(A.Thumb,{"data-slot":"switch-thumb",className:"pointer-events-none block rounded-full bg-background ring-0 transition-transform group-data-[size=default]/switch:size-4 group-data-[size=sm]/switch:size-3 group-data-[size=default]/switch:data-checked:translate-x-[calc(100%-2px)] group-data-[size=sm]/switch:data-checked:translate-x-[calc(100%-2px)] dark:data-checked:bg-primary-foreground group-data-[size=default]/switch:data-unchecked:translate-x-0 group-data-[size=sm]/switch:data-unchecked:translate-x-0 dark:data-unchecked:bg-foreground"})})}],699375)},889620,e=>{"use strict";let t="workspace-last-project";function r(){try{let e=localStorage.getItem(t);if(!e)return{};let r=JSON.parse(e);return r&&"object"==typeof r?r:{}}catch{return{}}}e.s(["getLastProjectId",0,function(e){return r()[e]??null},"setLastProjectId",0,function(e,n){try{let o=r();if(o[e]===n)return;localStorage.setItem(t,JSON.stringify({...o,[e]:n}))}catch{}}])},263938,e=>{"use strict";let t=(0,e.i(572989).default)("tag",[["path",{d:"M12.586 2.586A2 2 0 0 0 11.172 2H4a2 2 0 0 0-2 2v7.172a2 2 0 0 0 .586 1.414l8.704 8.704a2.426 2.426 0 0 0 3.42 0l6.58-6.58a2.426 2.426 0 0 0 0-3.42z",key:"vktsd0"}],["circle",{cx:"7.5",cy:"7.5",r:".5",fill:"currentColor",key:"kqv944"}]]);e.s(["Tag",0,t],263938)},938499,e=>{"use strict";let t=(0,e.i(572989).default)("circle-alert",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]]);e.s(["AlertCircle",0,t],938499)},651236,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"BailoutToCSR",{enumerable:!0,get:function(){return o}});let n=e.r(415440);function o({reason:e,children:t}){if("u"<typeof window)throw Object.defineProperty(new n.BailoutToCSRError(e),"__NEXT_ERROR_CODE",{value:"E394",enumerable:!1,configurable:!0});return t}},37982,(e,t,r)=>{"use strict";function n(e){return e.split("/").map(e=>encodeURIComponent(e)).join("/")}Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"encodeURIPath",{enumerable:!0,get:function(){return n}})},607717,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"PreloadChunks",{enumerable:!0,get:function(){return l}});let n=e.r(289721),o=e.r(585012),a=e.r(465687),s=e.r(37982),i=e.r(695597);function l({moduleIds:e}){if("u">typeof window)return null;let t=a.workAsyncStorage.getStore();if(void 0===t)return null;let r=[];if(t.reactLoadableManifest&&e){let n=t.reactLoadableManifest;for(let t of e){if(!n[t])continue;let e=n[t].files;r.push(...e)}}if(0===r.length)return null;let c=(0,i.getAssetTokenQuery)();return(0,n.jsx)(n.Fragment,{children:r.map(e=>{let r=`${t.assetPrefix}/_next/${(0,s.encodeURIPath)(e)}${c}`;return e.endsWith(".css")?(0,n.jsx)("link",{precedence:"dynamic",href:r,rel:"stylesheet",as:"style",nonce:t.nonce},e):((0,o.preload)(r,{as:"script",fetchPriority:"low",nonce:t.nonce}),null)})})}},105931,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"default",{enumerable:!0,get:function(){return c}});let n=e.r(289721),o=e.r(965652),a=e.r(651236),s=e.r(607717);function i(e){return{default:e&&"default"in e?e.default:e}}let l={loader:()=>Promise.resolve(i(()=>null)),loading:null,ssr:!0},c=function(e){let t={...l,...e},r=(0,o.lazy)(()=>t.loader().then(i)),c=t.loading;function u(e){let i=c?(0,n.jsx)(c,{isLoading:!0,pastDelay:!0,error:null}):null,l=!t.ssr||!!t.loading,u=l?o.Suspense:o.Fragment,d=t.ssr?(0,n.jsxs)(n.Fragment,{children:["u"<typeof window?(0,n.jsx)(s.PreloadChunks,{moduleIds:t.modules}):null,(0,n.jsx)(r,{...e})]}):(0,n.jsx)(a.BailoutToCSR,{reason:"next/dynamic",children:(0,n.jsx)(r,{...e})});return(0,n.jsx)(u,{...l?{fallback:i}:{},children:d})}return u.displayName="LoadableComponent",u}},19578,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"default",{enumerable:!0,get:function(){return o}});let n=e.r(481258)._(e.r(105931));function o(e,t){let r={};"function"==typeof e&&(r.loader=e);let o={...r,...t};return(0,n.default)({...o,modules:o.loadableGenerated?.modules})}("function"==typeof r.default||"object"==typeof r.default&&null!==r.default)&&void 0===r.default.__esModule&&(Object.defineProperty(r.default,"__esModule",{value:!0}),Object.assign(r.default,r),t.exports=r.default)},83434,e=>{"use strict";var t,r=e.i(289721),n=e.i(965652),o=e.i(585012),a=(t=function(e,r){return(t=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(e,r)},function(e,r){if("function"!=typeof r&&null!==r)throw TypeError("Class extends value "+String(r)+" is not a constructor or null");function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}),s="html",i=function(e,t){var r,n,o,a=null!=(r=e.ownerDocument)?r:document,i=null!=(o=null!=(n=a.defaultView)?n:a.parentWindow)?o:window;switch(t){case s:return e instanceof i.HTMLElement;case"svg":return e instanceof i.SVGElement;default:throw Error('Unrecognized element type "'.concat(t,'" for validateElementType.'))}},l=function(e,t){var r,n,o,a,l,c={};switch(e){case s:l=document.createElement(null!=(r=null==t?void 0:t.containerElement)?r:"div");break;case"svg":l=document.createElementNS("http://www.w3.org/2000/svg",null!=(n=null==t?void 0:t.containerElement)?n:"g");break;default:throw Error('Invalid element type "'.concat(e,'" for createPortalNode: must be "html" or "svg".'))}if(t&&"object"==typeof t&&t.attributes)for(var u=0,d=Object.entries(t.attributes);u<d.length;u++){var f=d[u],h=f[0],p=f[1];l.setAttribute(h,p)}var m={element:l,elementType:e,setPortalProps:function(e){c=e},getInitialPortalProps:function(){return c},mount:function(t,r){if(r!==a){if(m.unmount(),t!==o&&!i(t,e))throw Error('Invalid element type for portal: "'.concat(e,'" portalNodes must be used with ').concat(e," elements, but OutPortal is within <").concat(t.tagName,">."));t.replaceChild(m.element,r),o=t,a=r}},unmount:function(e){(!e||e===a)&&o&&a&&(o.replaceChild(a,m.element),o=void 0,a=void 0)}};return m},c=function(e){function t(t){var r=e.call(this,t)||this;return r.addPropsChannel=function(){Object.assign(r.props.node,{setPortalProps:function(e){r.setState({nodeProps:e})}})},r.state={nodeProps:r.props.node.getInitialPortalProps()},r}return a(t,e),t.prototype.componentDidMount=function(){this.addPropsChannel()},t.prototype.componentDidUpdate=function(){this.addPropsChannel()},t.prototype.render=function(){var e=this,t=this.props,r=t.children,a=t.node;return o.createPortal(n.Children.map(r,function(t){return n.isValidElement(t)?n.cloneElement(t,e.state.nodeProps):t}),a.element)},t}(n.PureComponent),u=function(e){function t(t){var r=e.call(this,t)||this;return r.placeholderNode=n.createRef(),r.passPropsThroughPortal(),r}return a(t,e),t.prototype.passPropsThroughPortal=function(){var e=Object.assign({},this.props,{node:void 0});this.props.node.setPortalProps(e)},t.prototype.componentDidMount=function(){var e=this.props.node;this.currentPortalNode=e;var t=this.placeholderNode.current,r=t.parentNode;e.mount(r,t),this.passPropsThroughPortal()},t.prototype.componentDidUpdate=function(){var e=this.props.node;this.currentPortalNode&&e!==this.currentPortalNode&&(this.currentPortalNode.unmount(this.placeholderNode.current),this.currentPortalNode.setPortalProps({}),this.currentPortalNode=e);var t=this.placeholderNode.current,r=t.parentNode;e.mount(r,t),this.passPropsThroughPortal()},t.prototype.componentWillUnmount=function(){var e=this.props.node;e.unmount(this.placeholderNode.current),e.setPortalProps({})},t.prototype.render=function(){var e=this.props.node.element.tagName,t=this.props.node.elementType===s?e.toLowerCase():e;return n.createElement(t,{ref:this.placeholderNode})},t}(n.PureComponent),d=l.bind(null,s);l.bind(null,"svg");let f=(0,e.i(19578).default)(()=>e.A(243288).then(e=>({default:e.TaskTerminal})),{loadableGenerated:{modules:[346069]},ssr:!1}),h=(0,n.createContext)(null);function p(){let e=(0,n.useContext)(h);if(!e)throw Error("useTerminalPortal must be used within TerminalPortalProvider");return e}e.s(["TerminalOutlet",0,function({taskId:e,worktreePath:t,onSessionEnd:o,onReady:a}){let{getPortal:s,setOnSessionEnd:i,setOnReady:l}=p(),[c,d]=(0,n.useState)(null),f=(0,n.useRef)(a);return((0,n.useEffect)(()=>{f.current=a}),(0,n.useEffect)(()=>{let r=s(e,t);return r.mountCount++,d(r),()=>{r.mountCount--,d(null)}},[e,t,s]),(0,n.useEffect)(()=>(i(e,o??null),()=>i(e,null)),[e,o,i]),(0,n.useEffect)(()=>(l(e,e=>f.current?.(e)),()=>{f.current?.(null),l(e,null)}),[e,l]),c)?(0,r.jsx)(u,{node:c.portalNode}):null},"TerminalPortalProvider",0,function({children:e}){let t=(0,n.useRef)(new Map),o=(0,n.useRef)([]),[,a]=(0,n.useState)(0),s=(0,n.useCallback)((e,r)=>{let n=t.current.get(e);if(n)return o.current=o.current.filter(t=>t!==e),o.current.push(e),n;if(t.current.size>=12)for(let e of[...o.current]){if(t.current.size<12)break;let r=t.current.get(e);r&&!(r.mountCount>0)&&(t.current.delete(e),o.current=o.current.filter(t=>t!==e),console.warn(`[terminal-portal] evicted idle terminal ${e} (over 12 cap) — its history will replay from the WS buffer on next view`))}let s={portalNode:d({attributes:{style:"width:100%;height:100%"}}),taskId:e,worktreePath:r,onSessionEnd:{current:null},onReady:{current:null},controls:null,mountCount:0};return t.current.set(e,s),o.current.push(e),a(e=>e+1),s},[]),i=(0,n.useCallback)(e=>{t.current.delete(e),o.current=o.current.filter(t=>t!==e),a(e=>e+1)},[]),l=(0,n.useCallback)((e,r)=>{let n=t.current.get(e);n&&(n.onSessionEnd.current=r)},[]),u=(0,n.useCallback)((e,r)=>{let n=t.current.get(e);n&&(n.onReady.current=r,r&&n.controls&&r(n.controls))},[]),p=Array.from(t.current.values()).map(e=>(0,r.jsx)(c,{node:e.portalNode,children:(0,r.jsx)(f,{taskId:e.taskId,worktreePath:e.worktreePath,onSessionEnd:t=>e.onSessionEnd.current?.(t),onReady:t=>{e.controls=t,e.onReady.current?.(t)},useCanvasRenderer:!0})},e.taskId));return(0,r.jsxs)(h.Provider,{value:{getPortal:s,removePortal:i,setOnSessionEnd:l,setOnReady:u},children:[e,p]})},"useTerminalPortal",0,p],83434)},232280,e=>{"use strict";var t=e.i(314338);e.s(["ChevronDown",()=>t.default])},770303,e=>{"use strict";var t=e.i(289721),r=e.i(965652),n=e.i(514798);let o=(0,n.createServerReference)("4036f95ed5dc32f339eacad6c635ee66f9e026db46",n.callServer,void 0,n.findSourceMapURL,"checkExtension");var a=e.i(461500);let s=(0,n.createServerReference)("40b59a54ce49a5ad9953b31159f64bfd2ee911e145",n.callServer,void 0,n.findSourceMapURL,"uninstallExtension");var i=e.i(887911);let l={installed:!1},c=(0,r.createContext)(null);e.s(["ExtensionContext",0,c,"ExtensionProvider",0,function({children:e,initialStatus:n}){let[u,d]=(0,r.useState)(()=>n??Object.fromEntries((0,i.listExtensionMetadata)().map(e=>[e.id,l]))),[f,h]=(0,r.useState)(new Set),p=(0,r.useRef)(new Set),m=(0,r.useCallback)(async e=>{let t=await o(e);d(r=>({...r,[e]:t}))},[]),g=(0,r.useCallback)(async e=>{if(p.current.has(e))return{success:!1,error:"install already in progress"};p.current.add(e),h(t=>{let r=new Set(t);return r.add(e),r});try{let t=await (0,a.installExtension)(e);return t.success&&await m(e),t}finally{p.current.delete(e),h(t=>{let r=new Set(t);return r.delete(e),r})}},[m]),y=(0,r.useCallback)(async e=>{if(p.current.has(e))return{success:!1,error:"operation already in progress"};p.current.add(e),h(t=>{let r=new Set(t);return r.add(e),r});try{let t=await s(e);return t.success&&await m(e),t}finally{p.current.delete(e),h(t=>{let r=new Set(t);return r.delete(e),r})}},[m]),v=(0,r.useMemo)(()=>({statusMap:u,loading:!1,installing:f,refresh:m,install:g,uninstall:y}),[u,f,m,g,y]);return(0,t.jsx)(c.Provider,{value:v,children:e})}],770303)},966001,e=>{"use strict";var t=e.i(289721),r=e.i(965652),n=e.i(938499),o=e.i(194358),a=e.i(519455);class s extends r.Component{constructor(e){super(e),this.state={hasError:!1,error:null}}static getDerivedStateFromError(e){return{hasError:!0,error:e}}componentDidCatch(e,t){console.error("[ErrorBoundary]",e,t)}render(){return this.state.hasError?this.props.fallback?this.props.fallback:(0,t.jsxs)("div",{className:"flex flex-col items-center justify-center gap-3 p-8 text-center",children:[(0,t.jsx)(n.AlertCircle,{className:"h-8 w-8 text-destructive"}),(0,t.jsxs)("div",{children:[(0,t.jsx)("p",{className:"text-sm font-medium text-foreground",children:"Something went wrong"}),(0,t.jsx)("p",{className:"mt-1 text-xs text-muted-foreground",children:this.state.error?.message??"An unexpected error occurred"})]}),(0,t.jsxs)(a.Button,{variant:"outline",onClick:()=>this.setState({hasError:!1,error:null}),children:[(0,t.jsx)(o.RefreshCw,{className:"mr-2 h-3.5 w-3.5"}),"Retry"]})]}):this.props.children}}e.s(["ErrorBoundary",0,s])},989548,338187,e=>{"use strict";let t=(0,e.i(572989).default)("bot",[["path",{d:"M12 8V4H8",key:"hb8ula"}],["rect",{width:"16",height:"12",x:"4",y:"8",rx:"2",key:"enze0r"}],["path",{d:"M2 14h2",key:"vft8re"}],["path",{d:"M20 14h2",key:"4cs60a"}],["path",{d:"M15 13v2",key:"1xurst"}],["path",{d:"M9 13v2",key:"rq6x2g"}]]);e.s(["Bot",0,t],989548);var r=e.i(289721),n=e.i(965652);e.i(508271);var o=e.i(841359),a=e.i(240095);let s="tower-assistant-sessions",i="tower-assistant-active-session",l="tower-assistant-bindings";function c(e){try{let t=localStorage.getItem(l);if(!t)return{};return JSON.parse(t)[e]??{}}catch{return{}}}function u(e,t){try{let r=localStorage.getItem(l),n=r?JSON.parse(r):{};t.workspaceId||t.projectId?n[e]=t:delete n[e],localStorage.setItem(l,JSON.stringify(n))}catch{}}function d(){try{let e=localStorage.getItem(s);if(!e)return[];let t=JSON.parse(e);if(!Array.isArray(t))return[];return t}catch{return[]}}function f(){return localStorage.getItem(i)}function h(e){null===e?localStorage.removeItem(i):localStorage.setItem(i,e)}var p=e.i(514798);let m=(0,p.createServerReference)("0069b845452752e9c446565ecc887751ceb88f8302",p.callServer,void 0,p.findSourceMapURL,"getWorkspacesWithProjects"),g=(0,n.createContext)(null);function y(){return"u">typeof crypto&&crypto.randomUUID?crypto.randomUUID():`msg-${Date.now()}-${Math.random().toString(36).slice(2,9)}`}let v="assistant-attachment-cache";function b(e,t,r){try{let n=sessionStorage.getItem(v),o=n?JSON.parse(n):{};o[e]||(o[e]={}),o[e][t]=r,sessionStorage.setItem(v,JSON.stringify(o))}catch{}}e.s(["AssistantProvider",0,function({children:e}){let[t,i]=(0,n.useState)(!1),[l,p]=(0,n.useState)(!1),[x,w]=(0,n.useState)(0),[S,k]=(0,n.useState)("sidebar"),[j,C]=(0,n.useState)(null),[E,P]=(0,n.useState)([]),[N,M]=(0,n.useState)("idle"),[A,I]=(0,n.useState)(!1),R=(0,n.useRef)([]),T=(0,n.useRef)(null),O=(0,n.useRef)(null),[L,z]=(0,n.useState)([]),[K,$]=(0,n.useState)(null),D=(0,n.useRef)(!1),[_,F]=(0,n.useState)({}),U=(0,n.useRef)({});(0,n.useEffect)(()=>{U.current=_},[_]);let[H,W]=(0,n.useState)([]);(0,n.useEffect)(()=>{m().then(e=>W(e)).catch(()=>{})},[]);let B=(0,n.useCallback)(e=>{F(e);let t=T.current;t&&u(t,e)},[]),X=(0,n.useCallback)(()=>{P([...R.current])},[]),Y=(0,n.useCallback)(async()=>{k("dialog"===await (0,a.getConfigValue)("assistant.displayMode","sidebar")?"dialog":"sidebar")},[]);(0,n.useEffect)(()=>{Y()},[Y]);let V=(0,n.useCallback)(async()=>{let e=d();try{let t=await fetch("/api/internal/assistant/sessions");if(t.ok){let r=await t.json();if(Array.isArray(r.sessions)){let t=new Map(e.map(e=>[e.id,e.title])),n=r.sessions.map(e=>{let r=t.get(e.id);return r?{...e,title:r}:e});return z(n),n}}}catch{}return z(e),e},[]),J=(0,n.useCallback)(async e=>{I(!0);try{let t=await fetch(`/api/internal/assistant/sessions?sessionId=${encodeURIComponent(e)}`);if(!t.ok)return;let r=await t.json();if(Array.isArray(r.messages)){R.current=r.messages;let t=function(e){try{let t=sessionStorage.getItem(v);if(!t)return{};return JSON.parse(t)[e]??{}}catch{return{}}}(e);if(Object.keys(t).length>0){let e=0;R.current=R.current.map(r=>{if("user"===r.role){let n=t[e];if(e++,n?.length)return{...r,attachmentFilenames:n}}return r})}P([...R.current])}}catch{}finally{I(!1)}},[]);(0,n.useEffect)(()=>{let e=!1;return(async()=>{let t=await V();if(e)return;let r=f(),n=r&&t.some(e=>e.id===r)?r:t[0]?.id??null;n&&($(n),T.current=n,D.current=!0,h(n),F(c(n)),J(n))})(),()=>{e=!0}},[V,J]);let G=(0,n.useCallback)(()=>{O.current?.abort(),T.current=null,D.current=!1,$(null),h(null),F({}),R.current=[],P([]),M("idle")},[]),q=(0,n.useCallback)(e=>{O.current?.abort(),T.current=e,D.current=!0,$(e),h(e),F(c(e)),R.current=[],P([]),M("idle"),J(e)},[J]),Z=(0,n.useCallback)(e=>{let t;t=d().filter(t=>t.id!==e),localStorage.setItem(s,JSON.stringify(t)),u(e,{}),f()===e&&h(null),z(t=>t.filter(t=>t.id!==e)),K===e&&G(),fetch(`/api/internal/assistant/sessions?sessionId=${encodeURIComponent(e)}`,{method:"DELETE"}).catch(()=>{}).finally(()=>{V()})},[K,G,V]),Q=(0,n.useCallback)((e,t)=>{let r=t.trim();if(r){var n;let t;n={title:r},t=d().map(t=>t.id===e?{...t,...n,updatedAt:new Date().toISOString()}:t),localStorage.setItem(s,JSON.stringify(t)),z(t=>t.map(t=>t.id===e?{...t,title:r}:t)),fetch(`/api/internal/assistant/sessions?sessionId=${encodeURIComponent(e)}`,{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({title:r})}).catch(()=>{})}},[]),ee=(0,n.useCallback)(async()=>{p(!0);try{await Y(),i(!0)}finally{p(!1)}},[Y]),et=(0,n.useCallback)(()=>{i(!1),O.current?.abort(),O.current=null,M("idle")},[]),er=(0,n.useCallback)(()=>{if(!t&&!l)return void ee();let e=document.activeElement;e instanceof HTMLElement&&null!==e.closest("[data-assistant-input]")?et():w(e=>e+1)},[t,l,et,ee]);(0,o.useActionShortcut)("global.assistant",()=>er());let en=(0,n.useCallback)(async(e,t)=>{if(!e.trim()&&!t?.attachmentFilenames?.length)return;O.current?.abort();let r=new AbortController;O.current=r;let n=0!==R.current.length||D.current?null:e,o=y();if(R.current=[...R.current,{id:y(),role:"user",content:e,attachmentFilenames:t?.attachmentFilenames?.length?t.attachmentFilenames:void 0},{id:o,role:"thinking",content:"",isStreaming:!0}],X(),t?.attachmentFilenames?.length&&T.current){let e=R.current.filter(e=>"user"===e.role).length-1;b(T.current,e,t.attachmentFilenames)}M("connecting");let a=null;try{let i=await fetch("/api/internal/assistant/chat",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({message:e,sessionId:T.current,attachmentFilenames:t?.attachmentFilenames??[],workspaceId:U.current.workspaceId,workspaceName:U.current.workspaceName,projectId:U.current.projectId,projectName:U.current.projectName}),signal:r.signal});if(!i.ok||!i.body)throw Error(`HTTP ${i.status}`);M("streaming");let l=i.body.getReader(),c=new TextDecoder,f="";for(;;){let{done:e,value:r}=await l.read();if(e)break;let i=(f+=c.decode(r,{stream:!0})).split("\n");for(let e of(f=i.pop()??"",i)){let r;if(e.startsWith("data: ")){try{r=JSON.parse(e.slice(6).trim())}catch{continue}if(r.sessionId){let e=T.current;if(T.current=r.sessionId,n&&!D.current&&r.sessionId!==e){D.current=!0;let e=new Date().toISOString(),o={id:r.sessionId,title:function(e){let t=e.trim();return t?t.length>30?t.slice(0,30):t:"New Session"}(n),createdAt:e,updatedAt:e};!function(e){let t=[e,...d().filter(t=>t.id!==e.id)].slice(0,10);localStorage.setItem(s,JSON.stringify(t))}(o),z(d()),$(r.sessionId),h(r.sessionId),(U.current.workspaceId||U.current.projectId)&&u(r.sessionId,U.current),t?.attachmentFilenames?.length&&b(r.sessionId,0,t.attachmentFilenames)}}switch(r.type){case"text_delta":{let e=R.current.filter(e=>e.id!==o);a?R.current=e.map(e=>e.id===a?{...e,content:e.content+(r.content??""),isStreaming:!0}:e):(a=y(),R.current=[...e,{id:a,role:"assistant",content:r.content??"",isStreaming:!0}]),X();break}case"text":{let e=R.current.filter(e=>e.id!==o);a?R.current=e.map(e=>e.id===a?{...e,content:r.content??e.content,isStreaming:!0}:e):(a=y(),R.current=[...e,{id:a,role:"assistant",content:r.content??"",isStreaming:!0}]),X();break}case"tool_start":{let e=R.current.filter(e=>e.id!==o);a?(R.current=e.map(e=>e.id===a?{...e,isStreaming:!1}:e),a=null):R.current=e,r.toolId&&R.current.some(e=>"tool"===e.role&&e.toolId===r.toolId)||(R.current=[...R.current,{id:y(),role:"tool",content:`Calling ${r.content??"tool"}...`,toolName:r.content,toolId:r.toolId,isStreaming:!0}]),X();break}case"tool_use":{let e=R.current.filter(e=>e.id!==o),t=a?e.map(e=>e.id===a?{...e,isStreaming:!1}:e):e;a=null;let n=JSON.stringify(r.toolInput??{},null,2),s=-1;if(r.toolId&&(s=t.findIndex(e=>"tool"===e.role&&e.toolId===r.toolId)),-1===s)for(let e=t.length-1;e>=0;e--){let n=t[e];if("tool"===n.role&&n.isStreaming&&n.toolName===r.content){s=e;break}}-1!==s?R.current=t.map((e,t)=>t===s?{...e,content:n,toolName:r.content,toolId:r.toolId??e.toolId,isStreaming:!1}:e):R.current=[...t,{id:y(),role:"tool",content:n,toolName:r.content,toolId:r.toolId,isStreaming:!1}],X();break}case"tool_result":R.current=[...R.current,{id:y(),role:"tool",content:String(r.toolOutput??""),toolName:`${r.content??"tool"} (result)`}],X();break;case"error":R.current=[...R.current.filter(e=>e.id!==o),{id:y(),role:"assistant",content:`Error: ${r.content??"Unknown error"}`}],X(),M("error");break;case"done":R.current=R.current.filter(e=>e.id!==o).map(e=>e.isStreaming?{...e,isStreaming:!1}:e),a=null,X(),M("idle")}}}}R.current=R.current.filter(e=>e.id!==o),X(),M(e=>"streaming"===e?"idle":e),V()}catch(e){if("AbortError"===e.name)return;R.current=[...R.current.filter(e=>e.id!==o),{id:y(),role:"assistant",content:`Connection error: ${e.message??"Unknown error"}`}],X(),M("error")}},[X,V]),eo=(0,n.useCallback)(()=>(O.current?.abort(),O.current=null,R.current=R.current.filter(e=>"thinking"!==e.role).map(e=>e.isStreaming?{...e,isStreaming:!1}:e),P([...R.current]),M("idle"),null),[]),ea=E[E.length-1],es="connecting"===N||"streaming"===N||ea?.role==="thinking"&&!0===ea.isStreaming;return(0,r.jsx)(g.Provider,{value:{isOpen:t,isStarting:l,displayMode:S,worktreePath:j,toggleAssistant:er,closeAssistant:et,inputFocusSignal:x,chatMessages:E,chatStatus:N,isChatThinking:es,isLoadingHistory:A,sendChatMessage:en,cancelChat:eo,binding:_,setSessionBinding:B,workspaceTree:H,sessions:L,activeSessionId:K,createNewSession:G,switchSession:q,removeSession:Z,renameSession:Q,refreshSessions:V},children:e})},"useAssistant",0,function(){let e=(0,n.useContext)(g);if(!e)throw Error("useAssistant must be used within an AssistantProvider");return e}],338187)},275360,e=>{"use strict";let t=(0,e.i(572989).default)("folder-plus",[["path",{d:"M12 10v6",key:"1bos4e"}],["path",{d:"M9 13h6",key:"1uhe8q"}],["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"}]]);e.s(["FolderPlus",0,t],275360)},431828,763131,e=>{"use strict";var t=e.i(572989);let r=(0,t.default)("folder-git-2",[["path",{d:"M18 19a5 5 0 0 1-5-5v8",key:"sz5oeg"}],["path",{d:"M9 20H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H20a2 2 0 0 1 2 2v5",key:"1w6njk"}],["circle",{cx:"13",cy:"12",r:"2",key:"1j92g6"}],["circle",{cx:"20",cy:"19",r:"2",key:"1obnsp"}]]);e.s(["FolderGit2",0,r],431828);let n=(0,t.default)("house",[["path",{d:"M15 21v-8a1 1 0 0 0-1-1h-4a1 1 0 0 0-1 1v8",key:"5wwlr5"}],["path",{d:"M3 10a2 2 0 0 1 .709-1.528l7-6a2 2 0 0 1 2.582 0l7 6A2 2 0 0 1 21 10v9a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z",key:"r6nss1"}]]);e.s(["Home",0,n],763131)},256753,e=>{"use strict";let t=(0,e.i(572989).default)("hard-drive",[["path",{d:"M10 16h.01",key:"1bzywj"}],["path",{d:"M2.212 11.577a2 2 0 0 0-.212.896V18a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-5.527a2 2 0 0 0-.212-.896L18.55 5.11A2 2 0 0 0 16.76 4H7.24a2 2 0 0 0-1.79 1.11z",key:"18tbho"}],["path",{d:"M21.946 12.013H2.054",key:"zqlbp7"}],["path",{d:"M6 16h.01",key:"1pmjb7"}]]);e.s(["HardDrive",0,t],256753)},224277,e=>{"use strict";var t=e.i(289721),r=e.i(965652),n=e.i(977982),o=e.i(431828),a=e.i(763131),s=e.i(472074),i=e.i(738690),l=e.i(256753),c=e.i(275360),u=e.i(597746),d=e.i(657153),f=e.i(776639),h=e.i(519455),p=e.i(793479),m=e.i(746798),g=e.i(533499),y=e.i(759684);e.s(["FolderBrowserDialog",0,function({open:e,onOpenChange:v,onSelect:b,gitOnly:x=!1}){let{t:w}=(0,g.useI18n)(),[S,k]=(0,r.useState)(null),[j,C]=(0,r.useState)(!1),[E,P]=(0,r.useState)(null),[N,M]=(0,r.useState)(""),[A,I]=(0,r.useState)(""),[R,T]=(0,r.useState)(!1),O=(0,r.useRef)(null),[L,z]=(0,r.useState)(!1),[K,$]=(0,r.useState)(""),D=(0,r.useRef)(null),_=(0,r.useCallback)(async e=>{C(!0),P(null),I(""),T(!1);try{let t=e?`/api/browse-fs?path=${encodeURIComponent(e)}`:"/api/browse-fs",r=await fetch(t);if(!r.ok){let e=await r.json();P(e.error||"Failed");return}let n=await r.json();return k(n),M(n.currentPath),n}catch{P("Failed to browse filesystem")}finally{C(!1)}},[]);(0,r.useEffect)(()=>{e&&(_().then(e=>{e?.isWindows&&T(!0)}),setTimeout(()=>O.current?.focus(),200))},[e,_]);let F=()=>{N.trim()&&_(N.trim())},U=async()=>{let e=K.trim();if(e&&S?.currentPath)try{let t=await fetch("/api/browse-fs",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({parentPath:S.currentPath,name:e})});if(!t.ok){let e=await t.json();P(e.error||w("folder.newFolderError"));return}z(!1),$(""),_(S.currentPath)}catch{P(w("folder.newFolderError"))}},H=()=>{z(!1),$("")},W=S?.folders.filter(e=>e.name.toLowerCase().includes(A.toLowerCase()))??[];return(0,t.jsx)(f.Dialog,{open:e,onOpenChange:v,children:(0,t.jsx)(f.DialogContent,{className:"p-0 gap-0",style:{maxWidth:"36rem",overflow:"hidden"},children:(0,t.jsxs)("div",{className:"flex flex-col max-h-[60vh] overflow-hidden",children:[(0,t.jsxs)("div",{className:"px-5 pt-5 pb-3 shrink-0",children:[(0,t.jsx)(f.DialogTitle,{children:x?w("folder.selectGitRepo"):w("folder.selectFolder")}),(0,t.jsx)("p",{className:"text-xs text-muted-foreground mt-1",children:w("folder.hint")})]}),(0,t.jsxs)("div",{className:"border-t border-border px-4 pt-3 pb-2 shrink-0",children:[(0,t.jsx)("label",{className:"text-xs font-medium text-muted-foreground",children:w("folder.manualInput")}),(0,t.jsxs)("div",{className:"mt-1.5 flex gap-2",children:[(0,t.jsx)(p.Input,{ref:O,value:N,onChange:e=>M(e.target.value),onKeyDown:e=>"Enter"===e.key&&F(),placeholder:"/path/to/your/project",title:N,className:"flex-1 min-w-0"}),(0,t.jsx)(h.Button,{variant:"outline",onClick:F,className:"h-8 px-3 shrink-0",children:w("folder.goTo")})]})]}),(0,t.jsxs)("div",{className:"px-4 py-2 shrink-0",children:[(0,t.jsx)("label",{className:"text-xs font-medium text-muted-foreground",children:w("folder.searchDir")}),(0,t.jsxs)("div",{className:"relative mt-1.5",children:[(0,t.jsx)(i.Search,{className:"absolute left-2.5 top-1/2 -translate-y-1/2 h-3.5 w-3.5 text-muted-foreground"}),(0,t.jsx)("input",{value:A,onChange:e=>I(e.target.value),placeholder:w("folder.filterPlaceholder"),className:"h-8 w-full rounded-md border border-border bg-background pl-8 pr-3 text-sm text-foreground placeholder-muted-foreground outline-none focus:border-ring focus:ring-1 focus:ring-ring"})]})]}),(0,t.jsxs)("div",{className:"flex items-center gap-1.5 border-y border-border px-4 py-2 shrink-0 min-w-0",children:[(0,t.jsxs)(m.Tooltip,{children:[(0,t.jsx)(m.TooltipTrigger,{render:(0,t.jsx)(h.Button,{variant:"outline",size:"icon-sm",onClick:()=>{S?.isWindows?T(!0):S?.homePath&&_(S.homePath)},className:"shrink-0 text-muted-foreground"}),children:(0,t.jsx)(a.Home,{className:"h-3.5 w-3.5"})}),(0,t.jsx)(m.TooltipContent,{side:"bottom",sideOffset:4,children:w("folder.home")})]}),(0,t.jsxs)(m.Tooltip,{children:[(0,t.jsx)(m.TooltipTrigger,{render:(0,t.jsx)(h.Button,{variant:"outline",size:"icon-sm",onClick:()=>{S&&("__DRIVES__"===S.parentPath?T(!0):(T(!1),_(S.parentPath)))},className:"shrink-0 text-muted-foreground"}),children:(0,t.jsx)(s.ChevronUp,{className:"h-3.5 w-3.5"})}),(0,t.jsx)(m.TooltipContent,{side:"bottom",sideOffset:4,children:w("folder.parent")})]}),(0,t.jsxs)(m.Tooltip,{children:[(0,t.jsx)(m.TooltipTrigger,{render:(0,t.jsx)(h.Button,{variant:"outline",size:"icon-sm",onClick:()=>{z(!0),$(""),setTimeout(()=>D.current?.focus(),50)},className:"shrink-0 text-muted-foreground"}),children:(0,t.jsx)(c.FolderPlus,{className:"h-3.5 w-3.5"})}),(0,t.jsx)(m.TooltipContent,{side:"bottom",sideOffset:4,children:w("folder.newFolder")})]}),(0,t.jsx)("div",{className:"min-w-0 flex-1 truncate text-sm text-foreground font-mono",title:S?.currentPath??"",children:S?.currentPath??"..."})]}),(0,t.jsxs)(y.ScrollArea,{className:"min-h-0 flex-1",children:[L&&(0,t.jsxs)("div",{className:"flex items-center gap-2 border-b border-border/30 px-4 py-2",children:[(0,t.jsx)(n.Folder,{className:"h-4 w-4 text-primary/70 shrink-0"}),(0,t.jsx)("input",{ref:D,value:K,onChange:e=>$(e.target.value),onKeyDown:e=>{"Enter"===e.key&&U(),"Escape"===e.key&&H()},placeholder:w("folder.newFolderPlaceholder"),className:"h-7 flex-1 rounded-md border border-border bg-background px-2 text-sm text-foreground placeholder-muted-foreground outline-none focus:border-ring focus:ring-1 focus:ring-ring"}),(0,t.jsx)(h.Button,{variant:"ghost",size:"icon-xs",onClick:U,disabled:!K.trim(),className:"text-emerald-400 hover:text-emerald-300",children:(0,t.jsx)(u.Check,{className:"h-3.5 w-3.5"})}),(0,t.jsx)(h.Button,{variant:"ghost",size:"icon-xs",onClick:H,className:"text-muted-foreground",children:(0,t.jsx)(d.X,{className:"h-3.5 w-3.5"})})]}),j&&(0,t.jsx)("div",{className:"flex items-center justify-center py-8 text-sm text-muted-foreground",children:"Loading..."}),E&&(0,t.jsx)("div",{className:"flex items-center justify-center py-8 text-sm text-rose-400",children:E}),R&&(!S?.drives||0===S.drives.length)&&(0,t.jsxs)("div",{className:"flex flex-col items-center justify-center gap-1 py-8 text-sm text-muted-foreground",children:[(0,t.jsx)("span",{children:w("folder.noDrives")}),(0,t.jsxs)("span",{className:"text-[10px] opacity-60",children:[S?.diag??"old-build"," · platform=",S?.platform??"?"," · drives=",S?.drives?.length??0," · ",S?.currentPath??"?"]})]}),R&&S?.drives&&S.drives.map(e=>(0,t.jsxs)("button",{onClick:()=>{var t;return t=e.path,void(T(!1),_(t))},className:"flex w-full items-center gap-3 border-b border-border/30 px-4 py-2.5 text-left transition-colors hover:bg-accent last:border-b-0",children:[(0,t.jsx)(l.HardDrive,{className:"h-4 w-4 text-blue-400 shrink-0"}),(0,t.jsx)("span",{className:"flex-1 text-sm text-foreground truncate",children:e.name}),(0,t.jsx)("span",{className:"shrink-0 text-xs text-muted-foreground",children:e.path})]},e.path)),!R&&!j&&!E&&0===W.length&&(0,t.jsx)("div",{className:"flex items-center justify-center py-8 text-sm text-muted-foreground",children:w("folder.empty")}),!R&&!j&&!E&&W.map(e=>(0,t.jsxs)("button",{onClick:()=>{e.isGit||x?(b(e.path),v(!1)):_(e.path)},onDoubleClick:()=>_(e.path),className:"flex w-full items-center gap-3 border-b border-border/30 px-4 py-2.5 text-left transition-colors hover:bg-accent last:border-b-0",children:[e.isGit?(0,t.jsx)(o.FolderGit2,{className:"h-4 w-4 text-emerald-400 shrink-0"}):(0,t.jsx)(n.Folder,{className:"h-4 w-4 text-primary/70 shrink-0"}),(0,t.jsx)("span",{className:"flex-1 text-sm text-foreground truncate",children:e.name}),e.isGit&&(0,t.jsx)("span",{className:"shrink-0 rounded-md bg-emerald-500/10 px-2 py-0.5 text-[10px] font-medium text-emerald-400 ring-1 ring-emerald-500/20",children:"git"})]},e.path))]}),(0,t.jsxs)("div",{className:"flex justify-end gap-2 px-5 py-3 shrink-0 border-t border-border",children:[(0,t.jsx)(h.Button,{variant:"outline",onClick:()=>v(!1),children:w("common.cancel")}),(0,t.jsx)(h.Button,{onClick:()=>{S?.currentPath&&(b(S.currentPath),v(!1))},className:"bg-primary/10 text-primary ring-1 ring-primary/20 hover:bg-primary/15",children:w("folder.selectPath")})]})]})})})}])},905455,e=>{"use strict";var t=e.i(289721),r=e.i(975157);e.s(["SegmentedControl",0,function({options:e,value:n,onChange:o,className:a}){return(0,t.jsx)("div",{className:(0,r.cn)("inline-flex rounded-md border border-border bg-muted p-1 gap-1",a),children:e.map(e=>(0,t.jsx)("button",{type:"button",onClick:()=>o(e.value),className:(0,r.cn)("rounded px-3 py-1 text-sm transition-colors",n===e.value?"bg-background text-foreground shadow-sm":"text-muted-foreground hover:text-foreground"),children:e.label},e.value))})}])},689401,e=>{"use strict";var t=e.i(965652),r=e.i(804849),n=e.i(207516);e.s(["useAriaLabelledBy",0,function(e,o,a,s=!0,i){let[l,c]=t.useState(),u=(0,n.useBaseUiId)(i?`${i}-label`:void 0),d=e??o??l;return(0,r.useIsoLayoutEffect)(()=>{let t=e||o||!s?void 0:function(e,t){let r=function(e){if(!e)return;let t=e.parentElement;if(t&&"LABEL"===t.tagName)return t;let r=e.id;if(r){let t=e.nextElementSibling;if(t&&t.htmlFor===r)return t}let n=e.labels;return n&&n[0]}(e);if(r)return!r.id&&t&&(r.id=t),r.id||void 0}(a.current,u);l!==t&&c(t)}),d}])},461500,e=>{"use strict";var t=e.i(514798);let r=(0,t.createServerReference)("406b9ebf02d3183f04e594426f6a5ebe41a65dee0d",t.callServer,void 0,t.findSourceMapURL,"installExtension");e.s(["installExtension",0,r])},812983,e=>{"use strict";let t=(0,e.i(572989).default)("file-code",[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M10 12.5 8 15l2 2.5",key:"1tg20x"}],["path",{d:"m14 12.5 2 2.5-2 2.5",key:"yinavb"}]]);e.s(["FileCode",0,t],812983)},887911,e=>{"use strict";var t=e.i(738690),r=e.i(812983);let n={rg:{id:"rg",name:"代码搜索 (ripgrep)",description:"基于 rg 的全文代码搜索",icon:t.Search,sizeMB:5,homepageUrl:"https://github.com/BurntSushi/ripgrep#installation",manualInstall:!0},monaco:{id:"monaco",name:"代码编辑器 (Monaco)",description:"VS Code 同款 Web 编辑器",icon:r.FileCode,sizeMB:15,homepageUrl:"https://microsoft.github.io/monaco-editor/"}},o=[n.rg,n.monaco];e.s(["listExtensionMetadata",0,function(){return o}])},206781,e=>{"use strict";var t=e.i(514798);let r=(0,t.createServerReference)("60cfe2e76434418decb73fd3d25bf587d7b5ad1695",t.callServer,void 0,t.findSourceMapURL,"setConfigValue");e.s(["setConfigValue",0,r])},387091,15299,769757,e=>{"use strict";var t=e.i(572989);let r=(0,t.default)("sun",[["circle",{cx:"12",cy:"12",r:"4",key:"4exip2"}],["path",{d:"M12 2v2",key:"tus03m"}],["path",{d:"M12 20v2",key:"1lh1kg"}],["path",{d:"m4.93 4.93 1.41 1.41",key:"149t6j"}],["path",{d:"m17.66 17.66 1.41 1.41",key:"ptbguv"}],["path",{d:"M2 12h2",key:"1t8f8n"}],["path",{d:"M20 12h2",key:"1q8mjw"}],["path",{d:"m6.34 17.66-1.41 1.41",key:"1m8zz5"}],["path",{d:"m19.07 4.93-1.41 1.41",key:"1shlcs"}]]);e.s(["Sun",0,r],387091);let n=(0,t.default)("moon",[["path",{d:"M20.985 12.486a9 9 0 1 1-9.473-9.472c.405-.022.617.46.402.803a6 6 0 0 0 8.268 8.268c.344-.215.825-.004.803.401",key:"kfwtm"}]]);e.s(["Moon",0,n],15299);let o=(0,t.default)("languages",[["path",{d:"m5 8 6 6",key:"1wu5hv"}],["path",{d:"m4 14 6-6 2-3",key:"1k1g8d"}],["path",{d:"M2 5h12",key:"or177f"}],["path",{d:"M7 2h1",key:"1t2jsx"}],["path",{d:"m22 22-5-10-5 10",key:"don7ne"}],["path",{d:"M14 18h6",key:"1m8k6r"}]]);e.s(["Languages",0,o],769757)},338271,289813,941068,e=>{"use strict";var t=e.i(965652);let r=e=>{let t,r=new Set,n=(e,n)=>{let o="function"==typeof e?e(t):e;if(!Object.is(o,t)){let e=t;t=(null!=n?n:"object"!=typeof o||null===o)?o:Object.assign({},t,o),r.forEach(r=>r(t,e))}},o=()=>t,a={setState:n,getState:o,getInitialState:()=>s,subscribe:e=>(r.add(e),()=>r.delete(e))},s=t=e(n,o,a);return a},n=e=>{let n=e?r(e):r,o=e=>(function(e,r=e=>e){let n=t.default.useSyncExternalStore(e.subscribe,t.default.useCallback(()=>r(e.getState()),[e,r]),t.default.useCallback(()=>r(e.getInitialState()),[e,r]));return t.default.useDebugValue(n),n})(n,e);return Object.assign(o,n),o},o=e=>e?n(e):n;e.s(["create",0,o],289813);let a=["Shift","Meta","Alt","Control"],s="object"==typeof navigator?navigator.platform:"",i=/Mac|iPod|iPhone|iPad/.test(s)?"Meta":"Control",l="Win32"===s?["Control","Alt"]:["Alt"];function c(e,t){return"function"==typeof e.getModifierState&&(e.getModifierState(t)||l.includes(t)&&e.getModifierState("AltGraph"))}function u(e){return e.trim().split(" ").map(e=>{let t=e.split(/(?<=\w|\])\+/),r=t.pop(),n=r.match(/^\((.+)\)$/),o=n?RegExp(`^(?:${n[1]})$`,"iv"):r,a=[],s=[];for(let e of t){let t=e.match(/^\[(.*)\]$/),r=t?.[1]??e;r="$mod"===r?i:r,t?s.push(r):a.push(r)}return[a,s,o]})}e.s(["matchKeybindingPress",0,function(e,[t,r,n]){let o=t.includes("AltGraph");return!((n instanceof RegExp?!(n.test(e.key)||n.test(e.code)):n.toUpperCase()!==e.key.toUpperCase()&&n!==e.code)||t.find(t=>!c(e,t))||a.find(a=>!t.includes(a)&&!r.includes(a)&&n!==a&&c(e,a)&&!(o&&l.includes(a))))},"parseKeybinding",0,u],941068);let d=0,f=0,h=o(e=>({entries:new Map,register:t=>{var r;let n=(d+=1,`sc_${d}`);f+=1;let o=Array.isArray(r=t.keys)?[...r]:[r],a={...t,id:n,keys:o,presses:o.map(e=>u(e)),seq:f};return e(e=>{let t=new Map(e.entries);return t.set(n,a),{entries:t}}),n},unregister:t=>{e(e=>{if(!e.entries.has(t))return e;let r=new Map(e.entries);return r.delete(t),{entries:r}})}}));e.s(["selectAllShortcuts",0,function(e){return Array.from(e.entries.values())},"useShortcutStore",0,h],338271)},889383,e=>{"use strict";var t=e.i(289721),r=e.i(965652),n=e.i(338271),o=e.i(941068);function a(e){return(e.priority??0)+1e3*("global"!==e.scope)}e.s(["ShortcutProvider",0,function({children:e}){return(0,r.useEffect)(()=>{function e(e){let t=(0,n.selectAllShortcuts)(n.useShortcutStore.getState());if(0===t.length)return;let r=function(e,t,r){let n=[];for(let a of e){if(a.when&&!1===a.when())continue;let e=null;for(let r of a.presses){if(1!==r.length)continue;let n=r[0];if((0,o.matchKeybindingPress)(t,n)){e=n;break}}if(e){if(r){if(function(e){let[t]=e;return t.some(e=>"Control"===e||"Meta"===e||"Alt"===e)}(e)){if(!1===a.allowInInput)continue}else if(!a.allowInInput)continue}n.push(a)}}return 0===n.length?null:(n.sort((e,t)=>{let r=a(e),n=a(t);return r!==n?n-r:t.seq-e.seq}),n[0])}(t,e,function(e){if(!e)return!1;let t=e.tagName;return"INPUT"===t||"TEXTAREA"===t||"SELECT"===t||!0===e.isContentEditable}(document.activeElement));r&&(!1!==r.preventDefault&&e.preventDefault(),e.stopPropagation(),r.handler(e))}return window.addEventListener("keydown",e,{capture:!0}),()=>{window.removeEventListener("keydown",e,{capture:!0})}},[]),(0,t.jsx)(t.Fragment,{children:e})}],889383)},454711,e=>{"use strict";var t=e.i(965652),r=e.i(338271);e.s(["useShortcut",0,function(...e){let n=function(e){let t=e[0];if("string"==typeof t||Array.isArray(t))return Array.isArray(t)&&t.length>0&&"string"!=typeof t[0]?t:[{keys:t,handler:e[1],...e[2]??{}}];return[t]}(e),o=(0,t.useRef)(n);(0,t.useEffect)(()=>{o.current=n});let a=(0,r.useShortcutStore)(e=>e.register),s=(0,r.useShortcutStore)(e=>e.unregister),i=JSON.stringify(n.map(e=>({keys:e.keys,scope:e.scope,description:e.description,group:e.group,allowInInput:e.allowInInput,preventDefault:e.preventDefault,priority:e.priority,hidden:e.hidden,hasWhen:"function"==typeof e.when})));(0,t.useEffect)(()=>{let e=o.current.map((e,t)=>a({...e,handler:e=>o.current[t]?.handler(e),when:e.when?()=>o.current[t]?.when?.()??!0:void 0}));return()=>{for(let t of e)s(t)}},[i,a,s])}])},743059,e=>{"use strict";var t=e.i(338271);function r(){if("u"<typeof navigator)return!1;let e=navigator.userAgentData?.platform;return/mac/i.test(e??navigator.userAgent??"")}let n={ArrowLeft:"←",ArrowRight:"→",ArrowUp:"↑",ArrowDown:"↓"};function o(e){let t=r();return e.split("+").map(e=>(function(e,t){switch(e){case"$mod":case"Meta":return t?"⌘":"Ctrl";case"Control":return"Ctrl";case"Alt":return t?"⌥":"Alt";case"Shift":return"⇧";case"Escape":return"Esc";case"Enter":return"↵";case"Tab":return"Tab";default:if(/^Digit[0-9]$/.test(e))return e.slice(5);return n[e]??e}})(e,t))}function a(e){return e.map(e=>o(e).join("+"))}e.s(["compactKeyList",0,function(e){if(e.length<3)return e;let t=e.map(e=>{let t=/^(.*?)(?:Digit)?([1-9])$/.exec(e);return t?{prefix:t[1],digit:Number(t[2])}:null});if(t.some(e=>null===e))return e;let r=t[0].prefix;return t.every(e=>e.prefix===r)&&t.every((e,t)=>e.digit===t+1)?[`${r}1–${t[t.length-1].digit}`]:e},"isMac",0,r,"renderComboTokens",0,o,"renderKeys",0,a,"useShortcutHelp",0,function(){let e=(0,t.useShortcutStore)(t.selectAllShortcuts),r=new Map;for(let t of e){if(t.hidden)continue;let e=t.group??t.scope??"global",n=r.get(e);n?n.push(t):r.set(e,[t])}return{groups:Array.from(r.entries()).map(([e,t])=>({title:e,shortcuts:t})),renderKeys:a}}])},371385,75566,841359,e=>{"use strict";let t=[{id:"global.search",defaultKeys:["$mod+k"],descriptionKey:"shortcuts.search",group:"global",scope:"global",configurable:!0},{id:"global.commandPalette",defaultKeys:["$mod+p"],descriptionKey:"shortcuts.commandPalette",group:"global",scope:"global",configurable:!0},{id:"global.help",defaultKeys:["$mod+/","?"],descriptionKey:"shortcuts.openHelp",group:"global",scope:"global",configurable:!0},{id:"global.assistant",defaultKeys:["$mod+l"],descriptionKey:"shortcuts.assistant",group:"global",scope:"global",configurable:!0},{id:"global.gotoWorkspace",defaultKeys:["Alt+Digit1","Alt+Digit2","Alt+Digit3","Alt+Digit4","Alt+Digit5","Alt+Digit6","Alt+Digit7","Alt+Digit8","Alt+Digit9"],descriptionKey:"shortcuts.gotoWorkspace",group:"global",scope:"global",configurable:!1,allowInInput:!0},{id:"panels.taskManager",defaultKeys:["$mod+Control+j"],descriptionKey:"shortcuts.panels.taskManager",group:"panels",scope:"global",configurable:!0},{id:"panels.assets",defaultKeys:["$mod+Control+k"],descriptionKey:"shortcuts.panels.assets",group:"panels",scope:"global",configurable:!0},{id:"panels.notes",defaultKeys:["$mod+Control+l"],descriptionKey:"shortcuts.panels.notes",group:"panels",scope:"global",configurable:!0},{id:"panels.archive",defaultKeys:["$mod+Control+;"],descriptionKey:"shortcuts.panels.archive",group:"panels",scope:"global",configurable:!0},{id:"missions.exit",defaultKeys:["Control+;"],descriptionKey:"shortcuts.missions.exitToNav",group:"missions",scope:"missions",configurable:!0,allowInInput:!0},{id:"missions.jump",defaultKeys:["1","2","3","4","5","6","7","8","9"],descriptionKey:"shortcuts.missions.jump",group:"missions",scope:"missions",configurable:!1},{id:"missions.moveSelection",defaultKeys:["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],descriptionKey:"shortcuts.missions.moveSel",group:"missions",scope:"missions",configurable:!1},{id:"missions.cycle",defaultKeys:["Tab"],descriptionKey:"shortcuts.missions.cyclePane",group:"missions",scope:"missions",configurable:!1},{id:"missions.cycleBack",defaultKeys:["Shift+Tab"],descriptionKey:"shortcuts.missions.cyclePane",group:"missions",scope:"missions",configurable:!1},{id:"missions.focus",defaultKeys:["Enter"],descriptionKey:"shortcuts.missions.focusSel",group:"missions",scope:"missions",configurable:!1},{id:"missions.next",defaultKeys:["$mod+ArrowRight"],descriptionKey:"shortcuts.missions.nextPane",group:"missions",scope:"missions",configurable:!0,allowInInput:!0},{id:"missions.prev",defaultKeys:["$mod+ArrowLeft"],descriptionKey:"shortcuts.missions.prevPane",group:"missions",scope:"missions",configurable:!0,allowInInput:!0}],r=new Map(t.map(e=>[e.id,e]));function n(e){let t=r.get(e);if(!t)throw Error(`Unknown shortcut action: ${e}`);return t}e.s(["SHORTCUT_ACTIONS",0,t,"getAction",0,n],371385);var o=e.i(289813);let a="tower-keymap-overrides";function s(e){try{window.localStorage.setItem(a,JSON.stringify(e))}catch{}}function i(e,t){return e[t]??[...n(t).defaultKeys]}let l=(0,o.create)((e,t)=>({overrides:function(){try{let e=window.localStorage.getItem(a);if(!e)return{};let t=JSON.parse(e);if(t&&"object"==typeof t&&!Array.isArray(t))return t;return{}}catch{return{}}}(),setBinding:(t,r)=>e(e=>{let n={...e.overrides,[t]:r};return s(n),{overrides:n}}),resetBinding:t=>e(e=>{if(!(t in e.overrides))return e;let r={...e.overrides};return delete r[t],s(r),{overrides:r}}),resetAll:()=>{s({}),e({overrides:{}})},resolveKeys:e=>i(t().overrides,e)}));e.s(["resolveKeysFrom",0,i,"useKeymapStore",0,l],75566);var c=e.i(533499),u=e.i(454711);function d(e){return l(t=>t.overrides[e])??[...n(e).defaultKeys]}e.s(["useActionShortcut",0,function(e,t,r){let o=n(e),a=d(e),{t:s}=(0,c.useI18n)();(0,u.useShortcut)(a,t,{scope:o.scope,description:s(o.descriptionKey),group:s(`shortcuts.group.${o.group}`),allowInInput:o.allowInInput,...r})},"useResolvedKeys",0,d],841359)},508271,158956,e=>{"use strict";e.i(889383),e.i(454711);var t=e.i(743059);e.i(338271),e.i(371385),e.i(841359),e.s(["serializeKeyEvent",0,function(e){let{key:r}=e;if("Control"===r||"Shift"===r||"Alt"===r||"Meta"===r)return null;let n=(0,t.isMac)(),o=[];return(n?e.metaKey:e.ctrlKey)&&o.push("$mod"),(n?e.ctrlKey:e.metaKey)&&o.push(n?"Control":"Meta"),e.altKey&&o.push("Alt"),e.shiftKey&&o.push("Shift"),o.push(1===r.length&&/[a-zA-Z]/.test(r)?r.toLowerCase():r),o.join("+")}],158956),e.i(75566),e.s([],508271)},240095,e=>{"use strict";var t=e.i(514798);let r=(0,t.createServerReference)("60abd5e499bef8cd1d081b74113f0e817026a864e7",t.callServer,void 0,t.findSourceMapURL,"getConfigValue");e.s(["getConfigValue",0,r])},360325,e=>{"use strict";let t=(0,e.i(572989).default)("keyboard",[["path",{d:"M10 8h.01",key:"1r9ogq"}],["path",{d:"M12 12h.01",key:"1mp3jc"}],["path",{d:"M14 8h.01",key:"1primd"}],["path",{d:"M16 12h.01",key:"1l6xoz"}],["path",{d:"M18 8h.01",key:"emo2bl"}],["path",{d:"M6 8h.01",key:"x9i8wu"}],["path",{d:"M7 16h10",key:"wp8him"}],["path",{d:"M8 12h.01",key:"czm47f"}],["rect",{width:"20",height:"16",x:"2",y:"4",rx:"2",key:"18n3k1"}]]);e.s(["Keyboard",0,t],360325)},386343,e=>{"use strict";let t=(0,e.i(572989).default)("settings",[["path",{d:"M9.671 4.136a2.34 2.34 0 0 1 4.659 0 2.34 2.34 0 0 0 3.319 1.915 2.34 2.34 0 0 1 2.33 4.033 2.34 2.34 0 0 0 0 3.831 2.34 2.34 0 0 1-2.33 4.033 2.34 2.34 0 0 0-3.319 1.915 2.34 2.34 0 0 1-4.659 0 2.34 2.34 0 0 0-3.32-1.915 2.34 2.34 0 0 1-2.33-4.033 2.34 2.34 0 0 0 0-3.831A2.34 2.34 0 0 1 6.35 6.051a2.34 2.34 0 0 0 3.319-1.915",key:"1i5ecw"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]);e.s(["Settings",0,t],386343)},756502,e=>{"use strict";let t=(0,e.i(572989).default)("info",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]]);e.s(["default",0,t])},579157,e=>{"use strict";var t=e.i(756502);e.s(["Info",()=>t.default])},125177,851289,e=>{"use strict";let t=(0,e.i(572989).default)("bell",[["path",{d:"M10.268 21a2 2 0 0 0 3.464 0",key:"vwvbt9"}],["path",{d:"M3.262 15.326A1 1 0 0 0 4 17h16a1 1 0 0 0 .74-1.673C19.41 13.956 18 12.499 18 8A6 6 0 0 0 6 8c0 4.499-1.411 5.956-2.738 7.326",key:"11g9vi"}]]);e.s(["Bell",0,t],125177);var r=e.i(289721),n=e.i(965652);e.i(508271);var o=e.i(743059),a=e.i(975157);function s({children:e}){return(0,r.jsx)("kbd",{className:(0,a.cn)("inline-flex min-w-[1.5rem] items-center justify-center rounded-md","border border-border bg-muted px-1.5 py-0.5","text-[11px] font-medium leading-none text-foreground","shadow-[inset_0_-1px_0_var(--border)]"),children:e})}e.s(["KeyCombo",0,function({keys:e}){let t=(0,o.compactKeyList)(e);return(0,r.jsx)("span",{className:"inline-flex flex-wrap items-center gap-1.5",children:t.map((e,t)=>(0,r.jsxs)("span",{className:"inline-flex items-center gap-1",children:[t>0&&(0,r.jsx)("span",{className:"text-[11px] text-muted-foreground/40",children:"/"}),(0,o.renderComboTokens)(e).map((e,t)=>(0,r.jsxs)(n.Fragment,{children:[t>0&&(0,r.jsx)("span",{className:"text-[10px] text-muted-foreground/60",children:"+"}),(0,r.jsx)(s,{children:e})]},t))]},`${e}-${t}`))})}],851289)},243288,e=>{e.v(t=>Promise.all(["static/chunks/0d1ok-v-u-xe~.js","static/chunks/0ep-qrl_zzch8.js","static/chunks/0cf7e1scao3zk.js","static/chunks/17oc2l.ekcs8b.css"].map(t=>e.l(t))).then(()=>t(346069)))},427768,e=>{e.v(t=>Promise.all(["static/chunks/15ue90qe1sh-9.js","static/chunks/0o6zqtzz_7ysr.js"].map(t=>e.l(t))).then(()=>t(103363)))}]);
@@ -1 +0,0 @@
1
- (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,368490,e=>{"use strict";var t=e.i(776405);e.s(["ChevronRight",()=>t.default])},19671,e=>{"use strict";let t=(0,e.i(572989).default)("chevron-left",[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]]);e.s(["ChevronLeft",0,t],19671)},404122,e=>{"use strict";var t=e.i(514798);let r=(0,t.createServerReference)("4075ec4df24bd89711034f15cca9eb240df9f3f473",t.callServer,void 0,t.findSourceMapURL,"getConfigValues");e.s(["getConfigValues",0,r])},922541,e=>{"use strict";let t=(0,e.i(572989).default)("rotate-ccw",[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}]]);e.s(["RotateCcw",0,t],922541)},487486,e=>{"use strict";var t=e.i(565455),r=e.i(581263),s=e.i(294237),i=e.i(975157);let n=(0,s.cva)("group/badge inline-flex h-5 w-fit shrink-0 items-center justify-center gap-1 overflow-hidden rounded-4xl border border-transparent px-2 py-0.5 text-xs font-medium whitespace-nowrap transition-all focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 [&>svg]:pointer-events-none [&>svg]:size-3!",{variants:{variant:{default:"bg-primary text-primary-foreground [a]:hover:bg-primary/80",secondary:"bg-secondary text-secondary-foreground [a]:hover:bg-secondary/80",destructive:"bg-destructive/10 text-destructive focus-visible:ring-destructive/20 dark:bg-destructive/20 dark:focus-visible:ring-destructive/40 [a]:hover:bg-destructive/20",outline:"border-border text-foreground [a]:hover:bg-muted [a]:hover:text-muted-foreground",ghost:"hover:bg-muted hover:text-muted-foreground dark:hover:bg-muted/50",link:"text-primary underline-offset-4 hover:underline"}},defaultVariants:{variant:"default"}});e.s(["Badge",0,function({className:e,variant:s="default",render:u,...c}){var a;return a={defaultTagName:"span",props:(0,t.mergeProps)({className:(0,i.cn)(n({variant:s}),e)},c),render:u,state:{slot:"badge",variant:s}},(0,r.useRenderElement)(a.defaultTagName??"div",a,a)}],487486)},184331,e=>{"use strict";var t=e.i(514798);let r=(0,t.createServerReference)("404c5f6bb80cc0d10b604e5640d83816a765fc59f3",t.callServer,void 0,t.findSourceMapURL,"openInTerminal");e.s(["openInTerminal",0,r])},912505,e=>{"use strict";var t=e.i(289721),r=e.i(975157);e.s(["EmptyState",0,function({icon:e,title:s,description:i,action:n,className:u}){return(0,t.jsxs)("div",{className:(0,r.cn)("flex h-48 flex-col items-center justify-center gap-2 text-center",u),children:[e&&(0,t.jsx)(e,{className:"h-10 w-10 text-muted-foreground/40"}),(0,t.jsx)("p",{className:"text-sm font-medium text-muted-foreground",children:s}),i&&(0,t.jsx)("p",{className:"text-xs text-muted-foreground/60",children:i}),n&&(0,t.jsx)("div",{className:"mt-2",children:n})]})}])},74593,e=>{"use strict";var t=e.i(514798);let r=(0,t.createServerReference)("4062d13cdbe45c1cfb8386e810495e72befcfbec91",t.callServer,void 0,t.findSourceMapURL,"stopPtyExecution");e.s(["stopPtyExecution",0,r])},58308,e=>{"use strict";var t=e.i(514798);let r=(0,t.createServerReference)("401acf2b7191c3fbfd39c3f254a5628d15465f16bb",t.callServer,void 0,t.findSourceMapURL,"checkWorktreeClean");e.s(["checkWorktreeClean",0,r])},483361,e=>{"use strict";var t=e.i(514798);let r=(0,t.createServerReference)("60e4b2ed8000953c03639b7e7fbc5233720fd9370a",t.callServer,void 0,t.findSourceMapURL,"updateTaskStatus");e.s(["updateTaskStatus",0,r])},865514,e=>{"use strict";var t=e.i(289721),r=e.i(965652),s=e.i(538059),i=e.i(776639),n=e.i(519455);let u=(0,e.i(572989).default)("git-merge",[["circle",{cx:"18",cy:"18",r:"3",key:"1xkwt0"}],["circle",{cx:"6",cy:"6",r:"3",key:"1lh9wr"}],["path",{d:"M6 21V9a9 9 0 0 0 9 9",key:"7kw0sc"}]]);var c=e.i(400355);e.s(["TaskMergeConfirmDialog",0,function({open:e,onOpenChange:a,taskId:o,taskTitle:l,baseBranch:h,fileCount:d,commitCount:f,commitLog:g=[],onMergeComplete:p}){let m=(0,s.useRouter)(),[x,v]=(0,r.useState)(!1),[A,y]=(0,r.useState)(null),C=async()=>{v(!0),y(null);try{let e=await fetch(`/api/tasks/${o}/merge`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({})});if(e.ok){a(!1),p(),m.refresh();return}let t=await e.json().catch(()=>({error:"Merge failed"}));409===e.status?y(`Merge conflicts detected: ${Array.isArray(t.conflictFiles)?t.conflictFiles.join(", "):"unknown files"}`):y(t.error??"Merge failed")}catch{y("Network error — merge failed")}finally{v(!1)}};return(0,t.jsx)(i.Dialog,{open:e,onOpenChange:a,children:(0,t.jsxs)(i.DialogContent,{showCloseButton:!0,className:"sm:max-w-md",children:[(0,t.jsx)(i.DialogHeader,{children:(0,t.jsxs)(i.DialogTitle,{className:"flex items-center gap-2",children:[(0,t.jsx)(u,{className:"h-4 w-4 text-emerald-400"}),"Confirm Merge"]})}),(0,t.jsxs)("div",{className:"space-y-3 py-2",children:[(0,t.jsxs)("div",{className:"rounded-lg border border-border bg-muted/30 p-3 space-y-2.5",children:[(0,t.jsxs)("div",{className:"flex items-start justify-between gap-4",children:[(0,t.jsx)("span",{className:"text-xs text-muted-foreground whitespace-nowrap",children:"Target branch"}),(0,t.jsx)("code",{className:"text-xs font-mono bg-muted px-2 py-0.5 rounded text-foreground",children:h})]}),(0,t.jsxs)("div",{className:"flex items-start justify-between gap-4",children:[(0,t.jsx)("span",{className:"text-xs text-muted-foreground whitespace-nowrap",children:"Changed files"}),(0,t.jsx)("span",{className:"text-xs font-medium text-foreground",children:d})]}),(0,t.jsxs)("div",{className:"flex items-start justify-between gap-4",children:[(0,t.jsx)("span",{className:"text-xs text-muted-foreground whitespace-nowrap",children:"Commits"}),(0,t.jsx)("span",{className:"text-xs font-medium text-foreground",children:f})]})]}),g.length>0&&(0,t.jsxs)("div",{children:[(0,t.jsx)("span",{className:"text-xs text-muted-foreground mb-1 block",children:"Commits"}),(0,t.jsx)("div",{className:"rounded-md border border-border bg-muted/30 p-2 space-y-1 max-h-32 overflow-y-auto",children:g.map((e,r)=>(0,t.jsx)("div",{className:"text-xs font-mono text-foreground/80",children:e},r))})]}),A&&(0,t.jsx)("div",{className:"rounded-lg border border-red-500/20 bg-red-500/10 px-3 py-2",children:(0,t.jsx)("p",{className:"text-xs text-red-400",children:A})})]}),(0,t.jsxs)(i.DialogFooter,{children:[(0,t.jsx)(n.Button,{variant:"outline",onClick:()=>a(!1),disabled:x,children:"Cancel"}),(0,t.jsx)(n.Button,{onClick:C,disabled:x,className:"gap-2",children:x?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(c.Loader2,{className:"h-4 w-4 animate-spin"}),"Merging..."]}):(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(u,{className:"h-4 w-4"}),"Confirm Merge"]})})]})]})})}],865514)},100839,e=>{"use strict";var t=e.i(514798);let r=(0,t.createServerReference)("6031d4644cd423486c800f9dcad4ed01df4562a880",t.callServer,void 0,t.findSourceMapURL,"commitWorktreeChanges");e.s(["commitWorktreeChanges",0,r])},929127,e=>{"use strict";var t=e.i(514798);let r=(0,t.createServerReference)("60efa135082b65911a52ff807ef8c96f9c3585f6a1",t.callServer,void 0,t.findSourceMapURL,"resumePtyExecution");e.s(["resumePtyExecution",0,r])},942213,e=>{"use strict";var t=e.i(514798);let r=(0,t.createServerReference)("7c3d6cd7e5e687f4f77510e3a770d804bec50e4336",t.callServer,void 0,t.findSourceMapURL,"startPtyExecution");e.s(["startPtyExecution",0,r])},169751,e=>{"use strict";function t(e){return Array.isArray?Array.isArray(e):"[object Array]"===a(e)}function r(e){return null==e?"":function(e){if("string"==typeof e)return e;if("bigint"==typeof e)return e.toString();let t=e+"";return"0"==t&&1/e==-1/0?"-0":t}(e)}function s(e){return"string"==typeof e}function i(e){return"number"==typeof e}function n(e){return"object"==typeof e}function u(e){return null!=e}function c(e){return!e.trim().length}function a(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":Object.prototype.toString.call(e)}let o=Object.prototype.hasOwnProperty;class l{constructor(e){this._keys=[],this._keyMap={};let t=0;e.forEach(e=>{let r=h(e);this._keys.push(r),this._keyMap[r.id]=r,t+=r.weight}),this._keys.forEach(e=>{e.weight/=t})}get(e){return this._keyMap[e]}keys(){return this._keys}toJSON(){return JSON.stringify(this._keys)}}function h(e){let r=null,i=null,n=null,u=1,c=null;if(s(e)||t(e))n=e,r=d(e),i=f(e);else{if(!o.call(e,"name"))throw Error("Missing name property in key");let t=e.name;if(n=t,o.call(e,"weight")&&(u=e.weight)<=0)throw Error(`Property 'weight' in key '${t}' must be a positive integer`);r=d(t),i=f(t),c=e.getFn}return{path:r,id:i,weight:u,src:n,getFn:c}}function d(e){return t(e)?e:e.split(".")}function f(e){return t(e)?e.join("."):e}let g=Object.freeze({isCaseSensitive:!1,ignoreDiacritics:!1,includeScore:!1,keys:[],shouldSort:!0,sortFn:(e,t)=>e.score===t.score?e.idx<t.idx?-1:1:e.score<t.score?-1:1,includeMatches:!1,findAllMatches:!1,minMatchCharLength:1,location:0,threshold:.6,distance:100,useExtendedSearch:!1,useTokenSearch:!1,getFn:function(e,c){let o=[],l=!1,h=(e,c,d,f)=>{if(u(e))if(c[d]){var g,p;let m=e[c[d]];if(!u(m))return;if(d===c.length-1&&(s(m)||i(m)||!0===(g=m)||!1===g||n(p=g)&&null!==p&&"[object Boolean]"==a(g)||"bigint"==typeof m))o.push(void 0!==f?{v:r(m),i:f}:r(m));else if(t(m)){l=!0;for(let e=0,t=m.length;e<t;e+=1)h(m[e],c,d+1,e)}else c.length&&h(m,c,d+1,f)}else o.push(void 0!==f?{v:e,i:f}:e)};return h(e,s(c)?c.split("."):c,0),l?o:o[0]},ignoreLocation:!1,ignoreFieldNorm:!1,fieldNormWeight:1}),p=/[^ ]+/g;class m{constructor({getFn:e=g.getFn,fieldNormWeight:t=g.fieldNormWeight}={}){this.norm=function(e=1,t=3){let r=new Map,s=Math.pow(10,t);return{get(t){let i=t.match(p).length;if(r.has(i))return r.get(i);let n=parseFloat(Math.round(1/Math.pow(i,.5*e)*s)/s);return r.set(i,n),n},clear(){r.clear()}}}(t,3),this.getFn=e,this.isCreated=!1,this.docs=[],this.keys=[],this._keysMap={},this.setIndexRecords()}setSources(e=[]){this.docs=e}setIndexRecords(e=[]){this.records=e}setKeys(e=[]){this.keys=e,this._keysMap={},e.forEach((e,t)=>{this._keysMap[e.id]=t})}create(){!this.isCreated&&this.docs.length&&(this.isCreated=!0,s(this.docs[0])?this.docs.forEach((e,t)=>{this._addString(e,t)}):this.docs.forEach((e,t)=>{this._addObject(e,t)}),this.norm.clear())}add(e){let t=this.size();s(e)?this._addString(e,t):this._addObject(e,t)}removeAt(e){this.records.splice(e,1);for(let t=e,r=this.size();t<r;t+=1)this.records[t].i-=1}removeAll(e){for(let t=e.length-1;t>=0;t-=1)this.records.splice(e[t],1);for(let e=0,t=this.records.length;e<t;e+=1)this.records[e].i=e}getValueForItemAtKeyId(e,t){return e[this._keysMap[t]]}size(){return this.records.length}_addString(e,t){if(!u(e)||c(e))return;let r={v:e,i:t,n:this.norm.get(e)};this.records.push(r)}_addObject(e,i){let n={i:i,$:{}};this.keys.forEach((i,a)=>{let o=i.getFn?i.getFn(e):this.getFn(e,i.path);if(u(o)){if(t(o)){let e=[];for(let t=0,i=o.length;t<i;t+=1){let i=o[t];if(u(i)){if(s(i)){if(!c(i)){let r={v:i,i:t,n:this.norm.get(i)};e.push(r)}}else if(u(i.v)){let t=s(i.v)?i.v:r(i.v);if(!c(t)){let r={v:t,i:i.i,n:this.norm.get(t)};e.push(r)}}}}n.$[a]=e}else if(s(o)&&!c(o)){let e={v:o,n:this.norm.get(o)};n.$[a]=e}}}),this.records.push(n)}toJSON(){return{keys:this.keys.map(({getFn:e,...t})=>t),records:this.records}}}function x(e,t,{getFn:r=g.getFn,fieldNormWeight:s=g.fieldNormWeight}={}){let i=new m({getFn:r,fieldNormWeight:s});return i.setKeys(e.map(h)),i.setSources(t),i.create(),i}function v(e){if(e.length<=1)return e;e.sort((e,t)=>e[0]-t[0]||e[1]-t[1]);let t=[e[0]];for(let r=1,s=e.length;r<s;r+=1){let s=t[t.length-1],i=e[r];i[0]<=s[1]+1?s[1]=Math.max(s[1],i[1]):t.push(i)}return t}let A={ł:"l",Ł:"L",đ:"d",Đ:"D",ø:"o",Ø:"O",ħ:"h",Ħ:"H",ŧ:"t",Ŧ:"T",ı:"i",ß:"ss"},y=RegExp("["+Object.keys(A).join("")+"]","g"),C=String.prototype.normalize?e=>e.normalize("NFD").replace(/[\u0300-\u036F\u0483-\u0489\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u0610-\u061A\u064B-\u065F\u0670\u06D6-\u06DC\u06DF-\u06E4\u06E7\u06E8\u06EA-\u06ED\u0711\u0730-\u074A\u07A6-\u07B0\u07EB-\u07F3\u07FD\u0816-\u0819\u081B-\u0823\u0825-\u0827\u0829-\u082D\u0859-\u085B\u08D3-\u08E1\u08E3-\u0903\u093A-\u093C\u093E-\u094F\u0951-\u0957\u0962\u0963\u0981-\u0983\u09BC\u09BE-\u09C4\u09C7\u09C8\u09CB-\u09CD\u09D7\u09E2\u09E3\u09FE\u0A01-\u0A03\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A70\u0A71\u0A75\u0A81-\u0A83\u0ABC\u0ABE-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AE2\u0AE3\u0AFA-\u0AFF\u0B01-\u0B03\u0B3C\u0B3E-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B62\u0B63\u0B82\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD7\u0C00-\u0C04\u0C3E-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C62\u0C63\u0C81-\u0C83\u0CBC\u0CBE-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CE2\u0CE3\u0D00-\u0D03\u0D3B\u0D3C\u0D3E-\u0D44\u0D46-\u0D48\u0D4A-\u0D4D\u0D57\u0D62\u0D63\u0D82\u0D83\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DF2\u0DF3\u0E31\u0E34-\u0E3A\u0E47-\u0E4E\u0EB1\u0EB4-\u0EB9\u0EBB\u0EBC\u0EC8-\u0ECD\u0F18\u0F19\u0F35\u0F37\u0F39\u0F3E\u0F3F\u0F71-\u0F84\u0F86\u0F87\u0F8D-\u0F97\u0F99-\u0FBC\u0FC6\u102B-\u103E\u1056-\u1059\u105E-\u1060\u1062-\u1064\u1067-\u106D\u1071-\u1074\u1082-\u108D\u108F\u109A-\u109D\u135D-\u135F\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17B4-\u17D3\u17DD\u180B-\u180D\u1885\u1886\u18A9\u1920-\u192B\u1930-\u193B\u1A17-\u1A1B\u1A55-\u1A5E\u1A60-\u1A7C\u1A7F\u1AB0-\u1ABE\u1B00-\u1B04\u1B34-\u1B44\u1B6B-\u1B73\u1B80-\u1B82\u1BA1-\u1BAD\u1BE6-\u1BF3\u1C24-\u1C37\u1CD0-\u1CD2\u1CD4-\u1CE8\u1CED\u1CF2-\u1CF4\u1CF7-\u1CF9\u1DC0-\u1DF9\u1DFB-\u1DFF\u20D0-\u20F0\u2CEF-\u2CF1\u2D7F\u2DE0-\u2DFF\u302A-\u302F\u3099\u309A\uA66F-\uA672\uA674-\uA67D\uA69E\uA69F\uA6F0\uA6F1\uA802\uA806\uA80B\uA823-\uA827\uA880\uA881\uA8B4-\uA8C5\uA8E0-\uA8F1\uA8FF\uA926-\uA92D\uA947-\uA953\uA980-\uA983\uA9B3-\uA9C0\uA9E5\uAA29-\uAA36\uAA43\uAA4C\uAA4D\uAA7B-\uAA7D\uAAB0\uAAB2-\uAAB4\uAAB7\uAAB8\uAABE\uAABF\uAAC1\uAAEB-\uAAEF\uAAF5\uAAF6\uABE3-\uABEA\uABEC\uABED\uFB1E\uFE00-\uFE0F\uFE20-\uFE2F]/g,"").replace(y,e=>A[e]):e=>e;class b{constructor(e,{location:t=g.location,threshold:r=g.threshold,distance:s=g.distance,includeMatches:i=g.includeMatches,findAllMatches:n=g.findAllMatches,minMatchCharLength:u=g.minMatchCharLength,isCaseSensitive:c=g.isCaseSensitive,ignoreDiacritics:a=g.ignoreDiacritics,ignoreLocation:o=g.ignoreLocation}={}){if(this.options={location:t,threshold:r,distance:s,includeMatches:i,findAllMatches:n,minMatchCharLength:u,isCaseSensitive:c,ignoreDiacritics:a,ignoreLocation:o},e=c?e:e.toLowerCase(),e=a?C(e):e,this.pattern=e,this.chunks=[],!this.pattern.length)return;const l=(e,t)=>{this.chunks.push({pattern:e,alphabet:function(e){let t={};for(let r=0,s=e.length;r<s;r+=1){let i=e.charAt(r);t[i]=(t[i]||0)|1<<s-r-1}return t}(e),startIndex:t})},h=this.pattern.length;if(h>32){let e=0;const t=h%32,r=h-t;for(;e<r;)l(this.pattern.substr(e,32),e),e+=32;if(t){const e=h-32;l(this.pattern.substr(e),e)}}else l(this.pattern,0)}searchIn(e){let{isCaseSensitive:t,ignoreDiacritics:r,includeMatches:s}=this.options;if(e=t?e:e.toLowerCase(),e=r?C(e):e,this.pattern===e){let t={isMatch:!0,score:0};return s&&(t.indices=[[0,e.length-1]]),t}let{location:i,distance:n,threshold:u,findAllMatches:c,minMatchCharLength:a,ignoreLocation:o}=this.options,l=[],h=0,d=!1;this.chunks.forEach(({pattern:t,alphabet:r,startIndex:f})=>{let{isMatch:p,score:m,indices:x}=function(e,t,r,{location:s=g.location,distance:i=g.distance,threshold:n=g.threshold,findAllMatches:u=g.findAllMatches,minMatchCharLength:c=g.minMatchCharLength,includeMatches:a=g.includeMatches,ignoreLocation:o=g.ignoreLocation}={}){let l;if(t.length>32)throw Error("Pattern length exceeds max of 32.");let h=t.length,d=e.length,f=Math.max(0,Math.min(s,d)),p=n,m=f,x=(e,t)=>{let r=e/h;if(o)return r;let s=Math.abs(f-t);return i?r+s/i:s?1:r},v=c>1||a,A=v?Array(d):[];for(;(l=e.indexOf(t,m))>-1;)if(p=Math.min(x(0,l),p),m=l+h,v){let e=0;for(;e<h;)A[l+e]=1,e+=1}m=-1;let y=[],C=1,b=h+d,E=1<<h-1;for(let t=0;t<h;t+=1){let s=0,i=b;for(;s<i;)x(t,f+i)<=p?s=i:b=i,i=Math.floor((b-s)/2+s);b=i;let n=Math.max(1,f-i+1),c=u?d:Math.min(f+i,d)+h,a=Array(c+2);a[c+1]=(1<<t)-1;for(let s=c;s>=n;s-=1){let i=s-1,u=r[e[i]];if(v&&(A[i]=+!!u),a[s]=(a[s+1]<<1|1)&u,t&&(a[s]|=(y[s+1]|y[s])<<1|1|y[s+1]),a[s]&E&&(C=x(t,i))<=p){if(p=C,(m=i)<=f)break;n=Math.max(1,2*f-m)}}if(x(t+1,f)>p)break;y=a}let D={isMatch:m>=0,score:Math.max(.001,C)};if(v){let e=function(e=[],t=g.minMatchCharLength){let r=[],s=-1,i=-1,n=0;for(let u=e.length;n<u;n+=1){let u=e[n];u&&-1===s?s=n:u||-1===s||((i=n-1)-s+1>=t&&r.push([s,i]),s=-1)}return e[n-1]&&n-s>=t&&r.push([s,n-1]),r}(A,c);e.length?a&&(D.indices=e):D.isMatch=!1}return D}(e,t,r,{location:i+f,distance:n,threshold:u,findAllMatches:c,minMatchCharLength:a,includeMatches:s,ignoreLocation:o});p&&(d=!0),h+=m,p&&x&&l.push(...x)});let f={isMatch:d,score:d?h/this.chunks.length:1};return d&&s&&(f.indices=v(l)),f}}class E{constructor(e){this.pattern=e}static isMultiMatch(e){return D(e,this.multiRegex)}static isSingleMatch(e){return D(e,this.singleRegex)}search(e){return{isMatch:!1,score:1}}}function D(e,t){let r=e.match(t);return r?r[1]:null}class M extends E{constructor(e,{location:t=g.location,threshold:r=g.threshold,distance:s=g.distance,includeMatches:i=g.includeMatches,findAllMatches:n=g.findAllMatches,minMatchCharLength:u=g.minMatchCharLength,isCaseSensitive:c=g.isCaseSensitive,ignoreDiacritics:a=g.ignoreDiacritics,ignoreLocation:o=g.ignoreLocation}={}){super(e),this._bitapSearch=new b(e,{location:t,threshold:r,distance:s,includeMatches:i,findAllMatches:n,minMatchCharLength:u,isCaseSensitive:c,ignoreDiacritics:a,ignoreLocation:o})}static get type(){return"fuzzy"}static get multiRegex(){return/^"(.*)"$/}static get singleRegex(){return/^(.*)$/}search(e){return this._bitapSearch.searchIn(e)}}class B extends E{constructor(e){super(e)}static get type(){return"include"}static get multiRegex(){return/^'"(.*)"$/}static get singleRegex(){return/^'(.*)$/}search(e){let t,r=0,s=[],i=this.pattern.length;for(;(t=e.indexOf(this.pattern,r))>-1;)r=t+i,s.push([t,r-1]);let n=!!s.length;return{isMatch:n,score:+!n,indices:s}}}let F=[class extends E{constructor(e){super(e)}static get type(){return"exact"}static get multiRegex(){return/^="(.*)"$/}static get singleRegex(){return/^=(.*)$/}search(e){let t=e===this.pattern;return{isMatch:t,score:+!t,indices:[0,this.pattern.length-1]}}},B,class extends E{constructor(e){super(e)}static get type(){return"prefix-exact"}static get multiRegex(){return/^\^"(.*)"$/}static get singleRegex(){return/^\^(.*)$/}search(e){let t=e.startsWith(this.pattern);return{isMatch:t,score:+!t,indices:[0,this.pattern.length-1]}}},class extends E{constructor(e){super(e)}static get type(){return"inverse-prefix-exact"}static get multiRegex(){return/^!\^"(.*)"$/}static get singleRegex(){return/^!\^(.*)$/}search(e){let t=!e.startsWith(this.pattern);return{isMatch:t,score:+!t,indices:[0,e.length-1]}}},class extends E{constructor(e){super(e)}static get type(){return"inverse-suffix-exact"}static get multiRegex(){return/^!"(.*)"\$$/}static get singleRegex(){return/^!(.*)\$$/}search(e){let t=!e.endsWith(this.pattern);return{isMatch:t,score:+!t,indices:[0,e.length-1]}}},class extends E{constructor(e){super(e)}static get type(){return"suffix-exact"}static get multiRegex(){return/^"(.*)"\$$/}static get singleRegex(){return/^(.*)\$$/}search(e){let t=e.endsWith(this.pattern);return{isMatch:t,score:+!t,indices:[e.length-this.pattern.length,e.length-1]}}},class extends E{constructor(e){super(e)}static get type(){return"inverse-exact"}static get multiRegex(){return/^!"(.*)"$/}static get singleRegex(){return/^!(.*)$/}search(e){let t=-1===e.indexOf(this.pattern);return{isMatch:t,score:+!t,indices:[0,e.length-1]}}},M],k=F.length,S=new Set([M.type,B.type]),_=[];function w(...e){_.push(...e)}function I(e,t){for(let r=0,s=_.length;r<s;r+=1){let s=_[r];if(s.condition(e,t))return new s(e,t)}return new b(e,t)}let j="$and",N="$path",R=e=>!!(e[j]||e.$or),L=e=>({[j]:Object.keys(e).map(t=>({[t]:e[t]}))});function $(e,r,{auto:i=!0}={}){let u=e=>{if(s(e)){let t={keyId:null,pattern:e};return i&&(t.searcher=I(e,r)),t}let c=Object.keys(e),a=!!e[N];if(!a&&c.length>1&&!R(e))return u(L(e));if(!t(e)&&n(e)&&!R(e)){let t=a?e[N]:c[0],n=a?e.$val:e[t];if(!s(n))throw Error(`Invalid value for key ${t}`);let u={keyId:f(t),pattern:n};return i&&(u.searcher=I(n,r)),u}let o={children:[],operator:c[0]};return c.forEach(r=>{let s=e[r];t(s)&&s.forEach(e=>{o.children.push(u(e))})}),o};return R(e)||(e=L(e)),u(e)}function O(e,{ignoreFieldNorm:t=g.ignoreFieldNorm}){let r=1;return e.forEach(({key:e,norm:s,score:i})=>{let n=e?e.weight:null;r*=Math.pow(0===i&&n?Number.EPSILON:i,(n||1)*(t?1:s))}),r}class T{constructor(e){this.limit=e,this.heap=[]}get size(){return this.heap.length}shouldInsert(e){return this.size<this.limit||e<this.heap[0].score}insert(e){this.size<this.limit?(this.heap.push(e),this._bubbleUp(this.size-1)):e.score<this.heap[0].score&&(this.heap[0]=e,this._sinkDown(0))}extractSorted(e){return this.heap.sort(e)}_bubbleUp(e){let t=this.heap;for(;e>0;){let r=e-1>>1;if(t[e].score<=t[r].score)break;let s=t[e];t[e]=t[r],t[r]=s,e=r}}_sinkDown(e){let t=this.heap,r=t.length,s=e;do{let i=2*(e=s)+1,n=2*e+2;if(i<r&&t[i].score>t[s].score&&(s=i),n<r&&t[n].score>t[s].score&&(s=n),s!==e){let r=t[e];t[e]=t[s],t[s]=r}}while(s!==e)}}function z(e,t){let r=e.matches;t.matches=[],u(r)&&r.forEach(e=>{if(!u(e.indices)||!e.indices.length)return;let{indices:r,value:s}=e,i={indices:r,value:s};e.key&&(i.key=e.key.src),e.idx>-1&&(i.refIndex=e.idx),t.matches.push(i)})}function W(e,t){t.score=e.score}let P=/\b\w+\b/g;function U({isCaseSensitive:e=!1,ignoreDiacritics:t=!1}={}){return{tokenize:r=>(e||(r=r.toLowerCase()),t&&(r=C(r)),r.match(P)||[])}}function K(e,t){for(let[r,s]of e.terms){let i=s.filter(e=>e.docIdx!==t),n=s.length-i.length;n>0&&(e.fieldCount-=n,e.df.set(r,(e.df.get(r)||0)-n),0===i.length?(e.terms.delete(r),e.df.delete(r)):e.terms.set(r,i))}}class V{constructor(e,t,r){this.options={...g,...t},this.options.useExtendedSearch,this.options.useTokenSearch,this._keyStore=new l(this.options.keys),this._docs=e,this._myIndex=null,this._invertedIndex=null,this.setCollection(e,r),this._lastQuery=null,this._lastSearcher=null}_getSearcher(e){if(this._lastQuery===e)return this._lastSearcher;let t=I(e,this._invertedIndex?{...this.options,_invertedIndex:this._invertedIndex}:this.options);return this._lastQuery=e,this._lastSearcher=t,t}setCollection(e,t){if(this._docs=e,t&&!(t instanceof m))throw Error("Incorrect 'index' type");if(this._myIndex=t||x(this.options.keys,this._docs,{getFn:this.options.getFn,fieldNormWeight:this.options.fieldNormWeight}),this.options.useTokenSearch){let e=U({isCaseSensitive:this.options.isCaseSensitive,ignoreDiacritics:this.options.ignoreDiacritics});this._invertedIndex=function(e,t,r){let s=new Map,i=new Map,n=0;function u(e,t,u,c){let a=r.tokenize(e);if(!a.length)return;n++;let o=new Map;for(let e of a)o.set(e,(o.get(e)||0)+1);for(let[e,r]of o){let n={docIdx:t,keyIdx:u,subIdx:c,tf:r},a=s.get(e);a||(a=[],s.set(e,a)),a.push(n),i.set(e,(i.get(e)||0)+1)}}for(let r of e){let{i:e,v:s,$:i}=r;if(void 0!==s){u(s,e,-1,-1);continue}if(i)for(let r=0;r<t;r++){let t=i[r];if(t)if(Array.isArray(t))for(let s of t)u(s.v,e,r,s.i??-1);else u(t.v,e,r,-1)}}return{terms:s,fieldCount:n,df:i}}(this._myIndex.records,this._myIndex.keys.length,e)}}add(e){if(u(e)&&(this._docs.push(e),this._myIndex.add(e),this._invertedIndex)){let e=this._myIndex.records[this._myIndex.records.length-1],t=U({isCaseSensitive:this.options.isCaseSensitive,ignoreDiacritics:this.options.ignoreDiacritics});!function(e,t,r,s){let{i:i,v:n,$:u}=t;function c(t,r,n){let u=s.tokenize(t);if(!u.length)return;e.fieldCount++;let c=new Map;for(let e of u)c.set(e,(c.get(e)||0)+1);for(let[t,s]of c){let u={docIdx:i,keyIdx:r,subIdx:n,tf:s},c=e.terms.get(t);c||(c=[],e.terms.set(t,c)),c.push(u),e.df.set(t,(e.df.get(t)||0)+1)}}if(void 0!==n)return c(n,-1,-1);if(u)for(let e=0;e<r;e++){let t=u[e];if(t)if(Array.isArray(t))for(let r of t)c(r.v,e,r.i??-1);else c(t.v,e,-1)}}(this._invertedIndex,e,this._myIndex.keys.length,t)}}remove(e=()=>!1){let t=[],r=[];for(let s=0,i=this._docs.length;s<i;s+=1)e(this._docs[s],s)&&(t.push(this._docs[s]),r.push(s));if(r.length){if(this._invertedIndex)for(let e of r)K(this._invertedIndex,e);for(let e=r.length-1;e>=0;e-=1)this._docs.splice(r[e],1);this._myIndex.removeAll(r)}return t}removeAt(e){this._invertedIndex&&K(this._invertedIndex,e);let t=this._docs.splice(e,1)[0];return this._myIndex.removeAt(e),t}getIndex(){return this._myIndex}search(e,t){let r,{limit:n=-1}=t||{},{includeMatches:u,includeScore:c,shouldSort:a,sortFn:o,ignoreFieldNorm:l}=this.options;if(s(e)&&!e.trim()){let e=this._docs.map((e,t)=>({item:e,refIndex:t}));return i(n)&&n>-1&&(e=e.slice(0,n)),e}if(i(n)&&n>0&&s(e)){let t=new T(n);s(this._docs[0])?this._searchStringList(e,{heap:t,ignoreFieldNorm:l}):this._searchObjectList(e,{heap:t,ignoreFieldNorm:l}),r=t.extractSorted(o)}else!function(e,{ignoreFieldNorm:t=g.ignoreFieldNorm}){e.forEach(e=>{e.score=O(e.matches,{ignoreFieldNorm:t})})}(r=s(e)?s(this._docs[0])?this._searchStringList(e):this._searchObjectList(e):this._searchLogical(e),{ignoreFieldNorm:l}),a&&r.sort(o),i(n)&&n>-1&&(r=r.slice(0,n));return function(e,t,{includeMatches:r=g.includeMatches,includeScore:s=g.includeScore}={}){let i=[];return r&&i.push(z),s&&i.push(W),e.map(e=>{let{idx:r}=e,s={item:t[r],refIndex:r};return i.length&&i.forEach(t=>{t(e,s)}),s})}(r,this._docs,{includeMatches:u,includeScore:c})}_searchStringList(e,{heap:t,ignoreFieldNorm:r}={}){let s=this._getSearcher(e),{records:i}=this._myIndex,n=t?null:[];return i.forEach(({v:e,i:i,n:c})=>{if(!u(e))return;let{isMatch:a,score:o,indices:l}=s.searchIn(e);if(a){let s={item:e,idx:i,matches:[{score:o,value:e,norm:c,indices:l}]};t?(s.score=O(s.matches,{ignoreFieldNorm:r}),t.shouldInsert(s.score)&&t.insert(s)):n.push(s)}}),n}_searchLogical(e){let t=$(e,this.options),r=(e,t,s)=>{if(!("children"in e)){let r,{keyId:i,searcher:n}=e;return(null===i?(r=[],this._myIndex.keys.forEach((e,s)=>{r.push(...this._findMatches({key:e,value:t[s],searcher:n}))})):r=this._findMatches({key:this._keyStore.get(i),value:this._myIndex.getValueForItemAtKeyId(t,i),searcher:n}),r&&r.length)?[{idx:s,item:t,matches:r}]:[]}let{children:i,operator:n}=e,u=[];for(let e=0,c=i.length;e<c;e+=1){let c=r(i[e],t,s);if(c.length)u.push(...c);else if(n===j)return[]}return u},s=this._myIndex.records,i=new Map,n=[];return s.forEach(({$:e,i:s})=>{if(u(e)){let u=r(t,e,s);u.length&&(i.has(s)||(i.set(s,{idx:s,item:e,matches:[]}),n.push(i.get(s))),u.forEach(({matches:e})=>{i.get(s).matches.push(...e)}))}}),n}_searchObjectList(e,{heap:t,ignoreFieldNorm:r}={}){let s=this._getSearcher(e),{keys:i,records:n}=this._myIndex,c=t?null:[];return n.forEach(({$:e,i:n})=>{if(!u(e))return;let a=[],o=!1,l=!1;if(i.forEach((t,r)=>{let i=this._findMatches({key:t,value:e[r],searcher:s});i.length?(a.push(...i),i[0].hasInverse&&(l=!0)):o=!0}),(!l||!o)&&a.length){let s={idx:n,item:e,matches:a};t?(s.score=O(s.matches,{ignoreFieldNorm:r}),t.shouldInsert(s.score)&&t.insert(s)):c.push(s)}}),c}_findMatches({key:e,value:r,searcher:s}){if(!u(r))return[];let i=[];if(t(r))r.forEach(({v:t,i:r,n:n})=>{if(!u(t))return;let{isMatch:c,score:a,indices:o,hasInverse:l}=s.searchIn(t);c&&i.push({score:a,key:e,value:t,idx:r,norm:n,indices:o,hasInverse:l})});else{let{v:t,n:n}=r,{isMatch:u,score:c,indices:a,hasInverse:o}=s.searchIn(t);u&&i.push({score:c,key:e,value:t,norm:n,indices:a,hasInverse:o})}return i}}V.version="7.3.0",V.createIndex=x,V.parseIndex=function(e,{getFn:t=g.getFn,fieldNormWeight:r=g.fieldNormWeight}={}){let{keys:s,records:i}=e,n=new m({getFn:t,fieldNormWeight:r});return n.setKeys(s),n.setIndexRecords(i),n},V.config=g,V.match=function(e,t,r){return I(e,{...g,...r}).searchIn(t)},V.parseQuery=$,w(class{constructor(e,{isCaseSensitive:t=g.isCaseSensitive,ignoreDiacritics:r=g.ignoreDiacritics,includeMatches:s=g.includeMatches,minMatchCharLength:i=g.minMatchCharLength,ignoreLocation:n=g.ignoreLocation,findAllMatches:u=g.findAllMatches,location:c=g.location,threshold:a=g.threshold,distance:o=g.distance}={}){this.query=null,this.options={isCaseSensitive:t,ignoreDiacritics:r,includeMatches:s,minMatchCharLength:i,findAllMatches:u,ignoreLocation:n,location:c,threshold:a,distance:o},e=t?e:e.toLowerCase(),e=r?C(e):e,this.pattern=e,this.query=function(e,t={}){return e.replace(/\\\|/g,"\0").split("|").map(e=>{let r=(function(e){let t=[],r=e.length,s=0;for(;s<r;){for(;s<r&&" "===e[s];)s++;if(s>=r)break;let i=s;for(;i<r&&" "!==e[i]&&'"'!==e[i];)i++;if(i<r&&'"'===e[i]){for(i++;i<r;){if('"'===e[i]){let t=i+1;if(t>=r||" "===e[t]){i++;break}if("$"===e[t]&&(t+1>=r||" "===e[t+1])){i+=2;break}}i++}t.push(e.substring(s,i)),s=i}else{for(;i<r&&" "!==e[i];)i++;t.push(e.substring(s,i)),s=i}}return t})(e.replace(/\u0000/g,"|").trim()).filter(e=>e&&!!e.trim()),s=[];for(let e=0,i=r.length;e<i;e+=1){let i=r[e],n=!1,u=-1;for(;!n&&++u<k;){let e=F[u],r=e.isMultiMatch(i);r&&(s.push(new e(r,t)),n=!0)}if(!n)for(u=-1;++u<k;){let e=F[u],r=e.isSingleMatch(i);if(r){s.push(new e(r,t));break}}}return s})}(this.pattern,this.options)}static condition(e,t){return t.useExtendedSearch}searchIn(e){let t=this.query;if(!t)return{isMatch:!1,score:1};let{includeMatches:r,isCaseSensitive:s,ignoreDiacritics:i}=this.options;e=s?e:e.toLowerCase(),e=i?C(e):e;let n=0,u=[],c=0,a=!1;for(let s=0,i=t.length;s<i;s+=1){let i=t[s];u.length=0,n=0,a=!1;for(let t=0,s=i.length;t<s;t+=1){let s=i[t],{isMatch:o,indices:l,score:h}=s.search(e);if(o){n+=1,c+=h;let e=s.constructor.type;e.startsWith("inverse")&&(a=!0),r&&(S.has(e)?u.push(...l):u.push(l))}else{c=0,n=0,u.length=0,a=!1;break}}if(n){let e={isMatch:!0,score:c/n};return a&&(e.hasInverse=!0),r&&(e.indices=v(u)),e}}return{isMatch:!1,score:1}}}),w(class{static condition(e,t){return t.useTokenSearch}constructor(e,t){this.options=t,this.analyzer=U({isCaseSensitive:t.isCaseSensitive,ignoreDiacritics:t.ignoreDiacritics});const r=this.analyzer.tokenize(e),{df:s,fieldCount:i}=t._invertedIndex;for(const e of(this.termSearchers=[],this.idfWeights=[],r)){this.termSearchers.push(new b(e,{location:t.location,threshold:t.threshold,distance:t.distance,includeMatches:t.includeMatches,findAllMatches:t.findAllMatches,minMatchCharLength:t.minMatchCharLength,isCaseSensitive:t.isCaseSensitive,ignoreDiacritics:t.ignoreDiacritics,ignoreLocation:!0}));const r=s.get(e)||0,n=Math.log(1+(i-r+.5)/(r+.5));this.idfWeights.push(n)}}searchIn(e){if(!this.termSearchers.length)return{isMatch:!1,score:1};let t=[],r=0,s=0,i=0;for(let n=0;n<this.termSearchers.length;n++){let u=this.termSearchers[n].searchIn(e),c=this.idfWeights[n];s+=c,u.isMatch&&(i++,r+=c*(1-u.score),u.indices&&t.push(...u.indices))}if(0===i)return{isMatch:!1,score:1};let n={isMatch:!0,score:Math.max(.001,s>0?1-r/s:0)};return this.options.includeMatches&&t.length&&(n.indices=v(t)),n}}),V.use=function(...e){e.forEach(e=>w(e))},e.s(["default",0,V])}]);
@@ -1 +0,0 @@
1
- (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,449636,e=>{"use strict";var t=e.i(289721),s=e.i(965652),r=e.i(533499),a=e.i(514798);let n=(0,a.createServerReference)("005c435931ab272868e674f977a37a5d3a28e828aa",a.callServer,void 0,a.findSourceMapURL,"getActiveExecutionsAcrossWorkspaces");var i=e.i(74593),l=e.i(58308),o=e.i(483361),c=e.i(865514),d=e.i(776639),m=e.i(624687),u=e.i(519455),x=e.i(400355),h=e.i(360112),p=e.i(100839);function g({open:e,onOpenChange:a,taskId:n,files:i,onCommitted:l}){let{t:o}=(0,r.useI18n)(),[c,f]=(0,s.useState)(""),[j,k]=(0,s.useState)(!1);(0,s.useEffect)(()=>{e&&f("")},[e]);let b=async()=>{if(c.trim()){k(!0);try{await (0,p.commitWorktreeChanges)(n,c.trim()),a(!1),l()}catch(e){h.toast.error(e instanceof Error?e.message:String(e))}finally{k(!1)}}};return(0,t.jsx)(d.Dialog,{open:e,onOpenChange:a,children:(0,t.jsxs)(d.DialogContent,{className:"sm:max-w-md",children:[(0,t.jsx)(d.DialogHeader,{children:(0,t.jsx)(d.DialogTitle,{children:o("missions.completeCommitTitle")})}),(0,t.jsx)("p",{className:"text-sm text-muted-foreground",children:o("missions.completeCommitDesc",{count:String(i.length)})}),(0,t.jsx)("div",{className:"max-h-32 overflow-y-auto rounded-lg border border-border bg-muted/30 p-2",children:i.map(e=>(0,t.jsx)("code",{className:"block truncate text-xs text-muted-foreground",children:e},e))}),(0,t.jsx)(m.Textarea,{value:c,onChange:e=>f(e.target.value),placeholder:o("missions.completeCommitPlaceholder"),rows:3,autoFocus:!0}),(0,t.jsxs)(d.DialogFooter,{children:[(0,t.jsx)(u.Button,{variant:"ghost",onClick:()=>a(!1),disabled:j,children:o("common.cancel")}),(0,t.jsxs)(u.Button,{onClick:b,disabled:j||!c.trim(),children:[j&&(0,t.jsx)(x.Loader2,{className:"h-3.5 w-3.5 animate-spin"}),o("missions.completeCommitSubmit")]})]})]})})}let f=[{id:"1x1",label:"1×1",cols:1,rows:1,minHeight:"480px",desc:"Focus mode"},{id:"2x1",label:"2×1",cols:2,rows:1,minHeight:"480px",desc:"Side by side"},{id:"3x2",label:"3×2",cols:3,rows:2,minHeight:"300px",desc:"Default"},{id:"2x2",label:"2×2",cols:2,rows:2,minHeight:"300px",desc:"Balanced"},{id:"4x2",label:"4×2",cols:4,rows:2,minHeight:"240px",desc:"Wide monitor"},{id:"3x3",label:"3×3",cols:3,rows:3,minHeight:"240px",desc:"Max overview"}];var j=e.i(967489),k=e.i(912505),b=e.i(572989);let v=(0,b.default)("rocket",[["path",{d:"M12 15v5s3.03-.55 4-2c1.08-1.62 0-5 0-5",key:"qeys4"}],["path",{d:"M4.5 16.5c-1.5 1.26-2 5-2 5s3.74-.5 5-2c.71-.84.7-2.13-.09-2.91a2.18 2.18 0 0 0-2.91-.09",key:"u4xsad"}],["path",{d:"M9 12a22 22 0 0 1 2-3.95A12.88 12.88 0 0 1 22 2c0 2.72-.78 7.5-6 11a22.4 22.4 0 0 1-4 2z",key:"676m9"}],["path",{d:"M9 12H4s.55-3.03 2-4c1.62-1.08 5 .05 5 .05",key:"92ym6u"}]]);var w=e.i(360325),N=e.i(746798),y=e.i(404122);function C({cols:e,rows:s,active:r}){let a=Array.from({length:e*s});return(0,t.jsx)("div",{className:`grid gap-[1px] w-7 h-5 p-[3px] rounded-sm border shrink-0 ${r?"border-primary bg-primary/10":"border-border bg-muted"}`,style:{gridTemplateColumns:`repeat(${e}, 1fr)`,gridTemplateRows:`repeat(${s}, 1fr)`},children:a.map((e,s)=>(0,t.jsx)("div",{className:`rounded-[1px] min-w-0 min-h-0 ${r?"bg-primary":"bg-muted-foreground/40"}`},s))})}let S="custom";function I({value:e,customValue:a,onChange:n}){let{t:i}=(0,r.useI18n)(),[l,o]=(0,s.useState)(!1),c=(0,s.useRef)(null),d=e===S,m=d?null:f.find(t=>t.id===e)??f[2],[x,h]=(0,s.useState)(a?.cols??2),[p,g]=(0,s.useState)(a?.rows??2),[j,k]=(0,s.useState)({minCols:1,maxCols:5,minRows:1,maxRows:5});(0,s.useEffect)(()=>{(0,y.getConfigValues)(["missions.grid.minCols","missions.grid.maxCols","missions.grid.minRows","missions.grid.maxRows"]).then(e=>{k({minCols:e["missions.grid.minCols"]??1,maxCols:e["missions.grid.maxCols"]??5,minRows:e["missions.grid.minRows"]??1,maxRows:e["missions.grid.maxRows"]??5})})},[]),(0,s.useEffect)(()=>{a&&(h(a.cols),g(a.rows))},[a?.cols,a?.rows]),(0,s.useEffect)(()=>{if(l)return document.addEventListener("mousedown",e),()=>document.removeEventListener("mousedown",e);function e(e){c.current&&!c.current.contains(e.target)&&o(!1)}},[l]);let b=(e,t,s)=>Math.max(t,Math.min(s,e)),v=d?x:m?.cols??2,w=d?p:m?.rows??2,N=d?`${x}\xd7${p}`:m?.label??"";return(0,t.jsxs)("div",{ref:c,className:"relative",children:[(0,t.jsxs)(u.Button,{variant:"outline",onClick:()=>o(e=>!e),className:"gap-2",children:[(0,t.jsx)(C,{cols:v,rows:w,active:!1}),(0,t.jsx)("span",{children:N}),(0,t.jsx)("span",{className:"text-[10px] text-muted-foreground",children:"▼"})]}),l&&(0,t.jsxs)("div",{className:"absolute right-0 z-50 mt-1 w-72 rounded-lg border border-border bg-popover shadow-xl p-3",children:[(0,t.jsx)("h5",{className:"text-sm font-semibold text-foreground mb-3",children:i("missions.gridPreset")}),(0,t.jsxs)("div",{className:"flex flex-col gap-0.5",children:[f.map(s=>{let r=s.id===e;return(0,t.jsxs)("button",{onClick:()=>{n(s.id),o(!1)},className:`flex items-center gap-3 px-3 py-2.5 rounded-lg transition-colors ${r?"bg-primary/10":"hover:bg-accent"}`,children:[(0,t.jsx)(C,{cols:s.cols,rows:s.rows,active:r}),(0,t.jsx)("span",{className:`text-sm font-medium flex-1 text-left ${r?"text-primary":"text-foreground"}`,children:s.label}),(0,t.jsx)("span",{className:`text-xs ${r?"text-primary/60":"text-muted-foreground"}`,children:s.desc})]},s.id)}),(0,t.jsxs)("div",{className:"mt-1 border-t border-border pt-2",children:[(0,t.jsxs)("button",{onClick:()=>{d||n(S,{cols:x,rows:p})},className:`flex items-center gap-3 px-3 py-2.5 rounded-lg transition-colors w-full ${d?"bg-primary/10":"hover:bg-accent"}`,children:[(0,t.jsx)(C,{cols:x,rows:p,active:d}),(0,t.jsx)("span",{className:`text-sm font-medium flex-1 text-left ${d?"text-primary":"text-foreground"}`,children:i("missions.gridCustom")}),(0,t.jsxs)("span",{className:`text-xs ${d?"text-primary/60":"text-muted-foreground"}`,children:[x,"×",p]})]}),d&&(0,t.jsxs)("div",{className:"flex items-center gap-3 px-3 py-2",children:[(0,t.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,t.jsx)("label",{className:"text-xs text-muted-foreground",children:i("missions.gridCols")}),(0,t.jsx)("input",{type:"number",min:j.minCols,max:j.maxCols,value:x,onChange:e=>{let t;h(t=b(Number(e.target.value),j.minCols,j.maxCols)),n(S,{cols:t,rows:p})},className:"h-7 w-14 rounded-md border border-border bg-background px-2 text-sm text-center"})]}),(0,t.jsx)("span",{className:"text-muted-foreground",children:"×"}),(0,t.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,t.jsx)("label",{className:"text-xs text-muted-foreground",children:i("missions.gridRows")}),(0,t.jsx)("input",{type:"number",min:j.minRows,max:j.maxRows,value:p,onChange:e=>{let t;g(t=b(Number(e.target.value),j.minRows,j.maxRows)),n(S,{cols:x,rows:t})},className:"h-7 w-14 rounded-md border border-border bg-background px-2 text-sm text-center"})]})]})]})]})]})]})}var T=e.i(585012),R=e.i(670123),M=e.i(759684);let E="123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ";function A(e,t,s){return t<=0?0:((e+s)%t+t)%t}function L({open:e,panes:a,selectedIndex:n,onSelect:i,onClose:l}){let{t:o}=(0,r.useI18n)();return((0,s.useEffect)(()=>{if(e)return window.addEventListener("keydown",t,{capture:!0}),()=>window.removeEventListener("keydown",t,{capture:!0});function t(e){if("Escape"===e.key){e.preventDefault(),e.stopPropagation(),l();return}if(e.metaKey||e.ctrlKey||e.altKey||/^[0-9]$/.test(e.key))return;let t=function(e){if(1!==e.length)return null;let t=E.indexOf(e.toUpperCase());return -1===t?null:t}(e.key);null===t||t>=a.length||(e.preventDefault(),e.stopPropagation(),i(t))}},[e,a.length,i,l]),!e||"u"<typeof document)?null:(0,T.createPortal)((0,t.jsxs)("div",{className:"fixed inset-0 z-50",children:[(0,t.jsx)("div",{className:"absolute inset-0 bg-black/10 supports-backdrop-filter:backdrop-blur-xs",onClick:l}),(0,t.jsxs)("div",{role:"dialog","aria-modal":"true",className:"fixed top-1/2 left-1/2 z-50 w-full max-w-[calc(100%-2rem)] sm:max-w-5xl -translate-x-1/2 -translate-y-1/2 rounded-xl bg-popover p-4 text-sm text-popover-foreground ring-1 ring-foreground/10 outline-none",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2 pr-8",children:[(0,t.jsx)("span",{className:"font-heading text-base font-medium leading-none",children:o("missions.selector.title")}),(0,t.jsx)("span",{className:"rounded-md bg-muted px-1.5 py-0.5 text-xs font-mono font-medium text-muted-foreground",children:a.length}),(0,t.jsx)("span",{className:"ml-1 truncate text-xs text-muted-foreground",children:o("missions.selector.hint")})]}),(0,t.jsx)(u.Button,{variant:"ghost",size:"icon-sm",className:"absolute top-2 right-2",onClick:l,"aria-label":o("missions.launcher.cancel"),children:(0,t.jsx)(R.XIcon,{})}),(0,t.jsx)(M.ScrollArea,{className:"mt-4 max-h-[60vh]",children:(0,t.jsx)("div",{className:"grid grid-cols-2 sm:grid-cols-3 lg:grid-cols-4 gap-3 pr-3",children:a.map((e,s)=>{let r=s<0||s>=E.length?null:E[s],a=s===n;return(0,t.jsxs)("button",{type:"button",onClick:()=>i(s),className:["flex flex-col gap-2 rounded-lg border bg-card p-3 text-left transition-all hover:border-primary/40 hover:bg-accent/50",a?"border-primary ring-2 ring-inset ring-primary":"border-border"].join(" "),children:[(0,t.jsxs)("span",{className:"block w-full truncate text-[11px] text-muted-foreground",title:`${e.workspaceName} › ${e.projectAlias||e.projectName}`,children:[e.workspaceName," ›"," ",e.projectAlias||e.projectName]}),(0,t.jsx)("div",{className:"flex items-center justify-center py-2",children:(0,t.jsx)("span",{className:["flex h-12 w-12 items-center justify-center rounded-md border text-2xl font-semibold tabular-nums",a?"bg-primary text-primary-foreground border-primary":"bg-muted/80 text-foreground border-border"].join(" "),children:r??"·"})}),(0,t.jsx)("span",{className:"line-clamp-2 text-sm font-medium text-foreground",children:e.taskTitle})]},e.executionId)})})})]})]}),document.body)}var P=e.i(720247),B=e.i(775712),D=e.i(538059),$=e.i(67013);let O=(0,b.default)("grip-vertical",[["circle",{cx:"9",cy:"12",r:"1",key:"1vctgf"}],["circle",{cx:"9",cy:"5",r:"1",key:"hp0tcf"}],["circle",{cx:"9",cy:"19",r:"1",key:"fkjjf6"}],["circle",{cx:"15",cy:"12",r:"1",key:"1tmaij"}],["circle",{cx:"15",cy:"5",r:"1",key:"19l28e"}],["circle",{cx:"15",cy:"19",r:"1",key:"f4zoj3"}]]),z=(0,b.default)("arrow-up-right",[["path",{d:"M7 7h10v10",key:"1tivn9"}],["path",{d:"M7 17 17 7",key:"1vkiza"}]]);var H=e.i(657153);let W=(0,b.default)("square-terminal",[["path",{d:"m7 11 2-2-2-2",key:"1lz0vl"}],["path",{d:"M11 13h4",key:"1p7l4v"}],["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",ry:"2",key:"1m3agn"}]]);var F=e.i(597746),U=e.i(487486),V=e.i(184331),K=e.i(83434);function _({startedAt:e,paused:r}){let[a,n]=(0,s.useState)(()=>e?Math.floor((Date.now()-new Date(e).getTime())/1e3):0);(0,s.useEffect)(()=>{if(r)return;let t=setInterval(()=>{n(e?Math.floor((Date.now()-new Date(e).getTime())/1e3):0)},1e3);return()=>clearInterval(t)},[e,r]);let i=Math.floor(a/60);return(0,t.jsxs)("span",{className:"text-[11px] text-muted-foreground ml-1 shrink-0",children:[i,"m ",a%60,"s"]})}function G({execution:e,isRemoving:s,removeReason:a,onStop:n,onComplete:i,onSessionEnd:l,index:o,onRegisterControls:c}){let{t:d}=(0,r.useI18n)(),m=(0,D.useRouter)(),{attributes:x,listeners:p,setNodeRef:g,transform:f,transition:j}=(0,B.useSortable)({id:e.executionId}),k={transform:$.CSS.Transform.toString(f),transition:j,opacity:+!s};async function b(){let t=e.worktreePath??e.projectLocalPath;if(!t)return;let s=e.subPath?`${t}/${e.subPath}`:t;try{await (0,V.openInTerminal)(s)}catch{h.toast.error(d("preview.terminalError"))}}return(0,t.jsxs)("div",{ref:g,style:k,"data-pane-index":o,className:"border border-border rounded-lg overflow-hidden flex flex-col transition-opacity duration-300",...x,children:[(0,t.jsxs)("div",{className:"h-10 px-3 flex items-center gap-1 border-b border-border bg-card shrink-0",children:[(0,t.jsx)("button",{...p,"aria-label":d("missions.dragHandle"),"aria-roledescription":"sortable",className:"cursor-grab text-muted-foreground hover:text-foreground mr-1",children:(0,t.jsx)(O,{className:"h-3.5 w-3.5"})}),(0,t.jsxs)("div",{className:"flex items-center gap-1 min-w-0 flex-1 text-[11px] text-muted-foreground",children:[(0,t.jsxs)("span",{className:"truncate max-w-[45%] shrink-0",title:`${e.workspaceName} › ${e.projectAlias||e.projectName}`,children:[e.workspaceName," ›"," ",e.projectAlias||e.projectName]}),(0,t.jsx)("span",{className:"shrink-0",children:"›"}),(0,t.jsx)("span",{className:"text-foreground font-semibold truncate min-w-0 flex-1",title:e.taskTitle,children:e.taskTitle})]}),s?(0,t.jsx)(U.Badge,{variant:"outline",className:"text-[11px] text-muted-foreground bg-muted ml-1 shrink-0",children:"stopped"===a?d("missions.statusStopped"):d("missions.statusCompleted")}):(0,t.jsx)(U.Badge,{variant:"outline",className:"text-[11px] text-primary border-primary/30 bg-primary/10 ml-1 shrink-0",children:d("missions.statusRunning")}),(0,t.jsx)(_,{startedAt:e.startedAt,paused:s}),e.projectLocalPath&&(0,t.jsxs)(N.Tooltip,{children:[(0,t.jsx)(N.TooltipTrigger,{render:(0,t.jsx)(u.Button,{variant:"ghost",size:"icon",className:"ml-1 shrink-0 text-muted-foreground",onClick:b}),children:(0,t.jsx)(W,{className:"h-3.5 w-3.5"})}),(0,t.jsx)(N.TooltipContent,{children:d("missions.openInTerminal")})]}),(0,t.jsxs)(N.Tooltip,{children:[(0,t.jsx)(N.TooltipTrigger,{render:(0,t.jsx)(u.Button,{variant:"ghost",size:"icon",className:"ml-1 shrink-0 text-muted-foreground",onClick:()=>m.push(`/workspaces/${e.workspaceId}/tasks/${e.taskId}`)}),children:(0,t.jsx)(z,{className:"h-3.5 w-3.5"})}),(0,t.jsx)(N.TooltipContent,{children:d("missions.openFullView")})]}),(0,t.jsxs)(N.Tooltip,{children:[(0,t.jsx)(N.TooltipTrigger,{render:(0,t.jsx)(u.Button,{variant:"ghost",size:"icon",className:"ml-1 shrink-0 text-emerald-500 hover:text-emerald-500",onClick:()=>i(e),disabled:s}),children:(0,t.jsx)(F.Check,{className:"h-3.5 w-3.5"})}),(0,t.jsx)(N.TooltipContent,{children:d("missions.completeTask")})]}),(0,t.jsxs)(N.Tooltip,{children:[(0,t.jsx)(N.TooltipTrigger,{render:(0,t.jsx)(u.Button,{variant:"destructive",size:"icon",className:"ml-1 shrink-0",onClick:()=>n(e.taskId),disabled:s}),children:(0,t.jsx)(H.X,{className:"h-3.5 w-3.5"})}),(0,t.jsx)(N.TooltipContent,{children:d("missions.stopTask")})]})]}),(0,t.jsx)("div",{className:"relative flex-1 overflow-hidden",children:(0,t.jsx)(K.TerminalOutlet,{taskId:e.taskId,worktreePath:e.worktreePath??e.projectLocalPath??"",onSessionEnd:t=>l?.(e.taskId,t),onReady:t=>c(e.taskId,t)})})]})}var X=e.i(169751);let q=(0,a.createServerReference)("006389a16e7883de77d87812fd40e182aee5a45e3f",a.callServer,void 0,a.findSourceMapURL,"getWorkspacesWithActiveTasks");var J=e.i(942213),Q=e.i(929127),Y=e.i(793479),Z=e.i(232280),ee=e.i(19671),et=e.i(368490);let es=(0,b.default)("layout-dashboard",[["rect",{width:"7",height:"9",x:"3",y:"3",rx:"1",key:"10lvy0"}],["rect",{width:"7",height:"5",x:"14",y:"3",rx:"1",key:"16une8"}],["rect",{width:"7",height:"9",x:"14",y:"12",rx:"1",key:"1hutg5"}],["rect",{width:"7",height:"5",x:"3",y:"16",rx:"1",key:"ldoo1y"}]]),er=(0,b.default)("play",[["path",{d:"M5 5a2 2 0 0 1 3.008-1.728l11.997 6.998a2 2 0 0 1 .003 3.458l-12 7A2 2 0 0 1 5 19z",key:"10ikf1"}]]);var ea=e.i(922541),en=e.i(738690);function ei(e){return(e.labels?.length??0)>0}let el={TODO:"TODO",IN_PROGRESS:"Running",IN_REVIEW:"Review"},eo={LOW:"Low",MEDIUM:"Med",HIGH:"High",CRITICAL:"Crit"};function ec({status:e}){return(0,t.jsx)("span",{className:`text-[10px] px-1.5 py-0.5 rounded font-medium ${{TODO:"bg-slate-100 text-slate-600 dark:bg-slate-800 dark:text-slate-400",IN_PROGRESS:"bg-blue-100 text-blue-700 dark:bg-blue-900/30 dark:text-blue-400",IN_REVIEW:"bg-amber-100 text-amber-700 dark:bg-amber-900/30 dark:text-amber-400"}[e]??"bg-slate-100 text-slate-600"}`,children:el[e]??e})}function ed({task:e,isRunning:s,launchingId:r,onLaunchNew:a,onResume:n,t:i}){let l=e.executions?.[0]?.sessionId,o=r===e.id;return(0,t.jsxs)("div",{className:"group/task grid grid-cols-[minmax(0,1fr)_auto] items-center gap-2 px-3 py-1.5 hover:bg-accent/50 cursor-default",children:[(0,t.jsxs)("div",{className:"min-w-0",children:[(0,t.jsx)("p",{className:`text-sm truncate ${s?"italic text-muted-foreground":""}`,children:e.title}),(0,t.jsxs)("div",{className:"flex items-center gap-1.5 mt-0.5",children:[(0,t.jsx)(ec,{status:e.status}),(0,t.jsx)("span",{className:"text-[10px] text-muted-foreground",children:eo[e.priority]??e.priority})]})]}),s?(0,t.jsx)("span",{className:"text-[10px] italic text-muted-foreground",children:i("missions.alreadyMonitored")}):(0,t.jsxs)("div",{className:"flex items-center gap-1 opacity-0 group-hover/task:opacity-100 transition-opacity",children:[l&&(0,t.jsxs)(u.Button,{variant:"outline",className:"h-6 px-2 text-xs",onClick:()=>n(e.id,l),disabled:o,title:i("missions.continueSession"),children:[(0,t.jsx)(ea.RotateCcw,{className:"h-3 w-3 mr-1"}),i("missions.continueLabel")]}),(0,t.jsxs)(u.Button,{variant:"outline",className:"h-6 px-2 text-xs",onClick:()=>a(e.id),disabled:o,title:i("missions.launchNew"),children:[(0,t.jsx)(er,{className:"h-3 w-3 mr-1"}),o?"...":i("missions.launchNewLabel")]})]})]})}function em({task:e,isRunning:s,launchingId:r,onLaunchNew:a,onResume:n,t:i}){let l=e.executions?.[0]?.sessionId,o=r===e.id;return(0,t.jsx)("div",{className:"shrink-0 border-b bg-muted/40 px-3 py-2",children:(0,t.jsxs)("div",{className:"flex items-center justify-between gap-2",children:[(0,t.jsxs)("div",{className:"flex min-w-0 items-center gap-1.5",children:[(0,t.jsx)(es,{className:"h-3.5 w-3.5 shrink-0 text-muted-foreground"}),(0,t.jsx)("span",{className:"truncate text-xs font-medium",children:i("missions.workbench.title")})]}),s?(0,t.jsx)("span",{className:"text-[10px] italic text-muted-foreground",children:i("missions.alreadyMonitored")}):(0,t.jsxs)("div",{className:"flex items-center gap-1",children:[l&&(0,t.jsxs)(u.Button,{variant:"outline",className:"h-6 px-2 text-xs",onClick:()=>n(e.id,l),disabled:o,title:i("missions.continueSession"),children:[(0,t.jsx)(ea.RotateCcw,{className:"h-3 w-3 mr-1"}),i("missions.continueLabel")]}),(0,t.jsxs)(u.Button,{variant:"outline",className:"h-6 px-2 text-xs",onClick:()=>a(e.id),disabled:o,title:i("missions.launchNew"),children:[(0,t.jsx)(er,{className:"h-3 w-3 mr-1"}),o?"...":i("missions.launchNewLabel")]})]})]})})}function eu({open:e,onOpenChange:a,onLaunched:n,runningTaskIds:i=new Set}){let{t:l}=(0,r.useI18n)(),[o,c]=(0,s.useState)([]),[m,p]=(0,s.useState)(!1),[g,f]=(0,s.useState)(null),[j,k]=(0,s.useState)(""),[b,v]=(0,s.useState)(new Set),[w,N]=(0,s.useState)(""),[y,C]=(0,s.useState)(0),S=(0,s.useMemo)(()=>o.map(e=>({...e,projects:e.projects.filter(e=>e.tasks.length>0)})).filter(e=>e.projects.length>0),[o]);(0,s.useEffect)(()=>{e&&(p(!0),k(""),C(0),q().then(e=>{c(e);let t=e.map(e=>({...e,projects:e.projects.filter(e=>e.tasks.length>0)})).find(e=>e.projects.length>0);v(t?new Set([t.id]):new Set),N(t?.projects[0]?.id??"")}).catch(()=>h.toast.error(l("missions.error.launchFailed"))).finally(()=>p(!1)))},[e,l]);let I=(0,s.useCallback)(e=>{v(t=>{let s=new Set(t);return s.has(e)?s.delete(e):s.add(e),s})},[]),T=(0,s.useCallback)(e=>{N(e),C(0)},[]),R=(0,s.useMemo)(()=>{let e=[];for(let t of S)for(let s of t.projects)for(let r of s.tasks)e.push({task:r,workspaceName:t.name,projectName:s.alias??s.name,projectId:s.id});return e},[S]),E=(0,s.useMemo)(()=>new X.default(R,{keys:["task.title"],threshold:.4,distance:200}),[R]),A=j.trim().length>0,L=(0,s.useMemo)(()=>{let e=j.trim();if(!e)return[];let t=E.search(e).map(e=>e.item),s=[],r=new Map;for(let e of t){let t=r.get(e.projectId);t||(t={workspaceName:e.workspaceName,projectName:e.projectName,tasks:[]},r.set(e.projectId,t),s.push(e.projectId)),t.tasks.push(e.task)}return s.map(e=>({id:e,...r.get(e)}))},[E,j]),P=(0,s.useMemo)(()=>R.length?S.flatMap(e=>e.projects).find(e=>e.id===w):void 0,[S,w,R.length]),B=(0,s.useMemo)(()=>P?.tasks.find(ei),[P]),D=(0,s.useMemo)(()=>P?.tasks.filter(e=>!ei(e))??[],[P]),$=Math.max(1,Math.ceil(D.length/10)),O=Math.min(y,$-1),z=D.slice(10*O,10*O+10),W=(0,s.useCallback)(async e=>{try{f(e),await (0,J.startPtyExecution)(e,""),n(e),a(!1)}catch{h.toast.error(l("missions.error.launchFailed"))}finally{f(null)}},[n,a,l]),F=(0,s.useCallback)(async(e,t)=>{try{f(e),await (0,Q.resumePtyExecution)(e,t),n(e),a(!1)}catch{h.toast.error(l("missions.error.launchFailed"))}finally{f(null)}},[n,a,l]);return(0,t.jsx)(d.Dialog,{open:e,onOpenChange:a,children:(0,t.jsxs)(d.DialogContent,{className:"sm:max-w-3xl flex h-[80vh] max-h-[640px] flex-col gap-0 overflow-hidden p-0",children:[(0,t.jsx)(d.DialogHeader,{className:"shrink-0 border-b px-4 py-3",children:(0,t.jsx)(d.DialogTitle,{children:l("missions.launchTask")})}),(0,t.jsx)("div",{className:"shrink-0 border-b px-4 py-3",children:(0,t.jsxs)("div",{className:"relative",children:[(0,t.jsx)(en.Search,{className:"absolute left-2 top-1/2 -translate-y-1/2 h-4 w-4 text-muted-foreground"}),(0,t.jsx)(Y.Input,{value:j,onChange:e=>k(e.target.value),placeholder:l("missions.fullPicker.searchPlaceholder"),className:"pl-8 pr-8 h-8"}),j&&(0,t.jsx)(u.Button,{type:"button",variant:"ghost",size:"icon",className:"absolute right-1 top-1/2 -translate-y-1/2 h-6 w-6",onClick:()=>k(""),"aria-label":l("missions.fullPicker.clearSearch"),children:(0,t.jsx)(H.X,{className:"h-3.5 w-3.5"})})]})}),m?(0,t.jsx)("div",{className:"flex flex-1 items-center justify-center text-muted-foreground",children:(0,t.jsx)(x.Loader2,{className:"h-5 w-5 animate-spin"})}):0===S.length?(0,t.jsx)("div",{className:"flex flex-1 items-center justify-center text-sm text-muted-foreground",children:l("missions.noAvailableTasks")}):A?(0,t.jsx)(M.ScrollArea,{className:"flex-1 min-h-0",children:0===L.length?(0,t.jsx)("p",{className:"text-sm text-muted-foreground text-center py-8",children:l("missions.fullPicker.noSearchResults")}):(0,t.jsx)("div",{className:"py-1",children:L.map(e=>(0,t.jsxs)("div",{children:[(0,t.jsxs)("div",{className:"px-3 pt-2 pb-1 text-[11px] font-medium text-muted-foreground",children:[e.workspaceName," · ",e.projectName]}),e.tasks.map(e=>(0,t.jsx)(ed,{task:e,isRunning:i.has(e.id),launchingId:g,onLaunchNew:W,onResume:F,t:l},e.id))]},e.id))})}):(0,t.jsxs)("div",{className:"flex flex-1 min-h-0",children:[(0,t.jsx)("aside",{className:"w-52 shrink-0 border-r",children:(0,t.jsx)(M.ScrollArea,{className:"h-full",children:(0,t.jsx)("div",{className:"py-1",children:S.map(e=>{let s=b.has(e.id);return(0,t.jsxs)("div",{children:[(0,t.jsxs)(u.Button,{variant:"ghost",onClick:()=>I(e.id),className:"flex h-auto w-full justify-start gap-1 rounded-none px-2 py-1.5 hover:bg-accent",children:[s?(0,t.jsx)(Z.ChevronDown,{className:"h-3.5 w-3.5 shrink-0 text-muted-foreground"}):(0,t.jsx)(et.ChevronRight,{className:"h-3.5 w-3.5 shrink-0 text-muted-foreground"}),(0,t.jsx)("span",{className:"truncate text-[11px] font-semibold uppercase tracking-wider text-muted-foreground",children:e.name})]}),s&&e.projects.map(e=>{let s=e.id===w;return(0,t.jsxs)(u.Button,{variant:"ghost",onClick:()=>T(e.id),className:`flex h-auto w-full justify-start gap-2 rounded-none py-1.5 pl-7 pr-2 hover:bg-accent ${s?"bg-accent":""}`,children:[(0,t.jsx)("span",{className:"min-w-0 flex-1 truncate text-left text-xs font-medium",children:e.alias??e.name}),(0,t.jsx)("span",{className:"shrink-0 text-[10px] text-muted-foreground",children:e._count.tasks})]},e.id)})]},e.id)})})})}),(0,t.jsxs)("div",{className:"flex min-w-0 flex-1 flex-col",children:[B&&(0,t.jsx)(em,{task:B,isRunning:i.has(B.id),launchingId:g,onLaunchNew:W,onResume:F,t:l}),(0,t.jsx)(M.ScrollArea,{className:"flex-1 min-h-0",children:0===z.length?(0,t.jsx)("p",{className:"text-sm text-muted-foreground text-center py-8",children:l("missions.launcher.noTasks")}):(0,t.jsx)("div",{className:"py-1",children:z.map(e=>(0,t.jsx)(ed,{task:e,isRunning:i.has(e.id),launchingId:g,onLaunchNew:W,onResume:F,t:l},e.id))})}),D.length>0&&(0,t.jsxs)("div",{className:"flex shrink-0 items-center justify-center gap-3 border-t px-3 py-2",children:[(0,t.jsx)(u.Button,{variant:"ghost",size:"icon",className:"h-7 w-7",onClick:()=>C(e=>Math.max(0,e-1)),disabled:O<=0,"aria-label":l("missions.picker.prevPage"),children:(0,t.jsx)(ee.ChevronLeft,{className:"h-4 w-4"})}),(0,t.jsxs)("span",{className:"text-xs text-muted-foreground tabular-nums",children:[O+1," / ",$]}),(0,t.jsx)(u.Button,{variant:"ghost",size:"icon",className:"h-7 w-7",onClick:()=>C(e=>Math.min($-1,e+1)),disabled:O>=$-1,"aria-label":l("missions.picker.nextPage"),children:(0,t.jsx)(et.ChevronRight,{className:"h-4 w-4"})})]})]})]})]})})}e.i(508271);var ex=e.i(841359);e.s(["MissionsClient",0,function({initialExecutions:e}){let{t:a}=(0,r.useI18n)(),{removePortal:d}=(0,K.useTerminalPortal)(),[m,x]=(0,s.useState)(e),[p,b]=(0,s.useState)(()=>localStorage.getItem("missions-grid-preset")??"3x2"),[y,C]=(0,s.useState)(()=>{try{let e=localStorage.getItem("missions-grid-custom");if(e){let t=JSON.parse(e);if("number"==typeof t?.cols&&"number"==typeof t?.rows)return{cols:Math.max(1,Math.min(10,t.cols)),rows:Math.max(1,Math.min(10,t.rows))}}}catch{}return{cols:2,rows:2}}),[S,T]=(0,s.useState)(!1),[R,M]=(0,s.useState)(""),[E,D]=(0,s.useState)("input"),[$,O]=(0,s.useState)(0),z=(0,s.useRef)(new Map),H=(0,s.useRef)([]),W=(0,s.useRef)(2),F=(0,s.useRef)($);F.current=$;let U=(0,s.useCallback)((e,t)=>{t?z.current.set(e,t):z.current.delete(e)},[]),[V,_]=(0,s.useState)(new Map),[X,q]=(0,s.useState)(null),[J,Q]=(0,s.useState)(null),Y=(0,s.useRef)(V);(0,s.useEffect)(()=>{Y.current=V},[V]);let Z=(0,s.useRef)(m);(0,s.useEffect)(()=>{Z.current=m},[m]);let ee=(0,s.useRef)(new Map),et=f.find(e=>e.id===p)??f[2],es="custom"===p?y.cols:et.cols,er="custom"===p?y.rows:et.rows,ea=(0,s.useRef)(null),[en,ei]=(0,s.useState)("480px");(0,s.useEffect)(()=>{let e=ea.current;if(!e)return;let t=()=>{let t=(e.clientHeight-32-16*(er-1))/er;ei(`${Math.max(t,200)}px`)};t();let s=new ResizeObserver(t);return s.observe(e),()=>s.disconnect()},[er]);let el=(0,s.useCallback)((e,t)=>{e&&(b(e),localStorage.setItem("missions-grid-preset",e),"custom"===e&&t&&(C(t),localStorage.setItem("missions-grid-custom",JSON.stringify(t))))},[]),eo=(0,P.useSensors)((0,P.useSensor)(P.PointerSensor,{activationConstraint:{distance:8}})),ec=(0,s.useCallback)(e=>{let{active:t,over:s}=e;s&&t.id!==s.id&&x(e=>{let r=e.findIndex(e=>e.executionId===t.id),a=e.findIndex(e=>e.executionId===s.id);return(0,B.arrayMove)(e,r,a)})},[]),ed=(0,s.useCallback)((e,t)=>{if(Y.current.has(e))return;_(s=>new Map([...s,[e,t]]));let s=setTimeout(()=>{let t=Z.current.find(t=>t.executionId===e);t&&d(t.taskId),x(t=>t.filter(t=>t.executionId!==e)),_(t=>{let s=new Map(t);return s.delete(e),s}),ee.current.delete(e)},500);ee.current.set(e,s)},[d]);(0,s.useEffect)(()=>{let e=setInterval(async()=>{try{let e=await n();x(t=>{let s=Y.current,{merged:r,goneIds:a}=function({prev:e,fresh:t,removingIds:s}){let r=new Set(t.map(e=>e.executionId)),a=[];e.forEach(e=>{r.has(e.executionId)||s.has(e.executionId)||a.push(e.executionId)});let n=e.filter(e=>r.has(e.executionId)||s.has(e.executionId)),i=new Set(e.map(e=>e.executionId));return{merged:[...n,...t.filter(e=>!i.has(e.executionId))],goneIds:a}}({prev:t,fresh:e,removingIds:new Set(s.keys())});return a.forEach(e=>ed(e,"completed")),r})}catch{}},4e3);return()=>clearInterval(e)},[ed]),(0,s.useEffect)(()=>{let e=ee.current;return()=>{e.forEach(e=>clearTimeout(e))}},[]);let em=(0,s.useCallback)(async e=>{try{await (0,i.stopPtyExecution)(e),x(t=>{let s=t.find(t=>t.taskId===e);return s&&ed(s.executionId,"stopped"),t})}catch{h.toast.error(a("missions.error.stopFailed"))}},[ed,a]),eh=(0,s.useCallback)(async e=>{let t=e.taskId;try{let s=await (0,l.checkWorktreeClean)(t);if(s.hasWorktree&&!s.clean)return void Q({execution:e,files:s.files});if(s.hasWorktree&&s.clean&&!s.hasCommits)return void h.toast.error(a("taskPage.noChangesToComplete"),{action:{label:a("taskPage.markAsCancelled"),onClick:()=>{(0,o.updateTaskStatus)(t,"CANCELLED").then(()=>{ed(e.executionId,"stopped"),h.toast.success(a("taskPage.taskCancelled"))}).catch(()=>h.toast.error(a("missions.error.stopFailed")))}}});if(s.hasWorktree&&s.hasCommits)return void q({execution:e,commitLog:s.commitLog,commitCount:s.commitLog.length,baseBranch:s.baseBranch});await (0,o.updateTaskStatus)(t,"DONE"),ed(e.executionId,"completed"),h.toast.success(a("taskPage.taskCompleted"))}catch{h.toast.error(a("missions.error.completeFailed"))}},[ed,a]),ep=(0,s.useCallback)((e,t)=>{x(t=>{let s=t.find(t=>t.taskId===e);return s&&ed(s.executionId,"completed"),t})},[ed]),eg=(0,s.useCallback)(e=>{n().then(e=>{x(t=>{let s=new Set(t.map(e=>e.executionId));return[...t,...e.filter(e=>!s.has(e.executionId))]})}).catch(()=>{})},[]),ef=(0,s.useCallback)(e=>{let t=H.current;e<0||e>=t.length||(t[e]?.focus(),O(e),D("input"),ea.current?.querySelector(`[data-pane-index="${e}"]`)?.scrollIntoView({block:"nearest",inline:"nearest",behavior:"instant"}))},[]),ej=(0,s.useCallback)(()=>{let e=document.activeElement;e instanceof HTMLElement&&e.blur(),H.current[F.current]?.blur(),D("nav")},[]),ek=(0,s.useCallback)(()=>{ef(F.current)},[ef]),eb=(0,s.useCallback)(()=>{"input"===E?ej():ek()},[E,ej,ek]),ev=(0,s.useCallback)(()=>{let e=H.current.length;0!==e&&ef(A(F.current,e,1))},[ef]),ew=(0,s.useCallback)(()=>{let e=H.current.length;0!==e&&ef(A(F.current,e,-1))},[ef]),eN=(0,s.useCallback)(e=>{let t=H.current.length;0!==t&&(D("nav"),O(s=>(function(e,t,s,r){if(s<=0)return 0;let a=Math.max(1,t);switch(r){case"left":return A(e,s,-1);case"right":return A(e,s,1);case"up":{let t=e-a;return t<0?e:t}case"down":{let t=e+a;return t>=s?e:t}default:return e}})(s,W.current,t,e)))},[]),ey=(0,s.useCallback)(e=>{let t=H.current.length;0!==t&&(D("nav"),O(s=>A(s,t,e)))},[]);(0,ex.useActionShortcut)("missions.jump",e=>{let t=Number(e.key);Number.isInteger(t)&&t>=1&&ef(t-1)}),(0,ex.useActionShortcut)("missions.moveSelection",e=>{eN("ArrowUp"===e.key?"up":"ArrowDown"===e.key?"down":"ArrowLeft"===e.key?"left":"right")}),(0,ex.useActionShortcut)("missions.cycle",()=>ey(1)),(0,ex.useActionShortcut)("missions.cycleBack",()=>ey(-1)),(0,ex.useActionShortcut)("missions.focus",()=>ek()),(0,ex.useActionShortcut)("missions.next",()=>ev()),(0,ex.useActionShortcut)("missions.prev",()=>ew()),(0,ex.useActionShortcut)("missions.exit",()=>ej()),(0,s.useEffect)(()=>{let e=ea.current;if(!e)return;let t=e=>{let t=e.target,s=t?.closest("[data-pane-index]");if(!s)return;let r=Number(s.dataset.paneIndex);Number.isInteger(r)&&(O(r),D("input"))};return e.addEventListener("focusin",t),()=>e.removeEventListener("focusin",t)},[]);let eC=Array.from(new Map(m.map(e=>[e.workspaceId,e.workspaceName])).entries()).map(([e,t])=>({id:e,name:t})),eS=R?m.filter(e=>e.workspaceId===R):m;H.current=eS.map(e=>z.current.get(e.taskId)).filter(e=>!!e),W.current=es,(0,s.useEffect)(()=>{O(e=>{let t=eS.length;return 0===t?0:Math.min(e,t-1)})},[eS.length]);let eI=new Set(m.map(e=>e.taskId));return(0,t.jsxs)("div",{className:"flex h-full flex-col",children:[(0,t.jsxs)("div",{className:"header-sm shrink-0 px-4 flex items-center gap-3",children:[(0,t.jsx)("h1",{className:"text-base font-semibold",children:a("missions.pageTitle")}),(0,t.jsxs)(N.Tooltip,{children:[(0,t.jsxs)(N.TooltipTrigger,{render:(0,t.jsx)(u.Button,{variant:"ghost",className:`h-7 gap-1.5 px-2 shrink-0 text-xs font-medium text-muted-foreground ${"nav"===E?"bg-accent text-foreground":""}`,onClick:eb,disabled:0===eS.length}),children:[(0,t.jsx)(w.Keyboard,{className:"h-3.5 w-3.5"}),"input"===E?a("missions.mode.input"):a("missions.mode.nav")]}),(0,t.jsx)(N.TooltipContent,{className:"max-w-xs",children:a("missions.mode.toggleHint")})]}),(0,t.jsxs)(j.Select,{value:R,onValueChange:e=>M(e??""),children:[(0,t.jsx)(j.SelectTrigger,{className:"w-36 h-8",children:(0,t.jsx)("span",{className:"truncate",children:R?eC.find(e=>e.id===R)?.name??a("missions.filterAll"):a("missions.filterAll")})}),(0,t.jsxs)(j.SelectContent,{children:[(0,t.jsx)(j.SelectItem,{value:"",children:a("missions.filterAll")}),eC.map(e=>(0,t.jsx)(j.SelectItem,{value:e.id,children:e.name},e.id))]})]}),(0,t.jsx)("div",{className:"flex-1"}),(0,t.jsx)(I,{value:p,customValue:y,onChange:el}),(0,t.jsx)(u.Button,{onClick:()=>T(!0),children:a("missions.launchTask")}),(0,t.jsx)(eu,{open:S,onOpenChange:T,onLaunched:eg,runningTaskIds:eI})]}),(0,t.jsx)("div",{ref:ea,className:"flex-1 overflow-auto min-h-0 p-4",children:0===eS.length&&0===V.size?(0,t.jsx)(k.EmptyState,{icon:v,title:a("missions.emptyTitle"),description:a("missions.emptyDesc"),className:"h-full",action:(0,t.jsx)(u.Button,{onClick:()=>T(!0),children:a("missions.launchTask")})}):(0,t.jsx)(P.DndContext,{id:"missions-dnd",sensors:eo,collisionDetection:P.closestCenter,onDragEnd:ec,children:(0,t.jsx)(B.SortableContext,{items:eS.map(e=>e.executionId),strategy:B.rectSortingStrategy,children:(0,t.jsx)("div",{className:"grid gap-4",style:{gridTemplateColumns:`repeat(${es}, 1fr)`,gridAutoRows:en},children:eS.map((e,s)=>(0,t.jsx)(G,{execution:e,isRemoving:V.has(e.executionId),removeReason:V.get(e.executionId),onStop:em,onComplete:eh,onSessionEnd:ep,index:s,onRegisterControls:U},e.executionId))})})})}),(0,t.jsx)(L,{open:"nav"===E,panes:eS,selectedIndex:$,onSelect:ef,onClose:ek}),J&&(0,t.jsx)(g,{open:!0,onOpenChange:e=>{e||Q(null)},taskId:J.execution.taskId,files:J.files,onCommitted:()=>{let e=J.execution;Q(null),eh(e)}}),X&&(0,t.jsx)(c.TaskMergeConfirmDialog,{open:!0,onOpenChange:e=>{e||q(null)},taskId:X.execution.taskId,taskTitle:X.execution.taskTitle,baseBranch:X.baseBranch,fileCount:0,commitCount:X.commitCount,commitLog:X.commitLog,onMergeComplete:()=>{ed(X.execution.executionId,"completed"),q(null),h.toast.success(a("taskPage.taskCompleted"))}})]})}],449636)}]);