@shepai/cli 1.194.1 → 1.194.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (305) hide show
  1. package/package.json +1 -1
  2. package/web/.next/BUILD_ID +1 -1
  3. package/web/.next/build-manifest.json +2 -2
  4. package/web/.next/fallback-build-manifest.json +2 -2
  5. package/web/.next/prerender-manifest.json +3 -3
  6. package/web/.next/required-server-files.js +2 -2
  7. package/web/.next/required-server-files.json +2 -2
  8. package/web/.next/server/app/(dashboard)/@drawer/adopt/page/react-loadable-manifest.json +3 -3
  9. package/web/.next/server/app/(dashboard)/@drawer/adopt/page/server-reference-manifest.json +36 -36
  10. package/web/.next/server/app/(dashboard)/@drawer/adopt/page.js.nft.json +1 -1
  11. package/web/.next/server/app/(dashboard)/@drawer/adopt/page_client-reference-manifest.js +1 -1
  12. package/web/.next/server/app/(dashboard)/@drawer/chat/page/react-loadable-manifest.json +3 -3
  13. package/web/.next/server/app/(dashboard)/@drawer/chat/page/server-reference-manifest.json +34 -34
  14. package/web/.next/server/app/(dashboard)/@drawer/chat/page.js.nft.json +1 -1
  15. package/web/.next/server/app/(dashboard)/@drawer/chat/page_client-reference-manifest.js +1 -1
  16. package/web/.next/server/app/(dashboard)/@drawer/create/page/react-loadable-manifest.json +3 -3
  17. package/web/.next/server/app/(dashboard)/@drawer/create/page/server-reference-manifest.json +37 -37
  18. package/web/.next/server/app/(dashboard)/@drawer/create/page.js.nft.json +1 -1
  19. package/web/.next/server/app/(dashboard)/@drawer/create/page_client-reference-manifest.js +1 -1
  20. package/web/.next/server/app/(dashboard)/@drawer/feature/[featureId]/[tab]/page/react-loadable-manifest.json +3 -3
  21. package/web/.next/server/app/(dashboard)/@drawer/feature/[featureId]/[tab]/page/server-reference-manifest.json +46 -46
  22. package/web/.next/server/app/(dashboard)/@drawer/feature/[featureId]/[tab]/page.js.nft.json +1 -1
  23. package/web/.next/server/app/(dashboard)/@drawer/feature/[featureId]/[tab]/page_client-reference-manifest.js +1 -1
  24. package/web/.next/server/app/(dashboard)/@drawer/feature/[featureId]/page/react-loadable-manifest.json +3 -3
  25. package/web/.next/server/app/(dashboard)/@drawer/feature/[featureId]/page/server-reference-manifest.json +46 -46
  26. package/web/.next/server/app/(dashboard)/@drawer/feature/[featureId]/page.js.nft.json +1 -1
  27. package/web/.next/server/app/(dashboard)/@drawer/feature/[featureId]/page_client-reference-manifest.js +1 -1
  28. package/web/.next/server/app/(dashboard)/@drawer/repository/[repositoryId]/[tab]/page/react-loadable-manifest.json +3 -3
  29. package/web/.next/server/app/(dashboard)/@drawer/repository/[repositoryId]/[tab]/page/server-reference-manifest.json +35 -35
  30. package/web/.next/server/app/(dashboard)/@drawer/repository/[repositoryId]/[tab]/page.js.nft.json +1 -1
  31. package/web/.next/server/app/(dashboard)/@drawer/repository/[repositoryId]/[tab]/page_client-reference-manifest.js +1 -1
  32. package/web/.next/server/app/(dashboard)/@drawer/repository/[repositoryId]/page/react-loadable-manifest.json +3 -3
  33. package/web/.next/server/app/(dashboard)/@drawer/repository/[repositoryId]/page/server-reference-manifest.json +35 -35
  34. package/web/.next/server/app/(dashboard)/@drawer/repository/[repositoryId]/page.js.nft.json +1 -1
  35. package/web/.next/server/app/(dashboard)/@drawer/repository/[repositoryId]/page_client-reference-manifest.js +1 -1
  36. package/web/.next/server/app/(dashboard)/chat/page/react-loadable-manifest.json +3 -3
  37. package/web/.next/server/app/(dashboard)/chat/page/server-reference-manifest.json +34 -34
  38. package/web/.next/server/app/(dashboard)/chat/page.js.nft.json +1 -1
  39. package/web/.next/server/app/(dashboard)/chat/page_client-reference-manifest.js +1 -1
  40. package/web/.next/server/app/(dashboard)/control-center/page/react-loadable-manifest.json +3 -3
  41. package/web/.next/server/app/(dashboard)/control-center/page/server-reference-manifest.json +34 -34
  42. package/web/.next/server/app/(dashboard)/control-center/page.js.nft.json +1 -1
  43. package/web/.next/server/app/(dashboard)/control-center/page_client-reference-manifest.js +1 -1
  44. package/web/.next/server/app/(dashboard)/create/page/react-loadable-manifest.json +3 -3
  45. package/web/.next/server/app/(dashboard)/create/page/server-reference-manifest.json +37 -37
  46. package/web/.next/server/app/(dashboard)/create/page.js.nft.json +1 -1
  47. package/web/.next/server/app/(dashboard)/create/page_client-reference-manifest.js +1 -1
  48. package/web/.next/server/app/(dashboard)/feature/[featureId]/[tab]/page/react-loadable-manifest.json +3 -3
  49. package/web/.next/server/app/(dashboard)/feature/[featureId]/[tab]/page/server-reference-manifest.json +46 -46
  50. package/web/.next/server/app/(dashboard)/feature/[featureId]/[tab]/page.js.nft.json +1 -1
  51. package/web/.next/server/app/(dashboard)/feature/[featureId]/[tab]/page_client-reference-manifest.js +1 -1
  52. package/web/.next/server/app/(dashboard)/feature/[featureId]/page/react-loadable-manifest.json +3 -3
  53. package/web/.next/server/app/(dashboard)/feature/[featureId]/page/server-reference-manifest.json +46 -46
  54. package/web/.next/server/app/(dashboard)/feature/[featureId]/page.js.nft.json +1 -1
  55. package/web/.next/server/app/(dashboard)/feature/[featureId]/page_client-reference-manifest.js +1 -1
  56. package/web/.next/server/app/(dashboard)/repository/[repositoryId]/[tab]/page/react-loadable-manifest.json +3 -3
  57. package/web/.next/server/app/(dashboard)/repository/[repositoryId]/[tab]/page/server-reference-manifest.json +35 -35
  58. package/web/.next/server/app/(dashboard)/repository/[repositoryId]/[tab]/page.js.nft.json +1 -1
  59. package/web/.next/server/app/(dashboard)/repository/[repositoryId]/[tab]/page_client-reference-manifest.js +1 -1
  60. package/web/.next/server/app/(dashboard)/repository/[repositoryId]/page/react-loadable-manifest.json +3 -3
  61. package/web/.next/server/app/(dashboard)/repository/[repositoryId]/page/server-reference-manifest.json +35 -35
  62. package/web/.next/server/app/(dashboard)/repository/[repositoryId]/page.js.nft.json +1 -1
  63. package/web/.next/server/app/(dashboard)/repository/[repositoryId]/page_client-reference-manifest.js +1 -1
  64. package/web/.next/server/app/_global-error.html +2 -2
  65. package/web/.next/server/app/_global-error.rsc +1 -1
  66. package/web/.next/server/app/_global-error.segments/__PAGE__.segment.rsc +1 -1
  67. package/web/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
  68. package/web/.next/server/app/_global-error.segments/_head.segment.rsc +1 -1
  69. package/web/.next/server/app/_global-error.segments/_index.segment.rsc +1 -1
  70. package/web/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
  71. package/web/.next/server/app/_not-found/page/react-loadable-manifest.json +3 -3
  72. package/web/.next/server/app/_not-found/page/server-reference-manifest.json +8 -8
  73. package/web/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
  74. package/web/.next/server/app/application/[id]/page/react-loadable-manifest.json +3 -3
  75. package/web/.next/server/app/application/[id]/page/server-reference-manifest.json +17 -17
  76. package/web/.next/server/app/application/[id]/page.js.nft.json +1 -1
  77. package/web/.next/server/app/application/[id]/page_client-reference-manifest.js +1 -1
  78. package/web/.next/server/app/applications/page/react-loadable-manifest.json +3 -3
  79. package/web/.next/server/app/applications/page/server-reference-manifest.json +18 -18
  80. package/web/.next/server/app/applications/page.js.nft.json +1 -1
  81. package/web/.next/server/app/applications/page_client-reference-manifest.js +1 -1
  82. package/web/.next/server/app/features/page/react-loadable-manifest.json +3 -3
  83. package/web/.next/server/app/features/page/server-reference-manifest.json +30 -30
  84. package/web/.next/server/app/features/page.js.nft.json +1 -1
  85. package/web/.next/server/app/features/page_client-reference-manifest.js +1 -1
  86. package/web/.next/server/app/page/react-loadable-manifest.json +3 -3
  87. package/web/.next/server/app/page/server-reference-manifest.json +8 -8
  88. package/web/.next/server/app/page_client-reference-manifest.js +1 -1
  89. package/web/.next/server/app/projects/[slug]/items/[itemId]/page/react-loadable-manifest.json +3 -3
  90. package/web/.next/server/app/projects/[slug]/items/[itemId]/page/server-reference-manifest.json +15 -15
  91. package/web/.next/server/app/projects/[slug]/items/[itemId]/page_client-reference-manifest.js +1 -1
  92. package/web/.next/server/app/projects/[slug]/page/react-loadable-manifest.json +3 -3
  93. package/web/.next/server/app/projects/[slug]/page/server-reference-manifest.json +27 -27
  94. package/web/.next/server/app/projects/[slug]/page_client-reference-manifest.js +1 -1
  95. package/web/.next/server/app/projects/[slug]/pages/page/react-loadable-manifest.json +3 -3
  96. package/web/.next/server/app/projects/[slug]/pages/page/server-reference-manifest.json +11 -11
  97. package/web/.next/server/app/projects/[slug]/pages/page_client-reference-manifest.js +1 -1
  98. package/web/.next/server/app/projects/[slug]/settings/page/react-loadable-manifest.json +3 -3
  99. package/web/.next/server/app/projects/[slug]/settings/page/server-reference-manifest.json +17 -17
  100. package/web/.next/server/app/projects/[slug]/settings/page_client-reference-manifest.js +1 -1
  101. package/web/.next/server/app/projects/page/react-loadable-manifest.json +3 -3
  102. package/web/.next/server/app/projects/page/server-reference-manifest.json +9 -9
  103. package/web/.next/server/app/projects/page_client-reference-manifest.js +1 -1
  104. package/web/.next/server/app/settings/page/react-loadable-manifest.json +3 -3
  105. package/web/.next/server/app/settings/page/server-reference-manifest.json +11 -11
  106. package/web/.next/server/app/settings/page_client-reference-manifest.js +1 -1
  107. package/web/.next/server/app/skills/page/react-loadable-manifest.json +3 -3
  108. package/web/.next/server/app/skills/page/server-reference-manifest.json +16 -16
  109. package/web/.next/server/app/skills/page_client-reference-manifest.js +1 -1
  110. package/web/.next/server/app/tools/page/react-loadable-manifest.json +3 -3
  111. package/web/.next/server/app/tools/page/server-reference-manifest.json +14 -14
  112. package/web/.next/server/app/tools/page_client-reference-manifest.js +1 -1
  113. package/web/.next/server/app/version/page/react-loadable-manifest.json +3 -3
  114. package/web/.next/server/app/version/page/server-reference-manifest.json +8 -8
  115. package/web/.next/server/app/version/page_client-reference-manifest.js +1 -1
  116. package/web/.next/server/chunks/[root-of-the-server]__10e976f3._.js +1 -1
  117. package/web/.next/server/chunks/ssr/744ca_web__next-internal_server_app_(dashboard)_@drawer_adopt_page_actions_99cb41a4.js +1 -1
  118. package/web/.next/server/chunks/ssr/744ca_web__next-internal_server_app_(dashboard)_@drawer_adopt_page_actions_99cb41a4.js.map +1 -1
  119. package/web/.next/server/chunks/ssr/744ca_web__next-internal_server_app_(dashboard)_@drawer_chat_page_actions_3bcbcc2f.js +1 -1
  120. package/web/.next/server/chunks/ssr/744ca_web__next-internal_server_app_(dashboard)_@drawer_chat_page_actions_3bcbcc2f.js.map +1 -1
  121. package/web/.next/server/chunks/ssr/744ca_web__next-internal_server_app_(dashboard)_chat_page_actions_059f6735.js +1 -1
  122. package/web/.next/server/chunks/ssr/744ca_web__next-internal_server_app_(dashboard)_chat_page_actions_059f6735.js.map +1 -1
  123. package/web/.next/server/chunks/ssr/744ca_web__next-internal_server_app_(dashboard)_control-center_page_actions_86edeb51.js +1 -1
  124. package/web/.next/server/chunks/ssr/744ca_web__next-internal_server_app_(dashboard)_control-center_page_actions_86edeb51.js.map +1 -1
  125. package/web/.next/server/chunks/ssr/744ca_web_app_projects_[slug]_items_[itemId]_work-item-detail-client_tsx_d2e02407._.js +1 -1
  126. package/web/.next/server/chunks/ssr/744ca_web_app_projects_[slug]_items_[itemId]_work-item-detail-client_tsx_d2e02407._.js.map +1 -1
  127. package/web/.next/server/chunks/ssr/744ca_web_app_projects_[slug]_settings_project-settings-client_tsx_e8b85ddc._.js +1 -1
  128. package/web/.next/server/chunks/ssr/744ca_web_app_projects_[slug]_settings_project-settings-client_tsx_e8b85ddc._.js.map +1 -1
  129. package/web/.next/server/chunks/ssr/744ca_web_components_common_control-center-drawer_feature-drawer-client_tsx_e9755fc8._.js +2 -2
  130. package/web/.next/server/chunks/ssr/744ca_web_components_common_control-center-drawer_feature-drawer-client_tsx_e9755fc8._.js.map +1 -1
  131. package/web/.next/server/chunks/ssr/744ca_web_components_features_applications_applications-page-client_tsx_d0db9938._.js +1 -1
  132. package/web/.next/server/chunks/ssr/[root-of-the-server]__012a0e7d._.js +1 -1
  133. package/web/.next/server/chunks/ssr/[root-of-the-server]__012a0e7d._.js.map +1 -1
  134. package/web/.next/server/chunks/ssr/[root-of-the-server]__0462fa34._.js +1 -1
  135. package/web/.next/server/chunks/ssr/[root-of-the-server]__0462fa34._.js.map +1 -1
  136. package/web/.next/server/chunks/ssr/[root-of-the-server]__1973d644._.js +1 -1
  137. package/web/.next/server/chunks/ssr/[root-of-the-server]__1a86d5fe._.js +1 -1
  138. package/web/.next/server/chunks/ssr/[root-of-the-server]__1a86d5fe._.js.map +1 -1
  139. package/web/.next/server/chunks/ssr/[root-of-the-server]__30326387._.js +1 -1
  140. package/web/.next/server/chunks/ssr/[root-of-the-server]__30326387._.js.map +1 -1
  141. package/web/.next/server/chunks/ssr/[root-of-the-server]__3438c354._.js +1 -1
  142. package/web/.next/server/chunks/ssr/[root-of-the-server]__3438c354._.js.map +1 -1
  143. package/web/.next/server/chunks/ssr/[root-of-the-server]__361129f0._.js +1 -1
  144. package/web/.next/server/chunks/ssr/[root-of-the-server]__361129f0._.js.map +1 -1
  145. package/web/.next/server/chunks/ssr/[root-of-the-server]__4adb4a94._.js +3 -3
  146. package/web/.next/server/chunks/ssr/[root-of-the-server]__4adb4a94._.js.map +1 -1
  147. package/web/.next/server/chunks/ssr/{[root-of-the-server]__04280e28._.js → [root-of-the-server]__51772860._.js} +2 -2
  148. package/web/.next/server/chunks/ssr/{[root-of-the-server]__04280e28._.js.map → [root-of-the-server]__51772860._.js.map} +1 -1
  149. package/web/.next/server/chunks/ssr/[root-of-the-server]__5c25ef9b._.js +2 -2
  150. package/web/.next/server/chunks/ssr/[root-of-the-server]__5c25ef9b._.js.map +1 -1
  151. package/web/.next/server/chunks/ssr/[root-of-the-server]__5c5f9704._.js +1 -1
  152. package/web/.next/server/chunks/ssr/[root-of-the-server]__5c5f9704._.js.map +1 -1
  153. package/web/.next/server/chunks/ssr/[root-of-the-server]__638955bc._.js +1 -1
  154. package/web/.next/server/chunks/ssr/[root-of-the-server]__78e1366f._.js +1 -1
  155. package/web/.next/server/chunks/ssr/[root-of-the-server]__78e1366f._.js.map +1 -1
  156. package/web/.next/server/chunks/ssr/[root-of-the-server]__97b6831c._.js +3 -3
  157. package/web/.next/server/chunks/ssr/[root-of-the-server]__9b16348d._.js +1 -1
  158. package/web/.next/server/chunks/ssr/[root-of-the-server]__9b16348d._.js.map +1 -1
  159. package/web/.next/server/chunks/ssr/{[root-of-the-server]__03f1b887._.js → [root-of-the-server]__a2c80b96._.js} +2 -2
  160. package/web/.next/server/chunks/ssr/{[root-of-the-server]__03f1b887._.js.map → [root-of-the-server]__a2c80b96._.js.map} +1 -1
  161. package/web/.next/server/chunks/ssr/[root-of-the-server]__b3bc9689._.js +1 -1
  162. package/web/.next/server/chunks/ssr/[root-of-the-server]__b3bc9689._.js.map +1 -1
  163. package/web/.next/server/chunks/ssr/[root-of-the-server]__ba8cbee2._.js +1 -1
  164. package/web/.next/server/chunks/ssr/[root-of-the-server]__ba8cbee2._.js.map +1 -1
  165. package/web/.next/server/chunks/ssr/[root-of-the-server]__dbde193f._.js +1 -1
  166. package/web/.next/server/chunks/ssr/[root-of-the-server]__dbde193f._.js.map +1 -1
  167. package/web/.next/server/chunks/ssr/[root-of-the-server]__f6adb460._.js +1 -1
  168. package/web/.next/server/chunks/ssr/[root-of-the-server]__f6adb460._.js.map +1 -1
  169. package/web/.next/server/chunks/ssr/_101de7c3._.js +1 -1
  170. package/web/.next/server/chunks/ssr/_101de7c3._.js.map +1 -1
  171. package/web/.next/server/chunks/ssr/_12ba4a07._.js +1 -1
  172. package/web/.next/server/chunks/ssr/_12ba4a07._.js.map +1 -1
  173. package/web/.next/server/chunks/ssr/_15634d5b._.js +1 -1
  174. package/web/.next/server/chunks/ssr/_15634d5b._.js.map +1 -1
  175. package/web/.next/server/chunks/ssr/_27c2f774._.js +1 -1
  176. package/web/.next/server/chunks/ssr/_27c2f774._.js.map +1 -1
  177. package/web/.next/server/chunks/ssr/{_5ed7a395._.js → _2b91b410._.js} +2 -2
  178. package/web/.next/server/chunks/ssr/{_5ed7a395._.js.map → _2b91b410._.js.map} +1 -1
  179. package/web/.next/server/chunks/ssr/_30787024._.js +1 -1
  180. package/web/.next/server/chunks/ssr/_30787024._.js.map +1 -1
  181. package/web/.next/server/chunks/ssr/_3bd60fa3._.js +1 -1
  182. package/web/.next/server/chunks/ssr/_402d53bf._.js +1 -1
  183. package/web/.next/server/chunks/ssr/_402d53bf._.js.map +1 -1
  184. package/web/.next/server/chunks/ssr/{_739ea6b4._.js → _4f0d074c._.js} +2 -2
  185. package/web/.next/server/chunks/ssr/{_739ea6b4._.js.map → _4f0d074c._.js.map} +1 -1
  186. package/web/.next/server/chunks/ssr/_56b9d60f._.js +1 -1
  187. package/web/.next/server/chunks/ssr/_56b9d60f._.js.map +1 -1
  188. package/web/.next/server/chunks/ssr/_6868b4b1._.js +1 -1
  189. package/web/.next/server/chunks/ssr/{_faacc25a._.js → _69edcad8._.js} +2 -2
  190. package/web/.next/server/chunks/ssr/{_faacc25a._.js.map → _69edcad8._.js.map} +1 -1
  191. package/web/.next/server/chunks/ssr/_805ae1aa._.js +1 -1
  192. package/web/.next/server/chunks/ssr/_805ae1aa._.js.map +1 -1
  193. package/web/.next/server/chunks/ssr/_8a700ff4._.js +1 -1
  194. package/web/.next/server/chunks/ssr/_8a700ff4._.js.map +1 -1
  195. package/web/.next/server/chunks/ssr/_8f4f8aa1._.js +1 -1
  196. package/web/.next/server/chunks/ssr/_8f4f8aa1._.js.map +1 -1
  197. package/web/.next/server/chunks/ssr/{_c9cecace._.js → _a92fd4f0._.js} +2 -2
  198. package/web/.next/server/chunks/ssr/{_c9cecace._.js.map → _a92fd4f0._.js.map} +1 -1
  199. package/web/.next/server/chunks/ssr/_b40a4fc3._.js +1 -1
  200. package/web/.next/server/chunks/ssr/_b40a4fc3._.js.map +1 -1
  201. package/web/.next/server/chunks/ssr/{_f3115daa._.js → _c27993b2._.js} +2 -2
  202. package/web/.next/server/chunks/ssr/{_f3115daa._.js.map → _c27993b2._.js.map} +1 -1
  203. package/web/.next/server/chunks/ssr/_c44ec376._.js +1 -1
  204. package/web/.next/server/chunks/ssr/_c44ec376._.js.map +1 -1
  205. package/web/.next/server/chunks/ssr/{_3024a5f6._.js → _c631c327._.js} +2 -2
  206. package/web/.next/server/chunks/ssr/{_3024a5f6._.js.map → _c631c327._.js.map} +1 -1
  207. package/web/.next/server/chunks/ssr/_cd641c61._.js +1 -1
  208. package/web/.next/server/chunks/ssr/_cd641c61._.js.map +1 -1
  209. package/web/.next/server/chunks/ssr/_d53224a9._.js +1 -1
  210. package/web/.next/server/chunks/ssr/_d53224a9._.js.map +1 -1
  211. package/web/.next/server/chunks/ssr/_e6271303._.js +1 -1
  212. package/web/.next/server/chunks/ssr/_e6271303._.js.map +1 -1
  213. package/web/.next/server/chunks/ssr/_ed8fd56c._.js +1 -1
  214. package/web/.next/server/chunks/ssr/_ed8fd56c._.js.map +1 -1
  215. package/web/.next/server/chunks/ssr/_f602cc9f._.js +1 -1
  216. package/web/.next/server/chunks/ssr/_f602cc9f._.js.map +1 -1
  217. package/web/.next/server/chunks/ssr/b1a17_presentation_web_components_features_settings_settings-page-client_tsx_6ed9d5f8._.js +1 -1
  218. package/web/.next/server/chunks/ssr/b1a17_presentation_web_components_features_settings_settings-page-client_tsx_6ed9d5f8._.js.map +1 -1
  219. package/web/.next/server/chunks/ssr/f3a1f_components_common_control-center-drawer_repository-drawer-client_tsx_39a00c03._.js +1 -1
  220. package/web/.next/server/chunks/ssr/src_presentation_web_05bba4dc._.js +1 -1
  221. package/web/.next/server/chunks/ssr/src_presentation_web_05bba4dc._.js.map +1 -1
  222. package/web/.next/server/chunks/ssr/src_presentation_web_43451480._.js +1 -1
  223. package/web/.next/server/chunks/ssr/src_presentation_web_43451480._.js.map +1 -1
  224. package/web/.next/server/chunks/ssr/src_presentation_web_4b306bb3._.js +1 -1
  225. package/web/.next/server/chunks/ssr/src_presentation_web_4b306bb3._.js.map +1 -1
  226. package/web/.next/server/chunks/ssr/{src_presentation_web_9e14bfc1._.js → src_presentation_web_7cd9b825._.js} +2 -2
  227. package/web/.next/server/chunks/ssr/{src_presentation_web_9e14bfc1._.js.map → src_presentation_web_7cd9b825._.js.map} +1 -1
  228. package/web/.next/server/chunks/ssr/src_presentation_web_81dd84ae._.js +1 -1
  229. package/web/.next/server/chunks/ssr/src_presentation_web_81dd84ae._.js.map +1 -1
  230. package/web/.next/server/chunks/ssr/{src_presentation_web_e9ad533a._.js → src_presentation_web_8d676afa._.js} +2 -2
  231. package/web/.next/server/chunks/ssr/{src_presentation_web_e9ad533a._.js.map → src_presentation_web_8d676afa._.js.map} +1 -1
  232. package/web/.next/server/chunks/ssr/src_presentation_web_9a543843._.js +1 -1
  233. package/web/.next/server/chunks/ssr/src_presentation_web_9a543843._.js.map +1 -1
  234. package/web/.next/server/chunks/ssr/src_presentation_web_app_actions_7ab26c98._.js +3 -3
  235. package/web/.next/server/chunks/ssr/src_presentation_web_app_actions_adopt-local-directory_ts_75f1f28c._.js +1 -1
  236. package/web/.next/server/chunks/ssr/src_presentation_web_app_actions_adopt-local-directory_ts_75f1f28c._.js.map +1 -1
  237. package/web/.next/server/chunks/ssr/src_presentation_web_app_actions_approve-feature_ts_9453ce8b._.js +1 -1
  238. package/web/.next/server/chunks/ssr/src_presentation_web_app_actions_open-directory_ts_1209d917._.js +1 -1
  239. package/web/.next/server/chunks/ssr/src_presentation_web_app_actions_open-directory_ts_1209d917._.js.map +1 -1
  240. package/web/.next/server/chunks/ssr/src_presentation_web_app_features_feature-tree-page-client_tsx_34c5cbbf._.js +1 -1
  241. package/web/.next/server/chunks/ssr/src_presentation_web_b504e3e2._.js +1 -1
  242. package/web/.next/server/chunks/ssr/src_presentation_web_b504e3e2._.js.map +1 -1
  243. package/web/.next/server/chunks/ssr/src_presentation_web_b5838705._.js +1 -1
  244. package/web/.next/server/chunks/ssr/src_presentation_web_b5838705._.js.map +1 -1
  245. package/web/.next/server/chunks/ssr/src_presentation_web_b6b4baa1._.js +1 -1
  246. package/web/.next/server/chunks/ssr/src_presentation_web_b6b4baa1._.js.map +1 -1
  247. package/web/.next/server/chunks/ssr/src_presentation_web_c3d0de23._.js +1 -1
  248. package/web/.next/server/chunks/ssr/src_presentation_web_c3d0de23._.js.map +1 -1
  249. package/web/.next/server/chunks/ssr/src_presentation_web_components_66643378._.js +1 -1
  250. package/web/.next/server/chunks/ssr/src_presentation_web_components_66643378._.js.map +1 -1
  251. package/web/.next/server/chunks/ssr/src_presentation_web_components_common_base-drawer_base-drawer_tsx_97dfbbc8._.js +1 -1
  252. package/web/.next/server/chunks/ssr/src_presentation_web_components_common_base-drawer_base-drawer_tsx_97dfbbc8._.js.map +1 -1
  253. package/web/.next/server/chunks/ssr/src_presentation_web_components_features_skills_8a174cac._.js +1 -1
  254. package/web/.next/server/chunks/ssr/src_presentation_web_components_features_skills_8a174cac._.js.map +1 -1
  255. package/web/.next/server/chunks/ssr/src_presentation_web_fc29283f._.js +1 -1
  256. package/web/.next/server/chunks/ssr/src_presentation_web_fc29283f._.js.map +1 -1
  257. package/web/.next/server/pages/500.html +2 -2
  258. package/web/.next/server/server-reference-manifest.js +1 -1
  259. package/web/.next/server/server-reference-manifest.json +98 -98
  260. package/web/.next/static/chunks/{9614c6cb4480dffa.js → 0050f8c6bd563859.js} +1 -1
  261. package/web/.next/static/chunks/239f96d9c74a2c0e.js +1 -0
  262. package/web/.next/static/chunks/298bc02366dd29f6.js +1 -0
  263. package/web/.next/static/chunks/{0235baebfda5ff4f.js → 54faecaeb38604e9.js} +1 -1
  264. package/web/.next/static/chunks/{8fad14130e013cca.js → 5c76c495d17ba49d.js} +1 -1
  265. package/web/.next/static/chunks/{b76095aed26f711e.js → 651e062e92628d8a.js} +1 -1
  266. package/web/.next/static/chunks/669d597868dcffa7.js +1 -0
  267. package/web/.next/static/chunks/6b0e631a0721cc7b.js +1 -0
  268. package/web/.next/static/chunks/{1d66cd1dc949253b.js → 6b70e5c333a5044a.js} +3 -3
  269. package/web/.next/static/chunks/{63fa14ff9d43de5b.js → 74b8a8f4b4145390.js} +1 -1
  270. package/web/.next/static/chunks/{f1247fc826bfc874.js → 759e570a89f52936.js} +1 -1
  271. package/web/.next/static/chunks/81b70439f2c162aa.js +1 -0
  272. package/web/.next/static/chunks/8359874b37b80bd2.js +1 -0
  273. package/web/.next/static/chunks/{313b0e3a5235fabd.js → 89a3c6dffb7d3501.js} +1 -1
  274. package/web/.next/static/chunks/{e48a6b334cdf53ce.js → 8bd9980bf65002e6.js} +1 -1
  275. package/web/.next/static/chunks/{6c6daa1eb10a7f67.js → 95e71bd36a2166d0.js} +1 -1
  276. package/web/.next/static/chunks/{6800026a05c5ce29.js → 9968fecdcb083723.js} +1 -1
  277. package/web/.next/static/chunks/{76cd042201cad39c.js → b22c837d3ed3bdfe.js} +1 -1
  278. package/web/.next/static/chunks/{96662fc50bc09292.js → b3e5194e41047fc3.js} +1 -1
  279. package/web/.next/static/chunks/b6fd1b3110ccc340.js +1 -0
  280. package/web/.next/static/chunks/ba06f5ed6ea82840.js +1 -0
  281. package/web/.next/static/chunks/{aebfd87d80d8b2a5.js → bcba5fdd47b06d36.js} +1 -1
  282. package/web/.next/static/chunks/{9a29f05df861459b.js → c2b2ca0c163f4806.js} +1 -1
  283. package/web/.next/static/chunks/{102d8c48d7767608.js → c374f1981d2ab63d.js} +1 -1
  284. package/web/.next/static/chunks/{464e47865e4c5682.js → c61a7e8204559832.js} +1 -1
  285. package/web/.next/static/chunks/{55daeda060e0a94c.js → c8dc94ffb074fecf.js} +1 -1
  286. package/web/.next/static/chunks/{84aeb6cca97c1a62.js → ca2d1d848994190c.js} +1 -1
  287. package/web/.next/static/chunks/{bedcd3aeb7705af1.js → d8e7c392fbf649d1.js} +1 -1
  288. package/web/.next/static/chunks/{d791522fb2393144.js → dbabd908bd2eb608.js} +1 -1
  289. package/web/.next/static/chunks/{575414c8f8e54272.js → dbf6f88bd4dd0059.js} +1 -1
  290. package/web/.next/static/chunks/{e7e7f8f4fc14e58f.js → dc12950bd69d798b.js} +1 -1
  291. package/web/.next/static/chunks/{578b439d55fb4e0f.js → e905629da45b8d96.js} +1 -1
  292. package/web/.next/static/chunks/{c34e66253c4cac16.js → eee2cfbb53f2dc4d.js} +1 -1
  293. package/web/.next/static/chunks/f7c208c766b52c5d.js +1 -0
  294. package/web/.next/static/chunks/002432769b97fabb.js +0 -1
  295. package/web/.next/static/chunks/056c4d492ee6cac7.js +0 -1
  296. package/web/.next/static/chunks/0d8135ee354a3b8e.js +0 -1
  297. package/web/.next/static/chunks/14290d84d004fdb8.js +0 -1
  298. package/web/.next/static/chunks/4e3475e4a3c4d42b.js +0 -1
  299. package/web/.next/static/chunks/7e8e95a6c58eb733.js +0 -1
  300. package/web/.next/static/chunks/8a3a5f7c77067c87.js +0 -1
  301. package/web/.next/static/chunks/997b8c166f435eae.js +0 -1
  302. package/web/.next/static/chunks/df5714231d727c3d.js +0 -1
  303. /package/web/.next/static/{IbutHkuUs18Kqt37lpak1 → T9D48ReTacJEznN7ua4Ed}/_buildManifest.js +0 -0
  304. /package/web/.next/static/{IbutHkuUs18Kqt37lpak1 → T9D48ReTacJEznN7ua4Ed}/_clientMiddlewareManifest.json +0 -0
  305. /package/web/.next/static/{IbutHkuUs18Kqt37lpak1 → T9D48ReTacJEznN7ua4Ed}/_ssgManifest.js +0 -0
@@ -1 +1 @@
1
- (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,440106,e=>{"use strict";var t=e.i(679606),r=e.i(152155),a=e.i(711719),i=e.i(935946),l=e.i(83428),s=e.i(542049),n=e.i(453360),o=e.i(941698),c=e.i(99105),d=e.i(723925),p=e.i(860253);e.i(541001);var u=e.i(64780),h=e.i(131777),x=e.i(508893);let m=(0,x.createServerReference)("40d993b7b639b8192cf9c2379d8495e935a28c01e3",x.callServer,void 0,x.findSourceMapURL,"createProjectAndFeature"),g=(0,x.createServerReference)("400563877b65b8405e110423416f53afcf48291689",x.callServer,void 0,x.findSourceMapURL,"createApplication");var f=e.i(41413);e.i(650032);var b=e.i(486254);e.i(692233);var v=e.i(210025),j=e.i(102828),y=e.i(470646),w=e.i(731151);let k=["application","fast","spec"],N={application:{icon:s.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:n.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:o.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:s,onClose:n,className:o}){let{t:x}=(0,u.useTranslation)("web"),[C,D]=(0,r.useState)(""),[A,P]=(0,r.useState)(void 0),[S,L]=(0,r.useState)(void 0),[_,T]=(0,r.useState)("application"),[M,R]=(0,r.useState)(!1),[E,O]=(0,r.useState)(null),[I,F]=(0,r.useState)(!1),z=(0,r.useRef)(null),$=(0,w.useAttachments)(),B=!!e,H=B?_:"application",Z=(0,r.useCallback)(()=>{T(e=>{let t=k.indexOf(e);return k[(t+1)%k.length]})},[]);(0,r.useEffect)(()=>{let t=t=>{"Escape"===t.key&&n&&n(),"Tab"===t.key&&t.shiftKey&&e&&(t.preventDefault(),Z())};return window.addEventListener("keydown",t),()=>window.removeEventListener("keydown",t)},[n,Z,e]);let V=(0,r.useCallback)(async()=>{if(C.trim()&&!M){R(!0),O(null);try{if("application"!==H&&e){let t=await m({description:C.trim(),attachments:$.completedAttachments.map(e=>({path:e.path,name:e.name,notes:e.notes})),agentType:A,model:S,fast:"fast"===H});if(t.error){O(t.error),R(!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 g({description:C.trim(),agentType:A,modelOverride:S,initialPrompt:C.trim()});if(e.error){O(e.error),R(!1);return}e.application&&s?.(e.application.id)}}catch{O("Something went wrong. Please try again."),R(!1)}}},[C,M,H,$.completedAttachments,A,S,e,s]),W=(0,r.useCallback)(e=>{"Enter"===e.key&&(e.ctrlKey||e.metaKey)&&(e.preventDefault(),V())},[V]),U=(0,r.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 r=await t.json();$.addAttachment(r)}}catch{}},[$.addAttachment]),G=(0,r.useCallback)(e=>{D(e),z.current?.focus()},[]),K=N[H],q=K.icon;return(0,t.jsxs)("div",{"data-testid":"control-center-empty-state",className:(0,h.cn)("relative flex h-full w-full flex-col items-center justify-center overflow-hidden px-8",o),children:[(0,t.jsx)("div",{className:"onboard-bg pointer-events-none absolute inset-0 animate-[onboard-fade-in_1.2s_ease-out_both]"}),n?(0,t.jsx)("button",{type:"button",onClick:n,"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)(p.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:()=>F(!0),onBlur:()=>F(!1),onDragEnter:$.handleDragEnter,onDragLeave:$.handleDragLeave,onDragOver:$.handleDragOver,onDrop:$.handleDrop,className:(0,h.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]",I&&"ring-ring/50 border-ring shadow-md ring-[3px] dark:border-orange-500/40 dark:ring-orange-500/25",$.isDragOver&&"border-primary/50 bg-primary/5",M&&"opacity-70"),children:[(0,t.jsx)("textarea",{ref:z,rows:2,autoFocus:!0,value:C,onChange:e=>D(e.target.value),onKeyDown:W,onPaste:$.handlePaste,placeholder:K.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"}),$.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:$.attachments.map(e=>(0,t.jsx)(b.AttachmentChip,{name:e.name,size:e.size,mimeType:e.mimeType,path:e.path,onRemove:()=>$.removeAttachment(e.id),loading:e.loading,notes:e.notes,onNotesChange:t=>$.updateNotes(e.id,t)},e.id))}):null,$.uploadError?(0,t.jsx)("p",{className:"text-destructive px-4 pb-2 text-xs",children:$.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)(f.AgentModelPicker,{initialAgentType:A??"claude-code",initialModel:S??"claude-sonnet-4-6",mode:"override",showInstallStatus:!0,onAgentModelChange:(e,t)=>{P(e),L(t)},className:"w-55"}),(0,t.jsx)("div",{className:"flex-1"}),B?(0,t.jsxs)(y.DropdownMenu,{children:[(0,t.jsx)(y.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)(q,{className:"h-3.5 w-3.5"}),K.label]},H),(0,t.jsx)(c.ChevronDown,{className:"h-3 w-3 opacity-50"})]})}),(0,t.jsx)(y.DropdownMenuContent,{align:"end",className:"min-w-[160px]",children:k.map(e=>{let r=N[e],a=r.icon,i=H===e;return(0,t.jsxs)(y.DropdownMenuItem,{onClick:()=>T(e),"data-testid":`build-mode-${e}`,className:"flex items-center gap-2",children:[(0,t.jsx)(a,{className:"h-3.5 w-3.5"}),(0,t.jsx)("span",{className:"flex-1",children:r.label}),i?(0,t.jsx)(d.Check,{className:"text-foreground h-3.5 w-3.5"}):null]},e)})})]}):null,(0,t.jsxs)(j.Tooltip,{children:[(0,t.jsx)(j.TooltipTrigger,{asChild:!0,children:(0,t.jsx)("button",{type:"button",onClick:U,disabled:M,"aria-label":x("chat.attachFiles"),className:"text-muted-foreground hover:text-foreground cursor-pointer rounded p-1 transition-colors disabled:opacity-50",children:(0,t.jsx)(i.Paperclip,{className:"h-4 w-4"})})}),(0,t.jsx)(j.TooltipContent,{side:"top",children:x("chat.attachFiles")})]}),(0,t.jsx)("button",{type:"button",onClick:V,disabled:!C.trim()||M,className:(0,h.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)(l.Loader2,{className:"h-3.5 w-3.5 animate-spin"}):(0,t.jsx)(a.SendHorizontal,{className:"h-3.5 w-3.5"})})]})]}),E?(0,t.jsx)("p",{className:"text-destructive mt-2 text-center text-sm",children:E}):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:K.suggestions.map(e=>(0,t.jsx)("button",{type:"button",onClick:()=>G(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))},H)]})]})}e.s(["ControlCenterEmptyState",()=>C],440106)},314892,e=>{"use strict";var t=e.i(508893);let r=(0,t.createServerReference)("40d52ea77727030ec5957fd373cb05aeb61f0c9a26",t.callServer,void 0,t.findSourceMapURL,"deleteApplication");e.s(["deleteApplication",()=>r])},370002,942616,e=>{"use strict";var t=e.i(215131);function r(e,t,r,a){return"processing"===t?{label:"In Progress",dotClass:"bg-violet-500",borderClass:"",pulse:!0,previewDisabled:!0}:"awaiting_input"===t?{label:"Action Required",dotClass:"bg-amber-500",borderClass:"border-amber-500/60",pulse:!0,previewDisabled:!0}:"interrupted"===a?{label:"Interrupted",dotClass:"bg-amber-500",borderClass:"border-amber-500/60",pulse:!1,previewDisabled:!0}:"failed"===a?{label:"Failed",dotClass:"bg-red-500",borderClass:"border-red-500/60",pulse:!1,previewDisabled:!0}:"building"===a?{label:"In Progress",dotClass:"bg-violet-500",borderClass:"",pulse:!0,previewDisabled:!0}:r?{label:"Live",dotClass:"bg-emerald-500",borderClass:"",pulse:!0,previewDisabled:!1}:"Error"===e?{label:"Error",dotClass:"bg-red-500",borderClass:"border-red-500/60",pulse:!1,previewDisabled:!0}:{label:"Ready",dotClass:"bg-sky-500",borderClass:"",pulse:!1,previewDisabled:!1}}e.s(["TriangleAlert",()=>t.default],370002),e.s(["deriveAppLiveStatus",()=>r],942616)},672971,e=>{"use strict";function t(e){return`app-${e}`}e.s(["featureIdForApplication",()=>t])},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)},74573,e=>{"use strict";var t=e.i(679606),r=e.i(317406);function a({d:e,...r}){return(0,t.jsx)("svg",{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",...r,"aria-hidden":"true",children:(0,t.jsx)("path",{d:e})})}function i(e){return(0,t.jsx)(a,{d:"M12 .297c-6.63 0-12 5.373-12 12 0 5.303 3.438 9.8 8.205 11.385.6.113.82-.258.82-.577 0-.285-.01-1.04-.015-2.04-3.338.724-4.042-1.61-4.042-1.61C4.422 18.07 3.633 17.7 3.633 17.7c-1.087-.744.084-.729.084-.729 1.205.084 1.838 1.236 1.838 1.236 1.07 1.835 2.809 1.305 3.495.998.108-.776.417-1.305.76-1.605-2.665-.3-5.466-1.332-5.466-5.93 0-1.31.465-2.38 1.235-3.22-.135-.303-.54-1.523.105-3.176 0 0 1.005-.322 3.3 1.23.96-.267 1.98-.399 3-.405 1.02.006 2.04.138 3 .405 2.28-1.552 3.285-1.23 3.285-1.23.645 1.653.24 2.873.12 3.176.765.84 1.23 1.91 1.23 3.22 0 4.61-2.805 5.625-5.475 5.92.42.36.81 1.096.81 2.22 0 1.606-.015 2.896-.015 3.286 0 .315.21.69.825.57C20.565 22.092 24 17.592 24 12.297c0-6.627-5.373-12-12-12",...e})}let l={[r.CloudDeploymentProvider.CloudflarePages]:function(e){return(0,t.jsx)(a,{d:"M10.715 14.32H5.442l-.64-1.203L13.673 0l1.397.579-1.752 9.112h5.24l.648 1.192L10.719 24l-1.412-.54ZM4.091 5.448a.5787.5787 0 1 1 0-1.1574.5787.5787 0 0 1 0 1.1574zm1.543 0a.5787.5787 0 1 1 0-1.1574.5787.5787 0 0 1 0 1.1574zm1.544 0a.5787.5787 0 1 1 0-1.1574.5787.5787 0 0 1 0 1.1574zm8.657-2.7h5.424l.772.771v16.975l-.772.772h-7.392l.374-.579h6.779l.432-.432V3.758l-.432-.432h-4.676l-.552 2.85h-.59l.529-2.877.108-.552ZM2.74 21.265l-.772-.772V3.518l.772-.771h7.677l-.386.579H2.98l-.432.432v16.496l.432.432h5.586l-.092.579zm1.157-1.93h3.28l-.116.58h-3.55l-.192-.193v-3.473l.578 1.158zm13.117 0 .579.58H14.7l.385-.58z",...e})},[r.CloudDeploymentProvider.Vercel]:function(e){return(0,t.jsx)(a,{d:"m12 1.608 12 20.784H0Z",...e})},[r.CloudDeploymentProvider.Netlify]:function(e){return(0,t.jsx)(a,{d:"M6.49 19.04h-.23L5.13 17.9v-.23l1.73-1.71h1.2l.15.15v1.2L6.5 19.04ZM5.13 6.31V6.1l1.13-1.13h.23L8.2 6.68v1.2l-.15.15h-1.2L5.13 6.31Zm9.96 9.09h-1.65l-.14-.13v-3.83c0-.68-.27-1.2-1.1-1.23-.42 0-.9 0-1.43.02l-.07.08v4.96l-.14.14H8.9l-.13-.14V8.73l.13-.14h3.7a2.6 2.6 0 0 1 2.61 2.6v4.08l-.13.14Zm-8.37-2.44H.14L0 12.82v-1.64l.14-.14h6.58l.14.14v1.64l-.14.14Zm17.14 0h-6.58l-.14-.14v-1.64l.14-.14h6.58l.14.14v1.64l-.14.14ZM11.05 6.55V1.64l.14-.14h1.65l.14.14v4.9l-.14.14h-1.65l-.14-.13Zm0 15.81v-4.9l.14-.14h1.65l.14.13v4.91l-.14.14h-1.65l-.14-.14Z",...e})},[r.CloudDeploymentProvider.AwsAmplify]:function(e){return(0,t.jsx)(a,{d:"M11.58 2.1 1.15 20.87h4.33l1.9-3.5h9.24l1.9 3.5h4.33L12.42 2.1h-.84Zm.42 5.6 3.12 5.73H8.88L12 7.7Z",...e})},[r.CloudDeploymentProvider.GcpCloudRun]:function(e){return(0,t.jsx)(a,{d:"M12.19 2.38a9.344 9.344 0 0 0-9.234 6.893c.053-.02-.055.013 0 0-3.875 2.551-3.922 8.11-.247 10.941l.006-.007-.007.03a6.717 6.717 0 0 0 4.077 1.356h5.173l.03.03h5.192c6.687.053 9.376-8.605 3.835-12.35a9.365 9.365 0 0 0-2.821-4.552l-.043.043.006-.05A9.344 9.344 0 0 0 12.19 2.38zm-.358 4.146c1.244-.04 2.518.368 3.486 1.15a5.186 5.186 0 0 1 1.862 4.078v.518c3.53-.07 3.53 5.262 0 5.193h-5.193l-.008.009v-.04H6.785a2.59 2.59 0 0 1-1.067-.23h.001a2.597 2.597 0 1 1 3.437-3.437l3.013-3.012A6.747 6.747 0 0 0 8.11 8.24c.018-.01.04-.026.054-.023a5.186 5.186 0 0 1 3.67-1.69z",...e})}},s={[r.CloudDeploymentProvider.CloudflarePages]:"#F38020",[r.CloudDeploymentProvider.Vercel]:"#000000",[r.CloudDeploymentProvider.Netlify]:"#00C7B7",[r.CloudDeploymentProvider.AwsAmplify]:"#FF9900",[r.CloudDeploymentProvider.GcpCloudRun]:"#4285F4"};e.s(["CLOUD_PROVIDER_BRAND_HEX",0,s,"CLOUD_PROVIDER_ICONS",0,l,"GitHubIcon",()=>i])},453721,e=>{"use strict";var t=e.i(679606),r=e.i(152155),a=e.i(711434),i=e.i(962885),l=e.i(619933),s=e.i(382569),n=e.i(542049),o=e.i(83428),c=e.i(3214),d=e.i(853756),p=e.i(131777),u=e.i(873504),h=e.i(175921),x=e.i(440106),m=e.i(958481),g=e.i(383379),f=e.i(730702);let b=(0,e.i(903645).default)("folder-git-2",[["path",{d:"M18 19a5 5 0 0 1-5-5v8",key:"sz5oeg"}],["path",{d:"M9 20H4a2 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.9H20a2 2 0 0 1 2 2v5",key:"1w6njk"}],["circle",{cx:"13",cy:"12",r:"2",key:"1j92g6"}],["circle",{cx:"20",cy:"19",r:"2",key:"1obnsp"}]]);var v=e.i(32494),j=e.i(731463),y=e.i(724042),w=e.i(43416),k=e.i(267669),N=e.i(370002),C=e.i(453360),D=e.i(434682),A=e.i(360112),P=e.i(735364),S=e.i(602287),L=e.i(470646),_=e.i(314892),T=e.i(942616),M=e.i(680554),R=e.i(8537),E=e.i(317406),O=e.i(672971),I=e.i(74573);let F="rgba(255,255,255,0.13)",z="rgba(255,255,255,0.07)",$="rgba(255,255,255,0.04)",B=[function(){return(0,t.jsxs)("svg",{viewBox:"0 0 320 160",className:"h-full w-full","aria-hidden":"true",children:[Array.from({length:8},(e,r)=>Array.from({length:16},(e,a)=>(0,t.jsx)("circle",{cx:10+20*a,cy:10+20*r,r:"1.5",fill:z},`${r}-${a}`))),(0,t.jsx)("circle",{cx:"240",cy:"56",r:"52",fill:"none",stroke:$,strokeWidth:"1"}),(0,t.jsx)("circle",{cx:"240",cy:"56",r:"32",fill:"none",stroke:F,strokeWidth:"0.8"}),(0,t.jsx)("circle",{cx:"60",cy:"112",r:"14",fill:"none",stroke:z,strokeWidth:"1"}),(0,t.jsx)("circle",{cx:"60",cy:"112",r:"6",fill:$})]})},function(){return(0,t.jsxs)("svg",{viewBox:"0 0 320 160",className:"h-full w-full","aria-hidden":"true",children:[[24,48,72,96,120].map((e,r)=>(0,t.jsx)("path",{d:`M0,${e} C64,${e-18+4*r} 128,${e+18-3*r} 192,${e-12+2*r} S288,${e+14} 320,${e}`,fill:"none",stroke:2===r?F:z,strokeWidth:2===r?1.5:1},`wave-${e}`)),(0,t.jsx)("path",{d:"M0,72 C64,54 128,90 192,60 S288,86 320,72 L320,160 L0,160 Z",fill:$}),(0,t.jsx)("circle",{cx:"290",cy:"30",r:"18",fill:"none",stroke:z,strokeWidth:"1"})]})},function(){return(0,t.jsxs)("svg",{viewBox:"0 0 320 160",className:"h-full w-full","aria-hidden":"true",children:[(0,t.jsx)("circle",{cx:"160",cy:"160",r:"120",fill:"none",stroke:$,strokeWidth:"40"}),(0,t.jsx)("circle",{cx:"100",cy:"60",r:"70",fill:"none",stroke:z,strokeWidth:"1"}),(0,t.jsx)("circle",{cx:"220",cy:"80",r:"55",fill:"none",stroke:F,strokeWidth:"1"}),(0,t.jsx)("polygon",{points:"160,18 196,60 160,102 124,60",fill:"none",stroke:z,strokeWidth:"1"}),(0,t.jsx)("circle",{cx:"20",cy:"20",r:"2",fill:F}),(0,t.jsx)("circle",{cx:"300",cy:"20",r:"2",fill:F}),(0,t.jsx)("circle",{cx:"20",cy:"140",r:"2",fill:F}),(0,t.jsx)("circle",{cx:"300",cy:"140",r:"2",fill:F})]})},function(){let e=[];for(let r=32;r<320;r+=32)e.push((0,t.jsx)("line",{x1:r,y1:"0",x2:r,y2:"160",stroke:$,strokeWidth:"1"},`v${r}`));for(let r=32;r<160;r+=32)e.push((0,t.jsx)("line",{x1:"0",y1:r,x2:"320",y2:r,stroke:$,strokeWidth:"1"},`h${r}`));return(0,t.jsxs)("svg",{viewBox:"0 0 320 160",className:"h-full w-full","aria-hidden":"true",children:[e,[20,40,64,90].map(e=>(0,t.jsx)("circle",{cx:"160",cy:"80",r:e,fill:"none",stroke:40===e?F:z,strokeWidth:"1"},e)),(0,t.jsx)("circle",{cx:"160",cy:"80",r:"4",fill:F})]})}];function H({name:e}){let r=B[function(e){let t=0x811c9dc5;for(let r=0;r<e.length;r++)t^=e.charCodeAt(r),t=Math.imul(t,0x1000193)>>>0;return t}(e)%B.length];return(0,t.jsx)(r,{})}function Z({application:i,className:l}){let s=(0,a.useRouter)(),n=(0,D.useQueryClient)(),[c,d]=(0,r.useState)(!1),u=(0,M.useTurnStatus)((0,O.featureIdForApplication)(i.id)),h=(0,R.useDeployAction)({targetId:i.id,targetType:"application",repositoryPath:i.repositoryPath}),x=h.url,F=(0,T.deriveAppLiveStatus)(i.status,u,!!x,i.effectiveStatus),z=i.cloudDeploymentUrl??null,$=i.cloudDeploymentProvider??null,B=$?I.CLOUD_PROVIDER_ICONS[$]:null,Z=$?I.CLOUD_PROVIDER_BRAND_HEX[$]:void 0,V=i.cloudDeploymentStatus===E.CloudDeploymentStatus.Deployed&&!!z,W=i.cloudDeploymentStatus===E.CloudDeploymentStatus.Uploading,U=i.cloudDeploymentStatus===E.CloudDeploymentStatus.Failed,G="building"===i.effectiveStatus,K="interrupted"===i.effectiveStatus,q="failed"===i.effectiveStatus,Q=h.status===E.DeploymentState.Booting||h.deployLoading,X=h.status===E.DeploymentState.Ready&&!!x,J=X?x:V?z:null,Y=!!J,ee=()=>s.push(`/application/${i.id}`),et=i.repositoryPath.split(/[/\\]/).pop()??i.repositoryPath;return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)("article",{"data-testid":"application-card",onClick:ee,className:(0,p.cn)("group relative flex cursor-pointer flex-col overflow-hidden rounded-sm","bg-card dark:bg-neutral-900","border-border/60 border shadow-sm dark:border-white/10","hover:border-border transition-all duration-200 hover:shadow-lg dark:hover:border-white/20 dark:hover:shadow-black/40","min-h-[280px]",l),children:[(0,t.jsxs)("div",{className:"relative overflow-hidden",style:{height:160},children:[Y?(0,t.jsxs)("div",{className:"absolute inset-0 bg-white dark:bg-neutral-900",children:[(0,t.jsx)("iframe",{src:J,title:`${i.name} preview`,className:"pointer-events-none absolute top-0 left-0 origin-top-left border-0",style:{width:"250%",height:"250%",transform:"scale(0.4)"},sandbox:"allow-same-origin allow-scripts",loading:"lazy"}),(0,t.jsxs)("div",{className:"absolute inset-0 flex items-center justify-center gap-2 bg-black/60 opacity-0 transition-opacity group-hover:opacity-100",onClick:e=>e.stopPropagation(),children:[X?(0,t.jsxs)("button",{type:"button",onClick:()=>void h.stop(),disabled:h.stopLoading,className:"inline-flex h-7 cursor-pointer items-center gap-1 rounded-full bg-white/90 px-3 text-[11px] font-semibold text-neutral-900 hover:bg-red-50 hover:text-red-600",children:[h.stopLoading?(0,t.jsx)(o.Loader2,{className:"h-3 w-3 animate-spin"}):(0,t.jsx)(w.RefreshCw,{className:"h-3 w-3"}),"Stop"]}):null,(0,t.jsxs)("button",{type:"button",onClick:()=>window.open(J,"_blank","noopener,noreferrer"),className:"inline-flex h-7 cursor-pointer items-center gap-1 rounded-full bg-white/90 px-3 text-[11px] font-semibold text-neutral-900 hover:bg-white",children:[(0,t.jsx)(f.ExternalLink,{className:"h-3 w-3"}),"Open"]})]})]}):Q?(0,t.jsx)("div",{className:"absolute inset-0 bg-white dark:bg-neutral-900",children:(0,t.jsxs)("div",{className:"flex h-full flex-col items-center justify-center gap-2",children:[(0,t.jsx)(o.Loader2,{className:"h-6 w-6 animate-spin text-amber-500"}),(0,t.jsx)("span",{className:"text-[11px] font-medium text-amber-600 dark:text-amber-400",children:"Starting…"})]})}):(0,t.jsx)("div",{className:"absolute inset-0 overflow-hidden bg-[#111827] dark:bg-neutral-800",children:(0,t.jsx)(H,{name:i.name})}),(0,t.jsx)("div",{className:"absolute top-2.5 left-2.5",onClick:e=>e.stopPropagation(),children:V?(0,t.jsxs)("span",{className:"flex items-center gap-1 rounded-full bg-black/30 px-2 py-0.5 text-[9px] font-bold tracking-wider text-white uppercase backdrop-blur-sm",children:[B?(0,t.jsx)(B,{className:"h-3 w-3",style:{color:Z??"#fff"}}):(0,t.jsx)("span",{className:"h-1.5 w-1.5 animate-pulse rounded-full bg-emerald-400"}),"Live"]}):W?(0,t.jsxs)("span",{className:"flex items-center gap-1 rounded-full bg-black/30 px-2 py-0.5 text-[9px] font-bold tracking-wider text-white/80 uppercase backdrop-blur-sm",children:[(0,t.jsx)(o.Loader2,{className:"h-2.5 w-2.5 animate-spin"}),"Deploying"]}):G?(0,t.jsxs)("span",{className:"flex items-center gap-1 rounded-full bg-black/30 px-2 py-0.5 text-[9px] font-bold tracking-wider text-white/80 uppercase backdrop-blur-sm",children:[(0,t.jsx)(C.Zap,{className:"h-2.5 w-2.5"}),"Building"]}):F.pulse?(0,t.jsxs)("span",{className:"relative flex h-2 w-2",children:[(0,t.jsx)("span",{className:(0,p.cn)("absolute inline-flex h-full w-full animate-ping rounded-full opacity-75",F.dotClass)}),(0,t.jsx)("span",{className:(0,p.cn)("relative inline-flex h-2 w-2 rounded-full",F.dotClass)})]}):null}),(0,t.jsx)("div",{className:"absolute top-2.5 right-2.5",onClick:e=>e.stopPropagation(),children:(0,t.jsxs)(L.DropdownMenu,{children:[(0,t.jsx)(L.DropdownMenuTrigger,{asChild:!0,children:(0,t.jsx)("button",{type:"button",className:"flex h-6 w-6 cursor-pointer items-center justify-center rounded-full bg-black/30 text-white/80 opacity-0 backdrop-blur-sm transition-opacity group-hover:opacity-100 hover:bg-black/50",children:(0,t.jsx)(j.MoreHorizontal,{className:"h-3.5 w-3.5"})})}),(0,t.jsx)(L.DropdownMenuContent,{align:"end",sideOffset:4,children:(0,t.jsxs)(L.DropdownMenuItem,{className:"text-destructive focus:text-destructive cursor-pointer",onClick:()=>d(!0),children:[(0,t.jsx)(k.Trash2,{className:"mr-2 h-3.5 w-3.5"}),"Delete"]})})]})})]}),(0,t.jsxs)("div",{className:"flex flex-1 flex-col gap-1.5 px-3.5 pt-3 pb-0",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)("h3",{className:"text-foreground line-clamp-1 text-[14px] leading-tight font-semibold",children:i.name}),i.description?(0,t.jsx)("p",{className:"text-muted-foreground mt-0.5 line-clamp-1 text-[11px] leading-relaxed",children:i.description}):null]}),W?(0,t.jsxs)("div",{className:"flex items-center gap-1.5 py-0.5",children:[(0,t.jsx)(o.Loader2,{className:"text-muted-foreground h-3 w-3 shrink-0 animate-spin"}),(0,t.jsxs)("span",{className:"text-muted-foreground text-[11px]",children:["Deploying to ",$??"cloud","…"]})]}):U?(0,t.jsxs)("div",{className:"flex items-center gap-1.5 py-0.5",children:[(0,t.jsx)(m.AlertTriangle,{className:"text-destructive/70 h-3 w-3 shrink-0"}),(0,t.jsx)("span",{className:"text-destructive/80 text-[11px]",children:"Deployment failed"})]}):G?(0,t.jsxs)("div",{className:"flex items-center gap-1.5 py-0.5",children:[(0,t.jsx)(C.Zap,{className:"text-muted-foreground h-3 w-3 shrink-0"}),(0,t.jsx)("span",{className:"text-muted-foreground text-[11px]",children:"Building with AI…"}),(0,t.jsx)("div",{className:"ml-auto flex gap-0.5",children:[0,1,2].map(e=>(0,t.jsx)("span",{className:"bg-muted-foreground/40 h-1 w-1 animate-bounce rounded-full",style:{animationDelay:`${120*e}ms`}},e))})]}):K?(0,t.jsxs)("div",{className:"flex items-center gap-1.5 py-0.5",children:[(0,t.jsx)(m.AlertTriangle,{className:"h-3 w-3 shrink-0 text-amber-500/70"}),(0,t.jsx)("span",{className:"text-muted-foreground text-[11px]",children:"Build interrupted"})]}):q?(0,t.jsxs)("div",{className:"flex items-center gap-1.5 py-0.5",children:[(0,t.jsx)(N.TriangleAlert,{className:"text-destructive/70 h-3 w-3 shrink-0"}),(0,t.jsx)("span",{className:"text-muted-foreground text-[11px]",children:"Build failed"})]}):V?null:(0,t.jsxs)("div",{className:"flex items-center gap-1.5 py-0.5",children:[(0,t.jsx)(v.Globe,{className:"text-muted-foreground/40 h-3 w-3 shrink-0"}),(0,t.jsx)("span",{className:"text-muted-foreground/60 text-[11px]",children:"Not deployed yet"})]})]}),(0,t.jsxs)("div",{className:"flex items-center gap-2 px-3.5 pt-2 pb-3",onClick:e=>e.stopPropagation(),children:[(0,t.jsxs)("div",{className:"flex min-w-0 flex-1 items-center gap-2",children:[(0,t.jsxs)("button",{type:"button",title:i.repositoryPath,onClick:async t=>{t.stopPropagation();let{openDirectory:r}=await e.A(127062);await r(i.repositoryPath)},className:"text-muted-foreground/70 hover:text-foreground inline-flex shrink-0 items-center gap-1 text-[10px] transition-colors",children:[(0,t.jsx)(b,{className:"h-3 w-3 shrink-0"}),(0,t.jsx)("span",{className:"max-w-[80px] truncate",children:et})]}),z?(0,t.jsxs)("a",{href:z,target:"_blank",rel:"noopener noreferrer",title:z,className:"text-muted-foreground/70 hover:text-foreground inline-flex min-w-0 items-center gap-1 text-[10px] transition-colors",children:[B?(0,t.jsx)(B,{className:"h-3 w-3 shrink-0",style:{color:Z}}):(0,t.jsx)(v.Globe,{className:"h-3 w-3 shrink-0"}),(0,t.jsx)("span",{className:"font-mono",children:function(e,t=22){let r=e.replace(/^https?:\/\//,"").replace(/\/$/,"");if(r.length<=t)return r;let a=r.slice(-(t-6));return`${r.slice(0,5)}…${a}`}(z)})]}):null]}),G||W?(0,t.jsxs)("span",{className:"text-muted-foreground inline-flex shrink-0 items-center gap-1.5 text-[11px]",children:[(0,t.jsx)(o.Loader2,{className:"h-3 w-3 animate-spin"}),G?"Building…":"Deploying…"]}):z&&V?(0,t.jsxs)("a",{href:z,target:"_blank",rel:"noopener noreferrer",className:"bg-foreground text-background inline-flex h-7 shrink-0 cursor-pointer items-center gap-1.5 rounded-full px-3 text-[11px] font-semibold transition-opacity hover:opacity-80",children:[(0,t.jsx)(f.ExternalLink,{className:"h-3 w-3"}),"Open live"]}):K?(0,t.jsxs)("button",{type:"button",onClick:ee,className:"inline-flex h-7 shrink-0 cursor-pointer items-center gap-1.5 rounded-full bg-amber-500 px-3 text-[11px] font-semibold text-white transition-opacity hover:opacity-80",children:[(0,t.jsx)(y.Play,{className:"h-3 w-3 fill-current"}),"Continue"]}):q?(0,t.jsxs)("button",{type:"button",onClick:ee,className:"bg-destructive inline-flex h-7 shrink-0 cursor-pointer items-center gap-1.5 rounded-full px-3 text-[11px] font-semibold text-white transition-opacity hover:opacity-80",children:[(0,t.jsx)(g.ArrowRight,{className:"h-3 w-3"}),"View error"]}):(0,t.jsxs)("button",{type:"button",onClick:ee,className:"bg-foreground text-background inline-flex h-7 shrink-0 cursor-pointer items-center gap-1.5 rounded-full px-3 text-[11px] font-semibold transition-opacity hover:opacity-80",children:[(0,t.jsx)(g.ArrowRight,{className:"h-3 w-3"}),"Open"]})]})]}),(0,t.jsx)(S.Dialog,{open:c,onOpenChange:d,children:(0,t.jsxs)(S.DialogContent,{className:"max-w-xs",children:[(0,t.jsxs)(S.DialogHeader,{children:[(0,t.jsx)(S.DialogTitle,{children:"Delete application?"}),(0,t.jsxs)(S.DialogDescription,{children:["This will permanently remove ",(0,t.jsx)("strong",{children:i.name}),"."]})]}),(0,t.jsxs)(S.DialogFooter,{className:"grid grid-cols-2 gap-2 sm:flex-none",children:[(0,t.jsx)(S.DialogClose,{asChild:!0,children:(0,t.jsx)(P.Button,{variant:"outline",children:"Cancel"})}),(0,t.jsx)(P.Button,{variant:"destructive",onClick:async()=>{d(!1);let e=await (0,_.deleteApplication)(i.id);e.error?A.toast.error("Failed to delete",{description:e.error}):(A.toast.success("Application deleted"),n.invalidateQueries({queryKey:["applications"]}))},children:"Delete"})]})]})})]})}function V({className:l}){let s=(0,a.useRouter)(),c=(0,h.useFeatureFlags)(),[d,m]=(0,r.useState)(!1),{data:g=[],isLoading:f}=(0,i.useQuery)({queryKey:["applications"],queryFn:async()=>{let e=await fetch("/api/applications");if(!e.ok)throw Error("Failed to fetch applications");return e.json()},staleTime:3e4}),b=(0,r.useMemo)(()=>[...g].sort((e,t)=>new Date(t.createdAt).getTime()-new Date(e.createdAt).getTime()),[g]);return(0,t.jsx)(u.DeploymentStatusProvider,{initialDeployments:[],children:(0,t.jsxs)("div",{"data-testid":"applications-page-client",className:(0,p.cn)("relative flex min-h-full flex-col",l),children:[(0,t.jsxs)("div",{className:"flex flex-1 flex-col gap-4 p-6",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(n.LayoutGrid,{className:"text-muted-foreground h-4 w-4"}),(0,t.jsx)("h1",{className:"text-sm font-bold tracking-tight",children:"Applications"}),f?null:(0,t.jsxs)("span",{className:"text-muted-foreground text-[10px]",children:[g.length," ",1===g.length?"app":"apps"]})]}),f?(0,t.jsx)("div",{className:"flex items-center justify-center py-12",children:(0,t.jsx)(o.Loader2,{className:"text-muted-foreground h-5 w-5 animate-spin"})}):0===b.length?(0,t.jsx)("div",{className:"flex flex-1 items-center justify-center",children:(0,t.jsx)(x.ControlCenterEmptyState,{onApplicationCreated:e=>{s.push(`/application/${e}`)}})}):(0,t.jsxs)("div",{"data-testid":"applications-page-grid",className:"grid grid-cols-1 gap-4 sm:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4",children:[(0,t.jsx)(W,{onDescribe:()=>m(!0),onOpenLocalDirectory:async()=>{let{pickFolder:t}=await e.A(633405),r=await t();if(!r)return;let{adoptLocalDirectory:a}=await e.A(743797),i=await a({repositoryPath:r});i.applicationId&&s.push(`/application/${i.applicationId}`)},onImportGitHub:c.githubImport?()=>window.dispatchEvent(new CustomEvent("shep:open-github-import")):void 0}),b.map(e=>(0,t.jsx)(Z,{application:e},e.id))]})]}),d?(0,t.jsx)("div",{className:"absolute inset-0 z-40",children:(0,t.jsx)(x.ControlCenterEmptyState,{onApplicationCreated:e=>{s.push(`/application/${e}`)},onClose:()=>m(!1),className:"bg-background"})}):null]})})}function W({onDescribe:e,onOpenLocalDirectory:r,onImportGitHub:a}){let i=[{icon:(0,t.jsx)(d.Sparkles,{className:"h-4 w-4"}),label:"Describe with AI",description:"Tell Shep what to build — it scaffolds + ships",onClick:e,accent:"text-indigo-500 bg-indigo-100 dark:bg-indigo-900/60"},...r?[{icon:(0,t.jsx)(l.FolderOpen,{className:"h-4 w-4"}),label:"Open local project",description:"Pick an existing folder and continue from there",onClick:r,accent:"text-amber-600 bg-amber-100 dark:bg-amber-900/40"}]:[],...a?[{icon:(0,t.jsx)(s.Github,{className:"h-4 w-4"}),label:"Import from GitHub",description:"Connect an existing repo to manage here",onClick:a,accent:"text-foreground bg-muted"}]:[]];return(0,t.jsxs)("div",{className:(0,p.cn)("group relative flex cursor-pointer flex-col overflow-hidden rounded-sm border-2","border-dashed border-indigo-200 bg-transparent transition-all duration-200","hover:border-indigo-400 hover:bg-indigo-500/[0.03]","dark:border-indigo-900 dark:hover:border-indigo-700","min-h-[280px]"),onClick:e,children:[(0,t.jsxs)("div",{className:(0,p.cn)("absolute inset-0 flex flex-col items-center justify-center gap-3","transition-opacity duration-200 group-hover:opacity-0","pointer-events-none"),children:[(0,t.jsx)("div",{className:"flex h-11 w-11 items-center justify-center rounded-full bg-indigo-100 text-indigo-500 dark:bg-indigo-900/60 dark:text-indigo-400",children:(0,t.jsx)(c.Plus,{className:"h-5 w-5 stroke-[2]"})}),(0,t.jsxs)("div",{className:"text-center",children:[(0,t.jsx)("p",{className:"text-foreground text-sm font-semibold",children:"New application"}),(0,t.jsx)("p",{className:"text-muted-foreground mt-0.5 text-[11px]",children:"Click to get started"})]})]}),(0,t.jsxs)("div",{className:(0,p.cn)("absolute inset-0 flex flex-col justify-center gap-1.5 px-4","translate-y-3 opacity-0 transition-all duration-200","group-hover:translate-y-0 group-hover:opacity-100"),children:[(0,t.jsx)("p",{className:"text-muted-foreground mb-1 px-1 text-[10px] font-medium tracking-wide uppercase",children:"How would you like to start?"}),i.map(e=>(0,t.jsxs)("button",{type:"button",onClick:t=>{t.stopPropagation(),e.onClick()},className:(0,p.cn)("flex w-full cursor-pointer items-center gap-3 rounded-lg px-3 py-2.5 text-left","border-border/60 bg-background/80 border transition-all duration-150","hover:border-indigo-300 hover:bg-indigo-50 dark:hover:border-indigo-700 dark:hover:bg-indigo-950/40"),children:[(0,t.jsx)("span",{className:(0,p.cn)("flex h-7 w-7 shrink-0 items-center justify-center rounded-md",e.accent),children:e.icon}),(0,t.jsxs)("div",{className:"min-w-0",children:[(0,t.jsx)("div",{className:"text-foreground text-[12px] font-semibold",children:e.label}),(0,t.jsx)("div",{className:"text-muted-foreground truncate text-[10px]",children:e.description})]})]},e.label))]})]})}e.s(["ApplicationsPageClient",()=>V],453721)},127062,e=>{e.v(t=>Promise.all(["static/chunks/002432769b97fabb.js"].map(t=>e.l(t))).then(()=>t(617841)))},633405,e=>{e.v(e=>Promise.resolve().then(()=>e(478521)))},743797,e=>{e.v(t=>Promise.all(["static/chunks/6c6daa1eb10a7f67.js"].map(t=>e.l(t))).then(()=>t(868662)))}]);
1
+ (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,440106,e=>{"use strict";var t=e.i(679606),r=e.i(152155),a=e.i(711719),i=e.i(935946),l=e.i(83428),s=e.i(542049),n=e.i(453360),o=e.i(941698),d=e.i(99105),c=e.i(723925),p=e.i(860253);e.i(541001);var u=e.i(64780),h=e.i(131777),x=e.i(508893);let m=(0,x.createServerReference)("404d11f447570c4c40ed7cd741f5aaab23fb42790b",x.callServer,void 0,x.findSourceMapURL,"createProjectAndFeature"),g=(0,x.createServerReference)("4094b3b297a39575435b1380a65c24ec52b0acffd1",x.callServer,void 0,x.findSourceMapURL,"createApplication");var f=e.i(41413);e.i(650032);var b=e.i(486254);e.i(692233);var v=e.i(210025),j=e.i(102828),y=e.i(470646),w=e.i(731151);let k=["application","fast","spec"],N={application:{icon:s.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:n.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:o.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:s,onClose:n,className:o}){let{t:x}=(0,u.useTranslation)("web"),[C,D]=(0,r.useState)(""),[A,P]=(0,r.useState)(void 0),[S,L]=(0,r.useState)(void 0),[_,T]=(0,r.useState)("application"),[M,R]=(0,r.useState)(!1),[E,O]=(0,r.useState)(null),[I,F]=(0,r.useState)(!1),z=(0,r.useRef)(null),$=(0,w.useAttachments)(),B=!!e,H=B?_:"application",Z=(0,r.useCallback)(()=>{T(e=>{let t=k.indexOf(e);return k[(t+1)%k.length]})},[]);(0,r.useEffect)(()=>{let t=t=>{"Escape"===t.key&&n&&n(),"Tab"===t.key&&t.shiftKey&&e&&(t.preventDefault(),Z())};return window.addEventListener("keydown",t),()=>window.removeEventListener("keydown",t)},[n,Z,e]);let V=(0,r.useCallback)(async()=>{if(C.trim()&&!M){R(!0),O(null);try{if("application"!==H&&e){let t=await m({description:C.trim(),attachments:$.completedAttachments.map(e=>({path:e.path,name:e.name,notes:e.notes})),agentType:A,model:S,fast:"fast"===H});if(t.error){O(t.error),R(!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 g({description:C.trim(),agentType:A,modelOverride:S,initialPrompt:C.trim()});if(e.error){O(e.error),R(!1);return}e.application&&s?.(e.application.id)}}catch{O("Something went wrong. Please try again."),R(!1)}}},[C,M,H,$.completedAttachments,A,S,e,s]),W=(0,r.useCallback)(e=>{"Enter"===e.key&&(e.ctrlKey||e.metaKey)&&(e.preventDefault(),V())},[V]),U=(0,r.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 r=await t.json();$.addAttachment(r)}}catch{}},[$.addAttachment]),G=(0,r.useCallback)(e=>{D(e),z.current?.focus()},[]),K=N[H],q=K.icon;return(0,t.jsxs)("div",{"data-testid":"control-center-empty-state",className:(0,h.cn)("relative flex h-full w-full flex-col items-center justify-center overflow-hidden px-8",o),children:[(0,t.jsx)("div",{className:"onboard-bg pointer-events-none absolute inset-0 animate-[onboard-fade-in_1.2s_ease-out_both]"}),n?(0,t.jsx)("button",{type:"button",onClick:n,"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)(p.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:()=>F(!0),onBlur:()=>F(!1),onDragEnter:$.handleDragEnter,onDragLeave:$.handleDragLeave,onDragOver:$.handleDragOver,onDrop:$.handleDrop,className:(0,h.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]",I&&"ring-ring/50 border-ring shadow-md ring-[3px] dark:border-orange-500/40 dark:ring-orange-500/25",$.isDragOver&&"border-primary/50 bg-primary/5",M&&"opacity-70"),children:[(0,t.jsx)("textarea",{ref:z,rows:2,autoFocus:!0,value:C,onChange:e=>D(e.target.value),onKeyDown:W,onPaste:$.handlePaste,placeholder:K.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"}),$.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:$.attachments.map(e=>(0,t.jsx)(b.AttachmentChip,{name:e.name,size:e.size,mimeType:e.mimeType,path:e.path,onRemove:()=>$.removeAttachment(e.id),loading:e.loading,notes:e.notes,onNotesChange:t=>$.updateNotes(e.id,t)},e.id))}):null,$.uploadError?(0,t.jsx)("p",{className:"text-destructive px-4 pb-2 text-xs",children:$.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)(f.AgentModelPicker,{initialAgentType:A??"claude-code",initialModel:S??"claude-sonnet-4-6",mode:"override",showInstallStatus:!0,onAgentModelChange:(e,t)=>{P(e),L(t)},className:"w-55"}),(0,t.jsx)("div",{className:"flex-1"}),B?(0,t.jsxs)(y.DropdownMenu,{children:[(0,t.jsx)(y.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)(q,{className:"h-3.5 w-3.5"}),K.label]},H),(0,t.jsx)(d.ChevronDown,{className:"h-3 w-3 opacity-50"})]})}),(0,t.jsx)(y.DropdownMenuContent,{align:"end",className:"min-w-[160px]",children:k.map(e=>{let r=N[e],a=r.icon,i=H===e;return(0,t.jsxs)(y.DropdownMenuItem,{onClick:()=>T(e),"data-testid":`build-mode-${e}`,className:"flex items-center gap-2",children:[(0,t.jsx)(a,{className:"h-3.5 w-3.5"}),(0,t.jsx)("span",{className:"flex-1",children:r.label}),i?(0,t.jsx)(c.Check,{className:"text-foreground h-3.5 w-3.5"}):null]},e)})})]}):null,(0,t.jsxs)(j.Tooltip,{children:[(0,t.jsx)(j.TooltipTrigger,{asChild:!0,children:(0,t.jsx)("button",{type:"button",onClick:U,disabled:M,"aria-label":x("chat.attachFiles"),className:"text-muted-foreground hover:text-foreground cursor-pointer rounded p-1 transition-colors disabled:opacity-50",children:(0,t.jsx)(i.Paperclip,{className:"h-4 w-4"})})}),(0,t.jsx)(j.TooltipContent,{side:"top",children:x("chat.attachFiles")})]}),(0,t.jsx)("button",{type:"button",onClick:V,disabled:!C.trim()||M,className:(0,h.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)(l.Loader2,{className:"h-3.5 w-3.5 animate-spin"}):(0,t.jsx)(a.SendHorizontal,{className:"h-3.5 w-3.5"})})]})]}),E?(0,t.jsx)("p",{className:"text-destructive mt-2 text-center text-sm",children:E}):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:K.suggestions.map(e=>(0,t.jsx)("button",{type:"button",onClick:()=>G(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))},H)]})]})}e.s(["ControlCenterEmptyState",()=>C],440106)},713632,e=>{"use strict";var t=e.i(508893);let r=(0,t.createServerReference)("407f77d680549aede6a6e5b0eb1a3e71211f9bb28f",t.callServer,void 0,t.findSourceMapURL,"deleteApplication");e.s(["deleteApplication",()=>r])},370002,942616,e=>{"use strict";var t=e.i(215131);function r(e,t,r,a){return"processing"===t?{label:"In Progress",dotClass:"bg-violet-500",borderClass:"",pulse:!0,previewDisabled:!0}:"awaiting_input"===t?{label:"Action Required",dotClass:"bg-amber-500",borderClass:"border-amber-500/60",pulse:!0,previewDisabled:!0}:"interrupted"===a?{label:"Interrupted",dotClass:"bg-amber-500",borderClass:"border-amber-500/60",pulse:!1,previewDisabled:!0}:"failed"===a?{label:"Failed",dotClass:"bg-red-500",borderClass:"border-red-500/60",pulse:!1,previewDisabled:!0}:"building"===a?{label:"In Progress",dotClass:"bg-violet-500",borderClass:"",pulse:!0,previewDisabled:!0}:r?{label:"Live",dotClass:"bg-emerald-500",borderClass:"",pulse:!0,previewDisabled:!1}:"Error"===e?{label:"Error",dotClass:"bg-red-500",borderClass:"border-red-500/60",pulse:!1,previewDisabled:!0}:{label:"Ready",dotClass:"bg-sky-500",borderClass:"",pulse:!1,previewDisabled:!1}}e.s(["TriangleAlert",()=>t.default],370002),e.s(["deriveAppLiveStatus",()=>r],942616)},672971,e=>{"use strict";function t(e){return`app-${e}`}e.s(["featureIdForApplication",()=>t])},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)},74573,e=>{"use strict";var t=e.i(679606),r=e.i(317406);function a({d:e,...r}){return(0,t.jsx)("svg",{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",...r,"aria-hidden":"true",children:(0,t.jsx)("path",{d:e})})}function i(e){return(0,t.jsx)(a,{d:"M12 .297c-6.63 0-12 5.373-12 12 0 5.303 3.438 9.8 8.205 11.385.6.113.82-.258.82-.577 0-.285-.01-1.04-.015-2.04-3.338.724-4.042-1.61-4.042-1.61C4.422 18.07 3.633 17.7 3.633 17.7c-1.087-.744.084-.729.084-.729 1.205.084 1.838 1.236 1.838 1.236 1.07 1.835 2.809 1.305 3.495.998.108-.776.417-1.305.76-1.605-2.665-.3-5.466-1.332-5.466-5.93 0-1.31.465-2.38 1.235-3.22-.135-.303-.54-1.523.105-3.176 0 0 1.005-.322 3.3 1.23.96-.267 1.98-.399 3-.405 1.02.006 2.04.138 3 .405 2.28-1.552 3.285-1.23 3.285-1.23.645 1.653.24 2.873.12 3.176.765.84 1.23 1.91 1.23 3.22 0 4.61-2.805 5.625-5.475 5.92.42.36.81 1.096.81 2.22 0 1.606-.015 2.896-.015 3.286 0 .315.21.69.825.57C20.565 22.092 24 17.592 24 12.297c0-6.627-5.373-12-12-12",...e})}let l={[r.CloudDeploymentProvider.CloudflarePages]:function(e){return(0,t.jsx)(a,{d:"M10.715 14.32H5.442l-.64-1.203L13.673 0l1.397.579-1.752 9.112h5.24l.648 1.192L10.719 24l-1.412-.54ZM4.091 5.448a.5787.5787 0 1 1 0-1.1574.5787.5787 0 0 1 0 1.1574zm1.543 0a.5787.5787 0 1 1 0-1.1574.5787.5787 0 0 1 0 1.1574zm1.544 0a.5787.5787 0 1 1 0-1.1574.5787.5787 0 0 1 0 1.1574zm8.657-2.7h5.424l.772.771v16.975l-.772.772h-7.392l.374-.579h6.779l.432-.432V3.758l-.432-.432h-4.676l-.552 2.85h-.59l.529-2.877.108-.552ZM2.74 21.265l-.772-.772V3.518l.772-.771h7.677l-.386.579H2.98l-.432.432v16.496l.432.432h5.586l-.092.579zm1.157-1.93h3.28l-.116.58h-3.55l-.192-.193v-3.473l.578 1.158zm13.117 0 .579.58H14.7l.385-.58z",...e})},[r.CloudDeploymentProvider.Vercel]:function(e){return(0,t.jsx)(a,{d:"m12 1.608 12 20.784H0Z",...e})},[r.CloudDeploymentProvider.Netlify]:function(e){return(0,t.jsx)(a,{d:"M6.49 19.04h-.23L5.13 17.9v-.23l1.73-1.71h1.2l.15.15v1.2L6.5 19.04ZM5.13 6.31V6.1l1.13-1.13h.23L8.2 6.68v1.2l-.15.15h-1.2L5.13 6.31Zm9.96 9.09h-1.65l-.14-.13v-3.83c0-.68-.27-1.2-1.1-1.23-.42 0-.9 0-1.43.02l-.07.08v4.96l-.14.14H8.9l-.13-.14V8.73l.13-.14h3.7a2.6 2.6 0 0 1 2.61 2.6v4.08l-.13.14Zm-8.37-2.44H.14L0 12.82v-1.64l.14-.14h6.58l.14.14v1.64l-.14.14Zm17.14 0h-6.58l-.14-.14v-1.64l.14-.14h6.58l.14.14v1.64l-.14.14ZM11.05 6.55V1.64l.14-.14h1.65l.14.14v4.9l-.14.14h-1.65l-.14-.13Zm0 15.81v-4.9l.14-.14h1.65l.14.13v4.91l-.14.14h-1.65l-.14-.14Z",...e})},[r.CloudDeploymentProvider.AwsAmplify]:function(e){return(0,t.jsx)(a,{d:"M11.58 2.1 1.15 20.87h4.33l1.9-3.5h9.24l1.9 3.5h4.33L12.42 2.1h-.84Zm.42 5.6 3.12 5.73H8.88L12 7.7Z",...e})},[r.CloudDeploymentProvider.GcpCloudRun]:function(e){return(0,t.jsx)(a,{d:"M12.19 2.38a9.344 9.344 0 0 0-9.234 6.893c.053-.02-.055.013 0 0-3.875 2.551-3.922 8.11-.247 10.941l.006-.007-.007.03a6.717 6.717 0 0 0 4.077 1.356h5.173l.03.03h5.192c6.687.053 9.376-8.605 3.835-12.35a9.365 9.365 0 0 0-2.821-4.552l-.043.043.006-.05A9.344 9.344 0 0 0 12.19 2.38zm-.358 4.146c1.244-.04 2.518.368 3.486 1.15a5.186 5.186 0 0 1 1.862 4.078v.518c3.53-.07 3.53 5.262 0 5.193h-5.193l-.008.009v-.04H6.785a2.59 2.59 0 0 1-1.067-.23h.001a2.597 2.597 0 1 1 3.437-3.437l3.013-3.012A6.747 6.747 0 0 0 8.11 8.24c.018-.01.04-.026.054-.023a5.186 5.186 0 0 1 3.67-1.69z",...e})}},s={[r.CloudDeploymentProvider.CloudflarePages]:"#F38020",[r.CloudDeploymentProvider.Vercel]:"#000000",[r.CloudDeploymentProvider.Netlify]:"#00C7B7",[r.CloudDeploymentProvider.AwsAmplify]:"#FF9900",[r.CloudDeploymentProvider.GcpCloudRun]:"#4285F4"};e.s(["CLOUD_PROVIDER_BRAND_HEX",0,s,"CLOUD_PROVIDER_ICONS",0,l,"GitHubIcon",()=>i])},453721,e=>{"use strict";var t=e.i(679606),r=e.i(152155),a=e.i(711434),i=e.i(962885),l=e.i(619933),s=e.i(382569),n=e.i(542049),o=e.i(83428),d=e.i(3214),c=e.i(853756),p=e.i(131777),u=e.i(873504),h=e.i(175921),x=e.i(440106),m=e.i(958481),g=e.i(383379),f=e.i(730702);let b=(0,e.i(903645).default)("folder-git-2",[["path",{d:"M18 19a5 5 0 0 1-5-5v8",key:"sz5oeg"}],["path",{d:"M9 20H4a2 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.9H20a2 2 0 0 1 2 2v5",key:"1w6njk"}],["circle",{cx:"13",cy:"12",r:"2",key:"1j92g6"}],["circle",{cx:"20",cy:"19",r:"2",key:"1obnsp"}]]);var v=e.i(32494),j=e.i(731463),y=e.i(724042),w=e.i(43416),k=e.i(267669),N=e.i(370002),C=e.i(453360),D=e.i(434682),A=e.i(360112),P=e.i(735364),S=e.i(602287),L=e.i(470646),_=e.i(713632),T=e.i(942616),M=e.i(680554),R=e.i(8537),E=e.i(317406),O=e.i(672971),I=e.i(74573);let F="rgba(255,255,255,0.13)",z="rgba(255,255,255,0.07)",$="rgba(255,255,255,0.04)",B=[function(){return(0,t.jsxs)("svg",{viewBox:"0 0 320 160",className:"h-full w-full","aria-hidden":"true",children:[Array.from({length:8},(e,r)=>Array.from({length:16},(e,a)=>(0,t.jsx)("circle",{cx:10+20*a,cy:10+20*r,r:"1.5",fill:z},`${r}-${a}`))),(0,t.jsx)("circle",{cx:"240",cy:"56",r:"52",fill:"none",stroke:$,strokeWidth:"1"}),(0,t.jsx)("circle",{cx:"240",cy:"56",r:"32",fill:"none",stroke:F,strokeWidth:"0.8"}),(0,t.jsx)("circle",{cx:"60",cy:"112",r:"14",fill:"none",stroke:z,strokeWidth:"1"}),(0,t.jsx)("circle",{cx:"60",cy:"112",r:"6",fill:$})]})},function(){return(0,t.jsxs)("svg",{viewBox:"0 0 320 160",className:"h-full w-full","aria-hidden":"true",children:[[24,48,72,96,120].map((e,r)=>(0,t.jsx)("path",{d:`M0,${e} C64,${e-18+4*r} 128,${e+18-3*r} 192,${e-12+2*r} S288,${e+14} 320,${e}`,fill:"none",stroke:2===r?F:z,strokeWidth:2===r?1.5:1},`wave-${e}`)),(0,t.jsx)("path",{d:"M0,72 C64,54 128,90 192,60 S288,86 320,72 L320,160 L0,160 Z",fill:$}),(0,t.jsx)("circle",{cx:"290",cy:"30",r:"18",fill:"none",stroke:z,strokeWidth:"1"})]})},function(){return(0,t.jsxs)("svg",{viewBox:"0 0 320 160",className:"h-full w-full","aria-hidden":"true",children:[(0,t.jsx)("circle",{cx:"160",cy:"160",r:"120",fill:"none",stroke:$,strokeWidth:"40"}),(0,t.jsx)("circle",{cx:"100",cy:"60",r:"70",fill:"none",stroke:z,strokeWidth:"1"}),(0,t.jsx)("circle",{cx:"220",cy:"80",r:"55",fill:"none",stroke:F,strokeWidth:"1"}),(0,t.jsx)("polygon",{points:"160,18 196,60 160,102 124,60",fill:"none",stroke:z,strokeWidth:"1"}),(0,t.jsx)("circle",{cx:"20",cy:"20",r:"2",fill:F}),(0,t.jsx)("circle",{cx:"300",cy:"20",r:"2",fill:F}),(0,t.jsx)("circle",{cx:"20",cy:"140",r:"2",fill:F}),(0,t.jsx)("circle",{cx:"300",cy:"140",r:"2",fill:F})]})},function(){let e=[];for(let r=32;r<320;r+=32)e.push((0,t.jsx)("line",{x1:r,y1:"0",x2:r,y2:"160",stroke:$,strokeWidth:"1"},`v${r}`));for(let r=32;r<160;r+=32)e.push((0,t.jsx)("line",{x1:"0",y1:r,x2:"320",y2:r,stroke:$,strokeWidth:"1"},`h${r}`));return(0,t.jsxs)("svg",{viewBox:"0 0 320 160",className:"h-full w-full","aria-hidden":"true",children:[e,[20,40,64,90].map(e=>(0,t.jsx)("circle",{cx:"160",cy:"80",r:e,fill:"none",stroke:40===e?F:z,strokeWidth:"1"},e)),(0,t.jsx)("circle",{cx:"160",cy:"80",r:"4",fill:F})]})}];function H({name:e}){let r=B[function(e){let t=0x811c9dc5;for(let r=0;r<e.length;r++)t^=e.charCodeAt(r),t=Math.imul(t,0x1000193)>>>0;return t}(e)%B.length];return(0,t.jsx)(r,{})}function Z({application:i,className:l}){let s=(0,a.useRouter)(),n=(0,D.useQueryClient)(),[d,c]=(0,r.useState)(!1),u=(0,M.useTurnStatus)((0,O.featureIdForApplication)(i.id)),h=(0,R.useDeployAction)({targetId:i.id,targetType:"application",repositoryPath:i.repositoryPath}),x=h.url,F=(0,T.deriveAppLiveStatus)(i.status,u,!!x,i.effectiveStatus),z=i.cloudDeploymentUrl??null,$=i.cloudDeploymentProvider??null,B=$?I.CLOUD_PROVIDER_ICONS[$]:null,Z=$?I.CLOUD_PROVIDER_BRAND_HEX[$]:void 0,V=i.cloudDeploymentStatus===E.CloudDeploymentStatus.Deployed&&!!z,W=i.cloudDeploymentStatus===E.CloudDeploymentStatus.Uploading,U=i.cloudDeploymentStatus===E.CloudDeploymentStatus.Failed,G="building"===i.effectiveStatus,K="interrupted"===i.effectiveStatus,q="failed"===i.effectiveStatus,Q=h.status===E.DeploymentState.Booting||h.deployLoading,X=h.status===E.DeploymentState.Ready&&!!x,J=X?x:V?z:null,Y=!!J,ee=()=>s.push(`/application/${i.id}`),et=i.repositoryPath.split(/[/\\]/).pop()??i.repositoryPath;return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)("article",{"data-testid":"application-card",onClick:ee,className:(0,p.cn)("group relative flex cursor-pointer flex-col overflow-hidden rounded-sm","bg-card dark:bg-neutral-900","border-border/60 border shadow-sm dark:border-white/10","hover:border-border transition-all duration-200 hover:shadow-lg dark:hover:border-white/20 dark:hover:shadow-black/40","min-h-[280px]",l),children:[(0,t.jsxs)("div",{className:"relative overflow-hidden",style:{height:160},children:[Y?(0,t.jsxs)("div",{className:"absolute inset-0 bg-white dark:bg-neutral-900",children:[(0,t.jsx)("iframe",{src:J,title:`${i.name} preview`,className:"pointer-events-none absolute top-0 left-0 origin-top-left border-0",style:{width:"250%",height:"250%",transform:"scale(0.4)"},sandbox:"allow-same-origin allow-scripts",loading:"lazy"}),(0,t.jsxs)("div",{className:"absolute inset-0 flex items-center justify-center gap-2 bg-black/60 opacity-0 transition-opacity group-hover:opacity-100",onClick:e=>e.stopPropagation(),children:[X?(0,t.jsxs)("button",{type:"button",onClick:()=>void h.stop(),disabled:h.stopLoading,className:"inline-flex h-7 cursor-pointer items-center gap-1 rounded-full bg-white/90 px-3 text-[11px] font-semibold text-neutral-900 hover:bg-red-50 hover:text-red-600",children:[h.stopLoading?(0,t.jsx)(o.Loader2,{className:"h-3 w-3 animate-spin"}):(0,t.jsx)(w.RefreshCw,{className:"h-3 w-3"}),"Stop"]}):null,(0,t.jsxs)("button",{type:"button",onClick:()=>window.open(J,"_blank","noopener,noreferrer"),className:"inline-flex h-7 cursor-pointer items-center gap-1 rounded-full bg-white/90 px-3 text-[11px] font-semibold text-neutral-900 hover:bg-white",children:[(0,t.jsx)(f.ExternalLink,{className:"h-3 w-3"}),"Open"]})]})]}):Q?(0,t.jsx)("div",{className:"absolute inset-0 bg-white dark:bg-neutral-900",children:(0,t.jsxs)("div",{className:"flex h-full flex-col items-center justify-center gap-2",children:[(0,t.jsx)(o.Loader2,{className:"h-6 w-6 animate-spin text-amber-500"}),(0,t.jsx)("span",{className:"text-[11px] font-medium text-amber-600 dark:text-amber-400",children:"Starting…"})]})}):(0,t.jsx)("div",{className:"absolute inset-0 overflow-hidden bg-[#111827] dark:bg-neutral-800",children:(0,t.jsx)(H,{name:i.name})}),(0,t.jsx)("div",{className:"absolute top-2.5 left-2.5",onClick:e=>e.stopPropagation(),children:V?(0,t.jsxs)("span",{className:"flex items-center gap-1 rounded-full bg-black/30 px-2 py-0.5 text-[9px] font-bold tracking-wider text-white uppercase backdrop-blur-sm",children:[B?(0,t.jsx)(B,{className:"h-3 w-3",style:{color:Z??"#fff"}}):(0,t.jsx)("span",{className:"h-1.5 w-1.5 animate-pulse rounded-full bg-emerald-400"}),"Live"]}):W?(0,t.jsxs)("span",{className:"flex items-center gap-1 rounded-full bg-black/30 px-2 py-0.5 text-[9px] font-bold tracking-wider text-white/80 uppercase backdrop-blur-sm",children:[(0,t.jsx)(o.Loader2,{className:"h-2.5 w-2.5 animate-spin"}),"Deploying"]}):G?(0,t.jsxs)("span",{className:"flex items-center gap-1 rounded-full bg-black/30 px-2 py-0.5 text-[9px] font-bold tracking-wider text-white/80 uppercase backdrop-blur-sm",children:[(0,t.jsx)(C.Zap,{className:"h-2.5 w-2.5"}),"Building"]}):F.pulse?(0,t.jsxs)("span",{className:"relative flex h-2 w-2",children:[(0,t.jsx)("span",{className:(0,p.cn)("absolute inline-flex h-full w-full animate-ping rounded-full opacity-75",F.dotClass)}),(0,t.jsx)("span",{className:(0,p.cn)("relative inline-flex h-2 w-2 rounded-full",F.dotClass)})]}):null}),(0,t.jsx)("div",{className:"absolute top-2.5 right-2.5",onClick:e=>e.stopPropagation(),children:(0,t.jsxs)(L.DropdownMenu,{children:[(0,t.jsx)(L.DropdownMenuTrigger,{asChild:!0,children:(0,t.jsx)("button",{type:"button",className:"flex h-6 w-6 cursor-pointer items-center justify-center rounded-full bg-black/30 text-white/80 opacity-0 backdrop-blur-sm transition-opacity group-hover:opacity-100 hover:bg-black/50",children:(0,t.jsx)(j.MoreHorizontal,{className:"h-3.5 w-3.5"})})}),(0,t.jsx)(L.DropdownMenuContent,{align:"end",sideOffset:4,children:(0,t.jsxs)(L.DropdownMenuItem,{className:"text-destructive focus:text-destructive cursor-pointer",onClick:()=>c(!0),children:[(0,t.jsx)(k.Trash2,{className:"mr-2 h-3.5 w-3.5"}),"Delete"]})})]})})]}),(0,t.jsxs)("div",{className:"flex flex-1 flex-col gap-1.5 px-3.5 pt-3 pb-0",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)("h3",{className:"text-foreground line-clamp-1 text-[14px] leading-tight font-semibold",children:i.name}),i.description?(0,t.jsx)("p",{className:"text-muted-foreground mt-0.5 line-clamp-1 text-[11px] leading-relaxed",children:i.description}):null]}),W?(0,t.jsxs)("div",{className:"flex items-center gap-1.5 py-0.5",children:[(0,t.jsx)(o.Loader2,{className:"text-muted-foreground h-3 w-3 shrink-0 animate-spin"}),(0,t.jsxs)("span",{className:"text-muted-foreground text-[11px]",children:["Deploying to ",$??"cloud","…"]})]}):U?(0,t.jsxs)("div",{className:"flex items-center gap-1.5 py-0.5",children:[(0,t.jsx)(m.AlertTriangle,{className:"text-destructive/70 h-3 w-3 shrink-0"}),(0,t.jsx)("span",{className:"text-destructive/80 text-[11px]",children:"Deployment failed"})]}):G?(0,t.jsxs)("div",{className:"flex items-center gap-1.5 py-0.5",children:[(0,t.jsx)(C.Zap,{className:"text-muted-foreground h-3 w-3 shrink-0"}),(0,t.jsx)("span",{className:"text-muted-foreground text-[11px]",children:"Building with AI…"}),(0,t.jsx)("div",{className:"ml-auto flex gap-0.5",children:[0,1,2].map(e=>(0,t.jsx)("span",{className:"bg-muted-foreground/40 h-1 w-1 animate-bounce rounded-full",style:{animationDelay:`${120*e}ms`}},e))})]}):K?(0,t.jsxs)("div",{className:"flex items-center gap-1.5 py-0.5",children:[(0,t.jsx)(m.AlertTriangle,{className:"h-3 w-3 shrink-0 text-amber-500/70"}),(0,t.jsx)("span",{className:"text-muted-foreground text-[11px]",children:"Build interrupted"})]}):q?(0,t.jsxs)("div",{className:"flex items-center gap-1.5 py-0.5",children:[(0,t.jsx)(N.TriangleAlert,{className:"text-destructive/70 h-3 w-3 shrink-0"}),(0,t.jsx)("span",{className:"text-muted-foreground text-[11px]",children:"Build failed"})]}):V?null:(0,t.jsxs)("div",{className:"flex items-center gap-1.5 py-0.5",children:[(0,t.jsx)(v.Globe,{className:"text-muted-foreground/40 h-3 w-3 shrink-0"}),(0,t.jsx)("span",{className:"text-muted-foreground/60 text-[11px]",children:"Not deployed yet"})]})]}),(0,t.jsxs)("div",{className:"flex items-center gap-2 px-3.5 pt-2 pb-3",onClick:e=>e.stopPropagation(),children:[(0,t.jsxs)("div",{className:"flex min-w-0 flex-1 items-center gap-2",children:[(0,t.jsxs)("button",{type:"button",title:i.repositoryPath,onClick:async t=>{t.stopPropagation();let{openDirectory:r}=await e.A(127062);await r(i.repositoryPath)},className:"text-muted-foreground/70 hover:text-foreground inline-flex shrink-0 items-center gap-1 text-[10px] transition-colors",children:[(0,t.jsx)(b,{className:"h-3 w-3 shrink-0"}),(0,t.jsx)("span",{className:"max-w-[80px] truncate",children:et})]}),z?(0,t.jsxs)("a",{href:z,target:"_blank",rel:"noopener noreferrer",title:z,className:"text-muted-foreground/70 hover:text-foreground inline-flex min-w-0 items-center gap-1 text-[10px] transition-colors",children:[B?(0,t.jsx)(B,{className:"h-3 w-3 shrink-0",style:{color:Z}}):(0,t.jsx)(v.Globe,{className:"h-3 w-3 shrink-0"}),(0,t.jsx)("span",{className:"font-mono",children:function(e,t=22){let r=e.replace(/^https?:\/\//,"").replace(/\/$/,"");if(r.length<=t)return r;let a=r.slice(-(t-6));return`${r.slice(0,5)}…${a}`}(z)})]}):null]}),G||W?(0,t.jsxs)("span",{className:"text-muted-foreground inline-flex shrink-0 items-center gap-1.5 text-[11px]",children:[(0,t.jsx)(o.Loader2,{className:"h-3 w-3 animate-spin"}),G?"Building…":"Deploying…"]}):z&&V?(0,t.jsxs)("a",{href:z,target:"_blank",rel:"noopener noreferrer",className:"bg-foreground text-background inline-flex h-7 shrink-0 cursor-pointer items-center gap-1.5 rounded-full px-3 text-[11px] font-semibold transition-opacity hover:opacity-80",children:[(0,t.jsx)(f.ExternalLink,{className:"h-3 w-3"}),"Open live"]}):K?(0,t.jsxs)("button",{type:"button",onClick:ee,className:"inline-flex h-7 shrink-0 cursor-pointer items-center gap-1.5 rounded-full bg-amber-500 px-3 text-[11px] font-semibold text-white transition-opacity hover:opacity-80",children:[(0,t.jsx)(y.Play,{className:"h-3 w-3 fill-current"}),"Continue"]}):q?(0,t.jsxs)("button",{type:"button",onClick:ee,className:"bg-destructive inline-flex h-7 shrink-0 cursor-pointer items-center gap-1.5 rounded-full px-3 text-[11px] font-semibold text-white transition-opacity hover:opacity-80",children:[(0,t.jsx)(g.ArrowRight,{className:"h-3 w-3"}),"View error"]}):(0,t.jsxs)("button",{type:"button",onClick:ee,className:"bg-foreground text-background inline-flex h-7 shrink-0 cursor-pointer items-center gap-1.5 rounded-full px-3 text-[11px] font-semibold transition-opacity hover:opacity-80",children:[(0,t.jsx)(g.ArrowRight,{className:"h-3 w-3"}),"Open"]})]})]}),(0,t.jsx)(S.Dialog,{open:d,onOpenChange:c,children:(0,t.jsxs)(S.DialogContent,{className:"max-w-xs",children:[(0,t.jsxs)(S.DialogHeader,{children:[(0,t.jsx)(S.DialogTitle,{children:"Delete application?"}),(0,t.jsxs)(S.DialogDescription,{children:["This will permanently remove ",(0,t.jsx)("strong",{children:i.name}),"."]})]}),(0,t.jsxs)(S.DialogFooter,{className:"grid grid-cols-2 gap-2 sm:flex-none",children:[(0,t.jsx)(S.DialogClose,{asChild:!0,children:(0,t.jsx)(P.Button,{variant:"outline",children:"Cancel"})}),(0,t.jsx)(P.Button,{variant:"destructive",onClick:async()=>{c(!1);let e=await (0,_.deleteApplication)(i.id);e.error?A.toast.error("Failed to delete",{description:e.error}):(A.toast.success("Application deleted"),n.invalidateQueries({queryKey:["applications"]}))},children:"Delete"})]})]})})]})}function V({className:l}){let s=(0,a.useRouter)(),d=(0,h.useFeatureFlags)(),[c,m]=(0,r.useState)(!1),{data:g=[],isLoading:f}=(0,i.useQuery)({queryKey:["applications"],queryFn:async()=>{let e=await fetch("/api/applications");if(!e.ok)throw Error("Failed to fetch applications");return e.json()},staleTime:3e4}),b=(0,r.useMemo)(()=>[...g].sort((e,t)=>new Date(t.createdAt).getTime()-new Date(e.createdAt).getTime()),[g]);return(0,t.jsx)(u.DeploymentStatusProvider,{initialDeployments:[],children:(0,t.jsxs)("div",{"data-testid":"applications-page-client",className:(0,p.cn)("relative flex min-h-full flex-col",l),children:[(0,t.jsxs)("div",{className:"flex flex-1 flex-col gap-4 p-6",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(n.LayoutGrid,{className:"text-muted-foreground h-4 w-4"}),(0,t.jsx)("h1",{className:"text-sm font-bold tracking-tight",children:"Applications"}),f?null:(0,t.jsxs)("span",{className:"text-muted-foreground text-[10px]",children:[g.length," ",1===g.length?"app":"apps"]})]}),f?(0,t.jsx)("div",{className:"flex items-center justify-center py-12",children:(0,t.jsx)(o.Loader2,{className:"text-muted-foreground h-5 w-5 animate-spin"})}):0===b.length?(0,t.jsx)("div",{className:"flex flex-1 items-center justify-center",children:(0,t.jsx)(x.ControlCenterEmptyState,{onApplicationCreated:e=>{s.push(`/application/${e}`)}})}):(0,t.jsxs)("div",{"data-testid":"applications-page-grid",className:"grid grid-cols-1 gap-4 sm:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4",children:[(0,t.jsx)(W,{onDescribe:()=>m(!0),onOpenLocalDirectory:async()=>{let{pickFolder:t}=await e.A(633405),r=await t();if(!r)return;let{adoptLocalDirectory:a}=await e.A(743797),i=await a({repositoryPath:r});i.applicationId&&s.push(`/application/${i.applicationId}`)},onImportGitHub:d.githubImport?()=>window.dispatchEvent(new CustomEvent("shep:open-github-import")):void 0}),b.map(e=>(0,t.jsx)(Z,{application:e},e.id))]})]}),c?(0,t.jsx)("div",{className:"absolute inset-0 z-40",children:(0,t.jsx)(x.ControlCenterEmptyState,{onApplicationCreated:e=>{s.push(`/application/${e}`)},onClose:()=>m(!1),className:"bg-background"})}):null]})})}function W({onDescribe:e,onOpenLocalDirectory:r,onImportGitHub:a}){let i=[{icon:(0,t.jsx)(c.Sparkles,{className:"h-4 w-4"}),label:"Describe with AI",description:"Tell Shep what to build — it scaffolds + ships",onClick:e,accent:"text-indigo-500 bg-indigo-100 dark:bg-indigo-900/60"},...r?[{icon:(0,t.jsx)(l.FolderOpen,{className:"h-4 w-4"}),label:"Open local project",description:"Pick an existing folder and continue from there",onClick:r,accent:"text-amber-600 bg-amber-100 dark:bg-amber-900/40"}]:[],...a?[{icon:(0,t.jsx)(s.Github,{className:"h-4 w-4"}),label:"Import from GitHub",description:"Connect an existing repo to manage here",onClick:a,accent:"text-foreground bg-muted"}]:[]];return(0,t.jsxs)("div",{className:(0,p.cn)("group relative flex cursor-pointer flex-col overflow-hidden rounded-sm border-2","border-dashed border-indigo-200 bg-transparent transition-all duration-200","hover:border-indigo-400 hover:bg-indigo-500/[0.03]","dark:border-indigo-900 dark:hover:border-indigo-700","min-h-[280px]"),onClick:e,children:[(0,t.jsxs)("div",{className:(0,p.cn)("absolute inset-0 flex flex-col items-center justify-center gap-3","transition-opacity duration-200 group-hover:opacity-0","pointer-events-none"),children:[(0,t.jsx)("div",{className:"flex h-11 w-11 items-center justify-center rounded-full bg-indigo-100 text-indigo-500 dark:bg-indigo-900/60 dark:text-indigo-400",children:(0,t.jsx)(d.Plus,{className:"h-5 w-5 stroke-[2]"})}),(0,t.jsxs)("div",{className:"text-center",children:[(0,t.jsx)("p",{className:"text-foreground text-sm font-semibold",children:"New application"}),(0,t.jsx)("p",{className:"text-muted-foreground mt-0.5 text-[11px]",children:"Click to get started"})]})]}),(0,t.jsxs)("div",{className:(0,p.cn)("absolute inset-0 flex flex-col justify-center gap-1.5 px-4","translate-y-3 opacity-0 transition-all duration-200","group-hover:translate-y-0 group-hover:opacity-100"),children:[(0,t.jsx)("p",{className:"text-muted-foreground mb-1 px-1 text-[10px] font-medium tracking-wide uppercase",children:"How would you like to start?"}),i.map(e=>(0,t.jsxs)("button",{type:"button",onClick:t=>{t.stopPropagation(),e.onClick()},className:(0,p.cn)("flex w-full cursor-pointer items-center gap-3 rounded-lg px-3 py-2.5 text-left","border-border/60 bg-background/80 border transition-all duration-150","hover:border-indigo-300 hover:bg-indigo-50 dark:hover:border-indigo-700 dark:hover:bg-indigo-950/40"),children:[(0,t.jsx)("span",{className:(0,p.cn)("flex h-7 w-7 shrink-0 items-center justify-center rounded-md",e.accent),children:e.icon}),(0,t.jsxs)("div",{className:"min-w-0",children:[(0,t.jsx)("div",{className:"text-foreground text-[12px] font-semibold",children:e.label}),(0,t.jsx)("div",{className:"text-muted-foreground truncate text-[10px]",children:e.description})]})]},e.label))]})]})}e.s(["ApplicationsPageClient",()=>V],453721)},127062,e=>{e.v(t=>Promise.all(["static/chunks/8359874b37b80bd2.js"].map(t=>e.l(t))).then(()=>t(617841)))},633405,e=>{e.v(e=>Promise.resolve().then(()=>e(478521)))},743797,e=>{e.v(t=>Promise.all(["static/chunks/95e71bd36a2166d0.js"].map(t=>e.l(t))).then(()=>t(868662)))}]);
@@ -1 +1 @@
1
- (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,602287,e=>{"use strict";var t=e.i(679606),a=e.i(152155),s=e.i(90033),r=e.i(860253),i=e.i(131777);let o=s.Dialog.Root,n=s.Dialog.Trigger,l=s.Dialog.Portal,d=s.Dialog.Close,c=a.forwardRef(({className:e,onClick:a,...r},o)=>(0,t.jsx)(s.Dialog.Overlay,{ref:o,className:(0,i.cn)("data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 fixed inset-0 z-50 bg-black/80 duration-150",e),onClick:e=>{e.stopPropagation(),a?.(e)},...r}));c.displayName=s.Dialog.Overlay.displayName;let p=a.forwardRef(({className:e,children:a,...o},n)=>(0,t.jsxs)(l,{children:[(0,t.jsx)(c,{}),(0,t.jsxs)(s.Dialog.Content,{ref:n,className:(0,i.cn)("bg-background data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 fixed top-[50%] left-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border p-6 shadow-lg duration-150 sm:rounded-lg",e),...o,children:[a,(0,t.jsxs)(s.Dialog.Close,{className:"ring-offset-background focus:ring-ring data-[state=open]:bg-accent data-[state=open]:text-muted-foreground absolute 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)(r.X,{className:"h-4 w-4"}),(0,t.jsx)("span",{className:"sr-only",children:"Close"})]})]})]}));p.displayName=s.Dialog.Content.displayName;let u=({className:e,...a})=>(0,t.jsx)("div",{className:(0,i.cn)("flex flex-col space-y-1.5 text-center sm:text-start",e),...a});u.displayName="DialogHeader";let x=({className:e,...a})=>(0,t.jsx)("div",{className:(0,i.cn)("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...a});x.displayName="DialogFooter";let g=a.forwardRef(({className:e,...a},r)=>(0,t.jsx)(s.Dialog.Title,{ref:r,className:(0,i.cn)("text-lg leading-none font-semibold tracking-tight",e),...a}));g.displayName=s.Dialog.Title.displayName;let m=a.forwardRef(({className:e,...a},r)=>(0,t.jsx)(s.Dialog.Description,{ref:r,className:(0,i.cn)("text-muted-foreground text-sm",e),...a}));m.displayName=s.Dialog.Description.displayName,e.s(["Dialog",()=>o,"DialogClose",()=>d,"DialogContent",()=>p,"DialogDescription",()=>m,"DialogFooter",()=>x,"DialogHeader",()=>u,"DialogTitle",()=>g,"DialogTrigger",()=>n])},48306,e=>{"use strict";var t=e.i(679606),a=e.i(131777);function s({className:e,...s}){return(0,t.jsx)("textarea",{"data-slot":"textarea",className:(0,a.cn)("placeholder:text-muted-foreground selection:bg-primary selection:text-primary-foreground dark:bg-input/30 border-input field-sizing-content min-h-[80px] w-full rounded-md border bg-transparent px-3 py-2 text-base shadow-xs transition-[color,box-shadow] outline-none disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 md:text-sm","focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px]","aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",e),...s})}e.s(["Textarea",()=>s])},141957,e=>{"use strict";var t=e.i(679606),a=e.i(152155),s=e.i(287620),r=a.forwardRef((e,a)=>(0,t.jsx)(s.Primitive.label,{...e,ref:a,onMouseDown:t=>{t.target.closest("button, input, select, textarea")||(e.onMouseDown?.(t),!t.defaultPrevented&&t.detail>1&&t.preventDefault())}}));r.displayName="Label",e.s(["Label",()=>r,"Root",()=>r],127572);var i=e.i(127572),i=i,o=e.i(294237),n=e.i(131777);let l=(0,o.cva)("text-sm leading-none font-medium peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),d=a.forwardRef(({className:e,...a},s)=>(0,t.jsx)(i.Root,{ref:s,className:(0,n.cn)(l(),e),...a}));d.displayName=i.Root.displayName,e.s(["Label",()=>d],141957)},81846,e=>{"use strict";var t=e.i(679606),a=e.i(294237),s=e.i(131777);let r=(0,a.cva)("inline-flex items-center rounded-md border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:ring-2 focus:ring-ring focus:ring-offset-2 focus:outline-none",{variants:{variant:{default:"border-transparent bg-primary text-primary-foreground shadow hover:bg-primary/80",secondary:"border-transparent bg-secondary text-secondary-foreground hover:bg-secondary/80",destructive:"border-transparent bg-destructive text-destructive-foreground shadow hover:bg-destructive/80",outline:"text-foreground"}},defaultVariants:{variant:"default"}});function i({className:e,variant:a,...i}){return(0,t.jsx)("div",{className:(0,s.cn)(r({variant:a}),e),...i})}e.s(["Badge",()=>i])},419705,e=>{"use strict";var t=e.i(679606),a=e.i(152155),s=e.i(711434),r=e.i(595400),i=e.i(3214),o=e.i(131777),n=e.i(735364),l=e.i(81846),d=e.i(602287),c=e.i(698127),p=e.i(141957),u=e.i(48306),x=e.i(508893);let g=(0,x.createServerReference)("40686aaf5b799035bb92688bd9f7c27411fc42732b",x.callServer,void 0,x.findSourceMapURL,"createPmProject");function m({open:e,onOpenChange:s,onCreated:r}){let[i,o]=(0,a.useState)(""),[l,x]=(0,a.useState)(""),[m,f]=(0,a.useState)(""),[j,h]=(0,a.useState)(null),[b,v]=(0,a.useState)(!1),y=async()=>{h(null),v(!0);try{let e=await g({name:i,identifierPrefix:l,description:m||void 0});e.error?h(e.error):e.project&&(r(e.project),o(""),x(""),f(""))}finally{v(!1)}};return(0,t.jsx)(d.Dialog,{open:e,onOpenChange:s,children:(0,t.jsxs)(d.DialogContent,{"data-testid":"create-project-dialog",children:[(0,t.jsx)(d.DialogHeader,{children:(0,t.jsx)(d.DialogTitle,{children:"Create Project"})}),(0,t.jsxs)("div",{className:"space-y-4 py-2",children:[(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)(p.Label,{htmlFor:"project-name",children:"Name"}),(0,t.jsx)(c.Input,{id:"project-name",value:i,onChange:e=>o(e.target.value),placeholder:"My Project","data-testid":"project-name-input"})]}),(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)(p.Label,{htmlFor:"project-prefix",children:"Identifier Prefix"}),(0,t.jsx)(c.Input,{id:"project-prefix",value:l,onChange:e=>x(e.target.value.toUpperCase()),placeholder:"PROJ",maxLength:5,"data-testid":"project-prefix-input"}),(0,t.jsx)("p",{className:"text-muted-foreground text-[10px]",children:"1-5 uppercase letters/numbers, used in work item identifiers (e.g., PROJ-42)"})]}),(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)(p.Label,{htmlFor:"project-desc",children:"Description (optional)"}),(0,t.jsx)(u.Textarea,{id:"project-desc",value:m,onChange:e=>f(e.target.value),placeholder:"What is this project about?",rows:3,"data-testid":"project-desc-input"})]}),j?(0,t.jsx)("p",{className:"text-destructive text-xs","data-testid":"create-project-error",children:j}):null]}),(0,t.jsxs)(d.DialogFooter,{children:[(0,t.jsx)(n.Button,{variant:"outline",onClick:()=>s(!1),disabled:b,children:"Cancel"}),(0,t.jsx)(n.Button,{onClick:y,disabled:!i.trim()||!l.trim()||b,"data-testid":"create-project-submit",children:b?"Creating...":"Create"})]})]})})}function f({projects:e,className:d}){let[c,p]=(0,a.useState)(e),[u,x]=(0,a.useState)(!1),g=(0,s.useRouter)();return(0,t.jsxs)("div",{"data-testid":"projects-page-client",className:(0,o.cn)("space-y-4",d),children:[(0,t.jsxs)("div",{className:"flex items-center justify-between",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(r.FolderKanban,{className:"text-muted-foreground h-4 w-4"}),(0,t.jsx)("h1",{className:"text-sm font-bold tracking-tight",children:"Projects"}),(0,t.jsxs)("span",{className:"text-muted-foreground text-[10px]",children:[c.length," projects"]})]}),(0,t.jsxs)(n.Button,{variant:"outline",size:"sm",className:"h-7 text-xs",onClick:()=>x(!0),"data-testid":"create-project-btn",children:[(0,t.jsx)(i.Plus,{className:"mr-1 h-3 w-3"}),"New Project"]})]}),0===c.length?(0,t.jsxs)("div",{"data-testid":"projects-page-empty",className:"text-muted-foreground flex flex-col items-center justify-center py-12 text-center",children:[(0,t.jsx)(r.FolderKanban,{className:"mb-2 h-6 w-6 opacity-20"}),(0,t.jsx)("p",{className:"text-xs",children:"No projects yet. Create your first project to get started."})]}):(0,t.jsx)("div",{"data-testid":"projects-page-grid",className:"grid grid-cols-1 gap-3 sm:grid-cols-2 lg:grid-cols-3",children:c.map(e=>(0,t.jsxs)("button",{type:"button","data-testid":`project-card-${e.slug}`,className:"bg-card hover:bg-accent text-card-foreground rounded-lg border p-4 text-left transition-colors",onClick:()=>g.push(`/projects/${e.slug}`),children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)("span",{className:"text-sm font-semibold",children:e.name}),(0,t.jsx)(l.Badge,{variant:"outline",className:"text-[10px]",children:e.identifierPrefix})]}),e.description?(0,t.jsx)("p",{className:"text-muted-foreground mt-1 line-clamp-2 text-xs",children:e.description}):null,(0,t.jsxs)("div",{className:"text-muted-foreground mt-2 text-[10px]",children:[e.workItemCounter," items"]})]},e.id))}),(0,t.jsx)(m,{open:u,onOpenChange:x,onCreated:e=>{p(t=>[...t,e]),x(!1)}})]})}e.s(["ProjectsPageClient",()=>f],419705)}]);
1
+ (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,602287,e=>{"use strict";var t=e.i(679606),a=e.i(152155),s=e.i(90033),r=e.i(860253),i=e.i(131777);let o=s.Dialog.Root,n=s.Dialog.Trigger,l=s.Dialog.Portal,d=s.Dialog.Close,c=a.forwardRef(({className:e,onClick:a,...r},o)=>(0,t.jsx)(s.Dialog.Overlay,{ref:o,className:(0,i.cn)("data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 fixed inset-0 z-50 bg-black/80 duration-150",e),onClick:e=>{e.stopPropagation(),a?.(e)},...r}));c.displayName=s.Dialog.Overlay.displayName;let p=a.forwardRef(({className:e,children:a,...o},n)=>(0,t.jsxs)(l,{children:[(0,t.jsx)(c,{}),(0,t.jsxs)(s.Dialog.Content,{ref:n,className:(0,i.cn)("bg-background data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 fixed top-[50%] left-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border p-6 shadow-lg duration-150 sm:rounded-lg",e),...o,children:[a,(0,t.jsxs)(s.Dialog.Close,{className:"ring-offset-background focus:ring-ring data-[state=open]:bg-accent data-[state=open]:text-muted-foreground absolute 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)(r.X,{className:"h-4 w-4"}),(0,t.jsx)("span",{className:"sr-only",children:"Close"})]})]})]}));p.displayName=s.Dialog.Content.displayName;let u=({className:e,...a})=>(0,t.jsx)("div",{className:(0,i.cn)("flex flex-col space-y-1.5 text-center sm:text-start",e),...a});u.displayName="DialogHeader";let x=({className:e,...a})=>(0,t.jsx)("div",{className:(0,i.cn)("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...a});x.displayName="DialogFooter";let g=a.forwardRef(({className:e,...a},r)=>(0,t.jsx)(s.Dialog.Title,{ref:r,className:(0,i.cn)("text-lg leading-none font-semibold tracking-tight",e),...a}));g.displayName=s.Dialog.Title.displayName;let m=a.forwardRef(({className:e,...a},r)=>(0,t.jsx)(s.Dialog.Description,{ref:r,className:(0,i.cn)("text-muted-foreground text-sm",e),...a}));m.displayName=s.Dialog.Description.displayName,e.s(["Dialog",()=>o,"DialogClose",()=>d,"DialogContent",()=>p,"DialogDescription",()=>m,"DialogFooter",()=>x,"DialogHeader",()=>u,"DialogTitle",()=>g,"DialogTrigger",()=>n])},48306,e=>{"use strict";var t=e.i(679606),a=e.i(131777);function s({className:e,...s}){return(0,t.jsx)("textarea",{"data-slot":"textarea",className:(0,a.cn)("placeholder:text-muted-foreground selection:bg-primary selection:text-primary-foreground dark:bg-input/30 border-input field-sizing-content min-h-[80px] w-full rounded-md border bg-transparent px-3 py-2 text-base shadow-xs transition-[color,box-shadow] outline-none disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 md:text-sm","focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px]","aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",e),...s})}e.s(["Textarea",()=>s])},141957,e=>{"use strict";var t=e.i(679606),a=e.i(152155),s=e.i(287620),r=a.forwardRef((e,a)=>(0,t.jsx)(s.Primitive.label,{...e,ref:a,onMouseDown:t=>{t.target.closest("button, input, select, textarea")||(e.onMouseDown?.(t),!t.defaultPrevented&&t.detail>1&&t.preventDefault())}}));r.displayName="Label",e.s(["Label",()=>r,"Root",()=>r],127572);var i=e.i(127572),i=i,o=e.i(294237),n=e.i(131777);let l=(0,o.cva)("text-sm leading-none font-medium peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),d=a.forwardRef(({className:e,...a},s)=>(0,t.jsx)(i.Root,{ref:s,className:(0,n.cn)(l(),e),...a}));d.displayName=i.Root.displayName,e.s(["Label",()=>d],141957)},81846,e=>{"use strict";var t=e.i(679606),a=e.i(294237),s=e.i(131777);let r=(0,a.cva)("inline-flex items-center rounded-md border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:ring-2 focus:ring-ring focus:ring-offset-2 focus:outline-none",{variants:{variant:{default:"border-transparent bg-primary text-primary-foreground shadow hover:bg-primary/80",secondary:"border-transparent bg-secondary text-secondary-foreground hover:bg-secondary/80",destructive:"border-transparent bg-destructive text-destructive-foreground shadow hover:bg-destructive/80",outline:"text-foreground"}},defaultVariants:{variant:"default"}});function i({className:e,variant:a,...i}){return(0,t.jsx)("div",{className:(0,s.cn)(r({variant:a}),e),...i})}e.s(["Badge",()=>i])},419705,e=>{"use strict";var t=e.i(679606),a=e.i(152155),s=e.i(711434),r=e.i(595400),i=e.i(3214),o=e.i(131777),n=e.i(735364),l=e.i(81846),d=e.i(602287),c=e.i(698127),p=e.i(141957),u=e.i(48306),x=e.i(508893);let g=(0,x.createServerReference)("4087d9fa63cd4f63490988b4bf91cd3d10bc8aa4da",x.callServer,void 0,x.findSourceMapURL,"createPmProject");function m({open:e,onOpenChange:s,onCreated:r}){let[i,o]=(0,a.useState)(""),[l,x]=(0,a.useState)(""),[m,f]=(0,a.useState)(""),[j,h]=(0,a.useState)(null),[b,v]=(0,a.useState)(!1),y=async()=>{h(null),v(!0);try{let e=await g({name:i,identifierPrefix:l,description:m||void 0});e.error?h(e.error):e.project&&(r(e.project),o(""),x(""),f(""))}finally{v(!1)}};return(0,t.jsx)(d.Dialog,{open:e,onOpenChange:s,children:(0,t.jsxs)(d.DialogContent,{"data-testid":"create-project-dialog",children:[(0,t.jsx)(d.DialogHeader,{children:(0,t.jsx)(d.DialogTitle,{children:"Create Project"})}),(0,t.jsxs)("div",{className:"space-y-4 py-2",children:[(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)(p.Label,{htmlFor:"project-name",children:"Name"}),(0,t.jsx)(c.Input,{id:"project-name",value:i,onChange:e=>o(e.target.value),placeholder:"My Project","data-testid":"project-name-input"})]}),(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)(p.Label,{htmlFor:"project-prefix",children:"Identifier Prefix"}),(0,t.jsx)(c.Input,{id:"project-prefix",value:l,onChange:e=>x(e.target.value.toUpperCase()),placeholder:"PROJ",maxLength:5,"data-testid":"project-prefix-input"}),(0,t.jsx)("p",{className:"text-muted-foreground text-[10px]",children:"1-5 uppercase letters/numbers, used in work item identifiers (e.g., PROJ-42)"})]}),(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)(p.Label,{htmlFor:"project-desc",children:"Description (optional)"}),(0,t.jsx)(u.Textarea,{id:"project-desc",value:m,onChange:e=>f(e.target.value),placeholder:"What is this project about?",rows:3,"data-testid":"project-desc-input"})]}),j?(0,t.jsx)("p",{className:"text-destructive text-xs","data-testid":"create-project-error",children:j}):null]}),(0,t.jsxs)(d.DialogFooter,{children:[(0,t.jsx)(n.Button,{variant:"outline",onClick:()=>s(!1),disabled:b,children:"Cancel"}),(0,t.jsx)(n.Button,{onClick:y,disabled:!i.trim()||!l.trim()||b,"data-testid":"create-project-submit",children:b?"Creating...":"Create"})]})]})})}function f({projects:e,className:d}){let[c,p]=(0,a.useState)(e),[u,x]=(0,a.useState)(!1),g=(0,s.useRouter)();return(0,t.jsxs)("div",{"data-testid":"projects-page-client",className:(0,o.cn)("space-y-4",d),children:[(0,t.jsxs)("div",{className:"flex items-center justify-between",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(r.FolderKanban,{className:"text-muted-foreground h-4 w-4"}),(0,t.jsx)("h1",{className:"text-sm font-bold tracking-tight",children:"Projects"}),(0,t.jsxs)("span",{className:"text-muted-foreground text-[10px]",children:[c.length," projects"]})]}),(0,t.jsxs)(n.Button,{variant:"outline",size:"sm",className:"h-7 text-xs",onClick:()=>x(!0),"data-testid":"create-project-btn",children:[(0,t.jsx)(i.Plus,{className:"mr-1 h-3 w-3"}),"New Project"]})]}),0===c.length?(0,t.jsxs)("div",{"data-testid":"projects-page-empty",className:"text-muted-foreground flex flex-col items-center justify-center py-12 text-center",children:[(0,t.jsx)(r.FolderKanban,{className:"mb-2 h-6 w-6 opacity-20"}),(0,t.jsx)("p",{className:"text-xs",children:"No projects yet. Create your first project to get started."})]}):(0,t.jsx)("div",{"data-testid":"projects-page-grid",className:"grid grid-cols-1 gap-3 sm:grid-cols-2 lg:grid-cols-3",children:c.map(e=>(0,t.jsxs)("button",{type:"button","data-testid":`project-card-${e.slug}`,className:"bg-card hover:bg-accent text-card-foreground rounded-lg border p-4 text-left transition-colors",onClick:()=>g.push(`/projects/${e.slug}`),children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)("span",{className:"text-sm font-semibold",children:e.name}),(0,t.jsx)(l.Badge,{variant:"outline",className:"text-[10px]",children:e.identifierPrefix})]}),e.description?(0,t.jsx)("p",{className:"text-muted-foreground mt-1 line-clamp-2 text-xs",children:e.description}):null,(0,t.jsxs)("div",{className:"text-muted-foreground mt-2 text-[10px]",children:[e.workItemCounter," items"]})]},e.id))}),(0,t.jsx)(m,{open:u,onOpenChange:x,onCreated:e=>{p(t=>[...t,e]),x(!1)}})]})}e.s(["ProjectsPageClient",()=>f],419705)}]);
@@ -1 +1 @@
1
- (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,468304,e=>{"use strict";var t=e.i(679606),s=e.i(152155),a=e.i(291967),r=e.i(922528),i=e.i(151080),n=e.i(685995),l=e.i(287620),o=e.i(566033),d=e.i(936589),c=e.i(713123),x="Tabs",[m,u]=(0,r.createContextScope)(x,[i.createRovingFocusGroupScope]),h=(0,i.createRovingFocusGroupScope)(),[p,g]=m(x),f=s.forwardRef((e,s)=>{let{__scopeTabs:a,value:r,onValueChange:i,defaultValue:n,orientation:m="horizontal",dir:u,activationMode:h="automatic",...g}=e,f=(0,o.useDirection)(u),[b,j]=(0,d.useControllableState)({prop:r,onChange:i,defaultProp:n??"",caller:x});return(0,t.jsx)(p,{scope:a,baseId:(0,c.useId)(),value:b,onValueChange:j,orientation:m,dir:f,activationMode:h,children:(0,t.jsx)(l.Primitive.div,{dir:f,"data-orientation":m,...g,ref:s})})});f.displayName=x;var b="TabsList",j=s.forwardRef((e,s)=>{let{__scopeTabs:a,loop:r=!0,...n}=e,o=g(b,a),d=h(a);return(0,t.jsx)(i.Root,{asChild:!0,...d,orientation:o.orientation,dir:o.dir,loop:r,children:(0,t.jsx)(l.Primitive.div,{role:"tablist","aria-orientation":o.orientation,...n,ref:s})})});j.displayName=b;var v="TabsTrigger",y=s.forwardRef((e,s)=>{let{__scopeTabs:r,value:n,disabled:o=!1,...d}=e,c=g(v,r),x=h(r),m=k(c.baseId,n),u=T(c.baseId,n),p=n===c.value;return(0,t.jsx)(i.Item,{asChild:!0,...x,focusable:!o,active:p,children:(0,t.jsx)(l.Primitive.button,{type:"button",role:"tab","aria-selected":p,"aria-controls":u,"data-state":p?"active":"inactive","data-disabled":o?"":void 0,disabled:o,id:m,...d,ref:s,onMouseDown:(0,a.composeEventHandlers)(e.onMouseDown,e=>{o||0!==e.button||!1!==e.ctrlKey?e.preventDefault():c.onValueChange(n)}),onKeyDown:(0,a.composeEventHandlers)(e.onKeyDown,e=>{[" ","Enter"].includes(e.key)&&c.onValueChange(n)}),onFocus:(0,a.composeEventHandlers)(e.onFocus,()=>{let e="manual"!==c.activationMode;p||o||!e||c.onValueChange(n)})})})});y.displayName=v;var N="TabsContent",C=s.forwardRef((e,a)=>{let{__scopeTabs:r,value:i,forceMount:o,children:d,...c}=e,x=g(N,r),m=k(x.baseId,i),u=T(x.baseId,i),h=i===x.value,p=s.useRef(h);return s.useEffect(()=>{let e=requestAnimationFrame(()=>p.current=!1);return()=>cancelAnimationFrame(e)},[]),(0,t.jsx)(n.Presence,{present:o||h,children:({present:s})=>(0,t.jsx)(l.Primitive.div,{"data-state":h?"active":"inactive","data-orientation":x.orientation,role:"tabpanel","aria-labelledby":m,hidden:!s,id:u,tabIndex:0,...c,ref:a,style:{...e.style,animationDuration:p.current?"0s":void 0},children:s&&d})})});function k(e,t){return`${e}-trigger-${t}`}function T(e,t){return`${e}-content-${t}`}C.displayName=N,e.s(["Content",()=>C,"List",()=>j,"Root",()=>f,"Tabs",()=>f,"TabsContent",()=>C,"TabsList",()=>j,"TabsTrigger",()=>y,"Trigger",()=>y,"createTabsScope",()=>u],743133);var w=e.i(743133),w=w,z=e.i(131777);let P=w.Root,L=s.forwardRef(({className:e,...s},a)=>(0,t.jsx)(w.List,{ref:a,className:(0,z.cn)("bg-muted text-muted-foreground inline-flex h-9 items-center justify-center rounded-lg p-1",e),...s}));L.displayName=w.List.displayName;let R=s.forwardRef(({className:e,...s},a)=>(0,t.jsx)(w.Trigger,{ref:a,className:(0,z.cn)("ring-offset-background focus-visible:ring-ring data-[state=active]:bg-background data-[state=active]:text-foreground inline-flex items-center justify-center rounded-md px-3 py-1 text-sm font-medium whitespace-nowrap transition-all focus-visible:ring-2 focus-visible:ring-offset-2 focus-visible:outline-none disabled:pointer-events-none disabled:opacity-50 data-[state=active]:shadow",e),...s}));R.displayName=w.Trigger.displayName;let S=s.forwardRef(({className:e,...s},a)=>(0,t.jsx)(w.Content,{ref:a,className:(0,z.cn)("ring-offset-background focus-visible:ring-ring mt-2 focus-visible:ring-2 focus-visible:ring-offset-2 focus-visible:outline-none",e),...s}));S.displayName=w.Content.displayName,e.s(["Tabs",()=>P,"TabsContent",()=>S,"TabsList",()=>L,"TabsTrigger",()=>R],468304)},791909,e=>{"use strict";let t=(0,e.i(903645).default)("file-pen",[["path",{d:"M12.659 22H18a2 2 0 0 0 2-2V8a2.4 2.4 0 0 0-.706-1.706l-3.588-3.588A2.4 2.4 0 0 0 14 2H6a2 2 0 0 0-2 2v9.34",key:"o6klzx"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M10.378 12.622a1 1 0 0 1 3 3.003L8.36 20.637a2 2 0 0 1-.854.506l-2.867.837a.5.5 0 0 1-.62-.62l.836-2.869a2 2 0 0 1 .506-.853z",key:"zhnas1"}]]);e.s(["default",()=>t])},812919,e=>{"use strict";let t=(0,e.i(903645).default)("file-plus",[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M9 15h6",key:"cctwl0"}],["path",{d:"M12 18v-6",key:"17g6i2"}]]);e.s(["FilePlus",()=>t],812919)},916489,235749,e=>{"use strict";let t=(0,e.i(903645).default)("layout-dashboard",[["rect",{width:"7",height:"9",x:"3",y:"3",rx:"1",key:"10lvy0"}],["rect",{width:"7",height:"5",x:"14",y:"3",rx:"1",key:"16une8"}],["rect",{width:"7",height:"9",x:"14",y:"12",rx:"1",key:"1hutg5"}],["rect",{width:"7",height:"5",x:"3",y:"16",rx:"1",key:"ldoo1y"}]]);e.s(["LayoutDashboard",()=>t],916489);var s=e.i(791909);e.s(["FileEdit",()=>s.default],235749)},496215,e=>{"use strict";var t=e.i(508893);let s=(0,t.createServerReference)("60e1d59ec85e1ee48a92ae9ce40006ca767caf92a9",t.callServer,void 0,t.findSourceMapURL,"getGitRepoInfo");e.s(["getGitRepoInfo",()=>s])},610661,e=>{"use strict";var t=e.i(679606),s=e.i(152155),a=e.i(711434),r=e.i(208986),i=e.i(338573),n=e.i(619933),l=e.i(43416),o=e.i(724042),d=e.i(64970),c=e.i(433548),x=e.i(723925),m=e.i(83428),u=e.i(916489),h=e.i(248109),p=e.i(949228),g=e.i(565530),f=e.i(958481),b=e.i(32494),j=e.i(903645);let v=(0,j.default)("tag",[["path",{d:"M12.586 2.586A2 2 0 0 0 11.172 2H4a2 2 0 0 0-2 2v7.172a2 2 0 0 0 .586 1.414l8.704 8.704a2.426 2.426 0 0 0 3.42 0l6.58-6.58a2.426 2.426 0 0 0 0-3.42z",key:"vktsd0"}],["circle",{cx:"7.5",cy:"7.5",r:".5",fill:"currentColor",key:"kqv944"}]]);var y=e.i(237260),N=e.i(235749),C=e.i(812919);let k=(0,j.default)("file-check-corner",[["path",{d:"M10.5 22H6a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.706.706l3.588 3.588A2.4 2.4 0 0 1 20 8v6",key:"g5mvt7"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"m14 20 2 2 4-4",key:"15kota"}]]);var T=e.i(131777);e.i(1650);var w=e.i(511495);e.i(199348);var z=e.i(917466),P=e.i(102828),L=e.i(468304),R=e.i(676852),S=e.i(8537),I=e.i(175921),D=e.i(928112),F=e.i(496215);let M="text-muted-foreground hover:bg-foreground/8 hover:text-foreground inline-flex size-8 items-center justify-center rounded-[3px] disabled:opacity-40",A="bg-border/60 mx-1.5 h-5 w-px shrink-0";function E({data:e,initialTab:p}){let g=(0,I.useFeatureFlags)(),f=(0,a.useRouter)(),b=(0,a.usePathname)().startsWith("/repository/"),[j,v]=(0,s.useState)(p??"overview"),[y,N]=(0,s.useState)(!1),C=(0,R.useRepositoryActions)(e.repositoryPath?{repositoryId:e.id,repositoryPath:e.repositoryPath}:null),k=(0,s.useCallback)(()=>{f.push("/control-center")},[f]),F=(0,S.useDeployAction)(e.repositoryPath?{targetId:e.repositoryPath,targetType:"repository",repositoryPath:e.repositoryPath}:null),E="Booting"===F.status||"Ready"===F.status,$=(0,s.useCallback)(()=>{e.repositoryPath&&(navigator.clipboard.writeText(e.repositoryPath),N(!0),setTimeout(()=>N(!1),2e3))},[e.repositoryPath]),B=e.id?`repo-${e.id}`:`repo-${e.name}`;return(0,t.jsx)(w.BaseDrawer,{open:b,onClose:k,size:"lg",modal:!1,"data-testid":"repository-drawer",children:(0,t.jsxs)(L.Tabs,{value:j,onValueChange:v,className:"flex min-h-0 flex-1 flex-col",children:[(0,t.jsxs)(L.TabsList,{className:"bg-muted/50 h-auto w-full shrink-0 justify-start gap-0 rounded-none border-b p-0",children:[(0,t.jsxs)(L.TabsTrigger,{value:"overview",className:"text-muted-foreground hover:bg-muted hover:text-foreground data-[state=active]:bg-background data-[state=active]:text-foreground data-[state=active]:border-t-primary [&:not([data-state=active])]:border-r-border relative h-auto rounded-none border-t-2 border-r border-t-transparent border-r-transparent bg-transparent px-3.5 py-2.5 text-[13px] font-normal shadow-none transition-none last:border-r-transparent data-[state=active]:shadow-none",children:[(0,t.jsx)(u.LayoutDashboard,{className:"mr-1.5 size-4"}),"Overview"]}),(0,t.jsxs)(L.TabsTrigger,{value:"chat",className:"text-muted-foreground hover:bg-muted hover:text-foreground data-[state=active]:bg-background data-[state=active]:text-foreground data-[state=active]:border-t-primary [&:not([data-state=active])]:border-r-border relative h-auto rounded-none border-t-2 border-r border-t-transparent border-r-transparent bg-transparent px-3.5 py-2.5 text-[13px] font-normal shadow-none transition-none last:border-r-transparent data-[state=active]:shadow-none",children:[(0,t.jsx)(h.MessageSquare,{className:"mr-1.5 size-4"}),"Chat"]})]}),(0,t.jsxs)("div",{className:"bg-muted/40 shrink-0 border-b",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2 px-4 pe-10 pt-2.5 pb-2","data-testid":"repository-drawer-header",children:[(0,t.jsx)("h2",{className:"text-foreground min-w-0 truncate text-base font-semibold tracking-tight",children:e.name}),e.repositoryPath?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("span",{className:"text-muted-foreground/40 text-xs",children:"/"}),(0,t.jsx)("span",{className:"text-muted-foreground min-w-0 truncate font-mono text-[11px]",children:e.repositoryPath})]}):null]}),e.repositoryPath?(0,t.jsx)("div",{"data-testid":"repository-drawer-toolbar",children:(0,t.jsxs)("div",{className:"flex h-9 items-center px-1.5",children:[(0,t.jsxs)(P.TooltipProvider,{delayDuration:300,children:[(0,t.jsxs)("div",{className:"flex items-center",children:[(0,t.jsxs)(P.Tooltip,{children:[(0,t.jsx)(P.TooltipTrigger,{asChild:!0,children:(0,t.jsx)("button",{type:"button",className:M,onClick:C.openInIde,disabled:C.ideLoading,"aria-label":"Open in IDE",children:C.ideLoading?(0,t.jsx)(m.Loader2,{className:"size-3.5 animate-spin"}):(0,t.jsx)(r.Code2,{className:"size-4"})})}),(0,t.jsx)(P.TooltipContent,{side:"bottom",className:"text-xs",children:"Open in IDE"})]}),(0,t.jsxs)(P.Tooltip,{children:[(0,t.jsx)(P.TooltipTrigger,{asChild:!0,children:(0,t.jsx)("button",{type:"button",className:M,onClick:C.openInShell,disabled:C.shellLoading,"aria-label":"Open terminal",children:C.shellLoading?(0,t.jsx)(m.Loader2,{className:"size-3.5 animate-spin"}):(0,t.jsx)(i.Terminal,{className:"size-4"})})}),(0,t.jsx)(P.TooltipContent,{side:"bottom",className:"text-xs",children:"Open terminal"})]}),(0,t.jsxs)(P.Tooltip,{children:[(0,t.jsx)(P.TooltipTrigger,{asChild:!0,children:(0,t.jsx)("button",{type:"button",className:M,onClick:C.openFolder,disabled:C.folderLoading,"aria-label":"Open folder",children:C.folderLoading?(0,t.jsx)(m.Loader2,{className:"size-3.5 animate-spin"}):(0,t.jsx)(n.FolderOpen,{className:"size-4"})})}),(0,t.jsx)(P.TooltipContent,{side:"bottom",className:"text-xs",children:"Open folder"})]}),(0,t.jsxs)(P.Tooltip,{children:[(0,t.jsx)(P.TooltipTrigger,{asChild:!0,children:(0,t.jsx)("button",{type:"button",className:M,onClick:$,"aria-label":"Copy path",children:y?(0,t.jsx)(x.Check,{className:"size-3.5 text-green-500"}):(0,t.jsx)(c.Copy,{className:"size-4"})})}),(0,t.jsx)(P.TooltipContent,{side:"bottom",className:"text-xs",children:y?"Copied!":"Copy path"})]})]}),e.id&&g.gitRebaseSync?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("div",{className:A}),(0,t.jsxs)(P.Tooltip,{children:[(0,t.jsx)(P.TooltipTrigger,{asChild:!0,children:(0,t.jsx)("button",{type:"button",className:M,onClick:C.syncMain,disabled:C.syncLoading,"aria-label":"Sync main",children:C.syncLoading?(0,t.jsx)(m.Loader2,{className:"size-3.5 animate-spin"}):(0,t.jsx)(l.RefreshCw,{className:"size-4"})})}),(0,t.jsx)(P.TooltipContent,{side:"bottom",className:"text-xs",children:"Sync main"})]})]}):null,g.envDeploy?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("div",{className:A}),(0,t.jsxs)(P.Tooltip,{children:[(0,t.jsx)(P.TooltipTrigger,{asChild:!0,children:(0,t.jsx)("button",{type:"button",disabled:F.deployLoading||F.stopLoading,onClick:E?F.stop:F.deploy,className:(0,T.cn)("inline-flex size-7 items-center justify-center rounded-[3px] disabled:opacity-40",E?"text-red-500 hover:bg-red-500/10 hover:text-red-400":"text-green-500 hover:bg-green-500/10 hover:text-green-400"),"aria-label":E?"Stop dev server":"Start dev server",children:F.deployLoading||F.stopLoading?(0,t.jsx)(m.Loader2,{className:"size-3.5 animate-spin"}):E?(0,t.jsx)(d.Square,{className:"size-4"}):(0,t.jsx)(o.Play,{className:"size-4"})})}),(0,t.jsx)(P.TooltipContent,{side:"bottom",className:"text-xs",children:E?"Stop dev server":"Start dev server"})]}),E?(0,t.jsx)(z.DeploymentStatusBadge,{status:F.status,url:F.url,targetId:e.repositoryPath}):null]}):null]}),(0,t.jsx)("div",{className:"flex-1"})]})}):null]}),(0,t.jsx)(L.TabsContent,{value:"overview",className:"mt-0 flex-1 overflow-y-auto",children:(0,t.jsx)(O,{data:e,syncError:C.syncError})}),(0,t.jsx)(L.TabsContent,{value:"chat",className:"mt-0 flex min-h-0 flex-1 flex-col overflow-hidden",children:(0,t.jsx)(D.ChatTab,{featureId:B,worktreePath:e.repositoryPath})})]})})}function $({icon:e,title:s,children:a}){return(0,t.jsxs)("div",{className:"px-3 pt-4 pb-1",children:[(0,t.jsxs)("div",{className:"text-foreground mb-2 flex items-center gap-1.5 text-sm font-semibold tracking-wider uppercase",children:[(0,t.jsx)(e,{className:"size-4 opacity-50"}),s]}),a]})}function B({children:e,className:s}){return(0,t.jsx)("div",{className:(0,T.cn)("bg-muted/60 rounded-md border border-transparent p-3",s),children:e})}function G({label:e,children:s}){return(0,t.jsxs)("div",{className:"flex flex-col gap-0.5",children:[(0,t.jsx)("span",{className:"text-foreground/40 text-[11px] font-medium tracking-wider uppercase",children:e}),(0,t.jsx)("span",{className:"text-sm leading-snug",children:s})]})}function O({data:e,syncError:a}){let[r,i]=(0,s.useState)(null),[n,l]=(0,s.useState)(!1);if((0,s.useEffect)(()=>{if(!e.repositoryPath)return;let t=!1;return l(!0),(0,F.getGitRepoInfo)(e.repositoryPath,8).then(e=>{t||i(e)}).catch(()=>{}).finally(()=>{t||l(!1)}),()=>{t=!0}},[e.repositoryPath]),!e.repositoryPath)return null;let o=r?.workingTree,d=o&&(o.staged>0||o.modified>0||o.untracked>0),c=r?.diffStats;return(0,t.jsxs)("div",{className:"pb-4",children:[n?(0,t.jsxs)("div",{className:"text-foreground/40 flex items-center gap-2 px-4 py-8 text-sm",children:[(0,t.jsx)(m.Loader2,{className:"size-4 animate-spin"})," Loading repository info..."]}):null,r?(0,t.jsxs)("div",{className:"grid grid-cols-2 gap-2 px-3 pt-3",children:[(0,t.jsx)(B,{children:(0,t.jsxs)(G,{label:"Branch",children:[(0,t.jsxs)("span",{className:"inline-flex items-center gap-1.5",children:[(0,t.jsx)(p.GitBranch,{className:"text-foreground/30 size-3.5 shrink-0"}),(0,t.jsx)("code",{className:"font-mono text-sm",children:r.currentBranch??e.branch??"—"})]}),null!=e.behindCount&&e.behindCount>0?(0,t.jsxs)("span",{className:"mt-0.5 block text-xs text-orange-600 dark:text-orange-400",children:[e.behindCount," behind default"]}):null]})}),(0,t.jsx)(B,{children:(0,t.jsx)(G,{label:"Working Tree",children:d?(0,t.jsxs)("div",{className:"flex flex-wrap gap-x-3 gap-y-0.5",children:[o.staged>0?(0,t.jsxs)("span",{className:"inline-flex items-center gap-1 text-sm text-green-600 dark:text-green-400",children:[(0,t.jsx)(k,{className:"size-3.5"})," ",o.staged," staged"]}):null,o.modified>0?(0,t.jsxs)("span",{className:"inline-flex items-center gap-1 text-sm text-amber-600 dark:text-amber-400",children:[(0,t.jsx)(N.FileEdit,{className:"size-3.5"})," ",o.modified," modified"]}):null,o.untracked>0?(0,t.jsxs)("span",{className:"text-foreground/50 inline-flex items-center gap-1 text-sm",children:[(0,t.jsx)(C.FilePlus,{className:"size-3.5"})," ",o.untracked," untracked"]}):null]}):(0,t.jsxs)("span",{className:"inline-flex items-center gap-1.5 text-sm text-green-600 dark:text-green-400",children:[(0,t.jsx)(x.Check,{className:"size-3.5"})," Clean"]})})}),c?(0,t.jsx)(B,{children:(0,t.jsx)(G,{label:"Uncommitted Changes",children:(0,t.jsxs)("div",{className:"flex items-center gap-3 text-sm",children:[(0,t.jsxs)("span",{children:[c.filesChanged," file",1!==c.filesChanged?"s":""]}),(0,t.jsxs)("span",{className:"text-green-600 dark:text-green-400",children:["+",c.insertions]}),(0,t.jsxs)("span",{className:"text-red-500 dark:text-red-400",children:["-",c.deletions]})]})})}):null,r.remotes.length>0?(0,t.jsx)(B,{children:(0,t.jsx)(G,{label:"Remote",children:r.remotes.map(e=>(0,t.jsxs)("span",{className:"inline-flex items-center gap-1.5 text-sm",children:[(0,t.jsx)(b.Globe,{className:"text-foreground/30 size-3.5 shrink-0"}),(0,t.jsx)("span",{className:"truncate",children:e.url.replace(/\.git$/,"").replace(/^https?:\/\/([^@]+@)?/,"").replace(/x-access-token:[^@]+@/,"")})]},e.name))})}):null,r.stashCount>0?(0,t.jsx)(B,{children:(0,t.jsx)(G,{label:"Stashes",children:(0,t.jsxs)("span",{className:"inline-flex items-center gap-1.5 text-sm",children:[(0,t.jsx)(y.Archive,{className:"text-foreground/30 size-3.5 shrink-0"}),r.stashCount," stash",1!==r.stashCount?"es":""]})})}):null,r.tags.length>0?(0,t.jsx)(B,{children:(0,t.jsx)(G,{label:"Tags",children:(0,t.jsx)("div",{className:"flex flex-wrap gap-1.5",children:r.tags.map(e=>(0,t.jsxs)("span",{className:"bg-foreground/[0.04] inline-flex items-center gap-0.5 rounded px-1.5 py-0.5 text-xs",children:[(0,t.jsx)(v,{className:"text-foreground/30 size-2.5"}),e]},e))})})}):null]}):null,r&&r.commits.length>0?(0,t.jsx)($,{icon:g.GitCommitHorizontal,title:"Recent Commits",children:(0,t.jsxs)("div",{className:"relative ml-3",children:[(0,t.jsx)("div",{className:"bg-border absolute top-2 bottom-2 left-[5px] w-px"}),r.commits.map((e,s)=>(0,t.jsxs)("div",{className:"group relative flex gap-3 py-1.5",children:[(0,t.jsx)("div",{className:(0,T.cn)("relative z-10 mt-1.5 size-[11px] shrink-0 rounded-full border-2",0===s?"border-primary bg-primary":"border-border bg-background group-hover:border-foreground/30")}),(0,t.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,t.jsxs)("div",{className:"flex items-baseline gap-2",children:[(0,t.jsx)("p",{className:"min-w-0 truncate text-sm leading-snug",children:e.subject}),(0,t.jsx)("code",{className:"text-foreground/30 shrink-0 font-mono text-[11px]",children:e.shortHash})]}),(0,t.jsxs)("div",{className:"text-foreground/40 mt-0.5 flex items-center gap-2 text-xs",children:[(0,t.jsx)("span",{children:e.author}),(0,t.jsx)("span",{children:"·"}),(0,t.jsx)("span",{children:e.relativeDate}),e.branch?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("span",{children:"·"}),(0,t.jsxs)("span",{className:"inline-flex items-center gap-0.5",children:[(0,t.jsx)(p.GitBranch,{className:"size-3"}),e.branch]})]}):null]})]})]},e.hash))]})}):null,r&&r.branches.length>1?(0,t.jsx)($,{icon:p.GitBranch,title:"Branches",children:(0,t.jsx)("div",{className:"flex flex-col",children:[...r.branches].sort((e,t)=>{let s,a,r,i;return e.isCurrent&&!t.isCurrent?-1:!e.isCurrent&&t.isCurrent?1:(s=e.name,/^(main|master)$/.test(s)&&(a=t.name,!/^(main|master)$/.test(a)))?-1:+(r=e.name,!!(!/^(main|master)$/.test(r)&&(i=t.name,/^(main|master)$/.test(i))))}).map(e=>(0,t.jsxs)("div",{className:(0,T.cn)("flex items-center justify-between rounded px-2 py-1.5",e.isCurrent&&"bg-muted/60"),children:[(0,t.jsxs)("span",{className:"inline-flex items-center gap-1.5 text-sm",children:[e.isCurrent?(0,t.jsx)("span",{className:"size-2 shrink-0 rounded-full bg-green-500"}):/^(main|master)$/.test(e.name)?(0,t.jsx)("span",{className:"size-2 shrink-0 rounded-full bg-blue-500"}):(0,t.jsx)("span",{className:"bg-foreground/10 size-2 shrink-0 rounded-full"}),(0,t.jsx)("code",{className:"font-mono text-[13px]",children:e.name}),e.isCurrent?(0,t.jsx)("span",{className:"text-foreground/40 text-[10px]",children:"current"}):null]}),(0,t.jsx)("span",{className:"text-foreground/40 text-xs",children:e.lastCommitDate})]},e.name))})}):null,a?(0,t.jsx)($,{icon:f.AlertTriangle,title:"Issues",children:(0,t.jsx)(B,{className:"bg-destructive/5 border-transparent",children:(0,t.jsx)("p",{className:"text-destructive text-sm",children:a})})}):null]})}e.s(["RepositoryDrawerClient",()=>E],610661)}]);
1
+ (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,468304,e=>{"use strict";var t=e.i(679606),s=e.i(152155),a=e.i(291967),r=e.i(922528),i=e.i(151080),n=e.i(685995),l=e.i(287620),o=e.i(566033),d=e.i(936589),c=e.i(713123),x="Tabs",[m,u]=(0,r.createContextScope)(x,[i.createRovingFocusGroupScope]),h=(0,i.createRovingFocusGroupScope)(),[p,g]=m(x),f=s.forwardRef((e,s)=>{let{__scopeTabs:a,value:r,onValueChange:i,defaultValue:n,orientation:m="horizontal",dir:u,activationMode:h="automatic",...g}=e,f=(0,o.useDirection)(u),[b,j]=(0,d.useControllableState)({prop:r,onChange:i,defaultProp:n??"",caller:x});return(0,t.jsx)(p,{scope:a,baseId:(0,c.useId)(),value:b,onValueChange:j,orientation:m,dir:f,activationMode:h,children:(0,t.jsx)(l.Primitive.div,{dir:f,"data-orientation":m,...g,ref:s})})});f.displayName=x;var b="TabsList",j=s.forwardRef((e,s)=>{let{__scopeTabs:a,loop:r=!0,...n}=e,o=g(b,a),d=h(a);return(0,t.jsx)(i.Root,{asChild:!0,...d,orientation:o.orientation,dir:o.dir,loop:r,children:(0,t.jsx)(l.Primitive.div,{role:"tablist","aria-orientation":o.orientation,...n,ref:s})})});j.displayName=b;var v="TabsTrigger",y=s.forwardRef((e,s)=>{let{__scopeTabs:r,value:n,disabled:o=!1,...d}=e,c=g(v,r),x=h(r),m=k(c.baseId,n),u=T(c.baseId,n),p=n===c.value;return(0,t.jsx)(i.Item,{asChild:!0,...x,focusable:!o,active:p,children:(0,t.jsx)(l.Primitive.button,{type:"button",role:"tab","aria-selected":p,"aria-controls":u,"data-state":p?"active":"inactive","data-disabled":o?"":void 0,disabled:o,id:m,...d,ref:s,onMouseDown:(0,a.composeEventHandlers)(e.onMouseDown,e=>{o||0!==e.button||!1!==e.ctrlKey?e.preventDefault():c.onValueChange(n)}),onKeyDown:(0,a.composeEventHandlers)(e.onKeyDown,e=>{[" ","Enter"].includes(e.key)&&c.onValueChange(n)}),onFocus:(0,a.composeEventHandlers)(e.onFocus,()=>{let e="manual"!==c.activationMode;p||o||!e||c.onValueChange(n)})})})});y.displayName=v;var N="TabsContent",C=s.forwardRef((e,a)=>{let{__scopeTabs:r,value:i,forceMount:o,children:d,...c}=e,x=g(N,r),m=k(x.baseId,i),u=T(x.baseId,i),h=i===x.value,p=s.useRef(h);return s.useEffect(()=>{let e=requestAnimationFrame(()=>p.current=!1);return()=>cancelAnimationFrame(e)},[]),(0,t.jsx)(n.Presence,{present:o||h,children:({present:s})=>(0,t.jsx)(l.Primitive.div,{"data-state":h?"active":"inactive","data-orientation":x.orientation,role:"tabpanel","aria-labelledby":m,hidden:!s,id:u,tabIndex:0,...c,ref:a,style:{...e.style,animationDuration:p.current?"0s":void 0},children:s&&d})})});function k(e,t){return`${e}-trigger-${t}`}function T(e,t){return`${e}-content-${t}`}C.displayName=N,e.s(["Content",()=>C,"List",()=>j,"Root",()=>f,"Tabs",()=>f,"TabsContent",()=>C,"TabsList",()=>j,"TabsTrigger",()=>y,"Trigger",()=>y,"createTabsScope",()=>u],743133);var w=e.i(743133),w=w,z=e.i(131777);let P=w.Root,L=s.forwardRef(({className:e,...s},a)=>(0,t.jsx)(w.List,{ref:a,className:(0,z.cn)("bg-muted text-muted-foreground inline-flex h-9 items-center justify-center rounded-lg p-1",e),...s}));L.displayName=w.List.displayName;let R=s.forwardRef(({className:e,...s},a)=>(0,t.jsx)(w.Trigger,{ref:a,className:(0,z.cn)("ring-offset-background focus-visible:ring-ring data-[state=active]:bg-background data-[state=active]:text-foreground inline-flex items-center justify-center rounded-md px-3 py-1 text-sm font-medium whitespace-nowrap transition-all focus-visible:ring-2 focus-visible:ring-offset-2 focus-visible:outline-none disabled:pointer-events-none disabled:opacity-50 data-[state=active]:shadow",e),...s}));R.displayName=w.Trigger.displayName;let S=s.forwardRef(({className:e,...s},a)=>(0,t.jsx)(w.Content,{ref:a,className:(0,z.cn)("ring-offset-background focus-visible:ring-ring mt-2 focus-visible:ring-2 focus-visible:ring-offset-2 focus-visible:outline-none",e),...s}));S.displayName=w.Content.displayName,e.s(["Tabs",()=>P,"TabsContent",()=>S,"TabsList",()=>L,"TabsTrigger",()=>R],468304)},791909,e=>{"use strict";let t=(0,e.i(903645).default)("file-pen",[["path",{d:"M12.659 22H18a2 2 0 0 0 2-2V8a2.4 2.4 0 0 0-.706-1.706l-3.588-3.588A2.4 2.4 0 0 0 14 2H6a2 2 0 0 0-2 2v9.34",key:"o6klzx"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M10.378 12.622a1 1 0 0 1 3 3.003L8.36 20.637a2 2 0 0 1-.854.506l-2.867.837a.5.5 0 0 1-.62-.62l.836-2.869a2 2 0 0 1 .506-.853z",key:"zhnas1"}]]);e.s(["default",()=>t])},812919,e=>{"use strict";let t=(0,e.i(903645).default)("file-plus",[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M9 15h6",key:"cctwl0"}],["path",{d:"M12 18v-6",key:"17g6i2"}]]);e.s(["FilePlus",()=>t],812919)},916489,235749,e=>{"use strict";let t=(0,e.i(903645).default)("layout-dashboard",[["rect",{width:"7",height:"9",x:"3",y:"3",rx:"1",key:"10lvy0"}],["rect",{width:"7",height:"5",x:"14",y:"3",rx:"1",key:"16une8"}],["rect",{width:"7",height:"9",x:"14",y:"12",rx:"1",key:"1hutg5"}],["rect",{width:"7",height:"5",x:"3",y:"16",rx:"1",key:"ldoo1y"}]]);e.s(["LayoutDashboard",()=>t],916489);var s=e.i(791909);e.s(["FileEdit",()=>s.default],235749)},942944,e=>{"use strict";var t=e.i(508893);let s=(0,t.createServerReference)("60c74c9210e9289e344bd24cee7ccadf6882702ae9",t.callServer,void 0,t.findSourceMapURL,"getGitRepoInfo");e.s(["getGitRepoInfo",()=>s])},610661,e=>{"use strict";var t=e.i(679606),s=e.i(152155),a=e.i(711434),r=e.i(208986),i=e.i(338573),n=e.i(619933),l=e.i(43416),o=e.i(724042),d=e.i(64970),c=e.i(433548),x=e.i(723925),m=e.i(83428),u=e.i(916489),h=e.i(248109),p=e.i(949228),g=e.i(565530),f=e.i(958481),b=e.i(32494),j=e.i(903645);let v=(0,j.default)("tag",[["path",{d:"M12.586 2.586A2 2 0 0 0 11.172 2H4a2 2 0 0 0-2 2v7.172a2 2 0 0 0 .586 1.414l8.704 8.704a2.426 2.426 0 0 0 3.42 0l6.58-6.58a2.426 2.426 0 0 0 0-3.42z",key:"vktsd0"}],["circle",{cx:"7.5",cy:"7.5",r:".5",fill:"currentColor",key:"kqv944"}]]);var y=e.i(237260),N=e.i(235749),C=e.i(812919);let k=(0,j.default)("file-check-corner",[["path",{d:"M10.5 22H6a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.706.706l3.588 3.588A2.4 2.4 0 0 1 20 8v6",key:"g5mvt7"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"m14 20 2 2 4-4",key:"15kota"}]]);var T=e.i(131777);e.i(1650);var w=e.i(511495);e.i(199348);var z=e.i(917466),P=e.i(102828),L=e.i(468304),R=e.i(676852),S=e.i(8537),I=e.i(175921),D=e.i(928112),F=e.i(942944);let M="text-muted-foreground hover:bg-foreground/8 hover:text-foreground inline-flex size-8 items-center justify-center rounded-[3px] disabled:opacity-40",A="bg-border/60 mx-1.5 h-5 w-px shrink-0";function E({data:e,initialTab:p}){let g=(0,I.useFeatureFlags)(),f=(0,a.useRouter)(),b=(0,a.usePathname)().startsWith("/repository/"),[j,v]=(0,s.useState)(p??"overview"),[y,N]=(0,s.useState)(!1),C=(0,R.useRepositoryActions)(e.repositoryPath?{repositoryId:e.id,repositoryPath:e.repositoryPath}:null),k=(0,s.useCallback)(()=>{f.push("/control-center")},[f]),F=(0,S.useDeployAction)(e.repositoryPath?{targetId:e.repositoryPath,targetType:"repository",repositoryPath:e.repositoryPath}:null),E="Booting"===F.status||"Ready"===F.status,$=(0,s.useCallback)(()=>{e.repositoryPath&&(navigator.clipboard.writeText(e.repositoryPath),N(!0),setTimeout(()=>N(!1),2e3))},[e.repositoryPath]),B=e.id?`repo-${e.id}`:`repo-${e.name}`;return(0,t.jsx)(w.BaseDrawer,{open:b,onClose:k,size:"lg",modal:!1,"data-testid":"repository-drawer",children:(0,t.jsxs)(L.Tabs,{value:j,onValueChange:v,className:"flex min-h-0 flex-1 flex-col",children:[(0,t.jsxs)(L.TabsList,{className:"bg-muted/50 h-auto w-full shrink-0 justify-start gap-0 rounded-none border-b p-0",children:[(0,t.jsxs)(L.TabsTrigger,{value:"overview",className:"text-muted-foreground hover:bg-muted hover:text-foreground data-[state=active]:bg-background data-[state=active]:text-foreground data-[state=active]:border-t-primary [&:not([data-state=active])]:border-r-border relative h-auto rounded-none border-t-2 border-r border-t-transparent border-r-transparent bg-transparent px-3.5 py-2.5 text-[13px] font-normal shadow-none transition-none last:border-r-transparent data-[state=active]:shadow-none",children:[(0,t.jsx)(u.LayoutDashboard,{className:"mr-1.5 size-4"}),"Overview"]}),(0,t.jsxs)(L.TabsTrigger,{value:"chat",className:"text-muted-foreground hover:bg-muted hover:text-foreground data-[state=active]:bg-background data-[state=active]:text-foreground data-[state=active]:border-t-primary [&:not([data-state=active])]:border-r-border relative h-auto rounded-none border-t-2 border-r border-t-transparent border-r-transparent bg-transparent px-3.5 py-2.5 text-[13px] font-normal shadow-none transition-none last:border-r-transparent data-[state=active]:shadow-none",children:[(0,t.jsx)(h.MessageSquare,{className:"mr-1.5 size-4"}),"Chat"]})]}),(0,t.jsxs)("div",{className:"bg-muted/40 shrink-0 border-b",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2 px-4 pe-10 pt-2.5 pb-2","data-testid":"repository-drawer-header",children:[(0,t.jsx)("h2",{className:"text-foreground min-w-0 truncate text-base font-semibold tracking-tight",children:e.name}),e.repositoryPath?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("span",{className:"text-muted-foreground/40 text-xs",children:"/"}),(0,t.jsx)("span",{className:"text-muted-foreground min-w-0 truncate font-mono text-[11px]",children:e.repositoryPath})]}):null]}),e.repositoryPath?(0,t.jsx)("div",{"data-testid":"repository-drawer-toolbar",children:(0,t.jsxs)("div",{className:"flex h-9 items-center px-1.5",children:[(0,t.jsxs)(P.TooltipProvider,{delayDuration:300,children:[(0,t.jsxs)("div",{className:"flex items-center",children:[(0,t.jsxs)(P.Tooltip,{children:[(0,t.jsx)(P.TooltipTrigger,{asChild:!0,children:(0,t.jsx)("button",{type:"button",className:M,onClick:C.openInIde,disabled:C.ideLoading,"aria-label":"Open in IDE",children:C.ideLoading?(0,t.jsx)(m.Loader2,{className:"size-3.5 animate-spin"}):(0,t.jsx)(r.Code2,{className:"size-4"})})}),(0,t.jsx)(P.TooltipContent,{side:"bottom",className:"text-xs",children:"Open in IDE"})]}),(0,t.jsxs)(P.Tooltip,{children:[(0,t.jsx)(P.TooltipTrigger,{asChild:!0,children:(0,t.jsx)("button",{type:"button",className:M,onClick:C.openInShell,disabled:C.shellLoading,"aria-label":"Open terminal",children:C.shellLoading?(0,t.jsx)(m.Loader2,{className:"size-3.5 animate-spin"}):(0,t.jsx)(i.Terminal,{className:"size-4"})})}),(0,t.jsx)(P.TooltipContent,{side:"bottom",className:"text-xs",children:"Open terminal"})]}),(0,t.jsxs)(P.Tooltip,{children:[(0,t.jsx)(P.TooltipTrigger,{asChild:!0,children:(0,t.jsx)("button",{type:"button",className:M,onClick:C.openFolder,disabled:C.folderLoading,"aria-label":"Open folder",children:C.folderLoading?(0,t.jsx)(m.Loader2,{className:"size-3.5 animate-spin"}):(0,t.jsx)(n.FolderOpen,{className:"size-4"})})}),(0,t.jsx)(P.TooltipContent,{side:"bottom",className:"text-xs",children:"Open folder"})]}),(0,t.jsxs)(P.Tooltip,{children:[(0,t.jsx)(P.TooltipTrigger,{asChild:!0,children:(0,t.jsx)("button",{type:"button",className:M,onClick:$,"aria-label":"Copy path",children:y?(0,t.jsx)(x.Check,{className:"size-3.5 text-green-500"}):(0,t.jsx)(c.Copy,{className:"size-4"})})}),(0,t.jsx)(P.TooltipContent,{side:"bottom",className:"text-xs",children:y?"Copied!":"Copy path"})]})]}),e.id&&g.gitRebaseSync?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("div",{className:A}),(0,t.jsxs)(P.Tooltip,{children:[(0,t.jsx)(P.TooltipTrigger,{asChild:!0,children:(0,t.jsx)("button",{type:"button",className:M,onClick:C.syncMain,disabled:C.syncLoading,"aria-label":"Sync main",children:C.syncLoading?(0,t.jsx)(m.Loader2,{className:"size-3.5 animate-spin"}):(0,t.jsx)(l.RefreshCw,{className:"size-4"})})}),(0,t.jsx)(P.TooltipContent,{side:"bottom",className:"text-xs",children:"Sync main"})]})]}):null,g.envDeploy?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("div",{className:A}),(0,t.jsxs)(P.Tooltip,{children:[(0,t.jsx)(P.TooltipTrigger,{asChild:!0,children:(0,t.jsx)("button",{type:"button",disabled:F.deployLoading||F.stopLoading,onClick:E?F.stop:F.deploy,className:(0,T.cn)("inline-flex size-7 items-center justify-center rounded-[3px] disabled:opacity-40",E?"text-red-500 hover:bg-red-500/10 hover:text-red-400":"text-green-500 hover:bg-green-500/10 hover:text-green-400"),"aria-label":E?"Stop dev server":"Start dev server",children:F.deployLoading||F.stopLoading?(0,t.jsx)(m.Loader2,{className:"size-3.5 animate-spin"}):E?(0,t.jsx)(d.Square,{className:"size-4"}):(0,t.jsx)(o.Play,{className:"size-4"})})}),(0,t.jsx)(P.TooltipContent,{side:"bottom",className:"text-xs",children:E?"Stop dev server":"Start dev server"})]}),E?(0,t.jsx)(z.DeploymentStatusBadge,{status:F.status,url:F.url,targetId:e.repositoryPath}):null]}):null]}),(0,t.jsx)("div",{className:"flex-1"})]})}):null]}),(0,t.jsx)(L.TabsContent,{value:"overview",className:"mt-0 flex-1 overflow-y-auto",children:(0,t.jsx)(O,{data:e,syncError:C.syncError})}),(0,t.jsx)(L.TabsContent,{value:"chat",className:"mt-0 flex min-h-0 flex-1 flex-col overflow-hidden",children:(0,t.jsx)(D.ChatTab,{featureId:B,worktreePath:e.repositoryPath})})]})})}function $({icon:e,title:s,children:a}){return(0,t.jsxs)("div",{className:"px-3 pt-4 pb-1",children:[(0,t.jsxs)("div",{className:"text-foreground mb-2 flex items-center gap-1.5 text-sm font-semibold tracking-wider uppercase",children:[(0,t.jsx)(e,{className:"size-4 opacity-50"}),s]}),a]})}function B({children:e,className:s}){return(0,t.jsx)("div",{className:(0,T.cn)("bg-muted/60 rounded-md border border-transparent p-3",s),children:e})}function G({label:e,children:s}){return(0,t.jsxs)("div",{className:"flex flex-col gap-0.5",children:[(0,t.jsx)("span",{className:"text-foreground/40 text-[11px] font-medium tracking-wider uppercase",children:e}),(0,t.jsx)("span",{className:"text-sm leading-snug",children:s})]})}function O({data:e,syncError:a}){let[r,i]=(0,s.useState)(null),[n,l]=(0,s.useState)(!1);if((0,s.useEffect)(()=>{if(!e.repositoryPath)return;let t=!1;return l(!0),(0,F.getGitRepoInfo)(e.repositoryPath,8).then(e=>{t||i(e)}).catch(()=>{}).finally(()=>{t||l(!1)}),()=>{t=!0}},[e.repositoryPath]),!e.repositoryPath)return null;let o=r?.workingTree,d=o&&(o.staged>0||o.modified>0||o.untracked>0),c=r?.diffStats;return(0,t.jsxs)("div",{className:"pb-4",children:[n?(0,t.jsxs)("div",{className:"text-foreground/40 flex items-center gap-2 px-4 py-8 text-sm",children:[(0,t.jsx)(m.Loader2,{className:"size-4 animate-spin"})," Loading repository info..."]}):null,r?(0,t.jsxs)("div",{className:"grid grid-cols-2 gap-2 px-3 pt-3",children:[(0,t.jsx)(B,{children:(0,t.jsxs)(G,{label:"Branch",children:[(0,t.jsxs)("span",{className:"inline-flex items-center gap-1.5",children:[(0,t.jsx)(p.GitBranch,{className:"text-foreground/30 size-3.5 shrink-0"}),(0,t.jsx)("code",{className:"font-mono text-sm",children:r.currentBranch??e.branch??"—"})]}),null!=e.behindCount&&e.behindCount>0?(0,t.jsxs)("span",{className:"mt-0.5 block text-xs text-orange-600 dark:text-orange-400",children:[e.behindCount," behind default"]}):null]})}),(0,t.jsx)(B,{children:(0,t.jsx)(G,{label:"Working Tree",children:d?(0,t.jsxs)("div",{className:"flex flex-wrap gap-x-3 gap-y-0.5",children:[o.staged>0?(0,t.jsxs)("span",{className:"inline-flex items-center gap-1 text-sm text-green-600 dark:text-green-400",children:[(0,t.jsx)(k,{className:"size-3.5"})," ",o.staged," staged"]}):null,o.modified>0?(0,t.jsxs)("span",{className:"inline-flex items-center gap-1 text-sm text-amber-600 dark:text-amber-400",children:[(0,t.jsx)(N.FileEdit,{className:"size-3.5"})," ",o.modified," modified"]}):null,o.untracked>0?(0,t.jsxs)("span",{className:"text-foreground/50 inline-flex items-center gap-1 text-sm",children:[(0,t.jsx)(C.FilePlus,{className:"size-3.5"})," ",o.untracked," untracked"]}):null]}):(0,t.jsxs)("span",{className:"inline-flex items-center gap-1.5 text-sm text-green-600 dark:text-green-400",children:[(0,t.jsx)(x.Check,{className:"size-3.5"})," Clean"]})})}),c?(0,t.jsx)(B,{children:(0,t.jsx)(G,{label:"Uncommitted Changes",children:(0,t.jsxs)("div",{className:"flex items-center gap-3 text-sm",children:[(0,t.jsxs)("span",{children:[c.filesChanged," file",1!==c.filesChanged?"s":""]}),(0,t.jsxs)("span",{className:"text-green-600 dark:text-green-400",children:["+",c.insertions]}),(0,t.jsxs)("span",{className:"text-red-500 dark:text-red-400",children:["-",c.deletions]})]})})}):null,r.remotes.length>0?(0,t.jsx)(B,{children:(0,t.jsx)(G,{label:"Remote",children:r.remotes.map(e=>(0,t.jsxs)("span",{className:"inline-flex items-center gap-1.5 text-sm",children:[(0,t.jsx)(b.Globe,{className:"text-foreground/30 size-3.5 shrink-0"}),(0,t.jsx)("span",{className:"truncate",children:e.url.replace(/\.git$/,"").replace(/^https?:\/\/([^@]+@)?/,"").replace(/x-access-token:[^@]+@/,"")})]},e.name))})}):null,r.stashCount>0?(0,t.jsx)(B,{children:(0,t.jsx)(G,{label:"Stashes",children:(0,t.jsxs)("span",{className:"inline-flex items-center gap-1.5 text-sm",children:[(0,t.jsx)(y.Archive,{className:"text-foreground/30 size-3.5 shrink-0"}),r.stashCount," stash",1!==r.stashCount?"es":""]})})}):null,r.tags.length>0?(0,t.jsx)(B,{children:(0,t.jsx)(G,{label:"Tags",children:(0,t.jsx)("div",{className:"flex flex-wrap gap-1.5",children:r.tags.map(e=>(0,t.jsxs)("span",{className:"bg-foreground/[0.04] inline-flex items-center gap-0.5 rounded px-1.5 py-0.5 text-xs",children:[(0,t.jsx)(v,{className:"text-foreground/30 size-2.5"}),e]},e))})})}):null]}):null,r&&r.commits.length>0?(0,t.jsx)($,{icon:g.GitCommitHorizontal,title:"Recent Commits",children:(0,t.jsxs)("div",{className:"relative ml-3",children:[(0,t.jsx)("div",{className:"bg-border absolute top-2 bottom-2 left-[5px] w-px"}),r.commits.map((e,s)=>(0,t.jsxs)("div",{className:"group relative flex gap-3 py-1.5",children:[(0,t.jsx)("div",{className:(0,T.cn)("relative z-10 mt-1.5 size-[11px] shrink-0 rounded-full border-2",0===s?"border-primary bg-primary":"border-border bg-background group-hover:border-foreground/30")}),(0,t.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,t.jsxs)("div",{className:"flex items-baseline gap-2",children:[(0,t.jsx)("p",{className:"min-w-0 truncate text-sm leading-snug",children:e.subject}),(0,t.jsx)("code",{className:"text-foreground/30 shrink-0 font-mono text-[11px]",children:e.shortHash})]}),(0,t.jsxs)("div",{className:"text-foreground/40 mt-0.5 flex items-center gap-2 text-xs",children:[(0,t.jsx)("span",{children:e.author}),(0,t.jsx)("span",{children:"·"}),(0,t.jsx)("span",{children:e.relativeDate}),e.branch?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("span",{children:"·"}),(0,t.jsxs)("span",{className:"inline-flex items-center gap-0.5",children:[(0,t.jsx)(p.GitBranch,{className:"size-3"}),e.branch]})]}):null]})]})]},e.hash))]})}):null,r&&r.branches.length>1?(0,t.jsx)($,{icon:p.GitBranch,title:"Branches",children:(0,t.jsx)("div",{className:"flex flex-col",children:[...r.branches].sort((e,t)=>{let s,a,r,i;return e.isCurrent&&!t.isCurrent?-1:!e.isCurrent&&t.isCurrent?1:(s=e.name,/^(main|master)$/.test(s)&&(a=t.name,!/^(main|master)$/.test(a)))?-1:+(r=e.name,!!(!/^(main|master)$/.test(r)&&(i=t.name,/^(main|master)$/.test(i))))}).map(e=>(0,t.jsxs)("div",{className:(0,T.cn)("flex items-center justify-between rounded px-2 py-1.5",e.isCurrent&&"bg-muted/60"),children:[(0,t.jsxs)("span",{className:"inline-flex items-center gap-1.5 text-sm",children:[e.isCurrent?(0,t.jsx)("span",{className:"size-2 shrink-0 rounded-full bg-green-500"}):/^(main|master)$/.test(e.name)?(0,t.jsx)("span",{className:"size-2 shrink-0 rounded-full bg-blue-500"}):(0,t.jsx)("span",{className:"bg-foreground/10 size-2 shrink-0 rounded-full"}),(0,t.jsx)("code",{className:"font-mono text-[13px]",children:e.name}),e.isCurrent?(0,t.jsx)("span",{className:"text-foreground/40 text-[10px]",children:"current"}):null]}),(0,t.jsx)("span",{className:"text-foreground/40 text-xs",children:e.lastCommitDate})]},e.name))})}):null,a?(0,t.jsx)($,{icon:f.AlertTriangle,title:"Issues",children:(0,t.jsx)(B,{className:"bg-destructive/5 border-transparent",children:(0,t.jsx)("p",{className:"text-destructive text-sm",children:a})})}):null]})}e.s(["RepositoryDrawerClient",()=>E],610661)}]);
@@ -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)("40db9f3716173c87ba4fda985e10d2c703d5da58da",v.callServer,void 0,v.findSourceMapURL,"listGitHubRepositories"),y=(0,v.createServerReference)("005894918dcf904aaa0e57743ad3a5f1244a37bc3e",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)("40e5db7b69d2be8db0bdb8b359809afebed9da654c",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,u]=o(l,{collectionRef:{current:null},itemMap:new Map}),d=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})};d.displayName=l;let f=e+"CollectionSlot",h=(0,s.createSlot)(f),p=t.default.forwardRef((e,t)=>{let{scope:r,children:s}=e,l=u(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),d=u(m,s);return t.default.useEffect(()=>(d.itemMap.set(n,{ref:n,...o}),()=>void d.itemMap.delete(n))),(0,a.jsx)(x,{...{[g]:""},ref:c,children:l})});return v.displayName=m,[{Provider:d,Slot:p,ItemSlot:v},function(r){let i=u(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 u=this.size+ +!s;l<0&&o++;let d=[...this.#e],f=!1;for(let e=o;e<u;e++)if(o===e){let a=d[e];d[e]===t&&(a=d[e+1]),s&&this.delete(t),i=this.get(a),this.set(t,r)}else{f||d[e-1]!==t||(f=!0);let r=d[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),u=e.i(566033),d=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,d.jsx)(m.Provider,{scope:e.__scopeRovingFocusGroup,children:(0,d.jsx)(m.Slot,{scope:e.__scopeRovingFocusGroup,children:(0,d.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,u.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,d.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,d.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:u,...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,d.jsx)(m.ItemSlot,{scope:s,id:p,focusable:a,active:n,children:(0,d.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 u?u({isCurrentTabStop:v,hasTabStop:null!=R}):u})})});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),u=e.i(713123),d="Tabs",[f,h]=(0,s.createContextScope)(d,[a.createRovingFocusGroupScope]),p=(0,a.createRovingFocusGroupScope)(),[m,g]=f(d),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:d});return(0,t.jsx)(m,{scope:i,baseId:(0,u.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=d;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,u=g(y,s),d=p(s),f=N(u.baseId,l),h=k(u.baseId,l),m=l===u.value;return(0,t.jsx)(a.Item,{asChild:!0,...d,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():u.onValueChange(l)}),onKeyDown:(0,i.composeEventHandlers)(e.onKeyDown,e=>{[" ","Enter"].includes(e.key)&&u.onValueChange(l)}),onFocus:(0,i.composeEventHandlers)(e.onFocus,()=>{let e="manual"!==u.activationMode;m||n||!e||u.onValueChange(l)})})})});w.displayName=y;var j="TabsContent",R=r.forwardRef((e,i)=>{let{__scopeTabs:s,value:a,forceMount:n,children:c,...u}=e,d=g(j,s),f=N(d.baseId,a),h=k(d.baseId,a),p=a===d.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":d.orientation,role:"tabpanel","aria-labelledby":f,hidden:!r,id:h,tabIndex:0,...u,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,u=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}));u.displayName=i.Dialog.Overlay.displayName;let d=r.forwardRef(({className:e,children:r,...l},o)=>(0,t.jsxs)(n,{children:[(0,t.jsx)(u,{}),(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"})]})]})]}));d.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",()=>d,"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 u({onSubmit:e,loading:i=!1}){let[s,u]=(0,r.useState)(""),[d,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=>{u(e.target.value),d&&f("")},onKeyDown:function(e){"Enter"===e.key&&(e.preventDefault(),h())},disabled:i,"aria-invalid":!!d,"aria-describedby":d?"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"})]}),d?(0,t.jsx)("p",{id:"github-url-error",className:"text-destructive text-sm",role:"alert",children:d}):null]})}var d=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)("40178a2a5fb28bb4c1301cfebdfdebb10b6528bf85",v.callServer,void 0,v.findSourceMapURL,"listGitHubRepositories"),y=(0,v.createServerReference)("005430ddb5cc2a11128baa023c6c49af6e6e4a064a",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)([]),[u,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:[u.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"}),u.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)(d.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)("4037c8af6d7cb3c731361d99704129e81889455176",v.callServer,void 0,v.findSourceMapURL,"importGitHubRepository");function N({open:e,onOpenChange:a,onImportComplete:l}){let[o,n]=(0,r.useState)(!1),[c,d]=(0,r.useState)("");async function f(e){n(!0),d("");try{let t=await R({url:e});t.error?d(t.error):t.repository&&(l(t.repository),a(!1))}catch{d("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)(u,{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",()=>u],192350)},522129,e=>{e.n(e.i(192350))}]);
@@ -1 +1 @@
1
- (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,81846,e=>{"use strict";var t=e.i(679606),r=e.i(294237),a=e.i(131777);let i=(0,r.cva)("inline-flex items-center rounded-md border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:ring-2 focus:ring-ring focus:ring-offset-2 focus:outline-none",{variants:{variant:{default:"border-transparent bg-primary text-primary-foreground shadow hover:bg-primary/80",secondary:"border-transparent bg-secondary text-secondary-foreground hover:bg-secondary/80",destructive:"border-transparent bg-destructive text-destructive-foreground shadow hover:bg-destructive/80",outline:"text-foreground"}},defaultVariants:{variant:"default"}});function s({className:e,variant:r,...s}){return(0,t.jsx)("div",{className:(0,a.cn)(i({variant:r}),e),...s})}e.s(["Badge",()=>s])},670471,e=>{"use strict";var t=e.i(16298);e.s(["FileText",()=>t.default])},43416,e=>{"use strict";let t=(0,e.i(903645).default)("refresh-cw",[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]]);e.s(["RefreshCw",()=>t],43416)},216868,442076,e=>{"use strict";var t=e.i(943698);async function r(){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",()=>r],442076)},951911,e=>{"use strict";var t=e.i(679606),r=e.i(152155),a=e.i(291967),i=e.i(205978),s=e.i(922528),o=e.i(936589),n=e.i(23405),c=e.i(277624),d=e.i(287620),u="Switch",[l,p]=(0,s.createContextScope)(u),[f,h]=l(u),b=r.forwardRef((e,s)=>{let{__scopeSwitch:n,name:c,checked:l,defaultChecked:p,required:h,disabled:b,value:g="on",onCheckedChange:m,form:k,...y}=e,[x,C]=r.useState(null),S=(0,i.useComposedRefs)(s,e=>C(e)),P=r.useRef(!1),R=!x||k||!!x.closest("form"),[j,T]=(0,o.useControllableState)({prop:l,defaultProp:p??!1,onChange:m,caller:u});return(0,t.jsxs)(f,{scope:n,checked:j,disabled:b,children:[(0,t.jsx)(d.Primitive.button,{type:"button",role:"switch","aria-checked":j,"aria-required":h,"data-state":w(j),"data-disabled":b?"":void 0,disabled:b,value:g,...y,ref:S,onClick:(0,a.composeEventHandlers)(e.onClick,e=>{T(e=>!e),R&&(P.current=e.isPropagationStopped(),P.current||e.stopPropagation())})}),R&&(0,t.jsx)(v,{control:x,bubbles:!P.current,name:c,value:g,checked:j,required:h,disabled:b,form:k,style:{transform:"translateX(-100%)"}})]})});b.displayName=u;var g="SwitchThumb",m=r.forwardRef((e,r)=>{let{__scopeSwitch:a,...i}=e,s=h(g,a);return(0,t.jsx)(d.Primitive.span,{"data-state":w(s.checked),"data-disabled":s.disabled?"":void 0,...i,ref:r})});m.displayName=g;var v=r.forwardRef(({__scopeSwitch:e,control:a,checked:s,bubbles:o=!0,...d},u)=>{let l=r.useRef(null),p=(0,i.useComposedRefs)(l,u),f=(0,n.usePrevious)(s),h=(0,c.useSize)(a);return r.useEffect(()=>{let e=l.current;if(!e)return;let t=Object.getOwnPropertyDescriptor(window.HTMLInputElement.prototype,"checked").set;if(f!==s&&t){let r=new Event("click",{bubbles:o});t.call(e,s),e.dispatchEvent(r)}},[f,s,o]),(0,t.jsx)("input",{type:"checkbox","aria-hidden":!0,defaultChecked:s,...d,tabIndex:-1,ref:p,style:{...d.style,...h,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})});function w(e){return e?"checked":"unchecked"}v.displayName="SwitchBubbleInput",e.s(["Root",()=>b,"Switch",()=>b,"SwitchThumb",()=>m,"Thumb",()=>m,"createSwitchScope",()=>p],595291);var k=e.i(595291),k=k,y=e.i(131777);function x({className:e,size:r="default",...a}){return(0,t.jsx)(k.Root,{"data-slot":"switch","data-size":r,className:(0,y.cn)("peer group/switch focus-visible:border-ring focus-visible:ring-ring/50 data-[state=checked]:bg-primary data-[state=unchecked]:bg-input dark:data-[state=unchecked]:bg-input/80 inline-flex shrink-0 cursor-pointer items-center rounded-full border border-transparent shadow-xs transition-all outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50 data-[size=default]:h-[1.15rem] data-[size=default]:w-8 data-[size=sm]:h-3.5 data-[size=sm]:w-6",e),...a,children:(0,t.jsx)(k.Thumb,{"data-slot":"switch-thumb",className:(0,y.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",()=>x],951911)},915203,e=>{"use strict";var t=e.i(679606),r=e.i(152155),a=e.i(711434),i=e.i(360112),s=e.i(972399);e.i(34562);var o=e.i(630616);function n({repositoryPath:e,initialParentId:n,initialDescription:c,initialMode:d,features:u,repositories:l,workflowDefaults:p,currentAgentType:f,currentModel:h,canPushDirectly:b}){let g=(0,a.useRouter)(),[m,v]=(0,r.useState)(!1),w=(0,a.usePathname)().startsWith("/create"),k=!m&&w;(0,r.useEffect)(()=>{!w&&m&&v(!1)},[w,m]);let y=(0,r.useCallback)(()=>{g.push("/control-center")},[g]),x=(0,r.useCallback)(e=>{v(!0),g.push("/control-center"),(0,s.createFeature)(e).then(t=>{t.error?i.toast.error(t.error):window.dispatchEvent(new CustomEvent("shep:feature-created",{detail:{featureId:t.feature.id,name:t.feature.name,description:t.feature.description,repositoryPath:t.feature.repositoryPath,parentId:e.parentId}}))}).catch(()=>{i.toast.error("Failed to create feature"),v(!1)})},[g]);return(0,t.jsx)(o.FeatureCreateDrawer,{open:k,onClose:y,onSubmit:x,repositoryPath:e,features:u,repositories:l,workflowDefaults:p,initialParentId:n,initialDescription:c,initialMode:d,isSubmitting:m,currentAgentType:f,currentModel:h,canPushDirectly:b})}e.s(["CreateDrawerClient",()=>n])}]);
1
+ (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,81846,e=>{"use strict";var t=e.i(679606),r=e.i(294237),a=e.i(131777);let i=(0,r.cva)("inline-flex items-center rounded-md border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:ring-2 focus:ring-ring focus:ring-offset-2 focus:outline-none",{variants:{variant:{default:"border-transparent bg-primary text-primary-foreground shadow hover:bg-primary/80",secondary:"border-transparent bg-secondary text-secondary-foreground hover:bg-secondary/80",destructive:"border-transparent bg-destructive text-destructive-foreground shadow hover:bg-destructive/80",outline:"text-foreground"}},defaultVariants:{variant:"default"}});function s({className:e,variant:r,...s}){return(0,t.jsx)("div",{className:(0,a.cn)(i({variant:r}),e),...s})}e.s(["Badge",()=>s])},670471,e=>{"use strict";var t=e.i(16298);e.s(["FileText",()=>t.default])},43416,e=>{"use strict";let t=(0,e.i(903645).default)("refresh-cw",[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]]);e.s(["RefreshCw",()=>t],43416)},216868,442076,e=>{"use strict";var t=e.i(943698);async function r(){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",()=>r],442076)},951911,e=>{"use strict";var t=e.i(679606),r=e.i(152155),a=e.i(291967),i=e.i(205978),s=e.i(922528),o=e.i(936589),n=e.i(23405),c=e.i(277624),d=e.i(287620),u="Switch",[l,p]=(0,s.createContextScope)(u),[f,h]=l(u),b=r.forwardRef((e,s)=>{let{__scopeSwitch:n,name:c,checked:l,defaultChecked:p,required:h,disabled:b,value:g="on",onCheckedChange:m,form:k,...y}=e,[x,C]=r.useState(null),S=(0,i.useComposedRefs)(s,e=>C(e)),P=r.useRef(!1),R=!x||k||!!x.closest("form"),[j,T]=(0,o.useControllableState)({prop:l,defaultProp:p??!1,onChange:m,caller:u});return(0,t.jsxs)(f,{scope:n,checked:j,disabled:b,children:[(0,t.jsx)(d.Primitive.button,{type:"button",role:"switch","aria-checked":j,"aria-required":h,"data-state":w(j),"data-disabled":b?"":void 0,disabled:b,value:g,...y,ref:S,onClick:(0,a.composeEventHandlers)(e.onClick,e=>{T(e=>!e),R&&(P.current=e.isPropagationStopped(),P.current||e.stopPropagation())})}),R&&(0,t.jsx)(v,{control:x,bubbles:!P.current,name:c,value:g,checked:j,required:h,disabled:b,form:k,style:{transform:"translateX(-100%)"}})]})});b.displayName=u;var g="SwitchThumb",m=r.forwardRef((e,r)=>{let{__scopeSwitch:a,...i}=e,s=h(g,a);return(0,t.jsx)(d.Primitive.span,{"data-state":w(s.checked),"data-disabled":s.disabled?"":void 0,...i,ref:r})});m.displayName=g;var v=r.forwardRef(({__scopeSwitch:e,control:a,checked:s,bubbles:o=!0,...d},u)=>{let l=r.useRef(null),p=(0,i.useComposedRefs)(l,u),f=(0,n.usePrevious)(s),h=(0,c.useSize)(a);return r.useEffect(()=>{let e=l.current;if(!e)return;let t=Object.getOwnPropertyDescriptor(window.HTMLInputElement.prototype,"checked").set;if(f!==s&&t){let r=new Event("click",{bubbles:o});t.call(e,s),e.dispatchEvent(r)}},[f,s,o]),(0,t.jsx)("input",{type:"checkbox","aria-hidden":!0,defaultChecked:s,...d,tabIndex:-1,ref:p,style:{...d.style,...h,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})});function w(e){return e?"checked":"unchecked"}v.displayName="SwitchBubbleInput",e.s(["Root",()=>b,"Switch",()=>b,"SwitchThumb",()=>m,"Thumb",()=>m,"createSwitchScope",()=>p],595291);var k=e.i(595291),k=k,y=e.i(131777);function x({className:e,size:r="default",...a}){return(0,t.jsx)(k.Root,{"data-slot":"switch","data-size":r,className:(0,y.cn)("peer group/switch focus-visible:border-ring focus-visible:ring-ring/50 data-[state=checked]:bg-primary data-[state=unchecked]:bg-input dark:data-[state=unchecked]:bg-input/80 inline-flex shrink-0 cursor-pointer items-center rounded-full border border-transparent shadow-xs transition-all outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50 data-[size=default]:h-[1.15rem] data-[size=default]:w-8 data-[size=sm]:h-3.5 data-[size=sm]:w-6",e),...a,children:(0,t.jsx)(k.Thumb,{"data-slot":"switch-thumb",className:(0,y.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",()=>x],951911)},915203,e=>{"use strict";var t=e.i(679606),r=e.i(152155),a=e.i(711434),i=e.i(360112),s=e.i(427608);e.i(34562);var o=e.i(630616);function n({repositoryPath:e,initialParentId:n,initialDescription:c,initialMode:d,features:u,repositories:l,workflowDefaults:p,currentAgentType:f,currentModel:h,canPushDirectly:b}){let g=(0,a.useRouter)(),[m,v]=(0,r.useState)(!1),w=(0,a.usePathname)().startsWith("/create"),k=!m&&w;(0,r.useEffect)(()=>{!w&&m&&v(!1)},[w,m]);let y=(0,r.useCallback)(()=>{g.push("/control-center")},[g]),x=(0,r.useCallback)(e=>{v(!0),g.push("/control-center"),(0,s.createFeature)(e).then(t=>{t.error?i.toast.error(t.error):window.dispatchEvent(new CustomEvent("shep:feature-created",{detail:{featureId:t.feature.id,name:t.feature.name,description:t.feature.description,repositoryPath:t.feature.repositoryPath,parentId:e.parentId}}))}).catch(()=>{i.toast.error("Failed to create feature"),v(!1)})},[g]);return(0,t.jsx)(o.FeatureCreateDrawer,{open:k,onClose:y,onSubmit:x,repositoryPath:e,features:u,repositories:l,workflowDefaults:p,initialParentId:n,initialDescription:c,initialMode:d,isSubmitting:m,currentAgentType:f,currentModel:h,canPushDirectly:b})}e.s(["CreateDrawerClient",()=>n])}]);
@@ -1 +1 @@
1
- (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,670471,e=>{"use strict";var a=e.i(16298);e.s(["FileText",()=>a.default])},267669,e=>{"use strict";let a=(0,e.i(903645).default)("trash-2",[["path",{d:"M10 11v6",key:"nco0om"}],["path",{d:"M14 11v6",key:"outv1u"}],["path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6",key:"miytrc"}],["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2",key:"e791ji"}]]);e.s(["Trash2",()=>a],267669)},276016,e=>{"use strict";let a=(0,e.i(903645).default)("chevron-right",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);e.s(["ChevronRight",()=>a],276016)},16298,e=>{"use strict";let a=(0,e.i(903645).default)("file-text",[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]]);e.s(["default",()=>a])},220596,e=>{"use strict";var a=e.i(679606),t=e.i(152155),s=e.i(116457),l=e.i(3214),i=e.i(670471),r=e.i(267669),c=e.i(903645);let d=(0,c.default)("star",[["path",{d:"M11.525 2.295a.53.53 0 0 1 .95 0l2.31 4.679a2.123 2.123 0 0 0 1.595 1.16l5.166.756a.53.53 0 0 1 .294.904l-3.736 3.638a2.123 2.123 0 0 0-.611 1.878l.882 5.14a.53.53 0 0 1-.771.56l-4.618-2.428a2.122 2.122 0 0 0-1.973 0L6.396 21.01a.53.53 0 0 1-.77-.56l.881-5.139a2.122 2.122 0 0 0-.611-1.879L2.16 9.795a.53.53 0 0 1 .294-.906l5.165-.755a2.122 2.122 0 0 0 1.597-1.16z",key:"r04s7s"}]]),n=(0,c.default)("star-off",[["path",{d:"m10.344 4.688 1.181-2.393a.53.53 0 0 1 .95 0l2.31 4.679a2.12 2.12 0 0 0 1.595 1.16l5.166.756a.53.53 0 0 1 .294.904l-3.237 3.152",key:"19ctli"}],["path",{d:"m17.945 17.945.43 2.505a.53.53 0 0 1-.771.56l-4.618-2.428a2.12 2.12 0 0 0-1.973 0L6.396 21.01a.53.53 0 0 1-.77-.56l.881-5.139a2.12 2.12 0 0 0-.611-1.879L2.16 9.795a.53.53 0 0 1 .294-.906l5.165-.755a8 8 0 0 0 .4-.099",key:"ptqqvy"}],["path",{d:"m2 2 20 20",key:"1ooewy"}]]);var o=e.i(276016),p=e.i(131777),u=e.i(735364),h=e.i(698127),x=e.i(508893);let m=(0,x.createServerReference)("4005e211f8d61b333178974b6ffbb8e425d730c378",x.callServer,void 0,x.findSourceMapURL,"createPage"),f=(0,x.createServerReference)("603e6218fb81c3218a0174bed4845e34a786fe2779",x.callServer,void 0,x.findSourceMapURL,"updatePage"),g=(0,x.createServerReference)("40b4ae12ff1af3638f57ec2da8d9e8cf3243799594",x.callServer,void 0,x.findSourceMapURL,"deletePage"),v=(0,s.default)(()=>e.A(710548).then(e=>e.PageEditor),{loadableGenerated:{modules:[853645]},ssr:!1});function y({projectId:e,pages:s,className:c}){let[x,y]=(0,t.useState)(s),[j,k]=(0,t.useState)(null),[b,N]=(0,t.useState)(!1),[w,C]=(0,t.useState)(""),[P,S]=(0,t.useState)(null),M=x.find(e=>e.id===j),F=x.filter(e=>!e.parentId),T=(0,t.useCallback)(e=>x.filter(a=>a.parentId===e),[x]),R=(0,t.useCallback)(async()=>{let a=w.trim();if(!a)return;let t=await m({projectId:e,title:a});t.page&&(y(e=>[...e,t.page]),k(t.page.id),C(""),N(!1))},[e,w]),L=(0,t.useCallback)(async e=>{if(!j)return;let a=await f(j,{content:e});a.page&&y(e=>e.map(e=>e.id===a.page.id?a.page:e))},[j]),z=(0,t.useCallback)(async(e,a)=>{let t=a.trim();if(!t)return;let s=await f(e,{title:t});s.page&&y(e=>e.map(e=>e.id===s.page.id?s.page:e)),S(null)},[]),B=(0,t.useCallback)(async e=>{(await g(e)).error||(y(a=>a.filter(a=>a.id!==e)),j===e&&k(null))},[j]),U=(0,t.useCallback)(async(e,a)=>{let t=await f(e,{isFavorite:!a});t.page&&y(e=>e.map(e=>e.id===t.page.id?t.page:e))},[]),E=(e,t=0)=>{let s=T(e.id),l=j===e.id,c=P===e.id;return(0,a.jsxs)("div",{children:[(0,a.jsxs)("div",{"data-testid":`page-item-${e.id}`,className:(0,p.cn)("group hover:bg-accent/50 flex cursor-pointer items-center gap-1 rounded-sm px-2 py-1 text-xs",l&&"bg-accent"),style:{paddingLeft:`${8+16*t}px`},onClick:()=>k(e.id),children:[s.length>0&&(0,a.jsx)(o.ChevronRight,{className:"text-muted-foreground h-3 w-3 shrink-0"}),(0,a.jsx)(i.FileText,{className:"text-muted-foreground h-3 w-3 shrink-0"}),c?(0,a.jsx)(h.Input,{autoFocus:!0,defaultValue:e.title,className:"h-5 text-xs",onBlur:a=>z(e.id,a.target.value),onKeyDown:a=>{"Enter"===a.key&&z(e.id,a.currentTarget.value),"Escape"===a.key&&S(null)},onClick:e=>e.stopPropagation()}):(0,a.jsx)("span",{className:"flex-1 truncate",onDoubleClick:a=>{a.stopPropagation(),S(e.id)},children:e.title}),(0,a.jsxs)("div",{className:"hidden gap-0.5 group-hover:flex",children:[(0,a.jsx)(u.Button,{variant:"ghost",size:"sm",className:"h-4 w-4 p-0",onClick:a=>{a.stopPropagation(),U(e.id,e.isFavorite)},title:e.isFavorite?"Unfavorite":"Favorite",children:e.isFavorite?(0,a.jsx)(d,{className:"h-2.5 w-2.5 fill-yellow-400 text-yellow-400"}):(0,a.jsx)(n,{className:"h-2.5 w-2.5"})}),(0,a.jsx)(u.Button,{variant:"ghost",size:"sm",className:"text-destructive h-4 w-4 p-0",onClick:a=>{a.stopPropagation(),B(e.id)},title:"Delete page",children:(0,a.jsx)(r.Trash2,{className:"h-2.5 w-2.5"})})]})]}),s.map(e=>E(e,t+1))]},e.id)};return(0,a.jsxs)("div",{"data-testid":"pages-panel",className:(0,p.cn)("flex h-full gap-0",c),children:[(0,a.jsxs)("div",{className:"flex w-56 shrink-0 flex-col border-r",children:[(0,a.jsxs)("div",{className:"flex items-center justify-between border-b px-3 py-2",children:[(0,a.jsx)("span",{className:"text-xs font-medium",children:"Pages"}),(0,a.jsx)(u.Button,{variant:"ghost",size:"sm",className:"h-5 w-5 p-0",onClick:()=>N(!0),"data-testid":"create-page-btn",children:(0,a.jsx)(l.Plus,{className:"h-3 w-3"})})]}),(0,a.jsxs)("div",{className:"flex-1 overflow-y-auto p-1",children:[b?(0,a.jsx)("div",{className:"mb-1 px-2",children:(0,a.jsx)(h.Input,{autoFocus:!0,placeholder:"Page title...",value:w,onChange:e=>C(e.target.value),onKeyDown:e=>{"Enter"===e.key&&R(),"Escape"===e.key&&(N(!1),C(""))},onBlur:()=>{w.trim()?R():(N(!1),C(""))},className:"h-6 text-xs","data-testid":"new-page-input"})}):null,0!==F.length||b?F.map(e=>E(e)):(0,a.jsxs)("div",{className:"flex flex-col items-center justify-center py-8 text-center",children:[(0,a.jsx)(i.FileText,{className:"mb-2 h-5 w-5 opacity-20"}),(0,a.jsx)("p",{className:"text-muted-foreground text-[10px]",children:"No pages yet"})]})]})]}),(0,a.jsx)("div",{className:"flex flex-1 flex-col overflow-hidden",children:M?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("div",{className:"border-b px-4 py-2",children:(0,a.jsx)("h2",{className:"text-sm font-medium",children:M.title})}),(0,a.jsx)("div",{className:"flex-1 overflow-y-auto",children:(0,a.jsx)(v,{content:M.content??"",onUpdate:L})})]}):(0,a.jsx)("div",{className:"flex flex-1 items-center justify-center",children:(0,a.jsxs)("div",{className:"text-center",children:[(0,a.jsx)(i.FileText,{className:"mx-auto mb-2 h-8 w-8 opacity-20"}),(0,a.jsx)("p",{className:"text-muted-foreground text-xs",children:"Select or create a page"})]})})})]})}e.s(["PagesPanel",()=>y],220596)},710548,e=>{e.v(a=>Promise.all(["static/chunks/c0ec1e62b201bc26.js","static/chunks/f0489081bef94e11.js"].map(a=>e.l(a))).then(()=>a(853645)))}]);
1
+ (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,670471,e=>{"use strict";var a=e.i(16298);e.s(["FileText",()=>a.default])},267669,e=>{"use strict";let a=(0,e.i(903645).default)("trash-2",[["path",{d:"M10 11v6",key:"nco0om"}],["path",{d:"M14 11v6",key:"outv1u"}],["path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6",key:"miytrc"}],["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2",key:"e791ji"}]]);e.s(["Trash2",()=>a],267669)},276016,e=>{"use strict";let a=(0,e.i(903645).default)("chevron-right",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);e.s(["ChevronRight",()=>a],276016)},16298,e=>{"use strict";let a=(0,e.i(903645).default)("file-text",[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]]);e.s(["default",()=>a])},220596,e=>{"use strict";var a=e.i(679606),t=e.i(152155),s=e.i(116457),l=e.i(3214),i=e.i(670471),r=e.i(267669),c=e.i(903645);let d=(0,c.default)("star",[["path",{d:"M11.525 2.295a.53.53 0 0 1 .95 0l2.31 4.679a2.123 2.123 0 0 0 1.595 1.16l5.166.756a.53.53 0 0 1 .294.904l-3.736 3.638a2.123 2.123 0 0 0-.611 1.878l.882 5.14a.53.53 0 0 1-.771.56l-4.618-2.428a2.122 2.122 0 0 0-1.973 0L6.396 21.01a.53.53 0 0 1-.77-.56l.881-5.139a2.122 2.122 0 0 0-.611-1.879L2.16 9.795a.53.53 0 0 1 .294-.906l5.165-.755a2.122 2.122 0 0 0 1.597-1.16z",key:"r04s7s"}]]),n=(0,c.default)("star-off",[["path",{d:"m10.344 4.688 1.181-2.393a.53.53 0 0 1 .95 0l2.31 4.679a2.12 2.12 0 0 0 1.595 1.16l5.166.756a.53.53 0 0 1 .294.904l-3.237 3.152",key:"19ctli"}],["path",{d:"m17.945 17.945.43 2.505a.53.53 0 0 1-.771.56l-4.618-2.428a2.12 2.12 0 0 0-1.973 0L6.396 21.01a.53.53 0 0 1-.77-.56l.881-5.139a2.12 2.12 0 0 0-.611-1.879L2.16 9.795a.53.53 0 0 1 .294-.906l5.165-.755a8 8 0 0 0 .4-.099",key:"ptqqvy"}],["path",{d:"m2 2 20 20",key:"1ooewy"}]]);var o=e.i(276016),p=e.i(131777),u=e.i(735364),h=e.i(698127),x=e.i(508893);let m=(0,x.createServerReference)("4078e91175841b30c9a335f133c0eb8a8b75f45683",x.callServer,void 0,x.findSourceMapURL,"createPage"),f=(0,x.createServerReference)("60530bc8af7ed5ced98da0a04da2454e293accfd3f",x.callServer,void 0,x.findSourceMapURL,"updatePage"),g=(0,x.createServerReference)("40f6c80b561de064384836bef697c62d0b5eb98ed0",x.callServer,void 0,x.findSourceMapURL,"deletePage"),v=(0,s.default)(()=>e.A(710548).then(e=>e.PageEditor),{loadableGenerated:{modules:[853645]},ssr:!1});function y({projectId:e,pages:s,className:c}){let[x,y]=(0,t.useState)(s),[j,k]=(0,t.useState)(null),[b,N]=(0,t.useState)(!1),[w,C]=(0,t.useState)(""),[P,S]=(0,t.useState)(null),M=x.find(e=>e.id===j),F=x.filter(e=>!e.parentId),T=(0,t.useCallback)(e=>x.filter(a=>a.parentId===e),[x]),R=(0,t.useCallback)(async()=>{let a=w.trim();if(!a)return;let t=await m({projectId:e,title:a});t.page&&(y(e=>[...e,t.page]),k(t.page.id),C(""),N(!1))},[e,w]),L=(0,t.useCallback)(async e=>{if(!j)return;let a=await f(j,{content:e});a.page&&y(e=>e.map(e=>e.id===a.page.id?a.page:e))},[j]),z=(0,t.useCallback)(async(e,a)=>{let t=a.trim();if(!t)return;let s=await f(e,{title:t});s.page&&y(e=>e.map(e=>e.id===s.page.id?s.page:e)),S(null)},[]),B=(0,t.useCallback)(async e=>{(await g(e)).error||(y(a=>a.filter(a=>a.id!==e)),j===e&&k(null))},[j]),U=(0,t.useCallback)(async(e,a)=>{let t=await f(e,{isFavorite:!a});t.page&&y(e=>e.map(e=>e.id===t.page.id?t.page:e))},[]),E=(e,t=0)=>{let s=T(e.id),l=j===e.id,c=P===e.id;return(0,a.jsxs)("div",{children:[(0,a.jsxs)("div",{"data-testid":`page-item-${e.id}`,className:(0,p.cn)("group hover:bg-accent/50 flex cursor-pointer items-center gap-1 rounded-sm px-2 py-1 text-xs",l&&"bg-accent"),style:{paddingLeft:`${8+16*t}px`},onClick:()=>k(e.id),children:[s.length>0&&(0,a.jsx)(o.ChevronRight,{className:"text-muted-foreground h-3 w-3 shrink-0"}),(0,a.jsx)(i.FileText,{className:"text-muted-foreground h-3 w-3 shrink-0"}),c?(0,a.jsx)(h.Input,{autoFocus:!0,defaultValue:e.title,className:"h-5 text-xs",onBlur:a=>z(e.id,a.target.value),onKeyDown:a=>{"Enter"===a.key&&z(e.id,a.currentTarget.value),"Escape"===a.key&&S(null)},onClick:e=>e.stopPropagation()}):(0,a.jsx)("span",{className:"flex-1 truncate",onDoubleClick:a=>{a.stopPropagation(),S(e.id)},children:e.title}),(0,a.jsxs)("div",{className:"hidden gap-0.5 group-hover:flex",children:[(0,a.jsx)(u.Button,{variant:"ghost",size:"sm",className:"h-4 w-4 p-0",onClick:a=>{a.stopPropagation(),U(e.id,e.isFavorite)},title:e.isFavorite?"Unfavorite":"Favorite",children:e.isFavorite?(0,a.jsx)(d,{className:"h-2.5 w-2.5 fill-yellow-400 text-yellow-400"}):(0,a.jsx)(n,{className:"h-2.5 w-2.5"})}),(0,a.jsx)(u.Button,{variant:"ghost",size:"sm",className:"text-destructive h-4 w-4 p-0",onClick:a=>{a.stopPropagation(),B(e.id)},title:"Delete page",children:(0,a.jsx)(r.Trash2,{className:"h-2.5 w-2.5"})})]})]}),s.map(e=>E(e,t+1))]},e.id)};return(0,a.jsxs)("div",{"data-testid":"pages-panel",className:(0,p.cn)("flex h-full gap-0",c),children:[(0,a.jsxs)("div",{className:"flex w-56 shrink-0 flex-col border-r",children:[(0,a.jsxs)("div",{className:"flex items-center justify-between border-b px-3 py-2",children:[(0,a.jsx)("span",{className:"text-xs font-medium",children:"Pages"}),(0,a.jsx)(u.Button,{variant:"ghost",size:"sm",className:"h-5 w-5 p-0",onClick:()=>N(!0),"data-testid":"create-page-btn",children:(0,a.jsx)(l.Plus,{className:"h-3 w-3"})})]}),(0,a.jsxs)("div",{className:"flex-1 overflow-y-auto p-1",children:[b?(0,a.jsx)("div",{className:"mb-1 px-2",children:(0,a.jsx)(h.Input,{autoFocus:!0,placeholder:"Page title...",value:w,onChange:e=>C(e.target.value),onKeyDown:e=>{"Enter"===e.key&&R(),"Escape"===e.key&&(N(!1),C(""))},onBlur:()=>{w.trim()?R():(N(!1),C(""))},className:"h-6 text-xs","data-testid":"new-page-input"})}):null,0!==F.length||b?F.map(e=>E(e)):(0,a.jsxs)("div",{className:"flex flex-col items-center justify-center py-8 text-center",children:[(0,a.jsx)(i.FileText,{className:"mb-2 h-5 w-5 opacity-20"}),(0,a.jsx)("p",{className:"text-muted-foreground text-[10px]",children:"No pages yet"})]})]})]}),(0,a.jsx)("div",{className:"flex flex-1 flex-col overflow-hidden",children:M?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("div",{className:"border-b px-4 py-2",children:(0,a.jsx)("h2",{className:"text-sm font-medium",children:M.title})}),(0,a.jsx)("div",{className:"flex-1 overflow-y-auto",children:(0,a.jsx)(v,{content:M.content??"",onUpdate:L})})]}):(0,a.jsx)("div",{className:"flex flex-1 items-center justify-center",children:(0,a.jsxs)("div",{className:"text-center",children:[(0,a.jsx)(i.FileText,{className:"mx-auto mb-2 h-8 w-8 opacity-20"}),(0,a.jsx)("p",{className:"text-muted-foreground text-xs",children:"Select or create a page"})]})})})]})}e.s(["PagesPanel",()=>y],220596)},710548,e=>{e.v(a=>Promise.all(["static/chunks/c0ec1e62b201bc26.js","static/chunks/f0489081bef94e11.js"].map(a=>e.l(a))).then(()=>a(853645)))}]);