tower-studio 0.2.42 → 0.2.44

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 (379) hide show
  1. package/.next/standalone/.next/BUILD_ID +1 -1
  2. package/.next/standalone/.next/app-path-routes-manifest.json +1 -0
  3. package/.next/standalone/.next/build-manifest.json +3 -3
  4. package/.next/standalone/.next/prerender-manifest.json +3 -3
  5. package/.next/standalone/.next/routes-manifest.json +8 -0
  6. package/.next/standalone/.next/server/app/_global-error.html +1 -1
  7. package/.next/standalone/.next/server/app/_global-error.rsc +1 -1
  8. package/.next/standalone/.next/server/app/_global-error.segments/__PAGE__.segment.rsc +1 -1
  9. package/.next/standalone/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
  10. package/.next/standalone/.next/server/app/_global-error.segments/_head.segment.rsc +1 -1
  11. package/.next/standalone/.next/server/app/_global-error.segments/_index.segment.rsc +1 -1
  12. package/.next/standalone/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
  13. package/.next/standalone/.next/server/app/_not-found/page/react-loadable-manifest.json +3 -3
  14. package/.next/standalone/.next/server/app/_not-found/page/server-reference-manifest.json +35 -35
  15. package/.next/standalone/.next/server/app/_not-found/page.js +6 -6
  16. package/.next/standalone/.next/server/app/_not-found/page.js.nft.json +1 -1
  17. package/.next/standalone/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
  18. package/.next/standalone/.next/server/app/api/adapters/test/route.js +1 -1
  19. package/.next/standalone/.next/server/app/api/adapters/test/route.js.nft.json +1 -1
  20. package/.next/standalone/.next/server/app/api/browse-fs/route.js.nft.json +1 -1
  21. package/.next/standalone/.next/server/app/api/files/assets/[projectId]/[filename]/route.js +1 -1
  22. package/.next/standalone/.next/server/app/api/files/assets/[projectId]/[filename]/route.js.nft.json +1 -1
  23. package/.next/standalone/.next/server/app/api/git/route.js +1 -1
  24. package/.next/standalone/.next/server/app/api/git/route.js.nft.json +1 -1
  25. package/.next/standalone/.next/server/app/api/internal/assets/[projectId]/[filename]/route.js +1 -1
  26. package/.next/standalone/.next/server/app/api/internal/assets/[projectId]/[filename]/route.js.nft.json +1 -1
  27. package/.next/standalone/.next/server/app/api/internal/assets/reveal/route.js.nft.json +1 -1
  28. package/.next/standalone/.next/server/app/api/internal/assistant/attachments/route.js +1 -1
  29. package/.next/standalone/.next/server/app/api/internal/assistant/attachments/route.js.nft.json +1 -1
  30. package/.next/standalone/.next/server/app/api/internal/assistant/chat/route.js +3 -3
  31. package/.next/standalone/.next/server/app/api/internal/assistant/chat/route.js.nft.json +1 -1
  32. package/.next/standalone/.next/server/app/api/internal/assistant/route.js +2 -2
  33. package/.next/standalone/.next/server/app/api/internal/assistant/route.js.nft.json +1 -1
  34. package/.next/standalone/.next/server/app/api/internal/assistant/sessions/route.js +1 -1
  35. package/.next/standalone/.next/server/app/api/internal/assistant/sessions/route.js.nft.json +1 -1
  36. package/.next/standalone/.next/server/app/api/internal/backup/import/route.js +1 -1
  37. package/.next/standalone/.next/server/app/api/internal/backup/import/route.js.nft.json +1 -1
  38. package/.next/standalone/.next/server/app/api/internal/cache/[...segments]/route.js +1 -1
  39. package/.next/standalone/.next/server/app/api/internal/cache/[...segments]/route.js.nft.json +1 -1
  40. package/.next/standalone/.next/server/app/api/internal/hooks/install/route.js +3 -2
  41. package/.next/standalone/.next/server/app/api/internal/hooks/install/route.js.nft.json +1 -1
  42. package/.next/standalone/.next/server/app/api/internal/hooks/session/route.js +1 -1
  43. package/.next/standalone/.next/server/app/api/internal/hooks/session/route.js.nft.json +1 -1
  44. package/.next/standalone/.next/server/app/api/internal/hooks/stop/route.js +2 -2
  45. package/.next/standalone/.next/server/app/api/internal/hooks/stop/route.js.nft.json +1 -1
  46. package/.next/standalone/.next/server/app/api/internal/hooks/upload/route.js +2 -2
  47. package/.next/standalone/.next/server/app/api/internal/hooks/upload/route.js.nft.json +1 -1
  48. package/.next/standalone/.next/server/app/api/internal/monaco/[...path]/route.js +1 -1
  49. package/.next/standalone/.next/server/app/api/internal/monaco/[...path]/route.js.nft.json +1 -1
  50. package/.next/standalone/.next/server/app/api/internal/terminal/[taskId]/buffer/route.js +1 -1
  51. package/.next/standalone/.next/server/app/api/internal/terminal/[taskId]/buffer/route.js.nft.json +1 -1
  52. package/.next/standalone/.next/server/app/api/internal/terminal/[taskId]/input/route.js +1 -1
  53. package/.next/standalone/.next/server/app/api/internal/terminal/[taskId]/input/route.js.nft.json +1 -1
  54. package/.next/standalone/.next/server/app/api/internal/terminal/[taskId]/paste-image/route/app-paths-manifest.json +3 -0
  55. package/.next/standalone/.next/server/app/api/internal/terminal/[taskId]/paste-image/route/build-manifest.json +9 -0
  56. package/.next/standalone/.next/server/app/api/internal/terminal/[taskId]/paste-image/route/server-reference-manifest.json +4 -0
  57. package/.next/standalone/.next/server/app/api/internal/terminal/[taskId]/paste-image/route.js +8 -0
  58. package/.next/standalone/.next/server/app/api/internal/terminal/[taskId]/paste-image/route.js.nft.json +1 -0
  59. package/.next/standalone/.next/server/app/api/internal/terminal/[taskId]/paste-image/route_client-reference-manifest.js +3 -0
  60. package/.next/standalone/.next/server/app/api/internal/terminal/[taskId]/resume/route.js +3 -3
  61. package/.next/standalone/.next/server/app/api/internal/terminal/[taskId]/resume/route.js.nft.json +1 -1
  62. package/.next/standalone/.next/server/app/api/internal/terminal/[taskId]/start/route.js +4 -4
  63. package/.next/standalone/.next/server/app/api/internal/terminal/[taskId]/start/route.js.nft.json +1 -1
  64. package/.next/standalone/.next/server/app/api/internal/terminal/[taskId]/stop/route.js +3 -3
  65. package/.next/standalone/.next/server/app/api/internal/terminal/[taskId]/stop/route.js.nft.json +1 -1
  66. package/.next/standalone/.next/server/app/api/tasks/[taskId]/diff/route.js +1 -1
  67. package/.next/standalone/.next/server/app/api/tasks/[taskId]/diff/route.js.nft.json +1 -1
  68. package/.next/standalone/.next/server/app/api/tasks/[taskId]/diff-patch/route.js +1 -1
  69. package/.next/standalone/.next/server/app/api/tasks/[taskId]/diff-patch/route.js.nft.json +1 -1
  70. package/.next/standalone/.next/server/app/api/tasks/[taskId]/merge/route.js +4 -3
  71. package/.next/standalone/.next/server/app/api/tasks/[taskId]/merge/route.js.nft.json +1 -1
  72. package/.next/standalone/.next/server/app/missions/page/react-loadable-manifest.json +2 -2
  73. package/.next/standalone/.next/server/app/missions/page/server-reference-manifest.json +76 -76
  74. package/.next/standalone/.next/server/app/missions/page.js +6 -6
  75. package/.next/standalone/.next/server/app/missions/page.js.nft.json +1 -1
  76. package/.next/standalone/.next/server/app/missions/page_client-reference-manifest.js +1 -1
  77. package/.next/standalone/.next/server/app/onboarding/page/react-loadable-manifest.json +3 -3
  78. package/.next/standalone/.next/server/app/onboarding/page/server-reference-manifest.json +35 -35
  79. package/.next/standalone/.next/server/app/onboarding/page.js +6 -6
  80. package/.next/standalone/.next/server/app/onboarding/page.js.nft.json +1 -1
  81. package/.next/standalone/.next/server/app/onboarding/page_client-reference-manifest.js +1 -1
  82. package/.next/standalone/.next/server/app/page/react-loadable-manifest.json +3 -3
  83. package/.next/standalone/.next/server/app/page/server-reference-manifest.json +35 -35
  84. package/.next/standalone/.next/server/app/page.js +6 -6
  85. package/.next/standalone/.next/server/app/page.js.nft.json +1 -1
  86. package/.next/standalone/.next/server/app/page_client-reference-manifest.js +1 -1
  87. package/.next/standalone/.next/server/app/settings/page/react-loadable-manifest.json +3 -3
  88. package/.next/standalone/.next/server/app/settings/page/server-reference-manifest.json +52 -52
  89. package/.next/standalone/.next/server/app/settings/page.js +6 -6
  90. package/.next/standalone/.next/server/app/settings/page.js.nft.json +1 -1
  91. package/.next/standalone/.next/server/app/settings/page_client-reference-manifest.js +1 -1
  92. package/.next/standalone/.next/server/app/workspaces/[workspaceId]/archive/page/react-loadable-manifest.json +3 -3
  93. package/.next/standalone/.next/server/app/workspaces/[workspaceId]/archive/page/server-reference-manifest.json +115 -115
  94. package/.next/standalone/.next/server/app/workspaces/[workspaceId]/archive/page.js +6 -6
  95. package/.next/standalone/.next/server/app/workspaces/[workspaceId]/archive/page.js.nft.json +1 -1
  96. package/.next/standalone/.next/server/app/workspaces/[workspaceId]/archive/page_client-reference-manifest.js +1 -1
  97. package/.next/standalone/.next/server/app/workspaces/[workspaceId]/assets/page/react-loadable-manifest.json +3 -3
  98. package/.next/standalone/.next/server/app/workspaces/[workspaceId]/assets/page/server-reference-manifest.json +98 -98
  99. package/.next/standalone/.next/server/app/workspaces/[workspaceId]/assets/page.js +6 -6
  100. package/.next/standalone/.next/server/app/workspaces/[workspaceId]/assets/page.js.nft.json +1 -1
  101. package/.next/standalone/.next/server/app/workspaces/[workspaceId]/assets/page_client-reference-manifest.js +1 -1
  102. package/.next/standalone/.next/server/app/workspaces/[workspaceId]/notes/page/react-loadable-manifest.json +3 -3
  103. package/.next/standalone/.next/server/app/workspaces/[workspaceId]/notes/page/server-reference-manifest.json +85 -85
  104. package/.next/standalone/.next/server/app/workspaces/[workspaceId]/notes/page.js +6 -6
  105. package/.next/standalone/.next/server/app/workspaces/[workspaceId]/notes/page.js.nft.json +1 -1
  106. package/.next/standalone/.next/server/app/workspaces/[workspaceId]/notes/page_client-reference-manifest.js +1 -1
  107. package/.next/standalone/.next/server/app/workspaces/[workspaceId]/page/react-loadable-manifest.json +3 -3
  108. package/.next/standalone/.next/server/app/workspaces/[workspaceId]/page/server-reference-manifest.json +81 -81
  109. package/.next/standalone/.next/server/app/workspaces/[workspaceId]/page.js +6 -6
  110. package/.next/standalone/.next/server/app/workspaces/[workspaceId]/page.js.nft.json +1 -1
  111. package/.next/standalone/.next/server/app/workspaces/[workspaceId]/page_client-reference-manifest.js +1 -1
  112. package/.next/standalone/.next/server/app/workspaces/[workspaceId]/projects/[projectId]/page/react-loadable-manifest.json +3 -3
  113. package/.next/standalone/.next/server/app/workspaces/[workspaceId]/projects/[projectId]/page/server-reference-manifest.json +35 -35
  114. package/.next/standalone/.next/server/app/workspaces/[workspaceId]/projects/[projectId]/page.js +7 -7
  115. package/.next/standalone/.next/server/app/workspaces/[workspaceId]/projects/[projectId]/page.js.nft.json +1 -1
  116. package/.next/standalone/.next/server/app/workspaces/[workspaceId]/projects/[projectId]/page_client-reference-manifest.js +1 -1
  117. package/.next/standalone/.next/server/app/workspaces/[workspaceId]/projects/[projectId]/versions/page/react-loadable-manifest.json +3 -3
  118. package/.next/standalone/.next/server/app/workspaces/[workspaceId]/projects/[projectId]/versions/page/server-reference-manifest.json +77 -77
  119. package/.next/standalone/.next/server/app/workspaces/[workspaceId]/projects/[projectId]/versions/page.js +6 -6
  120. package/.next/standalone/.next/server/app/workspaces/[workspaceId]/projects/[projectId]/versions/page.js.nft.json +1 -1
  121. package/.next/standalone/.next/server/app/workspaces/[workspaceId]/projects/[projectId]/versions/page_client-reference-manifest.js +1 -1
  122. package/.next/standalone/.next/server/app/workspaces/[workspaceId]/tasks/[taskId]/page/react-loadable-manifest.json +4 -4
  123. package/.next/standalone/.next/server/app/workspaces/[workspaceId]/tasks/[taskId]/page/server-reference-manifest.json +91 -91
  124. package/.next/standalone/.next/server/app/workspaces/[workspaceId]/tasks/[taskId]/page.js +6 -6
  125. package/.next/standalone/.next/server/app/workspaces/[workspaceId]/tasks/[taskId]/page.js.nft.json +1 -1
  126. package/.next/standalone/.next/server/app/workspaces/[workspaceId]/tasks/[taskId]/page_client-reference-manifest.js +1 -1
  127. package/.next/standalone/.next/server/app/workspaces/page/react-loadable-manifest.json +3 -3
  128. package/.next/standalone/.next/server/app/workspaces/page/server-reference-manifest.json +58 -58
  129. package/.next/standalone/.next/server/app/workspaces/page.js +6 -6
  130. package/.next/standalone/.next/server/app/workspaces/page.js.nft.json +1 -1
  131. package/.next/standalone/.next/server/app/workspaces/page_client-reference-manifest.js +1 -1
  132. package/.next/standalone/.next/server/app-paths-manifest.json +1 -0
  133. package/.next/standalone/.next/server/chunks/{_0keginv._.js → 0se9_next_0cuhhky._.js} +3 -3
  134. package/.next/standalone/.next/server/chunks/0se9_next_dist_esm_build_templates_app-route_0gr2wxq.js +3 -0
  135. package/.next/standalone/.next/server/chunks/0zjb_server_app_api_internal_terminal_[taskId]_paste-image_route_actions_0iegbi4.js +3 -0
  136. package/.next/standalone/.next/server/chunks/[externals]__0x_wqa7._.js +3 -0
  137. package/.next/standalone/.next/server/chunks/[root-of-the-server]__0.p6em~._.js +3 -0
  138. package/.next/standalone/.next/server/chunks/[root-of-the-server]__0.zmhk-._.js +3 -0
  139. package/.next/standalone/.next/server/chunks/[root-of-the-server]__0042hx5._.js +3 -0
  140. package/.next/standalone/.next/server/chunks/{[root-of-the-server]__0b3m.jm._.js → [root-of-the-server]__03ufxqq._.js} +3 -3
  141. package/.next/standalone/.next/server/chunks/[root-of-the-server]__04--bs7._.js +3 -0
  142. package/.next/standalone/.next/server/chunks/[root-of-the-server]__04m2l8a._.js +3 -0
  143. package/.next/standalone/.next/server/chunks/[root-of-the-server]__04r193~._.js +3 -0
  144. package/.next/standalone/.next/server/chunks/[root-of-the-server]__0657y50._.js +3 -0
  145. package/.next/standalone/.next/server/chunks/[root-of-the-server]__06ndn7a._.js +4 -0
  146. package/.next/standalone/.next/server/chunks/[root-of-the-server]__08yqoti._.js +3 -0
  147. package/.next/standalone/.next/server/chunks/[root-of-the-server]__098.3z2._.js +3 -0
  148. package/.next/standalone/.next/server/chunks/[root-of-the-server]__09arklv._.js +3 -0
  149. package/.next/standalone/.next/server/chunks/{[root-of-the-server]__0obk~80._.js → [root-of-the-server]__0_d.s7s._.js} +3 -3
  150. package/.next/standalone/.next/server/chunks/{[root-of-the-server]__0askhfg._.js → [root-of-the-server]__0_zfnj0._.js} +2 -2
  151. package/.next/standalone/.next/server/chunks/{[root-of-the-server]__0xswbi9._.js → [root-of-the-server]__0clptds._.js} +2 -2
  152. package/.next/standalone/.next/server/chunks/{[root-of-the-server]__0ai09na._.js → [root-of-the-server]__0g.k9o~._.js} +2 -2
  153. package/.next/standalone/.next/server/chunks/[root-of-the-server]__0i34gbs._.js +4 -0
  154. package/.next/standalone/.next/server/chunks/[root-of-the-server]__0iggiij._.js +3 -0
  155. package/.next/standalone/.next/server/chunks/[root-of-the-server]__0i~3dwq._.js +3 -0
  156. package/.next/standalone/.next/server/chunks/[root-of-the-server]__0j1px8f._.js +3 -0
  157. package/.next/standalone/.next/server/chunks/[root-of-the-server]__0k-5ag7._.js +3 -0
  158. package/.next/standalone/.next/server/chunks/[root-of-the-server]__0l1-djp._.js +1 -1
  159. package/.next/standalone/.next/server/chunks/{[root-of-the-server]__0-~q463._.js → [root-of-the-server]__0lvlooo._.js} +2 -2
  160. package/.next/standalone/.next/server/chunks/[root-of-the-server]__0otyifi._.js +1 -1
  161. package/.next/standalone/.next/server/chunks/[root-of-the-server]__0pl.c5.._.js +3 -0
  162. package/.next/standalone/.next/server/chunks/[root-of-the-server]__0r~9.7c._.js +4 -0
  163. package/.next/standalone/.next/server/chunks/[root-of-the-server]__0t31ba_._.js +3 -0
  164. package/.next/standalone/.next/server/chunks/[root-of-the-server]__0t_weyi._.js +3 -0
  165. package/.next/standalone/.next/server/chunks/{[root-of-the-server]__06qz5fz._.js → [root-of-the-server]__0uptkzd._.js} +3 -3
  166. package/.next/standalone/.next/server/chunks/[root-of-the-server]__0x3kws1._.js +3 -0
  167. package/.next/standalone/.next/server/chunks/[root-of-the-server]__0xot7fu._.js +1 -1
  168. package/.next/standalone/.next/server/chunks/{[root-of-the-server]__0~6py0f._.js → [root-of-the-server]__0y8w5di._.js} +3 -3
  169. package/.next/standalone/.next/server/chunks/[root-of-the-server]__0zi3~a8._.js +3 -0
  170. package/.next/standalone/.next/server/chunks/[root-of-the-server]__0~g6-c~._.js +3 -0
  171. package/.next/standalone/.next/server/chunks/[root-of-the-server]__10fv6tt._.js +3 -0
  172. package/.next/standalone/.next/server/chunks/[root-of-the-server]__1189rd1._.js +4 -0
  173. package/.next/standalone/.next/server/chunks/{_06.mxka._.js → _0jmdgq~._.js} +1 -1
  174. package/.next/standalone/.next/server/chunks/{_0aflzks._.js → _0q10iet._.js} +1 -1
  175. package/.next/standalone/.next/server/chunks/_0qk_esg._.js +1 -1
  176. package/.next/standalone/.next/server/chunks/{_0b~hjvi._.js → _12537g8._.js} +1 -1
  177. package/.next/standalone/.next/server/chunks/{src_07gek7k._.js → src_0fq3zjg._.js} +2 -2
  178. package/.next/standalone/.next/server/chunks/src_0weytpz._.js +1 -1
  179. package/.next/standalone/.next/server/chunks/{src_0mqkaid._.js → src_0wlyw0g._.js} +2 -2
  180. package/.next/standalone/.next/server/chunks/{src_02ruq-1._.js → src_0~ey84y._.js} +2 -2
  181. package/.next/standalone/.next/server/chunks/src_actions_agent-actions_ts_10q9r5b._.js +2 -2
  182. package/.next/standalone/.next/server/chunks/ssr/0iu._[workspaceId]_projects_[projectId]_versions_version-timeline-client_tsx_07o_kyi._.js +1 -1
  183. package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__0mmypbn._.js → [root-of-the-server]__00ebsjb._.js} +1 -1
  184. package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__0dsaqeq._.js → [root-of-the-server]__01fmnse._.js} +2 -2
  185. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__01vm_46._.js +47 -0
  186. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__025ol9g._.js +3 -0
  187. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__049n47u._.js +3 -0
  188. package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__094t44p._.js → [root-of-the-server]__04ednzb._.js} +1 -1
  189. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__04wbr9x._.js +1 -1
  190. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__05xg05r._.js +1 -1
  191. package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__0pmjob9._.js → [root-of-the-server]__06dfcgo._.js} +1 -1
  192. package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__038u_kv._.js → [root-of-the-server]__07xkj1s._.js} +4 -4
  193. package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__0h-se8t._.js → [root-of-the-server]__081e5n~._.js} +2 -2
  194. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__08tzbfh._.js +3 -0
  195. package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__0.infp2._.js → [root-of-the-server]__0_z5hke._.js} +1 -1
  196. package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__0ce3fpq._.js → [root-of-the-server]__0ecd_1d._.js} +4 -4
  197. package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__10s67lq._.js → [root-of-the-server]__0iln7n_._.js} +4 -4
  198. package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__09z_ddd._.js → [root-of-the-server]__0j_-qk5._.js} +1 -1
  199. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0jymb~t._.js +1 -1
  200. package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__0.u-t.1._.js → [root-of-the-server]__0k6oo0n._.js} +1 -1
  201. package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__0h589~0._.js → [root-of-the-server]__0lws68d._.js} +4 -4
  202. package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__0oq-j16._.js → [root-of-the-server]__0oamph.._.js} +4 -4
  203. package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__0pvaj~l._.js → [root-of-the-server]__0pnv7nd._.js} +1 -1
  204. package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__03fujv7._.js → [root-of-the-server]__0tja~wz._.js} +1 -1
  205. package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__0391jsv._.js → [root-of-the-server]__0ug022w._.js} +1 -1
  206. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0ugledi._.js +3 -0
  207. package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__0whlq2_._.js → [root-of-the-server]__0vxlsec._.js} +2 -2
  208. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0w0.sdz._.js +3 -0
  209. package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__0l6bt9t._.js → [root-of-the-server]__0x6k.ee._.js} +1 -1
  210. package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__058rbx5._.js → [root-of-the-server]__0xwzk2.._.js} +4 -4
  211. package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__12w35bx._.js → [root-of-the-server]__0yby8pl._.js} +4 -4
  212. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0z7je5_._.js +1 -1
  213. package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__0rckee~._.js → [root-of-the-server]__0zxc81t._.js} +1 -1
  214. package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__02j1enz._.js → [root-of-the-server]__0zzqn5z._.js} +1 -1
  215. package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__0mq0f94._.js → [root-of-the-server]__10c.a3u._.js} +1 -1
  216. package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__0.2h0ux._.js → [root-of-the-server]__10n3vn6._.js} +1 -1
  217. package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__09t~p.u._.js → [root-of-the-server]__123rmyb._.js} +1 -1
  218. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__124zb~p._.js +30 -0
  219. package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__0dux7x.._.js → [root-of-the-server]__127w3bm._.js} +1 -1
  220. package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__0odeai5._.js → [root-of-the-server]__13ce7v2._.js} +1 -1
  221. package/.next/standalone/.next/server/chunks/ssr/_0-~9em3._.js +1 -1
  222. package/.next/standalone/.next/server/chunks/ssr/{_0axcfvf._.js → _02vz78l._.js} +2 -2
  223. package/.next/standalone/.next/server/chunks/ssr/{_0c2gong._.js → _04~mjmb._.js} +2 -2
  224. package/.next/standalone/.next/server/chunks/ssr/{_03lt1_x._.js → _05a2u03._.js} +4 -4
  225. package/.next/standalone/.next/server/chunks/ssr/{_09z2zmm._.js → _060e1u.._.js} +1 -1
  226. package/.next/standalone/.next/server/chunks/ssr/_070t_mh._.js +2 -2
  227. package/.next/standalone/.next/server/chunks/ssr/{_0n4bq0m._.js → _07lq-bp._.js} +1 -1
  228. package/.next/standalone/.next/server/chunks/ssr/{_0p6p_68._.js → _07q06~v._.js} +4 -4
  229. package/.next/standalone/.next/server/chunks/ssr/{_0mm~wxj._.js → _08-x_rp._.js} +1 -1
  230. package/.next/standalone/.next/server/chunks/ssr/_08bq4g8._.js +1 -1
  231. package/.next/standalone/.next/server/chunks/ssr/{_0~oc5bl._.js → _0_nhdgs._.js} +2 -2
  232. package/.next/standalone/.next/server/chunks/ssr/{_12ca88g._.js → _0_q41~z._.js} +4 -4
  233. package/.next/standalone/.next/server/chunks/ssr/_0cj9a7y._.js +1 -1
  234. package/.next/standalone/.next/server/chunks/ssr/{_0u7c6bz._.js → _0dxbp89._.js} +4 -4
  235. package/.next/standalone/.next/server/chunks/ssr/{_0rq68d8._.js → _0foto06._.js} +2 -2
  236. package/.next/standalone/.next/server/chunks/ssr/{_0_5abui._.js → _0i4xdso._.js} +2 -2
  237. package/.next/standalone/.next/server/chunks/ssr/{_0n5do.z._.js → _0j5.ig_._.js} +1 -1
  238. package/.next/standalone/.next/server/chunks/ssr/{_0m.wslt._.js → _0kojxno._.js} +2 -2
  239. package/.next/standalone/.next/server/chunks/ssr/{_0py1s-f._.js → _0nze-e6._.js} +1 -1
  240. package/.next/standalone/.next/server/chunks/ssr/{_0u.n7v8._.js → _0r4_qn~._.js} +2 -2
  241. package/.next/standalone/.next/server/chunks/ssr/_0rdyrfd._.js +1 -1
  242. package/.next/standalone/.next/server/chunks/ssr/{_0q2mf9q._.js → _0rtydyv._.js} +1 -1
  243. package/.next/standalone/.next/server/chunks/ssr/_0rxeqmo._.js +1 -1
  244. package/.next/standalone/.next/server/chunks/ssr/{_04bt0.3._.js → _0s.h4l2._.js} +1 -1
  245. package/.next/standalone/.next/server/chunks/ssr/{_0tvm5af._.js → _0s.ik0k._.js} +1 -1
  246. package/.next/standalone/.next/server/chunks/ssr/{_0f~l8kv._.js → _0u3yt.5._.js} +3 -3
  247. package/.next/standalone/.next/server/chunks/ssr/_0wbcp88._.js +1 -1
  248. package/.next/standalone/.next/server/chunks/ssr/{_04~zqvy._.js → _0wqcz3w._.js} +4 -4
  249. package/.next/standalone/.next/server/chunks/ssr/{_0whlnt7._.js → _0ye1-r-._.js} +2 -2
  250. package/.next/standalone/.next/server/chunks/ssr/{_116-_2z._.js → _0zr81mw._.js} +2 -2
  251. package/.next/standalone/.next/server/chunks/ssr/{_0rrzd20._.js → _113957g._.js} +1 -1
  252. package/.next/standalone/.next/server/chunks/ssr/{_0o2tntr._.js → _11osha9._.js} +2 -2
  253. package/.next/standalone/.next/server/chunks/ssr/src_0djxlqx._.js +1 -1
  254. package/.next/standalone/.next/server/chunks/ssr/src_0eufeyj._.js +1 -1
  255. package/.next/standalone/.next/server/chunks/ssr/src_actions_agent-actions_ts_0~wc.sy._.js +1 -1
  256. package/.next/standalone/.next/server/chunks/ssr/src_actions_file-actions_ts_0gcvqwm._.js +1 -1
  257. package/.next/standalone/.next/server/chunks/ssr/src_app_missions_missions-client_tsx_11429lj._.js +1 -1
  258. package/.next/standalone/.next/server/chunks/ssr/src_app_onboarding_page_tsx_0xf7hpz._.js +1 -1
  259. package/.next/standalone/.next/server/chunks/ssr/src_app_settings_page_tsx_0h9v7dr._.js +1 -1
  260. package/.next/standalone/.next/server/chunks/ssr/src_app_workspaces_[workspaceId]_assets_assets-page-client_tsx_0wyzpam._.js +1 -1
  261. package/.next/standalone/.next/server/chunks/ssr/src_app_workspaces_[workspaceId]_board-page-client_tsx_0gips66._.js +1 -1
  262. package/.next/standalone/.next/server/chunks/ssr/src_app_workspaces_[workspaceId]_notes_notes-page-client_tsx_10gyo3v._.js +1 -1
  263. package/.next/standalone/.next/server/chunks/ssr/src_app_workspaces_[workspaceId]_tasks_[taskId]_task-page-client_tsx_02t7blt._.js +1 -1
  264. package/.next/standalone/.next/server/chunks/ssr/src_components_ui_select_tsx_0d2ra01._.js +1 -1
  265. package/.next/standalone/.next/server/chunks/ssr/{src_lib_0_9avpk._.js → src_lib_0.~.oo-._.js} +1 -1
  266. package/.next/standalone/.next/server/chunks/ssr/{src_lib_08wv1le._.js → src_lib_005uqbe._.js} +1 -1
  267. package/.next/standalone/.next/server/chunks/ssr/{src_lib_02~3_5t._.js → src_lib_00wjv6n._.js} +1 -1
  268. package/.next/standalone/.next/server/chunks/ssr/{src_lib_04d~c.c._.js → src_lib_01sr8_t._.js} +1 -1
  269. package/.next/standalone/.next/server/chunks/ssr/src_lib_08jql1e._.js +3 -0
  270. package/.next/standalone/.next/server/chunks/ssr/src_lib_0b~j-9d._.js +3 -0
  271. package/.next/standalone/.next/server/chunks/ssr/src_lib_0eymyjf._.js +3 -0
  272. package/.next/standalone/.next/server/chunks/ssr/src_lib_0fkv9z3._.js +3 -0
  273. package/.next/standalone/.next/server/chunks/ssr/src_lib_0n-n0.a._.js +3 -0
  274. package/.next/standalone/.next/server/chunks/ssr/src_lib_0sgt~lv._.js +3 -0
  275. package/.next/standalone/.next/server/chunks/ssr/src_lib_0x-iyl1._.js +3 -0
  276. package/.next/standalone/.next/server/chunks/ssr/src_lib_0yjmty1._.js +3 -0
  277. package/.next/standalone/.next/server/chunks/ssr/src_lib_13aevv6._.js +3 -0
  278. package/.next/standalone/.next/server/chunks/ssr/src_lib_worktree_ts_06cucy3._.js +1 -1
  279. package/.next/standalone/.next/server/functions-config-manifest.json +1 -0
  280. package/.next/standalone/.next/server/middleware-build-manifest.js +3 -3
  281. package/.next/standalone/.next/server/pages/500.html +1 -1
  282. package/.next/standalone/.next/server/server-reference-manifest.js +1 -1
  283. package/.next/standalone/.next/server/server-reference-manifest.json +327 -327
  284. package/.next/standalone/.next/static/chunks/0-tuek2jqf0el.js +1 -0
  285. package/.next/standalone/.next/static/chunks/0.-.jc~0b~hy0.js +1 -0
  286. package/.next/standalone/.next/static/chunks/{0.onaugl2w8ci.js → 0.~03w.uxge40.js} +1 -1
  287. package/.next/standalone/.next/static/chunks/01hdj_kw4z2zq.js +2 -0
  288. package/.next/standalone/.next/static/chunks/01j9m895w64zn.js +1 -0
  289. package/.next/standalone/.next/static/chunks/{040j8d.w8mkyn.js → 0346xrw6i2bwo.js} +1 -1
  290. package/.next/standalone/.next/static/chunks/{0x-ug4iz~~qr2.js → 041o.dh2lc-k3.js} +1 -1
  291. package/.next/standalone/.next/static/chunks/07i9j5yyg4vs3.js +1 -0
  292. package/.next/standalone/.next/static/chunks/{0bdwzhoelky9-.js → 08ooaq~-.8fzu.js} +1 -1
  293. package/.next/standalone/.next/static/chunks/{13.3woq55msp..js → 0bylodlncwfpb.js} +1 -1
  294. package/.next/standalone/.next/static/chunks/0cpwtqzrjdgvs.js +1 -0
  295. package/.next/standalone/.next/static/chunks/0c~e1-nst-ze-.js +1 -0
  296. package/.next/standalone/.next/static/chunks/0ddt-snh45031.js +1 -0
  297. package/.next/standalone/.next/static/chunks/{0ypd9eqm_pj-o.js → 0dv4anj-j523o.js} +1 -1
  298. package/.next/standalone/.next/static/chunks/{0.wxa05y455w7.js → 0gvfb.b8m_i8t.js} +1 -1
  299. package/.next/standalone/.next/static/chunks/{0dewfthzwmcwb.js → 0h77-u2vvr-a1.js} +1 -1
  300. package/.next/standalone/.next/static/chunks/{0_d04kox03m72.css → 0jrje~1gt6w85.css} +1 -1
  301. package/.next/standalone/.next/static/chunks/{0m~m1~si.ot17.js → 0lqp~-dlfenad.js} +1 -1
  302. package/.next/standalone/.next/static/chunks/0qkr26yz3bocs.js +1 -0
  303. package/.next/standalone/.next/static/chunks/{035a_v6g7ioyw.js → 0rcuiuax31_uh.js} +1 -1
  304. package/.next/standalone/.next/static/chunks/0uf~7eqel0zra.js +1 -0
  305. package/.next/standalone/.next/static/chunks/{0rozlwh3y46l0.js → 0uj-3ckujwaiy.js} +1 -1
  306. package/.next/standalone/.next/static/chunks/0w71r_sj_fibx.js +1 -0
  307. package/.next/standalone/.next/static/chunks/0xejm4ge9~cn..js +1 -0
  308. package/.next/standalone/.next/static/chunks/{02f8-ju2se8qw.js → 0xg6rcq6g4bbh.js} +1 -1
  309. package/.next/standalone/.next/static/chunks/0yff8rwmrl5m4.js +1 -0
  310. package/.next/standalone/.next/static/chunks/{0wcwdbtpm0~r6.js → 0ymipmkk2uqby.js} +1 -1
  311. package/.next/standalone/.next/static/chunks/0znfclapbniaa.js +1 -0
  312. package/.next/standalone/.next/static/chunks/{17fug-zaik-v~.js → 11pe3kpxuj33f.js} +1 -1
  313. package/.next/standalone/.next/static/chunks/172s9cg35qt7i.js +1 -0
  314. package/.next/standalone/.next/static/chunks/184-zu89wwa4u.js +1 -0
  315. package/.next/standalone/package.json +9 -9
  316. package/dist/mcp-server.cjs +152 -76
  317. package/next.config.ts +4 -0
  318. package/package.json +9 -9
  319. package/skills/tower/SKILL.md +6 -0
  320. package/.next/standalone/.next/server/chunks/[externals]__0izylsq._.js +0 -3
  321. package/.next/standalone/.next/server/chunks/[externals]__0m6hc.0._.js +0 -3
  322. package/.next/standalone/.next/server/chunks/[root-of-the-server]__0.tbb~k._.js +0 -3
  323. package/.next/standalone/.next/server/chunks/[root-of-the-server]__032d9pl._.js +0 -3
  324. package/.next/standalone/.next/server/chunks/[root-of-the-server]__04jduyo._.js +0 -3
  325. package/.next/standalone/.next/server/chunks/[root-of-the-server]__05zlbau._.js +0 -4
  326. package/.next/standalone/.next/server/chunks/[root-of-the-server]__05~g1fm._.js +0 -3
  327. package/.next/standalone/.next/server/chunks/[root-of-the-server]__075f7rs._.js +0 -4
  328. package/.next/standalone/.next/server/chunks/[root-of-the-server]__08b~~wj._.js +0 -3
  329. package/.next/standalone/.next/server/chunks/[root-of-the-server]__0bo_6v~._.js +0 -3
  330. package/.next/standalone/.next/server/chunks/[root-of-the-server]__0c7z.~a._.js +0 -3
  331. package/.next/standalone/.next/server/chunks/[root-of-the-server]__0e~6fr~._.js +0 -3
  332. package/.next/standalone/.next/server/chunks/[root-of-the-server]__0fey.8j._.js +0 -3
  333. package/.next/standalone/.next/server/chunks/[root-of-the-server]__0fxmnch._.js +0 -4
  334. package/.next/standalone/.next/server/chunks/[root-of-the-server]__0gr~8aq._.js +0 -3
  335. package/.next/standalone/.next/server/chunks/[root-of-the-server]__0hd.0to._.js +0 -3
  336. package/.next/standalone/.next/server/chunks/[root-of-the-server]__0j3l3l4._.js +0 -3
  337. package/.next/standalone/.next/server/chunks/[root-of-the-server]__0r-6wmj._.js +0 -3
  338. package/.next/standalone/.next/server/chunks/[root-of-the-server]__0rpck4h._.js +0 -3
  339. package/.next/standalone/.next/server/chunks/[root-of-the-server]__0skk0fd._.js +0 -3
  340. package/.next/standalone/.next/server/chunks/[root-of-the-server]__0t_yyy8._.js +0 -3
  341. package/.next/standalone/.next/server/chunks/[root-of-the-server]__0v2nkck._.js +0 -3
  342. package/.next/standalone/.next/server/chunks/[root-of-the-server]__0z20rmt._.js +0 -3
  343. package/.next/standalone/.next/server/chunks/[root-of-the-server]__11l3gud._.js +0 -3
  344. package/.next/standalone/.next/server/chunks/[root-of-the-server]__126b53k._.js +0 -4
  345. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0.-z9ts._.js +0 -3
  346. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__045k323._.js +0 -3
  347. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__087pocz._.js +0 -3
  348. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0c2mh1c._.js +0 -47
  349. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0gt5dbj._.js +0 -3
  350. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0ni-_7_._.js +0 -30
  351. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0y~ooou._.js +0 -3
  352. package/.next/standalone/.next/server/chunks/ssr/src_lib_0a60u40._.js +0 -3
  353. package/.next/standalone/.next/server/chunks/ssr/src_lib_0fu5szn._.js +0 -3
  354. package/.next/standalone/.next/server/chunks/ssr/src_lib_0gve57o._.js +0 -3
  355. package/.next/standalone/.next/server/chunks/ssr/src_lib_0koe0p0._.js +0 -3
  356. package/.next/standalone/.next/server/chunks/ssr/src_lib_0qdh-v4._.js +0 -3
  357. package/.next/standalone/.next/server/chunks/ssr/src_lib_0ramp4w._.js +0 -3
  358. package/.next/standalone/.next/server/chunks/ssr/src_lib_0sn1z-s._.js +0 -3
  359. package/.next/standalone/.next/server/chunks/ssr/src_lib_0x6grav._.js +0 -3
  360. package/.next/standalone/.next/server/chunks/ssr/src_lib_110am8v._.js +0 -3
  361. package/.next/standalone/.next/static/chunks/0-efd~h5j2ufi.js +0 -1
  362. package/.next/standalone/.next/static/chunks/0.z171pzeg-.7.js +0 -1
  363. package/.next/standalone/.next/static/chunks/01zlxs4rl~h_o.js +0 -1
  364. package/.next/standalone/.next/static/chunks/0af7afat3acfx.js +0 -1
  365. package/.next/standalone/.next/static/chunks/0ais32-8.3wlj.js +0 -1
  366. package/.next/standalone/.next/static/chunks/0f43x~jzb70f4.js +0 -1
  367. package/.next/standalone/.next/static/chunks/0i-x__600fys6.js +0 -1
  368. package/.next/standalone/.next/static/chunks/0l25d0nc5ygyd.js +0 -1
  369. package/.next/standalone/.next/static/chunks/0lyq0-a32.15m.js +0 -1
  370. package/.next/standalone/.next/static/chunks/0t8lz62rmr801.js +0 -2
  371. package/.next/standalone/.next/static/chunks/0utrquxfg25b2.js +0 -1
  372. package/.next/standalone/.next/static/chunks/0wcdxs4sl-gjf.js +0 -1
  373. package/.next/standalone/.next/static/chunks/0xj6v_80hlyv0.js +0 -1
  374. package/.next/standalone/.next/static/chunks/0xl7h5fsfc7zk.js +0 -1
  375. package/.next/standalone/.next/static/chunks/115ae91fq~slq.js +0 -1
  376. package/.next/standalone/.next/static/chunks/13rq33eiffqaz.js +0 -1
  377. /package/.next/standalone/.next/static/{LCBoYZWhXzs8PjuBmxw7g → dinNvsaC6aoPK_B7ZTeBv}/_buildManifest.js +0 -0
  378. /package/.next/standalone/.next/static/{LCBoYZWhXzs8PjuBmxw7g → dinNvsaC6aoPK_B7ZTeBv}/_clientMiddlewareManifest.js +0 -0
  379. /package/.next/standalone/.next/static/{LCBoYZWhXzs8PjuBmxw7g → dinNvsaC6aoPK_B7ZTeBv}/_ssgManifest.js +0 -0
@@ -0,0 +1 @@
1
+ (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,538059,(e,t,r)=>{t.exports=e.r(322195)},314757,e=>{"use strict";var t=e.i(965652);e.s(["useControlled",0,function({controlled:e,default:r,name:n,state:i="value"}){let{current:u}=t.useRef(void 0!==e),[l,a]=t.useState(r),o=t.useCallback(e=>{u||a(e)},[]);return[u?e:l,o]}])},584191,e=>{"use strict";e.s([])},890514,551974,e=>{"use strict";e.i(708878);var t,r=e.i(462902),n=e.i(965652),i=e.i(954588);let u=((t={}).disabled="data-disabled",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),l={badInput:!1,customError:!1,patternMismatch:!1,rangeOverflow:!1,rangeUnderflow:!1,stepMismatch:!1,tooLong:!1,tooShort:!1,typeMismatch:!1,valid:null,valueMissing:!1},a={valid:null,touched:!1,dirty:!1,filled:!1,focused:!1},o={disabled:!1,...a};e.s(["DEFAULT_FIELD_ROOT_STATE",0,o,"DEFAULT_FIELD_STATE_ATTRIBUTES",0,a,"DEFAULT_VALIDITY_STATE",0,l,"fieldValidityMapping",0,{valid:e=>null===e?null:e?{[u.valid]:""}:{[u.invalid]:""}}],551974);let s=n.createContext({invalid:void 0,name:void 0,validityData:{state:l,errors:[],error:"",value:"",initialValue:null},setValidityData:i.NOOP,disabled:void 0,touched:a.touched,setTouched:i.NOOP,dirty:a.dirty,setDirty:i.NOOP,filled:a.filled,setFilled:i.NOOP,focused:a.focused,setFocused:i.NOOP,validate:()=>null,validationMode:"onSubmit",validationDebounceTime:0,shouldValidateOnChange:()=>!1,state:o,markedDirtyRef:{current:!1},validation:{getValidationProps:(e=i.EMPTY_OBJECT)=>e,getInputValidationProps:(e=i.EMPTY_OBJECT)=>e,inputRef:{current:null},commit:async()=>{}}});e.s(["FieldRootContext",0,s,"useFieldRootContext",0,function(e=!0){let t=n.useContext(s);if(t.setValidityData===i.NOOP&&!e)throw Error((0,r.default)(28));return t}],890514)},350105,e=>{"use strict";var t=e.i(462902),r=e.i(965652);let n=r.createContext({legendId:void 0,setLegendId:()=>{},disabled:void 0});e.s(["useFieldsetRootContext",0,function(e=!1){let i=r.useContext(n);if(!i&&!e)throw Error((0,t.default)(86));return i}])},571870,e=>{"use strict";var t=e.i(965652),r=e.i(954588);let n=t.createContext({formRef:{current:{fields:new Map}},errors:{},clearErrors:r.NOOP,validationMode:"onSubmit",submitAttemptedRef:{current:!1}});e.s(["useFormContext",0,function(){return t.useContext(n)}])},179279,e=>{"use strict";var t=e.i(965652),r=e.i(954588);let n=t.createContext({controlId:void 0,registerControlId:r.NOOP,labelId:void 0,setLabelId:r.NOOP,messageIds:[],setMessageIds:r.NOOP,getDescriptionProps:e=>e});e.s(["LabelableContext",0,n,"useLabelableContext",0,function(){return t.useContext(n)}])},137122,e=>{"use strict";var t=e.i(965652),r=e.i(887642),n=e.i(903224),i=e.i(565455),u=e.i(207516),l=e.i(179279),a=e.i(289721);e.s(["LabelableProvider",0,function(e){let o=(0,u.useBaseUiId)(),s=void 0===e.controlId?o:e.controlId,[c,d]=t.useState(s),[f,v]=t.useState(e.labelId),[p,b]=t.useState([]),g=(0,n.useRefWithInit)(()=>new Map),{messageIds:m}=(0,l.useLabelableContext)(),h=(0,r.useStableCallback)((e,t)=>{let r=g.current;void 0===t?r.delete(e):(r.set(e,t),d(e=>{let t;if(0!==r.size){for(let n of r.values()){if(void 0!==e&&n===e)return e;void 0===t&&(t=n)}return t}}))}),y=t.useCallback(e=>(0,i.mergeProps)({"aria-describedby":m.concat(p).join(" ")||void 0},e),[m,p]),C=t.useMemo(()=>({controlId:c,registerControlId:h,labelId:f,setLabelId:v,messageIds:p,setMessageIds:b,getDescriptionProps:y}),[c,h,f,v,p,b,y]);return(0,a.jsx)(l.LabelableContext.Provider,{value:C,children:e.children})}])},956181,e=>{"use strict";e.s(["getCombinedFieldValidityData",0,function(e,t){return{...e,state:{...e.state,valid:!t&&e.state.valid}}}])},770652,e=>{"use strict";e.i(708878);var t=e.i(965652),r=e.i(887642),n=e.i(890514),i=e.i(551974),u=e.i(350105),l=e.i(571870),a=e.i(137122),o=e.i(581263),s=e.i(954588),c=e.i(161476),d=e.i(179279),f=e.i(565455),v=e.i(956181);let p=Object.keys(i.DEFAULT_VALIDITY_STATE);var b=e.i(289721);let g=t.forwardRef(function(e,a){let{errors:g,validationMode:m,submitAttemptedRef:h}=(0,l.useFormContext)(),{render:y,className:C,validate:E,validationDebounceTime:R=0,validationMode:I=m,name:x,disabled:O=!1,invalid:L,dirty:T,touched:S,actionsRef:M,...k}=e,{disabled:F}=(0,u.useFieldsetRootContext)(),A=(0,r.useStableCallback)(E||(()=>null)),P=F||O,[D,_]=t.useState(!1),[N,w]=t.useState(!1),[V,j]=t.useState(!1),[U,W]=t.useState(!1),B=T??N,G=S??D,K=t.useRef(!1),z=(0,r.useStableCallback)(e=>{void 0===T&&(e&&(K.current=!0),w(e))}),H=(0,r.useStableCallback)(e=>{void 0===S&&_(e)}),$=(0,r.useStableCallback)(()=>"onChange"===I||"onSubmit"===I&&h.current),q=!!x&&Object.hasOwn(g,x)&&void 0!==g[x],Y=!0===L||q,[J,X]=t.useState({state:i.DEFAULT_VALIDITY_STATE,error:"",errors:[],value:null,initialValue:null}),Q=!Y&&J.state.valid,Z=t.useMemo(()=>({disabled:P,touched:G,dirty:B,valid:Q,filled:V,focused:U}),[P,G,B,Q,V,U]),ee=function(e){let{formRef:n,clearErrors:u}=(0,l.useFormContext)(),{setValidityData:a,validate:o,validityData:b,validationDebounceTime:g,invalid:m,markedDirtyRef:h,state:y,name:C,shouldValidateOnChange:E}=e,{controlId:R,getDescriptionProps:I}=(0,d.useLabelableContext)(),x=(0,c.useTimeout)(),O=t.useRef(null),L=(0,r.useStableCallback)(async(e,t=!1)=>{let r,u=O.current;if(!u)return;if(t){if(!1!==y.valid)return;let t=u.validity;if(!t.valueMissing){let t={value:e,state:{...i.DEFAULT_VALIDITY_STATE,valid:!0},error:"",errors:[],initialValue:b.initialValue};if(u.setCustomValidity(""),R){let e=n.current.fields.get(R);e&&n.current.fields.set(R,{...e,...(0,v.getCombinedFieldValidityData)(t,!1)})}a(t);return}let r=p.reduce((e,r)=>(e[r]=t[r],e),{});if(!r.valid&&!function(e){if(!e||e.valid||!e.valueMissing)return!1;let t=!1;for(let r of p)"valid"!==r&&("valueMissing"===r&&(t=e[r]),e[r]&&(t=!1));return t}(r))return}x.clear();let l=null,s=[],c=function(e){let t=p.reduce((t,r)=>(t[r]=e.validity[r],t),{}),r=!1;for(let e of p)if("valid"!==e){if("valueMissing"===e&&t[e])r=!0;else if(t[e])return t}return r&&!h.current&&(t.valid=!0,t.valueMissing=!1),t}(u),d=E();if(u.validationMessage&&!d)r=u.validationMessage,s=[u.validationMessage];else{let t=o(e,Array.from(n.current.fields.values()).reduce((e,t)=>(t.name&&(e[t.name]=t.getValue()),e),{}));null!==(l="object"==typeof t&&null!==t&&"then"in t?await t:t)?(c.valid=!1,c.customError=!0,Array.isArray(l)?(s=l,u.setCustomValidity(l.join("\n"))):l&&(s=[l],u.setCustomValidity(l))):d&&(u.setCustomValidity(""),c.customError=!1,u.validationMessage?(r=u.validationMessage,s=[u.validationMessage]):u.validity.valid&&!c.valid&&(c.valid=!0))}let f={value:e,state:c,error:r??(Array.isArray(l)?l[0]:l??""),errors:s,initialValue:b.initialValue};if(R){let e=n.current.fields.get(R);e&&n.current.fields.set(R,{...e,...(0,v.getCombinedFieldValidityData)(f,m)})}a(f)}),T=t.useCallback((e={})=>(0,f.mergeProps)(I,!1===y.valid?{"aria-invalid":!0}:s.EMPTY_OBJECT,e),[I,y.valid]),S=t.useCallback((e={})=>(0,f.mergeProps)({onChange(e){if(e.nativeEvent.defaultPrevented)return;if(u(C),!E())return void L(e.currentTarget.value,!0);let t=e.currentTarget;""===t.value?L(t.value):(x.clear(),g?x.start(g,()=>{L(t.value)}):L(t.value))}},T(e)),[T,u,C,x,L,g,E]);return t.useMemo(()=>({getValidationProps:T,getInputValidationProps:S,inputRef:O,commit:L}),[T,S,L])}({setValidityData:X,validate:A,validityData:J,validationDebounceTime:R,invalid:Y,markedDirtyRef:K,state:Z,name:x,shouldValidateOnChange:$}),et=t.useCallback(()=>{K.current=!0,ee.commit(J.value)},[ee,J]);t.useImperativeHandle(M,()=>({validate:et}),[et]);let er=t.useMemo(()=>({invalid:Y,name:x,validityData:J,setValidityData:X,disabled:P,touched:G,setTouched:H,dirty:B,setDirty:z,filled:V,setFilled:j,focused:U,setFocused:W,validate:A,validationMode:I,validationDebounceTime:R,shouldValidateOnChange:$,state:Z,markedDirtyRef:K,validation:ee}),[Y,x,J,P,G,H,B,z,V,j,U,W,A,I,R,$,Z,ee]),en=(0,o.useRenderElement)("div",e,{ref:a,state:Z,props:k,stateAttributesMapping:i.fieldValidityMapping});return(0,b.jsx)(n.FieldRootContext.Provider,{value:er,children:en})}),m=t.forwardRef(function(e,t){return(0,b.jsx)(a.LabelableProvider,{children:(0,b.jsx)(g,{...e,ref:t})})});e.s(["FieldRoot",0,m],770652)},397791,e=>{"use strict";var t=e.i(92615),r=e.i(102094),n=e.i(887642),i=e.i(682354),u=e.i(804849),l=e.i(207516),a=e.i(179279);e.s(["useLabel",0,function(e={}){let o,{id:s,fallbackControlId:c,native:d=!1,setLabelId:f,focusControl:v}=e,{controlId:p,setLabelId:b}=(0,a.useLabelableContext)(),g=(0,n.useStableCallback)(e=>{b(e),f?.(e)}),m=(o=(0,l.useBaseUiId)(s),(0,u.useIsoLayoutEffect)(()=>(g(o),()=>{g(void 0)}),[o,g]),o),h=p??c;function y(e){let n=(0,i.getTarget)(e.nativeEvent);n?.closest("button,input,select,textarea")||(!e.defaultPrevented&&e.detail>1&&e.preventDefault(),d||function(e){if(v)return v(e,h);if(!h)return;let n=(0,r.ownerDocument)(e.currentTarget).getElementById(h);(0,t.isHTMLElement)(n)&&n.focus({focusVisible:!0})}(e))}return d?{id:m,htmlFor:h??void 0,onMouseDown:y}:{id:m,onClick:y,onPointerDown(e){e.preventDefault()}}}],397791)},219040,935219,731836,e=>{"use strict";e.i(708878);var t=e.i(965652),r=e.i(890514),n=e.i(551974),i=e.i(581263),u=e.i(179279),l=e.i(397791);let a=t.forwardRef(function(e,a){let{render:o,className:s,id:c,nativeLabel:d=!0,...f}=e,v=(0,r.useFieldRootContext)(!1),{labelId:p}=(0,u.useLabelableContext)(),b=t.useRef(null),g=(0,l.useLabel)({id:p??c,native:d});return(0,i.useRenderElement)("label",e,{ref:[a,b],state:v.state,props:[g,f],stateAttributesMapping:n.fieldValidityMapping})});e.s(["FieldLabel",0,a],219040);var o=e.i(804849),s=e.i(571870),c=e.i(207516),d=e.i(504068),f=e.i(809058),v=e.i(193214),p=e.i(289721);let b={...n.fieldValidityMapping,...f.transitionStatusMapping},g=t.forwardRef(function(e,n){let{render:l,id:a,className:f,match:g,...m}=e,h=(0,c.useBaseUiId)(a),{validityData:y,state:C,name:E}=(0,r.useFieldRootContext)(!1),{setMessageIds:R}=(0,u.useLabelableContext)(),{errors:I}=(0,s.useFormContext)(),x=E?I[E]:null,O=!1;O=!!x||!0===g||(g?!!y.state[g]:!1===y.state.valid);let{mounted:L,transitionStatus:T,setMounted:S}=(0,v.useTransitionStatus)(O);(0,o.useIsoLayoutEffect)(()=>{if(O&&h)return R(e=>e.concat(h)),()=>{R(e=>e.filter(e=>e!==h))}},[O,h,R]);let M=t.useRef(null),[k,F]=t.useState(null),[A,P]=t.useState(null),D=x||(y.errors.length>1?(0,p.jsx)("ul",{children:y.errors.map(e=>(0,p.jsx)("li",{children:e},e))}):y.error),_=y.error;null!=x?_=Array.isArray(x)?JSON.stringify(x):x:y.errors.length>1&&(_=JSON.stringify(y.errors)),O&&_!==A&&(P(_),F(D)),(0,d.useOpenChangeComplete)({open:O,ref:M,onComplete(){O||S(!1)}});let N={...C,transitionStatus:T},w=(0,i.useRenderElement)("div",e,{ref:[n,M],state:N,props:[{id:h,children:O?D:k},m],stateAttributesMapping:b,enabled:L});return L?w:null});e.s(["FieldError",0,g],935219);let m=t.forwardRef(function(e,t){let{render:l,id:a,className:s,...d}=e,f=(0,c.useBaseUiId)(a),v=(0,r.useFieldRootContext)(!1),{setMessageIds:p}=(0,u.useLabelableContext)();return(0,o.useIsoLayoutEffect)(()=>{if(f)return p(e=>e.concat(f)),()=>{p(e=>e.filter(e=>e!==f))}},[f,p]),(0,i.useRenderElement)("p",e,{ref:t,state:v.state,props:[{id:f},d],stateAttributesMapping:n.fieldValidityMapping})});e.s(["FieldDescription",0,m],731836)},103353,e=>{"use strict";var t=e.i(965652),r=e.i(804849),n=e.i(887642),i=e.i(903224),u=e.i(92615),l=e.i(954588),a=e.i(207516),o=e.i(179279);e.s(["useLabelableId",0,function(e={}){let{id:s,implicit:c=!1,controlRef:d}=e,{controlId:f,registerControlId:v}=(0,o.useLabelableContext)(),p=(0,a.useBaseUiId)(s),b=c?f:void 0,g=(0,i.useRefWithInit)(()=>Symbol("labelable-control")),m=t.useRef(!1),h=t.useRef(null!=s),y=(0,n.useStableCallback)(()=>{m.current&&v!==l.NOOP&&(m.current=!1,v(g.current,void 0))});return(0,r.useIsoLayoutEffect)(()=>{let e;if(v!==l.NOOP){if(c){let t=d?.current;e=(0,u.isElement)(t)&&null!=t.closest("label")?s??null:b??p}else if(null!=s)h.current=!0,e=s;else{if(!h.current)return void y();e=p}if(void 0===e)return void y();m.current=!0,v(g.current,e)}},[s,d,b,v,c,p,g,y]),t.useEffect(()=>y,[y]),f??p}])},421689,e=>{"use strict";var t=e.i(585012),r=e.i(804849),n=e.i(887642),i=e.i(956181),u=e.i(571870),l=e.i(890514);e.s(["useField",0,function(e){let{enabled:a=!0,value:o,id:s,name:c,controlRef:d,commit:f}=e,{formRef:v}=(0,u.useFormContext)(),{invalid:p,markedDirtyRef:b,validityData:g,setValidityData:m}=(0,l.useFieldRootContext)(),h=(0,n.useStableCallback)(e.getValue);(0,r.useIsoLayoutEffect)(()=>{if(!a)return;let e=o;void 0===e&&(e=h()),null===g.initialValue&&null!==e&&m(t=>({...t,initialValue:e}))},[a,m,o,g.initialValue,h]),(0,r.useIsoLayoutEffect)(()=>{a&&s&&v.current.fields.set(s,{getValue:h,name:c,controlRef:d,validityData:(0,i.getCombinedFieldValidityData)(g,p),validate(e=!0){let r=o;void 0===r&&(r=h()),b.current=!0,e?t.flushSync(()=>f(r)):f(r)}})},[f,d,a,v,h,s,p,b,c,g,o]),(0,r.useIsoLayoutEffect)(()=>{let e=v.current.fields;return()=>{s&&e.delete(s)}},[v,s])}])},793479,971667,756499,e=>{"use strict";var t=e.i(289721);e.i(708878);var r=e.i(965652);e.i(584191);var n=e.i(770652),i=e.i(219040),u=e.i(935219),l=e.i(731836),a=e.i(314757),o=e.i(804849),s=e.i(102094),c=e.i(890514),d=e.i(179279),f=e.i(103353),v=e.i(551974),p=e.i(581263),b=e.i(421689),g=e.i(67077),m=e.i(586622),h=e.i(682354);let y=r.forwardRef(function(e,t){let{render:n,className:i,id:u,name:l,value:y,disabled:C=!1,onValueChange:E,defaultValue:R,autoFocus:I=!1,...x}=e,{state:O,name:L,disabled:T,setTouched:S,setDirty:M,validityData:k,setFocused:F,setFilled:A,validationMode:P,validation:D}=(0,c.useFieldRootContext)(),_=T||C,N=L??l,w={...O,disabled:_},{labelId:V}=(0,d.useLabelableContext)(),j=(0,f.useLabelableId)({id:u});(0,o.useIsoLayoutEffect)(()=>{let e=null!=y;D.inputRef.current?.value||e&&""!==y?A(!0):e&&""===y&&A(!1)},[D.inputRef,A,y]);let U=r.useRef(null);(0,o.useIsoLayoutEffect)(()=>{I&&U.current===(0,h.activeElement)((0,s.ownerDocument)(U.current))&&F(!0)},[I,F]);let[W]=(0,a.useControlled)({controlled:y,default:R,name:"FieldControl",state:"value"}),B=void 0!==y,G=B?W:void 0;return(0,b.useField)({id:j,name:N,commit:D.commit,value:G,getValue:()=>D.inputRef.current?.value,controlRef:D.inputRef}),(0,p.useRenderElement)("input",e,{ref:[t,U],state:w,props:[{id:j,disabled:_,name:N,ref:D.inputRef,"aria-labelledby":V,autoFocus:I,...B?{value:G}:{defaultValue:R},onChange(e){let t=e.currentTarget.value;E?.(t,(0,g.createChangeEventDetails)(m.REASONS.none,e.nativeEvent)),M(t!==k.initialValue),A(""!==t)},onFocus(){F(!0)},onBlur(e){S(!0),F(!1),"onBlur"===P&&D.commit(e.currentTarget.value)},onKeyDown(e){"INPUT"===e.currentTarget.tagName&&"Enter"===e.key&&(S(!0),D.commit(e.currentTarget.value))}},D.getInputValidationProps(),x],stateAttributesMapping:v.fieldValidityMapping})});var C=e.i(956181),E=e.i(193214);let R=r.createContext({disabled:!1});e.s(["FieldItemContext",0,R,"useFieldItemContext",0,function(){return r.useContext(R)}],971667);var I=e.i(137122),x=e.i(462902);let O=r.createContext(void 0);function L(e=!0){let t=r.useContext(O);if(void 0===t&&!e)throw Error((0,x.default)(3));return t}e.s(["useCheckboxGroupContext",0,L],756499);let T=r.forwardRef(function(e,n){let{render:i,className:u,disabled:l=!1,...a}=e,{state:o,disabled:s}=(0,c.useFieldRootContext)(!1),d=s||l,f=L(),b=f?.parent.id,g=f?.allValues!==void 0,m=r.useMemo(()=>({disabled:d}),[d]),h=(0,p.useRenderElement)("div",e,{ref:n,state:o,props:a,stateAttributesMapping:v.fieldValidityMapping});return(0,t.jsx)(I.LabelableProvider,{controlId:g?b:void 0,children:(0,t.jsx)(R.Provider,{value:m,children:h})})});e.s(["Control",0,y,"Description",()=>l.FieldDescription,"Error",()=>u.FieldError,"Item",0,T,"Label",()=>i.FieldLabel,"Root",()=>n.FieldRoot,"Validity",0,function(e){let{children:n}=e,{validityData:i,invalid:u}=(0,c.useFieldRootContext)(!1),l=r.useMemo(()=>(0,C.getCombinedFieldValidityData)(i,u),[i,u]),a=!1===l.state.valid,{transitionStatus:o}=(0,E.useTransitionStatus)(a),s=r.useMemo(()=>({...l,validity:l.state,transitionStatus:o}),[l,o]);return(0,t.jsx)(r.Fragment,{children:n(s)})}],52388);var S=e.i(52388),S=S;let M=r.forwardRef(function(e,r){return(0,t.jsx)(S.Control,{ref:r,...e})});var k=e.i(975157);e.s(["Input",0,function({className:e,type:r,...n}){return(0,t.jsx)(M,{type:r,"data-slot":"input",className:(0,k.cn)("h-8 w-full min-w-0 rounded-lg border border-input bg-transparent px-2.5 py-1 text-base transition-colors outline-none file:inline-flex file:h-6 file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 disabled:pointer-events-none disabled:cursor-not-allowed disabled:bg-input/50 disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 md:text-sm dark:bg-input/30 dark:disabled:bg-input/80 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40",e),...n})}],793479)},792566,e=>{"use strict";let t=(0,e.i(572989).default)("chevron-up",[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]]);e.s(["default",0,t])},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])},533133,e=>{"use strict";var t=e.i(152279);e.s(["CheckIcon",()=>t.default])},597746,e=>{"use strict";var t=e.i(152279);e.s(["Check",()=>t.default])},453889,e=>{"use strict";let t=(0,e.i(572989).default)("folder-open",[["path",{d:"m6 14 1.5-2.9A2 2 0 0 1 9.24 10H20a2 2 0 0 1 1.94 2.5l-1.54 6a2 2 0 0 1-1.95 1.5H4a2 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.9H18a2 2 0 0 1 2 2v2",key:"usdka0"}]]);e.s(["FolderOpen",0,t],453889)},226145,e=>{"use strict";let t=(0,e.i(572989).default)("git-branch",[["path",{d:"M15 6a9 9 0 0 0-9 9V3",key:"1cii5b"}],["circle",{cx:"18",cy:"6",r:"3",key:"1h7g24"}],["circle",{cx:"6",cy:"18",r:"3",key:"fqmcym"}]]);e.s(["GitBranch",0,t],226145)},611893,e=>{"use strict";var t=e.i(965652);let r=t.createContext({register:()=>{},unregister:()=>{},subscribeMapChange:()=>()=>{},elementsRef:{current:[]},nextIndexRef:{current:0}});e.s(["CompositeListContext",0,r,"useCompositeListContext",0,function(){return t.useContext(r)}])},655728,e=>{"use strict";var t,r=e.i(965652),n=e.i(804849),i=e.i(611893);let u=((t={})[t.None=0]="None",t[t.GuessFromOrder=1]="GuessFromOrder",t);e.s(["IndexGuessBehavior",0,u,"useCompositeListItem",0,function(e={}){let{label:t,metadata:l,textRef:a,indexGuessBehavior:o,index:s}=e,{register:c,unregister:d,subscribeMapChange:f,elementsRef:v,labelsRef:p,nextIndexRef:b}=(0,i.useCompositeListContext)(),g=r.useRef(-1),[m,h]=r.useState(s??(o===u.GuessFromOrder?()=>{if(-1===g.current){let e=b.current;b.current+=1,g.current=e}return g.current}:-1)),y=r.useRef(null),C=r.useCallback(e=>{if(y.current=e,-1!==m&&null!==e&&(v.current[m]=e,p)){let r=void 0!==t;p.current[m]=r?t:a?.current?.textContent??e.textContent}},[m,v,p,t,a]);return(0,n.useIsoLayoutEffect)(()=>{if(null!=s)return;let e=y.current;if(e)return c(e,l),()=>{d(e)}},[s,c,d,l]),(0,n.useIsoLayoutEffect)(()=>{if(null==s)return f(e=>{let t=y.current?e.get(y.current)?.index:null;null!=t&&h(t)})},[s,f,h]),r.useMemo(()=>({ref:C,index:m}),[m,C])}])},579028,e=>{"use strict";var t=e.i(965652),r=e.i(903224),n=e.i(887642),i=e.i(804849),u=e.i(611893),l=e.i(289721);function a(){return new Map}function o(){return new Set}function s(e,t){let r=e.compareDocumentPosition(t);return r&Node.DOCUMENT_POSITION_FOLLOWING||r&Node.DOCUMENT_POSITION_CONTAINED_BY?-1:r&Node.DOCUMENT_POSITION_PRECEDING||r&Node.DOCUMENT_POSITION_CONTAINS?1:0}e.s(["CompositeList",0,function(e){let{children:c,elementsRef:d,labelsRef:f,onMapChange:v}=e,p=(0,n.useStableCallback)(v),b=t.useRef(0),g=(0,r.useRefWithInit)(o).current,m=(0,r.useRefWithInit)(a).current,[h,y]=t.useState(0),C=t.useRef(h),E=(0,n.useStableCallback)((e,t)=>{m.set(e,t??null),C.current+=1,y(C.current)}),R=(0,n.useStableCallback)(e=>{m.delete(e),C.current+=1,y(C.current)}),I=t.useMemo(()=>{let e=new Map;return Array.from(m.keys()).filter(e=>e.isConnected).sort(s).forEach((t,r)=>{let n=m.get(t)??{};e.set(t,{...n,index:r})}),e},[m,h]);(0,i.useIsoLayoutEffect)(()=>{if("function"!=typeof MutationObserver||0===I.size)return;let e=new MutationObserver(e=>{let t=new Set,r=e=>t.has(e)?t.delete(e):t.add(e);e.forEach(e=>{e.removedNodes.forEach(r),e.addedNodes.forEach(r)}),0===t.size&&(C.current+=1,y(C.current))});return I.forEach((t,r)=>{r.parentElement&&e.observe(r.parentElement,{childList:!0})}),()=>{e.disconnect()}},[I]),(0,i.useIsoLayoutEffect)(()=>{C.current===h&&(d.current.length!==I.size&&(d.current.length=I.size),f&&f.current.length!==I.size&&(f.current.length=I.size),b.current=I.size),p(I)},[p,I,d,f,h]),(0,i.useIsoLayoutEffect)(()=>()=>{d.current=[]},[d]),(0,i.useIsoLayoutEffect)(()=>()=>{f&&(f.current=[])},[f]);let x=(0,n.useStableCallback)(e=>(g.add(e),()=>{g.delete(e)}));(0,i.useIsoLayoutEffect)(()=>{g.forEach(e=>e(I))},[g,I]);let O=t.useMemo(()=>({register:E,unregister:R,subscribeMapChange:x,elementsRef:d,labelsRef:f,nextIndexRef:b}),[E,R,x,d,f,b]);return(0,l.jsx)(u.CompositeListContext.Provider,{value:O,children:c})}])},234951,471959,748299,e=>{"use strict";e.i(708878);var t=e.i(965652),r=e.i(92615),n=e.i(20746),i=e.i(887642),u=e.i(804849),l=e.i(102094),a=e.i(682354),o=e.i(447594),s=e.i(358527),c=e.i(205995),d=e.i(67077),f=e.i(586622),v=e.i(777321),p=e.i(331033);function b(e,t,r){switch(e){case"vertical":return t;case"horizontal":return r;default:return t||r}}function g(e,t){return b(t,e===p.ARROW_UP||e===p.ARROW_DOWN,e===p.ARROW_LEFT||e===p.ARROW_RIGHT)}function m(e,t,r){return b(t,e===p.ARROW_DOWN,r?e===p.ARROW_LEFT:e===p.ARROW_RIGHT)||"Enter"===e||" "===e||""===e}e.s(["useListNavigation",0,function(e,h){let y="rootStore"in e?e.rootStore:e,C=y.useState("open"),E=y.useState("floatingElement"),R=y.useState("domReferenceElement"),I=y.context.dataRef,{listRef:x,activeIndex:O,onNavigate:L=()=>{},enabled:T=!0,selectedIndex:S=null,allowEscape:M=!1,loopFocus:k=!1,nested:F=!1,rtl:A=!1,virtual:P=!1,focusItemOnOpen:D="auto",focusItemOnHover:_=!0,openOnArrowKeyDown:N=!0,disabledIndices:w,orientation:V="vertical",parentOrientation:j,cols:U=1,id:W,resetOnPointerLeave:B=!0,externalTree:G}=h,K=(0,a.getFloatingFocusElement)(E),z=(0,n.useValueAsRef)(K),H=(0,c.useFloatingParentNodeId)(),$=(0,c.useFloatingTree)(G);(0,u.useIsoLayoutEffect)(()=>{I.current.orientation=V},[I,V]);let q=(0,a.isTypeableCombobox)(R),Y=t.useRef(D),J=t.useRef(S??-1),X=t.useRef(null),Q=t.useRef(!0),Z=(0,i.useStableCallback)(e=>{L(-1===J.current?null:J.current,e)}),ee=t.useRef(Z),et=t.useRef(!!E),er=t.useRef(C),en=t.useRef(!1),ei=t.useRef(!1),eu=(0,n.useValueAsRef)(w),el=(0,n.useValueAsRef)(C),ea=(0,n.useValueAsRef)(S),eo=(0,n.useValueAsRef)(B),es=(0,i.useStableCallback)(()=>{function e(e){P?$?.events.emit("virtualfocus",e):(0,v.enqueueFocus)(e,{sync:en.current,preventScroll:!0})}let t=x.current[J.current],r=ei.current;t&&e(t),(en.current?e=>e():requestAnimationFrame)(()=>{let n=x.current[J.current]||t;!n||(t||e(n),ed&&(r||!Q.current)&&n.scrollIntoView?.({block:"nearest",inline:"nearest"}))})});(0,u.useIsoLayoutEffect)(()=>{T&&(C&&E?(J.current=S??-1,Y.current&&null!=S&&(ei.current=!0,Z())):et.current&&(J.current=-1,ee.current()))},[T,C,E,S,Z]),(0,u.useIsoLayoutEffect)(()=>{if(T){if(!C){en.current=!1;return}if(E)if(null==O){if(en.current=!1,null!=ea.current)return;if(et.current&&(J.current=-1,es()),(!er.current||!et.current)&&Y.current&&(null!=X.current||!0===Y.current&&null==X.current)){let e=0,t=()=>{null==x.current[0]?(e<2&&(e?requestAnimationFrame:queueMicrotask)(t),e+=1):(J.current=null==X.current||m(X.current,V,A)||F?(0,s.getMinListIndex)(x):(0,s.getMaxListIndex)(x),X.current=null,Z())};t()}}else(0,s.isIndexOutOfListBounds)(x,O)||(J.current=O,es(),ei.current=!1)}},[T,C,E,O,ea,F,x,V,A,Z,es,eu]),(0,u.useIsoLayoutEffect)(()=>{if(!T||E||!$||P||!et.current)return;let e=$.nodesRef.current,t=e.find(e=>e.id===H)?.context?.elements.floating,r=(0,a.activeElement)((0,l.ownerDocument)(E)),n=e.some(e=>e.context&&(0,a.contains)(e.context.elements.floating,r));t&&!n&&Q.current&&t.focus({preventScroll:!0})},[T,E,$,H,P]),(0,u.useIsoLayoutEffect)(()=>{ee.current=Z,er.current=C,et.current=!!E}),(0,u.useIsoLayoutEffect)(()=>{C||(X.current=null,Y.current=D)},[C,D]);let ec=null!=O,ed=t.useMemo(()=>{function e(e){if(!el.current)return;let t=x.current.indexOf(e.currentTarget);-1!==t&&J.current!==t&&(J.current=t,Z(e))}return{onFocus(t){en.current=!0,e(t)},onClick:({currentTarget:e})=>e.focus({preventScroll:!0}),onMouseMove(t){en.current=!0,ei.current=!1,_&&e(t)},onPointerLeave(e){if(!el.current||!Q.current||"touch"===e.pointerType)return;en.current=!0;let t=e.relatedTarget;if(!(!_||x.current.includes(t))&&eo.current&&((0,v.enqueueFocus)(null,{sync:!0}),J.current=-1,Z(e),!P)){let e=z.current,t=(0,a.activeElement)((0,l.ownerDocument)(e));e&&(0,a.contains)(e,t)&&e.focus({preventScroll:!0})}}}},[el,z,_,x,Z,eo,P]),ef=t.useCallback(()=>j??$?.nodesRef.current.find(e=>e.id===H)?.context?.dataRef?.current.orientation,[H,$,j]),ev=(0,i.useStableCallback)(e=>{var t;let n,i;if(Q.current=!1,en.current=!0,229===e.which||!el.current&&e.currentTarget===z.current)return;if(F&&(t=e.key,n=A?t===p.ARROW_RIGHT:t===p.ARROW_LEFT,i=t===p.ARROW_UP,"both"===V||"horizontal"===V&&U&&U>1?"Escape"===t:b(V,n,i))){g(e.key,ef())||(0,o.stopEvent)(e),y.setOpen(!1,(0,d.createChangeEventDetails)(f.REASONS.listNavigation,e.nativeEvent)),(0,r.isHTMLElement)(R)&&(P?$?.events.emit("virtualfocus",R):R.focus());return}let u=J.current,l=(0,s.getMinListIndex)(x,w),c=(0,s.getMaxListIndex)(x,w);if(q||("Home"===e.key&&((0,o.stopEvent)(e),J.current=l,Z(e)),"End"===e.key&&((0,o.stopEvent)(e),J.current=c,Z(e))),U>1){let t=Array.from({length:x.current.length},()=>({width:1,height:1})),r=(0,s.createGridCellMap)(t,U,!1),n=r.findIndex(e=>null!=e&&!(0,s.isListIndexDisabled)(x,e,w)),i=r.reduce((e,t,r)=>null==t||(0,s.isListIndexDisabled)(x,t,w)?e:r,-1),u=r[(0,s.getGridNavigatedIndex)({current:r.map(e=>null!=e?x.current[e]:null)},{event:e,orientation:V,loopFocus:k,rtl:A,cols:U,disabledIndices:(0,s.getGridCellIndices)([...("function"!=typeof w?w:null)||x.current.map((e,t)=>(0,s.isListIndexDisabled)(x,t,w)?t:void 0),void 0],r),minIndex:n,maxIndex:i,prevIndex:(0,s.getGridCellIndexOfCorner)(J.current>c?l:J.current,t,r,U,e.key===p.ARROW_DOWN?"bl":e.key===(A?p.ARROW_LEFT:p.ARROW_RIGHT)?"tr":"tl"),stopEvent:!0})];if(null!=u&&(J.current=u,Z(e)),"both"===V)return}if(g(e.key,V)){if((0,o.stopEvent)(e),C&&!P&&(0,a.activeElement)(e.currentTarget.ownerDocument)===e.currentTarget){J.current=m(e.key,V,A)?l:c,Z(e);return}m(e.key,V,A)?k?u>=c?M&&u!==x.current.length?J.current=-1:(en.current=!1,J.current=l):J.current=(0,s.findNonDisabledListIndex)(x,{startingIndex:u,disabledIndices:w}):J.current=Math.min(c,(0,s.findNonDisabledListIndex)(x,{startingIndex:u,disabledIndices:w})):k?u<=l?M&&-1!==u?J.current=x.current.length:(en.current=!1,J.current=c):J.current=(0,s.findNonDisabledListIndex)(x,{startingIndex:u,decrement:!0,disabledIndices:w}):J.current=Math.max(l,(0,s.findNonDisabledListIndex)(x,{startingIndex:u,decrement:!0,disabledIndices:w})),(0,s.isIndexOutOfListBounds)(x,J.current)&&(J.current=-1),Z(e)}}),ep=t.useMemo(()=>P&&C&&ec&&{"aria-activedescendant":`${W}-${O}`},[P,C,ec,W,O]),eb=t.useMemo(()=>({"aria-orientation":"both"===V?void 0:V,...!q?ep:{},onKeyDown(e){if("Tab"===e.key&&e.shiftKey&&C&&!P){let t=(0,a.getTarget)(e.nativeEvent);if(t&&!(0,a.contains)(z.current,t))return;(0,o.stopEvent)(e),y.setOpen(!1,(0,d.createChangeEventDetails)(f.REASONS.focusOut,e.nativeEvent)),(0,r.isHTMLElement)(R)&&R.focus();return}ev(e)},onPointerMove(){Q.current=!0}}),[ep,ev,z,V,q,y,C,P,R]),eg=t.useMemo(()=>{function e(e){"auto"===D&&(0,o.isVirtualClick)(e.nativeEvent)&&(Y.current=!P)}function t(e){Y.current=D,"auto"===D&&(0,o.isVirtualPointerEvent)(e.nativeEvent)&&(Y.current=!0)}return{onKeyDown(e){var t,r;let n=y.select("open");Q.current=!1;let i=e.key.startsWith("Arrow"),u=(t=e.key,r=ef(),b(r,A?t===p.ARROW_LEFT:t===p.ARROW_RIGHT,t===p.ARROW_DOWN)),l=g(e.key,V),a=(F?u:l)||"Enter"===e.key||""===e.key.trim();if(P&&n)return ev(e);if(n||N||!i){if(a){let t=g(e.key,ef());X.current=F&&t?null:e.key}if(F){u&&((0,o.stopEvent)(e),n?(J.current=(0,s.getMinListIndex)(x,eu.current),Z(e)):y.setOpen(!0,(0,d.createChangeEventDetails)(f.REASONS.listNavigation,e.nativeEvent,e.currentTarget)));return}l&&(null!=ea.current&&(J.current=ea.current),(0,o.stopEvent)(e),!n&&N?y.setOpen(!0,(0,d.createChangeEventDetails)(f.REASONS.listNavigation,e.nativeEvent,e.currentTarget)):ev(e),n&&Z(e))}},onFocus(e){y.select("open")&&!P&&(J.current=-1,Z(e))},onPointerDown:t,onPointerEnter:t,onMouseDown:e,onClick:e}},[ev,eu,D,x,F,Z,y,N,V,ef,A,ea,P]),em=t.useMemo(()=>({...ep,...eg}),[ep,eg]);return t.useMemo(()=>T?{reference:em,floating:eb,item:ed,trigger:eg}:{},[T,em,eb,eg,ed])}],234951);var h=e.i(161476);e.s(["useTypeahead",0,function(e,r){let n="rootStore"in e?e.rootStore:e,l=n.context.dataRef,c=n.useState("open"),{listRef:d,elementsRef:f,activeIndex:v,onMatch:p,onTypingChange:b,enabled:g=!0,resetMs:m=750,selectedIndex:y=null}=r,C=(0,h.useTimeout)(),E=t.useRef(""),R=t.useRef(y??v??-1),I=t.useRef(null);(0,u.useIsoLayoutEffect)(()=>{(c||null===y)&&(C.clear(),I.current=null,""!==E.current&&(E.current=""))},[c,y,C]),(0,u.useIsoLayoutEffect)(()=>{c&&""===E.current&&(R.current=y??v??-1)},[c,y,v]);let x=(0,i.useStableCallback)(e=>{e?l.current.typing||(l.current.typing=e,b?.(e)):l.current.typing&&(l.current.typing=e,b?.(e))}),O=(0,i.useStableCallback)(e=>{function t(e,r,n=0){if(0===e.length)return -1;let i=(n%e.length+e.length)%e.length,u=r.toLocaleLowerCase();for(let t=0;t<e.length;t+=1){let r=(i+t)%e.length,n=e[r];if(n?.toLocaleLowerCase().startsWith(u)&&function(e){let t=f?.current[e];return!t||(0,s.isElementVisible)(t)}(r))return r}return -1}let r=d.current;if(E.current.length>0&&" "===e.key&&((0,o.stopEvent)(e),x(!0)),E.current.length>0&&" "!==E.current[0]&&-1===t(r,E.current)&&" "!==e.key&&x(!1),null==r||1!==e.key.length||e.ctrlKey||e.metaKey||e.altKey)return;c&&" "!==e.key&&((0,o.stopEvent)(e),x(!0));let n=""===E.current;n&&(R.current=y??v??-1),r.every(e=>!e||e[0]?.toLocaleLowerCase()!==e[1]?.toLocaleLowerCase())&&E.current===e.key&&(E.current="",R.current=I.current),E.current+=e.key,C.start(m,()=>{E.current="",R.current=I.current,x(!1)});let i=n?y??v??-1:R.current,u=t(r,E.current,(i??0)+1);-1!==u?(p?.(u),I.current=u):" "!==e.key&&(E.current="",x(!1))}),L=(0,i.useStableCallback)(e=>{let t=e.relatedTarget,r=n.select("domReferenceElement"),i=n.select("floatingElement"),u=(0,a.contains)(r,t),l=(0,a.contains)(i,t);u||l||(C.clear(),E.current="",R.current=I.current,x(!1))}),T=t.useMemo(()=>({onKeyDown:O,onBlur:L}),[O,L]),S=t.useMemo(()=>({onKeyDown:O,onBlur:L}),[O,L]);return t.useMemo(()=>g?{reference:T,floating:S}:{},[g,T,S])}],471959),e.s(["getPseudoElementBounds",0,function(e){let t=e.getBoundingClientRect(),r=window.getComputedStyle(e,"::before"),n=window.getComputedStyle(e,"::after");if("none"===r.content&&"none"===n.content)return t;let i=parseFloat(r.width)||0,u=parseFloat(r.height)||0,l=parseFloat(n.width)||0,a=parseFloat(n.height)||0,o=Math.max(t.width,i,l),s=Math.max(t.height,u,a),c=o-t.width,d=s-t.height;return{left:t.left-c/2,right:t.right+c/2,top:t.top-d/2,bottom:t.bottom+d/2}}],748299)},983640,e=>{"use strict";var t=e.i(965652),r=e.i(581263);let n=t.forwardRef(function(e,t){let{className:n,render:i,orientation:u="horizontal",...l}=e;return(0,r.useRenderElement)("div",e,{state:{orientation:u},ref:t,props:[{role:"separator","aria-orientation":u},l]})});e.s(["Separator",0,n])},314338,e=>{"use strict";let t=(0,e.i(572989).default)("chevron-down",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);e.s(["default",0,t])},501244,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n={formatUrl:function(){return a},formatWithValidation:function(){return s},urlObjectKeys:function(){return o}};for(var i in n)Object.defineProperty(r,i,{enumerable:!0,get:n[i]});let u=e.r(744066)._(e.r(565893)),l=/https?|ftp|gopher|file/;function a(e){let{auth:t,hostname:r}=e,n=e.protocol||"",i=e.pathname||"",a=e.hash||"",o=e.query||"",s=!1;t=t?encodeURIComponent(t).replace(/%3A/i,":")+"@":"",e.host?s=t+e.host:r&&(s=t+(~r.indexOf(":")?`[${r}]`:r),e.port&&(s+=":"+e.port)),o&&"object"==typeof o&&(o=String(u.urlQueryToSearchParams(o)));let c=e.search||o&&`?${o}`||"";return n&&!n.endsWith(":")&&(n+=":"),e.slashes||(!n||l.test(n))&&!1!==s?(s="//"+(s||""),i&&"/"!==i[0]&&(i="/"+i)):s||(s=""),a&&"#"!==a[0]&&(a="#"+a),c&&"?"!==c[0]&&(c="?"+c),i=i.replace(/[?#]/g,encodeURIComponent),c=c.replace("#","%23"),`${n}${s}${i}${c}${a}`}let o=["auth","hash","host","hostname","href","path","pathname","port","protocol","query","search","slashes"];function s(e){return a(e)}},668649,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"useMergedRef",{enumerable:!0,get:function(){return i}});let n=e.r(965652);function i(e,t){let r=(0,n.useRef)(null),i=(0,n.useRef)(null);return(0,n.useCallback)(n=>{if(null===n){let e=r.current;e&&(r.current=null,e());let t=i.current;t&&(i.current=null,t())}else e&&(r.current=u(e,n)),t&&(i.current=u(t,n))},[e,t])}function u(e,t){if("function"!=typeof e)return e.current=t,()=>{e.current=null};{let r=e(t);return"function"==typeof r?r:()=>e(null)}}("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)},927683,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"isLocalURL",{enumerable:!0,get:function(){return u}});let n=e.r(204575),i=e.r(394864);function u(e){if(!(0,n.isAbsoluteUrl)(e))return!0;try{let t=(0,n.getLocationOrigin)(),r=new URL(e,t);return r.origin===t&&(0,i.hasBasePath)(r.pathname)}catch(e){return!1}}},573088,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"errorOnce",{enumerable:!0,get:function(){return n}});let n=e=>{}},210702,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n={default:function(){return m},useLinkStatus:function(){return y}};for(var i in n)Object.defineProperty(r,i,{enumerable:!0,get:n[i]});let u=e.r(744066),l=e.r(289721),a=u._(e.r(965652)),o=e.r(501244),s=e.r(74122),c=e.r(668649),d=e.r(204575),f=e.r(44204);e.r(619172);let v=e.r(840535),p=e.r(255397),b=e.r(927683),g=e.r(530620);function m(t){var r,n;let i,u,m,[y,C]=(0,a.useOptimistic)(p.IDLE_LINK_STATUS),E=(0,a.useRef)(null),{href:R,as:I,children:x,prefetch:O=null,passHref:L,replace:T,shallow:S,scroll:M,onClick:k,onMouseEnter:F,onTouchStart:A,legacyBehavior:P=!1,onNavigate:D,transitionTypes:_,ref:N,unstable_dynamicOnHover:w,...V}=t;i=x,P&&("string"==typeof i||"number"==typeof i)&&(i=(0,l.jsx)("a",{children:i}));let j=a.default.useContext(s.AppRouterContext),U=!1!==O,W=!1!==O?null===(n=O)||"auto"===n?g.FetchStrategy.PPR:g.FetchStrategy.Full:g.FetchStrategy.PPR,B="string"==typeof(r=I||R)?r:(0,o.formatUrl)(r);if(P){if(i?.$$typeof===Symbol.for("react.lazy"))throw Object.defineProperty(Error("`<Link legacyBehavior>` received a direct child that is either a Server Component, or JSX that was loaded with React.lazy(). This is not supported. Either remove legacyBehavior, or make the direct child a Client Component that renders the Link's `<a>` tag."),"__NEXT_ERROR_CODE",{value:"E863",enumerable:!1,configurable:!0});u=a.default.Children.only(i)}let G=P?u&&"object"==typeof u&&u.ref:N,K=a.default.useCallback(e=>(null!==j&&(E.current=(0,p.mountLinkInstance)(e,B,j,W,U,C)),()=>{E.current&&((0,p.unmountLinkForCurrentNavigation)(E.current),E.current=null),(0,p.unmountPrefetchableInstance)(e)}),[U,B,j,W,C]),z={ref:(0,c.useMergedRef)(K,G),onClick(t){P||"function"!=typeof k||k(t),P&&u.props&&"function"==typeof u.props.onClick&&u.props.onClick(t),!j||t.defaultPrevented||function(t,r,n,i,u,l,o){if("u">typeof window){let s,{nodeName:c}=t.currentTarget;if("A"===c.toUpperCase()&&((s=t.currentTarget.getAttribute("target"))&&"_self"!==s||t.metaKey||t.ctrlKey||t.shiftKey||t.altKey||t.nativeEvent&&2===t.nativeEvent.which)||t.currentTarget.hasAttribute("download"))return;if(!(0,b.isLocalURL)(r)){i&&(t.preventDefault(),location.replace(r));return}if(t.preventDefault(),l){let e=!1;if(l({preventDefault:()=>{e=!0}}),e)return}let{dispatchNavigateAction:d}=e.r(238105);a.default.startTransition(()=>{d(r,i?"replace":"push",!1===u?v.ScrollBehavior.NoScroll:v.ScrollBehavior.Default,n.current,o)})}}(t,B,E,T,M,D,_)},onMouseEnter(e){P||"function"!=typeof F||F(e),P&&u.props&&"function"==typeof u.props.onMouseEnter&&u.props.onMouseEnter(e),j&&U&&(0,p.onNavigationIntent)(e.currentTarget,!0===w)},onTouchStart:function(e){P||"function"!=typeof A||A(e),P&&u.props&&"function"==typeof u.props.onTouchStart&&u.props.onTouchStart(e),j&&U&&(0,p.onNavigationIntent)(e.currentTarget,!0===w)}};return(0,d.isAbsoluteUrl)(B)?z.href=B:P&&!L&&("a"!==u.type||"href"in u.props)||(z.href=(0,f.addBasePath)(B)),m=P?a.default.cloneElement(u,z):(0,l.jsx)("a",{...V,...z,children:i}),(0,l.jsx)(h.Provider,{value:y,children:m})}e.r(573088);let h=(0,a.createContext)(p.IDLE_LINK_STATUS),y=()=>(0,a.useContext)(h);("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)}]);
@@ -1 +1 @@
1
- (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,882651,181209,e=>{"use strict";var s=e.i(59737);e.s(["CheckCircle2",()=>s.default],882651);let t=(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(["XCircle",0,t],181209)},236967,e=>{"use strict";var s=e.i(289721),t=e.i(210702),r=e.i(538059),a=e.i(259846),n=e.i(645378),l=e.i(453889),i=e.i(487278),c=e.i(533499);let o=[{key:"notes",icon:n.FileText},{key:"assets",icon:l.FolderOpen},{key:"archive",icon:i.Archive}];e.s(["SubPageNav",0,function({workspaceId:e}){let{t:n}=(0,c.useI18n)(),l=(0,r.usePathname)(),i=o.find(e=>l.includes(`/${e.key}`))?.key;return(0,s.jsxs)("div",{className:"header-sm flex items-center gap-1 px-4",children:[(0,s.jsxs)(t.default,{href:`/workspaces/${e}`,className:"mr-2 inline-flex h-8 items-center gap-1.5 rounded-md px-2 text-xs text-muted-foreground transition-colors hover:bg-accent hover:text-foreground",children:[(0,s.jsx)(a.ArrowLeft,{className:"h-3.5 w-3.5"}),(0,s.jsx)("span",{children:n("archive.backToBoard")})]}),(0,s.jsx)("span",{className:"mr-2 h-4 w-px bg-border"}),o.map(r=>{let a=r.icon,l=i===r.key;return(0,s.jsxs)(t.default,{href:`/workspaces/${e}/${r.key}`,className:`inline-flex h-8 items-center gap-1.5 rounded-md px-3 text-xs font-medium transition-colors ${l?"bg-accent text-foreground":"text-muted-foreground hover:bg-accent/50 hover:text-foreground"}`,children:[(0,s.jsx)(a,{className:"h-3.5 w-3.5"}),(0,s.jsx)("span",{children:n(`sidebar.${r.key}`)})]},r.key)})]})}])},107830,e=>{"use strict";var s=e.i(289721),t=e.i(965652),r=e.i(487278),a=e.i(882651),n=e.i(181209),l=e.i(400355),i=e.i(738690),c=e.i(967489),o=e.i(533499),d=e.i(236967),u=e.i(514798);let m=(0,u.createServerReference)("40890989cf97b3f789237f6621abbe12d45277b1b2",u.callServer,void 0,u.findSourceMapURL,"getArchivedTasks");var x=e.i(605005),h=e.i(35967);function p(e){return new Date(e).toLocaleDateString("zh-CN",{year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit"})}function g({priority:e}){return(0,s.jsx)("span",{className:`inline-block h-1.5 w-1.5 rounded-full ${{LOW:"bg-slate-400",MEDIUM:"bg-amber-400",HIGH:"bg-orange-500",CRITICAL:"bg-rose-500"}[e]??"bg-slate-400"}`})}e.s(["ArchivePageClient",0,function({allWorkspaces:e,initialWorkspaceId:u,initialProjectId:f,initialTasks:v}){let b,{t:j}=(0,o.useI18n)(),[N,k]=(0,t.useTransition)(),[y,w]=(0,t.useState)(u),[C,S]=(0,t.useState)(f),[T,A]=(0,t.useState)(v),[$,I]=(0,t.useState)(null),[D,L]=(0,t.useState)(""),P=e.find(e=>e.id===y),E=P?.projects??[],O=D.trim().toLowerCase(),z=O?T.filter(e=>e.title.toLowerCase().includes(O)):T,R=(0,t.useCallback)(e=>{e?k(async()=>{A(await m(e))}):A([])},[k]);return(0,s.jsxs)("div",{className:"flex h-full flex-col overflow-hidden",children:[(0,s.jsx)(d.SubPageNav,{workspaceId:y}),(0,s.jsxs)("div",{className:"header-sm flex items-center gap-3 px-6 py-2",children:[(0,s.jsxs)(c.Select,{value:y,onValueChange:s=>s&&(s=>{if(s===y)return;w(s);let t=e.find(e=>e.id===s),r=t?.projects[0]??null;S(r?.id??null),R(r?.id??null)})(s),children:[(0,s.jsx)(c.SelectTrigger,{className:"h-8 w-auto min-w-[120px]",children:(0,s.jsx)("span",{className:"truncate",children:P?.name??y})}),(0,s.jsx)(c.SelectContent,{children:e.map(e=>(0,s.jsx)(c.SelectItem,{value:e.id,children:e.name},e.id))})]}),E.length>0&&(0,s.jsxs)(c.Select,{value:C??"",onValueChange:e=>e&&void(e!==C&&(S(e),R(e))),children:[(0,s.jsx)(c.SelectTrigger,{className:"h-8 w-auto min-w-[140px]",children:(0,s.jsx)("span",{className:"truncate",children:(b=E.find(e=>e.id===C))?b.alias?`${b.name} (${b.alias})`:b.name:""})}),(0,s.jsx)(c.SelectContent,{children:E.map(e=>(0,s.jsxs)(c.SelectItem,{value:e.id,children:[e.name,e.alias?` (${e.alias})`:""]},e.id))})]}),(0,s.jsxs)("div",{className:"relative ml-auto",children:[(0,s.jsx)(i.Search,{className:"pointer-events-none absolute left-2.5 top-1/2 h-3.5 w-3.5 -translate-y-1/2 text-muted-foreground"}),(0,s.jsx)("input",{type:"text",value:D,onChange:e=>L(e.target.value),placeholder:j("archive.searchPlaceholder"),className:"h-8 w-48 rounded-md border border-border bg-background pl-8 pr-3 text-sm text-foreground placeholder:text-muted-foreground focus:outline-none focus:ring-1 focus:ring-ring"})]}),(0,s.jsxs)("span",{className:"rounded-full bg-muted px-2.5 py-0.5 text-[11px] text-muted-foreground",children:[z.length," ",j("archive.tasksCount")]})]}),(0,s.jsx)("div",{className:"flex-1 overflow-auto px-6 py-4",children:(0,s.jsxs)("div",{className:`relative ${N?"opacity-40 pointer-events-none":""} transition-opacity`,children:[N&&(0,s.jsx)("div",{className:"absolute inset-0 z-10 flex items-center justify-center",children:(0,s.jsx)(l.Loader2,{className:"size-5 animate-spin text-muted-foreground"})}),0===z.length?(0,s.jsxs)("div",{className:"flex h-full flex-col items-center justify-center gap-2 py-16 text-center",children:[(0,s.jsx)(r.Archive,{className:"h-10 w-10 text-muted-foreground/30"}),(0,s.jsx)("p",{className:"text-sm font-medium text-muted-foreground",children:O?j("archive.noSearchResults"):j("archive.noTasks")}),(0,s.jsx)("p",{className:"text-xs text-muted-foreground/60",children:O?j("archive.noSearchResultsDesc"):j("archive.noTasksDesc")})]}):(0,s.jsx)("div",{className:"space-y-2",children:z.map(e=>{let t="DONE"===e.status,r=e.executions[0];return(0,s.jsx)("div",{role:"button",tabIndex:0,onClick:()=>I(e.id),onKeyDown:s=>{("Enter"===s.key||" "===s.key)&&(s.preventDefault(),I(e.id))},className:"group cursor-pointer rounded-lg border border-border bg-card px-4 py-3 transition-colors hover:border-border/80 hover:bg-accent/30 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 focus:ring-offset-background",children:(0,s.jsxs)("div",{className:"flex items-start gap-3",children:[(0,s.jsx)("div",{className:"mt-0.5 shrink-0",children:t?(0,s.jsx)(a.CheckCircle2,{className:"h-4 w-4 text-emerald-500"}):(0,s.jsx)(n.XCircle,{className:"h-4 w-4 text-rose-500"})}),(0,s.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,s.jsxs)("div",{className:"flex items-center gap-2",children:[(0,s.jsx)(g,{priority:e.priority}),(0,s.jsx)("span",{className:"truncate text-sm font-medium text-foreground",children:e.title}),(0,s.jsx)("span",{className:`ml-1 shrink-0 rounded-full px-2 py-0.5 text-[10px] font-medium ${t?"bg-emerald-500/10 text-emerald-400 ring-1 ring-emerald-500/20":"bg-rose-500/10 text-rose-400 ring-1 ring-rose-500/20"}`,children:t?j("archive.status.done"):j("archive.status.cancelled")}),e.version&&(0,s.jsx)(h.TaskVersionTag,{number:e.version.number,name:e.version.name,showName:!0,className:"shrink-0"})]}),e.labels.length>0&&(0,s.jsx)("div",{className:"mt-1.5 flex flex-wrap gap-1",children:e.labels.map(e=>(0,s.jsx)("span",{className:"rounded-full px-1.5 py-0.5 text-[10px] font-medium",style:{backgroundColor:`${e.label.color}20`,color:e.label.color,outline:`1px solid ${e.label.color}40`},children:e.label.name},e.label.id))}),(0,s.jsxs)("div",{className:"mt-2 flex flex-wrap items-center gap-3 text-[11px] text-muted-foreground",children:[(0,s.jsxs)("span",{children:[j("archive.createdAt"),": ",p(e.createdAt)]}),(0,s.jsxs)("span",{children:[t?j("archive.completedAt"):j("archive.cancelledAt"),": ",p(e.updatedAt)]}),r&&(0,s.jsxs)("span",{className:"flex items-center gap-1",children:[j("archive.lastExecution"),":"," ",(0,s.jsx)("span",{className:`rounded px-1 py-0.5 font-mono text-[10px] ${"COMPLETED"===r.status?"bg-emerald-500/10 text-emerald-400":"FAILED"===r.status?"bg-rose-500/10 text-rose-400":"bg-amber-500/10 text-amber-400"}`,children:r.status})]})]})]})]})},e.id)})})]})}),(0,s.jsx)(x.TaskOverviewDrawer,{open:!!$,onOpenChange:e=>{e||I(null)},taskId:$,hideEnvActions:!0})]})}],107830)},244455,e=>{e.v(s=>Promise.all(["static/chunks/075e-zs_kgc_g.js"].map(s=>e.l(s))).then(()=>s(629495)))},800307,e=>{e.v(s=>Promise.all(["static/chunks/0zm4fvu.lntrp.js"].map(s=>e.l(s))).then(()=>s(267483)))}]);
1
+ (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,882651,181209,e=>{"use strict";var s=e.i(59737);e.s(["CheckCircle2",()=>s.default],882651);let t=(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(["XCircle",0,t],181209)},236967,e=>{"use strict";var s=e.i(289721),t=e.i(210702),a=e.i(538059),r=e.i(259846),n=e.i(645378),l=e.i(453889),i=e.i(487278),c=e.i(533499);let o=[{key:"notes",icon:n.FileText},{key:"assets",icon:l.FolderOpen},{key:"archive",icon:i.Archive}];e.s(["SubPageNav",0,function({workspaceId:e}){let{t:n}=(0,c.useI18n)(),l=(0,a.usePathname)(),i=o.find(e=>l.includes(`/${e.key}`))?.key;return(0,s.jsxs)("div",{className:"header-sm flex items-center gap-1 px-4",children:[(0,s.jsxs)(t.default,{href:`/workspaces/${e}`,className:"mr-2 inline-flex h-8 items-center gap-1.5 rounded-md px-2 text-xs text-muted-foreground transition-colors hover:bg-accent hover:text-foreground",children:[(0,s.jsx)(r.ArrowLeft,{className:"h-3.5 w-3.5"}),(0,s.jsx)("span",{children:n("archive.backToBoard")})]}),(0,s.jsx)("span",{className:"mr-2 h-4 w-px bg-border"}),o.map(a=>{let r=a.icon,l=i===a.key;return(0,s.jsxs)(t.default,{href:`/workspaces/${e}/${a.key}`,className:`inline-flex h-8 items-center gap-1.5 rounded-md px-3 text-xs font-medium transition-colors ${l?"bg-accent text-foreground":"text-muted-foreground hover:bg-accent/50 hover:text-foreground"}`,children:[(0,s.jsx)(r,{className:"h-3.5 w-3.5"}),(0,s.jsx)("span",{children:n(`sidebar.${a.key}`)})]},a.key)})]})}])},107830,e=>{"use strict";var s=e.i(289721),t=e.i(965652),a=e.i(487278),r=e.i(882651),n=e.i(181209),l=e.i(400355),i=e.i(738690),c=e.i(967489),o=e.i(533499),d=e.i(236967),u=e.i(514798);let m=(0,u.createServerReference)("4084d5b59db9737adb551105405d0160f7ab1991ab",u.callServer,void 0,u.findSourceMapURL,"getArchivedTasks");var x=e.i(605005),h=e.i(35967);function p(e){return new Date(e).toLocaleDateString("zh-CN",{year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit"})}function g({priority:e}){return(0,s.jsx)("span",{className:`inline-block h-1.5 w-1.5 rounded-full ${{LOW:"bg-slate-400",MEDIUM:"bg-amber-400",HIGH:"bg-orange-500",CRITICAL:"bg-rose-500"}[e]??"bg-slate-400"}`})}e.s(["ArchivePageClient",0,function({allWorkspaces:e,initialWorkspaceId:u,initialProjectId:f,initialTasks:v}){let b,{t:j}=(0,o.useI18n)(),[N,k]=(0,t.useTransition)(),[y,w]=(0,t.useState)(u),[C,S]=(0,t.useState)(f),[T,A]=(0,t.useState)(v),[$,I]=(0,t.useState)(null),[D,L]=(0,t.useState)(""),P=e.find(e=>e.id===y),E=P?.projects??[],O=D.trim().toLowerCase(),z=O?T.filter(e=>e.title.toLowerCase().includes(O)):T,R=(0,t.useCallback)(e=>{e?k(async()=>{A(await m(e))}):A([])},[k]);return(0,s.jsxs)("div",{className:"flex h-full flex-col overflow-hidden",children:[(0,s.jsx)(d.SubPageNav,{workspaceId:y}),(0,s.jsxs)("div",{className:"header-sm flex items-center gap-3 px-6 py-2",children:[(0,s.jsxs)(c.Select,{value:y,onValueChange:s=>s&&(s=>{if(s===y)return;w(s);let t=e.find(e=>e.id===s),a=t?.projects[0]??null;S(a?.id??null),R(a?.id??null)})(s),children:[(0,s.jsx)(c.SelectTrigger,{className:"h-8 w-auto min-w-[120px]",children:(0,s.jsx)("span",{className:"truncate",children:P?.name??y})}),(0,s.jsx)(c.SelectContent,{children:e.map(e=>(0,s.jsx)(c.SelectItem,{value:e.id,children:e.name},e.id))})]}),E.length>0&&(0,s.jsxs)(c.Select,{value:C??"",onValueChange:e=>e&&void(e!==C&&(S(e),R(e))),children:[(0,s.jsx)(c.SelectTrigger,{className:"h-8 w-auto min-w-[140px]",children:(0,s.jsx)("span",{className:"truncate",children:(b=E.find(e=>e.id===C))?b.alias?`${b.name} (${b.alias})`:b.name:""})}),(0,s.jsx)(c.SelectContent,{children:E.map(e=>(0,s.jsxs)(c.SelectItem,{value:e.id,children:[e.name,e.alias?` (${e.alias})`:""]},e.id))})]}),(0,s.jsxs)("div",{className:"relative ml-auto",children:[(0,s.jsx)(i.Search,{className:"pointer-events-none absolute left-2.5 top-1/2 h-3.5 w-3.5 -translate-y-1/2 text-muted-foreground"}),(0,s.jsx)("input",{type:"text",value:D,onChange:e=>L(e.target.value),placeholder:j("archive.searchPlaceholder"),className:"h-8 w-48 rounded-md border border-border bg-background pl-8 pr-3 text-sm text-foreground placeholder:text-muted-foreground focus:outline-none focus:ring-1 focus:ring-ring"})]}),(0,s.jsxs)("span",{className:"rounded-full bg-muted px-2.5 py-0.5 text-[11px] text-muted-foreground",children:[z.length," ",j("archive.tasksCount")]})]}),(0,s.jsx)("div",{className:"flex-1 overflow-auto px-6 py-4",children:(0,s.jsxs)("div",{className:`relative ${N?"opacity-40 pointer-events-none":""} transition-opacity`,children:[N&&(0,s.jsx)("div",{className:"absolute inset-0 z-10 flex items-center justify-center",children:(0,s.jsx)(l.Loader2,{className:"size-5 animate-spin text-muted-foreground"})}),0===z.length?(0,s.jsxs)("div",{className:"flex h-full flex-col items-center justify-center gap-2 py-16 text-center",children:[(0,s.jsx)(a.Archive,{className:"h-10 w-10 text-muted-foreground/30"}),(0,s.jsx)("p",{className:"text-sm font-medium text-muted-foreground",children:O?j("archive.noSearchResults"):j("archive.noTasks")}),(0,s.jsx)("p",{className:"text-xs text-muted-foreground/60",children:O?j("archive.noSearchResultsDesc"):j("archive.noTasksDesc")})]}):(0,s.jsx)("div",{className:"space-y-2",children:z.map(e=>{let t="DONE"===e.status,a=e.executions[0];return(0,s.jsx)("div",{role:"button",tabIndex:0,onClick:()=>I(e.id),onKeyDown:s=>{("Enter"===s.key||" "===s.key)&&(s.preventDefault(),I(e.id))},className:"group cursor-pointer rounded-lg border border-border bg-card px-4 py-3 transition-colors hover:border-border/80 hover:bg-accent/30 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 focus:ring-offset-background",children:(0,s.jsxs)("div",{className:"flex items-start gap-3",children:[(0,s.jsx)("div",{className:"mt-0.5 shrink-0",children:t?(0,s.jsx)(r.CheckCircle2,{className:"h-4 w-4 text-emerald-500"}):(0,s.jsx)(n.XCircle,{className:"h-4 w-4 text-rose-500"})}),(0,s.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,s.jsxs)("div",{className:"flex items-center gap-2",children:[(0,s.jsx)(g,{priority:e.priority}),(0,s.jsx)("span",{className:"truncate text-sm font-medium text-foreground",children:e.title}),(0,s.jsx)("span",{className:`ml-1 shrink-0 rounded-full px-2 py-0.5 text-[10px] font-medium ${t?"bg-emerald-500/10 text-emerald-400 ring-1 ring-emerald-500/20":"bg-rose-500/10 text-rose-400 ring-1 ring-rose-500/20"}`,children:t?j("archive.status.done"):j("archive.status.cancelled")}),e.version&&(0,s.jsx)(h.TaskVersionTag,{number:e.version.number,name:e.version.name,showName:!0,className:"shrink-0"})]}),e.labels.length>0&&(0,s.jsx)("div",{className:"mt-1.5 flex flex-wrap gap-1",children:e.labels.map(e=>(0,s.jsx)("span",{className:"rounded-full px-1.5 py-0.5 text-[10px] font-medium",style:{backgroundColor:`${e.label.color}20`,color:e.label.color,outline:`1px solid ${e.label.color}40`},children:e.label.name},e.label.id))}),(0,s.jsxs)("div",{className:"mt-2 flex flex-wrap items-center gap-3 text-[11px] text-muted-foreground",children:[(0,s.jsxs)("span",{children:[j("archive.createdAt"),": ",p(e.createdAt)]}),(0,s.jsxs)("span",{children:[t?j("archive.completedAt"):j("archive.cancelledAt"),": ",p(e.updatedAt)]}),a&&(0,s.jsxs)("span",{className:"flex items-center gap-1",children:[j("archive.lastExecution"),":"," ",(0,s.jsx)("span",{className:`rounded px-1 py-0.5 font-mono text-[10px] ${"COMPLETED"===a.status?"bg-emerald-500/10 text-emerald-400":"FAILED"===a.status?"bg-rose-500/10 text-rose-400":"bg-amber-500/10 text-amber-400"}`,children:a.status})]})]})]})]})},e.id)})})]})}),(0,s.jsx)(x.TaskOverviewDrawer,{open:!!$,onOpenChange:e=>{e||I(null)},taskId:$,hideEnvActions:!0})]})}],107830)},244455,e=>{e.v(s=>Promise.all(["static/chunks/075e-zs_kgc_g.js"].map(s=>e.l(s))).then(()=>s(629495)))},800307,e=>{e.v(s=>Promise.all(["static/chunks/0zm4fvu.lntrp.js"].map(s=>e.l(s))).then(()=>s(267483)))}]);
@@ -1 +1 @@
1
- (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,14842,865514,e=>{"use strict";var t=e.i(289721),s=e.i(965652),r=e.i(368490),a=e.i(232280),n=e.i(759686),i=e.i(960518),l=e.i(340873),o=e.i(400355),c=e.i(519455),d=e.i(912505),h=e.i(487486),m=e.i(776639),x=e.i(624687),u=e.i(533499);function f({patchState:e,isLargeFold:s,onLoad:r}){let{t:a}=(0,u.useI18n)();return s?(0,t.jsxs)("div",{className:"flex flex-col items-center justify-center gap-1 py-6",children:[(0,t.jsx)(c.Button,{variant:"link",onClick:r,className:"h-auto p-0 text-sm",children:a("diff.loadDiff")}),(0,t.jsx)("span",{className:"text-xs text-muted-foreground",children:a("diff.foldedLarge")})]}):e&&"loading"!==e.kind?"error"===e.kind?(0,t.jsxs)("div",{className:"flex flex-col items-center justify-center gap-2 py-6 text-sm text-muted-foreground",children:[(0,t.jsx)("span",{children:a("diff.loadFailed")}),(0,t.jsx)(c.Button,{variant:"ghost",onClick:r,children:a("diff.retry")})]}):"binary"===e.kind?(0,t.jsx)("div",{className:"flex items-center justify-center py-6 text-sm text-muted-foreground",children:a("diff.binaryNotShown")}):"empty"===e.kind?(0,t.jsx)("div",{className:"flex items-center justify-center py-6 text-sm text-muted-foreground",children:a("diff.noChanges")}):(0,t.jsx)(p,{patch:e.patch??""}):(0,t.jsx)("div",{className:"flex items-center justify-center py-6",children:(0,t.jsx)(o.Loader2,{className:"h-5 w-5 animate-spin text-muted-foreground"})})}function p({patch:e}){let{t:s}=(0,u.useI18n)(),r=e.split("\n"),a=r.length>500,n=a?r.slice(0,500):r;return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("pre",{className:"overflow-x-auto p-0 text-xs font-mono leading-5",children:n.map((e,s)=>{let r=e.startsWith("+++")||e.startsWith("---")?"px-4 block text-muted-foreground":e.startsWith("+")?"px-4 block bg-green-500/10 text-green-400":e.startsWith("-")?"px-4 block bg-red-500/10 text-red-400":e.startsWith("@@")?"px-4 block bg-blue-500/10 text-blue-300":"px-4 block text-muted-foreground";return(0,t.jsx)("span",{className:r,children:e||" "},s)})}),a&&(0,t.jsx)("div",{className:"px-4 py-2 text-xs text-muted-foreground border-t border-border",children:s("diff.patchTruncated",{n:String(500),total:String(r.length)})})]})}e.s(["TaskDiffView",0,function({taskId:e,files:o,totalAdded:p,totalRemoved:g,hasConflicts:j,conflictFiles:b,onCommit:w,hasUncommitted:N}){let{t:y}=(0,u.useI18n)(),[v,k]=(0,s.useState)(new Set),[C,S]=(0,s.useState)(new Map),[M,D]=(0,s.useState)(!1),[L,A]=(0,s.useState)(""),[F,T]=(0,s.useState)(!1),B=t=>{S(e=>new Map(e).set(t,{kind:"loading"})),fetch(`/api/tasks/${e}/diff-patch?file=${encodeURIComponent(t)}`).then(e=>e.ok?e.json():Promise.reject(Error(`HTTP ${e.status}`))).then(e=>{S(s=>{let r=new Map(s);return"binary"===e.kind?r.set(t,{kind:"binary"}):"empty"===e.kind?r.set(t,{kind:"empty"}):r.set(t,{kind:"ready",patch:e.patch??""}),r})}).catch(()=>{S(e=>new Map(e).set(t,{kind:"error"}))})};return(0,t.jsxs)("div",{className:"flex flex-col h-full",children:[(0,t.jsxs)("div",{className:"flex items-center justify-between border-b border-border px-4 py-3 flex-shrink-0",children:[(0,t.jsxs)("div",{className:"flex items-center gap-3 text-sm text-muted-foreground",children:[(0,t.jsxs)("span",{className:"font-medium text-foreground",children:[o.length," files changed"]}),(0,t.jsxs)("span",{className:"text-green-400 font-mono text-xs",children:["+",p]}),(0,t.jsxs)("span",{className:"text-red-400 font-mono text-xs",children:["-",g]})]}),(0,t.jsx)("div",{className:"flex items-center gap-2",children:N&&w&&(0,t.jsxs)(c.Button,{variant:"outline",onClick:()=>D(!0),className:"gap-2",children:[(0,t.jsx)(l.GitCommitHorizontal,{className:"h-4 w-4"}),y("diff.commit")]})})]}),j&&(0,t.jsxs)("div",{className:"flex flex-col gap-2 border-b border-border bg-amber-500/5 px-4 py-3 flex-shrink-0",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2 text-amber-400",children:[(0,t.jsx)(n.AlertTriangle,{className:"h-4 w-4 flex-shrink-0"}),(0,t.jsxs)("span",{className:"text-sm font-medium",children:["Merge blocked: ",b.length," conflicting file",1!==b.length?"s":""]})]}),(0,t.jsx)("ul",{className:"ml-6 space-y-1",children:b.map(e=>(0,t.jsx)("li",{className:"text-xs font-mono text-amber-300/80",children:e},e))})]}),(0,t.jsx)("div",{className:"flex-1 overflow-auto",children:0===o.length?(0,t.jsx)(d.EmptyState,{icon:i.GitCompare,title:y("diff.noChanges"),className:"h-full"}):(0,t.jsx)("div",{className:"divide-y divide-border",children:o.map(e=>{let s=v.has(e.filename),n=C.get(e.filename),i=e.added+e.removed;return(0,t.jsxs)("div",{children:[(0,t.jsxs)(c.Button,{variant:"ghost",type:"button",onClick:()=>{let t;return t=v.has(e.filename),void(k(t=>{let s=new Set(t);return s.has(e.filename)?s.delete(e.filename):s.add(e.filename),s}),t||e.isBinary||C.has(e.filename)||e.added+e.removed<=200&&B(e.filename))},className:"flex w-full items-center gap-2 px-4 py-2.5 text-left hover:bg-accent/50 transition-colors rounded-none h-auto",children:[s?(0,t.jsx)(a.ChevronDown,{className:"h-3.5 w-3.5 flex-shrink-0 text-muted-foreground"}):(0,t.jsx)(r.ChevronRight,{className:"h-3.5 w-3.5 flex-shrink-0 text-muted-foreground"}),(0,t.jsx)("span",{className:"flex-1 truncate text-sm font-mono text-foreground",children:e.filename}),e.isBinary?(0,t.jsx)(h.Badge,{variant:"secondary",className:"text-[10px] bg-muted text-muted-foreground border border-border",children:y("diff.binary")}):(0,t.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,t.jsxs)("span",{className:"text-xs font-mono text-green-400",children:["+",e.added]}),(0,t.jsxs)("span",{className:"text-xs font-mono text-red-400",children:["-",e.removed]})]})]}),s&&!e.isBinary&&(0,t.jsx)("div",{className:"border-t border-border bg-background",children:(0,t.jsx)(f,{filename:e.filename,patchState:n,isLargeFold:!n&&i>200,onLoad:()=>B(e.filename)})})]},e.filename)})})}),(0,t.jsx)(m.Dialog,{open:M,onOpenChange:D,children:(0,t.jsxs)(m.DialogContent,{className:"max-w-md",children:[(0,t.jsx)(m.DialogHeader,{children:(0,t.jsx)(m.DialogTitle,{children:y("diff.commitChanges")})}),(0,t.jsx)("div",{className:"flex flex-col gap-3",children:(0,t.jsx)(x.Textarea,{value:L,onChange:e=>A(e.target.value),placeholder:y("diff.commitMessagePlaceholder"),rows:5,className:"w-full rounded-md border border-border bg-background px-3 py-2 text-sm text-foreground placeholder-muted-foreground outline-none resize-y min-h-[80px]"})}),(0,t.jsxs)(m.DialogFooter,{children:[(0,t.jsx)(c.Button,{variant:"ghost",onClick:()=>D(!1),children:y("common.cancel")}),(0,t.jsx)(c.Button,{onClick:async()=>{if(L.trim()&&w){T(!0);try{await w(L.trim()),A(""),D(!1)}finally{T(!1)}}},disabled:!L.trim()||F,children:F?"...":y("diff.commit")})]})]})})]})}],14842);var g=e.i(538059);let j=(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"}]]);e.s(["TaskMergeConfirmDialog",0,function({open:e,onOpenChange:r,taskId:a,taskTitle:n,baseBranch:i,fileCount:l,commitCount:d,commitLog:h=[],onMergeComplete:x}){let u=(0,g.useRouter)(),[f,p]=(0,s.useState)(!1),[b,w]=(0,s.useState)(null),N=async()=>{p(!0),w(null);try{let e=await fetch(`/api/tasks/${a}/merge`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({})});if(e.ok){r(!1),x(),u.refresh();return}let t=await e.json().catch(()=>({error:"Merge failed"}));409===e.status?w(`Merge conflicts detected: ${Array.isArray(t.conflictFiles)?t.conflictFiles.join(", "):"unknown files"}`):w(t.error??"Merge failed")}catch{w("Network error — merge failed")}finally{p(!1)}};return(0,t.jsx)(m.Dialog,{open:e,onOpenChange:r,children:(0,t.jsxs)(m.DialogContent,{showCloseButton:!0,className:"sm:max-w-md",children:[(0,t.jsx)(m.DialogHeader,{children:(0,t.jsxs)(m.DialogTitle,{className:"flex items-center gap-2",children:[(0,t.jsx)(j,{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:i})]}),(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:l})]}),(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:d})]})]}),h.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:h.map((e,s)=>(0,t.jsx)("div",{className:"text-xs font-mono text-foreground/80",children:e},s))})]}),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)(m.DialogFooter,{children:[(0,t.jsx)(c.Button,{variant:"outline",onClick:()=>r(!1),disabled:f,children:"Cancel"}),(0,t.jsx)(c.Button,{onClick:N,disabled:f,className:"gap-2",children:f?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(o.Loader2,{className:"h-4 w-4 animate-spin"}),"Merging..."]}):(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(j,{className:"h-4 w-4"}),"Confirm Merge"]})})]})]})})}],865514)},491911,314411,e=>{"use strict";let t=(0,e.i(572989).default)("file",[["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"}]]);e.s(["default",0,t],314411),e.s(["File",0,t],491911)},989383,769824,e=>{"use strict";var t=e.i(572989);let s=(0,t.default)("clock",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 6v6l4 2",key:"mmk7yg"}]]);e.s(["Clock",0,s],989383);let r=(0,t.default)("history",[["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"}],["path",{d:"M12 7v5l4 2",key:"1fdv2h"}]]);e.s(["History",0,r],769824)},244354,e=>{"use strict";async function t(e,s,r={}){let a=await fetch("/api/git",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({action:s,path:e,...r})});if(!a.ok)throw Error((await a.json()).error||`${s} failed`);return a.json()}e.s(["gitAction",0,t])},48019,782516,755696,886156,586564,719493,436539,e=>{"use strict";var t=e.i(572989);let s=(0,t.default)("file-plus",[["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:"M9 15h6",key:"cctwl0"}],["path",{d:"M12 18v-6",key:"17g6i2"}]]);e.s(["FilePlus",0,s],48019);let r=(0,t.default)("file-minus",[["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:"M9 15h6",key:"cctwl0"}]]);e.s(["FileMinus",0,r],782516);let a=(0,t.default)("file-question-mark",[["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:"M12 17h.01",key:"p32p05"}],["path",{d:"M9.1 9a3 3 0 0 1 5.82 1c0 2-3 3-3 3",key:"mhlwft"}]]);e.s(["FileQuestion",0,a],755696);let n=(0,t.default)("file-pen",[["path",{d:"M12.659 22H18a2 2 0 0 0 2-2V8a2.4 2.4 0 0 0-.706-1.706l-3.588-3.588A2.4 2.4 0 0 0 14 2H6a2 2 0 0 0-2 2v9.34",key:"o6klzx"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M10.378 12.622a1 1 0 0 1 3 3.003L8.36 20.637a2 2 0 0 1-.854.506l-2.867.837a.5.5 0 0 1-.62-.62l.836-2.869a2 2 0 0 1 .506-.853z",key:"zhnas1"}]]);e.s(["FileEdit",0,n],886156);let i=(0,t.default)("arrow-down",[["path",{d:"M12 5v14",key:"s699le"}],["path",{d:"m19 12-7 7-7-7",key:"1idqje"}]]);e.s(["ArrowDown",0,i],586564);let l=(0,t.default)("arrow-up",[["path",{d:"m5 12 7-7 7 7",key:"hav0vg"}],["path",{d:"M12 19V5",key:"x0mq9r"}]]);e.s(["ArrowUp",0,l],719493);let o=(0,t.default)("minus",[["path",{d:"M5 12h14",key:"1ays0h"}]]);e.s(["Minus",0,o],436539)},375306,e=>{"use strict";let t=(0,e.i(572989).default)("arrow-up-from-line",[["path",{d:"m18 9-6-6-6 6",key:"kcunyi"}],["path",{d:"M12 3v14",key:"7cf3v8"}],["path",{d:"M5 21h14",key:"11awu3"}]]);e.s(["ArrowUpFromLine",0,t],375306)},515135,e=>{"use strict";var t=e.i(289721),s=e.i(965652),r=e.i(491911),a=e.i(48019),n=e.i(782516),i=e.i(755696),l=e.i(886156),o=e.i(400355),c=e.i(586564),d=e.i(719493),h=e.i(597746),m=e.i(368490),x=e.i(232280),u=e.i(977982),f=e.i(436539),p=e.i(232545),g=e.i(49007),j=e.i(194358),b=e.i(487278),w=e.i(375306);let N=(0,e.i(572989).default)("undo-2",[["path",{d:"M9 14 4 9l5-5",key:"102s5s"}],["path",{d:"M4 9h10.5a5.5 5.5 0 0 1 5.5 5.5a5.5 5.5 0 0 1-5.5 5.5H11",key:"f3b9sd"}]]);var y=e.i(226145),v=e.i(738690),k=e.i(242941),C=e.i(998626),S=e.i(519455),M=e.i(755146),D=e.i(759684),L=e.i(337822),A=e.i(746798),F=e.i(776639),T=e.i(793479),B=e.i(624687),I=e.i(533499);function E({open:e,onOpenChange:r,branches:a,currentBranch:n,localPath:i,onCreated:l,onError:c}){let{t:d}=(0,I.useI18n)(),[m,u]=(0,s.useState)(""),[f,p]=(0,s.useState)(n),[g,j]=(0,s.useState)(""),[b,w]=(0,s.useState)(!1),[N,k]=(0,s.useState)(""),[C,M]=(0,s.useState)(!1);(0,s.useEffect)(()=>{e&&(u(""),p(n),j(""),k(""))},[e,n]);let D=[...new Set(a)].filter(e=>e.toLowerCase().includes(N.toLowerCase())),L=async()=>{if(m.trim()){w(!0);try{let e=await fetch("/api/git",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({action:"create-branch",path:i,branch:m.trim(),baseBranch:f})});if(e.ok)r(!1),l();else{let t=await e.json();c(t.error||"Unknown error")}}catch{c("Network error")}finally{w(!1)}}};return(0,t.jsx)(F.Dialog,{open:e,onOpenChange:r,children:(0,t.jsxs)(F.DialogContent,{className:"sm:max-w-sm",children:[(0,t.jsx)(F.DialogHeader,{children:(0,t.jsx)(F.DialogTitle,{children:d("git.createBranch")})}),(0,t.jsxs)("div",{className:"space-y-3 py-2",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)("label",{className:"text-xs font-medium text-muted-foreground",children:d("git.branchName")}),(0,t.jsx)(T.Input,{value:m,onChange:e=>u(e.target.value),placeholder:d("git.branchNamePlaceholder"),className:"mt-1.5 font-mono text-xs",onKeyDown:e=>"Enter"===e.key&&L()})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)("label",{className:"text-xs font-medium text-muted-foreground",children:d("git.baseBranch")}),(0,t.jsxs)("div",{className:"relative mt-1.5",children:[(0,t.jsxs)("button",{onClick:()=>M(!C),className:"flex w-full items-center justify-between rounded-lg border border-border bg-muted/50 px-3 py-2 text-left transition-colors hover:bg-accent",children:[(0,t.jsxs)("div",{className:"flex min-w-0 items-center gap-2",children:[(0,t.jsx)(y.GitBranch,{className:"h-3 w-3 shrink-0 text-emerald-400"}),(0,t.jsx)("span",{className:"truncate font-mono text-xs text-foreground",title:f,children:f})]}),(0,t.jsx)(x.ChevronDown,{className:`h-3 w-3 text-muted-foreground transition-transform ${C?"rotate-180":""}`})]}),C&&(0,t.jsxs)("div",{className:"absolute left-0 right-0 top-full z-20 mt-1 rounded-lg border border-border bg-popover shadow-xl",children:[(0,t.jsx)("div",{className:"border-b border-border p-1.5",children:(0,t.jsxs)("div",{className:"relative",children:[(0,t.jsx)(v.Search,{className:"absolute left-2 top-1/2 -translate-y-1/2 h-3 w-3 text-muted-foreground"}),(0,t.jsx)("input",{value:N,onChange:e=>k(e.target.value),placeholder:"Filter...",autoFocus:!0,className:"h-7 w-full rounded-md bg-muted/50 pl-7 pr-2 text-xs text-foreground placeholder-muted-foreground outline-none focus:ring-1 focus:ring-ring"})]})}),(0,t.jsx)("div",{className:"max-h-40 overflow-auto py-1",children:D.map(e=>(0,t.jsxs)("button",{onClick:()=>{p(e),M(!1)},className:`flex w-full items-center gap-2 px-3 py-1.5 text-left transition-colors ${e===f?"bg-emerald-500/10 text-emerald-400":"text-secondary-foreground hover:bg-accent"}`,children:[(0,t.jsx)(y.GitBranch,{className:"h-3 w-3 shrink-0"}),(0,t.jsx)("span",{className:"truncate font-mono text-xs",title:e,children:e}),e===f&&(0,t.jsx)(h.Check,{className:"h-3 w-3 ml-auto shrink-0"})]},e))})]})]})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)("label",{className:"text-xs font-medium text-muted-foreground",children:d("git.branchDesc")}),(0,t.jsx)(B.Textarea,{value:g,onChange:e=>j(e.target.value),placeholder:d("git.branchDescPlaceholder"),rows:2,className:"mt-1.5 w-full rounded-md border border-border bg-background px-3 py-2 text-sm text-foreground placeholder-muted-foreground outline-none transition-colors focus:border-ring focus:ring-1 focus:ring-ring resize-none"})]})]}),(0,t.jsxs)(F.DialogFooter,{children:[(0,t.jsx)(S.Button,{variant:"outline",onClick:()=>r(!1),children:d("common.cancel")}),(0,t.jsxs)(S.Button,{onClick:L,disabled:!m.trim()||b,className:"bg-primary/10 text-primary ring-1 ring-primary/20 hover:bg-primary/15",children:[b?(0,t.jsx)(o.Loader2,{className:"h-3 w-3 animate-spin mr-1"}):null,d("common.create")]})]})]})})}var $=e.i(360112),P=e.i(244354);let R={modified:l.FileEdit,added:a.FilePlus,deleted:n.FileMinus,untracked:i.FileQuestion,renamed:l.FileEdit},z={modified:"text-amber-400",added:"text-emerald-400",deleted:"text-rose-400",untracked:"text-muted-foreground",renamed:"text-sky-400"},U={modified:"M",added:"A",deleted:"D",untracked:"U",renamed:"R"};function G(e){let t={name:"",path:"",isDir:!0,children:[]};for(let s of e){let e=s.file.split("/").filter(Boolean);if(0===e.length)continue;let r=t;for(let t=0;t<e.length;t++){let a=e[t],n=t===e.length-1,i=e.slice(0,t+1).join("/");if(n)r.children.push({name:a,path:i,isDir:!1,children:[],file:s});else{let e=r.children.find(e=>e.isDir&&e.name===a);e||(e={name:a,path:i,isDir:!0,children:[]},r.children.push(e)),r=e}}}return(function e(t){if(t.isDir&&(t.children=t.children.map(e),1===t.children.length&&t.children[0].isDir&&""!==t.name)){let e=t.children[0];return{...e,name:`${t.name}/${e.name}`}}return t})(t).children.sort((e,t)=>e.isDir!==t.isDir?e.isDir?-1:1:e.name.localeCompare(t.name))}function O({scroll:e,children:s}){return e?(0,t.jsx)(D.ScrollArea,{className:"flex-1 min-h-0",children:s}):(0,t.jsx)("div",{children:s})}function H({label:e,count:r,labelColor:a,tree:n,batchAction:i,batchLabel:l,batchIcon:o,onFileClick:c,onFileAction:d,fileActionIcon:h,fileActionLabel:u,onFileSecondaryAction:f,fileSecondaryIcon:p,fileSecondaryLabel:g}){let[j,b]=(0,s.useState)(!0);return 0===r?null:(0,t.jsxs)("div",{className:"border-b border-border",children:[(0,t.jsxs)("div",{className:"group flex items-center justify-between px-2 py-1.5 hover:bg-accent/50 transition-colors",children:[(0,t.jsxs)("button",{onClick:()=>b(!j),className:"flex items-center gap-1 flex-1 min-w-0",children:[j?(0,t.jsx)(x.ChevronDown,{className:"h-3 w-3 shrink-0 text-muted-foreground"}):(0,t.jsx)(m.ChevronRight,{className:"h-3 w-3 shrink-0 text-muted-foreground"}),(0,t.jsxs)("span",{className:`text-[10px] font-semibold uppercase tracking-wider ${a}`,children:[e," (",r,")"]})]}),(0,t.jsx)(S.Button,{variant:"ghost",size:"icon-xs",onClick:i,className:"text-muted-foreground opacity-0 group-hover:opacity-100 transition-opacity","aria-label":l,children:o})]}),j&&(0,t.jsx)("div",{className:"pb-1",children:n.map(e=>(0,t.jsx)(W,{node:e,depth:0,onFileClick:c,onFileAction:d,fileActionIcon:h,fileActionLabel:u,onFileSecondaryAction:f,fileSecondaryIcon:p,fileSecondaryLabel:g},e.path))})]})}function W({node:e,depth:a,onFileClick:n,onFileAction:i,fileActionIcon:l,fileActionLabel:o,onFileSecondaryAction:c,fileSecondaryIcon:d,fileSecondaryLabel:h}){let[f,p]=(0,s.useState)(!0),g={paddingLeft:`calc(${a} * 8px + 4px)`};if(e.isDir)return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)("button",{onClick:()=>p(!f),className:"flex w-full items-center gap-1 py-0.5 px-1 rounded-sm min-h-[28px] hover:bg-accent hover:text-accent-foreground transition-colors text-left",style:g,children:[f?(0,t.jsx)(x.ChevronDown,{className:"h-3 w-3 shrink-0 text-muted-foreground"}):(0,t.jsx)(m.ChevronRight,{className:"h-3 w-3 shrink-0 text-muted-foreground"}),(0,t.jsx)(u.Folder,{className:"h-3.5 w-3.5 shrink-0 text-amber-400"}),(0,t.jsx)("span",{className:"text-[13px] text-muted-foreground truncate",children:e.name})]}),f&&e.children.sort((e,t)=>e.isDir!==t.isDir?e.isDir?-1:1:e.name.localeCompare(t.name)).map(e=>(0,t.jsx)(W,{node:e,depth:a+1,onFileClick:n,onFileAction:i,fileActionIcon:l,fileActionLabel:o,onFileSecondaryAction:c,fileSecondaryIcon:d,fileSecondaryLabel:h},e.path))]});let j=e.file,b=R[j.status]||r.File,w=z[j.status]||"text-muted-foreground",N=U[j.status]||"?";return(0,t.jsxs)("div",{className:"group flex items-center gap-1 py-0.5 px-1 rounded-sm min-h-[28px] hover:bg-accent hover:text-accent-foreground transition-colors cursor-pointer",style:g,onClick:()=>n(j),children:[(0,t.jsx)("span",{className:"h-3 w-3 shrink-0"}),(0,t.jsx)(b,{className:`h-3.5 w-3.5 shrink-0 ${w}`}),(0,t.jsx)("span",{className:"text-[13px] text-foreground truncate flex-1",children:e.name}),(0,t.jsx)("span",{className:`text-[11px] font-mono font-bold shrink-0 mr-1 ${w}`,children:N}),c&&(0,t.jsxs)(A.Tooltip,{children:[(0,t.jsx)(A.TooltipTrigger,{onClick:e=>{e.stopPropagation(),c(j.file)},className:"shrink-0 rounded p-0.5 text-muted-foreground opacity-0 group-hover:opacity-100 hover:bg-destructive/20 hover:text-destructive transition-all","aria-label":h??"",children:d}),h&&(0,t.jsx)(A.TooltipContent,{side:"bottom",children:h})]}),(0,t.jsxs)(A.Tooltip,{children:[(0,t.jsx)(A.TooltipTrigger,{onClick:e=>{e.stopPropagation(),i(j.file)},className:"shrink-0 rounded px-1 text-xs font-mono text-muted-foreground opacity-0 group-hover:opacity-100 hover:bg-background hover:text-foreground transition-all mr-1","aria-label":o??"",children:l}),o&&(0,t.jsx)(A.TooltipContent,{side:"bottom",children:o})]})]})}e.s(["EditorGitPanel",0,function({localPath:e,onFileSelect:r,mode:a="project"}){let n="task"===a,{t:i}=(0,I.useI18n)(),[l,m]=(0,s.useState)(null),[u,D]=(0,s.useState)(!0),[F,T]=(0,s.useState)(""),[B,R]=(0,s.useState)(!1),[z,U]=(0,s.useState)(!1),[W,V]=(0,s.useState)(!1),[K,q]=(0,s.useState)(!1),[J,Q]=(0,s.useState)(!1),[X,Y]=(0,s.useState)(""),[Z,_]=(0,s.useState)(!1),ee=(0,s.useCallback)(async()=>{try{let t=await fetch(`/api/git?path=${encodeURIComponent(e)}`);if(t.ok){let s=await t.json();m({changedFiles:s.changedFiles??[],ahead:s.ahead??0,behind:s.behind??0,remoteUrl:s.remoteUrl??"",currentBranch:s.currentBranch??"",branches:s.branches??[],remoteBranches:s.remoteBranches??[],topLevel:s.topLevel??e})}}catch{}finally{D(!1)}},[e]);(0,s.useEffect)(()=>{ee();let e=setInterval(ee,5e3);return()=>clearInterval(e)},[ee]);let et=async t=>{try{await (0,P.gitAction)(e,"stage",{files:t}),await ee()}catch(e){$.toast.error(e instanceof Error?e.message:String(e))}},es=async t=>{try{await (0,P.gitAction)(e,"unstage",{files:t}),await ee()}catch(e){$.toast.error(e instanceof Error?e.message:String(e))}},er=async()=>{if(F.trim()){R(!0);try{await (0,P.gitAction)(e,"commit",{message:F}),T(""),$.toast.success(i("git.commitSuccess")),await ee()}catch(e){$.toast.error(e instanceof Error?e.message:String(e))}finally{R(!1)}}},ea=async t=>{U(!0);try{await (0,P.gitAction)(e,"pull",t?{branch:t}:{}),$.toast.success(i("git.pullSuccess")),await ee()}catch(e){$.toast.error(e instanceof Error?e.message:String(e))}finally{U(!1)}},en=async t=>{V(!0);try{await (0,P.gitAction)(e,"push",t?{branch:t}:{}),$.toast.success(i("git.pushSuccess")),await ee()}catch(e){$.toast.error(e instanceof Error?e.message:String(e))}finally{V(!1)}},ei=async()=>{q(!0);try{await (0,P.gitAction)(e,"fetch"),$.toast.success(i("git.fetchSuccess")),await ee()}catch(e){$.toast.error(e instanceof Error?e.message:String(e))}finally{q(!1)}},el=async t=>{try{await (0,P.gitAction)(e,"checkout",{branch:t}),Q(!1),$.toast.success(`${i("git.switchSuccess")} ${t}`),await ee()}catch(e){$.toast.error(e instanceof Error?e.message:String(e))}},eo=async()=>{try{await (0,P.gitAction)(e,"stash-save",{message:F||void 0}),T(""),$.toast.success(i("git.stashSaved")),await ee()}catch(e){$.toast.error(e instanceof Error?e.message:String(e))}},ec=async()=>{try{await (0,P.gitAction)(e,"stash-pop",{index:0}),$.toast.success(i("git.stashApplied")),await ee()}catch(e){$.toast.error(e instanceof Error?e.message:String(e))}},ed=async t=>{try{await (0,P.gitAction)(e,"discard-file",{file:t}),$.toast.success(i("git.discardFileSuccess")),await ee()}catch(e){$.toast.error(e instanceof Error?e.message:String(e))}},eh=async()=>{try{await (0,P.gitAction)(e,"discard-all"),$.toast.success(i("git.discardSuccess")),await ee()}catch(e){$.toast.error(e instanceof Error?e.message:String(e))}},em=async t=>{if("deleted"===t.status)return;let s=l?.topLevel??e;try{let a=await (0,P.gitAction)(e,"show",{file:t.file});r?.(t.file,a.content??"",s)}catch{r?.(t.file,"",s)}},ex=l?.changedFiles.filter(e=>e.staged)??[],eu=l?.changedFiles.filter(e=>!e.staged)??[],ef=(0,s.useMemo)(()=>G(ex),[ex]),ep=(0,s.useMemo)(()=>G(eu),[eu]);if(u)return(0,t.jsx)("div",{className:"flex h-full items-center justify-center",children:(0,t.jsx)(o.Loader2,{className:"h-4 w-4 animate-spin text-muted-foreground"})});if(!l)return null;function eg(e){let t=[];for(let s of e)s.isDir?t.push(...eg(s.children)):s.file&&t.push(s.file.file);return t}let ej=[...l?.branches??[],...(l?.remoteBranches??[]).filter(e=>!l?.branches?.includes(e))],eb=X?ej.filter(e=>e.toLowerCase().includes(X.toLowerCase())):ej;return(0,t.jsxs)("div",{className:n?"flex flex-col h-full overflow-hidden":"flex flex-col",children:[(0,t.jsxs)("div",{className:"shrink-0 px-2 pt-2 pb-1 flex items-center gap-1",children:[n?(0,t.jsxs)(A.Tooltip,{children:[(0,t.jsx)(A.TooltipTrigger,{render:(0,t.jsxs)("div",{className:"flex flex-1 min-w-0 items-center gap-1.5 rounded-md border border-border bg-muted/30 px-2 py-1.5",children:[(0,t.jsx)(y.GitBranch,{className:"h-3 w-3 shrink-0 text-emerald-400"}),(0,t.jsx)("span",{className:"truncate font-mono text-xs text-foreground",children:l?.currentBranch||"—"})]})}),(0,t.jsx)(A.TooltipContent,{side:"bottom",className:"font-mono text-xs",children:l?.currentBranch||"—"})]}):(0,t.jsxs)(L.Popover,{open:J,onOpenChange:e=>{Q(e),e&&Y("")},children:[(0,t.jsxs)(L.PopoverTrigger,{className:"flex flex-1 min-w-0 items-center justify-between rounded-md border border-border bg-muted/50 px-2 py-1.5 text-left transition-colors hover:bg-accent",children:[(0,t.jsxs)("div",{className:"flex items-center gap-1.5 min-w-0",children:[(0,t.jsx)(y.GitBranch,{className:"h-3 w-3 shrink-0 text-emerald-400"}),(0,t.jsx)("span",{className:"truncate font-mono text-xs text-foreground",title:l?.currentBranch||void 0,children:l?.currentBranch||"—"})]}),(0,t.jsx)(x.ChevronDown,{className:`h-3 w-3 shrink-0 text-muted-foreground transition-transform ${J?"rotate-180":""}`})]}),(0,t.jsxs)(L.PopoverContent,{align:"start",sideOffset:4,className:"w-max min-w-[var(--anchor-width)] max-w-[320px] gap-0 overflow-hidden p-0",children:[(0,t.jsx)("div",{className:"border-b border-border p-1.5",children:(0,t.jsxs)("div",{className:"relative",children:[(0,t.jsx)(v.Search,{className:"absolute left-2 top-1/2 -translate-y-1/2 h-3 w-3 text-muted-foreground"}),(0,t.jsx)("input",{value:X,onChange:e=>Y(e.target.value),placeholder:"Filter...",autoFocus:!0,className:"h-7 w-full rounded-md bg-muted/50 pl-7 pr-2 text-xs text-foreground placeholder-muted-foreground outline-none focus:ring-1 focus:ring-ring"})]})}),(0,t.jsxs)("div",{className:"max-h-48 overflow-auto py-1",children:[(l?.branches??[]).filter(e=>e.toLowerCase().includes(X.toLowerCase())).length>0&&(0,t.jsx)("p",{className:"px-3 pt-1 pb-0.5 text-[10px] font-semibold uppercase tracking-wider text-muted-foreground",children:i("git.localBranches")}),(l?.branches??[]).filter(e=>e.toLowerCase().includes(X.toLowerCase())).map(e=>{let s=e===l?.currentBranch;return(0,t.jsxs)("button",{onClick:()=>{s?Q(!1):el(e)},className:`flex w-full items-center gap-2 px-3 py-1 text-left transition-colors ${s?"bg-emerald-500/10 text-emerald-400":"text-secondary-foreground hover:bg-accent"}`,children:[(0,t.jsx)(y.GitBranch,{className:"h-3 w-3 shrink-0"}),(0,t.jsx)("span",{className:"truncate font-mono text-xs",title:e,children:e}),s&&(0,t.jsx)(h.Check,{className:"h-3 w-3 ml-auto shrink-0"})]},`local-${e}`)}),(l?.remoteBranches??[]).filter(e=>!l?.branches?.includes(e)).filter(e=>e.toLowerCase().includes(X.toLowerCase())).length>0&&(0,t.jsx)("p",{className:"px-3 pt-2 pb-0.5 text-[10px] font-semibold uppercase tracking-wider text-muted-foreground",children:i("git.remoteBranches")}),(l?.remoteBranches??[]).filter(e=>!l?.branches?.includes(e)).filter(e=>e.toLowerCase().includes(X.toLowerCase())).map(e=>(0,t.jsxs)("button",{onClick:()=>el(e),className:"flex w-full items-center gap-2 px-3 py-1 text-left text-secondary-foreground transition-colors hover:bg-accent",children:[(0,t.jsx)(k.Globe,{className:"h-3 w-3 shrink-0 text-sky-400"}),(0,t.jsx)("span",{className:"truncate font-mono text-xs",title:e,children:e})]},`remote-${e}`)),0===eb.length&&(0,t.jsx)("p",{className:"px-3 py-2 text-xs text-muted-foreground",children:"No branches found"})]})]})]}),!n&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)(A.Tooltip,{children:[(0,t.jsx)(A.TooltipTrigger,{onClick:ei,disabled:K,className:"shrink-0 inline-flex h-7 w-7 items-center justify-center rounded-md text-muted-foreground hover:bg-accent hover:text-foreground transition-colors disabled:opacity-50 disabled:cursor-not-allowed","aria-label":"Fetch",children:(0,t.jsx)(j.RefreshCw,{className:`h-3.5 w-3.5 ${K?"animate-spin":""}`})}),(0,t.jsx)(A.TooltipContent,{side:"bottom",children:"Fetch"})]}),(0,t.jsxs)(A.Tooltip,{children:[(0,t.jsx)(A.TooltipTrigger,{onClick:()=>{Q(!1),_(!0)},className:"shrink-0 inline-flex h-7 w-7 items-center justify-center rounded-md text-muted-foreground hover:bg-accent hover:text-foreground transition-colors","aria-label":i("git.createBranch"),children:(0,t.jsx)(p.Plus,{className:"h-3.5 w-3.5"})}),(0,t.jsx)(A.TooltipContent,{side:"bottom",children:i("git.createBranch")})]})]})]}),(0,t.jsxs)("div",{className:"shrink-0 px-2 pb-2 space-y-1.5 border-b border-border",children:[(0,t.jsx)("textarea",{value:F,onChange:e=>T(e.target.value),placeholder:i("git.commitMsgPlaceholder"),rows:3,className:"w-full rounded-md border border-border bg-background px-2 py-1.5 text-xs text-foreground placeholder-muted-foreground outline-none transition-colors focus:border-ring focus:ring-1 focus:ring-ring resize-none",onKeyDown:e=>{(e.metaKey||e.ctrlKey)&&"Enter"===e.key&&er()}}),(0,t.jsxs)("div",{className:"flex items-center gap-1",children:[(0,t.jsxs)(S.Button,{variant:"default",className:"flex-1 h-7 gap-1.5 text-xs",onClick:er,disabled:B||!F.trim()||0===ex.length,children:[B?(0,t.jsx)(o.Loader2,{className:"h-3 w-3 animate-spin"}):(0,t.jsx)(h.Check,{className:"h-3 w-3"}),i("git.commit")]}),(0,t.jsxs)(M.DropdownMenu,{children:[(0,t.jsx)(M.DropdownMenuTrigger,{render:(0,t.jsx)(S.Button,{variant:"outline",size:"icon-xs",className:"h-7 w-7 shrink-0"}),children:(0,t.jsx)(g.MoreHorizontal,{className:"h-3.5 w-3.5"})}),(0,t.jsxs)(M.DropdownMenuContent,{align:"end",side:"bottom",className:"w-52",children:[(0,t.jsxs)(M.DropdownMenuGroup,{children:[(0,t.jsx)(M.DropdownMenuLabel,{children:i("git.commit")}),(0,t.jsxs)(M.DropdownMenuItem,{onClick:er,disabled:!F.trim()||0===ex.length,children:[(0,t.jsx)(h.Check,{className:"h-3.5 w-3.5 mr-2"}),i("git.commit")]})]}),(0,t.jsx)(M.DropdownMenuSeparator,{}),(0,t.jsxs)(M.DropdownMenuGroup,{children:[(0,t.jsx)(M.DropdownMenuLabel,{children:i("git.changes")}),(0,t.jsxs)(M.DropdownMenuItem,{onClick:()=>et(eg(ep)),disabled:0===eu.length,children:[(0,t.jsx)(p.Plus,{className:"h-3.5 w-3.5 mr-2"}),i("git.stageAll")]}),(0,t.jsxs)(M.DropdownMenuItem,{onClick:()=>es(eg(ef)),disabled:0===ex.length,children:[(0,t.jsx)(f.Minus,{className:"h-3.5 w-3.5 mr-2"}),i("git.unstageAll")]}),(0,t.jsxs)(M.DropdownMenuItem,{onClick:eh,disabled:0===eu.length,children:[(0,t.jsx)(N,{className:"h-3.5 w-3.5 mr-2"}),i("git.discardAll")]})]}),!n&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(M.DropdownMenuSeparator,{}),(0,t.jsxs)(M.DropdownMenuGroup,{children:[(0,t.jsx)(M.DropdownMenuLabel,{children:i("git.sync")}),(0,t.jsxs)(M.DropdownMenuItem,{onClick:()=>ea(),disabled:z,children:[(0,t.jsx)(c.ArrowDown,{className:"h-3.5 w-3.5 mr-2"}),i("git.pull")]}),(0,t.jsxs)(M.DropdownMenuItem,{onClick:()=>en(),disabled:W,children:[(0,t.jsx)(d.ArrowUp,{className:"h-3.5 w-3.5 mr-2"}),i("git.push")]}),(0,t.jsxs)(M.DropdownMenuSub,{children:[(0,t.jsxs)(M.DropdownMenuSubTrigger,{disabled:z,children:[(0,t.jsx)(c.ArrowDown,{className:"h-3.5 w-3.5 mr-2"}),i("git.pullFrom"),"..."]}),(0,t.jsxs)(M.DropdownMenuSubContent,{className:"max-h-60 overflow-y-auto",children:[(0,t.jsxs)(M.DropdownMenuItem,{onClick:()=>ea(),children:[(0,t.jsx)(y.GitBranch,{className:"h-3 w-3 mr-2 text-emerald-400"}),l.currentBranch,l.behind>0&&(0,t.jsxs)("span",{className:"ml-auto text-[10px] text-muted-foreground",children:["↓",l.behind]})]}),l.remoteBranches.filter(e=>e!==l.currentBranch).map(e=>(0,t.jsxs)(M.DropdownMenuItem,{onClick:()=>ea(e),children:[(0,t.jsx)(y.GitBranch,{className:"h-3 w-3 mr-2 text-sky-400"}),e]},e))]})]}),(0,t.jsxs)(M.DropdownMenuSub,{children:[(0,t.jsxs)(M.DropdownMenuSubTrigger,{disabled:W,children:[(0,t.jsx)(d.ArrowUp,{className:"h-3.5 w-3.5 mr-2"}),i("git.pushTo"),"..."]}),(0,t.jsxs)(M.DropdownMenuSubContent,{className:"max-h-60 overflow-y-auto",children:[(0,t.jsxs)(M.DropdownMenuItem,{onClick:()=>en(),children:[(0,t.jsx)(y.GitBranch,{className:"h-3 w-3 mr-2 text-emerald-400"}),l.currentBranch,l.ahead>0&&(0,t.jsxs)("span",{className:"ml-auto text-[10px] text-muted-foreground",children:["↑",l.ahead]})]}),l.remoteBranches.filter(e=>e!==l.currentBranch).map(e=>(0,t.jsxs)(M.DropdownMenuItem,{onClick:()=>en(e),children:[(0,t.jsx)(y.GitBranch,{className:"h-3 w-3 mr-2 text-sky-400"}),e]},e))]})]}),(0,t.jsxs)(M.DropdownMenuItem,{onClick:ei,disabled:K,children:[(0,t.jsx)(j.RefreshCw,{className:`h-3.5 w-3.5 mr-2 ${K?"animate-spin":""}`}),i("git.fetchAll")]})]}),(0,t.jsx)(M.DropdownMenuSeparator,{}),(0,t.jsxs)(M.DropdownMenuGroup,{children:[(0,t.jsx)(M.DropdownMenuLabel,{children:i("git.stash")}),(0,t.jsxs)(M.DropdownMenuItem,{onClick:eo,disabled:0===l.changedFiles.length,children:[(0,t.jsx)(b.Archive,{className:"h-3.5 w-3.5 mr-2"}),i("git.stashSave")]}),(0,t.jsxs)(M.DropdownMenuItem,{onClick:ec,children:[(0,t.jsx)(w.ArrowUpFromLine,{className:"h-3.5 w-3.5 mr-2"}),i("git.stashPopLatest")]})]})]}),(0,t.jsx)(M.DropdownMenuSeparator,{}),(0,t.jsxs)(M.DropdownMenuItem,{disabled:!0,className:"text-muted-foreground",children:[(0,t.jsx)(y.GitBranch,{className:"h-3.5 w-3.5 mr-2"}),l.currentBranch]})]})]})]})]}),(0,t.jsxs)(O,{scroll:n,children:[(0,t.jsx)(H,{label:i("git.stagedChanges"),count:ex.length,labelColor:"text-emerald-400",tree:ef,batchAction:()=>es(eg(ef)),batchLabel:i("git.unstageAll"),batchIcon:(0,t.jsx)(f.Minus,{className:"h-3 w-3"}),onFileClick:em,onFileAction:e=>es([e]),fileActionIcon:"−",fileActionLabel:i("git.unstageFile")}),(0,t.jsx)(H,{label:i("git.unstagedChanges"),count:eu.length,labelColor:"text-muted-foreground",tree:ep,batchAction:()=>et(eg(ep)),batchLabel:i("git.stageAll"),batchIcon:(0,t.jsx)(p.Plus,{className:"h-3 w-3"}),onFileClick:em,onFileAction:e=>et([e]),fileActionIcon:"+",fileActionLabel:i("git.stageFile"),onFileSecondaryAction:e=>ed(e),fileSecondaryIcon:(0,t.jsx)(C.Trash2,{className:"h-2.5 w-2.5"}),fileSecondaryLabel:i("git.discardFile")}),0===l.changedFiles.length&&(0,t.jsxs)("div",{className:"flex flex-col items-center justify-center py-8 text-center",children:[(0,t.jsx)(h.Check,{className:"h-5 w-5 text-emerald-400 mb-2"}),(0,t.jsx)("p",{className:"text-xs text-muted-foreground",children:i("git.noChanges")})]})]}),(0,t.jsx)(E,{open:Z,onOpenChange:_,branches:[...l?.branches??[],...l?.remoteBranches??[]],currentBranch:l?.currentBranch??"",localPath:e,onCreated:async()=>{$.toast.success(i("git.createSuccess")),await ee()},onError:e=>$.toast.error(`${i("git.createFailed")}: ${e}`)})]})}],515135)},111114,e=>{"use strict";var t=e.i(514798);let s=(0,t.createServerReference)("60b32d96afc12010ca0b2d2638c1f36cf9a7ae04c5",t.callServer,void 0,t.findSourceMapURL,"updateTask");e.s(["updateTask",0,s])},698343,502889,e=>{"use strict";var t=e.i(514798);let s=(0,t.createServerReference)("7c861f495fd28ff313b1aa5a0c701fc1903aceeefb",t.callServer,void 0,t.findSourceMapURL,"startPtyExecutionSafe");e.s(["startPtyExecutionSafe",0,s],698343);let r=(0,t.createServerReference)("40b3259dcce14539c8949fbff3152fe01393aa9e78",t.callServer,void 0,t.findSourceMapURL,"continueLatestPtyExecution");e.s(["continueLatestPtyExecution",0,r],502889)},838582,e=>{"use strict";var t=e.i(514798);let s=(0,t.createServerReference)("4059ebe87310fd6051a72d03ec63d9c6b59e067c77",t.callServer,void 0,t.findSourceMapURL,"getTaskExecutions");e.s(["getTaskExecutions",0,s])},352290,207539,382644,e=>{"use strict";var t=e.i(514798);let s=(0,t.createServerReference)("601267a6272535b2fd7c6fc6542c9f87d6c25944dc",t.callServer,void 0,t.findSourceMapURL,"updateTaskStatus");e.s(["updateTaskStatus",0,s],352290);let r=(0,t.createServerReference)("40331361e5c17195f9d0465a28076aab0f63d76013",t.callServer,void 0,t.findSourceMapURL,"checkWorktreeClean");e.s(["checkWorktreeClean",0,r],207539);let a=(0,t.createServerReference)("60ee4268e18658ca11a25fc44a40584e545b153e23",t.callServer,void 0,t.findSourceMapURL,"commitWorktreeChanges");e.s(["commitWorktreeChanges",0,a],382644)},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)},326883,e=>{"use strict";var t=e.i(289721),s=e.i(965652),r=e.i(232280),a=e.i(472074),n=e.i(882651),i=e.i(181209),l=e.i(400355),o=e.i(989383),c=e.i(12659),d=e.i(922541),h=e.i(486077),m=e.i(769824),x=e.i(519455),u=e.i(912505),f=e.i(533499);function p({status:e}){switch(e){case"COMPLETED":return(0,t.jsx)(n.CheckCircle2,{className:"h-4 w-4 text-emerald-400"});case"FAILED":return(0,t.jsx)(i.XCircle,{className:"h-4 w-4 text-red-400"});case"RUNNING":return(0,t.jsx)(l.Loader2,{className:"h-4 w-4 text-blue-400 animate-spin"});default:return(0,t.jsx)(o.Clock,{className:"h-4 w-4 text-neutral-500"})}}e.s(["ExecutionTimeline",0,function({executions:e,onResume:n,onContinueLatest:i}){let{t:l,locale:o}=(0,f.useI18n)(),[g,j]=(0,s.useState)(null),[b,w]=(0,s.useState)(null);return 0===e.length?(0,t.jsx)(u.EmptyState,{icon:m.History,title:l("execution.noHistory")}):(0,t.jsxs)("div",{className:"space-y-2 p-3",children:[(0,t.jsx)("p",{className:"px-1 text-[11px] font-semibold uppercase tracking-wider text-muted-foreground",children:l("execution.history")}),e.map(s=>{let m=function(e){if(!e)return null;try{return JSON.parse(e)}catch{return null}}(s.gitStats??null),u=function(e,t){if(!e||!t)return"";let s=new Date(t).getTime()-new Date(e).getTime();if(s<0)return"";let r=Math.floor(s/1e3);if(r<60)return`${r}s`;let a=Math.floor(r/60);if(a<60)return`${a}m ${r%60}s`;let n=Math.floor(a/60);return`${n}h ${a%60}m`}(s.startedAt??null,s.endedAt??null),f=g===s.id;return(0,t.jsxs)("div",{className:"rounded-lg border border-border bg-background/50 overflow-hidden",children:[(0,t.jsxs)("div",{className:"p-3",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2 text-xs",children:[(0,t.jsx)(p,{status:s.status}),(0,t.jsx)("span",{className:`font-medium ${function(e){switch(e){case"COMPLETED":return"text-emerald-400";case"FAILED":return"text-red-400";case"RUNNING":return"text-blue-400";default:return"text-neutral-400"}}(s.status)}`,children:function(e,t){switch(e){case"COMPLETED":return t("execution.success");case"FAILED":return t("execution.failed");case"RUNNING":return t("execution.running");default:return e}}(s.status,l)}),(0,t.jsx)("span",{className:"text-muted-foreground",children:function(e,t="zh"){if(!e)return"";let s=new Date(e),r=Math.floor((new Date().getTime()-s.getTime())/864e5),a="zh"===t?"zh-CN":"en-US",n=s.toLocaleTimeString(a,{hour:"2-digit",minute:"2-digit"});return 0===r?n:1===r?"zh"===t?`昨天 ${n}`:`Yesterday ${n}`:r<7?"zh"===t?`${r}天前 ${n}`:`${r}d ago ${n}`:s.toLocaleDateString(a,{month:"2-digit",day:"2-digit"})+" "+n}(s.startedAt??null,o)}),u&&(0,t.jsxs)("span",{className:"text-muted-foreground/60",children:["(",u,")"]})]}),(0,t.jsx)("p",{className:"mt-1.5 text-sm text-foreground/80 line-clamp-2",children:s.summary||l("execution.noSummary")}),m&&(m.commits||m.filesChanged)&&(0,t.jsxs)("div",{className:"mt-1.5 flex items-center gap-2 text-[11px] text-muted-foreground font-mono",children:[m.commits?(0,t.jsxs)("span",{children:[m.commits," ",l("execution.commits")]}):null,m.filesChanged?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("span",{children:"·"}),(0,t.jsxs)("span",{children:[m.filesChanged," ",l("execution.files")]})]}):null,m.insertions||m.deletions?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("span",{children:"·"}),m.insertions?(0,t.jsxs)("span",{className:"text-emerald-500",children:["+",m.insertions]}):null,m.deletions?(0,t.jsxs)("span",{className:"text-red-400",children:["-",m.deletions]}):null]}):null]}),s.insightNote&&(0,t.jsxs)("div",{className:"mt-2",children:[(0,t.jsxs)("button",{onClick:()=>w(b===s.id?null:s.id),className:"flex items-center gap-1.5 text-xs text-primary/90 hover:text-primary transition-colors",children:[(0,t.jsx)(h.Lightbulb,{className:"h-3.5 w-3.5"}),(0,t.jsxs)("span",{className:"font-medium",children:[l("execution.insight"),":"]}),(0,t.jsx)("span",{className:"text-foreground/70 truncate max-w-[200px]",children:s.insightNote.title}),b===s.id?(0,t.jsx)(a.ChevronUp,{className:"h-3 w-3"}):(0,t.jsx)(r.ChevronDown,{className:"h-3 w-3"})]}),b===s.id&&(0,t.jsx)("div",{className:"mt-2 rounded-md bg-primary/[0.06] border border-primary/10 p-3 text-xs text-foreground/80 whitespace-pre-wrap",children:s.insightNote.content})]}),(0,t.jsxs)("div",{className:"mt-2.5 flex items-center gap-2",children:[s.sessionId&&n?(0,t.jsxs)(x.Button,{size:"sm",onClick:()=>n(s.sessionId),className:"bg-primary/10 text-primary ring-1 ring-primary/20 hover:bg-primary/15",children:[(0,t.jsx)(c.PlayCircle,{className:"h-3.5 w-3.5"}),l("execution.resume")]}):!s.sessionId&&"FAILED"===s.status&&s.id===e[0]?.id&&i?(0,t.jsxs)(x.Button,{size:"sm",onClick:i,className:"bg-blue-500/15 text-blue-300 ring-1 ring-blue-500/20 hover:bg-blue-500/25",children:[(0,t.jsx)(d.RotateCcw,{className:"h-3.5 w-3.5"}),l("execution.tryRecover")]}):null,(0,t.jsxs)(x.Button,{variant:"ghost",size:"sm",onClick:()=>j(f?null:s.id),className:"bg-muted text-muted-foreground",children:[f?(0,t.jsx)(a.ChevronUp,{className:"h-3.5 w-3.5"}):(0,t.jsx)(r.ChevronDown,{className:"h-3.5 w-3.5"}),f?l("execution.collapse"):l("execution.details")]})]})]}),f&&(0,t.jsxs)("div",{className:"border-t border-border px-3 pb-3 space-y-3",children:[s.gitLog&&(0,t.jsxs)("div",{className:"mt-3",children:[(0,t.jsx)("p",{className:"text-[11px] font-semibold uppercase tracking-wider text-muted-foreground mb-1.5",children:l("execution.gitLog")}),(0,t.jsx)("pre",{className:"rounded-md bg-muted/50 p-2.5 text-xs font-mono text-foreground/70 overflow-x-auto whitespace-pre-wrap",children:s.gitLog.split("\n").slice(0,3).join("\n")})]}),s.terminalLog&&(0,t.jsxs)("div",{children:[(0,t.jsx)("p",{className:"text-[11px] font-semibold uppercase tracking-wider text-muted-foreground mb-1.5",children:l("execution.terminalOutput")}),(0,t.jsx)("pre",{className:"rounded-md bg-[#0f1419] p-2.5 text-xs font-mono text-neutral-300 overflow-x-auto max-h-48 overflow-y-auto whitespace-pre-wrap",children:s.terminalLog})]}),"FAILED"===s.status&&null!=s.exitCode&&(0,t.jsxs)("p",{className:"text-xs text-red-400/70",children:["Exit code: ",s.exitCode]})]})]},s.id)})]})}])}]);
1
+ (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,14842,865514,e=>{"use strict";var t=e.i(289721),s=e.i(965652),r=e.i(368490),a=e.i(232280),n=e.i(759686),i=e.i(960518),l=e.i(340873),o=e.i(400355),c=e.i(519455),d=e.i(912505),h=e.i(487486),m=e.i(776639),x=e.i(624687),u=e.i(533499);function f({patchState:e,isLargeFold:s,onLoad:r}){let{t:a}=(0,u.useI18n)();return s?(0,t.jsxs)("div",{className:"flex flex-col items-center justify-center gap-1 py-6",children:[(0,t.jsx)(c.Button,{variant:"link",onClick:r,className:"h-auto p-0 text-sm",children:a("diff.loadDiff")}),(0,t.jsx)("span",{className:"text-xs text-muted-foreground",children:a("diff.foldedLarge")})]}):e&&"loading"!==e.kind?"error"===e.kind?(0,t.jsxs)("div",{className:"flex flex-col items-center justify-center gap-2 py-6 text-sm text-muted-foreground",children:[(0,t.jsx)("span",{children:a("diff.loadFailed")}),(0,t.jsx)(c.Button,{variant:"ghost",onClick:r,children:a("diff.retry")})]}):"binary"===e.kind?(0,t.jsx)("div",{className:"flex items-center justify-center py-6 text-sm text-muted-foreground",children:a("diff.binaryNotShown")}):"empty"===e.kind?(0,t.jsx)("div",{className:"flex items-center justify-center py-6 text-sm text-muted-foreground",children:a("diff.noChanges")}):(0,t.jsx)(p,{patch:e.patch??""}):(0,t.jsx)("div",{className:"flex items-center justify-center py-6",children:(0,t.jsx)(o.Loader2,{className:"h-5 w-5 animate-spin text-muted-foreground"})})}function p({patch:e}){let{t:s}=(0,u.useI18n)(),r=e.split("\n"),a=r.length>500,n=a?r.slice(0,500):r;return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("pre",{className:"overflow-x-auto p-0 text-xs font-mono leading-5",children:n.map((e,s)=>{let r=e.startsWith("+++")||e.startsWith("---")?"px-4 block text-muted-foreground":e.startsWith("+")?"px-4 block bg-green-500/10 text-green-400":e.startsWith("-")?"px-4 block bg-red-500/10 text-red-400":e.startsWith("@@")?"px-4 block bg-blue-500/10 text-blue-300":"px-4 block text-muted-foreground";return(0,t.jsx)("span",{className:r,children:e||" "},s)})}),a&&(0,t.jsx)("div",{className:"px-4 py-2 text-xs text-muted-foreground border-t border-border",children:s("diff.patchTruncated",{n:String(500),total:String(r.length)})})]})}e.s(["TaskDiffView",0,function({taskId:e,files:o,totalAdded:p,totalRemoved:g,hasConflicts:j,conflictFiles:b,onCommit:w,hasUncommitted:N}){let{t:y}=(0,u.useI18n)(),[v,k]=(0,s.useState)(new Set),[C,S]=(0,s.useState)(new Map),[M,D]=(0,s.useState)(!1),[L,A]=(0,s.useState)(""),[F,T]=(0,s.useState)(!1),B=t=>{S(e=>new Map(e).set(t,{kind:"loading"})),fetch(`/api/tasks/${e}/diff-patch?file=${encodeURIComponent(t)}`).then(e=>e.ok?e.json():Promise.reject(Error(`HTTP ${e.status}`))).then(e=>{S(s=>{let r=new Map(s);return"binary"===e.kind?r.set(t,{kind:"binary"}):"empty"===e.kind?r.set(t,{kind:"empty"}):r.set(t,{kind:"ready",patch:e.patch??""}),r})}).catch(()=>{S(e=>new Map(e).set(t,{kind:"error"}))})};return(0,t.jsxs)("div",{className:"flex flex-col h-full",children:[(0,t.jsxs)("div",{className:"flex items-center justify-between border-b border-border px-4 py-3 flex-shrink-0",children:[(0,t.jsxs)("div",{className:"flex items-center gap-3 text-sm text-muted-foreground",children:[(0,t.jsxs)("span",{className:"font-medium text-foreground",children:[o.length," files changed"]}),(0,t.jsxs)("span",{className:"text-green-400 font-mono text-xs",children:["+",p]}),(0,t.jsxs)("span",{className:"text-red-400 font-mono text-xs",children:["-",g]})]}),(0,t.jsx)("div",{className:"flex items-center gap-2",children:N&&w&&(0,t.jsxs)(c.Button,{variant:"outline",onClick:()=>D(!0),className:"gap-2",children:[(0,t.jsx)(l.GitCommitHorizontal,{className:"h-4 w-4"}),y("diff.commit")]})})]}),j&&(0,t.jsxs)("div",{className:"flex flex-col gap-2 border-b border-border bg-amber-500/5 px-4 py-3 flex-shrink-0",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2 text-amber-400",children:[(0,t.jsx)(n.AlertTriangle,{className:"h-4 w-4 flex-shrink-0"}),(0,t.jsxs)("span",{className:"text-sm font-medium",children:["Merge blocked: ",b.length," conflicting file",1!==b.length?"s":""]})]}),(0,t.jsx)("ul",{className:"ml-6 space-y-1",children:b.map(e=>(0,t.jsx)("li",{className:"text-xs font-mono text-amber-300/80",children:e},e))})]}),(0,t.jsx)("div",{className:"flex-1 overflow-auto",children:0===o.length?(0,t.jsx)(d.EmptyState,{icon:i.GitCompare,title:y("diff.noChanges"),className:"h-full"}):(0,t.jsx)("div",{className:"divide-y divide-border",children:o.map(e=>{let s=v.has(e.filename),n=C.get(e.filename),i=e.added+e.removed;return(0,t.jsxs)("div",{children:[(0,t.jsxs)(c.Button,{variant:"ghost",type:"button",onClick:()=>{let t;return t=v.has(e.filename),void(k(t=>{let s=new Set(t);return s.has(e.filename)?s.delete(e.filename):s.add(e.filename),s}),t||e.isBinary||C.has(e.filename)||e.added+e.removed<=200&&B(e.filename))},className:"flex w-full items-center gap-2 px-4 py-2.5 text-left hover:bg-accent/50 transition-colors rounded-none h-auto",children:[s?(0,t.jsx)(a.ChevronDown,{className:"h-3.5 w-3.5 flex-shrink-0 text-muted-foreground"}):(0,t.jsx)(r.ChevronRight,{className:"h-3.5 w-3.5 flex-shrink-0 text-muted-foreground"}),(0,t.jsx)("span",{className:"flex-1 truncate text-sm font-mono text-foreground",children:e.filename}),e.isBinary?(0,t.jsx)(h.Badge,{variant:"secondary",className:"text-[10px] bg-muted text-muted-foreground border border-border",children:y("diff.binary")}):(0,t.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,t.jsxs)("span",{className:"text-xs font-mono text-green-400",children:["+",e.added]}),(0,t.jsxs)("span",{className:"text-xs font-mono text-red-400",children:["-",e.removed]})]})]}),s&&!e.isBinary&&(0,t.jsx)("div",{className:"border-t border-border bg-background",children:(0,t.jsx)(f,{filename:e.filename,patchState:n,isLargeFold:!n&&i>200,onLoad:()=>B(e.filename)})})]},e.filename)})})}),(0,t.jsx)(m.Dialog,{open:M,onOpenChange:D,children:(0,t.jsxs)(m.DialogContent,{className:"max-w-md",children:[(0,t.jsx)(m.DialogHeader,{children:(0,t.jsx)(m.DialogTitle,{children:y("diff.commitChanges")})}),(0,t.jsx)("div",{className:"flex flex-col gap-3",children:(0,t.jsx)(x.Textarea,{value:L,onChange:e=>A(e.target.value),placeholder:y("diff.commitMessagePlaceholder"),rows:5,className:"w-full rounded-md border border-border bg-background px-3 py-2 text-sm text-foreground placeholder-muted-foreground outline-none resize-y min-h-[80px]"})}),(0,t.jsxs)(m.DialogFooter,{children:[(0,t.jsx)(c.Button,{variant:"ghost",onClick:()=>D(!1),children:y("common.cancel")}),(0,t.jsx)(c.Button,{onClick:async()=>{if(L.trim()&&w){T(!0);try{await w(L.trim()),A(""),D(!1)}finally{T(!1)}}},disabled:!L.trim()||F,children:F?"...":y("diff.commit")})]})]})})]})}],14842);var g=e.i(538059);let j=(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"}]]);e.s(["TaskMergeConfirmDialog",0,function({open:e,onOpenChange:r,taskId:a,taskTitle:n,baseBranch:i,fileCount:l,commitCount:d,commitLog:h=[],onMergeComplete:x}){let u=(0,g.useRouter)(),[f,p]=(0,s.useState)(!1),[b,w]=(0,s.useState)(null),N=async()=>{p(!0),w(null);try{let e=await fetch(`/api/tasks/${a}/merge`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({})});if(e.ok){r(!1),x(),u.refresh();return}let t=await e.json().catch(()=>({error:"Merge failed"}));409===e.status?w(`Merge conflicts detected: ${Array.isArray(t.conflictFiles)?t.conflictFiles.join(", "):"unknown files"}`):w(t.error??"Merge failed")}catch{w("Network error — merge failed")}finally{p(!1)}};return(0,t.jsx)(m.Dialog,{open:e,onOpenChange:r,children:(0,t.jsxs)(m.DialogContent,{showCloseButton:!0,className:"sm:max-w-md",children:[(0,t.jsx)(m.DialogHeader,{children:(0,t.jsxs)(m.DialogTitle,{className:"flex items-center gap-2",children:[(0,t.jsx)(j,{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:i})]}),(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:l})]}),(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:d})]})]}),h.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:h.map((e,s)=>(0,t.jsx)("div",{className:"text-xs font-mono text-foreground/80",children:e},s))})]}),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)(m.DialogFooter,{children:[(0,t.jsx)(c.Button,{variant:"outline",onClick:()=>r(!1),disabled:f,children:"Cancel"}),(0,t.jsx)(c.Button,{onClick:N,disabled:f,className:"gap-2",children:f?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(o.Loader2,{className:"h-4 w-4 animate-spin"}),"Merging..."]}):(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(j,{className:"h-4 w-4"}),"Confirm Merge"]})})]})]})})}],865514)},491911,314411,e=>{"use strict";let t=(0,e.i(572989).default)("file",[["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"}]]);e.s(["default",0,t],314411),e.s(["File",0,t],491911)},989383,769824,e=>{"use strict";var t=e.i(572989);let s=(0,t.default)("clock",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 6v6l4 2",key:"mmk7yg"}]]);e.s(["Clock",0,s],989383);let r=(0,t.default)("history",[["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"}],["path",{d:"M12 7v5l4 2",key:"1fdv2h"}]]);e.s(["History",0,r],769824)},244354,e=>{"use strict";async function t(e,s,r={}){let a=await fetch("/api/git",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({action:s,path:e,...r})});if(!a.ok)throw Error((await a.json()).error||`${s} failed`);return a.json()}e.s(["gitAction",0,t])},48019,782516,755696,886156,586564,719493,436539,e=>{"use strict";var t=e.i(572989);let s=(0,t.default)("file-plus",[["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:"M9 15h6",key:"cctwl0"}],["path",{d:"M12 18v-6",key:"17g6i2"}]]);e.s(["FilePlus",0,s],48019);let r=(0,t.default)("file-minus",[["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:"M9 15h6",key:"cctwl0"}]]);e.s(["FileMinus",0,r],782516);let a=(0,t.default)("file-question-mark",[["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:"M12 17h.01",key:"p32p05"}],["path",{d:"M9.1 9a3 3 0 0 1 5.82 1c0 2-3 3-3 3",key:"mhlwft"}]]);e.s(["FileQuestion",0,a],755696);let n=(0,t.default)("file-pen",[["path",{d:"M12.659 22H18a2 2 0 0 0 2-2V8a2.4 2.4 0 0 0-.706-1.706l-3.588-3.588A2.4 2.4 0 0 0 14 2H6a2 2 0 0 0-2 2v9.34",key:"o6klzx"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M10.378 12.622a1 1 0 0 1 3 3.003L8.36 20.637a2 2 0 0 1-.854.506l-2.867.837a.5.5 0 0 1-.62-.62l.836-2.869a2 2 0 0 1 .506-.853z",key:"zhnas1"}]]);e.s(["FileEdit",0,n],886156);let i=(0,t.default)("arrow-down",[["path",{d:"M12 5v14",key:"s699le"}],["path",{d:"m19 12-7 7-7-7",key:"1idqje"}]]);e.s(["ArrowDown",0,i],586564);let l=(0,t.default)("arrow-up",[["path",{d:"m5 12 7-7 7 7",key:"hav0vg"}],["path",{d:"M12 19V5",key:"x0mq9r"}]]);e.s(["ArrowUp",0,l],719493);let o=(0,t.default)("minus",[["path",{d:"M5 12h14",key:"1ays0h"}]]);e.s(["Minus",0,o],436539)},375306,e=>{"use strict";let t=(0,e.i(572989).default)("arrow-up-from-line",[["path",{d:"m18 9-6-6-6 6",key:"kcunyi"}],["path",{d:"M12 3v14",key:"7cf3v8"}],["path",{d:"M5 21h14",key:"11awu3"}]]);e.s(["ArrowUpFromLine",0,t],375306)},515135,e=>{"use strict";var t=e.i(289721),s=e.i(965652),r=e.i(491911),a=e.i(48019),n=e.i(782516),i=e.i(755696),l=e.i(886156),o=e.i(400355),c=e.i(586564),d=e.i(719493),h=e.i(597746),m=e.i(368490),x=e.i(232280),u=e.i(977982),f=e.i(436539),p=e.i(232545),g=e.i(49007),j=e.i(194358),b=e.i(487278),w=e.i(375306);let N=(0,e.i(572989).default)("undo-2",[["path",{d:"M9 14 4 9l5-5",key:"102s5s"}],["path",{d:"M4 9h10.5a5.5 5.5 0 0 1 5.5 5.5a5.5 5.5 0 0 1-5.5 5.5H11",key:"f3b9sd"}]]);var y=e.i(226145),v=e.i(738690),k=e.i(242941),C=e.i(998626),S=e.i(519455),M=e.i(755146),D=e.i(759684),L=e.i(337822),A=e.i(746798),F=e.i(776639),T=e.i(793479),B=e.i(624687),I=e.i(533499);function E({open:e,onOpenChange:r,branches:a,currentBranch:n,localPath:i,onCreated:l,onError:c}){let{t:d}=(0,I.useI18n)(),[m,u]=(0,s.useState)(""),[f,p]=(0,s.useState)(n),[g,j]=(0,s.useState)(""),[b,w]=(0,s.useState)(!1),[N,k]=(0,s.useState)(""),[C,M]=(0,s.useState)(!1);(0,s.useEffect)(()=>{e&&(u(""),p(n),j(""),k(""))},[e,n]);let D=[...new Set(a)].filter(e=>e.toLowerCase().includes(N.toLowerCase())),L=async()=>{if(m.trim()){w(!0);try{let e=await fetch("/api/git",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({action:"create-branch",path:i,branch:m.trim(),baseBranch:f})});if(e.ok)r(!1),l();else{let t=await e.json();c(t.error||"Unknown error")}}catch{c("Network error")}finally{w(!1)}}};return(0,t.jsx)(F.Dialog,{open:e,onOpenChange:r,children:(0,t.jsxs)(F.DialogContent,{className:"sm:max-w-sm",children:[(0,t.jsx)(F.DialogHeader,{children:(0,t.jsx)(F.DialogTitle,{children:d("git.createBranch")})}),(0,t.jsxs)("div",{className:"space-y-3 py-2",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)("label",{className:"text-xs font-medium text-muted-foreground",children:d("git.branchName")}),(0,t.jsx)(T.Input,{value:m,onChange:e=>u(e.target.value),placeholder:d("git.branchNamePlaceholder"),className:"mt-1.5 font-mono text-xs",onKeyDown:e=>"Enter"===e.key&&L()})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)("label",{className:"text-xs font-medium text-muted-foreground",children:d("git.baseBranch")}),(0,t.jsxs)("div",{className:"relative mt-1.5",children:[(0,t.jsxs)("button",{onClick:()=>M(!C),className:"flex w-full items-center justify-between rounded-lg border border-border bg-muted/50 px-3 py-2 text-left transition-colors hover:bg-accent",children:[(0,t.jsxs)("div",{className:"flex min-w-0 items-center gap-2",children:[(0,t.jsx)(y.GitBranch,{className:"h-3 w-3 shrink-0 text-emerald-400"}),(0,t.jsx)("span",{className:"truncate font-mono text-xs text-foreground",title:f,children:f})]}),(0,t.jsx)(x.ChevronDown,{className:`h-3 w-3 text-muted-foreground transition-transform ${C?"rotate-180":""}`})]}),C&&(0,t.jsxs)("div",{className:"absolute left-0 right-0 top-full z-20 mt-1 rounded-lg border border-border bg-popover shadow-xl",children:[(0,t.jsx)("div",{className:"border-b border-border p-1.5",children:(0,t.jsxs)("div",{className:"relative",children:[(0,t.jsx)(v.Search,{className:"absolute left-2 top-1/2 -translate-y-1/2 h-3 w-3 text-muted-foreground"}),(0,t.jsx)("input",{value:N,onChange:e=>k(e.target.value),placeholder:"Filter...",autoFocus:!0,className:"h-7 w-full rounded-md bg-muted/50 pl-7 pr-2 text-xs text-foreground placeholder-muted-foreground outline-none focus:ring-1 focus:ring-ring"})]})}),(0,t.jsx)("div",{className:"max-h-40 overflow-auto py-1",children:D.map(e=>(0,t.jsxs)("button",{onClick:()=>{p(e),M(!1)},className:`flex w-full items-center gap-2 px-3 py-1.5 text-left transition-colors ${e===f?"bg-emerald-500/10 text-emerald-400":"text-secondary-foreground hover:bg-accent"}`,children:[(0,t.jsx)(y.GitBranch,{className:"h-3 w-3 shrink-0"}),(0,t.jsx)("span",{className:"truncate font-mono text-xs",title:e,children:e}),e===f&&(0,t.jsx)(h.Check,{className:"h-3 w-3 ml-auto shrink-0"})]},e))})]})]})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)("label",{className:"text-xs font-medium text-muted-foreground",children:d("git.branchDesc")}),(0,t.jsx)(B.Textarea,{value:g,onChange:e=>j(e.target.value),placeholder:d("git.branchDescPlaceholder"),rows:2,className:"mt-1.5 w-full rounded-md border border-border bg-background px-3 py-2 text-sm text-foreground placeholder-muted-foreground outline-none transition-colors focus:border-ring focus:ring-1 focus:ring-ring resize-none"})]})]}),(0,t.jsxs)(F.DialogFooter,{children:[(0,t.jsx)(S.Button,{variant:"outline",onClick:()=>r(!1),children:d("common.cancel")}),(0,t.jsxs)(S.Button,{onClick:L,disabled:!m.trim()||b,className:"bg-primary/10 text-primary ring-1 ring-primary/20 hover:bg-primary/15",children:[b?(0,t.jsx)(o.Loader2,{className:"h-3 w-3 animate-spin mr-1"}):null,d("common.create")]})]})]})})}var $=e.i(360112),P=e.i(244354);let R={modified:l.FileEdit,added:a.FilePlus,deleted:n.FileMinus,untracked:i.FileQuestion,renamed:l.FileEdit},z={modified:"text-amber-400",added:"text-emerald-400",deleted:"text-rose-400",untracked:"text-muted-foreground",renamed:"text-sky-400"},U={modified:"M",added:"A",deleted:"D",untracked:"U",renamed:"R"};function G(e){let t={name:"",path:"",isDir:!0,children:[]};for(let s of e){let e=s.file.split("/").filter(Boolean);if(0===e.length)continue;let r=t;for(let t=0;t<e.length;t++){let a=e[t],n=t===e.length-1,i=e.slice(0,t+1).join("/");if(n)r.children.push({name:a,path:i,isDir:!1,children:[],file:s});else{let e=r.children.find(e=>e.isDir&&e.name===a);e||(e={name:a,path:i,isDir:!0,children:[]},r.children.push(e)),r=e}}}return(function e(t){if(t.isDir&&(t.children=t.children.map(e),1===t.children.length&&t.children[0].isDir&&""!==t.name)){let e=t.children[0];return{...e,name:`${t.name}/${e.name}`}}return t})(t).children.sort((e,t)=>e.isDir!==t.isDir?e.isDir?-1:1:e.name.localeCompare(t.name))}function O({scroll:e,children:s}){return e?(0,t.jsx)(D.ScrollArea,{className:"flex-1 min-h-0",children:s}):(0,t.jsx)("div",{children:s})}function H({label:e,count:r,labelColor:a,tree:n,batchAction:i,batchLabel:l,batchIcon:o,onFileClick:c,onFileAction:d,fileActionIcon:h,fileActionLabel:u,onFileSecondaryAction:f,fileSecondaryIcon:p,fileSecondaryLabel:g}){let[j,b]=(0,s.useState)(!0);return 0===r?null:(0,t.jsxs)("div",{className:"border-b border-border",children:[(0,t.jsxs)("div",{className:"group flex items-center justify-between px-2 py-1.5 hover:bg-accent/50 transition-colors",children:[(0,t.jsxs)("button",{onClick:()=>b(!j),className:"flex items-center gap-1 flex-1 min-w-0",children:[j?(0,t.jsx)(x.ChevronDown,{className:"h-3 w-3 shrink-0 text-muted-foreground"}):(0,t.jsx)(m.ChevronRight,{className:"h-3 w-3 shrink-0 text-muted-foreground"}),(0,t.jsxs)("span",{className:`text-[10px] font-semibold uppercase tracking-wider ${a}`,children:[e," (",r,")"]})]}),(0,t.jsx)(S.Button,{variant:"ghost",size:"icon-xs",onClick:i,className:"text-muted-foreground opacity-0 group-hover:opacity-100 transition-opacity","aria-label":l,children:o})]}),j&&(0,t.jsx)("div",{className:"pb-1",children:n.map(e=>(0,t.jsx)(W,{node:e,depth:0,onFileClick:c,onFileAction:d,fileActionIcon:h,fileActionLabel:u,onFileSecondaryAction:f,fileSecondaryIcon:p,fileSecondaryLabel:g},e.path))})]})}function W({node:e,depth:a,onFileClick:n,onFileAction:i,fileActionIcon:l,fileActionLabel:o,onFileSecondaryAction:c,fileSecondaryIcon:d,fileSecondaryLabel:h}){let[f,p]=(0,s.useState)(!0),g={paddingLeft:`calc(${a} * 8px + 4px)`};if(e.isDir)return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)("button",{onClick:()=>p(!f),className:"flex w-full items-center gap-1 py-0.5 px-1 rounded-sm min-h-[28px] hover:bg-accent hover:text-accent-foreground transition-colors text-left",style:g,children:[f?(0,t.jsx)(x.ChevronDown,{className:"h-3 w-3 shrink-0 text-muted-foreground"}):(0,t.jsx)(m.ChevronRight,{className:"h-3 w-3 shrink-0 text-muted-foreground"}),(0,t.jsx)(u.Folder,{className:"h-3.5 w-3.5 shrink-0 text-amber-400"}),(0,t.jsx)("span",{className:"text-[13px] text-muted-foreground truncate",children:e.name})]}),f&&e.children.sort((e,t)=>e.isDir!==t.isDir?e.isDir?-1:1:e.name.localeCompare(t.name)).map(e=>(0,t.jsx)(W,{node:e,depth:a+1,onFileClick:n,onFileAction:i,fileActionIcon:l,fileActionLabel:o,onFileSecondaryAction:c,fileSecondaryIcon:d,fileSecondaryLabel:h},e.path))]});let j=e.file,b=R[j.status]||r.File,w=z[j.status]||"text-muted-foreground",N=U[j.status]||"?";return(0,t.jsxs)("div",{className:"group flex items-center gap-1 py-0.5 px-1 rounded-sm min-h-[28px] hover:bg-accent hover:text-accent-foreground transition-colors cursor-pointer",style:g,onClick:()=>n(j),children:[(0,t.jsx)("span",{className:"h-3 w-3 shrink-0"}),(0,t.jsx)(b,{className:`h-3.5 w-3.5 shrink-0 ${w}`}),(0,t.jsx)("span",{className:"text-[13px] text-foreground truncate flex-1",children:e.name}),(0,t.jsx)("span",{className:`text-[11px] font-mono font-bold shrink-0 mr-1 ${w}`,children:N}),c&&(0,t.jsxs)(A.Tooltip,{children:[(0,t.jsx)(A.TooltipTrigger,{onClick:e=>{e.stopPropagation(),c(j.file)},className:"shrink-0 rounded p-0.5 text-muted-foreground opacity-0 group-hover:opacity-100 hover:bg-destructive/20 hover:text-destructive transition-all","aria-label":h??"",children:d}),h&&(0,t.jsx)(A.TooltipContent,{side:"bottom",children:h})]}),(0,t.jsxs)(A.Tooltip,{children:[(0,t.jsx)(A.TooltipTrigger,{onClick:e=>{e.stopPropagation(),i(j.file)},className:"shrink-0 rounded px-1 text-xs font-mono text-muted-foreground opacity-0 group-hover:opacity-100 hover:bg-background hover:text-foreground transition-all mr-1","aria-label":o??"",children:l}),o&&(0,t.jsx)(A.TooltipContent,{side:"bottom",children:o})]})]})}e.s(["EditorGitPanel",0,function({localPath:e,onFileSelect:r,mode:a="project"}){let n="task"===a,{t:i}=(0,I.useI18n)(),[l,m]=(0,s.useState)(null),[u,D]=(0,s.useState)(!0),[F,T]=(0,s.useState)(""),[B,R]=(0,s.useState)(!1),[z,U]=(0,s.useState)(!1),[W,V]=(0,s.useState)(!1),[K,q]=(0,s.useState)(!1),[J,Q]=(0,s.useState)(!1),[X,Y]=(0,s.useState)(""),[Z,_]=(0,s.useState)(!1),ee=(0,s.useCallback)(async()=>{try{let t=await fetch(`/api/git?path=${encodeURIComponent(e)}`);if(t.ok){let s=await t.json();m({changedFiles:s.changedFiles??[],ahead:s.ahead??0,behind:s.behind??0,remoteUrl:s.remoteUrl??"",currentBranch:s.currentBranch??"",branches:s.branches??[],remoteBranches:s.remoteBranches??[],topLevel:s.topLevel??e})}}catch{}finally{D(!1)}},[e]);(0,s.useEffect)(()=>{ee();let e=setInterval(ee,5e3);return()=>clearInterval(e)},[ee]);let et=async t=>{try{await (0,P.gitAction)(e,"stage",{files:t}),await ee()}catch(e){$.toast.error(e instanceof Error?e.message:String(e))}},es=async t=>{try{await (0,P.gitAction)(e,"unstage",{files:t}),await ee()}catch(e){$.toast.error(e instanceof Error?e.message:String(e))}},er=async()=>{if(F.trim()){R(!0);try{await (0,P.gitAction)(e,"commit",{message:F}),T(""),$.toast.success(i("git.commitSuccess")),await ee()}catch(e){$.toast.error(e instanceof Error?e.message:String(e))}finally{R(!1)}}},ea=async t=>{U(!0);try{await (0,P.gitAction)(e,"pull",t?{branch:t}:{}),$.toast.success(i("git.pullSuccess")),await ee()}catch(e){$.toast.error(e instanceof Error?e.message:String(e))}finally{U(!1)}},en=async t=>{V(!0);try{await (0,P.gitAction)(e,"push",t?{branch:t}:{}),$.toast.success(i("git.pushSuccess")),await ee()}catch(e){$.toast.error(e instanceof Error?e.message:String(e))}finally{V(!1)}},ei=async()=>{q(!0);try{await (0,P.gitAction)(e,"fetch"),$.toast.success(i("git.fetchSuccess")),await ee()}catch(e){$.toast.error(e instanceof Error?e.message:String(e))}finally{q(!1)}},el=async t=>{try{await (0,P.gitAction)(e,"checkout",{branch:t}),Q(!1),$.toast.success(`${i("git.switchSuccess")} ${t}`),await ee()}catch(e){$.toast.error(e instanceof Error?e.message:String(e))}},eo=async()=>{try{await (0,P.gitAction)(e,"stash-save",{message:F||void 0}),T(""),$.toast.success(i("git.stashSaved")),await ee()}catch(e){$.toast.error(e instanceof Error?e.message:String(e))}},ec=async()=>{try{await (0,P.gitAction)(e,"stash-pop",{index:0}),$.toast.success(i("git.stashApplied")),await ee()}catch(e){$.toast.error(e instanceof Error?e.message:String(e))}},ed=async t=>{try{await (0,P.gitAction)(e,"discard-file",{file:t}),$.toast.success(i("git.discardFileSuccess")),await ee()}catch(e){$.toast.error(e instanceof Error?e.message:String(e))}},eh=async()=>{try{await (0,P.gitAction)(e,"discard-all"),$.toast.success(i("git.discardSuccess")),await ee()}catch(e){$.toast.error(e instanceof Error?e.message:String(e))}},em=async t=>{if("deleted"===t.status)return;let s=l?.topLevel??e;try{let a=await (0,P.gitAction)(e,"show",{file:t.file});r?.(t.file,a.content??"",s)}catch{r?.(t.file,"",s)}},ex=l?.changedFiles.filter(e=>e.staged)??[],eu=l?.changedFiles.filter(e=>!e.staged)??[],ef=(0,s.useMemo)(()=>G(ex),[ex]),ep=(0,s.useMemo)(()=>G(eu),[eu]);if(u)return(0,t.jsx)("div",{className:"flex h-full items-center justify-center",children:(0,t.jsx)(o.Loader2,{className:"h-4 w-4 animate-spin text-muted-foreground"})});if(!l)return null;function eg(e){let t=[];for(let s of e)s.isDir?t.push(...eg(s.children)):s.file&&t.push(s.file.file);return t}let ej=[...l?.branches??[],...(l?.remoteBranches??[]).filter(e=>!l?.branches?.includes(e))],eb=X?ej.filter(e=>e.toLowerCase().includes(X.toLowerCase())):ej;return(0,t.jsxs)("div",{className:n?"flex flex-col h-full overflow-hidden":"flex flex-col",children:[(0,t.jsxs)("div",{className:"shrink-0 px-2 pt-2 pb-1 flex items-center gap-1",children:[n?(0,t.jsxs)(A.Tooltip,{children:[(0,t.jsx)(A.TooltipTrigger,{render:(0,t.jsxs)("div",{className:"flex flex-1 min-w-0 items-center gap-1.5 rounded-md border border-border bg-muted/30 px-2 py-1.5",children:[(0,t.jsx)(y.GitBranch,{className:"h-3 w-3 shrink-0 text-emerald-400"}),(0,t.jsx)("span",{className:"truncate font-mono text-xs text-foreground",children:l?.currentBranch||"—"})]})}),(0,t.jsx)(A.TooltipContent,{side:"bottom",className:"font-mono text-xs",children:l?.currentBranch||"—"})]}):(0,t.jsxs)(L.Popover,{open:J,onOpenChange:e=>{Q(e),e&&Y("")},children:[(0,t.jsxs)(L.PopoverTrigger,{className:"flex flex-1 min-w-0 items-center justify-between rounded-md border border-border bg-muted/50 px-2 py-1.5 text-left transition-colors hover:bg-accent",children:[(0,t.jsxs)("div",{className:"flex items-center gap-1.5 min-w-0",children:[(0,t.jsx)(y.GitBranch,{className:"h-3 w-3 shrink-0 text-emerald-400"}),(0,t.jsx)("span",{className:"truncate font-mono text-xs text-foreground",title:l?.currentBranch||void 0,children:l?.currentBranch||"—"})]}),(0,t.jsx)(x.ChevronDown,{className:`h-3 w-3 shrink-0 text-muted-foreground transition-transform ${J?"rotate-180":""}`})]}),(0,t.jsxs)(L.PopoverContent,{align:"start",sideOffset:4,className:"w-max min-w-[var(--anchor-width)] max-w-[320px] gap-0 overflow-hidden p-0",children:[(0,t.jsx)("div",{className:"border-b border-border p-1.5",children:(0,t.jsxs)("div",{className:"relative",children:[(0,t.jsx)(v.Search,{className:"absolute left-2 top-1/2 -translate-y-1/2 h-3 w-3 text-muted-foreground"}),(0,t.jsx)("input",{value:X,onChange:e=>Y(e.target.value),placeholder:"Filter...",autoFocus:!0,className:"h-7 w-full rounded-md bg-muted/50 pl-7 pr-2 text-xs text-foreground placeholder-muted-foreground outline-none focus:ring-1 focus:ring-ring"})]})}),(0,t.jsxs)("div",{className:"max-h-48 overflow-auto py-1",children:[(l?.branches??[]).filter(e=>e.toLowerCase().includes(X.toLowerCase())).length>0&&(0,t.jsx)("p",{className:"px-3 pt-1 pb-0.5 text-[10px] font-semibold uppercase tracking-wider text-muted-foreground",children:i("git.localBranches")}),(l?.branches??[]).filter(e=>e.toLowerCase().includes(X.toLowerCase())).map(e=>{let s=e===l?.currentBranch;return(0,t.jsxs)("button",{onClick:()=>{s?Q(!1):el(e)},className:`flex w-full items-center gap-2 px-3 py-1 text-left transition-colors ${s?"bg-emerald-500/10 text-emerald-400":"text-secondary-foreground hover:bg-accent"}`,children:[(0,t.jsx)(y.GitBranch,{className:"h-3 w-3 shrink-0"}),(0,t.jsx)("span",{className:"truncate font-mono text-xs",title:e,children:e}),s&&(0,t.jsx)(h.Check,{className:"h-3 w-3 ml-auto shrink-0"})]},`local-${e}`)}),(l?.remoteBranches??[]).filter(e=>!l?.branches?.includes(e)).filter(e=>e.toLowerCase().includes(X.toLowerCase())).length>0&&(0,t.jsx)("p",{className:"px-3 pt-2 pb-0.5 text-[10px] font-semibold uppercase tracking-wider text-muted-foreground",children:i("git.remoteBranches")}),(l?.remoteBranches??[]).filter(e=>!l?.branches?.includes(e)).filter(e=>e.toLowerCase().includes(X.toLowerCase())).map(e=>(0,t.jsxs)("button",{onClick:()=>el(e),className:"flex w-full items-center gap-2 px-3 py-1 text-left text-secondary-foreground transition-colors hover:bg-accent",children:[(0,t.jsx)(k.Globe,{className:"h-3 w-3 shrink-0 text-sky-400"}),(0,t.jsx)("span",{className:"truncate font-mono text-xs",title:e,children:e})]},`remote-${e}`)),0===eb.length&&(0,t.jsx)("p",{className:"px-3 py-2 text-xs text-muted-foreground",children:"No branches found"})]})]})]}),!n&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)(A.Tooltip,{children:[(0,t.jsx)(A.TooltipTrigger,{onClick:ei,disabled:K,className:"shrink-0 inline-flex h-7 w-7 items-center justify-center rounded-md text-muted-foreground hover:bg-accent hover:text-foreground transition-colors disabled:opacity-50 disabled:cursor-not-allowed","aria-label":"Fetch",children:(0,t.jsx)(j.RefreshCw,{className:`h-3.5 w-3.5 ${K?"animate-spin":""}`})}),(0,t.jsx)(A.TooltipContent,{side:"bottom",children:"Fetch"})]}),(0,t.jsxs)(A.Tooltip,{children:[(0,t.jsx)(A.TooltipTrigger,{onClick:()=>{Q(!1),_(!0)},className:"shrink-0 inline-flex h-7 w-7 items-center justify-center rounded-md text-muted-foreground hover:bg-accent hover:text-foreground transition-colors","aria-label":i("git.createBranch"),children:(0,t.jsx)(p.Plus,{className:"h-3.5 w-3.5"})}),(0,t.jsx)(A.TooltipContent,{side:"bottom",children:i("git.createBranch")})]})]})]}),(0,t.jsxs)("div",{className:"shrink-0 px-2 pb-2 space-y-1.5 border-b border-border",children:[(0,t.jsx)("textarea",{value:F,onChange:e=>T(e.target.value),placeholder:i("git.commitMsgPlaceholder"),rows:3,className:"w-full rounded-md border border-border bg-background px-2 py-1.5 text-xs text-foreground placeholder-muted-foreground outline-none transition-colors focus:border-ring focus:ring-1 focus:ring-ring resize-none",onKeyDown:e=>{(e.metaKey||e.ctrlKey)&&"Enter"===e.key&&er()}}),(0,t.jsxs)("div",{className:"flex items-center gap-1",children:[(0,t.jsxs)(S.Button,{variant:"default",className:"flex-1 h-7 gap-1.5 text-xs",onClick:er,disabled:B||!F.trim()||0===ex.length,children:[B?(0,t.jsx)(o.Loader2,{className:"h-3 w-3 animate-spin"}):(0,t.jsx)(h.Check,{className:"h-3 w-3"}),i("git.commit")]}),(0,t.jsxs)(M.DropdownMenu,{children:[(0,t.jsx)(M.DropdownMenuTrigger,{render:(0,t.jsx)(S.Button,{variant:"outline",size:"icon-xs",className:"h-7 w-7 shrink-0"}),children:(0,t.jsx)(g.MoreHorizontal,{className:"h-3.5 w-3.5"})}),(0,t.jsxs)(M.DropdownMenuContent,{align:"end",side:"bottom",className:"w-52",children:[(0,t.jsxs)(M.DropdownMenuGroup,{children:[(0,t.jsx)(M.DropdownMenuLabel,{children:i("git.commit")}),(0,t.jsxs)(M.DropdownMenuItem,{onClick:er,disabled:!F.trim()||0===ex.length,children:[(0,t.jsx)(h.Check,{className:"h-3.5 w-3.5 mr-2"}),i("git.commit")]})]}),(0,t.jsx)(M.DropdownMenuSeparator,{}),(0,t.jsxs)(M.DropdownMenuGroup,{children:[(0,t.jsx)(M.DropdownMenuLabel,{children:i("git.changes")}),(0,t.jsxs)(M.DropdownMenuItem,{onClick:()=>et(eg(ep)),disabled:0===eu.length,children:[(0,t.jsx)(p.Plus,{className:"h-3.5 w-3.5 mr-2"}),i("git.stageAll")]}),(0,t.jsxs)(M.DropdownMenuItem,{onClick:()=>es(eg(ef)),disabled:0===ex.length,children:[(0,t.jsx)(f.Minus,{className:"h-3.5 w-3.5 mr-2"}),i("git.unstageAll")]}),(0,t.jsxs)(M.DropdownMenuItem,{onClick:eh,disabled:0===eu.length,children:[(0,t.jsx)(N,{className:"h-3.5 w-3.5 mr-2"}),i("git.discardAll")]})]}),!n&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(M.DropdownMenuSeparator,{}),(0,t.jsxs)(M.DropdownMenuGroup,{children:[(0,t.jsx)(M.DropdownMenuLabel,{children:i("git.sync")}),(0,t.jsxs)(M.DropdownMenuItem,{onClick:()=>ea(),disabled:z,children:[(0,t.jsx)(c.ArrowDown,{className:"h-3.5 w-3.5 mr-2"}),i("git.pull")]}),(0,t.jsxs)(M.DropdownMenuItem,{onClick:()=>en(),disabled:W,children:[(0,t.jsx)(d.ArrowUp,{className:"h-3.5 w-3.5 mr-2"}),i("git.push")]}),(0,t.jsxs)(M.DropdownMenuSub,{children:[(0,t.jsxs)(M.DropdownMenuSubTrigger,{disabled:z,children:[(0,t.jsx)(c.ArrowDown,{className:"h-3.5 w-3.5 mr-2"}),i("git.pullFrom"),"..."]}),(0,t.jsxs)(M.DropdownMenuSubContent,{className:"max-h-60 overflow-y-auto",children:[(0,t.jsxs)(M.DropdownMenuItem,{onClick:()=>ea(),children:[(0,t.jsx)(y.GitBranch,{className:"h-3 w-3 mr-2 text-emerald-400"}),l.currentBranch,l.behind>0&&(0,t.jsxs)("span",{className:"ml-auto text-[10px] text-muted-foreground",children:["↓",l.behind]})]}),l.remoteBranches.filter(e=>e!==l.currentBranch).map(e=>(0,t.jsxs)(M.DropdownMenuItem,{onClick:()=>ea(e),children:[(0,t.jsx)(y.GitBranch,{className:"h-3 w-3 mr-2 text-sky-400"}),e]},e))]})]}),(0,t.jsxs)(M.DropdownMenuSub,{children:[(0,t.jsxs)(M.DropdownMenuSubTrigger,{disabled:W,children:[(0,t.jsx)(d.ArrowUp,{className:"h-3.5 w-3.5 mr-2"}),i("git.pushTo"),"..."]}),(0,t.jsxs)(M.DropdownMenuSubContent,{className:"max-h-60 overflow-y-auto",children:[(0,t.jsxs)(M.DropdownMenuItem,{onClick:()=>en(),children:[(0,t.jsx)(y.GitBranch,{className:"h-3 w-3 mr-2 text-emerald-400"}),l.currentBranch,l.ahead>0&&(0,t.jsxs)("span",{className:"ml-auto text-[10px] text-muted-foreground",children:["↑",l.ahead]})]}),l.remoteBranches.filter(e=>e!==l.currentBranch).map(e=>(0,t.jsxs)(M.DropdownMenuItem,{onClick:()=>en(e),children:[(0,t.jsx)(y.GitBranch,{className:"h-3 w-3 mr-2 text-sky-400"}),e]},e))]})]}),(0,t.jsxs)(M.DropdownMenuItem,{onClick:ei,disabled:K,children:[(0,t.jsx)(j.RefreshCw,{className:`h-3.5 w-3.5 mr-2 ${K?"animate-spin":""}`}),i("git.fetchAll")]})]}),(0,t.jsx)(M.DropdownMenuSeparator,{}),(0,t.jsxs)(M.DropdownMenuGroup,{children:[(0,t.jsx)(M.DropdownMenuLabel,{children:i("git.stash")}),(0,t.jsxs)(M.DropdownMenuItem,{onClick:eo,disabled:0===l.changedFiles.length,children:[(0,t.jsx)(b.Archive,{className:"h-3.5 w-3.5 mr-2"}),i("git.stashSave")]}),(0,t.jsxs)(M.DropdownMenuItem,{onClick:ec,children:[(0,t.jsx)(w.ArrowUpFromLine,{className:"h-3.5 w-3.5 mr-2"}),i("git.stashPopLatest")]})]})]}),(0,t.jsx)(M.DropdownMenuSeparator,{}),(0,t.jsxs)(M.DropdownMenuItem,{disabled:!0,className:"text-muted-foreground",children:[(0,t.jsx)(y.GitBranch,{className:"h-3.5 w-3.5 mr-2"}),l.currentBranch]})]})]})]})]}),(0,t.jsxs)(O,{scroll:n,children:[(0,t.jsx)(H,{label:i("git.stagedChanges"),count:ex.length,labelColor:"text-emerald-400",tree:ef,batchAction:()=>es(eg(ef)),batchLabel:i("git.unstageAll"),batchIcon:(0,t.jsx)(f.Minus,{className:"h-3 w-3"}),onFileClick:em,onFileAction:e=>es([e]),fileActionIcon:"−",fileActionLabel:i("git.unstageFile")}),(0,t.jsx)(H,{label:i("git.unstagedChanges"),count:eu.length,labelColor:"text-muted-foreground",tree:ep,batchAction:()=>et(eg(ep)),batchLabel:i("git.stageAll"),batchIcon:(0,t.jsx)(p.Plus,{className:"h-3 w-3"}),onFileClick:em,onFileAction:e=>et([e]),fileActionIcon:"+",fileActionLabel:i("git.stageFile"),onFileSecondaryAction:e=>ed(e),fileSecondaryIcon:(0,t.jsx)(C.Trash2,{className:"h-2.5 w-2.5"}),fileSecondaryLabel:i("git.discardFile")}),0===l.changedFiles.length&&(0,t.jsxs)("div",{className:"flex flex-col items-center justify-center py-8 text-center",children:[(0,t.jsx)(h.Check,{className:"h-5 w-5 text-emerald-400 mb-2"}),(0,t.jsx)("p",{className:"text-xs text-muted-foreground",children:i("git.noChanges")})]})]}),(0,t.jsx)(E,{open:Z,onOpenChange:_,branches:[...l?.branches??[],...l?.remoteBranches??[]],currentBranch:l?.currentBranch??"",localPath:e,onCreated:async()=>{$.toast.success(i("git.createSuccess")),await ee()},onError:e=>$.toast.error(`${i("git.createFailed")}: ${e}`)})]})}],515135)},673649,e=>{"use strict";var t=e.i(514798);let s=(0,t.createServerReference)("60e46b13b1a67fec64cfa31dfb3908fbfc43b1c00b",t.callServer,void 0,t.findSourceMapURL,"updateTask");e.s(["updateTask",0,s])},1506,345038,e=>{"use strict";var t=e.i(514798);let s=(0,t.createServerReference)("7ca05fbfd82600e45079947879c354d3b6f32b8619",t.callServer,void 0,t.findSourceMapURL,"startPtyExecutionSafe");e.s(["startPtyExecutionSafe",0,s],1506);let r=(0,t.createServerReference)("40db98030cfccb21c4bd63bb26cd50b6fd0aef78ed",t.callServer,void 0,t.findSourceMapURL,"continueLatestPtyExecution");e.s(["continueLatestPtyExecution",0,r],345038)},994120,e=>{"use strict";var t=e.i(514798);let s=(0,t.createServerReference)("402531e9f6cc836103e24965759f7c3d358aad217d",t.callServer,void 0,t.findSourceMapURL,"getTaskExecutions");e.s(["getTaskExecutions",0,s])},395866,719711,222277,e=>{"use strict";var t=e.i(514798);let s=(0,t.createServerReference)("6064b9935e18da22e6c9876117d6e8d31ecd60aa7a",t.callServer,void 0,t.findSourceMapURL,"updateTaskStatus");e.s(["updateTaskStatus",0,s],395866);let r=(0,t.createServerReference)("4052452c2ab0de8a0f985b0e123f211149037a2721",t.callServer,void 0,t.findSourceMapURL,"checkWorktreeClean");e.s(["checkWorktreeClean",0,r],719711);let a=(0,t.createServerReference)("60cd57f895980a7b28d0efceb11d37834f5108d45b",t.callServer,void 0,t.findSourceMapURL,"commitWorktreeChanges");e.s(["commitWorktreeChanges",0,a],222277)},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)},326883,e=>{"use strict";var t=e.i(289721),s=e.i(965652),r=e.i(232280),a=e.i(472074),n=e.i(882651),i=e.i(181209),l=e.i(400355),o=e.i(989383),c=e.i(12659),d=e.i(922541),h=e.i(486077),m=e.i(769824),x=e.i(519455),u=e.i(912505),f=e.i(533499);function p({status:e}){switch(e){case"COMPLETED":return(0,t.jsx)(n.CheckCircle2,{className:"h-4 w-4 text-emerald-400"});case"FAILED":return(0,t.jsx)(i.XCircle,{className:"h-4 w-4 text-red-400"});case"RUNNING":return(0,t.jsx)(l.Loader2,{className:"h-4 w-4 text-blue-400 animate-spin"});default:return(0,t.jsx)(o.Clock,{className:"h-4 w-4 text-neutral-500"})}}e.s(["ExecutionTimeline",0,function({executions:e,onResume:n,onContinueLatest:i}){let{t:l,locale:o}=(0,f.useI18n)(),[g,j]=(0,s.useState)(null),[b,w]=(0,s.useState)(null);return 0===e.length?(0,t.jsx)(u.EmptyState,{icon:m.History,title:l("execution.noHistory")}):(0,t.jsxs)("div",{className:"space-y-2 p-3",children:[(0,t.jsx)("p",{className:"px-1 text-[11px] font-semibold uppercase tracking-wider text-muted-foreground",children:l("execution.history")}),e.map(s=>{let m=function(e){if(!e)return null;try{return JSON.parse(e)}catch{return null}}(s.gitStats??null),u=function(e,t){if(!e||!t)return"";let s=new Date(t).getTime()-new Date(e).getTime();if(s<0)return"";let r=Math.floor(s/1e3);if(r<60)return`${r}s`;let a=Math.floor(r/60);if(a<60)return`${a}m ${r%60}s`;let n=Math.floor(a/60);return`${n}h ${a%60}m`}(s.startedAt??null,s.endedAt??null),f=g===s.id;return(0,t.jsxs)("div",{className:"rounded-lg border border-border bg-background/50 overflow-hidden",children:[(0,t.jsxs)("div",{className:"p-3",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2 text-xs",children:[(0,t.jsx)(p,{status:s.status}),(0,t.jsx)("span",{className:`font-medium ${function(e){switch(e){case"COMPLETED":return"text-emerald-400";case"FAILED":return"text-red-400";case"RUNNING":return"text-blue-400";default:return"text-neutral-400"}}(s.status)}`,children:function(e,t){switch(e){case"COMPLETED":return t("execution.success");case"FAILED":return t("execution.failed");case"RUNNING":return t("execution.running");default:return e}}(s.status,l)}),(0,t.jsx)("span",{className:"text-muted-foreground",children:function(e,t="zh"){if(!e)return"";let s=new Date(e),r=Math.floor((new Date().getTime()-s.getTime())/864e5),a="zh"===t?"zh-CN":"en-US",n=s.toLocaleTimeString(a,{hour:"2-digit",minute:"2-digit"});return 0===r?n:1===r?"zh"===t?`昨天 ${n}`:`Yesterday ${n}`:r<7?"zh"===t?`${r}天前 ${n}`:`${r}d ago ${n}`:s.toLocaleDateString(a,{month:"2-digit",day:"2-digit"})+" "+n}(s.startedAt??null,o)}),u&&(0,t.jsxs)("span",{className:"text-muted-foreground/60",children:["(",u,")"]})]}),(0,t.jsx)("p",{className:"mt-1.5 text-sm text-foreground/80 line-clamp-2",children:s.summary||l("execution.noSummary")}),m&&(m.commits||m.filesChanged)&&(0,t.jsxs)("div",{className:"mt-1.5 flex items-center gap-2 text-[11px] text-muted-foreground font-mono",children:[m.commits?(0,t.jsxs)("span",{children:[m.commits," ",l("execution.commits")]}):null,m.filesChanged?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("span",{children:"·"}),(0,t.jsxs)("span",{children:[m.filesChanged," ",l("execution.files")]})]}):null,m.insertions||m.deletions?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("span",{children:"·"}),m.insertions?(0,t.jsxs)("span",{className:"text-emerald-500",children:["+",m.insertions]}):null,m.deletions?(0,t.jsxs)("span",{className:"text-red-400",children:["-",m.deletions]}):null]}):null]}),s.insightNote&&(0,t.jsxs)("div",{className:"mt-2",children:[(0,t.jsxs)("button",{onClick:()=>w(b===s.id?null:s.id),className:"flex items-center gap-1.5 text-xs text-primary/90 hover:text-primary transition-colors",children:[(0,t.jsx)(h.Lightbulb,{className:"h-3.5 w-3.5"}),(0,t.jsxs)("span",{className:"font-medium",children:[l("execution.insight"),":"]}),(0,t.jsx)("span",{className:"text-foreground/70 truncate max-w-[200px]",children:s.insightNote.title}),b===s.id?(0,t.jsx)(a.ChevronUp,{className:"h-3 w-3"}):(0,t.jsx)(r.ChevronDown,{className:"h-3 w-3"})]}),b===s.id&&(0,t.jsx)("div",{className:"mt-2 rounded-md bg-primary/[0.06] border border-primary/10 p-3 text-xs text-foreground/80 whitespace-pre-wrap",children:s.insightNote.content})]}),(0,t.jsxs)("div",{className:"mt-2.5 flex items-center gap-2",children:[s.sessionId&&n?(0,t.jsxs)(x.Button,{size:"sm",onClick:()=>n(s.sessionId),className:"bg-primary/10 text-primary ring-1 ring-primary/20 hover:bg-primary/15",children:[(0,t.jsx)(c.PlayCircle,{className:"h-3.5 w-3.5"}),l("execution.resume")]}):!s.sessionId&&"FAILED"===s.status&&s.id===e[0]?.id&&i?(0,t.jsxs)(x.Button,{size:"sm",onClick:i,className:"bg-blue-500/15 text-blue-300 ring-1 ring-blue-500/20 hover:bg-blue-500/25",children:[(0,t.jsx)(d.RotateCcw,{className:"h-3.5 w-3.5"}),l("execution.tryRecover")]}):null,(0,t.jsxs)(x.Button,{variant:"ghost",size:"sm",onClick:()=>j(f?null:s.id),className:"bg-muted text-muted-foreground",children:[f?(0,t.jsx)(a.ChevronUp,{className:"h-3.5 w-3.5"}):(0,t.jsx)(r.ChevronDown,{className:"h-3.5 w-3.5"}),f?l("execution.collapse"):l("execution.details")]})]})]}),f&&(0,t.jsxs)("div",{className:"border-t border-border px-3 pb-3 space-y-3",children:[s.gitLog&&(0,t.jsxs)("div",{className:"mt-3",children:[(0,t.jsx)("p",{className:"text-[11px] font-semibold uppercase tracking-wider text-muted-foreground mb-1.5",children:l("execution.gitLog")}),(0,t.jsx)("pre",{className:"rounded-md bg-muted/50 p-2.5 text-xs font-mono text-foreground/70 overflow-x-auto whitespace-pre-wrap",children:s.gitLog.split("\n").slice(0,3).join("\n")})]}),s.terminalLog&&(0,t.jsxs)("div",{children:[(0,t.jsx)("p",{className:"text-[11px] font-semibold uppercase tracking-wider text-muted-foreground mb-1.5",children:l("execution.terminalOutput")}),(0,t.jsx)("pre",{className:"rounded-md bg-[#0f1419] p-2.5 text-xs font-mono text-neutral-300 overflow-x-auto max-h-48 overflow-y-auto whitespace-pre-wrap",children:s.terminalLog})]}),"FAILED"===s.status&&null!=s.exitCode&&(0,t.jsxs)("p",{className:"text-xs text-red-400/70",children:["Exit code: ",s.exitCode]})]})]},s.id)})]})}])}]);
@@ -1 +1 @@
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)},636121,e=>{"use strict";var t=e.i(514798);let r=(0,t.createServerReference)("40b7eec0bb0bcd1c9c8f305cb7f9cb2aa9d17c5331",t.callServer,void 0,t.findSourceMapURL,"getConfigValues");e.s(["getConfigValues",0,r])},487486,e=>{"use strict";var t=e.i(565455),r=e.i(581263),i=e.i(294237),s=e.i(975157);let n=(0,i.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:i="default",render:u,...c}){var h;return h={defaultTagName:"span",props:(0,t.mergeProps)({className:(0,s.cn)(n({variant:i}),e)},c),render:u,state:{slot:"badge",variant:i}},(0,r.useRenderElement)(h.defaultTagName??"div",h,h)}],487486)},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)},912505,e=>{"use strict";var t=e.i(289721),r=e.i(975157);e.s(["EmptyState",0,function({icon:e,title:i,description:s,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:i}),s&&(0,t.jsx)("p",{className:"text-xs text-muted-foreground/60",children:s}),n&&(0,t.jsx)("div",{className:"mt-2",children:n})]})}])},257868,681894,e=>{"use strict";var t=e.i(514798);let r=(0,t.createServerReference)("40440496d342c8b9a8abc5babc36d91186e2d060ef",t.callServer,void 0,t.findSourceMapURL,"stopPtyExecution");e.s(["stopPtyExecution",0,r],257868);let i=(0,t.createServerReference)("60daaf44fc82c289f40d6d430c9f39ac67379ca846",t.callServer,void 0,t.findSourceMapURL,"resumePtyExecution");e.s(["resumePtyExecution",0,i],681894)},751819,e=>{"use strict";var t=e.i(514798);let r=(0,t.createServerReference)("7c751fb9f9f48f3e80d07435dfea390a702e217dd3",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]"===h(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 i(e){return"string"==typeof e}function s(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 h(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":Object.prototype.toString.call(e)}let o=Object.prototype.hasOwnProperty;class a{constructor(e){this._keys=[],this._keyMap={};let t=0;e.forEach(e=>{let r=l(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 l(e){let r=null,s=null,n=null,u=1,c=null;if(i(e)||t(e))n=e,r=d(e),s=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),s=f(t),c=e.getFn}return{path:r,id:s,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=[],a=!1,l=(e,c,d,f)=>{if(u(e))if(c[d]){var g,p;let A=e[c[d]];if(!u(A))return;if(d===c.length-1&&(i(A)||s(A)||!0===(g=A)||!1===g||n(p=g)&&null!==p&&"[object Boolean]"==h(g)||"bigint"==typeof A))o.push(void 0!==f?{v:r(A),i:f}:r(A));else if(t(A)){a=!0;for(let e=0,t=A.length;e<t;e+=1)l(A[e],c,d+1,e)}else c.length&&l(A,c,d+1,f)}else o.push(void 0!==f?{v:e,i:f}:e)};return l(e,i(c)?c.split("."):c,0),a?o:o[0]},ignoreLocation:!1,ignoreFieldNorm:!1,fieldNormWeight:1}),p=/[^ ]+/g;class A{constructor({getFn:e=g.getFn,fieldNormWeight:t=g.fieldNormWeight}={}){this.norm=function(e=1,t=3){let r=new Map,i=Math.pow(10,t);return{get(t){let s=t.match(p).length;if(r.has(s))return r.get(s);let n=parseFloat(Math.round(1/Math.pow(s,.5*e)*i)/i);return r.set(s,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,i(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();i(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,s){let n={i:s,$:{}};this.keys.forEach((s,h)=>{let o=s.getFn?s.getFn(e):this.getFn(e,s.path);if(u(o)){if(t(o)){let e=[];for(let t=0,s=o.length;t<s;t+=1){let s=o[t];if(u(s)){if(i(s)){if(!c(s)){let r={v:s,i:t,n:this.norm.get(s)};e.push(r)}}else if(u(s.v)){let t=i(s.v)?s.v:r(s.v);if(!c(t)){let r={v:t,i:s.i,n:this.norm.get(t)};e.push(r)}}}}n.$[h]=e}else if(i(o)&&!c(o)){let e={v:o,n:this.norm.get(o)};n.$[h]=e}}}),this.records.push(n)}toJSON(){return{keys:this.keys.map(({getFn:e,...t})=>t),records:this.records}}}function m(e,t,{getFn:r=g.getFn,fieldNormWeight:i=g.fieldNormWeight}={}){let s=new A({getFn:r,fieldNormWeight:i});return s.setKeys(e.map(l)),s.setSources(t),s.create(),s}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,i=e.length;r<i;r+=1){let i=t[t.length-1],s=e[r];s[0]<=i[1]+1?i[1]=Math.max(i[1],s[1]):t.push(s)}return t}let x={ł:"l",Ł:"L",đ:"d",Đ:"D",ø:"o",Ø:"O",ħ:"h",Ħ:"H",ŧ:"t",Ŧ:"T",ı:"i",ß:"ss"},y=RegExp("["+Object.keys(x).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=>x[e]):e=>e;class E{constructor(e,{location:t=g.location,threshold:r=g.threshold,distance:i=g.distance,includeMatches:s=g.includeMatches,findAllMatches:n=g.findAllMatches,minMatchCharLength:u=g.minMatchCharLength,isCaseSensitive:c=g.isCaseSensitive,ignoreDiacritics:h=g.ignoreDiacritics,ignoreLocation:o=g.ignoreLocation}={}){if(this.options={location:t,threshold:r,distance:i,includeMatches:s,findAllMatches:n,minMatchCharLength:u,isCaseSensitive:c,ignoreDiacritics:h,ignoreLocation:o},e=c?e:e.toLowerCase(),e=h?C(e):e,this.pattern=e,this.chunks=[],!this.pattern.length)return;const a=(e,t)=>{this.chunks.push({pattern:e,alphabet:function(e){let t={};for(let r=0,i=e.length;r<i;r+=1){let s=e.charAt(r);t[s]=(t[s]||0)|1<<i-r-1}return t}(e),startIndex:t})},l=this.pattern.length;if(l>32){let e=0;const t=l%32,r=l-t;for(;e<r;)a(this.pattern.substr(e,32),e),e+=32;if(t){const e=l-32;a(this.pattern.substr(e),e)}}else a(this.pattern,0)}searchIn(e){let{isCaseSensitive:t,ignoreDiacritics:r,includeMatches:i}=this.options;if(e=t?e:e.toLowerCase(),e=r?C(e):e,this.pattern===e){let t={isMatch:!0,score:0};return i&&(t.indices=[[0,e.length-1]]),t}let{location:s,distance:n,threshold:u,findAllMatches:c,minMatchCharLength:h,ignoreLocation:o}=this.options,a=[],l=0,d=!1;this.chunks.forEach(({pattern:t,alphabet:r,startIndex:f})=>{let{isMatch:p,score:A,indices:m}=function(e,t,r,{location:i=g.location,distance:s=g.distance,threshold:n=g.threshold,findAllMatches:u=g.findAllMatches,minMatchCharLength:c=g.minMatchCharLength,includeMatches:h=g.includeMatches,ignoreLocation:o=g.ignoreLocation}={}){let a;if(t.length>32)throw Error("Pattern length exceeds max of 32.");let l=t.length,d=e.length,f=Math.max(0,Math.min(i,d)),p=n,A=f,m=(e,t)=>{let r=e/l;if(o)return r;let i=Math.abs(f-t);return s?r+i/s:i?1:r},v=c>1||h,x=v?Array(d):[];for(;(a=e.indexOf(t,A))>-1;)if(p=Math.min(m(0,a),p),A=a+l,v){let e=0;for(;e<l;)x[a+e]=1,e+=1}A=-1;let y=[],C=1,E=l+d,D=1<<l-1;for(let t=0;t<l;t+=1){let i=0,s=E;for(;i<s;)m(t,f+s)<=p?i=s:E=s,s=Math.floor((E-i)/2+i);E=s;let n=Math.max(1,f-s+1),c=u?d:Math.min(f+s,d)+l,h=Array(c+2);h[c+1]=(1<<t)-1;for(let i=c;i>=n;i-=1){let s=i-1,u=r[e[s]];if(v&&(x[s]=+!!u),h[i]=(h[i+1]<<1|1)&u,t&&(h[i]|=(y[i+1]|y[i])<<1|1|y[i+1]),h[i]&D&&(C=m(t,s))<=p){if(p=C,(A=s)<=f)break;n=Math.max(1,2*f-A)}}if(m(t+1,f)>p)break;y=h}let B={isMatch:A>=0,score:Math.max(.001,C)};if(v){let e=function(e=[],t=g.minMatchCharLength){let r=[],i=-1,s=-1,n=0;for(let u=e.length;n<u;n+=1){let u=e[n];u&&-1===i?i=n:u||-1===i||((s=n-1)-i+1>=t&&r.push([i,s]),i=-1)}return e[n-1]&&n-i>=t&&r.push([i,n-1]),r}(x,c);e.length?h&&(B.indices=e):B.isMatch=!1}return B}(e,t,r,{location:s+f,distance:n,threshold:u,findAllMatches:c,minMatchCharLength:h,includeMatches:i,ignoreLocation:o});p&&(d=!0),l+=A,p&&m&&a.push(...m)});let f={isMatch:d,score:d?l/this.chunks.length:1};return d&&i&&(f.indices=v(a)),f}}class D{constructor(e){this.pattern=e}static isMultiMatch(e){return B(e,this.multiRegex)}static isSingleMatch(e){return B(e,this.singleRegex)}search(e){return{isMatch:!1,score:1}}}function B(e,t){let r=e.match(t);return r?r[1]:null}class F extends D{constructor(e,{location:t=g.location,threshold:r=g.threshold,distance:i=g.distance,includeMatches:s=g.includeMatches,findAllMatches:n=g.findAllMatches,minMatchCharLength:u=g.minMatchCharLength,isCaseSensitive:c=g.isCaseSensitive,ignoreDiacritics:h=g.ignoreDiacritics,ignoreLocation:o=g.ignoreLocation}={}){super(e),this._bitapSearch=new E(e,{location:t,threshold:r,distance:i,includeMatches:s,findAllMatches:n,minMatchCharLength:u,isCaseSensitive:c,ignoreDiacritics:h,ignoreLocation:o})}static get type(){return"fuzzy"}static get multiRegex(){return/^"(.*)"$/}static get singleRegex(){return/^(.*)$/}search(e){return this._bitapSearch.searchIn(e)}}class _ extends D{constructor(e){super(e)}static get type(){return"include"}static get multiRegex(){return/^'"(.*)"$/}static get singleRegex(){return/^'(.*)$/}search(e){let t,r=0,i=[],s=this.pattern.length;for(;(t=e.indexOf(this.pattern,r))>-1;)r=t+s,i.push([t,r-1]);let n=!!i.length;return{isMatch:n,score:+!n,indices:i}}}let b=[class extends D{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]}}},_,class extends D{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 D{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 D{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 D{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 D{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]}}},F],M=b.length,S=new Set([F.type,_.type]),k=[];function I(...e){k.push(...e)}function w(e,t){for(let r=0,i=k.length;r<i;r+=1){let i=k[r];if(i.condition(e,t))return new i(e,t)}return new E(e,t)}let L="$and",R="$path",$=e=>!!(e[L]||e.$or),j=e=>({[L]:Object.keys(e).map(t=>({[t]:e[t]}))});function N(e,r,{auto:s=!0}={}){let u=e=>{if(i(e)){let t={keyId:null,pattern:e};return s&&(t.searcher=w(e,r)),t}let c=Object.keys(e),h=!!e[R];if(!h&&c.length>1&&!$(e))return u(j(e));if(!t(e)&&n(e)&&!$(e)){let t=h?e[R]:c[0],n=h?e.$val:e[t];if(!i(n))throw Error(`Invalid value for key ${t}`);let u={keyId:f(t),pattern:n};return s&&(u.searcher=w(n,r)),u}let o={children:[],operator:c[0]};return c.forEach(r=>{let i=e[r];t(i)&&i.forEach(e=>{o.children.push(u(e))})}),o};return $(e)||(e=j(e)),u(e)}function O(e,{ignoreFieldNorm:t=g.ignoreFieldNorm}){let r=1;return e.forEach(({key:e,norm:i,score:s})=>{let n=e?e.weight:null;r*=Math.pow(0===s&&n?Number.EPSILON:s,(n||1)*(t?1:i))}),r}class z{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 i=t[e];t[e]=t[r],t[r]=i,e=r}}_sinkDown(e){let t=this.heap,r=t.length,i=e;do{let s=2*(e=i)+1,n=2*e+2;if(s<r&&t[s].score>t[i].score&&(i=s),n<r&&t[n].score>t[i].score&&(i=n),i!==e){let r=t[e];t[e]=t[i],t[i]=r}}while(i!==e)}}function W(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:i}=e,s={indices:r,value:i};e.key&&(s.key=e.key.src),e.idx>-1&&(s.refIndex=e.idx),t.matches.push(s)})}function P(e,t){t.score=e.score}let T=/\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(T)||[])}}function K(e,t){for(let[r,i]of e.terms){let s=i.filter(e=>e.docIdx!==t),n=i.length-s.length;n>0&&(e.fieldCount-=n,e.df.set(r,(e.df.get(r)||0)-n),0===s.length?(e.terms.delete(r),e.df.delete(r)):e.terms.set(r,s))}}class V{constructor(e,t,r){this.options={...g,...t},this.options.useExtendedSearch,this.options.useTokenSearch,this._keyStore=new a(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=w(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 A))throw Error("Incorrect 'index' type");if(this._myIndex=t||m(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 i=new Map,s=new Map,n=0;function u(e,t,u,c){let h=r.tokenize(e);if(!h.length)return;n++;let o=new Map;for(let e of h)o.set(e,(o.get(e)||0)+1);for(let[e,r]of o){let n={docIdx:t,keyIdx:u,subIdx:c,tf:r},h=i.get(e);h||(h=[],i.set(e,h)),h.push(n),s.set(e,(s.get(e)||0)+1)}}for(let r of e){let{i:e,v:i,$:s}=r;if(void 0!==i){u(i,e,-1,-1);continue}if(s)for(let r=0;r<t;r++){let t=s[r];if(t)if(Array.isArray(t))for(let i of t)u(i.v,e,r,i.i??-1);else u(t.v,e,r,-1)}}return{terms:i,fieldCount:n,df:s}}(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,i){let{i:s,v:n,$:u}=t;function c(t,r,n){let u=i.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,i]of c){let u={docIdx:s,keyIdx:r,subIdx:n,tf:i},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 i=0,s=this._docs.length;i<s;i+=1)e(this._docs[i],i)&&(t.push(this._docs[i]),r.push(i));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:h,sortFn:o,ignoreFieldNorm:a}=this.options;if(i(e)&&!e.trim()){let e=this._docs.map((e,t)=>({item:e,refIndex:t}));return s(n)&&n>-1&&(e=e.slice(0,n)),e}if(s(n)&&n>0&&i(e)){let t=new z(n);i(this._docs[0])?this._searchStringList(e,{heap:t,ignoreFieldNorm:a}):this._searchObjectList(e,{heap:t,ignoreFieldNorm:a}),r=t.extractSorted(o)}else!function(e,{ignoreFieldNorm:t=g.ignoreFieldNorm}){e.forEach(e=>{e.score=O(e.matches,{ignoreFieldNorm:t})})}(r=i(e)?i(this._docs[0])?this._searchStringList(e):this._searchObjectList(e):this._searchLogical(e),{ignoreFieldNorm:a}),h&&r.sort(o),s(n)&&n>-1&&(r=r.slice(0,n));return function(e,t,{includeMatches:r=g.includeMatches,includeScore:i=g.includeScore}={}){let s=[];return r&&s.push(W),i&&s.push(P),e.map(e=>{let{idx:r}=e,i={item:t[r],refIndex:r};return s.length&&s.forEach(t=>{t(e,i)}),i})}(r,this._docs,{includeMatches:u,includeScore:c})}_searchStringList(e,{heap:t,ignoreFieldNorm:r}={}){let i=this._getSearcher(e),{records:s}=this._myIndex,n=t?null:[];return s.forEach(({v:e,i:s,n:c})=>{if(!u(e))return;let{isMatch:h,score:o,indices:a}=i.searchIn(e);if(h){let i={item:e,idx:s,matches:[{score:o,value:e,norm:c,indices:a}]};t?(i.score=O(i.matches,{ignoreFieldNorm:r}),t.shouldInsert(i.score)&&t.insert(i)):n.push(i)}}),n}_searchLogical(e){let t=N(e,this.options),r=(e,t,i)=>{if(!("children"in e)){let r,{keyId:s,searcher:n}=e;return(null===s?(r=[],this._myIndex.keys.forEach((e,i)=>{r.push(...this._findMatches({key:e,value:t[i],searcher:n}))})):r=this._findMatches({key:this._keyStore.get(s),value:this._myIndex.getValueForItemAtKeyId(t,s),searcher:n}),r&&r.length)?[{idx:i,item:t,matches:r}]:[]}let{children:s,operator:n}=e,u=[];for(let e=0,c=s.length;e<c;e+=1){let c=r(s[e],t,i);if(c.length)u.push(...c);else if(n===L)return[]}return u},i=this._myIndex.records,s=new Map,n=[];return i.forEach(({$:e,i:i})=>{if(u(e)){let u=r(t,e,i);u.length&&(s.has(i)||(s.set(i,{idx:i,item:e,matches:[]}),n.push(s.get(i))),u.forEach(({matches:e})=>{s.get(i).matches.push(...e)}))}}),n}_searchObjectList(e,{heap:t,ignoreFieldNorm:r}={}){let i=this._getSearcher(e),{keys:s,records:n}=this._myIndex,c=t?null:[];return n.forEach(({$:e,i:n})=>{if(!u(e))return;let h=[],o=!1,a=!1;if(s.forEach((t,r)=>{let s=this._findMatches({key:t,value:e[r],searcher:i});s.length?(h.push(...s),s[0].hasInverse&&(a=!0)):o=!0}),(!a||!o)&&h.length){let i={idx:n,item:e,matches:h};t?(i.score=O(i.matches,{ignoreFieldNorm:r}),t.shouldInsert(i.score)&&t.insert(i)):c.push(i)}}),c}_findMatches({key:e,value:r,searcher:i}){if(!u(r))return[];let s=[];if(t(r))r.forEach(({v:t,i:r,n:n})=>{if(!u(t))return;let{isMatch:c,score:h,indices:o,hasInverse:a}=i.searchIn(t);c&&s.push({score:h,key:e,value:t,idx:r,norm:n,indices:o,hasInverse:a})});else{let{v:t,n:n}=r,{isMatch:u,score:c,indices:h,hasInverse:o}=i.searchIn(t);u&&s.push({score:c,key:e,value:t,norm:n,indices:h,hasInverse:o})}return s}}V.version="7.3.0",V.createIndex=m,V.parseIndex=function(e,{getFn:t=g.getFn,fieldNormWeight:r=g.fieldNormWeight}={}){let{keys:i,records:s}=e,n=new A({getFn:t,fieldNormWeight:r});return n.setKeys(i),n.setIndexRecords(s),n},V.config=g,V.match=function(e,t,r){return w(e,{...g,...r}).searchIn(t)},V.parseQuery=N,I(class{constructor(e,{isCaseSensitive:t=g.isCaseSensitive,ignoreDiacritics:r=g.ignoreDiacritics,includeMatches:i=g.includeMatches,minMatchCharLength:s=g.minMatchCharLength,ignoreLocation:n=g.ignoreLocation,findAllMatches:u=g.findAllMatches,location:c=g.location,threshold:h=g.threshold,distance:o=g.distance}={}){this.query=null,this.options={isCaseSensitive:t,ignoreDiacritics:r,includeMatches:i,minMatchCharLength:s,findAllMatches:u,ignoreLocation:n,location:c,threshold:h,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,i=0;for(;i<r;){for(;i<r&&" "===e[i];)i++;if(i>=r)break;let s=i;for(;s<r&&" "!==e[s]&&'"'!==e[s];)s++;if(s<r&&'"'===e[s]){for(s++;s<r;){if('"'===e[s]){let t=s+1;if(t>=r||" "===e[t]){s++;break}if("$"===e[t]&&(t+1>=r||" "===e[t+1])){s+=2;break}}s++}t.push(e.substring(i,s)),i=s}else{for(;s<r&&" "!==e[s];)s++;t.push(e.substring(i,s)),i=s}}return t})(e.replace(/\u0000/g,"|").trim()).filter(e=>e&&!!e.trim()),i=[];for(let e=0,s=r.length;e<s;e+=1){let s=r[e],n=!1,u=-1;for(;!n&&++u<M;){let e=b[u],r=e.isMultiMatch(s);r&&(i.push(new e(r,t)),n=!0)}if(!n)for(u=-1;++u<M;){let e=b[u],r=e.isSingleMatch(s);if(r){i.push(new e(r,t));break}}}return i})}(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:i,ignoreDiacritics:s}=this.options;e=i?e:e.toLowerCase(),e=s?C(e):e;let n=0,u=[],c=0,h=!1;for(let i=0,s=t.length;i<s;i+=1){let s=t[i];u.length=0,n=0,h=!1;for(let t=0,i=s.length;t<i;t+=1){let i=s[t],{isMatch:o,indices:a,score:l}=i.search(e);if(o){n+=1,c+=l;let e=i.constructor.type;e.startsWith("inverse")&&(h=!0),r&&(S.has(e)?u.push(...a):u.push(a))}else{c=0,n=0,u.length=0,h=!1;break}}if(n){let e={isMatch:!0,score:c/n};return h&&(e.hasInverse=!0),r&&(e.indices=v(u)),e}}return{isMatch:!1,score:1}}}),I(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:i,fieldCount:s}=t._invertedIndex;for(const e of(this.termSearchers=[],this.idfWeights=[],r)){this.termSearchers.push(new E(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=i.get(e)||0,n=Math.log(1+(s-r+.5)/(r+.5));this.idfWeights.push(n)}}searchIn(e){if(!this.termSearchers.length)return{isMatch:!1,score:1};let t=[],r=0,i=0,s=0;for(let n=0;n<this.termSearchers.length;n++){let u=this.termSearchers[n].searchIn(e),c=this.idfWeights[n];i+=c,u.isMatch&&(s++,r+=c*(1-u.score),u.indices&&t.push(...u.indices))}if(0===s)return{isMatch:!1,score:1};let n={isMatch:!0,score:Math.max(.001,i>0?1-r/i:0)};return this.options.includeMatches&&t.length&&(n.indices=v(t)),n}}),V.use=function(...e){e.forEach(e=>I(e))},e.s(["default",0,V])}]);
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)},540405,e=>{"use strict";var t=e.i(514798);let r=(0,t.createServerReference)("403fb9aba477474068caa46d6c3fa942de05b4edb6",t.callServer,void 0,t.findSourceMapURL,"getConfigValues");e.s(["getConfigValues",0,r])},487486,e=>{"use strict";var t=e.i(565455),r=e.i(581263),i=e.i(294237),s=e.i(975157);let n=(0,i.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:i="default",render:u,...c}){var h;return h={defaultTagName:"span",props:(0,t.mergeProps)({className:(0,s.cn)(n({variant:i}),e)},c),render:u,state:{slot:"badge",variant:i}},(0,r.useRenderElement)(h.defaultTagName??"div",h,h)}],487486)},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)},912505,e=>{"use strict";var t=e.i(289721),r=e.i(975157);e.s(["EmptyState",0,function({icon:e,title:i,description:s,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:i}),s&&(0,t.jsx)("p",{className:"text-xs text-muted-foreground/60",children:s}),n&&(0,t.jsx)("div",{className:"mt-2",children:n})]})}])},532970,648542,e=>{"use strict";var t=e.i(514798);let r=(0,t.createServerReference)("40829b5233ef6d9c038265e2c0cf031611b19ce0c1",t.callServer,void 0,t.findSourceMapURL,"stopPtyExecution");e.s(["stopPtyExecution",0,r],532970);let i=(0,t.createServerReference)("60a458c91694bd9ea4bf4808cb9fc0b7057cf2adb1",t.callServer,void 0,t.findSourceMapURL,"resumePtyExecution");e.s(["resumePtyExecution",0,i],648542)},305049,e=>{"use strict";var t=e.i(514798);let r=(0,t.createServerReference)("7c3ecbc1dac60ca7f7626b27efdf00297a98c2b5f3",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]"===h(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 i(e){return"string"==typeof e}function s(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 h(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":Object.prototype.toString.call(e)}let o=Object.prototype.hasOwnProperty;class a{constructor(e){this._keys=[],this._keyMap={};let t=0;e.forEach(e=>{let r=l(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 l(e){let r=null,s=null,n=null,u=1,c=null;if(i(e)||t(e))n=e,r=d(e),s=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),s=f(t),c=e.getFn}return{path:r,id:s,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=[],a=!1,l=(e,c,d,f)=>{if(u(e))if(c[d]){var g,p;let A=e[c[d]];if(!u(A))return;if(d===c.length-1&&(i(A)||s(A)||!0===(g=A)||!1===g||n(p=g)&&null!==p&&"[object Boolean]"==h(g)||"bigint"==typeof A))o.push(void 0!==f?{v:r(A),i:f}:r(A));else if(t(A)){a=!0;for(let e=0,t=A.length;e<t;e+=1)l(A[e],c,d+1,e)}else c.length&&l(A,c,d+1,f)}else o.push(void 0!==f?{v:e,i:f}:e)};return l(e,i(c)?c.split("."):c,0),a?o:o[0]},ignoreLocation:!1,ignoreFieldNorm:!1,fieldNormWeight:1}),p=/[^ ]+/g;class A{constructor({getFn:e=g.getFn,fieldNormWeight:t=g.fieldNormWeight}={}){this.norm=function(e=1,t=3){let r=new Map,i=Math.pow(10,t);return{get(t){let s=t.match(p).length;if(r.has(s))return r.get(s);let n=parseFloat(Math.round(1/Math.pow(s,.5*e)*i)/i);return r.set(s,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,i(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();i(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,s){let n={i:s,$:{}};this.keys.forEach((s,h)=>{let o=s.getFn?s.getFn(e):this.getFn(e,s.path);if(u(o)){if(t(o)){let e=[];for(let t=0,s=o.length;t<s;t+=1){let s=o[t];if(u(s)){if(i(s)){if(!c(s)){let r={v:s,i:t,n:this.norm.get(s)};e.push(r)}}else if(u(s.v)){let t=i(s.v)?s.v:r(s.v);if(!c(t)){let r={v:t,i:s.i,n:this.norm.get(t)};e.push(r)}}}}n.$[h]=e}else if(i(o)&&!c(o)){let e={v:o,n:this.norm.get(o)};n.$[h]=e}}}),this.records.push(n)}toJSON(){return{keys:this.keys.map(({getFn:e,...t})=>t),records:this.records}}}function m(e,t,{getFn:r=g.getFn,fieldNormWeight:i=g.fieldNormWeight}={}){let s=new A({getFn:r,fieldNormWeight:i});return s.setKeys(e.map(l)),s.setSources(t),s.create(),s}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,i=e.length;r<i;r+=1){let i=t[t.length-1],s=e[r];s[0]<=i[1]+1?i[1]=Math.max(i[1],s[1]):t.push(s)}return t}let x={ł:"l",Ł:"L",đ:"d",Đ:"D",ø:"o",Ø:"O",ħ:"h",Ħ:"H",ŧ:"t",Ŧ:"T",ı:"i",ß:"ss"},y=RegExp("["+Object.keys(x).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=>x[e]):e=>e;class E{constructor(e,{location:t=g.location,threshold:r=g.threshold,distance:i=g.distance,includeMatches:s=g.includeMatches,findAllMatches:n=g.findAllMatches,minMatchCharLength:u=g.minMatchCharLength,isCaseSensitive:c=g.isCaseSensitive,ignoreDiacritics:h=g.ignoreDiacritics,ignoreLocation:o=g.ignoreLocation}={}){if(this.options={location:t,threshold:r,distance:i,includeMatches:s,findAllMatches:n,minMatchCharLength:u,isCaseSensitive:c,ignoreDiacritics:h,ignoreLocation:o},e=c?e:e.toLowerCase(),e=h?C(e):e,this.pattern=e,this.chunks=[],!this.pattern.length)return;const a=(e,t)=>{this.chunks.push({pattern:e,alphabet:function(e){let t={};for(let r=0,i=e.length;r<i;r+=1){let s=e.charAt(r);t[s]=(t[s]||0)|1<<i-r-1}return t}(e),startIndex:t})},l=this.pattern.length;if(l>32){let e=0;const t=l%32,r=l-t;for(;e<r;)a(this.pattern.substr(e,32),e),e+=32;if(t){const e=l-32;a(this.pattern.substr(e),e)}}else a(this.pattern,0)}searchIn(e){let{isCaseSensitive:t,ignoreDiacritics:r,includeMatches:i}=this.options;if(e=t?e:e.toLowerCase(),e=r?C(e):e,this.pattern===e){let t={isMatch:!0,score:0};return i&&(t.indices=[[0,e.length-1]]),t}let{location:s,distance:n,threshold:u,findAllMatches:c,minMatchCharLength:h,ignoreLocation:o}=this.options,a=[],l=0,d=!1;this.chunks.forEach(({pattern:t,alphabet:r,startIndex:f})=>{let{isMatch:p,score:A,indices:m}=function(e,t,r,{location:i=g.location,distance:s=g.distance,threshold:n=g.threshold,findAllMatches:u=g.findAllMatches,minMatchCharLength:c=g.minMatchCharLength,includeMatches:h=g.includeMatches,ignoreLocation:o=g.ignoreLocation}={}){let a;if(t.length>32)throw Error("Pattern length exceeds max of 32.");let l=t.length,d=e.length,f=Math.max(0,Math.min(i,d)),p=n,A=f,m=(e,t)=>{let r=e/l;if(o)return r;let i=Math.abs(f-t);return s?r+i/s:i?1:r},v=c>1||h,x=v?Array(d):[];for(;(a=e.indexOf(t,A))>-1;)if(p=Math.min(m(0,a),p),A=a+l,v){let e=0;for(;e<l;)x[a+e]=1,e+=1}A=-1;let y=[],C=1,E=l+d,D=1<<l-1;for(let t=0;t<l;t+=1){let i=0,s=E;for(;i<s;)m(t,f+s)<=p?i=s:E=s,s=Math.floor((E-i)/2+i);E=s;let n=Math.max(1,f-s+1),c=u?d:Math.min(f+s,d)+l,h=Array(c+2);h[c+1]=(1<<t)-1;for(let i=c;i>=n;i-=1){let s=i-1,u=r[e[s]];if(v&&(x[s]=+!!u),h[i]=(h[i+1]<<1|1)&u,t&&(h[i]|=(y[i+1]|y[i])<<1|1|y[i+1]),h[i]&D&&(C=m(t,s))<=p){if(p=C,(A=s)<=f)break;n=Math.max(1,2*f-A)}}if(m(t+1,f)>p)break;y=h}let B={isMatch:A>=0,score:Math.max(.001,C)};if(v){let e=function(e=[],t=g.minMatchCharLength){let r=[],i=-1,s=-1,n=0;for(let u=e.length;n<u;n+=1){let u=e[n];u&&-1===i?i=n:u||-1===i||((s=n-1)-i+1>=t&&r.push([i,s]),i=-1)}return e[n-1]&&n-i>=t&&r.push([i,n-1]),r}(x,c);e.length?h&&(B.indices=e):B.isMatch=!1}return B}(e,t,r,{location:s+f,distance:n,threshold:u,findAllMatches:c,minMatchCharLength:h,includeMatches:i,ignoreLocation:o});p&&(d=!0),l+=A,p&&m&&a.push(...m)});let f={isMatch:d,score:d?l/this.chunks.length:1};return d&&i&&(f.indices=v(a)),f}}class D{constructor(e){this.pattern=e}static isMultiMatch(e){return B(e,this.multiRegex)}static isSingleMatch(e){return B(e,this.singleRegex)}search(e){return{isMatch:!1,score:1}}}function B(e,t){let r=e.match(t);return r?r[1]:null}class F extends D{constructor(e,{location:t=g.location,threshold:r=g.threshold,distance:i=g.distance,includeMatches:s=g.includeMatches,findAllMatches:n=g.findAllMatches,minMatchCharLength:u=g.minMatchCharLength,isCaseSensitive:c=g.isCaseSensitive,ignoreDiacritics:h=g.ignoreDiacritics,ignoreLocation:o=g.ignoreLocation}={}){super(e),this._bitapSearch=new E(e,{location:t,threshold:r,distance:i,includeMatches:s,findAllMatches:n,minMatchCharLength:u,isCaseSensitive:c,ignoreDiacritics:h,ignoreLocation:o})}static get type(){return"fuzzy"}static get multiRegex(){return/^"(.*)"$/}static get singleRegex(){return/^(.*)$/}search(e){return this._bitapSearch.searchIn(e)}}class _ extends D{constructor(e){super(e)}static get type(){return"include"}static get multiRegex(){return/^'"(.*)"$/}static get singleRegex(){return/^'(.*)$/}search(e){let t,r=0,i=[],s=this.pattern.length;for(;(t=e.indexOf(this.pattern,r))>-1;)r=t+s,i.push([t,r-1]);let n=!!i.length;return{isMatch:n,score:+!n,indices:i}}}let b=[class extends D{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]}}},_,class extends D{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 D{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 D{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 D{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 D{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]}}},F],M=b.length,S=new Set([F.type,_.type]),k=[];function I(...e){k.push(...e)}function w(e,t){for(let r=0,i=k.length;r<i;r+=1){let i=k[r];if(i.condition(e,t))return new i(e,t)}return new E(e,t)}let L="$and",R="$path",$=e=>!!(e[L]||e.$or),j=e=>({[L]:Object.keys(e).map(t=>({[t]:e[t]}))});function N(e,r,{auto:s=!0}={}){let u=e=>{if(i(e)){let t={keyId:null,pattern:e};return s&&(t.searcher=w(e,r)),t}let c=Object.keys(e),h=!!e[R];if(!h&&c.length>1&&!$(e))return u(j(e));if(!t(e)&&n(e)&&!$(e)){let t=h?e[R]:c[0],n=h?e.$val:e[t];if(!i(n))throw Error(`Invalid value for key ${t}`);let u={keyId:f(t),pattern:n};return s&&(u.searcher=w(n,r)),u}let o={children:[],operator:c[0]};return c.forEach(r=>{let i=e[r];t(i)&&i.forEach(e=>{o.children.push(u(e))})}),o};return $(e)||(e=j(e)),u(e)}function O(e,{ignoreFieldNorm:t=g.ignoreFieldNorm}){let r=1;return e.forEach(({key:e,norm:i,score:s})=>{let n=e?e.weight:null;r*=Math.pow(0===s&&n?Number.EPSILON:s,(n||1)*(t?1:i))}),r}class z{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 i=t[e];t[e]=t[r],t[r]=i,e=r}}_sinkDown(e){let t=this.heap,r=t.length,i=e;do{let s=2*(e=i)+1,n=2*e+2;if(s<r&&t[s].score>t[i].score&&(i=s),n<r&&t[n].score>t[i].score&&(i=n),i!==e){let r=t[e];t[e]=t[i],t[i]=r}}while(i!==e)}}function W(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:i}=e,s={indices:r,value:i};e.key&&(s.key=e.key.src),e.idx>-1&&(s.refIndex=e.idx),t.matches.push(s)})}function P(e,t){t.score=e.score}let T=/\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(T)||[])}}function K(e,t){for(let[r,i]of e.terms){let s=i.filter(e=>e.docIdx!==t),n=i.length-s.length;n>0&&(e.fieldCount-=n,e.df.set(r,(e.df.get(r)||0)-n),0===s.length?(e.terms.delete(r),e.df.delete(r)):e.terms.set(r,s))}}class V{constructor(e,t,r){this.options={...g,...t},this.options.useExtendedSearch,this.options.useTokenSearch,this._keyStore=new a(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=w(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 A))throw Error("Incorrect 'index' type");if(this._myIndex=t||m(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 i=new Map,s=new Map,n=0;function u(e,t,u,c){let h=r.tokenize(e);if(!h.length)return;n++;let o=new Map;for(let e of h)o.set(e,(o.get(e)||0)+1);for(let[e,r]of o){let n={docIdx:t,keyIdx:u,subIdx:c,tf:r},h=i.get(e);h||(h=[],i.set(e,h)),h.push(n),s.set(e,(s.get(e)||0)+1)}}for(let r of e){let{i:e,v:i,$:s}=r;if(void 0!==i){u(i,e,-1,-1);continue}if(s)for(let r=0;r<t;r++){let t=s[r];if(t)if(Array.isArray(t))for(let i of t)u(i.v,e,r,i.i??-1);else u(t.v,e,r,-1)}}return{terms:i,fieldCount:n,df:s}}(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,i){let{i:s,v:n,$:u}=t;function c(t,r,n){let u=i.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,i]of c){let u={docIdx:s,keyIdx:r,subIdx:n,tf:i},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 i=0,s=this._docs.length;i<s;i+=1)e(this._docs[i],i)&&(t.push(this._docs[i]),r.push(i));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:h,sortFn:o,ignoreFieldNorm:a}=this.options;if(i(e)&&!e.trim()){let e=this._docs.map((e,t)=>({item:e,refIndex:t}));return s(n)&&n>-1&&(e=e.slice(0,n)),e}if(s(n)&&n>0&&i(e)){let t=new z(n);i(this._docs[0])?this._searchStringList(e,{heap:t,ignoreFieldNorm:a}):this._searchObjectList(e,{heap:t,ignoreFieldNorm:a}),r=t.extractSorted(o)}else!function(e,{ignoreFieldNorm:t=g.ignoreFieldNorm}){e.forEach(e=>{e.score=O(e.matches,{ignoreFieldNorm:t})})}(r=i(e)?i(this._docs[0])?this._searchStringList(e):this._searchObjectList(e):this._searchLogical(e),{ignoreFieldNorm:a}),h&&r.sort(o),s(n)&&n>-1&&(r=r.slice(0,n));return function(e,t,{includeMatches:r=g.includeMatches,includeScore:i=g.includeScore}={}){let s=[];return r&&s.push(W),i&&s.push(P),e.map(e=>{let{idx:r}=e,i={item:t[r],refIndex:r};return s.length&&s.forEach(t=>{t(e,i)}),i})}(r,this._docs,{includeMatches:u,includeScore:c})}_searchStringList(e,{heap:t,ignoreFieldNorm:r}={}){let i=this._getSearcher(e),{records:s}=this._myIndex,n=t?null:[];return s.forEach(({v:e,i:s,n:c})=>{if(!u(e))return;let{isMatch:h,score:o,indices:a}=i.searchIn(e);if(h){let i={item:e,idx:s,matches:[{score:o,value:e,norm:c,indices:a}]};t?(i.score=O(i.matches,{ignoreFieldNorm:r}),t.shouldInsert(i.score)&&t.insert(i)):n.push(i)}}),n}_searchLogical(e){let t=N(e,this.options),r=(e,t,i)=>{if(!("children"in e)){let r,{keyId:s,searcher:n}=e;return(null===s?(r=[],this._myIndex.keys.forEach((e,i)=>{r.push(...this._findMatches({key:e,value:t[i],searcher:n}))})):r=this._findMatches({key:this._keyStore.get(s),value:this._myIndex.getValueForItemAtKeyId(t,s),searcher:n}),r&&r.length)?[{idx:i,item:t,matches:r}]:[]}let{children:s,operator:n}=e,u=[];for(let e=0,c=s.length;e<c;e+=1){let c=r(s[e],t,i);if(c.length)u.push(...c);else if(n===L)return[]}return u},i=this._myIndex.records,s=new Map,n=[];return i.forEach(({$:e,i:i})=>{if(u(e)){let u=r(t,e,i);u.length&&(s.has(i)||(s.set(i,{idx:i,item:e,matches:[]}),n.push(s.get(i))),u.forEach(({matches:e})=>{s.get(i).matches.push(...e)}))}}),n}_searchObjectList(e,{heap:t,ignoreFieldNorm:r}={}){let i=this._getSearcher(e),{keys:s,records:n}=this._myIndex,c=t?null:[];return n.forEach(({$:e,i:n})=>{if(!u(e))return;let h=[],o=!1,a=!1;if(s.forEach((t,r)=>{let s=this._findMatches({key:t,value:e[r],searcher:i});s.length?(h.push(...s),s[0].hasInverse&&(a=!0)):o=!0}),(!a||!o)&&h.length){let i={idx:n,item:e,matches:h};t?(i.score=O(i.matches,{ignoreFieldNorm:r}),t.shouldInsert(i.score)&&t.insert(i)):c.push(i)}}),c}_findMatches({key:e,value:r,searcher:i}){if(!u(r))return[];let s=[];if(t(r))r.forEach(({v:t,i:r,n:n})=>{if(!u(t))return;let{isMatch:c,score:h,indices:o,hasInverse:a}=i.searchIn(t);c&&s.push({score:h,key:e,value:t,idx:r,norm:n,indices:o,hasInverse:a})});else{let{v:t,n:n}=r,{isMatch:u,score:c,indices:h,hasInverse:o}=i.searchIn(t);u&&s.push({score:c,key:e,value:t,norm:n,indices:h,hasInverse:o})}return s}}V.version="7.3.0",V.createIndex=m,V.parseIndex=function(e,{getFn:t=g.getFn,fieldNormWeight:r=g.fieldNormWeight}={}){let{keys:i,records:s}=e,n=new A({getFn:t,fieldNormWeight:r});return n.setKeys(i),n.setIndexRecords(s),n},V.config=g,V.match=function(e,t,r){return w(e,{...g,...r}).searchIn(t)},V.parseQuery=N,I(class{constructor(e,{isCaseSensitive:t=g.isCaseSensitive,ignoreDiacritics:r=g.ignoreDiacritics,includeMatches:i=g.includeMatches,minMatchCharLength:s=g.minMatchCharLength,ignoreLocation:n=g.ignoreLocation,findAllMatches:u=g.findAllMatches,location:c=g.location,threshold:h=g.threshold,distance:o=g.distance}={}){this.query=null,this.options={isCaseSensitive:t,ignoreDiacritics:r,includeMatches:i,minMatchCharLength:s,findAllMatches:u,ignoreLocation:n,location:c,threshold:h,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,i=0;for(;i<r;){for(;i<r&&" "===e[i];)i++;if(i>=r)break;let s=i;for(;s<r&&" "!==e[s]&&'"'!==e[s];)s++;if(s<r&&'"'===e[s]){for(s++;s<r;){if('"'===e[s]){let t=s+1;if(t>=r||" "===e[t]){s++;break}if("$"===e[t]&&(t+1>=r||" "===e[t+1])){s+=2;break}}s++}t.push(e.substring(i,s)),i=s}else{for(;s<r&&" "!==e[s];)s++;t.push(e.substring(i,s)),i=s}}return t})(e.replace(/\u0000/g,"|").trim()).filter(e=>e&&!!e.trim()),i=[];for(let e=0,s=r.length;e<s;e+=1){let s=r[e],n=!1,u=-1;for(;!n&&++u<M;){let e=b[u],r=e.isMultiMatch(s);r&&(i.push(new e(r,t)),n=!0)}if(!n)for(u=-1;++u<M;){let e=b[u],r=e.isSingleMatch(s);if(r){i.push(new e(r,t));break}}}return i})}(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:i,ignoreDiacritics:s}=this.options;e=i?e:e.toLowerCase(),e=s?C(e):e;let n=0,u=[],c=0,h=!1;for(let i=0,s=t.length;i<s;i+=1){let s=t[i];u.length=0,n=0,h=!1;for(let t=0,i=s.length;t<i;t+=1){let i=s[t],{isMatch:o,indices:a,score:l}=i.search(e);if(o){n+=1,c+=l;let e=i.constructor.type;e.startsWith("inverse")&&(h=!0),r&&(S.has(e)?u.push(...a):u.push(a))}else{c=0,n=0,u.length=0,h=!1;break}}if(n){let e={isMatch:!0,score:c/n};return h&&(e.hasInverse=!0),r&&(e.indices=v(u)),e}}return{isMatch:!1,score:1}}}),I(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:i,fieldCount:s}=t._invertedIndex;for(const e of(this.termSearchers=[],this.idfWeights=[],r)){this.termSearchers.push(new E(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=i.get(e)||0,n=Math.log(1+(s-r+.5)/(r+.5));this.idfWeights.push(n)}}searchIn(e){if(!this.termSearchers.length)return{isMatch:!1,score:1};let t=[],r=0,i=0,s=0;for(let n=0;n<this.termSearchers.length;n++){let u=this.termSearchers[n].searchIn(e),c=this.idfWeights[n];i+=c,u.isMatch&&(s++,r+=c*(1-u.score),u.indices&&t.push(...u.indices))}if(0===s)return{isMatch:!1,score:1};let n={isMatch:!0,score:Math.max(.001,i>0?1-r/i:0)};return this.options.includeMatches&&t.length&&(n.indices=v(t)),n}}),V.use=function(...e){e.forEach(e=>I(e))},e.s(["default",0,V])}]);