@shipit-ai/cli 1.167.0 → 1.168.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (355) hide show
  1. package/dist/packages/core/src/infrastructure/services/tool-installer/tools/antigravity.json +1 -1
  2. package/dist/packages/core/src/infrastructure/services/tool-installer/tools/bash.json +1 -0
  3. package/dist/packages/core/src/infrastructure/services/tool-installer/tools/cursor-cli.json +1 -1
  4. package/dist/packages/core/src/infrastructure/services/tool-installer/tools/cursor.json +1 -1
  5. package/dist/packages/core/src/infrastructure/services/tool-installer/tools/fish.json +1 -0
  6. package/dist/packages/core/src/infrastructure/services/tool-installer/tools/powershell.json +1 -0
  7. package/dist/packages/core/src/infrastructure/services/tool-installer/tools/zsh.json +1 -0
  8. package/dist/src/presentation/web/app/actions/get-merge-review-data.d.ts.map +1 -1
  9. package/dist/src/presentation/web/app/actions/get-merge-review-data.js +5 -1
  10. package/dist/src/presentation/web/app/actions/open-shell.d.ts.map +1 -1
  11. package/dist/src/presentation/web/app/actions/open-shell.js +5 -1
  12. package/dist/src/presentation/web/app/layout.d.ts.map +1 -1
  13. package/dist/src/presentation/web/app/layout.js +15 -2
  14. package/dist/src/presentation/web/components/common/base-drawer/base-drawer.d.ts.map +1 -1
  15. package/dist/src/presentation/web/components/common/base-drawer/base-drawer.js +47 -10
  16. package/dist/src/presentation/web/components/common/page-header/page-header.d.ts +3 -1
  17. package/dist/src/presentation/web/components/common/page-header/page-header.d.ts.map +1 -1
  18. package/dist/src/presentation/web/components/common/page-header/page-header.js +8 -2
  19. package/dist/src/presentation/web/components/common/repository-node/repository-node.d.ts.map +1 -1
  20. package/dist/src/presentation/web/components/common/repository-node/repository-node.js +6 -1
  21. package/dist/src/presentation/web/components/common/shipit-ai-logo/shipit-ai-logo.d.ts +9 -1
  22. package/dist/src/presentation/web/components/common/shipit-ai-logo/shipit-ai-logo.d.ts.map +1 -1
  23. package/dist/src/presentation/web/components/common/shipit-ai-logo/shipit-ai-logo.js +12 -6
  24. package/dist/src/presentation/web/components/common/sidebar-collapse-toggle/sidebar-collapse-toggle.d.ts.map +1 -1
  25. package/dist/src/presentation/web/components/common/sidebar-collapse-toggle/sidebar-collapse-toggle.js +5 -1
  26. package/dist/src/presentation/web/components/common/sidebar-nav-item/sidebar-nav-item.d.ts.map +1 -1
  27. package/dist/src/presentation/web/components/common/sidebar-nav-item/sidebar-nav-item.js +15 -0
  28. package/dist/src/presentation/web/components/features/chat/ChatSheet.d.ts.map +1 -1
  29. package/dist/src/presentation/web/components/features/chat/ChatSheet.js +18 -5
  30. package/dist/src/presentation/web/components/features/control-center/control-center-empty-state.d.ts.map +1 -1
  31. package/dist/src/presentation/web/components/features/control-center/control-center-empty-state.js +1 -1
  32. package/dist/src/presentation/web/components/features/features-canvas/features-canvas.d.ts.map +1 -1
  33. package/dist/src/presentation/web/components/features/features-canvas/features-canvas.js +5 -1
  34. package/dist/src/presentation/web/components/features/settings/settings-page-client.d.ts.map +1 -1
  35. package/dist/src/presentation/web/components/features/settings/settings-page-client.js +43 -45
  36. package/dist/src/presentation/web/components/features/settings/settings-section-utils.d.ts +5 -2
  37. package/dist/src/presentation/web/components/features/settings/settings-section-utils.d.ts.map +1 -1
  38. package/dist/src/presentation/web/components/features/settings/settings-section-utils.js +8 -5
  39. package/dist/src/presentation/web/components/features/skills/category-filter.d.ts.map +1 -1
  40. package/dist/src/presentation/web/components/features/skills/category-filter.js +12 -2
  41. package/dist/src/presentation/web/components/features/skills/skill-card.d.ts.map +1 -1
  42. package/dist/src/presentation/web/components/features/skills/skill-card.js +3 -3
  43. package/dist/src/presentation/web/components/features/skills/skill-detail-drawer.d.ts.map +1 -1
  44. package/dist/src/presentation/web/components/features/skills/skill-detail-drawer.js +27 -1
  45. package/dist/src/presentation/web/components/features/skills/skill-list.js +2 -2
  46. package/dist/src/presentation/web/components/features/skills/skills-page-client.d.ts.map +1 -1
  47. package/dist/src/presentation/web/components/features/skills/skills-page-client.js +2 -2
  48. package/dist/src/presentation/web/components/features/tools/tool-card.d.ts.map +1 -1
  49. package/dist/src/presentation/web/components/features/tools/tool-card.js +20 -11
  50. package/dist/src/presentation/web/components/features/tools/tool-detail-drawer.js +1 -1
  51. package/dist/src/presentation/web/components/features/tools/tools-page-client.d.ts.map +1 -1
  52. package/dist/src/presentation/web/components/features/tools/tools-page-client.js +6 -1
  53. package/dist/src/presentation/web/components/layouts/app-sidebar/app-sidebar.d.ts.map +1 -1
  54. package/dist/src/presentation/web/components/layouts/app-sidebar/app-sidebar.js +39 -43
  55. package/dist/src/presentation/web/components/ui/card.d.ts.map +1 -1
  56. package/dist/src/presentation/web/components/ui/card.js +9 -1
  57. package/dist/src/presentation/web/components/ui/drawer.d.ts.map +1 -1
  58. package/dist/src/presentation/web/components/ui/drawer.js +8 -2
  59. package/dist/src/presentation/web/lib/path-sanitizers.d.ts.map +1 -1
  60. package/dist/src/presentation/web/lib/path-sanitizers.js +5 -1
  61. package/dist/tsconfig.build.tsbuildinfo +1 -1
  62. package/package.json +1 -1
  63. package/web/.next/BUILD_ID +1 -1
  64. package/web/.next/build-manifest.json +3 -3
  65. package/web/.next/fallback-build-manifest.json +3 -3
  66. package/web/.next/prerender-manifest.json +3 -3
  67. package/web/.next/required-server-files.js +2 -2
  68. package/web/.next/required-server-files.json +2 -2
  69. package/web/.next/server/app/(dashboard)/@drawer/adopt/page/next-font-manifest.json +6 -2
  70. package/web/.next/server/app/(dashboard)/@drawer/adopt/page/server-reference-manifest.json +29 -29
  71. package/web/.next/server/app/(dashboard)/@drawer/adopt/page.js +1 -1
  72. package/web/.next/server/app/(dashboard)/@drawer/adopt/page.js.nft.json +1 -1
  73. package/web/.next/server/app/(dashboard)/@drawer/adopt/page_client-reference-manifest.js +1 -1
  74. package/web/.next/server/app/(dashboard)/@drawer/chat/page/next-font-manifest.json +6 -2
  75. package/web/.next/server/app/(dashboard)/@drawer/chat/page/server-reference-manifest.json +27 -27
  76. package/web/.next/server/app/(dashboard)/@drawer/chat/page.js +1 -1
  77. package/web/.next/server/app/(dashboard)/@drawer/chat/page.js.nft.json +1 -1
  78. package/web/.next/server/app/(dashboard)/@drawer/chat/page_client-reference-manifest.js +1 -1
  79. package/web/.next/server/app/(dashboard)/@drawer/create/page/next-font-manifest.json +6 -2
  80. package/web/.next/server/app/(dashboard)/@drawer/create/page/server-reference-manifest.json +31 -31
  81. package/web/.next/server/app/(dashboard)/@drawer/create/page.js +1 -1
  82. package/web/.next/server/app/(dashboard)/@drawer/create/page.js.nft.json +1 -1
  83. package/web/.next/server/app/(dashboard)/@drawer/create/page_client-reference-manifest.js +1 -1
  84. package/web/.next/server/app/(dashboard)/@drawer/feature/[featureId]/[tab]/page/next-font-manifest.json +6 -2
  85. package/web/.next/server/app/(dashboard)/@drawer/feature/[featureId]/[tab]/page/server-reference-manifest.json +37 -37
  86. package/web/.next/server/app/(dashboard)/@drawer/feature/[featureId]/[tab]/page.js +2 -2
  87. package/web/.next/server/app/(dashboard)/@drawer/feature/[featureId]/[tab]/page.js.nft.json +1 -1
  88. package/web/.next/server/app/(dashboard)/@drawer/feature/[featureId]/[tab]/page_client-reference-manifest.js +1 -1
  89. package/web/.next/server/app/(dashboard)/@drawer/feature/[featureId]/page/next-font-manifest.json +6 -2
  90. package/web/.next/server/app/(dashboard)/@drawer/feature/[featureId]/page/server-reference-manifest.json +37 -37
  91. package/web/.next/server/app/(dashboard)/@drawer/feature/[featureId]/page.js +2 -2
  92. package/web/.next/server/app/(dashboard)/@drawer/feature/[featureId]/page.js.nft.json +1 -1
  93. package/web/.next/server/app/(dashboard)/@drawer/feature/[featureId]/page_client-reference-manifest.js +1 -1
  94. package/web/.next/server/app/(dashboard)/@drawer/repository/[repositoryId]/[tab]/page/next-font-manifest.json +6 -2
  95. package/web/.next/server/app/(dashboard)/@drawer/repository/[repositoryId]/[tab]/page/server-reference-manifest.json +28 -28
  96. package/web/.next/server/app/(dashboard)/@drawer/repository/[repositoryId]/[tab]/page.js +1 -1
  97. package/web/.next/server/app/(dashboard)/@drawer/repository/[repositoryId]/[tab]/page.js.nft.json +1 -1
  98. package/web/.next/server/app/(dashboard)/@drawer/repository/[repositoryId]/[tab]/page_client-reference-manifest.js +1 -1
  99. package/web/.next/server/app/(dashboard)/@drawer/repository/[repositoryId]/page/next-font-manifest.json +6 -2
  100. package/web/.next/server/app/(dashboard)/@drawer/repository/[repositoryId]/page/server-reference-manifest.json +28 -28
  101. package/web/.next/server/app/(dashboard)/@drawer/repository/[repositoryId]/page.js +1 -1
  102. package/web/.next/server/app/(dashboard)/@drawer/repository/[repositoryId]/page.js.nft.json +1 -1
  103. package/web/.next/server/app/(dashboard)/@drawer/repository/[repositoryId]/page_client-reference-manifest.js +1 -1
  104. package/web/.next/server/app/(dashboard)/chat/page/next-font-manifest.json +6 -2
  105. package/web/.next/server/app/(dashboard)/chat/page/server-reference-manifest.json +27 -27
  106. package/web/.next/server/app/(dashboard)/chat/page.js +1 -1
  107. package/web/.next/server/app/(dashboard)/chat/page.js.nft.json +1 -1
  108. package/web/.next/server/app/(dashboard)/chat/page_client-reference-manifest.js +1 -1
  109. package/web/.next/server/app/(dashboard)/create/page/next-font-manifest.json +6 -2
  110. package/web/.next/server/app/(dashboard)/create/page/server-reference-manifest.json +31 -31
  111. package/web/.next/server/app/(dashboard)/create/page.js +1 -1
  112. package/web/.next/server/app/(dashboard)/create/page.js.nft.json +1 -1
  113. package/web/.next/server/app/(dashboard)/create/page_client-reference-manifest.js +1 -1
  114. package/web/.next/server/app/(dashboard)/feature/[featureId]/[tab]/page/next-font-manifest.json +6 -2
  115. package/web/.next/server/app/(dashboard)/feature/[featureId]/[tab]/page/server-reference-manifest.json +37 -37
  116. package/web/.next/server/app/(dashboard)/feature/[featureId]/[tab]/page.js +2 -2
  117. package/web/.next/server/app/(dashboard)/feature/[featureId]/[tab]/page.js.nft.json +1 -1
  118. package/web/.next/server/app/(dashboard)/feature/[featureId]/[tab]/page_client-reference-manifest.js +1 -1
  119. package/web/.next/server/app/(dashboard)/feature/[featureId]/page/next-font-manifest.json +6 -2
  120. package/web/.next/server/app/(dashboard)/feature/[featureId]/page/server-reference-manifest.json +37 -37
  121. package/web/.next/server/app/(dashboard)/feature/[featureId]/page.js +2 -2
  122. package/web/.next/server/app/(dashboard)/feature/[featureId]/page.js.nft.json +1 -1
  123. package/web/.next/server/app/(dashboard)/feature/[featureId]/page_client-reference-manifest.js +1 -1
  124. package/web/.next/server/app/(dashboard)/page/next-font-manifest.json +6 -2
  125. package/web/.next/server/app/(dashboard)/page/server-reference-manifest.json +27 -27
  126. package/web/.next/server/app/(dashboard)/page.js +1 -1
  127. package/web/.next/server/app/(dashboard)/page.js.nft.json +1 -1
  128. package/web/.next/server/app/(dashboard)/page_client-reference-manifest.js +1 -1
  129. package/web/.next/server/app/(dashboard)/repository/[repositoryId]/[tab]/page/next-font-manifest.json +6 -2
  130. package/web/.next/server/app/(dashboard)/repository/[repositoryId]/[tab]/page/server-reference-manifest.json +28 -28
  131. package/web/.next/server/app/(dashboard)/repository/[repositoryId]/[tab]/page.js +1 -1
  132. package/web/.next/server/app/(dashboard)/repository/[repositoryId]/[tab]/page.js.nft.json +1 -1
  133. package/web/.next/server/app/(dashboard)/repository/[repositoryId]/[tab]/page_client-reference-manifest.js +1 -1
  134. package/web/.next/server/app/(dashboard)/repository/[repositoryId]/page/next-font-manifest.json +6 -2
  135. package/web/.next/server/app/(dashboard)/repository/[repositoryId]/page/server-reference-manifest.json +28 -28
  136. package/web/.next/server/app/(dashboard)/repository/[repositoryId]/page.js +1 -1
  137. package/web/.next/server/app/(dashboard)/repository/[repositoryId]/page.js.nft.json +1 -1
  138. package/web/.next/server/app/(dashboard)/repository/[repositoryId]/page_client-reference-manifest.js +1 -1
  139. package/web/.next/server/app/_global-error.html +1 -1
  140. package/web/.next/server/app/_global-error.rsc +1 -1
  141. package/web/.next/server/app/_global-error.segments/__PAGE__.segment.rsc +1 -1
  142. package/web/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
  143. package/web/.next/server/app/_global-error.segments/_head.segment.rsc +1 -1
  144. package/web/.next/server/app/_global-error.segments/_index.segment.rsc +1 -1
  145. package/web/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
  146. package/web/.next/server/app/_not-found/page/next-font-manifest.json +6 -2
  147. package/web/.next/server/app/_not-found/page/server-reference-manifest.json +6 -6
  148. package/web/.next/server/app/_not-found/page.js +1 -1
  149. package/web/.next/server/app/_not-found/page.js.nft.json +1 -1
  150. package/web/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
  151. package/web/.next/server/app/api/attachments/preview/route.js.nft.json +1 -1
  152. package/web/.next/server/app/api/dialog/pick-files/route.js.nft.json +1 -1
  153. package/web/.next/server/app/api/evidence/route.js.nft.json +1 -1
  154. package/web/.next/server/app/api/graph-data/route.js.nft.json +1 -1
  155. package/web/.next/server/app/api/interactive/chat/[featureId]/messages/route.js.nft.json +1 -1
  156. package/web/.next/server/app/settings/page/next-font-manifest.json +6 -2
  157. package/web/.next/server/app/settings/page/server-reference-manifest.json +11 -11
  158. package/web/.next/server/app/settings/page.js +1 -1
  159. package/web/.next/server/app/settings/page.js.nft.json +1 -1
  160. package/web/.next/server/app/settings/page_client-reference-manifest.js +1 -1
  161. package/web/.next/server/app/skills/page/next-font-manifest.json +6 -2
  162. package/web/.next/server/app/skills/page/server-reference-manifest.json +11 -11
  163. package/web/.next/server/app/skills/page.js +1 -1
  164. package/web/.next/server/app/skills/page.js.nft.json +1 -1
  165. package/web/.next/server/app/skills/page_client-reference-manifest.js +1 -1
  166. package/web/.next/server/app/tools/page/next-font-manifest.json +6 -2
  167. package/web/.next/server/app/tools/page/server-reference-manifest.json +11 -11
  168. package/web/.next/server/app/tools/page.js +1 -1
  169. package/web/.next/server/app/tools/page.js.nft.json +1 -1
  170. package/web/.next/server/app/tools/page_client-reference-manifest.js +1 -1
  171. package/web/.next/server/app/version/page/next-font-manifest.json +6 -2
  172. package/web/.next/server/app/version/page/server-reference-manifest.json +6 -6
  173. package/web/.next/server/app/version/page.js +1 -1
  174. package/web/.next/server/app/version/page.js.nft.json +1 -1
  175. package/web/.next/server/app/version/page_client-reference-manifest.js +1 -1
  176. package/web/.next/server/chunks/[root-of-the-server]__0_-chcy._.js.map +1 -1
  177. package/web/.next/server/chunks/[root-of-the-server]__0e9p7em._.js.map +1 -1
  178. package/web/.next/server/chunks/[root-of-the-server]__0tb~wwk._.js +1 -1
  179. package/web/.next/server/chunks/ssr/08qz_lucide-react_dist_esm_icons_0c0dui7._.js +3 -0
  180. package/web/.next/server/chunks/ssr/08qz_lucide-react_dist_esm_icons_0c0dui7._.js.map +1 -0
  181. package/web/.next/server/chunks/ssr/0j.8_web_components_common_control-center-drawer_create-drawer-client_tsx_0g70fc5._.js +1 -1
  182. package/web/.next/server/chunks/ssr/0j.8_web_components_common_control-center-drawer_create-drawer-client_tsx_0g70fc5._.js.map +1 -1
  183. package/web/.next/server/chunks/ssr/0j.8_web_components_common_control-center-drawer_feature-drawer-client_tsx_104cna.._.js +2 -2
  184. package/web/.next/server/chunks/ssr/0j.8_web_components_common_control-center-drawer_feature-drawer-client_tsx_104cna.._.js.map +1 -1
  185. package/web/.next/server/chunks/ssr/0ukq_presentation_web_components_features_settings_settings-page-client_tsx_0j1uius._.js +1 -1
  186. package/web/.next/server/chunks/ssr/0ukq_presentation_web_components_features_settings_settings-page-client_tsx_0j1uius._.js.map +1 -1
  187. package/web/.next/server/chunks/ssr/11y9_components_common_control-center-drawer_repository-drawer-client_tsx_09z.znp._.js +1 -1
  188. package/web/.next/server/chunks/ssr/11y9_components_common_control-center-drawer_repository-drawer-client_tsx_09z.znp._.js.map +1 -1
  189. package/web/.next/server/chunks/ssr/[root-of-the-server]__05_qc0n._.js +1 -1
  190. package/web/.next/server/chunks/ssr/[root-of-the-server]__05_qc0n._.js.map +1 -1
  191. package/web/.next/server/chunks/ssr/{[root-of-the-server]__0uy_5rw._.js → [root-of-the-server]__0ge~xny._.js} +2 -2
  192. package/web/.next/server/chunks/ssr/{[root-of-the-server]__0uy_5rw._.js.map → [root-of-the-server]__0ge~xny._.js.map} +1 -1
  193. package/web/.next/server/chunks/ssr/[root-of-the-server]__0jy4nha._.js +3 -0
  194. package/web/.next/server/chunks/ssr/[root-of-the-server]__0jy4nha._.js.map +1 -0
  195. package/web/.next/server/chunks/ssr/{_0e5cv3q._.js → [root-of-the-server]__0n~o-g-._.js} +2 -2
  196. package/web/.next/server/chunks/ssr/[root-of-the-server]__0n~o-g-._.js.map +1 -0
  197. package/web/.next/server/chunks/ssr/{[root-of-the-server]__02.89uf._.js → [root-of-the-server]__0qda~yi._.js} +2 -2
  198. package/web/.next/server/chunks/ssr/{[root-of-the-server]__02.89uf._.js.map → [root-of-the-server]__0qda~yi._.js.map} +1 -1
  199. package/web/.next/server/chunks/ssr/{[root-of-the-server]__0c0xoi_._.js → [root-of-the-server]__0qxd563._.js} +2 -2
  200. package/web/.next/server/chunks/ssr/{[root-of-the-server]__0c0xoi_._.js.map → [root-of-the-server]__0qxd563._.js.map} +1 -1
  201. package/web/.next/server/chunks/ssr/[root-of-the-server]__0rv1gci._.js +1 -1
  202. package/web/.next/server/chunks/ssr/[root-of-the-server]__0rvrr1j._.js +1 -1
  203. package/web/.next/server/chunks/ssr/[root-of-the-server]__0rvrr1j._.js.map +1 -1
  204. package/web/.next/server/chunks/ssr/[root-of-the-server]__0tq2syh._.js +1 -1
  205. package/web/.next/server/chunks/ssr/{[root-of-the-server]__0r5zhk.._.js → [root-of-the-server]__0t~u8sd._.js} +2 -2
  206. package/web/.next/server/chunks/ssr/{[root-of-the-server]__0r5zhk.._.js.map → [root-of-the-server]__0t~u8sd._.js.map} +1 -1
  207. package/web/.next/server/chunks/ssr/{[root-of-the-server]__04rq9lr._.js → [root-of-the-server]__10tll_l._.js} +2 -2
  208. package/web/.next/server/chunks/ssr/{[root-of-the-server]__04rq9lr._.js.map → [root-of-the-server]__10tll_l._.js.map} +1 -1
  209. package/web/.next/server/chunks/ssr/[root-of-the-server]__12j29w-._.js +1 -1
  210. package/web/.next/server/chunks/ssr/[root-of-the-server]__12j29w-._.js.map +1 -1
  211. package/web/.next/server/chunks/ssr/_0-09vq7._.js +1 -1
  212. package/web/.next/server/chunks/ssr/_0-09vq7._.js.map +1 -1
  213. package/web/.next/server/chunks/ssr/_01sesw0._.js +1 -1
  214. package/web/.next/server/chunks/ssr/_01sesw0._.js.map +1 -1
  215. package/web/.next/server/chunks/ssr/_069y.js._.js +2 -2
  216. package/web/.next/server/chunks/ssr/_069y.js._.js.map +1 -1
  217. package/web/.next/server/chunks/ssr/{_0mvhe_2._.js → _08_079y._.js} +2 -2
  218. package/web/.next/server/chunks/ssr/{_0mvhe_2._.js.map → _08_079y._.js.map} +1 -1
  219. package/web/.next/server/chunks/ssr/_09r54oy._.js +7 -0
  220. package/web/.next/server/chunks/ssr/_09r54oy._.js.map +1 -0
  221. package/web/.next/server/chunks/ssr/_0__4si~._.js +1 -1
  222. package/web/.next/server/chunks/ssr/_0__4si~._.js.map +1 -1
  223. package/web/.next/server/chunks/ssr/_0_m17kl._.js +1 -1
  224. package/web/.next/server/chunks/ssr/_0_m17kl._.js.map +1 -1
  225. package/web/.next/server/chunks/ssr/_0d4miu.._.js +1 -1
  226. package/web/.next/server/chunks/ssr/_0d4miu.._.js.map +1 -1
  227. package/web/.next/server/chunks/ssr/_0dy8.0k._.js +3 -0
  228. package/web/.next/server/chunks/ssr/_0dy8.0k._.js.map +1 -0
  229. package/web/.next/server/chunks/ssr/_0e8ern9._.js +1 -1
  230. package/web/.next/server/chunks/ssr/_0e8ern9._.js.map +1 -1
  231. package/web/.next/server/chunks/ssr/_0l2~~pi._.js +3 -0
  232. package/web/.next/server/chunks/ssr/_0l2~~pi._.js.map +1 -0
  233. package/web/.next/server/chunks/ssr/_0mi5qj~._.js +3 -0
  234. package/web/.next/server/chunks/ssr/_0mi5qj~._.js.map +1 -0
  235. package/web/.next/server/chunks/ssr/_0n.magx._.js +1 -1
  236. package/web/.next/server/chunks/ssr/_0n.magx._.js.map +1 -1
  237. package/web/.next/server/chunks/ssr/_0p3~u8u._.js +2 -2
  238. package/web/.next/server/chunks/ssr/_0p3~u8u._.js.map +1 -1
  239. package/web/.next/server/chunks/ssr/_0r.3n~3._.js +1 -1
  240. package/web/.next/server/chunks/ssr/_0r.3n~3._.js.map +1 -1
  241. package/web/.next/server/chunks/ssr/{_0l10ccg._.js → _0r04xhw._.js} +2 -2
  242. package/web/.next/server/chunks/ssr/{_0l10ccg._.js.map → _0r04xhw._.js.map} +1 -1
  243. package/web/.next/server/chunks/ssr/_0t59q8r._.js +1 -1
  244. package/web/.next/server/chunks/ssr/_0t59q8r._.js.map +1 -1
  245. package/web/.next/server/chunks/ssr/{_00k65h-._.js → _0txr945._.js} +2 -2
  246. package/web/.next/server/chunks/ssr/_0txr945._.js.map +1 -0
  247. package/web/.next/server/chunks/ssr/_0vjw-e_._.js +7 -0
  248. package/web/.next/server/chunks/ssr/_0vjw-e_._.js.map +1 -0
  249. package/web/.next/server/chunks/ssr/_0vyfc4b._.js +1 -1
  250. package/web/.next/server/chunks/ssr/_0vyfc4b._.js.map +1 -1
  251. package/web/.next/server/chunks/ssr/_0w-_hww._.js +1 -1
  252. package/web/.next/server/chunks/ssr/_0w-_hww._.js.map +1 -1
  253. package/web/.next/server/chunks/ssr/_0zk-h5w._.js +1 -1
  254. package/web/.next/server/chunks/ssr/_0zk-h5w._.js.map +1 -1
  255. package/web/.next/server/chunks/ssr/{_0hwjfpu._.js → _0~0jkp_._.js} +2 -2
  256. package/web/.next/server/chunks/ssr/_0~0jkp_._.js.map +1 -0
  257. package/web/.next/server/chunks/ssr/_0~7lwu_._.js +1 -1
  258. package/web/.next/server/chunks/ssr/_0~7lwu_._.js.map +1 -1
  259. package/web/.next/server/chunks/ssr/_1161g9x._.js +1 -1
  260. package/web/.next/server/chunks/ssr/_1161g9x._.js.map +1 -1
  261. package/web/.next/server/chunks/ssr/src_presentation_web_0y11iiz._.js +1 -1
  262. package/web/.next/server/chunks/ssr/src_presentation_web_0y11iiz._.js.map +1 -1
  263. package/web/.next/server/chunks/ssr/src_presentation_web__next-internal_server_app_skills_page_actions_05m2q~u.js +1 -1
  264. package/web/.next/server/chunks/ssr/src_presentation_web__next-internal_server_app_skills_page_actions_05m2q~u.js.map +1 -1
  265. package/web/.next/server/chunks/ssr/src_presentation_web__next-internal_server_app_tools_page_actions_0.6zk.t.js +1 -1
  266. package/web/.next/server/chunks/ssr/src_presentation_web__next-internal_server_app_tools_page_actions_0.6zk.t.js.map +1 -1
  267. package/web/.next/server/chunks/ssr/src_presentation_web_app_actions_approve-feature_ts_0pjb_re._.js +1 -1
  268. package/web/.next/server/chunks/ssr/src_presentation_web_app_actions_approve-feature_ts_0pjb_re._.js.map +1 -1
  269. package/web/.next/server/chunks/ssr/src_presentation_web_app_actions_open-ide_ts_0w2wqvu._.js +1 -1
  270. package/web/.next/server/chunks/ssr/src_presentation_web_app_actions_open-ide_ts_0w2wqvu._.js.map +1 -1
  271. package/web/.next/server/chunks/ssr/src_presentation_web_components_0sk2qdt._.js +1 -1
  272. package/web/.next/server/chunks/ssr/src_presentation_web_components_0sk2qdt._.js.map +1 -1
  273. package/web/.next/server/chunks/ssr/src_presentation_web_components_features_control-center_0l3oxx9._.js +1 -1
  274. package/web/.next/server/chunks/ssr/src_presentation_web_components_features_control-center_0l3oxx9._.js.map +1 -1
  275. package/web/.next/server/chunks/ssr/src_presentation_web_components_features_tools_tools-page-client_tsx_0aji.op._.js +1 -1
  276. package/web/.next/server/chunks/ssr/src_presentation_web_components_features_tools_tools-page-client_tsx_0aji.op._.js.map +1 -1
  277. package/web/.next/server/middleware-build-manifest.js +3 -3
  278. package/web/.next/server/next-font-manifest.js +1 -1
  279. package/web/.next/server/next-font-manifest.json +60 -2
  280. package/web/.next/server/pages/500.html +1 -1
  281. package/web/.next/server/server-reference-manifest.js +1 -1
  282. package/web/.next/server/server-reference-manifest.json +50 -50
  283. package/web/.next/static/chunks/{05enics63g._-.js → 0-ud~1jj7chzu.js} +4 -4
  284. package/web/.next/static/chunks/01znjuvi5t9~q.js +5 -0
  285. package/web/.next/static/chunks/033sl_l5o3uo8.css +1 -0
  286. package/web/.next/static/chunks/04r9m_5p953mf.js +1 -0
  287. package/web/.next/static/chunks/{11~m1ei9bh269.js → 06nsv-_ec9ehn.js} +1 -1
  288. package/web/.next/static/chunks/{0qqe9hx_txhso.js → 078lp287u~c~b.js} +1 -1
  289. package/web/.next/static/chunks/07i3-aamszsoh.js +1 -0
  290. package/web/.next/static/chunks/{0n3u~4ytndfyd.js → 0_v4t6gzx.332.js} +1 -1
  291. package/web/.next/static/chunks/{0hti2r43x0~b7.js → 0_xww9bsde~1x.js} +1 -1
  292. package/web/.next/static/chunks/{0.8ue6wwr7ni~.js → 0cv09-g0prv4o.js} +1 -1
  293. package/web/.next/static/chunks/0ee1d3_y40g9f.js +1 -0
  294. package/web/.next/static/chunks/0hg8qgtv~kuys.js +1 -0
  295. package/web/.next/static/chunks/{11bi612fz8agh.js → 0in4l8mne5y~_.js} +1 -1
  296. package/web/.next/static/chunks/0inayq2zzadja.js +1 -0
  297. package/web/.next/static/chunks/{0t3xjndx2s1_j.css → 0j.1nx3ly591i.css} +1 -0
  298. package/web/.next/static/chunks/0o4m0k3642219.js +1 -0
  299. package/web/.next/static/chunks/0pt-d18f7zxvv.js +1 -0
  300. package/web/.next/static/chunks/0udlnp30o1kjd.js +5 -0
  301. package/web/.next/static/chunks/{13w6ziae82sjy.js → 0ygtupas8pxdi.js} +1 -1
  302. package/web/.next/static/chunks/12pd180jp8zu..js +5 -0
  303. package/web/.next/static/chunks/{028x3z97mchhz.js → 133q8d69p6cl0.js} +1 -1
  304. package/web/.next/static/chunks/13fcwhkw7dle2.js +1 -0
  305. package/web/.next/static/chunks/13q1peb_t9vj8.js +1 -0
  306. package/web/.next/static/chunks/15mks7_3venc1.js +1 -0
  307. package/web/.next/static/chunks/{0_.x~txb5da7d.js → 17c31c1biwfyi.js} +1 -1
  308. package/web/.next/static/media/1bffadaabf893a1e-s.16ipb6fqu393i.woff2 +0 -0
  309. package/web/.next/static/media/2bbe8d2671613f1f-s.067x_6k0k23tk.woff2 +0 -0
  310. package/web/.next/static/media/2c55a0e60120577a-s.0bjc5tiuqdqro.woff2 +0 -0
  311. package/web/.next/static/media/5476f68d60460930-s.0wxq9webf.ew4.woff2 +0 -0
  312. package/web/.next/static/media/83afe278b6a6bb3c-s.p.0q-301v4kxxnr.woff2 +0 -0
  313. package/web/.next/static/media/9c72aa0f40e4eef8-s.0m6w47a4e5dy9.woff2 +0 -0
  314. package/web/.next/static/media/ad66f9afd8947f86-s.11u06r12fd6v_.woff2 +0 -0
  315. package/web/package.json +2 -2
  316. package/web/public/favicon.svg +10 -0
  317. package/web/public/icons/tools/antigravity.svg +1 -0
  318. package/web/public/icons/tools/bash.svg +38 -0
  319. package/web/public/icons/tools/cursor-cli.svg +12 -0
  320. package/web/public/icons/tools/cursor.svg +1 -0
  321. package/web/public/icons/tools/fish.svg +153 -0
  322. package/web/public/icons/tools/powershell.svg +29 -0
  323. package/web/public/icons/tools/zsh.svg +1 -0
  324. package/web/.next/server/chunks/ssr/08qz_lucide-react_dist_esm_icons_0zwb4s4._.js +0 -3
  325. package/web/.next/server/chunks/ssr/08qz_lucide-react_dist_esm_icons_0zwb4s4._.js.map +0 -1
  326. package/web/.next/server/chunks/ssr/[root-of-the-server]__0lslgap._.js +0 -7
  327. package/web/.next/server/chunks/ssr/[root-of-the-server]__0lslgap._.js.map +0 -1
  328. package/web/.next/server/chunks/ssr/_00k65h-._.js.map +0 -1
  329. package/web/.next/server/chunks/ssr/_08i-c2n._.js +0 -3
  330. package/web/.next/server/chunks/ssr/_08i-c2n._.js.map +0 -1
  331. package/web/.next/server/chunks/ssr/_0e5cv3q._.js.map +0 -1
  332. package/web/.next/server/chunks/ssr/_0hwjfpu._.js.map +0 -1
  333. package/web/.next/server/chunks/ssr/_0mo6j.n._.js +0 -3
  334. package/web/.next/server/chunks/ssr/_0mo6j.n._.js.map +0 -1
  335. package/web/.next/server/chunks/ssr/_0phryzt._.js +0 -3
  336. package/web/.next/server/chunks/ssr/_0phryzt._.js.map +0 -1
  337. package/web/.next/server/chunks/ssr/_12un22l._.js +0 -7
  338. package/web/.next/server/chunks/ssr/_12un22l._.js.map +0 -1
  339. package/web/.next/static/chunks/0-lu0b1ewsb0_.js +0 -1
  340. package/web/.next/static/chunks/01~dudieyb7wl.js +0 -5
  341. package/web/.next/static/chunks/02kpdawdtqcxm.js +0 -1
  342. package/web/.next/static/chunks/044f5piy5pt5t.js +0 -1
  343. package/web/.next/static/chunks/04~sw.nhpwy6s.css +0 -1
  344. package/web/.next/static/chunks/0_9k2ybutuphq.js +0 -1
  345. package/web/.next/static/chunks/0jo5-_q.1n69j.js +0 -1
  346. package/web/.next/static/chunks/0m5~9kij3s~81.js +0 -1
  347. package/web/.next/static/chunks/0pyz97q7eg0jz.js +0 -1
  348. package/web/.next/static/chunks/0q~uf2s33.48w.js +0 -1
  349. package/web/.next/static/chunks/0vx7ldqj8436q.js +0 -5
  350. package/web/.next/static/chunks/15m2wfd5k_7fj.js +0 -1
  351. package/web/.next/static/chunks/16.83v.xq8bn9.js +0 -1
  352. package/web/.next/static/chunks/164dnpi666fv_.js +0 -5
  353. /package/web/.next/static/{ksBer6au8b_fS1_7dCF2D → LQMB6QAutWzPQnLUZG96y}/_buildManifest.js +0 -0
  354. /package/web/.next/static/{ksBer6au8b_fS1_7dCF2D → LQMB6QAutWzPQnLUZG96y}/_clientMiddlewareManifest.js +0 -0
  355. /package/web/.next/static/{ksBer6au8b_fS1_7dCF2D → LQMB6QAutWzPQnLUZG96y}/_ssgManifest.js +0 -0
@@ -1 +1 @@
1
- (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,47373,27069,e=>{"use strict";var t=e.i(96871),r=e.i(16539),n=e.i(70309);function o(e,[t,r]){return Math.min(r,Math.max(t,e))}e.s(["clamp",0,o],27069);var l=e.i(91967),a=e.i(87099),i=e.i(22353),s=e.i(9413),c=e.i(75649),d=e.i(3659),u=e.i(87656),p=e.i(62854),f=e.i(11207),m=e.i(73071),h=e.i(76903),v=e.i(85565),g=e.i(60310),x=e.i(88248),y=e.i(36567),w=e.i(18731),S=e.i(9641),b=e.i(87312),C=e.i(73772),j=e.i(69759),P=[" ","Enter","ArrowUp","ArrowDown"],R=[" ","Enter"],E="Select",[N,k,I]=(0,a.createCollection)(E),[T,D]=(0,s.createContextScope)(E,[I,m.createPopperScope]),L=(0,m.createPopperScope)(),[M,H]=T(E),[_,A]=T(E),B=e=>{let{__scopeSelect:n,children:o,open:l,defaultOpen:a,onOpenChange:i,value:s,defaultValue:d,onValueChange:u,dir:p,name:h,autoComplete:v,disabled:g,required:x,form:w}=e,S=L(n),[b,C]=r.useState(null),[j,P]=r.useState(null),[R,k]=r.useState(!1),I=(0,c.useDirection)(p),[T,D]=(0,y.useControllableState)({prop:l,defaultProp:a??!1,onChange:i,caller:E}),[H,A]=(0,y.useControllableState)({prop:s,defaultProp:d,onChange:u,caller:E}),B=r.useRef(null),F=!b||w||!!b.closest("form"),[O,V]=r.useState(new Set),U=Array.from(O).map(e=>e.props.value).join(";");return(0,t.jsx)(m.Root,{...S,children:(0,t.jsxs)(M,{required:x,scope:n,trigger:b,onTriggerChange:C,valueNode:j,onValueNodeChange:P,valueNodeHasChildren:R,onValueNodeHasChildrenChange:k,contentId:(0,f.useId)(),value:H,onValueChange:A,open:T,onOpenChange:D,dir:I,triggerPointerDownPosRef:B,disabled:g,children:[(0,t.jsx)(N.Provider,{scope:n,children:(0,t.jsx)(_,{scope:e.__scopeSelect,onNativeOptionAdd:r.useCallback(e=>{V(t=>new Set(t).add(e))},[]),onNativeOptionRemove:r.useCallback(e=>{V(t=>{let r=new Set(t);return r.delete(e),r})},[]),children:o})}),F?(0,t.jsxs)(eP,{"aria-hidden":!0,required:x,tabIndex:-1,name:h,autoComplete:v,value:H,onChange:e=>A(e.target.value),disabled:g,form:w,children:[void 0===H?(0,t.jsx)("option",{value:""}):null,Array.from(O)]},U):null]})})};B.displayName=E;var F="SelectTrigger",O=r.forwardRef((e,n)=>{let{__scopeSelect:o,disabled:a=!1,...s}=e,c=L(o),d=H(F,o),u=d.disabled||a,p=(0,i.useComposedRefs)(n,d.onTriggerChange),f=k(o),h=r.useRef("touch"),[g,x,y]=eE(e=>{let t=f().filter(e=>!e.disabled),r=t.find(e=>e.value===d.value),n=eN(t,e,r);void 0!==n&&d.onValueChange(n.value)}),w=e=>{u||(d.onOpenChange(!0),y()),e&&(d.triggerPointerDownPosRef.current={x:Math.round(e.pageX),y:Math.round(e.pageY)})};return(0,t.jsx)(m.Anchor,{asChild:!0,...c,children:(0,t.jsx)(v.Primitive.button,{type:"button",role:"combobox","aria-controls":d.contentId,"aria-expanded":d.open,"aria-required":d.required,"aria-autocomplete":"none",dir:d.dir,"data-state":d.open?"open":"closed",disabled:u,"data-disabled":u?"":void 0,"data-placeholder":eR(d.value)?"":void 0,...s,ref:p,onClick:(0,l.composeEventHandlers)(s.onClick,e=>{e.currentTarget.focus(),"mouse"!==h.current&&w(e)}),onPointerDown:(0,l.composeEventHandlers)(s.onPointerDown,e=>{h.current=e.pointerType;let t=e.target;t.hasPointerCapture(e.pointerId)&&t.releasePointerCapture(e.pointerId),0===e.button&&!1===e.ctrlKey&&"mouse"===e.pointerType&&(w(e),e.preventDefault())}),onKeyDown:(0,l.composeEventHandlers)(s.onKeyDown,e=>{let t=""!==g.current;e.ctrlKey||e.altKey||e.metaKey||1!==e.key.length||x(e.key),(!t||" "!==e.key)&&P.includes(e.key)&&(w(),e.preventDefault())})})})});O.displayName=F;var V="SelectValue",U=r.forwardRef((e,r)=>{let{__scopeSelect:n,className:o,style:l,children:a,placeholder:s="",...c}=e,d=H(V,n),{onValueNodeHasChildrenChange:u}=d,p=void 0!==a,f=(0,i.useComposedRefs)(r,d.onValueNodeChange);return(0,w.useLayoutEffect)(()=>{u(p)},[u,p]),(0,t.jsx)(v.Primitive.span,{...c,ref:f,style:{pointerEvents:"none"},children:eR(d.value)?(0,t.jsx)(t.Fragment,{children:s}):a})});U.displayName=V;var K=r.forwardRef((e,r)=>{let{__scopeSelect:n,children:o,...l}=e;return(0,t.jsx)(v.Primitive.span,{"aria-hidden":!0,...l,ref:r,children:o||"▼"})});K.displayName="SelectIcon";var z=e=>(0,t.jsx)(h.Portal,{asChild:!0,...e});z.displayName="SelectPortal";var W="SelectContent",G=r.forwardRef((e,o)=>{let l=H(W,e.__scopeSelect),[a,i]=r.useState();return((0,w.useLayoutEffect)(()=>{i(new DocumentFragment)},[]),l.open)?(0,t.jsx)(X,{...e,ref:o}):a?n.createPortal((0,t.jsx)($,{scope:e.__scopeSelect,children:(0,t.jsx)(N.Slot,{scope:e.__scopeSelect,children:(0,t.jsx)("div",{children:e.children})})}),a):null});G.displayName=W;var[$,q]=T(W),Y=(0,g.createSlot)("SelectContent.RemoveScroll"),X=r.forwardRef((e,n)=>{let{__scopeSelect:o,position:a="item-aligned",onCloseAutoFocus:s,onEscapeKeyDown:c,onPointerDownOutside:f,side:m,sideOffset:h,align:v,alignOffset:g,arrowPadding:x,collisionBoundary:y,collisionPadding:w,sticky:S,hideWhenDetached:b,avoidCollisions:P,...R}=e,E=H(W,o),[N,I]=r.useState(null),[T,D]=r.useState(null),L=(0,i.useComposedRefs)(n,e=>I(e)),[M,_]=r.useState(null),[A,B]=r.useState(null),F=k(o),[O,V]=r.useState(!1),U=r.useRef(!1);r.useEffect(()=>{if(N)return(0,C.hideOthers)(N)},[N]),(0,u.useFocusGuards)();let K=r.useCallback(e=>{let[t,...r]=F().map(e=>e.ref.current),[n]=r.slice(-1),o=document.activeElement;for(let r of e)if(r===o||(r?.scrollIntoView({block:"nearest"}),r===t&&T&&(T.scrollTop=0),r===n&&T&&(T.scrollTop=T.scrollHeight),r?.focus(),document.activeElement!==o))return},[F,T]),z=r.useCallback(()=>K([M,N]),[K,M,N]);r.useEffect(()=>{O&&z()},[O,z]);let{onOpenChange:G,triggerPointerDownPosRef:q}=E;r.useEffect(()=>{if(N){let e={x:0,y:0},t=t=>{e={x:Math.abs(Math.round(t.pageX)-(q.current?.x??0)),y:Math.abs(Math.round(t.pageY)-(q.current?.y??0))}},r=r=>{e.x<=10&&e.y<=10?r.preventDefault():N.contains(r.target)||G(!1),document.removeEventListener("pointermove",t),q.current=null};return null!==q.current&&(document.addEventListener("pointermove",t),document.addEventListener("pointerup",r,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",t),document.removeEventListener("pointerup",r,{capture:!0})}}},[N,G,q]),r.useEffect(()=>{let e=()=>G(!1);return window.addEventListener("blur",e),window.addEventListener("resize",e),()=>{window.removeEventListener("blur",e),window.removeEventListener("resize",e)}},[G]);let[X,J]=eE(e=>{let t=F().filter(e=>!e.disabled),r=t.find(e=>e.ref.current===document.activeElement),n=eN(t,e,r);n&&setTimeout(()=>n.ref.current.focus())}),ee=r.useCallback((e,t,r)=>{let n=!U.current&&!r;(void 0!==E.value&&E.value===t||n)&&(_(e),n&&(U.current=!0))},[E.value]),et=r.useCallback(()=>N?.focus(),[N]),er=r.useCallback((e,t,r)=>{let n=!U.current&&!r;(void 0!==E.value&&E.value===t||n)&&B(e)},[E.value]),en="popper"===a?Z:Q,eo=en===Z?{side:m,sideOffset:h,align:v,alignOffset:g,arrowPadding:x,collisionBoundary:y,collisionPadding:w,sticky:S,hideWhenDetached:b,avoidCollisions:P}:{};return(0,t.jsx)($,{scope:o,content:N,viewport:T,onViewportChange:D,itemRefCallback:ee,selectedItem:M,onItemLeave:et,itemTextRefCallback:er,focusSelectedItem:z,selectedItemText:A,position:a,isPositioned:O,searchRef:X,children:(0,t.jsx)(j.RemoveScroll,{as:Y,allowPinchZoom:!0,children:(0,t.jsx)(p.FocusScope,{asChild:!0,trapped:E.open,onMountAutoFocus:e=>{e.preventDefault()},onUnmountAutoFocus:(0,l.composeEventHandlers)(s,e=>{E.trigger?.focus({preventScroll:!0}),e.preventDefault()}),children:(0,t.jsx)(d.DismissableLayer,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:c,onPointerDownOutside:f,onFocusOutside:e=>e.preventDefault(),onDismiss:()=>E.onOpenChange(!1),children:(0,t.jsx)(en,{role:"listbox",id:E.contentId,"data-state":E.open?"open":"closed",dir:E.dir,onContextMenu:e=>e.preventDefault(),...R,...eo,onPlaced:()=>V(!0),ref:L,style:{display:"flex",flexDirection:"column",outline:"none",...R.style},onKeyDown:(0,l.composeEventHandlers)(R.onKeyDown,e=>{let t=e.ctrlKey||e.altKey||e.metaKey;if("Tab"===e.key&&e.preventDefault(),t||1!==e.key.length||J(e.key),["ArrowUp","ArrowDown","Home","End"].includes(e.key)){let t=F().filter(e=>!e.disabled).map(e=>e.ref.current);if(["ArrowUp","End"].includes(e.key)&&(t=t.slice().reverse()),["ArrowUp","ArrowDown"].includes(e.key)){let r=e.target,n=t.indexOf(r);t=t.slice(n+1)}setTimeout(()=>K(t)),e.preventDefault()}})})})})})})});X.displayName="SelectContentImpl";var Q=r.forwardRef((e,n)=>{let{__scopeSelect:l,onPlaced:a,...s}=e,c=H(W,l),d=q(W,l),[u,p]=r.useState(null),[f,m]=r.useState(null),h=(0,i.useComposedRefs)(n,e=>m(e)),g=k(l),x=r.useRef(!1),y=r.useRef(!0),{viewport:S,selectedItem:b,selectedItemText:C,focusSelectedItem:j}=d,P=r.useCallback(()=>{if(c.trigger&&c.valueNode&&u&&f&&S&&b&&C){let e=c.trigger.getBoundingClientRect(),t=f.getBoundingClientRect(),r=c.valueNode.getBoundingClientRect(),n=C.getBoundingClientRect();if("rtl"!==c.dir){let l=n.left-t.left,a=r.left-l,i=e.left-a,s=e.width+i,c=Math.max(s,t.width),d=o(a,[10,Math.max(10,window.innerWidth-10-c)]);u.style.minWidth=s+"px",u.style.left=d+"px"}else{let l=t.right-n.right,a=window.innerWidth-r.right-l,i=window.innerWidth-e.right-a,s=e.width+i,c=Math.max(s,t.width),d=o(a,[10,Math.max(10,window.innerWidth-10-c)]);u.style.minWidth=s+"px",u.style.right=d+"px"}let l=g(),i=window.innerHeight-20,s=S.scrollHeight,d=window.getComputedStyle(f),p=parseInt(d.borderTopWidth,10),m=parseInt(d.paddingTop,10),h=parseInt(d.borderBottomWidth,10),v=p+m+s+parseInt(d.paddingBottom,10)+h,y=Math.min(5*b.offsetHeight,v),w=window.getComputedStyle(S),j=parseInt(w.paddingTop,10),P=parseInt(w.paddingBottom,10),R=e.top+e.height/2-10,E=b.offsetHeight/2,N=p+m+(b.offsetTop+E);if(N<=R){let e=l.length>0&&b===l[l.length-1].ref.current;u.style.bottom="0px";let t=Math.max(i-R,E+(e?P:0)+(f.clientHeight-S.offsetTop-S.offsetHeight)+h);u.style.height=N+t+"px"}else{let e=l.length>0&&b===l[0].ref.current;u.style.top="0px";let t=Math.max(R,p+S.offsetTop+(e?j:0)+E);u.style.height=t+(v-N)+"px",S.scrollTop=N-R+S.offsetTop}u.style.margin="10px 0",u.style.minHeight=y+"px",u.style.maxHeight=i+"px",a?.(),requestAnimationFrame(()=>x.current=!0)}},[g,c.trigger,c.valueNode,u,f,S,b,C,c.dir,a]);(0,w.useLayoutEffect)(()=>P(),[P]);let[R,E]=r.useState();(0,w.useLayoutEffect)(()=>{f&&E(window.getComputedStyle(f).zIndex)},[f]);let N=r.useCallback(e=>{e&&!0===y.current&&(P(),j?.(),y.current=!1)},[P,j]);return(0,t.jsx)(J,{scope:l,contentWrapper:u,shouldExpandOnScrollRef:x,onScrollButtonChange:N,children:(0,t.jsx)("div",{ref:p,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:R},children:(0,t.jsx)(v.Primitive.div,{...s,ref:h,style:{boxSizing:"border-box",maxHeight:"100%",...s.style}})})})});Q.displayName="SelectItemAlignedPosition";var Z=r.forwardRef((e,r)=>{let{__scopeSelect:n,align:o="start",collisionPadding:l=10,...a}=e,i=L(n);return(0,t.jsx)(m.Content,{...i,...a,ref:r,align:o,collisionPadding:l,style:{boxSizing:"border-box",...a.style,"--radix-select-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-select-content-available-width":"var(--radix-popper-available-width)","--radix-select-content-available-height":"var(--radix-popper-available-height)","--radix-select-trigger-width":"var(--radix-popper-anchor-width)","--radix-select-trigger-height":"var(--radix-popper-anchor-height)"}})});Z.displayName="SelectPopperPosition";var[J,ee]=T(W,{}),et="SelectViewport",er=r.forwardRef((e,n)=>{let{__scopeSelect:o,nonce:a,...s}=e,c=q(et,o),d=ee(et,o),u=(0,i.useComposedRefs)(n,c.onViewportChange),p=r.useRef(0);return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("style",{dangerouslySetInnerHTML:{__html:"[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}"},nonce:a}),(0,t.jsx)(N.Slot,{scope:o,children:(0,t.jsx)(v.Primitive.div,{"data-radix-select-viewport":"",role:"presentation",...s,ref:u,style:{position:"relative",flex:1,overflow:"hidden auto",...s.style},onScroll:(0,l.composeEventHandlers)(s.onScroll,e=>{let t=e.currentTarget,{contentWrapper:r,shouldExpandOnScrollRef:n}=d;if(n?.current&&r){let e=Math.abs(p.current-t.scrollTop);if(e>0){let n=window.innerHeight-20,o=Math.max(parseFloat(r.style.minHeight),parseFloat(r.style.height));if(o<n){let l=o+e,a=Math.min(n,l),i=l-a;r.style.height=a+"px","0px"===r.style.bottom&&(t.scrollTop=i>0?i:0,r.style.justifyContent="flex-end")}}}p.current=t.scrollTop})})})]})});er.displayName=et;var en="SelectGroup",[eo,el]=T(en),ea=r.forwardRef((e,r)=>{let{__scopeSelect:n,...o}=e,l=(0,f.useId)();return(0,t.jsx)(eo,{scope:n,id:l,children:(0,t.jsx)(v.Primitive.div,{role:"group","aria-labelledby":l,...o,ref:r})})});ea.displayName=en;var ei="SelectLabel",es=r.forwardRef((e,r)=>{let{__scopeSelect:n,...o}=e,l=el(ei,n);return(0,t.jsx)(v.Primitive.div,{id:l.id,...o,ref:r})});es.displayName=ei;var ec="SelectItem",[ed,eu]=T(ec),ep=r.forwardRef((e,n)=>{let{__scopeSelect:o,value:a,disabled:s=!1,textValue:c,...d}=e,u=H(ec,o),p=q(ec,o),m=u.value===a,[h,g]=r.useState(c??""),[x,y]=r.useState(!1),w=(0,i.useComposedRefs)(n,e=>p.itemRefCallback?.(e,a,s)),S=(0,f.useId)(),b=r.useRef("touch"),C=()=>{s||(u.onValueChange(a),u.onOpenChange(!1))};if(""===a)throw Error("A <Select.Item /> must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder.");return(0,t.jsx)(ed,{scope:o,value:a,disabled:s,textId:S,isSelected:m,onItemTextChange:r.useCallback(e=>{g(t=>t||(e?.textContent??"").trim())},[]),children:(0,t.jsx)(N.ItemSlot,{scope:o,value:a,disabled:s,textValue:h,children:(0,t.jsx)(v.Primitive.div,{role:"option","aria-labelledby":S,"data-highlighted":x?"":void 0,"aria-selected":m&&x,"data-state":m?"checked":"unchecked","aria-disabled":s||void 0,"data-disabled":s?"":void 0,tabIndex:s?void 0:-1,...d,ref:w,onFocus:(0,l.composeEventHandlers)(d.onFocus,()=>y(!0)),onBlur:(0,l.composeEventHandlers)(d.onBlur,()=>y(!1)),onClick:(0,l.composeEventHandlers)(d.onClick,()=>{"mouse"!==b.current&&C()}),onPointerUp:(0,l.composeEventHandlers)(d.onPointerUp,()=>{"mouse"===b.current&&C()}),onPointerDown:(0,l.composeEventHandlers)(d.onPointerDown,e=>{b.current=e.pointerType}),onPointerMove:(0,l.composeEventHandlers)(d.onPointerMove,e=>{b.current=e.pointerType,s?p.onItemLeave?.():"mouse"===b.current&&e.currentTarget.focus({preventScroll:!0})}),onPointerLeave:(0,l.composeEventHandlers)(d.onPointerLeave,e=>{e.currentTarget===document.activeElement&&p.onItemLeave?.()}),onKeyDown:(0,l.composeEventHandlers)(d.onKeyDown,e=>{(p.searchRef?.current===""||" "!==e.key)&&(R.includes(e.key)&&C()," "===e.key&&e.preventDefault())})})})})});ep.displayName=ec;var ef="SelectItemText",em=r.forwardRef((e,o)=>{let{__scopeSelect:l,className:a,style:s,...c}=e,d=H(ef,l),u=q(ef,l),p=eu(ef,l),f=A(ef,l),[m,h]=r.useState(null),g=(0,i.useComposedRefs)(o,e=>h(e),p.onItemTextChange,e=>u.itemTextRefCallback?.(e,p.value,p.disabled)),x=m?.textContent,y=r.useMemo(()=>(0,t.jsx)("option",{value:p.value,disabled:p.disabled,children:x},p.value),[p.disabled,p.value,x]),{onNativeOptionAdd:S,onNativeOptionRemove:b}=f;return(0,w.useLayoutEffect)(()=>(S(y),()=>b(y)),[S,b,y]),(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(v.Primitive.span,{id:p.textId,...c,ref:g}),p.isSelected&&d.valueNode&&!d.valueNodeHasChildren?n.createPortal(c.children,d.valueNode):null]})});em.displayName=ef;var eh="SelectItemIndicator",ev=r.forwardRef((e,r)=>{let{__scopeSelect:n,...o}=e;return eu(eh,n).isSelected?(0,t.jsx)(v.Primitive.span,{"aria-hidden":!0,...o,ref:r}):null});ev.displayName=eh;var eg="SelectScrollUpButton",ex=r.forwardRef((e,n)=>{let o=q(eg,e.__scopeSelect),l=ee(eg,e.__scopeSelect),[a,s]=r.useState(!1),c=(0,i.useComposedRefs)(n,l.onScrollButtonChange);return(0,w.useLayoutEffect)(()=>{if(o.viewport&&o.isPositioned){let e=function(){s(t.scrollTop>0)},t=o.viewport;return e(),t.addEventListener("scroll",e),()=>t.removeEventListener("scroll",e)}},[o.viewport,o.isPositioned]),a?(0,t.jsx)(eS,{...e,ref:c,onAutoScroll:()=>{let{viewport:e,selectedItem:t}=o;e&&t&&(e.scrollTop=e.scrollTop-t.offsetHeight)}}):null});ex.displayName=eg;var ey="SelectScrollDownButton",ew=r.forwardRef((e,n)=>{let o=q(ey,e.__scopeSelect),l=ee(ey,e.__scopeSelect),[a,s]=r.useState(!1),c=(0,i.useComposedRefs)(n,l.onScrollButtonChange);return(0,w.useLayoutEffect)(()=>{if(o.viewport&&o.isPositioned){let e=function(){let e=t.scrollHeight-t.clientHeight;s(Math.ceil(t.scrollTop)<e)},t=o.viewport;return e(),t.addEventListener("scroll",e),()=>t.removeEventListener("scroll",e)}},[o.viewport,o.isPositioned]),a?(0,t.jsx)(eS,{...e,ref:c,onAutoScroll:()=>{let{viewport:e,selectedItem:t}=o;e&&t&&(e.scrollTop=e.scrollTop+t.offsetHeight)}}):null});ew.displayName=ey;var eS=r.forwardRef((e,n)=>{let{__scopeSelect:o,onAutoScroll:a,...i}=e,s=q("SelectScrollButton",o),c=r.useRef(null),d=k(o),u=r.useCallback(()=>{null!==c.current&&(window.clearInterval(c.current),c.current=null)},[]);return r.useEffect(()=>()=>u(),[u]),(0,w.useLayoutEffect)(()=>{let e=d().find(e=>e.ref.current===document.activeElement);e?.ref.current?.scrollIntoView({block:"nearest"})},[d]),(0,t.jsx)(v.Primitive.div,{"aria-hidden":!0,...i,ref:n,style:{flexShrink:0,...i.style},onPointerDown:(0,l.composeEventHandlers)(i.onPointerDown,()=>{null===c.current&&(c.current=window.setInterval(a,50))}),onPointerMove:(0,l.composeEventHandlers)(i.onPointerMove,()=>{s.onItemLeave?.(),null===c.current&&(c.current=window.setInterval(a,50))}),onPointerLeave:(0,l.composeEventHandlers)(i.onPointerLeave,()=>{u()})})}),eb=r.forwardRef((e,r)=>{let{__scopeSelect:n,...o}=e;return(0,t.jsx)(v.Primitive.div,{"aria-hidden":!0,...o,ref:r})});eb.displayName="SelectSeparator";var eC="SelectArrow",ej=r.forwardRef((e,r)=>{let{__scopeSelect:n,...o}=e,l=L(n),a=H(eC,n),i=q(eC,n);return a.open&&"popper"===i.position?(0,t.jsx)(m.Arrow,{...l,...o,ref:r}):null});ej.displayName=eC;var eP=r.forwardRef(({__scopeSelect:e,value:n,...o},l)=>{let a=r.useRef(null),s=(0,i.useComposedRefs)(l,a),c=(0,S.usePrevious)(n);return r.useEffect(()=>{let e=a.current;if(!e)return;let t=Object.getOwnPropertyDescriptor(window.HTMLSelectElement.prototype,"value").set;if(c!==n&&t){let r=new Event("change",{bubbles:!0});t.call(e,n),e.dispatchEvent(r)}},[c,n]),(0,t.jsx)(v.Primitive.select,{...o,style:{...b.VISUALLY_HIDDEN_STYLES,...o.style},ref:s,defaultValue:n})});function eR(e){return""===e||void 0===e}function eE(e){let t=(0,x.useCallbackRef)(e),n=r.useRef(""),o=r.useRef(0),l=r.useCallback(e=>{let r=n.current+e;t(r),function e(t){n.current=t,window.clearTimeout(o.current),""!==t&&(o.current=window.setTimeout(()=>e(""),1e3))}(r)},[t]),a=r.useCallback(()=>{n.current="",window.clearTimeout(o.current)},[]);return r.useEffect(()=>()=>window.clearTimeout(o.current),[]),[n,l,a]}function eN(e,t,r){var n,o;let l=t.length>1&&Array.from(t).every(e=>e===t[0])?t[0]:t,a=r?e.indexOf(r):-1,i=(n=e,o=Math.max(a,0),n.map((e,t)=>n[(o+t)%n.length]));1===l.length&&(i=i.filter(e=>e!==r));let s=i.find(e=>e.textValue.toLowerCase().startsWith(l.toLowerCase()));return s!==r?s:void 0}eP.displayName="SelectBubbleInput",e.s(["Arrow",0,ej,"Content",0,G,"Group",0,ea,"Icon",0,K,"Item",0,ep,"ItemIndicator",0,ev,"ItemText",0,em,"Label",0,es,"Portal",0,z,"Root",0,B,"ScrollDownButton",0,ew,"ScrollUpButton",0,ex,"Select",0,B,"SelectArrow",0,ej,"SelectContent",0,G,"SelectGroup",0,ea,"SelectIcon",0,K,"SelectItem",0,ep,"SelectItemIndicator",0,ev,"SelectItemText",0,em,"SelectLabel",0,es,"SelectPortal",0,z,"SelectScrollDownButton",0,ew,"SelectScrollUpButton",0,ex,"SelectSeparator",0,eb,"SelectTrigger",0,O,"SelectValue",0,U,"SelectViewport",0,er,"Separator",0,eb,"Trigger",0,O,"Value",0,U,"Viewport",0,er,"createSelectScope",0,D],74522);var ek=e.i(74522),ek=ek,eI=e.i(85149),eT=e.i(82479),eD=e.i(75767),eL=e.i(31777);let eM=ek.Root;ek.Group;let eH=ek.Value,e_=r.forwardRef(({className:e,children:r,...n},o)=>(0,t.jsxs)(ek.Trigger,{ref:o,className:(0,eL.cn)("border-input ring-offset-background placeholder:text-muted-foreground focus:ring-ring flex h-9 w-full items-center justify-between rounded-md border bg-transparent px-3 py-2 text-sm whitespace-nowrap shadow-sm focus:ring-1 focus:outline-none disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1",e),...n,children:[r,(0,t.jsx)(ek.Icon,{asChild:!0,children:(0,t.jsx)(eT.ChevronDown,{className:"h-4 w-4 opacity-50"})})]}));e_.displayName=ek.Trigger.displayName;let eA=r.forwardRef(({className:e,...r},n)=>(0,t.jsx)(ek.ScrollUpButton,{ref:n,className:(0,eL.cn)("flex cursor-default items-center justify-center py-1",e),...r,children:(0,t.jsx)(eD.ChevronUp,{className:"h-4 w-4"})}));eA.displayName=ek.ScrollUpButton.displayName;let eB=r.forwardRef(({className:e,...r},n)=>(0,t.jsx)(ek.ScrollDownButton,{ref:n,className:(0,eL.cn)("flex cursor-default items-center justify-center py-1",e),...r,children:(0,t.jsx)(eT.ChevronDown,{className:"h-4 w-4"})}));eB.displayName=ek.ScrollDownButton.displayName;let eF=r.forwardRef(({className:e,children:r,position:n="popper",...o},l)=>(0,t.jsx)(ek.Portal,{children:(0,t.jsxs)(ek.Content,{ref:l,className:(0,eL.cn)("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 relative z-50 max-h-96 min-w-[8rem] overflow-hidden rounded-md border shadow-md","popper"===n&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",e),position:n,...o,children:[(0,t.jsx)(eA,{}),(0,t.jsx)(ek.Viewport,{className:(0,eL.cn)("p-1","popper"===n&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),children:r}),(0,t.jsx)(eB,{})]})}));eF.displayName=ek.Content.displayName,r.forwardRef(({className:e,...r},n)=>(0,t.jsx)(ek.Label,{ref:n,className:(0,eL.cn)("px-2 py-1.5 text-sm font-semibold",e),...r})).displayName=ek.Label.displayName;let eO=r.forwardRef(({className:e,children:r,...n},o)=>(0,t.jsxs)(ek.Item,{ref:o,className:(0,eL.cn)("focus:bg-accent focus:text-accent-foreground relative flex w-full cursor-default items-center rounded-sm py-1.5 ps-2 pe-8 text-sm outline-none select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),...n,children:[(0,t.jsx)("span",{className:"absolute end-2 flex h-3.5 w-3.5 items-center justify-center",children:(0,t.jsx)(ek.ItemIndicator,{children:(0,t.jsx)(eI.Check,{className:"h-4 w-4"})})}),(0,t.jsx)(ek.ItemText,{children:r})]}));eO.displayName=ek.Item.displayName,r.forwardRef(({className:e,...r},n)=>(0,t.jsx)(ek.Separator,{ref:n,className:(0,eL.cn)("bg-muted -mx-1 my-1 h-px",e),...r})).displayName=ek.Separator.displayName,e.s(["Select",0,eM,"SelectContent",0,eF,"SelectItem",0,eO,"SelectTrigger",0,e_,"SelectValue",0,eH],47373)},44802,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"BailoutToCSR",{enumerable:!0,get:function(){return o}});let n=e.r(26728);function o({reason:e,children:t}){if("u"<typeof window)throw Object.defineProperty(new n.BailoutToCSRError(e),"__NEXT_ERROR_CODE",{value:"E394",enumerable:!1,configurable:!0});return t}},70399,(e,t,r)=>{"use strict";function n(e){return e.split("/").map(e=>encodeURIComponent(e)).join("/")}Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"encodeURIPath",{enumerable:!0,get:function(){return n}})},77622,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"PreloadChunks",{enumerable:!0,get:function(){return s}});let n=e.r(96871),o=e.r(70309),l=e.r(5474),a=e.r(70399),i=e.r(58349);function s({moduleIds:e}){if("u">typeof window)return null;let t=l.workAsyncStorage.getStore();if(void 0===t)return null;let r=[];if(t.reactLoadableManifest&&e){let n=t.reactLoadableManifest;for(let t of e){if(!n[t])continue;let e=n[t].files;r.push(...e)}}if(0===r.length)return null;let c=(0,i.getAssetTokenQuery)();return(0,n.jsx)(n.Fragment,{children:r.map(e=>{let r=`${t.assetPrefix}/_next/${(0,a.encodeURIPath)(e)}${c}`;return e.endsWith(".css")?(0,n.jsx)("link",{precedence:"dynamic",href:r,rel:"stylesheet",as:"style",nonce:t.nonce},e):((0,o.preload)(r,{as:"script",fetchPriority:"low",nonce:t.nonce}),null)})})}},38762,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"default",{enumerable:!0,get:function(){return c}});let n=e.r(96871),o=e.r(16539),l=e.r(44802),a=e.r(77622);function i(e){return{default:e&&"default"in e?e.default:e}}let s={loader:()=>Promise.resolve(i(()=>null)),loading:null,ssr:!0},c=function(e){let t={...s,...e},r=(0,o.lazy)(()=>t.loader().then(i)),c=t.loading;function d(e){let i=c?(0,n.jsx)(c,{isLoading:!0,pastDelay:!0,error:null}):null,s=!t.ssr||!!t.loading,d=s?o.Suspense:o.Fragment,u=t.ssr?(0,n.jsxs)(n.Fragment,{children:["u"<typeof window?(0,n.jsx)(a.PreloadChunks,{moduleIds:t.modules}):null,(0,n.jsx)(r,{...e})]}):(0,n.jsx)(l.BailoutToCSR,{reason:"next/dynamic",children:(0,n.jsx)(r,{...e})});return(0,n.jsx)(d,{...s?{fallback:i}:{},children:u})}return d.displayName="LoadableComponent",d}},52199,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"default",{enumerable:!0,get:function(){return o}});let n=e.r(81258)._(e.r(38762));function o(e,t){let r={};"function"==typeof e&&(r.loader=e);let o={...r,...t};return(0,n.default)({...o,modules:o.loadableGenerated?.modules})}("function"==typeof r.default||"object"==typeof r.default&&null!==r.default)&&void 0===r.default.__esModule&&(Object.defineProperty(r.default,"__esModule",{value:!0}),Object.assign(r.default,r),t.exports=r.default)},13322,61201,e=>{"use strict";var t=e.i(96871),r=e.i(16539),n=e.i(52199),o=e.i(79561),l=e.i(60112),a=e.i(2287),i=e.i(35364);let s=(0,n.default)(()=>e.A(54625).then(e=>e.FileManager),{loadableGenerated:{modules:[19454]},ssr:!1,loading:()=>(0,t.jsx)(c,{})});function c(){return(0,t.jsx)("div",{className:"flex h-full w-full items-center justify-center",children:(0,t.jsx)(o.LoaderCircle,{className:"text-muted-foreground h-8 w-8 animate-spin"})})}async function d(e){let t=new URLSearchParams;e&&t.set("path",e);let r=await fetch(`/api/directory/list?${t.toString()}`);if(!r.ok)throw Error((await r.json().catch(()=>({error:"Failed to load directory"}))).error??"Failed to load directory");return r.json()}e.s(["ReactFileManagerDialog",0,function({open:e,onOpenChange:n,onSelect:o,initialPath:c}){let[u,p]=(0,r.useState)([]),[f,m]=(0,r.useState)(""),[h,v]=(0,r.useState)(!1),[g,x]=(0,r.useState)(null),y=(0,r.useRef)(!1),w=(0,r.useCallback)(async e=>{v(!0),x(null);try{let t=await d(e);p(t.entries),m(t.currentPath)}catch(t){let e=t instanceof Error?t.message:"Failed to load directory";l.toast.error(e)}finally{v(!1)}},[]);(0,r.useEffect)(()=>{e&&!y.current&&(y.current=!0,w(c)),e||(y.current=!1)},[e,c,w]);let S=(0,r.useCallback)(e=>{let t=e.absolutePath;e.isDirectory&&t&&w(t)},[w]),b=(0,r.useCallback)(e=>{1===e.length&&e[0].isDirectory?x(e[0].absolutePath??null):x(null)},[]);function C(){o(null),n(!1)}return(0,t.jsx)(a.Dialog,{open:e,onOpenChange:e=>{e||C()},children:(0,t.jsxs)(a.DialogContent,{className:"flex h-[95dvh] max-w-[95vw] flex-col",onCloseAutoFocus:e=>e.preventDefault(),children:[(0,t.jsxs)(a.DialogHeader,{children:[(0,t.jsx)(a.DialogTitle,{children:"Select Folder"}),(0,t.jsx)(a.DialogDescription,{className:"truncate font-mono text-xs",children:f||"Loading..."})]}),(0,t.jsx)("div",{className:"shipit-ai-file-manager min-h-0 flex-1 overflow-hidden rounded-md border",children:(0,t.jsx)(s,{files:u.map(e=>({name:e.name,isDirectory:!0,path:`/${e.name}`,absolutePath:e.path,updatedAt:e.updatedAt})),isLoading:h,height:"100%",width:"100%",layout:"list",enableFilePreview:!1,permissions:{upload:!1,delete:!1,create:!1,download:!1,copy:!1,move:!1,rename:!1},onFileOpen:S,onSelectionChange:b,onRefresh:()=>w(f)},f)}),(0,t.jsxs)(a.DialogFooter,{children:[(0,t.jsx)(i.Button,{variant:"outline",onClick:C,children:"Cancel"}),(0,t.jsx)(i.Button,{variant:"secondary",onClick:function(){f&&(o(f),n(!1))},disabled:!f,children:"Select Current Folder"}),(0,t.jsx)(i.Button,{onClick:function(){g&&(o(g),n(!1))},disabled:!g,children:"Select Folder"})]})]})})}],61201),e.s([],13322)},78521,e=>{"use strict";var t=e.i(96976);let r=(0,t.createServerReference)("004de4fda584a02e277917c9349954f44a58de45eb",t.callServer,void 0,t.findSourceMapURL,"pickFolder");async function n(){let e=await r();if(e.error)throw Error(e.error);return e.path}e.s(["pickFolder",0,n],78521)},8791,e=>{"use strict";let t=(0,e.i(54864).default)("git-fork",[["circle",{cx:"12",cy:"18",r:"3",key:"1mpf1b"}],["circle",{cx:"6",cy:"6",r:"3",key:"1lh9wr"}],["circle",{cx:"18",cy:"6",r:"3",key:"1h7g24"}],["path",{d:"M18 9v2c0 .6-.4 1-1 1H7c-.6 0-1-.4-1-1V9",key:"1uq4wg"}],["path",{d:"M12 12v3",key:"158kv8"}]]);e.s(["GitFork",0,t],8791)}]);
1
+ (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,47373,27069,e=>{"use strict";var t=e.i(96871),r=e.i(16539),n=e.i(70309);function o(e,[t,r]){return Math.min(r,Math.max(t,e))}e.s(["clamp",0,o],27069);var l=e.i(91967),a=e.i(87099),i=e.i(22353),s=e.i(9413),c=e.i(75649),d=e.i(3659),u=e.i(87656),p=e.i(62854),f=e.i(11207),m=e.i(73071),h=e.i(76903),v=e.i(85565),g=e.i(60310),x=e.i(88248),y=e.i(36567),w=e.i(18731),S=e.i(9641),b=e.i(87312),C=e.i(73772),j=e.i(69759),P=[" ","Enter","ArrowUp","ArrowDown"],R=[" ","Enter"],E="Select",[N,k,I]=(0,a.createCollection)(E),[T,D]=(0,s.createContextScope)(E,[I,m.createPopperScope]),L=(0,m.createPopperScope)(),[M,H]=T(E),[_,A]=T(E),B=e=>{let{__scopeSelect:n,children:o,open:l,defaultOpen:a,onOpenChange:i,value:s,defaultValue:d,onValueChange:u,dir:p,name:h,autoComplete:v,disabled:g,required:x,form:w}=e,S=L(n),[b,C]=r.useState(null),[j,P]=r.useState(null),[R,k]=r.useState(!1),I=(0,c.useDirection)(p),[T,D]=(0,y.useControllableState)({prop:l,defaultProp:a??!1,onChange:i,caller:E}),[H,A]=(0,y.useControllableState)({prop:s,defaultProp:d,onChange:u,caller:E}),B=r.useRef(null),F=!b||w||!!b.closest("form"),[O,V]=r.useState(new Set),U=Array.from(O).map(e=>e.props.value).join(";");return(0,t.jsx)(m.Root,{...S,children:(0,t.jsxs)(M,{required:x,scope:n,trigger:b,onTriggerChange:C,valueNode:j,onValueNodeChange:P,valueNodeHasChildren:R,onValueNodeHasChildrenChange:k,contentId:(0,f.useId)(),value:H,onValueChange:A,open:T,onOpenChange:D,dir:I,triggerPointerDownPosRef:B,disabled:g,children:[(0,t.jsx)(N.Provider,{scope:n,children:(0,t.jsx)(_,{scope:e.__scopeSelect,onNativeOptionAdd:r.useCallback(e=>{V(t=>new Set(t).add(e))},[]),onNativeOptionRemove:r.useCallback(e=>{V(t=>{let r=new Set(t);return r.delete(e),r})},[]),children:o})}),F?(0,t.jsxs)(eP,{"aria-hidden":!0,required:x,tabIndex:-1,name:h,autoComplete:v,value:H,onChange:e=>A(e.target.value),disabled:g,form:w,children:[void 0===H?(0,t.jsx)("option",{value:""}):null,Array.from(O)]},U):null]})})};B.displayName=E;var F="SelectTrigger",O=r.forwardRef((e,n)=>{let{__scopeSelect:o,disabled:a=!1,...s}=e,c=L(o),d=H(F,o),u=d.disabled||a,p=(0,i.useComposedRefs)(n,d.onTriggerChange),f=k(o),h=r.useRef("touch"),[g,x,y]=eE(e=>{let t=f().filter(e=>!e.disabled),r=t.find(e=>e.value===d.value),n=eN(t,e,r);void 0!==n&&d.onValueChange(n.value)}),w=e=>{u||(d.onOpenChange(!0),y()),e&&(d.triggerPointerDownPosRef.current={x:Math.round(e.pageX),y:Math.round(e.pageY)})};return(0,t.jsx)(m.Anchor,{asChild:!0,...c,children:(0,t.jsx)(v.Primitive.button,{type:"button",role:"combobox","aria-controls":d.contentId,"aria-expanded":d.open,"aria-required":d.required,"aria-autocomplete":"none",dir:d.dir,"data-state":d.open?"open":"closed",disabled:u,"data-disabled":u?"":void 0,"data-placeholder":eR(d.value)?"":void 0,...s,ref:p,onClick:(0,l.composeEventHandlers)(s.onClick,e=>{e.currentTarget.focus(),"mouse"!==h.current&&w(e)}),onPointerDown:(0,l.composeEventHandlers)(s.onPointerDown,e=>{h.current=e.pointerType;let t=e.target;t.hasPointerCapture(e.pointerId)&&t.releasePointerCapture(e.pointerId),0===e.button&&!1===e.ctrlKey&&"mouse"===e.pointerType&&(w(e),e.preventDefault())}),onKeyDown:(0,l.composeEventHandlers)(s.onKeyDown,e=>{let t=""!==g.current;e.ctrlKey||e.altKey||e.metaKey||1!==e.key.length||x(e.key),(!t||" "!==e.key)&&P.includes(e.key)&&(w(),e.preventDefault())})})})});O.displayName=F;var V="SelectValue",U=r.forwardRef((e,r)=>{let{__scopeSelect:n,className:o,style:l,children:a,placeholder:s="",...c}=e,d=H(V,n),{onValueNodeHasChildrenChange:u}=d,p=void 0!==a,f=(0,i.useComposedRefs)(r,d.onValueNodeChange);return(0,w.useLayoutEffect)(()=>{u(p)},[u,p]),(0,t.jsx)(v.Primitive.span,{...c,ref:f,style:{pointerEvents:"none"},children:eR(d.value)?(0,t.jsx)(t.Fragment,{children:s}):a})});U.displayName=V;var K=r.forwardRef((e,r)=>{let{__scopeSelect:n,children:o,...l}=e;return(0,t.jsx)(v.Primitive.span,{"aria-hidden":!0,...l,ref:r,children:o||"▼"})});K.displayName="SelectIcon";var z=e=>(0,t.jsx)(h.Portal,{asChild:!0,...e});z.displayName="SelectPortal";var W="SelectContent",G=r.forwardRef((e,o)=>{let l=H(W,e.__scopeSelect),[a,i]=r.useState();return((0,w.useLayoutEffect)(()=>{i(new DocumentFragment)},[]),l.open)?(0,t.jsx)(X,{...e,ref:o}):a?n.createPortal((0,t.jsx)($,{scope:e.__scopeSelect,children:(0,t.jsx)(N.Slot,{scope:e.__scopeSelect,children:(0,t.jsx)("div",{children:e.children})})}),a):null});G.displayName=W;var[$,q]=T(W),Y=(0,g.createSlot)("SelectContent.RemoveScroll"),X=r.forwardRef((e,n)=>{let{__scopeSelect:o,position:a="item-aligned",onCloseAutoFocus:s,onEscapeKeyDown:c,onPointerDownOutside:f,side:m,sideOffset:h,align:v,alignOffset:g,arrowPadding:x,collisionBoundary:y,collisionPadding:w,sticky:S,hideWhenDetached:b,avoidCollisions:P,...R}=e,E=H(W,o),[N,I]=r.useState(null),[T,D]=r.useState(null),L=(0,i.useComposedRefs)(n,e=>I(e)),[M,_]=r.useState(null),[A,B]=r.useState(null),F=k(o),[O,V]=r.useState(!1),U=r.useRef(!1);r.useEffect(()=>{if(N)return(0,C.hideOthers)(N)},[N]),(0,u.useFocusGuards)();let K=r.useCallback(e=>{let[t,...r]=F().map(e=>e.ref.current),[n]=r.slice(-1),o=document.activeElement;for(let r of e)if(r===o||(r?.scrollIntoView({block:"nearest"}),r===t&&T&&(T.scrollTop=0),r===n&&T&&(T.scrollTop=T.scrollHeight),r?.focus(),document.activeElement!==o))return},[F,T]),z=r.useCallback(()=>K([M,N]),[K,M,N]);r.useEffect(()=>{O&&z()},[O,z]);let{onOpenChange:G,triggerPointerDownPosRef:q}=E;r.useEffect(()=>{if(N){let e={x:0,y:0},t=t=>{e={x:Math.abs(Math.round(t.pageX)-(q.current?.x??0)),y:Math.abs(Math.round(t.pageY)-(q.current?.y??0))}},r=r=>{e.x<=10&&e.y<=10?r.preventDefault():N.contains(r.target)||G(!1),document.removeEventListener("pointermove",t),q.current=null};return null!==q.current&&(document.addEventListener("pointermove",t),document.addEventListener("pointerup",r,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",t),document.removeEventListener("pointerup",r,{capture:!0})}}},[N,G,q]),r.useEffect(()=>{let e=()=>G(!1);return window.addEventListener("blur",e),window.addEventListener("resize",e),()=>{window.removeEventListener("blur",e),window.removeEventListener("resize",e)}},[G]);let[X,J]=eE(e=>{let t=F().filter(e=>!e.disabled),r=t.find(e=>e.ref.current===document.activeElement),n=eN(t,e,r);n&&setTimeout(()=>n.ref.current.focus())}),ee=r.useCallback((e,t,r)=>{let n=!U.current&&!r;(void 0!==E.value&&E.value===t||n)&&(_(e),n&&(U.current=!0))},[E.value]),et=r.useCallback(()=>N?.focus(),[N]),er=r.useCallback((e,t,r)=>{let n=!U.current&&!r;(void 0!==E.value&&E.value===t||n)&&B(e)},[E.value]),en="popper"===a?Z:Q,eo=en===Z?{side:m,sideOffset:h,align:v,alignOffset:g,arrowPadding:x,collisionBoundary:y,collisionPadding:w,sticky:S,hideWhenDetached:b,avoidCollisions:P}:{};return(0,t.jsx)($,{scope:o,content:N,viewport:T,onViewportChange:D,itemRefCallback:ee,selectedItem:M,onItemLeave:et,itemTextRefCallback:er,focusSelectedItem:z,selectedItemText:A,position:a,isPositioned:O,searchRef:X,children:(0,t.jsx)(j.RemoveScroll,{as:Y,allowPinchZoom:!0,children:(0,t.jsx)(p.FocusScope,{asChild:!0,trapped:E.open,onMountAutoFocus:e=>{e.preventDefault()},onUnmountAutoFocus:(0,l.composeEventHandlers)(s,e=>{E.trigger?.focus({preventScroll:!0}),e.preventDefault()}),children:(0,t.jsx)(d.DismissableLayer,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:c,onPointerDownOutside:f,onFocusOutside:e=>e.preventDefault(),onDismiss:()=>E.onOpenChange(!1),children:(0,t.jsx)(en,{role:"listbox",id:E.contentId,"data-state":E.open?"open":"closed",dir:E.dir,onContextMenu:e=>e.preventDefault(),...R,...eo,onPlaced:()=>V(!0),ref:L,style:{display:"flex",flexDirection:"column",outline:"none",...R.style},onKeyDown:(0,l.composeEventHandlers)(R.onKeyDown,e=>{let t=e.ctrlKey||e.altKey||e.metaKey;if("Tab"===e.key&&e.preventDefault(),t||1!==e.key.length||J(e.key),["ArrowUp","ArrowDown","Home","End"].includes(e.key)){let t=F().filter(e=>!e.disabled).map(e=>e.ref.current);if(["ArrowUp","End"].includes(e.key)&&(t=t.slice().reverse()),["ArrowUp","ArrowDown"].includes(e.key)){let r=e.target,n=t.indexOf(r);t=t.slice(n+1)}setTimeout(()=>K(t)),e.preventDefault()}})})})})})})});X.displayName="SelectContentImpl";var Q=r.forwardRef((e,n)=>{let{__scopeSelect:l,onPlaced:a,...s}=e,c=H(W,l),d=q(W,l),[u,p]=r.useState(null),[f,m]=r.useState(null),h=(0,i.useComposedRefs)(n,e=>m(e)),g=k(l),x=r.useRef(!1),y=r.useRef(!0),{viewport:S,selectedItem:b,selectedItemText:C,focusSelectedItem:j}=d,P=r.useCallback(()=>{if(c.trigger&&c.valueNode&&u&&f&&S&&b&&C){let e=c.trigger.getBoundingClientRect(),t=f.getBoundingClientRect(),r=c.valueNode.getBoundingClientRect(),n=C.getBoundingClientRect();if("rtl"!==c.dir){let l=n.left-t.left,a=r.left-l,i=e.left-a,s=e.width+i,c=Math.max(s,t.width),d=o(a,[10,Math.max(10,window.innerWidth-10-c)]);u.style.minWidth=s+"px",u.style.left=d+"px"}else{let l=t.right-n.right,a=window.innerWidth-r.right-l,i=window.innerWidth-e.right-a,s=e.width+i,c=Math.max(s,t.width),d=o(a,[10,Math.max(10,window.innerWidth-10-c)]);u.style.minWidth=s+"px",u.style.right=d+"px"}let l=g(),i=window.innerHeight-20,s=S.scrollHeight,d=window.getComputedStyle(f),p=parseInt(d.borderTopWidth,10),m=parseInt(d.paddingTop,10),h=parseInt(d.borderBottomWidth,10),v=p+m+s+parseInt(d.paddingBottom,10)+h,y=Math.min(5*b.offsetHeight,v),w=window.getComputedStyle(S),j=parseInt(w.paddingTop,10),P=parseInt(w.paddingBottom,10),R=e.top+e.height/2-10,E=b.offsetHeight/2,N=p+m+(b.offsetTop+E);if(N<=R){let e=l.length>0&&b===l[l.length-1].ref.current;u.style.bottom="0px";let t=Math.max(i-R,E+(e?P:0)+(f.clientHeight-S.offsetTop-S.offsetHeight)+h);u.style.height=N+t+"px"}else{let e=l.length>0&&b===l[0].ref.current;u.style.top="0px";let t=Math.max(R,p+S.offsetTop+(e?j:0)+E);u.style.height=t+(v-N)+"px",S.scrollTop=N-R+S.offsetTop}u.style.margin="10px 0",u.style.minHeight=y+"px",u.style.maxHeight=i+"px",a?.(),requestAnimationFrame(()=>x.current=!0)}},[g,c.trigger,c.valueNode,u,f,S,b,C,c.dir,a]);(0,w.useLayoutEffect)(()=>P(),[P]);let[R,E]=r.useState();(0,w.useLayoutEffect)(()=>{f&&E(window.getComputedStyle(f).zIndex)},[f]);let N=r.useCallback(e=>{e&&!0===y.current&&(P(),j?.(),y.current=!1)},[P,j]);return(0,t.jsx)(J,{scope:l,contentWrapper:u,shouldExpandOnScrollRef:x,onScrollButtonChange:N,children:(0,t.jsx)("div",{ref:p,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:R},children:(0,t.jsx)(v.Primitive.div,{...s,ref:h,style:{boxSizing:"border-box",maxHeight:"100%",...s.style}})})})});Q.displayName="SelectItemAlignedPosition";var Z=r.forwardRef((e,r)=>{let{__scopeSelect:n,align:o="start",collisionPadding:l=10,...a}=e,i=L(n);return(0,t.jsx)(m.Content,{...i,...a,ref:r,align:o,collisionPadding:l,style:{boxSizing:"border-box",...a.style,"--radix-select-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-select-content-available-width":"var(--radix-popper-available-width)","--radix-select-content-available-height":"var(--radix-popper-available-height)","--radix-select-trigger-width":"var(--radix-popper-anchor-width)","--radix-select-trigger-height":"var(--radix-popper-anchor-height)"}})});Z.displayName="SelectPopperPosition";var[J,ee]=T(W,{}),et="SelectViewport",er=r.forwardRef((e,n)=>{let{__scopeSelect:o,nonce:a,...s}=e,c=q(et,o),d=ee(et,o),u=(0,i.useComposedRefs)(n,c.onViewportChange),p=r.useRef(0);return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("style",{dangerouslySetInnerHTML:{__html:"[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}"},nonce:a}),(0,t.jsx)(N.Slot,{scope:o,children:(0,t.jsx)(v.Primitive.div,{"data-radix-select-viewport":"",role:"presentation",...s,ref:u,style:{position:"relative",flex:1,overflow:"hidden auto",...s.style},onScroll:(0,l.composeEventHandlers)(s.onScroll,e=>{let t=e.currentTarget,{contentWrapper:r,shouldExpandOnScrollRef:n}=d;if(n?.current&&r){let e=Math.abs(p.current-t.scrollTop);if(e>0){let n=window.innerHeight-20,o=Math.max(parseFloat(r.style.minHeight),parseFloat(r.style.height));if(o<n){let l=o+e,a=Math.min(n,l),i=l-a;r.style.height=a+"px","0px"===r.style.bottom&&(t.scrollTop=i>0?i:0,r.style.justifyContent="flex-end")}}}p.current=t.scrollTop})})})]})});er.displayName=et;var en="SelectGroup",[eo,el]=T(en),ea=r.forwardRef((e,r)=>{let{__scopeSelect:n,...o}=e,l=(0,f.useId)();return(0,t.jsx)(eo,{scope:n,id:l,children:(0,t.jsx)(v.Primitive.div,{role:"group","aria-labelledby":l,...o,ref:r})})});ea.displayName=en;var ei="SelectLabel",es=r.forwardRef((e,r)=>{let{__scopeSelect:n,...o}=e,l=el(ei,n);return(0,t.jsx)(v.Primitive.div,{id:l.id,...o,ref:r})});es.displayName=ei;var ec="SelectItem",[ed,eu]=T(ec),ep=r.forwardRef((e,n)=>{let{__scopeSelect:o,value:a,disabled:s=!1,textValue:c,...d}=e,u=H(ec,o),p=q(ec,o),m=u.value===a,[h,g]=r.useState(c??""),[x,y]=r.useState(!1),w=(0,i.useComposedRefs)(n,e=>p.itemRefCallback?.(e,a,s)),S=(0,f.useId)(),b=r.useRef("touch"),C=()=>{s||(u.onValueChange(a),u.onOpenChange(!1))};if(""===a)throw Error("A <Select.Item /> must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder.");return(0,t.jsx)(ed,{scope:o,value:a,disabled:s,textId:S,isSelected:m,onItemTextChange:r.useCallback(e=>{g(t=>t||(e?.textContent??"").trim())},[]),children:(0,t.jsx)(N.ItemSlot,{scope:o,value:a,disabled:s,textValue:h,children:(0,t.jsx)(v.Primitive.div,{role:"option","aria-labelledby":S,"data-highlighted":x?"":void 0,"aria-selected":m&&x,"data-state":m?"checked":"unchecked","aria-disabled":s||void 0,"data-disabled":s?"":void 0,tabIndex:s?void 0:-1,...d,ref:w,onFocus:(0,l.composeEventHandlers)(d.onFocus,()=>y(!0)),onBlur:(0,l.composeEventHandlers)(d.onBlur,()=>y(!1)),onClick:(0,l.composeEventHandlers)(d.onClick,()=>{"mouse"!==b.current&&C()}),onPointerUp:(0,l.composeEventHandlers)(d.onPointerUp,()=>{"mouse"===b.current&&C()}),onPointerDown:(0,l.composeEventHandlers)(d.onPointerDown,e=>{b.current=e.pointerType}),onPointerMove:(0,l.composeEventHandlers)(d.onPointerMove,e=>{b.current=e.pointerType,s?p.onItemLeave?.():"mouse"===b.current&&e.currentTarget.focus({preventScroll:!0})}),onPointerLeave:(0,l.composeEventHandlers)(d.onPointerLeave,e=>{e.currentTarget===document.activeElement&&p.onItemLeave?.()}),onKeyDown:(0,l.composeEventHandlers)(d.onKeyDown,e=>{(p.searchRef?.current===""||" "!==e.key)&&(R.includes(e.key)&&C()," "===e.key&&e.preventDefault())})})})})});ep.displayName=ec;var ef="SelectItemText",em=r.forwardRef((e,o)=>{let{__scopeSelect:l,className:a,style:s,...c}=e,d=H(ef,l),u=q(ef,l),p=eu(ef,l),f=A(ef,l),[m,h]=r.useState(null),g=(0,i.useComposedRefs)(o,e=>h(e),p.onItemTextChange,e=>u.itemTextRefCallback?.(e,p.value,p.disabled)),x=m?.textContent,y=r.useMemo(()=>(0,t.jsx)("option",{value:p.value,disabled:p.disabled,children:x},p.value),[p.disabled,p.value,x]),{onNativeOptionAdd:S,onNativeOptionRemove:b}=f;return(0,w.useLayoutEffect)(()=>(S(y),()=>b(y)),[S,b,y]),(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(v.Primitive.span,{id:p.textId,...c,ref:g}),p.isSelected&&d.valueNode&&!d.valueNodeHasChildren?n.createPortal(c.children,d.valueNode):null]})});em.displayName=ef;var eh="SelectItemIndicator",ev=r.forwardRef((e,r)=>{let{__scopeSelect:n,...o}=e;return eu(eh,n).isSelected?(0,t.jsx)(v.Primitive.span,{"aria-hidden":!0,...o,ref:r}):null});ev.displayName=eh;var eg="SelectScrollUpButton",ex=r.forwardRef((e,n)=>{let o=q(eg,e.__scopeSelect),l=ee(eg,e.__scopeSelect),[a,s]=r.useState(!1),c=(0,i.useComposedRefs)(n,l.onScrollButtonChange);return(0,w.useLayoutEffect)(()=>{if(o.viewport&&o.isPositioned){let e=function(){s(t.scrollTop>0)},t=o.viewport;return e(),t.addEventListener("scroll",e),()=>t.removeEventListener("scroll",e)}},[o.viewport,o.isPositioned]),a?(0,t.jsx)(eS,{...e,ref:c,onAutoScroll:()=>{let{viewport:e,selectedItem:t}=o;e&&t&&(e.scrollTop=e.scrollTop-t.offsetHeight)}}):null});ex.displayName=eg;var ey="SelectScrollDownButton",ew=r.forwardRef((e,n)=>{let o=q(ey,e.__scopeSelect),l=ee(ey,e.__scopeSelect),[a,s]=r.useState(!1),c=(0,i.useComposedRefs)(n,l.onScrollButtonChange);return(0,w.useLayoutEffect)(()=>{if(o.viewport&&o.isPositioned){let e=function(){let e=t.scrollHeight-t.clientHeight;s(Math.ceil(t.scrollTop)<e)},t=o.viewport;return e(),t.addEventListener("scroll",e),()=>t.removeEventListener("scroll",e)}},[o.viewport,o.isPositioned]),a?(0,t.jsx)(eS,{...e,ref:c,onAutoScroll:()=>{let{viewport:e,selectedItem:t}=o;e&&t&&(e.scrollTop=e.scrollTop+t.offsetHeight)}}):null});ew.displayName=ey;var eS=r.forwardRef((e,n)=>{let{__scopeSelect:o,onAutoScroll:a,...i}=e,s=q("SelectScrollButton",o),c=r.useRef(null),d=k(o),u=r.useCallback(()=>{null!==c.current&&(window.clearInterval(c.current),c.current=null)},[]);return r.useEffect(()=>()=>u(),[u]),(0,w.useLayoutEffect)(()=>{let e=d().find(e=>e.ref.current===document.activeElement);e?.ref.current?.scrollIntoView({block:"nearest"})},[d]),(0,t.jsx)(v.Primitive.div,{"aria-hidden":!0,...i,ref:n,style:{flexShrink:0,...i.style},onPointerDown:(0,l.composeEventHandlers)(i.onPointerDown,()=>{null===c.current&&(c.current=window.setInterval(a,50))}),onPointerMove:(0,l.composeEventHandlers)(i.onPointerMove,()=>{s.onItemLeave?.(),null===c.current&&(c.current=window.setInterval(a,50))}),onPointerLeave:(0,l.composeEventHandlers)(i.onPointerLeave,()=>{u()})})}),eb=r.forwardRef((e,r)=>{let{__scopeSelect:n,...o}=e;return(0,t.jsx)(v.Primitive.div,{"aria-hidden":!0,...o,ref:r})});eb.displayName="SelectSeparator";var eC="SelectArrow",ej=r.forwardRef((e,r)=>{let{__scopeSelect:n,...o}=e,l=L(n),a=H(eC,n),i=q(eC,n);return a.open&&"popper"===i.position?(0,t.jsx)(m.Arrow,{...l,...o,ref:r}):null});ej.displayName=eC;var eP=r.forwardRef(({__scopeSelect:e,value:n,...o},l)=>{let a=r.useRef(null),s=(0,i.useComposedRefs)(l,a),c=(0,S.usePrevious)(n);return r.useEffect(()=>{let e=a.current;if(!e)return;let t=Object.getOwnPropertyDescriptor(window.HTMLSelectElement.prototype,"value").set;if(c!==n&&t){let r=new Event("change",{bubbles:!0});t.call(e,n),e.dispatchEvent(r)}},[c,n]),(0,t.jsx)(v.Primitive.select,{...o,style:{...b.VISUALLY_HIDDEN_STYLES,...o.style},ref:s,defaultValue:n})});function eR(e){return""===e||void 0===e}function eE(e){let t=(0,x.useCallbackRef)(e),n=r.useRef(""),o=r.useRef(0),l=r.useCallback(e=>{let r=n.current+e;t(r),function e(t){n.current=t,window.clearTimeout(o.current),""!==t&&(o.current=window.setTimeout(()=>e(""),1e3))}(r)},[t]),a=r.useCallback(()=>{n.current="",window.clearTimeout(o.current)},[]);return r.useEffect(()=>()=>window.clearTimeout(o.current),[]),[n,l,a]}function eN(e,t,r){var n,o;let l=t.length>1&&Array.from(t).every(e=>e===t[0])?t[0]:t,a=r?e.indexOf(r):-1,i=(n=e,o=Math.max(a,0),n.map((e,t)=>n[(o+t)%n.length]));1===l.length&&(i=i.filter(e=>e!==r));let s=i.find(e=>e.textValue.toLowerCase().startsWith(l.toLowerCase()));return s!==r?s:void 0}eP.displayName="SelectBubbleInput",e.s(["Arrow",0,ej,"Content",0,G,"Group",0,ea,"Icon",0,K,"Item",0,ep,"ItemIndicator",0,ev,"ItemText",0,em,"Label",0,es,"Portal",0,z,"Root",0,B,"ScrollDownButton",0,ew,"ScrollUpButton",0,ex,"Select",0,B,"SelectArrow",0,ej,"SelectContent",0,G,"SelectGroup",0,ea,"SelectIcon",0,K,"SelectItem",0,ep,"SelectItemIndicator",0,ev,"SelectItemText",0,em,"SelectLabel",0,es,"SelectPortal",0,z,"SelectScrollDownButton",0,ew,"SelectScrollUpButton",0,ex,"SelectSeparator",0,eb,"SelectTrigger",0,O,"SelectValue",0,U,"SelectViewport",0,er,"Separator",0,eb,"Trigger",0,O,"Value",0,U,"Viewport",0,er,"createSelectScope",0,D],74522);var ek=e.i(74522),ek=ek,eI=e.i(85149),eT=e.i(82479),eD=e.i(75767),eL=e.i(31777);let eM=ek.Root;ek.Group;let eH=ek.Value,e_=r.forwardRef(({className:e,children:r,...n},o)=>(0,t.jsxs)(ek.Trigger,{ref:o,className:(0,eL.cn)("border-input ring-offset-background placeholder:text-muted-foreground focus:ring-ring flex h-9 w-full items-center justify-between rounded-md border bg-transparent px-3 py-2 text-sm whitespace-nowrap shadow-sm focus:ring-1 focus:outline-none disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1",e),...n,children:[r,(0,t.jsx)(ek.Icon,{asChild:!0,children:(0,t.jsx)(eT.ChevronDown,{className:"h-4 w-4 opacity-50"})})]}));e_.displayName=ek.Trigger.displayName;let eA=r.forwardRef(({className:e,...r},n)=>(0,t.jsx)(ek.ScrollUpButton,{ref:n,className:(0,eL.cn)("flex cursor-default items-center justify-center py-1",e),...r,children:(0,t.jsx)(eD.ChevronUp,{className:"h-4 w-4"})}));eA.displayName=ek.ScrollUpButton.displayName;let eB=r.forwardRef(({className:e,...r},n)=>(0,t.jsx)(ek.ScrollDownButton,{ref:n,className:(0,eL.cn)("flex cursor-default items-center justify-center py-1",e),...r,children:(0,t.jsx)(eT.ChevronDown,{className:"h-4 w-4"})}));eB.displayName=ek.ScrollDownButton.displayName;let eF=r.forwardRef(({className:e,children:r,position:n="popper",...o},l)=>(0,t.jsx)(ek.Portal,{children:(0,t.jsxs)(ek.Content,{ref:l,className:(0,eL.cn)("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 relative z-50 max-h-96 min-w-[8rem] overflow-hidden rounded-md border shadow-md","popper"===n&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",e),position:n,...o,children:[(0,t.jsx)(eA,{}),(0,t.jsx)(ek.Viewport,{className:(0,eL.cn)("p-1","popper"===n&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),children:r}),(0,t.jsx)(eB,{})]})}));eF.displayName=ek.Content.displayName,r.forwardRef(({className:e,...r},n)=>(0,t.jsx)(ek.Label,{ref:n,className:(0,eL.cn)("px-2 py-1.5 text-sm font-semibold",e),...r})).displayName=ek.Label.displayName;let eO=r.forwardRef(({className:e,children:r,...n},o)=>(0,t.jsxs)(ek.Item,{ref:o,className:(0,eL.cn)("focus:bg-accent focus:text-accent-foreground relative flex w-full cursor-default items-center rounded-sm py-1.5 ps-2 pe-8 text-sm outline-none select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),...n,children:[(0,t.jsx)("span",{className:"absolute end-2 flex h-3.5 w-3.5 items-center justify-center",children:(0,t.jsx)(ek.ItemIndicator,{children:(0,t.jsx)(eI.Check,{className:"h-4 w-4"})})}),(0,t.jsx)(ek.ItemText,{children:r})]}));eO.displayName=ek.Item.displayName,r.forwardRef(({className:e,...r},n)=>(0,t.jsx)(ek.Separator,{ref:n,className:(0,eL.cn)("bg-muted -mx-1 my-1 h-px",e),...r})).displayName=ek.Separator.displayName,e.s(["Select",0,eM,"SelectContent",0,eF,"SelectItem",0,eO,"SelectTrigger",0,e_,"SelectValue",0,eH],47373)},44802,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"BailoutToCSR",{enumerable:!0,get:function(){return o}});let n=e.r(26728);function o({reason:e,children:t}){if("u"<typeof window)throw Object.defineProperty(new n.BailoutToCSRError(e),"__NEXT_ERROR_CODE",{value:"E394",enumerable:!1,configurable:!0});return t}},70399,(e,t,r)=>{"use strict";function n(e){return e.split("/").map(e=>encodeURIComponent(e)).join("/")}Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"encodeURIPath",{enumerable:!0,get:function(){return n}})},77622,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"PreloadChunks",{enumerable:!0,get:function(){return s}});let n=e.r(96871),o=e.r(70309),l=e.r(5474),a=e.r(70399),i=e.r(58349);function s({moduleIds:e}){if("u">typeof window)return null;let t=l.workAsyncStorage.getStore();if(void 0===t)return null;let r=[];if(t.reactLoadableManifest&&e){let n=t.reactLoadableManifest;for(let t of e){if(!n[t])continue;let e=n[t].files;r.push(...e)}}if(0===r.length)return null;let c=(0,i.getAssetTokenQuery)();return(0,n.jsx)(n.Fragment,{children:r.map(e=>{let r=`${t.assetPrefix}/_next/${(0,a.encodeURIPath)(e)}${c}`;return e.endsWith(".css")?(0,n.jsx)("link",{precedence:"dynamic",href:r,rel:"stylesheet",as:"style",nonce:t.nonce},e):((0,o.preload)(r,{as:"script",fetchPriority:"low",nonce:t.nonce}),null)})})}},38762,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"default",{enumerable:!0,get:function(){return c}});let n=e.r(96871),o=e.r(16539),l=e.r(44802),a=e.r(77622);function i(e){return{default:e&&"default"in e?e.default:e}}let s={loader:()=>Promise.resolve(i(()=>null)),loading:null,ssr:!0},c=function(e){let t={...s,...e},r=(0,o.lazy)(()=>t.loader().then(i)),c=t.loading;function d(e){let i=c?(0,n.jsx)(c,{isLoading:!0,pastDelay:!0,error:null}):null,s=!t.ssr||!!t.loading,d=s?o.Suspense:o.Fragment,u=t.ssr?(0,n.jsxs)(n.Fragment,{children:["u"<typeof window?(0,n.jsx)(a.PreloadChunks,{moduleIds:t.modules}):null,(0,n.jsx)(r,{...e})]}):(0,n.jsx)(l.BailoutToCSR,{reason:"next/dynamic",children:(0,n.jsx)(r,{...e})});return(0,n.jsx)(d,{...s?{fallback:i}:{},children:u})}return d.displayName="LoadableComponent",d}},52199,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"default",{enumerable:!0,get:function(){return o}});let n=e.r(81258)._(e.r(38762));function o(e,t){let r={};"function"==typeof e&&(r.loader=e);let o={...r,...t};return(0,n.default)({...o,modules:o.loadableGenerated?.modules})}("function"==typeof r.default||"object"==typeof r.default&&null!==r.default)&&void 0===r.default.__esModule&&(Object.defineProperty(r.default,"__esModule",{value:!0}),Object.assign(r.default,r),t.exports=r.default)},13322,61201,e=>{"use strict";var t=e.i(96871),r=e.i(16539),n=e.i(52199),o=e.i(79561),l=e.i(60112),a=e.i(2287),i=e.i(35364);let s=(0,n.default)(()=>e.A(54625).then(e=>e.FileManager),{loadableGenerated:{modules:[19454]},ssr:!1,loading:()=>(0,t.jsx)(c,{})});function c(){return(0,t.jsx)("div",{className:"flex h-full w-full items-center justify-center",children:(0,t.jsx)(o.LoaderCircle,{className:"text-muted-foreground h-8 w-8 animate-spin"})})}async function d(e){let t=new URLSearchParams;e&&t.set("path",e);let r=await fetch(`/api/directory/list?${t.toString()}`);if(!r.ok)throw Error((await r.json().catch(()=>({error:"Failed to load directory"}))).error??"Failed to load directory");return r.json()}e.s(["ReactFileManagerDialog",0,function({open:e,onOpenChange:n,onSelect:o,initialPath:c}){let[u,p]=(0,r.useState)([]),[f,m]=(0,r.useState)(""),[h,v]=(0,r.useState)(!1),[g,x]=(0,r.useState)(null),y=(0,r.useRef)(!1),w=(0,r.useCallback)(async e=>{v(!0),x(null);try{let t=await d(e);p(t.entries),m(t.currentPath)}catch(t){let e=t instanceof Error?t.message:"Failed to load directory";l.toast.error(e)}finally{v(!1)}},[]);(0,r.useEffect)(()=>{e&&!y.current&&(y.current=!0,w(c)),e||(y.current=!1)},[e,c,w]);let S=(0,r.useCallback)(e=>{let t=e.absolutePath;e.isDirectory&&t&&w(t)},[w]),b=(0,r.useCallback)(e=>{1===e.length&&e[0].isDirectory?x(e[0].absolutePath??null):x(null)},[]);function C(){o(null),n(!1)}return(0,t.jsx)(a.Dialog,{open:e,onOpenChange:e=>{e||C()},children:(0,t.jsxs)(a.DialogContent,{className:"flex h-[95dvh] max-w-[95vw] flex-col",onCloseAutoFocus:e=>e.preventDefault(),children:[(0,t.jsxs)(a.DialogHeader,{children:[(0,t.jsx)(a.DialogTitle,{children:"Select Folder"}),(0,t.jsx)(a.DialogDescription,{className:"truncate font-mono text-xs",children:f||"Loading..."})]}),(0,t.jsx)("div",{className:"shipit-ai-file-manager min-h-0 flex-1 overflow-hidden rounded-md border",children:(0,t.jsx)(s,{files:u.map(e=>({name:e.name,isDirectory:!0,path:`/${e.name}`,absolutePath:e.path,updatedAt:e.updatedAt})),isLoading:h,height:"100%",width:"100%",layout:"list",enableFilePreview:!1,permissions:{upload:!1,delete:!1,create:!1,download:!1,copy:!1,move:!1,rename:!1},onFileOpen:S,onSelectionChange:b,onRefresh:()=>w(f)},f)}),(0,t.jsxs)(a.DialogFooter,{children:[(0,t.jsx)(i.Button,{variant:"outline",onClick:C,children:"Cancel"}),(0,t.jsx)(i.Button,{variant:"secondary",onClick:function(){f&&(o(f),n(!1))},disabled:!f,children:"Select Current Folder"}),(0,t.jsx)(i.Button,{onClick:function(){g&&(o(g),n(!1))},disabled:!g,children:"Select Folder"})]})]})})}],61201),e.s([],13322)},78521,e=>{"use strict";var t=e.i(96976);let r=(0,t.createServerReference)("00531e7c44d61735c837fc77253d091ec7f7d92aca",t.callServer,void 0,t.findSourceMapURL,"pickFolder");async function n(){let e=await r();if(e.error)throw Error(e.error);return e.path}e.s(["pickFolder",0,n],78521)},8791,e=>{"use strict";let t=(0,e.i(54864).default)("git-fork",[["circle",{cx:"12",cy:"18",r:"3",key:"1mpf1b"}],["circle",{cx:"6",cy:"6",r:"3",key:"1lh9wr"}],["circle",{cx:"18",cy:"6",r:"3",key:"1h7g24"}],["path",{d:"M18 9v2c0 .6-.4 1-1 1H7c-.6 0-1-.4-1-1V9",key:"1uq4wg"}],["path",{d:"M12 12v3",key:"158kv8"}]]);e.s(["GitFork",0,t],8791)}]);
@@ -0,0 +1 @@
1
+ (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,41952,e=>{"use strict";var t=e.i(96871),i=e.i(16539),n=e.i(85149),s=e.i(51818),a=e.i(70727),o=e.i(60589),r=e.i(91060),l=e.i(54864);let c=(0,l.default)("bell",[["path",{d:"M10.268 21a2 2 0 0 0 3.464 0",key:"vwvbt9"}],["path",{d:"M3.262 15.326A1 1 0 0 0 4 17h16a1 1 0 0 0 .74-1.673C19.41 13.956 18 12.499 18 8A6 6 0 0 0 6 8c0 4.499-1.411 5.956-2.738 7.326",key:"11g9vi"}]]),d=(0,l.default)("flag",[["path",{d:"M4 22V4a1 1 0 0 1 .4-.8A6 6 0 0 1 8 2c3 0 5 2 7.333 2q2 0 3.067-.8A1 1 0 0 1 20 4v10a1 1 0 0 1-.4.8A6 6 0 0 1 16 16c-3 0-5-2-8-2a6 6 0 0 0-4 1.528",key:"1jaruq"}]]),u=(0,l.default)("database",[["ellipse",{cx:"12",cy:"5",rx:"9",ry:"3",key:"msslwz"}],["path",{d:"M3 5V19A9 3 0 0 0 21 19V5",key:"1wlel7"}],["path",{d:"M3 12A9 3 0 0 0 21 12",key:"mv7ke4"}]]);var g=e.i(99413),h=e.i(85202);let p=(0,l.default)("layout-grid",[["rect",{width:"7",height:"7",x:"3",y:"3",rx:"1",key:"1g98yp"}],["rect",{width:"7",height:"7",x:"14",y:"3",rx:"1",key:"6d4xhi"}],["rect",{width:"7",height:"7",x:"14",y:"14",rx:"1",key:"nxv5o0"}],["rect",{width:"7",height:"7",x:"3",y:"14",rx:"1",key:"1bb6yr"}]]);var m=e.i(60112);e.i(26759);var f=e.i(97164),x=e.i(31777),v=e.i(47373),b=e.i(81846),w=e.i(96976);let y=(0,w.createServerReference)("40c1307357b24ffda8dc75b56558f1a78e79d49cba",w.callServer,void 0,w.findSourceMapURL,"updateSettingsAction");var j=e.i(17406),k=e.i(30342),S=e.i(50579),C=e.i(89048);function M(e){return(0,t.jsx)(S.Code,{className:(0,x.cn)("h-4 w-4",e.className),...e})}function I({className:e}){return(0,t.jsx)(k.default,{src:"/icons/editors/vscode.svg",alt:"VS Code",width:24,height:24,className:(0,x.cn)("rounded-sm object-contain",e)})}function N({className:e}){return(0,t.jsx)(k.default,{src:"/icons/agents/cursor.jpeg",alt:"Cursor",width:24,height:24,className:(0,x.cn)("rounded-sm object-contain",e)})}function T({className:e}){return(0,t.jsx)(k.default,{src:"/icons/editors/windsurf.svg",alt:"Windsurf",width:24,height:24,className:(0,x.cn)("rounded-sm object-contain",e)})}function A({className:e}){return(0,t.jsx)(k.default,{src:"/icons/editors/zed.svg",alt:"Zed",width:24,height:24,className:(0,x.cn)("rounded-sm object-contain",e)})}function D({className:e,...i}){return(0,t.jsx)(C.Rocket,{className:(0,x.cn)("h-4 w-4",e),...i})}I.displayName="VsCodeIcon",N.displayName="CursorEditorIcon",T.displayName="WindsurfIcon",A.displayName="ZedIcon",D.displayName="AntigravityIcon";let P={vscode:I,cursor:N,windsurf:T,zed:A,antigravity:D};var F=e.i(9749),R=e.i(84812),R=R,E=e.i(68637),z=e.i(84735),B=e.i(81481),L=e.i(41957),q=e.i(51911),_=e.i(2828);function K({label:e,description:i,htmlFor:n,tooltip:s,children:a}){let o=s??i;return(0,t.jsxs)("div",{className:"flex items-center justify-between gap-4 border-b py-2.5 last:border-b-0",children:[(0,t.jsxs)("div",{className:"min-w-0",children:[(0,t.jsxs)("span",{className:"flex items-center gap-1.5",children:[(0,t.jsx)(L.Label,{htmlFor:n,className:"cursor-pointer text-sm font-normal whitespace-nowrap",children:e}),o?(0,t.jsxs)(_.Tooltip,{children:[(0,t.jsx)(_.TooltipTrigger,{asChild:!0,children:(0,t.jsx)(B.Info,{className:"text-muted-foreground/40 hover:text-muted-foreground h-3.5 w-3.5 shrink-0 cursor-help transition-colors"})}),(0,t.jsx)(_.TooltipContent,{side:"top",className:"max-w-72 text-xs leading-relaxed",children:o})]}):null]}),i?(0,t.jsx)("p",{className:"text-muted-foreground text-[11px] leading-tight",children:i}):null]}),(0,t.jsx)("div",{className:"flex shrink-0 items-center gap-2",children:a})]})}function O({label:e,description:i,id:n,testId:s,checked:a,onChange:o,disabled:r,tooltip:l}){return(0,t.jsx)(K,{label:e,description:i,htmlFor:n,tooltip:l,children:(0,t.jsx)(q.Switch,{id:n,"data-testid":s,checked:a,onCheckedChange:o,disabled:r,className:(0,x.cn)("cursor-pointer",r&&"cursor-not-allowed opacity-50")})})}function W({icon:e,title:i,description:n,badge:s,testId:a,children:o}){return(0,t.jsxs)("div",{className:"bg-background rounded-lg border","data-testid":a,children:[(0,t.jsxs)("div",{className:"bg-muted/30 border-b px-4 py-3",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(e,{className:"text-muted-foreground h-3.5 w-3.5"}),(0,t.jsx)("h2",{className:"text-sm font-semibold",children:i}),s?(0,t.jsx)("span",{className:"bg-muted text-muted-foreground rounded px-1.5 py-0.5 text-[9px] font-medium tracking-wider uppercase",children:s}):null]}),(0,t.jsx)("p",{className:"text-muted-foreground mt-0.5 text-[11px]",children:n})]}),(0,t.jsx)("div",{className:"px-4",children:o})]})}function H({id:e,testId:i,value:n,onChange:s,onBlur:a,placeholder:o,min:r=1,max:l,step:c=1,suffix:d}){let{t:u}=(0,f.useTranslation)("web"),g=""===n?void 0:parseInt(n,10);return(0,t.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,t.jsxs)("div",{className:"flex items-center overflow-hidden rounded-md border",children:[(0,t.jsx)("button",{type:"button",onClick:()=>{s(String(Math.max(r,(g??parseInt(o,10))-c)))},onMouseUp:a,className:"text-muted-foreground hover:bg-muted hover:text-foreground flex h-8 w-7 cursor-pointer items-center justify-center border-r transition-colors","aria-label":u("common.decrease"),children:(0,t.jsx)(R.default,{className:"h-3 w-3"})}),(0,t.jsx)("input",{id:e,"data-testid":i,type:"text",inputMode:"numeric",pattern:"[0-9]*",value:n,placeholder:o,onChange:e=>{s(e.target.value.replace(/[^0-9]/g,""))},onBlur:a,className:"h-8 w-14 bg-transparent text-center text-xs outline-none"}),(0,t.jsx)("button",{type:"button",onClick:()=>{let e;e=g??parseInt(o,10),s(String(null!=l?Math.min(l,e+c):e+c))},onMouseUp:a,className:"text-muted-foreground hover:bg-muted hover:text-foreground flex h-8 w-7 cursor-pointer items-center justify-center border-l transition-colors","aria-label":u("common.increase"),children:(0,t.jsx)(E.Plus,{className:"h-3 w-3"})})]}),d?(0,t.jsx)("span",{className:"text-muted-foreground text-[11px]",children:d}):null]})}function V({children:e}){return(0,t.jsx)("div",{className:"border-b pt-3 pb-1",children:(0,t.jsx)("span",{className:"text-muted-foreground text-[10px] font-semibold tracking-wider uppercase",children:e})})}function U({children:e,links:i}){return(0,t.jsxs)("div",{className:"hidden pt-2 lg:block",children:[(0,t.jsx)("p",{className:"text-muted-foreground/70 text-[11px] leading-relaxed",children:e}),null!=i&&i.length>0?(0,t.jsx)("div",{className:"mt-2 flex flex-col gap-1",children:i.map(e=>(0,t.jsxs)("a",{href:e.href,target:"_blank",rel:"noopener noreferrer",className:"text-muted-foreground hover:text-foreground inline-flex items-center gap-1 text-[10px] transition-colors",children:[(0,t.jsx)(z.ExternalLink,{className:"h-2.5 w-2.5"}),e.label]},e.href))}):null]})}function G(e){if(""===e)return;let t=parseInt(e,10);return Number.isNaN(t)||t<=0?void 0:t}function $({settings:e}){let{t:n}=(0,f.useTranslation)("web"),[,s]=(0,i.useTransition)(),[a,o]=(0,i.useState)(null!=e.workflow.ciMaxFixAttempts?String(e.workflow.ciMaxFixAttempts):""),[l,c]=(0,i.useState)(null!=e.workflow.ciWatchTimeoutMs?String(Math.round(e.workflow.ciWatchTimeoutMs/1e3)):""),[d,u]=(0,i.useState)(null!=e.workflow.ciLogMaxChars?String(e.workflow.ciLogMaxChars):""),[g,h]=(0,i.useState)(null!=e.workflow.ciWatchPollIntervalSeconds?String(e.workflow.ciWatchPollIntervalSeconds):""),[p,x]=(0,i.useState)(!1!==e.workflow.hideCiStatus),v=null!=e.workflow.ciMaxFixAttempts?String(e.workflow.ciMaxFixAttempts):"",b=null!=e.workflow.ciWatchTimeoutMs?String(Math.round(e.workflow.ciWatchTimeoutMs/1e3)):"",w=null!=e.workflow.ciLogMaxChars?String(e.workflow.ciLogMaxChars):"",j=null!=e.workflow.ciWatchPollIntervalSeconds?String(e.workflow.ciWatchPollIntervalSeconds):"";function k(e){s(async()=>{let t=await y(e);t.success||m.toast.error(t.error??n("settings.failedToSave"))})}function S(e){let t=G(e.ciTimeout??l);return{workflow:{ciMaxFixAttempts:G(e.ciMaxFix??a),ciWatchTimeoutMs:null!=t?1e3*t:void 0,ciLogMaxChars:G(e.ciLogMax??d),ciWatchPollIntervalSeconds:G(e.ciPollInterval??g),hideCiStatus:e.hideCiStatus??p}}}return(0,t.jsxs)(W,{icon:r.Activity,title:n("settings.ci.title"),description:n("settings.ci.description"),testId:"ci-settings-section",children:[(0,t.jsx)(K,{label:n("settings.ci.maxFixAttempts"),description:n("settings.ci.maxFixAttemptsDescription"),htmlFor:"ci-max-fix",children:(0,t.jsx)(H,{id:"ci-max-fix",testId:"ci-max-fix-input",placeholder:"3",value:a,onChange:o,onBlur:()=>{a!==v&&k(S({ciMaxFix:a}))},min:1,max:10})}),(0,t.jsx)(K,{label:n("settings.ci.watchTimeout"),description:n("settings.ci.watchTimeoutDescription"),htmlFor:"ci-timeout",children:(0,t.jsx)(H,{id:"ci-timeout",testId:"ci-timeout-input",placeholder:"300",value:l,onChange:c,onBlur:()=>{l!==b&&k(S({ciTimeout:l}))},min:30,step:30,suffix:"sec"})}),(0,t.jsx)(K,{label:n("settings.ci.maxLogSize"),description:n("settings.ci.maxLogSizeDescription"),htmlFor:"ci-log-max",children:(0,t.jsx)(H,{id:"ci-log-max",testId:"ci-log-max-input",placeholder:"50000",value:d,onChange:u,onBlur:()=>{d!==w&&k(S({ciLogMax:d}))},min:1e3,step:5e3,suffix:"chars"})}),(0,t.jsx)(K,{label:n("settings.ci.pollInterval"),description:n("settings.ci.pollIntervalDescription"),htmlFor:"ci-poll-interval",children:(0,t.jsx)(H,{id:"ci-poll-interval",testId:"ci-poll-interval-input",placeholder:"30",value:g,onChange:h,onBlur:()=>{g!==j&&k(S({ciPollInterval:g}))},min:5,step:5,suffix:"sec"})}),(0,t.jsx)(O,{label:n("settings.ci.hideCiStatus"),description:n("settings.ci.hideCiStatusDescription"),id:"hide-ci-status",testId:"switch-hide-ci-status",checked:p,onChange:e=>{x(e),k(S({hideCiStatus:e}))}})]})}var Z=e.i(27069),X=e.i(91967),Y=e.i(22353),Q=e.i(9413),J=e.i(36567),ee=e.i(75649),et=e.i(9641),ei=e.i(70391),en=e.i(85565),es=e.i(87099),ea=["PageUp","PageDown"],eo=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],er={"from-left":["Home","PageDown","ArrowDown","ArrowLeft"],"from-right":["Home","PageDown","ArrowDown","ArrowRight"],"from-bottom":["Home","PageDown","ArrowDown","ArrowLeft"],"from-top":["Home","PageDown","ArrowUp","ArrowLeft"]},el="Slider",[ec,ed,eu]=(0,es.createCollection)(el),[eg,eh]=(0,Q.createContextScope)(el,[eu]),[ep,em]=eg(el),ef=i.forwardRef((e,n)=>{let{name:s,min:a=0,max:o=100,step:r=1,orientation:l="horizontal",disabled:c=!1,minStepsBetweenThumbs:d=0,defaultValue:u=[a],value:g,onValueChange:h=()=>{},onValueCommit:p=()=>{},inverted:m=!1,form:f,...x}=e,v=i.useRef(new Set),b=i.useRef(0),w="horizontal"===l,[y=[],j]=(0,J.useControllableState)({prop:g,defaultProp:u,onChange:e=>{let t=[...v.current];t[b.current]?.focus(),h(e)}}),k=i.useRef(y);function S(e,t,{commit:i}={commit:!1}){let n,s=(String(r).split(".")[1]||"").length,l=Math.round((Math.round((e-a)/r)*r+a)*(n=Math.pow(10,s)))/n,c=(0,Z.clamp)(l,[a,o]);j((e=[])=>{let n=function(e=[],t,i){let n=[...e];return n[i]=t,n.sort((e,t)=>e-t)}(e,c,t);if(!function(e,t){if(t>0)return Math.min(...e.slice(0,-1).map((t,i)=>e[i+1]-t))>=t;return!0}(n,d*r))return e;{b.current=n.indexOf(c);let t=String(n)!==String(e);return t&&i&&p(n),t?n:e}})}return(0,t.jsx)(ep,{scope:e.__scopeSlider,name:s,disabled:c,min:a,max:o,valueIndexToChangeRef:b,thumbs:v.current,values:y,orientation:l,form:f,children:(0,t.jsx)(ec.Provider,{scope:e.__scopeSlider,children:(0,t.jsx)(ec.Slot,{scope:e.__scopeSlider,children:(0,t.jsx)(w?eb:ew,{"aria-disabled":c,"data-disabled":c?"":void 0,...x,ref:n,onPointerDown:(0,X.composeEventHandlers)(x.onPointerDown,()=>{c||(k.current=y)}),min:a,max:o,inverted:m,onSlideStart:c?void 0:function(e){let t=function(e,t){if(1===e.length)return 0;let i=e.map(e=>Math.abs(e-t)),n=Math.min(...i);return i.indexOf(n)}(y,e);S(e,t)},onSlideMove:c?void 0:function(e){S(e,b.current)},onSlideEnd:c?void 0:function(){let e=k.current[b.current];y[b.current]!==e&&p(y)},onHomeKeyDown:()=>!c&&S(a,0,{commit:!0}),onEndKeyDown:()=>!c&&S(o,y.length-1,{commit:!0}),onStepKeyDown:({event:e,direction:t})=>{if(!c){let i=ea.includes(e.key)||e.shiftKey&&eo.includes(e.key),n=b.current;S(y[n]+r*(i?10:1)*t,n,{commit:!0})}}})})})})});ef.displayName=el;var[ex,ev]=eg(el,{startEdge:"left",endEdge:"right",size:"width",direction:1}),eb=i.forwardRef((e,n)=>{let{min:s,max:a,dir:o,inverted:r,onSlideStart:l,onSlideMove:c,onSlideEnd:d,onStepKeyDown:u,...g}=e,[h,p]=i.useState(null),m=(0,Y.useComposedRefs)(n,e=>p(e)),f=i.useRef(void 0),x=(0,ee.useDirection)(o),v="ltr"===x,b=v&&!r||!v&&r;function w(e){let t=f.current||h.getBoundingClientRect(),i=eD([0,t.width],b?[s,a]:[a,s]);return f.current=t,i(e-t.left)}return(0,t.jsx)(ex,{scope:e.__scopeSlider,startEdge:b?"left":"right",endEdge:b?"right":"left",direction:b?1:-1,size:"width",children:(0,t.jsx)(ey,{dir:x,"data-orientation":"horizontal",...g,ref:m,style:{...g.style,"--radix-slider-thumb-transform":"translateX(-50%)"},onSlideStart:e=>{let t=w(e.clientX);l?.(t)},onSlideMove:e=>{let t=w(e.clientX);c?.(t)},onSlideEnd:()=>{f.current=void 0,d?.()},onStepKeyDown:e=>{let t=er[b?"from-left":"from-right"].includes(e.key);u?.({event:e,direction:t?-1:1})}})})}),ew=i.forwardRef((e,n)=>{let{min:s,max:a,inverted:o,onSlideStart:r,onSlideMove:l,onSlideEnd:c,onStepKeyDown:d,...u}=e,g=i.useRef(null),h=(0,Y.useComposedRefs)(n,g),p=i.useRef(void 0),m=!o;function f(e){let t=p.current||g.current.getBoundingClientRect(),i=eD([0,t.height],m?[a,s]:[s,a]);return p.current=t,i(e-t.top)}return(0,t.jsx)(ex,{scope:e.__scopeSlider,startEdge:m?"bottom":"top",endEdge:m?"top":"bottom",size:"height",direction:m?1:-1,children:(0,t.jsx)(ey,{"data-orientation":"vertical",...u,ref:h,style:{...u.style,"--radix-slider-thumb-transform":"translateY(50%)"},onSlideStart:e=>{let t=f(e.clientY);r?.(t)},onSlideMove:e=>{let t=f(e.clientY);l?.(t)},onSlideEnd:()=>{p.current=void 0,c?.()},onStepKeyDown:e=>{let t=er[m?"from-bottom":"from-top"].includes(e.key);d?.({event:e,direction:t?-1:1})}})})}),ey=i.forwardRef((e,i)=>{let{__scopeSlider:n,onSlideStart:s,onSlideMove:a,onSlideEnd:o,onHomeKeyDown:r,onEndKeyDown:l,onStepKeyDown:c,...d}=e,u=em(el,n);return(0,t.jsx)(en.Primitive.span,{...d,ref:i,onKeyDown:(0,X.composeEventHandlers)(e.onKeyDown,e=>{"Home"===e.key?(r(e),e.preventDefault()):"End"===e.key?(l(e),e.preventDefault()):ea.concat(eo).includes(e.key)&&(c(e),e.preventDefault())}),onPointerDown:(0,X.composeEventHandlers)(e.onPointerDown,e=>{let t=e.target;t.setPointerCapture(e.pointerId),e.preventDefault(),u.thumbs.has(t)?t.focus():s(e)}),onPointerMove:(0,X.composeEventHandlers)(e.onPointerMove,e=>{e.target.hasPointerCapture(e.pointerId)&&a(e)}),onPointerUp:(0,X.composeEventHandlers)(e.onPointerUp,e=>{let t=e.target;t.hasPointerCapture(e.pointerId)&&(t.releasePointerCapture(e.pointerId),o(e))})})}),ej="SliderTrack",ek=i.forwardRef((e,i)=>{let{__scopeSlider:n,...s}=e,a=em(ej,n);return(0,t.jsx)(en.Primitive.span,{"data-disabled":a.disabled?"":void 0,"data-orientation":a.orientation,...s,ref:i})});ek.displayName=ej;var eS="SliderRange",eC=i.forwardRef((e,n)=>{let{__scopeSlider:s,...a}=e,o=em(eS,s),r=ev(eS,s),l=i.useRef(null),c=(0,Y.useComposedRefs)(n,l),d=o.values.length,u=o.values.map(e=>eA(e,o.min,o.max)),g=d>1?Math.min(...u):0,h=100-Math.max(...u);return(0,t.jsx)(en.Primitive.span,{"data-orientation":o.orientation,"data-disabled":o.disabled?"":void 0,...a,ref:c,style:{...e.style,[r.startEdge]:g+"%",[r.endEdge]:h+"%"}})});eC.displayName=eS;var eM="SliderThumb",eI=i.forwardRef((e,n)=>{let s=ed(e.__scopeSlider),[a,o]=i.useState(null),r=(0,Y.useComposedRefs)(n,e=>o(e)),l=i.useMemo(()=>a?s().findIndex(e=>e.ref.current===a):-1,[s,a]);return(0,t.jsx)(eN,{...e,ref:r,index:l})}),eN=i.forwardRef((e,n)=>{var s,a,o,r,l;let c,d,{__scopeSlider:u,index:g,name:h,...p}=e,m=em(eM,u),f=ev(eM,u),[x,v]=i.useState(null),b=(0,Y.useComposedRefs)(n,e=>v(e)),w=!x||m.form||!!x.closest("form"),y=(0,ei.useSize)(x),j=m.values[g],k=void 0===j?0:eA(j,m.min,m.max),S=(s=g,(a=m.values.length)>2?`Value ${s+1} of ${a}`:2===a?["Minimum","Maximum"][s]:void 0),C=y?.[f.size],M=C?(o=C,r=k,l=f.direction,d=eD([0,50],[0,c=o/2]),(c-d(r)*l)*l):0;return i.useEffect(()=>{if(x)return m.thumbs.add(x),()=>{m.thumbs.delete(x)}},[x,m.thumbs]),(0,t.jsxs)("span",{style:{transform:"var(--radix-slider-thumb-transform)",position:"absolute",[f.startEdge]:`calc(${k}% + ${M}px)`},children:[(0,t.jsx)(ec.ItemSlot,{scope:e.__scopeSlider,children:(0,t.jsx)(en.Primitive.span,{role:"slider","aria-label":e["aria-label"]||S,"aria-valuemin":m.min,"aria-valuenow":j,"aria-valuemax":m.max,"aria-orientation":m.orientation,"data-orientation":m.orientation,"data-disabled":m.disabled?"":void 0,tabIndex:m.disabled?void 0:0,...p,ref:b,style:void 0===j?{display:"none"}:e.style,onFocus:(0,X.composeEventHandlers)(e.onFocus,()=>{m.valueIndexToChangeRef.current=g})})}),w&&(0,t.jsx)(eT,{name:h??(m.name?m.name+(m.values.length>1?"[]":""):void 0),form:m.form,value:j},g)]})});eI.displayName=eM;var eT=i.forwardRef(({__scopeSlider:e,value:n,...s},a)=>{let o=i.useRef(null),r=(0,Y.useComposedRefs)(o,a),l=(0,et.usePrevious)(n);return i.useEffect(()=>{let e=o.current;if(!e)return;let t=Object.getOwnPropertyDescriptor(window.HTMLInputElement.prototype,"value").set;if(l!==n&&t){let i=new Event("input",{bubbles:!0});t.call(e,n),e.dispatchEvent(i)}},[l,n]),(0,t.jsx)(en.Primitive.input,{style:{display:"none"},...s,ref:r,defaultValue:n})});function eA(e,t,i){return(0,Z.clamp)(100/(i-t)*(e-t),[0,100])}function eD(e,t){return i=>{if(e[0]===e[1]||t[0]===t[1])return t[0];let n=(t[1]-t[0])/(e[1]-e[0]);return t[0]+n*(i-e[0])}}eT.displayName="RadioBubbleInput",e.s(["Range",0,eC,"Root",0,ef,"Slider",0,ef,"SliderRange",0,eC,"SliderThumb",0,eI,"SliderTrack",0,ek,"Thumb",0,eI,"Track",0,ek,"createSliderScope",0,eh],98207);var eP=e.i(98207),eP=eP;function eF({className:e,defaultValue:n,value:s,min:a=0,max:o=100,...r}){let l=i.useMemo(()=>Array.isArray(s)?s:Array.isArray(n)?n:[a,o],[s,n,a,o]);return(0,t.jsxs)(eP.Root,{"data-slot":"slider",defaultValue:n,value:s,min:a,max:o,className:(0,x.cn)("relative flex w-full touch-none items-center select-none data-[disabled]:opacity-50 data-[orientation=vertical]:h-full data-[orientation=vertical]:min-h-44 data-[orientation=vertical]:w-auto data-[orientation=vertical]:flex-col",e),...r,children:[(0,t.jsx)(eP.Track,{"data-slot":"slider-track",className:(0,x.cn)("bg-muted relative grow overflow-hidden rounded-full data-[orientation=horizontal]:h-1.5 data-[orientation=horizontal]:w-full data-[orientation=vertical]:h-full data-[orientation=vertical]:w-1.5"),children:(0,t.jsx)(eP.Range,{"data-slot":"slider-range",className:(0,x.cn)("bg-primary absolute data-[orientation=horizontal]:h-full data-[orientation=vertical]:w-full")})}),Array.from({length:l.length},(e,i)=>(0,t.jsx)(eP.Thumb,{"data-slot":"slider-thumb",className:"border-primary ring-ring/50 block size-4 shrink-0 rounded-full border bg-white shadow-sm transition-[color,box-shadow] hover:ring-4 focus-visible:ring-4 focus-visible:outline-hidden disabled:pointer-events-none disabled:opacity-50"},i))]})}let eR=[60,120,300,600,900,1800,2700,3600,7200,10800,14400,21600,28800,43200,86400],eE=eR.length-1;function ez(e){let t=0,i=Math.abs(e-eR[0]);for(let n=1;n<eR.length;n++){let s=Math.abs(e-eR[n]);s<i&&(i=s,t=n)}return t}function eB({id:e,testId:n,value:s,onChange:a,onBlur:o,defaultSeconds:r=1800}){var l;let c,d,u=(""===s?r:parseInt(s,10))||r,[g,h]=(0,i.useState)(()=>ez(u)),p=ez(u);p!==g&&eR[g]!==u&&h(p);let m=(0,i.useCallback)(([e])=>{h(e),a(String(eR[e]))},[a]);return(0,t.jsxs)("div",{className:"flex w-55 items-center gap-2",children:[(0,t.jsx)(eF,{id:e,"data-testid":n,min:0,max:eE,step:1,value:[g],onValueChange:m,onValueCommit:()=>o(),className:"min-w-0 flex-1"}),(0,t.jsx)("span",{className:"text-muted-foreground shrink-0 text-end text-xs tabular-nums",children:(c=Math.floor((l=eR[g])/3600),d=Math.round(l%3600/60),0===c?`${d}m`:0===d?`${c}h`:`${c}h ${d}m`)})]})}function eL(e){if(void 0===e)return;let t=function(e){if(""===e)return;let t=parseInt(e,10);return Number.isNaN(t)||t<=0?void 0:t}(e);return null!=t?1e3*t:void 0}function eq({settings:e}){let{t:n}=(0,f.useTranslation)("web"),[,s]=(0,i.useTransition)(),a=e.workflow.stageTimeouts,o=e.workflow.analyzeRepoTimeouts,[r,l]=(0,i.useState)(String(Math.round((a?.analyzeMs??18e5)/1e3))),[c,d]=(0,i.useState)(String(Math.round((a?.requirementsMs??18e5)/1e3))),[u,h]=(0,i.useState)(String(Math.round((a?.researchMs??18e5)/1e3))),[p,x]=(0,i.useState)(String(Math.round((a?.planMs??18e5)/1e3))),[v,b]=(0,i.useState)(String(Math.round((a?.implementMs??18e5)/1e3))),[w,j]=(0,i.useState)(String(Math.round((a?.mergeMs??18e5)/1e3))),[k,S]=(0,i.useState)(String(Math.round((o?.analyzeMs??6e5)/1e3))),C=a?.analyzeMs!=null?String(Math.round(a.analyzeMs/1e3)):"",M=a?.requirementsMs!=null?String(Math.round(a.requirementsMs/1e3)):"",I=a?.researchMs!=null?String(Math.round(a.researchMs/1e3)):"",N=a?.planMs!=null?String(Math.round(a.planMs/1e3)):"",T=a?.implementMs!=null?String(Math.round(a.implementMs/1e3)):"",A=a?.mergeMs!=null?String(Math.round(a.mergeMs/1e3)):"",D=o?.analyzeMs!=null?String(Math.round(o.analyzeMs/1e3)):"";function P(e){return{workflow:{stageTimeouts:{analyzeMs:eL(e.analyzeTimeout??r),requirementsMs:eL(e.requirementsTimeout??c),researchMs:eL(e.researchTimeout??u),planMs:eL(e.planTimeout??p),implementMs:eL(e.implementTimeout??v),mergeMs:eL(e.mergeTimeout??w)},analyzeRepoTimeouts:{analyzeMs:eL(e.analyzeRepoTimeout??k)}}}}function F(e){s(async()=>{let t=await y(e);t.success||m.toast.error(t.error??n("settings.failedToSave"))})}return(0,t.jsxs)(W,{icon:g.Timer,title:n("settings.stageTimeouts.title"),description:n("settings.stageTimeouts.description"),testId:"stage-timeouts-settings-section",children:[(0,t.jsx)(V,{children:n("settings.stageTimeouts.subsections.featureAgent")}),(0,t.jsx)(K,{label:n("settings.stageTimeouts.analyze"),description:n("settings.stageTimeouts.analyzeDescription"),htmlFor:"timeout-analyze",children:(0,t.jsx)(eB,{id:"timeout-analyze",testId:"timeout-analyze-input",value:r,onChange:l,onBlur:()=>{r!==C&&F(P({analyzeTimeout:r}))},defaultSeconds:1800})}),(0,t.jsx)(K,{label:n("settings.stageTimeouts.requirements"),description:n("settings.stageTimeouts.requirementsDescription"),htmlFor:"timeout-requirements",children:(0,t.jsx)(eB,{id:"timeout-requirements",testId:"timeout-requirements-input",value:c,onChange:d,onBlur:()=>{c!==M&&F(P({requirementsTimeout:c}))},defaultSeconds:1800})}),(0,t.jsx)(K,{label:n("settings.stageTimeouts.research"),description:n("settings.stageTimeouts.researchDescription"),htmlFor:"timeout-research",children:(0,t.jsx)(eB,{id:"timeout-research",testId:"timeout-research-input",value:u,onChange:h,onBlur:()=>{u!==I&&F(P({researchTimeout:u}))},defaultSeconds:1800})}),(0,t.jsx)(K,{label:n("settings.stageTimeouts.plan"),description:n("settings.stageTimeouts.planDescription"),htmlFor:"timeout-plan",children:(0,t.jsx)(eB,{id:"timeout-plan",testId:"timeout-plan-input",value:p,onChange:x,onBlur:()=>{p!==N&&F(P({planTimeout:p}))},defaultSeconds:1800})}),(0,t.jsx)(K,{label:n("settings.stageTimeouts.implement"),description:n("settings.stageTimeouts.implementDescription"),htmlFor:"timeout-implement",children:(0,t.jsx)(eB,{id:"timeout-implement",testId:"timeout-implement-input",value:v,onChange:b,onBlur:()=>{v!==T&&F(P({implementTimeout:v}))},defaultSeconds:1800})}),(0,t.jsx)(K,{label:n("settings.stageTimeouts.merge"),description:n("settings.stageTimeouts.mergeDescription"),htmlFor:"timeout-merge",children:(0,t.jsx)(eB,{id:"timeout-merge",testId:"timeout-merge-input",value:w,onChange:j,onBlur:()=>{w!==A&&F(P({mergeTimeout:w}))},defaultSeconds:1800})}),(0,t.jsx)(V,{children:n("settings.stageTimeouts.subsections.analyzeRepoAgent")}),(0,t.jsx)(K,{label:n("settings.stageTimeouts.analyze"),description:n("settings.stageTimeouts.analyzeDescription"),htmlFor:"timeout-analyze-repo",children:(0,t.jsx)(eB,{id:"timeout-analyze-repo",testId:"timeout-analyze-repo-input",value:k,onChange:S,onBlur:()=>{k!==D&&F(P({analyzeRepoTimeout:k}))},defaultSeconds:600})})]})}function e_({settings:e}){let{t:n}=(0,f.useTranslation)("web"),[,s]=(0,i.useTransition)(),a=e.interactiveAgent??{enabled:!0,autoTimeoutMinutes:15,maxConcurrentSessions:3},[o,r]=(0,i.useState)(a.enabled),[l,c]=(0,i.useState)(String(a.autoTimeoutMinutes)),[d,u]=(0,i.useState)(String(a.maxConcurrentSessions));function g(e){s(async()=>{let t=await y(e);t.success||m.toast.error(t.error??n("settings.failedToSave"))})}return(0,t.jsxs)(W,{icon:h.MessageSquare,title:n("settings.interactiveAgent.title"),description:n("settings.interactiveAgent.description"),testId:"interactive-agent-settings-section",children:[(0,t.jsx)(O,{label:n("settings.interactiveAgent.enableChatTab"),description:n("settings.interactiveAgent.enableChatTabDescription"),id:"interactive-agent-enabled",testId:"switch-interactive-agent-enabled",checked:o,onChange:e=>{r(e),g({interactiveAgent:{enabled:e,autoTimeoutMinutes:parseInt(l,10)||15,maxConcurrentSessions:parseInt(d,10)||3}})}}),(0,t.jsx)(K,{label:n("settings.interactiveAgent.autoTimeout"),description:n("settings.interactiveAgent.autoTimeoutDescription"),htmlFor:"interactive-agent-timeout",children:(0,t.jsx)(H,{id:"interactive-agent-timeout",testId:"input-interactive-agent-timeout",value:l,placeholder:"15",min:1,max:120,suffix:"min",onChange:c,onBlur:()=>{let e=parseInt(l,10),t=Number.isNaN(e)?15:Math.min(120,Math.max(1,e));c(String(t)),g({interactiveAgent:{enabled:o,autoTimeoutMinutes:t,maxConcurrentSessions:parseInt(d,10)||3}})}})}),(0,t.jsx)(K,{label:n("settings.interactiveAgent.maxConcurrentSessions"),description:n("settings.interactiveAgent.maxConcurrentSessionsDescription"),htmlFor:"interactive-agent-sessions",children:(0,t.jsx)(H,{id:"interactive-agent-sessions",testId:"input-interactive-agent-sessions",value:d,placeholder:"3",min:1,max:10,onChange:u,onBlur:()=>{let e=parseInt(d,10),t=Number.isNaN(e)?3:Math.min(10,Math.max(1,e));u(String(t)),g({interactiveAgent:{enabled:o,autoTimeoutMinutes:parseInt(l,10)||15,maxConcurrentSessions:t}})}})})]})}function eK({settings:e}){let{t:n}=(0,f.useTranslation)("web"),[,s]=(0,i.useTransition)(),a=e.fabLayout??{swapPosition:!1},[o,r]=(0,i.useState)(a.swapPosition);return(0,t.jsx)(W,{icon:p,title:n("settings.fabLayout.title"),description:n("settings.fabLayout.description"),testId:"fab-layout-settings-section",children:(0,t.jsx)(O,{label:n("settings.fabLayout.swapPosition"),description:n("settings.fabLayout.swapPositionDescription"),id:"fab-swap-position",testId:"switch-fab-swap-position",checked:o,onChange:e=>{var t;r(e),t={fabLayout:{swapPosition:e}},s(async()=>{let e=await y(t);e.success||m.toast.error(e.error??n("settings.failedToSave"))})}})})}let eO=[{id:"vscode",name:"VS Code",available:!0},{id:"cursor",name:"Cursor",available:!0},{id:"windsurf",name:"Windsurf",available:!0},{id:"zed",name:"Zed",available:!0},{id:"antigravity",name:"Antigravity",available:!0}],eW=[{id:"bash",name:"Bash",available:!0},{id:"zsh",name:"Zsh",available:!0},{id:"fish",name:"Fish",available:!0}],eH=[{id:"agent",labelKey:"settings.sections.agent",icon:s.Bot},{id:"environment",labelKey:"settings.sections.environment",icon:a.Terminal},{id:"workflow",labelKey:"settings.sections.workflow",icon:o.GitBranch},{id:"ci",labelKey:"settings.sections.ci",icon:r.Activity},{id:"stage-timeouts",labelKey:"settings.sections.timeouts",icon:g.Timer},{id:"notifications",labelKey:"settings.sections.notifications",icon:c},{id:"feature-flags",labelKey:"settings.sections.flags",icon:d},{id:"interactive-agent",labelKey:"settings.sections.chat",icon:h.MessageSquare},{id:"fab-layout",labelKey:"settings.sections.layout",icon:p},{id:"database",labelKey:"settings.sections.database",icon:u}];e.s(["SettingsPageClient",0,function({settings:e,shipitAiHome:r,dbFileSize:l,availableTerminals:g,availableEditors:h,availableShells:p}){let{t:w}=(0,f.useTranslation)("web"),{showSaving:k,showSaved:S,save:C}=function(){let{t:e}=(0,f.useTranslation)("web"),[t,n]=(0,i.useTransition)(),[s,a]=(0,i.useState)(!1),[o,r]=(0,i.useState)(!1),l=(0,i.useRef)(null),c=(0,i.useRef)(!1);return(0,i.useEffect)(()=>{t&&!s&&(a(!0),c.current=!1,l.current=setTimeout(()=>{l.current=null,c.current&&(a(!1),r(!0),setTimeout(()=>r(!1),2e3))},350)),!t&&s&&(c.current=!0,l.current||(a(!1),r(!0),setTimeout(()=>r(!1),2e3)))},[t,s]),{showSaving:s,showSaved:o,save:(0,i.useCallback)(t=>{n(async()=>{let i=await y(t);i.success||m.toast.error(i.error??e("settings.failedToSave"))})},[n,e])}}(),I=e.featureFlags??{skills:!1,envDeploy:!1,debug:!1,githubImport:!1,adoptBranch:!1,gitRebaseSync:!1,reactFileManager:!1},[N,T]=(0,i.useState)(e.agent.type),[A,D]=(0,i.useState)(e.environment.defaultEditor),[R,E]=(0,i.useState)(e.environment.shellPreference),[z,B]=(0,i.useState)(e.environment.terminalPreference??j.TerminalType.System),L=g??[{id:j.TerminalType.System,name:w("settings.environment.systemTerminal"),available:!0}],[q,_]=(0,i.useState)(e.workflow.openPrOnImplementationComplete),[G,Z]=(0,i.useState)(e.workflow.approvalGateDefaults.pushOnImplementationComplete),[X,Y]=(0,i.useState)(e.workflow.approvalGateDefaults.allowPrd),[Q,J]=(0,i.useState)(e.workflow.approvalGateDefaults.allowPlan),[ee,et]=(0,i.useState)(e.workflow.approvalGateDefaults.allowMerge),[ei,en]=(0,i.useState)(e.workflow.enableEvidence),[es,ea]=(0,i.useState)(e.workflow.commitEvidence),[eo,er]=(0,i.useState)(!1!==e.workflow.ciWatchEnabled),[el,ec]=(0,i.useState)(!1!==e.workflow.defaultFastMode),[ed,eu]=(0,i.useState)((e.workflow.autoArchiveDelayMinutes??10)>0),[eg,eh]=(0,i.useState)(String(e.workflow.autoArchiveDelayMinutes??10)),[ep,em]=(0,i.useState)(e.notifications.inApp.enabled),[ef,ex]=(0,i.useState)({...e.notifications.events}),[ev,eb]=(0,i.useState)({...I});function ew(e={}){let t=e.autoArchiveEnabled??ed,i=parseInt(e.autoArchiveDelay??eg,10);return{workflow:{openPrOnImplementationComplete:e.openPr??q,approvalGateDefaults:{pushOnImplementationComplete:e.pushOnComplete??G,allowPrd:e.allowPrd??X,allowPlan:e.allowPlan??Q,allowMerge:e.allowMerge??ee},enableEvidence:e.enableEvidence??ei,commitEvidence:e.commitEvidence??es,ciWatchEnabled:e.ciWatchEnabled??eo,defaultFastMode:e.defaultFastMode??el,autoArchiveDelayMinutes:t?Number.isNaN(i)||i<1?10:i:0}}}function ey(e={}){return{notifications:{inApp:{enabled:e.inApp??ep},events:e.events??ef}}}let[ej,ek]=(0,i.useState)("agent");(0,i.useEffect)(()=>{let e=eH.map(e=>document.getElementById(`section-${e.id}`)).filter(Boolean);if(0===e.length)return;let t=new IntersectionObserver(e=>{for(let t of e)t.isIntersecting&&ek(t.target.id.replace("section-",""))},{rootMargin:"-65px 0px -60% 0px",threshold:0});for(let i of e)t.observe(i);return()=>t.disconnect()},[]);let eS=(0,i.useCallback)(e=>{let t=document.getElementById(`section-${e}`);t&&(t.scrollIntoView({behavior:"smooth",block:"start"}),t.style.animation="none",t.offsetHeight,t.style.animation="section-flash 1s ease-out")},[]);return(0,t.jsxs)("div",{"data-testid":"settings-page-client",className:"max-w-5xl px-8 pt-8",children:[(0,t.jsxs)("div",{className:"bg-background/95 supports-backdrop-filter:bg-background/80 sticky top-0 z-10 pb-4 backdrop-blur",children:[(0,t.jsxs)("div",{className:"mb-4 space-y-1.5",children:[(0,t.jsx)("span",{className:"text-[10px] font-bold tracking-[0.2em] text-slate-400 uppercase",children:"Developer Portal"}),(0,t.jsxs)("div",{className:"flex items-baseline gap-3",children:[(0,t.jsx)("h1",{className:"text-foreground text-3xl font-black tracking-tight",children:w("settings.title")}),(0,t.jsxs)("span",{className:"relative h-4 w-16",children:[(0,t.jsx)("span",{className:(0,x.cn)("text-muted-foreground absolute inset-0 flex items-center text-xs transition-opacity duration-300",k?"opacity-100":"opacity-0"),children:w("settings.saving")}),(0,t.jsxs)("span",{className:(0,x.cn)("absolute inset-0 flex items-center gap-1 text-xs text-green-600 transition-opacity duration-300",S&&!k?"opacity-100":"opacity-0"),children:[(0,t.jsx)(n.Check,{className:"h-3 w-3"}),w("settings.saved")]})]})]})]}),(0,t.jsx)("nav",{className:"bg-card editorial-shadow flex flex-wrap items-center gap-0.5 rounded-lg p-1",children:eH.map(e=>{let i=e.icon,n=ej===e.id;return(0,t.jsxs)("button",{type:"button",onClick:()=>eS(e.id),className:(0,x.cn)("flex cursor-pointer items-center gap-1 rounded-md px-2 py-1.5 text-[11px] font-bold transition-all",n?"bg-muted text-primary shadow-sm ring-1 ring-slate-200/70 dark:ring-slate-700/50":"text-muted-foreground hover:text-foreground hover:bg-accent/50"),children:[(0,t.jsx)(i,{className:"h-3 w-3"}),(0,t.jsx)("span",{className:"hidden sm:inline",children:w(e.labelKey)})]},e.id)})})]}),(0,t.jsxs)("div",{className:"flex flex-col gap-3",children:[(0,t.jsxs)("div",{id:"section-agent",className:"grid scroll-mt-18 grid-cols-1 gap-x-5 rounded-lg lg:grid-cols-[1fr_280px]",children:[(0,t.jsx)(W,{icon:s.Bot,title:w("settings.agent.sectionTitle"),description:w("settings.agent.sectionDescription"),testId:"agent-settings-section",children:(0,t.jsx)(K,{label:w("settings.agent.agentAndModel"),description:w("settings.agent.agentAndModelDescription"),tooltip:"Changing the agent switches which AI CLI tool runs your features. Each agent has different capabilities, speed, and cost tradeoffs.",htmlFor:"agent-model-picker",children:(0,t.jsx)(F.AgentModelPicker,{initialAgentType:N,initialModel:e.models.default,mode:"settings",onAgentModelChange:e=>T(e),className:"w-55"})})}),(0,t.jsx)(U,{links:[{label:w("settings.agent.links.agentSystem"),href:"https://github.com/jrmatherly/shipit/blob/main/docs/architecture/agent-system.md"},{label:w("settings.agent.links.addingAgents"),href:"https://github.com/jrmatherly/shipit/blob/main/docs/development/adding-agents.md"},{label:w("settings.agent.links.configurationGuide"),href:"https://github.com/jrmatherly/shipit/blob/main/docs/guides/configuration.md"}],children:w("settings.agent.hint")})]}),(0,t.jsxs)("div",{id:"section-environment",className:"grid scroll-mt-18 grid-cols-1 gap-x-5 rounded-lg lg:grid-cols-[1fr_280px]",children:[(0,t.jsxs)(W,{icon:a.Terminal,title:w("settings.environment.sectionTitle"),description:w("settings.environment.sectionDescription"),testId:"environment-settings-section",children:[(0,t.jsx)(K,{label:w("settings.environment.defaultEditor"),description:w("settings.environment.defaultEditorDescription"),tooltip:"The editor that opens when you click 'Launch' on a tool card or when ShipIT needs to open a file for review.",htmlFor:"default-editor",children:(0,t.jsxs)(v.Select,{value:A,onValueChange:e=>{D(e),C({environment:{defaultEditor:e,shellPreference:R,terminalPreference:z}})},children:[(0,t.jsx)(v.SelectTrigger,{id:"default-editor","data-testid":"editor-select",className:"w-64 cursor-pointer text-xs",children:(0,t.jsx)(v.SelectValue,{})}),(0,t.jsx)(v.SelectContent,{children:(h??eO).map(e=>{var i;let n=(i=e.id)&&i in P?P[i]:M;return(0,t.jsx)(v.SelectItem,{value:e.id,disabled:!e.available,children:(0,t.jsxs)("span",{className:"flex items-center gap-2 text-xs",children:[(0,t.jsx)(n,{className:"h-4 w-4 shrink-0"}),e.name,(0,t.jsx)(b.Badge,{variant:"outline",className:(0,x.cn)("ml-auto px-1.5 py-0 text-[10px] leading-4 font-normal",e.available?"border-emerald-500/30 text-emerald-500":"border-muted-foreground/30 text-muted-foreground"),children:e.available?"Installed":"Not Installed"})]})},e.id)})})]})}),(0,t.jsx)(K,{label:w("settings.environment.shell"),description:w("settings.environment.shellDescription"),tooltip:"Controls which shell runs generated scripts like install commands and git operations. Match this to your daily driver shell.",htmlFor:"shell-preference",children:(0,t.jsxs)(v.Select,{value:R,onValueChange:e=>{E(e),C({environment:{defaultEditor:A,shellPreference:e,terminalPreference:z}})},children:[(0,t.jsx)(v.SelectTrigger,{id:"shell-preference","data-testid":"shell-select",className:"w-64 cursor-pointer text-xs",children:(0,t.jsx)(v.SelectValue,{})}),(0,t.jsx)(v.SelectContent,{children:(p??eW).map(e=>(0,t.jsx)(v.SelectItem,{value:e.id,disabled:!e.available,children:(0,t.jsxs)("span",{className:"flex items-center gap-2 text-xs",children:[e.name,(0,t.jsx)(b.Badge,{variant:"outline",className:(0,x.cn)("ml-auto px-1.5 py-0 text-[10px] leading-4 font-normal",e.available?"border-emerald-500/30 text-emerald-500":"border-muted-foreground/30 text-muted-foreground"),children:e.available?"Installed":"Not Installed"})]})},e.id))})]})}),(0,t.jsx)(K,{label:w("settings.environment.terminal"),description:w("settings.environment.terminalDescription"),tooltip:"The terminal emulator launched when opening shell sessions from the web UI. Only affects web-launched terminals, not CLI usage.",htmlFor:"terminal-preference",children:(0,t.jsxs)(v.Select,{value:z,onValueChange:e=>{B(e),C({environment:{defaultEditor:A,shellPreference:R,terminalPreference:e}})},children:[(0,t.jsx)(v.SelectTrigger,{id:"terminal-preference","data-testid":"terminal-select",className:"w-64 cursor-pointer text-xs",children:(0,t.jsx)(v.SelectValue,{})}),(0,t.jsx)(v.SelectContent,{children:L.map(e=>(0,t.jsx)(v.SelectItem,{value:e.id,disabled:!e.available,children:(0,t.jsxs)("span",{className:"flex items-center gap-2 text-xs",children:[e.name,(0,t.jsx)(b.Badge,{variant:"outline",className:(0,x.cn)("ml-auto px-1.5 py-0 text-[10px] leading-4 font-normal",e.available?"border-emerald-500/30 text-emerald-500":"border-muted-foreground/30 text-muted-foreground"),children:e.available?"Installed":"Not Installed"})]})},e.id))})]})})]}),(0,t.jsx)(U,{links:[{label:w("settings.environment.links.configurationGuide"),href:"https://github.com/jrmatherly/shipit/blob/main/docs/guides/configuration.md"}],children:w("settings.environment.hint")})]}),(0,t.jsxs)("div",{id:"section-workflow",className:"grid scroll-mt-18 grid-cols-1 gap-x-5 rounded-lg lg:grid-cols-[1fr_280px]",children:[(0,t.jsxs)(W,{icon:o.GitBranch,title:w("settings.workflow.title"),description:w("settings.workflow.sectionDescription"),testId:"workflow-settings-section",children:[(0,t.jsx)(O,{label:w("settings.workflow.defaultFastMode"),description:w("settings.workflow.defaultFastModeDescription"),tooltip:"When enabled, new features skip the PRD and Plan phases and go straight to implementation. Useful for quick fixes, risky for complex features.",id:"default-fast-mode",testId:"switch-default-fast-mode",checked:el,onChange:e=>{ec(e),C(ew({defaultFastMode:e}))}}),(0,t.jsx)(V,{children:w("settings.workflow.subsections.approve")}),(0,t.jsx)(O,{label:w("settings.workflow.autoApprovePrd"),description:w("settings.workflow.autoApprovePrdDescription"),tooltip:"Automatically approves the requirements document without pausing for your review. Saves time but you lose the chance to refine requirements before planning.",id:"allow-prd",testId:"switch-allow-prd",checked:X,onChange:e=>{Y(e),C(ew({allowPrd:e}))}}),(0,t.jsx)(O,{label:w("settings.workflow.autoApprovePlan"),description:w("settings.workflow.autoApprovePlanDescription"),tooltip:"Automatically approves the implementation plan. The agent proceeds to coding without waiting for your plan review.",id:"allow-plan",testId:"switch-allow-plan",checked:Q,onChange:e=>{J(e),C(ew({allowPlan:e}))}}),(0,t.jsx)(O,{label:w("settings.workflow.autoApproveMerge"),description:w("settings.workflow.autoApproveMergeDescription"),tooltip:"Automatically merges the PR after implementation without requiring your final review. Use with caution on production branches.",id:"allow-merge",testId:"switch-allow-merge",checked:ee,onChange:e=>{et(e),C(ew({allowMerge:e}))}}),(0,t.jsx)(V,{children:w("settings.workflow.subsections.evidence")}),(0,t.jsx)(O,{label:w("settings.workflow.collectEvidence"),description:w("settings.workflow.collectEvidenceDescription"),tooltip:"Captures screenshots and test outputs during implementation as proof of work. Useful for audit trails and PR documentation.",id:"enable-evidence",testId:"switch-enable-evidence",checked:ei,onChange:e=>{en(e),e?C(ew({enableEvidence:e})):(ea(!1),C(ew({enableEvidence:e,commitEvidence:!1})))}}),(0,t.jsx)(O,{label:w("settings.workflow.addEvidenceToPr"),description:w("settings.workflow.addEvidenceToPrDescription"),tooltip:"Attaches collected evidence artifacts (screenshots, logs) directly to the pull request description.",id:"commit-evidence",testId:"switch-commit-evidence",checked:es,disabled:!ei||!q,onChange:e=>{ea(e),C(ew({commitEvidence:e}))}}),(0,t.jsx)(V,{children:w("settings.workflow.subsections.git")}),(0,t.jsx)(O,{label:w("settings.workflow.pushOnComplete"),description:w("settings.workflow.pushOnCompleteDescription"),tooltip:"Automatically pushes the implementation branch to the remote repository when the agent finishes coding.",id:"push-on-complete",testId:"switch-push-on-complete",checked:G,onChange:e=>{Z(e),C(ew({pushOnComplete:e}))}}),(0,t.jsx)(O,{label:w("settings.workflow.openPrOnComplete"),description:w("settings.workflow.openPrOnCompleteDescription"),tooltip:"Creates a pull request automatically after pushing. Combined with push-on-complete, this fully automates the delivery pipeline.",id:"open-pr",testId:"switch-open-pr",checked:q,onChange:e=>{_(e),e?C(ew({openPr:e})):(ea(!1),C(ew({openPr:e,commitEvidence:!1})))}}),(0,t.jsx)(O,{label:w("settings.workflow.watchCiAfterPush"),description:w("settings.workflow.watchCiAfterPushDescription"),tooltip:"Monitors CI/CD pipeline status after pushing and can attempt fixes if tests fail. Disable if you prefer to handle CI failures manually.",id:"ci-watch-enabled",testId:"switch-ci-watch-enabled",checked:eo,onChange:e=>{er(e),C(ew({ciWatchEnabled:e}))}}),(0,t.jsx)(V,{children:"Archive"}),(0,t.jsx)(O,{label:"Auto-archive completed",description:"Automatically archive features after they reach the completed state",tooltip:"Automatically archives features from the control center canvas after they reach the completed state, keeping the board clean.",id:"auto-archive-enabled",testId:"switch-auto-archive-enabled",checked:ed,onChange:e=>{eu(e),C(ew({autoArchiveEnabled:e}))}}),(0,t.jsx)(K,{label:"Archive delay",description:"Minutes to wait after completion before archiving (1–1440)",tooltip:"How long to wait after a feature completes before archiving it. Gives you time to review results before the feature moves off the board.",htmlFor:"auto-archive-delay",children:(0,t.jsx)(H,{id:"auto-archive-delay",testId:"input-auto-archive-delay",value:eg,placeholder:"10",min:1,max:1440,suffix:"min",onChange:e=>{eh(e)},onBlur:()=>{if(!ed)return;let e=parseInt(eg,10),t=Number.isNaN(e)?10:Math.min(1440,Math.max(1,e));eh(String(t)),C(ew({autoArchiveDelay:String(t)}))}})})]}),(0,t.jsx)(U,{links:[{label:w("settings.workflow.links.approvalGates"),href:"https://github.com/jrmatherly/shipit/blob/main/specs/016-hitl-approval-gates/spec.yaml"},{label:w("settings.workflow.links.pushAndPrFlags"),href:"https://github.com/jrmatherly/shipit/blob/main/specs/037-feature-pr-push-flags/spec.yaml"}],children:w("settings.workflow.hint")})]}),(0,t.jsxs)("div",{id:"section-ci",className:"grid scroll-mt-18 grid-cols-1 gap-x-5 rounded-lg lg:grid-cols-[1fr_280px]",children:[(0,t.jsx)($,{settings:e}),(0,t.jsx)(U,{links:[{label:w("settings.ci.links.cicdPipeline"),href:"https://github.com/jrmatherly/shipit/blob/main/docs/development/cicd.md"},{label:w("settings.ci.links.ciSecurityGates"),href:"https://github.com/jrmatherly/shipit/blob/main/specs/003-cicd-security-gates/spec.md"}],children:w("settings.ci.hint")})]}),(0,t.jsxs)("div",{id:"section-stage-timeouts",className:"grid scroll-mt-18 grid-cols-1 gap-x-5 rounded-lg lg:grid-cols-[1fr_280px]",children:[(0,t.jsx)(eq,{settings:e}),(0,t.jsx)(U,{children:w("settings.stageTimeouts.hint")})]}),(0,t.jsxs)("div",{id:"section-notifications",className:"grid scroll-mt-18 grid-cols-1 gap-x-5 rounded-lg lg:grid-cols-[1fr_280px]",children:[(0,t.jsxs)(W,{icon:c,title:w("settings.notifications.title"),description:w("settings.notifications.sectionDescription"),testId:"notification-settings-section",children:[(0,t.jsx)(V,{children:w("settings.notifications.channels")}),(0,t.jsx)(O,{label:w("settings.notifications.inAppLabel"),description:w("settings.notifications.inAppDescription"),tooltip:"Master toggle for in-app toast notifications. When disabled, no event toasts will appear regardless of individual event settings below.",id:"notif-in-app",testId:"switch-in-app",checked:ep,onChange:e=>{em(e),C(ey({inApp:e}))}}),(0,t.jsx)(V,{children:w("settings.notifications.subsections.agentEvents")}),(0,t.jsx)(O,{label:w("settings.notifications.events.agentStarted"),tooltip:"Controls whether you receive an in-app toast notification when an agent begins working on a feature.",id:"notif-event-agentStarted",testId:"switch-event-agentStarted",checked:ef.agentStarted,onChange:e=>{let t={...ef,agentStarted:e};ex(t),C(ey({events:t}))}}),(0,t.jsx)(O,{label:w("settings.notifications.events.phaseCompleted"),tooltip:"Controls whether you receive an in-app toast notification when an agent completes a workflow phase (e.g., requirements, planning, implementation).",id:"notif-event-phaseCompleted",testId:"switch-event-phaseCompleted",checked:ef.phaseCompleted,onChange:e=>{let t={...ef,phaseCompleted:e};ex(t),C(ey({events:t}))}}),(0,t.jsx)(O,{label:w("settings.notifications.events.waitingApproval"),tooltip:"Controls whether you receive an in-app toast notification when a feature is paused and waiting for your approval to continue.",id:"notif-event-waitingApproval",testId:"switch-event-waitingApproval",checked:ef.waitingApproval,onChange:e=>{let t={...ef,waitingApproval:e};ex(t),C(ey({events:t}))}}),(0,t.jsx)(O,{label:w("settings.notifications.events.agentCompleted"),tooltip:"Controls whether you receive an in-app toast notification when an agent finishes all work on a feature successfully.",id:"notif-event-agentCompleted",testId:"switch-event-agentCompleted",checked:ef.agentCompleted,onChange:e=>{let t={...ef,agentCompleted:e};ex(t),C(ey({events:t}))}}),(0,t.jsx)(O,{label:w("settings.notifications.events.agentFailed"),tooltip:"Controls whether you receive an in-app toast notification when an agent encounters an error and stops working on a feature.",id:"notif-event-agentFailed",testId:"switch-event-agentFailed",checked:ef.agentFailed,onChange:e=>{let t={...ef,agentFailed:e};ex(t),C(ey({events:t}))}}),(0,t.jsx)(V,{children:w("settings.notifications.subsections.pullRequestEvents")}),(0,t.jsx)(O,{label:w("settings.notifications.events.prMerged"),tooltip:"Controls whether you receive an in-app toast notification when a feature's pull request is merged into the target branch.",id:"notif-event-prMerged",testId:"switch-event-prMerged",checked:ef.prMerged,onChange:e=>{let t={...ef,prMerged:e};ex(t),C(ey({events:t}))}}),(0,t.jsx)(O,{label:w("settings.notifications.events.prClosed"),tooltip:"Controls whether you receive an in-app toast notification when a feature's pull request is closed without merging.",id:"notif-event-prClosed",testId:"switch-event-prClosed",checked:ef.prClosed,onChange:e=>{let t={...ef,prClosed:e};ex(t),C(ey({events:t}))}}),(0,t.jsx)(O,{label:w("settings.notifications.events.prChecksPassed"),tooltip:"Controls whether you receive an in-app toast notification when all CI checks pass on a feature's pull request.",id:"notif-event-prChecksPassed",testId:"switch-event-prChecksPassed",checked:ef.prChecksPassed,onChange:e=>{let t={...ef,prChecksPassed:e};ex(t),C(ey({events:t}))}}),(0,t.jsx)(O,{label:w("settings.notifications.events.prChecksFailed"),tooltip:"Controls whether you receive an in-app toast notification when CI checks fail on a feature's pull request.",id:"notif-event-prChecksFailed",testId:"switch-event-prChecksFailed",checked:ef.prChecksFailed,onChange:e=>{let t={...ef,prChecksFailed:e};ex(t),C(ey({events:t}))}}),(0,t.jsx)(O,{label:w("settings.notifications.events.prBlocked"),tooltip:"Controls whether you receive an in-app toast notification when a pull request is blocked by merge conflicts or branch protection rules.",id:"notif-event-prBlocked",testId:"switch-event-prBlocked",checked:ef.prBlocked,onChange:e=>{let t={...ef,prBlocked:e};ex(t),C(ey({events:t}))}}),(0,t.jsx)(O,{label:w("settings.notifications.events.mergeReviewReady"),tooltip:"Controls whether you receive an in-app toast notification when a feature's PR passes all checks and is ready for your merge review.",id:"notif-event-mergeReviewReady",testId:"switch-event-mergeReviewReady",checked:ef.mergeReviewReady,onChange:e=>{let t={...ef,mergeReviewReady:e};ex(t),C(ey({events:t}))}})]}),(0,t.jsx)(U,{links:[{label:w("settings.notifications.links.notificationSystem"),href:"https://github.com/jrmatherly/shipit/blob/main/specs/021-agent-notifications/spec.yaml"}],children:w("settings.notifications.hint")})]}),(0,t.jsxs)("div",{id:"section-feature-flags",className:"grid scroll-mt-18 grid-cols-1 gap-x-5 rounded-lg lg:grid-cols-[1fr_280px]",children:[(0,t.jsxs)(W,{icon:d,title:w("settings.featureFlags.title"),description:w("settings.featureFlags.sectionDescription"),badge:w("settings.featureFlags.badge"),testId:"feature-flags-settings-section",children:[(0,t.jsx)(O,{label:w("settings.featureFlags.skills"),description:w("settings.featureFlags.skillsDescription"),tooltip:"Enables the Skills page in the sidebar for browsing and managing Claude Code skills.",id:"flag-skills",testId:"switch-flag-skills",checked:ev.skills,onChange:e=>{let t={...ev,skills:e};eb(t),C({featureFlags:t})}}),(0,t.jsx)(O,{label:w("settings.featureFlags.deployments"),description:w("settings.featureFlags.deploymentsDescription"),tooltip:"Enables experimental deployment features for environment management.",id:"flag-envDeploy",testId:"switch-flag-envDeploy",checked:ev.envDeploy,onChange:e=>{let t={...ev,envDeploy:e};eb(t),C({featureFlags:t})}}),(0,t.jsx)(O,{label:w("settings.featureFlags.debug"),description:w("settings.featureFlags.debugDescription"),tooltip:"Shows additional debugging information in the UI for troubleshooting.",id:"flag-debug",testId:"switch-flag-debug",checked:ev.debug,onChange:e=>{let t={...ev,debug:e};eb(t),C({featureFlags:t})}}),(0,t.jsx)(O,{label:w("settings.featureFlags.githubImport"),description:w("settings.featureFlags.githubImportDescription"),tooltip:"Enables importing repositories directly from GitHub.",id:"flag-githubImport",testId:"switch-flag-githubImport",checked:ev.githubImport,onChange:e=>{let t={...ev,githubImport:e};eb(t),C({featureFlags:t})}}),(0,t.jsx)(O,{label:w("settings.featureFlags.adoptBranch"),description:w("settings.featureFlags.adoptBranchDescription"),tooltip:"Enables adopting existing git branches as ShipIT features.",id:"flag-adoptBranch",testId:"switch-flag-adoptBranch",checked:ev.adoptBranch,onChange:e=>{let t={...ev,adoptBranch:e};eb(t),C({featureFlags:t})}}),(0,t.jsx)(O,{label:w("settings.featureFlags.gitRebaseSync"),description:w("settings.featureFlags.gitRebaseSyncDescription"),tooltip:"Uses git rebase instead of merge when syncing feature branches with the upstream branch.",id:"flag-gitRebaseSync",testId:"switch-flag-gitRebaseSync",checked:ev.gitRebaseSync,onChange:e=>{let t={...ev,gitRebaseSync:e};eb(t),C({featureFlags:t})}}),(0,t.jsx)(O,{label:w("settings.featureFlags.reactFileManager"),description:w("settings.featureFlags.reactFileManagerDescription"),tooltip:"Replaces the native file picker dialog with a React-based file browser for selecting project folders.",id:"flag-reactFileManager",testId:"switch-flag-reactFileManager",checked:ev.reactFileManager,onChange:e=>{let t={...ev,reactFileManager:e};eb(t),C({featureFlags:t})}})]}),(0,t.jsx)(U,{children:w("settings.featureFlags.hint")})]}),(0,t.jsxs)("div",{id:"section-interactive-agent",className:"grid scroll-mt-18 grid-cols-1 gap-x-5 rounded-lg lg:grid-cols-[1fr_280px]",children:[(0,t.jsx)(e_,{settings:e}),(0,t.jsx)(U,{children:w("settings.interactiveAgent.hint")})]}),(0,t.jsxs)("div",{id:"section-fab-layout",className:"grid scroll-mt-18 grid-cols-1 gap-x-5 rounded-lg lg:grid-cols-[1fr_280px]",children:[(0,t.jsx)(eK,{settings:e}),(0,t.jsx)(U,{children:w("settings.fabLayout.hint")})]}),(0,t.jsxs)("div",{id:"section-database",className:"grid scroll-mt-18 grid-cols-1 gap-x-5 rounded-lg lg:grid-cols-[1fr_280px]",children:[(0,t.jsxs)(W,{icon:u,title:w("settings.database.title"),description:w("settings.database.sectionDescription"),testId:"database-settings-section",children:[(0,t.jsx)(K,{label:w("settings.database.location"),description:w("settings.database.locationDescription"),tooltip:"The directory where ShipIT stores its SQLite database, logs, and configuration files. Change this via the SHIPIT_AI_HOME environment variable.",children:(0,t.jsx)("span",{className:"text-muted-foreground max-w-50 truncate font-mono text-xs","data-testid":"shipit-ai-home-path",children:r})}),(0,t.jsx)(K,{label:w("settings.database.size"),tooltip:"Current size of the SQLite database file on disk. Large databases may slow down startup; consider archiving old features if this grows significantly.",children:(0,t.jsx)("span",{className:"text-muted-foreground text-xs","data-testid":"db-file-size",children:l})})]}),(0,t.jsx)(U,{links:[{label:w("settings.database.links.settingsService"),href:"https://github.com/jrmatherly/shipit/blob/main/docs/architecture/settings-service.md"},{label:w("settings.database.links.settingsSpec"),href:"https://github.com/jrmatherly/shipit/blob/main/specs/005-global-settings-service/spec.md"}],children:w("settings.database.hint")})]})]})]})}],41952)}]);
@@ -1 +1 @@
1
- (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,56060,e=>{"use strict";let a=(0,e.i(54864).default)("chevrons-up-down",[["path",{d:"m7 15 5 5 5-5",key:"1hf1tw"}],["path",{d:"m7 9 5-5 5 5",key:"sgt6xg"}]]);e.s(["ChevronsUpDown",0,a],56060)},36479,e=>{"use strict";var a=e.i(96871),t=e.i(16539),s=e.i(33109),r=e.i(60112),o=e.i(96976);let n=(0,o.createServerReference)("40f8e94e780100a2b3989ac209ac22ec1586bbaec4",o.callServer,void 0,o.findSourceMapURL,"adoptBranch"),l=(0,o.createServerReference)("403a317cf0b1f797db468fa21e1c50390b262f03ee",o.callServer,void 0,o.findSourceMapURL,"listBranches");var c=e.i(85149),i=e.i(91653),d=e.i(56060),p=e.i(60589),h=e.i(79561);e.i(1650);var u=e.i(11495),m=e.i(45811),x=e.i(35364),f=e.i(98127),b=e.i(41957),v=e.i(68787),g=e.i(31777);let j=t.forwardRef(({className:e,...t},s)=>(0,a.jsx)("div",{ref:s,className:(0,g.cn)("bg-popover text-popover-foreground flex h-full w-full flex-col overflow-hidden rounded-md",e),...t}));j.displayName="Command";let w=t.forwardRef(({className:e,...t},s)=>(0,a.jsxs)("div",{className:"flex items-center border-b px-3",children:[(0,a.jsx)(v.Search,{className:"me-2 h-4 w-4 shrink-0 opacity-50"}),(0,a.jsx)("input",{ref:s,className:(0,g.cn)("placeholder:text-muted-foreground flex h-10 w-full rounded-md bg-transparent py-3 text-sm outline-none disabled:cursor-not-allowed disabled:opacity-50",e),...t})]}));w.displayName="CommandInput";let N=t.forwardRef(({className:e,...t},s)=>(0,a.jsx)("div",{ref:s,className:(0,g.cn)("max-h-[300px] overflow-x-hidden overflow-y-auto",e),...t}));N.displayName="CommandList";let y=t.forwardRef(({className:e,...t},s)=>(0,a.jsx)("div",{ref:s,className:(0,g.cn)("text-muted-foreground py-6 text-center text-sm",e),...t}));y.displayName="CommandEmpty";let C=t.forwardRef(({className:e,...t},s)=>(0,a.jsx)("div",{ref:s,className:(0,g.cn)("text-foreground overflow-hidden p-1",e),...t}));C.displayName="CommandGroup";let S=t.forwardRef(({className:e,selected:t,...s},r)=>(0,a.jsx)("button",{ref:r,type:"button","data-selected":t,className:(0,g.cn)("relative flex w-full cursor-default items-center rounded-sm px-2 py-1.5 text-sm transition-colors outline-none select-none","hover:bg-accent hover:text-accent-foreground","data-[selected=true]:bg-accent data-[selected=true]:text-accent-foreground","disabled:pointer-events-none disabled:opacity-50",e),...s}));S.displayName="CommandItem",t.forwardRef(({className:e,...t},s)=>(0,a.jsx)("div",{ref:s,className:(0,g.cn)("bg-border -mx-1 h-px",e),...t})).displayName="CommandSeparator";var k=e.i(90382);function R({open:e,onClose:s,onSubmit:r,isSubmitting:o=!1,error:n,repositories:l=[],selectedRepositoryPath:v,onRepositoryChange:L,branches:B=[],branchesLoading:P=!1}){let[E,D]=(0,t.useState)(""),[T,I]=(0,t.useState)(!1),[U,A]=(0,t.useState)(""),O=(0,t.useRef)(null),[F,G]=(0,t.useState)(!1),[K,M]=(0,t.useState)(""),$=(0,t.useRef)(null),z=l.find(e=>e.path===v),W=!!v;(0,t.useEffect)(()=>{e||(D(""),A(""),I(!1),G(!1),M(""))},[e]),(0,t.useEffect)(()=>{D(""),A("")},[v]);let q=(0,t.useCallback)(e=>{e.preventDefault();let a=E.trim();a&&v&&!o&&r(a,v)},[E,v,o,r]),H=(0,t.useCallback)(()=>{D(""),A(""),s()},[s]),J=(0,t.useCallback)(e=>{D(e),A(e),I(!1)},[]),Q=(0,t.useCallback)(e=>{A(e.target.value),T||I(!0)},[T]),V=(0,t.useCallback)(e=>{if("Enter"===e.key){e.preventDefault();let a=U.trim();a&&(D(a),I(!1))}"Escape"===e.key&&(I(!1),A(E))},[U,E]),X=(0,t.useCallback)(e=>{L?.(e),G(!1),M("")},[L]),Y=B.filter(e=>e.toLowerCase().includes(U.toLowerCase())),Z=K.trim()?l.filter(e=>e.name.toLowerCase().includes(K.toLowerCase())||e.path.toLowerCase().includes(K.toLowerCase())):l;(0,t.useEffect)(()=>{F?setTimeout(()=>$.current?.focus(),0):M("")},[F]);let _=!E.trim()||!v||o,ee=(0,a.jsxs)("div",{children:[(0,a.jsxs)(m.DrawerTitle,{className:"flex items-center gap-2",children:[(0,a.jsx)(p.GitBranch,{className:"h-4 w-4"}),"Adopt Branch"]}),(0,a.jsx)(m.DrawerDescription,{className:"text-muted-foreground text-sm",children:"Import an existing git branch into ShipIT's feature tracking"})]});return(0,a.jsx)(u.BaseDrawer,{open:e,onClose:H,size:"sm",modal:!1,header:ee,"data-testid":"adopt-branch-drawer",children:(0,a.jsxs)("form",{onSubmit:q,className:"flex flex-1 flex-col",children:[(0,a.jsx)("div",{className:"flex-1 overflow-y-auto p-4",children:(0,a.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,a.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,a.jsx)(b.Label,{children:"Repository"}),(0,a.jsxs)(k.Popover,{open:F,onOpenChange:G,children:[(0,a.jsx)(k.PopoverTrigger,{asChild:!0,children:(0,a.jsxs)("button",{type:"button",role:"combobox","aria-expanded":F,"aria-label":"Repository",disabled:o,"data-testid":"adopt-repo-combobox",className:(0,g.cn)("border-input bg-background ring-offset-background focus:ring-ring flex h-9 w-full items-center justify-between rounded-md border px-3 py-2 text-sm focus:ring-2 focus:ring-offset-2 focus:outline-none disabled:cursor-not-allowed disabled:opacity-50",!z&&"text-muted-foreground"),children:[(0,a.jsx)("span",{className:"truncate",children:z?z.name:"Select repository..."}),(0,a.jsx)(d.ChevronsUpDown,{className:"ms-2 h-4 w-4 shrink-0 opacity-50"})]})}),(0,a.jsx)(k.PopoverContent,{className:"w-80 p-0",align:"start","data-testid":"adopt-repo-combobox-content",children:(0,a.jsxs)("div",{className:"flex flex-col",children:[(0,a.jsx)("div",{className:"border-b p-2",children:(0,a.jsx)(f.Input,{ref:$,placeholder:"Search repositories...",value:K,onChange:e=>M(e.target.value),className:"h-8 border-0 p-0 text-sm shadow-none focus-visible:ring-0","data-testid":"adopt-repo-search"})}),(0,a.jsx)("div",{className:"max-h-48 overflow-y-auto py-1",role:"listbox","aria-label":"Repositories",children:0===Z.length?(0,a.jsx)("p",{className:"text-muted-foreground px-3 py-2 text-sm",children:"No repositories found."}):Z.map(e=>(0,a.jsxs)("button",{type:"button",role:"option","aria-selected":v===e.path,onClick:()=>X(e.path),className:(0,g.cn)("hover:bg-accent hover:text-accent-foreground flex w-full items-center gap-2 px-3 py-2 text-sm",v===e.path&&"bg-accent/50"),"data-testid":`adopt-repo-option-${e.id}`,children:[(0,a.jsx)(i.CheckIcon,{className:(0,g.cn)("h-4 w-4 shrink-0",v!==e.path&&"invisible")}),(0,a.jsxs)("span",{className:"flex flex-col items-start truncate",children:[(0,a.jsx)("span",{className:"truncate",children:e.name}),(0,a.jsx)("span",{className:"text-muted-foreground truncate text-xs",children:e.path})]})]},e.id))})]})})]}),(0,a.jsx)("p",{className:"text-muted-foreground text-xs",children:"Select the repository that contains the branch you want to adopt."})]}),(0,a.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,a.jsx)(b.Label,{htmlFor:"branch-name",children:"Branch name"}),(0,a.jsxs)(k.Popover,{open:T,onOpenChange:I,children:[(0,a.jsx)(k.PopoverTrigger,{asChild:!0,children:(0,a.jsxs)(x.Button,{variant:"outline",role:"combobox","aria-expanded":T,"aria-invalid":!!n,"aria-describedby":n?"adopt-branch-error-msg":void 0,disabled:o||!W,className:"w-full justify-between font-normal","data-testid":"adopt-branch-input",children:[(0,a.jsx)("span",{className:"truncate",children:W?P?"Loading branches...":E||"Select a branch...":"Select a repository first..."}),(0,a.jsx)(d.ChevronsUpDown,{className:"ms-2 h-4 w-4 shrink-0 opacity-50"})]})}),(0,a.jsx)(k.PopoverContent,{className:"w-[var(--radix-popover-trigger-width)] p-0",align:"start",children:(0,a.jsxs)(j,{children:[(0,a.jsx)(w,{ref:O,placeholder:"Search branches...",value:U,onChange:Q,onKeyDown:V,"data-testid":"adopt-branch-search"}),(0,a.jsxs)(N,{children:[!P&&0===Y.length&&(0,a.jsx)(y,{children:0===B.length?"No branches found.":U?"No match — press Enter to use this value.":"No branches available."}),P?(0,a.jsx)(y,{children:(0,a.jsx)(h.LoaderCircle,{className:"mx-auto h-4 w-4 animate-spin"})}):null,Y.length>0&&(0,a.jsx)(C,{children:Y.map(e=>(0,a.jsxs)(S,{selected:e===E,onClick:()=>J(e),children:[(0,a.jsx)(c.Check,{className:(0,g.cn)("me-2 h-4 w-4",e===E?"opacity-100":"opacity-0")}),(0,a.jsx)(p.GitBranch,{className:"me-2 h-3 w-3 opacity-50"}),e]},e))})]})]})})]}),(0,a.jsx)("p",{className:"text-muted-foreground text-xs",children:W?"Select a branch from the dropdown or type to search. Local and remote branches are shown.":"Please select a repository above to see available branches."})]}),n?(0,a.jsx)("p",{id:"adopt-branch-error-msg",className:"text-destructive text-sm",role:"alert","data-testid":"adopt-branch-error",children:n}):null]})}),(0,a.jsx)("div",{className:"border-t p-4",children:(0,a.jsxs)("div",{className:"flex gap-2",children:[(0,a.jsx)(x.Button,{type:"button",variant:"outline",onClick:H,disabled:o,className:"flex-1",children:"Cancel"}),(0,a.jsx)(x.Button,{type:"submit",disabled:_,className:"flex-1","data-testid":"adopt-branch-submit",children:o?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(h.LoaderCircle,{className:"me-2 h-4 w-4 animate-spin"}),"Adopting..."]}):"Adopt Branch"})]})})]})})}e.s(["AdoptDrawerClient",0,function({repositoryPath:e,repositories:o}){let c=(0,s.useRouter)(),i=(0,s.usePathname)(),[d,p]=(0,t.useState)(!1),[h,u]=(0,t.useState)(),[m,x]=(0,t.useState)([]),[f,b]=(0,t.useState)(!1),[v,g]=(0,t.useState)(e),j=i.startsWith("/adopt"),w=!d&&j;(0,t.useEffect)(()=>{!j&&d&&p(!1)},[j,d]),(0,t.useEffect)(()=>{j&&(u(void 0),g(e))},[j,e]),(0,t.useEffect)(()=>{j&&v?(b(!0),x([]),l(v).then(x).catch(()=>x([])).finally(()=>b(!1))):x([])},[j,v]);let N=(0,t.useCallback)(()=>{c.push("/")},[c]),y=(0,t.useCallback)(e=>{g(e)},[]),C=(0,t.useCallback)((e,a)=>{u(void 0),p(!0),c.push("/"),n({branchName:e,repositoryPath:a}).then(e=>{e.error?r.toast.error(e.error):(window.dispatchEvent(new CustomEvent("shipit-ai:feature-created",{detail:{featureId:e.feature.id,name:e.feature.name,description:e.feature.description,repositoryPath:e.feature.repositoryPath}})),r.toast.success(`Branch adopted as "${e.feature.name}"`))}).catch(()=>{r.toast.error("Failed to adopt branch"),p(!1)})},[c]);return(0,a.jsx)(R,{open:w,onClose:N,onSubmit:C,isSubmitting:d,error:h,repositories:o,selectedRepositoryPath:v,onRepositoryChange:y,branches:m,branchesLoading:f})}],36479)}]);
1
+ (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,56060,e=>{"use strict";let a=(0,e.i(54864).default)("chevrons-up-down",[["path",{d:"m7 15 5 5 5-5",key:"1hf1tw"}],["path",{d:"m7 9 5-5 5 5",key:"sgt6xg"}]]);e.s(["ChevronsUpDown",0,a],56060)},36479,e=>{"use strict";var a=e.i(96871),t=e.i(16539),s=e.i(33109),r=e.i(60112),o=e.i(96976);let n=(0,o.createServerReference)("40334e18c9f05291f50719cdd990ae800deb768dbf",o.callServer,void 0,o.findSourceMapURL,"adoptBranch"),l=(0,o.createServerReference)("400013f05b5ef00bc5cdb04812bdf8061c7df3b1fa",o.callServer,void 0,o.findSourceMapURL,"listBranches");var i=e.i(85149),c=e.i(91653),d=e.i(56060),p=e.i(60589),h=e.i(79561);e.i(1650);var u=e.i(11495),m=e.i(45811),x=e.i(35364),f=e.i(98127),b=e.i(41957),v=e.i(68787),g=e.i(31777);let j=t.forwardRef(({className:e,...t},s)=>(0,a.jsx)("div",{ref:s,className:(0,g.cn)("bg-popover text-popover-foreground flex h-full w-full flex-col overflow-hidden rounded-md",e),...t}));j.displayName="Command";let w=t.forwardRef(({className:e,...t},s)=>(0,a.jsxs)("div",{className:"flex items-center border-b px-3",children:[(0,a.jsx)(v.Search,{className:"me-2 h-4 w-4 shrink-0 opacity-50"}),(0,a.jsx)("input",{ref:s,className:(0,g.cn)("placeholder:text-muted-foreground flex h-10 w-full rounded-md bg-transparent py-3 text-sm outline-none disabled:cursor-not-allowed disabled:opacity-50",e),...t})]}));w.displayName="CommandInput";let N=t.forwardRef(({className:e,...t},s)=>(0,a.jsx)("div",{ref:s,className:(0,g.cn)("max-h-[300px] overflow-x-hidden overflow-y-auto",e),...t}));N.displayName="CommandList";let y=t.forwardRef(({className:e,...t},s)=>(0,a.jsx)("div",{ref:s,className:(0,g.cn)("text-muted-foreground py-6 text-center text-sm",e),...t}));y.displayName="CommandEmpty";let C=t.forwardRef(({className:e,...t},s)=>(0,a.jsx)("div",{ref:s,className:(0,g.cn)("text-foreground overflow-hidden p-1",e),...t}));C.displayName="CommandGroup";let S=t.forwardRef(({className:e,selected:t,...s},r)=>(0,a.jsx)("button",{ref:r,type:"button","data-selected":t,className:(0,g.cn)("relative flex w-full cursor-default items-center rounded-sm px-2 py-1.5 text-sm transition-colors outline-none select-none","hover:bg-accent hover:text-accent-foreground","data-[selected=true]:bg-accent data-[selected=true]:text-accent-foreground","disabled:pointer-events-none disabled:opacity-50",e),...s}));S.displayName="CommandItem",t.forwardRef(({className:e,...t},s)=>(0,a.jsx)("div",{ref:s,className:(0,g.cn)("bg-border -mx-1 h-px",e),...t})).displayName="CommandSeparator";var k=e.i(90382);function R({open:e,onClose:s,onSubmit:r,isSubmitting:o=!1,error:n,repositories:l=[],selectedRepositoryPath:v,onRepositoryChange:L,branches:B=[],branchesLoading:P=!1}){let[E,D]=(0,t.useState)(""),[T,I]=(0,t.useState)(!1),[U,A]=(0,t.useState)(""),O=(0,t.useRef)(null),[F,G]=(0,t.useState)(!1),[K,M]=(0,t.useState)(""),$=(0,t.useRef)(null),z=l.find(e=>e.path===v),W=!!v;(0,t.useEffect)(()=>{e||(D(""),A(""),I(!1),G(!1),M(""))},[e]),(0,t.useEffect)(()=>{D(""),A("")},[v]);let q=(0,t.useCallback)(e=>{e.preventDefault();let a=E.trim();a&&v&&!o&&r(a,v)},[E,v,o,r]),H=(0,t.useCallback)(()=>{D(""),A(""),s()},[s]),J=(0,t.useCallback)(e=>{D(e),A(e),I(!1)},[]),Q=(0,t.useCallback)(e=>{A(e.target.value),T||I(!0)},[T]),V=(0,t.useCallback)(e=>{if("Enter"===e.key){e.preventDefault();let a=U.trim();a&&(D(a),I(!1))}"Escape"===e.key&&(I(!1),A(E))},[U,E]),X=(0,t.useCallback)(e=>{L?.(e),G(!1),M("")},[L]),Y=B.filter(e=>e.toLowerCase().includes(U.toLowerCase())),Z=K.trim()?l.filter(e=>e.name.toLowerCase().includes(K.toLowerCase())||e.path.toLowerCase().includes(K.toLowerCase())):l;(0,t.useEffect)(()=>{F?setTimeout(()=>$.current?.focus(),0):M("")},[F]);let _=!E.trim()||!v||o,ee=(0,a.jsxs)("div",{children:[(0,a.jsxs)(m.DrawerTitle,{className:"flex items-center gap-2",children:[(0,a.jsx)(p.GitBranch,{className:"h-4 w-4"}),"Adopt Branch"]}),(0,a.jsx)(m.DrawerDescription,{className:"text-muted-foreground text-sm",children:"Import an existing git branch into ShipIT's feature tracking"})]});return(0,a.jsx)(u.BaseDrawer,{open:e,onClose:H,size:"sm",modal:!1,header:ee,"data-testid":"adopt-branch-drawer",children:(0,a.jsxs)("form",{onSubmit:q,className:"flex flex-1 flex-col",children:[(0,a.jsx)("div",{className:"flex-1 overflow-y-auto p-4",children:(0,a.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,a.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,a.jsx)(b.Label,{children:"Repository"}),(0,a.jsxs)(k.Popover,{open:F,onOpenChange:G,children:[(0,a.jsx)(k.PopoverTrigger,{asChild:!0,children:(0,a.jsxs)("button",{type:"button",role:"combobox","aria-expanded":F,"aria-label":"Repository",disabled:o,"data-testid":"adopt-repo-combobox",className:(0,g.cn)("border-input bg-background ring-offset-background focus:ring-ring flex h-9 w-full items-center justify-between rounded-md border px-3 py-2 text-sm focus:ring-2 focus:ring-offset-2 focus:outline-none disabled:cursor-not-allowed disabled:opacity-50",!z&&"text-muted-foreground"),children:[(0,a.jsx)("span",{className:"truncate",children:z?z.name:"Select repository..."}),(0,a.jsx)(d.ChevronsUpDown,{className:"ms-2 h-4 w-4 shrink-0 opacity-50"})]})}),(0,a.jsx)(k.PopoverContent,{className:"w-80 p-0",align:"start","data-testid":"adopt-repo-combobox-content",children:(0,a.jsxs)("div",{className:"flex flex-col",children:[(0,a.jsx)("div",{className:"border-b p-2",children:(0,a.jsx)(f.Input,{ref:$,placeholder:"Search repositories...",value:K,onChange:e=>M(e.target.value),className:"h-8 border-0 p-0 text-sm shadow-none focus-visible:ring-0","data-testid":"adopt-repo-search"})}),(0,a.jsx)("div",{className:"max-h-48 overflow-y-auto py-1",role:"listbox","aria-label":"Repositories",children:0===Z.length?(0,a.jsx)("p",{className:"text-muted-foreground px-3 py-2 text-sm",children:"No repositories found."}):Z.map(e=>(0,a.jsxs)("button",{type:"button",role:"option","aria-selected":v===e.path,onClick:()=>X(e.path),className:(0,g.cn)("hover:bg-accent hover:text-accent-foreground flex w-full items-center gap-2 px-3 py-2 text-sm",v===e.path&&"bg-accent/50"),"data-testid":`adopt-repo-option-${e.id}`,children:[(0,a.jsx)(c.CheckIcon,{className:(0,g.cn)("h-4 w-4 shrink-0",v!==e.path&&"invisible")}),(0,a.jsxs)("span",{className:"flex flex-col items-start truncate",children:[(0,a.jsx)("span",{className:"truncate",children:e.name}),(0,a.jsx)("span",{className:"text-muted-foreground truncate text-xs",children:e.path})]})]},e.id))})]})})]}),(0,a.jsx)("p",{className:"text-muted-foreground text-xs",children:"Select the repository that contains the branch you want to adopt."})]}),(0,a.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,a.jsx)(b.Label,{htmlFor:"branch-name",children:"Branch name"}),(0,a.jsxs)(k.Popover,{open:T,onOpenChange:I,children:[(0,a.jsx)(k.PopoverTrigger,{asChild:!0,children:(0,a.jsxs)(x.Button,{variant:"outline",role:"combobox","aria-expanded":T,"aria-invalid":!!n,"aria-describedby":n?"adopt-branch-error-msg":void 0,disabled:o||!W,className:"w-full justify-between font-normal","data-testid":"adopt-branch-input",children:[(0,a.jsx)("span",{className:"truncate",children:W?P?"Loading branches...":E||"Select a branch...":"Select a repository first..."}),(0,a.jsx)(d.ChevronsUpDown,{className:"ms-2 h-4 w-4 shrink-0 opacity-50"})]})}),(0,a.jsx)(k.PopoverContent,{className:"w-[var(--radix-popover-trigger-width)] p-0",align:"start",children:(0,a.jsxs)(j,{children:[(0,a.jsx)(w,{ref:O,placeholder:"Search branches...",value:U,onChange:Q,onKeyDown:V,"data-testid":"adopt-branch-search"}),(0,a.jsxs)(N,{children:[!P&&0===Y.length&&(0,a.jsx)(y,{children:0===B.length?"No branches found.":U?"No match — press Enter to use this value.":"No branches available."}),P?(0,a.jsx)(y,{children:(0,a.jsx)(h.LoaderCircle,{className:"mx-auto h-4 w-4 animate-spin"})}):null,Y.length>0&&(0,a.jsx)(C,{children:Y.map(e=>(0,a.jsxs)(S,{selected:e===E,onClick:()=>J(e),children:[(0,a.jsx)(i.Check,{className:(0,g.cn)("me-2 h-4 w-4",e===E?"opacity-100":"opacity-0")}),(0,a.jsx)(p.GitBranch,{className:"me-2 h-3 w-3 opacity-50"}),e]},e))})]})]})})]}),(0,a.jsx)("p",{className:"text-muted-foreground text-xs",children:W?"Select a branch from the dropdown or type to search. Local and remote branches are shown.":"Please select a repository above to see available branches."})]}),n?(0,a.jsx)("p",{id:"adopt-branch-error-msg",className:"text-destructive text-sm",role:"alert","data-testid":"adopt-branch-error",children:n}):null]})}),(0,a.jsx)("div",{className:"border-t p-4",children:(0,a.jsxs)("div",{className:"flex gap-2",children:[(0,a.jsx)(x.Button,{type:"button",variant:"outline",onClick:H,disabled:o,className:"flex-1",children:"Cancel"}),(0,a.jsx)(x.Button,{type:"submit",disabled:_,className:"flex-1","data-testid":"adopt-branch-submit",children:o?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(h.LoaderCircle,{className:"me-2 h-4 w-4 animate-spin"}),"Adopting..."]}):"Adopt Branch"})]})})]})})}e.s(["AdoptDrawerClient",0,function({repositoryPath:e,repositories:o}){let i=(0,s.useRouter)(),c=(0,s.usePathname)(),[d,p]=(0,t.useState)(!1),[h,u]=(0,t.useState)(),[m,x]=(0,t.useState)([]),[f,b]=(0,t.useState)(!1),[v,g]=(0,t.useState)(e),j=c.startsWith("/adopt"),w=!d&&j;(0,t.useEffect)(()=>{!j&&d&&p(!1)},[j,d]),(0,t.useEffect)(()=>{j&&(u(void 0),g(e))},[j,e]),(0,t.useEffect)(()=>{j&&v?(b(!0),x([]),l(v).then(x).catch(()=>x([])).finally(()=>b(!1))):x([])},[j,v]);let N=(0,t.useCallback)(()=>{i.push("/")},[i]),y=(0,t.useCallback)(e=>{g(e)},[]),C=(0,t.useCallback)((e,a)=>{u(void 0),p(!0),i.push("/"),n({branchName:e,repositoryPath:a}).then(e=>{e.error?r.toast.error(e.error):(window.dispatchEvent(new CustomEvent("shipit-ai:feature-created",{detail:{featureId:e.feature.id,name:e.feature.name,description:e.feature.description,repositoryPath:e.feature.repositoryPath}})),r.toast.success(`Branch adopted as "${e.feature.name}"`))}).catch(()=>{r.toast.error("Failed to adopt branch"),p(!1)})},[i]);return(0,a.jsx)(R,{open:w,onClose:N,onSubmit:C,isSubmitting:d,error:h,repositories:o,selectedRepositoryPath:v,onRepositoryChange:y,branches:m,branchesLoading:f})}],36479)}]);