@shepai/cli 1.116.3-pr373.2304074 → 1.117.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 (357) hide show
  1. package/dist/src/presentation/web/components/layouts/app-sidebar/app-sidebar.d.ts.map +1 -1
  2. package/dist/src/presentation/web/components/layouts/app-sidebar/app-sidebar.js +2 -2
  3. package/dist/tsconfig.build.tsbuildinfo +1 -1
  4. package/package.json +1 -1
  5. package/web/.next/BUILD_ID +1 -1
  6. package/web/.next/app-path-routes-manifest.json +0 -1
  7. package/web/.next/build-manifest.json +6 -6
  8. package/web/.next/fallback-build-manifest.json +2 -2
  9. package/web/.next/prerender-manifest.json +3 -3
  10. package/web/.next/required-server-files.js +2 -2
  11. package/web/.next/required-server-files.json +2 -2
  12. package/web/.next/routes-manifest.json +0 -6
  13. package/web/.next/server/app/(dashboard)/@drawer/create/page/build-manifest.json +4 -4
  14. package/web/.next/server/app/(dashboard)/@drawer/create/page/server-reference-manifest.json +21 -21
  15. package/web/.next/server/app/(dashboard)/@drawer/create/page.js.nft.json +1 -1
  16. package/web/.next/server/app/(dashboard)/@drawer/create/page_client-reference-manifest.js +1 -1
  17. package/web/.next/server/app/(dashboard)/@drawer/feature/[featureId]/[tab]/page/build-manifest.json +4 -4
  18. package/web/.next/server/app/(dashboard)/@drawer/feature/[featureId]/[tab]/page/server-reference-manifest.json +27 -27
  19. package/web/.next/server/app/(dashboard)/@drawer/feature/[featureId]/[tab]/page.js.nft.json +1 -1
  20. package/web/.next/server/app/(dashboard)/@drawer/feature/[featureId]/[tab]/page_client-reference-manifest.js +1 -1
  21. package/web/.next/server/app/(dashboard)/@drawer/feature/[featureId]/page/build-manifest.json +4 -4
  22. package/web/.next/server/app/(dashboard)/@drawer/feature/[featureId]/page/server-reference-manifest.json +27 -27
  23. package/web/.next/server/app/(dashboard)/@drawer/feature/[featureId]/page.js.nft.json +1 -1
  24. package/web/.next/server/app/(dashboard)/@drawer/feature/[featureId]/page_client-reference-manifest.js +1 -1
  25. package/web/.next/server/app/(dashboard)/@drawer/repository/[repositoryId]/page/build-manifest.json +4 -4
  26. package/web/.next/server/app/(dashboard)/@drawer/repository/[repositoryId]/page/server-reference-manifest.json +19 -19
  27. package/web/.next/server/app/(dashboard)/@drawer/repository/[repositoryId]/page.js.nft.json +1 -1
  28. package/web/.next/server/app/(dashboard)/@drawer/repository/[repositoryId]/page_client-reference-manifest.js +1 -1
  29. package/web/.next/server/app/(dashboard)/create/page/build-manifest.json +4 -4
  30. package/web/.next/server/app/(dashboard)/create/page/server-reference-manifest.json +21 -21
  31. package/web/.next/server/app/(dashboard)/create/page.js.nft.json +1 -1
  32. package/web/.next/server/app/(dashboard)/create/page_client-reference-manifest.js +1 -1
  33. package/web/.next/server/app/(dashboard)/feature/[featureId]/[tab]/page/build-manifest.json +4 -4
  34. package/web/.next/server/app/(dashboard)/feature/[featureId]/[tab]/page/server-reference-manifest.json +27 -27
  35. package/web/.next/server/app/(dashboard)/feature/[featureId]/[tab]/page.js.nft.json +1 -1
  36. package/web/.next/server/app/(dashboard)/feature/[featureId]/[tab]/page_client-reference-manifest.js +1 -1
  37. package/web/.next/server/app/(dashboard)/feature/[featureId]/page/build-manifest.json +4 -4
  38. package/web/.next/server/app/(dashboard)/feature/[featureId]/page/server-reference-manifest.json +27 -27
  39. package/web/.next/server/app/(dashboard)/feature/[featureId]/page.js.nft.json +1 -1
  40. package/web/.next/server/app/(dashboard)/feature/[featureId]/page_client-reference-manifest.js +1 -1
  41. package/web/.next/server/app/(dashboard)/page/build-manifest.json +4 -4
  42. package/web/.next/server/app/(dashboard)/page/server-reference-manifest.json +19 -19
  43. package/web/.next/server/app/(dashboard)/page.js.nft.json +1 -1
  44. package/web/.next/server/app/(dashboard)/page_client-reference-manifest.js +1 -1
  45. package/web/.next/server/app/(dashboard)/repository/[repositoryId]/page/build-manifest.json +4 -4
  46. package/web/.next/server/app/(dashboard)/repository/[repositoryId]/page/server-reference-manifest.json +19 -19
  47. package/web/.next/server/app/(dashboard)/repository/[repositoryId]/page.js.nft.json +1 -1
  48. package/web/.next/server/app/(dashboard)/repository/[repositoryId]/page_client-reference-manifest.js +1 -1
  49. package/web/.next/server/app/_global-error/page/build-manifest.json +4 -4
  50. package/web/.next/server/app/_global-error.html +2 -2
  51. package/web/.next/server/app/_global-error.rsc +1 -1
  52. package/web/.next/server/app/_global-error.segments/__PAGE__.segment.rsc +1 -1
  53. package/web/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
  54. package/web/.next/server/app/_global-error.segments/_head.segment.rsc +1 -1
  55. package/web/.next/server/app/_global-error.segments/_index.segment.rsc +1 -1
  56. package/web/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
  57. package/web/.next/server/app/_not-found/page/build-manifest.json +4 -4
  58. package/web/.next/server/app/_not-found/page/server-reference-manifest.json +1 -1
  59. package/web/.next/server/app/_not-found/page.js.nft.json +1 -1
  60. package/web/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
  61. package/web/.next/server/app/api/attachments/preview/route.js.nft.json +1 -1
  62. package/web/.next/server/app/api/evidence/route.js.nft.json +1 -1
  63. package/web/.next/server/app/settings/page/build-manifest.json +4 -4
  64. package/web/.next/server/app/settings/page/server-reference-manifest.json +5 -5
  65. package/web/.next/server/app/settings/page.js +1 -1
  66. package/web/.next/server/app/settings/page.js.nft.json +1 -1
  67. package/web/.next/server/app/settings/page_client-reference-manifest.js +1 -1
  68. package/web/.next/server/app/skills/page/build-manifest.json +4 -4
  69. package/web/.next/server/app/skills/page/server-reference-manifest.json +6 -6
  70. package/web/.next/server/app/skills/page.js +1 -1
  71. package/web/.next/server/app/skills/page.js.nft.json +1 -1
  72. package/web/.next/server/app/skills/page_client-reference-manifest.js +1 -1
  73. package/web/.next/server/app/tools/page/build-manifest.json +4 -4
  74. package/web/.next/server/app/tools/page/server-reference-manifest.json +6 -6
  75. package/web/.next/server/app/tools/page.js +1 -1
  76. package/web/.next/server/app/tools/page.js.nft.json +1 -1
  77. package/web/.next/server/app/tools/page_client-reference-manifest.js +1 -1
  78. package/web/.next/server/app/version/page/build-manifest.json +4 -4
  79. package/web/.next/server/app/version/page/server-reference-manifest.json +1 -1
  80. package/web/.next/server/app/version/page.js.nft.json +1 -1
  81. package/web/.next/server/app/version/page_client-reference-manifest.js +1 -1
  82. package/web/.next/server/app-paths-manifest.json +0 -1
  83. package/web/.next/server/chunks/[root-of-the-server]__a402b567._.js +1 -1
  84. package/web/.next/server/chunks/ssr/403f9_next_dist_esm_build_templates_app-page_2eacac96.js +1 -1
  85. package/web/.next/server/chunks/ssr/403f9_next_dist_esm_build_templates_app-page_2eacac96.js.map +1 -1
  86. package/web/.next/server/chunks/ssr/403f9_next_dist_esm_build_templates_app-page_46d6bf1b.js +1 -1
  87. package/web/.next/server/chunks/ssr/403f9_next_dist_esm_build_templates_app-page_46d6bf1b.js.map +1 -1
  88. package/web/.next/server/chunks/ssr/403f9_next_dist_esm_build_templates_app-page_54b1e179.js +1 -1
  89. package/web/.next/server/chunks/ssr/403f9_next_dist_esm_build_templates_app-page_54b1e179.js.map +1 -1
  90. package/web/.next/server/chunks/ssr/403f9_next_dist_esm_build_templates_app-page_6c70ecca.js +1 -1
  91. package/web/.next/server/chunks/ssr/403f9_next_dist_esm_build_templates_app-page_6c70ecca.js.map +1 -1
  92. package/web/.next/server/chunks/ssr/403f9_next_dist_esm_build_templates_app-page_c29a2302.js +1 -1
  93. package/web/.next/server/chunks/ssr/403f9_next_dist_esm_build_templates_app-page_c29a2302.js.map +1 -1
  94. package/web/.next/server/chunks/ssr/403f9_next_dist_esm_build_templates_app-page_c9978986.js +1 -1
  95. package/web/.next/server/chunks/ssr/403f9_next_dist_esm_build_templates_app-page_c9978986.js.map +1 -1
  96. package/web/.next/server/chunks/ssr/403f9_next_dist_esm_build_templates_app-page_ce6dae5d.js +1 -1
  97. package/web/.next/server/chunks/ssr/403f9_next_dist_esm_build_templates_app-page_ce6dae5d.js.map +1 -1
  98. package/web/.next/server/chunks/ssr/403f9_next_dist_esm_build_templates_app-page_d1fd387b.js +1 -1
  99. package/web/.next/server/chunks/ssr/403f9_next_dist_esm_build_templates_app-page_d1fd387b.js.map +1 -1
  100. package/web/.next/server/chunks/ssr/403f9_next_dist_esm_build_templates_app-page_d82f78f0.js +1 -1
  101. package/web/.next/server/chunks/ssr/403f9_next_dist_esm_build_templates_app-page_d82f78f0.js.map +1 -1
  102. package/web/.next/server/chunks/ssr/744ca_web_components_common_control-center-drawer_create-drawer-client_tsx_5e26fc0a._.js +1 -1
  103. package/web/.next/server/chunks/ssr/744ca_web_components_common_control-center-drawer_create-drawer-client_tsx_5e26fc0a._.js.map +1 -1
  104. package/web/.next/server/chunks/ssr/7f428_lucide-react_dist_esm_icons_d0119342._.js +3 -0
  105. package/web/.next/server/chunks/ssr/7f428_lucide-react_dist_esm_icons_d0119342._.js.map +1 -0
  106. package/web/.next/server/chunks/ssr/7f428_lucide-react_dist_esm_icons_rocket_1575cd4d.js +3 -0
  107. package/web/.next/server/chunks/ssr/7f428_lucide-react_dist_esm_icons_rocket_1575cd4d.js.map +1 -0
  108. package/web/.next/server/chunks/ssr/8ba4b_server_app_(dashboard)_@drawer_repository_[repositoryId]_page_actions_ed372306.js +1 -1
  109. package/web/.next/server/chunks/ssr/8ba4b_server_app_(dashboard)_@drawer_repository_[repositoryId]_page_actions_ed372306.js.map +1 -1
  110. package/web/.next/server/chunks/ssr/8ba4b_server_app_(dashboard)_repository_[repositoryId]_page_actions_32e26434.js +1 -1
  111. package/web/.next/server/chunks/ssr/8ba4b_server_app_(dashboard)_repository_[repositoryId]_page_actions_32e26434.js.map +1 -1
  112. package/web/.next/server/chunks/ssr/[root-of-the-server]__07a39ff2._.js +1 -1
  113. package/web/.next/server/chunks/ssr/[root-of-the-server]__07a39ff2._.js.map +1 -1
  114. package/web/.next/server/chunks/ssr/[root-of-the-server]__0880ff0e._.js +1 -1
  115. package/web/.next/server/chunks/ssr/[root-of-the-server]__0880ff0e._.js.map +1 -1
  116. package/web/.next/server/chunks/ssr/[root-of-the-server]__11033878._.js +1 -1
  117. package/web/.next/server/chunks/ssr/[root-of-the-server]__11033878._.js.map +1 -1
  118. package/web/.next/server/chunks/ssr/[root-of-the-server]__172d9576._.js +1 -1
  119. package/web/.next/server/chunks/ssr/[root-of-the-server]__172d9576._.js.map +1 -1
  120. package/web/.next/server/chunks/ssr/[root-of-the-server]__23b5ca2c._.js +1 -1
  121. package/web/.next/server/chunks/ssr/[root-of-the-server]__23b5ca2c._.js.map +1 -1
  122. package/web/.next/server/chunks/ssr/[root-of-the-server]__24dd0927._.js +2 -2
  123. package/web/.next/server/chunks/ssr/[root-of-the-server]__2a5592d5._.js +1 -1
  124. package/web/.next/server/chunks/ssr/[root-of-the-server]__2a5592d5._.js.map +1 -1
  125. package/web/.next/server/chunks/ssr/[root-of-the-server]__52485955._.js +1 -1
  126. package/web/.next/server/chunks/ssr/[root-of-the-server]__5d87af2e._.js +4 -0
  127. package/web/.next/server/chunks/ssr/[root-of-the-server]__5d87af2e._.js.map +1 -0
  128. package/web/.next/server/chunks/ssr/[root-of-the-server]__5edfc56b._.js +1 -1
  129. package/web/.next/server/chunks/ssr/[root-of-the-server]__5edfc56b._.js.map +1 -1
  130. package/web/.next/server/chunks/ssr/[root-of-the-server]__6367aea0._.js +3 -0
  131. package/web/.next/server/chunks/ssr/[root-of-the-server]__6367aea0._.js.map +1 -0
  132. package/web/.next/server/chunks/ssr/[root-of-the-server]__684a868c._.js +1 -1
  133. package/web/.next/server/chunks/ssr/[root-of-the-server]__684a868c._.js.map +1 -1
  134. package/web/.next/server/chunks/ssr/[root-of-the-server]__6eb2a2b0._.js +1 -1
  135. package/web/.next/server/chunks/ssr/[root-of-the-server]__6eb2a2b0._.js.map +1 -1
  136. package/web/.next/server/chunks/ssr/{[root-of-the-server]__19187772._.js → [root-of-the-server]__89e8a5cc._.js} +3 -3
  137. package/web/.next/server/chunks/ssr/[root-of-the-server]__89e8a5cc._.js.map +1 -0
  138. package/web/.next/server/chunks/ssr/[root-of-the-server]__8c88ef55._.js +1 -1
  139. package/web/.next/server/chunks/ssr/[root-of-the-server]__8c88ef55._.js.map +1 -1
  140. package/web/.next/server/chunks/ssr/[root-of-the-server]__a93289b0._.js +1 -1
  141. package/web/.next/server/chunks/ssr/[root-of-the-server]__a93289b0._.js.map +1 -1
  142. package/web/.next/server/chunks/ssr/[root-of-the-server]__aad040c0._.js +2 -2
  143. package/web/.next/server/chunks/ssr/[root-of-the-server]__aad040c0._.js.map +1 -1
  144. package/web/.next/server/chunks/ssr/[root-of-the-server]__ac0304e7._.js +1 -1
  145. package/web/.next/server/chunks/ssr/[root-of-the-server]__ac0304e7._.js.map +1 -1
  146. package/web/.next/server/chunks/ssr/[root-of-the-server]__b1e68e34._.js +3 -0
  147. package/web/.next/server/chunks/ssr/[root-of-the-server]__b1e68e34._.js.map +1 -0
  148. package/web/.next/server/chunks/ssr/[root-of-the-server]__c16bf5de._.js +1 -1
  149. package/web/.next/server/chunks/ssr/[root-of-the-server]__c16bf5de._.js.map +1 -1
  150. package/web/.next/server/chunks/ssr/[root-of-the-server]__c9777776._.js +1 -1
  151. package/web/.next/server/chunks/ssr/[root-of-the-server]__c9777776._.js.map +1 -1
  152. package/web/.next/server/chunks/ssr/[root-of-the-server]__fdc75809._.js +1 -1
  153. package/web/.next/server/chunks/ssr/[root-of-the-server]__fdc75809._.js.map +1 -1
  154. package/web/.next/server/chunks/ssr/_0e506641._.js +7 -0
  155. package/web/.next/server/chunks/ssr/_0e506641._.js.map +1 -0
  156. package/web/.next/server/chunks/ssr/_125679ad._.js +3 -0
  157. package/web/.next/server/chunks/ssr/_125679ad._.js.map +1 -0
  158. package/web/.next/server/chunks/ssr/_135edb9c._.js +3 -0
  159. package/web/.next/server/chunks/ssr/_135edb9c._.js.map +1 -0
  160. package/web/.next/server/chunks/ssr/_16235e5e._.js +1 -1
  161. package/web/.next/server/chunks/ssr/_16235e5e._.js.map +1 -1
  162. package/web/.next/server/chunks/ssr/_1bb131c4._.js +3 -0
  163. package/web/.next/server/chunks/ssr/_1bb131c4._.js.map +1 -0
  164. package/web/.next/server/chunks/ssr/_273d4632._.js +3 -0
  165. package/web/.next/server/chunks/ssr/_273d4632._.js.map +1 -0
  166. package/web/.next/server/chunks/ssr/_6887cba3._.js +1 -1
  167. package/web/.next/server/chunks/ssr/_6887cba3._.js.map +1 -1
  168. package/web/.next/server/chunks/ssr/_6d26a08f._.js +3 -0
  169. package/web/.next/server/chunks/ssr/_6d26a08f._.js.map +1 -0
  170. package/web/.next/server/chunks/ssr/_8dacd1e7._.js +1 -1
  171. package/web/.next/server/chunks/ssr/_8dacd1e7._.js.map +1 -1
  172. package/web/.next/server/chunks/ssr/_8eeee4db._.js +1 -1
  173. package/web/.next/server/chunks/ssr/_8eeee4db._.js.map +1 -1
  174. package/web/.next/server/chunks/ssr/{_a0b23a7c._.js → _a8d14ab2._.js} +2 -2
  175. package/web/.next/server/chunks/ssr/{_a0b23a7c._.js.map → _a8d14ab2._.js.map} +1 -1
  176. package/web/.next/server/chunks/ssr/_b5fc318a._.js +3 -0
  177. package/web/.next/server/chunks/ssr/_b5fc318a._.js.map +1 -0
  178. package/web/.next/server/chunks/ssr/_cc77a143._.js +3 -0
  179. package/web/.next/server/chunks/ssr/_cc77a143._.js.map +1 -0
  180. package/web/.next/server/chunks/ssr/{_9f81a163._.js → _d6a1ec27._.js} +2 -2
  181. package/web/.next/server/chunks/ssr/{_9f81a163._.js.map → _d6a1ec27._.js.map} +1 -1
  182. package/web/.next/server/chunks/ssr/_ed11dcd6._.js +1 -1
  183. package/web/.next/server/chunks/ssr/_ed11dcd6._.js.map +1 -1
  184. package/web/.next/server/chunks/ssr/_f4d222d6._.js +1 -1
  185. package/web/.next/server/chunks/ssr/_f4d222d6._.js.map +1 -1
  186. package/web/.next/server/chunks/ssr/_f5316e67._.js +3 -0
  187. package/web/.next/server/chunks/ssr/_f5316e67._.js.map +1 -0
  188. package/web/.next/server/chunks/ssr/b1a17_presentation_web_components_features_settings_settings-page-client_tsx_6ed9d5f8._.js +1 -1
  189. package/web/.next/server/chunks/ssr/b1a17_presentation_web_components_features_settings_settings-page-client_tsx_6ed9d5f8._.js.map +1 -1
  190. package/web/.next/server/chunks/ssr/src_presentation_web_0835b28e._.js +2 -2
  191. package/web/.next/server/chunks/ssr/src_presentation_web_0835b28e._.js.map +1 -1
  192. package/web/.next/server/chunks/ssr/src_presentation_web__next-internal_server_app_(dashboard)_page_actions_e99d78dd.js +1 -1
  193. package/web/.next/server/chunks/ssr/src_presentation_web__next-internal_server_app_(dashboard)_page_actions_e99d78dd.js.map +1 -1
  194. package/web/.next/server/chunks/ssr/src_presentation_web__next-internal_server_app_skills_page_actions_1fa8042e.js +1 -1
  195. package/web/.next/server/chunks/ssr/src_presentation_web__next-internal_server_app_skills_page_actions_1fa8042e.js.map +1 -1
  196. package/web/.next/server/chunks/ssr/src_presentation_web__next-internal_server_app_tools_page_actions_24684200.js +1 -1
  197. package/web/.next/server/chunks/ssr/src_presentation_web__next-internal_server_app_tools_page_actions_24684200.js.map +1 -1
  198. package/web/.next/server/chunks/ssr/src_presentation_web_components_bf50c527._.js +1 -1
  199. package/web/.next/server/chunks/ssr/src_presentation_web_components_de814675._.js +1 -1
  200. package/web/.next/server/chunks/ssr/src_presentation_web_components_e599bb8c._.js +1 -1
  201. package/web/.next/server/chunks/ssr/src_presentation_web_components_e599bb8c._.js.map +1 -1
  202. package/web/.next/server/chunks/ssr/src_presentation_web_components_features_control-center_7ac3562e._.js +1 -1
  203. package/web/.next/server/chunks/ssr/src_presentation_web_components_features_control-center_7ac3562e._.js.map +1 -1
  204. package/web/.next/server/chunks/ssr/src_presentation_web_e8034a29._.js +2 -2
  205. package/web/.next/server/chunks/ssr/src_presentation_web_e8034a29._.js.map +1 -1
  206. package/web/.next/server/middleware-build-manifest.js +4 -4
  207. package/web/.next/server/pages/500.html +2 -2
  208. package/web/.next/server/server-reference-manifest.js +1 -1
  209. package/web/.next/server/server-reference-manifest.json +32 -99
  210. package/web/.next/static/chunks/{b890d6030441cf27.js → 2251df6427162751.js} +1 -1
  211. package/web/.next/static/chunks/{fc0fb1f7061949ef.js → 2c98935265aa3622.js} +2 -2
  212. package/web/.next/static/chunks/303a1217006489b9.js +1 -0
  213. package/web/.next/static/chunks/{206f677ee9f6dc5d.js → 34b275db4ad6fb5d.js} +1 -1
  214. package/web/.next/static/chunks/3a806cf059241bc9.js +1 -0
  215. package/web/.next/static/chunks/{c6ad05eb3945ee43.js → 425894e5bf370bd2.js} +2 -2
  216. package/web/.next/static/chunks/498777301470975b.js +1 -0
  217. package/web/.next/static/chunks/50f06bb71bace452.js +1 -0
  218. package/web/.next/static/chunks/5fe03deadb83628b.js +1 -0
  219. package/web/.next/static/chunks/619af41a8d3232e5.js +1 -0
  220. package/web/.next/static/chunks/62a8173911f8f130.css +1 -0
  221. package/web/.next/static/chunks/84a181ff3270fd9f.js +1 -0
  222. package/web/.next/static/chunks/b1f3c0e8e9872ef8.js +1 -0
  223. package/web/.next/static/chunks/b855de1b1e5458f6.js +11 -0
  224. package/web/.next/static/chunks/c76f6d06b1b69b57.js +1 -0
  225. package/web/.next/static/chunks/e2caffa0bb759c6c.js +1 -0
  226. package/web/.next/static/chunks/ed3a602003bcb31b.js +1 -0
  227. package/web/.next/static/chunks/fcde0cbb2976b933.js +1 -0
  228. package/web/.next/static/chunks/{turbopack-b1685b5f87ad1d60.js → turbopack-426d9bc2450816ba.js} +1 -1
  229. package/dist/src/presentation/web/app/actions/execute-query.d.ts +0 -7
  230. package/dist/src/presentation/web/app/actions/execute-query.d.ts.map +0 -1
  231. package/dist/src/presentation/web/app/actions/execute-query.js +0 -55
  232. package/dist/src/presentation/web/app/actions/get-table-rows.d.ts +0 -10
  233. package/dist/src/presentation/web/app/actions/get-table-rows.d.ts.map +0 -1
  234. package/dist/src/presentation/web/app/actions/get-table-rows.js +0 -55
  235. package/dist/src/presentation/web/app/actions/get-table-schema.d.ts +0 -13
  236. package/dist/src/presentation/web/app/actions/get-table-schema.d.ts.map +0 -1
  237. package/dist/src/presentation/web/app/actions/get-table-schema.js +0 -27
  238. package/dist/src/presentation/web/app/actions/list-tables.d.ts +0 -10
  239. package/dist/src/presentation/web/app/actions/list-tables.d.ts.map +0 -1
  240. package/dist/src/presentation/web/app/actions/list-tables.js +0 -19
  241. package/dist/src/presentation/web/app/database/page.d.ts +0 -4
  242. package/dist/src/presentation/web/app/database/page.d.ts.map +0 -1
  243. package/dist/src/presentation/web/app/database/page.js +0 -15
  244. package/dist/src/presentation/web/components/features/database/cell-value-dialog.d.ts +0 -8
  245. package/dist/src/presentation/web/components/features/database/cell-value-dialog.d.ts.map +0 -1
  246. package/dist/src/presentation/web/components/features/database/cell-value-dialog.js +0 -7
  247. package/dist/src/presentation/web/components/features/database/cell-value-dialog.stories.d.ts +0 -10
  248. package/dist/src/presentation/web/components/features/database/cell-value-dialog.stories.d.ts.map +0 -1
  249. package/dist/src/presentation/web/components/features/database/cell-value-dialog.stories.js +0 -48
  250. package/dist/src/presentation/web/components/features/database/database-page-client.d.ts +0 -13
  251. package/dist/src/presentation/web/components/features/database/database-page-client.d.ts.map +0 -1
  252. package/dist/src/presentation/web/components/features/database/database-page-client.js +0 -75
  253. package/dist/src/presentation/web/components/features/database/database-page-client.stories.d.ts +0 -9
  254. package/dist/src/presentation/web/components/features/database/database-page-client.stories.d.ts.map +0 -1
  255. package/dist/src/presentation/web/components/features/database/database-page-client.stories.js +0 -74
  256. package/dist/src/presentation/web/components/features/database/query-runner.d.ts +0 -9
  257. package/dist/src/presentation/web/components/features/database/query-runner.d.ts.map +0 -1
  258. package/dist/src/presentation/web/components/features/database/query-runner.js +0 -53
  259. package/dist/src/presentation/web/components/features/database/query-runner.stories.d.ts +0 -9
  260. package/dist/src/presentation/web/components/features/database/query-runner.stories.d.ts.map +0 -1
  261. package/dist/src/presentation/web/components/features/database/query-runner.stories.js +0 -55
  262. package/dist/src/presentation/web/components/features/database/row-browser.d.ts +0 -11
  263. package/dist/src/presentation/web/components/features/database/row-browser.d.ts.map +0 -1
  264. package/dist/src/presentation/web/components/features/database/row-browser.js +0 -42
  265. package/dist/src/presentation/web/components/features/database/row-browser.stories.d.ts +0 -14
  266. package/dist/src/presentation/web/components/features/database/row-browser.stories.d.ts.map +0 -1
  267. package/dist/src/presentation/web/components/features/database/row-browser.stories.js +0 -120
  268. package/dist/src/presentation/web/components/features/database/schema-viewer.d.ts +0 -7
  269. package/dist/src/presentation/web/components/features/database/schema-viewer.d.ts.map +0 -1
  270. package/dist/src/presentation/web/components/features/database/schema-viewer.js +0 -13
  271. package/dist/src/presentation/web/components/features/database/schema-viewer.stories.d.ts +0 -11
  272. package/dist/src/presentation/web/components/features/database/schema-viewer.stories.d.ts.map +0 -1
  273. package/dist/src/presentation/web/components/features/database/schema-viewer.stories.js +0 -67
  274. package/dist/src/presentation/web/components/features/database/table-list.d.ts +0 -8
  275. package/dist/src/presentation/web/components/features/database/table-list.d.ts.map +0 -1
  276. package/dist/src/presentation/web/components/features/database/table-list.js +0 -17
  277. package/dist/src/presentation/web/components/features/database/table-list.stories.d.ts +0 -10
  278. package/dist/src/presentation/web/components/features/database/table-list.stories.d.ts.map +0 -1
  279. package/dist/src/presentation/web/components/features/database/table-list.stories.js +0 -66
  280. package/dist/src/presentation/web/components/ui/table.d.ts +0 -11
  281. package/dist/src/presentation/web/components/ui/table.d.ts.map +0 -1
  282. package/dist/src/presentation/web/components/ui/table.js +0 -28
  283. package/dist/src/presentation/web/lib/server-db.d.ts +0 -16
  284. package/dist/src/presentation/web/lib/server-db.d.ts.map +0 -1
  285. package/dist/src/presentation/web/lib/server-db.js +0 -10
  286. package/dist/src/presentation/web/lib/sql-validation.d.ts +0 -7
  287. package/dist/src/presentation/web/lib/sql-validation.d.ts.map +0 -1
  288. package/dist/src/presentation/web/lib/sql-validation.js +0 -17
  289. package/web/.next/server/app/database/page/app-paths-manifest.json +0 -3
  290. package/web/.next/server/app/database/page/build-manifest.json +0 -18
  291. package/web/.next/server/app/database/page/next-font-manifest.json +0 -6
  292. package/web/.next/server/app/database/page/react-loadable-manifest.json +0 -1
  293. package/web/.next/server/app/database/page/server-reference-manifest.json +0 -80
  294. package/web/.next/server/app/database/page.js +0 -16
  295. package/web/.next/server/app/database/page.js.map +0 -5
  296. package/web/.next/server/app/database/page.js.nft.json +0 -1
  297. package/web/.next/server/app/database/page_client-reference-manifest.js +0 -2
  298. package/web/.next/server/chunks/ssr/[root-of-the-server]__19187772._.js.map +0 -1
  299. package/web/.next/server/chunks/ssr/[root-of-the-server]__29958296._.js +0 -3
  300. package/web/.next/server/chunks/ssr/[root-of-the-server]__29958296._.js.map +0 -1
  301. package/web/.next/server/chunks/ssr/[root-of-the-server]__2d3ecc16._.js +0 -3
  302. package/web/.next/server/chunks/ssr/[root-of-the-server]__2d3ecc16._.js.map +0 -1
  303. package/web/.next/server/chunks/ssr/[root-of-the-server]__590dfc34._.js +0 -4
  304. package/web/.next/server/chunks/ssr/[root-of-the-server]__590dfc34._.js.map +0 -1
  305. package/web/.next/server/chunks/ssr/[root-of-the-server]__6aae816d._.js +0 -4
  306. package/web/.next/server/chunks/ssr/[root-of-the-server]__6aae816d._.js.map +0 -1
  307. package/web/.next/server/chunks/ssr/[root-of-the-server]__930c8634._.js +0 -3
  308. package/web/.next/server/chunks/ssr/[root-of-the-server]__930c8634._.js.map +0 -1
  309. package/web/.next/server/chunks/ssr/_0e6034fc._.js +0 -3
  310. package/web/.next/server/chunks/ssr/_0e6034fc._.js.map +0 -1
  311. package/web/.next/server/chunks/ssr/_34ba40e0._.js +0 -3
  312. package/web/.next/server/chunks/ssr/_34ba40e0._.js.map +0 -1
  313. package/web/.next/server/chunks/ssr/_43997634._.js +0 -3
  314. package/web/.next/server/chunks/ssr/_43997634._.js.map +0 -1
  315. package/web/.next/server/chunks/ssr/_5b809cd2._.js +0 -4
  316. package/web/.next/server/chunks/ssr/_5b809cd2._.js.map +0 -1
  317. package/web/.next/server/chunks/ssr/_6552e0aa._.js +0 -3
  318. package/web/.next/server/chunks/ssr/_6552e0aa._.js.map +0 -1
  319. package/web/.next/server/chunks/ssr/_78be8103._.js +0 -3
  320. package/web/.next/server/chunks/ssr/_78be8103._.js.map +0 -1
  321. package/web/.next/server/chunks/ssr/_95f78b9e._.js +0 -3
  322. package/web/.next/server/chunks/ssr/_95f78b9e._.js.map +0 -1
  323. package/web/.next/server/chunks/ssr/_ad5819d0._.js +0 -3
  324. package/web/.next/server/chunks/ssr/_ad5819d0._.js.map +0 -1
  325. package/web/.next/server/chunks/ssr/_e35fc15d._.js +0 -3
  326. package/web/.next/server/chunks/ssr/_e35fc15d._.js.map +0 -1
  327. package/web/.next/server/chunks/ssr/_e4923d09._.js +0 -7
  328. package/web/.next/server/chunks/ssr/_e4923d09._.js.map +0 -1
  329. package/web/.next/server/chunks/ssr/_f38b49fe._.js +0 -3
  330. package/web/.next/server/chunks/ssr/_f38b49fe._.js.map +0 -1
  331. package/web/.next/server/chunks/ssr/_f9959908._.js +0 -3
  332. package/web/.next/server/chunks/ssr/_f9959908._.js.map +0 -1
  333. package/web/.next/server/chunks/ssr/b1a17_presentation_web_components_features_database_database-page-client_tsx_b853607a._.js +0 -3
  334. package/web/.next/server/chunks/ssr/b1a17_presentation_web_components_features_database_database-page-client_tsx_b853607a._.js.map +0 -1
  335. package/web/.next/server/chunks/ssr/node_modules__pnpm_8b0ea744._.js +0 -3
  336. package/web/.next/server/chunks/ssr/node_modules__pnpm_8b0ea744._.js.map +0 -1
  337. package/web/.next/server/chunks/ssr/src_presentation_web_components_ui_scroll-area_tsx_53ae5be7._.js +0 -3
  338. package/web/.next/server/chunks/ssr/src_presentation_web_components_ui_scroll-area_tsx_53ae5be7._.js.map +0 -1
  339. package/web/.next/static/chunks/1bee2061703e096e.js +0 -1
  340. package/web/.next/static/chunks/40b6bcf1a2de4a0f.js +0 -1
  341. package/web/.next/static/chunks/4395a53ed15eef72.js +0 -1
  342. package/web/.next/static/chunks/57f503ca6caf30d1.js +0 -1
  343. package/web/.next/static/chunks/5b305e0321c90039.js +0 -1
  344. package/web/.next/static/chunks/692a746daf1778d6.js +0 -1
  345. package/web/.next/static/chunks/78334cf5381241fe.css +0 -1
  346. package/web/.next/static/chunks/7d61f552216da1a2.js +0 -1
  347. package/web/.next/static/chunks/958828e09daddad9.js +0 -1
  348. package/web/.next/static/chunks/a659cdb17ae65f2e.js +0 -1
  349. package/web/.next/static/chunks/ac9e29ce89401022.js +0 -11
  350. package/web/.next/static/chunks/c20537d1fd9f2494.js +0 -1
  351. package/web/.next/static/chunks/c2c0d4e71c36199f.js +0 -1
  352. package/web/.next/static/chunks/c7e793951b20a67f.js +0 -1
  353. package/web/.next/static/chunks/d647189ea3b87ed4.js +0 -1
  354. package/web/.next/static/chunks/f8bf91061681f06c.js +0 -1
  355. /package/web/.next/static/{7el9fE5_x45gdlg69l1-h → bAT4Gm6M7U0lGmNAN3mTn}/_buildManifest.js +0 -0
  356. /package/web/.next/static/{7el9fE5_x45gdlg69l1-h → bAT4Gm6M7U0lGmNAN3mTn}/_clientMiddlewareManifest.json +0 -0
  357. /package/web/.next/static/{7el9fE5_x45gdlg69l1-h → bAT4Gm6M7U0lGmNAN3mTn}/_ssgManifest.js +0 -0
@@ -1 +0,0 @@
1
- (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,87342,e=>{"use strict";var t=e.i(79054),a=e.i(22528),s=e.i(5978),r=e.i(86874),i=e.i(20314);function n(e){let n=e+"CollectionProvider",[l,o]=(0,a.createContextScope)(n),[d,c]=l(n,{collectionRef:{current:null},itemMap:new Map}),u=e=>{let{scope:a,children:s}=e,r=t.default.useRef(null),n=t.default.useRef(new Map).current;return(0,i.jsx)(d,{scope:a,itemMap:n,collectionRef:r,children:s})};u.displayName=n;let f=e+"CollectionSlot",m=(0,r.createSlot)(f),h=t.default.forwardRef((e,t)=>{let{scope:a,children:r}=e,n=c(f,a),l=(0,s.useComposedRefs)(t,n.collectionRef);return(0,i.jsx)(m,{ref:l,children:r})});h.displayName=f;let x=e+"CollectionItemSlot",p="data-radix-collection-item",g=(0,r.createSlot)(x),v=t.default.forwardRef((e,a)=>{let{scope:r,children:n,...l}=e,o=t.default.useRef(null),d=(0,s.useComposedRefs)(a,o),u=c(x,r);return t.default.useEffect(()=>(u.itemMap.set(o,{ref:o,...l}),()=>void u.itemMap.delete(o))),(0,i.jsx)(g,{...{[p]:""},ref:d,children:n})});return v.displayName=x,[{Provider:u,Slot:h,ItemSlot:v},function(a){let s=c(e+"CollectionConsumer",a);return t.default.useCallback(()=>{let e=s.collectionRef.current;if(!e)return[];let t=Array.from(e.querySelectorAll(`[${p}]`));return Array.from(s.itemMap.values()).sort((e,a)=>t.indexOf(e.ref.current)-t.indexOf(a.ref.current))},[s.collectionRef,s.itemMap])},o]}var l=new WeakMap;function o(e,t){var a,s;let r,i,n;if("at"in Array.prototype)return Array.prototype.at.call(e,t);let l=(a=e,s=t,r=a.length,(n=(i=d(s))>=0?i:r+i)<0||n>=r?-1:n);return -1===l?void 0:e[l]}function d(e){return e!=e||0===e?0:Math.trunc(e)}(class e extends Map{#e;constructor(e){super(e),this.#e=[...super.keys()],l.set(this,!0)}set(e,t){return l.get(this)&&(this.has(e)?this.#e[this.#e.indexOf(e)]=e:this.#e.push(e)),super.set(e,t),this}insert(e,t,a){let s,r=this.has(t),i=this.#e.length,n=d(e),l=n>=0?n:i+n,o=l<0||l>=i?-1:l;if(o===this.size||r&&o===this.size-1||-1===o)return this.set(t,a),this;let c=this.size+ +!r;n<0&&l++;let u=[...this.#e],f=!1;for(let e=l;e<c;e++)if(l===e){let i=u[e];u[e]===t&&(i=u[e+1]),r&&this.delete(t),s=this.get(i),this.set(t,a)}else{f||u[e-1]!==t||(f=!0);let a=u[f?e:e-1],r=s;s=this.get(a),this.delete(a),this.set(a,r)}return this}with(t,a,s){let r=new e(this);return r.insert(t,a,s),r}before(e){let t=this.#e.indexOf(e)-1;if(!(t<0))return this.entryAt(t)}setBefore(e,t,a){let s=this.#e.indexOf(e);return -1===s?this:this.insert(s,t,a)}after(e){let t=this.#e.indexOf(e);if(-1!==(t=-1===t||t===this.size-1?-1:t+1))return this.entryAt(t)}setAfter(e,t,a){let s=this.#e.indexOf(e);return -1===s?this:this.insert(s+1,t,a)}first(){return this.entryAt(0)}last(){return this.entryAt(-1)}clear(){return this.#e=[],super.clear()}delete(e){let t=super.delete(e);return t&&this.#e.splice(this.#e.indexOf(e),1),t}deleteAt(e){let t=this.keyAt(e);return void 0!==t&&this.delete(t)}at(e){let t=o(this.#e,e);if(void 0!==t)return this.get(t)}entryAt(e){let t=o(this.#e,e);if(void 0!==t)return[t,this.get(t)]}indexOf(e){return this.#e.indexOf(e)}keyAt(e){return o(this.#e,e)}from(e,t){let a=this.indexOf(e);if(-1===a)return;let s=a+t;return s<0&&(s=0),s>=this.size&&(s=this.size-1),this.at(s)}keyFrom(e,t){let a=this.indexOf(e);if(-1===a)return;let s=a+t;return s<0&&(s=0),s>=this.size&&(s=this.size-1),this.keyAt(s)}find(e,t){let a=0;for(let s of this){if(Reflect.apply(e,t,[s,a,this]))return s;a++}}findIndex(e,t){let a=0;for(let s of this){if(Reflect.apply(e,t,[s,a,this]))return a;a++}return -1}filter(t,a){let s=[],r=0;for(let e of this)Reflect.apply(t,a,[e,r,this])&&s.push(e),r++;return new e(s)}map(t,a){let s=[],r=0;for(let e of this)s.push([e[0],Reflect.apply(t,a,[e,r,this])]),r++;return new e(s)}reduce(...e){let[t,a]=e,s=0,r=a??this.at(0);for(let a of this)r=0===s&&1===e.length?a:Reflect.apply(t,this,[r,a,s,this]),s++;return r}reduceRight(...e){let[t,a]=e,s=a??this.at(-1);for(let a=this.size-1;a>=0;a--){let r=this.at(a);s=a===this.size-1&&1===e.length?r:Reflect.apply(t,this,[s,r,a,this])}return s}toSorted(t){return new e([...this.entries()].sort(t))}toReversed(){let t=new e;for(let e=this.size-1;e>=0;e--){let a=this.keyAt(e),s=this.get(a);t.set(a,s)}return t}toSpliced(...t){let a=[...this.entries()];return a.splice(...t),new e(a)}slice(t,a){let s=new e,r=this.size-1;if(void 0===t)return s;t<0&&(t+=this.size),void 0!==a&&a>0&&(r=a-1);for(let e=t;e<=r;e++){let t=this.keyAt(e),a=this.get(t);s.set(t,a)}return s}every(e,t){let a=0;for(let s of this){if(!Reflect.apply(e,t,[s,a,this]))return!1;a++}return!0}some(e,t){let a=0;for(let s of this){if(Reflect.apply(e,t,[s,a,this]))return!0;a++}return!1}}),e.s(["createCollection",()=>n])},68304,51080,e=>{"use strict";var t=e.i(20314),a=e.i(79054),s=e.i(91967),r=e.i(22528),i=e.i(87342),n=e.i(5978),l=e.i(13123),o=e.i(87620),d=e.i(29297),c=e.i(36589),u=e.i(66033),f="rovingFocusGroup.onEntryFocus",m={bubbles:!1,cancelable:!0},h="RovingFocusGroup",[x,p,g]=(0,i.createCollection)(h),[v,b]=(0,r.createContextScope)(h,[g]),[y,j]=v(h),N=a.forwardRef((e,a)=>(0,t.jsx)(x.Provider,{scope:e.__scopeRovingFocusGroup,children:(0,t.jsx)(x.Slot,{scope:e.__scopeRovingFocusGroup,children:(0,t.jsx)(w,{...e,ref:a})})}));N.displayName=h;var w=a.forwardRef((e,r)=>{let{__scopeRovingFocusGroup:i,orientation:l,loop:x=!1,dir:g,currentTabStopId:v,defaultCurrentTabStopId:b,onCurrentTabStopIdChange:j,onEntryFocus:N,preventScrollOnEntryFocus:w=!1,...C}=e,R=a.useRef(null),T=(0,n.useComposedRefs)(r,R),D=(0,u.useDirection)(g),[S,A]=(0,c.useControllableState)({prop:v,defaultProp:b??null,onChange:j,caller:h}),[E,L]=a.useState(!1),P=(0,d.useCallbackRef)(N),I=p(i),z=a.useRef(!1),[F,M]=a.useState(0);return a.useEffect(()=>{let e=R.current;if(e)return e.addEventListener(f,P),()=>e.removeEventListener(f,P)},[P]),(0,t.jsx)(y,{scope:i,orientation:l,dir:D,loop:x,currentTabStopId:S,onItemFocus:a.useCallback(e=>A(e),[A]),onItemShiftTab:a.useCallback(()=>L(!0),[]),onFocusableItemAdd:a.useCallback(()=>M(e=>e+1),[]),onFocusableItemRemove:a.useCallback(()=>M(e=>e-1),[]),children:(0,t.jsx)(o.Primitive.div,{tabIndex:E||0===F?-1:0,"data-orientation":l,...C,ref:T,style:{outline:"none",...e.style},onMouseDown:(0,s.composeEventHandlers)(e.onMouseDown,()=>{z.current=!0}),onFocus:(0,s.composeEventHandlers)(e.onFocus,e=>{let t=!z.current;if(e.target===e.currentTarget&&t&&!E){let t=new CustomEvent(f,m);if(e.currentTarget.dispatchEvent(t),!t.defaultPrevented){let e=I().filter(e=>e.focusable);k([e.find(e=>e.active),e.find(e=>e.id===S),...e].filter(Boolean).map(e=>e.ref.current),w)}}z.current=!1}),onBlur:(0,s.composeEventHandlers)(e.onBlur,()=>L(!1))})})}),C="RovingFocusGroupItem",R=a.forwardRef((e,r)=>{let{__scopeRovingFocusGroup:i,focusable:n=!0,active:d=!1,tabStopId:c,children:u,...f}=e,m=(0,l.useId)(),h=c||m,g=j(C,i),v=g.currentTabStopId===h,b=p(i),{onFocusableItemAdd:y,onFocusableItemRemove:N,currentTabStopId:w}=g;return a.useEffect(()=>{if(n)return y(),()=>N()},[n,y,N]),(0,t.jsx)(x.ItemSlot,{scope:i,id:h,focusable:n,active:d,children:(0,t.jsx)(o.Primitive.span,{tabIndex:v?0:-1,"data-orientation":g.orientation,...f,ref:r,onMouseDown:(0,s.composeEventHandlers)(e.onMouseDown,e=>{n?g.onItemFocus(h):e.preventDefault()}),onFocus:(0,s.composeEventHandlers)(e.onFocus,()=>g.onItemFocus(h)),onKeyDown:(0,s.composeEventHandlers)(e.onKeyDown,e=>{if("Tab"===e.key&&e.shiftKey)return void g.onItemShiftTab();if(e.target!==e.currentTarget)return;let t=function(e,t,a){var s;let r=(s=e.key,"rtl"!==a?s:"ArrowLeft"===s?"ArrowRight":"ArrowRight"===s?"ArrowLeft":s);if(!("vertical"===t&&["ArrowLeft","ArrowRight"].includes(r))&&!("horizontal"===t&&["ArrowUp","ArrowDown"].includes(r)))return T[r]}(e,g.orientation,g.dir);if(void 0!==t){if(e.metaKey||e.ctrlKey||e.altKey||e.shiftKey)return;e.preventDefault();let r=b().filter(e=>e.focusable).map(e=>e.ref.current);if("last"===t)r.reverse();else if("prev"===t||"next"===t){var a,s;"prev"===t&&r.reverse();let i=r.indexOf(e.currentTarget);r=g.loop?(a=r,s=i+1,a.map((e,t)=>a[(s+t)%a.length])):r.slice(i+1)}setTimeout(()=>k(r))}}),children:"function"==typeof u?u({isCurrentTabStop:v,hasTabStop:null!=w}):u})})});R.displayName=C;var T={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function k(e,t=!1){let a=document.activeElement;for(let s of e)if(s===a||(s.focus({preventScroll:t}),document.activeElement!==a))return}e.s(["Item",()=>R,"Root",()=>N,"createRovingFocusGroupScope",()=>b],51080);var D=e.i(85995),S="Tabs",[A,E]=(0,r.createContextScope)(S,[b]),L=b(),[P,I]=A(S),z=a.forwardRef((e,a)=>{let{__scopeTabs:s,value:r,onValueChange:i,defaultValue:n,orientation:d="horizontal",dir:f,activationMode:m="automatic",...h}=e,x=(0,u.useDirection)(f),[p,g]=(0,c.useControllableState)({prop:r,onChange:i,defaultProp:n??"",caller:S});return(0,t.jsx)(P,{scope:s,baseId:(0,l.useId)(),value:p,onValueChange:g,orientation:d,dir:x,activationMode:m,children:(0,t.jsx)(o.Primitive.div,{dir:x,"data-orientation":d,...h,ref:a})})});z.displayName=S;var F="TabsList",M=a.forwardRef((e,a)=>{let{__scopeTabs:s,loop:r=!0,...i}=e,n=I(F,s),l=L(s);return(0,t.jsx)(N,{asChild:!0,...l,orientation:n.orientation,dir:n.dir,loop:r,children:(0,t.jsx)(o.Primitive.div,{role:"tablist","aria-orientation":n.orientation,...i,ref:a})})});M.displayName=F;var O="TabsTrigger",H=a.forwardRef((e,a)=>{let{__scopeTabs:r,value:i,disabled:n=!1,...l}=e,d=I(O,r),c=L(r),u=U(d.baseId,i),f=B(d.baseId,i),m=i===d.value;return(0,t.jsx)(R,{asChild:!0,...c,focusable:!n,active:m,children:(0,t.jsx)(o.Primitive.button,{type:"button",role:"tab","aria-selected":m,"aria-controls":f,"data-state":m?"active":"inactive","data-disabled":n?"":void 0,disabled:n,id:u,...l,ref:a,onMouseDown:(0,s.composeEventHandlers)(e.onMouseDown,e=>{n||0!==e.button||!1!==e.ctrlKey?e.preventDefault():d.onValueChange(i)}),onKeyDown:(0,s.composeEventHandlers)(e.onKeyDown,e=>{[" ","Enter"].includes(e.key)&&d.onValueChange(i)}),onFocus:(0,s.composeEventHandlers)(e.onFocus,()=>{let e="manual"!==d.activationMode;m||n||!e||d.onValueChange(i)})})})});H.displayName=O;var q="TabsContent",K=a.forwardRef((e,s)=>{let{__scopeTabs:r,value:i,forceMount:n,children:l,...d}=e,c=I(q,r),u=U(c.baseId,i),f=B(c.baseId,i),m=i===c.value,h=a.useRef(m);return a.useEffect(()=>{let e=requestAnimationFrame(()=>h.current=!1);return()=>cancelAnimationFrame(e)},[]),(0,t.jsx)(D.Presence,{present:n||m,children:({present:a})=>(0,t.jsx)(o.Primitive.div,{"data-state":m?"active":"inactive","data-orientation":c.orientation,role:"tabpanel","aria-labelledby":u,hidden:!a,id:f,tabIndex:0,...d,ref:s,style:{...e.style,animationDuration:h.current?"0s":void 0},children:a&&l})})});function U(e,t){return`${e}-trigger-${t}`}function B(e,t){return`${e}-content-${t}`}K.displayName=q,e.s(["Content",()=>K,"List",()=>M,"Root",()=>z,"Tabs",()=>z,"TabsContent",()=>K,"TabsList",()=>M,"TabsTrigger",()=>H,"Trigger",()=>H,"createTabsScope",()=>E],43133);var $=e.i(43133),$=$,V=e.i(31777);let G=$.Root,_=a.forwardRef(({className:e,...a},s)=>(0,t.jsx)($.List,{ref:s,className:(0,V.cn)("bg-muted text-muted-foreground inline-flex h-9 items-center justify-center rounded-lg p-1",e),...a}));_.displayName=$.List.displayName;let Q=a.forwardRef(({className:e,...a},s)=>(0,t.jsx)($.Trigger,{ref:s,className:(0,V.cn)("ring-offset-background focus-visible:ring-ring data-[state=active]:bg-background data-[state=active]:text-foreground inline-flex items-center justify-center rounded-md px-3 py-1 text-sm font-medium whitespace-nowrap transition-all focus-visible:ring-2 focus-visible:ring-offset-2 focus-visible:outline-none disabled:pointer-events-none disabled:opacity-50 data-[state=active]:shadow",e),...a}));Q.displayName=$.Trigger.displayName;let W=a.forwardRef(({className:e,...a},s)=>(0,t.jsx)($.Content,{ref:s,className:(0,V.cn)("ring-offset-background focus-visible:ring-ring mt-2 focus-visible:ring-2 focus-visible:ring-offset-2 focus-visible:outline-none",e),...a}));W.displayName=$.Content.displayName,e.s(["Tabs",()=>G,"TabsContent",()=>W,"TabsList",()=>_,"TabsTrigger",()=>Q],68304)},81846,e=>{"use strict";var t=e.i(20314),a=e.i(94237),s=e.i(31777);let r=(0,a.cva)("inline-flex items-center rounded-md border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:ring-2 focus:ring-ring focus:ring-offset-2 focus:outline-none",{variants:{variant:{default:"border-transparent bg-primary text-primary-foreground shadow hover:bg-primary/80",secondary:"border-transparent bg-secondary text-secondary-foreground hover:bg-secondary/80",destructive:"border-transparent bg-destructive text-destructive-foreground shadow hover:bg-destructive/80",outline:"text-foreground"}},defaultVariants:{variant:"default"}});function i({className:e,variant:a,...i}){return(0,t.jsx)("div",{className:(0,s.cn)(r({variant:a}),e),...i})}e.s(["Badge",()=>i])},2287,e=>{"use strict";var t=e.i(20314),a=e.i(79054),s=e.i(90033),r=e.i(60253),i=e.i(31777);let n=s.Dialog.Root,l=s.Dialog.Trigger,o=s.Dialog.Portal,d=s.Dialog.Close,c=a.forwardRef(({className:e,onClick:a,...r},n)=>(0,t.jsx)(s.Dialog.Overlay,{ref:n,className:(0,i.cn)("data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 fixed inset-0 z-50 bg-black/80 duration-150",e),onClick:e=>{e.stopPropagation(),a?.(e)},...r}));c.displayName=s.Dialog.Overlay.displayName;let u=a.forwardRef(({className:e,children:a,...n},l)=>(0,t.jsxs)(o,{children:[(0,t.jsx)(c,{}),(0,t.jsxs)(s.Dialog.Content,{ref:l,className:(0,i.cn)("bg-background data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 fixed top-[50%] left-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border p-6 shadow-lg duration-150 sm:rounded-lg",e),...n,children:[a,(0,t.jsxs)(s.Dialog.Close,{className:"ring-offset-background focus:ring-ring data-[state=open]:bg-accent data-[state=open]:text-muted-foreground absolute top-4 right-4 cursor-pointer rounded-sm opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2 focus:outline-none disabled:pointer-events-none",children:[(0,t.jsx)(r.X,{className:"h-4 w-4"}),(0,t.jsx)("span",{className:"sr-only",children:"Close"})]})]})]}));u.displayName=s.Dialog.Content.displayName;let f=({className:e,...a})=>(0,t.jsx)("div",{className:(0,i.cn)("flex flex-col space-y-1.5 text-center sm:text-left",e),...a});f.displayName="DialogHeader";let m=({className:e,...a})=>(0,t.jsx)("div",{className:(0,i.cn)("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...a});m.displayName="DialogFooter";let h=a.forwardRef(({className:e,...a},r)=>(0,t.jsx)(s.Dialog.Title,{ref:r,className:(0,i.cn)("text-lg leading-none font-semibold tracking-tight",e),...a}));h.displayName=s.Dialog.Title.displayName;let x=a.forwardRef(({className:e,...a},r)=>(0,t.jsx)(s.Dialog.Description,{ref:r,className:(0,i.cn)("text-muted-foreground text-sm",e),...a}));x.displayName=s.Dialog.Description.displayName,e.s(["Dialog",()=>n,"DialogClose",()=>d,"DialogContent",()=>u,"DialogDescription",()=>x,"DialogFooter",()=>m,"DialogHeader",()=>f,"DialogTitle",()=>h,"DialogTrigger",()=>l])},24042,e=>{"use strict";let t=(0,e.i(3645).default)("play",[["path",{d:"M5 5a2 2 0 0 1 3.008-1.728l11.997 6.998a2 2 0 0 1 .003 3.458l-12 7A2 2 0 0 1 5 19z",key:"10ikf1"}]]);e.s(["Play",()=>t],24042)},11345,e=>{"use strict";let t=(0,e.i(3645).default)("chevron-left",[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]]);e.s(["ChevronLeft",()=>t],11345)},76016,e=>{"use strict";let t=(0,e.i(3645).default)("chevron-right",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);e.s(["ChevronRight",()=>t],76016)},41957,e=>{"use strict";var t=e.i(20314),a=e.i(79054),s=e.i(87620),r=a.forwardRef((e,a)=>(0,t.jsx)(s.Primitive.label,{...e,ref:a,onMouseDown:t=>{t.target.closest("button, input, select, textarea")||(e.onMouseDown?.(t),!t.defaultPrevented&&t.detail>1&&t.preventDefault())}}));r.displayName="Label",e.s(["Label",()=>r,"Root",()=>r],27572);var i=e.i(27572),i=i,n=e.i(94237),l=e.i(31777);let o=(0,n.cva)("text-sm leading-none font-medium peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),d=a.forwardRef(({className:e,...a},s)=>(0,t.jsx)(i.Root,{ref:s,className:(0,l.cn)(o(),e),...a}));d.displayName=i.Root.displayName,e.s(["Label",()=>d],41957)},48306,e=>{"use strict";var t=e.i(20314),a=e.i(31777);function s({className:e,...s}){return(0,t.jsx)("textarea",{"data-slot":"textarea",className:(0,a.cn)("placeholder:text-muted-foreground selection:bg-primary selection:text-primary-foreground dark:bg-input/30 border-input field-sizing-content min-h-[80px] w-full rounded-md border bg-transparent px-3 py-2 text-base shadow-xs transition-[color,box-shadow] outline-none disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 md:text-sm","focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px]","aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",e),...s})}e.s(["Textarea",()=>s])},956,e=>{"use strict";var t=e.i(20314),a=e.i(79054),s=e.i(31777);let r=a.forwardRef(({className:e,...a},r)=>(0,t.jsx)("div",{ref:r,className:(0,s.cn)("bg-card text-card-foreground rounded-xl border shadow",e),...a}));r.displayName="Card";let i=a.forwardRef(({className:e,...a},r)=>(0,t.jsx)("div",{ref:r,className:(0,s.cn)("flex flex-col space-y-1.5 p-6",e),...a}));i.displayName="CardHeader";let n=a.forwardRef(({className:e,...a},r)=>(0,t.jsx)("div",{ref:r,className:(0,s.cn)("leading-none font-semibold tracking-tight",e),...a}));n.displayName="CardTitle";let l=a.forwardRef(({className:e,...a},r)=>(0,t.jsx)("div",{ref:r,className:(0,s.cn)("text-muted-foreground text-sm",e),...a}));l.displayName="CardDescription";let o=a.forwardRef(({className:e,...a},r)=>(0,t.jsx)("div",{ref:r,className:(0,s.cn)("p-6 pt-0",e),...a}));o.displayName="CardContent",a.forwardRef(({className:e,...a},r)=>(0,t.jsx)("div",{ref:r,className:(0,s.cn)("flex items-center p-6 pt-0",e),...a})).displayName="CardFooter",e.s(["Card",()=>r,"CardContent",()=>o,"CardDescription",()=>l,"CardHeader",()=>i,"CardTitle",()=>n])},34544,e=>{"use strict";var t=e.i(20314),a=e.i(79054),s=e.i(96931),r=e.i(956),i=e.i(68304),n=e.i(81846),l=e.i(98127),o=e.i(35340);function d({tables:e,selectedTable:s,onSelectTable:r}){let[i,d]=(0,a.useState)(""),c=i.length>0?e.filter(e=>e.name.toLowerCase().includes(i.toLowerCase())):e;return 0===e.length?(0,t.jsx)("div",{className:"text-muted-foreground p-4 text-center text-sm","data-testid":"table-list-empty",children:"No tables found"}):(0,t.jsxs)("div",{className:"flex flex-col gap-2","data-testid":"table-list",children:[e.length>10&&(0,t.jsx)("div",{className:"px-2 pt-2",children:(0,t.jsx)(l.Input,{placeholder:"Filter tables...",value:i,onChange:e=>d(e.target.value),"data-testid":"table-list-search"})}),(0,t.jsx)(o.ScrollArea,{className:"h-[calc(100vh-12rem)]",children:(0,t.jsxs)("div",{className:"flex flex-col gap-0.5 p-2",children:[c.map(e=>(0,t.jsxs)("button",{onClick:()=>r(e.name),className:`flex w-full items-center justify-between rounded-md px-3 py-2 text-left text-sm transition-colors ${s===e.name?"bg-accent text-accent-foreground":"hover:bg-muted"}`,"data-testid":`table-item-${e.name}`,children:[(0,t.jsx)("span",{className:"truncate font-mono text-xs",children:e.name}),(0,t.jsx)(n.Badge,{variant:"secondary",className:"ml-2 shrink-0",children:e.rowCount.toLocaleString()})]},e.name)),0===c.length&&i.length>0&&(0,t.jsxs)("div",{className:"text-muted-foreground p-4 text-center text-sm",children:['No tables matching "',i,'"']})]})})]})}var c=e.i(31777);function u({className:e,...a}){return(0,t.jsx)("div",{"data-slot":"table-container",className:"relative w-full overflow-x-auto",children:(0,t.jsx)("table",{"data-slot":"table",className:(0,c.cn)("w-full caption-bottom text-sm",e),...a})})}function f({className:e,...a}){return(0,t.jsx)("thead",{"data-slot":"table-header",className:(0,c.cn)("[&_tr]:border-b",e),...a})}function m({className:e,...a}){return(0,t.jsx)("tbody",{"data-slot":"table-body",className:(0,c.cn)("[&_tr:last-child]:border-0",e),...a})}function h({className:e,...a}){return(0,t.jsx)("tr",{"data-slot":"table-row",className:(0,c.cn)("hover:bg-muted/50 data-[state=selected]:bg-muted border-b transition-colors",e),...a})}function x({className:e,...a}){return(0,t.jsx)("th",{"data-slot":"table-head",className:(0,c.cn)("text-foreground h-10 px-2 text-left align-middle font-medium whitespace-nowrap [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]",e),...a})}function p({className:e,...a}){return(0,t.jsx)("td",{"data-slot":"table-cell",className:(0,c.cn)("p-2 align-middle whitespace-nowrap [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]",e),...a})}var g=e.i(35364),v=e.i(11345),b=e.i(76016),y=e.i(2287);function j({open:e,onOpenChange:a,columnName:s,value:r}){return(0,t.jsx)(y.Dialog,{open:e,onOpenChange:a,children:(0,t.jsxs)(y.DialogContent,{className:"max-w-2xl",children:[(0,t.jsx)(y.DialogHeader,{children:(0,t.jsx)(y.DialogTitle,{children:s})}),(0,t.jsx)(o.ScrollArea,{className:"max-h-[60vh]",children:(0,t.jsx)("pre",{className:"text-sm break-all whitespace-pre-wrap","data-testid":"cell-value-content",children:r})})]})})}function N(e){return e.length>100}function w({columns:e,rows:s,totalRows:r,page:i,pageSize:n,onPageChange:l,loading:o}){let[d,c]=(0,a.useState)({open:!1,columnName:"",value:""}),y=Math.max(1,Math.ceil(r/n));return o?(0,t.jsx)("div",{className:"text-muted-foreground flex items-center justify-center p-8 text-sm","data-testid":"row-browser-loading",children:"Loading rows..."}):0===s.length&&0===r?(0,t.jsx)("div",{className:"text-muted-foreground flex items-center justify-center p-8 text-sm","data-testid":"row-browser-empty",children:"This table has no rows"}):(0,t.jsxs)("div",{className:"flex flex-col gap-3","data-testid":"row-browser",children:[(0,t.jsxs)(u,{children:[(0,t.jsx)(f,{children:(0,t.jsx)(h,{children:e.map(e=>(0,t.jsx)(x,{children:e},e))})}),(0,t.jsx)(m,{children:s.map((a,s)=>(0,t.jsx)(h,{children:e.map(e=>{var s;let r=null==(s=a[e])?"NULL":String(s),i=N(r);return(0,t.jsx)(p,{children:i?(0,t.jsx)("button",{className:"text-primary cursor-pointer text-left underline-offset-2 hover:underline",onClick:()=>c({open:!0,columnName:e,value:r}),title:"Click to view full value",children:N(r)?`${r.slice(0,100)}...`:r}):(0,t.jsx)("span",{className:"NULL"===r?"text-muted-foreground italic":"",children:r})},e)})},s))})]}),(0,t.jsxs)("div",{className:"flex items-center justify-between px-2","data-testid":"row-browser-pagination",children:[(0,t.jsxs)("span",{className:"text-muted-foreground text-sm",children:[r.toLocaleString()," row",1!==r?"s":""," total"]}),(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsxs)(g.Button,{variant:"outline",size:"sm",onClick:()=>l(i-1),disabled:0===i,"data-testid":"row-browser-prev",children:[(0,t.jsx)(v.ChevronLeft,{className:"size-4"}),"Previous"]}),(0,t.jsxs)("span",{className:"text-sm",children:["Page ",i+1," of ",y]}),(0,t.jsxs)(g.Button,{variant:"outline",size:"sm",onClick:()=>l(i+1),disabled:i>=y-1,"data-testid":"row-browser-next",children:["Next",(0,t.jsx)(b.ChevronRight,{className:"size-4"})]})]})]}),(0,t.jsx)(j,{open:d.open,onOpenChange:e=>c(t=>({...t,open:e})),columnName:d.columnName,value:d.value})]})}function C({columns:e,loading:a}){return a?(0,t.jsx)("div",{className:"text-muted-foreground flex items-center justify-center p-8 text-sm","data-testid":"schema-viewer-loading",children:"Loading schema..."}):0===e.length?(0,t.jsx)("div",{className:"text-muted-foreground flex items-center justify-center p-8 text-sm","data-testid":"schema-viewer-empty",children:"No column information available"}):(0,t.jsx)("div",{"data-testid":"schema-viewer",children:(0,t.jsxs)(u,{children:[(0,t.jsx)(f,{children:(0,t.jsxs)(h,{children:[(0,t.jsx)(x,{children:"Name"}),(0,t.jsx)(x,{children:"Type"}),(0,t.jsx)(x,{children:"Nullable"}),(0,t.jsx)(x,{children:"Default"}),(0,t.jsx)(x,{children:"Primary Key"})]})}),(0,t.jsx)(m,{children:e.map(e=>(0,t.jsxs)(h,{children:[(0,t.jsx)(p,{className:"font-mono text-sm",children:e.name}),(0,t.jsx)(p,{className:"font-mono text-sm",children:e.type}),(0,t.jsx)(p,{children:e.notnull?"No":"Yes"}),(0,t.jsx)(p,{className:"text-muted-foreground",children:e.defaultValue??"None"}),(0,t.jsx)(p,{children:e.primaryKey?(0,t.jsx)(n.Badge,{variant:"default","data-testid":`pk-badge-${e.name}`,children:"PK"}):null})]},e.name))})]})})}var R=e.i(41957),T=e.i(48306),k=e.i(24042);let D=/^\s*(INSERT|UPDATE|DELETE|DROP|ALTER|CREATE|ATTACH|DETACH|REINDEX|VACUUM)\b/i,S=/^\s*WITH\b[\s\S]*?\b(INSERT|UPDATE|DELETE)\b/i;function A({onExecute:e}){let[s,r]=(0,a.useState)(""),[i,n]=(0,a.useState)(null),[l,o]=(0,a.useState)(null),[d,c]=(0,a.useState)(!1),[v,b]=(0,a.useState)({open:!1,columnName:"",value:""}),y=async()=>{let t;o(null),n(null);let a=s.trim();if(!a)return void o("Query cannot be empty");if(t=a.replace(/--[^\n]*/g,"").replace(/\/\*[\s\S]*?\*\//g,"").trim(),D.test(t)||S.test(t))return void o("Write operations are not allowed. Only SELECT and PRAGMA queries are permitted.");c(!0);try{let t=await e(a);n(t)}finally{c(!1)}},N=l??i?.error;return(0,t.jsxs)("div",{className:"flex flex-col gap-4","data-testid":"query-runner",children:[(0,t.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,t.jsx)(R.Label,{htmlFor:"sql-query",children:"SQL Query"}),(0,t.jsx)(T.Textarea,{id:"sql-query",placeholder:"SELECT * FROM features LIMIT 10",value:s,onChange:e=>r(e.target.value),className:"font-mono text-sm",rows:4,"data-testid":"query-runner-input"}),(0,t.jsx)("div",{className:"flex justify-end",children:(0,t.jsxs)(g.Button,{onClick:y,disabled:d||0===s.trim().length,size:"sm","data-testid":"query-runner-execute",children:[(0,t.jsx)(k.Play,{className:"size-4"}),d?"Executing...":"Execute"]})})]}),N?(0,t.jsx)("div",{className:"bg-destructive/10 text-destructive rounded-md border border-red-200 p-3 text-sm dark:border-red-800",role:"alert","aria-live":"polite","data-testid":"query-runner-error",children:N}):null,i?.columns&&i.rows?(0,t.jsxs)("div",{"data-testid":"query-runner-results",children:[(0,t.jsxs)("div",{className:"text-muted-foreground mb-2 text-sm",children:[i.rows.length," row",1!==i.rows.length?"s":""," returned"]}),(0,t.jsxs)(u,{children:[(0,t.jsx)(f,{children:(0,t.jsx)(h,{children:i.columns.map(e=>(0,t.jsx)(x,{children:e},e))})}),(0,t.jsx)(m,{children:i.rows.map((e,a)=>(0,t.jsx)(h,{children:i.columns.map(a=>{var s;let r=null==(s=e[a])?"NULL":String(s),i=r.length>100;return(0,t.jsx)(p,{children:i?(0,t.jsxs)("button",{className:"text-primary cursor-pointer text-left underline-offset-2 hover:underline",onClick:()=>b({open:!0,columnName:a,value:r}),title:"Click to view full value",children:[r.slice(0,100),"..."]}):(0,t.jsx)("span",{className:"NULL"===r?"text-muted-foreground italic":"",children:r})},a)})},a))})]})]}):null,(0,t.jsx)(j,{open:v.open,onOpenChange:e=>b(t=>({...t,open:e})),columnName:v.columnName,value:v.value})]})}function E({initialTables:e,fetchRows:n,fetchSchema:l,runQuery:o,className:c}){let[u,f]=(0,a.useState)(null),[m,h]=(0,a.useState)("data"),[x,p]=(0,a.useState)([]),[g,v]=(0,a.useState)([]),[b,y]=(0,a.useState)(0),[j,N]=(0,a.useState)(0),[R,T]=(0,a.useState)(50),[k,D]=(0,a.useState)(!1),[S,E]=(0,a.useState)([]),[L,P]=(0,a.useState)(!1),I=(0,a.useCallback)(async(e,t)=>{D(!0);try{let a=await n(e,t);if(a.error){p([]),v([]),y(0);return}p(a.columns??[]),v(a.rows??[]),y(a.totalRows??0),N(a.page??0),T(a.pageSize??50)}finally{D(!1)}},[n]),z=(0,a.useCallback)(async e=>{P(!0);try{let t=await l(e);if(t.error)return void E([]);E(t.columns??[])}finally{P(!1)}},[l]),F=(0,a.useCallback)(e=>{f(e),N(0),h("data"),I(e,0),z(e)},[I,z]),M=(0,a.useCallback)(e=>{u&&(N(e),I(u,e))},[u,I]),O=(0,a.useCallback)(async e=>o(e),[o]);return(0,t.jsxs)("div",{"data-testid":"database-page-client",className:c,children:[(0,t.jsxs)("div",{className:"mb-4 flex items-center gap-2",children:[(0,t.jsx)(s.Database,{className:"text-muted-foreground h-4 w-4"}),(0,t.jsx)("h1",{className:"text-sm font-bold tracking-tight",children:"Database"})]}),(0,t.jsxs)("div",{className:"flex gap-4",children:[(0,t.jsx)(r.Card,{className:"w-64 shrink-0",children:(0,t.jsx)(r.CardContent,{className:"p-0",children:(0,t.jsx)(d,{tables:e,selectedTable:u,onSelectTable:F})})}),(0,t.jsx)("div",{className:"min-w-0 flex-1",children:u?(0,t.jsx)(r.Card,{children:(0,t.jsxs)(r.CardContent,{className:"p-4",children:[(0,t.jsx)("div",{className:"mb-3 font-mono text-sm font-medium",children:u}),(0,t.jsxs)(i.Tabs,{value:m,onValueChange:e=>h(e),"data-testid":"database-tabs",children:[(0,t.jsxs)(i.TabsList,{className:"h-8",children:[(0,t.jsx)(i.TabsTrigger,{value:"data",className:"text-xs","data-testid":"tab-data",children:"Data"}),(0,t.jsx)(i.TabsTrigger,{value:"schema",className:"text-xs","data-testid":"tab-schema",children:"Schema"}),(0,t.jsx)(i.TabsTrigger,{value:"query",className:"text-xs","data-testid":"tab-query",children:"Query"})]}),(0,t.jsx)(i.TabsContent,{value:"data",children:(0,t.jsx)(w,{columns:x,rows:g,totalRows:b,page:j,pageSize:R,onPageChange:M,loading:k})}),(0,t.jsx)(i.TabsContent,{value:"schema",children:(0,t.jsx)(C,{columns:S,loading:L})}),(0,t.jsx)(i.TabsContent,{value:"query",children:(0,t.jsx)(A,{onExecute:O})})]})]})}):(0,t.jsx)(r.Card,{children:(0,t.jsx)(r.CardContent,{className:"flex items-center justify-center p-12",children:(0,t.jsx)("p",{className:"text-muted-foreground text-sm",children:"Select a table from the list to browse its data"})})})})]})]})}e.s(["DatabasePageClient",()=>E],34544)}]);
@@ -1 +0,0 @@
1
- (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,81258,(e,t,r)=>{"use strict";r._=function(e){return e&&e.__esModule?e:{default:e}}},22193,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n={getDeploymentId:function(){return u},getDeploymentIdQueryOrEmptyString:function(){return i}};for(var o in n)Object.defineProperty(r,o,{enumerable:!0,get:n[o]});function u(){return!1}function i(){return""}},34558,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"RedirectStatusCode",{enumerable:!0,get:function(){return o}});var n,o=((n={})[n.SeeOther=303]="SeeOther",n[n.TemporaryRedirect=307]="TemporaryRedirect",n[n.PermanentRedirect=308]="PermanentRedirect",n);("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)},54809,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n,o={REDIRECT_ERROR_CODE:function(){return l},RedirectType:function(){return a},isRedirectError:function(){return c}};for(var u in o)Object.defineProperty(r,u,{enumerable:!0,get:o[u]});let i=e.r(34558),l="NEXT_REDIRECT";var a=((n={}).push="push",n.replace="replace",n);function c(e){if("object"!=typeof e||null===e||!("digest"in e)||"string"!=typeof e.digest)return!1;let t=e.digest.split(";"),[r,n]=t,o=t.slice(2,-2).join(";"),u=Number(t.at(-2));return r===l&&("replace"===n||"push"===n)&&"string"==typeof o&&!isNaN(u)&&u in i.RedirectStatusCode}("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)},65064,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n={bindSnapshot:function(){return c},createAsyncLocalStorage:function(){return a},createSnapshot:function(){return d}};for(var o in n)Object.defineProperty(r,o,{enumerable:!0,get:n[o]});let u=Object.defineProperty(Error("Invariant: AsyncLocalStorage accessed in runtime where it is not available"),"__NEXT_ERROR_CODE",{value:"E504",enumerable:!1,configurable:!0});class i{disable(){throw u}getStore(){}run(){throw u}exit(){throw u}enterWith(){throw u}static bind(e){return e}}let l="u">typeof globalThis&&globalThis.AsyncLocalStorage;function a(){return l?new l:new i}function c(e){return l?l.bind(e):i.bind(e)}function d(){return l?l.snapshot():function(e,...t){return e(...t)}}},82157,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n={ACTION_HEADER:function(){return i},FLIGHT_HEADERS:function(){return p},NEXT_ACTION_NOT_FOUND_HEADER:function(){return j},NEXT_ACTION_REVALIDATED_HEADER:function(){return T},NEXT_DID_POSTPONE_HEADER:function(){return R},NEXT_HMR_REFRESH_HASH_COOKIE:function(){return f},NEXT_HMR_REFRESH_HEADER:function(){return d},NEXT_HTML_REQUEST_ID_HEADER:function(){return v},NEXT_IS_PRERENDER_HEADER:function(){return g},NEXT_REQUEST_ID_HEADER:function(){return h},NEXT_REWRITTEN_PATH_HEADER:function(){return b},NEXT_REWRITTEN_QUERY_HEADER:function(){return O},NEXT_ROUTER_PREFETCH_HEADER:function(){return a},NEXT_ROUTER_SEGMENT_PREFETCH_HEADER:function(){return c},NEXT_ROUTER_STALE_TIME_HEADER:function(){return y},NEXT_ROUTER_STATE_TREE_HEADER:function(){return l},NEXT_RSC_UNION_QUERY:function(){return E},NEXT_URL:function(){return s},RSC_CONTENT_TYPE_HEADER:function(){return _},RSC_HEADER:function(){return u}};for(var o in n)Object.defineProperty(r,o,{enumerable:!0,get:n[o]});let u="rsc",i="next-action",l="next-router-state-tree",a="next-router-prefetch",c="next-router-segment-prefetch",d="next-hmr-refresh",f="__next_hmr_refresh_hash__",s="next-url",_="text/x-component",p=[u,l,a,d,c],E="_rsc",y="x-nextjs-stale-time",R="x-nextjs-postponed",b="x-nextjs-rewritten-path",O="x-nextjs-rewritten-query",g="x-nextjs-prerender",j="x-nextjs-action-not-found",h="x-nextjs-request-id",v="x-nextjs-html-request-id",T="x-action-revalidated";("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)},5161,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n={DEFAULT_SEGMENT_KEY:function(){return f},NOT_FOUND_SEGMENT_KEY:function(){return s},PAGE_SEGMENT_KEY:function(){return d},addSearchParamsIfPageSegment:function(){return a},computeSelectedLayoutSegment:function(){return c},getSegmentValue:function(){return u},getSelectedLayoutSegmentPath:function(){return function e(t,r,n=!0,o=[]){let i;if(n)i=t[1][r];else{let e=t[1];i=e.children??Object.values(e)[0]}if(!i)return o;let l=u(i[0]);return!l||l.startsWith(d)?o:(o.push(l),e(i,r,!1,o))}},isGroupSegment:function(){return i},isParallelRouteSegment:function(){return l}};for(var o in n)Object.defineProperty(r,o,{enumerable:!0,get:n[o]});function u(e){return Array.isArray(e)?e[1]:e}function i(e){return"("===e[0]&&e.endsWith(")")}function l(e){return e.startsWith("@")&&"@children"!==e}function a(e,t){if(e.includes(d)){let e=JSON.stringify(t);return"{}"!==e?d+"?"+e:d}return e}function c(e,t){if(!e||0===e.length)return null;let r="children"===t?e[0]:e[e.length-1];return r===f?null:r}let d="__PAGE__",f="__DEFAULT__",s="/_not-found"},50389,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n={UnrecognizedActionError:function(){return u},unstable_isUnrecognizedActionError:function(){return i}};for(var o in n)Object.defineProperty(r,o,{enumerable:!0,get:n[o]});class u extends Error{constructor(...e){super(...e),this.name="UnrecognizedActionError"}}function i(e){return!!(e&&"object"==typeof e&&e instanceof u)}("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)},89637,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"actionAsyncStorageInstance",{enumerable:!0,get:function(){return n}});let n=(0,e.r(65064).createAsyncLocalStorage)()},54293,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"actionAsyncStorage",{enumerable:!0,get:function(){return n.actionAsyncStorageInstance}});let n=e.r(89637)},25133,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n={getRedirectError:function(){return a},getRedirectStatusCodeFromError:function(){return _},getRedirectTypeFromError:function(){return s},getURLFromRedirectError:function(){return f},permanentRedirect:function(){return d},redirect:function(){return c}};for(var o in n)Object.defineProperty(r,o,{enumerable:!0,get:n[o]});let u=e.r(34558),i=e.r(54809),l="u"<typeof window?e.r(54293).actionAsyncStorage:void 0;function a(e,t,r=u.RedirectStatusCode.TemporaryRedirect){let n=Object.defineProperty(Error(i.REDIRECT_ERROR_CODE),"__NEXT_ERROR_CODE",{value:"E394",enumerable:!1,configurable:!0});return n.digest=`${i.REDIRECT_ERROR_CODE};${t};${e};${r};`,n}function c(e,t){throw a(e,t??=l?.getStore()?.isAction?i.RedirectType.push:i.RedirectType.replace,u.RedirectStatusCode.TemporaryRedirect)}function d(e,t=i.RedirectType.replace){throw a(e,t,u.RedirectStatusCode.PermanentRedirect)}function f(e){return(0,i.isRedirectError)(e)?e.digest.split(";").slice(2,-2).join(";"):null}function s(e){if(!(0,i.isRedirectError)(e))throw Object.defineProperty(Error("Not a redirect error"),"__NEXT_ERROR_CODE",{value:"E260",enumerable:!1,configurable:!0});return e.digest.split(";",2)[1]}function _(e){if(!(0,i.isRedirectError)(e))throw Object.defineProperty(Error("Not a redirect error"),"__NEXT_ERROR_CODE",{value:"E260",enumerable:!1,configurable:!0});return Number(e.digest.split(";").at(-2))}("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)},18152,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n={AppRouterContext:function(){return i},GlobalLayoutRouterContext:function(){return a},LayoutRouterContext:function(){return l},MissingSlotContext:function(){return d},TemplateContext:function(){return c}};for(var o in n)Object.defineProperty(r,o,{enumerable:!0,get:n[o]});let u=e.r(81258)._(e.r(79054)),i=u.default.createContext(null),l=u.default.createContext(null),a=u.default.createContext(null),c=u.default.createContext(null),d=u.default.createContext(new Set)},9338,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"useUntrackedPathname",{enumerable:!0,get:function(){return u}});let n=e.r(79054),o=e.r(14869);function u(){return!function(){if("u"<typeof window){let{workUnitAsyncStorage:t}=e.r(3163),r=t.getStore();if(!r)return!1;switch(r.type){case"prerender":case"prerender-client":case"prerender-ppr":let n=r.fallbackRouteParams;return!!n&&n.size>0}}return!1}()?(0,n.useContext)(o.PathnameContext):null}("function"==typeof r.default||"object"==typeof r.default&&null!==r.default)&&void 0===r.default.__esModule&&(Object.defineProperty(r.default,"__esModule",{value:!0}),Object.assign(r.default,r),t.exports=r.default)},62949,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n={handleHardNavError:function(){return i},useNavFailureHandler:function(){return l}};for(var o in n)Object.defineProperty(r,o,{enumerable:!0,get:n[o]});e.r(79054);let u=e.r(32801);function i(e){return!!(e&&"u">typeof window)&&!!window.next.__pendingUrl&&(0,u.createHrefFromUrl)(new URL(window.location.href))!==(0,u.createHrefFromUrl)(window.next.__pendingUrl)&&(console.error("Error occurred during navigation, falling back to hard navigation",e),window.location.href=window.next.__pendingUrl.toString(),!0)}function l(){}("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)},86762,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"HandleISRError",{enumerable:!0,get:function(){return o}});let n="u"<typeof window?e.r(58988).workAsyncStorage:void 0;function o({error:e}){if(n){let t=n.getStore();if(t?.isStaticGeneration)throw e&&console.error(e),e}return null}("function"==typeof r.default||"object"==typeof r.default&&null!==r.default)&&void 0===r.default.__esModule&&(Object.defineProperty(r.default,"__esModule",{value:!0}),Object.assign(r.default,r),t.exports=r.default)},57351,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n={ErrorBoundary:function(){return p},ErrorBoundaryHandler:function(){return _}};for(var o in n)Object.defineProperty(r,o,{enumerable:!0,get:n[o]});let u=e.r(81258),i=e.r(20314),l=u._(e.r(79054)),a=e.r(9338),c=e.r(86092);e.r(62949);let d=e.r(86762),f=e.r(41608),s="u">typeof window&&(0,f.isBot)(window.navigator.userAgent);class _ extends l.default.Component{constructor(e){super(e),this.reset=()=>{this.setState({error:null})},this.state={error:null,previousPathname:this.props.pathname}}static getDerivedStateFromError(e){if((0,c.isNextRouterError)(e))throw e;return{error:e}}static getDerivedStateFromProps(e,t){let{error:r}=t;return e.pathname!==t.previousPathname&&t.error?{error:null,previousPathname:e.pathname}:{error:t.error,previousPathname:e.pathname}}render(){return this.state.error&&!s?(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(d.HandleISRError,{error:this.state.error}),this.props.errorStyles,this.props.errorScripts,(0,i.jsx)(this.props.errorComponent,{error:this.state.error,reset:this.reset})]}):this.props.children}}function p({errorComponent:e,errorStyles:t,errorScripts:r,children:n}){let o=(0,a.useUntrackedPathname)();return e?(0,i.jsx)(_,{pathname:o,errorComponent:e,errorStyles:t,errorScripts:r,children:n}):(0,i.jsx)(i.Fragment,{children:n})}("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)},10706,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n={RedirectBoundary:function(){return _},RedirectErrorBoundary:function(){return s}};for(var o in n)Object.defineProperty(r,o,{enumerable:!0,get:n[o]});let u=e.r(44066),i=e.r(20314),l=u._(e.r(79054)),a=e.r(67013),c=e.r(25133),d=e.r(54809);function f({redirect:e,reset:t,redirectType:r}){let n=(0,a.useRouter)();return(0,l.useEffect)(()=>{l.default.startTransition(()=>{r===d.RedirectType.push?n.push(e,{}):n.replace(e,{}),t()})},[e,r,t,n]),null}class s extends l.default.Component{constructor(e){super(e),this.state={redirect:null,redirectType:null}}static getDerivedStateFromError(e){if((0,d.isRedirectError)(e)){let t=(0,c.getURLFromRedirectError)(e),r=(0,c.getRedirectTypeFromError)(e);return"handled"in e?{redirect:null,redirectType:null}:{redirect:t,redirectType:r}}throw e}render(){let{redirect:e,redirectType:t}=this.state;return null!==e&&null!==t?(0,i.jsx)(f,{redirect:e,redirectType:t,reset:()=>this.setState({redirect:null})}):this.props.children}}function _({children:e}){let t=(0,a.useRouter)();return(0,i.jsx)(s,{router:t,children:e})}("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)},99271,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"unresolvedThenable",{enumerable:!0,get:function(){return n}});let n={then:()=>{}};("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)},66658,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n={MetadataBoundary:function(){return l},OutletBoundary:function(){return c},RootLayoutBoundary:function(){return d},ViewportBoundary:function(){return a}};for(var o in n)Object.defineProperty(r,o,{enumerable:!0,get:n[o]});let u=e.r(42771),i={[u.METADATA_BOUNDARY_NAME]:function({children:e}){return e},[u.VIEWPORT_BOUNDARY_NAME]:function({children:e}){return e},[u.OUTLET_BOUNDARY_NAME]:function({children:e}){return e},[u.ROOT_LAYOUT_BOUNDARY_NAME]:function({children:e}){return e}},l=i[u.METADATA_BOUNDARY_NAME.slice(0)],a=i[u.VIEWPORT_BOUNDARY_NAME.slice(0)],c=i[u.OUTLET_BOUNDARY_NAME.slice(0)],d=i[u.ROOT_LAYOUT_BOUNDARY_NAME.slice(0)]},84210,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"HeadManagerContext",{enumerable:!0,get:function(){return n}});let n=e.r(81258)._(e.r(79054)).default.createContext({})},42726,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"default",{enumerable:!0,get:function(){return l}});let n=e.r(20314),o=e.r(86762),u={fontFamily:'system-ui,"Segoe UI",Roboto,Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji"',height:"100vh",textAlign:"center",display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center"},i={fontSize:"14px",fontWeight:400,lineHeight:"28px",margin:"0 8px"},l=function({error:e}){let t=e?.digest;return(0,n.jsxs)("html",{id:"__next_error__",children:[(0,n.jsx)("head",{}),(0,n.jsxs)("body",{children:[(0,n.jsx)(o.HandleISRError,{error:e}),(0,n.jsx)("div",{style:u,children:(0,n.jsxs)("div",{children:[(0,n.jsxs)("h2",{style:i,children:["Application error: a ",t?"server":"client","-side exception has occurred while loading ",window.location.hostname," (see the"," ",t?"server logs":"browser console"," for more information)."]}),t?(0,n.jsx)("p",{style:i,children:`Digest: ${t}`}):null]})})]})]})};("function"==typeof r.default||"object"==typeof r.default&&null!==r.default)&&void 0===r.default.__esModule&&(Object.defineProperty(r.default,"__esModule",{value:!0}),Object.assign(r.default,r),t.exports=r.default)}]);
@@ -1 +0,0 @@
1
- (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,33548,e=>{"use strict";let t=(0,e.i(3645).default)("copy",[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]]);e.s(["Copy",()=>t],33548)},35e3,e=>{"use strict";var t=e.i(80986);e.s(["CheckCircle2",()=>t.default])},16298,e=>{"use strict";let t=(0,e.i(3645).default)("file-text",[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]]);e.s(["default",()=>t])},53360,e=>{"use strict";let t=(0,e.i(3645).default)("zap",[["path",{d:"M4 14a1 1 0 0 1-.78-1.63l9.9-10.2a.5.5 0 0 1 .86.46l-1.92 6.02A1 1 0 0 0 13 10h7a1 1 0 0 1 .78 1.63l-9.9 10.2a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14z",key:"1xq2db"}]]);e.s(["Zap",()=>t],53360)},97667,e=>{"use strict";var t=e.i(1012);e.s(["CheckIcon",()=>t.default])},55016,e=>{"use strict";let t=(0,e.i(3645).default)("clock",[["path",{d:"M12 6v6l4 2",key:"mmk7yg"}],["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]]);e.s(["Clock",()=>t],55016)},23405,e=>{"use strict";var t=e.i(79054);function a(e){let a=t.useRef({value:e,previous:e});return t.useMemo(()=>(a.current.value!==e&&(a.current.previous=a.current.value,a.current.value=e),a.current.previous),[e])}e.s(["usePrevious",()=>a])},23925,1012,e=>{"use strict";let t=(0,e.i(3645).default)("check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);e.s(["default",()=>t],1012),e.s(["Check",()=>t],23925)},41957,e=>{"use strict";var t=e.i(20314),a=e.i(79054),r=e.i(87620),s=a.forwardRef((e,a)=>(0,t.jsx)(r.Primitive.label,{...e,ref:a,onMouseDown:t=>{t.target.closest("button, input, select, textarea")||(e.onMouseDown?.(t),!t.defaultPrevented&&t.detail>1&&t.preventDefault())}}));s.displayName="Label",e.s(["Label",()=>s,"Root",()=>s],27572);var l=e.i(27572),l=l,o=e.i(94237),i=e.i(31777);let n=(0,o.cva)("text-sm leading-none font-medium peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),d=a.forwardRef(({className:e,...a},r)=>(0,t.jsx)(l.Root,{ref:r,className:(0,i.cn)(n(),e),...a}));d.displayName=l.Root.displayName,e.s(["Label",()=>d],41957)},76016,e=>{"use strict";let t=(0,e.i(3645).default)("chevron-right",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);e.s(["ChevronRight",()=>t],76016)},11345,e=>{"use strict";let t=(0,e.i(3645).default)("chevron-left",[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]]);e.s(["ChevronLeft",()=>t],11345)},10714,e=>{"use strict";let t=(0,e.i(3645).default)("minus",[["path",{d:"M5 12h14",key:"1ays0h"}]]);e.s(["default",()=>t])},38573,e=>{"use strict";let t=(0,e.i(3645).default)("terminal",[["path",{d:"M12 19h8",key:"baeox8"}],["path",{d:"m4 17 6-6-6-6",key:"1yngyt"}]]);e.s(["Terminal",()=>t],38573)},30702,e=>{"use strict";let t=(0,e.i(3645).default)("external-link",[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]]);e.s(["ExternalLink",()=>t],30702)},81846,e=>{"use strict";var t=e.i(20314),a=e.i(94237),r=e.i(31777);let s=(0,a.cva)("inline-flex items-center rounded-md border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:ring-2 focus:ring-ring focus:ring-offset-2 focus:outline-none",{variants:{variant:{default:"border-transparent bg-primary text-primary-foreground shadow hover:bg-primary/80",secondary:"border-transparent bg-secondary text-secondary-foreground hover:bg-secondary/80",destructive:"border-transparent bg-destructive text-destructive-foreground shadow hover:bg-destructive/80",outline:"text-foreground"}},defaultVariants:{variant:"default"}});function l({className:e,variant:a,...l}){return(0,t.jsx)("div",{className:(0,r.cn)(s({variant:a}),e),...l})}e.s(["Badge",()=>l])},24042,e=>{"use strict";let t=(0,e.i(3645).default)("play",[["path",{d:"M5 5a2 2 0 0 1 3.008-1.728l11.997 6.998a2 2 0 0 1 .003 3.458l-12 7A2 2 0 0 1 5 19z",key:"10ikf1"}]]);e.s(["Play",()=>t],24042)},2287,e=>{"use strict";var t=e.i(20314),a=e.i(79054),r=e.i(90033),s=e.i(60253),l=e.i(31777);let o=r.Dialog.Root,i=r.Dialog.Trigger,n=r.Dialog.Portal,d=r.Dialog.Close,c=a.forwardRef(({className:e,onClick:a,...s},o)=>(0,t.jsx)(r.Dialog.Overlay,{ref:o,className:(0,l.cn)("data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 fixed inset-0 z-50 bg-black/80 duration-150",e),onClick:e=>{e.stopPropagation(),a?.(e)},...s}));c.displayName=r.Dialog.Overlay.displayName;let u=a.forwardRef(({className:e,children:a,...o},i)=>(0,t.jsxs)(n,{children:[(0,t.jsx)(c,{}),(0,t.jsxs)(r.Dialog.Content,{ref:i,className:(0,l.cn)("bg-background data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 fixed top-[50%] left-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border p-6 shadow-lg duration-150 sm:rounded-lg",e),...o,children:[a,(0,t.jsxs)(r.Dialog.Close,{className:"ring-offset-background focus:ring-ring data-[state=open]:bg-accent data-[state=open]:text-muted-foreground absolute top-4 right-4 cursor-pointer rounded-sm opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2 focus:outline-none disabled:pointer-events-none",children:[(0,t.jsx)(s.X,{className:"h-4 w-4"}),(0,t.jsx)("span",{className:"sr-only",children:"Close"})]})]})]}));u.displayName=r.Dialog.Content.displayName;let f=({className:e,...a})=>(0,t.jsx)("div",{className:(0,l.cn)("flex flex-col space-y-1.5 text-center sm:text-left",e),...a});f.displayName="DialogHeader";let p=({className:e,...a})=>(0,t.jsx)("div",{className:(0,l.cn)("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...a});p.displayName="DialogFooter";let g=a.forwardRef(({className:e,...a},s)=>(0,t.jsx)(r.Dialog.Title,{ref:s,className:(0,l.cn)("text-lg leading-none font-semibold tracking-tight",e),...a}));g.displayName=r.Dialog.Title.displayName;let h=a.forwardRef(({className:e,...a},s)=>(0,t.jsx)(r.Dialog.Description,{ref:s,className:(0,l.cn)("text-muted-foreground text-sm",e),...a}));h.displayName=r.Dialog.Description.displayName,e.s(["Dialog",()=>o,"DialogClose",()=>d,"DialogContent",()=>u,"DialogDescription",()=>h,"DialogFooter",()=>p,"DialogHeader",()=>f,"DialogTitle",()=>g,"DialogTrigger",()=>i])},1650,e=>{"use strict";e.i(11495),e.s([])},19933,e=>{"use strict";let t=(0,e.i(3645).default)("folder-open",[["path",{d:"m6 14 1.5-2.9A2 2 0 0 1 9.24 10H20a2 2 0 0 1 1.94 2.5l-1.54 6a2 2 0 0 1-1.95 1.5H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H18a2 2 0 0 1 2 2v2",key:"usdka0"}]]);e.s(["FolderOpen",()=>t],19933)},8986,68845,58216,65715,e=>{"use strict";let t=(0,e.i(3645).default)("code-xml",[["path",{d:"m18 16 4-4-4-4",key:"1inbqp"}],["path",{d:"m6 8-4 4 4 4",key:"15zrgr"}],["path",{d:"m14.5 4-5 16",key:"e7oirm"}]]);e.s(["Code2",()=>t],8986);var a=e.i(21023);let r=(0,a.createServerReference)("4092367ac10328e8b3864397dc493dca8be3a8799a",a.callServer,void 0,a.findSourceMapURL,"openIde");e.s(["openIde",()=>r],68845);let s=(0,a.createServerReference)("4086859308827cf26f60f9be5ad36f626101c3936f",a.callServer,void 0,a.findSourceMapURL,"openShell");e.s(["openShell",()=>s],58216);let l=(0,a.createServerReference)("40e2cfeda848d99e381b3c6647f7f382e039c9229f",a.callServer,void 0,a.findSourceMapURL,"openFolder");e.s(["openFolder",()=>l],65715)},26370,e=>{"use strict";let t=(0,e.i(3645).default)("bot",[["path",{d:"M12 8V4H8",key:"hb8ula"}],["rect",{width:"16",height:"12",x:"4",y:"8",rx:"2",key:"enze0r"}],["path",{d:"M2 14h2",key:"vft8re"}],["path",{d:"M20 14h2",key:"4cs60a"}],["path",{d:"M15 13v2",key:"1xurst"}],["path",{d:"M9 13v2",key:"rq6x2g"}]]);e.s(["Bot",()=>t],26370)},54793,7729,e=>{"use strict";var t=e.i(20314),a=e.i(31777);function r({icon:e,title:r,description:s,action:l,className:o,...i}){return(0,t.jsxs)("div",{className:(0,a.cn)("flex flex-col items-center gap-4 px-4 py-12 text-center",o),...i,children:[e?(0,t.jsx)("div",{className:"text-muted-foreground",children:e}):null,(0,t.jsx)("h3",{className:"text-lg font-semibold",children:r}),s?(0,t.jsx)("p",{className:"text-muted-foreground max-w-md text-sm",children:s}):null,l?(0,t.jsx)("div",{className:"mt-2",children:l}):null]})}e.s(["EmptyState",()=>r],7729),e.s([],54793)},70802,67385,e=>{"use strict";var t=e.i(21023);let a=(0,t.createServerReference)("00174f483aa19eda3872e22ea5660c62fd328d042c",t.callServer,void 0,t.findSourceMapURL,"getAllAgentModels");e.s(["getAllAgentModels",()=>a],70802);let r=(0,t.createServerReference)("605ff5635e00c04b32392f4cde55afe876aec08b3c",t.callServer,void 0,t.findSourceMapURL,"updateAgentAndModel");e.s(["updateAgentAndModel",()=>r],67385)},59975,e=>{"use strict";var t=e.i(21023);let a=(0,t.createServerReference)("409aa8a1e3941ae904885eebdb9c9035fccbe69de2",t.callServer,void 0,t.findSourceMapURL,"addRepository");e.s(["addRepository",()=>a])},76852,e=>{"use strict";var t=e.i(79054),a=e.i(68845),r=e.i(58216),s=e.i(65715);function l(e){let[l,o]=(0,t.useState)(!1),[i,n]=(0,t.useState)(!1),[d,c]=(0,t.useState)(!1),[u,f]=(0,t.useState)(null),[p,g]=(0,t.useState)(null),[h,m]=(0,t.useState)(null),y=(0,t.useRef)(null),v=(0,t.useRef)(null),x=(0,t.useRef)(null);(0,t.useEffect)(()=>()=>{y.current&&clearTimeout(y.current),v.current&&clearTimeout(v.current),x.current&&clearTimeout(x.current)},[]);let b=(0,t.useCallback)(async(t,a,r,s,l)=>{if(e&&!l){s.current&&clearTimeout(s.current),a(!0),r(null);try{let e=await t();if(!e.success){let t=e.error??"An unexpected error occurred";r(t),s.current=setTimeout(()=>r(null),5e3)}}catch(e){r(e instanceof Error?e.message:"An unexpected error occurred"),s.current=setTimeout(()=>r(null),5e3)}finally{a(!1)}}},[e]);return{openInIde:(0,t.useCallback)(()=>b(()=>(0,a.openIde)({repositoryPath:e.repositoryPath}),o,f,y,l),[b,l,e]),openInShell:(0,t.useCallback)(()=>b(()=>(0,r.openShell)({repositoryPath:e.repositoryPath}),n,g,v,i),[b,i,e]),openFolder:(0,t.useCallback)(()=>b(()=>(0,s.openFolder)(e.repositoryPath),c,m,x,d),[b,d,e]),ideLoading:l,shellLoading:i,folderLoading:d,ideError:u,shellError:p,folderError:h}}e.s(["useRepositoryActions",()=>l])}]);
@@ -1 +0,0 @@
1
- (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,38573,e=>{"use strict";let t=(0,e.i(3645).default)("terminal",[["path",{d:"M12 19h8",key:"baeox8"}],["path",{d:"m4 17 6-6-6-6",key:"1yngyt"}]]);e.s(["Terminal",()=>t],38573)},30702,e=>{"use strict";let t=(0,e.i(3645).default)("external-link",[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]]);e.s(["ExternalLink",()=>t],30702)},81846,e=>{"use strict";var t=e.i(20314),s=e.i(94237),a=e.i(31777);let r=(0,s.cva)("inline-flex items-center rounded-md border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:ring-2 focus:ring-ring focus:ring-offset-2 focus:outline-none",{variants:{variant:{default:"border-transparent bg-primary text-primary-foreground shadow hover:bg-primary/80",secondary:"border-transparent bg-secondary text-secondary-foreground hover:bg-secondary/80",destructive:"border-transparent bg-destructive text-destructive-foreground shadow hover:bg-destructive/80",outline:"text-foreground"}},defaultVariants:{variant:"default"}});function i({className:e,variant:s,...i}){return(0,t.jsx)("div",{className:(0,a.cn)(r({variant:s}),e),...i})}e.s(["Badge",()=>i])},24042,e=>{"use strict";let t=(0,e.i(3645).default)("play",[["path",{d:"M5 5a2 2 0 0 1 3.008-1.728l11.997 6.998a2 2 0 0 1 .003 3.458l-12 7A2 2 0 0 1 5 19z",key:"10ikf1"}]]);e.s(["Play",()=>t],24042)},2287,e=>{"use strict";var t=e.i(20314),s=e.i(79054),a=e.i(90033),r=e.i(60253),i=e.i(31777);let l=a.Dialog.Root,n=a.Dialog.Trigger,o=a.Dialog.Portal,c=a.Dialog.Close,d=s.forwardRef(({className:e,onClick:s,...r},l)=>(0,t.jsx)(a.Dialog.Overlay,{ref:l,className:(0,i.cn)("data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 fixed inset-0 z-50 bg-black/80 duration-150",e),onClick:e=>{e.stopPropagation(),s?.(e)},...r}));d.displayName=a.Dialog.Overlay.displayName;let u=s.forwardRef(({className:e,children:s,...l},n)=>(0,t.jsxs)(o,{children:[(0,t.jsx)(d,{}),(0,t.jsxs)(a.Dialog.Content,{ref:n,className:(0,i.cn)("bg-background data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 fixed top-[50%] left-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border p-6 shadow-lg duration-150 sm:rounded-lg",e),...l,children:[s,(0,t.jsxs)(a.Dialog.Close,{className:"ring-offset-background focus:ring-ring data-[state=open]:bg-accent data-[state=open]:text-muted-foreground absolute top-4 right-4 cursor-pointer rounded-sm opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2 focus:outline-none disabled:pointer-events-none",children:[(0,t.jsx)(r.X,{className:"h-4 w-4"}),(0,t.jsx)("span",{className:"sr-only",children:"Close"})]})]})]}));u.displayName=a.Dialog.Content.displayName;let m=({className:e,...s})=>(0,t.jsx)("div",{className:(0,i.cn)("flex flex-col space-y-1.5 text-center sm:text-left",e),...s});m.displayName="DialogHeader";let f=({className:e,...s})=>(0,t.jsx)("div",{className:(0,i.cn)("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...s});f.displayName="DialogFooter";let h=s.forwardRef(({className:e,...s},r)=>(0,t.jsx)(a.Dialog.Title,{ref:r,className:(0,i.cn)("text-lg leading-none font-semibold tracking-tight",e),...s}));h.displayName=a.Dialog.Title.displayName;let x=s.forwardRef(({className:e,...s},r)=>(0,t.jsx)(a.Dialog.Description,{ref:r,className:(0,i.cn)("text-muted-foreground text-sm",e),...s}));x.displayName=a.Dialog.Description.displayName,e.s(["Dialog",()=>l,"DialogClose",()=>c,"DialogContent",()=>u,"DialogDescription",()=>x,"DialogFooter",()=>f,"DialogHeader",()=>m,"DialogTitle",()=>h,"DialogTrigger",()=>n])},23925,1012,e=>{"use strict";let t=(0,e.i(3645).default)("check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);e.s(["default",()=>t],1012),e.s(["Check",()=>t],23925)},95230,e=>{"use strict";let t=(0,e.i(3645).default)("download",[["path",{d:"M12 15V3",key:"m9g1x1"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["path",{d:"m7 10 5 5 5-5",key:"brsn70"}]]);e.s(["default",()=>t])},81181,e=>{"use strict";var t=e.i(95230);e.s(["Download",()=>t.default])},95812,e=>{"use strict";let t=(0,e.i(3645).default)("circle",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]]);e.s(["Circle",()=>t],95812)},87342,e=>{"use strict";var t=e.i(79054),s=e.i(22528),a=e.i(5978),r=e.i(86874),i=e.i(20314);function l(e){let l=e+"CollectionProvider",[n,o]=(0,s.createContextScope)(l),[c,d]=n(l,{collectionRef:{current:null},itemMap:new Map}),u=e=>{let{scope:s,children:a}=e,r=t.default.useRef(null),l=t.default.useRef(new Map).current;return(0,i.jsx)(c,{scope:s,itemMap:l,collectionRef:r,children:a})};u.displayName=l;let m=e+"CollectionSlot",f=(0,r.createSlot)(m),h=t.default.forwardRef((e,t)=>{let{scope:s,children:r}=e,l=d(m,s),n=(0,a.useComposedRefs)(t,l.collectionRef);return(0,i.jsx)(f,{ref:n,children:r})});h.displayName=m;let x=e+"CollectionItemSlot",p="data-radix-collection-item",g=(0,r.createSlot)(x),y=t.default.forwardRef((e,s)=>{let{scope:r,children:l,...n}=e,o=t.default.useRef(null),c=(0,a.useComposedRefs)(s,o),u=d(x,r);return t.default.useEffect(()=>(u.itemMap.set(o,{ref:o,...n}),()=>void u.itemMap.delete(o))),(0,i.jsx)(g,{...{[p]:""},ref:c,children:l})});return y.displayName=x,[{Provider:u,Slot:h,ItemSlot:y},function(s){let a=d(e+"CollectionConsumer",s);return t.default.useCallback(()=>{let e=a.collectionRef.current;if(!e)return[];let t=Array.from(e.querySelectorAll(`[${p}]`));return Array.from(a.itemMap.values()).sort((e,s)=>t.indexOf(e.ref.current)-t.indexOf(s.ref.current))},[a.collectionRef,a.itemMap])},o]}var n=new WeakMap;function o(e,t){var s,a;let r,i,l;if("at"in Array.prototype)return Array.prototype.at.call(e,t);let n=(s=e,a=t,r=s.length,(l=(i=c(a))>=0?i:r+i)<0||l>=r?-1:l);return -1===n?void 0:e[n]}function c(e){return e!=e||0===e?0:Math.trunc(e)}(class e extends Map{#e;constructor(e){super(e),this.#e=[...super.keys()],n.set(this,!0)}set(e,t){return n.get(this)&&(this.has(e)?this.#e[this.#e.indexOf(e)]=e:this.#e.push(e)),super.set(e,t),this}insert(e,t,s){let a,r=this.has(t),i=this.#e.length,l=c(e),n=l>=0?l:i+l,o=n<0||n>=i?-1:n;if(o===this.size||r&&o===this.size-1||-1===o)return this.set(t,s),this;let d=this.size+ +!r;l<0&&n++;let u=[...this.#e],m=!1;for(let e=n;e<d;e++)if(n===e){let i=u[e];u[e]===t&&(i=u[e+1]),r&&this.delete(t),a=this.get(i),this.set(t,s)}else{m||u[e-1]!==t||(m=!0);let s=u[m?e:e-1],r=a;a=this.get(s),this.delete(s),this.set(s,r)}return this}with(t,s,a){let r=new e(this);return r.insert(t,s,a),r}before(e){let t=this.#e.indexOf(e)-1;if(!(t<0))return this.entryAt(t)}setBefore(e,t,s){let a=this.#e.indexOf(e);return -1===a?this:this.insert(a,t,s)}after(e){let t=this.#e.indexOf(e);if(-1!==(t=-1===t||t===this.size-1?-1:t+1))return this.entryAt(t)}setAfter(e,t,s){let a=this.#e.indexOf(e);return -1===a?this:this.insert(a+1,t,s)}first(){return this.entryAt(0)}last(){return this.entryAt(-1)}clear(){return this.#e=[],super.clear()}delete(e){let t=super.delete(e);return t&&this.#e.splice(this.#e.indexOf(e),1),t}deleteAt(e){let t=this.keyAt(e);return void 0!==t&&this.delete(t)}at(e){let t=o(this.#e,e);if(void 0!==t)return this.get(t)}entryAt(e){let t=o(this.#e,e);if(void 0!==t)return[t,this.get(t)]}indexOf(e){return this.#e.indexOf(e)}keyAt(e){return o(this.#e,e)}from(e,t){let s=this.indexOf(e);if(-1===s)return;let a=s+t;return a<0&&(a=0),a>=this.size&&(a=this.size-1),this.at(a)}keyFrom(e,t){let s=this.indexOf(e);if(-1===s)return;let a=s+t;return a<0&&(a=0),a>=this.size&&(a=this.size-1),this.keyAt(a)}find(e,t){let s=0;for(let a of this){if(Reflect.apply(e,t,[a,s,this]))return a;s++}}findIndex(e,t){let s=0;for(let a of this){if(Reflect.apply(e,t,[a,s,this]))return s;s++}return -1}filter(t,s){let a=[],r=0;for(let e of this)Reflect.apply(t,s,[e,r,this])&&a.push(e),r++;return new e(a)}map(t,s){let a=[],r=0;for(let e of this)a.push([e[0],Reflect.apply(t,s,[e,r,this])]),r++;return new e(a)}reduce(...e){let[t,s]=e,a=0,r=s??this.at(0);for(let s of this)r=0===a&&1===e.length?s:Reflect.apply(t,this,[r,s,a,this]),a++;return r}reduceRight(...e){let[t,s]=e,a=s??this.at(-1);for(let s=this.size-1;s>=0;s--){let r=this.at(s);a=s===this.size-1&&1===e.length?r:Reflect.apply(t,this,[a,r,s,this])}return a}toSorted(t){return new e([...this.entries()].sort(t))}toReversed(){let t=new e;for(let e=this.size-1;e>=0;e--){let s=this.keyAt(e),a=this.get(s);t.set(s,a)}return t}toSpliced(...t){let s=[...this.entries()];return s.splice(...t),new e(s)}slice(t,s){let a=new e,r=this.size-1;if(void 0===t)return a;t<0&&(t+=this.size),void 0!==s&&s>0&&(r=s-1);for(let e=t;e<=r;e++){let t=this.keyAt(e),s=this.get(t);a.set(t,s)}return a}every(e,t){let s=0;for(let a of this){if(!Reflect.apply(e,t,[a,s,this]))return!1;s++}return!0}some(e,t){let s=0;for(let a of this){if(Reflect.apply(e,t,[a,s,this]))return!0;s++}return!1}}),e.s(["createCollection",()=>l])},68304,51080,e=>{"use strict";var t=e.i(20314),s=e.i(79054),a=e.i(91967),r=e.i(22528),i=e.i(87342),l=e.i(5978),n=e.i(13123),o=e.i(87620),c=e.i(29297),d=e.i(36589),u=e.i(66033),m="rovingFocusGroup.onEntryFocus",f={bubbles:!1,cancelable:!0},h="RovingFocusGroup",[x,p,g]=(0,i.createCollection)(h),[y,v]=(0,r.createContextScope)(h,[g]),[b,j]=y(h),k=s.forwardRef((e,s)=>(0,t.jsx)(x.Provider,{scope:e.__scopeRovingFocusGroup,children:(0,t.jsx)(x.Slot,{scope:e.__scopeRovingFocusGroup,children:(0,t.jsx)(w,{...e,ref:s})})}));k.displayName=h;var w=s.forwardRef((e,r)=>{let{__scopeRovingFocusGroup:i,orientation:n,loop:x=!1,dir:g,currentTabStopId:y,defaultCurrentTabStopId:v,onCurrentTabStopIdChange:j,onEntryFocus:k,preventScrollOnEntryFocus:w=!1,...N}=e,C=s.useRef(null),T=(0,l.useComposedRefs)(r,C),D=(0,u.useDirection)(g),[I,S]=(0,d.useControllableState)({prop:y,defaultProp:v??null,onChange:j,caller:h}),[A,z]=s.useState(!1),E=(0,c.useCallbackRef)(k),M=p(i),L=s.useRef(!1),[P,F]=s.useState(0);return s.useEffect(()=>{let e=C.current;if(e)return e.addEventListener(m,E),()=>e.removeEventListener(m,E)},[E]),(0,t.jsx)(b,{scope:i,orientation:n,dir:D,loop:x,currentTabStopId:I,onItemFocus:s.useCallback(e=>S(e),[S]),onItemShiftTab:s.useCallback(()=>z(!0),[]),onFocusableItemAdd:s.useCallback(()=>F(e=>e+1),[]),onFocusableItemRemove:s.useCallback(()=>F(e=>e-1),[]),children:(0,t.jsx)(o.Primitive.div,{tabIndex:A||0===P?-1:0,"data-orientation":n,...N,ref:T,style:{outline:"none",...e.style},onMouseDown:(0,a.composeEventHandlers)(e.onMouseDown,()=>{L.current=!0}),onFocus:(0,a.composeEventHandlers)(e.onFocus,e=>{let t=!L.current;if(e.target===e.currentTarget&&t&&!A){let t=new CustomEvent(m,f);if(e.currentTarget.dispatchEvent(t),!t.defaultPrevented){let e=M().filter(e=>e.focusable);R([e.find(e=>e.active),e.find(e=>e.id===I),...e].filter(Boolean).map(e=>e.ref.current),w)}}L.current=!1}),onBlur:(0,a.composeEventHandlers)(e.onBlur,()=>z(!1))})})}),N="RovingFocusGroupItem",C=s.forwardRef((e,r)=>{let{__scopeRovingFocusGroup:i,focusable:l=!0,active:c=!1,tabStopId:d,children:u,...m}=e,f=(0,n.useId)(),h=d||f,g=j(N,i),y=g.currentTabStopId===h,v=p(i),{onFocusableItemAdd:b,onFocusableItemRemove:k,currentTabStopId:w}=g;return s.useEffect(()=>{if(l)return b(),()=>k()},[l,b,k]),(0,t.jsx)(x.ItemSlot,{scope:i,id:h,focusable:l,active:c,children:(0,t.jsx)(o.Primitive.span,{tabIndex:y?0:-1,"data-orientation":g.orientation,...m,ref:r,onMouseDown:(0,a.composeEventHandlers)(e.onMouseDown,e=>{l?g.onItemFocus(h):e.preventDefault()}),onFocus:(0,a.composeEventHandlers)(e.onFocus,()=>g.onItemFocus(h)),onKeyDown:(0,a.composeEventHandlers)(e.onKeyDown,e=>{if("Tab"===e.key&&e.shiftKey)return void g.onItemShiftTab();if(e.target!==e.currentTarget)return;let t=function(e,t,s){var a;let r=(a=e.key,"rtl"!==s?a:"ArrowLeft"===a?"ArrowRight":"ArrowRight"===a?"ArrowLeft":a);if(!("vertical"===t&&["ArrowLeft","ArrowRight"].includes(r))&&!("horizontal"===t&&["ArrowUp","ArrowDown"].includes(r)))return T[r]}(e,g.orientation,g.dir);if(void 0!==t){if(e.metaKey||e.ctrlKey||e.altKey||e.shiftKey)return;e.preventDefault();let r=v().filter(e=>e.focusable).map(e=>e.ref.current);if("last"===t)r.reverse();else if("prev"===t||"next"===t){var s,a;"prev"===t&&r.reverse();let i=r.indexOf(e.currentTarget);r=g.loop?(s=r,a=i+1,s.map((e,t)=>s[(a+t)%s.length])):r.slice(i+1)}setTimeout(()=>R(r))}}),children:"function"==typeof u?u({isCurrentTabStop:y,hasTabStop:null!=w}):u})})});C.displayName=N;var T={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function R(e,t=!1){let s=document.activeElement;for(let a of e)if(a===s||(a.focus({preventScroll:t}),document.activeElement!==s))return}e.s(["Item",()=>C,"Root",()=>k,"createRovingFocusGroupScope",()=>v],51080);var D=e.i(85995),I="Tabs",[S,A]=(0,r.createContextScope)(I,[v]),z=v(),[E,M]=S(I),L=s.forwardRef((e,s)=>{let{__scopeTabs:a,value:r,onValueChange:i,defaultValue:l,orientation:c="horizontal",dir:m,activationMode:f="automatic",...h}=e,x=(0,u.useDirection)(m),[p,g]=(0,d.useControllableState)({prop:r,onChange:i,defaultProp:l??"",caller:I});return(0,t.jsx)(E,{scope:a,baseId:(0,n.useId)(),value:p,onValueChange:g,orientation:c,dir:x,activationMode:f,children:(0,t.jsx)(o.Primitive.div,{dir:x,"data-orientation":c,...h,ref:s})})});L.displayName=I;var P="TabsList",F=s.forwardRef((e,s)=>{let{__scopeTabs:a,loop:r=!0,...i}=e,l=M(P,a),n=z(a);return(0,t.jsx)(k,{asChild:!0,...n,orientation:l.orientation,dir:l.dir,loop:r,children:(0,t.jsx)(o.Primitive.div,{role:"tablist","aria-orientation":l.orientation,...i,ref:s})})});F.displayName=P;var O="TabsTrigger",H=s.forwardRef((e,s)=>{let{__scopeTabs:r,value:i,disabled:l=!1,...n}=e,c=M(O,r),d=z(r),u=V(c.baseId,i),m=K(c.baseId,i),f=i===c.value;return(0,t.jsx)(C,{asChild:!0,...d,focusable:!l,active:f,children:(0,t.jsx)(o.Primitive.button,{type:"button",role:"tab","aria-selected":f,"aria-controls":m,"data-state":f?"active":"inactive","data-disabled":l?"":void 0,disabled:l,id:u,...n,ref:s,onMouseDown:(0,a.composeEventHandlers)(e.onMouseDown,e=>{l||0!==e.button||!1!==e.ctrlKey?e.preventDefault():c.onValueChange(i)}),onKeyDown:(0,a.composeEventHandlers)(e.onKeyDown,e=>{[" ","Enter"].includes(e.key)&&c.onValueChange(i)}),onFocus:(0,a.composeEventHandlers)(e.onFocus,()=>{let e="manual"!==c.activationMode;f||l||!e||c.onValueChange(i)})})})});H.displayName=O;var B="TabsContent",q=s.forwardRef((e,a)=>{let{__scopeTabs:r,value:i,forceMount:l,children:n,...c}=e,d=M(B,r),u=V(d.baseId,i),m=K(d.baseId,i),f=i===d.value,h=s.useRef(f);return s.useEffect(()=>{let e=requestAnimationFrame(()=>h.current=!1);return()=>cancelAnimationFrame(e)},[]),(0,t.jsx)(D.Presence,{present:l||f,children:({present:s})=>(0,t.jsx)(o.Primitive.div,{"data-state":f?"active":"inactive","data-orientation":d.orientation,role:"tabpanel","aria-labelledby":u,hidden:!s,id:m,tabIndex:0,...c,ref:a,style:{...e.style,animationDuration:h.current?"0s":void 0},children:s&&n})})});function V(e,t){return`${e}-trigger-${t}`}function K(e,t){return`${e}-content-${t}`}q.displayName=B,e.s(["Content",()=>q,"List",()=>F,"Root",()=>L,"Tabs",()=>L,"TabsContent",()=>q,"TabsList",()=>F,"TabsTrigger",()=>H,"Trigger",()=>H,"createTabsScope",()=>A],43133);var $=e.i(43133),$=$,U=e.i(31777);let G=$.Root,_=s.forwardRef(({className:e,...s},a)=>(0,t.jsx)($.List,{ref:a,className:(0,U.cn)("bg-muted text-muted-foreground inline-flex h-9 items-center justify-center rounded-lg p-1",e),...s}));_.displayName=$.List.displayName;let W=s.forwardRef(({className:e,...s},a)=>(0,t.jsx)($.Trigger,{ref:a,className:(0,U.cn)("ring-offset-background focus-visible:ring-ring data-[state=active]:bg-background data-[state=active]:text-foreground inline-flex items-center justify-center rounded-md px-3 py-1 text-sm font-medium whitespace-nowrap transition-all focus-visible:ring-2 focus-visible:ring-offset-2 focus-visible:outline-none disabled:pointer-events-none disabled:opacity-50 data-[state=active]:shadow",e),...s}));W.displayName=$.Trigger.displayName;let X=s.forwardRef(({className:e,...s},a)=>(0,t.jsx)($.Content,{ref:a,className:(0,U.cn)("ring-offset-background focus-visible:ring-ring mt-2 focus-visible:ring-2 focus-visible:ring-offset-2 focus-visible:outline-none",e),...s}));X.displayName=$.Content.displayName,e.s(["Tabs",()=>G,"TabsContent",()=>X,"TabsList",()=>_,"TabsTrigger",()=>W],68304)},49228,e=>{"use strict";let t=(0,e.i(3645).default)("git-branch",[["line",{x1:"6",x2:"6",y1:"3",y2:"15",key:"17qcm7"}],["circle",{cx:"18",cy:"6",r:"3",key:"1h7g24"}],["circle",{cx:"6",cy:"18",r:"3",key:"fqmcym"}],["path",{d:"M18 9a9 9 0 0 1-9 9",key:"n2h4wq"}]]);e.s(["GitBranch",()=>t],49228)},35e3,e=>{"use strict";var t=e.i(80986);e.s(["CheckCircle2",()=>t.default])},33548,e=>{"use strict";let t=(0,e.i(3645).default)("copy",[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]]);e.s(["Copy",()=>t],33548)},83902,e=>{"use strict";let t=(0,e.i(3645).default)("rocket",[["path",{d:"M4.5 16.5c-1.5 1.26-2 5-2 5s3.74-.5 5-2c.71-.84.7-2.13-.09-2.91a2.18 2.18 0 0 0-2.91-.09z",key:"m3kijz"}],["path",{d:"m12 15-3-3a22 22 0 0 1 2-3.95A12.88 12.88 0 0 1 22 2c0 2.72-.78 7.5-6 11a22.35 22.35 0 0 1-4 2z",key:"1fmvmk"}],["path",{d:"M9 12H4s.55-3.03 2-4c1.62-1.08 5 0 5 0",key:"1f8sc4"}],["path",{d:"M12 15v5s3.03-.55 4-2c1.08-1.62 0-5 0-5",key:"qeys4"}]]);e.s(["Rocket",()=>t],83902)},44412,e=>{"use strict";var t=e.i(20314),s=e.i(79054),a=e.i(81975),r=e.i(68304),i=e.i(31777),l=e.i(83428),n=e.i(83902),o=e.i(81181),c=e.i(3645);let d=(0,c.default)("monitor",[["rect",{width:"20",height:"14",x:"2",y:"3",rx:"2",key:"48i651"}],["line",{x1:"8",x2:"16",y1:"21",y2:"21",key:"1svkeh"}],["line",{x1:"12",x2:"12",y1:"17",y2:"21",key:"vw1qmm"}]]);var u=e.i(38573),m=e.i(49228),f=e.i(54277),h=e.i(95812),x=e.i(35e3);let p=(0,c.default)("package",[["path",{d:"M11 21.73a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73z",key:"1a0edw"}],["path",{d:"M12 22V12",key:"d0xqtd"}],["polyline",{points:"3.29 7 12 12 20.71 7",key:"ousv84"}],["path",{d:"m7.5 4.27 9 5.15",key:"1c824w"}]]);var g=e.i(35364),y=e.i(2828),v=e.i(33548),b=e.i(23925),j=e.i(30702),k=e.i(11495);let w={linux:"Linux",darwin:"macOS",win32:"Windows"},N={ide:{label:"IDE",icon:d},"cli-agent":{label:"CLI Agent",icon:u.Terminal},vcs:{label:"VCS",icon:m.GitBranch},terminal:{label:"Terminal",icon:u.Terminal}};function C({status:e}){return"available"===e?(0,t.jsxs)("span",{className:"inline-flex items-center gap-1 rounded-full bg-emerald-100 px-2 py-0.5 text-xs font-medium text-emerald-700 dark:bg-emerald-900/30 dark:text-emerald-400",children:[(0,t.jsx)(b.Check,{className:"h-3 w-3"}),"Installed"]}):"error"===e?(0,t.jsx)("span",{className:"inline-flex items-center gap-1 rounded-full bg-red-100 px-2 py-0.5 text-xs font-medium text-red-700 dark:bg-red-900/30 dark:text-red-400",children:"Error"}):(0,t.jsx)("span",{className:"inline-flex items-center gap-1 rounded-full bg-amber-100 px-2 py-0.5 text-xs font-medium text-amber-700 dark:bg-amber-900/30 dark:text-amber-400",children:"Missing"})}function T({tool:e,open:a,onClose:r,onRefresh:i,autoStart:c}){let[u,m]=(0,s.useState)(!1),[f,h]=(0,s.useState)(!1),{logs:x,status:y,startInstall:T}=function(e){let[t,a]=(0,s.useState)([]),[r,i]=(0,s.useState)("idle"),[l,n]=(0,s.useState)(null),o=(0,s.useRef)(null),c=(0,s.useCallback)(()=>{o.current&&(o.current.close(),o.current=null)},[]);return(0,s.useEffect)(()=>c,[c]),{logs:t,status:r,result:l,startInstall:(0,s.useCallback)(()=>{c(),a([]),n(null),i("streaming");let t=new EventSource(`/api/tools/${e}/install/stream`);o.current=t,t.onmessage=e=>{a(t=>[...t,e.data])},t.addEventListener("done",e=>{let t=JSON.parse(e.data);n(t),i("error"===t.status?"error":"done"),c()}),t.onerror=()=>{i("error"),c()}},[e,c])}}(e.id),R=(0,s.useRef)(null),D=(0,s.useRef)(!0),I=(0,s.useRef)(!1),S="available"===e.status.status,A="error"===e.status.status,z=S&&!!e.openDirectory,E=!S&&!A&&e.autoInstall;async function M(){h(!0);try{await fetch(`/api/tools/${e.id}/launch`,{method:"POST"})}finally{h(!1)}}(0,s.useEffect)(()=>{a&&c&&E&&"idle"===y&&!I.current&&(I.current=!0,T()),a||(I.current=!1)},[a,c,E,y,T]);let L=(0,s.useCallback)(()=>{let e=R.current;e&&(D.current=e.scrollTop+e.clientHeight>=e.scrollHeight-50)},[]);(0,s.useEffect)(()=>{D.current&&R.current&&(R.current.scrollTop=R.current.scrollHeight)},[x,y]),(0,s.useEffect)(()=>{"done"===y&&i&&i()},[y,i]);let P=(0,t.jsxs)("div",{className:"flex flex-col gap-1.5 pr-6",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[e.iconUrl?(0,t.jsx)("img",{src:e.iconUrl,alt:"",width:24,height:24,className:"shrink-0 dark:invert"}):(0,t.jsx)(p,{className:"text-muted-foreground h-6 w-6 shrink-0"}),(0,t.jsx)("h2",{className:"text-base font-bold",children:e.name}),(0,t.jsx)(C,{status:e.status.status})]}),(0,t.jsx)("div",{className:"flex items-center gap-2",children:e.tags.map(e=>{let s=N[e]??{label:e,icon:d},a=s.icon;return(0,t.jsxs)("span",{className:"text-muted-foreground/70 inline-flex items-center gap-0.5 text-[10px]",children:[(0,t.jsx)(a,{className:"h-3 w-3"}),s.label]},e)})})]});return(0,t.jsx)(k.BaseDrawer,{open:a,onClose:r,size:"md",modal:!0,title:e.name,header:P,"data-testid":"tool-detail-drawer",children:(0,t.jsxs)("div",{className:"flex flex-1 flex-col gap-4 overflow-y-auto p-4",children:[(0,t.jsx)("p",{className:"text-muted-foreground text-sm",children:e.description}),e.author||e.platforms?(0,t.jsxs)("div",{className:"flex flex-wrap items-center gap-x-4 gap-y-1 text-xs",children:[e.author?(0,t.jsxs)("span",{className:"text-muted-foreground",children:["by"," ",e.website?(0,t.jsx)("a",{href:e.website,target:"_blank",rel:"noopener noreferrer",className:"text-foreground hover:underline",children:e.author}):(0,t.jsx)("span",{className:"text-foreground",children:e.author})]}):null,e.platforms&&e.platforms.length>0?(0,t.jsx)("span",{className:"text-muted-foreground",children:e.platforms.map(e=>w[e]??e).join(" · ")}):null]}):null,e.installCommand?(0,t.jsxs)("div",{className:"flex flex-col gap-1.5",children:[(0,t.jsx)("span",{className:"text-muted-foreground text-xs font-semibold tracking-wide uppercase",children:"Install command"}),(0,t.jsxs)("div",{className:"relative rounded-md bg-zinc-900 text-zinc-100",children:[(0,t.jsx)("pre",{className:"overflow-x-auto px-3 py-2.5 pr-16 font-mono text-xs leading-relaxed break-all whitespace-pre-wrap",children:(0,t.jsx)("code",{children:e.installCommand})}),(0,t.jsxs)(g.Button,{variant:"ghost",size:"sm",className:"absolute top-1.5 right-1.5 h-7 cursor-pointer px-2 text-zinc-400 hover:text-zinc-100",onClick:function(){e.installCommand&&navigator.clipboard.writeText(e.installCommand).then(()=>{m(!0),setTimeout(()=>m(!1),2e3)})},"aria-label":u?"Copied!":"Copy install command",children:[u?(0,t.jsx)(b.Check,{className:"h-3.5 w-3.5 text-emerald-500"}):(0,t.jsx)(v.Copy,{className:"h-3.5 w-3.5"}),(0,t.jsx)("span",{className:"ml-1 text-[10px]",children:u?"Copied!":"Copy"})]})]})]}):null,(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[E?(0,t.jsxs)(g.Button,{size:"sm",onClick:T,disabled:"streaming"===y,"aria-label":`Install ${e.name}`,className:"cursor-pointer",children:["streaming"===y?(0,t.jsx)(l.Loader2,{className:"mr-1.5 h-3.5 w-3.5 animate-spin"}):(0,t.jsx)(o.Download,{className:"mr-1.5 h-3.5 w-3.5"}),"streaming"===y?"Installing...":"Install"]}):null,z?(0,t.jsxs)(g.Button,{size:"sm",variant:"outline",onClick:()=>void M(),disabled:f,"aria-label":`Launch ${e.name}`,className:"cursor-pointer",children:[f?(0,t.jsx)(l.Loader2,{className:"mr-1.5 h-3.5 w-3.5 animate-spin"}):(0,t.jsx)(n.Rocket,{className:"mr-1.5 h-3.5 w-3.5"}),"Launch"]}):null,e.documentationUrl?(0,t.jsx)(g.Button,{variant:"outline",size:"sm",className:"cursor-pointer",asChild:!0,children:(0,t.jsxs)("a",{href:e.documentationUrl,target:"_blank",rel:"noopener noreferrer",children:["Docs",(0,t.jsx)(j.ExternalLink,{className:"ml-1 h-3 w-3"})]})}):null]}),("streaming"===y||"done"===y||"error"===y)&&x.length>0?(0,t.jsxs)("div",{className:"flex flex-col gap-1.5",children:[(0,t.jsx)("span",{className:"text-muted-foreground text-xs font-semibold tracking-wide uppercase",children:"Install log"}),(0,t.jsxs)("div",{ref:R,onScroll:L,className:"max-h-60 overflow-auto rounded-md bg-zinc-900 p-3 font-mono text-xs leading-relaxed text-zinc-100","data-testid":"tool-install-log",children:[x.map((e,s)=>(0,t.jsx)("div",{className:"break-all whitespace-pre-wrap",children:e},s)),"done"===y?(0,t.jsx)("div",{className:"mt-2 border-t border-zinc-700 pt-2 text-emerald-400",children:"Installation complete"}):null,"error"===y?(0,t.jsx)("div",{className:"mt-2 border-t border-zinc-700 pt-2 text-red-400",children:"Installation failed"}):null]})]}):null]})})}let R={ide:{label:"IDE",icon:d},"cli-agent":{label:"CLI Agent",icon:u.Terminal},vcs:{label:"VCS",icon:m.GitBranch},terminal:{label:"Terminal",icon:u.Terminal}};function D({tool:e,onRefresh:a,className:r}){let[c,u]=(0,s.useState)(!1),[m,v]=(0,s.useState)(!1),[b,j]=(0,s.useTransition)(),k="available"===e.status.status,w="error"===e.status.status,N=k&&!!e.openDirectory;return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)("div",{"data-testid":"tool-card",onClick:function(){v(!1),u(!0)},className:(0,i.cn)("bg-card group flex h-30 w-full cursor-pointer flex-col rounded-lg border p-3 transition-shadow hover:shadow-md",r),children:[(0,t.jsxs)("div",{className:"mb-2 flex items-start justify-between gap-2",children:[(0,t.jsxs)("div",{className:"flex min-w-0 items-center gap-2",children:[e.iconUrl?(0,t.jsx)("img",{src:e.iconUrl,alt:"",width:20,height:20,className:"shrink-0 dark:invert"}):(0,t.jsx)(p,{className:"text-muted-foreground h-5 w-5 shrink-0"}),(0,t.jsx)("h3",{"data-testid":"tool-card-name",className:"truncate text-sm font-bold",children:e.name})]}),(0,t.jsx)("div",{"data-testid":"tool-card-tags",className:"flex shrink-0 items-center gap-1",children:e.tags.map(e=>{let s=R[e]??{label:e,icon:d},a=s.icon;return(0,t.jsxs)("span",{className:"text-muted-foreground/70 inline-flex items-center gap-0.5 text-[9px]",children:[(0,t.jsx)(a,{className:"h-2.5 w-2.5"}),s.label]},e)})})]}),(0,t.jsx)("p",{"data-testid":"tool-card-summary",className:"text-muted-foreground mt-1 truncate text-xs",children:e.summary}),(0,t.jsxs)("div",{className:"mt-auto flex items-center justify-between pt-3",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[w&&"error"===e.status.status?(0,t.jsxs)("span",{className:"flex items-center gap-1 truncate text-[10px] text-red-600 dark:text-red-400",title:e.status.errorMessage,children:[(0,t.jsx)(f.CircleX,{className:"h-3 w-3 shrink-0"}),e.status.errorMessage??"Error"]}):k?(0,t.jsxs)("span",{className:"flex items-center gap-1 text-[10px] text-emerald-600 dark:text-emerald-400",children:[(0,t.jsx)(x.CheckCircle2,{className:"h-3 w-3"}),"Installed"]}):(0,t.jsxs)("span",{className:"text-muted-foreground flex items-center gap-1 text-[10px]",children:[(0,t.jsx)(h.Circle,{className:"h-3 w-3"}),"Not installed"]}),e.required?(0,t.jsx)(y.TooltipProvider,{children:(0,t.jsxs)(y.Tooltip,{children:[(0,t.jsx)(y.TooltipTrigger,{asChild:!0,children:(0,t.jsx)("span",{className:"rounded bg-amber-100 px-1.5 py-0.5 text-[9px] font-medium text-amber-700 dark:bg-amber-900/50 dark:text-amber-400",children:"Required"})}),(0,t.jsx)(y.TooltipContent,{side:"top",children:"This tool is required for Shep to function properly"})]})}):null]}),(0,t.jsx)("div",{className:"flex items-center gap-1",children:k&&N?(0,t.jsxs)(g.Button,{size:"sm",variant:"outline",onClick:function(t){t.stopPropagation(),j(async()=>{await fetch(`/api/tools/${e.id}/launch`,{method:"POST"})})},disabled:b,"aria-label":`Launch ${e.name}`,"data-testid":"tool-card-launch-button",className:"h-7 cursor-pointer rounded-md px-3 text-xs",children:[b?(0,t.jsx)(l.Loader2,{className:"mr-1 h-3 w-3 animate-spin"}):(0,t.jsx)(n.Rocket,{className:"mr-1 h-3 w-3"}),"Launch"]}):k||w?null:(0,t.jsxs)(g.Button,{size:"sm",variant:"default",onClick:function(t){t.stopPropagation(),v(e.autoInstall),u(!0)},"aria-label":`Install ${e.name}`,"data-testid":"tool-card-install-button",className:"h-7 cursor-pointer rounded-md px-3 text-xs",children:[(0,t.jsx)(o.Download,{className:"mr-1 h-3 w-3"}),"Install"]})})]})]}),(0,t.jsx)(T,{tool:e,open:c,onClose:()=>u(!1),onRefresh:a,autoStart:m})]})}let I={all:()=>!0,ide:e=>e.tags.includes("ide"),"cli-agent":e=>e.tags.includes("cli-agent"),vcs:e=>e.tags.includes("vcs"),terminal:e=>e.tags.includes("terminal")};function S({tools:e,className:l}){let[n,o]=(0,s.useState)(e),[c,d]=(0,s.useState)("all"),u=(0,s.useCallback)(async()=>{try{let e=await fetch("/api/tools");if(e.ok){let t=await e.json();o(t)}}catch{}},[]),m=n.filter(I[c]);return(0,t.jsxs)("div",{"data-testid":"tools-page-client",className:(0,i.cn)("space-y-4",l),children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(a.Wrench,{className:"text-muted-foreground h-4 w-4"}),(0,t.jsx)("h1",{className:"text-sm font-bold tracking-tight",children:"Tools"}),(0,t.jsxs)("span",{className:"text-muted-foreground text-[10px]",children:[n.filter(e=>"available"===e.status.status).length,"/",n.length," installed"]})]}),(0,t.jsxs)(r.Tabs,{value:c,onValueChange:e=>d(e),"data-testid":"tools-page-tabs",children:[(0,t.jsxs)(r.TabsList,{className:"h-7",children:[(0,t.jsx)(r.TabsTrigger,{value:"all","data-testid":"tools-tab-all",className:"px-2.5 text-xs",children:"All"}),(0,t.jsx)(r.TabsTrigger,{value:"ide","data-testid":"tools-tab-ide",className:"px-2.5 text-xs",children:"IDEs"}),(0,t.jsx)(r.TabsTrigger,{value:"cli-agent","data-testid":"tools-tab-cli-agent",className:"px-2.5 text-xs",children:"CLI Agents"}),(0,t.jsx)(r.TabsTrigger,{value:"vcs","data-testid":"tools-tab-vcs",className:"px-2.5 text-xs",children:"Version Control"}),(0,t.jsx)(r.TabsTrigger,{value:"terminal","data-testid":"tools-tab-terminal",className:"px-2.5 text-xs",children:"Terminals"})]}),(0,t.jsx)(r.TabsContent,{value:c,className:"mt-3",children:0===m.length?(0,t.jsxs)("div",{"data-testid":"tools-page-empty",className:"text-muted-foreground flex flex-col items-center justify-center py-12 text-center",children:[(0,t.jsx)(a.Wrench,{className:"mb-2 h-6 w-6 opacity-20"}),(0,t.jsx)("p",{className:"text-xs",children:"No tools in this category."})]}):(0,t.jsx)("div",{"data-testid":"tools-page-grid",className:"grid grid-cols-1 gap-3 sm:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4",children:m.map(e=>(0,t.jsx)(D,{tool:e,onRefresh:u},e.id))})})]})]})}e.s(["ToolsPageClient",()=>S],44412)}]);
@@ -1 +0,0 @@
1
- (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,48306,e=>{"use strict";var t=e.i(20314),r=e.i(31777);function a({className:e,...a}){return(0,t.jsx)("textarea",{"data-slot":"textarea",className:(0,r.cn)("placeholder:text-muted-foreground selection:bg-primary selection:text-primary-foreground dark:bg-input/30 border-input field-sizing-content min-h-[80px] w-full rounded-md border bg-transparent px-3 py-2 text-base shadow-xs transition-[color,box-shadow] outline-none disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 md:text-sm","focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px]","aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",e),...a})}e.s(["Textarea",()=>a])},95230,e=>{"use strict";let t=(0,e.i(3645).default)("download",[["path",{d:"M12 15V3",key:"m9g1x1"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["path",{d:"m7 10 5 5 5-5",key:"brsn70"}]]);e.s(["default",()=>t])},93752,e=>{"use strict";let t=(0,e.i(3645).default)("code",[["path",{d:"m16 18 6-6-6-6",key:"eg8j8"}],["path",{d:"m8 6-6 6 6 6",key:"ppft3o"}]]);e.s(["default",()=>t])},16868,80436,28267,86254,50032,42076,e=>{"use strict";var t=e.i(3645);let r=(0,t.default)("paperclip",[["path",{d:"m16 6-8.414 8.586a2 2 0 0 0 2.829 2.829l8.414-8.586a4 4 0 1 0-5.657-5.657l-8.379 8.551a6 6 0 1 0 8.485 8.485l8.379-8.551",key:"1miecu"}]]);e.s(["PaperclipIcon",()=>r],16868);var a=e.i(20314),s=e.i(60253),o=e.i(15506),o=o,i=e.i(95230);e.s(["DownloadIcon",()=>i.default],80436);var i=i,n=e.i(31777),l=e.i(2287),d=e.i(1693);e.s(["VisuallyHidden",0,d],28267);var d=d;let c=(0,t.default)("file",[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}]]);var p=e.i(16298),p=p;let u=(0,t.default)("image",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",ry:"2",key:"1m3agn"}],["circle",{cx:"9",cy:"9",r:"2",key:"af1f0g"}],["path",{d:"m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21",key:"1xmnt7"}]]);var h=e.i(93752),h=h;e.i(35364);let m=new Set([".png",".jpg",".jpeg",".gif",".svg",".webp",".ico",".bmp"]),x=new Set([".ts",".tsx",".js",".jsx",".json",".yaml",".yml",".xml",".html",".css",".md"]);function f(e){if(0===e)return"0 B";let t=Math.floor(Math.log(e)/Math.log(1024));return`${(e/Math.pow(1024,t)).toFixed(+(0!==t))} ${["B","KB","MB","GB"][t]}`}let g=new Set([".png",".jpg",".jpeg",".gif",".svg",".webp",".ico",".bmp"]);function b(e,t){let r=new URLSearchParams({path:e,mimeType:t});return`/api/attachments/preview?${r.toString()}`}function v({name:e,size:t,mimeType:r,path:v,onRemove:j,loading:w=!1,disabled:y=!1}){let C,k,N=(C=e.lastIndexOf("."))>=0?e.slice(C).toLowerCase():"",P=m.has(N)?u:".pdf"===N?p.default:x.has(N)?h.default:c,T=".pdf"===N?"bg-red-50 text-red-600":m.has(N)?"bg-blue-50 text-blue-600":x.has(N)?"bg-emerald-50 text-emerald-600":"bg-gray-50 text-gray-600",S=(k=e.lastIndexOf("."))>=0&&g.has(e.slice(k).toLowerCase());return w?(0,a.jsx)("div",{className:"flex h-12 w-12 items-center justify-center rounded-md border",children:(0,a.jsx)(o.default,{className:"text-muted-foreground h-5 w-5 animate-spin"})}):S?(0,a.jsxs)(l.Dialog,{children:[(0,a.jsxs)("div",{className:"group relative",children:[(0,a.jsx)(l.DialogTrigger,{asChild:!0,children:(0,a.jsx)("img",{src:b(v,r),alt:e,title:e,className:"h-12 w-12 cursor-pointer rounded-md border object-cover transition-opacity hover:opacity-80"})}),!y&&(0,a.jsx)("button",{type:"button",onClick:j,className:"absolute -top-1.5 -right-1.5 hidden h-5 w-5 cursor-pointer items-center justify-center rounded-full bg-black/70 text-white group-hover:flex","aria-label":`Remove ${e}`,children:(0,a.jsx)(s.X,{className:"h-3 w-3"})})]}),(0,a.jsxs)(l.DialogContent,{className:"max-w-3xl gap-0 overflow-hidden border-0 p-0 [&>button:last-child]:!cursor-pointer [&>button:last-child]:!rounded-full [&>button:last-child]:!bg-black/70 [&>button:last-child]:!p-1.5 [&>button:last-child]:!text-white [&>button:last-child]:!opacity-100 [&>button:last-child]:!shadow-lg [&>button:last-child]:!backdrop-blur-md [&>button:last-child]:hover:!bg-black/90",children:[(0,a.jsx)(d.Root,{children:(0,a.jsxs)(l.DialogTitle,{children:["Preview: ",e]})}),(0,a.jsx)("div",{className:"relative bg-black/90",children:(0,a.jsx)("img",{src:b(v,r),alt:e,className:"h-auto max-h-[70vh] w-full object-contain"})}),(0,a.jsxs)("div",{className:"bg-background flex items-center gap-3 px-4 py-3",children:[(0,a.jsxs)("div",{className:"flex min-w-0 flex-1 flex-col",children:[(0,a.jsx)("span",{className:"truncate text-sm font-medium",children:e}),(0,a.jsx)("span",{className:"text-muted-foreground text-xs",children:f(t)})]}),(0,a.jsx)("a",{href:b(v,r),download:e,className:"text-muted-foreground hover:text-foreground shrink-0 cursor-pointer rounded p-1.5 transition-colors","aria-label":`Download ${e}`,children:(0,a.jsx)(i.default,{className:"h-4 w-4"})})]})]})]}):(0,a.jsxs)("div",{className:"group relative flex items-center gap-2 rounded-full border py-1 pr-3 pl-2",children:[(0,a.jsx)("div",{className:(0,n.cn)("flex h-6 w-6 shrink-0 items-center justify-center rounded-full",T),children:(0,a.jsx)(P,{className:"h-3 w-3"})}),(0,a.jsx)("span",{className:"max-w-[120px] truncate text-sm",children:e}),(0,a.jsx)("span",{className:"text-muted-foreground text-xs",children:f(t)}),!y&&(0,a.jsx)("button",{type:"button",onClick:j,className:"absolute -top-1.5 -right-1.5 hidden h-5 w-5 cursor-pointer items-center justify-center rounded-full bg-black/70 text-white group-hover:flex","aria-label":`Remove ${e}`,children:(0,a.jsx)(s.X,{className:"h-3 w-3"})})]})}async function j(){let e=await fetch("/api/dialog/pick-files",{method:"POST"});if(!e.ok)throw Error("Failed to open file dialog");let t=await e.json();return t.cancelled?null:t.files}e.s(["AttachmentChip",()=>v],86254),e.s([],50032),e.s(["pickFiles",()=>j],42076)},90382,e=>{"use strict";var t=e.i(20314),r=e.i(79054),a=e.i(91967),s=e.i(5978),o=e.i(22528),i=e.i(53532),n=e.i(41687),l=e.i(56720),d=e.i(13123),c=e.i(52740),p=e.i(39979),u=e.i(85995),h=e.i(87620),m=e.i(86874),x=e.i(36589),f=e.i(73772),g=e.i(13044),b="Popover",[v,j]=(0,o.createContextScope)(b,[c.createPopperScope]),w=(0,c.createPopperScope)(),[y,C]=v(b),k=e=>{let{__scopePopover:a,children:s,open:o,defaultOpen:i,onOpenChange:n,modal:l=!1}=e,p=w(a),u=r.useRef(null),[h,m]=r.useState(!1),[f,g]=(0,x.useControllableState)({prop:o,defaultProp:i??!1,onChange:n,caller:b});return(0,t.jsx)(c.Root,{...p,children:(0,t.jsx)(y,{scope:a,contentId:(0,d.useId)(),triggerRef:u,open:f,onOpenChange:g,onOpenToggle:r.useCallback(()=>g(e=>!e),[g]),hasCustomAnchor:h,onCustomAnchorAdd:r.useCallback(()=>m(!0),[]),onCustomAnchorRemove:r.useCallback(()=>m(!1),[]),modal:l,children:s})})};k.displayName=b;var N="PopoverAnchor",P=r.forwardRef((e,a)=>{let{__scopePopover:s,...o}=e,i=C(N,s),n=w(s),{onCustomAnchorAdd:l,onCustomAnchorRemove:d}=i;return r.useEffect(()=>(l(),()=>d()),[l,d]),(0,t.jsx)(c.Anchor,{...n,...o,ref:a})});P.displayName=N;var T="PopoverTrigger",S=r.forwardRef((e,r)=>{let{__scopePopover:o,...i}=e,n=C(T,o),l=w(o),d=(0,s.useComposedRefs)(r,n.triggerRef),p=(0,t.jsx)(h.Primitive.button,{type:"button","aria-haspopup":"dialog","aria-expanded":n.open,"aria-controls":n.contentId,"data-state":q(n.open),...i,ref:d,onClick:(0,a.composeEventHandlers)(e.onClick,n.onOpenToggle)});return n.hasCustomAnchor?p:(0,t.jsx)(c.Anchor,{asChild:!0,...l,children:p})});S.displayName=T;var R="PopoverPortal",[A,E]=v(R,{forceMount:void 0}),F=e=>{let{__scopePopover:r,forceMount:a,children:s,container:o}=e,i=C(R,r);return(0,t.jsx)(A,{scope:r,forceMount:a,children:(0,t.jsx)(u.Presence,{present:a||i.open,children:(0,t.jsx)(p.Portal,{asChild:!0,container:o,children:s})})})};F.displayName=R;var D="PopoverContent",O=r.forwardRef((e,r)=>{let a=E(D,e.__scopePopover),{forceMount:s=a.forceMount,...o}=e,i=C(D,e.__scopePopover);return(0,t.jsx)(u.Presence,{present:s||i.open,children:i.modal?(0,t.jsx)(z,{...o,ref:r}):(0,t.jsx)(L,{...o,ref:r})})});O.displayName=D;var I=(0,m.createSlot)("PopoverContent.RemoveScroll"),z=r.forwardRef((e,o)=>{let i=C(D,e.__scopePopover),n=r.useRef(null),l=(0,s.useComposedRefs)(o,n),d=r.useRef(!1);return r.useEffect(()=>{let e=n.current;if(e)return(0,f.hideOthers)(e)},[]),(0,t.jsx)(g.RemoveScroll,{as:I,allowPinchZoom:!0,children:(0,t.jsx)(M,{...e,ref:l,trapFocus:i.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:(0,a.composeEventHandlers)(e.onCloseAutoFocus,e=>{e.preventDefault(),d.current||i.triggerRef.current?.focus()}),onPointerDownOutside:(0,a.composeEventHandlers)(e.onPointerDownOutside,e=>{let t=e.detail.originalEvent,r=0===t.button&&!0===t.ctrlKey;d.current=2===t.button||r},{checkForDefaultPrevented:!1}),onFocusOutside:(0,a.composeEventHandlers)(e.onFocusOutside,e=>e.preventDefault(),{checkForDefaultPrevented:!1})})})}),L=r.forwardRef((e,a)=>{let s=C(D,e.__scopePopover),o=r.useRef(!1),i=r.useRef(!1);return(0,t.jsx)(M,{...e,ref:a,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:t=>{e.onCloseAutoFocus?.(t),t.defaultPrevented||(o.current||s.triggerRef.current?.focus(),t.preventDefault()),o.current=!1,i.current=!1},onInteractOutside:t=>{e.onInteractOutside?.(t),t.defaultPrevented||(o.current=!0,"pointerdown"===t.detail.originalEvent.type&&(i.current=!0));let r=t.target;s.triggerRef.current?.contains(r)&&t.preventDefault(),"focusin"===t.detail.originalEvent.type&&i.current&&t.preventDefault()}})}),M=r.forwardRef((e,r)=>{let{__scopePopover:a,trapFocus:s,onOpenAutoFocus:o,onCloseAutoFocus:d,disableOutsidePointerEvents:p,onEscapeKeyDown:u,onPointerDownOutside:h,onFocusOutside:m,onInteractOutside:x,...f}=e,g=C(D,a),b=w(a);return(0,n.useFocusGuards)(),(0,t.jsx)(l.FocusScope,{asChild:!0,loop:!0,trapped:s,onMountAutoFocus:o,onUnmountAutoFocus:d,children:(0,t.jsx)(i.DismissableLayer,{asChild:!0,disableOutsidePointerEvents:p,onInteractOutside:x,onEscapeKeyDown:u,onPointerDownOutside:h,onFocusOutside:m,onDismiss:()=>g.onOpenChange(!1),children:(0,t.jsx)(c.Content,{"data-state":q(g.open),role:"dialog",id:g.contentId,...b,...f,ref:r,style:{...f.style,"--radix-popover-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-popover-content-available-width":"var(--radix-popper-available-width)","--radix-popover-content-available-height":"var(--radix-popper-available-height)","--radix-popover-trigger-width":"var(--radix-popper-anchor-width)","--radix-popover-trigger-height":"var(--radix-popper-anchor-height)"}})})})}),U="PopoverClose",B=r.forwardRef((e,r)=>{let{__scopePopover:s,...o}=e,i=C(U,s);return(0,t.jsx)(h.Primitive.button,{type:"button",...o,ref:r,onClick:(0,a.composeEventHandlers)(e.onClick,()=>i.onOpenChange(!1))})});B.displayName=U;var $=r.forwardRef((e,r)=>{let{__scopePopover:a,...s}=e,o=w(a);return(0,t.jsx)(c.Arrow,{...o,...s,ref:r})});function q(e){return e?"open":"closed"}$.displayName="PopoverArrow",e.s(["Anchor",()=>P,"Arrow",()=>$,"Close",()=>B,"Content",()=>O,"Popover",()=>k,"PopoverAnchor",()=>P,"PopoverArrow",()=>$,"PopoverClose",()=>B,"PopoverContent",()=>O,"PopoverPortal",()=>F,"PopoverTrigger",()=>S,"Portal",()=>F,"Root",()=>k,"Trigger",()=>S,"createPopoverScope",()=>j],89920);var H=e.i(89920),H=H,G=e.i(31777);let _=H.Root,K=H.Trigger;H.Anchor;let V=r.forwardRef(({className:e,align:r="center",sideOffset:a=4,...s},o)=>(0,t.jsx)(H.Portal,{children:(0,t.jsx)(H.Content,{ref:o,align:r,sideOffset:a,className:(0,G.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 z-50 w-72 rounded-md border p-4 shadow-md outline-none",e),...s})}));V.displayName=H.Content.displayName,e.s(["Popover",()=>_,"PopoverContent",()=>V,"PopoverTrigger",()=>K],90382)},51911,e=>{"use strict";var t=e.i(20314),r=e.i(79054),a=e.i(91967),s=e.i(5978),o=e.i(22528),i=e.i(36589),n=e.i(23405),l=e.i(77624),d=e.i(87620),c="Switch",[p,u]=(0,o.createContextScope)(c),[h,m]=p(c),x=r.forwardRef((e,o)=>{let{__scopeSwitch:n,name:l,checked:p,defaultChecked:u,required:m,disabled:x,value:f="on",onCheckedChange:g,form:j,...w}=e,[y,C]=r.useState(null),k=(0,s.useComposedRefs)(o,e=>C(e)),N=r.useRef(!1),P=!y||j||!!y.closest("form"),[T,S]=(0,i.useControllableState)({prop:p,defaultProp:u??!1,onChange:g,caller:c});return(0,t.jsxs)(h,{scope:n,checked:T,disabled:x,children:[(0,t.jsx)(d.Primitive.button,{type:"button",role:"switch","aria-checked":T,"aria-required":m,"data-state":v(T),"data-disabled":x?"":void 0,disabled:x,value:f,...w,ref:k,onClick:(0,a.composeEventHandlers)(e.onClick,e=>{S(e=>!e),P&&(N.current=e.isPropagationStopped(),N.current||e.stopPropagation())})}),P&&(0,t.jsx)(b,{control:y,bubbles:!N.current,name:l,value:f,checked:T,required:m,disabled:x,form:j,style:{transform:"translateX(-100%)"}})]})});x.displayName=c;var f="SwitchThumb",g=r.forwardRef((e,r)=>{let{__scopeSwitch:a,...s}=e,o=m(f,a);return(0,t.jsx)(d.Primitive.span,{"data-state":v(o.checked),"data-disabled":o.disabled?"":void 0,...s,ref:r})});g.displayName=f;var b=r.forwardRef(({__scopeSwitch:e,control:a,checked:o,bubbles:i=!0,...d},c)=>{let p=r.useRef(null),u=(0,s.useComposedRefs)(p,c),h=(0,n.usePrevious)(o),m=(0,l.useSize)(a);return r.useEffect(()=>{let e=p.current;if(!e)return;let t=Object.getOwnPropertyDescriptor(window.HTMLInputElement.prototype,"checked").set;if(h!==o&&t){let r=new Event("click",{bubbles:i});t.call(e,o),e.dispatchEvent(r)}},[h,o,i]),(0,t.jsx)("input",{type:"checkbox","aria-hidden":!0,defaultChecked:o,...d,tabIndex:-1,ref:u,style:{...d.style,...m,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})});function v(e){return e?"checked":"unchecked"}b.displayName="SwitchBubbleInput",e.s(["Root",()=>x,"Switch",()=>x,"SwitchThumb",()=>g,"Thumb",()=>g,"createSwitchScope",()=>u],95291);var j=e.i(95291),j=j,w=e.i(31777);function y({className:e,size:r="default",...a}){return(0,t.jsx)(j.Root,{"data-slot":"switch","data-size":r,className:(0,w.cn)("peer group/switch focus-visible:border-ring focus-visible:ring-ring/50 data-[state=checked]:bg-primary data-[state=unchecked]:bg-input dark:data-[state=unchecked]:bg-input/80 inline-flex shrink-0 cursor-pointer items-center rounded-full border border-transparent shadow-xs transition-all outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50 data-[size=default]:h-[1.15rem] data-[size=default]:w-8 data-[size=sm]:h-3.5 data-[size=sm]:w-6",e),...a,children:(0,t.jsx)(j.Thumb,{"data-slot":"switch-thumb",className:(0,w.cn)("bg-background dark:data-[state=checked]:bg-primary-foreground dark:data-[state=unchecked]:bg-foreground pointer-events-none block rounded-full ring-0 transition-transform group-data-[size=default]/switch:size-4 group-data-[size=sm]/switch:size-3 data-[state=checked]:translate-x-[calc(100%-2px)] data-[state=unchecked]:translate-x-0")})})}e.s(["Switch",()=>y],51911)},41413,e=>{"use strict";var t=e.i(20314),r=e.i(79054),a=e.i(23925),s=e.i(11345),o=e.i(76016),i=e.i(70802),n=e.i(67385),l=e.i(86782),d=e.i(29847),c=e.i(35364),p=e.i(90382),u=e.i(31777);function h({initialAgentType:e,initialModel:h,onAgentModelChange:m,disabled:x,className:f,mode:g}){let[b,v]=r.useState(!1),[j,w]=r.useState([]),[y,C]=r.useState(!0),[k,N]=r.useState(e),[P,T]=r.useState(h),[S,R]=r.useState(null),[A,E]=r.useState(0),[F,D]=r.useState(null);r.useEffect(()=>{(0,i.getAllAgentModels)().then(w).finally(()=>C(!1))},[]),r.useEffect(()=>{if(!b){let e=setTimeout(()=>{E(0),D(null)},150);return()=>clearTimeout(e)}},[b]);let O=async(e,t)=>{if(v(!1),e!==k||t!==P){if("override"===g){N(e),T(t),m?.(e,t);return}N(e),T(t),m?.(e,t),R(null);try{let r=await (0,n.updateAgentAndModel)(e,t||null);r.ok||(N(k),T(P),m?.(k,P),R(r.error??"Failed to save"))}catch{N(k),T(P),m?.(k,P),R("Failed to save")}}},I=(0,l.getAgentTypeIcon)(k),z=j.find(e=>e.agentType===k)?.label??k,L=P?(0,d.getModelMeta)(P).displayName||P:null,M=F?j.find(e=>e.agentType===F):null;return(0,t.jsxs)("div",{className:(0,u.cn)("flex flex-col gap-1",f),children:[(0,t.jsxs)(p.Popover,{open:b,onOpenChange:v,children:[(0,t.jsx)(p.PopoverTrigger,{asChild:!0,children:(0,t.jsx)(c.Button,{variant:"outline",role:"combobox","aria-expanded":b,disabled:(x??!1)||y,className:"w-auto cursor-pointer justify-start font-normal hover:border-violet-300 hover:bg-violet-50/50 dark:hover:border-violet-700 dark:hover:bg-violet-950/30",children:(0,t.jsxs)("span",{className:"flex items-center gap-2 truncate",children:[(0,t.jsx)(I,{className:"h-4 w-4 shrink-0"}),y?"Loading…":(0,t.jsxs)("span",{className:"flex items-center gap-1",children:[(0,t.jsx)("span",{className:"text-muted-foreground text-xs",children:z}),L?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("span",{className:"text-muted-foreground/50 text-xs",children:"·"}),(0,t.jsx)("span",{className:"text-xs font-medium",children:L})]}):null]})]})})}),(0,t.jsx)(p.PopoverContent,{className:"w-(--radix-popover-trigger-width) overflow-hidden p-0",align:"start",children:(0,t.jsxs)("div",{className:"flex transition-transform duration-200 ease-in-out",style:{transform:`translateX(${1===A?"-50%":"0%"})`,width:"200%"},children:[(0,t.jsxs)("div",{className:"w-1/2 shrink-0",children:[(0,t.jsx)("div",{className:"text-muted-foreground border-b px-3 py-2 text-xs font-medium",children:"Select agent"}),j.map(e=>{let r=(0,l.getAgentTypeIcon)(e.agentType),s=k===e.agentType,i=e.models.length>0;return(0,t.jsxs)("button",{type:"button",className:(0,u.cn)("flex w-full cursor-pointer items-center gap-2.5 px-3 py-2 text-xs transition-colors","hover:bg-accent hover:text-accent-foreground",s&&"bg-accent/50"),onClick:()=>{i?(D(e.agentType),requestAnimationFrame(()=>{requestAnimationFrame(()=>E(1))})):O(e.agentType,"")},children:[(0,t.jsx)(r,{className:"h-4 w-4 shrink-0"}),(0,t.jsx)("span",{className:"flex-1 text-left",children:e.label}),s&&!i?(0,t.jsx)(a.Check,{className:"text-primary h-3.5 w-3.5 shrink-0"}):null,i?(0,t.jsx)(o.ChevronRight,{className:"text-muted-foreground h-3.5 w-3.5 shrink-0"}):null]},e.agentType)})]}),(0,t.jsx)("div",{className:"w-1/2 shrink-0",children:M?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)("button",{type:"button",className:"text-muted-foreground hover:text-foreground flex w-full cursor-pointer items-center gap-1.5 border-b px-3 py-2 text-xs font-medium transition-colors",onClick:()=>{E(0),setTimeout(()=>D(null),220)},children:[(0,t.jsx)(s.ChevronLeft,{className:"h-3.5 w-3.5"}),M.label]}),M.models.map(e=>{let r=k===M.agentType&&P===e.id;return(0,t.jsxs)("button",{type:"button",className:(0,u.cn)("flex w-full cursor-pointer items-center gap-3 px-3 py-2 text-left transition-colors","hover:bg-accent hover:text-accent-foreground",r&&"bg-accent/50"),onClick:()=>O(M.agentType,e.id),children:[(0,t.jsxs)("div",{className:"flex min-w-0 flex-1 flex-col",children:[(0,t.jsx)("span",{className:"text-xs font-medium",children:e.displayName}),(0,t.jsx)("span",{className:"text-muted-foreground text-xs",children:e.description})]}),r?(0,t.jsx)(a.Check,{className:"text-primary h-3.5 w-3.5 shrink-0"}):null]},e.id)})]}):null})]})})]}),!!S&&(0,t.jsx)("p",{className:"text-destructive text-sm",children:S})]})}e.s(["AgentModelPicker",()=>h])},15203,e=>{"use strict";var t=e.i(20314),r=e.i(79054),a=e.i(31406),s=e.i(60112),o=e.i(21023);let i=(0,o.createServerReference)("407b9f0a19cbbf5391d7bbf400999fbbeb67d704bc",o.callServer,void 0,o.findSourceMapURL,"createFeature");var n=e.i(16868);let l=(0,e.i(3645).default)("chevrons-up-down",[["path",{d:"m7 15 5 5 5-5",key:"1hf1tw"}],["path",{d:"m7 9 5-5 5 5",key:"sgt6xg"}]]);var d=e.i(97667),c=e.i(53360),p=e.i(55016),u=e.i(91925),h=e.i(83428),m=e.i(31777),x=e.i(8361);e.i(1650);var f=e.i(11495),g=e.i(45811),b=e.i(35364),v=e.i(98127),j=e.i(48306),w=e.i(41957),y=e.i(81846),C=e.i(90382),k=e.i(51911),N=e.i(2828),P=e.i(30153);e.i(50032);var T=e.i(86254),S=e.i(41413),R=e.i(25235),A=e.i(78521),E=e.i(59975),F=e.i(42076);let D=new Set([".png",".jpg",".jpeg",".gif",".webp",".svg",".bmp",".ico",".pdf",".doc",".docx",".xls",".xlsx",".ppt",".pptx",".txt",".md",".csv",".json",".yaml",".yml",".xml",".ts",".tsx",".js",".jsx",".py",".rb",".go",".rs",".java",".c",".cpp",".h",".hpp",".cs",".swift",".kt",".html",".css",".scss",".less",".sh",".bash",".zsh",".fish",".toml",".ini",".cfg",".conf",".env",".zip",".tar",".gz",".log"]),O=[{id:"allowPrd",label:"PRD",description:"Auto-approve requirements move to planning."},{id:"allowPlan",label:"Plan",description:"Auto-approve planning move to implementation."},{id:"allowMerge",label:"Merge",description:"Auto-approve merge move to Done."}],I={allowPrd:!1,allowPlan:!1,allowMerge:!1};function z({open:e,onClose:a,onSubmit:s,repositoryPath:o,isSubmitting:i=!1,workflowDefaults:l,features:d,repositories:u,initialParentId:h,currentAgentType:v,currentModel:C}){let R=(0,x.useSoundAction)("create"),A=l?.approvalGates??I,E=l?.push??!1,z=l?.openPr??!1,U=l?.enableEvidence??!1,B=l?.commitEvidence??!1,[$,q]=(0,r.useState)(""),[H,G]=(0,r.useState)([]),[_,K]=(0,r.useState)({...A}),[V,X]=(0,r.useState)(E),[Y,W]=(0,r.useState)(z),[Z,J]=(0,r.useState)(U),[Q,ee]=(0,r.useState)(B),[et,er]=(0,r.useState)(void 0),[ea,es]=(0,r.useState)(!1),[eo,ei]=(0,r.useState)(!1),[en,el]=(0,r.useState)(void 0),[ed,ec]=(0,r.useState)(void 0),[ep,eu]=(0,r.useState)(o||void 0),[eh,em]=(0,r.useState)(u??[]),[ex,ef]=(0,r.useState)(!1),[eg,eb]=(0,r.useState)(null),[ev,ej]=(0,r.useState)(!1),ew=(0,r.useRef)(crypto.randomUUID()),ey=(0,r.useRef)(0),eC=(0,r.useRef)(null);(0,r.useEffect)(()=>{l&&(K({...l.approvalGates}),X(l.push),W(l.openPr),J(l.enableEvidence),ee(l.commitEvidence))},[l]),(0,r.useEffect)(()=>{em(u??[])},[u]),(0,r.useEffect)(()=>{e&&h&&er(h)},[e,h]);let ek=(0,r.useCallback)(()=>{q(""),G([]),K({...A}),X(E),W(z),J(U),ee(B),er(void 0),eu(o||void 0),em(u??[]),es(!1),ei(!1),el(void 0),ec(void 0),eb(null),ey.current=0,ef(!1)},[A,E,z,U,B,o,u]),eN=""!==$.trim()||H.length>0,{attemptClose:eP}=(0,P.useGuardedDrawerClose)({open:e,isDirty:eN,onClose:a,onReset:ek}),eT=(0,r.useCallback)(async e=>{for(let t of(eb(null),e)){if(t.size>0xa00000)return void eb(`"${t.name}" exceeds 10 MB limit`);let e=function(e){let t=e.lastIndexOf(".");return t>=0?e.slice(t).toLowerCase():""}(t.name);if(e&&!D.has(e))return void eb(`File type "${e}" is not allowed`)}for(let t of e){let e=crypto.randomUUID();G(r=>[...r,{id:e,name:t.name,size:t.size,mimeType:t.type||"application/octet-stream",path:"",loading:!0}]);try{let r=new FormData;r.append("file",t),r.append("sessionId",ew.current);let a=await fetch("/api/attachments/upload",{method:"POST",body:r});if(!a.ok){let t=await a.json().catch(()=>({error:"Upload failed"}));G(t=>t.filter(t=>t.id!==e)),eb(t.error??"Upload failed");return}let s=await a.json();G(t=>t.some(t=>t.id!==e&&t.path===s.path)?t.filter(t=>t.id!==e):t.map(t=>t.id===e?{...s,id:e,loading:!1}:t))}catch{G(t=>t.filter(t=>t.id!==e)),eb("Upload failed")}}},[]),eS=(0,r.useCallback)(e=>{e.preventDefault(),e.stopPropagation(),ey.current+=1,1===ey.current&&ef(!0)},[]),eR=(0,r.useCallback)(e=>{e.preventDefault(),e.stopPropagation(),ey.current-=1,0===ey.current&&ef(!1)},[]),eA=(0,r.useCallback)(e=>{e.preventDefault(),e.stopPropagation()},[]),eE=(0,r.useCallback)(e=>{e.preventDefault(),e.stopPropagation(),ey.current=0,ef(!1);let t=Array.from(e.dataTransfer.files);t.length>0&&eT(t)},[eT]),eF=(0,r.useCallback)(e=>{let t=e.clipboardData?.items;if(!t)return;let r=[];for(let e of Array.from(t))if("file"===e.kind){let t=e.getAsFile();t&&r.push(t)}r.length>0&&(e.preventDefault(),eT(r))},[eT]),eD=(0,r.useCallback)(e=>{if(e.preventDefault(),!$.trim())return;let t=ep??o;t&&(R.play(),s({description:$.trim(),attachments:H.filter(e=>!e.loading),repositoryPath:t,approvalGates:{allowPrd:_.allowPrd??!1,allowPlan:_.allowPlan??!1,allowMerge:_.allowMerge??!1},push:V||Y,openPr:Y,enableEvidence:Z,commitEvidence:Q,fast:ea,...eo?{pending:eo}:{},...en?{agentType:en}:{},...ed?{model:ed}:{},...et?{parentId:et}:{},sessionId:ew.current}),ek())},[$,H,_,ep,o,s,V,Y,Z,Q,ea,eo,en,ed,et,R,ek]),eO=(0,r.useCallback)(async()=>{try{let e=await (0,F.pickFiles)();if(!e)return;for(let t of e){let e=crypto.randomUUID();G(r=>[...r,{id:e,name:t.name,size:t.size,mimeType:"application/octet-stream",path:"",loading:!0}]);try{let r=await fetch("/api/attachments/upload-from-path",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({path:t.path,sessionId:ew.current})});if(!r.ok){let t=await r.json().catch(()=>({error:"Upload failed"}));G(t=>t.filter(t=>t.id!==e)),eb(t.error??"Upload failed");return}let a=await r.json();G(t=>t.some(t=>t.id!==e&&t.path===a.path)?t.filter(t=>t.id!==e):t.map(t=>t.id===e?{...a,id:e,loading:!1}:t))}catch{G(t=>t.filter(t=>t.id!==e)),eb("Upload failed")}}}catch{}},[]),eI=(0,r.useCallback)(e=>{G(t=>t.filter(t=>t.id!==e))},[]),ez=(0,r.useRef)(null),eL=(0,r.useCallback)(e=>{(e.ctrlKey||e.metaKey)&&"Enter"===e.key&&(e.preventDefault(),ez.current?.requestSubmit())},[]),eM=(0,r.useCallback)(()=>{ej(!0)},[]),eU=(0,r.useCallback)(()=>{setTimeout(()=>{let e=eC.current?.contains(document.activeElement),t=eC.current?.querySelector('[aria-expanded="true"]')!==null;e||t||ej(!1)},0)},[]),eB=d&&d.length>0,e$=!o&&!ep,eq=!o&&void 0!==u;return(0,t.jsx)(f.BaseDrawer,{open:e,onClose:eP,size:"md",modal:!1,dismissOnOutsideClick:!0,"data-testid":"feature-create-drawer",header:(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)("div",{className:"h-2.5 w-2.5 shrink-0 rounded-full bg-blue-500"}),(0,t.jsx)(g.DrawerTitle,{children:"NEW FEATURE"})]}),i?(0,t.jsx)(g.DrawerDescription,{asChild:!0,children:(0,t.jsx)("div",{children:(0,t.jsx)(y.Badge,{variant:"secondary",children:"Creating..."})})}):null]}),footer:(0,t.jsxs)("div",{className:"flex flex-row justify-end gap-2",children:[(0,t.jsx)(b.Button,{variant:"outline",onClick:eP,disabled:i,children:"Cancel"}),(0,t.jsx)(b.Button,{type:"submit",form:"create-feature-form",disabled:!$.trim()||i||e$,children:i?"Creating...":"+ Create Feature"})]}),children:(0,t.jsx)("div",{className:"overflow-y-auto p-4",children:(0,t.jsx)(N.TooltipProvider,{delayDuration:400,children:(0,t.jsxs)("form",{ref:ez,id:"create-feature-form",onSubmit:eD,onKeyDown:eL,className:"flex flex-col gap-4",children:[eq?(0,t.jsxs)("div",{className:"flex flex-col gap-1.5","data-testid":"repo-selector-section",children:[(0,t.jsx)(w.Label,{className:"text-muted-foreground text-xs font-semibold tracking-wider",children:"REPOSITORY"}),(0,t.jsx)(M,{repositories:eh,value:ep,onChange:eu,onAddRepository:e=>{em(t=>[...t,e]),eu(e.path)},disabled:i})]}):o?(0,t.jsxs)("div",{className:"flex flex-col gap-1.5","data-testid":"repo-readonly-section",children:[(0,t.jsx)(w.Label,{className:"text-muted-foreground text-xs font-semibold tracking-wider",children:"REPOSITORY"}),(0,t.jsx)("p",{className:"text-sm","data-testid":"repo-readonly-label",children:u?.find(e=>e.path===o)?.name??o.split("/").pop()})]}):null,(0,t.jsxs)("div",{role:"region","aria-label":"File drop zone","data-drag-over":ex?"true":"false",onDragEnter:eS,onDragLeave:eR,onDragOver:eA,onDrop:eE,className:(0,m.cn)("flex flex-col gap-1.5 rounded-md border-2 border-transparent p-1 transition-colors",ex&&"border-primary/50 bg-primary/5"),children:[(0,t.jsx)(w.Label,{htmlFor:"feature-description",className:"text-muted-foreground text-xs font-semibold tracking-wider",children:"DESCRIBE YOUR FEATURE"}),(0,t.jsxs)("div",{ref:eC,onFocus:eM,onBlur:eU,className:(0,m.cn)("border-input flex h-56 flex-col overflow-hidden rounded-md border shadow-xs transition-[color,box-shadow]",ev&&"ring-ring/50 border-ring ring-[3px]"),children:[(0,t.jsx)(j.Textarea,{id:"feature-description",placeholder:"e.g. Add GitHub OAuth login with callback handling and token refresh...",value:$,onChange:e=>q(e.target.value),onPaste:eF,required:!0,disabled:i,className:"min-h-0 flex-1 resize-none rounded-none border-0 shadow-none focus-visible:ring-0"}),H.length>0&&(0,t.jsx)("div",{className:"flex flex-wrap items-center gap-1.5 px-3 py-2",children:H.map(e=>(0,t.jsx)(T.AttachmentChip,{name:e.name,size:e.size,mimeType:e.mimeType,path:e.path,onRemove:()=>eI(e.id),disabled:i,loading:e.loading},e.id))}),eg?(0,t.jsx)("p",{className:"text-destructive px-3 pb-2 text-xs",children:eg}):null,(0,t.jsxs)("div",{className:"border-input flex items-center gap-3 border-t px-3 py-1.5",children:[(0,t.jsx)(S.AgentModelPicker,{initialAgentType:en??v??"claude-code",initialModel:ed??C??"claude-sonnet-4-6",mode:"override",onAgentModelChange:(e,t)=>{el(e),ec(t)},disabled:i,className:"w-55"}),(0,t.jsxs)(N.Tooltip,{children:[(0,t.jsx)(N.TooltipTrigger,{asChild:!0,children:(0,t.jsxs)("div",{className:"ml-auto flex cursor-pointer items-center gap-2",children:[(0,t.jsx)(k.Switch,{id:"pending-mode",checked:eo,onCheckedChange:ei,disabled:i}),(0,t.jsxs)(w.Label,{htmlFor:"pending-mode",className:"flex cursor-pointer items-center gap-1 text-sm font-medium",children:[(0,t.jsx)(p.Clock,{className:"h-3.5 w-3.5"}),"Pending"]})]})}),(0,t.jsx)(N.TooltipContent,{side:"bottom",children:"Create without starting — start manually later."})]}),(0,t.jsxs)(N.Tooltip,{children:[(0,t.jsx)(N.TooltipTrigger,{asChild:!0,children:(0,t.jsxs)("div",{className:"flex cursor-pointer items-center gap-2",children:[(0,t.jsx)(k.Switch,{id:"fast-mode",checked:ea,onCheckedChange:es,disabled:i}),(0,t.jsxs)(w.Label,{htmlFor:"fast-mode",className:"flex cursor-pointer items-center gap-1 text-sm font-medium",children:[(0,t.jsx)(c.Zap,{className:"h-3.5 w-3.5"}),"Fast Mode"]})]})}),(0,t.jsx)(N.TooltipContent,{side:"bottom",children:"Skip SDLC phases and implement directly from your prompt."})]}),(0,t.jsxs)(N.Tooltip,{children:[(0,t.jsx)(N.TooltipTrigger,{asChild:!0,children:(0,t.jsx)("button",{type:"button",onClick:eO,disabled:i,"aria-label":"Attach files",className:"text-muted-foreground hover:text-foreground cursor-pointer rounded p-1 transition-colors",children:(0,t.jsx)(n.PaperclipIcon,{className:"h-4 w-4"})})}),(0,t.jsx)(N.TooltipContent,{side:"bottom",children:"Attach files"})]})]})]})]}),eB&&void 0!==h?(0,t.jsxs)("div",{className:"flex flex-col gap-1.5",children:[(0,t.jsx)(w.Label,{htmlFor:"parent-feature",className:"text-muted-foreground text-xs font-semibold tracking-wider",children:"PARENT FEATURE"}),(0,t.jsx)(L,{features:d,value:et,onChange:er,disabled:i})]}):null,(0,t.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,t.jsxs)("div",{className:"border-input flex items-center gap-4 rounded-md border px-3 py-2.5",children:[(0,t.jsxs)(N.Tooltip,{children:[(0,t.jsx)(N.TooltipTrigger,{asChild:!0,children:(0,t.jsx)("span",{className:"text-muted-foreground w-16 shrink-0 cursor-default text-xs font-semibold tracking-wider",children:"APPROVE"})}),(0,t.jsx)(N.TooltipContent,{side:"bottom",children:"Auto-approve phase transitions without manual review."})]}),(0,t.jsx)("div",{className:"flex flex-1 items-center gap-4",children:O.map(e=>(0,t.jsxs)(N.Tooltip,{children:[(0,t.jsx)(N.TooltipTrigger,{asChild:!0,children:(0,t.jsxs)("div",{className:"flex cursor-pointer items-center gap-1.5",children:[(0,t.jsx)(k.Switch,{id:`approve-${e.id}`,size:"sm",checked:_[e.id]??!1,onCheckedChange:t=>K(r=>({...r,[e.id]:t})),disabled:i||ea&&("allowPrd"===e.id||"allowPlan"===e.id)}),(0,t.jsx)(w.Label,{htmlFor:`approve-${e.id}`,className:"cursor-pointer text-xs font-medium",children:e.label})]})}),(0,t.jsx)(N.TooltipContent,{side:"bottom",children:ea&&("allowPrd"===e.id||"allowPlan"===e.id)?"Skipped in Fast Mode":e.description})]},e.id))}),(0,t.jsxs)(N.Tooltip,{children:[(0,t.jsx)(N.TooltipTrigger,{asChild:!0,children:(0,t.jsx)("button",{type:"button",onClick:()=>{let e=O.every(e=>_[e.id]),t={};for(let r of O)t[r.id]=!e;K(t)},disabled:i,className:(0,m.cn)("text-muted-foreground hover:text-foreground cursor-pointer rounded px-1.5 py-0.5 text-[10px] font-semibold tracking-wider uppercase transition-colors",O.every(e=>_[e.id])&&"text-primary"),children:"All"})}),(0,t.jsx)(N.TooltipContent,{side:"bottom",children:"Toggle all approval gates"})]})]}),(0,t.jsxs)("div",{className:"border-input flex items-center gap-4 rounded-md border px-3 py-2.5",children:[(0,t.jsxs)(N.Tooltip,{children:[(0,t.jsx)(N.TooltipTrigger,{asChild:!0,children:(0,t.jsx)("span",{className:"text-muted-foreground w-16 shrink-0 cursor-default text-xs font-semibold tracking-wider",children:"EVIDENCE"})}),(0,t.jsx)(N.TooltipContent,{side:"bottom",children:"Collect and attach evidence after implementation."})]}),(0,t.jsxs)("div",{className:"flex flex-1 items-center gap-4",children:[(0,t.jsxs)(N.Tooltip,{children:[(0,t.jsx)(N.TooltipTrigger,{asChild:!0,children:(0,t.jsxs)("div",{className:"flex cursor-pointer items-center gap-1.5",children:[(0,t.jsx)(k.Switch,{id:"enable-evidence",size:"sm",checked:Z,onCheckedChange:e=>{J(e),e||ee(!1)},disabled:i}),(0,t.jsx)(w.Label,{htmlFor:"enable-evidence",className:"cursor-pointer text-xs font-medium",children:"Collect"})]})}),(0,t.jsx)(N.TooltipContent,{side:"bottom",children:"Capture screenshots and artifacts after implementation."})]}),(0,t.jsxs)(N.Tooltip,{children:[(0,t.jsx)(N.TooltipTrigger,{asChild:!0,children:(0,t.jsxs)("div",{className:"flex cursor-pointer items-center gap-1.5",children:[(0,t.jsx)(k.Switch,{id:"commit-evidence",size:"sm",checked:Q,onCheckedChange:ee,disabled:i||!Z||!Y}),(0,t.jsx)(w.Label,{htmlFor:"commit-evidence",className:(0,m.cn)("cursor-pointer text-xs font-medium",(!Z||!Y)&&"opacity-50"),children:"Add to PR"})]})}),(0,t.jsx)(N.TooltipContent,{side:"bottom",children:Y?Z?"Include evidence in the pull request body.":"Requires evidence collection to be enabled":"Requires PR to be enabled"})]})]})]}),(0,t.jsxs)("div",{className:"border-input flex items-center gap-4 rounded-md border px-3 py-2.5",children:[(0,t.jsx)("span",{className:"text-muted-foreground w-16 shrink-0 text-xs font-semibold tracking-wider",children:"GIT"}),(0,t.jsxs)("div",{className:"flex flex-1 items-center gap-4",children:[(0,t.jsxs)(N.Tooltip,{children:[(0,t.jsx)(N.TooltipTrigger,{asChild:!0,children:(0,t.jsxs)("div",{className:"flex cursor-pointer items-center gap-1.5",children:[(0,t.jsx)(k.Switch,{id:"push",size:"sm",checked:V||Y,onCheckedChange:e=>{X(e),!e&&Y&&W(!1)},disabled:i}),(0,t.jsx)(w.Label,{htmlFor:"push",className:"cursor-pointer text-xs font-medium",children:"Push"})]})}),(0,t.jsx)(N.TooltipContent,{side:"bottom",children:"Push branch to remote after implementation."})]}),(0,t.jsxs)(N.Tooltip,{children:[(0,t.jsx)(N.TooltipTrigger,{asChild:!0,children:(0,t.jsxs)("div",{className:"flex cursor-pointer items-center gap-1.5",children:[(0,t.jsx)(k.Switch,{id:"open-pr",size:"sm",checked:Y,onCheckedChange:e=>{W(e),e||ee(!1)},disabled:i}),(0,t.jsx)(w.Label,{htmlFor:"open-pr",className:"cursor-pointer text-xs font-medium",children:"PR"})]})}),(0,t.jsx)(N.TooltipContent,{side:"bottom",children:"Open a pull request after pushing."})]})]})]})]})]})})})})}function L({features:e,value:a,onChange:s,disabled:o}){let[i,n]=(0,r.useState)(!1),[c,p]=(0,r.useState)(""),u=(0,r.useRef)(null),h=e.find(e=>e.id===a),x=c.trim()?e.filter(e=>e.name.toLowerCase().includes(c.toLowerCase())||e.id.toLowerCase().includes(c.toLowerCase())):e,f=(0,r.useCallback)(e=>{s(e),n(!1),p("")},[s]);return(0,r.useEffect)(()=>{i?setTimeout(()=>u.current?.focus(),0):p("")},[i]),(0,t.jsxs)(C.Popover,{open:i,onOpenChange:n,children:[(0,t.jsx)(C.PopoverTrigger,{asChild:!0,children:(0,t.jsxs)("button",{id:"parent-feature",type:"button",role:"combobox","aria-expanded":i,"aria-label":"Parent Feature",disabled:o,"data-testid":"parent-feature-combobox",className:(0,m.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",!h&&"text-muted-foreground"),children:[(0,t.jsx)("span",{className:"truncate",children:h?`${h.name} (${h.id.slice(0,8)})`:"Select parent feature..."}),(0,t.jsx)(l,{className:"ml-2 h-4 w-4 shrink-0 opacity-50"})]})}),(0,t.jsx)(C.PopoverContent,{className:"w-80 p-0",align:"start","data-testid":"parent-feature-combobox-content",children:(0,t.jsxs)("div",{className:"flex flex-col",children:[(0,t.jsx)("div",{className:"border-b p-2",children:(0,t.jsx)(v.Input,{ref:u,placeholder:"Search features...",value:c,onChange:e=>p(e.target.value),className:"h-8 border-0 p-0 text-sm shadow-none focus-visible:ring-0","data-testid":"parent-feature-search"})}),(0,t.jsxs)("div",{className:"max-h-48 overflow-y-auto py-1",role:"listbox","aria-label":"Features",children:[(0,t.jsxs)("button",{type:"button",role:"option","aria-selected":void 0===a,onClick:()=>f(void 0),className:(0,m.cn)("hover:bg-accent hover:text-accent-foreground flex w-full items-center gap-2 px-3 py-2 text-sm",void 0===a&&"bg-accent/50"),"data-testid":"parent-feature-option-none",children:[(0,t.jsx)(d.CheckIcon,{className:(0,m.cn)("h-4 w-4 shrink-0",void 0!==a&&"invisible")}),(0,t.jsx)("span",{className:"text-muted-foreground italic",children:"No parent"})]}),0===x.length&&c?(0,t.jsx)("p",{className:"text-muted-foreground px-3 py-2 text-sm",children:"No features found."}):x.map(e=>(0,t.jsxs)("button",{type:"button",role:"option","aria-selected":a===e.id,onClick:()=>f(e.id),className:(0,m.cn)("hover:bg-accent hover:text-accent-foreground flex w-full items-center gap-2 px-3 py-2 text-sm",a===e.id&&"bg-accent/50"),"data-testid":`parent-feature-option-${e.id}`,children:[(0,t.jsx)(d.CheckIcon,{className:(0,m.cn)("h-4 w-4 shrink-0",a!==e.id&&"invisible")}),(0,t.jsxs)("span",{className:"truncate",children:[e.name," ",(0,t.jsxs)("span",{className:"text-muted-foreground font-mono text-xs",children:["(",e.id.slice(0,8),")"]})]})]},e.id))]})]})})]})}function M({repositories:e,value:a,onChange:s,onAddRepository:o,disabled:i}){let[n,c]=(0,r.useState)(!1),[p,x]=(0,r.useState)(""),[f,g]=(0,r.useState)(!1),[b,j]=(0,r.useState)(null),w=(0,r.useRef)(null),y=e.find(e=>e.path===a),k=p.trim()?e.filter(e=>e.name.toLowerCase().includes(p.toLowerCase())||e.path.toLowerCase().includes(p.toLowerCase())):e,N=(0,r.useCallback)(e=>{s(e),c(!1),x("")},[s]),P=(0,r.useCallback)(async()=>{if(!f){g(!0),j(null);try{let e=await (0,A.pickFolder)();if(!e)return void g(!1);let t=await (0,E.addRepository)({path:e});if(t.error){j(t.error),g(!1);return}if(t.repository){let e={id:t.repository.id,name:t.repository.name,path:t.repository.path};o?.(e),s(e.path),c(!1),x("")}}catch(e){j(e instanceof Error?e.message:"Failed to add repository")}finally{g(!1)}}},[f,o,s]);return(0,r.useEffect)(()=>{n?setTimeout(()=>w.current?.focus(),0):x("")},[n]),(0,t.jsxs)(C.Popover,{open:n,onOpenChange:c,children:[(0,t.jsx)(C.PopoverTrigger,{asChild:!0,children:(0,t.jsxs)("button",{type:"button",role:"combobox","aria-expanded":n,"aria-label":"Repository",disabled:i,"data-testid":"repository-combobox",className:(0,m.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",!y&&"text-muted-foreground"),children:[(0,t.jsx)("span",{className:"truncate",children:y?y.name:"Select repository..."}),(0,t.jsx)(l,{className:"ml-2 h-4 w-4 shrink-0 opacity-50"})]})}),(0,t.jsx)(C.PopoverContent,{className:"w-80 p-0",align:"start","data-testid":"repository-combobox-content",children:(0,t.jsxs)("div",{className:"flex flex-col",children:[(0,t.jsx)("div",{className:"border-b p-2",children:(0,t.jsx)(v.Input,{ref:w,placeholder:"Search repositories...",value:p,onChange:e=>x(e.target.value),className:"h-8 border-0 p-0 text-sm shadow-none focus-visible:ring-0","data-testid":"repository-search"})}),(0,t.jsx)("div",{className:"max-h-48 overflow-y-auto py-1",role:"listbox","aria-label":"Repositories",children:0===k.length?(0,t.jsx)("p",{className:"text-muted-foreground px-3 py-2 text-sm","data-testid":"repository-empty",children:"No repositories found."}):k.map(e=>(0,t.jsxs)("button",{type:"button",role:"option","aria-selected":a===e.path,onClick:()=>N(e.path),className:(0,m.cn)("hover:bg-accent hover:text-accent-foreground flex w-full items-center gap-2 px-3 py-2 text-sm",a===e.path&&"bg-accent/50"),"data-testid":`repository-option-${e.id}`,children:[(0,t.jsx)(d.CheckIcon,{className:(0,m.cn)("h-4 w-4 shrink-0",a!==e.path&&"invisible")}),(0,t.jsxs)("span",{className:"flex flex-col items-start truncate",children:[(0,t.jsx)("span",{className:"truncate",children:e.name}),(0,t.jsx)("span",{className:"text-muted-foreground truncate text-xs",children:e.path})]})]},e.id))}),(0,t.jsx)(R.Separator,{}),(0,t.jsxs)("button",{type:"button",onClick:P,disabled:f,className:"hover:bg-accent hover:text-accent-foreground flex w-full items-center gap-2 px-3 py-2 text-sm","data-testid":"add-repository-item",children:[f?(0,t.jsx)(h.Loader2,{className:"h-4 w-4 shrink-0 animate-spin"}):(0,t.jsx)(u.FolderPlus,{className:"h-4 w-4 shrink-0"}),(0,t.jsx)("span",{children:"Add new repository..."})]}),b?(0,t.jsx)("p",{className:"px-3 pb-2 text-xs text-red-500","data-testid":"add-repository-error",children:b}):null]})})]})}function U({repositoryPath:e,initialParentId:o,features:n,repositories:l,workflowDefaults:d,currentAgentType:c,currentModel:p}){let u=(0,a.useRouter)(),[h,m]=(0,r.useState)(!1),x=(0,a.usePathname)().startsWith("/create"),f=!h&&x;(0,r.useEffect)(()=>{!x&&h&&m(!1)},[x,h]);let g=(0,r.useCallback)(()=>{u.push("/")},[u]),b=(0,r.useCallback)(e=>{m(!0),u.push("/"),i(e).then(t=>{t.error?s.toast.error(t.error):window.dispatchEvent(new CustomEvent("shep:feature-created",{detail:{featureId:t.feature.id,name:t.feature.name,description:t.feature.description,repositoryPath:t.feature.repositoryPath,parentId:e.parentId}}))}).catch(()=>{s.toast.error("Failed to create feature"),m(!1)})},[u]);return(0,t.jsx)(z,{open:f,onClose:g,onSubmit:b,repositoryPath:e,features:n,repositories:l,workflowDefaults:d,initialParentId:o,isSubmitting:h,currentAgentType:c,currentModel:p})}e.s(["CreateDrawerClient",()=>U],15203)}]);
@@ -1 +0,0 @@
1
- (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,64970,e=>{"use strict";let t=(0,e.i(3645).default)("square",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}]]);e.s(["Square",()=>t],64970)},81803,72714,17466,99348,e=>{"use strict";var t=e.i(20314),n=e.i(83428),r=e.i(51251),a=e.i(31777),o=e.i(35364),l=e.i(8361);function i({label:e,onClick:i,loading:u,error:s,icon:d,iconOnly:c=!1,variant:f="outline",size:p="sm"}){let m=(0,l.useSoundAction)("click");return(0,t.jsxs)(o.Button,{variant:f,size:p,"aria-label":e,disabled:u,onClick:()=>{m.play(),i()},className:(0,a.cn)("gap-1.5",s&&"text-destructive hover:text-destructive",!s&&c&&"ghost"===f&&"text-muted-foreground cursor-pointer rounded-full transition-colors hover:text-blue-500"),children:[u?(0,t.jsx)(n.Loader2,{className:"size-4 animate-spin"}):s?(0,t.jsx)(r.CircleAlert,{className:"size-4"}):(0,t.jsx)(d,{className:"size-4"}),c?null:e]})}e.s(["ActionButton",()=>i],72714),e.s([],81803);var u=e.i(79054),s=e.i(30702),d=e.i(38573),c=e.i(17406),f=e.i(81846),p=e.i(2287),m=e.i(21023);let g=(0,m.createServerReference)("40a4c49b476a1fc2e59df134965c49f4dd3ce1c226",m.callServer,void 0,m.findSourceMapURL,"getDeploymentLogs");function h({open:e,onOpenChange:n,targetId:r}){let{logs:a,isConnected:o}=function(e){let[t,n]=(0,u.useState)([]),[r,a]=(0,u.useState)(!1),o=(0,u.useRef)(null),l=(0,u.useCallback)(()=>{o.current&&(o.current.close(),o.current=null),a(!1)},[]);return(0,u.useEffect)(()=>{if(!e){n([]),a(!1);return}g(e).then(e=>{e&&n(e)}).catch(()=>{});let t=new EventSource(`/api/deployment-logs?targetId=${e}`);return o.current=t,t.onopen=()=>{a(!0)},t.addEventListener("log",e=>{let t=JSON.parse(e.data);n(e=>[...e,t])}),t.onerror=()=>{a(!1)},()=>{t.close(),o.current=null}},[e,l]),{logs:t,isConnected:r}}(e?r:null);return(0,t.jsx)(v,{open:e,onOpenChange:n,logs:a,isConnected:o})}function v({open:e,onOpenChange:n,logs:r,isConnected:a}){let o=(0,u.useRef)(null),l=(0,u.useRef)(!0),i=(0,u.useCallback)(()=>{let e=o.current;e&&(l.current=e.scrollTop+e.clientHeight>=e.scrollHeight-50)},[]);return(0,u.useEffect)(()=>{l.current&&o.current&&(o.current.scrollTop=o.current.scrollHeight)},[r]),(0,t.jsx)(p.Dialog,{open:e,onOpenChange:n,children:(0,t.jsxs)(p.DialogContent,{className:"flex h-[calc(100vh-48px)] max-h-[calc(100vh-48px)] w-full max-w-[calc(100vw-48px)] flex-col gap-0 bg-zinc-950 p-0 text-zinc-100 sm:rounded-lg","aria-describedby":void 0,children:[(0,t.jsxs)(p.DialogHeader,{className:"flex flex-row items-center justify-between border-b border-zinc-800 px-4 py-3",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(d.Terminal,{className:"h-4 w-4 text-zinc-400"}),(0,t.jsx)(p.DialogTitle,{className:"text-sm font-medium text-zinc-100",children:"Server Logs"})]}),(0,t.jsxs)("div",{className:"flex items-center gap-2 pr-8",children:[(0,t.jsx)("span",{className:`inline-block h-2 w-2 rounded-full ${a?"bg-green-500":"bg-zinc-500"}`}),(0,t.jsx)("span",{className:"text-xs text-zinc-400",children:a?"Connected":"Disconnected"})]})]}),(0,t.jsxs)("div",{ref:o,onScroll:i,className:"flex-1 overflow-auto p-4 font-mono text-sm leading-relaxed",children:[0===r.length?(0,t.jsx)("p",{className:"text-zinc-500",children:"Waiting for log output..."}):r.map(e=>(0,t.jsx)(w,{entry:e},`${e.timestamp}-${e.stream}-${e.line}`)),!a&&r.length>0&&(0,t.jsx)("div",{className:"mt-2 border-t border-zinc-800 pt-2 text-zinc-500",children:"[Server stopped]"})]})]})})}function w({entry:e}){return(0,t.jsx)("div",{"data-stream":e.stream,className:"stderr"===e.stream?"text-red-400":"text-zinc-200",children:(0,t.jsx)("span",{className:"break-all whitespace-pre-wrap",children:e.line})})}function y({status:e,url:r,targetId:a}){let[o,l]=(0,u.useState)(!1),i=a&&(e===c.DeploymentState.Booting||e===c.DeploymentState.Ready);switch(e){case c.DeploymentState.Booting:return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)(f.Badge,{className:"border-transparent bg-blue-50 text-blue-700 hover:bg-blue-50",children:[(0,t.jsx)(n.Loader2,{className:"mr-1 h-3.5 w-3.5 animate-spin"}),"Starting...",i?(0,t.jsx)("button",{type:"button","aria-label":"View server logs",className:"ml-1.5 inline-flex items-center rounded-sm p-0.5 hover:bg-blue-100",onClick:e=>{e.stopPropagation(),l(!0)},children:(0,t.jsx)(d.Terminal,{className:"h-3 w-3"})}):null]}),i?(0,t.jsx)(h,{open:o,onOpenChange:l,targetId:a}):null]});case c.DeploymentState.Ready:return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)(f.Badge,{className:"border-transparent bg-green-50 text-green-700 hover:bg-green-50",children:[(0,t.jsx)("span",{className:"mr-1 inline-block h-2 w-2 rounded-full bg-green-500"}),r?(0,t.jsxs)("a",{href:r,target:"_blank",rel:"noopener noreferrer",className:"inline-flex items-center gap-1 hover:underline",onClick:e=>e.stopPropagation(),children:[r,(0,t.jsx)(s.ExternalLink,{className:"h-3 w-3"})]}):"Ready",i?(0,t.jsx)("button",{type:"button","aria-label":"View server logs",className:"ml-1.5 inline-flex items-center rounded-sm p-0.5 hover:bg-green-100",onClick:e=>{e.stopPropagation(),l(!0)},children:(0,t.jsx)(d.Terminal,{className:"h-3 w-3"})}):null]}),i?(0,t.jsx)(h,{open:o,onOpenChange:l,targetId:a}):null]});default:return null}}e.s(["DeploymentStatusBadge",()=>y],17466),e.s([],99348)},45811,e=>{"use strict";let t;var n=e.i(20314),r=e.i(48249),a=e.i(567),o=e.i(79054);let l=o.default.createContext({drawerRef:{current:null},overlayRef:{current:null},onPress:()=>{},onRelease:()=>{},onDrag:()=>{},onNestedDrag:()=>{},onNestedOpenChange:()=>{},onNestedRelease:()=>{},openProp:void 0,dismissible:!1,isOpen:!1,isDragging:!1,keyboardIsOpen:{current:!1},snapPointsOffset:null,snapPoints:null,handleOnly:!1,modal:!1,shouldFade:!1,activeSnapPoint:null,onOpenChange:()=>{},setActiveSnapPoint:()=>{},closeDrawer:()=>{},direction:"bottom",shouldAnimate:{current:!0},shouldScaleBackground:!1,setBackgroundColorOnScale:!0,noBodyStyles:!1,container:null,autoFocus:!1}),i=()=>{let e=o.default.useContext(l);if(!e)throw Error("useDrawerContext must be used within a Drawer.Root");return e};function u(){return/^((?!chrome|android).)*safari/i.test(navigator.userAgent)}function s(){return d(/^iPhone/)||d(/^iPad/)||d(/^Mac/)&&navigator.maxTouchPoints>1}function d(e){return"u">typeof window&&null!=window.navigator?e.test(window.navigator.platform):void 0}!function(e){if(!e||"u"<typeof document)return;let t=document.head||document.getElementsByTagName("head")[0],n=document.createElement("style");n.type="text/css",t.appendChild(n),n.styleSheet?n.styleSheet.cssText=e:n.appendChild(document.createTextNode(e))}("[data-vaul-drawer]{touch-action:none;will-change:transform;transition:transform .5s cubic-bezier(.32, .72, 0, 1);animation-duration:.5s;animation-timing-function:cubic-bezier(0.32,0.72,0,1)}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=bottom][data-state=open]{animation-name:slideFromBottom}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=bottom][data-state=closed]{animation-name:slideToBottom}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=top][data-state=open]{animation-name:slideFromTop}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=top][data-state=closed]{animation-name:slideToTop}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=left][data-state=open]{animation-name:slideFromLeft}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=left][data-state=closed]{animation-name:slideToLeft}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=right][data-state=open]{animation-name:slideFromRight}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=right][data-state=closed]{animation-name:slideToRight}[data-vaul-drawer][data-vaul-snap-points=true][data-vaul-drawer-direction=bottom]{transform:translate3d(0,var(--initial-transform,100%),0)}[data-vaul-drawer][data-vaul-snap-points=true][data-vaul-drawer-direction=top]{transform:translate3d(0,calc(var(--initial-transform,100%) * -1),0)}[data-vaul-drawer][data-vaul-snap-points=true][data-vaul-drawer-direction=left]{transform:translate3d(calc(var(--initial-transform,100%) * -1),0,0)}[data-vaul-drawer][data-vaul-snap-points=true][data-vaul-drawer-direction=right]{transform:translate3d(var(--initial-transform,100%),0,0)}[data-vaul-drawer][data-vaul-delayed-snap-points=true][data-vaul-drawer-direction=top]{transform:translate3d(0,var(--snap-point-height,0),0)}[data-vaul-drawer][data-vaul-delayed-snap-points=true][data-vaul-drawer-direction=bottom]{transform:translate3d(0,var(--snap-point-height,0),0)}[data-vaul-drawer][data-vaul-delayed-snap-points=true][data-vaul-drawer-direction=left]{transform:translate3d(var(--snap-point-height,0),0,0)}[data-vaul-drawer][data-vaul-delayed-snap-points=true][data-vaul-drawer-direction=right]{transform:translate3d(var(--snap-point-height,0),0,0)}[data-vaul-overlay][data-vaul-snap-points=false]{animation-duration:.5s;animation-timing-function:cubic-bezier(0.32,0.72,0,1)}[data-vaul-overlay][data-vaul-snap-points=false][data-state=open]{animation-name:fadeIn}[data-vaul-overlay][data-state=closed]{animation-name:fadeOut}[data-vaul-animate=false]{animation:none!important}[data-vaul-overlay][data-vaul-snap-points=true]{opacity:0;transition:opacity .5s cubic-bezier(.32, .72, 0, 1)}[data-vaul-overlay][data-vaul-snap-points=true]{opacity:1}[data-vaul-drawer]:not([data-vaul-custom-container=true])::after{content:'';position:absolute;background:inherit;background-color:inherit}[data-vaul-drawer][data-vaul-drawer-direction=top]::after{top:initial;bottom:100%;left:0;right:0;height:200%}[data-vaul-drawer][data-vaul-drawer-direction=bottom]::after{top:100%;bottom:initial;left:0;right:0;height:200%}[data-vaul-drawer][data-vaul-drawer-direction=left]::after{left:initial;right:100%;top:0;bottom:0;width:200%}[data-vaul-drawer][data-vaul-drawer-direction=right]::after{left:100%;right:initial;top:0;bottom:0;width:200%}[data-vaul-overlay][data-vaul-snap-points=true]:not([data-vaul-snap-points-overlay=true]):not(\n[data-state=closed]\n){opacity:0}[data-vaul-overlay][data-vaul-snap-points-overlay=true]{opacity:1}[data-vaul-handle]{display:block;position:relative;opacity:.7;background:#e2e2e4;margin-left:auto;margin-right:auto;height:5px;width:32px;border-radius:1rem;touch-action:pan-y}[data-vaul-handle]:active,[data-vaul-handle]:hover{opacity:1}[data-vaul-handle-hitarea]{position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);width:max(100%,2.75rem);height:max(100%,2.75rem);touch-action:inherit}@media (hover:hover) and (pointer:fine){[data-vaul-drawer]{user-select:none}}@media (pointer:fine){[data-vaul-handle-hitarea]:{width:100%;height:100%}}@keyframes fadeIn{from{opacity:0}to{opacity:1}}@keyframes fadeOut{to{opacity:0}}@keyframes slideFromBottom{from{transform:translate3d(0,var(--initial-transform,100%),0)}to{transform:translate3d(0,0,0)}}@keyframes slideToBottom{to{transform:translate3d(0,var(--initial-transform,100%),0)}}@keyframes slideFromTop{from{transform:translate3d(0,calc(var(--initial-transform,100%) * -1),0)}to{transform:translate3d(0,0,0)}}@keyframes slideToTop{to{transform:translate3d(0,calc(var(--initial-transform,100%) * -1),0)}}@keyframes slideFromLeft{from{transform:translate3d(calc(var(--initial-transform,100%) * -1),0,0)}to{transform:translate3d(0,0,0)}}@keyframes slideToLeft{to{transform:translate3d(calc(var(--initial-transform,100%) * -1),0,0)}}@keyframes slideFromRight{from{transform:translate3d(var(--initial-transform,100%),0,0)}to{transform:translate3d(0,0,0)}}@keyframes slideToRight{to{transform:translate3d(var(--initial-transform,100%),0,0)}}");let c="u">typeof window?o.useLayoutEffect:o.useEffect;function f(...e){return(...t)=>{for(let n of e)"function"==typeof n&&n(...t)}}let p="u">typeof document&&window.visualViewport;function m(e){let t=window.getComputedStyle(e);return/(auto|scroll)/.test(t.overflow+t.overflowX+t.overflowY)}function g(e){for(m(e)&&(e=e.parentElement);e&&!m(e);)e=e.parentElement;return e||document.scrollingElement||document.documentElement}let h=new Set(["checkbox","radio","range","color","file","image","button","submit","reset"]),v=0;function w(e,t,n,r){return e.addEventListener(t,n,r),()=>{e.removeEventListener(t,n,r)}}function y(e){let t=document.scrollingElement||document.documentElement;for(;e&&e!==t;){let t=g(e);if(t!==document.documentElement&&t!==document.body&&t!==e){let n=t.getBoundingClientRect().top,r=e.getBoundingClientRect().top;e.getBoundingClientRect().bottom>t.getBoundingClientRect().bottom+24&&(t.scrollTop+=r-n)}e=t.parentElement}}function b(e){return e instanceof HTMLInputElement&&!h.has(e.type)||e instanceof HTMLTextAreaElement||e instanceof HTMLElement&&e.isContentEditable}function x(...e){return o.useCallback(function(...e){return t=>e.forEach(e=>{"function"==typeof e?e(t):null!=e&&(e.current=t)})}(...e),e)}let R=new WeakMap;function T(e,t,n=!1){if(!e||!(e instanceof HTMLElement))return;let r={};Object.entries(t).forEach(([t,n])=>{t.startsWith("--")?e.style.setProperty(t,n):(r[t]=e.style[t],e.style[t]=n)}),n||R.set(e,r)}let C=e=>{switch(e){case"top":case"bottom":return!0;case"left":case"right":return!1;default:return e}};function j(e,t){if(!e)return null;let n=window.getComputedStyle(e),r=n.transform||n.webkitTransform||n.mozTransform,a=r.match(/^matrix3d\((.+)\)$/);return a?parseFloat(a[1].split(", ")[C(t)?13:12]):(a=r.match(/^matrix\((.+)\)$/))?parseFloat(a[1].split(", ")[C(t)?5:4]):null}function D(e,t){if(!e)return()=>{};let n=e.style.cssText;return Object.assign(e.style,t),()=>{e.style.cssText=n}}let E=[.32,.72,0,1],S="vaul-dragging";function $(e){let t=o.default.useRef(e);return o.default.useEffect(()=>{t.current=e}),o.default.useMemo(()=>(...e)=>null==t.current?void 0:t.current.call(t,...e),[])}function N({prop:e,defaultProp:t,onChange:n=()=>{}}){let[r,a]=function({defaultProp:e,onChange:t}){let n=o.default.useState(e),[r]=n,a=o.default.useRef(r),l=$(t);return o.default.useEffect(()=>{a.current!==r&&(l(r),a.current=r)},[r,a,l]),n}({defaultProp:t,onChange:n}),l=void 0!==e,i=l?e:r,u=$(n);return[i,o.default.useCallback(t=>{if(l){let n="function"==typeof t?t(e):t;n!==e&&u(n)}else a(t)},[l,e,a,u])]}let k=()=>()=>{},P=null;function M({open:e,onOpenChange:n,children:r,onDrag:i,onRelease:d,snapPoints:m,shouldScaleBackground:h=!1,setBackgroundColorOnScale:x=!0,closeThreshold:D=.25,scrollLockTimeout:$=100,dismissible:k=!0,handleOnly:M=!1,fadeFromIndex:O=m&&m.length-1,activeSnapPoint:z,setActiveSnapPoint:L,fixed:B,modal:F=!0,onClose:I,nested:A,noBodyStyles:H=!1,direction:W="bottom",defaultOpen:q=!1,disablePreventScroll:Y=!0,snapToSequentialPoint:U=!1,preventScrollRestoration:X=!1,repositionInputs:V=!0,onAnimationEnd:K,container:J,autoFocus:_=!1}){var G,Q;let[Z=!1,ee]=N({defaultProp:q,prop:e,onChange:e=>{null==n||n(e),e||A||ek(),setTimeout(()=>{null==K||K(e)},500),e&&!F&&"u">typeof window&&window.requestAnimationFrame(()=>{document.body.style.pointerEvents="auto"}),e||(document.body.style.pointerEvents="auto")}}),[et,en]=o.default.useState(!1),[er,ea]=o.default.useState(!1),[eo,el]=o.default.useState(!1),ei=o.default.useRef(null),eu=o.default.useRef(null),es=o.default.useRef(null),ed=o.default.useRef(null),ec=o.default.useRef(null),ef=o.default.useRef(!1),ep=o.default.useRef(null),em=o.default.useRef(0),eg=o.default.useRef(!1),eh=o.default.useRef(!q),ev=o.default.useRef(0),ew=o.default.useRef(null),ey=o.default.useRef((null==(G=ew.current)?void 0:G.getBoundingClientRect().height)||0),eb=o.default.useRef((null==(Q=ew.current)?void 0:Q.getBoundingClientRect().width)||0),ex=o.default.useRef(0),eR=o.default.useCallback(e=>{m&&e===eE.length-1&&(eu.current=new Date)},[]),{activeSnapPoint:eT,activeSnapPointIndex:eC,setActiveSnapPoint:ej,onRelease:eD,snapPointsOffset:eE,onDrag:eS,shouldFade:e$,getPercentageDragged:eN}=function({activeSnapPointProp:e,setActiveSnapPointProp:t,snapPoints:n,drawerRef:r,overlayRef:a,fadeFromIndex:l,onSnapPointChange:i,direction:u="bottom",container:s,snapToSequentialPoint:d}){let[c,f]=N({prop:e,defaultProp:null==n?void 0:n[0],onChange:t}),[p,m]=o.default.useState("u">typeof window?{innerWidth:window.innerWidth,innerHeight:window.innerHeight}:void 0);o.default.useEffect(()=>{function e(){m({innerWidth:window.innerWidth,innerHeight:window.innerHeight})}return window.addEventListener("resize",e),()=>window.removeEventListener("resize",e)},[]);let g=o.default.useMemo(()=>c===(null==n?void 0:n[n.length-1])||null,[n,c]),h=o.default.useMemo(()=>{var e;return null!=(e=null==n?void 0:n.findIndex(e=>e===c))?e:null},[n,c]),v=n&&n.length>0&&(l||0===l)&&!Number.isNaN(l)&&n[l]===c||!n,w=o.default.useMemo(()=>{var e;let t=s?{width:s.getBoundingClientRect().width,height:s.getBoundingClientRect().height}:"u">typeof window?{width:window.innerWidth,height:window.innerHeight}:{width:0,height:0};return null!=(e=null==n?void 0:n.map(e=>{let n="string"==typeof e,r=0;if(n&&(r=parseInt(e,10)),C(u)){let a=n?r:p?e*t.height:0;return p?"bottom"===u?t.height-a:-t.height+a:a}let a=n?r:p?e*t.width:0;return p?"right"===u?t.width-a:-t.width+a:a}))?e:[]},[n,p,s]),y=o.default.useMemo(()=>null!==h?null==w?void 0:w[h]:null,[w,h]),b=o.default.useCallback(e=>{var t;let o=null!=(t=null==w?void 0:w.findIndex(t=>t===e))?t:null;i(o),T(r.current,{transition:`transform 0.5s cubic-bezier(${E.join(",")})`,transform:C(u)?`translate3d(0, ${e}px, 0)`:`translate3d(${e}px, 0, 0)`}),w&&o!==w.length-1&&void 0!==l&&o!==l&&o<l?T(a.current,{transition:`opacity 0.5s cubic-bezier(${E.join(",")})`,opacity:"0"}):T(a.current,{transition:`opacity 0.5s cubic-bezier(${E.join(",")})`,opacity:"1"}),f(null==n?void 0:n[Math.max(o,0)])},[r.current,n,w,l,a,f]);return o.default.useEffect(()=>{if(c||e){var t;let r=null!=(t=null==n?void 0:n.findIndex(t=>t===e||t===c))?t:-1;w&&-1!==r&&"number"==typeof w[r]&&b(w[r])}},[c,e,n,w,b]),{isLastSnapPoint:g,activeSnapPoint:c,shouldFade:v,getPercentageDragged:function(e,t){if(!n||"number"!=typeof h||!w||void 0===l)return null;let r=h===l-1;if(h>=l&&t)return 0;if(r&&!t)return 1;if(!v&&!r)return null;let a=r?h+1:h-1,o=e/Math.abs(r?w[a]-w[a-1]:w[a+1]-w[a]);return r?1-o:o},setActiveSnapPoint:f,activeSnapPointIndex:h,onRelease:function({draggedDistance:e,closeDrawer:t,velocity:r,dismissible:o}){if(void 0===l)return;let i="bottom"===u||"right"===u?(null!=y?y:0)-e:(null!=y?y:0)+e,s=h===l-1,c=0===h,f=e>0;if(s&&T(a.current,{transition:`opacity 0.5s cubic-bezier(${E.join(",")})`}),!d&&r>2&&!f)return void(o?t():b(w[0]));if(!d&&r>2&&f&&w&&n)return void b(w[n.length-1]);let p=null==w?void 0:w.reduce((e,t)=>"number"!=typeof e||"number"!=typeof t?e:Math.abs(t-i)<Math.abs(e-i)?t:e),m=C(u)?window.innerHeight:window.innerWidth;if(r>.4&&Math.abs(e)<.4*m){let e=f?1:-1;return e>0&&g&&n?void b(w[n.length-1]):void(c&&e<0&&o&&t(),null===h||b(w[h+e]))}b(p)},onDrag:function({draggedDistance:e}){if(null===y)return;let t="bottom"===u||"right"===u?y-e:y+e;("bottom"===u||"right"===u)&&t<w[w.length-1]||("top"===u||"left"===u)&&t>w[w.length-1]||T(r.current,{transform:C(u)?`translate3d(0, ${t}px, 0)`:`translate3d(${t}px, 0, 0)`})},snapPointsOffset:w}}({snapPoints:m,activeSnapPointProp:z,setActiveSnapPointProp:L,drawerRef:ew,fadeFromIndex:O,overlayRef:ei,onSnapPointChange:eR,direction:W,container:J,snapToSequentialPoint:U});!function(e={}){let{isDisabled:n}=e;c(()=>{if(!n){var e,r,a;let n,o,l,i,u,d,c;return 1==++v&&s()&&(l=0,i=window.pageXOffset,u=window.pageYOffset,d=f((e=document.documentElement,r="paddingRight",a=`${window.innerWidth-document.documentElement.clientWidth}px`,n=e.style[r],e.style[r]=a,()=>{e.style[r]=n})),window.scrollTo(0,0),c=f(w(document,"touchstart",e=>{((o=g(e.target))!==document.documentElement||o!==document.body)&&(l=e.changedTouches[0].pageY)},{passive:!1,capture:!0}),w(document,"touchmove",e=>{if(!o||o===document.documentElement||o===document.body)return void e.preventDefault();let t=e.changedTouches[0].pageY,n=o.scrollTop,r=o.scrollHeight-o.clientHeight;0!==r&&((n<=0&&t>l||n>=r&&t<l)&&e.preventDefault(),l=t)},{passive:!1,capture:!0}),w(document,"touchend",e=>{let t=e.target;b(t)&&t!==document.activeElement&&(e.preventDefault(),t.style.transform="translateY(-2000px)",t.focus(),requestAnimationFrame(()=>{t.style.transform=""}))},{passive:!1,capture:!0}),w(document,"focus",e=>{let t=e.target;b(t)&&(t.style.transform="translateY(-2000px)",requestAnimationFrame(()=>{t.style.transform="",p&&(p.height<window.innerHeight?requestAnimationFrame(()=>{y(t)}):p.addEventListener("resize",()=>y(t),{once:!0}))}))},!0),w(window,"scroll",()=>{window.scrollTo(0,0)})),t=()=>{d(),c(),window.scrollTo(i,u)}),()=>{0==--v&&(null==t||t())}}},[n])}({isDisabled:!Z||er||!F||eo||!et||!V||!Y});let{restorePositionSetting:ek}=function({isOpen:e,modal:t,nested:n,hasBeenOpened:r,preventScrollRestoration:a,noBodyStyles:l}){let[i,s]=o.default.useState(()=>"u">typeof window?window.location.href:""),d=o.default.useRef(0),c=o.default.useCallback(()=>{if(u()&&null===P&&e&&!l){P={position:document.body.style.position,top:document.body.style.top,left:document.body.style.left,height:document.body.style.height,right:"unset"};let{scrollX:e,innerHeight:t}=window;document.body.style.setProperty("position","fixed","important"),Object.assign(document.body.style,{top:`${-d.current}px`,left:`${-e}px`,right:"0px",height:"auto"}),window.setTimeout(()=>window.requestAnimationFrame(()=>{let e=t-window.innerHeight;e&&d.current>=t&&(document.body.style.top=`${-(d.current+e)}px`)}),300)}},[e]),f=o.default.useCallback(()=>{if(u()&&null!==P&&!l){let e=-parseInt(document.body.style.top,10),t=-parseInt(document.body.style.left,10);Object.assign(document.body.style,P),window.requestAnimationFrame(()=>{a&&i!==window.location.href?s(window.location.href):window.scrollTo(t,e)}),P=null}},[i]);return o.default.useEffect(()=>{function e(){d.current=window.scrollY}return e(),window.addEventListener("scroll",e),()=>{window.removeEventListener("scroll",e)}},[]),o.default.useEffect(()=>{if(t)return()=>{"u"<typeof document||document.querySelector("[data-vaul-drawer]")||f()}},[t,f]),o.default.useEffect(()=>{!n&&r&&(e?(window.matchMedia("(display-mode: standalone)").matches||c(),t||window.setTimeout(()=>{f()},500)):f())},[e,r,i,t,n,c,f]),{restorePositionSetting:f}}({isOpen:Z,modal:F,nested:null!=A&&A,hasBeenOpened:et,preventScrollRestoration:X,noBodyStyles:H});function eP(){return(window.innerWidth-26)/window.innerWidth}function eM(e,t){var n;let r=e,a=null==(n=window.getSelection())?void 0:n.toString(),o=ew.current?j(ew.current,W):null,l=new Date;if("SELECT"===r.tagName||r.hasAttribute("data-vaul-no-drag")||r.closest("[data-vaul-no-drag]"))return!1;if("right"===W||"left"===W)return!0;if(eu.current&&l.getTime()-eu.current.getTime()<500)return!1;if(null!==o&&("bottom"===W?o>0:o<0))return!0;if(a&&a.length>0)return!1;if(ec.current&&l.getTime()-ec.current.getTime()<$&&0===o||t)return ec.current=l,!1;for(;r;){if(r.scrollHeight>r.clientHeight){if(0!==r.scrollTop)return ec.current=new Date,!1;if("dialog"===r.getAttribute("role"))break}r=r.parentNode}return!0}function eO(e){er&&ew.current&&(ew.current.classList.remove(S),ef.current=!1,ea(!1),ed.current=new Date),null==I||I(),e||ee(!1),setTimeout(()=>{m&&ej(m[0])},500)}function ez(){if(!ew.current)return;let e=document.querySelector("[data-vaul-drawer-wrapper]"),t=j(ew.current,W);T(ew.current,{transform:"translate3d(0, 0, 0)",transition:`transform 0.5s cubic-bezier(${E.join(",")})`}),T(ei.current,{transition:`opacity 0.5s cubic-bezier(${E.join(",")})`,opacity:"1"}),h&&t&&t>0&&Z&&T(e,{borderRadius:"8px",overflow:"hidden",...C(W)?{transform:`scale(${eP()}) translate3d(0, calc(env(safe-area-inset-top) + 14px), 0)`,transformOrigin:"top"}:{transform:`scale(${eP()}) translate3d(calc(env(safe-area-inset-top) + 14px), 0, 0)`,transformOrigin:"left"},transitionProperty:"transform, border-radius",transitionDuration:"0.5s",transitionTimingFunction:`cubic-bezier(${E.join(",")})`},!0)}return o.default.useEffect(()=>{window.requestAnimationFrame(()=>{eh.current=!0})},[]),o.default.useEffect(()=>{var e;function t(){if(ew.current&&V&&(b(document.activeElement)||eg.current)){var e;let t=(null==(e=window.visualViewport)?void 0:e.height)||0,n=window.innerHeight,r=n-t,a=ew.current.getBoundingClientRect().height||0;ex.current||(ex.current=a);let o=ew.current.getBoundingClientRect().top;if(Math.abs(ev.current-r)>60&&(eg.current=!eg.current),m&&m.length>0&&eE&&eC&&(r+=eE[eC]||0),ev.current=r,a>t||eg.current){let e=ew.current.getBoundingClientRect().height,l=e;e>t&&(l=t-(a>.8*n?o:26)),B?ew.current.style.height=`${e-Math.max(r,0)}px`:ew.current.style.height=`${Math.max(l,t-o)}px`}else{let e;e=navigator.userAgent,"u">typeof window&&(/Firefox/.test(e)&&/Mobile/.test(e)||/FxiOS/.test(e))||(ew.current.style.height=`${ex.current}px`)}m&&m.length>0&&!eg.current?ew.current.style.bottom="0px":ew.current.style.bottom=`${Math.max(r,0)}px`}}return null==(e=window.visualViewport)||e.addEventListener("resize",t),()=>{var e;return null==(e=window.visualViewport)?void 0:e.removeEventListener("resize",t)}},[eC,m,eE]),o.default.useEffect(()=>(Z&&(T(document.documentElement,{scrollBehavior:"auto"}),eu.current=new Date),()=>{!function(e,t){if(!e||!(e instanceof HTMLElement))return;let n=R.get(e);n&&(e.style[t]=n[t])}(document.documentElement,"scrollBehavior")}),[Z]),o.default.useEffect(()=>{F||window.requestAnimationFrame(()=>{document.body.style.pointerEvents="auto"})},[F]),o.default.createElement(a.Root,{defaultOpen:q,onOpenChange:e=>{(k||e)&&(e?en(!0):eO(!0),ee(e))},open:Z},o.default.createElement(l.Provider,{value:{activeSnapPoint:eT,snapPoints:m,setActiveSnapPoint:ej,drawerRef:ew,overlayRef:ei,onOpenChange:n,onPress:function(e){var t,n;!k&&!m||(!ew.current||ew.current.contains(e.target))&&(ey.current=(null==(t=ew.current)?void 0:t.getBoundingClientRect().height)||0,eb.current=(null==(n=ew.current)?void 0:n.getBoundingClientRect().width)||0,ea(!0),es.current=new Date,s()&&window.addEventListener("touchend",()=>ef.current=!1,{once:!0}),e.target.setPointerCapture(e.pointerId),em.current=C(W)?e.pageY:e.pageX)},onRelease:function(e){var t,n;if(!er||!ew.current)return;ew.current.classList.remove(S),ef.current=!1,ea(!1),ed.current=new Date;let r=j(ew.current,W);if(!e||!eM(e.target,!1)||!r||Number.isNaN(r)||null===es.current)return;let a=ed.current.getTime()-es.current.getTime(),o=em.current-(C(W)?e.pageY:e.pageX),l=Math.abs(o)/a;if(l>.05&&(el(!0),setTimeout(()=>{el(!1)},200)),m){eD({draggedDistance:o*("bottom"===W||"right"===W?1:-1),closeDrawer:eO,velocity:l,dismissible:k}),null==d||d(e,!0);return}if("bottom"===W||"right"===W?o>0:o<0){ez(),null==d||d(e,!0);return}if(l>.4){eO(),null==d||d(e,!1);return}let i=Math.min(null!=(t=ew.current.getBoundingClientRect().height)?t:0,window.innerHeight),u=Math.min(null!=(n=ew.current.getBoundingClientRect().width)?n:0,window.innerWidth);if(Math.abs(r)>=("left"===W||"right"===W?u:i)*D){eO(),null==d||d(e,!1);return}null==d||d(e,!0),ez()},onDrag:function(e){if(ew.current&&er){let t="bottom"===W||"right"===W?1:-1,n=(em.current-(C(W)?e.pageY:e.pageX))*t,r=n>0,a=m&&!k&&!r;if(a&&0===eC)return;let o=Math.abs(n),l=document.querySelector("[data-vaul-drawer-wrapper]"),u=o/("bottom"===W||"top"===W?ey.current:eb.current),s=eN(o,r);if(null!==s&&(u=s),a&&u>=1||!ef.current&&!eM(e.target,r))return;if(ew.current.classList.add(S),ef.current=!0,T(ew.current,{transition:"none"}),T(ei.current,{transition:"none"}),m&&eS({draggedDistance:n}),r&&!m){let e=Math.min(-(8*(Math.log(n+1)-2)*1),0)*t;T(ew.current,{transform:C(W)?`translate3d(0, ${e}px, 0)`:`translate3d(${e}px, 0, 0)`});return}let d=1-u;if((e$||O&&eC===O-1)&&(null==i||i(e,u),T(ei.current,{opacity:`${d}`,transition:"none"},!0)),l&&ei.current&&h){let e=Math.min(eP()+u*(1-eP()),1),t=8-8*u,n=Math.max(0,14-14*u);T(l,{borderRadius:`${t}px`,transform:C(W)?`scale(${e}) translate3d(0, ${n}px, 0)`:`scale(${e}) translate3d(${n}px, 0, 0)`,transition:"none"},!0)}if(!m){let e=o*t;T(ew.current,{transform:C(W)?`translate3d(0, ${e}px, 0)`:`translate3d(${e}px, 0, 0)`})}}},dismissible:k,shouldAnimate:eh,handleOnly:M,isOpen:Z,isDragging:er,shouldFade:e$,closeDrawer:eO,onNestedDrag:function(e,t){if(t<0)return;let n=(window.innerWidth-16)/window.innerWidth,r=n+t*(1-n),a=-16+16*t;T(ew.current,{transform:C(W)?`scale(${r}) translate3d(0, ${a}px, 0)`:`scale(${r}) translate3d(${a}px, 0, 0)`,transition:"none"})},onNestedOpenChange:function(e){let t=e?(window.innerWidth-16)/window.innerWidth:1,n=e?-16:0;ep.current&&window.clearTimeout(ep.current),T(ew.current,{transition:`transform 0.5s cubic-bezier(${E.join(",")})`,transform:C(W)?`scale(${t}) translate3d(0, ${n}px, 0)`:`scale(${t}) translate3d(${n}px, 0, 0)`}),!e&&ew.current&&(ep.current=setTimeout(()=>{let e=j(ew.current,W);T(ew.current,{transition:"none",transform:C(W)?`translate3d(0, ${e}px, 0)`:`translate3d(${e}px, 0, 0)`})},500))},onNestedRelease:function(e,t){let n=C(W)?window.innerHeight:window.innerWidth,r=t?(n-16)/n:1,a=t?-16:0;t&&T(ew.current,{transition:`transform 0.5s cubic-bezier(${E.join(",")})`,transform:C(W)?`scale(${r}) translate3d(0, ${a}px, 0)`:`scale(${r}) translate3d(${a}px, 0, 0)`})},keyboardIsOpen:eg,modal:F,snapPointsOffset:eE,activeSnapPointIndex:eC,direction:W,shouldScaleBackground:h,setBackgroundColorOnScale:x,noBodyStyles:H,container:J,autoFocus:_}},r))}let O=o.default.forwardRef(function({...e},t){let{overlayRef:n,snapPoints:r,onRelease:l,shouldFade:u,isOpen:s,modal:d,shouldAnimate:c}=i(),f=x(t,n),p=r&&r.length>0;if(!d)return null;let m=o.default.useCallback(e=>l(e),[l]);return o.default.createElement(a.Overlay,{onMouseUp:m,ref:f,"data-vaul-overlay":"","data-vaul-snap-points":s&&p?"true":"false","data-vaul-snap-points-overlay":s&&u?"true":"false","data-vaul-animate":(null==c?void 0:c.current)?"true":"false",...e})});O.displayName="Drawer.Overlay";let z=o.default.forwardRef(function({onPointerDownOutside:e,style:t,onOpenAutoFocus:n,...r},l){let{drawerRef:u,onPress:s,onRelease:d,onDrag:c,keyboardIsOpen:f,snapPointsOffset:p,activeSnapPointIndex:m,modal:g,isOpen:h,direction:v,snapPoints:w,container:y,handleOnly:b,shouldAnimate:R,autoFocus:T}=i(),[j,S]=o.default.useState(!1),$=x(l,u),N=o.default.useRef(null),P=o.default.useRef(null),M=o.default.useRef(!1),O=w&&w.length>0;function z(e){N.current=null,M.current=!1,d(e)}return!function(){let{direction:e,isOpen:t,shouldScaleBackground:n,setBackgroundColorOnScale:r,noBodyStyles:a}=i(),l=o.default.useRef(null),u=(0,o.useMemo)(()=>document.body.style.backgroundColor,[]);function s(){return(window.innerWidth-26)/window.innerWidth}o.default.useEffect(()=>{if(t&&n){l.current&&clearTimeout(l.current);let t=document.querySelector("[data-vaul-drawer-wrapper]")||document.querySelector("[vaul-drawer-wrapper]");if(!t)return;!function(...e){}(r&&!a?D(document.body,{background:"black"}):k,D(t,{transformOrigin:C(e)?"top":"left",transitionProperty:"transform, border-radius",transitionDuration:"0.5s",transitionTimingFunction:`cubic-bezier(${E.join(",")})`}));let n=D(t,{borderRadius:"8px",overflow:"hidden",...C(e)?{transform:`scale(${s()}) translate3d(0, calc(env(safe-area-inset-top) + 14px), 0)`}:{transform:`scale(${s()}) translate3d(calc(env(safe-area-inset-top) + 14px), 0, 0)`}});return()=>{n(),l.current=window.setTimeout(()=>{u?document.body.style.background=u:document.body.style.removeProperty("background")},500)}}},[t,n,u])}(),o.default.useEffect(()=>{O&&window.requestAnimationFrame(()=>{S(!0)})},[]),o.default.createElement(a.Content,{"data-vaul-drawer-direction":v,"data-vaul-drawer":"","data-vaul-delayed-snap-points":j?"true":"false","data-vaul-snap-points":h&&O?"true":"false","data-vaul-custom-container":y?"true":"false","data-vaul-animate":(null==R?void 0:R.current)?"true":"false",...r,ref:$,style:p&&p.length>0?{"--snap-point-height":`${p[null!=m?m:0]}px`,...t}:t,onPointerDown:e=>{b||(null==r.onPointerDown||r.onPointerDown.call(r,e),N.current={x:e.pageX,y:e.pageY},s(e))},onOpenAutoFocus:e=>{null==n||n(e),T||e.preventDefault()},onPointerDownOutside:t=>{(null==e||e(t),!g||t.defaultPrevented)?t.preventDefault():f.current&&(f.current=!1)},onFocusOutside:e=>{if(!g)return void e.preventDefault()},onPointerMove:e=>{if(P.current=e,b||(null==r.onPointerMove||r.onPointerMove.call(r,e),!N.current))return;let t=e.pageY-N.current.y,n=e.pageX-N.current.x,a="touch"===e.pointerType?10:2;((e,t,n=0)=>{if(M.current)return!0;let r=Math.abs(e.y),a=Math.abs(e.x),o=a>r,l=["bottom","right"].includes(t)?1:-1;if("left"===t||"right"===t){if(!(e.x*l<0)&&a>=0&&a<=n)return o}else if(!(e.y*l<0)&&r>=0&&r<=n)return!o;return M.current=!0,!0})({x:n,y:t},v,a)?c(e):(Math.abs(n)>a||Math.abs(t)>a)&&(N.current=null)},onPointerUp:e=>{null==r.onPointerUp||r.onPointerUp.call(r,e),N.current=null,M.current=!1,d(e)},onPointerOut:e=>{null==r.onPointerOut||r.onPointerOut.call(r,e),z(P.current)},onContextMenu:e=>{null==r.onContextMenu||r.onContextMenu.call(r,e),P.current&&z(P.current)}})});z.displayName="Drawer.Content";let L=o.default.forwardRef(function({preventCycle:e=!1,children:t,...n},r){let{closeDrawer:a,isDragging:l,snapPoints:u,activeSnapPoint:s,setActiveSnapPoint:d,dismissible:c,handleOnly:f,isOpen:p,onPress:m,onDrag:g}=i(),h=o.default.useRef(null),v=o.default.useRef(!1);function w(){h.current&&window.clearTimeout(h.current),v.current=!1}return o.default.createElement("div",{onClick:function(){v.current?w():window.setTimeout(()=>{!function(){if(l||e||v.current)return w();if(w(),!u||0===u.length){c||a();return}if(s===u[u.length-1]&&c)return a();let t=u.findIndex(e=>e===s);-1===t||d(u[t+1])}()},120)},onPointerCancel:w,onPointerDown:e=>{f&&m(e),h.current=window.setTimeout(()=>{v.current=!0},250)},onPointerMove:e=>{f&&g(e)},ref:r,"data-vaul-drawer-visible":p?"true":"false","data-vaul-handle":"","aria-hidden":"true",...n},o.default.createElement("span",{"data-vaul-handle-hitarea":"","aria-hidden":"true"},t))});L.displayName="Drawer.Handle";let B={Root:M,NestedRoot:function({onDrag:e,onOpenChange:t,open:n,...r}){let{onNestedDrag:a,onNestedOpenChange:l,onNestedRelease:u}=i();if(!a)throw Error("Drawer.NestedRoot must be placed in another drawer");return o.default.createElement(M,{nested:!0,open:n,onClose:()=>{l(!1)},onDrag:(t,n)=>{a(t,n),null==e||e(t,n)},onOpenChange:e=>{e&&l(e),null==t||t(e)},onRelease:u,...r})},Content:z,Overlay:O,Trigger:a.Trigger,Portal:function(e){let t=i(),{container:n=t.container,...r}=e;return o.default.createElement(a.Portal,{container:n,...r})},Handle:L,Close:a.Close,Title:a.Title,Description:a.Description};var F=e.i(31777);function I({...e}){return(0,n.jsx)(B.Root,{"data-slot":"drawer",...e})}function A({...e}){return(0,n.jsx)(B.Portal,{"data-slot":"drawer-portal",...e})}function H({className:e,...t}){return(0,n.jsx)(B.Overlay,{"data-slot":"drawer-overlay",className:(0,F.cn)("fixed inset-0 z-50 bg-black/50",e),...t})}function W({className:e,children:t,direction:a="bottom",showCloseButton:o=!0,...l}){return(0,n.jsx)(A,{children:(0,n.jsxs)(B.Content,{"data-slot":"drawer-content",className:(0,F.cn)("bg-background fixed z-50 flex flex-col shadow-lg","bottom"===a&&"inset-x-0 bottom-0 mb-24 rounded-t-lg border-t","top"===a&&"inset-x-0 top-0 mt-24 rounded-b-lg border-b","right"===a&&"inset-y-0 right-0 h-full w-3/4 border-l","left"===a&&"inset-y-0 left-0 h-full w-3/4 border-r",e),style:{"--initial-transform":"right"===a?"calc(100% + 8px)":"left"===a||"top"===a?"calc(-100% - 8px)":"calc(100% + 8px)",userSelect:"text",...l.style??{}},...l,children:[t,o?(0,n.jsxs)(B.Close,{className:"ring-offset-background focus:ring-ring absolute top-4 right-4 rounded-xs opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none",children:[(0,n.jsx)(r.XIcon,{className:"size-4"}),(0,n.jsx)("span",{className:"sr-only",children:"Close"})]}):null]})})}function q({className:e,...t}){return(0,n.jsx)("div",{"data-slot":"drawer-header",className:(0,F.cn)("flex flex-col gap-1.5 p-4",e),...t})}function Y({className:e,...t}){return(0,n.jsx)("div",{"data-slot":"drawer-footer",className:(0,F.cn)("mt-auto flex flex-col gap-2 p-4",e),...t})}function U({className:e,...t}){return(0,n.jsx)(B.Title,{"data-slot":"drawer-title",className:(0,F.cn)("text-foreground font-semibold",e),...t})}function X({className:e,...t}){return(0,n.jsx)(B.Description,{"data-slot":"drawer-description",className:(0,F.cn)("text-muted-foreground text-sm",e),...t})}e.s(["Drawer",()=>I,"DrawerContent",()=>W,"DrawerDescription",()=>X,"DrawerFooter",()=>Y,"DrawerHeader",()=>q,"DrawerOverlay",()=>H,"DrawerTitle",()=>U],45811)},8537,e=>{"use strict";var t=e.i(79054),n=e.i(18354),r=e.i(21023);let a=(0,r.createServerReference)("40e92e13347a27b71e58ae7f595cd1bf3ff2ba29b6",r.callServer,void 0,r.findSourceMapURL,"deployFeature"),o=(0,r.createServerReference)("4008d5f7bf883e04051852541f0a9fa54625b06958",r.callServer,void 0,r.findSourceMapURL,"deployRepository"),l=(0,r.createServerReference)("409f3895d18c8ad99610ecd115ed05b5aa9e8e8c18",r.callServer,void 0,r.findSourceMapURL,"stopDeployment"),i=(0,r.createServerReference)("40d99ba12d6a67f98b7cf1d6f9580182019d49f53a",r.callServer,void 0,r.findSourceMapURL,"getDeploymentStatus"),u=(0,n.createLogger)("[useDeployAction]");function s(e){let[n,r]=(0,t.useState)(!1),[s,d]=(0,t.useState)(!1),[c,f]=(0,t.useState)(null),[p,m]=(0,t.useState)(null),[g,h]=(0,t.useState)(null),v=(0,t.useRef)(null),w=(0,t.useRef)(null),y=(0,t.useRef)(!0),b=(0,t.useRef)(p);(0,t.useEffect)(()=>{b.current=p},[p]),(0,t.useEffect)(()=>(y.current=!0,()=>{y.current=!1}),[]),(0,t.useEffect)(()=>()=>{v.current&&clearTimeout(v.current),w.current&&clearInterval(w.current)},[]);let x=(0,t.useCallback)(()=>{w.current&&(u.debug("stopping polling"),clearInterval(w.current),w.current=null)},[]),R=(0,t.useCallback)(e=>{x(),u.debug(`starting polling for "${e}" every 3000ms`),w.current=setInterval(async()=>{if(!y.current)return void x();let t=await i(e);y.current&&(t&&"Stopped"!==t.state?(t.state!==b.current&&u.info(`poll state changed: ${b.current} → ${t.state}, url=${t.url}`),m(t.state),h(t.url)):(u.info(`poll result: ${t?`state=${t.state}`:"null (deployment gone)"} — stopping poll`),m(null),h(null),x()))},3e3)},[x]),T=(0,t.useCallback)(async()=>{if(!e)return void u.warn("deploy() called but input is null — no-op");if(n)return void u.warn("deploy() called but already loading — no-op");u.info(`deploy() — targetType="${e.targetType}", targetId="${e.targetId}", repositoryPath="${e.repositoryPath}"`),v.current&&clearTimeout(v.current),r(!0),f(null);try{let t="feature"===e.targetType?await a(e.targetId):await o(e.repositoryPath);if(u.info("server action result:",t),!y.current)return void u.warn("component unmounted after deploy — discarding result");if(t.success)u.info(`deploy succeeded — initial state=${t.state}, starting polling`),m(t.state??null),h(null),R(e.targetId);else{let e=t.error??"An unexpected error occurred";u.error(`deploy failed: ${e}`),f(e),v.current=setTimeout(()=>f(null),5e3)}}catch(t){if(!y.current)return;let e=t instanceof Error?t.message:"An unexpected error occurred";u.error(`deploy threw exception: ${e}`,t),f(e),v.current=setTimeout(()=>f(null),5e3)}finally{y.current&&r(!1)}},[e,n,R]),C=(0,t.useCallback)(async()=>{if(e&&!s){u.info(`stop() — targetId="${e.targetId}"`),d(!0);try{let t=await l(e.targetId);if(u.info("stop result:",t),!y.current)return;t.success&&(x(),m(null),h(null))}catch(e){u.warn("stop error (non-critical):",e)}finally{y.current&&d(!1)}}},[e,s,x]);return{deploy:T,stop:C,deployLoading:n,stopLoading:s,deployError:c,status:p,url:g}}e.s(["useDeployAction",()=>s],8537)},11495,e=>{"use strict";var t=e.i(20314),n=e.i(79054),r=e.i(48249),a=e.i(24042),o=e.i(64970),l=e.i(94237),i=e.i(31777);e.i(81803);var u=e.i(72714);e.i(99348);var s=e.i(17466),d=e.i(45811),c=e.i(25235),f=e.i(2828),p=e.i(8537),m=e.i(75921);let g=(0,l.cva)("",{variants:{size:{sm:"w-96",md:"w-2xl"}},defaultVariants:{size:"sm"}});function h({open:e,onClose:a,modal:o=!1,dismissOnOutsideClick:l=!1,title:u="Drawer",size:s,header:f,children:p,footer:h,className:w,"data-testid":y,deployTarget:b}){let x=(0,m.useFeatureFlags)(),R=(0,n.useRef)(null);return(0,n.useEffect)(()=>{if(!e||o)return;let t=e=>{let t=e.target;!document.body.contains(t)||R.current?.contains(t)||t.closest(l?'[role="alertdialog"], [role="dialog"], [role="menu"], [role="listbox"], [data-radix-popper-content-wrapper]':'[data-no-drawer-close], [role="alertdialog"], [role="dialog"], [role="menu"], [role="listbox"], [data-radix-popper-content-wrapper]')||a()};return document.addEventListener("click",t),()=>document.removeEventListener("click",t)},[e,o,a,l]),(0,t.jsxs)(d.Drawer,{direction:"right",modal:o,handleOnly:!0,open:e,onOpenChange:e=>{e||a()},children:[o?(0,t.jsx)(d.DrawerOverlay,{}):null,(0,t.jsxs)(d.DrawerContent,{ref:R,direction:"right",showCloseButton:!1,className:(0,i.cn)(g({size:s}),w),"data-testid":y,onInteractOutside:o?void 0:e=>e.preventDefault(),children:[(0,t.jsx)(d.DrawerTitle,{asChild:!0,children:(0,t.jsx)("span",{className:"sr-only",children:u})}),(0,t.jsx)(d.DrawerDescription,{asChild:!0,children:(0,t.jsx)("span",{className:"sr-only",children:u})}),(0,t.jsxs)("button",{type:"button","aria-label":"Close",onClick:a,className:"ring-offset-background focus:ring-ring absolute top-4 right-4 rounded-xs opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2 focus:outline-hidden","data-testid":y?`${y}-close-button`:void 0,children:[(0,t.jsx)(r.XIcon,{className:"size-4"}),(0,t.jsx)("span",{className:"sr-only",children:"Close"})]}),f?(0,t.jsx)(d.DrawerHeader,{className:"shrink-0",children:f}):null,f?(0,t.jsx)(c.Separator,{}):null,x.envDeploy&&b?(0,t.jsx)(v,{deployTarget:b}):null,(0,t.jsx)("div",{className:"flex min-h-0 flex-1 flex-col overflow-hidden",children:p}),h?(0,t.jsx)(d.DrawerFooter,{className:"shrink-0",children:h}):null]})]})}function v({deployTarget:e}){let n=(0,p.useDeployAction)(e),r="Booting"===n.status||"Ready"===n.status;return(0,t.jsxs)("div",{"data-testid":"base-drawer-deploy-bar",className:"flex items-center gap-2 px-4 pb-3",children:[(0,t.jsx)(f.TooltipProvider,{children:(0,t.jsxs)(f.Tooltip,{children:[(0,t.jsx)(f.TooltipTrigger,{asChild:!0,children:(0,t.jsx)("span",{children:(0,t.jsx)(u.ActionButton,{label:r?"Stop Dev Server":"Start Dev Server",onClick:r?n.stop:n.deploy,loading:n.deployLoading||n.stopLoading,error:!!n.deployError,icon:r?o.Square:a.Play,iconOnly:!0,variant:"outline",size:"icon-sm"})})}),(0,t.jsx)(f.TooltipContent,{children:r?"Stop Dev Server":"Start Dev Server"})]})}),r?(0,t.jsx)(s.DeploymentStatusBadge,{status:n.status,url:n.url,targetId:e.targetId}):null]})}e.s(["BaseDrawer",()=>h])}]);