@shepai/cli 1.194.3-pr586.23e3597 → 1.194.4
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.
- package/package.json +1 -1
- package/web/.next/BUILD_ID +1 -1
- package/web/.next/build-manifest.json +2 -2
- package/web/.next/fallback-build-manifest.json +2 -2
- package/web/.next/prerender-manifest.json +3 -3
- package/web/.next/required-server-files.js +2 -2
- package/web/.next/required-server-files.json +2 -2
- package/web/.next/server/app/(dashboard)/@drawer/adopt/page/react-loadable-manifest.json +3 -3
- package/web/.next/server/app/(dashboard)/@drawer/adopt/page/server-reference-manifest.json +36 -36
- package/web/.next/server/app/(dashboard)/@drawer/adopt/page.js.nft.json +1 -1
- package/web/.next/server/app/(dashboard)/@drawer/adopt/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/(dashboard)/@drawer/chat/page/react-loadable-manifest.json +3 -3
- package/web/.next/server/app/(dashboard)/@drawer/chat/page/server-reference-manifest.json +34 -34
- package/web/.next/server/app/(dashboard)/@drawer/chat/page.js.nft.json +1 -1
- package/web/.next/server/app/(dashboard)/@drawer/chat/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/(dashboard)/@drawer/create/page/react-loadable-manifest.json +3 -3
- package/web/.next/server/app/(dashboard)/@drawer/create/page/server-reference-manifest.json +37 -37
- package/web/.next/server/app/(dashboard)/@drawer/create/page.js.nft.json +1 -1
- package/web/.next/server/app/(dashboard)/@drawer/create/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/(dashboard)/@drawer/feature/[featureId]/[tab]/page/react-loadable-manifest.json +3 -3
- package/web/.next/server/app/(dashboard)/@drawer/feature/[featureId]/[tab]/page/server-reference-manifest.json +46 -46
- package/web/.next/server/app/(dashboard)/@drawer/feature/[featureId]/[tab]/page.js.nft.json +1 -1
- package/web/.next/server/app/(dashboard)/@drawer/feature/[featureId]/[tab]/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/(dashboard)/@drawer/feature/[featureId]/page/react-loadable-manifest.json +3 -3
- package/web/.next/server/app/(dashboard)/@drawer/feature/[featureId]/page/server-reference-manifest.json +46 -46
- package/web/.next/server/app/(dashboard)/@drawer/feature/[featureId]/page.js.nft.json +1 -1
- package/web/.next/server/app/(dashboard)/@drawer/feature/[featureId]/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/(dashboard)/@drawer/repository/[repositoryId]/[tab]/page/react-loadable-manifest.json +3 -3
- package/web/.next/server/app/(dashboard)/@drawer/repository/[repositoryId]/[tab]/page/server-reference-manifest.json +35 -35
- package/web/.next/server/app/(dashboard)/@drawer/repository/[repositoryId]/[tab]/page.js.nft.json +1 -1
- package/web/.next/server/app/(dashboard)/@drawer/repository/[repositoryId]/[tab]/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/(dashboard)/@drawer/repository/[repositoryId]/page/react-loadable-manifest.json +3 -3
- package/web/.next/server/app/(dashboard)/@drawer/repository/[repositoryId]/page/server-reference-manifest.json +35 -35
- package/web/.next/server/app/(dashboard)/@drawer/repository/[repositoryId]/page.js.nft.json +1 -1
- package/web/.next/server/app/(dashboard)/@drawer/repository/[repositoryId]/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/(dashboard)/chat/page/react-loadable-manifest.json +3 -3
- package/web/.next/server/app/(dashboard)/chat/page/server-reference-manifest.json +34 -34
- package/web/.next/server/app/(dashboard)/chat/page.js.nft.json +1 -1
- package/web/.next/server/app/(dashboard)/chat/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/(dashboard)/control-center/page/react-loadable-manifest.json +3 -3
- package/web/.next/server/app/(dashboard)/control-center/page/server-reference-manifest.json +34 -34
- package/web/.next/server/app/(dashboard)/control-center/page.js.nft.json +1 -1
- package/web/.next/server/app/(dashboard)/control-center/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/(dashboard)/create/page/react-loadable-manifest.json +3 -3
- package/web/.next/server/app/(dashboard)/create/page/server-reference-manifest.json +37 -37
- package/web/.next/server/app/(dashboard)/create/page.js.nft.json +1 -1
- package/web/.next/server/app/(dashboard)/create/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/(dashboard)/feature/[featureId]/[tab]/page/react-loadable-manifest.json +3 -3
- package/web/.next/server/app/(dashboard)/feature/[featureId]/[tab]/page/server-reference-manifest.json +46 -46
- package/web/.next/server/app/(dashboard)/feature/[featureId]/[tab]/page.js.nft.json +1 -1
- package/web/.next/server/app/(dashboard)/feature/[featureId]/[tab]/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/(dashboard)/feature/[featureId]/page/react-loadable-manifest.json +3 -3
- package/web/.next/server/app/(dashboard)/feature/[featureId]/page/server-reference-manifest.json +46 -46
- package/web/.next/server/app/(dashboard)/feature/[featureId]/page.js.nft.json +1 -1
- package/web/.next/server/app/(dashboard)/feature/[featureId]/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/(dashboard)/repository/[repositoryId]/[tab]/page/react-loadable-manifest.json +3 -3
- package/web/.next/server/app/(dashboard)/repository/[repositoryId]/[tab]/page/server-reference-manifest.json +35 -35
- package/web/.next/server/app/(dashboard)/repository/[repositoryId]/[tab]/page.js.nft.json +1 -1
- package/web/.next/server/app/(dashboard)/repository/[repositoryId]/[tab]/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/(dashboard)/repository/[repositoryId]/page/react-loadable-manifest.json +3 -3
- package/web/.next/server/app/(dashboard)/repository/[repositoryId]/page/server-reference-manifest.json +35 -35
- package/web/.next/server/app/(dashboard)/repository/[repositoryId]/page.js.nft.json +1 -1
- package/web/.next/server/app/(dashboard)/repository/[repositoryId]/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/_global-error.html +2 -2
- package/web/.next/server/app/_global-error.rsc +1 -1
- package/web/.next/server/app/_global-error.segments/__PAGE__.segment.rsc +1 -1
- package/web/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
- package/web/.next/server/app/_global-error.segments/_head.segment.rsc +1 -1
- package/web/.next/server/app/_global-error.segments/_index.segment.rsc +1 -1
- package/web/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
- package/web/.next/server/app/_not-found/page/react-loadable-manifest.json +3 -3
- package/web/.next/server/app/_not-found/page/server-reference-manifest.json +8 -8
- package/web/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/application/[id]/page/react-loadable-manifest.json +3 -3
- package/web/.next/server/app/application/[id]/page/server-reference-manifest.json +17 -17
- package/web/.next/server/app/application/[id]/page.js.nft.json +1 -1
- package/web/.next/server/app/application/[id]/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/applications/page/react-loadable-manifest.json +3 -3
- package/web/.next/server/app/applications/page/server-reference-manifest.json +18 -18
- package/web/.next/server/app/applications/page.js.nft.json +1 -1
- package/web/.next/server/app/applications/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/features/page/react-loadable-manifest.json +3 -3
- package/web/.next/server/app/features/page/server-reference-manifest.json +30 -30
- package/web/.next/server/app/features/page.js.nft.json +1 -1
- package/web/.next/server/app/features/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/page/react-loadable-manifest.json +3 -3
- package/web/.next/server/app/page/server-reference-manifest.json +8 -8
- package/web/.next/server/app/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/projects/[slug]/items/[itemId]/page/react-loadable-manifest.json +3 -3
- package/web/.next/server/app/projects/[slug]/items/[itemId]/page/server-reference-manifest.json +15 -15
- package/web/.next/server/app/projects/[slug]/items/[itemId]/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/projects/[slug]/page/react-loadable-manifest.json +3 -3
- package/web/.next/server/app/projects/[slug]/page/server-reference-manifest.json +27 -27
- package/web/.next/server/app/projects/[slug]/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/projects/[slug]/pages/page/react-loadable-manifest.json +3 -3
- package/web/.next/server/app/projects/[slug]/pages/page/server-reference-manifest.json +11 -11
- package/web/.next/server/app/projects/[slug]/pages/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/projects/[slug]/settings/page/react-loadable-manifest.json +3 -3
- package/web/.next/server/app/projects/[slug]/settings/page/server-reference-manifest.json +17 -17
- package/web/.next/server/app/projects/[slug]/settings/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/projects/page/react-loadable-manifest.json +3 -3
- package/web/.next/server/app/projects/page/server-reference-manifest.json +9 -9
- package/web/.next/server/app/projects/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/settings/page/react-loadable-manifest.json +3 -3
- package/web/.next/server/app/settings/page/server-reference-manifest.json +11 -11
- package/web/.next/server/app/settings/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/skills/page/react-loadable-manifest.json +3 -3
- package/web/.next/server/app/skills/page/server-reference-manifest.json +16 -16
- package/web/.next/server/app/skills/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/tools/page/react-loadable-manifest.json +3 -3
- package/web/.next/server/app/tools/page/server-reference-manifest.json +14 -14
- package/web/.next/server/app/tools/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/version/page/react-loadable-manifest.json +3 -3
- package/web/.next/server/app/version/page/server-reference-manifest.json +8 -8
- package/web/.next/server/app/version/page_client-reference-manifest.js +1 -1
- package/web/.next/server/chunks/[root-of-the-server]__10e976f3._.js +1 -1
- package/web/.next/server/chunks/ssr/744ca_web__next-internal_server_app_(dashboard)_@drawer_adopt_page_actions_99cb41a4.js +1 -1
- package/web/.next/server/chunks/ssr/744ca_web__next-internal_server_app_(dashboard)_@drawer_adopt_page_actions_99cb41a4.js.map +1 -1
- package/web/.next/server/chunks/ssr/744ca_web__next-internal_server_app_(dashboard)_@drawer_chat_page_actions_3bcbcc2f.js +1 -1
- package/web/.next/server/chunks/ssr/744ca_web__next-internal_server_app_(dashboard)_@drawer_chat_page_actions_3bcbcc2f.js.map +1 -1
- package/web/.next/server/chunks/ssr/744ca_web__next-internal_server_app_(dashboard)_chat_page_actions_059f6735.js +1 -1
- package/web/.next/server/chunks/ssr/744ca_web__next-internal_server_app_(dashboard)_chat_page_actions_059f6735.js.map +1 -1
- package/web/.next/server/chunks/ssr/744ca_web__next-internal_server_app_(dashboard)_control-center_page_actions_86edeb51.js +1 -1
- package/web/.next/server/chunks/ssr/744ca_web__next-internal_server_app_(dashboard)_control-center_page_actions_86edeb51.js.map +1 -1
- package/web/.next/server/chunks/ssr/744ca_web_app_projects_[slug]_items_[itemId]_work-item-detail-client_tsx_d2e02407._.js +1 -1
- package/web/.next/server/chunks/ssr/744ca_web_app_projects_[slug]_items_[itemId]_work-item-detail-client_tsx_d2e02407._.js.map +1 -1
- package/web/.next/server/chunks/ssr/744ca_web_app_projects_[slug]_settings_project-settings-client_tsx_e8b85ddc._.js +1 -1
- package/web/.next/server/chunks/ssr/744ca_web_app_projects_[slug]_settings_project-settings-client_tsx_e8b85ddc._.js.map +1 -1
- package/web/.next/server/chunks/ssr/744ca_web_components_common_control-center-drawer_feature-drawer-client_tsx_e9755fc8._.js +2 -2
- package/web/.next/server/chunks/ssr/744ca_web_components_common_control-center-drawer_feature-drawer-client_tsx_e9755fc8._.js.map +1 -1
- package/web/.next/server/chunks/ssr/744ca_web_components_features_applications_applications-page-client_tsx_d0db9938._.js +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__012a0e7d._.js +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__012a0e7d._.js.map +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__0462fa34._.js +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__0462fa34._.js.map +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__1973d644._.js +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__1a86d5fe._.js +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__1a86d5fe._.js.map +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__30326387._.js +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__30326387._.js.map +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__3438c354._.js +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__3438c354._.js.map +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__361129f0._.js +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__361129f0._.js.map +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__4adb4a94._.js +3 -3
- package/web/.next/server/chunks/ssr/[root-of-the-server]__4adb4a94._.js.map +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__5c25ef9b._.js +2 -2
- package/web/.next/server/chunks/ssr/[root-of-the-server]__5c25ef9b._.js.map +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__5c5f9704._.js +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__5c5f9704._.js.map +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__638955bc._.js +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__78e1366f._.js +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__78e1366f._.js.map +1 -1
- package/web/.next/server/chunks/ssr/{[root-of-the-server]__0d04b8e2._.js → [root-of-the-server]__8ccbc357._.js} +2 -2
- package/web/.next/server/chunks/ssr/{[root-of-the-server]__0d04b8e2._.js.map → [root-of-the-server]__8ccbc357._.js.map} +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__97b6831c._.js +3 -3
- package/web/.next/server/chunks/ssr/[root-of-the-server]__9b16348d._.js +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__9b16348d._.js.map +1 -1
- package/web/.next/server/chunks/ssr/{[root-of-the-server]__1e902e32._.js → [root-of-the-server]__b2926b69._.js} +2 -2
- package/web/.next/server/chunks/ssr/{[root-of-the-server]__1e902e32._.js.map → [root-of-the-server]__b2926b69._.js.map} +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__b3bc9689._.js +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__b3bc9689._.js.map +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__ba8cbee2._.js +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__ba8cbee2._.js.map +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__dbde193f._.js +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__dbde193f._.js.map +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__f6adb460._.js +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__f6adb460._.js.map +1 -1
- package/web/.next/server/chunks/ssr/_101de7c3._.js +1 -1
- package/web/.next/server/chunks/ssr/_101de7c3._.js.map +1 -1
- package/web/.next/server/chunks/ssr/_12ba4a07._.js +1 -1
- package/web/.next/server/chunks/ssr/_12ba4a07._.js.map +1 -1
- package/web/.next/server/chunks/ssr/_15634d5b._.js +1 -1
- package/web/.next/server/chunks/ssr/_15634d5b._.js.map +1 -1
- package/web/.next/server/chunks/ssr/_27c2f774._.js +1 -1
- package/web/.next/server/chunks/ssr/_27c2f774._.js.map +1 -1
- package/web/.next/server/chunks/ssr/_30787024._.js +1 -1
- package/web/.next/server/chunks/ssr/_30787024._.js.map +1 -1
- package/web/.next/server/chunks/ssr/_3bd60fa3._.js +1 -1
- package/web/.next/server/chunks/ssr/_402d53bf._.js +1 -1
- package/web/.next/server/chunks/ssr/_402d53bf._.js.map +1 -1
- package/web/.next/server/chunks/ssr/_56b9d60f._.js +1 -1
- package/web/.next/server/chunks/ssr/_56b9d60f._.js.map +1 -1
- package/web/.next/server/chunks/ssr/_6868b4b1._.js +1 -1
- package/web/.next/server/chunks/ssr/{_3906be1d._.js → _759e7aaa._.js} +2 -2
- package/web/.next/server/chunks/ssr/{_3906be1d._.js.map → _759e7aaa._.js.map} +1 -1
- package/web/.next/server/chunks/ssr/{_12f37a55._.js → _7cd98562._.js} +2 -2
- package/web/.next/server/chunks/ssr/{_12f37a55._.js.map → _7cd98562._.js.map} +1 -1
- package/web/.next/server/chunks/ssr/_805ae1aa._.js +1 -1
- package/web/.next/server/chunks/ssr/_805ae1aa._.js.map +1 -1
- package/web/.next/server/chunks/ssr/_8a700ff4._.js +1 -1
- package/web/.next/server/chunks/ssr/_8a700ff4._.js.map +1 -1
- package/web/.next/server/chunks/ssr/_8f4f8aa1._.js +1 -1
- package/web/.next/server/chunks/ssr/_8f4f8aa1._.js.map +1 -1
- package/web/.next/server/chunks/ssr/{_fe68c1e2._.js → _9df39bfe._.js} +2 -2
- package/web/.next/server/chunks/ssr/{_fe68c1e2._.js.map → _9df39bfe._.js.map} +1 -1
- package/web/.next/server/chunks/ssr/{_1055ec32._.js → _a31c3a42._.js} +2 -2
- package/web/.next/server/chunks/ssr/{_1055ec32._.js.map → _a31c3a42._.js.map} +1 -1
- package/web/.next/server/chunks/ssr/_b40a4fc3._.js +1 -1
- package/web/.next/server/chunks/ssr/_b40a4fc3._.js.map +1 -1
- package/web/.next/server/chunks/ssr/_c44ec376._.js +1 -1
- package/web/.next/server/chunks/ssr/_c44ec376._.js.map +1 -1
- package/web/.next/server/chunks/ssr/_cd641c61._.js +1 -1
- package/web/.next/server/chunks/ssr/_cd641c61._.js.map +1 -1
- package/web/.next/server/chunks/ssr/_d53224a9._.js +1 -1
- package/web/.next/server/chunks/ssr/_d53224a9._.js.map +1 -1
- package/web/.next/server/chunks/ssr/{_60246ee2._.js → _de93c45c._.js} +2 -2
- package/web/.next/server/chunks/ssr/{_60246ee2._.js.map → _de93c45c._.js.map} +1 -1
- package/web/.next/server/chunks/ssr/{_8ee3123d._.js → _e0e86221._.js} +2 -2
- package/web/.next/server/chunks/ssr/{_8ee3123d._.js.map → _e0e86221._.js.map} +1 -1
- package/web/.next/server/chunks/ssr/_e6271303._.js +1 -1
- package/web/.next/server/chunks/ssr/_e6271303._.js.map +1 -1
- package/web/.next/server/chunks/ssr/_ed8fd56c._.js +1 -1
- package/web/.next/server/chunks/ssr/_ed8fd56c._.js.map +1 -1
- package/web/.next/server/chunks/ssr/_f602cc9f._.js +1 -1
- package/web/.next/server/chunks/ssr/_f602cc9f._.js.map +1 -1
- package/web/.next/server/chunks/ssr/b1a17_presentation_web_components_features_settings_settings-page-client_tsx_6ed9d5f8._.js +1 -1
- package/web/.next/server/chunks/ssr/b1a17_presentation_web_components_features_settings_settings-page-client_tsx_6ed9d5f8._.js.map +1 -1
- package/web/.next/server/chunks/ssr/f3a1f_components_common_control-center-drawer_repository-drawer-client_tsx_39a00c03._.js +1 -1
- package/web/.next/server/chunks/ssr/src_presentation_web_05bba4dc._.js +1 -1
- package/web/.next/server/chunks/ssr/src_presentation_web_05bba4dc._.js.map +1 -1
- package/web/.next/server/chunks/ssr/src_presentation_web_43451480._.js +1 -1
- package/web/.next/server/chunks/ssr/src_presentation_web_43451480._.js.map +1 -1
- package/web/.next/server/chunks/ssr/src_presentation_web_4b306bb3._.js +1 -1
- package/web/.next/server/chunks/ssr/src_presentation_web_4b306bb3._.js.map +1 -1
- package/web/.next/server/chunks/ssr/{src_presentation_web_1f525bd4._.js → src_presentation_web_5c844690._.js} +2 -2
- package/web/.next/server/chunks/ssr/{src_presentation_web_1f525bd4._.js.map → src_presentation_web_5c844690._.js.map} +1 -1
- package/web/.next/server/chunks/ssr/src_presentation_web_81dd84ae._.js +1 -1
- package/web/.next/server/chunks/ssr/src_presentation_web_81dd84ae._.js.map +1 -1
- package/web/.next/server/chunks/ssr/src_presentation_web_9a543843._.js +1 -1
- package/web/.next/server/chunks/ssr/src_presentation_web_9a543843._.js.map +1 -1
- package/web/.next/server/chunks/ssr/src_presentation_web_app_actions_7ab26c98._.js +3 -3
- package/web/.next/server/chunks/ssr/src_presentation_web_app_actions_adopt-local-directory_ts_75f1f28c._.js +1 -1
- package/web/.next/server/chunks/ssr/src_presentation_web_app_actions_adopt-local-directory_ts_75f1f28c._.js.map +1 -1
- package/web/.next/server/chunks/ssr/src_presentation_web_app_actions_approve-feature_ts_9453ce8b._.js +1 -1
- package/web/.next/server/chunks/ssr/src_presentation_web_app_actions_open-directory_ts_1209d917._.js +1 -1
- package/web/.next/server/chunks/ssr/src_presentation_web_app_actions_open-directory_ts_1209d917._.js.map +1 -1
- package/web/.next/server/chunks/ssr/src_presentation_web_app_features_feature-tree-page-client_tsx_34c5cbbf._.js +1 -1
- package/web/.next/server/chunks/ssr/src_presentation_web_b504e3e2._.js +1 -1
- package/web/.next/server/chunks/ssr/src_presentation_web_b504e3e2._.js.map +1 -1
- package/web/.next/server/chunks/ssr/src_presentation_web_b5838705._.js +1 -1
- package/web/.next/server/chunks/ssr/src_presentation_web_b5838705._.js.map +1 -1
- package/web/.next/server/chunks/ssr/src_presentation_web_b6b4baa1._.js +1 -1
- package/web/.next/server/chunks/ssr/src_presentation_web_b6b4baa1._.js.map +1 -1
- package/web/.next/server/chunks/ssr/src_presentation_web_c3d0de23._.js +1 -1
- package/web/.next/server/chunks/ssr/src_presentation_web_c3d0de23._.js.map +1 -1
- package/web/.next/server/chunks/ssr/src_presentation_web_components_66643378._.js +1 -1
- package/web/.next/server/chunks/ssr/src_presentation_web_components_66643378._.js.map +1 -1
- package/web/.next/server/chunks/ssr/src_presentation_web_components_common_base-drawer_base-drawer_tsx_97dfbbc8._.js +1 -1
- package/web/.next/server/chunks/ssr/src_presentation_web_components_common_base-drawer_base-drawer_tsx_97dfbbc8._.js.map +1 -1
- package/web/.next/server/chunks/ssr/src_presentation_web_components_features_skills_8a174cac._.js +1 -1
- package/web/.next/server/chunks/ssr/src_presentation_web_components_features_skills_8a174cac._.js.map +1 -1
- package/web/.next/server/chunks/ssr/{src_presentation_web_dc5ba3cf._.js → src_presentation_web_e596fda8._.js} +2 -2
- package/web/.next/server/chunks/ssr/{src_presentation_web_dc5ba3cf._.js.map → src_presentation_web_e596fda8._.js.map} +1 -1
- package/web/.next/server/chunks/ssr/src_presentation_web_fc29283f._.js +1 -1
- package/web/.next/server/chunks/ssr/src_presentation_web_fc29283f._.js.map +1 -1
- package/web/.next/server/pages/500.html +2 -2
- package/web/.next/server/server-reference-manifest.js +1 -1
- package/web/.next/server/server-reference-manifest.json +98 -98
- package/web/.next/static/chunks/{1d72f699758c6d3a.js → 089bd320dc4b1575.js} +1 -1
- package/web/.next/static/chunks/{913f8613ffba3e5c.js → 0fc17b433aa79b46.js} +1 -1
- package/web/.next/static/chunks/105bb00cb34ccd38.js +1 -0
- package/web/.next/static/chunks/{d5b120471ecd81c3.js → 18be29465f4a1def.js} +1 -1
- package/web/.next/static/chunks/1f42ad4a0931acd3.js +1 -0
- package/web/.next/static/chunks/{dddb3a86ceab0299.js → 298594ed8c886cbf.js} +1 -1
- package/web/.next/static/chunks/{6d5150e080c53d51.js → 33317caa5c5abd6b.js} +1 -1
- package/web/.next/static/chunks/{6ac3de2ae9fd6923.js → 34593f30cd188c4a.js} +1 -1
- package/web/.next/static/chunks/{3be081e466e5c38f.js → 37ea114b14bec27f.js} +1 -1
- package/web/.next/static/chunks/{5d7f74c25dacc25c.js → 3c250fbfb60ee24f.js} +1 -1
- package/web/.next/static/chunks/{79865a986c6f7b78.js → 3c98769f57d9cab5.js} +1 -1
- package/web/.next/static/chunks/{88de900956cc7c59.js → 3d2af4aff402ec27.js} +1 -1
- package/web/.next/static/chunks/{60fd7ec231b71fe6.js → 424eadec8be0f312.js} +1 -1
- package/web/.next/static/chunks/{600304d205fb6d78.js → 4936903aae95a25f.js} +1 -1
- package/web/.next/static/chunks/4d47b81085b62d87.js +1 -0
- package/web/.next/static/chunks/{127b0c5b93da3ad5.js → 4e2de41996b256eb.js} +1 -1
- package/web/.next/static/chunks/{e09a852e65d50ea9.js → 512f87d97c19d83c.js} +1 -1
- package/web/.next/static/chunks/{d8a8d0ea290869a7.js → 51de8a6b0bdc70c9.js} +1 -1
- package/web/.next/static/chunks/57a7139e142ed273.js +1 -0
- package/web/.next/static/chunks/{31eb52265493ef76.js → 61757ff9dcbbd032.js} +1 -1
- package/web/.next/static/chunks/674e4d59f39b85e2.js +1 -0
- package/web/.next/static/chunks/93ea366bd74183ac.js +1 -0
- package/web/.next/static/chunks/{b0658275cec08831.js → ae7430dbb2e98782.js} +1 -1
- package/web/.next/static/chunks/{07361c8c12a5843e.js → b2abfb9855755aa4.js} +1 -1
- package/web/.next/static/chunks/{eb53dfcd51b8c265.js → c3d369f4301955a1.js} +1 -1
- package/web/.next/static/chunks/{07c57742ecdf243e.js → cd057f6e3acdf607.js} +1 -1
- package/web/.next/static/chunks/{afc90b9d319294e0.js → d5563287e193adaa.js} +1 -1
- package/web/.next/static/chunks/{c777b5c3be68f05b.js → d861a3318a70ff49.js} +1 -1
- package/web/.next/static/chunks/{88cebfaa6dd82cc7.js → da7737afc53217ed.js} +3 -3
- package/web/.next/static/chunks/{4cecc66a490b21f7.js → e115c6778a53c0b0.js} +1 -1
- package/web/.next/static/chunks/{39b106ba3f6b82ea.js → ea904b744cea3776.js} +1 -1
- package/web/.next/static/chunks/{6ae0cf4dd1f41683.js → f0c7b0a956112e63.js} +1 -1
- package/web/.next/static/chunks/{a59dfab21ca0ba91.js → f31db8ecfc2d481e.js} +1 -1
- package/web/.next/static/chunks/{a98de0590c6ebab9.js → f8a21f4841d519ff.js} +1 -1
- package/web/.next/static/chunks/00f78bad91244b81.js +0 -1
- package/web/.next/static/chunks/55b11c087456741a.js +0 -1
- package/web/.next/static/chunks/64b32c7716c3cde3.js +0 -1
- package/web/.next/static/chunks/83b6dc76bfe00b00.js +0 -1
- package/web/.next/static/chunks/a29ef3fcc3085a7d.js +0 -1
- package/web/.next/static/chunks/b6f72b83e6cf64bc.js +0 -1
- /package/web/.next/static/{VT3SIc3eQMRpCzfl2igIb → wfZhz3kojQGb8pd6OW9Lk}/_buildManifest.js +0 -0
- /package/web/.next/static/{VT3SIc3eQMRpCzfl2igIb → wfZhz3kojQGb8pd6OW9Lk}/_clientMiddlewareManifest.json +0 -0
- /package/web/.next/static/{VT3SIc3eQMRpCzfl2igIb → wfZhz3kojQGb8pd6OW9Lk}/_ssgManifest.js +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,283843,e=>{"use strict";let t=(0,e.i(903645).default)("chevrons-up-down",[["path",{d:"m7 15 5 5 5-5",key:"1hf1tw"}],["path",{d:"m7 9 5-5 5 5",key:"sgt6xg"}]]);e.s(["ChevronsUpDown",()=>t],283843)},34562,630616,e=>{"use strict";var t=e.i(679606),r=e.i(152155);e.i(541001);var a=e.i(64780),s=e.i(216868),i=e.i(283843),o=e.i(197667),l=e.i(453360),n=e.i(655016),c=e.i(591925),d=e.i(83428),p=e.i(381542),u=e.i(670471),h=e.i(912103),m=e.i(43416),x=e.i(542049),f=e.i(941698),g=e.i(131777),b=e.i(808361);e.i(1650);var j=e.i(511495),w=e.i(845811),v=e.i(735364),C=e.i(698127),y=e.i(48306),k=e.i(141957),N=e.i(81846),D=e.i(390382),T=e.i(951911),S=e.i(102828),F=e.i(930153);e.i(650032);var P=e.i(486254),L=e.i(508893);let z=(0,L.createServerReference)("405848adede2dfc7e2c0da7655c7db7d8da5a5c7e4",L.callServer,void 0,L.findSourceMapURL,"getViewerPermission");var E=e.i(41413),R=e.i(425235),U=e.i(478521);e.i(13322);var A=e.i(961201),M=e.i(175921),I=e.i(969276),O=e.i(442076);let K=["application","fast","spec"],$={application:{icon:x.LayoutGrid,labelKey:"createDrawer.modeApplication"},fast:{icon:l.Zap,labelKey:"createDrawer.modeFast"},spec:{icon:f.ClipboardList,labelKey:"createDrawer.modeSpec"}},B=new Set([".png",".jpg",".jpeg",".gif",".webp",".svg",".bmp",".ico",".pdf",".doc",".docx",".xls",".xlsx",".ppt",".pptx",".txt",".md",".csv",".json",".yaml",".yml",".xml",".ts",".tsx",".js",".jsx",".py",".rb",".go",".rs",".java",".c",".cpp",".h",".hpp",".cs",".swift",".kt",".html",".css",".scss",".less",".sh",".bash",".zsh",".fish",".toml",".ini",".cfg",".conf",".env",".zip",".tar",".gz",".log"]),G={allowPrd:!1,allowPlan:!1,allowMerge:!1};function q({open:e,onClose:i,onSubmit:o,repositoryPath:l,isSubmitting:c=!1,workflowDefaults:d,features:x,repositories:f,initialParentId:C,currentAgentType:D,currentModel:L,initialDescription:R,canPushDirectly:U,initialMode:A}){let M=(0,b.useSoundAction)("create"),{t:I}=(0,a.useTranslation)("web"),q=l&&(!f||0===f.length||f.some(e=>e.path===l))?l:"",J=d?.approvalGates??G,V=d?.push??!1,H=d?.openPr??!1,Q=d?.ciWatchEnabled!==!1,X=d?.enableEvidence??!1,Y=d?.commitEvidence??!1,_=A||(d?.fast===!1?"application":"fast"),[ee,et]=(0,r.useState)(R??"");(0,r.useEffect)(()=>{R&&et(R)},[R]);let[er,ea]=(0,r.useState)([]),[es,ei]=(0,r.useState)({...J}),[eo,el]=(0,r.useState)(V),[en,ec]=(0,r.useState)(H),[ed,ep]=(0,r.useState)(d?.ciWatchEnabled!==!1),[eu,eh]=(0,r.useState)(X),[em,ex]=(0,r.useState)(Y),[ef,eg]=(0,r.useState)(void 0),[eb,ej]=(0,r.useState)(_),ew="fast"===eb,[ev,eC]=(0,r.useState)(!1),[ey,ek]=(0,r.useState)(!1),[eN,eD]=(0,r.useState)(!0),[eT,eS]=(0,r.useState)(!0),[eF,eP]=(0,r.useState)(d?.injectSkills??!1),[eL,ez]=(0,r.useState)(void 0),[eE,eR]=(0,r.useState)(void 0),[eU,eA]=(0,r.useState)(q||void 0),[eM,eI]=(0,r.useState)(f??[]),[eO,eK]=(0,r.useState)(!1),[e$,eB]=(0,r.useState)(null),[eG,eq]=(0,r.useState)(!1),eW=(0,r.useRef)(crypto.randomUUID()),eZ=(0,r.useRef)(0),eJ=(0,r.useRef)(null);(0,r.useEffect)(()=>{d&&(ei({...d.approvalGates}),el(d.push),ec(d.openPr),ep(!1!==d.ciWatchEnabled),eh(d.enableEvidence),ex(d.commitEvidence),A||ej(!1!==d.fast?"fast":"application"),eP(d.injectSkills??!1))},[d,A]),(0,r.useEffect)(()=>{eI(f??[])},[f]),(0,r.useEffect)(()=>{e&&C&&eg(C)},[e,C]);let[eV,eH]=(0,r.useState)(U??!1);(0,r.useEffect)(()=>{eH(U??!1)},[U]);let eQ=(0,r.useRef)(eU);(0,r.useEffect)(()=>{eU&&eU!==eQ.current&&(eQ.current=eU,z(eU).then(e=>eH(e.canPushDirectly)).catch(()=>eH(!1)))},[eU]),(0,r.useEffect)(()=>{eV&&(ek(!1),el(V),ec(H),eD(!0))},[eV,V,H]);let eX=(0,r.useCallback)(()=>{et(""),ea([]),ei({...J}),el(V),ec(H),ep(Q),eh(X),ex(Y),eg(void 0),eA(q||void 0),eI(f??[]),ej(_),eC(!1),ek(!1),eD(!0),eS(!0),ez(void 0),eR(void 0),eB(null),eZ.current=0,eK(!1)},[J,V,H,X,Q,Y,_,q,f]),eY=""!==ee.trim()||er.length>0,{attemptClose:e_}=(0,F.useGuardedDrawerClose)({open:e,isDirty:eY,onClose:i,onReset:eX}),e0=(0,r.useCallback)(async e=>{for(let t of(eB(null),e)){if(t.size>0xa00000)return void eB(`"${t.name}" exceeds 10 MB limit`);let e=function(e){let t=e.lastIndexOf(".");return t>=0?e.slice(t).toLowerCase():""}(t.name);if(e&&!B.has(e))return void eB(`File type "${e}" is not allowed`)}for(let t of e){let e=crypto.randomUUID();ea(r=>[...r,{id:e,name:t.name,size:t.size,mimeType:t.type||"application/octet-stream",path:"",loading:!0}]);try{let r=new FormData;r.append("file",t),r.append("sessionId",eW.current);let a=await fetch("/api/attachments/upload",{method:"POST",body:r});if(!a.ok){let t=await a.json().catch(()=>({error:"Upload failed"}));ea(t=>t.filter(t=>t.id!==e)),eB(t.error??"Upload failed");return}let s=await a.json();ea(t=>t.some(t=>t.id!==e&&t.path===s.path)?t.filter(t=>t.id!==e):t.map(t=>t.id===e?{...s,id:e,loading:!1}:t))}catch{ea(t=>t.filter(t=>t.id!==e)),eB("Upload failed")}}},[]),e1=(0,r.useCallback)(e=>{e.preventDefault(),e.stopPropagation(),eZ.current+=1,1===eZ.current&&eK(!0)},[]),e5=(0,r.useCallback)(e=>{e.preventDefault(),e.stopPropagation(),eZ.current-=1,0===eZ.current&&eK(!1)},[]),e4=(0,r.useCallback)(e=>{e.preventDefault(),e.stopPropagation()},[]),e2=(0,r.useCallback)(e=>{e.preventDefault(),e.stopPropagation(),eZ.current=0,eK(!1);let t=Array.from(e.dataTransfer.files);t.length>0&&e0(t)},[e0]),e3=(0,r.useCallback)(e=>{let t=e.clipboardData?.items;if(!t)return;let r=[];for(let e of Array.from(t))if("file"===e.kind){let t=e.getAsFile();t&&r.push(t)}r.length>0&&(e.preventDefault(),e0(r))},[e0]),e6=(0,r.useCallback)(e=>{if(e.preventDefault(),!ee.trim())return;let t=eU??q;t&&(M.play(),o({description:ee.trim(),attachments:er.filter(e=>!e.loading),repositoryPath:t,approvalGates:{allowPrd:es.allowPrd??!1,allowPlan:es.allowPlan??!1,allowMerge:es.allowMerge??!1},push:!!ey||eo||en,openPr:!!ey||en,ciWatchEnabled:ed,enableEvidence:eu,commitEvidence:em,fast:ew,forkAndPr:ey,commitSpecs:eN,rebaseBeforeBranch:eT,injectSkills:eF,...ev?{pending:ev}:{},...eL?{agentType:eL}:{},...eE?{model:eE}:{},...ef?{parentId:ef}:{},sessionId:eW.current}),eX())},[ee,er,es,eU,q,o,eo,en,eu,ed,em,ew,ey,eN,eT,eF,ev,eL,eE,ef,M,eX]),e8=(0,r.useCallback)(async()=>{try{let e=await (0,O.pickFiles)();if(!e)return;for(let t of e){let e=crypto.randomUUID();ea(r=>[...r,{id:e,name:t.name,size:t.size,mimeType:"application/octet-stream",path:"",loading:!0}]);try{let r=await fetch("/api/attachments/upload-from-path",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({path:t.path,sessionId:eW.current})});if(!r.ok){let t=await r.json().catch(()=>({error:"Upload failed"}));ea(t=>t.filter(t=>t.id!==e)),eB(t.error??"Upload failed");return}let a=await r.json();ea(t=>t.some(t=>t.id!==e&&t.path===a.path)?t.filter(t=>t.id!==e):t.map(t=>t.id===e?{...a,id:e,loading:!1}:t))}catch{ea(t=>t.filter(t=>t.id!==e)),eB("Upload failed")}}}catch{}},[]),e7=(0,r.useCallback)(e=>{ea(t=>t.filter(t=>t.id!==e))},[]),e9=(0,r.useCallback)((e,t)=>{ea(r=>r.map(r=>r.id===e?{...r,notes:t}:r))},[]),te=(0,r.useRef)(null),tt=(0,r.useCallback)(e=>{(e.ctrlKey||e.metaKey)&&"Enter"===e.key&&(e.preventDefault(),te.current?.requestSubmit())},[]),tr=(0,r.useCallback)(()=>{eq(!0)},[]),ta=(0,r.useCallback)(()=>{setTimeout(()=>{let e=eJ.current?.contains(document.activeElement),t=eJ.current?.querySelector('[aria-expanded="true"]')!==null;e||t||eq(!1)},0)},[]),ts=x&&x.length>0,ti=!q&&!eU,to=!q&&void 0!==f,tl=[{id:"allowPrd",label:I("createDrawer.prd"),description:I("createDrawer.prdDescription")},{id:"allowPlan",label:I("createDrawer.plan"),description:I("createDrawer.planDescription")},{id:"allowMerge",label:I("createDrawer.merge"),description:I("createDrawer.mergeDescription")}];return(0,t.jsx)(j.BaseDrawer,{open:e,onClose:e_,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)(w.DrawerTitle,{children:I("createDrawer.title")})]}),c?(0,t.jsx)(w.DrawerDescription,{asChild:!0,children:(0,t.jsx)("div",{children:(0,t.jsx)(N.Badge,{variant:"secondary",children:I("createDrawer.creating")})})}):null]}),footer:(0,t.jsxs)("div",{className:"flex flex-row justify-end gap-2",children:[(0,t.jsx)(v.Button,{variant:"outline",onClick:e_,disabled:c,children:I("createDrawer.cancel")}),(0,t.jsx)(v.Button,{type:"submit",form:"create-feature-form",disabled:!ee.trim()||c||ti,children:c?I("createDrawer.creating"):I("createDrawer.createFeature")})]}),children:(0,t.jsx)("div",{className:"overflow-y-auto p-4",children:(0,t.jsx)(S.TooltipProvider,{delayDuration:400,children:(0,t.jsxs)("form",{ref:te,id:"create-feature-form",onSubmit:e6,onKeyDown:tt,className:"flex flex-col gap-4",children:[to?(0,t.jsxs)("div",{className:"flex flex-col gap-1.5","data-testid":"repo-selector-section",children:[(0,t.jsx)(k.Label,{className:"text-muted-foreground text-xs font-semibold tracking-wider",children:I("createDrawer.repository")}),(0,t.jsx)(Z,{repositories:eM,value:eU,onChange:eA,onAddRepository:e=>{eI(t=>[...t,e]),eA(e.path)},disabled:c})]}):q?(0,t.jsxs)("div",{className:"flex flex-col gap-1.5","data-testid":"repo-readonly-section",children:[(0,t.jsx)(k.Label,{className:"text-muted-foreground text-xs font-semibold tracking-wider",children:I("createDrawer.repository")}),(0,t.jsx)("p",{className:"text-sm","data-testid":"repo-readonly-label",children:f?.find(e=>e.path===q)?.name??q.split("/").pop()})]}):null,(0,t.jsxs)("div",{role:"region","aria-label":I("createDrawer.fileDropZone"),"data-drag-over":eO?"true":"false",onDragEnter:e1,onDragLeave:e5,onDragOver:e4,onDrop:e2,className:(0,g.cn)("flex flex-col gap-1.5 rounded-md border-2 border-transparent p-1 transition-colors",eO&&"border-primary/50 bg-primary/5"),children:[(0,t.jsx)(k.Label,{htmlFor:"feature-description",className:"text-muted-foreground text-xs font-semibold tracking-wider",children:I("createDrawer.describeFeature")}),(0,t.jsxs)("div",{ref:eJ,onFocus:tr,onBlur:ta,className:(0,g.cn)("border-input flex h-56 flex-col overflow-hidden rounded-md border shadow-xs transition-[color,box-shadow]",eG&&"ring-ring/50 border-ring ring-[3px]"),children:[(0,t.jsx)(y.Textarea,{id:"feature-description",placeholder:I("createDrawer.featurePlaceholder"),value:ee,onChange:e=>et(e.target.value),onPaste:e3,required:!0,disabled:c,className:"min-h-0 flex-1 resize-none rounded-none border-0 shadow-none focus-visible:ring-0"}),er.length>0&&(0,t.jsx)("div",{className:"flex flex-wrap items-center gap-1.5 px-3 py-2",children:er.map(e=>(0,t.jsx)(P.AttachmentChip,{name:e.name,size:e.size,mimeType:e.mimeType,path:e.path,onRemove:()=>e7(e.id),disabled:c,loading:e.loading,notes:e.notes,onNotesChange:t=>e9(e.id,t)},e.id))}),e$?(0,t.jsx)("p",{className:"text-destructive px-3 pb-2 text-xs",children:e$}):null,(0,t.jsxs)("div",{className:"border-input flex items-center gap-3 border-t px-3 py-1.5",children:[(0,t.jsx)(E.AgentModelPicker,{initialAgentType:eL??D??"claude-code",initialModel:eE??L??"claude-sonnet-4-6",mode:"override",onAgentModelChange:(e,t)=>{ez(e),eR(t)},disabled:c,className:"w-55"}),(0,t.jsxs)(S.Tooltip,{children:[(0,t.jsx)(S.TooltipTrigger,{asChild:!0,children:(0,t.jsxs)("div",{className:"ml-auto flex cursor-pointer items-center gap-2",children:[(0,t.jsx)(T.Switch,{id:"pending-mode",checked:ev,onCheckedChange:eC,disabled:c}),(0,t.jsxs)(k.Label,{htmlFor:"pending-mode",className:"flex cursor-pointer items-center gap-1 text-sm font-medium",children:[(0,t.jsx)(n.Clock,{className:"h-3.5 w-3.5"}),I("createDrawer.pendingMode")]})]})}),(0,t.jsx)(S.TooltipContent,{side:"bottom",children:I("createDrawer.pendingModeDescription")})]}),(0,t.jsx)("div",{role:"group","aria-label":I("createDrawer.modeGroupLabel"),className:"border-input flex items-center gap-0.5 rounded-md border p-0.5",children:K.map(e=>{let r=$[e],a=r.icon,s=eb===e;return(0,t.jsxs)(S.Tooltip,{children:[(0,t.jsx)(S.TooltipTrigger,{asChild:!0,children:(0,t.jsxs)("button",{type:"button","data-testid":`build-mode-${e}`,"aria-pressed":s,disabled:c,onClick:()=>ej(e),className:(0,g.cn)("flex cursor-pointer items-center gap-1 rounded-sm px-2 py-1 text-xs font-medium transition-colors",s?"bg-accent text-foreground":"text-muted-foreground hover:text-foreground","disabled:cursor-not-allowed disabled:opacity-50"),children:[(0,t.jsx)(a,{className:"h-3.5 w-3.5"}),I(r.labelKey)]})}),(0,t.jsx)(S.TooltipContent,{side:"bottom",children:I(`${r.labelKey}Description`)})]},e)})}),(0,t.jsxs)(S.Tooltip,{children:[(0,t.jsx)(S.TooltipTrigger,{asChild:!0,children:(0,t.jsx)("button",{type:"button",onClick:e8,disabled:c,"aria-label":I("chat.attachFiles"),className:"text-muted-foreground hover:text-foreground cursor-pointer rounded p-1 transition-colors",children:(0,t.jsx)(s.PaperclipIcon,{className:"h-4 w-4"})})}),(0,t.jsx)(S.TooltipContent,{side:"bottom",children:I("chat.attachFiles")})]})]})]})]}),ts&&void 0!==C?(0,t.jsxs)("div",{className:"flex flex-col gap-1.5",children:[(0,t.jsx)(k.Label,{htmlFor:"parent-feature",className:"text-muted-foreground text-xs font-semibold tracking-wider",children:I("createDrawer.parentFeature")}),(0,t.jsx)(W,{features:x,value:ef,onChange:eg,disabled:c})]}):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)(S.Tooltip,{children:[(0,t.jsx)(S.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:I("createDrawer.approve")})}),(0,t.jsx)(S.TooltipContent,{side:"bottom",children:I("createDrawer.approveDescription")})]}),(0,t.jsx)("div",{className:"flex flex-1 items-center gap-4",children:tl.map(e=>(0,t.jsxs)(S.Tooltip,{children:[(0,t.jsx)(S.TooltipTrigger,{asChild:!0,children:(0,t.jsxs)("div",{className:"flex cursor-pointer items-center gap-1.5",children:[(0,t.jsx)(T.Switch,{id:`approve-${e.id}`,size:"sm",checked:es[e.id]??!1,onCheckedChange:t=>ei(r=>({...r,[e.id]:t})),disabled:c||ew&&("allowPrd"===e.id||"allowPlan"===e.id)}),(0,t.jsx)(k.Label,{htmlFor:`approve-${e.id}`,className:"cursor-pointer text-xs font-medium",children:e.label})]})}),(0,t.jsx)(S.TooltipContent,{side:"bottom",children:ew&&("allowPrd"===e.id||"allowPlan"===e.id)?I("createDrawer.skippedInFastMode"):e.description})]},e.id))}),(0,t.jsxs)(S.Tooltip,{children:[(0,t.jsx)(S.TooltipTrigger,{asChild:!0,children:(0,t.jsx)("button",{type:"button",onClick:()=>{let e=tl.every(e=>es[e.id]),t={};for(let r of tl)t[r.id]=!e;ei(t)},disabled:c,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",tl.every(e=>es[e.id])&&"text-primary"),children:I("createDrawer.all")})}),(0,t.jsx)(S.TooltipContent,{side:"bottom",children:I("createDrawer.toggleAllApprovalGates")})]})]}),(0,t.jsxs)("div",{className:"border-input flex items-center gap-4 rounded-md border px-3 py-2.5",children:[(0,t.jsxs)(S.Tooltip,{children:[(0,t.jsx)(S.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:I("createDrawer.evidence")})}),(0,t.jsx)(S.TooltipContent,{side:"bottom",children:I("createDrawer.evidenceDescription")})]}),(0,t.jsxs)("div",{className:"flex flex-1 items-center gap-4",children:[(0,t.jsxs)(S.Tooltip,{children:[(0,t.jsx)(S.TooltipTrigger,{asChild:!0,children:(0,t.jsxs)("div",{className:"flex cursor-pointer items-center gap-1.5",children:[(0,t.jsx)(T.Switch,{id:"enable-evidence",size:"sm",checked:eu,onCheckedChange:e=>{eh(e),e||ex(!1)},disabled:c}),(0,t.jsx)(k.Label,{htmlFor:"enable-evidence",className:"cursor-pointer text-xs font-medium",children:I("createDrawer.collect")})]})}),(0,t.jsx)(S.TooltipContent,{side:"bottom",children:I("createDrawer.collectDescription")})]}),(0,t.jsxs)(S.Tooltip,{children:[(0,t.jsx)(S.TooltipTrigger,{asChild:!0,children:(0,t.jsxs)("div",{className:"flex cursor-pointer items-center gap-1.5",children:[(0,t.jsx)(T.Switch,{id:"commit-evidence",size:"sm",checked:em,onCheckedChange:ex,disabled:c||!eu||!en&&!ey}),(0,t.jsx)(k.Label,{htmlFor:"commit-evidence",className:(0,g.cn)("cursor-pointer text-xs font-medium",(!eu||!en&&!ey)&&"opacity-50"),children:I("createDrawer.addToPr")})]})}),(0,t.jsx)(S.TooltipContent,{side:"bottom",children:en||ey?eu?I("createDrawer.addToPrDescription"):I("createDrawer.requiresEvidence"):I("createDrawer.requiresPr")})]})]})]}),(0,t.jsxs)("div",{className:"border-input flex items-center gap-4 rounded-md border px-3 py-2.5",children:[(0,t.jsxs)(S.Tooltip,{children:[(0,t.jsx)(S.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:I("createDrawer.skills")})}),(0,t.jsx)(S.TooltipContent,{side:"bottom",children:I("createDrawer.skillsDescription")})]}),(0,t.jsx)("div",{className:"flex flex-1 items-center gap-4",children:(0,t.jsxs)(S.Tooltip,{children:[(0,t.jsx)(S.TooltipTrigger,{asChild:!0,children:(0,t.jsxs)("div",{className:"flex cursor-pointer items-center gap-1.5",children:[(0,t.jsx)(T.Switch,{id:"inject-skills",size:"sm",checked:eF,onCheckedChange:eP,disabled:c}),(0,t.jsxs)(k.Label,{htmlFor:"inject-skills",className:"flex cursor-pointer items-center gap-1 text-xs font-medium",children:[(0,t.jsx)(h.Puzzle,{className:"h-3 w-3"}),I("createDrawer.injectSkills")]})]})}),(0,t.jsx)(S.TooltipContent,{side:"bottom",children:I("createDrawer.injectSkillsDescription")})]})})]}),(0,t.jsxs)("div",{className:"border-input flex items-start gap-4 rounded-md border px-3 py-2.5",children:[(0,t.jsx)("span",{className:"text-muted-foreground w-16 shrink-0 pt-0.5 text-xs font-semibold tracking-wider",children:I("createDrawer.git")}),(0,t.jsxs)("div",{className:"flex flex-1 flex-wrap items-center gap-4",children:[(0,t.jsxs)(S.Tooltip,{children:[(0,t.jsx)(S.TooltipTrigger,{asChild:!0,children:(0,t.jsxs)("div",{className:"flex cursor-pointer items-center gap-1.5",children:[(0,t.jsx)(T.Switch,{id:"push",size:"sm",checked:!!ey||eo||en,onCheckedChange:e=>{el(e),!e&&en&&ec(!1)},disabled:c||ey}),(0,t.jsx)(k.Label,{htmlFor:"push",className:(0,g.cn)("cursor-pointer text-xs font-medium",ey&&"opacity-50"),children:I("createDrawer.push")})]})}),(0,t.jsx)(S.TooltipContent,{side:"bottom",children:ey?"Enabled — contributing to upstream":I("createDrawer.pushDescription")})]}),(0,t.jsxs)(S.Tooltip,{children:[(0,t.jsx)(S.TooltipTrigger,{asChild:!0,children:(0,t.jsxs)("div",{className:"flex cursor-pointer items-center gap-1.5",children:[(0,t.jsx)(T.Switch,{id:"open-pr",size:"sm",checked:!!ey||en,onCheckedChange:e=>{ec(e),e||ex(!1)},disabled:c||ey}),(0,t.jsx)(k.Label,{htmlFor:"open-pr",className:(0,g.cn)("cursor-pointer text-xs font-medium",ey&&"opacity-50"),children:I("createDrawer.pr")})]})}),(0,t.jsx)(S.TooltipContent,{side:"bottom",children:ey?"Enabled — contributing to upstream":I("createDrawer.prDescription")})]}),(0,t.jsxs)(S.Tooltip,{children:[(0,t.jsx)(S.TooltipTrigger,{asChild:!0,children:(0,t.jsxs)("div",{className:"flex cursor-pointer items-center gap-1.5",children:[(0,t.jsx)(T.Switch,{id:"ci-watch",size:"sm",checked:ed,onCheckedChange:ep,disabled:c}),(0,t.jsx)(k.Label,{htmlFor:"ci-watch",className:"cursor-pointer text-xs font-medium",children:I("createDrawer.watch")})]})}),(0,t.jsx)(S.TooltipContent,{side:"bottom",children:I("createDrawer.watchDescription")})]}),(0,t.jsx)("div",{className:"bg-border h-4 w-px shrink-0"}),(0,t.jsxs)(S.Tooltip,{children:[(0,t.jsx)(S.TooltipTrigger,{asChild:!0,children:(0,t.jsxs)("div",{className:"flex cursor-pointer items-center gap-1.5",children:[(0,t.jsx)(T.Switch,{id:"rebase-before-branch",size:"sm",checked:eT,onCheckedChange:eS,disabled:c}),(0,t.jsxs)(k.Label,{htmlFor:"rebase-before-branch",className:"flex cursor-pointer items-center gap-1 text-xs font-medium",children:[(0,t.jsx)(m.RefreshCw,{className:"h-3 w-3"}),I("createDrawer.sync")]})]})}),(0,t.jsx)(S.TooltipContent,{side:"bottom",children:I("createDrawer.syncDescription")})]}),(0,t.jsxs)(S.Tooltip,{children:[(0,t.jsx)(S.TooltipTrigger,{asChild:!0,children:(0,t.jsxs)("div",{className:"flex cursor-pointer items-center gap-1.5",children:[(0,t.jsx)(T.Switch,{id:"commit-specs",size:"sm",checked:eN,onCheckedChange:eD,disabled:c}),(0,t.jsxs)(k.Label,{htmlFor:"commit-specs",className:"flex cursor-pointer items-center gap-1 text-xs font-medium",children:[(0,t.jsx)(u.FileText,{className:"h-3 w-3"}),I("createDrawer.commitSpecs")]})]})}),(0,t.jsx)(S.TooltipContent,{side:"bottom",children:I("createDrawer.commitSpecsDescription")})]}),!eV&&(0,t.jsxs)(S.Tooltip,{children:[(0,t.jsx)(S.TooltipTrigger,{asChild:!0,children:(0,t.jsxs)("div",{className:"flex cursor-pointer items-center gap-1.5",children:[(0,t.jsx)(T.Switch,{id:"fork-and-pr",size:"sm",checked:ey,onCheckedChange:e=>{ek(e),e&&eD(!1)},disabled:c}),(0,t.jsxs)(k.Label,{htmlFor:"fork-and-pr",className:"flex cursor-pointer items-center gap-1 text-xs font-medium",children:[(0,t.jsx)(p.GitFork,{className:"h-3 w-3"}),I("createDrawer.forkAndPr")]})]})}),(0,t.jsx)(S.TooltipContent,{side:"bottom",children:I("createDrawer.forkAndPrDescription")})]})]})]})]})]})})})})}function W({features:e,value:s,onChange:l,disabled:n}){let{t:c}=(0,a.useTranslation)("web"),[d,p]=(0,r.useState)(!1),[u,h]=(0,r.useState)(""),m=(0,r.useRef)(null),x=e.find(e=>e.id===s),f=u.trim()?e.filter(e=>e.name.toLowerCase().includes(u.toLowerCase())||e.id.toLowerCase().includes(u.toLowerCase())):e,b=(0,r.useCallback)(e=>{l(e),p(!1),h("")},[l]);return(0,r.useEffect)(()=>{d?setTimeout(()=>m.current?.focus(),0):h("")},[d]),(0,t.jsxs)(D.Popover,{open:d,onOpenChange:p,children:[(0,t.jsx)(D.PopoverTrigger,{asChild:!0,children:(0,t.jsxs)("button",{id:"parent-feature",type:"button",role:"combobox","aria-expanded":d,"aria-label":"Parent Feature",disabled:n,"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",!x&&"text-muted-foreground"),children:[(0,t.jsx)("span",{className:"truncate",children:x?`${x.name} (${x.id.slice(0,8)})`:c("createDrawer.selectParent")}),(0,t.jsx)(i.ChevronsUpDown,{className:"ms-2 h-4 w-4 shrink-0 opacity-50"})]})}),(0,t.jsx)(D.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)(C.Input,{ref:m,placeholder:c("createDrawer.searchFeatures"),value:u,onChange:e=>h(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===s,onClick:()=>b(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===s&&"bg-accent/50"),"data-testid":"parent-feature-option-none",children:[(0,t.jsx)(o.CheckIcon,{className:(0,g.cn)("h-4 w-4 shrink-0",void 0!==s&&"invisible")}),(0,t.jsx)("span",{className:"text-muted-foreground italic",children:c("createDrawer.noParent")})]}),0===f.length&&u?(0,t.jsx)("p",{className:"text-muted-foreground px-3 py-2 text-sm",children:c("createDrawer.noFeaturesFound")}):f.map(e=>(0,t.jsxs)("button",{type:"button",role:"option","aria-selected":s===e.id,onClick:()=>b(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",s===e.id&&"bg-accent/50"),"data-testid":`parent-feature-option-${e.id}`,children:[(0,t.jsx)(o.CheckIcon,{className:(0,g.cn)("h-4 w-4 shrink-0",s!==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({repositories:e,value:s,onChange:l,onAddRepository:n,disabled:u}){let[h,m]=(0,r.useState)(!1),[x,f]=(0,r.useState)(""),[b,j]=(0,r.useState)(!1),[w,v]=(0,r.useState)(null),[y,k]=(0,r.useState)(!1),T=(0,r.useRef)(null),{reactFileManager:S}=(0,M.useFeatureFlags)(),{t:F}=(0,a.useTranslation)("web"),P=e.find(e=>e.path===s),L=x.trim()?e.filter(e=>e.name.toLowerCase().includes(x.toLowerCase())||e.path.toLowerCase().includes(x.toLowerCase())):e,z=(0,r.useCallback)(e=>{l(e),m(!1),f("")},[l]),E=(0,r.useCallback)(async e=>{let t=await (0,I.addRepository)({path:e});if(t.error){v(t.error),j(!1);return}if(t.repository){let e={id:t.repository.id,name:t.repository.name,path:t.repository.path};n?.(e),l(e.path),m(!1),f("")}},[n,l]),O=(0,r.useCallback)(async()=>{if(!b){if(S)return void k(!0);j(!0),v(null);try{let e=await (0,U.pickFolder)();if(!e)return void j(!1);await E(e)}catch{k(!0)}finally{j(!1)}}},[b,S,E]),K=(0,r.useCallback)(async e=>{if(k(!1),e){j(!0),v(null);try{await E(e)}catch(e){v(e instanceof Error?e.message:"Failed to add repository")}finally{j(!1)}}},[E]);return(0,r.useEffect)(()=>{h?setTimeout(()=>T.current?.focus(),0):f("")},[h]),(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)(D.Popover,{open:h,onOpenChange:m,children:[(0,t.jsx)(D.PopoverTrigger,{asChild:!0,children:(0,t.jsxs)("button",{type:"button",role:"combobox","aria-expanded":h,"aria-label":"Repository",disabled:u,"data-testid":"repository-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",!P&&"text-muted-foreground"),children:[(0,t.jsx)("span",{className:"truncate",children:P?P.name:"Select repository..."}),(0,t.jsx)(i.ChevronsUpDown,{className:"ms-2 h-4 w-4 shrink-0 opacity-50"})]})}),(0,t.jsx)(D.PopoverContent,{className:"w-80 p-0",align:"start","data-testid":"repository-combobox-content",children:(0,t.jsxs)("div",{className:"flex flex-col",children:[(0,t.jsx)("div",{className:"border-b p-2",children:(0,t.jsx)(C.Input,{ref:T,placeholder:F("createDrawer.searchRepositories"),value:x,onChange:e=>f(e.target.value),className:"h-8 border-0 p-0 text-sm shadow-none focus-visible:ring-0","data-testid":"repository-search"})}),(0,t.jsx)("div",{className:"max-h-48 overflow-y-auto py-1",role:"listbox","aria-label":"Repositories",children:0===L.length?(0,t.jsx)("p",{className:"text-muted-foreground px-3 py-2 text-sm","data-testid":"repository-empty",children:"No repositories found."}):L.map(e=>(0,t.jsxs)("button",{type:"button",role:"option","aria-selected":s===e.path,onClick:()=>z(e.path),className:(0,g.cn)("hover:bg-accent hover:text-accent-foreground flex w-full items-center gap-2 px-3 py-2 text-sm",s===e.path&&"bg-accent/50"),"data-testid":`repository-option-${e.id}`,children:[(0,t.jsx)(o.CheckIcon,{className:(0,g.cn)("h-4 w-4 shrink-0",s!==e.path&&"invisible")}),(0,t.jsxs)("span",{className:"flex flex-col items-start truncate",children:[(0,t.jsxs)("span",{className:"flex items-center gap-1.5 truncate",children:[e.name,e.isFork?(0,t.jsxs)(N.Badge,{variant:"outline",className:"h-4 shrink-0 px-1 text-[10px]",children:[(0,t.jsx)(p.GitFork,{className:"mr-0.5 h-2.5 w-2.5"}),"Fork"]}):null]}),(0,t.jsx)("span",{className:"text-muted-foreground truncate text-xs",children:e.path})]})]},e.id))}),(0,t.jsx)(R.Separator,{}),(0,t.jsxs)("button",{type:"button",onClick:O,disabled:b,className:"hover:bg-accent hover:text-accent-foreground flex w-full items-center gap-2 px-3 py-2 text-sm","data-testid":"add-repository-item",children:[b?(0,t.jsx)(d.Loader2,{className:"h-4 w-4 shrink-0 animate-spin"}):(0,t.jsx)(c.FolderPlus,{className:"h-4 w-4 shrink-0"}),(0,t.jsx)("span",{children:"Add new repository..."})]}),w?(0,t.jsx)("p",{className:"px-3 pb-2 text-xs text-red-500","data-testid":"add-repository-error",children:w}):null]})})]}),(0,t.jsx)(A.ReactFileManagerDialog,{open:y,onOpenChange:e=>{e||k(!1)},onSelect:K})]})}e.s(["FeatureCreateDrawer",()=>q],630616),e.s([],34562)},269452,e=>{"use strict";var t=e.i(508893);let r=(0,t.createServerReference)("40043d514e2ae74fecc73e6e73e249f7151efc24b7",t.callServer,void 0,t.findSourceMapURL,"createFeature");e.s(["createFeature",()=>r])}]);
|
|
1
|
+
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,283843,e=>{"use strict";let t=(0,e.i(903645).default)("chevrons-up-down",[["path",{d:"m7 15 5 5 5-5",key:"1hf1tw"}],["path",{d:"m7 9 5-5 5 5",key:"sgt6xg"}]]);e.s(["ChevronsUpDown",()=>t],283843)},34562,630616,e=>{"use strict";var t=e.i(679606),r=e.i(152155);e.i(541001);var a=e.i(64780),s=e.i(216868),i=e.i(283843),o=e.i(197667),l=e.i(453360),n=e.i(655016),c=e.i(591925),d=e.i(83428),p=e.i(381542),u=e.i(670471),h=e.i(912103),m=e.i(43416),x=e.i(542049),f=e.i(941698),g=e.i(131777),b=e.i(808361);e.i(1650);var j=e.i(511495),w=e.i(845811),v=e.i(735364),C=e.i(698127),y=e.i(48306),k=e.i(141957),N=e.i(81846),D=e.i(390382),T=e.i(951911),S=e.i(102828),F=e.i(930153);e.i(650032);var P=e.i(486254),L=e.i(508893);let z=(0,L.createServerReference)("40ea48d752291fdfcaad9784e39a575c4655808001",L.callServer,void 0,L.findSourceMapURL,"getViewerPermission");var E=e.i(41413),R=e.i(425235),U=e.i(478521);e.i(13322);var A=e.i(961201),M=e.i(175921),I=e.i(507987),O=e.i(442076);let K=["application","fast","spec"],$={application:{icon:x.LayoutGrid,labelKey:"createDrawer.modeApplication"},fast:{icon:l.Zap,labelKey:"createDrawer.modeFast"},spec:{icon:f.ClipboardList,labelKey:"createDrawer.modeSpec"}},B=new Set([".png",".jpg",".jpeg",".gif",".webp",".svg",".bmp",".ico",".pdf",".doc",".docx",".xls",".xlsx",".ppt",".pptx",".txt",".md",".csv",".json",".yaml",".yml",".xml",".ts",".tsx",".js",".jsx",".py",".rb",".go",".rs",".java",".c",".cpp",".h",".hpp",".cs",".swift",".kt",".html",".css",".scss",".less",".sh",".bash",".zsh",".fish",".toml",".ini",".cfg",".conf",".env",".zip",".tar",".gz",".log"]),G={allowPrd:!1,allowPlan:!1,allowMerge:!1};function q({open:e,onClose:i,onSubmit:o,repositoryPath:l,isSubmitting:c=!1,workflowDefaults:d,features:x,repositories:f,initialParentId:C,currentAgentType:D,currentModel:L,initialDescription:R,canPushDirectly:U,initialMode:A}){let M=(0,b.useSoundAction)("create"),{t:I}=(0,a.useTranslation)("web"),q=l&&(!f||0===f.length||f.some(e=>e.path===l))?l:"",J=d?.approvalGates??G,V=d?.push??!1,H=d?.openPr??!1,Q=d?.ciWatchEnabled!==!1,X=d?.enableEvidence??!1,Y=d?.commitEvidence??!1,_=A||(d?.fast===!1?"application":"fast"),[ee,et]=(0,r.useState)(R??"");(0,r.useEffect)(()=>{R&&et(R)},[R]);let[er,ea]=(0,r.useState)([]),[es,ei]=(0,r.useState)({...J}),[eo,el]=(0,r.useState)(V),[en,ec]=(0,r.useState)(H),[ed,ep]=(0,r.useState)(d?.ciWatchEnabled!==!1),[eu,eh]=(0,r.useState)(X),[em,ex]=(0,r.useState)(Y),[ef,eg]=(0,r.useState)(void 0),[eb,ej]=(0,r.useState)(_),ew="fast"===eb,[ev,eC]=(0,r.useState)(!1),[ey,ek]=(0,r.useState)(!1),[eN,eD]=(0,r.useState)(!0),[eT,eS]=(0,r.useState)(!0),[eF,eP]=(0,r.useState)(d?.injectSkills??!1),[eL,ez]=(0,r.useState)(void 0),[eE,eR]=(0,r.useState)(void 0),[eU,eA]=(0,r.useState)(q||void 0),[eM,eI]=(0,r.useState)(f??[]),[eO,eK]=(0,r.useState)(!1),[e$,eB]=(0,r.useState)(null),[eG,eq]=(0,r.useState)(!1),eW=(0,r.useRef)(crypto.randomUUID()),eZ=(0,r.useRef)(0),eJ=(0,r.useRef)(null);(0,r.useEffect)(()=>{d&&(ei({...d.approvalGates}),el(d.push),ec(d.openPr),ep(!1!==d.ciWatchEnabled),eh(d.enableEvidence),ex(d.commitEvidence),A||ej(!1!==d.fast?"fast":"application"),eP(d.injectSkills??!1))},[d,A]),(0,r.useEffect)(()=>{eI(f??[])},[f]),(0,r.useEffect)(()=>{e&&C&&eg(C)},[e,C]);let[eV,eH]=(0,r.useState)(U??!1);(0,r.useEffect)(()=>{eH(U??!1)},[U]);let eQ=(0,r.useRef)(eU);(0,r.useEffect)(()=>{eU&&eU!==eQ.current&&(eQ.current=eU,z(eU).then(e=>eH(e.canPushDirectly)).catch(()=>eH(!1)))},[eU]),(0,r.useEffect)(()=>{eV&&(ek(!1),el(V),ec(H),eD(!0))},[eV,V,H]);let eX=(0,r.useCallback)(()=>{et(""),ea([]),ei({...J}),el(V),ec(H),ep(Q),eh(X),ex(Y),eg(void 0),eA(q||void 0),eI(f??[]),ej(_),eC(!1),ek(!1),eD(!0),eS(!0),ez(void 0),eR(void 0),eB(null),eZ.current=0,eK(!1)},[J,V,H,X,Q,Y,_,q,f]),eY=""!==ee.trim()||er.length>0,{attemptClose:e_}=(0,F.useGuardedDrawerClose)({open:e,isDirty:eY,onClose:i,onReset:eX}),e0=(0,r.useCallback)(async e=>{for(let t of(eB(null),e)){if(t.size>0xa00000)return void eB(`"${t.name}" exceeds 10 MB limit`);let e=function(e){let t=e.lastIndexOf(".");return t>=0?e.slice(t).toLowerCase():""}(t.name);if(e&&!B.has(e))return void eB(`File type "${e}" is not allowed`)}for(let t of e){let e=crypto.randomUUID();ea(r=>[...r,{id:e,name:t.name,size:t.size,mimeType:t.type||"application/octet-stream",path:"",loading:!0}]);try{let r=new FormData;r.append("file",t),r.append("sessionId",eW.current);let a=await fetch("/api/attachments/upload",{method:"POST",body:r});if(!a.ok){let t=await a.json().catch(()=>({error:"Upload failed"}));ea(t=>t.filter(t=>t.id!==e)),eB(t.error??"Upload failed");return}let s=await a.json();ea(t=>t.some(t=>t.id!==e&&t.path===s.path)?t.filter(t=>t.id!==e):t.map(t=>t.id===e?{...s,id:e,loading:!1}:t))}catch{ea(t=>t.filter(t=>t.id!==e)),eB("Upload failed")}}},[]),e1=(0,r.useCallback)(e=>{e.preventDefault(),e.stopPropagation(),eZ.current+=1,1===eZ.current&&eK(!0)},[]),e5=(0,r.useCallback)(e=>{e.preventDefault(),e.stopPropagation(),eZ.current-=1,0===eZ.current&&eK(!1)},[]),e4=(0,r.useCallback)(e=>{e.preventDefault(),e.stopPropagation()},[]),e2=(0,r.useCallback)(e=>{e.preventDefault(),e.stopPropagation(),eZ.current=0,eK(!1);let t=Array.from(e.dataTransfer.files);t.length>0&&e0(t)},[e0]),e3=(0,r.useCallback)(e=>{let t=e.clipboardData?.items;if(!t)return;let r=[];for(let e of Array.from(t))if("file"===e.kind){let t=e.getAsFile();t&&r.push(t)}r.length>0&&(e.preventDefault(),e0(r))},[e0]),e8=(0,r.useCallback)(e=>{if(e.preventDefault(),!ee.trim())return;let t=eU??q;t&&(M.play(),o({description:ee.trim(),attachments:er.filter(e=>!e.loading),repositoryPath:t,approvalGates:{allowPrd:es.allowPrd??!1,allowPlan:es.allowPlan??!1,allowMerge:es.allowMerge??!1},push:!!ey||eo||en,openPr:!!ey||en,ciWatchEnabled:ed,enableEvidence:eu,commitEvidence:em,fast:ew,forkAndPr:ey,commitSpecs:eN,rebaseBeforeBranch:eT,injectSkills:eF,...ev?{pending:ev}:{},...eL?{agentType:eL}:{},...eE?{model:eE}:{},...ef?{parentId:ef}:{},sessionId:eW.current}),eX())},[ee,er,es,eU,q,o,eo,en,eu,ed,em,ew,ey,eN,eT,eF,ev,eL,eE,ef,M,eX]),e6=(0,r.useCallback)(async()=>{try{let e=await (0,O.pickFiles)();if(!e)return;for(let t of e){let e=crypto.randomUUID();ea(r=>[...r,{id:e,name:t.name,size:t.size,mimeType:"application/octet-stream",path:"",loading:!0}]);try{let r=await fetch("/api/attachments/upload-from-path",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({path:t.path,sessionId:eW.current})});if(!r.ok){let t=await r.json().catch(()=>({error:"Upload failed"}));ea(t=>t.filter(t=>t.id!==e)),eB(t.error??"Upload failed");return}let a=await r.json();ea(t=>t.some(t=>t.id!==e&&t.path===a.path)?t.filter(t=>t.id!==e):t.map(t=>t.id===e?{...a,id:e,loading:!1}:t))}catch{ea(t=>t.filter(t=>t.id!==e)),eB("Upload failed")}}}catch{}},[]),e9=(0,r.useCallback)(e=>{ea(t=>t.filter(t=>t.id!==e))},[]),e7=(0,r.useCallback)((e,t)=>{ea(r=>r.map(r=>r.id===e?{...r,notes:t}:r))},[]),te=(0,r.useRef)(null),tt=(0,r.useCallback)(e=>{(e.ctrlKey||e.metaKey)&&"Enter"===e.key&&(e.preventDefault(),te.current?.requestSubmit())},[]),tr=(0,r.useCallback)(()=>{eq(!0)},[]),ta=(0,r.useCallback)(()=>{setTimeout(()=>{let e=eJ.current?.contains(document.activeElement),t=eJ.current?.querySelector('[aria-expanded="true"]')!==null;e||t||eq(!1)},0)},[]),ts=x&&x.length>0,ti=!q&&!eU,to=!q&&void 0!==f,tl=[{id:"allowPrd",label:I("createDrawer.prd"),description:I("createDrawer.prdDescription")},{id:"allowPlan",label:I("createDrawer.plan"),description:I("createDrawer.planDescription")},{id:"allowMerge",label:I("createDrawer.merge"),description:I("createDrawer.mergeDescription")}];return(0,t.jsx)(j.BaseDrawer,{open:e,onClose:e_,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)(w.DrawerTitle,{children:I("createDrawer.title")})]}),c?(0,t.jsx)(w.DrawerDescription,{asChild:!0,children:(0,t.jsx)("div",{children:(0,t.jsx)(N.Badge,{variant:"secondary",children:I("createDrawer.creating")})})}):null]}),footer:(0,t.jsxs)("div",{className:"flex flex-row justify-end gap-2",children:[(0,t.jsx)(v.Button,{variant:"outline",onClick:e_,disabled:c,children:I("createDrawer.cancel")}),(0,t.jsx)(v.Button,{type:"submit",form:"create-feature-form",disabled:!ee.trim()||c||ti,children:c?I("createDrawer.creating"):I("createDrawer.createFeature")})]}),children:(0,t.jsx)("div",{className:"overflow-y-auto p-4",children:(0,t.jsx)(S.TooltipProvider,{delayDuration:400,children:(0,t.jsxs)("form",{ref:te,id:"create-feature-form",onSubmit:e8,onKeyDown:tt,className:"flex flex-col gap-4",children:[to?(0,t.jsxs)("div",{className:"flex flex-col gap-1.5","data-testid":"repo-selector-section",children:[(0,t.jsx)(k.Label,{className:"text-muted-foreground text-xs font-semibold tracking-wider",children:I("createDrawer.repository")}),(0,t.jsx)(Z,{repositories:eM,value:eU,onChange:eA,onAddRepository:e=>{eI(t=>[...t,e]),eA(e.path)},disabled:c})]}):q?(0,t.jsxs)("div",{className:"flex flex-col gap-1.5","data-testid":"repo-readonly-section",children:[(0,t.jsx)(k.Label,{className:"text-muted-foreground text-xs font-semibold tracking-wider",children:I("createDrawer.repository")}),(0,t.jsx)("p",{className:"text-sm","data-testid":"repo-readonly-label",children:f?.find(e=>e.path===q)?.name??q.split("/").pop()})]}):null,(0,t.jsxs)("div",{role:"region","aria-label":I("createDrawer.fileDropZone"),"data-drag-over":eO?"true":"false",onDragEnter:e1,onDragLeave:e5,onDragOver:e4,onDrop:e2,className:(0,g.cn)("flex flex-col gap-1.5 rounded-md border-2 border-transparent p-1 transition-colors",eO&&"border-primary/50 bg-primary/5"),children:[(0,t.jsx)(k.Label,{htmlFor:"feature-description",className:"text-muted-foreground text-xs font-semibold tracking-wider",children:I("createDrawer.describeFeature")}),(0,t.jsxs)("div",{ref:eJ,onFocus:tr,onBlur:ta,className:(0,g.cn)("border-input flex h-56 flex-col overflow-hidden rounded-md border shadow-xs transition-[color,box-shadow]",eG&&"ring-ring/50 border-ring ring-[3px]"),children:[(0,t.jsx)(y.Textarea,{id:"feature-description",placeholder:I("createDrawer.featurePlaceholder"),value:ee,onChange:e=>et(e.target.value),onPaste:e3,required:!0,disabled:c,className:"min-h-0 flex-1 resize-none rounded-none border-0 shadow-none focus-visible:ring-0"}),er.length>0&&(0,t.jsx)("div",{className:"flex flex-wrap items-center gap-1.5 px-3 py-2",children:er.map(e=>(0,t.jsx)(P.AttachmentChip,{name:e.name,size:e.size,mimeType:e.mimeType,path:e.path,onRemove:()=>e9(e.id),disabled:c,loading:e.loading,notes:e.notes,onNotesChange:t=>e7(e.id,t)},e.id))}),e$?(0,t.jsx)("p",{className:"text-destructive px-3 pb-2 text-xs",children:e$}):null,(0,t.jsxs)("div",{className:"border-input flex items-center gap-3 border-t px-3 py-1.5",children:[(0,t.jsx)(E.AgentModelPicker,{initialAgentType:eL??D??"claude-code",initialModel:eE??L??"claude-sonnet-4-6",mode:"override",onAgentModelChange:(e,t)=>{ez(e),eR(t)},disabled:c,className:"w-55"}),(0,t.jsxs)(S.Tooltip,{children:[(0,t.jsx)(S.TooltipTrigger,{asChild:!0,children:(0,t.jsxs)("div",{className:"ml-auto flex cursor-pointer items-center gap-2",children:[(0,t.jsx)(T.Switch,{id:"pending-mode",checked:ev,onCheckedChange:eC,disabled:c}),(0,t.jsxs)(k.Label,{htmlFor:"pending-mode",className:"flex cursor-pointer items-center gap-1 text-sm font-medium",children:[(0,t.jsx)(n.Clock,{className:"h-3.5 w-3.5"}),I("createDrawer.pendingMode")]})]})}),(0,t.jsx)(S.TooltipContent,{side:"bottom",children:I("createDrawer.pendingModeDescription")})]}),(0,t.jsx)("div",{role:"group","aria-label":I("createDrawer.modeGroupLabel"),className:"border-input flex items-center gap-0.5 rounded-md border p-0.5",children:K.map(e=>{let r=$[e],a=r.icon,s=eb===e;return(0,t.jsxs)(S.Tooltip,{children:[(0,t.jsx)(S.TooltipTrigger,{asChild:!0,children:(0,t.jsxs)("button",{type:"button","data-testid":`build-mode-${e}`,"aria-pressed":s,disabled:c,onClick:()=>ej(e),className:(0,g.cn)("flex cursor-pointer items-center gap-1 rounded-sm px-2 py-1 text-xs font-medium transition-colors",s?"bg-accent text-foreground":"text-muted-foreground hover:text-foreground","disabled:cursor-not-allowed disabled:opacity-50"),children:[(0,t.jsx)(a,{className:"h-3.5 w-3.5"}),I(r.labelKey)]})}),(0,t.jsx)(S.TooltipContent,{side:"bottom",children:I(`${r.labelKey}Description`)})]},e)})}),(0,t.jsxs)(S.Tooltip,{children:[(0,t.jsx)(S.TooltipTrigger,{asChild:!0,children:(0,t.jsx)("button",{type:"button",onClick:e6,disabled:c,"aria-label":I("chat.attachFiles"),className:"text-muted-foreground hover:text-foreground cursor-pointer rounded p-1 transition-colors",children:(0,t.jsx)(s.PaperclipIcon,{className:"h-4 w-4"})})}),(0,t.jsx)(S.TooltipContent,{side:"bottom",children:I("chat.attachFiles")})]})]})]})]}),ts&&void 0!==C?(0,t.jsxs)("div",{className:"flex flex-col gap-1.5",children:[(0,t.jsx)(k.Label,{htmlFor:"parent-feature",className:"text-muted-foreground text-xs font-semibold tracking-wider",children:I("createDrawer.parentFeature")}),(0,t.jsx)(W,{features:x,value:ef,onChange:eg,disabled:c})]}):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)(S.Tooltip,{children:[(0,t.jsx)(S.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:I("createDrawer.approve")})}),(0,t.jsx)(S.TooltipContent,{side:"bottom",children:I("createDrawer.approveDescription")})]}),(0,t.jsx)("div",{className:"flex flex-1 items-center gap-4",children:tl.map(e=>(0,t.jsxs)(S.Tooltip,{children:[(0,t.jsx)(S.TooltipTrigger,{asChild:!0,children:(0,t.jsxs)("div",{className:"flex cursor-pointer items-center gap-1.5",children:[(0,t.jsx)(T.Switch,{id:`approve-${e.id}`,size:"sm",checked:es[e.id]??!1,onCheckedChange:t=>ei(r=>({...r,[e.id]:t})),disabled:c||ew&&("allowPrd"===e.id||"allowPlan"===e.id)}),(0,t.jsx)(k.Label,{htmlFor:`approve-${e.id}`,className:"cursor-pointer text-xs font-medium",children:e.label})]})}),(0,t.jsx)(S.TooltipContent,{side:"bottom",children:ew&&("allowPrd"===e.id||"allowPlan"===e.id)?I("createDrawer.skippedInFastMode"):e.description})]},e.id))}),(0,t.jsxs)(S.Tooltip,{children:[(0,t.jsx)(S.TooltipTrigger,{asChild:!0,children:(0,t.jsx)("button",{type:"button",onClick:()=>{let e=tl.every(e=>es[e.id]),t={};for(let r of tl)t[r.id]=!e;ei(t)},disabled:c,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",tl.every(e=>es[e.id])&&"text-primary"),children:I("createDrawer.all")})}),(0,t.jsx)(S.TooltipContent,{side:"bottom",children:I("createDrawer.toggleAllApprovalGates")})]})]}),(0,t.jsxs)("div",{className:"border-input flex items-center gap-4 rounded-md border px-3 py-2.5",children:[(0,t.jsxs)(S.Tooltip,{children:[(0,t.jsx)(S.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:I("createDrawer.evidence")})}),(0,t.jsx)(S.TooltipContent,{side:"bottom",children:I("createDrawer.evidenceDescription")})]}),(0,t.jsxs)("div",{className:"flex flex-1 items-center gap-4",children:[(0,t.jsxs)(S.Tooltip,{children:[(0,t.jsx)(S.TooltipTrigger,{asChild:!0,children:(0,t.jsxs)("div",{className:"flex cursor-pointer items-center gap-1.5",children:[(0,t.jsx)(T.Switch,{id:"enable-evidence",size:"sm",checked:eu,onCheckedChange:e=>{eh(e),e||ex(!1)},disabled:c}),(0,t.jsx)(k.Label,{htmlFor:"enable-evidence",className:"cursor-pointer text-xs font-medium",children:I("createDrawer.collect")})]})}),(0,t.jsx)(S.TooltipContent,{side:"bottom",children:I("createDrawer.collectDescription")})]}),(0,t.jsxs)(S.Tooltip,{children:[(0,t.jsx)(S.TooltipTrigger,{asChild:!0,children:(0,t.jsxs)("div",{className:"flex cursor-pointer items-center gap-1.5",children:[(0,t.jsx)(T.Switch,{id:"commit-evidence",size:"sm",checked:em,onCheckedChange:ex,disabled:c||!eu||!en&&!ey}),(0,t.jsx)(k.Label,{htmlFor:"commit-evidence",className:(0,g.cn)("cursor-pointer text-xs font-medium",(!eu||!en&&!ey)&&"opacity-50"),children:I("createDrawer.addToPr")})]})}),(0,t.jsx)(S.TooltipContent,{side:"bottom",children:en||ey?eu?I("createDrawer.addToPrDescription"):I("createDrawer.requiresEvidence"):I("createDrawer.requiresPr")})]})]})]}),(0,t.jsxs)("div",{className:"border-input flex items-center gap-4 rounded-md border px-3 py-2.5",children:[(0,t.jsxs)(S.Tooltip,{children:[(0,t.jsx)(S.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:I("createDrawer.skills")})}),(0,t.jsx)(S.TooltipContent,{side:"bottom",children:I("createDrawer.skillsDescription")})]}),(0,t.jsx)("div",{className:"flex flex-1 items-center gap-4",children:(0,t.jsxs)(S.Tooltip,{children:[(0,t.jsx)(S.TooltipTrigger,{asChild:!0,children:(0,t.jsxs)("div",{className:"flex cursor-pointer items-center gap-1.5",children:[(0,t.jsx)(T.Switch,{id:"inject-skills",size:"sm",checked:eF,onCheckedChange:eP,disabled:c}),(0,t.jsxs)(k.Label,{htmlFor:"inject-skills",className:"flex cursor-pointer items-center gap-1 text-xs font-medium",children:[(0,t.jsx)(h.Puzzle,{className:"h-3 w-3"}),I("createDrawer.injectSkills")]})]})}),(0,t.jsx)(S.TooltipContent,{side:"bottom",children:I("createDrawer.injectSkillsDescription")})]})})]}),(0,t.jsxs)("div",{className:"border-input flex items-start gap-4 rounded-md border px-3 py-2.5",children:[(0,t.jsx)("span",{className:"text-muted-foreground w-16 shrink-0 pt-0.5 text-xs font-semibold tracking-wider",children:I("createDrawer.git")}),(0,t.jsxs)("div",{className:"flex flex-1 flex-wrap items-center gap-4",children:[(0,t.jsxs)(S.Tooltip,{children:[(0,t.jsx)(S.TooltipTrigger,{asChild:!0,children:(0,t.jsxs)("div",{className:"flex cursor-pointer items-center gap-1.5",children:[(0,t.jsx)(T.Switch,{id:"push",size:"sm",checked:!!ey||eo||en,onCheckedChange:e=>{el(e),!e&&en&&ec(!1)},disabled:c||ey}),(0,t.jsx)(k.Label,{htmlFor:"push",className:(0,g.cn)("cursor-pointer text-xs font-medium",ey&&"opacity-50"),children:I("createDrawer.push")})]})}),(0,t.jsx)(S.TooltipContent,{side:"bottom",children:ey?"Enabled — contributing to upstream":I("createDrawer.pushDescription")})]}),(0,t.jsxs)(S.Tooltip,{children:[(0,t.jsx)(S.TooltipTrigger,{asChild:!0,children:(0,t.jsxs)("div",{className:"flex cursor-pointer items-center gap-1.5",children:[(0,t.jsx)(T.Switch,{id:"open-pr",size:"sm",checked:!!ey||en,onCheckedChange:e=>{ec(e),e||ex(!1)},disabled:c||ey}),(0,t.jsx)(k.Label,{htmlFor:"open-pr",className:(0,g.cn)("cursor-pointer text-xs font-medium",ey&&"opacity-50"),children:I("createDrawer.pr")})]})}),(0,t.jsx)(S.TooltipContent,{side:"bottom",children:ey?"Enabled — contributing to upstream":I("createDrawer.prDescription")})]}),(0,t.jsxs)(S.Tooltip,{children:[(0,t.jsx)(S.TooltipTrigger,{asChild:!0,children:(0,t.jsxs)("div",{className:"flex cursor-pointer items-center gap-1.5",children:[(0,t.jsx)(T.Switch,{id:"ci-watch",size:"sm",checked:ed,onCheckedChange:ep,disabled:c}),(0,t.jsx)(k.Label,{htmlFor:"ci-watch",className:"cursor-pointer text-xs font-medium",children:I("createDrawer.watch")})]})}),(0,t.jsx)(S.TooltipContent,{side:"bottom",children:I("createDrawer.watchDescription")})]}),(0,t.jsx)("div",{className:"bg-border h-4 w-px shrink-0"}),(0,t.jsxs)(S.Tooltip,{children:[(0,t.jsx)(S.TooltipTrigger,{asChild:!0,children:(0,t.jsxs)("div",{className:"flex cursor-pointer items-center gap-1.5",children:[(0,t.jsx)(T.Switch,{id:"rebase-before-branch",size:"sm",checked:eT,onCheckedChange:eS,disabled:c}),(0,t.jsxs)(k.Label,{htmlFor:"rebase-before-branch",className:"flex cursor-pointer items-center gap-1 text-xs font-medium",children:[(0,t.jsx)(m.RefreshCw,{className:"h-3 w-3"}),I("createDrawer.sync")]})]})}),(0,t.jsx)(S.TooltipContent,{side:"bottom",children:I("createDrawer.syncDescription")})]}),(0,t.jsxs)(S.Tooltip,{children:[(0,t.jsx)(S.TooltipTrigger,{asChild:!0,children:(0,t.jsxs)("div",{className:"flex cursor-pointer items-center gap-1.5",children:[(0,t.jsx)(T.Switch,{id:"commit-specs",size:"sm",checked:eN,onCheckedChange:eD,disabled:c}),(0,t.jsxs)(k.Label,{htmlFor:"commit-specs",className:"flex cursor-pointer items-center gap-1 text-xs font-medium",children:[(0,t.jsx)(u.FileText,{className:"h-3 w-3"}),I("createDrawer.commitSpecs")]})]})}),(0,t.jsx)(S.TooltipContent,{side:"bottom",children:I("createDrawer.commitSpecsDescription")})]}),!eV&&(0,t.jsxs)(S.Tooltip,{children:[(0,t.jsx)(S.TooltipTrigger,{asChild:!0,children:(0,t.jsxs)("div",{className:"flex cursor-pointer items-center gap-1.5",children:[(0,t.jsx)(T.Switch,{id:"fork-and-pr",size:"sm",checked:ey,onCheckedChange:e=>{ek(e),e&&eD(!1)},disabled:c}),(0,t.jsxs)(k.Label,{htmlFor:"fork-and-pr",className:"flex cursor-pointer items-center gap-1 text-xs font-medium",children:[(0,t.jsx)(p.GitFork,{className:"h-3 w-3"}),I("createDrawer.forkAndPr")]})]})}),(0,t.jsx)(S.TooltipContent,{side:"bottom",children:I("createDrawer.forkAndPrDescription")})]})]})]})]})]})})})})}function W({features:e,value:s,onChange:l,disabled:n}){let{t:c}=(0,a.useTranslation)("web"),[d,p]=(0,r.useState)(!1),[u,h]=(0,r.useState)(""),m=(0,r.useRef)(null),x=e.find(e=>e.id===s),f=u.trim()?e.filter(e=>e.name.toLowerCase().includes(u.toLowerCase())||e.id.toLowerCase().includes(u.toLowerCase())):e,b=(0,r.useCallback)(e=>{l(e),p(!1),h("")},[l]);return(0,r.useEffect)(()=>{d?setTimeout(()=>m.current?.focus(),0):h("")},[d]),(0,t.jsxs)(D.Popover,{open:d,onOpenChange:p,children:[(0,t.jsx)(D.PopoverTrigger,{asChild:!0,children:(0,t.jsxs)("button",{id:"parent-feature",type:"button",role:"combobox","aria-expanded":d,"aria-label":"Parent Feature",disabled:n,"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",!x&&"text-muted-foreground"),children:[(0,t.jsx)("span",{className:"truncate",children:x?`${x.name} (${x.id.slice(0,8)})`:c("createDrawer.selectParent")}),(0,t.jsx)(i.ChevronsUpDown,{className:"ms-2 h-4 w-4 shrink-0 opacity-50"})]})}),(0,t.jsx)(D.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)(C.Input,{ref:m,placeholder:c("createDrawer.searchFeatures"),value:u,onChange:e=>h(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===s,onClick:()=>b(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===s&&"bg-accent/50"),"data-testid":"parent-feature-option-none",children:[(0,t.jsx)(o.CheckIcon,{className:(0,g.cn)("h-4 w-4 shrink-0",void 0!==s&&"invisible")}),(0,t.jsx)("span",{className:"text-muted-foreground italic",children:c("createDrawer.noParent")})]}),0===f.length&&u?(0,t.jsx)("p",{className:"text-muted-foreground px-3 py-2 text-sm",children:c("createDrawer.noFeaturesFound")}):f.map(e=>(0,t.jsxs)("button",{type:"button",role:"option","aria-selected":s===e.id,onClick:()=>b(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",s===e.id&&"bg-accent/50"),"data-testid":`parent-feature-option-${e.id}`,children:[(0,t.jsx)(o.CheckIcon,{className:(0,g.cn)("h-4 w-4 shrink-0",s!==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({repositories:e,value:s,onChange:l,onAddRepository:n,disabled:u}){let[h,m]=(0,r.useState)(!1),[x,f]=(0,r.useState)(""),[b,j]=(0,r.useState)(!1),[w,v]=(0,r.useState)(null),[y,k]=(0,r.useState)(!1),T=(0,r.useRef)(null),{reactFileManager:S}=(0,M.useFeatureFlags)(),{t:F}=(0,a.useTranslation)("web"),P=e.find(e=>e.path===s),L=x.trim()?e.filter(e=>e.name.toLowerCase().includes(x.toLowerCase())||e.path.toLowerCase().includes(x.toLowerCase())):e,z=(0,r.useCallback)(e=>{l(e),m(!1),f("")},[l]),E=(0,r.useCallback)(async e=>{let t=await (0,I.addRepository)({path:e});if(t.error){v(t.error),j(!1);return}if(t.repository){let e={id:t.repository.id,name:t.repository.name,path:t.repository.path};n?.(e),l(e.path),m(!1),f("")}},[n,l]),O=(0,r.useCallback)(async()=>{if(!b){if(S)return void k(!0);j(!0),v(null);try{let e=await (0,U.pickFolder)();if(!e)return void j(!1);await E(e)}catch{k(!0)}finally{j(!1)}}},[b,S,E]),K=(0,r.useCallback)(async e=>{if(k(!1),e){j(!0),v(null);try{await E(e)}catch(e){v(e instanceof Error?e.message:"Failed to add repository")}finally{j(!1)}}},[E]);return(0,r.useEffect)(()=>{h?setTimeout(()=>T.current?.focus(),0):f("")},[h]),(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)(D.Popover,{open:h,onOpenChange:m,children:[(0,t.jsx)(D.PopoverTrigger,{asChild:!0,children:(0,t.jsxs)("button",{type:"button",role:"combobox","aria-expanded":h,"aria-label":"Repository",disabled:u,"data-testid":"repository-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",!P&&"text-muted-foreground"),children:[(0,t.jsx)("span",{className:"truncate",children:P?P.name:"Select repository..."}),(0,t.jsx)(i.ChevronsUpDown,{className:"ms-2 h-4 w-4 shrink-0 opacity-50"})]})}),(0,t.jsx)(D.PopoverContent,{className:"w-80 p-0",align:"start","data-testid":"repository-combobox-content",children:(0,t.jsxs)("div",{className:"flex flex-col",children:[(0,t.jsx)("div",{className:"border-b p-2",children:(0,t.jsx)(C.Input,{ref:T,placeholder:F("createDrawer.searchRepositories"),value:x,onChange:e=>f(e.target.value),className:"h-8 border-0 p-0 text-sm shadow-none focus-visible:ring-0","data-testid":"repository-search"})}),(0,t.jsx)("div",{className:"max-h-48 overflow-y-auto py-1",role:"listbox","aria-label":"Repositories",children:0===L.length?(0,t.jsx)("p",{className:"text-muted-foreground px-3 py-2 text-sm","data-testid":"repository-empty",children:"No repositories found."}):L.map(e=>(0,t.jsxs)("button",{type:"button",role:"option","aria-selected":s===e.path,onClick:()=>z(e.path),className:(0,g.cn)("hover:bg-accent hover:text-accent-foreground flex w-full items-center gap-2 px-3 py-2 text-sm",s===e.path&&"bg-accent/50"),"data-testid":`repository-option-${e.id}`,children:[(0,t.jsx)(o.CheckIcon,{className:(0,g.cn)("h-4 w-4 shrink-0",s!==e.path&&"invisible")}),(0,t.jsxs)("span",{className:"flex flex-col items-start truncate",children:[(0,t.jsxs)("span",{className:"flex items-center gap-1.5 truncate",children:[e.name,e.isFork?(0,t.jsxs)(N.Badge,{variant:"outline",className:"h-4 shrink-0 px-1 text-[10px]",children:[(0,t.jsx)(p.GitFork,{className:"mr-0.5 h-2.5 w-2.5"}),"Fork"]}):null]}),(0,t.jsx)("span",{className:"text-muted-foreground truncate text-xs",children:e.path})]})]},e.id))}),(0,t.jsx)(R.Separator,{}),(0,t.jsxs)("button",{type:"button",onClick:O,disabled:b,className:"hover:bg-accent hover:text-accent-foreground flex w-full items-center gap-2 px-3 py-2 text-sm","data-testid":"add-repository-item",children:[b?(0,t.jsx)(d.Loader2,{className:"h-4 w-4 shrink-0 animate-spin"}):(0,t.jsx)(c.FolderPlus,{className:"h-4 w-4 shrink-0"}),(0,t.jsx)("span",{children:"Add new repository..."})]}),w?(0,t.jsx)("p",{className:"px-3 pb-2 text-xs text-red-500","data-testid":"add-repository-error",children:w}):null]})})]}),(0,t.jsx)(A.ReactFileManagerDialog,{open:y,onOpenChange:e=>{e||k(!1)},onSelect:K})]})}e.s(["FeatureCreateDrawer",()=>q],630616),e.s([],34562)},17838,e=>{"use strict";var t=e.i(508893);let r=(0,t.createServerReference)("40f9865a02f709d69b646d15b1095d80de20dd68e1",t.callServer,void 0,t.findSourceMapURL,"createFeature");e.s(["createFeature",()=>r])}]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,787342,e=>{"use strict";var t=e.i(152155),r=e.i(922528),i=e.i(205978),s=e.i(786874),a=e.i(679606);function l(e){let l=e+"CollectionProvider",[o,n]=(0,r.createContextScope)(l),[c,d]=o(l,{collectionRef:{current:null},itemMap:new Map}),u=e=>{let{scope:r,children:i}=e,s=t.default.useRef(null),l=t.default.useRef(new Map).current;return(0,a.jsx)(c,{scope:r,itemMap:l,collectionRef:s,children:i})};u.displayName=l;let f=e+"CollectionSlot",h=(0,s.createSlot)(f),p=t.default.forwardRef((e,t)=>{let{scope:r,children:s}=e,l=d(f,r),o=(0,i.useComposedRefs)(t,l.collectionRef);return(0,a.jsx)(h,{ref:o,children:s})});p.displayName=f;let m=e+"CollectionItemSlot",g="data-radix-collection-item",x=(0,s.createSlot)(m),v=t.default.forwardRef((e,r)=>{let{scope:s,children:l,...o}=e,n=t.default.useRef(null),c=(0,i.useComposedRefs)(r,n),u=d(m,s);return t.default.useEffect(()=>(u.itemMap.set(n,{ref:n,...o}),()=>void u.itemMap.delete(n))),(0,a.jsx)(x,{...{[g]:""},ref:c,children:l})});return v.displayName=m,[{Provider:u,Slot:p,ItemSlot:v},function(r){let i=d(e+"CollectionConsumer",r);return t.default.useCallback(()=>{let e=i.collectionRef.current;if(!e)return[];let t=Array.from(e.querySelectorAll(`[${g}]`));return Array.from(i.itemMap.values()).sort((e,r)=>t.indexOf(e.ref.current)-t.indexOf(r.ref.current))},[i.collectionRef,i.itemMap])},n]}var o=new WeakMap;function n(e,t){var r,i;let s,a,l;if("at"in Array.prototype)return Array.prototype.at.call(e,t);let o=(r=e,i=t,s=r.length,(l=(a=c(i))>=0?a:s+a)<0||l>=s?-1:l);return -1===o?void 0:e[o]}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()],o.set(this,!0)}set(e,t){return o.get(this)&&(this.has(e)?this.#e[this.#e.indexOf(e)]=e:this.#e.push(e)),super.set(e,t),this}insert(e,t,r){let i,s=this.has(t),a=this.#e.length,l=c(e),o=l>=0?l:a+l,n=o<0||o>=a?-1:o;if(n===this.size||s&&n===this.size-1||-1===n)return this.set(t,r),this;let d=this.size+ +!s;l<0&&o++;let u=[...this.#e],f=!1;for(let e=o;e<d;e++)if(o===e){let a=u[e];u[e]===t&&(a=u[e+1]),s&&this.delete(t),i=this.get(a),this.set(t,r)}else{f||u[e-1]!==t||(f=!0);let r=u[f?e:e-1],s=i;i=this.get(r),this.delete(r),this.set(r,s)}return this}with(t,r,i){let s=new e(this);return s.insert(t,r,i),s}before(e){let t=this.#e.indexOf(e)-1;if(!(t<0))return this.entryAt(t)}setBefore(e,t,r){let i=this.#e.indexOf(e);return -1===i?this:this.insert(i,t,r)}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,r){let i=this.#e.indexOf(e);return -1===i?this:this.insert(i+1,t,r)}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=n(this.#e,e);if(void 0!==t)return this.get(t)}entryAt(e){let t=n(this.#e,e);if(void 0!==t)return[t,this.get(t)]}indexOf(e){return this.#e.indexOf(e)}keyAt(e){return n(this.#e,e)}from(e,t){let r=this.indexOf(e);if(-1===r)return;let i=r+t;return i<0&&(i=0),i>=this.size&&(i=this.size-1),this.at(i)}keyFrom(e,t){let r=this.indexOf(e);if(-1===r)return;let i=r+t;return i<0&&(i=0),i>=this.size&&(i=this.size-1),this.keyAt(i)}find(e,t){let r=0;for(let i of this){if(Reflect.apply(e,t,[i,r,this]))return i;r++}}findIndex(e,t){let r=0;for(let i of this){if(Reflect.apply(e,t,[i,r,this]))return r;r++}return -1}filter(t,r){let i=[],s=0;for(let e of this)Reflect.apply(t,r,[e,s,this])&&i.push(e),s++;return new e(i)}map(t,r){let i=[],s=0;for(let e of this)i.push([e[0],Reflect.apply(t,r,[e,s,this])]),s++;return new e(i)}reduce(...e){let[t,r]=e,i=0,s=r??this.at(0);for(let r of this)s=0===i&&1===e.length?r:Reflect.apply(t,this,[s,r,i,this]),i++;return s}reduceRight(...e){let[t,r]=e,i=r??this.at(-1);for(let r=this.size-1;r>=0;r--){let s=this.at(r);i=r===this.size-1&&1===e.length?s:Reflect.apply(t,this,[i,s,r,this])}return i}toSorted(t){return new e([...this.entries()].sort(t))}toReversed(){let t=new e;for(let e=this.size-1;e>=0;e--){let r=this.keyAt(e),i=this.get(r);t.set(r,i)}return t}toSpliced(...t){let r=[...this.entries()];return r.splice(...t),new e(r)}slice(t,r){let i=new e,s=this.size-1;if(void 0===t)return i;t<0&&(t+=this.size),void 0!==r&&r>0&&(s=r-1);for(let e=t;e<=s;e++){let t=this.keyAt(e),r=this.get(t);i.set(t,r)}return i}every(e,t){let r=0;for(let i of this){if(!Reflect.apply(e,t,[i,r,this]))return!1;r++}return!0}some(e,t){let r=0;for(let i of this){if(Reflect.apply(e,t,[i,r,this]))return!0;r++}return!1}}),e.s(["createCollection",()=>l])},151080,e=>{"use strict";var t=e.i(152155),r=e.i(291967),i=e.i(787342),s=e.i(205978),a=e.i(922528),l=e.i(713123),o=e.i(287620),n=e.i(929297),c=e.i(936589),d=e.i(566033),u=e.i(679606),f="rovingFocusGroup.onEntryFocus",h={bubbles:!1,cancelable:!0},p="RovingFocusGroup",[m,g,x]=(0,i.createCollection)(p),[v,b]=(0,a.createContextScope)(p,[x]),[y,w]=v(p),j=t.forwardRef((e,t)=>(0,u.jsx)(m.Provider,{scope:e.__scopeRovingFocusGroup,children:(0,u.jsx)(m.Slot,{scope:e.__scopeRovingFocusGroup,children:(0,u.jsx)(R,{...e,ref:t})})}));j.displayName=p;var R=t.forwardRef((e,i)=>{let{__scopeRovingFocusGroup:a,orientation:l,loop:m=!1,dir:x,currentTabStopId:v,defaultCurrentTabStopId:b,onCurrentTabStopIdChange:w,onEntryFocus:j,preventScrollOnEntryFocus:R=!1,...N}=e,k=t.useRef(null),S=(0,s.useComposedRefs)(i,k),D=(0,d.useDirection)(x),[T,A]=(0,c.useControllableState)({prop:v,defaultProp:b??null,onChange:w,caller:p}),[I,z]=t.useState(!1),F=(0,n.useCallbackRef)(j),E=g(a),H=t.useRef(!1),[L,M]=t.useState(0);return t.useEffect(()=>{let e=k.current;if(e)return e.addEventListener(f,F),()=>e.removeEventListener(f,F)},[F]),(0,u.jsx)(y,{scope:a,orientation:l,dir:D,loop:m,currentTabStopId:T,onItemFocus:t.useCallback(e=>A(e),[A]),onItemShiftTab:t.useCallback(()=>z(!0),[]),onFocusableItemAdd:t.useCallback(()=>M(e=>e+1),[]),onFocusableItemRemove:t.useCallback(()=>M(e=>e-1),[]),children:(0,u.jsx)(o.Primitive.div,{tabIndex:I||0===L?-1:0,"data-orientation":l,...N,ref:S,style:{outline:"none",...e.style},onMouseDown:(0,r.composeEventHandlers)(e.onMouseDown,()=>{H.current=!0}),onFocus:(0,r.composeEventHandlers)(e.onFocus,e=>{let t=!H.current;if(e.target===e.currentTarget&&t&&!I){let t=new CustomEvent(f,h);if(e.currentTarget.dispatchEvent(t),!t.defaultPrevented){let e=E().filter(e=>e.focusable);C([e.find(e=>e.active),e.find(e=>e.id===T),...e].filter(Boolean).map(e=>e.ref.current),R)}}H.current=!1}),onBlur:(0,r.composeEventHandlers)(e.onBlur,()=>z(!1))})})}),N="RovingFocusGroupItem",k=t.forwardRef((e,i)=>{let{__scopeRovingFocusGroup:s,focusable:a=!0,active:n=!1,tabStopId:c,children:d,...f}=e,h=(0,l.useId)(),p=c||h,x=w(N,s),v=x.currentTabStopId===p,b=g(s),{onFocusableItemAdd:y,onFocusableItemRemove:j,currentTabStopId:R}=x;return t.useEffect(()=>{if(a)return y(),()=>j()},[a,y,j]),(0,u.jsx)(m.ItemSlot,{scope:s,id:p,focusable:a,active:n,children:(0,u.jsx)(o.Primitive.span,{tabIndex:v?0:-1,"data-orientation":x.orientation,...f,ref:i,onMouseDown:(0,r.composeEventHandlers)(e.onMouseDown,e=>{a?x.onItemFocus(p):e.preventDefault()}),onFocus:(0,r.composeEventHandlers)(e.onFocus,()=>x.onItemFocus(p)),onKeyDown:(0,r.composeEventHandlers)(e.onKeyDown,e=>{if("Tab"===e.key&&e.shiftKey)return void x.onItemShiftTab();if(e.target!==e.currentTarget)return;let t=function(e,t,r){var i;let s=(i=e.key,"rtl"!==r?i:"ArrowLeft"===i?"ArrowRight":"ArrowRight"===i?"ArrowLeft":i);if(!("vertical"===t&&["ArrowLeft","ArrowRight"].includes(s))&&!("horizontal"===t&&["ArrowUp","ArrowDown"].includes(s)))return S[s]}(e,x.orientation,x.dir);if(void 0!==t){if(e.metaKey||e.ctrlKey||e.altKey||e.shiftKey)return;e.preventDefault();let s=b().filter(e=>e.focusable).map(e=>e.ref.current);if("last"===t)s.reverse();else if("prev"===t||"next"===t){var r,i;"prev"===t&&s.reverse();let a=s.indexOf(e.currentTarget);s=x.loop?(r=s,i=a+1,r.map((e,t)=>r[(i+t)%r.length])):s.slice(a+1)}setTimeout(()=>C(s))}}),children:"function"==typeof d?d({isCurrentTabStop:v,hasTabStop:null!=R}):d})})});k.displayName=N;var S={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function C(e,t=!1){let r=document.activeElement;for(let i of e)if(i===r||(i.focus({preventScroll:t}),document.activeElement!==r))return}e.s(["Item",()=>k,"Root",()=>j,"createRovingFocusGroupScope",()=>b])},468304,e=>{"use strict";var t=e.i(679606),r=e.i(152155),i=e.i(291967),s=e.i(922528),a=e.i(151080),l=e.i(685995),o=e.i(287620),n=e.i(566033),c=e.i(936589),d=e.i(713123),u="Tabs",[f,h]=(0,s.createContextScope)(u,[a.createRovingFocusGroupScope]),p=(0,a.createRovingFocusGroupScope)(),[m,g]=f(u),x=r.forwardRef((e,r)=>{let{__scopeTabs:i,value:s,onValueChange:a,defaultValue:l,orientation:f="horizontal",dir:h,activationMode:p="automatic",...g}=e,x=(0,n.useDirection)(h),[v,b]=(0,c.useControllableState)({prop:s,onChange:a,defaultProp:l??"",caller:u});return(0,t.jsx)(m,{scope:i,baseId:(0,d.useId)(),value:v,onValueChange:b,orientation:f,dir:x,activationMode:p,children:(0,t.jsx)(o.Primitive.div,{dir:x,"data-orientation":f,...g,ref:r})})});x.displayName=u;var v="TabsList",b=r.forwardRef((e,r)=>{let{__scopeTabs:i,loop:s=!0,...l}=e,n=g(v,i),c=p(i);return(0,t.jsx)(a.Root,{asChild:!0,...c,orientation:n.orientation,dir:n.dir,loop:s,children:(0,t.jsx)(o.Primitive.div,{role:"tablist","aria-orientation":n.orientation,...l,ref:r})})});b.displayName=v;var y="TabsTrigger",w=r.forwardRef((e,r)=>{let{__scopeTabs:s,value:l,disabled:n=!1,...c}=e,d=g(y,s),u=p(s),f=N(d.baseId,l),h=k(d.baseId,l),m=l===d.value;return(0,t.jsx)(a.Item,{asChild:!0,...u,focusable:!n,active:m,children:(0,t.jsx)(o.Primitive.button,{type:"button",role:"tab","aria-selected":m,"aria-controls":h,"data-state":m?"active":"inactive","data-disabled":n?"":void 0,disabled:n,id:f,...c,ref:r,onMouseDown:(0,i.composeEventHandlers)(e.onMouseDown,e=>{n||0!==e.button||!1!==e.ctrlKey?e.preventDefault():d.onValueChange(l)}),onKeyDown:(0,i.composeEventHandlers)(e.onKeyDown,e=>{[" ","Enter"].includes(e.key)&&d.onValueChange(l)}),onFocus:(0,i.composeEventHandlers)(e.onFocus,()=>{let e="manual"!==d.activationMode;m||n||!e||d.onValueChange(l)})})})});w.displayName=y;var j="TabsContent",R=r.forwardRef((e,i)=>{let{__scopeTabs:s,value:a,forceMount:n,children:c,...d}=e,u=g(j,s),f=N(u.baseId,a),h=k(u.baseId,a),p=a===u.value,m=r.useRef(p);return r.useEffect(()=>{let e=requestAnimationFrame(()=>m.current=!1);return()=>cancelAnimationFrame(e)},[]),(0,t.jsx)(l.Presence,{present:n||p,children:({present:r})=>(0,t.jsx)(o.Primitive.div,{"data-state":p?"active":"inactive","data-orientation":u.orientation,role:"tabpanel","aria-labelledby":f,hidden:!r,id:h,tabIndex:0,...d,ref:i,style:{...e.style,animationDuration:m.current?"0s":void 0},children:r&&c})})});function N(e,t){return`${e}-trigger-${t}`}function k(e,t){return`${e}-content-${t}`}R.displayName=j,e.s(["Content",()=>R,"List",()=>b,"Root",()=>x,"Tabs",()=>x,"TabsContent",()=>R,"TabsList",()=>b,"TabsTrigger",()=>w,"Trigger",()=>w,"createTabsScope",()=>h],743133);var S=e.i(743133),S=S,C=e.i(131777);let D=S.Root,T=r.forwardRef(({className:e,...r},i)=>(0,t.jsx)(S.List,{ref:i,className:(0,C.cn)("bg-muted text-muted-foreground inline-flex h-9 items-center justify-center rounded-lg p-1",e),...r}));T.displayName=S.List.displayName;let A=r.forwardRef(({className:e,...r},i)=>(0,t.jsx)(S.Trigger,{ref:i,className:(0,C.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),...r}));A.displayName=S.Trigger.displayName;let I=r.forwardRef(({className:e,...r},i)=>(0,t.jsx)(S.Content,{ref:i,className:(0,C.cn)("ring-offset-background focus-visible:ring-ring mt-2 focus-visible:ring-2 focus-visible:ring-offset-2 focus-visible:outline-none",e),...r}));I.displayName=S.Content.displayName,e.s(["Tabs",()=>D,"TabsContent",()=>I,"TabsList",()=>T,"TabsTrigger",()=>A],468304)},32494,e=>{"use strict";let t=(0,e.i(903645).default)("globe",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20",key:"13o1zl"}],["path",{d:"M2 12h20",key:"9i4pu4"}]]);e.s(["Globe",()=>t],32494)},48829,e=>{"use strict";let t=(0,e.i(903645).default)("chevron-up",[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]]);e.s(["ChevronUp",()=>t],48829)},66459,e=>{"use strict";let t=(0,e.i(903645).default)("search",[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]]);e.s(["Search",()=>t],66459)},602287,e=>{"use strict";var t=e.i(679606),r=e.i(152155),i=e.i(90033),s=e.i(860253),a=e.i(131777);let l=i.Dialog.Root,o=i.Dialog.Trigger,n=i.Dialog.Portal,c=i.Dialog.Close,d=r.forwardRef(({className:e,onClick:r,...s},l)=>(0,t.jsx)(i.Dialog.Overlay,{ref:l,className:(0,a.cn)("data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 fixed inset-0 z-50 bg-black/80 duration-150",e),onClick:e=>{e.stopPropagation(),r?.(e)},...s}));d.displayName=i.Dialog.Overlay.displayName;let u=r.forwardRef(({className:e,children:r,...l},o)=>(0,t.jsxs)(n,{children:[(0,t.jsx)(d,{}),(0,t.jsxs)(i.Dialog.Content,{ref:o,className:(0,a.cn)("bg-background data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 fixed top-[50%] left-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border p-6 shadow-lg duration-150 sm:rounded-lg",e),...l,children:[r,(0,t.jsxs)(i.Dialog.Close,{className:"ring-offset-background focus:ring-ring data-[state=open]:bg-accent data-[state=open]:text-muted-foreground absolute end-4 top-4 cursor-pointer rounded-sm opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2 focus:outline-none disabled:pointer-events-none",children:[(0,t.jsx)(s.X,{className:"h-4 w-4"}),(0,t.jsx)("span",{className:"sr-only",children:"Close"})]})]})]}));u.displayName=i.Dialog.Content.displayName;let f=({className:e,...r})=>(0,t.jsx)("div",{className:(0,a.cn)("flex flex-col space-y-1.5 text-center sm:text-start",e),...r});f.displayName="DialogHeader";let h=({className:e,...r})=>(0,t.jsx)("div",{className:(0,a.cn)("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...r});h.displayName="DialogFooter";let p=r.forwardRef(({className:e,...r},s)=>(0,t.jsx)(i.Dialog.Title,{ref:s,className:(0,a.cn)("text-lg leading-none font-semibold tracking-tight",e),...r}));p.displayName=i.Dialog.Title.displayName;let m=r.forwardRef(({className:e,...r},s)=>(0,t.jsx)(i.Dialog.Description,{ref:s,className:(0,a.cn)("text-muted-foreground text-sm",e),...r}));m.displayName=i.Dialog.Description.displayName,e.s(["Dialog",()=>l,"DialogClose",()=>c,"DialogContent",()=>u,"DialogDescription",()=>m,"DialogFooter",()=>h,"DialogHeader",()=>f,"DialogTitle",()=>p,"DialogTrigger",()=>o])},723925,301012,e=>{"use strict";let t=(0,e.i(903645).default)("check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);e.s(["default",()=>t],301012),e.s(["Check",()=>t],723925)},579687,e=>{"use strict";var t=e.i(714748);e.s(["AlertCircle",()=>t.default])},612997,e=>{"use strict";let t=(0,e.i(903645).default)("lock",[["rect",{width:"18",height:"11",x:"3",y:"11",rx:"2",ry:"2",key:"1w4ew1"}],["path",{d:"M7 11V7a5 5 0 0 1 10 0v4",key:"fwvmzm"}]]);e.s(["Lock",()=>t],612997)},192350,e=>{"use strict";var t=e.i(679606),r=e.i(152155),i=e.i(602287),s=e.i(468304),a=e.i(83428),l=e.i(698127),o=e.i(735364),n=e.i(141957);let c=/^(?:https:\/\/github\.com\/([a-zA-Z0-9._-]+)\/([a-zA-Z0-9._-]+?)(?:\.git)?|git@github\.com:([a-zA-Z0-9._-]+)\/([a-zA-Z0-9._-]+?)(?:\.git)?|([a-zA-Z0-9._-]+)\/([a-zA-Z0-9._-]+))$/;function d({onSubmit:e,loading:i=!1}){let[s,d]=(0,r.useState)(""),[u,f]=(0,r.useState)("");function h(){let t=s.trim();t?c.test(t.trim())?(f(""),e(t)):f("Enter a valid GitHub URL (e.g. owner/repo or https://github.com/owner/repo)"):f("Please enter a GitHub URL")}return(0,t.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,t.jsx)(n.Label,{htmlFor:"github-url-input",children:"GitHub URL"}),(0,t.jsxs)("div",{className:"flex gap-2",children:[(0,t.jsx)(l.Input,{id:"github-url-input",placeholder:"owner/repo or https://github.com/owner/repo",value:s,onChange:e=>{d(e.target.value),u&&f("")},onKeyDown:function(e){"Enter"===e.key&&(e.preventDefault(),h())},disabled:i,"aria-invalid":!!u,"aria-describedby":u?"github-url-error":void 0}),(0,t.jsx)(o.Button,{onClick:h,disabled:i||!s.trim(),size:"sm",children:i?(0,t.jsx)(a.Loader2,{className:"h-4 w-4 animate-spin"}):"Import"})]}),u?(0,t.jsx)("p",{id:"github-url-error",className:"text-destructive text-sm",role:"alert",children:u}):null]})}var u=e.i(612997),f=e.i(32494),h=e.i(66459),p=e.i(579687),m=e.i(81846),g=e.i(461238),x=e.i(547373),v=e.i(508893);let b=(0,v.createServerReference)("4085e9c95d5c4b9511c0dba33930d626cd59db8cfa",v.callServer,void 0,v.findSourceMapURL,"listGitHubRepositories"),y=(0,v.createServerReference)("0025b05d8de9fd2f767fe5945d9ea26360f2d535b9",v.callServer,void 0,v.findSourceMapURL,"listGitHubOrganizations"),w="__personal__";function j({onSelect:e,loading:i=!1,fetchRepos:s=b,fetchOrgs:o=y}){let[n,c]=(0,r.useState)([]),[d,v]=(0,r.useState)([]),[j,R]=(0,r.useState)(!0),[N,k]=(0,r.useState)(""),[S,C]=(0,r.useState)(""),[D,T]=(0,r.useState)(w),A=(0,r.useRef)(null);(0,r.useEffect)(()=>{!async function(){try{let e=await o();e.orgs&&v(e.orgs)}catch{}}()},[o]);let I=(0,r.useCallback)(async(e,t)=>{R(!0),k("");try{let r={};e&&(r.search=e),t&&t!==w&&(r.owner=t);let i=await s(Object.keys(r).length>0?r:void 0);i.error?(k(i.error),c([])):c(i.repos??[])}catch{k("Failed to fetch repositories"),c([])}finally{R(!1)}},[s]);return((0,r.useEffect)(()=>{I(S||void 0,D)},[I,D]),N&&!j)?(0,t.jsxs)("div",{className:"flex flex-col items-center gap-2 py-8 text-center","data-testid":"repo-browser-error",children:[(0,t.jsx)(p.AlertCircle,{className:"text-destructive h-8 w-8"}),(0,t.jsx)("p",{className:"text-destructive text-sm",children:N})]}):(0,t.jsxs)("div",{className:"flex flex-col gap-3",children:[d.length>0?(0,t.jsxs)(x.Select,{value:D,onValueChange:function(e){T(e),C("")},disabled:i,children:[(0,t.jsx)(x.SelectTrigger,{"aria-label":"Select owner",children:(0,t.jsx)(x.SelectValue,{placeholder:"Select owner"})}),(0,t.jsxs)(x.SelectContent,{children:[(0,t.jsx)(x.SelectItem,{value:w,children:"My repositories"}),d.map(e=>(0,t.jsx)(x.SelectItem,{value:e.login,children:e.login},e.login))]})]}):null,(0,t.jsxs)("div",{className:"relative",children:[(0,t.jsx)(h.Search,{className:"text-muted-foreground absolute top-1/2 left-3 h-4 w-4 -translate-y-1/2"}),(0,t.jsx)(l.Input,{placeholder:"Search repositories...",value:S,onChange:e=>{var t;C(t=e.target.value),A.current&&clearTimeout(A.current),A.current=setTimeout(()=>{I(t||void 0,D)},300)},className:"ps-9",disabled:i,"aria-label":"Search repositories"})]}),(0,t.jsx)("div",{className:"max-h-64 overflow-x-hidden overflow-y-auto rounded-md border",role:"listbox","aria-label":"GitHub repositories",children:j?(0,t.jsx)("div",{className:"flex flex-col gap-2 p-3","data-testid":"repo-browser-loading",children:Array.from({length:5}).map((e,r)=>(0,t.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,t.jsx)(g.Skeleton,{className:"h-4 w-48"}),(0,t.jsx)(g.Skeleton,{className:"h-3 w-72"})]},`skeleton-${String(r)}`))}):0===n.length?(0,t.jsx)("div",{className:"text-muted-foreground py-8 text-center text-sm","data-testid":"repo-browser-empty",children:"No repositories found"}):n.map(r=>(0,t.jsxs)("button",{type:"button",role:"option","aria-selected":!1,className:"hover:bg-accent flex w-full items-start gap-2 border-b px-3 py-2.5 text-start last:border-b-0 disabled:opacity-50",onClick:()=>e(r.nameWithOwner),disabled:i,children:[(0,t.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)("span",{className:"truncate text-sm font-medium",children:r.nameWithOwner}),(0,t.jsx)(m.Badge,{variant:r.isPrivate?"secondary":"outline",className:"shrink-0 text-xs",children:r.isPrivate?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(u.Lock,{className:"me-1 h-3 w-3"}),"Private"]}):(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(f.Globe,{className:"me-1 h-3 w-3"}),"Public"]})})]}),r.description?(0,t.jsx)("p",{className:"text-muted-foreground mt-0.5 truncate text-xs",children:r.description}):null]}),i?(0,t.jsx)(a.Loader2,{className:"mt-0.5 h-4 w-4 shrink-0 animate-spin"}):null]},r.nameWithOwner))})]})}let R=(0,v.createServerReference)("408477c12190864f18f9c2d2751ad85dee95c727e4",v.callServer,void 0,v.findSourceMapURL,"importGitHubRepository");function N({open:e,onOpenChange:a,onImportComplete:l}){let[o,n]=(0,r.useState)(!1),[c,u]=(0,r.useState)("");async function f(e){n(!0),u("");try{let t=await R({url:e});t.error?u(t.error):t.repository&&(l(t.repository),a(!1))}catch{u("An unexpected error occurred")}finally{n(!1)}}return(0,t.jsx)(i.Dialog,{open:e,onOpenChange:a,children:(0,t.jsxs)(i.DialogContent,{className:"overflow-hidden sm:max-w-lg",children:[(0,t.jsxs)(i.DialogHeader,{children:[(0,t.jsx)(i.DialogTitle,{children:"Import from GitHub"}),(0,t.jsx)(i.DialogDescription,{children:"Clone a GitHub repository and add it to Shep."})]}),(0,t.jsxs)(s.Tabs,{defaultValue:"url",className:"min-w-0",children:[(0,t.jsxs)(s.TabsList,{className:"grid w-full grid-cols-2",children:[(0,t.jsx)(s.TabsTrigger,{value:"url",children:"URL"}),(0,t.jsx)(s.TabsTrigger,{value:"browse",children:"Browse"})]}),(0,t.jsx)(s.TabsContent,{value:"url",className:"mt-4",children:(0,t.jsx)(d,{onSubmit:f,loading:o})}),(0,t.jsx)(s.TabsContent,{value:"browse",className:"mt-4",children:(0,t.jsx)(j,{onSelect:f,loading:o})})]}),c?(0,t.jsx)("p",{className:"text-destructive text-sm",role:"alert",children:c}):null]})})}e.s([],294771),e.i(294771),e.s(["GitHubImportDialog",()=>N,"GitHubRepoBrowser",()=>j,"GitHubUrlInput",()=>d],192350)},522129,e=>{e.n(e.i(192350))}]);
|
|
1
|
+
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,787342,e=>{"use strict";var t=e.i(152155),r=e.i(922528),i=e.i(205978),s=e.i(786874),a=e.i(679606);function l(e){let l=e+"CollectionProvider",[o,n]=(0,r.createContextScope)(l),[c,d]=o(l,{collectionRef:{current:null},itemMap:new Map}),u=e=>{let{scope:r,children:i}=e,s=t.default.useRef(null),l=t.default.useRef(new Map).current;return(0,a.jsx)(c,{scope:r,itemMap:l,collectionRef:s,children:i})};u.displayName=l;let f=e+"CollectionSlot",h=(0,s.createSlot)(f),p=t.default.forwardRef((e,t)=>{let{scope:r,children:s}=e,l=d(f,r),o=(0,i.useComposedRefs)(t,l.collectionRef);return(0,a.jsx)(h,{ref:o,children:s})});p.displayName=f;let m=e+"CollectionItemSlot",g="data-radix-collection-item",x=(0,s.createSlot)(m),v=t.default.forwardRef((e,r)=>{let{scope:s,children:l,...o}=e,n=t.default.useRef(null),c=(0,i.useComposedRefs)(r,n),u=d(m,s);return t.default.useEffect(()=>(u.itemMap.set(n,{ref:n,...o}),()=>void u.itemMap.delete(n))),(0,a.jsx)(x,{...{[g]:""},ref:c,children:l})});return v.displayName=m,[{Provider:u,Slot:p,ItemSlot:v},function(r){let i=d(e+"CollectionConsumer",r);return t.default.useCallback(()=>{let e=i.collectionRef.current;if(!e)return[];let t=Array.from(e.querySelectorAll(`[${g}]`));return Array.from(i.itemMap.values()).sort((e,r)=>t.indexOf(e.ref.current)-t.indexOf(r.ref.current))},[i.collectionRef,i.itemMap])},n]}var o=new WeakMap;function n(e,t){var r,i;let s,a,l;if("at"in Array.prototype)return Array.prototype.at.call(e,t);let o=(r=e,i=t,s=r.length,(l=(a=c(i))>=0?a:s+a)<0||l>=s?-1:l);return -1===o?void 0:e[o]}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()],o.set(this,!0)}set(e,t){return o.get(this)&&(this.has(e)?this.#e[this.#e.indexOf(e)]=e:this.#e.push(e)),super.set(e,t),this}insert(e,t,r){let i,s=this.has(t),a=this.#e.length,l=c(e),o=l>=0?l:a+l,n=o<0||o>=a?-1:o;if(n===this.size||s&&n===this.size-1||-1===n)return this.set(t,r),this;let d=this.size+ +!s;l<0&&o++;let u=[...this.#e],f=!1;for(let e=o;e<d;e++)if(o===e){let a=u[e];u[e]===t&&(a=u[e+1]),s&&this.delete(t),i=this.get(a),this.set(t,r)}else{f||u[e-1]!==t||(f=!0);let r=u[f?e:e-1],s=i;i=this.get(r),this.delete(r),this.set(r,s)}return this}with(t,r,i){let s=new e(this);return s.insert(t,r,i),s}before(e){let t=this.#e.indexOf(e)-1;if(!(t<0))return this.entryAt(t)}setBefore(e,t,r){let i=this.#e.indexOf(e);return -1===i?this:this.insert(i,t,r)}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,r){let i=this.#e.indexOf(e);return -1===i?this:this.insert(i+1,t,r)}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=n(this.#e,e);if(void 0!==t)return this.get(t)}entryAt(e){let t=n(this.#e,e);if(void 0!==t)return[t,this.get(t)]}indexOf(e){return this.#e.indexOf(e)}keyAt(e){return n(this.#e,e)}from(e,t){let r=this.indexOf(e);if(-1===r)return;let i=r+t;return i<0&&(i=0),i>=this.size&&(i=this.size-1),this.at(i)}keyFrom(e,t){let r=this.indexOf(e);if(-1===r)return;let i=r+t;return i<0&&(i=0),i>=this.size&&(i=this.size-1),this.keyAt(i)}find(e,t){let r=0;for(let i of this){if(Reflect.apply(e,t,[i,r,this]))return i;r++}}findIndex(e,t){let r=0;for(let i of this){if(Reflect.apply(e,t,[i,r,this]))return r;r++}return -1}filter(t,r){let i=[],s=0;for(let e of this)Reflect.apply(t,r,[e,s,this])&&i.push(e),s++;return new e(i)}map(t,r){let i=[],s=0;for(let e of this)i.push([e[0],Reflect.apply(t,r,[e,s,this])]),s++;return new e(i)}reduce(...e){let[t,r]=e,i=0,s=r??this.at(0);for(let r of this)s=0===i&&1===e.length?r:Reflect.apply(t,this,[s,r,i,this]),i++;return s}reduceRight(...e){let[t,r]=e,i=r??this.at(-1);for(let r=this.size-1;r>=0;r--){let s=this.at(r);i=r===this.size-1&&1===e.length?s:Reflect.apply(t,this,[i,s,r,this])}return i}toSorted(t){return new e([...this.entries()].sort(t))}toReversed(){let t=new e;for(let e=this.size-1;e>=0;e--){let r=this.keyAt(e),i=this.get(r);t.set(r,i)}return t}toSpliced(...t){let r=[...this.entries()];return r.splice(...t),new e(r)}slice(t,r){let i=new e,s=this.size-1;if(void 0===t)return i;t<0&&(t+=this.size),void 0!==r&&r>0&&(s=r-1);for(let e=t;e<=s;e++){let t=this.keyAt(e),r=this.get(t);i.set(t,r)}return i}every(e,t){let r=0;for(let i of this){if(!Reflect.apply(e,t,[i,r,this]))return!1;r++}return!0}some(e,t){let r=0;for(let i of this){if(Reflect.apply(e,t,[i,r,this]))return!0;r++}return!1}}),e.s(["createCollection",()=>l])},151080,e=>{"use strict";var t=e.i(152155),r=e.i(291967),i=e.i(787342),s=e.i(205978),a=e.i(922528),l=e.i(713123),o=e.i(287620),n=e.i(929297),c=e.i(936589),d=e.i(566033),u=e.i(679606),f="rovingFocusGroup.onEntryFocus",h={bubbles:!1,cancelable:!0},p="RovingFocusGroup",[m,g,x]=(0,i.createCollection)(p),[v,b]=(0,a.createContextScope)(p,[x]),[y,w]=v(p),j=t.forwardRef((e,t)=>(0,u.jsx)(m.Provider,{scope:e.__scopeRovingFocusGroup,children:(0,u.jsx)(m.Slot,{scope:e.__scopeRovingFocusGroup,children:(0,u.jsx)(R,{...e,ref:t})})}));j.displayName=p;var R=t.forwardRef((e,i)=>{let{__scopeRovingFocusGroup:a,orientation:l,loop:m=!1,dir:x,currentTabStopId:v,defaultCurrentTabStopId:b,onCurrentTabStopIdChange:w,onEntryFocus:j,preventScrollOnEntryFocus:R=!1,...N}=e,k=t.useRef(null),S=(0,s.useComposedRefs)(i,k),D=(0,d.useDirection)(x),[T,A]=(0,c.useControllableState)({prop:v,defaultProp:b??null,onChange:w,caller:p}),[I,z]=t.useState(!1),F=(0,n.useCallbackRef)(j),E=g(a),H=t.useRef(!1),[L,M]=t.useState(0);return t.useEffect(()=>{let e=k.current;if(e)return e.addEventListener(f,F),()=>e.removeEventListener(f,F)},[F]),(0,u.jsx)(y,{scope:a,orientation:l,dir:D,loop:m,currentTabStopId:T,onItemFocus:t.useCallback(e=>A(e),[A]),onItemShiftTab:t.useCallback(()=>z(!0),[]),onFocusableItemAdd:t.useCallback(()=>M(e=>e+1),[]),onFocusableItemRemove:t.useCallback(()=>M(e=>e-1),[]),children:(0,u.jsx)(o.Primitive.div,{tabIndex:I||0===L?-1:0,"data-orientation":l,...N,ref:S,style:{outline:"none",...e.style},onMouseDown:(0,r.composeEventHandlers)(e.onMouseDown,()=>{H.current=!0}),onFocus:(0,r.composeEventHandlers)(e.onFocus,e=>{let t=!H.current;if(e.target===e.currentTarget&&t&&!I){let t=new CustomEvent(f,h);if(e.currentTarget.dispatchEvent(t),!t.defaultPrevented){let e=E().filter(e=>e.focusable);C([e.find(e=>e.active),e.find(e=>e.id===T),...e].filter(Boolean).map(e=>e.ref.current),R)}}H.current=!1}),onBlur:(0,r.composeEventHandlers)(e.onBlur,()=>z(!1))})})}),N="RovingFocusGroupItem",k=t.forwardRef((e,i)=>{let{__scopeRovingFocusGroup:s,focusable:a=!0,active:n=!1,tabStopId:c,children:d,...f}=e,h=(0,l.useId)(),p=c||h,x=w(N,s),v=x.currentTabStopId===p,b=g(s),{onFocusableItemAdd:y,onFocusableItemRemove:j,currentTabStopId:R}=x;return t.useEffect(()=>{if(a)return y(),()=>j()},[a,y,j]),(0,u.jsx)(m.ItemSlot,{scope:s,id:p,focusable:a,active:n,children:(0,u.jsx)(o.Primitive.span,{tabIndex:v?0:-1,"data-orientation":x.orientation,...f,ref:i,onMouseDown:(0,r.composeEventHandlers)(e.onMouseDown,e=>{a?x.onItemFocus(p):e.preventDefault()}),onFocus:(0,r.composeEventHandlers)(e.onFocus,()=>x.onItemFocus(p)),onKeyDown:(0,r.composeEventHandlers)(e.onKeyDown,e=>{if("Tab"===e.key&&e.shiftKey)return void x.onItemShiftTab();if(e.target!==e.currentTarget)return;let t=function(e,t,r){var i;let s=(i=e.key,"rtl"!==r?i:"ArrowLeft"===i?"ArrowRight":"ArrowRight"===i?"ArrowLeft":i);if(!("vertical"===t&&["ArrowLeft","ArrowRight"].includes(s))&&!("horizontal"===t&&["ArrowUp","ArrowDown"].includes(s)))return S[s]}(e,x.orientation,x.dir);if(void 0!==t){if(e.metaKey||e.ctrlKey||e.altKey||e.shiftKey)return;e.preventDefault();let s=b().filter(e=>e.focusable).map(e=>e.ref.current);if("last"===t)s.reverse();else if("prev"===t||"next"===t){var r,i;"prev"===t&&s.reverse();let a=s.indexOf(e.currentTarget);s=x.loop?(r=s,i=a+1,r.map((e,t)=>r[(i+t)%r.length])):s.slice(a+1)}setTimeout(()=>C(s))}}),children:"function"==typeof d?d({isCurrentTabStop:v,hasTabStop:null!=R}):d})})});k.displayName=N;var S={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function C(e,t=!1){let r=document.activeElement;for(let i of e)if(i===r||(i.focus({preventScroll:t}),document.activeElement!==r))return}e.s(["Item",()=>k,"Root",()=>j,"createRovingFocusGroupScope",()=>b])},468304,e=>{"use strict";var t=e.i(679606),r=e.i(152155),i=e.i(291967),s=e.i(922528),a=e.i(151080),l=e.i(685995),o=e.i(287620),n=e.i(566033),c=e.i(936589),d=e.i(713123),u="Tabs",[f,h]=(0,s.createContextScope)(u,[a.createRovingFocusGroupScope]),p=(0,a.createRovingFocusGroupScope)(),[m,g]=f(u),x=r.forwardRef((e,r)=>{let{__scopeTabs:i,value:s,onValueChange:a,defaultValue:l,orientation:f="horizontal",dir:h,activationMode:p="automatic",...g}=e,x=(0,n.useDirection)(h),[v,b]=(0,c.useControllableState)({prop:s,onChange:a,defaultProp:l??"",caller:u});return(0,t.jsx)(m,{scope:i,baseId:(0,d.useId)(),value:v,onValueChange:b,orientation:f,dir:x,activationMode:p,children:(0,t.jsx)(o.Primitive.div,{dir:x,"data-orientation":f,...g,ref:r})})});x.displayName=u;var v="TabsList",b=r.forwardRef((e,r)=>{let{__scopeTabs:i,loop:s=!0,...l}=e,n=g(v,i),c=p(i);return(0,t.jsx)(a.Root,{asChild:!0,...c,orientation:n.orientation,dir:n.dir,loop:s,children:(0,t.jsx)(o.Primitive.div,{role:"tablist","aria-orientation":n.orientation,...l,ref:r})})});b.displayName=v;var y="TabsTrigger",w=r.forwardRef((e,r)=>{let{__scopeTabs:s,value:l,disabled:n=!1,...c}=e,d=g(y,s),u=p(s),f=N(d.baseId,l),h=k(d.baseId,l),m=l===d.value;return(0,t.jsx)(a.Item,{asChild:!0,...u,focusable:!n,active:m,children:(0,t.jsx)(o.Primitive.button,{type:"button",role:"tab","aria-selected":m,"aria-controls":h,"data-state":m?"active":"inactive","data-disabled":n?"":void 0,disabled:n,id:f,...c,ref:r,onMouseDown:(0,i.composeEventHandlers)(e.onMouseDown,e=>{n||0!==e.button||!1!==e.ctrlKey?e.preventDefault():d.onValueChange(l)}),onKeyDown:(0,i.composeEventHandlers)(e.onKeyDown,e=>{[" ","Enter"].includes(e.key)&&d.onValueChange(l)}),onFocus:(0,i.composeEventHandlers)(e.onFocus,()=>{let e="manual"!==d.activationMode;m||n||!e||d.onValueChange(l)})})})});w.displayName=y;var j="TabsContent",R=r.forwardRef((e,i)=>{let{__scopeTabs:s,value:a,forceMount:n,children:c,...d}=e,u=g(j,s),f=N(u.baseId,a),h=k(u.baseId,a),p=a===u.value,m=r.useRef(p);return r.useEffect(()=>{let e=requestAnimationFrame(()=>m.current=!1);return()=>cancelAnimationFrame(e)},[]),(0,t.jsx)(l.Presence,{present:n||p,children:({present:r})=>(0,t.jsx)(o.Primitive.div,{"data-state":p?"active":"inactive","data-orientation":u.orientation,role:"tabpanel","aria-labelledby":f,hidden:!r,id:h,tabIndex:0,...d,ref:i,style:{...e.style,animationDuration:m.current?"0s":void 0},children:r&&c})})});function N(e,t){return`${e}-trigger-${t}`}function k(e,t){return`${e}-content-${t}`}R.displayName=j,e.s(["Content",()=>R,"List",()=>b,"Root",()=>x,"Tabs",()=>x,"TabsContent",()=>R,"TabsList",()=>b,"TabsTrigger",()=>w,"Trigger",()=>w,"createTabsScope",()=>h],743133);var S=e.i(743133),S=S,C=e.i(131777);let D=S.Root,T=r.forwardRef(({className:e,...r},i)=>(0,t.jsx)(S.List,{ref:i,className:(0,C.cn)("bg-muted text-muted-foreground inline-flex h-9 items-center justify-center rounded-lg p-1",e),...r}));T.displayName=S.List.displayName;let A=r.forwardRef(({className:e,...r},i)=>(0,t.jsx)(S.Trigger,{ref:i,className:(0,C.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),...r}));A.displayName=S.Trigger.displayName;let I=r.forwardRef(({className:e,...r},i)=>(0,t.jsx)(S.Content,{ref:i,className:(0,C.cn)("ring-offset-background focus-visible:ring-ring mt-2 focus-visible:ring-2 focus-visible:ring-offset-2 focus-visible:outline-none",e),...r}));I.displayName=S.Content.displayName,e.s(["Tabs",()=>D,"TabsContent",()=>I,"TabsList",()=>T,"TabsTrigger",()=>A],468304)},32494,e=>{"use strict";let t=(0,e.i(903645).default)("globe",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20",key:"13o1zl"}],["path",{d:"M2 12h20",key:"9i4pu4"}]]);e.s(["Globe",()=>t],32494)},48829,e=>{"use strict";let t=(0,e.i(903645).default)("chevron-up",[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]]);e.s(["ChevronUp",()=>t],48829)},66459,e=>{"use strict";let t=(0,e.i(903645).default)("search",[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]]);e.s(["Search",()=>t],66459)},602287,e=>{"use strict";var t=e.i(679606),r=e.i(152155),i=e.i(90033),s=e.i(860253),a=e.i(131777);let l=i.Dialog.Root,o=i.Dialog.Trigger,n=i.Dialog.Portal,c=i.Dialog.Close,d=r.forwardRef(({className:e,onClick:r,...s},l)=>(0,t.jsx)(i.Dialog.Overlay,{ref:l,className:(0,a.cn)("data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 fixed inset-0 z-50 bg-black/80 duration-150",e),onClick:e=>{e.stopPropagation(),r?.(e)},...s}));d.displayName=i.Dialog.Overlay.displayName;let u=r.forwardRef(({className:e,children:r,...l},o)=>(0,t.jsxs)(n,{children:[(0,t.jsx)(d,{}),(0,t.jsxs)(i.Dialog.Content,{ref:o,className:(0,a.cn)("bg-background data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 fixed top-[50%] left-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border p-6 shadow-lg duration-150 sm:rounded-lg",e),...l,children:[r,(0,t.jsxs)(i.Dialog.Close,{className:"ring-offset-background focus:ring-ring data-[state=open]:bg-accent data-[state=open]:text-muted-foreground absolute end-4 top-4 cursor-pointer rounded-sm opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2 focus:outline-none disabled:pointer-events-none",children:[(0,t.jsx)(s.X,{className:"h-4 w-4"}),(0,t.jsx)("span",{className:"sr-only",children:"Close"})]})]})]}));u.displayName=i.Dialog.Content.displayName;let f=({className:e,...r})=>(0,t.jsx)("div",{className:(0,a.cn)("flex flex-col space-y-1.5 text-center sm:text-start",e),...r});f.displayName="DialogHeader";let h=({className:e,...r})=>(0,t.jsx)("div",{className:(0,a.cn)("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...r});h.displayName="DialogFooter";let p=r.forwardRef(({className:e,...r},s)=>(0,t.jsx)(i.Dialog.Title,{ref:s,className:(0,a.cn)("text-lg leading-none font-semibold tracking-tight",e),...r}));p.displayName=i.Dialog.Title.displayName;let m=r.forwardRef(({className:e,...r},s)=>(0,t.jsx)(i.Dialog.Description,{ref:s,className:(0,a.cn)("text-muted-foreground text-sm",e),...r}));m.displayName=i.Dialog.Description.displayName,e.s(["Dialog",()=>l,"DialogClose",()=>c,"DialogContent",()=>u,"DialogDescription",()=>m,"DialogFooter",()=>h,"DialogHeader",()=>f,"DialogTitle",()=>p,"DialogTrigger",()=>o])},723925,301012,e=>{"use strict";let t=(0,e.i(903645).default)("check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);e.s(["default",()=>t],301012),e.s(["Check",()=>t],723925)},579687,e=>{"use strict";var t=e.i(714748);e.s(["AlertCircle",()=>t.default])},612997,e=>{"use strict";let t=(0,e.i(903645).default)("lock",[["rect",{width:"18",height:"11",x:"3",y:"11",rx:"2",ry:"2",key:"1w4ew1"}],["path",{d:"M7 11V7a5 5 0 0 1 10 0v4",key:"fwvmzm"}]]);e.s(["Lock",()=>t],612997)},192350,e=>{"use strict";var t=e.i(679606),r=e.i(152155),i=e.i(602287),s=e.i(468304),a=e.i(83428),l=e.i(698127),o=e.i(735364),n=e.i(141957);let c=/^(?:https:\/\/github\.com\/([a-zA-Z0-9._-]+)\/([a-zA-Z0-9._-]+?)(?:\.git)?|git@github\.com:([a-zA-Z0-9._-]+)\/([a-zA-Z0-9._-]+?)(?:\.git)?|([a-zA-Z0-9._-]+)\/([a-zA-Z0-9._-]+))$/;function d({onSubmit:e,loading:i=!1}){let[s,d]=(0,r.useState)(""),[u,f]=(0,r.useState)("");function h(){let t=s.trim();t?c.test(t.trim())?(f(""),e(t)):f("Enter a valid GitHub URL (e.g. owner/repo or https://github.com/owner/repo)"):f("Please enter a GitHub URL")}return(0,t.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,t.jsx)(n.Label,{htmlFor:"github-url-input",children:"GitHub URL"}),(0,t.jsxs)("div",{className:"flex gap-2",children:[(0,t.jsx)(l.Input,{id:"github-url-input",placeholder:"owner/repo or https://github.com/owner/repo",value:s,onChange:e=>{d(e.target.value),u&&f("")},onKeyDown:function(e){"Enter"===e.key&&(e.preventDefault(),h())},disabled:i,"aria-invalid":!!u,"aria-describedby":u?"github-url-error":void 0}),(0,t.jsx)(o.Button,{onClick:h,disabled:i||!s.trim(),size:"sm",children:i?(0,t.jsx)(a.Loader2,{className:"h-4 w-4 animate-spin"}):"Import"})]}),u?(0,t.jsx)("p",{id:"github-url-error",className:"text-destructive text-sm",role:"alert",children:u}):null]})}var u=e.i(612997),f=e.i(32494),h=e.i(66459),p=e.i(579687),m=e.i(81846),g=e.i(461238),x=e.i(547373),v=e.i(508893);let b=(0,v.createServerReference)("408d5ddb7719c43c5d291800bdb881c7f38b5d8f71",v.callServer,void 0,v.findSourceMapURL,"listGitHubRepositories"),y=(0,v.createServerReference)("001d5af05da9ad894be0807da95474a0cea5cb6f41",v.callServer,void 0,v.findSourceMapURL,"listGitHubOrganizations"),w="__personal__";function j({onSelect:e,loading:i=!1,fetchRepos:s=b,fetchOrgs:o=y}){let[n,c]=(0,r.useState)([]),[d,v]=(0,r.useState)([]),[j,R]=(0,r.useState)(!0),[N,k]=(0,r.useState)(""),[S,C]=(0,r.useState)(""),[D,T]=(0,r.useState)(w),A=(0,r.useRef)(null);(0,r.useEffect)(()=>{!async function(){try{let e=await o();e.orgs&&v(e.orgs)}catch{}}()},[o]);let I=(0,r.useCallback)(async(e,t)=>{R(!0),k("");try{let r={};e&&(r.search=e),t&&t!==w&&(r.owner=t);let i=await s(Object.keys(r).length>0?r:void 0);i.error?(k(i.error),c([])):c(i.repos??[])}catch{k("Failed to fetch repositories"),c([])}finally{R(!1)}},[s]);return((0,r.useEffect)(()=>{I(S||void 0,D)},[I,D]),N&&!j)?(0,t.jsxs)("div",{className:"flex flex-col items-center gap-2 py-8 text-center","data-testid":"repo-browser-error",children:[(0,t.jsx)(p.AlertCircle,{className:"text-destructive h-8 w-8"}),(0,t.jsx)("p",{className:"text-destructive text-sm",children:N})]}):(0,t.jsxs)("div",{className:"flex flex-col gap-3",children:[d.length>0?(0,t.jsxs)(x.Select,{value:D,onValueChange:function(e){T(e),C("")},disabled:i,children:[(0,t.jsx)(x.SelectTrigger,{"aria-label":"Select owner",children:(0,t.jsx)(x.SelectValue,{placeholder:"Select owner"})}),(0,t.jsxs)(x.SelectContent,{children:[(0,t.jsx)(x.SelectItem,{value:w,children:"My repositories"}),d.map(e=>(0,t.jsx)(x.SelectItem,{value:e.login,children:e.login},e.login))]})]}):null,(0,t.jsxs)("div",{className:"relative",children:[(0,t.jsx)(h.Search,{className:"text-muted-foreground absolute top-1/2 left-3 h-4 w-4 -translate-y-1/2"}),(0,t.jsx)(l.Input,{placeholder:"Search repositories...",value:S,onChange:e=>{var t;C(t=e.target.value),A.current&&clearTimeout(A.current),A.current=setTimeout(()=>{I(t||void 0,D)},300)},className:"ps-9",disabled:i,"aria-label":"Search repositories"})]}),(0,t.jsx)("div",{className:"max-h-64 overflow-x-hidden overflow-y-auto rounded-md border",role:"listbox","aria-label":"GitHub repositories",children:j?(0,t.jsx)("div",{className:"flex flex-col gap-2 p-3","data-testid":"repo-browser-loading",children:Array.from({length:5}).map((e,r)=>(0,t.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,t.jsx)(g.Skeleton,{className:"h-4 w-48"}),(0,t.jsx)(g.Skeleton,{className:"h-3 w-72"})]},`skeleton-${String(r)}`))}):0===n.length?(0,t.jsx)("div",{className:"text-muted-foreground py-8 text-center text-sm","data-testid":"repo-browser-empty",children:"No repositories found"}):n.map(r=>(0,t.jsxs)("button",{type:"button",role:"option","aria-selected":!1,className:"hover:bg-accent flex w-full items-start gap-2 border-b px-3 py-2.5 text-start last:border-b-0 disabled:opacity-50",onClick:()=>e(r.nameWithOwner),disabled:i,children:[(0,t.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)("span",{className:"truncate text-sm font-medium",children:r.nameWithOwner}),(0,t.jsx)(m.Badge,{variant:r.isPrivate?"secondary":"outline",className:"shrink-0 text-xs",children:r.isPrivate?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(u.Lock,{className:"me-1 h-3 w-3"}),"Private"]}):(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(f.Globe,{className:"me-1 h-3 w-3"}),"Public"]})})]}),r.description?(0,t.jsx)("p",{className:"text-muted-foreground mt-0.5 truncate text-xs",children:r.description}):null]}),i?(0,t.jsx)(a.Loader2,{className:"mt-0.5 h-4 w-4 shrink-0 animate-spin"}):null]},r.nameWithOwner))})]})}let R=(0,v.createServerReference)("4093308001b5dc8b54fc0507b31cb00b9d43ae02e8",v.callServer,void 0,v.findSourceMapURL,"importGitHubRepository");function N({open:e,onOpenChange:a,onImportComplete:l}){let[o,n]=(0,r.useState)(!1),[c,u]=(0,r.useState)("");async function f(e){n(!0),u("");try{let t=await R({url:e});t.error?u(t.error):t.repository&&(l(t.repository),a(!1))}catch{u("An unexpected error occurred")}finally{n(!1)}}return(0,t.jsx)(i.Dialog,{open:e,onOpenChange:a,children:(0,t.jsxs)(i.DialogContent,{className:"overflow-hidden sm:max-w-lg",children:[(0,t.jsxs)(i.DialogHeader,{children:[(0,t.jsx)(i.DialogTitle,{children:"Import from GitHub"}),(0,t.jsx)(i.DialogDescription,{children:"Clone a GitHub repository and add it to Shep."})]}),(0,t.jsxs)(s.Tabs,{defaultValue:"url",className:"min-w-0",children:[(0,t.jsxs)(s.TabsList,{className:"grid w-full grid-cols-2",children:[(0,t.jsx)(s.TabsTrigger,{value:"url",children:"URL"}),(0,t.jsx)(s.TabsTrigger,{value:"browse",children:"Browse"})]}),(0,t.jsx)(s.TabsContent,{value:"url",className:"mt-4",children:(0,t.jsx)(d,{onSubmit:f,loading:o})}),(0,t.jsx)(s.TabsContent,{value:"browse",className:"mt-4",children:(0,t.jsx)(j,{onSelect:f,loading:o})})]}),c?(0,t.jsx)("p",{className:"text-destructive text-sm",role:"alert",children:c}):null]})})}e.s([],294771),e.i(294771),e.s(["GitHubImportDialog",()=>N,"GitHubRepoBrowser",()=>j,"GitHubUrlInput",()=>d],192350)},522129,e=>{e.n(e.i(192350))}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,951911,e=>{"use strict";var t=e.i(679606),a=e.i(152155),r=e.i(291967),n=e.i(205978),s=e.i(922528),i=e.i(936589),o=e.i(23405),l=e.i(277624),c=e.i(287620),d="Switch",[u,h]=(0,s.createContextScope)(d),[p,m]=u(d),f=a.forwardRef((e,s)=>{let{__scopeSwitch:o,name:l,checked:u,defaultChecked:h,required:m,disabled:f,value:x="on",onCheckedChange:b,form:y,...j}=e,[k,w]=a.useState(null),N=(0,n.useComposedRefs)(s,e=>w(e)),C=a.useRef(!1),S=!k||y||!!k.closest("form"),[D,F]=(0,i.useControllableState)({prop:u,defaultProp:h??!1,onChange:b,caller:d});return(0,t.jsxs)(p,{scope:o,checked:D,disabled:f,children:[(0,t.jsx)(c.Primitive.button,{type:"button",role:"switch","aria-checked":D,"aria-required":m,"data-state":v(D),"data-disabled":f?"":void 0,disabled:f,value:x,...j,ref:N,onClick:(0,r.composeEventHandlers)(e.onClick,e=>{F(e=>!e),S&&(C.current=e.isPropagationStopped(),C.current||e.stopPropagation())})}),S&&(0,t.jsx)(g,{control:k,bubbles:!C.current,name:l,value:x,checked:D,required:m,disabled:f,form:y,style:{transform:"translateX(-100%)"}})]})});f.displayName=d;var x="SwitchThumb",b=a.forwardRef((e,a)=>{let{__scopeSwitch:r,...n}=e,s=m(x,r);return(0,t.jsx)(c.Primitive.span,{"data-state":v(s.checked),"data-disabled":s.disabled?"":void 0,...n,ref:a})});b.displayName=x;var g=a.forwardRef(({__scopeSwitch:e,control:r,checked:s,bubbles:i=!0,...c},d)=>{let u=a.useRef(null),h=(0,n.useComposedRefs)(u,d),p=(0,o.usePrevious)(s),m=(0,l.useSize)(r);return a.useEffect(()=>{let e=u.current;if(!e)return;let t=Object.getOwnPropertyDescriptor(window.HTMLInputElement.prototype,"checked").set;if(p!==s&&t){let a=new Event("click",{bubbles:i});t.call(e,s),e.dispatchEvent(a)}},[p,s,i]),(0,t.jsx)("input",{type:"checkbox","aria-hidden":!0,defaultChecked:s,...c,tabIndex:-1,ref:h,style:{...c.style,...m,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})});function v(e){return e?"checked":"unchecked"}g.displayName="SwitchBubbleInput",e.s(["Root",()=>f,"Switch",()=>f,"SwitchThumb",()=>b,"Thumb",()=>b,"createSwitchScope",()=>h],595291);var y=e.i(595291),y=y,j=e.i(131777);function k({className:e,size:a="default",...r}){return(0,t.jsx)(y.Root,{"data-slot":"switch","data-size":a,className:(0,j.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),...r,children:(0,t.jsx)(y.Thumb,{"data-slot":"switch-thumb",className:(0,j.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 rtl:data-[state=checked]:-translate-x-[calc(100%-2px)]")})})}e.s(["Switch",()=>k],951911)},731463,e=>{"use strict";let t=(0,e.i(903645).default)("ellipsis",[["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}],["circle",{cx:"19",cy:"12",r:"1",key:"1wjl8i"}],["circle",{cx:"5",cy:"12",r:"1",key:"1pcz8c"}]]);e.s(["MoreHorizontal",()=>t],731463)},197667,e=>{"use strict";var t=e.i(301012);e.s(["CheckIcon",()=>t.default])},216868,442076,e=>{"use strict";var t=e.i(943698);async function a(){let e=await fetch("/api/dialog/pick-files",{method:"POST"});if(!e.ok)throw Error("Failed to open file dialog");let t=await e.json();return t.cancelled?null:t.files}e.s(["PaperclipIcon",()=>t.default],216868),e.s(["pickFiles",()=>a],442076)},983299,474363,765104,e=>{"use strict";let t=(0,e.i(903645).default)("archive-restore",[["rect",{width:"20",height:"5",x:"2",y:"3",rx:"1",key:"1wp1u1"}],["path",{d:"M4 8v11a2 2 0 0 0 2 2h2",key:"tvwodi"}],["path",{d:"M20 8v11a2 2 0 0 1-2 2h-2",key:"1gkqxj"}],["path",{d:"m9 15 3-3 3 3",key:"1pd0qc"}],["path",{d:"M12 12v9",key:"192myk"}]]);e.s(["ArchiveRestore",()=>t],983299);var a=e.i(679606),r=e.i(152155),n=e.i(83428);e.i(541001);var s=e.i(626960),i=e.i(64780),o=e.i(271326),l=e.i(197667),c=e.i(961569),c=c,d=e.i(205978),u=e.i(922528),h=e.i(291967),p=e.i(936589),m=e.i(23405),f=e.i(277624),x=e.i(685995),b=e.i(287620),g="Checkbox",[v,y]=(0,u.createContextScope)(g),[j,k]=v(g);function w(e){let{__scopeCheckbox:t,checked:n,children:s,defaultChecked:i,disabled:o,form:l,name:c,onCheckedChange:d,required:u,value:h="on",internal_do_not_use_render:m}=e,[f,x]=(0,p.useControllableState)({prop:n,defaultProp:i??!1,onChange:d,caller:g}),[b,v]=r.useState(null),[y,k]=r.useState(null),w=r.useRef(!1),N=!b||!!l||!!b.closest("form"),C={checked:f,disabled:o,setChecked:x,control:b,setControl:v,name:c,form:l,value:h,hasConsumerStoppedPropagationRef:w,required:u,defaultChecked:!P(i)&&i,isFormControl:N,bubbleInput:y,setBubbleInput:k};return(0,a.jsx)(j,{scope:t,...C,children:"function"==typeof m?m(C):s})}var N="CheckboxTrigger",C=r.forwardRef(({__scopeCheckbox:e,onKeyDown:t,onClick:n,...s},i)=>{let{control:o,value:l,disabled:c,checked:u,required:p,setControl:m,setChecked:f,hasConsumerStoppedPropagationRef:x,isFormControl:g,bubbleInput:v}=k(N,e),y=(0,d.useComposedRefs)(i,m),j=r.useRef(u);return r.useEffect(()=>{let e=o?.form;if(e){let t=()=>f(j.current);return e.addEventListener("reset",t),()=>e.removeEventListener("reset",t)}},[o,f]),(0,a.jsx)(b.Primitive.button,{type:"button",role:"checkbox","aria-checked":P(u)?"mixed":u,"aria-required":p,"data-state":A(u),"data-disabled":c?"":void 0,disabled:c,value:l,...s,ref:y,onKeyDown:(0,h.composeEventHandlers)(t,e=>{"Enter"===e.key&&e.preventDefault()}),onClick:(0,h.composeEventHandlers)(n,e=>{f(e=>!!P(e)||!e),v&&g&&(x.current=e.isPropagationStopped(),x.current||e.stopPropagation())})})});C.displayName=N;var S=r.forwardRef((e,t)=>{let{__scopeCheckbox:r,name:n,checked:s,defaultChecked:i,required:o,disabled:l,value:c,onCheckedChange:d,form:u,...h}=e;return(0,a.jsx)(w,{__scopeCheckbox:r,checked:s,defaultChecked:i,disabled:l,required:o,onCheckedChange:d,name:n,form:u,value:c,internal_do_not_use_render:({isFormControl:e})=>(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(C,{...h,ref:t,__scopeCheckbox:r}),e&&(0,a.jsx)(E,{__scopeCheckbox:r})]})})});S.displayName=g;var D="CheckboxIndicator",F=r.forwardRef((e,t)=>{let{__scopeCheckbox:r,forceMount:n,...s}=e,i=k(D,r);return(0,a.jsx)(x.Presence,{present:n||P(i.checked)||!0===i.checked,children:(0,a.jsx)(b.Primitive.span,{"data-state":A(i.checked),"data-disabled":i.disabled?"":void 0,...s,ref:t,style:{pointerEvents:"none",...e.style}})})});F.displayName=D;var R="CheckboxBubbleInput",E=r.forwardRef(({__scopeCheckbox:e,...t},n)=>{let{control:s,hasConsumerStoppedPropagationRef:i,checked:o,defaultChecked:l,required:c,disabled:u,name:h,value:p,form:x,bubbleInput:g,setBubbleInput:v}=k(R,e),y=(0,d.useComposedRefs)(n,v),j=(0,m.usePrevious)(o),w=(0,f.useSize)(s);r.useEffect(()=>{if(!g)return;let e=Object.getOwnPropertyDescriptor(window.HTMLInputElement.prototype,"checked").set,t=!i.current;if(j!==o&&e){let a=new Event("click",{bubbles:t});g.indeterminate=P(o),e.call(g,!P(o)&&o),g.dispatchEvent(a)}},[g,j,o,i]);let N=r.useRef(!P(o)&&o);return(0,a.jsx)(b.Primitive.input,{type:"checkbox","aria-hidden":!0,defaultChecked:l??N.current,required:c,disabled:u,name:h,value:p,form:x,...t,tabIndex:-1,ref:y,style:{...t.style,...w,position:"absolute",pointerEvents:"none",opacity:0,margin:0,transform:"translateX(-100%)"}})});function P(e){return"indeterminate"===e}function A(e){return P(e)?"indeterminate":e?"checked":"unchecked"}E.displayName=R,e.s(["Checkbox",()=>S,"CheckboxIndicator",()=>F,"Indicator",()=>F,"Root",()=>S,"createCheckboxScope",()=>y,"unstable_BubbleInput",()=>E,"unstable_CheckboxBubbleInput",()=>E,"unstable_CheckboxProvider",()=>w,"unstable_CheckboxTrigger",()=>C,"unstable_Provider",()=>w,"unstable_Trigger",()=>C],257696);var M=e.i(257696),M=M,z=e.i(131777);function L({className:e,...t}){return(0,a.jsx)(M.Root,{"data-slot":"checkbox",className:(0,z.cn)("peer border-input dark:bg-input/30 data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground dark:data-[state=checked]:bg-primary data-[state=checked]:border-primary data-[state=indeterminate]:bg-primary data-[state=indeterminate]:text-primary-foreground data-[state=indeterminate]:border-primary focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive size-4 shrink-0 cursor-pointer rounded-[4px] border shadow-xs transition-shadow outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50",e),...t,children:(0,a.jsx)(M.Indicator,{"data-slot":"checkbox-indicator",className:"grid place-content-center text-current transition-none",children:"indeterminate"===t.checked?(0,a.jsx)(c.default,{className:"size-3.5"}):(0,a.jsx)(l.CheckIcon,{className:"size-3.5"})})})}e.s(["Checkbox",()=>L],474363);var T=e.i(141957);function _({open:e,onOpenChange:t,onConfirm:l,isDeleting:c,featureName:d,featureId:u,hasChildren:h,hasOpenPr:p}){let{t:m}=(0,i.useTranslation)("web"),[f,x]=(0,r.useState)(!0),[b,g]=(0,r.useState)(!1),[v,y]=(0,r.useState)(!0);return(0,r.useEffect)(()=>{e&&(x(!0),g(!1),y(!0))},[e]),(0,r.useEffect)(()=>{f?y(!0):y(!1)},[f]),(0,a.jsx)(o.AlertDialog,{open:e,onOpenChange:t,children:(0,a.jsxs)(o.AlertDialogContent,{onCloseAutoFocus:e=>e.preventDefault(),children:[(0,a.jsxs)(o.AlertDialogHeader,{children:[(0,a.jsx)(o.AlertDialogTitle,{children:m("deleteFeature.title")}),(0,a.jsx)(o.AlertDialogDescription,{children:(0,a.jsx)(s.Trans,{t:m,i18nKey:"deleteFeature.description",values:{featureName:d,featureId:u},components:{strong:(0,a.jsx)("strong",{})}})})]}),(0,a.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)(L,{id:"cleanup-checkbox",checked:f,onCheckedChange:e=>x(!0===e),disabled:c,"aria-label":m("deleteFeature.cleanupLabel")}),(0,a.jsx)(T.Label,{htmlFor:"cleanup-checkbox",className:"cursor-pointer text-sm",children:m("deleteFeature.cleanupLabel")})]}),h?(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)(L,{id:"cascade-delete-checkbox",checked:b,onCheckedChange:e=>g(!0===e),disabled:c,"aria-label":m("deleteFeature.deleteSubFeatures")}),(0,a.jsx)(T.Label,{htmlFor:"cascade-delete-checkbox",className:"cursor-pointer text-sm",children:m("deleteFeature.deleteSubFeatures")})]}):null,p?(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)(L,{id:"close-pr-checkbox",checked:v,onCheckedChange:e=>y(!0===e),disabled:c||!f,"aria-label":m("deleteFeature.closePullRequest")}),(0,a.jsx)(T.Label,{htmlFor:"close-pr-checkbox",className:"cursor-pointer text-sm",children:m("deleteFeature.closePullRequest")})]}):null]}),(0,a.jsxs)(o.AlertDialogFooter,{children:[(0,a.jsx)(o.AlertDialogCancel,{disabled:c,onClick:()=>t(!1),children:m("deleteFeature.cancel")}),(0,a.jsx)(o.AlertDialogAction,{variant:"destructive",disabled:c,onClick:()=>l(f,b,!!p&&v),children:c?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(n.Loader2,{className:"me-2 h-4 w-4 animate-spin"}),m("deleteFeature.deleting")]}):m("deleteFeature.delete")})]})]})})}e.s(["DeleteFeatureDialog",()=>_],765104)},124591,236339,e=>{"use strict";var t=e.i(508893);let a=(0,t.createServerReference)("403cd743582b04e16123492c021f02e07c2e6d3f73",t.callServer,void 0,t.findSourceMapURL,"startFeature");e.s(["startFeature",()=>a],124591);let r=(0,t.createServerReference)("4037dde1df43a64cf71a763a4f515a7ca22f86a7e3",t.callServer,void 0,t.findSourceMapURL,"stopFeature");e.s(["stopFeature",()=>r],236339)},605560,e=>{"use strict";var t=e.i(508893);let a=(0,t.createServerReference)("409610f1e03c114af0086aab95a7414b9cc8ad5ad9",t.callServer,void 0,t.findSourceMapURL,"resumeFeature");e.s(["resumeFeature",()=>a])},454793,207729,e=>{"use strict";var t=e.i(679606),a=e.i(131777);function r({icon:e,title:r,description:n,action:s,className:i,...o}){return(0,t.jsxs)("div",{className:(0,a.cn)("flex flex-col items-center gap-4 px-4 py-12 text-center",i),...o,children:[e?(0,t.jsx)("div",{className:"text-muted-foreground",children:e}):null,(0,t.jsx)("h3",{className:"text-lg font-semibold",children:r}),n?(0,t.jsx)("p",{className:"text-muted-foreground max-w-md text-sm",children:n}):null,s?(0,t.jsx)("div",{className:"mt-2",children:s}):null]})}e.s(["EmptyState",()=>r],207729),e.s([],454793)},809443,185871,e=>{"use strict";var t=e.i(679606),a=e.i(131777);function r({title:e,description:r,children:n,className:s}){return(0,t.jsxs)("header",{className:(0,a.cn)("flex items-center justify-between gap-4",s),children:[(0,t.jsxs)("div",{className:"space-y-1",children:[(0,t.jsx)("h1",{className:"text-2xl font-bold tracking-tight",children:e}),r?(0,t.jsx)("p",{className:"text-muted-foreground",children:r}):null]}),n?(0,t.jsx)("div",{"data-slot":"actions",children:n}):null]})}e.s(["PageHeader",()=>r],185871),e.s([],809443)},440106,e=>{"use strict";var t=e.i(679606),a=e.i(152155),r=e.i(711719),n=e.i(935946),s=e.i(83428),i=e.i(542049),o=e.i(453360),l=e.i(941698),c=e.i(99105),d=e.i(723925),u=e.i(860253);e.i(541001);var h=e.i(64780),p=e.i(131777),m=e.i(508893);let f=(0,m.createServerReference)("4035e1ac88876828a7d56567d1258244abdb67fa5b",m.callServer,void 0,m.findSourceMapURL,"createProjectAndFeature"),x=(0,m.createServerReference)("40b2732c90dc8f6013e5f8355e9e55f993a9a7ef67",m.callServer,void 0,m.findSourceMapURL,"createApplication");var b=e.i(41413);e.i(650032);var g=e.i(486254);e.i(692233);var v=e.i(210025),y=e.i(102828),j=e.i(470646),k=e.i(731151);let w=["application","fast","spec"],N={application:{icon:i.LayoutGrid,label:"Application",placeholder:"Build a modern e-commerce storefront with product catalog...",suggestions:["A landing page with hero, features, and pricing sections","Full-stack SaaS app with auth, billing, and dashboard","Mobile-first social media app with real-time chat","Personal portfolio with blog and project showcase"]},fast:{icon:o.Zap,label:"Fast",placeholder:"Add a dark mode toggle to the settings page...",suggestions:["Add pagination to the users list endpoint","Fix the broken logout redirect","Add input validation to the signup form","Refactor the API error handling middleware"]},spec:{icon:l.ClipboardList,label:"Spec Driven",placeholder:"Implement a role-based access control system with audit logging...",suggestions:["OAuth2 authentication with SSO and MFA support","Event-driven notification system with email and push","REST API with versioning, rate limiting, and OpenAPI docs","Data pipeline with ETL, validation, and monitoring"]}};function C({onRepositorySelect:e,onApplicationCreated:i,onClose:o,className:l}){let{t:m}=(0,h.useTranslation)("web"),[C,S]=(0,a.useState)(""),[D,F]=(0,a.useState)(void 0),[R,E]=(0,a.useState)(void 0),[P,A]=(0,a.useState)("application"),[M,z]=(0,a.useState)(!1),[L,T]=(0,a.useState)(null),[_,I]=(0,a.useState)(!1),O=(0,a.useRef)(null),B=(0,k.useAttachments)(),H=!!e,U=H?P:"application",q=(0,a.useCallback)(()=>{A(e=>{let t=w.indexOf(e);return w[(t+1)%w.length]})},[]);(0,a.useEffect)(()=>{let t=t=>{"Escape"===t.key&&o&&o(),"Tab"===t.key&&t.shiftKey&&e&&(t.preventDefault(),q())};return window.addEventListener("keydown",t),()=>window.removeEventListener("keydown",t)},[o,q,e]);let $=(0,a.useCallback)(async()=>{if(C.trim()&&!M){z(!0),T(null);try{if("application"!==U&&e){let t=await f({description:C.trim(),attachments:B.completedAttachments.map(e=>({path:e.path,name:e.name,notes:e.notes})),agentType:D,model:R,fast:"fast"===U});if(t.error){T(t.error),z(!1);return}t.repositoryPath&&e?.(t.repositoryPath),t.feature&&t.repositoryPath&&window.dispatchEvent(new CustomEvent("shep:feature-created",{detail:{featureId:t.feature.id,name:t.feature.name,description:t.feature.description,repositoryPath:t.repositoryPath}}))}else{let e=await x({description:C.trim(),agentType:D,modelOverride:R,initialPrompt:C.trim()});if(e.error){T(e.error),z(!1);return}e.application&&i?.(e.application.id)}}catch{T("Something went wrong. Please try again."),z(!1)}}},[C,M,U,B.completedAttachments,D,R,e,i]),K=(0,a.useCallback)(e=>{"Enter"===e.key&&(e.ctrlKey||e.metaKey)&&(e.preventDefault(),$())},[$]),X=(0,a.useCallback)(async()=>{try{let e=await fetch("/api/dialog/pick-files");if(!e.ok)return;let t=await e.json();if(!t.paths?.length)return;for(let e of t.paths){let t=await fetch("/api/attachments/upload-from-path",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({path:e,sessionId:"onboarding"})});if(!t.ok)continue;let a=await t.json();B.addAttachment(a)}}catch{}},[B.addAttachment]),Z=(0,a.useCallback)(e=>{S(e),O.current?.focus()},[]),G=N[U],V=G.icon;return(0,t.jsxs)("div",{"data-testid":"control-center-empty-state",className:(0,p.cn)("relative flex h-full w-full flex-col items-center justify-center overflow-hidden px-8",l),children:[(0,t.jsx)("div",{className:"onboard-bg pointer-events-none absolute inset-0 animate-[onboard-fade-in_1.2s_ease-out_both]"}),o?(0,t.jsx)("button",{type:"button",onClick:o,"aria-label":"Close",className:"text-muted-foreground hover:text-foreground hover:bg-accent/50 absolute top-4 right-4 z-10 cursor-pointer rounded p-1.5 transition-colors",children:(0,t.jsx)(u.X,{className:"h-5 w-5"})}):null,(0,t.jsxs)("div",{className:"relative flex w-full max-w-2xl flex-col items-center",children:[(0,t.jsx)("div",{className:"mb-6 animate-[onboard-logo_0.8s_cubic-bezier(0.16,1,0.3,1)_both]",style:{animationDelay:"0ms"},children:(0,t.jsx)(v.ShepLogo,{size:72,className:"text-foreground"})}),(0,t.jsx)("h1",{className:"text-foreground animate-[onboard-fade-up_0.7s_cubic-bezier(0.16,1,0.3,1)_both] text-center text-5xl font-extralight tracking-tight",style:{animationDelay:"120ms"},children:"What do you want to build?"}),(0,t.jsx)("p",{className:"text-muted-foreground mt-3 animate-[onboard-fade-up_0.7s_cubic-bezier(0.16,1,0.3,1)_both] text-center text-lg leading-relaxed font-light",style:{animationDelay:"220ms"},children:"Describe your idea and Shep creates the project for you."}),(0,t.jsxs)("div",{className:"mt-10 w-full animate-[onboard-fade-up_0.7s_cubic-bezier(0.16,1,0.3,1)_both]",style:{animationDelay:"350ms"},children:[(0,t.jsxs)("div",{onFocus:()=>I(!0),onBlur:()=>I(!1),onDragEnter:B.handleDragEnter,onDragLeave:B.handleDragLeave,onDragOver:B.handleDragOver,onDrop:B.handleDrop,className:(0,p.cn)("flex flex-col rounded-xl border transition-all duration-200","border-border/60 bg-background shadow-sm dark:border-white/10 dark:bg-white/[0.04]",_&&"ring-ring/50 border-ring shadow-md ring-[3px] dark:border-orange-500/40 dark:ring-orange-500/25",B.isDragOver&&"border-primary/50 bg-primary/5",M&&"opacity-70"),children:[(0,t.jsx)("textarea",{ref:O,rows:2,autoFocus:!0,value:C,onChange:e=>S(e.target.value),onKeyDown:K,onPaste:B.handlePaste,placeholder:G.placeholder,disabled:M,className:"text-foreground placeholder:text-muted-foreground/60 max-h-[10rem] min-h-[4.5rem] w-full resize-none border-0 bg-transparent px-4 py-3.5 text-sm leading-relaxed focus:outline-none disabled:cursor-not-allowed"}),B.attachments.length>0?(0,t.jsx)("div",{className:"flex shrink-0 items-center gap-2.5 overflow-x-auto overflow-y-visible px-5 pt-2 pb-2",children:B.attachments.map(e=>(0,t.jsx)(g.AttachmentChip,{name:e.name,size:e.size,mimeType:e.mimeType,path:e.path,onRemove:()=>B.removeAttachment(e.id),loading:e.loading,notes:e.notes,onNotesChange:t=>B.updateNotes(e.id,t)},e.id))}):null,B.uploadError?(0,t.jsx)("p",{className:"text-destructive px-4 pb-2 text-xs",children:B.uploadError}):null,(0,t.jsxs)("div",{className:"border-border/60 flex shrink-0 items-center gap-3 border-t px-3 py-2 dark:border-white/10",children:[(0,t.jsx)(b.AgentModelPicker,{initialAgentType:D??"claude-code",initialModel:R??"claude-sonnet-4-6",mode:"override",showInstallStatus:!0,onAgentModelChange:(e,t)=>{F(e),E(t)},className:"w-55"}),(0,t.jsx)("div",{className:"flex-1"}),H?(0,t.jsxs)(j.DropdownMenu,{children:[(0,t.jsx)(j.DropdownMenuTrigger,{asChild:!0,children:(0,t.jsxs)("button",{type:"button","data-testid":"build-mode-selector",className:"text-muted-foreground hover:text-foreground hover:bg-accent/50 flex cursor-pointer items-center gap-1.5 rounded-md px-2 py-1 text-xs transition-colors",children:[(0,t.jsxs)("span",{className:"flex animate-[onboard-fade-up_0.25s_ease-out_both] items-center gap-1.5",children:[(0,t.jsx)(V,{className:"h-3.5 w-3.5"}),G.label]},U),(0,t.jsx)(c.ChevronDown,{className:"h-3 w-3 opacity-50"})]})}),(0,t.jsx)(j.DropdownMenuContent,{align:"end",className:"min-w-[160px]",children:w.map(e=>{let a=N[e],r=a.icon,n=U===e;return(0,t.jsxs)(j.DropdownMenuItem,{onClick:()=>A(e),"data-testid":`build-mode-${e}`,className:"flex items-center gap-2",children:[(0,t.jsx)(r,{className:"h-3.5 w-3.5"}),(0,t.jsx)("span",{className:"flex-1",children:a.label}),n?(0,t.jsx)(d.Check,{className:"text-foreground h-3.5 w-3.5"}):null]},e)})})]}):null,(0,t.jsxs)(y.Tooltip,{children:[(0,t.jsx)(y.TooltipTrigger,{asChild:!0,children:(0,t.jsx)("button",{type:"button",onClick:X,disabled:M,"aria-label":m("chat.attachFiles"),className:"text-muted-foreground hover:text-foreground cursor-pointer rounded p-1 transition-colors disabled:opacity-50",children:(0,t.jsx)(n.Paperclip,{className:"h-4 w-4"})})}),(0,t.jsx)(y.TooltipContent,{side:"top",children:m("chat.attachFiles")})]}),(0,t.jsx)("button",{type:"button",onClick:$,disabled:!C.trim()||M,className:(0,p.cn)("bg-foreground text-background inline-flex h-8 w-8 shrink-0 cursor-pointer items-center justify-center rounded-lg","hover:bg-foreground/90 disabled:pointer-events-none disabled:opacity-30","transition-all duration-150"),children:M?(0,t.jsx)(s.Loader2,{className:"h-3.5 w-3.5 animate-spin"}):(0,t.jsx)(r.SendHorizontal,{className:"h-3.5 w-3.5"})})]})]}),L?(0,t.jsx)("p",{className:"text-destructive mt-2 text-center text-sm",children:L}):null]}),(0,t.jsx)("div",{className:"mt-6 flex animate-[onboard-fade-up_0.4s_ease-out_both] flex-wrap justify-center gap-2",children:G.suggestions.map(e=>(0,t.jsx)("button",{type:"button",onClick:()=>Z(e),disabled:M,className:"text-muted-foreground hover:text-foreground border-border/60 hover:border-border hover:bg-accent/50 cursor-pointer rounded-full border px-3.5 py-1.5 text-xs transition-all duration-150 disabled:opacity-50 dark:border-white/10 dark:hover:border-white/20 dark:hover:bg-white/[0.06]",children:e},e))},U)]})]})}e.s(["ControlCenterEmptyState",()=>C],440106)},998798,e=>{"use strict";let t=(0,e.i(903645).default)("pencil",[["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",key:"1a8usu"}],["path",{d:"m15 5 4 4",key:"1mk7zo"}]]);e.s(["Pencil",()=>t],998798)},13322,961201,e=>{"use strict";var t=e.i(679606),a=e.i(152155),r=e.i(276016);let n=(0,e.i(903645).default)("folder",[["path",{d:"M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z",key:"1kt360"}]]);var s=e.i(619933),i=e.i(83428),o=e.i(998798),l=e.i(360112),c=e.i(602287),d=e.i(735364),u=e.i(835340);async function h(e){let t=new URLSearchParams;e&&t.set("path",e);let a=await fetch(`/api/directory/list?${t.toString()}`);if(!a.ok)throw Error((await a.json().catch(()=>({error:"Failed to load directory"}))).error??"Failed to load directory");return a.json()}function p({currentPath:e,isEditing:n,onToggleEdit:s,onNavigate:i}){let l=(0,a.useRef)(null),[c,d]=(0,a.useState)(e);function u(){d(e),s()}(0,a.useEffect)(()=>{d(e)},[e]),(0,a.useEffect)(()=>{n&&l.current&&(l.current.focus(),l.current.select())},[n]);let h=function(e){if(!e)return[];let t=/^[a-zA-Z]:/.test(e),a=t?"\\":"/",r=e.split(/[\\/]/).filter(Boolean),n=[];for(let e=0;e<r.length;e++){let s=t?r.slice(0,e+1).join(a):a+r.slice(0,e+1).join(a);n.push({label:r[e],path:s})}return n}(e),p=h.length>3,m=p?h.slice(-3):h;return(0,t.jsxs)("div",{className:"border-b px-4 py-3",children:[(0,t.jsx)("h2",{className:"text-foreground mb-2.5 text-sm font-semibold tracking-[-0.01em]",children:"Select Folder"}),n?(0,t.jsx)("input",{ref:l,type:"text",value:c,onChange:e=>d(e.target.value),onKeyDown:e=>{if("Enter"===e.key){let t;e.preventDefault(),(t=c.trim())&&i(t)}"Escape"===e.key&&(e.preventDefault(),u())},onBlur:u,className:"bg-muted/60 border-border focus:ring-ring/20 focus:border-ring w-full rounded-lg border px-3 py-2 font-mono text-xs transition-all outline-none focus:ring-2",placeholder:"Type a path and press Enter...",spellCheck:!1,autoComplete:"off"}):(0,t.jsxs)("div",{className:"bg-muted/40 flex items-center gap-1 rounded-lg px-2.5 py-2",children:[(0,t.jsx)("button",{type:"button",onClick:()=>i("/"),className:"text-muted-foreground hover:text-foreground hover:bg-background shrink-0 rounded px-1.5 py-0.5 font-mono text-xs transition-colors",children:"/"}),p?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(r.ChevronRight,{className:"text-muted-foreground/30 h-3 w-3 shrink-0"}),(0,t.jsx)("span",{className:"text-muted-foreground/40 font-mono text-xs",children:"..."})]}):null,m.map((e,a)=>{let n=a===m.length-1;return(0,t.jsxs)("span",{className:"flex shrink-0 items-center gap-1",children:[(0,t.jsx)(r.ChevronRight,{className:"text-muted-foreground/30 h-3 w-3"}),n?(0,t.jsx)("span",{className:"bg-primary/10 text-primary rounded px-2 py-0.5 font-mono text-xs font-medium",children:e.label}):(0,t.jsx)("button",{type:"button",onClick:()=>i(e.path),className:"text-muted-foreground hover:text-foreground hover:bg-background rounded px-1.5 py-0.5 font-mono text-xs transition-colors",children:e.label})]},e.path)}),(0,t.jsx)("div",{className:"flex-1"}),(0,t.jsx)("button",{type:"button",onClick:s,className:"text-muted-foreground/40 hover:text-foreground hover:bg-background shrink-0 rounded p-1 transition-colors","aria-label":"Edit path",children:(0,t.jsx)(o.Pencil,{className:"h-3 w-3"})})]})]})}function m({open:e,onOpenChange:o,onSelect:m,initialPath:f}){let[x,b]=(0,a.useState)([]),[g,v]=(0,a.useState)(""),[y,j]=(0,a.useState)(!1),[k,w]=(0,a.useState)(!1),N=(0,a.useRef)(!1),[C,S]=(0,a.useState)(0),D=(0,a.useCallback)(async e=>{j(!0),w(!1);try{let t=await h(e);b(t.entries),v(t.currentPath),S(e=>e+1)}catch(t){let e=t instanceof Error?t.message:"Failed to load directory";l.toast.error(e)}finally{j(!1)}},[]);function F(e){D(e)}function R(){m(null),o(!1)}return(0,a.useEffect)(()=>{e&&!N.current&&(N.current=!0,D(f)),e||(N.current=!1,w(!1))},[e,f,D]),(0,t.jsx)(c.Dialog,{open:e,onOpenChange:e=>{e||R()},children:(0,t.jsxs)(c.DialogContent,{className:"flex h-[min(520px,85dvh)] w-full max-w-[460px] flex-col gap-0 overflow-hidden p-0",onCloseAutoFocus:e=>e.preventDefault(),children:[(0,t.jsx)(c.DialogTitle,{className:"sr-only",children:"Select Folder"}),(0,t.jsx)(c.DialogDescription,{className:"sr-only",children:"Navigate to a folder and select it"}),(0,t.jsx)(p,{currentPath:g,isEditing:k,onToggleEdit:()=>w(e=>!e),onNavigate:F}),(0,t.jsx)(u.ScrollArea,{className:"min-h-0 flex-1",children:y&&0===x.length?(0,t.jsx)("div",{className:"space-y-0.5 p-2",children:Array.from({length:8}).map((e,a)=>(0,t.jsxs)("div",{className:"flex items-center gap-3 rounded-lg px-3 py-2.5",style:{opacity:1-.1*a},children:[(0,t.jsx)("div",{className:"bg-muted h-4 w-4 animate-pulse rounded"}),(0,t.jsx)("div",{className:"bg-muted h-3.5 animate-pulse rounded",style:{width:`${40+35*Math.random()}%`}})]},`skeleton-${a}`))}):0===x.length?(0,t.jsxs)("div",{className:"flex flex-col items-center justify-center py-20",children:[(0,t.jsx)(s.FolderOpen,{className:"text-muted-foreground/25 mb-3 h-10 w-10"}),(0,t.jsx)("p",{className:"text-muted-foreground/60 text-sm",children:"Empty folder"})]}):(0,t.jsx)("div",{className:"p-2",children:x.map((e,a)=>(0,t.jsxs)("button",{type:"button",onClick:()=>F(e.path),className:"folder-row group flex w-full items-center gap-3 rounded-lg px-3 py-2.5 text-left transition-all hover:bg-[var(--color-primary)]/[0.06] active:scale-[0.997]",style:{animationDelay:`${20*a}ms`},children:[(0,t.jsx)(n,{className:"text-muted-foreground/50 group-hover:text-primary h-[18px] w-[18px] shrink-0 transition-colors"}),(0,t.jsx)("span",{className:"text-foreground min-w-0 flex-1 truncate text-[13px] font-medium",children:e.name}),(0,t.jsx)(r.ChevronRight,{className:"text-muted-foreground/0 group-hover:text-muted-foreground/40 h-3.5 w-3.5 shrink-0 transition-all"})]},e.path))},C)}),(0,t.jsxs)("div",{className:"flex items-center gap-2 border-t px-4 py-3",children:[(0,t.jsx)("p",{className:"text-muted-foreground min-w-0 flex-1 truncate font-mono text-[11px] leading-none",children:g||" "}),(0,t.jsx)(d.Button,{variant:"ghost",size:"sm",onClick:R,className:"text-muted-foreground h-8 shrink-0 px-3 text-xs",children:"Cancel"}),(0,t.jsxs)(d.Button,{size:"sm",onClick:function(){g&&(m(g),o(!1))},disabled:!g||y,className:"h-8 shrink-0 px-5 text-xs font-medium",children:[y?(0,t.jsx)(i.Loader2,{className:"mr-1.5 h-3 w-3 animate-spin"}):null,"Select"]})]})]})})}e.s(["ReactFileManagerDialog",()=>m],961201),e.s([],13322)},591925,e=>{"use strict";let t=(0,e.i(903645).default)("folder-plus",[["path",{d:"M12 10v6",key:"1bos4e"}],["path",{d:"M9 13h6",key:"1uhe8q"}],["path",{d:"M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z",key:"1kt360"}]]);e.s(["FolderPlus",()=>t],591925)},507987,e=>{"use strict";var t=e.i(508893);let a=(0,t.createServerReference)("40f81c7d612692dda7d814be9521f369bf5c1a96ef",t.callServer,void 0,t.findSourceMapURL,"addRepository");e.s(["addRepository",()=>a])},713005,371127,744263,327810,e=>{"use strict";let t=(0,e.i(903645).default)("sliders-horizontal",[["path",{d:"M10 5H3",key:"1qgfaw"}],["path",{d:"M12 19H3",key:"yhmn1j"}],["path",{d:"M14 3v4",key:"1sua03"}],["path",{d:"M16 17v4",key:"1q0r14"}],["path",{d:"M21 12h-9",key:"1o4lsq"}],["path",{d:"M21 19h-5",key:"1rlt1p"}],["path",{d:"M21 5h-7",key:"1oszz2"}],["path",{d:"M8 10v4",key:"tgpxqk"}],["path",{d:"M8 12H3",key:"a7s4jb"}]]);e.s(["SlidersHorizontal",()=>t],713005);var a=e.i(679606),r=e.i(152155),n=e.i(3214),s=e.i(83428),i=e.i(860253);e.i(541001);var o=e.i(64780),l=e.i(131777),c=e.i(735364);function d({actions:e,className:t,style:d}){let{t:u}=(0,o.useTranslation)("web"),[h,p]=(0,r.useState)(!1);return(0,r.useEffect)(()=>{if(h)return document.addEventListener("keydown",e),()=>document.removeEventListener("keydown",e);function e(e){"Escape"===e.key&&p(!1)}},[h]),(0,a.jsxs)(a.Fragment,{children:[h?(0,a.jsx)("div",{"data-testid":"fab-overlay",className:"fixed inset-0 z-40",onClick:()=>p(!1),"aria-hidden":"true"}):null,(0,a.jsxs)("div",{"data-testid":"floating-action-button",className:(0,l.cn)("relative z-50",t),style:d,children:[(0,a.jsx)("div",{className:(0,l.cn)("absolute start-0 bottom-[calc(100%+24px)] flex flex-col items-start gap-2",!h&&"pointer-events-none"),"data-testid":"fab-actions",children:e.map((t,r)=>{let n=(e.length-1-r)*50;return(0,a.jsxs)("button",{"data-testid":`fab-action-${t.id}`,"aria-label":t.label,disabled:t.disabled??t.loading,className:(0,l.cn)("flex h-10 items-center gap-2.5 rounded-full px-4","bg-background text-foreground shadow-md","border-border border","hover:bg-accent hover:text-accent-foreground","disabled:pointer-events-none disabled:opacity-50","text-sm font-medium whitespace-nowrap",h?"translate-y-0 opacity-100":"pointer-events-none translate-y-0 opacity-0"),style:{transition:`opacity ${h?250:120}ms ease-out ${h?n:0}ms, transform ${h?250:120}ms ease-out ${h?n:0}ms`},onClick:()=>{t.onClick(),p(!1)},children:[(0,a.jsx)("span",{className:"flex h-5 w-5 shrink-0 items-center justify-center",children:t.loading?(0,a.jsx)(s.Loader2,{className:"h-4 w-4 animate-spin"}):t.icon}),(0,a.jsx)("span",{children:t.label})]},t.id)})}),(0,a.jsxs)(c.Button,{size:"icon","data-testid":"fab-trigger","aria-label":u(h?"fab.closeActions":"fab.createNew"),className:(0,l.cn)("relative h-14 w-14 rounded-full shadow-lg","bg-indigo-500 text-white hover:bg-indigo-400 dark:bg-indigo-500 dark:hover:bg-indigo-400","transition-all duration-200 hover:scale-105 hover:shadow-xl active:scale-95"),onClick:()=>p(e=>!e),children:[(0,a.jsx)(n.Plus,{className:(0,l.cn)("absolute h-7 w-7 stroke-[2.5] transition-all",h?"scale-0 rotate-90 opacity-0":"scale-100 rotate-0 opacity-100"),style:{transitionDuration:"250ms"}}),(0,a.jsx)(i.X,{className:(0,l.cn)("absolute h-6 w-6 stroke-[2.5] transition-all",h?"scale-100 rotate-0 opacity-100":"scale-0 -rotate-90 opacity-0"),style:{transitionDuration:"250ms"}})]})]})]})}e.s(["FloatingActionButton",()=>d],371127),e.s([],744263);var u=e.i(602287),h=e.i(698127),p=e.i(508893);let m=(0,p.createServerReference)("40eb3dbc918a45a3b96875f9fa0fc78b9af0bd1487",p.callServer,void 0,p.findSourceMapURL,"createProjectFolder");function f({open:e,onOpenChange:t,onCreated:n}){let[i,o]=(0,r.useState)(""),[l,d]=(0,r.useState)(!1),[p,f]=(0,r.useState)(null);(0,r.useEffect)(()=>{e&&(o(""),d(!1),f(null))},[e]);let x=async e=>{e.preventDefault();let a=i.trim();if(!a||l)return;d(!0),f(null);let r=await m(a);if(!r.ok||!r.path){f(r.error??"Failed to create project."),d(!1);return}n(r.path),t(!1)};return(0,a.jsx)(u.Dialog,{open:e,onOpenChange:t,children:(0,a.jsx)(u.DialogContent,{className:"max-w-sm",children:(0,a.jsxs)("form",{onSubmit:x,children:[(0,a.jsxs)(u.DialogHeader,{children:[(0,a.jsx)(u.DialogTitle,{children:"New project"}),(0,a.jsx)(u.DialogDescription,{children:"Create an empty project folder inside your Shep home directory. Git will be initialised automatically when the project is added."})]}),(0,a.jsxs)("div",{className:"py-4",children:[(0,a.jsx)(h.Input,{autoFocus:!0,value:i,onChange:e=>{o(e.target.value),p&&f(null)},placeholder:"my-prototype",disabled:l,"data-testid":"new-project-name-input"}),p?(0,a.jsx)("p",{className:"text-destructive mt-2 text-xs",role:"alert",children:p}):null]}),(0,a.jsxs)(u.DialogFooter,{children:[(0,a.jsx)(c.Button,{type:"button",variant:"ghost",onClick:()=>t(!1),disabled:l,children:"Cancel"}),(0,a.jsx)(c.Button,{type:"submit",disabled:!i.trim()||l,children:l?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(s.Loader2,{className:"mr-2 h-4 w-4 animate-spin"}),"Creating…"]}):"Create project"})]})]})})})}e.s(["NewProjectDialog",()=>f],327810)},94934,e=>{"use strict";var t=e.i(508893);let a=(0,t.createServerReference)("4013f3cd3a971be0d58fc4cf5ea14002bcc733ab0f",t.callServer,void 0,t.findSourceMapURL,"archiveFeature");e.s(["archiveFeature",()=>a])},2090,e=>{"use strict";var t=e.i(508893);let a=(0,t.createServerReference)("408b3a14223958b11118eff6abea3566ca905f99ee",t.callServer,void 0,t.findSourceMapURL,"unarchiveFeature");e.s(["unarchiveFeature",()=>a])},459666,e=>{"use strict";var t=e.i(508893);let a=(0,t.createServerReference)("7852c9212fd4068012c5c253b2d83efcec73bd3e39",t.callServer,void 0,t.findSourceMapURL,"deleteFeature");e.s(["deleteFeature",()=>a])}]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,141957,e=>{"use strict";var t=e.i(679606),r=e.i(152155),s=e.i(287620),a=r.forwardRef((e,r)=>(0,t.jsx)(s.Primitive.label,{...e,ref:r,onMouseDown:t=>{t.target.closest("button, input, select, textarea")||(e.onMouseDown?.(t),!t.defaultPrevented&&t.detail>1&&t.preventDefault())}}));a.displayName="Label",e.s(["Label",()=>a,"Root",()=>a],127572);var l=e.i(127572),l=l,i=e.i(294237),n=e.i(131777);let o=(0,i.cva)("text-sm leading-none font-medium peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),d=r.forwardRef(({className:e,...r},s)=>(0,t.jsx)(l.Root,{ref:s,className:(0,n.cn)(o(),e),...r}));d.displayName=l.Root.displayName,e.s(["Label",()=>d],141957)},81846,e=>{"use strict";var t=e.i(679606),r=e.i(294237),s=e.i(131777);let a=(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 l({className:e,variant:r,...l}){return(0,t.jsx)("div",{className:(0,s.cn)(a({variant:r}),e),...l})}e.s(["Badge",()=>l])},787342,e=>{"use strict";var t=e.i(152155),r=e.i(922528),s=e.i(205978),a=e.i(786874),l=e.i(679606);function i(e){let i=e+"CollectionProvider",[n,o]=(0,r.createContextScope)(i),[d,c]=n(i,{collectionRef:{current:null},itemMap:new Map}),u=e=>{let{scope:r,children:s}=e,a=t.default.useRef(null),i=t.default.useRef(new Map).current;return(0,l.jsx)(d,{scope:r,itemMap:i,collectionRef:a,children:s})};u.displayName=i;let f=e+"CollectionSlot",m=(0,a.createSlot)(f),p=t.default.forwardRef((e,t)=>{let{scope:r,children:a}=e,i=c(f,r),n=(0,s.useComposedRefs)(t,i.collectionRef);return(0,l.jsx)(m,{ref:n,children:a})});p.displayName=f;let h=e+"CollectionItemSlot",x="data-radix-collection-item",g=(0,a.createSlot)(h),y=t.default.forwardRef((e,r)=>{let{scope:a,children:i,...n}=e,o=t.default.useRef(null),d=(0,s.useComposedRefs)(r,o),u=c(h,a);return t.default.useEffect(()=>(u.itemMap.set(o,{ref:o,...n}),()=>void u.itemMap.delete(o))),(0,l.jsx)(g,{...{[x]:""},ref:d,children:i})});return y.displayName=h,[{Provider:u,Slot:p,ItemSlot:y},function(r){let s=c(e+"CollectionConsumer",r);return t.default.useCallback(()=>{let e=s.collectionRef.current;if(!e)return[];let t=Array.from(e.querySelectorAll(`[${x}]`));return Array.from(s.itemMap.values()).sort((e,r)=>t.indexOf(e.ref.current)-t.indexOf(r.ref.current))},[s.collectionRef,s.itemMap])},o]}var n=new WeakMap;function o(e,t){var r,s;let a,l,i;if("at"in Array.prototype)return Array.prototype.at.call(e,t);let n=(r=e,s=t,a=r.length,(i=(l=d(s))>=0?l:a+l)<0||i>=a?-1:i);return -1===n?void 0:e[n]}function d(e){return e!=e||0===e?0:Math.trunc(e)}(class e extends Map{#e;constructor(e){super(e),this.#e=[...super.keys()],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,r){let s,a=this.has(t),l=this.#e.length,i=d(e),n=i>=0?i:l+i,o=n<0||n>=l?-1:n;if(o===this.size||a&&o===this.size-1||-1===o)return this.set(t,r),this;let c=this.size+ +!a;i<0&&n++;let u=[...this.#e],f=!1;for(let e=n;e<c;e++)if(n===e){let l=u[e];u[e]===t&&(l=u[e+1]),a&&this.delete(t),s=this.get(l),this.set(t,r)}else{f||u[e-1]!==t||(f=!0);let r=u[f?e:e-1],a=s;s=this.get(r),this.delete(r),this.set(r,a)}return this}with(t,r,s){let a=new e(this);return a.insert(t,r,s),a}before(e){let t=this.#e.indexOf(e)-1;if(!(t<0))return this.entryAt(t)}setBefore(e,t,r){let s=this.#e.indexOf(e);return -1===s?this:this.insert(s,t,r)}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,r){let s=this.#e.indexOf(e);return -1===s?this:this.insert(s+1,t,r)}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 r=this.indexOf(e);if(-1===r)return;let s=r+t;return s<0&&(s=0),s>=this.size&&(s=this.size-1),this.at(s)}keyFrom(e,t){let r=this.indexOf(e);if(-1===r)return;let s=r+t;return s<0&&(s=0),s>=this.size&&(s=this.size-1),this.keyAt(s)}find(e,t){let r=0;for(let s of this){if(Reflect.apply(e,t,[s,r,this]))return s;r++}}findIndex(e,t){let r=0;for(let s of this){if(Reflect.apply(e,t,[s,r,this]))return r;r++}return -1}filter(t,r){let s=[],a=0;for(let e of this)Reflect.apply(t,r,[e,a,this])&&s.push(e),a++;return new e(s)}map(t,r){let s=[],a=0;for(let e of this)s.push([e[0],Reflect.apply(t,r,[e,a,this])]),a++;return new e(s)}reduce(...e){let[t,r]=e,s=0,a=r??this.at(0);for(let r of this)a=0===s&&1===e.length?r:Reflect.apply(t,this,[a,r,s,this]),s++;return a}reduceRight(...e){let[t,r]=e,s=r??this.at(-1);for(let r=this.size-1;r>=0;r--){let a=this.at(r);s=r===this.size-1&&1===e.length?a:Reflect.apply(t,this,[s,a,r,this])}return s}toSorted(t){return new e([...this.entries()].sort(t))}toReversed(){let t=new e;for(let e=this.size-1;e>=0;e--){let r=this.keyAt(e),s=this.get(r);t.set(r,s)}return t}toSpliced(...t){let r=[...this.entries()];return r.splice(...t),new e(r)}slice(t,r){let s=new e,a=this.size-1;if(void 0===t)return s;t<0&&(t+=this.size),void 0!==r&&r>0&&(a=r-1);for(let e=t;e<=a;e++){let t=this.keyAt(e),r=this.get(t);s.set(t,r)}return s}every(e,t){let r=0;for(let s of this){if(!Reflect.apply(e,t,[s,r,this]))return!1;r++}return!0}some(e,t){let r=0;for(let s of this){if(Reflect.apply(e,t,[s,r,this]))return!0;r++}return!1}}),e.s(["createCollection",()=>i])},151080,e=>{"use strict";var t=e.i(152155),r=e.i(291967),s=e.i(787342),a=e.i(205978),l=e.i(922528),i=e.i(713123),n=e.i(287620),o=e.i(929297),d=e.i(936589),c=e.i(566033),u=e.i(679606),f="rovingFocusGroup.onEntryFocus",m={bubbles:!1,cancelable:!0},p="RovingFocusGroup",[h,x,g]=(0,s.createCollection)(p),[y,v]=(0,l.createContextScope)(p,[g]),[b,j]=y(p),k=t.forwardRef((e,t)=>(0,u.jsx)(h.Provider,{scope:e.__scopeRovingFocusGroup,children:(0,u.jsx)(h.Slot,{scope:e.__scopeRovingFocusGroup,children:(0,u.jsx)(N,{...e,ref:t})})}));k.displayName=p;var N=t.forwardRef((e,s)=>{let{__scopeRovingFocusGroup:l,orientation:i,loop:h=!1,dir:g,currentTabStopId:y,defaultCurrentTabStopId:v,onCurrentTabStopIdChange:j,onEntryFocus:k,preventScrollOnEntryFocus:N=!1,...w}=e,C=t.useRef(null),S=(0,a.useComposedRefs)(s,C),D=(0,c.useDirection)(g),[T,A]=(0,d.useControllableState)({prop:y,defaultProp:v??null,onChange:j,caller:p}),[L,E]=t.useState(!1),F=(0,o.useCallbackRef)(k),I=x(l),M=t.useRef(!1),[P,z]=t.useState(0);return t.useEffect(()=>{let e=C.current;if(e)return e.addEventListener(f,F),()=>e.removeEventListener(f,F)},[F]),(0,u.jsx)(b,{scope:l,orientation:i,dir:D,loop:h,currentTabStopId:T,onItemFocus:t.useCallback(e=>A(e),[A]),onItemShiftTab:t.useCallback(()=>E(!0),[]),onFocusableItemAdd:t.useCallback(()=>z(e=>e+1),[]),onFocusableItemRemove:t.useCallback(()=>z(e=>e-1),[]),children:(0,u.jsx)(n.Primitive.div,{tabIndex:L||0===P?-1:0,"data-orientation":i,...w,ref:S,style:{outline:"none",...e.style},onMouseDown:(0,r.composeEventHandlers)(e.onMouseDown,()=>{M.current=!0}),onFocus:(0,r.composeEventHandlers)(e.onFocus,e=>{let t=!M.current;if(e.target===e.currentTarget&&t&&!L){let t=new CustomEvent(f,m);if(e.currentTarget.dispatchEvent(t),!t.defaultPrevented){let e=I().filter(e=>e.focusable);R([e.find(e=>e.active),e.find(e=>e.id===T),...e].filter(Boolean).map(e=>e.ref.current),N)}}M.current=!1}),onBlur:(0,r.composeEventHandlers)(e.onBlur,()=>E(!1))})})}),w="RovingFocusGroupItem",C=t.forwardRef((e,s)=>{let{__scopeRovingFocusGroup:a,focusable:l=!0,active:o=!1,tabStopId:d,children:c,...f}=e,m=(0,i.useId)(),p=d||m,g=j(w,a),y=g.currentTabStopId===p,v=x(a),{onFocusableItemAdd:b,onFocusableItemRemove:k,currentTabStopId:N}=g;return t.useEffect(()=>{if(l)return b(),()=>k()},[l,b,k]),(0,u.jsx)(h.ItemSlot,{scope:a,id:p,focusable:l,active:o,children:(0,u.jsx)(n.Primitive.span,{tabIndex:y?0:-1,"data-orientation":g.orientation,...f,ref:s,onMouseDown:(0,r.composeEventHandlers)(e.onMouseDown,e=>{l?g.onItemFocus(p):e.preventDefault()}),onFocus:(0,r.composeEventHandlers)(e.onFocus,()=>g.onItemFocus(p)),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,r){var s;let a=(s=e.key,"rtl"!==r?s:"ArrowLeft"===s?"ArrowRight":"ArrowRight"===s?"ArrowLeft":s);if(!("vertical"===t&&["ArrowLeft","ArrowRight"].includes(a))&&!("horizontal"===t&&["ArrowUp","ArrowDown"].includes(a)))return S[a]}(e,g.orientation,g.dir);if(void 0!==t){if(e.metaKey||e.ctrlKey||e.altKey||e.shiftKey)return;e.preventDefault();let a=v().filter(e=>e.focusable).map(e=>e.ref.current);if("last"===t)a.reverse();else if("prev"===t||"next"===t){var r,s;"prev"===t&&a.reverse();let l=a.indexOf(e.currentTarget);a=g.loop?(r=a,s=l+1,r.map((e,t)=>r[(s+t)%r.length])):a.slice(l+1)}setTimeout(()=>R(a))}}),children:"function"==typeof c?c({isCurrentTabStop:y,hasTabStop:null!=N}):c})})});C.displayName=w;var S={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function R(e,t=!1){let r=document.activeElement;for(let s of e)if(s===r||(s.focus({preventScroll:t}),document.activeElement!==r))return}e.s(["Item",()=>C,"Root",()=>k,"createRovingFocusGroupScope",()=>v])},468304,e=>{"use strict";var t=e.i(679606),r=e.i(152155),s=e.i(291967),a=e.i(922528),l=e.i(151080),i=e.i(685995),n=e.i(287620),o=e.i(566033),d=e.i(936589),c=e.i(713123),u="Tabs",[f,m]=(0,a.createContextScope)(u,[l.createRovingFocusGroupScope]),p=(0,l.createRovingFocusGroupScope)(),[h,x]=f(u),g=r.forwardRef((e,r)=>{let{__scopeTabs:s,value:a,onValueChange:l,defaultValue:i,orientation:f="horizontal",dir:m,activationMode:p="automatic",...x}=e,g=(0,o.useDirection)(m),[y,v]=(0,d.useControllableState)({prop:a,onChange:l,defaultProp:i??"",caller:u});return(0,t.jsx)(h,{scope:s,baseId:(0,c.useId)(),value:y,onValueChange:v,orientation:f,dir:g,activationMode:p,children:(0,t.jsx)(n.Primitive.div,{dir:g,"data-orientation":f,...x,ref:r})})});g.displayName=u;var y="TabsList",v=r.forwardRef((e,r)=>{let{__scopeTabs:s,loop:a=!0,...i}=e,o=x(y,s),d=p(s);return(0,t.jsx)(l.Root,{asChild:!0,...d,orientation:o.orientation,dir:o.dir,loop:a,children:(0,t.jsx)(n.Primitive.div,{role:"tablist","aria-orientation":o.orientation,...i,ref:r})})});v.displayName=y;var b="TabsTrigger",j=r.forwardRef((e,r)=>{let{__scopeTabs:a,value:i,disabled:o=!1,...d}=e,c=x(b,a),u=p(a),f=w(c.baseId,i),m=C(c.baseId,i),h=i===c.value;return(0,t.jsx)(l.Item,{asChild:!0,...u,focusable:!o,active:h,children:(0,t.jsx)(n.Primitive.button,{type:"button",role:"tab","aria-selected":h,"aria-controls":m,"data-state":h?"active":"inactive","data-disabled":o?"":void 0,disabled:o,id:f,...d,ref:r,onMouseDown:(0,s.composeEventHandlers)(e.onMouseDown,e=>{o||0!==e.button||!1!==e.ctrlKey?e.preventDefault():c.onValueChange(i)}),onKeyDown:(0,s.composeEventHandlers)(e.onKeyDown,e=>{[" ","Enter"].includes(e.key)&&c.onValueChange(i)}),onFocus:(0,s.composeEventHandlers)(e.onFocus,()=>{let e="manual"!==c.activationMode;h||o||!e||c.onValueChange(i)})})})});j.displayName=b;var k="TabsContent",N=r.forwardRef((e,s)=>{let{__scopeTabs:a,value:l,forceMount:o,children:d,...c}=e,u=x(k,a),f=w(u.baseId,l),m=C(u.baseId,l),p=l===u.value,h=r.useRef(p);return r.useEffect(()=>{let e=requestAnimationFrame(()=>h.current=!1);return()=>cancelAnimationFrame(e)},[]),(0,t.jsx)(i.Presence,{present:o||p,children:({present:r})=>(0,t.jsx)(n.Primitive.div,{"data-state":p?"active":"inactive","data-orientation":u.orientation,role:"tabpanel","aria-labelledby":f,hidden:!r,id:m,tabIndex:0,...c,ref:s,style:{...e.style,animationDuration:h.current?"0s":void 0},children:r&&d})})});function w(e,t){return`${e}-trigger-${t}`}function C(e,t){return`${e}-content-${t}`}N.displayName=k,e.s(["Content",()=>N,"List",()=>v,"Root",()=>g,"Tabs",()=>g,"TabsContent",()=>N,"TabsList",()=>v,"TabsTrigger",()=>j,"Trigger",()=>j,"createTabsScope",()=>m],743133);var S=e.i(743133),S=S,R=e.i(131777);let D=S.Root,T=r.forwardRef(({className:e,...r},s)=>(0,t.jsx)(S.List,{ref:s,className:(0,R.cn)("bg-muted text-muted-foreground inline-flex h-9 items-center justify-center rounded-lg p-1",e),...r}));T.displayName=S.List.displayName;let A=r.forwardRef(({className:e,...r},s)=>(0,t.jsx)(S.Trigger,{ref:s,className:(0,R.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),...r}));A.displayName=S.Trigger.displayName;let L=r.forwardRef(({className:e,...r},s)=>(0,t.jsx)(S.Content,{ref:s,className:(0,R.cn)("ring-offset-background focus-visible:ring-ring mt-2 focus-visible:ring-2 focus-visible:ring-offset-2 focus-visible:outline-none",e),...r}));L.displayName=S.Content.displayName,e.s(["Tabs",()=>D,"TabsContent",()=>L,"TabsList",()=>T,"TabsTrigger",()=>A],468304)},619933,e=>{"use strict";let t=(0,e.i(903645).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],619933)},602287,e=>{"use strict";var t=e.i(679606),r=e.i(152155),s=e.i(90033),a=e.i(860253),l=e.i(131777);let i=s.Dialog.Root,n=s.Dialog.Trigger,o=s.Dialog.Portal,d=s.Dialog.Close,c=r.forwardRef(({className:e,onClick:r,...a},i)=>(0,t.jsx)(s.Dialog.Overlay,{ref:i,className:(0,l.cn)("data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 fixed inset-0 z-50 bg-black/80 duration-150",e),onClick:e=>{e.stopPropagation(),r?.(e)},...a}));c.displayName=s.Dialog.Overlay.displayName;let u=r.forwardRef(({className:e,children:r,...i},n)=>(0,t.jsxs)(o,{children:[(0,t.jsx)(c,{}),(0,t.jsxs)(s.Dialog.Content,{ref:n,className:(0,l.cn)("bg-background data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 fixed top-[50%] left-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border p-6 shadow-lg duration-150 sm:rounded-lg",e),...i,children:[r,(0,t.jsxs)(s.Dialog.Close,{className:"ring-offset-background focus:ring-ring data-[state=open]:bg-accent data-[state=open]:text-muted-foreground absolute end-4 top-4 cursor-pointer rounded-sm opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2 focus:outline-none disabled:pointer-events-none",children:[(0,t.jsx)(a.X,{className:"h-4 w-4"}),(0,t.jsx)("span",{className:"sr-only",children:"Close"})]})]})]}));u.displayName=s.Dialog.Content.displayName;let f=({className:e,...r})=>(0,t.jsx)("div",{className:(0,l.cn)("flex flex-col space-y-1.5 text-center sm:text-start",e),...r});f.displayName="DialogHeader";let m=({className:e,...r})=>(0,t.jsx)("div",{className:(0,l.cn)("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...r});m.displayName="DialogFooter";let p=r.forwardRef(({className:e,...r},a)=>(0,t.jsx)(s.Dialog.Title,{ref:a,className:(0,l.cn)("text-lg leading-none font-semibold tracking-tight",e),...r}));p.displayName=s.Dialog.Title.displayName;let h=r.forwardRef(({className:e,...r},a)=>(0,t.jsx)(s.Dialog.Description,{ref:a,className:(0,l.cn)("text-muted-foreground text-sm",e),...r}));h.displayName=s.Dialog.Description.displayName,e.s(["Dialog",()=>i,"DialogClose",()=>d,"DialogContent",()=>u,"DialogDescription",()=>h,"DialogFooter",()=>m,"DialogHeader",()=>f,"DialogTitle",()=>p,"DialogTrigger",()=>n])},66459,e=>{"use strict";let t=(0,e.i(903645).default)("search",[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]]);e.s(["Search",()=>t],66459)},338573,e=>{"use strict";let t=(0,e.i(903645).default)("terminal",[["path",{d:"M12 19h8",key:"baeox8"}],["path",{d:"m4 17 6-6-6-6",key:"1yngyt"}]]);e.s(["Terminal",()=>t],338573)},730702,e=>{"use strict";let t=(0,e.i(903645).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],730702)},724042,e=>{"use strict";let t=(0,e.i(903645).default)("play",[["path",{d:"M5 5a2 2 0 0 1 3.008-1.728l11.997 6.998a2 2 0 0 1 .003 3.458l-12 7A2 2 0 0 1 5 19z",key:"10ikf1"}]]);e.s(["Play",()=>t],724042)},873504,399108,143620,481605,e=>{"use strict";var t=e.i(679606),r=e.i(152155),s=e.i(317406),a=e.i(508893);let l=(0,a.createServerReference)("40380eb0a867264153f92eb0befd51c6b57f60c9ce",a.callServer,void 0,a.findSourceMapURL,"deployFeature"),i=(0,a.createServerReference)("407b3082f8aa0308989b442f49820085256f25e5dc",a.callServer,void 0,a.findSourceMapURL,"deployRepository");e.s(["deployRepository",()=>i],399108);let n=(0,a.createServerReference)("40a9e7a9c3e1b77e7c9fa85b9f7d5a523b9d2f51c4",a.callServer,void 0,a.findSourceMapURL,"deployApplication"),o=(0,a.createServerReference)("4054d12a818d20b3295a47380239e047421be5e3db",a.callServer,void 0,a.findSourceMapURL,"stopDeployment");e.s(["stopDeployment",()=>o],143620);let d=(0,a.createServerReference)("40354d622fd4841e21d4e5394473f74e7fbffaabab",a.callServer,void 0,a.findSourceMapURL,"getDeploymentStatus");var c=e.i(118354);let u={status:null,url:null,targetType:null,hydrated:!1,deployLoading:!1,stopLoading:!1,deployError:null};class f{entries=new Map;listeners=new Map;globalListeners=new Set;fullyHydrated=!1;isFullyHydrated(){return this.fullyHydrated}hydrate(e){let t=new Set;for(let r of e)t.add(r.targetId),this.update(r.targetId,{status:r.state,url:r.url,targetType:r.targetType,hydrated:!0});for(let[e,r]of this.entries)!t.has(e)&&r.hydrated&&null!==r.status?this.update(e,{status:null,url:null}):t.has(e)||r.hydrated||this.update(e,{hydrated:!0});this.fullyHydrated=!0}getEntry(e){return this.entries.get(e)??u}update(e,t){let r={...this.entries.get(e)??u,...t};this.entries.set(e,r),this.notify(e)}setStatus(e,t){null===t?this.update(e,{status:null,url:null,hydrated:!0}):this.update(e,{status:t.state,url:t.url,hydrated:!0})}subscribe(e,t){let r=this.listeners.get(e);return r||(r=new Set,this.listeners.set(e,r)),r.add(t),()=>{r?.delete(t),r?.size===0&&this.listeners.delete(e)}}subscribeAll(e){return this.globalListeners.add(e),()=>{this.globalListeners.delete(e)}}notify(e){let t=this.listeners.get(e);if(t)for(let e of t)e();for(let e of this.globalListeners)e()}}e.s(["DeploymentStatusStore",()=>f,"EMPTY_ENTRY",0,u],481605);let m=(0,c.createLogger)("[DeploymentStatusProvider]"),p=new Set([s.DeploymentState.Booting,s.DeploymentState.Ready]),h=(0,r.createContext)(null);function x({initialDeployments:e,children:a}){let c=(0,r.useRef)(null);c.current||(c.current=new f,c.current.hydrate(e));let u=c.current;(0,r.useEffect)(()=>{u.hydrate(e)},[e,u]);let x=(0,r.useRef)(new Map),g=(0,r.useCallback)(e=>{let t=x.current.get(e);t&&(clearInterval(t),x.current.delete(e))},[]),y=(0,r.useCallback)(e=>{if(x.current.has(e))return;let t=setInterval(async()=>{let t;try{t=await d(e)}catch(t){m.warn(`poll failed for "${e}"`,t),u.setStatus(e,null),g(e);return}if(!t||t.state===s.DeploymentState.Stopped){u.setStatus(e,null),g(e);return}u.setStatus(e,t)},3e3);x.current.set(e,t)},[u,g]);(0,r.useEffect)(()=>{let e=x.current,t=u.subscribeAll(()=>{for(let[t]of e){let e=u.getEntry(t);e.status&&p.has(e.status)||g(t)}});return()=>{for(let[,r]of(t(),e))clearInterval(r);e.clear()}},[u,g]);let v=(0,r.useCallback)(e=>{if(e&&!u.getEntry(e).hydrated){if(u.isFullyHydrated())return void u.update(e,{hydrated:!0});u.update(e,{hydrated:!0}),(async()=>{try{let t=await d(e);u.setStatus(e,t),t&&p.has(t.state)&&y(e)}catch(t){m.warn(`ensureHydrated failed for "${e}"`,t)}})()}},[u,y]),b=(0,r.useCallback)(async e=>{u.update(e.targetId,{deployLoading:!0,deployError:null});try{let t="feature"===e.targetType?await l(e.targetId):"application"===e.targetType?await n(e.targetId):await i(e.repositoryPath);if(!t.success)return void u.update(e.targetId,{deployLoading:!1,deployError:t.error??"An unexpected error occurred"});u.update(e.targetId,{deployLoading:!1,status:t.state??null,url:null,hydrated:!0,targetType:e.targetType}),y(e.targetId)}catch(r){let t=r instanceof Error?r.message:"An unexpected error occurred";u.update(e.targetId,{deployLoading:!1,deployError:t})}},[u,y]),j=(0,r.useCallback)(async e=>{if(e){u.update(e,{stopLoading:!0});try{(await o(e)).success?(g(e),u.update(e,{stopLoading:!1,status:null,url:null})):u.update(e,{stopLoading:!1})}catch(t){m.warn("stop error (non-critical)",t),u.update(e,{stopLoading:!1})}}},[u,g]),k=(0,r.useMemo)(()=>({store:u,deploy:b,stop:j,ensureHydrated:v}),[u,b,j,v]);return(0,t.jsx)(h.Provider,{value:k,children:a})}function g(){let e=(0,r.useContext)(h);if(!e)throw Error("useDeploymentStatusContext must be used within a <DeploymentStatusProvider>");return e}function y(){let e=(0,r.useContext)(h);return e||v}let v={store:new f,deploy:async()=>{},stop:async()=>{},ensureHydrated:()=>{}};e.s(["DeploymentStatusProvider",()=>x,"useDeploymentStatusContext",()=>g,"useDeploymentStatusContextOptional",()=>y],873504)},8537,e=>{"use strict";var t=e.i(152155),r=e.i(873504);function s(){}function a(e){let{store:a,deploy:l,stop:i,ensureHydrated:n}=(0,r.useDeploymentStatusContextOptional)(),o=e?.targetId??"",d=(0,t.useCallback)(e=>o?a.subscribe(o,e):s,[a,o]),c=(0,t.useCallback)(()=>o?a.getEntry(o):a.getEntry(""),[a,o]),u=(0,t.useSyncExternalStore)(d,c,c);return(0,t.useEffect)(()=>{o&&n(o)},[o,n]),{deploy:(0,t.useCallback)(async()=>{e&&await l(e)},[l,e]),stop:(0,t.useCallback)(async()=>{o&&await i(o)},[i,o]),deployLoading:u.deployLoading,stopLoading:u.stopLoading,deployError:u.deployError,status:u.status,url:u.url}}e.s(["useDeployAction",()=>a])},1650,e=>{"use strict";e.i(511495),e.s([])},454793,207729,e=>{"use strict";var t=e.i(679606),r=e.i(131777);function s({icon:e,title:s,description:a,action:l,className:i,...n}){return(0,t.jsxs)("div",{className:(0,r.cn)("flex flex-col items-center gap-4 px-4 py-12 text-center",i),...n,children:[e?(0,t.jsx)("div",{className:"text-muted-foreground",children:e}):null,(0,t.jsx)("h3",{className:"text-lg font-semibold",children:s}),a?(0,t.jsx)("p",{className:"text-muted-foreground max-w-md text-sm",children:a}):null,l?(0,t.jsx)("div",{className:"mt-2",children:l}):null]})}e.s(["EmptyState",()=>s],207729),e.s([],454793)},809443,185871,e=>{"use strict";var t=e.i(679606),r=e.i(131777);function s({title:e,description:s,children:a,className:l}){return(0,t.jsxs)("header",{className:(0,r.cn)("flex items-center justify-between gap-4",l),children:[(0,t.jsxs)("div",{className:"space-y-1",children:[(0,t.jsx)("h1",{className:"text-2xl font-bold tracking-tight",children:e}),s?(0,t.jsx)("p",{className:"text-muted-foreground",children:s}):null]}),a?(0,t.jsx)("div",{"data-slot":"actions",children:a}):null]})}e.s(["PageHeader",()=>s],185871),e.s([],809443)},200956,e=>{"use strict";var t=e.i(679606),r=e.i(152155),s=e.i(131777);let a=r.forwardRef(({className:e,...r},a)=>(0,t.jsx)("div",{ref:a,className:(0,s.cn)("bg-card text-card-foreground rounded-xl border shadow",e),...r}));a.displayName="Card";let l=r.forwardRef(({className:e,...r},a)=>(0,t.jsx)("div",{ref:a,className:(0,s.cn)("flex flex-col space-y-1.5 p-6",e),...r}));l.displayName="CardHeader";let i=r.forwardRef(({className:e,...r},a)=>(0,t.jsx)("div",{ref:a,className:(0,s.cn)("leading-none font-semibold tracking-tight",e),...r}));i.displayName="CardTitle";let n=r.forwardRef(({className:e,...r},a)=>(0,t.jsx)("div",{ref:a,className:(0,s.cn)("text-muted-foreground text-sm",e),...r}));n.displayName="CardDescription";let o=r.forwardRef(({className:e,...r},a)=>(0,t.jsx)("div",{ref:a,className:(0,s.cn)("p-6 pt-0",e),...r}));o.displayName="CardContent",r.forwardRef(({className:e,...r},a)=>(0,t.jsx)("div",{ref:a,className:(0,s.cn)("flex items-center p-6 pt-0",e),...r})).displayName="CardFooter",e.s(["Card",()=>a,"CardContent",()=>o,"CardDescription",()=>n,"CardHeader",()=>l,"CardTitle",()=>i])},638752,e=>{"use strict";var t=e.i(679606);e.i(1650);var r=e.i(511495),s=e.i(845811),a=e.i(81846),l=e.i(425235),i=e.i(619933);function n({skill:e,onClose:n}){return(0,t.jsx)(r.BaseDrawer,{open:null!==e,onClose:n,size:"sm",modal:!0,"data-testid":"skill-detail-drawer",header:e?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(s.DrawerTitle,{children:e.displayName}),(0,t.jsx)(s.DrawerDescription,{children:e.name})]}):void 0,children:e?(0,t.jsxs)("div",{className:"px-4 pb-4",children:[(0,t.jsx)("p",{className:"text-muted-foreground text-sm",children:e.description}),(0,t.jsxs)("div",{className:"mt-4 flex flex-wrap items-center gap-1.5",children:[(0,t.jsx)(a.Badge,{variant:"project"===e.source?"secondary":"outline",children:"project"===e.source?"Project":"Global"}),(0,t.jsx)(a.Badge,{variant:"outline",children:e.category}),e.context?(0,t.jsx)(a.Badge,{variant:"outline",children:e.context}):null]}),e.allowedTools?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(l.Separator,{className:"my-4"}),(0,t.jsxs)("div",{children:[(0,t.jsx)("h3",{className:"text-sm font-semibold",children:"Allowed Tools"}),(0,t.jsx)("p",{className:"text-muted-foreground mt-1 text-sm",children:e.allowedTools})]})]}):null,e.resources.length>0?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(l.Separator,{className:"my-4"}),(0,t.jsxs)("div",{children:[(0,t.jsx)("h3",{className:"text-sm font-semibold",children:"Resources"}),(0,t.jsx)("ul",{className:"mt-2 space-y-1.5",children:e.resources.map(e=>(0,t.jsxs)("li",{className:"text-muted-foreground flex items-center gap-2 text-sm",children:[(0,t.jsx)(i.FolderOpen,{className:"size-3.5 shrink-0"}),(0,t.jsxs)("span",{children:[e.name,"/ — ",e.fileCount," ",1===e.fileCount?"file":"files"]})]},e.name))})]})]}):null,e.body?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(l.Separator,{className:"my-4"}),(0,t.jsx)("pre",{className:"text-muted-foreground text-sm leading-relaxed whitespace-pre-wrap",children:e.body})]}):null]}):null})}e.s(["SkillDetailDrawer",()=>n])},316919,e=>{"use strict";var t=e.i(679606),r=e.i(152155),s=e.i(66459),a=e.i(912103),l=e.i(698127),i=e.i(735364);e.i(809443);var n=e.i(185871);e.i(454793);var o=e.i(207729),d=e.i(200956),c=e.i(81846),u=e.i(619933);function f({skill:e,onSelect:r}){return(0,t.jsxs)(d.Card,{className:"hover:border-primary/50 cursor-pointer transition-colors",role:"button",tabIndex:0,onClick:()=>r(e),onKeyDown:t=>{("Enter"===t.key||" "===t.key)&&(t.preventDefault(),r(e))},"data-testid":`skill-card-${e.name}`,children:[(0,t.jsxs)(d.CardHeader,{className:"pb-3",children:[(0,t.jsx)(d.CardTitle,{className:"text-base",children:e.displayName}),(0,t.jsx)("p",{className:"text-muted-foreground font-mono text-xs",children:e.name})]}),(0,t.jsxs)(d.CardContent,{className:"space-y-3",children:[(0,t.jsx)("p",{className:"text-muted-foreground line-clamp-2 text-sm",children:e.description}),(0,t.jsxs)("div",{className:"flex flex-wrap items-center gap-1.5",children:[(0,t.jsx)(c.Badge,{variant:"project"===e.source?"secondary":"outline",children:"project"===e.source?"Project":"Global"}),e.context?(0,t.jsx)(c.Badge,{variant:"outline",children:e.context}):null,e.allowedTools?(0,t.jsx)(c.Badge,{variant:"outline",children:"Tools"}):null,e.resources.length>0?(0,t.jsxs)("span",{className:"text-muted-foreground inline-flex items-center gap-1 text-xs",children:[(0,t.jsx)(u.FolderOpen,{className:"size-3"}),e.resources.length," ",1===e.resources.length?"resource":"resources"]}):null]})]})]})}let m=["Workflow","Code Generation","Analysis","Reference"];function p({skills:e,onSkillSelect:r}){let s=function(e){let t=new Map;for(let r of e){let e=t.get(r.category)??[];e.push(r),t.set(r.category,e)}return t}(e);return(0,t.jsx)("div",{className:"space-y-8",children:m.map(e=>{let a=s.get(e);return a&&0!==a.length?(0,t.jsxs)("section",{children:[(0,t.jsxs)("h2",{className:"mb-4 text-lg font-semibold",children:[e," ",(0,t.jsxs)("span",{className:"text-muted-foreground text-sm font-normal",children:["(",a.length,")"]})]}),(0,t.jsx)("div",{className:"grid grid-cols-1 gap-4 md:grid-cols-2 lg:grid-cols-3",children:a.map(e=>(0,t.jsx)(f,{skill:e,onSelect:r},e.name))})]},e):null})})}let h=[{label:"All",value:null},{label:"Workflow",value:"Workflow"},{label:"Code Generation",value:"Code Generation"},{label:"Analysis",value:"Analysis"},{label:"Reference",value:"Reference"}];function x({activeCategory:e,onCategoryChange:r,counts:s}){return(0,t.jsx)("div",{className:"flex flex-wrap gap-2",role:"group","aria-label":"Filter by category",children:h.map(({label:a,value:l})=>(0,t.jsxs)(i.Button,{variant:e===l?"default":"outline",size:"sm",onClick:()=>r(l),children:[a,s&&l?(0,t.jsxs)("span",{className:"ms-1 text-xs opacity-70",children:["(",s[l],")"]}):null]},a))})}var g=e.i(638752),y=e.i(425235),v=e.i(711434),b=e.i(3214),j=e.i(860253),k=e.i(360112),N=e.i(508893);let w=(0,N.createServerReference)("40b7e42dced0c506098ce80d6dd69b9d518ddd233d",N.callServer,void 0,N.findSourceMapURL,"removeInjectedSkill");var C=e.i(602287),S=e.i(141957),R=e.i(468304);let D=(0,N.createServerReference)("4014482fd7351535c4d97816542861a3f91fae1bcf",N.callServer,void 0,N.findSourceMapURL,"addInjectedSkill");function T({open:e,onOpenChange:s,onAdded:a,discoveredSkills:n,existingSkillNames:o}){let[d,c]=(0,r.useState)(!1),[u,f]=(0,r.useState)(""),[m,p]=(0,r.useState)(""),[h,x]=(0,r.useState)(""),g=n.filter(e=>!o.includes(e.name)),y=async e=>{c(!0);let t=await D({name:e.name,type:"local",source:`.claude/skills/${e.name}`});(c(!1),t.success)?(k.toast.success(`Added "${e.name}" to feature skills`),a()):k.toast.error(t.error??"Failed to add skill")},v=async()=>{if(!u.trim()||!m.trim())return void k.toast.error("Name and source are required");c(!0);let e=await D({name:u.trim(),type:"remote",source:m.trim(),...h.trim()&&{remoteSkillName:h.trim()}});(c(!1),e.success)?(k.toast.success(`Added "${u.trim()}" to feature skills`),f(""),p(""),x(""),a()):k.toast.error(e.error??"Failed to add skill")};return(0,t.jsx)(C.Dialog,{open:e,onOpenChange:s,children:(0,t.jsxs)(C.DialogContent,{className:"sm:max-w-md","data-testid":"add-skill-dialog",children:[(0,t.jsx)(C.DialogHeader,{children:(0,t.jsx)(C.DialogTitle,{children:"Add Skill to Features"})}),(0,t.jsxs)(R.Tabs,{defaultValue:"local",children:[(0,t.jsxs)(R.TabsList,{className:"w-full",children:[(0,t.jsx)(R.TabsTrigger,{value:"local",className:"flex-1",children:"Local"}),(0,t.jsx)(R.TabsTrigger,{value:"remote",className:"flex-1",children:"Remote"})]}),(0,t.jsx)(R.TabsContent,{value:"local",className:"mt-4",children:0===g.length?(0,t.jsx)("p",{className:"text-muted-foreground text-sm",children:"All discovered skills are already configured."}):(0,t.jsx)("div",{className:"flex max-h-60 flex-col gap-2 overflow-y-auto",children:g.map(e=>(0,t.jsxs)("button",{type:"button",className:"hover:bg-accent flex flex-col gap-0.5 rounded-md border p-3 text-left transition-colors",onClick:()=>y(e),disabled:d,"data-testid":`add-local-skill-${e.name}`,children:[(0,t.jsx)("span",{className:"text-sm font-medium",children:e.displayName}),(0,t.jsx)("span",{className:"text-muted-foreground line-clamp-1 text-xs",children:e.description})]},e.name))})}),(0,t.jsx)(R.TabsContent,{value:"remote",className:"mt-4",children:(0,t.jsxs)("div",{className:"flex flex-col gap-3",children:[(0,t.jsxs)("div",{className:"flex flex-col gap-1.5",children:[(0,t.jsx)(S.Label,{htmlFor:"remote-name",children:"Name"}),(0,t.jsx)(l.Input,{id:"remote-name",placeholder:"e.g. remotion-best-practices",value:u,onChange:e=>f(e.target.value),"data-testid":"remote-skill-name"})]}),(0,t.jsxs)("div",{className:"flex flex-col gap-1.5",children:[(0,t.jsx)(S.Label,{htmlFor:"remote-source",children:"Source (npm package or URL)"}),(0,t.jsx)(l.Input,{id:"remote-source",placeholder:"e.g. @anthropic/remotion-skills",value:m,onChange:e=>p(e.target.value),"data-testid":"remote-skill-source"})]}),(0,t.jsxs)("div",{className:"flex flex-col gap-1.5",children:[(0,t.jsx)(S.Label,{htmlFor:"remote-skill-name",children:"Skill Name (optional)"}),(0,t.jsx)(l.Input,{id:"remote-skill-name",placeholder:"e.g. remotion-best-practices",value:h,onChange:e=>x(e.target.value),"data-testid":"remote-skill-skill-name"})]}),(0,t.jsx)(C.DialogFooter,{children:(0,t.jsx)(i.Button,{onClick:v,disabled:d||!u.trim()||!m.trim(),"data-testid":"add-remote-skill-submit",children:"Add Remote Skill"})})]})})]})]})})}function A({config:e,discoveredSkills:s}){let a=(0,v.useRouter)(),[l,n]=(0,r.useState)(!1),[o,d]=(0,r.useState)(null),c=(0,r.useMemo)(()=>{let e=new Map;for(let t of s)e.set(t.name,t.description);return e},[s]),u=async e=>{d(e);let t=await w(e);(d(null),t.success)?(k.toast.success(`Removed "${e}" from feature skills`),a.refresh()):k.toast.error(t.error??"Failed to remove skill")};return(0,t.jsxs)("div",{className:"flex flex-col gap-3",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)("h2",{className:"text-base font-semibold",children:"Feature Skills"}),(0,t.jsx)("p",{className:"text-muted-foreground text-sm",children:"Curated skills included in new feature worktrees to guide the agent"})]}),e.skills.length>0?(0,t.jsx)("div",{className:"grid gap-2 sm:grid-cols-2 lg:grid-cols-3",children:e.skills.map(e=>(0,t.jsx)(L,{skill:e,description:c.get(e.name),onRemove:()=>u(e.name),isRemoving:o===e.name},e.name))}):(0,t.jsx)("p",{className:"text-muted-foreground text-sm",children:"No skills configured. Add skills to guide the agent when working on new features."}),(0,t.jsx)("div",{children:(0,t.jsxs)(i.Button,{variant:"outline",size:"sm",onClick:()=>n(!0),"data-testid":"add-injected-skill-button",children:[(0,t.jsx)(b.Plus,{className:"mr-1.5 size-4"}),"Add Skill"]})}),(0,t.jsx)(T,{open:l,onOpenChange:n,onAdded:()=>{n(!1),a.refresh()},discoveredSkills:s,existingSkillNames:e.skills.map(e=>e.name)})]})}function L({skill:e,description:r,onRemove:s,isRemoving:a}){return(0,t.jsxs)(d.Card,{"data-testid":`injected-skill-${e.name}`,children:[(0,t.jsxs)(d.CardHeader,{className:"flex flex-row items-start justify-between gap-2 pb-2",children:[(0,t.jsx)("div",{className:"min-w-0",children:(0,t.jsx)(d.CardTitle,{className:"truncate text-sm",children:e.name})}),(0,t.jsx)(i.Button,{variant:"ghost",size:"icon-sm",className:"shrink-0",onClick:s,disabled:a,"aria-label":`Remove ${e.name}`,"data-testid":`remove-injected-skill-${e.name}`,children:(0,t.jsx)(j.X,{className:"size-4"})})]}),(0,t.jsxs)(d.CardContent,{className:"space-y-2 pt-0",children:[r?(0,t.jsx)("p",{className:"text-muted-foreground line-clamp-2 text-xs",children:r}):null,(0,t.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,t.jsx)(c.Badge,{variant:"local"===e.type?"secondary":"outline",className:"text-xs",children:"local"===e.type?"Local":"Remote"}),(0,t.jsx)("span",{className:"text-muted-foreground max-w-37.5 truncate text-xs",children:e.source})]})]})]})}function E({skills:e,injectionConfig:d}){let[c,u]=(0,r.useState)(""),[f,m]=(0,r.useState)(null),[h,v]=(0,r.useState)(null),b=(0,r.useMemo)(()=>(function(e){let t={Workflow:0,"Code Generation":0,Analysis:0,Reference:0};for(let r of e)t[r.category]++;return t})(e),[e]),j=(0,r.useMemo)(()=>{let t=c.toLowerCase();return e.filter(e=>{if(f&&e.category!==f)return!1;if(t){let r=e.name.toLowerCase().includes(t),s=e.description.toLowerCase().includes(t);if(!r&&!s)return!1}return!0})},[e,c,f]);return 0===e.length?(0,t.jsxs)("div",{className:"flex flex-col gap-6 p-6",children:[(0,t.jsx)(n.PageHeader,{title:"Skills",description:"Claude Code skills available to this project"}),(0,t.jsx)(A,{config:d,discoveredSkills:e}),(0,t.jsx)(y.Separator,{}),(0,t.jsx)(o.EmptyState,{icon:(0,t.jsx)(a.Puzzle,{className:"size-10"}),title:"No skills found",description:"No Claude Code skills are installed. Add skills to .claude/skills/ to get started."})]}):(0,t.jsxs)("div",{className:"flex flex-col gap-6 p-6",children:[(0,t.jsx)(n.PageHeader,{title:"Skills",description:"Claude Code skills available to this project"}),(0,t.jsx)(A,{config:d,discoveredSkills:e}),(0,t.jsx)(y.Separator,{}),(0,t.jsxs)("div",{className:"relative",children:[(0,t.jsx)(s.Search,{className:"text-muted-foreground absolute top-1/2 left-3 size-4 -translate-y-1/2"}),(0,t.jsx)(l.Input,{placeholder:"Search skills...",value:c,onChange:e=>u(e.target.value),className:"ps-9"})]}),(0,t.jsx)(x,{activeCategory:f,onCategoryChange:m,counts:b}),j.length>0?(0,t.jsx)(p,{skills:j,onSkillSelect:v}):(0,t.jsx)(o.EmptyState,{icon:(0,t.jsx)(s.Search,{className:"size-10"}),title:"No matching skills",description:"No skills match your current search and filter criteria.",action:(0,t.jsx)(i.Button,{variant:"outline",onClick:()=>{u(""),m(null)},children:"Clear filters"})}),(0,t.jsx)(g.SkillDetailDrawer,{skill:h,onClose:()=>v(null)})]})}e.s(["SkillsPageClient",()=>E],316919)}]);
|
|
1
|
+
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,141957,e=>{"use strict";var t=e.i(679606),r=e.i(152155),s=e.i(287620),a=r.forwardRef((e,r)=>(0,t.jsx)(s.Primitive.label,{...e,ref:r,onMouseDown:t=>{t.target.closest("button, input, select, textarea")||(e.onMouseDown?.(t),!t.defaultPrevented&&t.detail>1&&t.preventDefault())}}));a.displayName="Label",e.s(["Label",()=>a,"Root",()=>a],127572);var l=e.i(127572),l=l,i=e.i(294237),n=e.i(131777);let o=(0,i.cva)("text-sm leading-none font-medium peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),d=r.forwardRef(({className:e,...r},s)=>(0,t.jsx)(l.Root,{ref:s,className:(0,n.cn)(o(),e),...r}));d.displayName=l.Root.displayName,e.s(["Label",()=>d],141957)},81846,e=>{"use strict";var t=e.i(679606),r=e.i(294237),s=e.i(131777);let a=(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 l({className:e,variant:r,...l}){return(0,t.jsx)("div",{className:(0,s.cn)(a({variant:r}),e),...l})}e.s(["Badge",()=>l])},787342,e=>{"use strict";var t=e.i(152155),r=e.i(922528),s=e.i(205978),a=e.i(786874),l=e.i(679606);function i(e){let i=e+"CollectionProvider",[n,o]=(0,r.createContextScope)(i),[d,c]=n(i,{collectionRef:{current:null},itemMap:new Map}),u=e=>{let{scope:r,children:s}=e,a=t.default.useRef(null),i=t.default.useRef(new Map).current;return(0,l.jsx)(d,{scope:r,itemMap:i,collectionRef:a,children:s})};u.displayName=i;let f=e+"CollectionSlot",m=(0,a.createSlot)(f),p=t.default.forwardRef((e,t)=>{let{scope:r,children:a}=e,i=c(f,r),n=(0,s.useComposedRefs)(t,i.collectionRef);return(0,l.jsx)(m,{ref:n,children:a})});p.displayName=f;let h=e+"CollectionItemSlot",x="data-radix-collection-item",g=(0,a.createSlot)(h),y=t.default.forwardRef((e,r)=>{let{scope:a,children:i,...n}=e,o=t.default.useRef(null),d=(0,s.useComposedRefs)(r,o),u=c(h,a);return t.default.useEffect(()=>(u.itemMap.set(o,{ref:o,...n}),()=>void u.itemMap.delete(o))),(0,l.jsx)(g,{...{[x]:""},ref:d,children:i})});return y.displayName=h,[{Provider:u,Slot:p,ItemSlot:y},function(r){let s=c(e+"CollectionConsumer",r);return t.default.useCallback(()=>{let e=s.collectionRef.current;if(!e)return[];let t=Array.from(e.querySelectorAll(`[${x}]`));return Array.from(s.itemMap.values()).sort((e,r)=>t.indexOf(e.ref.current)-t.indexOf(r.ref.current))},[s.collectionRef,s.itemMap])},o]}var n=new WeakMap;function o(e,t){var r,s;let a,l,i;if("at"in Array.prototype)return Array.prototype.at.call(e,t);let n=(r=e,s=t,a=r.length,(i=(l=d(s))>=0?l:a+l)<0||i>=a?-1:i);return -1===n?void 0:e[n]}function d(e){return e!=e||0===e?0:Math.trunc(e)}(class e extends Map{#e;constructor(e){super(e),this.#e=[...super.keys()],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,r){let s,a=this.has(t),l=this.#e.length,i=d(e),n=i>=0?i:l+i,o=n<0||n>=l?-1:n;if(o===this.size||a&&o===this.size-1||-1===o)return this.set(t,r),this;let c=this.size+ +!a;i<0&&n++;let u=[...this.#e],f=!1;for(let e=n;e<c;e++)if(n===e){let l=u[e];u[e]===t&&(l=u[e+1]),a&&this.delete(t),s=this.get(l),this.set(t,r)}else{f||u[e-1]!==t||(f=!0);let r=u[f?e:e-1],a=s;s=this.get(r),this.delete(r),this.set(r,a)}return this}with(t,r,s){let a=new e(this);return a.insert(t,r,s),a}before(e){let t=this.#e.indexOf(e)-1;if(!(t<0))return this.entryAt(t)}setBefore(e,t,r){let s=this.#e.indexOf(e);return -1===s?this:this.insert(s,t,r)}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,r){let s=this.#e.indexOf(e);return -1===s?this:this.insert(s+1,t,r)}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 r=this.indexOf(e);if(-1===r)return;let s=r+t;return s<0&&(s=0),s>=this.size&&(s=this.size-1),this.at(s)}keyFrom(e,t){let r=this.indexOf(e);if(-1===r)return;let s=r+t;return s<0&&(s=0),s>=this.size&&(s=this.size-1),this.keyAt(s)}find(e,t){let r=0;for(let s of this){if(Reflect.apply(e,t,[s,r,this]))return s;r++}}findIndex(e,t){let r=0;for(let s of this){if(Reflect.apply(e,t,[s,r,this]))return r;r++}return -1}filter(t,r){let s=[],a=0;for(let e of this)Reflect.apply(t,r,[e,a,this])&&s.push(e),a++;return new e(s)}map(t,r){let s=[],a=0;for(let e of this)s.push([e[0],Reflect.apply(t,r,[e,a,this])]),a++;return new e(s)}reduce(...e){let[t,r]=e,s=0,a=r??this.at(0);for(let r of this)a=0===s&&1===e.length?r:Reflect.apply(t,this,[a,r,s,this]),s++;return a}reduceRight(...e){let[t,r]=e,s=r??this.at(-1);for(let r=this.size-1;r>=0;r--){let a=this.at(r);s=r===this.size-1&&1===e.length?a:Reflect.apply(t,this,[s,a,r,this])}return s}toSorted(t){return new e([...this.entries()].sort(t))}toReversed(){let t=new e;for(let e=this.size-1;e>=0;e--){let r=this.keyAt(e),s=this.get(r);t.set(r,s)}return t}toSpliced(...t){let r=[...this.entries()];return r.splice(...t),new e(r)}slice(t,r){let s=new e,a=this.size-1;if(void 0===t)return s;t<0&&(t+=this.size),void 0!==r&&r>0&&(a=r-1);for(let e=t;e<=a;e++){let t=this.keyAt(e),r=this.get(t);s.set(t,r)}return s}every(e,t){let r=0;for(let s of this){if(!Reflect.apply(e,t,[s,r,this]))return!1;r++}return!0}some(e,t){let r=0;for(let s of this){if(Reflect.apply(e,t,[s,r,this]))return!0;r++}return!1}}),e.s(["createCollection",()=>i])},151080,e=>{"use strict";var t=e.i(152155),r=e.i(291967),s=e.i(787342),a=e.i(205978),l=e.i(922528),i=e.i(713123),n=e.i(287620),o=e.i(929297),d=e.i(936589),c=e.i(566033),u=e.i(679606),f="rovingFocusGroup.onEntryFocus",m={bubbles:!1,cancelable:!0},p="RovingFocusGroup",[h,x,g]=(0,s.createCollection)(p),[y,v]=(0,l.createContextScope)(p,[g]),[b,j]=y(p),k=t.forwardRef((e,t)=>(0,u.jsx)(h.Provider,{scope:e.__scopeRovingFocusGroup,children:(0,u.jsx)(h.Slot,{scope:e.__scopeRovingFocusGroup,children:(0,u.jsx)(N,{...e,ref:t})})}));k.displayName=p;var N=t.forwardRef((e,s)=>{let{__scopeRovingFocusGroup:l,orientation:i,loop:h=!1,dir:g,currentTabStopId:y,defaultCurrentTabStopId:v,onCurrentTabStopIdChange:j,onEntryFocus:k,preventScrollOnEntryFocus:N=!1,...w}=e,C=t.useRef(null),S=(0,a.useComposedRefs)(s,C),D=(0,c.useDirection)(g),[T,A]=(0,d.useControllableState)({prop:y,defaultProp:v??null,onChange:j,caller:p}),[L,E]=t.useState(!1),F=(0,o.useCallbackRef)(k),I=x(l),M=t.useRef(!1),[P,z]=t.useState(0);return t.useEffect(()=>{let e=C.current;if(e)return e.addEventListener(f,F),()=>e.removeEventListener(f,F)},[F]),(0,u.jsx)(b,{scope:l,orientation:i,dir:D,loop:h,currentTabStopId:T,onItemFocus:t.useCallback(e=>A(e),[A]),onItemShiftTab:t.useCallback(()=>E(!0),[]),onFocusableItemAdd:t.useCallback(()=>z(e=>e+1),[]),onFocusableItemRemove:t.useCallback(()=>z(e=>e-1),[]),children:(0,u.jsx)(n.Primitive.div,{tabIndex:L||0===P?-1:0,"data-orientation":i,...w,ref:S,style:{outline:"none",...e.style},onMouseDown:(0,r.composeEventHandlers)(e.onMouseDown,()=>{M.current=!0}),onFocus:(0,r.composeEventHandlers)(e.onFocus,e=>{let t=!M.current;if(e.target===e.currentTarget&&t&&!L){let t=new CustomEvent(f,m);if(e.currentTarget.dispatchEvent(t),!t.defaultPrevented){let e=I().filter(e=>e.focusable);R([e.find(e=>e.active),e.find(e=>e.id===T),...e].filter(Boolean).map(e=>e.ref.current),N)}}M.current=!1}),onBlur:(0,r.composeEventHandlers)(e.onBlur,()=>E(!1))})})}),w="RovingFocusGroupItem",C=t.forwardRef((e,s)=>{let{__scopeRovingFocusGroup:a,focusable:l=!0,active:o=!1,tabStopId:d,children:c,...f}=e,m=(0,i.useId)(),p=d||m,g=j(w,a),y=g.currentTabStopId===p,v=x(a),{onFocusableItemAdd:b,onFocusableItemRemove:k,currentTabStopId:N}=g;return t.useEffect(()=>{if(l)return b(),()=>k()},[l,b,k]),(0,u.jsx)(h.ItemSlot,{scope:a,id:p,focusable:l,active:o,children:(0,u.jsx)(n.Primitive.span,{tabIndex:y?0:-1,"data-orientation":g.orientation,...f,ref:s,onMouseDown:(0,r.composeEventHandlers)(e.onMouseDown,e=>{l?g.onItemFocus(p):e.preventDefault()}),onFocus:(0,r.composeEventHandlers)(e.onFocus,()=>g.onItemFocus(p)),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,r){var s;let a=(s=e.key,"rtl"!==r?s:"ArrowLeft"===s?"ArrowRight":"ArrowRight"===s?"ArrowLeft":s);if(!("vertical"===t&&["ArrowLeft","ArrowRight"].includes(a))&&!("horizontal"===t&&["ArrowUp","ArrowDown"].includes(a)))return S[a]}(e,g.orientation,g.dir);if(void 0!==t){if(e.metaKey||e.ctrlKey||e.altKey||e.shiftKey)return;e.preventDefault();let a=v().filter(e=>e.focusable).map(e=>e.ref.current);if("last"===t)a.reverse();else if("prev"===t||"next"===t){var r,s;"prev"===t&&a.reverse();let l=a.indexOf(e.currentTarget);a=g.loop?(r=a,s=l+1,r.map((e,t)=>r[(s+t)%r.length])):a.slice(l+1)}setTimeout(()=>R(a))}}),children:"function"==typeof c?c({isCurrentTabStop:y,hasTabStop:null!=N}):c})})});C.displayName=w;var S={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function R(e,t=!1){let r=document.activeElement;for(let s of e)if(s===r||(s.focus({preventScroll:t}),document.activeElement!==r))return}e.s(["Item",()=>C,"Root",()=>k,"createRovingFocusGroupScope",()=>v])},468304,e=>{"use strict";var t=e.i(679606),r=e.i(152155),s=e.i(291967),a=e.i(922528),l=e.i(151080),i=e.i(685995),n=e.i(287620),o=e.i(566033),d=e.i(936589),c=e.i(713123),u="Tabs",[f,m]=(0,a.createContextScope)(u,[l.createRovingFocusGroupScope]),p=(0,l.createRovingFocusGroupScope)(),[h,x]=f(u),g=r.forwardRef((e,r)=>{let{__scopeTabs:s,value:a,onValueChange:l,defaultValue:i,orientation:f="horizontal",dir:m,activationMode:p="automatic",...x}=e,g=(0,o.useDirection)(m),[y,v]=(0,d.useControllableState)({prop:a,onChange:l,defaultProp:i??"",caller:u});return(0,t.jsx)(h,{scope:s,baseId:(0,c.useId)(),value:y,onValueChange:v,orientation:f,dir:g,activationMode:p,children:(0,t.jsx)(n.Primitive.div,{dir:g,"data-orientation":f,...x,ref:r})})});g.displayName=u;var y="TabsList",v=r.forwardRef((e,r)=>{let{__scopeTabs:s,loop:a=!0,...i}=e,o=x(y,s),d=p(s);return(0,t.jsx)(l.Root,{asChild:!0,...d,orientation:o.orientation,dir:o.dir,loop:a,children:(0,t.jsx)(n.Primitive.div,{role:"tablist","aria-orientation":o.orientation,...i,ref:r})})});v.displayName=y;var b="TabsTrigger",j=r.forwardRef((e,r)=>{let{__scopeTabs:a,value:i,disabled:o=!1,...d}=e,c=x(b,a),u=p(a),f=w(c.baseId,i),m=C(c.baseId,i),h=i===c.value;return(0,t.jsx)(l.Item,{asChild:!0,...u,focusable:!o,active:h,children:(0,t.jsx)(n.Primitive.button,{type:"button",role:"tab","aria-selected":h,"aria-controls":m,"data-state":h?"active":"inactive","data-disabled":o?"":void 0,disabled:o,id:f,...d,ref:r,onMouseDown:(0,s.composeEventHandlers)(e.onMouseDown,e=>{o||0!==e.button||!1!==e.ctrlKey?e.preventDefault():c.onValueChange(i)}),onKeyDown:(0,s.composeEventHandlers)(e.onKeyDown,e=>{[" ","Enter"].includes(e.key)&&c.onValueChange(i)}),onFocus:(0,s.composeEventHandlers)(e.onFocus,()=>{let e="manual"!==c.activationMode;h||o||!e||c.onValueChange(i)})})})});j.displayName=b;var k="TabsContent",N=r.forwardRef((e,s)=>{let{__scopeTabs:a,value:l,forceMount:o,children:d,...c}=e,u=x(k,a),f=w(u.baseId,l),m=C(u.baseId,l),p=l===u.value,h=r.useRef(p);return r.useEffect(()=>{let e=requestAnimationFrame(()=>h.current=!1);return()=>cancelAnimationFrame(e)},[]),(0,t.jsx)(i.Presence,{present:o||p,children:({present:r})=>(0,t.jsx)(n.Primitive.div,{"data-state":p?"active":"inactive","data-orientation":u.orientation,role:"tabpanel","aria-labelledby":f,hidden:!r,id:m,tabIndex:0,...c,ref:s,style:{...e.style,animationDuration:h.current?"0s":void 0},children:r&&d})})});function w(e,t){return`${e}-trigger-${t}`}function C(e,t){return`${e}-content-${t}`}N.displayName=k,e.s(["Content",()=>N,"List",()=>v,"Root",()=>g,"Tabs",()=>g,"TabsContent",()=>N,"TabsList",()=>v,"TabsTrigger",()=>j,"Trigger",()=>j,"createTabsScope",()=>m],743133);var S=e.i(743133),S=S,R=e.i(131777);let D=S.Root,T=r.forwardRef(({className:e,...r},s)=>(0,t.jsx)(S.List,{ref:s,className:(0,R.cn)("bg-muted text-muted-foreground inline-flex h-9 items-center justify-center rounded-lg p-1",e),...r}));T.displayName=S.List.displayName;let A=r.forwardRef(({className:e,...r},s)=>(0,t.jsx)(S.Trigger,{ref:s,className:(0,R.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),...r}));A.displayName=S.Trigger.displayName;let L=r.forwardRef(({className:e,...r},s)=>(0,t.jsx)(S.Content,{ref:s,className:(0,R.cn)("ring-offset-background focus-visible:ring-ring mt-2 focus-visible:ring-2 focus-visible:ring-offset-2 focus-visible:outline-none",e),...r}));L.displayName=S.Content.displayName,e.s(["Tabs",()=>D,"TabsContent",()=>L,"TabsList",()=>T,"TabsTrigger",()=>A],468304)},619933,e=>{"use strict";let t=(0,e.i(903645).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],619933)},602287,e=>{"use strict";var t=e.i(679606),r=e.i(152155),s=e.i(90033),a=e.i(860253),l=e.i(131777);let i=s.Dialog.Root,n=s.Dialog.Trigger,o=s.Dialog.Portal,d=s.Dialog.Close,c=r.forwardRef(({className:e,onClick:r,...a},i)=>(0,t.jsx)(s.Dialog.Overlay,{ref:i,className:(0,l.cn)("data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 fixed inset-0 z-50 bg-black/80 duration-150",e),onClick:e=>{e.stopPropagation(),r?.(e)},...a}));c.displayName=s.Dialog.Overlay.displayName;let u=r.forwardRef(({className:e,children:r,...i},n)=>(0,t.jsxs)(o,{children:[(0,t.jsx)(c,{}),(0,t.jsxs)(s.Dialog.Content,{ref:n,className:(0,l.cn)("bg-background data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 fixed top-[50%] left-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border p-6 shadow-lg duration-150 sm:rounded-lg",e),...i,children:[r,(0,t.jsxs)(s.Dialog.Close,{className:"ring-offset-background focus:ring-ring data-[state=open]:bg-accent data-[state=open]:text-muted-foreground absolute end-4 top-4 cursor-pointer rounded-sm opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2 focus:outline-none disabled:pointer-events-none",children:[(0,t.jsx)(a.X,{className:"h-4 w-4"}),(0,t.jsx)("span",{className:"sr-only",children:"Close"})]})]})]}));u.displayName=s.Dialog.Content.displayName;let f=({className:e,...r})=>(0,t.jsx)("div",{className:(0,l.cn)("flex flex-col space-y-1.5 text-center sm:text-start",e),...r});f.displayName="DialogHeader";let m=({className:e,...r})=>(0,t.jsx)("div",{className:(0,l.cn)("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...r});m.displayName="DialogFooter";let p=r.forwardRef(({className:e,...r},a)=>(0,t.jsx)(s.Dialog.Title,{ref:a,className:(0,l.cn)("text-lg leading-none font-semibold tracking-tight",e),...r}));p.displayName=s.Dialog.Title.displayName;let h=r.forwardRef(({className:e,...r},a)=>(0,t.jsx)(s.Dialog.Description,{ref:a,className:(0,l.cn)("text-muted-foreground text-sm",e),...r}));h.displayName=s.Dialog.Description.displayName,e.s(["Dialog",()=>i,"DialogClose",()=>d,"DialogContent",()=>u,"DialogDescription",()=>h,"DialogFooter",()=>m,"DialogHeader",()=>f,"DialogTitle",()=>p,"DialogTrigger",()=>n])},66459,e=>{"use strict";let t=(0,e.i(903645).default)("search",[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]]);e.s(["Search",()=>t],66459)},338573,e=>{"use strict";let t=(0,e.i(903645).default)("terminal",[["path",{d:"M12 19h8",key:"baeox8"}],["path",{d:"m4 17 6-6-6-6",key:"1yngyt"}]]);e.s(["Terminal",()=>t],338573)},730702,e=>{"use strict";let t=(0,e.i(903645).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],730702)},724042,e=>{"use strict";let t=(0,e.i(903645).default)("play",[["path",{d:"M5 5a2 2 0 0 1 3.008-1.728l11.997 6.998a2 2 0 0 1 .003 3.458l-12 7A2 2 0 0 1 5 19z",key:"10ikf1"}]]);e.s(["Play",()=>t],724042)},873504,259289,450838,481605,e=>{"use strict";var t=e.i(679606),r=e.i(152155),s=e.i(317406),a=e.i(508893);let l=(0,a.createServerReference)("40439b078896772e272d73cff5c9e76f12d2ad4fff",a.callServer,void 0,a.findSourceMapURL,"deployFeature"),i=(0,a.createServerReference)("40e1761c0b43e73601f7fcd9dce8acd5bd268ef35f",a.callServer,void 0,a.findSourceMapURL,"deployRepository");e.s(["deployRepository",()=>i],259289);let n=(0,a.createServerReference)("40e171d0c1bb54653072e2fa70eb1f9107de77cd77",a.callServer,void 0,a.findSourceMapURL,"deployApplication"),o=(0,a.createServerReference)("405b78d3f646f2c9b1433c26864d9f6ab5f562bdf5",a.callServer,void 0,a.findSourceMapURL,"stopDeployment");e.s(["stopDeployment",()=>o],450838);let d=(0,a.createServerReference)("40198f1fcab162e3ff7b2b293c1c1f8dc5ccba5116",a.callServer,void 0,a.findSourceMapURL,"getDeploymentStatus");var c=e.i(118354);let u={status:null,url:null,targetType:null,hydrated:!1,deployLoading:!1,stopLoading:!1,deployError:null};class f{entries=new Map;listeners=new Map;globalListeners=new Set;fullyHydrated=!1;isFullyHydrated(){return this.fullyHydrated}hydrate(e){let t=new Set;for(let r of e)t.add(r.targetId),this.update(r.targetId,{status:r.state,url:r.url,targetType:r.targetType,hydrated:!0});for(let[e,r]of this.entries)!t.has(e)&&r.hydrated&&null!==r.status?this.update(e,{status:null,url:null}):t.has(e)||r.hydrated||this.update(e,{hydrated:!0});this.fullyHydrated=!0}getEntry(e){return this.entries.get(e)??u}update(e,t){let r={...this.entries.get(e)??u,...t};this.entries.set(e,r),this.notify(e)}setStatus(e,t){null===t?this.update(e,{status:null,url:null,hydrated:!0}):this.update(e,{status:t.state,url:t.url,hydrated:!0})}subscribe(e,t){let r=this.listeners.get(e);return r||(r=new Set,this.listeners.set(e,r)),r.add(t),()=>{r?.delete(t),r?.size===0&&this.listeners.delete(e)}}subscribeAll(e){return this.globalListeners.add(e),()=>{this.globalListeners.delete(e)}}notify(e){let t=this.listeners.get(e);if(t)for(let e of t)e();for(let e of this.globalListeners)e()}}e.s(["DeploymentStatusStore",()=>f,"EMPTY_ENTRY",0,u],481605);let m=(0,c.createLogger)("[DeploymentStatusProvider]"),p=new Set([s.DeploymentState.Booting,s.DeploymentState.Ready]),h=(0,r.createContext)(null);function x({initialDeployments:e,children:a}){let c=(0,r.useRef)(null);c.current||(c.current=new f,c.current.hydrate(e));let u=c.current;(0,r.useEffect)(()=>{u.hydrate(e)},[e,u]);let x=(0,r.useRef)(new Map),g=(0,r.useCallback)(e=>{let t=x.current.get(e);t&&(clearInterval(t),x.current.delete(e))},[]),y=(0,r.useCallback)(e=>{if(x.current.has(e))return;let t=setInterval(async()=>{let t;try{t=await d(e)}catch(t){m.warn(`poll failed for "${e}"`,t),u.setStatus(e,null),g(e);return}if(!t||t.state===s.DeploymentState.Stopped){u.setStatus(e,null),g(e);return}u.setStatus(e,t)},3e3);x.current.set(e,t)},[u,g]);(0,r.useEffect)(()=>{let e=x.current,t=u.subscribeAll(()=>{for(let[t]of e){let e=u.getEntry(t);e.status&&p.has(e.status)||g(t)}});return()=>{for(let[,r]of(t(),e))clearInterval(r);e.clear()}},[u,g]);let v=(0,r.useCallback)(e=>{if(e&&!u.getEntry(e).hydrated){if(u.isFullyHydrated())return void u.update(e,{hydrated:!0});u.update(e,{hydrated:!0}),(async()=>{try{let t=await d(e);u.setStatus(e,t),t&&p.has(t.state)&&y(e)}catch(t){m.warn(`ensureHydrated failed for "${e}"`,t)}})()}},[u,y]),b=(0,r.useCallback)(async e=>{u.update(e.targetId,{deployLoading:!0,deployError:null});try{let t="feature"===e.targetType?await l(e.targetId):"application"===e.targetType?await n(e.targetId):await i(e.repositoryPath);if(!t.success)return void u.update(e.targetId,{deployLoading:!1,deployError:t.error??"An unexpected error occurred"});u.update(e.targetId,{deployLoading:!1,status:t.state??null,url:null,hydrated:!0,targetType:e.targetType}),y(e.targetId)}catch(r){let t=r instanceof Error?r.message:"An unexpected error occurred";u.update(e.targetId,{deployLoading:!1,deployError:t})}},[u,y]),j=(0,r.useCallback)(async e=>{if(e){u.update(e,{stopLoading:!0});try{(await o(e)).success?(g(e),u.update(e,{stopLoading:!1,status:null,url:null})):u.update(e,{stopLoading:!1})}catch(t){m.warn("stop error (non-critical)",t),u.update(e,{stopLoading:!1})}}},[u,g]),k=(0,r.useMemo)(()=>({store:u,deploy:b,stop:j,ensureHydrated:v}),[u,b,j,v]);return(0,t.jsx)(h.Provider,{value:k,children:a})}function g(){let e=(0,r.useContext)(h);if(!e)throw Error("useDeploymentStatusContext must be used within a <DeploymentStatusProvider>");return e}function y(){let e=(0,r.useContext)(h);return e||v}let v={store:new f,deploy:async()=>{},stop:async()=>{},ensureHydrated:()=>{}};e.s(["DeploymentStatusProvider",()=>x,"useDeploymentStatusContext",()=>g,"useDeploymentStatusContextOptional",()=>y],873504)},8537,e=>{"use strict";var t=e.i(152155),r=e.i(873504);function s(){}function a(e){let{store:a,deploy:l,stop:i,ensureHydrated:n}=(0,r.useDeploymentStatusContextOptional)(),o=e?.targetId??"",d=(0,t.useCallback)(e=>o?a.subscribe(o,e):s,[a,o]),c=(0,t.useCallback)(()=>o?a.getEntry(o):a.getEntry(""),[a,o]),u=(0,t.useSyncExternalStore)(d,c,c);return(0,t.useEffect)(()=>{o&&n(o)},[o,n]),{deploy:(0,t.useCallback)(async()=>{e&&await l(e)},[l,e]),stop:(0,t.useCallback)(async()=>{o&&await i(o)},[i,o]),deployLoading:u.deployLoading,stopLoading:u.stopLoading,deployError:u.deployError,status:u.status,url:u.url}}e.s(["useDeployAction",()=>a])},1650,e=>{"use strict";e.i(511495),e.s([])},454793,207729,e=>{"use strict";var t=e.i(679606),r=e.i(131777);function s({icon:e,title:s,description:a,action:l,className:i,...n}){return(0,t.jsxs)("div",{className:(0,r.cn)("flex flex-col items-center gap-4 px-4 py-12 text-center",i),...n,children:[e?(0,t.jsx)("div",{className:"text-muted-foreground",children:e}):null,(0,t.jsx)("h3",{className:"text-lg font-semibold",children:s}),a?(0,t.jsx)("p",{className:"text-muted-foreground max-w-md text-sm",children:a}):null,l?(0,t.jsx)("div",{className:"mt-2",children:l}):null]})}e.s(["EmptyState",()=>s],207729),e.s([],454793)},809443,185871,e=>{"use strict";var t=e.i(679606),r=e.i(131777);function s({title:e,description:s,children:a,className:l}){return(0,t.jsxs)("header",{className:(0,r.cn)("flex items-center justify-between gap-4",l),children:[(0,t.jsxs)("div",{className:"space-y-1",children:[(0,t.jsx)("h1",{className:"text-2xl font-bold tracking-tight",children:e}),s?(0,t.jsx)("p",{className:"text-muted-foreground",children:s}):null]}),a?(0,t.jsx)("div",{"data-slot":"actions",children:a}):null]})}e.s(["PageHeader",()=>s],185871),e.s([],809443)},200956,e=>{"use strict";var t=e.i(679606),r=e.i(152155),s=e.i(131777);let a=r.forwardRef(({className:e,...r},a)=>(0,t.jsx)("div",{ref:a,className:(0,s.cn)("bg-card text-card-foreground rounded-xl border shadow",e),...r}));a.displayName="Card";let l=r.forwardRef(({className:e,...r},a)=>(0,t.jsx)("div",{ref:a,className:(0,s.cn)("flex flex-col space-y-1.5 p-6",e),...r}));l.displayName="CardHeader";let i=r.forwardRef(({className:e,...r},a)=>(0,t.jsx)("div",{ref:a,className:(0,s.cn)("leading-none font-semibold tracking-tight",e),...r}));i.displayName="CardTitle";let n=r.forwardRef(({className:e,...r},a)=>(0,t.jsx)("div",{ref:a,className:(0,s.cn)("text-muted-foreground text-sm",e),...r}));n.displayName="CardDescription";let o=r.forwardRef(({className:e,...r},a)=>(0,t.jsx)("div",{ref:a,className:(0,s.cn)("p-6 pt-0",e),...r}));o.displayName="CardContent",r.forwardRef(({className:e,...r},a)=>(0,t.jsx)("div",{ref:a,className:(0,s.cn)("flex items-center p-6 pt-0",e),...r})).displayName="CardFooter",e.s(["Card",()=>a,"CardContent",()=>o,"CardDescription",()=>n,"CardHeader",()=>l,"CardTitle",()=>i])},638752,e=>{"use strict";var t=e.i(679606);e.i(1650);var r=e.i(511495),s=e.i(845811),a=e.i(81846),l=e.i(425235),i=e.i(619933);function n({skill:e,onClose:n}){return(0,t.jsx)(r.BaseDrawer,{open:null!==e,onClose:n,size:"sm",modal:!0,"data-testid":"skill-detail-drawer",header:e?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(s.DrawerTitle,{children:e.displayName}),(0,t.jsx)(s.DrawerDescription,{children:e.name})]}):void 0,children:e?(0,t.jsxs)("div",{className:"px-4 pb-4",children:[(0,t.jsx)("p",{className:"text-muted-foreground text-sm",children:e.description}),(0,t.jsxs)("div",{className:"mt-4 flex flex-wrap items-center gap-1.5",children:[(0,t.jsx)(a.Badge,{variant:"project"===e.source?"secondary":"outline",children:"project"===e.source?"Project":"Global"}),(0,t.jsx)(a.Badge,{variant:"outline",children:e.category}),e.context?(0,t.jsx)(a.Badge,{variant:"outline",children:e.context}):null]}),e.allowedTools?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(l.Separator,{className:"my-4"}),(0,t.jsxs)("div",{children:[(0,t.jsx)("h3",{className:"text-sm font-semibold",children:"Allowed Tools"}),(0,t.jsx)("p",{className:"text-muted-foreground mt-1 text-sm",children:e.allowedTools})]})]}):null,e.resources.length>0?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(l.Separator,{className:"my-4"}),(0,t.jsxs)("div",{children:[(0,t.jsx)("h3",{className:"text-sm font-semibold",children:"Resources"}),(0,t.jsx)("ul",{className:"mt-2 space-y-1.5",children:e.resources.map(e=>(0,t.jsxs)("li",{className:"text-muted-foreground flex items-center gap-2 text-sm",children:[(0,t.jsx)(i.FolderOpen,{className:"size-3.5 shrink-0"}),(0,t.jsxs)("span",{children:[e.name,"/ — ",e.fileCount," ",1===e.fileCount?"file":"files"]})]},e.name))})]})]}):null,e.body?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(l.Separator,{className:"my-4"}),(0,t.jsx)("pre",{className:"text-muted-foreground text-sm leading-relaxed whitespace-pre-wrap",children:e.body})]}):null]}):null})}e.s(["SkillDetailDrawer",()=>n])},316919,e=>{"use strict";var t=e.i(679606),r=e.i(152155),s=e.i(66459),a=e.i(912103),l=e.i(698127),i=e.i(735364);e.i(809443);var n=e.i(185871);e.i(454793);var o=e.i(207729),d=e.i(200956),c=e.i(81846),u=e.i(619933);function f({skill:e,onSelect:r}){return(0,t.jsxs)(d.Card,{className:"hover:border-primary/50 cursor-pointer transition-colors",role:"button",tabIndex:0,onClick:()=>r(e),onKeyDown:t=>{("Enter"===t.key||" "===t.key)&&(t.preventDefault(),r(e))},"data-testid":`skill-card-${e.name}`,children:[(0,t.jsxs)(d.CardHeader,{className:"pb-3",children:[(0,t.jsx)(d.CardTitle,{className:"text-base",children:e.displayName}),(0,t.jsx)("p",{className:"text-muted-foreground font-mono text-xs",children:e.name})]}),(0,t.jsxs)(d.CardContent,{className:"space-y-3",children:[(0,t.jsx)("p",{className:"text-muted-foreground line-clamp-2 text-sm",children:e.description}),(0,t.jsxs)("div",{className:"flex flex-wrap items-center gap-1.5",children:[(0,t.jsx)(c.Badge,{variant:"project"===e.source?"secondary":"outline",children:"project"===e.source?"Project":"Global"}),e.context?(0,t.jsx)(c.Badge,{variant:"outline",children:e.context}):null,e.allowedTools?(0,t.jsx)(c.Badge,{variant:"outline",children:"Tools"}):null,e.resources.length>0?(0,t.jsxs)("span",{className:"text-muted-foreground inline-flex items-center gap-1 text-xs",children:[(0,t.jsx)(u.FolderOpen,{className:"size-3"}),e.resources.length," ",1===e.resources.length?"resource":"resources"]}):null]})]})]})}let m=["Workflow","Code Generation","Analysis","Reference"];function p({skills:e,onSkillSelect:r}){let s=function(e){let t=new Map;for(let r of e){let e=t.get(r.category)??[];e.push(r),t.set(r.category,e)}return t}(e);return(0,t.jsx)("div",{className:"space-y-8",children:m.map(e=>{let a=s.get(e);return a&&0!==a.length?(0,t.jsxs)("section",{children:[(0,t.jsxs)("h2",{className:"mb-4 text-lg font-semibold",children:[e," ",(0,t.jsxs)("span",{className:"text-muted-foreground text-sm font-normal",children:["(",a.length,")"]})]}),(0,t.jsx)("div",{className:"grid grid-cols-1 gap-4 md:grid-cols-2 lg:grid-cols-3",children:a.map(e=>(0,t.jsx)(f,{skill:e,onSelect:r},e.name))})]},e):null})})}let h=[{label:"All",value:null},{label:"Workflow",value:"Workflow"},{label:"Code Generation",value:"Code Generation"},{label:"Analysis",value:"Analysis"},{label:"Reference",value:"Reference"}];function x({activeCategory:e,onCategoryChange:r,counts:s}){return(0,t.jsx)("div",{className:"flex flex-wrap gap-2",role:"group","aria-label":"Filter by category",children:h.map(({label:a,value:l})=>(0,t.jsxs)(i.Button,{variant:e===l?"default":"outline",size:"sm",onClick:()=>r(l),children:[a,s&&l?(0,t.jsxs)("span",{className:"ms-1 text-xs opacity-70",children:["(",s[l],")"]}):null]},a))})}var g=e.i(638752),y=e.i(425235),v=e.i(711434),b=e.i(3214),j=e.i(860253),k=e.i(360112),N=e.i(508893);let w=(0,N.createServerReference)("40dc9e73a6706c6a625c6853f2d4b9a1727527de15",N.callServer,void 0,N.findSourceMapURL,"removeInjectedSkill");var C=e.i(602287),S=e.i(141957),R=e.i(468304);let D=(0,N.createServerReference)("40f3fe5bbe5d87571cfc707d79d6f5f3cf37edff01",N.callServer,void 0,N.findSourceMapURL,"addInjectedSkill");function T({open:e,onOpenChange:s,onAdded:a,discoveredSkills:n,existingSkillNames:o}){let[d,c]=(0,r.useState)(!1),[u,f]=(0,r.useState)(""),[m,p]=(0,r.useState)(""),[h,x]=(0,r.useState)(""),g=n.filter(e=>!o.includes(e.name)),y=async e=>{c(!0);let t=await D({name:e.name,type:"local",source:`.claude/skills/${e.name}`});(c(!1),t.success)?(k.toast.success(`Added "${e.name}" to feature skills`),a()):k.toast.error(t.error??"Failed to add skill")},v=async()=>{if(!u.trim()||!m.trim())return void k.toast.error("Name and source are required");c(!0);let e=await D({name:u.trim(),type:"remote",source:m.trim(),...h.trim()&&{remoteSkillName:h.trim()}});(c(!1),e.success)?(k.toast.success(`Added "${u.trim()}" to feature skills`),f(""),p(""),x(""),a()):k.toast.error(e.error??"Failed to add skill")};return(0,t.jsx)(C.Dialog,{open:e,onOpenChange:s,children:(0,t.jsxs)(C.DialogContent,{className:"sm:max-w-md","data-testid":"add-skill-dialog",children:[(0,t.jsx)(C.DialogHeader,{children:(0,t.jsx)(C.DialogTitle,{children:"Add Skill to Features"})}),(0,t.jsxs)(R.Tabs,{defaultValue:"local",children:[(0,t.jsxs)(R.TabsList,{className:"w-full",children:[(0,t.jsx)(R.TabsTrigger,{value:"local",className:"flex-1",children:"Local"}),(0,t.jsx)(R.TabsTrigger,{value:"remote",className:"flex-1",children:"Remote"})]}),(0,t.jsx)(R.TabsContent,{value:"local",className:"mt-4",children:0===g.length?(0,t.jsx)("p",{className:"text-muted-foreground text-sm",children:"All discovered skills are already configured."}):(0,t.jsx)("div",{className:"flex max-h-60 flex-col gap-2 overflow-y-auto",children:g.map(e=>(0,t.jsxs)("button",{type:"button",className:"hover:bg-accent flex flex-col gap-0.5 rounded-md border p-3 text-left transition-colors",onClick:()=>y(e),disabled:d,"data-testid":`add-local-skill-${e.name}`,children:[(0,t.jsx)("span",{className:"text-sm font-medium",children:e.displayName}),(0,t.jsx)("span",{className:"text-muted-foreground line-clamp-1 text-xs",children:e.description})]},e.name))})}),(0,t.jsx)(R.TabsContent,{value:"remote",className:"mt-4",children:(0,t.jsxs)("div",{className:"flex flex-col gap-3",children:[(0,t.jsxs)("div",{className:"flex flex-col gap-1.5",children:[(0,t.jsx)(S.Label,{htmlFor:"remote-name",children:"Name"}),(0,t.jsx)(l.Input,{id:"remote-name",placeholder:"e.g. remotion-best-practices",value:u,onChange:e=>f(e.target.value),"data-testid":"remote-skill-name"})]}),(0,t.jsxs)("div",{className:"flex flex-col gap-1.5",children:[(0,t.jsx)(S.Label,{htmlFor:"remote-source",children:"Source (npm package or URL)"}),(0,t.jsx)(l.Input,{id:"remote-source",placeholder:"e.g. @anthropic/remotion-skills",value:m,onChange:e=>p(e.target.value),"data-testid":"remote-skill-source"})]}),(0,t.jsxs)("div",{className:"flex flex-col gap-1.5",children:[(0,t.jsx)(S.Label,{htmlFor:"remote-skill-name",children:"Skill Name (optional)"}),(0,t.jsx)(l.Input,{id:"remote-skill-name",placeholder:"e.g. remotion-best-practices",value:h,onChange:e=>x(e.target.value),"data-testid":"remote-skill-skill-name"})]}),(0,t.jsx)(C.DialogFooter,{children:(0,t.jsx)(i.Button,{onClick:v,disabled:d||!u.trim()||!m.trim(),"data-testid":"add-remote-skill-submit",children:"Add Remote Skill"})})]})})]})]})})}function A({config:e,discoveredSkills:s}){let a=(0,v.useRouter)(),[l,n]=(0,r.useState)(!1),[o,d]=(0,r.useState)(null),c=(0,r.useMemo)(()=>{let e=new Map;for(let t of s)e.set(t.name,t.description);return e},[s]),u=async e=>{d(e);let t=await w(e);(d(null),t.success)?(k.toast.success(`Removed "${e}" from feature skills`),a.refresh()):k.toast.error(t.error??"Failed to remove skill")};return(0,t.jsxs)("div",{className:"flex flex-col gap-3",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)("h2",{className:"text-base font-semibold",children:"Feature Skills"}),(0,t.jsx)("p",{className:"text-muted-foreground text-sm",children:"Curated skills included in new feature worktrees to guide the agent"})]}),e.skills.length>0?(0,t.jsx)("div",{className:"grid gap-2 sm:grid-cols-2 lg:grid-cols-3",children:e.skills.map(e=>(0,t.jsx)(L,{skill:e,description:c.get(e.name),onRemove:()=>u(e.name),isRemoving:o===e.name},e.name))}):(0,t.jsx)("p",{className:"text-muted-foreground text-sm",children:"No skills configured. Add skills to guide the agent when working on new features."}),(0,t.jsx)("div",{children:(0,t.jsxs)(i.Button,{variant:"outline",size:"sm",onClick:()=>n(!0),"data-testid":"add-injected-skill-button",children:[(0,t.jsx)(b.Plus,{className:"mr-1.5 size-4"}),"Add Skill"]})}),(0,t.jsx)(T,{open:l,onOpenChange:n,onAdded:()=>{n(!1),a.refresh()},discoveredSkills:s,existingSkillNames:e.skills.map(e=>e.name)})]})}function L({skill:e,description:r,onRemove:s,isRemoving:a}){return(0,t.jsxs)(d.Card,{"data-testid":`injected-skill-${e.name}`,children:[(0,t.jsxs)(d.CardHeader,{className:"flex flex-row items-start justify-between gap-2 pb-2",children:[(0,t.jsx)("div",{className:"min-w-0",children:(0,t.jsx)(d.CardTitle,{className:"truncate text-sm",children:e.name})}),(0,t.jsx)(i.Button,{variant:"ghost",size:"icon-sm",className:"shrink-0",onClick:s,disabled:a,"aria-label":`Remove ${e.name}`,"data-testid":`remove-injected-skill-${e.name}`,children:(0,t.jsx)(j.X,{className:"size-4"})})]}),(0,t.jsxs)(d.CardContent,{className:"space-y-2 pt-0",children:[r?(0,t.jsx)("p",{className:"text-muted-foreground line-clamp-2 text-xs",children:r}):null,(0,t.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,t.jsx)(c.Badge,{variant:"local"===e.type?"secondary":"outline",className:"text-xs",children:"local"===e.type?"Local":"Remote"}),(0,t.jsx)("span",{className:"text-muted-foreground max-w-37.5 truncate text-xs",children:e.source})]})]})]})}function E({skills:e,injectionConfig:d}){let[c,u]=(0,r.useState)(""),[f,m]=(0,r.useState)(null),[h,v]=(0,r.useState)(null),b=(0,r.useMemo)(()=>(function(e){let t={Workflow:0,"Code Generation":0,Analysis:0,Reference:0};for(let r of e)t[r.category]++;return t})(e),[e]),j=(0,r.useMemo)(()=>{let t=c.toLowerCase();return e.filter(e=>{if(f&&e.category!==f)return!1;if(t){let r=e.name.toLowerCase().includes(t),s=e.description.toLowerCase().includes(t);if(!r&&!s)return!1}return!0})},[e,c,f]);return 0===e.length?(0,t.jsxs)("div",{className:"flex flex-col gap-6 p-6",children:[(0,t.jsx)(n.PageHeader,{title:"Skills",description:"Claude Code skills available to this project"}),(0,t.jsx)(A,{config:d,discoveredSkills:e}),(0,t.jsx)(y.Separator,{}),(0,t.jsx)(o.EmptyState,{icon:(0,t.jsx)(a.Puzzle,{className:"size-10"}),title:"No skills found",description:"No Claude Code skills are installed. Add skills to .claude/skills/ to get started."})]}):(0,t.jsxs)("div",{className:"flex flex-col gap-6 p-6",children:[(0,t.jsx)(n.PageHeader,{title:"Skills",description:"Claude Code skills available to this project"}),(0,t.jsx)(A,{config:d,discoveredSkills:e}),(0,t.jsx)(y.Separator,{}),(0,t.jsxs)("div",{className:"relative",children:[(0,t.jsx)(s.Search,{className:"text-muted-foreground absolute top-1/2 left-3 size-4 -translate-y-1/2"}),(0,t.jsx)(l.Input,{placeholder:"Search skills...",value:c,onChange:e=>u(e.target.value),className:"ps-9"})]}),(0,t.jsx)(x,{activeCategory:f,onCategoryChange:m,counts:b}),j.length>0?(0,t.jsx)(p,{skills:j,onSkillSelect:v}):(0,t.jsx)(o.EmptyState,{icon:(0,t.jsx)(s.Search,{className:"size-10"}),title:"No matching skills",description:"No skills match your current search and filter criteria.",action:(0,t.jsx)(i.Button,{variant:"outline",onClick:()=>{u(""),m(null)},children:"Clear filters"})}),(0,t.jsx)(g.SkillDetailDrawer,{skill:h,onClose:()=>v(null)})]})}e.s(["SkillsPageClient",()=>E],316919)}]);
|