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

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (209) 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 +37 -0
  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 +17 -3
  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 +67 -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 +41 -46
  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/project.service.d.ts.map +1 -1
  27. package/dist/services/project.service.js +30 -4
  28. package/dist/services/project.service.js.map +1 -1
  29. package/dist/services/session-manager.d.ts +1 -0
  30. package/dist/services/session-manager.d.ts.map +1 -1
  31. package/dist/services/session-manager.js +38 -3
  32. package/dist/services/session-manager.js.map +1 -1
  33. package/dist/services/session-runtime-cleanup-gate.d.ts +1 -0
  34. package/dist/services/session-runtime-cleanup-gate.d.ts.map +1 -1
  35. package/dist/services/session-runtime-cleanup-gate.js +5 -3
  36. package/dist/services/session-runtime-cleanup-gate.js.map +1 -1
  37. package/dist/services/team-reconciler.service.d.ts +1 -0
  38. package/dist/services/team-reconciler.service.d.ts.map +1 -1
  39. package/dist/services/team-reconciler.service.js +1 -0
  40. package/dist/services/team-reconciler.service.js.map +1 -1
  41. package/dist/services/workspace.service.js +8 -8
  42. package/dist/services/workspace.service.js.map +1 -1
  43. package/dist/utils/__tests__/spawned-process-identity.test.d.ts +2 -0
  44. package/dist/utils/__tests__/spawned-process-identity.test.d.ts.map +1 -0
  45. package/dist/utils/__tests__/spawned-process-identity.test.js +31 -0
  46. package/dist/utils/__tests__/spawned-process-identity.test.js.map +1 -0
  47. package/dist/utils/spawned-process-identity.d.ts +1 -1
  48. package/dist/utils/spawned-process-identity.d.ts.map +1 -1
  49. package/dist/utils/spawned-process-identity.js +11 -3
  50. package/dist/utils/spawned-process-identity.js.map +1 -1
  51. package/dist/web/assets/AgentDemoPage-Svq9Baa7.js +1 -0
  52. package/dist/web/assets/{AgentEnvironmentSettingsPage-DfVjAeK8.js → AgentEnvironmentSettingsPage-DQjnDr-h.js} +1 -1
  53. package/dist/web/assets/AgentLogo-I2etsqym.js +1 -0
  54. package/dist/web/assets/BranchSelect-Eb5UGWWX.js +1 -0
  55. package/dist/web/assets/BrandLogo-BjC1hcgv.js +1 -0
  56. package/dist/web/assets/{ConversationPage-Bh_x9kK3.js → ConversationPage-jEYUuSPT.js} +2 -2
  57. package/dist/web/assets/CreateTaskInput-B_cRDkVq.js +1 -0
  58. package/dist/web/assets/{DemoPage-xys5j303.js → DemoPage-BkkueMuL.js} +1 -1
  59. package/dist/web/assets/DesignSystemPage-oM16R2Ta.js +16 -0
  60. package/dist/web/assets/{ExecutionPermissionSelector-CTeKhMaB.js → ExecutionPermissionSelector-BX5Xx8ta.js} +1 -1
  61. package/dist/web/assets/{GeneralSettingsPage-BZEcE8xN.js → GeneralSettingsPage-B0jFlgDl.js} +1 -1
  62. package/dist/web/assets/{LoadingPreviewPage-D81UstX2.js → LoadingPreviewPage-BxjpxLLP.js} +1 -1
  63. package/dist/web/assets/McpSettingsPage-BErvd619.js +1 -0
  64. package/dist/web/assets/{MemberAvatar-BuueBvLu.js → MemberAvatar-TVtoxQe8.js} +1 -1
  65. package/dist/web/assets/NotificationSettingsPage-BETMBdj1.js +1 -0
  66. package/dist/web/assets/{ProfileSettingsPage-DdK3Q2wl.js → ProfileSettingsPage-C03ZAft-.js} +1 -1
  67. package/dist/web/assets/ProjectKanbanPage-DsPxwoVf.js +86 -0
  68. package/dist/web/assets/ProjectSettingsPage-BwNM6VWs.js +2 -0
  69. package/dist/web/assets/{ProviderSettingsPage-CiTp3QwX.js → ProviderSettingsPage-CeNQPd74.js} +3 -3
  70. package/dist/web/assets/{SettingsMasterDetail-BhepxZ5b.js → SettingsMasterDetail-B_SI2h_k.js} +1 -1
  71. package/dist/web/assets/TeamSettingsPage-BfgtMl_n.js +1 -0
  72. package/dist/web/assets/agent-meta-DOylIs2N.js +1 -0
  73. package/dist/web/assets/arc-BlZww3MO.js +1 -0
  74. package/dist/web/assets/{architectureDiagram-3BPJPVTR-Byb8rrNU.js → architectureDiagram-3BPJPVTR-DWO_DRgk.js} +1 -1
  75. package/dist/web/assets/at-sign-BFf8Sz8T.js +1 -0
  76. package/dist/web/assets/{blockDiagram-GPEHLZMM-DGcS4UET.js → blockDiagram-GPEHLZMM-CJPYhE52.js} +1 -1
  77. package/dist/web/assets/{c4Diagram-AAUBKEIU-BRyJRATZ.js → c4Diagram-AAUBKEIU-Cx5IvcjB.js} +1 -1
  78. package/dist/web/assets/channel-D9sA6Wxp.js +1 -0
  79. package/dist/web/assets/check-Cm7Vstpm.js +1 -0
  80. package/dist/web/assets/chevron-down-C6Ta4vyM.js +1 -0
  81. package/dist/web/assets/chevron-up-BwJT7iif.js +1 -0
  82. package/dist/web/assets/{chunk-2J33WTMH-DgL3sVcs.js → chunk-2J33WTMH-D9cBNYgd.js} +1 -1
  83. package/dist/web/assets/{chunk-4BX2VUAB-BVgUUvCo.js → chunk-4BX2VUAB-BY8TNt6E.js} +1 -1
  84. package/dist/web/assets/{chunk-55IACEB6-CfD9Uy7p.js → chunk-55IACEB6-pT-HP-28.js} +1 -1
  85. package/dist/web/assets/{chunk-727SXJPM-D8gRbLX6.js → chunk-727SXJPM-hy95xDLb.js} +1 -1
  86. package/dist/web/assets/{chunk-AQP2D5EJ-CwBPJyzk.js → chunk-AQP2D5EJ-DlUN-icr.js} +1 -1
  87. package/dist/web/assets/{chunk-FMBD7UC4-B0b7Iiv3.js → chunk-FMBD7UC4-Dg2iMKZR.js} +1 -1
  88. package/dist/web/assets/{chunk-ND2GUHAM-D0Y5tagg.js → chunk-ND2GUHAM-DMzFIsJ-.js} +1 -1
  89. package/dist/web/assets/{chunk-QZHKN3VN-qVEPtRTm.js → chunk-QZHKN3VN-C6CgmKuM.js} +1 -1
  90. package/dist/web/assets/{circle-alert-C_ON1rCL.js → circle-alert-Dm2Pl-rU.js} +1 -1
  91. package/dist/web/assets/classDiagram-4FO5ZUOK-2e2YVo9r.js +1 -0
  92. package/dist/web/assets/classDiagram-v2-Q7XG4LA2-2e2YVo9r.js +1 -0
  93. package/dist/web/assets/code-block-OCS4YCEC-DizntuP_.js +2 -0
  94. package/dist/web/assets/{confirm-dialog-Drhw7wmk.js → confirm-dialog-DRpyE_qU.js} +1 -1
  95. package/dist/web/assets/copy-r0aUdsl8.js +1 -0
  96. package/dist/web/assets/{cose-bilkent-S5V4N54A-BoSlujEJ.js → cose-bilkent-S5V4N54A-D-fvmvw-.js} +1 -1
  97. package/dist/web/assets/cssMode-DVorIr82.js +1 -0
  98. package/dist/web/assets/{dagre-BM42HDAG-DWm_GyDR.js → dagre-BM42HDAG-H0bYI1f3.js} +1 -1
  99. package/dist/web/assets/{diagram-2AECGRRQ-CVtgrsl0.js → diagram-2AECGRRQ-DI568fLp.js} +1 -1
  100. package/dist/web/assets/{diagram-5GNKFQAL-XNMIXdme.js → diagram-5GNKFQAL-BLcaBzw2.js} +1 -1
  101. package/dist/web/assets/{diagram-KO2AKTUF-CYXdL2cC.js → diagram-KO2AKTUF-aL1cvl23.js} +1 -1
  102. package/dist/web/assets/{diagram-LMA3HP47-8MCVTTrT.js → diagram-LMA3HP47-DbOutAfH.js} +1 -1
  103. package/dist/web/assets/{diagram-OG6HWLK6-DMWgHctP.js → diagram-OG6HWLK6-D_cWftAX.js} +1 -1
  104. package/dist/web/assets/{erDiagram-TEJ5UH35-D3qp5csl.js → erDiagram-TEJ5UH35-DRe5V8Dx.js} +1 -1
  105. package/dist/web/assets/{flowDiagram-I6XJVG4X-D-Bem31x.js → flowDiagram-I6XJVG4X-B5-vg_Nh.js} +1 -1
  106. package/dist/web/assets/{freemarker2-D7pixABp.js → freemarker2-CXlYb2yX.js} +3 -3
  107. package/dist/web/assets/{ganttDiagram-6RSMTGT7-D5ctgPCm.js → ganttDiagram-6RSMTGT7-B3iBFICN.js} +1 -1
  108. package/dist/web/assets/{gitGraphDiagram-PVQCEYII-lA3I18_r.js → gitGraphDiagram-PVQCEYII-CZ9zsKVw.js} +1 -1
  109. package/dist/web/assets/globe-JXfw4MCF.js +1 -0
  110. package/dist/web/assets/handlebars-BL0prPVZ.js +1 -0
  111. package/dist/web/assets/html-DJWeRkWe.js +1 -0
  112. package/dist/web/assets/htmlMode-D_fekqg9.js +1 -0
  113. package/dist/web/assets/{index-CA_B15_q.js → index-CWEbo6pZ.js} +5 -5
  114. package/dist/web/assets/{index-ClhIruws.js → index-CWbMMO6g.js} +13 -13
  115. package/dist/web/assets/index-uXglTJ2_.css +1 -0
  116. package/dist/web/assets/{infoDiagram-5YYISTIA-CGy_XnVP.js → infoDiagram-5YYISTIA-DQU_sN8x.js} +1 -1
  117. package/dist/web/assets/{ishikawaDiagram-YF4QCWOH-DFGAkcYD.js → ishikawaDiagram-YF4QCWOH-BVGrNzJa.js} +1 -1
  118. package/dist/web/assets/javascript-CDfuzdfe.js +1 -0
  119. package/dist/web/assets/{journeyDiagram-JHISSGLW-C9ZHl7QM.js → journeyDiagram-JHISSGLW-DU4Md1Tq.js} +1 -1
  120. package/dist/web/assets/{jsonMode-bD-WsLyj.js → jsonMode-BMSvHUHa.js} +4 -4
  121. package/dist/web/assets/{kanban-definition-UN3LZRKU-BbbRnxDG.js → kanban-definition-UN3LZRKU-DDPgCucq.js} +1 -1
  122. package/dist/web/assets/key-round-BHVp7u3Z.js +1 -0
  123. package/dist/web/assets/{layers-BlEewgM8.js → layers-2tjjhM75.js} +1 -1
  124. package/dist/web/assets/{linear-D04wUvKo.js → linear-D8yLBTVY.js} +1 -1
  125. package/dist/web/assets/link-CnunXc7X.js +1 -0
  126. package/dist/web/assets/liquid-DHrNpv6c.js +1 -0
  127. package/dist/web/assets/{lspLanguageFeatures-jn1q-hoP.js → lspLanguageFeatures-BiYvrSP0.js} +1 -1
  128. package/dist/web/assets/mdx-CIEpgUOV.js +1 -0
  129. package/dist/web/assets/mermaid-NOHMQCX5-9-DTTfp6.js +124 -0
  130. package/dist/web/assets/{message-square-CTrwLud_.js → message-square-QM0c6Dcv.js} +1 -1
  131. package/dist/web/assets/{mindmap-definition-RKZ34NQL-n24WGa7x.js → mindmap-definition-RKZ34NQL-CCAuuWFZ.js} +1 -1
  132. package/dist/web/assets/{modal-BFDGLwoR.js → modal-BRoNvfhw.js} +1 -1
  133. package/dist/web/assets/{monaco-CirwkIGR.js → monaco-CrBn9oMJ.js} +3 -3
  134. package/dist/web/assets/paperclip-CC7nHUQ7.js +1 -0
  135. package/dist/web/assets/pencil-DIY0Hu5t.js +1 -0
  136. package/dist/web/assets/{pieDiagram-4H26LBE5-CUMw3DZK.js → pieDiagram-4H26LBE5-CXy_N5QX.js} +2 -2
  137. package/dist/web/assets/play-CIZVXiwM.js +1 -0
  138. package/dist/web/assets/python-BIs0pClJ.js +1 -0
  139. package/dist/web/assets/{quadrantDiagram-W4KKPZXB-DMshWJZy.js → quadrantDiagram-W4KKPZXB-Dt44QsS8.js} +1 -1
  140. package/dist/web/assets/razor-JCx8NEwU.js +1 -0
  141. package/dist/web/assets/{requirementDiagram-4Y6WPE33-B4Jx_Yx6.js → requirementDiagram-4Y6WPE33-BL8D7Np0.js} +1 -1
  142. package/dist/web/assets/{sankeyDiagram-5OEKKPKP-CN2JbWht.js → sankeyDiagram-5OEKKPKP-I5nefO3A.js} +1 -1
  143. package/dist/web/assets/{select-CLV6rtRD.js → select-BmjoUfrV.js} +1 -1
  144. package/dist/web/assets/{sequenceDiagram-3UESZ5HK-B4bMaYD_.js → sequenceDiagram-3UESZ5HK-lbPrhX8g.js} +1 -1
  145. package/dist/web/assets/server-BNBdQGor.js +1 -0
  146. package/dist/web/assets/stateDiagram-AJRCARHV-Bw3qtv2M.js +1 -0
  147. package/dist/web/assets/stateDiagram-v2-BHNVJYJU-Xbc4HxDQ.js +1 -0
  148. package/dist/web/assets/{switch-Ch_hFX_n.js → switch-CEUHI4gI.js} +1 -1
  149. package/dist/web/assets/task-kalEmHDc.js +42 -0
  150. package/dist/web/assets/task-priority-wLXAgVZZ.js +1 -0
  151. package/dist/web/assets/{textarea-DDy2_gLQ.js → textarea-CD82lB0Z.js} +1 -1
  152. package/dist/web/assets/{timeline-definition-PNZ67QCA-BuLxqHOL.js → timeline-definition-PNZ67QCA-Cfg_kgoa.js} +1 -1
  153. package/dist/web/assets/{trash-2-DrNpNvRo.js → trash-2-BF_3L-qk.js} +1 -1
  154. package/dist/web/assets/{tsMode-qES9KHvZ.js → tsMode-DAHSkTAr.js} +2 -2
  155. package/dist/web/assets/typescript-CptiLWGr.js +1 -0
  156. package/dist/web/assets/{upload-D6SifUfr.js → upload-B2AMXrU-.js} +1 -1
  157. package/dist/web/assets/{use-profiles-DUoivbBF.js → use-profiles-CQ-jIuiI.js} +1 -1
  158. package/dist/web/assets/use-projects-BYUZwQ-q.js +1 -0
  159. package/dist/web/assets/{use-providers-BKYsoOBU.js → use-providers-DdV9gbj1.js} +1 -1
  160. package/dist/web/assets/useNormalizedLogs-DdFsf-Z1.js +1 -0
  161. package/dist/web/assets/{vennDiagram-CIIHVFJN-LoQ_fciU.js → vennDiagram-CIIHVFJN-CdEP03CK.js} +1 -1
  162. package/dist/web/assets/{wardley-L42UT6IY-Dh_9I9Zv.js → wardley-L42UT6IY-q_Enplrs.js} +1 -1
  163. package/dist/web/assets/{wardleyDiagram-YWT4CUSO-CQ-yZsuW.js → wardleyDiagram-YWT4CUSO-DlL6fsid.js} +1 -1
  164. package/dist/web/assets/xml-DbPqkgZW.js +1 -0
  165. package/dist/web/assets/{xychartDiagram-2RQKCTM6-HLyImhwf.js → xychartDiagram-2RQKCTM6-B2OGqVKA.js} +1 -1
  166. package/dist/web/assets/yaml-Deyq6Z5-.js +1 -0
  167. package/dist/web/index.html +2 -2
  168. package/node_modules/@agent-tower/shared/dist/types.d.ts +1 -1
  169. package/node_modules/@agent-tower/shared/dist/types.d.ts.map +1 -1
  170. package/package.json +1 -1
  171. package/dist/web/assets/AgentDemoPage-CCw9EfsA.js +0 -1
  172. package/dist/web/assets/AgentLogo-BhKP5dmt.js +0 -1
  173. package/dist/web/assets/CreateTaskInput-D_KCLZ4q.js +0 -1
  174. package/dist/web/assets/McpSettingsPage-Ch1U9tIg.js +0 -1
  175. package/dist/web/assets/NotificationSettingsPage-IHVOP-Vc.js +0 -1
  176. package/dist/web/assets/ProjectKanbanPage-VFkvX9IJ.js +0 -86
  177. package/dist/web/assets/ProjectSettingsPage-BlRbxcf8.js +0 -2
  178. package/dist/web/assets/TeamSettingsPage-JaLFYXmJ.js +0 -1
  179. package/dist/web/assets/arc-Bd616RKq.js +0 -1
  180. package/dist/web/assets/channel-DJbXDmr3.js +0 -1
  181. package/dist/web/assets/check-Bj-p_n7C.js +0 -1
  182. package/dist/web/assets/chevron-down-BouKK_Vr.js +0 -1
  183. package/dist/web/assets/chevron-right-DJVYJhGF.js +0 -1
  184. package/dist/web/assets/chevron-up-CRlA9Cjl.js +0 -1
  185. package/dist/web/assets/classDiagram-4FO5ZUOK-BIz565rI.js +0 -1
  186. package/dist/web/assets/classDiagram-v2-Q7XG4LA2-BIz565rI.js +0 -1
  187. package/dist/web/assets/code-block-OCS4YCEC-wB-pkznC.js +0 -2
  188. package/dist/web/assets/cssMode-DBSRGK6o.js +0 -1
  189. package/dist/web/assets/globe-AjOch0vk.js +0 -1
  190. package/dist/web/assets/handlebars-B10IREzV.js +0 -1
  191. package/dist/web/assets/html-BpG68rDt.js +0 -1
  192. package/dist/web/assets/htmlMode-DuHt_Jpu.js +0 -1
  193. package/dist/web/assets/index-NxnivNNl.css +0 -1
  194. package/dist/web/assets/javascript-BupP80yJ.js +0 -1
  195. package/dist/web/assets/liquid-C57aZJpn.js +0 -1
  196. package/dist/web/assets/mdx-CEldzbGM.js +0 -1
  197. package/dist/web/assets/mermaid-NOHMQCX5-BsnLQ2rU.js +0 -124
  198. package/dist/web/assets/pencil-DQeFTV0j.js +0 -1
  199. package/dist/web/assets/python-B5Uu3BYh.js +0 -1
  200. package/dist/web/assets/razor-BW2eCr4L.js +0 -1
  201. package/dist/web/assets/server-Dhw531hF.js +0 -1
  202. package/dist/web/assets/stateDiagram-AJRCARHV-CJAmyasO.js +0 -1
  203. package/dist/web/assets/stateDiagram-v2-BHNVJYJU-CXOXut1l.js +0 -1
  204. package/dist/web/assets/typescript-DyiE-tjk.js +0 -1
  205. package/dist/web/assets/use-projects-CNU2P0v0.js +0 -1
  206. package/dist/web/assets/use-workspaces-C1HJqhNs.js +0 -1
  207. package/dist/web/assets/useNormalizedLogs-Bu2oXEky.js +0 -1
  208. package/dist/web/assets/xml-BNpVw2Ox.js +0 -1
  209. package/dist/web/assets/yaml-DtqgC7D8.js +0 -1
@@ -0,0 +1,42 @@
1
+ import{c as de,r as d,j as c,al as un,D as dn,am as fn,an as re,ao as Mr,l as S,ap as _r,u as ae,X as Dr,W as mn,V as pn,aq as hn,ar as Lr}from"./index-CWbMMO6g.js";import{S as Ir,a as Fr,A as zr,G as $r,g as Wr}from"./task-priority-wLXAgVZZ.js";import{C as Br}from"./check-Cm7Vstpm.js";import{C as Hr}from"./copy-r0aUdsl8.js";import{C as Ur,b as Vr,F as Yr,T as he}from"./agent-meta-DOylIs2N.js";import{A as Kr}from"./AgentLogo-I2etsqym.js";const Xr=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"9",x2:"15",y1:"15",y2:"9",key:"1dfufj"}]],gn=de("circle-slash",Xr);const Gr=[["path",{d:"M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0",key:"1nclc0"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]],Zr=de("eye",Gr);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"}],["path",{d:"M10 12.5 8 15l2 2.5",key:"1tg20x"}],["path",{d:"m14 12.5 2 2.5-2 2.5",key:"yinavb"}]],Qr=de("file-code",qr);const Jr=[["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"}]],eo=de("file-image",Jr);const to=[["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"}]],no=de("file",to);const ro=[["path",{d:"M12 10v6",key:"1bos4e"}],["path",{d:"M9 13h6",key:"1uhe8q"}],["path",{d:"M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z",key:"1kt360"}]],uc=de("folder-plus",ro);const oo=[["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"}]],so=de("git-commit-horizontal",oo);var io=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],W=io.reduce((e,t)=>{const n=un(`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 ao(e,t){e&&dn.flushSync(()=>e.dispatchEvent(t))}function dc(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 vt(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,co(o,...t)]}function co(...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 ee=globalThis?.document?d.useLayoutEffect:()=>{},lo=fn[" useInsertionEffect ".trim().toString()]||ee;function xn({prop:e,defaultProp:t,onChange:n=()=>{},caller:r}){const[o,s,i]=uo({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=fo(f)?f(e):f;m!==e&&i.current?.(m)}else s(f)},[a,e,s,i]);return[l,u]}function uo({defaultProp:e,onChange:t}){const[n,r]=d.useState(e),o=d.useRef(n),s=d.useRef(t);return lo(()=>{s.current=t},[t]),d.useEffect(()=>{o.current!==n&&(s.current?.(n),o.current=n)},[n,o]),[n,r,s]}function fo(e){return typeof e=="function"}function mo(e,t){return d.useReducer((n,r)=>t[n][r]??n,e)}var He=e=>{const{present:t,children:n}=e,r=po(t),o=typeof n=="function"?n({present:r.isPresent}):d.Children.only(n),s=re(r.ref,ho(o));return typeof n=="function"||r.isPresent?d.cloneElement(o,{ref:s}):null};He.displayName="Presence";function po(e){const[t,n]=d.useState(),r=d.useRef(null),o=d.useRef(e),s=d.useRef("none"),i=e?"mounted":"unmounted",[a,l]=mo(i,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return d.useEffect(()=>{const u=Oe(r.current);s.current=a==="mounted"?u:"none"},[a]),ee(()=>{const u=r.current,f=o.current;if(f!==e){const g=s.current,h=Oe(u);e?l("MOUNT"):h==="none"||u?.display==="none"?l("UNMOUNT"):l(f&&g!==h?"ANIMATION_OUT":"UNMOUNT"),o.current=e}},[e,l]),ee(()=>{if(t){let u;const f=t.ownerDocument.defaultView??window,m=h=>{const p=Oe(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=Oe(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 Oe(e){return e?.animationName||"none"}function ho(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 go=fn[" useId ".trim().toString()]||(()=>{}),xo=0;function vn(e){const[t,n]=d.useState(go());return ee(()=>{n(r=>r??String(xo++))},[e]),e||(t?`radix-${t}`:"")}var Ue="Collapsible",[vo]=vt(Ue),[bo,bt]=vo(Ue),bn=d.forwardRef((e,t)=>{const{__scopeCollapsible:n,open:r,defaultOpen:o,disabled:s,onOpenChange:i,...a}=e,[l,u]=xn({prop:r,defaultProp:o??!1,onChange:i,caller:Ue});return c.jsx(bo,{scope:n,disabled:s,contentId:vn(),open:l,onOpenToggle:d.useCallback(()=>u(f=>!f),[u]),children:c.jsx(W.div,{"data-state":yt(l),"data-disabled":s?"":void 0,...a,ref:t})})});bn.displayName=Ue;var wn="CollapsibleTrigger",yn=d.forwardRef((e,t)=>{const{__scopeCollapsible:n,...r}=e,o=bt(wn,n);return c.jsx(W.button,{type:"button","aria-controls":o.contentId,"aria-expanded":o.open||!1,"data-state":yt(o.open),"data-disabled":o.disabled?"":void 0,disabled:o.disabled,...r,ref:t,onClick:Q(e.onClick,o.onOpenToggle)})});yn.displayName=wn;var wt="CollapsibleContent",Nn=d.forwardRef((e,t)=>{const{forceMount:n,...r}=e,o=bt(wt,e.__scopeCollapsible);return c.jsx(He,{present:n||o.open,children:({present:s})=>c.jsx(wo,{...r,ref:t,present:s})})});Nn.displayName=wt;var wo=d.forwardRef((e,t)=>{const{__scopeCollapsible:n,present:r,children:o,...s}=e,i=bt(wt,n),[a,l]=d.useState(r),u=d.useRef(null),f=re(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)},[]),ee(()=>{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":yt(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 yt(e){return e?"open":"closed"}var yo=bn,No=yn,Co=Nn;function ve(e){const t=d.useRef(e);return d.useEffect(()=>{t.current=e}),d.useMemo(()=>(...n)=>t.current?.(...n),[])}function Eo(e,t=globalThis?.document){const n=ve(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 So="DismissableLayer",lt="dismissableLayer.update",Ro="dismissableLayer.pointerDownOutside",Ao="dismissableLayer.focusOutside",Dt,Cn=d.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),En=d.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:o,onFocusOutside:s,onInteractOutside:i,onDismiss:a,...l}=e,u=d.useContext(Cn),[f,m]=d.useState(null),g=f?.ownerDocument??globalThis?.document,[,h]=d.useState({}),x=re(t,C=>m(C)),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,E=jo(C=>{const P=C.target,j=[...u.branches].some(O=>O.contains(P));!y||j||(o?.(C),i?.(C),C.defaultPrevented||a?.())},g),R=ko(C=>{const P=C.target;[...u.branches].some(O=>O.contains(P))||(s?.(C),i?.(C),C.defaultPrevented||a?.())},g);return Eo(C=>{w===u.layers.size-1&&(r?.(C),!C.defaultPrevented&&a&&(C.preventDefault(),a()))},g),d.useEffect(()=>{if(f)return n&&(u.layersWithOutsidePointerEventsDisabled.size===0&&(Dt=g.body.style.pointerEvents,g.body.style.pointerEvents="none"),u.layersWithOutsidePointerEventsDisabled.add(f)),u.layers.add(f),Lt(),()=>{n&&u.layersWithOutsidePointerEventsDisabled.size===1&&(g.body.style.pointerEvents=Dt)}},[f,g,n,u]),d.useEffect(()=>()=>{f&&(u.layers.delete(f),u.layersWithOutsidePointerEventsDisabled.delete(f),Lt())},[f,u]),d.useEffect(()=>{const C=()=>h({});return document.addEventListener(lt,C),()=>document.removeEventListener(lt,C)},[]),c.jsx(W.div,{...l,ref:x,style:{pointerEvents:N?y?"auto":"none":void 0,...e.style},onFocusCapture:Q(e.onFocusCapture,R.onFocusCapture),onBlurCapture:Q(e.onBlurCapture,R.onBlurCapture),onPointerDownCapture:Q(e.onPointerDownCapture,E.onPointerDownCapture)})});En.displayName=So;var Po="DismissableLayerBranch",Oo=d.forwardRef((e,t)=>{const n=d.useContext(Cn),r=d.useRef(null),o=re(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})});Oo.displayName=Po;function jo(e,t=globalThis?.document){const n=ve(e),r=d.useRef(!1),o=d.useRef(()=>{});return d.useEffect(()=>{const s=a=>{if(a.target&&!r.current){let l=function(){Sn(Ro,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 ko(e,t=globalThis?.document){const n=ve(e),r=d.useRef(!1);return d.useEffect(()=>{const o=s=>{s.target&&!r.current&&Sn(Ao,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 Lt(){const e=new CustomEvent(lt);document.dispatchEvent(e)}function Sn(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?ao(o,s):o.dispatchEvent(s)}var Qe="focusScope.autoFocusOnMount",Je="focusScope.autoFocusOnUnmount",It={bubbles:!1,cancelable:!0},To="FocusScope",Rn=d.forwardRef((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:o,onUnmountAutoFocus:s,...i}=e,[a,l]=d.useState(null),u=ve(o),f=ve(s),m=d.useRef(null),g=re(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:oe(m.current,{select:!0})},v=function(N){if(h.paused||!a)return;const y=N.relatedTarget;y!==null&&(a.contains(y)||oe(m.current,{select:!0}))},b=function(N){if(document.activeElement===document.body)for(const E of N)E.removedNodes.length>0&&oe(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){zt.add(h);const p=document.activeElement;if(!a.contains(p)){const b=new CustomEvent(Qe,It);a.addEventListener(Qe,u),a.dispatchEvent(b),b.defaultPrevented||(Mo(Fo(An(a)),{select:!0}),document.activeElement===p&&oe(a))}return()=>{a.removeEventListener(Qe,u),setTimeout(()=>{const b=new CustomEvent(Je,It);a.addEventListener(Je,f),a.dispatchEvent(b),b.defaultPrevented||oe(p??document.body,{select:!0}),a.removeEventListener(Je,f),zt.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]=_o(w);N&&y?!p.shiftKey&&b===y?(p.preventDefault(),n&&oe(N,{select:!0})):p.shiftKey&&b===N&&(p.preventDefault(),n&&oe(y,{select:!0})):b===w&&p.preventDefault()}},[n,r,h.paused]);return c.jsx(W.div,{tabIndex:-1,...i,ref:g,onKeyDown:x})});Rn.displayName=To;function Mo(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(oe(r,{select:t}),document.activeElement!==n)return}function _o(e){const t=An(e),n=Ft(t,e),r=Ft(t.reverse(),e);return[n,r]}function An(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 Ft(e,t){for(const n of e)if(!Do(n,{upTo:t}))return n}function Do(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 Lo(e){return e instanceof HTMLInputElement&&"select"in e}function oe(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&Lo(e)&&t&&e.select()}}var zt=Io();function Io(){let e=[];return{add(t){const n=e[0];t!==n&&n?.pause(),e=$t(e,t),e.unshift(t)},remove(t){e=$t(e,t),e[0]?.resume()}}}function $t(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function Fo(e){return e.filter(t=>t.tagName!=="A")}var zo="Portal",Pn=d.forwardRef((e,t)=>{const{container:n,...r}=e,[o,s]=d.useState(!1);ee(()=>s(!0),[]);const i=n||o&&globalThis?.document?.body;return i?Mr.createPortal(c.jsx(W.div,{...r,ref:t}),i):null});Pn.displayName=zo;var et=0;function $o(){d.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??Wt()),document.body.insertAdjacentElement("beforeend",e[1]??Wt()),et++,()=>{et===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),et--}},[])}function Wt(){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 On(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 Wo(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 Le="right-scroll-bar-position",Ie="width-before-scroll-bar",Bo="with-scroll-bars-hidden",Ho="--removed-body-scroll-bar-size";function tt(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function Uo(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 Vo=typeof window<"u"?d.useLayoutEffect:d.useEffect,Bt=new WeakMap;function Yo(e,t){var n=Uo(null,function(r){return e.forEach(function(o){return tt(o,r)})});return Vo(function(){var r=Bt.get(n);if(r){var o=new Set(r),s=new Set(e),i=n.current;o.forEach(function(a){s.has(a)||tt(a,null)}),s.forEach(function(a){o.has(a)||tt(a,i)})}Bt.set(n,e)},[e]),n}function Ko(e){return e}function Xo(e,t){t===void 0&&(t=Ko);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 Go(e){e===void 0&&(e={});var t=Xo(null);return t.options=K({async:!0,ssr:!1},e),t}var jn=function(e){var t=e.sideCar,n=On(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))};jn.isSideCarExport=!0;function Zo(e,t){return e.useMedium(t),jn}var kn=Go(),nt=function(){},Ve=d.forwardRef(function(e,t){var n=d.useRef(null),r=d.useState({onScrollCapture:nt,onWheelCapture:nt,onTouchMoveCapture:nt}),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=On(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),E=g,R=Yo([n,t]),C=K(K({},y),o);return d.createElement(d.Fragment,null,f&&d.createElement(E,{sideCar:kn,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({},C),{ref:R})):d.createElement(w,K({},C,{className:l,ref:R}),a))});Ve.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};Ve.classNames={fullWidth:Ie,zeroRight:Le};var qo=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function Qo(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=qo();return t&&e.setAttribute("nonce",t),e}function Jo(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function es(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var ts=function(){var e=0,t=null;return{add:function(n){e==0&&(t=Qo())&&(Jo(t,n),es(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},ns=function(){var e=ts();return function(t,n){d.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},Tn=function(){var e=ns(),t=function(n){var r=n.styles,o=n.dynamic;return e(r,o),null};return t},rs={left:0,top:0,right:0,gap:0},rt=function(e){return parseInt(e||"",10)||0},os=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[rt(n),rt(r),rt(o)]},ss=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return rs;var t=os(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])}},is=Tn(),ge="data-scroll-locked",as=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(Bo,` {
3
+ overflow: hidden `).concat(r,`;
4
+ padding-right: `).concat(a,"px ").concat(r,`;
5
+ }
6
+ body[`).concat(ge,`] {
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(Le,` {
20
+ right: `).concat(a,"px ").concat(r,`;
21
+ }
22
+
23
+ .`).concat(Ie,` {
24
+ margin-right: `).concat(a,"px ").concat(r,`;
25
+ }
26
+
27
+ .`).concat(Le," .").concat(Le,` {
28
+ right: 0 `).concat(r,`;
29
+ }
30
+
31
+ .`).concat(Ie," .").concat(Ie,` {
32
+ margin-right: 0 `).concat(r,`;
33
+ }
34
+
35
+ body[`).concat(ge,`] {
36
+ `).concat(Ho,": ").concat(a,`px;
37
+ }
38
+ `)},Ht=function(){var e=parseInt(document.body.getAttribute(ge)||"0",10);return isFinite(e)?e:0},cs=function(){d.useEffect(function(){return document.body.setAttribute(ge,(Ht()+1).toString()),function(){var e=Ht()-1;e<=0?document.body.removeAttribute(ge):document.body.setAttribute(ge,e.toString())}},[])},ls=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,o=r===void 0?"margin":r;cs();var s=d.useMemo(function(){return ss(o)},[o]);return d.createElement(is,{styles:as(s,!t,o,n?"":"!important")})},ut=!1;if(typeof window<"u")try{var je=Object.defineProperty({},"passive",{get:function(){return ut=!0,!0}});window.addEventListener("test",je,je),window.removeEventListener("test",je,je)}catch{ut=!1}var fe=ut?{passive:!1}:!1,us=function(e){return e.tagName==="TEXTAREA"},Mn=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return n[t]!=="hidden"&&!(n.overflowY===n.overflowX&&!us(e)&&n[t]==="visible")},ds=function(e){return Mn(e,"overflowY")},fs=function(e){return Mn(e,"overflowX")},Ut=function(e,t){var n=t.ownerDocument,r=t;do{typeof ShadowRoot<"u"&&r instanceof ShadowRoot&&(r=r.host);var o=_n(e,r);if(o){var s=Dn(e,r),i=s[1],a=s[2];if(i>a)return!0}r=r.parentNode}while(r&&r!==n.body);return!1},ms=function(e){var t=e.scrollTop,n=e.scrollHeight,r=e.clientHeight;return[t,n,r]},ps=function(e){var t=e.scrollLeft,n=e.scrollWidth,r=e.clientWidth;return[t,n,r]},_n=function(e,t){return e==="v"?ds(t):fs(t)},Dn=function(e,t){return e==="v"?ms(t):ps(t)},hs=function(e,t){return e==="h"&&t==="rtl"?-1:1},gs=function(e,t,n,r,o){var s=hs(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=Dn(e,a),x=h[0],p=h[1],v=h[2],b=p-v-s*x;(x||b)&&_n(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},ke=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},Vt=function(e){return[e.deltaX,e.deltaY]},Yt=function(e){return e&&"current"in e?e.current:e},xs=function(e,t){return e[0]===t[0]&&e[1]===t[1]},vs=function(e){return`
39
+ .block-interactivity-`.concat(e,` {pointer-events: none;}
40
+ .allow-interactivity-`).concat(e,` {pointer-events: all;}
41
+ `)},bs=0,me=[];function ws(e){var t=d.useRef([]),n=d.useRef([0,0]),r=d.useRef(),o=d.useState(bs++)[0],s=d.useState(Tn)[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=Wo([e.lockRef.current],(e.shards||[]).map(Yt),!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=ke(p),w=n.current,N="deltaX"in p?p.deltaX:w[0]-b[0],y="deltaY"in p?p.deltaY:w[1]-b[1],E,R=p.target,C=Math.abs(N)>Math.abs(y)?"h":"v";if("touches"in p&&C==="h"&&R.type==="range")return!1;var P=window.getSelection(),j=P&&P.anchorNode,O=j?j===R||j.contains(R):!1;if(O)return!1;var T=Ut(C,R);if(!T)return!0;if(T?E=C:(E=C==="v"?"h":"v",T=Ut(C,R)),!T)return!1;if(!r.current&&"changedTouches"in p&&(N||y)&&(r.current=E),!E)return!0;var L=r.current||E;return gs(L,v,p,L==="h"?N:y)},[]),l=d.useCallback(function(p){var v=p;if(!(!me.length||me[me.length-1]!==s)){var b="deltaY"in v?Vt(v):ke(v),w=t.current.filter(function(E){return E.name===v.type&&(E.target===v.target||v.target===E.shadowParent)&&xs(E.delta,b)})[0];if(w&&w.should){v.cancelable&&v.preventDefault();return}if(!w){var N=(i.current.shards||[]).map(Yt).filter(Boolean).filter(function(E){return E.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:ys(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=ke(p),r.current=void 0},[]),m=d.useCallback(function(p){u(p.type,Vt(p),p.target,a(p,e.lockRef.current))},[]),g=d.useCallback(function(p){u(p.type,ke(p),p.target,a(p,e.lockRef.current))},[]);d.useEffect(function(){return me.push(s),e.setCallbacks({onScrollCapture:m,onWheelCapture:m,onTouchMoveCapture:g}),document.addEventListener("wheel",l,fe),document.addEventListener("touchmove",l,fe),document.addEventListener("touchstart",f,fe),function(){me=me.filter(function(p){return p!==s}),document.removeEventListener("wheel",l,fe),document.removeEventListener("touchmove",l,fe),document.removeEventListener("touchstart",f,fe)}},[]);var h=e.removeScrollBar,x=e.inert;return d.createElement(d.Fragment,null,x?d.createElement(s,{styles:vs(o)}):null,h?d.createElement(ls,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function ys(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const Ns=Zo(kn,ws);var Ln=d.forwardRef(function(e,t){return d.createElement(Ve,K({},e,{ref:t,sideCar:Ns}))});Ln.classNames=Ve.classNames;var Cs=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},pe=new WeakMap,Te=new WeakMap,Me={},ot=0,In=function(e){return e&&(e.host||In(e.parentNode))},Es=function(e,t){return t.map(function(n){if(e.contains(n))return n;var r=In(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})},Ss=function(e,t,n,r){var o=Es(t,Array.isArray(e)?e:[e]);Me[n]||(Me[n]=new WeakMap);var s=Me[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=(pe.get(g)||0)+1,v=(s.get(g)||0)+1;pe.set(g,p),s.set(g,v),i.push(g),p===1&&x&&Te.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(),ot++,function(){i.forEach(function(m){var g=pe.get(m)-1,h=s.get(m)-1;pe.set(m,g),s.set(m,h),g||(Te.has(m)||m.removeAttribute(r),Te.delete(m)),h||m.removeAttribute(n)}),ot--,ot||(pe=new WeakMap,pe=new WeakMap,Te=new WeakMap,Me={})}},Rs=function(e,t,n){n===void 0&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),o=Cs(e);return o?(r.push.apply(r,Array.from(o.querySelectorAll("[aria-live], script"))),Ss(r,o,n,"aria-hidden")):function(){return null}};function As(e){const[t,n]=d.useState(void 0);return ee(()=>{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 Ps=["top","right","bottom","left"],se=Math.min,z=Math.max,ze=Math.round,_e=Math.floor,G=e=>({x:e,y:e}),Os={left:"right",right:"left",bottom:"top",top:"bottom"},js={start:"end",end:"start"};function dt(e,t,n){return z(e,se(t,n))}function te(e,t){return typeof e=="function"?e(t):e}function ne(e){return e.split("-")[0]}function ye(e){return e.split("-")[1]}function Nt(e){return e==="x"?"y":"x"}function Ct(e){return e==="y"?"height":"width"}const ks=new Set(["top","bottom"]);function X(e){return ks.has(ne(e))?"y":"x"}function Et(e){return Nt(X(e))}function Ts(e,t,n){n===void 0&&(n=!1);const r=ye(e),o=Et(e),s=Ct(o);let i=o==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[s]>t.floating[s]&&(i=$e(i)),[i,$e(i)]}function Ms(e){const t=$e(e);return[ft(e),t,ft(t)]}function ft(e){return e.replace(/start|end/g,t=>js[t])}const Kt=["left","right"],Xt=["right","left"],_s=["top","bottom"],Ds=["bottom","top"];function Ls(e,t,n){switch(e){case"top":case"bottom":return n?t?Xt:Kt:t?Kt:Xt;case"left":case"right":return t?_s:Ds;default:return[]}}function Is(e,t,n,r){const o=ye(e);let s=Ls(ne(e),n==="start",r);return o&&(s=s.map(i=>i+"-"+o),t&&(s=s.concat(s.map(ft)))),s}function $e(e){return e.replace(/left|right|bottom|top/g,t=>Os[t])}function Fs(e){return{top:0,right:0,bottom:0,left:0,...e}}function Fn(e){return typeof e!="number"?Fs(e):{top:e,right:e,bottom:e,left:e}}function We(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 Gt(e,t,n){let{reference:r,floating:o}=e;const s=X(t),i=Et(t),a=Ct(i),l=ne(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(ye(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 zs(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}=te(t,e),x=Fn(h),v=a[g?m==="floating"?"reference":"floating":m],b=We(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},E=We(s.convertOffsetParentRelativeRectToViewportRelativeRect?await s.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:w,offsetParent:N,strategy:l}):w);return{top:(b.top-E.top+x.top)/y.y,bottom:(E.bottom-b.bottom+x.bottom)/y.y,left:(b.left-E.left+x.left)/y.x,right:(E.right-b.right+x.right)/y.x}}const $s=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}=Gt(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:E,reset:R}=await w({x:f,y:m,initialPlacement:r,placement:g,strategy:o,middlewareData:h,rects:u,platform:{...i,detectOverflow:(p=i.detectOverflow)!=null?p:zs},elements:{reference:e,floating:t}});f=N??f,m=y??m,h={...h,[b]:{...h[b],...E}},R&&x<=50&&(x++,typeof R=="object"&&(R.placement&&(g=R.placement),R.rects&&(u=R.rects===!0?await i.getElementRects({reference:e,floating:t,strategy:o}):R.rects),{x:f,y:m}=Gt(u,g,l)),v=-1)}return{x:f,y:m,placement:g,strategy:o,middlewareData:h}},Ws=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}=te(e,t)||{};if(u==null)return{};const m=Fn(f),g={x:n,y:r},h=Et(o),x=Ct(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],E=g[h]-s.reference[h],R=await(i.getOffsetParent==null?void 0:i.getOffsetParent(u));let C=R?R[N]:0;(!C||!await(i.isElement==null?void 0:i.isElement(R)))&&(C=a.floating[N]||s.floating[x]);const P=y/2-E/2,j=C/2-p[x]/2-1,O=se(m[b],j),T=se(m[w],j),L=O,M=C-p[x]-T,k=C/2-p[x]/2+P,F=dt(L,k,M),_=!l.arrow&&ye(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:_}}}),Bs=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}=te(e,t);if((n=s.arrow)!=null&&n.alignmentOffset)return{};const b=ne(o),w=X(a),N=ne(a)===a,y=await(l.isRTL==null?void 0:l.isRTL(u.floating)),E=g||(N||!p?[$e(a)]:Ms(a)),R=x!=="none";!g&&R&&E.push(...Is(a,p,x,y));const C=[a,...E],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=Ts(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=C[k];if(F&&(!(m==="alignment"?w!==X(F):!1)||O.every(A=>X(A.placement)===w?A.overflows[0]>0:!0)))return{data:{index:k,overflows:O},reset:{placement:F}};let _=(L=O.filter(D=>D.overflows[0]<=0).sort((D,A)=>D.overflows[1]-A.overflows[1])[0])==null?void 0:L.placement;if(!_)switch(h){case"bestFit":{var M;const D=(M=O.filter(A=>{if(R){const I=X(A.placement);return I===w||I==="y"}return!0}).map(A=>[A.placement,A.overflows.filter(I=>I>0).reduce((I,V)=>I+V,0)]).sort((A,I)=>A[1]-I[1])[0])==null?void 0:M[0];D&&(_=D);break}case"initialPlacement":_=a;break}if(o!==_)return{reset:{placement:_}}}return{}}}};function Zt(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function qt(e){return Ps.some(t=>e[t]>=0)}const Hs=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n,platform:r}=t,{strategy:o="referenceHidden",...s}=te(e,t);switch(o){case"referenceHidden":{const i=await r.detectOverflow(t,{...s,elementContext:"reference"}),a=Zt(i,n.reference);return{data:{referenceHiddenOffsets:a,referenceHidden:qt(a)}}}case"escaped":{const i=await r.detectOverflow(t,{...s,altBoundary:!0}),a=Zt(i,n.floating);return{data:{escapedOffsets:a,escaped:qt(a)}}}default:return{}}}}},zn=new Set(["left","top"]);async function Us(e,t){const{placement:n,platform:r,elements:o}=e,s=await(r.isRTL==null?void 0:r.isRTL(o.floating)),i=ne(n),a=ye(n),l=X(n)==="y",u=zn.has(i)?-1:1,f=s&&l?-1:1,m=te(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 Vs=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 Us(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}}}}},Ys=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}=te(e,t),f={x:n,y:r},m=await s.detectOverflow(t,u),g=X(ne(o)),h=Nt(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=dt(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=dt(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}}}}}},Ks=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}=te(e,t),f={x:n,y:r},m=X(o),g=Nt(m);let h=f[g],x=f[m];const p=te(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,E=s.reference[g]+s.reference[N]-v.mainAxis;h<y?h=y:h>E&&(h=E)}if(u){var b,w;const N=g==="y"?"width":"height",y=zn.has(ne(o)),E=s.reference[m]-s.floating[N]+(y&&((b=i.offset)==null?void 0:b[m])||0)+(y?0:v.crossAxis),R=s.reference[m]+s.reference[N]+(y?0:((w=i.offset)==null?void 0:w[m])||0)-(y?v.crossAxis:0);x<E?x=E:x>R&&(x=R)}return{[g]:h,[m]:x}}}},Xs=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}=te(e,t),f=await i.detectOverflow(t,u),m=ne(o),g=ye(o),h=X(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=se(p-f[v],w),E=se(x-f[b],N),R=!t.middlewareData.shift;let C=y,P=E;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(P=N),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(C=w),R&&!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)):C=p-2*(L!==0||M!==0?L+M:z(f.top,f.bottom))}await l({...t,availableWidth:P,availableHeight:C});const j=await i.getDimensions(a.floating);return x!==j.width||p!==j.height?{reset:{rects:!0}}:{}}}};function Ye(){return typeof window<"u"}function Ne(e){return $n(e)?(e.nodeName||"").toLowerCase():"#document"}function $(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function q(e){var t;return(t=($n(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function $n(e){return Ye()?e instanceof Node||e instanceof $(e).Node:!1}function H(e){return Ye()?e instanceof Element||e instanceof $(e).Element:!1}function Z(e){return Ye()?e instanceof HTMLElement||e instanceof $(e).HTMLElement:!1}function Qt(e){return!Ye()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof $(e).ShadowRoot}const Gs=new Set(["inline","contents"]);function Re(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=U(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!Gs.has(o)}const Zs=new Set(["table","td","th"]);function qs(e){return Zs.has(Ne(e))}const Qs=[":popover-open",":modal"];function Ke(e){return Qs.some(t=>{try{return e.matches(t)}catch{return!1}})}const Js=["transform","translate","scale","rotate","perspective"],ei=["transform","translate","scale","rotate","perspective","filter"],ti=["paint","layout","strict","content"];function St(e){const t=Rt(),n=H(e)?U(e):e;return Js.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)||ei.some(r=>(n.willChange||"").includes(r))||ti.some(r=>(n.contain||"").includes(r))}function ni(e){let t=ie(e);for(;Z(t)&&!be(t);){if(St(t))return t;if(Ke(t))return null;t=ie(t)}return null}function Rt(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const ri=new Set(["html","body","#document"]);function be(e){return ri.has(Ne(e))}function U(e){return $(e).getComputedStyle(e)}function Xe(e){return H(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function ie(e){if(Ne(e)==="html")return e;const t=e.assignedSlot||e.parentNode||Qt(e)&&e.host||q(e);return Qt(t)?t.host:t}function Wn(e){const t=ie(e);return be(t)?e.ownerDocument?e.ownerDocument.body:e.body:Z(t)&&Re(t)?t:Wn(t)}function Se(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const o=Wn(e),s=o===((r=e.ownerDocument)==null?void 0:r.body),i=$(o);if(s){const a=mt(i);return t.concat(i,i.visualViewport||[],Re(o)?o:[],a&&n?Se(a):[])}return t.concat(o,Se(o,[],n))}function mt(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function Bn(e){const t=U(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=Z(e),s=o?e.offsetWidth:n,i=o?e.offsetHeight:r,a=ze(n)!==s||ze(r)!==i;return a&&(n=s,r=i),{width:n,height:r,$:a}}function At(e){return H(e)?e:e.contextElement}function xe(e){const t=At(e);if(!Z(t))return G(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:s}=Bn(t);let i=(s?ze(n.width):n.width)/r,a=(s?ze(n.height):n.height)/o;return(!i||!Number.isFinite(i))&&(i=1),(!a||!Number.isFinite(a))&&(a=1),{x:i,y:a}}const oi=G(0);function Hn(e){const t=$(e);return!Rt()||!t.visualViewport?oi:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function si(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==$(e)?!1:t}function le(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const o=e.getBoundingClientRect(),s=At(e);let i=G(1);t&&(r?H(r)&&(i=xe(r)):i=xe(e));const a=si(s,n,r)?Hn(s):G(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&&H(r)?$(r):r;let x=g,p=mt(x);for(;p&&r&&h!==x;){const v=xe(p),b=p.getBoundingClientRect(),w=U(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=mt(x)}}return We({width:f,height:m,x:l,y:u})}function Ge(e,t){const n=Xe(e).scrollLeft;return t?t.left+n:le(q(e)).left+n}function Un(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 ii(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e;const s=o==="fixed",i=q(r),a=t?Ke(t.floating):!1;if(r===i||a&&s)return n;let l={scrollLeft:0,scrollTop:0},u=G(1);const f=G(0),m=Z(r);if((m||!m&&!s)&&((Ne(r)!=="body"||Re(i))&&(l=Xe(r)),Z(r))){const h=le(r);u=xe(r),f.x=h.x+r.clientLeft,f.y=h.y+r.clientTop}const g=i&&!m&&!s?Un(i,l):G(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 ai(e){return Array.from(e.getClientRects())}function ci(e){const t=q(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 U(r).direction==="rtl"&&(i+=z(t.clientWidth,r.clientWidth)-o),{width:o,height:s,x:i,y:a}}const Jt=25;function li(e,t){const n=$(e),r=q(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=Rt();(!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<=Jt&&(s-=x)}else u<=Jt&&(s+=u);return{width:s,height:i,x:a,y:l}}const ui=new Set(["absolute","fixed"]);function di(e,t){const n=le(e,!0,t==="fixed"),r=n.top+e.clientTop,o=n.left+e.clientLeft,s=Z(e)?xe(e):G(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 en(e,t,n){let r;if(t==="viewport")r=li(e,n);else if(t==="document")r=ci(q(e));else if(H(t))r=di(t,n);else{const o=Hn(e);r={x:t.x-o.x,y:t.y-o.y,width:t.width,height:t.height}}return We(r)}function Vn(e,t){const n=ie(e);return n===t||!H(n)||be(n)?!1:U(n).position==="fixed"||Vn(n,t)}function fi(e,t){const n=t.get(e);if(n)return n;let r=Se(e,[],!1).filter(a=>H(a)&&Ne(a)!=="body"),o=null;const s=U(e).position==="fixed";let i=s?ie(e):e;for(;H(i)&&!be(i);){const a=U(i),l=St(i);!l&&a.position==="fixed"&&(o=null),(s?!l&&!o:!l&&a.position==="static"&&!!o&&ui.has(o.position)||Re(i)&&!l&&Vn(e,i))?r=r.filter(f=>f!==i):o=a,i=ie(i)}return t.set(e,r),r}function mi(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const i=[...n==="clippingAncestors"?Ke(t)?[]:fi(t,this._c):[].concat(n),r],a=i[0],l=i.reduce((u,f)=>{const m=en(t,f,o);return u.top=z(m.top,u.top),u.right=se(m.right,u.right),u.bottom=se(m.bottom,u.bottom),u.left=z(m.left,u.left),u},en(t,a,o));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function pi(e){const{width:t,height:n}=Bn(e);return{width:t,height:n}}function hi(e,t,n){const r=Z(t),o=q(t),s=n==="fixed",i=le(e,!0,s,t);let a={scrollLeft:0,scrollTop:0};const l=G(0);function u(){l.x=Ge(o)}if(r||!r&&!s)if((Ne(t)!=="body"||Re(o))&&(a=Xe(t)),r){const h=le(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?Un(o,a):G(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 st(e){return U(e).position==="static"}function tn(e,t){if(!Z(e)||U(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return q(e)===n&&(n=n.ownerDocument.body),n}function Yn(e,t){const n=$(e);if(Ke(e))return n;if(!Z(e)){let o=ie(e);for(;o&&!be(o);){if(H(o)&&!st(o))return o;o=ie(o)}return n}let r=tn(e,t);for(;r&&qs(r)&&st(r);)r=tn(r,t);return r&&be(r)&&st(r)&&!St(r)?n:r||ni(e)||n}const gi=async function(e){const t=this.getOffsetParent||Yn,n=this.getDimensions,r=await n(e.floating);return{reference:hi(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function xi(e){return U(e).direction==="rtl"}const vi={convertOffsetParentRelativeRectToViewportRelativeRect:ii,getDocumentElement:q,getClippingRect:mi,getOffsetParent:Yn,getElementRects:gi,getClientRects:ai,getDimensions:pi,getScale:xe,isElement:H,isRTL:xi};function Kn(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function bi(e,t){let n=null,r;const o=q(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=_e(m),p=_e(o.clientWidth-(f+g)),v=_e(o.clientHeight-(m+h)),b=_e(f),N={rootMargin:-x+"px "+-p+"px "+-v+"px "+-b+"px",threshold:z(0,se(1,l))||1};let y=!0;function E(R){const C=R[0].intersectionRatio;if(C!==l){if(!y)return i();C?i(!1,C):r=setTimeout(()=>{i(!1,1e-7)},1e3)}C===1&&!Kn(u,e.getBoundingClientRect())&&i(),y=!1}try{n=new IntersectionObserver(E,{...N,root:o.ownerDocument})}catch{n=new IntersectionObserver(E,N)}n.observe(e)}return i(!0),s}function wi(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?Se(u):[],...Se(t)]:[];f.forEach(b=>{o&&b.addEventListener("scroll",n,{passive:!0}),s&&b.addEventListener("resize",n)});const m=u&&a?bi(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?le(e):null;l&&v();function v(){const b=le(e);p&&!Kn(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 yi=Vs,Ni=Ys,Ci=Bs,Ei=Xs,Si=Hs,nn=Ws,Ri=Ks,Ai=(e,t,n)=>{const r=new Map,o={platform:vi,...n},s={...o.platform,_c:r};return $s(e,t,{...o,platform:s})};var Pi=typeof document<"u",Oi=function(){},Fe=Pi?d.useLayoutEffect:Oi;function Be(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(!Be(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)&&!Be(e[s],t[s]))return!1}return!0}return e!==e&&t!==t}function Xn(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function rn(e,t){const n=Xn(e);return Math.round(t*n)/n}function it(e){const t=d.useRef(e);return Fe(()=>{t.current=e}),t}function ji(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);Be(g,r)||h(r);const[x,p]=d.useState(null),[v,b]=d.useState(null),w=d.useCallback(A=>{A!==R.current&&(R.current=A,p(A))},[]),N=d.useCallback(A=>{A!==C.current&&(C.current=A,b(A))},[]),y=s||x,E=i||v,R=d.useRef(null),C=d.useRef(null),P=d.useRef(f),j=l!=null,O=it(l),T=it(o),L=it(u),M=d.useCallback(()=>{if(!R.current||!C.current)return;const A={placement:t,strategy:n,middleware:g};T.current&&(A.platform=T.current),Ai(R.current,C.current,A).then(I=>{const V={...I,isPositioned:L.current!==!1};k.current&&!Be(P.current,V)&&(P.current=V,dn.flushSync(()=>{m(V)}))})},[g,t,n,T,L]);Fe(()=>{u===!1&&P.current.isPositioned&&(P.current.isPositioned=!1,m(A=>({...A,isPositioned:!1})))},[u]);const k=d.useRef(!1);Fe(()=>(k.current=!0,()=>{k.current=!1}),[]),Fe(()=>{if(y&&(R.current=y),E&&(C.current=E),y&&E){if(O.current)return O.current(y,E,M);M()}},[y,E,M,O,j]);const F=d.useMemo(()=>({reference:R,floating:C,setReference:w,setFloating:N}),[w,N]),_=d.useMemo(()=>({reference:y,floating:E}),[y,E]),D=d.useMemo(()=>{const A={position:n,left:0,top:0};if(!_.floating)return A;const I=rn(_.floating,f.x),V=rn(_.floating,f.y);return a?{...A,transform:"translate("+I+"px, "+V+"px)",...Xn(_.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:I,top:V}},[n,a,_.floating,f.x,f.y]);return d.useMemo(()=>({...f,update:M,refs:F,elements:_,floatingStyles:D}),[f,M,F,_,D])}const ki=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?nn({element:r.current,padding:o}).fn(n):{}:r?nn({element:r,padding:o}).fn(n):{}}}},Ti=(e,t)=>({...yi(e),options:[e,t]}),Mi=(e,t)=>({...Ni(e),options:[e,t]}),_i=(e,t)=>({...Ri(e),options:[e,t]}),Di=(e,t)=>({...Ci(e),options:[e,t]}),Li=(e,t)=>({...Ei(e),options:[e,t]}),Ii=(e,t)=>({...Si(e),options:[e,t]}),Fi=(e,t)=>({...ki(e),options:[e,t]});var zi="Arrow",Gn=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"})})});Gn.displayName=zi;var $i=Gn,Pt="Popper",[Zn,qn]=vt(Pt),[Wi,Qn]=Zn(Pt),Jn=e=>{const{__scopePopper:t,children:n}=e,[r,o]=d.useState(null);return c.jsx(Wi,{scope:t,anchor:r,onAnchorChange:o,children:n})};Jn.displayName=Pt;var er="PopperAnchor",tr=d.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:r,...o}=e,s=Qn(er,n),i=d.useRef(null),a=re(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})});tr.displayName=er;var Ot="PopperContent",[Bi,Hi]=Zn(Ot),nr=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=Qn(Ot,n),[b,w]=d.useState(null),N=re(t,Ce=>w(Ce)),[y,E]=d.useState(null),R=As(y),C=R?.width??0,P=R?.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(Vi),altBoundary:L},{refs:k,floatingStyles:F,placement:_,isPositioned:D,middlewareData:A}=ji({strategy:"fixed",placement:j,whileElementsMounted:(...Ce)=>wi(...Ce,{animationFrame:h==="always"}),elements:{reference:v.anchor},middleware:[Ti({mainAxis:o+P,alignmentAxis:i}),l&&Mi({mainAxis:!0,crossAxis:!1,limiter:m==="partial"?_i():void 0,...M}),l&&Di({...M}),Li({...M,apply:({elements:Ce,rects:_t,availableWidth:Or,availableHeight:jr})=>{const{width:kr,height:Tr}=_t.reference,Pe=Ce.floating.style;Pe.setProperty("--radix-popper-available-width",`${Or}px`),Pe.setProperty("--radix-popper-available-height",`${jr}px`),Pe.setProperty("--radix-popper-anchor-width",`${kr}px`),Pe.setProperty("--radix-popper-anchor-height",`${Tr}px`)}}),y&&Fi({element:y,padding:a}),Yi({arrowWidth:C,arrowHeight:P}),g&&Ii({strategy:"referenceHidden",...M})]}),[I,V]=sr(_),Mt=ve(x);ee(()=>{D&&Mt?.()},[D,Mt]);const Er=A.arrow?.x,Sr=A.arrow?.y,Rr=A.arrow?.centerOffset!==0,[Ar,Pr]=d.useState();return ee(()=>{b&&Pr(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:Ar,"--radix-popper-transform-origin":[A.transformOrigin?.x,A.transformOrigin?.y].join(" "),...A.hide?.referenceHidden&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:c.jsx(Bi,{scope:n,placedSide:I,onArrowChange:E,arrowX:Er,arrowY:Sr,shouldHideArrow:Rr,children:c.jsx(W.div,{"data-side":I,"data-align":V,...p,ref:N,style:{...p.style,animation:D?void 0:"none"}})})})});nr.displayName=Ot;var rr="PopperArrow",Ui={top:"bottom",right:"left",bottom:"top",left:"right"},or=d.forwardRef(function(t,n){const{__scopePopper:r,...o}=t,s=Hi(rr,r),i=Ui[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($i,{...o,ref:n,style:{...o.style,display:"block"}})})});or.displayName=rr;function Vi(e){return e!==null}var Yi=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]=sr(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 sr(e){const[t,n="center"]=e.split("-");return[t,n]}var Ki=Jn,ir=tr,Xi=nr,Gi=or,Ze="Popover",[ar]=vt(Ze,[qn]),Ae=qn(),[Zi,ce]=ar(Ze),cr=e=>{const{__scopePopover:t,children:n,open:r,defaultOpen:o,onOpenChange:s,modal:i=!1}=e,a=Ae(t),l=d.useRef(null),[u,f]=d.useState(!1),[m,g]=xn({prop:r,defaultProp:o??!1,onChange:s,caller:Ze});return c.jsx(Ki,{...a,children:c.jsx(Zi,{scope:t,contentId:vn(),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})})};cr.displayName=Ze;var lr="PopoverAnchor",ur=d.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,o=ce(lr,n),s=Ae(n),{onCustomAnchorAdd:i,onCustomAnchorRemove:a}=o;return d.useEffect(()=>(i(),()=>a()),[i,a]),c.jsx(ir,{...s,...r,ref:t})});ur.displayName=lr;var dr="PopoverTrigger",fr=d.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,o=ce(dr,n),s=Ae(n),i=re(t,o.triggerRef),a=c.jsx(W.button,{type:"button","aria-haspopup":"dialog","aria-expanded":o.open,"aria-controls":o.contentId,"data-state":vr(o.open),...r,ref:i,onClick:Q(e.onClick,o.onOpenToggle)});return o.hasCustomAnchor?a:c.jsx(ir,{asChild:!0,...s,children:a})});fr.displayName=dr;var jt="PopoverPortal",[qi,Qi]=ar(jt,{forceMount:void 0}),mr=e=>{const{__scopePopover:t,forceMount:n,children:r,container:o}=e,s=ce(jt,t);return c.jsx(qi,{scope:t,forceMount:n,children:c.jsx(He,{present:n||s.open,children:c.jsx(Pn,{asChild:!0,container:o,children:r})})})};mr.displayName=jt;var we="PopoverContent",pr=d.forwardRef((e,t)=>{const n=Qi(we,e.__scopePopover),{forceMount:r=n.forceMount,...o}=e,s=ce(we,e.__scopePopover);return c.jsx(He,{present:r||s.open,children:s.modal?c.jsx(ea,{...o,ref:t}):c.jsx(ta,{...o,ref:t})})});pr.displayName=we;var Ji=un("PopoverContent.RemoveScroll"),ea=d.forwardRef((e,t)=>{const n=ce(we,e.__scopePopover),r=d.useRef(null),o=re(t,r),s=d.useRef(!1);return d.useEffect(()=>{const i=r.current;if(i)return Rs(i)},[]),c.jsx(Ln,{as:Ji,allowPinchZoom:!0,children:c.jsx(hr,{...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})})})}),ta=d.forwardRef((e,t)=>{const n=ce(we,e.__scopePopover),r=d.useRef(!1),o=d.useRef(!1);return c.jsx(hr,{...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()}})}),hr=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=ce(we,n),h=Ae(n);return $o(),c.jsx(Rn,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:o,onUnmountAutoFocus:s,children:c.jsx(En,{asChild:!0,disableOutsidePointerEvents:i,onInteractOutside:f,onEscapeKeyDown:a,onPointerDownOutside:l,onFocusOutside:u,onDismiss:()=>g.onOpenChange(!1),children:c.jsx(Xi,{"data-state":vr(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)"}})})})}),gr="PopoverClose",xr=d.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,o=ce(gr,n);return c.jsx(W.button,{type:"button",...r,ref:t,onClick:Q(e.onClick,()=>o.onOpenChange(!1))})});xr.displayName=gr;var na="PopoverArrow",ra=d.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,o=Ae(n);return c.jsx(Gi,{...o,...r,ref:t})});ra.displayName=na;function vr(e){return e?"open":"closed"}var oa=cr,sa=ur,ia=fr,aa=mr,ca=pr,la=xr;const on={neutral:"text-muted-foreground",info:"text-info",success:"text-success",warning:"text-warning",danger:"text-destructive"},ua={neutral:"bg-muted-foreground/60",info:"bg-info",success:"bg-success",warning:"bg-warning",danger:"bg-destructive"},ue={neutral:"text-foreground/70",info:"text-info-ink",success:"text-success-ink",warning:"text-warning-ink",danger:"text-destructive-ink"},kt={neutral:"bg-foreground/[0.06]",info:"bg-info/10",success:"bg-success/10",warning:"bg-warning/10",danger:"bg-destructive/10"},da={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"},sn={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)"},fa=["var(--viz-0)","var(--viz-1)","var(--viz-2)","var(--viz-3)","var(--viz-4)","var(--viz-5)","var(--viz-6)"],ma={1:[6],2:[2,6],3:[2,4,6],4:[2,3,4,6],5:[2,3,4,5,6]};function pa(e){return ma[Math.min(5,Math.max(1,e))].map(n=>fa[n])}const fc={neutral:"var(--viz-2)",info:"var(--info)",success:"var(--success)",warning:"var(--warning)",danger:"var(--destructive)"},mc={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)"},Y={background:"#1e1e1e",foreground:"#d4d4d4",muted:"#808080",red:"#f44747",green:"#6a9955",yellow:"#d7ba7d",blue:"#569cd6",cyan:"#4ec9b0",magenta:"#c586c0"},an=new Map;function ha(e,t){const n=`${e??""}|${JSON.stringify(t)}`;let r=an.get(n);return r||(r=new Intl.NumberFormat(e,t),an.set(n,r)),r}function pt(e,{compact:t=!1,maximumFractionDigits:n,locale:r}={}){return Number.isFinite(e)?ha(r,{notation:t?"compact":"standard",maximumFractionDigits:n??(t||Math.abs(e)<10?1:0)}).format(e):"—"}function pc(e,t=0){return Number.isFinite(e)?`${(e*100).toFixed(t)}%`:"—"}function hc(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 gc(e){return Number.isFinite(e)?e>0?`+${pt(e)}`:e<0?`−${pt(Math.abs(e))}`:"0":"—"}function J(e){return e!=null&&typeof e!="boolean"&&e!==""}function xc(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 ga({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 xa(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 va(){return typeof window<"u"&&!!window.matchMedia?.("(prefers-reduced-motion: reduce)").matches}function vc(){return d.useSyncExternalStore(xa,va,()=>!1)}function bc(e){return`${e}-${d.useId().replace(/[^a-zA-Z0-9_-]/g,"")}`}const ba=3e4;let ht=Date.now();const De=new Set;let Ee=null;function wa(e){return De.add(e),Ee||(ht=Date.now(),Ee=setInterval(()=>{ht=Date.now(),De.forEach(t=>t())},ba)),()=>{De.delete(e),De.size===0&&Ee&&(clearInterval(Ee),Ee=null)}}function cn(){return ht}function ya(){return d.useSyncExternalStore(wa,cn,cn)}const gt=60,xt=60*gt,at=24*xt;function Na(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<gt)return n("now");if(s<xt)return n("{count}m",{count:Math.floor(s/gt)});if(s<at)return n("{count}h",{count:Math.floor(s/xt)});if(s<7*at)return n("{count}d",{count:Math.floor(s/at)});const i=o.getFullYear()===new Date(t).getFullYear();return o.toLocaleDateString(r,i?{month:"numeric",day:"numeric"}:{year:"numeric",month:"numeric"})}const Ca={xs:12,sm:14,md:16,lg:20};function Ea({size:e="sm",label:t,className:n}){const r=Ca[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 Sa={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 Ra({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",Sa[n],r==="pill"?"rounded-full":"rounded",t==="soft"&&[kt[e],ue[e]],t==="outline"&&["bg-background ring-1 ring-inset",e==="neutral"?"text-foreground/80 ring-border":[ue[e],"ring-current/25"]],t==="solid"&&da[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",ua[e])}),o,i]})}function Aa({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",kt[n],ue[n]],r),...o,children:s})}const Pa="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",Oa={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"},ja={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"},ka={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"}},Ta="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 br({variant:e="secondary",tone:t="neutral",size:n="md",block:r=!1,iconOnly:o=!1,loading:s=!1,className:i}={}){return S(Pa,o?ja[n]:Oa[n],o&&e==="ghost"&&t==="neutral"?Ta:ka[e][t],r&&"w-full",s&&"disabled:opacity-100",i)}function wc({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=br({variant:e,tone:t,size:n,block:o,loading:r,className:i});return s?c.jsx(_r,{"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(Ea,{size:n==="xs"?"xs":"sm"}),l]})}async function Ma(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 Tt({value:e,display:t="icon",variant:n="ghost",size:r="sm",label:o,copiedLabel:s,onCopied:i,className:a}){const{t:l}=ae(),[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 Ma(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:br({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 _a({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 Da({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(_a,{inverse:t,children:o})]},s))})}const La=d.createContext(null);function Ia(){return d.useContext(La)}const Fa="rounded-lg border border-input bg-background text-foreground transition-colors hover:border-ring/50",za="border-destructive hover:border-destructive focus-within:border-destructive focus:border-destructive",$a="cursor-not-allowed bg-muted/50 text-muted-foreground hover:border-input",Wa={sm:"h-8 px-2.5 text-[13px]",md:"h-9 px-3 text-sm"};function Ba({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=Ia(),g=r??m?.invalid??!1;return c.jsxs("div",{"data-slot":"input",className:S(Fa,"flex w-full min-w-0 items-center gap-2 focus-within:border-ring",Wa[e],g&&za,a&&$a,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 yc({value:e,defaultValue:t="",onValueChange:n,shortcut:r,onKeyDown:o,...s}){const{t:i}=ae(),[a,l]=ga({value:e,defaultValue:t,onChange:n});return c.jsx(Ba,{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(Ir,{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(Dr,{className:"size-3.5","aria-hidden":"true"})}):r?c.jsx(Da,{keys:r}):void 0,className:"[&::-webkit-search-cancel-button]:appearance-none",...s})}const Nc="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",Cc="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",Ec="pr-7",Sc="text-destructive-ink data-[highlighted]:bg-destructive/10 data-[highlighted]:text-destructive-ink",Rc="absolute right-2 flex size-3.5 items-center justify-center text-foreground",Ac="px-2 pb-1 pt-1.5 text-[11px] font-medium text-muted-foreground",Pc="-mx-1 my-1 h-px bg-border/60",Oc="ml-auto pl-4 text-[11px] tracking-wide text-muted-foreground",jc=oa,kc=ia,Tc=la,Mc=sa;function _c({className:e,sideOffset:t=6,align:n="start",...r}){return c.jsx(aa,{children:c.jsx(ca,{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 Ha(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 Ua({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(yo,{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(No,{"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(Aa,{count:n,tone:n>0?r:"neutral",className:"ml-auto"})]})}),c.jsx(Co,{role:"group","aria-labelledby":f,className:"mt-0.5 flex flex-col gap-px",children:l})]})}const Dc={ink:sn.ink,context:sn.context,plan:"var(--viz-4)"};function Lc(e){return Math.round(e)+.5}function Va(e){return Array.from(e).reduce((t,n)=>t+(n.charCodeAt(0)>11904?2:1),0)*6.6}function Ic(e){return Math.ceil(Math.max(0,...e.map(Va)))+10}function Fc(e){return pt(e,{compact:!0})}function zc(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 $c="rounded-md outline-none focus-visible:ring-2 focus-visible:ring-ring/60 focus-visible:ring-offset-2";function Wc(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 Bc(e){return pa(e).slice().reverse()}const wr={todo:{icon:hn,label:"Pending",className:on.neutral},doing:{icon:pn,label:"Running",className:on.info},done:{icon:mn,label:"Done",className:"text-success/80"},cancelled:{icon:gn,label:"Cancelled",className:"text-muted-foreground/70"}};function ct({state:e,className:t}){const{icon:n,className:r}=wr[e];return c.jsx(n,{"aria-hidden":"true",className:S("size-4 shrink-0",r,t)})}function Hc({items:e,onToggle:t,summary:n=!0,className:r}){const{t:o}=ae(),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(ct,{state:i,className:"size-3.5"}),o(wr[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(ct,{state:i.state})}):c.jsx(ct,{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}),J(i.tag)&&c.jsx("span",{className:"shrink-0",children:i.tag}),J(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",ue[i.due.tone]):"text-muted-foreground"),children:i.due.label})]},i.id)})})]})}function Uc({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,J(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}),J(r.tag)&&c.jsx("span",{className:"shrink-0",children:r.tag})]}),J(r.meta)&&c.jsx("div",{className:"truncate text-[11px] text-muted-foreground",children:r.meta})]})]},r.id))})]},n.id))})}function Vc({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})]}),J(n.detail)&&c.jsx("div",{className:"mt-1 text-xs leading-relaxed text-muted-foreground",children:n.detail})]})]},n.id))})}function Yc({items:e,className:t}){const{t:n}=ae();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?ue[o]:"text-foreground"),children:r.days===0?"0":Math.abs(r.days)}),c.jsx("span",{className:S("mt-1 text-[10px]",o?ue[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}),J(r.meta)&&c.jsx("div",{className:"truncate text-[11px] text-muted-foreground",children:r.meta})]})]},r.id)})})}function Kc({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}),J(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(Fr,{"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 Xc({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}),J(o.meta)&&c.jsx("div",{className:"mt-1 text-[11px] text-muted-foreground",children:o.meta})]})]},o.id))})}function Ya(e){const t=Lr(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 Ka(e){return e.replace("text-","bg-")}function Gc({color:e,className:t}){return c.jsx("span",{"aria-hidden":"true",className:S("size-2 shrink-0 rounded-full",Ka(e),t)})}function Xa({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?Ya(e):e})})}const Ga={sm:"size-3.5",md:"size-4",lg:"size-5"};function Zc({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(Kr,{agentType:e,className:Ga[r]}),n?c.jsx("span",{className:"truncate text-foreground/80",children:s}):c.jsx("span",{className:"sr-only",children:s})]})}function qc({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($r,{"aria-hidden":"true",className:"size-3 shrink-0"}),c.jsx("span",{className:"truncate font-mono text-[11px]",children:e})]})}function yr({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 Za=new Set(["ts","tsx","js","jsx","mjs","json","css","html","py","go","rs","java","sh","yml","yaml","toml","prisma","sql"]),qa=new Set(["png","jpg","jpeg","gif","svg","webp"]),Qa=new Set(["md","mdx","txt","log"]);function Nr({name:e,className:t}){const n=e.split(".").pop()?.toLowerCase()??"",r=Za.has(n)?Qr:qa.has(n)?eo:Qa.has(n)?Yr:no;return c.jsx(r,{"aria-hidden":"true",className:S("size-3.5 shrink-0 text-muted-foreground",t)})}function Cr(e){const t=e.lastIndexOf("/");return t===-1?{dir:"",name:e}:{dir:e.slice(0,t),name:e.slice(t+1)}}const ln={A:"success",M:"warning",D:"danger",R:"info"};function Qc({path:e,status:t,additions:n,deletions:r,active:o=!1,className:s,type:i,...a}){const{dir:l,name:u}=Cr(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",kt[ln[t]],ue[ln[t]]),children:t}),c.jsx(Nr,{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(yr,{additions:n,deletions:r})]})}function Jc({path:e,className:t}){const{name:n}=Cr(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(Nr,{name:n,className:"size-3"}),c.jsx("span",{className:"truncate",children:n})]})}function el({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(so,{"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(yr,{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(Tt,{value:t,size:"xs"})]})]})}function tl({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(Tt,{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 Ja={command:Y.foreground,output:Y.foreground,success:Y.green,error:Y.red,warning:Y.yellow,info:Y.blue,muted:Y.muted};function nl({title:e,status:t,lines:n,className:r}){return c.jsxs("div",{className:S("overflow-hidden rounded-lg",r),style:{background:Y.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:Y.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:Ja[o.kind??"output"]},children:[o.kind==="command"&&c.jsx("span",{style:{color:Y.muted},children:"$ "}),o.text]},s))})]})}function rl({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(Tt,{value:e,display:"text",size:"xs",variant:"ghost",className:"absolute right-1.5 top-2"})]})}const B={Review:"Review",Running:"Running",Pending:"Pending",Done:"Done",Cancelled:"Cancelled"},qe={[B.Review]:{label:"Review",icon:Zr,iconClass:"text-warning",accentClass:"text-warning",titleClass:"font-semibold text-foreground"},[B.Running]:{label:"Running",icon:pn,iconClass:"text-info",accentClass:"text-info",titleClass:"task-title-running"},[B.Pending]:{label:"Pending",icon:hn,iconClass:"text-muted-foreground",accentClass:"text-muted-foreground",titleClass:""},[B.Done]:{label:"Done",icon:mn,iconClass:"text-success/80",accentClass:"text-success",titleClass:"text-muted-foreground"},[B.Cancelled]:{label:"Cancelled",icon:gn,iconClass:"text-muted-foreground/70",accentClass:"text-muted-foreground/70",titleClass:"text-muted-foreground"}},ol=[B.Review,B.Running,B.Pending,B.Done,B.Cancelled];function ec({value:e,now:t,className:n}){const{t:r,locale:o}=ae(),s=ya(),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:Na(i,t??s,r,o)})}function tc({status:e,className:t}){const{icon:n,iconClass:r}=qe[e];return c.jsx(n,{className:S("size-4 shrink-0",r,t)})}function sl({status:e,className:t}){const{t:n}=ae(),{label:r}=qe[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(tc,{status:e}),n(r)]})}const nc={[he.URGENT]:"danger",[he.HIGH]:"warning",[he.NORMAL]:"neutral",[he.LOW]:"neutral"};function rc({priority:e,showLabel:t=!1,className:n}){const{t:r}=ae(),o=Wr(e),s=nc[o.value]??"neutral";return c.jsxs(Ra,{tone:s,size:"sm",shape:"tag",title:`${o.code} · ${r(o.label)}`,className:S("font-semibold",o.value===he.LOW&&"bg-foreground/[0.04]",n),children:[o.code,t&&c.jsx("span",{className:"font-medium",children:r(o.label)})]})}function il({title:e,status:t,priority:n,project:r,updatedAt:o,now:s,active:i=!1,className:a,...l}){const{titleClass:u}=qe[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",Ha(i),a),...l,children:[c.jsx("span",{className:S("min-w-0 flex-1 truncate",u),children:e}),n!==void 0&&n!==he.NORMAL&&c.jsx(rc,{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(Xa,{name:r.name,color:r.color,className:"@max-[22rem]:hidden"}),o!==void 0&&c.jsx(ec,{value:o,now:s,className:"text-[11px]"})]})})]})}function al({status:e,count:t,defaultOpen:n=!0,sticky:r=!0,children:o,className:s}){const{t:i}=ae(),{icon:a,label:l,accentClass:u}=qe[e];return c.jsx(Ua,{title:i(l),icon:c.jsx(a,{className:u}),count:t,countTone:e===B.Review?"warning":"neutral",sticky:r,defaultOpen:n,className:S(t>0&&"data-[state=open]:mb-4",s),children:o})}export{Pc as $,ir as A,wc as B,Xi as C,En as D,Ea as E,no as F,so as G,br as H,J as I,La as J,Ia as K,$a as L,Rc as M,za as N,Fa as O,jc as P,Wa as Q,Ln as R,yc as S,on as T,B as U,Nc as V,ga as W,Ac as X,_a as Y,Oc as Z,Sc as _,uc as a,Da as a0,Ha as a1,sn as a2,pt as a3,ue as a4,fc as a5,bc as a6,Ra as a7,pc as a8,Lc as a9,Ua as aA,Mc as aB,Tc as aC,rc as aD,Gc as aE,Xa as aF,rl as aG,ec as aH,Y as aI,kt as aJ,da as aK,il as aL,sl as aM,al as aN,tc as aO,nl as aP,Uc as aQ,Hc as aR,Na as aS,gc as aT,pa as aU,Ka as aV,Ya as aW,ya as aX,vc as aY,zc as aa,xc as ab,Fc as ac,Ic as ad,$c as ae,Dc as af,Wc as ag,Va as ah,Bc as ai,hc as aj,fa as ak,Vc as al,Zc as am,qc as an,Xc as ao,tl as ap,el as aq,Tt as ar,Aa as as,Yc as at,yr as au,Jc as av,Qc as aw,Ba as ax,Kc as ay,mc as az,kc as b,_c as c,Ec as d,Cc as e,qe as f,ol as g,W as h,vt as i,vn as j,Q as k,He as l,Pn as m,Rs as n,$o as o,Rn as p,dc as q,As as r,ve as s,Ki as t,xn as u,qn as v,ao as w,Gi as x,ee as y,ua as z};
@@ -0,0 +1 @@
1
+ import{c as e}from"./index-CWbMMO6g.js";import{T as a}from"./agent-meta-DOylIs2N.js";const t=[["path",{d:"M12 5v14",key:"s699le"}],["path",{d:"m19 12-7 7-7-7",key:"1idqje"}]],u=e("arrow-down",t);const n=[["path",{d:"m5 12 7-7 7 7",key:"hav0vg"}],["path",{d:"M12 19V5",key:"x0mq9r"}]],h=e("arrow-up",n);const s=[["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"}]],y=e("folder",s);const i=[["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"}]],g=e("git-branch",i);const d=[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]],N=e("search",d),o=[{value:a.URGENT,code:"P0",label:"紧急",className:"bg-destructive/10 text-destructive",iconName:"chevrons-up"},{value:a.HIGH,code:"P1",label:"高",className:"bg-warning/15 text-warning",iconName:"signal-high"},{value:a.NORMAL,code:"P2",label:"普通",className:"bg-muted text-muted-foreground",iconName:"minus"},{value:a.LOW,code:"P3",label:"低",className:"bg-foreground/[0.06] text-muted-foreground",iconName:"chevrons-down"}];function k(c){return o.find(r=>r.value===c)??o[2]}export{u as A,y as F,g as G,N as S,o as T,h as a,k as 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-CWbMMO6g.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-CWEbo6pZ.js";import{d as ot}from"./arc-BlZww3MO.js";import"./index-CWbMMO6g.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-CWbMMO6g.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,4 +1,4 @@
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-CrBn9oMJ.js";import"./ProjectKanbanPage-DsPxwoVf.js";import"./index-CWbMMO6g.js";import"./agent-meta-DOylIs2N.js";import"./confirm-dialog-DRpyE_qU.js";import"./modal-BRoNvfhw.js";import"./BranchSelect-Eb5UGWWX.js";import"./task-priority-wLXAgVZZ.js";import"./circle-alert-Dm2Pl-rU.js";import"./check-Cm7Vstpm.js";import"./task-kalEmHDc.js";import"./copy-r0aUdsl8.js";import"./AgentLogo-I2etsqym.js";import"./chevron-down-C6Ta4vyM.js";import"./CreateTaskInput-B_cRDkVq.js";import"./mermaid-NOHMQCX5-9-DTTfp6.js";import"./BrandLogo-BjC1hcgv.js";import"./ExecutionPermissionSelector-BX5Xx8ta.js";import"./use-projects-BYUZwQ-q.js";import"./MemberAvatar-TVtoxQe8.js";import"./use-providers-DdV9gbj1.js";import"./trash-2-BF_3L-qk.js";import"./paperclip-CC7nHUQ7.js";import"./message-square-QM0c6Dcv.js";import"./layers-2tjjhM75.js";import"./useNormalizedLogs-DdFsf-Z1.js";import"./chevron-up-BwJT7iif.js";import"./at-sign-BFf8Sz8T.js";import"./select-BmjoUfrV.js";import"./textarea-CD82lB0Z.js";import"./play-CIZVXiwM.js";import"./server-BNBdQGor.js";import"./upload-B2AMXrU-.js";import"./globe-JXfw4MCF.js";import"./pencil-DIY0Hu5t.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,`
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
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+=`
4
4
 
@@ -8,4 +8,4 @@ ${N(o)}`;return t}}function N(c){let e=`*@${c.name}*`;if(c.name==="param"&&c.tex
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(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 Oe(c){L=R(c,"typescript")}function Ne(c){T=R(c,"javascript")}function Re(){return new Promise((c,e)=>{if(!T)return e("JavaScript not registered!");c(T)})}function Me(){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,Re as getJavaScriptWorker,Me as getTypeScriptWorker,Ne as setupJavaScript,Oe as setupTypeScript};
@@ -0,0 +1 @@
1
+ import{l as e}from"./monaco-CrBn9oMJ.js";import"./ProjectKanbanPage-DsPxwoVf.js";import"./index-CWbMMO6g.js";import"./agent-meta-DOylIs2N.js";import"./confirm-dialog-DRpyE_qU.js";import"./modal-BRoNvfhw.js";import"./BranchSelect-Eb5UGWWX.js";import"./task-priority-wLXAgVZZ.js";import"./circle-alert-Dm2Pl-rU.js";import"./check-Cm7Vstpm.js";import"./task-kalEmHDc.js";import"./copy-r0aUdsl8.js";import"./AgentLogo-I2etsqym.js";import"./chevron-down-C6Ta4vyM.js";import"./CreateTaskInput-B_cRDkVq.js";import"./mermaid-NOHMQCX5-9-DTTfp6.js";import"./BrandLogo-BjC1hcgv.js";import"./ExecutionPermissionSelector-BX5Xx8ta.js";import"./use-projects-BYUZwQ-q.js";import"./MemberAvatar-TVtoxQe8.js";import"./use-providers-DdV9gbj1.js";import"./trash-2-BF_3L-qk.js";import"./paperclip-CC7nHUQ7.js";import"./message-square-QM0c6Dcv.js";import"./layers-2tjjhM75.js";import"./useNormalizedLogs-DdFsf-Z1.js";import"./chevron-up-BwJT7iif.js";import"./at-sign-BFf8Sz8T.js";import"./select-BmjoUfrV.js";import"./textarea-CD82lB0Z.js";import"./play-CIZVXiwM.js";import"./server-BNBdQGor.js";import"./upload-B2AMXrU-.js";import"./globe-JXfw4MCF.js";import"./pencil-DIY0Hu5t.js";const z={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")}}},B={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{z as conf,B 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-CWbMMO6g.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 +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-CWbMMO6g.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-CWbMMO6g.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,o as e,y 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-CWbMMO6g.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{c as he,u as oe,j as o,T as Te,ab as ke,l as je,ag as Oe,r,_ as O,$ as v,a0 as _e,p as Le}from"./index-CWbMMO6g.js";import{C as qe}from"./chevron-down-C6Ta4vyM.js";import{C as $e}from"./check-Cm7Vstpm.js";import{S as H,n as Pe,c as De}from"./agent-meta-DOylIs2N.js";import{b as _,E as Me,n as ze,c as Be,s as Fe}from"./mermaid-NOHMQCX5-9-DTTfp6.js";const Ye=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}]],Ge=he("circle-dot",Ye);const Ue=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]],ue=he("circle",Ue);function He({error:t,onRetry:e,title:n,description:a,className:c}){const{t:i}=oe();return o.jsxs("div",{role:"alert",className:je("flex min-h-0 flex-1 flex-col items-center justify-center gap-3 px-6 py-12 text-center",c),children:[o.jsx("div",{className:"flex h-10 w-10 items-center justify-center rounded-full border border-destructive/20 bg-destructive/10 text-destructive",children:o.jsx(Te,{size:18})}),o.jsxs("div",{className:"space-y-1",children:[o.jsx("p",{className:"text-sm font-medium text-foreground",children:n??i("Something went wrong")}),o.jsx("p",{className:"max-w-md text-xs text-muted-foreground",children:a??i("This section hit a rendering error and was replaced by this message.")})]}),o.jsx("p",{className:"max-w-xl truncate rounded-md border border-border/60 bg-muted/40 px-2 py-1 font-mono text-[11px] text-muted-foreground",title:t.message||t.name,children:t.message||t.name}),o.jsx("p",{className:"max-w-md text-[11px] text-muted-foreground/80",children:i("Only rendering errors are caught here. Errors from event handlers, async callbacks or observers are not.")}),o.jsxs("button",{type:"button",onClick:e,className:"inline-flex items-center gap-1.5 rounded-md border border-border bg-background px-3 py-1.5 text-xs font-medium text-foreground transition-colors hover:bg-accent",children:[o.jsx(ke,{size:13}),i("Retry")]})]})}function ot({children:t}){const{t:e}=oe();return o.jsx(Oe,{source:"log-view",fallback:({error:n,reset:a})=>o.jsx(He,{title:e("Failed to display logs"),description:e("The log view hit a rendering error. Retry renders the same data again, so it will fail again while the bad data is still there."),error:n,onRetry:a}),children:t})}const le="agent-tower-todo-panel-open";function Ve(t,e){const n=e?"h-3 w-3":"h-3.5 w-3.5",a=(t||"").toLowerCase();return a==="completed"?o.jsx($e,{"aria-hidden":!0,className:`${n} text-emerald-500`}):a==="in_progress"||a==="in-progress"?o.jsx(Ge,{"aria-hidden":!0,className:`${n} text-blue-500`}):a==="cancelled"?o.jsx(ue,{"aria-hidden":!0,className:`${n} text-neutral-300`}):o.jsx(ue,{"aria-hidden":!0,className:`${n} text-neutral-400`})}function at({todos:t,compact:e}){const{t:n}=oe(),[a,c]=r.useState(()=>{if(e)return!1;const l=localStorage.getItem(le);return l===null?!0:l==="true"});if(r.useEffect(()=>{localStorage.setItem(le,String(a))},[a]),!t||t.length===0)return null;const i=t.filter(l=>l.status?.toLowerCase()==="completed").length,M=t.length>0?i/t.length*100:0;return o.jsxs("details",{className:"group",open:a,onToggle:l=>c(l.target.open),children:[o.jsx("summary",{className:"list-none cursor-pointer select-none [&::-webkit-details-marker]:hidden",children:o.jsxs("div",{className:`bg-neutral-50/80 border border-neutral-100 rounded-lg flex items-center justify-between hover:bg-neutral-100/80 transition-colors ${e?"px-3 py-1.5":"px-3 py-2"}`,children:[o.jsxs("div",{className:"flex items-center gap-2 min-w-0",children:[o.jsx("span",{className:"text-neutral-500 font-medium text-xs",children:n("待办")}),o.jsxs("span",{className:"text-neutral-400 tabular-nums text-xs",children:[i,"/",t.length]}),o.jsx("div",{className:"w-12 h-1 bg-neutral-200/60 rounded-full overflow-hidden",children:o.jsx("div",{className:"h-full bg-emerald-400 rounded-full transition-all duration-300",style:{width:`${M}%`}})})]}),o.jsx(qe,{"aria-hidden":!0,className:`text-neutral-400 transition-transform group-open:rotate-180 ${e?"h-3 w-3":"h-3.5 w-3.5"}`})]})}),o.jsx("div",{className:`pt-1.5 pb-0.5 ${e?"max-h-28 overflow-y-auto px-1":"px-1"}`,children:o.jsx("ul",{className:"space-y-px",role:"list","aria-label":"Agent todo list",children:t.map((l,L)=>{const z=l.status?.toLowerCase()==="cancelled",V=l.status?.toLowerCase()==="completed";return o.jsxs("li",{className:`flex items-center gap-1.5 rounded-md px-2 ${e?"py-0.5":"py-[3px]"} ${V?"opacity-60":""}`,children:[o.jsx("span",{className:`flex items-center justify-center shrink-0 ${e?"h-3 w-3":"h-3.5 w-3.5"}`,children:Ve(l.status,e)}),o.jsx("span",{className:`${e?"text-[11px] leading-[14px]":"text-xs leading-4"} text-neutral-600 wrap-break-word truncate ${z?"line-through text-neutral-400":""} ${V?"text-neutral-400":""}`,children:l.content})]},`${l.content}-${L}`)})})})]})}function ct(t){return r.useMemo(()=>{let e=[],n=0;for(const c of t)if(c.entryType==="tool_use"&&c.metadata?.action==="todo_management"&&c.metadata.todos&&c.metadata.todos.length>0){const i=c.metadata.todos;i.every(l=>l.content&&l.content.trim().length>0&&l.status)&&c.timestamp>=n&&(e=i,n=c.timestamp)}const a=e.find(c=>{const i=c.status?.toLowerCase();return i==="in_progress"||i==="in-progress"})??null;return{todos:e,inProgressTodo:a}},[t])}const Ke=!1,Xe=1500,de=[250,1e3,3e3],We=1e4;function ge(t){return t instanceof DOMException&&t.name==="AbortError"}function Je(t){if(ge(t))return!1;const e=typeof t=="object"&&t!==null&&"status"in t?t.status:void 0;return typeof e!="number"?!0:e===408||e===429||e>=500}function Qe(t,e){return new Promise(n=>{if(e.aborted){n(!1);return}const a=window.setTimeout(()=>{e.removeEventListener("abort",c),n(!0)},t),c=()=>{window.clearTimeout(a),n(!1)};e.addEventListener("abort",c,{once:!0})})}function D(t){return t===H.COMPLETED||t===H.FAILED||t===H.CANCELLED}function Ze(t){return typeof t?.seq=="number"?t.seq:0}function fe(t){return!D(t)}function Se(t){return t.entryType==="user_message"||t.entryType==="user_feedback"}function xe(t){return!Se(t)&&t.entryType!=="loading"&&t.entryType!=="token_usage_info"&&t.content.trim()!==""}function re(t,e){let n=e,a,c;for(const i of t)c??=i.timestamp,Se(i)?(n=i.timestamp,a=void 0):xe(i)&&(n??=i.timestamp,a=i.timestamp);return{processingStartedAt:n??c,lastOutputAt:a}}function pe(t){if(typeof t=="number")return Number.isFinite(t)?t:void 0;if(typeof t!="string"||t.trim()==="")return;const e=Date.parse(t);return Number.isNaN(e)?void 0:e}function me(t,e){return t.some(n=>{if(n.op==="remove")return!1;const a=n.path.match(/^\/entries\/(\d+)(?:\/|$)/);if(!a)return!1;const c=e[Number(a[1])];return c?xe(c):!1})}function it(t){const{sessionId:e,sessionStatus:n,sessionStartedAt:a,sessionEndedAt:c,onAgentSessionId:i,onExit:M,onError:l}=t,L=pe(a),z=pe(c),[V,K]=r.useState(()=>O.isConnected()),[Z,R]=r.useState(!1),[ye,ae]=r.useState(!1),[Ee,ee]=r.useState(null),[ce,N]=r.useState(!1),[be,B]=r.useState(()=>!D(n)),[Ae,C]=r.useState(()=>z??null),X=_(r.useCallback(s=>s.conversations[e]??Me,[e])),g=r.useRef(!1),q=r.useRef({}),I=r.useRef(null),F=r.useRef(new Map),Y=r.useRef(new Map),b=r.useRef(0),te=r.useRef(L);te.current=L;const T=r.useRef({sessionId:e});T.current.sessionId!==e&&(T.current={sessionId:e});const G=r.useRef(e);G.current=e;const W=r.useRef({onAgentSessionId:i,onExit:M,onError:l});W.current={onAgentSessionId:i,onExit:M,onError:l};const J=r.useRef(n);J.current=n,r.useEffect(()=>{D(n)?(B(!1),C(z??null)):((n===H.RUNNING||n===H.PENDING)&&B(!0),C(null))},[e,n,z]),r.useEffect(()=>{if(!e)return;const s=O.getSocket(),f=q.current,d=F.current,h=Y.current;K(s.connected);let k=!D(n);const S=()=>{b.current+=1,K(!0),I.current?.()},p=()=>{b.current+=1,K(!1),R(!1),g.current=!1,f[e]=[],d.get(e)?.controller.abort();const u=h.get(e);u!==void 0&&(window.clearTimeout(u),h.delete(e))},ne=u=>{if(u.sessionId!==e)return;if(B(!0),C(null),!g.current){f[e]=[...f[e]??[],u],I.current?.();return}const $=_.getState();if(!$.applyPatch(e,u.patch,u.seq)){g.current=!1,f[e]=[],I.current?.();return}const x=$.getConversation(e)?.entries??[],y=re(x,te.current);T.current.processingStartedAt!==y?.processingStartedAt&&(T.current={sessionId:e,processingStartedAt:y?.processingStartedAt}),me(u.patch,x)&&(T.current.lastOutputAt=Date.now()),N(!0)},U=u=>{u.sessionId===e&&(ee(u.agentSessionId),W.current.onAgentSessionId?.(u.agentSessionId))},A=u=>{u.sessionId===e&&(k=!1,R(!1),N(!1),B(!1),C(Date.now()),W.current.onExit?.(u.exitCode))},j=u=>{u.sessionId===e&&W.current.onError?.(u.message)};return s.on("connect",S),s.on("disconnect",p),s.on(v.SESSION_PATCH,ne),s.on(v.SESSION_ID,U),s.on(v.SESSION_EXIT,A),s.on(v.SESSION_ERROR,j),K(s.connected),()=>{s.off("connect",S),s.off("disconnect",p),s.off(v.SESSION_PATCH,ne),s.off(v.SESSION_ID,U),s.off(v.SESSION_EXIT,A),s.off(v.SESSION_ERROR,j),b.current+=1,d.get(e)?.controller.abort();const u=h.get(e);u!==void 0&&(window.clearTimeout(u),h.delete(e)),g.current=!1,f[e]=[],ee(null),N(!1),C(null),R(!1),k||_.getState().truncateSession(e)}},[e]);const se=r.useCallback(()=>{if(!e)return Promise.resolve(!1);const s=e,f=b.current,d=()=>G.current===s,h=F.current.get(s);if(h)return h.epoch!==f&&(h.reloadRequested=!0,h.controller.abort()),h.promise;const k=Y.current.get(s);k!==void 0&&(window.clearTimeout(k),Y.current.delete(s));const S=new AbortController,p={controller:S,epoch:f,promise:Promise.resolve(!1),reloadRequested:!1},U=(async()=>{const A=_.getState(),j=A.conversations[s];j&&j.entries.length>0&&(A.touchAccess(s),d()&&N(fe(J.current))),d()&&(g.current=!1,R(!1)),!(j&&j.entries.length>0)&&d()&&ae(!0);for(let $=0;$<=de.length;$+=1){const P=O.getSocket();if(S.signal.aborted||!P.connected||!d()||p.epoch!==b.current)return!1;q.current[s]=[];try{const x=ze(await Le.get(`/sessions/${s}/logs`,{cache:"no-store",signal:S.signal}));if(S.signal.aborted||!P.connected||!d()||p.epoch!==b.current)return p.reloadRequested=P.connected&&d(),!1;const y=q.current[s]??[];q.current[s]=[];let E=x,w=Ze(x);for(const m of y){if(typeof m.seq=="number"){if(m.seq<=w)continue;if(m.seq!==w+1)throw new Error(`Buffered patch sequence gap: expected ${w+1}, received ${m.seq}`)}const Q=Be(E,m.patch);if(!Q.ok)throw new Error(`Buffered conversation patch rejected (${Q.kind}): ${Q.reason}`);E=Q.conversation,typeof m.seq=="number"&&m.seq>w&&(w=m.seq)}E={...E,seq:w,isTruncated:!1};const Ce=re(E.entries,te.current);T.current={sessionId:s,processingStartedAt:Ce?.processingStartedAt,lastOutputAt:y.some(m=>me(m.patch,E.entries))?Date.now():void 0};const Ie=A.getConversation(s);if(y.length>0||Fe(Ie,E)?A.setConversation(s,E):A.touchAccess(s),d()){g.current=!0,R(!0);const m=_.getState().getConversation(s);m&&m.entries.length>0&&N(fe(J.current))}return!0}catch(x){if(S.signal.aborted||ge(x))return!1;if(!d()||p.epoch!==b.current||!P.connected)return p.reloadRequested=P.connected&&d(),!1;if(console.error("[useNormalizedLogs:loadSnapshot] Failed to reconcile snapshot:",x),q.current[s]=[],g.current=!1,R(!1),N(!1),!Je(x))return!1;const y=de[$];if(y===void 0){const ie=p.epoch,w=window.setTimeout(()=>{Y.current.delete(s),G.current===s&&b.current===ie&&O.getSocket().connected&&I.current?.()},We);return Y.current.set(s,w),!1}if(!await Qe(y,S.signal))return!1}}return!1})().finally(()=>{F.current.get(s)===p&&F.current.delete(s),p.reloadRequested&&G.current===s&&O.getSocket().connected&&queueMicrotask(()=>{I.current?.()}),G.current===s&&ae(!1)});return p.promise=U,F.current.set(s,p),U},[e]);I.current=se;const we=r.useCallback(()=>new Promise(s=>{if(!O.getSocket().connected){s(!1);return}if(g.current){const d=_.getState().getConversation(e);if(!(D(J.current)||d?.isTruncated===!0)){s(!0);return}}se().then(s)}),[e,se]);r.useEffect(()=>{if(!e||!D(n))return;const s=window.setTimeout(()=>{I.current?.()},Xe);return()=>window.clearTimeout(s)},[e,n]);const ve=r.useCallback(s=>{O.getSocket().emit(_e.INPUT,{sessionId:e,data:s})},[e]),Re=r.useCallback(()=>{_.getState().removeSession(e),ee(null),N(!1),B(!1),C(null),R(!1),g.current=!1,q.current[e]=[]},[e]),Ne=r.useMemo(()=>{const s=Pe(X.entries);if(ce&&Z){const f=re(X.entries,L),d=T.current,k=d.sessionId===e&&d.processingStartedAt===f?.processingStartedAt&&d.lastOutputAt?Math.max(d.lastOutputAt,f?.lastOutputAt??0):f?.lastOutputAt;s.push(De({processingStartedAt:f?.processingStartedAt,lastOutputAt:k}))}return s},[X.entries,ce,Z,e,L]);return{isConnected:V,isAttached:Z,isLoadingSnapshot:ye,isOutputActive:be,lastExitAt:Ae,logs:Ne,entries:X.entries,agentSessionId:Ee,attach:we,sendInput:ve,clearLogs:Re}}export{ue as C,ot as L,at as T,ct as a,it as u};