@shepai/cli 1.129.2-pr415.e8b42a3 → 1.129.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 (168) hide show
  1. package/dist/packages/core/src/application/ports/output/services/index.d.ts +1 -1
  2. package/dist/packages/core/src/application/ports/output/services/index.d.ts.map +1 -1
  3. package/dist/packages/core/src/application/ports/output/services/tool-installer.service.d.ts +0 -13
  4. package/dist/packages/core/src/application/ports/output/services/tool-installer.service.d.ts.map +1 -1
  5. package/dist/packages/core/src/infrastructure/services/tool-installer/tool-installer.service.d.ts +1 -7
  6. package/dist/packages/core/src/infrastructure/services/tool-installer/tool-installer.service.d.ts.map +1 -1
  7. package/dist/packages/core/src/infrastructure/services/tool-installer/tool-installer.service.js +1 -37
  8. package/dist/src/presentation/web/app/actions/get-available-terminals.d.ts +3 -8
  9. package/dist/src/presentation/web/app/actions/get-available-terminals.d.ts.map +1 -1
  10. package/dist/src/presentation/web/app/actions/get-available-terminals.js +46 -14
  11. package/dist/tsconfig.build.tsbuildinfo +1 -1
  12. package/package.json +1 -1
  13. package/web/.next/BUILD_ID +1 -1
  14. package/web/.next/build-manifest.json +2 -2
  15. package/web/.next/fallback-build-manifest.json +2 -2
  16. package/web/.next/prerender-manifest.json +3 -3
  17. package/web/.next/required-server-files.js +3 -3
  18. package/web/.next/required-server-files.json +3 -3
  19. package/web/.next/server/app/(dashboard)/@drawer/adopt/page/server-reference-manifest.json +24 -24
  20. package/web/.next/server/app/(dashboard)/@drawer/adopt/page.js +1 -1
  21. package/web/.next/server/app/(dashboard)/@drawer/adopt/page.js.nft.json +1 -1
  22. package/web/.next/server/app/(dashboard)/@drawer/adopt/page_client-reference-manifest.js +1 -1
  23. package/web/.next/server/app/(dashboard)/@drawer/create/page/server-reference-manifest.json +24 -24
  24. package/web/.next/server/app/(dashboard)/@drawer/create/page.js +1 -1
  25. package/web/.next/server/app/(dashboard)/@drawer/create/page.js.nft.json +1 -1
  26. package/web/.next/server/app/(dashboard)/@drawer/create/page_client-reference-manifest.js +1 -1
  27. package/web/.next/server/app/(dashboard)/@drawer/feature/[featureId]/[tab]/page/server-reference-manifest.json +30 -30
  28. package/web/.next/server/app/(dashboard)/@drawer/feature/[featureId]/[tab]/page.js +1 -1
  29. package/web/.next/server/app/(dashboard)/@drawer/feature/[featureId]/[tab]/page.js.nft.json +1 -1
  30. package/web/.next/server/app/(dashboard)/@drawer/feature/[featureId]/[tab]/page_client-reference-manifest.js +1 -1
  31. package/web/.next/server/app/(dashboard)/@drawer/feature/[featureId]/page/server-reference-manifest.json +30 -30
  32. package/web/.next/server/app/(dashboard)/@drawer/feature/[featureId]/page.js +1 -1
  33. package/web/.next/server/app/(dashboard)/@drawer/feature/[featureId]/page.js.nft.json +1 -1
  34. package/web/.next/server/app/(dashboard)/@drawer/feature/[featureId]/page_client-reference-manifest.js +1 -1
  35. package/web/.next/server/app/(dashboard)/@drawer/repository/[repositoryId]/page/server-reference-manifest.json +22 -22
  36. package/web/.next/server/app/(dashboard)/@drawer/repository/[repositoryId]/page.js +1 -1
  37. package/web/.next/server/app/(dashboard)/@drawer/repository/[repositoryId]/page.js.nft.json +1 -1
  38. package/web/.next/server/app/(dashboard)/@drawer/repository/[repositoryId]/page_client-reference-manifest.js +1 -1
  39. package/web/.next/server/app/(dashboard)/create/page/server-reference-manifest.json +24 -24
  40. package/web/.next/server/app/(dashboard)/create/page.js +1 -1
  41. package/web/.next/server/app/(dashboard)/create/page.js.nft.json +1 -1
  42. package/web/.next/server/app/(dashboard)/create/page_client-reference-manifest.js +1 -1
  43. package/web/.next/server/app/(dashboard)/feature/[featureId]/[tab]/page/server-reference-manifest.json +30 -30
  44. package/web/.next/server/app/(dashboard)/feature/[featureId]/[tab]/page.js +1 -1
  45. package/web/.next/server/app/(dashboard)/feature/[featureId]/[tab]/page.js.nft.json +1 -1
  46. package/web/.next/server/app/(dashboard)/feature/[featureId]/[tab]/page_client-reference-manifest.js +1 -1
  47. package/web/.next/server/app/(dashboard)/feature/[featureId]/page/server-reference-manifest.json +30 -30
  48. package/web/.next/server/app/(dashboard)/feature/[featureId]/page.js +1 -1
  49. package/web/.next/server/app/(dashboard)/feature/[featureId]/page.js.nft.json +1 -1
  50. package/web/.next/server/app/(dashboard)/feature/[featureId]/page_client-reference-manifest.js +1 -1
  51. package/web/.next/server/app/(dashboard)/page/server-reference-manifest.json +22 -22
  52. package/web/.next/server/app/(dashboard)/page.js +1 -1
  53. package/web/.next/server/app/(dashboard)/page.js.nft.json +1 -1
  54. package/web/.next/server/app/(dashboard)/page_client-reference-manifest.js +1 -1
  55. package/web/.next/server/app/(dashboard)/repository/[repositoryId]/page/server-reference-manifest.json +22 -22
  56. package/web/.next/server/app/(dashboard)/repository/[repositoryId]/page.js +1 -1
  57. package/web/.next/server/app/(dashboard)/repository/[repositoryId]/page.js.nft.json +1 -1
  58. package/web/.next/server/app/(dashboard)/repository/[repositoryId]/page_client-reference-manifest.js +1 -1
  59. package/web/.next/server/app/_global-error.html +2 -2
  60. package/web/.next/server/app/_global-error.rsc +1 -1
  61. package/web/.next/server/app/_global-error.segments/__PAGE__.segment.rsc +1 -1
  62. package/web/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
  63. package/web/.next/server/app/_global-error.segments/_head.segment.rsc +1 -1
  64. package/web/.next/server/app/_global-error.segments/_index.segment.rsc +1 -1
  65. package/web/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
  66. package/web/.next/server/app/_not-found/page/server-reference-manifest.json +3 -3
  67. package/web/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
  68. package/web/.next/server/app/api/graph-data/route.js +1 -1
  69. package/web/.next/server/app/api/graph-data/route.js.nft.json +1 -1
  70. package/web/.next/server/app/settings/page/server-reference-manifest.json +8 -8
  71. package/web/.next/server/app/settings/page.js +1 -1
  72. package/web/.next/server/app/settings/page.js.nft.json +1 -1
  73. package/web/.next/server/app/settings/page_client-reference-manifest.js +1 -1
  74. package/web/.next/server/app/skills/page/server-reference-manifest.json +8 -8
  75. package/web/.next/server/app/skills/page_client-reference-manifest.js +1 -1
  76. package/web/.next/server/app/tools/page/server-reference-manifest.json +8 -8
  77. package/web/.next/server/app/tools/page_client-reference-manifest.js +1 -1
  78. package/web/.next/server/app/version/page/server-reference-manifest.json +3 -3
  79. package/web/.next/server/app/version/page_client-reference-manifest.js +1 -1
  80. package/web/.next/server/chunks/[root-of-the-server]__a402b567._.js +1 -1
  81. package/web/.next/server/chunks/{[root-of-the-server]__bc532286._.js → [root-of-the-server]__dcd4f847._.js} +2 -2
  82. package/web/.next/server/chunks/ssr/744ca_web__next-internal_server_app_(dashboard)_@drawer_adopt_page_actions_4e741df2.js +1 -1
  83. package/web/.next/server/chunks/ssr/744ca_web__next-internal_server_app_(dashboard)_@drawer_adopt_page_actions_4e741df2.js.map +1 -1
  84. package/web/.next/server/chunks/ssr/744ca_web_components_common_control-center-drawer_create-drawer-client_tsx_5e26fc0a._.js +1 -1
  85. package/web/.next/server/chunks/ssr/744ca_web_components_common_control-center-drawer_create-drawer-client_tsx_5e26fc0a._.js.map +1 -1
  86. package/web/.next/server/chunks/ssr/8ba4b_server_app_(dashboard)_@drawer_repository_[repositoryId]_page_actions_026fdffa.js +1 -1
  87. package/web/.next/server/chunks/ssr/8ba4b_server_app_(dashboard)_@drawer_repository_[repositoryId]_page_actions_026fdffa.js.map +1 -1
  88. package/web/.next/server/chunks/ssr/8ba4b_server_app_(dashboard)_repository_[repositoryId]_page_actions_8b91e197.js +1 -1
  89. package/web/.next/server/chunks/ssr/8ba4b_server_app_(dashboard)_repository_[repositoryId]_page_actions_8b91e197.js.map +1 -1
  90. package/web/.next/server/chunks/ssr/[root-of-the-server]__0e842eba._.js +1 -1
  91. package/web/.next/server/chunks/ssr/[root-of-the-server]__0e842eba._.js.map +1 -1
  92. package/web/.next/server/chunks/ssr/[root-of-the-server]__2f886f77._.js +4 -0
  93. package/web/.next/server/chunks/ssr/[root-of-the-server]__2f886f77._.js.map +1 -0
  94. package/web/.next/server/chunks/ssr/[root-of-the-server]__357d99f9._.js +1 -1
  95. package/web/.next/server/chunks/ssr/[root-of-the-server]__43f51aa6._.js +1 -1
  96. package/web/.next/server/chunks/ssr/[root-of-the-server]__43f51aa6._.js.map +1 -1
  97. package/web/.next/server/chunks/ssr/[root-of-the-server]__60684242._.js +2 -2
  98. package/web/.next/server/chunks/ssr/[root-of-the-server]__6bb00d90._.js +2 -2
  99. package/web/.next/server/chunks/ssr/[root-of-the-server]__6bb00d90._.js.map +1 -1
  100. package/web/.next/server/chunks/ssr/[root-of-the-server]__755cfe02._.js +1 -1
  101. package/web/.next/server/chunks/ssr/[root-of-the-server]__755cfe02._.js.map +1 -1
  102. package/web/.next/server/chunks/ssr/[root-of-the-server]__815546bd._.js +1 -1
  103. package/web/.next/server/chunks/ssr/[root-of-the-server]__815546bd._.js.map +1 -1
  104. package/web/.next/server/chunks/ssr/[root-of-the-server]__a628fb91._.js +1 -1
  105. package/web/.next/server/chunks/ssr/[root-of-the-server]__a628fb91._.js.map +1 -1
  106. package/web/.next/server/chunks/ssr/[root-of-the-server]__bfba58e6._.js +1 -1
  107. package/web/.next/server/chunks/ssr/[root-of-the-server]__bfba58e6._.js.map +1 -1
  108. package/web/.next/server/chunks/ssr/[root-of-the-server]__c3ab8422._.js +1 -1
  109. package/web/.next/server/chunks/ssr/[root-of-the-server]__c3ab8422._.js.map +1 -1
  110. package/web/.next/server/chunks/ssr/[root-of-the-server]__f4a463ee._.js +4 -0
  111. package/web/.next/server/chunks/ssr/[root-of-the-server]__f4a463ee._.js.map +1 -0
  112. package/web/.next/server/chunks/ssr/_02ec1aea._.js +1 -1
  113. package/web/.next/server/chunks/ssr/_02ec1aea._.js.map +1 -1
  114. package/web/.next/server/chunks/ssr/{_38d666eb._.js → _6f7bfa91._.js} +2 -2
  115. package/web/.next/server/chunks/ssr/{_38d666eb._.js.map → _6f7bfa91._.js.map} +1 -1
  116. package/web/.next/server/chunks/ssr/_7dca1882._.js +1 -1
  117. package/web/.next/server/chunks/ssr/_7dca1882._.js.map +1 -1
  118. package/web/.next/server/chunks/ssr/_a9f57758._.js +1 -1
  119. package/web/.next/server/chunks/ssr/_bda8a4be._.js +3 -0
  120. package/web/.next/server/chunks/ssr/{_5cc6b884._.js.map → _bda8a4be._.js.map} +1 -1
  121. package/web/.next/server/chunks/ssr/_d8575088._.js +1 -1
  122. package/web/.next/server/chunks/ssr/_d8575088._.js.map +1 -1
  123. package/web/.next/server/chunks/ssr/_f39a1adb._.js +1 -1
  124. package/web/.next/server/chunks/ssr/_f39a1adb._.js.map +1 -1
  125. package/web/.next/server/chunks/ssr/b1a17_presentation_web_components_features_settings_settings-page-client_tsx_6ed9d5f8._.js +1 -1
  126. package/web/.next/server/chunks/ssr/b1a17_presentation_web_components_features_settings_settings-page-client_tsx_6ed9d5f8._.js.map +1 -1
  127. package/web/.next/server/chunks/ssr/src_presentation_web_8e7fe0d1._.js +2 -2
  128. package/web/.next/server/chunks/ssr/src_presentation_web_8e7fe0d1._.js.map +1 -1
  129. package/web/.next/server/chunks/ssr/src_presentation_web__next-internal_server_app_(dashboard)_page_actions_ca051134.js +1 -1
  130. package/web/.next/server/chunks/ssr/src_presentation_web__next-internal_server_app_(dashboard)_page_actions_ca051134.js.map +1 -1
  131. package/web/.next/server/chunks/ssr/src_presentation_web__next-internal_server_app_skills_page_actions_1b176e3c.js +1 -1
  132. package/web/.next/server/chunks/ssr/src_presentation_web__next-internal_server_app_skills_page_actions_1b176e3c.js.map +1 -1
  133. package/web/.next/server/chunks/ssr/src_presentation_web__next-internal_server_app_tools_page_actions_bd9f0dda.js +1 -1
  134. package/web/.next/server/chunks/ssr/src_presentation_web__next-internal_server_app_tools_page_actions_bd9f0dda.js.map +1 -1
  135. package/web/.next/server/chunks/ssr/{src_presentation_web_1cf7f742._.js → src_presentation_web_a6ae877a._.js} +2 -2
  136. package/web/.next/server/chunks/ssr/{src_presentation_web_1cf7f742._.js.map → src_presentation_web_a6ae877a._.js.map} +1 -1
  137. package/web/.next/server/chunks/ssr/src_presentation_web_b9023017._.js +2 -2
  138. package/web/.next/server/chunks/ssr/src_presentation_web_b9023017._.js.map +1 -1
  139. package/web/.next/server/chunks/ssr/src_presentation_web_components_e599bb8c._.js +1 -1
  140. package/web/.next/server/chunks/ssr/src_presentation_web_components_e599bb8c._.js.map +1 -1
  141. package/web/.next/server/chunks/ssr/src_presentation_web_components_features_control-center_7ac3562e._.js +1 -1
  142. package/web/.next/server/chunks/ssr/src_presentation_web_components_features_control-center_7ac3562e._.js.map +1 -1
  143. package/web/.next/server/pages/500.html +2 -2
  144. package/web/.next/server/server-reference-manifest.js +1 -1
  145. package/web/.next/server/server-reference-manifest.json +38 -38
  146. package/web/.next/static/chunks/{edb724ea4f507470.js → 03b3edc6ec7acce0.js} +1 -1
  147. package/web/.next/static/chunks/0f21da463e7b5fe5.js +1 -0
  148. package/web/.next/static/chunks/{2109939b818e8a21.js → 1ff1a21ebd0d3dce.js} +1 -1
  149. package/web/.next/static/chunks/{3db5579b21f4865e.js → 38eca63d40c799cd.js} +1 -1
  150. package/web/.next/static/chunks/{3b013cb80e3abe8d.js → 49cc0701d7c41ba6.js} +1 -1
  151. package/web/.next/static/chunks/{5cf6bacf2a830ba1.js → 4b6d766e61789186.js} +1 -1
  152. package/web/.next/static/chunks/{4d1d68d12435ab5e.js → 5d14ca93cee50529.js} +2 -2
  153. package/web/.next/static/chunks/{d7e86e225826ded3.js → 94f33a53f1b81108.js} +1 -1
  154. package/web/.next/static/chunks/{7d65e69aeeeb0685.js → 987ffb823189289a.js} +1 -1
  155. package/web/.next/static/chunks/{4a4322e31546aeb2.js → ad726954ef3ab226.js} +1 -1
  156. package/web/.next/static/chunks/{e83aac447467719e.js → ecd9562d3fd2944c.js} +1 -1
  157. package/web/.next/static/chunks/ff5e04cd8c24dd59.js +1 -0
  158. package/web/.next/server/chunks/ssr/[root-of-the-server]__62cdea24._.js +0 -4
  159. package/web/.next/server/chunks/ssr/[root-of-the-server]__62cdea24._.js.map +0 -1
  160. package/web/.next/server/chunks/ssr/[root-of-the-server]__99ab2519._.js +0 -4
  161. package/web/.next/server/chunks/ssr/[root-of-the-server]__99ab2519._.js.map +0 -1
  162. package/web/.next/server/chunks/ssr/_5cc6b884._.js +0 -3
  163. package/web/.next/static/chunks/68f633e5218bb175.js +0 -1
  164. package/web/.next/static/chunks/87cedd21dc11fb2f.js +0 -1
  165. /package/web/.next/server/chunks/{[root-of-the-server]__bc532286._.js.map → [root-of-the-server]__dcd4f847._.js.map} +0 -0
  166. /package/web/.next/static/{UBAo6avNyvCewhdD7bkhO → FwKj7hWEdbpIR5DtG1GQJ}/_buildManifest.js +0 -0
  167. /package/web/.next/static/{UBAo6avNyvCewhdD7bkhO → FwKj7hWEdbpIR5DtG1GQJ}/_clientMiddlewareManifest.json +0 -0
  168. /package/web/.next/static/{UBAo6avNyvCewhdD7bkhO → FwKj7hWEdbpIR5DtG1GQJ}/_ssgManifest.js +0 -0
@@ -1 +1 @@
1
- (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,41952,e=>{"use strict";var t=e.i(20314),n=e.i(79054),r=e.i(23925),a=e.i(3645);let i=(0,a.default)("bot",[["path",{d:"M12 8V4H8",key:"hb8ula"}],["rect",{width:"16",height:"12",x:"4",y:"8",rx:"2",key:"enze0r"}],["path",{d:"M2 14h2",key:"vft8re"}],["path",{d:"M20 14h2",key:"4cs60a"}],["path",{d:"M15 13v2",key:"1xurst"}],["path",{d:"M9 13v2",key:"rq6x2g"}]]);var l=e.i(38573),o=e.i(49228);let s=(0,a.default)("activity",[["path",{d:"M22 12h-2.48a2 2 0 0 0-1.93 1.46l-2.35 8.36a.25.25 0 0 1-.48 0L9.24 2.18a.25.25 0 0 0-.48 0l-2.35 8.36A2 2 0 0 1 4.49 12H2",key:"169zse"}]]),d=(0,a.default)("bell",[["path",{d:"M10.268 21a2 2 0 0 0 3.464 0",key:"vwvbt9"}],["path",{d:"M3.262 15.326A1 1 0 0 0 4 17h16a1 1 0 0 0 .74-1.673C19.41 13.956 18 12.499 18 8A6 6 0 0 0 6 8c0 4.499-1.411 5.956-2.738 7.326",key:"11g9vi"}]]),c=(0,a.default)("flag",[["path",{d:"M4 22V4a1 1 0 0 1 .4-.8A6 6 0 0 1 8 2c3 0 5 2 7.333 2q2 0 3.067-.8A1 1 0 0 1 20 4v10a1 1 0 0 1-.4.8A6 6 0 0 1 16 16c-3 0-5-2-8-2a6 6 0 0 0-4 1.528",key:"1jaruq"}]]),u=(0,a.default)("database",[["ellipse",{cx:"12",cy:"5",rx:"9",ry:"3",key:"msslwz"}],["path",{d:"M3 5V19A9 3 0 0 0 21 19V5",key:"1wlel7"}],["path",{d:"M3 12A9 3 0 0 0 21 12",key:"mv7ke4"}]]);var p=e.i(10714),p=p,m=e.i(3214),h=e.i(30702);let f=(0,a.default)("settings-2",[["path",{d:"M14 17H5",key:"gfn3mx"}],["path",{d:"M19 7h-9",key:"6i9tg"}],["circle",{cx:"17",cy:"17",r:"3",key:"18b49y"}],["circle",{cx:"7",cy:"7",r:"3",key:"dfmy0x"}]]);var g=e.i(58860),x=e.i(60112),v=e.i(31777),w=e.i(41957),b=e.i(51911),y=e.i(26036),S=e.i(27069),j=e.i(91967),C=e.i(87342),k=e.i(5978),I=e.i(22528),M=e.i(66033),N=e.i(53532),P=e.i(41687),E=e.i(56720),R=e.i(13123),T=e.i(52740),A=e.i(39979),D=e.i(87620),L=e.i(86874),F=e.i(29297),H=e.i(36589),B=e.i(5192),z=e.i(23405),_=e.i(1693),V=e.i(73772),W=e.i(13044),O=[" ","Enter","ArrowUp","ArrowDown"],U=[" ","Enter"],K="Select",[q,G,$]=(0,C.createCollection)(K),[Y,Z]=(0,I.createContextScope)(K,[$,T.createPopperScope]),X=(0,T.createPopperScope)(),[Q,J]=Y(K),[ee,et]=Y(K),en=e=>{let{__scopeSelect:r,children:a,open:i,defaultOpen:l,onOpenChange:o,value:s,defaultValue:d,onValueChange:c,dir:u,name:p,autoComplete:m,disabled:h,required:f,form:g}=e,x=X(r),[v,w]=n.useState(null),[b,y]=n.useState(null),[S,j]=n.useState(!1),C=(0,M.useDirection)(u),[k,I]=(0,H.useControllableState)({prop:i,defaultProp:l??!1,onChange:o,caller:K}),[N,P]=(0,H.useControllableState)({prop:s,defaultProp:d,onChange:c,caller:K}),E=n.useRef(null),A=!v||g||!!v.closest("form"),[D,L]=n.useState(new Set),F=Array.from(D).map(e=>e.props.value).join(";");return(0,t.jsx)(T.Root,{...x,children:(0,t.jsxs)(Q,{required:f,scope:r,trigger:v,onTriggerChange:w,valueNode:b,onValueNodeChange:y,valueNodeHasChildren:S,onValueNodeHasChildrenChange:j,contentId:(0,R.useId)(),value:N,onValueChange:P,open:k,onOpenChange:I,dir:C,triggerPointerDownPosRef:E,disabled:h,children:[(0,t.jsx)(q.Provider,{scope:r,children:(0,t.jsx)(ee,{scope:e.__scopeSelect,onNativeOptionAdd:n.useCallback(e=>{L(t=>new Set(t).add(e))},[]),onNativeOptionRemove:n.useCallback(e=>{L(t=>{let n=new Set(t);return n.delete(e),n})},[]),children:a})}),A?(0,t.jsxs)(eO,{"aria-hidden":!0,required:f,tabIndex:-1,name:p,autoComplete:m,value:N,onChange:e=>P(e.target.value),disabled:h,form:g,children:[void 0===N?(0,t.jsx)("option",{value:""}):null,Array.from(D)]},F):null]})})};en.displayName=K;var er="SelectTrigger",ea=n.forwardRef((e,r)=>{let{__scopeSelect:a,disabled:i=!1,...l}=e,o=X(a),s=J(er,a),d=s.disabled||i,c=(0,k.useComposedRefs)(r,s.onTriggerChange),u=G(a),p=n.useRef("touch"),[m,h,f]=eK(e=>{let t=u().filter(e=>!e.disabled),n=t.find(e=>e.value===s.value),r=eq(t,e,n);void 0!==r&&s.onValueChange(r.value)}),g=e=>{d||(s.onOpenChange(!0),f()),e&&(s.triggerPointerDownPosRef.current={x:Math.round(e.pageX),y:Math.round(e.pageY)})};return(0,t.jsx)(T.Anchor,{asChild:!0,...o,children:(0,t.jsx)(D.Primitive.button,{type:"button",role:"combobox","aria-controls":s.contentId,"aria-expanded":s.open,"aria-required":s.required,"aria-autocomplete":"none",dir:s.dir,"data-state":s.open?"open":"closed",disabled:d,"data-disabled":d?"":void 0,"data-placeholder":eU(s.value)?"":void 0,...l,ref:c,onClick:(0,j.composeEventHandlers)(l.onClick,e=>{e.currentTarget.focus(),"mouse"!==p.current&&g(e)}),onPointerDown:(0,j.composeEventHandlers)(l.onPointerDown,e=>{p.current=e.pointerType;let t=e.target;t.hasPointerCapture(e.pointerId)&&t.releasePointerCapture(e.pointerId),0===e.button&&!1===e.ctrlKey&&"mouse"===e.pointerType&&(g(e),e.preventDefault())}),onKeyDown:(0,j.composeEventHandlers)(l.onKeyDown,e=>{let t=""!==m.current;e.ctrlKey||e.altKey||e.metaKey||1!==e.key.length||h(e.key),(!t||" "!==e.key)&&O.includes(e.key)&&(g(),e.preventDefault())})})})});ea.displayName=er;var ei="SelectValue",el=n.forwardRef((e,n)=>{let{__scopeSelect:r,className:a,style:i,children:l,placeholder:o="",...s}=e,d=J(ei,r),{onValueNodeHasChildrenChange:c}=d,u=void 0!==l,p=(0,k.useComposedRefs)(n,d.onValueNodeChange);return(0,B.useLayoutEffect)(()=>{c(u)},[c,u]),(0,t.jsx)(D.Primitive.span,{...s,ref:p,style:{pointerEvents:"none"},children:eU(d.value)?(0,t.jsx)(t.Fragment,{children:o}):l})});el.displayName=ei;var eo=n.forwardRef((e,n)=>{let{__scopeSelect:r,children:a,...i}=e;return(0,t.jsx)(D.Primitive.span,{"aria-hidden":!0,...i,ref:n,children:a||"▼"})});eo.displayName="SelectIcon";var es=e=>(0,t.jsx)(A.Portal,{asChild:!0,...e});es.displayName="SelectPortal";var ed="SelectContent",ec=n.forwardRef((e,r)=>{let a=J(ed,e.__scopeSelect),[i,l]=n.useState();return((0,B.useLayoutEffect)(()=>{l(new DocumentFragment)},[]),a.open)?(0,t.jsx)(eh,{...e,ref:r}):i?y.createPortal((0,t.jsx)(eu,{scope:e.__scopeSelect,children:(0,t.jsx)(q.Slot,{scope:e.__scopeSelect,children:(0,t.jsx)("div",{children:e.children})})}),i):null});ec.displayName=ed;var[eu,ep]=Y(ed),em=(0,L.createSlot)("SelectContent.RemoveScroll"),eh=n.forwardRef((e,r)=>{let{__scopeSelect:a,position:i="item-aligned",onCloseAutoFocus:l,onEscapeKeyDown:o,onPointerDownOutside:s,side:d,sideOffset:c,align:u,alignOffset:p,arrowPadding:m,collisionBoundary:h,collisionPadding:f,sticky:g,hideWhenDetached:x,avoidCollisions:v,...w}=e,b=J(ed,a),[y,S]=n.useState(null),[C,I]=n.useState(null),M=(0,k.useComposedRefs)(r,e=>S(e)),[R,T]=n.useState(null),[A,D]=n.useState(null),L=G(a),[F,H]=n.useState(!1),B=n.useRef(!1);n.useEffect(()=>{if(y)return(0,V.hideOthers)(y)},[y]),(0,P.useFocusGuards)();let z=n.useCallback(e=>{let[t,...n]=L().map(e=>e.ref.current),[r]=n.slice(-1),a=document.activeElement;for(let n of e)if(n===a||(n?.scrollIntoView({block:"nearest"}),n===t&&C&&(C.scrollTop=0),n===r&&C&&(C.scrollTop=C.scrollHeight),n?.focus(),document.activeElement!==a))return},[L,C]),_=n.useCallback(()=>z([R,y]),[z,R,y]);n.useEffect(()=>{F&&_()},[F,_]);let{onOpenChange:O,triggerPointerDownPosRef:U}=b;n.useEffect(()=>{if(y){let e={x:0,y:0},t=t=>{e={x:Math.abs(Math.round(t.pageX)-(U.current?.x??0)),y:Math.abs(Math.round(t.pageY)-(U.current?.y??0))}},n=n=>{e.x<=10&&e.y<=10?n.preventDefault():y.contains(n.target)||O(!1),document.removeEventListener("pointermove",t),U.current=null};return null!==U.current&&(document.addEventListener("pointermove",t),document.addEventListener("pointerup",n,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",t),document.removeEventListener("pointerup",n,{capture:!0})}}},[y,O,U]),n.useEffect(()=>{let e=()=>O(!1);return window.addEventListener("blur",e),window.addEventListener("resize",e),()=>{window.removeEventListener("blur",e),window.removeEventListener("resize",e)}},[O]);let[K,q]=eK(e=>{let t=L().filter(e=>!e.disabled),n=t.find(e=>e.ref.current===document.activeElement),r=eq(t,e,n);r&&setTimeout(()=>r.ref.current.focus())}),$=n.useCallback((e,t,n)=>{let r=!B.current&&!n;(void 0!==b.value&&b.value===t||r)&&(T(e),r&&(B.current=!0))},[b.value]),Y=n.useCallback(()=>y?.focus(),[y]),Z=n.useCallback((e,t,n)=>{let r=!B.current&&!n;(void 0!==b.value&&b.value===t||r)&&D(e)},[b.value]),X="popper"===i?eg:ef,Q=X===eg?{side:d,sideOffset:c,align:u,alignOffset:p,arrowPadding:m,collisionBoundary:h,collisionPadding:f,sticky:g,hideWhenDetached:x,avoidCollisions:v}:{};return(0,t.jsx)(eu,{scope:a,content:y,viewport:C,onViewportChange:I,itemRefCallback:$,selectedItem:R,onItemLeave:Y,itemTextRefCallback:Z,focusSelectedItem:_,selectedItemText:A,position:i,isPositioned:F,searchRef:K,children:(0,t.jsx)(W.RemoveScroll,{as:em,allowPinchZoom:!0,children:(0,t.jsx)(E.FocusScope,{asChild:!0,trapped:b.open,onMountAutoFocus:e=>{e.preventDefault()},onUnmountAutoFocus:(0,j.composeEventHandlers)(l,e=>{b.trigger?.focus({preventScroll:!0}),e.preventDefault()}),children:(0,t.jsx)(N.DismissableLayer,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:o,onPointerDownOutside:s,onFocusOutside:e=>e.preventDefault(),onDismiss:()=>b.onOpenChange(!1),children:(0,t.jsx)(X,{role:"listbox",id:b.contentId,"data-state":b.open?"open":"closed",dir:b.dir,onContextMenu:e=>e.preventDefault(),...w,...Q,onPlaced:()=>H(!0),ref:M,style:{display:"flex",flexDirection:"column",outline:"none",...w.style},onKeyDown:(0,j.composeEventHandlers)(w.onKeyDown,e=>{let t=e.ctrlKey||e.altKey||e.metaKey;if("Tab"===e.key&&e.preventDefault(),t||1!==e.key.length||q(e.key),["ArrowUp","ArrowDown","Home","End"].includes(e.key)){let t=L().filter(e=>!e.disabled).map(e=>e.ref.current);if(["ArrowUp","End"].includes(e.key)&&(t=t.slice().reverse()),["ArrowUp","ArrowDown"].includes(e.key)){let n=e.target,r=t.indexOf(n);t=t.slice(r+1)}setTimeout(()=>z(t)),e.preventDefault()}})})})})})})});eh.displayName="SelectContentImpl";var ef=n.forwardRef((e,r)=>{let{__scopeSelect:a,onPlaced:i,...l}=e,o=J(ed,a),s=ep(ed,a),[d,c]=n.useState(null),[u,p]=n.useState(null),m=(0,k.useComposedRefs)(r,e=>p(e)),h=G(a),f=n.useRef(!1),g=n.useRef(!0),{viewport:x,selectedItem:v,selectedItemText:w,focusSelectedItem:b}=s,y=n.useCallback(()=>{if(o.trigger&&o.valueNode&&d&&u&&x&&v&&w){let e=o.trigger.getBoundingClientRect(),t=u.getBoundingClientRect(),n=o.valueNode.getBoundingClientRect(),r=w.getBoundingClientRect();if("rtl"!==o.dir){let a=r.left-t.left,i=n.left-a,l=e.left-i,o=e.width+l,s=Math.max(o,t.width),c=window.innerWidth-10,u=(0,S.clamp)(i,[10,Math.max(10,c-s)]);d.style.minWidth=o+"px",d.style.left=u+"px"}else{let a=t.right-r.right,i=window.innerWidth-n.right-a,l=window.innerWidth-e.right-i,o=e.width+l,s=Math.max(o,t.width),c=window.innerWidth-10,u=(0,S.clamp)(i,[10,Math.max(10,c-s)]);d.style.minWidth=o+"px",d.style.right=u+"px"}let a=h(),l=window.innerHeight-20,s=x.scrollHeight,c=window.getComputedStyle(u),p=parseInt(c.borderTopWidth,10),m=parseInt(c.paddingTop,10),g=parseInt(c.borderBottomWidth,10),b=p+m+s+parseInt(c.paddingBottom,10)+g,y=Math.min(5*v.offsetHeight,b),j=window.getComputedStyle(x),C=parseInt(j.paddingTop,10),k=parseInt(j.paddingBottom,10),I=e.top+e.height/2-10,M=v.offsetHeight/2,N=p+m+(v.offsetTop+M);if(N<=I){let e=a.length>0&&v===a[a.length-1].ref.current;d.style.bottom="0px";let t=Math.max(l-I,M+(e?k:0)+(u.clientHeight-x.offsetTop-x.offsetHeight)+g);d.style.height=N+t+"px"}else{let e=a.length>0&&v===a[0].ref.current;d.style.top="0px";let t=Math.max(I,p+x.offsetTop+(e?C:0)+M);d.style.height=t+(b-N)+"px",x.scrollTop=N-I+x.offsetTop}d.style.margin="10px 0",d.style.minHeight=y+"px",d.style.maxHeight=l+"px",i?.(),requestAnimationFrame(()=>f.current=!0)}},[h,o.trigger,o.valueNode,d,u,x,v,w,o.dir,i]);(0,B.useLayoutEffect)(()=>y(),[y]);let[j,C]=n.useState();(0,B.useLayoutEffect)(()=>{u&&C(window.getComputedStyle(u).zIndex)},[u]);let I=n.useCallback(e=>{e&&!0===g.current&&(y(),b?.(),g.current=!1)},[y,b]);return(0,t.jsx)(ex,{scope:a,contentWrapper:d,shouldExpandOnScrollRef:f,onScrollButtonChange:I,children:(0,t.jsx)("div",{ref:c,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:j},children:(0,t.jsx)(D.Primitive.div,{...l,ref:m,style:{boxSizing:"border-box",maxHeight:"100%",...l.style}})})})});ef.displayName="SelectItemAlignedPosition";var eg=n.forwardRef((e,n)=>{let{__scopeSelect:r,align:a="start",collisionPadding:i=10,...l}=e,o=X(r);return(0,t.jsx)(T.Content,{...o,...l,ref:n,align:a,collisionPadding:i,style:{boxSizing:"border-box",...l.style,"--radix-select-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-select-content-available-width":"var(--radix-popper-available-width)","--radix-select-content-available-height":"var(--radix-popper-available-height)","--radix-select-trigger-width":"var(--radix-popper-anchor-width)","--radix-select-trigger-height":"var(--radix-popper-anchor-height)"}})});eg.displayName="SelectPopperPosition";var[ex,ev]=Y(ed,{}),ew="SelectViewport",eb=n.forwardRef((e,r)=>{let{__scopeSelect:a,nonce:i,...l}=e,o=ep(ew,a),s=ev(ew,a),d=(0,k.useComposedRefs)(r,o.onViewportChange),c=n.useRef(0);return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("style",{dangerouslySetInnerHTML:{__html:"[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}"},nonce:i}),(0,t.jsx)(q.Slot,{scope:a,children:(0,t.jsx)(D.Primitive.div,{"data-radix-select-viewport":"",role:"presentation",...l,ref:d,style:{position:"relative",flex:1,overflow:"hidden auto",...l.style},onScroll:(0,j.composeEventHandlers)(l.onScroll,e=>{let t=e.currentTarget,{contentWrapper:n,shouldExpandOnScrollRef:r}=s;if(r?.current&&n){let e=Math.abs(c.current-t.scrollTop);if(e>0){let r=window.innerHeight-20,a=Math.max(parseFloat(n.style.minHeight),parseFloat(n.style.height));if(a<r){let i=a+e,l=Math.min(r,i),o=i-l;n.style.height=l+"px","0px"===n.style.bottom&&(t.scrollTop=o>0?o:0,n.style.justifyContent="flex-end")}}}c.current=t.scrollTop})})})]})});eb.displayName=ew;var ey="SelectGroup",[eS,ej]=Y(ey),eC=n.forwardRef((e,n)=>{let{__scopeSelect:r,...a}=e,i=(0,R.useId)();return(0,t.jsx)(eS,{scope:r,id:i,children:(0,t.jsx)(D.Primitive.div,{role:"group","aria-labelledby":i,...a,ref:n})})});eC.displayName=ey;var ek="SelectLabel",eI=n.forwardRef((e,n)=>{let{__scopeSelect:r,...a}=e,i=ej(ek,r);return(0,t.jsx)(D.Primitive.div,{id:i.id,...a,ref:n})});eI.displayName=ek;var eM="SelectItem",[eN,eP]=Y(eM),eE=n.forwardRef((e,r)=>{let{__scopeSelect:a,value:i,disabled:l=!1,textValue:o,...s}=e,d=J(eM,a),c=ep(eM,a),u=d.value===i,[p,m]=n.useState(o??""),[h,f]=n.useState(!1),g=(0,k.useComposedRefs)(r,e=>c.itemRefCallback?.(e,i,l)),x=(0,R.useId)(),v=n.useRef("touch"),w=()=>{l||(d.onValueChange(i),d.onOpenChange(!1))};if(""===i)throw Error("A <Select.Item /> must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder.");return(0,t.jsx)(eN,{scope:a,value:i,disabled:l,textId:x,isSelected:u,onItemTextChange:n.useCallback(e=>{m(t=>t||(e?.textContent??"").trim())},[]),children:(0,t.jsx)(q.ItemSlot,{scope:a,value:i,disabled:l,textValue:p,children:(0,t.jsx)(D.Primitive.div,{role:"option","aria-labelledby":x,"data-highlighted":h?"":void 0,"aria-selected":u&&h,"data-state":u?"checked":"unchecked","aria-disabled":l||void 0,"data-disabled":l?"":void 0,tabIndex:l?void 0:-1,...s,ref:g,onFocus:(0,j.composeEventHandlers)(s.onFocus,()=>f(!0)),onBlur:(0,j.composeEventHandlers)(s.onBlur,()=>f(!1)),onClick:(0,j.composeEventHandlers)(s.onClick,()=>{"mouse"!==v.current&&w()}),onPointerUp:(0,j.composeEventHandlers)(s.onPointerUp,()=>{"mouse"===v.current&&w()}),onPointerDown:(0,j.composeEventHandlers)(s.onPointerDown,e=>{v.current=e.pointerType}),onPointerMove:(0,j.composeEventHandlers)(s.onPointerMove,e=>{v.current=e.pointerType,l?c.onItemLeave?.():"mouse"===v.current&&e.currentTarget.focus({preventScroll:!0})}),onPointerLeave:(0,j.composeEventHandlers)(s.onPointerLeave,e=>{e.currentTarget===document.activeElement&&c.onItemLeave?.()}),onKeyDown:(0,j.composeEventHandlers)(s.onKeyDown,e=>{(c.searchRef?.current===""||" "!==e.key)&&(U.includes(e.key)&&w()," "===e.key&&e.preventDefault())})})})})});eE.displayName=eM;var eR="SelectItemText",eT=n.forwardRef((e,r)=>{let{__scopeSelect:a,className:i,style:l,...o}=e,s=J(eR,a),d=ep(eR,a),c=eP(eR,a),u=et(eR,a),[p,m]=n.useState(null),h=(0,k.useComposedRefs)(r,e=>m(e),c.onItemTextChange,e=>d.itemTextRefCallback?.(e,c.value,c.disabled)),f=p?.textContent,g=n.useMemo(()=>(0,t.jsx)("option",{value:c.value,disabled:c.disabled,children:f},c.value),[c.disabled,c.value,f]),{onNativeOptionAdd:x,onNativeOptionRemove:v}=u;return(0,B.useLayoutEffect)(()=>(x(g),()=>v(g)),[x,v,g]),(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(D.Primitive.span,{id:c.textId,...o,ref:h}),c.isSelected&&s.valueNode&&!s.valueNodeHasChildren?y.createPortal(o.children,s.valueNode):null]})});eT.displayName=eR;var eA="SelectItemIndicator",eD=n.forwardRef((e,n)=>{let{__scopeSelect:r,...a}=e;return eP(eA,r).isSelected?(0,t.jsx)(D.Primitive.span,{"aria-hidden":!0,...a,ref:n}):null});eD.displayName=eA;var eL="SelectScrollUpButton",eF=n.forwardRef((e,r)=>{let a=ep(eL,e.__scopeSelect),i=ev(eL,e.__scopeSelect),[l,o]=n.useState(!1),s=(0,k.useComposedRefs)(r,i.onScrollButtonChange);return(0,B.useLayoutEffect)(()=>{if(a.viewport&&a.isPositioned){let e=function(){o(t.scrollTop>0)},t=a.viewport;return e(),t.addEventListener("scroll",e),()=>t.removeEventListener("scroll",e)}},[a.viewport,a.isPositioned]),l?(0,t.jsx)(ez,{...e,ref:s,onAutoScroll:()=>{let{viewport:e,selectedItem:t}=a;e&&t&&(e.scrollTop=e.scrollTop-t.offsetHeight)}}):null});eF.displayName=eL;var eH="SelectScrollDownButton",eB=n.forwardRef((e,r)=>{let a=ep(eH,e.__scopeSelect),i=ev(eH,e.__scopeSelect),[l,o]=n.useState(!1),s=(0,k.useComposedRefs)(r,i.onScrollButtonChange);return(0,B.useLayoutEffect)(()=>{if(a.viewport&&a.isPositioned){let e=function(){let e=t.scrollHeight-t.clientHeight;o(Math.ceil(t.scrollTop)<e)},t=a.viewport;return e(),t.addEventListener("scroll",e),()=>t.removeEventListener("scroll",e)}},[a.viewport,a.isPositioned]),l?(0,t.jsx)(ez,{...e,ref:s,onAutoScroll:()=>{let{viewport:e,selectedItem:t}=a;e&&t&&(e.scrollTop=e.scrollTop+t.offsetHeight)}}):null});eB.displayName=eH;var ez=n.forwardRef((e,r)=>{let{__scopeSelect:a,onAutoScroll:i,...l}=e,o=ep("SelectScrollButton",a),s=n.useRef(null),d=G(a),c=n.useCallback(()=>{null!==s.current&&(window.clearInterval(s.current),s.current=null)},[]);return n.useEffect(()=>()=>c(),[c]),(0,B.useLayoutEffect)(()=>{let e=d().find(e=>e.ref.current===document.activeElement);e?.ref.current?.scrollIntoView({block:"nearest"})},[d]),(0,t.jsx)(D.Primitive.div,{"aria-hidden":!0,...l,ref:r,style:{flexShrink:0,...l.style},onPointerDown:(0,j.composeEventHandlers)(l.onPointerDown,()=>{null===s.current&&(s.current=window.setInterval(i,50))}),onPointerMove:(0,j.composeEventHandlers)(l.onPointerMove,()=>{o.onItemLeave?.(),null===s.current&&(s.current=window.setInterval(i,50))}),onPointerLeave:(0,j.composeEventHandlers)(l.onPointerLeave,()=>{c()})})}),e_=n.forwardRef((e,n)=>{let{__scopeSelect:r,...a}=e;return(0,t.jsx)(D.Primitive.div,{"aria-hidden":!0,...a,ref:n})});e_.displayName="SelectSeparator";var eV="SelectArrow",eW=n.forwardRef((e,n)=>{let{__scopeSelect:r,...a}=e,i=X(r),l=J(eV,r),o=ep(eV,r);return l.open&&"popper"===o.position?(0,t.jsx)(T.Arrow,{...i,...a,ref:n}):null});eW.displayName=eV;var eO=n.forwardRef(({__scopeSelect:e,value:r,...a},i)=>{let l=n.useRef(null),o=(0,k.useComposedRefs)(i,l),s=(0,z.usePrevious)(r);return n.useEffect(()=>{let e=l.current;if(!e)return;let t=Object.getOwnPropertyDescriptor(window.HTMLSelectElement.prototype,"value").set;if(s!==r&&t){let n=new Event("change",{bubbles:!0});t.call(e,r),e.dispatchEvent(n)}},[s,r]),(0,t.jsx)(D.Primitive.select,{...a,style:{..._.VISUALLY_HIDDEN_STYLES,...a.style},ref:o,defaultValue:r})});function eU(e){return""===e||void 0===e}function eK(e){let t=(0,F.useCallbackRef)(e),r=n.useRef(""),a=n.useRef(0),i=n.useCallback(e=>{let n=r.current+e;t(n),function e(t){r.current=t,window.clearTimeout(a.current),""!==t&&(a.current=window.setTimeout(()=>e(""),1e3))}(n)},[t]),l=n.useCallback(()=>{r.current="",window.clearTimeout(a.current)},[]);return n.useEffect(()=>()=>window.clearTimeout(a.current),[]),[r,i,l]}function eq(e,t,n){var r,a;let i=t.length>1&&Array.from(t).every(e=>e===t[0])?t[0]:t,l=n?e.indexOf(n):-1,o=(r=e,a=Math.max(l,0),r.map((e,t)=>r[(a+t)%r.length]));1===i.length&&(o=o.filter(e=>e!==n));let s=o.find(e=>e.textValue.toLowerCase().startsWith(i.toLowerCase()));return s!==n?s:void 0}eO.displayName="SelectBubbleInput",e.s(["Arrow",()=>eW,"Content",()=>ec,"Group",()=>eC,"Icon",()=>eo,"Item",()=>eE,"ItemIndicator",()=>eD,"ItemText",()=>eT,"Label",()=>eI,"Portal",()=>es,"Root",()=>en,"ScrollDownButton",()=>eB,"ScrollUpButton",()=>eF,"Select",()=>en,"SelectArrow",()=>eW,"SelectContent",()=>ec,"SelectGroup",()=>eC,"SelectIcon",()=>eo,"SelectItem",()=>eE,"SelectItemIndicator",()=>eD,"SelectItemText",()=>eT,"SelectLabel",()=>eI,"SelectPortal",()=>es,"SelectScrollDownButton",()=>eB,"SelectScrollUpButton",()=>eF,"SelectSeparator",()=>e_,"SelectTrigger",()=>ea,"SelectValue",()=>el,"SelectViewport",()=>eb,"Separator",()=>e_,"Trigger",()=>ea,"Value",()=>el,"Viewport",()=>eb,"createSelectScope",()=>Z],83830);var eG=e.i(83830),eG=eG,e$=e.i(99105);let eY=(0,a.default)("chevron-up",[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]]),eZ=eG.Root;eG.Group;let eX=eG.Value,eQ=n.forwardRef(({className:e,children:n,...r},a)=>(0,t.jsxs)(eG.Trigger,{ref:a,className:(0,v.cn)("border-input ring-offset-background placeholder:text-muted-foreground focus:ring-ring flex h-9 w-full items-center justify-between rounded-md border bg-transparent px-3 py-2 text-sm whitespace-nowrap shadow-sm focus:ring-1 focus:outline-none disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1",e),...r,children:[n,(0,t.jsx)(eG.Icon,{asChild:!0,children:(0,t.jsx)(e$.ChevronDown,{className:"h-4 w-4 opacity-50"})})]}));eQ.displayName=eG.Trigger.displayName;let eJ=n.forwardRef(({className:e,...n},r)=>(0,t.jsx)(eG.ScrollUpButton,{ref:r,className:(0,v.cn)("flex cursor-default items-center justify-center py-1",e),...n,children:(0,t.jsx)(eY,{className:"h-4 w-4"})}));eJ.displayName=eG.ScrollUpButton.displayName;let e0=n.forwardRef(({className:e,...n},r)=>(0,t.jsx)(eG.ScrollDownButton,{ref:r,className:(0,v.cn)("flex cursor-default items-center justify-center py-1",e),...n,children:(0,t.jsx)(e$.ChevronDown,{className:"h-4 w-4"})}));e0.displayName=eG.ScrollDownButton.displayName;let e1=n.forwardRef(({className:e,children:n,position:r="popper",...a},i)=>(0,t.jsx)(eG.Portal,{children:(0,t.jsxs)(eG.Content,{ref:i,className:(0,v.cn)("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 relative z-50 max-h-96 min-w-[8rem] overflow-hidden rounded-md border shadow-md","popper"===r&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",e),position:r,...a,children:[(0,t.jsx)(eJ,{}),(0,t.jsx)(eG.Viewport,{className:(0,v.cn)("p-1","popper"===r&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),children:n}),(0,t.jsx)(e0,{})]})}));e1.displayName=eG.Content.displayName,n.forwardRef(({className:e,...n},r)=>(0,t.jsx)(eG.Label,{ref:r,className:(0,v.cn)("px-2 py-1.5 text-sm font-semibold",e),...n})).displayName=eG.Label.displayName;let e2=n.forwardRef(({className:e,children:n,...a},i)=>(0,t.jsxs)(eG.Item,{ref:i,className:(0,v.cn)("focus:bg-accent focus:text-accent-foreground relative flex w-full cursor-default items-center rounded-sm py-1.5 pr-8 pl-2 text-sm outline-none select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),...a,children:[(0,t.jsx)("span",{className:"absolute right-2 flex h-3.5 w-3.5 items-center justify-center",children:(0,t.jsx)(eG.ItemIndicator,{children:(0,t.jsx)(r.Check,{className:"h-4 w-4"})})}),(0,t.jsx)(eG.ItemText,{children:n})]}));e2.displayName=eG.Item.displayName,n.forwardRef(({className:e,...n},r)=>(0,t.jsx)(eG.Separator,{ref:r,className:(0,v.cn)("bg-muted -mx-1 my-1 h-px",e),...n})).displayName=eG.Separator.displayName;var e3=e.i(21023);let e5=(0,e3.createServerReference)("40bb43eee5df18c9b0db56b38ddd0bb386a52a7dc6",e3.callServer,void 0,e3.findSourceMapURL,"updateSettingsAction");var e4=e.i(17406),e8=e.i(98804),e6=e.i(44229),e9=e.i(83902);function e7(e){return(0,t.jsx)(e6.Code,{className:(0,v.cn)("h-4 w-4",e.className),...e})}function te({className:e}){return(0,t.jsx)(e8.default,{src:"/icons/editors/vscode.svg",alt:"VS Code",width:24,height:24,className:(0,v.cn)("rounded-sm object-contain",e)})}function tt({className:e}){return(0,t.jsx)(e8.default,{src:"/icons/agents/cursor.jpeg",alt:"Cursor",width:24,height:24,className:(0,v.cn)("rounded-sm object-contain",e)})}function tn({className:e}){return(0,t.jsx)(e8.default,{src:"/icons/editors/windsurf.svg",alt:"Windsurf",width:24,height:24,className:(0,v.cn)("rounded-sm object-contain",e)})}function tr({className:e}){return(0,t.jsx)(e8.default,{src:"/icons/editors/zed.svg",alt:"Zed",width:24,height:24,className:(0,v.cn)("rounded-sm object-contain",e)})}function ta({className:e,...n}){return(0,t.jsx)(e9.Rocket,{className:(0,v.cn)("h-4 w-4",e),...n})}te.displayName="VsCodeIcon",tt.displayName="CursorEditorIcon",tn.displayName="WindsurfIcon",tr.displayName="ZedIcon",ta.displayName="AntigravityIcon";let ti={vscode:te,cursor:tt,windsurf:tn,zed:tr,antigravity:ta};var tl=e.i(41413),to=e.i(77624),ts=["PageUp","PageDown"],td=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],tc={"from-left":["Home","PageDown","ArrowDown","ArrowLeft"],"from-right":["Home","PageDown","ArrowDown","ArrowRight"],"from-bottom":["Home","PageDown","ArrowDown","ArrowLeft"],"from-top":["Home","PageDown","ArrowUp","ArrowLeft"]},tu="Slider",[tp,tm,th]=(0,C.createCollection)(tu),[tf,tg]=(0,I.createContextScope)(tu,[th]),[tx,tv]=tf(tu),tw=n.forwardRef((e,r)=>{let{name:a,min:i=0,max:l=100,step:o=1,orientation:s="horizontal",disabled:d=!1,minStepsBetweenThumbs:c=0,defaultValue:u=[i],value:p,onValueChange:m=()=>{},onValueCommit:h=()=>{},inverted:f=!1,form:g,...x}=e,v=n.useRef(new Set),w=n.useRef(0),b="horizontal"===s,[y=[],C]=(0,H.useControllableState)({prop:p,defaultProp:u,onChange:e=>{let t=[...v.current];t[w.current]?.focus(),m(e)}}),k=n.useRef(y);function I(e,t,{commit:n}={commit:!1}){let r,a=(String(o).split(".")[1]||"").length,s=Math.round((Math.round((e-i)/o)*o+i)*(r=Math.pow(10,a)))/r,d=(0,S.clamp)(s,[i,l]);C((e=[])=>{let r=function(e=[],t,n){let r=[...e];return r[n]=t,r.sort((e,t)=>e-t)}(e,d,t);if(!function(e,t){if(t>0)return Math.min(...e.slice(0,-1).map((t,n)=>e[n+1]-t))>=t;return!0}(r,c*o))return e;{w.current=r.indexOf(d);let t=String(r)!==String(e);return t&&n&&h(r),t?r:e}})}return(0,t.jsx)(tx,{scope:e.__scopeSlider,name:a,disabled:d,min:i,max:l,valueIndexToChangeRef:w,thumbs:v.current,values:y,orientation:s,form:g,children:(0,t.jsx)(tp.Provider,{scope:e.__scopeSlider,children:(0,t.jsx)(tp.Slot,{scope:e.__scopeSlider,children:(0,t.jsx)(b?tS:tj,{"aria-disabled":d,"data-disabled":d?"":void 0,...x,ref:r,onPointerDown:(0,j.composeEventHandlers)(x.onPointerDown,()=>{d||(k.current=y)}),min:i,max:l,inverted:f,onSlideStart:d?void 0:function(e){let t=function(e,t){if(1===e.length)return 0;let n=e.map(e=>Math.abs(e-t)),r=Math.min(...n);return n.indexOf(r)}(y,e);I(e,t)},onSlideMove:d?void 0:function(e){I(e,w.current)},onSlideEnd:d?void 0:function(){let e=k.current[w.current];y[w.current]!==e&&h(y)},onHomeKeyDown:()=>!d&&I(i,0,{commit:!0}),onEndKeyDown:()=>!d&&I(l,y.length-1,{commit:!0}),onStepKeyDown:({event:e,direction:t})=>{if(!d){let n=ts.includes(e.key)||e.shiftKey&&td.includes(e.key),r=w.current;I(y[r]+o*(n?10:1)*t,r,{commit:!0})}}})})})})});tw.displayName=tu;var[tb,ty]=tf(tu,{startEdge:"left",endEdge:"right",size:"width",direction:1}),tS=n.forwardRef((e,r)=>{let{min:a,max:i,dir:l,inverted:o,onSlideStart:s,onSlideMove:d,onSlideEnd:c,onStepKeyDown:u,...p}=e,[m,h]=n.useState(null),f=(0,k.useComposedRefs)(r,e=>h(e)),g=n.useRef(void 0),x=(0,M.useDirection)(l),v="ltr"===x,w=v&&!o||!v&&o;function b(e){let t=g.current||m.getBoundingClientRect(),n=tD([0,t.width],w?[a,i]:[i,a]);return g.current=t,n(e-t.left)}return(0,t.jsx)(tb,{scope:e.__scopeSlider,startEdge:w?"left":"right",endEdge:w?"right":"left",direction:w?1:-1,size:"width",children:(0,t.jsx)(tC,{dir:x,"data-orientation":"horizontal",...p,ref:f,style:{...p.style,"--radix-slider-thumb-transform":"translateX(-50%)"},onSlideStart:e=>{let t=b(e.clientX);s?.(t)},onSlideMove:e=>{let t=b(e.clientX);d?.(t)},onSlideEnd:()=>{g.current=void 0,c?.()},onStepKeyDown:e=>{let t=tc[w?"from-left":"from-right"].includes(e.key);u?.({event:e,direction:t?-1:1})}})})}),tj=n.forwardRef((e,r)=>{let{min:a,max:i,inverted:l,onSlideStart:o,onSlideMove:s,onSlideEnd:d,onStepKeyDown:c,...u}=e,p=n.useRef(null),m=(0,k.useComposedRefs)(r,p),h=n.useRef(void 0),f=!l;function g(e){let t=h.current||p.current.getBoundingClientRect(),n=tD([0,t.height],f?[i,a]:[a,i]);return h.current=t,n(e-t.top)}return(0,t.jsx)(tb,{scope:e.__scopeSlider,startEdge:f?"bottom":"top",endEdge:f?"top":"bottom",size:"height",direction:f?1:-1,children:(0,t.jsx)(tC,{"data-orientation":"vertical",...u,ref:m,style:{...u.style,"--radix-slider-thumb-transform":"translateY(50%)"},onSlideStart:e=>{let t=g(e.clientY);o?.(t)},onSlideMove:e=>{let t=g(e.clientY);s?.(t)},onSlideEnd:()=>{h.current=void 0,d?.()},onStepKeyDown:e=>{let t=tc[f?"from-bottom":"from-top"].includes(e.key);c?.({event:e,direction:t?-1:1})}})})}),tC=n.forwardRef((e,n)=>{let{__scopeSlider:r,onSlideStart:a,onSlideMove:i,onSlideEnd:l,onHomeKeyDown:o,onEndKeyDown:s,onStepKeyDown:d,...c}=e,u=tv(tu,r);return(0,t.jsx)(D.Primitive.span,{...c,ref:n,onKeyDown:(0,j.composeEventHandlers)(e.onKeyDown,e=>{"Home"===e.key?(o(e),e.preventDefault()):"End"===e.key?(s(e),e.preventDefault()):ts.concat(td).includes(e.key)&&(d(e),e.preventDefault())}),onPointerDown:(0,j.composeEventHandlers)(e.onPointerDown,e=>{let t=e.target;t.setPointerCapture(e.pointerId),e.preventDefault(),u.thumbs.has(t)?t.focus():a(e)}),onPointerMove:(0,j.composeEventHandlers)(e.onPointerMove,e=>{e.target.hasPointerCapture(e.pointerId)&&i(e)}),onPointerUp:(0,j.composeEventHandlers)(e.onPointerUp,e=>{let t=e.target;t.hasPointerCapture(e.pointerId)&&(t.releasePointerCapture(e.pointerId),l(e))})})}),tk="SliderTrack",tI=n.forwardRef((e,n)=>{let{__scopeSlider:r,...a}=e,i=tv(tk,r);return(0,t.jsx)(D.Primitive.span,{"data-disabled":i.disabled?"":void 0,"data-orientation":i.orientation,...a,ref:n})});tI.displayName=tk;var tM="SliderRange",tN=n.forwardRef((e,r)=>{let{__scopeSlider:a,...i}=e,l=tv(tM,a),o=ty(tM,a),s=n.useRef(null),d=(0,k.useComposedRefs)(r,s),c=l.values.length,u=l.values.map(e=>tA(e,l.min,l.max)),p=c>1?Math.min(...u):0,m=100-Math.max(...u);return(0,t.jsx)(D.Primitive.span,{"data-orientation":l.orientation,"data-disabled":l.disabled?"":void 0,...i,ref:d,style:{...e.style,[o.startEdge]:p+"%",[o.endEdge]:m+"%"}})});tN.displayName=tM;var tP="SliderThumb",tE=n.forwardRef((e,r)=>{let a=tm(e.__scopeSlider),[i,l]=n.useState(null),o=(0,k.useComposedRefs)(r,e=>l(e)),s=n.useMemo(()=>i?a().findIndex(e=>e.ref.current===i):-1,[a,i]);return(0,t.jsx)(tR,{...e,ref:o,index:s})}),tR=n.forwardRef((e,r)=>{var a,i,l,o,s;let d,c,{__scopeSlider:u,index:p,name:m,...h}=e,f=tv(tP,u),g=ty(tP,u),[x,v]=n.useState(null),w=(0,k.useComposedRefs)(r,e=>v(e)),b=!x||f.form||!!x.closest("form"),y=(0,to.useSize)(x),S=f.values[p],C=void 0===S?0:tA(S,f.min,f.max),I=(a=p,(i=f.values.length)>2?`Value ${a+1} of ${i}`:2===i?["Minimum","Maximum"][a]:void 0),M=y?.[g.size],N=M?(l=M,o=C,s=g.direction,c=tD([0,50],[0,d=l/2]),(d-c(o)*s)*s):0;return n.useEffect(()=>{if(x)return f.thumbs.add(x),()=>{f.thumbs.delete(x)}},[x,f.thumbs]),(0,t.jsxs)("span",{style:{transform:"var(--radix-slider-thumb-transform)",position:"absolute",[g.startEdge]:`calc(${C}% + ${N}px)`},children:[(0,t.jsx)(tp.ItemSlot,{scope:e.__scopeSlider,children:(0,t.jsx)(D.Primitive.span,{role:"slider","aria-label":e["aria-label"]||I,"aria-valuemin":f.min,"aria-valuenow":S,"aria-valuemax":f.max,"aria-orientation":f.orientation,"data-orientation":f.orientation,"data-disabled":f.disabled?"":void 0,tabIndex:f.disabled?void 0:0,...h,ref:w,style:void 0===S?{display:"none"}:e.style,onFocus:(0,j.composeEventHandlers)(e.onFocus,()=>{f.valueIndexToChangeRef.current=p})})}),b&&(0,t.jsx)(tT,{name:m??(f.name?f.name+(f.values.length>1?"[]":""):void 0),form:f.form,value:S},p)]})});tE.displayName=tP;var tT=n.forwardRef(({__scopeSlider:e,value:r,...a},i)=>{let l=n.useRef(null),o=(0,k.useComposedRefs)(l,i),s=(0,z.usePrevious)(r);return n.useEffect(()=>{let e=l.current;if(!e)return;let t=Object.getOwnPropertyDescriptor(window.HTMLInputElement.prototype,"value").set;if(s!==r&&t){let n=new Event("input",{bubbles:!0});t.call(e,r),e.dispatchEvent(n)}},[s,r]),(0,t.jsx)(D.Primitive.input,{style:{display:"none"},...a,ref:o,defaultValue:r})});function tA(e,t,n){return(0,S.clamp)(100/(n-t)*(e-t),[0,100])}function tD(e,t){return n=>{if(e[0]===e[1]||t[0]===t[1])return t[0];let r=(t[1]-t[0])/(e[1]-e[0]);return t[0]+r*(n-e[0])}}tT.displayName="RadioBubbleInput",e.s(["Range",()=>tN,"Root",()=>tw,"Slider",()=>tw,"SliderRange",()=>tN,"SliderThumb",()=>tE,"SliderTrack",()=>tI,"Thumb",()=>tE,"Track",()=>tI,"createSliderScope",()=>tg],29991);var tL=e.i(29991),tL=tL;function tF({className:e,defaultValue:r,value:a,min:i=0,max:l=100,...o}){let s=n.useMemo(()=>Array.isArray(a)?a:Array.isArray(r)?r:[i,l],[a,r,i,l]);return(0,t.jsxs)(tL.Root,{"data-slot":"slider",defaultValue:r,value:a,min:i,max:l,className:(0,v.cn)("relative flex w-full touch-none items-center select-none data-[disabled]:opacity-50 data-[orientation=vertical]:h-full data-[orientation=vertical]:min-h-44 data-[orientation=vertical]:w-auto data-[orientation=vertical]:flex-col",e),...o,children:[(0,t.jsx)(tL.Track,{"data-slot":"slider-track",className:(0,v.cn)("bg-muted relative grow overflow-hidden rounded-full data-[orientation=horizontal]:h-1.5 data-[orientation=horizontal]:w-full data-[orientation=vertical]:h-full data-[orientation=vertical]:w-1.5"),children:(0,t.jsx)(tL.Range,{"data-slot":"slider-range",className:(0,v.cn)("bg-primary absolute data-[orientation=horizontal]:h-full data-[orientation=vertical]:w-full")})}),Array.from({length:s.length},(e,n)=>(0,t.jsx)(tL.Thumb,{"data-slot":"slider-thumb",className:"border-primary ring-ring/50 block size-4 shrink-0 rounded-full border bg-white shadow-sm transition-[color,box-shadow] hover:ring-4 focus-visible:ring-4 focus-visible:outline-hidden disabled:pointer-events-none disabled:opacity-50"},n))]})}let tH=[60,120,300,600,900,1800,2700,3600,7200,10800,14400,21600,28800,43200,86400],tB=tH.length-1;function tz(e){let t=0,n=Math.abs(e-tH[0]);for(let r=1;r<tH.length;r++){let a=Math.abs(e-tH[r]);a<n&&(n=a,t=r)}return t}function t_({id:e,testId:r,value:a,onChange:i,onBlur:l,defaultSeconds:o=1800}){var s;let d,c,u=(""===a?o:parseInt(a,10))||o,[p,m]=(0,n.useState)(()=>tz(u)),h=tz(u);h!==p&&tH[p]!==u&&m(h);let f=(0,n.useCallback)(([e])=>{m(e),i(String(tH[e]))},[i]);return(0,t.jsxs)("div",{className:"flex w-55 items-center gap-2",children:[(0,t.jsx)(tF,{id:e,"data-testid":r,min:0,max:tB,step:1,value:[p],onValueChange:f,onValueCommit:()=>l(),className:"min-w-0 flex-1"}),(0,t.jsx)("span",{className:"text-muted-foreground shrink-0 text-right text-xs tabular-nums",children:(d=Math.floor((s=tH[p])/3600),c=Math.round(s%3600/60),0===d?`${c}m`:0===c?`${d}h`:`${d}h ${c}m`)})]})}let tV=[{value:e4.EditorType.VsCode,label:"VS Code"},{value:e4.EditorType.Cursor,label:"Cursor"},{value:e4.EditorType.Windsurf,label:"Windsurf"},{value:e4.EditorType.Zed,label:"Zed"},{value:e4.EditorType.Antigravity,label:"Antigravity"}],tW=[{value:"bash",label:"Bash"},{value:"zsh",label:"Zsh"},{value:"fish",label:"Fish"}],tO=[{id:"agent",label:"Agent",icon:i},{id:"environment",label:"Environment",icon:l.Terminal},{id:"workflow",label:"Workflow",icon:o.GitBranch},{id:"ci",label:"CI",icon:s},{id:"stage-timeouts",label:"Timeouts",icon:g.Timer},{id:"notifications",label:"Notifications",icon:d},{id:"feature-flags",label:"Flags",icon:c},{id:"database",label:"Database",icon:u}];function tU({label:e,description:n,htmlFor:r,children:a}){return(0,t.jsxs)("div",{className:"flex items-center justify-between gap-4 border-b py-2.5 last:border-b-0",children:[(0,t.jsxs)("div",{className:"min-w-0",children:[(0,t.jsx)(w.Label,{htmlFor:r,className:"cursor-pointer text-sm font-normal whitespace-nowrap",children:e}),n?(0,t.jsx)("p",{className:"text-muted-foreground text-[11px] leading-tight",children:n}):null]}),(0,t.jsx)("div",{className:"flex shrink-0 items-center gap-2",children:a})]})}function tK({label:e,description:n,id:r,testId:a,checked:i,onChange:l,disabled:o}){return(0,t.jsx)(tU,{label:e,description:n,htmlFor:r,children:(0,t.jsx)(b.Switch,{id:r,"data-testid":a,checked:i,onCheckedChange:l,disabled:o,className:(0,v.cn)("cursor-pointer",o&&"cursor-not-allowed opacity-50")})})}function tq({icon:e,title:n,description:r,badge:a,testId:i,children:l}){return(0,t.jsxs)("div",{className:"bg-background rounded-lg border","data-testid":i,children:[(0,t.jsxs)("div",{className:"bg-muted/30 border-b px-4 py-3",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(e,{className:"text-muted-foreground h-3.5 w-3.5"}),(0,t.jsx)("h2",{className:"text-sm font-semibold",children:n}),a?(0,t.jsx)("span",{className:"bg-muted text-muted-foreground rounded px-1.5 py-0.5 text-[9px] font-medium tracking-wider uppercase",children:a}):null]}),(0,t.jsx)("p",{className:"text-muted-foreground mt-0.5 text-[11px]",children:r})]}),(0,t.jsx)("div",{className:"px-4",children:l})]})}function tG({id:e,testId:n,value:r,onChange:a,onBlur:i,placeholder:l,min:o=1,max:s,step:d=1,suffix:c}){let u=""===r?void 0:parseInt(r,10);return(0,t.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,t.jsxs)("div",{className:"flex items-center overflow-hidden rounded-md border",children:[(0,t.jsx)("button",{type:"button",onClick:()=>{a(String(Math.max(o,(u??parseInt(l,10))-d)))},onMouseUp:i,className:"text-muted-foreground hover:bg-muted hover:text-foreground flex h-8 w-7 cursor-pointer items-center justify-center border-r transition-colors","aria-label":"Decrease",children:(0,t.jsx)(p.default,{className:"h-3 w-3"})}),(0,t.jsx)("input",{id:e,"data-testid":n,type:"text",inputMode:"numeric",pattern:"[0-9]*",value:r,placeholder:l,onChange:e=>{a(e.target.value.replace(/[^0-9]/g,""))},onBlur:i,className:"h-8 w-14 bg-transparent text-center text-xs outline-none"}),(0,t.jsx)("button",{type:"button",onClick:()=>{let e;e=u??parseInt(l,10),a(String(null!=s?Math.min(s,e+d):e+d))},onMouseUp:i,className:"text-muted-foreground hover:bg-muted hover:text-foreground flex h-8 w-7 cursor-pointer items-center justify-center border-l transition-colors","aria-label":"Increase",children:(0,t.jsx)(m.Plus,{className:"h-3 w-3"})})]}),c?(0,t.jsx)("span",{className:"text-muted-foreground text-[11px]",children:c}):null]})}function t$({children:e}){return(0,t.jsx)("div",{className:"border-b pt-3 pb-1",children:(0,t.jsx)("span",{className:"text-muted-foreground text-[10px] font-semibold tracking-wider uppercase",children:e})})}function tY({children:e,links:n}){return(0,t.jsxs)("div",{className:"hidden pt-2 lg:block",children:[(0,t.jsx)("p",{className:"text-muted-foreground/70 text-[11px] leading-relaxed",children:e}),null!=n&&n.length>0?(0,t.jsx)("div",{className:"mt-2 flex flex-col gap-1",children:n.map(e=>(0,t.jsxs)("a",{href:e.href,target:"_blank",rel:"noopener noreferrer",className:"text-muted-foreground hover:text-foreground inline-flex items-center gap-1 text-[10px] transition-colors",children:[(0,t.jsx)(h.ExternalLink,{className:"h-2.5 w-2.5"}),e.label]},e.href))}):null]})}function tZ({settings:e,shepHome:a,dbFileSize:p,availableTerminals:m}){let{showSaving:h,showSaved:w,save:b}=function(){let[e,t]=(0,n.useTransition)(),[r,a]=(0,n.useState)(!1),[i,l]=(0,n.useState)(!1),o=(0,n.useRef)(null),s=(0,n.useRef)(!1);return(0,n.useEffect)(()=>{e&&!r&&(a(!0),s.current=!1,o.current=setTimeout(()=>{o.current=null,s.current&&(a(!1),l(!0),setTimeout(()=>l(!1),2e3))},350)),!e&&r&&(s.current=!0,o.current||(a(!1),l(!0),setTimeout(()=>l(!1),2e3)))},[e,r]),{showSaving:r,showSaved:i,save:(0,n.useCallback)(e=>{t(async()=>{let t=await e5(e);t.success||x.toast.error(t.error??"Failed to save settings")})},[t])}}(),y=e.featureFlags??{skills:!1,envDeploy:!1,debug:!1,githubImport:!1,adoptBranch:!1},[S,j]=(0,n.useState)(e.agent.type),[C,k]=(0,n.useState)(e.environment.defaultEditor),[I,M]=(0,n.useState)(e.environment.shellPreference),[N,P]=(0,n.useState)(e.environment.terminalPreference??e4.TerminalType.System),E=m?m.filter(e=>e.available):[{id:e4.TerminalType.System,name:"System Terminal",available:!0}],[R,T]=(0,n.useState)(e.workflow.openPrOnImplementationComplete),[A,D]=(0,n.useState)(e.workflow.approvalGateDefaults.pushOnImplementationComplete),[L,F]=(0,n.useState)(e.workflow.approvalGateDefaults.allowPrd),[H,B]=(0,n.useState)(e.workflow.approvalGateDefaults.allowPlan),[z,_]=(0,n.useState)(e.workflow.approvalGateDefaults.allowMerge),[V,W]=(0,n.useState)(e.workflow.enableEvidence),[O,U]=(0,n.useState)(e.workflow.commitEvidence),[K,q]=(0,n.useState)(!1!==e.workflow.ciWatchEnabled),[G,$]=(0,n.useState)(null!=e.workflow.ciMaxFixAttempts?String(e.workflow.ciMaxFixAttempts):""),[Y,Z]=(0,n.useState)(null!=e.workflow.ciWatchTimeoutMs?String(Math.round(e.workflow.ciWatchTimeoutMs/1e3)):""),[X,Q]=(0,n.useState)(null!=e.workflow.ciLogMaxChars?String(e.workflow.ciLogMaxChars):""),[J,ee]=(0,n.useState)(null!=e.workflow.ciWatchPollIntervalSeconds?String(e.workflow.ciWatchPollIntervalSeconds):""),et=e.workflow.stageTimeouts,[en,er]=(0,n.useState)(String(Math.round((et?.analyzeMs??18e5)/1e3))),[ea,ei]=(0,n.useState)(String(Math.round((et?.requirementsMs??18e5)/1e3))),[el,eo]=(0,n.useState)(String(Math.round((et?.researchMs??18e5)/1e3))),[es,ed]=(0,n.useState)(String(Math.round((et?.planMs??18e5)/1e3))),[ec,eu]=(0,n.useState)(String(Math.round((et?.implementMs??18e5)/1e3))),[ep,em]=(0,n.useState)(String(Math.round((et?.mergeMs??18e5)/1e3))),eh=e.workflow.analyzeRepoTimeouts,[ef,eg]=(0,n.useState)(String(Math.round((eh?.analyzeMs??6e5)/1e3))),[ex,ev]=(0,n.useState)(e.notifications.inApp.enabled),[ew,eb]=(0,n.useState)({...e.notifications.events}),[ey,eS]=(0,n.useState)({...y}),ej=null!=e.workflow.ciMaxFixAttempts?String(e.workflow.ciMaxFixAttempts):"",eC=null!=e.workflow.ciWatchTimeoutMs?String(Math.round(e.workflow.ciWatchTimeoutMs/1e3)):"",ek=null!=e.workflow.ciLogMaxChars?String(e.workflow.ciLogMaxChars):"",eI=null!=e.workflow.ciWatchPollIntervalSeconds?String(e.workflow.ciWatchPollIntervalSeconds):"",eM=et?.analyzeMs!=null?String(Math.round(et.analyzeMs/1e3)):"",eN=et?.requirementsMs!=null?String(Math.round(et.requirementsMs/1e3)):"",eP=et?.researchMs!=null?String(Math.round(et.researchMs/1e3)):"",eE=et?.planMs!=null?String(Math.round(et.planMs/1e3)):"",eR=et?.implementMs!=null?String(Math.round(et.implementMs/1e3)):"",eT=et?.mergeMs!=null?String(Math.round(et.mergeMs/1e3)):"",eA=eh?.analyzeMs!=null?String(Math.round(eh.analyzeMs/1e3)):"";function eD(e){if(""===e)return;let t=parseInt(e,10);return Number.isNaN(t)||t<=0?void 0:t}function eL(e){if(void 0===e)return;let t=eD(e);return null!=t?1e3*t:void 0}function eF(e={}){let t=eD(e.ciTimeout??Y);return{workflow:{openPrOnImplementationComplete:e.openPr??R,approvalGateDefaults:{pushOnImplementationComplete:e.pushOnComplete??A,allowPrd:e.allowPrd??L,allowPlan:e.allowPlan??H,allowMerge:e.allowMerge??z},enableEvidence:e.enableEvidence??V,commitEvidence:e.commitEvidence??O,ciWatchEnabled:e.ciWatchEnabled??K,ciMaxFixAttempts:eD(e.ciMaxFix??G),ciWatchTimeoutMs:null!=t?1e3*t:void 0,ciLogMaxChars:eD(e.ciLogMax??X),ciWatchPollIntervalSeconds:eD(e.ciPollInterval??J),stageTimeouts:{analyzeMs:eL(e.analyzeTimeout??en),requirementsMs:eL(e.requirementsTimeout??ea),researchMs:eL(e.researchTimeout??el),planMs:eL(e.planTimeout??es),implementMs:eL(e.implementTimeout??ec),mergeMs:eL(e.mergeTimeout??ep)},analyzeRepoTimeouts:{analyzeMs:eL(e.analyzeRepoTimeout??ef)}}}}function eH(e={}){return{notifications:{inApp:{enabled:e.inApp??ex},events:e.events??ew}}}let[eB,ez]=(0,n.useState)("agent");(0,n.useEffect)(()=>{let e=tO.map(e=>document.getElementById(`section-${e.id}`)).filter(Boolean);if(0===e.length)return;let t=new IntersectionObserver(e=>{for(let t of e)t.isIntersecting&&ez(t.target.id.replace("section-",""))},{rootMargin:"-65px 0px -60% 0px",threshold:0});for(let n of e)t.observe(n);return()=>t.disconnect()},[]);let e_=(0,n.useCallback)(e=>{let t=document.getElementById(`section-${e}`);t&&(t.scrollIntoView({behavior:"smooth",block:"start"}),t.style.animation="none",t.offsetHeight,t.style.animation="section-flash 1s ease-out")},[]);return(0,t.jsxs)("div",{"data-testid":"settings-page-client",className:"max-w-5xl",children:[(0,t.jsx)("div",{className:"bg-background/95 supports-backdrop-filter:bg-background/80 sticky top-0 z-10 grid grid-cols-1 gap-x-5 pt-6 pb-4 backdrop-blur lg:grid-cols-[1fr_280px]",children:(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(f,{className:"text-muted-foreground h-4 w-4"}),(0,t.jsx)("h1",{className:"text-sm font-bold tracking-tight",children:"Settings"}),(0,t.jsxs)("span",{className:"relative h-4 w-16",children:[(0,t.jsx)("span",{className:(0,v.cn)("text-muted-foreground absolute inset-0 flex items-center text-xs transition-opacity duration-300",h?"opacity-100":"opacity-0"),children:"Saving..."}),(0,t.jsxs)("span",{className:(0,v.cn)("absolute inset-0 flex items-center gap-1 text-xs text-green-600 transition-opacity duration-300",w&&!h?"opacity-100":"opacity-0"),children:[(0,t.jsx)(r.Check,{className:"h-3 w-3"}),"Saved"]})]}),(0,t.jsx)("nav",{className:"ml-auto flex items-center gap-0.5",children:tO.map(e=>{let n=e.icon,r=eB===e.id;return(0,t.jsxs)("button",{type:"button",onClick:()=>e_(e.id),className:(0,v.cn)("flex cursor-pointer items-center gap-1 rounded-md px-1.5 py-1 text-[11px] transition-all",r?"bg-accent text-foreground font-medium":"text-muted-foreground/60 hover:text-foreground hover:bg-accent/50"),children:[(0,t.jsx)(n,{className:"h-3 w-3"}),(0,t.jsx)("span",{className:"hidden sm:inline",children:e.label})]},e.id)})})]})}),(0,t.jsxs)("div",{className:"flex flex-col gap-3",children:[(0,t.jsxs)("div",{id:"section-agent",className:"grid scroll-mt-18 grid-cols-1 gap-x-5 rounded-lg lg:grid-cols-[1fr_280px]",children:[(0,t.jsx)(tq,{icon:i,title:"Agent",description:"AI coding agent and authentication",testId:"agent-settings-section",children:(0,t.jsx)(tU,{label:"Agent & Model",description:"Provider and model for all operations",htmlFor:"agent-model-picker",children:(0,t.jsx)(tl.AgentModelPicker,{initialAgentType:S,initialModel:e.models.default,mode:"settings",onAgentModelChange:e=>j(e),className:"w-55"})})}),(0,t.jsx)(tY,{links:[{label:"Agent system",href:"https://github.com/shep-ai/cli/blob/main/docs/architecture/agent-system.md"},{label:"Adding agents",href:"https://github.com/shep-ai/cli/blob/main/docs/development/adding-agents.md"},{label:"Configuration guide",href:"https://github.com/shep-ai/cli/blob/main/docs/guides/configuration.md"}],children:"Choose which AI coding agent powers your features. Each agent supports different models and capabilities. Authentication is resolved automatically via your active session."})]}),(0,t.jsxs)("div",{id:"section-environment",className:"grid scroll-mt-18 grid-cols-1 gap-x-5 rounded-lg lg:grid-cols-[1fr_280px]",children:[(0,t.jsxs)(tq,{icon:l.Terminal,title:"Environment",description:"Editor, shell, and terminal preferences",testId:"environment-settings-section",children:[(0,t.jsx)(tU,{label:"Default Editor",description:"Editor launched for file operations",htmlFor:"default-editor",children:(0,t.jsxs)(eZ,{value:C,onValueChange:e=>{k(e),b({environment:{defaultEditor:e,shellPreference:I,terminalPreference:N}})},children:[(0,t.jsx)(eQ,{id:"default-editor","data-testid":"editor-select",className:"w-55 cursor-pointer text-xs",children:(0,t.jsx)(eX,{})}),(0,t.jsx)(e1,{children:tV.map(e=>{var n;let r=(n=e.value)&&n in ti?ti[n]:e7;return(0,t.jsx)(e2,{value:e.value,children:(0,t.jsxs)("span",{className:"flex items-center gap-2 text-xs",children:[(0,t.jsx)(r,{className:"h-4 w-4 shrink-0"}),e.label]})},e.value)})})]})}),(0,t.jsx)(tU,{label:"Shell",description:"Default shell for generated scripts",htmlFor:"shell-preference",children:(0,t.jsxs)(eZ,{value:I,onValueChange:e=>{M(e),b({environment:{defaultEditor:C,shellPreference:e,terminalPreference:N}})},children:[(0,t.jsx)(eQ,{id:"shell-preference","data-testid":"shell-select",className:"w-55 cursor-pointer text-xs",children:(0,t.jsx)(eX,{})}),(0,t.jsx)(e1,{children:tW.map(e=>(0,t.jsx)(e2,{value:e.value,children:e.label},e.value))})]})}),(0,t.jsx)(tU,{label:"Terminal",description:"Terminal emulator for shell sessions",htmlFor:"terminal-preference",children:(0,t.jsxs)(eZ,{value:N,onValueChange:e=>{P(e),b({environment:{defaultEditor:C,shellPreference:I,terminalPreference:e}})},children:[(0,t.jsx)(eQ,{id:"terminal-preference","data-testid":"terminal-select",className:"w-55 cursor-pointer text-xs",children:(0,t.jsx)(eX,{})}),(0,t.jsx)(e1,{children:E.map(e=>(0,t.jsx)(e2,{value:e.id,children:e.name},e.id))})]})})]}),(0,t.jsx)(tY,{links:[{label:"Configuration guide",href:"https://github.com/shep-ai/cli/blob/main/docs/guides/configuration.md"}],children:"Your preferred editor opens files for review. The shell setting controls generated scripts. The terminal emulator is launched when opening shell sessions from the web UI."})]}),(0,t.jsxs)("div",{id:"section-workflow",className:"grid scroll-mt-18 grid-cols-1 gap-x-5 rounded-lg lg:grid-cols-[1fr_280px]",children:[(0,t.jsxs)(tq,{icon:o.GitBranch,title:"Workflow",description:"Automation behavior after implementation",testId:"workflow-settings-section",children:[(0,t.jsx)(t$,{children:"Approve"}),(0,t.jsx)(tK,{label:"Auto-approve PRD",description:"Skip manual review of requirements",id:"allow-prd",testId:"switch-allow-prd",checked:L,onChange:e=>{F(e),b(eF({allowPrd:e}))}}),(0,t.jsx)(tK,{label:"Auto-approve Plan",description:"Skip manual review of implementation plan",id:"allow-plan",testId:"switch-allow-plan",checked:H,onChange:e=>{B(e),b(eF({allowPlan:e}))}}),(0,t.jsx)(tK,{label:"Auto-approve Merge",description:"Merge without manual review",id:"allow-merge",testId:"switch-allow-merge",checked:z,onChange:e=>{_(e),b(eF({allowMerge:e}))}}),(0,t.jsx)(t$,{children:"Evidence"}),(0,t.jsx)(tK,{label:"Collect evidence",description:"Capture screenshots and artifacts after implementation",id:"enable-evidence",testId:"switch-enable-evidence",checked:V,onChange:e=>{W(e),e?b(eF({enableEvidence:e})):(U(!1),b(eF({enableEvidence:e,commitEvidence:!1})))}}),(0,t.jsx)(tK,{label:"Add evidence to PR",description:"Include evidence in the pull request body",id:"commit-evidence",testId:"switch-commit-evidence",checked:O,disabled:!V||!R,onChange:e=>{U(e),b(eF({commitEvidence:e}))}}),(0,t.jsx)(t$,{children:"Git"}),(0,t.jsx)(tK,{label:"Push on complete",description:"Push to remote when implementation finishes",id:"push-on-complete",testId:"switch-push-on-complete",checked:A,onChange:e=>{D(e),b(eF({pushOnComplete:e}))}}),(0,t.jsx)(tK,{label:"Open PR on complete",description:"Create a pull request when done",id:"open-pr",testId:"switch-open-pr",checked:R,onChange:e=>{T(e),e?b(eF({openPr:e})):(U(!1),b(eF({openPr:e,commitEvidence:!1})))}}),(0,t.jsx)(tK,{label:"Watch CI after push",description:"Monitor CI and auto-fix failures. Disable to avoid rate limits.",id:"ci-watch-enabled",testId:"switch-ci-watch-enabled",checked:K,onChange:e=>{q(e),b(eF({ciWatchEnabled:e}))}})]}),(0,t.jsx)(tY,{links:[{label:"Approval gates",href:"https://github.com/shep-ai/cli/blob/main/specs/016-hitl-approval-gates/spec.yaml"},{label:"Push & PR flags",href:"https://github.com/shep-ai/cli/blob/main/specs/037-feature-pr-push-flags/spec.yaml"}],children:"Control how autonomous each feature run is. Auto-approve skips the human review pause at each phase. Push and PR options control what happens after successful implementation."})]}),(0,t.jsxs)("div",{id:"section-ci",className:"grid scroll-mt-18 grid-cols-1 gap-x-5 rounded-lg lg:grid-cols-[1fr_280px]",children:[(0,t.jsxs)(tq,{icon:s,title:"Continuous Integration",description:"Limits and timeouts for CI monitoring",testId:"ci-settings-section",children:[(0,t.jsx)(tU,{label:"Max fix attempts",description:"Agent retries on failing CI",htmlFor:"ci-max-fix",children:(0,t.jsx)(tG,{id:"ci-max-fix",testId:"ci-max-fix-input",placeholder:"3",value:G,onChange:$,onBlur:()=>{G!==ej&&b(eF({ciMaxFix:G}))},min:1,max:10})}),(0,t.jsx)(tU,{label:"Watch timeout",description:"Max wait for CI completion",htmlFor:"ci-timeout",children:(0,t.jsx)(tG,{id:"ci-timeout",testId:"ci-timeout-input",placeholder:"300",value:Y,onChange:Z,onBlur:()=>{Y!==eC&&b(eF({ciTimeout:Y}))},min:30,step:30,suffix:"sec"})}),(0,t.jsx)(tU,{label:"Max log size",description:"Truncate CI logs beyond this limit",htmlFor:"ci-log-max",children:(0,t.jsx)(tG,{id:"ci-log-max",testId:"ci-log-max-input",placeholder:"50000",value:X,onChange:Q,onBlur:()=>{X!==ek&&b(eF({ciLogMax:X}))},min:1e3,step:5e3,suffix:"chars"})}),(0,t.jsx)(tU,{label:"Poll interval",description:"How often to check GitHub for CI status updates",htmlFor:"ci-poll-interval",children:(0,t.jsx)(tG,{id:"ci-poll-interval",testId:"ci-poll-interval-input",placeholder:"30",value:J,onChange:ee,onBlur:()=>{J!==eI&&b(eF({ciPollInterval:J}))},min:5,step:5,suffix:"sec"})})]}),(0,t.jsx)(tY,{links:[{label:"CI/CD pipeline",href:"https://github.com/shep-ai/cli/blob/main/docs/development/cicd.md"},{label:"CI security gates",href:"https://github.com/shep-ai/cli/blob/main/specs/003-cicd-security-gates/spec.md"}],children:"When a feature completes, the agent can watch CI and auto-fix failures. These limits prevent runaway retries and control how much log output is sent to the agent for analysis."})]}),(0,t.jsxs)("div",{id:"section-stage-timeouts",className:"grid scroll-mt-18 grid-cols-1 gap-x-5 rounded-lg lg:grid-cols-[1fr_280px]",children:[(0,t.jsxs)(tq,{icon:g.Timer,title:"Stage Timeouts",description:"Maximum execution time per agent stage",testId:"stage-timeouts-settings-section",children:[(0,t.jsx)(t$,{children:"Feature Agent"}),(0,t.jsx)(tU,{label:"Analyze",description:"Repository analysis timeout",htmlFor:"timeout-analyze",children:(0,t.jsx)(t_,{id:"timeout-analyze",testId:"timeout-analyze-input",value:en,onChange:er,onBlur:()=>{en!==eM&&b(eF({analyzeTimeout:en}))},defaultSeconds:1800})}),(0,t.jsx)(tU,{label:"Requirements",description:"Requirements gathering timeout",htmlFor:"timeout-requirements",children:(0,t.jsx)(t_,{id:"timeout-requirements",testId:"timeout-requirements-input",value:ea,onChange:ei,onBlur:()=>{ea!==eN&&b(eF({requirementsTimeout:ea}))},defaultSeconds:1800})}),(0,t.jsx)(tU,{label:"Research",description:"Technical research timeout",htmlFor:"timeout-research",children:(0,t.jsx)(t_,{id:"timeout-research",testId:"timeout-research-input",value:el,onChange:eo,onBlur:()=>{el!==eP&&b(eF({researchTimeout:el}))},defaultSeconds:1800})}),(0,t.jsx)(tU,{label:"Plan",description:"Implementation planning timeout",htmlFor:"timeout-plan",children:(0,t.jsx)(t_,{id:"timeout-plan",testId:"timeout-plan-input",value:es,onChange:ed,onBlur:()=>{es!==eE&&b(eF({planTimeout:es}))},defaultSeconds:1800})}),(0,t.jsx)(tU,{label:"Implement",description:"Code implementation timeout",htmlFor:"timeout-implement",children:(0,t.jsx)(t_,{id:"timeout-implement",testId:"timeout-implement-input",value:ec,onChange:eu,onBlur:()=>{ec!==eR&&b(eF({implementTimeout:ec}))},defaultSeconds:1800})}),(0,t.jsx)(tU,{label:"Merge",description:"PR creation and merge timeout",htmlFor:"timeout-merge",children:(0,t.jsx)(t_,{id:"timeout-merge",testId:"timeout-merge-input",value:ep,onChange:em,onBlur:()=>{ep!==eT&&b(eF({mergeTimeout:ep}))},defaultSeconds:1800})}),(0,t.jsx)(t$,{children:"Analyze Repository Agent"}),(0,t.jsx)(tU,{label:"Analyze",description:"Repository analysis timeout",htmlFor:"timeout-analyze-repo",children:(0,t.jsx)(t_,{id:"timeout-analyze-repo",testId:"timeout-analyze-repo-input",value:ef,onChange:eg,onBlur:()=>{ef!==eA&&b(eF({analyzeRepoTimeout:ef}))},defaultSeconds:600})})]}),(0,t.jsx)(tY,{children:"Each agent has independently configurable stage timeouts. When a stage exceeds its timeout, the agent is terminated. Longer timeouts are useful for complex implementations. Feature agent defaults to 30 minutes per stage. Analyze repository agent defaults to 10 minutes."})]}),(0,t.jsxs)("div",{id:"section-notifications",className:"grid scroll-mt-18 grid-cols-1 gap-x-5 rounded-lg lg:grid-cols-[1fr_280px]",children:[(0,t.jsxs)(tq,{icon:d,title:"Notifications",description:"How and when you get notified",testId:"notification-settings-section",children:[(0,t.jsx)(t$,{children:"Channels"}),(0,t.jsx)(tK,{label:"In-app",description:"Notifications inside the Shep UI",id:"notif-in-app",testId:"switch-in-app",checked:ex,onChange:e=>{ev(e),b(eH({inApp:e}))}}),(0,t.jsx)(t$,{children:"Agent Events"}),(0,t.jsx)(tK,{label:"Agent started",id:"notif-event-agentStarted",testId:"switch-event-agentStarted",checked:ew.agentStarted,onChange:e=>{let t={...ew,agentStarted:e};eb(t),b(eH({events:t}))}}),(0,t.jsx)(tK,{label:"Phase completed",id:"notif-event-phaseCompleted",testId:"switch-event-phaseCompleted",checked:ew.phaseCompleted,onChange:e=>{let t={...ew,phaseCompleted:e};eb(t),b(eH({events:t}))}}),(0,t.jsx)(tK,{label:"Waiting approval",id:"notif-event-waitingApproval",testId:"switch-event-waitingApproval",checked:ew.waitingApproval,onChange:e=>{let t={...ew,waitingApproval:e};eb(t),b(eH({events:t}))}}),(0,t.jsx)(tK,{label:"Agent completed",id:"notif-event-agentCompleted",testId:"switch-event-agentCompleted",checked:ew.agentCompleted,onChange:e=>{let t={...ew,agentCompleted:e};eb(t),b(eH({events:t}))}}),(0,t.jsx)(tK,{label:"Agent failed",id:"notif-event-agentFailed",testId:"switch-event-agentFailed",checked:ew.agentFailed,onChange:e=>{let t={...ew,agentFailed:e};eb(t),b(eH({events:t}))}}),(0,t.jsx)(t$,{children:"Pull Request Events"}),(0,t.jsx)(tK,{label:"PR merged",id:"notif-event-prMerged",testId:"switch-event-prMerged",checked:ew.prMerged,onChange:e=>{let t={...ew,prMerged:e};eb(t),b(eH({events:t}))}}),(0,t.jsx)(tK,{label:"PR closed",id:"notif-event-prClosed",testId:"switch-event-prClosed",checked:ew.prClosed,onChange:e=>{let t={...ew,prClosed:e};eb(t),b(eH({events:t}))}}),(0,t.jsx)(tK,{label:"PR checks passed",id:"notif-event-prChecksPassed",testId:"switch-event-prChecksPassed",checked:ew.prChecksPassed,onChange:e=>{let t={...ew,prChecksPassed:e};eb(t),b(eH({events:t}))}}),(0,t.jsx)(tK,{label:"PR checks failed",id:"notif-event-prChecksFailed",testId:"switch-event-prChecksFailed",checked:ew.prChecksFailed,onChange:e=>{let t={...ew,prChecksFailed:e};eb(t),b(eH({events:t}))}}),(0,t.jsx)(tK,{label:"PR blocked",id:"notif-event-prBlocked",testId:"switch-event-prBlocked",checked:ew.prBlocked,onChange:e=>{let t={...ew,prBlocked:e};eb(t),b(eH({events:t}))}}),(0,t.jsx)(tK,{label:"Merge review ready",id:"notif-event-mergeReviewReady",testId:"switch-event-mergeReviewReady",checked:ew.mergeReviewReady,onChange:e=>{let t={...ew,mergeReviewReady:e};eb(t),b(eH({events:t}))}})]}),(0,t.jsx)(tY,{links:[{label:"Notification system",href:"https://github.com/shep-ai/cli/blob/main/specs/021-agent-notifications/spec.yaml"}],children:"In-app toast notifications keep you in the loop. Fine-tune which agent lifecycle events trigger a notification."})]}),(0,t.jsxs)("div",{id:"section-feature-flags",className:"grid scroll-mt-18 grid-cols-1 gap-x-5 rounded-lg lg:grid-cols-[1fr_280px]",children:[(0,t.jsxs)(tq,{icon:c,title:"Feature Flags",description:"Enable or disable experimental features",badge:"Experimental",testId:"feature-flags-settings-section",children:[(0,t.jsx)(tK,{label:"Skills",description:"Enable the skills system for agent capabilities",id:"flag-skills",testId:"switch-flag-skills",checked:ey.skills,onChange:e=>{let t={...ey,skills:e};eS(t),b({featureFlags:t})}}),(0,t.jsx)(tK,{label:"Deployments",description:"Enable environment deployment workflows",id:"flag-envDeploy",testId:"switch-flag-envDeploy",checked:ey.envDeploy,onChange:e=>{let t={...ey,envDeploy:e};eS(t),b({featureFlags:t})}}),(0,t.jsx)(tK,{label:"Debug",description:"Show debug panels and verbose logging",id:"flag-debug",testId:"switch-flag-debug",checked:ey.debug,onChange:e=>{let t={...ey,debug:e};eS(t),b({featureFlags:t})}}),(0,t.jsx)(tK,{label:"GitHub Import",description:"Enable GitHub repository import in the web UI",id:"flag-githubImport",testId:"switch-flag-githubImport",checked:ey.githubImport,onChange:e=>{let t={...ey,githubImport:e};eS(t),b({featureFlags:t})}}),(0,t.jsx)(tK,{label:"Adopt Branch",description:"Import existing branches as tracked features",id:"flag-adoptBranch",testId:"switch-flag-adoptBranch",checked:ey.adoptBranch,onChange:e=>{let t={...ey,adoptBranch:e};eS(t),b({featureFlags:t})}})]}),(0,t.jsx)(tY,{children:"Experimental features that are still under development. Enable at your own risk — they may change or be removed in future versions. Debug mode adds verbose logging useful for troubleshooting."})]}),(0,t.jsxs)("div",{id:"section-database",className:"grid scroll-mt-18 grid-cols-1 gap-x-5 rounded-lg lg:grid-cols-[1fr_280px]",children:[(0,t.jsxs)(tq,{icon:u,title:"Database",description:"Local storage information",testId:"database-settings-section",children:[(0,t.jsx)(tU,{label:"Location",description:"Path to the local SQLite database",children:(0,t.jsx)("span",{className:"text-muted-foreground max-w-50 truncate font-mono text-xs","data-testid":"shep-home-path",children:a})}),(0,t.jsx)(tU,{label:"Size",children:(0,t.jsx)("span",{className:"text-muted-foreground text-xs","data-testid":"db-file-size",children:p})})]}),(0,t.jsx)(tY,{links:[{label:"Settings service",href:"https://github.com/shep-ai/cli/blob/main/docs/architecture/settings-service.md"},{label:"Settings spec",href:"https://github.com/shep-ai/cli/blob/main/specs/005-global-settings-service/spec.md"}],children:"All settings are stored in a local SQLite database at ~/.shep/data. The database uses a singleton record pattern with automatic migrations on startup."})]})]})]})}e.s(["SettingsPageClient",()=>tZ],41952)}]);
1
+ (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,41952,e=>{"use strict";var t=e.i(20314),n=e.i(79054),r=e.i(23925),a=e.i(3645);let i=(0,a.default)("bot",[["path",{d:"M12 8V4H8",key:"hb8ula"}],["rect",{width:"16",height:"12",x:"4",y:"8",rx:"2",key:"enze0r"}],["path",{d:"M2 14h2",key:"vft8re"}],["path",{d:"M20 14h2",key:"4cs60a"}],["path",{d:"M15 13v2",key:"1xurst"}],["path",{d:"M9 13v2",key:"rq6x2g"}]]);var l=e.i(38573),o=e.i(49228);let s=(0,a.default)("activity",[["path",{d:"M22 12h-2.48a2 2 0 0 0-1.93 1.46l-2.35 8.36a.25.25 0 0 1-.48 0L9.24 2.18a.25.25 0 0 0-.48 0l-2.35 8.36A2 2 0 0 1 4.49 12H2",key:"169zse"}]]),d=(0,a.default)("bell",[["path",{d:"M10.268 21a2 2 0 0 0 3.464 0",key:"vwvbt9"}],["path",{d:"M3.262 15.326A1 1 0 0 0 4 17h16a1 1 0 0 0 .74-1.673C19.41 13.956 18 12.499 18 8A6 6 0 0 0 6 8c0 4.499-1.411 5.956-2.738 7.326",key:"11g9vi"}]]),c=(0,a.default)("flag",[["path",{d:"M4 22V4a1 1 0 0 1 .4-.8A6 6 0 0 1 8 2c3 0 5 2 7.333 2q2 0 3.067-.8A1 1 0 0 1 20 4v10a1 1 0 0 1-.4.8A6 6 0 0 1 16 16c-3 0-5-2-8-2a6 6 0 0 0-4 1.528",key:"1jaruq"}]]),u=(0,a.default)("database",[["ellipse",{cx:"12",cy:"5",rx:"9",ry:"3",key:"msslwz"}],["path",{d:"M3 5V19A9 3 0 0 0 21 19V5",key:"1wlel7"}],["path",{d:"M3 12A9 3 0 0 0 21 12",key:"mv7ke4"}]]);var p=e.i(10714),p=p,m=e.i(3214),h=e.i(30702);let f=(0,a.default)("settings-2",[["path",{d:"M14 17H5",key:"gfn3mx"}],["path",{d:"M19 7h-9",key:"6i9tg"}],["circle",{cx:"17",cy:"17",r:"3",key:"18b49y"}],["circle",{cx:"7",cy:"7",r:"3",key:"dfmy0x"}]]);var g=e.i(58860),x=e.i(60112),v=e.i(31777),w=e.i(41957),b=e.i(51911),y=e.i(26036),S=e.i(27069),j=e.i(91967),C=e.i(87342),k=e.i(5978),I=e.i(22528),M=e.i(66033),N=e.i(53532),P=e.i(41687),E=e.i(56720),R=e.i(13123),T=e.i(52740),A=e.i(39979),D=e.i(87620),L=e.i(86874),F=e.i(29297),H=e.i(36589),B=e.i(5192),z=e.i(23405),_=e.i(1693),V=e.i(73772),W=e.i(13044),O=[" ","Enter","ArrowUp","ArrowDown"],U=[" ","Enter"],K="Select",[q,G,$]=(0,C.createCollection)(K),[Y,Z]=(0,I.createContextScope)(K,[$,T.createPopperScope]),X=(0,T.createPopperScope)(),[Q,J]=Y(K),[ee,et]=Y(K),en=e=>{let{__scopeSelect:r,children:a,open:i,defaultOpen:l,onOpenChange:o,value:s,defaultValue:d,onValueChange:c,dir:u,name:p,autoComplete:m,disabled:h,required:f,form:g}=e,x=X(r),[v,w]=n.useState(null),[b,y]=n.useState(null),[S,j]=n.useState(!1),C=(0,M.useDirection)(u),[k,I]=(0,H.useControllableState)({prop:i,defaultProp:l??!1,onChange:o,caller:K}),[N,P]=(0,H.useControllableState)({prop:s,defaultProp:d,onChange:c,caller:K}),E=n.useRef(null),A=!v||g||!!v.closest("form"),[D,L]=n.useState(new Set),F=Array.from(D).map(e=>e.props.value).join(";");return(0,t.jsx)(T.Root,{...x,children:(0,t.jsxs)(Q,{required:f,scope:r,trigger:v,onTriggerChange:w,valueNode:b,onValueNodeChange:y,valueNodeHasChildren:S,onValueNodeHasChildrenChange:j,contentId:(0,R.useId)(),value:N,onValueChange:P,open:k,onOpenChange:I,dir:C,triggerPointerDownPosRef:E,disabled:h,children:[(0,t.jsx)(q.Provider,{scope:r,children:(0,t.jsx)(ee,{scope:e.__scopeSelect,onNativeOptionAdd:n.useCallback(e=>{L(t=>new Set(t).add(e))},[]),onNativeOptionRemove:n.useCallback(e=>{L(t=>{let n=new Set(t);return n.delete(e),n})},[]),children:a})}),A?(0,t.jsxs)(eO,{"aria-hidden":!0,required:f,tabIndex:-1,name:p,autoComplete:m,value:N,onChange:e=>P(e.target.value),disabled:h,form:g,children:[void 0===N?(0,t.jsx)("option",{value:""}):null,Array.from(D)]},F):null]})})};en.displayName=K;var er="SelectTrigger",ea=n.forwardRef((e,r)=>{let{__scopeSelect:a,disabled:i=!1,...l}=e,o=X(a),s=J(er,a),d=s.disabled||i,c=(0,k.useComposedRefs)(r,s.onTriggerChange),u=G(a),p=n.useRef("touch"),[m,h,f]=eK(e=>{let t=u().filter(e=>!e.disabled),n=t.find(e=>e.value===s.value),r=eq(t,e,n);void 0!==r&&s.onValueChange(r.value)}),g=e=>{d||(s.onOpenChange(!0),f()),e&&(s.triggerPointerDownPosRef.current={x:Math.round(e.pageX),y:Math.round(e.pageY)})};return(0,t.jsx)(T.Anchor,{asChild:!0,...o,children:(0,t.jsx)(D.Primitive.button,{type:"button",role:"combobox","aria-controls":s.contentId,"aria-expanded":s.open,"aria-required":s.required,"aria-autocomplete":"none",dir:s.dir,"data-state":s.open?"open":"closed",disabled:d,"data-disabled":d?"":void 0,"data-placeholder":eU(s.value)?"":void 0,...l,ref:c,onClick:(0,j.composeEventHandlers)(l.onClick,e=>{e.currentTarget.focus(),"mouse"!==p.current&&g(e)}),onPointerDown:(0,j.composeEventHandlers)(l.onPointerDown,e=>{p.current=e.pointerType;let t=e.target;t.hasPointerCapture(e.pointerId)&&t.releasePointerCapture(e.pointerId),0===e.button&&!1===e.ctrlKey&&"mouse"===e.pointerType&&(g(e),e.preventDefault())}),onKeyDown:(0,j.composeEventHandlers)(l.onKeyDown,e=>{let t=""!==m.current;e.ctrlKey||e.altKey||e.metaKey||1!==e.key.length||h(e.key),(!t||" "!==e.key)&&O.includes(e.key)&&(g(),e.preventDefault())})})})});ea.displayName=er;var ei="SelectValue",el=n.forwardRef((e,n)=>{let{__scopeSelect:r,className:a,style:i,children:l,placeholder:o="",...s}=e,d=J(ei,r),{onValueNodeHasChildrenChange:c}=d,u=void 0!==l,p=(0,k.useComposedRefs)(n,d.onValueNodeChange);return(0,B.useLayoutEffect)(()=>{c(u)},[c,u]),(0,t.jsx)(D.Primitive.span,{...s,ref:p,style:{pointerEvents:"none"},children:eU(d.value)?(0,t.jsx)(t.Fragment,{children:o}):l})});el.displayName=ei;var eo=n.forwardRef((e,n)=>{let{__scopeSelect:r,children:a,...i}=e;return(0,t.jsx)(D.Primitive.span,{"aria-hidden":!0,...i,ref:n,children:a||"▼"})});eo.displayName="SelectIcon";var es=e=>(0,t.jsx)(A.Portal,{asChild:!0,...e});es.displayName="SelectPortal";var ed="SelectContent",ec=n.forwardRef((e,r)=>{let a=J(ed,e.__scopeSelect),[i,l]=n.useState();return((0,B.useLayoutEffect)(()=>{l(new DocumentFragment)},[]),a.open)?(0,t.jsx)(eh,{...e,ref:r}):i?y.createPortal((0,t.jsx)(eu,{scope:e.__scopeSelect,children:(0,t.jsx)(q.Slot,{scope:e.__scopeSelect,children:(0,t.jsx)("div",{children:e.children})})}),i):null});ec.displayName=ed;var[eu,ep]=Y(ed),em=(0,L.createSlot)("SelectContent.RemoveScroll"),eh=n.forwardRef((e,r)=>{let{__scopeSelect:a,position:i="item-aligned",onCloseAutoFocus:l,onEscapeKeyDown:o,onPointerDownOutside:s,side:d,sideOffset:c,align:u,alignOffset:p,arrowPadding:m,collisionBoundary:h,collisionPadding:f,sticky:g,hideWhenDetached:x,avoidCollisions:v,...w}=e,b=J(ed,a),[y,S]=n.useState(null),[C,I]=n.useState(null),M=(0,k.useComposedRefs)(r,e=>S(e)),[R,T]=n.useState(null),[A,D]=n.useState(null),L=G(a),[F,H]=n.useState(!1),B=n.useRef(!1);n.useEffect(()=>{if(y)return(0,V.hideOthers)(y)},[y]),(0,P.useFocusGuards)();let z=n.useCallback(e=>{let[t,...n]=L().map(e=>e.ref.current),[r]=n.slice(-1),a=document.activeElement;for(let n of e)if(n===a||(n?.scrollIntoView({block:"nearest"}),n===t&&C&&(C.scrollTop=0),n===r&&C&&(C.scrollTop=C.scrollHeight),n?.focus(),document.activeElement!==a))return},[L,C]),_=n.useCallback(()=>z([R,y]),[z,R,y]);n.useEffect(()=>{F&&_()},[F,_]);let{onOpenChange:O,triggerPointerDownPosRef:U}=b;n.useEffect(()=>{if(y){let e={x:0,y:0},t=t=>{e={x:Math.abs(Math.round(t.pageX)-(U.current?.x??0)),y:Math.abs(Math.round(t.pageY)-(U.current?.y??0))}},n=n=>{e.x<=10&&e.y<=10?n.preventDefault():y.contains(n.target)||O(!1),document.removeEventListener("pointermove",t),U.current=null};return null!==U.current&&(document.addEventListener("pointermove",t),document.addEventListener("pointerup",n,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",t),document.removeEventListener("pointerup",n,{capture:!0})}}},[y,O,U]),n.useEffect(()=>{let e=()=>O(!1);return window.addEventListener("blur",e),window.addEventListener("resize",e),()=>{window.removeEventListener("blur",e),window.removeEventListener("resize",e)}},[O]);let[K,q]=eK(e=>{let t=L().filter(e=>!e.disabled),n=t.find(e=>e.ref.current===document.activeElement),r=eq(t,e,n);r&&setTimeout(()=>r.ref.current.focus())}),$=n.useCallback((e,t,n)=>{let r=!B.current&&!n;(void 0!==b.value&&b.value===t||r)&&(T(e),r&&(B.current=!0))},[b.value]),Y=n.useCallback(()=>y?.focus(),[y]),Z=n.useCallback((e,t,n)=>{let r=!B.current&&!n;(void 0!==b.value&&b.value===t||r)&&D(e)},[b.value]),X="popper"===i?eg:ef,Q=X===eg?{side:d,sideOffset:c,align:u,alignOffset:p,arrowPadding:m,collisionBoundary:h,collisionPadding:f,sticky:g,hideWhenDetached:x,avoidCollisions:v}:{};return(0,t.jsx)(eu,{scope:a,content:y,viewport:C,onViewportChange:I,itemRefCallback:$,selectedItem:R,onItemLeave:Y,itemTextRefCallback:Z,focusSelectedItem:_,selectedItemText:A,position:i,isPositioned:F,searchRef:K,children:(0,t.jsx)(W.RemoveScroll,{as:em,allowPinchZoom:!0,children:(0,t.jsx)(E.FocusScope,{asChild:!0,trapped:b.open,onMountAutoFocus:e=>{e.preventDefault()},onUnmountAutoFocus:(0,j.composeEventHandlers)(l,e=>{b.trigger?.focus({preventScroll:!0}),e.preventDefault()}),children:(0,t.jsx)(N.DismissableLayer,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:o,onPointerDownOutside:s,onFocusOutside:e=>e.preventDefault(),onDismiss:()=>b.onOpenChange(!1),children:(0,t.jsx)(X,{role:"listbox",id:b.contentId,"data-state":b.open?"open":"closed",dir:b.dir,onContextMenu:e=>e.preventDefault(),...w,...Q,onPlaced:()=>H(!0),ref:M,style:{display:"flex",flexDirection:"column",outline:"none",...w.style},onKeyDown:(0,j.composeEventHandlers)(w.onKeyDown,e=>{let t=e.ctrlKey||e.altKey||e.metaKey;if("Tab"===e.key&&e.preventDefault(),t||1!==e.key.length||q(e.key),["ArrowUp","ArrowDown","Home","End"].includes(e.key)){let t=L().filter(e=>!e.disabled).map(e=>e.ref.current);if(["ArrowUp","End"].includes(e.key)&&(t=t.slice().reverse()),["ArrowUp","ArrowDown"].includes(e.key)){let n=e.target,r=t.indexOf(n);t=t.slice(r+1)}setTimeout(()=>z(t)),e.preventDefault()}})})})})})})});eh.displayName="SelectContentImpl";var ef=n.forwardRef((e,r)=>{let{__scopeSelect:a,onPlaced:i,...l}=e,o=J(ed,a),s=ep(ed,a),[d,c]=n.useState(null),[u,p]=n.useState(null),m=(0,k.useComposedRefs)(r,e=>p(e)),h=G(a),f=n.useRef(!1),g=n.useRef(!0),{viewport:x,selectedItem:v,selectedItemText:w,focusSelectedItem:b}=s,y=n.useCallback(()=>{if(o.trigger&&o.valueNode&&d&&u&&x&&v&&w){let e=o.trigger.getBoundingClientRect(),t=u.getBoundingClientRect(),n=o.valueNode.getBoundingClientRect(),r=w.getBoundingClientRect();if("rtl"!==o.dir){let a=r.left-t.left,i=n.left-a,l=e.left-i,o=e.width+l,s=Math.max(o,t.width),c=window.innerWidth-10,u=(0,S.clamp)(i,[10,Math.max(10,c-s)]);d.style.minWidth=o+"px",d.style.left=u+"px"}else{let a=t.right-r.right,i=window.innerWidth-n.right-a,l=window.innerWidth-e.right-i,o=e.width+l,s=Math.max(o,t.width),c=window.innerWidth-10,u=(0,S.clamp)(i,[10,Math.max(10,c-s)]);d.style.minWidth=o+"px",d.style.right=u+"px"}let a=h(),l=window.innerHeight-20,s=x.scrollHeight,c=window.getComputedStyle(u),p=parseInt(c.borderTopWidth,10),m=parseInt(c.paddingTop,10),g=parseInt(c.borderBottomWidth,10),b=p+m+s+parseInt(c.paddingBottom,10)+g,y=Math.min(5*v.offsetHeight,b),j=window.getComputedStyle(x),C=parseInt(j.paddingTop,10),k=parseInt(j.paddingBottom,10),I=e.top+e.height/2-10,M=v.offsetHeight/2,N=p+m+(v.offsetTop+M);if(N<=I){let e=a.length>0&&v===a[a.length-1].ref.current;d.style.bottom="0px";let t=Math.max(l-I,M+(e?k:0)+(u.clientHeight-x.offsetTop-x.offsetHeight)+g);d.style.height=N+t+"px"}else{let e=a.length>0&&v===a[0].ref.current;d.style.top="0px";let t=Math.max(I,p+x.offsetTop+(e?C:0)+M);d.style.height=t+(b-N)+"px",x.scrollTop=N-I+x.offsetTop}d.style.margin="10px 0",d.style.minHeight=y+"px",d.style.maxHeight=l+"px",i?.(),requestAnimationFrame(()=>f.current=!0)}},[h,o.trigger,o.valueNode,d,u,x,v,w,o.dir,i]);(0,B.useLayoutEffect)(()=>y(),[y]);let[j,C]=n.useState();(0,B.useLayoutEffect)(()=>{u&&C(window.getComputedStyle(u).zIndex)},[u]);let I=n.useCallback(e=>{e&&!0===g.current&&(y(),b?.(),g.current=!1)},[y,b]);return(0,t.jsx)(ex,{scope:a,contentWrapper:d,shouldExpandOnScrollRef:f,onScrollButtonChange:I,children:(0,t.jsx)("div",{ref:c,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:j},children:(0,t.jsx)(D.Primitive.div,{...l,ref:m,style:{boxSizing:"border-box",maxHeight:"100%",...l.style}})})})});ef.displayName="SelectItemAlignedPosition";var eg=n.forwardRef((e,n)=>{let{__scopeSelect:r,align:a="start",collisionPadding:i=10,...l}=e,o=X(r);return(0,t.jsx)(T.Content,{...o,...l,ref:n,align:a,collisionPadding:i,style:{boxSizing:"border-box",...l.style,"--radix-select-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-select-content-available-width":"var(--radix-popper-available-width)","--radix-select-content-available-height":"var(--radix-popper-available-height)","--radix-select-trigger-width":"var(--radix-popper-anchor-width)","--radix-select-trigger-height":"var(--radix-popper-anchor-height)"}})});eg.displayName="SelectPopperPosition";var[ex,ev]=Y(ed,{}),ew="SelectViewport",eb=n.forwardRef((e,r)=>{let{__scopeSelect:a,nonce:i,...l}=e,o=ep(ew,a),s=ev(ew,a),d=(0,k.useComposedRefs)(r,o.onViewportChange),c=n.useRef(0);return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("style",{dangerouslySetInnerHTML:{__html:"[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}"},nonce:i}),(0,t.jsx)(q.Slot,{scope:a,children:(0,t.jsx)(D.Primitive.div,{"data-radix-select-viewport":"",role:"presentation",...l,ref:d,style:{position:"relative",flex:1,overflow:"hidden auto",...l.style},onScroll:(0,j.composeEventHandlers)(l.onScroll,e=>{let t=e.currentTarget,{contentWrapper:n,shouldExpandOnScrollRef:r}=s;if(r?.current&&n){let e=Math.abs(c.current-t.scrollTop);if(e>0){let r=window.innerHeight-20,a=Math.max(parseFloat(n.style.minHeight),parseFloat(n.style.height));if(a<r){let i=a+e,l=Math.min(r,i),o=i-l;n.style.height=l+"px","0px"===n.style.bottom&&(t.scrollTop=o>0?o:0,n.style.justifyContent="flex-end")}}}c.current=t.scrollTop})})})]})});eb.displayName=ew;var ey="SelectGroup",[eS,ej]=Y(ey),eC=n.forwardRef((e,n)=>{let{__scopeSelect:r,...a}=e,i=(0,R.useId)();return(0,t.jsx)(eS,{scope:r,id:i,children:(0,t.jsx)(D.Primitive.div,{role:"group","aria-labelledby":i,...a,ref:n})})});eC.displayName=ey;var ek="SelectLabel",eI=n.forwardRef((e,n)=>{let{__scopeSelect:r,...a}=e,i=ej(ek,r);return(0,t.jsx)(D.Primitive.div,{id:i.id,...a,ref:n})});eI.displayName=ek;var eM="SelectItem",[eN,eP]=Y(eM),eE=n.forwardRef((e,r)=>{let{__scopeSelect:a,value:i,disabled:l=!1,textValue:o,...s}=e,d=J(eM,a),c=ep(eM,a),u=d.value===i,[p,m]=n.useState(o??""),[h,f]=n.useState(!1),g=(0,k.useComposedRefs)(r,e=>c.itemRefCallback?.(e,i,l)),x=(0,R.useId)(),v=n.useRef("touch"),w=()=>{l||(d.onValueChange(i),d.onOpenChange(!1))};if(""===i)throw Error("A <Select.Item /> must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder.");return(0,t.jsx)(eN,{scope:a,value:i,disabled:l,textId:x,isSelected:u,onItemTextChange:n.useCallback(e=>{m(t=>t||(e?.textContent??"").trim())},[]),children:(0,t.jsx)(q.ItemSlot,{scope:a,value:i,disabled:l,textValue:p,children:(0,t.jsx)(D.Primitive.div,{role:"option","aria-labelledby":x,"data-highlighted":h?"":void 0,"aria-selected":u&&h,"data-state":u?"checked":"unchecked","aria-disabled":l||void 0,"data-disabled":l?"":void 0,tabIndex:l?void 0:-1,...s,ref:g,onFocus:(0,j.composeEventHandlers)(s.onFocus,()=>f(!0)),onBlur:(0,j.composeEventHandlers)(s.onBlur,()=>f(!1)),onClick:(0,j.composeEventHandlers)(s.onClick,()=>{"mouse"!==v.current&&w()}),onPointerUp:(0,j.composeEventHandlers)(s.onPointerUp,()=>{"mouse"===v.current&&w()}),onPointerDown:(0,j.composeEventHandlers)(s.onPointerDown,e=>{v.current=e.pointerType}),onPointerMove:(0,j.composeEventHandlers)(s.onPointerMove,e=>{v.current=e.pointerType,l?c.onItemLeave?.():"mouse"===v.current&&e.currentTarget.focus({preventScroll:!0})}),onPointerLeave:(0,j.composeEventHandlers)(s.onPointerLeave,e=>{e.currentTarget===document.activeElement&&c.onItemLeave?.()}),onKeyDown:(0,j.composeEventHandlers)(s.onKeyDown,e=>{(c.searchRef?.current===""||" "!==e.key)&&(U.includes(e.key)&&w()," "===e.key&&e.preventDefault())})})})})});eE.displayName=eM;var eR="SelectItemText",eT=n.forwardRef((e,r)=>{let{__scopeSelect:a,className:i,style:l,...o}=e,s=J(eR,a),d=ep(eR,a),c=eP(eR,a),u=et(eR,a),[p,m]=n.useState(null),h=(0,k.useComposedRefs)(r,e=>m(e),c.onItemTextChange,e=>d.itemTextRefCallback?.(e,c.value,c.disabled)),f=p?.textContent,g=n.useMemo(()=>(0,t.jsx)("option",{value:c.value,disabled:c.disabled,children:f},c.value),[c.disabled,c.value,f]),{onNativeOptionAdd:x,onNativeOptionRemove:v}=u;return(0,B.useLayoutEffect)(()=>(x(g),()=>v(g)),[x,v,g]),(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(D.Primitive.span,{id:c.textId,...o,ref:h}),c.isSelected&&s.valueNode&&!s.valueNodeHasChildren?y.createPortal(o.children,s.valueNode):null]})});eT.displayName=eR;var eA="SelectItemIndicator",eD=n.forwardRef((e,n)=>{let{__scopeSelect:r,...a}=e;return eP(eA,r).isSelected?(0,t.jsx)(D.Primitive.span,{"aria-hidden":!0,...a,ref:n}):null});eD.displayName=eA;var eL="SelectScrollUpButton",eF=n.forwardRef((e,r)=>{let a=ep(eL,e.__scopeSelect),i=ev(eL,e.__scopeSelect),[l,o]=n.useState(!1),s=(0,k.useComposedRefs)(r,i.onScrollButtonChange);return(0,B.useLayoutEffect)(()=>{if(a.viewport&&a.isPositioned){let e=function(){o(t.scrollTop>0)},t=a.viewport;return e(),t.addEventListener("scroll",e),()=>t.removeEventListener("scroll",e)}},[a.viewport,a.isPositioned]),l?(0,t.jsx)(ez,{...e,ref:s,onAutoScroll:()=>{let{viewport:e,selectedItem:t}=a;e&&t&&(e.scrollTop=e.scrollTop-t.offsetHeight)}}):null});eF.displayName=eL;var eH="SelectScrollDownButton",eB=n.forwardRef((e,r)=>{let a=ep(eH,e.__scopeSelect),i=ev(eH,e.__scopeSelect),[l,o]=n.useState(!1),s=(0,k.useComposedRefs)(r,i.onScrollButtonChange);return(0,B.useLayoutEffect)(()=>{if(a.viewport&&a.isPositioned){let e=function(){let e=t.scrollHeight-t.clientHeight;o(Math.ceil(t.scrollTop)<e)},t=a.viewport;return e(),t.addEventListener("scroll",e),()=>t.removeEventListener("scroll",e)}},[a.viewport,a.isPositioned]),l?(0,t.jsx)(ez,{...e,ref:s,onAutoScroll:()=>{let{viewport:e,selectedItem:t}=a;e&&t&&(e.scrollTop=e.scrollTop+t.offsetHeight)}}):null});eB.displayName=eH;var ez=n.forwardRef((e,r)=>{let{__scopeSelect:a,onAutoScroll:i,...l}=e,o=ep("SelectScrollButton",a),s=n.useRef(null),d=G(a),c=n.useCallback(()=>{null!==s.current&&(window.clearInterval(s.current),s.current=null)},[]);return n.useEffect(()=>()=>c(),[c]),(0,B.useLayoutEffect)(()=>{let e=d().find(e=>e.ref.current===document.activeElement);e?.ref.current?.scrollIntoView({block:"nearest"})},[d]),(0,t.jsx)(D.Primitive.div,{"aria-hidden":!0,...l,ref:r,style:{flexShrink:0,...l.style},onPointerDown:(0,j.composeEventHandlers)(l.onPointerDown,()=>{null===s.current&&(s.current=window.setInterval(i,50))}),onPointerMove:(0,j.composeEventHandlers)(l.onPointerMove,()=>{o.onItemLeave?.(),null===s.current&&(s.current=window.setInterval(i,50))}),onPointerLeave:(0,j.composeEventHandlers)(l.onPointerLeave,()=>{c()})})}),e_=n.forwardRef((e,n)=>{let{__scopeSelect:r,...a}=e;return(0,t.jsx)(D.Primitive.div,{"aria-hidden":!0,...a,ref:n})});e_.displayName="SelectSeparator";var eV="SelectArrow",eW=n.forwardRef((e,n)=>{let{__scopeSelect:r,...a}=e,i=X(r),l=J(eV,r),o=ep(eV,r);return l.open&&"popper"===o.position?(0,t.jsx)(T.Arrow,{...i,...a,ref:n}):null});eW.displayName=eV;var eO=n.forwardRef(({__scopeSelect:e,value:r,...a},i)=>{let l=n.useRef(null),o=(0,k.useComposedRefs)(i,l),s=(0,z.usePrevious)(r);return n.useEffect(()=>{let e=l.current;if(!e)return;let t=Object.getOwnPropertyDescriptor(window.HTMLSelectElement.prototype,"value").set;if(s!==r&&t){let n=new Event("change",{bubbles:!0});t.call(e,r),e.dispatchEvent(n)}},[s,r]),(0,t.jsx)(D.Primitive.select,{...a,style:{..._.VISUALLY_HIDDEN_STYLES,...a.style},ref:o,defaultValue:r})});function eU(e){return""===e||void 0===e}function eK(e){let t=(0,F.useCallbackRef)(e),r=n.useRef(""),a=n.useRef(0),i=n.useCallback(e=>{let n=r.current+e;t(n),function e(t){r.current=t,window.clearTimeout(a.current),""!==t&&(a.current=window.setTimeout(()=>e(""),1e3))}(n)},[t]),l=n.useCallback(()=>{r.current="",window.clearTimeout(a.current)},[]);return n.useEffect(()=>()=>window.clearTimeout(a.current),[]),[r,i,l]}function eq(e,t,n){var r,a;let i=t.length>1&&Array.from(t).every(e=>e===t[0])?t[0]:t,l=n?e.indexOf(n):-1,o=(r=e,a=Math.max(l,0),r.map((e,t)=>r[(a+t)%r.length]));1===i.length&&(o=o.filter(e=>e!==n));let s=o.find(e=>e.textValue.toLowerCase().startsWith(i.toLowerCase()));return s!==n?s:void 0}eO.displayName="SelectBubbleInput",e.s(["Arrow",()=>eW,"Content",()=>ec,"Group",()=>eC,"Icon",()=>eo,"Item",()=>eE,"ItemIndicator",()=>eD,"ItemText",()=>eT,"Label",()=>eI,"Portal",()=>es,"Root",()=>en,"ScrollDownButton",()=>eB,"ScrollUpButton",()=>eF,"Select",()=>en,"SelectArrow",()=>eW,"SelectContent",()=>ec,"SelectGroup",()=>eC,"SelectIcon",()=>eo,"SelectItem",()=>eE,"SelectItemIndicator",()=>eD,"SelectItemText",()=>eT,"SelectLabel",()=>eI,"SelectPortal",()=>es,"SelectScrollDownButton",()=>eB,"SelectScrollUpButton",()=>eF,"SelectSeparator",()=>e_,"SelectTrigger",()=>ea,"SelectValue",()=>el,"SelectViewport",()=>eb,"Separator",()=>e_,"Trigger",()=>ea,"Value",()=>el,"Viewport",()=>eb,"createSelectScope",()=>Z],83830);var eG=e.i(83830),eG=eG,e$=e.i(99105);let eY=(0,a.default)("chevron-up",[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]]),eZ=eG.Root;eG.Group;let eX=eG.Value,eQ=n.forwardRef(({className:e,children:n,...r},a)=>(0,t.jsxs)(eG.Trigger,{ref:a,className:(0,v.cn)("border-input ring-offset-background placeholder:text-muted-foreground focus:ring-ring flex h-9 w-full items-center justify-between rounded-md border bg-transparent px-3 py-2 text-sm whitespace-nowrap shadow-sm focus:ring-1 focus:outline-none disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1",e),...r,children:[n,(0,t.jsx)(eG.Icon,{asChild:!0,children:(0,t.jsx)(e$.ChevronDown,{className:"h-4 w-4 opacity-50"})})]}));eQ.displayName=eG.Trigger.displayName;let eJ=n.forwardRef(({className:e,...n},r)=>(0,t.jsx)(eG.ScrollUpButton,{ref:r,className:(0,v.cn)("flex cursor-default items-center justify-center py-1",e),...n,children:(0,t.jsx)(eY,{className:"h-4 w-4"})}));eJ.displayName=eG.ScrollUpButton.displayName;let e0=n.forwardRef(({className:e,...n},r)=>(0,t.jsx)(eG.ScrollDownButton,{ref:r,className:(0,v.cn)("flex cursor-default items-center justify-center py-1",e),...n,children:(0,t.jsx)(e$.ChevronDown,{className:"h-4 w-4"})}));e0.displayName=eG.ScrollDownButton.displayName;let e1=n.forwardRef(({className:e,children:n,position:r="popper",...a},i)=>(0,t.jsx)(eG.Portal,{children:(0,t.jsxs)(eG.Content,{ref:i,className:(0,v.cn)("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 relative z-50 max-h-96 min-w-[8rem] overflow-hidden rounded-md border shadow-md","popper"===r&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",e),position:r,...a,children:[(0,t.jsx)(eJ,{}),(0,t.jsx)(eG.Viewport,{className:(0,v.cn)("p-1","popper"===r&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),children:n}),(0,t.jsx)(e0,{})]})}));e1.displayName=eG.Content.displayName,n.forwardRef(({className:e,...n},r)=>(0,t.jsx)(eG.Label,{ref:r,className:(0,v.cn)("px-2 py-1.5 text-sm font-semibold",e),...n})).displayName=eG.Label.displayName;let e2=n.forwardRef(({className:e,children:n,...a},i)=>(0,t.jsxs)(eG.Item,{ref:i,className:(0,v.cn)("focus:bg-accent focus:text-accent-foreground relative flex w-full cursor-default items-center rounded-sm py-1.5 pr-8 pl-2 text-sm outline-none select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),...a,children:[(0,t.jsx)("span",{className:"absolute right-2 flex h-3.5 w-3.5 items-center justify-center",children:(0,t.jsx)(eG.ItemIndicator,{children:(0,t.jsx)(r.Check,{className:"h-4 w-4"})})}),(0,t.jsx)(eG.ItemText,{children:n})]}));e2.displayName=eG.Item.displayName,n.forwardRef(({className:e,...n},r)=>(0,t.jsx)(eG.Separator,{ref:r,className:(0,v.cn)("bg-muted -mx-1 my-1 h-px",e),...n})).displayName=eG.Separator.displayName;var e3=e.i(21023);let e5=(0,e3.createServerReference)("4025dfe56b85d6de3f9cd641d5aa0d313ff9d492e7",e3.callServer,void 0,e3.findSourceMapURL,"updateSettingsAction");var e4=e.i(17406),e8=e.i(98804),e6=e.i(44229),e9=e.i(83902);function e7(e){return(0,t.jsx)(e6.Code,{className:(0,v.cn)("h-4 w-4",e.className),...e})}function te({className:e}){return(0,t.jsx)(e8.default,{src:"/icons/editors/vscode.svg",alt:"VS Code",width:24,height:24,className:(0,v.cn)("rounded-sm object-contain",e)})}function tt({className:e}){return(0,t.jsx)(e8.default,{src:"/icons/agents/cursor.jpeg",alt:"Cursor",width:24,height:24,className:(0,v.cn)("rounded-sm object-contain",e)})}function tn({className:e}){return(0,t.jsx)(e8.default,{src:"/icons/editors/windsurf.svg",alt:"Windsurf",width:24,height:24,className:(0,v.cn)("rounded-sm object-contain",e)})}function tr({className:e}){return(0,t.jsx)(e8.default,{src:"/icons/editors/zed.svg",alt:"Zed",width:24,height:24,className:(0,v.cn)("rounded-sm object-contain",e)})}function ta({className:e,...n}){return(0,t.jsx)(e9.Rocket,{className:(0,v.cn)("h-4 w-4",e),...n})}te.displayName="VsCodeIcon",tt.displayName="CursorEditorIcon",tn.displayName="WindsurfIcon",tr.displayName="ZedIcon",ta.displayName="AntigravityIcon";let ti={vscode:te,cursor:tt,windsurf:tn,zed:tr,antigravity:ta};var tl=e.i(41413),to=e.i(77624),ts=["PageUp","PageDown"],td=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],tc={"from-left":["Home","PageDown","ArrowDown","ArrowLeft"],"from-right":["Home","PageDown","ArrowDown","ArrowRight"],"from-bottom":["Home","PageDown","ArrowDown","ArrowLeft"],"from-top":["Home","PageDown","ArrowUp","ArrowLeft"]},tu="Slider",[tp,tm,th]=(0,C.createCollection)(tu),[tf,tg]=(0,I.createContextScope)(tu,[th]),[tx,tv]=tf(tu),tw=n.forwardRef((e,r)=>{let{name:a,min:i=0,max:l=100,step:o=1,orientation:s="horizontal",disabled:d=!1,minStepsBetweenThumbs:c=0,defaultValue:u=[i],value:p,onValueChange:m=()=>{},onValueCommit:h=()=>{},inverted:f=!1,form:g,...x}=e,v=n.useRef(new Set),w=n.useRef(0),b="horizontal"===s,[y=[],C]=(0,H.useControllableState)({prop:p,defaultProp:u,onChange:e=>{let t=[...v.current];t[w.current]?.focus(),m(e)}}),k=n.useRef(y);function I(e,t,{commit:n}={commit:!1}){let r,a=(String(o).split(".")[1]||"").length,s=Math.round((Math.round((e-i)/o)*o+i)*(r=Math.pow(10,a)))/r,d=(0,S.clamp)(s,[i,l]);C((e=[])=>{let r=function(e=[],t,n){let r=[...e];return r[n]=t,r.sort((e,t)=>e-t)}(e,d,t);if(!function(e,t){if(t>0)return Math.min(...e.slice(0,-1).map((t,n)=>e[n+1]-t))>=t;return!0}(r,c*o))return e;{w.current=r.indexOf(d);let t=String(r)!==String(e);return t&&n&&h(r),t?r:e}})}return(0,t.jsx)(tx,{scope:e.__scopeSlider,name:a,disabled:d,min:i,max:l,valueIndexToChangeRef:w,thumbs:v.current,values:y,orientation:s,form:g,children:(0,t.jsx)(tp.Provider,{scope:e.__scopeSlider,children:(0,t.jsx)(tp.Slot,{scope:e.__scopeSlider,children:(0,t.jsx)(b?tS:tj,{"aria-disabled":d,"data-disabled":d?"":void 0,...x,ref:r,onPointerDown:(0,j.composeEventHandlers)(x.onPointerDown,()=>{d||(k.current=y)}),min:i,max:l,inverted:f,onSlideStart:d?void 0:function(e){let t=function(e,t){if(1===e.length)return 0;let n=e.map(e=>Math.abs(e-t)),r=Math.min(...n);return n.indexOf(r)}(y,e);I(e,t)},onSlideMove:d?void 0:function(e){I(e,w.current)},onSlideEnd:d?void 0:function(){let e=k.current[w.current];y[w.current]!==e&&h(y)},onHomeKeyDown:()=>!d&&I(i,0,{commit:!0}),onEndKeyDown:()=>!d&&I(l,y.length-1,{commit:!0}),onStepKeyDown:({event:e,direction:t})=>{if(!d){let n=ts.includes(e.key)||e.shiftKey&&td.includes(e.key),r=w.current;I(y[r]+o*(n?10:1)*t,r,{commit:!0})}}})})})})});tw.displayName=tu;var[tb,ty]=tf(tu,{startEdge:"left",endEdge:"right",size:"width",direction:1}),tS=n.forwardRef((e,r)=>{let{min:a,max:i,dir:l,inverted:o,onSlideStart:s,onSlideMove:d,onSlideEnd:c,onStepKeyDown:u,...p}=e,[m,h]=n.useState(null),f=(0,k.useComposedRefs)(r,e=>h(e)),g=n.useRef(void 0),x=(0,M.useDirection)(l),v="ltr"===x,w=v&&!o||!v&&o;function b(e){let t=g.current||m.getBoundingClientRect(),n=tD([0,t.width],w?[a,i]:[i,a]);return g.current=t,n(e-t.left)}return(0,t.jsx)(tb,{scope:e.__scopeSlider,startEdge:w?"left":"right",endEdge:w?"right":"left",direction:w?1:-1,size:"width",children:(0,t.jsx)(tC,{dir:x,"data-orientation":"horizontal",...p,ref:f,style:{...p.style,"--radix-slider-thumb-transform":"translateX(-50%)"},onSlideStart:e=>{let t=b(e.clientX);s?.(t)},onSlideMove:e=>{let t=b(e.clientX);d?.(t)},onSlideEnd:()=>{g.current=void 0,c?.()},onStepKeyDown:e=>{let t=tc[w?"from-left":"from-right"].includes(e.key);u?.({event:e,direction:t?-1:1})}})})}),tj=n.forwardRef((e,r)=>{let{min:a,max:i,inverted:l,onSlideStart:o,onSlideMove:s,onSlideEnd:d,onStepKeyDown:c,...u}=e,p=n.useRef(null),m=(0,k.useComposedRefs)(r,p),h=n.useRef(void 0),f=!l;function g(e){let t=h.current||p.current.getBoundingClientRect(),n=tD([0,t.height],f?[i,a]:[a,i]);return h.current=t,n(e-t.top)}return(0,t.jsx)(tb,{scope:e.__scopeSlider,startEdge:f?"bottom":"top",endEdge:f?"top":"bottom",size:"height",direction:f?1:-1,children:(0,t.jsx)(tC,{"data-orientation":"vertical",...u,ref:m,style:{...u.style,"--radix-slider-thumb-transform":"translateY(50%)"},onSlideStart:e=>{let t=g(e.clientY);o?.(t)},onSlideMove:e=>{let t=g(e.clientY);s?.(t)},onSlideEnd:()=>{h.current=void 0,d?.()},onStepKeyDown:e=>{let t=tc[f?"from-bottom":"from-top"].includes(e.key);c?.({event:e,direction:t?-1:1})}})})}),tC=n.forwardRef((e,n)=>{let{__scopeSlider:r,onSlideStart:a,onSlideMove:i,onSlideEnd:l,onHomeKeyDown:o,onEndKeyDown:s,onStepKeyDown:d,...c}=e,u=tv(tu,r);return(0,t.jsx)(D.Primitive.span,{...c,ref:n,onKeyDown:(0,j.composeEventHandlers)(e.onKeyDown,e=>{"Home"===e.key?(o(e),e.preventDefault()):"End"===e.key?(s(e),e.preventDefault()):ts.concat(td).includes(e.key)&&(d(e),e.preventDefault())}),onPointerDown:(0,j.composeEventHandlers)(e.onPointerDown,e=>{let t=e.target;t.setPointerCapture(e.pointerId),e.preventDefault(),u.thumbs.has(t)?t.focus():a(e)}),onPointerMove:(0,j.composeEventHandlers)(e.onPointerMove,e=>{e.target.hasPointerCapture(e.pointerId)&&i(e)}),onPointerUp:(0,j.composeEventHandlers)(e.onPointerUp,e=>{let t=e.target;t.hasPointerCapture(e.pointerId)&&(t.releasePointerCapture(e.pointerId),l(e))})})}),tk="SliderTrack",tI=n.forwardRef((e,n)=>{let{__scopeSlider:r,...a}=e,i=tv(tk,r);return(0,t.jsx)(D.Primitive.span,{"data-disabled":i.disabled?"":void 0,"data-orientation":i.orientation,...a,ref:n})});tI.displayName=tk;var tM="SliderRange",tN=n.forwardRef((e,r)=>{let{__scopeSlider:a,...i}=e,l=tv(tM,a),o=ty(tM,a),s=n.useRef(null),d=(0,k.useComposedRefs)(r,s),c=l.values.length,u=l.values.map(e=>tA(e,l.min,l.max)),p=c>1?Math.min(...u):0,m=100-Math.max(...u);return(0,t.jsx)(D.Primitive.span,{"data-orientation":l.orientation,"data-disabled":l.disabled?"":void 0,...i,ref:d,style:{...e.style,[o.startEdge]:p+"%",[o.endEdge]:m+"%"}})});tN.displayName=tM;var tP="SliderThumb",tE=n.forwardRef((e,r)=>{let a=tm(e.__scopeSlider),[i,l]=n.useState(null),o=(0,k.useComposedRefs)(r,e=>l(e)),s=n.useMemo(()=>i?a().findIndex(e=>e.ref.current===i):-1,[a,i]);return(0,t.jsx)(tR,{...e,ref:o,index:s})}),tR=n.forwardRef((e,r)=>{var a,i,l,o,s;let d,c,{__scopeSlider:u,index:p,name:m,...h}=e,f=tv(tP,u),g=ty(tP,u),[x,v]=n.useState(null),w=(0,k.useComposedRefs)(r,e=>v(e)),b=!x||f.form||!!x.closest("form"),y=(0,to.useSize)(x),S=f.values[p],C=void 0===S?0:tA(S,f.min,f.max),I=(a=p,(i=f.values.length)>2?`Value ${a+1} of ${i}`:2===i?["Minimum","Maximum"][a]:void 0),M=y?.[g.size],N=M?(l=M,o=C,s=g.direction,c=tD([0,50],[0,d=l/2]),(d-c(o)*s)*s):0;return n.useEffect(()=>{if(x)return f.thumbs.add(x),()=>{f.thumbs.delete(x)}},[x,f.thumbs]),(0,t.jsxs)("span",{style:{transform:"var(--radix-slider-thumb-transform)",position:"absolute",[g.startEdge]:`calc(${C}% + ${N}px)`},children:[(0,t.jsx)(tp.ItemSlot,{scope:e.__scopeSlider,children:(0,t.jsx)(D.Primitive.span,{role:"slider","aria-label":e["aria-label"]||I,"aria-valuemin":f.min,"aria-valuenow":S,"aria-valuemax":f.max,"aria-orientation":f.orientation,"data-orientation":f.orientation,"data-disabled":f.disabled?"":void 0,tabIndex:f.disabled?void 0:0,...h,ref:w,style:void 0===S?{display:"none"}:e.style,onFocus:(0,j.composeEventHandlers)(e.onFocus,()=>{f.valueIndexToChangeRef.current=p})})}),b&&(0,t.jsx)(tT,{name:m??(f.name?f.name+(f.values.length>1?"[]":""):void 0),form:f.form,value:S},p)]})});tE.displayName=tP;var tT=n.forwardRef(({__scopeSlider:e,value:r,...a},i)=>{let l=n.useRef(null),o=(0,k.useComposedRefs)(l,i),s=(0,z.usePrevious)(r);return n.useEffect(()=>{let e=l.current;if(!e)return;let t=Object.getOwnPropertyDescriptor(window.HTMLInputElement.prototype,"value").set;if(s!==r&&t){let n=new Event("input",{bubbles:!0});t.call(e,r),e.dispatchEvent(n)}},[s,r]),(0,t.jsx)(D.Primitive.input,{style:{display:"none"},...a,ref:o,defaultValue:r})});function tA(e,t,n){return(0,S.clamp)(100/(n-t)*(e-t),[0,100])}function tD(e,t){return n=>{if(e[0]===e[1]||t[0]===t[1])return t[0];let r=(t[1]-t[0])/(e[1]-e[0]);return t[0]+r*(n-e[0])}}tT.displayName="RadioBubbleInput",e.s(["Range",()=>tN,"Root",()=>tw,"Slider",()=>tw,"SliderRange",()=>tN,"SliderThumb",()=>tE,"SliderTrack",()=>tI,"Thumb",()=>tE,"Track",()=>tI,"createSliderScope",()=>tg],29991);var tL=e.i(29991),tL=tL;function tF({className:e,defaultValue:r,value:a,min:i=0,max:l=100,...o}){let s=n.useMemo(()=>Array.isArray(a)?a:Array.isArray(r)?r:[i,l],[a,r,i,l]);return(0,t.jsxs)(tL.Root,{"data-slot":"slider",defaultValue:r,value:a,min:i,max:l,className:(0,v.cn)("relative flex w-full touch-none items-center select-none data-[disabled]:opacity-50 data-[orientation=vertical]:h-full data-[orientation=vertical]:min-h-44 data-[orientation=vertical]:w-auto data-[orientation=vertical]:flex-col",e),...o,children:[(0,t.jsx)(tL.Track,{"data-slot":"slider-track",className:(0,v.cn)("bg-muted relative grow overflow-hidden rounded-full data-[orientation=horizontal]:h-1.5 data-[orientation=horizontal]:w-full data-[orientation=vertical]:h-full data-[orientation=vertical]:w-1.5"),children:(0,t.jsx)(tL.Range,{"data-slot":"slider-range",className:(0,v.cn)("bg-primary absolute data-[orientation=horizontal]:h-full data-[orientation=vertical]:w-full")})}),Array.from({length:s.length},(e,n)=>(0,t.jsx)(tL.Thumb,{"data-slot":"slider-thumb",className:"border-primary ring-ring/50 block size-4 shrink-0 rounded-full border bg-white shadow-sm transition-[color,box-shadow] hover:ring-4 focus-visible:ring-4 focus-visible:outline-hidden disabled:pointer-events-none disabled:opacity-50"},n))]})}let tH=[60,120,300,600,900,1800,2700,3600,7200,10800,14400,21600,28800,43200,86400],tB=tH.length-1;function tz(e){let t=0,n=Math.abs(e-tH[0]);for(let r=1;r<tH.length;r++){let a=Math.abs(e-tH[r]);a<n&&(n=a,t=r)}return t}function t_({id:e,testId:r,value:a,onChange:i,onBlur:l,defaultSeconds:o=1800}){var s;let d,c,u=(""===a?o:parseInt(a,10))||o,[p,m]=(0,n.useState)(()=>tz(u)),h=tz(u);h!==p&&tH[p]!==u&&m(h);let f=(0,n.useCallback)(([e])=>{m(e),i(String(tH[e]))},[i]);return(0,t.jsxs)("div",{className:"flex w-55 items-center gap-2",children:[(0,t.jsx)(tF,{id:e,"data-testid":r,min:0,max:tB,step:1,value:[p],onValueChange:f,onValueCommit:()=>l(),className:"min-w-0 flex-1"}),(0,t.jsx)("span",{className:"text-muted-foreground shrink-0 text-right text-xs tabular-nums",children:(d=Math.floor((s=tH[p])/3600),c=Math.round(s%3600/60),0===d?`${c}m`:0===c?`${d}h`:`${d}h ${c}m`)})]})}let tV=[{value:e4.EditorType.VsCode,label:"VS Code"},{value:e4.EditorType.Cursor,label:"Cursor"},{value:e4.EditorType.Windsurf,label:"Windsurf"},{value:e4.EditorType.Zed,label:"Zed"},{value:e4.EditorType.Antigravity,label:"Antigravity"}],tW=[{value:"bash",label:"Bash"},{value:"zsh",label:"Zsh"},{value:"fish",label:"Fish"}],tO=[{id:"agent",label:"Agent",icon:i},{id:"environment",label:"Environment",icon:l.Terminal},{id:"workflow",label:"Workflow",icon:o.GitBranch},{id:"ci",label:"CI",icon:s},{id:"stage-timeouts",label:"Timeouts",icon:g.Timer},{id:"notifications",label:"Notifications",icon:d},{id:"feature-flags",label:"Flags",icon:c},{id:"database",label:"Database",icon:u}];function tU({label:e,description:n,htmlFor:r,children:a}){return(0,t.jsxs)("div",{className:"flex items-center justify-between gap-4 border-b py-2.5 last:border-b-0",children:[(0,t.jsxs)("div",{className:"min-w-0",children:[(0,t.jsx)(w.Label,{htmlFor:r,className:"cursor-pointer text-sm font-normal whitespace-nowrap",children:e}),n?(0,t.jsx)("p",{className:"text-muted-foreground text-[11px] leading-tight",children:n}):null]}),(0,t.jsx)("div",{className:"flex shrink-0 items-center gap-2",children:a})]})}function tK({label:e,description:n,id:r,testId:a,checked:i,onChange:l,disabled:o}){return(0,t.jsx)(tU,{label:e,description:n,htmlFor:r,children:(0,t.jsx)(b.Switch,{id:r,"data-testid":a,checked:i,onCheckedChange:l,disabled:o,className:(0,v.cn)("cursor-pointer",o&&"cursor-not-allowed opacity-50")})})}function tq({icon:e,title:n,description:r,badge:a,testId:i,children:l}){return(0,t.jsxs)("div",{className:"bg-background rounded-lg border","data-testid":i,children:[(0,t.jsxs)("div",{className:"bg-muted/30 border-b px-4 py-3",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(e,{className:"text-muted-foreground h-3.5 w-3.5"}),(0,t.jsx)("h2",{className:"text-sm font-semibold",children:n}),a?(0,t.jsx)("span",{className:"bg-muted text-muted-foreground rounded px-1.5 py-0.5 text-[9px] font-medium tracking-wider uppercase",children:a}):null]}),(0,t.jsx)("p",{className:"text-muted-foreground mt-0.5 text-[11px]",children:r})]}),(0,t.jsx)("div",{className:"px-4",children:l})]})}function tG({id:e,testId:n,value:r,onChange:a,onBlur:i,placeholder:l,min:o=1,max:s,step:d=1,suffix:c}){let u=""===r?void 0:parseInt(r,10);return(0,t.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,t.jsxs)("div",{className:"flex items-center overflow-hidden rounded-md border",children:[(0,t.jsx)("button",{type:"button",onClick:()=>{a(String(Math.max(o,(u??parseInt(l,10))-d)))},onMouseUp:i,className:"text-muted-foreground hover:bg-muted hover:text-foreground flex h-8 w-7 cursor-pointer items-center justify-center border-r transition-colors","aria-label":"Decrease",children:(0,t.jsx)(p.default,{className:"h-3 w-3"})}),(0,t.jsx)("input",{id:e,"data-testid":n,type:"text",inputMode:"numeric",pattern:"[0-9]*",value:r,placeholder:l,onChange:e=>{a(e.target.value.replace(/[^0-9]/g,""))},onBlur:i,className:"h-8 w-14 bg-transparent text-center text-xs outline-none"}),(0,t.jsx)("button",{type:"button",onClick:()=>{let e;e=u??parseInt(l,10),a(String(null!=s?Math.min(s,e+d):e+d))},onMouseUp:i,className:"text-muted-foreground hover:bg-muted hover:text-foreground flex h-8 w-7 cursor-pointer items-center justify-center border-l transition-colors","aria-label":"Increase",children:(0,t.jsx)(m.Plus,{className:"h-3 w-3"})})]}),c?(0,t.jsx)("span",{className:"text-muted-foreground text-[11px]",children:c}):null]})}function t$({children:e}){return(0,t.jsx)("div",{className:"border-b pt-3 pb-1",children:(0,t.jsx)("span",{className:"text-muted-foreground text-[10px] font-semibold tracking-wider uppercase",children:e})})}function tY({children:e,links:n}){return(0,t.jsxs)("div",{className:"hidden pt-2 lg:block",children:[(0,t.jsx)("p",{className:"text-muted-foreground/70 text-[11px] leading-relaxed",children:e}),null!=n&&n.length>0?(0,t.jsx)("div",{className:"mt-2 flex flex-col gap-1",children:n.map(e=>(0,t.jsxs)("a",{href:e.href,target:"_blank",rel:"noopener noreferrer",className:"text-muted-foreground hover:text-foreground inline-flex items-center gap-1 text-[10px] transition-colors",children:[(0,t.jsx)(h.ExternalLink,{className:"h-2.5 w-2.5"}),e.label]},e.href))}):null]})}function tZ({settings:e,shepHome:a,dbFileSize:p,availableTerminals:m}){let{showSaving:h,showSaved:w,save:b}=function(){let[e,t]=(0,n.useTransition)(),[r,a]=(0,n.useState)(!1),[i,l]=(0,n.useState)(!1),o=(0,n.useRef)(null),s=(0,n.useRef)(!1);return(0,n.useEffect)(()=>{e&&!r&&(a(!0),s.current=!1,o.current=setTimeout(()=>{o.current=null,s.current&&(a(!1),l(!0),setTimeout(()=>l(!1),2e3))},350)),!e&&r&&(s.current=!0,o.current||(a(!1),l(!0),setTimeout(()=>l(!1),2e3)))},[e,r]),{showSaving:r,showSaved:i,save:(0,n.useCallback)(e=>{t(async()=>{let t=await e5(e);t.success||x.toast.error(t.error??"Failed to save settings")})},[t])}}(),y=e.featureFlags??{skills:!1,envDeploy:!1,debug:!1,githubImport:!1,adoptBranch:!1},[S,j]=(0,n.useState)(e.agent.type),[C,k]=(0,n.useState)(e.environment.defaultEditor),[I,M]=(0,n.useState)(e.environment.shellPreference),[N,P]=(0,n.useState)(e.environment.terminalPreference??e4.TerminalType.System),E=m?m.filter(e=>e.available):[{id:e4.TerminalType.System,name:"System Terminal",available:!0}],[R,T]=(0,n.useState)(e.workflow.openPrOnImplementationComplete),[A,D]=(0,n.useState)(e.workflow.approvalGateDefaults.pushOnImplementationComplete),[L,F]=(0,n.useState)(e.workflow.approvalGateDefaults.allowPrd),[H,B]=(0,n.useState)(e.workflow.approvalGateDefaults.allowPlan),[z,_]=(0,n.useState)(e.workflow.approvalGateDefaults.allowMerge),[V,W]=(0,n.useState)(e.workflow.enableEvidence),[O,U]=(0,n.useState)(e.workflow.commitEvidence),[K,q]=(0,n.useState)(!1!==e.workflow.ciWatchEnabled),[G,$]=(0,n.useState)(null!=e.workflow.ciMaxFixAttempts?String(e.workflow.ciMaxFixAttempts):""),[Y,Z]=(0,n.useState)(null!=e.workflow.ciWatchTimeoutMs?String(Math.round(e.workflow.ciWatchTimeoutMs/1e3)):""),[X,Q]=(0,n.useState)(null!=e.workflow.ciLogMaxChars?String(e.workflow.ciLogMaxChars):""),[J,ee]=(0,n.useState)(null!=e.workflow.ciWatchPollIntervalSeconds?String(e.workflow.ciWatchPollIntervalSeconds):""),et=e.workflow.stageTimeouts,[en,er]=(0,n.useState)(String(Math.round((et?.analyzeMs??18e5)/1e3))),[ea,ei]=(0,n.useState)(String(Math.round((et?.requirementsMs??18e5)/1e3))),[el,eo]=(0,n.useState)(String(Math.round((et?.researchMs??18e5)/1e3))),[es,ed]=(0,n.useState)(String(Math.round((et?.planMs??18e5)/1e3))),[ec,eu]=(0,n.useState)(String(Math.round((et?.implementMs??18e5)/1e3))),[ep,em]=(0,n.useState)(String(Math.round((et?.mergeMs??18e5)/1e3))),eh=e.workflow.analyzeRepoTimeouts,[ef,eg]=(0,n.useState)(String(Math.round((eh?.analyzeMs??6e5)/1e3))),[ex,ev]=(0,n.useState)(e.notifications.inApp.enabled),[ew,eb]=(0,n.useState)({...e.notifications.events}),[ey,eS]=(0,n.useState)({...y}),ej=null!=e.workflow.ciMaxFixAttempts?String(e.workflow.ciMaxFixAttempts):"",eC=null!=e.workflow.ciWatchTimeoutMs?String(Math.round(e.workflow.ciWatchTimeoutMs/1e3)):"",ek=null!=e.workflow.ciLogMaxChars?String(e.workflow.ciLogMaxChars):"",eI=null!=e.workflow.ciWatchPollIntervalSeconds?String(e.workflow.ciWatchPollIntervalSeconds):"",eM=et?.analyzeMs!=null?String(Math.round(et.analyzeMs/1e3)):"",eN=et?.requirementsMs!=null?String(Math.round(et.requirementsMs/1e3)):"",eP=et?.researchMs!=null?String(Math.round(et.researchMs/1e3)):"",eE=et?.planMs!=null?String(Math.round(et.planMs/1e3)):"",eR=et?.implementMs!=null?String(Math.round(et.implementMs/1e3)):"",eT=et?.mergeMs!=null?String(Math.round(et.mergeMs/1e3)):"",eA=eh?.analyzeMs!=null?String(Math.round(eh.analyzeMs/1e3)):"";function eD(e){if(""===e)return;let t=parseInt(e,10);return Number.isNaN(t)||t<=0?void 0:t}function eL(e){if(void 0===e)return;let t=eD(e);return null!=t?1e3*t:void 0}function eF(e={}){let t=eD(e.ciTimeout??Y);return{workflow:{openPrOnImplementationComplete:e.openPr??R,approvalGateDefaults:{pushOnImplementationComplete:e.pushOnComplete??A,allowPrd:e.allowPrd??L,allowPlan:e.allowPlan??H,allowMerge:e.allowMerge??z},enableEvidence:e.enableEvidence??V,commitEvidence:e.commitEvidence??O,ciWatchEnabled:e.ciWatchEnabled??K,ciMaxFixAttempts:eD(e.ciMaxFix??G),ciWatchTimeoutMs:null!=t?1e3*t:void 0,ciLogMaxChars:eD(e.ciLogMax??X),ciWatchPollIntervalSeconds:eD(e.ciPollInterval??J),stageTimeouts:{analyzeMs:eL(e.analyzeTimeout??en),requirementsMs:eL(e.requirementsTimeout??ea),researchMs:eL(e.researchTimeout??el),planMs:eL(e.planTimeout??es),implementMs:eL(e.implementTimeout??ec),mergeMs:eL(e.mergeTimeout??ep)},analyzeRepoTimeouts:{analyzeMs:eL(e.analyzeRepoTimeout??ef)}}}}function eH(e={}){return{notifications:{inApp:{enabled:e.inApp??ex},events:e.events??ew}}}let[eB,ez]=(0,n.useState)("agent");(0,n.useEffect)(()=>{let e=tO.map(e=>document.getElementById(`section-${e.id}`)).filter(Boolean);if(0===e.length)return;let t=new IntersectionObserver(e=>{for(let t of e)t.isIntersecting&&ez(t.target.id.replace("section-",""))},{rootMargin:"-65px 0px -60% 0px",threshold:0});for(let n of e)t.observe(n);return()=>t.disconnect()},[]);let e_=(0,n.useCallback)(e=>{let t=document.getElementById(`section-${e}`);t&&(t.scrollIntoView({behavior:"smooth",block:"start"}),t.style.animation="none",t.offsetHeight,t.style.animation="section-flash 1s ease-out")},[]);return(0,t.jsxs)("div",{"data-testid":"settings-page-client",className:"max-w-5xl",children:[(0,t.jsx)("div",{className:"bg-background/95 supports-backdrop-filter:bg-background/80 sticky top-0 z-10 grid grid-cols-1 gap-x-5 pt-6 pb-4 backdrop-blur lg:grid-cols-[1fr_280px]",children:(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(f,{className:"text-muted-foreground h-4 w-4"}),(0,t.jsx)("h1",{className:"text-sm font-bold tracking-tight",children:"Settings"}),(0,t.jsxs)("span",{className:"relative h-4 w-16",children:[(0,t.jsx)("span",{className:(0,v.cn)("text-muted-foreground absolute inset-0 flex items-center text-xs transition-opacity duration-300",h?"opacity-100":"opacity-0"),children:"Saving..."}),(0,t.jsxs)("span",{className:(0,v.cn)("absolute inset-0 flex items-center gap-1 text-xs text-green-600 transition-opacity duration-300",w&&!h?"opacity-100":"opacity-0"),children:[(0,t.jsx)(r.Check,{className:"h-3 w-3"}),"Saved"]})]}),(0,t.jsx)("nav",{className:"ml-auto flex items-center gap-0.5",children:tO.map(e=>{let n=e.icon,r=eB===e.id;return(0,t.jsxs)("button",{type:"button",onClick:()=>e_(e.id),className:(0,v.cn)("flex cursor-pointer items-center gap-1 rounded-md px-1.5 py-1 text-[11px] transition-all",r?"bg-accent text-foreground font-medium":"text-muted-foreground/60 hover:text-foreground hover:bg-accent/50"),children:[(0,t.jsx)(n,{className:"h-3 w-3"}),(0,t.jsx)("span",{className:"hidden sm:inline",children:e.label})]},e.id)})})]})}),(0,t.jsxs)("div",{className:"flex flex-col gap-3",children:[(0,t.jsxs)("div",{id:"section-agent",className:"grid scroll-mt-18 grid-cols-1 gap-x-5 rounded-lg lg:grid-cols-[1fr_280px]",children:[(0,t.jsx)(tq,{icon:i,title:"Agent",description:"AI coding agent and authentication",testId:"agent-settings-section",children:(0,t.jsx)(tU,{label:"Agent & Model",description:"Provider and model for all operations",htmlFor:"agent-model-picker",children:(0,t.jsx)(tl.AgentModelPicker,{initialAgentType:S,initialModel:e.models.default,mode:"settings",onAgentModelChange:e=>j(e),className:"w-55"})})}),(0,t.jsx)(tY,{links:[{label:"Agent system",href:"https://github.com/shep-ai/cli/blob/main/docs/architecture/agent-system.md"},{label:"Adding agents",href:"https://github.com/shep-ai/cli/blob/main/docs/development/adding-agents.md"},{label:"Configuration guide",href:"https://github.com/shep-ai/cli/blob/main/docs/guides/configuration.md"}],children:"Choose which AI coding agent powers your features. Each agent supports different models and capabilities. Authentication is resolved automatically via your active session."})]}),(0,t.jsxs)("div",{id:"section-environment",className:"grid scroll-mt-18 grid-cols-1 gap-x-5 rounded-lg lg:grid-cols-[1fr_280px]",children:[(0,t.jsxs)(tq,{icon:l.Terminal,title:"Environment",description:"Editor, shell, and terminal preferences",testId:"environment-settings-section",children:[(0,t.jsx)(tU,{label:"Default Editor",description:"Editor launched for file operations",htmlFor:"default-editor",children:(0,t.jsxs)(eZ,{value:C,onValueChange:e=>{k(e),b({environment:{defaultEditor:e,shellPreference:I,terminalPreference:N}})},children:[(0,t.jsx)(eQ,{id:"default-editor","data-testid":"editor-select",className:"w-55 cursor-pointer text-xs",children:(0,t.jsx)(eX,{})}),(0,t.jsx)(e1,{children:tV.map(e=>{var n;let r=(n=e.value)&&n in ti?ti[n]:e7;return(0,t.jsx)(e2,{value:e.value,children:(0,t.jsxs)("span",{className:"flex items-center gap-2 text-xs",children:[(0,t.jsx)(r,{className:"h-4 w-4 shrink-0"}),e.label]})},e.value)})})]})}),(0,t.jsx)(tU,{label:"Shell",description:"Default shell for generated scripts",htmlFor:"shell-preference",children:(0,t.jsxs)(eZ,{value:I,onValueChange:e=>{M(e),b({environment:{defaultEditor:C,shellPreference:e,terminalPreference:N}})},children:[(0,t.jsx)(eQ,{id:"shell-preference","data-testid":"shell-select",className:"w-55 cursor-pointer text-xs",children:(0,t.jsx)(eX,{})}),(0,t.jsx)(e1,{children:tW.map(e=>(0,t.jsx)(e2,{value:e.value,children:e.label},e.value))})]})}),(0,t.jsx)(tU,{label:"Terminal",description:"Terminal emulator for shell sessions",htmlFor:"terminal-preference",children:(0,t.jsxs)(eZ,{value:N,onValueChange:e=>{P(e),b({environment:{defaultEditor:C,shellPreference:I,terminalPreference:e}})},children:[(0,t.jsx)(eQ,{id:"terminal-preference","data-testid":"terminal-select",className:"w-55 cursor-pointer text-xs",children:(0,t.jsx)(eX,{})}),(0,t.jsx)(e1,{children:E.map(e=>(0,t.jsx)(e2,{value:e.id,children:e.name},e.id))})]})})]}),(0,t.jsx)(tY,{links:[{label:"Configuration guide",href:"https://github.com/shep-ai/cli/blob/main/docs/guides/configuration.md"}],children:"Your preferred editor opens files for review. The shell setting controls generated scripts. The terminal emulator is launched when opening shell sessions from the web UI."})]}),(0,t.jsxs)("div",{id:"section-workflow",className:"grid scroll-mt-18 grid-cols-1 gap-x-5 rounded-lg lg:grid-cols-[1fr_280px]",children:[(0,t.jsxs)(tq,{icon:o.GitBranch,title:"Workflow",description:"Automation behavior after implementation",testId:"workflow-settings-section",children:[(0,t.jsx)(t$,{children:"Approve"}),(0,t.jsx)(tK,{label:"Auto-approve PRD",description:"Skip manual review of requirements",id:"allow-prd",testId:"switch-allow-prd",checked:L,onChange:e=>{F(e),b(eF({allowPrd:e}))}}),(0,t.jsx)(tK,{label:"Auto-approve Plan",description:"Skip manual review of implementation plan",id:"allow-plan",testId:"switch-allow-plan",checked:H,onChange:e=>{B(e),b(eF({allowPlan:e}))}}),(0,t.jsx)(tK,{label:"Auto-approve Merge",description:"Merge without manual review",id:"allow-merge",testId:"switch-allow-merge",checked:z,onChange:e=>{_(e),b(eF({allowMerge:e}))}}),(0,t.jsx)(t$,{children:"Evidence"}),(0,t.jsx)(tK,{label:"Collect evidence",description:"Capture screenshots and artifacts after implementation",id:"enable-evidence",testId:"switch-enable-evidence",checked:V,onChange:e=>{W(e),e?b(eF({enableEvidence:e})):(U(!1),b(eF({enableEvidence:e,commitEvidence:!1})))}}),(0,t.jsx)(tK,{label:"Add evidence to PR",description:"Include evidence in the pull request body",id:"commit-evidence",testId:"switch-commit-evidence",checked:O,disabled:!V||!R,onChange:e=>{U(e),b(eF({commitEvidence:e}))}}),(0,t.jsx)(t$,{children:"Git"}),(0,t.jsx)(tK,{label:"Push on complete",description:"Push to remote when implementation finishes",id:"push-on-complete",testId:"switch-push-on-complete",checked:A,onChange:e=>{D(e),b(eF({pushOnComplete:e}))}}),(0,t.jsx)(tK,{label:"Open PR on complete",description:"Create a pull request when done",id:"open-pr",testId:"switch-open-pr",checked:R,onChange:e=>{T(e),e?b(eF({openPr:e})):(U(!1),b(eF({openPr:e,commitEvidence:!1})))}}),(0,t.jsx)(tK,{label:"Watch CI after push",description:"Monitor CI and auto-fix failures. Disable to avoid rate limits.",id:"ci-watch-enabled",testId:"switch-ci-watch-enabled",checked:K,onChange:e=>{q(e),b(eF({ciWatchEnabled:e}))}})]}),(0,t.jsx)(tY,{links:[{label:"Approval gates",href:"https://github.com/shep-ai/cli/blob/main/specs/016-hitl-approval-gates/spec.yaml"},{label:"Push & PR flags",href:"https://github.com/shep-ai/cli/blob/main/specs/037-feature-pr-push-flags/spec.yaml"}],children:"Control how autonomous each feature run is. Auto-approve skips the human review pause at each phase. Push and PR options control what happens after successful implementation."})]}),(0,t.jsxs)("div",{id:"section-ci",className:"grid scroll-mt-18 grid-cols-1 gap-x-5 rounded-lg lg:grid-cols-[1fr_280px]",children:[(0,t.jsxs)(tq,{icon:s,title:"Continuous Integration",description:"Limits and timeouts for CI monitoring",testId:"ci-settings-section",children:[(0,t.jsx)(tU,{label:"Max fix attempts",description:"Agent retries on failing CI",htmlFor:"ci-max-fix",children:(0,t.jsx)(tG,{id:"ci-max-fix",testId:"ci-max-fix-input",placeholder:"3",value:G,onChange:$,onBlur:()=>{G!==ej&&b(eF({ciMaxFix:G}))},min:1,max:10})}),(0,t.jsx)(tU,{label:"Watch timeout",description:"Max wait for CI completion",htmlFor:"ci-timeout",children:(0,t.jsx)(tG,{id:"ci-timeout",testId:"ci-timeout-input",placeholder:"300",value:Y,onChange:Z,onBlur:()=>{Y!==eC&&b(eF({ciTimeout:Y}))},min:30,step:30,suffix:"sec"})}),(0,t.jsx)(tU,{label:"Max log size",description:"Truncate CI logs beyond this limit",htmlFor:"ci-log-max",children:(0,t.jsx)(tG,{id:"ci-log-max",testId:"ci-log-max-input",placeholder:"50000",value:X,onChange:Q,onBlur:()=>{X!==ek&&b(eF({ciLogMax:X}))},min:1e3,step:5e3,suffix:"chars"})}),(0,t.jsx)(tU,{label:"Poll interval",description:"How often to check GitHub for CI status updates",htmlFor:"ci-poll-interval",children:(0,t.jsx)(tG,{id:"ci-poll-interval",testId:"ci-poll-interval-input",placeholder:"30",value:J,onChange:ee,onBlur:()=>{J!==eI&&b(eF({ciPollInterval:J}))},min:5,step:5,suffix:"sec"})})]}),(0,t.jsx)(tY,{links:[{label:"CI/CD pipeline",href:"https://github.com/shep-ai/cli/blob/main/docs/development/cicd.md"},{label:"CI security gates",href:"https://github.com/shep-ai/cli/blob/main/specs/003-cicd-security-gates/spec.md"}],children:"When a feature completes, the agent can watch CI and auto-fix failures. These limits prevent runaway retries and control how much log output is sent to the agent for analysis."})]}),(0,t.jsxs)("div",{id:"section-stage-timeouts",className:"grid scroll-mt-18 grid-cols-1 gap-x-5 rounded-lg lg:grid-cols-[1fr_280px]",children:[(0,t.jsxs)(tq,{icon:g.Timer,title:"Stage Timeouts",description:"Maximum execution time per agent stage",testId:"stage-timeouts-settings-section",children:[(0,t.jsx)(t$,{children:"Feature Agent"}),(0,t.jsx)(tU,{label:"Analyze",description:"Repository analysis timeout",htmlFor:"timeout-analyze",children:(0,t.jsx)(t_,{id:"timeout-analyze",testId:"timeout-analyze-input",value:en,onChange:er,onBlur:()=>{en!==eM&&b(eF({analyzeTimeout:en}))},defaultSeconds:1800})}),(0,t.jsx)(tU,{label:"Requirements",description:"Requirements gathering timeout",htmlFor:"timeout-requirements",children:(0,t.jsx)(t_,{id:"timeout-requirements",testId:"timeout-requirements-input",value:ea,onChange:ei,onBlur:()=>{ea!==eN&&b(eF({requirementsTimeout:ea}))},defaultSeconds:1800})}),(0,t.jsx)(tU,{label:"Research",description:"Technical research timeout",htmlFor:"timeout-research",children:(0,t.jsx)(t_,{id:"timeout-research",testId:"timeout-research-input",value:el,onChange:eo,onBlur:()=>{el!==eP&&b(eF({researchTimeout:el}))},defaultSeconds:1800})}),(0,t.jsx)(tU,{label:"Plan",description:"Implementation planning timeout",htmlFor:"timeout-plan",children:(0,t.jsx)(t_,{id:"timeout-plan",testId:"timeout-plan-input",value:es,onChange:ed,onBlur:()=>{es!==eE&&b(eF({planTimeout:es}))},defaultSeconds:1800})}),(0,t.jsx)(tU,{label:"Implement",description:"Code implementation timeout",htmlFor:"timeout-implement",children:(0,t.jsx)(t_,{id:"timeout-implement",testId:"timeout-implement-input",value:ec,onChange:eu,onBlur:()=>{ec!==eR&&b(eF({implementTimeout:ec}))},defaultSeconds:1800})}),(0,t.jsx)(tU,{label:"Merge",description:"PR creation and merge timeout",htmlFor:"timeout-merge",children:(0,t.jsx)(t_,{id:"timeout-merge",testId:"timeout-merge-input",value:ep,onChange:em,onBlur:()=>{ep!==eT&&b(eF({mergeTimeout:ep}))},defaultSeconds:1800})}),(0,t.jsx)(t$,{children:"Analyze Repository Agent"}),(0,t.jsx)(tU,{label:"Analyze",description:"Repository analysis timeout",htmlFor:"timeout-analyze-repo",children:(0,t.jsx)(t_,{id:"timeout-analyze-repo",testId:"timeout-analyze-repo-input",value:ef,onChange:eg,onBlur:()=>{ef!==eA&&b(eF({analyzeRepoTimeout:ef}))},defaultSeconds:600})})]}),(0,t.jsx)(tY,{children:"Each agent has independently configurable stage timeouts. When a stage exceeds its timeout, the agent is terminated. Longer timeouts are useful for complex implementations. Feature agent defaults to 30 minutes per stage. Analyze repository agent defaults to 10 minutes."})]}),(0,t.jsxs)("div",{id:"section-notifications",className:"grid scroll-mt-18 grid-cols-1 gap-x-5 rounded-lg lg:grid-cols-[1fr_280px]",children:[(0,t.jsxs)(tq,{icon:d,title:"Notifications",description:"How and when you get notified",testId:"notification-settings-section",children:[(0,t.jsx)(t$,{children:"Channels"}),(0,t.jsx)(tK,{label:"In-app",description:"Notifications inside the Shep UI",id:"notif-in-app",testId:"switch-in-app",checked:ex,onChange:e=>{ev(e),b(eH({inApp:e}))}}),(0,t.jsx)(t$,{children:"Agent Events"}),(0,t.jsx)(tK,{label:"Agent started",id:"notif-event-agentStarted",testId:"switch-event-agentStarted",checked:ew.agentStarted,onChange:e=>{let t={...ew,agentStarted:e};eb(t),b(eH({events:t}))}}),(0,t.jsx)(tK,{label:"Phase completed",id:"notif-event-phaseCompleted",testId:"switch-event-phaseCompleted",checked:ew.phaseCompleted,onChange:e=>{let t={...ew,phaseCompleted:e};eb(t),b(eH({events:t}))}}),(0,t.jsx)(tK,{label:"Waiting approval",id:"notif-event-waitingApproval",testId:"switch-event-waitingApproval",checked:ew.waitingApproval,onChange:e=>{let t={...ew,waitingApproval:e};eb(t),b(eH({events:t}))}}),(0,t.jsx)(tK,{label:"Agent completed",id:"notif-event-agentCompleted",testId:"switch-event-agentCompleted",checked:ew.agentCompleted,onChange:e=>{let t={...ew,agentCompleted:e};eb(t),b(eH({events:t}))}}),(0,t.jsx)(tK,{label:"Agent failed",id:"notif-event-agentFailed",testId:"switch-event-agentFailed",checked:ew.agentFailed,onChange:e=>{let t={...ew,agentFailed:e};eb(t),b(eH({events:t}))}}),(0,t.jsx)(t$,{children:"Pull Request Events"}),(0,t.jsx)(tK,{label:"PR merged",id:"notif-event-prMerged",testId:"switch-event-prMerged",checked:ew.prMerged,onChange:e=>{let t={...ew,prMerged:e};eb(t),b(eH({events:t}))}}),(0,t.jsx)(tK,{label:"PR closed",id:"notif-event-prClosed",testId:"switch-event-prClosed",checked:ew.prClosed,onChange:e=>{let t={...ew,prClosed:e};eb(t),b(eH({events:t}))}}),(0,t.jsx)(tK,{label:"PR checks passed",id:"notif-event-prChecksPassed",testId:"switch-event-prChecksPassed",checked:ew.prChecksPassed,onChange:e=>{let t={...ew,prChecksPassed:e};eb(t),b(eH({events:t}))}}),(0,t.jsx)(tK,{label:"PR checks failed",id:"notif-event-prChecksFailed",testId:"switch-event-prChecksFailed",checked:ew.prChecksFailed,onChange:e=>{let t={...ew,prChecksFailed:e};eb(t),b(eH({events:t}))}}),(0,t.jsx)(tK,{label:"PR blocked",id:"notif-event-prBlocked",testId:"switch-event-prBlocked",checked:ew.prBlocked,onChange:e=>{let t={...ew,prBlocked:e};eb(t),b(eH({events:t}))}}),(0,t.jsx)(tK,{label:"Merge review ready",id:"notif-event-mergeReviewReady",testId:"switch-event-mergeReviewReady",checked:ew.mergeReviewReady,onChange:e=>{let t={...ew,mergeReviewReady:e};eb(t),b(eH({events:t}))}})]}),(0,t.jsx)(tY,{links:[{label:"Notification system",href:"https://github.com/shep-ai/cli/blob/main/specs/021-agent-notifications/spec.yaml"}],children:"In-app toast notifications keep you in the loop. Fine-tune which agent lifecycle events trigger a notification."})]}),(0,t.jsxs)("div",{id:"section-feature-flags",className:"grid scroll-mt-18 grid-cols-1 gap-x-5 rounded-lg lg:grid-cols-[1fr_280px]",children:[(0,t.jsxs)(tq,{icon:c,title:"Feature Flags",description:"Enable or disable experimental features",badge:"Experimental",testId:"feature-flags-settings-section",children:[(0,t.jsx)(tK,{label:"Skills",description:"Enable the skills system for agent capabilities",id:"flag-skills",testId:"switch-flag-skills",checked:ey.skills,onChange:e=>{let t={...ey,skills:e};eS(t),b({featureFlags:t})}}),(0,t.jsx)(tK,{label:"Deployments",description:"Enable environment deployment workflows",id:"flag-envDeploy",testId:"switch-flag-envDeploy",checked:ey.envDeploy,onChange:e=>{let t={...ey,envDeploy:e};eS(t),b({featureFlags:t})}}),(0,t.jsx)(tK,{label:"Debug",description:"Show debug panels and verbose logging",id:"flag-debug",testId:"switch-flag-debug",checked:ey.debug,onChange:e=>{let t={...ey,debug:e};eS(t),b({featureFlags:t})}}),(0,t.jsx)(tK,{label:"GitHub Import",description:"Enable GitHub repository import in the web UI",id:"flag-githubImport",testId:"switch-flag-githubImport",checked:ey.githubImport,onChange:e=>{let t={...ey,githubImport:e};eS(t),b({featureFlags:t})}}),(0,t.jsx)(tK,{label:"Adopt Branch",description:"Import existing branches as tracked features",id:"flag-adoptBranch",testId:"switch-flag-adoptBranch",checked:ey.adoptBranch,onChange:e=>{let t={...ey,adoptBranch:e};eS(t),b({featureFlags:t})}})]}),(0,t.jsx)(tY,{children:"Experimental features that are still under development. Enable at your own risk — they may change or be removed in future versions. Debug mode adds verbose logging useful for troubleshooting."})]}),(0,t.jsxs)("div",{id:"section-database",className:"grid scroll-mt-18 grid-cols-1 gap-x-5 rounded-lg lg:grid-cols-[1fr_280px]",children:[(0,t.jsxs)(tq,{icon:u,title:"Database",description:"Local storage information",testId:"database-settings-section",children:[(0,t.jsx)(tU,{label:"Location",description:"Path to the local SQLite database",children:(0,t.jsx)("span",{className:"text-muted-foreground max-w-50 truncate font-mono text-xs","data-testid":"shep-home-path",children:a})}),(0,t.jsx)(tU,{label:"Size",children:(0,t.jsx)("span",{className:"text-muted-foreground text-xs","data-testid":"db-file-size",children:p})})]}),(0,t.jsx)(tY,{links:[{label:"Settings service",href:"https://github.com/shep-ai/cli/blob/main/docs/architecture/settings-service.md"},{label:"Settings spec",href:"https://github.com/shep-ai/cli/blob/main/specs/005-global-settings-service/spec.md"}],children:"All settings are stored in a local SQLite database at ~/.shep/data. The database uses a singleton record pattern with automatic migrations on startup."})]})]})]})}e.s(["SettingsPageClient",()=>tZ],41952)}]);
@@ -1 +1 @@
1
- (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,10714,99105,e=>{"use strict";var t=e.i(3645);let r=(0,t.default)("minus",[["path",{d:"M5 12h14",key:"1ays0h"}]]);e.s(["default",()=>r],10714);let a=(0,t.default)("chevron-down",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);e.s(["ChevronDown",()=>a],99105)},33548,e=>{"use strict";let t=(0,e.i(3645).default)("copy",[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]]);e.s(["Copy",()=>t],33548)},95812,35e3,e=>{"use strict";let t=(0,e.i(3645).default)("circle",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]]);e.s(["Circle",()=>t],95812);var r=e.i(80986);e.s(["CheckCircle2",()=>r.default],35e3)},19933,e=>{"use strict";let t=(0,e.i(3645).default)("folder-open",[["path",{d:"m6 14 1.5-2.9A2 2 0 0 1 9.24 10H20a2 2 0 0 1 1.94 2.5l-1.54 6a2 2 0 0 1-1.95 1.5H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H18a2 2 0 0 1 2 2v2",key:"usdka0"}]]);e.s(["FolderOpen",()=>t],19933)},8986,85037,65211,37738,e=>{"use strict";let t=(0,e.i(3645).default)("code-xml",[["path",{d:"m18 16 4-4-4-4",key:"1inbqp"}],["path",{d:"m6 8-4 4 4 4",key:"15zrgr"}],["path",{d:"m14.5 4-5 16",key:"e7oirm"}]]);e.s(["Code2",()=>t],8986);var r=e.i(21023);let a=(0,r.createServerReference)("40bf3a995abaac5ef3ea5202095661d2167dbf970a",r.callServer,void 0,r.findSourceMapURL,"openIde");e.s(["openIde",()=>a],85037);let l=(0,r.createServerReference)("40513967febf81a622bcd65b2abcb4efabed97ecca",r.callServer,void 0,r.findSourceMapURL,"openShell");e.s(["openShell",()=>l],65211);let c=(0,r.createServerReference)("407cb074156bb22c5eb0fbe73169beda5111897e76",r.callServer,void 0,r.findSourceMapURL,"openFolder");e.s(["openFolder",()=>c],37738)},16298,e=>{"use strict";let t=(0,e.i(3645).default)("file-text",[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]]);e.s(["default",()=>t])},53360,e=>{"use strict";let t=(0,e.i(3645).default)("zap",[["path",{d:"M4 14a1 1 0 0 1-.78-1.63l9.9-10.2a.5.5 0 0 1 .86.46l-1.92 6.02A1 1 0 0 0 13 10h7a1 1 0 0 1 .78 1.63l-9.9 10.2a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14z",key:"1xq2db"}]]);e.s(["Zap",()=>t],53360)},23405,e=>{"use strict";var t=e.i(79054);function r(e){let r=t.useRef({value:e,previous:e});return t.useMemo(()=>(r.current.value!==e&&(r.current.previous=r.current.value,r.current.value=e),r.current.previous),[e])}e.s(["usePrevious",()=>r])},76016,e=>{"use strict";let t=(0,e.i(3645).default)("chevron-right",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);e.s(["ChevronRight",()=>t],76016)},11345,e=>{"use strict";let t=(0,e.i(3645).default)("chevron-left",[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]]);e.s(["ChevronLeft",()=>t],11345)},97667,e=>{"use strict";var t=e.i(1012);e.s(["CheckIcon",()=>t.default])},23925,1012,e=>{"use strict";let t=(0,e.i(3645).default)("check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);e.s(["default",()=>t],1012),e.s(["Check",()=>t],23925)},30702,e=>{"use strict";let t=(0,e.i(3645).default)("external-link",[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]]);e.s(["ExternalLink",()=>t],30702)},38573,e=>{"use strict";let t=(0,e.i(3645).default)("terminal",[["path",{d:"M12 19h8",key:"baeox8"}],["path",{d:"m4 17 6-6-6-6",key:"1yngyt"}]]);e.s(["Terminal",()=>t],38573)},1650,e=>{"use strict";e.i(11495),e.s([])},54793,7729,e=>{"use strict";var t=e.i(20314),r=e.i(31777);function a({icon:e,title:a,description:l,action:c,className:s,...u}){return(0,t.jsxs)("div",{className:(0,r.cn)("flex flex-col items-center gap-4 px-4 py-12 text-center",s),...u,children:[e?(0,t.jsx)("div",{className:"text-muted-foreground",children:e}):null,(0,t.jsx)("h3",{className:"text-lg font-semibold",children:a}),l?(0,t.jsx)("p",{className:"text-muted-foreground max-w-md text-sm",children:l}):null,c?(0,t.jsx)("div",{className:"mt-2",children:c}):null]})}e.s(["EmptyState",()=>a],7729),e.s([],54793)},10321,5258,e=>{"use strict";var t=e.i(21023);let r=(0,t.createServerReference)("00109ebab76d3537ecdb74b2e5d04afb49bb4e59cf",t.callServer,void 0,t.findSourceMapURL,"getAllAgentModels");e.s(["getAllAgentModels",()=>r],10321);let a=(0,t.createServerReference)("6070e07d34ceb87786c004279c8dfc5ff6f8c16232",t.callServer,void 0,t.findSourceMapURL,"updateAgentAndModel");e.s(["updateAgentAndModel",()=>a],5258)},81767,e=>{"use strict";var t=e.i(21023);let r=(0,t.createServerReference)("40e3ca1c82fed1114fd95a0c22e3a93d14efa35289",t.callServer,void 0,t.findSourceMapURL,"addRepository");e.s(["addRepository",()=>r])},76852,e=>{"use strict";var t=e.i(79054),r=e.i(85037),a=e.i(65211),l=e.i(37738);function c(e){let[c,s]=(0,t.useState)(!1),[u,i]=(0,t.useState)(!1),[d,n]=(0,t.useState)(!1),[o,f]=(0,t.useState)(null),[p,h]=(0,t.useState)(null),[v,y]=(0,t.useState)(null),m=(0,t.useRef)(null),b=(0,t.useRef)(null),k=(0,t.useRef)(null);(0,t.useEffect)(()=>()=>{m.current&&clearTimeout(m.current),b.current&&clearTimeout(b.current),k.current&&clearTimeout(k.current)},[]);let S=(0,t.useCallback)(async(t,r,a,l,c)=>{if(e&&!c){l.current&&clearTimeout(l.current),r(!0),a(null);try{let e=await t();if(!e.success){let t=e.error??"An unexpected error occurred";a(t),l.current=setTimeout(()=>a(null),5e3)}}catch(e){a(e instanceof Error?e.message:"An unexpected error occurred"),l.current=setTimeout(()=>a(null),5e3)}finally{r(!1)}}},[e]);return{openInIde:(0,t.useCallback)(()=>S(()=>(0,r.openIde)({repositoryPath:e.repositoryPath}),s,f,m,c),[S,c,e]),openInShell:(0,t.useCallback)(()=>S(()=>(0,a.openShell)({repositoryPath:e.repositoryPath}),i,h,b,u),[S,u,e]),openFolder:(0,t.useCallback)(()=>S(()=>(0,l.openFolder)(e.repositoryPath),n,y,k,d),[S,d,e]),ideLoading:c,shellLoading:u,folderLoading:d,ideError:o,shellError:p,folderError:v}}e.s(["useRepositoryActions",()=>c])}]);
1
+ (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,10714,99105,e=>{"use strict";var t=e.i(3645);let r=(0,t.default)("minus",[["path",{d:"M5 12h14",key:"1ays0h"}]]);e.s(["default",()=>r],10714);let a=(0,t.default)("chevron-down",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);e.s(["ChevronDown",()=>a],99105)},33548,e=>{"use strict";let t=(0,e.i(3645).default)("copy",[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]]);e.s(["Copy",()=>t],33548)},95812,35e3,e=>{"use strict";let t=(0,e.i(3645).default)("circle",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]]);e.s(["Circle",()=>t],95812);var r=e.i(80986);e.s(["CheckCircle2",()=>r.default],35e3)},19933,e=>{"use strict";let t=(0,e.i(3645).default)("folder-open",[["path",{d:"m6 14 1.5-2.9A2 2 0 0 1 9.24 10H20a2 2 0 0 1 1.94 2.5l-1.54 6a2 2 0 0 1-1.95 1.5H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H18a2 2 0 0 1 2 2v2",key:"usdka0"}]]);e.s(["FolderOpen",()=>t],19933)},8986,85454,16144,81966,e=>{"use strict";let t=(0,e.i(3645).default)("code-xml",[["path",{d:"m18 16 4-4-4-4",key:"1inbqp"}],["path",{d:"m6 8-4 4 4 4",key:"15zrgr"}],["path",{d:"m14.5 4-5 16",key:"e7oirm"}]]);e.s(["Code2",()=>t],8986);var r=e.i(21023);let a=(0,r.createServerReference)("404c4d5cb6f45216873e999bc52c3adffbba9aafed",r.callServer,void 0,r.findSourceMapURL,"openIde");e.s(["openIde",()=>a],85454);let l=(0,r.createServerReference)("400352d2cc4333d63b1ab2b1236f2b01eb852de916",r.callServer,void 0,r.findSourceMapURL,"openShell");e.s(["openShell",()=>l],16144);let c=(0,r.createServerReference)("4082b093a74ed6f8abf7699fa6762f530d8fb35e9c",r.callServer,void 0,r.findSourceMapURL,"openFolder");e.s(["openFolder",()=>c],81966)},16298,e=>{"use strict";let t=(0,e.i(3645).default)("file-text",[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]]);e.s(["default",()=>t])},53360,e=>{"use strict";let t=(0,e.i(3645).default)("zap",[["path",{d:"M4 14a1 1 0 0 1-.78-1.63l9.9-10.2a.5.5 0 0 1 .86.46l-1.92 6.02A1 1 0 0 0 13 10h7a1 1 0 0 1 .78 1.63l-9.9 10.2a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14z",key:"1xq2db"}]]);e.s(["Zap",()=>t],53360)},23405,e=>{"use strict";var t=e.i(79054);function r(e){let r=t.useRef({value:e,previous:e});return t.useMemo(()=>(r.current.value!==e&&(r.current.previous=r.current.value,r.current.value=e),r.current.previous),[e])}e.s(["usePrevious",()=>r])},76016,e=>{"use strict";let t=(0,e.i(3645).default)("chevron-right",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);e.s(["ChevronRight",()=>t],76016)},11345,e=>{"use strict";let t=(0,e.i(3645).default)("chevron-left",[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]]);e.s(["ChevronLeft",()=>t],11345)},97667,e=>{"use strict";var t=e.i(1012);e.s(["CheckIcon",()=>t.default])},23925,1012,e=>{"use strict";let t=(0,e.i(3645).default)("check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);e.s(["default",()=>t],1012),e.s(["Check",()=>t],23925)},30702,e=>{"use strict";let t=(0,e.i(3645).default)("external-link",[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]]);e.s(["ExternalLink",()=>t],30702)},38573,e=>{"use strict";let t=(0,e.i(3645).default)("terminal",[["path",{d:"M12 19h8",key:"baeox8"}],["path",{d:"m4 17 6-6-6-6",key:"1yngyt"}]]);e.s(["Terminal",()=>t],38573)},1650,e=>{"use strict";e.i(11495),e.s([])},54793,7729,e=>{"use strict";var t=e.i(20314),r=e.i(31777);function a({icon:e,title:a,description:l,action:c,className:s,...u}){return(0,t.jsxs)("div",{className:(0,r.cn)("flex flex-col items-center gap-4 px-4 py-12 text-center",s),...u,children:[e?(0,t.jsx)("div",{className:"text-muted-foreground",children:e}):null,(0,t.jsx)("h3",{className:"text-lg font-semibold",children:a}),l?(0,t.jsx)("p",{className:"text-muted-foreground max-w-md text-sm",children:l}):null,c?(0,t.jsx)("div",{className:"mt-2",children:c}):null]})}e.s(["EmptyState",()=>a],7729),e.s([],54793)},12889,96518,e=>{"use strict";var t=e.i(21023);let r=(0,t.createServerReference)("001c4054b571a3b51c55e27c995470c13395468f9c",t.callServer,void 0,t.findSourceMapURL,"getAllAgentModels");e.s(["getAllAgentModels",()=>r],12889);let a=(0,t.createServerReference)("6075422bb42c702e5ac85a7609397aa96267991445",t.callServer,void 0,t.findSourceMapURL,"updateAgentAndModel");e.s(["updateAgentAndModel",()=>a],96518)},12246,e=>{"use strict";var t=e.i(21023);let r=(0,t.createServerReference)("40945a222fd5b248c15b01284275d0cd190e352b98",t.callServer,void 0,t.findSourceMapURL,"addRepository");e.s(["addRepository",()=>r])},76852,e=>{"use strict";var t=e.i(79054),r=e.i(85454),a=e.i(16144),l=e.i(81966);function c(e){let[c,s]=(0,t.useState)(!1),[u,i]=(0,t.useState)(!1),[n,d]=(0,t.useState)(!1),[o,f]=(0,t.useState)(null),[p,h]=(0,t.useState)(null),[v,y]=(0,t.useState)(null),m=(0,t.useRef)(null),k=(0,t.useRef)(null),b=(0,t.useRef)(null);(0,t.useEffect)(()=>()=>{m.current&&clearTimeout(m.current),k.current&&clearTimeout(k.current),b.current&&clearTimeout(b.current)},[]);let S=(0,t.useCallback)(async(t,r,a,l,c)=>{if(e&&!c){l.current&&clearTimeout(l.current),r(!0),a(null);try{let e=await t();if(!e.success){let t=e.error??"An unexpected error occurred";a(t),l.current=setTimeout(()=>a(null),5e3)}}catch(e){a(e instanceof Error?e.message:"An unexpected error occurred"),l.current=setTimeout(()=>a(null),5e3)}finally{r(!1)}}},[e]);return{openInIde:(0,t.useCallback)(()=>S(()=>(0,r.openIde)({repositoryPath:e.repositoryPath}),s,f,m,c),[S,c,e]),openInShell:(0,t.useCallback)(()=>S(()=>(0,a.openShell)({repositoryPath:e.repositoryPath}),i,h,k,u),[S,u,e]),openFolder:(0,t.useCallback)(()=>S(()=>(0,l.openFolder)(e.repositoryPath),d,y,b,n),[S,n,e]),ideLoading:c,shellLoading:u,folderLoading:n,ideError:o,shellError:p,folderError:v}}e.s(["useRepositoryActions",()=>c])}]);
@@ -0,0 +1 @@
1
+ (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,58860,44229,e=>{"use strict";let t=(0,e.i(3645).default)("timer",[["line",{x1:"10",x2:"14",y1:"2",y2:"2",key:"14vaq8"}],["line",{x1:"12",x2:"15",y1:"14",y2:"11",key:"17fdiu"}],["circle",{cx:"12",cy:"14",r:"8",key:"1e1u0o"}]]);e.s(["Timer",()=>t],58860);var r=e.i(93752);e.s(["Code",()=>r.default],44229)},10714,99105,e=>{"use strict";var t=e.i(3645);let r=(0,t.default)("minus",[["path",{d:"M5 12h14",key:"1ays0h"}]]);e.s(["default",()=>r],10714);let o=(0,t.default)("chevron-down",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);e.s(["ChevronDown",()=>o],99105)},38573,e=>{"use strict";let t=(0,e.i(3645).default)("terminal",[["path",{d:"M12 19h8",key:"baeox8"}],["path",{d:"m4 17 6-6-6-6",key:"1yngyt"}]]);e.s(["Terminal",()=>t],38573)},30702,e=>{"use strict";let t=(0,e.i(3645).default)("external-link",[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]]);e.s(["ExternalLink",()=>t],30702)},23925,1012,e=>{"use strict";let t=(0,e.i(3645).default)("check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);e.s(["default",()=>t],1012),e.s(["Check",()=>t],23925)},23405,e=>{"use strict";var t=e.i(79054);function r(e){let r=t.useRef({value:e,previous:e});return t.useMemo(()=>(r.current.value!==e&&(r.current.previous=r.current.value,r.current.value=e),r.current.previous),[e])}e.s(["usePrevious",()=>r])},11345,e=>{"use strict";let t=(0,e.i(3645).default)("chevron-left",[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]]);e.s(["ChevronLeft",()=>t],11345)},76016,e=>{"use strict";let t=(0,e.i(3645).default)("chevron-right",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);e.s(["ChevronRight",()=>t],76016)},93752,e=>{"use strict";let t=(0,e.i(3645).default)("code",[["path",{d:"m16 18 6-6-6-6",key:"eg8j8"}],["path",{d:"m8 6-6 6 6 6",key:"ppft3o"}]]);e.s(["default",()=>t])},83902,e=>{"use strict";let t=(0,e.i(3645).default)("rocket",[["path",{d:"M4.5 16.5c-1.5 1.26-2 5-2 5s3.74-.5 5-2c.71-.84.7-2.13-.09-2.91a2.18 2.18 0 0 0-2.91-.09z",key:"m3kijz"}],["path",{d:"m12 15-3-3a22 22 0 0 1 2-3.95A12.88 12.88 0 0 1 22 2c0 2.72-.78 7.5-6 11a22.35 22.35 0 0 1-4 2z",key:"1fmvmk"}],["path",{d:"M9 12H4s.55-3.03 2-4c1.62-1.08 5 0 5 0",key:"1f8sc4"}],["path",{d:"M12 15v5s3.03-.55 4-2c1.08-1.62 0-5 0-5",key:"qeys4"}]]);e.s(["Rocket",()=>t],83902)},90382,e=>{"use strict";var t=e.i(20314),r=e.i(79054),o=e.i(91967),a=e.i(5978),n=e.i(22528),s=e.i(53532),i=e.i(41687),l=e.i(56720),c=e.i(13123),d=e.i(52740),u=e.i(39979),p=e.i(85995),h=e.i(87620),f=e.i(86874),m=e.i(36589),v=e.i(73772),x=e.i(13044),g="Popover",[b,y]=(0,n.createContextScope)(g,[d.createPopperScope]),k=(0,d.createPopperScope)(),[w,j]=b(g),C=e=>{let{__scopePopover:o,children:a,open:n,defaultOpen:s,onOpenChange:i,modal:l=!1}=e,u=k(o),p=r.useRef(null),[h,f]=r.useState(!1),[v,x]=(0,m.useControllableState)({prop:n,defaultProp:s??!1,onChange:i,caller:g});return(0,t.jsx)(d.Root,{...u,children:(0,t.jsx)(w,{scope:o,contentId:(0,c.useId)(),triggerRef:p,open:v,onOpenChange:x,onOpenToggle:r.useCallback(()=>x(e=>!e),[x]),hasCustomAnchor:h,onCustomAnchorAdd:r.useCallback(()=>f(!0),[]),onCustomAnchorRemove:r.useCallback(()=>f(!1),[]),modal:l,children:a})})};C.displayName=g;var P="PopoverAnchor",R=r.forwardRef((e,o)=>{let{__scopePopover:a,...n}=e,s=j(P,a),i=k(a),{onCustomAnchorAdd:l,onCustomAnchorRemove:c}=s;return r.useEffect(()=>(l(),()=>c()),[l,c]),(0,t.jsx)(d.Anchor,{...i,...n,ref:o})});R.displayName=P;var N="PopoverTrigger",A=r.forwardRef((e,r)=>{let{__scopePopover:n,...s}=e,i=j(N,n),l=k(n),c=(0,a.useComposedRefs)(r,i.triggerRef),u=(0,t.jsx)(h.Primitive.button,{type:"button","aria-haspopup":"dialog","aria-expanded":i.open,"aria-controls":i.contentId,"data-state":U(i.open),...s,ref:c,onClick:(0,o.composeEventHandlers)(e.onClick,i.onOpenToggle)});return i.hasCustomAnchor?u:(0,t.jsx)(d.Anchor,{asChild:!0,...l,children:u})});A.displayName=N;var S="PopoverPortal",[T,M]=b(S,{forceMount:void 0}),E=e=>{let{__scopePopover:r,forceMount:o,children:a,container:n}=e,s=j(S,r);return(0,t.jsx)(T,{scope:r,forceMount:o,children:(0,t.jsx)(p.Presence,{present:o||s.open,children:(0,t.jsx)(u.Portal,{asChild:!0,container:n,children:a})})})};E.displayName=S;var F="PopoverContent",O=r.forwardRef((e,r)=>{let o=M(F,e.__scopePopover),{forceMount:a=o.forceMount,...n}=e,s=j(F,e.__scopePopover);return(0,t.jsx)(p.Presence,{present:a||s.open,children:s.modal?(0,t.jsx)(D,{...n,ref:r}):(0,t.jsx)(I,{...n,ref:r})})});O.displayName=F;var z=(0,f.createSlot)("PopoverContent.RemoveScroll"),D=r.forwardRef((e,n)=>{let s=j(F,e.__scopePopover),i=r.useRef(null),l=(0,a.useComposedRefs)(n,i),c=r.useRef(!1);return r.useEffect(()=>{let e=i.current;if(e)return(0,v.hideOthers)(e)},[]),(0,t.jsx)(x.RemoveScroll,{as:z,allowPinchZoom:!0,children:(0,t.jsx)(q,{...e,ref:l,trapFocus:s.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:(0,o.composeEventHandlers)(e.onCloseAutoFocus,e=>{e.preventDefault(),c.current||s.triggerRef.current?.focus()}),onPointerDownOutside:(0,o.composeEventHandlers)(e.onPointerDownOutside,e=>{let t=e.detail.originalEvent,r=0===t.button&&!0===t.ctrlKey;c.current=2===t.button||r},{checkForDefaultPrevented:!1}),onFocusOutside:(0,o.composeEventHandlers)(e.onFocusOutside,e=>e.preventDefault(),{checkForDefaultPrevented:!1})})})}),I=r.forwardRef((e,o)=>{let a=j(F,e.__scopePopover),n=r.useRef(!1),s=r.useRef(!1);return(0,t.jsx)(q,{...e,ref:o,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:t=>{e.onCloseAutoFocus?.(t),t.defaultPrevented||(n.current||a.triggerRef.current?.focus(),t.preventDefault()),n.current=!1,s.current=!1},onInteractOutside:t=>{e.onInteractOutside?.(t),t.defaultPrevented||(n.current=!0,"pointerdown"===t.detail.originalEvent.type&&(s.current=!0));let r=t.target;a.triggerRef.current?.contains(r)&&t.preventDefault(),"focusin"===t.detail.originalEvent.type&&s.current&&t.preventDefault()}})}),q=r.forwardRef((e,r)=>{let{__scopePopover:o,trapFocus:a,onOpenAutoFocus:n,onCloseAutoFocus:c,disableOutsidePointerEvents:u,onEscapeKeyDown:p,onPointerDownOutside:h,onFocusOutside:f,onInteractOutside:m,...v}=e,x=j(F,o),g=k(o);return(0,i.useFocusGuards)(),(0,t.jsx)(l.FocusScope,{asChild:!0,loop:!0,trapped:a,onMountAutoFocus:n,onUnmountAutoFocus:c,children:(0,t.jsx)(s.DismissableLayer,{asChild:!0,disableOutsidePointerEvents:u,onInteractOutside:m,onEscapeKeyDown:p,onPointerDownOutside:h,onFocusOutside:f,onDismiss:()=>x.onOpenChange(!1),children:(0,t.jsx)(d.Content,{"data-state":U(x.open),role:"dialog",id:x.contentId,...g,...v,ref:r,style:{...v.style,"--radix-popover-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-popover-content-available-width":"var(--radix-popper-available-width)","--radix-popover-content-available-height":"var(--radix-popper-available-height)","--radix-popover-trigger-width":"var(--radix-popper-anchor-width)","--radix-popover-trigger-height":"var(--radix-popper-anchor-height)"}})})})}),H="PopoverClose",L=r.forwardRef((e,r)=>{let{__scopePopover:a,...n}=e,s=j(H,a);return(0,t.jsx)(h.Primitive.button,{type:"button",...n,ref:r,onClick:(0,o.composeEventHandlers)(e.onClick,()=>s.onOpenChange(!1))})});L.displayName=H;var _=r.forwardRef((e,r)=>{let{__scopePopover:o,...a}=e,n=k(o);return(0,t.jsx)(d.Arrow,{...n,...a,ref:r})});function U(e){return e?"open":"closed"}_.displayName="PopoverArrow",e.s(["Anchor",()=>R,"Arrow",()=>_,"Close",()=>L,"Content",()=>O,"Popover",()=>C,"PopoverAnchor",()=>R,"PopoverArrow",()=>_,"PopoverClose",()=>L,"PopoverContent",()=>O,"PopoverPortal",()=>E,"PopoverTrigger",()=>A,"Portal",()=>E,"Root",()=>C,"Trigger",()=>A,"createPopoverScope",()=>y],89920);var B=e.i(89920),B=B,K=e.i(31777);let X=B.Root,G=B.Trigger;B.Anchor;let V=r.forwardRef(({className:e,align:r="center",sideOffset:o=4,...a},n)=>(0,t.jsx)(B.Portal,{children:(0,t.jsx)(B.Content,{ref:n,align:r,sideOffset:o,className:(0,K.cn)("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 w-72 rounded-md border p-4 shadow-md outline-none",e),...a})}));V.displayName=B.Content.displayName,e.s(["Popover",()=>X,"PopoverContent",()=>V,"PopoverTrigger",()=>G],90382)},12889,96518,e=>{"use strict";var t=e.i(21023);let r=(0,t.createServerReference)("001c4054b571a3b51c55e27c995470c13395468f9c",t.callServer,void 0,t.findSourceMapURL,"getAllAgentModels");e.s(["getAllAgentModels",()=>r],12889);let o=(0,t.createServerReference)("6075422bb42c702e5ac85a7609397aa96267991445",t.callServer,void 0,t.findSourceMapURL,"updateAgentAndModel");e.s(["updateAgentAndModel",()=>o],96518)},51911,41413,e=>{"use strict";var t=e.i(20314),r=e.i(79054),o=e.i(91967),a=e.i(5978),n=e.i(22528),s=e.i(36589),i=e.i(23405),l=e.i(77624),c=e.i(87620),d="Switch",[u,p]=(0,n.createContextScope)(d),[h,f]=u(d),m=r.forwardRef((e,n)=>{let{__scopeSwitch:i,name:l,checked:u,defaultChecked:p,required:f,disabled:m,value:v="on",onCheckedChange:x,form:y,...k}=e,[w,j]=r.useState(null),C=(0,a.useComposedRefs)(n,e=>j(e)),P=r.useRef(!1),R=!w||y||!!w.closest("form"),[N,A]=(0,s.useControllableState)({prop:u,defaultProp:p??!1,onChange:x,caller:d});return(0,t.jsxs)(h,{scope:i,checked:N,disabled:m,children:[(0,t.jsx)(c.Primitive.button,{type:"button",role:"switch","aria-checked":N,"aria-required":f,"data-state":b(N),"data-disabled":m?"":void 0,disabled:m,value:v,...k,ref:C,onClick:(0,o.composeEventHandlers)(e.onClick,e=>{A(e=>!e),R&&(P.current=e.isPropagationStopped(),P.current||e.stopPropagation())})}),R&&(0,t.jsx)(g,{control:w,bubbles:!P.current,name:l,value:v,checked:N,required:f,disabled:m,form:y,style:{transform:"translateX(-100%)"}})]})});m.displayName=d;var v="SwitchThumb",x=r.forwardRef((e,r)=>{let{__scopeSwitch:o,...a}=e,n=f(v,o);return(0,t.jsx)(c.Primitive.span,{"data-state":b(n.checked),"data-disabled":n.disabled?"":void 0,...a,ref:r})});x.displayName=v;var g=r.forwardRef(({__scopeSwitch:e,control:o,checked:n,bubbles:s=!0,...c},d)=>{let u=r.useRef(null),p=(0,a.useComposedRefs)(u,d),h=(0,i.usePrevious)(n),f=(0,l.useSize)(o);return r.useEffect(()=>{let e=u.current;if(!e)return;let t=Object.getOwnPropertyDescriptor(window.HTMLInputElement.prototype,"checked").set;if(h!==n&&t){let r=new Event("click",{bubbles:s});t.call(e,n),e.dispatchEvent(r)}},[h,n,s]),(0,t.jsx)("input",{type:"checkbox","aria-hidden":!0,defaultChecked:n,...c,tabIndex:-1,ref:p,style:{...c.style,...f,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})});function b(e){return e?"checked":"unchecked"}g.displayName="SwitchBubbleInput",e.s(["Root",()=>m,"Switch",()=>m,"SwitchThumb",()=>x,"Thumb",()=>x,"createSwitchScope",()=>p],95291);var y=e.i(95291),y=y,k=e.i(31777);function w({className:e,size:r="default",...o}){return(0,t.jsx)(y.Root,{"data-slot":"switch","data-size":r,className:(0,k.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),...o,children:(0,t.jsx)(y.Thumb,{"data-slot":"switch-thumb",className:(0,k.cn)("bg-background dark:data-[state=checked]:bg-primary-foreground dark:data-[state=unchecked]:bg-foreground pointer-events-none block rounded-full ring-0 transition-transform group-data-[size=default]/switch:size-4 group-data-[size=sm]/switch:size-3 data-[state=checked]:translate-x-[calc(100%-2px)] data-[state=unchecked]:translate-x-0")})})}e.s(["Switch",()=>w],51911);var j=e.i(23925),C=e.i(11345),P=e.i(76016),R=e.i(12889),N=e.i(96518),A=e.i(86782),S=e.i(29847),T=e.i(35364),M=e.i(90382);function E({initialAgentType:e,initialModel:o,onAgentModelChange:a,disabled:n,className:s,mode:i}){let[l,c]=r.useState(!1),[d,u]=r.useState([]),[p,h]=r.useState(!0),[f,m]=r.useState(e),[v,x]=r.useState(o),[g,b]=r.useState(null),[y,w]=r.useState(0),[E,F]=r.useState(null);r.useEffect(()=>{(0,R.getAllAgentModels)().then(u).finally(()=>h(!1))},[]),r.useEffect(()=>{if(!l){let e=setTimeout(()=>{w(0),F(null)},150);return()=>clearTimeout(e)}},[l]);let O=async(e,t)=>{if(c(!1),e!==f||t!==v){if("override"===i){m(e),x(t),a?.(e,t);return}m(e),x(t),a?.(e,t),b(null);try{let r=await (0,N.updateAgentAndModel)(e,t||null);r.ok||(m(f),x(v),a?.(f,v),b(r.error??"Failed to save"))}catch{m(f),x(v),a?.(f,v),b("Failed to save")}}},z=(0,A.getAgentTypeIcon)(f),D=d.find(e=>e.agentType===f)?.label??f,I=v?(0,S.getModelMeta)(v).displayName||v:null,q=E?d.find(e=>e.agentType===E):null;return(0,t.jsxs)("div",{className:(0,k.cn)("flex flex-col gap-1",s),children:[(0,t.jsxs)(M.Popover,{open:l,onOpenChange:c,children:[(0,t.jsx)(M.PopoverTrigger,{asChild:!0,children:(0,t.jsx)(T.Button,{variant:"outline",role:"combobox","aria-expanded":l,disabled:(n??!1)||p,className:"w-auto cursor-pointer justify-start font-normal hover:border-violet-300 hover:bg-violet-50/50 dark:hover:border-violet-700 dark:hover:bg-violet-950/30",children:(0,t.jsxs)("span",{className:"flex items-center gap-2 truncate",children:[(0,t.jsx)(z,{className:"h-4 w-4 shrink-0"}),p?"Loading…":(0,t.jsxs)("span",{className:"flex items-center gap-1",children:[(0,t.jsx)("span",{className:"text-muted-foreground text-xs",children:D}),I?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("span",{className:"text-muted-foreground/50 text-xs",children:"·"}),(0,t.jsx)("span",{className:"text-xs font-medium",children:I})]}):null]})]})})}),(0,t.jsx)(M.PopoverContent,{className:"w-(--radix-popover-trigger-width) overflow-hidden p-0",align:"start",children:(0,t.jsxs)("div",{className:"flex transition-transform duration-200 ease-in-out",style:{transform:`translateX(${1===y?"-50%":"0%"})`,width:"200%"},children:[(0,t.jsxs)("div",{className:"w-1/2 shrink-0",children:[(0,t.jsx)("div",{className:"text-muted-foreground border-b px-3 py-2 text-xs font-medium",children:"Select agent"}),d.map(e=>{let r=(0,A.getAgentTypeIcon)(e.agentType),o=f===e.agentType,a=e.models.length>0;return(0,t.jsxs)("button",{type:"button",className:(0,k.cn)("flex w-full cursor-pointer items-center gap-2.5 px-3 py-2 text-xs transition-colors","hover:bg-accent hover:text-accent-foreground",o&&"bg-accent/50"),onClick:()=>{a?(F(e.agentType),requestAnimationFrame(()=>{requestAnimationFrame(()=>w(1))})):O(e.agentType,"")},children:[(0,t.jsx)(r,{className:"h-4 w-4 shrink-0"}),(0,t.jsx)("span",{className:"flex-1 text-left",children:e.label}),o&&!a?(0,t.jsx)(j.Check,{className:"text-primary h-3.5 w-3.5 shrink-0"}):null,a?(0,t.jsx)(P.ChevronRight,{className:"text-muted-foreground h-3.5 w-3.5 shrink-0"}):null]},e.agentType)})]}),(0,t.jsx)("div",{className:"w-1/2 shrink-0",children:q?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)("button",{type:"button",className:"text-muted-foreground hover:text-foreground flex w-full cursor-pointer items-center gap-1.5 border-b px-3 py-2 text-xs font-medium transition-colors",onClick:()=>{w(0),setTimeout(()=>F(null),220)},children:[(0,t.jsx)(C.ChevronLeft,{className:"h-3.5 w-3.5"}),q.label]}),q.models.map(e=>{let r=f===q.agentType&&v===e.id;return(0,t.jsxs)("button",{type:"button",className:(0,k.cn)("flex w-full cursor-pointer items-center gap-3 px-3 py-2 text-left transition-colors","hover:bg-accent hover:text-accent-foreground",r&&"bg-accent/50"),onClick:()=>O(q.agentType,e.id),children:[(0,t.jsxs)("div",{className:"flex min-w-0 flex-1 flex-col",children:[(0,t.jsx)("span",{className:"text-xs font-medium",children:e.displayName}),(0,t.jsx)("span",{className:"text-muted-foreground text-xs",children:e.description})]}),r?(0,t.jsx)(j.Check,{className:"text-primary h-3.5 w-3.5 shrink-0"}):null]},e.id)})]}):null})]})})]}),!!g&&(0,t.jsx)("p",{className:"text-destructive text-sm",children:g})]})}e.s(["AgentModelPicker",()=>E],41413)}]);
@@ -1,4 +0,0 @@
1
- module.exports=[2157,(a,b,c)=>{b.exports=a.x("node:fs",()=>require("node:fs"))},12714,(a,b,c)=>{b.exports=a.x("node:fs/promises",()=>require("node:fs/promises"))},50227,(a,b,c)=>{b.exports=a.x("node:path",()=>require("node:path"))},60526,(a,b,c)=>{b.exports=a.x("node:os",()=>require("node:os"))},32278,a=>{"use strict";a.i(12714);var b=a.i(60526),c=a.i(50227);function d(){return process.env.SHEP_HOME??(0,c.join)((0,b.homedir)(),".shep")}a.i(2157),a.s(["getShepHomeDir",()=>d])},74533,(a,b,c)=>{b.exports=a.x("node:child_process",()=>require("node:child_process"))},96380,a=>{"use strict";function b(a){let b=globalThis.__shepContainer;if(!b)throw Error("DI container not available. Ensure the CLI bootstrap or dev-server has initialized it.");return b.resolve(a)}a.s(["resolve",()=>b])},92658,(a,b,c)=>{"use strict";Object.defineProperty(c,"__esModule",{value:!0}),Object.defineProperty(c,"registerServerReference",{enumerable:!0,get:function(){return d.registerServerReference}});let d=a.r(28478)},12581,(a,b,c)=>{"use strict";function d(a){for(let b=0;b<a.length;b++){let c=a[b];if("function"!=typeof c)throw Object.defineProperty(Error(`A "use server" file can only export async functions, found ${typeof c}.
2
- Read more: https://nextjs.org/docs/messages/invalid-use-server-value`),"__NEXT_ERROR_CODE",{value:"E352",enumerable:!1,configurable:!0})}}Object.defineProperty(c,"__esModule",{value:!0}),Object.defineProperty(c,"ensureServerEntryExports",{enumerable:!0,get:function(){return d}})},12513,73101,65324,a=>{"use strict";var b=a.i(92658),c=a.i(74533);let d={platform:process.platform,exec:(a,b)=>(0,c.execSync)(a,b)},e={darwin:"osascript -e 'POSIX path of (choose folder with prompt \"Select a repository folder\")'",linux:'zenity --file-selection --directory --title="Select a repository folder" 2>/dev/null',win32:"powershell -NoProfile -Command \"Add-Type -AssemblyName System.Windows.Forms; $f = New-Object System.Windows.Forms.FolderBrowserDialog; $f.Description = 'Select a repository folder'; if ($f.ShowDialog() -eq 'OK') { $f.SelectedPath } else { exit 1 }\""};class f{deps;constructor(a={}){this.deps={...d,...a}}getCommand(){return e[this.deps.platform]??null}pickFolder(){let a=this.getCommand();if(!a)throw Error(`Unsupported platform: ${this.deps.platform}`);try{let b=this.deps.exec(a,{encoding:"utf-8",timeout:6e4}).trim();return b.length>0?b:null}catch(a){var b;if("object"==typeof(b=a)&&null!==b&&"status"in b&&1===a.status)return null;throw a}}}var g=a.i(12581);async function h(){let a=new f;try{return{path:a.pickFolder()}}catch(a){return{path:null,error:a instanceof Error?a.message:"Failed to open folder dialog"}}}(0,g.ensureServerEntryExports)([h]),(0,b.registerServerReference)(h,"00754f17cc13603c4ddb32c248f2b13486ad8ae925",null),a.s(["pickFolder",()=>h],12513);var i=a.i(96380);class j extends Error{constructor(a,b){super(a),this.name="GitHubAuthError",Object.setPrototypeOf(this,new.target.prototype),b&&(this.cause=b)}}class k extends Error{constructor(a,b){super(a),this.name="GitHubCloneError",Object.setPrototypeOf(this,new.target.prototype),b&&(this.cause=b)}}class l extends Error{constructor(a,b){super(a),this.name="GitHubUrlParseError",Object.setPrototypeOf(this,new.target.prototype),b&&(this.cause=b)}}async function m(a){try{let b=(0,i.resolve)("ListGitHubRepositoriesUseCase");return{repos:await b.execute(a)}}catch(a){if(a instanceof j)return{error:"GitHub CLI is not authenticated. Run `gh auth login` to sign in."};return{error:a instanceof Error?a.message:"Failed to list repositories"}}}async function n(a){let{url:b,dest:c}=a;if(!b?.trim())return{error:"GitHub URL is required"};try{let a=(0,i.resolve)("ImportGitHubRepositoryUseCase");return{repository:await a.execute({url:b,dest:c})}}catch(a){if(a instanceof j)return{error:"GitHub CLI is not authenticated. Run `gh auth login` to sign in."};if(a instanceof l)return{error:`Invalid GitHub URL: ${a.message}`};if(a instanceof k)return{error:`Clone failed: ${a.message}`};return{error:a instanceof Error?a.message:"Failed to import repository"}}}(0,g.ensureServerEntryExports)([m]),(0,b.registerServerReference)(m,"4061e203003f14e76c569e64251f18ab10309b2c41",null),a.s(["listGitHubRepositories",()=>m],73101),(0,g.ensureServerEntryExports)([n]),(0,b.registerServerReference)(n,"40a34a6f1a6c4d7bda0f783cb5fa9aff0d14ac723a",null),a.s(["importGitHubRepository",()=>n],65324)},23504,27900,a=>{"use strict";var b=a.i(92658),c=a.i(96380);let d={"claude-opus-4-6":{displayName:"Opus 4.6",description:"Most capable, complex tasks"},"claude-sonnet-4-6":{displayName:"Sonnet 4.6",description:"Fast & balanced"},"claude-haiku-4-5":{displayName:"Haiku 4.5",description:"Lightweight & quick"},"gemini-3.1-pro":{displayName:"Gemini 3.1 Pro",description:"Advanced reasoning"},"gemini-3-flash":{displayName:"Gemini 3 Flash",description:"Ultra-fast responses"},"gemini-2.5-pro":{displayName:"Gemini 2.5 Pro",description:"Reliable workhorse"},"gemini-2.5-flash":{displayName:"Gemini 2.5 Flash",description:"Speed-optimized"},"gpt-5.4-high":{displayName:"GPT-5.4",description:"Latest reasoning model"},"gpt-5.2":{displayName:"GPT-5.2",description:"Flagship model"},"gpt-5.3-codex":{displayName:"GPT-5.3 Codex",description:"Code specialist"},"composer-1.5":{displayName:"Composer 1.5",description:"Multi-file editing"},"grok-code":{displayName:"Grok Code",description:"xAI code model"},"gpt-8":{displayName:"GPT-8",description:"Writes code before you think it"},"opus-7":{displayName:"Opus 7",description:"Achieved consciousness, ships on time"}},e={displayName:"",description:""};function f(a){let b=d[a];return b||{...e,displayName:a.replace(/^claude-/,"").replace(/^gemini-/,"Gemini ").replace(/^gpt-/,"GPT-").replace(/-/g," ").replace(/\b\w/g,a=>a.toUpperCase())}}var g=a.i(12581);let h={"claude-code":"Claude Code",cursor:"Cursor CLI","gemini-cli":"Gemini CLI",dev:"Demo"},i={"claude-code":0,cursor:1,"gemini-cli":2,dev:99};async function j(){try{let a=(0,c.resolve)("IAgentExecutorFactory");return a.getSupportedAgents().map(b=>({agentType:b,label:h[b]??b,models:a.getSupportedModels(b).map(a=>({id:a,...f(a)}))})).map(a=>"dev"===a.agentType&&0===a.models.length?{...a,models:[{id:"gpt-8",...f("gpt-8")},{id:"opus-7",...f("opus-7")}]}:a).filter(a=>a.models.length>0).sort((a,b)=>(i[a.agentType]??50)-(i[b.agentType]??50))}catch{return[]}}(0,g.ensureServerEntryExports)([j]),(0,b.registerServerReference)(j,"00109ebab76d3537ecdb74b2e5d04afb49bb4e59cf",null),a.s(["getAllAgentModels",()=>j],23504);var k=a.i(33244);async function l(a,b){if(!a.trim())return{ok:!1,error:"agent type is required"};try{let d=(0,c.resolve)("CompleteWebOnboardingUseCase"),e=await d.execute({agentType:a.trim(),model:b});return(0,k.resetSettings)(),(0,k.initializeSettings)(e),{ok:!0}}catch(a){return{ok:!1,error:a instanceof Error?a.message:"Failed to update agent and model"}}}(0,g.ensureServerEntryExports)([l]),(0,b.registerServerReference)(l,"6070e07d34ceb87786c004279c8dfc5ff6f8c16232",null),a.s(["updateAgentAndModel",()=>l],27900)},86561,79195,a=>{"use strict";var b=a.i(92658),c=a.i(2157),d=a.i(50227),e=a.i(96380),f=a.i(32278),g=a.i(12581);async function h(){try{let b=(0,e.resolve)("LoadSettingsUseCase"),g=await b.execute(),h=(0,f.getShepHomeDir)(),i="Unknown";try{var a;let b=(0,d.join)(h,"data");i=(a=(0,c.statSync)(b).size)<1024?`${a} B`:a<1048576?`${(a/1024).toFixed(1)} KB`:`${(a/1048576).toFixed(1)} MB`}catch{}return{settings:g,shepHome:h,dbFileSize:i}}catch(a){return{error:a instanceof Error?a.message:"Failed to load settings"}}}async function i(){try{let a=(0,e.resolve)("IToolInstallerService");return await a.listAvailableTerminals()}catch{return[{id:"system",name:"System Terminal",available:!0}]}}(0,g.ensureServerEntryExports)([h]),(0,b.registerServerReference)(h,"000355070809a82f957c3ecdc0fdf73cc9352aa287",null),a.s(["loadSettings",()=>h],86561),(0,g.ensureServerEntryExports)([i]),(0,b.registerServerReference)(i,"008f1005cd4717f0d7be2ddd53cdf463d0d955246f",null),a.s(["getAvailableTerminals",()=>i],79195)}];
3
-
4
- //# sourceMappingURL=%5Broot-of-the-server%5D__62cdea24._.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../../../../../../packages/core/src/infrastructure/services/filesystem/shep-directory.service.ts","../../../../../../../src/presentation/web/lib/server-container.ts","../../../../../../../node_modules/.pnpm/next%4016.1.6_%40babel%2Bcore%407.29.0_%40playwright%2Btest%401.58.1_react-dom%4019.2.4_react%4019.2.4__react%4019.2.4/node_modules/next/src/build/webpack/loaders/next-flight-loader/server-reference.ts","../../../../../../../node_modules/.pnpm/next%4016.1.6_%40babel%2Bcore%407.29.0_%40playwright%2Btest%401.58.1_react-dom%4019.2.4_react%4019.2.4__react%4019.2.4/node_modules/next/src/build/webpack/loaders/next-flight-loader/action-validate.ts","../../../../../../../packages/core/src/infrastructure/services/folder-dialog.service.ts","../../../../../../../src/presentation/web/app/actions/pick-folder.ts","../../../../../../../src/presentation/web/app/actions/list-github-repositories.ts","../../../../../../../packages/core/src/application/ports/output/services/github-repository-service.interface.ts","../../../../../../../src/presentation/web/app/actions/import-github-repository.ts","../../../../../../../src/presentation/web/app/actions/get-all-agent-models.ts","../../../../../../../src/presentation/web/lib/model-metadata.ts","../../../../../../../src/presentation/web/app/actions/update-agent-and-model.ts","../../../../../../../src/presentation/web/app/actions/load-settings.ts","../../../../../../../src/presentation/web/app/actions/get-available-terminals.ts"],"sourcesContent":["/**\n * Shep Directory Service\n *\n * Manages the ~/.shep/ directory for global settings and data storage.\n * Ensures directory exists with correct permissions before database operations.\n *\n * Supports SHEP_HOME env var for test isolation (overrides default ~/.shep/).\n */\n\nimport { mkdir } from 'node:fs/promises';\nimport { homedir } from 'node:os';\nimport { join } from 'node:path';\nimport { existsSync } from 'node:fs';\n\n/**\n * Resolves the Shep home directory.\n * Respects SHEP_HOME env var for test isolation, falls back to ~/.shep/\n */\nfunction resolveShepHomeDir(): string {\n return process.env.SHEP_HOME ?? join(homedir(), '.shep');\n}\n\n/**\n * Gets the path to the Shep home directory.\n * Uses SHEP_HOME env var if set, otherwise ~/.shep/\n *\n * @returns Path to shep home directory\n */\nexport function getShepHomeDir(): string {\n return resolveShepHomeDir();\n}\n\n/**\n * Gets the path to the SQLite database file.\n *\n * @returns Path to the database file\n */\nexport function getShepDbPath(): string {\n return join(resolveShepHomeDir(), 'data');\n}\n\n/**\n * Gets the path to the daemon state file.\n * Uses SHEP_HOME env var if set (for test isolation), otherwise ~/.shep/daemon.json\n *\n * @returns Path to daemon.json\n */\nexport function getDaemonStatePath(): string {\n return join(resolveShepHomeDir(), 'daemon.json');\n}\n\n/**\n * Gets the path to the daemon log file.\n * Uses SHEP_HOME env var if set (for test isolation), otherwise ~/.shep/daemon.log\n *\n * @returns Path to daemon.log\n */\nexport function getDaemonLogPath(): string {\n return join(resolveShepHomeDir(), 'daemon.log');\n}\n\n/**\n * Ensures the shep home directory exists with correct permissions.\n * Creates the directory if it doesn't exist.\n * Safe to call multiple times (idempotent).\n *\n * Permissions: 700 (rwx------) - only owner can read/write/execute\n *\n * @throws Error if directory cannot be created (permissions, disk space, etc.)\n */\nexport async function ensureShepDirectory(): Promise<void> {\n const shepDir = resolveShepHomeDir();\n\n if (existsSync(shepDir)) {\n return;\n }\n\n try {\n await mkdir(shepDir, {\n recursive: true,\n mode: 0o700,\n });\n } catch (error) {\n throw new Error(\n `Failed to create Shep directory at ${shepDir}: ${error instanceof Error ? error.message : String(error)}`\n );\n }\n}\n","/**\n * Server Container Accessor\n *\n * Provides a `resolve()` helper for server components and API routes to\n * obtain DI-managed instances. The tsyringe container is placed on globalThis\n * by the CLI bootstrap (`shep ui`) or the dev-server (`pnpm dev:web`).\n */\n\nimport type { DependencyContainer, InjectionToken } from 'tsyringe';\n\nconst CONTAINER_KEY = '__shepContainer';\n\n/**\n * Resolve a dependency from the DI container.\n *\n * Usage in server components / API routes:\n * ```ts\n * import { resolve } from '@/lib/server-container';\n * import { ListFeaturesUseCase } from '@shepai/core/application/use-cases/features/list-features.use-case';\n *\n * const features = await resolve(ListFeaturesUseCase).execute();\n * ```\n */\nexport function resolve<T>(token: InjectionToken<T>): T {\n const container = (globalThis as Record<string, unknown>)[CONTAINER_KEY] as\n | DependencyContainer\n | undefined;\n\n if (!container) {\n throw new Error(\n 'DI container not available. Ensure the CLI bootstrap or dev-server has initialized it.'\n );\n }\n\n return container.resolve(token);\n}\n","/* eslint-disable import/no-extraneous-dependencies */\nexport { registerServerReference } from 'react-server-dom-webpack/server'\n","// This function ensures that all the exported values are valid server actions,\n// during the runtime. By definition all actions are required to be async\n// functions, but here we can only check that they are functions.\nexport function ensureServerEntryExports(actions: any[]) {\n for (let i = 0; i < actions.length; i++) {\n const action = actions[i]\n if (typeof action !== 'function') {\n throw new Error(\n `A \"use server\" file can only export async functions, found ${typeof action}.\\nRead more: https://nextjs.org/docs/messages/invalid-use-server-value`\n )\n }\n }\n}\n","import { execSync } from 'node:child_process';\n\nexport interface FolderDialogDeps {\n platform: NodeJS.Platform;\n exec: (cmd: string, opts?: { encoding: BufferEncoding; timeout?: number }) => string;\n}\n\nconst defaultDeps: FolderDialogDeps = {\n platform: process.platform,\n exec: (cmd, opts) => execSync(cmd, opts) as unknown as string,\n};\n\n/**\n * Platform-specific commands that open a native OS folder picker dialog.\n * Each returns the chosen absolute folder path on stdout, or exits non-zero / returns empty on cancel.\n */\nconst PLATFORM_COMMANDS: Record<string, string> = {\n darwin: `osascript -e 'POSIX path of (choose folder with prompt \"Select a repository folder\")'`,\n linux: `zenity --file-selection --directory --title=\"Select a repository folder\" 2>/dev/null`,\n win32: `powershell -NoProfile -Command \"Add-Type -AssemblyName System.Windows.Forms; $f = New-Object System.Windows.Forms.FolderBrowserDialog; $f.Description = 'Select a repository folder'; if ($f.ShowDialog() -eq 'OK') { $f.SelectedPath } else { exit 1 }\"`,\n};\n\nexport class FolderDialogService {\n private deps: FolderDialogDeps;\n\n constructor(deps: Partial<FolderDialogDeps> = {}) {\n this.deps = { ...defaultDeps, ...deps };\n }\n\n /** Returns the OS-specific command string, or null if the platform is unsupported. */\n getCommand(): string | null {\n return PLATFORM_COMMANDS[this.deps.platform] ?? null;\n }\n\n /**\n * Opens a native folder picker dialog and returns the selected absolute path.\n * Returns `null` if the user cancels the dialog.\n * Throws if the platform is unsupported or the command fails unexpectedly.\n */\n pickFolder(): string | null {\n const command = this.getCommand();\n if (!command) {\n throw new Error(`Unsupported platform: ${this.deps.platform}`);\n }\n\n try {\n const result = this.deps.exec(command, { encoding: 'utf-8', timeout: 60_000 });\n const trimmed = result.trim();\n return trimmed.length > 0 ? trimmed : null;\n } catch (error: unknown) {\n // User cancelled the dialog — exit code 1 from osascript/zenity/powershell\n if (isExecError(error) && error.status === 1) {\n return null;\n }\n throw error;\n }\n }\n}\n\nfunction isExecError(error: unknown): error is { status: number } {\n return typeof error === 'object' && error !== null && 'status' in error;\n}\n","'use server';\n\nimport { FolderDialogService } from '@shepai/core/infrastructure/services/folder-dialog.service';\n\nexport async function pickFolder(): Promise<{ path: string | null; error?: string }> {\n const service = new FolderDialogService();\n\n try {\n const path = service.pickFolder();\n return { path };\n } catch (error: unknown) {\n const message = error instanceof Error ? error.message : 'Failed to open folder dialog';\n return { path: null, error: message };\n }\n}\n","'use server';\n\nimport { resolve } from '@/lib/server-container';\nimport type { ListGitHubRepositoriesUseCase } from '@shepai/core/application/use-cases/repositories/list-github-repositories.use-case';\nimport type { GitHubRepo } from '@shepai/core/application/ports/output/services/github-repository-service.interface';\nimport { GitHubAuthError } from '@shepai/core/application/ports/output/services/github-repository-service.interface';\n\ninterface ListGitHubRepositoriesInput {\n search?: string;\n limit?: number;\n}\n\nexport async function listGitHubRepositories(\n input?: ListGitHubRepositoriesInput\n): Promise<{ repos?: GitHubRepo[]; error?: string }> {\n try {\n const useCase = resolve<ListGitHubRepositoriesUseCase>('ListGitHubRepositoriesUseCase');\n const repos = await useCase.execute(input);\n return { repos };\n } catch (error: unknown) {\n if (error instanceof GitHubAuthError) {\n return { error: 'GitHub CLI is not authenticated. Run `gh auth login` to sign in.' };\n }\n const message = error instanceof Error ? error.message : 'Failed to list repositories';\n return { error: message };\n }\n}\n","/**\n * GitHub Repository Service Interface\n *\n * Output port for GitHub repository operations via the gh CLI.\n * Implementations manage authentication checks, repository cloning,\n * user repository listing, and GitHub URL parsing.\n */\n\n// ---------------------------------------------------------------------------\n// Error classes\n// ---------------------------------------------------------------------------\n\n/**\n * Thrown when the GitHub CLI is not authenticated.\n */\nexport class GitHubAuthError extends Error {\n constructor(message: string, cause?: Error) {\n super(message);\n this.name = 'GitHubAuthError';\n Object.setPrototypeOf(this, new.target.prototype);\n if (cause) this.cause = cause;\n }\n}\n\n/**\n * Thrown when a `gh repo clone` operation fails.\n */\nexport class GitHubCloneError extends Error {\n constructor(message: string, cause?: Error) {\n super(message);\n this.name = 'GitHubCloneError';\n Object.setPrototypeOf(this, new.target.prototype);\n if (cause) this.cause = cause;\n }\n}\n\n/**\n * Thrown when a GitHub URL cannot be parsed into owner/repo.\n */\nexport class GitHubUrlParseError extends Error {\n constructor(message: string, cause?: Error) {\n super(message);\n this.name = 'GitHubUrlParseError';\n Object.setPrototypeOf(this, new.target.prototype);\n if (cause) this.cause = cause;\n }\n}\n\n/**\n * Thrown when listing the user's GitHub repositories fails.\n */\nexport class GitHubRepoListError extends Error {\n constructor(message: string, cause?: Error) {\n super(message);\n this.name = 'GitHubRepoListError';\n Object.setPrototypeOf(this, new.target.prototype);\n if (cause) this.cause = cause;\n }\n}\n\n// ---------------------------------------------------------------------------\n// Types\n// ---------------------------------------------------------------------------\n\n/**\n * A GitHub repository as returned by `gh repo list --json`.\n */\nexport interface GitHubRepo {\n /** Repository name (e.g. \"my-project\") */\n name: string;\n /** Full owner/repo identifier (e.g. \"octocat/my-project\") */\n nameWithOwner: string;\n /** Repository description (may be empty string) */\n description: string;\n /** Whether the repository is private */\n isPrivate: boolean;\n /** ISO 8601 timestamp of the most recent push */\n pushedAt: string;\n}\n\n/**\n * Options for listing user repositories.\n */\nexport interface ListUserRepositoriesOptions {\n /** Maximum number of repos to return (default: 30) */\n limit?: number;\n /** Filter repos by name substring */\n search?: string;\n}\n\n/**\n * Options for cloning a repository.\n */\nexport interface CloneOptions {\n /** Callback invoked with stderr chunks during clone for progress display */\n onProgress?: (data: string) => void;\n}\n\n/**\n * Result of parsing a GitHub URL.\n */\nexport interface ParsedGitHubUrl {\n /** Repository owner (e.g. \"octocat\") */\n owner: string;\n /** Repository name (e.g. \"my-project\") */\n repo: string;\n /** Combined owner/repo (e.g. \"octocat/my-project\") */\n nameWithOwner: string;\n}\n\n// ---------------------------------------------------------------------------\n// Service interface\n// ---------------------------------------------------------------------------\n\n/**\n * Output port for GitHub repository operations.\n *\n * Implementations use the `gh` CLI for all GitHub interactions.\n */\nexport interface IGitHubRepositoryService {\n /**\n * Verify that the GitHub CLI is authenticated.\n *\n * @throws {GitHubAuthError} if `gh auth status` indicates the user is not logged in\n */\n checkAuth(): Promise<void>;\n\n /**\n * Clone a GitHub repository to a local destination directory.\n *\n * @param nameWithOwner - Full owner/repo identifier (e.g. \"octocat/my-project\")\n * @param destination - Absolute path to clone into\n * @param options - Optional clone configuration (e.g. progress callback)\n * @throws {GitHubCloneError} if the clone subprocess fails\n */\n cloneRepository(\n nameWithOwner: string,\n destination: string,\n options?: CloneOptions\n ): Promise<void>;\n\n /**\n * List the authenticated user's GitHub repositories.\n *\n * @param options - Optional filtering and pagination\n * @returns Array of GitHub repositories sorted by most recently pushed\n * @throws {GitHubRepoListError} if the list operation fails\n */\n listUserRepositories(options?: ListUserRepositoriesOptions): Promise<GitHubRepo[]>;\n\n /**\n * Parse a GitHub URL or shorthand into its owner/repo components.\n *\n * Supported formats:\n * - `https://github.com/owner/repo`\n * - `https://github.com/owner/repo.git`\n * - `git@github.com:owner/repo.git`\n * - `owner/repo` (shorthand)\n *\n * @param url - The GitHub URL or shorthand to parse\n * @returns Parsed owner, repo, and nameWithOwner\n * @throws {GitHubUrlParseError} if the URL does not match any supported format\n */\n parseGitHubUrl(url: string): ParsedGitHubUrl;\n}\n","'use server';\n\nimport { resolve } from '@/lib/server-container';\nimport type { ImportGitHubRepositoryUseCase } from '@shepai/core/application/use-cases/repositories/import-github-repository.use-case';\nimport type { Repository } from '@shepai/core/domain/generated/output';\nimport {\n GitHubAuthError,\n GitHubUrlParseError,\n GitHubCloneError,\n} from '@shepai/core/application/ports/output/services/github-repository-service.interface';\n\ninterface ImportGitHubRepositoryInput {\n url: string;\n dest?: string;\n}\n\nexport async function importGitHubRepository(\n input: ImportGitHubRepositoryInput\n): Promise<{ repository?: Repository; error?: string }> {\n const { url, dest } = input;\n\n if (!url?.trim()) {\n return { error: 'GitHub URL is required' };\n }\n\n try {\n const useCase = resolve<ImportGitHubRepositoryUseCase>('ImportGitHubRepositoryUseCase');\n const repository = await useCase.execute({ url, dest });\n return { repository };\n } catch (error: unknown) {\n if (error instanceof GitHubAuthError) {\n return { error: 'GitHub CLI is not authenticated. Run `gh auth login` to sign in.' };\n }\n if (error instanceof GitHubUrlParseError) {\n return { error: `Invalid GitHub URL: ${error.message}` };\n }\n if (error instanceof GitHubCloneError) {\n return { error: `Clone failed: ${error.message}` };\n }\n const message = error instanceof Error ? error.message : 'Failed to import repository';\n return { error: message };\n }\n}\n","'use server';\n\nimport { resolve } from '@/lib/server-container';\nimport { getModelMeta } from '@/lib/model-metadata';\nimport type { IAgentExecutorFactory } from '@shepai/core/application/ports/output/agents/agent-executor-factory.interface';\n\nexport interface ModelInfo {\n id: string;\n displayName: string;\n description: string;\n}\n\nexport interface AgentModelGroup {\n agentType: string;\n label: string;\n models: ModelInfo[];\n}\n\nconst AGENT_LABELS: Record<string, string> = {\n 'claude-code': 'Claude Code',\n cursor: 'Cursor CLI',\n 'gemini-cli': 'Gemini CLI',\n dev: 'Demo',\n};\n\n/** Sort weight — higher = further down. Demo always last. */\nconst AGENT_ORDER: Record<string, number> = {\n 'claude-code': 0,\n cursor: 1,\n 'gemini-cli': 2,\n dev: 99,\n};\n\nexport async function getAllAgentModels(): Promise<AgentModelGroup[]> {\n try {\n const factory = resolve<IAgentExecutorFactory>('IAgentExecutorFactory');\n const agents = factory.getSupportedAgents();\n return agents\n .map((agentType) => ({\n agentType: agentType as string,\n label: AGENT_LABELS[agentType as string] ?? (agentType as string),\n models: factory.getSupportedModels(agentType).map((id) => ({\n id,\n ...getModelMeta(id),\n })),\n }))\n .map((g) => {\n // Dev agent gets fun demo models\n if (g.agentType === 'dev' && g.models.length === 0) {\n return {\n ...g,\n models: [\n { id: 'gpt-8', ...getModelMeta('gpt-8') },\n { id: 'opus-7', ...getModelMeta('opus-7') },\n ],\n };\n }\n return g;\n })\n .filter((g) => g.models.length > 0)\n .sort((a, b) => (AGENT_ORDER[a.agentType] ?? 50) - (AGENT_ORDER[b.agentType] ?? 50));\n } catch {\n return [];\n }\n}\n","export interface ModelMeta {\n displayName: string;\n description: string;\n}\n\n/**\n * Presentation-layer metadata for known LLM model identifiers.\n * Maps raw model IDs to human-friendly display names and short descriptions.\n */\nconst MODEL_METADATA: Record<string, ModelMeta> = {\n // Claude models\n 'claude-opus-4-6': { displayName: 'Opus 4.6', description: 'Most capable, complex tasks' },\n 'claude-sonnet-4-6': { displayName: 'Sonnet 4.6', description: 'Fast & balanced' },\n 'claude-haiku-4-5': { displayName: 'Haiku 4.5', description: 'Lightweight & quick' },\n\n // Gemini models\n 'gemini-3.1-pro': { displayName: 'Gemini 3.1 Pro', description: 'Advanced reasoning' },\n 'gemini-3-flash': { displayName: 'Gemini 3 Flash', description: 'Ultra-fast responses' },\n 'gemini-2.5-pro': { displayName: 'Gemini 2.5 Pro', description: 'Reliable workhorse' },\n 'gemini-2.5-flash': { displayName: 'Gemini 2.5 Flash', description: 'Speed-optimized' },\n\n // OpenAI models\n 'gpt-5.4-high': { displayName: 'GPT-5.4', description: 'Latest reasoning model' },\n 'gpt-5.2': { displayName: 'GPT-5.2', description: 'Flagship model' },\n 'gpt-5.3-codex': { displayName: 'GPT-5.3 Codex', description: 'Code specialist' },\n\n // Other\n 'composer-1.5': { displayName: 'Composer 1.5', description: 'Multi-file editing' },\n 'grok-code': { displayName: 'Grok Code', description: 'xAI code model' },\n\n // Demo / fun models\n 'gpt-8': { displayName: 'GPT-8', description: 'Writes code before you think it' },\n 'opus-7': { displayName: 'Opus 7', description: 'Achieved consciousness, ships on time' },\n};\n\nconst FALLBACK: ModelMeta = { displayName: '', description: '' };\n\nexport function getModelMeta(modelId: string): ModelMeta {\n const meta = MODEL_METADATA[modelId];\n if (meta) return meta;\n // Fallback: prettify the raw ID\n return {\n ...FALLBACK,\n displayName: modelId\n .replace(/^claude-/, '')\n .replace(/^gemini-/, 'Gemini ')\n .replace(/^gpt-/, 'GPT-')\n .replace(/-/g, ' ')\n .replace(/\\b\\w/g, (c) => c.toUpperCase()),\n };\n}\n","'use server';\n\nimport { resolve } from '@/lib/server-container';\nimport {\n resetSettings,\n initializeSettings,\n} from '@shepai/core/infrastructure/services/settings.service';\nimport type { CompleteWebOnboardingUseCase } from '@shepai/core/application/use-cases/settings/complete-web-onboarding.use-case';\nimport type { AgentType } from '@shepai/core/domain/generated/output';\n\nexport async function updateAgentAndModel(\n agentType: string,\n model: string | null\n): Promise<{ ok: boolean; error?: string }> {\n if (!agentType.trim()) {\n return { ok: false, error: 'agent type is required' };\n }\n\n try {\n const useCase = resolve<CompleteWebOnboardingUseCase>('CompleteWebOnboardingUseCase');\n const updatedSettings = await useCase.execute({\n agentType: agentType.trim() as AgentType,\n model,\n });\n\n resetSettings();\n initializeSettings(updatedSettings);\n\n return { ok: true };\n } catch (error: unknown) {\n const message = error instanceof Error ? error.message : 'Failed to update agent and model';\n return { ok: false, error: message };\n }\n}\n","'use server';\n\nimport { statSync } from 'node:fs';\nimport { join } from 'node:path';\nimport { resolve } from '@/lib/server-container';\nimport type { LoadSettingsUseCase } from '@shepai/core/application/use-cases/settings/load-settings.use-case';\nimport { getShepHomeDir } from '@shepai/core/infrastructure/services/filesystem/shep-directory.service';\nimport type { Settings } from '@shepai/core/domain/generated/output';\n\nexport interface LoadSettingsResult {\n settings?: Settings;\n shepHome?: string;\n dbFileSize?: string;\n error?: string;\n}\n\nfunction formatFileSize(bytes: number): string {\n if (bytes < 1024) return `${bytes} B`;\n if (bytes < 1024 * 1024) return `${(bytes / 1024).toFixed(1)} KB`;\n return `${(bytes / (1024 * 1024)).toFixed(1)} MB`;\n}\n\nexport async function loadSettings(): Promise<LoadSettingsResult> {\n try {\n const useCase = resolve<LoadSettingsUseCase>('LoadSettingsUseCase');\n const settings = await useCase.execute();\n\n const shepHome = getShepHomeDir();\n let dbFileSize = 'Unknown';\n try {\n const dbPath = join(shepHome, 'data');\n const stat = statSync(dbPath);\n dbFileSize = formatFileSize(stat.size);\n } catch {\n // DB file may not exist yet\n }\n\n return { settings, shepHome, dbFileSize };\n } catch (error: unknown) {\n const message = error instanceof Error ? error.message : 'Failed to load settings';\n return { error: message };\n }\n}\n","'use server';\n\nimport { resolve } from '@/lib/server-container';\nimport type { IToolInstallerService } from '@shepai/core/application/ports/output/services/tool-installer.service';\n\nexport interface AvailableTerminal {\n id: string;\n name: string;\n available: boolean;\n}\n\n/**\n * Returns the list of terminal entries from the DI container's IToolInstallerService,\n * filtered to the current platform with availability checks.\n *\n * Using the DI container (not a direct import from tool-metadata) ensures that\n * TOOL_METADATA is read from the correct tools/ directory path — it is loaded once\n * in the Node.js CLI bootstrap context where import.meta.url resolves correctly.\n * Direct imports of tool-metadata from Next.js server action bundles break in\n * standalone production mode because import.meta.url points to the chunk file.\n */\nexport async function getAvailableTerminals(): Promise<AvailableTerminal[]> {\n try {\n const service = resolve<IToolInstallerService>('IToolInstallerService');\n return await service.listAvailableTerminals();\n } catch {\n return [{ id: 'system', name: 'System Terminal', available: true }];\n }\n}\n"],"names":["registerServerReference","ensureServerEntryExports","actions","i","length","action","Error"],"mappings":"gUASA,EAAA,CAAA,CAAA,OACA,IAAA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,OAiBO,SAAS,IACd,OAVO,AAUA,QAVQ,GAAG,CAAC,SAAS,EAAI,CAAA,EAAA,EAAA,IAAA,AAAI,EAAC,CAAA,EAAA,EAAA,OAAO,AAAP,IAAW,QAWlD,CAlBA,EAAA,CAAA,CAAA,mJCWO,SAAS,EAAW,CAAwB,EACjD,IAAM,EAAa,UAAsC,CAdrC,AAcsC,eAAc,CAIxE,GAAI,CAAC,EACH,MAAM,AAAI,GADI,GAEZ,0FAIJ,OAAO,EAAU,OAAO,CAAC,EAC3B,sDCnCoD,OAAA,cAAA,CAAA,EAAA,aAAA,oCAC3CA,0BAAAA,qCAAAA,EAAAA,uBAAuB,YAAQ,CAAA,CAAA,IAAA,iCCEjC,SAASC,EAAyBC,CAAc,EACrD,IAAK,IAAIC,EAAI,EAAGA,EAAID,EAAQE,MAAM,CAAED,IAAK,CACvC,IAAME,EAASH,CAAO,CAACC,EAAE,CACzB,GAAsB,YAAlB,AAA8B,OAAvBE,EACT,MAAM,OAAA,cAEL,CAFK,AAAIC,MACR,CAAC,2DAA2D,EAAE,OAAOD,EAAO;AAAA,oEAAuE,CAAC,EADhJ,oBAAA,OAAA,kBAAA,gBAAA,EAEN,EAEJ,CACF,0EATgBJ,2BAAAA,qCAAAA,0DCHhB,EAAA,EAAA,CAAA,CAAA,OAOA,IAAM,EAAgC,CACpC,SAAU,QAAQ,QAAQ,CAC1B,KAAM,CAAC,EAAK,IAAS,CAAA,EAAA,EAAA,QAAA,AAAQ,EAAC,EAAK,EACrC,EAMM,EAA4C,CAChD,OAAQ,CAAC,qFAAqF,CAAC,GAC/F,MAAO,CAAC,oFAAoF,CAAC,CAC7F,MAAO,CAAC,wPAAwP,CAAC,EACnQ,CAEO,OAAM,EACH,IAAuB,AAE/B,aAAY,EAAkC,CAAC,CAAC,CAAE,CAChD,IAAI,CAAC,IAAI,CAAG,CAAE,GAAG,CAAW,CAAE,GAAG,CAAI,AAAC,CACxC,CAGA,YAA4B,CAC1B,OAAO,CAAiB,CAAC,IAAI,CAAC,IAAI,CAAC,QAAQ,CAAC,EAAI,IAClD,CAOA,YAA4B,CAC1B,IAAM,EAAU,IAAI,CAAC,UAAU,GAC/B,GAAI,CAAC,EACH,MAAU,AAAJ,CADM,KACI,CAAC,sBAAsB,EAAE,IAAI,CAAC,IAAI,CAAC,QAAQ,CAAA,CAAE,EAG/D,GAAI,CAEF,IAAM,EADS,AACC,IADG,CAAC,IAAI,CAAC,IAAI,CAAC,EAAS,CAAE,SAAU,QAAS,QAAS,GAAO,GACrD,IAAI,GAC3B,OAAO,EAAQ,MAAM,CAAG,EAAI,EAAU,IACxC,CAAE,MAAO,EAAgB,KAUR,EARf,GAAI,AAQyB,AACT,UAAjB,OAAO,EATM,IAS0B,OAAV,GAAkB,WAAY,GATnB,GAAG,CAApB,EAAM,MAAM,CACpC,OAAO,IAET,OAAM,CACR,CACF,CACF,kBCrDO,eAAe,IACpB,IAAM,EAAU,IAAI,EAEpB,GAAI,CAEF,MAAO,CAAE,KADI,EAAQ,UAAU,EACjB,CAChB,CAAE,MAAO,EAAgB,CAEvB,MAAO,CAAE,KAAM,KAAM,MADL,CACY,YADK,MAAQ,EAAM,OAAO,CAAG,8BACrB,CACtC,CACF,iCAVsB,IAAA,CAAA,EAAA,EAAA,uBAAA,EAAA,EAAA,6CAAA,sCCFtB,IAAA,EAAA,EAAA,CAAA,CAAA,MCaO,OAAM,UAAwB,MACnC,YAAY,CAAe,CAAE,CAAa,CAAE,CAC1C,KAAK,CAAC,GACN,IAAI,CAAC,IAAI,CAAG,kBACZ,OAAO,cAAc,CAAC,IAAI,CAAE,WAAW,SAAS,EAC5C,IAAO,IAAI,CAAC,KAAK,CAAG,CAAA,CAC1B,CACF,CAKO,MAAM,UAAyB,MACpC,YAAY,CAAe,CAAE,CAAa,CAAE,CAC1C,KAAK,CAAC,GACN,IAAI,CAAC,IAAI,CAAG,mBACZ,OAAO,cAAc,CAAC,IAAI,CAAE,WAAW,SAAS,EAC5C,IAAO,IAAI,CAAC,KAAK,CAAG,CAAA,CAC1B,CACF,CAKO,MAAM,UAA4B,MACvC,YAAY,CAAe,CAAE,CAAa,CAAE,CAC1C,KAAK,CAAC,GACN,IAAI,CAAC,IAAI,CAAG,sBACZ,OAAO,cAAc,CAAC,IAAI,CAAE,WAAW,SAAS,EAC5C,GAAO,KAAI,CAAC,KAAK,CAAG,CAAA,CAC1B,CACF,CDlCO,eAAe,EACpB,CAAmC,EAEnC,GAAI,CACF,IAAM,EAAU,CAAA,EAAA,EAAA,OAAA,AAAO,EAAgC,iCAEvD,MAAO,CAAE,MADK,MAAM,EAAQ,OAAO,CAAC,EACrB,CACjB,CAAE,MAAO,EAAgB,CACvB,GAAI,aAAiB,EACnB,MAAO,CAAE,MAAO,EADoB,gEAC+C,EAGrF,MAAO,CAAE,MADO,CACA,YADiB,MAAQ,EAAM,OAAO,CAAG,6BACjC,CAC1B,CACF,CEVO,eAAe,EACpB,CAAkC,EAElC,GAAM,KAAE,CAAG,MAAE,CAAI,CAAE,CAAG,EAEtB,GAAI,CAAC,GAAK,OACR,CADgB,KACT,CAAE,MAAO,wBAAyB,EAG3C,GAAI,CACF,IAAM,EAAU,CAAA,EAAA,EAAA,OAAA,AAAO,EAAgC,iCAEvD,MAAO,CAAE,WADU,MAAM,EAAQ,OAAO,CAAC,KAAE,EAAK,MAAK,EACjC,CACtB,CAAE,MAAO,EAAgB,CACvB,GAAI,aAAiB,EACnB,MAAO,CAAE,MAAO,EADoB,gEAC+C,EAErF,GAAI,aAAiB,EACnB,MAAO,CAAE,MAAO,CAAC,KADuB,eACH,EAAE,EAAM,OAAO,CAAA,CAAE,AAAC,EAEzD,GAAI,aAAiB,EACnB,MAAO,CAAE,MAAO,CAAC,EADoB,YACN,EAAE,EAAM,OAAO,CAAA,CAAG,AAAD,EAGlD,MAAO,CAAE,MADO,CACA,YADiB,MAAQ,EAAM,OAAO,CAAG,6BACjC,CAC1B,CACF,iCF9BsB,IAAA,CAAA,EAAA,EAAA,uBAAA,EAAA,EAAA,6CAAA,kFEIA,IAAA,CAAA,EAAA,EAAA,uBAAA,EAAA,EAAA,6CAAA,iGCdtB,EAAA,EAAA,CAAA,CAAA,OCOA,IAAM,EAA4C,CAEhD,kBAAmB,CAAE,YAAa,WAAY,YAAa,6BAA8B,EACzF,oBAAqB,CAAE,YAAa,aAAc,YAAa,iBAAkB,EACjF,mBAAoB,CAAE,YAAa,YAAa,YAAa,qBAAsB,EAGnF,iBAAkB,CAAE,YAAa,iBAAkB,YAAa,oBAAqB,EACrF,iBAAkB,CAAE,YAAa,iBAAkB,YAAa,sBAAuB,EACvF,iBAAkB,CAAE,YAAa,iBAAkB,YAAa,oBAAqB,EACrF,mBAAoB,CAAE,YAAa,mBAAoB,YAAa,iBAAkB,EAGtF,eAAgB,CAAE,YAAa,UAAW,YAAa,wBAAyB,EAChF,UAAW,CAAE,YAAa,UAAW,YAAa,gBAAiB,EACnE,gBAAiB,CAAE,YAAa,gBAAiB,YAAa,iBAAkB,EAGhF,eAAgB,CAAE,YAAa,eAAgB,YAAa,oBAAqB,EACjF,YAAa,CAAE,YAAa,YAAa,YAAa,gBAAiB,EAGvE,QAAS,CAAE,YAAa,QAAS,YAAa,iCAAkC,EAChF,SAAU,CAAE,YAAa,SAAU,YAAa,uCAAwC,CAC1F,EAEM,EAAsB,CAAE,YAAa,GAAI,YAAa,EAAG,EAExD,SAAS,EAAa,CAAe,EAC1C,IAAM,EAAO,CAAc,CAAC,EAAQ,QACpC,AAAI,GAEG,CACL,EAHQ,CAGL,CAAQ,CACX,IAJe,QAIF,EACV,OAAO,CAAC,WAAY,IACpB,OAAO,CAAC,WAAY,WACpB,OAAO,CAAC,QAAS,QACjB,OAAO,CAAC,KAAM,KACd,OAAO,CAAC,QAAS,AAAC,GAAM,EAAE,WAAW,GAC1C,CACF,kBDhCA,IAAM,EAAuC,CAC3C,cAAe,cACf,OAAQ,aACR,aAAc,aACd,IAAK,MACP,EAGM,EAAsC,CAC1C,cAAe,EACf,OAAQ,EACR,aAAc,EACd,IAAK,EACP,EAEO,eAAe,IACpB,GAAI,CACF,IAAM,EAAU,CAAA,EAAA,EAAA,OAAA,AAAO,EAAwB,yBAE/C,OADe,AACR,EADgB,kBAAkB,GAEtC,GAAG,CAAC,AAAC,IAAe,CACnB,OADkB,GACP,EACX,MAAO,CAAY,CAAC,EAAoB,EAAK,EAC7C,OAAQ,EAAQ,kBAAkB,CAAC,GAAW,GAAG,CAAC,AAAC,IAAQ,CAAD,GACxD,EACA,GAAG,EAAa,EAAG,CACrB,CAAC,EACH,CAAC,EACA,GAAG,CAAC,AAAC,GAEJ,AAAoB,QAAhB,EAAE,SAAS,EAAkC,GAAG,CAAvB,EAAE,MAAM,CAAC,MAAM,CACnC,CACL,GAAG,CAAC,CACJ,OAAQ,CACN,CAAE,GAAI,QAAS,GAAG,EAAa,QAAQ,AAAC,EACxC,CAAE,GAAI,SAAU,GAAG,EAAa,SAAS,AAAC,EAC3C,AACH,EAEK,GAER,MAAM,CAAC,AAAC,GAAM,EAAE,MAAM,CAAC,MAAM,CAAG,GAChC,IAAI,CAAC,CAAC,EAAG,IAAM,CAAC,CAAW,CAAC,EAAE,SAAS,CAAC,EAAI,EAAA,CAAE,EAAK,CAAW,CAAZ,AAAa,EAAE,SAAS,CAAC,EAAI,EAAA,CAAE,CACtF,CAAE,KAAM,CACN,MAAO,EAAE,AACX,CACF,iCA/BsB,IAAA,CAAA,EAAA,EAAA,uBAAA,EAAA,EAAA,6CAAA,6CE9BtB,IAAA,EAAA,EAAA,CAAA,CAAA,OAOO,eAAe,EACpB,CAAiB,CACjB,CAAoB,EAEpB,GAAI,CAAC,EAAU,IAAI,GACjB,CADqB,KACd,CAAE,IAAI,EAAO,MAAO,wBAAyB,EAGtD,GAAI,CACF,IAAM,EAAU,CAAA,EAAA,EAAA,OAAA,AAAO,EAA+B,gCAChD,EAAkB,MAAM,EAAQ,OAAO,CAAC,CAC5C,UAAW,EAAU,IAAI,SACzB,CACF,GAKA,MAHA,CAAA,EAAA,EAAA,aAAA,AAAa,IACb,CAAA,EAAA,EAAA,kBAAA,AAAkB,EAAC,GAEZ,CAAE,IAAI,CAAK,CACpB,CAAE,MAAO,EAAgB,CAEvB,MAAO,CAAE,GAAI,GAAO,MADJ,CACW,YADM,MAAQ,EAAM,OAAO,CAAG,kCACtB,CACrC,CACF,iCAvBsB,IAAA,CAAA,EAAA,EAAA,uBAAA,EAAA,EAAA,6CAAA,8FCRtB,EAAA,EAAA,CAAA,CAAA,MACA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,OAEA,EAAA,EAAA,CAAA,CAAA,oBAgBO,eAAe,IACpB,GAAI,CACF,IAAM,EAAU,CAAA,EAAA,EAAA,OAAA,AAAO,EAAsB,uBACvC,EAAW,MAAM,EAAQ,OAAO,GAEhC,EAAW,CAAA,EAAA,EAAA,cAAA,AAAc,IAC3B,EAAa,UACjB,GAAI,OACF,IAAM,EAAS,CAAA,EAAA,EAAA,IAAA,AAAI,EAAC,EAAU,QAE9B,EAfJ,AAAI,CADkB,EAeL,AACe,CADf,EAfkB,AAelB,EAAA,GACA,KADA,AAAQ,EAAC,GACW,IAAI,EAf7B,KAAa,CAAA,AAAP,EAAU,EAAM,EAAE,CAAC,CACjC,EAAQ,OAAO,CAAa,CAAA,EAAG,CAAC,CAAX,CAAmB,IAAA,CAAI,CAAE,OAAO,CAAC,GAAG,GAAG,CAAC,CAC1D,CAAA,EAAG,CAAC,EAAS,MAAD,CAAY,AAAJ,CAAK,CAAE,OAAO,CAAC,GAAG,GAAG,CAc9C,AAd+C,CAc7C,KAAM,CAER,CAEA,MAAO,UAAE,WAAU,aAAU,CAAW,CAC1C,CAAE,MAAO,EAAgB,CAEvB,MAAO,CAAE,MADO,CACA,YADiB,MAAQ,EAAM,OAAO,CAAG,yBACjC,CAC1B,CACF,CCrBO,eAAe,IACpB,GAAI,CACF,IAAM,EAAU,CAAA,EAAA,EAAA,OAAA,AAAO,EAAwB,yBAC/C,OAAO,MAAM,EAAQ,sBAAsB,EAC7C,CAAE,KAAM,CACN,MAAO,CAAC,CAAE,GAAI,SAAU,KAAM,kBAAmB,WAAW,CAAK,EAAE,AACrE,CACF,iCDNsB,IAAA,CAAA,EAAA,EAAA,uBAAA,EAAA,EAAA,6CAAA,wECDA,IAAA,CAAA,EAAA,EAAA,uBAAA,EAAA,EAAA,6CAAA","ignoreList":[2,3]}