@shepai/cli 1.84.0 → 1.85.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 (276) hide show
  1. package/apis/json-schema/Attachment.yaml +31 -0
  2. package/apis/json-schema/Feature.yaml +5 -0
  3. package/dist/packages/core/src/application/use-cases/features/create/create-feature.use-case.d.ts +3 -1
  4. package/dist/packages/core/src/application/use-cases/features/create/create-feature.use-case.d.ts.map +1 -1
  5. package/dist/packages/core/src/application/use-cases/features/create/create-feature.use-case.js +35 -3
  6. package/dist/packages/core/src/application/use-cases/features/create/types.d.ts +7 -1
  7. package/dist/packages/core/src/application/use-cases/features/create/types.d.ts.map +1 -1
  8. package/dist/packages/core/src/domain/generated/output.d.ts +33 -0
  9. package/dist/packages/core/src/domain/generated/output.d.ts.map +1 -1
  10. package/dist/packages/core/src/infrastructure/di/container.d.ts.map +1 -1
  11. package/dist/packages/core/src/infrastructure/di/container.js +3 -0
  12. package/dist/packages/core/src/infrastructure/persistence/sqlite/mappers/feature.mapper.d.ts +1 -0
  13. package/dist/packages/core/src/infrastructure/persistence/sqlite/mappers/feature.mapper.d.ts.map +1 -1
  14. package/dist/packages/core/src/infrastructure/persistence/sqlite/mappers/feature.mapper.js +4 -0
  15. package/dist/packages/core/src/infrastructure/persistence/sqlite/migrations.d.ts.map +1 -1
  16. package/dist/packages/core/src/infrastructure/persistence/sqlite/migrations.js +16 -0
  17. package/dist/packages/core/src/infrastructure/services/attachment-storage.service.d.ts +31 -0
  18. package/dist/packages/core/src/infrastructure/services/attachment-storage.service.d.ts.map +1 -0
  19. package/dist/packages/core/src/infrastructure/services/attachment-storage.service.js +136 -0
  20. package/dist/src/presentation/cli/commands/feat/new.command.d.ts.map +1 -1
  21. package/dist/src/presentation/cli/commands/feat/new.command.js +21 -1
  22. package/dist/src/presentation/web/app/actions/compose-user-input.d.ts +7 -0
  23. package/dist/src/presentation/web/app/actions/compose-user-input.d.ts.map +1 -0
  24. package/dist/src/presentation/web/app/actions/compose-user-input.js +7 -0
  25. package/dist/src/presentation/web/app/actions/create-feature.d.ts +1 -0
  26. package/dist/src/presentation/web/app/actions/create-feature.d.ts.map +1 -1
  27. package/dist/src/presentation/web/app/actions/create-feature.js +3 -9
  28. package/dist/src/presentation/web/app/api/attachments/preview/route.d.ts +4 -0
  29. package/dist/src/presentation/web/app/api/attachments/preview/route.d.ts.map +1 -0
  30. package/dist/src/presentation/web/app/api/attachments/preview/route.js +47 -0
  31. package/dist/src/presentation/web/app/api/attachments/upload/route.d.ts +3 -0
  32. package/dist/src/presentation/web/app/api/attachments/upload/route.d.ts.map +1 -0
  33. package/dist/src/presentation/web/app/api/attachments/upload/route.js +100 -0
  34. package/dist/src/presentation/web/components/common/attachment-card/attachment-card.d.ts +16 -0
  35. package/dist/src/presentation/web/components/common/attachment-card/attachment-card.d.ts.map +1 -0
  36. package/dist/src/presentation/web/components/common/attachment-card/attachment-card.js +53 -0
  37. package/dist/src/presentation/web/components/common/attachment-card/attachment-card.stories.d.ts +12 -0
  38. package/dist/src/presentation/web/components/common/attachment-card/attachment-card.stories.d.ts.map +1 -0
  39. package/dist/src/presentation/web/components/common/attachment-card/attachment-card.stories.js +55 -0
  40. package/dist/src/presentation/web/components/common/attachment-card/index.d.ts +3 -0
  41. package/dist/src/presentation/web/components/common/attachment-card/index.d.ts.map +1 -0
  42. package/dist/src/presentation/web/components/common/attachment-card/index.js +1 -0
  43. package/dist/src/presentation/web/components/common/attachment-chip/attachment-chip.d.ts +11 -0
  44. package/dist/src/presentation/web/components/common/attachment-chip/attachment-chip.d.ts.map +1 -0
  45. package/dist/src/presentation/web/components/common/attachment-chip/attachment-chip.js +34 -0
  46. package/dist/src/presentation/web/components/common/attachment-chip/attachment-chip.stories.d.ts +10 -0
  47. package/dist/src/presentation/web/components/common/attachment-chip/attachment-chip.stories.d.ts.map +1 -0
  48. package/dist/src/presentation/web/components/common/attachment-chip/attachment-chip.stories.js +44 -0
  49. package/dist/src/presentation/web/components/common/attachment-chip/index.d.ts +3 -0
  50. package/dist/src/presentation/web/components/common/attachment-chip/index.d.ts.map +1 -0
  51. package/dist/src/presentation/web/components/common/attachment-chip/index.js +1 -0
  52. package/dist/src/presentation/web/components/common/feature-create-drawer/feature-create-drawer.d.ts +11 -2
  53. package/dist/src/presentation/web/components/common/feature-create-drawer/feature-create-drawer.d.ts.map +1 -1
  54. package/dist/src/presentation/web/components/common/feature-create-drawer/feature-create-drawer.js +199 -60
  55. package/dist/src/presentation/web/components/common/feature-create-drawer/feature-create-drawer.stories.d.ts +6 -0
  56. package/dist/src/presentation/web/components/common/feature-create-drawer/feature-create-drawer.stories.d.ts.map +1 -1
  57. package/dist/src/presentation/web/components/common/feature-create-drawer/feature-create-drawer.stories.js +18 -0
  58. package/dist/src/presentation/web/components/ui/dialog.js +1 -1
  59. package/dist/src/presentation/web/next.config.d.ts.map +1 -1
  60. package/dist/src/presentation/web/next.config.js +6 -0
  61. package/dist/tsconfig.build.tsbuildinfo +1 -1
  62. package/package.json +1 -1
  63. package/web/.next/BUILD_ID +1 -1
  64. package/web/.next/app-path-routes-manifest.json +2 -0
  65. package/web/.next/build-manifest.json +2 -2
  66. package/web/.next/fallback-build-manifest.json +2 -2
  67. package/web/.next/prerender-manifest.json +3 -3
  68. package/web/.next/required-server-files.js +4 -1
  69. package/web/.next/required-server-files.json +4 -1
  70. package/web/.next/routes-manifest.json +12 -0
  71. package/web/.next/server/app/(dashboard)/@drawer/create/page/server-reference-manifest.json +18 -18
  72. package/web/.next/server/app/(dashboard)/@drawer/create/page.js +2 -2
  73. package/web/.next/server/app/(dashboard)/@drawer/create/page.js.nft.json +1 -1
  74. package/web/.next/server/app/(dashboard)/@drawer/create/page_client-reference-manifest.js +1 -1
  75. package/web/.next/server/app/(dashboard)/@drawer/feature/[featureId]/page/server-reference-manifest.json +21 -21
  76. package/web/.next/server/app/(dashboard)/@drawer/feature/[featureId]/page.js +2 -2
  77. package/web/.next/server/app/(dashboard)/@drawer/feature/[featureId]/page.js.nft.json +1 -1
  78. package/web/.next/server/app/(dashboard)/@drawer/feature/[featureId]/page_client-reference-manifest.js +1 -1
  79. package/web/.next/server/app/(dashboard)/@drawer/repository/[repositoryId]/page/server-reference-manifest.json +14 -14
  80. package/web/.next/server/app/(dashboard)/@drawer/repository/[repositoryId]/page.js +2 -2
  81. package/web/.next/server/app/(dashboard)/@drawer/repository/[repositoryId]/page.js.nft.json +1 -1
  82. package/web/.next/server/app/(dashboard)/@drawer/repository/[repositoryId]/page_client-reference-manifest.js +1 -1
  83. package/web/.next/server/app/(dashboard)/create/page/server-reference-manifest.json +18 -18
  84. package/web/.next/server/app/(dashboard)/create/page.js +2 -2
  85. package/web/.next/server/app/(dashboard)/create/page.js.nft.json +1 -1
  86. package/web/.next/server/app/(dashboard)/create/page_client-reference-manifest.js +1 -1
  87. package/web/.next/server/app/(dashboard)/feature/[featureId]/page/server-reference-manifest.json +21 -21
  88. package/web/.next/server/app/(dashboard)/feature/[featureId]/page.js +2 -2
  89. package/web/.next/server/app/(dashboard)/feature/[featureId]/page.js.nft.json +1 -1
  90. package/web/.next/server/app/(dashboard)/feature/[featureId]/page_client-reference-manifest.js +1 -1
  91. package/web/.next/server/app/(dashboard)/page/server-reference-manifest.json +14 -14
  92. package/web/.next/server/app/(dashboard)/page.js +2 -2
  93. package/web/.next/server/app/(dashboard)/page.js.nft.json +1 -1
  94. package/web/.next/server/app/(dashboard)/page_client-reference-manifest.js +1 -1
  95. package/web/.next/server/app/(dashboard)/repository/[repositoryId]/page/server-reference-manifest.json +14 -14
  96. package/web/.next/server/app/(dashboard)/repository/[repositoryId]/page.js +2 -2
  97. package/web/.next/server/app/(dashboard)/repository/[repositoryId]/page.js.nft.json +1 -1
  98. package/web/.next/server/app/(dashboard)/repository/[repositoryId]/page_client-reference-manifest.js +1 -1
  99. package/web/.next/server/app/_global-error/page.js +2 -2
  100. package/web/.next/server/app/_global-error/page.js.nft.json +1 -1
  101. package/web/.next/server/app/_global-error/page_client-reference-manifest.js +1 -1
  102. package/web/.next/server/app/_global-error.html +2 -2
  103. package/web/.next/server/app/_global-error.rsc +1 -1
  104. package/web/.next/server/app/_global-error.segments/__PAGE__.segment.rsc +1 -1
  105. package/web/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
  106. package/web/.next/server/app/_global-error.segments/_head.segment.rsc +1 -1
  107. package/web/.next/server/app/_global-error.segments/_index.segment.rsc +1 -1
  108. package/web/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
  109. package/web/.next/server/app/_not-found/page/server-reference-manifest.json +1 -1
  110. package/web/.next/server/app/_not-found/page.js +2 -2
  111. package/web/.next/server/app/_not-found/page.js.nft.json +1 -1
  112. package/web/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
  113. package/web/.next/server/app/api/attachments/preview/route/app-paths-manifest.json +3 -0
  114. package/web/.next/server/app/api/attachments/preview/route/build-manifest.json +11 -0
  115. package/web/.next/server/app/api/attachments/preview/route/server-reference-manifest.json +4 -0
  116. package/web/.next/server/app/api/attachments/preview/route.js +7 -0
  117. package/web/.next/server/app/api/attachments/preview/route.js.map +5 -0
  118. package/web/.next/server/app/api/attachments/preview/route.js.nft.json +1 -0
  119. package/web/.next/server/app/api/attachments/preview/route_client-reference-manifest.js +2 -0
  120. package/web/.next/server/app/api/attachments/upload/route/app-paths-manifest.json +3 -0
  121. package/web/.next/server/app/api/attachments/upload/route/build-manifest.json +11 -0
  122. package/web/.next/server/app/api/attachments/upload/route/server-reference-manifest.json +4 -0
  123. package/web/.next/server/app/api/attachments/upload/route.js +7 -0
  124. package/web/.next/server/app/api/attachments/upload/route.js.map +5 -0
  125. package/web/.next/server/app/api/attachments/upload/route.js.nft.json +1 -0
  126. package/web/.next/server/app/api/attachments/upload/route_client-reference-manifest.js +2 -0
  127. package/web/.next/server/app/api/feature-logs/route.js +1 -1
  128. package/web/.next/server/app/api/feature-logs/route.js.nft.json +1 -1
  129. package/web/.next/server/app/settings/page/server-reference-manifest.json +5 -5
  130. package/web/.next/server/app/settings/page.js +2 -2
  131. package/web/.next/server/app/settings/page.js.nft.json +1 -1
  132. package/web/.next/server/app/settings/page_client-reference-manifest.js +1 -1
  133. package/web/.next/server/app/skills/page/server-reference-manifest.json +6 -6
  134. package/web/.next/server/app/skills/page.js +2 -2
  135. package/web/.next/server/app/skills/page.js.nft.json +1 -1
  136. package/web/.next/server/app/skills/page_client-reference-manifest.js +1 -1
  137. package/web/.next/server/app/tools/page/server-reference-manifest.json +6 -6
  138. package/web/.next/server/app/tools/page.js +2 -2
  139. package/web/.next/server/app/tools/page.js.nft.json +1 -1
  140. package/web/.next/server/app/tools/page_client-reference-manifest.js +1 -1
  141. package/web/.next/server/app/version/page/server-reference-manifest.json +1 -1
  142. package/web/.next/server/app/version/page.js +2 -2
  143. package/web/.next/server/app/version/page.js.nft.json +1 -1
  144. package/web/.next/server/app/version/page_client-reference-manifest.js +1 -1
  145. package/web/.next/server/app-paths-manifest.json +2 -0
  146. package/web/.next/server/chunks/403f9_next_dist_esm_build_templates_app-route_4d623b8e.js.map +1 -1
  147. package/web/.next/server/chunks/744ca_web__next-internal_server_app_api_attachments_preview_route_actions_0f48c3e9.js +3 -0
  148. package/web/.next/server/chunks/744ca_web__next-internal_server_app_api_attachments_preview_route_actions_0f48c3e9.js.map +1 -0
  149. package/web/.next/server/chunks/744ca_web__next-internal_server_app_api_attachments_upload_route_actions_48fe4a8f.js +3 -0
  150. package/web/.next/server/chunks/744ca_web__next-internal_server_app_api_attachments_upload_route_actions_48fe4a8f.js.map +1 -0
  151. package/web/.next/server/chunks/[root-of-the-server]__0b10355c._.js +3 -0
  152. package/web/.next/server/chunks/[root-of-the-server]__0b10355c._.js.map +1 -0
  153. package/web/.next/server/chunks/{[root-of-the-server]__91d44424._.js → [root-of-the-server]__52c318d1._.js} +2 -2
  154. package/web/.next/server/chunks/[root-of-the-server]__b2f9a412._.js +3 -0
  155. package/web/.next/server/chunks/[root-of-the-server]__b2f9a412._.js.map +1 -0
  156. package/web/.next/server/chunks/ssr/744ca_web_components_common_control-center-drawer_create-drawer-client_tsx_5e26fc0a._.js +1 -1
  157. package/web/.next/server/chunks/ssr/744ca_web_components_common_control-center-drawer_create-drawer-client_tsx_5e26fc0a._.js.map +1 -1
  158. package/web/.next/server/chunks/ssr/7f428_lucide-react_dist_esm_icons_9751e686._.js +3 -0
  159. package/web/.next/server/chunks/ssr/7f428_lucide-react_dist_esm_icons_9751e686._.js.map +1 -0
  160. package/web/.next/server/chunks/ssr/8ba4b_server_app_(dashboard)_@drawer_repository_[repositoryId]_page_actions_da7eef33.js +1 -1
  161. package/web/.next/server/chunks/ssr/8ba4b_server_app_(dashboard)_@drawer_repository_[repositoryId]_page_actions_da7eef33.js.map +1 -1
  162. package/web/.next/server/chunks/ssr/8ba4b_server_app_(dashboard)_repository_[repositoryId]_page_actions_0a9251aa.js +1 -1
  163. package/web/.next/server/chunks/ssr/8ba4b_server_app_(dashboard)_repository_[repositoryId]_page_actions_0a9251aa.js.map +1 -1
  164. package/web/.next/server/chunks/ssr/[root-of-the-server]__11033878._.js +1 -1
  165. package/web/.next/server/chunks/ssr/[root-of-the-server]__11033878._.js.map +1 -1
  166. package/web/.next/server/chunks/ssr/[root-of-the-server]__17143953._.js +1 -1
  167. package/web/.next/server/chunks/ssr/[root-of-the-server]__17143953._.js.map +1 -1
  168. package/web/.next/server/chunks/ssr/[root-of-the-server]__357d99f9._.js +1 -1
  169. package/web/.next/server/chunks/ssr/[root-of-the-server]__4be9a9bb._.js +1 -1
  170. package/web/.next/server/chunks/ssr/[root-of-the-server]__5d87af2e._.js +1 -1
  171. package/web/.next/server/chunks/ssr/{[root-of-the-server]__3534949f._.js → [root-of-the-server]__8d9536c4._.js} +2 -2
  172. package/web/.next/server/chunks/ssr/[root-of-the-server]__9de266fa._.js +1 -1
  173. package/web/.next/server/chunks/ssr/[root-of-the-server]__9de266fa._.js.map +1 -1
  174. package/web/.next/server/chunks/ssr/[root-of-the-server]__aad040c0._.js +1 -1
  175. package/web/.next/server/chunks/ssr/[root-of-the-server]__aad040c0._.js.map +1 -1
  176. package/web/.next/server/chunks/ssr/[root-of-the-server]__b14946f5._.js +10 -0
  177. package/web/.next/server/chunks/ssr/{[root-of-the-server]__c3694f82._.js.map → [root-of-the-server]__b14946f5._.js.map} +1 -1
  178. package/web/.next/server/chunks/ssr/[root-of-the-server]__b3a4cef4._.js +1 -1
  179. package/web/.next/server/chunks/ssr/[root-of-the-server]__b3a4cef4._.js.map +1 -1
  180. package/web/.next/server/chunks/ssr/[root-of-the-server]__b65f78cf._.js +3 -0
  181. package/web/.next/server/chunks/ssr/{[root-of-the-server]__55f60c9d._.js.map → [root-of-the-server]__b65f78cf._.js.map} +1 -1
  182. package/web/.next/server/chunks/ssr/[root-of-the-server]__f0d8d054._.js +2 -2
  183. package/web/.next/server/chunks/ssr/[root-of-the-server]__f0d8d054._.js.map +1 -1
  184. package/web/.next/server/chunks/ssr/{[root-of-the-server]__ad2b2a3c._.js → [root-of-the-server]__f1a05100._.js} +2 -2
  185. package/web/.next/server/chunks/ssr/[root-of-the-server]__f8210f45._.js +3 -0
  186. package/web/.next/server/chunks/ssr/{[root-of-the-server]__01a37f7a._.js.map → [root-of-the-server]__f8210f45._.js.map} +1 -1
  187. package/web/.next/server/chunks/ssr/[root-of-the-server]__fdc75809._.js +1 -1
  188. package/web/.next/server/chunks/ssr/[root-of-the-server]__fdc75809._.js.map +1 -1
  189. package/web/.next/server/chunks/ssr/_1bb131c4._.js +1 -1
  190. package/web/.next/server/chunks/ssr/_1bb131c4._.js.map +1 -1
  191. package/web/.next/server/chunks/ssr/_1e3cf73b._.js +1 -1
  192. package/web/.next/server/chunks/ssr/_1e3cf73b._.js.map +1 -1
  193. package/web/.next/server/chunks/ssr/_34fbed18._.js +1 -1
  194. package/web/.next/server/chunks/ssr/_34fbed18._.js.map +1 -1
  195. package/web/.next/server/chunks/ssr/_63868199._.js +1 -1
  196. package/web/.next/server/chunks/ssr/_63868199._.js.map +1 -1
  197. package/web/.next/server/chunks/ssr/{_3785d5be._.js → _6bffa94a._.js} +2 -2
  198. package/web/.next/server/chunks/ssr/_6bffa94a._.js.map +1 -0
  199. package/web/.next/server/chunks/ssr/_6e08ce21._.js.map +1 -1
  200. package/web/.next/server/chunks/ssr/_8dacd1e7._.js +1 -1
  201. package/web/.next/server/chunks/ssr/_8dacd1e7._.js.map +1 -1
  202. package/web/.next/server/chunks/ssr/_9ac70f88._.js +5 -0
  203. package/web/.next/server/chunks/ssr/_9ac70f88._.js.map +1 -0
  204. package/web/.next/server/chunks/ssr/{_3e88ce9d._.js → _cf366ac8._.js} +2 -2
  205. package/web/.next/server/chunks/ssr/{_3e88ce9d._.js.map → _cf366ac8._.js.map} +1 -1
  206. package/web/.next/server/chunks/ssr/_d42594dd._.js +3 -0
  207. package/web/.next/server/chunks/ssr/_d42594dd._.js.map +1 -0
  208. package/web/.next/server/chunks/ssr/b1a17_presentation_web_components_features_settings_settings-page-client_tsx_6ed9d5f8._.js +1 -1
  209. package/web/.next/server/chunks/ssr/b1a17_presentation_web_components_features_settings_settings-page-client_tsx_6ed9d5f8._.js.map +1 -1
  210. package/web/.next/server/chunks/ssr/node_modules__pnpm_07f6911c._.js +3 -0
  211. package/web/.next/server/chunks/ssr/node_modules__pnpm_07f6911c._.js.map +1 -0
  212. package/web/.next/server/chunks/ssr/src_presentation_web__next-internal_server_app_(dashboard)_page_actions_021a05f2.js +1 -1
  213. package/web/.next/server/chunks/ssr/src_presentation_web__next-internal_server_app_(dashboard)_page_actions_021a05f2.js.map +1 -1
  214. package/web/.next/server/chunks/ssr/src_presentation_web__next-internal_server_app_skills_page_actions_1fa8042e.js +1 -1
  215. package/web/.next/server/chunks/ssr/src_presentation_web__next-internal_server_app_skills_page_actions_1fa8042e.js.map +1 -1
  216. package/web/.next/server/chunks/ssr/src_presentation_web__next-internal_server_app_tools_page_actions_24684200.js +1 -1
  217. package/web/.next/server/chunks/ssr/src_presentation_web__next-internal_server_app_tools_page_actions_24684200.js.map +1 -1
  218. package/web/.next/server/chunks/ssr/src_presentation_web_c4348b8a._.js +2 -3
  219. package/web/.next/server/chunks/ssr/src_presentation_web_c4348b8a._.js.map +1 -1
  220. package/web/.next/server/chunks/ssr/src_presentation_web_components_80b5b4bc._.js +3 -0
  221. package/web/.next/server/chunks/ssr/src_presentation_web_components_80b5b4bc._.js.map +1 -0
  222. package/web/.next/server/chunks/ssr/src_presentation_web_components_82416b8f._.js +3 -0
  223. package/web/.next/server/chunks/ssr/src_presentation_web_components_82416b8f._.js.map +1 -0
  224. package/web/.next/server/chunks/ssr/src_presentation_web_components_features_control-center_7ac3562e._.js +1 -1
  225. package/web/.next/server/chunks/ssr/src_presentation_web_components_features_control-center_7ac3562e._.js.map +1 -1
  226. package/web/.next/server/chunks/ssr/src_presentation_web_components_features_tools_tools-page-client_tsx_3d0aa70c._.js +1 -1
  227. package/web/.next/server/chunks/ssr/src_presentation_web_components_features_tools_tools-page-client_tsx_3d0aa70c._.js.map +1 -1
  228. package/web/.next/server/chunks/ssr/src_presentation_web_e4510d10._.js +2 -3
  229. package/web/.next/server/chunks/ssr/src_presentation_web_e4510d10._.js.map +1 -1
  230. package/web/.next/server/pages/500.html +2 -2
  231. package/web/.next/server/server-reference-manifest.js +1 -1
  232. package/web/.next/server/server-reference-manifest.json +28 -28
  233. package/web/.next/static/chunks/{4de791d92c72ae58.js → 26f58bbf4766e1c4.js} +1 -1
  234. package/web/.next/static/chunks/30c827a88342741e.js +1 -0
  235. package/web/.next/static/chunks/{d00436ccde44862f.js → 31c1e96c4cfeb16b.js} +2 -2
  236. package/web/.next/static/chunks/50f89c3112f6dd23.css +2 -0
  237. package/web/.next/static/chunks/52b56677c842e45f.js +3 -0
  238. package/web/.next/static/chunks/{48060fe38d7b8432.js → 5b707c839eafb404.js} +3 -3
  239. package/web/.next/static/chunks/79f610312f57dc66.js +1 -0
  240. package/web/.next/static/chunks/8fa4bf83842a3389.js +1 -0
  241. package/web/.next/static/chunks/{0fb7745c30469b39.js → b31f2c82654437a6.js} +1 -1
  242. package/web/.next/static/chunks/c9333b53106c0ca9.js +1 -0
  243. package/web/.next/static/chunks/ce7a578a83924232.js +1 -0
  244. package/web/.next/static/chunks/{de2515446676e0ae.js → d8e93250744112df.js} +1 -1
  245. package/web/.next/static/chunks/da7d7608abd1032f.js +1 -0
  246. package/web/.next/static/chunks/{6b4620c8b57a0683.js → df38705b7992b33f.js} +1 -1
  247. package/web/.next/server/chunks/ssr/7f428_lucide-react_dist_esm_icons_c7cfe351._.js +0 -3
  248. package/web/.next/server/chunks/ssr/7f428_lucide-react_dist_esm_icons_c7cfe351._.js.map +0 -1
  249. package/web/.next/server/chunks/ssr/[root-of-the-server]__01a37f7a._.js +0 -3
  250. package/web/.next/server/chunks/ssr/[root-of-the-server]__55f60c9d._.js +0 -3
  251. package/web/.next/server/chunks/ssr/[root-of-the-server]__c3694f82._.js +0 -10
  252. package/web/.next/server/chunks/ssr/_0387eb83._.js +0 -3
  253. package/web/.next/server/chunks/ssr/_0387eb83._.js.map +0 -1
  254. package/web/.next/server/chunks/ssr/_3785d5be._.js.map +0 -1
  255. package/web/.next/server/chunks/ssr/_67dd9041._.js +0 -3
  256. package/web/.next/server/chunks/ssr/_67dd9041._.js.map +0 -1
  257. package/web/.next/server/chunks/ssr/_c3a8bcb1._.js +0 -3
  258. package/web/.next/server/chunks/ssr/_c3a8bcb1._.js.map +0 -1
  259. package/web/.next/server/chunks/ssr/node_modules__pnpm_04f4e45f._.js +0 -5
  260. package/web/.next/server/chunks/ssr/node_modules__pnpm_04f4e45f._.js.map +0 -1
  261. package/web/.next/server/chunks/ssr/node_modules__pnpm_c931457d._.js +0 -3
  262. package/web/.next/server/chunks/ssr/node_modules__pnpm_c931457d._.js.map +0 -1
  263. package/web/.next/static/chunks/2a24ac257fc1c10b.js +0 -1
  264. package/web/.next/static/chunks/6d0190cd8484320c.js +0 -1
  265. package/web/.next/static/chunks/6f0622cb06faf358.js +0 -1
  266. package/web/.next/static/chunks/7e92542991a14568.js +0 -1
  267. package/web/.next/static/chunks/a56b3854d2169db0.js +0 -1
  268. package/web/.next/static/chunks/ae01d2be1d0bad47.css +0 -2
  269. package/web/.next/static/chunks/df0b93fbb9b512e6.js +0 -1
  270. package/web/.next/static/chunks/e405f0502431ea60.js +0 -3
  271. /package/web/.next/server/chunks/{[root-of-the-server]__91d44424._.js.map → [root-of-the-server]__52c318d1._.js.map} +0 -0
  272. /package/web/.next/server/chunks/ssr/{[root-of-the-server]__3534949f._.js.map → [root-of-the-server]__8d9536c4._.js.map} +0 -0
  273. /package/web/.next/server/chunks/ssr/{[root-of-the-server]__ad2b2a3c._.js.map → [root-of-the-server]__f1a05100._.js.map} +0 -0
  274. /package/web/.next/static/{7IllAyl6ItP_HYk-RfUYQ → Lf0zFNsMS4qCNRm_LSgya}/_buildManifest.js +0 -0
  275. /package/web/.next/static/{7IllAyl6ItP_HYk-RfUYQ → Lf0zFNsMS4qCNRm_LSgya}/_clientMiddlewareManifest.json +0 -0
  276. /package/web/.next/static/{7IllAyl6ItP_HYk-RfUYQ → Lf0zFNsMS4qCNRm_LSgya}/_ssgManifest.js +0 -0
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../../../../../../node_modules/.pnpm/%40radix-ui%2Breact-collection%401.1.7_%40types%2Breact-dom%4019.2.3_%40types%2Breact%4019.2.10__%40types%2Br_2988d950cbd44144aec5e6ce60804441/node_modules/%40radix-ui/react-collection/src/collection-legacy.tsx","../../../../../../../node_modules/.pnpm/%40radix-ui%2Breact-collection%401.1.7_%40types%2Breact-dom%4019.2.3_%40types%2Breact%4019.2.10__%40types%2Br_2988d950cbd44144aec5e6ce60804441/node_modules/%40radix-ui/react-collection/src/collection.tsx","../../../../../../../node_modules/.pnpm/%40radix-ui%2Breact-collection%401.1.7_%40types%2Breact-dom%4019.2.3_%40types%2Breact%4019.2.10__%40types%2Br_2988d950cbd44144aec5e6ce60804441/node_modules/%40radix-ui/react-collection/src/ordered-dictionary.ts","../../../../../../../node_modules/.pnpm/lucide-react%400.563.0_react%4019.2.4/node_modules/lucide-react/src/icons/git-branch.ts","../../../../../../../node_modules/.pnpm/lucide-react%400.563.0_react%4019.2.4/node_modules/lucide-react/src/icons/rocket.ts"],"sourcesContent":["import React from 'react';\nimport { createContextScope } from '@radix-ui/react-context';\nimport { useComposedRefs } from '@radix-ui/react-compose-refs';\nimport { createSlot, type Slot } from '@radix-ui/react-slot';\n\ntype SlotProps = React.ComponentPropsWithoutRef<typeof Slot>;\ntype CollectionElement = HTMLElement;\ninterface CollectionProps extends SlotProps {\n scope: any;\n}\n\n// We have resorted to returning slots directly rather than exposing primitives that can then\n// be slotted like `<CollectionItem as={Slot}>\u2026</CollectionItem>`.\n// This is because we encountered issues with generic types that cannot be statically analysed\n// due to creating them dynamically via createCollection.\n\nfunction createCollection<ItemElement extends HTMLElement, ItemData = {}>(name: string) {\n /* -----------------------------------------------------------------------------------------------\n * CollectionProvider\n * ---------------------------------------------------------------------------------------------*/\n\n const PROVIDER_NAME = name + 'CollectionProvider';\n const [createCollectionContext, createCollectionScope] = createContextScope(PROVIDER_NAME);\n\n type ContextValue = {\n collectionRef: React.RefObject<CollectionElement | null>;\n itemMap: Map<\n React.RefObject<ItemElement | null>,\n { ref: React.RefObject<ItemElement | null> } & ItemData\n >;\n };\n\n const [CollectionProviderImpl, useCollectionContext] = createCollectionContext<ContextValue>(\n PROVIDER_NAME,\n { collectionRef: { current: null }, itemMap: new Map() }\n );\n\n const CollectionProvider: React.FC<{ children?: React.ReactNode; scope: any }> = (props) => {\n const { scope, children } = props;\n const ref = React.useRef<CollectionElement>(null);\n const itemMap = React.useRef<ContextValue['itemMap']>(new Map()).current;\n return (\n <CollectionProviderImpl scope={scope} itemMap={itemMap} collectionRef={ref}>\n {children}\n </CollectionProviderImpl>\n );\n };\n\n CollectionProvider.displayName = PROVIDER_NAME;\n\n /* -----------------------------------------------------------------------------------------------\n * CollectionSlot\n * ---------------------------------------------------------------------------------------------*/\n\n const COLLECTION_SLOT_NAME = name + 'CollectionSlot';\n\n const CollectionSlotImpl = createSlot(COLLECTION_SLOT_NAME);\n const CollectionSlot = React.forwardRef<CollectionElement, CollectionProps>(\n (props, forwardedRef) => {\n const { scope, children } = props;\n const context = useCollectionContext(COLLECTION_SLOT_NAME, scope);\n const composedRefs = useComposedRefs(forwardedRef, context.collectionRef);\n return <CollectionSlotImpl ref={composedRefs}>{children}</CollectionSlotImpl>;\n }\n );\n\n CollectionSlot.displayName = COLLECTION_SLOT_NAME;\n\n /* -----------------------------------------------------------------------------------------------\n * CollectionItem\n * ---------------------------------------------------------------------------------------------*/\n\n const ITEM_SLOT_NAME = name + 'CollectionItemSlot';\n const ITEM_DATA_ATTR = 'data-radix-collection-item';\n\n type CollectionItemSlotProps = ItemData & {\n children: React.ReactNode;\n scope: any;\n };\n\n const CollectionItemSlotImpl = createSlot(ITEM_SLOT_NAME);\n const CollectionItemSlot = React.forwardRef<ItemElement, CollectionItemSlotProps>(\n (props, forwardedRef) => {\n const { scope, children, ...itemData } = props;\n const ref = React.useRef<ItemElement>(null);\n const composedRefs = useComposedRefs(forwardedRef, ref);\n const context = useCollectionContext(ITEM_SLOT_NAME, scope);\n\n React.useEffect(() => {\n context.itemMap.set(ref, { ref, ...(itemData as unknown as ItemData) });\n return () => void context.itemMap.delete(ref);\n });\n\n return (\n <CollectionItemSlotImpl {...{ [ITEM_DATA_ATTR]: '' }} ref={composedRefs}>\n {children}\n </CollectionItemSlotImpl>\n );\n }\n );\n\n CollectionItemSlot.displayName = ITEM_SLOT_NAME;\n\n /* -----------------------------------------------------------------------------------------------\n * useCollection\n * ---------------------------------------------------------------------------------------------*/\n\n function useCollection(scope: any) {\n const context = useCollectionContext(name + 'CollectionConsumer', scope);\n\n const getItems = React.useCallback(() => {\n const collectionNode = context.collectionRef.current;\n if (!collectionNode) return [];\n const orderedNodes = Array.from(collectionNode.querySelectorAll(`[${ITEM_DATA_ATTR}]`));\n const items = Array.from(context.itemMap.values());\n const orderedItems = items.sort(\n (a, b) => orderedNodes.indexOf(a.ref.current!) - orderedNodes.indexOf(b.ref.current!)\n );\n return orderedItems;\n }, [context.collectionRef, context.itemMap]);\n\n return getItems;\n }\n\n return [\n { Provider: CollectionProvider, Slot: CollectionSlot, ItemSlot: CollectionItemSlot },\n useCollection,\n createCollectionScope,\n ] as const;\n}\n\nexport { createCollection };\nexport type { CollectionProps };\n","import React from 'react';\nimport { createContextScope } from '@radix-ui/react-context';\nimport { useComposedRefs } from '@radix-ui/react-compose-refs';\nimport { createSlot, type Slot } from '@radix-ui/react-slot';\nimport type { EntryOf } from './ordered-dictionary';\nimport { OrderedDict } from './ordered-dictionary';\n\ntype SlotProps = React.ComponentPropsWithoutRef<typeof Slot>;\ntype CollectionElement = HTMLElement;\ninterface CollectionProps extends SlotProps {\n scope: any;\n}\n\ninterface BaseItemData {\n id?: string;\n}\n\ntype ItemDataWithElement<\n ItemData extends BaseItemData,\n ItemElement extends HTMLElement,\n> = ItemData & {\n element: ItemElement;\n};\n\ntype ItemMap<ItemElement extends HTMLElement, ItemData extends BaseItemData> = OrderedDict<\n ItemElement,\n ItemDataWithElement<ItemData, ItemElement>\n>;\n\nfunction createCollection<\n ItemElement extends HTMLElement,\n ItemData extends BaseItemData = BaseItemData,\n>(name: string) {\n /* -----------------------------------------------------------------------------------------------\n * CollectionProvider\n * ---------------------------------------------------------------------------------------------*/\n\n const PROVIDER_NAME = name + 'CollectionProvider';\n const [createCollectionContext, createCollectionScope] = createContextScope(PROVIDER_NAME);\n\n type ContextValue = {\n collectionElement: CollectionElement | null;\n collectionRef: React.Ref<CollectionElement | null>;\n collectionRefObject: React.RefObject<CollectionElement | null>;\n itemMap: ItemMap<ItemElement, ItemData>;\n setItemMap: React.Dispatch<React.SetStateAction<ItemMap<ItemElement, ItemData>>>;\n };\n\n const [CollectionContextProvider, useCollectionContext] = createCollectionContext<ContextValue>(\n PROVIDER_NAME,\n {\n collectionElement: null,\n collectionRef: { current: null },\n collectionRefObject: { current: null },\n itemMap: new OrderedDict(),\n setItemMap: () => void 0,\n }\n );\n\n type CollectionState = [\n ItemMap: ItemMap<ItemElement, ItemData>,\n SetItemMap: React.Dispatch<React.SetStateAction<ItemMap<ItemElement, ItemData>>>,\n ];\n\n const CollectionProvider: React.FC<{\n children?: React.ReactNode;\n scope: any;\n state?: CollectionState;\n }> = ({ state, ...props }) => {\n return state ? (\n <CollectionProviderImpl {...props} state={state} />\n ) : (\n <CollectionInit {...props} />\n );\n };\n CollectionProvider.displayName = PROVIDER_NAME;\n\n const CollectionInit: React.FC<{\n children?: React.ReactNode;\n scope: any;\n }> = (props) => {\n const state = useInitCollection();\n return <CollectionProviderImpl {...props} state={state} />;\n };\n CollectionInit.displayName = PROVIDER_NAME + 'Init';\n\n const CollectionProviderImpl: React.FC<{\n children?: React.ReactNode;\n scope: any;\n state: CollectionState;\n }> = (props) => {\n const { scope, children, state } = props;\n const ref = React.useRef<CollectionElement>(null);\n const [collectionElement, setCollectionElement] = React.useState<CollectionElement | null>(\n null\n );\n const composeRefs = useComposedRefs(ref, setCollectionElement);\n const [itemMap, setItemMap] = state;\n\n React.useEffect(() => {\n if (!collectionElement) return;\n\n const observer = getChildListObserver(() => {\n // setItemMap((map) => {\n // const copy = new OrderedDict(map).toSorted(([, a], [, b]) =>\n // !a.element || !b.element ? 0 : isElementPreceding(a.element, b.element) ? -1 : 1\n // );\n // // check if the order has changed\n // let index = -1;\n // for (const entry of copy) {\n // index++;\n // const key = map.keyAt(index)!;\n // const [copyKey] = entry;\n // if (key !== copyKey) {\n // // order has changed!\n // return copy;\n // }\n // }\n // return map;\n // });\n });\n observer.observe(collectionElement, {\n childList: true,\n subtree: true,\n });\n return () => {\n observer.disconnect();\n };\n }, [collectionElement]);\n\n return (\n <CollectionContextProvider\n scope={scope}\n itemMap={itemMap}\n setItemMap={setItemMap}\n collectionRef={composeRefs}\n collectionRefObject={ref}\n collectionElement={collectionElement}\n >\n {children}\n </CollectionContextProvider>\n );\n };\n\n CollectionProviderImpl.displayName = PROVIDER_NAME + 'Impl';\n\n /* -----------------------------------------------------------------------------------------------\n * CollectionSlot\n * ---------------------------------------------------------------------------------------------*/\n\n const COLLECTION_SLOT_NAME = name + 'CollectionSlot';\n\n const CollectionSlotImpl = createSlot(COLLECTION_SLOT_NAME);\n const CollectionSlot = React.forwardRef<CollectionElement, CollectionProps>(\n (props, forwardedRef) => {\n const { scope, children } = props;\n const context = useCollectionContext(COLLECTION_SLOT_NAME, scope);\n const composedRefs = useComposedRefs(forwardedRef, context.collectionRef);\n return <CollectionSlotImpl ref={composedRefs}>{children}</CollectionSlotImpl>;\n }\n );\n\n CollectionSlot.displayName = COLLECTION_SLOT_NAME;\n\n /* -----------------------------------------------------------------------------------------------\n * CollectionItem\n * ---------------------------------------------------------------------------------------------*/\n\n const ITEM_SLOT_NAME = name + 'CollectionItemSlot';\n const ITEM_DATA_ATTR = 'data-radix-collection-item';\n\n type CollectionItemSlotProps = ItemData & {\n children: React.ReactNode;\n scope: any;\n };\n\n const CollectionItemSlotImpl = createSlot(ITEM_SLOT_NAME);\n const CollectionItemSlot = React.forwardRef<ItemElement, CollectionItemSlotProps>(\n (props, forwardedRef) => {\n const { scope, children, ...itemData } = props;\n const ref = React.useRef<ItemElement>(null);\n const [element, setElement] = React.useState<ItemElement | null>(null);\n const composedRefs = useComposedRefs(forwardedRef, ref, setElement);\n const context = useCollectionContext(ITEM_SLOT_NAME, scope);\n\n const { setItemMap } = context;\n\n const itemDataRef = React.useRef(itemData);\n if (!shallowEqual(itemDataRef.current, itemData)) {\n itemDataRef.current = itemData;\n }\n const memoizedItemData = itemDataRef.current;\n\n React.useEffect(() => {\n const itemData = memoizedItemData;\n setItemMap((map) => {\n if (!element) {\n return map;\n }\n\n if (!map.has(element)) {\n map.set(element, { ...(itemData as unknown as ItemData), element });\n return map.toSorted(sortByDocumentPosition);\n }\n\n return map\n .set(element, { ...(itemData as unknown as ItemData), element })\n .toSorted(sortByDocumentPosition);\n });\n\n return () => {\n setItemMap((map) => {\n if (!element || !map.has(element)) {\n return map;\n }\n map.delete(element);\n return new OrderedDict(map);\n });\n };\n }, [element, memoizedItemData, setItemMap]);\n\n return (\n <CollectionItemSlotImpl {...{ [ITEM_DATA_ATTR]: '' }} ref={composedRefs as any}>\n {children}\n </CollectionItemSlotImpl>\n );\n }\n );\n\n CollectionItemSlot.displayName = ITEM_SLOT_NAME;\n\n /* -----------------------------------------------------------------------------------------------\n * useInitCollection\n * ---------------------------------------------------------------------------------------------*/\n\n function useInitCollection() {\n return React.useState<ItemMap<ItemElement, ItemData>>(new OrderedDict());\n }\n\n /* -----------------------------------------------------------------------------------------------\n * useCollection\n * ---------------------------------------------------------------------------------------------*/\n\n function useCollection(scope: any) {\n const { itemMap } = useCollectionContext(name + 'CollectionConsumer', scope);\n\n return itemMap;\n }\n\n const functions = {\n createCollectionScope,\n useCollection,\n useInitCollection,\n };\n\n return [\n { Provider: CollectionProvider, Slot: CollectionSlot, ItemSlot: CollectionItemSlot },\n functions,\n ] as const;\n}\n\nexport { createCollection };\nexport type { CollectionProps };\n\nfunction shallowEqual(a: any, b: any) {\n if (a === b) return true;\n if (typeof a !== 'object' || typeof b !== 'object') return false;\n if (a == null || b == null) return false;\n const keysA = Object.keys(a);\n const keysB = Object.keys(b);\n if (keysA.length !== keysB.length) return false;\n for (const key of keysA) {\n if (!Object.prototype.hasOwnProperty.call(b, key)) return false;\n if (a[key] !== b[key]) return false;\n }\n return true;\n}\n\nfunction isElementPreceding(a: Element, b: Element) {\n return !!(b.compareDocumentPosition(a) & Node.DOCUMENT_POSITION_PRECEDING);\n}\n\nfunction sortByDocumentPosition<E extends HTMLElement, T extends BaseItemData>(\n a: EntryOf<ItemMap<E, T>>,\n b: EntryOf<ItemMap<E, T>>\n) {\n return !a[1].element || !b[1].element\n ? 0\n : isElementPreceding(a[1].element, b[1].element)\n ? -1\n : 1;\n}\n\nfunction getChildListObserver(callback: () => void) {\n const observer = new MutationObserver((mutationsList) => {\n for (const mutation of mutationsList) {\n if (mutation.type === 'childList') {\n callback();\n return;\n }\n }\n });\n\n return observer;\n}\n","// Not a real member because it shouldn't be accessible, but the super class\n// calls `set` which needs to read the instanciation state, so it can't be a\n// private member.\nconst __instanciated = new WeakMap<OrderedDict<any, any>, boolean>();\nexport class OrderedDict<K, V> extends Map<K, V> {\n #keys: K[];\n\n constructor(iterable?: Iterable<readonly [K, V]> | null | undefined);\n constructor(entries?: readonly (readonly [K, V])[] | null) {\n super(entries);\n this.#keys = [...super.keys()];\n __instanciated.set(this, true);\n }\n\n set(key: K, value: V) {\n if (__instanciated.get(this)) {\n if (this.has(key)) {\n this.#keys[this.#keys.indexOf(key)] = key;\n } else {\n this.#keys.push(key);\n }\n }\n super.set(key, value);\n return this;\n }\n\n insert(index: number, key: K, value: V) {\n const has = this.has(key);\n const length = this.#keys.length;\n const relativeIndex = toSafeInteger(index);\n let actualIndex = relativeIndex >= 0 ? relativeIndex : length + relativeIndex;\n const safeIndex = actualIndex < 0 || actualIndex >= length ? -1 : actualIndex;\n\n if (safeIndex === this.size || (has && safeIndex === this.size - 1) || safeIndex === -1) {\n this.set(key, value);\n return this;\n }\n\n const size = this.size + (has ? 0 : 1);\n\n // If you insert at, say, -2, without this bit you'd replace the\n // second-to-last item and push the rest up one, which means the new item is\n // 3rd to last. This isn't very intuitive; inserting at -2 is more like\n // saying \"make this item the second to last\".\n if (relativeIndex < 0) {\n actualIndex++;\n }\n\n const keys = [...this.#keys];\n let nextValue: V | undefined;\n let shouldSkip = false;\n for (let i = actualIndex; i < size; i++) {\n if (actualIndex === i) {\n let nextKey = keys[i]!;\n if (keys[i] === key) {\n nextKey = keys[i + 1]!;\n }\n if (has) {\n // delete first to ensure that the item is moved to the end\n this.delete(key);\n }\n nextValue = this.get(nextKey);\n this.set(key, value);\n } else {\n if (!shouldSkip && keys[i - 1] === key) {\n shouldSkip = true;\n }\n const currentKey = keys[shouldSkip ? i : i - 1]!;\n const currentValue = nextValue!;\n nextValue = this.get(currentKey);\n this.delete(currentKey);\n this.set(currentKey, currentValue);\n }\n }\n return this;\n }\n\n with(index: number, key: K, value: V) {\n const copy = new OrderedDict(this);\n copy.insert(index, key, value);\n return copy;\n }\n\n before(key: K) {\n const index = this.#keys.indexOf(key) - 1;\n if (index < 0) {\n return undefined;\n }\n return this.entryAt(index);\n }\n\n /**\n * Sets a new key-value pair at the position before the given key.\n */\n setBefore(key: K, newKey: K, value: V) {\n const index = this.#keys.indexOf(key);\n if (index === -1) {\n return this;\n }\n return this.insert(index, newKey, value);\n }\n\n after(key: K) {\n let index = this.#keys.indexOf(key);\n index = index === -1 || index === this.size - 1 ? -1 : index + 1;\n if (index === -1) {\n return undefined;\n }\n return this.entryAt(index);\n }\n\n /**\n * Sets a new key-value pair at the position after the given key.\n */\n setAfter(key: K, newKey: K, value: V) {\n const index = this.#keys.indexOf(key);\n if (index === -1) {\n return this;\n }\n return this.insert(index + 1, newKey, value);\n }\n\n first() {\n return this.entryAt(0);\n }\n\n last() {\n return this.entryAt(-1);\n }\n\n clear() {\n this.#keys = [];\n return super.clear();\n }\n\n delete(key: K) {\n const deleted = super.delete(key);\n if (deleted) {\n this.#keys.splice(this.#keys.indexOf(key), 1);\n }\n return deleted;\n }\n\n deleteAt(index: number) {\n const key = this.keyAt(index);\n if (key !== undefined) {\n return this.delete(key);\n }\n return false;\n }\n\n at(index: number) {\n const key = at(this.#keys, index);\n if (key !== undefined) {\n return this.get(key);\n }\n }\n\n entryAt(index: number): [K, V] | undefined {\n const key = at(this.#keys, index);\n if (key !== undefined) {\n return [key, this.get(key)!];\n }\n }\n\n indexOf(key: K) {\n return this.#keys.indexOf(key);\n }\n\n keyAt(index: number) {\n return at(this.#keys, index);\n }\n\n from(key: K, offset: number) {\n const index = this.indexOf(key);\n if (index === -1) {\n return undefined;\n }\n let dest = index + offset;\n if (dest < 0) dest = 0;\n if (dest >= this.size) dest = this.size - 1;\n return this.at(dest);\n }\n\n keyFrom(key: K, offset: number) {\n const index = this.indexOf(key);\n if (index === -1) {\n return undefined;\n }\n let dest = index + offset;\n if (dest < 0) dest = 0;\n if (dest >= this.size) dest = this.size - 1;\n return this.keyAt(dest);\n }\n\n find(\n predicate: (entry: [K, V], index: number, dictionary: OrderedDict<K, V>) => boolean,\n thisArg?: any\n ) {\n let index = 0;\n for (const entry of this) {\n if (Reflect.apply(predicate, thisArg, [entry, index, this])) {\n return entry;\n }\n index++;\n }\n return undefined;\n }\n\n findIndex(\n predicate: (entry: [K, V], index: number, dictionary: OrderedDict<K, V>) => boolean,\n thisArg?: any\n ) {\n let index = 0;\n for (const entry of this) {\n if (Reflect.apply(predicate, thisArg, [entry, index, this])) {\n return index;\n }\n index++;\n }\n return -1;\n }\n\n filter<KK extends K, VV extends V>(\n predicate: (entry: [K, V], index: number, dict: OrderedDict<K, V>) => entry is [KK, VV],\n thisArg?: any\n ): OrderedDict<KK, VV>;\n\n filter(\n predicate: (entry: [K, V], index: number, dictionary: OrderedDict<K, V>) => unknown,\n thisArg?: any\n ): OrderedDict<K, V>;\n\n filter(\n predicate: (entry: [K, V], index: number, dictionary: OrderedDict<K, V>) => unknown,\n thisArg?: any\n ) {\n const entries: Array<[K, V]> = [];\n let index = 0;\n for (const entry of this) {\n if (Reflect.apply(predicate, thisArg, [entry, index, this])) {\n entries.push(entry);\n }\n index++;\n }\n return new OrderedDict(entries);\n }\n\n map<U>(\n callbackfn: (entry: [K, V], index: number, dictionary: OrderedDict<K, V>) => U,\n thisArg?: any\n ): OrderedDict<K, U> {\n const entries: [K, U][] = [];\n let index = 0;\n for (const entry of this) {\n entries.push([entry[0], Reflect.apply(callbackfn, thisArg, [entry, index, this])]);\n index++;\n }\n return new OrderedDict(entries);\n }\n\n reduce(\n callbackfn: (\n previousValue: [K, V],\n currentEntry: [K, V],\n currentIndex: number,\n dictionary: OrderedDict<K, V>\n ) => [K, V]\n ): [K, V];\n reduce(\n callbackfn: (\n previousValue: [K, V],\n currentEntry: [K, V],\n currentIndex: number,\n dictionary: OrderedDict<K, V>\n ) => [K, V],\n initialValue: [K, V]\n ): [K, V];\n reduce<U>(\n callbackfn: (\n previousValue: U,\n currentEntry: [K, V],\n currentIndex: number,\n dictionary: OrderedDict<K, V>\n ) => U,\n initialValue: U\n ): U;\n\n reduce<U>(\n ...args: [\n (\n previousValue: U,\n currentEntry: [K, V],\n currentIndex: number,\n dictionary: OrderedDict<K, V>\n ) => U,\n U?,\n ]\n ) {\n const [callbackfn, initialValue] = args;\n let index = 0;\n let accumulator = initialValue ?? this.at(0)!;\n for (const entry of this) {\n if (index === 0 && args.length === 1) {\n accumulator = entry as any;\n } else {\n accumulator = Reflect.apply(callbackfn, this, [accumulator, entry, index, this]);\n }\n index++;\n }\n return accumulator;\n }\n\n reduceRight(\n callbackfn: (\n previousValue: [K, V],\n currentEntry: [K, V],\n currentIndex: number,\n dictionary: OrderedDict<K, V>\n ) => [K, V]\n ): [K, V];\n reduceRight(\n callbackfn: (\n previousValue: [K, V],\n currentEntry: [K, V],\n currentIndex: number,\n dictionary: OrderedDict<K, V>\n ) => [K, V],\n initialValue: [K, V]\n ): [K, V];\n reduceRight<U>(\n callbackfn: (\n previousValue: [K, V],\n currentValue: U,\n currentIndex: number,\n dictionary: OrderedDict<K, V>\n ) => U,\n initialValue: U\n ): U;\n\n reduceRight<U>(\n ...args: [\n (\n previousValue: U,\n currentEntry: [K, V],\n currentIndex: number,\n dictionary: OrderedDict<K, V>\n ) => U,\n U?,\n ]\n ) {\n const [callbackfn, initialValue] = args;\n let accumulator = initialValue ?? this.at(-1)!;\n for (let index = this.size - 1; index >= 0; index--) {\n const entry = this.at(index)!;\n if (index === this.size - 1 && args.length === 1) {\n accumulator = entry as any;\n } else {\n accumulator = Reflect.apply(callbackfn, this, [accumulator, entry, index, this]);\n }\n }\n return accumulator;\n }\n\n toSorted(compareFn?: (a: [K, V], b: [K, V]) => number): OrderedDict<K, V> {\n const entries = [...this.entries()].sort(compareFn);\n return new OrderedDict(entries);\n }\n\n toReversed(): OrderedDict<K, V> {\n const reversed = new OrderedDict<K, V>();\n for (let index = this.size - 1; index >= 0; index--) {\n const key = this.keyAt(index)!;\n const element = this.get(key)!;\n reversed.set(key, element);\n }\n return reversed;\n }\n\n toSpliced(start: number, deleteCount?: number): OrderedDict<K, V>;\n toSpliced(start: number, deleteCount: number, ...items: [K, V][]): OrderedDict<K, V>;\n\n toSpliced(...args: [start: number, deleteCount: number, ...items: [K, V][]]) {\n const entries = [...this.entries()];\n entries.splice(...args);\n return new OrderedDict(entries);\n }\n\n slice(start?: number, end?: number) {\n const result = new OrderedDict<K, V>();\n let stop = this.size - 1;\n\n if (start === undefined) {\n return result;\n }\n\n if (start < 0) {\n start = start + this.size;\n }\n\n if (end !== undefined && end > 0) {\n stop = end - 1;\n }\n\n for (let index = start; index <= stop; index++) {\n const key = this.keyAt(index)!;\n const element = this.get(key)!;\n result.set(key, element);\n }\n return result;\n }\n\n every(\n predicate: (entry: [K, V], index: number, dictionary: OrderedDict<K, V>) => unknown,\n thisArg?: any\n ) {\n let index = 0;\n for (const entry of this) {\n if (!Reflect.apply(predicate, thisArg, [entry, index, this])) {\n return false;\n }\n index++;\n }\n return true;\n }\n\n some(\n predicate: (entry: [K, V], index: number, dictionary: OrderedDict<K, V>) => unknown,\n thisArg?: any\n ) {\n let index = 0;\n for (const entry of this) {\n if (Reflect.apply(predicate, thisArg, [entry, index, this])) {\n return true;\n }\n index++;\n }\n return false;\n }\n}\n\nexport type KeyOf<D extends OrderedDict<any, any>> =\n D extends OrderedDict<infer K, any> ? K : never;\nexport type ValueOf<D extends OrderedDict<any, any>> =\n D extends OrderedDict<any, infer V> ? V : never;\nexport type EntryOf<D extends OrderedDict<any, any>> = [KeyOf<D>, ValueOf<D>];\nexport type KeyFrom<E extends EntryOf<any>> = E[0];\nexport type ValueFrom<E extends EntryOf<any>> = E[1];\n\nfunction at<T>(array: ArrayLike<T>, index: number): T | undefined {\n if ('at' in Array.prototype) {\n return Array.prototype.at.call(array, index);\n }\n const actualIndex = toSafeIndex(array, index);\n return actualIndex === -1 ? undefined : array[actualIndex];\n}\n\nfunction toSafeIndex(array: ArrayLike<any>, index: number) {\n const length = array.length;\n const relativeIndex = toSafeInteger(index);\n const actualIndex = relativeIndex >= 0 ? relativeIndex : length + relativeIndex;\n return actualIndex < 0 || actualIndex >= length ? -1 : actualIndex;\n}\n\nfunction toSafeInteger(number: number) {\n // eslint-disable-next-line no-self-compare\n return number !== number || number === 0 ? 0 : Math.trunc(number);\n}\n","import createLucideIcon from '../createLucideIcon';\nimport { IconNode } from '../types';\n\nexport const __iconNode: IconNode = [\n ['line', { x1: '6', x2: '6', y1: '3', y2: '15', key: '17qcm7' }],\n ['circle', { cx: '18', cy: '6', r: '3', key: '1h7g24' }],\n ['circle', { cx: '6', cy: '18', r: '3', key: 'fqmcym' }],\n ['path', { d: 'M18 9a9 9 0 0 1-9 9', key: 'n2h4wq' }],\n];\n\n/**\n * @component @name GitBranch\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8bGluZSB4MT0iNiIgeDI9IjYiIHkxPSIzIiB5Mj0iMTUiIC8+CiAgPGNpcmNsZSBjeD0iMTgiIGN5PSI2IiByPSIzIiAvPgogIDxjaXJjbGUgY3g9IjYiIGN5PSIxOCIgcj0iMyIgLz4KICA8cGF0aCBkPSJNMTggOWE5IDkgMCAwIDEtOSA5IiAvPgo8L3N2Zz4K) - https://lucide.dev/icons/git-branch\n * @see https://lucide.dev/guide/packages/lucide-react - Documentation\n *\n * @param {Object} props - Lucide icons props and any valid SVG attribute\n * @returns {JSX.Element} JSX Element\n *\n */\nconst GitBranch = createLucideIcon('git-branch', __iconNode);\n\nexport default GitBranch;\n","import createLucideIcon from '../createLucideIcon';\nimport { IconNode } from '../types';\n\nexport const __iconNode: IconNode = [\n [\n 'path',\n {\n 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',\n key: 'm3kijz',\n },\n ],\n [\n 'path',\n {\n 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',\n key: '1fmvmk',\n },\n ],\n ['path', { d: 'M9 12H4s.55-3.03 2-4c1.62-1.08 5 0 5 0', key: '1f8sc4' }],\n ['path', { d: 'M12 15v5s3.03-.55 4-2c1.08-1.62 0-5 0-5', key: 'qeys4' }],\n];\n\n/**\n * @component @name Rocket\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8cGF0aCBkPSJNNC41IDE2LjVjLTEuNSAxLjI2LTIgNS0yIDVzMy43NC0uNSA1LTJjLjcxLS44NC43LTIuMTMtLjA5LTIuOTFhMi4xOCAyLjE4IDAgMCAwLTIuOTEtLjA5eiIgLz4KICA8cGF0aCBkPSJtMTIgMTUtMy0zYTIyIDIyIDAgMCAxIDItMy45NUExMi44OCAxMi44OCAwIDAgMSAyMiAyYzAgMi43Mi0uNzggNy41LTYgMTFhMjIuMzUgMjIuMzUgMCAwIDEtNCAyeiIgLz4KICA8cGF0aCBkPSJNOSAxMkg0cy41NS0zLjAzIDItNGMxLjYyLTEuMDggNSAwIDUgMCIgLz4KICA8cGF0aCBkPSJNMTIgMTV2NXMzLjAzLS41NSA0LTJjMS4wOC0xLjYyIDAtNSAwLTUiIC8+Cjwvc3ZnPgo=) - https://lucide.dev/icons/rocket\n * @see https://lucide.dev/guide/packages/lucide-react - Documentation\n *\n * @param {Object} props - Lucide icons props and any valid SVG attribute\n * @returns {JSX.Element} JSX Element\n *\n */\nconst Rocket = createLucideIcon('rocket', __iconNode);\n\nexport default Rocket;\n"],"names":["React","createContextScope","useComposedRefs","createSlot","jsx","createCollection","itemData"],"mappings":"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","ignoreList":[3,4]}
@@ -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),s=e.i(22528),r=e.i(5978),a=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:r}=e,a=t.default.useRef(null),l=t.default.useRef(new Map).current;return(0,i.jsx)(c,{scope:s,itemMap:l,collectionRef:a,children:r})};u.displayName=l;let m=e+"CollectionSlot",f=(0,a.createSlot)(m),h=t.default.forwardRef((e,t)=>{let{scope:s,children:a}=e,l=d(m,s),n=(0,r.useComposedRefs)(t,l.collectionRef);return(0,i.jsx)(f,{ref:n,children:a})});h.displayName=m;let x=e+"CollectionItemSlot",p="data-radix-collection-item",g=(0,a.createSlot)(x),v=t.default.forwardRef((e,s)=>{let{scope:a,children:l,...n}=e,o=t.default.useRef(null),c=(0,r.useComposedRefs)(s,o),u=d(x,a);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 v.displayName=x,[{Provider:u,Slot:h,ItemSlot:v},function(s){let r=d(e+"CollectionConsumer",s);return t.default.useCallback(()=>{let e=r.collectionRef.current;if(!e)return[];let t=Array.from(e.querySelectorAll(`[${p}]`));return Array.from(r.itemMap.values()).sort((e,s)=>t.indexOf(e.ref.current)-t.indexOf(s.ref.current))},[r.collectionRef,r.itemMap])},o]}var n=new WeakMap;function o(e,t){var s,r;let a,i,l;if("at"in Array.prototype)return Array.prototype.at.call(e,t);let n=(s=e,r=t,a=s.length,(l=(i=c(r))>=0?i:a+i)<0||l>=a?-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 r,a=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||a&&o===this.size-1||-1===o)return this.set(t,s),this;let d=this.size+ +!a;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]),a&&this.delete(t),r=this.get(i),this.set(t,s)}else{m||u[e-1]!==t||(m=!0);let s=u[m?e:e-1],a=r;r=this.get(s),this.delete(s),this.set(s,a)}return this}with(t,s,r){let a=new e(this);return a.insert(t,s,r),a}before(e){let t=this.#e.indexOf(e)-1;if(!(t<0))return this.entryAt(t)}setBefore(e,t,s){let r=this.#e.indexOf(e);return -1===r?this:this.insert(r,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 r=this.#e.indexOf(e);return -1===r?this:this.insert(r+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 r=s+t;return r<0&&(r=0),r>=this.size&&(r=this.size-1),this.at(r)}keyFrom(e,t){let s=this.indexOf(e);if(-1===s)return;let r=s+t;return r<0&&(r=0),r>=this.size&&(r=this.size-1),this.keyAt(r)}find(e,t){let s=0;for(let r of this){if(Reflect.apply(e,t,[r,s,this]))return r;s++}}findIndex(e,t){let s=0;for(let r of this){if(Reflect.apply(e,t,[r,s,this]))return s;s++}return -1}filter(t,s){let r=[],a=0;for(let e of this)Reflect.apply(t,s,[e,a,this])&&r.push(e),a++;return new e(r)}map(t,s){let r=[],a=0;for(let e of this)r.push([e[0],Reflect.apply(t,s,[e,a,this])]),a++;return new e(r)}reduce(...e){let[t,s]=e,r=0,a=s??this.at(0);for(let s of this)a=0===r&&1===e.length?s:Reflect.apply(t,this,[a,s,r,this]),r++;return a}reduceRight(...e){let[t,s]=e,r=s??this.at(-1);for(let s=this.size-1;s>=0;s--){let a=this.at(s);r=s===this.size-1&&1===e.length?a:Reflect.apply(t,this,[r,a,s,this])}return r}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),r=this.get(s);t.set(s,r)}return t}toSpliced(...t){let s=[...this.entries()];return s.splice(...t),new e(s)}slice(t,s){let r=new e,a=this.size-1;if(void 0===t)return r;t<0&&(t+=this.size),void 0!==s&&s>0&&(a=s-1);for(let e=t;e<=a;e++){let t=this.keyAt(e),s=this.get(t);r.set(t,s)}return r}every(e,t){let s=0;for(let r of this){if(!Reflect.apply(e,t,[r,s,this]))return!1;s++}return!0}some(e,t){let s=0;for(let r of this){if(Reflect.apply(e,t,[r,s,this]))return!0;s++}return!1}}),e.s(["createCollection",()=>l])},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)},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)},68304,51080,e=>{"use strict";var t=e.i(20314),s=e.i(79054),r=e.i(91967),a=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),[v,y]=(0,a.createContextScope)(h,[g]),[b,j]=v(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,a)=>{let{__scopeRovingFocusGroup:i,orientation:n,loop:x=!1,dir:g,currentTabStopId:v,defaultCurrentTabStopId:y,onCurrentTabStopIdChange:j,onEntryFocus:k,preventScrollOnEntryFocus:w=!1,...N}=e,C=s.useRef(null),T=(0,l.useComposedRefs)(a,C),I=(0,u.useDirection)(g),[S,A]=(0,d.useControllableState)({prop:v,defaultProp:y??null,onChange:j,caller:h}),[z,E]=s.useState(!1),M=(0,c.useCallbackRef)(k),L=p(i),D=s.useRef(!1),[P,F]=s.useState(0);return s.useEffect(()=>{let e=C.current;if(e)return e.addEventListener(m,M),()=>e.removeEventListener(m,M)},[M]),(0,t.jsx)(b,{scope:i,orientation:n,dir:I,loop:x,currentTabStopId:S,onItemFocus:s.useCallback(e=>A(e),[A]),onItemShiftTab:s.useCallback(()=>E(!0),[]),onFocusableItemAdd:s.useCallback(()=>F(e=>e+1),[]),onFocusableItemRemove:s.useCallback(()=>F(e=>e-1),[]),children:(0,t.jsx)(o.Primitive.div,{tabIndex:z||0===P?-1:0,"data-orientation":n,...N,ref:T,style:{outline:"none",...e.style},onMouseDown:(0,r.composeEventHandlers)(e.onMouseDown,()=>{D.current=!0}),onFocus:(0,r.composeEventHandlers)(e.onFocus,e=>{let t=!D.current;if(e.target===e.currentTarget&&t&&!z){let t=new CustomEvent(m,f);if(e.currentTarget.dispatchEvent(t),!t.defaultPrevented){let e=L().filter(e=>e.focusable);R([e.find(e=>e.active),e.find(e=>e.id===S),...e].filter(Boolean).map(e=>e.ref.current),w)}}D.current=!1}),onBlur:(0,r.composeEventHandlers)(e.onBlur,()=>E(!1))})})}),N="RovingFocusGroupItem",C=s.forwardRef((e,a)=>{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),v=g.currentTabStopId===h,y=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:v?0:-1,"data-orientation":g.orientation,...m,ref:a,onMouseDown:(0,r.composeEventHandlers)(e.onMouseDown,e=>{l?g.onItemFocus(h):e.preventDefault()}),onFocus:(0,r.composeEventHandlers)(e.onFocus,()=>g.onItemFocus(h)),onKeyDown:(0,r.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 r;let a=(r=e.key,"rtl"!==s?r:"ArrowLeft"===r?"ArrowRight":"ArrowRight"===r?"ArrowLeft":r);if(!("vertical"===t&&["ArrowLeft","ArrowRight"].includes(a))&&!("horizontal"===t&&["ArrowUp","ArrowDown"].includes(a)))return T[a]}(e,g.orientation,g.dir);if(void 0!==t){if(e.metaKey||e.ctrlKey||e.altKey||e.shiftKey)return;e.preventDefault();let a=y().filter(e=>e.focusable).map(e=>e.ref.current);if("last"===t)a.reverse();else if("prev"===t||"next"===t){var s,r;"prev"===t&&a.reverse();let i=a.indexOf(e.currentTarget);a=g.loop?(s=a,r=i+1,s.map((e,t)=>s[(r+t)%s.length])):a.slice(i+1)}setTimeout(()=>R(a))}}),children:"function"==typeof u?u({isCurrentTabStop:v,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 r of e)if(r===s||(r.focus({preventScroll:t}),document.activeElement!==s))return}e.s(["Item",()=>C,"Root",()=>k,"createRovingFocusGroupScope",()=>y],51080);var I=e.i(85995),S="Tabs",[A,z]=(0,a.createContextScope)(S,[y]),E=y(),[M,L]=A(S),D=s.forwardRef((e,s)=>{let{__scopeTabs:r,value:a,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:a,onChange:i,defaultProp:l??"",caller:S});return(0,t.jsx)(M,{scope:r,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})})});D.displayName=S;var P="TabsList",F=s.forwardRef((e,s)=>{let{__scopeTabs:r,loop:a=!0,...i}=e,l=L(P,r),n=E(r);return(0,t.jsx)(k,{asChild:!0,...n,orientation:l.orientation,dir:l.dir,loop:a,children:(0,t.jsx)(o.Primitive.div,{role:"tablist","aria-orientation":l.orientation,...i,ref:s})})});F.displayName=P;var O="TabsTrigger",B=s.forwardRef((e,s)=>{let{__scopeTabs:a,value:i,disabled:l=!1,...n}=e,c=L(O,a),d=E(a),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,r.composeEventHandlers)(e.onMouseDown,e=>{l||0!==e.button||!1!==e.ctrlKey?e.preventDefault():c.onValueChange(i)}),onKeyDown:(0,r.composeEventHandlers)(e.onKeyDown,e=>{[" ","Enter"].includes(e.key)&&c.onValueChange(i)}),onFocus:(0,r.composeEventHandlers)(e.onFocus,()=>{let e="manual"!==c.activationMode;f||l||!e||c.onValueChange(i)})})})});B.displayName=O;var H="TabsContent",q=s.forwardRef((e,r)=>{let{__scopeTabs:a,value:i,forceMount:l,children:n,...c}=e,d=L(H,a),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)(I.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:r,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=H,e.s(["Content",()=>q,"List",()=>F,"Root",()=>D,"Tabs",()=>D,"TabsContent",()=>q,"TabsList",()=>F,"TabsTrigger",()=>B,"Trigger",()=>B,"createTabsScope",()=>z],43133);var $=e.i(43133),$=$,U=e.i(31777);let G=$.Root,_=s.forwardRef(({className:e,...s},r)=>(0,t.jsx)($.List,{ref:r,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},r)=>(0,t.jsx)($.Trigger,{ref:r,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},r)=>(0,t.jsx)($.Content,{ref:r,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)},81846,e=>{"use strict";var t=e.i(20314),s=e.i(94237),r=e.i(31777);let a=(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,r.cn)(a({variant:s}),e),...i})}e.s(["Badge",()=>i])},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)},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)},54277,30090,e=>{"use strict";let t=(0,e.i(3645).default)("circle-x",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]]);e.s(["default",()=>t],30090),e.s(["CircleX",()=>t],54277)},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)},95812,35e3,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);var s=e.i(80986);e.s(["CheckCircle2",()=>s.default],35e3)},44412,e=>{"use strict";var t=e.i(20314),s=e.i(79054),r=e.i(81975),a=e.i(68304),i=e.i(31777),l=e.i(83428),n=e.i(83902),o=e.i(3645);let c=(0,o.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"}]]),d=(0,o.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,o.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),v=e.i(2828),y=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:r,onClose:a,onRefresh:i,autoStart:o}){let[u,m]=(0,s.useState)(!1),[f,h]=(0,s.useState)(!1),{logs:x,status:v,startInstall:T}=function(e){let[t,r]=(0,s.useState)([]),[a,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:a,result:l,startInstall:(0,s.useCallback)(()=>{c(),r([]),n(null),i("streaming");let t=new EventSource(`/api/tools/${e}/install/stream`);o.current=t,t.onmessage=e=>{r(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),I=(0,s.useRef)(!0),S=(0,s.useRef)(!1),A="available"===e.status.status,z="error"===e.status.status,E=A&&!!e.openDirectory,M=!A&&!z&&e.autoInstall;async function L(){h(!0);try{await fetch(`/api/tools/${e.id}/launch`,{method:"POST"})}finally{h(!1)}}(0,s.useEffect)(()=>{r&&o&&M&&"idle"===v&&!S.current&&(S.current=!0,T()),r||(S.current=!1)},[r,o,M,v,T]);let D=(0,s.useCallback)(()=>{let e=R.current;e&&(I.current=e.scrollTop+e.clientHeight>=e.scrollHeight-50)},[]);(0,s.useEffect)(()=>{I.current&&R.current&&(R.current.scrollTop=R.current.scrollHeight)},[x,v]),(0,s.useEffect)(()=>{"done"===v&&i&&i()},[v,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},r=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)(r,{className:"h-3 w-3"}),s.label]},e)})})]});return(0,t.jsx)(k.BaseDrawer,{open:r,onClose:a,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)(y.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:[M?(0,t.jsxs)(g.Button,{size:"sm",onClick:T,disabled:"streaming"===v,"aria-label":`Install ${e.name}`,className:"cursor-pointer",children:["streaming"===v?(0,t.jsx)(l.Loader2,{className:"mr-1.5 h-3.5 w-3.5 animate-spin"}):(0,t.jsx)(c,{className:"mr-1.5 h-3.5 w-3.5"}),"streaming"===v?"Installing...":"Install"]}):null,E?(0,t.jsxs)(g.Button,{size:"sm",variant:"outline",onClick:()=>void L(),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"===v||"done"===v||"error"===v)&&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:D,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"===v?(0,t.jsx)("div",{className:"mt-2 border-t border-zinc-700 pt-2 text-emerald-400",children:"Installation complete"}):null,"error"===v?(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 I({tool:e,onRefresh:r,className:a}){let[o,u]=(0,s.useState)(!1),[m,y]=(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(){y(!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",a),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},r=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)(r,{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)(v.TooltipProvider,{children:(0,t.jsxs)(v.Tooltip,{children:[(0,t.jsx)(v.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)(v.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(),y(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)(c,{className:"mr-1 h-3 w-3"}),"Install"]})})]})]}),(0,t.jsx)(T,{tool:e,open:o,onClose:()=>u(!1),onRefresh:r,autoStart:m})]})}let S={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 A({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(S[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)(r.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)(a.Tabs,{value:c,onValueChange:e=>d(e),"data-testid":"tools-page-tabs",children:[(0,t.jsxs)(a.TabsList,{className:"h-7",children:[(0,t.jsx)(a.TabsTrigger,{value:"all","data-testid":"tools-tab-all",className:"px-2.5 text-xs",children:"All"}),(0,t.jsx)(a.TabsTrigger,{value:"ide","data-testid":"tools-tab-ide",className:"px-2.5 text-xs",children:"IDEs"}),(0,t.jsx)(a.TabsTrigger,{value:"cli-agent","data-testid":"tools-tab-cli-agent",className:"px-2.5 text-xs",children:"CLI Agents"}),(0,t.jsx)(a.TabsTrigger,{value:"vcs","data-testid":"tools-tab-vcs",className:"px-2.5 text-xs",children:"Version Control"}),(0,t.jsx)(a.TabsTrigger,{value:"terminal","data-testid":"tools-tab-terminal",className:"px-2.5 text-xs",children:"Terminals"})]}),(0,t.jsx)(a.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)(r.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)(I,{tool:e,onRefresh:u},e.id))})})]})]})}e.s(["ToolsPageClient",()=>A],44412)}]);
@@ -1 +0,0 @@
1
- (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,24042,64970,e=>{"use strict";var t=e.i(3645);let n=(0,t.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",()=>n],24042);let r=(0,t.default)("square",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}]]);e.s(["Square",()=>r],64970)},81803,72714,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:s,error:u,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:s,onClick:()=>{m.play(),i()},className:(0,a.cn)("gap-1.5",u&&"text-destructive hover:text-destructive",!u&&c&&"ghost"===f&&"text-muted-foreground cursor-pointer rounded-full transition-colors hover:text-blue-500"),children:[s?(0,t.jsx)(n.Loader2,{className:"size-4 animate-spin"}):u?(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)},2287,e=>{"use strict";var t=e.i(20314),n=e.i(79054),r=e.i(90033),a=e.i(90537),a=a,o=e.i(31777);let l=r.Dialog.Root;r.Dialog.Trigger;let i=r.Dialog.Portal,s=r.Dialog.Close,u=n.forwardRef(({className:e,onClick:n,...a},l)=>(0,t.jsx)(r.Dialog.Overlay,{ref:l,className:(0,o.cn)("fixed inset-0 z-50 bg-black/80",e),onClick:e=>{e.stopPropagation(),n?.(e)},...a}));u.displayName=r.Dialog.Overlay.displayName;let d=n.forwardRef(({className:e,children:n,...l},s)=>(0,t.jsxs)(i,{children:[(0,t.jsx)(u,{}),(0,t.jsxs)(r.Dialog.Content,{ref:s,className:(0,o.cn)("bg-background 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 sm:rounded-lg",e),...l,children:[n,(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 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)(a.default,{className:"h-4 w-4"}),(0,t.jsx)("span",{className:"sr-only",children:"Close"})]})]})]}));d.displayName=r.Dialog.Content.displayName;let c=({className:e,...n})=>(0,t.jsx)("div",{className:(0,o.cn)("flex flex-col space-y-1.5 text-center sm:text-left",e),...n});c.displayName="DialogHeader";let f=({className:e,...n})=>(0,t.jsx)("div",{className:(0,o.cn)("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...n});f.displayName="DialogFooter";let p=n.forwardRef(({className:e,...n},a)=>(0,t.jsx)(r.Dialog.Title,{ref:a,className:(0,o.cn)("text-lg leading-none font-semibold tracking-tight",e),...n}));p.displayName=r.Dialog.Title.displayName;let m=n.forwardRef(({className:e,...n},a)=>(0,t.jsx)(r.Dialog.Description,{ref:a,className:(0,o.cn)("text-muted-foreground text-sm",e),...n}));m.displayName=r.Dialog.Description.displayName,e.s(["Dialog",()=>l,"DialogClose",()=>s,"DialogContent",()=>d,"DialogDescription",()=>m,"DialogFooter",()=>f,"DialogHeader",()=>c,"DialogTitle",()=>p],2287)},99348,17466,e=>{"use strict";var t=e.i(20314),n=e.i(79054),r=e.i(83428),a=e.i(30702),o=e.i(38573),l=e.i(17406),i=e.i(81846),s=e.i(2287),u=e.i(21023);let d=(0,u.createServerReference)("40d4e98b1d059d05d973a59598504a0dec87bdbda7",u.callServer,void 0,u.findSourceMapURL,"getDeploymentLogs");function c({open:e,onOpenChange:r,targetId:a}){let{logs:o,isConnected:l}=function(e){let[t,r]=(0,n.useState)([]),[a,o]=(0,n.useState)(!1),l=(0,n.useRef)(null),i=(0,n.useCallback)(()=>{l.current&&(l.current.close(),l.current=null),o(!1)},[]);return(0,n.useEffect)(()=>{if(!e){r([]),o(!1);return}d(e).then(e=>{e&&r(e)}).catch(()=>{});let t=new EventSource(`/api/deployment-logs?targetId=${e}`);return l.current=t,t.onopen=()=>{o(!0)},t.addEventListener("log",e=>{let t=JSON.parse(e.data);r(e=>[...e,t])}),t.onerror=()=>{o(!1)},()=>{t.close(),l.current=null}},[e,i]),{logs:t,isConnected:a}}(e?a:null);return(0,t.jsx)(f,{open:e,onOpenChange:r,logs:o,isConnected:l})}function f({open:e,onOpenChange:r,logs:a,isConnected:l}){let i=(0,n.useRef)(null),u=(0,n.useRef)(!0),d=(0,n.useCallback)(()=>{let e=i.current;e&&(u.current=e.scrollTop+e.clientHeight>=e.scrollHeight-50)},[]);return(0,n.useEffect)(()=>{u.current&&i.current&&(i.current.scrollTop=i.current.scrollHeight)},[a]),(0,t.jsx)(s.Dialog,{open:e,onOpenChange:r,children:(0,t.jsxs)(s.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)(s.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)(o.Terminal,{className:"h-4 w-4 text-zinc-400"}),(0,t.jsx)(s.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 ${l?"bg-green-500":"bg-zinc-500"}`}),(0,t.jsx)("span",{className:"text-xs text-zinc-400",children:l?"Connected":"Disconnected"})]})]}),(0,t.jsxs)("div",{ref:i,onScroll:d,className:"flex-1 overflow-auto p-4 font-mono text-sm leading-relaxed",children:[0===a.length?(0,t.jsx)("p",{className:"text-zinc-500",children:"Waiting for log output..."}):a.map(e=>(0,t.jsx)(p,{entry:e},`${e.timestamp}-${e.stream}-${e.line}`)),!l&&a.length>0&&(0,t.jsx)("div",{className:"mt-2 border-t border-zinc-800 pt-2 text-zinc-500",children:"[Server stopped]"})]})]})})}function p({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 m({status:e,url:s,targetId:u}){let[d,f]=(0,n.useState)(!1),p=u&&(e===l.DeploymentState.Booting||e===l.DeploymentState.Ready);switch(e){case l.DeploymentState.Booting:return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)(i.Badge,{className:"border-transparent bg-blue-50 text-blue-700 hover:bg-blue-50",children:[(0,t.jsx)(r.Loader2,{className:"mr-1 h-3.5 w-3.5 animate-spin"}),"Starting...",p?(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(),f(!0)},children:(0,t.jsx)(o.Terminal,{className:"h-3 w-3"})}):null]}),p?(0,t.jsx)(c,{open:d,onOpenChange:f,targetId:u}):null]});case l.DeploymentState.Ready:return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)(i.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"}),s?(0,t.jsxs)("a",{href:s,target:"_blank",rel:"noopener noreferrer",className:"inline-flex items-center gap-1 hover:underline",onClick:e=>e.stopPropagation(),children:[s,(0,t.jsx)(a.ExternalLink,{className:"h-3 w-3"})]}):"Ready",p?(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(),f(!0)},children:(0,t.jsx)(o.Terminal,{className:"h-3 w-3"})}):null]}),p?(0,t.jsx)(c,{open:d,onOpenChange:f,targetId:u}):null]});default:return null}}e.s(["DeploymentStatusBadge",()=>m],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 s(){return/^((?!chrome|android).)*safari/i.test(navigator.userAgent)}function u(){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 D=new WeakMap;function j(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||D.set(e,r)}let R=e=>{switch(e){case"top":case"bottom":return!0;case"left":case"right":return!1;default:return e}};function C(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(", ")[R(t)?13:12]):(a=r.match(/^matrix\((.+)\)$/))?parseFloat(a[1].split(", ")[R(t)?5:4]):null}function T(e,t){if(!e)return()=>{};let n=e.style.cssText;return Object.assign(e.style,t),()=>{e.style.cssText=n}}let N=[.32,.72,0,1],E="vaul-dragging";function S(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 $({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=S(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,s=S(n);return[i,o.default.useCallback(t=>{if(l){let n="function"==typeof t?t(e):t;n!==e&&s(n)}else a(t)},[l,e,a,s])]}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:T=.25,scrollLockTimeout:S=100,dismissible:k=!0,handleOnly:M=!1,fadeFromIndex:O=m&&m.length-1,activeSnapPoint:z,setActiveSnapPoint:L,fixed:B,modal:F=!0,onClose:A,nested:I,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]=$({defaultProp:q,prop:e,onChange:e=>{null==n||n(e),e||I||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),es=o.default.useRef(null),eu=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),eD=o.default.useCallback(e=>{m&&e===eN.length-1&&(es.current=new Date)},[]),{activeSnapPoint:ej,activeSnapPointIndex:eR,setActiveSnapPoint:eC,onRelease:eT,snapPointsOffset:eN,onDrag:eE,shouldFade:eS,getPercentageDragged:e$}=function({activeSnapPointProp:e,setActiveSnapPointProp:t,snapPoints:n,drawerRef:r,overlayRef:a,fadeFromIndex:l,onSnapPointChange:i,direction:s="bottom",container:u,snapToSequentialPoint:d}){let[c,f]=$({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=u?{width:u.getBoundingClientRect().width,height:u.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)),R(s)){let a=n?r:p?e*t.height:0;return p?"bottom"===s?t.height-a:-t.height+a:a}let a=n?r:p?e*t.width:0;return p?"right"===s?t.width-a:-t.width+a:a}))?e:[]},[n,p,u]),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),j(r.current,{transition:`transform 0.5s cubic-bezier(${N.join(",")})`,transform:R(s)?`translate3d(0, ${e}px, 0)`:`translate3d(${e}px, 0, 0)`}),w&&o!==w.length-1&&void 0!==l&&o!==l&&o<l?j(a.current,{transition:`opacity 0.5s cubic-bezier(${N.join(",")})`,opacity:"0"}):j(a.current,{transition:`opacity 0.5s cubic-bezier(${N.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"===s||"right"===s?(null!=y?y:0)-e:(null!=y?y:0)+e,u=h===l-1,c=0===h,f=e>0;if(u&&j(a.current,{transition:`opacity 0.5s cubic-bezier(${N.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=R(s)?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"===s||"right"===s?y-e:y+e;("bottom"===s||"right"===s)&&t<w[w.length-1]||("top"===s||"left"===s)&&t>w[w.length-1]||j(r.current,{transform:R(s)?`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:eD,direction:W,container:J,snapToSequentialPoint:U});!function(e={}){let{isDisabled:n}=e;c(()=>{if(!n){var e,r,a;let n,o,l,i,s,d,c;return 1==++v&&u()&&(l=0,i=window.pageXOffset,s=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,s)}),()=>{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,u]=o.default.useState(()=>"u">typeof window?window.location.href:""),d=o.default.useRef(0),c=o.default.useCallback(()=>{if(s()&&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(s()&&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?u(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!=I&&I,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?C(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(es.current&&l.getTime()-es.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()<S&&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(E),ef.current=!1,ea(!1),ed.current=new Date),null==A||A(),e||ee(!1),setTimeout(()=>{m&&eC(m[0])},500)}function ez(){if(!ew.current)return;let e=document.querySelector("[data-vaul-drawer-wrapper]"),t=C(ew.current,W);j(ew.current,{transform:"translate3d(0, 0, 0)",transition:`transform 0.5s cubic-bezier(${N.join(",")})`}),j(ei.current,{transition:`opacity 0.5s cubic-bezier(${N.join(",")})`,opacity:"1"}),h&&t&&t>0&&Z&&j(e,{borderRadius:"8px",overflow:"hidden",...R(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(${N.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&&eN&&eR&&(r+=eN[eR]||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)}},[eR,m,eN]),o.default.useEffect(()=>(Z&&(j(document.documentElement,{scrollBehavior:"auto"}),es.current=new Date),()=>{!function(e,t){if(!e||!(e instanceof HTMLElement))return;let n=D.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:ej,snapPoints:m,setActiveSnapPoint:eC,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),eu.current=new Date,u()&&window.addEventListener("touchend",()=>ef.current=!1,{once:!0}),e.target.setPointerCapture(e.pointerId),em.current=R(W)?e.pageY:e.pageX)},onRelease:function(e){var t,n;if(!er||!ew.current)return;ew.current.classList.remove(E),ef.current=!1,ea(!1),ed.current=new Date;let r=C(ew.current,W);if(!e||!eM(e.target,!1)||!r||Number.isNaN(r)||null===eu.current)return;let a=ed.current.getTime()-eu.current.getTime(),o=em.current-(R(W)?e.pageY:e.pageX),l=Math.abs(o)/a;if(l>.05&&(el(!0),setTimeout(()=>{el(!1)},200)),m){eT({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),s=Math.min(null!=(n=ew.current.getBoundingClientRect().width)?n:0,window.innerWidth);if(Math.abs(r)>=("left"===W||"right"===W?s:i)*T){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-(R(W)?e.pageY:e.pageX))*t,r=n>0,a=m&&!k&&!r;if(a&&0===eR)return;let o=Math.abs(n),l=document.querySelector("[data-vaul-drawer-wrapper]"),s=o/("bottom"===W||"top"===W?ey.current:eb.current),u=e$(o,r);if(null!==u&&(s=u),a&&s>=1||!ef.current&&!eM(e.target,r))return;if(ew.current.classList.add(E),ef.current=!0,j(ew.current,{transition:"none"}),j(ei.current,{transition:"none"}),m&&eE({draggedDistance:n}),r&&!m){let e=Math.min(-(8*(Math.log(n+1)-2)*1),0)*t;j(ew.current,{transform:R(W)?`translate3d(0, ${e}px, 0)`:`translate3d(${e}px, 0, 0)`});return}let d=1-s;if((eS||O&&eR===O-1)&&(null==i||i(e,s),j(ei.current,{opacity:`${d}`,transition:"none"},!0)),l&&ei.current&&h){let e=Math.min(eP()+s*(1-eP()),1),t=8-8*s,n=Math.max(0,14-14*s);j(l,{borderRadius:`${t}px`,transform:R(W)?`scale(${e}) translate3d(0, ${n}px, 0)`:`scale(${e}) translate3d(${n}px, 0, 0)`,transition:"none"},!0)}if(!m){let e=o*t;j(ew.current,{transform:R(W)?`translate3d(0, ${e}px, 0)`:`translate3d(${e}px, 0, 0)`})}}},dismissible:k,shouldAnimate:eh,handleOnly:M,isOpen:Z,isDragging:er,shouldFade:eS,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;j(ew.current,{transform:R(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),j(ew.current,{transition:`transform 0.5s cubic-bezier(${N.join(",")})`,transform:R(W)?`scale(${t}) translate3d(0, ${n}px, 0)`:`scale(${t}) translate3d(${n}px, 0, 0)`}),!e&&ew.current&&(ep.current=setTimeout(()=>{let e=C(ew.current,W);j(ew.current,{transition:"none",transform:R(W)?`translate3d(0, ${e}px, 0)`:`translate3d(${e}px, 0, 0)`})},500))},onNestedRelease:function(e,t){let n=R(W)?window.innerHeight:window.innerWidth,r=t?(n-16)/n:1,a=t?-16:0;t&&j(ew.current,{transition:`transform 0.5s cubic-bezier(${N.join(",")})`,transform:R(W)?`scale(${r}) translate3d(0, ${a}px, 0)`:`scale(${r}) translate3d(${a}px, 0, 0)`})},keyboardIsOpen:eg,modal:F,snapPointsOffset:eN,activeSnapPointIndex:eR,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:s,isOpen:u,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":u&&p?"true":"false","data-vaul-snap-points-overlay":u&&s?"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:s,onPress:u,onRelease:d,onDrag:c,keyboardIsOpen:f,snapPointsOffset:p,activeSnapPointIndex:m,modal:g,isOpen:h,direction:v,snapPoints:w,container:y,handleOnly:b,shouldAnimate:D,autoFocus:j}=i(),[C,E]=o.default.useState(!1),S=x(l,s),$=o.default.useRef(null),P=o.default.useRef(null),M=o.default.useRef(!1),O=w&&w.length>0;function z(e){$.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),s=(0,o.useMemo)(()=>document.body.style.backgroundColor,[]);function u(){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?T(document.body,{background:"black"}):k,T(t,{transformOrigin:R(e)?"top":"left",transitionProperty:"transform, border-radius",transitionDuration:"0.5s",transitionTimingFunction:`cubic-bezier(${N.join(",")})`}));let n=T(t,{borderRadius:"8px",overflow:"hidden",...R(e)?{transform:`scale(${u()}) translate3d(0, calc(env(safe-area-inset-top) + 14px), 0)`}:{transform:`scale(${u()}) translate3d(calc(env(safe-area-inset-top) + 14px), 0, 0)`}});return()=>{n(),l.current=window.setTimeout(()=>{s?document.body.style.background=s:document.body.style.removeProperty("background")},500)}}},[t,n,s])}(),o.default.useEffect(()=>{O&&window.requestAnimationFrame(()=>{E(!0)})},[]),o.default.createElement(a.Content,{"data-vaul-drawer-direction":v,"data-vaul-drawer":"","data-vaul-delayed-snap-points":C?"true":"false","data-vaul-snap-points":h&&O?"true":"false","data-vaul-custom-container":y?"true":"false","data-vaul-animate":(null==D?void 0:D.current)?"true":"false",...r,ref:S,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),$.current={x:e.pageX,y:e.pageY},u(e))},onOpenAutoFocus:e=>{null==n||n(e),j||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),!$.current))return;let t=e.pageY-$.current.y,n=e.pageX-$.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)&&($.current=null)},onPointerUp:e=>{null==r.onPointerUp||r.onPointerUp.call(r,e),$.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:s,activeSnapPoint:u,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(),!s||0===s.length){c||a();return}if(u===s[s.length-1]&&c)return a();let t=s.findIndex(e=>e===u);-1===t||d(s[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:s}=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:s,...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 A({...e}){return(0,n.jsx)(B.Root,{"data-slot":"drawer",...e})}function I({...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)(I,{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",()=>A,"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)("402f2a144f307b4ad787237b688038d6e991766068",r.callServer,void 0,r.findSourceMapURL,"deployFeature"),o=(0,r.createServerReference)("4077a9b009ed68dddc3408ce7d1f418ca41cc91965",r.callServer,void 0,r.findSourceMapURL,"deployRepository"),l=(0,r.createServerReference)("40aef7be3231b1e99b0bd67fe328489b0baa5c408e",r.callServer,void 0,r.findSourceMapURL,"stopDeployment"),i=(0,r.createServerReference)("405e449a48970373b1a4d18608b1e71c5b7b016396",r.callServer,void 0,r.findSourceMapURL,"getDeploymentStatus"),s=(0,n.createLogger)("[useDeployAction]");function u(e){let[n,r]=(0,t.useState)(!1),[u,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&&(s.debug("stopping polling"),clearInterval(w.current),w.current=null)},[]),D=(0,t.useCallback)(e=>{x(),s.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&&s.info(`poll state changed: ${b.current} → ${t.state}, url=${t.url}`),m(t.state),h(t.url)):(s.info(`poll result: ${t?`state=${t.state}`:"null (deployment gone)"} — stopping poll`),m(null),h(null),x()))},3e3)},[x]),j=(0,t.useCallback)(async()=>{if(!e)return void s.warn("deploy() called but input is null — no-op");if(n)return void s.warn("deploy() called but already loading — no-op");s.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(s.info("server action result:",t),!y.current)return void s.warn("component unmounted after deploy — discarding result");if(t.success)s.info(`deploy succeeded — initial state=${t.state}, starting polling`),m(t.state??null),h(null),D(e.targetId);else{let e=t.error??"An unexpected error occurred";s.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";s.error(`deploy threw exception: ${e}`,t),f(e),v.current=setTimeout(()=>f(null),5e3)}finally{y.current&&r(!1)}},[e,n,D]),R=(0,t.useCallback)(async()=>{if(e&&!u){s.info(`stop() — targetId="${e.targetId}"`),d(!0);try{let t=await l(e.targetId);if(s.info("stop result:",t),!y.current)return;t.success&&(x(),m(null),h(null))}catch(e){s.warn("stop error (non-critical):",e)}finally{y.current&&d(!1)}}},[e,u,x]);return{deploy:j,stop:R,deployLoading:n,stopLoading:u,deployError:c,status:p,url:g}}e.s(["useDeployAction",()=>u],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 s=e.i(72714);e.i(99348);var u=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-xl"}},defaultVariants:{size:"sm"}});function h({open:e,onClose:a,modal:o=!1,dismissOnOutsideClick:l=!1,title:s="Drawer",size:u,header:f,children:p,footer:h,className:w,"data-testid":y,deployTarget:b}){let x=(0,m.useFeatureFlags)(),D=(0,n.useRef)(null);return(0,n.useEffect)(()=>{if(!e||o)return;let t=e=>{let t=e.target;!document.body.contains(t)||D.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:D,direction:"right",showCloseButton:!1,className:(0,i.cn)(g({size:u}),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:s})}),(0,t.jsx)(d.DrawerDescription,{asChild:!0,children:(0,t.jsx)("span",{className:"sr-only",children:s})}),(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)(s.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)(u.DeploymentStatusBadge,{status:n.status,url:n.url,targetId:e.targetId}):null]})}e.s(["BaseDrawer",()=>h])}]);
@@ -1 +0,0 @@
1
- (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,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)},54277,30090,e=>{"use strict";let t=(0,e.i(3645).default)("circle-x",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]]);e.s(["default",()=>t],30090),e.s(["CircleX",()=>t],54277)},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)},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])},69512,53360,e=>{"use strict";var t=e.i(3645);let r=(0,t.default)("trash-2",[["path",{d:"M10 11v6",key:"nco0om"}],["path",{d:"M14 11v6",key:"outv1u"}],["path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6",key:"miytrc"}],["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2",key:"e791ji"}]]);e.s(["default",()=>r],69512);let a=(0,t.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",()=>a],53360)},54793,7729,e=>{"use strict";var t=e.i(20314),r=e.i(31777);function a({icon:e,title:a,description:l,action:s,className:c,...n}){return(0,t.jsxs)("div",{className:(0,r.cn)("flex flex-col items-center gap-4 px-4 py-12 text-center",c),...n,children:[e?(0,t.jsx)("div",{className:"text-muted-foreground",children:e}):null,(0,t.jsx)("h3",{className:"text-lg font-semibold",children:a}),l?(0,t.jsx)("p",{className:"text-muted-foreground max-w-md text-sm",children:l}):null,s?(0,t.jsx)("div",{className:"mt-2",children:s}):null]})}e.s(["EmptyState",()=>a],7729),e.s([],54793)},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),r=e.i(94237),a=e.i(31777);let l=(0,r.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 s({className:e,variant:r,...s}){return(0,t.jsx)("div",{className:(0,a.cn)(l({variant:r}),e),...s})}e.s(["Badge",()=>s])},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,62178,92544,33334,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 r=e.i(21023);let a=(0,r.createServerReference)("4041eb7abd44f84a5ef5b5922c4f981a869216fe82",r.callServer,void 0,r.findSourceMapURL,"openIde");e.s(["openIde",()=>a],62178);let l=(0,r.createServerReference)("40e2e72c76dbed9b6061cc4e94b8c6c3b097c8df5b",r.callServer,void 0,r.findSourceMapURL,"openShell");e.s(["openShell",()=>l],92544);let s=(0,r.createServerReference)("40444c5d7be2f06440c18a726921d5acd6d4a47877",r.callServer,void 0,r.findSourceMapURL,"openFolder");e.s(["openFolder",()=>s],33334)},76852,e=>{"use strict";var t=e.i(79054),r=e.i(62178),a=e.i(92544),l=e.i(33334);function s(e){let[s,c]=(0,t.useState)(!1),[n,d]=(0,t.useState)(!1),[u,i]=(0,t.useState)(!1),[o,p]=(0,t.useState)(null),[f,h]=(0,t.useState)(null),[y,m]=(0,t.useState)(null),v=(0,t.useRef)(null),x=(0,t.useRef)(null),k=(0,t.useRef)(null);(0,t.useEffect)(()=>()=>{v.current&&clearTimeout(v.current),x.current&&clearTimeout(x.current),k.current&&clearTimeout(k.current)},[]);let b=(0,t.useCallback)(async(t,r,a,l,s)=>{if(e&&!s){l.current&&clearTimeout(l.current),r(!0),a(null);try{let e=await t();if(!e.success){let t=e.error??"An unexpected error occurred";a(t),l.current=setTimeout(()=>a(null),5e3)}}catch(e){a(e instanceof Error?e.message:"An unexpected error occurred"),l.current=setTimeout(()=>a(null),5e3)}finally{r(!1)}}},[e]);return{openInIde:(0,t.useCallback)(()=>b(()=>(0,r.openIde)({repositoryPath:e.repositoryPath}),c,p,v,s),[b,s,e]),openInShell:(0,t.useCallback)(()=>b(()=>(0,a.openShell)({repositoryPath:e.repositoryPath}),d,h,x,n),[b,n,e]),openFolder:(0,t.useCallback)(()=>b(()=>(0,l.openFolder)(e.repositoryPath),i,m,k,u),[b,u,e]),ideLoading:s,shellLoading:n,folderLoading:u,ideError:o,shellError:f,folderError:y}}e.s(["useRepositoryActions",()=>s])}]);
@@ -1 +0,0 @@
1
- (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,2287,e=>{"use strict";var t=e.i(20314),n=e.i(79054),r=e.i(90033),a=e.i(90537),a=a,o=e.i(31777);let l=r.Dialog.Root;r.Dialog.Trigger;let i=r.Dialog.Portal,s=r.Dialog.Close,u=n.forwardRef(({className:e,onClick:n,...a},l)=>(0,t.jsx)(r.Dialog.Overlay,{ref:l,className:(0,o.cn)("fixed inset-0 z-50 bg-black/80",e),onClick:e=>{e.stopPropagation(),n?.(e)},...a}));u.displayName=r.Dialog.Overlay.displayName;let d=n.forwardRef(({className:e,children:n,...l},s)=>(0,t.jsxs)(i,{children:[(0,t.jsx)(u,{}),(0,t.jsxs)(r.Dialog.Content,{ref:s,className:(0,o.cn)("bg-background 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 sm:rounded-lg",e),...l,children:[n,(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 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)(a.default,{className:"h-4 w-4"}),(0,t.jsx)("span",{className:"sr-only",children:"Close"})]})]})]}));d.displayName=r.Dialog.Content.displayName;let c=({className:e,...n})=>(0,t.jsx)("div",{className:(0,o.cn)("flex flex-col space-y-1.5 text-center sm:text-left",e),...n});c.displayName="DialogHeader";let f=({className:e,...n})=>(0,t.jsx)("div",{className:(0,o.cn)("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...n});f.displayName="DialogFooter";let p=n.forwardRef(({className:e,...n},a)=>(0,t.jsx)(r.Dialog.Title,{ref:a,className:(0,o.cn)("text-lg leading-none font-semibold tracking-tight",e),...n}));p.displayName=r.Dialog.Title.displayName;let m=n.forwardRef(({className:e,...n},a)=>(0,t.jsx)(r.Dialog.Description,{ref:a,className:(0,o.cn)("text-muted-foreground text-sm",e),...n}));m.displayName=r.Dialog.Description.displayName,e.s(["Dialog",()=>l,"DialogClose",()=>s,"DialogContent",()=>d,"DialogDescription",()=>m,"DialogFooter",()=>f,"DialogHeader",()=>c,"DialogTitle",()=>p],2287)},24042,64970,e=>{"use strict";var t=e.i(3645);let n=(0,t.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",()=>n],24042);let r=(0,t.default)("square",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}]]);e.s(["Square",()=>r],64970)},81803,72714,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:s,error:u,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:s,onClick:()=>{m.play(),i()},className:(0,a.cn)("gap-1.5",u&&"text-destructive hover:text-destructive",!u&&c&&"ghost"===f&&"text-muted-foreground cursor-pointer rounded-full transition-colors hover:text-blue-500"),children:[s?(0,t.jsx)(n.Loader2,{className:"size-4 animate-spin"}):u?(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)},99348,17466,e=>{"use strict";var t=e.i(20314),n=e.i(79054),r=e.i(83428),a=e.i(30702),o=e.i(38573),l=e.i(17406),i=e.i(81846),s=e.i(2287),u=e.i(21023);let d=(0,u.createServerReference)("40d4e98b1d059d05d973a59598504a0dec87bdbda7",u.callServer,void 0,u.findSourceMapURL,"getDeploymentLogs");function c({open:e,onOpenChange:r,targetId:a}){let{logs:o,isConnected:l}=function(e){let[t,r]=(0,n.useState)([]),[a,o]=(0,n.useState)(!1),l=(0,n.useRef)(null),i=(0,n.useCallback)(()=>{l.current&&(l.current.close(),l.current=null),o(!1)},[]);return(0,n.useEffect)(()=>{if(!e){r([]),o(!1);return}d(e).then(e=>{e&&r(e)}).catch(()=>{});let t=new EventSource(`/api/deployment-logs?targetId=${e}`);return l.current=t,t.onopen=()=>{o(!0)},t.addEventListener("log",e=>{let t=JSON.parse(e.data);r(e=>[...e,t])}),t.onerror=()=>{o(!1)},()=>{t.close(),l.current=null}},[e,i]),{logs:t,isConnected:a}}(e?a:null);return(0,t.jsx)(f,{open:e,onOpenChange:r,logs:o,isConnected:l})}function f({open:e,onOpenChange:r,logs:a,isConnected:l}){let i=(0,n.useRef)(null),u=(0,n.useRef)(!0),d=(0,n.useCallback)(()=>{let e=i.current;e&&(u.current=e.scrollTop+e.clientHeight>=e.scrollHeight-50)},[]);return(0,n.useEffect)(()=>{u.current&&i.current&&(i.current.scrollTop=i.current.scrollHeight)},[a]),(0,t.jsx)(s.Dialog,{open:e,onOpenChange:r,children:(0,t.jsxs)(s.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)(s.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)(o.Terminal,{className:"h-4 w-4 text-zinc-400"}),(0,t.jsx)(s.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 ${l?"bg-green-500":"bg-zinc-500"}`}),(0,t.jsx)("span",{className:"text-xs text-zinc-400",children:l?"Connected":"Disconnected"})]})]}),(0,t.jsxs)("div",{ref:i,onScroll:d,className:"flex-1 overflow-auto p-4 font-mono text-sm leading-relaxed",children:[0===a.length?(0,t.jsx)("p",{className:"text-zinc-500",children:"Waiting for log output..."}):a.map(e=>(0,t.jsx)(p,{entry:e},`${e.timestamp}-${e.stream}-${e.line}`)),!l&&a.length>0&&(0,t.jsx)("div",{className:"mt-2 border-t border-zinc-800 pt-2 text-zinc-500",children:"[Server stopped]"})]})]})})}function p({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 m({status:e,url:s,targetId:u}){let[d,f]=(0,n.useState)(!1),p=u&&(e===l.DeploymentState.Booting||e===l.DeploymentState.Ready);switch(e){case l.DeploymentState.Booting:return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)(i.Badge,{className:"border-transparent bg-blue-50 text-blue-700 hover:bg-blue-50",children:[(0,t.jsx)(r.Loader2,{className:"mr-1 h-3.5 w-3.5 animate-spin"}),"Starting...",p?(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(),f(!0)},children:(0,t.jsx)(o.Terminal,{className:"h-3 w-3"})}):null]}),p?(0,t.jsx)(c,{open:d,onOpenChange:f,targetId:u}):null]});case l.DeploymentState.Ready:return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)(i.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"}),s?(0,t.jsxs)("a",{href:s,target:"_blank",rel:"noopener noreferrer",className:"inline-flex items-center gap-1 hover:underline",onClick:e=>e.stopPropagation(),children:[s,(0,t.jsx)(a.ExternalLink,{className:"h-3 w-3"})]}):"Ready",p?(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(),f(!0)},children:(0,t.jsx)(o.Terminal,{className:"h-3 w-3"})}):null]}),p?(0,t.jsx)(c,{open:d,onOpenChange:f,targetId:u}):null]});default:return null}}e.s(["DeploymentStatusBadge",()=>m],17466),e.s([],99348)},8537,e=>{"use strict";var t=e.i(79054),n=e.i(18354),r=e.i(21023);let a=(0,r.createServerReference)("402f2a144f307b4ad787237b688038d6e991766068",r.callServer,void 0,r.findSourceMapURL,"deployFeature"),o=(0,r.createServerReference)("4077a9b009ed68dddc3408ce7d1f418ca41cc91965",r.callServer,void 0,r.findSourceMapURL,"deployRepository"),l=(0,r.createServerReference)("40aef7be3231b1e99b0bd67fe328489b0baa5c408e",r.callServer,void 0,r.findSourceMapURL,"stopDeployment"),i=(0,r.createServerReference)("405e449a48970373b1a4d18608b1e71c5b7b016396",r.callServer,void 0,r.findSourceMapURL,"getDeploymentStatus"),s=(0,n.createLogger)("[useDeployAction]");function u(e){let[n,r]=(0,t.useState)(!1),[u,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&&(s.debug("stopping polling"),clearInterval(w.current),w.current=null)},[]),D=(0,t.useCallback)(e=>{x(),s.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&&s.info(`poll state changed: ${b.current} → ${t.state}, url=${t.url}`),m(t.state),h(t.url)):(s.info(`poll result: ${t?`state=${t.state}`:"null (deployment gone)"} — stopping poll`),m(null),h(null),x()))},3e3)},[x]),j=(0,t.useCallback)(async()=>{if(!e)return void s.warn("deploy() called but input is null — no-op");if(n)return void s.warn("deploy() called but already loading — no-op");s.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(s.info("server action result:",t),!y.current)return void s.warn("component unmounted after deploy — discarding result");if(t.success)s.info(`deploy succeeded — initial state=${t.state}, starting polling`),m(t.state??null),h(null),D(e.targetId);else{let e=t.error??"An unexpected error occurred";s.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";s.error(`deploy threw exception: ${e}`,t),f(e),v.current=setTimeout(()=>f(null),5e3)}finally{y.current&&r(!1)}},[e,n,D]),R=(0,t.useCallback)(async()=>{if(e&&!u){s.info(`stop() — targetId="${e.targetId}"`),d(!0);try{let t=await l(e.targetId);if(s.info("stop result:",t),!y.current)return;t.success&&(x(),m(null),h(null))}catch(e){s.warn("stop error (non-critical):",e)}finally{y.current&&d(!1)}}},[e,u,x]);return{deploy:j,stop:R,deployLoading:n,stopLoading:u,deployError:c,status:p,url:g}}e.s(["useDeployAction",()=>u],8537)},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 s(){return/^((?!chrome|android).)*safari/i.test(navigator.userAgent)}function u(){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 D=new WeakMap;function j(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||D.set(e,r)}let R=e=>{switch(e){case"top":case"bottom":return!0;case"left":case"right":return!1;default:return e}};function C(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(", ")[R(t)?13:12]):(a=r.match(/^matrix\((.+)\)$/))?parseFloat(a[1].split(", ")[R(t)?5:4]):null}function T(e,t){if(!e)return()=>{};let n=e.style.cssText;return Object.assign(e.style,t),()=>{e.style.cssText=n}}let N=[.32,.72,0,1],E="vaul-dragging";function S(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 $({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=S(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,s=S(n);return[i,o.default.useCallback(t=>{if(l){let n="function"==typeof t?t(e):t;n!==e&&s(n)}else a(t)},[l,e,a,s])]}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:T=.25,scrollLockTimeout:S=100,dismissible:k=!0,handleOnly:M=!1,fadeFromIndex:O=m&&m.length-1,activeSnapPoint:z,setActiveSnapPoint:L,fixed:B,modal:F=!0,onClose:A,nested:I,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]=$({defaultProp:q,prop:e,onChange:e=>{null==n||n(e),e||I||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),es=o.default.useRef(null),eu=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),eD=o.default.useCallback(e=>{m&&e===eN.length-1&&(es.current=new Date)},[]),{activeSnapPoint:ej,activeSnapPointIndex:eR,setActiveSnapPoint:eC,onRelease:eT,snapPointsOffset:eN,onDrag:eE,shouldFade:eS,getPercentageDragged:e$}=function({activeSnapPointProp:e,setActiveSnapPointProp:t,snapPoints:n,drawerRef:r,overlayRef:a,fadeFromIndex:l,onSnapPointChange:i,direction:s="bottom",container:u,snapToSequentialPoint:d}){let[c,f]=$({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=u?{width:u.getBoundingClientRect().width,height:u.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)),R(s)){let a=n?r:p?e*t.height:0;return p?"bottom"===s?t.height-a:-t.height+a:a}let a=n?r:p?e*t.width:0;return p?"right"===s?t.width-a:-t.width+a:a}))?e:[]},[n,p,u]),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),j(r.current,{transition:`transform 0.5s cubic-bezier(${N.join(",")})`,transform:R(s)?`translate3d(0, ${e}px, 0)`:`translate3d(${e}px, 0, 0)`}),w&&o!==w.length-1&&void 0!==l&&o!==l&&o<l?j(a.current,{transition:`opacity 0.5s cubic-bezier(${N.join(",")})`,opacity:"0"}):j(a.current,{transition:`opacity 0.5s cubic-bezier(${N.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"===s||"right"===s?(null!=y?y:0)-e:(null!=y?y:0)+e,u=h===l-1,c=0===h,f=e>0;if(u&&j(a.current,{transition:`opacity 0.5s cubic-bezier(${N.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=R(s)?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"===s||"right"===s?y-e:y+e;("bottom"===s||"right"===s)&&t<w[w.length-1]||("top"===s||"left"===s)&&t>w[w.length-1]||j(r.current,{transform:R(s)?`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:eD,direction:W,container:J,snapToSequentialPoint:U});!function(e={}){let{isDisabled:n}=e;c(()=>{if(!n){var e,r,a;let n,o,l,i,s,d,c;return 1==++v&&u()&&(l=0,i=window.pageXOffset,s=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,s)}),()=>{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,u]=o.default.useState(()=>"u">typeof window?window.location.href:""),d=o.default.useRef(0),c=o.default.useCallback(()=>{if(s()&&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(s()&&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?u(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!=I&&I,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?C(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(es.current&&l.getTime()-es.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()<S&&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(E),ef.current=!1,ea(!1),ed.current=new Date),null==A||A(),e||ee(!1),setTimeout(()=>{m&&eC(m[0])},500)}function ez(){if(!ew.current)return;let e=document.querySelector("[data-vaul-drawer-wrapper]"),t=C(ew.current,W);j(ew.current,{transform:"translate3d(0, 0, 0)",transition:`transform 0.5s cubic-bezier(${N.join(",")})`}),j(ei.current,{transition:`opacity 0.5s cubic-bezier(${N.join(",")})`,opacity:"1"}),h&&t&&t>0&&Z&&j(e,{borderRadius:"8px",overflow:"hidden",...R(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(${N.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&&eN&&eR&&(r+=eN[eR]||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)}},[eR,m,eN]),o.default.useEffect(()=>(Z&&(j(document.documentElement,{scrollBehavior:"auto"}),es.current=new Date),()=>{!function(e,t){if(!e||!(e instanceof HTMLElement))return;let n=D.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:ej,snapPoints:m,setActiveSnapPoint:eC,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),eu.current=new Date,u()&&window.addEventListener("touchend",()=>ef.current=!1,{once:!0}),e.target.setPointerCapture(e.pointerId),em.current=R(W)?e.pageY:e.pageX)},onRelease:function(e){var t,n;if(!er||!ew.current)return;ew.current.classList.remove(E),ef.current=!1,ea(!1),ed.current=new Date;let r=C(ew.current,W);if(!e||!eM(e.target,!1)||!r||Number.isNaN(r)||null===eu.current)return;let a=ed.current.getTime()-eu.current.getTime(),o=em.current-(R(W)?e.pageY:e.pageX),l=Math.abs(o)/a;if(l>.05&&(el(!0),setTimeout(()=>{el(!1)},200)),m){eT({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),s=Math.min(null!=(n=ew.current.getBoundingClientRect().width)?n:0,window.innerWidth);if(Math.abs(r)>=("left"===W||"right"===W?s:i)*T){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-(R(W)?e.pageY:e.pageX))*t,r=n>0,a=m&&!k&&!r;if(a&&0===eR)return;let o=Math.abs(n),l=document.querySelector("[data-vaul-drawer-wrapper]"),s=o/("bottom"===W||"top"===W?ey.current:eb.current),u=e$(o,r);if(null!==u&&(s=u),a&&s>=1||!ef.current&&!eM(e.target,r))return;if(ew.current.classList.add(E),ef.current=!0,j(ew.current,{transition:"none"}),j(ei.current,{transition:"none"}),m&&eE({draggedDistance:n}),r&&!m){let e=Math.min(-(8*(Math.log(n+1)-2)*1),0)*t;j(ew.current,{transform:R(W)?`translate3d(0, ${e}px, 0)`:`translate3d(${e}px, 0, 0)`});return}let d=1-s;if((eS||O&&eR===O-1)&&(null==i||i(e,s),j(ei.current,{opacity:`${d}`,transition:"none"},!0)),l&&ei.current&&h){let e=Math.min(eP()+s*(1-eP()),1),t=8-8*s,n=Math.max(0,14-14*s);j(l,{borderRadius:`${t}px`,transform:R(W)?`scale(${e}) translate3d(0, ${n}px, 0)`:`scale(${e}) translate3d(${n}px, 0, 0)`,transition:"none"},!0)}if(!m){let e=o*t;j(ew.current,{transform:R(W)?`translate3d(0, ${e}px, 0)`:`translate3d(${e}px, 0, 0)`})}}},dismissible:k,shouldAnimate:eh,handleOnly:M,isOpen:Z,isDragging:er,shouldFade:eS,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;j(ew.current,{transform:R(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),j(ew.current,{transition:`transform 0.5s cubic-bezier(${N.join(",")})`,transform:R(W)?`scale(${t}) translate3d(0, ${n}px, 0)`:`scale(${t}) translate3d(${n}px, 0, 0)`}),!e&&ew.current&&(ep.current=setTimeout(()=>{let e=C(ew.current,W);j(ew.current,{transition:"none",transform:R(W)?`translate3d(0, ${e}px, 0)`:`translate3d(${e}px, 0, 0)`})},500))},onNestedRelease:function(e,t){let n=R(W)?window.innerHeight:window.innerWidth,r=t?(n-16)/n:1,a=t?-16:0;t&&j(ew.current,{transition:`transform 0.5s cubic-bezier(${N.join(",")})`,transform:R(W)?`scale(${r}) translate3d(0, ${a}px, 0)`:`scale(${r}) translate3d(${a}px, 0, 0)`})},keyboardIsOpen:eg,modal:F,snapPointsOffset:eN,activeSnapPointIndex:eR,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:s,isOpen:u,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":u&&p?"true":"false","data-vaul-snap-points-overlay":u&&s?"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:s,onPress:u,onRelease:d,onDrag:c,keyboardIsOpen:f,snapPointsOffset:p,activeSnapPointIndex:m,modal:g,isOpen:h,direction:v,snapPoints:w,container:y,handleOnly:b,shouldAnimate:D,autoFocus:j}=i(),[C,E]=o.default.useState(!1),S=x(l,s),$=o.default.useRef(null),P=o.default.useRef(null),M=o.default.useRef(!1),O=w&&w.length>0;function z(e){$.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),s=(0,o.useMemo)(()=>document.body.style.backgroundColor,[]);function u(){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?T(document.body,{background:"black"}):k,T(t,{transformOrigin:R(e)?"top":"left",transitionProperty:"transform, border-radius",transitionDuration:"0.5s",transitionTimingFunction:`cubic-bezier(${N.join(",")})`}));let n=T(t,{borderRadius:"8px",overflow:"hidden",...R(e)?{transform:`scale(${u()}) translate3d(0, calc(env(safe-area-inset-top) + 14px), 0)`}:{transform:`scale(${u()}) translate3d(calc(env(safe-area-inset-top) + 14px), 0, 0)`}});return()=>{n(),l.current=window.setTimeout(()=>{s?document.body.style.background=s:document.body.style.removeProperty("background")},500)}}},[t,n,s])}(),o.default.useEffect(()=>{O&&window.requestAnimationFrame(()=>{E(!0)})},[]),o.default.createElement(a.Content,{"data-vaul-drawer-direction":v,"data-vaul-drawer":"","data-vaul-delayed-snap-points":C?"true":"false","data-vaul-snap-points":h&&O?"true":"false","data-vaul-custom-container":y?"true":"false","data-vaul-animate":(null==D?void 0:D.current)?"true":"false",...r,ref:S,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),$.current={x:e.pageX,y:e.pageY},u(e))},onOpenAutoFocus:e=>{null==n||n(e),j||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),!$.current))return;let t=e.pageY-$.current.y,n=e.pageX-$.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)&&($.current=null)},onPointerUp:e=>{null==r.onPointerUp||r.onPointerUp.call(r,e),$.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:s,activeSnapPoint:u,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(),!s||0===s.length){c||a();return}if(u===s[s.length-1]&&c)return a();let t=s.findIndex(e=>e===u);-1===t||d(s[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:s}=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:s,...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 A({...e}){return(0,n.jsx)(B.Root,{"data-slot":"drawer",...e})}function I({...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)(I,{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",()=>A,"DrawerContent",()=>W,"DrawerDescription",()=>X,"DrawerFooter",()=>Y,"DrawerHeader",()=>q,"DrawerOverlay",()=>H,"DrawerTitle",()=>U],45811)},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 s=e.i(72714);e.i(99348);var u=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-xl"}},defaultVariants:{size:"sm"}});function h({open:e,onClose:a,modal:o=!1,dismissOnOutsideClick:l=!1,title:s="Drawer",size:u,header:f,children:p,footer:h,className:w,"data-testid":y,deployTarget:b}){let x=(0,m.useFeatureFlags)(),D=(0,n.useRef)(null);return(0,n.useEffect)(()=>{if(!e||o)return;let t=e=>{let t=e.target;!document.body.contains(t)||D.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:D,direction:"right",showCloseButton:!1,className:(0,i.cn)(g({size:u}),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:s})}),(0,t.jsx)(d.DrawerDescription,{asChild:!0,children:(0,t.jsx)("span",{className:"sr-only",children:s})}),(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)(s.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)(u.DeploymentStatusBadge,{status:n.status,url:n.url,targetId:e.targetId}):null]})}e.s(["BaseDrawer",()=>h])}]);
@@ -1 +0,0 @@
1
- (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,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)},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])},41957,e=>{"use strict";var t=e.i(20314),r=e.i(79054),a=e.i(87620),s=r.forwardRef((e,r)=>(0,t.jsx)(a.Primitive.label,{...e,ref:r,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 o=e.i(27572),o=o,n=e.i(94237),i=e.i(31777);let l=(0,n.cva)("text-sm leading-none font-medium peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),d=r.forwardRef(({className:e,...r},a)=>(0,t.jsx)(o.Root,{ref:a,className:(0,i.cn)(l(),e),...r}));d.displayName=o.Root.displayName,e.s(["Label",()=>d],41957)},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),n=e.i(53532),i=e.i(41687),l=e.i(56720),d=e.i(13123),c=e.i(52740),u=e.i(39979),p=e.i(85995),h=e.i(87620),f=e.i(86874),m=e.i(36589),x=e.i(73772),g=e.i(13044),v="Popover",[b,j]=(0,o.createContextScope)(v,[c.createPopperScope]),w=(0,c.createPopperScope)(),[y,C]=b(v),N=e=>{let{__scopePopover:a,children:s,open:o,defaultOpen:n,onOpenChange:i,modal:l=!1}=e,u=w(a),p=r.useRef(null),[h,f]=r.useState(!1),[x,g]=(0,m.useControllableState)({prop:o,defaultProp:n??!1,onChange:i,caller:v});return(0,t.jsx)(c.Root,{...u,children:(0,t.jsx)(y,{scope:a,contentId:(0,d.useId)(),triggerRef:p,open:x,onOpenChange:g,onOpenToggle:r.useCallback(()=>g(e=>!e),[g]),hasCustomAnchor:h,onCustomAnchorAdd:r.useCallback(()=>f(!0),[]),onCustomAnchorRemove:r.useCallback(()=>f(!1),[]),modal:l,children:s})})};N.displayName=v;var k="PopoverAnchor",P=r.forwardRef((e,a)=>{let{__scopePopover:s,...o}=e,n=C(k,s),i=w(s),{onCustomAnchorAdd:l,onCustomAnchorRemove:d}=n;return r.useEffect(()=>(l(),()=>d()),[l,d]),(0,t.jsx)(c.Anchor,{...i,...o,ref:a})});P.displayName=k;var S="PopoverTrigger",T=r.forwardRef((e,r)=>{let{__scopePopover:o,...n}=e,i=C(S,o),l=w(o),d=(0,s.useComposedRefs)(r,i.triggerRef),u=(0,t.jsx)(h.Primitive.button,{type:"button","aria-haspopup":"dialog","aria-expanded":i.open,"aria-controls":i.contentId,"data-state":$(i.open),...n,ref:d,onClick:(0,a.composeEventHandlers)(e.onClick,i.onOpenToggle)});return i.hasCustomAnchor?u:(0,t.jsx)(c.Anchor,{asChild:!0,...l,children:u})});T.displayName=S;var R="PopoverPortal",[A,E]=b(R,{forceMount:void 0}),F=e=>{let{__scopePopover:r,forceMount:a,children:s,container:o}=e,n=C(R,r);return(0,t.jsx)(A,{scope:r,forceMount:a,children:(0,t.jsx)(p.Presence,{present:a||n.open,children:(0,t.jsx)(u.Portal,{asChild:!0,container:o,children:s})})})};F.displayName=R;var M="PopoverContent",D=r.forwardRef((e,r)=>{let a=E(M,e.__scopePopover),{forceMount:s=a.forceMount,...o}=e,n=C(M,e.__scopePopover);return(0,t.jsx)(p.Presence,{present:s||n.open,children:n.modal?(0,t.jsx)(z,{...o,ref:r}):(0,t.jsx)(L,{...o,ref:r})})});D.displayName=M;var O=(0,f.createSlot)("PopoverContent.RemoveScroll"),z=r.forwardRef((e,o)=>{let n=C(M,e.__scopePopover),i=r.useRef(null),l=(0,s.useComposedRefs)(o,i),d=r.useRef(!1);return r.useEffect(()=>{let e=i.current;if(e)return(0,x.hideOthers)(e)},[]),(0,t.jsx)(g.RemoveScroll,{as:O,allowPinchZoom:!0,children:(0,t.jsx)(I,{...e,ref:l,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:(0,a.composeEventHandlers)(e.onCloseAutoFocus,e=>{e.preventDefault(),d.current||n.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(M,e.__scopePopover),o=r.useRef(!1),n=r.useRef(!1);return(0,t.jsx)(I,{...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,n.current=!1},onInteractOutside:t=>{e.onInteractOutside?.(t),t.defaultPrevented||(o.current=!0,"pointerdown"===t.detail.originalEvent.type&&(n.current=!0));let r=t.target;s.triggerRef.current?.contains(r)&&t.preventDefault(),"focusin"===t.detail.originalEvent.type&&n.current&&t.preventDefault()}})}),I=r.forwardRef((e,r)=>{let{__scopePopover:a,trapFocus:s,onOpenAutoFocus:o,onCloseAutoFocus:d,disableOutsidePointerEvents:u,onEscapeKeyDown:p,onPointerDownOutside:h,onFocusOutside:f,onInteractOutside:m,...x}=e,g=C(M,a),v=w(a);return(0,i.useFocusGuards)(),(0,t.jsx)(l.FocusScope,{asChild:!0,loop:!0,trapped:s,onMountAutoFocus:o,onUnmountAutoFocus:d,children:(0,t.jsx)(n.DismissableLayer,{asChild:!0,disableOutsidePointerEvents:u,onInteractOutside:m,onEscapeKeyDown:p,onPointerDownOutside:h,onFocusOutside:f,onDismiss:()=>g.onOpenChange(!1),children:(0,t.jsx)(c.Content,{"data-state":$(g.open),role:"dialog",id:g.contentId,...v,...x,ref:r,style:{...x.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)"}})})})}),B="PopoverClose",U=r.forwardRef((e,r)=>{let{__scopePopover:s,...o}=e,n=C(B,s);return(0,t.jsx)(h.Primitive.button,{type:"button",...o,ref:r,onClick:(0,a.composeEventHandlers)(e.onClick,()=>n.onOpenChange(!1))})});U.displayName=B;var H=r.forwardRef((e,r)=>{let{__scopePopover:a,...s}=e,o=w(a);return(0,t.jsx)(c.Arrow,{...o,...s,ref:r})});function $(e){return e?"open":"closed"}H.displayName="PopoverArrow",e.s(["Anchor",()=>P,"Arrow",()=>H,"Close",()=>U,"Content",()=>D,"Popover",()=>N,"PopoverAnchor",()=>P,"PopoverArrow",()=>H,"PopoverClose",()=>U,"PopoverContent",()=>D,"PopoverPortal",()=>F,"PopoverTrigger",()=>T,"Portal",()=>F,"Root",()=>N,"Trigger",()=>T,"createPopoverScope",()=>j],89920);var q=e.i(89920),q=q,G=e.i(31777);let _=q.Root,K=q.Trigger;q.Anchor;let V=r.forwardRef(({className:e,align:r="center",sideOffset:a=4,...s},o)=>(0,t.jsx)(q.Portal,{children:(0,t.jsx)(q.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=q.Content.displayName,e.s(["Popover",()=>_,"PopoverContent",()=>V,"PopoverTrigger",()=>K],90382)},51911,23405,e=>{"use strict";var t=e.i(20314),r=e.i(79054),a=e.i(91967),s=e.i(5978),o=e.i(22528),n=e.i(36589);function i(e){let t=r.useRef({value:e,previous:e});return r.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}e.s(["usePrevious",()=>i],23405);var l=e.i(77624),d=e.i(87620),c="Switch",[u,p]=(0,o.createContextScope)(c),[h,f]=u(c),m=r.forwardRef((e,o)=>{let{__scopeSwitch:i,name:l,checked:u,defaultChecked:p,required:f,disabled:m,value:x="on",onCheckedChange:g,form:j,...w}=e,[y,C]=r.useState(null),N=(0,s.useComposedRefs)(o,e=>C(e)),k=r.useRef(!1),P=!y||j||!!y.closest("form"),[S,T]=(0,n.useControllableState)({prop:u,defaultProp:p??!1,onChange:g,caller:c});return(0,t.jsxs)(h,{scope:i,checked:S,disabled:m,children:[(0,t.jsx)(d.Primitive.button,{type:"button",role:"switch","aria-checked":S,"aria-required":f,"data-state":b(S),"data-disabled":m?"":void 0,disabled:m,value:x,...w,ref:N,onClick:(0,a.composeEventHandlers)(e.onClick,e=>{T(e=>!e),P&&(k.current=e.isPropagationStopped(),k.current||e.stopPropagation())})}),P&&(0,t.jsx)(v,{control:y,bubbles:!k.current,name:l,value:x,checked:S,required:f,disabled:m,form:j,style:{transform:"translateX(-100%)"}})]})});m.displayName=c;var x="SwitchThumb",g=r.forwardRef((e,r)=>{let{__scopeSwitch:a,...s}=e,o=f(x,a);return(0,t.jsx)(d.Primitive.span,{"data-state":b(o.checked),"data-disabled":o.disabled?"":void 0,...s,ref:r})});g.displayName=x;var v=r.forwardRef(({__scopeSwitch:e,control:a,checked:o,bubbles:n=!0,...d},c)=>{let u=r.useRef(null),p=(0,s.useComposedRefs)(u,c),h=i(o),f=(0,l.useSize)(a);return r.useEffect(()=>{let e=u.current;if(!e)return;let t=Object.getOwnPropertyDescriptor(window.HTMLInputElement.prototype,"checked").set;if(h!==o&&t){let r=new Event("click",{bubbles:n});t.call(e,o),e.dispatchEvent(r)}},[h,o,n]),(0,t.jsx)("input",{type:"checkbox","aria-hidden":!0,defaultChecked:o,...d,tabIndex:-1,ref:p,style:{...d.style,...f,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})});function b(e){return e?"checked":"unchecked"}v.displayName="SwitchBubbleInput",e.s(["Root",()=>m,"Switch",()=>m,"SwitchThumb",()=>g,"Thumb",()=>g,"createSwitchScope",()=>p],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)},31068,67983,e=>{"use strict";var t=e.i(21023);let r=(0,t.createServerReference)("000927803f6ec5994ee50a3f895453408f85e2aca7",t.callServer,void 0,t.findSourceMapURL,"getAllAgentModels");e.s(["getAllAgentModels",()=>r],31068);let a=(0,t.createServerReference)("60f0b7477c1ca540a99c9b47cdd29542eabd637829",t.callServer,void 0,t.findSourceMapURL,"updateAgentAndModel");e.s(["updateAgentAndModel",()=>a],67983)},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),n=e.i(31068),i=e.i(67983),l=e.i(86782),d=e.i(29847),c=e.i(35364),u=e.i(90382),p=e.i(31777);function h({initialAgentType:e,initialModel:h,onAgentModelChange:f,disabled:m,className:x,mode:g}){let[v,b]=r.useState(!1),[j,w]=r.useState([]),[y,C]=r.useState(!0),[N,k]=r.useState(e),[P,S]=r.useState(h),[T,R]=r.useState(null),[A,E]=r.useState(0),[F,M]=r.useState(null);r.useEffect(()=>{(0,n.getAllAgentModels)().then(w).finally(()=>C(!1))},[]),r.useEffect(()=>{if(!v){let e=setTimeout(()=>{E(0),M(null)},150);return()=>clearTimeout(e)}},[v]);let D=async(e,t)=>{if(b(!1),e!==N||t!==P){if("override"===g){k(e),S(t),f?.(e,t);return}k(e),S(t),f?.(e,t),R(null);try{let r=await (0,i.updateAgentAndModel)(e,t||null);r.ok||(k(N),S(P),f?.(N,P),R(r.error??"Failed to save"))}catch{k(N),S(P),f?.(N,P),R("Failed to save")}}},O=(0,l.getAgentTypeIcon)(N),z=j.find(e=>e.agentType===N)?.label??N,L=P?(0,d.getModelMeta)(P).displayName||P:null,I=F?j.find(e=>e.agentType===F):null;return(0,t.jsxs)("div",{className:(0,p.cn)("flex flex-col gap-1",x),children:[(0,t.jsxs)(u.Popover,{open:v,onOpenChange:b,children:[(0,t.jsx)(u.PopoverTrigger,{asChild:!0,children:(0,t.jsx)(c.Button,{variant:"outline",role:"combobox","aria-expanded":v,disabled:(m??!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)(O,{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)(u.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=N===e.agentType,n=e.models.length>0;return(0,t.jsxs)("button",{type:"button",className:(0,p.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:()=>{n?(M(e.agentType),requestAnimationFrame(()=>{requestAnimationFrame(()=>E(1))})):D(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&&!n?(0,t.jsx)(a.Check,{className:"text-primary h-3.5 w-3.5 shrink-0"}):null,n?(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:I?(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(()=>M(null),220)},children:[(0,t.jsx)(s.ChevronLeft,{className:"h-3.5 w-3.5"}),I.label]}),I.models.map(e=>{let r=N===I.agentType&&P===e.id;return(0,t.jsxs)("button",{type:"button",className:(0,p.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:()=>D(I.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})]})})]}),!!T&&(0,t.jsx)("p",{className:"text-destructive text-sm",children:T})]})}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 n=(0,o.createServerReference)("40d0faa4f546501ef93b80ac4ed9b7a741026d5e69",o.callServer,void 0,o.findSourceMapURL,"createFeature");var i=e.i(91891),i=i,l=e.i(3645);let d=(0,l.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 c=e.i(16298),c=c;let u=(0,l.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 p=e.i(93752),p=p,h=e.i(69512),h=h;let f=(0,l.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 m=e.i(1012),m=m,x=e.i(53360),g=e.i(31777),v=e.i(8361);e.i(1650);var b=e.i(11495),j=e.i(45811),w=e.i(35364),y=e.i(98127);function C({className:e,...r}){return(0,t.jsx)("textarea",{"data-slot":"textarea",className:(0,g.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),...r})}var N=e.i(41957),k=e.i(81846),P=e.i(90382),S=e.i(51911),T=e.i(2828),R=e.i(30153),A=e.i(41413);async function E(){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}let F=[{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."}],M={allowPrd:!1,allowPlan:!1,allowMerge:!1};function D({open:e,onClose:a,onSubmit:s,repositoryPath:o,isSubmitting:n=!1,workflowDefaults:l,features:d,initialParentId:c,currentAgentType:u,currentModel:p}){let h=(0,v.useSoundAction)("create"),f=l?.approvalGates??M,m=l?.push??!1,y=l?.openPr??!1,[P,D]=(0,r.useState)(""),[L,I]=(0,r.useState)([]),[B,U]=(0,r.useState)({...f}),[H,$]=(0,r.useState)(m),[q,G]=(0,r.useState)(y),[_,K]=(0,r.useState)(void 0),[V,W]=(0,r.useState)(!1),[X,Z]=(0,r.useState)(void 0),[Y,J]=(0,r.useState)(void 0);(0,r.useEffect)(()=>{l&&(U({...l.approvalGates}),$(l.push),G(l.openPr))},[l]),(0,r.useEffect)(()=>{e&&c&&K(c)},[e,c]);let Q=(0,r.useCallback)(()=>{D(""),I([]),U({...f}),$(m),G(y),K(void 0),W(!1),Z(void 0),J(void 0)},[f,m,y]),ee=""!==P.trim()||L.length>0,{attemptClose:et}=(0,R.useGuardedDrawerClose)({open:e,isDirty:ee,onClose:a,onReset:Q}),er=(0,r.useCallback)(e=>{e.preventDefault(),P.trim()&&(h.play(),s({description:P.trim(),attachments:L,repositoryPath:o,approvalGates:{allowPrd:B.allowPrd??!1,allowPlan:B.allowPlan??!1,allowMerge:B.allowMerge??!1},push:H||q,openPr:q,fast:V,...X?{agentType:X}:{},...Y?{model:Y}:{},..._?{parentId:_}:{}}),Q())},[P,L,B,o,s,H,q,V,X,Y,_,h,Q]),ea=(0,r.useCallback)(async()=>{try{let e=await E();e&&I(t=>[...t,...e])}catch{}},[]),es=(0,r.useCallback)(e=>{I(t=>t.filter(t=>t.path!==e))},[]),eo=(0,r.useRef)(null),en=(0,r.useCallback)(e=>{(e.ctrlKey||e.metaKey)&&"Enter"===e.key&&(e.preventDefault(),eo.current?.requestSubmit())},[]),ei=d&&d.length>0;return(0,t.jsx)(b.BaseDrawer,{open:e,onClose:et,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)(j.DrawerTitle,{children:"NEW FEATURE"})]}),n?(0,t.jsx)(j.DrawerDescription,{asChild:!0,children:(0,t.jsx)("div",{children:(0,t.jsx)(k.Badge,{variant:"secondary",children:"Creating..."})})}):null]}),footer:(0,t.jsxs)("div",{className:"flex flex-row justify-end gap-2",children:[(0,t.jsx)(w.Button,{variant:"outline",onClick:et,disabled:n,children:"Cancel"}),(0,t.jsx)(w.Button,{type:"submit",form:"create-feature-form",disabled:!P.trim()||n,children:n?"Creating...":"+ Create Feature"})]}),children:(0,t.jsx)("div",{className:"overflow-y-auto p-4",children:(0,t.jsx)(T.TooltipProvider,{delayDuration:400,children:(0,t.jsxs)("form",{ref:eo,id:"create-feature-form",onSubmit:er,className:"flex flex-col gap-4",children:[(0,t.jsxs)("div",{className:"flex flex-col gap-1.5",children:[(0,t.jsx)(N.Label,{htmlFor:"feature-description",className:"text-muted-foreground text-xs font-semibold tracking-wider",children:"DESCRIBE YOUR FEATURE"}),(0,t.jsxs)("div",{className:"border-input focus-within:ring-ring/50 focus-within:border-ring overflow-hidden rounded-md border shadow-xs transition-[color,box-shadow] focus-within:ring-[3px]",children:[(0,t.jsx)(C,{id:"feature-description",placeholder:"e.g. Add GitHub OAuth login with callback handling and token refresh...",value:P,onChange:e=>D(e.target.value),onKeyDown:en,rows:7,required:!0,disabled:n,className:"field-sizing-fixed min-h-42! resize-none rounded-none border-0 shadow-none focus-visible:ring-0"}),(0,t.jsxs)("div",{className:"border-input flex items-center gap-3 border-t px-3 py-1.5",children:[(0,t.jsx)(A.AgentModelPicker,{initialAgentType:X??u??"claude-code",initialModel:Y??p??"claude-sonnet-4-6",mode:"override",onAgentModelChange:(e,t)=>{Z(e),J(t)},disabled:n,className:"w-55"}),(0,t.jsxs)(T.Tooltip,{children:[(0,t.jsx)(T.TooltipTrigger,{asChild:!0,children:(0,t.jsxs)("div",{className:"ml-auto flex cursor-pointer items-center gap-2",children:[(0,t.jsx)(S.Switch,{id:"fast-mode",checked:V,onCheckedChange:W,disabled:n}),(0,t.jsxs)(N.Label,{htmlFor:"fast-mode",className:"flex cursor-pointer items-center gap-1 text-sm font-medium",children:[(0,t.jsx)(x.Zap,{className:"h-3.5 w-3.5"}),"Fast Mode"]})]})}),(0,t.jsx)(T.TooltipContent,{side:"bottom",children:"Skip SDLC phases and implement directly from your prompt."})]})]})]})]}),ei&&void 0!==c?(0,t.jsxs)("div",{className:"flex flex-col gap-1.5",children:[(0,t.jsx)(N.Label,{htmlFor:"parent-feature",className:"text-muted-foreground text-xs font-semibold tracking-wider",children:"PARENT FEATURE"}),(0,t.jsx)(O,{features:d,value:_,onChange:K,disabled:n})]}):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)(T.Tooltip,{children:[(0,t.jsx)(T.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)(T.TooltipContent,{side:"bottom",children:"Auto-approve phase transitions without manual review."})]}),(0,t.jsx)("div",{className:"flex flex-1 items-center gap-4",children:F.map(e=>(0,t.jsxs)(T.Tooltip,{children:[(0,t.jsx)(T.TooltipTrigger,{asChild:!0,children:(0,t.jsxs)("div",{className:"flex cursor-pointer items-center gap-1.5",children:[(0,t.jsx)(S.Switch,{id:`approve-${e.id}`,size:"sm",checked:B[e.id]??!1,onCheckedChange:t=>U(r=>({...r,[e.id]:t})),disabled:n||V&&("allowPrd"===e.id||"allowPlan"===e.id)}),(0,t.jsx)(N.Label,{htmlFor:`approve-${e.id}`,className:"cursor-pointer text-xs font-medium",children:e.label})]})}),(0,t.jsx)(T.TooltipContent,{side:"bottom",children:V&&("allowPrd"===e.id||"allowPlan"===e.id)?"Skipped in Fast Mode":e.description})]},e.id))}),(0,t.jsxs)(T.Tooltip,{children:[(0,t.jsx)(T.TooltipTrigger,{asChild:!0,children:(0,t.jsx)("button",{type:"button",onClick:()=>{let e=F.every(e=>B[e.id]),t={};for(let r of F)t[r.id]=!e;U(t)},disabled:n,className:(0,g.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",F.every(e=>B[e.id])&&"text-primary"),children:"All"})}),(0,t.jsx)(T.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.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)(T.Tooltip,{children:[(0,t.jsx)(T.TooltipTrigger,{asChild:!0,children:(0,t.jsxs)("div",{className:"flex cursor-pointer items-center gap-1.5",children:[(0,t.jsx)(S.Switch,{id:"push",size:"sm",checked:H||q,onCheckedChange:e=>{$(e),!e&&q&&G(!1)},disabled:n}),(0,t.jsx)(N.Label,{htmlFor:"push",className:"cursor-pointer text-xs font-medium",children:"Push"})]})}),(0,t.jsx)(T.TooltipContent,{side:"bottom",children:"Push branch to remote after implementation."})]}),(0,t.jsxs)(T.Tooltip,{children:[(0,t.jsx)(T.TooltipTrigger,{asChild:!0,children:(0,t.jsxs)("div",{className:"flex cursor-pointer items-center gap-1.5",children:[(0,t.jsx)(S.Switch,{id:"open-pr",size:"sm",checked:q,onCheckedChange:G,disabled:n}),(0,t.jsx)(N.Label,{htmlFor:"open-pr",className:"cursor-pointer text-xs font-medium",children:"PR"})]})}),(0,t.jsx)(T.TooltipContent,{side:"bottom",children:"Open a pull request after pushing."})]})]})]})]}),(0,t.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,t.jsxs)("div",{className:"flex items-center justify-between",children:[(0,t.jsxs)(N.Label,{className:"text-muted-foreground text-xs font-semibold tracking-wider",children:["ATTACHMENTS",L.length>0&&(0,t.jsxs)("span",{className:"text-muted-foreground/60 ml-1.5",children:["(",L.length,")"]})]}),(0,t.jsxs)(w.Button,{type:"button",variant:"outline",size:"xs",onClick:ea,disabled:n,children:[(0,t.jsx)(i.default,{className:"size-3"}),"Add Files"]})]}),L.length>0&&(0,t.jsx)("div",{className:"flex flex-col gap-2",children:L.map(e=>(0,t.jsx)(z,{file:e,onRemove:()=>es(e.path),disabled:n},e.path))})]})]})})})})}function O({features:e,value:a,onChange:s,disabled:o}){let[n,i]=(0,r.useState)(!1),[l,d]=(0,r.useState)(""),c=(0,r.useRef)(null),u=e.find(e=>e.id===a),p=l.trim()?e.filter(e=>e.name.toLowerCase().includes(l.toLowerCase())||e.id.toLowerCase().includes(l.toLowerCase())):e,h=(0,r.useCallback)(e=>{s(e),i(!1),d("")},[s]);return(0,r.useEffect)(()=>{n?setTimeout(()=>c.current?.focus(),0):d("")},[n]),(0,t.jsxs)(P.Popover,{open:n,onOpenChange:i,children:[(0,t.jsx)(P.PopoverTrigger,{asChild:!0,children:(0,t.jsxs)("button",{id:"parent-feature",type:"button",role:"combobox","aria-expanded":n,"aria-label":"Parent Feature",disabled:o,"data-testid":"parent-feature-combobox",className:(0,g.cn)("border-input bg-background ring-offset-background focus:ring-ring flex h-9 w-full items-center justify-between rounded-md border px-3 py-2 text-sm focus:ring-2 focus:ring-offset-2 focus:outline-none disabled:cursor-not-allowed disabled:opacity-50",!u&&"text-muted-foreground"),children:[(0,t.jsx)("span",{className:"truncate",children:u?`${u.name} (${u.id.slice(0,8)})`:"Select parent feature..."}),(0,t.jsx)(f,{className:"ml-2 h-4 w-4 shrink-0 opacity-50"})]})}),(0,t.jsx)(P.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)(y.Input,{ref:c,placeholder:"Search features...",value:l,onChange:e=>d(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:()=>h(void 0),className:(0,g.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)(m.default,{className:(0,g.cn)("h-4 w-4 shrink-0",void 0!==a&&"invisible")}),(0,t.jsx)("span",{className:"text-muted-foreground italic",children:"No parent"})]}),0===p.length&&l?(0,t.jsx)("p",{className:"text-muted-foreground px-3 py-2 text-sm",children:"No features found."}):p.map(e=>(0,t.jsxs)("button",{type:"button",role:"option","aria-selected":a===e.id,onClick:()=>h(e.id),className:(0,g.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)(m.default,{className:(0,g.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 z({file:e,onRemove:r,disabled:a}){var s,o,n;let i,l=(i=(s=e.name).lastIndexOf("."))>=0?s.slice(i).toLowerCase():"",f=(o=l,L.has(o)?u:".pdf"===o?c.default:I.has(o)?p.default:d),m=".pdf"===(n=l)?"bg-red-50 text-red-600":L.has(n)?"bg-blue-50 text-blue-600":I.has(n)?"bg-emerald-50 text-emerald-600":"bg-gray-50 text-gray-600";return(0,t.jsxs)("div",{className:"flex items-center gap-3 rounded-md border p-2",children:[(0,t.jsx)("div",{className:(0,g.cn)("flex h-8 w-8 shrink-0 items-center justify-center rounded",m),children:(0,t.jsx)(f,{className:"h-4 w-4"})}),(0,t.jsxs)("div",{className:"flex min-w-0 flex-1 flex-col",children:[(0,t.jsx)("span",{className:"truncate text-sm font-medium",children:e.name}),(0,t.jsx)("span",{className:"text-muted-foreground truncate text-xs",children:e.path}),(0,t.jsx)("span",{className:"text-muted-foreground text-xs",children:function(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]}`}(e.size)})]}),(0,t.jsx)(w.Button,{type:"button",variant:"ghost",size:"icon-xs",onClick:r,disabled:a,"aria-label":`Remove ${e.name}`,children:(0,t.jsx)(h.default,{className:"h-3 w-3"})})]})}let L=new Set([".png",".jpg",".jpeg",".gif",".svg",".webp",".ico",".bmp"]),I=new Set([".ts",".tsx",".js",".jsx",".json",".yaml",".yml",".xml",".html",".css",".md"]);function B({repositoryPath:e,initialParentId:o,features:i,workflowDefaults:l,currentAgentType:d,currentModel:c}){let u=(0,a.useRouter)(),[p,h]=(0,r.useState)(!1),f=(0,a.usePathname)().startsWith("/create"),m=!p&&f;(0,r.useEffect)(()=>{!f&&p&&h(!1)},[f,p]);let x=(0,r.useCallback)(()=>{u.push("/")},[u]),g=(0,r.useCallback)(e=>{h(!0),u.push("/"),n(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"),h(!1)})},[u]);return(0,t.jsx)(D,{open:m,onClose:x,onSubmit:g,repositoryPath:e,features:i,workflowDefaults:l,initialParentId:o,isSubmitting:p,currentAgentType:d,currentModel:c})}e.s(["CreateDrawerClient",()=>B],15203)}]);