agent-tower 0.7.2-beta.1 → 0.7.2-beta.6

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 (224) hide show
  1. package/dist/executors/base.executor.d.ts.map +1 -1
  2. package/dist/executors/base.executor.js +6 -3
  3. package/dist/executors/base.executor.js.map +1 -1
  4. package/dist/routes/__tests__/workspaces.test.js +80 -0
  5. package/dist/routes/__tests__/workspaces.test.js.map +1 -1
  6. package/dist/routes/workspaces.js +1 -1
  7. package/dist/routes/workspaces.js.map +1 -1
  8. package/dist/runtime/__tests__/cli-driver-lifecycle.test.js +49 -8
  9. package/dist/runtime/__tests__/cli-driver-lifecycle.test.js.map +1 -1
  10. package/dist/runtime/__tests__/runtime-coordinator.test.js +13 -0
  11. package/dist/runtime/__tests__/runtime-coordinator.test.js.map +1 -1
  12. package/dist/runtime/cli-driver.js +32 -12
  13. package/dist/runtime/cli-driver.js.map +1 -1
  14. package/dist/runtime/contracts.d.ts +9 -2
  15. package/dist/runtime/contracts.d.ts.map +1 -1
  16. package/dist/runtime/runtime-coordinator.d.ts +2 -0
  17. package/dist/runtime/runtime-coordinator.d.ts.map +1 -1
  18. package/dist/runtime/runtime-coordinator.js +10 -0
  19. package/dist/runtime/runtime-coordinator.js.map +1 -1
  20. package/dist/services/__tests__/session-manager.lifecycle.test.js +136 -0
  21. package/dist/services/__tests__/session-manager.lifecycle.test.js.map +1 -1
  22. package/dist/services/__tests__/session-manager.team-run.test.js +44 -47
  23. package/dist/services/__tests__/session-manager.team-run.test.js.map +1 -1
  24. package/dist/services/__tests__/team-reconciler.service.test.js +30 -0
  25. package/dist/services/__tests__/team-reconciler.service.test.js.map +1 -1
  26. package/dist/services/__tests__/terminal-manager.test.js +70 -0
  27. package/dist/services/__tests__/terminal-manager.test.js.map +1 -1
  28. package/dist/services/project.service.d.ts.map +1 -1
  29. package/dist/services/project.service.js +30 -4
  30. package/dist/services/project.service.js.map +1 -1
  31. package/dist/services/session-manager.d.ts +1 -0
  32. package/dist/services/session-manager.d.ts.map +1 -1
  33. package/dist/services/session-manager.js +40 -5
  34. package/dist/services/session-manager.js.map +1 -1
  35. package/dist/services/session-runtime-cleanup-gate.d.ts +1 -0
  36. package/dist/services/session-runtime-cleanup-gate.d.ts.map +1 -1
  37. package/dist/services/session-runtime-cleanup-gate.js +5 -3
  38. package/dist/services/session-runtime-cleanup-gate.js.map +1 -1
  39. package/dist/services/team-reconciler.service.d.ts +1 -0
  40. package/dist/services/team-reconciler.service.d.ts.map +1 -1
  41. package/dist/services/team-reconciler.service.js +1 -0
  42. package/dist/services/team-reconciler.service.js.map +1 -1
  43. package/dist/services/terminal-manager.d.ts.map +1 -1
  44. package/dist/services/terminal-manager.js +9 -4
  45. package/dist/services/terminal-manager.js.map +1 -1
  46. package/dist/services/workspace.service.js +8 -8
  47. package/dist/services/workspace.service.js.map +1 -1
  48. package/dist/utils/__tests__/spawned-process-identity.test.d.ts +2 -0
  49. package/dist/utils/__tests__/spawned-process-identity.test.d.ts.map +1 -0
  50. package/dist/utils/__tests__/spawned-process-identity.test.js +31 -0
  51. package/dist/utils/__tests__/spawned-process-identity.test.js.map +1 -0
  52. package/dist/utils/spawned-process-identity.d.ts +1 -1
  53. package/dist/utils/spawned-process-identity.d.ts.map +1 -1
  54. package/dist/utils/spawned-process-identity.js +11 -3
  55. package/dist/utils/spawned-process-identity.js.map +1 -1
  56. package/dist/web/assets/AgentDemoPage-D0LQRcXm.js +1 -0
  57. package/dist/web/assets/{AgentEnvironmentSettingsPage-DfVjAeK8.js → AgentEnvironmentSettingsPage-BnWVgvNe.js} +1 -1
  58. package/dist/web/assets/AgentLogo-BDyW3ihb.js +1 -0
  59. package/dist/web/assets/BranchSelect-Dmp5hq0i.js +1 -0
  60. package/dist/web/assets/BrandLogo-YGT4Vlw5.js +1 -0
  61. package/dist/web/assets/{ConversationPage-Bh_x9kK3.js → ConversationPage-BhapUYGe.js} +2 -2
  62. package/dist/web/assets/CreateTaskInput-GLF3Oyc1.js +1 -0
  63. package/dist/web/assets/{DemoPage-xys5j303.js → DemoPage-BwX2SvcN.js} +1 -1
  64. package/dist/web/assets/DesignSystemPage-j-1-1JtQ.js +16 -0
  65. package/dist/web/assets/EditableTaskTitle-mHT39coo.js +70 -0
  66. package/dist/web/assets/{ExecutionPermissionSelector-CTeKhMaB.js → ExecutionPermissionSelector-DeeNd4Kh.js} +1 -1
  67. package/dist/web/assets/{GeneralSettingsPage-BZEcE8xN.js → GeneralSettingsPage-BBe3EXcj.js} +1 -1
  68. package/dist/web/assets/{LoadingPreviewPage-D81UstX2.js → LoadingPreviewPage-BxEFnEQh.js} +1 -1
  69. package/dist/web/assets/McpSettingsPage-DDA8yUxu.js +1 -0
  70. package/dist/web/assets/{MemberAvatar-BuueBvLu.js → MemberAvatar-CCRbS97s.js} +1 -1
  71. package/dist/web/assets/MobileTaskDetail-BOIFPybn.js +5 -0
  72. package/dist/web/assets/NotificationSettingsPage-B2kUnE8w.js +1 -0
  73. package/dist/web/assets/{ProfileSettingsPage-DdK3Q2wl.js → ProfileSettingsPage-DPZpUoFd.js} +1 -1
  74. package/dist/web/assets/ProjectKanbanPage-DQnwUBFg.js +12 -0
  75. package/dist/web/assets/ProjectSettingsPage-CcXAOYb7.js +2 -0
  76. package/dist/web/assets/{ProviderSettingsPage-CiTp3QwX.js → ProviderSettingsPage-BAIRvcAS.js} +3 -3
  77. package/dist/web/assets/{SettingsMasterDetail-BhepxZ5b.js → SettingsMasterDetail-BuxwsR9R.js} +1 -1
  78. package/dist/web/assets/TaskDetail-B3pOSx3f.js +3 -0
  79. package/dist/web/assets/TeamSettingsPage-DoWmzvKu.js +1 -0
  80. package/dist/web/assets/agent-meta-MzuGtqxl.js +1 -0
  81. package/dist/web/assets/arc-Bm_QIbJA.js +1 -0
  82. package/dist/web/assets/{architectureDiagram-3BPJPVTR-Byb8rrNU.js → architectureDiagram-3BPJPVTR-B5EIiXuX.js} +1 -1
  83. package/dist/web/assets/arrow-down-BVePf1ZM.js +1 -0
  84. package/dist/web/assets/at-sign-BE17rU5b.js +1 -0
  85. package/dist/web/assets/{blockDiagram-GPEHLZMM-DGcS4UET.js → blockDiagram-GPEHLZMM-GFwnvSLM.js} +1 -1
  86. package/dist/web/assets/{c4Diagram-AAUBKEIU-BRyJRATZ.js → c4Diagram-AAUBKEIU-iJfLTxEa.js} +1 -1
  87. package/dist/web/assets/channel-CYYV7_Oi.js +1 -0
  88. package/dist/web/assets/check-qs0S_9rB.js +1 -0
  89. package/dist/web/assets/chevron-down-BaQEBzp3.js +1 -0
  90. package/dist/web/assets/chevron-up-D0y6skqr.js +1 -0
  91. package/dist/web/assets/{chunk-2J33WTMH-DgL3sVcs.js → chunk-2J33WTMH-CDxRPp-8.js} +1 -1
  92. package/dist/web/assets/{chunk-4BX2VUAB-BVgUUvCo.js → chunk-4BX2VUAB-mzPbgyiz.js} +1 -1
  93. package/dist/web/assets/{chunk-55IACEB6-CfD9Uy7p.js → chunk-55IACEB6-KNAJbQyw.js} +1 -1
  94. package/dist/web/assets/{chunk-727SXJPM-D8gRbLX6.js → chunk-727SXJPM-BqGfqkDK.js} +2 -2
  95. package/dist/web/assets/{chunk-AQP2D5EJ-CwBPJyzk.js → chunk-AQP2D5EJ-D27ue-H0.js} +1 -1
  96. package/dist/web/assets/{chunk-FMBD7UC4-B0b7Iiv3.js → chunk-FMBD7UC4-DRza-3q8.js} +1 -1
  97. package/dist/web/assets/{chunk-ND2GUHAM-D0Y5tagg.js → chunk-ND2GUHAM-CUgkviLu.js} +1 -1
  98. package/dist/web/assets/{chunk-QZHKN3VN-qVEPtRTm.js → chunk-QZHKN3VN-BAlOJwZb.js} +1 -1
  99. package/dist/web/assets/{circle-alert-C_ON1rCL.js → circle-alert-Cbvy2cMo.js} +1 -1
  100. package/dist/web/assets/classDiagram-4FO5ZUOK-Cl-3ikxt.js +1 -0
  101. package/dist/web/assets/classDiagram-v2-Q7XG4LA2-Cl-3ikxt.js +1 -0
  102. package/dist/web/assets/code-block-OCS4YCEC-CO23R1Os.js +2 -0
  103. package/dist/web/assets/{confirm-dialog-Drhw7wmk.js → confirm-dialog-BrgNTypL.js} +1 -1
  104. package/dist/web/assets/copy-DejkmIHZ.js +1 -0
  105. package/dist/web/assets/{cose-bilkent-S5V4N54A-BoSlujEJ.js → cose-bilkent-S5V4N54A-8TBY7BP_.js} +1 -1
  106. package/dist/web/assets/cssMode-hzDRnxMx.js +1 -0
  107. package/dist/web/assets/{dagre-BM42HDAG-DWm_GyDR.js → dagre-BM42HDAG-CkMzDiim.js} +1 -1
  108. package/dist/web/assets/{diagram-2AECGRRQ-CVtgrsl0.js → diagram-2AECGRRQ-CAOQJ2N1.js} +1 -1
  109. package/dist/web/assets/{diagram-5GNKFQAL-XNMIXdme.js → diagram-5GNKFQAL-DKhE0hiI.js} +1 -1
  110. package/dist/web/assets/{diagram-KO2AKTUF-CYXdL2cC.js → diagram-KO2AKTUF-DBdkXSpa.js} +1 -1
  111. package/dist/web/assets/{diagram-LMA3HP47-8MCVTTrT.js → diagram-LMA3HP47-DRi2t32c.js} +1 -1
  112. package/dist/web/assets/{diagram-OG6HWLK6-DMWgHctP.js → diagram-OG6HWLK6-DtP92tI1.js} +1 -1
  113. package/dist/web/assets/{erDiagram-TEJ5UH35-D3qp5csl.js → erDiagram-TEJ5UH35-DWFKXtst.js} +1 -1
  114. package/dist/web/assets/{flowDiagram-I6XJVG4X-D-Bem31x.js → flowDiagram-I6XJVG4X-LDE0h4ri.js} +1 -1
  115. package/dist/web/assets/{freemarker2-D7pixABp.js → freemarker2-CLksOOZX.js} +3 -3
  116. package/dist/web/assets/{ganttDiagram-6RSMTGT7-D5ctgPCm.js → ganttDiagram-6RSMTGT7-DD2RfdyV.js} +1 -1
  117. package/dist/web/assets/gauge-CPlvCZUV.js +1 -0
  118. package/dist/web/assets/{gitGraphDiagram-PVQCEYII-lA3I18_r.js → gitGraphDiagram-PVQCEYII-DkKrR8ex.js} +1 -1
  119. package/dist/web/assets/globe-CD4g63c9.js +1 -0
  120. package/dist/web/assets/handlebars-C1M9t0Lo.js +1 -0
  121. package/dist/web/assets/html-DKVKQovh.js +1 -0
  122. package/dist/web/assets/htmlMode-BSWjg5ir.js +1 -0
  123. package/dist/web/assets/index-BnqdwOEH.css +1 -0
  124. package/dist/web/assets/{index-ClhIruws.js → index-CMJV-mgF.js} +13 -13
  125. package/dist/web/assets/{index-CA_B15_q.js → index-D_QVcsLn.js} +5 -5
  126. package/dist/web/assets/{infoDiagram-5YYISTIA-CGy_XnVP.js → infoDiagram-5YYISTIA-BdPA9Xfi.js} +1 -1
  127. package/dist/web/assets/{ishikawaDiagram-YF4QCWOH-DFGAkcYD.js → ishikawaDiagram-YF4QCWOH-220u4uiv.js} +1 -1
  128. package/dist/web/assets/javascript-WwrMY2Bg.js +1 -0
  129. package/dist/web/assets/{journeyDiagram-JHISSGLW-C9ZHl7QM.js → journeyDiagram-JHISSGLW-BvE0Y3tZ.js} +1 -1
  130. package/dist/web/assets/{jsonMode-bD-WsLyj.js → jsonMode-Dz0hnnvg.js} +4 -4
  131. package/dist/web/assets/{kanban-definition-UN3LZRKU-BbbRnxDG.js → kanban-definition-UN3LZRKU-Q0JH1P6D.js} +1 -1
  132. package/dist/web/assets/key-round-DZm1FLLr.js +1 -0
  133. package/dist/web/assets/{layers-BlEewgM8.js → layers-Dda7MM7a.js} +1 -1
  134. package/dist/web/assets/{linear-D04wUvKo.js → linear-Dr6SfnSn.js} +1 -1
  135. package/dist/web/assets/link-BUeSP3T7.js +1 -0
  136. package/dist/web/assets/liquid-CzGEh0ls.js +1 -0
  137. package/dist/web/assets/{lspLanguageFeatures-jn1q-hoP.js → lspLanguageFeatures-Bbp4PWlJ.js} +1 -1
  138. package/dist/web/assets/mdx-y6S3OMMk.js +1 -0
  139. package/dist/web/assets/mermaid-NOHMQCX5-C72362la.js +123 -0
  140. package/dist/web/assets/{message-square-CTrwLud_.js → message-square-CFriSt4D.js} +1 -1
  141. package/dist/web/assets/{mindmap-definition-RKZ34NQL-n24WGa7x.js → mindmap-definition-RKZ34NQL-bvDaNfKs.js} +1 -1
  142. package/dist/web/assets/{modal-BFDGLwoR.js → modal-DeigO7aN.js} +1 -1
  143. package/dist/web/assets/{monaco-CirwkIGR.js → monaco-BuDK9Fat.js} +3 -3
  144. package/dist/web/assets/paperclip-BOSklTt7.js +1 -0
  145. package/dist/web/assets/pencil-BRQ9W_a-.js +1 -0
  146. package/dist/web/assets/{pieDiagram-4H26LBE5-CUMw3DZK.js → pieDiagram-4H26LBE5-BQCca9Cq.js} +2 -2
  147. package/dist/web/assets/play-Mxkwq69n.js +1 -0
  148. package/dist/web/assets/python-CMnGKsU9.js +1 -0
  149. package/dist/web/assets/{quadrantDiagram-W4KKPZXB-DMshWJZy.js → quadrantDiagram-W4KKPZXB-BEM2U7Cd.js} +1 -1
  150. package/dist/web/assets/razor-mLurbGgY.js +1 -0
  151. package/dist/web/assets/{requirementDiagram-4Y6WPE33-B4Jx_Yx6.js → requirementDiagram-4Y6WPE33-CcmFIALZ.js} +1 -1
  152. package/dist/web/assets/{sankeyDiagram-5OEKKPKP-CN2JbWht.js → sankeyDiagram-5OEKKPKP-D9Nrfbqk.js} +1 -1
  153. package/dist/web/assets/{select-CLV6rtRD.js → select-DKS02St6.js} +1 -1
  154. package/dist/web/assets/{sequenceDiagram-3UESZ5HK-B4bMaYD_.js → sequenceDiagram-3UESZ5HK-5udQDi0x.js} +1 -1
  155. package/dist/web/assets/server-DJaSJ9m1.js +1 -0
  156. package/dist/web/assets/stateDiagram-AJRCARHV-D-cF1NGV.js +1 -0
  157. package/dist/web/assets/stateDiagram-v2-BHNVJYJU-a4ugQnZs.js +1 -0
  158. package/dist/web/assets/status-styles-sQm4KLdp.js +1 -0
  159. package/dist/web/assets/{switch-Ch_hFX_n.js → switch-7LWQ_sEx.js} +1 -1
  160. package/dist/web/assets/task-CDYaC_No.js +42 -0
  161. package/dist/web/assets/task-priority-acVgTiil.js +1 -0
  162. package/dist/web/assets/{textarea-DDy2_gLQ.js → textarea-Ft9KMoEI.js} +1 -1
  163. package/dist/web/assets/{timeline-definition-PNZ67QCA-BuLxqHOL.js → timeline-definition-PNZ67QCA-DXS236a-.js} +1 -1
  164. package/dist/web/assets/{trash-2-DrNpNvRo.js → trash-2-Bc-URu8c.js} +1 -1
  165. package/dist/web/assets/{tsMode-qES9KHvZ.js → tsMode-Vr3bndW1.js} +4 -4
  166. package/dist/web/assets/typescript-BfjoaUSn.js +1 -0
  167. package/dist/web/assets/{upload-D6SifUfr.js → upload-C9Z4jLtv.js} +1 -1
  168. package/dist/web/assets/use-attachments-EypT-7PI.js +2 -0
  169. package/dist/web/assets/{use-profiles-DUoivbBF.js → use-profiles-nMPGwy3v.js} +1 -1
  170. package/dist/web/assets/use-projects-DI27nNwl.js +1 -0
  171. package/dist/web/assets/{use-providers-BKYsoOBU.js → use-providers-DB9ghBPq.js} +1 -1
  172. package/dist/web/assets/use-workspaces-d4n9m9cX.js +1 -0
  173. package/dist/web/assets/useNormalizedLogs-DRoPbP0w.js +1 -0
  174. package/dist/web/assets/useTokenUsage-4qTDa8SY.js +1 -0
  175. package/dist/web/assets/{vennDiagram-CIIHVFJN-LoQ_fciU.js → vennDiagram-CIIHVFJN-BzyNrP06.js} +1 -1
  176. package/dist/web/assets/{wardley-L42UT6IY-Dh_9I9Zv.js → wardley-L42UT6IY-BQ4SyU9_.js} +1 -1
  177. package/dist/web/assets/{wardleyDiagram-YWT4CUSO-CQ-yZsuW.js → wardleyDiagram-YWT4CUSO-CcCqmB58.js} +1 -1
  178. package/dist/web/assets/xml-BGVoPR0b.js +1 -0
  179. package/dist/web/assets/{xychartDiagram-2RQKCTM6-HLyImhwf.js → xychartDiagram-2RQKCTM6-RWm1MtQk.js} +1 -1
  180. package/dist/web/assets/yaml-eFhNavrs.js +1 -0
  181. package/dist/web/index.html +2 -2
  182. package/node_modules/@agent-tower/shared/dist/types.d.ts +1 -1
  183. package/node_modules/@agent-tower/shared/dist/types.d.ts.map +1 -1
  184. package/package.json +1 -1
  185. package/dist/web/assets/AgentDemoPage-CCw9EfsA.js +0 -1
  186. package/dist/web/assets/AgentLogo-BhKP5dmt.js +0 -1
  187. package/dist/web/assets/CreateTaskInput-D_KCLZ4q.js +0 -1
  188. package/dist/web/assets/McpSettingsPage-Ch1U9tIg.js +0 -1
  189. package/dist/web/assets/NotificationSettingsPage-IHVOP-Vc.js +0 -1
  190. package/dist/web/assets/ProjectKanbanPage-VFkvX9IJ.js +0 -86
  191. package/dist/web/assets/ProjectSettingsPage-BlRbxcf8.js +0 -2
  192. package/dist/web/assets/TeamSettingsPage-JaLFYXmJ.js +0 -1
  193. package/dist/web/assets/arc-Bd616RKq.js +0 -1
  194. package/dist/web/assets/channel-DJbXDmr3.js +0 -1
  195. package/dist/web/assets/check-Bj-p_n7C.js +0 -1
  196. package/dist/web/assets/chevron-down-BouKK_Vr.js +0 -1
  197. package/dist/web/assets/chevron-right-DJVYJhGF.js +0 -1
  198. package/dist/web/assets/chevron-up-CRlA9Cjl.js +0 -1
  199. package/dist/web/assets/classDiagram-4FO5ZUOK-BIz565rI.js +0 -1
  200. package/dist/web/assets/classDiagram-v2-Q7XG4LA2-BIz565rI.js +0 -1
  201. package/dist/web/assets/code-block-OCS4YCEC-wB-pkznC.js +0 -2
  202. package/dist/web/assets/cssMode-DBSRGK6o.js +0 -1
  203. package/dist/web/assets/globe-AjOch0vk.js +0 -1
  204. package/dist/web/assets/handlebars-B10IREzV.js +0 -1
  205. package/dist/web/assets/html-BpG68rDt.js +0 -1
  206. package/dist/web/assets/htmlMode-DuHt_Jpu.js +0 -1
  207. package/dist/web/assets/index-NxnivNNl.css +0 -1
  208. package/dist/web/assets/javascript-BupP80yJ.js +0 -1
  209. package/dist/web/assets/liquid-C57aZJpn.js +0 -1
  210. package/dist/web/assets/mdx-CEldzbGM.js +0 -1
  211. package/dist/web/assets/mermaid-NOHMQCX5-BsnLQ2rU.js +0 -124
  212. package/dist/web/assets/pencil-DQeFTV0j.js +0 -1
  213. package/dist/web/assets/python-B5Uu3BYh.js +0 -1
  214. package/dist/web/assets/razor-BW2eCr4L.js +0 -1
  215. package/dist/web/assets/server-Dhw531hF.js +0 -1
  216. package/dist/web/assets/stateDiagram-AJRCARHV-CJAmyasO.js +0 -1
  217. package/dist/web/assets/stateDiagram-v2-BHNVJYJU-CXOXut1l.js +0 -1
  218. package/dist/web/assets/typescript-DyiE-tjk.js +0 -1
  219. package/dist/web/assets/use-projects-CNU2P0v0.js +0 -1
  220. package/dist/web/assets/use-workspaces-C1HJqhNs.js +0 -1
  221. package/dist/web/assets/useNormalizedLogs-Bu2oXEky.js +0 -1
  222. package/dist/web/assets/xml-BNpVw2Ox.js +0 -1
  223. package/dist/web/assets/yaml-DtqgC7D8.js +0 -1
  224. /package/dist/web/assets/{ProjectKanbanPage-DcpNTP1B.css → EditableTaskTitle-DcpNTP1B.css} +0 -0
@@ -0,0 +1,42 @@
1
+ import{c as We,r as d,j as c,aB as ln,D as un,aC as dn,aD as ne,aE as Pr,l as S,aF as Or,u as ie,X as jr,W as kr,E as Tr,an as Mr,av as _r}from"./index-CMJV-mgF.js";import{S as Dr,A as Lr,G as Ir,g as Fr}from"./task-priority-acVgTiil.js";import{A as zr}from"./arrow-down-BVePf1ZM.js";import{C as $r,S as Be,U as Wr}from"./status-styles-sQm4KLdp.js";import{C as Br}from"./check-qs0S_9rB.js";import{C as Hr}from"./copy-DejkmIHZ.js";import{C as Ur,c as Vr,F as Kr,T as me}from"./agent-meta-MzuGtqxl.js";import{A as Yr}from"./AgentLogo-BDyW3ihb.js";const Xr=[["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 12.5 8 15l2 2.5",key:"1tg20x"}],["path",{d:"m14 12.5 2 2.5-2 2.5",key:"yinavb"}]],Gr=We("file-code",Xr);const Zr=[["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"}],["circle",{cx:"10",cy:"12",r:"2",key:"737tya"}],["path",{d:"m20 17-1.296-1.296a2.41 2.41 0 0 0-3.408 0L9 22",key:"wt3hpn"}]],qr=We("file-image",Zr);const Qr=[["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"}]],Jr=We("file",Qr);const eo=[["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}],["line",{x1:"3",x2:"9",y1:"12",y2:"12",key:"1dyftd"}],["line",{x1:"15",x2:"21",y1:"12",y2:"12",key:"oup4p8"}]],to=We("git-commit-horizontal",eo);var no=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],W=no.reduce((e,t)=>{const n=ln(`Primitive.${t}`),r=d.forwardRef((o,s)=>{const{asChild:i,...a}=o,l=i?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),c.jsx(l,{...a,ref:s})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function ro(e,t){e&&un.flushSync(()=>e.dispatchEvent(t))}function cc(e,t){const n=d.createContext(t),r=s=>{const{children:i,...a}=s,l=d.useMemo(()=>a,Object.values(a));return c.jsx(n.Provider,{value:l,children:i})};r.displayName=e+"Provider";function o(s){const i=d.useContext(n);if(i)return i;if(t!==void 0)return t;throw new Error(`\`${s}\` must be used within \`${e}\``)}return[r,o]}function xt(e,t=[]){let n=[];function r(s,i){const a=d.createContext(i),l=n.length;n=[...n,i];const u=m=>{const{scope:g,children:h,...x}=m,p=g?.[e]?.[l]||a,v=d.useMemo(()=>x,Object.values(x));return c.jsx(p.Provider,{value:v,children:h})};u.displayName=s+"Provider";function f(m,g){const h=g?.[e]?.[l]||a,x=d.useContext(h);if(x)return x;if(i!==void 0)return i;throw new Error(`\`${m}\` must be used within \`${s}\``)}return[u,f]}const o=()=>{const s=n.map(i=>d.createContext(i));return function(a){const l=a?.[e]||s;return d.useMemo(()=>({[`__scope${e}`]:{...a,[e]:l}}),[a,l])}};return o.scopeName=e,[r,oo(o,...t)]}function oo(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(o=>({useScope:o(),scopeName:o.scopeName}));return function(s){const i=r.reduce((a,{useScope:l,scopeName:u})=>{const m=l(s)[`__scope${u}`];return{...a,...m}},{});return d.useMemo(()=>({[`__scope${t.scopeName}`]:i}),[i])}};return n.scopeName=t.scopeName,n}function q(e,t,{checkForDefaultPrevented:n=!0}={}){return function(o){if(e?.(o),n===!1||!o.defaultPrevented)return t?.(o)}}var J=globalThis?.document?d.useLayoutEffect:()=>{},so=dn[" useInsertionEffect ".trim().toString()]||J;function fn({prop:e,defaultProp:t,onChange:n=()=>{},caller:r}){const[o,s,i]=io({defaultProp:t,onChange:n}),a=e!==void 0,l=a?e:o;{const f=d.useRef(e!==void 0);d.useEffect(()=>{const m=f.current;m!==a&&console.warn(`${r} is changing from ${m?"controlled":"uncontrolled"} to ${a?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),f.current=a},[a,r])}const u=d.useCallback(f=>{if(a){const m=ao(f)?f(e):f;m!==e&&i.current?.(m)}else s(f)},[a,e,s,i]);return[l,u]}function io({defaultProp:e,onChange:t}){const[n,r]=d.useState(e),o=d.useRef(n),s=d.useRef(t);return so(()=>{s.current=t},[t]),d.useEffect(()=>{o.current!==n&&(s.current?.(n),o.current=n)},[n,o]),[n,r,s]}function ao(e){return typeof e=="function"}function co(e,t){return d.useReducer((n,r)=>t[n][r]??n,e)}var He=e=>{const{present:t,children:n}=e,r=lo(t),o=typeof n=="function"?n({present:r.isPresent}):d.Children.only(n),s=ne(r.ref,uo(o));return typeof n=="function"||r.isPresent?d.cloneElement(o,{ref:s}):null};He.displayName="Presence";function lo(e){const[t,n]=d.useState(),r=d.useRef(null),o=d.useRef(e),s=d.useRef("none"),i=e?"mounted":"unmounted",[a,l]=co(i,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return d.useEffect(()=>{const u=Re(r.current);s.current=a==="mounted"?u:"none"},[a]),J(()=>{const u=r.current,f=o.current;if(f!==e){const g=s.current,h=Re(u);e?l("MOUNT"):h==="none"||u?.display==="none"?l("UNMOUNT"):l(f&&g!==h?"ANIMATION_OUT":"UNMOUNT"),o.current=e}},[e,l]),J(()=>{if(t){let u;const f=t.ownerDocument.defaultView??window,m=h=>{const p=Re(r.current).includes(CSS.escape(h.animationName));if(h.target===t&&p&&(l("ANIMATION_END"),!o.current)){const v=t.style.animationFillMode;t.style.animationFillMode="forwards",u=f.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=v)})}},g=h=>{h.target===t&&(s.current=Re(r.current))};return t.addEventListener("animationstart",g),t.addEventListener("animationcancel",m),t.addEventListener("animationend",m),()=>{f.clearTimeout(u),t.removeEventListener("animationstart",g),t.removeEventListener("animationcancel",m),t.removeEventListener("animationend",m)}}else l("ANIMATION_END")},[t,l]),{isPresent:["mounted","unmountSuspended"].includes(a),ref:d.useCallback(u=>{r.current=u?getComputedStyle(u):null,n(u)},[])}}function Re(e){return e?.animationName||"none"}function uo(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var fo=dn[" useId ".trim().toString()]||(()=>{}),mo=0;function mn(e){const[t,n]=d.useState(fo());return J(()=>{n(r=>r??String(mo++))},[e]),e||(t?`radix-${t}`:"")}var Ue="Collapsible",[po]=xt(Ue),[ho,vt]=po(Ue),pn=d.forwardRef((e,t)=>{const{__scopeCollapsible:n,open:r,defaultOpen:o,disabled:s,onOpenChange:i,...a}=e,[l,u]=fn({prop:r,defaultProp:o??!1,onChange:i,caller:Ue});return c.jsx(ho,{scope:n,disabled:s,contentId:mn(),open:l,onOpenToggle:d.useCallback(()=>u(f=>!f),[u]),children:c.jsx(W.div,{"data-state":wt(l),"data-disabled":s?"":void 0,...a,ref:t})})});pn.displayName=Ue;var hn="CollapsibleTrigger",gn=d.forwardRef((e,t)=>{const{__scopeCollapsible:n,...r}=e,o=vt(hn,n);return c.jsx(W.button,{type:"button","aria-controls":o.contentId,"aria-expanded":o.open||!1,"data-state":wt(o.open),"data-disabled":o.disabled?"":void 0,disabled:o.disabled,...r,ref:t,onClick:q(e.onClick,o.onOpenToggle)})});gn.displayName=hn;var bt="CollapsibleContent",xn=d.forwardRef((e,t)=>{const{forceMount:n,...r}=e,o=vt(bt,e.__scopeCollapsible);return c.jsx(He,{present:n||o.open,children:({present:s})=>c.jsx(go,{...r,ref:t,present:s})})});xn.displayName=bt;var go=d.forwardRef((e,t)=>{const{__scopeCollapsible:n,present:r,children:o,...s}=e,i=vt(bt,n),[a,l]=d.useState(r),u=d.useRef(null),f=ne(t,u),m=d.useRef(0),g=m.current,h=d.useRef(0),x=h.current,p=i.open||a,v=d.useRef(p),b=d.useRef(void 0);return d.useEffect(()=>{const w=requestAnimationFrame(()=>v.current=!1);return()=>cancelAnimationFrame(w)},[]),J(()=>{const w=u.current;if(w){b.current=b.current||{transitionDuration:w.style.transitionDuration,animationName:w.style.animationName},w.style.transitionDuration="0s",w.style.animationName="none";const N=w.getBoundingClientRect();m.current=N.height,h.current=N.width,v.current||(w.style.transitionDuration=b.current.transitionDuration,w.style.animationName=b.current.animationName),l(r)}},[i.open,r]),c.jsx(W.div,{"data-state":wt(i.open),"data-disabled":i.disabled?"":void 0,id:i.contentId,hidden:!p,...s,ref:f,style:{"--radix-collapsible-content-height":g?`${g}px`:void 0,"--radix-collapsible-content-width":x?`${x}px`:void 0,...e.style},children:p&&o})});function wt(e){return e?"open":"closed"}var xo=pn,vo=gn,bo=xn;function ge(e){const t=d.useRef(e);return d.useEffect(()=>{t.current=e}),d.useMemo(()=>(...n)=>t.current?.(...n),[])}function wo(e,t=globalThis?.document){const n=ge(e);d.useEffect(()=>{const r=o=>{o.key==="Escape"&&n(o)};return t.addEventListener("keydown",r,{capture:!0}),()=>t.removeEventListener("keydown",r,{capture:!0})},[n,t])}var yo="DismissableLayer",ct="dismissableLayer.update",No="dismissableLayer.pointerDownOutside",Eo="dismissableLayer.focusOutside",_t,vn=d.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),bn=d.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:o,onFocusOutside:s,onInteractOutside:i,onDismiss:a,...l}=e,u=d.useContext(vn),[f,m]=d.useState(null),g=f?.ownerDocument??globalThis?.document,[,h]=d.useState({}),x=ne(t,E=>m(E)),p=Array.from(u.layers),[v]=[...u.layersWithOutsidePointerEventsDisabled].slice(-1),b=p.indexOf(v),w=f?p.indexOf(f):-1,N=u.layersWithOutsidePointerEventsDisabled.size>0,y=w>=b,C=Ao(E=>{const P=E.target,j=[...u.branches].some(O=>O.contains(P));!y||j||(o?.(E),i?.(E),E.defaultPrevented||a?.())},g),A=Ro(E=>{const P=E.target;[...u.branches].some(O=>O.contains(P))||(s?.(E),i?.(E),E.defaultPrevented||a?.())},g);return wo(E=>{w===u.layers.size-1&&(r?.(E),!E.defaultPrevented&&a&&(E.preventDefault(),a()))},g),d.useEffect(()=>{if(f)return n&&(u.layersWithOutsidePointerEventsDisabled.size===0&&(_t=g.body.style.pointerEvents,g.body.style.pointerEvents="none"),u.layersWithOutsidePointerEventsDisabled.add(f)),u.layers.add(f),Dt(),()=>{n&&u.layersWithOutsidePointerEventsDisabled.size===1&&(g.body.style.pointerEvents=_t)}},[f,g,n,u]),d.useEffect(()=>()=>{f&&(u.layers.delete(f),u.layersWithOutsidePointerEventsDisabled.delete(f),Dt())},[f,u]),d.useEffect(()=>{const E=()=>h({});return document.addEventListener(ct,E),()=>document.removeEventListener(ct,E)},[]),c.jsx(W.div,{...l,ref:x,style:{pointerEvents:N?y?"auto":"none":void 0,...e.style},onFocusCapture:q(e.onFocusCapture,A.onFocusCapture),onBlurCapture:q(e.onBlurCapture,A.onBlurCapture),onPointerDownCapture:q(e.onPointerDownCapture,C.onPointerDownCapture)})});bn.displayName=yo;var Co="DismissableLayerBranch",So=d.forwardRef((e,t)=>{const n=d.useContext(vn),r=d.useRef(null),o=ne(t,r);return d.useEffect(()=>{const s=r.current;if(s)return n.branches.add(s),()=>{n.branches.delete(s)}},[n.branches]),c.jsx(W.div,{...e,ref:o})});So.displayName=Co;function Ao(e,t=globalThis?.document){const n=ge(e),r=d.useRef(!1),o=d.useRef(()=>{});return d.useEffect(()=>{const s=a=>{if(a.target&&!r.current){let l=function(){wn(No,n,u,{discrete:!0})};const u={originalEvent:a};a.pointerType==="touch"?(t.removeEventListener("click",o.current),o.current=l,t.addEventListener("click",o.current,{once:!0})):l()}else t.removeEventListener("click",o.current);r.current=!1},i=window.setTimeout(()=>{t.addEventListener("pointerdown",s)},0);return()=>{window.clearTimeout(i),t.removeEventListener("pointerdown",s),t.removeEventListener("click",o.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function Ro(e,t=globalThis?.document){const n=ge(e),r=d.useRef(!1);return d.useEffect(()=>{const o=s=>{s.target&&!r.current&&wn(Eo,n,{originalEvent:s},{discrete:!1})};return t.addEventListener("focusin",o),()=>t.removeEventListener("focusin",o)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function Dt(){const e=new CustomEvent(ct);document.dispatchEvent(e)}function wn(e,t,n,{discrete:r}){const o=n.originalEvent.target,s=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&o.addEventListener(e,t,{once:!0}),r?ro(o,s):o.dispatchEvent(s)}var qe="focusScope.autoFocusOnMount",Qe="focusScope.autoFocusOnUnmount",Lt={bubbles:!1,cancelable:!0},Po="FocusScope",yn=d.forwardRef((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:o,onUnmountAutoFocus:s,...i}=e,[a,l]=d.useState(null),u=ge(o),f=ge(s),m=d.useRef(null),g=ne(t,p=>l(p)),h=d.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;d.useEffect(()=>{if(r){let p=function(N){if(h.paused||!a)return;const y=N.target;a.contains(y)?m.current=y:re(m.current,{select:!0})},v=function(N){if(h.paused||!a)return;const y=N.relatedTarget;y!==null&&(a.contains(y)||re(m.current,{select:!0}))},b=function(N){if(document.activeElement===document.body)for(const C of N)C.removedNodes.length>0&&re(a)};document.addEventListener("focusin",p),document.addEventListener("focusout",v);const w=new MutationObserver(b);return a&&w.observe(a,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",p),document.removeEventListener("focusout",v),w.disconnect()}}},[r,a,h.paused]),d.useEffect(()=>{if(a){Ft.add(h);const p=document.activeElement;if(!a.contains(p)){const b=new CustomEvent(qe,Lt);a.addEventListener(qe,u),a.dispatchEvent(b),b.defaultPrevented||(Oo(_o(Nn(a)),{select:!0}),document.activeElement===p&&re(a))}return()=>{a.removeEventListener(qe,u),setTimeout(()=>{const b=new CustomEvent(Qe,Lt);a.addEventListener(Qe,f),a.dispatchEvent(b),b.defaultPrevented||re(p??document.body,{select:!0}),a.removeEventListener(Qe,f),Ft.remove(h)},0)}}},[a,u,f,h]);const x=d.useCallback(p=>{if(!n&&!r||h.paused)return;const v=p.key==="Tab"&&!p.altKey&&!p.ctrlKey&&!p.metaKey,b=document.activeElement;if(v&&b){const w=p.currentTarget,[N,y]=jo(w);N&&y?!p.shiftKey&&b===y?(p.preventDefault(),n&&re(N,{select:!0})):p.shiftKey&&b===N&&(p.preventDefault(),n&&re(y,{select:!0})):b===w&&p.preventDefault()}},[n,r,h.paused]);return c.jsx(W.div,{tabIndex:-1,...i,ref:g,onKeyDown:x})});yn.displayName=Po;function Oo(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(re(r,{select:t}),document.activeElement!==n)return}function jo(e){const t=Nn(e),n=It(t,e),r=It(t.reverse(),e);return[n,r]}function Nn(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const o=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||o?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function It(e,t){for(const n of e)if(!ko(n,{upTo:t}))return n}function ko(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function To(e){return e instanceof HTMLInputElement&&"select"in e}function re(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&To(e)&&t&&e.select()}}var Ft=Mo();function Mo(){let e=[];return{add(t){const n=e[0];t!==n&&n?.pause(),e=zt(e,t),e.unshift(t)},remove(t){e=zt(e,t),e[0]?.resume()}}}function zt(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function _o(e){return e.filter(t=>t.tagName!=="A")}var Do="Portal",En=d.forwardRef((e,t)=>{const{container:n,...r}=e,[o,s]=d.useState(!1);J(()=>s(!0),[]);const i=n||o&&globalThis?.document?.body;return i?Pr.createPortal(c.jsx(W.div,{...r,ref:t}),i):null});En.displayName=Do;var Je=0;function Lo(){d.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??$t()),document.body.insertAdjacentElement("beforeend",e[1]??$t()),Je++,()=>{Je===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),Je--}},[])}function $t(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}var K=function(){return K=Object.assign||function(t){for(var n,r=1,o=arguments.length;r<o;r++){n=arguments[r];for(var s in n)Object.prototype.hasOwnProperty.call(n,s)&&(t[s]=n[s])}return t},K.apply(this,arguments)};function Cn(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n}function Io(e,t,n){if(n||arguments.length===2)for(var r=0,o=t.length,s;r<o;r++)(s||!(r in t))&&(s||(s=Array.prototype.slice.call(t,0,r)),s[r]=t[r]);return e.concat(s||Array.prototype.slice.call(t))}var _e="right-scroll-bar-position",De="width-before-scroll-bar",Fo="with-scroll-bars-hidden",zo="--removed-body-scroll-bar-size";function et(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function $o(e,t){var n=d.useState(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(r){var o=n.value;o!==r&&(n.value=r,n.callback(r,o))}}}})[0];return n.callback=t,n.facade}var Wo=typeof window<"u"?d.useLayoutEffect:d.useEffect,Wt=new WeakMap;function Bo(e,t){var n=$o(null,function(r){return e.forEach(function(o){return et(o,r)})});return Wo(function(){var r=Wt.get(n);if(r){var o=new Set(r),s=new Set(e),i=n.current;o.forEach(function(a){s.has(a)||et(a,null)}),s.forEach(function(a){o.has(a)||et(a,i)})}Wt.set(n,e)},[e]),n}function Ho(e){return e}function Uo(e,t){t===void 0&&(t=Ho);var n=[],r=!1,o={read:function(){if(r)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(s){var i=t(s,r);return n.push(i),function(){n=n.filter(function(a){return a!==i})}},assignSyncMedium:function(s){for(r=!0;n.length;){var i=n;n=[],i.forEach(s)}n={push:function(a){return s(a)},filter:function(){return n}}},assignMedium:function(s){r=!0;var i=[];if(n.length){var a=n;n=[],a.forEach(s),i=n}var l=function(){var f=i;i=[],f.forEach(s)},u=function(){return Promise.resolve().then(l)};u(),n={push:function(f){i.push(f),u()},filter:function(f){return i=i.filter(f),n}}}};return o}function Vo(e){e===void 0&&(e={});var t=Uo(null);return t.options=K({async:!0,ssr:!1},e),t}var Sn=function(e){var t=e.sideCar,n=Cn(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var r=t.read();if(!r)throw new Error("Sidecar medium not found");return d.createElement(r,K({},n))};Sn.isSideCarExport=!0;function Ko(e,t){return e.useMedium(t),Sn}var An=Vo(),tt=function(){},Ve=d.forwardRef(function(e,t){var n=d.useRef(null),r=d.useState({onScrollCapture:tt,onWheelCapture:tt,onTouchMoveCapture:tt}),o=r[0],s=r[1],i=e.forwardProps,a=e.children,l=e.className,u=e.removeScrollBar,f=e.enabled,m=e.shards,g=e.sideCar,h=e.noRelative,x=e.noIsolation,p=e.inert,v=e.allowPinchZoom,b=e.as,w=b===void 0?"div":b,N=e.gapMode,y=Cn(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),C=g,A=Bo([n,t]),E=K(K({},y),o);return d.createElement(d.Fragment,null,f&&d.createElement(C,{sideCar:An,removeScrollBar:u,shards:m,noRelative:h,noIsolation:x,inert:p,setCallbacks:s,allowPinchZoom:!!v,lockRef:n,gapMode:N}),i?d.cloneElement(d.Children.only(a),K(K({},E),{ref:A})):d.createElement(w,K({},E,{className:l,ref:A}),a))});Ve.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};Ve.classNames={fullWidth:De,zeroRight:_e};var Yo=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function Xo(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=Yo();return t&&e.setAttribute("nonce",t),e}function Go(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function Zo(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var qo=function(){var e=0,t=null;return{add:function(n){e==0&&(t=Xo())&&(Go(t,n),Zo(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},Qo=function(){var e=qo();return function(t,n){d.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},Rn=function(){var e=Qo(),t=function(n){var r=n.styles,o=n.dynamic;return e(r,o),null};return t},Jo={left:0,top:0,right:0,gap:0},nt=function(e){return parseInt(e||"",10)||0},es=function(e){var t=window.getComputedStyle(document.body),n=t[e==="padding"?"paddingLeft":"marginLeft"],r=t[e==="padding"?"paddingTop":"marginTop"],o=t[e==="padding"?"paddingRight":"marginRight"];return[nt(n),nt(r),nt(o)]},ts=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return Jo;var t=es(e),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-n+t[2]-t[0])}},ns=Rn(),pe="data-scroll-locked",rs=function(e,t,n,r){var o=e.left,s=e.top,i=e.right,a=e.gap;return n===void 0&&(n="margin"),`
2
+ .`.concat(Fo,` {
3
+ overflow: hidden `).concat(r,`;
4
+ padding-right: `).concat(a,"px ").concat(r,`;
5
+ }
6
+ body[`).concat(pe,`] {
7
+ overflow: hidden `).concat(r,`;
8
+ overscroll-behavior: contain;
9
+ `).concat([t&&"position: relative ".concat(r,";"),n==="margin"&&`
10
+ padding-left: `.concat(o,`px;
11
+ padding-top: `).concat(s,`px;
12
+ padding-right: `).concat(i,`px;
13
+ margin-left:0;
14
+ margin-top:0;
15
+ margin-right: `).concat(a,"px ").concat(r,`;
16
+ `),n==="padding"&&"padding-right: ".concat(a,"px ").concat(r,";")].filter(Boolean).join(""),`
17
+ }
18
+
19
+ .`).concat(_e,` {
20
+ right: `).concat(a,"px ").concat(r,`;
21
+ }
22
+
23
+ .`).concat(De,` {
24
+ margin-right: `).concat(a,"px ").concat(r,`;
25
+ }
26
+
27
+ .`).concat(_e," .").concat(_e,` {
28
+ right: 0 `).concat(r,`;
29
+ }
30
+
31
+ .`).concat(De," .").concat(De,` {
32
+ margin-right: 0 `).concat(r,`;
33
+ }
34
+
35
+ body[`).concat(pe,`] {
36
+ `).concat(zo,": ").concat(a,`px;
37
+ }
38
+ `)},Bt=function(){var e=parseInt(document.body.getAttribute(pe)||"0",10);return isFinite(e)?e:0},os=function(){d.useEffect(function(){return document.body.setAttribute(pe,(Bt()+1).toString()),function(){var e=Bt()-1;e<=0?document.body.removeAttribute(pe):document.body.setAttribute(pe,e.toString())}},[])},ss=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,o=r===void 0?"margin":r;os();var s=d.useMemo(function(){return ts(o)},[o]);return d.createElement(ns,{styles:rs(s,!t,o,n?"":"!important")})},lt=!1;if(typeof window<"u")try{var Pe=Object.defineProperty({},"passive",{get:function(){return lt=!0,!0}});window.addEventListener("test",Pe,Pe),window.removeEventListener("test",Pe,Pe)}catch{lt=!1}var ue=lt?{passive:!1}:!1,is=function(e){return e.tagName==="TEXTAREA"},Pn=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return n[t]!=="hidden"&&!(n.overflowY===n.overflowX&&!is(e)&&n[t]==="visible")},as=function(e){return Pn(e,"overflowY")},cs=function(e){return Pn(e,"overflowX")},Ht=function(e,t){var n=t.ownerDocument,r=t;do{typeof ShadowRoot<"u"&&r instanceof ShadowRoot&&(r=r.host);var o=On(e,r);if(o){var s=jn(e,r),i=s[1],a=s[2];if(i>a)return!0}r=r.parentNode}while(r&&r!==n.body);return!1},ls=function(e){var t=e.scrollTop,n=e.scrollHeight,r=e.clientHeight;return[t,n,r]},us=function(e){var t=e.scrollLeft,n=e.scrollWidth,r=e.clientWidth;return[t,n,r]},On=function(e,t){return e==="v"?as(t):cs(t)},jn=function(e,t){return e==="v"?ls(t):us(t)},ds=function(e,t){return e==="h"&&t==="rtl"?-1:1},fs=function(e,t,n,r,o){var s=ds(e,window.getComputedStyle(t).direction),i=s*r,a=n.target,l=t.contains(a),u=!1,f=i>0,m=0,g=0;do{if(!a)break;var h=jn(e,a),x=h[0],p=h[1],v=h[2],b=p-v-s*x;(x||b)&&On(e,a)&&(m+=b,g+=x);var w=a.parentNode;a=w&&w.nodeType===Node.DOCUMENT_FRAGMENT_NODE?w.host:w}while(!l&&a!==document.body||l&&(t.contains(a)||t===a));return(f&&Math.abs(m)<1||!f&&Math.abs(g)<1)&&(u=!0),u},Oe=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},Ut=function(e){return[e.deltaX,e.deltaY]},Vt=function(e){return e&&"current"in e?e.current:e},ms=function(e,t){return e[0]===t[0]&&e[1]===t[1]},ps=function(e){return`
39
+ .block-interactivity-`.concat(e,` {pointer-events: none;}
40
+ .allow-interactivity-`).concat(e,` {pointer-events: all;}
41
+ `)},hs=0,de=[];function gs(e){var t=d.useRef([]),n=d.useRef([0,0]),r=d.useRef(),o=d.useState(hs++)[0],s=d.useState(Rn)[0],i=d.useRef(e);d.useEffect(function(){i.current=e},[e]),d.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(o));var p=Io([e.lockRef.current],(e.shards||[]).map(Vt),!0).filter(Boolean);return p.forEach(function(v){return v.classList.add("allow-interactivity-".concat(o))}),function(){document.body.classList.remove("block-interactivity-".concat(o)),p.forEach(function(v){return v.classList.remove("allow-interactivity-".concat(o))})}}},[e.inert,e.lockRef.current,e.shards]);var a=d.useCallback(function(p,v){if("touches"in p&&p.touches.length===2||p.type==="wheel"&&p.ctrlKey)return!i.current.allowPinchZoom;var b=Oe(p),w=n.current,N="deltaX"in p?p.deltaX:w[0]-b[0],y="deltaY"in p?p.deltaY:w[1]-b[1],C,A=p.target,E=Math.abs(N)>Math.abs(y)?"h":"v";if("touches"in p&&E==="h"&&A.type==="range")return!1;var P=window.getSelection(),j=P&&P.anchorNode,O=j?j===A||j.contains(A):!1;if(O)return!1;var T=Ht(E,A);if(!T)return!0;if(T?C=E:(C=E==="v"?"h":"v",T=Ht(E,A)),!T)return!1;if(!r.current&&"changedTouches"in p&&(N||y)&&(r.current=C),!C)return!0;var L=r.current||C;return fs(L,v,p,L==="h"?N:y)},[]),l=d.useCallback(function(p){var v=p;if(!(!de.length||de[de.length-1]!==s)){var b="deltaY"in v?Ut(v):Oe(v),w=t.current.filter(function(C){return C.name===v.type&&(C.target===v.target||v.target===C.shadowParent)&&ms(C.delta,b)})[0];if(w&&w.should){v.cancelable&&v.preventDefault();return}if(!w){var N=(i.current.shards||[]).map(Vt).filter(Boolean).filter(function(C){return C.contains(v.target)}),y=N.length>0?a(v,N[0]):!i.current.noIsolation;y&&v.cancelable&&v.preventDefault()}}},[]),u=d.useCallback(function(p,v,b,w){var N={name:p,delta:v,target:b,should:w,shadowParent:xs(b)};t.current.push(N),setTimeout(function(){t.current=t.current.filter(function(y){return y!==N})},1)},[]),f=d.useCallback(function(p){n.current=Oe(p),r.current=void 0},[]),m=d.useCallback(function(p){u(p.type,Ut(p),p.target,a(p,e.lockRef.current))},[]),g=d.useCallback(function(p){u(p.type,Oe(p),p.target,a(p,e.lockRef.current))},[]);d.useEffect(function(){return de.push(s),e.setCallbacks({onScrollCapture:m,onWheelCapture:m,onTouchMoveCapture:g}),document.addEventListener("wheel",l,ue),document.addEventListener("touchmove",l,ue),document.addEventListener("touchstart",f,ue),function(){de=de.filter(function(p){return p!==s}),document.removeEventListener("wheel",l,ue),document.removeEventListener("touchmove",l,ue),document.removeEventListener("touchstart",f,ue)}},[]);var h=e.removeScrollBar,x=e.inert;return d.createElement(d.Fragment,null,x?d.createElement(s,{styles:ps(o)}):null,h?d.createElement(ss,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function xs(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const vs=Ko(An,gs);var kn=d.forwardRef(function(e,t){return d.createElement(Ve,K({},e,{ref:t,sideCar:vs}))});kn.classNames=Ve.classNames;var bs=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},fe=new WeakMap,je=new WeakMap,ke={},rt=0,Tn=function(e){return e&&(e.host||Tn(e.parentNode))},ws=function(e,t){return t.map(function(n){if(e.contains(n))return n;var r=Tn(n);return r&&e.contains(r)?r:(console.error("aria-hidden",n,"in not contained inside",e,". Doing nothing"),null)}).filter(function(n){return!!n})},ys=function(e,t,n,r){var o=ws(t,Array.isArray(e)?e:[e]);ke[n]||(ke[n]=new WeakMap);var s=ke[n],i=[],a=new Set,l=new Set(o),u=function(m){!m||a.has(m)||(a.add(m),u(m.parentNode))};o.forEach(u);var f=function(m){!m||l.has(m)||Array.prototype.forEach.call(m.children,function(g){if(a.has(g))f(g);else try{var h=g.getAttribute(r),x=h!==null&&h!=="false",p=(fe.get(g)||0)+1,v=(s.get(g)||0)+1;fe.set(g,p),s.set(g,v),i.push(g),p===1&&x&&je.set(g,!0),v===1&&g.setAttribute(n,"true"),x||g.setAttribute(r,"true")}catch(b){console.error("aria-hidden: cannot operate on ",g,b)}})};return f(t),a.clear(),rt++,function(){i.forEach(function(m){var g=fe.get(m)-1,h=s.get(m)-1;fe.set(m,g),s.set(m,h),g||(je.has(m)||m.removeAttribute(r),je.delete(m)),h||m.removeAttribute(n)}),rt--,rt||(fe=new WeakMap,fe=new WeakMap,je=new WeakMap,ke={})}},Ns=function(e,t,n){n===void 0&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),o=bs(e);return o?(r.push.apply(r,Array.from(o.querySelectorAll("[aria-live], script"))),ys(r,o,n,"aria-hidden")):function(){return null}};function Es(e){const[t,n]=d.useState(void 0);return J(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const r=new ResizeObserver(o=>{if(!Array.isArray(o)||!o.length)return;const s=o[0];let i,a;if("borderBoxSize"in s){const l=s.borderBoxSize,u=Array.isArray(l)?l[0]:l;i=u.inlineSize,a=u.blockSize}else i=e.offsetWidth,a=e.offsetHeight;n({width:i,height:a})});return r.observe(e,{box:"border-box"}),()=>r.unobserve(e)}else n(void 0)},[e]),t}const Cs=["top","right","bottom","left"],oe=Math.min,z=Math.max,Ie=Math.round,Te=Math.floor,X=e=>({x:e,y:e}),Ss={left:"right",right:"left",bottom:"top",top:"bottom"},As={start:"end",end:"start"};function ut(e,t,n){return z(e,oe(t,n))}function ee(e,t){return typeof e=="function"?e(t):e}function te(e){return e.split("-")[0]}function be(e){return e.split("-")[1]}function yt(e){return e==="x"?"y":"x"}function Nt(e){return e==="y"?"height":"width"}const Rs=new Set(["top","bottom"]);function Y(e){return Rs.has(te(e))?"y":"x"}function Et(e){return yt(Y(e))}function Ps(e,t,n){n===void 0&&(n=!1);const r=be(e),o=Et(e),s=Nt(o);let i=o==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[s]>t.floating[s]&&(i=Fe(i)),[i,Fe(i)]}function Os(e){const t=Fe(e);return[dt(e),t,dt(t)]}function dt(e){return e.replace(/start|end/g,t=>As[t])}const Kt=["left","right"],Yt=["right","left"],js=["top","bottom"],ks=["bottom","top"];function Ts(e,t,n){switch(e){case"top":case"bottom":return n?t?Yt:Kt:t?Kt:Yt;case"left":case"right":return t?js:ks;default:return[]}}function Ms(e,t,n,r){const o=be(e);let s=Ts(te(e),n==="start",r);return o&&(s=s.map(i=>i+"-"+o),t&&(s=s.concat(s.map(dt)))),s}function Fe(e){return e.replace(/left|right|bottom|top/g,t=>Ss[t])}function _s(e){return{top:0,right:0,bottom:0,left:0,...e}}function Mn(e){return typeof e!="number"?_s(e):{top:e,right:e,bottom:e,left:e}}function ze(e){const{x:t,y:n,width:r,height:o}=e;return{width:r,height:o,top:n,left:t,right:t+r,bottom:n+o,x:t,y:n}}function Xt(e,t,n){let{reference:r,floating:o}=e;const s=Y(t),i=Et(t),a=Nt(i),l=te(t),u=s==="y",f=r.x+r.width/2-o.width/2,m=r.y+r.height/2-o.height/2,g=r[a]/2-o[a]/2;let h;switch(l){case"top":h={x:f,y:r.y-o.height};break;case"bottom":h={x:f,y:r.y+r.height};break;case"right":h={x:r.x+r.width,y:m};break;case"left":h={x:r.x-o.width,y:m};break;default:h={x:r.x,y:r.y}}switch(be(t)){case"start":h[i]-=g*(n&&u?-1:1);break;case"end":h[i]+=g*(n&&u?-1:1);break}return h}async function Ds(e,t){var n;t===void 0&&(t={});const{x:r,y:o,platform:s,rects:i,elements:a,strategy:l}=e,{boundary:u="clippingAncestors",rootBoundary:f="viewport",elementContext:m="floating",altBoundary:g=!1,padding:h=0}=ee(t,e),x=Mn(h),v=a[g?m==="floating"?"reference":"floating":m],b=ze(await s.getClippingRect({element:(n=await(s.isElement==null?void 0:s.isElement(v)))==null||n?v:v.contextElement||await(s.getDocumentElement==null?void 0:s.getDocumentElement(a.floating)),boundary:u,rootBoundary:f,strategy:l})),w=m==="floating"?{x:r,y:o,width:i.floating.width,height:i.floating.height}:i.reference,N=await(s.getOffsetParent==null?void 0:s.getOffsetParent(a.floating)),y=await(s.isElement==null?void 0:s.isElement(N))?await(s.getScale==null?void 0:s.getScale(N))||{x:1,y:1}:{x:1,y:1},C=ze(s.convertOffsetParentRelativeRectToViewportRelativeRect?await s.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:w,offsetParent:N,strategy:l}):w);return{top:(b.top-C.top+x.top)/y.y,bottom:(C.bottom-b.bottom+x.bottom)/y.y,left:(b.left-C.left+x.left)/y.x,right:(C.right-b.right+x.right)/y.x}}const Ls=async(e,t,n)=>{const{placement:r="bottom",strategy:o="absolute",middleware:s=[],platform:i}=n,a=s.filter(Boolean),l=await(i.isRTL==null?void 0:i.isRTL(t));let u=await i.getElementRects({reference:e,floating:t,strategy:o}),{x:f,y:m}=Xt(u,r,l),g=r,h={},x=0;for(let v=0;v<a.length;v++){var p;const{name:b,fn:w}=a[v],{x:N,y,data:C,reset:A}=await w({x:f,y:m,initialPlacement:r,placement:g,strategy:o,middlewareData:h,rects:u,platform:{...i,detectOverflow:(p=i.detectOverflow)!=null?p:Ds},elements:{reference:e,floating:t}});f=N??f,m=y??m,h={...h,[b]:{...h[b],...C}},A&&x<=50&&(x++,typeof A=="object"&&(A.placement&&(g=A.placement),A.rects&&(u=A.rects===!0?await i.getElementRects({reference:e,floating:t,strategy:o}):A.rects),{x:f,y:m}=Xt(u,g,l)),v=-1)}return{x:f,y:m,placement:g,strategy:o,middlewareData:h}},Is=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:o,rects:s,platform:i,elements:a,middlewareData:l}=t,{element:u,padding:f=0}=ee(e,t)||{};if(u==null)return{};const m=Mn(f),g={x:n,y:r},h=Et(o),x=Nt(h),p=await i.getDimensions(u),v=h==="y",b=v?"top":"left",w=v?"bottom":"right",N=v?"clientHeight":"clientWidth",y=s.reference[x]+s.reference[h]-g[h]-s.floating[x],C=g[h]-s.reference[h],A=await(i.getOffsetParent==null?void 0:i.getOffsetParent(u));let E=A?A[N]:0;(!E||!await(i.isElement==null?void 0:i.isElement(A)))&&(E=a.floating[N]||s.floating[x]);const P=y/2-C/2,j=E/2-p[x]/2-1,O=oe(m[b],j),T=oe(m[w],j),L=O,M=E-p[x]-T,k=E/2-p[x]/2+P,F=ut(L,k,M),_=!l.arrow&&be(o)!=null&&k!==F&&s.reference[x]/2-(k<L?O:T)-p[x]/2<0,D=_?k<L?k-L:k-M:0;return{[h]:g[h]+D,data:{[h]:F,centerOffset:k-F-D,..._&&{alignmentOffset:D}},reset:_}}}),Fs=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:o,middlewareData:s,rects:i,initialPlacement:a,platform:l,elements:u}=t,{mainAxis:f=!0,crossAxis:m=!0,fallbackPlacements:g,fallbackStrategy:h="bestFit",fallbackAxisSideDirection:x="none",flipAlignment:p=!0,...v}=ee(e,t);if((n=s.arrow)!=null&&n.alignmentOffset)return{};const b=te(o),w=Y(a),N=te(a)===a,y=await(l.isRTL==null?void 0:l.isRTL(u.floating)),C=g||(N||!p?[Fe(a)]:Os(a)),A=x!=="none";!g&&A&&C.push(...Ms(a,p,x,y));const E=[a,...C],P=await l.detectOverflow(t,v),j=[];let O=((r=s.flip)==null?void 0:r.overflows)||[];if(f&&j.push(P[b]),m){const k=Ps(o,i,y);j.push(P[k[0]],P[k[1]])}if(O=[...O,{placement:o,overflows:j}],!j.every(k=>k<=0)){var T,L;const k=(((T=s.flip)==null?void 0:T.index)||0)+1,F=E[k];if(F&&(!(m==="alignment"?w!==Y(F):!1)||O.every(R=>Y(R.placement)===w?R.overflows[0]>0:!0)))return{data:{index:k,overflows:O},reset:{placement:F}};let _=(L=O.filter(D=>D.overflows[0]<=0).sort((D,R)=>D.overflows[1]-R.overflows[1])[0])==null?void 0:L.placement;if(!_)switch(h){case"bestFit":{var M;const D=(M=O.filter(R=>{if(A){const I=Y(R.placement);return I===w||I==="y"}return!0}).map(R=>[R.placement,R.overflows.filter(I=>I>0).reduce((I,U)=>I+U,0)]).sort((R,I)=>R[1]-I[1])[0])==null?void 0:M[0];D&&(_=D);break}case"initialPlacement":_=a;break}if(o!==_)return{reset:{placement:_}}}return{}}}};function Gt(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function Zt(e){return Cs.some(t=>e[t]>=0)}const zs=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n,platform:r}=t,{strategy:o="referenceHidden",...s}=ee(e,t);switch(o){case"referenceHidden":{const i=await r.detectOverflow(t,{...s,elementContext:"reference"}),a=Gt(i,n.reference);return{data:{referenceHiddenOffsets:a,referenceHidden:Zt(a)}}}case"escaped":{const i=await r.detectOverflow(t,{...s,altBoundary:!0}),a=Gt(i,n.floating);return{data:{escapedOffsets:a,escaped:Zt(a)}}}default:return{}}}}},_n=new Set(["left","top"]);async function $s(e,t){const{placement:n,platform:r,elements:o}=e,s=await(r.isRTL==null?void 0:r.isRTL(o.floating)),i=te(n),a=be(n),l=Y(n)==="y",u=_n.has(i)?-1:1,f=s&&l?-1:1,m=ee(t,e);let{mainAxis:g,crossAxis:h,alignmentAxis:x}=typeof m=="number"?{mainAxis:m,crossAxis:0,alignmentAxis:null}:{mainAxis:m.mainAxis||0,crossAxis:m.crossAxis||0,alignmentAxis:m.alignmentAxis};return a&&typeof x=="number"&&(h=a==="end"?x*-1:x),l?{x:h*f,y:g*u}:{x:g*u,y:h*f}}const Ws=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:o,y:s,placement:i,middlewareData:a}=t,l=await $s(t,e);return i===((n=a.offset)==null?void 0:n.placement)&&(r=a.arrow)!=null&&r.alignmentOffset?{}:{x:o+l.x,y:s+l.y,data:{...l,placement:i}}}}},Bs=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:o,platform:s}=t,{mainAxis:i=!0,crossAxis:a=!1,limiter:l={fn:b=>{let{x:w,y:N}=b;return{x:w,y:N}}},...u}=ee(e,t),f={x:n,y:r},m=await s.detectOverflow(t,u),g=Y(te(o)),h=yt(g);let x=f[h],p=f[g];if(i){const b=h==="y"?"top":"left",w=h==="y"?"bottom":"right",N=x+m[b],y=x-m[w];x=ut(N,x,y)}if(a){const b=g==="y"?"top":"left",w=g==="y"?"bottom":"right",N=p+m[b],y=p-m[w];p=ut(N,p,y)}const v=l.fn({...t,[h]:x,[g]:p});return{...v,data:{x:v.x-n,y:v.y-r,enabled:{[h]:i,[g]:a}}}}}},Hs=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:r,placement:o,rects:s,middlewareData:i}=t,{offset:a=0,mainAxis:l=!0,crossAxis:u=!0}=ee(e,t),f={x:n,y:r},m=Y(o),g=yt(m);let h=f[g],x=f[m];const p=ee(a,t),v=typeof p=="number"?{mainAxis:p,crossAxis:0}:{mainAxis:0,crossAxis:0,...p};if(l){const N=g==="y"?"height":"width",y=s.reference[g]-s.floating[N]+v.mainAxis,C=s.reference[g]+s.reference[N]-v.mainAxis;h<y?h=y:h>C&&(h=C)}if(u){var b,w;const N=g==="y"?"width":"height",y=_n.has(te(o)),C=s.reference[m]-s.floating[N]+(y&&((b=i.offset)==null?void 0:b[m])||0)+(y?0:v.crossAxis),A=s.reference[m]+s.reference[N]+(y?0:((w=i.offset)==null?void 0:w[m])||0)-(y?v.crossAxis:0);x<C?x=C:x>A&&(x=A)}return{[g]:h,[m]:x}}}},Us=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,r;const{placement:o,rects:s,platform:i,elements:a}=t,{apply:l=()=>{},...u}=ee(e,t),f=await i.detectOverflow(t,u),m=te(o),g=be(o),h=Y(o)==="y",{width:x,height:p}=s.floating;let v,b;m==="top"||m==="bottom"?(v=m,b=g===(await(i.isRTL==null?void 0:i.isRTL(a.floating))?"start":"end")?"left":"right"):(b=m,v=g==="end"?"top":"bottom");const w=p-f.top-f.bottom,N=x-f.left-f.right,y=oe(p-f[v],w),C=oe(x-f[b],N),A=!t.middlewareData.shift;let E=y,P=C;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(P=N),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(E=w),A&&!g){const O=z(f.left,0),T=z(f.right,0),L=z(f.top,0),M=z(f.bottom,0);h?P=x-2*(O!==0||T!==0?O+T:z(f.left,f.right)):E=p-2*(L!==0||M!==0?L+M:z(f.top,f.bottom))}await l({...t,availableWidth:P,availableHeight:E});const j=await i.getDimensions(a.floating);return x!==j.width||p!==j.height?{reset:{rects:!0}}:{}}}};function Ke(){return typeof window<"u"}function we(e){return Dn(e)?(e.nodeName||"").toLowerCase():"#document"}function $(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Z(e){var t;return(t=(Dn(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function Dn(e){return Ke()?e instanceof Node||e instanceof $(e).Node:!1}function B(e){return Ke()?e instanceof Element||e instanceof $(e).Element:!1}function G(e){return Ke()?e instanceof HTMLElement||e instanceof $(e).HTMLElement:!1}function qt(e){return!Ke()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof $(e).ShadowRoot}const Vs=new Set(["inline","contents"]);function Ce(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=H(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!Vs.has(o)}const Ks=new Set(["table","td","th"]);function Ys(e){return Ks.has(we(e))}const Xs=[":popover-open",":modal"];function Ye(e){return Xs.some(t=>{try{return e.matches(t)}catch{return!1}})}const Gs=["transform","translate","scale","rotate","perspective"],Zs=["transform","translate","scale","rotate","perspective","filter"],qs=["paint","layout","strict","content"];function Ct(e){const t=St(),n=B(e)?H(e):e;return Gs.some(r=>n[r]?n[r]!=="none":!1)||(n.containerType?n.containerType!=="normal":!1)||!t&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!t&&(n.filter?n.filter!=="none":!1)||Zs.some(r=>(n.willChange||"").includes(r))||qs.some(r=>(n.contain||"").includes(r))}function Qs(e){let t=se(e);for(;G(t)&&!xe(t);){if(Ct(t))return t;if(Ye(t))return null;t=se(t)}return null}function St(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const Js=new Set(["html","body","#document"]);function xe(e){return Js.has(we(e))}function H(e){return $(e).getComputedStyle(e)}function Xe(e){return B(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function se(e){if(we(e)==="html")return e;const t=e.assignedSlot||e.parentNode||qt(e)&&e.host||Z(e);return qt(t)?t.host:t}function Ln(e){const t=se(e);return xe(t)?e.ownerDocument?e.ownerDocument.body:e.body:G(t)&&Ce(t)?t:Ln(t)}function Ee(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const o=Ln(e),s=o===((r=e.ownerDocument)==null?void 0:r.body),i=$(o);if(s){const a=ft(i);return t.concat(i,i.visualViewport||[],Ce(o)?o:[],a&&n?Ee(a):[])}return t.concat(o,Ee(o,[],n))}function ft(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function In(e){const t=H(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=G(e),s=o?e.offsetWidth:n,i=o?e.offsetHeight:r,a=Ie(n)!==s||Ie(r)!==i;return a&&(n=s,r=i),{width:n,height:r,$:a}}function At(e){return B(e)?e:e.contextElement}function he(e){const t=At(e);if(!G(t))return X(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:s}=In(t);let i=(s?Ie(n.width):n.width)/r,a=(s?Ie(n.height):n.height)/o;return(!i||!Number.isFinite(i))&&(i=1),(!a||!Number.isFinite(a))&&(a=1),{x:i,y:a}}const ei=X(0);function Fn(e){const t=$(e);return!St()||!t.visualViewport?ei:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function ti(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==$(e)?!1:t}function ce(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const o=e.getBoundingClientRect(),s=At(e);let i=X(1);t&&(r?B(r)&&(i=he(r)):i=he(e));const a=ti(s,n,r)?Fn(s):X(0);let l=(o.left+a.x)/i.x,u=(o.top+a.y)/i.y,f=o.width/i.x,m=o.height/i.y;if(s){const g=$(s),h=r&&B(r)?$(r):r;let x=g,p=ft(x);for(;p&&r&&h!==x;){const v=he(p),b=p.getBoundingClientRect(),w=H(p),N=b.left+(p.clientLeft+parseFloat(w.paddingLeft))*v.x,y=b.top+(p.clientTop+parseFloat(w.paddingTop))*v.y;l*=v.x,u*=v.y,f*=v.x,m*=v.y,l+=N,u+=y,x=$(p),p=ft(x)}}return ze({width:f,height:m,x:l,y:u})}function Ge(e,t){const n=Xe(e).scrollLeft;return t?t.left+n:ce(Z(e)).left+n}function zn(e,t){const n=e.getBoundingClientRect(),r=n.left+t.scrollLeft-Ge(e,n),o=n.top+t.scrollTop;return{x:r,y:o}}function ni(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e;const s=o==="fixed",i=Z(r),a=t?Ye(t.floating):!1;if(r===i||a&&s)return n;let l={scrollLeft:0,scrollTop:0},u=X(1);const f=X(0),m=G(r);if((m||!m&&!s)&&((we(r)!=="body"||Ce(i))&&(l=Xe(r)),G(r))){const h=ce(r);u=he(r),f.x=h.x+r.clientLeft,f.y=h.y+r.clientTop}const g=i&&!m&&!s?zn(i,l):X(0);return{width:n.width*u.x,height:n.height*u.y,x:n.x*u.x-l.scrollLeft*u.x+f.x+g.x,y:n.y*u.y-l.scrollTop*u.y+f.y+g.y}}function ri(e){return Array.from(e.getClientRects())}function oi(e){const t=Z(e),n=Xe(e),r=e.ownerDocument.body,o=z(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),s=z(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let i=-n.scrollLeft+Ge(e);const a=-n.scrollTop;return H(r).direction==="rtl"&&(i+=z(t.clientWidth,r.clientWidth)-o),{width:o,height:s,x:i,y:a}}const Qt=25;function si(e,t){const n=$(e),r=Z(e),o=n.visualViewport;let s=r.clientWidth,i=r.clientHeight,a=0,l=0;if(o){s=o.width,i=o.height;const f=St();(!f||f&&t==="fixed")&&(a=o.offsetLeft,l=o.offsetTop)}const u=Ge(r);if(u<=0){const f=r.ownerDocument,m=f.body,g=getComputedStyle(m),h=f.compatMode==="CSS1Compat"&&parseFloat(g.marginLeft)+parseFloat(g.marginRight)||0,x=Math.abs(r.clientWidth-m.clientWidth-h);x<=Qt&&(s-=x)}else u<=Qt&&(s+=u);return{width:s,height:i,x:a,y:l}}const ii=new Set(["absolute","fixed"]);function ai(e,t){const n=ce(e,!0,t==="fixed"),r=n.top+e.clientTop,o=n.left+e.clientLeft,s=G(e)?he(e):X(1),i=e.clientWidth*s.x,a=e.clientHeight*s.y,l=o*s.x,u=r*s.y;return{width:i,height:a,x:l,y:u}}function Jt(e,t,n){let r;if(t==="viewport")r=si(e,n);else if(t==="document")r=oi(Z(e));else if(B(t))r=ai(t,n);else{const o=Fn(e);r={x:t.x-o.x,y:t.y-o.y,width:t.width,height:t.height}}return ze(r)}function $n(e,t){const n=se(e);return n===t||!B(n)||xe(n)?!1:H(n).position==="fixed"||$n(n,t)}function ci(e,t){const n=t.get(e);if(n)return n;let r=Ee(e,[],!1).filter(a=>B(a)&&we(a)!=="body"),o=null;const s=H(e).position==="fixed";let i=s?se(e):e;for(;B(i)&&!xe(i);){const a=H(i),l=Ct(i);!l&&a.position==="fixed"&&(o=null),(s?!l&&!o:!l&&a.position==="static"&&!!o&&ii.has(o.position)||Ce(i)&&!l&&$n(e,i))?r=r.filter(f=>f!==i):o=a,i=se(i)}return t.set(e,r),r}function li(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const i=[...n==="clippingAncestors"?Ye(t)?[]:ci(t,this._c):[].concat(n),r],a=i[0],l=i.reduce((u,f)=>{const m=Jt(t,f,o);return u.top=z(m.top,u.top),u.right=oe(m.right,u.right),u.bottom=oe(m.bottom,u.bottom),u.left=z(m.left,u.left),u},Jt(t,a,o));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function ui(e){const{width:t,height:n}=In(e);return{width:t,height:n}}function di(e,t,n){const r=G(t),o=Z(t),s=n==="fixed",i=ce(e,!0,s,t);let a={scrollLeft:0,scrollTop:0};const l=X(0);function u(){l.x=Ge(o)}if(r||!r&&!s)if((we(t)!=="body"||Ce(o))&&(a=Xe(t)),r){const h=ce(t,!0,s,t);l.x=h.x+t.clientLeft,l.y=h.y+t.clientTop}else o&&u();s&&!r&&o&&u();const f=o&&!r&&!s?zn(o,a):X(0),m=i.left+a.scrollLeft-l.x-f.x,g=i.top+a.scrollTop-l.y-f.y;return{x:m,y:g,width:i.width,height:i.height}}function ot(e){return H(e).position==="static"}function en(e,t){if(!G(e)||H(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return Z(e)===n&&(n=n.ownerDocument.body),n}function Wn(e,t){const n=$(e);if(Ye(e))return n;if(!G(e)){let o=se(e);for(;o&&!xe(o);){if(B(o)&&!ot(o))return o;o=se(o)}return n}let r=en(e,t);for(;r&&Ys(r)&&ot(r);)r=en(r,t);return r&&xe(r)&&ot(r)&&!Ct(r)?n:r||Qs(e)||n}const fi=async function(e){const t=this.getOffsetParent||Wn,n=this.getDimensions,r=await n(e.floating);return{reference:di(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function mi(e){return H(e).direction==="rtl"}const pi={convertOffsetParentRelativeRectToViewportRelativeRect:ni,getDocumentElement:Z,getClippingRect:li,getOffsetParent:Wn,getElementRects:fi,getClientRects:ri,getDimensions:ui,getScale:he,isElement:B,isRTL:mi};function Bn(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function hi(e,t){let n=null,r;const o=Z(e);function s(){var a;clearTimeout(r),(a=n)==null||a.disconnect(),n=null}function i(a,l){a===void 0&&(a=!1),l===void 0&&(l=1),s();const u=e.getBoundingClientRect(),{left:f,top:m,width:g,height:h}=u;if(a||t(),!g||!h)return;const x=Te(m),p=Te(o.clientWidth-(f+g)),v=Te(o.clientHeight-(m+h)),b=Te(f),N={rootMargin:-x+"px "+-p+"px "+-v+"px "+-b+"px",threshold:z(0,oe(1,l))||1};let y=!0;function C(A){const E=A[0].intersectionRatio;if(E!==l){if(!y)return i();E?i(!1,E):r=setTimeout(()=>{i(!1,1e-7)},1e3)}E===1&&!Bn(u,e.getBoundingClientRect())&&i(),y=!1}try{n=new IntersectionObserver(C,{...N,root:o.ownerDocument})}catch{n=new IntersectionObserver(C,N)}n.observe(e)}return i(!0),s}function gi(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:o=!0,ancestorResize:s=!0,elementResize:i=typeof ResizeObserver=="function",layoutShift:a=typeof IntersectionObserver=="function",animationFrame:l=!1}=r,u=At(e),f=o||s?[...u?Ee(u):[],...Ee(t)]:[];f.forEach(b=>{o&&b.addEventListener("scroll",n,{passive:!0}),s&&b.addEventListener("resize",n)});const m=u&&a?hi(u,n):null;let g=-1,h=null;i&&(h=new ResizeObserver(b=>{let[w]=b;w&&w.target===u&&h&&(h.unobserve(t),cancelAnimationFrame(g),g=requestAnimationFrame(()=>{var N;(N=h)==null||N.observe(t)})),n()}),u&&!l&&h.observe(u),h.observe(t));let x,p=l?ce(e):null;l&&v();function v(){const b=ce(e);p&&!Bn(p,b)&&n(),p=b,x=requestAnimationFrame(v)}return n(),()=>{var b;f.forEach(w=>{o&&w.removeEventListener("scroll",n),s&&w.removeEventListener("resize",n)}),m?.(),(b=h)==null||b.disconnect(),h=null,l&&cancelAnimationFrame(x)}}const xi=Ws,vi=Bs,bi=Fs,wi=Us,yi=zs,tn=Is,Ni=Hs,Ei=(e,t,n)=>{const r=new Map,o={platform:pi,...n},s={...o.platform,_c:r};return Ls(e,t,{...o,platform:s})};var Ci=typeof document<"u",Si=function(){},Le=Ci?d.useLayoutEffect:Si;function $e(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let n,r,o;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;r--!==0;)if(!$e(e[r],t[r]))return!1;return!0}if(o=Object.keys(e),n=o.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,o[r]))return!1;for(r=n;r--!==0;){const s=o[r];if(!(s==="_owner"&&e.$$typeof)&&!$e(e[s],t[s]))return!1}return!0}return e!==e&&t!==t}function Hn(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function nn(e,t){const n=Hn(e);return Math.round(t*n)/n}function st(e){const t=d.useRef(e);return Le(()=>{t.current=e}),t}function Ai(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:o,elements:{reference:s,floating:i}={},transform:a=!0,whileElementsMounted:l,open:u}=e,[f,m]=d.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[g,h]=d.useState(r);$e(g,r)||h(r);const[x,p]=d.useState(null),[v,b]=d.useState(null),w=d.useCallback(R=>{R!==A.current&&(A.current=R,p(R))},[]),N=d.useCallback(R=>{R!==E.current&&(E.current=R,b(R))},[]),y=s||x,C=i||v,A=d.useRef(null),E=d.useRef(null),P=d.useRef(f),j=l!=null,O=st(l),T=st(o),L=st(u),M=d.useCallback(()=>{if(!A.current||!E.current)return;const R={placement:t,strategy:n,middleware:g};T.current&&(R.platform=T.current),Ei(A.current,E.current,R).then(I=>{const U={...I,isPositioned:L.current!==!1};k.current&&!$e(P.current,U)&&(P.current=U,un.flushSync(()=>{m(U)}))})},[g,t,n,T,L]);Le(()=>{u===!1&&P.current.isPositioned&&(P.current.isPositioned=!1,m(R=>({...R,isPositioned:!1})))},[u]);const k=d.useRef(!1);Le(()=>(k.current=!0,()=>{k.current=!1}),[]),Le(()=>{if(y&&(A.current=y),C&&(E.current=C),y&&C){if(O.current)return O.current(y,C,M);M()}},[y,C,M,O,j]);const F=d.useMemo(()=>({reference:A,floating:E,setReference:w,setFloating:N}),[w,N]),_=d.useMemo(()=>({reference:y,floating:C}),[y,C]),D=d.useMemo(()=>{const R={position:n,left:0,top:0};if(!_.floating)return R;const I=nn(_.floating,f.x),U=nn(_.floating,f.y);return a?{...R,transform:"translate("+I+"px, "+U+"px)",...Hn(_.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:I,top:U}},[n,a,_.floating,f.x,f.y]);return d.useMemo(()=>({...f,update:M,refs:F,elements:_,floatingStyles:D}),[f,M,F,_,D])}const Ri=e=>{function t(n){return{}.hasOwnProperty.call(n,"current")}return{name:"arrow",options:e,fn(n){const{element:r,padding:o}=typeof e=="function"?e(n):e;return r&&t(r)?r.current!=null?tn({element:r.current,padding:o}).fn(n):{}:r?tn({element:r,padding:o}).fn(n):{}}}},Pi=(e,t)=>({...xi(e),options:[e,t]}),Oi=(e,t)=>({...vi(e),options:[e,t]}),ji=(e,t)=>({...Ni(e),options:[e,t]}),ki=(e,t)=>({...bi(e),options:[e,t]}),Ti=(e,t)=>({...wi(e),options:[e,t]}),Mi=(e,t)=>({...yi(e),options:[e,t]}),_i=(e,t)=>({...Ri(e),options:[e,t]});var Di="Arrow",Un=d.forwardRef((e,t)=>{const{children:n,width:r=10,height:o=5,...s}=e;return c.jsx(W.svg,{...s,ref:t,width:r,height:o,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?n:c.jsx("polygon",{points:"0,0 30,0 15,10"})})});Un.displayName=Di;var Li=Un,Rt="Popper",[Vn,Kn]=xt(Rt),[Ii,Yn]=Vn(Rt),Xn=e=>{const{__scopePopper:t,children:n}=e,[r,o]=d.useState(null);return c.jsx(Ii,{scope:t,anchor:r,onAnchorChange:o,children:n})};Xn.displayName=Rt;var Gn="PopperAnchor",Zn=d.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:r,...o}=e,s=Yn(Gn,n),i=d.useRef(null),a=ne(t,i),l=d.useRef(null);return d.useEffect(()=>{const u=l.current;l.current=r?.current||i.current,u!==l.current&&s.onAnchorChange(l.current)}),r?null:c.jsx(W.div,{...o,ref:a})});Zn.displayName=Gn;var Pt="PopperContent",[Fi,zi]=Vn(Pt),qn=d.forwardRef((e,t)=>{const{__scopePopper:n,side:r="bottom",sideOffset:o=0,align:s="center",alignOffset:i=0,arrowPadding:a=0,avoidCollisions:l=!0,collisionBoundary:u=[],collisionPadding:f=0,sticky:m="partial",hideWhenDetached:g=!1,updatePositionStrategy:h="optimized",onPlaced:x,...p}=e,v=Yn(Pt,n),[b,w]=d.useState(null),N=ne(t,ye=>w(ye)),[y,C]=d.useState(null),A=Es(y),E=A?.width??0,P=A?.height??0,j=r+(s!=="center"?"-"+s:""),O=typeof f=="number"?f:{top:0,right:0,bottom:0,left:0,...f},T=Array.isArray(u)?u:[u],L=T.length>0,M={padding:O,boundary:T.filter(Wi),altBoundary:L},{refs:k,floatingStyles:F,placement:_,isPositioned:D,middlewareData:R}=Ai({strategy:"fixed",placement:j,whileElementsMounted:(...ye)=>gi(...ye,{animationFrame:h==="always"}),elements:{reference:v.anchor},middleware:[Pi({mainAxis:o+P,alignmentAxis:i}),l&&Oi({mainAxis:!0,crossAxis:!1,limiter:m==="partial"?ji():void 0,...M}),l&&ki({...M}),Ti({...M,apply:({elements:ye,rects:Mt,availableWidth:Cr,availableHeight:Sr})=>{const{width:Ar,height:Rr}=Mt.reference,Ae=ye.floating.style;Ae.setProperty("--radix-popper-available-width",`${Cr}px`),Ae.setProperty("--radix-popper-available-height",`${Sr}px`),Ae.setProperty("--radix-popper-anchor-width",`${Ar}px`),Ae.setProperty("--radix-popper-anchor-height",`${Rr}px`)}}),y&&_i({element:y,padding:a}),Bi({arrowWidth:E,arrowHeight:P}),g&&Mi({strategy:"referenceHidden",...M})]}),[I,U]=er(_),Tt=ge(x);J(()=>{D&&Tt?.()},[D,Tt]);const br=R.arrow?.x,wr=R.arrow?.y,yr=R.arrow?.centerOffset!==0,[Nr,Er]=d.useState();return J(()=>{b&&Er(window.getComputedStyle(b).zIndex)},[b]),c.jsx("div",{ref:k.setFloating,"data-radix-popper-content-wrapper":"",style:{...F,transform:D?F.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:Nr,"--radix-popper-transform-origin":[R.transformOrigin?.x,R.transformOrigin?.y].join(" "),...R.hide?.referenceHidden&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:c.jsx(Fi,{scope:n,placedSide:I,onArrowChange:C,arrowX:br,arrowY:wr,shouldHideArrow:yr,children:c.jsx(W.div,{"data-side":I,"data-align":U,...p,ref:N,style:{...p.style,animation:D?void 0:"none"}})})})});qn.displayName=Pt;var Qn="PopperArrow",$i={top:"bottom",right:"left",bottom:"top",left:"right"},Jn=d.forwardRef(function(t,n){const{__scopePopper:r,...o}=t,s=zi(Qn,r),i=$i[s.placedSide];return c.jsx("span",{ref:s.onArrowChange,style:{position:"absolute",left:s.arrowX,top:s.arrowY,[i]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[s.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[s.placedSide],visibility:s.shouldHideArrow?"hidden":void 0},children:c.jsx(Li,{...o,ref:n,style:{...o.style,display:"block"}})})});Jn.displayName=Qn;function Wi(e){return e!==null}var Bi=e=>({name:"transformOrigin",options:e,fn(t){const{placement:n,rects:r,middlewareData:o}=t,i=o.arrow?.centerOffset!==0,a=i?0:e.arrowWidth,l=i?0:e.arrowHeight,[u,f]=er(n),m={start:"0%",center:"50%",end:"100%"}[f],g=(o.arrow?.x??0)+a/2,h=(o.arrow?.y??0)+l/2;let x="",p="";return u==="bottom"?(x=i?m:`${g}px`,p=`${-l}px`):u==="top"?(x=i?m:`${g}px`,p=`${r.floating.height+l}px`):u==="right"?(x=`${-l}px`,p=i?m:`${h}px`):u==="left"&&(x=`${r.floating.width+l}px`,p=i?m:`${h}px`),{data:{x,y:p}}}});function er(e){const[t,n="center"]=e.split("-");return[t,n]}var Hi=Xn,tr=Zn,Ui=qn,Vi=Jn,Ze="Popover",[nr]=xt(Ze,[Kn]),Se=Kn(),[Ki,ae]=nr(Ze),rr=e=>{const{__scopePopover:t,children:n,open:r,defaultOpen:o,onOpenChange:s,modal:i=!1}=e,a=Se(t),l=d.useRef(null),[u,f]=d.useState(!1),[m,g]=fn({prop:r,defaultProp:o??!1,onChange:s,caller:Ze});return c.jsx(Hi,{...a,children:c.jsx(Ki,{scope:t,contentId:mn(),triggerRef:l,open:m,onOpenChange:g,onOpenToggle:d.useCallback(()=>g(h=>!h),[g]),hasCustomAnchor:u,onCustomAnchorAdd:d.useCallback(()=>f(!0),[]),onCustomAnchorRemove:d.useCallback(()=>f(!1),[]),modal:i,children:n})})};rr.displayName=Ze;var or="PopoverAnchor",sr=d.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,o=ae(or,n),s=Se(n),{onCustomAnchorAdd:i,onCustomAnchorRemove:a}=o;return d.useEffect(()=>(i(),()=>a()),[i,a]),c.jsx(tr,{...s,...r,ref:t})});sr.displayName=or;var ir="PopoverTrigger",ar=d.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,o=ae(ir,n),s=Se(n),i=ne(t,o.triggerRef),a=c.jsx(W.button,{type:"button","aria-haspopup":"dialog","aria-expanded":o.open,"aria-controls":o.contentId,"data-state":mr(o.open),...r,ref:i,onClick:q(e.onClick,o.onOpenToggle)});return o.hasCustomAnchor?a:c.jsx(tr,{asChild:!0,...s,children:a})});ar.displayName=ir;var Ot="PopoverPortal",[Yi,Xi]=nr(Ot,{forceMount:void 0}),cr=e=>{const{__scopePopover:t,forceMount:n,children:r,container:o}=e,s=ae(Ot,t);return c.jsx(Yi,{scope:t,forceMount:n,children:c.jsx(He,{present:n||s.open,children:c.jsx(En,{asChild:!0,container:o,children:r})})})};cr.displayName=Ot;var ve="PopoverContent",lr=d.forwardRef((e,t)=>{const n=Xi(ve,e.__scopePopover),{forceMount:r=n.forceMount,...o}=e,s=ae(ve,e.__scopePopover);return c.jsx(He,{present:r||s.open,children:s.modal?c.jsx(Zi,{...o,ref:t}):c.jsx(qi,{...o,ref:t})})});lr.displayName=ve;var Gi=ln("PopoverContent.RemoveScroll"),Zi=d.forwardRef((e,t)=>{const n=ae(ve,e.__scopePopover),r=d.useRef(null),o=ne(t,r),s=d.useRef(!1);return d.useEffect(()=>{const i=r.current;if(i)return Ns(i)},[]),c.jsx(kn,{as:Gi,allowPinchZoom:!0,children:c.jsx(ur,{...e,ref:o,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:q(e.onCloseAutoFocus,i=>{i.preventDefault(),s.current||n.triggerRef.current?.focus()}),onPointerDownOutside:q(e.onPointerDownOutside,i=>{const a=i.detail.originalEvent,l=a.button===0&&a.ctrlKey===!0,u=a.button===2||l;s.current=u},{checkForDefaultPrevented:!1}),onFocusOutside:q(e.onFocusOutside,i=>i.preventDefault(),{checkForDefaultPrevented:!1})})})}),qi=d.forwardRef((e,t)=>{const n=ae(ve,e.__scopePopover),r=d.useRef(!1),o=d.useRef(!1);return c.jsx(ur,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:s=>{e.onCloseAutoFocus?.(s),s.defaultPrevented||(r.current||n.triggerRef.current?.focus(),s.preventDefault()),r.current=!1,o.current=!1},onInteractOutside:s=>{e.onInteractOutside?.(s),s.defaultPrevented||(r.current=!0,s.detail.originalEvent.type==="pointerdown"&&(o.current=!0));const i=s.target;n.triggerRef.current?.contains(i)&&s.preventDefault(),s.detail.originalEvent.type==="focusin"&&o.current&&s.preventDefault()}})}),ur=d.forwardRef((e,t)=>{const{__scopePopover:n,trapFocus:r,onOpenAutoFocus:o,onCloseAutoFocus:s,disableOutsidePointerEvents:i,onEscapeKeyDown:a,onPointerDownOutside:l,onFocusOutside:u,onInteractOutside:f,...m}=e,g=ae(ve,n),h=Se(n);return Lo(),c.jsx(yn,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:o,onUnmountAutoFocus:s,children:c.jsx(bn,{asChild:!0,disableOutsidePointerEvents:i,onInteractOutside:f,onEscapeKeyDown:a,onPointerDownOutside:l,onFocusOutside:u,onDismiss:()=>g.onOpenChange(!1),children:c.jsx(Ui,{"data-state":mr(g.open),role:"dialog",id:g.contentId,...h,...m,ref:t,style:{...m.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)"}})})})}),dr="PopoverClose",fr=d.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,o=ae(dr,n);return c.jsx(W.button,{type:"button",...r,ref:t,onClick:q(e.onClick,()=>o.onOpenChange(!1))})});fr.displayName=dr;var Qi="PopoverArrow",Ji=d.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,o=Se(n);return c.jsx(Vi,{...o,...r,ref:t})});Ji.displayName=Qi;function mr(e){return e?"open":"closed"}var ea=rr,ta=sr,na=ar,ra=cr,oa=lr,sa=fr;const rn={neutral:"text-muted-foreground",info:"text-info",success:"text-success",warning:"text-warning",danger:"text-destructive"},ia={neutral:"bg-muted-foreground/60",info:"bg-info",success:"bg-success",warning:"bg-warning",danger:"bg-destructive"},le={neutral:"text-foreground/70",info:"text-info-ink",success:"text-success-ink",warning:"text-warning-ink",danger:"text-destructive-ink"},jt={neutral:"bg-foreground/[0.06]",info:"bg-info/10",success:"bg-success/10",warning:"bg-warning/10",danger:"bg-destructive/10"},aa={neutral:"bg-primary text-primary-foreground",info:"bg-info-ink text-white",success:"bg-success-ink text-white",warning:"bg-warning-ink text-white",danger:"bg-destructive-ink text-white"},on={ink:"var(--viz-6)",context:"var(--viz-2)",plan:"var(--viz-3)",empty:"var(--viz-0)",grid:"var(--viz-grid)",axis:"var(--viz-axis)",surface:"var(--background)",label:"var(--muted-foreground)",text:"var(--foreground)"},ca=["var(--viz-0)","var(--viz-1)","var(--viz-2)","var(--viz-3)","var(--viz-4)","var(--viz-5)","var(--viz-6)"],la={1:[6],2:[2,6],3:[2,4,6],4:[2,3,4,6],5:[2,3,4,5,6]};function ua(e){return la[Math.min(5,Math.max(1,e))].map(n=>ca[n])}const lc={neutral:"var(--viz-2)",info:"var(--info)",success:"var(--success)",warning:"var(--warning)",danger:"var(--destructive)"},uc={instant:100,fast:150,base:200,enter:250,move:260,slow:500,easeEnter:"cubic-bezier(0.16, 1, 0.3, 1)",easeMove:"cubic-bezier(0.2, 0, 0, 1)"},V={background:"#1e1e1e",foreground:"#d4d4d4",muted:"#808080",red:"#f44747",green:"#6a9955",yellow:"#d7ba7d",blue:"#569cd6",cyan:"#4ec9b0",magenta:"#c586c0"},sn=new Map;function da(e,t){const n=`${e??""}|${JSON.stringify(t)}`;let r=sn.get(n);return r||(r=new Intl.NumberFormat(e,t),sn.set(n,r)),r}function mt(e,{compact:t=!1,maximumFractionDigits:n,locale:r}={}){return Number.isFinite(e)?da(r,{notation:t?"compact":"standard",maximumFractionDigits:n??(t||Math.abs(e)<10?1:0)}).format(e):"—"}function dc(e,t=0){return Number.isFinite(e)?`${(e*100).toFixed(t)}%`:"—"}function fc(e,t=1){if(!Number.isFinite(e))return"—";const n=Math.abs(e*100),r=Number.isInteger(n)?n.toFixed(0):n.toFixed(t);return Number(r)===0?"0%":`${e>0?"+":"−"}${r}%`}function mc(e){return Number.isFinite(e)?e>0?`+${mt(e)}`:e<0?`−${mt(Math.abs(e))}`:"0":"—"}function Q(e){return e!=null&&typeof e!="boolean"&&e!==""}function pc(e=480){const[t,n]=d.useState(null),[r,o]=d.useState(0);return d.useEffect(()=>{if(!t||typeof ResizeObserver>"u")return;const i=new ResizeObserver(a=>{const l=Math.floor(a[0]?.contentRect.width??0);o(u=>u===l?u:l)});return i.observe(t),()=>i.disconnect()},[t]),[n,r||(typeof ResizeObserver<"u"?0:e)]}function fa({value:e,defaultValue:t,onChange:n}){const[r,o]=d.useState(t),s=e!==void 0,i=s?e:r,a=d.useCallback(l=>{s||o(l),n?.(l)},[s,n]);return[i,a]}function ma(e){if(typeof window>"u"||!window.matchMedia)return()=>{};const t=window.matchMedia("(prefers-reduced-motion: reduce)");return t.addEventListener("change",e),()=>t.removeEventListener("change",e)}function pa(){return typeof window<"u"&&!!window.matchMedia?.("(prefers-reduced-motion: reduce)").matches}function hc(){return d.useSyncExternalStore(ma,pa,()=>!1)}function gc(e){return`${e}-${d.useId().replace(/[^a-zA-Z0-9_-]/g,"")}`}const ha=3e4;let pt=Date.now();const Me=new Set;let Ne=null;function ga(e){return Me.add(e),Ne||(pt=Date.now(),Ne=setInterval(()=>{pt=Date.now(),Me.forEach(t=>t())},ha)),()=>{Me.delete(e),Me.size===0&&Ne&&(clearInterval(Ne),Ne=null)}}function an(){return pt}function xa(){return d.useSyncExternalStore(ga,an,an)}const ht=60,gt=60*ht,it=24*gt;function va(e,t,n,r){const o=e instanceof Date?e:new Date(e),s=Math.max(0,Math.floor((t-o.getTime())/1e3));if(s<ht)return n("now");if(s<gt)return n("{count}m",{count:Math.floor(s/ht)});if(s<it)return n("{count}h",{count:Math.floor(s/gt)});if(s<7*it)return n("{count}d",{count:Math.floor(s/it)});const i=o.getFullYear()===new Date(t).getFullYear();return o.toLocaleDateString(r,i?{month:"numeric",day:"numeric"}:{year:"numeric",month:"numeric"})}const ba={xs:12,sm:14,md:16,lg:20};function wa({size:e="sm",label:t,className:n}){const r=ba[e],o=c.jsxs("svg",{viewBox:"0 0 16 16",width:r,height:r,fill:"none","aria-hidden":"true",className:S("shrink-0 animate-spin motion-reduce:[animation-duration:2.4s]",!t&&n),children:[c.jsx("circle",{cx:"8",cy:"8",r:"6.25",stroke:"currentColor",strokeOpacity:"0.18",strokeWidth:"1.75"}),c.jsx("path",{d:"M8 1.75a6.25 6.25 0 0 1 6.25 6.25",stroke:"currentColor",strokeWidth:"1.75",strokeLinecap:"round"})]});return t?c.jsxs("span",{role:"status","aria-live":"polite",className:S("inline-flex items-center gap-2 text-[13px] text-muted-foreground",n),children:[o,c.jsx("span",{children:t})]}):o}const ya={sm:"h-[18px] px-1.5 text-[10px] gap-1 [&_svg]:size-2.5",md:"h-5 px-2 text-[11px] gap-1 [&_svg]:size-3"};function Na({tone:e="neutral",variant:t="soft",size:n="md",shape:r="pill",icon:o,className:s,children:i,...a}){return c.jsxs("span",{"data-slot":"badge",className:S("inline-flex shrink-0 items-center whitespace-nowrap font-medium leading-none [&_svg]:shrink-0",ya[n],r==="pill"?"rounded-full":"rounded",t==="soft"&&[jt[e],le[e]],t==="outline"&&["bg-background ring-1 ring-inset",e==="neutral"?"text-foreground/80 ring-border":[le[e],"ring-current/25"]],t==="solid"&&aa[e],t==="dot"&&"px-0 text-foreground/80",s),...a,children:[t==="dot"&&c.jsx("span",{"aria-hidden":"true",className:S("size-1.5 shrink-0 rounded-full",ia[e])}),o,i]})}function Ea({count:e,max:t=99,tone:n="neutral",className:r,...o}){const s=e>t?`${t}+`:String(e);return c.jsx("span",{"data-slot":"count-badge",className:S("inline-flex shrink-0 items-center justify-center text-[11px] leading-4 tabular-nums",n==="neutral"?"font-normal text-muted-foreground":["min-w-4 rounded-full px-1.5 font-semibold",jt[n],le[n]],r),...o,children:s})}const Ca="relative inline-flex shrink-0 select-none items-center justify-center whitespace-nowrap font-medium outline-none transition-[background-color,color,box-shadow,opacity] duration-150 focus-visible:ring-2 focus-visible:ring-ring/60 focus-visible:ring-offset-1 focus-visible:ring-offset-background disabled:pointer-events-none disabled:opacity-40 aria-disabled:pointer-events-none aria-disabled:opacity-40 [&_svg]:pointer-events-none [&_svg]:shrink-0",Sa={xs:"h-6 gap-1 rounded-md px-2 text-[11px] [&_svg:not([class*='size-'])]:size-3",sm:"h-7 gap-1.5 rounded-md px-2.5 text-xs [&_svg:not([class*='size-'])]:size-3.5",md:"h-8 gap-1.5 rounded-md px-3 text-[13px] [&_svg:not([class*='size-'])]:size-4",lg:"h-9 gap-2 rounded-lg px-4 text-sm [&_svg:not([class*='size-'])]:size-4",xl:"h-11 gap-2 rounded-lg px-5 text-sm [&_svg:not([class*='size-'])]:size-4"},Aa={xs:"size-6 rounded-md [&_svg:not([class*='size-'])]:size-3",sm:"size-7 rounded-md [&_svg:not([class*='size-'])]:size-3.5",md:"size-8 rounded-lg [&_svg:not([class*='size-'])]:size-4",lg:"size-9 rounded-lg [&_svg:not([class*='size-'])]:size-[18px]",xl:"size-11 rounded-lg [&_svg:not([class*='size-'])]:size-5"},Ra={primary:{neutral:"bg-primary text-primary-foreground shadow-raised hover:bg-primary/90 active:bg-primary/85",danger:"bg-destructive-ink text-white shadow-raised hover:bg-destructive-ink/90 active:bg-destructive-ink/85"},secondary:{neutral:"bg-background text-foreground shadow-raised ring-1 ring-inset ring-border hover:bg-accent active:bg-foreground/[0.06]",danger:"bg-background text-destructive-ink shadow-raised ring-1 ring-inset ring-destructive/25 hover:bg-destructive/[0.06] active:bg-destructive/10"},ghost:{neutral:"text-foreground/80 hover:bg-accent hover:text-foreground active:bg-foreground/[0.06]",danger:"text-destructive-ink hover:bg-destructive/10 active:bg-destructive/15"},soft:{neutral:"bg-foreground/[0.05] text-foreground/90 hover:bg-foreground/[0.08] active:bg-foreground/10",danger:"bg-destructive/10 text-destructive-ink hover:bg-destructive/15 active:bg-destructive/20"},link:{neutral:"h-auto rounded-sm px-0 text-foreground underline decoration-border underline-offset-4 hover:decoration-foreground/50",danger:"h-auto rounded-sm px-0 text-destructive-ink underline decoration-destructive/30 underline-offset-4 hover:decoration-destructive/60"}},Pa="text-muted-foreground hover:bg-accent hover:text-foreground active:bg-foreground/[0.06] data-[state=open]:bg-accent data-[state=open]:text-foreground";function pr({variant:e="secondary",tone:t="neutral",size:n="md",block:r=!1,iconOnly:o=!1,loading:s=!1,className:i}={}){return S(Ca,o?Aa[n]:Sa[n],o&&e==="ghost"&&t==="neutral"?Pa:Ra[e][t],r&&"w-full",s&&"disabled:opacity-100",i)}function xc({variant:e="secondary",tone:t="neutral",size:n="md",loading:r=!1,block:o=!1,asChild:s=!1,className:i,disabled:a,children:l,type:u,...f}){const m=pr({variant:e,tone:t,size:n,block:o,loading:r,className:i});return s?c.jsx(Or,{"data-slot":"button",className:m,...f,children:l}):c.jsxs("button",{type:u??"button","data-slot":"button","data-variant":e,className:m,disabled:a||r,"aria-busy":r||void 0,...f,children:[r&&c.jsx(wa,{size:n==="xs"?"xs":"sm"}),l]})}async function Oa(e){if(navigator.clipboard?.writeText){await navigator.clipboard.writeText(e);return}const t=document.createElement("textarea");t.value=e,t.setAttribute("readonly",""),t.style.position="fixed",t.style.opacity="0",document.body.appendChild(t),t.select(),document.execCommand("copy"),t.remove()}function kt({value:e,display:t="icon",variant:n="ghost",size:r="sm",label:o,copiedLabel:s,onCopied:i,className:a}){const{t:l}=ie(),[u,f]=d.useState(!1),m=d.useRef(null);d.useEffect(()=>()=>{m.current&&clearTimeout(m.current)},[]);const g=o??l("Copy"),h=s??l("Copied"),x=u?h:g,p=async()=>{try{await Oa(e),f(!0),i?.(),m.current&&clearTimeout(m.current),m.current=setTimeout(()=>f(!1),1600)}catch{f(!1)}},v=u?c.jsx(Br,{className:"text-success"}):c.jsx(Hr,{});return c.jsxs("button",{type:"button","data-slot":"copy-button",onClick:p,"aria-label":t==="icon"?x:void 0,title:t==="icon"?g:void 0,className:pr({variant:n,size:r,iconOnly:t==="icon",className:S(t==="text"&&"tabular-nums",a)}),children:[v,t==="text"&&c.jsx("span",{children:x}),c.jsx("span",{className:"sr-only","aria-live":"polite",children:u?h:""})]})}function ja({inverse:e=!1,className:t,...n}){return c.jsx("kbd",{"data-slot":"kbd",className:S("inline-flex h-[18px] min-w-[18px] shrink-0 items-center justify-center rounded px-1 font-sans text-[10px] font-medium leading-none",e?"border border-inverse-foreground/20 bg-inverse-foreground/10 text-inverse-foreground/80":"border border-border bg-muted/60 text-muted-foreground",t),...n})}function ka({keys:e,inverse:t,separator:n,className:r}){return c.jsx("span",{className:S("inline-flex items-center gap-0.5",r),children:e.map((o,s)=>c.jsxs(d.Fragment,{children:[s>0&&n?c.jsx("span",{className:"px-0.5 text-[10px] text-muted-foreground",children:n}):null,c.jsx(ja,{inverse:t,children:o})]},s))})}const Ta=d.createContext(null);function Ma(){return d.useContext(Ta)}const _a="rounded-lg border border-input bg-background text-foreground transition-colors hover:border-ring/50",Da="border-destructive hover:border-destructive focus-within:border-destructive focus:border-destructive",La="cursor-not-allowed bg-muted/50 text-muted-foreground hover:border-input",Ia={sm:"h-8 px-2.5 text-[13px]",md:"h-9 px-3 text-sm"};function Fa({size:e="md",prefix:t,suffix:n,invalid:r,className:o,containerClassName:s,id:i,disabled:a,required:l,"aria-describedby":u,...f}){const m=Ma(),g=r??m?.invalid??!1;return c.jsxs("div",{"data-slot":"input",className:S(_a,"flex w-full min-w-0 items-center gap-2 focus-within:border-ring",Ia[e],g&&Da,a&&La,s),children:[t&&c.jsx("span",{className:"flex shrink-0 items-center text-muted-foreground [&_svg]:size-4",children:t}),c.jsx("input",{id:i??m?.id,disabled:a,required:l??m?.required,"aria-invalid":g||void 0,"aria-describedby":u??m?.describedBy,className:S("h-full min-w-0 flex-1 bg-transparent outline-none placeholder:text-muted-foreground/70 disabled:cursor-not-allowed",o),...f}),n&&c.jsx("span",{className:"flex shrink-0 items-center text-muted-foreground [&_svg]:size-4",children:n})]})}function vc({value:e,defaultValue:t="",onValueChange:n,shortcut:r,onKeyDown:o,...s}){const{t:i}=ie(),[a,l]=fa({value:e,defaultValue:t,onChange:n});return c.jsx(Fa,{type:"search",role:"searchbox",value:a,onChange:u=>l(u.target.value),onKeyDown:u=>{u.key==="Escape"&&a&&(u.preventDefault(),l("")),o?.(u)},prefix:c.jsx(Dr,{className:"size-4 text-muted-foreground/70"}),suffix:a?c.jsx("button",{type:"button",onClick:()=>l(""),"aria-label":i("Clear"),className:"-mr-1 rounded p-0.5 text-muted-foreground transition-colors hover:bg-foreground/[0.06] hover:text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring/60",children:c.jsx(jr,{className:"size-3.5","aria-hidden":"true"})}):r?c.jsx(ka,{keys:r}):void 0,className:"[&::-webkit-search-cancel-button]:appearance-none",...s})}const bc="z-50 min-w-[12rem] overflow-hidden rounded-lg border border-border bg-popover p-1 text-popover-foreground shadow-popover outline-none duration-100 data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95",wc="relative flex w-full cursor-default select-none items-center gap-2 rounded-md px-2 py-1.5 text-left text-[13px] text-foreground/80 outline-none transition-colors data-[highlighted]:bg-accent data-[highlighted]:text-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-40 [&_svg:not([class*='size-'])]:size-3.5 [&_svg]:shrink-0",yc="pr-7",Nc="text-destructive-ink data-[highlighted]:bg-destructive/10 data-[highlighted]:text-destructive-ink",Ec="absolute right-2 flex size-3.5 items-center justify-center text-foreground",Cc="px-2 pb-1 pt-1.5 text-[11px] font-medium text-muted-foreground",Sc="-mx-1 my-1 h-px bg-border/60",Ac="ml-auto pl-4 text-[11px] tracking-wide text-muted-foreground",Rc=ea,Pc=na,Oc=sa,jc=ta;function kc({className:e,sideOffset:t=6,align:n="start",...r}){return c.jsx(ra,{children:c.jsx(oa,{sideOffset:t,align:n,collisionPadding:8,className:S("z-50 w-72 rounded-lg border border-border bg-popover p-3 text-sm text-popover-foreground shadow-popover outline-none","origin-(--radix-popover-content-transform-origin) duration-100 data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95",e),...r})})}function za(e,t){return S("flex h-8 w-full min-w-0 items-center gap-2.5 rounded-md px-2 text-left text-sm transition-[background-color,box-shadow,color] duration-150 pointer-coarse:h-10","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring/60 disabled:cursor-not-allowed disabled:opacity-40 disabled:hover:bg-transparent",e?"bg-background text-foreground shadow-raised ring-1 ring-border/80":"text-foreground/80 hover:bg-accent hover:text-foreground active:bg-foreground/[0.06]",t)}function $a({title:e,icon:t,count:n,countTone:r="neutral",sticky:o=!1,defaultOpen:s=!0,open:i,onOpenChange:a,children:l,className:u}){const f=d.useId();return c.jsxs(xo,{defaultOpen:s,open:i,onOpenChange:a,className:S("mb-2",u),children:[c.jsx("div",{className:S(o&&"sticky top-0 z-10 bg-sidebar"),children:c.jsxs(vo,{"data-sidebar-item":"",className:"group/header flex h-7 w-full items-center gap-1 rounded-md px-2 text-xs font-medium text-muted-foreground transition-colors hover:bg-accent hover:text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring/60",children:[t&&c.jsx("span",{className:"mr-0.5 flex shrink-0 [&_svg]:size-3.5",children:t}),c.jsx("span",{id:f,className:"truncate",children:e}),c.jsx(Ur,{"aria-hidden":"true",className:"size-3 shrink-0 text-muted-foreground/60 transition-transform duration-150 group-hover/header:text-muted-foreground group-data-[state=open]/header:rotate-90"}),n!==void 0&&c.jsx(Ea,{count:n,tone:n>0?r:"neutral",className:"ml-auto"})]})}),c.jsx(bo,{role:"group","aria-labelledby":f,className:"mt-0.5 flex flex-col gap-px",children:l})]})}const Tc={ink:on.ink,context:on.context,plan:"var(--viz-4)"};function Mc(e){return Math.round(e)+.5}function Wa(e){return Array.from(e).reduce((t,n)=>t+(n.charCodeAt(0)>11904?2:1),0)*6.6}function _c(e){return Math.ceil(Math.max(0,...e.map(Wa)))+10}function Dc(e){return mt(e,{compact:!0})}function Lc(e,t,n,r){const o=Math.max(2,Math.floor(t/n)),s=Math.max(1,Math.ceil(e/o)),i=new Set;for(let l=0;l<e;l+=s)i.add(l);const a=Math.floor((e-1)/s)*s;if(e>0&&a!==e-1&&(e-1-a<s*.6&&a!==0&&i.delete(a),i.add(e-1)),r!=null&&r>=0&&r<e){for(const l of[...i])l!==r&&Math.abs(l-r)<s&&i.delete(l);i.add(r)}return i}const Ic="rounded-md outline-none focus-visible:ring-2 focus-visible:ring-ring/60 focus-visible:ring-offset-2";function Fc(e,t,n,r="x"){if(n===0)return;const o=t??n-1,s=r==="x"?"ArrowRight":"ArrowDown",i=r==="x"?"ArrowLeft":"ArrowUp";switch(e){case s:return t===null?o:Math.min(n-1,o+1);case i:return t===null?o:Math.max(0,o-1);case"Home":return 0;case"End":return n-1;default:return}}function zc(e){return ua(e).slice().reverse()}const hr={todo:{icon:Mr,label:"Pending",className:rn.neutral},doing:{icon:Tr,label:"Running",className:rn.info},done:{icon:kr,label:"Done",className:"text-success/80"},cancelled:{icon:$r,label:"Cancelled",className:"text-muted-foreground/70"}};function at({state:e,className:t}){const{icon:n,className:r}=hr[e];return c.jsx(n,{"aria-hidden":"true",className:S("size-4 shrink-0",r,t)})}function $c({items:e,onToggle:t,summary:n=!0,className:r}){const{t:o}=ie(),s={doing:e.filter(i=>i.state==="doing").length,todo:e.filter(i=>i.state==="todo").length,done:e.filter(i=>i.state==="done").length};return c.jsxs("div",{className:r,children:[n&&c.jsx("div",{className:"mb-1.5 flex flex-wrap items-center gap-x-3 gap-y-1 text-[11px] text-muted-foreground",children:["doing","todo","done"].map(i=>c.jsxs("span",{className:"inline-flex items-center gap-1",children:[c.jsx(at,{state:i,className:"size-3.5"}),o(hr[i].label)," ",c.jsx("span",{className:"tabular-nums text-foreground/80",children:s[i]})]},i))}),c.jsx("ul",{className:"flex flex-col",children:e.map(i=>{const a=i.state==="done"||i.state==="cancelled";return c.jsxs("li",{className:"flex min-h-9 items-center gap-2.5 border-b border-border/40 py-1.5 last:border-0",children:[t?c.jsx("button",{type:"button",role:"checkbox","aria-checked":i.state==="done","aria-label":typeof i.title=="string"?i.title:void 0,onClick:()=>t(i.id),className:"-m-1 flex shrink-0 rounded p-1 transition-colors hover:bg-accent focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring/60",children:c.jsx(at,{state:i.state})}):c.jsx(at,{state:i.state}),c.jsx("span",{className:S("min-w-0 flex-1 truncate text-[13px]",a?"text-muted-foreground line-through decoration-foreground/30":"text-foreground/90"),children:i.title}),Q(i.tag)&&c.jsx("span",{className:"shrink-0",children:i.tag}),Q(i.meta)&&c.jsx("span",{className:"shrink-0 text-[11px] text-muted-foreground",children:i.meta}),i.due&&c.jsx("span",{className:S("w-14 shrink-0 text-right text-[11px] tabular-nums",i.due.tone&&!a?S("font-medium",le[i.due.tone]):"text-muted-foreground"),children:i.due.label})]},i.id)})})]})}function Wc({groups:e,className:t}){return c.jsx("div",{className:S("flex flex-col gap-4",t),children:e.map(n=>c.jsxs("section",{children:[c.jsxs("h4",{className:"mb-1.5 flex items-baseline gap-2 text-xs font-semibold text-foreground",children:[n.title,Q(n.caption)&&c.jsx("span",{className:"font-normal text-muted-foreground",children:n.caption})]}),c.jsx("ul",{className:"flex flex-col gap-1",children:n.entries.map(r=>c.jsxs("li",{className:"grid grid-cols-[2.75rem_3px_minmax(0,1fr)] gap-x-2.5 py-1",children:[c.jsxs("span",{className:"flex flex-col pt-px text-right leading-4 tabular-nums",children:[c.jsx("span",{className:"text-[11px] text-foreground/80",children:r.time}),r.endTime&&c.jsx("span",{className:"text-[10px] text-muted-foreground",children:r.endTime})]}),c.jsx("span",{"aria-hidden":"true",className:S("rounded-full",r.active?"bg-viz-6":"bg-viz-1")}),c.jsxs("div",{className:"min-w-0",children:[c.jsxs("div",{className:"flex min-w-0 items-center gap-1.5",children:[c.jsx("span",{className:"truncate text-[13px] text-foreground/90",children:r.title}),Q(r.tag)&&c.jsx("span",{className:"shrink-0",children:r.tag})]}),Q(r.meta)&&c.jsx("div",{className:"truncate text-[11px] text-muted-foreground",children:r.meta})]})]},r.id))})]},n.id))})}function Bc({entries:e,className:t}){return c.jsx("ol",{className:S("flex flex-col",t),children:e.map((n,r)=>c.jsxs("li",{className:"relative flex gap-2.5 pb-3 last:pb-0",children:[r<e.length-1&&c.jsx("span",{"aria-hidden":"true",className:"absolute bottom-0 left-[11px] top-7 w-px bg-border"}),c.jsx("span",{className:"relative flex size-6 shrink-0 items-center justify-center",children:n.avatar}),c.jsxs("div",{className:"min-w-0 flex-1 pt-0.5",children:[c.jsxs("div",{className:"flex items-baseline justify-between gap-3",children:[c.jsx("p",{className:"min-w-0 text-[13px] leading-5 text-foreground/85",children:n.text}),c.jsx("span",{className:"shrink-0 text-[11px] tabular-nums text-muted-foreground",children:n.time})]}),Q(n.detail)&&c.jsx("div",{className:"mt-1 text-xs leading-relaxed text-muted-foreground",children:n.detail})]})]},n.id))})}function Hc({items:e,className:t}){const{t:n}=ie();return c.jsx("ul",{className:S("flex flex-col",t),children:e.map(r=>{const o=r.days<0?"danger":r.days<=3?"warning":null,s=r.days<0?n("days overdue"):r.days===0?n("Due today"):n("days left");return c.jsxs("li",{className:"flex items-center gap-3 border-b border-border/40 py-2 last:border-0",children:[c.jsxs("div",{className:"flex w-12 shrink-0 flex-col items-center leading-none",children:[c.jsx("span",{className:S("text-xl font-semibold tabular-nums",o?le[o]:"text-foreground"),children:r.days===0?"0":Math.abs(r.days)}),c.jsx("span",{className:S("mt-1 text-[10px]",o?le[o]:"text-muted-foreground"),children:s})]}),c.jsxs("div",{className:"min-w-0 flex-1",children:[c.jsx("div",{className:"truncate text-[13px] text-foreground/90",children:r.title}),Q(r.meta)&&c.jsx("div",{className:"truncate text-[11px] text-muted-foreground",children:r.meta})]})]},r.id)})})}function Uc({entries:e,className:t}){return c.jsx("ol",{className:S("flex flex-col",t),children:e.map((n,r)=>c.jsxs("li",{className:"flex items-center gap-3 border-b border-border/40 py-2 last:border-0",children:[c.jsx("span",{className:S("w-6 shrink-0 text-[15px] font-semibold tabular-nums",r<3?"text-foreground":"text-muted-foreground"),children:String(r+1).padStart(2,"0")}),n.avatar,c.jsxs("div",{className:"min-w-0 flex-1",children:[c.jsx("div",{className:"truncate text-[13px] font-medium text-foreground/90",children:n.name}),Q(n.meta)&&c.jsx("div",{className:"truncate text-[11px] text-muted-foreground",children:n.meta})]}),n.change!==void 0&&c.jsxs("span",{className:S("inline-flex w-8 shrink-0 items-center justify-end gap-0.5 text-[11px] font-medium tabular-nums",n.change>0?"text-success-ink":n.change<0?"text-destructive-ink":"text-muted-foreground"),children:[n.change>0&&c.jsx(Lr,{"aria-hidden":"true",className:"size-3",strokeWidth:2.5}),n.change<0&&c.jsx(zr,{"aria-hidden":"true",className:"size-3",strokeWidth:2.5}),n.change===0?"—":Math.abs(n.change)]}),c.jsx("span",{className:"w-16 shrink-0 text-right text-[13px] font-semibold tabular-nums text-foreground",children:n.value})]},n.id))})}function Vc({items:e,locale:t,className:n}){const r=new Intl.DateTimeFormat(t,{month:"short"});return c.jsx("ul",{className:S("flex flex-col",n),children:e.map(o=>c.jsxs("li",{className:"flex gap-3 border-b border-border/40 py-2.5 last:border-0",children:[c.jsxs("div",{className:"flex w-10 shrink-0 flex-col items-center rounded-lg bg-foreground/[0.04] py-1 leading-none",children:[c.jsx("span",{className:"text-lg font-semibold tabular-nums text-foreground",children:o.date.getDate()}),c.jsx("span",{className:"mt-0.5 text-[10px] text-muted-foreground",children:r.format(o.date)})]}),c.jsxs("div",{className:"min-w-0 flex-1",children:[c.jsxs("div",{className:"flex min-w-0 items-center gap-1.5",children:[c.jsx("span",{className:"truncate text-[13px] font-medium text-foreground",children:o.title}),o.badge]}),o.body&&c.jsx("p",{className:"mt-0.5 line-clamp-2 text-xs leading-relaxed text-muted-foreground",children:o.body}),Q(o.meta)&&c.jsx("div",{className:"mt-1 text-[11px] text-muted-foreground",children:o.meta})]})]},o.id))})}function Ba(e){const t=_r(e,9,"..");if(t===e)return e;const n=t.slice(0,-2),r=n.search(/[-_.\s][^-_.\s]*$/);return`${r>=3?n.slice(0,r):n}..`}function Ha(e){return e.replace("text-","bg-")}function Kc({color:e,className:t}){return c.jsx("span",{"aria-hidden":"true",className:S("size-2 shrink-0 rounded-full",Ha(e),t)})}function Ua({name:e,color:t,shorten:n=!0,className:r}){return c.jsx("span",{title:e,className:S("shrink-0 whitespace-nowrap rounded bg-foreground/[0.05] px-1 py-0.5 text-[10px] font-medium leading-none",r),children:c.jsx("span",{className:S(t,"bg-[linear-gradient(90deg,currentColor_0.6em,var(--muted-foreground)_2.6em)] bg-clip-text [-webkit-text-fill-color:transparent]"),children:n?Ba(e):e})})}const Va={sm:"size-3.5",md:"size-4",lg:"size-5"};function Yc({agentType:e,label:t,showLabel:n=!0,size:r="md",className:o}){const s=t??Vr(e,"Agent");return c.jsxs("span",{className:S("inline-flex min-w-0 items-center gap-1.5",r==="sm"?"text-xs":"text-[13px]",o),title:n?void 0:s,children:[c.jsx(Yr,{agentType:e,className:Va[r]}),n?c.jsx("span",{className:"truncate text-foreground/80",children:s}):c.jsx("span",{className:"sr-only",children:s})]})}function Xc({name:e,className:t}){return c.jsxs("span",{title:e,className:S("inline-flex min-w-0 items-center gap-1 text-muted-foreground",t),children:[c.jsx(Ir,{"aria-hidden":"true",className:"size-3 shrink-0"}),c.jsx("span",{className:"truncate font-mono text-[11px]",children:e})]})}function gr({additions:e=0,deletions:t=0,bar:n=!1,className:r}){const o=e+t,s=o===0?0:Math.round(e/o*5);return c.jsxs("span",{className:S("inline-flex shrink-0 items-center gap-1.5 font-mono text-[11px] tabular-nums",r),children:[e>0&&c.jsxs("span",{className:"text-success-ink",children:["+",e]}),t>0&&c.jsxs("span",{className:"text-destructive-ink",children:["−",t]}),o===0&&c.jsx("span",{className:"text-muted-foreground",children:"0"}),n&&c.jsx("span",{"aria-hidden":"true",className:"flex gap-px",children:Array.from({length:5}).map((i,a)=>c.jsx("span",{className:S("size-1.5 rounded-[1px]",o===0?"bg-foreground/10":a<s?"bg-success":"bg-destructive")},a))})]})}const Ka=new Set(["ts","tsx","js","jsx","mjs","json","css","html","py","go","rs","java","sh","yml","yaml","toml","prisma","sql"]),Ya=new Set(["png","jpg","jpeg","gif","svg","webp"]),Xa=new Set(["md","mdx","txt","log"]);function xr({name:e,className:t}){const n=e.split(".").pop()?.toLowerCase()??"",r=Ka.has(n)?Gr:Ya.has(n)?qr:Xa.has(n)?Kr:Jr;return c.jsx(r,{"aria-hidden":"true",className:S("size-3.5 shrink-0 text-muted-foreground",t)})}function vr(e){const t=e.lastIndexOf("/");return t===-1?{dir:"",name:e}:{dir:e.slice(0,t),name:e.slice(t+1)}}const cn={A:"success",M:"warning",D:"danger",R:"info"};function Gc({path:e,status:t,additions:n,deletions:r,active:o=!1,className:s,type:i,...a}){const{dir:l,name:u}=vr(e);return c.jsxs("button",{type:i??"button",title:e,"aria-current":o||void 0,className:S("flex h-8 w-full min-w-0 items-center gap-2 rounded-md px-2 text-left transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring/60",o?"bg-background shadow-raised ring-1 ring-border/80":"hover:bg-accent",s),...a,children:[t&&c.jsx("span",{className:S("flex size-4 shrink-0 items-center justify-center rounded-[3px] font-mono text-[10px] font-semibold",jt[cn[t]],le[cn[t]]),children:t}),c.jsx(xr,{name:u}),c.jsx("span",{className:"shrink-0 font-mono text-xs text-foreground/90",children:u}),c.jsx("span",{className:"min-w-0 flex-1 truncate text-left font-mono text-[11px] text-muted-foreground [direction:rtl]",children:c.jsx("span",{dir:"ltr",children:l})}),(n!==void 0||r!==void 0)&&c.jsx(gr,{additions:n,deletions:r})]})}function Zc({path:e,className:t}){const{name:n}=vr(e);return c.jsxs("span",{title:e,className:S("inline-flex h-6 max-w-full items-center gap-1 rounded-md bg-foreground/[0.05] px-1.5 align-middle font-mono text-[11px] text-foreground/85",t),children:[c.jsx(xr,{name:n,className:"size-3"}),c.jsx("span",{className:"truncate",children:n})]})}function qc({message:e,hash:t,author:n,time:r,additions:o,deletions:s,className:i}){return c.jsxs("div",{className:S("flex items-center gap-2.5 py-2",i),children:[c.jsx("span",{className:"flex size-6 shrink-0 items-center justify-center rounded-full bg-foreground/[0.05] text-muted-foreground",children:c.jsx(to,{"aria-hidden":"true",className:"size-3.5"})}),c.jsxs("div",{className:"min-w-0 flex-1",children:[c.jsx("div",{className:"truncate text-[13px] text-foreground/90",children:e}),c.jsxs("div",{className:"flex items-center gap-1.5 text-[11px] text-muted-foreground",children:[n,n&&r&&c.jsx("span",{"aria-hidden":"true",children:"·"}),r,(o!==void 0||s!==void 0)&&c.jsx(gr,{additions:o,deletions:s,className:"ml-1"})]})]}),c.jsxs("span",{className:"flex shrink-0 items-center gap-0.5",children:[c.jsx("code",{className:"font-mono text-[11px] text-muted-foreground",children:t.slice(0,7)}),c.jsx(kt,{value:t,size:"xs"})]})]})}function Qc({code:e,title:t,lineNumbers:n=!1,className:r}){const o=e.replace(/\n$/,"").split(`
42
+ `);return c.jsxs("div",{className:S("overflow-hidden rounded-lg border border-border/60 bg-foreground/[0.025]",r),children:[c.jsxs("div",{className:"flex h-8 items-center justify-between border-b border-border/50 pl-3 pr-1",children:[c.jsx("span",{className:"truncate font-mono text-[11px] text-muted-foreground",children:t}),c.jsx(kt,{value:e,size:"xs"})]}),c.jsx("pre",{className:"overflow-x-auto py-2.5 font-mono text-xs leading-5 text-foreground/90 scrollbar-app-thin",children:o.map((s,i)=>c.jsxs("div",{className:"flex px-3",children:[n&&c.jsx("span",{"aria-hidden":"true",className:"mr-4 w-5 shrink-0 select-none text-right text-muted-foreground/50",children:i+1}),c.jsx("code",{className:"whitespace-pre",children:s||" "})]},i))})]})}const Ga={command:V.foreground,output:V.foreground,success:V.green,error:V.red,warning:V.yellow,info:V.blue,muted:V.muted};function Jc({title:e,status:t,lines:n,className:r}){return c.jsxs("div",{className:S("overflow-hidden rounded-lg",r),style:{background:V.background},children:[(e||t)&&c.jsxs("div",{className:"flex h-8 items-center justify-between gap-3 border-b border-white/[0.06] px-3 text-[11px]",style:{color:V.muted},children:[c.jsx("span",{className:"truncate font-mono",children:e}),t]}),c.jsx("pre",{className:"overflow-x-auto p-3 font-mono text-xs leading-5 scrollbar-app-thin",children:n.map((o,s)=>c.jsxs("div",{className:"whitespace-pre",style:{color:Ga[o.kind??"output"]},children:[o.kind==="command"&&c.jsx("span",{style:{color:V.muted},children:"$ "}),o.text]},s))})]})}function el({text:e,className:t}){return c.jsxs("div",{className:S("relative rounded-lg border border-border/70 bg-foreground/[0.02] py-2.5 pl-3 pr-[72px] text-[13px] leading-relaxed text-foreground/90",t),children:[c.jsx("p",{className:"whitespace-pre-wrap break-words",children:e}),c.jsx(kt,{value:e,display:"text",size:"xs",variant:"ghost",className:"absolute right-1.5 top-2"})]})}function Za({value:e,now:t,className:n}){const{t:r,locale:o}=ie(),s=xa(),i=e instanceof Date?e:new Date(e);return c.jsx("time",{dateTime:i.toISOString(),title:i.toLocaleString(o),className:S("shrink-0 tabular-nums text-muted-foreground",n),children:va(i,t??s,r,o)})}function qa({status:e,className:t}){const{icon:n,iconClass:r}=Be[e];return c.jsx(n,{className:S("size-4 shrink-0",r,t)})}function tl({status:e,className:t}){const{t:n}=ie(),{label:r}=Be[e];return c.jsxs("span",{className:S("inline-flex shrink-0 items-center gap-1.5 text-xs font-medium text-foreground/80 [&_svg]:size-3.5",t),children:[c.jsx(qa,{status:e}),n(r)]})}const Qa={[me.URGENT]:"danger",[me.HIGH]:"warning",[me.NORMAL]:"neutral",[me.LOW]:"neutral"};function Ja({priority:e,showLabel:t=!1,className:n}){const{t:r}=ie(),o=Fr(e),s=Qa[o.value]??"neutral";return c.jsxs(Na,{tone:s,size:"sm",shape:"tag",title:`${o.code} · ${r(o.label)}`,className:S("font-semibold",o.value===me.LOW&&"bg-foreground/[0.04]",n),children:[o.code,t&&c.jsx("span",{className:"font-medium",children:r(o.label)})]})}function nl({title:e,status:t,priority:n,project:r,updatedAt:o,now:s,active:i=!1,className:a,...l}){const{titleClass:u}=Be[t];return c.jsxs("button",{type:"button","data-sidebar-item":"","aria-current":i||void 0,title:r?`${e} · ${r.name}`:e,className:S("task-row",za(i),a),...l,children:[c.jsx("span",{className:S("min-w-0 flex-1 truncate",u),children:e}),n!==void 0&&n!==me.NORMAL&&c.jsx(Ja,{priority:n}),(r||o!==void 0)&&c.jsx("span",{className:"task-row-meta",children:c.jsxs("span",{className:"flex items-center gap-1",children:[r&&c.jsx(Ua,{name:r.name,color:r.color,className:"@max-[22rem]:hidden"}),o!==void 0&&c.jsx(Za,{value:o,now:s,className:"text-[11px]"})]})})]})}function rl({status:e,count:t,defaultOpen:n=!0,sticky:r=!0,children:o,className:s}){const{t:i}=ie(),{icon:a,label:l,accentClass:u}=Be[e];return c.jsx($a,{title:i(l),icon:c.jsx(a,{className:u}),count:t,countTone:e===Wr.Review?"warning":"neutral",sticky:r,defaultOpen:n,className:S(t>0&&"data-[state=open]:mb-4",s),children:o})}export{mt as $,tr as A,xc as B,Ui as C,bn as D,Ta as E,Jr as F,to as G,Ma as H,La as I,Da as J,_a as K,Ia as L,Ec as M,bc as N,fa as O,Rc as P,Cc as Q,kn as R,vc as S,rn as T,ja as U,Ac as V,Nc as W,Sc as X,ka as Y,za as Z,on as _,Pc as a,le as a0,lc as a1,gc as a2,Na as a3,dc as a4,Mc as a5,Lc as a6,pc as a7,Dc as a8,_c as a9,Kc as aA,Ua as aB,el as aC,Za as aD,V as aE,jt as aF,aa as aG,nl as aH,tl as aI,rl as aJ,qa as aK,Jc as aL,Wc as aM,$c as aN,va as aO,mc as aP,ua as aQ,Ha as aR,Ba as aS,xa as aT,hc as aU,Ic as aa,Tc as ab,Fc as ac,Wa as ad,zc as ae,fc as af,ca as ag,Bc as ah,Yc as ai,Xc as aj,Vc as ak,Qc as al,qc as am,kt as an,Ea as ao,Hc as ap,gr as aq,Zc as ar,Gc as as,Fa as at,Uc as au,uc as av,$a as aw,jc as ax,Oc as ay,Ja as az,kc as b,yc as c,wc as d,W as e,xt as f,mn as g,q as h,He as i,En as j,Ns as k,Lo as l,yn as m,cc as n,Es as o,ge as p,Hi as q,Kn as r,ro as s,Vi as t,fn as u,J as v,ia as w,wa as x,pr as y,Q as z};
@@ -0,0 +1 @@
1
+ import{c as a}from"./index-CMJV-mgF.js";import{T as e}from"./agent-meta-MzuGtqxl.js";const t=[["path",{d:"m5 12 7-7 7 7",key:"hav0vg"}],["path",{d:"M12 19V5",key:"x0mq9r"}]],m=a("arrow-up",t);const n=[["path",{d:"M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z",key:"1kt360"}]],u=a("folder",n);const s=[["line",{x1:"6",x2:"6",y1:"3",y2:"15",key:"17qcm7"}],["circle",{cx:"18",cy:"6",r:"3",key:"1h7g24"}],["circle",{cx:"6",cy:"18",r:"3",key:"fqmcym"}],["path",{d:"M18 9a9 9 0 0 1-9 9",key:"n2h4wq"}]],h=a("git-branch",s);const i=[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]],y=a("search",i),c=[{value:e.URGENT,code:"P0",label:"紧急",className:"bg-destructive/10 text-destructive",iconName:"chevrons-up"},{value:e.HIGH,code:"P1",label:"高",className:"bg-warning/15 text-warning",iconName:"signal-high"},{value:e.NORMAL,code:"P2",label:"普通",className:"bg-muted text-muted-foreground",iconName:"minus"},{value:e.LOW,code:"P3",label:"低",className:"bg-foreground/[0.06] text-muted-foreground",iconName:"chevrons-down"}];function g(o){return c.find(r=>r.value===o)??c[2]}export{m as A,u as F,h as G,y as S,c as T,g};
@@ -1 +1 @@
1
- import{j as o,l as t}from"./index-ClhIruws.js";function a({className:e,...r}){return o.jsx("textarea",{"data-slot":"textarea",className:t("w-full rounded-lg border border-input bg-muted/40 px-3 py-2 text-sm leading-relaxed text-foreground transition-colors","placeholder:text-muted-foreground/70","focus:border-ring focus:bg-background focus:outline-none focus-visible:border-ring","disabled:cursor-not-allowed disabled:bg-muted/50 disabled:text-muted-foreground","aria-invalid:border-destructive",e),...r})}export{a as T};
1
+ import{j as o,l as t}from"./index-CMJV-mgF.js";function a({className:e,...r}){return o.jsx("textarea",{"data-slot":"textarea",className:t("w-full rounded-lg border border-input bg-muted/40 px-3 py-2 text-sm leading-relaxed text-foreground transition-colors","placeholder:text-muted-foreground/70","focus:border-ring focus:bg-background focus:outline-none focus-visible:border-ring","disabled:cursor-not-allowed disabled:bg-muted/50 disabled:text-muted-foreground","aria-invalid:border-destructive",e),...r})}export{a as T};
@@ -1,4 +1,4 @@
1
- import{_ as o,D as pt,ac as Ct,ad as Rt,ae as Wt,c as gt,l as E,I as Pt,N as Bt,af as ft,d as X,C as Vt,ag as Ft,z as zt}from"./index-CA_B15_q.js";import{d as ot}from"./arc-Bd616RKq.js";import"./index-ClhIruws.js";var tt=(function(){var e=o(function(k,s,d,l){for(d=d||{},l=k.length;l--;d[k[l]]=s);return d},"o"),t=[6,11,13,14,15,17,19,20,23,24],n=[1,12],i=[1,13],r=[1,14],h=[1,15],c=[1,16],a=[1,19],f=[1,20],g={trace:o(function(){},"trace"),yy:{},symbols_:{error:2,start:3,timeline_header:4,document:5,EOF:6,timeline:7,timeline_lr:8,timeline_td:9,line:10,SPACE:11,statement:12,NEWLINE:13,title:14,acc_title:15,acc_title_value:16,acc_descr:17,acc_descr_value:18,acc_descr_multiline_value:19,section:20,period_statement:21,event_statement:22,period:23,event:24,$accept:0,$end:1},terminals_:{2:"error",6:"EOF",7:"timeline",8:"timeline_lr",9:"timeline_td",11:"SPACE",13:"NEWLINE",14:"title",15:"acc_title",16:"acc_title_value",17:"acc_descr",18:"acc_descr_value",19:"acc_descr_multiline_value",20:"section",23:"period",24:"event"},productions_:[0,[3,3],[4,1],[4,1],[4,1],[5,0],[5,2],[10,2],[10,1],[10,1],[10,1],[12,1],[12,2],[12,2],[12,1],[12,1],[12,1],[12,1],[21,1],[22,1]],performAction:o(function(s,d,l,p,x,u,S){var v=u.length-1;switch(x){case 1:return u[v-1];case 3:p.setDirection("LR");break;case 4:p.setDirection("TD");break;case 5:this.$=[];break;case 6:u[v-1].push(u[v]),this.$=u[v-1];break;case 7:case 8:this.$=u[v];break;case 9:case 10:this.$=[];break;case 11:p.getCommonDb().setDiagramTitle(u[v].substr(6)),this.$=u[v].substr(6);break;case 12:this.$=u[v].trim(),p.getCommonDb().setAccTitle(this.$);break;case 13:case 14:this.$=u[v].trim(),p.getCommonDb().setAccDescription(this.$);break;case 15:p.addSection(u[v].substr(8)),this.$=u[v].substr(8);break;case 18:p.addTask(u[v],0,""),this.$=u[v];break;case 19:p.addEvent(u[v].substr(2)),this.$=u[v];break}},"anonymous"),table:[{3:1,4:2,7:[1,3],8:[1,4],9:[1,5]},{1:[3]},e(t,[2,5],{5:6}),e(t,[2,2]),e(t,[2,3]),e(t,[2,4]),{6:[1,7],10:8,11:[1,9],12:10,13:[1,11],14:n,15:i,17:r,19:h,20:c,21:17,22:18,23:a,24:f},e(t,[2,10],{1:[2,1]}),e(t,[2,6]),{12:21,14:n,15:i,17:r,19:h,20:c,21:17,22:18,23:a,24:f},e(t,[2,8]),e(t,[2,9]),e(t,[2,11]),{16:[1,22]},{18:[1,23]},e(t,[2,14]),e(t,[2,15]),e(t,[2,16]),e(t,[2,17]),e(t,[2,18]),e(t,[2,19]),e(t,[2,7]),e(t,[2,12]),e(t,[2,13])],defaultActions:{},parseError:o(function(s,d){if(d.recoverable)this.trace(s);else{var l=new Error(s);throw l.hash=d,l}},"parseError"),parse:o(function(s){var d=this,l=[0],p=[],x=[null],u=[],S=this.table,v="",I=0,C=0,W=2,O=1,L=u.slice.call(arguments,1),w=Object.create(this.lexer),H={yy:{}};for(var V in this.yy)Object.prototype.hasOwnProperty.call(this.yy,V)&&(H.yy[V]=this.yy[V]);w.setInput(s,H.yy),H.yy.lexer=w,H.yy.parser=this,typeof w.yylloc>"u"&&(w.yylloc={});var F=w.yylloc;u.push(F);var U=w.options&&w.options.ranges;typeof H.yy.parseError=="function"?this.parseError=H.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function N(A){l.length=l.length-2*A,x.length=x.length-A,u.length=u.length-A}o(N,"popStack");function b(){var A;return A=p.pop()||w.lex()||O,typeof A!="number"&&(A instanceof Array&&(p=A,A=p.pop()),A=d.symbols_[A]||A),A}o(b,"lex");for(var _,$,T,P,R={},G,B,Z,j;;){if($=l[l.length-1],this.defaultActions[$]?T=this.defaultActions[$]:((_===null||typeof _>"u")&&(_=b()),T=S[$]&&S[$][_]),typeof T>"u"||!T.length||!T[0]){var Y="";j=[];for(G in S[$])this.terminals_[G]&&G>W&&j.push("'"+this.terminals_[G]+"'");w.showPosition?Y="Parse error on line "+(I+1)+`:
1
+ import{_ as o,D as pt,ac as Ct,ad as Rt,ae as Wt,c as gt,l as E,I as Pt,N as Bt,af as ft,d as X,C as Vt,ag as Ft,z as zt}from"./index-D_QVcsLn.js";import{d as ot}from"./arc-Bm_QIbJA.js";import"./index-CMJV-mgF.js";var tt=(function(){var e=o(function(k,s,d,l){for(d=d||{},l=k.length;l--;d[k[l]]=s);return d},"o"),t=[6,11,13,14,15,17,19,20,23,24],n=[1,12],i=[1,13],r=[1,14],h=[1,15],c=[1,16],a=[1,19],f=[1,20],g={trace:o(function(){},"trace"),yy:{},symbols_:{error:2,start:3,timeline_header:4,document:5,EOF:6,timeline:7,timeline_lr:8,timeline_td:9,line:10,SPACE:11,statement:12,NEWLINE:13,title:14,acc_title:15,acc_title_value:16,acc_descr:17,acc_descr_value:18,acc_descr_multiline_value:19,section:20,period_statement:21,event_statement:22,period:23,event:24,$accept:0,$end:1},terminals_:{2:"error",6:"EOF",7:"timeline",8:"timeline_lr",9:"timeline_td",11:"SPACE",13:"NEWLINE",14:"title",15:"acc_title",16:"acc_title_value",17:"acc_descr",18:"acc_descr_value",19:"acc_descr_multiline_value",20:"section",23:"period",24:"event"},productions_:[0,[3,3],[4,1],[4,1],[4,1],[5,0],[5,2],[10,2],[10,1],[10,1],[10,1],[12,1],[12,2],[12,2],[12,1],[12,1],[12,1],[12,1],[21,1],[22,1]],performAction:o(function(s,d,l,p,x,u,S){var v=u.length-1;switch(x){case 1:return u[v-1];case 3:p.setDirection("LR");break;case 4:p.setDirection("TD");break;case 5:this.$=[];break;case 6:u[v-1].push(u[v]),this.$=u[v-1];break;case 7:case 8:this.$=u[v];break;case 9:case 10:this.$=[];break;case 11:p.getCommonDb().setDiagramTitle(u[v].substr(6)),this.$=u[v].substr(6);break;case 12:this.$=u[v].trim(),p.getCommonDb().setAccTitle(this.$);break;case 13:case 14:this.$=u[v].trim(),p.getCommonDb().setAccDescription(this.$);break;case 15:p.addSection(u[v].substr(8)),this.$=u[v].substr(8);break;case 18:p.addTask(u[v],0,""),this.$=u[v];break;case 19:p.addEvent(u[v].substr(2)),this.$=u[v];break}},"anonymous"),table:[{3:1,4:2,7:[1,3],8:[1,4],9:[1,5]},{1:[3]},e(t,[2,5],{5:6}),e(t,[2,2]),e(t,[2,3]),e(t,[2,4]),{6:[1,7],10:8,11:[1,9],12:10,13:[1,11],14:n,15:i,17:r,19:h,20:c,21:17,22:18,23:a,24:f},e(t,[2,10],{1:[2,1]}),e(t,[2,6]),{12:21,14:n,15:i,17:r,19:h,20:c,21:17,22:18,23:a,24:f},e(t,[2,8]),e(t,[2,9]),e(t,[2,11]),{16:[1,22]},{18:[1,23]},e(t,[2,14]),e(t,[2,15]),e(t,[2,16]),e(t,[2,17]),e(t,[2,18]),e(t,[2,19]),e(t,[2,7]),e(t,[2,12]),e(t,[2,13])],defaultActions:{},parseError:o(function(s,d){if(d.recoverable)this.trace(s);else{var l=new Error(s);throw l.hash=d,l}},"parseError"),parse:o(function(s){var d=this,l=[0],p=[],x=[null],u=[],S=this.table,v="",I=0,C=0,W=2,O=1,L=u.slice.call(arguments,1),w=Object.create(this.lexer),H={yy:{}};for(var V in this.yy)Object.prototype.hasOwnProperty.call(this.yy,V)&&(H.yy[V]=this.yy[V]);w.setInput(s,H.yy),H.yy.lexer=w,H.yy.parser=this,typeof w.yylloc>"u"&&(w.yylloc={});var F=w.yylloc;u.push(F);var U=w.options&&w.options.ranges;typeof H.yy.parseError=="function"?this.parseError=H.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function N(A){l.length=l.length-2*A,x.length=x.length-A,u.length=u.length-A}o(N,"popStack");function b(){var A;return A=p.pop()||w.lex()||O,typeof A!="number"&&(A instanceof Array&&(p=A,A=p.pop()),A=d.symbols_[A]||A),A}o(b,"lex");for(var _,$,T,P,R={},G,B,Z,j;;){if($=l[l.length-1],this.defaultActions[$]?T=this.defaultActions[$]:((_===null||typeof _>"u")&&(_=b()),T=S[$]&&S[$][_]),typeof T>"u"||!T.length||!T[0]){var Y="";j=[];for(G in S[$])this.terminals_[G]&&G>W&&j.push("'"+this.terminals_[G]+"'");w.showPosition?Y="Parse error on line "+(I+1)+`:
2
2
  `+w.showPosition()+`
3
3
  Expecting `+j.join(", ")+", got '"+(this.terminals_[_]||_)+"'":Y="Parse error on line "+(I+1)+": Unexpected "+(_==O?"end of input":"'"+(this.terminals_[_]||_)+"'"),this.parseError(Y,{text:w.match,token:this.terminals_[_]||_,line:w.yylineno,loc:F,expected:j})}if(T[0]instanceof Array&&T.length>1)throw new Error("Parse Error: multiple actions possible at state: "+$+", token: "+_);switch(T[0]){case 1:l.push(_),x.push(w.yytext),u.push(w.yylloc),l.push(T[1]),_=null,C=w.yyleng,v=w.yytext,I=w.yylineno,F=w.yylloc;break;case 2:if(B=this.productions_[T[1]][1],R.$=x[x.length-B],R._$={first_line:u[u.length-(B||1)].first_line,last_line:u[u.length-1].last_line,first_column:u[u.length-(B||1)].first_column,last_column:u[u.length-1].last_column},U&&(R._$.range=[u[u.length-(B||1)].range[0],u[u.length-1].range[1]]),P=this.performAction.apply(R,[v,C,I,H.yy,T[1],x,u].concat(L)),typeof P<"u")return P;B&&(l=l.slice(0,-1*B*2),x=x.slice(0,-1*B),u=u.slice(0,-1*B)),l.push(this.productions_[T[1]][0]),x.push(R.$),u.push(R._$),Z=S[l[l.length-2]][l[l.length-1]],l.push(Z);break;case 3:return!0}}return!0},"parse")},m=(function(){var k={EOF:1,parseError:o(function(d,l){if(this.yy.parser)this.yy.parser.parseError(d,l);else throw new Error(d)},"parseError"),setInput:o(function(s,d){return this.yy=d||this.yy||{},this._input=s,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:o(function(){var s=this._input[0];this.yytext+=s,this.yyleng++,this.offset++,this.match+=s,this.matched+=s;var d=s.match(/(?:\r\n?|\n).*/g);return d?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),s},"input"),unput:o(function(s){var d=s.length,l=s.split(/(?:\r\n?|\n)/g);this._input=s+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-d),this.offset-=d;var p=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),l.length-1&&(this.yylineno-=l.length-1);var x=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:l?(l.length===p.length?this.yylloc.first_column:0)+p[p.length-l.length].length-l[0].length:this.yylloc.first_column-d},this.options.ranges&&(this.yylloc.range=[x[0],x[0]+this.yyleng-d]),this.yyleng=this.yytext.length,this},"unput"),more:o(function(){return this._more=!0,this},"more"),reject:o(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
4
4
  `+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:o(function(s){this.unput(this.match.slice(s))},"less"),pastInput:o(function(){var s=this.matched.substr(0,this.matched.length-this.match.length);return(s.length>20?"...":"")+s.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:o(function(){var s=this.match;return s.length<20&&(s+=this._input.substr(0,20-s.length)),(s.substr(0,20)+(s.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:o(function(){var s=this.pastInput(),d=new Array(s.length+1).join("-");return s+this.upcomingInput()+`
@@ -1 +1 @@
1
- import{k as a}from"./index-ClhIruws.js";const t=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]],h=a("plus",t);const e=[["path",{d:"M10 11v6",key:"nco0om"}],["path",{d:"M14 11v6",key:"outv1u"}],["path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6",key:"miytrc"}],["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2",key:"e791ji"}]],s=a("trash-2",e);export{h as P,s as T};
1
+ import{c as a}from"./index-CMJV-mgF.js";const t=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]],h=a("plus",t);const e=[["path",{d:"M10 11v6",key:"nco0om"}],["path",{d:"M14 11v6",key:"outv1u"}],["path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6",key:"miytrc"}],["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2",key:"e791ji"}]],s=a("trash-2",e);export{h as P,s as T};
@@ -1,11 +1,11 @@
1
- import{c as M,e as w,U as F,a as P,M as v,l as f,t as K,R as O}from"./monaco-CirwkIGR.js";import"./ProjectKanbanPage-VFkvX9IJ.js";import"./index-ClhIruws.js";import"./mermaid-NOHMQCX5-BsnLQ2rU.js";import"./chevron-right-DJVYJhGF.js";import"./chevron-down-BouKK_Vr.js";import"./confirm-dialog-Drhw7wmk.js";import"./modal-BFDGLwoR.js";import"./use-workspaces-C1HJqhNs.js";import"./use-projects-CNU2P0v0.js";import"./circle-alert-C_ON1rCL.js";import"./check-Bj-p_n7C.js";import"./CreateTaskInput-D_KCLZ4q.js";import"./ExecutionPermissionSelector-CTeKhMaB.js";import"./AgentLogo-BhKP5dmt.js";import"./MemberAvatar-BuueBvLu.js";import"./use-providers-BKYsoOBU.js";import"./trash-2-DrNpNvRo.js";import"./useNormalizedLogs-Bu2oXEky.js";import"./message-square-CTrwLud_.js";import"./layers-BlEewgM8.js";import"./chevron-up-CRlA9Cjl.js";import"./globe-AjOch0vk.js";import"./select-CLV6rtRD.js";import"./textarea-DDy2_gLQ.js";import"./server-Dhw531hF.js";import"./upload-D6SifUfr.js";import"./pencil-DQeFTV0j.js";class E{constructor(e,t){this._modeId=e,this._defaults=t,this._worker=null,this._client=null,this._configChangeListener=this._defaults.onDidChange(()=>this._stopWorker()),this._updateExtraLibsToken=0,this._extraLibsChangeListener=this._defaults.onDidExtraLibsChange(()=>this._updateExtraLibs())}dispose(){this._configChangeListener.dispose(),this._extraLibsChangeListener.dispose(),this._stopWorker()}_stopWorker(){this._worker&&(this._worker.dispose(),this._worker=null),this._client=null}async _updateExtraLibs(){if(!this._worker)return;const e=++this._updateExtraLibsToken,t=await this._worker.getProxy();this._updateExtraLibsToken===e&&t.updateExtraLibs(this._defaults.getExtraLibs())}_getClient(){return this._client||(this._client=(async()=>(this._worker=M({moduleId:"vs/language/typescript/tsWorker",createWorker:()=>new Worker(new URL("/assets/ts.worker-BH9nVgjN.js",import.meta.url),{type:"module"}),label:this._modeId,keepIdleModels:!0,createData:{compilerOptions:this._defaults.getCompilerOptions(),extraLibs:this._defaults.getExtraLibs(),customWorkerPath:this._defaults.workerOptions.customWorkerPath,inlayHintsOptions:this._defaults.inlayHintsOptions}}),this._defaults.getEagerModelSync()?await this._worker.withSyncedResources(w.getModels().filter(e=>e.getLanguageId()===this._modeId).map(e=>e.uri)):await this._worker.getProxy()))()),this._client}async getLanguageServiceWorker(...e){const t=await this._getClient();return this._worker&&await this._worker.withSyncedResources(e),t}}const s={};s["lib.d.ts"]=!0;s["lib.decorators.d.ts"]=!0;s["lib.decorators.legacy.d.ts"]=!0;s["lib.dom.asynciterable.d.ts"]=!0;s["lib.dom.d.ts"]=!0;s["lib.dom.iterable.d.ts"]=!0;s["lib.es2015.collection.d.ts"]=!0;s["lib.es2015.core.d.ts"]=!0;s["lib.es2015.d.ts"]=!0;s["lib.es2015.generator.d.ts"]=!0;s["lib.es2015.iterable.d.ts"]=!0;s["lib.es2015.promise.d.ts"]=!0;s["lib.es2015.proxy.d.ts"]=!0;s["lib.es2015.reflect.d.ts"]=!0;s["lib.es2015.symbol.d.ts"]=!0;s["lib.es2015.symbol.wellknown.d.ts"]=!0;s["lib.es2016.array.include.d.ts"]=!0;s["lib.es2016.d.ts"]=!0;s["lib.es2016.full.d.ts"]=!0;s["lib.es2016.intl.d.ts"]=!0;s["lib.es2017.arraybuffer.d.ts"]=!0;s["lib.es2017.d.ts"]=!0;s["lib.es2017.date.d.ts"]=!0;s["lib.es2017.full.d.ts"]=!0;s["lib.es2017.intl.d.ts"]=!0;s["lib.es2017.object.d.ts"]=!0;s["lib.es2017.sharedmemory.d.ts"]=!0;s["lib.es2017.string.d.ts"]=!0;s["lib.es2017.typedarrays.d.ts"]=!0;s["lib.es2018.asyncgenerator.d.ts"]=!0;s["lib.es2018.asynciterable.d.ts"]=!0;s["lib.es2018.d.ts"]=!0;s["lib.es2018.full.d.ts"]=!0;s["lib.es2018.intl.d.ts"]=!0;s["lib.es2018.promise.d.ts"]=!0;s["lib.es2018.regexp.d.ts"]=!0;s["lib.es2019.array.d.ts"]=!0;s["lib.es2019.d.ts"]=!0;s["lib.es2019.full.d.ts"]=!0;s["lib.es2019.intl.d.ts"]=!0;s["lib.es2019.object.d.ts"]=!0;s["lib.es2019.string.d.ts"]=!0;s["lib.es2019.symbol.d.ts"]=!0;s["lib.es2020.bigint.d.ts"]=!0;s["lib.es2020.d.ts"]=!0;s["lib.es2020.date.d.ts"]=!0;s["lib.es2020.full.d.ts"]=!0;s["lib.es2020.intl.d.ts"]=!0;s["lib.es2020.number.d.ts"]=!0;s["lib.es2020.promise.d.ts"]=!0;s["lib.es2020.sharedmemory.d.ts"]=!0;s["lib.es2020.string.d.ts"]=!0;s["lib.es2020.symbol.wellknown.d.ts"]=!0;s["lib.es2021.d.ts"]=!0;s["lib.es2021.full.d.ts"]=!0;s["lib.es2021.intl.d.ts"]=!0;s["lib.es2021.promise.d.ts"]=!0;s["lib.es2021.string.d.ts"]=!0;s["lib.es2021.weakref.d.ts"]=!0;s["lib.es2022.array.d.ts"]=!0;s["lib.es2022.d.ts"]=!0;s["lib.es2022.error.d.ts"]=!0;s["lib.es2022.full.d.ts"]=!0;s["lib.es2022.intl.d.ts"]=!0;s["lib.es2022.object.d.ts"]=!0;s["lib.es2022.regexp.d.ts"]=!0;s["lib.es2022.string.d.ts"]=!0;s["lib.es2023.array.d.ts"]=!0;s["lib.es2023.collection.d.ts"]=!0;s["lib.es2023.d.ts"]=!0;s["lib.es2023.full.d.ts"]=!0;s["lib.es2023.intl.d.ts"]=!0;s["lib.es2024.arraybuffer.d.ts"]=!0;s["lib.es2024.collection.d.ts"]=!0;s["lib.es2024.d.ts"]=!0;s["lib.es2024.full.d.ts"]=!0;s["lib.es2024.object.d.ts"]=!0;s["lib.es2024.promise.d.ts"]=!0;s["lib.es2024.regexp.d.ts"]=!0;s["lib.es2024.sharedmemory.d.ts"]=!0;s["lib.es2024.string.d.ts"]=!0;s["lib.es5.d.ts"]=!0;s["lib.es6.d.ts"]=!0;s["lib.esnext.array.d.ts"]=!0;s["lib.esnext.collection.d.ts"]=!0;s["lib.esnext.d.ts"]=!0;s["lib.esnext.decorators.d.ts"]=!0;s["lib.esnext.disposable.d.ts"]=!0;s["lib.esnext.error.d.ts"]=!0;s["lib.esnext.float16.d.ts"]=!0;s["lib.esnext.full.d.ts"]=!0;s["lib.esnext.intl.d.ts"]=!0;s["lib.esnext.iterator.d.ts"]=!0;s["lib.esnext.promise.d.ts"]=!0;s["lib.esnext.sharedmemory.d.ts"]=!0;s["lib.scripthost.d.ts"]=!0;s["lib.webworker.asynciterable.d.ts"]=!0;s["lib.webworker.d.ts"]=!0;s["lib.webworker.importscripts.d.ts"]=!0;s["lib.webworker.iterable.d.ts"]=!0;function A(c,e,t=0){if(typeof c=="string")return c;if(c===void 0)return"";let o="";if(t){o+=e;for(let i=0;i<t;i++)o+=" "}if(o+=c.messageText,t++,c.next)for(const i of c.next)o+=A(i,e,t);return o}function _(c){return c?c.map(e=>e.text).join(""):""}class y{constructor(e){this._worker=e}_textSpanToRange(e,t){let o=e.getPositionAt(t.start),i=e.getPositionAt(t.start+t.length),{lineNumber:l,column:p}=o,{lineNumber:n,column:r}=i;return{startLineNumber:l,startColumn:p,endLineNumber:n,endColumn:r}}}class H{constructor(e){this._worker=e,this._libFiles={},this._hasFetchedLibFiles=!1,this._fetchLibFilesPromise=null}isLibFile(e){return e&&e.path.indexOf("/lib.")===0?!!s[e.path.slice(1)]:!1}getOrCreateModel(e){const t=F.parse(e),o=w.getModel(t);if(o)return o;if(this.isLibFile(t)&&this._hasFetchedLibFiles)return w.createModel(this._libFiles[t.path.slice(1)],"typescript",t);const i=K.getExtraLibs()[e];return i?w.createModel(i.content,"typescript",t):null}_containsLibFile(e){for(let t of e)if(this.isLibFile(t))return!0;return!1}async fetchLibFilesIfNecessary(e){this._containsLibFile(e)&&await this._fetchLibFiles()}_fetchLibFiles(){return this._fetchLibFilesPromise||(this._fetchLibFilesPromise=this._worker().then(e=>e.getLibFiles()).then(e=>{this._hasFetchedLibFiles=!0,this._libFiles=e})),this._fetchLibFilesPromise}}class V extends y{constructor(e,t,o,i){super(i),this._libFiles=e,this._defaults=t,this._selector=o,this._disposables=[],this._listener=Object.create(null);const l=r=>{if(r.getLanguageId()!==o)return;const u=()=>{const{onlyVisible:m}=this._defaults.getDiagnosticsOptions();m?r.isAttachedToEditor()&&this._doValidate(r):this._doValidate(r)};let d;const g=r.onDidChangeContent(()=>{clearTimeout(d),d=window.setTimeout(u,500)}),b=r.onDidChangeAttached(()=>{const{onlyVisible:m}=this._defaults.getDiagnosticsOptions();m&&(r.isAttachedToEditor()?u():w.setModelMarkers(r,this._selector,[]))});this._listener[r.uri.toString()]={dispose(){g.dispose(),b.dispose(),clearTimeout(d)}},u()},p=r=>{w.setModelMarkers(r,this._selector,[]);const u=r.uri.toString();this._listener[u]&&(this._listener[u].dispose(),delete this._listener[u])};this._disposables.push(w.onDidCreateModel(r=>l(r))),this._disposables.push(w.onWillDisposeModel(p)),this._disposables.push(w.onDidChangeModelLanguage(r=>{p(r.model),l(r.model)})),this._disposables.push({dispose(){for(const r of w.getModels())p(r)}});const n=()=>{for(const r of w.getModels())p(r),l(r)};this._disposables.push(this._defaults.onDidChange(n)),this._disposables.push(this._defaults.onDidExtraLibsChange(n)),w.getModels().forEach(r=>l(r))}dispose(){this._disposables.forEach(e=>e&&e.dispose()),this._disposables=[]}async _doValidate(e){const t=await this._worker(e.uri);if(e.isDisposed())return;const o=[],{noSyntaxValidation:i,noSemanticValidation:l,noSuggestionDiagnostics:p}=this._defaults.getDiagnosticsOptions();i||o.push(t.getSyntacticDiagnostics(e.uri.toString())),l||o.push(t.getSemanticDiagnostics(e.uri.toString())),p||o.push(t.getSuggestionDiagnostics(e.uri.toString()));const n=await Promise.all(o);if(!n||e.isDisposed())return;const r=n.reduce((d,g)=>g.concat(d),[]).filter(d=>(this._defaults.getDiagnosticsOptions().diagnosticCodesToIgnore||[]).indexOf(d.code)===-1),u=r.map(d=>d.relatedInformation||[]).reduce((d,g)=>g.concat(d),[]).map(d=>d.file?F.parse(d.file.fileName):null);await this._libFiles.fetchLibFilesIfNecessary(u),!e.isDisposed()&&w.setModelMarkers(e,this._selector,r.map(d=>this._convertDiagnostics(e,d)))}_convertDiagnostics(e,t){const o=t.start||0,i=t.length||1,{lineNumber:l,column:p}=e.getPositionAt(o),{lineNumber:n,column:r}=e.getPositionAt(o+i),u=[];return t.reportsUnnecessary&&u.push(P.Unnecessary),t.reportsDeprecated&&u.push(P.Deprecated),{severity:this._tsDiagnosticCategoryToMarkerSeverity(t.category),startLineNumber:l,startColumn:p,endLineNumber:n,endColumn:r,message:A(t.messageText,`
1
+ import{c as M,e as w,U as F,a as P,M as v,l as f,t as K,R as O}from"./monaco-BuDK9Fat.js";import"./EditableTaskTitle-mHT39coo.js";import"./index-CMJV-mgF.js";import"./mermaid-NOHMQCX5-C72362la.js";import"./agent-meta-MzuGtqxl.js";import"./use-attachments-EypT-7PI.js";import"./chevron-down-BaQEBzp3.js";import"./use-providers-DB9ghBPq.js";import"./AgentLogo-BDyW3ihb.js";import"./MemberAvatar-CCRbS97s.js";import"./chevron-up-D0y6skqr.js";import"./arrow-down-BVePf1ZM.js";import"./at-sign-BE17rU5b.js";import"./paperclip-BOSklTt7.js";import"./task-priority-acVgTiil.js";import"./check-qs0S_9rB.js";import"./useTokenUsage-4qTDa8SY.js";import"./CreateTaskInput-GLF3Oyc1.js";import"./use-projects-DI27nNwl.js";import"./trash-2-Bc-URu8c.js";import"./ExecutionPermissionSelector-DeeNd4Kh.js";import"./BrandLogo-YGT4Vlw5.js";import"./gauge-CPlvCZUV.js";import"./confirm-dialog-BrgNTypL.js";import"./modal-DeigO7aN.js";import"./select-DKS02St6.js";import"./layers-Dda7MM7a.js";import"./message-square-CFriSt4D.js";import"./textarea-Ft9KMoEI.js";import"./play-Mxkwq69n.js";import"./server-DJaSJ9m1.js";import"./task-CDYaC_No.js";import"./status-styles-sQm4KLdp.js";import"./copy-DejkmIHZ.js";import"./use-workspaces-d4n9m9cX.js";import"./circle-alert-Cbvy2cMo.js";import"./upload-C9Z4jLtv.js";import"./globe-CD4g63c9.js";import"./BranchSelect-Dmp5hq0i.js";import"./useNormalizedLogs-DRoPbP0w.js";import"./pencil-BRQ9W_a-.js";class E{constructor(e,t){this._modeId=e,this._defaults=t,this._worker=null,this._client=null,this._configChangeListener=this._defaults.onDidChange(()=>this._stopWorker()),this._updateExtraLibsToken=0,this._extraLibsChangeListener=this._defaults.onDidExtraLibsChange(()=>this._updateExtraLibs())}dispose(){this._configChangeListener.dispose(),this._extraLibsChangeListener.dispose(),this._stopWorker()}_stopWorker(){this._worker&&(this._worker.dispose(),this._worker=null),this._client=null}async _updateExtraLibs(){if(!this._worker)return;const e=++this._updateExtraLibsToken,t=await this._worker.getProxy();this._updateExtraLibsToken===e&&t.updateExtraLibs(this._defaults.getExtraLibs())}_getClient(){return this._client||(this._client=(async()=>(this._worker=M({moduleId:"vs/language/typescript/tsWorker",createWorker:()=>new Worker(new URL("/assets/ts.worker-BH9nVgjN.js",import.meta.url),{type:"module"}),label:this._modeId,keepIdleModels:!0,createData:{compilerOptions:this._defaults.getCompilerOptions(),extraLibs:this._defaults.getExtraLibs(),customWorkerPath:this._defaults.workerOptions.customWorkerPath,inlayHintsOptions:this._defaults.inlayHintsOptions}}),this._defaults.getEagerModelSync()?await this._worker.withSyncedResources(w.getModels().filter(e=>e.getLanguageId()===this._modeId).map(e=>e.uri)):await this._worker.getProxy()))()),this._client}async getLanguageServiceWorker(...e){const t=await this._getClient();return this._worker&&await this._worker.withSyncedResources(e),t}}const s={};s["lib.d.ts"]=!0;s["lib.decorators.d.ts"]=!0;s["lib.decorators.legacy.d.ts"]=!0;s["lib.dom.asynciterable.d.ts"]=!0;s["lib.dom.d.ts"]=!0;s["lib.dom.iterable.d.ts"]=!0;s["lib.es2015.collection.d.ts"]=!0;s["lib.es2015.core.d.ts"]=!0;s["lib.es2015.d.ts"]=!0;s["lib.es2015.generator.d.ts"]=!0;s["lib.es2015.iterable.d.ts"]=!0;s["lib.es2015.promise.d.ts"]=!0;s["lib.es2015.proxy.d.ts"]=!0;s["lib.es2015.reflect.d.ts"]=!0;s["lib.es2015.symbol.d.ts"]=!0;s["lib.es2015.symbol.wellknown.d.ts"]=!0;s["lib.es2016.array.include.d.ts"]=!0;s["lib.es2016.d.ts"]=!0;s["lib.es2016.full.d.ts"]=!0;s["lib.es2016.intl.d.ts"]=!0;s["lib.es2017.arraybuffer.d.ts"]=!0;s["lib.es2017.d.ts"]=!0;s["lib.es2017.date.d.ts"]=!0;s["lib.es2017.full.d.ts"]=!0;s["lib.es2017.intl.d.ts"]=!0;s["lib.es2017.object.d.ts"]=!0;s["lib.es2017.sharedmemory.d.ts"]=!0;s["lib.es2017.string.d.ts"]=!0;s["lib.es2017.typedarrays.d.ts"]=!0;s["lib.es2018.asyncgenerator.d.ts"]=!0;s["lib.es2018.asynciterable.d.ts"]=!0;s["lib.es2018.d.ts"]=!0;s["lib.es2018.full.d.ts"]=!0;s["lib.es2018.intl.d.ts"]=!0;s["lib.es2018.promise.d.ts"]=!0;s["lib.es2018.regexp.d.ts"]=!0;s["lib.es2019.array.d.ts"]=!0;s["lib.es2019.d.ts"]=!0;s["lib.es2019.full.d.ts"]=!0;s["lib.es2019.intl.d.ts"]=!0;s["lib.es2019.object.d.ts"]=!0;s["lib.es2019.string.d.ts"]=!0;s["lib.es2019.symbol.d.ts"]=!0;s["lib.es2020.bigint.d.ts"]=!0;s["lib.es2020.d.ts"]=!0;s["lib.es2020.date.d.ts"]=!0;s["lib.es2020.full.d.ts"]=!0;s["lib.es2020.intl.d.ts"]=!0;s["lib.es2020.number.d.ts"]=!0;s["lib.es2020.promise.d.ts"]=!0;s["lib.es2020.sharedmemory.d.ts"]=!0;s["lib.es2020.string.d.ts"]=!0;s["lib.es2020.symbol.wellknown.d.ts"]=!0;s["lib.es2021.d.ts"]=!0;s["lib.es2021.full.d.ts"]=!0;s["lib.es2021.intl.d.ts"]=!0;s["lib.es2021.promise.d.ts"]=!0;s["lib.es2021.string.d.ts"]=!0;s["lib.es2021.weakref.d.ts"]=!0;s["lib.es2022.array.d.ts"]=!0;s["lib.es2022.d.ts"]=!0;s["lib.es2022.error.d.ts"]=!0;s["lib.es2022.full.d.ts"]=!0;s["lib.es2022.intl.d.ts"]=!0;s["lib.es2022.object.d.ts"]=!0;s["lib.es2022.regexp.d.ts"]=!0;s["lib.es2022.string.d.ts"]=!0;s["lib.es2023.array.d.ts"]=!0;s["lib.es2023.collection.d.ts"]=!0;s["lib.es2023.d.ts"]=!0;s["lib.es2023.full.d.ts"]=!0;s["lib.es2023.intl.d.ts"]=!0;s["lib.es2024.arraybuffer.d.ts"]=!0;s["lib.es2024.collection.d.ts"]=!0;s["lib.es2024.d.ts"]=!0;s["lib.es2024.full.d.ts"]=!0;s["lib.es2024.object.d.ts"]=!0;s["lib.es2024.promise.d.ts"]=!0;s["lib.es2024.regexp.d.ts"]=!0;s["lib.es2024.sharedmemory.d.ts"]=!0;s["lib.es2024.string.d.ts"]=!0;s["lib.es5.d.ts"]=!0;s["lib.es6.d.ts"]=!0;s["lib.esnext.array.d.ts"]=!0;s["lib.esnext.collection.d.ts"]=!0;s["lib.esnext.d.ts"]=!0;s["lib.esnext.decorators.d.ts"]=!0;s["lib.esnext.disposable.d.ts"]=!0;s["lib.esnext.error.d.ts"]=!0;s["lib.esnext.float16.d.ts"]=!0;s["lib.esnext.full.d.ts"]=!0;s["lib.esnext.intl.d.ts"]=!0;s["lib.esnext.iterator.d.ts"]=!0;s["lib.esnext.promise.d.ts"]=!0;s["lib.esnext.sharedmemory.d.ts"]=!0;s["lib.scripthost.d.ts"]=!0;s["lib.webworker.asynciterable.d.ts"]=!0;s["lib.webworker.d.ts"]=!0;s["lib.webworker.importscripts.d.ts"]=!0;s["lib.webworker.iterable.d.ts"]=!0;function A(c,e,t=0){if(typeof c=="string")return c;if(c===void 0)return"";let o="";if(t){o+=e;for(let i=0;i<t;i++)o+=" "}if(o+=c.messageText,t++,c.next)for(const i of c.next)o+=A(i,e,t);return o}function _(c){return c?c.map(e=>e.text).join(""):""}class y{constructor(e){this._worker=e}_textSpanToRange(e,t){let o=e.getPositionAt(t.start),i=e.getPositionAt(t.start+t.length),{lineNumber:l,column:p}=o,{lineNumber:n,column:r}=i;return{startLineNumber:l,startColumn:p,endLineNumber:n,endColumn:r}}}class H{constructor(e){this._worker=e,this._libFiles={},this._hasFetchedLibFiles=!1,this._fetchLibFilesPromise=null}isLibFile(e){return e&&e.path.indexOf("/lib.")===0?!!s[e.path.slice(1)]:!1}getOrCreateModel(e){const t=F.parse(e),o=w.getModel(t);if(o)return o;if(this.isLibFile(t)&&this._hasFetchedLibFiles)return w.createModel(this._libFiles[t.path.slice(1)],"typescript",t);const i=K.getExtraLibs()[e];return i?w.createModel(i.content,"typescript",t):null}_containsLibFile(e){for(let t of e)if(this.isLibFile(t))return!0;return!1}async fetchLibFilesIfNecessary(e){this._containsLibFile(e)&&await this._fetchLibFiles()}_fetchLibFiles(){return this._fetchLibFilesPromise||(this._fetchLibFilesPromise=this._worker().then(e=>e.getLibFiles()).then(e=>{this._hasFetchedLibFiles=!0,this._libFiles=e})),this._fetchLibFilesPromise}}class V extends y{constructor(e,t,o,i){super(i),this._libFiles=e,this._defaults=t,this._selector=o,this._disposables=[],this._listener=Object.create(null);const l=r=>{if(r.getLanguageId()!==o)return;const u=()=>{const{onlyVisible:b}=this._defaults.getDiagnosticsOptions();b?r.isAttachedToEditor()&&this._doValidate(r):this._doValidate(r)};let d;const g=r.onDidChangeContent(()=>{clearTimeout(d),d=window.setTimeout(u,500)}),m=r.onDidChangeAttached(()=>{const{onlyVisible:b}=this._defaults.getDiagnosticsOptions();b&&(r.isAttachedToEditor()?u():w.setModelMarkers(r,this._selector,[]))});this._listener[r.uri.toString()]={dispose(){g.dispose(),m.dispose(),clearTimeout(d)}},u()},p=r=>{w.setModelMarkers(r,this._selector,[]);const u=r.uri.toString();this._listener[u]&&(this._listener[u].dispose(),delete this._listener[u])};this._disposables.push(w.onDidCreateModel(r=>l(r))),this._disposables.push(w.onWillDisposeModel(p)),this._disposables.push(w.onDidChangeModelLanguage(r=>{p(r.model),l(r.model)})),this._disposables.push({dispose(){for(const r of w.getModels())p(r)}});const n=()=>{for(const r of w.getModels())p(r),l(r)};this._disposables.push(this._defaults.onDidChange(n)),this._disposables.push(this._defaults.onDidExtraLibsChange(n)),w.getModels().forEach(r=>l(r))}dispose(){this._disposables.forEach(e=>e&&e.dispose()),this._disposables=[]}async _doValidate(e){const t=await this._worker(e.uri);if(e.isDisposed())return;const o=[],{noSyntaxValidation:i,noSemanticValidation:l,noSuggestionDiagnostics:p}=this._defaults.getDiagnosticsOptions();i||o.push(t.getSyntacticDiagnostics(e.uri.toString())),l||o.push(t.getSemanticDiagnostics(e.uri.toString())),p||o.push(t.getSuggestionDiagnostics(e.uri.toString()));const n=await Promise.all(o);if(!n||e.isDisposed())return;const r=n.reduce((d,g)=>g.concat(d),[]).filter(d=>(this._defaults.getDiagnosticsOptions().diagnosticCodesToIgnore||[]).indexOf(d.code)===-1),u=r.map(d=>d.relatedInformation||[]).reduce((d,g)=>g.concat(d),[]).map(d=>d.file?F.parse(d.file.fileName):null);await this._libFiles.fetchLibFilesIfNecessary(u),!e.isDisposed()&&w.setModelMarkers(e,this._selector,r.map(d=>this._convertDiagnostics(e,d)))}_convertDiagnostics(e,t){const o=t.start||0,i=t.length||1,{lineNumber:l,column:p}=e.getPositionAt(o),{lineNumber:n,column:r}=e.getPositionAt(o+i),u=[];return t.reportsUnnecessary&&u.push(P.Unnecessary),t.reportsDeprecated&&u.push(P.Deprecated),{severity:this._tsDiagnosticCategoryToMarkerSeverity(t.category),startLineNumber:l,startColumn:p,endLineNumber:n,endColumn:r,message:A(t.messageText,`
2
2
  `),code:t.code.toString(),tags:u,relatedInformation:this._convertRelatedInformation(e,t.relatedInformation)}}_convertRelatedInformation(e,t){if(!t)return[];const o=[];return t.forEach(i=>{let l=e;if(i.file&&(l=this._libFiles.getOrCreateModel(i.file.fileName)),!l)return;const p=i.start||0,n=i.length||1,{lineNumber:r,column:u}=l.getPositionAt(p),{lineNumber:d,column:g}=l.getPositionAt(p+n);o.push({resource:l.uri,startLineNumber:r,startColumn:u,endLineNumber:d,endColumn:g,message:A(i.messageText,`
3
- `)})}),o}_tsDiagnosticCategoryToMarkerSeverity(e){switch(e){case 1:return v.Error;case 3:return v.Info;case 0:return v.Warning;case 2:return v.Hint}return v.Info}}class C extends y{get triggerCharacters(){return["."]}async provideCompletionItems(e,t,o,i){const l=e.getWordUntilPosition(t),p=new O(t.lineNumber,l.startColumn,t.lineNumber,l.endColumn),n=e.uri,r=e.getOffsetAt(t),u=await this._worker(n);if(e.isDisposed())return;const d=await u.getCompletionsAtPosition(n.toString(),r);return!d||e.isDisposed()?void 0:{suggestions:d.entries.map(b=>{let m=p;if(b.replacementSpan){const x=e.getPositionAt(b.replacementSpan.start),D=e.getPositionAt(b.replacementSpan.start+b.replacementSpan.length);m=new O(x.lineNumber,x.column,D.lineNumber,D.column)}const k=[];return b.kindModifiers!==void 0&&b.kindModifiers.indexOf("deprecated")!==-1&&k.push(f.CompletionItemTag.Deprecated),{uri:n,position:t,offset:r,range:m,label:b.name,insertText:b.name,sortText:b.sortText,kind:C.convertKind(b.kind),tags:k}})}}async resolveCompletionItem(e,t){const o=e,i=o.uri,l=o.position,p=o.offset,r=await(await this._worker(i)).getCompletionEntryDetails(i.toString(),p,o.label);return r?{uri:i,position:l,label:r.name,kind:C.convertKind(r.kind),detail:_(r.displayParts),documentation:{value:C.createDocumentationString(r)}}:o}static convertKind(e){switch(e){case a.primitiveType:case a.keyword:return f.CompletionItemKind.Keyword;case a.variable:case a.localVariable:return f.CompletionItemKind.Variable;case a.memberVariable:case a.memberGetAccessor:case a.memberSetAccessor:return f.CompletionItemKind.Field;case a.function:case a.memberFunction:case a.constructSignature:case a.callSignature:case a.indexSignature:return f.CompletionItemKind.Function;case a.enum:return f.CompletionItemKind.Enum;case a.module:return f.CompletionItemKind.Module;case a.class:return f.CompletionItemKind.Class;case a.interface:return f.CompletionItemKind.Interface;case a.warning:return f.CompletionItemKind.File}return f.CompletionItemKind.Property}static createDocumentationString(e){let t=_(e.documentation);if(e.tags)for(const o of e.tags)t+=`
3
+ `)})}),o}_tsDiagnosticCategoryToMarkerSeverity(e){switch(e){case 1:return v.Error;case 3:return v.Info;case 0:return v.Warning;case 2:return v.Hint}return v.Info}}class C extends y{get triggerCharacters(){return["."]}async provideCompletionItems(e,t,o,i){const l=e.getWordUntilPosition(t),p=new O(t.lineNumber,l.startColumn,t.lineNumber,l.endColumn),n=e.uri,r=e.getOffsetAt(t),u=await this._worker(n);if(e.isDisposed())return;const d=await u.getCompletionsAtPosition(n.toString(),r);return!d||e.isDisposed()?void 0:{suggestions:d.entries.map(m=>{let b=p;if(m.replacementSpan){const x=e.getPositionAt(m.replacementSpan.start),D=e.getPositionAt(m.replacementSpan.start+m.replacementSpan.length);b=new O(x.lineNumber,x.column,D.lineNumber,D.column)}const k=[];return m.kindModifiers!==void 0&&m.kindModifiers.indexOf("deprecated")!==-1&&k.push(f.CompletionItemTag.Deprecated),{uri:n,position:t,offset:r,range:b,label:m.name,insertText:m.name,sortText:m.sortText,kind:C.convertKind(m.kind),tags:k}})}}async resolveCompletionItem(e,t){const o=e,i=o.uri,l=o.position,p=o.offset,r=await(await this._worker(i)).getCompletionEntryDetails(i.toString(),p,o.label);return r?{uri:i,position:l,label:r.name,kind:C.convertKind(r.kind),detail:_(r.displayParts),documentation:{value:C.createDocumentationString(r)}}:o}static convertKind(e){switch(e){case a.primitiveType:case a.keyword:return f.CompletionItemKind.Keyword;case a.variable:case a.localVariable:return f.CompletionItemKind.Variable;case a.memberVariable:case a.memberGetAccessor:case a.memberSetAccessor:return f.CompletionItemKind.Field;case a.function:case a.memberFunction:case a.constructSignature:case a.callSignature:case a.indexSignature:return f.CompletionItemKind.Function;case a.enum:return f.CompletionItemKind.Enum;case a.module:return f.CompletionItemKind.Module;case a.class:return f.CompletionItemKind.Class;case a.interface:return f.CompletionItemKind.Interface;case a.warning:return f.CompletionItemKind.File}return f.CompletionItemKind.Property}static createDocumentationString(e){let t=_(e.documentation);if(e.tags)for(const o of e.tags)t+=`
4
4
 
5
- ${N(o)}`;return t}}function N(c){let e=`*@${c.name}*`;if(c.name==="param"&&c.text){const[t,...o]=c.text;e+=`\`${t.text}\``,o.length>0&&(e+=` — ${o.map(i=>i.text).join(" ")}`)}else Array.isArray(c.text)?e+=` — ${c.text.map(t=>t.text).join(" ")}`:c.text&&(e+=` — ${c.text}`);return e}class I extends y{constructor(){super(...arguments),this.signatureHelpTriggerCharacters=["(",","]}static _toSignatureHelpTriggerReason(e){switch(e.triggerKind){case f.SignatureHelpTriggerKind.TriggerCharacter:return e.triggerCharacter?e.isRetrigger?{kind:"retrigger",triggerCharacter:e.triggerCharacter}:{kind:"characterTyped",triggerCharacter:e.triggerCharacter}:{kind:"invoked"};case f.SignatureHelpTriggerKind.ContentChange:return e.isRetrigger?{kind:"retrigger"}:{kind:"invoked"};case f.SignatureHelpTriggerKind.Invoke:default:return{kind:"invoked"}}}async provideSignatureHelp(e,t,o,i){const l=e.uri,p=e.getOffsetAt(t),n=await this._worker(l);if(e.isDisposed())return;const r=await n.getSignatureHelpItems(l.toString(),p,{triggerReason:I._toSignatureHelpTriggerReason(i)});if(!r||e.isDisposed())return;const u={activeSignature:r.selectedItemIndex,activeParameter:r.argumentIndex,signatures:[]};return r.items.forEach(d=>{const g={label:"",parameters:[]};g.documentation={value:_(d.documentation)},g.label+=_(d.prefixDisplayParts),d.parameters.forEach((b,m,k)=>{const x=_(b.displayParts),D={label:x,documentation:{value:_(b.documentation)}};g.label+=x,g.parameters.push(D),m<k.length-1&&(g.label+=_(d.separatorDisplayParts))}),g.label+=_(d.suffixDisplayParts),u.signatures.push(g)}),{value:u,dispose(){}}}}class W extends y{async provideHover(e,t,o){const i=e.uri,l=e.getOffsetAt(t),p=await this._worker(i);if(e.isDisposed())return;const n=await p.getQuickInfoAtPosition(i.toString(),l);if(!n||e.isDisposed())return;const r=_(n.documentation),u=n.tags?n.tags.map(g=>N(g)).join(`
5
+ ${N(o)}`;return t}}function N(c){let e=`*@${c.name}*`;if(c.name==="param"&&c.text){const[t,...o]=c.text;e+=`\`${t.text}\``,o.length>0&&(e+=` — ${o.map(i=>i.text).join(" ")}`)}else Array.isArray(c.text)?e+=` — ${c.text.map(t=>t.text).join(" ")}`:c.text&&(e+=` — ${c.text}`);return e}class I extends y{constructor(){super(...arguments),this.signatureHelpTriggerCharacters=["(",","]}static _toSignatureHelpTriggerReason(e){switch(e.triggerKind){case f.SignatureHelpTriggerKind.TriggerCharacter:return e.triggerCharacter?e.isRetrigger?{kind:"retrigger",triggerCharacter:e.triggerCharacter}:{kind:"characterTyped",triggerCharacter:e.triggerCharacter}:{kind:"invoked"};case f.SignatureHelpTriggerKind.ContentChange:return e.isRetrigger?{kind:"retrigger"}:{kind:"invoked"};case f.SignatureHelpTriggerKind.Invoke:default:return{kind:"invoked"}}}async provideSignatureHelp(e,t,o,i){const l=e.uri,p=e.getOffsetAt(t),n=await this._worker(l);if(e.isDisposed())return;const r=await n.getSignatureHelpItems(l.toString(),p,{triggerReason:I._toSignatureHelpTriggerReason(i)});if(!r||e.isDisposed())return;const u={activeSignature:r.selectedItemIndex,activeParameter:r.argumentIndex,signatures:[]};return r.items.forEach(d=>{const g={label:"",parameters:[]};g.documentation={value:_(d.documentation)},g.label+=_(d.prefixDisplayParts),d.parameters.forEach((m,b,k)=>{const x=_(m.displayParts),D={label:x,documentation:{value:_(m.documentation)}};g.label+=x,g.parameters.push(D),b<k.length-1&&(g.label+=_(d.separatorDisplayParts))}),g.label+=_(d.suffixDisplayParts),u.signatures.push(g)}),{value:u,dispose(){}}}}class W extends y{async provideHover(e,t,o){const i=e.uri,l=e.getOffsetAt(t),p=await this._worker(i);if(e.isDisposed())return;const n=await p.getQuickInfoAtPosition(i.toString(),l);if(!n||e.isDisposed())return;const r=_(n.documentation),u=n.tags?n.tags.map(g=>N(g)).join(`
6
6
 
7
7
  `):"",d=_(n.displayParts);return{range:this._textSpanToRange(e,n.textSpan),contents:[{value:"```typescript\n"+d+"\n```\n"},{value:r+(u?`
8
8
 
9
9
  `+u:"")}]}}}class j extends y{async provideDocumentHighlights(e,t,o){const i=e.uri,l=e.getOffsetAt(t),p=await this._worker(i);if(e.isDisposed())return;const n=await p.getDocumentHighlights(i.toString(),l,[i.toString()]);if(!(!n||e.isDisposed()))return n.flatMap(r=>r.highlightSpans.map(u=>({range:this._textSpanToRange(e,u.textSpan),kind:u.kind==="writtenReference"?f.DocumentHighlightKind.Write:f.DocumentHighlightKind.Text})))}}class B extends y{constructor(e,t){super(t),this._libFiles=e}async provideDefinition(e,t,o){const i=e.uri,l=e.getOffsetAt(t),p=await this._worker(i);if(e.isDisposed())return;const n=await p.getDefinitionAtPosition(i.toString(),l);if(!n||e.isDisposed()||(await this._libFiles.fetchLibFilesIfNecessary(n.map(u=>F.parse(u.fileName))),e.isDisposed()))return;const r=[];for(let u of n){const d=this._libFiles.getOrCreateModel(u.fileName);d&&r.push({uri:d.uri,range:this._textSpanToRange(d,u.textSpan)})}return r}}class U extends y{constructor(e,t){super(t),this._libFiles=e}async provideReferences(e,t,o,i){const l=e.uri,p=e.getOffsetAt(t),n=await this._worker(l);if(e.isDisposed())return;const r=await n.getReferencesAtPosition(l.toString(),p);if(!r||e.isDisposed()||(await this._libFiles.fetchLibFilesIfNecessary(r.map(d=>F.parse(d.fileName))),e.isDisposed()))return;const u=[];for(let d of r){const g=this._libFiles.getOrCreateModel(d.fileName);g&&u.push({uri:g.uri,range:this._textSpanToRange(g,d.textSpan)})}return u}}class $ extends y{async provideDocumentSymbols(e,t){const o=e.uri,i=await this._worker(o);if(e.isDisposed())return;const l=await i.getNavigationTree(o.toString());if(!l||e.isDisposed())return;const p=(r,u)=>({name:r.text,detail:"",kind:h[r.kind]||f.SymbolKind.Variable,range:this._textSpanToRange(e,r.spans[0]),selectionRange:this._textSpanToRange(e,r.spans[0]),tags:[],children:r.childItems?.map(g=>p(g,r.text)),containerName:u});return l.childItems?l.childItems.map(r=>p(r)):[]}}class a{}a.unknown="";a.keyword="keyword";a.script="script";a.module="module";a.class="class";a.interface="interface";a.type="type";a.enum="enum";a.variable="var";a.localVariable="local var";a.function="function";a.localFunction="local function";a.memberFunction="method";a.memberGetAccessor="getter";a.memberSetAccessor="setter";a.memberVariable="property";a.constructorImplementation="constructor";a.callSignature="call";a.indexSignature="index";a.constructSignature="construct";a.parameter="parameter";a.typeParameter="type parameter";a.primitiveType="primitive type";a.label="label";a.alias="alias";a.const="const";a.let="let";a.warning="warning";let h=Object.create(null);h[a.module]=f.SymbolKind.Module;h[a.class]=f.SymbolKind.Class;h[a.enum]=f.SymbolKind.Enum;h[a.interface]=f.SymbolKind.Interface;h[a.memberFunction]=f.SymbolKind.Method;h[a.memberVariable]=f.SymbolKind.Property;h[a.memberGetAccessor]=f.SymbolKind.Property;h[a.memberSetAccessor]=f.SymbolKind.Property;h[a.variable]=f.SymbolKind.Variable;h[a.const]=f.SymbolKind.Variable;h[a.localVariable]=f.SymbolKind.Variable;h[a.variable]=f.SymbolKind.Variable;h[a.function]=f.SymbolKind.Function;h[a.localFunction]=f.SymbolKind.Function;class S extends y{static _convertOptions(e){return{ConvertTabsToSpaces:e.insertSpaces,TabSize:e.tabSize,IndentSize:e.tabSize,IndentStyle:2,NewLineCharacter:`
10
10
  `,InsertSpaceAfterCommaDelimiter:!0,InsertSpaceAfterSemicolonInForStatements:!0,InsertSpaceBeforeAndAfterBinaryOperators:!0,InsertSpaceAfterKeywordsInControlFlowStatements:!0,InsertSpaceAfterFunctionKeywordForAnonymousFunctions:!0,InsertSpaceAfterOpeningAndBeforeClosingNonemptyParenthesis:!1,InsertSpaceAfterOpeningAndBeforeClosingNonemptyBrackets:!1,InsertSpaceAfterOpeningAndBeforeClosingTemplateStringBraces:!1,PlaceOpenBraceOnNewLineForControlBlocks:!1,PlaceOpenBraceOnNewLineForFunctions:!1}}_convertTextChanges(e,t){return{text:t.newText,range:this._textSpanToRange(e,t.span)}}}class z extends S{constructor(){super(...arguments),this.canFormatMultipleRanges=!1}async provideDocumentRangeFormattingEdits(e,t,o,i){const l=e.uri,p=e.getOffsetAt({lineNumber:t.startLineNumber,column:t.startColumn}),n=e.getOffsetAt({lineNumber:t.endLineNumber,column:t.endColumn}),r=await this._worker(l);if(e.isDisposed())return;const u=await r.getFormattingEditsForRange(l.toString(),p,n,S._convertOptions(o));if(!(!u||e.isDisposed()))return u.map(d=>this._convertTextChanges(e,d))}}class G extends S{get autoFormatTriggerCharacters(){return[";","}",`
11
- `]}async provideOnTypeFormattingEdits(e,t,o,i,l){const p=e.uri,n=e.getOffsetAt(t),r=await this._worker(p);if(e.isDisposed())return;const u=await r.getFormattingEditsAfterKeystroke(p.toString(),n,o,S._convertOptions(i));if(!(!u||e.isDisposed()))return u.map(d=>this._convertTextChanges(e,d))}}class J extends S{async provideCodeActions(e,t,o,i){const l=e.uri,p=e.getOffsetAt({lineNumber:t.startLineNumber,column:t.startColumn}),n=e.getOffsetAt({lineNumber:t.endLineNumber,column:t.endColumn}),r=S._convertOptions(e.getOptions()),u=o.markers.filter(m=>m.code).map(m=>m.code).map(Number),d=await this._worker(l);if(e.isDisposed())return;const g=await d.getCodeFixesAtPosition(l.toString(),p,n,u,r);return!g||e.isDisposed()?{actions:[],dispose:()=>{}}:{actions:g.filter(m=>m.changes.filter(k=>k.isNewFile).length===0).map(m=>this._tsCodeFixActionToMonacoCodeAction(e,o,m)),dispose:()=>{}}}_tsCodeFixActionToMonacoCodeAction(e,t,o){const i=[];for(const p of o.changes)for(const n of p.textChanges)i.push({resource:e.uri,versionId:void 0,textEdit:{range:this._textSpanToRange(e,n.span),text:n.newText}});return{title:o.description,edit:{edits:i},diagnostics:t.markers,kind:"quickfix"}}}class Q extends y{constructor(e,t){super(t),this._libFiles=e}async provideRenameEdits(e,t,o,i){const l=e.uri,p=l.toString(),n=e.getOffsetAt(t),r=await this._worker(l);if(e.isDisposed())return;const u=await r.getRenameInfo(p,n,{allowRenameOfImportPath:!1});if(u.canRename===!1)return{edits:[],rejectReason:u.localizedErrorMessage};if(u.fileToRename!==void 0)throw new Error("Renaming files is not supported.");const d=await r.findRenameLocations(p,n,!1,!1,!1);if(!d||e.isDisposed())return;const g=[];for(const b of d){const m=this._libFiles.getOrCreateModel(b.fileName);if(m)g.push({resource:m.uri,versionId:void 0,textEdit:{range:this._textSpanToRange(m,b.textSpan),text:o}});else throw new Error(`Unknown file ${b.fileName}.`)}return{edits:g}}}class q extends y{async provideInlayHints(e,t,o){const i=e.uri,l=i.toString(),p=e.getOffsetAt({lineNumber:t.startLineNumber,column:t.startColumn}),n=e.getOffsetAt({lineNumber:t.endLineNumber,column:t.endColumn}),r=await this._worker(i);return e.isDisposed()?null:{hints:(await r.provideInlayHints(l,p,n)).map(g=>({...g,label:g.text,position:e.getPositionAt(g.position),kind:this._convertHintKind(g.kind)})),dispose:()=>{}}}_convertHintKind(e){switch(e){case"Parameter":return f.InlayHintKind.Parameter;case"Type":return f.InlayHintKind.Type;default:return f.InlayHintKind.Type}}}let T,L;function De(c){L=R(c,"typescript")}function Fe(c){T=R(c,"javascript")}function Ae(){return new Promise((c,e)=>{if(!T)return e("JavaScript not registered!");c(T)})}function Te(){return new Promise((c,e)=>{if(!L)return e("TypeScript not registered!");c(L)})}function R(c,e){const t=[],o=new E(e,c),i=(...n)=>o.getLanguageServiceWorker(...n),l=new H(i);function p(){const{modeConfiguration:n}=c;X(t),n.completionItems&&t.push(f.registerCompletionItemProvider(e,new C(i))),n.signatureHelp&&t.push(f.registerSignatureHelpProvider(e,new I(i))),n.hovers&&t.push(f.registerHoverProvider(e,new W(i))),n.documentHighlights&&t.push(f.registerDocumentHighlightProvider(e,new j(i))),n.definitions&&t.push(f.registerDefinitionProvider(e,new B(l,i))),n.references&&t.push(f.registerReferenceProvider(e,new U(l,i))),n.documentSymbols&&t.push(f.registerDocumentSymbolProvider(e,new $(i))),n.rename&&t.push(f.registerRenameProvider(e,new Q(l,i))),n.documentRangeFormattingEdits&&t.push(f.registerDocumentRangeFormattingEditProvider(e,new z(i))),n.onTypeFormattingEdits&&t.push(f.registerOnTypeFormattingEditProvider(e,new G(i))),n.codeActions&&t.push(f.registerCodeActionProvider(e,new J(i))),n.inlayHints&&t.push(f.registerInlayHintsProvider(e,new q(i))),n.diagnostics&&t.push(new V(l,c,e,i))}return p(),i}function X(c){for(;c.length;)c.pop().dispose()}export{y as Adapter,J as CodeActionAdaptor,B as DefinitionAdapter,V as DiagnosticsAdapter,j as DocumentHighlightAdapter,z as FormatAdapter,S as FormatHelper,G as FormatOnTypeAdapter,q as InlayHintsAdapter,a as Kind,H as LibFiles,$ as OutlineAdapter,W as QuickInfoAdapter,U as ReferenceAdapter,Q as RenameAdapter,I as SignatureHelpAdapter,C as SuggestAdapter,E as WorkerManager,A as flattenDiagnosticMessageText,Ae as getJavaScriptWorker,Te as getTypeScriptWorker,Fe as setupJavaScript,De as setupTypeScript};
11
+ `]}async provideOnTypeFormattingEdits(e,t,o,i,l){const p=e.uri,n=e.getOffsetAt(t),r=await this._worker(p);if(e.isDisposed())return;const u=await r.getFormattingEditsAfterKeystroke(p.toString(),n,o,S._convertOptions(i));if(!(!u||e.isDisposed()))return u.map(d=>this._convertTextChanges(e,d))}}class J extends S{async provideCodeActions(e,t,o,i){const l=e.uri,p=e.getOffsetAt({lineNumber:t.startLineNumber,column:t.startColumn}),n=e.getOffsetAt({lineNumber:t.endLineNumber,column:t.endColumn}),r=S._convertOptions(e.getOptions()),u=o.markers.filter(b=>b.code).map(b=>b.code).map(Number),d=await this._worker(l);if(e.isDisposed())return;const g=await d.getCodeFixesAtPosition(l.toString(),p,n,u,r);return!g||e.isDisposed()?{actions:[],dispose:()=>{}}:{actions:g.filter(b=>b.changes.filter(k=>k.isNewFile).length===0).map(b=>this._tsCodeFixActionToMonacoCodeAction(e,o,b)),dispose:()=>{}}}_tsCodeFixActionToMonacoCodeAction(e,t,o){const i=[];for(const p of o.changes)for(const n of p.textChanges)i.push({resource:e.uri,versionId:void 0,textEdit:{range:this._textSpanToRange(e,n.span),text:n.newText}});return{title:o.description,edit:{edits:i},diagnostics:t.markers,kind:"quickfix"}}}class Q extends y{constructor(e,t){super(t),this._libFiles=e}async provideRenameEdits(e,t,o,i){const l=e.uri,p=l.toString(),n=e.getOffsetAt(t),r=await this._worker(l);if(e.isDisposed())return;const u=await r.getRenameInfo(p,n,{allowRenameOfImportPath:!1});if(u.canRename===!1)return{edits:[],rejectReason:u.localizedErrorMessage};if(u.fileToRename!==void 0)throw new Error("Renaming files is not supported.");const d=await r.findRenameLocations(p,n,!1,!1,!1);if(!d||e.isDisposed())return;const g=[];for(const m of d){const b=this._libFiles.getOrCreateModel(m.fileName);if(b)g.push({resource:b.uri,versionId:void 0,textEdit:{range:this._textSpanToRange(b,m.textSpan),text:o}});else throw new Error(`Unknown file ${m.fileName}.`)}return{edits:g}}}class q extends y{async provideInlayHints(e,t,o){const i=e.uri,l=i.toString(),p=e.getOffsetAt({lineNumber:t.startLineNumber,column:t.startColumn}),n=e.getOffsetAt({lineNumber:t.endLineNumber,column:t.endColumn}),r=await this._worker(i);return e.isDisposed()?null:{hints:(await r.provideInlayHints(l,p,n)).map(g=>({...g,label:g.text,position:e.getPositionAt(g.position),kind:this._convertHintKind(g.kind)})),dispose:()=>{}}}_convertHintKind(e){switch(e){case"Parameter":return f.InlayHintKind.Parameter;case"Type":return f.InlayHintKind.Type;default:return f.InlayHintKind.Type}}}let T,L;function He(c){L=R(c,"typescript")}function Ve(c){T=R(c,"javascript")}function We(){return new Promise((c,e)=>{if(!T)return e("JavaScript not registered!");c(T)})}function je(){return new Promise((c,e)=>{if(!L)return e("TypeScript not registered!");c(L)})}function R(c,e){const t=[],o=new E(e,c),i=(...n)=>o.getLanguageServiceWorker(...n),l=new H(i);function p(){const{modeConfiguration:n}=c;X(t),n.completionItems&&t.push(f.registerCompletionItemProvider(e,new C(i))),n.signatureHelp&&t.push(f.registerSignatureHelpProvider(e,new I(i))),n.hovers&&t.push(f.registerHoverProvider(e,new W(i))),n.documentHighlights&&t.push(f.registerDocumentHighlightProvider(e,new j(i))),n.definitions&&t.push(f.registerDefinitionProvider(e,new B(l,i))),n.references&&t.push(f.registerReferenceProvider(e,new U(l,i))),n.documentSymbols&&t.push(f.registerDocumentSymbolProvider(e,new $(i))),n.rename&&t.push(f.registerRenameProvider(e,new Q(l,i))),n.documentRangeFormattingEdits&&t.push(f.registerDocumentRangeFormattingEditProvider(e,new z(i))),n.onTypeFormattingEdits&&t.push(f.registerOnTypeFormattingEditProvider(e,new G(i))),n.codeActions&&t.push(f.registerCodeActionProvider(e,new J(i))),n.inlayHints&&t.push(f.registerInlayHintsProvider(e,new q(i))),n.diagnostics&&t.push(new V(l,c,e,i))}return p(),i}function X(c){for(;c.length;)c.pop().dispose()}export{y as Adapter,J as CodeActionAdaptor,B as DefinitionAdapter,V as DiagnosticsAdapter,j as DocumentHighlightAdapter,z as FormatAdapter,S as FormatHelper,G as FormatOnTypeAdapter,q as InlayHintsAdapter,a as Kind,H as LibFiles,$ as OutlineAdapter,W as QuickInfoAdapter,U as ReferenceAdapter,Q as RenameAdapter,I as SignatureHelpAdapter,C as SuggestAdapter,E as WorkerManager,A as flattenDiagnosticMessageText,We as getJavaScriptWorker,je as getTypeScriptWorker,Ve as setupJavaScript,He as setupTypeScript};
@@ -0,0 +1 @@
1
+ import{l as e}from"./monaco-BuDK9Fat.js";import"./EditableTaskTitle-mHT39coo.js";import"./index-CMJV-mgF.js";import"./mermaid-NOHMQCX5-C72362la.js";import"./agent-meta-MzuGtqxl.js";import"./use-attachments-EypT-7PI.js";import"./chevron-down-BaQEBzp3.js";import"./use-providers-DB9ghBPq.js";import"./AgentLogo-BDyW3ihb.js";import"./MemberAvatar-CCRbS97s.js";import"./chevron-up-D0y6skqr.js";import"./arrow-down-BVePf1ZM.js";import"./at-sign-BE17rU5b.js";import"./paperclip-BOSklTt7.js";import"./task-priority-acVgTiil.js";import"./check-qs0S_9rB.js";import"./useTokenUsage-4qTDa8SY.js";import"./CreateTaskInput-GLF3Oyc1.js";import"./use-projects-DI27nNwl.js";import"./trash-2-Bc-URu8c.js";import"./ExecutionPermissionSelector-DeeNd4Kh.js";import"./BrandLogo-YGT4Vlw5.js";import"./gauge-CPlvCZUV.js";import"./confirm-dialog-BrgNTypL.js";import"./modal-DeigO7aN.js";import"./select-DKS02St6.js";import"./layers-Dda7MM7a.js";import"./message-square-CFriSt4D.js";import"./textarea-Ft9KMoEI.js";import"./play-Mxkwq69n.js";import"./server-DJaSJ9m1.js";import"./task-CDYaC_No.js";import"./status-styles-sQm4KLdp.js";import"./copy-DejkmIHZ.js";import"./use-workspaces-d4n9m9cX.js";import"./circle-alert-Cbvy2cMo.js";import"./upload-C9Z4jLtv.js";import"./globe-CD4g63c9.js";import"./BranchSelect-Dmp5hq0i.js";import"./useNormalizedLogs-DRoPbP0w.js";import"./pencil-BRQ9W_a-.js";const W={wordPattern:/(-?\d*\.\d\w*)|([^\`\~\!\@\#\%\^\&\*\(\)\-\=\+\[\{\]\}\\\|\;\:\'\"\,\.\<\>\/\?\s]+)/g,comments:{lineComment:"//",blockComment:["/*","*/"]},brackets:[["{","}"],["[","]"],["(",")"]],onEnterRules:[{beforeText:/^\s*\/\*\*(?!\/)([^\*]|\*(?!\/))*$/,afterText:/^\s*\*\/$/,action:{indentAction:e.IndentAction.IndentOutdent,appendText:" * "}},{beforeText:/^\s*\/\*\*(?!\/)([^\*]|\*(?!\/))*$/,action:{indentAction:e.IndentAction.None,appendText:" * "}},{beforeText:/^(\t|(\ \ ))*\ \*(\ ([^\*]|\*(?!\/))*)?$/,action:{indentAction:e.IndentAction.None,appendText:"* "}},{beforeText:/^(\t|(\ \ ))*\ \*\/\s*$/,action:{indentAction:e.IndentAction.None,removeText:1}}],autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"',notIn:["string"]},{open:"'",close:"'",notIn:["string","comment"]},{open:"`",close:"`",notIn:["string","comment"]},{open:"/**",close:" */",notIn:["string"]}],folding:{markers:{start:new RegExp("^\\s*//\\s*#?region\\b"),end:new RegExp("^\\s*//\\s*#?endregion\\b")}}},X={defaultToken:"invalid",tokenPostfix:".ts",keywords:["abstract","any","as","asserts","bigint","boolean","break","case","catch","class","continue","const","constructor","debugger","declare","default","delete","do","else","enum","export","extends","false","finally","for","from","function","get","if","implements","import","in","infer","instanceof","interface","is","keyof","let","module","namespace","never","new","null","number","object","out","package","private","protected","public","override","readonly","require","global","return","satisfies","set","static","string","super","switch","symbol","this","throw","true","try","type","typeof","undefined","unique","unknown","var","void","while","with","yield","async","await","of"],operators:["<=",">=","==","!=","===","!==","=>","+","-","**","*","/","%","++","--","<<","</",">>",">>>","&","|","^","!","~","&&","||","??","?",":","=","+=","-=","*=","**=","/=","%=","<<=",">>=",">>>=","&=","|=","^=","@"],symbols:/[=><!~?:&|+\-*\/\^%]+/,escapes:/\\(?:[abfnrtv\\"']|x[0-9A-Fa-f]{1,4}|u[0-9A-Fa-f]{4}|U[0-9A-Fa-f]{8})/,digits:/\d+(_+\d+)*/,octaldigits:/[0-7]+(_+[0-7]+)*/,binarydigits:/[0-1]+(_+[0-1]+)*/,hexdigits:/[[0-9a-fA-F]+(_+[0-9a-fA-F]+)*/,regexpctl:/[(){}\[\]\$\^|\-*+?\.]/,regexpesc:/\\(?:[bBdDfnrstvwWn0\\\/]|@regexpctl|c[A-Z]|x[0-9a-fA-F]{2}|u[0-9a-fA-F]{4})/,tokenizer:{root:[[/[{}]/,"delimiter.bracket"],{include:"common"}],common:[[/#?[a-z_$][\w$]*/,{cases:{"@keywords":"keyword","@default":"identifier"}}],[/[A-Z][\w\$]*/,"type.identifier"],{include:"@whitespace"},[/\/(?=([^\\\/]|\\.)+\/([dgimsuy]*)(\s*)(\.|;|,|\)|\]|\}|$))/,{token:"regexp",bracket:"@open",next:"@regexp"}],[/[()\[\]]/,"@brackets"],[/[<>](?!@symbols)/,"@brackets"],[/!(?=([^=]|$))/,"delimiter"],[/@symbols/,{cases:{"@operators":"delimiter","@default":""}}],[/(@digits)[eE]([\-+]?(@digits))?/,"number.float"],[/(@digits)\.(@digits)([eE][\-+]?(@digits))?/,"number.float"],[/0[xX](@hexdigits)n?/,"number.hex"],[/0[oO]?(@octaldigits)n?/,"number.octal"],[/0[bB](@binarydigits)n?/,"number.binary"],[/(@digits)n?/,"number"],[/[;,.]/,"delimiter"],[/"([^"\\]|\\.)*$/,"string.invalid"],[/'([^'\\]|\\.)*$/,"string.invalid"],[/"/,"string","@string_double"],[/'/,"string","@string_single"],[/`/,"string","@string_backtick"]],whitespace:[[/[ \t\r\n]+/,""],[/\/\*\*(?!\/)/,"comment.doc","@jsdoc"],[/\/\*/,"comment","@comment"],[/\/\/.*$/,"comment"]],comment:[[/[^\/*]+/,"comment"],[/\*\//,"comment","@pop"],[/[\/*]/,"comment"]],jsdoc:[[/[^\/*]+/,"comment.doc"],[/\*\//,"comment.doc","@pop"],[/[\/*]/,"comment.doc"]],regexp:[[/(\{)(\d+(?:,\d*)?)(\})/,["regexp.escape.control","regexp.escape.control","regexp.escape.control"]],[/(\[)(\^?)(?=(?:[^\]\\\/]|\\.)+)/,["regexp.escape.control",{token:"regexp.escape.control",next:"@regexrange"}]],[/(\()(\?:|\?=|\?!)/,["regexp.escape.control","regexp.escape.control"]],[/[()]/,"regexp.escape.control"],[/@regexpctl/,"regexp.escape.control"],[/[^\\\/]/,"regexp"],[/@regexpesc/,"regexp.escape"],[/\\\./,"regexp.invalid"],[/(\/)([dgimsuy]*)/,[{token:"regexp",bracket:"@close",next:"@pop"},"keyword.other"]]],regexrange:[[/-/,"regexp.escape.control"],[/\^/,"regexp.invalid"],[/@regexpesc/,"regexp.escape"],[/[^\]]/,"regexp"],[/\]/,{token:"regexp.escape.control",next:"@pop",bracket:"@close"}]],string_double:[[/[^\\"]+/,"string"],[/@escapes/,"string.escape"],[/\\./,"string.escape.invalid"],[/"/,"string","@pop"]],string_single:[[/[^\\']+/,"string"],[/@escapes/,"string.escape"],[/\\./,"string.escape.invalid"],[/'/,"string","@pop"]],string_backtick:[[/\$\{/,{token:"delimiter.bracket",next:"@bracketCounting"}],[/[^\\`$]+/,"string"],[/@escapes/,"string.escape"],[/\\./,"string.escape.invalid"],[/`/,"string","@pop"]],bracketCounting:[[/\{/,"delimiter.bracket","@bracketCounting"],[/\}/,"delimiter.bracket","@pop"],{include:"common"}]}};export{W as conf,X as language};
@@ -1 +1 @@
1
- import{k as a}from"./index-ClhIruws.js";const o=[["path",{d:"M12 3v12",key:"1x0j5s"}],["path",{d:"m17 8-5-5-5 5",key:"7q97r8"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}]],t=a("upload",o);export{t as U};
1
+ import{c as a}from"./index-CMJV-mgF.js";const o=[["path",{d:"M12 3v12",key:"1x0j5s"}],["path",{d:"m17 8-5-5-5 5",key:"7q97r8"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}]],t=a("upload",o);export{t as U};
@@ -0,0 +1,2 @@
1
+ import{c as j,j as a,E as y,X as I,Q as g,r as d,m as v,p as $}from"./index-CMJV-mgF.js";import{F as k}from"./agent-meta-MzuGtqxl.js";const N=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",ry:"2",key:"1m3agn"}],["circle",{cx:"9",cy:"9",r:"2",key:"af1f0g"}],["path",{d:"m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21",key:"1xmnt7"}]],A=j("image",N);function L({content:t,children:e,className:r="",side:c="top",align:i="center"}){const p=c==="bottom"?"top-full mt-2":"bottom-full mb-2",h=c==="bottom"?"bottom-full border-b-neutral-900":"top-full border-t-neutral-900",x=i==="start"?"left-0":i==="end"?"right-0":"left-1/2 -translate-x-1/2",f=i==="start"?"left-4":i==="end"?"right-4":"left-1/2 -translate-x-1/2";return a.jsxs("div",{className:`group/tooltip relative inline-block ${r}`,children:[e,a.jsxs("div",{className:`invisible absolute ${p} ${x} max-w-[260px] px-3 py-2 bg-neutral-900 text-white text-xs leading-relaxed rounded-lg opacity-0 group-hover/tooltip:visible group-hover/tooltip:opacity-100 group-focus-within/tooltip:visible group-focus-within/tooltip:opacity-100 transition-opacity pointer-events-none whitespace-normal z-[100] shadow-lg`,children:[t,a.jsx("div",{className:`absolute ${h} ${f} border-4 border-transparent`})]})]})}const F=g();function C(t){return t<1024?`${t}B`:t<1024*1024?`${(t/1024).toFixed(1)}KB`:`${(t/(1024*1024)).toFixed(1)}MB`}function _({files:t,onRemove:e}){return t.length===0?null:a.jsx("div",{"aria-label":"Attachments",className:"flex flex-wrap gap-2 px-4 pt-3 pb-1",children:t.map(r=>a.jsx(E,{item:r,onRemove:e},r.tempId))})}function E({item:t,onRemove:e}){const r=t.file.type.startsWith("image/"),c=t.status==="error",i=t.status==="uploading";return a.jsxs("div",{className:`relative group flex items-center gap-2 px-3 py-2 rounded-lg border text-xs max-w-[200px] ${c?"border-red-200 bg-red-50 text-red-600":"border-neutral-200 bg-neutral-50 text-neutral-700"}`,children:[r&&t.status==="done"&&t.attachment?a.jsx("img",{src:`${F}${t.attachment.url}`,alt:t.file.name,className:"w-8 h-8 rounded object-cover flex-shrink-0"}):a.jsx("span",{className:"flex-shrink-0",children:i?a.jsx(y,{size:16,className:"animate-spin text-neutral-400"}):r?a.jsx(A,{size:16,className:"text-neutral-400"}):a.jsx(k,{size:16,className:"text-neutral-400"})}),a.jsxs("div",{className:"min-w-0 flex-1",children:[a.jsx("div",{className:"truncate font-medium",children:t.file.name}),c?a.jsx("div",{className:"truncate text-red-500",children:t.error}):a.jsx("div",{className:"text-neutral-400",children:C(t.file.size)})]}),a.jsx("button",{onClick:()=>e(t.tempId),className:"absolute -top-1.5 -right-1.5 hidden group-hover:flex items-center justify-center w-5 h-5 rounded-full bg-neutral-700 text-white hover:bg-neutral-900 transition-colors",children:a.jsx(I,{size:10})})]})}const P=g();async function S(t){const e=new FormData;e.append("file",t);const r=await fetch(`${P}/attachments/upload`,{method:"POST",body:e});if(!r.ok){const c=await r.json().catch(()=>({}));throw new Error(c.error||`Upload failed (${r.status})`)}return r.json()}let z=0;function T(){const[t,e]=d.useState([]),r=d.useRef(t);r.current=t;const c=d.useCallback(async s=>{const o=s.map(n=>({tempId:`tmp-${++z}`,file:n,progress:0,status:"uploading"}));e(n=>[...n,...o]),await Promise.allSettled(o.map(async n=>{try{const m=await S(n.file);e(u=>u.map(l=>l.tempId===n.tempId?{...l,status:"done",progress:100,attachment:m}:l))}catch(m){e(u=>u.map(l=>l.tempId===n.tempId?{...l,status:"error",error:m instanceof Error?m.message:"Upload failed"}:l))}}))},[]),i=d.useCallback(()=>r.current.filter(s=>s.status==="done"&&s.attachment).map(s=>s.attachment),[]),p=d.useCallback(s=>{e(o=>o.filter(n=>n.tempId!==s))},[]),h=d.useCallback(()=>{e([])},[]),x=d.useCallback(s=>{s.length!==0&&e(o=>{const n=new Set(o.map(u=>u.attachment?.id??u.tempId)),m=s.filter(u=>{const l=u.attachment?.id??u.tempId;return n.has(l)?!1:(n.add(l),!0)});return m.length>0?[...o,...m]:o})},[]),f=d.useCallback(()=>{const s=i();return s.length===0?"":s.map(o=>`${o.mimeType.startsWith("image/")?"!":""}[${o.originalName}](${o.storagePath})`).join(`
2
+ `)},[i]),b=t.length>0,w=t.some(s=>s.status==="uploading");return{files:t,addFiles:c,removeFile:p,clear:h,restoreFiles:x,buildMarkdownLinks:f,getDoneAttachments:i,hasFiles:b,isUploading:w}}function M(t){const e=d.useMemo(()=>Array.from(new Set(t.filter(Boolean))),[t]);return v({queryKey:["attachments","metadata",e],queryFn:()=>$.get("/attachments/metadata",{params:{ids:e.join(",")}}),enabled:e.length>0,staleTime:300*1e3})}export{_ as A,A as I,L as T,M as a,T as u};
@@ -1 +1 @@
1
- import{m as n,o as i,n as a,q as s,p as r}from"./index-ClhIruws.js";function f(){return n({queryKey:s.profiles.all,queryFn:()=>r.get("/profiles")})}function y(){return n({queryKey:s.profiles.defaults,queryFn:()=>r.get("/profiles/defaults")})}function c(e){return n({queryKey:s.profiles.agent(e),queryFn:()=>r.get(`/profiles/${e}`),enabled:!!e})}function p(){const e=i();return a({mutationFn:({agentType:u,variant:t,config:l})=>r.put(`/profiles/${u}/${t}`,l),onSuccess:()=>{e.invalidateQueries({queryKey:s.profiles.all})}})}function q(){const e=i();return a({mutationFn:({agentType:u,variant:t})=>r.delete(`/profiles/${u}/${t}`),onSuccess:()=>{e.invalidateQueries({queryKey:s.profiles.all})}})}export{y as a,p as b,q as c,c as d,f as u};
1
+ import{m as n,o as i,n as a,q as s,p as r}from"./index-CMJV-mgF.js";function f(){return n({queryKey:s.profiles.all,queryFn:()=>r.get("/profiles")})}function y(){return n({queryKey:s.profiles.defaults,queryFn:()=>r.get("/profiles/defaults")})}function c(e){return n({queryKey:s.profiles.agent(e),queryFn:()=>r.get(`/profiles/${e}`),enabled:!!e})}function p(){const e=i();return a({mutationFn:({agentType:u,variant:t,config:l})=>r.put(`/profiles/${u}/${t}`,l),onSuccess:()=>{e.invalidateQueries({queryKey:s.profiles.all})}})}function q(){const e=i();return a({mutationFn:({agentType:u,variant:t})=>r.delete(`/profiles/${u}/${t}`),onSuccess:()=>{e.invalidateQueries({queryKey:s.profiles.all})}})}export{y as a,p as b,q as c,c as d,f as u};
@@ -0,0 +1 @@
1
+ import{m as n,o as s,n as u,q as r,p as a}from"./index-CMJV-mgF.js";function c(e){const t={};return e?.page!=null&&(t.page=String(e.page)),e?.limit!=null&&(t.limit=String(e.limit)),e?.includeArchived&&(t.includeArchived="true"),n({queryKey:r.projects.list(e),queryFn:()=>a.get("/projects",{params:t})})}function o(e){return n({queryKey:r.projects.detail(e),queryFn:()=>a.get(`/projects/${e}`),enabled:!!e})}function y(){const e=s();return u({mutationFn:t=>a.post("/projects",t),onSuccess:()=>{e.invalidateQueries({queryKey:r.projects.all})}})}function d(){const e=s();return u({mutationFn:({id:t,...i})=>a.put(`/projects/${t}`,i),onSuccess:(t,i)=>{e.invalidateQueries({queryKey:r.projects.all}),e.invalidateQueries({queryKey:r.projects.detail(i.id)}),i.mainBranch!==void 0&&(e.invalidateQueries({queryKey:r.workspaces.all}),e.invalidateQueries({queryKey:r.tasks.all}))}})}function p(){const e=s();return u({mutationFn:({id:t,deleteRepo:i})=>a.post(`/projects/${t}/archive`,{deleteRepo:i??!1}),onSuccess:(t,i)=>{e.invalidateQueries({queryKey:r.projects.all}),e.invalidateQueries({queryKey:r.projects.detail(i.id)}),e.invalidateQueries({queryKey:r.tasks.all}),e.invalidateQueries({queryKey:r.workspaces.all})}})}function q(){const e=s();return u({mutationFn:({id:t,repoPath:i})=>a.post(`/projects/${t}/restore`,i?{repoPath:i}:{}),onSuccess:(t,i)=>{e.invalidateQueries({queryKey:r.projects.all}),e.invalidateQueries({queryKey:r.projects.detail(i.id)}),e.invalidateQueries({queryKey:r.tasks.all}),e.invalidateQueries({queryKey:r.workspaces.all})}})}function j(){const e=s();return u({mutationFn:({id:t})=>a.get(`/projects/${t}/git-capability`),onSuccess:(t,i)=>{e.setQueryData(r.projects.gitCapability(i.id),t),e.invalidateQueries({queryKey:r.projects.all}),e.invalidateQueries({queryKey:r.projects.detail(i.id)}),e.invalidateQueries({queryKey:r.tasks.all})}})}export{c as a,p as b,q as c,j as d,y as e,o as f,d as u};
@@ -1 +1 @@
1
- import{m as p,n as u,o as a,q as t,p as s}from"./index-ClhIruws.js";function l(){return p({queryKey:t.providers.all,queryFn:()=>s.get("/providers")})}function c(e,r,i){const n=r?.trim()||void 0;return p({queryKey:t.providers.capabilities(e,n,i?.providerId,i?.runtimeType,i?.config,i?.settings),queryFn:()=>{if(i?.config!==void 0)return s.post("/providers/capabilities",{agentType:e,model:n,providerId:i.providerId,runtimeType:i.runtimeType,config:i.config,settings:i.settings});const o=new URLSearchParams;e&&o.set("agentType",e),n&&o.set("model",n),i?.providerId&&o.set("providerId",i.providerId),i?.runtimeType&&o.set("runtimeType",i.runtimeType);const d=o.toString();return s.get(`/providers/capabilities${d?`?${d}`:""}`)},staleTime:300*1e3})}function m(){const e=a();return u({mutationFn:r=>s.post("/providers",r),onSuccess:r=>{e.setQueryData(t.providers.detail(r.id),r),e.invalidateQueries({queryKey:t.providers.all})}})}function y(){const e=a();return u({mutationFn:({id:r,data:i})=>s.put(`/providers/${r}`,i),onSuccess:r=>{e.setQueryData(t.providers.detail(r.id),r),e.invalidateQueries({queryKey:t.providers.all}),e.invalidateQueries({queryKey:t.providers.detail(r.id)})}})}function f(){return u({mutationFn:e=>s.post("/providers/test",e)})}function q(){const e=a();return u({mutationFn:r=>s.delete(`/providers/${r}`),onSuccess:()=>{e.invalidateQueries({queryKey:t.providers.all})}})}function P(){return u({mutationFn:()=>s.get("/providers/backup")})}function g(){return u({mutationFn:e=>s.post("/providers/import/preview",e)})}function F(){const e=a();return u({mutationFn:r=>s.post("/providers/import",r),onSuccess:()=>{e.invalidateQueries({queryKey:t.providers.all})}})}export{f as a,c as b,m as c,y as d,q as e,P as f,g,F as h,l as u};
1
+ import{m as p,n as u,o as a,q as t,p as s}from"./index-CMJV-mgF.js";function l(){return p({queryKey:t.providers.all,queryFn:()=>s.get("/providers")})}function c(e,r,i){const n=r?.trim()||void 0;return p({queryKey:t.providers.capabilities(e,n,i?.providerId,i?.runtimeType,i?.config,i?.settings),queryFn:()=>{if(i?.config!==void 0)return s.post("/providers/capabilities",{agentType:e,model:n,providerId:i.providerId,runtimeType:i.runtimeType,config:i.config,settings:i.settings});const o=new URLSearchParams;e&&o.set("agentType",e),n&&o.set("model",n),i?.providerId&&o.set("providerId",i.providerId),i?.runtimeType&&o.set("runtimeType",i.runtimeType);const d=o.toString();return s.get(`/providers/capabilities${d?`?${d}`:""}`)},staleTime:300*1e3})}function m(){const e=a();return u({mutationFn:r=>s.post("/providers",r),onSuccess:r=>{e.setQueryData(t.providers.detail(r.id),r),e.invalidateQueries({queryKey:t.providers.all})}})}function y(){const e=a();return u({mutationFn:({id:r,data:i})=>s.put(`/providers/${r}`,i),onSuccess:r=>{e.setQueryData(t.providers.detail(r.id),r),e.invalidateQueries({queryKey:t.providers.all}),e.invalidateQueries({queryKey:t.providers.detail(r.id)})}})}function f(){return u({mutationFn:e=>s.post("/providers/test",e)})}function q(){const e=a();return u({mutationFn:r=>s.delete(`/providers/${r}`),onSuccess:()=>{e.invalidateQueries({queryKey:t.providers.all})}})}function P(){return u({mutationFn:()=>s.get("/providers/backup")})}function g(){return u({mutationFn:e=>s.post("/providers/import/preview",e)})}function F(){const e=a();return u({mutationFn:r=>s.post("/providers/import",r),onSuccess:()=>{e.invalidateQueries({queryKey:t.providers.all})}})}export{f as a,c as b,m as c,y as d,q as e,P as f,g,F as h,l as u};
@@ -0,0 +1 @@
1
+ import{u as Z,r as i,p as c,j as t,l as m,am as _,E as z,m as N,a7 as J,n as f,o as h,q as l}from"./index-CMJV-mgF.js";import{F as w}from"./task-priority-acVgTiil.js";import{C as I}from"./agent-meta-MzuGtqxl.js";import{C as V}from"./circle-alert-Cbvy2cMo.js";import{C as $}from"./check-qs0S_9rB.js";function X(e,r="git"){return r==="directory"||e.isGitRepo?"select-and-browse":"browse"}function oe({value:e,onChange:r,validationMode:n="git",placeholder:x}){const{t:y}=Z(),[p,T]=i.useState(""),[S,W]=i.useState([]),[C,A]=i.useState(""),[B,D]=i.useState("/"),[q,L]=i.useState([]),[P,E]=i.useState(!1),[K,R]=i.useState(null),[j,v]=i.useState(e),[Q,d]=i.useState(null),[H,F]=i.useState(!1),G=i.useRef(!1);i.useEffect(()=>{v(e)},[e]);const o=i.useCallback(async s=>{E(!0),R(null);try{const a={};s&&(a.path=s);const u=await c.get("/filesystem/browse",{params:a});T(u.current),A(u.parent),D(u.sep||"/"),W(u.dirs),u.drives&&L(u.drives)}catch(a){R(a instanceof Error?a.message:"Failed to browse directory")}finally{E(!1)}},[]);i.useEffect(()=>{G.current||(G.current=!0,o())},[o]);const g=i.useCallback(async s=>{if(v(s),n==="directory"){r(s),d(null);return}F(!0),d(null);try{const a=await c.get("/filesystem/validate",{params:{path:s}});a.valid&&a.isGitRepo!==!1?(r(s),d(null)):d(a.error??"Not a Git repository")}catch(a){d(a instanceof Error?a.message:"Validation failed")}finally{F(!1)}},[r,n]),O=i.useCallback(s=>{X(s,n)==="select-and-browse"?(g(s.path),o(s.path)):(o(s.path),d(null))},[g,o,n]),b=B==="\\",k=i.useMemo(()=>p?p.split(/[\\/]/).filter(Boolean):[],[p]),U=i.useCallback(s=>{const a=k.slice(0,s+1);let u;b?(u=a.join("\\"),a.length===1&&/^[A-Za-z]:$/.test(a[0])&&(u+="\\")):u="/"+a.join("/"),o(u),d(null)},[k,o,b]),Y=i.useCallback(s=>{if(s.key==="Enter"&&!s.nativeEvent.isComposing&&s.nativeEvent.keyCode!==229){s.preventDefault();const a=j.trim();a&&(o(a),g(a))}},[j,o,g]);return t.jsxs("div",{className:"space-y-2",children:[t.jsxs("div",{className:"relative",children:[t.jsx("input",{type:"text",value:j,onChange:s=>v(s.target.value),onKeyDown:Y,placeholder:x??"e.g., /Users/me/projects/my-repo",className:m("w-full px-3 py-2 border rounded-lg text-sm font-mono focus:outline-none transition-colors pr-8",e?"border-emerald-300 bg-emerald-50/50 focus:border-emerald-400":"border-neutral-200 focus:border-neutral-400")}),e&&(n==="git"?t.jsx(_,{size:14,className:"absolute right-3 top-1/2 -translate-y-1/2 text-emerald-500"}):t.jsx(w,{size:14,className:"absolute right-3 top-1/2 -translate-y-1/2 text-emerald-500"}))]}),t.jsx("p",{className:"text-xs text-neutral-400",children:y(n==="git"?"Browse and select a Git repository, or type a path and press Enter":"Browse and select a directory, or type a path and press Enter")}),q.length>0&&t.jsx("div",{className:"flex items-center gap-1 flex-wrap",children:q.map(s=>t.jsx("button",{onClick:()=>{o(s),d(null)},className:m("px-2 py-0.5 rounded text-xs font-mono transition-colors border",p.toUpperCase().startsWith(s.toUpperCase())?"bg-neutral-900 text-white border-neutral-900":"border-neutral-200 text-neutral-600 hover:bg-neutral-100"),children:s.replace("\\","")},s))}),t.jsxs("div",{className:"flex items-center gap-0.5 text-xs text-neutral-500 overflow-x-auto pb-1 scrollbar-none",children:[!b&&t.jsx("button",{onClick:()=>o("/"),className:"hover:text-neutral-900 transition-colors flex-shrink-0 px-1 py-0.5 rounded hover:bg-neutral-100",children:"/"}),k.map((s,a)=>t.jsxs("span",{className:"flex items-center gap-0.5 flex-shrink-0",children:[(b?a>0:!0)&&t.jsx(I,{size:10,className:"text-neutral-300"}),t.jsx("button",{onClick:()=>U(a),className:m("px-1 py-0.5 rounded transition-colors truncate max-w-[120px]",a===k.length-1?"font-medium text-neutral-900":"hover:text-neutral-900 hover:bg-neutral-100"),children:s})]},a))]}),t.jsx("div",{className:"border border-neutral-200 rounded-lg overflow-hidden",children:t.jsx("div",{className:"max-h-[200px] overflow-y-auto",children:P?t.jsxs("div",{className:"flex items-center justify-center py-8 text-neutral-400",children:[t.jsx(z,{size:16,className:"animate-spin mr-2"}),t.jsx("span",{className:"text-xs",children:"Loading..."})]}):K?t.jsxs("div",{className:"flex items-center justify-center py-8 text-red-500 gap-2",children:[t.jsx(V,{size:14}),t.jsx("span",{className:"text-xs",children:K})]}):S.length===0?t.jsxs("div",{className:"flex flex-col items-center justify-center gap-3 py-8 text-neutral-400",children:[t.jsx("span",{className:"text-xs",children:"No subdirectories"}),n==="directory"&&p&&t.jsxs("button",{type:"button",onClick:()=>g(p),className:m("inline-flex items-center gap-1.5 rounded-md border px-3 py-1.5 text-xs font-medium transition-colors",p===e?"border-emerald-200 bg-emerald-50 text-emerald-700":"border-neutral-200 bg-white text-neutral-700 hover:bg-neutral-50"),children:[t.jsx($,{size:13}),t.jsx("span",{children:y("Select Current")})]})]}):t.jsxs("ul",{className:"divide-y divide-neutral-100",children:[p!==C&&t.jsx("li",{children:t.jsxs("button",{onClick:()=>o(C),className:"w-full flex items-center gap-2.5 px-3 py-2 text-left hover:bg-neutral-50 transition-colors group",children:[t.jsx(w,{size:14,className:"text-neutral-400 flex-shrink-0"}),t.jsx("span",{className:"text-xs text-neutral-500 group-hover:text-neutral-700",children:".."})]})}),S.map(s=>t.jsx("li",{children:t.jsxs("button",{type:"button",onClick:()=>O(s),className:m("w-full flex items-center gap-2.5 px-3 py-2 text-left transition-colors group",s.path===e?"bg-emerald-50":"hover:bg-neutral-50"),children:[s.isGitRepo?t.jsx(_,{size:14,className:"text-emerald-500 flex-shrink-0"}):t.jsx(w,{size:14,className:"text-neutral-400 flex-shrink-0"}),t.jsx("span",{className:m("text-xs truncate",s.path===e?"font-medium text-emerald-700":"text-neutral-700 group-hover:text-neutral-900"),children:s.name}),s.isGitRepo&&t.jsx("span",{className:"ml-auto flex-shrink-0 text-[10px] font-medium bg-emerald-100 text-emerald-600 px-1.5 py-0.5 rounded",children:"Git"}),!s.isGitRepo&&n!=="directory"&&t.jsx(I,{size:12,className:"ml-auto text-neutral-300 group-hover:text-neutral-400 flex-shrink-0"}),!s.isGitRepo&&n==="directory"&&t.jsx($,{size:12,className:m("ml-auto flex-shrink-0",s.path===e?"text-emerald-500":"text-neutral-300 group-hover:text-neutral-400")})]})},s.path))]})})}),H&&t.jsxs("div",{className:"flex items-center gap-2 text-xs text-neutral-400",children:[t.jsx(z,{size:12,className:"animate-spin"}),t.jsx("span",{children:"Validating..."})]}),Q&&t.jsxs("div",{className:"flex items-center gap-2 text-xs text-red-500",children:[t.jsx(V,{size:12}),t.jsx("span",{children:Q})]})]})}const M=1500,ee=2e3,te=5e3;function ce(e,r){return e&&r?.workingDir===e&&r.tab==="changes"?M:!1}function se(e,r){return e&&r?.workspaceId===e&&r.tab==="changes"?ee:!1}function ue(e,r){return e&&r?.workingDir===e&&r.tab==="history"?te:!1}function pe(e){return N({queryKey:l.workspaces.projectBranches(e),queryFn:()=>c.get(`/projects/${e}/workspace-branches`),enabled:!!e,staleTime:0})}function de(){const e=h();return f({mutationFn:({id:r,...n})=>c.patch(`/workspaces/${r}/base-branch`,n),onSettled:async()=>{await Promise.all([e.invalidateQueries({queryKey:l.workspaces.all}),e.invalidateQueries({queryKey:l.tasks.all}),e.invalidateQueries({queryKey:l.git.all})])}})}function xe(e){return N({queryKey:l.workspaces.list(e),queryFn:()=>c.get(`/tasks/${e}/workspaces`),enabled:!!e})}function me(e){const r=h();return f({mutationFn:n=>c.post(`/tasks/${e}/workspaces`,n),onSuccess:()=>{r.invalidateQueries({queryKey:l.workspaces.list(e)}),r.invalidateQueries({queryKey:l.tasks.all})}})}function fe(){const e=h();return f({mutationFn:({id:r,commitMessage:n,stopActiveServices:x})=>c.post(`/workspaces/${r}/merge`,{commitMessage:n,stopActiveServices:x}),onSuccess:()=>{e.invalidateQueries({queryKey:l.workspaces.all}),e.invalidateQueries({queryKey:l.tasks.all}),e.invalidateQueries({queryKey:l.git.all}),e.invalidateQueries({queryKey:l.workspaceServices.all})},onError:()=>{e.invalidateQueries({queryKey:l.git.all}),e.invalidateQueries({queryKey:l.workspaceServices.all})}})}function he(){const e=h();return f({mutationFn:r=>c.post(`/workspaces/${r}/reactivate`),onSuccess:()=>{e.invalidateQueries({queryKey:l.workspaces.all}),e.invalidateQueries({queryKey:l.tasks.all})}})}function ye(){return f({mutationFn:({workspaceId:e,editorType:r})=>c.post(`/workspaces/${e}/open-editor`,{editorType:r})})}function ge(e,r={}){const n=J(y=>y.visibleContext),x=se(e,n);return N({queryKey:l.workspaces.gitStatus(e),queryFn:()=>c.get(`/workspaces/${e}/git-status`),enabled:!!e&&(r.enabled??!0),refetchInterval:x,refetchIntervalInBackground:!1,refetchOnWindowFocus:x?"always":!1,refetchOnReconnect:x?"always":!1})}function be(){const e=h();return f({mutationFn:r=>c.post(`/workspaces/${r}/rebase`),onSuccess:(r,n)=>{e.invalidateQueries({queryKey:l.workspaces.gitStatus(n)}),e.invalidateQueries({queryKey:l.git.all})},onError:(r,n)=>{e.invalidateQueries({queryKey:l.workspaces.gitStatus(n)}),e.invalidateQueries({queryKey:l.git.all})}})}function ke(){const e=h();return f({mutationFn:r=>c.post(`/workspaces/${r}/abort-operation`),onSuccess:(r,n)=>{e.invalidateQueries({queryKey:l.workspaces.gitStatus(n)}),e.invalidateQueries({queryKey:l.git.all})}})}export{oe as F,xe as a,ge as b,ye as c,me as d,he as e,pe as f,ce as g,de as h,be as i,fe as j,ue as k,ke as u};