codeplane-darwin-x64-baseline 29.0.25 → 29.0.26

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 (110) hide show
  1. package/bin/codeplane +0 -0
  2. package/bin/runtime/tui/{_baseUniq-CIdKO3dq-saxa3280.js → _baseUniq-DiRPzHd--26426db9.js} +1 -1
  3. package/bin/runtime/tui/{ar-DWiV1g-n-1af1nyxy.js → ar-B5R9jdSq-3wmhwvp4.js} +1 -1
  4. package/bin/runtime/tui/{ar-BmGaE6dF-q6t3706d.js → ar-CmtdxakA-zefryct7.js} +1 -1
  5. package/bin/runtime/tui/{arc-DqLXbJ-l-1yzq3v1g.js → arc-DhPNfM5M-vnpvbgz7.js} +1 -1
  6. package/bin/runtime/tui/{architectureDiagram-Q4EWVU46-9rt-8b6E-wk53k0jh.js → architectureDiagram-Q4EWVU46-BSshIJrt-s3bb7scj.js} +1 -1
  7. package/bin/runtime/tui/{blockDiagram-DXYQGD6D-Wi5D5jIb-83qd40vp.js → blockDiagram-DXYQGD6D-DN97l508-6gaqvmny.js} +1 -1
  8. package/bin/runtime/tui/{br-CJxfXkhA-h51k61qx.js → br-C3sTTSy7-nzgz0kzv.js} +1 -1
  9. package/bin/runtime/tui/{br-C0Yr4nSr-bs9cbqgb.js → br-JtOIrpA--4rv6b2dw.js} +1 -1
  10. package/bin/runtime/tui/{bs-CaCKWAeY-xew7v80s.js → bs-Cbvm7Uef-2xagg46s.js} +1 -1
  11. package/bin/runtime/tui/{bs-CEFL9l5a-k8vrktf8.js → bs-q_YF7Hgh-8hean8ba.js} +1 -1
  12. package/bin/runtime/tui/{c4Diagram-AHTNJAMY-Cnx6lSY6-hfk7ydjz.js → c4Diagram-AHTNJAMY-DqJOCwZp-x5jrhgwb.js} +1 -1
  13. package/bin/runtime/tui/channel-CSNH1reU-wgd023va.js +1 -0
  14. package/bin/runtime/tui/{chunk-4BX2VUAB-DdU5eMNC-r5g39pnj.js → chunk-4BX2VUAB-CzhSmsyW-78gzmdk7.js} +1 -1
  15. package/bin/runtime/tui/{chunk-4TB4RGXK-DkOtUh9r-1g0b4dt8.js → chunk-4TB4RGXK-CMCk0y3--x9b62cbj.js} +1 -1
  16. package/bin/runtime/tui/{chunk-55IACEB6-CU9uIPGP-rh65kk9d.js → chunk-55IACEB6-CHpQ6P0V-h665p434.js} +1 -1
  17. package/bin/runtime/tui/{chunk-EDXVE4YY-DqmH469b-5ymhdtxk.js → chunk-EDXVE4YY-DsCkSNLQ-t7p80xnh.js} +1 -1
  18. package/bin/runtime/tui/{chunk-FMBD7UC4-BMB1F1VO-vy5p5w7r.js → chunk-FMBD7UC4-Xha1N2MD-xkgcsjz3.js} +1 -1
  19. package/bin/runtime/tui/{chunk-OYMX7WX6-mS1fhc79-0fg9mpxa.js → chunk-OYMX7WX6-Dc83aM1d-2sz8brcx.js} +1 -1
  20. package/bin/runtime/tui/{chunk-QZHKN3VN-B_uJ2Sul-q596hvme.js → chunk-QZHKN3VN-DLDh7Jmm-3f3tmekq.js} +1 -1
  21. package/bin/runtime/tui/{chunk-YZCP3GAM-X3zoXePk-wt6cc28k.js → chunk-YZCP3GAM-ys0Det8S-6ddb3t70.js} +1 -1
  22. package/bin/runtime/tui/classDiagram-6PBFFD2Q-DwRK40eI-c51qj51n.js +1 -0
  23. package/bin/runtime/tui/classDiagram-v2-HSJHXN6E-DwRK40eI-c51qj51n.js +1 -0
  24. package/bin/runtime/tui/clone-CuRN5OPq-ytbp2ygt.js +1 -0
  25. package/bin/runtime/tui/{cose-bilkent-S5V4N54A-COxeQzun-09sz9bh5.js → cose-bilkent-S5V4N54A-_G1XpVas-74a4nzk3.js} +1 -1
  26. package/bin/runtime/tui/{da-CLGt8t51-fzwrsjwy.js → da-Bd-y8LIf-7msy8tgs.js} +1 -1
  27. package/bin/runtime/tui/{da-DYi2YCQi-k85nfe73.js → da-By9-0K0u-1rjk06sy.js} +1 -1
  28. package/bin/runtime/tui/{dagre-KV5264BT-BgAj3J6z-q3rxwrwn.js → dagre-KV5264BT-BhJ822gp-nf7x72ck.js} +1 -1
  29. package/bin/runtime/tui/{de-27e6V80Y-9dnj28p9.js → de-BUNDtHw5-cnqdj6n9.js} +1 -1
  30. package/bin/runtime/tui/{de-BDLaTYvp-wvmhyndj.js → de-D93Gzzl8-409k52nj.js} +1 -1
  31. package/bin/runtime/tui/{diagram-5BDNPKRD-B595d8w6-sdjnp45b.js → diagram-5BDNPKRD-COO7YBFQ-twrqtpmf.js} +1 -1
  32. package/bin/runtime/tui/{diagram-G4DWMVQ6-GH5GGsQB-13f0w3x6.js → diagram-G4DWMVQ6-DLpYRRsj-t3fcwvad.js} +1 -1
  33. package/bin/runtime/tui/{diagram-MMDJMWI5-iFQuIw9r-sz4jv8vy.js → diagram-MMDJMWI5-DMsYt75j-3wvnqhwc.js} +1 -1
  34. package/bin/runtime/tui/{diagram-TYMM5635-t1HmZT7K-ys2esat3.js → diagram-TYMM5635-BDig_TyM-48481cs9.js} +1 -1
  35. package/bin/runtime/tui/{dialog-connect-provider-CbBxytwI-q3p86cwv.js → dialog-connect-provider-Cu-bRug--avjpvdc0.js} +2 -2
  36. package/bin/runtime/tui/{dialog-edit-project-CX76A6rc-58d95507.js → dialog-edit-project-g8UJkKZf-xx9jgnn0.js} +1 -1
  37. package/bin/runtime/tui/{dialog-fork-CG-wOlV3-xsxbpcme.js → dialog-fork-BsuXZeVe-1xyrk0mg.js} +1 -1
  38. package/bin/runtime/tui/{dialog-manage-models-BFS05VVX-wg4qb1qy.js → dialog-manage-models-DTZbb2Jt-6vfej0ys.js} +1 -1
  39. package/bin/runtime/tui/{dialog-quick-switcher-Bvm8ie5S-x84spk50.js → dialog-quick-switcher-PP1cl-AC-10f5xz35.js} +1 -1
  40. package/bin/runtime/tui/{dialog-select-directory-BgyTQJRP-8f8rm1ms.js → dialog-select-directory-DlfczDen-j01wt9js.js} +1 -1
  41. package/bin/runtime/tui/{dialog-select-file-B1bCyEnR-w76wavza.js → dialog-select-file-BBCDqX1E-gcyfvs65.js} +1 -1
  42. package/bin/runtime/tui/{dialog-select-mcp-DWrPE3wB-6jw1gxs7.js → dialog-select-mcp-CQpihzn4-hbbb2y7s.js} +1 -1
  43. package/bin/runtime/tui/{dialog-select-model-unpaid-DxRiJHnB-1e51xzvn.js → dialog-select-model-unpaid-DmAQ-1zQ-2ab0ga8b.js} +2 -2
  44. package/bin/runtime/tui/{dialog-select-provider-C-JEreLC-a3hzzr95.js → dialog-select-provider-DBHvhmzI-gvqmttak.js} +1 -1
  45. package/bin/runtime/tui/{dialog-select-server-DGTNSgKw-hkzncy6h.js → dialog-select-server-HywTbVo8-cy2w3yed.js} +1 -1
  46. package/bin/runtime/tui/{erDiagram-SMLLAGMA-Dkutm0UC-mr8b5cr2.js → erDiagram-SMLLAGMA-BDTN3rNG-n7aq0200.js} +1 -1
  47. package/bin/runtime/tui/{es--JMv8T7K-4n7x3j2t.js → es-BYA-UbLo-69ep2z6q.js} +1 -1
  48. package/bin/runtime/tui/{es-KW_Zclw5-sm6qt3en.js → es-D33ohYLC-w8d97r3z.js} +1 -1
  49. package/bin/runtime/tui/{file-icon-hzEOBp5u-wzb45m8v.js → file-icon-BlCvs3E5-8mwqe04h.js} +1 -1
  50. package/bin/runtime/tui/{flowDiagram-DWJPFMVM-Dxq5CqUW-55cxb8yg.js → flowDiagram-DWJPFMVM-BtACFPOp-9v6w940q.js} +1 -1
  51. package/bin/runtime/tui/{fr-BKYYu4_6-q6bgdt7z.js → fr-JgNSQr2k-y2p8w9yt.js} +1 -1
  52. package/bin/runtime/tui/{fr-EPg9myXQ-scb4s2xb.js → fr-ciUw-6za-3hxgh1v3.js} +1 -1
  53. package/bin/runtime/tui/{ganttDiagram-T4ZO3ILL-BMFQ_DA_-wv9dzvbt.js → ganttDiagram-T4ZO3ILL-BB0bR979-6gjvbgx3.js} +1 -1
  54. package/bin/runtime/tui/{ghostty-web-DF5QFCvM-vyezzh2f.js → ghostty-web-m4K2PR8W-zjd4zn06.js} +1 -1
  55. package/bin/runtime/tui/{gitGraphDiagram-UUTBAWPF-CXFHqzP_-t4byf1er.js → gitGraphDiagram-UUTBAWPF-DuBzx2HA-e4mrc6fx.js} +1 -1
  56. package/bin/runtime/tui/{graph-CdxUj6yb-scg0vj1a.js → graph-FFxo4W9V-bxfsgjev.js} +1 -1
  57. package/bin/runtime/tui/{home-BxUuIoXQ-ppzcm720.js → home-B7DxBTly-c4129wqa.js} +1 -1
  58. package/bin/runtime/tui/{index-CaPWFEmi-2z8vnrgq.js → index-B3MnqBGf-ykyzcgeq.js} +6 -6
  59. package/bin/runtime/tui/{index-fanx7c5q.html → index-gtxspt2k.html} +1 -1
  60. package/bin/runtime/tui/{infoDiagram-42DDH7IO-gNmXJmyB-s5qv9bvz.js → infoDiagram-42DDH7IO-P2eaEwsI-s6rzznvg.js} +1 -1
  61. package/bin/runtime/tui/{ishikawaDiagram-UXIWVN3A-DB4uZHja-e8hkd3zx.js → ishikawaDiagram-UXIWVN3A-BkrQ8CMT-2adnfzgj.js} +1 -1
  62. package/bin/runtime/tui/{ja-BflM-d8c-t7h818p0.js → ja-Bk0DfrZG-376yc4vv.js} +1 -1
  63. package/bin/runtime/tui/{ja-CJTo4KkK-zz1pfe3t.js → ja-CvdVSE8m-dnj7gdts.js} +1 -1
  64. package/bin/runtime/tui/{journeyDiagram-VCZTEJTY-C2cCx7a9-n6nfmvss.js → journeyDiagram-VCZTEJTY-pYBDfyva-fqwx8qff.js} +1 -1
  65. package/bin/runtime/tui/{kanban-definition-6JOO6SKY-CNIEkQb7-tejfkajm.js → kanban-definition-6JOO6SKY-C7XMcl8p-5y3hd0d6.js} +1 -1
  66. package/bin/runtime/tui/{ko-wnATYZhS-e8rh7bnb.js → ko-BhteX161-ev06xkxf.js} +1 -1
  67. package/bin/runtime/tui/{ko-1AesI1gp-7w8kmsd8.js → ko-el1XZEPY-981ssgkg.js} +1 -1
  68. package/bin/runtime/tui/{layout-CsyKM6QG-7fdxg3x9.js → layout-CeRLEx6M-v71c0xbk.js} +1 -1
  69. package/bin/runtime/tui/{linear-B97-2TdH-311hnq70.js → linear-DmVMk72g-kay2bx96.js} +1 -1
  70. package/bin/runtime/tui/{list-BiQMzfJm-c8sbm1ws.js → list-B7F45yIt-1x8rd8t3.js} +1 -1
  71. package/bin/runtime/tui/{mermaid.core-B1DAMRyG-23wemngf.js → mermaid.core-BZI8AtwT-2eqza8n6.js} +5 -5
  72. package/bin/runtime/tui/{min-BxM1U1Fg-21yb3amj.js → min-Bukm-5js-3h0q53x6.js} +1 -1
  73. package/bin/runtime/tui/{mindmap-definition-QFDTVHPH-CcS-c13S-b9v8r98c.js → mindmap-definition-QFDTVHPH-BRYqOb0v-8t5t07jg.js} +1 -1
  74. package/bin/runtime/tui/{no-bayaWMMG-fkj8cwdj.js → no-ByujzpZU-fbqpjstb.js} +1 -1
  75. package/bin/runtime/tui/{no-zt964wOK-kasce13c.js → no-DpW2hGdy-qdk2edsq.js} +1 -1
  76. package/bin/runtime/tui/node-main.js +253 -253
  77. package/bin/runtime/tui/{notifications-Can6MxXX-aw5q9fhj.js → notifications-CwW7x_Cu-970h9wfp.js} +1 -1
  78. package/bin/runtime/tui/{pieDiagram-DEJITSTG-Doif1hoz-3b07tqbh.js → pieDiagram-DEJITSTG-CTn1U15j-gw57ye2v.js} +1 -1
  79. package/bin/runtime/tui/{pl-DP31XAiJ-tn04m90e.js → pl-BjRQVeDz-dsfrwew9.js} +1 -1
  80. package/bin/runtime/tui/{pl-4fUPofNs-237e1s4t.js → pl-DmF_DGQf-ws0avvyd.js} +1 -1
  81. package/bin/runtime/tui/{provider-icon-mQ6o_ygz-ygz739x5.js → provider-icon-9tRUCm8P-86zfzezy.js} +1 -1
  82. package/bin/runtime/tui/{quadrantDiagram-34T5L4WZ-DzCsn8oz-66jhgzt4.js → quadrantDiagram-34T5L4WZ-Cqxa5AhV-ck3v3pcw.js} +1 -1
  83. package/bin/runtime/tui/{requirementDiagram-MS252O5E-3SSg0glz-j59wp495.js → requirementDiagram-MS252O5E-BjEEAAcr-2p7wm3j1.js} +1 -1
  84. package/bin/runtime/tui/{ru-DaitQUn1-hagr69y5.js → ru-C5TA59lK-jns7k6e5.js} +1 -1
  85. package/bin/runtime/tui/{ru-DjsUX_Mx-m7ckn8dk.js → ru-DtS87Pq4-jrk7v5aw.js} +1 -1
  86. package/bin/runtime/tui/{sankeyDiagram-XADWPNL6-mWMx9G9E-4f71xj48.js → sankeyDiagram-XADWPNL6-tTORGPwn-qtpp88mc.js} +1 -1
  87. package/bin/runtime/tui/{sequenceDiagram-FGHM5R23-0Ri6_7zP-k17t9yk8.js → sequenceDiagram-FGHM5R23-Chd2GR2n-v0dh3dgt.js} +1 -1
  88. package/bin/runtime/tui/{session-BV0LX606-j11ppydf.js → session-xxBuNFt6-pgavg5zv.js} +25 -25
  89. package/bin/runtime/tui/{settings-CaQrQUx2-jhes3jwj.js → settings-DAiABNBQ-08r9nej6.js} +1 -1
  90. package/bin/runtime/tui/{stateDiagram-FHFEXIEX-fwQ5rVuv-ecabdwkx.js → stateDiagram-FHFEXIEX-B0PmXsD5-0ncrecth.js} +1 -1
  91. package/bin/runtime/tui/stateDiagram-v2-QKLJ7IA2-BQp9UDrh-nz8sa58k.js +1 -0
  92. package/bin/runtime/tui/{th-DjONqhgk-72te62ev.js → th-BLv0rqnk-qhyahbgr.js} +1 -1
  93. package/bin/runtime/tui/{th-BS1uSHlN-gaxxaqr8.js → th-n0bdSbJW-hg46eqkv.js} +1 -1
  94. package/bin/runtime/tui/{timeline-definition-GMOUNBTQ-D_Neh8bS-f9qz8qj3.js → timeline-definition-GMOUNBTQ-DAd7pu9f-tt8fxjcy.js} +1 -1
  95. package/bin/runtime/tui/{tr-D7JUDkNG-trybtksg.js → tr-7N3SaL64-v5n6b6bw.js} +1 -1
  96. package/bin/runtime/tui/{tr-DHKVC_SD-t7crfnsr.js → tr-BFbjYrNY-a2gxx7v4.js} +1 -1
  97. package/bin/runtime/tui/{vennDiagram-DHZGUBPP-fIOdUHTG-bm8beekk.js → vennDiagram-DHZGUBPP-DmZAZOkV-tb4akpv9.js} +1 -1
  98. package/bin/runtime/tui/{wardley-RL74JXVD-mp486ivj-s1bcrv2m.js → wardley-RL74JXVD-D9krgESy-hc51cka6.js} +1 -1
  99. package/bin/runtime/tui/{wardleyDiagram-NUSXRM2D-CbulH8KL-9vtmgc00.js → wardleyDiagram-NUSXRM2D-Yu7Pm_ao-s084pty1.js} +1 -1
  100. package/bin/runtime/tui/{xychartDiagram-5P7HB3ND-5c4vGFpm-4ajepfh1.js → xychartDiagram-5P7HB3ND-DyPEpWm0-3aqchb1r.js} +1 -1
  101. package/bin/runtime/tui/{zh-BdQ5rFUE-gq6r6pg6.js → zh-B7FVGIem-dnw0eg81.js} +1 -1
  102. package/bin/runtime/tui/{zh--EusBuW5-v3jgdrns.js → zh-DDJFG7nx-rmp3bdtr.js} +1 -1
  103. package/bin/runtime/tui/{zht-C2Bj8Y3u-j4mn0ty9.js → zht-BPNRNUu6-s4vdbj2q.js} +1 -1
  104. package/bin/runtime/tui/{zht-uBUhPDWj-tabqnar8.js → zht-f-8ad5jF-65hba3y7.js} +1 -1
  105. package/package.json +1 -1
  106. package/bin/runtime/tui/channel-CRd61DfB-a84z4rad.js +0 -1
  107. package/bin/runtime/tui/classDiagram-6PBFFD2Q-B2auL2tY-ve962fat.js +0 -1
  108. package/bin/runtime/tui/classDiagram-v2-HSJHXN6E-B2auL2tY-ve962fat.js +0 -1
  109. package/bin/runtime/tui/clone-BzwFlJAo-xaa46y8s.js +0 -1
  110. package/bin/runtime/tui/stateDiagram-v2-QKLJ7IA2-Dwy86PJv-fgm1z51m.js +0 -1
@@ -1,4 +1,4 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/angular-html-CU67Zn6k.js","assets/html-GMplVEZG.js","assets/javascript-wDzz0qaB.js","assets/css-DPfMkruS.js","assets/angular-ts-BwZT4LLn.js","assets/scss-OYdSNvt2.js","assets/apl-dKokRX4l.js","assets/xml-sdJ4AIDG.js","assets/java-CylS5w8V.js","assets/json-Cp-IABpG.js","assets/astro-CbQHKStN.js","assets/typescript-BPQ3VLAy.js","assets/postcss-CXtECtnM.js","assets/tsx-COt5Ahok.js","assets/blade-DVc8C-J4.js","assets/html-derivative-BFtXZ54Q.js","assets/sql-BLtJtn59.js","assets/bsl-BO_Y6i37.js","assets/sdbl-DVxCFoDh.js","assets/cairo-KRGpt6FW.js","assets/python-B6aJPvgy.js","assets/cobol-nwyudZeR.js","assets/coffee-Ch7k5sss.js","assets/cpp-CofmeUqb.js","assets/regexp-CDVJQ6XC.js","assets/glsl-DplSGwfg.js","assets/c-BIGW1oBm.js","assets/crystal-tKQVLTB8.js","assets/shellscript-Yzrsuije.js","assets/edge-BkV0erSs.js","assets/elixir-CDX3lj18.js","assets/elm-DbKCFpqz.js","assets/erb-BOJIQeun.js","assets/ruby-BvKwtOVI.js","assets/haml-B8DHNrY2.js","assets/graphql-ChdNCCLP.js","assets/jsx-g9-lgVsj.js","assets/lua-BbnMAYS6.js","assets/yaml-Buea-lGh.js","assets/erlang-DsQrWhSR.js","assets/markdown-Cvjx9yec.js","assets/fortran-fixed-form-BZjJHVRy.js","assets/fortran-free-form-D22FLkUw.js","assets/fsharp-CXgrBDvD.js","assets/gdresource-B7Tvp0Sc.js","assets/gdshader-DkwncUOv.js","assets/gdscript-DTMYz4Jt.js","assets/git-commit-F4YmCXRG.js","assets/diff-D97Zzqfu.js","assets/git-rebase-r7XF79zn.js","assets/glimmer-js-Rg0-pVw9.js","assets/glimmer-ts-U6CK756n.js","assets/hack-CaT9iCJl.js","assets/handlebars-BL8al0AC.js","assets/http-jrhK8wxY.js","assets/hurl-irOxFIW8.js","assets/csv-fuZLfV_i.js","assets/hxml-Bvhsp5Yf.js","assets/haxe-CzTSHFRz.js","assets/jinja-4LBKfQ-Z.js","assets/jison-wvAkD_A8.js","assets/julia-C8NyazO9.js","assets/r-DiinP2Uv.js","assets/latex-BdAV_C_H.js","assets/tex-CxkMU7Pf.js","assets/liquid-DYVedYrR.js","assets/marko-CPi9NSCl.js","assets/less-B1dDrJ26.js","assets/mdc-DUICxH0z.js","assets/nginx-DknmC5AR.js","assets/nim-CVrawwO9.js","assets/perl-C0TMdlhV.js","assets/php-CDn_0X-4.js","assets/pug-CGlum2m_.js","assets/qml-3beO22l8.js","assets/razor-CE9lU5zL.js","assets/csharp-K5feNrxe.js","assets/rst-B0xPkSld.js","assets/cmake-D1j8_8rp.js","assets/sas-cz2c8ADy.js","assets/shaderlab-Dg9Lc6iA.js","assets/hlsl-D3lLCCz7.js","assets/shellsession-BADoaaVG.js","assets/soy-Brmx7dQM.js","assets/sparql-rVzFXLq3.js","assets/turtle-BsS91CYL.js","assets/stata-BH5u7GGu.js","assets/svelte-3Dk4HxPD.js","assets/templ-W15q3VgB.js","assets/go-Dn2_MT6a.js","assets/ts-tags-zn1MmPIZ.js","assets/twig-CO9l9SDP.js","assets/vue-DnHKYNfI.js","assets/vue-html-CChd_i61.js","assets/vue-vine-8moa0y9V.js","assets/stylus-BEDo0Tqx.js","assets/xsl-CtQFsRM5.js","assets/dialog-select-server-DGTNSgKw.js","assets/list-BiQMzfJm.js","assets/dialog-select-provider-C-JEreLC.js","assets/provider-icon-mQ6o_ygz.js","assets/dialog-connect-provider-CbBxytwI.js","assets/dialog-select-directory-BgyTQJRP.js","assets/file-icon-hzEOBp5u.js","assets/settings-CaQrQUx2.js","assets/session-BV0LX606.js"])))=>i.map(i=>d[i]);
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/angular-html-CU67Zn6k.js","assets/html-GMplVEZG.js","assets/javascript-wDzz0qaB.js","assets/css-DPfMkruS.js","assets/angular-ts-BwZT4LLn.js","assets/scss-OYdSNvt2.js","assets/apl-dKokRX4l.js","assets/xml-sdJ4AIDG.js","assets/java-CylS5w8V.js","assets/json-Cp-IABpG.js","assets/astro-CbQHKStN.js","assets/typescript-BPQ3VLAy.js","assets/postcss-CXtECtnM.js","assets/tsx-COt5Ahok.js","assets/blade-DVc8C-J4.js","assets/html-derivative-BFtXZ54Q.js","assets/sql-BLtJtn59.js","assets/bsl-BO_Y6i37.js","assets/sdbl-DVxCFoDh.js","assets/cairo-KRGpt6FW.js","assets/python-B6aJPvgy.js","assets/cobol-nwyudZeR.js","assets/coffee-Ch7k5sss.js","assets/cpp-CofmeUqb.js","assets/regexp-CDVJQ6XC.js","assets/glsl-DplSGwfg.js","assets/c-BIGW1oBm.js","assets/crystal-tKQVLTB8.js","assets/shellscript-Yzrsuije.js","assets/edge-BkV0erSs.js","assets/elixir-CDX3lj18.js","assets/elm-DbKCFpqz.js","assets/erb-BOJIQeun.js","assets/ruby-BvKwtOVI.js","assets/haml-B8DHNrY2.js","assets/graphql-ChdNCCLP.js","assets/jsx-g9-lgVsj.js","assets/lua-BbnMAYS6.js","assets/yaml-Buea-lGh.js","assets/erlang-DsQrWhSR.js","assets/markdown-Cvjx9yec.js","assets/fortran-fixed-form-BZjJHVRy.js","assets/fortran-free-form-D22FLkUw.js","assets/fsharp-CXgrBDvD.js","assets/gdresource-B7Tvp0Sc.js","assets/gdshader-DkwncUOv.js","assets/gdscript-DTMYz4Jt.js","assets/git-commit-F4YmCXRG.js","assets/diff-D97Zzqfu.js","assets/git-rebase-r7XF79zn.js","assets/glimmer-js-Rg0-pVw9.js","assets/glimmer-ts-U6CK756n.js","assets/hack-CaT9iCJl.js","assets/handlebars-BL8al0AC.js","assets/http-jrhK8wxY.js","assets/hurl-irOxFIW8.js","assets/csv-fuZLfV_i.js","assets/hxml-Bvhsp5Yf.js","assets/haxe-CzTSHFRz.js","assets/jinja-4LBKfQ-Z.js","assets/jison-wvAkD_A8.js","assets/julia-C8NyazO9.js","assets/r-DiinP2Uv.js","assets/latex-BdAV_C_H.js","assets/tex-CxkMU7Pf.js","assets/liquid-DYVedYrR.js","assets/marko-CPi9NSCl.js","assets/less-B1dDrJ26.js","assets/mdc-DUICxH0z.js","assets/nginx-DknmC5AR.js","assets/nim-CVrawwO9.js","assets/perl-C0TMdlhV.js","assets/php-CDn_0X-4.js","assets/pug-CGlum2m_.js","assets/qml-3beO22l8.js","assets/razor-CE9lU5zL.js","assets/csharp-K5feNrxe.js","assets/rst-B0xPkSld.js","assets/cmake-D1j8_8rp.js","assets/sas-cz2c8ADy.js","assets/shaderlab-Dg9Lc6iA.js","assets/hlsl-D3lLCCz7.js","assets/shellsession-BADoaaVG.js","assets/soy-Brmx7dQM.js","assets/sparql-rVzFXLq3.js","assets/turtle-BsS91CYL.js","assets/stata-BH5u7GGu.js","assets/svelte-3Dk4HxPD.js","assets/templ-W15q3VgB.js","assets/go-Dn2_MT6a.js","assets/ts-tags-zn1MmPIZ.js","assets/twig-CO9l9SDP.js","assets/vue-DnHKYNfI.js","assets/vue-html-CChd_i61.js","assets/vue-vine-8moa0y9V.js","assets/stylus-BEDo0Tqx.js","assets/xsl-CtQFsRM5.js","assets/dialog-select-server-HywTbVo8.js","assets/list-B7F45yIt.js","assets/dialog-select-provider-DBHvhmzI.js","assets/provider-icon-9tRUCm8P.js","assets/dialog-connect-provider-Cu-bRug-.js","assets/dialog-select-directory-DlfczDen.js","assets/file-icon-BlCvs3E5.js","assets/settings-DAiABNBQ.js","assets/session-xxBuNFt6.js"])))=>i.map(i=>d[i]);
2
2
  (function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))r(i);new MutationObserver(i=>{for(const o of i)if(o.type==="childList")for(const s of o.addedNodes)s.tagName==="LINK"&&s.rel==="modulepreload"&&r(s)}).observe(document,{childList:!0,subtree:!0});function n(i){const o={};return i.integrity&&(o.integrity=i.integrity),i.referrerPolicy&&(o.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?o.credentials="include":i.crossOrigin==="anonymous"?o.credentials="omit":o.credentials="same-origin",o}function r(i){if(i.ep)return;i.ep=!0;const o=n(i);fetch(i.href,o)}})();const qe={context:void 0,registry:void 0,effects:void 0,done:!1,getContextId(){return Xk(this.context.count)},getNextContextId(){return Xk(this.context.count++)}};function Xk(e){const t=String(e),n=t.length-1;return qe.context.id+(n?String.fromCharCode(96+n):"")+t}function ys(e){qe.context=e}const E9=!1,oj=(e,t)=>e===t,ho=Symbol("solid-proxy"),$9=typeof Proxy=="function",Rd=Symbol("solid-track"),F0={equals:oj};let xd=null,A9=O9;const Fi=1,Nd=2,L9={owned:null,cleanups:null,context:null,owner:null},u1={};var ct=null;let Me=null,sj=null,Ft=null,Er=null,nr=null,lp=0;function jn(e,t){const n=Ft,r=ct,i=e.length===0,o=t===void 0?r:t,s=i?L9:{owned:null,cleanups:null,context:o?o.context:null,owner:o},a=i?e:()=>e(()=>ot(()=>da(s)));ct=s,Ft=null;try{return pi(a,!0)}finally{Ft=n,ct=r}}function de(e,t){t=t?Object.assign({},F0,t):F0;const n={value:e,observers:null,observerSlots:null,comparator:t.equals||void 0},r=i=>(typeof i=="function"&&(Me&&Me.running&&Me.sources.has(n)?i=i(n.tValue):i=i(n.value)),M9(n,i));return[D9.bind(n),r]}function Ho(e,t,n){const r=bf(e,t,!0,Fi);Qc(r)}function De(e,t,n){const r=bf(e,t,!1,Fi);Qc(r)}function re(e,t,n){A9=hj;const r=bf(e,t,!1,Fi),i=ll&&ut(ll);i&&(r.suspense=i),(!n||!n.render)&&(r.user=!0),nr?nr.push(r):Qc(r)}function F(e,t,n){n=n?Object.assign({},F0,n):F0;const r=bf(e,t,!0,0);return r.observers=null,r.observerSlots=null,r.comparator=n.equals||void 0,Qc(r),D9.bind(r)}function aj(e){return e&&typeof e=="object"&&"then"in e}function Xo(e,t,n){let r,i,o;typeof t=="function"?(r=e,i=t,o=n||{}):(r=!0,i=e,o=t||{});let s=null,a=u1,l=null,c=!1,u=!1,d="initialValue"in o,h=typeof r=="function"&&F(r);const f=new Set,[m,p]=(o.storage||de)(o.initialValue),[g,v]=de(void 0),[y,w]=de(void 0,{equals:!1}),[k,x]=de(d?"ready":"unresolved");qe.context&&(l=qe.getNextContextId(),o.ssrLoadFrom==="initial"?a=o.initialValue:qe.load&&qe.has(l)&&(a=qe.load(l)));function C(M,I,L,A){return s===M&&(s=null,A!==void 0&&(d=!0),(M===a||I===a)&&o.onHydrated&&queueMicrotask(()=>o.onHydrated(A,{value:I})),a=u1,Me&&M&&c?(Me.promises.delete(M),c=!1,pi(()=>{Me.running=!0,S(I,L)},!1)):S(I,L)),I}function S(M,I){pi(()=>{I===void 0&&p(()=>M),x(I!==void 0?"errored":d?"ready":"unresolved"),v(I);for(const L of f.keys())L.decrement();f.clear()},!1)}function $(){const M=ll&&ut(ll),I=m(),L=g();if(L!==void 0&&!s)throw L;return Ft&&!Ft.user&&M&&Ho(()=>{y(),s&&(M.resolved&&Me&&c?Me.promises.add(s):f.has(M)||(M.increment(),f.add(M)))}),I}function O(M=!0){if(M!==!1&&u)return;u=!1;const I=h?h():r;if(c=Me&&Me.running,I==null||I===!1){C(s,ot(m));return}Me&&s&&Me.promises.delete(s);let L;const A=a!==u1?a:ot(()=>{try{return i(I,{value:m(),refetching:M})}catch(T){L=T}});if(L!==void 0){C(s,void 0,x0(L),I);return}else if(!aj(A))return C(s,A,void 0,I),A;return s=A,"v"in A?(A.s===1?C(s,A.v,void 0,I):C(s,void 0,x0(A.v),I),A):(u=!0,queueMicrotask(()=>u=!1),pi(()=>{x(d?"refreshing":"pending"),w()},!1),A.then(T=>C(A,T,void 0,I),T=>C(A,void 0,x0(T),I)))}Object.defineProperties($,{state:{get:()=>k()},error:{get:()=>g()},loading:{get(){const M=k();return M==="pending"||M==="refreshing"}},latest:{get(){if(!d)return $();const M=g();if(M&&!s)throw M;return m()}}});let D=ct;return h?Ho(()=>(D=ct,O(!1))):O(!1),[$,{refetch:M=>bs(D,()=>O(M)),mutate:p}]}function Xe(e){return pi(e,!1)}function ot(e){if(Ft===null)return e();const t=Ft;Ft=null;try{return e()}finally{Ft=t}}function gt(e,t,n){const r=Array.isArray(e);let i,o=n&&n.defer;return s=>{let a;if(r){a=Array(e.length);for(let c=0;c<e.length;c++)a[c]=e[c]()}else a=e();if(o)return o=!1,s;const l=ot(()=>t(a,i,s));return i=a,l}}function Kt(e){re(()=>ot(e))}function fe(e){return ct===null||(ct.cleanups===null?ct.cleanups=[e]:ct.cleanups.push(e)),e}function lj(e,t){xd||(xd=Symbol("error")),ct=bf(void 0,void 0,!0),ct.context={...ct.context,[xd]:[t]},Me&&Me.running&&Me.sources.add(ct);try{return e()}catch(n){wf(n)}finally{ct=ct.owner}}function vy(){return Ft}function mo(){return ct}function bs(e,t){const n=ct,r=Ft;ct=e,Ft=null;try{return pi(t,!0)}catch(i){wf(i)}finally{ct=n,Ft=r}}function cj(e){if(Me&&Me.running)return e(),Me.done;const t=Ft,n=ct;return Promise.resolve().then(()=>{Ft=t,ct=n;let r;return ll&&(r=Me||(Me={sources:new Set,effects:[],promises:new Set,disposed:new Set,queue:new Set,running:!0}),r.done||(r.done=new Promise(i=>r.resolve=i)),r.running=!0),pi(e,!1),Ft=ct=null,r?r.done:void 0})}const[N6e,Jk]=de(!1);function uj(e){nr.push.apply(nr,e),e.length=0}function pt(e,t){const n=Symbol("context");return{id:n,Provider:mj(n),defaultValue:e}}function ut(e){let t;return ct&&ct.context&&(t=ct.context[e.id])!==void 0?t:e.defaultValue}function Cl(e){const t=F(e),n=F(()=>yy(t()));return n.toArray=()=>{const r=n();return Array.isArray(r)?r:r!=null?[r]:[]},n}let ll;function dj(){return ll||(ll=pt())}function D9(){const e=Me&&Me.running;if(this.sources&&(e?this.tState:this.state))if((e?this.tState:this.state)===Fi)Qc(this);else{const t=Er;Er=null,pi(()=>H0(this),!1),Er=t}if(Ft){const t=this.observers?this.observers.length:0;Ft.sources?(Ft.sources.push(this),Ft.sourceSlots.push(t)):(Ft.sources=[this],Ft.sourceSlots=[t]),this.observers?(this.observers.push(Ft),this.observerSlots.push(Ft.sources.length-1)):(this.observers=[Ft],this.observerSlots=[Ft.sources.length-1])}return e&&Me.sources.has(this)?this.tValue:this.value}function M9(e,t,n){let r=Me&&Me.running&&Me.sources.has(e)?e.tValue:e.value;if(!e.comparator||!e.comparator(r,t)){if(Me){const i=Me.running;(i||!n&&Me.sources.has(e))&&(Me.sources.add(e),e.tValue=t),i||(e.value=t)}else e.value=t;e.observers&&e.observers.length&&pi(()=>{for(let i=0;i<e.observers.length;i+=1){const o=e.observers[i],s=Me&&Me.running;s&&Me.disposed.has(o)||((s?!o.tState:!o.state)&&(o.pure?Er.push(o):nr.push(o),o.observers&&P9(o)),s?o.tState=Fi:o.state=Fi)}if(Er.length>1e6)throw Er=[],new Error},!1)}return t}function Qc(e){if(!e.fn)return;da(e);const t=lp;Qk(e,Me&&Me.running&&Me.sources.has(e)?e.tValue:e.value,t),Me&&!Me.running&&Me.sources.has(e)&&queueMicrotask(()=>{pi(()=>{Me&&(Me.running=!0),Ft=ct=e,Qk(e,e.tValue,t),Ft=ct=null},!1)})}function Qk(e,t,n){let r;const i=ct,o=Ft;Ft=ct=e;try{r=e.fn(t)}catch(s){return e.pure&&(Me&&Me.running?(e.tState=Fi,e.tOwned&&e.tOwned.forEach(da),e.tOwned=void 0):(e.state=Fi,e.owned&&e.owned.forEach(da),e.owned=null)),e.updatedAt=n+1,wf(s)}finally{Ft=o,ct=i}(!e.updatedAt||e.updatedAt<=n)&&(e.updatedAt!=null&&"observers"in e?M9(e,r,!0):Me&&Me.running&&e.pure?(Me.sources.has(e)||(e.value=r),Me.sources.add(e),e.tValue=r):e.value=r,e.updatedAt=n)}function bf(e,t,n,r=Fi,i){const o={fn:e,state:r,updatedAt:null,owned:null,sources:null,sourceSlots:null,cleanups:null,value:t,owner:ct,context:ct?ct.context:null,pure:n};return Me&&Me.running&&(o.state=0,o.tState=r),ct===null||ct!==L9&&(Me&&Me.running&&ct.pure?ct.tOwned?ct.tOwned.push(o):ct.tOwned=[o]:ct.owned?ct.owned.push(o):ct.owned=[o]),o}function U0(e){const t=Me&&Me.running;if((t?e.tState:e.state)===0)return;if((t?e.tState:e.state)===Nd)return H0(e);if(e.suspense&&ot(e.suspense.inFallback))return e.suspense.effects.push(e);const n=[e];for(;(e=e.owner)&&(!e.updatedAt||e.updatedAt<lp);){if(t&&Me.disposed.has(e))return;(t?e.tState:e.state)&&n.push(e)}for(let r=n.length-1;r>=0;r--){if(e=n[r],t){let i=e,o=n[r+1];for(;(i=i.owner)&&i!==o;)if(Me.disposed.has(i))return}if((t?e.tState:e.state)===Fi)Qc(e);else if((t?e.tState:e.state)===Nd){const i=Er;Er=null,pi(()=>H0(e,n[0]),!1),Er=i}}}function pi(e,t){if(Er)return e();let n=!1;t||(Er=[]),nr?n=!0:nr=[],lp++;try{const r=e();return fj(n),r}catch(r){n||(nr=null),Er=null,wf(r)}}function fj(e){if(Er&&(O9(Er),Er=null),e)return;let t;if(Me){if(!Me.promises.size&&!Me.queue.size){const r=Me.sources,i=Me.disposed;nr.push.apply(nr,Me.effects),t=Me.resolve;for(const o of nr)"tState"in o&&(o.state=o.tState),delete o.tState;Me=null,pi(()=>{for(const o of i)da(o);for(const o of r){if(o.value=o.tValue,o.owned)for(let s=0,a=o.owned.length;s<a;s++)da(o.owned[s]);o.tOwned&&(o.owned=o.tOwned),delete o.tValue,delete o.tOwned,o.tState=0}Jk(!1)},!1)}else if(Me.running){Me.running=!1,Me.effects.push.apply(Me.effects,nr),nr=null,Jk(!0);return}}const n=nr;nr=null,n.length&&pi(()=>A9(n),!1),t&&t()}function O9(e){for(let t=0;t<e.length;t++)U0(e[t])}function hj(e){let t,n=0;for(t=0;t<e.length;t++){const r=e[t];r.user?e[n++]=r:U0(r)}if(qe.context){if(qe.count){qe.effects||(qe.effects=[]),qe.effects.push(...e.slice(0,n));return}ys()}for(qe.effects&&(qe.done||!qe.count)&&(e=[...qe.effects,...e],n+=qe.effects.length,delete qe.effects),t=0;t<n;t++)U0(e[t])}function H0(e,t){const n=Me&&Me.running;n?e.tState=0:e.state=0;for(let r=0;r<e.sources.length;r+=1){const i=e.sources[r];if(i.sources){const o=n?i.tState:i.state;o===Fi?i!==t&&(!i.updatedAt||i.updatedAt<lp)&&U0(i):o===Nd&&H0(i,t)}}}function P9(e){const t=Me&&Me.running;for(let n=0;n<e.observers.length;n+=1){const r=e.observers[n];(t?!r.tState:!r.state)&&(t?r.tState=Nd:r.state=Nd,r.pure?Er.push(r):nr.push(r),r.observers&&P9(r))}}function da(e){let t;if(e.sources)for(;e.sources.length;){const n=e.sources.pop(),r=e.sourceSlots.pop(),i=n.observers;if(i&&i.length){const o=i.pop(),s=n.observerSlots.pop();r<i.length&&(o.sourceSlots[s]=r,i[r]=o,n.observerSlots[r]=s)}}if(e.tOwned){for(t=e.tOwned.length-1;t>=0;t--)da(e.tOwned[t]);delete e.tOwned}if(Me&&Me.running&&e.pure)R9(e,!0);else if(e.owned){for(t=e.owned.length-1;t>=0;t--)da(e.owned[t]);e.owned=null}if(e.cleanups){for(t=e.cleanups.length-1;t>=0;t--)e.cleanups[t]();e.cleanups=null}Me&&Me.running?e.tState=0:e.state=0}function R9(e,t){if(t||(e.tState=0,Me.disposed.add(e)),e.owned)for(let n=0;n<e.owned.length;n++)R9(e.owned[n])}function x0(e){return e instanceof Error?e:new Error(typeof e=="string"?e:"Unknown error",{cause:e})}function e6(e,t,n){try{for(const r of t)r(e)}catch(r){wf(r,n&&n.owner||null)}}function wf(e,t=ct){const n=xd&&t&&t.context&&t.context[xd],r=x0(e);if(!n)throw r;nr?nr.push({fn(){e6(r,n,t)},state:Fi}):e6(r,n,t)}function yy(e){if(typeof e=="function"&&!e.length)return yy(e());if(Array.isArray(e)){const t=[];for(let n=0;n<e.length;n++){const r=yy(e[n]);Array.isArray(r)?t.push.apply(t,r):t.push(r)}return t}return e}function mj(e,t){return function(r){let i;return De(()=>i=ot(()=>(ct.context={...ct.context,[e]:r.value},Cl(()=>r.children))),void 0),i}}const by=Symbol("fallback");function B0(e){for(let t=0;t<e.length;t++)e[t]()}function pj(e,t,n={}){let r=[],i=[],o=[],s=0,a=t.length>1?[]:null;return fe(()=>B0(o)),()=>{let l=e()||[],c=l.length,u,d;return l[Rd],ot(()=>{let f,m,p,g,v,y,w,k,x;if(c===0)s!==0&&(B0(o),o=[],r=[],i=[],s=0,a&&(a=[])),n.fallback&&(r=[by],i[0]=jn(C=>(o[0]=C,n.fallback())),s=1);else if(s===0){for(i=new Array(c),d=0;d<c;d++)r[d]=l[d],i[d]=jn(h);s=c}else{for(p=new Array(c),g=new Array(c),a&&(v=new Array(c)),y=0,w=Math.min(s,c);y<w&&r[y]===l[y];y++);for(w=s-1,k=c-1;w>=y&&k>=y&&r[w]===l[k];w--,k--)p[k]=i[w],g[k]=o[w],a&&(v[k]=a[w]);for(f=new Map,m=new Array(k+1),d=k;d>=y;d--)x=l[d],u=f.get(x),m[d]=u===void 0?-1:u,f.set(x,d);for(u=y;u<=w;u++)x=r[u],d=f.get(x),d!==void 0&&d!==-1?(p[d]=i[u],g[d]=o[u],a&&(v[d]=a[u]),d=m[d],f.set(x,d)):o[u]();for(d=y;d<c;d++)d in p?(i[d]=p[d],o[d]=g[d],a&&(a[d]=v[d],a[d](d))):i[d]=jn(h);i=i.slice(0,s=c),r=l.slice(0)}return i});function h(f){if(o[d]=f,a){const[m,p]=de(d);return a[d]=p,t(l[d],m)}return t(l[d])}}}function gj(e,t,n={}){let r=[],i=[],o=[],s=[],a=0,l;return fe(()=>B0(o)),()=>{const c=e()||[],u=c.length;return c[Rd],ot(()=>{if(u===0)return a!==0&&(B0(o),o=[],r=[],i=[],a=0,s=[]),n.fallback&&(r=[by],i[0]=jn(h=>(o[0]=h,n.fallback())),a=1),i;for(r[0]===by&&(o[0](),o=[],r=[],i=[],a=0),l=0;l<u;l++)l<r.length&&r[l]!==c[l]?s[l](()=>c[l]):l>=r.length&&(i[l]=jn(d));for(;l<r.length;l++)o[l]();return a=s.length=o.length=u,r=c.slice(0),i=i.slice(0,a)});function d(h){o[l]=h;const[f,m]=de(c[l]);return s[l]=m,t(f,l)}}}function b(e,t){return ot(()=>e(t||{}))}function gh(){return!0}const wy={get(e,t,n){return t===ho?n:e.get(t)},has(e,t){return t===ho?!0:e.has(t)},set:gh,deleteProperty:gh,getOwnPropertyDescriptor(e,t){return{configurable:!0,enumerable:!0,get(){return e.get(t)},set:gh,deleteProperty:gh}},ownKeys(e){return e.keys()}};function d1(e){return(e=typeof e=="function"?e():e)?e:{}}function vj(){for(let e=0,t=this.length;e<t;++e){const n=this[e]();if(n!==void 0)return n}}function ne(...e){let t=!1;for(let s=0;s<e.length;s++){const a=e[s];t=t||!!a&&ho in a,e[s]=typeof a=="function"?(t=!0,F(a)):a}if($9&&t)return new Proxy({get(s){for(let a=e.length-1;a>=0;a--){const l=d1(e[a])[s];if(l!==void 0)return l}},has(s){for(let a=e.length-1;a>=0;a--)if(s in d1(e[a]))return!0;return!1},keys(){const s=[];for(let a=0;a<e.length;a++)s.push(...Object.keys(d1(e[a])));return[...new Set(s)]}},wy);const n={},r=Object.create(null);for(let s=e.length-1;s>=0;s--){const a=e[s];if(!a)continue;const l=Object.getOwnPropertyNames(a);for(let c=l.length-1;c>=0;c--){const u=l[c];if(u==="__proto__"||u==="constructor")continue;const d=Object.getOwnPropertyDescriptor(a,u);if(!r[u])r[u]=d.get?{enumerable:!0,configurable:!0,get:vj.bind(n[u]=[d.get.bind(a)])}:d.value!==void 0?d:void 0;else{const h=n[u];h&&(d.get?h.push(d.get.bind(a)):d.value!==void 0&&h.push(()=>d.value))}}}const i={},o=Object.keys(r);for(let s=o.length-1;s>=0;s--){const a=o[s],l=r[a];l&&l.get?Object.defineProperty(i,a,l):i[a]=l?l.value:void 0}return i}function se(e,...t){const n=t.length;if($9&&ho in e){const i=n>1?t.flat():t[0],o=t.map(s=>new Proxy({get(a){return s.includes(a)?e[a]:void 0},has(a){return s.includes(a)&&a in e},keys(){return s.filter(a=>a in e)}},wy));return o.push(new Proxy({get(s){return i.includes(s)?void 0:e[s]},has(s){return i.includes(s)?!1:s in e},keys(){return Object.keys(e).filter(s=>!i.includes(s))}},wy)),o}const r=[];for(let i=0;i<=n;i++)r[i]={};for(const i of Object.getOwnPropertyNames(e)){let o=n;for(let l=0;l<t.length;l++)if(t[l].includes(i)){o=l;break}const s=Object.getOwnPropertyDescriptor(e,i);!s.get&&!s.set&&s.enumerable&&s.writable&&s.configurable?r[o][i]=s.value:Object.defineProperty(r[o],i,s)}return r}function cp(e){let t,n;const r=i=>{const o=qe.context;if(o){const[a,l]=de();qe.count||(qe.count=0),qe.count++,(n||(n=e())).then(c=>{!qe.done&&ys(o),qe.count--,l(()=>c.default),ys()}),t=a}else if(!t){const[a]=Xo(()=>(n||(n=e())).then(l=>l.default));t=a}let s;return F(()=>(s=t())?ot(()=>{if(!o||qe.done)return s(i);const a=qe.context;ys(o);const l=s(i);return ys(a),l}):"")};return r.preload=()=>n||((n=e()).then(i=>t=()=>i.default),n),r}let yj=0;function an(){return qe.context?qe.getNextContextId():`cl-${yj++}`}const N9=e=>`Stale read from <${e}>.`;function Ut(e){const t="fallback"in e&&{fallback:()=>e.fallback};return F(pj(()=>e.each,e.children,t||void 0))}function z6e(e){const t="fallback"in e&&{fallback:()=>e.fallback};return F(gj(()=>e.each,e.children,t||void 0))}function ce(e){const t=e.keyed,n=F(()=>e.when,void 0,void 0),r=t?n:F(n,void 0,{equals:(i,o)=>!i==!o});return F(()=>{const i=r();if(i){const o=e.children;return typeof o=="function"&&o.length>0?ot(()=>o(t?i:()=>{if(!ot(r))throw N9("Show");return n()})):o}return e.fallback},void 0,void 0)}function Il(e){const t=Cl(()=>e.children),n=F(()=>{const r=t(),i=Array.isArray(r)?r:[r];let o=()=>{};for(let s=0;s<i.length;s++){const a=s,l=i[s],c=o,u=F(()=>c()?void 0:l.when,void 0,void 0),d=l.keyed?u:F(u,void 0,{equals:(h,f)=>!h==!f});o=()=>c()||(d()?[a,u,l]:void 0)}return o});return F(()=>{const r=n()();if(!r)return e.fallback;const[i,o,s]=r,a=s.children;return typeof a=="function"&&a.length>0?ot(()=>a(s.keyed?o():()=>{if(ot(n)()?.[0]!==i)throw N9("Match");return o()})):a},void 0,void 0)}function Cn(e){return e}let kc;function bj(){kc&&[...kc].forEach(e=>e())}function z9(e){let t;qe.context&&qe.load&&(t=qe.load(qe.getContextId()));const[n,r]=de(t,void 0);return kc||(kc=new Set),kc.add(r),fe(()=>kc.delete(r)),F(()=>{let i;if(i=n()){const o=e.fallback;return typeof o=="function"&&o.length?ot(()=>o(i,()=>r())):o}return lj(()=>e.children,r)},void 0,void 0)}const wj=pt();function j9(e){let t=0,n,r,i,o,s;const[a,l]=de(!1),c=dj(),u={increment:()=>{++t===1&&l(!0)},decrement:()=>{--t===0&&l(!1)},inFallback:a,effects:[],resolved:!1},d=mo();if(qe.context&&qe.load){const m=qe.getContextId();let p=qe.load(m);if(p&&(typeof p!="object"||p.s!==1?i=p:qe.gather(m)),i&&i!=="$$f"){const[g,v]=de(void 0,{equals:!1});o=g,i.then(()=>{if(qe.done)return v();qe.gather(m),ys(r),v(),ys()},y=>{s=y,v()})}}const h=ut(wj);h&&(n=h.register(u.inFallback));let f;return fe(()=>f&&f()),b(c.Provider,{value:u,get children(){return F(()=>{if(s)throw s;if(r=qe.context,o)return o(),o=void 0;r&&i==="$$f"&&ys();const m=F(()=>e.children);return F(p=>{const g=u.inFallback(),{showContent:v=!0,showFallback:y=!0}=n?n():{};if((!g||i&&i!=="$$f")&&v)return u.resolved=!0,f&&f(),f=r=i=void 0,uj(u.effects),m();if(y)return f?p:jn(w=>(f=w,r&&(ys({id:r.id+"F",count:0}),r=void 0),e.fallback),d)})})}})}const kj=["allowfullscreen","async","alpha","autofocus","autoplay","checked","controls","default","disabled","formnovalidate","hidden","indeterminate","inert","ismap","loop","multiple","muted","nomodule","novalidate","open","playsinline","readonly","required","reversed","seamless","selected","adauctionheaders","browsingtopics","credentialless","defaultchecked","defaultmuted","defaultselected","defer","disablepictureinpicture","disableremoteplayback","preservespitch","shadowrootclonable","shadowrootcustomelementregistry","shadowrootdelegatesfocus","shadowrootserializable","sharedstoragewritable"],xj=new Set(["className","value","readOnly","noValidate","formNoValidate","isMap","noModule","playsInline","adAuctionHeaders","allowFullscreen","browsingTopics","defaultChecked","defaultMuted","defaultSelected","disablePictureInPicture","disableRemotePlayback","preservesPitch","shadowRootClonable","shadowRootCustomElementRegistry","shadowRootDelegatesFocus","shadowRootSerializable","sharedStorageWritable",...kj]),Sj=new Set(["innerHTML","textContent","innerText","children"]),_j=Object.assign(Object.create(null),{className:"class",htmlFor:"for"}),Cj=Object.assign(Object.create(null),{class:"className",novalidate:{$:"noValidate",FORM:1},formnovalidate:{$:"formNoValidate",BUTTON:1,INPUT:1},ismap:{$:"isMap",IMG:1},nomodule:{$:"noModule",SCRIPT:1},playsinline:{$:"playsInline",VIDEO:1},readonly:{$:"readOnly",INPUT:1,TEXTAREA:1},adauctionheaders:{$:"adAuctionHeaders",IFRAME:1},allowfullscreen:{$:"allowFullscreen",IFRAME:1},browsingtopics:{$:"browsingTopics",IMG:1},defaultchecked:{$:"defaultChecked",INPUT:1},defaultmuted:{$:"defaultMuted",AUDIO:1,VIDEO:1},defaultselected:{$:"defaultSelected",OPTION:1},disablepictureinpicture:{$:"disablePictureInPicture",VIDEO:1},disableremoteplayback:{$:"disableRemotePlayback",AUDIO:1,VIDEO:1},preservespitch:{$:"preservesPitch",AUDIO:1,VIDEO:1},shadowrootclonable:{$:"shadowRootClonable",TEMPLATE:1},shadowrootdelegatesfocus:{$:"shadowRootDelegatesFocus",TEMPLATE:1},shadowrootserializable:{$:"shadowRootSerializable",TEMPLATE:1},sharedstoragewritable:{$:"sharedStorageWritable",IFRAME:1,IMG:1}});function Ij(e,t){const n=Cj[e];return typeof n=="object"?n[t]?n.$:void 0:n}const Tj=new Set(["beforeinput","click","dblclick","contextmenu","focusin","focusout","input","keydown","keyup","mousedown","mousemove","mouseout","mouseover","mouseup","pointerdown","pointermove","pointerout","pointerover","pointerup","touchend","touchmove","touchstart"]),Ej=new Set(["altGlyph","altGlyphDef","altGlyphItem","animate","animateColor","animateMotion","animateTransform","circle","clipPath","color-profile","cursor","defs","desc","ellipse","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","filter","font","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignObject","g","glyph","glyphRef","hkern","image","line","linearGradient","marker","mask","metadata","missing-glyph","mpath","path","pattern","polygon","polyline","radialGradient","rect","set","stop","svg","switch","symbol","text","textPath","tref","tspan","use","view","vkern"]),$j={xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace"},je=e=>F(()=>e());function Aj(e,t,n){let r=n.length,i=t.length,o=r,s=0,a=0,l=t[i-1].nextSibling,c=null;for(;s<i||a<o;){if(t[s]===n[a]){s++,a++;continue}for(;t[i-1]===n[o-1];)i--,o--;if(i===s){const u=o<r?a?n[a-1].nextSibling:n[o-a]:l;for(;a<o;)e.insertBefore(n[a++],u)}else if(o===a)for(;s<i;)(!c||!c.has(t[s]))&&t[s].remove(),s++;else if(t[s]===n[o-1]&&n[a]===t[i-1]){const u=t[--i].nextSibling;e.insertBefore(n[a++],t[s++].nextSibling),e.insertBefore(n[--o],u),t[i]=n[o]}else{if(!c){c=new Map;let d=a;for(;d<o;)c.set(n[d],d++)}const u=c.get(t[s]);if(u!=null)if(a<u&&u<o){let d=s,h=1,f;for(;++d<i&&d<o&&!((f=c.get(t[d]))==null||f!==u+h);)h++;if(h>u-a){const m=t[s];for(;a<u;)e.insertBefore(n[a++],m)}else e.replaceChild(n[a++],t[s++])}else s++;else t[s++].remove()}}}const t6="_$DX_DELEGATE";function Lj(e,t,n,r={}){let i;return jn(o=>{i=o,t===document?e():j(t,e(),t.firstChild?null:void 0,n)},r.owner),()=>{i(),t.textContent=""}}function ee(e,t,n,r){let i;const o=()=>{const a=r?document.createElementNS("http://www.w3.org/1998/Math/MathML","template"):document.createElement("template");return a.innerHTML=e,n?a.content.firstChild.firstChild:r?a.firstChild:a.content.firstChild},s=t?()=>ot(()=>document.importNode(i||(i=o()),!0)):()=>(i||(i=o())).cloneNode(!0);return s.cloneNode=s,s}function or(e,t=window.document){const n=t[t6]||(t[t6]=new Set);for(let r=0,i=e.length;r<i;r++){const o=e[r];n.has(o)||(n.add(o),t.addEventListener(o,Nj))}}function Ye(e,t,n){Tl(e)||(n==null?e.removeAttribute(t):e.setAttribute(t,n))}function Dj(e,t,n,r){Tl(e)||(r==null?e.removeAttributeNS(t,n):e.setAttributeNS(t,n,r))}function Mj(e,t,n){Tl(e)||(n?e.setAttribute(t,""):e.removeAttribute(t))}function Bo(e,t){Tl(e)||(t==null?e.removeAttribute("class"):e.className=t)}function Vo(e,t,n,r){if(r)Array.isArray(n)?(e[`$$${t}`]=n[0],e[`$$${t}Data`]=n[1]):e[`$$${t}`]=n;else if(Array.isArray(n)){const i=n[0];e.addEventListener(t,n[0]=o=>i.call(e,n[1],o))}else e.addEventListener(t,n,typeof n!="function"&&n)}function Ct(e,t,n={}){const r=Object.keys(t||{}),i=Object.keys(n);let o,s;for(o=0,s=i.length;o<s;o++){const a=i[o];!a||a==="undefined"||t[a]||(n6(e,a,!1),delete n[a])}for(o=0,s=r.length;o<s;o++){const a=r[o],l=!!t[a];!a||a==="undefined"||n[a]===l||!l||(n6(e,a,!0),n[a]=l)}return n}function up(e,t,n){if(!t)return n?Ye(e,"style"):t;const r=e.style;if(typeof t=="string")return r.cssText=t;typeof n=="string"&&(r.cssText=n=void 0),n||(n={}),t||(t={});let i,o;for(o in n)t[o]==null&&r.removeProperty(o),delete n[o];for(o in t)i=t[o],i!==n[o]&&(r.setProperty(o,i),n[o]=i);return n}function Xr(e,t,n){n!=null?e.style.setProperty(t,n):e.style.removeProperty(t)}function jr(e,t={},n,r){const i={};return r||De(()=>i.children=zd(e,t.children,i.children)),De(()=>typeof t.ref=="function"&&pr(t.ref,e)),De(()=>Oj(e,t,n,!0,i,!0)),i}function pr(e,t,n){return ot(()=>e(t,n))}function j(e,t,n,r){if(n!==void 0&&!r&&(r=[]),typeof t!="function")return zd(e,t,r,n);De(i=>zd(e,t(),i,n),r)}function Oj(e,t,n,r,i={},o=!1){t||(t={});for(const s in i)if(!(s in t)){if(s==="children")continue;i[s]=r6(e,s,null,i[s],n,o,t)}for(const s in t){if(s==="children")continue;const a=t[s];i[s]=r6(e,s,a,i[s],n,o,t)}}function Pj(e){let t,n;return!Tl()||!(t=qe.registry.get(n=zj()))?e():(qe.completed&&qe.completed.add(t),qe.registry.delete(n),t)}function Tl(e){return!!qe.context&&!qe.done&&(!e||e.isConnected)}function Rj(e){return e.toLowerCase().replace(/-([a-z])/g,(t,n)=>n.toUpperCase())}function n6(e,t,n){const r=t.trim().split(/\s+/);for(let i=0,o=r.length;i<o;i++)e.classList.toggle(r[i],n)}function r6(e,t,n,r,i,o,s){let a,l,c,u,d;if(t==="style")return up(e,n,r);if(t==="classList")return Ct(e,n,r);if(n===r)return r;if(t==="ref")o||n(e);else if(t.slice(0,3)==="on:"){const h=t.slice(3);r&&e.removeEventListener(h,r,typeof r!="function"&&r),n&&e.addEventListener(h,n,typeof n!="function"&&n)}else if(t.slice(0,10)==="oncapture:"){const h=t.slice(10);r&&e.removeEventListener(h,r,!0),n&&e.addEventListener(h,n,!0)}else if(t.slice(0,2)==="on"){const h=t.slice(2).toLowerCase(),f=Tj.has(h);if(!f&&r){const m=Array.isArray(r)?r[0]:r;e.removeEventListener(h,m)}(f||n)&&(Vo(e,h,n,f),f&&or([h]))}else if(t.slice(0,5)==="attr:")Ye(e,t.slice(5),n);else if(t.slice(0,5)==="bool:")Mj(e,t.slice(5),n);else if((d=t.slice(0,5)==="prop:")||(c=Sj.has(t))||!i&&((u=Ij(t,e.tagName))||(l=xj.has(t)))||(a=e.nodeName.includes("-")||"is"in s)){if(d)t=t.slice(5),l=!0;else if(Tl(e))return n;t==="class"||t==="className"?Bo(e,n):a&&!l&&!c?e[Rj(t)]=n:e[u||t]=n}else{const h=i&&t.indexOf(":")>-1&&$j[t.split(":")[0]];h?Dj(e,h,t,n):Ye(e,_j[t]||t,n)}return n}function Nj(e){if(qe.registry&&qe.events&&qe.events.find(([l,c])=>c===e))return;let t=e.target;const n=`$$${e.type}`,r=e.target,i=e.currentTarget,o=l=>Object.defineProperty(e,"target",{configurable:!0,value:l}),s=()=>{const l=t[n];if(l&&!t.disabled){const c=t[`${n}Data`];if(c!==void 0?l.call(t,c,e):l.call(t,e),e.cancelBubble)return}return t.host&&typeof t.host!="string"&&!t.host._$host&&t.contains(e.target)&&o(t.host),!0},a=()=>{for(;s()&&(t=t._$host||t.parentNode||t.host););};if(Object.defineProperty(e,"currentTarget",{configurable:!0,get(){return t||document}}),qe.registry&&!qe.done&&(qe.done=_$HY.done=!0),e.composedPath){const l=e.composedPath();o(l[0]);for(let c=0;c<l.length-2&&(t=l[c],!!s());c++){if(t._$host){t=t._$host,a();break}if(t.parentNode===i)break}}else a();o(r)}function zd(e,t,n,r,i){const o=Tl(e);if(o){!n&&(n=[...e.childNodes]);let l=[];for(let c=0;c<n.length;c++){const u=n[c];u.nodeType===8&&u.data.slice(0,2)==="!$"?u.remove():l.push(u)}n=l}for(;typeof n=="function";)n=n();if(t===n)return n;const s=typeof t,a=r!==void 0;if(e=a&&n[0]&&n[0].parentNode||e,s==="string"||s==="number"){if(o||s==="number"&&(t=t.toString(),t===n))return n;if(a){let l=n[0];l&&l.nodeType===3?l.data!==t&&(l.data=t):l=document.createTextNode(t),n=Yl(e,n,r,l)}else n!==""&&typeof n=="string"?n=e.firstChild.data=t:n=e.textContent=t}else if(t==null||s==="boolean"){if(o)return n;n=Yl(e,n,r)}else{if(s==="function")return De(()=>{let l=t();for(;typeof l=="function";)l=l();n=zd(e,l,n,r)}),()=>n;if(Array.isArray(t)){const l=[],c=n&&Array.isArray(n);if(ky(l,t,n,i))return De(()=>n=zd(e,l,n,r,!0)),()=>n;if(o){if(!l.length)return n;if(r===void 0)return n=[...e.childNodes];let u=l[0];if(u.parentNode!==e)return n;const d=[u];for(;(u=u.nextSibling)!==r;)d.push(u);return n=d}if(l.length===0){if(n=Yl(e,n,r),a)return n}else c?n.length===0?i6(e,l,r):Aj(e,n,l):(n&&Yl(e),i6(e,l));n=l}else if(t.nodeType){if(o&&t.parentNode)return n=a?[t]:t;if(Array.isArray(n)){if(a)return n=Yl(e,n,r,t);Yl(e,n,null,t)}else n==null||n===""||!e.firstChild?e.appendChild(t):e.replaceChild(t,e.firstChild);n=t}}return n}function ky(e,t,n,r){let i=!1;for(let o=0,s=t.length;o<s;o++){let a=t[o],l=n&&n[e.length],c;if(!(a==null||a===!0||a===!1))if((c=typeof a)=="object"&&a.nodeType)e.push(a);else if(Array.isArray(a))i=ky(e,a,l)||i;else if(c==="function")if(r){for(;typeof a=="function";)a=a();i=ky(e,Array.isArray(a)?a:[a],Array.isArray(l)?l:[l])||i}else e.push(a),i=!0;else{const u=String(a);l&&l.nodeType===3&&l.data===u?e.push(l):e.push(document.createTextNode(u))}}return i}function i6(e,t,n=null){for(let r=0,i=t.length;r<i;r++)e.insertBefore(t[r],n)}function Yl(e,t,n,r){if(n===void 0)return e.textContent="";const i=r||document.createTextNode("");if(t.length){let o=!1;for(let s=t.length-1;s>=0;s--){const a=t[s];if(i!==a){const l=a.parentNode===e;!o&&!s?l?e.replaceChild(i,a):e.insertBefore(i,n):l&&a.remove()}else o=!0}}else e.insertBefore(i,n);return[i]}function zj(){return qe.getNextContextId()}const xy=!1,jj="http://www.w3.org/2000/svg";function F9(e,t=!1,n=void 0){return t?document.createElementNS(jj,e):document.createElement(e,{is:n})}function Os(e){const{useShadow:t}=e,n=document.createTextNode(""),r=()=>e.mount||document.body,i=mo();let o,s=!!qe.context;return re(()=>{s&&(mo().user=s=!1),o||(o=bs(i,()=>F(()=>e.children)));const a=r();if(a instanceof HTMLHeadElement){const[l,c]=de(!1),u=()=>c(!0);jn(d=>j(a,()=>l()?d():o(),null)),fe(u)}else{const l=F9(e.isSVG?"g":"div",e.isSVG),c=t&&l.attachShadow?l.attachShadow({mode:"open"}):l;Object.defineProperty(l,"_$host",{get(){return n.parentNode},configurable:!0}),j(c,o),a.appendChild(l),e.ref&&e.ref(l),fe(()=>a.removeChild(l))}},void 0,{render:!s}),n}function Fj(e,t){const n=F(e);return F(()=>{const r=n();switch(typeof r){case"function":return ot(()=>r(t));case"string":const i=Ej.has(r),o=qe.context?Pj():F9(r,i,ot(()=>t.is));return jr(o,t,i),o}})}function U9(e){const[,t]=se(e,["component"]);return Fj(()=>e.component,t)}const Uj="modulepreload",Hj=function(e){return"/"+e},o6={},z=function(t,n,r){let i=Promise.resolve();if(n&&n.length>0){let l=function(c){return Promise.all(c.map(u=>Promise.resolve(u).then(d=>({status:"fulfilled",value:d}),d=>({status:"rejected",reason:d}))))};document.getElementsByTagName("link");const s=document.querySelector("meta[property=csp-nonce]"),a=s?.nonce||s?.getAttribute("nonce");i=l(n.map(c=>{if(c=Hj(c),c in o6)return;o6[c]=!0;const u=c.endsWith(".css"),d=u?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${c}"]${d}`))return;const h=document.createElement("link");if(h.rel=u?"stylesheet":Uj,u||(h.as="script"),h.crossOrigin="",h.href=c,a&&h.setAttribute("nonce",a),document.head.appendChild(h),u)return new Promise((f,m)=>{h.addEventListener("load",f),h.addEventListener("error",()=>m(new Error(`Unable to preload CSS for ${c}`)))})}))}function o(s){const a=new Event("vite:preloadError",{cancelable:!0});if(a.payload=s,window.dispatchEvent(a),!a.defaultPrevented)throw s}return i.then(s=>{for(const a of s||[])a.status==="rejected"&&o(a.reason);return t().catch(o)})};function hn(e){const t=pt();return{provider:n=>{const r=e.init(n);if(!(e.gate??!0))return b(t.Provider,{value:r,get children(){return n.children}});const o=F(()=>{const s=r.ready;return s===void 0||(typeof s=="function"?s():s)});return b(ce,{get when(){return o()},get children(){return b(t.Provider,{value:r,get children(){return n.children}})}})},use(){const n=ut(t);if(!n)throw new Error(`${e.name} context must be used within a context provider`);return n},useOptional(){return ut(t)}}}const{use:j6e,provider:Bj}=hn({name:"Data",init:e=>({get store(){return e.data},get directory(){return e.directory},navigateToSession:e.onNavigateToSession,sessionHref:e.onSessionHref,bashInteractive:e.bashInteractive})}),H9=hn({name:"FileComponent",init:e=>e.component}),Vj=H9.provider,F6e=H9.use,B9=pt({});function U6e(e){return b(B9.Provider,{get value(){return{open:e.open}},get children(){return e.children}})}function qj(){return ut(B9)}const Wj=e=>e!=null,V9=e=>e.filter(Wj);function Gj(e){return(...t)=>{for(const n of e)n&&n(...t)}}const he=e=>typeof e=="function"&&!e.length?e():e,V0=e=>Array.isArray(e)?e:e?[e]:[];function Kj(e,...t){return typeof e=="function"?e(...t):e}const P2=fe;function Zj(e,t,n){if(qe.context){const[r,i]=de(e,n);return Kt(()=>i(()=>t())),[r,i]}return de(t(),n)}function q9(e,t,n,r){const i=e.length,o=t.length;let s=0;if(!o){for(;s<i;s++)n(e[s]);return}if(!i){for(;s<o;s++)r(t[s]);return}for(;s<o&&t[s]===e[s];s++);let a,l;t=t.slice(s),e=e.slice(s);for(a of t)e.includes(a)||r(a);for(l of e)t.includes(l)||n(l)}function Ln(e,t,n,r){return e.addEventListener(t,n,r),P2(e.removeEventListener.bind(e,t,n,r))}function Yj(e,t,n,r){const i=()=>{V0(he(e)).forEach(o=>{o&&V0(he(t)).forEach(s=>Ln(o,s,n,r))})};typeof e=="function"?re(i):De(i)}const f1=Symbol("fallback");function s6(e){for(const t of e)t.dispose()}function Xj(e,t,n,r={}){const i=new Map;return fe(()=>s6(i.values())),()=>{const s=e()||[];return s[Rd],ot(()=>{if(!s.length)return s6(i.values()),i.clear(),r.fallback?[jn(d=>(i.set(f1,{dispose:d}),r.fallback()))]:[];const a=new Array(s.length),l=i.get(f1);if(!i.size||l){l?.dispose(),i.delete(f1);for(let u=0;u<s.length;u++){const d=s[u],h=t(d,u);o(a,d,u,h)}return a}const c=new Set(i.keys());for(let u=0;u<s.length;u++){const d=s[u],h=t(d,u);c.delete(h);const f=i.get(h);f?(a[u]=f.mapped,f.setIndex?.(u),f.setItem(()=>d)):o(a,d,u,h)}for(const u of c)i.get(u)?.dispose(),i.delete(u);return a})};function o(s,a,l,c){jn(u=>{const[d,h]=de(a),f={setItem:h,dispose:u};if(n.length>1){const[m,p]=de(l);f.setIndex=p,f.mapped=n(d,m)}else f.mapped=n(d);i.set(c,f),s[l]=f.mapped})}}function Jj(e){const{by:t}=e;return F(Xj(()=>e.each,typeof t=="function"?t:n=>n[t],e.children,"fallback"in e?{fallback:()=>e.fallback}:void 0))}function Qj(e,t=mo()){let n=0,r,i;return()=>(n++,fe(()=>{n--,queueMicrotask(()=>{!n&&i&&(i(),i=r=void 0)})}),i||jn(o=>r=e(i=o),t),r)}function eF(e){const t=mo(),n=Qj(e,t);return()=>qe.context?jn(e,t):n()}function R2(e,t=!1){const n=window.matchMedia(e),[r,i]=Zj(t,()=>n.matches);return Ln(n,"change",()=>i(n.matches)),r}function tF(e){return R2("(prefers-color-scheme: dark)",e)}tF.bind(void 0,!1);const nF=/((?:--)?(?:\w+-?)+)\s*:\s*([^;]*)/g;function a6(e){const t={};let n;for(;n=nF.exec(e);)t[n[1]]=n[2];return t}function gr(e,t){if(typeof e=="string"){if(typeof t=="string")return`${e};${t}`;e=a6(e)}else typeof t=="string"&&(t=a6(t));return{...e,...t}}function st(...e){return Gj(e)}function rF(e,t,n=-1){return n in e?[...e.slice(0,n),t,...e.slice(n)]:[...e,t]}function Sy(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function iF(e){return typeof e=="number"}function fc(e){return Object.prototype.toString.call(e)==="[object String]"}function kf(e){return typeof e=="function"}function $r(e){return t=>`${e()}-${t}`}function oF(){const e=new Map,t=(i,o,s,a)=>{const l=a?.once?(...c)=>{e.delete(s),s(...c)}:s;e.set(s,{type:o,eventTarget:i,fn:l,options:a}),i.addEventListener(o,s,a)},n=(i,o,s,a)=>{const l=e.get(s)?.fn||s;i.removeEventListener(o,l,a),e.delete(s)},r=()=>{e.forEach((i,o)=>{n(i.eventTarget,i.type,o,i.options)})};return fe(()=>{r()}),{addGlobalListener:t,removeGlobalListener:n,removeAllGlobalListeners:r}}function Dn(e,t){return e?e===t||e.contains(t):!1}function id(e,t=!1){const{activeElement:n}=Fr(e);if(!n?.nodeName)return null;if(W9(n)&&n.contentDocument)return id(n.contentDocument.body,t);if(t){const r=n.getAttribute("aria-activedescendant");if(r){const i=Fr(n).getElementById(r);if(i)return i}}return n}function N2(e){return Fr(e).defaultView||window}function Fr(e){return e?e.ownerDocument||e:document}function W9(e){return e.tagName==="IFRAME"}var dp=(e=>(e.Escape="Escape",e.Enter="Enter",e.Tab="Tab",e.Space=" ",e.ArrowDown="ArrowDown",e.ArrowLeft="ArrowLeft",e.ArrowRight="ArrowRight",e.ArrowUp="ArrowUp",e.End="End",e.Home="Home",e.PageDown="PageDown",e.PageUp="PageUp",e))(dp||{});function G9(e){return typeof window>"u"||window.navigator==null?!1:window.navigator.userAgentData?.brands.some(t=>e.test(t.brand))||e.test(window.navigator.userAgent)}function z2(e){return typeof window<"u"&&window.navigator!=null?e.test(window.navigator.userAgentData?.platform||window.navigator.platform):!1}function xf(){return z2(/^Mac/i)}function sF(){return z2(/^iPhone/i)}function aF(){return z2(/^iPad/i)||xf()&&navigator.maxTouchPoints>1}function lF(){return sF()||aF()}function cF(){return xf()||lF()}function K9(){return G9(/AppleWebKit/i)&&!uF()}function uF(){return G9(/Chrome/i)}function ze(e,t){return t&&(kf(t)?t(e):t[0](t[1],e)),e?.defaultPrevented}function wt(e){return t=>{for(const n of e)ze(t,n)}}function dF(e){return xf()?e.metaKey&&!e.ctrlKey:e.ctrlKey&&!e.metaKey}function un(e){if(e)if(fF())e.focus({preventScroll:!0});else{const t=hF(e);e.focus(),mF(t)}}var vh=null;function fF(){if(vh==null){vh=!1;try{document.createElement("div").focus({get preventScroll(){return vh=!0,!0}})}catch{}}return vh}function hF(e){let t=e.parentNode;const n=[],r=document.scrollingElement||document.documentElement;for(;t instanceof HTMLElement&&t!==r;)(t.offsetHeight<t.scrollHeight||t.offsetWidth<t.scrollWidth)&&n.push({element:t,scrollTop:t.scrollTop,scrollLeft:t.scrollLeft}),t=t.parentNode;return r instanceof HTMLElement&&n.push({element:r,scrollTop:r.scrollTop,scrollLeft:r.scrollLeft}),n}function mF(e){for(const{element:t,scrollTop:n,scrollLeft:r}of e)t.scrollTop=n,t.scrollLeft=r}var Z9=["input:not([type='hidden']):not([disabled])","select:not([disabled])","textarea:not([disabled])","button:not([disabled])","a[href]","area[href]","[tabindex]","iframe","object","embed","audio[controls]","video[controls]","[contenteditable]:not([contenteditable='false'])"],pF=[...Z9,'[tabindex]:not([tabindex="-1"]):not([disabled])'],j2=`${Z9.join(":not([hidden]),")},[tabindex]:not([disabled]):not([hidden])`,gF=pF.join(':not([hidden]):not([tabindex="-1"]),');function Y9(e,t){const r=Array.from(e.querySelectorAll(j2)).filter(l6);return t&&l6(e)&&r.unshift(e),r.forEach((i,o)=>{if(W9(i)&&i.contentDocument){const s=i.contentDocument.body,a=Y9(s,!1);r.splice(o,1,...a)}}),r}function l6(e){return X9(e)&&!vF(e)}function X9(e){return e.matches(j2)&&F2(e)}function vF(e){return Number.parseInt(e.getAttribute("tabindex")||"0",10)<0}function F2(e,t){return e.nodeName!=="#comment"&&yF(e)&&bF(e,t)&&(!e.parentElement||F2(e.parentElement,e))}function yF(e){if(!(e instanceof HTMLElement)&&!(e instanceof SVGElement))return!1;const{display:t,visibility:n}=e.style;let r=t!=="none"&&n!=="hidden"&&n!=="collapse";if(r){if(!e.ownerDocument.defaultView)return r;const{getComputedStyle:i}=e.ownerDocument.defaultView,{display:o,visibility:s}=i(e);r=o!=="none"&&s!=="hidden"&&s!=="collapse"}return r}function bF(e,t){return!e.hasAttribute("hidden")&&(e.nodeName==="DETAILS"&&t&&t.nodeName!=="SUMMARY"?e.hasAttribute("open"):!0)}function J9(e,t,n){const r=t?.tabbable?gF:j2,i=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode(o){return t?.from?.contains(o)?NodeFilter.FILTER_REJECT:o.matches(r)&&F2(o)&&(!t?.accept||t.accept(o))?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});return t?.from&&(i.currentNode=t.from),i}function c6(e){let t=e;for(;t&&!wF(t);)t=t.parentElement;return t||document.scrollingElement||document.documentElement}function wF(e){const t=window.getComputedStyle(e);return/(auto|scroll)/.test(t.overflow+t.overflowX+t.overflowY)}function kF(){}function Q9(e){return[e.clientX,e.clientY]}function U2(e,t){const[n,r]=e;let i=!1;const o=t.length;for(let s=o,a=0,l=s-1;a<s;l=a++){const[c,u]=t[a],[d,h]=t[l],[,f]=t[l===0?s-1:l-1]||[0,0],m=(u-h)*(n-c)-(c-d)*(r-u);if(h<u){if(r>=h&&r<u){if(m===0)return!0;m>0&&(r===h?r>f&&(i=!i):i=!i)}}else if(u<h){if(r>u&&r<=h){if(m===0)return!0;m<0&&(r===h?r<f&&(i=!i):i=!i)}}else if(r===u&&(n>=d&&n<=c||n>=c&&n<=d))return!0}return i}function Ne(e,t){return ne(e,t)}var Ru=new Map,u6=new Set;function d6(){if(typeof window>"u")return;const e=n=>{if(!n.target)return;let r=Ru.get(n.target);r||(r=new Set,Ru.set(n.target,r),n.target.addEventListener("transitioncancel",t)),r.add(n.propertyName)},t=n=>{if(!n.target)return;const r=Ru.get(n.target);if(r&&(r.delete(n.propertyName),r.size===0&&(n.target.removeEventListener("transitioncancel",t),Ru.delete(n.target)),Ru.size===0)){for(const i of u6)i();u6.clear()}};document.body.addEventListener("transitionrun",e),document.body.addEventListener("transitionend",t)}typeof document<"u"&&(document.readyState!=="loading"?d6():document.addEventListener("DOMContentLoaded",d6));function _y(e,t){const n=f6(e,t,"left"),r=f6(e,t,"top"),i=t.offsetWidth,o=t.offsetHeight;let s=e.scrollLeft,a=e.scrollTop;const l=s+e.offsetWidth,c=a+e.offsetHeight;n<=s?s=n:n+i>l&&(s+=n+i-l),r<=a?a=r:r+o>c&&(a+=r+o-c),e.scrollLeft=s,e.scrollTop=a}function f6(e,t,n){const r=n==="left"?"offsetLeft":"offsetTop";let i=0;for(;t.offsetParent&&(i+=t[r],t.offsetParent!==e);){if(t.offsetParent.contains(e)){i-=e[r];break}t=t.offsetParent}return i}function xF(e,t){if(document.contains(e)){const n=document.scrollingElement||document.documentElement;if(window.getComputedStyle(n).overflow==="hidden"){let i=c6(e);for(;e&&i&&e!==n&&i!==n;)_y(i,e),e=i,i=c6(e)}else{const{left:i,top:o}=e.getBoundingClientRect();e?.scrollIntoView?.({block:"nearest"});const{left:s,top:a}=e.getBoundingClientRect();(Math.abs(i-s)>1||Math.abs(o-a)>1)&&e.scrollIntoView?.({block:"nearest"})}}}var fp={border:"0",clip:"rect(0 0 0 0)","clip-path":"inset(50%)",height:"1px",margin:"0 -1px -1px 0",overflow:"hidden",padding:"0",position:"absolute",width:"1px","white-space":"nowrap"},jd="data-kb-top-layer",e_,Cy=!1,Ts=[];function Fd(e){return Ts.findIndex(t=>t.node===e)}function SF(e){return Ts[Fd(e)]}function _F(e){return Ts[Ts.length-1].node===e}function t_(){return Ts.filter(e=>e.isPointerBlocking)}function CF(){return[...t_()].slice(-1)[0]}function H2(){return t_().length>0}function n_(e){const t=Fd(CF()?.node);return Fd(e)<t}function IF(e){Ts.push(e)}function TF(e){const t=Fd(e);t<0||Ts.splice(t,1)}function EF(){for(const{node:e}of Ts)e.style.pointerEvents=n_(e)?"none":"auto"}function $F(e){if(H2()&&!Cy){const t=Fr(e);e_=document.body.style.pointerEvents,t.body.style.pointerEvents="none",Cy=!0}}function AF(e){if(H2())return;const t=Fr(e);t.body.style.pointerEvents=e_,t.body.style.length===0&&t.body.removeAttribute("style"),Cy=!1}var ai={layers:Ts,isTopMostLayer:_F,hasPointerBlockingLayer:H2,isBelowPointerBlockingLayer:n_,addLayer:IF,removeLayer:TF,indexOf:Fd,find:SF,assignPointerEventToLayers:EF,disableBodyPointerEvents:$F,restoreBodyPointerEvents:AF},h1="focusScope.autoFocusOnMount",m1="focusScope.autoFocusOnUnmount",h6={bubbles:!1,cancelable:!0},m6={stack:[],active(){return this.stack[0]},add(e){e!==this.active()&&this.active()?.pause(),this.stack=Sy(this.stack,e),this.stack.unshift(e)},remove(e){this.stack=Sy(this.stack,e),this.active()?.resume()}};function hp(e,t){const[n,r]=de(!1),i={pause(){r(!0)},resume(){r(!1)}};let o=null;const s=m=>e.onMountAutoFocus?.(m),a=m=>e.onUnmountAutoFocus?.(m),l=()=>Fr(t()),c=()=>{const m=l().createElement("span");return m.setAttribute("data-focus-trap",""),m.tabIndex=0,Object.assign(m.style,fp),m},u=()=>{const m=t();return m?Y9(m,!0).filter(p=>!p.hasAttribute("data-focus-trap")):[]},d=()=>{const m=u();return m.length>0?m[0]:null},h=()=>{const m=u();return m.length>0?m[m.length-1]:null},f=()=>{const m=t();if(!m)return!1;const p=id(m);return!p||Dn(m,p)?!1:X9(p)};re(()=>{const m=t();if(!m)return;m6.add(i);const p=id(m);if(!Dn(m,p)){const v=new CustomEvent(h1,h6);m.addEventListener(h1,s),m.dispatchEvent(v),v.defaultPrevented||setTimeout(()=>{un(d()),id(m)===p&&un(m)},0)}fe(()=>{m.removeEventListener(h1,s),setTimeout(()=>{const v=new CustomEvent(m1,h6);f()&&v.preventDefault(),m.addEventListener(m1,a),m.dispatchEvent(v),v.defaultPrevented||un(p??l().body),m.removeEventListener(m1,a),m6.remove(i)},0)})}),re(()=>{const m=t();if(!m||!he(e.trapFocus)||n())return;const p=v=>{const y=v.target;y?.closest(`[${jd}]`)||(Dn(m,y)?o=y:un(o))},g=v=>{const w=v.relatedTarget??id(m);w?.closest(`[${jd}]`)||Dn(m,w)||un(o)};l().addEventListener("focusin",p),l().addEventListener("focusout",g),fe(()=>{l().removeEventListener("focusin",p),l().removeEventListener("focusout",g)})}),re(()=>{const m=t();if(!m||!he(e.trapFocus)||n())return;const p=c();m.insertAdjacentElement("afterbegin",p);const g=c();m.insertAdjacentElement("beforeend",g);function v(w){const k=d(),x=h();w.relatedTarget===k?un(x):un(k)}p.addEventListener("focusin",v),g.addEventListener("focusin",v);const y=new MutationObserver(w=>{for(const k of w)k.previousSibling===g&&(g.remove(),m.insertAdjacentElement("beforeend",g)),k.nextSibling===p&&(p.remove(),m.insertAdjacentElement("afterbegin",p))});y.observe(m,{childList:!0,subtree:!1}),fe(()=>{p.removeEventListener("focusin",v),g.removeEventListener("focusin",v),p.remove(),g.remove(),y.disconnect()})})}var LF="data-live-announcer";function mp(e){re(()=>{he(e.isDisabled)||fe(DF(he(e.targets),he(e.root)))})}var Nu=new WeakMap,Ci=[];function DF(e,t=document.body){const n=new Set(e),r=new Set,i=l=>{for(const h of l.querySelectorAll(`[${LF}], [${jd}]`))n.add(h);const c=h=>{if(n.has(h)||h.parentElement&&r.has(h.parentElement)&&h.parentElement.getAttribute("role")!=="row")return NodeFilter.FILTER_REJECT;for(const f of n)if(h.contains(f))return NodeFilter.FILTER_SKIP;return NodeFilter.FILTER_ACCEPT},u=document.createTreeWalker(l,NodeFilter.SHOW_ELEMENT,{acceptNode:c}),d=c(l);if(d===NodeFilter.FILTER_ACCEPT&&o(l),d!==NodeFilter.FILTER_REJECT){let h=u.nextNode();for(;h!=null;)o(h),h=u.nextNode()}},o=l=>{const c=Nu.get(l)??0;l.getAttribute("aria-hidden")==="true"&&c===0||(c===0&&l.setAttribute("aria-hidden","true"),r.add(l),Nu.set(l,c+1))};Ci.length&&Ci[Ci.length-1].disconnect(),i(t);const s=new MutationObserver(l=>{for(const c of l)if(!(c.type!=="childList"||c.addedNodes.length===0)&&![...n,...r].some(u=>u.contains(c.target))){for(const u of c.removedNodes)u instanceof Element&&(n.delete(u),r.delete(u));for(const u of c.addedNodes)(u instanceof HTMLElement||u instanceof SVGElement)&&(u.dataset.liveAnnouncer==="true"||u.dataset.reactAriaTopLayer==="true")?n.add(u):u instanceof Element&&i(u)}});s.observe(t,{childList:!0,subtree:!0});const a={observe(){s.observe(t,{childList:!0,subtree:!0})},disconnect(){s.disconnect()}};return Ci.push(a),()=>{s.disconnect();for(const l of r){const c=Nu.get(l);if(c==null)return;c===1?(l.removeAttribute("aria-hidden"),Nu.delete(l)):Nu.set(l,c-1)}a===Ci[Ci.length-1]?(Ci.pop(),Ci.length&&Ci[Ci.length-1].observe()):Ci.splice(Ci.indexOf(a),1)}}var p6="interactOutside.pointerDownOutside",g6="interactOutside.focusOutside";function MF(e,t){let n,r=kF;const i=()=>Fr(t()),o=d=>e.onPointerDownOutside?.(d),s=d=>e.onFocusOutside?.(d),a=d=>e.onInteractOutside?.(d),l=d=>{const h=d.target;return!(h instanceof Element)||h.closest(`[${jd}]`)||!Dn(i(),h)||Dn(t(),h)?!1:!e.shouldExcludeElement?.(h)},c=d=>{function h(){const f=t(),m=d.target;if(!f||!m||!l(d))return;const p=wt([o,a]);m.addEventListener(p6,p,{once:!0});const g=new CustomEvent(p6,{bubbles:!1,cancelable:!0,detail:{originalEvent:d,isContextMenu:d.button===2||dF(d)&&d.button===0}});m.dispatchEvent(g)}d.pointerType==="touch"?(i().removeEventListener("click",h),r=h,i().addEventListener("click",h,{once:!0})):h()},u=d=>{const h=t(),f=d.target;if(!h||!f||!l(d))return;const m=wt([s,a]);f.addEventListener(g6,m,{once:!0});const p=new CustomEvent(g6,{bubbles:!1,cancelable:!0,detail:{originalEvent:d,isContextMenu:!1}});f.dispatchEvent(p)};re(()=>{he(e.isDisabled)||(n=window.setTimeout(()=>{i().addEventListener("pointerdown",c,!0)},0),i().addEventListener("focusin",u,!0),fe(()=>{window.clearTimeout(n),i().removeEventListener("click",r),i().removeEventListener("pointerdown",c,!0),i().removeEventListener("focusin",u,!0)}))})}function OF(e){const t=n=>{n.key===dp.Escape&&e.onEscapeKeyDown?.(n)};re(()=>{if(he(e.isDisabled))return;const n=e.ownerDocument?.()??Fr();n.addEventListener("keydown",t),fe(()=>{n.removeEventListener("keydown",t)})})}function Ve(e){const[t,n]=se(e,["as"]);if(!t.as)throw new Error("[kobalte]: Polymorphic is missing the required `as` prop.");return b(U9,ne(n,{get component(){return t.as}}))}var r_=pt();function PF(){return ut(r_)}function eu(e){let t;const n=PF(),[r,i]=se(e,["ref","disableOutsidePointerEvents","excludedElements","onEscapeKeyDown","onPointerDownOutside","onFocusOutside","onInteractOutside","onDismiss","bypassTopMostLayerCheck"]),o=new Set([]),s=d=>{o.add(d);const h=n?.registerNestedLayer(d);return()=>{o.delete(d),h?.()}};MF({shouldExcludeElement:d=>t?r.excludedElements?.some(h=>Dn(h(),d))||[...o].some(h=>Dn(h,d)):!1,onPointerDownOutside:d=>{!t||ai.isBelowPointerBlockingLayer(t)||!r.bypassTopMostLayerCheck&&!ai.isTopMostLayer(t)||(r.onPointerDownOutside?.(d),r.onInteractOutside?.(d),d.defaultPrevented||r.onDismiss?.())},onFocusOutside:d=>{r.onFocusOutside?.(d),r.onInteractOutside?.(d),d.defaultPrevented||r.onDismiss?.()}},()=>t),OF({ownerDocument:()=>Fr(t),onEscapeKeyDown:d=>{!t||!ai.isTopMostLayer(t)||(r.onEscapeKeyDown?.(d),!d.defaultPrevented&&r.onDismiss&&(d.preventDefault(),r.onDismiss()))}}),Kt(()=>{if(!t)return;ai.addLayer({node:t,isPointerBlocking:r.disableOutsidePointerEvents,dismiss:r.onDismiss});const d=n?.registerNestedLayer(t);ai.assignPointerEventToLayers(),ai.disableBodyPointerEvents(t),fe(()=>{t&&(ai.removeLayer(t),d?.(),ai.assignPointerEventToLayers(),ai.restoreBodyPointerEvents(t))})}),re(gt([()=>t,()=>r.disableOutsidePointerEvents],([d,h])=>{if(!d)return;const f=ai.find(d);f&&f.isPointerBlocking!==h&&(f.isPointerBlocking=h,ai.assignPointerEventToLayers()),h&&ai.disableBodyPointerEvents(d),fe(()=>{ai.restoreBodyPointerEvents(d)})},{defer:!0}));const u={registerNestedLayer:s};return b(r_.Provider,{value:u,get children(){return b(Ve,ne({as:"div",ref(d){var h=st(f=>t=f,r.ref);typeof h=="function"&&h(d)}},i))}})}function El(e){const[t,n]=de(e.defaultValue?.()),r=F(()=>e.value?.()!==void 0),i=F(()=>r()?e.value?.():t());return[i,s=>{ot(()=>{const a=Kj(s,i());return Object.is(a,i())||(r()||n(a),e.onChange?.(a)),a})}]}function i_(e){const[t,n]=El(e);return[()=>t()??!1,n]}function RF(e){const[t,n]=El(e);return[()=>t()??[],n]}function Ps(e={}){const[t,n]=i_({value:()=>he(e.open),defaultValue:()=>!!he(e.defaultOpen),onChange:s=>e.onOpenChange?.(s)}),r=()=>{n(!0)},i=()=>{n(!1)};return{isOpen:t,setIsOpen:n,open:r,close:i,toggle:()=>{t()?i():r()}}}function Sf(e,t){const[n,r]=de(v6(t?.()));return re(()=>{r(e()?.tagName.toLowerCase()||v6(t?.()))}),n}function v6(e){return fc(e)?e:void 0}var NF=Object.defineProperty,vr=(e,t)=>{for(var n in t)NF(e,n,{get:t[n],enumerable:!0})},zF={};vr(zF,{Button:()=>B2,Root:()=>Jo});var jF=["button","color","file","image","reset","submit"];function FF(e){const t=e.tagName.toLowerCase();return t==="button"?!0:t==="input"&&e.type?jF.indexOf(e.type)!==-1:!1}function Jo(e){let t;const n=Ne({type:"button"},e),[r,i]=se(n,["ref","type","disabled"]),o=Sf(()=>t,()=>"button"),s=F(()=>{const c=o();return c==null?!1:FF({tagName:c,type:r.type})}),a=F(()=>o()==="input"),l=F(()=>o()==="a"&&t?.getAttribute("href")!=null);return b(Ve,ne({as:"button",ref(c){var u=st(d=>t=d,r.ref);typeof u=="function"&&u(c)},get type(){return je(()=>!!(s()||a()))()?r.type:void 0},get role(){return!s()&&!l()?"button":void 0},get tabIndex(){return!s()&&!l()&&!r.disabled?0:void 0},get disabled(){return je(()=>!!(s()||a()))()?r.disabled:void 0},get"aria-disabled"(){return!s()&&!a()&&r.disabled?!0:void 0},get"data-disabled"(){return r.disabled?"":void 0}},i))}var B2=Jo;function en(e){return t=>(e(t),()=>e(void 0))}var xr=e=>typeof e=="function"?e():e,Iy=(e,t)=>{if(e.contains(t))return!0;let n=t;for(;n;){if(n===e)return!0;n=n._$host??n.parentElement}return!1},yh=new Map,UF=e=>{re(()=>{const t=xr(e.style)??{},n=xr(e.properties)??[],r={};for(const o in t)r[o]=e.element.style[o];const i=yh.get(e.key);i?i.activeCount++:yh.set(e.key,{activeCount:1,originalStyles:r,properties:n.map(o=>o.key)}),Object.assign(e.element.style,e.style);for(const o of n)e.element.style.setProperty(o.key,o.value);fe(()=>{const o=yh.get(e.key);if(o){if(o.activeCount!==1){o.activeCount--;return}yh.delete(e.key);for(const[s,a]of Object.entries(o.originalStyles))e.element.style[s]=a;for(const s of o.properties)e.element.style.removeProperty(s);e.element.style.length===0&&e.element.removeAttribute("style"),e.cleanup?.()}})})},y6=UF,HF=(e,t)=>{switch(t){case"x":return[e.clientWidth,e.scrollLeft,e.scrollWidth];case"y":return[e.clientHeight,e.scrollTop,e.scrollHeight]}},BF=(e,t)=>{const n=getComputedStyle(e),r=t==="x"?n.overflowX:n.overflowY;return r==="auto"||r==="scroll"||e.tagName==="HTML"&&r==="visible"},VF=(e,t,n)=>{const r=t==="x"&&window.getComputedStyle(e).direction==="rtl"?-1:1;let i=e,o=0,s=0,a=!1;do{const[l,c,u]=HF(i,t),d=u-l-r*c;(c!==0||d!==0)&&BF(i,t)&&(o+=d,s+=c),i===(n??document.documentElement)?a=!0:i=i._$host??i.parentElement}while(i&&!a);return[o,s]},[b6,w6]=de([]),qF=e=>b6().indexOf(e)===b6().length-1,WF=e=>{const t=ne({element:null,enabled:!0,hideScrollbar:!0,preventScrollbarShift:!0,preventScrollbarShiftMode:"padding",restoreScrollPosition:!0,allowPinchZoom:!1},e),n=an();let r=[0,0],i=null,o=null;re(()=>{xr(t.enabled)&&(w6(c=>[...c,n]),fe(()=>{w6(c=>c.filter(u=>u!==n))}))}),re(()=>{if(!xr(t.enabled)||!xr(t.hideScrollbar))return;const{body:c}=document,u=window.innerWidth-c.offsetWidth;if(xr(t.preventScrollbarShift)){const d={overflow:"hidden"},h=[];u>0&&(xr(t.preventScrollbarShiftMode)==="padding"?d.paddingRight=`calc(${window.getComputedStyle(c).paddingRight} + ${u}px)`:d.marginRight=`calc(${window.getComputedStyle(c).marginRight} + ${u}px)`,h.push({key:"--scrollbar-width",value:`${u}px`}));const f=window.scrollY,m=window.scrollX;y6({key:"prevent-scroll",element:c,style:d,properties:h,cleanup:()=>{xr(t.restoreScrollPosition)&&u>0&&window.scrollTo(m,f)}})}else y6({key:"prevent-scroll",element:c,style:{overflow:"hidden"}})}),re(()=>{!qF(n)||!xr(t.enabled)||(document.addEventListener("wheel",a,{passive:!1}),document.addEventListener("touchstart",s,{passive:!1}),document.addEventListener("touchmove",l,{passive:!1}),fe(()=>{document.removeEventListener("wheel",a),document.removeEventListener("touchstart",s),document.removeEventListener("touchmove",l)}))});const s=c=>{r=k6(c),i=null,o=null},a=c=>{const u=c.target,d=xr(t.element),h=GF(c),f=Math.abs(h[0])>Math.abs(h[1])?"x":"y",m=f==="x"?h[0]:h[1],p=x6(u,f,m,d);let g;d&&Iy(d,u)?g=!p:g=!0,g&&c.cancelable&&c.preventDefault()},l=c=>{const u=xr(t.element),d=c.target;let h;if(c.touches.length===2)h=!xr(t.allowPinchZoom);else{if(i==null||o===null){const f=k6(c).map((p,g)=>r[g]-p),m=Math.abs(f[0])>Math.abs(f[1])?"x":"y";i=m,o=m==="x"?f[0]:f[1]}if(d.type==="range")h=!1;else{const f=x6(d,i,o,u);u&&Iy(u,d)?h=!f:h=!0}}h&&c.cancelable&&c.preventDefault()}},GF=e=>[e.deltaX,e.deltaY],k6=e=>e.changedTouches[0]?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0],x6=(e,t,n,r)=>{const i=r!==null&&Iy(r,e),[o,s]=VF(e,t,i?r:void 0);return!(n>0&&Math.abs(o)<=1||n<0&&Math.abs(s)<1)},KF=WF,pp=KF,ZF=e=>{const t=F(()=>{const s=xr(e.element);if(s)return getComputedStyle(s)}),n=()=>t()?.animationName??"none",[r,i]=de(xr(e.show)?"present":"hidden");let o="none";return re(s=>{const a=xr(e.show);return ot(()=>{if(s===a)return a;const l=o,c=n();a?i("present"):c==="none"||t()?.display==="none"?i("hidden"):i(s===!0&&l!==c?"hiding":"hidden")}),a}),re(()=>{const s=xr(e.element);if(!s)return;const a=c=>{c.target===s&&(o=n())},l=c=>{const d=n().includes(c.animationName);c.target===s&&d&&r()==="hiding"&&i("hidden")};s.addEventListener("animationstart",a),s.addEventListener("animationcancel",l),s.addEventListener("animationend",l),fe(()=>{s.removeEventListener("animationstart",a),s.removeEventListener("animationcancel",l),s.removeEventListener("animationend",l)})}),{present:()=>r()==="present"||r()==="hiding",state:r,setState:i}},YF=ZF,po=YF,XF={};vr(XF,{CloseButton:()=>s_,Content:()=>a_,Description:()=>l_,Dialog:()=>oa,Overlay:()=>c_,Portal:()=>u_,Root:()=>d_,Title:()=>f_,Trigger:()=>h_,useDialogContext:()=>Sa});var o_=pt();function Sa(){const e=ut(o_);if(e===void 0)throw new Error("[kobalte]: `useDialogContext` must be used within a `Dialog` component");return e}function s_(e){const t=Sa(),[n,r]=se(e,["aria-label","onClick"]);return b(Jo,ne({get"aria-label"(){return n["aria-label"]||t.translations().dismiss},onClick:o=>{ze(o,n.onClick),t.close()}},r))}function a_(e){let t;const n=Sa(),r=Ne({id:n.generateId("content")},e),[i,o]=se(r,["ref","onOpenAutoFocus","onCloseAutoFocus","onPointerDownOutside","onFocusOutside","onInteractOutside"]);let s=!1,a=!1;const l=h=>{i.onPointerDownOutside?.(h),n.modal()&&h.detail.isContextMenu&&h.preventDefault()},c=h=>{i.onFocusOutside?.(h),n.modal()&&h.preventDefault()},u=h=>{i.onInteractOutside?.(h),!n.modal()&&(h.defaultPrevented||(s=!0,h.detail.originalEvent.type==="pointerdown"&&(a=!0)),Dn(n.triggerRef(),h.target)&&h.preventDefault(),h.detail.originalEvent.type==="focusin"&&a&&h.preventDefault())},d=h=>{i.onCloseAutoFocus?.(h),n.modal()?(h.preventDefault(),un(n.triggerRef())):(h.defaultPrevented||(s||un(n.triggerRef()),h.preventDefault()),s=!1,a=!1)};return mp({isDisabled:()=>!(n.isOpen()&&n.modal()),targets:()=>t?[t]:[]}),pp({element:()=>t??null,enabled:()=>n.contentPresent()&&n.preventScroll()}),hp({trapFocus:()=>n.isOpen()&&n.modal(),onMountAutoFocus:i.onOpenAutoFocus,onUnmountAutoFocus:d},()=>t),re(()=>fe(n.registerContentId(o.id))),b(ce,{get when(){return n.contentPresent()},get children(){return b(eu,ne({ref(h){var f=st(m=>{n.setContentRef(m),t=m},i.ref);typeof f=="function"&&f(h)},role:"dialog",tabIndex:-1,get disableOutsidePointerEvents(){return je(()=>!!n.modal())()&&n.isOpen()},get excludedElements(){return[n.triggerRef]},get"aria-labelledby"(){return n.titleId()},get"aria-describedby"(){return n.descriptionId()},get"data-expanded"(){return n.isOpen()?"":void 0},get"data-closed"(){return n.isOpen()?void 0:""},onPointerDownOutside:l,onFocusOutside:c,onInteractOutside:u,get onDismiss(){return n.close}},o))}})}function l_(e){const t=Sa(),n=Ne({id:t.generateId("description")},e),[r,i]=se(n,["id"]);return re(()=>fe(t.registerDescriptionId(r.id))),b(Ve,ne({as:"p",get id(){return r.id}},i))}function c_(e){const t=Sa(),[n,r]=se(e,["ref","style","onPointerDown"]),i=o=>{ze(o,n.onPointerDown),o.target===o.currentTarget&&o.preventDefault()};return b(ce,{get when(){return t.overlayPresent()},get children(){return b(Ve,ne({as:"div",ref(o){var s=st(t.setOverlayRef,n.ref);typeof s=="function"&&s(o)},get style(){return gr({"pointer-events":"auto"},n.style)},get"data-expanded"(){return t.isOpen()?"":void 0},get"data-closed"(){return t.isOpen()?void 0:""},onPointerDown:i},r))}})}function u_(e){const t=Sa();return b(ce,{get when(){return t.contentPresent()||t.overlayPresent()},get children(){return b(Os,e)}})}var S6={dismiss:"Dismiss"};function d_(e){const t=`dialog-${an()}`,n=Ne({id:t,modal:!0,translations:S6},e),[r,i]=de(),[o,s]=de(),[a,l]=de(),[c,u]=de(),[d,h]=de(),[f,m]=de(),p=Ps({open:()=>n.open,defaultOpen:()=>n.defaultOpen,onOpenChange:k=>n.onOpenChange?.(k)}),g=()=>n.forceMount||p.isOpen(),{present:v}=po({show:g,element:()=>c()??null}),{present:y}=po({show:g,element:()=>d()??null}),w={translations:()=>n.translations??S6,isOpen:p.isOpen,modal:()=>n.modal??!0,preventScroll:()=>n.preventScroll??w.modal(),contentId:r,titleId:o,descriptionId:a,triggerRef:f,overlayRef:c,setOverlayRef:u,contentRef:d,setContentRef:h,overlayPresent:v,contentPresent:y,close:p.close,toggle:p.toggle,setTriggerRef:m,generateId:$r(()=>n.id),registerContentId:en(i),registerTitleId:en(s),registerDescriptionId:en(l)};return b(o_.Provider,{value:w,get children(){return n.children}})}function f_(e){const t=Sa(),n=Ne({id:t.generateId("title")},e),[r,i]=se(n,["id"]);return re(()=>fe(t.registerTitleId(r.id))),b(Ve,ne({as:"h2",get id(){return r.id}},i))}function h_(e){const t=Sa(),[n,r]=se(e,["ref","onClick"]);return b(Jo,ne({ref(o){var s=st(t.setTriggerRef,n.ref);typeof s=="function"&&s(o)},"aria-haspopup":"dialog",get"aria-expanded"(){return t.isOpen()},get"aria-controls"(){return je(()=>!!t.isOpen())()?t.contentId():void 0},get"data-expanded"(){return t.isOpen()?"":void 0},get"data-closed"(){return t.isOpen()?void 0:""},onClick:o=>{ze(o,n.onClick),t.toggle()}},r))}var oa=Object.assign(d_,{CloseButton:s_,Content:a_,Description:l_,Overlay:c_,Portal:u_,Title:f_,Trigger:h_}),JF=ee("<div data-component=dialog-stack>");const m_=pt();function QF(){const[e,t]=de(),n={current:void 0},r={value:!1};fe(()=>{n.current!==void 0&&(clearTimeout(n.current),n.current=void 0)});const i=()=>{const s=e();if(!s||r.value)return;r.value=!0,s.onClose?.(),s.setClosing(!0);const a=s.id;n.current!==void 0&&(clearTimeout(n.current),n.current=void 0),n.current=setTimeout(()=>{n.current=void 0,s.dispose(),e()?.id===a&&t(void 0),r.value=!1},100)};return re(()=>{if(!e())return;Ln(window,"keydown",a=>{a.key==="Escape"&&(i(),a.preventDefault(),a.stopPropagation())},{capture:!0})}),{get active(){return e()},close:i,show:(s,a,l)=>{const c=e();c&&(c.dispose(),t(void 0)),n.current!==void 0&&(clearTimeout(n.current),n.current=void 0),r.value=!1;const u=Math.random().toString(36).slice(2);let d,h;const f=bs(a,()=>jn(m=>{d=m;const[p,g]=de(!1);return h=g,b(oa,{modal:!0,get open(){return!p()},onOpenChange:v=>{v||i()},get children(){return b(oa.Portal,{get children(){return[b(oa.Overlay,{"data-component":"dialog-overlay",onClick:i}),je(()=>s())]}})}})}));!d||!h||t({id:u,node:f,dispose:d,owner:a,onClose:l,setClosing:h})}}}function eU(e){const t=QF();return b(m_.Provider,{value:t,get children(){return[je(()=>e.children),(()=>{var n=JF();return j(n,()=>t.active?.node),n})()]}})}function ko(){const e=ut(m_),t=mo();if(!t)throw new Error("useDialog must be used within a DialogProvider");if(!e)throw new Error("useDialog must be used within a DialogProvider");return{get active(){return e.active},show(n,r){const i=e.active?.owner??t;e.show(n,i,r)},close(){e.close()}}}const p_={"ui.sessionReview.title":"Session changes","ui.sessionReview.title.git":"Git changes","ui.sessionReview.title.branch":"Branch changes","ui.sessionReview.title.lastTurn":"Last turn changes","ui.sessionReview.diffStyle.unified":"Unified","ui.sessionReview.diffStyle.split":"Split","ui.sessionReview.expandAll":"Expand all","ui.sessionReview.collapseAll":"Collapse all","ui.sessionReview.change.added":"Added","ui.sessionReview.change.removed":"Removed","ui.sessionReview.change.modified":"Modified","ui.sessionReview.image.loading":"Loading...","ui.sessionReview.image.placeholder":"Image","ui.sessionReview.largeDiff.title":"Diff too large to render","ui.sessionReview.largeDiff.meta":"Limit: {{limit}} changed lines. Current: {{current}} changed lines.","ui.sessionReview.largeDiff.renderAnyway":"Render anyway","ui.sessionReview.openFile":"Open file","ui.sessionReview.selection.line":"line {{line}}","ui.sessionReview.selection.lines":"lines {{start}}-{{end}}","ui.fileMedia.kind.image":"image","ui.fileMedia.kind.audio":"audio","ui.fileMedia.kind.video":"video","ui.fileMedia.kind.svg":"svg","ui.fileMedia.kind.pdf":"PDF","ui.fileMedia.kind.table":"table","ui.fileMedia.kind.html":"HTML","ui.fileMedia.kind.markdown":"markdown","ui.fileMedia.kind.json":"JSON","ui.fileMedia.state.removed":"Removed {{kind}} file.","ui.fileMedia.state.loading":"Loading {{kind}}...","ui.fileMedia.state.error":"Unable to load {{kind}}.","ui.fileMedia.state.unavailable":"{{kind}} preview unavailable.","ui.fileMedia.binary.title":"Binary file","ui.fileMedia.binary.description.path":"{{path}} is binary.","ui.fileMedia.binary.description.default":"Binary content","ui.fileMedia.toggle.preview":"Preview","ui.fileMedia.toggle.source":"Source","ui.fileMedia.table.summary":"{{rows}} rows × {{cols}} columns","ui.fileMedia.table.empty":"Table has no rows.","ui.fileMedia.table.truncated":"Table truncated for preview.","ui.fileMedia.html.label":"HTML preview","ui.fileMedia.json.label":"JSON","ui.fileMedia.json.invalid":"Invalid JSON: {{message}}","ui.lineComment.label.prefix":"Comment on ","ui.lineComment.label.suffix":"","ui.lineComment.editorLabel.prefix":"Commenting on ","ui.lineComment.editorLabel.suffix":"","ui.lineComment.placeholder":"Add comment","ui.lineComment.submit":"Comment","ui.sessionTurn.steps.show":"Show steps","ui.sessionTurn.steps.hide":"Hide steps","ui.sessionTurn.summary.response":"Response","ui.sessionTurn.diff.showMore":"Show more changes ({{count}})","ui.sessionTurn.diffs.changed":"Changed","ui.sessionTurn.diffs.showAll":"Show all","ui.sessionTurn.diffs.showLess":"Show less","ui.sessionTurn.diffs.more":"+{{count}} more files","ui.sessionTurn.retry.retrying":"retrying","ui.sessionTurn.retry.inSeconds":"in {{seconds}}s","ui.sessionTurn.retry.attempt":"attempt #{{attempt}}","ui.sessionTurn.retry.attemptLine":"{{line}} - attempt #{{attempt}}","ui.sessionTurn.retry.geminiHot":"gemini is way too hot right now","ui.sessionTurn.error.freeUsageExceeded":"Free usage exceeded","ui.sessionTurn.error.addCredits":"Add credits","ui.sessionTurn.status.delegating":"Delegating work","ui.sessionTurn.status.planning":"Planning next steps","ui.sessionTurn.status.gatheringContext":"Exploring","ui.sessionTurn.status.gatheredContext":"Explored","ui.sessionTurn.status.searchingCodebase":"Searching the codebase","ui.sessionTurn.status.searchingWeb":"Searching the web","ui.sessionTurn.status.makingEdits":"Making edits","ui.sessionTurn.status.runningCommands":"Running commands","ui.sessionTurn.status.thinking":"Thinking","ui.sessionTurn.status.thinkingWithTopic":"Thinking - {{topic}}","ui.sessionTurn.status.gatheringThoughts":"Gathering thoughts","ui.sessionTurn.status.consideringNextSteps":"Considering next steps","ui.messagePart.diagnostic.error":"Error","ui.messagePart.title.edit":"Edit","ui.messagePart.title.write":"Write","ui.messagePart.option.typeOwnAnswer":"Type your own answer","ui.messagePart.review.title":"Review your answers","ui.messagePart.questions.dismissed":"Questions dismissed","ui.messagePart.compaction":"Session compacted","ui.messagePart.context.read.one":"{{count}} read","ui.messagePart.context.read.other":"{{count}} reads","ui.messagePart.context.search.one":"{{count}} search","ui.messagePart.context.search.other":"{{count}} searches","ui.messagePart.context.list.one":"{{count}} list","ui.messagePart.context.list.other":"{{count}} lists","ui.list.loading":"Loading","ui.list.empty":"No results","ui.list.clearFilter":"Clear filter","ui.list.emptyWithFilter.prefix":"No results for","ui.list.emptyWithFilter.suffix":"","ui.fileSearch.placeholder":"Find","ui.fileSearch.previousMatch":"Previous match","ui.fileSearch.nextMatch":"Next match","ui.fileSearch.close":"Close search","ui.messageNav.newMessage":"New message","ui.textField.copyToClipboard":"Copy to clipboard","ui.textField.copyLink":"Copy link","ui.textField.copied":"Copied","ui.imagePreview.alt":"Image preview","ui.scrollView.ariaLabel":"scrollable content","ui.tool.read":"Read","ui.tool.loaded":"Loaded","ui.tool.list":"List","ui.tool.glob":"Glob","ui.tool.grep":"Grep","ui.tool.task":"Task","ui.tool.webfetch":"Webfetch","ui.tool.websearch":"Web Search","ui.tool.codesearch":"Code Search","ui.tool.shell":"Shell","ui.tool.bashInteractive":"Interactive shell","ui.tool.bashInteractive.kill":"Stop","ui.tool.ssh":"SSH","ui.tool.git":"Git","ui.tool.patch":"Patch","ui.tool.todos":"To-dos","ui.tool.todos.read":"Read to-dos","ui.tool.questions":"Questions","ui.tool.agent":"{{type}} Agent","ui.tool.agent.default":"Agent","ui.tool.skill":"Skill","ui.basicTool.called":"Called `{{tool}}`","ui.toolErrorCard.failed":"Failed","ui.toolErrorCard.copyError":"Copy error","ui.common.file.one":"file","ui.common.file.other":"files","ui.common.question.one":"question","ui.common.question.other":"questions","ui.common.step.one":"step","ui.common.step.other":"steps","ui.common.add":"Add","ui.common.back":"Back","ui.common.cancel":"Cancel","ui.common.confirm":"Confirm","ui.common.dismiss":"Dismiss","ui.common.close":"Close","ui.common.next":"Next","ui.common.submit":"Submit","ui.permission.deny":"Deny","ui.permission.allowAlways":"Allow always","ui.permission.allowOnce":"Allow once","ui.message.expand":"Expand message","ui.message.collapse":"Collapse message","ui.message.copy":"Copy","ui.message.copyCode":"Copy code","ui.message.copyPath":"Copy path","ui.message.copyMessage":"Copy message","ui.message.forkMessage":"Fork to new session","ui.message.revertMessage":"Revert message","ui.message.copyResponse":"Copy response","ui.message.copied":"Copied","ui.message.copiedCode":"Copied code","ui.message.copiedPath":"Copied path","ui.message.copiedLink":"Copied link","ui.message.copiedText":"Copied text","ui.message.copiedMessage":"Copied message","ui.message.copiedResponse":"Copied response","ui.message.reasoning":"Reasoning","ui.message.reasoningMode":"Reasoning display","ui.message.reasoningMode.short":"Short","ui.message.reasoningMode.full":"Full","ui.message.reasoningMode.off":"Off","ui.message.duration.seconds":"{{count}}s","ui.message.duration.minutesSeconds":"{{minutes}}m {{seconds}}s","ui.message.tps":"{{count}} tps","ui.message.interrupted":"Interrupted","ui.message.queued":"Queued","ui.message.attachment.alt":"attachment","ui.patch.action.deleted":"Deleted","ui.patch.action.created":"Created","ui.patch.action.moved":"Moved","ui.patch.action.patched":"Patched","ui.question.subtitle.answered":"{{count}} answered","ui.question.answer.none":"(no answer)","ui.question.review.notAnswered":"(not answered)","ui.question.multiHint":"Select all answers that apply","ui.question.singleHint":"Select one answer","ui.question.custom.placeholder":"Type your answer..."};function tU(e,t){return t?e.replace(/{{\s*([^}]+?)\s*}}/g,(n,r)=>{const i=String(r),o=t[i];return o===void 0?"":String(o)}):e}const nU={locale:()=>"en",t:(e,t)=>{const n=p_[e]??String(e);return tU(n,t)}},g_=pt(nU);function rU(e){return b(g_.Provider,{get value(){return e.value},get children(){return e.children}})}function Qo(){return ut(g_)}function V2(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var $l=V2();function v_(e){$l=e}var Sd={exec:()=>null};function Nt(e,t=""){let n=typeof e=="string"?e:e.source,r={replace:(i,o)=>{let s=typeof o=="string"?o:o.source;return s=s.replace(Pr.caret,"$1"),n=n.replace(i,s),r},getRegex:()=>new RegExp(n,t)};return r}var iU=(()=>{try{return!!new RegExp("(?<=1)(?<!1)")}catch{return!1}})(),Pr={codeRemoveIndent:/^(?: {1,4}| {0,3}\t)/gm,outputLinkReplace:/\\([\[\]])/g,indentCodeCompensation:/^(\s+)(?:```)/,beginningSpace:/^\s+/,endingHash:/#$/,startingSpaceChar:/^ /,endingSpaceChar:/ $/,nonSpaceChar:/[^ ]/,newLineCharGlobal:/\n/g,tabCharGlobal:/\t/g,multipleSpaceGlobal:/\s+/g,blankLine:/^[ \t]*$/,doubleBlankLine:/\n[ \t]*\n[ \t]*$/,blockquoteStart:/^ {0,3}>/,blockquoteSetextReplace:/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,blockquoteSetextReplace2:/^ {0,3}>[ \t]?/gm,listReplaceTabs:/^\t+/,listReplaceNesting:/^ {1,4}(?=( {4})*[^ ])/g,listIsTask:/^\[[ xX]\] +\S/,listReplaceTask:/^\[[ xX]\] +/,listTaskCheckbox:/\[[ xX]\]/,anyLine:/\n.*\n/,hrefBrackets:/^<(.*)>$/,tableDelimiter:/[:|]/,tableAlignChars:/^\||\| *$/g,tableRowBlankLine:/\n[ \t]*$/,tableAlignRight:/^ *-+: *$/,tableAlignCenter:/^ *:-+: *$/,tableAlignLeft:/^ *:-+ *$/,startATag:/^<a /i,endATag:/^<\/a>/i,startPreScriptTag:/^<(pre|code|kbd|script)(\s|>)/i,endPreScriptTag:/^<\/(pre|code|kbd|script)(\s|>)/i,startAngleBracket:/^</,endAngleBracket:/>$/,pedanticHrefTitle:/^([^'"]*[^\s])\s+(['"])(.*)\2/,unicodeAlphaNumeric:/[\p{L}\p{N}]/u,escapeTest:/[&<>"']/,escapeReplace:/[&<>"']/g,escapeTestNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,escapeReplaceNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,unescapeTest:/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig,caret:/(^|[^\[])\^/g,percentDecode:/%25/g,findPipe:/\|/g,splitPipe:/ \|/,slashPipe:/\\\|/g,carriageReturn:/\r\n|\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\S*/,endingNewline:/\n$/,listItemRegex:e=>new RegExp(`^( {0,3}${e})((?:[ ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`),hrRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),fencesBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}(?:\`\`\`|~~~)`),headingBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}#`),htmlBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}<(?:[a-z].*>|!--)`,"i")},oU=/^(?:[ \t]*(?:\n|$))+/,sU=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,aU=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,_f=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,lU=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,q2=/(?:[*+-]|\d{1,9}[.)])/,y_=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,b_=Nt(y_).replace(/bull/g,q2).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/\|table/g,"").getRegex(),cU=Nt(y_).replace(/bull/g,q2).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/table/g,/ {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(),W2=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,uU=/^[^\n]+/,G2=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/,dU=Nt(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",G2).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),fU=Nt(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,q2).getRegex(),gp="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",K2=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,hU=Nt("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$))","i").replace("comment",K2).replace("tag",gp).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),w_=Nt(W2).replace("hr",_f).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",gp).getRegex(),mU=Nt(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",w_).getRegex(),Z2={blockquote:mU,code:sU,def:dU,fences:aU,heading:lU,hr:_f,html:hU,lheading:b_,list:fU,newline:oU,paragraph:w_,table:Sd,text:uU},_6=Nt("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",_f).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code","(?: {4}| {0,3} )[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",gp).getRegex(),pU={...Z2,lheading:cU,table:_6,paragraph:Nt(W2).replace("hr",_f).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",_6).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",gp).getRegex()},gU={...Z2,html:Nt(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",K2).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:Sd,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:Nt(W2).replace("hr",_f).replace("heading",` *#{1,6} *[^
3
3
  ]`).replace("lheading",b_).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},vU=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,yU=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,k_=/^( {2,}|\\)\n(?!\s*$)/,bU=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,vp=/[\p{P}\p{S}]/u,Y2=/[\s\p{P}\p{S}]/u,x_=/[^\s\p{P}\p{S}]/u,wU=Nt(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,Y2).getRegex(),S_=/(?!~)[\p{P}\p{S}]/u,kU=/(?!~)[\s\p{P}\p{S}]/u,xU=/(?:[^\s\p{P}\p{S}]|~)/u,SU=Nt(/link|precode-code|html/,"g").replace("link",/\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace("precode-",iU?"(?<!`)()":"(^^|[^`])").replace("code",/(?<b>`+)[^`]+\k<b>(?!`)/).replace("html",/<(?! )[^<>]*?>/).getRegex(),__=/^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/,_U=Nt(__,"u").replace(/punct/g,vp).getRegex(),CU=Nt(__,"u").replace(/punct/g,S_).getRegex(),C_="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",IU=Nt(C_,"gu").replace(/notPunctSpace/g,x_).replace(/punctSpace/g,Y2).replace(/punct/g,vp).getRegex(),TU=Nt(C_,"gu").replace(/notPunctSpace/g,xU).replace(/punctSpace/g,kU).replace(/punct/g,S_).getRegex(),EU=Nt("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,x_).replace(/punctSpace/g,Y2).replace(/punct/g,vp).getRegex(),$U=Nt(/\\(punct)/,"gu").replace(/punct/g,vp).getRegex(),AU=Nt(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme",/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email",/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(),LU=Nt(K2).replace("(?:-->|$)","-->").getRegex(),DU=Nt("^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>").replace("comment",LU).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),q0=/(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+[^`]*?`+(?!`)|[^\[\]\\`])*?/,MU=Nt(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]*(?:\n[ \t]*)?)(title))?\s*\)/).replace("label",q0).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),I_=Nt(/^!?\[(label)\]\[(ref)\]/).replace("label",q0).replace("ref",G2).getRegex(),T_=Nt(/^!?\[(ref)\](?:\[\])?/).replace("ref",G2).getRegex(),OU=Nt("reflink|nolink(?!\\()","g").replace("reflink",I_).replace("nolink",T_).getRegex(),C6=/[hH][tT][tT][pP][sS]?|[fF][tT][pP]/,X2={_backpedal:Sd,anyPunctuation:$U,autolink:AU,blockSkip:SU,br:k_,code:yU,del:Sd,emStrongLDelim:_U,emStrongRDelimAst:IU,emStrongRDelimUnd:EU,escape:vU,link:MU,nolink:T_,punctuation:wU,reflink:I_,reflinkSearch:OU,tag:DU,text:bU,url:Sd},PU={...X2,link:Nt(/^!?\[(label)\]\((.*?)\)/).replace("label",q0).getRegex(),reflink:Nt(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",q0).getRegex()},Ty={...X2,emStrongRDelimAst:TU,emStrongLDelim:CU,url:Nt(/^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("protocol",C6).replace("email",/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(),_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])((?:\\[\s\S]|[^\\])*?(?:\\[\s\S]|[^\s~\\]))\1(?=[^~]|$)/,text:Nt(/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|protocol:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/).replace("protocol",C6).getRegex()},RU={...Ty,br:Nt(k_).replace("{2,}","*").getRegex(),text:Nt(Ty.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},bh={normal:Z2,gfm:pU,pedantic:gU},zu={normal:X2,gfm:Ty,breaks:RU,pedantic:PU},NU={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},I6=e=>NU[e];function ps(e,t){if(t){if(Pr.escapeTest.test(e))return e.replace(Pr.escapeReplace,I6)}else if(Pr.escapeTestNoEncode.test(e))return e.replace(Pr.escapeReplaceNoEncode,I6);return e}function T6(e){try{e=encodeURI(e).replace(Pr.percentDecode,"%")}catch{return null}return e}function E6(e,t){let n=e.replace(Pr.findPipe,(o,s,a)=>{let l=!1,c=s;for(;--c>=0&&a[c]==="\\";)l=!l;return l?"|":" |"}),r=n.split(Pr.splitPipe),i=0;if(r[0].trim()||r.shift(),r.length>0&&!r.at(-1)?.trim()&&r.pop(),t)if(r.length>t)r.splice(t);else for(;r.length<t;)r.push("");for(;i<r.length;i++)r[i]=r[i].trim().replace(Pr.slashPipe,"|");return r}function ju(e,t,n){let r=e.length;if(r===0)return"";let i=0;for(;i<r&&e.charAt(r-i-1)===t;)i++;return e.slice(0,r-i)}function zU(e,t){if(e.indexOf(t[1])===-1)return-1;let n=0;for(let r=0;r<e.length;r++)if(e[r]==="\\")r++;else if(e[r]===t[0])n++;else if(e[r]===t[1]&&(n--,n<0))return r;return n>0?-2:-1}function $6(e,t,n,r,i){let o=t.href,s=t.title||null,a=e[1].replace(i.other.outputLinkReplace,"$1");r.state.inLink=!0;let l={type:e[0].charAt(0)==="!"?"image":"link",raw:n,href:o,title:s,text:a,tokens:r.inlineTokens(a)};return r.state.inLink=!1,l}function jU(e,t,n){let r=e.match(n.other.indentCodeCompensation);if(r===null)return t;let i=r[1];return t.split(`
4
4
  `).map(o=>{let s=o.match(n.other.beginningSpace);if(s===null)return o;let[a]=s;return a.length>=i.length?o.slice(i.length):o}).join(`
@@ -2358,7 +2358,7 @@ $$`:`${e}$$`},VJ=e=>UJ(e)%2===0?e:BJ(e),qJ=e=>HJ(e)%2===1?`${e}$`:e,WJ=(e,t,n)=>
2358
2358
  `).at(-1)?.trim()??"";return!new RegExp(`^[\\t ]{0,3}${r}{${i},}[\\t ]*$`).test(o)}function Q7(e){return sQ(e,{linkMode:"text-only"})}function fv(e,t){if(!t)return[{raw:e,src:e,mode:"full"}];const n=Q7(e);if(aQ(e))return[{raw:e,src:n,mode:"live"}];const r=Wt.lexer(e),i=r.findLastIndex(l=>l.type!=="space");if(i<0)return[{raw:e,src:n,mode:"live"}];const o=r[i];if(!o||o.type!=="code")return[{raw:e,src:n,mode:"live"}];const s=o;if(!lQ(s.raw))return[{raw:e,src:n,mode:"live"}];const a=r.slice(0,i).map(l=>l.raw).join("");return a?[{raw:a,src:Q7(a),mode:"live"},{raw:s.raw,src:s.raw,mode:"live"}]:[{raw:s.raw,src:s.raw,mode:"live"}]}var cQ={};vr(cQ,{CloseButton:()=>ZT,Description:()=>YT,List:()=>JT,ProgressFill:()=>QT,ProgressTrack:()=>eE,Region:()=>tE,Root:()=>nE,Title:()=>rE,Toast:()=>Ds,toaster:()=>nl,useToastContext:()=>Df});var KT=pt();function Df(){const e=ut(KT);if(e===void 0)throw new Error("[kobalte]: `useToastContext` must be used within a `Toast.Root` component");return e}function ZT(e){const t=Df(),[n,r]=se(e,["aria-label","onClick"]);return b(Jo,ne({get"aria-label"(){return n["aria-label"]||t.translations().close},onClick:o=>{ze(o,n.onClick),t.close()}},r))}function YT(e){const t=Df(),n=Ne({id:t.generateId("description")},e),[r,i]=se(n,["id"]);return re(()=>fe(t.registerDescriptionId(r.id))),b(Ve,ne({as:"div",get id(){return r.id}},i))}var XT=pt();function Vw(){const e=ut(XT);if(e===void 0)throw new Error("[kobalte]: `useToastRegionContext` must be used within a `Toast.Region` component");return e}function JT(e){let t;const n=Vw(),[r,i]=se(e,["ref","onFocusIn","onFocusOut","onPointerMove","onPointerLeave"]),o=c=>{ze(c,r.onFocusIn),n.pauseOnInteraction()&&!n.isPaused()&&n.pauseAllTimer()},s=c=>{ze(c,r.onFocusOut),Dn(t,c.relatedTarget)||n.resumeAllTimer()},a=c=>{ze(c,r.onPointerMove),n.pauseOnInteraction()&&!n.isPaused()&&n.pauseAllTimer()},l=c=>{ze(c,r.onPointerLeave),Dn(t,Fr(t).activeElement)||n.resumeAllTimer()};return re(gt([()=>t,()=>n.hotkey()],([c,u])=>{if(!c)return;const d=Fr(c),h=f=>{u.every(p=>f[p]||f.code===p)&&un(c)};d.addEventListener("keydown",h),fe(()=>d.removeEventListener("keydown",h))})),re(()=>{if(!n.pauseOnPageIdle())return;const c=N2(t);c.addEventListener("blur",n.pauseAllTimer),c.addEventListener("focus",n.resumeAllTimer),fe(()=>{c.removeEventListener("blur",n.pauseAllTimer),c.removeEventListener("focus",n.resumeAllTimer)})}),b(Ve,ne({as:"ol",ref(c){var u=st(d=>t=d,r.ref);typeof u=="function"&&u(c)},tabIndex:-1,onFocusIn:o,onFocusOut:s,onPointerMove:a,onPointerLeave:l},i,{get children(){return b(Ut,{get each(){return n.toasts()},children:c=>c.toastComponent({get toastId(){return c.id}})})}}))}function QT(e){const t=Vw(),n=Df(),[r,i]=se(e,["style"]),[o,s]=de(100);let a=0;return re(()=>{if(t.isPaused()||n.isPersistent())return;const l=setInterval(()=>{const c=new Date().getTime()-n.closeTimerStartTime()+a,u=Math.trunc(100-c/n.duration()*100);s(u<0?0:u)});fe(()=>{a+=new Date().getTime()-n.closeTimerStartTime(),clearInterval(l)})}),b(Ve,ne({as:"div",get style(){return gr({"--kb-toast-progress-fill-width":`${o()}%`},r.style)}},i))}function eE(e){return b(Ve,ne({as:"div","aria-hidden":"true",role:"presentation"},e))}var[qw,Mf]=Je({toasts:[]});function uQ(e){Mf("toasts",t=>[...t,e])}function dQ(e){return qw.toasts.find(t=>t.id===e)}function fQ(e,t){const n=qw.toasts.findIndex(r=>r.id===e);n!==-1&&Mf("toasts",r=>[...r.slice(0,n),t,...r.slice(n+1)])}function hQ(e){Mf("toasts",t=>t.id===e,"dismiss",!0)}function mQ(e){Mf("toasts",t=>t.filter(n=>n.id!==e))}function pQ(){Mf("toasts",[])}var pl={toasts:()=>qw.toasts,add:uQ,get:dQ,update:fQ,dismiss:hQ,remove:mQ,clear:pQ},e8="{hotkey}",gQ={close:"Close"},vQ={notifications:e=>`Notifications (${e})`};function tE(e){const t=Ne({id:`toast-region-${an()}`,hotkey:["altKey","KeyT"],duration:5e3,limit:3,swipeDirection:"right",swipeThreshold:50,pauseOnInteraction:!0,pauseOnPageIdle:!0,topLayer:!0,translations:vQ},e),[n,r]=se(t,["translations","style","hotkey","duration","limit","swipeDirection","swipeThreshold","pauseOnInteraction","pauseOnPageIdle","topLayer","aria-label","regionId"]),i=F(()=>pl.toasts().filter(h=>h.region===n.regionId&&h.dismiss===!1).slice(0,n.limit)),[o,s]=de(!1),a=()=>i().length>0,l=()=>n.hotkey.join("+").replace(/Key/g,"").replace(/Digit/g,""),c=()=>(n["aria-label"]||n.translations.notifications(e8)).replace(e8,l()),u=()=>({[jd]:n.topLayer?"":void 0}),d={isPaused:o,toasts:i,hotkey:()=>n.hotkey,duration:()=>n.duration,swipeDirection:()=>n.swipeDirection,swipeThreshold:()=>n.swipeThreshold,pauseOnInteraction:()=>n.pauseOnInteraction,pauseOnPageIdle:()=>n.pauseOnPageIdle,pauseAllTimer:()=>s(!0),resumeAllTimer:()=>s(!1),generateId:$r(()=>r.id)};return b(XT.Provider,{value:d,get children(){return b(Ve,ne({as:"div",role:"region",tabIndex:-1,get"aria-label"(){return c()},get style(){return gr({"pointer-events":a()?n.topLayer?"auto":void 0:"none"},n.style)}},u,r))}})}var yQ="toast.swipeStart",bQ="toast.swipeMove",wQ="toast.swipeCancel",kQ="toast.swipeEnd";function nE(e){const t=Vw(),n=Ne({id:`toast-${an()}`,priority:"high",translations:gQ},e),[r,i]=se(n,["ref","translations","toastId","style","priority","duration","persistent","onPause","onResume","onSwipeStart","onSwipeMove","onSwipeCancel","onSwipeEnd","onEscapeKeyDown","onKeyDown","onPointerDown","onPointerMove","onPointerUp"]),[o,s]=de(!0),[a,l]=de(),[c,u]=de(),[d,h]=de(!0),[f,m]=de(),{present:p}=po({show:o,element:()=>f()??null}),g=F(()=>r.duration||t.duration());let v,y=0,w=g(),k=null,x=null;const C=()=>{s(!1),h(!0)},S=()=>{pl.remove(r.toastId)},$=N=>{!N||r.persistent||(window.clearTimeout(v),y=new Date().getTime(),v=window.setTimeout(C,N))},O=()=>{$(w),r.onResume?.()},D=()=>{const N=new Date().getTime()-y;w=w-N,window.clearTimeout(v),r.onPause?.()},M=N=>{ze(N,r.onKeyDown),N.key==="Escape"&&(r.onEscapeKeyDown?.(N),N.defaultPrevented||C())},I=N=>{ze(N,r.onPointerDown),N.button===0&&(k={x:N.clientX,y:N.clientY})},L=N=>{if(ze(N,r.onPointerMove),!k)return;const W=N.clientX-k.x,K=N.clientY-k.y,V=!!x,q=["left","right"].includes(t.swipeDirection()),B=["left","up"].includes(t.swipeDirection())?Math.min:Math.max,Y=q?B(0,W):0,J=q?0:B(0,K),ge=N.pointerType==="touch"?10:2,ae={x:Y,y:J},Te={originalEvent:N,delta:ae};if(V){x=ae,qh(bQ,r.onSwipeMove,Te);const{x:pe,y:ue}=ae;N.currentTarget.setAttribute("data-swipe","move"),N.currentTarget.style.setProperty("--kb-toast-swipe-move-x",`${pe}px`),N.currentTarget.style.setProperty("--kb-toast-swipe-move-y",`${ue}px`)}else t8(ae,t.swipeDirection(),ge)?(x=ae,qh(yQ,r.onSwipeStart,Te),N.currentTarget.setAttribute("data-swipe","start"),N.target.setPointerCapture(N.pointerId)):(Math.abs(W)>ge||Math.abs(K)>ge)&&(k=null)},A=N=>{ze(N,r.onPointerUp);const W=x,K=N.target;if(K.hasPointerCapture(N.pointerId)&&K.releasePointerCapture(N.pointerId),x=null,k=null,W){const V=N.currentTarget,q={originalEvent:N,delta:W};if(t8(W,t.swipeDirection(),t.swipeThreshold())){qh(kQ,r.onSwipeEnd,q);const{x:B,y:Y}=W;N.currentTarget.setAttribute("data-swipe","end"),N.currentTarget.style.removeProperty("--kb-toast-swipe-move-x"),N.currentTarget.style.removeProperty("--kb-toast-swipe-move-y"),N.currentTarget.style.setProperty("--kb-toast-swipe-end-x",`${B}px`),N.currentTarget.style.setProperty("--kb-toast-swipe-end-y",`${Y}px`),C()}else qh(wQ,r.onSwipeCancel,q),N.currentTarget.setAttribute("data-swipe","cancel"),N.currentTarget.style.removeProperty("--kb-toast-swipe-move-x"),N.currentTarget.style.removeProperty("--kb-toast-swipe-move-y"),N.currentTarget.style.removeProperty("--kb-toast-swipe-end-x"),N.currentTarget.style.removeProperty("--kb-toast-swipe-end-y");V.addEventListener("click",B=>B.preventDefault(),{once:!0})}};Kt(()=>{t.toasts().find(N=>N.id===r.toastId&&N.update)&&h(!1)}),re(gt(()=>t.isPaused(),N=>{N?D():O()},{defer:!0})),re(gt([o,g],([N,W])=>{N&&!t.isPaused()&&$(W)})),re(gt(()=>pl.get(r.toastId)?.dismiss,N=>N&&C())),re(gt(()=>p(),N=>!N&&S()));const T={translations:()=>r.translations,close:C,duration:g,isPersistent:()=>r.persistent??!1,closeTimerStartTime:()=>y,generateId:$r(()=>i.id),registerTitleId:en(l),registerDescriptionId:en(u)};return b(ce,{get when(){return p()},get children(){return b(KT.Provider,{value:T,get children(){return b(Ve,ne({as:"li",ref(N){var W=st(m,r.ref);typeof W=="function"&&W(N)},role:"status",tabIndex:0,get style(){return gr({animation:d()?void 0:"none","user-select":"none","touch-action":"none"},r.style)},get"aria-live"(){return r.priority==="high"?"assertive":"polite"},"aria-atomic":"true",get"aria-labelledby"(){return a()},get"aria-describedby"(){return c()},get"data-opened"(){return o()?"":void 0},get"data-closed"(){return o()?void 0:""},get"data-swipe-direction"(){return t.swipeDirection()},onKeyDown:M,onPointerDown:I,onPointerMove:L,onPointerUp:A},i))}})}})}function t8(e,t,n=0){const r=Math.abs(e.x),i=Math.abs(e.y),o=r>i;return t==="left"||t==="right"?o&&r>n:!o&&i>n}function qh(e,t,n){const r=n.originalEvent.currentTarget,i=new CustomEvent(e,{bubbles:!0,cancelable:!0,detail:n});t&&r.addEventListener(e,t,{once:!0}),r.dispatchEvent(i)}function rE(e){const t=Df(),n=Ne({id:t.generateId("title")},e),[r,i]=se(n,["id"]);return re(()=>fe(t.registerTitleId(r.id))),b(Ve,ne({as:"div",get id(){return r.id}},i))}var xQ=0;function iE(e,t){const n=xQ++;return pl.add({id:n,toastComponent:e,dismiss:!1,update:!1,region:t?.region}),n}function bb(e,t){pl.update(e,{id:e,toastComponent:t,dismiss:!1,update:!0})}function SQ(e,t,n){const r=iE(i=>t({get toastId(){return i.toastId},state:"pending"}),n);return(kf(e)?e():e).then(i=>bb(r,o=>t({get toastId(){return o.toastId},state:"fulfilled",data:i}))).catch(i=>bb(r,o=>t({get toastId(){return o.toastId},state:"rejected",error:i}))),r}function _Q(e){return pl.dismiss(e),e}function CQ(){pl.clear()}var nl={show:iE,update:bb,promise:SQ,dismiss:_Q,clear:CQ},Ds=Object.assign(nE,{CloseButton:ZT,Description:YT,List:JT,ProgressFill:QT,ProgressTrack:eE,Region:tE,Title:rE,toaster:nl});const IQ=[["path",{d:"M15 5H19.5C20.4346 5 20.9019 5 21.25 5.20096C21.478 5.33261 21.6674 5.52197 21.799 5.75C22 6.09808 22 6.56538 22 7.5C22 8.43462 22 8.90192 21.799 9.25C21.6674 9.47803 21.478 9.66739 21.25 9.79904C20.9019 10 20.4346 10 19.5 10H15",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"0"}],["path",{d:"M13 14H19.5C20.4346 14 20.9019 14 21.25 14.201C21.478 14.3326 21.6674 14.522 21.799 14.75C22 15.0981 22 15.5654 22 16.5C22 17.4346 22 17.9019 21.799 18.25C21.6674 18.478 21.478 18.6674 21.25 18.799C20.9019 19 20.4346 19 19.5 19H13",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"1"}],["path",{d:"M9.29969 14.3638L9.92373 13.9477L9.92373 13.9477L9.29969 14.3638ZM9.32684 14.4045L8.7028 14.8205L8.7028 14.8205L9.32684 14.4045ZM8.41421 21L7.88388 20.4697L8.41421 21ZM9.05201 20.3622L9.58234 20.8925H9.58234L9.05201 20.3622ZM9.19561 16.4867L8.59561 16.0367L8.59561 16.0367L9.19561 16.4867ZM9.27186 16.3851L9.87186 16.8351L9.87186 16.8351L9.27186 16.3851ZM9.19561 18.3417L8.59561 18.7917L8.59561 18.7917L9.19561 18.3417ZM8.79241 17.7024L9.5106 17.4862V17.4862L8.79241 17.7024ZM8.79241 17.1261L9.5106 17.3422V17.3422L8.79241 17.1261ZM5.58579 21L5.05546 21.5303L5.05546 21.5303L5.58579 21ZM9.76462 15.2332L10.5065 15.1229L10.5065 15.1229L9.76462 15.2332ZM9.75494 15.5819L10.4895 15.7332V15.7332L9.75494 15.5819ZM9.60244 19.7056L8.91033 19.4167V19.4167L9.60244 19.7056ZM9.64765 19.0695L10.3737 18.8814V18.8814L9.64765 19.0695ZM9.02647 13.84L9.75662 13.6686L9.75662 13.6686L9.02647 13.84ZM9.06318 13.9613L8.36057 14.2236L8.36057 14.2236L9.06318 13.9613ZM9 11.584L8.69972 10.8967C8.42655 11.016 8.25 11.2859 8.25 11.584H9ZM5 11.584H5.75C5.75 11.2859 5.57345 11.016 5.30028 10.8967L5 11.584ZM2 7H2.75C2.75 4.65279 4.65279 2.75 7 2.75V2V1.25C3.82436 1.25 1.25 3.82436 1.25 7H2ZM7 2V2.75C9.34721 2.75 11.25 4.65279 11.25 7H12H12.75C12.75 3.82436 10.1756 1.25 7 1.25V2ZM9.29969 14.3638L8.67565 14.7798L8.7028 14.8205L9.32684 14.4045L9.95088 13.9884L9.92373 13.9477L9.29969 14.3638ZM8.41421 21L8.94454 21.5303L9.58234 20.8925L9.05201 20.3622L8.52168 19.8319L7.88388 20.4697L8.41421 21ZM9.19561 16.4867L9.79561 16.9367L9.87186 16.8351L9.27186 16.3851L8.67186 15.9351L8.59561 16.0367L9.19561 16.4867ZM9.19561 18.3417L9.79561 17.8917C9.67257 17.7276 9.60164 17.6325 9.55282 17.5578C9.50856 17.4902 9.50756 17.4761 9.5106 17.4862L8.79241 17.7024L8.07422 17.9185C8.17302 18.2468 8.39708 18.527 8.59561 18.7917L9.19561 18.3417ZM9.19561 16.4867L8.59561 16.0367C8.39708 16.3014 8.17302 16.5816 8.07422 16.91L8.79241 17.1261L9.5106 17.3422C9.50756 17.3523 9.50856 17.3382 9.55282 17.2706C9.60164 17.196 9.67257 17.1008 9.79561 16.9367L9.19561 16.4867ZM8.79241 17.7024L9.5106 17.4862C9.49647 17.4393 9.49647 17.3892 9.5106 17.3422L8.79241 17.1261L8.07422 16.91C7.97526 17.2388 7.97526 17.5896 8.07422 17.9185L8.79241 17.7024ZM5.58579 21L5.05546 21.5303C5.37379 21.8487 5.66477 22.1419 5.93262 22.3463C6.21778 22.5638 6.56297 22.75 7 22.75V22V21.25C6.99936 21.25 6.99936 21.25 6.9998 21.25C7.00025 21.2501 7.00053 21.2501 7.00045 21.2501C7.00036 21.2501 6.99936 21.2499 6.99731 21.2492C6.99523 21.2486 6.99174 21.2474 6.98671 21.2453C6.96497 21.2362 6.91996 21.2128 6.8425 21.1537C6.67346 21.0248 6.46444 20.818 6.11612 20.4697L5.58579 21ZM8.41421 21L7.88388 20.4697C7.53556 20.818 7.32654 21.0248 7.1575 21.1537C7.08004 21.2128 7.03503 21.2362 7.0133 21.2453C7.00826 21.2474 7.00477 21.2486 7.00269 21.2492C7.00064 21.2499 6.99965 21.2501 6.99955 21.2501C6.99947 21.2501 6.99975 21.2501 7.0002 21.25C7.00064 21.25 7.00064 21.25 7 21.25V22V22.75C7.43703 22.75 7.78222 22.5638 8.06737 22.3463C8.33523 22.1419 8.62621 21.8487 8.94454 21.5303L8.41421 21ZM5 19.5858H4.25C4.25 19.9333 4.23672 20.316 4.38321 20.6697L5.07612 20.3827L5.76903 20.0957C5.76901 20.0956 5.76889 20.0954 5.7686 20.0944C5.76828 20.0933 5.76746 20.0905 5.76635 20.0852C5.76401 20.0739 5.76041 20.052 5.75736 20.0117C5.7505 19.9215 5.75 19.8011 5.75 19.5858H5ZM5.58579 21L6.11612 20.4697C5.96383 20.3174 5.87909 20.2319 5.82012 20.1633C5.79385 20.1327 5.78085 20.1146 5.77456 20.105C5.77157 20.1004 5.77014 20.0978 5.76963 20.0969C5.76915 20.096 5.76905 20.0957 5.76903 20.0957L5.07612 20.3827L4.38321 20.6697C4.5297 21.0233 4.8097 21.2846 5.05546 21.5303L5.58579 21ZM9.32684 14.4045L8.7028 14.8205C8.84441 15.0329 8.92554 15.1556 8.97895 15.2518C9.0267 15.3378 9.02449 15.355 9.02277 15.3435L9.76462 15.2332L10.5065 15.1229C10.4718 14.8899 10.3857 14.6953 10.2903 14.5234C10.2005 14.3618 10.0792 14.1809 9.95087 13.9884L9.32684 14.4045ZM9.27186 16.3851L9.87186 16.8351C10.0106 16.65 10.1418 16.4761 10.2404 16.3197C10.3452 16.1534 10.442 15.9638 10.4895 15.7332L9.75494 15.5819L9.02035 15.4306C9.02271 15.4192 9.02396 15.4366 8.97152 15.5197C8.91285 15.6128 8.82504 15.7308 8.67186 15.9351L9.27186 16.3851ZM9.76462 15.2332L9.02277 15.3435C9.02708 15.3724 9.02626 15.402 9.02035 15.4306L9.75494 15.5819L10.4895 15.7332C10.5309 15.5323 10.5366 15.3257 10.5065 15.1229L9.76462 15.2332ZM9.05201 20.3622L9.58234 20.8925C9.73312 20.7418 9.87353 20.6019 9.98321 20.4758C10.0983 20.3435 10.2133 20.1892 10.2946 19.9945L9.60244 19.7056L8.91033 19.4167C8.91552 19.4043 8.9134 19.4202 8.85137 19.4915C8.78391 19.569 8.68714 19.6664 8.52168 19.8319L9.05201 20.3622ZM9.19561 18.3417L8.59561 18.7917C8.736 18.9789 8.81803 19.089 8.87384 19.1753C8.92516 19.2547 8.92501 19.2707 8.92163 19.2577L9.64765 19.0695L10.3737 18.8814C10.3207 18.6772 10.2287 18.5082 10.1335 18.3609C10.0428 18.2205 9.92355 18.0623 9.79561 17.8917L9.19561 18.3417ZM9.60244 19.7056L10.2946 19.9945C10.4417 19.6421 10.4695 19.2511 10.3737 18.8814L9.64765 19.0695L8.92163 19.2577C8.93532 19.3105 8.93135 19.3663 8.91033 19.4167L9.60244 19.7056ZM9 13.3739H8.25C8.25 13.5755 8.24543 13.7947 8.29633 14.0115L9.02647 13.84L9.75662 13.6686C9.75749 13.6723 9.75458 13.6641 9.75254 13.6191C9.75018 13.5669 9.75 13.4981 9.75 13.3739H9ZM9.29969 14.3638L9.92373 13.9477C9.85483 13.8444 9.81683 13.7871 9.78988 13.7424C9.76658 13.7037 9.76447 13.6953 9.7658 13.6989L9.06318 13.9613L8.36057 14.2236C8.43847 14.4322 8.56384 14.6121 8.67565 14.7798L9.29969 14.3638ZM9.02647 13.84L8.29633 14.0114C8.31324 14.0835 8.3347 14.1543 8.36057 14.2236L9.06318 13.9613L9.7658 13.6989C9.7621 13.689 9.75903 13.6789 9.75662 13.6686L9.02647 13.84ZM9 11.584H8.25V13.3739H9H9.75V11.584H9ZM12 7H11.25C11.25 8.74161 10.2023 10.2402 8.69972 10.8967L9 11.584L9.30028 12.2712C11.3295 11.3846 12.75 9.35903 12.75 7H12ZM5 11.584H4.25V19.5858H5H5.75V11.584H5ZM5 11.584L5.30028 10.8967C3.79769 10.2402 2.75 8.74161 2.75 7H2H1.25C1.25 9.35903 2.6705 11.3846 4.69972 12.2712L5 11.584Z",fill:"currentColor",key:"2"}],["path",{d:"M7.25 7H7M7.5 7C7.5 7.27614 7.27614 7.5 7 7.5C6.72386 7.5 6.5 7.27614 6.5 7C6.5 6.72386 6.72386 6.5 7 6.5C7.27614 6.5 7.5 6.72386 7.5 7Z",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"3"}]],TQ=[["circle",{cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"0"}],["path",{d:"M12 8V12",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"1"}],["path",{d:"M12.125 15.75H12M12.25 15.75C12.25 15.8881 12.1381 16 12 16C11.8619 16 11.75 15.8881 11.75 15.75C11.75 15.6119 11.8619 15.5 12 15.5C12.1381 15.5 12.25 15.6119 12.25 15.75Z",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"2"}]],EQ=[["path",{d:"M13 2H11C7.22876 2 5.34315 2 4.17157 3.17157C3 4.34315 3 6.22876 3 10V14C3 17.7712 3 19.6569 4.17157 20.8284C5.34315 22 7.22876 22 11 22H13C16.7712 22 18.6569 22 19.8284 20.8284C21 19.6569 21 17.7712 21 14V10C21 6.22876 21 4.34315 19.8284 3.17157C18.6569 2 16.7712 2 13 2Z",stroke:"currentColor",strokeLinecap:"round",strokeWidth:"1.5",key:"0"}],["path",{d:"M21 12H3",stroke:"currentColor",strokeLinecap:"round",strokeWidth:"1.5",key:"1"}],["path",{d:"M15 7H9",stroke:"currentColor",strokeLinecap:"round",strokeWidth:"1.5",key:"2"}],["path",{d:"M15 17H9",stroke:"currentColor",strokeLinecap:"round",strokeWidth:"1.5",key:"3"}]],$Q=[["path",{d:"M19 9H6.65856C5.65277 9 5.14987 9 5.02472 8.69134C4.89957 8.38268 5.25517 8.01942 5.96637 7.29289L8.21091 5",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"0"}],["path",{d:"M5 15H17.3414C18.3472 15 18.8501 15 18.9753 15.3087C19.1004 15.6173 18.7448 15.9806 18.0336 16.7071L15.7891 19",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"1"}]],AQ=[["path",{d:"M18 9.00005C18 9.00005 13.5811 15 12 15C10.4188 15 6 9 6 9",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"0"}]],LQ=[["path",{d:"M15 17.3497C15 17.3497 8.06166 17.8924 7.08461 16.9154C6.10755 15.9383 6.65037 9 6.65037 9M7.5 16.5L17.5 6.5",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"0"}]],n8=[["path",{d:"M15 6C15 6 9.00001 10.4189 9 12C8.99999 13.5812 15 18 15 18",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"0"}]],r8=[["path",{d:"M9.00005 6C9.00005 6 15 10.4189 15 12C15 13.5812 9 18 9 18",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"0"}]],DQ=[["path",{d:"M12.5 18C12.5 18 18.5 13.5811 18.5 12C18.5 10.4188 12.5 6 12.5 6",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"0"}],["path",{d:"M5.50005 18C5.50005 18 11.5 13.5811 11.5 12C11.5 10.4188 5.5 6 5.5 6",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"1"}]],MQ=[["path",{d:"M17.9998 15C17.9998 15 13.5809 9.00001 11.9998 9C10.4187 8.99999 5.99985 15 5.99985 15",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"0"}]],i8=[["path",{d:"M7 4V20",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"0"}],["path",{d:"M17 19L17 4",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"1"}],["path",{d:"M10 6.99998C10 6.99998 7.79053 4.00001 6.99998 4C6.20942 3.99999 4 7 4 7",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"2"}],["path",{d:"M20 17C20 17 17.7905 20 17 20C16.2094 20 14 17 14 17",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"3"}]],OQ=[["path",{d:"M16.998 7.12652C17.3182 7.04393 17.654 7 18 7C20.2091 7 22 8.79086 22 11C22 13.2091 20.2091 15 18 15C17.6451 15 17.3009 14.9538 16.9733 14.867M16.998 7.12652C16.9993 7.08451 17 7.04233 17 7C17 4.79086 15.2091 3 13 3C11.0824 3 9.47994 4.34939 9.09041 6.15043M16.998 7.12652C16.9769 7.80763 16.7854 8.44584 16.4649 9M16.9733 14.867C16.9909 14.7472 17 14.6247 17 14.5C17 13.2905 16.1411 12.2816 15 12.05M16.9733 14.867C16.7957 16.0737 15.756 17 14.5 17H14C11.7909 17 10 18.7909 10 21M9.09041 6.15043C8.74377 6.05243 8.37801 6 8 6C5.79086 6 4 7.79086 4 10C4 10.3886 4.05542 10.7643 4.15878 11.1195M9.09041 6.15043C10.1015 6.43625 10.9498 7.10965 11.4649 8M4.15878 11.1195C2.9114 11.4832 2 12.6352 2 14C2 15.6569 3.34315 17 5 17C6.30622 17 7.41746 16.1652 7.82929 15M4.15878 11.1195C4.24921 11.4303 4.37632 11.7255 4.53513 12",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"0"}],["path",{d:"M11.8361 11.7435C11.3257 12.2353 10.453 12.3202 9.70713 11.9008C8.9612 11.4814 8.58031 10.6917 8.73535 10",stroke:"currentColor",strokeLinecap:"round",strokeWidth:"1.5",key:"1"}]],o8=[["path",{d:"M21.5 12C21.5 17.2467 17.2467 21.5 12 21.5C10.3719 21.5 8.8394 21.0904 7.5 20.3687C5.63177 19.362 4.37462 20.2979 3.26592 20.4658C3.09774 20.4913 2.93024 20.4302 2.80997 20.31C2.62741 20.1274 2.59266 19.8451 2.6935 19.6074C3.12865 18.5818 3.5282 16.6382 2.98341 15C2.6698 14.057 2.5 13.0483 2.5 12C2.5 6.75329 6.75329 2.5 12 2.5C17.2467 2.5 21.5 6.75329 21.5 12Z",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"0"}],["path",{d:"M12.1257 12H12.0007M8.125 12H8M16.125 12H16M12.2507 12C12.2507 12.1381 12.1388 12.25 12.0007 12.25C11.8627 12.25 11.7507 12.1381 11.7507 12C11.7507 11.8619 11.8627 11.75 12.0007 11.75C12.1388 11.75 12.2507 11.8619 12.2507 12ZM8.25 12C8.25 12.1381 8.13807 12.25 8 12.25C7.86193 12.25 7.75 12.1381 7.75 12C7.75 11.8619 7.86193 11.75 8 11.75C8.13807 11.75 8.25 11.8619 8.25 12ZM16.25 12C16.25 12.1381 16.1381 12.25 16 12.25C15.8619 12.25 15.75 12.1381 15.75 12C15.75 11.8619 15.8619 11.75 16 11.75C16.1381 11.75 16.25 11.8619 16.25 12Z",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"1"}]],PQ=[["path",{d:"M12.6974 3.5H11.303C10.5884 3.5 10.2311 3.5 9.91067 3.612C9.71499 3.68039 9.53113 3.77879 9.36568 3.90367C9.09474 4.10816 8.89655 4.40544 8.50018 5L8.50017 5.00001C8.29717 5.30453 7.99794 5.75337 7.87867 5.87871C7.58314 6.18927 7.19563 6.39666 6.77329 6.47029C6.60284 6.5 6.41985 6.5 6.05387 6.5C5.07379 6.5 4.58376 6.5 4.18307 6.61342C3.18074 6.89716 2.39734 7.68055 2.1136 8.68289C2.00018 9.08357 2.00018 9.57361 2.00018 10.5537V14.5C2.00018 17.3284 2.00018 18.7426 2.87886 19.6213C3.75754 20.5 5.17176 20.5 8.00018 20.5H16.0002C18.8286 20.5 20.2428 20.5 21.1215 19.6213C22.0002 18.7426 22.0002 17.3284 22.0002 14.5V10.5537C22.0002 9.57361 22.0002 9.08357 21.8868 8.68289C21.603 7.68055 20.8196 6.89716 19.8173 6.61342C19.4166 6.5 18.9266 6.5 17.9465 6.5C17.5805 6.5 17.3975 6.5 17.2271 6.47029C16.8047 6.39666 16.4172 6.18927 16.1217 5.87871C16.0024 5.75336 15.7032 5.30451 15.5002 5C15.1038 4.40544 14.9056 4.10816 14.6347 3.90367C14.4692 3.77879 14.2854 3.68039 14.0897 3.612C13.7693 3.5 13.412 3.5 12.6974 3.5Z",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"0"}],["path",{d:"M16.0002 13C16.0002 15.2091 14.2093 17 12.0002 17C9.79104 17 8.00018 15.2091 8.00018 13C8.00018 10.7909 9.79104 9 12.0002 9C14.2093 9 16.0002 10.7909 16.0002 13Z",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"1"}],["path",{d:"M19.1252 9.5H19.0002M19.2502 9.5C19.2502 9.63807 19.1383 9.75 19.0002 9.75C18.8621 9.75 18.7502 9.63807 18.7502 9.5C18.7502 9.36193 18.8621 9.25 19.0002 9.25C19.1383 9.25 19.2502 9.36193 19.2502 9.5Z",stroke:"currentColor",strokeLinecap:"round",strokeWidth:"1.5",key:"2"}]],s8=[["path",{d:"M18 6L6.00081 17.9992M17.9992 18L6 6.00085",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"0"}]],a8=[["path",{d:"M22 12C22 6.47715 17.5228 2 12 2C6.47715 2 2 6.47715 2 12C2 17.5228 6.47715 22 12 22C17.5228 22 22 17.5228 22 12Z",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"0"}],["path",{d:"M14.9994 15L9 9M9.00064 15L15 9",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"1"}]],RQ=[["path",{d:"M11 8H13C15.8284 8 17.2426 8 18.1213 8.87868C19 9.75736 19 11.1716 19 14C19 16.8284 19 18.2426 18.1213 19.1213C17.2426 20 15.8284 20 13 20H12C12 20 11.5 22 8 22C8 22 9 20.9913 9 19.9827C7.44655 19.9359 6.51998 19.7626 5.87868 19.1213C5 18.2426 5 16.8284 5 14C5 11.1716 5 9.75736 5.87868 8.87868C6.75736 8 8.17157 8 11 8Z",stroke:"currentColor",strokeLinejoin:"round",strokeWidth:"1.5",key:"0"}],["path",{d:"M19 11.5H19.5C20.4346 11.5 20.9019 11.5 21.25 11.701C21.478 11.8326 21.6674 12.022 21.799 12.25C22 12.5981 22 13.0654 22 14C22 14.9346 22 15.4019 21.799 15.75C21.6674 15.978 21.478 16.1674 21.25 16.299C20.9019 16.5 20.4346 16.5 19.5 16.5H19",stroke:"currentColor",strokeLinejoin:"round",strokeWidth:"1.5",key:"1"}],["path",{d:"M5 11.5H4.5C3.56538 11.5 3.09808 11.5 2.75 11.701C2.52197 11.8326 2.33261 12.022 2.20096 12.25C2 12.5981 2 13.0654 2 14C2 14.9346 2 15.4019 2.20096 15.75C2.33261 15.978 2.52197 16.1674 2.75 16.299C3.09808 16.5 3.56538 16.5 4.5 16.5H5",stroke:"currentColor",strokeLinejoin:"round",strokeWidth:"1.5",key:"2"}],["path",{d:"M13.5 3.5C13.5 4.32843 12.8284 5 12 5C11.1716 5 10.5 4.32843 10.5 3.5C10.5 2.67157 11.1716 2 12 2C12.8284 2 13.5 2.67157 13.5 3.5Z",stroke:"currentColor",strokeWidth:"1.5",key:"3"}],["path",{d:"M12 5V8",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"4"}],["path",{d:"M9 12V13M15 12V13",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"5"}],["path",{d:"M10 16.5C10 16.5 10.6667 17 12 17C13.3333 17 14 16.5 14 16.5",stroke:"currentColor",strokeLinecap:"round",strokeWidth:"1.5",key:"6"}]],l8=[["path",{d:"M11 6L21 6",stroke:"currentColor",strokeLinecap:"round",strokeWidth:"1.5",key:"0"}],["path",{d:"M11 12L21 12",stroke:"currentColor",strokeLinecap:"round",strokeWidth:"1.5",key:"1"}],["path",{d:"M11 18L21 18",stroke:"currentColor",strokeLinecap:"round",strokeWidth:"1.5",key:"2"}],["path",{d:"M3 7.39286C3 7.39286 4 8.04466 4.5 9C4.5 9 6 5.25 8 4",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"3"}],["path",{d:"M3 18.3929C3 18.3929 4 19.0447 4.5 20C4.5 20 6 16.25 8 15",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"4"}]],NQ=[["path",{d:"M22 12C22 6.47715 17.5228 2 12 2C6.47715 2 2 6.47715 2 12C2 17.5228 6.47715 22 12 22C17.5228 22 22 17.5228 22 12Z",stroke:"currentColor",strokeWidth:"1.5",key:"0"}],["path",{d:"M8 12.75C8 12.75 9.6 13.6625 10.4 15C10.4 15 12.8 9.75 16 8",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"1"}]],zQ=[["path",{d:"M17.4776 9.01106C17.485 9.01102 17.4925 9.01101 17.5 9.01101C19.9853 9.01101 22 11.0294 22 13.5193C22 15.8398 20.25 17.7508 18 18M17.4776 9.01106C17.4924 8.84606 17.5 8.67896 17.5 8.51009C17.5 5.46695 15.0376 3 12 3C9.12324 3 6.76233 5.21267 6.52042 8.03192M17.4776 9.01106C17.3753 10.1476 16.9286 11.1846 16.2428 12.0165M6.52042 8.03192C3.98398 8.27373 2 10.4139 2 13.0183C2 15.4417 3.71776 17.4632 6 17.9273M6.52042 8.03192C6.67826 8.01687 6.83823 8.00917 7 8.00917C8.12582 8.00917 9.16474 8.38194 10.0005 9.01101",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"0"}],["path",{d:"M12 13L12 21M12 13C11.2998 13 9.99153 14.9943 9.5 15.5M12 13C12.7002 13 14.0085 14.9943 14.5 15.5",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"1"}]],jQ=[["path",{d:"M8 6L4.32038 9.17157C2.77346 10.5049 2 11.1716 2 12C2 12.8284 2.77346 13.4951 4.32038 14.8284L8 18",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"0"}],["path",{d:"M16 6L19.6796 9.17157C21.2265 10.5049 22 11.1716 22 12C22 12.8284 21.2265 13.4951 19.6796 14.8284L16 18",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"1"}]],FQ=[["path",{d:"M2.5 12C2.5 7.52166 2.5 5.28249 3.89124 3.89124C5.28249 2.5 7.52166 2.5 12 2.5C16.4783 2.5 18.7175 2.5 20.1088 3.89124C21.5 5.28249 21.5 7.52166 21.5 12C21.5 16.4783 21.5 18.7175 20.1088 20.1088C18.7175 21.5 16.4783 21.5 12 21.5C7.52166 21.5 5.28249 21.5 3.89124 20.1088C2.5 18.7175 2.5 16.4783 2.5 12Z",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"0"}],["path",{d:"M9.5 9.5L7.96682 10.8215C7.32228 11.377 7 11.6548 7 12C7 12.3452 7.32227 12.623 7.96682 13.1785L9.5 14.5",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"1"}],["path",{d:"M14.5 9.5L16.0332 10.8215C16.6777 11.377 17 11.6548 17 12C17 12.3452 16.6777 12.623 16.0332 13.1785L14.5 14.5",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"2"}]],UQ=[["path",{d:"M16 6.99998L19.0664 9.64296C20.3554 10.7541 21 11.3096 21 12C21 12.6903 20.3555 13.2459 19.0664 14.357L16 17",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"0"}],["path",{d:"M8 6.99998L4.93365 9.64296C3.64455 10.7541 3 11.3096 3 12C3 12.6903 3.64455 13.2459 4.93365 14.357L8 17",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"1"}]],HQ=[["path",{d:"M13 4L13 7.00002C13 8.88563 13.0001 9.82843 13.5858 10.4142C14.1716 11 15.1144 11 17 11L20 11",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"0"}],["path",{d:"M11.0001 20L11 17C11 15.1144 11 14.1715 10.4142 13.5858C9.82843 13 8.88563 13 7.00002 13L4.00006 13",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"1"}]],BQ=[["path",{d:"M14 4H10C6.22876 4 4.34315 4 3.17157 5.17157C2 6.34315 2 8.22876 2 12C2 15.7712 2 17.6569 3.17157 18.8284C4.34315 20 6.22876 20 10 20H14C17.7712 20 19.6569 20 20.8284 18.8284C22 17.6569 22 15.7712 22 12C22 8.22876 22 6.34315 20.8284 5.17157C19.6569 4 17.7712 4 14 4Z",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"0"}],["path",{d:"M7 9L8.83981 10.5858C9.61327 11.2525 10 11.5858 10 12C10 12.4142 9.61327 12.7475 8.83981 13.4142L7 15",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"1"}],["path",{d:"M13 16H17",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"2"}]],VQ=[["path",{d:"M8 13.5H16M8 8.5H12",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"0"}],["path",{d:"M6.09881 19C4.7987 18.8721 3.82475 18.4816 3.17157 17.8284C2 16.6569 2 14.7712 2 11V10.5C2 6.72876 2 4.84315 3.17157 3.67157C4.34315 2.5 6.22876 2.5 10 2.5H14C17.7712 2.5 19.6569 2.5 20.8284 3.67157C22 4.84315 22 6.72876 22 10.5V11C22 14.7712 22 16.6569 20.8284 17.8284C19.6569 19 17.7712 19 14 19C13.4395 19.0125 12.9931 19.0551 12.5546 19.155C11.3562 19.4309 10.2465 20.0441 9.14987 20.5789C7.58729 21.3408 6.806 21.7218 6.31569 21.3651C5.37769 20.6665 6.29454 18.5019 6.5 17.5",stroke:"currentColor",strokeLinecap:"round",strokeWidth:"1.5",key:"1"}]],qQ=[["path",{d:"M9 15C9 12.1716 9 10.7574 9.87868 9.87868C10.7574 9 12.1716 9 15 9L16 9C18.8284 9 20.2426 9 21.1213 9.87868C22 10.7574 22 12.1716 22 15V16C22 18.8284 22 20.2426 21.1213 21.1213C20.2426 22 18.8284 22 16 22H15C12.1716 22 10.7574 22 9.87868 21.1213C9 20.2426 9 18.8284 9 16L9 15Z",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"0"}],["path",{d:"M16.9999 9C16.9975 6.04291 16.9528 4.51121 16.092 3.46243C15.9258 3.25989 15.7401 3.07418 15.5376 2.90796C14.4312 2 12.7875 2 9.5 2C6.21252 2 4.56878 2 3.46243 2.90796C3.25989 3.07417 3.07418 3.25989 2.90796 3.46243C2 4.56878 2 6.21252 2 9.5C2 12.7875 2 14.4312 2.90796 15.5376C3.07417 15.7401 3.25989 15.9258 3.46243 16.092C4.51121 16.9528 6.04291 16.9975 9 16.9999",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"1"}]],WQ=[["path",{d:"M2.79289 21.2071C3.08579 21.5 3.55719 21.5 4.5 21.5H14.5C15.4428 21.5 15.9142 21.5 16.2071 21.2071M2.79289 21.2071C2.5 20.9142 2.5 20.4428 2.5 19.5V9.5C2.5 8.55719 2.5 8.08579 2.79289 7.79289M2.79289 21.2071L8.79289 15.2071M16.2071 21.2071C16.5 20.9142 16.5 20.4428 16.5 19.5V9.5C16.5 8.55719 16.5 8.08579 16.2071 7.79289M16.2071 21.2071L21.2071 16.2071C21.5 15.9142 21.5 15.4428 21.5 14.5V4.5C21.5 3.55719 21.5 3.08579 21.2071 2.79289M16.2071 7.79289C15.9142 7.5 15.4428 7.5 14.5 7.5H4.5C3.55719 7.5 3.08579 7.5 2.79289 7.79289M16.2071 7.79289L21.2071 2.79289M2.79289 7.79289L7.79289 2.79289C8.08579 2.5 8.55719 2.5 9.5 2.5H19.5C20.4428 2.5 20.9142 2.5 21.2071 2.79289M8.79289 15.2071C9.08579 15.5 9.55719 15.5 10.5 15.5H14M8.79289 15.2071C8.5 14.9142 8.5 14.4428 8.5 13.5V10.5",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"0"}]],GQ=[["path",{d:"M14.5352 11.0865L18.5575 12.6605C20.8775 13.5683 22.0375 14.0222 21.9991 14.7422C21.9606 15.4622 20.75 15.7924 18.3288 16.4527C17.6079 16.6493 17.2475 16.7476 16.9976 16.9976C16.7476 17.2475 16.6493 17.6079 16.4527 18.3288C15.7924 20.75 15.4622 21.9606 14.7422 21.9991C14.0222 22.0375 13.5683 20.8775 12.6605 18.5575L11.0865 14.5352C10.136 12.1062 9.6608 10.8918 10.2763 10.2763C10.8918 9.6608 12.1062 10.136 14.5352 11.0865Z",stroke:"currentColor",strokeLinejoin:"round",strokeWidth:"1.5",key:"0"}],["path",{d:"M10.8576 7.08329C11.0714 7.43808 11.5323 7.55239 11.8871 7.33861C12.2419 7.12483 12.3562 6.66392 12.1424 6.30913L10.8576 7.08329ZM6.30914 12.1424C6.66392 12.3562 7.12483 12.2419 7.33861 11.8871C7.55239 11.5323 7.43808 11.0714 7.08329 10.8576L6.30914 12.1424ZM5.75 8.5C5.75 6.98122 6.98123 5.75 8.5 5.75V4.25C6.15281 4.25 4.25 6.15279 4.25 8.5H5.75ZM8.5 5.75C9.49944 5.75 10.3752 6.28272 10.8576 7.08329L12.1424 6.30913C11.3999 5.07687 10.0469 4.25 8.5 4.25V5.75ZM7.08329 10.8576C6.28272 10.3752 5.75 9.49945 5.75 8.5H4.25C4.25 10.0469 5.07688 11.3999 6.30914 12.1424L7.08329 10.8576Z",fill:"currentColor",key:"1"}],["path",{d:"M14.2515 8.13498C14.2778 8.54836 14.6342 8.86216 15.0476 8.83587C15.461 8.80958 15.7748 8.45316 15.7485 8.03979L14.2515 8.13498ZM8.04118 15.7485C8.45457 15.7747 8.81093 15.4608 8.83714 15.0475C8.86335 14.6341 8.54948 14.2777 8.1361 14.2515L8.04118 15.7485ZM2.75 8.50661C2.75 5.32733 5.32736 2.75 8.50664 2.75V1.25C4.49895 1.25 1.25 4.49889 1.25 8.50661H2.75ZM8.50664 2.75C11.561 2.75 14.0604 5.12926 14.2515 8.13498L15.7485 8.03979C15.5074 4.24925 12.3576 1.25 8.50664 1.25V2.75ZM8.1361 14.2515C5.12986 14.0609 2.75 11.5614 2.75 8.50661H1.25C1.25 12.358 4.25002 15.5081 8.04118 15.7485L8.1361 14.2515Z",fill:"currentColor",key:"2"}]],KQ=[["path",{d:"M19.5 5.5L18.8803 15.5251C18.7219 18.0864 18.6428 19.3671 18.0008 20.2879C17.6833 20.7431 17.2747 21.1273 16.8007 21.416C15.8421 22 14.559 22 11.9927 22C9.42312 22 8.1383 22 7.17905 21.4149C6.7048 21.1257 6.296 20.7408 5.97868 20.2848C5.33688 19.3626 5.25945 18.0801 5.10461 15.5152L4.5 5.5",stroke:"currentColor",strokeLinecap:"round",strokeWidth:"1.5",key:"0"}],["path",{d:"M3 5.5H21M16.0557 5.5L15.3731 4.09173C14.9196 3.15626 14.6928 2.68852 14.3017 2.39681C14.215 2.3321 14.1231 2.27454 14.027 2.2247C13.5939 2 13.0741 2 12.0345 2C10.9688 2 10.436 2 9.99568 2.23412C9.8981 2.28601 9.80498 2.3459 9.71729 2.41317C9.32164 2.7167 9.10063 3.20155 8.65861 4.17126L8.05292 5.5",stroke:"currentColor",strokeLinecap:"round",strokeWidth:"1.5",key:"1"}],["path",{d:"M9.5 16.5L9.5 10.5",stroke:"currentColor",strokeLinecap:"round",strokeWidth:"1.5",key:"2"}],["path",{d:"M14.5 16.5L14.5 10.5",stroke:"currentColor",strokeLinecap:"round",strokeWidth:"1.5",key:"3"}]],ZQ=[["path",{d:"M15.5 17.5C16.5 19 17.3333 19.6667 18 20C19.3333 19.6667 22 18.2 22 15C22 11.8 20.6667 7.33333 20 5.5C18 4.3 15.8333 4 15 4L14.198 5.60393C13.4135 5.28708 12.4058 5.25438 12 5.27763C11.5942 5.25438 10.5865 5.28708 9.80197 5.60393L9 4C8.16667 4 6 4.3 4 5.5C3.33333 7.33333 2 11.8 2 15C2 18.2 4.66667 19.6667 6 20C6.66667 19.6667 7.5 19 8.5 17.5",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"0"}],["path",{d:"M17.3652 11.5C17.3652 12.6046 16.5817 13.5 15.6152 13.5C14.6487 13.5 13.8652 12.6046 13.8652 11.5C13.8652 10.3954 14.6487 9.5 15.6152 9.5C16.5817 9.5 17.3652 10.3954 17.3652 11.5Z",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"1"}],["path",{d:"M10 11.5C10 12.6046 9.2165 13.5 8.25 13.5C7.2835 13.5 6.5 12.6046 6.5 11.5C6.5 10.3954 7.2835 9.5 8.25 9.5C9.2165 9.5 10 10.3954 10 11.5Z",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"2"}],["path",{d:"M17.5 16.5C16.4022 17.3967 14.3502 18 12 18C9.64981 18 7.59785 17.3967 6.5 16.5",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"3"}]],c8=[["path",{d:"M2.99969 17.0002C2.99969 17.9302 2.99969 18.3952 3.10192 18.7767C3.37932 19.8119 4.18796 20.6206 5.22324 20.898C5.60474 21.0002 6.06972 21.0002 6.99969 21.0002L16.9997 21.0002C17.9297 21.0002 18.3947 21.0002 18.7762 20.898C19.8114 20.6206 20.6201 19.8119 20.8975 18.7767C20.9997 18.3952 20.9997 17.9302 20.9997 17.0002",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"0"}],["path",{d:"M16.4998 11.5002C16.4998 11.5002 13.1856 16.0002 11.9997 16.0002C10.8139 16.0002 7.49976 11.5002 7.49976 11.5002M11.9997 15.0002V3.00016",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"1"}]],YQ=[["path",{d:"M6 5C6.55228 5 7 5.44772 7 6C7 6.55228 6.55228 7 6 7C5.44772 7 5 6.55228 5 6C5 5.44772 5.44772 5 6 5Z",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"0"}],["path",{d:"M6 11C6.55228 11 7 11.4477 7 12C7 12.5523 6.55228 13 6 13C5.44772 13 5 12.5523 5 12C5 11.4477 5.44772 11 6 11Z",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"1"}],["path",{d:"M6 17C6.55228 17 7 17.4477 7 18C7 18.5523 6.55228 19 6 19C5.44772 19 5 18.5523 5 18C5 17.4477 5.44772 17 6 17Z",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"2"}],["path",{d:"M18 5C18.5523 5 19 5.44772 19 6C19 6.55228 18.5523 7 18 7C17.4477 7 17 6.55228 17 6C17 5.44772 17.4477 5 18 5Z",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"3"}],["path",{d:"M18 11C18.5523 11 19 11.4477 19 12C19 12.5523 18.5523 13 18 13C17.4477 13 17 12.5523 17 12C17 11.4477 17.4477 11 18 11Z",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"4"}],["path",{d:"M12 11C12.5523 11 13 11.4477 13 12C13 12.5523 12.5523 13 12 13C11.4477 13 11 12.5523 11 12C11 11.4477 11.4477 11 12 11Z",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"5"}],["path",{d:"M12 5C12.5523 5 13 5.44772 13 6C13 6.55228 12.5523 7 12 7C11.4477 7 11 6.55228 11 6C11 5.44772 11.4477 5 12 5Z",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"6"}],["path",{d:"M18 17C18.5523 17 19 17.4477 19 18C19 18.5523 18.5523 19 18 19C17.4477 19 17 18.5523 17 18C17 17.4477 17.4477 17 18 17Z",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"7"}],["path",{d:"M12 17C12.5523 17 13 17.4477 13 18C13 18.5523 12.5523 19 12 19C11.4477 19 11 18.5523 11 18C11 17.4477 11.4477 17 12 17Z",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"8"}]],XQ=[["path",{d:"M16.9459 3.17305C17.5332 2.58578 17.8268 2.29215 18.1521 2.15173C18.6208 1.94942 19.1521 1.94942 19.6208 2.15173C19.946 2.29215 20.2397 2.58578 20.8269 3.17305C21.4142 3.76032 21.7079 4.05395 21.8483 4.37925C22.0506 4.8479 22.0506 5.37924 21.8483 5.84789C21.7079 6.17319 21.4142 6.46682 20.8269 7.05409L15.8054 12.0757C14.5682 13.3129 13.9496 13.9315 13.1748 14.298C12.4 14.6645 11.5294 14.7504 9.78823 14.9222L9 15L9.07778 14.2118C9.24958 12.4706 9.33549 11.6 9.70201 10.8252C10.0685 10.0504 10.6871 9.43183 11.9243 8.19464L16.9459 3.17305Z",stroke:"currentColor",strokeLinejoin:"round",strokeWidth:"1.5",key:"0"}],["path",{d:"M6 15H3.75C2.7835 15 2 15.7835 2 16.75C2 17.7165 2.7835 18.5 3.75 18.5H13.25C14.2165 18.5 15 19.2835 15 20.25C15 21.2165 14.2165 22 13.25 22H11",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"1"}]],hv=[["path",{d:"M14.0737 3.88545C14.8189 3.07808 15.1915 2.6744 15.5874 2.43893C16.5427 1.87076 17.7191 1.85309 18.6904 2.39232C19.0929 2.6158 19.4769 3.00812 20.245 3.79276C21.0131 4.5774 21.3972 4.96972 21.6159 5.38093C22.1438 6.37312 22.1265 7.57479 21.5703 8.5507C21.3398 8.95516 20.9446 9.33578 20.1543 10.097L10.7506 19.1543C9.25288 20.5969 8.504 21.3182 7.56806 21.6837C6.63212 22.0493 5.6032 22.0224 3.54536 21.9686L3.26538 21.9613C2.63891 21.9449 2.32567 21.9367 2.14359 21.73C1.9615 21.5234 1.98636 21.2043 2.03608 20.5662L2.06308 20.2197C2.20301 18.4235 2.27297 17.5255 2.62371 16.7182C2.97444 15.9109 3.57944 15.2555 4.78943 13.9445L14.0737 3.88545Z",stroke:"currentColor",strokeLinejoin:"round",strokeWidth:"1.5",key:"0"}],["path",{d:"M13 4L20 11",stroke:"currentColor",strokeLinejoin:"round",strokeWidth:"1.5",key:"1"}],["path",{d:"M14 22L22 22",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"2"}]],JQ=[["path",{d:"M19 12L19 8.99996C19 7.11435 18.9999 6.17155 18.4142 5.58577C17.8284 4.99999 16.8856 4.99999 15 5L12 5.00001",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"0"}],["path",{d:"M5 12L5.00003 15C5.00004 16.8856 5.00005 17.8284 5.58584 18.4142C6.17163 19 7.11443 19 9.00004 19L12 19",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"1"}]],u8=[["path",{d:"M2 8C2 8 6.47715 3 12 3C17.5228 3 22 8 22 8",stroke:"currentColor",strokeLinecap:"round",strokeWidth:"1.5",key:"0"}],["path",{d:"M21.544 13.045C21.848 13.4713 22 13.6845 22 14C22 14.3155 21.848 14.5287 21.544 14.955C20.1779 16.8706 16.6892 21 12 21C7.31078 21 3.8221 16.8706 2.45604 14.955C2.15201 14.5287 2 14.3155 2 14C2 13.6845 2.15201 13.4713 2.45604 13.045C3.8221 11.1294 7.31078 7 12 7C16.6892 7 20.1779 11.1294 21.544 13.045Z",stroke:"currentColor",strokeWidth:"1.5",key:"1"}],["path",{d:"M15 14C15 12.3431 13.6569 11 12 11C10.3431 11 9 12.3431 9 14C9 15.6569 10.3431 17 12 17C13.6569 17 15 15.6569 15 14Z",stroke:"currentColor",strokeWidth:"1.5",key:"2"}]],d8=[["path",{d:"M13 20.8268V22H14.1734C14.5827 22 14.7874 22 14.9715 21.9238C15.1555 21.8475 15.3003 21.7028 15.5897 21.4134L20.4133 16.5894C20.6864 16.3164 20.8229 16.1799 20.8959 16.0327C21.0347 15.7525 21.0347 15.4236 20.8959 15.1434C20.8229 14.9961 20.6864 14.8596 20.4133 14.5866C20.1403 14.3136 20.0038 14.1771 19.8565 14.1041C19.5763 13.9653 19.2473 13.9653 18.9671 14.1041C18.8198 14.1771 18.6833 14.3136 18.4103 14.5866L18.4103 14.5866L13.5867 19.4106C13.2972 19.7 13.1525 19.8447 13.0762 20.0287C13 20.2128 13 20.4174 13 20.8268Z",stroke:"currentColor",strokeLinejoin:"round",strokeWidth:"1.5",key:"0"}],["path",{d:"M19 11C19 11 19 9.4306 18.8478 9.06306C18.6955 8.69552 18.4065 8.40649 17.8284 7.82843L13.0919 3.09188C12.593 2.593 12.3436 2.34355 12.0345 2.19575C11.9702 2.165 11.9044 2.13772 11.8372 2.11401C11.5141 2 11.1614 2 10.4558 2C7.21082 2 5.58831 2 4.48933 2.88607C4.26731 3.06508 4.06508 3.26731 3.88607 3.48933C3 4.58831 3 6.21082 3 9.45584V14C3 17.7712 3 19.6569 4.17157 20.8284C5.23467 21.8915 6.8857 21.99 10 21.9991M12 2.5V3C12 5.82843 12 7.24264 12.8787 8.12132C13.7574 9 15.1716 9 18 9H18.5",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"1"}]],QQ=[["path",{d:"M8 7H16.75C18.8567 7 19.91 7 20.6667 7.50559C20.9943 7.72447 21.2755 8.00572 21.4944 8.33329C22 9.08996 22 10.1433 22 12.25C22 15.7612 22 17.5167 21.1573 18.7779C20.7926 19.3238 20.3238 19.7926 19.7779 20.1573C18.5167 21 16.7612 21 13.25 21H12C7.28595 21 4.92893 21 3.46447 19.5355C2 18.0711 2 15.714 2 11V7.94427C2 6.1278 2 5.21956 2.38032 4.53806C2.65142 4.05227 3.05227 3.65142 3.53806 3.38032C4.21956 3 5.1278 3 6.94427 3C8.10802 3 8.6899 3 9.19926 3.19101C10.3622 3.62712 10.8418 4.68358 11.3666 5.73313L12 7",stroke:"currentColor",strokeLinecap:"round",strokeWidth:"1.5",key:"0"}]],eee=[["path",{d:"M13 21H12C7.28595 21 4.92893 21 3.46447 19.5355C2 18.0711 2 15.714 2 11V7.94427C2 6.1278 2 5.21956 2.38032 4.53806C2.65142 4.05227 3.05227 3.65142 3.53806 3.38032C4.21956 3 5.1278 3 6.94427 3C8.10802 3 8.6899 3 9.19926 3.19101C10.3622 3.62712 10.8418 4.68358 11.3666 5.73313L12 7M8 7H16.75C18.8567 7 19.91 7 20.6667 7.50559C20.9943 7.72447 21.2755 8.00572 21.4944 8.33329C21.9796 9.05942 21.9992 10.0588 22 12",stroke:"currentColor",strokeLinecap:"round",strokeWidth:"1.5",key:"0"}],["path",{d:"M18 13V21M22 17H14",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"1"}]],tee=[["path",{d:"M7 19H13C15.8284 19 17.2426 19 18.1213 18.1213C19 17.2426 19 15.8284 19 13V10M19 10C19.7002 10 21.0085 11.9943 21.5 12.5M19 10C18.2998 10 16.9915 11.9943 16.5 12.5",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"0"}],["path",{d:"M5 7L5 17",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"1"}],["circle",{cx:"5",cy:"5",r:"2",stroke:"currentColor",strokeWidth:"1.5",key:"2"}],["circle",{cx:"19",cy:"5",r:"2",stroke:"currentColor",strokeWidth:"1.5",key:"3"}],["circle",{cx:"5",cy:"19",r:"2",stroke:"currentColor",strokeWidth:"1.5",key:"4"}]],nee=[["path",{d:"M6 8C7.10457 8 8 7.10457 8 6C8 4.89543 7.10457 4 6 4C4.89543 4 4 4.89543 4 6C4 7.10457 4.89543 8 6 8Z",stroke:"currentColor",strokeWidth:"1.5",key:"0"}],["path",{d:"M12 20C13.1046 20 14 19.1046 14 18C14 16.8954 13.1046 16 12 16C10.8954 16 10 16.8954 10 18C10 19.1046 10.8954 20 12 20Z",stroke:"currentColor",strokeWidth:"1.5",key:"1"}],["path",{d:"M18 8C19.1046 8 20 7.10457 20 6C20 4.89543 19.1046 4 18 4C16.8954 4 16 4.89543 16 6C16 7.10457 16.8954 8 18 8Z",stroke:"currentColor",strokeWidth:"1.5",key:"2"}],["path",{d:"M6.01734 8.74067C6.01734 10.4142 5.77537 12.1995 9.22051 11.9855H12.0053M17.9929 8.57617C18.1259 11.9855 16.9199 11.7648 15.7861 11.9855H12.0053M12.0053 15.7001V11.9855",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"3"}]],ree=[["path",{d:"M6.51734 17.1132C6.91177 17.6905 8.10883 18.9228 9.74168 19.2333M9.86428 22C8.83582 21.8306 2 19.6057 2 12.0926C2 5.06329 8.0019 2 12.0008 2C15.9996 2 22 5.06329 22 12.0926C22 19.6057 15.1642 21.8306 14.1357 22C14.1357 22 13.9267 18.5826 14.0487 17.9969C14.1706 17.4113 13.7552 16.4688 13.7552 16.4688C14.7262 16.1055 16.2043 15.5847 16.7001 14.1874C17.0848 13.1032 17.3268 11.5288 16.2508 10.0489C16.2508 10.0489 16.5318 7.65809 15.9996 7.56548C15.4675 7.47287 13.8998 8.51192 13.8998 8.51192C13.4432 8.38248 12.4243 8.13476 12.0018 8.17939C11.5792 8.13476 10.5568 8.38248 10.1002 8.51192C10.1002 8.51192 8.53249 7.47287 8.00036 7.56548C7.46823 7.65809 7.74917 10.0489 7.74917 10.0489C6.67316 11.5288 6.91516 13.1032 7.2999 14.1874C7.79575 15.5847 9.27384 16.1055 10.2448 16.4688C10.2448 16.4688 9.82944 17.4113 9.95135 17.9969C10.0733 18.5826 9.86428 22 9.86428 22Z",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"0"}]],iee=[["path",{d:"M12.5 19L12.5 22",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"0"}],["path",{d:"M10.5 22H14.5",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"1"}],["circle",{cx:"7",cy:"7",r:"7",transform:"matrix(-1 0 0 1 20.5 2)",stroke:"currentColor",strokeLinecap:"round",strokeWidth:"1.5",key:"2"}],["path",{d:"M8.5 4C9.15431 4.0385 9.49236 4.35899 10.0735 4.97301C11.1231 6.08206 12.1727 6.1746 12.8724 5.80492C13.922 5.2504 13.04 4.35221 14.2719 3.86409C15.0748 3.54595 15.1868 2.68026 14.7399 2",stroke:"currentColor",strokeLinejoin:"round",strokeWidth:"1.5",key:"3"}],["path",{d:"M20 10C18.5 10 18.2338 11.2468 17 11C14.5 10.5 13.7916 11.0589 13.7916 12.2511C13.7916 13.4432 13.7916 13.4432 13.2717 14.3373C12.9335 14.9189 12.8153 15.5004 13.4894 16",stroke:"currentColor",strokeLinejoin:"round",strokeWidth:"1.5",key:"4"}],["path",{d:"M6.5 2C4.64864 3.79995 3.5 6.3082 3.5 9.08251C3.5 14.5598 7.97715 19 13.5 19C16.2255 19 18.6962 17.9187 20.5 16.165",stroke:"currentColor",strokeLinecap:"round",strokeWidth:"1.5",key:"5"}]],oee=[["path",{d:"M14 21L18 3",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"0"}],["path",{d:"M6 21L10 3",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"1"}],["path",{d:"M5 8H21",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"2"}],["path",{d:"M3 16H19",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"3"}]],see=[["circle",{cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"0"}],["path",{d:"M9.5 9.5C9.5 8.11929 10.6193 7 12 7C13.3807 7 14.5 8.11929 14.5 9.5C14.5 10.3569 14.0689 11.1131 13.4117 11.5636C12.7283 12.0319 12 12.6716 12 13.5",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"1"}],["path",{d:"M12.125 16.75H12M12.25 16.75C12.25 16.8881 12.1381 17 12 17C11.8619 17 11.75 16.8881 11.75 16.75C11.75 16.6119 11.8619 16.5 12 16.5C12.1381 16.5 12.25 16.6119 12.25 16.75Z",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"2"}]],f8=[["path",{d:"M14 19.5H13C10.1716 19.5 8.75736 19.5 7.87868 18.6213C7 17.7426 7 16.3284 7 13.5V11.5M7 8V11.5M7 11.5H14",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"0"}],["path",{d:"M14 11.5C14 10.3215 14 9.73223 14.3515 9.36612C14.7029 9 15.2686 9 16.4 9H17.6C18.7314 9 19.2971 9 19.6485 9.36612C20 9.73223 20 10.3215 20 11.5C20 12.6785 20 13.2678 19.6485 13.6339C19.2971 14 18.7314 14 17.6 14H16.4C15.2686 14 14.7029 14 14.3515 13.6339C14 13.2678 14 12.6785 14 11.5Z",stroke:"currentColor",strokeWidth:"1.5",key:"1"}],["path",{d:"M14 19.5C14 18.3215 14 17.7322 14.3515 17.3661C14.7029 17 15.2686 17 16.4 17H17.6C18.7314 17 19.2971 17 19.6485 17.3661C20 17.7322 20 18.3215 20 19.5C20 20.6785 20 21.2678 19.6485 21.6339C19.2971 22 18.7314 22 17.6 22H16.4C15.2686 22 14.7029 22 14.3515 21.6339C14 21.2678 14 20.6785 14 19.5Z",stroke:"currentColor",strokeWidth:"1.5",key:"2"}],["path",{d:"M5.28571 2H8.71429C10.7888 2 11 3.10993 11 5C11 6.89007 10.7888 8 8.71429 8H5.28571C3.2112 8 3 6.89007 3 5C3 3.10993 3.2112 2 5.28571 2Z",stroke:"currentColor",strokeWidth:"1.5",key:"3"}]],aee=[["path",{d:"M3 11.9896V14.5C3 17.7998 3 19.4497 4.02513 20.4749C5.05025 21.5 6.70017 21.5 10 21.5H14C17.2998 21.5 18.9497 21.5 19.9749 20.4749C21 19.4497 21 17.7998 21 14.5V11.9896C21 10.3083 21 9.46773 20.6441 8.74005C20.2882 8.01237 19.6247 7.49628 18.2976 6.46411L16.2976 4.90855C14.2331 3.30285 13.2009 2.5 12 2.5C10.7991 2.5 9.76689 3.30285 7.70242 4.90855L5.70241 6.46411C4.37533 7.49628 3.71179 8.01237 3.3559 8.74005C3 9.46773 3 10.3083 3 11.9896Z",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"0"}],["path",{d:"M15.0002 17C14.2007 17.6224 13.1504 18 12.0002 18C10.8499 18 9.79971 17.6224 9.00018 17",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"1"}]],lee=[["circle",{cx:"7.5",cy:"7.5",r:"1.5",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"0"}],["path",{d:"M2.5 12C2.5 7.52166 2.5 5.28249 3.89124 3.89124C5.28249 2.5 7.52166 2.5 12 2.5C16.4783 2.5 18.7175 2.5 20.1088 3.89124C21.5 5.28249 21.5 7.52166 21.5 12C21.5 16.4783 21.5 18.7175 20.1088 20.1088C18.7175 21.5 16.4783 21.5 12 21.5C7.52166 21.5 5.28249 21.5 3.89124 20.1088C2.5 18.7175 2.5 16.4783 2.5 12Z",stroke:"currentColor",strokeWidth:"1.5",key:"1"}],["path",{d:"M5 21C9.37246 15.775 14.2741 8.88406 21.4975 13.5424",stroke:"currentColor",strokeWidth:"1.5",key:"2"}]],cee=[["path",{d:"M14.5 7H9.5C6.21252 7 4.56878 7 3.46243 7.90796C3.25989 8.07418 3.07418 8.25989 2.90796 8.46243C2 9.56878 2 11.2125 2 14.5C2 17.7875 2 19.4312 2.90796 20.5376C3.07418 20.7401 3.25989 20.9258 3.46243 21.092C4.56878 22 6.21252 22 9.5 22H14.5C17.7875 22 19.4312 22 20.5376 21.092C20.7401 20.9258 20.9258 20.7401 21.092 20.5376C22 19.4312 22 17.7875 22 14.5C22 11.2125 22 9.56878 21.092 8.46243C20.9258 8.25989 20.7401 8.07418 20.5376 7.90796C19.4312 7 17.7875 7 14.5 7Z",stroke:"currentColor",strokeLinecap:"round",strokeWidth:"1.5",key:"0"}],["path",{d:"M12 7V5C12 4.44772 12.4477 4 13 4C13.5523 4 14 3.55228 14 3V2",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"1"}],["path",{d:"M7 12L8 12",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"2"}],["path",{d:"M11.5 12L12.5 12",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"3"}],["path",{d:"M16 12L17 12",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"4"}],["path",{d:"M7 17L17 17",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"5"}]],mv=[["path",{d:"M20.1088 3.89124C21.5 5.28249 21.5 7.52166 21.5 12C21.5 16.4783 21.5 18.7175 20.1088 20.1088C18.7175 21.5 16.4783 21.5 12 21.5C7.52166 21.5 5.28248 21.5 3.89124 20.1088C2.5 18.7175 2.5 16.4783 2.5 12C2.5 7.52166 2.5 5.28248 3.89124 3.89124C5.28249 2.5 7.52166 2.5 12 2.5C16.4783 2.5 18.7175 2.5 20.1088 3.89124Z",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"0"}],["path",{d:"M21.5 15L2.5 15",stroke:"currentColor",strokeWidth:"1.5",key:"1"}]],pv=[["path",{d:"M20.1088 20.1088C18.7175 21.5 16.4783 21.5 12 21.5C7.52166 21.5 5.28249 21.5 3.89124 20.1088C2.5 18.7175 2.5 16.4783 2.5 12C2.5 7.52166 2.5 5.28248 3.89124 3.89124C5.28249 2.5 7.52166 2.5 12 2.5C16.4783 2.5 18.7175 2.5 20.1088 3.89124C21.5 5.28249 21.5 7.52166 21.5 12C21.5 16.4783 21.5 18.7175 20.1088 20.1088Z",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"0"}],["path",{d:"M9 21.5L9 2.5",stroke:"currentColor",strokeWidth:"1.5",key:"1"}]],gv=[["path",{d:"M3.89124 3.89124C5.28249 2.5 7.52166 2.5 12 2.5C16.4783 2.5 18.7175 2.5 20.1088 3.89124C21.5 5.28249 21.5 7.52166 21.5 12C21.5 16.4783 21.5 18.7175 20.1088 20.1088C18.7175 21.5 16.4783 21.5 12 21.5C7.52166 21.5 5.28249 21.5 3.89124 20.1088C2.5 18.7175 2.5 16.4783 2.5 12C2.5 7.52166 2.5 5.28249 3.89124 3.89124Z",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"0"}],["path",{d:"M15 2.5L15 21.5",stroke:"currentColor",strokeWidth:"1.5",key:"1"}]],uee=[["path",{d:"M8 5.5L20 5.5",stroke:"currentColor",strokeLinecap:"round",strokeWidth:"1.5",key:"0"}],["path",{d:"M8 12.5L20 12.5",stroke:"currentColor",strokeLinecap:"round",strokeWidth:"1.5",key:"1"}],["path",{d:"M8 19.5L20 19.5",stroke:"currentColor",strokeLinecap:"round",strokeWidth:"1.5",key:"2"}],["path",{d:"M4.375 5.5H4.25M4.5 5.5C4.5 5.63807 4.38807 5.75 4.25 5.75C4.11193 5.75 4 5.63807 4 5.5C4 5.36193 4.11193 5.25 4.25 5.25C4.38807 5.25 4.5 5.36193 4.5 5.5Z",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"3"}],["path",{d:"M4.375 12.5H4.25M4.5 12.5C4.5 12.6381 4.38807 12.75 4.25 12.75C4.11193 12.75 4 12.6381 4 12.5C4 12.3619 4.11193 12.25 4.25 12.25C4.38807 12.25 4.5 12.3619 4.5 12.5Z",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"4"}],["path",{d:"M4.375 19.5H4.25M4.5 19.5C4.5 19.6381 4.38807 19.75 4.25 19.75C4.11193 19.75 4 19.6381 4 19.5C4 19.3619 4.11193 19.25 4.25 19.25C4.38807 19.25 4.5 19.3619 4.5 19.5Z",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"5"}]],dee=[["path",{d:"M9.14339 10.691L9.35031 10.4841C11.329 8.50532 14.5372 8.50532 16.5159 10.4841C18.4947 12.4628 18.4947 15.671 16.5159 17.6497L13.6497 20.5159C11.671 22.4947 8.46279 22.4947 6.48405 20.5159C4.50532 18.5372 4.50532 15.329 6.48405 13.3503L6.9484 12.886",stroke:"currentColor",strokeLinecap:"round",strokeWidth:"1.5",key:"0"}],["path",{d:"M17.0516 11.114L17.5159 10.6497C19.4947 8.67095 19.4947 5.46279 17.5159 3.48405C15.5372 1.50532 12.329 1.50532 10.3503 3.48405L7.48405 6.35031C5.50532 8.32904 5.50532 11.5372 7.48405 13.5159C9.46279 15.4947 12.671 15.4947 14.6497 13.5159L14.8566 13.309",stroke:"currentColor",strokeLinecap:"round",strokeWidth:"1.5",key:"1"}]],fee=[["path",{d:"M11.0991 3.00012C7.45013 3.00669 5.53932 3.09629 4.31817 4.31764C3.00034 5.63568 3.00034 7.75704 3.00034 11.9997C3.00034 16.2424 3.00034 18.3638 4.31817 19.6818C5.63599 20.9999 7.75701 20.9999 11.9991 20.9999C16.241 20.9999 18.3621 20.9999 19.6799 19.6818C20.901 18.4605 20.9906 16.5493 20.9972 12.8998",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"0"}],["path",{d:"M20.556 3.49612L11.0487 13.0586M20.556 3.49612C20.062 3.00151 16.7343 3.04761 16.0308 3.05762M20.556 3.49612C21.05 3.99074 21.0039 7.32273 20.9939 8.02714",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"1"}]],hee=[["path",{d:"M3.49994 11.7501L11.6717 3.57855C12.7762 2.47398 14.5672 2.47398 15.6717 3.57855C16.7762 4.68312 16.7762 6.47398 15.6717 7.57855M15.6717 7.57855L9.49994 13.7501M15.6717 7.57855C16.7762 6.47398 18.5672 6.47398 19.6717 7.57855C20.7762 8.68312 20.7762 10.474 19.6717 11.5785L12.7072 18.543C12.3167 18.9335 12.3167 19.5667 12.7072 19.9572L13.9999 21.2499",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"0"}],["path",{d:"M17.4999 9.74921L11.3282 15.921C10.2237 17.0255 8.43272 17.0255 7.32822 15.921C6.22373 14.8164 6.22373 13.0255 7.32822 11.921L13.4999 5.74939",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"1"}]],mee=[["path",{d:"M4 5L20 5",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"0"}],["path",{d:"M4 12L20 12",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"1"}],["path",{d:"M4 19L20 19",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"2"}]],pee=[["path",{d:"M20 12L4 12",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"0"}]],gee=[["path",{d:"M15.5 18C15.5 19.933 13.933 21.5 12 21.5C10.067 21.5 8.5 19.933 8.5 18",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"0"}],["path",{d:"M19.2311 18H4.76887C3.79195 18 3 17.208 3 16.2311C3 15.762 3.18636 15.3121 3.51809 14.9803L4.12132 14.3771C4.68393 13.8145 5 13.0514 5 12.2558V9.5C5 5.63401 8.13401 2.5 12 2.5C15.866 2.5 19 5.634 19 9.5V12.2558C19 13.0514 19.3161 13.8145 19.8787 14.3771L20.4819 14.9803C20.8136 15.3121 21 15.762 21 16.2311C21 17.208 20.208 18 19.2311 18Z",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"1"}]],vee=[["path",{d:"M15.2141 5.98239L16.6158 4.58063C17.39 3.80646 18.6452 3.80646 19.4194 4.58063C20.1935 5.3548 20.1935 6.60998 19.4194 7.38415L18.0176 8.78591M15.2141 5.98239L6.98023 14.2163C5.93493 15.2616 5.41226 15.7842 5.05637 16.4211C4.70047 17.058 4.3424 18.5619 4 20C5.43809 19.6576 6.94199 19.2995 7.57889 18.9436C8.21579 18.5877 8.73844 18.0651 9.78375 17.0198L18.0176 8.78591M15.2141 5.98239L18.0176 8.78591",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"0"}],["path",{d:"M11 20H17",stroke:"currentColor",strokeLinecap:"round",strokeWidth:"1.5",key:"1"}]],h8=[["path",{d:"M12 4V20M20 12H4",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"0"}]],m8=[["circle",{cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"0"}],["path",{d:"M12 6C13.0532 6 14.0879 6.27724 15 6.80385C15.9121 7.33046 16.6695 8.08788 17.1962 9C17.7228 9.91212 18 10.9468 18 12C18 13.0532 17.7228 14.0879 17.1962 15C16.6695 15.9121 15.9121 16.6695 15 17.1962C14.0879 17.7228 13.0532 18 12 18C10.9468 18 9.91211 17.7228 9 17.1962C8.08788 16.6695 7.33046 15.9121 6.80385 15L12 12L12 6Z",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"1"}]],yee=[["path",{d:"M20.0092 2V5.13219C20.0092 5.42605 19.6418 5.55908 19.4537 5.33333C17.6226 3.2875 14.9617 2 12 2C6.47715 2 2 6.47715 2 12C2 17.5228 6.47715 22 12 22C17.5228 22 22 17.5228 22 12",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"0"}]],bee=[["path",{d:"M3 13V8H21V13C21 16.7712 21 18.6569 19.8284 19.8284C18.6569 21 16.7712 21 13 21H11C7.22876 21 5.34315 21 4.17157 19.8284C3 18.6569 3 16.7712 3 13Z",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"0"}],["path",{d:"M3 8L3.86538 6.07692C4.53654 4.58547 4.87211 3.83975 5.55231 3.41987C6.23251 3 7.105 3 8.85 3H15.15C16.895 3 17.7675 3 18.4477 3.41987C19.1279 3.83975 19.4635 4.58547 20.1346 6.07692L21 8",stroke:"currentColor",strokeLinecap:"round",strokeWidth:"1.5",key:"1"}],["path",{d:"M12 8V3",stroke:"currentColor",strokeLinecap:"round",strokeWidth:"1.5",key:"2"}],["path",{d:"M8.5 13.5H14C15.1046 13.5 16 14.3954 16 15.5C16 16.6046 15.1046 17.5 14 17.5H13M10 11.5L8 13.5L10 15.5",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"3"}]],wee=[["path",{d:"M17 17L21 21",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"0"}],["path",{d:"M19 11C19 6.58172 15.4183 3 11 3C6.58172 3 3 6.58172 3 11C3 15.4183 6.58172 19 11 19C15.4183 19 19 15.4183 19 11Z",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"1"}]],kee=[["path",{d:"M2.5 9H6.5",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"0"}],["path",{d:"M2.5 14H6.5",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"1"}],["path",{d:"M2.5 4H18.5",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"2"}],["path",{d:"M18.5355 17.0355L21.5 20M20 13.5C20 10.7386 17.7614 8.5 15 8.5C12.2386 8.5 10 10.7386 10 13.5C10 16.2614 12.2386 18.5 15 18.5C17.7614 18.5 20 16.2614 20 13.5Z",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"3"}]],xee=[["path",{d:"M19 4H5C4.06812 4 3.60218 4 3.23463 4.15224C2.74458 4.35523 2.35523 4.74458 2.15224 5.23463C2 5.60218 2 6.06812 2 7C2 7.93188 2 8.39782 2.15224 8.76537C2.35523 9.25542 2.74458 9.64477 3.23463 9.84776C3.60218 10 4.06812 10 5 10H19C19.9319 10 20.3978 10 20.7654 9.84776C21.2554 9.64477 21.6448 9.25542 21.8478 8.76537C22 8.39782 22 7.93188 22 7C22 6.06812 22 5.60218 21.8478 5.23463C21.6448 4.74458 21.2554 4.35523 20.7654 4.15224C20.3978 4 19.9319 4 19 4Z",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"0"}],["path",{d:"M19 14H5C4.06812 14 3.60218 14 3.23463 14.1522C2.74458 14.3552 2.35523 14.7446 2.15224 15.2346C2 15.6022 2 16.0681 2 17C2 17.9319 2 18.3978 2.15224 18.7654C2.35523 19.2554 2.74458 19.6448 3.23463 19.8478C3.60218 20 4.06812 20 5 20H19C19.9319 20 20.3978 20 20.7654 19.8478C21.2554 19.6448 21.6448 19.2554 21.8478 18.7654C22 18.3978 22 17.9319 22 17C22 16.0681 22 15.6022 21.8478 15.2346C21.6448 14.7446 21.2554 14.3552 20.7654 14.1522C20.3978 14 19.9319 14 19 14Z",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"1"}],["path",{d:"M6.125 7H6M6.25 7C6.25 7.13807 6.13807 7.25 6 7.25C5.86193 7.25 5.75 7.13807 5.75 7C5.75 6.86193 5.86193 6.75 6 6.75C6.13807 6.75 6.25 6.86193 6.25 7Z",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"2"}],["path",{d:"M10.125 7H10M10.25 7C10.25 7.13807 10.1381 7.25 10 7.25C9.86193 7.25 9.75 7.13807 9.75 7C9.75 6.86193 9.86193 6.75 10 6.75C10.1381 6.75 10.25 6.86193 10.25 7Z",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"3"}],["path",{d:"M6.125 17H6M6.25 17C6.25 17.1381 6.13807 17.25 6 17.25C5.86193 17.25 5.75 17.1381 5.75 17C5.75 16.8619 5.86193 16.75 6 16.75C6.13807 16.75 6.25 16.8619 6.25 17Z",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"4"}],["path",{d:"M10.125 17H10M10.25 17C10.25 17.1381 10.1381 17.25 10 17.25C9.86193 17.25 9.75 17.1381 9.75 17C9.75 16.8619 9.86193 16.75 10 16.75C10.1381 16.75 10.25 16.8619 10.25 17Z",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"5"}]],See=[["path",{d:"M15.5 12C15.5 13.933 13.933 15.5 12 15.5C10.067 15.5 8.5 13.933 8.5 12C8.5 10.067 10.067 8.5 12 8.5C13.933 8.5 15.5 10.067 15.5 12Z",stroke:"currentColor",strokeWidth:"1.5",key:"0"}],["path",{d:"M21.011 14.0965C21.5329 13.9558 21.7939 13.8854 21.8969 13.7508C22 13.6163 22 13.3998 22 12.9669V11.0332C22 10.6003 22 10.3838 21.8969 10.2493C21.7938 10.1147 21.5329 10.0443 21.011 9.90358C19.0606 9.37759 17.8399 7.33851 18.3433 5.40087C18.4817 4.86799 18.5509 4.60156 18.4848 4.44529C18.4187 4.28902 18.2291 4.18134 17.8497 3.96596L16.125 2.98673C15.7528 2.77539 15.5667 2.66972 15.3997 2.69222C15.2326 2.71472 15.0442 2.90273 14.6672 3.27873C13.208 4.73448 10.7936 4.73442 9.33434 3.27864C8.95743 2.90263 8.76898 2.71463 8.60193 2.69212C8.43489 2.66962 8.24877 2.77529 7.87653 2.98663L6.15184 3.96587C5.77253 4.18123 5.58287 4.28891 5.51678 4.44515C5.45068 4.6014 5.51987 4.86787 5.65825 5.4008C6.16137 7.3385 4.93972 9.37763 2.98902 9.9036C2.46712 10.0443 2.20617 10.1147 2.10308 10.2492C2 10.3838 2 10.6003 2 11.0332V12.9669C2 13.3998 2 13.6163 2.10308 13.7508C2.20615 13.8854 2.46711 13.9558 2.98902 14.0965C4.9394 14.6225 6.16008 16.6616 5.65672 18.5992C5.51829 19.1321 5.44907 19.3985 5.51516 19.5548C5.58126 19.7111 5.77092 19.8188 6.15025 20.0341L7.87495 21.0134C8.24721 21.2247 8.43334 21.3304 8.6004 21.3079C8.76746 21.2854 8.95588 21.0973 9.33271 20.7213C10.7927 19.2644 13.2088 19.2643 14.6689 20.7212C15.0457 21.0973 15.2341 21.2853 15.4012 21.3078C15.5682 21.3303 15.7544 21.2246 16.1266 21.0133L17.8513 20.034C18.2307 19.8187 18.4204 19.711 18.4864 19.5547C18.5525 19.3984 18.4833 19.132 18.3448 18.5991C17.8412 16.6616 19.0609 14.6226 21.011 14.0965Z",stroke:"currentColor",strokeLinecap:"round",strokeWidth:"1.5",key:"1"}]],_ee=[["path",{d:"M9.39584 4.5H8.35417C5.40789 4.5 3.93475 4.5 3.01946 5.37868C2.10417 6.25736 2.10417 7.67157 2.10417 10.5V14.5C2.10417 17.3284 2.10417 18.7426 3.01946 19.6213C3.93475 20.5 5.40789 20.5 8.35417 20.5H12.5608C15.5071 20.5 16.9802 20.5 17.8955 19.6213C18.4885 19.052 18.6973 18.2579 18.7708 17",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"0"}],["path",{d:"M16.1667 7V3.85355C16.1667 3.65829 16.3316 3.5 16.535 3.5C16.6326 3.5 16.7263 3.53725 16.7954 3.60355L21.5275 8.14645C21.7634 8.37282 21.8958 8.67986 21.8958 9C21.8958 9.32014 21.7634 9.62718 21.5275 9.85355L16.7954 14.3964C16.7263 14.4628 16.6326 14.5 16.535 14.5C16.3316 14.5 16.1667 14.3417 16.1667 14.1464V11H13.1157C8.875 11 7.3125 14.5 7.3125 14.5V12C7.3125 9.23858 9.64435 7 12.5208 7H16.1667Z",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"1"}]],Cee=[["path",{d:"M18.7088 3.49534C16.8165 2.55382 14.5009 2 12 2C9.4991 2 7.1835 2.55382 5.29116 3.49534C4.36318 3.95706 3.89919 4.18792 3.4496 4.91378C3 5.63965 3 6.34248 3 7.74814V11.2371C3 16.9205 7.54236 20.0804 10.173 21.4338C10.9067 21.8113 11.2735 22 12 22C12.7265 22 13.0933 21.8113 13.8269 21.4338C16.4576 20.0804 21 16.9205 21 11.2371L21 7.74814C21 6.34249 21 5.63966 20.5504 4.91378C20.1008 4.18791 19.6368 3.95706 18.7088 3.49534Z",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"0"}]],p8=[["path",{d:"M2 12C2 8.25027 2 6.3754 2.95491 5.06107C3.26331 4.6366 3.6366 4.26331 4.06107 3.95491C5.3754 3 7.25027 3 11 3H13C16.7497 3 18.6246 3 19.9389 3.95491C20.3634 4.26331 20.7367 4.6366 21.0451 5.06107C22 6.3754 22 8.25027 22 12C22 15.7497 22 17.6246 21.0451 18.9389C20.7367 19.3634 20.3634 19.7367 19.9389 20.0451C18.6246 21 16.7497 21 13 21H11C7.25027 21 5.3754 21 4.06107 20.0451C3.6366 19.7367 3.26331 19.3634 2.95491 18.9389C2 17.6246 2 15.7497 2 12Z",stroke:"currentColor",strokeLinejoin:"round",strokeWidth:"1.5",key:"0"}],["path",{d:"M9.5 3.5L9.5 20.5",stroke:"currentColor",strokeLinejoin:"round",strokeWidth:"1.5",key:"1"}],["path",{d:"M5 7C5 7 5.91421 7 6.5 7",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"2"}],["path",{d:"M5 11H6.5",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"3"}],["path",{d:"M17 10L15.7735 11.0572C15.2578 11.5016 15 11.7239 15 12C15 12.2761 15.2578 12.4984 15.7735 12.9428L17 14",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"4"}]],Iee=[["path",{d:"M3.99963 5.00055L9.99963 5.00031",stroke:"currentColor",strokeLinecap:"round",strokeWidth:"1.5",key:"0"}],["path",{d:"M12.9996 5.00031L19.9996 5.00031",stroke:"currentColor",strokeLinecap:"round",strokeWidth:"1.5",key:"1"}],["path",{d:"M15.9996 9.00031L15.9996 15.0003",stroke:"currentColor",strokeLinecap:"round",strokeWidth:"1.5",key:"2"}],["path",{d:"M9.99963 2.00031L9.99963 8.00031",stroke:"currentColor",strokeLinecap:"round",strokeWidth:"1.5",key:"3"}],["path",{d:"M11.9996 16.0003L11.9996 22.0003",stroke:"currentColor",strokeLinecap:"round",strokeWidth:"1.5",key:"4"}],["path",{d:"M15.9996 12.0001L19.9996 12.0003",stroke:"currentColor",strokeLinecap:"round",strokeWidth:"1.5",key:"5"}],["path",{d:"M3.99963 12.0005L12.9996 12.0003",stroke:"currentColor",strokeLinecap:"round",strokeWidth:"1.5",key:"6"}],["path",{d:"M11.9996 19.0003L19.9996 19.0003",stroke:"currentColor",strokeLinecap:"round",strokeWidth:"1.5",key:"7"}],["path",{d:"M3.99963 19.0005L8.99963 19.0003",stroke:"currentColor",strokeLinecap:"round",strokeWidth:"1.5",key:"8"}]],g8=[["path",{d:"M15 2L15.5387 4.39157C15.9957 6.42015 17.5798 8.00431 19.6084 8.46127L22 9L19.6084 9.53873C17.5798 9.99569 15.9957 11.5798 15.5387 13.6084L15 16L14.4613 13.6084C14.0043 11.5798 12.4202 9.99569 10.3916 9.53873L8 9L10.3916 8.46127C12.4201 8.00431 14.0043 6.42015 14.4613 4.39158L15 2Z",stroke:"currentColor",strokeLinejoin:"round",strokeWidth:"1.5",key:"0"}],["path",{d:"M7 12L7.38481 13.7083C7.71121 15.1572 8.84275 16.2888 10.2917 16.6152L12 17L10.2917 17.3848C8.84275 17.7112 7.71121 18.8427 7.38481 20.2917L7 22L6.61519 20.2917C6.28879 18.8427 5.15725 17.7112 3.70827 17.3848L2 17L3.70827 16.6152C5.15725 16.2888 6.28879 15.1573 6.61519 13.7083L7 12Z",stroke:"currentColor",strokeLinejoin:"round",strokeWidth:"1.5",key:"1"}]],Tee=[["path",{d:"M2.5 12C2.5 7.52166 2.5 5.28249 3.89124 3.89124C5.28249 2.5 7.52166 2.5 12 2.5C16.4783 2.5 18.7175 2.5 20.1088 3.89124C21.5 5.28249 21.5 7.52166 21.5 12C21.5 16.4783 21.5 18.7175 20.1088 20.1088C18.7175 21.5 16.4783 21.5 12 21.5C7.52166 21.5 5.28249 21.5 3.89124 20.1088C2.5 18.7175 2.5 16.4783 2.5 12Z",stroke:"currentColor",strokeWidth:"1.5",key:"0"}],["path",{d:"M15 14V12C15 10.5858 15 9.87868 14.5607 9.43934C14.1213 9 13.4142 9 12 9H10M14 10L9 15",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"1"}]],Eee=[["path",{d:"M4 12C4 8.72077 4 7.08116 4.81382 5.91891C5.1149 5.48891 5.48891 5.1149 5.91891 4.81382C7.08116 4 8.72077 4 12 4C15.2792 4 16.9188 4 18.0811 4.81382C18.5111 5.1149 18.8851 5.48891 19.1862 5.91891C20 7.08116 20 8.72077 20 12C20 15.2792 20 16.9188 19.1862 18.0811C18.8851 18.5111 18.5111 18.8851 18.0811 19.1862C16.9188 20 15.2792 20 12 20C8.72077 20 7.08116 20 5.91891 19.1862C5.48891 18.8851 5.1149 18.5111 4.81382 18.0811C4 16.9188 4 15.2792 4 12Z",stroke:"currentColor",strokeWidth:"1.5",key:"0"}]],v8=[["path",{d:"M4.00004 17C4.00004 17 9.99999 12.5811 10 11C10 9.41884 4 5 4 5",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"0"}],["path",{d:"M12 19H20",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"1"}]],$ee=[["path",{d:"M3 3H21",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"0"}],["path",{d:"M13 9H21",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"1"}],["path",{d:"M3 15H21",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"2"}],["path",{d:"M13 21H21",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"3"}]],y8=[["path",{d:"M5 14.5C5 14.5 6.5 14.5 8.5 18C8.5 18 14.0588 8.83333 19 7",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"0"}]],s3e=[["path",{d:"M5 14L8.5 17.5L19 6.5",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"0"}]];var Aee=ee('<div data-component=icon><svg data-slot=icon-svg fill=none viewBox="0 0 24 24"aria-hidden=true>');const Lee={"align-right":$ee,sparkle:g8,globe:iee,"arrow-up":MQ,"arrow-left":n8,"arrow-right":r8,archive:EQ,"bubble-5":o8,prompt:RQ,brain:OQ,fork:nee,"bullet-list":uee,"check-small":y8,"chevron-down":AQ,"chevron-left":n8,"chevron-right":r8,"chevron-grabber-vertical":i8,"chevron-double-right":DQ,"circle-x":a8,close:s8,"close-small":s8,checklist:l8,console:BQ,ssh:IQ,terminal:v8,"terminal-active":v8,review:d8,"review-active":d8,expand:JQ,collapse:HQ,code:UQ,"code-lines":jQ,"circle-ban-sign":a8,"edit-small-2":hv,eye:u8,enter:bee,folder:QQ,"file-tree":f8,"file-tree-active":f8,"magnifying-glass":wee,"plus-small":h8,plus:h8,screenshot:PQ,"new-session":hv,"new-session-active":hv,"pencil-line":vee,mcp:hee,glasses:u8,"magnifying-glass-menu":kee,"window-cursor":GQ,task:l8,stop:Eee,status:m8,"status-active":m8,sidebar:p8,"sidebar-active":p8,"layout-left":pv,"layout-left-partial":pv,"layout-left-full":pv,"layout-right":gv,"layout-right-partial":gv,"layout-right-full":gv,"square-arrow-top-right":Tee,"open-file":fee,"speech-bubble":o8,comment:VQ,"folder-add-left":eee,home:aee,bell:gee,github:ree,discord:ZQ,"layout-bottom":mv,"layout-bottom-partial":mv,"layout-bottom-full":mv,"dot-grid":YQ,"circle-check":NQ,copy:qQ,check:y8,photo:lee,share:_ee,shield:Cee,download:c8,menu:mee,server:xee,branch:tee,edit:XQ,help:see,"settings-gear":See,dash:pee,"cloud-upload":zQ,trash:KQ,sliders:Iee,keyboard:cee,selector:i8,"arrow-down-to-line":c8,warning:TQ,reset:yee,link:dee,providers:WQ,models:g8,"arrow-undo-down":LQ,name:oee,"code-square":FQ,"data-transfer":$Q};function Ht(e){const[t,n]=se(e,["name","size","class","classList"]),r=F(()=>Dee(Lee[t.name]));return(()=>{var i=Aee(),o=i.firstChild;return jr(o,ne({get classList(){return{...t.classList,[t.class??""]:!!t.class}},get innerHTML(){return r()}},n),!0,!1),De(()=>Ye(i,"data-size",t.size||"normal")),i})()}const Dee=e=>{let t="";for(const[n,r]of e){t+=`<${n}`;for(const i in r){if(i==="key")continue;const o=r[i];t+=` ${Mee(i)}="${Oee(String(o))}"`}t+=" />"}return t},Mee=e=>{let t="";for(let n=0;n<e.length;n++){const r=e.charCodeAt(n);r>=65&&r<=90?(n!==0&&(t+="-"),t+=String.fromCharCode(r+32)):t+=e[n]}return t},Oee=e=>e.replace(/[&"<]/g,t=>t==="&"?"&amp;":t==='"'?"&quot;":"&lt;");function Jr(e){const[t,n]=se(e,["variant","size","iconSize","class","classList"]);return b(B2,ne(n,{"data-component":"icon-button",get"data-icon"(){return e.icon},get"data-size"(){return t.size||"normal"},get"data-variant"(){return t.variant||"secondary"},get classList(){return{...t.classList,[t.class??""]:!!t.class}},get children(){return b(Ht,{get name(){return e.icon},get size(){return t.iconSize??(t.size==="large"?"normal":"small")}})}}))}var Pee=ee("<div data-slot=toast-icon>"),Ree=ee("<div data-slot=toast-content>"),Nee=ee("<div data-slot=toast-actions>"),zee=ee("<button data-slot=toast-action>");function jee(e){return b(Os,{get children(){return b(Ds.Region,ne({"data-component":"toast-region"},e,{get children(){return b(Ds.List,{"data-slot":"toast-list"})}}))}})}function Fee(e){return b(Ds,ne({"data-component":"toast",get classList(){return{...e.classList,[e.class??""]:!!e.class}}},e))}function Uee(e){return(()=>{var t=Pee();return j(t,b(Ht,{get name(){return e.name}})),t})()}function Hee(e){return(()=>{var t=Ree();return jr(t,e,!1,!1),t})()}function Bee(e){return b(Ds.Title,ne({"data-slot":"toast-title"},e))}function Vee(e){return b(Ds.Description,ne({"data-slot":"toast-description"},e))}function qee(e){return(()=>{var t=Nee();return jr(t,e,!1,!1),t})()}function Wee(e){const t=Qo();return b(Ds.CloseButton,ne({"data-slot":"toast-close-button",as:Jr,icon:"close",variant:"ghost",get"aria-label"(){return t.t("ui.common.dismiss")}},e))}function Gee(e){return b(Ds.ProgressTrack,ne({"data-slot":"toast-progress-track"},e))}function Kee(e){return b(Ds.ProgressFill,ne({"data-slot":"toast-progress-fill"},e))}const Qs=Object.assign(Fee,{Region:jee,Icon:Uee,Content:Hee,Title:Bee,Description:Vee,Actions:qee,CloseButton:Wee,ProgressTrack:Gee,ProgressFill:Kee});function b8(e){if(e!=null){if(typeof e=="string")return e;if(typeof e=="number"||typeof e=="boolean")return String(e);if(e instanceof Error)return e.message;if(typeof e=="object"){const t=e;if(typeof t.message=="string")return t.message;if(typeof t.error=="string")return t.error;if(typeof t.title=="string")return t.title;try{const n=JSON.stringify(e);if(n&&n!=="{}")return n}catch{}return}return String(e)}}const w8=new Map;function $t(e){const t=typeof e=="string"?{description:e}:e,n={...t,title:b8(t.title),description:b8(t.description)};if(n.id){const i=w8.get(n.id);i!==void 0&&nl.dismiss(i)}const r=nl.show(i=>b(Qs,{get toastId(){return i.toastId},get duration(){return n.duration},get persistent(){return n.persistent},get"data-variant"(){return n.variant??"default"},get children(){return[b(ce,{get when(){return n.icon},get children(){return b(Qs.Icon,{get name(){return n.icon}})}}),b(Qs.Content,{get children(){return[b(ce,{get when(){return n.title},get children(){return b(Qs.Title,{get children(){return n.title}})}}),b(ce,{get when(){return n.description},get children(){return b(Qs.Description,{get children(){return n.description}})}}),b(ce,{get when(){return n.actions?.length},get children(){return b(Qs.Actions,{get children(){return n.actions.map(o=>(()=>{var s=zee();return s.$$click=()=>{typeof o.onClick=="function"&&o.onClick(),nl.dismiss(i.toastId)},j(s,()=>o.label),s})())}})}})]}}),b(Qs.CloseButton,{})]}}));return n.id&&w8.set(n.id,r),r}or(["click"]);async function Ww(e){if(!e)return!1;const t=globalThis.navigator?.clipboard;if(t)try{return await t.writeText(e),!0}catch{}if(typeof globalThis.document?.execCommand!="function")return!1;const n=globalThis.document.createElement("textarea");n.value=e,n.setAttribute("readonly","true"),n.style.position="fixed",n.style.left="-9999px",n.style.top="0",globalThis.document.body.append(n),n.select();try{return globalThis.document.execCommand("copy")}finally{n.remove()}}var Zee=ee("<div data-component=markdown>");const Yee=200,ra=new Map;typeof window<"u"&&_m.isSupported&&_m.addHook("afterSanitizeAttributes",e=>{if(!(e instanceof HTMLAnchorElement)||e.target!=="_blank")return;const t=e.getAttribute("rel")??"",n=new Set(t.split(/\s+/).filter(Boolean));n.add("noopener"),n.add("noreferrer"),e.setAttribute("rel",Array.from(n).join(" "))});const Xee={USE_PROFILES:{html:!0,mathMl:!0,svg:!0,svgFilters:!0},SANITIZE_NAMED_PROPS:!0,FORBID_TAGS:["style"],FORBID_CONTENTS:["style","script"],ADD_ATTR:["target","playsinline"]},wb={copy:'<path d="M6.2513 6.24935V2.91602H17.0846V13.7493H13.7513M13.7513 6.24935V17.0827H2.91797V6.24935H13.7513Z" stroke="currentColor" stroke-linecap="round"/>',check:'<path d="M5 11.9657L8.37838 14.7529L15 5.83398" stroke="currentColor" stroke-linecap="square"/>'};function Jee(e){return _m.isSupported?_m.sanitize(e,Xee):""}function oE(e){return e.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#39;")}function k8(e){return oE(e).replace(/\r\n?/g,`
2359
2359
  `).replace(/\n/g,"<br>")}const ja=new Map,Qee=200;function vv(e){const t=oE(e).replace(/\r\n?/g,`
2360
2360
  `);let n="",r="";const i=()=>{r&&(n+=`<span data-md-word>${r}</span>`,r="")};let o=0;for(;o<t.length;){const s=t[o];if(s==="&"){const a=t.indexOf(";",o);if(a!==-1&&a-o<=8){r+=t.slice(o,a+1),o=a+1;continue}}if(s===`
2361
- `){i(),n+="<br>",o++;continue}if(s===" "||s===" "){i(),n+=s,o++;continue}r+=s,o++}return i(),n}function ete(e){if(e.length<32)return vv(e);const t=Di(e);if(!t)return vv(e);const n=ja.get(t);if(n!==void 0)return ja.delete(t),ja.set(t,n),n;const r=vv(e);if(ja.set(t,r),ja.size>Qee){const i=ja.keys().next().value;i!==void 0&&ja.delete(i)}return r}const tte=/^https?:\/\/[^\s<>()`"']+$/;let Wh,nte=0;function rte(e){const t=e.trim().replace(/[),.;!?]+$/,"");if(tte.test(t))try{return new URL(t).toString()}catch{return}}function ite(){if(typeof window>"u"||typeof document>"u")return!1;const e=document.documentElement;if(e.dataset.theme&&/dark/i.test(e.dataset.theme)||e.classList.contains("dark")||e.classList.contains("theme-dark"))return!0;const t=getComputedStyle(e).getPropertyValue("--background-base").trim();if(t){const n=t.match(/^#([0-9a-fA-F]{3,8})$/);if(n){const r=n[1].length===3?n[1].split("").map(l=>l+l).join(""):n[1],i=parseInt(r.slice(0,2),16),o=parseInt(r.slice(2,4),16),s=parseInt(r.slice(4,6),16);if((.2126*i+.7152*o+.0722*s)/255<.5)return!0}}return typeof window.matchMedia=="function"?window.matchMedia("(prefers-color-scheme: dark)").matches:!1}function ote(){return Wh||(Wh=z(()=>import("./mermaid.core-B1DAMRyG.js").then(e=>e.bC),[]).then(e=>(e.default.initialize({startOnLoad:!1,securityLevel:"strict",theme:ite()?"dark":"default",themeVariables:{background:"transparent",fontFamily:"var(--font-family-sans)"}}),e.default)),Wh)}function ste(e){if(typeof window>"u")return"";let t;try{t=new DOMParser().parseFromString(e,"image/svg+xml")}catch{return""}if(t.querySelector("parsererror"))return"";const n=t.documentElement;if(!n||n.localName!=="svg")return"";const r=o=>{const s=o.trim();return!!(!s||s.startsWith("#")||/^https?:\/\//i.test(s)||s.startsWith("/"))},i=o=>{if(o.localName==="script"){o.remove();return}for(const s of Array.from(o.attributes)){const a=s.name.toLowerCase();if(a.startsWith("on")){o.removeAttribute(s.name);continue}(a==="href"||a==="xlink:href")&&(r(s.value)||o.removeAttribute(s.name))}for(const s of Array.from(o.children))i(s)};return i(n),new XMLSerializer().serializeToString(n)}function ate(e){if(e.dataset.language?.toLowerCase()==="mermaid")return!0;const t=e.querySelector("code"),n=`${e.className} ${t?.className??""}`;return/\blang(?:uage)?-mermaid\b/i.test(n)}const lte="astro|c|cc|cpp|cs|css|go|h|hpp|html|java|js|jsx|json|kt|lua|md|mdx|mjs|py|rs|scss|sh|sql|svelte|swift|toml|ts|tsx|txt|vue|yaml|yml",sE=`@?(?:(?:\\.{1,2}\\/|\\/)?(?:[\\w.$+@ -]+\\/)+[\\w.$+@ -]+\\.[A-Za-z0-9]{1,16}|[\\w.@+-]+\\.(?:${lte}))`,x8=new RegExp(`(^|[\\s([{"'])(${sE})(?::(\\d+)(?:-(\\d+))?)?`,"g"),cte=new RegExp(`^(${sE})(?::(\\d+)(?:-(\\d+))?)?$`);function Gw(e,t){if(!e)return;const n=Number(e);if(!Number.isInteger(n)||n<=0)return;const r=t?Number(t):void 0;return r!==void 0&&(!Number.isInteger(r)||r<=0)?{startLine:n}:{startLine:n,endLine:r}}function aE(e){return e.startsWith("@")?e.slice(1):e}function ute(e){const t=e.trim().match(cte);if(t?.[1])return{raw:e.trim(),path:aE(t[1]),index:0,end:e.trim().length,selection:Gw(t[2],t[3])}}function dte(e){const t=[];x8.lastIndex=0;let n;for(;n=x8.exec(e);){const r=n[1]??"",i=n[2];if(!i)continue;const o=n[0].slice(r.length);t.push({raw:o,path:aE(i),index:n.index+r.length,end:n.index+n[0].length,selection:Gw(n[3],n[4])})}return t}function kb(e,t){const n=document.createElement("div");n.setAttribute("data-component","icon"),n.setAttribute("data-size","small"),n.setAttribute("data-slot",t);const r=document.createElementNS("http://www.w3.org/2000/svg","svg");return r.setAttribute("data-slot","icon-svg"),r.setAttribute("fill","none"),r.setAttribute("viewBox","0 0 20 20"),r.setAttribute("aria-hidden","true"),r.innerHTML=e,n.appendChild(r),n}function S8(e){const t=document.createElement("button");return t.type="button",t.setAttribute("data-component","icon-button"),t.setAttribute("data-variant","secondary"),t.setAttribute("data-size","small"),t.setAttribute("data-slot","markdown-copy-button"),t.setAttribute("aria-label",e.copyCode),t.setAttribute("data-tooltip",e.copyCode),t.appendChild(kb(wb.copy,"copy-icon")),t.appendChild(kb(wb.check,"check-icon")),t}function D0(e,t,n){if(n){e.setAttribute("data-copied","true"),e.setAttribute("aria-label",t.copiedCode),e.setAttribute("data-tooltip",t.copiedCode);return}e.removeAttribute("data-copied"),e.setAttribute("aria-label",t.copyCode),e.setAttribute("data-tooltip",t.copyCode)}function fte(e,t){t&&(e.dataset.fileReferenceLineStart=String(t.startLine),t.endLine&&(e.dataset.fileReferenceLineEnd=String(t.endLine)))}function hte(e){const t=e.dataset.fileReferenceLineStart;if(t)return Gw(t,e.dataset.fileReferenceLineEnd)}function lE(e,t,n){const r=document.createElement("span");r.setAttribute("data-component","file-reference");const i=document.createElement("button");i.type="button",i.setAttribute("data-slot","file-reference-open"),i.dataset.fileReferencePath=e.path,i.title=e.path,fte(i,e.selection),i.textContent=t;const o=document.createElement("button");return o.type="button",o.setAttribute("data-component","icon-button"),o.setAttribute("data-variant","ghost"),o.setAttribute("data-size","small"),o.setAttribute("data-slot","file-reference-copy"),o.dataset.fileReferencePath=e.path,o.setAttribute("aria-label",n.copyPath),o.setAttribute("data-tooltip",n.copyPath),o.appendChild(kb(wb.copy,"copy-icon")),r.appendChild(i),r.appendChild(o),r}function mte(e,t){const n=e.parentElement;if(!n)return;if(!(n.getAttribute("data-component")==="markdown-code")){const o=document.createElement("div");o.setAttribute("data-component","markdown-code"),n.replaceChild(o,e),o.appendChild(e),o.appendChild(S8(t));return}const i=Array.from(n.querySelectorAll('[data-slot="markdown-copy-button"]')).filter(o=>o instanceof HTMLButtonElement);if(i.length===0){n.appendChild(S8(t));return}for(const o of i.slice(1))o.remove()}function pte(e){const t=Array.from(e.querySelectorAll(":not(pre) > code"));for(const n of t){const r=rte(n.textContent??""),i=n.parentElement instanceof HTMLAnchorElement&&n.parentElement.classList.contains("external-link")?n.parentElement:null;if(!r){i&&i.replaceWith(n);continue}if(i){i.href=r;continue}const o=document.createElement("a");o.href=r,o.className="external-link",o.target="_blank",o.rel="noopener noreferrer",n.parentNode?.replaceChild(o,n),o.appendChild(n)}}function gte(e,t){const n=Array.from(e.querySelectorAll(":not(pre) > code"));for(const r of n){if(r.closest('[data-component="file-reference"]')||r.parentElement instanceof HTMLAnchorElement)continue;const i=ute(r.textContent??"");i&&r.replaceWith(lE(i,r.textContent??i.raw,t))}}function vte(e,t){const n=document.createTreeWalker(e,NodeFilter.SHOW_TEXT,{acceptNode(o){const s=o.parentElement;return!s||!o.nodeValue?.trim()||s.closest('pre, code, a, button, [data-component="file-reference"]')?NodeFilter.FILTER_REJECT:NodeFilter.FILTER_ACCEPT}}),r=[];let i;for(;i=n.nextNode();)i instanceof Text&&r.push(i);for(const o of r){const s=dte(o.data);if(s.length===0)continue;const a=document.createDocumentFragment();let l=0;for(const c of s)c.index>l&&a.appendChild(document.createTextNode(o.data.slice(l,c.index))),a.appendChild(lE(c,c.raw,t)),l=c.end;l<o.data.length&&a.appendChild(document.createTextNode(o.data.slice(l))),o.replaceWith(a)}}function yte(e){const t=Array.from(e.querySelectorAll("pre")).filter(n=>n instanceof HTMLPreElement&&ate(n));for(const n of t){const r=n.parentElement,i=n.querySelector("code"),o=Di(i?.textContent??"");if(!r||!o)continue;r.setAttribute("data-mermaid","true"),r.dataset.mermaidHash=o,n.setAttribute("data-language","mermaid");const s=Array.from(r.children).find(l=>l instanceof HTMLElement&&l.getAttribute("data-component")==="mermaid-preview"),a=s??document.createElement("div");a.setAttribute("data-component","mermaid-preview"),a.setAttribute("role","img"),a.setAttribute("aria-label","Mermaid diagram"),a.dataset.mermaidHash=o,s||r.insertBefore(a,n)}}function bte(e,t){const n=Array.from(e.querySelectorAll("pre"));for(const r of n)mte(r,t);yte(e),pte(e),gte(e,t),vte(e,t)}function wte(e,t){const n=new Map,r=s=>{const a=t(),l=s.getAttribute("data-copied")==="true";D0(s,a,l)},i=async s=>{const a=s.target;if(!(a instanceof Element))return;const l=a.closest('[data-slot="markdown-copy-button"]');if(!(l instanceof HTMLButtonElement))return;const u=l.closest('[data-component="markdown-code"]')?.querySelector("code")?.textContent??"";if(!u||!await Ww(u))return;const d=t();$t({variant:"success",icon:"circle-check",title:d.copied,description:d.copiedCode}),D0(l,d,!0);const h=n.get(l);h&&clearTimeout(h);const f=setTimeout(()=>D0(l,d,!1),2e3);n.set(l,f)},o=Array.from(e.querySelectorAll('[data-slot="markdown-copy-button"]'));for(const s of o)s instanceof HTMLButtonElement&&r(s);return e.addEventListener("click",i),()=>{e.removeEventListener("click",i);for(const s of n.values())clearTimeout(s)}}function kte(e,t,n){const r=async i=>{const o=i.target;if(!(o instanceof Element))return;const s=o.closest('[data-slot="file-reference-copy"]');if(s instanceof HTMLElement){const u=s.dataset.fileReferencePath;if(!u||(i.preventDefault(),i.stopPropagation(),!await Ww(u)))return;const d=t();$t({variant:"success",icon:"circle-check",title:d.copied,description:d.copiedPath});return}const a=o.closest('[data-slot="file-reference-open"]');if(!(a instanceof HTMLElement))return;const l=a.dataset.fileReferencePath;if(!l)return;const c=n();c&&(i.preventDefault(),i.stopPropagation(),c(l,hte(a)))};return e.addEventListener("click",r),()=>e.removeEventListener("click",r)}function xte(e){const n=Array.from(e.querySelectorAll('[data-component="markdown-code"][data-mermaid="true"]')).filter(r=>r instanceof HTMLElement).filter(r=>{const i=r.dataset.mermaidHash,o=Array.from(r.children).find(s=>s instanceof HTMLElement&&s.getAttribute("data-component")==="mermaid-preview");return!i||!o||o.dataset.mermaidRendering===i?!1:o.dataset.mermaidRendered!==i});n.length!==0&&ote().then(r=>{for(const i of n){const o=i.dataset.mermaidHash,s=Array.from(i.children).find(l=>l instanceof HTMLElement&&l.getAttribute("data-component")==="mermaid-preview"),a=i.querySelector("pre code")?.textContent;!o||!s||!a||(s.dataset.mermaidRendering=o,i.dataset.mermaidState="pending",r.render(`markdown-mermaid-${o}-${nte++}`,a).then(l=>{if(i.dataset.mermaidHash!==o)return;const c=ste(l.svg);if(!c){delete s.dataset.mermaidRendering,i.dataset.mermaidState="error";return}s.innerHTML=c,l.bindFunctions?.(s),s.dataset.mermaidRendered=o,delete s.dataset.mermaidRendering,i.dataset.mermaidState="rendered"}).catch(()=>{i.dataset.mermaidHash===o&&(s.replaceChildren(),delete s.dataset.mermaidRendered,delete s.dataset.mermaidRendering,i.dataset.mermaidState="error")}))}}).catch(()=>{for(const r of n)r.dataset.mermaidState="error"})}function yv(e,t){if(ra.delete(e),ra.set(e,t),ra.size<=Yee)return;const n=ra.keys().next().value;n&&ra.delete(n)}function Gh(e){return e&&ZX(e)}function cE(e){const[t,n]=se(e,["text","cacheKey","streaming","class","classList"]),r=fY(),i=Qo(),o=qj(),[s,a]=de(),l=F(()=>{const p=Gh(t.text);if(!p)return"";const g=t.cacheKey??Di(p);if(!g)return;const v=fv(p,t.streaming??!1),y=[];for(let w=0;w<v.length;w++){const k=v[w],x=Di(k.raw);if(!x)return;const C=`${g}:${w}:${k.mode}`,S=ra.get(C);if(!S||S.hash!==x)return;yv(C,S),y.push(S.html)}return y.join("")}),c=F(()=>{if(!t.streaming)return;const p=Gh(t.text);if(!p)return;const g=t.cacheKey??Di(p);if(!g)return;const v=fv(p,!0);if(v.length===0)return;const y=[];let w=!1;for(let k=0;k<v.length;k++){const x=v[k],C=Di(x.raw);if(!C)return;const S=`${g}:${k}:${x.mode}`,$=ra.get(S);if($&&$.hash===C){y.push($.html);continue}y.push(ete(x.src)),w=!0}return w?y.join(""):void 0}),[u]=Xo(()=>l()!==void 0?null:{text:Gh(t.text),key:t.cacheKey,streaming:t.streaming??!1},async p=>{if(p===null||!p.text)return"";const g=p.key??Di(p.text);return Promise.all(fv(p.text,p.streaming).map(async(v,y)=>{const w=Di(v.raw),k=g?`${g}:${y}:${v.mode}`:w;if(k&&w){const S=ra.get(k);if(S&&S.hash===w)return yv(k,S),S.html}const x=await Promise.resolve(r.parse(v.src)),C=Jee(x);return k&&w&&yv(k,{hash:w,html:C}),C})).then(v=>v.join("")).catch(()=>k8(p.text))},{initialValue:k8(Gh(t.text))});let d,h,f,m;return re(()=>{const p=s(),g=l(),v=c(),y=u.latest??u(),w=t.text?g??y??v??"":"";if(!p)return;if(!w){f!==""&&(p.innerHTML="",f="");return}const k=i.t("ui.message.copyCode");if(w===f&&k===m)return;const x={copy:i.t("ui.message.copy"),copied:i.t("ui.message.copied"),copyCode:k,copiedCode:i.t("ui.message.copiedCode"),copyPath:i.t("ui.message.copyPath"),copiedPath:i.t("ui.message.copiedPath")};f=w,m=k;const C=document.createElement("div");C.innerHTML=w,bte(C,x),WX(p,C,{childrenOnly:!0,onBeforeElUpdated:(S,$)=>{if(S instanceof HTMLElement&&$ instanceof HTMLElement){if(S.getAttribute("data-component")==="mermaid-preview"&&$.getAttribute("data-component")==="mermaid-preview"&&S.dataset.mermaidHash===$.dataset.mermaidHash&&S.dataset.mermaidRendered===S.dataset.mermaidHash)return!1;S.getAttribute("data-component")==="markdown-code"&&$.getAttribute("data-component")==="markdown-code"&&S.dataset.mermaid==="true"&&S.dataset.mermaidHash===$.dataset.mermaidHash&&S.dataset.mermaidState&&($.dataset.mermaidState=S.dataset.mermaidState)}return S instanceof HTMLButtonElement&&$ instanceof HTMLButtonElement&&S.getAttribute("data-slot")==="markdown-copy-button"&&$.getAttribute("data-slot")==="markdown-copy-button"&&S.getAttribute("data-copied")==="true"&&D0($,x,!0),!S.isEqualNode($)}}),xte(p),d||(d=wte(p,()=>({copy:i.t("ui.message.copy"),copied:i.t("ui.message.copied"),copyCode:i.t("ui.message.copyCode"),copiedCode:i.t("ui.message.copiedCode"),copyPath:i.t("ui.message.copyPath"),copiedPath:i.t("ui.message.copiedPath")}))),h||(h=kte(p,()=>({copy:i.t("ui.message.copy"),copied:i.t("ui.message.copied"),copyCode:i.t("ui.message.copyCode"),copiedCode:i.t("ui.message.copiedCode"),copyPath:i.t("ui.message.copyPath"),copiedPath:i.t("ui.message.copiedPath")}),()=>o.open))}),fe(()=>{d&&d(),h&&h()}),(()=>{var p=Zee();return pr(a,p),jr(p,ne({get classList(){return{...t.classList,[t.class??""]:!!t.class}}},n),!1,!1),p})()}var Ste=ee('<div class="flex min-h-40 items-center justify-center px-6 py-4 text-center text-text-weak">'),_te=ee('<div class="flex min-h-56 flex-col items-center justify-center gap-2 px-6 py-10 text-center"><div class="text-14-semibold text-text-strong"></div><div class="text-14-regular text-text-weak">'),Cte=ee('<div class="flex justify-center bg-background-stronger px-6 py-4"><img class="max-h-[60vh] max-w-full rounded border border-border-weak-base bg-background-base object-contain">'),Ite=ee('<div class="flex justify-center bg-background-stronger px-6 py-4"><audio class="w-full max-w-xl"controls preload=metadata><source>'),Tte=ee('<div class="flex justify-center bg-background-stronger px-6 py-4"><video class="max-h-[70vh] max-w-full rounded border border-border-weak-base bg-background-base"controls preload=metadata><source>'),Ete=ee('<div class="bg-background-stronger px-6 py-4"><iframe class="block h-[80vh] w-full rounded border border-border-weak-base bg-background-base">'),$te=ee('<div class="flex flex-col gap-4 px-6 py-4">'),Ate=ee('<div class="flex justify-center"><img class="max-h-[60vh] max-w-full rounded border border-border-weak-base bg-background-base object-contain">'),Lte=ee('<div class="flex items-center justify-between gap-3 border-b border-border-weak-base px-6 py-2"><div class="text-12-regular text-text-weak truncate"></div><div class="flex items-center gap-1"><button type=button></button><button type=button>'),Dte=ee('<div class="mt-3 text-12-regular text-text-weak">'),Mte=ee('<div class="overflow-auto px-6 py-4 max-h-[70vh]"><table class="text-13-regular border-collapse w-full"><thead class="sticky top-0 bg-background-base z-10"><tr></tr></thead><tbody>'),zp=ee('<div class="flex flex-col">'),Ote=ee('<div class="px-6 py-6 text-text-weak">'),Pte=ee('<th class="border border-border-weak-base px-3 py-2 text-left text-12-semibold text-text-strong whitespace-nowrap">'),Rte=ee("<tr class=even:bg-background-stronger>"),Nte=ee('<td class="border border-border-weak-base px-3 py-1.5 align-top whitespace-pre-wrap">'),zte=ee('<div class="px-6 py-4 max-w-3xl mx-auto">'),jte=ee('<div class="bg-background-stronger px-6 py-4"><iframe sandbox title="html preview"class="block h-[70vh] w-full rounded border border-border-weak-base bg-white">'),Fte=ee('<div class="overflow-auto px-6 py-4 max-h-[70vh]">'),Ute=ee('<div class="text-13-regular text-text-weak">'),Hte=ee('<span class=text-syntax-property>"<!>"'),Bte=ee("<div><span class=text-syntax-keyword>null"),Vte=ee('<div><span class=text-syntax-string>"<!>"'),qte=ee("<div><span class=text-syntax-keyword>"),Wte=ee("<details class=cursor-pointer><summary><span class=text-text-weak>[ <!> ]"),Gte=ee("<details class=cursor-pointer><summary><span class=text-text-weak>"),Kte=ee("<div><span class=text-text-weak>");const bv=new Set(["image","audio","video","pdf"]);function _8(e){return e.current!==void 0?e.current:e.after??e.before}function C8(e){const t=Qo(),n=()=>e.media,r=F(()=>{const k=n();if(!(!k||k.mode==="off"))return nX(k.path)}),i=F(()=>{const k=n();return!k||k.mode==="off"||r()?!1:rX(k.current)}),o=()=>e.media?.onLoad?.(),s=F(()=>{const k=n(),x=r();return!k||!x?!1:k.deleted?!0:x==="svg"||k.current!==void 0?!1:!iv(k.after)&&iv(k.before)}),a=F(()=>{const k=n(),x=r();if(!(!k||!bv.has(x)))return rv(_8(k),x)}),l=F(()=>{const k=n(),x=r();if(!(!k||!bv.has(x))&&k.current===void 0&&!s()&&!a()&&!(!k.path||!k.readFile))return{key:`${x}:${k.path}`,kind:x,path:k.path,readFile:k.readFile,onError:k.onError}}),[c]=Xo(l,async k=>k.readFile(k.path).then(x=>{const C=rv(x,k.kind);return C?{key:k.key,src:C,mime:k.kind==="audio"||k.kind==="video"?Uw(x?.mimeType):void 0}:(k.onError?.({kind:k.kind}),{key:k.key,error:!0})},()=>(k.onError?.({kind:k.kind}),{key:k.key,error:!0}))),u=F(()=>{const k=l(),x=c();if(!(!k||!x||x.key!==k.key))return x}),d=F(()=>{const k=u();return a()??(k&&"src"in k?k.src:void 0)}),h=F(()=>a()?"ready":l()?c.loading?"loading":u()?.error?"error":d()?"ready":"idle":"idle"),f=F(()=>{const k=u();return k&&"mime"in k?k.mime:void 0}),m=F(()=>{const k=n();if(!(!k||r()!=="svg"))return oX(k.current)}),p=F(()=>{const k=n();if(!(!k||r()!=="svg"))return rv(k.current,"svg")}),g=F(()=>{const k=n();if(!(!k||r()!=="svg")&&m()===void 0&&iv(k.current))return[k.path,k.current]});re(gt(g,k=>{k&&n()?.onError?.({kind:"svg"})},{defer:!0}));const v=F(()=>{const k=n(),x=r();if(k&&!(x!=="table"&&x!=="html"&&x!=="markdown"&&x!=="json"))return sX(_8(k))}),y=k=>{const x=`ui.fileMedia.kind.${k}`;return t.t(x)},w=k=>(()=>{var x=Ste();return j(x,k),x})();return b(Il,{get children(){return[b(Cn,{get when(){return r()==="image"||r()==="audio"||r()==="video"||r()==="pdf"},get children(){return b(ce,{get when(){return d()},keyed:!0,get fallback(){const k=n(),x=r();if(!k||!x||!bv.has(x))return e.fallback();const C=y(x);return s()?w(t.t("ui.fileMedia.state.removed",{kind:C})):h()==="loading"?w(t.t("ui.fileMedia.state.loading",{kind:C})):h()==="error"?w(t.t("ui.fileMedia.state.error",{kind:C})):w(t.t("ui.fileMedia.state.unavailable",{kind:C}))},children:k=>{const x=r();return x==="image"?(()=>{var C=Cte(),S=C.firstChild;return S.addEventListener("load",o),Ye(S,"src",k),De(()=>Ye(S,"alt",n()?.path)),C})():x==="audio"?(()=>{var C=Ite(),S=C.firstChild,$=S.firstChild;return S.addEventListener("loadedmetadata",o),Ye($,"src",k),De(()=>Ye($,"type",f())),C})():x==="video"?(()=>{var C=Tte(),S=C.firstChild,$=S.firstChild;return S.addEventListener("loadedmetadata",o),Ye($,"src",k),De(()=>Ye($,"type",f())),C})():x==="pdf"?(()=>{var C=Ete(),S=C.firstChild;return S.addEventListener("load",o),Ye(S,"src",k),De(()=>Ye(S,"title",n()?.path??"pdf")),C})():e.fallback()}})}}),b(Cn,{get when(){return r()==="svg"},get children(){return m()===void 0&&p()==null?e.fallback():(()=>{var k=$te();return j(k,b(ce,{get when(){return m()!==void 0},get children(){return e.fallback()}}),null),j(k,b(ce,{get when(){return p()},keyed:!0,children:x=>(()=>{var C=Ate(),S=C.firstChild;return S.addEventListener("load",o),Ye(S,"src",x),De(()=>Ye(S,"alt",n()?.path)),C})()}),null),k})()}}),b(Cn,{get when(){return r()==="table"},get children(){return b(ce,{get when(){return v()},keyed:!0,get fallback(){return e.fallback()},children:k=>b(Zte,{get path(){return n()?.path},text:k,get fallback(){return e.fallback},onReady:o})})}}),b(Cn,{get when(){return r()==="markdown"},get children(){return b(ce,{get when(){return v()},keyed:!0,get fallback(){return e.fallback()},children:k=>b(Yte,{get path(){return n()?.path},text:k,get fallback(){return e.fallback},onReady:o})})}}),b(Cn,{get when(){return r()==="html"},get children(){return b(ce,{get when(){return v()},keyed:!0,get fallback(){return e.fallback()},children:k=>b(Xte,{text:k,get fallback(){return e.fallback},onReady:o})})}}),b(Cn,{get when(){return r()==="json"},get children(){return b(ce,{get when(){return v()},keyed:!0,get fallback(){return e.fallback()},children:k=>b(Jte,{text:k,get fallback(){return e.fallback},onReady:o})})}}),b(Cn,{get when(){return i()},get children(){var k=_te(),x=k.firstChild,C=x.nextSibling;return j(x,()=>n()?.path?.split("/").pop()??t.t("ui.fileMedia.binary.title")),j(C,()=>{const S=n()?.path;return S?t.t("ui.fileMedia.binary.description.path",{path:S}):t.t("ui.fileMedia.binary.description.default")}),k}}),b(Cn,{when:!0,get children(){return e.fallback()}})]}})}function jp(e){const t=n=>{const r="px-2 py-1 text-12-medium rounded transition-colors";return e.active===n?`${r} bg-background-base text-text-strong border border-border-weak-base`:`${r} text-text-weak hover:text-text-strong`};return(()=>{var n=Lte(),r=n.firstChild,i=r.nextSibling,o=i.firstChild,s=o.nextSibling;return j(r,()=>e.label),o.$$click=()=>e.onChange("preview"),j(o,()=>e.previewLabel),s.$$click=()=>e.onChange("source"),j(s,()=>e.sourceLabel),De(a=>{var l=t("preview"),c=t("source");return l!==a.e&&Bo(o,a.e=l),c!==a.t&&Bo(s,a.t=c),a},{e:void 0,t:void 0}),n})()}function Zte(e){const t=Qo(),[n,r]=de("preview"),i=F(()=>{const s=cX(e.path,e.text);return lX(e.text,s)}),o=F(()=>i().headers.length===0&&i().rows.length===0);return re(()=>{i(),requestAnimationFrame(e.onReady)}),(()=>{var s=zp();return j(s,b(jp,{get label(){return t.t("ui.fileMedia.table.summary",{rows:i().rows.length,cols:i().headers.length})},get active(){return n()},onChange:r,get previewLabel(){return t.t("ui.fileMedia.toggle.preview")},get sourceLabel(){return t.t("ui.fileMedia.toggle.source")}}),null),j(s,b(ce,{get when(){return n()==="preview"},get fallback(){return e.fallback()},get children(){return b(ce,{get when(){return!o()},get fallback(){return(()=>{var a=Ote();return j(a,()=>t.t("ui.fileMedia.table.empty")),a})()},get children(){var a=Mte(),l=a.firstChild,c=l.firstChild,u=c.firstChild,d=c.nextSibling;return j(u,b(Ut,{get each(){return i().headers},children:(h,f)=>(()=>{var m=Pte();return j(m,()=>h||`#${f()+1}`),m})()})),j(d,b(Ut,{get each(){return i().rows},children:h=>(()=>{var f=Rte();return j(f,b(Ut,{get each(){return i().headers},children:(m,p)=>(()=>{var g=Nte();return j(g,()=>h[p()]??""),g})()})),f})()})),j(a,b(ce,{get when(){return i().truncated},get children(){var h=Dte();return j(h,()=>t.t("ui.fileMedia.table.truncated")),h}}),null),a}})}}),null),s})()}function Yte(e){const t=Qo(),[n,r]=de("preview");return re(()=>{e.text,requestAnimationFrame(e.onReady)}),(()=>{var i=zp();return j(i,b(jp,{get label(){return e.path??"markdown"},get active(){return n()},onChange:r,get previewLabel(){return t.t("ui.fileMedia.toggle.preview")},get sourceLabel(){return t.t("ui.fileMedia.toggle.source")}}),null),j(i,b(ce,{get when(){return n()==="preview"},get fallback(){return e.fallback()},get children(){var o=zte();return j(o,b(cE,{get text(){return e.text}})),o}}),null),i})()}function Xte(e){const t=Qo(),[n,r]=de("preview");return(()=>{var i=zp();return j(i,b(jp,{get label(){return t.t("ui.fileMedia.html.label")},get active(){return n()},onChange:r,get previewLabel(){return t.t("ui.fileMedia.toggle.preview")},get sourceLabel(){return t.t("ui.fileMedia.toggle.source")}}),null),j(i,b(ce,{get when(){return n()==="preview"},get fallback(){return e.fallback()},get children(){var o=jte(),s=o.firstChild;return Vo(s,"load",e.onReady),De(()=>Ye(s,"srcdoc",e.text)),o}}),null),i})()}function Jte(e){const t=Qo(),[n,r]=de("preview"),i=F(()=>{try{return{ok:!0,value:JSON.parse(Qte(e.text))}}catch(o){return{ok:!1,message:o instanceof Error?o.message:String(o)}}});return re(()=>{i(),requestAnimationFrame(e.onReady)}),(()=>{var o=zp();return j(o,b(jp,{get label(){return t.t("ui.fileMedia.json.label")},get active(){return n()},onChange:r,get previewLabel(){return t.t("ui.fileMedia.toggle.preview")},get sourceLabel(){return t.t("ui.fileMedia.toggle.source")}}),null),j(o,b(ce,{get when(){return n()==="preview"},get fallback(){return e.fallback()},get children(){var s=Fte();return j(s,b(ce,{get when(){return i().ok},get fallback(){return(()=>{var a=Ute();return j(a,()=>t.t("ui.fileMedia.json.invalid",{message:i().ok?"":i().message})),a})()},get children(){return b(xb,{get value(){return i().value},depth:0})}})),s}}),null),o})()}function Qte(e){return e.replace(/\/\*[\s\S]*?\*\//g,"").replace(/(^|[^:])\/\/.*$/gm,"$1").replace(/,\s*([\]}])/g,"$1")}function xb(e){const t=()=>" ".repeat(e.depth),n=()=>e.name!==void 0?(()=>{var r=Hte(),i=r.firstChild,o=i.nextSibling;return o.nextSibling,j(r,()=>e.name,o),r})():null;if(e.value===null)return(()=>{var r=Bte(),i=r.firstChild;return j(r,t,i),j(r,n,i),j(r,()=>e.name!==void 0?": ":"",i),r})();if(typeof e.value=="string")return(()=>{var r=Vte(),i=r.firstChild,o=i.firstChild,s=o.nextSibling;return s.nextSibling,j(r,t,i),j(r,n,i),j(r,()=>e.name!==void 0?": ":"",i),j(i,()=>e.value,s),r})();if(typeof e.value=="number"||typeof e.value=="boolean")return(()=>{var r=qte(),i=r.firstChild;return j(r,t,i),j(r,n,i),j(r,()=>e.name!==void 0?": ":"",i),j(i,()=>String(e.value)),r})();if(Array.isArray(e.value))return(()=>{var r=Wte(),i=r.firstChild,o=i.firstChild,s=o.firstChild,a=s.nextSibling;return a.nextSibling,j(i,t,o),j(i,n,o),j(i,()=>e.name!==void 0?": ":"",o),j(o,()=>e.value.length,a),j(r,b(Ut,{get each(){return e.value},children:l=>b(xb,{value:l,get depth(){return e.depth+1}})}),null),De(()=>r.open=e.depth<2),r})();if(typeof e.value=="object"){const r=Object.entries(e.value);return(()=>{var i=Gte(),o=i.firstChild,s=o.firstChild;return j(o,t,s),j(o,n,s),j(o,()=>e.name!==void 0?": ":"",s),j(s,()=>`{ ${r.length} }`),j(i,b(Ut,{each:r,children:([a,l])=>b(xb,{name:a,value:l,get depth(){return e.depth+1}})}),null),De(()=>i.open=e.depth<2),i})()}return(()=>{var r=Kte(),i=r.firstChild;return j(r,t,i),j(i,()=>String(e.value)),r})()}or(["click"]);var ene=ee('<div class="fixed z-50 flex h-8 items-center gap-2 rounded-md border border-border-base bg-background-base px-3 shadow-md"><input class="w-40 bg-transparent outline-none text-14-regular text-text-strong placeholder:text-text-weak"><div class="shrink-0 text-12-regular text-text-weak tabular-nums text-right"style=width:10ch></div><div class="flex items-center"><button type=button class="size-6 grid place-items-center rounded text-text-weak hover:bg-surface-base-hover hover:text-text-strong disabled:opacity-40 disabled:pointer-events-none"></button><button type=button class="size-6 grid place-items-center rounded text-text-weak hover:bg-surface-base-hover hover:text-text-strong disabled:opacity-40 disabled:pointer-events-none"></button></div><button type=button class="size-6 grid place-items-center rounded text-text-weak hover:bg-surface-base-hover hover:text-text-strong">');function tne(e){const t=Qo();return b(Os,{get children(){var n=ene(),r=n.firstChild,i=r.nextSibling,o=i.nextSibling,s=o.firstChild,a=s.nextSibling,l=o.nextSibling;n.$$pointerdown=u=>u.stopPropagation(),j(n,b(Ht,{name:"magnifying-glass",size:"small",class:"text-text-weak shrink-0"}),r),r.$$keydown=u=>e.onKeyDown(u),r.$$input=u=>e.onInput(u.currentTarget.value);var c=e.setInput;return typeof c=="function"?pr(c,r):e.setInput=r,j(i,(()=>{var u=je(()=>!!e.count());return()=>u()?`${e.index()+1}/${e.count()}`:"0/0"})()),Vo(s,"click",e.onPrev,!0),j(s,b(Ht,{name:"chevron-down",size:"small",class:"rotate-180"})),Vo(a,"click",e.onNext,!0),j(a,b(Ht,{name:"chevron-down",size:"small"})),Vo(l,"click",e.onClose,!0),j(l,b(Ht,{name:"close-small",size:"small"})),De(u=>{var d=`${e.pos().top}px`,h=`${e.pos().right}px`,f=t.t("ui.fileSearch.placeholder"),m=e.count()===0,p=t.t("ui.fileSearch.previousMatch"),g=e.count()===0,v=t.t("ui.fileSearch.nextMatch"),y=t.t("ui.fileSearch.close");return d!==u.e&&Xr(n,"top",u.e=d),h!==u.t&&Xr(n,"right",u.t=h),f!==u.a&&Ye(r,"placeholder",u.a=f),m!==u.o&&(s.disabled=u.o=m),p!==u.i&&Ye(s,"aria-label",u.i=p),g!==u.n&&(a.disabled=u.n=g),v!==u.s&&Ye(a,"aria-label",u.s=v),y!==u.h&&Ye(l,"aria-label",u.h=y),u},{e:void 0,t:void 0,a:void 0,o:void 0,i:void 0,n:void 0,s:void 0,h:void 0}),De(()=>r.value=e.query()),n}})}or(["pointerdown","input","keydown","click"]);var nne=ee('<div data-component=file class="relative outline-none"tabindex=0><div></div><div class="pointer-events-none absolute inset-0 z-0">');const rne=5e5,ine={...Nw,lineHeight:24,fileGap:0},uE=["mode","media","class","classList","annotations","selectedLines","commentedLines","search","onLineSelected","onLineSelectionEnd","onLineNumberSelectionEnd","onRendered","preloadedDiff"],one=["file",...uE],sne=["fileDiff","before","after",...uE];function ane(e){let t,n,r,i,o,s,a,l=!1,c=null,u=!1;const d=EY(),h=OY(),[f,m]=de(0),p=()=>$Y(n),g=()=>LT(n),v=TY({wrapper:()=>t,overlay:()=>r,getRoot:p}),y=()=>{i===void 0&&(i=requestAnimationFrame(()=>{i=void 0;const $=u;e.updateSelection($),u&&(u=!1,e.onLineSelectionEnd(c))}))},w=()=>{o===void 0&&(o=requestAnimationFrame(()=>{o=void 0;const $=e.buildDragSelection();$&&e.setSelectedLines($)}))},k=$=>{if(!e.enableLineSelection()||$.button!==0)return;const O=e.lineFromMouseEvent($);if(O.numberColumn){h.begin(!0,O.line);return}O.line!==void 0&&(h.begin(!1,O.line),s=O.line,a=O.line,l=!1,e.onDragStart(O))},x=$=>{if(!e.enableLineSelection())return;const O=e.lineFromMouseEvent($);if(!h.track($.buttons,O.line)&&s!==void 0){if(($.buttons&1)===0){s=void 0,a=void 0,l=!1,e.onDragReset(),h.finish();return}O.line!==void 0&&(a=O.line,l=!0,e.onDragMove(O),w())}},C=()=>{if(e.enableLineSelection()&&h.finish()!=="numbers"&&s!==void 0){if(!l){u=!1;const $=e.buildClickSelection();$&&e.setSelectedLines($),e.onLineSelectionEnd(c),s=void 0,a=void 0,l=!1,e.onDragReset();return}u=!0,w(),y(),s=void 0,a=void 0,l=!1,e.onDragReset()}},S=()=>{if(!e.enableLineSelection()||s===void 0)return;const $=window.getSelection();!$||$.isCollapsed||y()};return Kt(()=>{fe(AY(g))}),re(()=>{f();const $=e.commentedLines();requestAnimationFrame(()=>{const O=p();O&&e.markCommented(O,$)})}),re(()=>{e.setSelectedLines(e.selectedLines()??null)}),re(()=>{e.enableLineSelection()&&(Ln(n,"mousedown",k),Ln(n,"mousemove",x),Ln(window,"mouseup",C),Ln(document,"selectionchange",S))}),fe(()=>{$d(d),i!==void 0&&cancelAnimationFrame(i),o!==void 0&&cancelAnimationFrame(o),i=void 0,o=void 0,s=void 0,a=void 0,l=!1,h.reset(),c=null,u=!1}),{get wrapper(){return t},set wrapper($){t=$},get container(){return n},set container($){n=$},get overlay(){return r},set overlay($){r=$},get dragStart(){return s},get dragEnd(){return a},get lastSelection(){return c},set lastSelection($){c=$},ready:d,bridge:h,rendered:f,setRendered:m,getRoot:p,getHost:g,find:v,scheduleSelectionUpdate:y}}function dE(e,t){return ane({enableLineSelection:e.enableLineSelection,selectedLines:e.selectedLines,commentedLines:()=>e.commentedLines()??[],onLineSelectionEnd:e.onLineSelectionEnd,...t})}function fE(e){re(()=>{const t=e.search();if(!t)return;const n={focus:()=>e.find.focus()};t.register(n),fe(()=>t.register(null))})}function hE(e){const t=n=>{if(!e.normalize)return n;const r=e.normalize(n);return r!==void 0?r:n};return{onLineSelected:n=>{const r=t(n);e.viewer.lastSelection=r,e.onLineSelected?.(r)},onLineSelectionEnd:n=>{const r=t(n);e.viewer.lastSelection=r,e.onLineSelectionEnd?.(r),e.viewer.bridge.consume(r)&&requestAnimationFrame(()=>e.onLineNumberSelectionEnd?.(r))}}}function mE(e){re(()=>{e.viewer.rendered();const t=e.current();t&&(t.setLineAnnotations(e.annotations()),t.rerender(),requestAnimationFrame(()=>e.viewer.find.refresh({reset:!0})))})}function pE(e){LY({state:e.viewer.ready,container:e.viewer.container,getRoot:e.viewer.getRoot,isReady:e.isReady,settleFrames:e.settleFrames,onReady:e.onReady})}function gE(e){$d(e.viewer.ready),e.current?.cleanUp();const t=e.create();e.assign(t),e.viewer.container.innerHTML="",e.draw(t),pb(e.viewer.getHost()),e.viewer.setRendered(n=>n+1),e.onReady()}function lne(e){const t=vE(e.wrapper);if(!t)return()=>{};const n=e.container.getBoundingClientRect().height;if(!n)return()=>{};const r=e.wrapper.getBoundingClientRect().top-t.getBoundingClientRect().top,i=e.container.style.minHeight;e.container.style.minHeight=`${Math.ceil(n)}px`;let o=!1;return()=>{if(o)return;o=!0,e.container.style.minHeight=i;const a=e.wrapper.getBoundingClientRect().top-t.getBoundingClientRect().top-r;a&&(t.scrollTop+=a)}}function vE(e){let t=e.parentElement;for(;t;){const n=getComputedStyle(t);if(n.overflowY==="auto"||n.overflowY==="scroll")return t;t=t.parentElement}}function cne(e,t){let n,r;const i=()=>{n?.cleanUp(),n=void 0,r=void 0};return{get:()=>{if(!t()){i();return}if(typeof document>"u")return;const o=e();if(!o)return;const s=vE(o)??document;return n&&r===s||(i(),n=new yT,r=s,n.setup(s,s instanceof Document?void 0:o)),n},cleanup:i}}function une(e){let t;return{get:()=>{if(t)return t.virtualizer;const r=e();if(!r)return;const i=FY(r);if(i)return t=i,i.virtualizer},cleanup:()=>{t?.release(),t=void 0}}}function dne(e){if(!e.dataset.line)return;const t=parseInt(e.dataset.line,10);if(!Number.isNaN(t))return t}function yE(e,t,n){const r=e.composedPath();let i=!1,o,s;for(const a of r)if(a instanceof HTMLElement&&(i=i||a.dataset.columnNumber!=null,o===void 0&&(o=t(a)),s===void 0&&n&&(s=n(a)),i&&o!==void 0&&(n==null||s!==void 0)))break;return{line:o,numberColumn:i,side:s}}function fne(e){const t=e.dataset.lineType;if(t==="change-deletion")return"deletions";if(t==="change-addition"||t==="change-additions")return"additions";if(e.dataset.code!=null)return e.hasAttribute("data-deletions")?"deletions":"additions"}function hne(e){const t=Rp(e);if(t)return ST(t)}function bE(e){return(()=>{var t=nne(),n=t.firstChild,r=n.nextSibling;return Vo(t,"focus",e.viewer.find.onFocus),Vo(t,"pointerdown",e.viewer.find.onPointerDown,!0),pr(i=>e.viewer.wrapper=i,t),j(t,b(ce,{get when(){return e.viewer.find.open()},get children(){return b(tne,{get pos(){return e.viewer.find.pos},get query(){return e.viewer.find.query},get count(){return e.viewer.find.count},get index(){return e.viewer.find.index},get setInput(){return e.viewer.find.setInput},get onInput(){return e.viewer.find.setQuery},get onKeyDown(){return e.viewer.find.onInputKeyDown},get onClose(){return e.viewer.find.close},onPrev:()=>e.viewer.find.next(-1),onNext:()=>e.viewer.find.next(1)})}}),n),pr(i=>e.viewer.container=i,n),pr(i=>e.viewer.overlay=i,r),De(i=>{var o=e.mode,s=gY,a={...e.classList,[e.class??""]:!!e.class};return o!==i.e&&Ye(t,"data-mode",i.e=o),i.t=up(t,s,i.t),i.a=Ct(t,a,i.a),i},{e:void 0,t:void 0,a:void 0}),t})()}function mne(e){let t,n;const[r,i]=se(e,one),o=()=>{const v=r.file.contents;return typeof v=="string"?v:Array.isArray(v)?v.join(`
2361
+ `){i(),n+="<br>",o++;continue}if(s===" "||s===" "){i(),n+=s,o++;continue}r+=s,o++}return i(),n}function ete(e){if(e.length<32)return vv(e);const t=Di(e);if(!t)return vv(e);const n=ja.get(t);if(n!==void 0)return ja.delete(t),ja.set(t,n),n;const r=vv(e);if(ja.set(t,r),ja.size>Qee){const i=ja.keys().next().value;i!==void 0&&ja.delete(i)}return r}const tte=/^https?:\/\/[^\s<>()`"']+$/;let Wh,nte=0;function rte(e){const t=e.trim().replace(/[),.;!?]+$/,"");if(tte.test(t))try{return new URL(t).toString()}catch{return}}function ite(){if(typeof window>"u"||typeof document>"u")return!1;const e=document.documentElement;if(e.dataset.theme&&/dark/i.test(e.dataset.theme)||e.classList.contains("dark")||e.classList.contains("theme-dark"))return!0;const t=getComputedStyle(e).getPropertyValue("--background-base").trim();if(t){const n=t.match(/^#([0-9a-fA-F]{3,8})$/);if(n){const r=n[1].length===3?n[1].split("").map(l=>l+l).join(""):n[1],i=parseInt(r.slice(0,2),16),o=parseInt(r.slice(2,4),16),s=parseInt(r.slice(4,6),16);if((.2126*i+.7152*o+.0722*s)/255<.5)return!0}}return typeof window.matchMedia=="function"?window.matchMedia("(prefers-color-scheme: dark)").matches:!1}function ote(){return Wh||(Wh=z(()=>import("./mermaid.core-BZI8AtwT.js").then(e=>e.bC),[]).then(e=>(e.default.initialize({startOnLoad:!1,securityLevel:"strict",theme:ite()?"dark":"default",themeVariables:{background:"transparent",fontFamily:"var(--font-family-sans)"}}),e.default)),Wh)}function ste(e){if(typeof window>"u")return"";let t;try{t=new DOMParser().parseFromString(e,"image/svg+xml")}catch{return""}if(t.querySelector("parsererror"))return"";const n=t.documentElement;if(!n||n.localName!=="svg")return"";const r=o=>{const s=o.trim();return!!(!s||s.startsWith("#")||/^https?:\/\//i.test(s)||s.startsWith("/"))},i=o=>{if(o.localName==="script"){o.remove();return}for(const s of Array.from(o.attributes)){const a=s.name.toLowerCase();if(a.startsWith("on")){o.removeAttribute(s.name);continue}(a==="href"||a==="xlink:href")&&(r(s.value)||o.removeAttribute(s.name))}for(const s of Array.from(o.children))i(s)};return i(n),new XMLSerializer().serializeToString(n)}function ate(e){if(e.dataset.language?.toLowerCase()==="mermaid")return!0;const t=e.querySelector("code"),n=`${e.className} ${t?.className??""}`;return/\blang(?:uage)?-mermaid\b/i.test(n)}const lte="astro|c|cc|cpp|cs|css|go|h|hpp|html|java|js|jsx|json|kt|lua|md|mdx|mjs|py|rs|scss|sh|sql|svelte|swift|toml|ts|tsx|txt|vue|yaml|yml",sE=`@?(?:(?:\\.{1,2}\\/|\\/)?(?:[\\w.$+@ -]+\\/)+[\\w.$+@ -]+\\.[A-Za-z0-9]{1,16}|[\\w.@+-]+\\.(?:${lte}))`,x8=new RegExp(`(^|[\\s([{"'])(${sE})(?::(\\d+)(?:-(\\d+))?)?`,"g"),cte=new RegExp(`^(${sE})(?::(\\d+)(?:-(\\d+))?)?$`);function Gw(e,t){if(!e)return;const n=Number(e);if(!Number.isInteger(n)||n<=0)return;const r=t?Number(t):void 0;return r!==void 0&&(!Number.isInteger(r)||r<=0)?{startLine:n}:{startLine:n,endLine:r}}function aE(e){return e.startsWith("@")?e.slice(1):e}function ute(e){const t=e.trim().match(cte);if(t?.[1])return{raw:e.trim(),path:aE(t[1]),index:0,end:e.trim().length,selection:Gw(t[2],t[3])}}function dte(e){const t=[];x8.lastIndex=0;let n;for(;n=x8.exec(e);){const r=n[1]??"",i=n[2];if(!i)continue;const o=n[0].slice(r.length);t.push({raw:o,path:aE(i),index:n.index+r.length,end:n.index+n[0].length,selection:Gw(n[3],n[4])})}return t}function kb(e,t){const n=document.createElement("div");n.setAttribute("data-component","icon"),n.setAttribute("data-size","small"),n.setAttribute("data-slot",t);const r=document.createElementNS("http://www.w3.org/2000/svg","svg");return r.setAttribute("data-slot","icon-svg"),r.setAttribute("fill","none"),r.setAttribute("viewBox","0 0 20 20"),r.setAttribute("aria-hidden","true"),r.innerHTML=e,n.appendChild(r),n}function S8(e){const t=document.createElement("button");return t.type="button",t.setAttribute("data-component","icon-button"),t.setAttribute("data-variant","secondary"),t.setAttribute("data-size","small"),t.setAttribute("data-slot","markdown-copy-button"),t.setAttribute("aria-label",e.copyCode),t.setAttribute("data-tooltip",e.copyCode),t.appendChild(kb(wb.copy,"copy-icon")),t.appendChild(kb(wb.check,"check-icon")),t}function D0(e,t,n){if(n){e.setAttribute("data-copied","true"),e.setAttribute("aria-label",t.copiedCode),e.setAttribute("data-tooltip",t.copiedCode);return}e.removeAttribute("data-copied"),e.setAttribute("aria-label",t.copyCode),e.setAttribute("data-tooltip",t.copyCode)}function fte(e,t){t&&(e.dataset.fileReferenceLineStart=String(t.startLine),t.endLine&&(e.dataset.fileReferenceLineEnd=String(t.endLine)))}function hte(e){const t=e.dataset.fileReferenceLineStart;if(t)return Gw(t,e.dataset.fileReferenceLineEnd)}function lE(e,t,n){const r=document.createElement("span");r.setAttribute("data-component","file-reference");const i=document.createElement("button");i.type="button",i.setAttribute("data-slot","file-reference-open"),i.dataset.fileReferencePath=e.path,i.title=e.path,fte(i,e.selection),i.textContent=t;const o=document.createElement("button");return o.type="button",o.setAttribute("data-component","icon-button"),o.setAttribute("data-variant","ghost"),o.setAttribute("data-size","small"),o.setAttribute("data-slot","file-reference-copy"),o.dataset.fileReferencePath=e.path,o.setAttribute("aria-label",n.copyPath),o.setAttribute("data-tooltip",n.copyPath),o.appendChild(kb(wb.copy,"copy-icon")),r.appendChild(i),r.appendChild(o),r}function mte(e,t){const n=e.parentElement;if(!n)return;if(!(n.getAttribute("data-component")==="markdown-code")){const o=document.createElement("div");o.setAttribute("data-component","markdown-code"),n.replaceChild(o,e),o.appendChild(e),o.appendChild(S8(t));return}const i=Array.from(n.querySelectorAll('[data-slot="markdown-copy-button"]')).filter(o=>o instanceof HTMLButtonElement);if(i.length===0){n.appendChild(S8(t));return}for(const o of i.slice(1))o.remove()}function pte(e){const t=Array.from(e.querySelectorAll(":not(pre) > code"));for(const n of t){const r=rte(n.textContent??""),i=n.parentElement instanceof HTMLAnchorElement&&n.parentElement.classList.contains("external-link")?n.parentElement:null;if(!r){i&&i.replaceWith(n);continue}if(i){i.href=r;continue}const o=document.createElement("a");o.href=r,o.className="external-link",o.target="_blank",o.rel="noopener noreferrer",n.parentNode?.replaceChild(o,n),o.appendChild(n)}}function gte(e,t){const n=Array.from(e.querySelectorAll(":not(pre) > code"));for(const r of n){if(r.closest('[data-component="file-reference"]')||r.parentElement instanceof HTMLAnchorElement)continue;const i=ute(r.textContent??"");i&&r.replaceWith(lE(i,r.textContent??i.raw,t))}}function vte(e,t){const n=document.createTreeWalker(e,NodeFilter.SHOW_TEXT,{acceptNode(o){const s=o.parentElement;return!s||!o.nodeValue?.trim()||s.closest('pre, code, a, button, [data-component="file-reference"]')?NodeFilter.FILTER_REJECT:NodeFilter.FILTER_ACCEPT}}),r=[];let i;for(;i=n.nextNode();)i instanceof Text&&r.push(i);for(const o of r){const s=dte(o.data);if(s.length===0)continue;const a=document.createDocumentFragment();let l=0;for(const c of s)c.index>l&&a.appendChild(document.createTextNode(o.data.slice(l,c.index))),a.appendChild(lE(c,c.raw,t)),l=c.end;l<o.data.length&&a.appendChild(document.createTextNode(o.data.slice(l))),o.replaceWith(a)}}function yte(e){const t=Array.from(e.querySelectorAll("pre")).filter(n=>n instanceof HTMLPreElement&&ate(n));for(const n of t){const r=n.parentElement,i=n.querySelector("code"),o=Di(i?.textContent??"");if(!r||!o)continue;r.setAttribute("data-mermaid","true"),r.dataset.mermaidHash=o,n.setAttribute("data-language","mermaid");const s=Array.from(r.children).find(l=>l instanceof HTMLElement&&l.getAttribute("data-component")==="mermaid-preview"),a=s??document.createElement("div");a.setAttribute("data-component","mermaid-preview"),a.setAttribute("role","img"),a.setAttribute("aria-label","Mermaid diagram"),a.dataset.mermaidHash=o,s||r.insertBefore(a,n)}}function bte(e,t){const n=Array.from(e.querySelectorAll("pre"));for(const r of n)mte(r,t);yte(e),pte(e),gte(e,t),vte(e,t)}function wte(e,t){const n=new Map,r=s=>{const a=t(),l=s.getAttribute("data-copied")==="true";D0(s,a,l)},i=async s=>{const a=s.target;if(!(a instanceof Element))return;const l=a.closest('[data-slot="markdown-copy-button"]');if(!(l instanceof HTMLButtonElement))return;const u=l.closest('[data-component="markdown-code"]')?.querySelector("code")?.textContent??"";if(!u||!await Ww(u))return;const d=t();$t({variant:"success",icon:"circle-check",title:d.copied,description:d.copiedCode}),D0(l,d,!0);const h=n.get(l);h&&clearTimeout(h);const f=setTimeout(()=>D0(l,d,!1),2e3);n.set(l,f)},o=Array.from(e.querySelectorAll('[data-slot="markdown-copy-button"]'));for(const s of o)s instanceof HTMLButtonElement&&r(s);return e.addEventListener("click",i),()=>{e.removeEventListener("click",i);for(const s of n.values())clearTimeout(s)}}function kte(e,t,n){const r=async i=>{const o=i.target;if(!(o instanceof Element))return;const s=o.closest('[data-slot="file-reference-copy"]');if(s instanceof HTMLElement){const u=s.dataset.fileReferencePath;if(!u||(i.preventDefault(),i.stopPropagation(),!await Ww(u)))return;const d=t();$t({variant:"success",icon:"circle-check",title:d.copied,description:d.copiedPath});return}const a=o.closest('[data-slot="file-reference-open"]');if(!(a instanceof HTMLElement))return;const l=a.dataset.fileReferencePath;if(!l)return;const c=n();c&&(i.preventDefault(),i.stopPropagation(),c(l,hte(a)))};return e.addEventListener("click",r),()=>e.removeEventListener("click",r)}function xte(e){const n=Array.from(e.querySelectorAll('[data-component="markdown-code"][data-mermaid="true"]')).filter(r=>r instanceof HTMLElement).filter(r=>{const i=r.dataset.mermaidHash,o=Array.from(r.children).find(s=>s instanceof HTMLElement&&s.getAttribute("data-component")==="mermaid-preview");return!i||!o||o.dataset.mermaidRendering===i?!1:o.dataset.mermaidRendered!==i});n.length!==0&&ote().then(r=>{for(const i of n){const o=i.dataset.mermaidHash,s=Array.from(i.children).find(l=>l instanceof HTMLElement&&l.getAttribute("data-component")==="mermaid-preview"),a=i.querySelector("pre code")?.textContent;!o||!s||!a||(s.dataset.mermaidRendering=o,i.dataset.mermaidState="pending",r.render(`markdown-mermaid-${o}-${nte++}`,a).then(l=>{if(i.dataset.mermaidHash!==o)return;const c=ste(l.svg);if(!c){delete s.dataset.mermaidRendering,i.dataset.mermaidState="error";return}s.innerHTML=c,l.bindFunctions?.(s),s.dataset.mermaidRendered=o,delete s.dataset.mermaidRendering,i.dataset.mermaidState="rendered"}).catch(()=>{i.dataset.mermaidHash===o&&(s.replaceChildren(),delete s.dataset.mermaidRendered,delete s.dataset.mermaidRendering,i.dataset.mermaidState="error")}))}}).catch(()=>{for(const r of n)r.dataset.mermaidState="error"})}function yv(e,t){if(ra.delete(e),ra.set(e,t),ra.size<=Yee)return;const n=ra.keys().next().value;n&&ra.delete(n)}function Gh(e){return e&&ZX(e)}function cE(e){const[t,n]=se(e,["text","cacheKey","streaming","class","classList"]),r=fY(),i=Qo(),o=qj(),[s,a]=de(),l=F(()=>{const p=Gh(t.text);if(!p)return"";const g=t.cacheKey??Di(p);if(!g)return;const v=fv(p,t.streaming??!1),y=[];for(let w=0;w<v.length;w++){const k=v[w],x=Di(k.raw);if(!x)return;const C=`${g}:${w}:${k.mode}`,S=ra.get(C);if(!S||S.hash!==x)return;yv(C,S),y.push(S.html)}return y.join("")}),c=F(()=>{if(!t.streaming)return;const p=Gh(t.text);if(!p)return;const g=t.cacheKey??Di(p);if(!g)return;const v=fv(p,!0);if(v.length===0)return;const y=[];let w=!1;for(let k=0;k<v.length;k++){const x=v[k],C=Di(x.raw);if(!C)return;const S=`${g}:${k}:${x.mode}`,$=ra.get(S);if($&&$.hash===C){y.push($.html);continue}y.push(ete(x.src)),w=!0}return w?y.join(""):void 0}),[u]=Xo(()=>l()!==void 0?null:{text:Gh(t.text),key:t.cacheKey,streaming:t.streaming??!1},async p=>{if(p===null||!p.text)return"";const g=p.key??Di(p.text);return Promise.all(fv(p.text,p.streaming).map(async(v,y)=>{const w=Di(v.raw),k=g?`${g}:${y}:${v.mode}`:w;if(k&&w){const S=ra.get(k);if(S&&S.hash===w)return yv(k,S),S.html}const x=await Promise.resolve(r.parse(v.src)),C=Jee(x);return k&&w&&yv(k,{hash:w,html:C}),C})).then(v=>v.join("")).catch(()=>k8(p.text))},{initialValue:k8(Gh(t.text))});let d,h,f,m;return re(()=>{const p=s(),g=l(),v=c(),y=u.latest??u(),w=t.text?g??y??v??"":"";if(!p)return;if(!w){f!==""&&(p.innerHTML="",f="");return}const k=i.t("ui.message.copyCode");if(w===f&&k===m)return;const x={copy:i.t("ui.message.copy"),copied:i.t("ui.message.copied"),copyCode:k,copiedCode:i.t("ui.message.copiedCode"),copyPath:i.t("ui.message.copyPath"),copiedPath:i.t("ui.message.copiedPath")};f=w,m=k;const C=document.createElement("div");C.innerHTML=w,bte(C,x),WX(p,C,{childrenOnly:!0,onBeforeElUpdated:(S,$)=>{if(S instanceof HTMLElement&&$ instanceof HTMLElement){if(S.getAttribute("data-component")==="mermaid-preview"&&$.getAttribute("data-component")==="mermaid-preview"&&S.dataset.mermaidHash===$.dataset.mermaidHash&&S.dataset.mermaidRendered===S.dataset.mermaidHash)return!1;S.getAttribute("data-component")==="markdown-code"&&$.getAttribute("data-component")==="markdown-code"&&S.dataset.mermaid==="true"&&S.dataset.mermaidHash===$.dataset.mermaidHash&&S.dataset.mermaidState&&($.dataset.mermaidState=S.dataset.mermaidState)}return S instanceof HTMLButtonElement&&$ instanceof HTMLButtonElement&&S.getAttribute("data-slot")==="markdown-copy-button"&&$.getAttribute("data-slot")==="markdown-copy-button"&&S.getAttribute("data-copied")==="true"&&D0($,x,!0),!S.isEqualNode($)}}),xte(p),d||(d=wte(p,()=>({copy:i.t("ui.message.copy"),copied:i.t("ui.message.copied"),copyCode:i.t("ui.message.copyCode"),copiedCode:i.t("ui.message.copiedCode"),copyPath:i.t("ui.message.copyPath"),copiedPath:i.t("ui.message.copiedPath")}))),h||(h=kte(p,()=>({copy:i.t("ui.message.copy"),copied:i.t("ui.message.copied"),copyCode:i.t("ui.message.copyCode"),copiedCode:i.t("ui.message.copiedCode"),copyPath:i.t("ui.message.copyPath"),copiedPath:i.t("ui.message.copiedPath")}),()=>o.open))}),fe(()=>{d&&d(),h&&h()}),(()=>{var p=Zee();return pr(a,p),jr(p,ne({get classList(){return{...t.classList,[t.class??""]:!!t.class}}},n),!1,!1),p})()}var Ste=ee('<div class="flex min-h-40 items-center justify-center px-6 py-4 text-center text-text-weak">'),_te=ee('<div class="flex min-h-56 flex-col items-center justify-center gap-2 px-6 py-10 text-center"><div class="text-14-semibold text-text-strong"></div><div class="text-14-regular text-text-weak">'),Cte=ee('<div class="flex justify-center bg-background-stronger px-6 py-4"><img class="max-h-[60vh] max-w-full rounded border border-border-weak-base bg-background-base object-contain">'),Ite=ee('<div class="flex justify-center bg-background-stronger px-6 py-4"><audio class="w-full max-w-xl"controls preload=metadata><source>'),Tte=ee('<div class="flex justify-center bg-background-stronger px-6 py-4"><video class="max-h-[70vh] max-w-full rounded border border-border-weak-base bg-background-base"controls preload=metadata><source>'),Ete=ee('<div class="bg-background-stronger px-6 py-4"><iframe class="block h-[80vh] w-full rounded border border-border-weak-base bg-background-base">'),$te=ee('<div class="flex flex-col gap-4 px-6 py-4">'),Ate=ee('<div class="flex justify-center"><img class="max-h-[60vh] max-w-full rounded border border-border-weak-base bg-background-base object-contain">'),Lte=ee('<div class="flex items-center justify-between gap-3 border-b border-border-weak-base px-6 py-2"><div class="text-12-regular text-text-weak truncate"></div><div class="flex items-center gap-1"><button type=button></button><button type=button>'),Dte=ee('<div class="mt-3 text-12-regular text-text-weak">'),Mte=ee('<div class="overflow-auto px-6 py-4 max-h-[70vh]"><table class="text-13-regular border-collapse w-full"><thead class="sticky top-0 bg-background-base z-10"><tr></tr></thead><tbody>'),zp=ee('<div class="flex flex-col">'),Ote=ee('<div class="px-6 py-6 text-text-weak">'),Pte=ee('<th class="border border-border-weak-base px-3 py-2 text-left text-12-semibold text-text-strong whitespace-nowrap">'),Rte=ee("<tr class=even:bg-background-stronger>"),Nte=ee('<td class="border border-border-weak-base px-3 py-1.5 align-top whitespace-pre-wrap">'),zte=ee('<div class="px-6 py-4 max-w-3xl mx-auto">'),jte=ee('<div class="bg-background-stronger px-6 py-4"><iframe sandbox title="html preview"class="block h-[70vh] w-full rounded border border-border-weak-base bg-white">'),Fte=ee('<div class="overflow-auto px-6 py-4 max-h-[70vh]">'),Ute=ee('<div class="text-13-regular text-text-weak">'),Hte=ee('<span class=text-syntax-property>"<!>"'),Bte=ee("<div><span class=text-syntax-keyword>null"),Vte=ee('<div><span class=text-syntax-string>"<!>"'),qte=ee("<div><span class=text-syntax-keyword>"),Wte=ee("<details class=cursor-pointer><summary><span class=text-text-weak>[ <!> ]"),Gte=ee("<details class=cursor-pointer><summary><span class=text-text-weak>"),Kte=ee("<div><span class=text-text-weak>");const bv=new Set(["image","audio","video","pdf"]);function _8(e){return e.current!==void 0?e.current:e.after??e.before}function C8(e){const t=Qo(),n=()=>e.media,r=F(()=>{const k=n();if(!(!k||k.mode==="off"))return nX(k.path)}),i=F(()=>{const k=n();return!k||k.mode==="off"||r()?!1:rX(k.current)}),o=()=>e.media?.onLoad?.(),s=F(()=>{const k=n(),x=r();return!k||!x?!1:k.deleted?!0:x==="svg"||k.current!==void 0?!1:!iv(k.after)&&iv(k.before)}),a=F(()=>{const k=n(),x=r();if(!(!k||!bv.has(x)))return rv(_8(k),x)}),l=F(()=>{const k=n(),x=r();if(!(!k||!bv.has(x))&&k.current===void 0&&!s()&&!a()&&!(!k.path||!k.readFile))return{key:`${x}:${k.path}`,kind:x,path:k.path,readFile:k.readFile,onError:k.onError}}),[c]=Xo(l,async k=>k.readFile(k.path).then(x=>{const C=rv(x,k.kind);return C?{key:k.key,src:C,mime:k.kind==="audio"||k.kind==="video"?Uw(x?.mimeType):void 0}:(k.onError?.({kind:k.kind}),{key:k.key,error:!0})},()=>(k.onError?.({kind:k.kind}),{key:k.key,error:!0}))),u=F(()=>{const k=l(),x=c();if(!(!k||!x||x.key!==k.key))return x}),d=F(()=>{const k=u();return a()??(k&&"src"in k?k.src:void 0)}),h=F(()=>a()?"ready":l()?c.loading?"loading":u()?.error?"error":d()?"ready":"idle":"idle"),f=F(()=>{const k=u();return k&&"mime"in k?k.mime:void 0}),m=F(()=>{const k=n();if(!(!k||r()!=="svg"))return oX(k.current)}),p=F(()=>{const k=n();if(!(!k||r()!=="svg"))return rv(k.current,"svg")}),g=F(()=>{const k=n();if(!(!k||r()!=="svg")&&m()===void 0&&iv(k.current))return[k.path,k.current]});re(gt(g,k=>{k&&n()?.onError?.({kind:"svg"})},{defer:!0}));const v=F(()=>{const k=n(),x=r();if(k&&!(x!=="table"&&x!=="html"&&x!=="markdown"&&x!=="json"))return sX(_8(k))}),y=k=>{const x=`ui.fileMedia.kind.${k}`;return t.t(x)},w=k=>(()=>{var x=Ste();return j(x,k),x})();return b(Il,{get children(){return[b(Cn,{get when(){return r()==="image"||r()==="audio"||r()==="video"||r()==="pdf"},get children(){return b(ce,{get when(){return d()},keyed:!0,get fallback(){const k=n(),x=r();if(!k||!x||!bv.has(x))return e.fallback();const C=y(x);return s()?w(t.t("ui.fileMedia.state.removed",{kind:C})):h()==="loading"?w(t.t("ui.fileMedia.state.loading",{kind:C})):h()==="error"?w(t.t("ui.fileMedia.state.error",{kind:C})):w(t.t("ui.fileMedia.state.unavailable",{kind:C}))},children:k=>{const x=r();return x==="image"?(()=>{var C=Cte(),S=C.firstChild;return S.addEventListener("load",o),Ye(S,"src",k),De(()=>Ye(S,"alt",n()?.path)),C})():x==="audio"?(()=>{var C=Ite(),S=C.firstChild,$=S.firstChild;return S.addEventListener("loadedmetadata",o),Ye($,"src",k),De(()=>Ye($,"type",f())),C})():x==="video"?(()=>{var C=Tte(),S=C.firstChild,$=S.firstChild;return S.addEventListener("loadedmetadata",o),Ye($,"src",k),De(()=>Ye($,"type",f())),C})():x==="pdf"?(()=>{var C=Ete(),S=C.firstChild;return S.addEventListener("load",o),Ye(S,"src",k),De(()=>Ye(S,"title",n()?.path??"pdf")),C})():e.fallback()}})}}),b(Cn,{get when(){return r()==="svg"},get children(){return m()===void 0&&p()==null?e.fallback():(()=>{var k=$te();return j(k,b(ce,{get when(){return m()!==void 0},get children(){return e.fallback()}}),null),j(k,b(ce,{get when(){return p()},keyed:!0,children:x=>(()=>{var C=Ate(),S=C.firstChild;return S.addEventListener("load",o),Ye(S,"src",x),De(()=>Ye(S,"alt",n()?.path)),C})()}),null),k})()}}),b(Cn,{get when(){return r()==="table"},get children(){return b(ce,{get when(){return v()},keyed:!0,get fallback(){return e.fallback()},children:k=>b(Zte,{get path(){return n()?.path},text:k,get fallback(){return e.fallback},onReady:o})})}}),b(Cn,{get when(){return r()==="markdown"},get children(){return b(ce,{get when(){return v()},keyed:!0,get fallback(){return e.fallback()},children:k=>b(Yte,{get path(){return n()?.path},text:k,get fallback(){return e.fallback},onReady:o})})}}),b(Cn,{get when(){return r()==="html"},get children(){return b(ce,{get when(){return v()},keyed:!0,get fallback(){return e.fallback()},children:k=>b(Xte,{text:k,get fallback(){return e.fallback},onReady:o})})}}),b(Cn,{get when(){return r()==="json"},get children(){return b(ce,{get when(){return v()},keyed:!0,get fallback(){return e.fallback()},children:k=>b(Jte,{text:k,get fallback(){return e.fallback},onReady:o})})}}),b(Cn,{get when(){return i()},get children(){var k=_te(),x=k.firstChild,C=x.nextSibling;return j(x,()=>n()?.path?.split("/").pop()??t.t("ui.fileMedia.binary.title")),j(C,()=>{const S=n()?.path;return S?t.t("ui.fileMedia.binary.description.path",{path:S}):t.t("ui.fileMedia.binary.description.default")}),k}}),b(Cn,{when:!0,get children(){return e.fallback()}})]}})}function jp(e){const t=n=>{const r="px-2 py-1 text-12-medium rounded transition-colors";return e.active===n?`${r} bg-background-base text-text-strong border border-border-weak-base`:`${r} text-text-weak hover:text-text-strong`};return(()=>{var n=Lte(),r=n.firstChild,i=r.nextSibling,o=i.firstChild,s=o.nextSibling;return j(r,()=>e.label),o.$$click=()=>e.onChange("preview"),j(o,()=>e.previewLabel),s.$$click=()=>e.onChange("source"),j(s,()=>e.sourceLabel),De(a=>{var l=t("preview"),c=t("source");return l!==a.e&&Bo(o,a.e=l),c!==a.t&&Bo(s,a.t=c),a},{e:void 0,t:void 0}),n})()}function Zte(e){const t=Qo(),[n,r]=de("preview"),i=F(()=>{const s=cX(e.path,e.text);return lX(e.text,s)}),o=F(()=>i().headers.length===0&&i().rows.length===0);return re(()=>{i(),requestAnimationFrame(e.onReady)}),(()=>{var s=zp();return j(s,b(jp,{get label(){return t.t("ui.fileMedia.table.summary",{rows:i().rows.length,cols:i().headers.length})},get active(){return n()},onChange:r,get previewLabel(){return t.t("ui.fileMedia.toggle.preview")},get sourceLabel(){return t.t("ui.fileMedia.toggle.source")}}),null),j(s,b(ce,{get when(){return n()==="preview"},get fallback(){return e.fallback()},get children(){return b(ce,{get when(){return!o()},get fallback(){return(()=>{var a=Ote();return j(a,()=>t.t("ui.fileMedia.table.empty")),a})()},get children(){var a=Mte(),l=a.firstChild,c=l.firstChild,u=c.firstChild,d=c.nextSibling;return j(u,b(Ut,{get each(){return i().headers},children:(h,f)=>(()=>{var m=Pte();return j(m,()=>h||`#${f()+1}`),m})()})),j(d,b(Ut,{get each(){return i().rows},children:h=>(()=>{var f=Rte();return j(f,b(Ut,{get each(){return i().headers},children:(m,p)=>(()=>{var g=Nte();return j(g,()=>h[p()]??""),g})()})),f})()})),j(a,b(ce,{get when(){return i().truncated},get children(){var h=Dte();return j(h,()=>t.t("ui.fileMedia.table.truncated")),h}}),null),a}})}}),null),s})()}function Yte(e){const t=Qo(),[n,r]=de("preview");return re(()=>{e.text,requestAnimationFrame(e.onReady)}),(()=>{var i=zp();return j(i,b(jp,{get label(){return e.path??"markdown"},get active(){return n()},onChange:r,get previewLabel(){return t.t("ui.fileMedia.toggle.preview")},get sourceLabel(){return t.t("ui.fileMedia.toggle.source")}}),null),j(i,b(ce,{get when(){return n()==="preview"},get fallback(){return e.fallback()},get children(){var o=zte();return j(o,b(cE,{get text(){return e.text}})),o}}),null),i})()}function Xte(e){const t=Qo(),[n,r]=de("preview");return(()=>{var i=zp();return j(i,b(jp,{get label(){return t.t("ui.fileMedia.html.label")},get active(){return n()},onChange:r,get previewLabel(){return t.t("ui.fileMedia.toggle.preview")},get sourceLabel(){return t.t("ui.fileMedia.toggle.source")}}),null),j(i,b(ce,{get when(){return n()==="preview"},get fallback(){return e.fallback()},get children(){var o=jte(),s=o.firstChild;return Vo(s,"load",e.onReady),De(()=>Ye(s,"srcdoc",e.text)),o}}),null),i})()}function Jte(e){const t=Qo(),[n,r]=de("preview"),i=F(()=>{try{return{ok:!0,value:JSON.parse(Qte(e.text))}}catch(o){return{ok:!1,message:o instanceof Error?o.message:String(o)}}});return re(()=>{i(),requestAnimationFrame(e.onReady)}),(()=>{var o=zp();return j(o,b(jp,{get label(){return t.t("ui.fileMedia.json.label")},get active(){return n()},onChange:r,get previewLabel(){return t.t("ui.fileMedia.toggle.preview")},get sourceLabel(){return t.t("ui.fileMedia.toggle.source")}}),null),j(o,b(ce,{get when(){return n()==="preview"},get fallback(){return e.fallback()},get children(){var s=Fte();return j(s,b(ce,{get when(){return i().ok},get fallback(){return(()=>{var a=Ute();return j(a,()=>t.t("ui.fileMedia.json.invalid",{message:i().ok?"":i().message})),a})()},get children(){return b(xb,{get value(){return i().value},depth:0})}})),s}}),null),o})()}function Qte(e){return e.replace(/\/\*[\s\S]*?\*\//g,"").replace(/(^|[^:])\/\/.*$/gm,"$1").replace(/,\s*([\]}])/g,"$1")}function xb(e){const t=()=>" ".repeat(e.depth),n=()=>e.name!==void 0?(()=>{var r=Hte(),i=r.firstChild,o=i.nextSibling;return o.nextSibling,j(r,()=>e.name,o),r})():null;if(e.value===null)return(()=>{var r=Bte(),i=r.firstChild;return j(r,t,i),j(r,n,i),j(r,()=>e.name!==void 0?": ":"",i),r})();if(typeof e.value=="string")return(()=>{var r=Vte(),i=r.firstChild,o=i.firstChild,s=o.nextSibling;return s.nextSibling,j(r,t,i),j(r,n,i),j(r,()=>e.name!==void 0?": ":"",i),j(i,()=>e.value,s),r})();if(typeof e.value=="number"||typeof e.value=="boolean")return(()=>{var r=qte(),i=r.firstChild;return j(r,t,i),j(r,n,i),j(r,()=>e.name!==void 0?": ":"",i),j(i,()=>String(e.value)),r})();if(Array.isArray(e.value))return(()=>{var r=Wte(),i=r.firstChild,o=i.firstChild,s=o.firstChild,a=s.nextSibling;return a.nextSibling,j(i,t,o),j(i,n,o),j(i,()=>e.name!==void 0?": ":"",o),j(o,()=>e.value.length,a),j(r,b(Ut,{get each(){return e.value},children:l=>b(xb,{value:l,get depth(){return e.depth+1}})}),null),De(()=>r.open=e.depth<2),r})();if(typeof e.value=="object"){const r=Object.entries(e.value);return(()=>{var i=Gte(),o=i.firstChild,s=o.firstChild;return j(o,t,s),j(o,n,s),j(o,()=>e.name!==void 0?": ":"",s),j(s,()=>`{ ${r.length} }`),j(i,b(Ut,{each:r,children:([a,l])=>b(xb,{name:a,value:l,get depth(){return e.depth+1}})}),null),De(()=>i.open=e.depth<2),i})()}return(()=>{var r=Kte(),i=r.firstChild;return j(r,t,i),j(i,()=>String(e.value)),r})()}or(["click"]);var ene=ee('<div class="fixed z-50 flex h-8 items-center gap-2 rounded-md border border-border-base bg-background-base px-3 shadow-md"><input class="w-40 bg-transparent outline-none text-14-regular text-text-strong placeholder:text-text-weak"><div class="shrink-0 text-12-regular text-text-weak tabular-nums text-right"style=width:10ch></div><div class="flex items-center"><button type=button class="size-6 grid place-items-center rounded text-text-weak hover:bg-surface-base-hover hover:text-text-strong disabled:opacity-40 disabled:pointer-events-none"></button><button type=button class="size-6 grid place-items-center rounded text-text-weak hover:bg-surface-base-hover hover:text-text-strong disabled:opacity-40 disabled:pointer-events-none"></button></div><button type=button class="size-6 grid place-items-center rounded text-text-weak hover:bg-surface-base-hover hover:text-text-strong">');function tne(e){const t=Qo();return b(Os,{get children(){var n=ene(),r=n.firstChild,i=r.nextSibling,o=i.nextSibling,s=o.firstChild,a=s.nextSibling,l=o.nextSibling;n.$$pointerdown=u=>u.stopPropagation(),j(n,b(Ht,{name:"magnifying-glass",size:"small",class:"text-text-weak shrink-0"}),r),r.$$keydown=u=>e.onKeyDown(u),r.$$input=u=>e.onInput(u.currentTarget.value);var c=e.setInput;return typeof c=="function"?pr(c,r):e.setInput=r,j(i,(()=>{var u=je(()=>!!e.count());return()=>u()?`${e.index()+1}/${e.count()}`:"0/0"})()),Vo(s,"click",e.onPrev,!0),j(s,b(Ht,{name:"chevron-down",size:"small",class:"rotate-180"})),Vo(a,"click",e.onNext,!0),j(a,b(Ht,{name:"chevron-down",size:"small"})),Vo(l,"click",e.onClose,!0),j(l,b(Ht,{name:"close-small",size:"small"})),De(u=>{var d=`${e.pos().top}px`,h=`${e.pos().right}px`,f=t.t("ui.fileSearch.placeholder"),m=e.count()===0,p=t.t("ui.fileSearch.previousMatch"),g=e.count()===0,v=t.t("ui.fileSearch.nextMatch"),y=t.t("ui.fileSearch.close");return d!==u.e&&Xr(n,"top",u.e=d),h!==u.t&&Xr(n,"right",u.t=h),f!==u.a&&Ye(r,"placeholder",u.a=f),m!==u.o&&(s.disabled=u.o=m),p!==u.i&&Ye(s,"aria-label",u.i=p),g!==u.n&&(a.disabled=u.n=g),v!==u.s&&Ye(a,"aria-label",u.s=v),y!==u.h&&Ye(l,"aria-label",u.h=y),u},{e:void 0,t:void 0,a:void 0,o:void 0,i:void 0,n:void 0,s:void 0,h:void 0}),De(()=>r.value=e.query()),n}})}or(["pointerdown","input","keydown","click"]);var nne=ee('<div data-component=file class="relative outline-none"tabindex=0><div></div><div class="pointer-events-none absolute inset-0 z-0">');const rne=5e5,ine={...Nw,lineHeight:24,fileGap:0},uE=["mode","media","class","classList","annotations","selectedLines","commentedLines","search","onLineSelected","onLineSelectionEnd","onLineNumberSelectionEnd","onRendered","preloadedDiff"],one=["file",...uE],sne=["fileDiff","before","after",...uE];function ane(e){let t,n,r,i,o,s,a,l=!1,c=null,u=!1;const d=EY(),h=OY(),[f,m]=de(0),p=()=>$Y(n),g=()=>LT(n),v=TY({wrapper:()=>t,overlay:()=>r,getRoot:p}),y=()=>{i===void 0&&(i=requestAnimationFrame(()=>{i=void 0;const $=u;e.updateSelection($),u&&(u=!1,e.onLineSelectionEnd(c))}))},w=()=>{o===void 0&&(o=requestAnimationFrame(()=>{o=void 0;const $=e.buildDragSelection();$&&e.setSelectedLines($)}))},k=$=>{if(!e.enableLineSelection()||$.button!==0)return;const O=e.lineFromMouseEvent($);if(O.numberColumn){h.begin(!0,O.line);return}O.line!==void 0&&(h.begin(!1,O.line),s=O.line,a=O.line,l=!1,e.onDragStart(O))},x=$=>{if(!e.enableLineSelection())return;const O=e.lineFromMouseEvent($);if(!h.track($.buttons,O.line)&&s!==void 0){if(($.buttons&1)===0){s=void 0,a=void 0,l=!1,e.onDragReset(),h.finish();return}O.line!==void 0&&(a=O.line,l=!0,e.onDragMove(O),w())}},C=()=>{if(e.enableLineSelection()&&h.finish()!=="numbers"&&s!==void 0){if(!l){u=!1;const $=e.buildClickSelection();$&&e.setSelectedLines($),e.onLineSelectionEnd(c),s=void 0,a=void 0,l=!1,e.onDragReset();return}u=!0,w(),y(),s=void 0,a=void 0,l=!1,e.onDragReset()}},S=()=>{if(!e.enableLineSelection()||s===void 0)return;const $=window.getSelection();!$||$.isCollapsed||y()};return Kt(()=>{fe(AY(g))}),re(()=>{f();const $=e.commentedLines();requestAnimationFrame(()=>{const O=p();O&&e.markCommented(O,$)})}),re(()=>{e.setSelectedLines(e.selectedLines()??null)}),re(()=>{e.enableLineSelection()&&(Ln(n,"mousedown",k),Ln(n,"mousemove",x),Ln(window,"mouseup",C),Ln(document,"selectionchange",S))}),fe(()=>{$d(d),i!==void 0&&cancelAnimationFrame(i),o!==void 0&&cancelAnimationFrame(o),i=void 0,o=void 0,s=void 0,a=void 0,l=!1,h.reset(),c=null,u=!1}),{get wrapper(){return t},set wrapper($){t=$},get container(){return n},set container($){n=$},get overlay(){return r},set overlay($){r=$},get dragStart(){return s},get dragEnd(){return a},get lastSelection(){return c},set lastSelection($){c=$},ready:d,bridge:h,rendered:f,setRendered:m,getRoot:p,getHost:g,find:v,scheduleSelectionUpdate:y}}function dE(e,t){return ane({enableLineSelection:e.enableLineSelection,selectedLines:e.selectedLines,commentedLines:()=>e.commentedLines()??[],onLineSelectionEnd:e.onLineSelectionEnd,...t})}function fE(e){re(()=>{const t=e.search();if(!t)return;const n={focus:()=>e.find.focus()};t.register(n),fe(()=>t.register(null))})}function hE(e){const t=n=>{if(!e.normalize)return n;const r=e.normalize(n);return r!==void 0?r:n};return{onLineSelected:n=>{const r=t(n);e.viewer.lastSelection=r,e.onLineSelected?.(r)},onLineSelectionEnd:n=>{const r=t(n);e.viewer.lastSelection=r,e.onLineSelectionEnd?.(r),e.viewer.bridge.consume(r)&&requestAnimationFrame(()=>e.onLineNumberSelectionEnd?.(r))}}}function mE(e){re(()=>{e.viewer.rendered();const t=e.current();t&&(t.setLineAnnotations(e.annotations()),t.rerender(),requestAnimationFrame(()=>e.viewer.find.refresh({reset:!0})))})}function pE(e){LY({state:e.viewer.ready,container:e.viewer.container,getRoot:e.viewer.getRoot,isReady:e.isReady,settleFrames:e.settleFrames,onReady:e.onReady})}function gE(e){$d(e.viewer.ready),e.current?.cleanUp();const t=e.create();e.assign(t),e.viewer.container.innerHTML="",e.draw(t),pb(e.viewer.getHost()),e.viewer.setRendered(n=>n+1),e.onReady()}function lne(e){const t=vE(e.wrapper);if(!t)return()=>{};const n=e.container.getBoundingClientRect().height;if(!n)return()=>{};const r=e.wrapper.getBoundingClientRect().top-t.getBoundingClientRect().top,i=e.container.style.minHeight;e.container.style.minHeight=`${Math.ceil(n)}px`;let o=!1;return()=>{if(o)return;o=!0,e.container.style.minHeight=i;const a=e.wrapper.getBoundingClientRect().top-t.getBoundingClientRect().top-r;a&&(t.scrollTop+=a)}}function vE(e){let t=e.parentElement;for(;t;){const n=getComputedStyle(t);if(n.overflowY==="auto"||n.overflowY==="scroll")return t;t=t.parentElement}}function cne(e,t){let n,r;const i=()=>{n?.cleanUp(),n=void 0,r=void 0};return{get:()=>{if(!t()){i();return}if(typeof document>"u")return;const o=e();if(!o)return;const s=vE(o)??document;return n&&r===s||(i(),n=new yT,r=s,n.setup(s,s instanceof Document?void 0:o)),n},cleanup:i}}function une(e){let t;return{get:()=>{if(t)return t.virtualizer;const r=e();if(!r)return;const i=FY(r);if(i)return t=i,i.virtualizer},cleanup:()=>{t?.release(),t=void 0}}}function dne(e){if(!e.dataset.line)return;const t=parseInt(e.dataset.line,10);if(!Number.isNaN(t))return t}function yE(e,t,n){const r=e.composedPath();let i=!1,o,s;for(const a of r)if(a instanceof HTMLElement&&(i=i||a.dataset.columnNumber!=null,o===void 0&&(o=t(a)),s===void 0&&n&&(s=n(a)),i&&o!==void 0&&(n==null||s!==void 0)))break;return{line:o,numberColumn:i,side:s}}function fne(e){const t=e.dataset.lineType;if(t==="change-deletion")return"deletions";if(t==="change-addition"||t==="change-additions")return"additions";if(e.dataset.code!=null)return e.hasAttribute("data-deletions")?"deletions":"additions"}function hne(e){const t=Rp(e);if(t)return ST(t)}function bE(e){return(()=>{var t=nne(),n=t.firstChild,r=n.nextSibling;return Vo(t,"focus",e.viewer.find.onFocus),Vo(t,"pointerdown",e.viewer.find.onPointerDown,!0),pr(i=>e.viewer.wrapper=i,t),j(t,b(ce,{get when(){return e.viewer.find.open()},get children(){return b(tne,{get pos(){return e.viewer.find.pos},get query(){return e.viewer.find.query},get count(){return e.viewer.find.count},get index(){return e.viewer.find.index},get setInput(){return e.viewer.find.setInput},get onInput(){return e.viewer.find.setQuery},get onKeyDown(){return e.viewer.find.onInputKeyDown},get onClose(){return e.viewer.find.close},onPrev:()=>e.viewer.find.next(-1),onNext:()=>e.viewer.find.next(1)})}}),n),pr(i=>e.viewer.container=i,n),pr(i=>e.viewer.overlay=i,r),De(i=>{var o=e.mode,s=gY,a={...e.classList,[e.class??""]:!!e.class};return o!==i.e&&Ye(t,"data-mode",i.e=o),i.t=up(t,s,i.t),i.a=Ct(t,a,i.a),i},{e:void 0,t:void 0,a:void 0}),t})()}function mne(e){let t,n;const[r,i]=se(e,one),o=()=>{const v=r.file.contents;return typeof v=="string"?v:Array.isArray(v)?v.join(`
2362
2362
  `):v==null?"":String(v)},s=()=>{const v=o(),y=v.split(`
2363
2363
  `).length-(v.endsWith(`
2364
2364
  `)?1:0);return Math.max(1,y)},a=F(()=>{const v=r.file.contents;return typeof v=="string"?v.length:Array.isArray(v)?v.reduce((y,w)=>y+(typeof w=="string"?w.length+1:String(w).length+1),0):v==null?0:String(v).length}),l=F(()=>a()>rne),c=cne(()=>n.wrapper,l),u=v=>yE(v,dne),d=v=>{const y=t;if(!y)return!1;if(l())return y.setSelectedLines(v),!0;const w=n.getRoot();if(!w)return!1;const k=s();if(w.querySelectorAll("[data-line]").length<k)return!1;if(!v)return y.setSelectedLines(null),!0;const x=Math.min(v.start,v.end),C=Math.max(v.start,v.end);if(x<1||C>k||!w.querySelector(`[data-line="${x}"]`)||!w.querySelector(`[data-line="${C}"]`))return y.setSelectedLines(null),!0;const S=v.endSide!=null?{start:v.start,end:v.end}:v.side!=="deletions"||w.querySelector("[data-deletions]")!=null?v:{start:v.start,end:v.end};return y.setSelectedLines(S),!0},h=v=>{n.lastSelection=v,d(v)};n=dE({enableLineSelection:()=>e.enableLineSelection===!0,selectedLines:()=>r.selectedLines,commentedLines:()=>r.commentedLines,onLineSelectionEnd:v=>r.onLineSelectionEnd?.(v)},{lineFromMouseEvent:u,setSelectedLines:h,updateSelection:v=>{const y=n.getRoot();if(!y)return;const w=MT({root:y,lineForNode:PY,sideForNode:RY,preserveTextSelection:v});w&&(h(w.range),!(!v||!w.text)&&DT(y,w.text))},buildDragSelection:()=>{if(!(n.dragStart===void 0||n.dragEnd===void 0))return{start:Math.min(n.dragStart,n.dragEnd),end:Math.max(n.dragStart,n.dragEnd)}},buildClickSelection:()=>{if(n.dragStart!==void 0)return{start:n.dragStart,end:n.dragStart}},onDragStart:()=>{},onDragMove:()=>{},onDragReset:()=>{},markCommented:yY});const m=hE({viewer:n,onLineSelected:v=>r.onLineSelected?.(v),onLineSelectionEnd:v=>r.onLineSelectionEnd?.(v),onLineNumberSelectionEnd:v=>r.onLineNumberSelectionEnd?.(v)}),p=F(()=>({...xT("unified"),...i,...m})),g=()=>{pE({viewer:n,isReady:v=>l()?v.querySelector("[data-line]")!=null:v.querySelectorAll("[data-line]").length>=s(),onReady:()=>{d(n.lastSelection),n.find.refresh({reset:!0}),r.onRendered?.()}})};return fE({search:()=>r.search,find:n.find}),re(()=>{const v=p(),y=gb("unified"),w=l(),k=c.get();gE({viewer:n,current:t,create:()=>w&&k?new GZ(v,k,ine,y):new fT(v,y),assign:x=>{t=x},draw:x=>{const C=o();x.render({file:typeof r.file.contents=="string"?r.file:{...r.file,contents:C},lineAnnotations:[],containerWrapper:n.container})},onReady:g})}),mE({viewer:n,current:()=>t,annotations:()=>r.annotations??[]}),fe(()=>{t?.cleanUp(),t=void 0,c.cleanup()}),b(bE,{mode:"text",viewer:n,get class(){return r.class},get classList(){return r.classList}})}function pne(e){let t,n,r,i;const[o,s]=se(e,sne),a=R2("(max-width: 640px)"),l=v=>yE(v,C7,fne),c=(v,y)=>{const w=t;if(!w)return;const k=w7(i.getRoot(),v);if(k===void 0){i.lastSelection=v;return}i.lastSelection=k,w.setSelectedLines(k),DT(y?.root,y?.text)};i=dE({enableLineSelection:()=>e.enableLineSelection===!0,selectedLines:()=>o.selectedLines,commentedLines:()=>o.commentedLines,onLineSelectionEnd:v=>o.onLineSelectionEnd?.(v)},{lineFromMouseEvent:l,setSelectedLines:c,updateSelection:v=>{const y=i.getRoot();if(!y)return;const w=MT({root:y,lineForNode:C7,sideForNode:hne,preserveTextSelection:v});if(w){if(w.text){c(w.range,{root:y,text:w.text});return}c(w.range)}},buildDragSelection:()=>{if(i.dragStart===void 0||i.dragEnd===void 0)return;const v={start:i.dragStart,end:i.dragEnd};return n&&(v.side=n),r&&n&&r!==n&&(v.endSide=r),v},buildClickSelection:()=>{if(i.dragStart===void 0)return;const v={start:i.dragStart,end:i.dragStart};return n&&(v.side=n),v},onDragStart:v=>{n=v.side,r=v.side},onDragMove:v=>{r=v.side},onDragReset:()=>{n=void 0,r=void 0},markCommented:vY});const d=une(()=>i.container),h=F(()=>{if(o.fileDiff){const w=o.fileDiff.deletionLines.join(""),k=o.fileDiff.additionLines.join("");return Math.max(w.length,k.length)>5e5}const v=typeof o.before?.contents=="string"?o.before.contents:"",y=typeof o.after?.contents=="string"?o.after.contents:"";return Math.max(v.length,y.length)>5e5}),f={lineDiffType:"none",maxLineDiffLength:0,tokenizeMaxLineLength:1},m=hE({viewer:i,normalize:v=>w7(i.getRoot(),v),onLineSelected:v=>o.onLineSelected?.(v),onLineSelectionEnd:v=>o.onLineSelectionEnd?.(v),onLineNumberSelectionEnd:v=>o.onLineNumberSelectionEnd?.(v)}),p=F(()=>{const v={...xT(e.diffStyle),...s,...m},y=h()?{...v,...f}:v;return a()?{...y,disableLineNumbers:!0}:y}),g=v=>{pE({viewer:i,isReady:y=>y.querySelector("[data-line]")!=null,settleFrames:1,onReady:()=>{v?.(),c(i.lastSelection),i.find.refresh({reset:!0}),o.onRendered?.()}})};return fE({search:()=>o.search,find:i.find}),re(()=>{const v=p(),y=h()?gb("unified"):gb(e.diffStyle),w=d.get(),k=typeof o.before?.contents=="string"?o.before.contents:"",x=typeof o.after?.contents=="string"?o.after.contents:"",C=lne(i);fe(C);const S=$=>h()?b7($):b7($,$.length);gE({viewer:i,current:t,create:()=>w?new XZ(v,w,NY,y):new pT(v,y),assign:$=>{t=$},draw:$=>{if(o.fileDiff){$.render({fileDiff:o.fileDiff,lineAnnotations:[],containerWrapper:i.container});return}!o.before||!o.after||$.render({oldFile:{...o.before,contents:k,cacheKey:S(k)},newFile:{...o.after,contents:x,cacheKey:S(x)},lineAnnotations:[],containerWrapper:i.container})},onReady:()=>g(C)})}),mE({viewer:i,current:()=>t,annotations:()=>o.annotations??[]}),fe(()=>{t?.cleanUp(),t=void 0,d.cleanup(),n=void 0,r=void 0}),b(bE,{mode:"diff",viewer:i,get class(){return o.class},get classList(){return o.classList}})}function gne(e){return e.mode==="text"?b(C8,{get media(){return e.media},fallback:()=>mne(e)}):b(C8,{get media(){return e.media},fallback:()=>pne(e)})}or(["pointerdown"]);const vne=()=>null;var yne=ee('<svg data-component=logo-mark viewBox="0 0 512 512"fill=none xmlns=http://www.w3.org/2000/svg><path data-slot=logo-plane-mark d="M64 64L448 256L64 448V320L256 256L64 192V64Z"fill="var(--text-strong, currentColor)">'),bne=ee('<svg data-component=logo-splash viewBox="0 0 512 512"fill=none xmlns=http://www.w3.org/2000/svg><path d="M64 64L448 256L64 448V320L256 256L64 192V64Z"fill="var(--text-strong, currentColor)">'),wne=ee('<svg xmlns=http://www.w3.org/2000/svg viewBox="0 0 512 512"fill=none><path d="M64 64L448 256L64 448V320L256 256L64 192V64Z"fill="var(--text-strong, currentColor)">');const a3e=e=>(()=>{var t=yne();return De(n=>Ct(t,{[e.class??""]:!!e.class},n)),t})(),wE=e=>(()=>{var t=bne(),n=e.ref;return typeof n=="function"?pr(n,t):e.ref=t,De(r=>Ct(t,{[e.class??""]:!!e.class},r)),t})(),kne=e=>(()=>{var t=wne();return De(n=>Ct(t,{[e.class??""]:!!e.class},n)),t})(),xne="OC-2",Sne="oc-2",_ne={palette:{neutral:"#f6f3ee",ink:"#241f1b",primary:"#d7cfa3",success:"#5e9f6e",warning:"#d9a64b",error:"#d85f4c",info:"#8c77b5",interactive:"#4f7fbc",diffAdd:"#cde8cf",diffDelete:"#f0b9ae"},overrides:{"text-strong":"#241f1b","text-base":"#67615a","text-weak":"#8b857e","text-weaker":"#bdb6ad","border-weak-base":"#ddd7cf","border-weaker-base":"#ece7df","icon-base":"#8b857e","icon-weak-base":"#bdb6ad","surface-raised-base":"#f1eee8","surface-raised-base-hover":"#ebe6de","surface-base":"#f7f4ef","surface-base-hover":"#0000000A","surface-interactive-weak":"#eef3f9","icon-success-base":"#4f9560","surface-success-base":"#edf8ee","syntax-comment":"#8b857e","syntax-keyword":"#7d6aa1","syntax-string":"#367d6f","syntax-primitive":"#446fa8","syntax-property":"#826996","syntax-type":"#846d35","syntax-constant":"#2f7a83","syntax-critical":"#b86c4a","syntax-diff-delete":"#b96b5b","syntax-diff-unknown":"#8c77b5","surface-critical-base":"#fff0ec"}},Cne={palette:{neutral:"#1c1b19",ink:"#eee9e1",primary:"#c9a37b",success:"#75b584",warning:"#d6ad5d",error:"#df6d5c",info:"#b399cf",interactive:"#83a9d8",diffAdd:"#9ec8a4",diffDelete:"#df6d5c"},overrides:{"text-strong":"#ebe7df","text-base":"#b8b0a6","text-weak":"#867e74","text-weaker":"#625b53","border-weak-base":"#302d29","border-weaker-base":"#26231f","icon-base":"#958d83","icon-weak-base":"#474139","surface-raised-base":"#24221f","surface-raised-base-hover":"#2b2824","surface-base":"#1e1d1a","surface-base-hover":"#FFFFFF0D","surface-interactive-weak":"#182436","surface-success-base":"#0d2913","syntax-comment":"#867e74","syntax-keyword":"#b399cf","syntax-string":"#75b5a6","syntax-primitive":"#8fb2d8","syntax-property":"#c9a37b","syntax-type":"#d6bd78","syntax-constant":"#88c6c9","syntax-critical":"#d49a73","syntax-diff-delete":"#d49a73","syntax-diff-unknown":"#b399cf","surface-critical-base":"#28110d"}},Ine={name:xne,id:Sne,light:_ne,dark:Cne},kE="codeplane-color-scheme",dd="oc-2",I8=Ine;function Tne(){if(typeof localStorage!="object")return null;try{return localStorage.getItem(kE)}catch{return null}}function Ene(e){if(typeof localStorage=="object")try{localStorage.setItem(kE,e)}catch{}}function Kh(){return typeof window!="object"?"light":window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"}function T8(e){if(typeof document!="object")return;const t=document.documentElement;e==="dark"?t.classList.add("dark"):t.classList.remove("dark"),t.style.colorScheme=e,t.dataset.colorScheme=e,t.dataset.theme=dd}function $ne(){if(typeof document=="object"){if(typeof localStorage=="object")try{localStorage.removeItem("codeplane-theme-id"),localStorage.removeItem("codeplane-theme-css-light"),localStorage.removeItem("codeplane-theme-css-dark")}catch{}document.getElementById("oc-theme")?.remove(),document.getElementById("oc-theme-preload")?.remove()}}const{use:Ane,provider:Lne}=hn({name:"Theme",init:e=>{e.defaultTheme;const t=Tne()??"system",n=t==="system"?Kh():t,[r,i]=Je({themes:{[dd]:I8},themeId:dd,colorScheme:t,mode:n,previewThemeId:null,previewScheme:null});Kt(()=>{$ne();const a=window.matchMedia("(prefers-color-scheme: dark)");Ln(a,"change",()=>{r.colorScheme==="system"&&i("mode",Kh())}),T8(r.mode),e.onThemeApplied?.(I8,r.mode)}),re(()=>{const a=r.previewScheme?r.previewScheme==="system"?Kh():r.previewScheme:r.mode;T8(a)});const o=a=>{i("colorScheme",a),Ene(a),i("mode",a==="system"?Kh():a)},s=()=>{};return{themeId:()=>r.themeId,colorScheme:()=>r.colorScheme,mode:()=>r.mode,ids:()=>[dd],name:a=>a===dd?"Codeplane":a,loadThemes:()=>Promise.resolve(r.themes),themes:()=>r.themes,setTheme:s,setColorScheme:o,registerTheme:s,previewTheme:s,previewColorScheme:a=>{i("previewScheme",a)},commitPreview:()=>{r.previewScheme&&o(r.previewScheme),i("previewScheme",null)},cancelPreview:()=>{i("previewScheme",null)}}}}),Dne=pt(),Mne=["title","meta"],E8=[],$8=["name","http-equiv","content","charset","media"].concat(["property"]),A8=(e,t)=>{const n=Object.fromEntries(Object.entries(e.props).filter(([r])=>t.includes(r)).sort());return(Object.hasOwn(n,"name")||Object.hasOwn(n,"property"))&&(n.name=n.name||n.property,delete n.property),e.tag+JSON.stringify(n)};function One(){if(!qe.context){const n=document.head.querySelectorAll("[data-sm]");Array.prototype.forEach.call(n,r=>r.parentNode.removeChild(r))}const e=new Map;function t(n){if(n.ref)return n.ref;let r=document.querySelector(`[data-sm="${n.id}"]`);return r?(r.tagName.toLowerCase()!==n.tag&&(r.parentNode&&r.parentNode.removeChild(r),r=document.createElement(n.tag)),r.removeAttribute("data-sm")):r=document.createElement(n.tag),r}return{addTag(n){if(Mne.indexOf(n.tag)!==-1){const o=n.tag==="title"?E8:$8,s=A8(n,o);e.has(s)||e.set(s,[]);let a=e.get(s),l=a.length;a=[...a,n],e.set(s,a);let c=t(n);n.ref=c,jr(c,n.props);let u=null;for(var r=l-1;r>=0;r--)if(a[r]!=null){u=a[r];break}return c.parentNode!=document.head&&document.head.appendChild(c),u&&u.ref&&u.ref.parentNode&&document.head.removeChild(u.ref),l}let i=t(n);return n.ref=i,jr(i,n.props),i.parentNode!=document.head&&document.head.appendChild(i),-1},removeTag(n,r){const i=n.tag==="title"?E8:$8,o=A8(n,i);if(n.ref){const s=e.get(o);if(s){if(n.ref.parentNode){n.ref.parentNode.removeChild(n.ref);for(let a=r-1;a>=0;a--)s[a]!=null&&document.head.appendChild(s[a].ref)}s[r]=null,e.set(o,s)}else n.ref.parentNode&&n.ref.parentNode.removeChild(n.ref)}}}}const Pne=e=>{const t=One();return b(Dne.Provider,{value:t,get children(){return e.children}})};function xE(){let e=new Set;function t(i){return e.add(i),()=>e.delete(i)}let n=!1;function r(i,o){if(n)return!(n=!1);const s={to:i,options:o,defaultPrevented:!1,preventDefault:()=>s.defaultPrevented=!0};for(const a of e)a.listener({...s,from:a.location,retry:l=>{l&&(n=!0),a.navigate(i,{...o,resolve:!1})}});return!s.defaultPrevented}return{subscribe:t,confirm:r}}let Sb;function Kw(){(!window.history.state||window.history.state._depth==null)&&window.history.replaceState({...window.history.state,_depth:window.history.length-1},""),Sb=window.history.state._depth}Kw();function Rne(e){return{...e,_depth:window.history.state&&window.history.state._depth}}function Nne(e,t){let n=!1;return()=>{const r=Sb;Kw();const i=r==null?null:Sb-r;if(n){n=!1;return}i&&t(i)?(n=!0,window.history.go(-i)):e()}}const zne=/^(?:[a-z0-9]+:)?\/\//i,jne=/^\/+|(\/)\/+$/g,SE="http://sr";function rl(e,t=!1){const n=e.replace(jne,"$1");return n?t||/^[?#]/.test(n)?n:"/"+n:""}function M0(e,t,n){if(zne.test(t))return;const r=rl(e),i=n&&rl(n);let o="";return!i||t.startsWith("/")?o=r:i.toLowerCase().indexOf(r.toLowerCase())!==0?o=r+i:o=i,(o||"/")+rl(t,!o)}function Fne(e,t){if(e==null)throw new Error(t);return e}function Une(e,t){return rl(e).replace(/\/*(\*.*)?$/g,"")+rl(t)}function _E(e){const t={};return e.searchParams.forEach((n,r)=>{r in t?Array.isArray(t[r])?t[r].push(n):t[r]=[t[r],n]:t[r]=n}),t}function Hne(e,t,n){const[r,i]=e.split("/*",2),o=r.split("/").filter(Boolean),s=o.length;return a=>{const l=a.split("/").filter(Boolean),c=l.length-s;if(c<0||c>0&&i===void 0&&!t)return null;const u={path:s?"":"/",params:{}},d=h=>n===void 0?void 0:n[h];for(let h=0;h<s;h++){const f=o[h],m=f[0]===":",p=m?l[h]:l[h].toLowerCase(),g=m?f.slice(1):f.toLowerCase();if(m&&wv(p,d(g)))u.params[g]=p;else if(m||!wv(p,g))return null;u.path+=`/${p}`}if(i){const h=c?l.slice(-c).join("/"):"";if(wv(h,d(i)))u.params[i]=h;else return null}return u}}function wv(e,t){const n=r=>r===e;return t===void 0?!0:typeof t=="string"?n(t):typeof t=="function"?t(e):Array.isArray(t)?t.some(n):t instanceof RegExp?t.test(e):!1}function Bne(e){const[t,n]=e.pattern.split("/*",2),r=t.split("/").filter(Boolean);return r.reduce((i,o)=>i+(o.startsWith(":")?2:3),r.length-(n===void 0?0:1))}function CE(e){const t=new Map,n=mo();return new Proxy({},{get(r,i){return t.has(i)||bs(n,()=>t.set(i,F(()=>e()[i]))),t.get(i)()},getOwnPropertyDescriptor(){return{enumerable:!0,configurable:!0}},ownKeys(){return Reflect.ownKeys(e())},has(r,i){return i in e()}})}function Vne(e,t){const n=new URLSearchParams(e);Object.entries(t).forEach(([i,o])=>{o==null||o===""||o instanceof Array&&!o.length?n.delete(i):o instanceof Array?(n.delete(i),o.forEach(s=>{n.append(i,String(s))})):n.set(i,String(o))});const r=n.toString();return r?`?${r}`:""}function IE(e){let t=/(\/?\:[^\/]+)\?/.exec(e);if(!t)return[e];let n=e.slice(0,t.index),r=e.slice(t.index+t[0].length);const i=[n,n+=t[1]];for(;t=/^(\/\:[^\/]+)\?/.exec(r);)i.push(n+=t[1]),r=r.slice(t[0].length);return IE(r).reduce((o,s)=>[...o,...i.map(a=>a+s)],[])}const qne=100,TE=pt(),Zw=pt(),au=()=>Fne(ut(TE),"<A> and 'use' router primitives can be only used inside a Route."),Wne=()=>ut(Zw)||au().base,Gne=e=>{const t=Wne();return F(()=>t.resolvePath(e()))},Kne=e=>{const t=au();return F(()=>{const n=e();return n!==void 0?t.renderPath(n):n})},xo=()=>au().navigatorFactory(),So=()=>au().location,Zne=()=>au().isRouting,ri=()=>au().params,l3e=()=>{const e=So(),t=xo(),n=(r,i)=>{const o=ot(()=>Vne(e.search,r)+e.hash);t(o,{scroll:!1,resolve:!1,...i})};return[e.query,n]};function Yne(e,t=""){const{component:n,preload:r,load:i,children:o,info:s}=e,a=!o||Array.isArray(o)&&!o.length,l={key:e,component:n,preload:r||i,info:s};return EE(e.path).reduce((c,u)=>{for(const d of IE(u)){const h=Une(t,d);let f=a?h:h.split("/*",1)[0];f=f.split("/").map(m=>m.startsWith(":")||m.startsWith("*")?m:encodeURIComponent(m)).join("/"),c.push({...l,originalPath:u,pattern:f,matcher:Hne(f,!a,e.matchFilters)})}return c},[])}function Xne(e,t=0){return{routes:e,score:Bne(e[e.length-1])*1e4-t,matcher(n){const r=[];for(let i=e.length-1;i>=0;i--){const o=e[i],s=o.matcher(n);if(!s)return null;r.unshift({...s,route:o})}return r}}}function EE(e){return Array.isArray(e)?e:[e]}function $E(e,t="",n=[],r=[]){const i=EE(e);for(let o=0,s=i.length;o<s;o++){const a=i[o];if(a&&typeof a=="object"){a.hasOwnProperty("path")||(a.path="");const l=Yne(a,t);for(const c of l){n.push(c);const u=Array.isArray(a.children)&&a.children.length===0;if(a.children&&!u)$E(a.children,c.pattern,n,r);else{const d=Xne([...n],r.length);r.push(d)}n.pop()}}}return n.length?r:r.sort((o,s)=>s.score-o.score)}function kv(e,t){for(let n=0,r=e.length;n<r;n++){const i=e[n].matcher(t);if(i)return i}return[]}function Jne(e,t,n){const r=new URL(SE),i=F(u=>{const d=e();try{return new URL(d,r)}catch{return console.error(`Invalid path ${d}`),u}},r,{equals:(u,d)=>u.href===d.href}),o=F(()=>i().pathname),s=F(()=>i().search,!0),a=F(()=>i().hash),l=()=>"",c=gt(s,()=>_E(i()));return{get pathname(){return o()},get search(){return s()},get hash(){return a()},get state(){return t()},get key(){return l()},query:n?n(c):CE(c)}}let Ga;function Qne(){return Ga}function ere(e,t,n,r={}){const{signal:[i,o],utils:s={}}=e,a=s.parsePath||(A=>A),l=s.renderPath||(A=>A),c=s.beforeLeave||xE(),u=M0("",r.base||"");if(u===void 0)throw new Error(`${u} is not a valid base path`);u&&!i().value&&o({value:u,replace:!0,scroll:!1});const[d,h]=de(!1);let f;const m=(A,T)=>{T.value===p()&&T.state===v()||(f===void 0&&h(!0),Ga=A,f=T,cj(()=>{f===T&&(g(f.value),y(f.state),bj(),x[1](N=>N.filter(W=>W.pending)))}).finally(()=>{f===T&&Xe(()=>{Ga=void 0,A==="navigate"&&I(f),h(!1),f=void 0})}))},[p,g]=de(i().value),[v,y]=de(i().state),w=Jne(p,v,s.queryWrapper),k=[],x=de([]),C=F(()=>typeof r.transformUrl=="function"?kv(t(),r.transformUrl(w.pathname)):kv(t(),w.pathname)),S=()=>{const A=C(),T={};for(let N=0;N<A.length;N++)Object.assign(T,A[N].params);return T},$=s.paramsWrapper?s.paramsWrapper(S,t):CE(S),O={pattern:u,path:()=>u,outlet:()=>null,resolvePath(A){return M0(u,A)}};return De(gt(i,A=>m("native",A),{defer:!0})),{base:O,location:w,params:$,isRouting:d,renderPath:l,parsePath:a,navigatorFactory:M,matches:C,beforeLeave:c,preloadRoute:L,singleFlight:r.singleFlight===void 0?!0:r.singleFlight,submissions:x};function D(A,T,N){ot(()=>{if(typeof T=="number"){T&&(s.go?s.go(T):console.warn("Router integration does not support relative routing"));return}const W=!T||T[0]==="?",{replace:K,resolve:V,scroll:q,state:B}={replace:!1,resolve:!W,scroll:!0,...N},Y=V?A.resolvePath(T):M0(W&&w.pathname||"",T);if(Y===void 0)throw new Error(`Path '${T}' is not a routable path`);if(k.length>=qne)throw new Error("Too many redirects");const J=p();(Y!==J||B!==v())&&(xy||c.confirm(Y,N)&&(k.push({value:J,replace:K,scroll:q,state:v()}),m("navigate",{value:Y,state:B})))})}function M(A){return A=A||ut(Zw)||O,(T,N)=>D(A,T,N)}function I(A){const T=k[0];T&&(o({...A,replace:T.replace,scroll:T.scroll}),k.length=0)}function L(A,T){const N=kv(t(),A.pathname),W=Ga;Ga="preload";for(let K in N){const{route:V,params:q}=N[K];V.component&&V.component.preload&&V.component.preload();const{preload:B}=V;T&&B&&bs(n(),()=>B({params:q,location:{pathname:A.pathname,search:A.search,hash:A.hash,query:_E(A),state:null,key:""},intent:"preload"}))}Ga=W}}function tre(e,t,n,r){const{base:i,location:o,params:s}=e,{pattern:a,component:l,preload:c}=r().route,u=F(()=>r().path);l&&l.preload&&l.preload();const d=c?c({params:s,location:o,intent:Ga||"initial"}):void 0;return{parent:t,pattern:a,path:u,outlet:()=>l?b(l,{params:s,location:o,data:d,get children(){return n()}}):n(),resolvePath(f){return M0(i.path(),f,u())}}}const nre=e=>t=>{const{base:n}=t,r=Cl(()=>t.children),i=F(()=>$E(r(),t.base||""));let o;const s=ere(e,i,()=>o,{base:n,singleFlight:t.singleFlight,transformUrl:t.transformUrl});return e.create&&e.create(s),b(TE.Provider,{value:s,get children(){return b(rre,{routerState:s,get root(){return t.root},get preload(){return t.rootPreload||t.rootLoad},get children(){return[je(()=>(o=mo())&&null),b(ire,{routerState:s,get branches(){return i()}})]}})}})};function rre(e){const t=e.routerState.location,n=e.routerState.params,r=F(()=>e.preload&&ot(()=>{e.preload({params:n,location:t,intent:Qne()||"initial"})}));return b(ce,{get when(){return e.root},keyed:!0,get fallback(){return e.children},children:i=>b(i,{params:n,location:t,get data(){return r()},get children(){return e.children}})})}function ire(e){const t=[];let n;const r=F(gt(e.routerState.matches,(i,o,s)=>{let a=o&&i.length===o.length;const l=[];for(let c=0,u=i.length;c<u;c++){const d=o&&o[c],h=i[c];s&&d&&h.route.key===d.route.key?l[c]=s[c]:(a=!1,t[c]&&t[c](),jn(f=>{t[c]=f,l[c]=tre(e.routerState,l[c-1]||e.routerState.base,L8(()=>r()[c+1]),()=>{const m=e.routerState.matches();return m[c]??m[0]})}))}return t.splice(i.length).forEach(c=>c()),s&&a?s:(n=l[0],l)}));return L8(()=>r()&&n)()}const L8=e=>()=>b(ce,{get when(){return e()},keyed:!0,children:t=>b(Zw.Provider,{value:t,get children(){return t.outlet()}})}),Dr=e=>{const t=Cl(()=>e.children);return ne(e,{get children(){return t()}})};function ore([e,t],n,r){return[e,r?i=>t(r(i)):t]}function sre(e){let t=!1;const n=i=>typeof i=="string"?{value:i}:i,r=ore(de(n(e.get()),{equals:(i,o)=>i.value===o.value&&i.state===o.state}),void 0,i=>(!t&&e.set(i),qe.registry&&!qe.done&&(qe.done=!0),i));return e.init&&fe(e.init((i=e.get())=>{t=!0,r[1](n(i)),t=!1})),nre({signal:r,create:e.create,utils:e.utils})}function are(e,t,n){return e.addEventListener(t,n),()=>e.removeEventListener(t,n)}function lre(e,t){const n=e&&document.getElementById(e);n?n.scrollIntoView():t&&window.scrollTo(0,0)}const cre=new Map;function ure(e=!0,t=!1,n="/_server",r){return i=>{const o=i.base.path(),s=i.navigatorFactory(i.base);let a,l;function c(p){return p.namespaceURI==="http://www.w3.org/2000/svg"}function u(p){if(p.defaultPrevented||p.button!==0||p.metaKey||p.altKey||p.ctrlKey||p.shiftKey)return;const g=p.composedPath().find(C=>C instanceof Node&&C.nodeName.toUpperCase()==="A");if(!g||t&&!g.hasAttribute("link"))return;const v=c(g),y=v?g.href.baseVal:g.href;if((v?g.target.baseVal:g.target)||!y&&!g.hasAttribute("state"))return;const k=(g.getAttribute("rel")||"").split(/\s+/);if(g.hasAttribute("download")||k&&k.includes("external"))return;const x=v?new URL(y,document.baseURI):new URL(y);if(!(x.origin!==window.location.origin||o&&x.pathname&&!x.pathname.toLowerCase().startsWith(o.toLowerCase())))return[g,x]}function d(p){const g=u(p);if(!g)return;const[v,y]=g,w=i.parsePath(y.pathname+y.search+y.hash),k=v.getAttribute("state");p.preventDefault(),s(w,{resolve:!1,replace:v.hasAttribute("replace"),scroll:!v.hasAttribute("noscroll"),state:k?JSON.parse(k):void 0})}function h(p){const g=u(p);if(!g)return;const[v,y]=g;r&&(y.pathname=r(y.pathname)),i.preloadRoute(y,v.getAttribute("preload")!=="false")}function f(p){clearTimeout(a);const g=u(p);if(!g)return l=null;const[v,y]=g;l!==v&&(r&&(y.pathname=r(y.pathname)),a=setTimeout(()=>{i.preloadRoute(y,v.getAttribute("preload")!=="false"),l=v},20))}function m(p){if(p.defaultPrevented)return;let g=p.submitter&&p.submitter.hasAttribute("formaction")?p.submitter.getAttribute("formaction"):p.target.getAttribute("action");if(!g)return;if(!g.startsWith("https://action/")){const y=new URL(g,SE);if(g=i.parsePath(y.pathname+y.search),!g.startsWith(n))return}if(p.target.method.toUpperCase()!=="POST")throw new Error("Only POST forms are supported for Actions");const v=cre.get(g);if(v){p.preventDefault();const y=new FormData(p.target,p.submitter);v.call({r:i,f:p.target},p.target.enctype==="multipart/form-data"?y:new URLSearchParams(y))}}or(["click","submit"]),document.addEventListener("click",d),e&&(document.addEventListener("mousemove",f,{passive:!0}),document.addEventListener("focusin",h,{passive:!0}),document.addEventListener("touchstart",h,{passive:!0})),document.addEventListener("submit",m),fe(()=>{document.removeEventListener("click",d),e&&(document.removeEventListener("mousemove",f),document.removeEventListener("focusin",h),document.removeEventListener("touchstart",h)),document.removeEventListener("submit",m)})}}function dre(e){const t=()=>{const r=window.location.pathname.replace(/^\/+/,"/")+window.location.search,i=window.history.state&&window.history.state._depth&&Object.keys(window.history.state).length===1?void 0:window.history.state;return{value:r+window.location.hash,state:i}},n=xE();return sre({get:t,set({value:r,replace:i,scroll:o,state:s}){i?window.history.replaceState(Rne(s),"",r):window.history.pushState(s,"",r),lre(decodeURIComponent(window.location.hash.slice(1)),o),Kw()},init:r=>are(window,"popstate",Nne(r,i=>{if(i)return!n.confirm(i);{const o=t();return!n.confirm(o.value,{state:o.state})}})),create:ure(e.preload,e.explicitLinks,e.actionBase,e.transformUrl),utils:{go:r=>window.history.go(r),beforeLeave:n}})(e)}var fre=ee("<a>");function Uc(e){e=ne({inactiveClass:"inactive",activeClass:"active"},e);const[,t]=se(e,["href","state","class","activeClass","inactiveClass","end"]),n=Gne(()=>e.href),r=Kne(n),i=So(),o=F(()=>{const s=n();if(s===void 0)return[!1,!1];const a=rl(s.split(/[?#]/,1)[0]).toLowerCase(),l=decodeURI(rl(i.pathname).toLowerCase());return[e.end?a===l:l.startsWith(a+"/")||l===a,a===l]});return(()=>{var s=fre();return jr(s,ne(t,{get href(){return r()||e.href},get state(){return JSON.stringify(e.state)},get classList(){return{...e.class&&{[e.class]:!0},[e.inactiveClass]:!o()[0],[e.activeClass]:o()[0],...t.classList}},link:"",get"aria-current"(){return o()[1]?"page":void 0}}),!1,!1),s})()}function lu(e){const t=xo(),n=So(),{href:r,state:i}=e,o=typeof r=="function"?r({navigate:t,location:n}):r;return t(o,{replace:!0,state:i}),null}var Ml=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(e){return this.listeners.add(e),this.onSubscribe(),()=>{this.listeners.delete(e),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},hre=class extends Ml{#t;#e;#n;constructor(){super(),this.#n=e=>{if(typeof window<"u"&&window.addEventListener){const t=()=>e();return window.addEventListener("visibilitychange",t,!1),()=>{window.removeEventListener("visibilitychange",t)}}}}onSubscribe(){this.#e||this.setEventListener(this.#n)}onUnsubscribe(){this.hasListeners()||(this.#e?.(),this.#e=void 0)}setEventListener(e){this.#n=e,this.#e?.(),this.#e=e(t=>{typeof t=="boolean"?this.setFocused(t):this.onFocus()})}setFocused(e){this.#t!==e&&(this.#t=e,this.onFocus())}onFocus(){const e=this.isFocused();this.listeners.forEach(t=>{t(e)})}isFocused(){return typeof this.#t=="boolean"?this.#t:globalThis.document?.visibilityState!=="hidden"}},Yw=new hre,mre={setTimeout:(e,t)=>setTimeout(e,t),clearTimeout:e=>clearTimeout(e),setInterval:(e,t)=>setInterval(e,t),clearInterval:e=>clearInterval(e)},pre=class{#t=mre;#e=!1;setTimeoutProvider(e){this.#t=e}setTimeout(e,t){return this.#t.setTimeout(e,t)}clearTimeout(e){this.#t.clearTimeout(e)}setInterval(e,t){return this.#t.setInterval(e,t)}clearInterval(e){this.#t.clearInterval(e)}},Ja=new pre;function gre(e){setTimeout(e,0)}var vre=typeof window>"u"||"Deno"in globalThis;function er(){}function yre(e,t){return typeof e=="function"?e(t):e}function _b(e){return typeof e=="number"&&e>=0&&e!==1/0}function AE(e,t){return Math.max(e+(t||0)-Date.now(),0)}function ca(e,t){return typeof e=="function"?e(t):e}function Li(e,t){return typeof e=="function"?e(t):e}function D8(e,t){const{type:n="all",exact:r,fetchStatus:i,predicate:o,queryKey:s,stale:a}=e;if(s){if(r){if(t.queryHash!==Xw(s,t.options))return!1}else if(!Yd(t.queryKey,s))return!1}if(n!=="all"){const l=t.isActive();if(n==="active"&&!l||n==="inactive"&&l)return!1}return!(typeof a=="boolean"&&t.isStale()!==a||i&&i!==t.state.fetchStatus||o&&!o(t))}function M8(e,t){const{exact:n,status:r,predicate:i,mutationKey:o}=e;if(o){if(!t.options.mutationKey)return!1;if(n){if(gl(t.options.mutationKey)!==gl(o))return!1}else if(!Yd(t.options.mutationKey,o))return!1}return!(r&&t.state.status!==r||i&&!i(t))}function Xw(e,t){return(t?.queryKeyHashFn||gl)(e)}function gl(e){return JSON.stringify(e,(t,n)=>Cb(n)?Object.keys(n).sort().reduce((r,i)=>(r[i]=n[i],r),{}):n)}function Yd(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?Object.keys(t).every(n=>Yd(e[n],t[n])):!1}var bre=Object.prototype.hasOwnProperty;function Jw(e,t,n=0){if(e===t)return e;if(n>500)return t;const r=O8(e)&&O8(t);if(!r&&!(Cb(e)&&Cb(t)))return t;const o=(r?e:Object.keys(e)).length,s=r?t:Object.keys(t),a=s.length,l=r?new Array(a):{};let c=0;for(let u=0;u<a;u++){const d=r?u:s[u],h=e[d],f=t[d];if(h===f){l[d]=h,(r?u<o:bre.call(e,d))&&c++;continue}if(h===null||f===null||typeof h!="object"||typeof f!="object"){l[d]=f;continue}const m=Jw(h,f,n+1);l[d]=m,m===h&&c++}return o===a&&c===o?e:l}function Xd(e,t){if(!t||Object.keys(e).length!==Object.keys(t).length)return!1;for(const n in e)if(e[n]!==t[n])return!1;return!0}function O8(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function Cb(e){if(!P8(e))return!1;const t=e.constructor;if(t===void 0)return!0;const n=t.prototype;return!(!P8(n)||!n.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(e)!==Object.prototype)}function P8(e){return Object.prototype.toString.call(e)==="[object Object]"}function wre(e){return new Promise(t=>{Ja.setTimeout(t,e)})}function Ib(e,t,n){return typeof n.structuralSharing=="function"?n.structuralSharing(e,t):n.structuralSharing!==!1?Jw(e,t):t}function kre(e,t,n=0){const r=[...e,t];return n&&r.length>n?r.slice(1):r}function xre(e,t,n=0){const r=[t,...e];return n&&r.length>n?r.slice(0,-1):r}var Ol=Symbol();function LE(e,t){return!e.queryFn&&t?.initialPromise?()=>t.initialPromise:!e.queryFn||e.queryFn===Ol?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function DE(e,t){return typeof e=="function"?e(...t):!!e}function Sre(e,t,n){let r=!1,i;return Object.defineProperty(e,"signal",{enumerable:!0,get:()=>(i??=t(),r||(r=!0,i.aborted?n():i.addEventListener("abort",n,{once:!0})),i)}),e}var Cm=(()=>{let e=()=>vre;return{isServer(){return e()},setIsServer(t){e=t}}})();function Tb(){let e,t;const n=new Promise((i,o)=>{e=i,t=o});n.status="pending",n.catch(()=>{});function r(i){Object.assign(n,i),delete n.resolve,delete n.reject}return n.resolve=i=>{r({status:"fulfilled",value:i}),e(i)},n.reject=i=>{r({status:"rejected",reason:i}),t(i)},n}function _re(e){let t;if(e.then(n=>(t=n,n),er)?.catch(er),t!==void 0)return{data:t}}function Cre(e){return e}function Ire(e,t,n){if(typeof t!="object"||t===null)return;const r=e.getMutationCache(),i=e.getQueryCache(),o=e.getDefaultOptions().hydrate?.deserializeData??Cre,s=t.mutations||[],a=t.queries||[];s.forEach(({state:l,...c})=>{r.build(e,{...e.getDefaultOptions().hydrate?.mutations,...n?.defaultOptions?.mutations,...c},l)}),a.forEach(({queryKey:l,state:c,queryHash:u,meta:d,promise:h,dehydratedAt:f})=>{const m=h?_re(h):void 0,p=c.data===void 0?m?.data:c.data,g=p===void 0?p:o(p);let v=i.get(u);const y=v?.state.status==="pending",w=v?.state.fetchStatus==="fetching";if(v){const k=m&&f!==void 0&&f>v.state.dataUpdatedAt;if(c.dataUpdatedAt>v.state.dataUpdatedAt||k){const{fetchStatus:x,...C}=c;v.setState({...C,data:g})}}else v=i.build(e,{...e.getDefaultOptions().hydrate?.queries,...n?.defaultOptions?.queries,queryKey:l,queryHash:u,meta:d},{...c,data:g,fetchStatus:"idle",status:g!==void 0?"success":c.status});h&&!y&&!w&&(f===void 0||f>v.state.dataUpdatedAt)&&v.fetch(void 0,{initialPromise:Promise.resolve(h).then(o)}).catch(er)})}var Tre=gre;function Ere(){let e=[],t=0,n=a=>{a()},r=a=>{a()},i=Tre;const o=a=>{t?e.push(a):i(()=>{n(a)})},s=()=>{const a=e;e=[],a.length&&i(()=>{r(()=>{a.forEach(l=>{n(l)})})})};return{batch:a=>{let l;t++;try{l=a()}finally{t--,t||s()}return l},batchCalls:a=>(...l)=>{o(()=>{a(...l)})},schedule:o,setNotifyFunction:a=>{n=a},setBatchNotifyFunction:a=>{r=a},setScheduler:a=>{i=a}}}var Kn=Ere(),$re=class extends Ml{#t=!0;#e;#n;constructor(){super(),this.#n=e=>{if(typeof window<"u"&&window.addEventListener){const t=()=>e(!0),n=()=>e(!1);return window.addEventListener("online",t,!1),window.addEventListener("offline",n,!1),()=>{window.removeEventListener("online",t),window.removeEventListener("offline",n)}}}}onSubscribe(){this.#e||this.setEventListener(this.#n)}onUnsubscribe(){this.hasListeners()||(this.#e?.(),this.#e=void 0)}setEventListener(e){this.#n=e,this.#e?.(),this.#e=e(this.setOnline.bind(this))}setOnline(e){this.#t!==e&&(this.#t=e,this.listeners.forEach(n=>{n(e)}))}isOnline(){return this.#t}},Im=new $re;function Are(e){return Math.min(1e3*2**e,3e4)}function ME(e){return(e??"online")==="online"?Im.isOnline():!0}var Eb=class extends Error{constructor(e){super("CancelledError"),this.revert=e?.revert,this.silent=e?.silent}};function OE(e){let t=!1,n=0,r;const i=Tb(),o=()=>i.status!=="pending",s=p=>{if(!o()){const g=new Eb(p);h(g),e.onCancel?.(g)}},a=()=>{t=!0},l=()=>{t=!1},c=()=>Yw.isFocused()&&(e.networkMode==="always"||Im.isOnline())&&e.canRun(),u=()=>ME(e.networkMode)&&e.canRun(),d=p=>{o()||(r?.(),i.resolve(p))},h=p=>{o()||(r?.(),i.reject(p))},f=()=>new Promise(p=>{r=g=>{(o()||c())&&p(g)},e.onPause?.()}).then(()=>{r=void 0,o()||e.onContinue?.()}),m=()=>{if(o())return;let p;const g=n===0?e.initialPromise:void 0;try{p=g??e.fn()}catch(v){p=Promise.reject(v)}Promise.resolve(p).then(d).catch(v=>{if(o())return;const y=e.retry??(Cm.isServer()?0:3),w=e.retryDelay??Are,k=typeof w=="function"?w(n,v):w,x=y===!0||typeof y=="number"&&n<y||typeof y=="function"&&y(n,v);if(t||!x){h(v);return}n++,e.onFail?.(n,v),wre(k).then(()=>c()?void 0:f()).then(()=>{t?h(v):m()})})};return{promise:i,status:()=>i.status,cancel:s,continue:()=>(r?.(),i),cancelRetry:a,continueRetry:l,canStart:u,start:()=>(u()?m():f().then(m),i)}}var PE=class{#t;destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),_b(this.gcTime)&&(this.#t=Ja.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(Cm.isServer()?1/0:300*1e3))}clearGcTimeout(){this.#t&&(Ja.clearTimeout(this.#t),this.#t=void 0)}},Lre=class extends PE{#t;#e;#n;#i;#r;#o;#s;constructor(e){super(),this.#s=!1,this.#o=e.defaultOptions,this.setOptions(e.options),this.observers=[],this.#i=e.client,this.#n=this.#i.getQueryCache(),this.queryKey=e.queryKey,this.queryHash=e.queryHash,this.#t=N8(this.options),this.state=e.state??this.#t,this.scheduleGc()}get meta(){return this.options.meta}get promise(){return this.#r?.promise}setOptions(e){if(this.options={...this.#o,...e},this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){const t=N8(this.options);t.data!==void 0&&(this.setState(R8(t.data,t.dataUpdatedAt)),this.#t=t)}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&this.#n.remove(this)}setData(e,t){const n=Ib(this.state.data,e,this.options);return this.#l({data:n,type:"success",dataUpdatedAt:t?.updatedAt,manual:t?.manual}),n}setState(e,t){this.#l({type:"setState",state:e,setStateOptions:t})}cancel(e){const t=this.#r?.promise;return this.#r?.cancel(e),t?t.then(er).catch(er):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}get resetState(){return this.#t}reset(){this.destroy(),this.setState(this.resetState)}isActive(){return this.observers.some(e=>Li(e.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===Ol||!this.isFetched()}isFetched(){return this.state.dataUpdateCount+this.state.errorUpdateCount>0}isStatic(){return this.getObserversCount()>0?this.observers.some(e=>ca(e.options.staleTime,this)==="static"):!1}isStale(){return this.getObserversCount()>0?this.observers.some(e=>e.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(e=0){return this.state.data===void 0?!0:e==="static"?!1:this.state.isInvalidated?!0:!AE(this.state.dataUpdatedAt,e)}onFocus(){this.observers.find(t=>t.shouldFetchOnWindowFocus())?.refetch({cancelRefetch:!1}),this.#r?.continue()}onOnline(){this.observers.find(t=>t.shouldFetchOnReconnect())?.refetch({cancelRefetch:!1}),this.#r?.continue()}addObserver(e){this.observers.includes(e)||(this.observers.push(e),this.clearGcTimeout(),this.#n.notify({type:"observerAdded",query:this,observer:e}))}removeObserver(e){this.observers.includes(e)&&(this.observers=this.observers.filter(t=>t!==e),this.observers.length||(this.#r&&(this.#s||this.#a()?this.#r.cancel({revert:!0}):this.#r.cancelRetry()),this.scheduleGc()),this.#n.notify({type:"observerRemoved",query:this,observer:e}))}getObserversCount(){return this.observers.length}#a(){return this.state.fetchStatus==="paused"&&this.state.status==="pending"}invalidate(){this.state.isInvalidated||this.#l({type:"invalidate"})}async fetch(e,t){if(this.state.fetchStatus!=="idle"&&this.#r?.status()!=="rejected"){if(this.state.data!==void 0&&t?.cancelRefetch)this.cancel({silent:!0});else if(this.#r)return this.#r.continueRetry(),this.#r.promise}if(e&&this.setOptions(e),!this.options.queryFn){const a=this.observers.find(l=>l.options.queryFn);a&&this.setOptions(a.options)}const n=new AbortController,r=a=>{Object.defineProperty(a,"signal",{enumerable:!0,get:()=>(this.#s=!0,n.signal)})},i=()=>{const a=LE(this.options,t),c=(()=>{const u={client:this.#i,queryKey:this.queryKey,meta:this.meta};return r(u),u})();return this.#s=!1,this.options.persister?this.options.persister(a,c,this):a(c)},s=(()=>{const a={fetchOptions:t,options:this.options,queryKey:this.queryKey,client:this.#i,state:this.state,fetchFn:i};return r(a),a})();this.options.behavior?.onFetch(s,this),this.#e=this.state,(this.state.fetchStatus==="idle"||this.state.fetchMeta!==s.fetchOptions?.meta)&&this.#l({type:"fetch",meta:s.fetchOptions?.meta}),this.#r=OE({initialPromise:t?.initialPromise,fn:s.fetchFn,onCancel:a=>{a instanceof Eb&&a.revert&&this.setState({...this.#e,fetchStatus:"idle"}),n.abort()},onFail:(a,l)=>{this.#l({type:"failed",failureCount:a,error:l})},onPause:()=>{this.#l({type:"pause"})},onContinue:()=>{this.#l({type:"continue"})},retry:s.options.retry,retryDelay:s.options.retryDelay,networkMode:s.options.networkMode,canRun:()=>!0});try{const a=await this.#r.start();if(a===void 0)throw new Error(`${this.queryHash} data is undefined`);return this.setData(a),this.#n.config.onSuccess?.(a,this),this.#n.config.onSettled?.(a,this.state.error,this),a}catch(a){if(a instanceof Eb){if(a.silent)return this.#r.promise;if(a.revert){if(this.state.data===void 0)throw a;return this.state.data}}throw this.#l({type:"error",error:a}),this.#n.config.onError?.(a,this),this.#n.config.onSettled?.(this.state.data,a,this),a}finally{this.scheduleGc()}}#l(e){const t=n=>{switch(e.type){case"failed":return{...n,fetchFailureCount:e.failureCount,fetchFailureReason:e.error};case"pause":return{...n,fetchStatus:"paused"};case"continue":return{...n,fetchStatus:"fetching"};case"fetch":return{...n,...RE(n.data,this.options),fetchMeta:e.meta??null};case"success":const r={...n,...R8(e.data,e.dataUpdatedAt),dataUpdateCount:n.dataUpdateCount+1,...!e.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return this.#e=e.manual?r:void 0,r;case"error":const i=e.error;return{...n,error:i,errorUpdateCount:n.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:n.fetchFailureCount+1,fetchFailureReason:i,fetchStatus:"idle",status:"error",isInvalidated:!0};case"invalidate":return{...n,isInvalidated:!0};case"setState":return{...n,...e.state}}};this.state=t(this.state),Kn.batch(()=>{this.observers.forEach(n=>{n.onQueryUpdate()}),this.#n.notify({query:this,type:"updated",action:e})})}};function RE(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:ME(t.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function R8(e,t){return{data:e,dataUpdatedAt:t??Date.now(),error:null,isInvalidated:!1,status:"success"}}function N8(e){const t=typeof e.initialData=="function"?e.initialData():e.initialData,n=t!==void 0,r=n?typeof e.initialDataUpdatedAt=="function"?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:n?r??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:n?"success":"pending",fetchStatus:"idle"}}var NE=class extends Ml{constructor(e,t){super(),this.options=t,this.#t=e,this.#a=null,this.#s=Tb(),this.bindMethods(),this.setOptions(t)}#t;#e=void 0;#n=void 0;#i=void 0;#r;#o;#s;#a;#l;#f;#h;#u;#d;#c;#m=new Set;bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(this.#e.addObserver(this),z8(this.#e,this.options)?this.#p():this.updateResult(),this.#b())}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return $b(this.#e,this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return $b(this.#e,this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,this.#w(),this.#k(),this.#e.removeObserver(this)}setOptions(e){const t=this.options,n=this.#e;if(this.options=this.#t.defaultQueryOptions(e),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof Li(this.options.enabled,this.#e)!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");this.#x(),this.#e.setOptions(this.options),t._defaulted&&!Xd(this.options,t)&&this.#t.getQueryCache().notify({type:"observerOptionsUpdated",query:this.#e,observer:this});const r=this.hasListeners();r&&j8(this.#e,n,this.options,t)&&this.#p(),this.updateResult(),r&&(this.#e!==n||Li(this.options.enabled,this.#e)!==Li(t.enabled,this.#e)||ca(this.options.staleTime,this.#e)!==ca(t.staleTime,this.#e))&&this.#g();const i=this.#v();r&&(this.#e!==n||Li(this.options.enabled,this.#e)!==Li(t.enabled,this.#e)||i!==this.#c)&&this.#y(i)}getOptimisticResult(e){const t=this.#t.getQueryCache().build(this.#t,e),n=this.createResult(t,e);return Mre(this,n)&&(this.#i=n,this.#o=this.options,this.#r=this.#e.state),n}getCurrentResult(){return this.#i}trackResult(e,t){return new Proxy(e,{get:(n,r)=>(this.trackProp(r),t?.(r),r==="promise"&&(this.trackProp("data"),!this.options.experimental_prefetchInRender&&this.#s.status==="pending"&&this.#s.reject(new Error("experimental_prefetchInRender feature flag is not enabled"))),Reflect.get(n,r))})}trackProp(e){this.#m.add(e)}getCurrentQuery(){return this.#e}refetch({...e}={}){return this.fetch({...e})}fetchOptimistic(e){const t=this.#t.defaultQueryOptions(e),n=this.#t.getQueryCache().build(this.#t,t);return n.fetch().then(()=>this.createResult(n,t))}fetch(e){return this.#p({...e,cancelRefetch:e.cancelRefetch??!0}).then(()=>(this.updateResult(),this.#i))}#p(e){this.#x();let t=this.#e.fetch(this.options,e);return e?.throwOnError||(t=t.catch(er)),t}#g(){this.#w();const e=ca(this.options.staleTime,this.#e);if(Cm.isServer()||this.#i.isStale||!_b(e))return;const n=AE(this.#i.dataUpdatedAt,e)+1;this.#u=Ja.setTimeout(()=>{this.#i.isStale||this.updateResult()},n)}#v(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(this.#e):this.options.refetchInterval)??!1}#y(e){this.#k(),this.#c=e,!(Cm.isServer()||Li(this.options.enabled,this.#e)===!1||!_b(this.#c)||this.#c===0)&&(this.#d=Ja.setInterval(()=>{(this.options.refetchIntervalInBackground||Yw.isFocused())&&this.#p()},this.#c))}#b(){this.#g(),this.#y(this.#v())}#w(){this.#u&&(Ja.clearTimeout(this.#u),this.#u=void 0)}#k(){this.#d&&(Ja.clearInterval(this.#d),this.#d=void 0)}createResult(e,t){const n=this.#e,r=this.options,i=this.#i,o=this.#r,s=this.#o,l=e!==n?e.state:this.#n,{state:c}=e;let u={...c},d=!1,h;if(t._optimisticResults){const $=this.hasListeners(),O=!$&&z8(e,t),D=$&&j8(e,n,t,r);(O||D)&&(u={...u,...RE(c.data,e.options)}),t._optimisticResults==="isRestoring"&&(u.fetchStatus="idle")}let{error:f,errorUpdatedAt:m,status:p}=u;h=u.data;let g=!1;if(t.placeholderData!==void 0&&h===void 0&&p==="pending"){let $;i?.isPlaceholderData&&t.placeholderData===s?.placeholderData?($=i.data,g=!0):$=typeof t.placeholderData=="function"?t.placeholderData(this.#h?.state.data,this.#h):t.placeholderData,$!==void 0&&(p="success",h=Ib(i?.data,$,t),d=!0)}if(t.select&&h!==void 0&&!g)if(i&&h===o?.data&&t.select===this.#l)h=this.#f;else try{this.#l=t.select,h=t.select(h),h=Ib(i?.data,h,t),this.#f=h,this.#a=null}catch($){this.#a=$}this.#a&&(f=this.#a,h=this.#f,m=Date.now(),p="error");const v=u.fetchStatus==="fetching",y=p==="pending",w=p==="error",k=y&&v,x=h!==void 0,S={status:p,fetchStatus:u.fetchStatus,isPending:y,isSuccess:p==="success",isError:w,isInitialLoading:k,isLoading:k,data:h,dataUpdatedAt:u.dataUpdatedAt,error:f,errorUpdatedAt:m,failureCount:u.fetchFailureCount,failureReason:u.fetchFailureReason,errorUpdateCount:u.errorUpdateCount,isFetched:e.isFetched(),isFetchedAfterMount:u.dataUpdateCount>l.dataUpdateCount||u.errorUpdateCount>l.errorUpdateCount,isFetching:v,isRefetching:v&&!y,isLoadingError:w&&!x,isPaused:u.fetchStatus==="paused",isPlaceholderData:d,isRefetchError:w&&x,isStale:Qw(e,t),refetch:this.refetch,promise:this.#s,isEnabled:Li(t.enabled,e)!==!1};if(this.options.experimental_prefetchInRender){const $=S.data!==void 0,O=S.status==="error"&&!$,D=L=>{O?L.reject(S.error):$&&L.resolve(S.data)},M=()=>{const L=this.#s=S.promise=Tb();D(L)},I=this.#s;switch(I.status){case"pending":e.queryHash===n.queryHash&&D(I);break;case"fulfilled":(O||S.data!==I.value)&&M();break;case"rejected":(!O||S.error!==I.reason)&&M();break}}return S}updateResult(){const e=this.#i,t=this.createResult(this.#e,this.options);if(this.#r=this.#e.state,this.#o=this.options,this.#r.data!==void 0&&(this.#h=this.#e),Xd(t,e))return;this.#i=t;const n=()=>{if(!e)return!0;const{notifyOnChangeProps:r}=this.options,i=typeof r=="function"?r():r;if(i==="all"||!i&&!this.#m.size)return!0;const o=new Set(i??this.#m);return this.options.throwOnError&&o.add("error"),Object.keys(this.#i).some(s=>{const a=s;return this.#i[a]!==e[a]&&o.has(a)})};this.#S({listeners:n()})}#x(){const e=this.#t.getQueryCache().build(this.#t,this.options);if(e===this.#e)return;const t=this.#e;this.#e=e,this.#n=e.state,this.hasListeners()&&(t?.removeObserver(this),e.addObserver(this))}onQueryUpdate(){this.updateResult(),this.hasListeners()&&this.#b()}#S(e){Kn.batch(()=>{e.listeners&&this.listeners.forEach(t=>{t(this.#i)}),this.#t.getQueryCache().notify({query:this.#e,type:"observerResultsUpdated"})})}};function Dre(e,t){return Li(t.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status==="error"&&t.retryOnMount===!1)}function z8(e,t){return Dre(e,t)||e.state.data!==void 0&&$b(e,t,t.refetchOnMount)}function $b(e,t,n){if(Li(t.enabled,e)!==!1&&ca(t.staleTime,e)!=="static"){const r=typeof n=="function"?n(e):n;return r==="always"||r!==!1&&Qw(e,t)}return!1}function j8(e,t,n,r){return(e!==t||Li(r.enabled,e)===!1)&&(!n.suspense||e.state.status!=="error")&&Qw(e,n)}function Qw(e,t){return Li(t.enabled,e)!==!1&&e.isStaleByTime(ca(t.staleTime,e))}function Mre(e,t){return!Xd(e.getCurrentResult(),t)}function F8(e){return{onFetch:(t,n)=>{const r=t.options,i=t.fetchOptions?.meta?.fetchMore?.direction,o=t.state.data?.pages||[],s=t.state.data?.pageParams||[];let a={pages:[],pageParams:[]},l=0;const c=async()=>{let u=!1;const d=m=>{Sre(m,()=>t.signal,()=>u=!0)},h=LE(t.options,t.fetchOptions),f=async(m,p,g)=>{if(u)return Promise.reject();if(p==null&&m.pages.length)return Promise.resolve(m);const y=(()=>{const C={client:t.client,queryKey:t.queryKey,pageParam:p,direction:g?"backward":"forward",meta:t.options.meta};return d(C),C})(),w=await h(y),{maxPages:k}=t.options,x=g?xre:kre;return{pages:x(m.pages,w,k),pageParams:x(m.pageParams,p,k)}};if(i&&o.length){const m=i==="backward",p=m?Ore:U8,g={pages:o,pageParams:s},v=p(r,g);a=await f(g,v,m)}else{const m=e??o.length;do{const p=l===0?s[0]??r.initialPageParam:U8(r,a);if(l>0&&p==null)break;a=await f(a,p),l++}while(l<m)}return a};t.options.persister?t.fetchFn=()=>t.options.persister?.(c,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},n):t.fetchFn=c}}}function U8(e,{pages:t,pageParams:n}){const r=t.length-1;return t.length>0?e.getNextPageParam(t[r],t,n[r],n):void 0}function Ore(e,{pages:t,pageParams:n}){return t.length>0?e.getPreviousPageParam?.(t[0],t,n[0],n):void 0}var Pre=class extends PE{#t;#e;#n;#i;constructor(e){super(),this.#t=e.client,this.mutationId=e.mutationId,this.#n=e.mutationCache,this.#e=[],this.state=e.state||zE(),this.setOptions(e.options),this.scheduleGc()}setOptions(e){this.options=e,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(e){this.#e.includes(e)||(this.#e.push(e),this.clearGcTimeout(),this.#n.notify({type:"observerAdded",mutation:this,observer:e}))}removeObserver(e){this.#e=this.#e.filter(t=>t!==e),this.scheduleGc(),this.#n.notify({type:"observerRemoved",mutation:this,observer:e})}optionalRemove(){this.#e.length||(this.state.status==="pending"?this.scheduleGc():this.#n.remove(this))}continue(){return this.#i?.continue()??this.execute(this.state.variables)}async execute(e){const t=()=>{this.#r({type:"continue"})},n={client:this.#t,meta:this.options.meta,mutationKey:this.options.mutationKey};this.#i=OE({fn:()=>this.options.mutationFn?this.options.mutationFn(e,n):Promise.reject(new Error("No mutationFn found")),onFail:(o,s)=>{this.#r({type:"failed",failureCount:o,error:s})},onPause:()=>{this.#r({type:"pause"})},onContinue:t,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>this.#n.canRun(this)});const r=this.state.status==="pending",i=!this.#i.canStart();try{if(r)t();else{this.#r({type:"pending",variables:e,isPaused:i}),this.#n.config.onMutate&&await this.#n.config.onMutate(e,this,n);const s=await this.options.onMutate?.(e,n);s!==this.state.context&&this.#r({type:"pending",context:s,variables:e,isPaused:i})}const o=await this.#i.start();return await this.#n.config.onSuccess?.(o,e,this.state.context,this,n),await this.options.onSuccess?.(o,e,this.state.context,n),await this.#n.config.onSettled?.(o,null,this.state.variables,this.state.context,this,n),await this.options.onSettled?.(o,null,e,this.state.context,n),this.#r({type:"success",data:o}),o}catch(o){try{await this.#n.config.onError?.(o,e,this.state.context,this,n)}catch(s){Promise.reject(s)}try{await this.options.onError?.(o,e,this.state.context,n)}catch(s){Promise.reject(s)}try{await this.#n.config.onSettled?.(void 0,o,this.state.variables,this.state.context,this,n)}catch(s){Promise.reject(s)}try{await this.options.onSettled?.(void 0,o,e,this.state.context,n)}catch(s){Promise.reject(s)}throw this.#r({type:"error",error:o}),o}finally{this.#n.runNext(this)}}#r(e){const t=n=>{switch(e.type){case"failed":return{...n,failureCount:e.failureCount,failureReason:e.error};case"pause":return{...n,isPaused:!0};case"continue":return{...n,isPaused:!1};case"pending":return{...n,context:e.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:e.isPaused,status:"pending",variables:e.variables,submittedAt:Date.now()};case"success":return{...n,data:e.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...n,data:void 0,error:e.error,failureCount:n.failureCount+1,failureReason:e.error,isPaused:!1,status:"error"}}};this.state=t(this.state),Kn.batch(()=>{this.#e.forEach(n=>{n.onMutationUpdate(e)}),this.#n.notify({mutation:this,type:"updated",action:e})})}};function zE(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var Rre=class extends Ml{constructor(e={}){super(),this.config=e,this.#t=new Set,this.#e=new Map,this.#n=0}#t;#e;#n;build(e,t,n){const r=new Pre({client:e,mutationCache:this,mutationId:++this.#n,options:e.defaultMutationOptions(t),state:n});return this.add(r),r}add(e){this.#t.add(e);const t=Zh(e);if(typeof t=="string"){const n=this.#e.get(t);n?n.push(e):this.#e.set(t,[e])}this.notify({type:"added",mutation:e})}remove(e){if(this.#t.delete(e)){const t=Zh(e);if(typeof t=="string"){const n=this.#e.get(t);if(n)if(n.length>1){const r=n.indexOf(e);r!==-1&&n.splice(r,1)}else n[0]===e&&this.#e.delete(t)}}this.notify({type:"removed",mutation:e})}canRun(e){const t=Zh(e);if(typeof t=="string"){const r=this.#e.get(t)?.find(i=>i.state.status==="pending");return!r||r===e}else return!0}runNext(e){const t=Zh(e);return typeof t=="string"?this.#e.get(t)?.find(r=>r!==e&&r.state.isPaused)?.continue()??Promise.resolve():Promise.resolve()}clear(){Kn.batch(()=>{this.#t.forEach(e=>{this.notify({type:"removed",mutation:e})}),this.#t.clear(),this.#e.clear()})}getAll(){return Array.from(this.#t)}find(e){const t={exact:!0,...e};return this.getAll().find(n=>M8(t,n))}findAll(e={}){return this.getAll().filter(t=>M8(e,t))}notify(e){Kn.batch(()=>{this.listeners.forEach(t=>{t(e)})})}resumePausedMutations(){const e=this.getAll().filter(t=>t.state.isPaused);return Kn.batch(()=>Promise.all(e.map(t=>t.continue().catch(er))))}};function Zh(e){return e.options.scope?.id}var Nre=class extends Ml{#t;#e=void 0;#n;#i;constructor(t,n){super(),this.#t=t,this.setOptions(n),this.bindMethods(),this.#r()}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(t){const n=this.options;this.options=this.#t.defaultMutationOptions(t),Xd(this.options,n)||this.#t.getMutationCache().notify({type:"observerOptionsUpdated",mutation:this.#n,observer:this}),n?.mutationKey&&this.options.mutationKey&&gl(n.mutationKey)!==gl(this.options.mutationKey)?this.reset():this.#n?.state.status==="pending"&&this.#n.setOptions(this.options)}onUnsubscribe(){this.hasListeners()||this.#n?.removeObserver(this)}onMutationUpdate(t){this.#r(),this.#o(t)}getCurrentResult(){return this.#e}reset(){this.#n?.removeObserver(this),this.#n=void 0,this.#r(),this.#o()}mutate(t,n){return this.#i=n,this.#n?.removeObserver(this),this.#n=this.#t.getMutationCache().build(this.#t,this.options),this.#n.addObserver(this),this.#n.execute(t)}#r(){const t=this.#n?.state??zE();this.#e={...t,isPending:t.status==="pending",isSuccess:t.status==="success",isError:t.status==="error",isIdle:t.status==="idle",mutate:this.mutate,reset:this.reset}}#o(t){Kn.batch(()=>{if(this.#i&&this.hasListeners()){const n=this.#e.variables,r=this.#e.context,i={client:this.#t,meta:this.options.meta,mutationKey:this.options.mutationKey};if(t?.type==="success"){try{this.#i.onSuccess?.(t.data,n,r,i)}catch(o){Promise.reject(o)}try{this.#i.onSettled?.(t.data,null,n,r,i)}catch(o){Promise.reject(o)}}else if(t?.type==="error"){try{this.#i.onError?.(t.error,n,r,i)}catch(o){Promise.reject(o)}try{this.#i.onSettled?.(void 0,t.error,n,r,i)}catch(o){Promise.reject(o)}}}this.listeners.forEach(n=>{n(this.#e)})})}};function H8(e,t){const n=new Set(t);return e.filter(r=>!n.has(r))}function zre(e,t,n){const r=e.slice(0);return r[t]=n,r}var jre=class extends Ml{#t;#e;#n;#i;#r;#o;#s;#a;#l;#f=[];constructor(e,t,n){super(),this.#t=e,this.#i=n,this.#n=[],this.#r=[],this.#e=[],this.setQueries(t)}onSubscribe(){this.listeners.size===1&&this.#r.forEach(e=>{e.subscribe(t=>{this.#c(e,t)})})}onUnsubscribe(){this.listeners.size||this.destroy()}destroy(){this.listeners=new Set,this.#r.forEach(e=>{e.destroy()})}setQueries(e,t){this.#n=e,this.#i=t,Kn.batch(()=>{const n=this.#r,r=this.#d(this.#n);r.forEach(u=>u.observer.setOptions(u.defaultedQueryOptions));const i=r.map(u=>u.observer),o=i.map(u=>u.getCurrentResult()),s=n.length!==i.length,a=i.some((u,d)=>u!==n[d]),l=s||a,c=l?!0:o.some((u,d)=>{const h=this.#e[d];return!h||!Xd(u,h)});!l&&!c||(l&&(this.#f=r,this.#r=i),this.#e=o,this.hasListeners()&&(l&&(H8(n,i).forEach(u=>{u.destroy()}),H8(i,n).forEach(u=>{u.subscribe(d=>{this.#c(u,d)})})),this.#m()))})}getCurrentResult(){return this.#e}getQueries(){return this.#r.map(e=>e.getCurrentQuery())}getObservers(){return this.#r}getOptimisticResult(e,t){const n=this.#d(e),r=n.map(o=>o.observer.getOptimisticResult(o.defaultedQueryOptions)),i=n.map(o=>o.defaultedQueryOptions.queryHash);return[r,o=>this.#u(o??r,t,i),()=>this.#h(r,n)]}#h(e,t){return t.map((n,r)=>{const i=e[r];return n.defaultedQueryOptions.notifyOnChangeProps?i:n.observer.trackResult(i,o=>{t.forEach(s=>{s.observer.trackProp(o)})})})}#u(e,t,n){if(t){const r=this.#l,i=n!==void 0&&r!==void 0&&(r.length!==n.length||n.some((o,s)=>o!==r[s]));return(!this.#o||this.#e!==this.#a||i||t!==this.#s)&&(this.#s=t,this.#a=this.#e,n!==void 0&&(this.#l=n),this.#o=Jw(this.#o,t(e))),this.#o}return e}#d(e){const t=new Map;this.#r.forEach(r=>{const i=r.options.queryHash;if(!i)return;const o=t.get(i);o?o.push(r):t.set(i,[r])});const n=[];return e.forEach(r=>{const i=this.#t.defaultQueryOptions(r),s=t.get(i.queryHash)?.shift()??new NE(this.#t,i);n.push({defaultedQueryOptions:i,observer:s})}),n}#c(e,t){const n=this.#r.indexOf(e);n!==-1&&(this.#e=zre(this.#e,n,t),this.#m())}#m(){if(this.hasListeners()){const e=this.#o,t=this.#h(this.#e,this.#f),n=this.#u(t,this.#i?.combine);e!==n&&Kn.batch(()=>{this.listeners.forEach(r=>{r(this.#e)})})}}},Fre=class extends Ml{constructor(e={}){super(),this.config=e,this.#t=new Map}#t;build(e,t,n){const r=t.queryKey,i=t.queryHash??Xw(r,t);let o=this.get(i);return o||(o=new Lre({client:e,queryKey:r,queryHash:i,options:e.defaultQueryOptions(t),state:n,defaultOptions:e.getQueryDefaults(r)}),this.add(o)),o}add(e){this.#t.has(e.queryHash)||(this.#t.set(e.queryHash,e),this.notify({type:"added",query:e}))}remove(e){const t=this.#t.get(e.queryHash);t&&(e.destroy(),t===e&&this.#t.delete(e.queryHash),this.notify({type:"removed",query:e}))}clear(){Kn.batch(()=>{this.getAll().forEach(e=>{this.remove(e)})})}get(e){return this.#t.get(e)}getAll(){return[...this.#t.values()]}find(e){const t={exact:!0,...e};return this.getAll().find(n=>D8(t,n))}findAll(e={}){const t=this.getAll();return Object.keys(e).length>0?t.filter(n=>D8(e,n)):t}notify(e){Kn.batch(()=>{this.listeners.forEach(t=>{t(e)})})}onFocus(){Kn.batch(()=>{this.getAll().forEach(e=>{e.onFocus()})})}onOnline(){Kn.batch(()=>{this.getAll().forEach(e=>{e.onOnline()})})}},Ure=class{#t;#e;#n;#i;#r;#o;#s;#a;constructor(t={}){this.#t=t.queryCache||new Fre,this.#e=t.mutationCache||new Rre,this.#n=t.defaultOptions||{},this.#i=new Map,this.#r=new Map,this.#o=0}mount(){this.#o++,this.#o===1&&(this.#s=Yw.subscribe(async t=>{t&&(await this.resumePausedMutations(),this.#t.onFocus())}),this.#a=Im.subscribe(async t=>{t&&(await this.resumePausedMutations(),this.#t.onOnline())}))}unmount(){this.#o--,this.#o===0&&(this.#s?.(),this.#s=void 0,this.#a?.(),this.#a=void 0)}isFetching(t){return this.#t.findAll({...t,fetchStatus:"fetching"}).length}isMutating(t){return this.#e.findAll({...t,status:"pending"}).length}getQueryData(t){const n=this.defaultQueryOptions({queryKey:t});return this.#t.get(n.queryHash)?.state.data}ensureQueryData(t){const n=this.defaultQueryOptions(t),r=this.#t.build(this,n),i=r.state.data;return i===void 0?this.fetchQuery(t):(t.revalidateIfStale&&r.isStaleByTime(ca(n.staleTime,r))&&this.prefetchQuery(n),Promise.resolve(i))}getQueriesData(t){return this.#t.findAll(t).map(({queryKey:n,state:r})=>{const i=r.data;return[n,i]})}setQueryData(t,n,r){const i=this.defaultQueryOptions({queryKey:t}),s=this.#t.get(i.queryHash)?.state.data,a=yre(n,s);if(a!==void 0)return this.#t.build(this,i).setData(a,{...r,manual:!0})}setQueriesData(t,n,r){return Kn.batch(()=>this.#t.findAll(t).map(({queryKey:i})=>[i,this.setQueryData(i,n,r)]))}getQueryState(t){const n=this.defaultQueryOptions({queryKey:t});return this.#t.get(n.queryHash)?.state}removeQueries(t){const n=this.#t;Kn.batch(()=>{n.findAll(t).forEach(r=>{n.remove(r)})})}resetQueries(t,n){const r=this.#t;return Kn.batch(()=>(r.findAll(t).forEach(i=>{i.reset()}),this.refetchQueries({type:"active",...t},n)))}cancelQueries(t,n={}){const r={revert:!0,...n},i=Kn.batch(()=>this.#t.findAll(t).map(o=>o.cancel(r)));return Promise.all(i).then(er).catch(er)}invalidateQueries(t,n={}){return Kn.batch(()=>(this.#t.findAll(t).forEach(r=>{r.invalidate()}),t?.refetchType==="none"?Promise.resolve():this.refetchQueries({...t,type:t?.refetchType??t?.type??"active"},n)))}refetchQueries(t,n={}){const r={...n,cancelRefetch:n.cancelRefetch??!0},i=Kn.batch(()=>this.#t.findAll(t).filter(o=>!o.isDisabled()&&!o.isStatic()).map(o=>{let s=o.fetch(void 0,r);return r.throwOnError||(s=s.catch(er)),o.state.fetchStatus==="paused"?Promise.resolve():s}));return Promise.all(i).then(er)}fetchQuery(t){const n=this.defaultQueryOptions(t);n.retry===void 0&&(n.retry=!1);const r=this.#t.build(this,n);return r.isStaleByTime(ca(n.staleTime,r))?r.fetch(n):Promise.resolve(r.state.data)}prefetchQuery(t){return this.fetchQuery(t).then(er).catch(er)}fetchInfiniteQuery(t){return t.behavior=F8(t.pages),this.fetchQuery(t)}prefetchInfiniteQuery(t){return this.fetchInfiniteQuery(t).then(er).catch(er)}ensureInfiniteQueryData(t){return t.behavior=F8(t.pages),this.ensureQueryData(t)}resumePausedMutations(){return Im.isOnline()?this.#e.resumePausedMutations():Promise.resolve()}getQueryCache(){return this.#t}getMutationCache(){return this.#e}getDefaultOptions(){return this.#n}setDefaultOptions(t){this.#n=t}setQueryDefaults(t,n){this.#i.set(gl(t),{queryKey:t,defaultOptions:n})}getQueryDefaults(t){const n=[...this.#i.values()],r={};return n.forEach(i=>{Yd(t,i.queryKey)&&Object.assign(r,i.defaultOptions)}),r}setMutationDefaults(t,n){this.#r.set(gl(t),{mutationKey:t,defaultOptions:n})}getMutationDefaults(t){const n=[...this.#r.values()],r={};return n.forEach(i=>{Yd(t,i.mutationKey)&&Object.assign(r,i.defaultOptions)}),r}defaultQueryOptions(t){if(t._defaulted)return t;const n={...this.#n.queries,...this.getQueryDefaults(t.queryKey),...t,_defaulted:!0};return n.queryHash||(n.queryHash=Xw(n.queryKey,n)),n.refetchOnReconnect===void 0&&(n.refetchOnReconnect=n.networkMode!=="always"),n.throwOnError===void 0&&(n.throwOnError=!!n.suspense),!n.networkMode&&n.persister&&(n.networkMode="offlineFirst"),n.queryFn===Ol&&(n.enabled=!1),n}defaultMutationOptions(t){return t?._defaulted?t:{...this.#n.mutations,...t?.mutationKey&&this.getMutationDefaults(t.mutationKey),...t,_defaulted:!0}}clear(){this.#t.clear(),this.#e.clear()}},jE=pt(void 0),cu=e=>{if(e)return e;const t=ut(jE);if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t()},Hre=e=>(De(t=>(t?.(),e.client.mount(),e.client.unmount.bind(e.client))),fe(()=>e.client.unmount()),b(jE.Provider,{value:()=>e.client,get children(){return e.children}})),FE=pt(()=>!1),UE=()=>ut(FE);FE.Provider;function Bre(e,t,n,r){if(n===!1)return t;if(typeof n=="function"){const s=n(e.data,t.data);return{...t,data:s}}let i=t.data;if(e.data===void 0)try{i=structuredClone(i)}catch{}const o=St(i,{key:n})(e.data);return{...t,data:o}}var Vre=(e,t)=>t;function qre(e,t,n){const r=F(()=>cu(n?.())),i=UE(),o=F(()=>{const k=r().defaultQueryOptions(e());return k._optimisticResults=i()?"isRestoring":"optimistic",k.structuralSharing=!1,k}),s=o(),[a,l]=de(new t(r(),o()));let c=a().getOptimisticResult(o());const[u,d]=Je(c),h=()=>a().subscribe(x=>{c=x,queueMicrotask(()=>{p&&y()})});function f(k){const x=a().options,C=x.reconcile;d(S=>Bre(S,k,C===void 0?!1:C,x.queryHash))}function m(){return[()=>u,k=>{const x=hi(u);if(typeof k=="function"&&(k=k(x)),k?.hydrationData){const{hydrationData:C,...S}=k;k=S}f(k)}]}let p=null,g=null;const[v,{refetch:y}]=Xo(()=>{const k=a();return new Promise((x,C)=>{if(g=x,!p&&!i()&&(p=h()),k.updateResult(),c.isError&&!c.isFetching&&!i()&&DE(k.options.throwOnError,[c.error,k.getCurrentQuery()]))return f(c),C(c.error);if(!c.isLoading)return g=null,x(Vre(k.getCurrentQuery(),c));f(c)})},{storage:m,get deferStream(){return e().deferStream},onHydrated(k,x){if(x.value&&"hydrationData"in x.value&&Ire(r(),{queries:[{...x.value.hydrationData}]}),p)return;const C={...s};(s.staleTime||!s.initialData)&&x.value&&(C.refetchOnMount=!1),a().setOptions(C),f(a().getOptimisticResult(C)),p=h()}});Ho(gt(r,k=>{p&&p();const x=new t(k,o());p=h(),l(x)},{defer:!0})),Ho(gt(i,k=>{!k&&!xy&&y()},{defer:!0})),fe(()=>{p&&(p(),p=null),g&&!xy&&(g(c),g=null)}),Ho(gt([a,o],([k,x])=>{k.setOptions(x),f(k.getOptimisticResult(x)),y()},{defer:!0}));const w={get(k,x){return x==="data"?u.data!==void 0?v.latest?.data:v()?.data:Reflect.get(k,x)}};return new Proxy(u,w)}function va(e,t){return qre(F(()=>e()),NE,t)}function Ad(e,t){const n=F(()=>cu(t?.())),r=new Nre(n(),e()),i=(l,c)=>{r.mutate(l,c).catch(er)},[o,s]=Je({...r.getCurrentResult(),mutate:i,mutateAsync:r.getCurrentResult().mutate});Ho(()=>{r.setOptions(e())}),Ho(gt(()=>o.status,()=>{if(o.isError&&DE(r.options.throwOnError,[o.error]))throw o.error}));const a=r.subscribe(l=>{s({...l,mutate:i,mutateAsync:l.mutate})});return fe(a),o}function d3e(e,t){const n=F(()=>cu(t?.())),r=UE(),i=F(()=>e().queries.map(g=>ne(n().defaultQueryOptions(g),{get _optimisticResults(){return r()?"isRestoring":"optimistic"}}))),o=new jre(n(),i(),e().combine?{combine:e().combine}:void 0),[s,a]=Je(o.getOptimisticResult(i(),e().combine)[1]());De(gt(()=>e().queries.length,()=>a(o.getOptimisticResult(i(),e().combine)[1]())));const l=F(gt(()=>s.length,()=>s.map(g=>Xo(()=>new Promise(y=>{g.isFetching&&g.isLoading||y(hi(g.data))})))));Xe(()=>{const g=l();for(let v=0;v<g.length;v++){const y=g[v];y[1].mutate(()=>hi(s[v].data)),y[1].refetch()}});let c=[];const u=()=>o.subscribe(g=>{c.push(()=>{Xe(()=>{const v=l();for(let y=0;y<v.length;y++){const w=v[y],k={...hi(g[y])};a(y,hi(k)),w[1].mutate(()=>hi(s[y].data)),w[1].refetch()}})}),queueMicrotask(()=>{const v=c.pop();v&&v(),c=[]})});let d=er;Ho(g=>(g?.(),d=r()?er:u(),()=>queueMicrotask(d))),fe(d),Kt(()=>{o.setQueries(i(),e().combine?{combine:e().combine}:void 0)}),Ho(()=>{o.setQueries(i(),e().combine?{combine:e().combine}:void 0)});const h=g=>({get(v,y){return y==="data"?l()[g][0]():Reflect.get(v,y)}}),f=()=>s.map((g,v)=>new Proxy(g,h(v))),[m,p]=Je(f());return De(()=>p(f())),m}var Wre=class extends Ure{constructor(e={}){super(e)}};var f3e=va;const uu=(e,t)=>{switch(t.length){case 0:return e;case 1:return t[0](e);case 2:return t[1](t[0](e));case 3:return t[2](t[1](t[0](e)));case 4:return t[3](t[2](t[1](t[0](e))));case 5:return t[4](t[3](t[2](t[1](t[0](e)))));case 6:return t[5](t[4](t[3](t[2](t[1](t[0](e))))));case 7:return t[6](t[5](t[4](t[3](t[2](t[1](t[0](e)))))));case 8:return t[7](t[6](t[5](t[4](t[3](t[2](t[1](t[0](e))))))));case 9:return t[8](t[7](t[6](t[5](t[4](t[3](t[2](t[1](t[0](e)))))))));default:{let n=e;for(let r=0,i=t.length;r<i;r++)n=t[r](n);return n}}},Xn=function(e,t){if(typeof e=="function")return function(){return e(arguments)?t.apply(this,arguments):n=>t(n,...arguments)};switch(e){case 0:case 1:throw new RangeError(`Invalid arity ${e}`);case 2:return function(n,r){return arguments.length>=2?t(n,r):function(i){return t(i,n)}};case 3:return function(n,r,i){return arguments.length>=3?t(n,r,i):function(o){return t(o,n,r)}};default:return function(){if(arguments.length>=e)return t.apply(this,arguments);const n=arguments;return function(r){return t(r,...n)}}}},Ac=e=>e,HE=e=>()=>e,BE=HE(void 0),Gre=BE,Ab=e=>{const t=new Set(Reflect.ownKeys(e));if(e.constructor===Object)return t;e instanceof Error&&t.delete("stack");const n=Object.getPrototypeOf(e);let r=n;for(;r!==null&&r!==Object.prototype;){const i=Reflect.ownKeys(r);for(let o=0;o<i.length;o++)t.add(i[o]);r=Object.getPrototypeOf(r)}return t.has("constructor")&&typeof e.constructor=="function"&&n===e.constructor.prototype&&t.delete("constructor"),t},Lb=new WeakSet;function Kre(e){return typeof e=="number"}function Zre(e){return typeof e=="function"}function Yre(e){return typeof e=="object"&&e!==null||Zre(e)}const Ns=Xn(2,(e,t)=>Yre(e)&&t in e),Ca="~effect/interfaces/Hash",go=e=>{switch(typeof e){case"number":return e4(e);case"bigint":return mr(e.toString(10));case"boolean":return mr(String(e));case"symbol":return mr(String(e));case"string":return mr(e);case"undefined":return mr("undefined");case"function":case"object":{if(e===null)return mr("null");if(e instanceof Date)return mr(e.toISOString());if(e instanceof RegExp)return mr(e.toString());{if(Lb.has(e))return Db(e);if(Sv.has(e))return Sv.get(e);const t=tie(e,()=>Xre(e)?e[Ca]():typeof e=="function"?Db(e):Array.isArray(e)||ArrayBuffer.isView(e)?qE(e):e instanceof Map?Qre(e):e instanceof Set?eie(e):VE(e));return Sv.set(e,t),t}}default:throw new Error(`BUG: unhandled typeof ${typeof e} - please report an issue at https://github.com/Effect-TS/effect/issues`)}},Db=e=>(xv.has(e)||xv.set(e,e4(Math.floor(Math.random()*Number.MAX_SAFE_INTEGER))),xv.get(e)),Hc=Xn(2,(e,t)=>e*53^t),Fp=e=>e&3221225471|e>>>1&1073741824,Xre=e=>Ns(e,Ca),e4=e=>{if(e!==e)return mr("NaN");if(e===1/0)return mr("Infinity");if(e===-1/0)return mr("-Infinity");let t=e|0;for(t!==e&&(t^=e*4294967295);e>4294967295;)t^=e/=4294967295;return Fp(t)},mr=e=>{let t=5381,n=e.length;for(;n;)t=t*33^e.charCodeAt(--n);return Fp(t)},Jre=(e,t)=>{let n=12289;for(const r of t)n^=Hc(go(r),go(e[r]));return Fp(n)},VE=e=>Jre(e,Ab(e)),t4=(e,t)=>n=>{let r=e;for(const i of n)r^=t(i);return Fp(r)},qE=t4(6151,go),Qre=t4(mr("Map"),([e,t])=>Hc(go(e),go(t))),eie=t4(mr("Set"),go),xv=new WeakMap,Sv=new WeakMap,_v=new WeakSet;function tie(e,t){if(_v.has(e))return mr("[Circular]");_v.add(e);const n=t();return _v.delete(e),n}const Ia="~effect/interfaces/Equal";function vl(){return arguments.length===1?e=>yl(e,arguments[0]):yl(arguments[0],arguments[1])}function yl(e,t){if(e===t)return!0;if(e==null||t==null)return!1;const n=typeof e;return n!==typeof t?!1:n==="number"&&e!==e&&t!==t?!0:n!=="object"&&n!=="function"||Lb.has(e)||Lb.has(t)?!1:iie(e,t,rie)}function nie(e,t,n){const r=Cv.has(e),i=Iv.has(t);if(r&&i)return!0;if(r||i)return!1;Cv.add(e),Iv.add(t);const o=n();return Cv.delete(e),Iv.delete(t),o}const Cv=new WeakSet,Iv=new WeakSet;function rie(e,t){if(go(e)!==go(t))return!1;if(e instanceof Date)return t instanceof Date?e.toISOString()===t.toISOString():!1;if(e instanceof RegExp)return t instanceof RegExp?e.toString()===t.toString():!1;const n=B8(e),r=B8(t);if(n!==r)return!1;const i=n&&r;return typeof e=="function"&&!i?!1:nie(e,t,()=>i?e[Ia](t):Array.isArray(e)?!Array.isArray(t)||e.length!==t.length?!1:oie(e,t):ArrayBuffer.isView(e)?!ArrayBuffer.isView(t)||e.byteLength!==t.byteLength?!1:sie(e,t):e instanceof Map?!(t instanceof Map)||e.size!==t.size?!1:cie(e,t):e instanceof Set?!(t instanceof Set)||e.size!==t.size?!1:die(e,t):aie(e,t))}function iie(e,t,n){let r=Yh.get(e);if(!r)r=new WeakMap,Yh.set(e,r);else if(r.has(t))return r.get(t);const i=n(e,t);r.set(t,i);let o=Yh.get(t);return o||(o=new WeakMap,Yh.set(t,o)),o.set(e,i),i}const Yh=new WeakMap;function oie(e,t){for(let n=0;n<e.length;n++)if(!yl(e[n],t[n]))return!1;return!0}function sie(e,t){if(e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}function aie(e,t){const n=Ab(e),r=Ab(t);if(n.size!==r.size)return!1;for(const i of n)if(!r.has(i)||!yl(e[i],t[i]))return!1;return!0}function lie(e,t){return function(r,i){for(const[o,s]of r){let a=!1;for(const[l,c]of i)if(e(o,l)&&t(s,c)){a=!0;break}if(!a)return!1}return!0}}const cie=lie(yl,yl);function uie(e){return function(n,r){for(const i of n){let o=!1;for(const s of r)if(e(i,s)){o=!0;break}if(!o)return!1}return!0}}const die=uie(yl),B8=e=>Ns(e,Ia),fie=()=>vl,hie=e=>e.length>0,WE=Symbol.for("~effect/Redactable");function mie(e){return e[WE](globalThis[O0]?.context??pie)}const O0="~effect/Fiber/currentFiber",pie={"~effect/Context":{},mapUnsafe:new Map,pipe(){return uu(this,arguments)}};function du(e,t){const n=t?.space??0,r=new WeakSet,i=n?typeof n=="number"?" ".repeat(n):n:"",o=c=>i.repeat(c),s=(c,u)=>{const d=c?.constructor;return d&&d!==Object.prototype.constructor&&d.name?`${d.name}(${u})`:u},a=c=>{try{return Reflect.ownKeys(c)}catch{return["[ownKeys threw]"]}};function l(c,u=0){if(Array.isArray(c)){if(r.has(c))return V8;if(r.add(c),!i||c.length<=1)return`[${c.map(h=>l(h,u)).join(",")}]`;const d=c.map(h=>l(h,u+1)).join(`,
@@ -2372,7 +2372,7 @@ ${o(u)}}`;return s(c,h)}return String(c)}return l(e,0)}const V8="[Circular]";fun
2372
2372
  `);n.splice(1,3),t.stack=n.join(`
2373
2373
  `)}return t},Gie=(e,t)=>{if(e.mutable)return t(e.mapUnsafe),e;const n=new Map(e.mapUnsafe);return t(n),qp(n)},Pl=Nie,Em="~effect/time/Duration",Kie=BigInt(0),r$=BigInt(1e3),Zie=BigInt(1e6),Yie=/^(-?\d+(?:\.\d+)?)\s+(nanos?|micros?|millis?|seconds?|minutes?|hours?|days?|weeks?)$/,Xie=e=>{switch(typeof e){case"number":return J8(e);case"bigint":return X8(e);case"string":{const t=Yie.exec(e);if(!t)break;const[n,r,i]=t,o=Number(r);switch(i){case"nano":case"nanos":return X8(BigInt(r));case"micro":case"micros":return ooe(BigInt(r));case"milli":case"millis":return J8(o);case"second":case"seconds":return soe(o);case"minute":case"minutes":return aoe(o);case"hour":case"hours":return loe(o);case"day":case"days":return coe(o);case"week":case"weeks":return uoe(o)}break}case"object":{if(e===null)break;if(Em in e)return e;if(Array.isArray(e))return e.length!==2||!e.every(Kre)?Z8(e):Number.isNaN(e[0])||Number.isNaN(e[1])?noe:e[0]===-1/0||e[1]===-1/0?ioe:e[0]===1/0||e[1]===1/0?roe:Qr(BigInt(Math.round(e[0]*1e9))+BigInt(Math.round(e[1])));const t=e;let n=0;if(t.weeks&&(n+=t.weeks*6048e5),t.days&&(n+=t.days*864e5),t.hours&&(n+=t.hours*36e5),t.minutes&&(n+=t.minutes*6e4),t.seconds&&(n+=t.seconds*1e3),t.milliseconds&&(n+=t.milliseconds),!t.microseconds&&!t.nanoseconds)return Qr(n);let r=BigInt(n)*Zie;return t.microseconds&&(r+=BigInt(t.microseconds)*r$),t.nanoseconds&&(r+=BigInt(t.nanoseconds)),Qr(r)}}return Z8(e)},Z8=e=>{throw new Error(`Invalid Input: ${e}`)},Y8={_tag:"Millis",millis:0},Jie={_tag:"Infinity"},Qie={_tag:"NegativeInfinity"},eoe={[Em]:Em,[Ca](){return VE(this.value)},[Ia](e){return toe(e)&&poe(this,e)},toString(){switch(this.value._tag){case"Infinity":return"Infinity";case"NegativeInfinity":return"-Infinity";case"Nanos":return`${this.value.nanos} nanos`;case"Millis":return`${this.value.millis} millis`}},toJSON(){switch(this.value._tag){case"Millis":return{_id:"Duration",_tag:"Millis",millis:this.value.millis};case"Nanos":return{_id:"Duration",_tag:"Nanos",nanos:String(this.value.nanos)};case"Infinity":return{_id:"Duration",_tag:"Infinity"};case"NegativeInfinity":return{_id:"Duration",_tag:"NegativeInfinity"}}},[Up](){return this.toJSON()},pipe(){return uu(this,arguments)}},Qr=e=>{const t=Object.create(eoe);return typeof e=="number"?isNaN(e)||e===0||Object.is(e,-0)?t.value=Y8:Number.isFinite(e)?Number.isInteger(e)?t.value={_tag:"Millis",millis:e}:t.value={_tag:"Nanos",nanos:BigInt(Math.round(e*1e6))}:t.value=e>0?Jie:Qie:e===Kie?t.value=Y8:t.value={_tag:"Nanos",nanos:e},t},toe=e=>Ns(e,Em),noe=Qr(0),roe=Qr(1/0),ioe=Qr(-1/0),X8=e=>Qr(e),ooe=e=>Qr(e*r$),J8=e=>Qr(e),soe=e=>Qr(e*1e3),aoe=e=>Qr(e*6e4),loe=e=>Qr(e*36e5),coe=e=>Qr(e*864e5),uoe=e=>Qr(e*6048e5),doe=e=>foe(e,{onMillis:Ac,onNanos:t=>Number(t)/1e6,onInfinity:()=>1/0,onNegativeInfinity:()=>-1/0}),Q8=e=>{switch(e.value._tag){case"Infinity":case"NegativeInfinity":throw new Error("Cannot convert infinite duration to nanos");case"Nanos":return e.value.nanos;case"Millis":return BigInt(Math.round(e.value.millis*1e6))}},foe=Xn(2,(e,t)=>{switch(e.value._tag){case"Millis":return t.onMillis(e.value.millis);case"Nanos":return t.onNanos(e.value.nanos);case"Infinity":return t.onInfinity();case"NegativeInfinity":return(t.onNegativeInfinity??t.onInfinity)()}}),hoe=Xn(3,(e,t,n)=>e.value._tag==="Infinity"||e.value._tag==="NegativeInfinity"||t.value._tag==="Infinity"||t.value._tag==="NegativeInfinity"?n.onInfinity(e,t):e.value._tag==="Millis"?t.value._tag==="Millis"?n.onMillis(e.value.millis,t.value.millis):n.onNanos(Q8(e),t.value.nanos):n.onNanos(e.value.nanos,Q8(t))),moe=(e,t)=>hoe(e,t,{onMillis:(n,r)=>n===r,onNanos:(n,r)=>n===r,onInfinity:(n,r)=>n.value._tag===r.value._tag}),poe=Xn(2,(e,t)=>moe(e,t)),i$=Pl("effect/Scheduler",{defaultValue:()=>new voe}),o$="setImmediate"in globalThis?e=>{const t=globalThis.setImmediate(e);return()=>globalThis.clearImmediate(t)}:e=>{const t=setTimeout(e,0);return()=>clearTimeout(t)};class goe{buckets=[];scheduleTask(t,n){const r=this.buckets,i=r.length;let o,s=0;for(;s<i&&!(r[s][0]>n);s++)o=r[s];o&&o[0]===n?o[1].push(t):s===i?r.push([n,[t]]):r.splice(s,0,[n,[t]])}drain(){const t=this.buckets;return this.buckets=[],t}}class voe{executionMode;setImmediate;constructor(t="async",n=o$){this.executionMode=t,this.setImmediate=n}shouldYield(t){return t.currentOpCount>=t.maxOpsBeforeYield}makeDispatcher(){return new yoe(this.setImmediate)}}class yoe{tasks=new goe;running=void 0;setImmediate;constructor(t=o$){this.setImmediate=t}scheduleTask(t,n){this.tasks.scheduleTask(t,n),this.running===void 0&&(this.running=this.setImmediate(this.afterScheduled))}afterScheduled=()=>{this.running=void 0,this.runTasks()};runTasks(){const t=this.tasks.drain();for(let n=0;n<t.length;n++){const r=t[n][1];for(let i=0;i<r.length;i++)r[i]()}}flush(){for(;this.tasks.buckets.length>0;)this.running!==void 0&&(this.running(),this.running=void 0),this.runTasks()}}const boe=Pl("effect/Scheduler/MaxOpsBeforeYield",{defaultValue:()=>2048}),woe=Pl("effect/Scheduler/PreventSchedulerYield",{defaultValue:()=>!1}),koe="effect/Tracer/ParentSpan",xoe="effect/Tracer",Soe="effect/observability/Metric/FiberRuntimeMetricsKey",_oe=Pl("effect/References/CurrentStackFrame",{defaultValue:BE}),Coe=Pl("effect/References/CurrentLogLevel",{defaultValue:()=>"Info"}),Ioe=Pl("effect/References/MinimumLogLevel",{defaultValue:()=>"Info"}),Toe="dev";class Eoe extends XE{fiberId;constructor(t,n=r4){super("Interrupt",n,"Interrupted"),this.fiberId=t}toString(){return`Interrupt(${this.fiberId})`}toJSON(){return{_tag:"Interrupt",fiberId:this.fiberId}}[Ia](t){return JE(t)&&this.fiberId===t.fiberId&&this.annotations===t.annotations}[Ca](){return Hc(mr(`${this._tag}:${this.fiberId}`))(Db(this.annotations))}}const $oe=e=>new Bp([new Eoe(e)]),Aoe=e=>e.reasons.some(JE),Loe=Xn(2,(e,t)=>{if(e.reasons.length===0)return t;if(t.reasons.length===0)return e;const n=new Bp(Pie(e.reasons,t.reasons));return vl(e,n)?e:n}),Doe=e=>{const t={Fail:[],Die:[],Interrupt:[]};for(let n=0;n<e.reasons.length;n++)t[e.reasons[n]._tag].push(e.reasons[n]);return t},Moe=e=>{const t=Doe(e);return t.Fail.length>0?t.Fail[0].error:t.Die.length>0?t.Die[0].defect:t.Interrupt.length>0?new globalThis.Error("All fibers interrupted without error"):new globalThis.Error("Empty cause")},ex=`~effect/Fiber/${Toe}`,Ooe={_A:Ac,_E:Ac},Poe={id:0};class s${constructor(t,n=!0){this[ex]=Ooe,this.setContext(t),this.id=++Poe.id,this.currentOpCount=0,this.currentLoopCount=0,this.interruptible=n,this._stack=[],this._observers=[],this._exit=void 0,this._children=void 0,this._interruptedCause=void 0,this._yielded=void 0}[ex];id;interruptible;currentOpCount;currentLoopCount;_stack;_observers;_exit;_currentExit;_children;_interruptedCause;_yielded;context;currentScheduler;currentTracerContext;currentSpan;currentLogLevel;minimumLogLevel;currentStackFrame;runtimeMetrics;maxOpsBeforeYield;currentPreventYield;_dispatcher=void 0;get currentDispatcher(){return this._dispatcher??=this.currentScheduler.makeDispatcher()}getRef(t){return qie(this.context,t)}addObserver(t){return this._exit?(t(this._exit),Gre):(this._observers.push(t),()=>{const n=this._observers.indexOf(t);n>=0&&this._observers.splice(n,1)})}interruptUnsafe(t,n){if(this._exit)return;let r=$oe(t);this.currentStackFrame&&(r=Mb(r,t$(o4,this.currentStackFrame))),n&&(r=Mb(r,n)),this._interruptedCause=this._interruptedCause?Loe(this._interruptedCause,r):r,this.interruptible&&this.evaluate($m(this._interruptedCause))}pollUnsafe(){return this._exit}evaluate(t){if(this.runtimeMetrics?.recordFiberStart(this.context),this._exit)return;if(this._yielded!==void 0){const r=this._yielded;this._yielded=void 0,r()}const n=this.runLoop(t);if(n!==Ka){this._exit=n,this.runtimeMetrics?.recordFiberEnd(this.context,this._exit);for(let r=0;r<this._observers.length;r++)this._observers[r](n);this._observers.length=0}}runLoop(t){const n=globalThis[O0];globalThis[O0]=this;let r=!1,i=t;this.currentOpCount=0;const o=++this.currentLoopCount;try{for(;;){if(this.currentOpCount++,!r&&!this.currentPreventYield&&this.currentScheduler.shouldYield(this)){r=!0;const s=i;i=wl(a$,()=>s)}if(i=this.currentTracerContext?this.currentTracerContext(i,this):i[ei](this),o!==this.currentLoopCount)return Ka;if(i===Ka){const s=this._yielded;return Jd in s?(this._yielded=void 0,s):Ka}}}catch(s){return Ns(i,ei)?this.runLoop(Tm(s)):Tm(`Fiber.runLoop: Not a valid effect: ${String(i)}`)}finally{globalThis[O0]=n}}getCont(t){for(;;){const n=this._stack.pop();if(!n)return;const r=n[bl]&&n[bl](this);if(r)return r[t]=r,r;if(n[t])return n}}yieldWith(t){return this._yielded=t,Ka}children(){return this._children??=new Set}pipe(){return uu(this,arguments)}setContext(t){this.context=t;const n=this.getRef(i$);n!==this.currentScheduler&&(this.currentScheduler=n,this._dispatcher=void 0),this.currentSpan=t.mapUnsafe.get(koe),this.currentLogLevel=this.getRef(Coe),this.minimumLogLevel=this.getRef(Ioe),this.currentStackFrame=t.mapUnsafe.get(_oe.key),this.maxOpsBeforeYield=this.getRef(boe),this.currentPreventYield=this.getRef(woe),this.runtimeMetrics=t.mapUnsafe.get(Soe);const r=t.mapUnsafe.get(xoe);this.currentTracerContext=r?r.context:void 0}get currentSpanLocal(){return this.currentSpan?._tag==="Span"?this.currentSpan:void 0}}const Roe=e=>{if(!e.currentStackFrame)return;const t=new Map;return t.set(o4.key,e.currentStackFrame),qp(t)},Noe=e=>s4(t=>{const n=e[Symbol.iterator](),r=[];let i;function o(){let s=n.next();for(;!s.done;){if(s.value._exit){r.push(s.value._exit),s=n.next();continue}i=s.value.addObserver(a=>{r.push(a),o()});return}t(Of(r))}return o(),Ld(()=>i?.())}),tx=e=>ol(t=>{const n=Roe(t);for(const r of e)r.interruptUnsafe(t.id,n);return Woe(Noe(e))}),Of=Vc,$m=Vp,Ld=zs({op:"Sync",[ei](e){const t=this[Yt](),n=e.getCont(Yo);return n?n[Yo](t,e):e.yieldWith(Vc(t))}}),zoe=zs({op:"Suspend",[ei](e){return this[Yt]()}}),joe=zs({op:"Yield",[ei](e){let t=!1;return e.currentDispatcher.scheduleTask(()=>{t||e.evaluate(a4)},this[Yt]??0),e.yieldWith(()=>{t=!0})}}),a$=joe(0),Foe=e=>Tm(e),Uoe=Of(void 0),Hoe=e=>l$(function(t,n){KE(()=>e(n)).then(r=>t(Of(r)),r=>t(Foe(r)))},e.length!==0),l$=zs({op:"Async",single:!1,[ei](e){const t=KE(()=>this[Yt][0].bind(e.currentScheduler));let n=!1,r=!1;const i=this[Yt][1]?new AbortController:void 0,o=t(s=>{n||(n=!0,r?e.evaluate(s):r=s)},i?.signal);return r!==!1?r:(r=!0,e._yielded=()=>{n=!0},i===void 0&&o===void 0||e._stack.push(Boe(()=>(n=!0,i?.abort(),o??a4))),Ka)}}),Boe=zs({op:"AsyncFinalizer",[bl](e){e.interruptible&&(e.interruptible=!1,e._stack.push(l4))},[il](e,t){return Aoe(e)?wl(this[Yt](),()=>$m(e)):$m(e)}}),s4=e=>l$(e,e.length>=2),Voe=(...e)=>zoe(()=>qoe(e.length===1?e[0]():e[1].call(e[0].self))),qoe=zs({op:"Iterator",single:!1,[Yo](e,t){const n=this[Yt][0];for(;;){const r=n.next(e);if(r.done)return Of(r.value);const i=r.value.asEffect();if(Yoe(i)){if(i._tag==="Failure")return i}else return t._stack.push(this),i;e=i.value}},[ei](e){return this[Yo](this[Yt][1],e)}}),Woe=e=>wl(e,t=>a4),Goe=(e,t)=>ol(n=>s4(r=>{let i=!1;const o=new Set,s=l=>{i=!0,r(o.size===0?l:wl(tse(tx(o)),()=>l))};let a=0;for(const l of e){if(i)break;const c=a++,u=rse(n,l,!0,!0,!1);o.add(u),u.addObserver(d=>{o.delete(u);const h=!i;s(d),h&&t?.onWinner&&t.onWinner({fiber:u,index:c,parentFiber:n})})}return tx(o)})),Koe=Xn(e=>Sie(e[1]),(e,t,n)=>Goe([e,t],n)),wl=Xn(2,(e,t)=>{const n=Object.create(Zoe);return n[Yt]=e,n[Yo]=t.length!==1?r=>t(r):t,n}),Zoe=i4({op:"OnSuccess",[ei](e){return e._stack.push(this),this[Yt]}}),Yoe=e=>Jd in e,a4=Vc(void 0),Xoe=Xn(2,(e,t)=>Koe(e,wl(hse(t.duration),t.orElse))),Joe=zs({op:"OnExit",single:!1,[ei](e){return e._stack.push(this),this[Yt][0]},[bl](e){e.interruptible&&this[Yt][2]!==!0&&(e._stack.push(l4),e.interruptible=!1)},[Yo](e,t,n){n??=Vc(e);const r=this[Yt][1](n);return r?wl(r,i=>n):n},[il](e,t,n){n??=Vp(e);const r=this[Yt][1](n);return r?wl(r,i=>n):n}}),Qoe=Xn(2,Joe),ese=Xn(2,(e,t)=>Qoe(e,n=>t)),tse=e=>ol(t=>(t.interruptible&&(t.interruptible=!1,t._stack.push(l4)),e)),nse=zs({op:"SetInterruptible",[bl](e){if(e.interruptible=this[Yt],e._interruptedCause&&e.interruptible)return()=>$m(e._interruptedCause)}}),l4=nse(!0),rse=(e,t,n=!1,r=!1,i=!1)=>{const o=i==="inherit"?e.interruptible:!i,s=new s$(e.context,o);return n?s.evaluate(t):e.currentDispatcher.scheduleTask(()=>s.evaluate(t),0),!r&&!s._exit&&(e.children().add(s),s.addObserver(()=>e._children.delete(s))),s},ise=e=>(t,n)=>{const r=new s$(n?.scheduler?Bie(e,i$,n.scheduler):e,n?.uninterruptible!==!0);if(r.evaluate(t),r._exit)return r;if(n?.signal)if(n.signal.aborted)r.interruptUnsafe();else{const i=()=>r.interruptUnsafe();n.signal.addEventListener("abort",i,{once:!0}),r.addObserver(()=>n.signal.removeEventListener("abort",i))}return n?.onFiberStart&&n.onFiberStart(r),r},ose=e=>{const t=ise(e);return(n,r)=>{const i=t(n,r);return new Promise(o=>{i.addObserver(s=>o(s))})}},sse=e=>{const t=ose(e);return(n,r)=>t(n,r).then(i=>{if(i._tag==="Failure")throw Moe(i.cause);return i.value})},ase=sse(Uie()),lse=Pl("effect/Clock",{defaultValue:()=>new use}),cse=2**31-1;class use{currentTimeMillisUnsafe(){return Date.now()}currentTimeMillis=Ld(()=>this.currentTimeMillisUnsafe());currentTimeNanosUnsafe(){return dse()}currentTimeNanos=Ld(()=>this.currentTimeNanosUnsafe());sleep(t){const n=doe(t);return n<=0?a$:s4(r=>{if(n>cse)return;const i=setTimeout(()=>r(Uoe),n);return Ld(()=>clearTimeout(i))})}}const nx=(function(){const e=BigInt(1e6);if(typeof performance>"u"||typeof performance.now>"u")return()=>BigInt(Date.now())*e;if(typeof performance.timeOrigin=="number"&&performance.timeOrigin===0)return()=>BigInt(Math.round(performance.now()*1e6));const t=BigInt(Date.now())*e-BigInt(Math.round(performance.now()*1e6));return()=>t+BigInt(Math.round(performance.now()*1e6))})(),dse=(function(){const e=typeof process=="object"&&"hrtime"in process&&typeof process.hrtime.bigint=="function"?process.hrtime:void 0;if(!e)return nx;const t=nx()-e.bigint();return()=>t+e.bigint()})(),fse=e=>ol(t=>e(t.getRef(lse))),hse=e=>fse(t=>t.sleep(Xie(e))),mse=typeof process=="object"&&process!==null&&typeof process.stdout=="object"&&process.stdout!==null;mse&&process.stdout.isTTY;const pse=Hoe,gse=Of,vse=Ld,yse=Voe,bse=Xoe,wse=ese,kse=ase,c$=e=>e!=null&&(e=Object.getPrototypeOf(e),e===Array.prototype||e===Object.prototype);function u$(e,t,n){for(const[r,i]of Object.entries(t)){const o=`${n}.${r}`;e[o]=i,c$(i)&&u$(e,i,o)}}function d$(e){const t={...e};for(const[n,r]of Object.entries(e))c$(r)&&u$(t,r,n);return t}const xse=(e,t)=>{if(t)for(const[n,r]of Object.entries(t))e=e.replace(new RegExp(`{{\\s*${n}\\s*}}`,"g"),r);return e},Sse=(e=>e);function _se(e,t=Sse){return(n,...r)=>{n[0]==="."&&(n=n.slice(1));const i=e()?.[n];switch(typeof i){case"function":return i(...r);case"string":return t(i,r[0]);default:return i}}}const f$=["en","zh","zht","ko","de","es","fr","da","ja","pl","ru","ar","no","br","th","bs","tr"],Cse={en:"en",zh:"zh-Hans",zht:"zh-Hant",ko:"ko",de:"de",es:"es",fr:"fr",da:"da",ja:"ja",pl:"pl",ru:"ru",ar:"ar",no:"nb-NO",br:"pt-BR",th:"th",bs:"bs",tr:"tr"},Ise=[{locale:"en",match:e=>e.startsWith("en")},{locale:"zht",match:e=>e.startsWith("zh")&&(e.includes("hant")||e.includes("tw")||e.includes("hk"))},{locale:"zh",match:e=>e.startsWith("zh")},{locale:"ko",match:e=>e.startsWith("ko")},{locale:"de",match:e=>e.startsWith("de")},{locale:"es",match:e=>e.startsWith("es")},{locale:"fr",match:e=>e.startsWith("fr")},{locale:"da",match:e=>e.startsWith("da")},{locale:"ja",match:e=>e.startsWith("ja")},{locale:"pl",match:e=>e.startsWith("pl")},{locale:"ru",match:e=>e.startsWith("ru")},{locale:"ar",match:e=>e.startsWith("ar")},{locale:"no",match:e=>e.startsWith("no")||e.startsWith("nb")||e.startsWith("nn")},{locale:"br",match:e=>e.startsWith("pt")},{locale:"th",match:e=>e.startsWith("th")},{locale:"bs",match:e=>e.startsWith("bs")},{locale:"tr",match:e=>e.startsWith("tr")}];function h$(e){if(!e)return;const t=e.toLowerCase().replaceAll("_","-"),n=f$.find(r=>r===t);return n||Ise.find(r=>r.match(t))?.locale}function Tse(e,t="en"){return h$(e)??t}function Ese(e,t="en"){for(const n of e){const r=h$(n);if(r)return r}return t}function $se(e,t="en"){if(!e)return t;const n=e.languages?.length?e.languages:[e.language];return Ese(n,t)}const{use:qi,provider:Ase}=hn({name:"Platform",init:e=>e.value});function Lse(e,t={}){const n=t.storage||globalThis.localStorage,r=t.name||`storage-${an()}`;if(!n)return[e[0],e[1],null];const i=t.storageOptions,o=t.serialize||JSON.stringify.bind(JSON),s=t.deserialize||JSON.parse.bind(JSON),a=n.getItem(r,i),l=typeof e[0]=="function"?u=>{try{const d=s(u);e[1](()=>d)}catch{}}:u=>{try{const d=s(u);e[1](St(d))}catch{}};let c=!0;if(a instanceof Promise?a.then(u=>c&&u&&l(u)):a&&l(a),typeof t.sync?.[0]=="function"){const u=typeof e[0]=="function"?e[0]:()=>e[0];t.sync[0](d=>{d.key!==r||(d.url||globalThis.location.href)!==globalThis.location.href||d.newValue===o(ot(u))||l(d.newValue)})}return[e[0],typeof e[0]=="function"?u=>{const d=e[1](u),h=u!=null?o(d):u;return t.sync?.[1](r,h),h!=null?n.setItem(r,h,i):n.removeItem(r,i),c=!1,d}:(...u)=>{e[1](...u);const d=o(ot(()=>e[0]));t.sync?.[1](r,d),n.setItem(r,d,i),c=!1},a]}const Dse="default.dat",rx="codeplane.global.dat",Mse="codeplane.",m$=new Map,Ose=500,p$=8*1024*1024,Wo=new Map,Am={bytes:0};function fu(e){const t=Wo.get(e);t&&(Am.bytes-=t.bytes,Wo.delete(e))}function Pse(){for(;;){if(Wo.size<=Ose&&Am.bytes<=p$)return;const e=Wo.keys().next().value;if(!e)return;fu(e)}}function ef(e,t){const n=t.length*2;if(n>p$){fu(e);return}const r=Wo.get(e);r&&(Am.bytes-=r.bytes),Wo.delete(e),Wo.set(e,{value:t,bytes:n}),Am.bytes+=n,Pse()}function g$(e){const t=Wo.get(e);if(t)return Wo.delete(e),Wo.set(e,t),t.value}function Lc(e){return m$.get(e)===!0}function aa(e){m$.set(e,!0)}function Rb(e){if(e instanceof DOMException)return e.name==="QuotaExceededError"||e.name==="NS_ERROR_DOM_QUOTA_REACHED"||e.name==="QUOTA_EXCEEDED_ERR"||e.code===22||e.code===1014;if(!e||typeof e!="object")return!1;const t=e.name;if(t==="QuotaExceededError"||t==="NS_ERROR_DOM_QUOTA_REACHED"||t&&/quota/i.test(t))return!0;const n=e.code;if(n===22||n===1014)return!0;const r=e.message;return typeof r!="string"?!1:!!/quota/i.test(r)}function Rse(e,t,n){const r=e.length,i=Array.from({length:r},(s,a)=>a),o=[];for(const s of i){const a=e.key(s);if(!a||!a.startsWith(Mse)||a===t)continue;const l=e.getItem(a);o.push({key:a,size:l?.length??0})}o.sort((s,a)=>a.size-s.size);for(const s of o){e.removeItem(s.key),fu(s.key);try{return e.setItem(t,n),ef(t,n),!0}catch(a){if(!Rb(a))throw a}}return!1}function v$(e,t,n){try{return e.setItem(t,n),ef(t,n),!0}catch(i){if(!Rb(i))throw i}try{return e.removeItem(t),fu(t),e.setItem(t,n),ef(t,n),!0}catch(i){if(!Rb(i))throw i}return Rse(e,t,n)}function Nse(e){return JSON.parse(JSON.stringify(e))}function ix(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}function y$(e,t){if(t===void 0)return e;if(t===null)return t;if(Array.isArray(e))return Array.isArray(t)?t:e;if(ix(e)){if(!ix(t))return e;const n={...e};for(const r of Object.keys(t))r in e?n[r]=y$(e[r],t[r]):n[r]=t[r];return n}return t}function zse(e){try{return JSON.parse(e)}catch{return}}function Xh(e,t,n){const r=zse(t);if(r===void 0)return;const i=n?n(r):r,o=y$(e,i);return JSON.stringify(o)}function b$(e){return typeof e=="string"?e:e.key}function Av(e){return typeof e=="string"?!1:e.legacy===!0}function Lm(e,t){const n=(e.slice(0,18)||t).replace(/[^a-zA-Z0-9._-]/g,"-"),r=Di(e)??"0";return`${n}.${r}`}function jse(e){return`codeplane.server.${Lm(b$(e),"server")}.dat`}function Jh(e){return`codeplane.workspace.${Lm(e,"workspace")}.dat`}function ox(e,t){return`codeplane.server.workspace.${Lm(b$(e),"server")}.${Lm(t,"workspace")}.dat`}function Lv(e,t){return t?e:[]}function Dv(e,t){return e?t:[]}function w$(e){const t=`${e}:`,n=`prefix:${e}`,r=i=>t+i;return{getItem:i=>{const o=r(i),s=g$(o);if(Lc(n))return s??null;const a=(()=>{try{return localStorage.getItem(o)}catch{return aa(n),null}})();return a===null?s??null:(ef(o,a),a)},setItem:(i,o)=>{const s=r(i);if(!Lc(n)){try{if(v$(localStorage,s,o))return}catch{aa(n);return}aa(n)}},removeItem:i=>{const o=r(i);if(fu(o),!Lc(n))try{localStorage.removeItem(o)}catch{aa(n)}}}}function Nb(){const e="direct";return{getItem:t=>{const n=g$(t);if(Lc(e))return n??null;const r=(()=>{try{return localStorage.getItem(t)}catch{return aa(e),null}})();return r===null?n??null:(ef(t,r),r)},setItem:(t,n)=>{if(!Lc(e)){try{if(v$(localStorage,t,n))return}catch{aa(e);return}aa(e)}},removeItem:t=>{if(fu(t),!Lc(e))try{localStorage.removeItem(t)}catch{aa(e)}}}}const In={global(e,t){return{storage:rx,key:e,legacy:t}},server(e,t,n){const r=Av(e);return{storage:jse(e),key:t,legacy:Lv(n,r),legacyTargets:Dv(r,[{storage:rx,key:t}])}},workspace(e,t,n){return{storage:Jh(e),key:`workspace:${t}`,legacy:n}},serverWorkspace(e,t,n,r){const i=Av(e);return{storage:ox(e,t),key:`workspace:${n}`,legacy:Lv(r,i),legacyTargets:Dv(i,[{storage:Jh(t),key:`workspace:${n}`}])}},session(e,t,n,r){return{storage:Jh(e),key:`session:${t}:${n}`,legacy:r}},serverSession(e,t,n,r,i){const o=Av(e);return{storage:ox(e,t),key:`session:${n}:${r}`,legacy:Lv(i,o),legacyTargets:Dv(o,[{storage:Jh(t),key:`session:${n}:${r}`}])}},scoped(e,t,n,r){return t?In.session(e,t,n,r):In.workspace(e,n,r)},serverScoped(e,t,n,r,i){return n?In.serverSession(e,t,n,r,i):In.serverWorkspace(e,t,r,i)}};function Dm(e,t){if(!!t?.storage)return t.storage?.(e.storage)?.removeItem(e.key);if(!e.storage){Nb().removeItem(e.key);return}w$(e.storage).removeItem(e.key)}function ir(e,t){const n=qi(),r=typeof e=="string"?{key:e}:e,i=Nse(t[0]),o=r.legacy??[],s=!!n.storage,a=v=>s?n.storage?.(v):v?w$(v):Nb(),l=a(r.storage),c=s?r.storage?n.storage?.(Dse):n.storage?.():Nb(),u=()=>[...(r.legacyTargets??[]).flatMap(v=>{const y=a(v.storage);return y?[{storage:y,key:v.key}]:[]}),...o.flatMap(v=>c?[{storage:c,key:v}]:[])],d=(()=>{if(!s){const w=l;return{getItem:x=>{const C=w.getItem(x);if(C!==null){const S=Xh(i,C,r.migrate);return S===void 0?(w.removeItem(x),null):(C!==S&&w.setItem(x,S),S)}for(const S of u()){const $=S.storage.getItem(S.key);if($===null)continue;const O=Xh(i,$,r.migrate);if(O===void 0){S.storage.removeItem(S.key);continue}return w.setItem(x,O),S.storage.removeItem(S.key),O}return null},setItem:(x,C)=>{w.setItem(x,C)},removeItem:x=>{w.removeItem(x)}}}const v=l;return{getItem:async w=>{const k=await v.getItem(w);if(k!==null){const x=Xh(i,k,r.migrate);return x===void 0?(await v.removeItem(w).catch(()=>{}),null):(k!==x&&await v.setItem(w,x),x)}for(const x of u()){const C=await x.storage.getItem(x.key);if(C===null)continue;const S=Xh(i,C,r.migrate);if(S===void 0){await x.storage.removeItem(x.key).catch(()=>{});continue}return await v.setItem(w,S),await x.storage.removeItem(x.key),S}return null},setItem:async(w,k)=>{await v.setItem(w,k)},removeItem:async w=>{await v.removeItem(w)}}})(),[h,f,m]=Lse(t,{name:r.key,storage:d}),p=m instanceof Promise;if(!p)return[h,f,m,Object.assign(()=>!0,{promise:void 0})];const[g]=Xo(()=>m,async v=>(v instanceof Promise&&await v,!0),{initialValue:!p});return[h,f,m,Object.assign(()=>g.loading?!1:g.latest===!0,{promise:m})]}const k$={"command.category.suggested":"Suggested","command.category.view":"View","command.category.project":"Project","command.category.provider":"Provider","command.category.server":"Server","command.category.session":"Session","command.category.theme":"Theme","command.category.language":"Language","command.category.file":"File","command.category.context":"Context","command.category.terminal":"Terminal","command.category.model":"Model","command.category.mcp":"MCP","command.category.agent":"Agent","command.category.permissions":"Permissions","command.category.workspace":"Workspace","command.category.settings":"Settings","theme.scheme.system":"System","theme.scheme.light":"Light","theme.scheme.dark":"Dark","command.sidebar.toggle":"Toggle sidebar","command.project.open":"Open project","command.project.previous":"Previous project","command.project.next":"Next project","command.provider.connect":"Connect provider","command.server.switch":"Switch server","command.settings.open":"Open settings","command.session.previous":"Previous session","command.session.next":"Next session","command.session.previous.unseen":"Previous unread session","command.session.next.unseen":"Next unread session","command.session.archive":"Archive session","command.session.archived":"Archived sessions","command.cron.open":"Scheduled tasks","cron.title":"Scheduled tasks","cron.subtitle":"Run agent tasks automatically on a schedule.","cron.empty":"No scheduled tasks yet. Create one to run the agent automatically.","cron.empty.project":"No scheduled tasks for this project yet.","cron.create":"New scheduled task","cron.create.noProject":"No project available — open a project first.","common.back":"Back","cron.delete.confirm":"Delete this scheduled task and all its runs?","cron.action.pause":"Pause","cron.action.resume":"Resume","cron.action.disable":"Disable","cron.action.activate":"Activate","cron.action.trigger":"Run now","cron.action.delete":"Delete","cron.action.edit":"Edit","cron.action.cancel":"Cancel run","cron.action.openSession":"Open session","cron.field.name":"Name","cron.field.name.placeholder":"Daily code review","cron.field.description":"Description","cron.field.prompt":"Task prompt","cron.field.prompt.placeholder":"Describe exactly what the agent should do.","cron.field.schedule":"Schedule","cron.field.schedule.cron":"Cron expression","cron.field.schedule.cron.placeholder":"e.g. 0 9 * * 1-5","cron.field.schedule.interval":"Interval (minutes)","cron.field.scheduleKind":"Schedule type","cron.field.timeout":"Timeout (minutes)","cron.field.agent":"Agent","cron.field.model":"Model (provider/modelID)","cron.field.directory":"Directory","cron.status.active":"Active","cron.status.paused":"Paused","cron.status.disabled":"Disabled","cron.run.status.queued":"Queued","cron.run.status.running":"Running","cron.run.status.success":"Success","cron.run.status.failed":"Failed","cron.run.status.timeout":"Timed out","cron.run.status.cancelled":"Cancelled","cron.runs.title":"Recent runs","cron.runs.empty":"No runs yet","cron.next":"Next run","cron.last":"Last run","cron.never":"Never","cron.error.name.required":"Name is required","cron.error.prompt.required":"Prompt is required","cron.error.interval.min":"Interval must be at least 1 minute","cron.error.timeout.min":"Timeout must be at least 1 minute","cron.error.validation.fix":"Please fix the highlighted fields","cron.rail.title":"Sessions","cron.rail.tasks":"Scheduled tasks","cron.rail.empty":"No sessions yet","session.cron.readonly":"This is a scheduled task session. The agent runs autonomously — no input is accepted.","command.palette":"Command palette","command.quickSwitcher.open":"Quick switcher","quickSwitcher.title":"Quick switcher","quickSwitcher.search.label":"Search","quickSwitcher.search.placeholder":"Search sessions, projects, servers…","quickSwitcher.empty":"No matches.","quickSwitcher.section.sessions":"Sessions in this project","quickSwitcher.section.projects":"Projects","quickSwitcher.section.actions":"Actions","quickSwitcher.action.browseProject":"Browse and open another directory","quickSwitcher.action.switchServer":"Switch server","quickSwitcher.label.current":"Current","quickSwitcher.hint.enter":"↵","command.theme.cycle":"Cycle theme","command.theme.set":"Use theme: {{theme}}","command.theme.scheme.cycle":"Cycle color scheme","command.theme.scheme.set":"Use color scheme: {{scheme}}","command.language.cycle":"Cycle language","command.language.set":"Use language: {{language}}","command.session.new":"New session","command.file.open":"Open file","command.tab.close":"Close tab","command.context.addSelection":"Add selection to context","command.context.addSelection.description":"Add selected lines from the current file","command.input.focus":"Focus input","command.terminal.toggle":"Toggle terminal","command.fileTree.toggle":"Toggle file tree","command.review.toggle":"Toggle review","command.terminal.new":"New terminal","command.terminal.new.description":"Create a new terminal tab","command.steps.toggle":"Toggle steps","command.steps.toggle.description":"Show or hide steps for the current message","command.message.previous":"Previous message","command.message.previous.description":"Go to the previous user message","command.message.next":"Next message","command.message.next.description":"Go to the next user message","command.model.choose":"Choose model","command.model.choose.description":"Select a different model","command.mcp.toggle":"Toggle MCPs","command.mcp.toggle.description":"Toggle MCPs","command.agent.cycle":"Cycle agent","command.agent.cycle.description":"Switch to the next agent","command.agent.cycle.reverse":"Cycle agent backwards","command.agent.cycle.reverse.description":"Switch to the previous agent","command.model.variant.cycle":"Cycle thinking effort","command.model.variant.cycle.description":"Switch to the next effort level","command.prompt.mode.shell":"Shell","command.prompt.mode.normal":"Prompt","command.permissions.autoaccept.enable":"Auto-accept permissions","command.permissions.autoaccept.disable":"Stop auto-accepting permissions","command.workspace.toggle":"Toggle workspaces","command.workspace.toggle.description":"Enable or disable multiple workspaces in the sidebar","command.session.undo":"Undo","command.session.undo.description":"Undo the last message","command.session.redo":"Redo","command.session.redo.description":"Redo the last undone message","command.session.compact":"Compact session","command.session.compact.description":"Summarize the session to reduce context size","command.session.fork":"Fork from message","command.session.fork.description":"Create a new session from a previous message","command.session.share":"Share session","command.session.share.description":"Share this session and copy the URL to clipboard","command.session.unshare":"Unshare session","command.session.unshare.description":"Stop sharing this session","palette.search.placeholder":"Search files, commands, and sessions","palette.empty":"No results found","palette.empty.filesPrompt":"Type to search files","palette.group.commands":"Commands","palette.group.files":"Files","dialog.provider.search.placeholder":"Search providers","dialog.provider.empty":"No providers found","dialog.provider.group.popular":"Popular","dialog.provider.group.other":"Other","dialog.provider.tag.recommended":"Recommended","dialog.provider.codeplane.note":"Curated models including Claude, GPT, Gemini and more","dialog.provider.codeplane.tagline":"Reliable optimized models","dialog.provider.anthropic.note":"Connect with an Anthropic API key","dialog.provider.copilot.note":"AI models for coding assistance via GitHub Copilot","dialog.provider.openai.note":"GPT models for fast, capable general AI tasks","dialog.provider.google.note":"Gemini models for fast, structured responses","dialog.provider.openrouter.note":"Access all supported models from one provider","dialog.provider.vercel.note":"Unified access to AI models with smart routing","dialog.model.select.title":"Select model","dialog.model.search.placeholder":"Search models","dialog.model.empty":"No model results","dialog.model.manage":"Manage models","dialog.model.manage.description":"Choose which models are shown in the session model selector.","dialog.model.manage.provider.toggle":"Toggle all {{provider}} models","dialog.model.unpaid.freeModels.title":"Free models provided by Codeplane","dialog.model.unpaid.addMore.title":"Add more models from popular providers","dialog.provider.viewAll":"Show more providers","provider.connect.title":"Connect {{provider}}","provider.connect.title.anthropicProMax":"Login with Claude Pro/Max","provider.connect.selectMethod":"Select login method for {{provider}}.","provider.connect.method.apiKey":"API key","provider.connect.status.inProgress":"Authorization in progress...","provider.connect.status.waiting":"Waiting for authorization...","provider.connect.status.failed":"Authorization failed: {{error}}","provider.connect.apiKey.description":"Enter your {{provider}} API key to connect your account and use {{provider}} models in Codeplane.","provider.connect.apiKey.label":"{{provider}} API key","provider.connect.apiKey.placeholder":"API key","provider.connect.apiKey.required":"API key is required","provider.connect.oauth.code.visit.prefix":"Visit ","provider.connect.oauth.code.visit.link":"this link","provider.connect.oauth.code.visit.suffix":" to collect your authorization code to connect your account and use {{provider}} models in Codeplane.","provider.connect.oauth.code.label":"{{method}} authorization code","provider.connect.oauth.code.placeholder":"Authorization code","provider.connect.oauth.code.required":"Authorization code is required","provider.connect.oauth.code.invalid":"Invalid authorization code","provider.connect.oauth.auto.visit.prefix":"Visit ","provider.connect.oauth.auto.visit.link":"this link","provider.connect.oauth.auto.visit.suffix":" and enter the code below to connect your account and use {{provider}} models in Codeplane.","provider.connect.oauth.auto.confirmationCode":"Confirmation code","provider.connect.toast.connected.title":"{{provider}} connected","provider.connect.toast.connected.description":"{{provider}} models are now available to use.","provider.custom.title":"Custom provider","provider.custom.description.prefix":"Configure an OpenAI-compatible provider. See the ","provider.custom.description.link":"provider config docs","provider.custom.description.suffix":".","provider.custom.field.providerID.label":"Provider ID","provider.custom.field.providerID.placeholder":"myprovider","provider.custom.field.providerID.description":"Lowercase letters, numbers, hyphens, or underscores","provider.custom.field.name.label":"Display name","provider.custom.field.name.placeholder":"My AI Provider","provider.custom.field.baseURL.label":"Base URL","provider.custom.field.baseURL.placeholder":"https://api.myprovider.com/v1","provider.custom.field.apiKey.label":"API key","provider.custom.field.apiKey.placeholder":"API key","provider.custom.field.apiKey.description":"Optional. Leave empty if you manage auth via headers.","provider.custom.models.label":"Models","provider.custom.models.id.label":"ID","provider.custom.models.id.placeholder":"model-id","provider.custom.models.name.label":"Name","provider.custom.models.name.placeholder":"Display Name","provider.custom.models.remove":"Remove model","provider.custom.models.add":"Add model","provider.custom.models.fetch":"Fetch models","provider.custom.models.fetch.loading":"Fetching...","provider.custom.models.fetch.success":"Fetched {{count}} models","provider.custom.models.fetch.empty":"No models found","provider.custom.models.fetch.error":"Could not fetch models from that provider","provider.custom.headers.label":"Headers (optional)","provider.custom.headers.key.label":"Header","provider.custom.headers.key.placeholder":"Header-Name","provider.custom.headers.value.label":"Value","provider.custom.headers.value.placeholder":"value","provider.custom.headers.remove":"Remove header","provider.custom.headers.add":"Add header","provider.custom.error.providerID.required":"Provider ID is required","provider.custom.error.providerID.format":"Use lowercase letters, numbers, hyphens, or underscores","provider.custom.error.providerID.exists":"That provider ID already exists","provider.custom.error.name.required":"Display name is required","provider.custom.error.baseURL.required":"Base URL is required","provider.custom.error.baseURL.format":"Must start with http:// or https://","provider.custom.error.required":"Required","provider.custom.error.duplicate":"Duplicate","provider.disconnect.toast.disconnected.title":"{{provider}} disconnected","provider.disconnect.toast.disconnected.description":"{{provider}} models are no longer available.","model.tag.free":"Free","model.tag.latest":"Latest","model.provider.anthropic":"Anthropic","model.provider.openai":"OpenAI","model.provider.google":"Google","model.provider.xai":"xAI","model.provider.meta":"Meta","model.input.text":"text","model.input.image":"image","model.input.audio":"audio","model.input.video":"video","model.input.pdf":"pdf","model.tooltip.allows":"Allows: {{inputs}}","model.tooltip.reasoning.allowed":"Allows reasoning","model.tooltip.reasoning.none":"No reasoning","model.tooltip.context":"Context limit {{limit}}","common.search.placeholder":"Search","common.goBack":"Navigate back","common.goForward":"Navigate forward","common.loading":"Loading","common.loading.ellipsis":"...","common.cancel":"Cancel","common.open":"Open","common.connect":"Connect","common.disconnect":"Disconnect","common.continue":"Continue","common.submit":"Submit","common.save":"Save","common.saving":"Saving...","common.default":"Default","common.attachment":"attachment","prompt.placeholder.shell":"Enter shell command... {{example}}","prompt.placeholder.normal":'Ask anything... "{{example}}"',"prompt.placeholder.simple":"Ask anything...","prompt.placeholder.summarizeComments":"Summarize comments…","prompt.placeholder.summarizeComment":"Summarize comment…","prompt.mode.shell":"Shell","prompt.mode.normal":"Prompt","prompt.mode.shell.exit":"esc to exit","session.child.promptDisabled":"Subagent sessions cannot be prompted.","session.child.backToParent":"Back to main session.","prompt.example.1":"Fix a TODO in the codebase","prompt.example.2":"What is the tech stack of this project?","prompt.example.3":"Fix broken tests","prompt.example.4":"Explain how authentication works","prompt.example.5":"Find and fix security vulnerabilities","prompt.example.6":"Add unit tests for the user service","prompt.example.7":"Refactor this function to be more readable","prompt.example.8":"What does this error mean?","prompt.example.9":"Help me debug this issue","prompt.example.10":"Generate API documentation","prompt.example.11":"Optimize database queries","prompt.example.12":"Add input validation","prompt.example.13":"Create a new component for...","prompt.example.14":"How do I deploy this project?","prompt.example.15":"Review my code for best practices","prompt.example.16":"Add error handling to this function","prompt.example.17":"Explain this regex pattern","prompt.example.18":"Convert this to TypeScript","prompt.example.19":"Add logging throughout the codebase","prompt.example.20":"What dependencies are outdated?","prompt.example.21":"Help me write a migration script","prompt.example.22":"Implement caching for this endpoint","prompt.example.23":"Add pagination to this list","prompt.example.24":"Create a CLI command for...","prompt.example.25":"How do environment variables work here?","prompt.popover.emptyResults":"No matching results","prompt.popover.emptyCommands":"No matching commands","prompt.dropzone.label":"Drop images, PDFs, or text files here","prompt.dropzone.file.label":"Drop to @mention file","prompt.slash.badge.custom":"custom","prompt.slash.badge.skill":"skill","prompt.slash.badge.mcp":"mcp","prompt.context.active":"active","prompt.context.includeActiveFile":"Include active file","prompt.context.removeActiveFile":"Remove active file from context","prompt.context.removeFile":"Remove file from context","prompt.action.attachFile":"Add files","prompt.action.screenshot":"Capture screenshot","prompt.attachment.remove":"Remove attachment","prompt.action.send":"Send","prompt.action.stop":"Stop","prompt.toast.pasteUnsupported.title":"Unsupported attachment","prompt.toast.pasteUnsupported.description":"Only images, PDFs, or text files can be attached here.","prompt.toast.screenshotUnsupported.title":"Screenshots not supported","prompt.toast.screenshotUnsupported.description":"This browser doesn't expose the Screen Capture API. Drop or paste an image instead.","prompt.toast.screenshotFailed.title":"Screenshot failed","prompt.toast.screenshotFailed.description":"Couldn't capture the selected screen. Try again or attach the image manually.","prompt.toast.modelAgentRequired.title":"Select an agent and model","prompt.toast.modelAgentRequired.description":"Choose an agent and model before sending a prompt.","prompt.toast.worktreeCreateFailed.title":"Failed to create worktree","prompt.toast.sessionCreateFailed.title":"Failed to create session","prompt.toast.shellSendFailed.title":"Failed to send shell command","prompt.toast.commandSendFailed.title":"Failed to send command","prompt.toast.promptSendFailed.title":"Failed to send prompt","prompt.toast.promptSendFailed.description":"Unable to retrieve session","dialog.mcp.title":"MCPs","dialog.mcp.description":"{{enabled}} of {{total}} enabled","dialog.mcp.empty":"No MCPs configured","dialog.lsp.empty":"LSPs auto-detected from file types","dialog.plugins.empty":"No plugins loaded from codeplane.jsonc or config/plugins","mcp.status.connected":"connected","mcp.status.failed":"failed","mcp.status.needs_auth":"needs auth","mcp.status.disabled":"disabled","dialog.fork.empty":"No messages to fork from","dialog.directory.search.placeholder":"Search folders","dialog.directory.empty":"No folders found","app.server.unreachable":"Could not reach {{server}}","app.server.retrying":"Retrying automatically...","app.server.otherServers":"Other instances","dialog.server.title":"Instances","dialog.server.description":"Switch which Codeplane instance this app is attached to.","dialog.server.search.placeholder":"Search instances","dialog.server.empty":"No instances yet","dialog.server.add.title":"Add instance","dialog.server.add.url":"Instance address","dialog.server.add.placeholder":"http://localhost:4096","dialog.server.add.error":"Could not reach this instance","dialog.server.add.checking":"Checking...","dialog.server.add.button":"Add instance","dialog.server.add.name":"Instance name (optional)","dialog.server.add.namePlaceholder":"Localhost","dialog.server.add.username":"Username (optional)","dialog.server.add.usernamePlaceholder":"username","dialog.server.add.password":"Password (optional)","dialog.server.add.passwordPlaceholder":"password","dialog.server.edit.title":"Edit instance","dialog.server.default.title":"Default instance","dialog.server.default.description":"Attach to this instance on app launch instead of starting a fresh local one. Requires restart.","dialog.server.default.none":"No instance selected","dialog.server.default.set":"Set current instance as default","dialog.server.default.clear":"Clear","dialog.server.action.remove":"Remove instance","dialog.server.menu.edit":"Edit","dialog.server.menu.default":"Set as default","dialog.server.menu.defaultRemove":"Remove default","dialog.server.menu.delete":"Delete","dialog.server.current":"Current instance","dialog.server.status.default":"Default","server.row.noUsername":"no username","dialog.project.edit.title":"Edit project","dialog.project.edit.name":"Name","dialog.project.edit.icon":"Icon","dialog.project.edit.icon.alt":"Project icon","dialog.project.edit.icon.hint":"Click or drag an image","dialog.project.edit.icon.recommended":"Recommended: 128x128px","dialog.project.edit.color":"Color","dialog.project.edit.color.select":"Select {{color}} color","dialog.project.edit.worktree.startup":"Workspace startup script","dialog.project.edit.worktree.startup.description":"Runs after creating a new workspace (worktree).","dialog.project.edit.worktree.startup.placeholder":"e.g. bun install","dialog.releaseNotes.action.getStarted":"Get started","dialog.releaseNotes.action.next":"Next","dialog.releaseNotes.action.hideFuture":"Don't show these in the future","dialog.releaseNotes.media.alt":"Release preview","context.breakdown.title":"Context Breakdown","context.breakdown.note":'Approximate breakdown of input tokens. "Other" includes tool definitions and overhead.',"context.breakdown.system":"System","context.breakdown.user":"User","context.breakdown.assistant":"Assistant","context.breakdown.tool":"Tool Calls","context.breakdown.other":"Other","context.systemPrompt.title":"System Prompt","context.rawMessages.title":"Raw messages","context.stats.session":"Session","context.stats.averageTokensPerSecond":"Generation speed","context.stats.messages":"Messages","context.stats.provider":"Provider","context.stats.model":"Model","context.stats.limit":"Context Limit","context.stats.totalTokens":"Total Tokens","context.stats.usage":"Usage","context.stats.inputTokens":"Input Tokens","context.stats.outputTokens":"Output Tokens","context.stats.reasoningTokens":"Reasoning Tokens","context.stats.cacheTokens":"Cache Tokens (read/write)","context.stats.userMessages":"User Messages","context.stats.assistantMessages":"Assistant Messages","context.stats.totalCost":"Total Cost","context.stats.sessionCreated":"Session Created","context.stats.lastActivity":"Last Activity","context.usage.tokens":"Tokens","context.usage.usage":"Usage","context.usage.cost":"Cost","context.usage.clickToView":"Click to view context","context.usage.view":"View context usage","language.en":"English","language.zh":"简体中文","language.zht":"繁體中文","language.ko":"한국어","language.de":"Deutsch","language.es":"Español","language.fr":"Français","language.da":"Dansk","language.ja":"日本語","language.pl":"Polski","language.ru":"Русский","language.ar":"العربية","language.no":"Norsk","language.br":"Português (Brasil)","language.bs":"Bosanski","language.th":"ไทย","language.tr":"Türkçe","toast.language.title":"Language","toast.language.description":"Switched to {{language}}","toast.theme.title":"Theme switched","toast.scheme.title":"Color scheme","toast.workspace.enabled.title":"Workspaces enabled","toast.workspace.enabled.description":"Multiple worktrees are now shown in the sidebar","toast.workspace.disabled.title":"Workspaces disabled","toast.workspace.disabled.description":"Only the main worktree is shown in the sidebar","toast.permissions.autoaccept.on.title":"Auto-accepting permissions","toast.permissions.autoaccept.on.description":"Permission requests will be automatically approved","toast.permissions.autoaccept.off.title":"Stopped auto-accepting permissions","toast.permissions.autoaccept.off.description":"Permission requests will require approval","toast.model.none.title":"No model selected","toast.model.none.description":"Connect a provider to summarize this session","toast.file.loadFailed.title":"Failed to load file","toast.file.listFailed.title":"Failed to list files","toast.context.noLineSelection.title":"No line selection","toast.context.noLineSelection.description":"Select a line range in a file tab first.","toast.session.share.copyFailed.title":"Failed to copy URL to clipboard","toast.session.share.success.title":"Session shared","toast.session.share.success.description":"Share URL copied to clipboard!","toast.session.share.failed.title":"Failed to share session","toast.session.share.failed.description":"An error occurred while sharing the session","toast.session.unshare.success.title":"Session unshared","toast.session.unshare.success.description":"Session unshared successfully!","toast.session.unshare.failed.title":"Failed to unshare session","toast.session.unshare.failed.description":"An error occurred while unsharing the session","toast.session.listFailed.title":"Failed to load sessions for {{project}}","toast.project.reloadFailed.title":"Failed to reload {{project}}","toast.update.available.title":"Update available","toast.update.available.description":"Version {{version}} is ready to install.","toast.update.installing.title":"Installing update","toast.update.installing.description":"Hang tight — this can take a moment.","toast.update.installed.title":"Update installed","toast.update.installed.description":"Restart to start using version {{version}}.","toast.update.installed.descriptionRestartRequired":"Version {{version}} is installed. Restart codeplane to use it.","toast.update.installed.descriptionFallback":"Restart to apply the update.","toast.update.upToDate.title":"Already up to date","toast.update.failed.title":"Update failed","toast.update.failed.description":"Could not install the update.","toast.update.action.updateNow":"Update now","toast.update.action.later":"Later","toast.update.action.restart":"Restart","toast.update.action.retry":"Retry","toast.update.action.whatsNew":"What's new","toast.update.action.dismiss":"Dismiss","dialog.whatsNew.title":"What's new in {{version}}","dialog.whatsNew.subtitle":"Updated from {{previous}} → {{current}}","dialog.whatsNew.empty":"No release notes available for this version.","dialog.whatsNew.action.viewFull":"View full release on GitHub","dialog.whatsNew.action.dismiss":"Got it","error.page.title":"Something went wrong","error.page.description":"An error occurred while loading the application.","error.page.details.label":"Error Details","error.page.action.restart":"Restart","error.page.circular":"[Circular]","error.page.report.prefix":"Please report this error to the Codeplane team","error.page.report.issues":"on GitHub","error.page.version":"Version: {{version}}","error.dev.rootNotFound":"Root element not found. Did you forget to add it to your index.html? Or maybe the id attribute got misspelled?","error.globalSync.connectFailed":"Could not connect to server. Is there a server running at `{{url}}`?","error.globalSDK.noServerAvailable":"No server available","error.globalSDK.serverNotAvailable":"Server not available","error.childStore.persistedCacheCreateFailed":"Failed to create persisted cache","error.childStore.persistedProjectMetadataCreateFailed":"Failed to create persisted project metadata","error.childStore.persistedProjectIconCreateFailed":"Failed to create persisted project icon","error.childStore.storeCreateFailed":"Failed to create store","directory.error.invalidUrl":"Invalid directory in URL.","error.chain.unknown":"Unknown error","error.server.invalidConfiguration":"Invalid configuration","error.chain.causedBy":"Caused by:","error.chain.apiError":"API error","error.chain.status":"Status: {{status}}","error.chain.retryable":"Retryable: {{retryable}}","error.chain.responseBody":`Response body:
2374
2374
  {{body}}`,"error.chain.didYouMean":"Did you mean: {{suggestions}}","error.chain.modelNotFound":"Model not found: {{provider}}/{{model}}","error.chain.checkConfig":"Check your config (codeplane.json) provider/model names","error.chain.mcpFailed":'MCP server "{{name}}" failed. Note, Codeplane does not support MCP authentication yet.',"error.chain.providerAuthFailed":"Provider authentication failed ({{provider}}): {{message}}","error.chain.providerInitFailed":'Failed to initialize provider "{{provider}}". Check credentials and configuration.',"error.chain.configJsonInvalid":"Config file at {{path}} is not valid JSON(C)","error.chain.configJsonInvalidWithMessage":"Config file at {{path}} is not valid JSON(C): {{message}}","error.chain.configDirectoryTypo":'Directory "{{dir}}" in {{path}} is not valid. Rename the directory to "{{suggestion}}" or remove it. This is a common typo.',"error.chain.configFrontmatterError":`Failed to parse frontmatter in {{path}}:
2375
- {{message}}`,"error.chain.configInvalid":"Config file at {{path}} is invalid","error.chain.configInvalidWithMessage":"Config file at {{path}} is invalid: {{message}}","notification.permission.title":"Permission required","notification.permission.description":"{{sessionTitle}} in {{projectName}} needs permission","notification.question.title":"Question","notification.question.description":"{{sessionTitle}} in {{projectName}} has a question","notification.action.goToSession":"Go to session","notification.session.responseReady.title":"Response ready","notification.session.error.title":"Session error","notification.session.error.fallbackDescription":"An error occurred","notification.session.untitled":"Untitled session","notification.center.title":"Notifications","notification.center.count":"{{count}} notifications","notification.center.markAllRead":"Mark all read","notification.center.empty.title":"No notifications","notification.center.item.responseReady":"{{sessionTitle}} in {{projectName}} is ready","home.recentProjects":"Recent projects","home.empty.title":"No recent projects","home.empty.description":"Get started by opening a local project","home.title":"Workspace","home.subtitle.zero":"No projects open","home.subtitle.one":"1 project","home.subtitle.other":"{{count}} projects","home.subtitle.lastActivity":"Last active {{time}}","home.tab.overview":"Overview","home.tab.models":"Models","home.range.all":"All","home.range.30d":"30d","home.range.7d":"7d","home.stat.sessions":"Sessions","home.stat.messages":"Messages","home.stat.tokens":"Total tokens","home.stat.activeDays":"Active days","home.stat.streak.current":"Current streak","home.stat.streak.longest":"Longest streak","home.stat.streak.value":"{{count}}d","home.stat.peakHour":"Peak hour","home.stat.preferredModel":"Preferred model","home.stat.git.repos":"Repos worked","home.stat.git.commits":"Commits made","home.stat.git.files":"Files changed","home.stat.git.lines":"Lines changed","home.stat.git.additions":"Lines added","home.stat.git.deletions":"Lines deleted","home.fact.devin.match":"You're hitting ~{{percent}}% of Devin Oldenburg's reference rate (~200M tokens/day).","home.fact.devin.behind":"Devin Oldenburg burns through ~{{ratio}}× more tokens per day than you.","home.fact.tokens.novel":"That's ~{{count}} average paperback novels in tokens.","home.fact.tokens.dune":"You used ~{{count}}× more tokens than the Dune novel.","home.fact.tokens.lotr":"Enough tokens for ~{{count}}× The Lord of the Rings trilogy.","home.fact.tokens.warAndPeace":"You've out-written War and Peace ~{{count}}×.","home.fact.tokens.bible":"Your tokens equal ~{{count}} King James Bibles.","home.fact.tokens.shakespeare":"~{{count}}× Shakespeare's complete works in tokens.","home.fact.tokens.harryPotter":"~{{count}}× the entire Harry Potter series.","home.fact.tokens.perMessage":"~{{count}} tokens per message — you feed the context generously.","home.fact.messages.perActiveDay":"~{{count}} messages per active day on average.","home.fact.messages.thousand":"{{count}}k messages sent — a small civilization of prompts.","home.fact.messages.total":"{{count}} messages and counting.","home.fact.streak.week":"{{count}}-day streak — longer than most New Year resolutions.","home.fact.streak.month":"{{count}} days in a row — habit officially formed.","home.fact.streak.legendary":"{{count}}-day streak — that's GitHub-graph green.","home.fact.streak.bestEver":"Personal best streak: {{count}} days. Can you beat it?","home.fact.activeDays.percent":"Active on {{count}} days — {{percent}}% of the year.","home.fact.activeDays.workYear":"{{count}} active days — more than a full work year.","home.fact.sessions.perWeek":"~{{count}} sessions per week — steady rhythm.","home.fact.sessions.century":"{{count}} sessions completed — century club.","home.fact.sessions.thousand":"{{count}}k sessions — you're basically running a fleet.","home.fact.peakHour.midnight":"Peak at {{hour}}:00 — proper night owl.","home.fact.peakHour.earlybird":"Peak at {{hour}}:00 — coffee before code.","home.fact.peakHour.midday":"Peak at {{hour}}:00 — flow state, post-lunch fuel.","home.fact.peakHour.afternoon":"Peak at {{hour}}:00 — the productive slope of the day.","home.fact.peakHour.evening":"Peak at {{hour}}:00 — dinner can wait.","home.activity.dayLabel":"{{count}} on {{date}}","home.activity.empty":"No activity yet","home.models.empty":"No model usage yet","home.models.messages":"{{count}} msgs","home.models.sessions":"{{count}} sessions","home.models.tokens":"{{value}} tokens","home.projects.title":"Most active projects","home.projects.empty":"Open a project to see activity here","home.projects.sessionsCount.one":"1 session","home.projects.sessionsCount.other":"{{count}} sessions","home.projects.diff":"+{{additions}} -{{deletions}}","home.projects.never":"No activity yet","home.recent.title":"Recent sessions","home.recent.empty":"Start a session to see it here","home.start.title":"Start something new","home.start.description":"Pick a project from the sidebar or open a new one to begin.","session.tab.session":"Session","session.tab.review":"Review","session.tab.context":"Context","session.panel.reviewAndFiles":"Review and files","session.activity.timeline.title":"Timeline","session.activity.timeline.empty":"No activity yet","session.activity.model.initial":"Model selected","session.activity.model.switch":"Model switch","session.activity.tool.pending":"Pending","session.activity.tool.running":"Running","session.activity.tool.completed":"Completed","session.activity.tool.error":"Failed","session.activity.file.added":"Added","session.activity.file.deleted":"Deleted","session.activity.file.modified":"Modified","session.review.filesChanged":"{{count}} Files Changed","session.review.change.one":"Change","session.review.change.other":"Changes","session.review.loadingChanges":"Loading changes...","session.review.empty":"No changes in this session yet","session.review.noVcs":"No Git Version Control System detected, changes not displayed","session.review.noVcs.createGit.title":"Create a Git repository","session.review.noVcs.createGit.description":"Track, review, and undo changes in this project","session.review.noVcs.createGit.actionLoading":"Creating Git repository...","session.review.noVcs.createGit.action":"Create Git repository","session.review.noSnapshot":"Snapshot tracking is disabled in config, so session changes are unavailable","session.review.noChanges":"No changes","session.review.noUncommittedChanges":"No uncommitted changes yet","session.review.noBranchChanges":"No branch changes yet","session.files.selectToOpen":"Select a file to open","session.files.all":"All files","session.files.empty":"No files","session.files.binaryContent":"Binary file (content cannot be displayed)","session.messages.renderEarlier":"Render earlier messages","session.messages.loadingEarlier":"Loading earlier messages...","session.messages.loadEarlier":"Load earlier messages","session.messages.loading":"Loading messages...","session.messages.jumpToLatest":"Jump to latest","session.context.addToContext":"Add {{selection}} to context","session.todo.title":"Todos","session.todo.collapse":"Collapse","session.todo.expand":"Expand","session.todo.progress":"{{done}} of {{total}} todos completed","session.question.progress":"{{current}} of {{total}} questions","session.followupDock.summary.one":"{{count}} queued message","session.followupDock.summary.other":"{{count}} queued messages","session.followupDock.sendNow":"Send now","session.followupDock.edit":"Edit","session.followupDock.collapse":"Collapse queued messages","session.followupDock.expand":"Expand queued messages","session.revertDock.summary.one":"{{count}} rolled back message","session.revertDock.summary.other":"{{count}} rolled back messages","session.revertDock.collapse":"Collapse rolled back messages","session.revertDock.expand":"Expand rolled back messages","session.revertDock.restore":"Restore message","session.new.title":"Build anything","session.new.worktree.main":"Main branch","session.new.worktree.mainWithBranch":"Main branch ({{branch}})","session.new.worktree.create":"Create new worktree","session.new.lastModified":"Last modified","session.header.search.placeholder":"Search {{project}}","session.header.searchFiles":"Search files","session.header.openIn":"Open in","session.header.open.action":"Open {{app}}","session.header.open.ariaLabel":"Open in {{app}}","session.header.open.menu":"Open options","session.header.open.copyPath":"Copy path","session.header.open.finder":"Finder","session.header.open.fileExplorer":"File Explorer","session.header.open.fileManager":"File Manager","session.header.open.app.vscode":"VS Code","session.header.open.app.cursor":"Cursor","session.header.open.app.zed":"Zed","session.header.open.app.textmate":"TextMate","session.header.open.app.antigravity":"Antigravity","session.header.open.app.terminal":"Terminal","session.header.open.app.iterm2":"iTerm2","session.header.open.app.ghostty":"Ghostty","session.header.open.app.warp":"Warp","session.header.open.app.xcode":"Xcode","session.header.open.app.androidStudio":"Android Studio","session.header.open.app.powershell":"PowerShell","session.header.open.app.sublimeText":"Sublime Text","status.popover.trigger":"Status","status.popover.ariaLabel":"Server configurations","status.popover.tab.servers":"Servers","status.popover.tab.mcp":"MCP","status.popover.tab.lsp":"LSP","status.popover.tab.plugins":"Plugins","status.popover.action.manageServers":"Manage servers","session.share.popover.title":"Publish on web","session.share.popover.description.shared":"This session is public on the web. It is accessible to anyone with the link.","session.share.popover.description.unshared":"Share session publicly on the web. It will be accessible to anyone with the link.","session.share.action.share":"Share","session.share.action.publish":"Publish","session.share.action.publishing":"Publishing...","session.share.action.unpublish":"Unpublish","session.share.action.unpublishing":"Unpublishing...","session.share.action.view":"View","session.share.copy.copied":"Copied","session.share.copy.copyLink":"Copy link","lsp.tooltip.none":"No LSP servers","lsp.label.connected":"{{count}} LSP","prompt.loading":"Loading prompt...","terminal.loading":"Loading terminal...","terminal.title":"Terminal","terminal.title.numbered":"Terminal {{number}}","terminal.close":"Close terminal","terminal.connectionLost.title":"Connection Lost","terminal.connectionLost.abnormalClose":"WebSocket closed abnormally: {{code}}","terminal.connectionLost.description":"The terminal connection was interrupted. This can happen when the server restarts.","common.closeTab":"Close tab","common.dismiss":"Dismiss","common.moreCountSuffix":" (+{{count}} more)","common.requestFailed":"Request failed","common.moreOptions":"More options","common.learnMore":"Learn more","common.rename":"Rename","common.reset":"Reset","common.refresh":"Refresh","common.archive":"Archive","common.restore":"Restore","common.delete":"Delete","common.close":"Close","common.edit":"Edit","common.loadMore":"Load more","common.key.esc":"ESC","common.key.ctrl":"Ctrl","common.key.alt":"Alt","common.key.shift":"Shift","common.key.meta":"Meta","common.key.space":"Space","common.key.backspace":"Backspace","common.key.enter":"Enter","common.key.tab":"Tab","common.key.delete":"Delete","common.key.home":"Home","common.key.end":"End","common.key.pageUp":"Page Up","common.key.pageDown":"Page Down","common.key.insert":"Insert","common.unknown":"unknown","common.time.justNow":"Just now","common.time.minutesAgo.short":"{{count}}m ago","common.time.hoursAgo.short":"{{count}}h ago","common.time.daysAgo.short":"{{count}}d ago","archiveSessions.title":"Archived sessions","archiveSessions.search.label":"Search archived sessions","archiveSessions.search.placeholder":"Search archived sessions","archiveSessions.filter.scope.all":"All","archiveSessions.filter.age.all":"All","archiveSessions.filter.age.recent":"Recent","archiveSessions.filter.age.older":"Older","archiveSessions.empty":"No archived sessions found","archiveSessions.error":"Some archived sessions could not be loaded","archiveSessions.archivedAt":"Archived {{time}}","archiveSessions.deletesIn":"Deletes in {{count}}d","archiveSessions.retention":"Archived sessions are view-only. They are deleted after 30 days and cannot be restored.","archiveSessions.restore.success.title":"Session restored","archiveSessions.restore.success.description":"The session is back in the sidebar.","archiveSessions.restore.failed.title":"Failed to restore session","session.archived.readOnly":"This session is archived and view-only. Archived sessions are deleted after 30 days.","sidebar.menu.toggle":"Toggle menu","sidebar.nav.projectsAndSessions":"Projects and sessions","sidebar.home":"Home","sidebar.notifications":"Notifications","session.liveActivity.menu.on":"Stop showing on Lock Screen","session.liveActivity.menu.off":"Show on Lock Screen","session.liveActivity.menu.limit":"Lock Screen full ({{max}} sessions)","sidebar.modes":"Modes","sidebar.models":"Models","sidebar.mcp":"MCP","sidebar.plugins":"Plugins","sidebar.skills":"Skills","sidebar.settings":"Settings","sidebar.help":"Help","sidebar.restart":"Restart","sidebar.restart.confirm":"Restart the Codeplane app? Active sessions will reconnect, mode, plugin, and MCP changes will be reloaded.","sidebar.workspaces.enable":"Enable workspaces","sidebar.workspaces.disable":"Disable workspaces","sidebar.gettingStarted.title":"Getting started","sidebar.gettingStarted.line1":"Codeplane includes free models so you can start immediately.","sidebar.gettingStarted.line2":"Connect any provider to use models, inc. Claude, GPT, Gemini etc.","sidebar.project.recentSessions":"Recent sessions","sidebar.project.viewAllSessions":"View all sessions","sidebar.project.clearNotifications":"Clear notifications","sidebar.sessionPreview.loading":"Loading preview...","sidebar.sessionPreview.empty":"No prompt yet","sidebar.sessionPreview.thinking":"Thinking...","sidebar.sessionPreview.duration":"Duration","sidebar.empty.title":"No projects open","sidebar.empty.description":"Open a project to get started","debugBar.ariaLabel":"Development performance diagnostics","debugBar.na":"n/a","debugBar.nav.label":"NAV","debugBar.nav.tip":"Last completed route transition touching a session page, measured from router start until the first paint after it settles.","debugBar.fps.label":"FPS","debugBar.fps.tip":"Rolling frames per second over the last 5 seconds.","debugBar.frame.label":"FRAME","debugBar.frame.tip":"Worst frame time over the last 5 seconds.","debugBar.jank.label":"JANK","debugBar.jank.tip":"Frames over 32ms in the last 5 seconds.","debugBar.long.label":"LONG","debugBar.long.tip":"Blocked time and long-task count in the last 5 seconds. Max task: {{max}}.","debugBar.delay.label":"DELAY","debugBar.delay.tip":"Worst observed input delay in the last 5 seconds.","debugBar.inp.label":"INP","debugBar.inp.tip":"Approximate interaction duration over the last 5 seconds. This is INP-like, not the official Web Vitals INP.","debugBar.cls.label":"CLS","debugBar.cls.tip":"Cumulative layout shift for the current app lifetime.","debugBar.mem.label":"MEM","debugBar.mem.tipUnavailable":"Used JS heap vs heap limit. Chromium only.","debugBar.mem.tip":"Used JS heap vs heap limit. {{used}} of {{limit}}.","app.name.web":"Codeplane","settings.section.app":"App","settings.section.server":"Server","settings.section.ai":"AI","settings.section.extensions":"Extensions","settings.tab.general":"General","settings.tab.general.description":"Manage app preferences","settings.tab.shortcuts":"Shortcuts","settings.tab.shortcuts.description":"Configure shortcuts","settings.tab.providers.description":"Connect AI providers","settings.tab.models.description":"Choose visible models","settings.tab.modes.description":"Configure agent modes","settings.tab.plugins.description":"Manage plugins","settings.tab.mcp.description":"Connect MCP servers","settings.tab.skills.description":"Manage skill sources","settings.general.section.appearance":"Appearance","settings.general.section.advanced":"Advanced","settings.general.section.notifications":"System notifications","settings.general.section.sounds":"Sound effects","settings.general.section.feed":"Feed","settings.general.row.language.title":"Language","settings.general.row.language.description":"Change the display language for Codeplane","settings.general.row.appearance.title":"Appearance","settings.general.row.appearance.description":"Customise how Codeplane looks on your device","settings.general.row.colorScheme.title":"Color scheme","settings.general.row.colorScheme.description":"Choose whether Codeplane follows the system, light, or dark theme","settings.general.row.theme.title":"Theme","settings.general.row.theme.description":"Customise how Codeplane is themed.","settings.general.row.font.title":"Code Font","settings.general.row.font.description":"Customise the font used in code blocks","settings.general.row.terminalFont.title":"Terminal Font","settings.general.row.terminalFont.description":"Customise the font used in the terminal","settings.general.row.uiFont.title":"UI Font","settings.general.row.uiFont.description":"Customise the font used throughout the interface","settings.general.row.followup.title":"Follow-up behavior","settings.general.row.followup.description":"Choose whether follow-up prompts steer immediately or wait in a queue","settings.general.row.followup.option.queue":"Queue","settings.general.row.followup.option.steer":"Steer","settings.general.row.codeplaneCoauthor.title":"Codeplane co-author","settings.general.row.codeplaneCoauthor.description":"Add Co-Authored-By: codeplane-agent[bot] <287208015+codeplane-agent[bot]@users.noreply.github.com> to commits made through Codeplane","settings.general.row.showFileTree.title":"File tree","settings.general.row.showFileTree.description":"Show the file tree toggle and panel in sessions","settings.general.row.showNavigation.title":"Navigation controls","settings.general.row.showNavigation.description":"Show the back and forward buttons in the app header","settings.general.row.showSearch.title":"Command palette","settings.general.row.showSearch.description":"Show the search and command palette button in the app header","settings.general.row.showTerminal.title":"Terminal","settings.general.row.showTerminal.description":"Show the terminal button in the app header","settings.general.row.showStatus.title":"Server status","settings.general.row.showStatus.description":"Show the server status button in the app header","settings.general.row.reasoningSummaries.title":"Show reasoning summaries","settings.general.row.reasoningSummaries.description":"Display model reasoning summaries in the timeline","settings.general.row.shellToolPartsExpanded.title":"Expand shell tool parts","settings.general.row.shellToolPartsExpanded.description":"Show shell tool parts expanded by default in the timeline","settings.general.row.editToolPartsExpanded.title":"Expand edit tool parts","settings.general.row.editToolPartsExpanded.description":"Show edit, write, and patch tool parts expanded by default in the timeline","settings.general.row.showSessionProgressBar.title":"Show session progress bar","settings.general.row.showSessionProgressBar.description":"Display the animated progress bar at the top of the session when the agent is working","settings.general.row.browserUse.title":"Browser use","settings.general.row.browserUse.description":"Allow the agent to control an isolated Chrome browser with its own virtual mouse and keyboard for UI testing and debugging. Includes navigation, refs, click, hover, drag, type, shortcuts, screenshots, console logs, and JavaScript evaluation. Disabled by default and only available in Codeplane Desktop.","settings.general.row.computerUse.title":"Computer use","settings.general.row.computerUse.description":"Allow the agent to control this desktop through the real OS pointer: screenshots, mouse movement, clicks, drags, scrolling, keyboard input, shortcuts, and app launching. Disabled by default and only available in Codeplane Desktop.","settings.general.row.debugLogging.title":"Debug logging","settings.general.row.debugLogging.description":"Write verbose runtime logs for desktop-managed local instances. Restart a running local instance to apply the new level.","settings.general.row.instanceLogs.title":"Instance logs","settings.general.row.instanceLogs.description":"Open this local instance's log directory.","settings.general.row.instanceLogs.action.open":"Open logs","settings.general.row.instanceLogs.action.opening":"Opening…","settings.general.row.instanceLogs.unavailable":"This instance does not have local logs on this desktop.","settings.general.row.computerUse.permissionsTitle":"Permissions needed for {{ tool }}","settings.general.row.computerUse.permissionsBody":"{{ tool }} requires {{count}} system permissions to control the desktop. Codeplane needs these to move the cursor, click, type, take screenshots, and open apps on your behalf.","settings.general.row.computerUse.permissionGranted":"Ready","settings.general.row.computerUse.permissionMissing":"Not active — open System Settings or relaunch","settings.general.row.computerUse.permissionRelaunchRequired":"Turned on — relaunch required","settings.general.row.computerUse.permissionOpenSettings":"Open Settings","settings.general.row.computerUse.permissionOpening":"Opening…","settings.general.row.computerUse.permissionsFooter":"If the toggle is already on in System Settings but still shows here as inactive, relaunch Codeplane Desktop so macOS reloads the permission.","settings.general.row.computerUse.permissionsRelaunchFooter":"The permission is turned on in System Settings, but this running Codeplane process cannot use it yet. Relaunch Codeplane Desktop to apply it.","settings.general.row.computerUse.permissionDone":"Done","settings.general.row.computerUse.manage":"Manage","settings.general.row.computerUse.statusAllGranted":"All active","settings.general.row.computerUse.statusActivePartial":"{{active}} of {{total}} active","settings.general.row.computerUse.statusPartial":"{{granted}} of {{total}} granted","settings.general.row.computerUse.statusRelaunchRequired":"Relaunch required","settings.general.row.computerUse.recheck":"Recheck","settings.general.row.computerUse.recheckLoading":"Checking...","settings.general.row.computerUse.relaunch":"Relaunch desktop","settings.general.row.computerUse.relaunchPending":"Relaunching...","settings.general.row.computerUse.enableAnyway":"Enable anyway","settings.general.row.computerUse.enableNow":"Enable now","settings.general.row.computerUse.relaunchUnavailable.title":"Relaunch manually","settings.general.row.computerUse.relaunchUnavailable.description":"Quit and reopen Codeplane Desktop for the new macOS permissions to take effect.","settings.general.row.computerUse.permissionDescription.accessibility":"Required for mouse movement, clicks, typing, keyboard shortcuts, scrolling, and app launch control.","settings.general.row.computerUse.permissionDescription.screenRecording":"Required for screenshots so the agent can see the desktop before and after each action.","settings.general.row.computerUse.permissionDescription.generic":"Required by macOS before Codeplane can control this desktop.","settings.general.row.releaseNotes.title":"Release notes","settings.general.row.releaseNotes.description":"Show What's New popups after updates","settings.general.section.updates":"Updates","settings.general.row.version.title":"Application version","settings.general.row.version.developmentBuild":"Development build","settings.general.row.version.descriptionLoading":"Checking for updates…","settings.general.row.version.descriptionError":"Could not check for updates. Try again.","settings.general.row.version.descriptionUpToDate":"You are on version {{current}} — up to date.","settings.general.row.version.descriptionHasUpdate":"Version {{latest}} is available. You are on {{current}}.","settings.general.row.version.descriptionUnknownMethod":"You are on version {{current}}. Automatic updates are unavailable for this install — update manually.","settings.general.row.version.descriptionDesktopManaged":"You are on version {{current}}. Updates are managed by the Codeplane desktop app — open the desktop's Updates panel to check for a new version.","settings.general.row.version.descriptionManagedLocal":"You are on version {{current}}. This local runtime is managed by the launcher; restart Codeplane to pick up a newer runtime.","settings.general.row.version.action.check":"Check for updates","settings.general.row.version.action.checking":"Checking…","settings.general.row.version.action.update":"Update now","settings.general.row.version.action.updating":"Updating…","settings.general.row.version.action.whatsNew":"What's new","sound.option.none":"None","sound.option.alert01":"Alert 01","sound.option.alert02":"Alert 02","sound.option.alert03":"Alert 03","sound.option.alert04":"Alert 04","sound.option.alert05":"Alert 05","sound.option.alert06":"Alert 06","sound.option.alert07":"Alert 07","sound.option.alert08":"Alert 08","sound.option.alert09":"Alert 09","sound.option.alert10":"Alert 10","sound.option.bipbop01":"Bip-bop 01","sound.option.bipbop02":"Bip-bop 02","sound.option.bipbop03":"Bip-bop 03","sound.option.bipbop04":"Bip-bop 04","sound.option.bipbop05":"Bip-bop 05","sound.option.bipbop06":"Bip-bop 06","sound.option.bipbop07":"Bip-bop 07","sound.option.bipbop08":"Bip-bop 08","sound.option.bipbop09":"Bip-bop 09","sound.option.bipbop10":"Bip-bop 10","sound.option.staplebops01":"Staplebops 01","sound.option.staplebops02":"Staplebops 02","sound.option.staplebops03":"Staplebops 03","sound.option.staplebops04":"Staplebops 04","sound.option.staplebops05":"Staplebops 05","sound.option.staplebops06":"Staplebops 06","sound.option.staplebops07":"Staplebops 07","sound.option.nope01":"Nope 01","sound.option.nope02":"Nope 02","sound.option.nope03":"Nope 03","sound.option.nope04":"Nope 04","sound.option.nope05":"Nope 05","sound.option.nope06":"Nope 06","sound.option.nope07":"Nope 07","sound.option.nope08":"Nope 08","sound.option.nope09":"Nope 09","sound.option.nope10":"Nope 10","sound.option.nope11":"Nope 11","sound.option.nope12":"Nope 12","sound.option.yup01":"Yup 01","sound.option.yup02":"Yup 02","sound.option.yup03":"Yup 03","sound.option.yup04":"Yup 04","sound.option.yup05":"Yup 05","sound.option.yup06":"Yup 06","settings.general.notifications.agent.title":"Agent","settings.general.notifications.agent.description":"Show system notification when the agent is complete or needs attention","settings.general.notifications.permissions.title":"Permissions","settings.general.notifications.permissions.description":"Show system notification when a permission is required","settings.general.notifications.errors.title":"Errors","settings.general.notifications.errors.description":"Show system notification when an error occurs","settings.general.sounds.agent.title":"Agent","settings.general.sounds.agent.description":"Play sound when the agent is complete or needs attention","settings.general.sounds.permissions.title":"Permissions","settings.general.sounds.permissions.description":"Play sound when a permission is required","settings.general.sounds.errors.title":"Errors","settings.general.sounds.errors.description":"Play sound when an error occurs","settings.shortcuts.title":"Keyboard shortcuts","settings.shortcuts.reset.button":"Reset to defaults","settings.shortcuts.reset.toast.title":"Shortcuts reset","settings.shortcuts.reset.toast.description":"Keyboard shortcuts have been reset to defaults.","settings.shortcuts.conflict.title":"Shortcut already in use","settings.shortcuts.conflict.description":"{{keybind}} is already assigned to {{titles}}.","settings.shortcuts.unassigned":"Unassigned","settings.shortcuts.pressKeys":"Press keys","settings.shortcuts.search.placeholder":"Search shortcuts","settings.shortcuts.search.empty":"No shortcuts found","settings.shortcuts.group.general":"General","settings.shortcuts.group.session":"Session","settings.shortcuts.group.navigation":"Navigation","settings.shortcuts.group.modelAndAgent":"Model and agent","settings.shortcuts.group.terminal":"Terminal","settings.shortcuts.group.prompt":"Prompt","settings.providers.title":"Providers","settings.providers.description":"Provider settings will be configurable here.","settings.providers.section.connected":"Connected providers","settings.providers.connected.empty":"No connected providers","settings.providers.connected.environmentDescription":"Connected from your environment variables","settings.providers.section.popular":"Popular providers","settings.providers.custom.description":"Add an OpenAI-compatible provider by base URL.","settings.providers.tag.environment":"Environment","settings.providers.tag.config":"Config","settings.providers.tag.custom":"Custom","settings.providers.tag.other":"Other","settings.providers.models.edit":"Edit models","settings.providers.models.title":"{{provider}} models","settings.providers.models.count":"{{selected}} of {{total}} configured","settings.providers.models.selectAll":"Select all","settings.providers.models.clear":"Clear","settings.providers.models.add.id":"Model ID","settings.providers.models.add.name":"Display name","settings.providers.models.add.submit":"Add","settings.providers.models.add.error.id":"Model ID is required.","settings.providers.models.empty":"No models found","settings.providers.models.error.required":"Select at least one model.","settings.providers.models.toast.updated":"{{provider}} models updated","settings.models.title":"Models","settings.models.description":"Model settings will be configurable here.","settings.agents.title":"Agents","settings.agents.description":"Agent settings will be configurable here.","settings.commands.title":"Commands","settings.commands.description":"Command settings will be configurable here.","settings.mcp.title":"MCP","settings.mcp.description":"MCP settings will be configurable here.","settings.permissions.title":"Permissions","settings.permissions.description":"Control what tools the server can use by default.","settings.permissions.section.tools":"Tools","settings.permissions.toast.updateFailed.title":"Failed to update permissions","settings.permissions.action.allow":"Allow","settings.permissions.action.ask":"Ask","settings.permissions.action.deny":"Deny","settings.permissions.tool.read.title":"Read","settings.permissions.tool.read.description":"Reading a file (matches the file path)","settings.permissions.tool.edit.title":"Edit","settings.permissions.tool.edit.description":"Modify files, including edits, writes, patches, and multi-edits","settings.permissions.tool.glob.title":"Glob","settings.permissions.tool.glob.description":"Match files using glob patterns","settings.permissions.tool.grep.title":"Grep","settings.permissions.tool.grep.description":"Search file contents using regular expressions","settings.permissions.tool.list.title":"List","settings.permissions.tool.list.description":"List files within a directory","settings.permissions.tool.bash.title":"Bash","settings.permissions.tool.bash.description":"Run shell commands","settings.permissions.tool.task.title":"Task","settings.permissions.tool.task.description":"Launch sub-agents","settings.permissions.tool.skill.title":"Skill","settings.permissions.tool.skill.description":"Load a skill by name","settings.permissions.tool.lsp.title":"LSP","settings.permissions.tool.lsp.description":"Run language server queries","settings.permissions.tool.todowrite.title":"Todo Write","settings.permissions.tool.todowrite.description":"Update the todo list","settings.permissions.tool.webfetch.title":"Web Fetch","settings.permissions.tool.webfetch.description":"Fetch content from a URL","settings.permissions.tool.websearch.title":"Web Search","settings.permissions.tool.websearch.description":"Search the web","settings.permissions.tool.codesearch.title":"Code Search","settings.permissions.tool.codesearch.description":"Search code on the web","settings.permissions.tool.external_directory.title":"External Directory","settings.permissions.tool.external_directory.description":"Access files outside the project directory","settings.permissions.tool.doom_loop.title":"Doom Loop","settings.permissions.tool.doom_loop.description":"Detect repeated tool calls with identical input","session.copyId":"Copy session ID","session.delete.failed.title":"Failed to delete session","session.delete.title":"Delete session","session.delete.confirm":'Delete session "{{name}}"?',"session.delete.button":"Delete session","workspace.new":"New workspace","workspace.type.local":"local","workspace.type.sandbox":"sandbox","workspace.create.failed.title":"Failed to create workspace","workspace.delete.failed.title":"Failed to delete workspace","workspace.resetting.title":"Resetting workspace","workspace.resetting.description":"This may take a minute.","workspace.reset.failed.title":"Failed to reset workspace","workspace.reset.success.title":"Workspace reset","workspace.reset.success.description":"Workspace now matches the default branch.","workspace.error.stillPreparing":"Workspace is still preparing","workspace.status.checking":"Checking for unmerged changes...","workspace.status.error":"Unable to verify git status.","workspace.status.clean":"No unmerged changes detected.","workspace.status.dirty":"Unmerged changes detected in this workspace.","workspace.delete.title":"Delete workspace","workspace.delete.confirm":'Delete workspace "{{name}}"?',"workspace.delete.button":"Delete workspace","workspace.reset.title":"Reset workspace","workspace.reset.confirm":'Reset workspace "{{name}}"?',"workspace.reset.button":"Reset workspace","workspace.reset.archived.none":"No active sessions will be archived.","workspace.reset.archived.one":"1 session will be archived.","workspace.reset.archived.many":"{{count}} sessions will be archived.","workspace.reset.note":"This will reset the workspace to match the default branch.","common.enabled":"Enabled","common.remove":"Remove","modes.page.title":"Modes","modes.page.subtitle":"{{enabled}} of {{total}} enabled","modes.page.add":"Add mode","modes.page.empty":"No modes configured","modes.kind.primary":"Primary","modes.kind.all":"Primary + subagent","modes.source.legacy":"Legacy mode","modes.tag.hidden":"Hidden","modes.tag.disabled":"Disabled","modes.toast.added":"Mode added","modes.toast.updated":"Mode updated","modes.editor.title.add":"Add mode","modes.editor.title.edit":"Edit mode","modes.editor.name":"Name","modes.editor.description":"Description","modes.editor.description.placeholder":"When this mode should be used","modes.editor.model":"Model","modes.editor.model.description":"Optional provider/model override for this mode.","modes.editor.prompt":"Prompt","modes.editor.prompt.description":"Additional system prompt for this mode.","modes.editor.prompt.placeholder":"You are focused on reviewing code for correctness...","modes.editor.temperature":"Temperature","modes.editor.topP":"Top P","modes.editor.steps":"Steps","modes.editor.hidden":"Hidden","modes.editor.hidden.description":"Hide this mode from the prompt selector.","modes.editor.disable":"Disabled","modes.editor.disable.description":"Keep the config but remove this mode from runtime selection.","modes.editor.error.name":"Name is required.","modes.editor.error.duplicate":"A mode or agent with this name already exists.","models.page.title":"Models","models.page.subtitle":"{{shown}} of {{total}} shown in the session model selector","models.page.add":"Add model","models.page.empty":"No models found","models.page.search":"Search models","models.kind.custom":"Custom","models.kind.override":"Override","models.kind.builtin":"Built-in","models.row.provider":"{{provider}} provider","models.row.shown":"Show in session model selector","models.toast.added":"Model added","models.toast.updated":"Model updated","models.editor.title.add":"Add model","models.editor.title.edit":"Edit model","models.editor.provider":"Provider ID","models.editor.model":"Model ID","models.editor.apiModel":"API model ID","models.editor.apiModel.description":"Optional. Use this to create an alias for a provider model.","models.editor.name":"Name","models.editor.family":"Family","models.editor.releaseDate":"Release date","models.editor.context":"Context","models.editor.input":"Input","models.editor.output":"Output","models.editor.capabilities":"Capabilities","models.editor.temperature":"Temperature","models.editor.reasoning":"Reasoning","models.editor.attachment":"Attachments","models.editor.toolCall":"Tool calls","models.editor.error.provider":"Provider ID is required.","models.editor.error.model":"Model ID is required.","models.editor.error.duplicate":"A model with this ID already exists for this provider.","models.editor.error.name":"Name is required.","mcp.page.title":"MCP","mcp.page.subtitle":"{{enabled}} of {{total}} enabled","mcp.page.add":"Add server","mcp.page.empty":"No MCP servers configured","mcp.page.confirm.remove":'Remove MCP server "{{name}}"?',"mcp.page.stat.total":"Servers","mcp.page.stat.local":"Local","mcp.page.stat.remote":"Remote","mcp.toast.added":"MCP server added","mcp.toast.updated":"MCP server updated","mcp.toast.removed":"MCP server removed","mcp.editor.title.add":"Add MCP server","mcp.editor.title.edit":"Edit MCP server","mcp.editor.name":"Name","mcp.editor.type":"Type","mcp.editor.type.local":"Local","mcp.editor.type.remote":"Remote","mcp.editor.command":"Command","mcp.editor.command.description":"Command and arguments to launch the MCP server.","mcp.editor.url":"URL","mcp.editor.environment":"Environment variables","mcp.editor.environment.description":"Sent to the local process as env vars. Values are masked — press the eye to reveal.","mcp.editor.headers":"Headers","mcp.editor.headers.description":"Sent with every request. Values are masked — press the eye to reveal.","mcp.editor.timeout":"Timeout (ms)","mcp.editor.timeout.description":"How long to wait for MCP server requests before failing.","mcp.editor.enabled":"Enabled","mcp.editor.enabled.description":"Connect this server on startup.","mcp.editor.row.add":"Add row","mcp.editor.row.key":"Key","mcp.editor.row.value":"Value","mcp.editor.row.reveal":"Reveal value","mcp.editor.row.hide":"Hide value","mcp.editor.error.name":"Name is required.","mcp.editor.error.duplicate":"An MCP server with this name already exists.","mcp.editor.error.command":"Command is required.","mcp.editor.error.url":"URL is required.","mcp.editor.error.urlInvalid":"URL must start with http:// or https://.","plugins.page.title":"Plugins","plugins.page.subtitle":"{{count}} configured","plugins.page.add":"Add plugin","plugins.page.empty":"No plugins configured","plugins.page.confirm.remove":'Remove plugin "{{name}}"?',"plugins.page.stat.total":"Plugins","plugins.page.stat.package":"Package","plugins.page.stat.local":"Local","plugins.page.stat.remote":"Remote","plugins.kind.local":"Local","plugins.kind.remote":"Remote","plugins.kind.package":"Package","plugins.row.optionCount":"{{count}} options","plugins.toast.added":"Plugin added","plugins.toast.updated":"Plugin updated","plugins.toast.removed":"Plugin removed","plugins.editor.title.add":"Add plugin","plugins.editor.title.edit":"Edit plugin","plugins.editor.specifier":"Specifier","plugins.editor.specifier.description":"Package name (my-plugin), path (./plugins/foo.ts), or URL (https://example.com/plugin.js).","plugins.editor.options":"Options","plugins.editor.options.description":"Optional key-value config passed to the plugin. Secret-looking keys are masked — press the eye to reveal.","plugins.editor.option.add":"Add option","plugins.editor.option.key":"Key","plugins.editor.option.value":"Value","plugins.editor.option.reveal":"Reveal value","plugins.editor.option.hide":"Hide value","plugins.editor.error.specifier":"Specifier is required.","skills.page.title":"Skills","skills.page.subtitle":"{{enabled}} of {{total}} enabled, {{sources}} sources","skills.page.addSource":"Add source","skills.page.empty":"No skills found","skills.section.sources":"Sources","skills.section.available":"Available skills","skills.sources.empty":"No additional skill sources configured","skills.sources.confirm.remove":'Remove skill source "{{source}}"?',"skills.source.path":"Path","skills.source.url":"URL","skills.kind.claude":"Claude","skills.kind.agents":"Agents","skills.kind.codeplane":"Codeplane","skills.kind.local":"Local","skills.tag.disabled":"Disabled","skills.row.openFile":"Edit skill file","skills.toast.sourceAdded":"Skill source added","skills.toast.sourceUpdated":"Skill source updated","skills.toast.sourceRemoved":"Skill source removed","skills.editor.title.add":"Add skill source","skills.editor.title.edit":"Edit skill source","skills.editor.type":"Type","skills.editor.path":"Path","skills.editor.path.description":"Directory to scan for SKILL.md files.","skills.editor.url":"URL","skills.editor.url.description":"Skill index URL ending in /.well-known/skills/.","skills.editor.browse":"Browse","skills.editor.browse.title":"Choose skill directory","skills.editor.error.value":"Source is required.","skills.editor.error.url":"URL must start with http:// or https://.","skills.editor.error.duplicate":"That source is already configured.","settings.tab.secrets.description":"Manage per-instance secrets","secrets.page.title":"Secrets","secrets.page.note":"Use {secret:name} in config. Values are stored in data/secrets/.","secrets.page.add":"Add secret","secrets.page.empty":"No secrets stored for this instance","secrets.page.confirm.remove":'Delete secret "{{name}}"?',"secrets.editor.title.add":"Add secret","secrets.editor.title.edit":"Replace secret","secrets.editor.name":"Secret name","secrets.editor.name.error":"Enter a secret name.","secrets.editor.value":"Secret value","secrets.editor.value.error":"Enter a secret value.","secrets.toast.saved":"Secret saved","secrets.toast.removed":"Secret removed"};function Fse(e){return`oc_locale=${encodeURIComponent(e)}; Path=/; Max-Age=31536000; SameSite=Lax`}const Use=f$,Hse=Cse,Bse={en:"language.en",zh:"language.zh",zht:"language.zht",ko:"language.ko",de:"language.de",es:"language.es",fr:"language.fr",da:"language.da",ja:"language.ja",pl:"language.pl",ru:"language.ru",ar:"language.ar",no:"language.no",br:"language.br",th:"language.th",bs:"language.bs",tr:"language.tr"},tf=d$({...k$,...p_}),zb=new Map([["en",tf]]),wr=(e,t)=>Promise.all([e,t]).then(([n,r])=>({...tf,...d$({...n.dict,...r.dict})})),Vse={zh:()=>wr(z(()=>import("./zh--EusBuW5.js"),[]),z(()=>import("./zh-BdQ5rFUE.js"),[])),zht:()=>wr(z(()=>import("./zht-C2Bj8Y3u.js"),[]),z(()=>import("./zht-uBUhPDWj.js"),[])),ko:()=>wr(z(()=>import("./ko-1AesI1gp.js"),[]),z(()=>import("./ko-wnATYZhS.js"),[])),de:()=>wr(z(()=>import("./de-27e6V80Y.js"),[]),z(()=>import("./de-BDLaTYvp.js"),[])),es:()=>wr(z(()=>import("./es-KW_Zclw5.js"),[]),z(()=>import("./es--JMv8T7K.js"),[])),fr:()=>wr(z(()=>import("./fr-BKYYu4_6.js"),[]),z(()=>import("./fr-EPg9myXQ.js"),[])),da:()=>wr(z(()=>import("./da-CLGt8t51.js"),[]),z(()=>import("./da-DYi2YCQi.js"),[])),ja:()=>wr(z(()=>import("./ja-CJTo4KkK.js"),[]),z(()=>import("./ja-BflM-d8c.js"),[])),pl:()=>wr(z(()=>import("./pl-DP31XAiJ.js"),[]),z(()=>import("./pl-4fUPofNs.js"),[])),ru:()=>wr(z(()=>import("./ru-DjsUX_Mx.js"),[]),z(()=>import("./ru-DaitQUn1.js"),[])),ar:()=>wr(z(()=>import("./ar-BmGaE6dF.js"),[]),z(()=>import("./ar-DWiV1g-n.js"),[])),no:()=>wr(z(()=>import("./no-bayaWMMG.js"),[]),z(()=>import("./no-zt964wOK.js"),[])),br:()=>wr(z(()=>import("./br-CJxfXkhA.js"),[]),z(()=>import("./br-C0Yr4nSr.js"),[])),th:()=>wr(z(()=>import("./th-DjONqhgk.js"),[]),z(()=>import("./th-BS1uSHlN.js"),[])),bs:()=>wr(z(()=>import("./bs-CaCKWAeY.js"),[]),z(()=>import("./bs-CEFL9l5a.js"),[])),tr:()=>wr(z(()=>import("./tr-DHKVC_SD.js"),[]),z(()=>import("./tr-D7JUDkNG.js"),[]))};function x$(e){const t=zb.get(e);if(t)return Promise.resolve(t);if(e==="en")return Promise.resolve(tf);const n=Vse[e];return n().then(r=>(zb.set(e,r),r))}function S$(){return $se(typeof navigator=="object"?navigator:void 0)}function jb(e){return Tse(e)}function _$(){try{if(typeof window!="object")return;const e=window.codeplaneDesktop?.storage,t=e?e.getItem("codeplane.global.dat","language"):window.localStorage.getItem("codeplane.global.dat:language");if(!t)return;const n=JSON.parse(t);return typeof n?.locale!="string"?void 0:jb(n.locale)}catch{return}}const sx=_$()??S$();sx!=="en"&&x$(sx);const{use:At,provider:qse}=hn({name:"Language",init:e=>{const t=e.locale??_$()??S$(),[n,r,i,o]=ir(In.global("language",["language.v1"]),Je({locale:t})),s=F(()=>jb(n.locale)),a=F(()=>Hse[s()]),[l]=Xo(s,x$,{initialValue:zb.get(t)??tf}),c=_se(()=>l()??tf,xse),u=d=>c(Bse[d]);return re(()=>{typeof document=="object"&&(document.documentElement.lang=s(),document.cookie=Fse(s()))}),{ready:o,locale:s,intl:a,locales:Use,label:u,t:c,setLocale(d){r("locale",jb(d))}}}}),h3e="System Mono",m3e="System Sans",p3e="JetBrainsMono Nerd Font Mono",c4='"Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji"',Wse='ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace, '+c4,Gse='ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif, '+c4,Kse='"JetBrainsMono Nerd Font Mono", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace, '+c4,Zse=Wse,Yse=Gse,Xse=Kse;function u4(e){return e??""}function Jse(e){return/^[\w-]+$/.test(e)?e:`"${e.replaceAll("\\","\\\\").replaceAll('"','\\"')}"`}function d4(e,t){const n=e?.trim()??"";return n?`${Jse(n)}, ${t}`:t}function g3e(e){return u4(e)}function v3e(e){return u4(e)}function Qse(e){return d4(e,Zse)}function eae(e){return d4(e,Yse)}function y3e(e){return u4(e)}function b3e(e){return d4(e,Xse)}const Pt={general:{autoSave:!0,releaseNotes:!0,followup:"queue",showFileTree:!1,showNavigation:!1,showSearch:!1,showStatus:!1,showTerminal:!1,showReasoningSummaries:!1,reasoningDisplay:"short",shellToolPartsExpanded:!1,editToolPartsExpanded:!1,showSessionProgressBar:!0,browserUse:!1,computerUse:!1,debugLogging:!1},appearance:{fontSize:14,mono:"",sans:"",terminal:""},keybinds:{},permissions:{autoApprove:!1},notifications:{agent:!0,permissions:!0,errors:!1},sounds:{agentEnabled:!0,agent:"staplebops-01",permissionsEnabled:!0,permissions:"staplebops-02",errorsEnabled:!0,errors:"nope-03"}};function Vt(e,t){return F(()=>e()??t)}function ax(e,t){return e==="short"||e==="full"||e==="off"?e:t===!0?"full":t===!1?"off":Pt.general.reasoningDisplay}const{use:hu,provider:tae}=hn({name:"Settings",init:()=>{const[e,t,n,r]=ir("settings.v3",Je(Pt));return re(()=>{if(typeof document>"u")return;const i=document.documentElement;i.style.setProperty("--font-family-mono",Qse(e.appearance?.mono)),i.style.setProperty("--font-family-sans",eae(e.appearance?.sans))}),{ready:r,get current(){return e},general:{autoSave:Vt(()=>e.general?.autoSave,Pt.general.autoSave),setAutoSave(i){t("general","autoSave",i)},releaseNotes:Vt(()=>e.general?.releaseNotes,Pt.general.releaseNotes),setReleaseNotes(i){t("general","releaseNotes",i)},followup:Vt(()=>e.general?.followup==="queue"||e.general?.followup==="steer"?e.general.followup:void 0,Pt.general.followup),setFollowup(i){t("general","followup",i)},showFileTree:Vt(()=>e.general?.showFileTree,Pt.general.showFileTree),setShowFileTree(i){t("general","showFileTree",i)},showNavigation:Vt(()=>e.general?.showNavigation,Pt.general.showNavigation),setShowNavigation(i){t("general","showNavigation",i)},showSearch:Vt(()=>e.general?.showSearch,Pt.general.showSearch),setShowSearch(i){t("general","showSearch",i)},showStatus:Vt(()=>e.general?.showStatus,Pt.general.showStatus),setShowStatus(i){t("general","showStatus",i)},showTerminal:Vt(()=>e.general?.showTerminal,Pt.general.showTerminal),setShowTerminal(i){t("general","showTerminal",i)},showReasoningSummaries:Vt(()=>ax(e.general?.reasoningDisplay,e.general?.showReasoningSummaries)!=="off",Pt.general.showReasoningSummaries),setShowReasoningSummaries(i){t("general","showReasoningSummaries",i),t("general","reasoningDisplay",i?"full":"off")},reasoningDisplay:Vt(()=>ax(e.general?.reasoningDisplay,e.general?.showReasoningSummaries),Pt.general.reasoningDisplay),setReasoningDisplay(i){t("general","reasoningDisplay",i),t("general","showReasoningSummaries",i!=="off")},shellToolPartsExpanded:Vt(()=>e.general?.shellToolPartsExpanded,Pt.general.shellToolPartsExpanded),setShellToolPartsExpanded(i){t("general","shellToolPartsExpanded",i)},editToolPartsExpanded:Vt(()=>e.general?.editToolPartsExpanded,Pt.general.editToolPartsExpanded),setEditToolPartsExpanded(i){t("general","editToolPartsExpanded",i)},showSessionProgressBar:Vt(()=>e.general?.showSessionProgressBar,Pt.general.showSessionProgressBar),setShowSessionProgressBar(i){t("general","showSessionProgressBar",i)},browserUse:Vt(()=>e.general?.browserUse,Pt.general.browserUse),setBrowserUse(i){t("general","browserUse",i)},computerUse:Vt(()=>e.general?.computerUse,Pt.general.computerUse),setComputerUse(i){t("general","computerUse",i)},debugLogging:Vt(()=>e.general?.debugLogging,Pt.general.debugLogging),setDebugLogging(i){t("general","debugLogging",i)}},appearance:{fontSize:Vt(()=>e.appearance?.fontSize,Pt.appearance.fontSize),setFontSize(i){t("appearance","fontSize",i)},font:Vt(()=>e.appearance?.mono,Pt.appearance.mono),setFont(i){t("appearance","mono",i.trim()?i:"")},uiFont:Vt(()=>e.appearance?.sans,Pt.appearance.sans),setUIFont(i){t("appearance","sans",i.trim()?i:"")},terminalFont:Vt(()=>e.appearance?.terminal,Pt.appearance.terminal),setTerminalFont(i){t("appearance","terminal",i.trim()?i:"")}},keybinds:{get:i=>e.keybinds?.[i],set(i,o){t("keybinds",i,o)},reset(i){t("keybinds",o=>{if(!Object.prototype.hasOwnProperty.call(o,i))return o;const s={...o};return delete s[i],s})},resetAll(){t("keybinds",St({}))}},permissions:{autoApprove:Vt(()=>e.permissions?.autoApprove,Pt.permissions.autoApprove),setAutoApprove(i){t("permissions","autoApprove",i)}},notifications:{agent:Vt(()=>e.notifications?.agent,Pt.notifications.agent),setAgent(i){t("notifications","agent",i)},permissions:Vt(()=>e.notifications?.permissions,Pt.notifications.permissions),setPermissions(i){t("notifications","permissions",i)},errors:Vt(()=>e.notifications?.errors,Pt.notifications.errors),setErrors(i){t("notifications","errors",i)}},sounds:{agentEnabled:Vt(()=>e.sounds?.agentEnabled,Pt.sounds.agentEnabled),setAgentEnabled(i){t("sounds","agentEnabled",i)},agent:Vt(()=>e.sounds?.agent,Pt.sounds.agent),setAgent(i){t("sounds","agent",i)},permissionsEnabled:Vt(()=>e.sounds?.permissionsEnabled,Pt.sounds.permissionsEnabled),setPermissionsEnabled(i){t("sounds","permissionsEnabled",i)},permissions:Vt(()=>e.sounds?.permissions,Pt.sounds.permissions),setPermissions(i){t("sounds","permissions",i)},errorsEnabled:Vt(()=>e.sounds?.errorsEnabled,Pt.sounds.errorsEnabled),setErrorsEnabled(i){t("sounds","errorsEnabled",i)},errors:Vt(()=>e.sounds?.errors,Pt.sounds.errors),setErrors(i){t("sounds","errors",i)}}}}}),nae=({onRequest:e,onSseError:t,onSseEvent:n,responseTransformer:r,responseValidator:i,sseDefaultRetryDelay:o,sseMaxRetryAttempts:s,sseMaxRetryDelay:a,sseSleepFn:l,url:c,...u})=>{let d;const h=l??(p=>new Promise(g=>setTimeout(g,p)));return{stream:async function*(){let p=o??3e3,g=0;const v=u.signal??new AbortController().signal;for(;!v.aborted;){g++;const y=u.headers instanceof Headers?u.headers:new Headers(u.headers);d!==void 0&&y.set("Last-Event-ID",d);try{const w={redirect:"follow",...u,body:u.serializedBody,headers:y,signal:v};let k=new Request(c,w);e&&(k=await e(c,w));const C=await(u.fetch??globalThis.fetch)(k);if(!C.ok)throw new Error(`SSE failed: ${C.status} ${C.statusText}`);if(!C.body)throw new Error("No body in SSE response");const S=C.body.pipeThrough(new TextDecoderStream).getReader();let $="";const O=()=>{try{S.cancel()}catch{}};v.addEventListener("abort",O);try{for(;;){const{done:D,value:M}=await S.read();if(D)break;$+=M,$=$.replace(/\r\n/g,`
2375
+ {{message}}`,"error.chain.configInvalid":"Config file at {{path}} is invalid","error.chain.configInvalidWithMessage":"Config file at {{path}} is invalid: {{message}}","notification.permission.title":"Permission required","notification.permission.description":"{{sessionTitle}} in {{projectName}} needs permission","notification.question.title":"Question","notification.question.description":"{{sessionTitle}} in {{projectName}} has a question","notification.action.goToSession":"Go to session","notification.session.responseReady.title":"Response ready","notification.session.error.title":"Session error","notification.session.error.fallbackDescription":"An error occurred","notification.session.untitled":"Untitled session","notification.center.title":"Notifications","notification.center.count":"{{count}} notifications","notification.center.markAllRead":"Mark all read","notification.center.empty.title":"No notifications","notification.center.item.responseReady":"{{sessionTitle}} in {{projectName}} is ready","home.recentProjects":"Recent projects","home.empty.title":"No recent projects","home.empty.description":"Get started by opening a local project","home.title":"Workspace","home.subtitle.zero":"No projects open","home.subtitle.one":"1 project","home.subtitle.other":"{{count}} projects","home.subtitle.lastActivity":"Last active {{time}}","home.tab.overview":"Overview","home.tab.models":"Models","home.range.all":"All","home.range.30d":"30d","home.range.7d":"7d","home.stat.sessions":"Sessions","home.stat.messages":"Messages","home.stat.tokens":"Total tokens","home.stat.activeDays":"Active days","home.stat.streak.current":"Current streak","home.stat.streak.longest":"Longest streak","home.stat.streak.value":"{{count}}d","home.stat.peakHour":"Peak hour","home.stat.preferredModel":"Preferred model","home.stat.git.repos":"Repos worked","home.stat.git.commits":"Commits made","home.stat.git.files":"Files changed","home.stat.git.lines":"Lines changed","home.stat.git.additions":"Lines added","home.stat.git.deletions":"Lines deleted","home.fact.devin.match":"You're hitting ~{{percent}}% of Devin Oldenburg's reference rate (~200M tokens/day).","home.fact.devin.behind":"Devin Oldenburg burns through ~{{ratio}}× more tokens per day than you.","home.fact.tokens.novel":"That's ~{{count}} average paperback novels in tokens.","home.fact.tokens.dune":"You used ~{{count}}× more tokens than the Dune novel.","home.fact.tokens.lotr":"Enough tokens for ~{{count}}× The Lord of the Rings trilogy.","home.fact.tokens.warAndPeace":"You've out-written War and Peace ~{{count}}×.","home.fact.tokens.bible":"Your tokens equal ~{{count}} King James Bibles.","home.fact.tokens.shakespeare":"~{{count}}× Shakespeare's complete works in tokens.","home.fact.tokens.harryPotter":"~{{count}}× the entire Harry Potter series.","home.fact.tokens.perMessage":"~{{count}} tokens per message — you feed the context generously.","home.fact.messages.perActiveDay":"~{{count}} messages per active day on average.","home.fact.messages.thousand":"{{count}}k messages sent — a small civilization of prompts.","home.fact.messages.total":"{{count}} messages and counting.","home.fact.streak.week":"{{count}}-day streak — longer than most New Year resolutions.","home.fact.streak.month":"{{count}} days in a row — habit officially formed.","home.fact.streak.legendary":"{{count}}-day streak — that's GitHub-graph green.","home.fact.streak.bestEver":"Personal best streak: {{count}} days. Can you beat it?","home.fact.activeDays.percent":"Active on {{count}} days — {{percent}}% of the year.","home.fact.activeDays.workYear":"{{count}} active days — more than a full work year.","home.fact.sessions.perWeek":"~{{count}} sessions per week — steady rhythm.","home.fact.sessions.century":"{{count}} sessions completed — century club.","home.fact.sessions.thousand":"{{count}}k sessions — you're basically running a fleet.","home.fact.peakHour.midnight":"Peak at {{hour}}:00 — proper night owl.","home.fact.peakHour.earlybird":"Peak at {{hour}}:00 — coffee before code.","home.fact.peakHour.midday":"Peak at {{hour}}:00 — flow state, post-lunch fuel.","home.fact.peakHour.afternoon":"Peak at {{hour}}:00 — the productive slope of the day.","home.fact.peakHour.evening":"Peak at {{hour}}:00 — dinner can wait.","home.activity.dayLabel":"{{count}} on {{date}}","home.activity.empty":"No activity yet","home.models.empty":"No model usage yet","home.models.messages":"{{count}} msgs","home.models.sessions":"{{count}} sessions","home.models.tokens":"{{value}} tokens","home.projects.title":"Most active projects","home.projects.empty":"Open a project to see activity here","home.projects.sessionsCount.one":"1 session","home.projects.sessionsCount.other":"{{count}} sessions","home.projects.diff":"+{{additions}} -{{deletions}}","home.projects.never":"No activity yet","home.recent.title":"Recent sessions","home.recent.empty":"Start a session to see it here","home.start.title":"Start something new","home.start.description":"Pick a project from the sidebar or open a new one to begin.","session.tab.session":"Session","session.tab.review":"Review","session.tab.context":"Context","session.panel.reviewAndFiles":"Review and files","session.activity.timeline.title":"Timeline","session.activity.timeline.empty":"No activity yet","session.activity.model.initial":"Model selected","session.activity.model.switch":"Model switch","session.activity.tool.pending":"Pending","session.activity.tool.running":"Running","session.activity.tool.completed":"Completed","session.activity.tool.error":"Failed","session.activity.file.added":"Added","session.activity.file.deleted":"Deleted","session.activity.file.modified":"Modified","session.review.filesChanged":"{{count}} Files Changed","session.review.change.one":"Change","session.review.change.other":"Changes","session.review.loadingChanges":"Loading changes...","session.review.empty":"No changes in this session yet","session.review.noVcs":"No Git Version Control System detected, changes not displayed","session.review.noVcs.createGit.title":"Create a Git repository","session.review.noVcs.createGit.description":"Track, review, and undo changes in this project","session.review.noVcs.createGit.actionLoading":"Creating Git repository...","session.review.noVcs.createGit.action":"Create Git repository","session.review.noSnapshot":"Snapshot tracking is disabled in config, so session changes are unavailable","session.review.noChanges":"No changes","session.review.noUncommittedChanges":"No uncommitted changes yet","session.review.noBranchChanges":"No branch changes yet","session.files.selectToOpen":"Select a file to open","session.files.all":"All files","session.files.empty":"No files","session.files.binaryContent":"Binary file (content cannot be displayed)","session.messages.renderEarlier":"Render earlier messages","session.messages.loadingEarlier":"Loading earlier messages...","session.messages.loadEarlier":"Load earlier messages","session.messages.loading":"Loading messages...","session.messages.jumpToLatest":"Jump to latest","session.context.addToContext":"Add {{selection}} to context","session.todo.title":"Todos","session.todo.collapse":"Collapse","session.todo.expand":"Expand","session.todo.progress":"{{done}} of {{total}} todos completed","session.question.progress":"{{current}} of {{total}} questions","session.followupDock.summary.one":"{{count}} queued message","session.followupDock.summary.other":"{{count}} queued messages","session.followupDock.sendNow":"Send now","session.followupDock.edit":"Edit","session.followupDock.collapse":"Collapse queued messages","session.followupDock.expand":"Expand queued messages","session.revertDock.summary.one":"{{count}} rolled back message","session.revertDock.summary.other":"{{count}} rolled back messages","session.revertDock.collapse":"Collapse rolled back messages","session.revertDock.expand":"Expand rolled back messages","session.revertDock.restore":"Restore message","session.new.title":"Build anything","session.new.worktree.main":"Main branch","session.new.worktree.mainWithBranch":"Main branch ({{branch}})","session.new.worktree.create":"Create new worktree","session.new.lastModified":"Last modified","session.header.search.placeholder":"Search {{project}}","session.header.searchFiles":"Search files","session.header.openIn":"Open in","session.header.open.action":"Open {{app}}","session.header.open.ariaLabel":"Open in {{app}}","session.header.open.menu":"Open options","session.header.open.copyPath":"Copy path","session.header.open.finder":"Finder","session.header.open.fileExplorer":"File Explorer","session.header.open.fileManager":"File Manager","session.header.open.app.vscode":"VS Code","session.header.open.app.cursor":"Cursor","session.header.open.app.zed":"Zed","session.header.open.app.textmate":"TextMate","session.header.open.app.antigravity":"Antigravity","session.header.open.app.terminal":"Terminal","session.header.open.app.iterm2":"iTerm2","session.header.open.app.ghostty":"Ghostty","session.header.open.app.warp":"Warp","session.header.open.app.xcode":"Xcode","session.header.open.app.androidStudio":"Android Studio","session.header.open.app.powershell":"PowerShell","session.header.open.app.sublimeText":"Sublime Text","status.popover.trigger":"Status","status.popover.ariaLabel":"Server configurations","status.popover.tab.servers":"Servers","status.popover.tab.mcp":"MCP","status.popover.tab.lsp":"LSP","status.popover.tab.plugins":"Plugins","status.popover.action.manageServers":"Manage servers","session.share.popover.title":"Publish on web","session.share.popover.description.shared":"This session is public on the web. It is accessible to anyone with the link.","session.share.popover.description.unshared":"Share session publicly on the web. It will be accessible to anyone with the link.","session.share.action.share":"Share","session.share.action.publish":"Publish","session.share.action.publishing":"Publishing...","session.share.action.unpublish":"Unpublish","session.share.action.unpublishing":"Unpublishing...","session.share.action.view":"View","session.share.copy.copied":"Copied","session.share.copy.copyLink":"Copy link","lsp.tooltip.none":"No LSP servers","lsp.label.connected":"{{count}} LSP","prompt.loading":"Loading prompt...","terminal.loading":"Loading terminal...","terminal.title":"Terminal","terminal.title.numbered":"Terminal {{number}}","terminal.close":"Close terminal","terminal.connectionLost.title":"Connection Lost","terminal.connectionLost.abnormalClose":"WebSocket closed abnormally: {{code}}","terminal.connectionLost.description":"The terminal connection was interrupted. This can happen when the server restarts.","common.closeTab":"Close tab","common.dismiss":"Dismiss","common.moreCountSuffix":" (+{{count}} more)","common.requestFailed":"Request failed","common.moreOptions":"More options","common.learnMore":"Learn more","common.rename":"Rename","common.reset":"Reset","common.refresh":"Refresh","common.archive":"Archive","common.restore":"Restore","common.delete":"Delete","common.close":"Close","common.edit":"Edit","common.loadMore":"Load more","common.key.esc":"ESC","common.key.ctrl":"Ctrl","common.key.alt":"Alt","common.key.shift":"Shift","common.key.meta":"Meta","common.key.space":"Space","common.key.backspace":"Backspace","common.key.enter":"Enter","common.key.tab":"Tab","common.key.delete":"Delete","common.key.home":"Home","common.key.end":"End","common.key.pageUp":"Page Up","common.key.pageDown":"Page Down","common.key.insert":"Insert","common.unknown":"unknown","common.time.justNow":"Just now","common.time.minutesAgo.short":"{{count}}m ago","common.time.hoursAgo.short":"{{count}}h ago","common.time.daysAgo.short":"{{count}}d ago","archiveSessions.title":"Archived sessions","archiveSessions.search.label":"Search archived sessions","archiveSessions.search.placeholder":"Search archived sessions","archiveSessions.filter.scope.all":"All","archiveSessions.filter.age.all":"All","archiveSessions.filter.age.recent":"Recent","archiveSessions.filter.age.older":"Older","archiveSessions.empty":"No archived sessions found","archiveSessions.error":"Some archived sessions could not be loaded","archiveSessions.archivedAt":"Archived {{time}}","archiveSessions.deletesIn":"Deletes in {{count}}d","archiveSessions.retention":"Archived sessions are view-only. They are deleted after 30 days and cannot be restored.","archiveSessions.restore.success.title":"Session restored","archiveSessions.restore.success.description":"The session is back in the sidebar.","archiveSessions.restore.failed.title":"Failed to restore session","session.archived.readOnly":"This session is archived and view-only. Archived sessions are deleted after 30 days.","sidebar.menu.toggle":"Toggle menu","sidebar.nav.projectsAndSessions":"Projects and sessions","sidebar.home":"Home","sidebar.notifications":"Notifications","session.liveActivity.menu.on":"Stop showing on Lock Screen","session.liveActivity.menu.off":"Show on Lock Screen","session.liveActivity.menu.limit":"Lock Screen full ({{max}} sessions)","sidebar.modes":"Modes","sidebar.models":"Models","sidebar.mcp":"MCP","sidebar.plugins":"Plugins","sidebar.skills":"Skills","sidebar.settings":"Settings","sidebar.help":"Help","sidebar.restart":"Restart","sidebar.restart.confirm":"Restart the Codeplane app? Active sessions will reconnect, mode, plugin, and MCP changes will be reloaded.","sidebar.workspaces.enable":"Enable workspaces","sidebar.workspaces.disable":"Disable workspaces","sidebar.gettingStarted.title":"Getting started","sidebar.gettingStarted.line1":"Codeplane includes free models so you can start immediately.","sidebar.gettingStarted.line2":"Connect any provider to use models, inc. Claude, GPT, Gemini etc.","sidebar.project.recentSessions":"Recent sessions","sidebar.project.viewAllSessions":"View all sessions","sidebar.project.clearNotifications":"Clear notifications","sidebar.sessionPreview.loading":"Loading preview...","sidebar.sessionPreview.empty":"No prompt yet","sidebar.sessionPreview.thinking":"Thinking...","sidebar.sessionPreview.duration":"Duration","sidebar.empty.title":"No projects open","sidebar.empty.description":"Open a project to get started","debugBar.ariaLabel":"Development performance diagnostics","debugBar.na":"n/a","debugBar.nav.label":"NAV","debugBar.nav.tip":"Last completed route transition touching a session page, measured from router start until the first paint after it settles.","debugBar.fps.label":"FPS","debugBar.fps.tip":"Rolling frames per second over the last 5 seconds.","debugBar.frame.label":"FRAME","debugBar.frame.tip":"Worst frame time over the last 5 seconds.","debugBar.jank.label":"JANK","debugBar.jank.tip":"Frames over 32ms in the last 5 seconds.","debugBar.long.label":"LONG","debugBar.long.tip":"Blocked time and long-task count in the last 5 seconds. Max task: {{max}}.","debugBar.delay.label":"DELAY","debugBar.delay.tip":"Worst observed input delay in the last 5 seconds.","debugBar.inp.label":"INP","debugBar.inp.tip":"Approximate interaction duration over the last 5 seconds. This is INP-like, not the official Web Vitals INP.","debugBar.cls.label":"CLS","debugBar.cls.tip":"Cumulative layout shift for the current app lifetime.","debugBar.mem.label":"MEM","debugBar.mem.tipUnavailable":"Used JS heap vs heap limit. Chromium only.","debugBar.mem.tip":"Used JS heap vs heap limit. {{used}} of {{limit}}.","app.name.web":"Codeplane","settings.section.app":"App","settings.section.server":"Server","settings.section.ai":"AI","settings.section.extensions":"Extensions","settings.tab.general":"General","settings.tab.general.description":"Manage app preferences","settings.tab.shortcuts":"Shortcuts","settings.tab.shortcuts.description":"Configure shortcuts","settings.tab.providers.description":"Connect AI providers","settings.tab.models.description":"Choose visible models","settings.tab.modes.description":"Configure agent modes","settings.tab.plugins.description":"Manage plugins","settings.tab.mcp.description":"Connect MCP servers","settings.tab.skills.description":"Manage skill sources","settings.general.section.appearance":"Appearance","settings.general.section.advanced":"Advanced","settings.general.section.notifications":"System notifications","settings.general.section.sounds":"Sound effects","settings.general.section.feed":"Feed","settings.general.row.language.title":"Language","settings.general.row.language.description":"Change the display language for Codeplane","settings.general.row.appearance.title":"Appearance","settings.general.row.appearance.description":"Customise how Codeplane looks on your device","settings.general.row.colorScheme.title":"Color scheme","settings.general.row.colorScheme.description":"Choose whether Codeplane follows the system, light, or dark theme","settings.general.row.theme.title":"Theme","settings.general.row.theme.description":"Customise how Codeplane is themed.","settings.general.row.font.title":"Code Font","settings.general.row.font.description":"Customise the font used in code blocks","settings.general.row.terminalFont.title":"Terminal Font","settings.general.row.terminalFont.description":"Customise the font used in the terminal","settings.general.row.uiFont.title":"UI Font","settings.general.row.uiFont.description":"Customise the font used throughout the interface","settings.general.row.followup.title":"Follow-up behavior","settings.general.row.followup.description":"Choose whether follow-up prompts steer immediately or wait in a queue","settings.general.row.followup.option.queue":"Queue","settings.general.row.followup.option.steer":"Steer","settings.general.row.codeplaneCoauthor.title":"Codeplane co-author","settings.general.row.codeplaneCoauthor.description":"Add Co-Authored-By: codeplane-agent[bot] <287208015+codeplane-agent[bot]@users.noreply.github.com> to commits made through Codeplane","settings.general.row.showFileTree.title":"File tree","settings.general.row.showFileTree.description":"Show the file tree toggle and panel in sessions","settings.general.row.showNavigation.title":"Navigation controls","settings.general.row.showNavigation.description":"Show the back and forward buttons in the app header","settings.general.row.showSearch.title":"Command palette","settings.general.row.showSearch.description":"Show the search and command palette button in the app header","settings.general.row.showTerminal.title":"Terminal","settings.general.row.showTerminal.description":"Show the terminal button in the app header","settings.general.row.showStatus.title":"Server status","settings.general.row.showStatus.description":"Show the server status button in the app header","settings.general.row.reasoningSummaries.title":"Show reasoning summaries","settings.general.row.reasoningSummaries.description":"Display model reasoning summaries in the timeline","settings.general.row.shellToolPartsExpanded.title":"Expand shell tool parts","settings.general.row.shellToolPartsExpanded.description":"Show shell tool parts expanded by default in the timeline","settings.general.row.editToolPartsExpanded.title":"Expand edit tool parts","settings.general.row.editToolPartsExpanded.description":"Show edit, write, and patch tool parts expanded by default in the timeline","settings.general.row.showSessionProgressBar.title":"Show session progress bar","settings.general.row.showSessionProgressBar.description":"Display the animated progress bar at the top of the session when the agent is working","settings.general.row.browserUse.title":"Browser use","settings.general.row.browserUse.description":"Allow the agent to control an isolated Chrome browser with its own virtual mouse and keyboard for UI testing and debugging. Includes navigation, refs, click, hover, drag, type, shortcuts, screenshots, console logs, and JavaScript evaluation. Disabled by default and only available in Codeplane Desktop.","settings.general.row.computerUse.title":"Computer use","settings.general.row.computerUse.description":"Allow the agent to control this desktop through the real OS pointer: screenshots, mouse movement, clicks, drags, scrolling, keyboard input, shortcuts, and app launching. Disabled by default and only available in Codeplane Desktop.","settings.general.row.debugLogging.title":"Debug logging","settings.general.row.debugLogging.description":"Write verbose runtime logs for desktop-managed local instances. Restart a running local instance to apply the new level.","settings.general.row.instanceLogs.title":"Instance logs","settings.general.row.instanceLogs.description":"Open this local instance's log directory.","settings.general.row.instanceLogs.action.open":"Open logs","settings.general.row.instanceLogs.action.opening":"Opening…","settings.general.row.instanceLogs.unavailable":"This instance does not have local logs on this desktop.","settings.general.row.computerUse.permissionsTitle":"Permissions needed for {{ tool }}","settings.general.row.computerUse.permissionsBody":"{{ tool }} requires {{count}} system permissions to control the desktop. Codeplane needs these to move the cursor, click, type, take screenshots, and open apps on your behalf.","settings.general.row.computerUse.permissionGranted":"Ready","settings.general.row.computerUse.permissionMissing":"Not active — open System Settings or relaunch","settings.general.row.computerUse.permissionRelaunchRequired":"Turned on — relaunch required","settings.general.row.computerUse.permissionOpenSettings":"Open Settings","settings.general.row.computerUse.permissionOpening":"Opening…","settings.general.row.computerUse.permissionsFooter":"If the toggle is already on in System Settings but still shows here as inactive, relaunch Codeplane Desktop so macOS reloads the permission.","settings.general.row.computerUse.permissionsRelaunchFooter":"The permission is turned on in System Settings, but this running Codeplane process cannot use it yet. Relaunch Codeplane Desktop to apply it.","settings.general.row.computerUse.permissionDone":"Done","settings.general.row.computerUse.manage":"Manage","settings.general.row.computerUse.statusAllGranted":"All active","settings.general.row.computerUse.statusActivePartial":"{{active}} of {{total}} active","settings.general.row.computerUse.statusPartial":"{{granted}} of {{total}} granted","settings.general.row.computerUse.statusRelaunchRequired":"Relaunch required","settings.general.row.computerUse.recheck":"Recheck","settings.general.row.computerUse.recheckLoading":"Checking...","settings.general.row.computerUse.relaunch":"Relaunch desktop","settings.general.row.computerUse.relaunchPending":"Relaunching...","settings.general.row.computerUse.enableAnyway":"Enable anyway","settings.general.row.computerUse.enableNow":"Enable now","settings.general.row.computerUse.relaunchUnavailable.title":"Relaunch manually","settings.general.row.computerUse.relaunchUnavailable.description":"Quit and reopen Codeplane Desktop for the new macOS permissions to take effect.","settings.general.row.computerUse.permissionDescription.accessibility":"Required for mouse movement, clicks, typing, keyboard shortcuts, scrolling, and app launch control.","settings.general.row.computerUse.permissionDescription.screenRecording":"Required for screenshots so the agent can see the desktop before and after each action.","settings.general.row.computerUse.permissionDescription.generic":"Required by macOS before Codeplane can control this desktop.","settings.general.row.releaseNotes.title":"Release notes","settings.general.row.releaseNotes.description":"Show What's New popups after updates","settings.general.section.updates":"Updates","settings.general.row.version.title":"Application version","settings.general.row.version.developmentBuild":"Development build","settings.general.row.version.descriptionLoading":"Checking for updates…","settings.general.row.version.descriptionError":"Could not check for updates. Try again.","settings.general.row.version.descriptionUpToDate":"You are on version {{current}} — up to date.","settings.general.row.version.descriptionHasUpdate":"Version {{latest}} is available. You are on {{current}}.","settings.general.row.version.descriptionUnknownMethod":"You are on version {{current}}. Automatic updates are unavailable for this install — update manually.","settings.general.row.version.descriptionDesktopManaged":"You are on version {{current}}. Updates are managed by the Codeplane desktop app — open the desktop's Updates panel to check for a new version.","settings.general.row.version.descriptionManagedLocal":"You are on version {{current}}. This local runtime is managed by the launcher; restart Codeplane to pick up a newer runtime.","settings.general.row.version.action.check":"Check for updates","settings.general.row.version.action.checking":"Checking…","settings.general.row.version.action.update":"Update now","settings.general.row.version.action.updating":"Updating…","settings.general.row.version.action.whatsNew":"What's new","sound.option.none":"None","sound.option.alert01":"Alert 01","sound.option.alert02":"Alert 02","sound.option.alert03":"Alert 03","sound.option.alert04":"Alert 04","sound.option.alert05":"Alert 05","sound.option.alert06":"Alert 06","sound.option.alert07":"Alert 07","sound.option.alert08":"Alert 08","sound.option.alert09":"Alert 09","sound.option.alert10":"Alert 10","sound.option.bipbop01":"Bip-bop 01","sound.option.bipbop02":"Bip-bop 02","sound.option.bipbop03":"Bip-bop 03","sound.option.bipbop04":"Bip-bop 04","sound.option.bipbop05":"Bip-bop 05","sound.option.bipbop06":"Bip-bop 06","sound.option.bipbop07":"Bip-bop 07","sound.option.bipbop08":"Bip-bop 08","sound.option.bipbop09":"Bip-bop 09","sound.option.bipbop10":"Bip-bop 10","sound.option.staplebops01":"Staplebops 01","sound.option.staplebops02":"Staplebops 02","sound.option.staplebops03":"Staplebops 03","sound.option.staplebops04":"Staplebops 04","sound.option.staplebops05":"Staplebops 05","sound.option.staplebops06":"Staplebops 06","sound.option.staplebops07":"Staplebops 07","sound.option.nope01":"Nope 01","sound.option.nope02":"Nope 02","sound.option.nope03":"Nope 03","sound.option.nope04":"Nope 04","sound.option.nope05":"Nope 05","sound.option.nope06":"Nope 06","sound.option.nope07":"Nope 07","sound.option.nope08":"Nope 08","sound.option.nope09":"Nope 09","sound.option.nope10":"Nope 10","sound.option.nope11":"Nope 11","sound.option.nope12":"Nope 12","sound.option.yup01":"Yup 01","sound.option.yup02":"Yup 02","sound.option.yup03":"Yup 03","sound.option.yup04":"Yup 04","sound.option.yup05":"Yup 05","sound.option.yup06":"Yup 06","settings.general.notifications.agent.title":"Agent","settings.general.notifications.agent.description":"Show system notification when the agent is complete or needs attention","settings.general.notifications.permissions.title":"Permissions","settings.general.notifications.permissions.description":"Show system notification when a permission is required","settings.general.notifications.errors.title":"Errors","settings.general.notifications.errors.description":"Show system notification when an error occurs","settings.general.sounds.agent.title":"Agent","settings.general.sounds.agent.description":"Play sound when the agent is complete or needs attention","settings.general.sounds.permissions.title":"Permissions","settings.general.sounds.permissions.description":"Play sound when a permission is required","settings.general.sounds.errors.title":"Errors","settings.general.sounds.errors.description":"Play sound when an error occurs","settings.shortcuts.title":"Keyboard shortcuts","settings.shortcuts.reset.button":"Reset to defaults","settings.shortcuts.reset.toast.title":"Shortcuts reset","settings.shortcuts.reset.toast.description":"Keyboard shortcuts have been reset to defaults.","settings.shortcuts.conflict.title":"Shortcut already in use","settings.shortcuts.conflict.description":"{{keybind}} is already assigned to {{titles}}.","settings.shortcuts.unassigned":"Unassigned","settings.shortcuts.pressKeys":"Press keys","settings.shortcuts.search.placeholder":"Search shortcuts","settings.shortcuts.search.empty":"No shortcuts found","settings.shortcuts.group.general":"General","settings.shortcuts.group.session":"Session","settings.shortcuts.group.navigation":"Navigation","settings.shortcuts.group.modelAndAgent":"Model and agent","settings.shortcuts.group.terminal":"Terminal","settings.shortcuts.group.prompt":"Prompt","settings.providers.title":"Providers","settings.providers.description":"Provider settings will be configurable here.","settings.providers.section.connected":"Connected providers","settings.providers.connected.empty":"No connected providers","settings.providers.connected.environmentDescription":"Connected from your environment variables","settings.providers.section.popular":"Popular providers","settings.providers.custom.description":"Add an OpenAI-compatible provider by base URL.","settings.providers.tag.environment":"Environment","settings.providers.tag.config":"Config","settings.providers.tag.custom":"Custom","settings.providers.tag.other":"Other","settings.providers.models.edit":"Edit models","settings.providers.models.title":"{{provider}} models","settings.providers.models.count":"{{selected}} of {{total}} configured","settings.providers.models.selectAll":"Select all","settings.providers.models.clear":"Clear","settings.providers.models.add.id":"Model ID","settings.providers.models.add.name":"Display name","settings.providers.models.add.submit":"Add","settings.providers.models.add.error.id":"Model ID is required.","settings.providers.models.empty":"No models found","settings.providers.models.error.required":"Select at least one model.","settings.providers.models.toast.updated":"{{provider}} models updated","settings.models.title":"Models","settings.models.description":"Model settings will be configurable here.","settings.agents.title":"Agents","settings.agents.description":"Agent settings will be configurable here.","settings.commands.title":"Commands","settings.commands.description":"Command settings will be configurable here.","settings.mcp.title":"MCP","settings.mcp.description":"MCP settings will be configurable here.","settings.permissions.title":"Permissions","settings.permissions.description":"Control what tools the server can use by default.","settings.permissions.section.tools":"Tools","settings.permissions.toast.updateFailed.title":"Failed to update permissions","settings.permissions.action.allow":"Allow","settings.permissions.action.ask":"Ask","settings.permissions.action.deny":"Deny","settings.permissions.tool.read.title":"Read","settings.permissions.tool.read.description":"Reading a file (matches the file path)","settings.permissions.tool.edit.title":"Edit","settings.permissions.tool.edit.description":"Modify files, including edits, writes, patches, and multi-edits","settings.permissions.tool.glob.title":"Glob","settings.permissions.tool.glob.description":"Match files using glob patterns","settings.permissions.tool.grep.title":"Grep","settings.permissions.tool.grep.description":"Search file contents using regular expressions","settings.permissions.tool.list.title":"List","settings.permissions.tool.list.description":"List files within a directory","settings.permissions.tool.bash.title":"Bash","settings.permissions.tool.bash.description":"Run shell commands","settings.permissions.tool.task.title":"Task","settings.permissions.tool.task.description":"Launch sub-agents","settings.permissions.tool.skill.title":"Skill","settings.permissions.tool.skill.description":"Load a skill by name","settings.permissions.tool.lsp.title":"LSP","settings.permissions.tool.lsp.description":"Run language server queries","settings.permissions.tool.todowrite.title":"Todo Write","settings.permissions.tool.todowrite.description":"Update the todo list","settings.permissions.tool.webfetch.title":"Web Fetch","settings.permissions.tool.webfetch.description":"Fetch content from a URL","settings.permissions.tool.websearch.title":"Web Search","settings.permissions.tool.websearch.description":"Search the web","settings.permissions.tool.codesearch.title":"Code Search","settings.permissions.tool.codesearch.description":"Search code on the web","settings.permissions.tool.external_directory.title":"External Directory","settings.permissions.tool.external_directory.description":"Access files outside the project directory","settings.permissions.tool.doom_loop.title":"Doom Loop","settings.permissions.tool.doom_loop.description":"Detect repeated tool calls with identical input","session.copyId":"Copy session ID","session.delete.failed.title":"Failed to delete session","session.delete.title":"Delete session","session.delete.confirm":'Delete session "{{name}}"?',"session.delete.button":"Delete session","workspace.new":"New workspace","workspace.type.local":"local","workspace.type.sandbox":"sandbox","workspace.create.failed.title":"Failed to create workspace","workspace.delete.failed.title":"Failed to delete workspace","workspace.resetting.title":"Resetting workspace","workspace.resetting.description":"This may take a minute.","workspace.reset.failed.title":"Failed to reset workspace","workspace.reset.success.title":"Workspace reset","workspace.reset.success.description":"Workspace now matches the default branch.","workspace.error.stillPreparing":"Workspace is still preparing","workspace.status.checking":"Checking for unmerged changes...","workspace.status.error":"Unable to verify git status.","workspace.status.clean":"No unmerged changes detected.","workspace.status.dirty":"Unmerged changes detected in this workspace.","workspace.delete.title":"Delete workspace","workspace.delete.confirm":'Delete workspace "{{name}}"?',"workspace.delete.button":"Delete workspace","workspace.reset.title":"Reset workspace","workspace.reset.confirm":'Reset workspace "{{name}}"?',"workspace.reset.button":"Reset workspace","workspace.reset.archived.none":"No active sessions will be archived.","workspace.reset.archived.one":"1 session will be archived.","workspace.reset.archived.many":"{{count}} sessions will be archived.","workspace.reset.note":"This will reset the workspace to match the default branch.","common.enabled":"Enabled","common.remove":"Remove","modes.page.title":"Modes","modes.page.subtitle":"{{enabled}} of {{total}} enabled","modes.page.add":"Add mode","modes.page.empty":"No modes configured","modes.kind.primary":"Primary","modes.kind.all":"Primary + subagent","modes.source.legacy":"Legacy mode","modes.tag.hidden":"Hidden","modes.tag.disabled":"Disabled","modes.toast.added":"Mode added","modes.toast.updated":"Mode updated","modes.editor.title.add":"Add mode","modes.editor.title.edit":"Edit mode","modes.editor.name":"Name","modes.editor.description":"Description","modes.editor.description.placeholder":"When this mode should be used","modes.editor.model":"Model","modes.editor.model.description":"Optional provider/model override for this mode.","modes.editor.prompt":"Prompt","modes.editor.prompt.description":"Additional system prompt for this mode.","modes.editor.prompt.placeholder":"You are focused on reviewing code for correctness...","modes.editor.temperature":"Temperature","modes.editor.topP":"Top P","modes.editor.steps":"Steps","modes.editor.hidden":"Hidden","modes.editor.hidden.description":"Hide this mode from the prompt selector.","modes.editor.disable":"Disabled","modes.editor.disable.description":"Keep the config but remove this mode from runtime selection.","modes.editor.error.name":"Name is required.","modes.editor.error.duplicate":"A mode or agent with this name already exists.","models.page.title":"Models","models.page.subtitle":"{{shown}} of {{total}} shown in the session model selector","models.page.add":"Add model","models.page.empty":"No models found","models.page.search":"Search models","models.kind.custom":"Custom","models.kind.override":"Override","models.kind.builtin":"Built-in","models.row.provider":"{{provider}} provider","models.row.shown":"Show in session model selector","models.toast.added":"Model added","models.toast.updated":"Model updated","models.editor.title.add":"Add model","models.editor.title.edit":"Edit model","models.editor.provider":"Provider ID","models.editor.model":"Model ID","models.editor.apiModel":"API model ID","models.editor.apiModel.description":"Optional. Use this to create an alias for a provider model.","models.editor.name":"Name","models.editor.family":"Family","models.editor.releaseDate":"Release date","models.editor.context":"Context","models.editor.input":"Input","models.editor.output":"Output","models.editor.capabilities":"Capabilities","models.editor.temperature":"Temperature","models.editor.reasoning":"Reasoning","models.editor.attachment":"Attachments","models.editor.toolCall":"Tool calls","models.editor.error.provider":"Provider ID is required.","models.editor.error.model":"Model ID is required.","models.editor.error.duplicate":"A model with this ID already exists for this provider.","models.editor.error.name":"Name is required.","mcp.page.title":"MCP","mcp.page.subtitle":"{{enabled}} of {{total}} enabled","mcp.page.add":"Add server","mcp.page.empty":"No MCP servers configured","mcp.page.confirm.remove":'Remove MCP server "{{name}}"?',"mcp.page.stat.total":"Servers","mcp.page.stat.local":"Local","mcp.page.stat.remote":"Remote","mcp.toast.added":"MCP server added","mcp.toast.updated":"MCP server updated","mcp.toast.removed":"MCP server removed","mcp.editor.title.add":"Add MCP server","mcp.editor.title.edit":"Edit MCP server","mcp.editor.name":"Name","mcp.editor.type":"Type","mcp.editor.type.local":"Local","mcp.editor.type.remote":"Remote","mcp.editor.command":"Command","mcp.editor.command.description":"Command and arguments to launch the MCP server.","mcp.editor.url":"URL","mcp.editor.environment":"Environment variables","mcp.editor.environment.description":"Sent to the local process as env vars. Values are masked — press the eye to reveal.","mcp.editor.headers":"Headers","mcp.editor.headers.description":"Sent with every request. Values are masked — press the eye to reveal.","mcp.editor.timeout":"Timeout (ms)","mcp.editor.timeout.description":"How long to wait for MCP server requests before failing.","mcp.editor.enabled":"Enabled","mcp.editor.enabled.description":"Connect this server on startup.","mcp.editor.row.add":"Add row","mcp.editor.row.key":"Key","mcp.editor.row.value":"Value","mcp.editor.row.reveal":"Reveal value","mcp.editor.row.hide":"Hide value","mcp.editor.error.name":"Name is required.","mcp.editor.error.duplicate":"An MCP server with this name already exists.","mcp.editor.error.command":"Command is required.","mcp.editor.error.url":"URL is required.","mcp.editor.error.urlInvalid":"URL must start with http:// or https://.","plugins.page.title":"Plugins","plugins.page.subtitle":"{{count}} configured","plugins.page.add":"Add plugin","plugins.page.empty":"No plugins configured","plugins.page.confirm.remove":'Remove plugin "{{name}}"?',"plugins.page.stat.total":"Plugins","plugins.page.stat.package":"Package","plugins.page.stat.local":"Local","plugins.page.stat.remote":"Remote","plugins.kind.local":"Local","plugins.kind.remote":"Remote","plugins.kind.package":"Package","plugins.row.optionCount":"{{count}} options","plugins.toast.added":"Plugin added","plugins.toast.updated":"Plugin updated","plugins.toast.removed":"Plugin removed","plugins.editor.title.add":"Add plugin","plugins.editor.title.edit":"Edit plugin","plugins.editor.specifier":"Specifier","plugins.editor.specifier.description":"Package name (my-plugin), path (./plugins/foo.ts), or URL (https://example.com/plugin.js).","plugins.editor.options":"Options","plugins.editor.options.description":"Optional key-value config passed to the plugin. Secret-looking keys are masked — press the eye to reveal.","plugins.editor.option.add":"Add option","plugins.editor.option.key":"Key","plugins.editor.option.value":"Value","plugins.editor.option.reveal":"Reveal value","plugins.editor.option.hide":"Hide value","plugins.editor.error.specifier":"Specifier is required.","skills.page.title":"Skills","skills.page.subtitle":"{{enabled}} of {{total}} enabled, {{sources}} sources","skills.page.addSource":"Add source","skills.page.empty":"No skills found","skills.section.sources":"Sources","skills.section.available":"Available skills","skills.sources.empty":"No additional skill sources configured","skills.sources.confirm.remove":'Remove skill source "{{source}}"?',"skills.source.path":"Path","skills.source.url":"URL","skills.kind.claude":"Claude","skills.kind.agents":"Agents","skills.kind.codeplane":"Codeplane","skills.kind.local":"Local","skills.tag.disabled":"Disabled","skills.row.openFile":"Edit skill file","skills.toast.sourceAdded":"Skill source added","skills.toast.sourceUpdated":"Skill source updated","skills.toast.sourceRemoved":"Skill source removed","skills.editor.title.add":"Add skill source","skills.editor.title.edit":"Edit skill source","skills.editor.type":"Type","skills.editor.path":"Path","skills.editor.path.description":"Directory to scan for SKILL.md files.","skills.editor.url":"URL","skills.editor.url.description":"Skill index URL ending in /.well-known/skills/.","skills.editor.browse":"Browse","skills.editor.browse.title":"Choose skill directory","skills.editor.error.value":"Source is required.","skills.editor.error.url":"URL must start with http:// or https://.","skills.editor.error.duplicate":"That source is already configured.","settings.tab.secrets.description":"Manage per-instance secrets","secrets.page.title":"Secrets","secrets.page.note":"Use {secret:name} in config. Values are stored in data/secrets/.","secrets.page.add":"Add secret","secrets.page.empty":"No secrets stored for this instance","secrets.page.confirm.remove":'Delete secret "{{name}}"?',"secrets.editor.title.add":"Add secret","secrets.editor.title.edit":"Replace secret","secrets.editor.name":"Secret name","secrets.editor.name.error":"Enter a secret name.","secrets.editor.value":"Secret value","secrets.editor.value.error":"Enter a secret value.","secrets.toast.saved":"Secret saved","secrets.toast.removed":"Secret removed"};function Fse(e){return`oc_locale=${encodeURIComponent(e)}; Path=/; Max-Age=31536000; SameSite=Lax`}const Use=f$,Hse=Cse,Bse={en:"language.en",zh:"language.zh",zht:"language.zht",ko:"language.ko",de:"language.de",es:"language.es",fr:"language.fr",da:"language.da",ja:"language.ja",pl:"language.pl",ru:"language.ru",ar:"language.ar",no:"language.no",br:"language.br",th:"language.th",bs:"language.bs",tr:"language.tr"},tf=d$({...k$,...p_}),zb=new Map([["en",tf]]),wr=(e,t)=>Promise.all([e,t]).then(([n,r])=>({...tf,...d$({...n.dict,...r.dict})})),Vse={zh:()=>wr(z(()=>import("./zh-DDJFG7nx.js"),[]),z(()=>import("./zh-B7FVGIem.js"),[])),zht:()=>wr(z(()=>import("./zht-BPNRNUu6.js"),[]),z(()=>import("./zht-f-8ad5jF.js"),[])),ko:()=>wr(z(()=>import("./ko-el1XZEPY.js"),[]),z(()=>import("./ko-BhteX161.js"),[])),de:()=>wr(z(()=>import("./de-BUNDtHw5.js"),[]),z(()=>import("./de-D93Gzzl8.js"),[])),es:()=>wr(z(()=>import("./es-D33ohYLC.js"),[]),z(()=>import("./es-BYA-UbLo.js"),[])),fr:()=>wr(z(()=>import("./fr-JgNSQr2k.js"),[]),z(()=>import("./fr-ciUw-6za.js"),[])),da:()=>wr(z(()=>import("./da-Bd-y8LIf.js"),[]),z(()=>import("./da-By9-0K0u.js"),[])),ja:()=>wr(z(()=>import("./ja-CvdVSE8m.js"),[]),z(()=>import("./ja-Bk0DfrZG.js"),[])),pl:()=>wr(z(()=>import("./pl-BjRQVeDz.js"),[]),z(()=>import("./pl-DmF_DGQf.js"),[])),ru:()=>wr(z(()=>import("./ru-DtS87Pq4.js"),[]),z(()=>import("./ru-C5TA59lK.js"),[])),ar:()=>wr(z(()=>import("./ar-CmtdxakA.js"),[]),z(()=>import("./ar-B5R9jdSq.js"),[])),no:()=>wr(z(()=>import("./no-ByujzpZU.js"),[]),z(()=>import("./no-DpW2hGdy.js"),[])),br:()=>wr(z(()=>import("./br-C3sTTSy7.js"),[]),z(()=>import("./br-JtOIrpA-.js"),[])),th:()=>wr(z(()=>import("./th-BLv0rqnk.js"),[]),z(()=>import("./th-n0bdSbJW.js"),[])),bs:()=>wr(z(()=>import("./bs-Cbvm7Uef.js"),[]),z(()=>import("./bs-q_YF7Hgh.js"),[])),tr:()=>wr(z(()=>import("./tr-BFbjYrNY.js"),[]),z(()=>import("./tr-7N3SaL64.js"),[]))};function x$(e){const t=zb.get(e);if(t)return Promise.resolve(t);if(e==="en")return Promise.resolve(tf);const n=Vse[e];return n().then(r=>(zb.set(e,r),r))}function S$(){return $se(typeof navigator=="object"?navigator:void 0)}function jb(e){return Tse(e)}function _$(){try{if(typeof window!="object")return;const e=window.codeplaneDesktop?.storage,t=e?e.getItem("codeplane.global.dat","language"):window.localStorage.getItem("codeplane.global.dat:language");if(!t)return;const n=JSON.parse(t);return typeof n?.locale!="string"?void 0:jb(n.locale)}catch{return}}const sx=_$()??S$();sx!=="en"&&x$(sx);const{use:At,provider:qse}=hn({name:"Language",init:e=>{const t=e.locale??_$()??S$(),[n,r,i,o]=ir(In.global("language",["language.v1"]),Je({locale:t})),s=F(()=>jb(n.locale)),a=F(()=>Hse[s()]),[l]=Xo(s,x$,{initialValue:zb.get(t)??tf}),c=_se(()=>l()??tf,xse),u=d=>c(Bse[d]);return re(()=>{typeof document=="object"&&(document.documentElement.lang=s(),document.cookie=Fse(s()))}),{ready:o,locale:s,intl:a,locales:Use,label:u,t:c,setLocale(d){r("locale",jb(d))}}}}),h3e="System Mono",m3e="System Sans",p3e="JetBrainsMono Nerd Font Mono",c4='"Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji"',Wse='ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace, '+c4,Gse='ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif, '+c4,Kse='"JetBrainsMono Nerd Font Mono", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace, '+c4,Zse=Wse,Yse=Gse,Xse=Kse;function u4(e){return e??""}function Jse(e){return/^[\w-]+$/.test(e)?e:`"${e.replaceAll("\\","\\\\").replaceAll('"','\\"')}"`}function d4(e,t){const n=e?.trim()??"";return n?`${Jse(n)}, ${t}`:t}function g3e(e){return u4(e)}function v3e(e){return u4(e)}function Qse(e){return d4(e,Zse)}function eae(e){return d4(e,Yse)}function y3e(e){return u4(e)}function b3e(e){return d4(e,Xse)}const Pt={general:{autoSave:!0,releaseNotes:!0,followup:"queue",showFileTree:!1,showNavigation:!1,showSearch:!1,showStatus:!1,showTerminal:!1,showReasoningSummaries:!1,reasoningDisplay:"short",shellToolPartsExpanded:!1,editToolPartsExpanded:!1,showSessionProgressBar:!0,browserUse:!1,computerUse:!1,debugLogging:!1},appearance:{fontSize:14,mono:"",sans:"",terminal:""},keybinds:{},permissions:{autoApprove:!1},notifications:{agent:!0,permissions:!0,errors:!1},sounds:{agentEnabled:!0,agent:"staplebops-01",permissionsEnabled:!0,permissions:"staplebops-02",errorsEnabled:!0,errors:"nope-03"}};function Vt(e,t){return F(()=>e()??t)}function ax(e,t){return e==="short"||e==="full"||e==="off"?e:t===!0?"full":t===!1?"off":Pt.general.reasoningDisplay}const{use:hu,provider:tae}=hn({name:"Settings",init:()=>{const[e,t,n,r]=ir("settings.v3",Je(Pt));return re(()=>{if(typeof document>"u")return;const i=document.documentElement;i.style.setProperty("--font-family-mono",Qse(e.appearance?.mono)),i.style.setProperty("--font-family-sans",eae(e.appearance?.sans))}),{ready:r,get current(){return e},general:{autoSave:Vt(()=>e.general?.autoSave,Pt.general.autoSave),setAutoSave(i){t("general","autoSave",i)},releaseNotes:Vt(()=>e.general?.releaseNotes,Pt.general.releaseNotes),setReleaseNotes(i){t("general","releaseNotes",i)},followup:Vt(()=>e.general?.followup==="queue"||e.general?.followup==="steer"?e.general.followup:void 0,Pt.general.followup),setFollowup(i){t("general","followup",i)},showFileTree:Vt(()=>e.general?.showFileTree,Pt.general.showFileTree),setShowFileTree(i){t("general","showFileTree",i)},showNavigation:Vt(()=>e.general?.showNavigation,Pt.general.showNavigation),setShowNavigation(i){t("general","showNavigation",i)},showSearch:Vt(()=>e.general?.showSearch,Pt.general.showSearch),setShowSearch(i){t("general","showSearch",i)},showStatus:Vt(()=>e.general?.showStatus,Pt.general.showStatus),setShowStatus(i){t("general","showStatus",i)},showTerminal:Vt(()=>e.general?.showTerminal,Pt.general.showTerminal),setShowTerminal(i){t("general","showTerminal",i)},showReasoningSummaries:Vt(()=>ax(e.general?.reasoningDisplay,e.general?.showReasoningSummaries)!=="off",Pt.general.showReasoningSummaries),setShowReasoningSummaries(i){t("general","showReasoningSummaries",i),t("general","reasoningDisplay",i?"full":"off")},reasoningDisplay:Vt(()=>ax(e.general?.reasoningDisplay,e.general?.showReasoningSummaries),Pt.general.reasoningDisplay),setReasoningDisplay(i){t("general","reasoningDisplay",i),t("general","showReasoningSummaries",i!=="off")},shellToolPartsExpanded:Vt(()=>e.general?.shellToolPartsExpanded,Pt.general.shellToolPartsExpanded),setShellToolPartsExpanded(i){t("general","shellToolPartsExpanded",i)},editToolPartsExpanded:Vt(()=>e.general?.editToolPartsExpanded,Pt.general.editToolPartsExpanded),setEditToolPartsExpanded(i){t("general","editToolPartsExpanded",i)},showSessionProgressBar:Vt(()=>e.general?.showSessionProgressBar,Pt.general.showSessionProgressBar),setShowSessionProgressBar(i){t("general","showSessionProgressBar",i)},browserUse:Vt(()=>e.general?.browserUse,Pt.general.browserUse),setBrowserUse(i){t("general","browserUse",i)},computerUse:Vt(()=>e.general?.computerUse,Pt.general.computerUse),setComputerUse(i){t("general","computerUse",i)},debugLogging:Vt(()=>e.general?.debugLogging,Pt.general.debugLogging),setDebugLogging(i){t("general","debugLogging",i)}},appearance:{fontSize:Vt(()=>e.appearance?.fontSize,Pt.appearance.fontSize),setFontSize(i){t("appearance","fontSize",i)},font:Vt(()=>e.appearance?.mono,Pt.appearance.mono),setFont(i){t("appearance","mono",i.trim()?i:"")},uiFont:Vt(()=>e.appearance?.sans,Pt.appearance.sans),setUIFont(i){t("appearance","sans",i.trim()?i:"")},terminalFont:Vt(()=>e.appearance?.terminal,Pt.appearance.terminal),setTerminalFont(i){t("appearance","terminal",i.trim()?i:"")}},keybinds:{get:i=>e.keybinds?.[i],set(i,o){t("keybinds",i,o)},reset(i){t("keybinds",o=>{if(!Object.prototype.hasOwnProperty.call(o,i))return o;const s={...o};return delete s[i],s})},resetAll(){t("keybinds",St({}))}},permissions:{autoApprove:Vt(()=>e.permissions?.autoApprove,Pt.permissions.autoApprove),setAutoApprove(i){t("permissions","autoApprove",i)}},notifications:{agent:Vt(()=>e.notifications?.agent,Pt.notifications.agent),setAgent(i){t("notifications","agent",i)},permissions:Vt(()=>e.notifications?.permissions,Pt.notifications.permissions),setPermissions(i){t("notifications","permissions",i)},errors:Vt(()=>e.notifications?.errors,Pt.notifications.errors),setErrors(i){t("notifications","errors",i)}},sounds:{agentEnabled:Vt(()=>e.sounds?.agentEnabled,Pt.sounds.agentEnabled),setAgentEnabled(i){t("sounds","agentEnabled",i)},agent:Vt(()=>e.sounds?.agent,Pt.sounds.agent),setAgent(i){t("sounds","agent",i)},permissionsEnabled:Vt(()=>e.sounds?.permissionsEnabled,Pt.sounds.permissionsEnabled),setPermissionsEnabled(i){t("sounds","permissionsEnabled",i)},permissions:Vt(()=>e.sounds?.permissions,Pt.sounds.permissions),setPermissions(i){t("sounds","permissions",i)},errorsEnabled:Vt(()=>e.sounds?.errorsEnabled,Pt.sounds.errorsEnabled),setErrorsEnabled(i){t("sounds","errorsEnabled",i)},errors:Vt(()=>e.sounds?.errors,Pt.sounds.errors),setErrors(i){t("sounds","errors",i)}}}}}),nae=({onRequest:e,onSseError:t,onSseEvent:n,responseTransformer:r,responseValidator:i,sseDefaultRetryDelay:o,sseMaxRetryAttempts:s,sseMaxRetryDelay:a,sseSleepFn:l,url:c,...u})=>{let d;const h=l??(p=>new Promise(g=>setTimeout(g,p)));return{stream:async function*(){let p=o??3e3,g=0;const v=u.signal??new AbortController().signal;for(;!v.aborted;){g++;const y=u.headers instanceof Headers?u.headers:new Headers(u.headers);d!==void 0&&y.set("Last-Event-ID",d);try{const w={redirect:"follow",...u,body:u.serializedBody,headers:y,signal:v};let k=new Request(c,w);e&&(k=await e(c,w));const C=await(u.fetch??globalThis.fetch)(k);if(!C.ok)throw new Error(`SSE failed: ${C.status} ${C.statusText}`);if(!C.body)throw new Error("No body in SSE response");const S=C.body.pipeThrough(new TextDecoderStream).getReader();let $="";const O=()=>{try{S.cancel()}catch{}};v.addEventListener("abort",O);try{for(;;){const{done:D,value:M}=await S.read();if(D)break;$+=M,$=$.replace(/\r\n/g,`
2376
2376
  `).replace(/\r/g,`
2377
2377
  `);const I=$.split(`
2378
2378
 
@@ -2434,10 +2434,10 @@ ${W}`;g(W);const q=c.file[W];if(!N?.force&&q?.loaded)return Promise.resolve();co
2434
2434
  ${t}
2435
2435
  ${n}`,tve=e=>{if(!e||typeof e!="object")return{session:{}};const t=e;return t.session&&typeof t.session=="object"?{session:t.session}:!t.pick||typeof t.pick!="object"?{session:{}}:{session:Object.fromEntries(Object.entries(t.pick).filter(([n])=>n!==eve))}},zS=e=>{if(e)return{...e,model:e.model?{...e.model}:void 0}},{use:M3e,provider:nve}=hn({name:"Local",init:()=>{const e=ri(),t=pu(),n=mg(),r=Yf(),i=t1e(),o=F(()=>e.id||void 0),s=F(()=>n.data.agent.filter(L=>L.mode!=="subagent"&&!L.hidden)),a=F(()=>new Set(r.connected().map(L=>L.id))),[l,c]=ir({...In.serverWorkspace(t.scope,t.directory,"model-selection",["model-selection.v1"]),migrate:tve},Je({session:{}})),[u,d]=Je({current:s()[0]?.name,draft:void 0,last:void 0}),h=L=>!!r.all().find(T=>T.id===L.providerID)?.models[L.modelID]&&a().has(L.providerID),f=(...L)=>{for(const A of L){const T=A();if(T&&h(T))return T}},m=L=>{const A=s();if(A.length!==0)return A.find(T=>T.name===L)??A[0]};re(()=>{const L=s();if(L.length===0){u.current!==void 0&&d("current",void 0);return}L.some(A=>A.name===u.current)||d("current",L[0]?.name)});const p=F(()=>{const L=o();return L?l.session[L]??ac.get(m0(t.scope.key,t.directory,L)):u.draft});re(()=>{const L=o();if(!L)return;const A=m0(t.scope.key,t.directory,L),T=ac.get(A);if(T){if(l.session[L]!==void 0){ac.delete(A);return}c("session",L,zS(T)),ac.delete(A)}});const g=()=>{if(!n.data.config.model)return;const[L,A]=n.data.config.model.split("/"),T={providerID:L,modelID:A};if(h(T))return T},v=()=>{for(const L of i.recent.list())if(h(L))return L},y=()=>{const L=r.default();for(const A of r.connected()){const T=L[A.id];if(T){const K={providerID:A.id,modelID:T};if(h(K))return K}const N=Object.values(A.models)[0];if(!N)continue;const W={providerID:A.id,modelID:N.id};if(h(W))return W}},w=F(()=>g()??v()??y()),k={list:s,current(){return m(p()?.agent??u.current)},set(L){const A=m(L);if(!A){d("current",void 0);return}Xe(()=>{d("current",A.name),d("last",{type:"agent",agent:A.name,model:A.model,variant:A.variant??null});const T=p(),N={agent:A.name,model:A.model??T?.model,variant:A.variant??T?.variant},W=o();if(W){c("session",W,N);return}d("draft",N)})},move(L){const A=s();if(A.length===0){d("current",void 0);return}let T=A.findIndex(W=>W.name===k.current()?.name)+L;T<0&&(T=A.length-1),T>=A.length&&(T=0);const N=A[T];N&&k.set(N.name)}},x=()=>{const L=f(()=>p()?.model,()=>k.current()?.model,w);if(L)return i.find(L)},C=()=>{const L=k.current(),A=x();if(!(!L||!A))return X1e({agent:{model:L.model,variant:L.variant},model:{providerID:A.provider.id,modelID:A.id,variants:A.variants}})},S=()=>p()?.variant,$=()=>{const L=x();return{agent:k.current()?.name,model:L?{providerID:L.provider.id,modelID:L.id}:void 0,variant:S()}},O=L=>{const A={...p()??{agent:k.current()?.name},...L},T=o();if(T){c("session",T,A);return}d("draft",A)},D=F(()=>i.recent.list().map(i.find).filter(Boolean)),M={ready:i.ready,current:x,recent:D,list:i.list,cycle(L){const A=D(),T=x();if(!T)return;const N=A.findIndex(V=>V?.provider.id===T.provider.id&&V?.id===T.id);if(N===-1)return;let W=N+L;W<0&&(W=A.length-1),W>=A.length&&(W=0);const K=A[W];K&&M.set({providerID:K.provider.id,modelID:K.id})},set(L,A){Xe(()=>{d("last",{type:"model",agent:k.current()?.name,model:L??null,variant:S()}),O({model:L}),L&&(i.setVisibility(L,!0),A?.recent&&i.recent.push(L))})},visible(L){return i.visible(L)},setVisibility(L,A){i.setVisibility(L,A)},variant:{configured:C,selected:S,current(){return J1e({variants:this.list(),selected:this.selected(),configured:this.configured()})},list(){const L=x();return L?.variants?Object.keys(L.variants):[]},set(L){Xe(()=>{const A=x();d("last",{type:"variant",agent:k.current()?.name,model:A?{providerID:A.provider.id,modelID:A.id}:null,variant:L??null}),O({variant:L??null})})},cycle(){const L=this.list();L.length!==0&&this.set(Q1e({variants:L,selected:this.selected(),configured:this.configured()}))}}};return{slug:F(()=>dt(t.directory)),model:M,agent:k,session:{reset(){d("draft",void 0)},promote(L,A){const T=zS($());if(T){if(L===t.directory){c("session",A,T),d("draft",void 0);return}ac.set(m0(t.scope.key,L,A),T),d("draft",void 0)}},restore(L){const A=o();A&&L.sessionID===A&&l.session[A]===void 0&&(ac.has(m0(t.scope.key,t.directory,A))||c("session",A,{agent:L.agent,model:L.model,variant:L.model.variant??null}))}}}}}),QP=e=>e.role==="assistant";function eR(e){const t=e?.findLast(QP);return!!t&&typeof t.time.completed!="number"}function rve(e){if(!e?.length)return!1;const t=e.findLastIndex(r=>r.role==="user");if(t===-1)return!1;const n=e.findLastIndex(QP);return t>n}function O3e(e,t){return eR(t)?!0:(e?.type??"idle")==="idle"?!1:e?.type==="retry"||!t?.length?!0:rve(t)}function ive(e){const{status:t,hasError:n,lastWasAssistant:r,hasPendingAssistant:i}=e;return t?.type==="busy"||t?.type==="retry"||i?"running":n?"failed":r?"completed":"queued"}function ove(e){return e.stillEnabled?e.phase==="completed"||e.phase==="failed":!0}function sve(e){if(!e||e.length===0)return"";for(let t=e.length-1;t>=0;t--){const n=e[t];if(!n||n.role!=="user")continue;const r=n.info?.title;return typeof r=="string"&&r.trim()?r:""}return""}function ave(e,t){if(!e||e.length===0)return!1;for(let n=e.length-1;n>=0;n--){const r=e[n];if(!r||r.role!=="assistant")continue;return!!(t[r.id]??[]).some(o=>o?.type==="error")}return!1}const lve=e=>{const t=mg(),n=_O(),r=F(()=>t.data.session_status[e.sessionId]),i=F(()=>t.data.message[e.sessionId]??[]),o=F(()=>sve(i())),s=F(()=>i().filter(h=>h.role==="user").length),a=F(()=>eR(i())),l=F(()=>{const h=i();return h[h.length-1]?.role==="assistant"}),c=F(()=>ave(i(),t.data.part)),u=F(()=>{const h=i();for(let f=h.length-1;f>=0;f--){const m=h[f];if(m?.role!=="user")continue;const p=m.time?.created;return typeof p=="number"?new Date(p).toISOString():new Date().toISOString()}return new Date().toISOString()}),d=F(()=>ive({status:r(),hasError:c(),lastWasAssistant:l(),hasPendingAssistant:a()}));return re(gt([d,o,s,u],([h,f,m,p])=>{Mx({type:"codeplane:task",taskId:e.sessionId,phase:h,queueDepth:0,currentMessage:f,progress:null,startedAt:p,turns:m})})),fe(()=>{const h=d();ove({stillEnabled:n.enabled(e.sessionId),phase:h})&&Mx({type:"codeplane:task",taskId:e.sessionId,phase:h==="failed"?"failed":"completed",queueDepth:0,currentMessage:o(),progress:1,startedAt:u(),turns:s()})}),null},cve=()=>{const e=_O();return b(Ut,{get each(){return e.enabledSessionIds()},children:t=>b(lve,{sessionId:t})})};function uve(e){const t=So(),n=xo(),r=ri(),i=mg(),o=Gi(),s=F(()=>dt(e.directory)),a=F(()=>t.pathname.startsWith(`/cron/worktree/${s()}`)?`/cron/worktree/${s()}`:`/${s()}`),l=F(()=>{const c=new URLSearchParams(t.search),u=new URLSearchParams;c.get("sidebar")==="cron"&&u.set("sidebar","cron");const d=c.get("projectID");d&&u.set("projectID",d);const h=u.toString();return h?`?${h}`:""});return re(()=>{const c=i.data.path.directory;if(!c||c===e.directory)return;const u=`/cron/worktree/${s()}`;if(t.pathname.startsWith(u)){n(`/cron/worktree/${dt(c)}${t.pathname.slice(u.length)}${t.search}${t.hash}`,{replace:!0});return}const d=t.pathname.slice(s().length+1);n(`/${dt(c)}${d}${t.search}${t.hash}`,{replace:!0})}),Xo(()=>r.id,c=>i.session.sync(c)),b(Bj,{get data(){return i.data},get directory(){return e.directory},onNavigateToSession:c=>n(`${a()}/session/${c}${l()}`),onSessionHref:c=>`${a()}/session/${c}${l()}`,bashInteractive:{kill:c=>o.client.global.bashInteractive.kill({callID:c.callID}).then(()=>{})},get children(){return b(nve,{get children(){return[b(cve,{}),je(()=>e.children)]}})}})}function tR(e){const t=ri(),n=At(),r=xo();let i="";const o=F(()=>t.dir?_r(t.dir)??"":"");return re(()=>{const s=t.dir;if(s){if(o()){i="";return}i!==s&&(i=s,$t({variant:"error",title:n.t("common.requestFailed"),description:n.t("directory.error.invalidUrl")}),r("/",{replace:!0}))}}),b(ce,{get when(){return o()},keyed:!0,children:s=>b(mhe,{directory:()=>s,get children(){return b(D0e,{get children(){return b(uve,{directory:s,get children(){return e.children}})}})}})})}var dve=ee("<div>");function fve(e){const[t,n]=se(e,["direction","edge","size","min","max","onResize","onCollapse","collapseThreshold","class","classList"]),r=i=>{i.preventDefault();const o=t.edge??(t.direction==="vertical"?"start":"end"),s=t.direction==="horizontal"?i.clientX:i.clientY,a=t.size;let l=a;document.body.style.userSelect="none",document.body.style.overflow="hidden";const c=d=>{const h=t.direction==="horizontal"?d.clientX:d.clientY,f=t.direction==="vertical"?o==="end"?h-s:s-h:o==="start"?s-h:h-s;l=a+f;const m=Math.min(t.max,Math.max(t.min,l));t.onResize(m)},u=()=>{document.body.style.userSelect="",document.body.style.overflow="",document.removeEventListener("mousemove",c),document.removeEventListener("mouseup",u);const d=t.collapseThreshold??0;t.onCollapse&&d>0&&l<d&&t.onCollapse()};document.addEventListener("mousemove",c),document.addEventListener("mouseup",u)};return(()=>{var i=dve();return jr(i,ne(n,{"data-component":"resize-handle",get"data-direction"(){return t.direction},get"data-edge"(){return t.edge??(t.direction==="vertical"?"start":"end")},get classList(){return{...t.classList,[t.class??""]:!!t.class}},onMouseDown:r}),!1,!1),i})()}var hve=new Set(["Avst","Arab","Armi","Syrc","Samr","Mand","Thaa","Mend","Nkoo","Adlm","Rohg","Hebr"]),mve=new Set(["ae","ar","arc","bcc","bqi","ckb","dv","fa","glk","he","ku","mzn","nqo","pnb","ps","sd","ug","ur","yi"]);function pve(e){if(Intl.Locale){const n=new Intl.Locale(e).maximize().script??"";return hve.has(n)}const t=e.split("-")[0];return mve.has(t)}function gve(e){return pve(e)?"rtl":"ltr"}function nR(){let e=typeof navigator<"u"&&(navigator.language||navigator.userLanguage)||"en-US";try{Intl.DateTimeFormat.supportedLocalesOf([e])}catch{e="en-US"}return{locale:e,direction:gve(e)}}var I2=nR(),yd=new Set;function jS(){I2=nR();for(const e of yd)e(I2)}function vve(){const[e,t]=de(I2),n=F(()=>e());return Kt(()=>{yd.size===0&&window.addEventListener("languagechange",jS),yd.add(t),fe(()=>{yd.delete(t),yd.size===0&&window.removeEventListener("languagechange",jS)})}),{locale:()=>n().locale,direction:()=>n().direction}}var yve=pt();function Co(){const e=vve();return ut(yve)||e}var ry=new Map;function rR(e){const{locale:t}=Co(),n=F(()=>t()+(e?Object.entries(e).sort((r,i)=>r[0]<i[0]?-1:1).join():""));return F(()=>{const r=n();let i;return ry.has(r)&&(i=ry.get(r)),i||(i=new Intl.Collator(t(),e),ry.set(r,i)),i})}const bve=["top","right","bottom","left"],wa=Math.min,di=Math.max,Jm=Math.round,p0=Math.floor,Go=e=>({x:e,y:e}),wve={left:"right",right:"left",bottom:"top",top:"bottom"};function T2(e,t,n){return di(e,wa(t,n))}function Ul(e,t){return typeof e=="function"?e(t):e}function ka(e){return e.split("-")[0]}function ku(e){return e.split("-")[1]}function iR(e){return e==="x"?"y":"x"}function hk(e){return e==="y"?"height":"width"}function xs(e){const t=e[0];return t==="t"||t==="b"?"y":"x"}function mk(e){return iR(xs(e))}function kve(e,t,n){n===void 0&&(n=!1);const r=ku(e),i=mk(e),o=hk(i);let s=i==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[o]>t.floating[o]&&(s=Qm(s)),[s,Qm(s)]}function xve(e){const t=Qm(e);return[E2(e),t,E2(t)]}function E2(e){return e.includes("start")?e.replace("start","end"):e.replace("end","start")}const FS=["left","right"],US=["right","left"],Sve=["top","bottom"],_ve=["bottom","top"];function Cve(e,t,n){switch(e){case"top":case"bottom":return n?t?US:FS:t?FS:US;case"left":case"right":return t?Sve:_ve;default:return[]}}function Ive(e,t,n,r){const i=ku(e);let o=Cve(ka(e),n==="start",r);return i&&(o=o.map(s=>s+"-"+i),t&&(o=o.concat(o.map(E2)))),o}function Qm(e){const t=ka(e);return wve[t]+e.slice(t.length)}function Tve(e){return{top:0,right:0,bottom:0,left:0,...e}}function oR(e){return typeof e!="number"?Tve(e):{top:e,right:e,bottom:e,left:e}}function ep(e){const{x:t,y:n,width:r,height:i}=e;return{width:r,height:i,top:n,left:t,right:t+r,bottom:n+i,x:t,y:n}}function HS(e,t,n){let{reference:r,floating:i}=e;const o=xs(t),s=mk(t),a=hk(s),l=ka(t),c=o==="y",u=r.x+r.width/2-i.width/2,d=r.y+r.height/2-i.height/2,h=r[a]/2-i[a]/2;let f;switch(l){case"top":f={x:u,y:r.y-i.height};break;case"bottom":f={x:u,y:r.y+r.height};break;case"right":f={x:r.x+r.width,y:d};break;case"left":f={x:r.x-i.width,y:d};break;default:f={x:r.x,y:r.y}}switch(ku(t)){case"start":f[s]-=h*(n&&c?-1:1);break;case"end":f[s]+=h*(n&&c?-1:1);break}return f}async function Eve(e,t){var n;t===void 0&&(t={});const{x:r,y:i,platform:o,rects:s,elements:a,strategy:l}=e,{boundary:c="clippingAncestors",rootBoundary:u="viewport",elementContext:d="floating",altBoundary:h=!1,padding:f=0}=Ul(t,e),m=oR(f),g=a[h?d==="floating"?"reference":"floating":d],v=ep(await o.getClippingRect({element:(n=await(o.isElement==null?void 0:o.isElement(g)))==null||n?g:g.contextElement||await(o.getDocumentElement==null?void 0:o.getDocumentElement(a.floating)),boundary:c,rootBoundary:u,strategy:l})),y=d==="floating"?{x:r,y:i,width:s.floating.width,height:s.floating.height}:s.reference,w=await(o.getOffsetParent==null?void 0:o.getOffsetParent(a.floating)),k=await(o.isElement==null?void 0:o.isElement(w))?await(o.getScale==null?void 0:o.getScale(w))||{x:1,y:1}:{x:1,y:1},x=ep(o.convertOffsetParentRelativeRectToViewportRelativeRect?await o.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:y,offsetParent:w,strategy:l}):y);return{top:(v.top-x.top+m.top)/k.y,bottom:(x.bottom-v.bottom+m.bottom)/k.y,left:(v.left-x.left+m.left)/k.x,right:(x.right-v.right+m.right)/k.x}}const $ve=50,Ave=async(e,t,n)=>{const{placement:r="bottom",strategy:i="absolute",middleware:o=[],platform:s}=n,a=s.detectOverflow?s:{...s,detectOverflow:Eve},l=await(s.isRTL==null?void 0:s.isRTL(t));let c=await s.getElementRects({reference:e,floating:t,strategy:i}),{x:u,y:d}=HS(c,r,l),h=r,f=0;const m={};for(let p=0;p<o.length;p++){const g=o[p];if(!g)continue;const{name:v,fn:y}=g,{x:w,y:k,data:x,reset:C}=await y({x:u,y:d,initialPlacement:r,placement:h,strategy:i,middlewareData:m,rects:c,platform:a,elements:{reference:e,floating:t}});u=w??u,d=k??d,m[v]={...m[v],...x},C&&f<$ve&&(f++,typeof C=="object"&&(C.placement&&(h=C.placement),C.rects&&(c=C.rects===!0?await s.getElementRects({reference:e,floating:t,strategy:i}):C.rects),{x:u,y:d}=HS(c,h,l)),p=-1)}return{x:u,y:d,placement:h,strategy:i,middlewareData:m}},Lve=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:i,rects:o,platform:s,elements:a,middlewareData:l}=t,{element:c,padding:u=0}=Ul(e,t)||{};if(c==null)return{};const d=oR(u),h={x:n,y:r},f=mk(i),m=hk(f),p=await s.getDimensions(c),g=f==="y",v=g?"top":"left",y=g?"bottom":"right",w=g?"clientHeight":"clientWidth",k=o.reference[m]+o.reference[f]-h[f]-o.floating[m],x=h[f]-o.reference[f],C=await(s.getOffsetParent==null?void 0:s.getOffsetParent(c));let S=C?C[w]:0;(!S||!await(s.isElement==null?void 0:s.isElement(C)))&&(S=a.floating[w]||o.floating[m]);const $=k/2-x/2,O=S/2-p[m]/2-1,D=wa(d[v],O),M=wa(d[y],O),I=D,L=S-p[m]-M,A=S/2-p[m]/2+$,T=T2(I,A,L),N=!l.arrow&&ku(i)!=null&&A!==T&&o.reference[m]/2-(A<I?D:M)-p[m]/2<0,W=N?A<I?A-I:A-L:0;return{[f]:h[f]+W,data:{[f]:T,centerOffset:A-T-W,...N&&{alignmentOffset:W}},reset:N}}}),Dve=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:i,middlewareData:o,rects:s,initialPlacement:a,platform:l,elements:c}=t,{mainAxis:u=!0,crossAxis:d=!0,fallbackPlacements:h,fallbackStrategy:f="bestFit",fallbackAxisSideDirection:m="none",flipAlignment:p=!0,...g}=Ul(e,t);if((n=o.arrow)!=null&&n.alignmentOffset)return{};const v=ka(i),y=xs(a),w=ka(a)===a,k=await(l.isRTL==null?void 0:l.isRTL(c.floating)),x=h||(w||!p?[Qm(a)]:xve(a)),C=m!=="none";!h&&C&&x.push(...Ive(a,p,m,k));const S=[a,...x],$=await l.detectOverflow(t,g),O=[];let D=((r=o.flip)==null?void 0:r.overflows)||[];if(u&&O.push($[v]),d){const A=kve(i,s,k);O.push($[A[0]],$[A[1]])}if(D=[...D,{placement:i,overflows:O}],!O.every(A=>A<=0)){var M,I;const A=(((M=o.flip)==null?void 0:M.index)||0)+1,T=S[A];if(T&&(!(d==="alignment"?y!==xs(T):!1)||D.every(K=>xs(K.placement)===y?K.overflows[0]>0:!0)))return{data:{index:A,overflows:D},reset:{placement:T}};let N=(I=D.filter(W=>W.overflows[0]<=0).sort((W,K)=>W.overflows[1]-K.overflows[1])[0])==null?void 0:I.placement;if(!N)switch(f){case"bestFit":{var L;const W=(L=D.filter(K=>{if(C){const V=xs(K.placement);return V===y||V==="y"}return!0}).map(K=>[K.placement,K.overflows.filter(V=>V>0).reduce((V,q)=>V+q,0)]).sort((K,V)=>K[1]-V[1])[0])==null?void 0:L[0];W&&(N=W);break}case"initialPlacement":N=a;break}if(i!==N)return{reset:{placement:N}}}return{}}}};function BS(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function VS(e){return bve.some(t=>e[t]>=0)}const Mve=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n,platform:r}=t,{strategy:i="referenceHidden",...o}=Ul(e,t);switch(i){case"referenceHidden":{const s=await r.detectOverflow(t,{...o,elementContext:"reference"}),a=BS(s,n.reference);return{data:{referenceHiddenOffsets:a,referenceHidden:VS(a)}}}case"escaped":{const s=await r.detectOverflow(t,{...o,altBoundary:!0}),a=BS(s,n.floating);return{data:{escapedOffsets:a,escaped:VS(a)}}}default:return{}}}}},Ove=new Set(["left","top"]);async function Pve(e,t){const{placement:n,platform:r,elements:i}=e,o=await(r.isRTL==null?void 0:r.isRTL(i.floating)),s=ka(n),a=ku(n),l=xs(n)==="y",c=Ove.has(s)?-1:1,u=o&&l?-1:1,d=Ul(t,e);let{mainAxis:h,crossAxis:f,alignmentAxis:m}=typeof d=="number"?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return a&&typeof m=="number"&&(f=a==="end"?m*-1:m),l?{x:f*u,y:h*c}:{x:h*c,y:f*u}}const Rve=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:i,y:o,placement:s,middlewareData:a}=t,l=await Pve(t,e);return s===((n=a.offset)==null?void 0:n.placement)&&(r=a.arrow)!=null&&r.alignmentOffset?{}:{x:i+l.x,y:o+l.y,data:{...l,placement:s}}}}},Nve=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:i,platform:o}=t,{mainAxis:s=!0,crossAxis:a=!1,limiter:l={fn:v=>{let{x:y,y:w}=v;return{x:y,y:w}}},...c}=Ul(e,t),u={x:n,y:r},d=await o.detectOverflow(t,c),h=xs(ka(i)),f=iR(h);let m=u[f],p=u[h];if(s){const v=f==="y"?"top":"left",y=f==="y"?"bottom":"right",w=m+d[v],k=m-d[y];m=T2(w,m,k)}if(a){const v=h==="y"?"top":"left",y=h==="y"?"bottom":"right",w=p+d[v],k=p-d[y];p=T2(w,p,k)}const g=l.fn({...t,[f]:m,[h]:p});return{...g,data:{x:g.x-n,y:g.y-r,enabled:{[f]:s,[h]:a}}}}}},zve=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,r;const{placement:i,rects:o,platform:s,elements:a}=t,{apply:l=()=>{},...c}=Ul(e,t),u=await s.detectOverflow(t,c),d=ka(i),h=ku(i),f=xs(i)==="y",{width:m,height:p}=o.floating;let g,v;d==="top"||d==="bottom"?(g=d,v=h===(await(s.isRTL==null?void 0:s.isRTL(a.floating))?"start":"end")?"left":"right"):(v=d,g=h==="end"?"top":"bottom");const y=p-u.top-u.bottom,w=m-u.left-u.right,k=wa(p-u[g],y),x=wa(m-u[v],w),C=!t.middlewareData.shift;let S=k,$=x;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&($=w),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(S=y),C&&!h){const D=di(u.left,0),M=di(u.right,0),I=di(u.top,0),L=di(u.bottom,0);f?$=m-2*(D!==0||M!==0?D+M:di(u.left,u.right)):S=p-2*(I!==0||L!==0?I+L:di(u.top,u.bottom))}await l({...t,availableWidth:$,availableHeight:S});const O=await s.getDimensions(a.floating);return m!==O.width||p!==O.height?{reset:{rects:!0}}:{}}}};function wg(){return typeof window<"u"}function xu(e){return sR(e)?(e.nodeName||"").toLowerCase():"#document"}function yi(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function rs(e){var t;return(t=(sR(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function sR(e){return wg()?e instanceof Node||e instanceof yi(e).Node:!1}function bo(e){return wg()?e instanceof Element||e instanceof yi(e).Element:!1}function js(e){return wg()?e instanceof HTMLElement||e instanceof yi(e).HTMLElement:!1}function qS(e){return!wg()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof yi(e).ShadowRoot}function Jf(e){const{overflow:t,overflowX:n,overflowY:r,display:i}=wo(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&i!=="inline"&&i!=="contents"}function jve(e){return/^(table|td|th)$/.test(xu(e))}function kg(e){try{if(e.matches(":popover-open"))return!0}catch{}try{return e.matches(":modal")}catch{return!1}}const Fve=/transform|translate|scale|rotate|perspective|filter/,Uve=/paint|layout|strict|content/,Ha=e=>!!e&&e!=="none";let iy;function pk(e){const t=bo(e)?wo(e):e;return Ha(t.transform)||Ha(t.translate)||Ha(t.scale)||Ha(t.rotate)||Ha(t.perspective)||!gk()&&(Ha(t.backdropFilter)||Ha(t.filter))||Fve.test(t.willChange||"")||Uve.test(t.contain||"")}function Hve(e){let t=xa(e);for(;js(t)&&!Jc(t);){if(pk(t))return t;if(kg(t))return null;t=xa(t)}return null}function gk(){return iy==null&&(iy=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),iy}function Jc(e){return/^(html|body|#document)$/.test(xu(e))}function wo(e){return yi(e).getComputedStyle(e)}function xg(e){return bo(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function xa(e){if(xu(e)==="html")return e;const t=e.assignedSlot||e.parentNode||qS(e)&&e.host||rs(e);return qS(t)?t.host:t}function aR(e){const t=xa(e);return Jc(t)?e.ownerDocument?e.ownerDocument.body:e.body:js(t)&&Jf(t)?t:aR(t)}function pf(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const i=aR(e),o=i===((r=e.ownerDocument)==null?void 0:r.body),s=yi(i);if(o){const a=$2(s);return t.concat(s,s.visualViewport||[],Jf(i)?i:[],a&&n?pf(a):[])}else return t.concat(i,pf(i,[],n))}function $2(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function lR(e){const t=wo(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const i=js(e),o=i?e.offsetWidth:n,s=i?e.offsetHeight:r,a=Jm(n)!==o||Jm(r)!==s;return a&&(n=o,r=s),{width:n,height:r,$:a}}function vk(e){return bo(e)?e:e.contextElement}function Pc(e){const t=vk(e);if(!js(t))return Go(1);const n=t.getBoundingClientRect(),{width:r,height:i,$:o}=lR(t);let s=(o?Jm(n.width):n.width)/r,a=(o?Jm(n.height):n.height)/i;return(!s||!Number.isFinite(s))&&(s=1),(!a||!Number.isFinite(a))&&(a=1),{x:s,y:a}}const Bve=Go(0);function cR(e){const t=yi(e);return!gk()||!t.visualViewport?Bve:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function Vve(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==yi(e)?!1:t}function _l(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const i=e.getBoundingClientRect(),o=vk(e);let s=Go(1);t&&(r?bo(r)&&(s=Pc(r)):s=Pc(e));const a=Vve(o,n,r)?cR(o):Go(0);let l=(i.left+a.x)/s.x,c=(i.top+a.y)/s.y,u=i.width/s.x,d=i.height/s.y;if(o){const h=yi(o),f=r&&bo(r)?yi(r):r;let m=h,p=$2(m);for(;p&&r&&f!==m;){const g=Pc(p),v=p.getBoundingClientRect(),y=wo(p),w=v.left+(p.clientLeft+parseFloat(y.paddingLeft))*g.x,k=v.top+(p.clientTop+parseFloat(y.paddingTop))*g.y;l*=g.x,c*=g.y,u*=g.x,d*=g.y,l+=w,c+=k,m=yi(p),p=$2(m)}}return ep({width:u,height:d,x:l,y:c})}function Sg(e,t){const n=xg(e).scrollLeft;return t?t.left+n:_l(rs(e)).left+n}function uR(e,t){const n=e.getBoundingClientRect(),r=n.left+t.scrollLeft-Sg(e,n),i=n.top+t.scrollTop;return{x:r,y:i}}function qve(e){let{elements:t,rect:n,offsetParent:r,strategy:i}=e;const o=i==="fixed",s=rs(r),a=t?kg(t.floating):!1;if(r===s||a&&o)return n;let l={scrollLeft:0,scrollTop:0},c=Go(1);const u=Go(0),d=js(r);if((d||!d&&!o)&&((xu(r)!=="body"||Jf(s))&&(l=xg(r)),d)){const f=_l(r);c=Pc(r),u.x=f.x+r.clientLeft,u.y=f.y+r.clientTop}const h=s&&!d&&!o?uR(s,l):Go(0);return{width:n.width*c.x,height:n.height*c.y,x:n.x*c.x-l.scrollLeft*c.x+u.x+h.x,y:n.y*c.y-l.scrollTop*c.y+u.y+h.y}}function Wve(e){return Array.from(e.getClientRects())}function Gve(e){const t=rs(e),n=xg(e),r=e.ownerDocument.body,i=di(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),o=di(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let s=-n.scrollLeft+Sg(e);const a=-n.scrollTop;return wo(r).direction==="rtl"&&(s+=di(t.clientWidth,r.clientWidth)-i),{width:i,height:o,x:s,y:a}}const WS=25;function Kve(e,t){const n=yi(e),r=rs(e),i=n.visualViewport;let o=r.clientWidth,s=r.clientHeight,a=0,l=0;if(i){o=i.width,s=i.height;const u=gk();(!u||u&&t==="fixed")&&(a=i.offsetLeft,l=i.offsetTop)}const c=Sg(r);if(c<=0){const u=r.ownerDocument,d=u.body,h=getComputedStyle(d),f=u.compatMode==="CSS1Compat"&&parseFloat(h.marginLeft)+parseFloat(h.marginRight)||0,m=Math.abs(r.clientWidth-d.clientWidth-f);m<=WS&&(o-=m)}else c<=WS&&(o+=c);return{width:o,height:s,x:a,y:l}}function Zve(e,t){const n=_l(e,!0,t==="fixed"),r=n.top+e.clientTop,i=n.left+e.clientLeft,o=js(e)?Pc(e):Go(1),s=e.clientWidth*o.x,a=e.clientHeight*o.y,l=i*o.x,c=r*o.y;return{width:s,height:a,x:l,y:c}}function GS(e,t,n){let r;if(t==="viewport")r=Kve(e,n);else if(t==="document")r=Gve(rs(e));else if(bo(t))r=Zve(t,n);else{const i=cR(e);r={x:t.x-i.x,y:t.y-i.y,width:t.width,height:t.height}}return ep(r)}function dR(e,t){const n=xa(e);return n===t||!bo(n)||Jc(n)?!1:wo(n).position==="fixed"||dR(n,t)}function Yve(e,t){const n=t.get(e);if(n)return n;let r=pf(e,[],!1).filter(a=>bo(a)&&xu(a)!=="body"),i=null;const o=wo(e).position==="fixed";let s=o?xa(e):e;for(;bo(s)&&!Jc(s);){const a=wo(s),l=pk(s);!l&&a.position==="fixed"&&(i=null),(o?!l&&!i:!l&&a.position==="static"&&!!i&&(i.position==="absolute"||i.position==="fixed")||Jf(s)&&!l&&dR(e,s))?r=r.filter(u=>u!==s):i=a,s=xa(s)}return t.set(e,r),r}function Xve(e){let{element:t,boundary:n,rootBoundary:r,strategy:i}=e;const s=[...n==="clippingAncestors"?kg(t)?[]:Yve(t,this._c):[].concat(n),r],a=GS(t,s[0],i);let l=a.top,c=a.right,u=a.bottom,d=a.left;for(let h=1;h<s.length;h++){const f=GS(t,s[h],i);l=di(f.top,l),c=wa(f.right,c),u=wa(f.bottom,u),d=di(f.left,d)}return{width:c-d,height:u-l,x:d,y:l}}function Jve(e){const{width:t,height:n}=lR(e);return{width:t,height:n}}function Qve(e,t,n){const r=js(t),i=rs(t),o=n==="fixed",s=_l(e,!0,o,t);let a={scrollLeft:0,scrollTop:0};const l=Go(0);function c(){l.x=Sg(i)}if(r||!r&&!o)if((xu(t)!=="body"||Jf(i))&&(a=xg(t)),r){const f=_l(t,!0,o,t);l.x=f.x+t.clientLeft,l.y=f.y+t.clientTop}else i&&c();o&&!r&&i&&c();const u=i&&!r&&!o?uR(i,a):Go(0),d=s.left+a.scrollLeft-l.x-u.x,h=s.top+a.scrollTop-l.y-u.y;return{x:d,y:h,width:s.width,height:s.height}}function oy(e){return wo(e).position==="static"}function KS(e,t){if(!js(e)||wo(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return rs(e)===n&&(n=n.ownerDocument.body),n}function fR(e,t){const n=yi(e);if(kg(e))return n;if(!js(e)){let i=xa(e);for(;i&&!Jc(i);){if(bo(i)&&!oy(i))return i;i=xa(i)}return n}let r=KS(e,t);for(;r&&jve(r)&&oy(r);)r=KS(r,t);return r&&Jc(r)&&oy(r)&&!pk(r)?n:r||Hve(e)||n}const eye=async function(e){const t=this.getOffsetParent||fR,n=this.getDimensions,r=await n(e.floating);return{reference:Qve(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function tye(e){return wo(e).direction==="rtl"}const hR={convertOffsetParentRelativeRectToViewportRelativeRect:qve,getDocumentElement:rs,getClippingRect:Xve,getOffsetParent:fR,getElementRects:eye,getClientRects:Wve,getDimensions:Jve,getScale:Pc,isElement:bo,isRTL:tye};function mR(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function nye(e,t){let n=null,r;const i=rs(e);function o(){var a;clearTimeout(r),(a=n)==null||a.disconnect(),n=null}function s(a,l){a===void 0&&(a=!1),l===void 0&&(l=1),o();const c=e.getBoundingClientRect(),{left:u,top:d,width:h,height:f}=c;if(a||t(),!h||!f)return;const m=p0(d),p=p0(i.clientWidth-(u+h)),g=p0(i.clientHeight-(d+f)),v=p0(u),w={rootMargin:-m+"px "+-p+"px "+-g+"px "+-v+"px",threshold:di(0,wa(1,l))||1};let k=!0;function x(C){const S=C[0].intersectionRatio;if(S!==l){if(!k)return s();S?s(!1,S):r=setTimeout(()=>{s(!1,1e-7)},1e3)}S===1&&!mR(c,e.getBoundingClientRect())&&s(),k=!1}try{n=new IntersectionObserver(x,{...w,root:i.ownerDocument})}catch{n=new IntersectionObserver(x,w)}n.observe(e)}return s(!0),o}function rye(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:i=!0,ancestorResize:o=!0,elementResize:s=typeof ResizeObserver=="function",layoutShift:a=typeof IntersectionObserver=="function",animationFrame:l=!1}=r,c=vk(e),u=i||o?[...c?pf(c):[],...t?pf(t):[]]:[];u.forEach(v=>{i&&v.addEventListener("scroll",n,{passive:!0}),o&&v.addEventListener("resize",n)});const d=c&&a?nye(c,n):null;let h=-1,f=null;s&&(f=new ResizeObserver(v=>{let[y]=v;y&&y.target===c&&f&&t&&(f.unobserve(t),cancelAnimationFrame(h),h=requestAnimationFrame(()=>{var w;(w=f)==null||w.observe(t)})),n()}),c&&!l&&f.observe(c),t&&f.observe(t));let m,p=l?_l(e):null;l&&g();function g(){const v=_l(e);p&&!mR(p,v)&&n(),p=v,m=requestAnimationFrame(g)}return n(),()=>{var v;u.forEach(y=>{i&&y.removeEventListener("scroll",n),o&&y.removeEventListener("resize",n)}),d?.(),(v=f)==null||v.disconnect(),f=null,l&&cancelAnimationFrame(m)}}const iye=Rve,oye=Nve,sye=Dve,aye=zve,lye=Mve,cye=Lve,uye=(e,t,n)=>{const r=new Map,i={platform:hR,...n},o={...i.platform,_c:r};return Ave(e,t,{...i,platform:o})};var dye=ee('<svg display=block viewBox="0 0 30 30"style=transform:scale(1.02)><g><path fill=none d=M23,27.8c1.1,1.2,3.4,2.2,5,2.2h2H0h2c1.7,0,3.9-1,5-2.2l6.6-7.2c0.7-0.8,2-0.8,2.7,0L23,27.8L23,27.8z></path><path stroke=none d=M23,27.8c1.1,1.2,3.4,2.2,5,2.2h2H0h2c1.7,0,3.9-1,5-2.2l6.6-7.2c0.7-0.8,2-0.8,2.7,0L23,27.8L23,27.8z>'),yk=pt();function bk(){const e=ut(yk);if(e===void 0)throw new Error("[kobalte]: `usePopperContext` must be used within a `Popper` component");return e}var A2=30,ZS=A2/2,fye={top:180,right:-90,bottom:0,left:90};function xi(e){const t=bk(),n=Ne({size:A2},e),[r,i]=se(n,["ref","style","size"]),o=()=>t.currentPlacement().split("-")[0],s=hye(t.contentRef),a=()=>s()?.getPropertyValue("background-color")||"none",l=()=>s()?.getPropertyValue(`border-${o()}-color`)||"none",c=()=>s()?.getPropertyValue(`border-${o()}-width`)||"0px",u=()=>Number.parseInt(c())*2*(A2/r.size),d=()=>`rotate(${fye[o()]} ${ZS} ${ZS}) translate(0 2)`;return b(Ve,ne({as:"div",ref(h){var f=st(t.setArrowRef,r.ref);typeof f=="function"&&f(h)},"aria-hidden":"true",get style(){return gr({position:"absolute","font-size":`${r.size}px`,width:"1em",height:"1em","pointer-events":"none",fill:a(),stroke:l(),"stroke-width":u()},r.style)}},i,{get children(){var h=dye(),f=h.firstChild,m=f.firstChild;return m.nextSibling,De(()=>Ye(f,"transform",d())),h}}))}function hye(e){const[t,n]=de();return re(()=>{const r=e();r&&n(N2(r).getComputedStyle(r))}),t}function mye(e){const t=bk(),[n,r]=se(e,["ref","style"]);return b(Ve,ne({as:"div",ref(i){var o=st(t.setPositionerRef,n.ref);typeof o=="function"&&o(i)},"data-popper-positioner":"",get style(){return gr({position:"absolute",top:0,left:0,"min-width":"max-content"},n.style)}},r))}function YS(e){const{x:t=0,y:n=0,width:r=0,height:i=0}=e??{};if(typeof DOMRect=="function")return new DOMRect(t,n,r,i);const o={x:t,y:n,width:r,height:i,top:n,right:t+r,bottom:n+i,left:t};return{...o,toJSON:()=>o}}function pye(e,t){return{contextElement:e,getBoundingClientRect:()=>{const r=t(e);return r?YS(r):e?e.getBoundingClientRect():YS()}}}function gye(e){return/^(?:top|bottom|left|right)(?:-(?:start|end))?$/.test(e)}var vye={top:"bottom",right:"left",bottom:"top",left:"right"};function yye(e,t){const[n,r]=e.split("-"),i=vye[n];return r?n==="left"||n==="right"?`${i} ${r==="start"?"top":"bottom"}`:r==="start"?`${i} ${t==="rtl"?"right":"left"}`:`${i} ${t==="rtl"?"left":"right"}`:`${i} center`}function bye(e){const t=Ne({getAnchorRect:h=>h?.getBoundingClientRect(),placement:"bottom",gutter:0,shift:0,flip:!0,slide:!0,overlap:!1,sameWidth:!1,fitViewport:!1,hideWhenDetached:!1,detachedPadding:0,arrowPadding:4,overflowPadding:8},e),[n,r]=de(),[i,o]=de(),[s,a]=de(t.placement),l=()=>pye(t.anchorRef?.(),t.getAnchorRect),{direction:c}=Co();async function u(){const h=l(),f=n(),m=i();if(!h||!f)return;const p=(m?.clientHeight||0)/2,g=typeof t.gutter=="number"?t.gutter+p:t.gutter??p;f.style.setProperty("--kb-popper-content-overflow-padding",`${t.overflowPadding}px`),h.getBoundingClientRect();const v=[iye(({placement:C})=>{const S=!!C.split("-")[1];return{mainAxis:g,crossAxis:S?void 0:t.shift,alignmentAxis:t.shift}})];if(t.flip!==!1){const C=typeof t.flip=="string"?t.flip.split(" "):void 0;if(C!==void 0&&!C.every(gye))throw new Error("`flip` expects a spaced-delimited list of placements");v.push(sye({padding:t.overflowPadding,fallbackPlacements:C}))}(t.slide||t.overlap)&&v.push(oye({mainAxis:t.slide,crossAxis:t.overlap,padding:t.overflowPadding})),v.push(aye({padding:t.overflowPadding,apply({availableWidth:C,availableHeight:S,rects:$}){const O=Math.round($.reference.width);C=Math.floor(C),S=Math.floor(S),f.style.setProperty("--kb-popper-anchor-width",`${O}px`),f.style.setProperty("--kb-popper-content-available-width",`${C}px`),f.style.setProperty("--kb-popper-content-available-height",`${S}px`),t.sameWidth&&(f.style.width=`${O}px`),t.fitViewport&&(f.style.maxWidth=`${C}px`,f.style.maxHeight=`${S}px`)}})),t.hideWhenDetached&&v.push(lye({padding:t.detachedPadding})),m&&v.push(cye({element:m,padding:t.arrowPadding}));const y=await uye(h,f,{placement:t.placement,strategy:"absolute",middleware:v,platform:{...hR,isRTL:()=>c()==="rtl"}});if(a(y.placement),t.onCurrentPlacementChange?.(y.placement),!f)return;f.style.setProperty("--kb-popper-content-transform-origin",yye(y.placement,c()));const w=Math.round(y.x),k=Math.round(y.y);let x;if(t.hideWhenDetached&&(x=y.middlewareData.hide?.referenceHidden?"hidden":"visible"),Object.assign(f.style,{top:"0",left:"0",transform:`translate3d(${w}px, ${k}px, 0)`,visibility:x}),m&&y.middlewareData.arrow){const{x:C,y:S}=y.middlewareData.arrow,$=y.placement.split("-")[0];Object.assign(m.style,{left:C!=null?`${C}px`:"",top:S!=null?`${S}px`:"",[$]:"100%"})}}re(()=>{const h=l(),f=n();if(!h||!f)return;const m=rye(h,f,u,{elementResize:typeof ResizeObserver=="function"});fe(m)}),re(()=>{const h=n(),f=t.contentRef?.();!h||!f||queueMicrotask(()=>{h.style.zIndex=getComputedStyle(f).zIndex})});const d={currentPlacement:s,contentRef:()=>t.contentRef?.(),setPositionerRef:r,setArrowRef:o};return b(yk.Provider,{value:d,get children(){return t.children}})}var is=Object.assign(bye,{Arrow:xi,Context:yk,usePopperContext:bk,Positioner:mye}),wye={};vr(wye,{Arrow:()=>xi,Content:()=>gR,Portal:()=>vR,Root:()=>yR,Tooltip:()=>bd,Trigger:()=>bR,useTooltipContext:()=>_g});var pR=pt();function _g(){const e=ut(pR);if(e===void 0)throw new Error("[kobalte]: `useTooltipContext` must be used within a `Tooltip` component");return e}function gR(e){const t=_g(),n=Ne({id:t.generateId("content")},e),[r,i]=se(n,["ref","style"]);return re(()=>fe(t.registerContentId(i.id))),b(ce,{get when(){return t.contentPresent()},get children(){return b(is.Positioner,{get children(){return b(eu,ne({ref(o){var s=st(a=>{t.setContentRef(a)},r.ref);typeof s=="function"&&s(o)},role:"tooltip",disableOutsidePointerEvents:!1,get style(){return gr({"--kb-tooltip-content-transform-origin":"var(--kb-popper-content-transform-origin)",position:"relative"},r.style)},onFocusOutside:o=>o.preventDefault(),onDismiss:()=>t.hideTooltip(!0)},()=>t.dataset(),i))}})}})}function vR(e){const t=_g();return b(ce,{get when(){return t.contentPresent()},get children(){return b(Os,e)}})}function kye(e,t,n){const r=e.split("-")[0],i=t.getBoundingClientRect(),o=n.getBoundingClientRect(),s=[],a=i.left+i.width/2,l=i.top+i.height/2;switch(r){case"top":s.push([i.left,l]),s.push([o.left,o.bottom]),s.push([o.left,o.top]),s.push([o.right,o.top]),s.push([o.right,o.bottom]),s.push([i.right,l]);break;case"right":s.push([a,i.top]),s.push([o.left,o.top]),s.push([o.right,o.top]),s.push([o.right,o.bottom]),s.push([o.left,o.bottom]),s.push([a,i.bottom]);break;case"bottom":s.push([i.left,l]),s.push([o.left,o.top]),s.push([o.left,o.bottom]),s.push([o.right,o.bottom]),s.push([o.right,o.top]),s.push([i.right,l]);break;case"left":s.push([a,i.top]),s.push([o.right,o.top]),s.push([o.left,o.top]),s.push([o.left,o.bottom]),s.push([o.right,o.bottom]),s.push([a,i.bottom]);break}return s}var Ba={},xye=0,lc=!1,fs,ed,cc;function yR(e){const t=`tooltip-${an()}`,n=`${++xye}`,r=Ne({id:t,openDelay:700,closeDelay:300,skipDelayDuration:300},e),[i,o]=se(r,["id","open","defaultOpen","onOpenChange","disabled","triggerOnFocusOnly","openDelay","closeDelay","skipDelayDuration","ignoreSafeArea","forceMount"]);let s;const[a,l]=de(),[c,u]=de(),[d,h]=de(),[f,m]=de(o.placement),p=Ps({open:()=>i.open,defaultOpen:()=>i.defaultOpen,onOpenChange:A=>i.onOpenChange?.(A)}),{present:g}=po({show:()=>i.forceMount||p.isOpen(),element:()=>d()??null}),v=()=>{Ba[n]=w},y=()=>{for(const A in Ba)A!==n&&(Ba[A](!0),delete Ba[A])},w=(A=!1)=>{A||i.closeDelay&&i.closeDelay<=0?(window.clearTimeout(s),s=void 0,p.close()):s||(s=window.setTimeout(()=>{s=void 0,p.close()},i.closeDelay)),window.clearTimeout(fs),fs=void 0,i.skipDelayDuration&&i.skipDelayDuration>=0&&(cc=window.setTimeout(()=>{window.clearTimeout(cc),cc=void 0},i.skipDelayDuration)),lc&&(window.clearTimeout(ed),ed=window.setTimeout(()=>{delete Ba[n],ed=void 0,lc=!1},i.closeDelay))},k=()=>{clearTimeout(s),s=void 0,y(),v(),lc=!0,p.open(),window.clearTimeout(fs),fs=void 0,window.clearTimeout(ed),ed=void 0,window.clearTimeout(cc),cc=void 0},x=()=>{y(),v(),!p.isOpen()&&!fs&&!lc?fs=window.setTimeout(()=>{fs=void 0,lc=!0,k()},i.openDelay):p.isOpen()||k()},C=(A=!1)=>{!A&&i.openDelay&&i.openDelay>0&&!s&&!cc?x():k()},S=()=>{window.clearTimeout(fs),fs=void 0,lc=!1},$=()=>{window.clearTimeout(s),s=void 0},O=A=>Dn(c(),A)||Dn(d(),A),D=A=>{const T=c(),N=d();if(!(!T||!N))return kye(A,T,N)},M=A=>{const T=A.target;if(O(T)){$();return}if(!i.ignoreSafeArea){const N=D(f());if(N&&U2(Q9(A),N)){$();return}}s||w()};re(()=>{if(!p.isOpen())return;const A=Fr();A.addEventListener("pointermove",M,!0),fe(()=>{A.removeEventListener("pointermove",M,!0)})}),re(()=>{const A=c();if(!A||!p.isOpen())return;const T=W=>{const K=W.target;Dn(K,A)&&w(!0)},N=N2();N.addEventListener("scroll",T,{capture:!0}),fe(()=>{N.removeEventListener("scroll",T,{capture:!0})})}),fe(()=>{clearTimeout(s),Ba[n]&&delete Ba[n]});const L={dataset:F(()=>({"data-expanded":p.isOpen()?"":void 0,"data-closed":p.isOpen()?void 0:""})),isOpen:p.isOpen,isDisabled:()=>i.disabled??!1,triggerOnFocusOnly:()=>i.triggerOnFocusOnly??!1,contentId:a,contentPresent:g,openTooltip:C,hideTooltip:w,cancelOpening:S,generateId:$r(()=>r.id),registerContentId:en(l),isTargetOnTooltip:O,setTriggerRef:u,setContentRef:h};return b(pR.Provider,{value:L,get children(){return b(is,ne({anchorRef:c,contentRef:d,onCurrentPlacementChange:m},o))}})}function bR(e){let t;const n=_g(),[r,i]=se(e,["ref","onPointerEnter","onPointerLeave","onPointerDown","onClick","onFocus","onBlur"]);let o=!1,s=!1,a=!1;const l=()=>{o=!1},c=()=>{!n.isOpen()&&(s||a)&&n.openTooltip(a)},u=v=>{n.isOpen()&&!s&&!a&&n.hideTooltip(v)},d=v=>{ze(v,r.onPointerEnter),!(v.pointerType==="touch"||n.triggerOnFocusOnly()||n.isDisabled()||v.defaultPrevented)&&(s=!0,c())},h=v=>{ze(v,r.onPointerLeave),v.pointerType!=="touch"&&(s=!1,a=!1,n.isOpen()?u():n.cancelOpening())},f=v=>{ze(v,r.onPointerDown),o=!0,Fr(t).addEventListener("pointerup",l,{once:!0})},m=v=>{ze(v,r.onClick),s=!1,a=!1,u(!0)},p=v=>{ze(v,r.onFocus),!(n.isDisabled()||v.defaultPrevented||o)&&(a=!0,c())},g=v=>{ze(v,r.onBlur);const y=v.relatedTarget;n.isTargetOnTooltip(y)||(s=!1,a=!1,u(!0))};return fe(()=>{Fr(t).removeEventListener("pointerup",l)}),b(Ve,ne({as:"button",ref(v){var y=st(w=>{n.setTriggerRef(w),t=w},r.ref);typeof y=="function"&&y(v)},get"aria-describedby"(){return je(()=>!!n.isOpen())()?n.contentId():void 0},onPointerEnter:d,onPointerLeave:h,onPointerDown:f,onClick:m,onFocus:p,onBlur:g},()=>n.dataset(),i))}var bd=Object.assign(yR,{Arrow:xi,Content:gR,Portal:vR,Trigger:bR}),Sye=ee("<div data-slot=tooltip-keybind><span></span><span data-slot=tooltip-keybind-key>");function XS(e){const[t,n]=se(e,["title","keybind"]);return b(bn,ne(n,{get value(){return(()=>{var r=Sye(),i=r.firstChild,o=i.nextSibling;return j(i,()=>t.title),j(o,()=>t.keybind),r})()}}))}function bn(e){let t;const[n,r]=Je({open:!1,block:!1,expand:!1}),[i,o]=se(e,["children","class","contentClass","contentStyle","inactive","forceOpen","ignoreSafeArea","value"]),s=()=>r("open",!1),a=()=>{const f=document.activeElement;return!t||!f?!1:t.contains(f)},l=(f=n.expand)=>{f||t?.matches(":hover")||a()||r("block",!1)},c=()=>{const f=!!t?.querySelector('[aria-expanded="true"], [data-expanded]');if(r("expand",f),f){r("block",!0),s();return}l(f)},u=()=>{r("block",!0),s()},d=()=>{a()||s(),l()};re(()=>{if(!t)return;c();const f=new MutationObserver(c);f.observe(t,{subtree:!0,childList:!0,attributes:!0,attributeFilter:["aria-expanded","data-expanded"]}),fe(()=>f.disconnect())});let h=!1;return b(Il,{get children(){return[b(Cn,{get when(){return i.inactive},get children(){return i.children}}),b(Cn,{when:!0,get children(){return b(bd,ne({gutter:4},o,{closeDelay:0,get ignoreSafeArea(){return i.ignoreSafeArea??!0},get open(){return i.forceOpen||n.open},onOpenChange:f=>{if(!i.forceOpen&&!(n.block&&f)){if(h){h=!1;return}r("open",f)}},get children(){return[b(bd.Trigger,{ref(f){var m=t;typeof m=="function"?m(f):t=f},as:"div","data-component":"tooltip-trigger",get class(){return i.class},onPointerDownCapture:u,onKeyDownCapture:f=>{f.key!=="Enter"&&f.key!==" "||u()},onPointerLeave:d,onFocusOut:()=>requestAnimationFrame(()=>l()),get children(){return i.children}}),b(bd.Portal,{get children(){return b(bd.Content,{"data-component":"tooltip",get"data-placement"(){return e.placement},get"data-force-open"(){return i.forceOpen},get class(){return i.contentClass},get style(){return i.contentStyle},onPointerDownOutside:f=>{(t===f.target||f.target instanceof Node&&t?.contains(f.target))&&(h=!0),f.preventDefault()},get children(){return i.value}})}})]}}))}})]}})}function wR(e){let t=e.startIndex??0;const n=e.startLevel??0,r=[],i=l=>{if(l==null)return"";const c=e.getKey??"key",u=fc(c)?l[c]:c(l);return u!=null?String(u):""},o=l=>{if(l==null)return"";const c=e.getTextValue??"textValue",u=fc(c)?l[c]:c(l);return u!=null?String(u):""},s=l=>{if(l==null)return!1;const c=e.getDisabled??"disabled";return(fc(c)?l[c]:c(l))??!1},a=l=>{if(l!=null)return fc(e.getSectionChildren)?l[e.getSectionChildren]:e.getSectionChildren?.(l)};for(const l of e.dataSource){if(fc(l)||iF(l)){r.push({type:"item",rawValue:l,key:String(l),textValue:String(l),disabled:s(l),level:n,index:t}),t++;continue}if(a(l)!=null){r.push({type:"section",rawValue:l,key:"",textValue:"",disabled:!1,level:n,index:t}),t++;const c=a(l)??[];if(c.length>0){const u=wR({dataSource:c,getKey:e.getKey,getTextValue:e.getTextValue,getDisabled:e.getDisabled,getSectionChildren:e.getSectionChildren,startIndex:t,startLevel:n+1});r.push(...u),t+=u.length}}else r.push({type:"item",rawValue:l,key:i(l),textValue:o(l),disabled:s(l),level:n,index:t}),t++}return r}function _ye(e,t=[]){return F(()=>{const n=wR({dataSource:he(e.dataSource),getKey:he(e.getKey),getTextValue:he(e.getTextValue),getDisabled:he(e.getDisabled),getSectionChildren:he(e.getSectionChildren)});for(let r=0;r<t.length;r++)t[r]();return e.factory(n)})}var No=class kR extends Set{anchorKey;currentKey;constructor(t,n,r){super(t),t instanceof kR?(this.anchorKey=n||t.anchorKey,this.currentKey=r||t.currentKey):(this.anchorKey=n,this.currentKey=r)}};function Cye(e){const[t,n]=El(e);return[()=>t()??new No,n]}function xR(e){return cF()?e.altKey:e.ctrlKey}function wc(e){return xf()?e.metaKey:e.ctrlKey}function JS(e){return new No(e)}function SR(e,t){if(e.size!==t.size)return!1;for(const n of e)if(!t.has(n))return!1;return!0}function Iye(e){const t=Ne({selectionMode:"none",selectionBehavior:"toggle"},e),[n,r]=de(!1),[i,o]=de(),s=F(()=>{const p=he(t.selectedKeys);return p!=null?JS(p):p}),a=F(()=>{const p=he(t.defaultSelectedKeys);return p!=null?JS(p):new No}),[l,c]=Cye({value:s,defaultValue:a,onChange:p=>t.onSelectionChange?.(p)}),[u,d]=de(he(t.selectionBehavior)),h=()=>he(t.selectionMode),f=()=>he(t.disallowEmptySelection)??!1,m=p=>{(he(t.allowDuplicateSelectionEvents)||!SR(p,l()))&&c(p)};return re(()=>{const p=l();he(t.selectionBehavior)==="replace"&&u()==="toggle"&&typeof p=="object"&&p.size===0&&d("replace")}),re(()=>{d(he(t.selectionBehavior)??"toggle")}),{selectionMode:h,disallowEmptySelection:f,selectionBehavior:u,setSelectionBehavior:d,isFocused:n,setFocused:r,focusedKey:i,setFocusedKey:o,selectedKeys:l,setSelectedKeys:m}}function _R(e){const[t,n]=de(""),[r,i]=de(-1);return{typeSelectHandlers:{onKeyDown:s=>{if(he(e.isDisabled))return;const a=he(e.keyboardDelegate),l=he(e.selectionManager);if(!a.getKeyForSearch)return;const c=Tye(s.key);if(!c||s.ctrlKey||s.metaKey)return;c===" "&&t().trim().length>0&&(s.preventDefault(),s.stopPropagation());let u=n(h=>h+c),d=a.getKeyForSearch(u,l.focusedKey())??a.getKeyForSearch(u);d==null&&Eye(u)&&(u=u[0],d=a.getKeyForSearch(u,l.focusedKey())??a.getKeyForSearch(u)),d!=null&&(l.setFocusedKey(d),e.onTypeSelect?.(d)),clearTimeout(r()),i(window.setTimeout(()=>n(""),500))}}}}function Tye(e){return e.length===1||!/^[A-Z]/i.test(e)?e:""}function Eye(e){return e.split("").every(t=>t===e[0])}function CR(e,t,n){const i=ne({selectOnFocus:()=>he(e.selectionManager).selectionBehavior()==="replace"},e),o=()=>n?.()??t(),{direction:s}=Co();let a={top:0,left:0};Yj(()=>he(i.isVirtualized)?void 0:o(),"scroll",()=>{const g=o();g&&(a={top:g.scrollTop,left:g.scrollLeft})});const{typeSelectHandlers:l}=_R({isDisabled:()=>he(i.disallowTypeAhead),keyboardDelegate:()=>he(i.keyboardDelegate),selectionManager:()=>he(i.selectionManager)}),c=()=>he(i.orientation)??"vertical",u=g=>{ze(g,l.onKeyDown),g.altKey&&g.key==="Tab"&&g.preventDefault();const v=t();if(!v?.contains(g.target))return;const y=he(i.selectionManager),w=he(i.selectOnFocus),k=$=>{$!=null&&(y.setFocusedKey($),g.shiftKey&&y.selectionMode()==="multiple"?y.extendSelection($):w&&!xR(g)&&y.replaceSelection($))},x=he(i.keyboardDelegate),C=he(i.shouldFocusWrap),S=y.focusedKey();switch(g.key){case(c()==="vertical"?"ArrowDown":"ArrowRight"):{if(x.getKeyBelow){g.preventDefault();let $;S!=null?$=x.getKeyBelow(S):$=x.getFirstKey?.(),$==null&&C&&($=x.getFirstKey?.(S)),k($)}break}case(c()==="vertical"?"ArrowUp":"ArrowLeft"):{if(x.getKeyAbove){g.preventDefault();let $;S!=null?$=x.getKeyAbove(S):$=x.getLastKey?.(),$==null&&C&&($=x.getLastKey?.(S)),k($)}break}case(c()==="vertical"?"ArrowLeft":"ArrowUp"):{if(x.getKeyLeftOf){g.preventDefault();const $=s()==="rtl";let O;S!=null?O=x.getKeyLeftOf(S):O=$?x.getFirstKey?.():x.getLastKey?.(),k(O)}break}case(c()==="vertical"?"ArrowRight":"ArrowDown"):{if(x.getKeyRightOf){g.preventDefault();const $=s()==="rtl";let O;S!=null?O=x.getKeyRightOf(S):O=$?x.getLastKey?.():x.getFirstKey?.(),k(O)}break}case"Home":if(x.getFirstKey){g.preventDefault();const $=x.getFirstKey(S,wc(g));$!=null&&(y.setFocusedKey($),wc(g)&&g.shiftKey&&y.selectionMode()==="multiple"?y.extendSelection($):w&&y.replaceSelection($))}break;case"End":if(x.getLastKey){g.preventDefault();const $=x.getLastKey(S,wc(g));$!=null&&(y.setFocusedKey($),wc(g)&&g.shiftKey&&y.selectionMode()==="multiple"?y.extendSelection($):w&&y.replaceSelection($))}break;case"PageDown":if(x.getKeyPageBelow&&S!=null){g.preventDefault();const $=x.getKeyPageBelow(S);k($)}break;case"PageUp":if(x.getKeyPageAbove&&S!=null){g.preventDefault();const $=x.getKeyPageAbove(S);k($)}break;case"a":wc(g)&&y.selectionMode()==="multiple"&&he(i.disallowSelectAll)!==!0&&(g.preventDefault(),y.selectAll());break;case"Escape":g.defaultPrevented||(g.preventDefault(),he(i.disallowEmptySelection)||y.clearSelection());break;case"Tab":if(!he(i.allowsTabNavigation)){if(g.shiftKey)v.focus();else{const $=J9(v,{tabbable:!0});let O,D;do D=$.lastChild(),D&&(O=D);while(D);O&&!O.contains(document.activeElement)&&un(O)}break}}},d=g=>{const v=he(i.selectionManager),y=he(i.keyboardDelegate),w=he(i.selectOnFocus);if(v.isFocused()){g.currentTarget.contains(g.target)||v.setFocused(!1);return}if(g.currentTarget.contains(g.target)){if(v.setFocused(!0),v.focusedKey()==null){const k=C=>{C!=null&&(v.setFocusedKey(C),w&&v.replaceSelection(C))},x=g.relatedTarget;x&&g.currentTarget.compareDocumentPosition(x)&Node.DOCUMENT_POSITION_FOLLOWING?k(v.lastSelectedKey()??y.getLastKey?.()):k(v.firstSelectedKey()??y.getFirstKey?.())}else if(!he(i.isVirtualized)){const k=o();if(k){k.scrollTop=a.top,k.scrollLeft=a.left;const x=k.querySelector(`[data-key="${v.focusedKey()}"]`);x&&(un(x),_y(k,x))}}}},h=g=>{const v=he(i.selectionManager);g.currentTarget.contains(g.relatedTarget)||v.setFocused(!1)},f=g=>{o()===g.target&&g.preventDefault()},m=()=>{const g=he(i.autoFocus);if(!g)return;const v=he(i.selectionManager),y=he(i.keyboardDelegate);let w;g==="first"&&(w=y.getFirstKey?.()),g==="last"&&(w=y.getLastKey?.());const k=v.selectedKeys();k.size&&(w=k.values().next().value),v.setFocused(!0),v.setFocusedKey(w);const x=t();x&&w==null&&!he(i.shouldUseVirtualFocus)&&un(x)};return Kt(()=>{i.deferAutoFocus?setTimeout(m,0):m()}),re(gt([o,()=>he(i.isVirtualized),()=>he(i.selectionManager).focusedKey()],g=>{const[v,y,w]=g;if(y)w&&i.scrollToKey?.(w);else if(w&&v){const k=v.querySelector(`[data-key="${w}"]`);k&&_y(v,k)}})),{tabIndex:F(()=>{if(!he(i.shouldUseVirtualFocus))return he(i.selectionManager).focusedKey()==null?0:-1}),onKeyDown:u,onMouseDown:f,onFocusIn:d,onFocusOut:h}}function Cg(e,t){const n=()=>he(e.selectionManager),r=()=>he(e.key),i=()=>he(e.shouldUseVirtualFocus),o=y=>{n().selectionMode()!=="none"&&(n().selectionMode()==="single"?n().isSelected(r())&&!n().disallowEmptySelection()?n().toggleSelection(r()):n().replaceSelection(r()):y?.shiftKey?n().extendSelection(r()):n().selectionBehavior()==="toggle"||wc(y)||"pointerType"in y&&y.pointerType==="touch"?n().toggleSelection(r()):n().replaceSelection(r()))},s=()=>n().isSelected(r()),a=()=>he(e.disabled)||n().isDisabled(r()),l=()=>!a()&&n().canSelectItem(r());let c=null;const u=y=>{l()&&(c=y.pointerType,y.pointerType==="mouse"&&y.button===0&&!he(e.shouldSelectOnPressUp)&&o(y))},d=y=>{l()&&y.pointerType==="mouse"&&y.button===0&&he(e.shouldSelectOnPressUp)&&he(e.allowsDifferentPressOrigin)&&o(y)},h=y=>{l()&&(he(e.shouldSelectOnPressUp)&&!he(e.allowsDifferentPressOrigin)||c!=="mouse")&&o(y)},f=y=>{!l()||!["Enter"," "].includes(y.key)||(xR(y)?n().toggleSelection(r()):o(y))},m=y=>{a()&&y.preventDefault()},p=y=>{const w=t();i()||a()||!w||y.target===w&&n().setFocusedKey(r())},g=F(()=>{if(!(i()||a()))return r()===n().focusedKey()?0:-1}),v=F(()=>he(e.virtualized)?void 0:r());return re(gt([t,r,i,()=>n().focusedKey(),()=>n().isFocused()],([y,w,k,x,C])=>{y&&w===x&&C&&!k&&document.activeElement!==y&&(e.focus?e.focus():un(y))})),{isSelected:s,isDisabled:a,allowsSelection:l,tabIndex:g,dataKey:v,onPointerDown:u,onPointerUp:d,onClick:h,onKeyDown:f,onMouseDown:m,onFocus:p}}var $ye=class{collection;state;constructor(e,t){this.collection=e,this.state=t}selectionMode(){return this.state.selectionMode()}disallowEmptySelection(){return this.state.disallowEmptySelection()}selectionBehavior(){return this.state.selectionBehavior()}setSelectionBehavior(e){this.state.setSelectionBehavior(e)}isFocused(){return this.state.isFocused()}setFocused(e){this.state.setFocused(e)}focusedKey(){return this.state.focusedKey()}setFocusedKey(e){(e==null||this.collection().getItem(e))&&this.state.setFocusedKey(e)}selectedKeys(){return this.state.selectedKeys()}isSelected(e){if(this.state.selectionMode()==="none")return!1;const t=this.getKey(e);return t==null?!1:this.state.selectedKeys().has(t)}isEmpty(){return this.state.selectedKeys().size===0}isSelectAll(){if(this.isEmpty())return!1;const e=this.state.selectedKeys();return this.getAllSelectableKeys().every(t=>e.has(t))}firstSelectedKey(){let e;for(const t of this.state.selectedKeys()){const n=this.collection().getItem(t),r=n?.index!=null&&e?.index!=null&&n.index<e.index;(!e||r)&&(e=n)}return e?.key}lastSelectedKey(){let e;for(const t of this.state.selectedKeys()){const n=this.collection().getItem(t),r=n?.index!=null&&e?.index!=null&&n.index>e.index;(!e||r)&&(e=n)}return e?.key}extendSelection(e){if(this.selectionMode()==="none")return;if(this.selectionMode()==="single"){this.replaceSelection(e);return}const t=this.getKey(e);if(t==null)return;const n=this.state.selectedKeys(),r=n.anchorKey||t,i=new No(n,r,t);for(const o of this.getKeyRange(r,n.currentKey||t))i.delete(o);for(const o of this.getKeyRange(t,r))this.canSelectItem(o)&&i.add(o);this.state.setSelectedKeys(i)}getKeyRange(e,t){const n=this.collection().getItem(e),r=this.collection().getItem(t);return n&&r?n.index!=null&&r.index!=null&&n.index<=r.index?this.getKeyRangeInternal(e,t):this.getKeyRangeInternal(t,e):[]}getKeyRangeInternal(e,t){const n=[];let r=e;for(;r!=null;){const i=this.collection().getItem(r);if(i&&i.type==="item"&&n.push(r),r===t)return n;r=this.collection().getKeyAfter(r)}return[]}getKey(e){const t=this.collection().getItem(e);return t?!t||t.type!=="item"?null:t.key:e}toggleSelection(e){if(this.selectionMode()==="none")return;if(this.selectionMode()==="single"&&!this.isSelected(e)){this.replaceSelection(e);return}const t=this.getKey(e);if(t==null)return;const n=new No(this.state.selectedKeys());n.has(t)?n.delete(t):this.canSelectItem(t)&&(n.add(t),n.anchorKey=t,n.currentKey=t),!(this.disallowEmptySelection()&&n.size===0)&&this.state.setSelectedKeys(n)}replaceSelection(e){if(this.selectionMode()==="none")return;const t=this.getKey(e);if(t==null)return;const n=this.canSelectItem(t)?new No([t],t,t):new No;this.state.setSelectedKeys(n)}setSelectedKeys(e){if(this.selectionMode()==="none")return;const t=new No;for(const n of e){const r=this.getKey(n);if(r!=null&&(t.add(r),this.selectionMode()==="single"))break}this.state.setSelectedKeys(t)}selectAll(){this.selectionMode()==="multiple"&&this.state.setSelectedKeys(new Set(this.getAllSelectableKeys()))}clearSelection(){const e=this.state.selectedKeys();!this.disallowEmptySelection()&&e.size>0&&this.state.setSelectedKeys(new No)}toggleSelectAll(){this.isSelectAll()?this.clearSelection():this.selectAll()}select(e,t){this.selectionMode()!=="none"&&(this.selectionMode()==="single"?this.isSelected(e)&&!this.disallowEmptySelection()?this.toggleSelection(e):this.replaceSelection(e):this.selectionBehavior()==="toggle"||t&&t.pointerType==="touch"?this.toggleSelection(e):this.replaceSelection(e))}isSelectionEqual(e){if(e===this.state.selectedKeys())return!0;const t=this.selectedKeys();if(e.size!==t.size)return!1;for(const n of e)if(!t.has(n))return!1;for(const n of t)if(!e.has(n))return!1;return!0}canSelectItem(e){if(this.state.selectionMode()==="none")return!1;const t=this.collection().getItem(e);return t!=null&&!t.disabled}isDisabled(e){const t=this.collection().getItem(e);return!t||t.disabled}getAllSelectableKeys(){const e=[];return(n=>{for(;n!=null;){if(this.canSelectItem(n)){const r=this.collection().getItem(n);if(!r)continue;r.type==="item"&&e.push(n)}n=this.collection().getKeyAfter(n)}})(this.collection().getFirstKey()),e}},QS=class{keyMap=new Map;iterable;firstKey;lastKey;constructor(e){this.iterable=e;for(const r of e)this.keyMap.set(r.key,r);if(this.keyMap.size===0)return;let t,n=0;for(const[r,i]of this.keyMap)t?(t.nextKey=r,i.prevKey=t.key):(this.firstKey=r,i.prevKey=void 0),i.type==="item"&&(i.index=n++),t=i,t.nextKey=void 0;this.lastKey=t.key}*[Symbol.iterator](){yield*this.iterable}getSize(){return this.keyMap.size}getKeys(){return this.keyMap.keys()}getKeyBefore(e){return this.keyMap.get(e)?.prevKey}getKeyAfter(e){return this.keyMap.get(e)?.nextKey}getFirstKey(){return this.firstKey}getLastKey(){return this.lastKey}getItem(e){return this.keyMap.get(e)}at(e){const t=[...this.getKeys()];return this.getItem(t[e])}};function Ig(e){const t=Iye(e),r=_ye({dataSource:()=>he(e.dataSource),getKey:()=>he(e.getKey),getTextValue:()=>he(e.getTextValue),getDisabled:()=>he(e.getDisabled),getSectionChildren:()=>he(e.getSectionChildren),factory:o=>e.filter?new QS(e.filter(o)):new QS(o)},[()=>e.filter]),i=new $ye(r,t);return Ho(()=>{const o=t.focusedKey();o!=null&&!r().getItem(o)&&t.setFocusedKey(void 0)}),{collection:r,selectionManager:()=>i}}var IR=class{collection;ref;collator;constructor(e,t,n){this.collection=e,this.ref=t,this.collator=n}getKeyBelow(e){let t=this.collection().getKeyAfter(e);for(;t!=null;){const n=this.collection().getItem(t);if(n&&n.type==="item"&&!n.disabled)return t;t=this.collection().getKeyAfter(t)}}getKeyAbove(e){let t=this.collection().getKeyBefore(e);for(;t!=null;){const n=this.collection().getItem(t);if(n&&n.type==="item"&&!n.disabled)return t;t=this.collection().getKeyBefore(t)}}getFirstKey(){let e=this.collection().getFirstKey();for(;e!=null;){const t=this.collection().getItem(e);if(t&&t.type==="item"&&!t.disabled)return e;e=this.collection().getKeyAfter(e)}}getLastKey(){let e=this.collection().getLastKey();for(;e!=null;){const t=this.collection().getItem(e);if(t&&t.type==="item"&&!t.disabled)return e;e=this.collection().getKeyBefore(e)}}getItem(e){return this.ref?.()?.querySelector(`[data-key="${e}"]`)??null}getKeyPageAbove(e){const t=this.ref?.();let n=this.getItem(e);if(!t||!n)return;const r=Math.max(0,n.offsetTop+n.offsetHeight-t.offsetHeight);let i=e;for(;i&&n&&n.offsetTop>r;)i=this.getKeyAbove(i),n=i!=null?this.getItem(i):null;return i}getKeyPageBelow(e){const t=this.ref?.();let n=this.getItem(e);if(!t||!n)return;const r=Math.min(t.scrollHeight,n.offsetTop-n.offsetHeight+t.offsetHeight);let i=e;for(;i&&n&&n.offsetTop<r;)i=this.getKeyBelow(i),n=i!=null?this.getItem(i):null;return i}getKeyForSearch(e,t){const n=this.collator?.();if(!n)return;let r=t!=null?this.getKeyBelow(t):this.getFirstKey();for(;r!=null;){const i=this.collection().getItem(r);if(i){const o=i.textValue.slice(0,e.length);if(i.textValue&&n.compare(o,e)===0)return r}r=this.getKeyBelow(r)}}};function TR(e,t,n){const r=rR({usage:"search",sensitivity:"base"}),i=F(()=>{const o=he(e.keyboardDelegate);return o||new IR(e.collection,t,r)});return CR({selectionManager:()=>he(e.selectionManager),keyboardDelegate:i,autoFocus:()=>he(e.autoFocus),deferAutoFocus:()=>he(e.deferAutoFocus),shouldFocusWrap:()=>he(e.shouldFocusWrap),disallowEmptySelection:()=>he(e.disallowEmptySelection),selectOnFocus:()=>he(e.selectOnFocus),disallowTypeAhead:()=>he(e.disallowTypeAhead),shouldUseVirtualFocus:()=>he(e.shouldUseVirtualFocus),allowsTabNavigation:()=>he(e.allowsTabNavigation),isVirtualized:()=>he(e.isVirtualized),scrollToKey:o=>he(e.scrollToKey)?.(o),orientation:()=>he(e.orientation)},t,n)}var ER=pt();function $R(){return ut(ER)}function Aye(){const e=$R();if(e===void 0)throw new Error("[kobalte]: `useDomCollectionContext` must be used within a `DomCollectionProvider` component");return e}function AR(e,t){return!!(t.compareDocumentPosition(e)&Node.DOCUMENT_POSITION_PRECEDING)}function Lye(e,t){const n=t.ref();if(!n)return-1;let r=e.length;if(!r)return-1;for(;r--;){const i=e[r]?.ref();if(i&&AR(i,n))return r+1}return 0}function Dye(e){const t=e.map((r,i)=>[i,r]);let n=!1;return t.sort(([r,i],[o,s])=>{const a=i.ref(),l=s.ref();return a===l||!a||!l?0:AR(a,l)?(r>o&&(n=!0),-1):(r<o&&(n=!0),1)}),n?t.map(([r,i])=>i):e}function LR(e,t){const n=Dye(e);e!==n&&t(n)}function Mye(e){const t=e[0],n=e[e.length-1]?.ref();let r=t?.ref()?.parentElement;for(;r;){if(n&&r.contains(n))return r;r=r.parentElement}return Fr(r).body}function Oye(e,t){re(()=>{const n=setTimeout(()=>{LR(e(),t)});fe(()=>clearTimeout(n))})}function Pye(e,t){if(typeof IntersectionObserver!="function"){Oye(e,t);return}let n=[];re(()=>{const r=()=>{const s=!!n.length;n=e(),s&&LR(e(),t)},i=Mye(e()),o=new IntersectionObserver(r,{root:i});for(const s of e()){const a=s.ref();a&&o.observe(a)}fe(()=>o.disconnect())})}function DR(e={}){const[t,n]=RF({value:()=>he(e.items),onChange:o=>e.onItemsChange?.(o)});Pye(t,n);const r=o=>(n(s=>{const a=Lye(s,o);return rF(s,o,a)}),()=>{n(s=>{const a=s.filter(l=>l.ref()!==o.ref());return s.length===a.length?s:a})});return{DomCollectionProvider:o=>b(ER.Provider,{value:{registerItem:r},get children(){return o.children}})}}function MR(e){const t=Aye(),n=Ne({shouldRegisterItem:!0},e);re(()=>{if(!n.shouldRegisterItem)return;const r=t.registerItem(n.getItem());fe(r)})}function OR(e={}){const[t,n]=i_({value:()=>he(e.isSelected),defaultValue:()=>!!he(e.defaultIsSelected),onChange:o=>e.onSelectedChange?.(o)});return{isSelected:t,setIsSelected:o=>{!he(e.isReadOnly)&&!he(e.isDisabled)&&n(o)},toggle:()=>{!he(e.isReadOnly)&&!he(e.isDisabled)&&n(!t())}}}var Rye=pt();function Tg(){return ut(Rye)}var Nye=pt();function PR(){return ut(Nye)}var RR=pt();function NR(){return ut(RR)}function os(){const e=NR();if(e===void 0)throw new Error("[kobalte]: `useMenuContext` must be used within a `Menu` component");return e}var zR=pt();function wk(){const e=ut(zR);if(e===void 0)throw new Error("[kobalte]: `useMenuItemContext` must be used within a `Menu.Item` component");return e}var jR=pt();function Ki(){const e=ut(jR);if(e===void 0)throw new Error("[kobalte]: `useMenuRootContext` must be used within a `MenuRoot` component");return e}function kk(e){let t;const n=Ki(),r=os(),i=Ne({id:n.generateId(`item-${an()}`)},e),[o,s]=se(i,["ref","textValue","disabled","closeOnSelect","checked","indeterminate","onSelect","onPointerMove","onPointerLeave","onPointerDown","onPointerUp","onClick","onKeyDown","onMouseDown","onFocus"]),[a,l]=de(),[c,u]=de(),[d,h]=de(),f=()=>r.listState().selectionManager(),m=()=>s.id,p=()=>f().focusedKey()===m(),g=()=>{o.onSelect?.(),o.closeOnSelect&&setTimeout(()=>{r.close(!0)})};MR({getItem:()=>({ref:()=>t,type:"item",key:m(),textValue:o.textValue??d()?.textContent??t?.textContent??"",disabled:o.disabled??!1})});const v=Cg({key:m,selectionManager:f,shouldSelectOnPressUp:!0,allowsDifferentPressOrigin:!0,disabled:()=>o.disabled},()=>t),y=O=>{ze(O,o.onPointerMove),O.pointerType==="mouse"&&(o.disabled?r.onItemLeave(O):(r.onItemEnter(O),O.defaultPrevented||(un(O.currentTarget),r.listState().selectionManager().setFocused(!0),r.listState().selectionManager().setFocusedKey(m()))))},w=O=>{ze(O,o.onPointerLeave),O.pointerType==="mouse"&&r.onItemLeave(O)},k=O=>{ze(O,o.onPointerUp),!o.disabled&&O.button===0&&g()},x=O=>{if(ze(O,o.onKeyDown),!O.repeat&&!o.disabled)switch(O.key){case"Enter":case" ":g();break}},C=F(()=>{if(o.indeterminate)return"mixed";if(o.checked!=null)return o.checked}),S=F(()=>({"data-indeterminate":o.indeterminate?"":void 0,"data-checked":o.checked&&!o.indeterminate?"":void 0,"data-disabled":o.disabled?"":void 0,"data-highlighted":p()?"":void 0})),$={isChecked:()=>o.checked,dataset:S,setLabelRef:h,generateId:$r(()=>s.id),registerLabel:en(l),registerDescription:en(u)};return b(zR.Provider,{value:$,get children(){return b(Ve,ne({as:"div",ref(O){var D=st(M=>t=M,o.ref);typeof D=="function"&&D(O)},get tabIndex(){return v.tabIndex()},get"aria-checked"(){return C()},get"aria-disabled"(){return o.disabled},get"aria-labelledby"(){return a()},get"aria-describedby"(){return c()},get"data-key"(){return v.dataKey()},get onPointerDown(){return wt([o.onPointerDown,v.onPointerDown])},get onPointerUp(){return wt([k,v.onPointerUp])},get onClick(){return wt([o.onClick,v.onClick])},get onKeyDown(){return wt([x,v.onKeyDown])},get onMouseDown(){return wt([o.onMouseDown,v.onMouseDown])},get onFocus(){return wt([o.onFocus,v.onFocus])},onPointerMove:y,onPointerLeave:w},S,s))}})}function Eg(e){const t=Ne({closeOnSelect:!1},e),[n,r]=se(t,["checked","defaultChecked","onChange","onSelect"]),i=OR({isSelected:()=>n.checked,defaultIsSelected:()=>n.defaultChecked,onSelectedChange:s=>n.onChange?.(s),isDisabled:()=>r.disabled});return b(kk,ne({role:"menuitemcheckbox",get checked(){return i.isSelected()},onSelect:()=>{n.onSelect?.(),i.toggle()}},r))}var gf={next:(e,t)=>e==="ltr"?t==="horizontal"?"ArrowRight":"ArrowDown":t==="horizontal"?"ArrowLeft":"ArrowUp",previous:(e,t)=>gf.next(e==="ltr"?"rtl":"ltr",t)},e9={first:e=>e==="horizontal"?"ArrowDown":"ArrowRight",last:e=>e==="horizontal"?"ArrowUp":"ArrowLeft"};function FR(e){const t=Ki(),n=os(),r=Tg(),{direction:i}=Co(),o=Ne({id:t.generateId("trigger")},e),[s,a]=se(o,["ref","id","disabled","onPointerDown","onClick","onKeyDown","onMouseOver","onFocus"]);let l=()=>t.value();r!==void 0&&(l=()=>t.value()??s.id,r.lastValue()===void 0&&r.setLastValue(l));const c=Sf(()=>n.triggerRef(),()=>"button"),u=F(()=>c()==="a"&&n.triggerRef()?.getAttribute("href")!=null);re(gt(()=>r?.value(),v=>{u()&&v===l()&&n.triggerRef()?.focus()}));const d=()=>{r!==void 0?n.isOpen()?r.value()===l()&&r.closeMenu():(r.autoFocusMenu()||r.setAutoFocusMenu(!0),n.open(!1)):n.toggle(!0)},h=v=>{ze(v,s.onPointerDown),v.currentTarget.dataset.pointerType=v.pointerType,!s.disabled&&v.pointerType!=="touch"&&v.button===0&&d()},f=v=>{ze(v,s.onClick),s.disabled||v.currentTarget.dataset.pointerType==="touch"&&d()},m=v=>{if(ze(v,s.onKeyDown),!s.disabled){if(u())switch(v.key){case"Enter":case" ":return}switch(v.key){case"Enter":case" ":case e9.first(t.orientation()):v.stopPropagation(),v.preventDefault(),xF(v.currentTarget),n.open("first"),r?.setAutoFocusMenu(!0),r?.setValue(l);break;case e9.last(t.orientation()):v.stopPropagation(),v.preventDefault(),n.open("last");break;case gf.next(i(),t.orientation()):if(r===void 0)break;v.stopPropagation(),v.preventDefault(),r.nextMenu();break;case gf.previous(i(),t.orientation()):if(r===void 0)break;v.stopPropagation(),v.preventDefault(),r.previousMenu();break}}},p=v=>{ze(v,s.onMouseOver),n.triggerRef()?.dataset.pointerType!=="touch"&&!s.disabled&&r!==void 0&&r.value()!==void 0&&r.setValue(l)},g=v=>{ze(v,s.onFocus),r!==void 0&&v.currentTarget.dataset.pointerType!=="touch"&&r.setValue(l)};return re(()=>fe(n.registerTriggerId(s.id))),b(Jo,ne({ref(v){var y=st(n.setTriggerRef,s.ref);typeof y=="function"&&y(v)},get"data-kb-menu-value-trigger"(){return t.value()},get id(){return s.id},get disabled(){return s.disabled},"aria-haspopup":"true",get"aria-expanded"(){return n.isOpen()},get"aria-controls"(){return je(()=>!!n.isOpen())()?n.contentId():void 0},get"data-highlighted"(){return l()!==void 0&&r?.value()===l()?!0:void 0},get tabIndex(){return r!==void 0?r.value()===l()||r.lastValue()===l()?0:-1:void 0},onPointerDown:h,onMouseOver:p,onClick:f,onKeyDown:m,onFocus:g,role:r!==void 0?"menuitem":void 0},()=>n.dataset(),a))}function UR(e){let t;const n=Ki(),r=os(),i=Tg(),o=PR(),{direction:s}=Co(),a=Ne({id:n.generateId(`content-${an()}`)},e),[l,c]=se(a,["ref","id","style","onOpenAutoFocus","onCloseAutoFocus","onEscapeKeyDown","onFocusOutside","onPointerEnter","onPointerMove","onKeyDown","onMouseDown","onFocusIn","onFocusOut"]);let u=0;const d=()=>r.parentMenuContext()==null&&i===void 0&&n.isModal(),h=TR({selectionManager:r.listState().selectionManager,collection:r.listState().collection,autoFocus:r.autoFocus,deferAutoFocus:!0,shouldFocusWrap:!0,disallowTypeAhead:()=>!r.listState().selectionManager().isFocused(),orientation:()=>n.orientation()==="horizontal"?"vertical":"horizontal"},()=>t);hp({trapFocus:()=>d()&&r.isOpen(),onMountAutoFocus:w=>{i===void 0&&l.onOpenAutoFocus?.(w)},onUnmountAutoFocus:l.onCloseAutoFocus},()=>t);const f=w=>{if(Dn(w.currentTarget,w.target)&&(w.key==="Tab"&&r.isOpen()&&w.preventDefault(),i!==void 0&&w.currentTarget.getAttribute("aria-haspopup")!=="true"))switch(w.key){case gf.next(s(),n.orientation()):w.stopPropagation(),w.preventDefault(),r.close(!0),i.setAutoFocusMenu(!0),i.nextMenu();break;case gf.previous(s(),n.orientation()):if(w.currentTarget.hasAttribute("data-closed"))break;w.stopPropagation(),w.preventDefault(),r.close(!0),i.setAutoFocusMenu(!0),i.previousMenu();break}},m=w=>{l.onEscapeKeyDown?.(w),i?.setAutoFocusMenu(!1),r.close(!0)},p=w=>{l.onFocusOutside?.(w),n.isModal()&&w.preventDefault()},g=w=>{ze(w,l.onPointerEnter),r.isOpen()&&(r.parentMenuContext()?.listState().selectionManager().setFocused(!1),r.parentMenuContext()?.listState().selectionManager().setFocusedKey(void 0))},v=w=>{if(ze(w,l.onPointerMove),w.pointerType!=="mouse")return;const k=w.target,x=u!==w.clientX;Dn(w.currentTarget,k)&&x&&(r.setPointerDir(w.clientX>u?"right":"left"),u=w.clientX)};re(()=>fe(r.registerContentId(l.id))),fe(()=>r.setContentRef(void 0));const y={ref:st(w=>{r.setContentRef(w),t=w},l.ref),role:"menu",get id(){return l.id},get tabIndex(){return h.tabIndex()},get"aria-labelledby"(){return r.triggerId()},onKeyDown:wt([l.onKeyDown,h.onKeyDown,f]),onMouseDown:wt([l.onMouseDown,h.onMouseDown]),onFocusIn:wt([l.onFocusIn,h.onFocusIn]),onFocusOut:wt([l.onFocusOut,h.onFocusOut]),onPointerEnter:g,onPointerMove:v,get"data-orientation"(){return n.orientation()}};return b(ce,{get when(){return r.contentPresent()},get children(){return b(ce,{get when(){return o===void 0||r.parentMenuContext()!=null},get fallback(){return b(Ve,ne({as:"div"},()=>r.dataset(),y,c))},get children(){return b(is.Positioner,{get children(){return b(eu,ne({get disableOutsidePointerEvents(){return je(()=>!!d())()&&r.isOpen()},get excludedElements(){return[r.triggerRef]},bypassTopMostLayerCheck:!0,get style(){return gr({"--kb-menu-content-transform-origin":"var(--kb-popper-content-transform-origin)",position:"relative"},l.style)},onEscapeKeyDown:m,onFocusOutside:p,get onDismiss(){return r.close}},()=>r.dataset(),y,c))}})}})}})}function HR(e){let t;const n=Ki(),r=os(),[i,o]=se(e,["ref"]);return pp({element:()=>t??null,enabled:()=>r.contentPresent()&&n.preventScroll()}),b(UR,ne({ref(s){var a=st(l=>{t=l},i.ref);typeof a=="function"&&a(s)}},o))}var BR=pt();function zye(){const e=ut(BR);if(e===void 0)throw new Error("[kobalte]: `useMenuGroupContext` must be used within a `Menu.Group` component");return e}function Qf(e){const t=Ki(),n=Ne({id:t.generateId(`group-${an()}`)},e),[r,i]=de(),o={generateId:$r(()=>n.id),registerLabelId:en(i)};return b(BR.Provider,{value:o,get children(){return b(Ve,ne({as:"div",role:"group",get"aria-labelledby"(){return r()}},n))}})}function $g(e){const t=zye(),n=Ne({id:t.generateId("label")},e),[r,i]=se(n,["id"]);return re(()=>fe(t.registerLabelId(r.id))),b(Ve,ne({as:"span",get id(){return r.id},"aria-hidden":"true"},i))}function Ag(e){const t=os(),n=Ne({children:"▼"},e);return b(Ve,ne({as:"span","aria-hidden":"true"},()=>t.dataset(),n))}function Lg(e){return b(kk,ne({role:"menuitem",closeOnSelect:!0},e))}function Dg(e){const t=wk(),n=Ne({id:t.generateId("description")},e),[r,i]=se(n,["id"]);return re(()=>fe(t.registerDescription(r.id))),b(Ve,ne({as:"div",get id(){return r.id}},()=>t.dataset(),i))}function Mg(e){const t=wk(),n=Ne({id:t.generateId("indicator")},e),[r,i]=se(n,["forceMount"]);return b(ce,{get when(){return r.forceMount||t.isChecked()},get children(){return b(Ve,ne({as:"div"},()=>t.dataset(),i))}})}function Og(e){const t=wk(),n=Ne({id:t.generateId("label")},e),[r,i]=se(n,["ref","id"]);return re(()=>fe(t.registerLabel(r.id))),b(Ve,ne({as:"div",ref(o){var s=st(t.setLabelRef,r.ref);typeof s=="function"&&s(o)},get id(){return r.id}},()=>t.dataset(),i))}function Pg(e){const t=os();return b(ce,{get when(){return t.contentPresent()},get children(){return b(Os,e)}})}var VR=pt();function jye(){const e=ut(VR);if(e===void 0)throw new Error("[kobalte]: `useMenuRadioGroupContext` must be used within a `Menu.RadioGroup` component");return e}function Rg(e){const n=Ki().generateId(`radiogroup-${an()}`),r=Ne({id:n},e),[i,o]=se(r,["value","defaultValue","onChange","disabled"]),[s,a]=El({value:()=>i.value,defaultValue:()=>i.defaultValue,onChange:c=>i.onChange?.(c)}),l={isDisabled:()=>i.disabled,isSelectedValue:c=>c===s(),setSelectedValue:c=>a(c)};return b(VR.Provider,{value:l,get children(){return b(Qf,o)}})}function Ng(e){const t=jye(),n=Ne({closeOnSelect:!1},e),[r,i]=se(n,["value","onSelect"]);return b(kk,ne({role:"menuitemradio",get checked(){return t.isSelectedValue(r.value)},onSelect:()=>{r.onSelect?.(),t.setSelectedValue(r.value)}},i))}function Fye(e,t,n){const r=e.split("-")[0],i=n.getBoundingClientRect(),o=[],s=t.clientX,a=t.clientY;switch(r){case"top":o.push([s,a+5]),o.push([i.left,i.bottom]),o.push([i.left,i.top]),o.push([i.right,i.top]),o.push([i.right,i.bottom]);break;case"right":o.push([s-5,a]),o.push([i.left,i.top]),o.push([i.right,i.top]),o.push([i.right,i.bottom]),o.push([i.left,i.bottom]);break;case"bottom":o.push([s,a-5]),o.push([i.right,i.top]),o.push([i.right,i.bottom]),o.push([i.left,i.bottom]),o.push([i.left,i.top]);break;case"left":o.push([s+5,a]),o.push([i.right,i.bottom]),o.push([i.left,i.bottom]),o.push([i.left,i.top]),o.push([i.right,i.top]);break}return o}function Uye(e,t){return t?U2([e.clientX,e.clientY],t):!1}function qR(e){const t=Ki(),n=$R(),r=NR(),i=Tg(),o=PR(),s=Ne({placement:t.orientation()==="horizontal"?"bottom-start":"right-start"},e),[a,l]=se(s,["open","defaultOpen","onOpenChange"]);let c=0,u=null,d="right";const[h,f]=de(),[m,p]=de(),[g,v]=de(),[y,w]=de(),[k,x]=de(!0),[C,S]=de(l.placement),[$,O]=de([]),[D,M]=de([]),{DomCollectionProvider:I}=DR({items:D,onItemsChange:M}),L=Ps({open:()=>a.open,defaultOpen:()=>a.defaultOpen,onOpenChange:ue=>a.onOpenChange?.(ue)}),{present:A}=po({show:()=>t.forceMount()||L.isOpen(),element:()=>y()??null}),T=Ig({selectionMode:"none",dataSource:D}),N=ue=>{x(ue),L.open()},W=(ue=!1)=>{L.close(),ue&&r&&r.close(!0)},K=ue=>{x(ue),L.toggle()},V=()=>{const ue=y();ue&&(un(ue),T.selectionManager().setFocused(!0),T.selectionManager().setFocusedKey(void 0))},q=()=>{o!=null?setTimeout(()=>V()):V()},B=ue=>{O($e=>[...$e,ue]);const Le=r?.registerNestedMenu(ue);return()=>{O($e=>Sy($e,ue)),Le?.()}},Y=ue=>d===u?.side&&Uye(ue,u?.area),J=ue=>{Y(ue)&&ue.preventDefault()},ge=ue=>{Y(ue)||q()},ae=ue=>{Y(ue)&&ue.preventDefault()};mp({isDisabled:()=>!(r==null&&L.isOpen()&&t.isModal()),targets:()=>[y(),...$()].filter(Boolean)}),re(()=>{const ue=y();if(!ue||!r)return;const Le=r.registerNestedMenu(ue);fe(()=>{Le()})}),re(()=>{r===void 0&&i?.registerMenu(t.value(),[y(),...$()])}),re(()=>{r!==void 0||i===void 0||(i.value()===t.value()?(g()?.focus(),i.autoFocusMenu()&&N(!0)):W())}),re(()=>{r!==void 0||i===void 0||L.isOpen()&&i.setValue(t.value())}),fe(()=>{r===void 0&&i?.unregisterMenu(t.value())});const pe={dataset:F(()=>({"data-expanded":L.isOpen()?"":void 0,"data-closed":L.isOpen()?void 0:""})),isOpen:L.isOpen,contentPresent:A,nestedMenus:$,currentPlacement:C,pointerGraceTimeoutId:()=>c,autoFocus:k,listState:()=>T,parentMenuContext:()=>r,triggerRef:g,contentRef:y,triggerId:h,contentId:m,setTriggerRef:v,setContentRef:w,open:N,close:W,toggle:K,focusContent:q,onItemEnter:J,onItemLeave:ge,onTriggerLeave:ae,setPointerDir:ue=>d=ue,setPointerGraceTimeoutId:ue=>c=ue,setPointerGraceIntent:ue=>u=ue,registerNestedMenu:B,registerItemToParentDomCollection:n?.registerItem,registerTriggerId:en(f),registerContentId:en(p)};return b(I,{get children(){return b(RR.Provider,{value:pe,get children(){return b(ce,{when:o===void 0,get fallback(){return l.children},get children(){return b(is,ne({anchorRef:g,contentRef:y,onCurrentPlacementChange:S},l))}})}})}})}function zg(e){const{direction:t}=Co();return b(qR,ne({get placement(){return t()==="rtl"?"left-start":"right-start"},flip:!0},e))}var Hye={close:(e,t)=>e==="ltr"?[t==="horizontal"?"ArrowLeft":"ArrowUp"]:[t==="horizontal"?"ArrowRight":"ArrowDown"]};function jg(e){const t=os(),n=Ki(),[r,i]=se(e,["onFocusOutside","onKeyDown"]),{direction:o}=Co();return b(UR,ne({onOpenAutoFocus:u=>{u.preventDefault()},onCloseAutoFocus:u=>{u.preventDefault()},onFocusOutside:u=>{r.onFocusOutside?.(u);const d=u.target;Dn(t.triggerRef(),d)||t.close()},onKeyDown:u=>{ze(u,r.onKeyDown);const d=Dn(u.currentTarget,u.target),h=Hye.close(o(),n.orientation()).includes(u.key),f=t.parentMenuContext()!=null;d&&h&&f&&(t.close(),un(t.triggerRef()))}},i))}var t9=["Enter"," "],Bye={open:(e,t)=>e==="ltr"?[...t9,t==="horizontal"?"ArrowRight":"ArrowDown"]:[...t9,t==="horizontal"?"ArrowLeft":"ArrowUp"]};function Fg(e){let t;const n=Ki(),r=os(),i=Ne({id:n.generateId(`sub-trigger-${an()}`)},e),[o,s]=se(i,["ref","id","textValue","disabled","onPointerMove","onPointerLeave","onPointerDown","onPointerUp","onClick","onKeyDown","onMouseDown","onFocus"]);let a=null;const l=()=>{a&&window.clearTimeout(a),a=null},{direction:c}=Co(),u=()=>o.id,d=()=>{const w=r.parentMenuContext();if(w==null)throw new Error("[kobalte]: `Menu.SubTrigger` must be used within a `Menu.Sub` component");return w.listState().selectionManager()},h=()=>r.listState().collection(),f=()=>d().focusedKey()===u(),m=Cg({key:u,selectionManager:d,shouldSelectOnPressUp:!0,allowsDifferentPressOrigin:!0,disabled:()=>o.disabled},()=>t),p=w=>{ze(w,o.onClick),!r.isOpen()&&!o.disabled&&r.open(!0)},g=w=>{if(ze(w,o.onPointerMove),w.pointerType!=="mouse")return;const k=r.parentMenuContext();if(k?.onItemEnter(w),!w.defaultPrevented){if(o.disabled){k?.onItemLeave(w);return}!r.isOpen()&&!a&&(r.parentMenuContext()?.setPointerGraceIntent(null),a=window.setTimeout(()=>{r.open(!1),l()},100)),k?.onItemEnter(w),w.defaultPrevented||(r.listState().selectionManager().isFocused()&&(r.listState().selectionManager().setFocused(!1),r.listState().selectionManager().setFocusedKey(void 0)),un(w.currentTarget),k?.listState().selectionManager().setFocused(!0),k?.listState().selectionManager().setFocusedKey(u()))}},v=w=>{if(ze(w,o.onPointerLeave),w.pointerType!=="mouse")return;l();const k=r.parentMenuContext(),x=r.contentRef();if(x){k?.setPointerGraceIntent({area:Fye(r.currentPlacement(),w,x),side:r.currentPlacement().split("-")[0]}),window.clearTimeout(k?.pointerGraceTimeoutId());const C=window.setTimeout(()=>{k?.setPointerGraceIntent(null)},300);k?.setPointerGraceTimeoutId(C)}else{if(k?.onTriggerLeave(w),w.defaultPrevented)return;k?.setPointerGraceIntent(null)}k?.onItemLeave(w)},y=w=>{ze(w,o.onKeyDown),!w.repeat&&(o.disabled||Bye.open(c(),n.orientation()).includes(w.key)&&(w.stopPropagation(),w.preventDefault(),d().setFocused(!1),d().setFocusedKey(void 0),r.isOpen()||r.open("first"),r.focusContent(),r.listState().selectionManager().setFocused(!0),r.listState().selectionManager().setFocusedKey(h().getFirstKey())))};return re(()=>{if(r.registerItemToParentDomCollection==null)throw new Error("[kobalte]: `Menu.SubTrigger` must be used within a `Menu.Sub` component");const w=r.registerItemToParentDomCollection({ref:()=>t,type:"item",key:u(),textValue:o.textValue??t?.textContent??"",disabled:o.disabled??!1});fe(w)}),re(gt(()=>r.parentMenuContext()?.pointerGraceTimeoutId(),w=>{fe(()=>{window.clearTimeout(w),r.parentMenuContext()?.setPointerGraceIntent(null)})})),re(()=>fe(r.registerTriggerId(o.id))),fe(()=>{l()}),b(Ve,ne({as:"div",ref(w){var k=st(x=>{r.setTriggerRef(x),t=x},o.ref);typeof k=="function"&&k(w)},get id(){return o.id},role:"menuitem",get tabIndex(){return m.tabIndex()},"aria-haspopup":"true",get"aria-expanded"(){return r.isOpen()},get"aria-controls"(){return je(()=>!!r.isOpen())()?r.contentId():void 0},get"aria-disabled"(){return o.disabled},get"data-key"(){return m.dataKey()},get"data-highlighted"(){return f()?"":void 0},get"data-disabled"(){return o.disabled?"":void 0},get onPointerDown(){return wt([o.onPointerDown,m.onPointerDown])},get onPointerUp(){return wt([o.onPointerUp,m.onPointerUp])},get onClick(){return wt([p,m.onClick])},get onKeyDown(){return wt([y,m.onKeyDown])},get onMouseDown(){return wt([o.onMouseDown,m.onMouseDown])},get onFocus(){return wt([o.onFocus,m.onFocus])},onPointerMove:g,onPointerLeave:v},()=>r.dataset(),s))}function WR(e){const t=Tg(),n=`menu-${an()}`,r=Ne({id:n,modal:!0},e),[i,o]=se(r,["id","modal","preventScroll","forceMount","open","defaultOpen","onOpenChange","value","orientation"]),s=Ps({open:()=>i.open,defaultOpen:()=>i.defaultOpen,onOpenChange:l=>i.onOpenChange?.(l)}),a={isModal:()=>i.modal??!0,preventScroll:()=>i.preventScroll??a.isModal(),forceMount:()=>i.forceMount??!1,generateId:$r(()=>i.id),value:()=>i.value,orientation:()=>i.orientation??t?.orientation()??"horizontal"};return b(jR.Provider,{value:a,get children(){return b(qR,ne({get open(){return s.isOpen()},get onOpenChange(){return s.setIsOpen}},o))}})}var Vye={};vr(Vye,{Root:()=>Su,Separator:()=>qye});function Su(e){let t;const n=Ne({orientation:"horizontal"},e),[r,i]=se(n,["ref","orientation"]),o=Sf(()=>t,()=>"hr");return b(Ve,ne({as:"hr",ref(s){var a=st(l=>t=l,r.ref);typeof a=="function"&&a(s)},get role(){return o()!=="hr"?"separator":void 0},get"aria-orientation"(){return r.orientation==="vertical"?"vertical":void 0},get"data-orientation"(){return r.orientation}},i))}var qye=Su,Wye={};vr(Wye,{Arrow:()=>xi,CheckboxItem:()=>Eg,Content:()=>GR,DropdownMenu:()=>Hn,Group:()=>Qf,GroupLabel:()=>$g,Icon:()=>Ag,Item:()=>Lg,ItemDescription:()=>Dg,ItemIndicator:()=>Mg,ItemLabel:()=>Og,Portal:()=>Pg,RadioGroup:()=>Rg,RadioItem:()=>Ng,Root:()=>KR,Separator:()=>Su,Sub:()=>zg,SubContent:()=>jg,SubTrigger:()=>Fg,Trigger:()=>FR});function GR(e){const t=Ki(),n=os(),[r,i]=se(e,["onCloseAutoFocus","onInteractOutside"]);let o=!1;return b(HR,ne({onCloseAutoFocus:l=>{r.onCloseAutoFocus?.(l),o||un(n.triggerRef()),o=!1,l.preventDefault()},onInteractOutside:l=>{r.onInteractOutside?.(l),(!t.isModal()||l.detail.isContextMenu)&&(o=!0)}},i))}function KR(e){const t=`dropdownmenu-${an()}`,n=Ne({id:t},e);return b(WR,n)}var Hn=Object.assign(KR,{Arrow:xi,CheckboxItem:Eg,Content:GR,Group:Qf,GroupLabel:$g,Icon:Ag,Item:Lg,ItemDescription:Dg,ItemIndicator:Mg,ItemLabel:Og,Portal:Pg,RadioGroup:Rg,RadioItem:Ng,Separator:Su,Sub:zg,SubContent:jg,SubTrigger:Fg,Trigger:FR});function Gye(e){return b(Hn,ne(e,{"data-component":"dropdown-menu"}))}function Kye(e){const[t,n]=se(e,["class","classList","children"]);return b(Hn.Trigger,ne(n,{"data-slot":"dropdown-menu-trigger",get classList(){return{...t.classList,[t.class??""]:!!t.class}},get children(){return t.children}}))}function Zye(e){const[t,n]=se(e,["class","classList","children"]);return b(Hn.Icon,ne(n,{"data-slot":"dropdown-menu-icon",get classList(){return{...t.classList,[t.class??""]:!!t.class}},get children(){return t.children}}))}function Yye(e){return b(Hn.Portal,e)}function Xye(e){const[t,n]=se(e,["class","classList","children"]);return b(Hn.Content,ne(n,{"data-component":"dropdown-menu-content",get classList(){return{...t.classList,[t.class??""]:!!t.class}},get children(){return t.children}}))}function Jye(e){const[t,n]=se(e,["class","classList"]);return b(Hn.Arrow,ne(n,{"data-slot":"dropdown-menu-arrow",get classList(){return{...t.classList,[t.class??""]:!!t.class}}}))}function Qye(e){const[t,n]=se(e,["class","classList"]);return b(Hn.Separator,ne(n,{"data-slot":"dropdown-menu-separator",get classList(){return{...t.classList,[t.class??""]:!!t.class}}}))}function ebe(e){const[t,n]=se(e,["class","classList","children"]);return b(Hn.Group,ne(n,{"data-slot":"dropdown-menu-group",get classList(){return{...t.classList,[t.class??""]:!!t.class}},get children(){return t.children}}))}function tbe(e){const[t,n]=se(e,["class","classList","children"]);return b(Hn.GroupLabel,ne(n,{"data-slot":"dropdown-menu-group-label",get classList(){return{...t.classList,[t.class??""]:!!t.class}},get children(){return t.children}}))}function nbe(e){const[t,n]=se(e,["class","classList","children"]);return b(Hn.Item,ne(n,{"data-slot":"dropdown-menu-item",get classList(){return{...t.classList,[t.class??""]:!!t.class}},get children(){return t.children}}))}function rbe(e){const[t,n]=se(e,["class","classList","children"]);return b(Hn.ItemLabel,ne(n,{"data-slot":"dropdown-menu-item-label",get classList(){return{...t.classList,[t.class??""]:!!t.class}},get children(){return t.children}}))}function ibe(e){const[t,n]=se(e,["class","classList","children"]);return b(Hn.ItemDescription,ne(n,{"data-slot":"dropdown-menu-item-description",get classList(){return{...t.classList,[t.class??""]:!!t.class}},get children(){return t.children}}))}function obe(e){const[t,n]=se(e,["class","classList","children"]);return b(Hn.ItemIndicator,ne(n,{"data-slot":"dropdown-menu-item-indicator",get classList(){return{...t.classList,[t.class??""]:!!t.class}},get children(){return t.children}}))}function sbe(e){const[t,n]=se(e,["class","classList","children"]);return b(Hn.RadioGroup,ne(n,{"data-slot":"dropdown-menu-radio-group",get classList(){return{...t.classList,[t.class??""]:!!t.class}},get children(){return t.children}}))}function abe(e){const[t,n]=se(e,["class","classList","children"]);return b(Hn.RadioItem,ne(n,{"data-slot":"dropdown-menu-radio-item",get classList(){return{...t.classList,[t.class??""]:!!t.class}},get children(){return t.children}}))}function lbe(e){const[t,n]=se(e,["class","classList","children"]);return b(Hn.CheckboxItem,ne(n,{"data-slot":"dropdown-menu-checkbox-item",get classList(){return{...t.classList,[t.class??""]:!!t.class}},get children(){return t.children}}))}function cbe(e){return b(Hn.Sub,e)}function ube(e){const[t,n]=se(e,["class","classList","children"]);return b(Hn.SubTrigger,ne(n,{"data-slot":"dropdown-menu-sub-trigger",get classList(){return{...t.classList,[t.class??""]:!!t.class}},get children(){return t.children}}))}function dbe(e){const[t,n]=se(e,["class","classList","children"]);return b(Hn.SubContent,ne(n,{"data-component":"dropdown-menu-sub-content",get classList(){return{...t.classList,[t.class??""]:!!t.class}},get children(){return t.children}}))}const on=Object.assign(Gye,{Trigger:Kye,Icon:Zye,Portal:Yye,Content:Xye,Arrow:Jye,Separator:Qye,Group:ebe,GroupLabel:tbe,Item:nbe,ItemLabel:rbe,ItemDescription:ibe,ItemIndicator:obe,RadioGroup:sbe,RadioItem:abe,CheckboxItem:lbe,Sub:cbe,SubTrigger:ube,SubContent:dbe});var fbe=ee("<div>"),Ug=class{x;y;width;height;constructor(t){this.x=Math.floor(t.x),this.y=Math.floor(t.y),this.width=Math.floor(t.width),this.height=Math.floor(t.height)}get rect(){return{x:this.x,y:this.y,width:this.width,height:this.height}}get left(){return this.x}get top(){return this.y}get right(){return this.x+this.width}get bottom(){return this.y+this.height}get center(){return{x:this.x+this.width*.5,y:this.y+this.height*.5}}get corners(){return{topLeft:{x:this.left,y:this.top},topRight:{x:this.right,y:this.top},bottomRight:{x:this.left,y:this.bottom},bottomLeft:{x:this.right,y:this.bottom}}}},Rc=e=>{let t=new Ug(e.getBoundingClientRect());const{transform:n}=getComputedStyle(e);return n&&(t=hbe(t,n)),t},hbe=(e,t)=>{let n,r;if(t.startsWith("matrix3d(")){const i=t.slice(9,-1).split(/, /);n=+i[12],r=+i[13]}else if(t.startsWith("matrix(")){const i=t.slice(7,-1).split(/, /);n=+i[4],r=+i[5]}else n=0,r=0;return new Ug({...e,x:e.x-n,y:e.y-r})},lo=()=>({x:0,y:0}),xk=(e,t)=>e.x===t.x&&e.y===t.y,sy=(e,t)=>new Ug({...e,x:e.x+t.x,y:e.y+t.y}),mbe=(e,t)=>Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2)),pbe=(e,t)=>{const n=Math.max(e.top,t.top),r=Math.max(e.left,t.left),i=Math.min(e.right,t.right),o=Math.min(e.bottom,t.bottom),s=i-r,a=o-n;if(r<i&&n<o){const l=e.width*e.height,c=t.width*t.height,u=s*a;return u/(l+c-u)}return 0},ay=(e,t)=>e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height,ZR=(e,t,n)=>{const r=e.transformed.center,i={distance:1/0,droppable:null};for(const o of t){const s=mbe(r,o.layout.center);s<i.distance?(i.distance=s,i.droppable=o):s===i.distance&&o.id===n.activeDroppableId&&(i.droppable=o)}return i.droppable},gbe=(e,t,n)=>{const r=e.transformed,i={ratio:0,droppable:null};for(const o of t){const s=pbe(r,o.layout);s>i.ratio?(i.ratio=s,i.droppable=o):s>0&&s===i.ratio&&o.id===n.activeDroppableId&&(i.droppable=o)}return i.droppable},YR=pt(),XR=e=>{const t=ne({collisionDetector:gbe},e),[n,r]=Je({draggables:{},droppables:{},sensors:{},active:{draggableId:null,get draggable(){return n.active.draggableId!==null?n.draggables[n.active.draggableId]:null},droppableId:null,get droppable(){return n.active.droppableId!==null?n.droppables[n.active.droppableId]:null},sensorId:null,get sensor(){return n.active.sensorId!==null?n.sensors[n.active.sensorId]:null},overlay:null}}),i=(A,T,N)=>{A.substring(0,A.length-1),ot(()=>n[A][T])&&r(A,T,"transformers",N.id,N)},o=(A,T,N)=>{A.substring(0,A.length-1),ot(()=>n[A][T])&&ot(()=>n[A][T].transformers[N])&&r(A,T,"transformers",N,void 0)},s=({id:A,node:T,layout:N,data:W})=>{const K=n.draggables[A],V={id:A,node:T,layout:N,data:W,_pendingCleanup:!1};let q;if(!K)Object.defineProperties(V,{transformers:{enumerable:!0,configurable:!0,writable:!0,value:{}},transform:{enumerable:!0,configurable:!0,get:()=>{if(n.active.overlay)return lo();const B=Object.values(n.draggables[A].transformers);return B.sort((Y,J)=>Y.order-J.order),B.reduce((Y,J)=>J.callback(Y),lo())}},transformed:{enumerable:!0,configurable:!0,get:()=>sy(n.draggables[A].layout,n.draggables[A].transform)}});else if(n.active.draggableId===A&&!n.active.overlay){const B={x:K.layout.x-N.x,y:K.layout.y-N.y},Y="addDraggable-existing-offset",J=K.transformers[Y],ge=J?J.callback(B):B;q={id:Y,order:100,callback:ae=>({x:ae.x+ge.x,y:ae.y+ge.y})},M(()=>o("draggables",A,Y))}Xe(()=>{r("draggables",A,V),q&&i("draggables",A,q)}),n.active.draggable&&k()},a=A=>{ot(()=>n.draggables[A])&&(r("draggables",A,"_pendingCleanup",!0),queueMicrotask(()=>l(A)))},l=A=>{if(n.draggables[A]?._pendingCleanup){const T=n.active.draggableId===A;Xe(()=>{T&&r("active","draggableId",null),r("draggables",A,void 0)})}},c=({id:A,node:T,layout:N,data:W})=>{const K=n.droppables[A],V={id:A,node:T,layout:N,data:W,_pendingCleanup:!1};K||Object.defineProperties(V,{transformers:{enumerable:!0,configurable:!0,writable:!0,value:{}},transform:{enumerable:!0,configurable:!0,get:()=>{const q=Object.values(n.droppables[A].transformers);return q.sort((B,Y)=>B.order-Y.order),q.reduce((B,Y)=>Y.callback(B),lo())}},transformed:{enumerable:!0,configurable:!0,get:()=>sy(n.droppables[A].layout,n.droppables[A].transform)}}),r("droppables",A,V),n.active.draggable&&k()},u=A=>{ot(()=>n.droppables[A])&&(r("droppables",A,"_pendingCleanup",!0),queueMicrotask(()=>d(A)))},d=A=>{if(n.droppables[A]?._pendingCleanup){const T=n.active.droppableId===A;Xe(()=>{T&&r("active","droppableId",null),r("droppables",A,void 0)})}},h=({id:A,activators:T})=>{r("sensors",A,{id:A,activators:T,coordinates:{origin:{x:0,y:0},current:{x:0,y:0},get delta(){return{x:n.sensors[A].coordinates.current.x-n.sensors[A].coordinates.origin.x,y:n.sensors[A].coordinates.current.y-n.sensors[A].coordinates.origin.y}}}})},f=A=>{if(!ot(()=>n.sensors[A]))return;const T=n.active.sensorId===A;Xe(()=>{T&&r("active","sensorId",null),r("sensors",A,void 0)})},m=({node:A,layout:T})=>{const N=n.active.overlay,W={node:A,layout:T};N||Object.defineProperties(W,{id:{enumerable:!0,configurable:!0,get:()=>n.active.draggable?.id},data:{enumerable:!0,configurable:!0,get:()=>n.active.draggable?.data},transformers:{enumerable:!0,configurable:!0,get:()=>Object.fromEntries(Object.entries(n.active.draggable?n.active.draggable.transformers:{}).filter(([K])=>K!=="addDraggable-existing-offset"))},transform:{enumerable:!0,configurable:!0,get:()=>{const K=Object.values(n.active.overlay?n.active.overlay.transformers:[]);return K.sort((V,q)=>V.order-q.order),K.reduce((V,q)=>q.callback(V),lo())}},transformed:{enumerable:!0,configurable:!0,get:()=>n.active.overlay?sy(n.active.overlay.layout,n.active.overlay.transform):new Ug({x:0,y:0,width:0,height:0})}}),r("active","overlay",W)},p=()=>r("active","overlay",null),g=(A,T)=>{Xe(()=>{r("sensors",A,"coordinates",{origin:{...T},current:{...T}}),r("active","sensorId",A)})},v=A=>{const T=n.active.sensorId;T&&r("sensors",T,"coordinates","current",{...A})},y=()=>r("active","sensorId",null),w=(A,T)=>{const N={};for(const K of Object.values(n.sensors))if(K)for(const[V,q]of Object.entries(K.activators))N[V]??=[],N[V].push({sensor:K,activator:q});const W={};for(const K in N){let V=K;T&&(V=`on${K}`),W[V]=q=>{for(const{activator:B}of N[K]){if(n.active.sensor)break;B(q,A)}}}return W},k=()=>{let A=!1;const T=Object.values(n.draggables),N=Object.values(n.droppables),W=n.active.overlay;return Xe(()=>{const K=new WeakMap;for(const V of T)if(V){const q=V.layout;K.has(V.node)||K.set(V.node,Rc(V.node));const B=K.get(V.node);ay(q,B)||(r("draggables",V.id,"layout",B),A=!0)}for(const V of N)if(V){const q=V.layout;K.has(V.node)||K.set(V.node,Rc(V.node));const B=K.get(V.node);ay(q,B)||(r("droppables",V.id,"layout",B),A=!0)}if(W){const V=W.layout,q=Rc(W.node);ay(V,q)||(r("active","overlay","layout",q),A=!0)}}),A},x=()=>{const A=n.active.overlay??n.active.draggable;if(A){const T=t.collisionDetector(A,Object.values(n.droppables),{activeDroppableId:n.active.droppableId}),N=T?T.id:null;n.active.droppableId!==N&&r("active","droppableId",N)}},C=A=>{const T={id:"sensorMove",order:0,callback:N=>n.active.sensor?{x:N.x+n.active.sensor.coordinates.delta.x,y:N.y+n.active.sensor.coordinates.delta.y}:N};k(),Xe(()=>{r("active","draggableId",A),i("draggables",A,T)}),x()},S=()=>{const A=ot(()=>n.active.draggableId);Xe(()=>{A!==null&&o("draggables",A,"sensorMove"),r("active",["draggableId","droppableId"],null)}),k()},$=A=>{re(()=>{const T=n.active.draggable;T&&ot(()=>A({draggable:T}))})},O=A=>{re(()=>{const T=n.active.draggable;if(T){const N=ot(()=>n.active.overlay);Object.values(N?N.transform:T.transform),ot(()=>A({draggable:T,overlay:N}))}})},D=A=>{re(()=>{const T=n.active.draggable,N=n.active.droppable;T&&ot(()=>A({draggable:T,droppable:N,overlay:n.active.overlay}))})},M=A=>{re(({previousDraggable:T,previousDroppable:N,previousOverlay:W})=>{const K=n.active.draggable,V=K?n.active.droppable:null,q=K?n.active.overlay:null;return!K&&T&&ot(()=>A({draggable:T,droppable:N,overlay:W})),{previousDraggable:K,previousDroppable:V,previousOverlay:q}},{previousDraggable:null,previousDroppable:null,previousOverlay:null})};O(()=>x()),t.onDragStart&&$(t.onDragStart),t.onDragMove&&O(t.onDragMove),t.onDragOver&&D(t.onDragOver),t.onDragEnd&&M(t.onDragEnd);const L=[n,{addTransformer:i,removeTransformer:o,addDraggable:s,removeDraggable:a,addDroppable:c,removeDroppable:u,addSensor:h,removeSensor:f,setOverlay:m,clearOverlay:p,recomputeLayouts:k,detectCollisions:x,draggableActivators:w,sensorStart:g,sensorMove:v,sensorEnd:y,dragStart:C,dragEnd:S,onDragStart:$,onDragMove:O,onDragOver:D,onDragEnd:M}];return b(YR.Provider,{value:L,get children(){return t.children}})},Hl=()=>ut(YR)||null,vbe=(e="pointer-sensor")=>{const[t,{addSensor:n,removeSensor:r,sensorStart:i,sensorMove:o,sensorEnd:s,dragStart:a,dragEnd:l}]=Hl(),c=250,u=10;Kt(()=>{n({id:e,activators:{pointerdown:p}})}),fe(()=>{r(e)});const d=()=>t.active.sensorId===e,h={x:0,y:0};let f=null,m=null;const p=(x,C)=>{x.button===0&&(document.addEventListener("pointermove",y),document.addEventListener("pointerup",w),m=C,h.x=x.clientX,h.y=x.clientY,f=window.setTimeout(v,c))},g=()=>{f&&(clearTimeout(f),f=null),document.removeEventListener("pointermove",y),document.removeEventListener("pointerup",w),document.removeEventListener("selectionchange",k)},v=()=>{t.active.sensor?d()||g():(i(e,h),a(m),k(),document.addEventListener("selectionchange",k))},y=x=>{const C={x:x.clientX,y:x.clientY};if(!t.active.sensor){const S={x:C.x-h.x,y:C.y-h.y};Math.sqrt(S.x**2+S.y**2)>u&&v()}d()&&(x.preventDefault(),o(C))},w=x=>{g(),d()&&(x.preventDefault(),l(),s())},k=()=>{window.getSelection()?.removeAllRanges()}},JR=e=>(vbe(),je(()=>e.children)),Hg=e=>({transform:`translate3d(${e.x}px, ${e.y}px, 0)`}),ybe=(e,t={})=>{const[n,{addDraggable:r,removeDraggable:i,draggableActivators:o}]=Hl(),[s,a]=de(null);Kt(()=>{const d=s();d&&r({id:e,node:d,layout:Rc(d),data:t})}),fe(()=>i(e));const l=()=>n.active.draggableId===e,c=()=>n.draggables[e]?.transform||lo();return Object.defineProperties((d,h)=>{const f=h?h():{};re(()=>{const m=s(),p=o(e);if(m)for(const g in p)m.addEventListener(g,p[g]);fe(()=>{if(m)for(const g in p)m.removeEventListener(g,p[g])})}),a(d),f.skipTransform||re(()=>{const m=c();if(xk(m,lo()))d.style.removeProperty("transform");else{const p=Hg(c());d.style.setProperty("transform",p.transform??null)}})},{ref:{enumerable:!0,value:a},isActiveDraggable:{enumerable:!0,get:l},dragActivators:{enumerable:!0,get:()=>o(e,!0)},transform:{enumerable:!0,get:c}})},bbe=(e,t={})=>{const[n,{addDroppable:r,removeDroppable:i}]=Hl(),[o,s]=de(null);Kt(()=>{const u=o();u&&r({id:e,node:u,layout:Rc(u),data:t})}),fe(()=>i(e));const a=()=>n.active.droppableId===e,l=()=>n.droppables[e]?.transform||lo();return Object.defineProperties((u,d)=>{const h=d?d():{};s(u),h.skipTransform||re(()=>{const f=l();if(xk(f,lo()))u.style.removeProperty("transform");else{const m=Hg(l());u.style.setProperty("transform",m.transform??null)}})},{ref:{enumerable:!0,value:s},isActiveDroppable:{enumerable:!0,get:a},transform:{enumerable:!0,get:l}})},QR=e=>{const[t,{onDragStart:n,onDragEnd:r,setOverlay:i,clearOverlay:o}]=Hl();let s;n(({draggable:l})=>{i({node:l.node,layout:l.layout}),queueMicrotask(()=>{if(s){const c=Rc(s),u={x:(l.layout.width-c.width)/2,y:(l.layout.height-c.height)/2};c.x+=u.x,c.y+=u.y,i({node:s,layout:c})}})}),r(()=>queueMicrotask(o));const a=()=>{const l=t.active.overlay,c=t.active.draggable;return!l||!c?{}:{position:"fixed",transition:"transform 0s",top:`${l.layout.top}px`,left:`${l.layout.left}px`,"min-width":`${c.layout.width}px`,"min-height":`${c.layout.height}px`,...Hg(l.transform),...e.style}};return b(Os,{get mount(){return document.body},get children(){return b(ce,{get when(){return t.active.draggable},get children(){var l=fbe(),c=s;return typeof c=="function"?pr(c,l):s=l,j(l,(()=>{var u=je(()=>typeof e.children=="function");return()=>u()?e.children(t.active.draggable):e.children})()),De(u=>{var d=e.class,h=a();return d!==u.e&&Bo(l,u.e=d),u.t=up(l,h,u.t),u},{e:void 0,t:void 0}),l}})}})},wbe=(e,t,n)=>{const r=e.slice();return r.splice(n,0,...r.splice(t,1)),r},eN=pt(),tN=e=>{const[t]=Hl(),[n,r]=Je({initialIds:[],sortedIds:[]}),i=a=>a>=0&&a<n.initialIds.length;re(()=>{r("initialIds",[...e.ids]),r("sortedIds",[...e.ids])}),re(()=>{t.active.draggableId&&t.active.droppableId?ot(()=>{const a=n.sortedIds.indexOf(t.active.draggableId),l=n.initialIds.indexOf(t.active.droppableId);if(!i(a)||!i(l))r("sortedIds",[...e.ids]);else if(a!==l){const c=wbe(n.sortedIds,a,l);r("sortedIds",c)}}):r("sortedIds",[...e.ids])});const s=[n,{}];return b(eN.Provider,{value:s,get children(){return e.children}})},kbe=()=>ut(eN)||null,xbe=(e,t)=>n=>{e(n),t(n)},nN=(e,t={})=>{const[n,{addTransformer:r,removeTransformer:i}]=Hl(),[o]=kbe(),s=ybe(e,t),a=bbe(e,t),l=xbe(s.ref,a.ref),c=()=>o.initialIds.indexOf(e),u=()=>o.sortedIds.indexOf(e),d=g=>n.droppables[g]?.layout||null,h=()=>{const g=lo(),v=c(),y=u();if(y!==v){const w=d(e),k=d(o.initialIds[y]);w&&k&&(g.x=k.x-w.x,g.y=k.y-w.y)}return g},f={id:"sortableOffset",order:100,callback:g=>{const v=h();return{x:g.x+v.x,y:g.y+v.y}}};Kt(()=>r("droppables",e,f)),fe(()=>i("droppables",e,f.id));const m=()=>(e===n.active.draggableId&&!n.active.overlay?n.draggables[e]?.transform:n.droppables[e]?.transform)||lo();return Object.defineProperties(g=>{s(g,()=>({skipTransform:!0})),a(g,()=>({skipTransform:!0})),re(()=>{const v=m();if(xk(v,lo()))g.style.removeProperty("transform");else{const y=Hg(m());g.style.setProperty("transform",y.transform??null)}})},{ref:{enumerable:!0,value:l},transform:{enumerable:!0,get:m},isActiveDraggable:{enumerable:!0,get:()=>s.isActiveDraggable},dragActivators:{enumerable:!0,get:()=>s.dragActivators},isActiveDroppable:{enumerable:!0,get:()=>a.isActiveDroppable}})};function Sbe(e){const t={locs:[],timer:void 0,pending:void 0,over:void 0,last:void 0},n=e.delay??250,r=e.max??4,i=e.tolerance??80,o=e.edge??18,s=()=>{t.timer!==void 0&&clearTimeout(t.timer),t.timer=void 0,t.pending=void 0},a=()=>{s(),t.over=void 0,t.last=void 0,t.locs.length=0},l=m=>{if(!e.enabled())return;const p=e.el();if(!p)return;const g=p.getBoundingClientRect(),v=m.clientX,y=m.clientY;v<g.left||v>g.right||y<g.top||y>g.bottom||(t.locs.push({x:v,y}),t.locs.length>r&&t.locs.shift())},c=()=>{if(!e.enabled()||!e.active())return 0;const m=e.el();if(!m||t.locs.length<2)return 0;const p=m.getBoundingClientRect(),g=t.locs[t.locs.length-1];if(!g)return 0;const v=t.locs[0]??g;if(v.x<p.left||v.x>p.right||v.y<p.top||v.y>p.bottom||t.last&&g.x===t.last.x&&g.y===t.last.y)return 0;if(p.right-g.x<=o)return t.last=g,n;const y={x:p.right,y:p.top-i},w={x:p.right,y:p.bottom+i},k=(O,D)=>(D.y-O.y)/(D.x-O.x),x=k(g,y),C=k(g,w),S=k(v,y),$=k(v,w);return x<S&&C>$?(t.last=g,n):(t.last=void 0,0)},u=m=>{s(),e.onActivate(m)},d=m=>{if(!m||e.active()===m)return;if(!e.active()){u(m);return}const p=c();if(p===0){u(m);return}s(),t.pending=m,t.timer=window.setTimeout(()=>{t.timer=void 0,t.pending===m&&(t.pending=void 0,e.enabled()&&e.active()&&t.over===m&&e.onActivate(m))},p)};return{move:l,enter:(m,p)=>{e.enabled()&&(t.over=m,l(p),d(m))},leave:m=>{t.over===m&&(t.over=void 0),t.pending===m&&s()},activate:u,request:d,cancel:s,reset:a}}let L2;const _be=e=>{L2=e},rN=e=>{if(window.focus(),!!e){if(L2)return L2(e);console.warn("notification-click: navigate function not set, falling back to window.location.assign"),window.location.assign(e)}};function Cbe(e){return e.desktop===!0&&e.enabled}function Ibe(e){return!(e.desktopNativeNotificationEnabled||e.currentSessionTarget||e.childSessionTarget)}const td=(e,t="default")=>`${t}
2436
2436
  ${e.replace(/[\\/]+$/,"")}`,uc=new Map,dc=new Map;function Tbe(){const e={resolve:n=>{}};return{promise:new Promise(n=>{e.resolve=n}),resolve:e.resolve}}const g0={get(e,t){return uc.get(td(e,t))},pending(e,t){const n=td(e,t),r=uc.get(n);r&&r.status!=="pending"||uc.set(n,{status:"pending"})},ready(e,t){const n=td(e,t),r={status:"ready"};uc.set(n,r);const i=dc.get(n);i&&(dc.delete(n),i.resolve(r))},failed(e,t,n){const r=td(e,n),i={status:"failed",message:t};uc.set(r,i);const o=dc.get(r);o&&(dc.delete(r),o.resolve(i))},wait(e,t){const n=td(e,t),r=uc.get(n);if(r&&r.status!=="pending")return Promise.resolve(r);const i=dc.get(n);if(i)return i.promise;const o=Tbe();return dc.set(n,o),o.promise}},Ebe=40,vf={session:new Map,terminal:new Map},Bg=(e,t)=>`${e}
2437
- ${t}`,iN=(e,t,n)=>{for(e.delete(t),e.set(t,n);e.size>Ebe;){const r=e.keys().next().value;if(r===void 0)return;e.delete(r)}},$be=(e,t,n)=>{const r=Bg(e,t),i=vf.session.get(r)??{prompt:"",files:{}};iN(vf.session,r,{...i,...n})},R3e=(e,t)=>vf.session.get(Bg(e,t)),N3e=(e,t,n)=>{iN(vf.terminal,Bg(e,t),n)},z3e=(e,t)=>vf.terminal.get(Bg(e,t)),Abe=e=>typeof e!="object"||e===null?!1:"draggable"in e,tp=e=>{if(!Abe(e))return;const t=e.draggable;if(t)return typeof t.id=="string"?t.id:void 0},Lbe=(e,t)=>({id:e,order:100,callback:n=>t==="x"?{...n,x:0}:{...n,y:0}}),oN=(e,t)=>()=>{const n=Hl();if(!n)return null;const[,{onDragStart:r,onDragEnd:i,addTransformer:o,removeTransformer:s}]=n,a=Lbe(t,e),l=jn(c=>(r(u=>{const d=tp(u);d&&o("draggables",d,a)}),i(u=>{const d=tp(u);d&&s("draggables",d,a.id)}),c));return fe(l),null},sN=oN("x","constrain-x-axis"),j3e=oN("y","constrain-y-axis");var Dbe=ee('<div><div class="text-[10px] leading-none font-black uppercase tracking-[0.04em] opacity-70"></div><div>'),Mbe=ee('<aside class="pointer-events-auto fixed bottom-3 right-3 z-50 w-[308px] max-w-[calc(100vw-1.5rem)] overflow-hidden rounded-xl border border-border-base bg-surface-raised-stronger-non-alpha p-0.5 text-text-strong shadow-[var(--shadow-lg-border-base)] sm:bottom-4 sm:right-4 sm:w-[324px]"><div class="grid grid-cols-5 gap-px font-mono">');const ly=5e3,Obe=(e,t=0)=>{if(!(e===void 0||Number.isNaN(e)))return`${e.toFixed(t)}ms`},nd=e=>{if(!(e===void 0||Number.isNaN(e)))return`${Math.round(e)}`},n9=e=>{if(e===void 0||Number.isNaN(e))return;const t=e/1024/1024;return`${t>=1024?t.toFixed(0):t.toFixed(1)}MB`},hs=(e,t,n=!1)=>e===void 0||Number.isNaN(e)?!1:n?e<t:e>t,cy=e=>e.includes("/session");function ms(e){return b(bn,{get value(){return e.tip},placement:"top",get children(){var t=Dbe(),n=t.firstChild,r=n.nextSibling;return j(n,()=>e.label),j(r,()=>e.value),De(i=>{var o={"flex min-h-[42px] w-full min-w-0 flex-col items-center justify-center rounded-[8px] px-0.5 py-1 text-center":!0,"col-span-2":!!e.wide},s={"text-[13px] leading-none font-bold tabular-nums sm:text-[14px]":!0,"text-text-on-critical-base":!!e.bad,"opacity-70":!!e.dim};return i.e=Ct(t,o,i.e),i.t=Ct(r,s,i.t),i},{e:void 0,t:void 0}),t}})}function Pbe(){const e=At(),t=So(),n=Zne(),[r,i]=Je({cls:void 0,delay:void 0,fps:void 0,gap:void 0,heap:{limit:void 0,used:void 0},inp:void 0,jank:void 0,long:{block:void 0,count:void 0,max:void 0},nav:{dur:void 0,pending:!1}}),o=()=>e.t("debugBar.na"),s=()=>r.heap.limit?(r.heap.used??0)/r.heap.limit:void 0,a=()=>{const p=s();return p===void 0?o():`${Math.round(p*100)}%`},l=()=>r.long.count===void 0?o():`${nd(r.long.block)??o()}/${r.long.count}`,c=()=>r.nav.pending?"...":nd(r.nav.dur)??o();let u="",d=0,h=!1,f=0,m=0;return re(()=>{const p=n(),g=`${t.pathname}${t.search}`;if(!h){h=!0,u=g;return}if(p){if(f!==0&&cancelAnimationFrame(f),m!==0&&cancelAnimationFrame(m),f=0,m=0,d!==0)return;d=performance.now(),cy(u)&&i("nav",{dur:void 0,pending:!0});return}if(d===0){u=g;return}const v=d,y=u;d=0,u=g,(cy(y)||cy(g))&&(f!==0&&cancelAnimationFrame(f),m!==0&&cancelAnimationFrame(m),f=requestAnimationFrame(()=>{f=0,m=requestAnimationFrame(()=>{m=0,i("nav",{dur:performance.now()-v,pending:!1})})}))}),Kt(()=>{const p=[],g=[],v=[],y=new Map;let w=!1,k,x=0,C=0,S=0;const $=(V,q,B)=>{for(;V[0]&&B-V[0].at>q;)V.shift()},O=V=>{$(g,ly,V);const q=g.reduce((J,ge)=>J+ge.dur,0),B=g.reduce((J,ge)=>Math.max(J,ge.dur),0),Y=g.filter(J=>J.dur>32).length;Xe(()=>{i("fps",q>0?g.length*1e3/q:void 0),i("gap",B>0?B:void 0),i("jank",Y)})},D=(V=performance.now())=>{if(!w)return;$(v,ly,V);const q=v.reduce((Y,J)=>Y+Math.max(0,J.dur-50),0),B=v.reduce((Y,J)=>Math.max(Y,J.dur),0);i("long",{block:q,count:v.length,max:B})},M=(V=performance.now())=>{for(const[Y,J]of y)V-J.at>ly&&y.delete(Y);let q=0,B=0;for(const Y of y.values())q=Math.max(q,Y.delay),B=Math.max(B,Y.dur);Xe(()=>{i("delay",q>0?q:void 0),i("inp",B>0?B:void 0)})},I=()=>{const V=performance.memory;V&&i("heap",{limit:V.jsHeapSizeLimit,used:V.usedJSHeapSize})},L=()=>{g.length=0,v.length=0,y.clear(),C=0,S=0,Xe(()=>{i("fps",void 0),i("gap",void 0),i("jank",void 0),i("delay",void 0),i("inp",void 0),w&&i("long",{block:0,count:0,max:0})})},A=(V,q,B)=>{if(typeof PerformanceObserver>"u"||!(PerformanceObserver.supportedEntryTypes??[]).includes(V))return!1;const Y=new PerformanceObserver(J=>B(J.getEntries()));try{return Y.observe(q),p.push(Y),!0}catch{return Y.disconnect(),!1}};A("layout-shift",{buffered:!0,type:"layout-shift"},V=>{const q=V.reduce((B,Y)=>{const J=Y;return J.hadRecentInput?B:B+J.value},0);q!==0&&i("cls",B=>(B??0)+q)})&&i("cls",0),A("longtask",{buffered:!0,type:"longtask"},V=>{const q=performance.now();v.push(...V.map(B=>({at:B.startTime,dur:B.duration}))),D(q)})&&(w=!0,i("long",{block:0,count:0,max:0})),A("event",{buffered:!0,durationThreshold:16,type:"event"},V=>{for(const q of V){const B=q;if(B.duration<16)continue;const Y=B.interactionId&&B.interactionId>0?B.interactionId:`${B.name}:${Math.round(B.startTime)}`,J=y.get(Y),ge=Math.max(0,(B.processingStart??B.startTime)-B.startTime);if(y.set(Y,{at:B.startTime,delay:Math.max(J?.delay??0,ge),dur:Math.max(J?.dur??0,B.duration)}),y.size<=200)continue;const ae=y.keys().next().value;ae!==void 0&&y.delete(ae)}M()});const T=V=>{if(document.visibilityState!=="visible"){x=0;return}if(C===0){C=V,x=requestAnimationFrame(T);return}g.push({at:V,dur:V-C}),C=V,V-S>=250&&(S=V,O(V)),x=requestAnimationFrame(T)},N=()=>{x!==0&&cancelAnimationFrame(x),x=0,k!==void 0&&(clearInterval(k),k=void 0)},W=()=>{document.visibilityState==="visible"&&(k===void 0&&(k=window.setInterval(()=>{D(),M(),I()},1e3)),x===0&&(x=requestAnimationFrame(T)))},K=()=>{if(document.visibilityState!=="visible"){N();return}L(),W()};I(),W(),Ln(document,"visibilitychange",K),fe(()=>{f!==0&&cancelAnimationFrame(f),m!==0&&cancelAnimationFrame(m),N();for(const V of p)V.disconnect()})}),(()=>{var p=Mbe(),g=p.firstChild;return j(g,b(ms,{get label(){return e.t("debugBar.nav.label")},get tip(){return e.t("debugBar.nav.tip")},get value(){return c()},get bad(){return hs(r.nav.dur,400)},get dim(){return je(()=>r.nav.dur===void 0)()&&!r.nav.pending}}),null),j(g,b(ms,{get label(){return e.t("debugBar.fps.label")},get tip(){return e.t("debugBar.fps.tip")},get value(){return je(()=>r.fps===void 0)()?o():`${Math.round(r.fps)}`},get bad(){return hs(r.fps,50,!0)},get dim(){return r.fps===void 0}}),null),j(g,b(ms,{get label(){return e.t("debugBar.frame.label")},get tip(){return e.t("debugBar.frame.tip")},get value(){return nd(r.gap)??o()},get bad(){return hs(r.gap,50)},get dim(){return r.gap===void 0}}),null),j(g,b(ms,{get label(){return e.t("debugBar.jank.label")},get tip(){return e.t("debugBar.jank.tip")},get value(){return je(()=>r.jank===void 0)()?o():`${r.jank}`},get bad(){return hs(r.jank,8)},get dim(){return r.jank===void 0}}),null),j(g,b(ms,{get label(){return e.t("debugBar.long.label")},get tip(){return e.t("debugBar.long.tip",{max:Obe(r.long.max)??o()})},get value(){return l()},get bad(){return hs(r.long.block,200)},get dim(){return r.long.count===void 0}}),null),j(g,b(ms,{get label(){return e.t("debugBar.delay.label")},get tip(){return e.t("debugBar.delay.tip")},get value(){return nd(r.delay)??o()},get bad(){return hs(r.delay,100)},get dim(){return r.delay===void 0}}),null),j(g,b(ms,{get label(){return e.t("debugBar.inp.label")},get tip(){return e.t("debugBar.inp.tip")},get value(){return nd(r.inp)??o()},get bad(){return hs(r.inp,200)},get dim(){return r.inp===void 0}}),null),j(g,b(ms,{get label(){return e.t("debugBar.cls.label")},get tip(){return e.t("debugBar.cls.tip")},get value(){return je(()=>r.cls===void 0)()?o():r.cls.toFixed(2)},get bad(){return hs(r.cls,.1)},get dim(){return r.cls===void 0}}),null),j(g,b(ms,{get label(){return e.t("debugBar.mem.label")},get tip(){return je(()=>r.heap.used===void 0)()?e.t("debugBar.mem.tipUnavailable"):e.t("debugBar.mem.tip",{used:n9(r.heap.used)??o(),limit:n9(r.heap.limit)??o()})},get value(){return a()},get bad(){return hs(s(),.8)},get dim(){return r.heap.used===void 0},wide:!0}),null),De(()=>Ye(p,"aria-label",e.t("debugBar.ariaLabel"))),p})()}const Rbe="__cp-mobile-close-button",r9="__cpMobileBackEmbedded",Nbe=()=>typeof navigator!="object"||!navigator.userAgent?!1:/Codeplane\/Mobile/.test(navigator.userAgent),zbe=()=>{try{const e=window.mobileApp;if(e&&typeof e.close=="function"){e.close();return}}catch{}try{window.webkit?.messageHandlers?.close?.postMessage(null)}catch{}};function jbe(e){const[t,n]=se(e,["visible","label","class","classList"]),r=F(()=>typeof t.visible=="boolean"?t.visible:Nbe());return Kt(()=>{!r()||typeof window>"u"||(window[r9]=!0)}),fe(()=>{typeof window>"u"||delete window[r9]}),b(ce,{get when(){return r()},get children(){return b(bn,{placement:"bottom",get value(){return t.label??"Back"},get children(){return b(Gt,ne(n,{id:Rbe,variant:"ghost",icon:"chevron-left",get"aria-label"(){return t.label??"Back"},get class(){return t.class},get classList(){return t.classList},onClick:()=>zbe()}))}})}})}const Sk=100;function Fbe(e,t,n=Sk){if(!e.stack.length){const i=t==="/"?["/"]:["/",t];return{stack:i,index:i.length-1,action:void 0}}const r=e.stack[e.index];return t===r?e.action?{...e,action:void 0}:e:e.action?{...e,action:void 0}:Ube(e,t,n)}function Ube(e,t,n=Sk){const r=e.stack.slice(0,e.index+1).concat(t),i=Hbe(r,r.length-1,n);return{...e,...i,action:void 0}}function Hbe(e,t,n=Sk){if(e.length<=n)return{stack:e,index:t};const r=e.length-n;return{stack:e.slice(r),index:Math.max(0,t-r)}}function Bbe(e){if(e.index<=0)return;const t=e.index-1,n=e.stack[t];if(n)return{state:{...e,index:t,action:"back"},to:n}}function Vbe(e){if(e.index>=e.stack.length-1)return;const t=e.index+1,n=e.stack[t];if(n)return{state:{...e,index:t,action:"forward"},to:n}}var qbe={};vr(qbe,{Anchor:()=>lN,Arrow:()=>xi,CloseButton:()=>cN,Content:()=>uN,Description:()=>dN,Popover:()=>wd,Portal:()=>fN,Root:()=>hN,Title:()=>mN,Trigger:()=>pN,usePopoverContext:()=>$a});var aN=pt();function $a(){const e=ut(aN);if(e===void 0)throw new Error("[kobalte]: `usePopoverContext` must be used within a `Popover` component");return e}function lN(e){const t=$a(),[n,r]=se(e,["ref"]);return b(Ve,ne({as:"div",ref(i){var o=st(t.setDefaultAnchorRef,n.ref);typeof o=="function"&&o(i)}},()=>t.dataset(),r))}function cN(e){const t=$a(),[n,r]=se(e,["aria-label","onClick"]);return b(Jo,ne({get"aria-label"(){return n["aria-label"]||t.translations().dismiss},onClick:o=>{ze(o,n.onClick),t.close()}},()=>t.dataset(),r))}function uN(e){let t;const n=$a(),r=Ne({id:n.generateId("content")},e),[i,o]=se(r,["ref","style","onOpenAutoFocus","onCloseAutoFocus","onPointerDownOutside","onFocusOutside","onInteractOutside"]);let s=!1,a=!1,l=!1;const c=f=>{i.onCloseAutoFocus?.(f),n.isModal()?(f.preventDefault(),s||un(n.triggerRef())):(f.defaultPrevented||(a||un(n.triggerRef()),f.preventDefault()),a=!1,l=!1)},u=f=>{i.onPointerDownOutside?.(f),n.isModal()&&(s=f.detail.isContextMenu)},d=f=>{i.onFocusOutside?.(f),n.isOpen()&&n.isModal()&&f.preventDefault()},h=f=>{i.onInteractOutside?.(f),!n.isModal()&&(f.defaultPrevented||(a=!0,f.detail.originalEvent.type==="pointerdown"&&(l=!0)),Dn(n.triggerRef(),f.target)&&f.preventDefault(),f.detail.originalEvent.type==="focusin"&&l&&f.preventDefault())};return mp({isDisabled:()=>!(n.isOpen()&&n.isModal()),targets:()=>t?[t]:[]}),pp({element:()=>t??null,enabled:()=>n.contentPresent()&&n.preventScroll()}),hp({trapFocus:()=>n.isOpen()&&n.isModal(),onMountAutoFocus:i.onOpenAutoFocus,onUnmountAutoFocus:c},()=>t),re(()=>fe(n.registerContentId(o.id))),b(ce,{get when(){return n.contentPresent()},get children(){return b(is.Positioner,{get children(){return b(eu,ne({ref(f){var m=st(p=>{n.setContentRef(p),t=p},i.ref);typeof m=="function"&&m(f)},role:"dialog",tabIndex:-1,get disableOutsidePointerEvents(){return je(()=>!!n.isOpen())()&&n.isModal()},get excludedElements(){return[n.triggerRef]},get style(){return gr({"--kb-popover-content-transform-origin":"var(--kb-popper-content-transform-origin)",position:"relative"},i.style)},get"aria-labelledby"(){return n.titleId()},get"aria-describedby"(){return n.descriptionId()},onPointerDownOutside:u,onFocusOutside:d,onInteractOutside:h,get onDismiss(){return n.close}},()=>n.dataset(),o))}})}})}function dN(e){const t=$a(),n=Ne({id:t.generateId("description")},e),[r,i]=se(n,["id"]);return re(()=>fe(t.registerDescriptionId(r.id))),b(Ve,ne({as:"p",get id(){return r.id}},()=>t.dataset(),i))}function fN(e){const t=$a();return b(ce,{get when(){return t.contentPresent()},get children(){return b(Os,e)}})}var i9={dismiss:"Dismiss"};function hN(e){const t=`popover-${an()}`,n=Ne({id:t,modal:!1,translations:i9},e),[r,i]=se(n,["translations","id","open","defaultOpen","onOpenChange","modal","preventScroll","forceMount","anchorRef"]),[o,s]=de(),[a,l]=de(),[c,u]=de(),[d,h]=de(),[f,m]=de(),[p,g]=de(),v=Ps({open:()=>r.open,defaultOpen:()=>r.defaultOpen,onOpenChange:C=>r.onOpenChange?.(C)}),y=()=>r.anchorRef?.()??o()??a(),{present:w}=po({show:()=>r.forceMount||v.isOpen(),element:()=>c()??null}),k=F(()=>({"data-expanded":v.isOpen()?"":void 0,"data-closed":v.isOpen()?void 0:""})),x={translations:()=>r.translations??i9,dataset:k,isOpen:v.isOpen,isModal:()=>r.modal??!1,preventScroll:()=>r.preventScroll??x.isModal(),contentPresent:w,triggerRef:a,contentId:d,titleId:f,descriptionId:p,setDefaultAnchorRef:s,setTriggerRef:l,setContentRef:u,close:v.close,toggle:v.toggle,generateId:$r(()=>r.id),registerContentId:en(h),registerTitleId:en(m),registerDescriptionId:en(g)};return b(aN.Provider,{value:x,get children(){return b(is,ne({anchorRef:y,contentRef:c},i))}})}function mN(e){const t=$a(),n=Ne({id:t.generateId("title")},e),[r,i]=se(n,["id"]);return re(()=>fe(t.registerTitleId(r.id))),b(Ve,ne({as:"h2",get id(){return r.id}},()=>t.dataset(),i))}function pN(e){const t=$a(),[n,r]=se(e,["ref","onClick","onPointerDown"]);return b(Jo,ne({ref(s){var a=st(t.setTriggerRef,n.ref);typeof a=="function"&&a(s)},"aria-haspopup":"dialog",get"aria-expanded"(){return t.isOpen()},get"aria-controls"(){return je(()=>!!t.isOpen())()?t.contentId():void 0},onPointerDown:s=>{ze(s,n.onPointerDown),s.preventDefault()},onClick:s=>{ze(s,n.onClick),t.toggle()}},()=>t.dataset(),r))}var wd=Object.assign(hN,{Anchor:lN,Arrow:xi,CloseButton:cN,Content:uN,Description:dN,Portal:fN,Title:mN,Trigger:pN}),Vg=["id","name","validationState","required","disabled","readOnly"];function qg(e){const t=`form-control-${an()}`,n=Ne({id:t},e),[r,i]=de(),[o,s]=de(),[a,l]=de(),[c,u]=de(),d=(p,g,v)=>{const y=v!=null||r()!=null;return[v,r(),y&&g!=null?p:void 0].filter(Boolean).join(" ")||void 0},h=p=>[a(),c(),p].filter(Boolean).join(" ")||void 0,f=F(()=>({"data-valid":he(n.validationState)==="valid"?"":void 0,"data-invalid":he(n.validationState)==="invalid"?"":void 0,"data-required":he(n.required)?"":void 0,"data-disabled":he(n.disabled)?"":void 0,"data-readonly":he(n.readOnly)?"":void 0}));return{formControlContext:{name:()=>he(n.name)??he(n.id),dataset:f,validationState:()=>he(n.validationState),isRequired:()=>he(n.required),isDisabled:()=>he(n.disabled),isReadOnly:()=>he(n.readOnly),labelId:r,fieldId:o,descriptionId:a,errorMessageId:c,getAriaLabelledBy:d,getAriaDescribedBy:h,generateId:$r(()=>he(n.id)),registerLabel:en(i),registerField:en(s),registerDescription:en(l),registerErrorMessage:en(u)}}}var eh=pt();function Si(){const e=ut(eh);if(e===void 0)throw new Error("[kobalte]: `useFormControlContext` must be used within a `FormControlContext.Provider` component");return e}function Aa(e){const t=Si(),n=Ne({id:t.generateId("description")},e);return re(()=>fe(t.registerDescription(n.id))),b(Ve,ne({as:"div"},()=>t.dataset(),n))}var _k=["id","aria-label","aria-labelledby","aria-describedby"];function Ck(e){const t=Si(),n=Ne({id:t.generateId("field")},e);return re(()=>fe(t.registerField(he(n.id)))),{fieldProps:{id:()=>he(n.id),ariaLabel:()=>he(n["aria-label"]),ariaLabelledBy:()=>t.getAriaLabelledBy(he(n.id),he(n["aria-label"]),he(n["aria-labelledby"])),ariaDescribedBy:()=>t.getAriaDescribedBy(he(n["aria-describedby"]))}}}function th(e){let t;const n=Si(),r=Ne({id:n.generateId("label")},e),[i,o]=se(r,["ref"]),s=Sf(()=>t,()=>"label");return re(()=>fe(n.registerLabel(o.id))),b(Ve,ne({as:"label",ref(a){var l=st(c=>t=c,i.ref);typeof l=="function"&&l(a)},get for(){return je(()=>s()==="label")()?n.fieldId():void 0}},()=>n.dataset(),o))}function nh(e,t){re(gt(e,n=>{if(n==null)return;const r=Wbe(n);r!=null&&(r.addEventListener("reset",t,{passive:!0}),fe(()=>{r.removeEventListener("reset",t)}))}))}function Wbe(e){return Gbe(e)?e.form:e.closest("form")}function Gbe(e){return e.matches("textarea, input, select, button")}function La(e){const t=Si(),n=Ne({id:t.generateId("error-message")},e),[r,i]=se(n,["forceMount"]),o=()=>t.validationState()==="invalid";return re(()=>{o()&&fe(t.registerErrorMessage(i.id))}),b(ce,{get when(){return r.forceMount||o()},get children(){return b(Ve,ne({as:"div"},()=>t.dataset(),i))}})}var Kbe={};vr(Kbe,{Control:()=>vN,Description:()=>yN,ErrorMessage:()=>bN,Input:()=>wN,Label:()=>kN,Root:()=>xN,Switch:()=>ea,Thumb:()=>SN,useSwitchContext:()=>Bl});var gN=pt();function Bl(){const e=ut(gN);if(e===void 0)throw new Error("[kobalte]: `useSwitchContext` must be used within a `Switch` component");return e}function vN(e){const t=Si(),n=Bl(),r=Ne({id:n.generateId("control")},e),[i,o]=se(r,["onClick","onKeyDown"]);return b(Ve,ne({as:"div",onClick:l=>{ze(l,i.onClick),n.toggle(),n.inputRef()?.focus()},onKeyDown:l=>{ze(l,i.onKeyDown),l.key===dp.Space&&(n.toggle(),n.inputRef()?.focus())}},()=>t.dataset(),()=>n.dataset(),o))}function yN(e){const t=Bl();return b(Aa,ne(()=>t.dataset(),e))}function bN(e){const t=Bl();return b(La,ne(()=>t.dataset(),e))}function wN(e){const t=Si(),n=Bl(),r=Ne({id:n.generateId("input")},e),[i,o,s]=se(r,["ref","style","onChange","onFocus","onBlur"],_k),{fieldProps:a}=Ck(o);return b(Ve,ne({as:"input",ref(d){var h=st(n.setInputRef,i.ref);typeof h=="function"&&h(d)},type:"checkbox",role:"switch",get id(){return a.id()},get name(){return t.name()},get value(){return n.value()},get checked(){return n.checked()},get required(){return t.isRequired()},get disabled(){return t.isDisabled()},get readonly(){return t.isReadOnly()},get style(){return gr({...fp},i.style)},get"aria-checked"(){return n.checked()},get"aria-label"(){return a.ariaLabel()},get"aria-labelledby"(){return a.ariaLabelledBy()},get"aria-describedby"(){return a.ariaDescribedBy()},get"aria-invalid"(){return t.validationState()==="invalid"||void 0},get"aria-required"(){return t.isRequired()||void 0},get"aria-disabled"(){return t.isDisabled()||void 0},get"aria-readonly"(){return t.isReadOnly()||void 0},onChange:d=>{ze(d,i.onChange),d.stopPropagation();const h=d.target;n.setIsChecked(h.checked),h.checked=n.checked()},onFocus:d=>{ze(d,i.onFocus),n.setIsFocused(!0)},onBlur:d=>{ze(d,i.onBlur),n.setIsFocused(!1)}},()=>t.dataset(),()=>n.dataset(),s))}function kN(e){const t=Bl();return b(th,ne(()=>t.dataset(),e))}function xN(e){let t;const n=`switch-${an()}`,r=Ne({value:"on",id:n},e),[i,o,s]=se(r,["ref","children","value","checked","defaultChecked","onChange","onPointerDown"],Vg),[a,l]=de(),[c,u]=de(!1),{formControlContext:d}=qg(o),h=OR({isSelected:()=>i.checked,defaultIsSelected:()=>i.defaultChecked,onSelectedChange:g=>i.onChange?.(g),isDisabled:()=>d.isDisabled(),isReadOnly:()=>d.isReadOnly()});nh(()=>t,()=>h.setIsSelected(i.defaultChecked??!1));const f=g=>{ze(g,i.onPointerDown),c()&&g.preventDefault()},m=F(()=>({"data-checked":h.isSelected()?"":void 0})),p={value:()=>i.value,dataset:m,checked:()=>h.isSelected(),inputRef:a,generateId:$r(()=>he(o.id)),toggle:()=>h.toggle(),setIsChecked:g=>h.setIsSelected(g),setIsFocused:u,setInputRef:l};return b(eh.Provider,{value:d,get children(){return b(gN.Provider,{value:p,get children(){return b(Ve,ne({as:"div",ref(g){var v=st(y=>t=y,i.ref);typeof v=="function"&&v(g)},role:"group",get id(){return he(o.id)},onPointerDown:f},()=>d.dataset(),m,s,{get children(){return b(Zbe,{state:p,get children(){return i.children}})}}))}})}})}function Zbe(e){const t=Cl(()=>{const n=e.children;return kf(n)?n(e.state):n});return je(t)}function SN(e){const t=Si(),n=Bl(),r=Ne({id:n.generateId("thumb")},e);return b(Ve,ne({as:"div"},()=>t.dataset(),()=>n.dataset(),r))}var ea=Object.assign(xN,{Control:vN,Description:yN,ErrorMessage:bN,Input:wN,Label:kN,Thumb:SN});function Ybe(e){const[t,n]=se(e,["children","class","hideLabel","description"]);return b(ea,ne(n,{get class(){return t.class},"data-component":"switch",get children(){return[b(ea.Input,{"data-slot":"switch-input"}),b(ce,{get when(){return t.children},get children(){return b(ea.Label,{"data-slot":"switch-label",get classList(){return{"sr-only":t.hideLabel}},get children(){return t.children}})}}),b(ce,{get when(){return t.description},get children(){return b(ea.Description,{"data-slot":"switch-description",get children(){return t.description}})}}),b(ea.ErrorMessage,{"data-slot":"switch-error"}),b(ea.Control,{"data-slot":"switch-control",get children(){return b(ea.Thumb,{"data-slot":"switch-thumb"})}})]}}))}var Xbe=class{collection;direction;orientation;constructor(e,t,n){this.collection=e,this.direction=t,this.orientation=n}flipDirection(){return this.direction()==="rtl"&&this.orientation()==="horizontal"}getKeyLeftOf(e){if(this.flipDirection())return this.getNextKey(e);if(this.orientation()==="horizontal")return this.getPreviousKey(e)}getKeyRightOf(e){if(this.flipDirection())return this.getPreviousKey(e);if(this.orientation()==="horizontal")return this.getNextKey(e)}getKeyAbove(e){if(this.orientation()==="vertical")return this.getPreviousKey(e)}getKeyBelow(e){if(this.orientation()==="vertical")return this.getNextKey(e)}getFirstKey(){let e=this.collection().getFirstKey();return e==null?void 0:(this.collection().getItem(e)?.disabled&&(e=this.getNextKey(e)),e)}getLastKey(){let e=this.collection().getLastKey();return e==null?void 0:(this.collection().getItem(e)?.disabled&&(e=this.getPreviousKey(e)),e)}getNextKey(e){let t=e,n;do if(t=this.collection().getKeyAfter(t)??this.collection().getFirstKey(),t==null||(n=this.collection().getItem(t),n==null))return;while(n.disabled);return t}getPreviousKey(e){let t=e,n;do if(t=this.collection().getKeyBefore(t)??this.collection().getLastKey(),t==null||(n=this.collection().getItem(t),n==null))return;while(n.disabled);return t}};function Jbe(e,t){const n=new ResizeObserver(e);return fe(n.disconnect.bind(n)),{observe:r=>n.observe(r,t),unobserve:n.unobserve.bind(n)}}function Ik(e,t,n){const r=new WeakMap,{observe:i,unobserve:o}=Jbe(s=>{for(const a of s){const{contentRect:l,target:c}=a,u=Math.round(l.width),d=Math.round(l.height),h=r.get(c);(!h||h.width!==u||h.height!==d)&&(t(l,c,a),r.set(c,{width:u,height:d}))}},n);re(s=>{const a=V9(V0(he(e)));return q9(a,s,i,o),a},[])}var Qbe={};vr(Qbe,{Content:()=>CN,Indicator:()=>IN,List:()=>TN,Root:()=>EN,Tabs:()=>ih,Trigger:()=>$N,useTabsContext:()=>rh});var _N=pt();function rh(){const e=ut(_N);if(e===void 0)throw new Error("[kobalte]: `useTabsContext` must be used within a `Tabs` component");return e}function CN(e){const[t,n]=de(),r=rh(),[i,o]=se(e,["ref","id","value","forceMount"]),[s,a]=de(0),l=()=>i.id??r.generateContentId(i.value),c=()=>r.listState().selectedKey()===i.value,{present:u}=po({show:()=>i.forceMount||c(),element:()=>t()??null});return re(gt([()=>t(),()=>u()],([d,h])=>{if(d==null||!h)return;const f=()=>{const p=J9(d,{tabbable:!0});a(p.nextNode()?void 0:0)};f();const m=new MutationObserver(f);m.observe(d,{subtree:!0,childList:!0,attributes:!0,attributeFilter:["tabindex","disabled"]}),fe(()=>{m.disconnect()})})),re(gt([()=>i.value,l],([d,h])=>{r.contentIdsMap().set(d,h)})),b(ce,{get when(){return u()},get children(){return b(Ve,ne({as:"div",ref(d){var h=st(n,i.ref);typeof h=="function"&&h(d)},get id(){return l()},role:"tabpanel",get tabIndex(){return s()},get"aria-labelledby"(){return r.triggerIdsMap().get(i.value)},get"data-orientation"(){return r.orientation()},get"data-selected"(){return c()?"":void 0}},o))}})}function IN(e){const t=rh(),[n,r]=se(e,["style"]),[i,o]=de({width:void 0,height:void 0}),{direction:s}=Co(),a=()=>{const h=t.selectedTab();if(h==null)return;const f={transform:void 0,width:void 0,height:void 0},m=s()==="rtl"?-1*(h.offsetParent?.offsetWidth-h.offsetWidth-h.offsetLeft):h.offsetLeft;f.transform=t.orientation()==="vertical"?`translateY(${h.offsetTop}px)`:`translateX(${m}px)`,t.orientation()==="horizontal"?f.width=`${h.offsetWidth}px`:f.height=`${h.offsetHeight}px`,o(f)};Kt(()=>{queueMicrotask(()=>{a()})}),re(gt([t.selectedTab,t.orientation,s],()=>{a()},{defer:!0}));const[l,c]=de(!1);let u=null,d=null;return Ik(t.selectedTab,(h,f)=>{if(d!==f){d=f;return}c(!0),u&&clearTimeout(u),u=setTimeout(()=>{u=null,c(!1)},1),a()}),b(Ve,ne({as:"div",role:"presentation",get style(){return gr(i(),n.style)},get"data-orientation"(){return t.orientation()},get"data-resizing"(){return l()}},r))}function TN(e){let t;const n=rh(),[r,i]=se(e,["ref","onKeyDown","onMouseDown","onFocusIn","onFocusOut"]),{direction:o}=Co(),s=new Xbe(()=>n.listState().collection(),o,n.orientation),a=CR({selectionManager:()=>n.listState().selectionManager(),keyboardDelegate:()=>s,selectOnFocus:()=>n.activationMode()==="automatic",shouldFocusWrap:!1,disallowEmptySelection:!0},()=>t);return re(()=>{if(t==null)return;const l=t.querySelector(`[data-key="${n.listState().selectedKey()}"]`);l!=null&&n.setSelectedTab(l)}),b(Ve,ne({as:"div",ref(l){var c=st(u=>t=u,r.ref);typeof c=="function"&&c(l)},role:"tablist",get"aria-orientation"(){return n.orientation()},get"data-orientation"(){return n.orientation()},get onKeyDown(){return wt([r.onKeyDown,a.onKeyDown])},get onMouseDown(){return wt([r.onMouseDown,a.onMouseDown])},get onFocusIn(){return wt([r.onFocusIn,a.onFocusIn])},get onFocusOut(){return wt([r.onFocusOut,a.onFocusOut])}},i))}function e2e(e){const[t,n]=El({value:()=>he(e.selectedKey),defaultValue:()=>he(e.defaultSelectedKey),onChange:c=>e.onSelectionChange?.(c)}),r=F(()=>{const c=t();return c!=null?[c]:[]}),[,i]=se(e,["onSelectionChange"]),o=ne(i,{selectionMode:"single",disallowEmptySelection:!0,allowDuplicateSelectionEvents:!0,selectedKeys:r,onSelectionChange:c=>{const u=c.values().next().value;u===t()&&e.onSelectionChange?.(u),n(u)}}),{collection:s,selectionManager:a}=Ig(o),l=F(()=>{const c=t();return c!=null?s().getItem(c):void 0});return{collection:s,selectionManager:a,selectedKey:t,setSelectedKey:n,selectedItem:l}}function EN(e){const t=`tabs-${an()}`,n=Ne({id:t,orientation:"horizontal",activationMode:"automatic"},e),[r,i]=se(n,["value","defaultValue","onChange","orientation","activationMode","disabled"]),[o,s]=de([]),[a,l]=de(),{DomCollectionProvider:c}=DR({items:o,onItemsChange:s}),u=e2e({selectedKey:()=>r.value,defaultSelectedKey:()=>r.defaultValue,onSelectionChange:p=>r.onChange?.(String(p)),dataSource:o});let d=u.selectedKey();re(gt([()=>u.selectionManager(),()=>u.collection(),()=>u.selectedKey()],([p,g,v])=>{let y=v;if(p.isEmpty()||y==null||!g.getItem(y)){y=g.getFirstKey();let w=y!=null?g.getItem(y):void 0;for(;w?.disabled&&w.key!==g.getLastKey();)y=g.getKeyAfter(w.key),w=y!=null?g.getItem(y):void 0;w?.disabled&&y===g.getLastKey()&&(y=g.getFirstKey()),y!=null&&p.setSelectedKeys([y])}(p.focusedKey()==null||!p.isFocused()&&y!==d)&&p.setFocusedKey(y),d=y}));const h=new Map,f=new Map,m={isDisabled:()=>r.disabled??!1,orientation:()=>r.orientation,activationMode:()=>r.activationMode,triggerIdsMap:()=>h,contentIdsMap:()=>f,listState:()=>u,selectedTab:a,setSelectedTab:l,generateTriggerId:p=>`${i.id}-trigger-${p}`,generateContentId:p=>`${i.id}-content-${p}`};return b(c,{get children(){return b(_N.Provider,{value:m,get children(){return b(Ve,ne({as:"div",get"data-orientation"(){return m.orientation()}},i))}})}})}function $N(e){let t;const n=rh(),r=Ne({type:"button"},e),[i,o]=se(r,["ref","id","value","disabled","onPointerDown","onPointerUp","onClick","onKeyDown","onMouseDown","onFocus"]),s=()=>i.id??n.generateTriggerId(i.value),a=()=>n.listState().selectionManager().focusedKey()===i.value,l=()=>i.disabled||n.isDisabled(),c=()=>n.contentIdsMap().get(i.value);MR({getItem:()=>({ref:()=>t,type:"item",key:i.value,textValue:"",disabled:l()})});const u=Cg({key:()=>i.value,selectionManager:()=>n.listState().selectionManager(),disabled:l},()=>t),d=h=>{K9()&&un(h.currentTarget)};return re(gt([()=>i.value,s],([h,f])=>{n.triggerIdsMap().set(h,f)})),b(Ve,ne({as:"button",ref(h){var f=st(m=>t=m,i.ref);typeof f=="function"&&f(h)},get id(){return s()},role:"tab",get tabIndex(){return je(()=>!l())()?u.tabIndex():void 0},get disabled(){return l()},get"aria-selected"(){return u.isSelected()},get"aria-disabled"(){return l()||void 0},get"aria-controls"(){return je(()=>!!u.isSelected())()?c():void 0},get"data-key"(){return u.dataKey()},get"data-orientation"(){return n.orientation()},get"data-selected"(){return u.isSelected()?"":void 0},get"data-highlighted"(){return a()?"":void 0},get"data-disabled"(){return l()?"":void 0},get onPointerDown(){return wt([i.onPointerDown,u.onPointerDown])},get onPointerUp(){return wt([i.onPointerUp,u.onPointerUp])},get onClick(){return wt([i.onClick,u.onClick,d])},get onKeyDown(){return wt([i.onKeyDown,u.onKeyDown])},get onMouseDown(){return wt([i.onMouseDown,u.onMouseDown])},get onFocus(){return wt([i.onFocus,u.onFocus])}},o))}var ih=Object.assign(EN,{Content:CN,Indicator:IN,List:TN,Trigger:$N}),t2e=ee("<div data-slot=tabs-trigger-wrapper>"),n2e=ee("<div data-slot=tabs-trigger-close-button>"),r2e=ee("<div data-slot=tabs-section-title>");function i2e(e){const[t,n]=se(e,["class","classList","variant","orientation"]);return b(ih,ne(n,{get orientation(){return t.orientation},"data-component":"tabs",get"data-variant"(){return t.variant||"normal"},get"data-orientation"(){return t.orientation||"horizontal"},get classList(){return{...t.classList,[t.class??""]:!!t.class}}}))}function o2e(e){const[t,n]=se(e,["class","classList"]);return b(ih.List,ne(n,{"data-slot":"tabs-list",get classList(){return{...t.classList,[t.class??""]:!!t.class}}}))}function s2e(e){const[t,n]=se(e,["class","classList","classes","children","closeButton","hideCloseButton","onMiddleClick"]);return(()=>{var r=t2e();return r.addEventListener("auxclick",i=>{i.button===1&&t.onMiddleClick&&(i.preventDefault(),t.onMiddleClick())}),r.$$mousedown=i=>{i.button===1&&t.onMiddleClick&&i.preventDefault()},j(r,b(ih.Trigger,ne(n,{"data-slot":"tabs-trigger",get"data-value"(){return e.value},get classList(){return{[t.classes?.button??""]:t.classes?.button}},get children(){return t.children}})),null),j(r,b(ce,{get when(){return t.closeButton},keyed:!0,children:i=>(()=>{var o=n2e();return j(o,i),De(()=>Ye(o,"data-hidden",t.hideCloseButton)),o})()}),null),De(i=>{var o=e.value,s={...t.classList,[t.class??""]:!!t.class};return o!==i.e&&Ye(r,"data-value",i.e=o),i.t=Ct(r,s,i.t),i},{e:void 0,t:void 0}),r})()}function a2e(e){const[t,n]=se(e,["class","classList","children"]);return b(ih.Content,ne(n,{"data-slot":"tabs-content",get classList(){return{...t.classList,[t.class??""]:!!t.class}},get children(){return t.children}}))}const l2e=e=>(()=>{var t=r2e();return j(t,()=>e.children),t})(),Ao=Object.assign(i2e,{List:o2e,Trigger:s2e,Content:a2e,SectionTitle:l2e});or(["mousedown"]);var c2e=ee("<span class=text-text-invert-weak>v"),u2e=ee('<span class="flex items-center gap-2"><span>'),d2e=ee('<div><div class="flex flex-col items-start min-w-0 w-full"><div class="flex flex-row items-center gap-2 min-w-0 w-full"><span>'),f2e=ee("<span>v"),h2e=ee('<div class="flex flex-row gap-3"><span>'),m2e=ee("<span class=text-text-weak>"),p2e=ee("<span class=text-text-weaker>"),g2e=ee("<span class=text-text-weak>••••••••"),v2e=ee("<div>");function y2e(e){const t=At(),[n,r]=de(!1);let i,o;const s=F(()=>Om(e.conn)),a=()=>{const u=i?i.scrollWidth>i.clientWidth:!1,d=o?o.scrollWidth>o.clientWidth:!1;r(u||d)};re(()=>{s(),e.conn.http.url,e.status?.version,queueMicrotask(a)}),Kt(()=>{typeof ResizeObserver=="function"&&(Ik([i,o],a),a())});const l=()=>(()=>{var u=u2e(),d=u.firstChild;return j(d,()=>Om(e.conn,!0)),j(u,b(ce,{get when(){return e.status?.version},get children(){var h=c2e();return h.firstChild,j(h,()=>e.status?.version,null),h}}),null),u})(),c=Cl(()=>e.badge);return b(bn,{class:"flex-1 min-w-0",get value(){return l()},contentStyle:{"max-width":"none","white-space":"nowrap"},placement:"top-start",get inactive(){return je(()=>!n())()&&!e.conn.displayName},get children(){var u=d2e(),d=u.firstChild,h=d.firstChild,f=h.firstChild,m=i;return typeof m=="function"?pr(m,f):i=f,j(f,s),j(h,b(ce,{get when(){return c()},keyed:!0,get fallback(){return b(ce,{get when(){return e.status?.version},get children(){var p=f2e();p.firstChild;var g=o;return typeof g=="function"?pr(g,p):o=p,j(p,()=>e.status?.version,null),De(()=>Bo(p,`${e.versionClass??"text-text-weak text-14-regular truncate"} min-w-0`)),p}})},children:p=>p}),null),j(d,b(ce,{get when(){return je(()=>!!(e.showCredentials&&e.conn.type==="http"))()&&e.conn},keyed:!0,children:p=>(()=>{var g=h2e(),v=g.firstChild;return j(v,(()=>{var y=je(()=>!!p.http.username);return()=>y()?(()=>{var w=m2e();return j(w,()=>p.http.username),w})():(()=>{var w=p2e();return j(w,()=>t.t("server.row.noUsername")),w})()})()),j(g,(()=>{var y=je(()=>!!p.http.password);return()=>y()&&g2e()})(),null),g})()}),null),j(u,()=>e.children,null),De(p=>{var g=e.class,v=!!e.dimmed,y=`${e.nameClass??"truncate"} min-w-0`;return g!==p.e&&Bo(u,p.e=g),v!==p.t&&u.classList.toggle("opacity-50",p.t=v),y!==p.a&&Bo(f,p.a=y),p},{e:void 0,t:void 0,a:void 0}),u}})}function b2e(e){return(()=>{var t=v2e();return De(n=>Ct(t,{"size-1.5 rounded-full shrink-0":!0,"bg-icon-success-base":e.health?.healthy===!0,"bg-icon-critical-base":e.health?.healthy===!1,"bg-border-weak-base":e.health===void 0},n)),t})()}var w2e=ee('<code class="bg-surface-raised-base px-1.5 py-0.5 rounded-sm text-text-base">'),v0=ee('<div class="flex flex-col px-2 pb-2"><div class="flex flex-col p-3 bg-background-base rounded-lg min-h-14">'),k2e=ee('<div class="flex items-center gap-1 w-[360px] rounded-xl shadow-[var(--shadow-lg-border-base)]">'),x2e=ee("<div class=flex-1>"),S2e=ee('<button type=button class="flex items-center gap-2 w-full h-8 pl-3 pr-1.5 py-1.5 rounded-md transition-colors text-left">'),_2e=ee('<span class="text-11-regular text-text-base bg-surface-base px-1.5 py-0.5 rounded-sm">'),uy=ee('<div class="text-14-regular text-text-base text-center my-auto">'),C2e=ee('<button type=button class="flex items-center gap-2 w-full h-8 pl-3 pr-2 py-1 rounded-md hover:bg-surface-raised-base-hover transition-colors text-left"><div></div><span class="text-14-regular text-text-base truncate flex-1"></span><div>'),I2e=ee('<div class="flex items-center gap-2 w-full px-2 py-1"><div></div><span class="text-14-regular text-text-base truncate">'),T2e=ee('<div class="flex items-center gap-2 w-full px-2 py-1"><div class="size-1.5 rounded-full shrink-0 bg-icon-success-base"></div><span class="text-14-regular text-text-base truncate">');const E2e=1e4,$2e=(e,t)=>{const n=t.reduce((r,i)=>r.flatMap(o=>t.includes(o)?[o]:o.split(i).flatMap((s,a,l)=>a===l.length-1?[s]:[s,i])),[e]);return n.length===1?e:je(()=>n.map(r=>t.includes(r)?(()=>{var i=w2e();return j(i,r),i})():r))},A2e=e=>{if(!e.startsWith("file://"))return e;const t=e.split("/").at(-1);return t?decodeURIComponent(t):e},L2e=(e,t,n)=>{if(!e.length)return e;const r=new Map(e.map((o,s)=>[o,s])),i=o=>o?.healthy===!0?0:o?.healthy===!1?2:1;return e.slice().sort((o,s)=>{if(dn.key(o)===t)return-1;if(dn.key(s)===t)return 1;const a=i(n[dn.key(o)])-i(n[dn.key(s)]);return a!==0?a:(r.get(o)??0)-(r.get(s)??0)})},D2e=(e,t)=>{const n=h4(),[r,i]=Je({});return re(()=>{if(!t()){i(St({}));return}const o=e();let s=!1;const a=async()=>{const c={};await Promise.all(o.map(async u=>{c[dn.key(u)]=await n(u.http)})),!s&&i(St(c))};a();const l=setInterval(()=>void a(),E2e);fe(()=>{s=!0,clearInterval(l)})}),r},M2e=e=>{const[t,n]=Je({url:void 0,tick:0});return re(()=>{t.tick;let r=!1;const i=e?.();if(!i){n("url",void 0),fe(()=>{r=!0});return}if(i instanceof Promise){i.then(o=>{if(r)return;const s=o?Mm(o):void 0;n("url",s??o??void 0)}),fe(()=>{r=!0});return}n("url",Mm(i)??i),fe(()=>{r=!0})}),{key:()=>{const r=t.url;if(r)return dn.key({type:"http",http:{url:r}})},refresh:()=>n("tick",r=>r+1)}},O2e=()=>{const e=tk(),t=bO(),n=Jn(),r=Gi(),i=At(),o=()=>e?.data??n.data,s=c=>e?e.set("mcp",c):n.set("mcp",c),a=c=>e?e.set("mcp_ready",c):n.set("mcp_ready",c),l=()=>t?.client??r.client;return Ad(()=>({mutationFn:async c=>{await(o().mcp[c]?.status==="connected"?l().mcp.disconnect({name:c}):l().mcp.connect({name:c}));const d=await l().mcp.status();d.data&&s(d.data),a(!0)},onError:c=>{$t({variant:"error",title:i.t("common.requestFailed"),description:c instanceof Error?c.message:String(c)})}}))};function P2e(e){const t=tk(),n=Jn(),r=sr(),i=qi(),o=ko(),s=At(),a=xo(),l=bO(),c=Gi(),u=F(()=>t?.data??n.data),d=q=>t?t.set("mcp",q):n.set("mcp",q),h=q=>t?t.set("mcp_ready",q):n.set("mcp_ready",q),f=q=>t?t.set("lsp",q):n.set("lsp",q),m=q=>t?t.set("lsp_ready",q):n.set("lsp_ready",q),p=()=>l?.client??c.client,[g,v]=Je({lspDone:!1,lspLoading:!1,mcpDone:!1,mcpLoading:!1}),y=q=>{$t({variant:"error",title:s.t("common.requestFailed"),description:q instanceof Error?q.message:String(q)})};re(()=>{if(!e.shown())return;const q=u();!q.mcp_ready&&!g.mcpDone&&!g.mcpLoading&&(v("mcpLoading",!0),p().mcp.status().then(B=>{d(B.data??{}),h(!0)}).catch(B=>{v("mcpDone",!0),y(B)}).finally(()=>{v("mcpLoading",!1)})),!q.lsp_ready&&!g.lspDone&&!g.lspLoading&&(v("lspLoading",!0),p().lsp.status().then(B=>{f(B.data??[]),m(!0)}).catch(B=>{v("lspDone",!0),y(B)}).finally(()=>{v("lspLoading",!1)}))});let w=0,k=!1;fe(()=>{k=!0,w+=1});const x=F(()=>{const q=r.current,B=r.list;return q?B.every(Y=>dn.key(Y)!==dn.key(q))?[q,...B]:[q,...B.filter(Y=>dn.key(Y)!==dn.key(q))]:B}),C=F(()=>!!i.desktop),S=F(()=>C()||!t),$=D2e(x,()=>e.shown()&&C()),O=F(()=>L2e(x(),r.key,$)),D=O2e(),I=M2e(()=>i.getDefaultServer?.()),L=q=>i.serverManager?.instances.find(B=>B.key===q),A=F(()=>Object.keys(u().mcp??{}).sort((q,B)=>q.localeCompare(B))),T=q=>u().mcp?.[q]?.status,N=F(()=>u().lsp??[]),W=F(()=>(u().config.plugin??[]).map(q=>typeof q=="string"?q:q[0])),K=F(()=>$2e(s.t("dialog.plugins.empty"),["codeplane.jsonc","config/plugins"])),V=F(()=>S()?"servers":"mcp");return(()=>{var q=k2e();return j(q,b(Ao,{get"aria-label"(){return s.t("status.popover.ariaLabel")},class:"tabs bg-background-strong rounded-xl overflow-hidden","data-component":"tabs",get"data-active"(){return V()},get defaultValue(){return V()},variant:"alt",get children(){return[b(Ao.List,{"data-slot":"tablist",class:"bg-transparent border-b-0 px-4 py-1.5 gap-4",get children(){return[b(ce,{get when(){return S()},get children(){return b(Ao.Trigger,{value:"servers","data-slot":"tab",class:"text-12-regular",get children(){return s.t("status.popover.tab.servers")}})}}),b(ce,{get when(){return u()},get children(){return[b(Ao.Trigger,{value:"mcp","data-slot":"tab",class:"text-12-regular",get children(){return s.t("status.popover.tab.mcp")}}),b(Ao.Trigger,{value:"lsp","data-slot":"tab",class:"text-12-regular",get children(){return s.t("status.popover.tab.lsp")}}),b(Ao.Trigger,{value:"plugins","data-slot":"tab",class:"text-12-regular",get children(){return s.t("status.popover.tab.plugins")}})]}})]}}),b(ce,{get when(){return S()},get children(){return b(Ao.Content,{value:"servers",get children(){var B=v0(),Y=B.firstChild;return j(Y,b(Ut,{get each(){return O()},children:J=>{const ge=dn.key(J),ae=()=>$[ge]?.healthy===!1;return(()=>{var Te=S2e();return Te.$$click=()=>{if(ae())return;const pe=L(ge);if(pe){i.serverManager?.open(pe.id);return}a("/"),queueMicrotask(()=>r.setActive(ge))},j(Te,b(b2e,{get health(){return $[ge]}}),null),j(Te,b(y2e,{conn:J,get dimmed(){return ae()},get status(){return $[ge]},class:"flex items-center gap-2 w-full min-w-0",nameClass:"text-14-regular text-text-base truncate",versionClass:"text-12-regular text-text-weak truncate",get badge(){return b(ce,{get when(){return ge===I.key()},get children(){var pe=_2e();return j(pe,()=>s.t("common.default")),pe}})},get children(){return[x2e(),b(ce,{get when(){return je(()=>!!r.current)()&&ge===dn.key(r.current)},get children(){return b(Ht,{name:"check",size:"small",class:"text-icon-weak shrink-0"})}})]}}),null),De(pe=>{var ue={"hover:bg-surface-raised-base-hover":!ae(),"cursor-not-allowed":ae()},Le=ae();return pe.e=Ct(Te,ue,pe.e),Le!==pe.t&&Ye(Te,"aria-disabled",pe.t=Le),pe},{e:void 0,t:void 0}),Te})()}}),null),j(Y,b(Gt,{variant:"secondary",class:"mt-3 self-start h-8 px-3 py-1.5",onClick:()=>{if(i.serverManager){i.serverManager.show();return}const J=++w;z(()=>import("./dialog-select-server-DGTNSgKw.js"),__vite__mapDeps([97,98])).then(ge=>{k||w!==J||o.show(()=>b(ge.DialogSelectServer,{}),I.refresh)})},get children(){return s.t("status.popover.action.manageServers")}}),null),B}})}}),b(ce,{get when(){return u()},get children(){return[b(Ao.Content,{value:"mcp",get children(){var B=v0(),Y=B.firstChild;return j(Y,b(ce,{get when(){return A().length>0},get fallback(){return(()=>{var J=uy();return j(J,()=>s.t("dialog.mcp.empty")),J})()},get children(){return b(Ut,{get each(){return A()},children:J=>{const ge=()=>T(J),ae=()=>ge()==="connected";return(()=>{var Te=C2e(),pe=Te.firstChild,ue=pe.nextSibling,Le=ue.nextSibling;return Te.$$click=()=>{D.isPending||D.mutate(J)},j(ue,J),Le.$$click=$e=>$e.stopPropagation(),j(Le,b(Ybe,{get checked(){return ae()},get disabled(){return je(()=>!!D.isPending)()&&D.variables===J},onChange:()=>{D.isPending||D.mutate(J)}})),De($e=>{var ht=D.isPending&&D.variables===J,Bt={"size-1.5 rounded-full shrink-0":!0,"bg-icon-success-base":ge()==="connected","bg-icon-critical-base":ge()==="failed","bg-border-weak-base":ge()==="disabled","bg-icon-warning-base":ge()==="needs_auth"||ge()==="needs_client_registration"};return ht!==$e.e&&(Te.disabled=$e.e=ht),$e.t=Ct(pe,Bt,$e.t),$e},{e:void 0,t:void 0}),Te})()}})}})),B}}),b(Ao.Content,{value:"lsp",get children(){var B=v0(),Y=B.firstChild;return j(Y,b(ce,{get when(){return N().length>0},get fallback(){return(()=>{var J=uy();return j(J,()=>s.t("dialog.lsp.empty")),J})()},get children(){return b(Ut,{get each(){return N()},children:J=>(()=>{var ge=I2e(),ae=ge.firstChild,Te=ae.nextSibling;return j(Te,()=>J.name||J.id),De(pe=>Ct(ae,{"size-1.5 rounded-full shrink-0":!0,"bg-icon-success-base":J.status==="connected","bg-icon-critical-base":J.status==="error"},pe)),ge})()})}})),B}}),b(Ao.Content,{value:"plugins",get children(){var B=v0(),Y=B.firstChild;return j(Y,b(ce,{get when(){return W().length>0},get fallback(){return(()=>{var J=uy();return j(J,K),J})()},get children(){return b(Ut,{get each(){return W()},children:J=>(()=>{var ge=T2e(),ae=ge.firstChild,Te=ae.nextSibling;return Ye(Te,"title",J),j(Te,()=>A2e(J)),ge})()})}})),B}})]}})]}})),q})()}or(["click"]);var R2e=ee('<div class="relative size-4"><div class="badge-mask-tight size-4 flex items-center justify-center"></div><div>'),N2e=ee("<div data-slot=popover-body>");function z2e(){const e=At(),t=sr(),n=tk(),r=Jn(),[i,o]=de(!1),s=F(()=>n?.data??r.data),a=F(()=>t.healthy()===!1||s().mcp_ready),l=F(()=>{const c=t.healthy()===!0,d=Object.values(s().mcp??{}).some(h=>h.status!=="connected"&&h.status!=="disabled");return c&&!d});return b(wd,{get open(){return i()},onOpenChange:o,gutter:4,placement:"bottom-end",shift:-168,modal:!1,get children(){return[b(wd.Trigger,{as:Gt,variant:"ghost",class:"titlebar-icon w-8 h-6 p-0 box-border",get"aria-label"(){return e.t("status.popover.trigger")},"data-no-window-drag":!0,get children(){var c=R2e(),u=c.firstChild,d=u.nextSibling;return j(u,b(Ht,{name:"server",size:"small"})),De(h=>Ct(d,{"absolute -top-px -right-px size-1.5 rounded-full":!0,"bg-icon-success-base":a()&&l(),"bg-icon-critical-base":t.healthy()===!1||a()&&!l(),"bg-border-weak-base":t.healthy()===void 0||!a()},h)),c}}),b(wd.Portal,{get children(){return b(wd.Content,{class:"[&_[data-slot=popover-body]]:p-0 w-[360px] max-w-[calc(100vw-40px)] bg-transparent border-0 shadow-none rounded-xl z-50 outline-none",get children(){var c=N2e();return j(c,b(ce,{get when(){return i()},get children(){return b(P2e,{shown:i})}})),c}})}})]}})}var j2e=ee('<div class="flex items-center shrink-0 w-8"><div class=transition-opacity>'),F2e=ee('<div class="titlebar-cluster flex items-center gap-0.5 rounded-lg p-0.5">'),U2e=ee('<div class="flex items-center gap-1 shrink-0"data-no-window-drag>'),H2e=ee('<header class="titlebar-shell shrink-0 relative grid grid-cols-[minmax(0,1fr)_auto_minmax(0,1fr)] items-center"><div><div class="flex items-center gap-2 shrink-0"data-no-window-drag><div class="xl:hidden w-[48px] shrink-0 flex items-center justify-center"></div><div class="flex items-center gap-2 shrink-0"><div class="hidden xl:flex items-center shrink-0 gap-2"><div class="flex items-center shrink-0 gap-1"><div id=codeplane-titlebar-left class="flex items-center gap-3 min-w-0 px-2"></div></div></div></div></div></div><div class="min-w-0 flex items-center justify-center pointer-events-none"><div id=codeplane-titlebar-center class="pointer-events-auto min-w-0 flex justify-center w-fit max-w-full"data-no-window-drag></div></div><div><div id=codeplane-titlebar-right class="flex items-center gap-1 shrink-0 justify-end"data-no-window-drag>');function B2e(){const e=zl(),t=M$(),n=At(),r=qi();hu();const i=xo(),o=So(),s=ri(),[a,l]=Je({stack:[],index:0,action:void 0}),c=()=>`${o.pathname}${o.search}${o.hash}`,u=F(()=>o.pathname==="/"||o.pathname==="/notifications"),d=F(()=>!s.dir||s.id?!1:o.pathname.replace(/\/+$/,"").split("/").at(-1)==="session");re(()=>{const S=c();ot(()=>{const $=Fbe(a,S);$!==a&&l($)})});const h=F(()=>a.index>0),f=F(()=>a.index<a.stack.length-1),m=F(()=>e.projects.list().length>0),p=F(()=>!0),g=F(()=>r.desktop&&r.os==="macos"),v=typeof window<"u"?window.codeplaneDesktop?.window:void 0,[y,w]=de(!!v?.state?.fullscreen);if(v?.onStateChange){const S=v.onStateChange($=>w(!!$.fullscreen));fe(()=>S())}const k=F(()=>g()&&!y()),x=()=>{const S=Bbe(a);S&&(l(S.state),i(S.to))},C=()=>{const S=Vbe(a);S&&(l(S.state),i(S.to))};return t.register(()=>[{id:"common.goBack",title:n.t("common.goBack"),category:n.t("command.category.view"),keybind:"mod+[",onSelect:x},{id:"common.goForward",title:n.t("common.goForward"),category:n.t("command.category.view"),keybind:"mod+]",onSelect:C}]),(()=>{var S=H2e(),$=S.firstChild,O=$.firstChild,D=O.firstChild,M=D.nextSibling,I=M.firstChild,L=I.firstChild,A=L.firstChild,T=$.nextSibling,N=T.nextSibling,W=N.firstChild;return j(D,b(Jr,{icon:"menu",variant:"ghost",class:"titlebar-icon rounded-md",get onClick(){return e.mobileSidebar.toggle},get"aria-label"(){return n.t("sidebar.menu.toggle")},get"aria-expanded"(){return e.mobileSidebar.opened()}})),j(M,b(ce,{get when(){return!u()},get children(){return b(XS,{class:"hidden xl:flex shrink-0 ml-12",placement:"bottom",get title(){return n.t("command.sidebar.toggle")},get keybind(){return t.keybind("sidebar.toggle")},get children(){return b(Gt,{variant:"ghost",class:"group/sidebar-toggle titlebar-icon w-8 h-7 p-0 box-border rounded-md",get onClick(){return e.sidebar.toggle},get"aria-label"(){return n.t("command.sidebar.toggle")},get"aria-pressed"(){return e.sidebar.opened()},get children(){return b(Ht,{size:"small",get name(){return e.sidebar.opened()?"sidebar-active":"sidebar"}})}})}})}}),I),j(I,b(ce,{get when(){return s.dir},get children(){var K=j2e(),V=K.firstChild;return j(V,b(XS,{placement:"bottom",get title(){return n.t("command.session.new")},get keybind(){return t.keybind("session.new")},openDelay:2e3,get children(){return b(Gt,{variant:"ghost",get icon(){return d()?"new-session-active":"new-session"},class:"titlebar-icon w-8 h-7 p-0 box-border rounded-md",get disabled(){return e.sidebar.opened()},get tabIndex(){return e.sidebar.opened()?-1:void 0},onClick:()=>{s.dir&&i(`/${s.dir}/session`)},get"aria-label"(){return n.t("command.session.new")},get"aria-current"(){return d()?"page":void 0}})}})),De(q=>{var B=e.sidebar.opened()?"true":void 0,Y={"opacity-100 duration-120 ease-out":!e.sidebar.opened(),"opacity-0 duration-120 ease-in delay-0 pointer-events-none":e.sidebar.opened()};return B!==q.e&&Ye(K,"aria-hidden",q.e=B),q.t=Ct(V,Y,q.t),q},{e:void 0,t:void 0}),K}}),L),j(L,b(ce,{get when(){return r.desktop||m()&&p()},get children(){var K=F2e();return j(K,b(ce,{get when(){return r.desktop},get children(){return b(bn,{placement:"bottom",get value(){return n.t("command.server.switch")},openDelay:2e3,get children(){return b(Gt,{variant:"ghost",icon:"server",class:"titlebar-icon w-7 h-6 p-0 box-border rounded-md",onClick:()=>t.trigger("server.switch"),get"aria-label"(){return n.t("command.server.switch")}})}})}}),null),j(K,b(ce,{get when(){return je(()=>!!m())()&&p()},get children(){return[b(bn,{placement:"bottom",get value(){return n.t("common.goBack")},openDelay:2e3,get children(){return b(Gt,{variant:"ghost",icon:"chevron-left",class:"titlebar-icon w-7 h-6 p-0 box-border rounded-md",get disabled(){return!h()},onClick:x,get"aria-label"(){return n.t("common.goBack")}})}}),b(bn,{placement:"bottom",get value(){return n.t("common.goForward")},openDelay:2e3,get children(){return b(Gt,{variant:"ghost",icon:"chevron-right",class:"titlebar-icon w-7 h-6 p-0 box-border rounded-md",get disabled(){return!f()},onClick:C,get"aria-label"(){return n.t("common.goForward")}})}})]}}),null),K}}),A),j(L,()=>null,null),Ct(N,{"flex items-center min-w-0 justify-end":!0,"pr-2":!0}),j(N,b(jbe,{class:"titlebar-icon w-8 h-7 p-0 box-border rounded-md mr-1"}),W),j(N,b(ce,{get when(){return r.desktop},get children(){var K=U2e();return j(K,b(z2e,{})),K}}),null),De(K=>{var V=!!r.desktop,q=!r.desktop,B=g()?"macos":void 0,Y=r.desktop?"true":void 0,J={"flex items-center min-w-0 transition-[padding] duration-200 ease-out":!0,"pl-2":!k(),"pl-[88px]":k()},ge={"-translate-x-[40px]":e.sidebar.opened()&&!!s.dir,"duration-180 ease-out":!e.sidebar.opened(),"duration-180 ease-in":e.sidebar.opened()};return V!==K.e&&S.classList.toggle("h-11",K.e=V),q!==K.t&&S.classList.toggle("h-10",K.t=q),B!==K.a&&Ye(S,"data-desktop-titlebar",K.a=B),Y!==K.o&&Ye(S,"data-platform-desktop",K.o=Y),K.i=Ct($,J,K.i),K.n=Ct(L,ge,K.n),K},{e:void 0,t:void 0,a:void 0,o:void 0,i:void 0,n:void 0}),S})()}function AN(e){return e.match(/^\[Cron\]\s*(.+)$/)?.[1]?.trim()}function Tk(e){return e?!!e.cronRunID||!!AN(e.title):!1}function V2e(e){const t=e.directories??(e.directory?[e.directory]:[]),n=new Set(e.runs.map(a=>a.sessionID).filter(a=>!!a)),r=e.runs.map(a=>({id:a.id,sessionID:a.sessionID,taskName:a.taskName,taskDirectory:a.taskDirectory,status:a.status,startedAt:a.timeStarted??a.time.created,createdAt:a.time.created})),i=e.sessions.filter(a=>!a.parentID&&!a.time?.archived).filter(a=>t.length===0||t.some(l=>ba(l,a.directory))).filter(a=>!n.has(a.id)).map(a=>({session:a,taskName:AN(a.title)})).filter(a=>Tk(a.session)).map(a=>({id:a.session.cronRunID??a.session.id,sessionID:a.session.id,taskName:a.taskName??a.session.title,taskDirectory:a.session.directory,status:"success",startedAt:a.session.time.created,createdAt:a.session.time.created})),o=[...r,...i].sort((a,l)=>a.createdAt-l.createdAt||a.id.localeCompare(l.id)),s=new Map(o.map((a,l)=>[a.id,l+1]));return o.map(a=>({...a,sequence:s.get(a.id)??0})).sort((a,l)=>l.createdAt-a.createdAt||l.id.localeCompare(a.id)).slice(0,e.limit??200)}const Be=Vi;function Wg(e){const t=e-6e4;return(n,r)=>{const i=n.time.updated??n.time.created,o=r.time.updated??r.time.created,s=i>t,a=o>t;return s&&a?n.id<r.id?-1:n.id>r.id?1:0:s&&!a?-1:!s&&a?1:o-i}}const q2e=(e,t)=>ba(t,e.directory),W2e=(e,t)=>!t||!e.projectID||e.projectID===t,G2e=(e,t,n)=>W2e(e,n)&&t.some(r=>q2e(e,r))&&!e.parentID&&!e.time?.archived&&!Tk(e),LN=(e,t)=>{const n=[t,e.path.directory].filter(r=>!!r).filter((r,i,o)=>o.findIndex(s=>Vi(s)===Vi(r))===i);return(e.session??[]).filter(r=>G2e(r,n,e.project))},yf=(e,t,n)=>LN(e,n).sort(Wg(t)),K2e=(e,t,n)=>(e??[]).filter(r=>r.parentID===t&&!r.time?.archived).sort(Wg(n)),DN=(e,t)=>{const n=(e??[]).reduce((r,i)=>{const o=i.parentID;if(!o||i.time?.archived)return r;const s=r.get(o);return s?(s.push(i),r):(r.set(o,[i]),r)},new Map);return n.forEach(r=>r.sort(Wg(t))),n},MN=e=>(e??[]).filter(t=>!t.parentID&&!t.time?.archived).length,ON=e=>e.loadedRootCount<e.total&&e.visible<e.total;function Z2e(e){if(!e.project)return[];if(!e.workspacesEnabled)return[e.currentDirectory||e.project.worktree];const t=e.currentDirectory?Be(e.currentDirectory):void 0,n=Be(e.project.worktree);return e.workspaces.filter(r=>{const i=Be(r);return(e.expanded?.[r]??e.expanded?.[i]??i===n)||i===t})}const o9=(e,t)=>e.flatMap(n=>LN(n)).sort(Wg(t))[0];function Y2e(e,t=()=>!0){return Object.values(e??{}).some(n=>n?.some(t))}const Ek=e=>e.name||tr(e.worktree),dy=(e,t)=>{if(e&&typeof e=="object"&&"data"in e){const n=e.data;if(n?.message)return n.message}return e instanceof Error?e.message:t},y0=(e,t,n)=>{const r=Be(e),i=new Map;for(const s of t){const a=Be(s);a!==r&&(i.has(a)||i.set(a,s))}if(!n?.length)return[e,...i.values()];const o=[e];for(const s of n){const a=Be(s);if(a===r)continue;const l=i.get(a);l&&(o.push(l),i.delete(a))}return[...o,...i.values()]},X2e="codeplane:deep-link",PN=e=>{if(e.startsWith("codeplane://")&&!(typeof URL.canParse=="function"&&!URL.canParse(e)))try{return new URL(e)}catch{return}},J2e=e=>{const t=PN(e);if(!t||t.hostname!=="open-project")return;const n=t.searchParams.get("directory");if(n)return n},Q2e=e=>{const t=PN(e);if(!t||t.hostname!=="new-session")return;const n=t.searchParams.get("directory");if(!n)return;const r=t.searchParams.get("prompt")||void 0;return r?{directory:n,prompt:r}:{directory:n}},ewe=e=>e.map(J2e).filter(t=>!!t),twe=e=>e.map(Q2e).filter(t=>!!t),nwe=e=>{const t=e.__CODEPLANE__?.deepLinks??[];return t.length===0?[]:(e.__CODEPLANE__&&(e.__CODEPLANE__.deepLinks=[]),t)};var rwe=ee("<input data-component=inline-input>");function iwe(e){const[t,n]=se(e,["class","width","style"]),r=()=>t.style?typeof t.style=="string"?t.width?`${t.style};width:${t.width}`:t.style:t.width?{...t.style,width:t.width}:t.style:{width:t.width};return(()=>{var i=rwe();return jr(i,ne({get class(){return t.class},get style(){return r()}},n),!1,!1),i})()}var owe=ee("<span>");function swe(){const[e,t]=Je({active:"",value:""}),n=c=>e.active===c,r=()=>e.value,i=(c,u)=>{c&&t({active:c,value:u})},o=()=>t({active:"",value:""}),s=c=>{const u=e.value.trim();if(!u){o();return}o(),c(u)},a=(c,u)=>{if(c.key==="Enter"){c.preventDefault(),s(u);return}c.key==="Escape"&&(c.preventDefault(),o())};return{editor:e,editorOpen:n,editorValue:r,openEditor:i,closeEditor:o,saveEditor:s,editorKeyDown:a,setEditor:t,InlineEditor:c=>{let u;fe(()=>{u!==void 0&&cancelAnimationFrame(u)});const d=()=>c.editing??n(c.id),h=()=>c.stopPropagation??!1,f=()=>c.openOnDblClick??!0,m=g=>{h()&&g.stopPropagation()},p=g=>{f()&&(m(g),i(c.id,c.value()))};return b(ce,{get when(){return d()},get fallback(){return(()=>{var g=owe();return g.$$touchstart=m,g.$$click=m,g.$$mousedown=m,g.$$pointerdown=m,g.$$dblclick=p,j(g,()=>c.value()),De(()=>Bo(g,c.displayClass??c.class)),g})()},get children(){return b(iwe,{ref:g=>{u!==void 0&&cancelAnimationFrame(u),u=requestAnimationFrame(()=>{u=void 0,g.isConnected&&g.focus()})},get value(){return r()},get class(){return c.class},onInput:g=>t("value",g.currentTarget.value),onKeyDown:g=>{g.stopPropagation(),a(g,c.onSave)},onBlur:o,onPointerDown:m,onClick:m,onDblClick:m,onMouseDown:m,onMouseUp:m,onTouchStart:m})}})}}}or(["dblclick","pointerdown","mousedown","click","touchstart"]);var awe={};vr(awe,{Collapsible:()=>Gg,Content:()=>NN,Root:()=>zN,Trigger:()=>jN,useCollapsibleContext:()=>$k});var RN=pt();function $k(){const e=ut(RN);if(e===void 0)throw new Error("[kobalte]: `useCollapsibleContext` must be used within a `Collapsible.Root` component");return e}function NN(e){const[t,n]=de(),r=$k(),i=Ne({id:r.generateId("content")},e),[o,s]=se(i,["ref","id","style"]),{present:a}=po({show:r.shouldMount,element:()=>t()??null}),[l,c]=de(0),[u,d]=de(0);let f=r.isOpen()||a();return Kt(()=>{const m=requestAnimationFrame(()=>{f=!1});fe(()=>{cancelAnimationFrame(m)})}),re(gt(a,()=>{if(!t())return;t().style.transitionDuration="0s",t().style.animationName="none";const m=t().getBoundingClientRect();c(m.height),d(m.width),f||(t().style.transitionDuration="",t().style.animationName="")})),re(gt(r.isOpen,m=>{!m&&t()&&(t().style.transitionDuration="",t().style.animationName="")},{defer:!0})),re(()=>fe(r.registerContentId(o.id))),b(ce,{get when(){return a()},get children(){return b(Ve,ne({as:"div",ref(m){var p=st(n,o.ref);typeof p=="function"&&p(m)},get id(){return o.id},get style(){return gr({"--kb-collapsible-content-height":l()?`${l()}px`:void 0,"--kb-collapsible-content-width":u()?`${u()}px`:void 0},o.style)}},()=>r.dataset(),s))}})}function zN(e){const t=`collapsible-${an()}`,n=Ne({id:t},e),[r,i]=se(n,["open","defaultOpen","onOpenChange","disabled","forceMount"]),[o,s]=de(),a=Ps({open:()=>r.open,defaultOpen:()=>r.defaultOpen,onOpenChange:u=>r.onOpenChange?.(u)}),l=F(()=>({"data-expanded":a.isOpen()?"":void 0,"data-closed":a.isOpen()?void 0:"","data-disabled":r.disabled?"":void 0})),c={dataset:l,isOpen:a.isOpen,disabled:()=>r.disabled??!1,shouldMount:()=>r.forceMount||a.isOpen(),contentId:o,toggle:a.toggle,generateId:$r(()=>i.id),registerContentId:en(s)};return b(RN.Provider,{value:c,get children(){return b(Ve,ne({as:"div"},l,i))}})}function jN(e){const t=$k(),[n,r]=se(e,["onClick"]);return b(Jo,ne({get"aria-expanded"(){return t.isOpen()},get"aria-controls"(){return je(()=>!!t.isOpen())()?t.contentId():void 0},get disabled(){return t.disabled()},onClick:o=>{ze(o,n.onClick),t.toggle()}},()=>t.dataset(),r))}var Gg=Object.assign(zN,{Content:NN,Trigger:jN}),lwe=ee("<div data-slot=collapsible-arrow><span data-slot=collapsible-arrow-icon>");function cwe(e){const[t,n]=se(e,["class","classList","variant"]);return b(Gg,ne({"data-component":"collapsible",get"data-variant"(){return t.variant||"normal"},get classList(){return{...t.classList,[t.class??""]:!!t.class}}},n))}function uwe(e){return b(Gg.Trigger,ne({"data-slot":"collapsible-trigger"},e))}function dwe(e){return b(Gg.Content,ne({"data-slot":"collapsible-content"},e))}function fwe(e){return(()=>{var t=lwe(),n=t.firstChild;return jr(t,e||{},!1,!0),j(n,b(Ht,{name:"chevron-down",size:"small"})),t})()}const fy=Object.assign(cwe,{Arrow:fwe,Trigger:uwe,Content:dwe});var hwe=ee("<svg>"),mwe=ee("<svg><rect width=3 height=3 rx=1></svg>",!1,!0,!1);const pwe=new Set([1,2,4,7,8,11,13,14]),gwe=new Set([0,3,12,15]),vwe=Array.from({length:16},(e,t)=>({id:t,x:t%4*4,y:Math.floor(t/4)*4,delay:Math.random()*1.5,duration:1+Math.random()*1,outer:pwe.has(t),corner:gwe.has(t)}));function Kg(e){return(()=>{var t=hwe();return jr(t,ne(e,{viewBox:"0 0 15 15","data-component":"spinner",get classList(){return{...e.classList,[e.class??""]:!!e.class}},fill:"currentColor"}),!0,!0),j(t,b(Ut,{each:vwe,children:n=>(()=>{var r=mwe();return De(i=>{var o=n.x,s=n.y,a=n.corner?0:void 0,l=n.corner?void 0:`${n.outer?"pulse-opacity-dim":"pulse-opacity"} ${n.duration}s ease-in-out infinite`,c=n.corner?void 0:"both",u=n.corner?void 0:`${n.delay}s`;return o!==i.e&&Ye(r,"x",i.e=o),s!==i.t&&Ye(r,"y",i.t=s),a!==i.a&&Xr(r,"opacity",i.a=a),l!==i.o&&Xr(r,"animation",i.o=l),c!==i.i&&Xr(r,"animation-fill-mode",i.i=c),u!==i.n&&Xr(r,"animation-delay",i.n=u),i},{e:void 0,t:void 0,a:void 0,o:void 0,i:void 0,n:void 0}),r})()})),t})()}var ywe=ee("<div>"),bwe=ee("<img data-slot=avatar-image>");const s9=typeof Intl<"u"&&"Segmenter"in Intl?new Intl.Segmenter(void 0,{granularity:"grapheme"}):void 0;function wwe(e){return e?s9?s9.segment(e)[Symbol.iterator]().next().value?.segment??Array.from(e)[0]??"":Array.from(e)[0]??"":""}function kwe(e){const[t,n]=se(e,["fallback","src","background","foreground","size","class","classList","style"]),r=t.src;return(()=>{var i=ywe();return jr(i,ne(n,{"data-component":"avatar",get"data-size"(){return t.size||"normal"},"data-has-image":r?"":void 0,get classList(){return{...t.classList,[t.class??""]:!!t.class}},get style(){return{...typeof t.style=="object"?t.style:{},...!r&&t.background?{"--avatar-bg":t.background}:{},...!r&&t.foreground?{"--avatar-fg":t.foreground}:{}}}}),!1,!0),j(i,b(ce,{when:r,keyed:!0,get fallback(){return wwe(t.fallback)},children:o=>(()=>{var s=bwe();return Ye(s,"src",o),Ye(s,"draggable",!1),s})()})),i})()}const a9={ask:"var(--icon-agent-ask-base)",build:"var(--icon-agent-build-base)",docs:"var(--icon-agent-docs-base)",plan:"var(--icon-agent-plan-base)"},l9=["var(--icon-agent-ask-base)","var(--icon-agent-build-base)","var(--icon-agent-docs-base)","var(--icon-agent-plan-base)","var(--syntax-info)","var(--syntax-success)","var(--syntax-warning)","var(--syntax-property)","var(--syntax-constant)","var(--text-diff-add-base)","var(--text-diff-delete-base)","var(--icon-warning-base)"];function xwe(e){let t=0;for(const n of e)t=t*31+n.charCodeAt(0)>>>0;return l9[t%l9.length]}function Swe(e,t){return t||(a9[e]??a9[e.toLowerCase()]??xwe(e.toLowerCase()))}function _we(e,t){if(e)for(let n=e.length-1;n>=0;n--){const r=e[n];if(!(r.role!=="user"||!r.agent))return Swe(r.agent,t.find(i=>i.name===r.agent)?.color)}}const Cwe=/^(New session|Child session) - \d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}\.\d{3}Z$/;function FN(e){return e&&(e.match(Cwe)?.[1]??e)}function UN(e,t,n,r=()=>!0){if(!n)return;const i=e.reduce((l,c)=>{if(!c.parentID)return l;const u=l.get(c.parentID);return u&&u.push(c.id),u||l.set(c.parentID,[c.id]),l},new Map),o=new Set([n]),s=[n];for(const l of s){const c=i.get(l);if(c)for(const u of c)o.has(u)||(o.add(u),s.push(u))}const a=s.find(l=>t[l]?.some(r));if(a)return t[a]?.find(r)}function Iwe(e,t,n,r){return UN(e,t,n,r)}function F3e(e,t,n,r){return UN(e,t,n,r)}const Twe=e=>e.type==="text"&&!e.synthetic&&!e.ignored,Ewe=e=>e.role==="user",$we=e=>e.role==="assistant",b0=(e,t)=>t?e.time.created!==t.time.created?e.time.created>t.time.created:e.id>t.id:!0;function Awe(e){if(!e.messages)return e.working?{loading:!1,thinking:!0}:{loading:!0};let t,n,r;for(const o of e.messages)Ewe(o)&&b0(o,t)&&(t=o);for(const o of e.messages)if($we(o)){if(!t){b0(o,n)&&(n=o);continue}o.parentID===t.id&&b0(o,n)&&(n=o),o.time.created>=t.time.created&&b0(o,r)&&(r=o)}n=n??r;const i=t?(e.parts[t.id]??[]).filter(Twe).map(o=>o.text).join(`
2437
+ ${t}`,iN=(e,t,n)=>{for(e.delete(t),e.set(t,n);e.size>Ebe;){const r=e.keys().next().value;if(r===void 0)return;e.delete(r)}},$be=(e,t,n)=>{const r=Bg(e,t),i=vf.session.get(r)??{prompt:"",files:{}};iN(vf.session,r,{...i,...n})},R3e=(e,t)=>vf.session.get(Bg(e,t)),N3e=(e,t,n)=>{iN(vf.terminal,Bg(e,t),n)},z3e=(e,t)=>vf.terminal.get(Bg(e,t)),Abe=e=>typeof e!="object"||e===null?!1:"draggable"in e,tp=e=>{if(!Abe(e))return;const t=e.draggable;if(t)return typeof t.id=="string"?t.id:void 0},Lbe=(e,t)=>({id:e,order:100,callback:n=>t==="x"?{...n,x:0}:{...n,y:0}}),oN=(e,t)=>()=>{const n=Hl();if(!n)return null;const[,{onDragStart:r,onDragEnd:i,addTransformer:o,removeTransformer:s}]=n,a=Lbe(t,e),l=jn(c=>(r(u=>{const d=tp(u);d&&o("draggables",d,a)}),i(u=>{const d=tp(u);d&&s("draggables",d,a.id)}),c));return fe(l),null},sN=oN("x","constrain-x-axis"),j3e=oN("y","constrain-y-axis");var Dbe=ee('<div><div class="text-[10px] leading-none font-black uppercase tracking-[0.04em] opacity-70"></div><div>'),Mbe=ee('<aside class="pointer-events-auto fixed bottom-3 right-3 z-50 w-[308px] max-w-[calc(100vw-1.5rem)] overflow-hidden rounded-xl border border-border-base bg-surface-raised-stronger-non-alpha p-0.5 text-text-strong shadow-[var(--shadow-lg-border-base)] sm:bottom-4 sm:right-4 sm:w-[324px]"><div class="grid grid-cols-5 gap-px font-mono">');const ly=5e3,Obe=(e,t=0)=>{if(!(e===void 0||Number.isNaN(e)))return`${e.toFixed(t)}ms`},nd=e=>{if(!(e===void 0||Number.isNaN(e)))return`${Math.round(e)}`},n9=e=>{if(e===void 0||Number.isNaN(e))return;const t=e/1024/1024;return`${t>=1024?t.toFixed(0):t.toFixed(1)}MB`},hs=(e,t,n=!1)=>e===void 0||Number.isNaN(e)?!1:n?e<t:e>t,cy=e=>e.includes("/session");function ms(e){return b(bn,{get value(){return e.tip},placement:"top",get children(){var t=Dbe(),n=t.firstChild,r=n.nextSibling;return j(n,()=>e.label),j(r,()=>e.value),De(i=>{var o={"flex min-h-[42px] w-full min-w-0 flex-col items-center justify-center rounded-[8px] px-0.5 py-1 text-center":!0,"col-span-2":!!e.wide},s={"text-[13px] leading-none font-bold tabular-nums sm:text-[14px]":!0,"text-text-on-critical-base":!!e.bad,"opacity-70":!!e.dim};return i.e=Ct(t,o,i.e),i.t=Ct(r,s,i.t),i},{e:void 0,t:void 0}),t}})}function Pbe(){const e=At(),t=So(),n=Zne(),[r,i]=Je({cls:void 0,delay:void 0,fps:void 0,gap:void 0,heap:{limit:void 0,used:void 0},inp:void 0,jank:void 0,long:{block:void 0,count:void 0,max:void 0},nav:{dur:void 0,pending:!1}}),o=()=>e.t("debugBar.na"),s=()=>r.heap.limit?(r.heap.used??0)/r.heap.limit:void 0,a=()=>{const p=s();return p===void 0?o():`${Math.round(p*100)}%`},l=()=>r.long.count===void 0?o():`${nd(r.long.block)??o()}/${r.long.count}`,c=()=>r.nav.pending?"...":nd(r.nav.dur)??o();let u="",d=0,h=!1,f=0,m=0;return re(()=>{const p=n(),g=`${t.pathname}${t.search}`;if(!h){h=!0,u=g;return}if(p){if(f!==0&&cancelAnimationFrame(f),m!==0&&cancelAnimationFrame(m),f=0,m=0,d!==0)return;d=performance.now(),cy(u)&&i("nav",{dur:void 0,pending:!0});return}if(d===0){u=g;return}const v=d,y=u;d=0,u=g,(cy(y)||cy(g))&&(f!==0&&cancelAnimationFrame(f),m!==0&&cancelAnimationFrame(m),f=requestAnimationFrame(()=>{f=0,m=requestAnimationFrame(()=>{m=0,i("nav",{dur:performance.now()-v,pending:!1})})}))}),Kt(()=>{const p=[],g=[],v=[],y=new Map;let w=!1,k,x=0,C=0,S=0;const $=(V,q,B)=>{for(;V[0]&&B-V[0].at>q;)V.shift()},O=V=>{$(g,ly,V);const q=g.reduce((J,ge)=>J+ge.dur,0),B=g.reduce((J,ge)=>Math.max(J,ge.dur),0),Y=g.filter(J=>J.dur>32).length;Xe(()=>{i("fps",q>0?g.length*1e3/q:void 0),i("gap",B>0?B:void 0),i("jank",Y)})},D=(V=performance.now())=>{if(!w)return;$(v,ly,V);const q=v.reduce((Y,J)=>Y+Math.max(0,J.dur-50),0),B=v.reduce((Y,J)=>Math.max(Y,J.dur),0);i("long",{block:q,count:v.length,max:B})},M=(V=performance.now())=>{for(const[Y,J]of y)V-J.at>ly&&y.delete(Y);let q=0,B=0;for(const Y of y.values())q=Math.max(q,Y.delay),B=Math.max(B,Y.dur);Xe(()=>{i("delay",q>0?q:void 0),i("inp",B>0?B:void 0)})},I=()=>{const V=performance.memory;V&&i("heap",{limit:V.jsHeapSizeLimit,used:V.usedJSHeapSize})},L=()=>{g.length=0,v.length=0,y.clear(),C=0,S=0,Xe(()=>{i("fps",void 0),i("gap",void 0),i("jank",void 0),i("delay",void 0),i("inp",void 0),w&&i("long",{block:0,count:0,max:0})})},A=(V,q,B)=>{if(typeof PerformanceObserver>"u"||!(PerformanceObserver.supportedEntryTypes??[]).includes(V))return!1;const Y=new PerformanceObserver(J=>B(J.getEntries()));try{return Y.observe(q),p.push(Y),!0}catch{return Y.disconnect(),!1}};A("layout-shift",{buffered:!0,type:"layout-shift"},V=>{const q=V.reduce((B,Y)=>{const J=Y;return J.hadRecentInput?B:B+J.value},0);q!==0&&i("cls",B=>(B??0)+q)})&&i("cls",0),A("longtask",{buffered:!0,type:"longtask"},V=>{const q=performance.now();v.push(...V.map(B=>({at:B.startTime,dur:B.duration}))),D(q)})&&(w=!0,i("long",{block:0,count:0,max:0})),A("event",{buffered:!0,durationThreshold:16,type:"event"},V=>{for(const q of V){const B=q;if(B.duration<16)continue;const Y=B.interactionId&&B.interactionId>0?B.interactionId:`${B.name}:${Math.round(B.startTime)}`,J=y.get(Y),ge=Math.max(0,(B.processingStart??B.startTime)-B.startTime);if(y.set(Y,{at:B.startTime,delay:Math.max(J?.delay??0,ge),dur:Math.max(J?.dur??0,B.duration)}),y.size<=200)continue;const ae=y.keys().next().value;ae!==void 0&&y.delete(ae)}M()});const T=V=>{if(document.visibilityState!=="visible"){x=0;return}if(C===0){C=V,x=requestAnimationFrame(T);return}g.push({at:V,dur:V-C}),C=V,V-S>=250&&(S=V,O(V)),x=requestAnimationFrame(T)},N=()=>{x!==0&&cancelAnimationFrame(x),x=0,k!==void 0&&(clearInterval(k),k=void 0)},W=()=>{document.visibilityState==="visible"&&(k===void 0&&(k=window.setInterval(()=>{D(),M(),I()},1e3)),x===0&&(x=requestAnimationFrame(T)))},K=()=>{if(document.visibilityState!=="visible"){N();return}L(),W()};I(),W(),Ln(document,"visibilitychange",K),fe(()=>{f!==0&&cancelAnimationFrame(f),m!==0&&cancelAnimationFrame(m),N();for(const V of p)V.disconnect()})}),(()=>{var p=Mbe(),g=p.firstChild;return j(g,b(ms,{get label(){return e.t("debugBar.nav.label")},get tip(){return e.t("debugBar.nav.tip")},get value(){return c()},get bad(){return hs(r.nav.dur,400)},get dim(){return je(()=>r.nav.dur===void 0)()&&!r.nav.pending}}),null),j(g,b(ms,{get label(){return e.t("debugBar.fps.label")},get tip(){return e.t("debugBar.fps.tip")},get value(){return je(()=>r.fps===void 0)()?o():`${Math.round(r.fps)}`},get bad(){return hs(r.fps,50,!0)},get dim(){return r.fps===void 0}}),null),j(g,b(ms,{get label(){return e.t("debugBar.frame.label")},get tip(){return e.t("debugBar.frame.tip")},get value(){return nd(r.gap)??o()},get bad(){return hs(r.gap,50)},get dim(){return r.gap===void 0}}),null),j(g,b(ms,{get label(){return e.t("debugBar.jank.label")},get tip(){return e.t("debugBar.jank.tip")},get value(){return je(()=>r.jank===void 0)()?o():`${r.jank}`},get bad(){return hs(r.jank,8)},get dim(){return r.jank===void 0}}),null),j(g,b(ms,{get label(){return e.t("debugBar.long.label")},get tip(){return e.t("debugBar.long.tip",{max:Obe(r.long.max)??o()})},get value(){return l()},get bad(){return hs(r.long.block,200)},get dim(){return r.long.count===void 0}}),null),j(g,b(ms,{get label(){return e.t("debugBar.delay.label")},get tip(){return e.t("debugBar.delay.tip")},get value(){return nd(r.delay)??o()},get bad(){return hs(r.delay,100)},get dim(){return r.delay===void 0}}),null),j(g,b(ms,{get label(){return e.t("debugBar.inp.label")},get tip(){return e.t("debugBar.inp.tip")},get value(){return nd(r.inp)??o()},get bad(){return hs(r.inp,200)},get dim(){return r.inp===void 0}}),null),j(g,b(ms,{get label(){return e.t("debugBar.cls.label")},get tip(){return e.t("debugBar.cls.tip")},get value(){return je(()=>r.cls===void 0)()?o():r.cls.toFixed(2)},get bad(){return hs(r.cls,.1)},get dim(){return r.cls===void 0}}),null),j(g,b(ms,{get label(){return e.t("debugBar.mem.label")},get tip(){return je(()=>r.heap.used===void 0)()?e.t("debugBar.mem.tipUnavailable"):e.t("debugBar.mem.tip",{used:n9(r.heap.used)??o(),limit:n9(r.heap.limit)??o()})},get value(){return a()},get bad(){return hs(s(),.8)},get dim(){return r.heap.used===void 0},wide:!0}),null),De(()=>Ye(p,"aria-label",e.t("debugBar.ariaLabel"))),p})()}const Rbe="__cp-mobile-close-button",r9="__cpMobileBackEmbedded",Nbe=()=>typeof navigator!="object"||!navigator.userAgent?!1:/Codeplane\/Mobile/.test(navigator.userAgent),zbe=()=>{try{const e=window.mobileApp;if(e&&typeof e.close=="function"){e.close();return}}catch{}try{window.webkit?.messageHandlers?.close?.postMessage(null)}catch{}};function jbe(e){const[t,n]=se(e,["visible","label","class","classList"]),r=F(()=>typeof t.visible=="boolean"?t.visible:Nbe());return Kt(()=>{!r()||typeof window>"u"||(window[r9]=!0)}),fe(()=>{typeof window>"u"||delete window[r9]}),b(ce,{get when(){return r()},get children(){return b(bn,{placement:"bottom",get value(){return t.label??"Back"},get children(){return b(Gt,ne(n,{id:Rbe,variant:"ghost",icon:"chevron-left",get"aria-label"(){return t.label??"Back"},get class(){return t.class},get classList(){return t.classList},onClick:()=>zbe()}))}})}})}const Sk=100;function Fbe(e,t,n=Sk){if(!e.stack.length){const i=t==="/"?["/"]:["/",t];return{stack:i,index:i.length-1,action:void 0}}const r=e.stack[e.index];return t===r?e.action?{...e,action:void 0}:e:e.action?{...e,action:void 0}:Ube(e,t,n)}function Ube(e,t,n=Sk){const r=e.stack.slice(0,e.index+1).concat(t),i=Hbe(r,r.length-1,n);return{...e,...i,action:void 0}}function Hbe(e,t,n=Sk){if(e.length<=n)return{stack:e,index:t};const r=e.length-n;return{stack:e.slice(r),index:Math.max(0,t-r)}}function Bbe(e){if(e.index<=0)return;const t=e.index-1,n=e.stack[t];if(n)return{state:{...e,index:t,action:"back"},to:n}}function Vbe(e){if(e.index>=e.stack.length-1)return;const t=e.index+1,n=e.stack[t];if(n)return{state:{...e,index:t,action:"forward"},to:n}}var qbe={};vr(qbe,{Anchor:()=>lN,Arrow:()=>xi,CloseButton:()=>cN,Content:()=>uN,Description:()=>dN,Popover:()=>wd,Portal:()=>fN,Root:()=>hN,Title:()=>mN,Trigger:()=>pN,usePopoverContext:()=>$a});var aN=pt();function $a(){const e=ut(aN);if(e===void 0)throw new Error("[kobalte]: `usePopoverContext` must be used within a `Popover` component");return e}function lN(e){const t=$a(),[n,r]=se(e,["ref"]);return b(Ve,ne({as:"div",ref(i){var o=st(t.setDefaultAnchorRef,n.ref);typeof o=="function"&&o(i)}},()=>t.dataset(),r))}function cN(e){const t=$a(),[n,r]=se(e,["aria-label","onClick"]);return b(Jo,ne({get"aria-label"(){return n["aria-label"]||t.translations().dismiss},onClick:o=>{ze(o,n.onClick),t.close()}},()=>t.dataset(),r))}function uN(e){let t;const n=$a(),r=Ne({id:n.generateId("content")},e),[i,o]=se(r,["ref","style","onOpenAutoFocus","onCloseAutoFocus","onPointerDownOutside","onFocusOutside","onInteractOutside"]);let s=!1,a=!1,l=!1;const c=f=>{i.onCloseAutoFocus?.(f),n.isModal()?(f.preventDefault(),s||un(n.triggerRef())):(f.defaultPrevented||(a||un(n.triggerRef()),f.preventDefault()),a=!1,l=!1)},u=f=>{i.onPointerDownOutside?.(f),n.isModal()&&(s=f.detail.isContextMenu)},d=f=>{i.onFocusOutside?.(f),n.isOpen()&&n.isModal()&&f.preventDefault()},h=f=>{i.onInteractOutside?.(f),!n.isModal()&&(f.defaultPrevented||(a=!0,f.detail.originalEvent.type==="pointerdown"&&(l=!0)),Dn(n.triggerRef(),f.target)&&f.preventDefault(),f.detail.originalEvent.type==="focusin"&&l&&f.preventDefault())};return mp({isDisabled:()=>!(n.isOpen()&&n.isModal()),targets:()=>t?[t]:[]}),pp({element:()=>t??null,enabled:()=>n.contentPresent()&&n.preventScroll()}),hp({trapFocus:()=>n.isOpen()&&n.isModal(),onMountAutoFocus:i.onOpenAutoFocus,onUnmountAutoFocus:c},()=>t),re(()=>fe(n.registerContentId(o.id))),b(ce,{get when(){return n.contentPresent()},get children(){return b(is.Positioner,{get children(){return b(eu,ne({ref(f){var m=st(p=>{n.setContentRef(p),t=p},i.ref);typeof m=="function"&&m(f)},role:"dialog",tabIndex:-1,get disableOutsidePointerEvents(){return je(()=>!!n.isOpen())()&&n.isModal()},get excludedElements(){return[n.triggerRef]},get style(){return gr({"--kb-popover-content-transform-origin":"var(--kb-popper-content-transform-origin)",position:"relative"},i.style)},get"aria-labelledby"(){return n.titleId()},get"aria-describedby"(){return n.descriptionId()},onPointerDownOutside:u,onFocusOutside:d,onInteractOutside:h,get onDismiss(){return n.close}},()=>n.dataset(),o))}})}})}function dN(e){const t=$a(),n=Ne({id:t.generateId("description")},e),[r,i]=se(n,["id"]);return re(()=>fe(t.registerDescriptionId(r.id))),b(Ve,ne({as:"p",get id(){return r.id}},()=>t.dataset(),i))}function fN(e){const t=$a();return b(ce,{get when(){return t.contentPresent()},get children(){return b(Os,e)}})}var i9={dismiss:"Dismiss"};function hN(e){const t=`popover-${an()}`,n=Ne({id:t,modal:!1,translations:i9},e),[r,i]=se(n,["translations","id","open","defaultOpen","onOpenChange","modal","preventScroll","forceMount","anchorRef"]),[o,s]=de(),[a,l]=de(),[c,u]=de(),[d,h]=de(),[f,m]=de(),[p,g]=de(),v=Ps({open:()=>r.open,defaultOpen:()=>r.defaultOpen,onOpenChange:C=>r.onOpenChange?.(C)}),y=()=>r.anchorRef?.()??o()??a(),{present:w}=po({show:()=>r.forceMount||v.isOpen(),element:()=>c()??null}),k=F(()=>({"data-expanded":v.isOpen()?"":void 0,"data-closed":v.isOpen()?void 0:""})),x={translations:()=>r.translations??i9,dataset:k,isOpen:v.isOpen,isModal:()=>r.modal??!1,preventScroll:()=>r.preventScroll??x.isModal(),contentPresent:w,triggerRef:a,contentId:d,titleId:f,descriptionId:p,setDefaultAnchorRef:s,setTriggerRef:l,setContentRef:u,close:v.close,toggle:v.toggle,generateId:$r(()=>r.id),registerContentId:en(h),registerTitleId:en(m),registerDescriptionId:en(g)};return b(aN.Provider,{value:x,get children(){return b(is,ne({anchorRef:y,contentRef:c},i))}})}function mN(e){const t=$a(),n=Ne({id:t.generateId("title")},e),[r,i]=se(n,["id"]);return re(()=>fe(t.registerTitleId(r.id))),b(Ve,ne({as:"h2",get id(){return r.id}},()=>t.dataset(),i))}function pN(e){const t=$a(),[n,r]=se(e,["ref","onClick","onPointerDown"]);return b(Jo,ne({ref(s){var a=st(t.setTriggerRef,n.ref);typeof a=="function"&&a(s)},"aria-haspopup":"dialog",get"aria-expanded"(){return t.isOpen()},get"aria-controls"(){return je(()=>!!t.isOpen())()?t.contentId():void 0},onPointerDown:s=>{ze(s,n.onPointerDown),s.preventDefault()},onClick:s=>{ze(s,n.onClick),t.toggle()}},()=>t.dataset(),r))}var wd=Object.assign(hN,{Anchor:lN,Arrow:xi,CloseButton:cN,Content:uN,Description:dN,Portal:fN,Title:mN,Trigger:pN}),Vg=["id","name","validationState","required","disabled","readOnly"];function qg(e){const t=`form-control-${an()}`,n=Ne({id:t},e),[r,i]=de(),[o,s]=de(),[a,l]=de(),[c,u]=de(),d=(p,g,v)=>{const y=v!=null||r()!=null;return[v,r(),y&&g!=null?p:void 0].filter(Boolean).join(" ")||void 0},h=p=>[a(),c(),p].filter(Boolean).join(" ")||void 0,f=F(()=>({"data-valid":he(n.validationState)==="valid"?"":void 0,"data-invalid":he(n.validationState)==="invalid"?"":void 0,"data-required":he(n.required)?"":void 0,"data-disabled":he(n.disabled)?"":void 0,"data-readonly":he(n.readOnly)?"":void 0}));return{formControlContext:{name:()=>he(n.name)??he(n.id),dataset:f,validationState:()=>he(n.validationState),isRequired:()=>he(n.required),isDisabled:()=>he(n.disabled),isReadOnly:()=>he(n.readOnly),labelId:r,fieldId:o,descriptionId:a,errorMessageId:c,getAriaLabelledBy:d,getAriaDescribedBy:h,generateId:$r(()=>he(n.id)),registerLabel:en(i),registerField:en(s),registerDescription:en(l),registerErrorMessage:en(u)}}}var eh=pt();function Si(){const e=ut(eh);if(e===void 0)throw new Error("[kobalte]: `useFormControlContext` must be used within a `FormControlContext.Provider` component");return e}function Aa(e){const t=Si(),n=Ne({id:t.generateId("description")},e);return re(()=>fe(t.registerDescription(n.id))),b(Ve,ne({as:"div"},()=>t.dataset(),n))}var _k=["id","aria-label","aria-labelledby","aria-describedby"];function Ck(e){const t=Si(),n=Ne({id:t.generateId("field")},e);return re(()=>fe(t.registerField(he(n.id)))),{fieldProps:{id:()=>he(n.id),ariaLabel:()=>he(n["aria-label"]),ariaLabelledBy:()=>t.getAriaLabelledBy(he(n.id),he(n["aria-label"]),he(n["aria-labelledby"])),ariaDescribedBy:()=>t.getAriaDescribedBy(he(n["aria-describedby"]))}}}function th(e){let t;const n=Si(),r=Ne({id:n.generateId("label")},e),[i,o]=se(r,["ref"]),s=Sf(()=>t,()=>"label");return re(()=>fe(n.registerLabel(o.id))),b(Ve,ne({as:"label",ref(a){var l=st(c=>t=c,i.ref);typeof l=="function"&&l(a)},get for(){return je(()=>s()==="label")()?n.fieldId():void 0}},()=>n.dataset(),o))}function nh(e,t){re(gt(e,n=>{if(n==null)return;const r=Wbe(n);r!=null&&(r.addEventListener("reset",t,{passive:!0}),fe(()=>{r.removeEventListener("reset",t)}))}))}function Wbe(e){return Gbe(e)?e.form:e.closest("form")}function Gbe(e){return e.matches("textarea, input, select, button")}function La(e){const t=Si(),n=Ne({id:t.generateId("error-message")},e),[r,i]=se(n,["forceMount"]),o=()=>t.validationState()==="invalid";return re(()=>{o()&&fe(t.registerErrorMessage(i.id))}),b(ce,{get when(){return r.forceMount||o()},get children(){return b(Ve,ne({as:"div"},()=>t.dataset(),i))}})}var Kbe={};vr(Kbe,{Control:()=>vN,Description:()=>yN,ErrorMessage:()=>bN,Input:()=>wN,Label:()=>kN,Root:()=>xN,Switch:()=>ea,Thumb:()=>SN,useSwitchContext:()=>Bl});var gN=pt();function Bl(){const e=ut(gN);if(e===void 0)throw new Error("[kobalte]: `useSwitchContext` must be used within a `Switch` component");return e}function vN(e){const t=Si(),n=Bl(),r=Ne({id:n.generateId("control")},e),[i,o]=se(r,["onClick","onKeyDown"]);return b(Ve,ne({as:"div",onClick:l=>{ze(l,i.onClick),n.toggle(),n.inputRef()?.focus()},onKeyDown:l=>{ze(l,i.onKeyDown),l.key===dp.Space&&(n.toggle(),n.inputRef()?.focus())}},()=>t.dataset(),()=>n.dataset(),o))}function yN(e){const t=Bl();return b(Aa,ne(()=>t.dataset(),e))}function bN(e){const t=Bl();return b(La,ne(()=>t.dataset(),e))}function wN(e){const t=Si(),n=Bl(),r=Ne({id:n.generateId("input")},e),[i,o,s]=se(r,["ref","style","onChange","onFocus","onBlur"],_k),{fieldProps:a}=Ck(o);return b(Ve,ne({as:"input",ref(d){var h=st(n.setInputRef,i.ref);typeof h=="function"&&h(d)},type:"checkbox",role:"switch",get id(){return a.id()},get name(){return t.name()},get value(){return n.value()},get checked(){return n.checked()},get required(){return t.isRequired()},get disabled(){return t.isDisabled()},get readonly(){return t.isReadOnly()},get style(){return gr({...fp},i.style)},get"aria-checked"(){return n.checked()},get"aria-label"(){return a.ariaLabel()},get"aria-labelledby"(){return a.ariaLabelledBy()},get"aria-describedby"(){return a.ariaDescribedBy()},get"aria-invalid"(){return t.validationState()==="invalid"||void 0},get"aria-required"(){return t.isRequired()||void 0},get"aria-disabled"(){return t.isDisabled()||void 0},get"aria-readonly"(){return t.isReadOnly()||void 0},onChange:d=>{ze(d,i.onChange),d.stopPropagation();const h=d.target;n.setIsChecked(h.checked),h.checked=n.checked()},onFocus:d=>{ze(d,i.onFocus),n.setIsFocused(!0)},onBlur:d=>{ze(d,i.onBlur),n.setIsFocused(!1)}},()=>t.dataset(),()=>n.dataset(),s))}function kN(e){const t=Bl();return b(th,ne(()=>t.dataset(),e))}function xN(e){let t;const n=`switch-${an()}`,r=Ne({value:"on",id:n},e),[i,o,s]=se(r,["ref","children","value","checked","defaultChecked","onChange","onPointerDown"],Vg),[a,l]=de(),[c,u]=de(!1),{formControlContext:d}=qg(o),h=OR({isSelected:()=>i.checked,defaultIsSelected:()=>i.defaultChecked,onSelectedChange:g=>i.onChange?.(g),isDisabled:()=>d.isDisabled(),isReadOnly:()=>d.isReadOnly()});nh(()=>t,()=>h.setIsSelected(i.defaultChecked??!1));const f=g=>{ze(g,i.onPointerDown),c()&&g.preventDefault()},m=F(()=>({"data-checked":h.isSelected()?"":void 0})),p={value:()=>i.value,dataset:m,checked:()=>h.isSelected(),inputRef:a,generateId:$r(()=>he(o.id)),toggle:()=>h.toggle(),setIsChecked:g=>h.setIsSelected(g),setIsFocused:u,setInputRef:l};return b(eh.Provider,{value:d,get children(){return b(gN.Provider,{value:p,get children(){return b(Ve,ne({as:"div",ref(g){var v=st(y=>t=y,i.ref);typeof v=="function"&&v(g)},role:"group",get id(){return he(o.id)},onPointerDown:f},()=>d.dataset(),m,s,{get children(){return b(Zbe,{state:p,get children(){return i.children}})}}))}})}})}function Zbe(e){const t=Cl(()=>{const n=e.children;return kf(n)?n(e.state):n});return je(t)}function SN(e){const t=Si(),n=Bl(),r=Ne({id:n.generateId("thumb")},e);return b(Ve,ne({as:"div"},()=>t.dataset(),()=>n.dataset(),r))}var ea=Object.assign(xN,{Control:vN,Description:yN,ErrorMessage:bN,Input:wN,Label:kN,Thumb:SN});function Ybe(e){const[t,n]=se(e,["children","class","hideLabel","description"]);return b(ea,ne(n,{get class(){return t.class},"data-component":"switch",get children(){return[b(ea.Input,{"data-slot":"switch-input"}),b(ce,{get when(){return t.children},get children(){return b(ea.Label,{"data-slot":"switch-label",get classList(){return{"sr-only":t.hideLabel}},get children(){return t.children}})}}),b(ce,{get when(){return t.description},get children(){return b(ea.Description,{"data-slot":"switch-description",get children(){return t.description}})}}),b(ea.ErrorMessage,{"data-slot":"switch-error"}),b(ea.Control,{"data-slot":"switch-control",get children(){return b(ea.Thumb,{"data-slot":"switch-thumb"})}})]}}))}var Xbe=class{collection;direction;orientation;constructor(e,t,n){this.collection=e,this.direction=t,this.orientation=n}flipDirection(){return this.direction()==="rtl"&&this.orientation()==="horizontal"}getKeyLeftOf(e){if(this.flipDirection())return this.getNextKey(e);if(this.orientation()==="horizontal")return this.getPreviousKey(e)}getKeyRightOf(e){if(this.flipDirection())return this.getPreviousKey(e);if(this.orientation()==="horizontal")return this.getNextKey(e)}getKeyAbove(e){if(this.orientation()==="vertical")return this.getPreviousKey(e)}getKeyBelow(e){if(this.orientation()==="vertical")return this.getNextKey(e)}getFirstKey(){let e=this.collection().getFirstKey();return e==null?void 0:(this.collection().getItem(e)?.disabled&&(e=this.getNextKey(e)),e)}getLastKey(){let e=this.collection().getLastKey();return e==null?void 0:(this.collection().getItem(e)?.disabled&&(e=this.getPreviousKey(e)),e)}getNextKey(e){let t=e,n;do if(t=this.collection().getKeyAfter(t)??this.collection().getFirstKey(),t==null||(n=this.collection().getItem(t),n==null))return;while(n.disabled);return t}getPreviousKey(e){let t=e,n;do if(t=this.collection().getKeyBefore(t)??this.collection().getLastKey(),t==null||(n=this.collection().getItem(t),n==null))return;while(n.disabled);return t}};function Jbe(e,t){const n=new ResizeObserver(e);return fe(n.disconnect.bind(n)),{observe:r=>n.observe(r,t),unobserve:n.unobserve.bind(n)}}function Ik(e,t,n){const r=new WeakMap,{observe:i,unobserve:o}=Jbe(s=>{for(const a of s){const{contentRect:l,target:c}=a,u=Math.round(l.width),d=Math.round(l.height),h=r.get(c);(!h||h.width!==u||h.height!==d)&&(t(l,c,a),r.set(c,{width:u,height:d}))}},n);re(s=>{const a=V9(V0(he(e)));return q9(a,s,i,o),a},[])}var Qbe={};vr(Qbe,{Content:()=>CN,Indicator:()=>IN,List:()=>TN,Root:()=>EN,Tabs:()=>ih,Trigger:()=>$N,useTabsContext:()=>rh});var _N=pt();function rh(){const e=ut(_N);if(e===void 0)throw new Error("[kobalte]: `useTabsContext` must be used within a `Tabs` component");return e}function CN(e){const[t,n]=de(),r=rh(),[i,o]=se(e,["ref","id","value","forceMount"]),[s,a]=de(0),l=()=>i.id??r.generateContentId(i.value),c=()=>r.listState().selectedKey()===i.value,{present:u}=po({show:()=>i.forceMount||c(),element:()=>t()??null});return re(gt([()=>t(),()=>u()],([d,h])=>{if(d==null||!h)return;const f=()=>{const p=J9(d,{tabbable:!0});a(p.nextNode()?void 0:0)};f();const m=new MutationObserver(f);m.observe(d,{subtree:!0,childList:!0,attributes:!0,attributeFilter:["tabindex","disabled"]}),fe(()=>{m.disconnect()})})),re(gt([()=>i.value,l],([d,h])=>{r.contentIdsMap().set(d,h)})),b(ce,{get when(){return u()},get children(){return b(Ve,ne({as:"div",ref(d){var h=st(n,i.ref);typeof h=="function"&&h(d)},get id(){return l()},role:"tabpanel",get tabIndex(){return s()},get"aria-labelledby"(){return r.triggerIdsMap().get(i.value)},get"data-orientation"(){return r.orientation()},get"data-selected"(){return c()?"":void 0}},o))}})}function IN(e){const t=rh(),[n,r]=se(e,["style"]),[i,o]=de({width:void 0,height:void 0}),{direction:s}=Co(),a=()=>{const h=t.selectedTab();if(h==null)return;const f={transform:void 0,width:void 0,height:void 0},m=s()==="rtl"?-1*(h.offsetParent?.offsetWidth-h.offsetWidth-h.offsetLeft):h.offsetLeft;f.transform=t.orientation()==="vertical"?`translateY(${h.offsetTop}px)`:`translateX(${m}px)`,t.orientation()==="horizontal"?f.width=`${h.offsetWidth}px`:f.height=`${h.offsetHeight}px`,o(f)};Kt(()=>{queueMicrotask(()=>{a()})}),re(gt([t.selectedTab,t.orientation,s],()=>{a()},{defer:!0}));const[l,c]=de(!1);let u=null,d=null;return Ik(t.selectedTab,(h,f)=>{if(d!==f){d=f;return}c(!0),u&&clearTimeout(u),u=setTimeout(()=>{u=null,c(!1)},1),a()}),b(Ve,ne({as:"div",role:"presentation",get style(){return gr(i(),n.style)},get"data-orientation"(){return t.orientation()},get"data-resizing"(){return l()}},r))}function TN(e){let t;const n=rh(),[r,i]=se(e,["ref","onKeyDown","onMouseDown","onFocusIn","onFocusOut"]),{direction:o}=Co(),s=new Xbe(()=>n.listState().collection(),o,n.orientation),a=CR({selectionManager:()=>n.listState().selectionManager(),keyboardDelegate:()=>s,selectOnFocus:()=>n.activationMode()==="automatic",shouldFocusWrap:!1,disallowEmptySelection:!0},()=>t);return re(()=>{if(t==null)return;const l=t.querySelector(`[data-key="${n.listState().selectedKey()}"]`);l!=null&&n.setSelectedTab(l)}),b(Ve,ne({as:"div",ref(l){var c=st(u=>t=u,r.ref);typeof c=="function"&&c(l)},role:"tablist",get"aria-orientation"(){return n.orientation()},get"data-orientation"(){return n.orientation()},get onKeyDown(){return wt([r.onKeyDown,a.onKeyDown])},get onMouseDown(){return wt([r.onMouseDown,a.onMouseDown])},get onFocusIn(){return wt([r.onFocusIn,a.onFocusIn])},get onFocusOut(){return wt([r.onFocusOut,a.onFocusOut])}},i))}function e2e(e){const[t,n]=El({value:()=>he(e.selectedKey),defaultValue:()=>he(e.defaultSelectedKey),onChange:c=>e.onSelectionChange?.(c)}),r=F(()=>{const c=t();return c!=null?[c]:[]}),[,i]=se(e,["onSelectionChange"]),o=ne(i,{selectionMode:"single",disallowEmptySelection:!0,allowDuplicateSelectionEvents:!0,selectedKeys:r,onSelectionChange:c=>{const u=c.values().next().value;u===t()&&e.onSelectionChange?.(u),n(u)}}),{collection:s,selectionManager:a}=Ig(o),l=F(()=>{const c=t();return c!=null?s().getItem(c):void 0});return{collection:s,selectionManager:a,selectedKey:t,setSelectedKey:n,selectedItem:l}}function EN(e){const t=`tabs-${an()}`,n=Ne({id:t,orientation:"horizontal",activationMode:"automatic"},e),[r,i]=se(n,["value","defaultValue","onChange","orientation","activationMode","disabled"]),[o,s]=de([]),[a,l]=de(),{DomCollectionProvider:c}=DR({items:o,onItemsChange:s}),u=e2e({selectedKey:()=>r.value,defaultSelectedKey:()=>r.defaultValue,onSelectionChange:p=>r.onChange?.(String(p)),dataSource:o});let d=u.selectedKey();re(gt([()=>u.selectionManager(),()=>u.collection(),()=>u.selectedKey()],([p,g,v])=>{let y=v;if(p.isEmpty()||y==null||!g.getItem(y)){y=g.getFirstKey();let w=y!=null?g.getItem(y):void 0;for(;w?.disabled&&w.key!==g.getLastKey();)y=g.getKeyAfter(w.key),w=y!=null?g.getItem(y):void 0;w?.disabled&&y===g.getLastKey()&&(y=g.getFirstKey()),y!=null&&p.setSelectedKeys([y])}(p.focusedKey()==null||!p.isFocused()&&y!==d)&&p.setFocusedKey(y),d=y}));const h=new Map,f=new Map,m={isDisabled:()=>r.disabled??!1,orientation:()=>r.orientation,activationMode:()=>r.activationMode,triggerIdsMap:()=>h,contentIdsMap:()=>f,listState:()=>u,selectedTab:a,setSelectedTab:l,generateTriggerId:p=>`${i.id}-trigger-${p}`,generateContentId:p=>`${i.id}-content-${p}`};return b(c,{get children(){return b(_N.Provider,{value:m,get children(){return b(Ve,ne({as:"div",get"data-orientation"(){return m.orientation()}},i))}})}})}function $N(e){let t;const n=rh(),r=Ne({type:"button"},e),[i,o]=se(r,["ref","id","value","disabled","onPointerDown","onPointerUp","onClick","onKeyDown","onMouseDown","onFocus"]),s=()=>i.id??n.generateTriggerId(i.value),a=()=>n.listState().selectionManager().focusedKey()===i.value,l=()=>i.disabled||n.isDisabled(),c=()=>n.contentIdsMap().get(i.value);MR({getItem:()=>({ref:()=>t,type:"item",key:i.value,textValue:"",disabled:l()})});const u=Cg({key:()=>i.value,selectionManager:()=>n.listState().selectionManager(),disabled:l},()=>t),d=h=>{K9()&&un(h.currentTarget)};return re(gt([()=>i.value,s],([h,f])=>{n.triggerIdsMap().set(h,f)})),b(Ve,ne({as:"button",ref(h){var f=st(m=>t=m,i.ref);typeof f=="function"&&f(h)},get id(){return s()},role:"tab",get tabIndex(){return je(()=>!l())()?u.tabIndex():void 0},get disabled(){return l()},get"aria-selected"(){return u.isSelected()},get"aria-disabled"(){return l()||void 0},get"aria-controls"(){return je(()=>!!u.isSelected())()?c():void 0},get"data-key"(){return u.dataKey()},get"data-orientation"(){return n.orientation()},get"data-selected"(){return u.isSelected()?"":void 0},get"data-highlighted"(){return a()?"":void 0},get"data-disabled"(){return l()?"":void 0},get onPointerDown(){return wt([i.onPointerDown,u.onPointerDown])},get onPointerUp(){return wt([i.onPointerUp,u.onPointerUp])},get onClick(){return wt([i.onClick,u.onClick,d])},get onKeyDown(){return wt([i.onKeyDown,u.onKeyDown])},get onMouseDown(){return wt([i.onMouseDown,u.onMouseDown])},get onFocus(){return wt([i.onFocus,u.onFocus])}},o))}var ih=Object.assign(EN,{Content:CN,Indicator:IN,List:TN,Trigger:$N}),t2e=ee("<div data-slot=tabs-trigger-wrapper>"),n2e=ee("<div data-slot=tabs-trigger-close-button>"),r2e=ee("<div data-slot=tabs-section-title>");function i2e(e){const[t,n]=se(e,["class","classList","variant","orientation"]);return b(ih,ne(n,{get orientation(){return t.orientation},"data-component":"tabs",get"data-variant"(){return t.variant||"normal"},get"data-orientation"(){return t.orientation||"horizontal"},get classList(){return{...t.classList,[t.class??""]:!!t.class}}}))}function o2e(e){const[t,n]=se(e,["class","classList"]);return b(ih.List,ne(n,{"data-slot":"tabs-list",get classList(){return{...t.classList,[t.class??""]:!!t.class}}}))}function s2e(e){const[t,n]=se(e,["class","classList","classes","children","closeButton","hideCloseButton","onMiddleClick"]);return(()=>{var r=t2e();return r.addEventListener("auxclick",i=>{i.button===1&&t.onMiddleClick&&(i.preventDefault(),t.onMiddleClick())}),r.$$mousedown=i=>{i.button===1&&t.onMiddleClick&&i.preventDefault()},j(r,b(ih.Trigger,ne(n,{"data-slot":"tabs-trigger",get"data-value"(){return e.value},get classList(){return{[t.classes?.button??""]:t.classes?.button}},get children(){return t.children}})),null),j(r,b(ce,{get when(){return t.closeButton},keyed:!0,children:i=>(()=>{var o=n2e();return j(o,i),De(()=>Ye(o,"data-hidden",t.hideCloseButton)),o})()}),null),De(i=>{var o=e.value,s={...t.classList,[t.class??""]:!!t.class};return o!==i.e&&Ye(r,"data-value",i.e=o),i.t=Ct(r,s,i.t),i},{e:void 0,t:void 0}),r})()}function a2e(e){const[t,n]=se(e,["class","classList","children"]);return b(ih.Content,ne(n,{"data-slot":"tabs-content",get classList(){return{...t.classList,[t.class??""]:!!t.class}},get children(){return t.children}}))}const l2e=e=>(()=>{var t=r2e();return j(t,()=>e.children),t})(),Ao=Object.assign(i2e,{List:o2e,Trigger:s2e,Content:a2e,SectionTitle:l2e});or(["mousedown"]);var c2e=ee("<span class=text-text-invert-weak>v"),u2e=ee('<span class="flex items-center gap-2"><span>'),d2e=ee('<div><div class="flex flex-col items-start min-w-0 w-full"><div class="flex flex-row items-center gap-2 min-w-0 w-full"><span>'),f2e=ee("<span>v"),h2e=ee('<div class="flex flex-row gap-3"><span>'),m2e=ee("<span class=text-text-weak>"),p2e=ee("<span class=text-text-weaker>"),g2e=ee("<span class=text-text-weak>••••••••"),v2e=ee("<div>");function y2e(e){const t=At(),[n,r]=de(!1);let i,o;const s=F(()=>Om(e.conn)),a=()=>{const u=i?i.scrollWidth>i.clientWidth:!1,d=o?o.scrollWidth>o.clientWidth:!1;r(u||d)};re(()=>{s(),e.conn.http.url,e.status?.version,queueMicrotask(a)}),Kt(()=>{typeof ResizeObserver=="function"&&(Ik([i,o],a),a())});const l=()=>(()=>{var u=u2e(),d=u.firstChild;return j(d,()=>Om(e.conn,!0)),j(u,b(ce,{get when(){return e.status?.version},get children(){var h=c2e();return h.firstChild,j(h,()=>e.status?.version,null),h}}),null),u})(),c=Cl(()=>e.badge);return b(bn,{class:"flex-1 min-w-0",get value(){return l()},contentStyle:{"max-width":"none","white-space":"nowrap"},placement:"top-start",get inactive(){return je(()=>!n())()&&!e.conn.displayName},get children(){var u=d2e(),d=u.firstChild,h=d.firstChild,f=h.firstChild,m=i;return typeof m=="function"?pr(m,f):i=f,j(f,s),j(h,b(ce,{get when(){return c()},keyed:!0,get fallback(){return b(ce,{get when(){return e.status?.version},get children(){var p=f2e();p.firstChild;var g=o;return typeof g=="function"?pr(g,p):o=p,j(p,()=>e.status?.version,null),De(()=>Bo(p,`${e.versionClass??"text-text-weak text-14-regular truncate"} min-w-0`)),p}})},children:p=>p}),null),j(d,b(ce,{get when(){return je(()=>!!(e.showCredentials&&e.conn.type==="http"))()&&e.conn},keyed:!0,children:p=>(()=>{var g=h2e(),v=g.firstChild;return j(v,(()=>{var y=je(()=>!!p.http.username);return()=>y()?(()=>{var w=m2e();return j(w,()=>p.http.username),w})():(()=>{var w=p2e();return j(w,()=>t.t("server.row.noUsername")),w})()})()),j(g,(()=>{var y=je(()=>!!p.http.password);return()=>y()&&g2e()})(),null),g})()}),null),j(u,()=>e.children,null),De(p=>{var g=e.class,v=!!e.dimmed,y=`${e.nameClass??"truncate"} min-w-0`;return g!==p.e&&Bo(u,p.e=g),v!==p.t&&u.classList.toggle("opacity-50",p.t=v),y!==p.a&&Bo(f,p.a=y),p},{e:void 0,t:void 0,a:void 0}),u}})}function b2e(e){return(()=>{var t=v2e();return De(n=>Ct(t,{"size-1.5 rounded-full shrink-0":!0,"bg-icon-success-base":e.health?.healthy===!0,"bg-icon-critical-base":e.health?.healthy===!1,"bg-border-weak-base":e.health===void 0},n)),t})()}var w2e=ee('<code class="bg-surface-raised-base px-1.5 py-0.5 rounded-sm text-text-base">'),v0=ee('<div class="flex flex-col px-2 pb-2"><div class="flex flex-col p-3 bg-background-base rounded-lg min-h-14">'),k2e=ee('<div class="flex items-center gap-1 w-[360px] rounded-xl shadow-[var(--shadow-lg-border-base)]">'),x2e=ee("<div class=flex-1>"),S2e=ee('<button type=button class="flex items-center gap-2 w-full h-8 pl-3 pr-1.5 py-1.5 rounded-md transition-colors text-left">'),_2e=ee('<span class="text-11-regular text-text-base bg-surface-base px-1.5 py-0.5 rounded-sm">'),uy=ee('<div class="text-14-regular text-text-base text-center my-auto">'),C2e=ee('<button type=button class="flex items-center gap-2 w-full h-8 pl-3 pr-2 py-1 rounded-md hover:bg-surface-raised-base-hover transition-colors text-left"><div></div><span class="text-14-regular text-text-base truncate flex-1"></span><div>'),I2e=ee('<div class="flex items-center gap-2 w-full px-2 py-1"><div></div><span class="text-14-regular text-text-base truncate">'),T2e=ee('<div class="flex items-center gap-2 w-full px-2 py-1"><div class="size-1.5 rounded-full shrink-0 bg-icon-success-base"></div><span class="text-14-regular text-text-base truncate">');const E2e=1e4,$2e=(e,t)=>{const n=t.reduce((r,i)=>r.flatMap(o=>t.includes(o)?[o]:o.split(i).flatMap((s,a,l)=>a===l.length-1?[s]:[s,i])),[e]);return n.length===1?e:je(()=>n.map(r=>t.includes(r)?(()=>{var i=w2e();return j(i,r),i})():r))},A2e=e=>{if(!e.startsWith("file://"))return e;const t=e.split("/").at(-1);return t?decodeURIComponent(t):e},L2e=(e,t,n)=>{if(!e.length)return e;const r=new Map(e.map((o,s)=>[o,s])),i=o=>o?.healthy===!0?0:o?.healthy===!1?2:1;return e.slice().sort((o,s)=>{if(dn.key(o)===t)return-1;if(dn.key(s)===t)return 1;const a=i(n[dn.key(o)])-i(n[dn.key(s)]);return a!==0?a:(r.get(o)??0)-(r.get(s)??0)})},D2e=(e,t)=>{const n=h4(),[r,i]=Je({});return re(()=>{if(!t()){i(St({}));return}const o=e();let s=!1;const a=async()=>{const c={};await Promise.all(o.map(async u=>{c[dn.key(u)]=await n(u.http)})),!s&&i(St(c))};a();const l=setInterval(()=>void a(),E2e);fe(()=>{s=!0,clearInterval(l)})}),r},M2e=e=>{const[t,n]=Je({url:void 0,tick:0});return re(()=>{t.tick;let r=!1;const i=e?.();if(!i){n("url",void 0),fe(()=>{r=!0});return}if(i instanceof Promise){i.then(o=>{if(r)return;const s=o?Mm(o):void 0;n("url",s??o??void 0)}),fe(()=>{r=!0});return}n("url",Mm(i)??i),fe(()=>{r=!0})}),{key:()=>{const r=t.url;if(r)return dn.key({type:"http",http:{url:r}})},refresh:()=>n("tick",r=>r+1)}},O2e=()=>{const e=tk(),t=bO(),n=Jn(),r=Gi(),i=At(),o=()=>e?.data??n.data,s=c=>e?e.set("mcp",c):n.set("mcp",c),a=c=>e?e.set("mcp_ready",c):n.set("mcp_ready",c),l=()=>t?.client??r.client;return Ad(()=>({mutationFn:async c=>{await(o().mcp[c]?.status==="connected"?l().mcp.disconnect({name:c}):l().mcp.connect({name:c}));const d=await l().mcp.status();d.data&&s(d.data),a(!0)},onError:c=>{$t({variant:"error",title:i.t("common.requestFailed"),description:c instanceof Error?c.message:String(c)})}}))};function P2e(e){const t=tk(),n=Jn(),r=sr(),i=qi(),o=ko(),s=At(),a=xo(),l=bO(),c=Gi(),u=F(()=>t?.data??n.data),d=q=>t?t.set("mcp",q):n.set("mcp",q),h=q=>t?t.set("mcp_ready",q):n.set("mcp_ready",q),f=q=>t?t.set("lsp",q):n.set("lsp",q),m=q=>t?t.set("lsp_ready",q):n.set("lsp_ready",q),p=()=>l?.client??c.client,[g,v]=Je({lspDone:!1,lspLoading:!1,mcpDone:!1,mcpLoading:!1}),y=q=>{$t({variant:"error",title:s.t("common.requestFailed"),description:q instanceof Error?q.message:String(q)})};re(()=>{if(!e.shown())return;const q=u();!q.mcp_ready&&!g.mcpDone&&!g.mcpLoading&&(v("mcpLoading",!0),p().mcp.status().then(B=>{d(B.data??{}),h(!0)}).catch(B=>{v("mcpDone",!0),y(B)}).finally(()=>{v("mcpLoading",!1)})),!q.lsp_ready&&!g.lspDone&&!g.lspLoading&&(v("lspLoading",!0),p().lsp.status().then(B=>{f(B.data??[]),m(!0)}).catch(B=>{v("lspDone",!0),y(B)}).finally(()=>{v("lspLoading",!1)}))});let w=0,k=!1;fe(()=>{k=!0,w+=1});const x=F(()=>{const q=r.current,B=r.list;return q?B.every(Y=>dn.key(Y)!==dn.key(q))?[q,...B]:[q,...B.filter(Y=>dn.key(Y)!==dn.key(q))]:B}),C=F(()=>!!i.desktop),S=F(()=>C()||!t),$=D2e(x,()=>e.shown()&&C()),O=F(()=>L2e(x(),r.key,$)),D=O2e(),I=M2e(()=>i.getDefaultServer?.()),L=q=>i.serverManager?.instances.find(B=>B.key===q),A=F(()=>Object.keys(u().mcp??{}).sort((q,B)=>q.localeCompare(B))),T=q=>u().mcp?.[q]?.status,N=F(()=>u().lsp??[]),W=F(()=>(u().config.plugin??[]).map(q=>typeof q=="string"?q:q[0])),K=F(()=>$2e(s.t("dialog.plugins.empty"),["codeplane.jsonc","config/plugins"])),V=F(()=>S()?"servers":"mcp");return(()=>{var q=k2e();return j(q,b(Ao,{get"aria-label"(){return s.t("status.popover.ariaLabel")},class:"tabs bg-background-strong rounded-xl overflow-hidden","data-component":"tabs",get"data-active"(){return V()},get defaultValue(){return V()},variant:"alt",get children(){return[b(Ao.List,{"data-slot":"tablist",class:"bg-transparent border-b-0 px-4 py-1.5 gap-4",get children(){return[b(ce,{get when(){return S()},get children(){return b(Ao.Trigger,{value:"servers","data-slot":"tab",class:"text-12-regular",get children(){return s.t("status.popover.tab.servers")}})}}),b(ce,{get when(){return u()},get children(){return[b(Ao.Trigger,{value:"mcp","data-slot":"tab",class:"text-12-regular",get children(){return s.t("status.popover.tab.mcp")}}),b(Ao.Trigger,{value:"lsp","data-slot":"tab",class:"text-12-regular",get children(){return s.t("status.popover.tab.lsp")}}),b(Ao.Trigger,{value:"plugins","data-slot":"tab",class:"text-12-regular",get children(){return s.t("status.popover.tab.plugins")}})]}})]}}),b(ce,{get when(){return S()},get children(){return b(Ao.Content,{value:"servers",get children(){var B=v0(),Y=B.firstChild;return j(Y,b(Ut,{get each(){return O()},children:J=>{const ge=dn.key(J),ae=()=>$[ge]?.healthy===!1;return(()=>{var Te=S2e();return Te.$$click=()=>{if(ae())return;const pe=L(ge);if(pe){i.serverManager?.open(pe.id);return}a("/"),queueMicrotask(()=>r.setActive(ge))},j(Te,b(b2e,{get health(){return $[ge]}}),null),j(Te,b(y2e,{conn:J,get dimmed(){return ae()},get status(){return $[ge]},class:"flex items-center gap-2 w-full min-w-0",nameClass:"text-14-regular text-text-base truncate",versionClass:"text-12-regular text-text-weak truncate",get badge(){return b(ce,{get when(){return ge===I.key()},get children(){var pe=_2e();return j(pe,()=>s.t("common.default")),pe}})},get children(){return[x2e(),b(ce,{get when(){return je(()=>!!r.current)()&&ge===dn.key(r.current)},get children(){return b(Ht,{name:"check",size:"small",class:"text-icon-weak shrink-0"})}})]}}),null),De(pe=>{var ue={"hover:bg-surface-raised-base-hover":!ae(),"cursor-not-allowed":ae()},Le=ae();return pe.e=Ct(Te,ue,pe.e),Le!==pe.t&&Ye(Te,"aria-disabled",pe.t=Le),pe},{e:void 0,t:void 0}),Te})()}}),null),j(Y,b(Gt,{variant:"secondary",class:"mt-3 self-start h-8 px-3 py-1.5",onClick:()=>{if(i.serverManager){i.serverManager.show();return}const J=++w;z(()=>import("./dialog-select-server-HywTbVo8.js"),__vite__mapDeps([97,98])).then(ge=>{k||w!==J||o.show(()=>b(ge.DialogSelectServer,{}),I.refresh)})},get children(){return s.t("status.popover.action.manageServers")}}),null),B}})}}),b(ce,{get when(){return u()},get children(){return[b(Ao.Content,{value:"mcp",get children(){var B=v0(),Y=B.firstChild;return j(Y,b(ce,{get when(){return A().length>0},get fallback(){return(()=>{var J=uy();return j(J,()=>s.t("dialog.mcp.empty")),J})()},get children(){return b(Ut,{get each(){return A()},children:J=>{const ge=()=>T(J),ae=()=>ge()==="connected";return(()=>{var Te=C2e(),pe=Te.firstChild,ue=pe.nextSibling,Le=ue.nextSibling;return Te.$$click=()=>{D.isPending||D.mutate(J)},j(ue,J),Le.$$click=$e=>$e.stopPropagation(),j(Le,b(Ybe,{get checked(){return ae()},get disabled(){return je(()=>!!D.isPending)()&&D.variables===J},onChange:()=>{D.isPending||D.mutate(J)}})),De($e=>{var ht=D.isPending&&D.variables===J,Bt={"size-1.5 rounded-full shrink-0":!0,"bg-icon-success-base":ge()==="connected","bg-icon-critical-base":ge()==="failed","bg-border-weak-base":ge()==="disabled","bg-icon-warning-base":ge()==="needs_auth"||ge()==="needs_client_registration"};return ht!==$e.e&&(Te.disabled=$e.e=ht),$e.t=Ct(pe,Bt,$e.t),$e},{e:void 0,t:void 0}),Te})()}})}})),B}}),b(Ao.Content,{value:"lsp",get children(){var B=v0(),Y=B.firstChild;return j(Y,b(ce,{get when(){return N().length>0},get fallback(){return(()=>{var J=uy();return j(J,()=>s.t("dialog.lsp.empty")),J})()},get children(){return b(Ut,{get each(){return N()},children:J=>(()=>{var ge=I2e(),ae=ge.firstChild,Te=ae.nextSibling;return j(Te,()=>J.name||J.id),De(pe=>Ct(ae,{"size-1.5 rounded-full shrink-0":!0,"bg-icon-success-base":J.status==="connected","bg-icon-critical-base":J.status==="error"},pe)),ge})()})}})),B}}),b(Ao.Content,{value:"plugins",get children(){var B=v0(),Y=B.firstChild;return j(Y,b(ce,{get when(){return W().length>0},get fallback(){return(()=>{var J=uy();return j(J,K),J})()},get children(){return b(Ut,{get each(){return W()},children:J=>(()=>{var ge=T2e(),ae=ge.firstChild,Te=ae.nextSibling;return Ye(Te,"title",J),j(Te,()=>A2e(J)),ge})()})}})),B}})]}})]}})),q})()}or(["click"]);var R2e=ee('<div class="relative size-4"><div class="badge-mask-tight size-4 flex items-center justify-center"></div><div>'),N2e=ee("<div data-slot=popover-body>");function z2e(){const e=At(),t=sr(),n=tk(),r=Jn(),[i,o]=de(!1),s=F(()=>n?.data??r.data),a=F(()=>t.healthy()===!1||s().mcp_ready),l=F(()=>{const c=t.healthy()===!0,d=Object.values(s().mcp??{}).some(h=>h.status!=="connected"&&h.status!=="disabled");return c&&!d});return b(wd,{get open(){return i()},onOpenChange:o,gutter:4,placement:"bottom-end",shift:-168,modal:!1,get children(){return[b(wd.Trigger,{as:Gt,variant:"ghost",class:"titlebar-icon w-8 h-6 p-0 box-border",get"aria-label"(){return e.t("status.popover.trigger")},"data-no-window-drag":!0,get children(){var c=R2e(),u=c.firstChild,d=u.nextSibling;return j(u,b(Ht,{name:"server",size:"small"})),De(h=>Ct(d,{"absolute -top-px -right-px size-1.5 rounded-full":!0,"bg-icon-success-base":a()&&l(),"bg-icon-critical-base":t.healthy()===!1||a()&&!l(),"bg-border-weak-base":t.healthy()===void 0||!a()},h)),c}}),b(wd.Portal,{get children(){return b(wd.Content,{class:"[&_[data-slot=popover-body]]:p-0 w-[360px] max-w-[calc(100vw-40px)] bg-transparent border-0 shadow-none rounded-xl z-50 outline-none",get children(){var c=N2e();return j(c,b(ce,{get when(){return i()},get children(){return b(P2e,{shown:i})}})),c}})}})]}})}var j2e=ee('<div class="flex items-center shrink-0 w-8"><div class=transition-opacity>'),F2e=ee('<div class="titlebar-cluster flex items-center gap-0.5 rounded-lg p-0.5">'),U2e=ee('<div class="flex items-center gap-1 shrink-0"data-no-window-drag>'),H2e=ee('<header class="titlebar-shell shrink-0 relative grid grid-cols-[minmax(0,1fr)_auto_minmax(0,1fr)] items-center"><div><div class="flex items-center gap-2 shrink-0"data-no-window-drag><div class="xl:hidden w-[48px] shrink-0 flex items-center justify-center"></div><div class="flex items-center gap-2 shrink-0"><div class="hidden xl:flex items-center shrink-0 gap-2"><div class="flex items-center shrink-0 gap-1"><div id=codeplane-titlebar-left class="flex items-center gap-3 min-w-0 px-2"></div></div></div></div></div></div><div class="min-w-0 flex items-center justify-center pointer-events-none"><div id=codeplane-titlebar-center class="pointer-events-auto min-w-0 flex justify-center w-fit max-w-full"data-no-window-drag></div></div><div><div id=codeplane-titlebar-right class="flex items-center gap-1 shrink-0 justify-end"data-no-window-drag>');function B2e(){const e=zl(),t=M$(),n=At(),r=qi();hu();const i=xo(),o=So(),s=ri(),[a,l]=Je({stack:[],index:0,action:void 0}),c=()=>`${o.pathname}${o.search}${o.hash}`,u=F(()=>o.pathname==="/"||o.pathname==="/notifications"),d=F(()=>!s.dir||s.id?!1:o.pathname.replace(/\/+$/,"").split("/").at(-1)==="session");re(()=>{const S=c();ot(()=>{const $=Fbe(a,S);$!==a&&l($)})});const h=F(()=>a.index>0),f=F(()=>a.index<a.stack.length-1),m=F(()=>e.projects.list().length>0),p=F(()=>!0),g=F(()=>r.desktop&&r.os==="macos"),v=typeof window<"u"?window.codeplaneDesktop?.window:void 0,[y,w]=de(!!v?.state?.fullscreen);if(v?.onStateChange){const S=v.onStateChange($=>w(!!$.fullscreen));fe(()=>S())}const k=F(()=>g()&&!y()),x=()=>{const S=Bbe(a);S&&(l(S.state),i(S.to))},C=()=>{const S=Vbe(a);S&&(l(S.state),i(S.to))};return t.register(()=>[{id:"common.goBack",title:n.t("common.goBack"),category:n.t("command.category.view"),keybind:"mod+[",onSelect:x},{id:"common.goForward",title:n.t("common.goForward"),category:n.t("command.category.view"),keybind:"mod+]",onSelect:C}]),(()=>{var S=H2e(),$=S.firstChild,O=$.firstChild,D=O.firstChild,M=D.nextSibling,I=M.firstChild,L=I.firstChild,A=L.firstChild,T=$.nextSibling,N=T.nextSibling,W=N.firstChild;return j(D,b(Jr,{icon:"menu",variant:"ghost",class:"titlebar-icon rounded-md",get onClick(){return e.mobileSidebar.toggle},get"aria-label"(){return n.t("sidebar.menu.toggle")},get"aria-expanded"(){return e.mobileSidebar.opened()}})),j(M,b(ce,{get when(){return!u()},get children(){return b(XS,{class:"hidden xl:flex shrink-0 ml-12",placement:"bottom",get title(){return n.t("command.sidebar.toggle")},get keybind(){return t.keybind("sidebar.toggle")},get children(){return b(Gt,{variant:"ghost",class:"group/sidebar-toggle titlebar-icon w-8 h-7 p-0 box-border rounded-md",get onClick(){return e.sidebar.toggle},get"aria-label"(){return n.t("command.sidebar.toggle")},get"aria-pressed"(){return e.sidebar.opened()},get children(){return b(Ht,{size:"small",get name(){return e.sidebar.opened()?"sidebar-active":"sidebar"}})}})}})}}),I),j(I,b(ce,{get when(){return s.dir},get children(){var K=j2e(),V=K.firstChild;return j(V,b(XS,{placement:"bottom",get title(){return n.t("command.session.new")},get keybind(){return t.keybind("session.new")},openDelay:2e3,get children(){return b(Gt,{variant:"ghost",get icon(){return d()?"new-session-active":"new-session"},class:"titlebar-icon w-8 h-7 p-0 box-border rounded-md",get disabled(){return e.sidebar.opened()},get tabIndex(){return e.sidebar.opened()?-1:void 0},onClick:()=>{s.dir&&i(`/${s.dir}/session`)},get"aria-label"(){return n.t("command.session.new")},get"aria-current"(){return d()?"page":void 0}})}})),De(q=>{var B=e.sidebar.opened()?"true":void 0,Y={"opacity-100 duration-120 ease-out":!e.sidebar.opened(),"opacity-0 duration-120 ease-in delay-0 pointer-events-none":e.sidebar.opened()};return B!==q.e&&Ye(K,"aria-hidden",q.e=B),q.t=Ct(V,Y,q.t),q},{e:void 0,t:void 0}),K}}),L),j(L,b(ce,{get when(){return r.desktop||m()&&p()},get children(){var K=F2e();return j(K,b(ce,{get when(){return r.desktop},get children(){return b(bn,{placement:"bottom",get value(){return n.t("command.server.switch")},openDelay:2e3,get children(){return b(Gt,{variant:"ghost",icon:"server",class:"titlebar-icon w-7 h-6 p-0 box-border rounded-md",onClick:()=>t.trigger("server.switch"),get"aria-label"(){return n.t("command.server.switch")}})}})}}),null),j(K,b(ce,{get when(){return je(()=>!!m())()&&p()},get children(){return[b(bn,{placement:"bottom",get value(){return n.t("common.goBack")},openDelay:2e3,get children(){return b(Gt,{variant:"ghost",icon:"chevron-left",class:"titlebar-icon w-7 h-6 p-0 box-border rounded-md",get disabled(){return!h()},onClick:x,get"aria-label"(){return n.t("common.goBack")}})}}),b(bn,{placement:"bottom",get value(){return n.t("common.goForward")},openDelay:2e3,get children(){return b(Gt,{variant:"ghost",icon:"chevron-right",class:"titlebar-icon w-7 h-6 p-0 box-border rounded-md",get disabled(){return!f()},onClick:C,get"aria-label"(){return n.t("common.goForward")}})}})]}}),null),K}}),A),j(L,()=>null,null),Ct(N,{"flex items-center min-w-0 justify-end":!0,"pr-2":!0}),j(N,b(jbe,{class:"titlebar-icon w-8 h-7 p-0 box-border rounded-md mr-1"}),W),j(N,b(ce,{get when(){return r.desktop},get children(){var K=U2e();return j(K,b(z2e,{})),K}}),null),De(K=>{var V=!!r.desktop,q=!r.desktop,B=g()?"macos":void 0,Y=r.desktop?"true":void 0,J={"flex items-center min-w-0 transition-[padding] duration-200 ease-out":!0,"pl-2":!k(),"pl-[88px]":k()},ge={"-translate-x-[40px]":e.sidebar.opened()&&!!s.dir,"duration-180 ease-out":!e.sidebar.opened(),"duration-180 ease-in":e.sidebar.opened()};return V!==K.e&&S.classList.toggle("h-11",K.e=V),q!==K.t&&S.classList.toggle("h-10",K.t=q),B!==K.a&&Ye(S,"data-desktop-titlebar",K.a=B),Y!==K.o&&Ye(S,"data-platform-desktop",K.o=Y),K.i=Ct($,J,K.i),K.n=Ct(L,ge,K.n),K},{e:void 0,t:void 0,a:void 0,o:void 0,i:void 0,n:void 0}),S})()}function AN(e){return e.match(/^\[Cron\]\s*(.+)$/)?.[1]?.trim()}function Tk(e){return e?!!e.cronRunID||!!AN(e.title):!1}function V2e(e){const t=e.directories??(e.directory?[e.directory]:[]),n=new Set(e.runs.map(a=>a.sessionID).filter(a=>!!a)),r=e.runs.map(a=>({id:a.id,sessionID:a.sessionID,taskName:a.taskName,taskDirectory:a.taskDirectory,status:a.status,startedAt:a.timeStarted??a.time.created,createdAt:a.time.created})),i=e.sessions.filter(a=>!a.parentID&&!a.time?.archived).filter(a=>t.length===0||t.some(l=>ba(l,a.directory))).filter(a=>!n.has(a.id)).map(a=>({session:a,taskName:AN(a.title)})).filter(a=>Tk(a.session)).map(a=>({id:a.session.cronRunID??a.session.id,sessionID:a.session.id,taskName:a.taskName??a.session.title,taskDirectory:a.session.directory,status:"success",startedAt:a.session.time.created,createdAt:a.session.time.created})),o=[...r,...i].sort((a,l)=>a.createdAt-l.createdAt||a.id.localeCompare(l.id)),s=new Map(o.map((a,l)=>[a.id,l+1]));return o.map(a=>({...a,sequence:s.get(a.id)??0})).sort((a,l)=>l.createdAt-a.createdAt||l.id.localeCompare(a.id)).slice(0,e.limit??200)}const Be=Vi;function Wg(e){const t=e-6e4;return(n,r)=>{const i=n.time.updated??n.time.created,o=r.time.updated??r.time.created,s=i>t,a=o>t;return s&&a?n.id<r.id?-1:n.id>r.id?1:0:s&&!a?-1:!s&&a?1:o-i}}const q2e=(e,t)=>ba(t,e.directory),W2e=(e,t)=>!t||!e.projectID||e.projectID===t,G2e=(e,t,n)=>W2e(e,n)&&t.some(r=>q2e(e,r))&&!e.parentID&&!e.time?.archived&&!Tk(e),LN=(e,t)=>{const n=[t,e.path.directory].filter(r=>!!r).filter((r,i,o)=>o.findIndex(s=>Vi(s)===Vi(r))===i);return(e.session??[]).filter(r=>G2e(r,n,e.project))},yf=(e,t,n)=>LN(e,n).sort(Wg(t)),K2e=(e,t,n)=>(e??[]).filter(r=>r.parentID===t&&!r.time?.archived).sort(Wg(n)),DN=(e,t)=>{const n=(e??[]).reduce((r,i)=>{const o=i.parentID;if(!o||i.time?.archived)return r;const s=r.get(o);return s?(s.push(i),r):(r.set(o,[i]),r)},new Map);return n.forEach(r=>r.sort(Wg(t))),n},MN=e=>(e??[]).filter(t=>!t.parentID&&!t.time?.archived).length,ON=e=>e.loadedRootCount<e.total&&e.visible<e.total;function Z2e(e){if(!e.project)return[];if(!e.workspacesEnabled)return[e.currentDirectory||e.project.worktree];const t=e.currentDirectory?Be(e.currentDirectory):void 0,n=Be(e.project.worktree);return e.workspaces.filter(r=>{const i=Be(r);return(e.expanded?.[r]??e.expanded?.[i]??i===n)||i===t})}const o9=(e,t)=>e.flatMap(n=>LN(n)).sort(Wg(t))[0];function Y2e(e,t=()=>!0){return Object.values(e??{}).some(n=>n?.some(t))}const Ek=e=>e.name||tr(e.worktree),dy=(e,t)=>{if(e&&typeof e=="object"&&"data"in e){const n=e.data;if(n?.message)return n.message}return e instanceof Error?e.message:t},y0=(e,t,n)=>{const r=Be(e),i=new Map;for(const s of t){const a=Be(s);a!==r&&(i.has(a)||i.set(a,s))}if(!n?.length)return[e,...i.values()];const o=[e];for(const s of n){const a=Be(s);if(a===r)continue;const l=i.get(a);l&&(o.push(l),i.delete(a))}return[...o,...i.values()]},X2e="codeplane:deep-link",PN=e=>{if(e.startsWith("codeplane://")&&!(typeof URL.canParse=="function"&&!URL.canParse(e)))try{return new URL(e)}catch{return}},J2e=e=>{const t=PN(e);if(!t||t.hostname!=="open-project")return;const n=t.searchParams.get("directory");if(n)return n},Q2e=e=>{const t=PN(e);if(!t||t.hostname!=="new-session")return;const n=t.searchParams.get("directory");if(!n)return;const r=t.searchParams.get("prompt")||void 0;return r?{directory:n,prompt:r}:{directory:n}},ewe=e=>e.map(J2e).filter(t=>!!t),twe=e=>e.map(Q2e).filter(t=>!!t),nwe=e=>{const t=e.__CODEPLANE__?.deepLinks??[];return t.length===0?[]:(e.__CODEPLANE__&&(e.__CODEPLANE__.deepLinks=[]),t)};var rwe=ee("<input data-component=inline-input>");function iwe(e){const[t,n]=se(e,["class","width","style"]),r=()=>t.style?typeof t.style=="string"?t.width?`${t.style};width:${t.width}`:t.style:t.width?{...t.style,width:t.width}:t.style:{width:t.width};return(()=>{var i=rwe();return jr(i,ne({get class(){return t.class},get style(){return r()}},n),!1,!1),i})()}var owe=ee("<span>");function swe(){const[e,t]=Je({active:"",value:""}),n=c=>e.active===c,r=()=>e.value,i=(c,u)=>{c&&t({active:c,value:u})},o=()=>t({active:"",value:""}),s=c=>{const u=e.value.trim();if(!u){o();return}o(),c(u)},a=(c,u)=>{if(c.key==="Enter"){c.preventDefault(),s(u);return}c.key==="Escape"&&(c.preventDefault(),o())};return{editor:e,editorOpen:n,editorValue:r,openEditor:i,closeEditor:o,saveEditor:s,editorKeyDown:a,setEditor:t,InlineEditor:c=>{let u;fe(()=>{u!==void 0&&cancelAnimationFrame(u)});const d=()=>c.editing??n(c.id),h=()=>c.stopPropagation??!1,f=()=>c.openOnDblClick??!0,m=g=>{h()&&g.stopPropagation()},p=g=>{f()&&(m(g),i(c.id,c.value()))};return b(ce,{get when(){return d()},get fallback(){return(()=>{var g=owe();return g.$$touchstart=m,g.$$click=m,g.$$mousedown=m,g.$$pointerdown=m,g.$$dblclick=p,j(g,()=>c.value()),De(()=>Bo(g,c.displayClass??c.class)),g})()},get children(){return b(iwe,{ref:g=>{u!==void 0&&cancelAnimationFrame(u),u=requestAnimationFrame(()=>{u=void 0,g.isConnected&&g.focus()})},get value(){return r()},get class(){return c.class},onInput:g=>t("value",g.currentTarget.value),onKeyDown:g=>{g.stopPropagation(),a(g,c.onSave)},onBlur:o,onPointerDown:m,onClick:m,onDblClick:m,onMouseDown:m,onMouseUp:m,onTouchStart:m})}})}}}or(["dblclick","pointerdown","mousedown","click","touchstart"]);var awe={};vr(awe,{Collapsible:()=>Gg,Content:()=>NN,Root:()=>zN,Trigger:()=>jN,useCollapsibleContext:()=>$k});var RN=pt();function $k(){const e=ut(RN);if(e===void 0)throw new Error("[kobalte]: `useCollapsibleContext` must be used within a `Collapsible.Root` component");return e}function NN(e){const[t,n]=de(),r=$k(),i=Ne({id:r.generateId("content")},e),[o,s]=se(i,["ref","id","style"]),{present:a}=po({show:r.shouldMount,element:()=>t()??null}),[l,c]=de(0),[u,d]=de(0);let f=r.isOpen()||a();return Kt(()=>{const m=requestAnimationFrame(()=>{f=!1});fe(()=>{cancelAnimationFrame(m)})}),re(gt(a,()=>{if(!t())return;t().style.transitionDuration="0s",t().style.animationName="none";const m=t().getBoundingClientRect();c(m.height),d(m.width),f||(t().style.transitionDuration="",t().style.animationName="")})),re(gt(r.isOpen,m=>{!m&&t()&&(t().style.transitionDuration="",t().style.animationName="")},{defer:!0})),re(()=>fe(r.registerContentId(o.id))),b(ce,{get when(){return a()},get children(){return b(Ve,ne({as:"div",ref(m){var p=st(n,o.ref);typeof p=="function"&&p(m)},get id(){return o.id},get style(){return gr({"--kb-collapsible-content-height":l()?`${l()}px`:void 0,"--kb-collapsible-content-width":u()?`${u()}px`:void 0},o.style)}},()=>r.dataset(),s))}})}function zN(e){const t=`collapsible-${an()}`,n=Ne({id:t},e),[r,i]=se(n,["open","defaultOpen","onOpenChange","disabled","forceMount"]),[o,s]=de(),a=Ps({open:()=>r.open,defaultOpen:()=>r.defaultOpen,onOpenChange:u=>r.onOpenChange?.(u)}),l=F(()=>({"data-expanded":a.isOpen()?"":void 0,"data-closed":a.isOpen()?void 0:"","data-disabled":r.disabled?"":void 0})),c={dataset:l,isOpen:a.isOpen,disabled:()=>r.disabled??!1,shouldMount:()=>r.forceMount||a.isOpen(),contentId:o,toggle:a.toggle,generateId:$r(()=>i.id),registerContentId:en(s)};return b(RN.Provider,{value:c,get children(){return b(Ve,ne({as:"div"},l,i))}})}function jN(e){const t=$k(),[n,r]=se(e,["onClick"]);return b(Jo,ne({get"aria-expanded"(){return t.isOpen()},get"aria-controls"(){return je(()=>!!t.isOpen())()?t.contentId():void 0},get disabled(){return t.disabled()},onClick:o=>{ze(o,n.onClick),t.toggle()}},()=>t.dataset(),r))}var Gg=Object.assign(zN,{Content:NN,Trigger:jN}),lwe=ee("<div data-slot=collapsible-arrow><span data-slot=collapsible-arrow-icon>");function cwe(e){const[t,n]=se(e,["class","classList","variant"]);return b(Gg,ne({"data-component":"collapsible",get"data-variant"(){return t.variant||"normal"},get classList(){return{...t.classList,[t.class??""]:!!t.class}}},n))}function uwe(e){return b(Gg.Trigger,ne({"data-slot":"collapsible-trigger"},e))}function dwe(e){return b(Gg.Content,ne({"data-slot":"collapsible-content"},e))}function fwe(e){return(()=>{var t=lwe(),n=t.firstChild;return jr(t,e||{},!1,!0),j(n,b(Ht,{name:"chevron-down",size:"small"})),t})()}const fy=Object.assign(cwe,{Arrow:fwe,Trigger:uwe,Content:dwe});var hwe=ee("<svg>"),mwe=ee("<svg><rect width=3 height=3 rx=1></svg>",!1,!0,!1);const pwe=new Set([1,2,4,7,8,11,13,14]),gwe=new Set([0,3,12,15]),vwe=Array.from({length:16},(e,t)=>({id:t,x:t%4*4,y:Math.floor(t/4)*4,delay:Math.random()*1.5,duration:1+Math.random()*1,outer:pwe.has(t),corner:gwe.has(t)}));function Kg(e){return(()=>{var t=hwe();return jr(t,ne(e,{viewBox:"0 0 15 15","data-component":"spinner",get classList(){return{...e.classList,[e.class??""]:!!e.class}},fill:"currentColor"}),!0,!0),j(t,b(Ut,{each:vwe,children:n=>(()=>{var r=mwe();return De(i=>{var o=n.x,s=n.y,a=n.corner?0:void 0,l=n.corner?void 0:`${n.outer?"pulse-opacity-dim":"pulse-opacity"} ${n.duration}s ease-in-out infinite`,c=n.corner?void 0:"both",u=n.corner?void 0:`${n.delay}s`;return o!==i.e&&Ye(r,"x",i.e=o),s!==i.t&&Ye(r,"y",i.t=s),a!==i.a&&Xr(r,"opacity",i.a=a),l!==i.o&&Xr(r,"animation",i.o=l),c!==i.i&&Xr(r,"animation-fill-mode",i.i=c),u!==i.n&&Xr(r,"animation-delay",i.n=u),i},{e:void 0,t:void 0,a:void 0,o:void 0,i:void 0,n:void 0}),r})()})),t})()}var ywe=ee("<div>"),bwe=ee("<img data-slot=avatar-image>");const s9=typeof Intl<"u"&&"Segmenter"in Intl?new Intl.Segmenter(void 0,{granularity:"grapheme"}):void 0;function wwe(e){return e?s9?s9.segment(e)[Symbol.iterator]().next().value?.segment??Array.from(e)[0]??"":Array.from(e)[0]??"":""}function kwe(e){const[t,n]=se(e,["fallback","src","background","foreground","size","class","classList","style"]),r=t.src;return(()=>{var i=ywe();return jr(i,ne(n,{"data-component":"avatar",get"data-size"(){return t.size||"normal"},"data-has-image":r?"":void 0,get classList(){return{...t.classList,[t.class??""]:!!t.class}},get style(){return{...typeof t.style=="object"?t.style:{},...!r&&t.background?{"--avatar-bg":t.background}:{},...!r&&t.foreground?{"--avatar-fg":t.foreground}:{}}}}),!1,!0),j(i,b(ce,{when:r,keyed:!0,get fallback(){return wwe(t.fallback)},children:o=>(()=>{var s=bwe();return Ye(s,"src",o),Ye(s,"draggable",!1),s})()})),i})()}const a9={ask:"var(--icon-agent-ask-base)",build:"var(--icon-agent-build-base)",docs:"var(--icon-agent-docs-base)",plan:"var(--icon-agent-plan-base)"},l9=["var(--icon-agent-ask-base)","var(--icon-agent-build-base)","var(--icon-agent-docs-base)","var(--icon-agent-plan-base)","var(--syntax-info)","var(--syntax-success)","var(--syntax-warning)","var(--syntax-property)","var(--syntax-constant)","var(--text-diff-add-base)","var(--text-diff-delete-base)","var(--icon-warning-base)"];function xwe(e){let t=0;for(const n of e)t=t*31+n.charCodeAt(0)>>>0;return l9[t%l9.length]}function Swe(e,t){return t||(a9[e]??a9[e.toLowerCase()]??xwe(e.toLowerCase()))}function _we(e,t){if(e)for(let n=e.length-1;n>=0;n--){const r=e[n];if(!(r.role!=="user"||!r.agent))return Swe(r.agent,t.find(i=>i.name===r.agent)?.color)}}const Cwe=/^(New session|Child session) - \d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}\.\d{3}Z$/;function FN(e){return e&&(e.match(Cwe)?.[1]??e)}function UN(e,t,n,r=()=>!0){if(!n)return;const i=e.reduce((l,c)=>{if(!c.parentID)return l;const u=l.get(c.parentID);return u&&u.push(c.id),u||l.set(c.parentID,[c.id]),l},new Map),o=new Set([n]),s=[n];for(const l of s){const c=i.get(l);if(c)for(const u of c)o.has(u)||(o.add(u),s.push(u))}const a=s.find(l=>t[l]?.some(r));if(a)return t[a]?.find(r)}function Iwe(e,t,n,r){return UN(e,t,n,r)}function F3e(e,t,n,r){return UN(e,t,n,r)}const Twe=e=>e.type==="text"&&!e.synthetic&&!e.ignored,Ewe=e=>e.role==="user",$we=e=>e.role==="assistant",b0=(e,t)=>t?e.time.created!==t.time.created?e.time.created>t.time.created:e.id>t.id:!0;function Awe(e){if(!e.messages)return e.working?{loading:!1,thinking:!0}:{loading:!0};let t,n,r;for(const o of e.messages)Ewe(o)&&b0(o,t)&&(t=o);for(const o of e.messages)if($we(o)){if(!t){b0(o,n)&&(n=o);continue}o.parentID===t.id&&b0(o,n)&&(n=o),o.time.created>=t.time.created&&b0(o,r)&&(r=o)}n=n??r;const i=t?(e.parts[t.id]??[]).filter(Twe).map(o=>o.text).join(`
2438
2438
  `).trim():void 0;return{loading:!1,thinking:e.working&&!i||void 0,prompt:i||void 0,providerID:n?.providerID??t?.model.providerID,modelID:n?.modelID??t?.model.modelID,cost:n?.cost,duration:n?Math.max(0,(n.time.completed??e.now??Date.now())-n.time.created):void 0}}function Lwe(e,t){if(e===void 0)return"-";const n=Math.round(e/1e3);if(n<60)return new Intl.NumberFormat(t,{style:"unit",unit:"second",unitDisplay:"narrow",maximumFractionDigits:0}).format(n);const r=Math.floor(n/60),i=n%60;return`${new Intl.NumberFormat(t).format(r)}m ${new Intl.NumberFormat(t).format(i)}s`}function Dwe(e,t){return e===void 0?"-":new Intl.NumberFormat(t,{style:"currency",currency:"USD",minimumFractionDigits:e>0&&e<.01?4:2,maximumFractionDigits:e>0&&e<.01?4:2}).format(e)}function Mwe(e){return e?.override}var Owe=ee("<div>"),Pwe=ee('<div><div class="size-full rounded overflow-clip">'),Rwe=ee('<div class="size-1.5 rounded-full bg-surface-warning-strong">'),Nwe=ee('<div class="size-1.5 rounded-full bg-text-diff-delete-base">'),zwe=ee('<div class="size-1.5 rounded-full bg-text-interactive-base">'),jwe=ee('<div class="relative size-[15px] flex items-center justify-center">'),HN=ee('<div class="shrink-0 size-6 flex items-center justify-center">'),Fwe=ee('<span class="text-14-medium text-text-strong min-w-0 flex-1 truncate">'),Uwe=ee('<div class="flex items-center gap-1.5 text-12-regular text-text-invert-base min-w-0">'),Hwe=ee('<div class="w-72 flex flex-col gap-1.5"><div class="text-12-medium text-text-invert-strong truncate">'),c9=ee('<div class="text-12-regular text-text-invert-base">'),Bwe=ee('<div class="text-12-regular text-text-invert-base whitespace-pre-wrap break-words overflow-hidden"style=display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical>'),Vwe=ee('<span class="shrink-0 opacity-60">·'),qwe=ee("<span>"),Wwe=ee('<button type=button class="shrink-0 size-4 flex items-center justify-center rounded text-icon-base hover:text-icon-strong hover:bg-surface-base-hover focus:outline-none focus-visible:ring-1 focus-visible:ring-border-interactive-base">'),Gwe=ee('<div class="shrink-0 overflow-hidden transition-[width,opacity]">'),Kwe=ee('<div class="group/session relative w-full min-w-0 rounded-md cursor-default pr-3 transition-colors hover:bg-surface-raised-base-hover [&amp;:has(:focus-visible)]:bg-surface-raised-base-hover has-[[data-expanded]]:bg-surface-raised-base-hover has-[.active]:bg-surface-base-active"><div class="flex min-w-0 items-center gap-0.5"><div class="min-w-0 flex-1">'),Zwe=ee('<div class="shrink-0 w-4"aria-hidden=true>'),Ywe=ee("<div class=w-full>"),Xwe=ee('<span class="text-14-regular text-text-strong min-w-0 flex-1 truncate">'),Jwe=ee('<div class="group/session relative w-full min-w-0 rounded-md cursor-default transition-colors pl-2 pr-3 hover:bg-surface-raised-base-hover [&amp;:has(:focus-visible)]:bg-surface-raised-base-hover has-[.active]:bg-surface-base-active">'),Qwe=ee('<div class="flex flex-col gap-1">'),e4e=ee('<div class="h-8 w-full rounded-md bg-surface-raised-base opacity-60 animate-pulse">');const BN=e=>{const t=Jn(),n=Xf(),r=fk(),i=F(()=>[e.project.worktree,...e.project.sandboxes??[]]),o=F(()=>i().reduce((u,d)=>u+n.project.unseenCount(d),0)),s=F(()=>i().some(u=>n.project.unseenHasError(u))),a=F(()=>i().some(u=>{const[d]=t.peek(u,{bootstrap:!1});return Y2e(d.permission,h=>!r.autoResponds(h,u))})),l=F(()=>e.notify&&(a()||o()>0)),c=F(()=>e.project.name||tr(e.project.worktree));return(()=>{var u=Pwe(),d=u.firstChild;return j(d,b(kwe,ne({get fallback(){return c()},get src(){return Mwe(e.project.icon)}},()=>U0e(e.project.icon?.color,e.project.worktree||c()),{class:"size-full rounded",get classList(){return{"badge-mask":l()}}}))),j(u,b(ce,{get when(){return l()},get children(){var h=Owe();return De(f=>Ct(h,{"absolute top-px right-px size-1.5 rounded-full z-10":!0,"bg-surface-warning-strong":a(),"bg-icon-critical-base":!a()&&s(),"bg-text-interactive-base":!a()&&!s()},f)),h}}),null),De(()=>Bo(u,`relative size-8 shrink-0 rounded ${e.class??""}`)),u})()},t4e=e=>{const t=F(()=>e.isWorking()||e.hasPermissions()||e.hasError()||e.unseenCount()>0);return b(Uc,{get href(){return`/${e.slug}/session/${e.session.id}`},get class(){return`flex items-center gap-2 min-w-0 w-full text-left focus:outline-none ${e.dense?"py-0.5":"py-1"}`},get onPointerDown(){return e.warmPress},get onFocus(){return e.warmFocus},onClick:()=>{e.sidebarOpened()||e.clearHoverProjectSoon()},get children(){return[(()=>{var n=HN();return j(n,b(ce,{get when(){return t()},get children(){var r=jwe();return j(r,b(Kg,{class:"absolute inset-0 size-[15px]",get style(){return{opacity:e.isWorking()?1:0,transition:"opacity 120ms linear"}}}),null),j(r,b(ce,{get when(){return!e.isWorking()},get children(){return b(Il,{get children(){return[b(Cn,{get when(){return e.hasPermissions()},get children(){return Rwe()}}),b(Cn,{get when(){return e.hasError()},get children(){return Nwe()}}),b(Cn,{get when(){return e.unseenCount()>0},get children(){return zwe()}})]}})}}),null),r}})),De(r=>{var i=e.tint()??"var(--icon-interactive-base)",o=!t();return i!==r.e&&Xr(n,"color",r.e=i),o!==r.t&&Ye(n,"aria-hidden",r.t=o),r},{e:void 0,t:void 0}),n})(),(()=>{var n=Fwe();return j(n,()=>e.title()),n})()]}})},np=e=>{const t=zl(),n=At(),r=Xf(),i=fk(),o=Jn(),s=Yf(),a=F(()=>FN(e.session.title)??n.t("command.session.new")),l=F(()=>r.session.unseenCount(e.session.id)),c=F(()=>r.session.unseenHasError(e.session.id)),[u]=o.peek(e.session.directory,{bootstrap:!1}),d=F(()=>!!Iwe(u.session,u.permission,e.session.id,O=>!i.autoResponds(O,e.session.directory))),h=F(()=>{if(d())return!1;const O=(u.message[e.session.id]??[]).findLast(M=>M.role==="assistant"&&typeof M.time?.completed!="number"),D=u.session_status[e.session.id];return O!==void 0||D?.type==="busy"||D?.type==="retry"||D!==void 0&&D.type!=="idle"}),f=F(()=>Awe({messages:u.message[e.session.id],parts:u.part,working:h()})),m=F(()=>_we(u.message[e.session.id],u.agent)),p=F(()=>e.showTooltip??(e.mobile||!e.sidebarExpanded())),g=F(()=>{const O=f();return O.modelID?s.all().find(D=>D.id===O.providerID)?.models[O.modelID]?.name??O.modelID:"-"}),v=F(()=>{const O=f(),D=[];return O.modelID&&D.push(g()),typeof O.cost=="number"&&O.cost>0&&D.push(Dwe(O.cost,n.intl())),typeof O.duration=="number"&&O.duration>0&&D.push(Lwe(O.duration,n.intl())),D}),y=()=>(()=>{var O=Hwe(),D=O.firstChild;return j(D,a),j(O,b(ce,{get when(){return!f().loading},get fallback(){return(()=>{var M=c9();return j(M,()=>n.t(f().thinking?"sidebar.sessionPreview.thinking":"sidebar.sessionPreview.loading")),M})()},get children(){return[b(ce,{get when(){return f().prompt},keyed:!0,get fallback(){return(()=>{var M=c9();return j(M,()=>n.t(f().thinking?"sidebar.sessionPreview.thinking":"sidebar.sessionPreview.empty")),M})()},children:M=>(()=>{var I=Bwe();return j(I,M),I})()}),b(ce,{get when(){return v().length>0},get children(){var M=Uwe();return j(M,b(Ut,{get each(){return v()},children:(I,L)=>[b(ce,{get when(){return L()>0},get children(){return Vwe()}}),(()=>{var A=qwe();return j(A,I),De(T=>Ct(A,{"truncate min-w-0":L()===0,"shrink-0":L()!==0},T)),A})()]})),M}})]}}),null),O})(),w=F(()=>{if(e.showChild)return e.childSessions?.(e.session.id)??K2e(u.session,e.session.id,Date.now())}),k=F(()=>(w()?.length??0)>0),x=F(()=>e.sessionExpanded?.(e.session.id)??!0),C=()=>{e.setSessionExpanded&&e.setSessionExpanded(e.session.id,!x())},S=(O,D)=>{const M=e.navList?.(),I=M?.some(A=>A.id===e.session.id&&A.directory===e.session.directory)?M:e.list;e.prefetchSession(e.session,D);const L=I.findIndex(A=>A.id===e.session.id&&A.directory===e.session.directory);if(L!==-1)for(let A=1;A<=O;A++){const T=I[L+A];T&&e.prefetchSession(T,A===1?"high":D);const N=I[L-A];N&&e.prefetchSession(N,A===1?"high":D)}},$=b(t4e,{get session(){return e.session},get slug(){return e.slug},get mobile(){return e.mobile},get dense(){return e.dense},title:a,tint:m,isWorking:h,hasPermissions:d,hasError:c,unseenCount:l,get clearHoverProjectSoon(){return e.clearHoverProjectSoon},get sidebarOpened(){return t.sidebar.opened},warmPress:()=>S(2,"high"),warmFocus:()=>S(2,"high")});return[(()=>{var O=Kwe(),D=O.firstChild,M=D.firstChild;return O.addEventListener("pointerenter",()=>S(1,"high")),j(D,b(ce,{get when(){return e.showChild},get children(){return b(ce,{get when(){return je(()=>!!k())()&&e.setSessionExpanded},get fallback(){return Zwe()},get children(){var I=Wwe();return I.$$click=L=>{L.preventDefault(),L.stopPropagation(),C()},j(I,b(Ht,{get name(){return x()?"chevron-down":"chevron-right"},size:"small"})),De(L=>{var A=x(),T=x()?"Collapse subsessions":"Expand subsessions";return A!==L.e&&Ye(I,"aria-expanded",L.e=A),T!==L.t&&Ye(I,"aria-label",L.t=T),L},{e:void 0,t:void 0}),I}})}}),M),j(M,b(ce,{get when(){return!e.mobile||p()},fallback:$,get children(){return b(bn,{get placement(){return e.mobile?"bottom":"right"},get value(){return y()},gutter:10,class:"min-w-0 w-full",contentClass:"p-3",children:$})}})),j(D,b(ce,{get when(){return!e.level},get children(){var I=Gwe();return j(I,b(bn,{get value(){return n.t("common.archive")},placement:"top",get children(){return b(Jr,{icon:"archive",variant:"ghost",class:"size-6 rounded-md",get"aria-label"(){return n.t("common.archive")},onClick:L=>{L.preventDefault(),L.stopPropagation(),e.archiveSession(e.session)}})}})),De(L=>Ct(I,{"w-6 opacity-100 pointer-events-auto":!!e.mobile,"w-0 opacity-0 pointer-events-none":!e.mobile,"group-hover/session:w-6 group-hover/session:opacity-100 group-hover/session:pointer-events-auto":!0,"group-focus-within/session:w-6 group-focus-within/session:opacity-100 group-focus-within/session:pointer-events-auto":!0},L)),I}}),null),De(I=>{var L=e.session.id,A=`${8+(e.level??0)*16}px`;return L!==I.e&&Ye(O,"data-session-id",I.e=L),A!==I.t&&Xr(O,"padding-left",I.t=A),I},{e:void 0,t:void 0}),O})(),b(ce,{get when(){return x()},get children(){return b(Ut,{get each(){return w()??[]},children:O=>b(ce,{get when(){return O.id!==e.session.id},get children(){var D=Ywe();return j(D,b(np,ne(e,{session:O,get level(){return(e.level??0)+1}}))),D}})})}})]},n4e=e=>{const t=zl(),r=At().t("command.session.new"),i=()=>e.mobile||!e.sidebarExpanded(),o=b(Uc,{get href(){return`/${e.slug}/session`},end:!0,get class(){return`flex items-center gap-2 min-w-0 w-full text-left focus:outline-none ${e.dense?"py-0.5":"py-1"}`},onClick:()=>{t.sidebar.opened()||e.clearHoverProjectSoon()},get children(){return[(()=>{var s=HN();return j(s,b(Ht,{name:"new-session",size:"small",class:"text-icon-weak"})),s})(),(()=>{var s=Xwe();return j(s,r),s})()]}});return(()=>{var s=Jwe();return j(s,b(ce,{get when(){return!i()},get fallback(){return b(bn,{get placement(){return e.mobile?"bottom":"right"},value:r,gutter:10,class:"min-w-0 w-full",children:o})},children:o})),s})()},r4e=e=>{const t=Array.from({length:e.count??4},(n,r)=>r);return(()=>{var n=Qwe();return j(n,b(Ut,{each:t,children:()=>e4e()})),n})()};or(["click"]);var i4e=ee('<div class="bg-background-base rounded-md px-2 py-1 text-14-medium text-text-strong">'),o4e=ee('<div class="flex items-center gap-1 min-w-0 flex-1"><div class="flex items-center justify-center shrink-0 size-6"></div><span class="text-14-medium text-text-base shrink-0"> :</span><div class="flex items-center justify-center shrink-0 overflow-hidden w-0 opacity-0 transition-all duration-200 group-hover/workspace:w-3.5 group-hover/workspace:opacity-100 group-focus-within/workspace:w-3.5 group-focus-within/workspace:opacity-100">'),s4e=ee('<span class="text-14-medium text-text-base min-w-0 truncate">'),a4e=ee('<div class="absolute right-1 top-1/2 -translate-y-1/2 flex items-center gap-0.5 transition-opacity">'),l4e=ee('<div class="relative w-full py-1">'),c4e=ee('<nav class="flex flex-col gap-1">'),rp=ee("<div>"),u4e=ee('<div class=py-1><div class="group/workspace relative"data-component=workspace-item><div class="flex items-center gap-1">'),d4e=ee('<div class="size-full min-h-0 flex flex-col py-2"><div class="flex-1 min-h-0 overflow-y-auto no-scrollbar [overflow-anchor:none]">');const f4e=e=>{const t=Jn(),n=At(),r=F(()=>{const i=e.sidebarProject();if(!i)return;const o=e.activeWorkspace();if(!o)return;const[s]=t.peek(o,{bootstrap:!1}),a=o===i.worktree?n.t("workspace.type.local"):n.t("workspace.type.sandbox"),l=e.workspaceLabel(o,s.vcs?.branch,i.id);return`${a} : ${l}`});return b(ce,{get when(){return r()},keyed:!0,children:i=>(()=>{var o=i4e();return j(o,i),o})()})},h4e=e=>(()=>{var t=o4e(),n=t.firstChild,r=n.nextSibling,i=r.firstChild,o=r.nextSibling;return j(n,b(ce,{get when(){return e.busy()},get fallback(){return b(Ht,{name:"branch",size:"small"})},get children(){return b(Kg,{class:"size-[15px]"})}})),j(r,(()=>{var s=je(()=>!!e.local());return()=>s()?e.language.t("workspace.type.local"):e.language.t("workspace.type.sandbox")})(),i),j(t,b(ce,{get when(){return!e.local()},get fallback(){return(()=>{var s=s4e();return j(s,()=>e.branch()??tr(e.directory)),s})()},get children(){return b(e.InlineEditor,{get id(){return`workspace:${e.directory}`},get value(){return e.workspaceValue},onSave:s=>{const a=s.trim();a&&(e.renameWorkspace(e.directory,a,e.projectId,e.branch()),e.setEditor("value",e.workspaceValue()))},class:"text-14-medium text-text-base min-w-0 truncate",displayClass:"text-14-medium text-text-base min-w-0 truncate",get editing(){return e.workspaceEditActive()},stopPropagation:!1,openOnDblClick:!1})}}),o),j(o,b(Ht,{get name(){return e.open()?"chevron-down":"chevron-right"},size:"small",class:"text-icon-base"})),t})(),m4e=e=>(()=>{var t=a4e();return j(t,b(on,{get modal(){return!e.sidebarHovering()},get open(){return e.menuOpen()},onOpenChange:n=>e.setMenuOpen(n),get children(){return[b(bn,{get value(){return e.language.t("common.moreOptions")},placement:"top",get children(){return b(on.Trigger,{as:Jr,icon:"dot-grid",variant:"ghost",class:"size-6 rounded-md","data-action":"workspace-menu",get"data-workspace"(){return dt(e.directory)},get"aria-label"(){return e.language.t("common.moreOptions")}})}}),b(on.Portal,{get children(){return b(on.Content,{onCloseAutoFocus:n=>{e.pendingRename()&&(n.preventDefault(),e.setPendingRename(!1),e.openEditor(`workspace:${e.directory}`,e.workspaceValue()))},get children(){return[b(on.Item,{get disabled(){return e.local()},onSelect:()=>{e.setPendingRename(!0),e.setMenuOpen(!1)},get children(){return b(on.ItemLabel,{get children(){return e.language.t("common.rename")}})}}),b(on.Item,{onSelect:()=>e.showArchivedSessionsDialog(e.directory),get children(){return b(on.ItemLabel,{get children(){return e.language.t("command.session.archived")}})}}),b(on.Separator,{}),b(on.Item,{get disabled(){return e.local()||e.busy()},onSelect:()=>e.showResetWorkspaceDialog(e.root,e.directory),get children(){return b(on.ItemLabel,{get children(){return e.language.t("common.reset")}})}}),b(on.Item,{get disabled(){return e.local()||e.busy()},onSelect:()=>e.showDeleteWorkspaceDialog(e.root,e.directory),get children(){return b(on.ItemLabel,{get children(){return e.language.t("common.delete")}})}})]}})}})]}}),null),j(t,b(ce,{get when(){return!e.touch()},get children(){return b(bn,{get value(){return e.language.t("command.session.new")},placement:"top",get children(){return b(Jr,{icon:"new-session",variant:"ghost",class:"size-6 rounded-md opacity-0 pointer-events-none group-hover/workspace:opacity-100 group-hover/workspace:pointer-events-auto group-focus-within/workspace:opacity-100 group-focus-within/workspace:pointer-events-auto","data-action":"workspace-new-session",get"data-workspace"(){return dt(e.directory)},get"aria-label"(){return e.language.t("command.session.new")},onClick:n=>{n.preventDefault(),n.stopPropagation(),e.clearHoverProjectSoon(),e.navigateToNewSession()}})}})}}),null),De(n=>Ct(t,{"opacity-100 pointer-events-auto":e.menuOpen(),"opacity-0 pointer-events-none":!e.menuOpen(),"group-hover/workspace:opacity-100 group-hover/workspace:pointer-events-auto":!0,"group-focus-within/workspace:opacity-100 group-focus-within/workspace:pointer-events-auto":!0},n)),t})(),VN=e=>(()=>{var t=c4e();return j(t,b(ce,{get when(){return e.showNew()},get children(){return b(n4e,{get slug(){return e.slug()},get mobile(){return e.mobile},get sidebarExpanded(){return e.ctx.sidebarExpanded},get clearHoverProjectSoon(){return e.ctx.clearHoverProjectSoon}})}}),null),j(t,b(ce,{get when(){return e.loading()},get children(){return b(r4e,{})}}),null),j(t,b(Ut,{get each(){return e.sessions()},children:n=>b(np,{session:n,get list(){return e.sessions()},get navList(){return e.ctx.navList},get slug(){return e.slug()},get mobile(){return e.mobile},showChild:!0,childSessions:r=>e.childSessions().get(r),get sidebarExpanded(){return e.ctx.sidebarExpanded},get clearHoverProjectSoon(){return e.ctx.clearHoverProjectSoon},get prefetchSession(){return e.ctx.prefetchSession},get archiveSession(){return e.ctx.archiveSession},get sessionExpanded(){return e.ctx.sessionExpanded},get setSessionExpanded(){return e.ctx.setSessionExpanded}})}),null),j(t,b(ce,{get when(){return e.hasMore()},get children(){var n=l4e();return j(n,b(Gt,{variant:"ghost",class:"flex w-full text-left justify-start text-14-regular text-text-weak pl-2 pr-10",size:"large",onClick:r=>{e.loadMore(),r.currentTarget.blur()},get children(){return e.language.t("common.loadMore")}})),n}}),null),j(t,b(ce,{get when(){return!e.hideArchive},get children(){return[b(WN,{get language(){return e.language},get projectID(){return e.projectID},get projectWorktree(){return e.projectWorktree}}),b(qN,{get directory(){return e.directory},get ctx(){return e.ctx},get language(){return e.language}})]}}),null),t})(),qN=e=>(()=>{var t=rp();return j(t,b(Gt,{variant:"ghost",icon:"archive",class:"flex w-full justify-start text-left text-14-regular text-text-weak pl-2 pr-10",size:"large",onClick:n=>{e.ctx.showArchivedSessionsDialog(e.directory),n.currentTarget.blur()},get children(){return e.language.t("command.session.archived")}})),De(n=>Ct(t,{"relative w-full pt-1":!0,"shrink-0 pb-2":e.footer},n)),t})(),WN=e=>{const t=Jn(),n=F(()=>e.projectID??t.data.project.find(i=>i.id!=="global"&&!!e.projectWorktree&&Be(i.worktree)===Be(e.projectWorktree))?.id),r=F(()=>{const i=n();return e.projectWorktree?`/cron/worktree/${dt(e.projectWorktree)}${i?`?projectID=${encodeURIComponent(i)}`:""}`:i?`/cron/${encodeURIComponent(i)}`:void 0});return(()=>{var i=rp();return j(i,b(Uc,{get href(){return r()??"#"},"data-component":"button","data-size":"large","data-variant":"ghost","data-icon":"bell",class:"flex w-full justify-start text-left text-14-regular text-text-weak pl-2 pr-10",get classList(){return{"pointer-events-none opacity-50":!r()}},onClick:o=>{if(!r()){o.preventDefault();return}o.currentTarget.blur()},get children(){return[b(Ht,{name:"bell",size:"small"}),je(()=>e.language.t("command.cron.open"))]}})),De(o=>Ct(i,{"relative w-full":!0,"shrink-0 pb-2":e.footer},o)),i})()},p4e=e=>{const t=xo(),n=ri(),r=Jn(),i=At(),o=sr(),s=nN(e.directory),[a]=r.child(e.directory,{bootstrap:!1}),[l,c]=Je({open:!1,pendingRename:!1}),u=F(()=>dt(e.directory)),d=F(()=>yf(a,e.sortNow(),e.directory)),h=F(()=>DN(a.session,e.sortNow())),f=F(()=>e.directory===e.project.worktree),m=F(()=>Be(e.ctx.currentDir())===Be(e.directory)),p=F(()=>{const T=a.vcs?.branch,N=T??tr(e.directory);return e.ctx.workspaceName(e.directory,e.project.id,T)??N}),g=F(()=>e.ctx.workspaceExpanded(e.directory,f())),v=F(()=>g()||m()),y=F(()=>d()?.length??0),w=F(()=>MN(a.session)),k=F(()=>ON({loadedRootCount:w(),total:a.sessionTotal,visible:y()})),x=va(()=>({...Wm(e.directory,o.scope.key)})),C=F(()=>e.ctx.isBusy(e.directory)),S=()=>x.isLoading&&y()===0,$=R2("(hover: none)"),O=F(()=>!S()&&($()||y()===0||m()&&!n.id));let D=!1;const M=async()=>{if(!D){D=!0;try{await r.project.loadSessions(e.directory,{all:!0})}finally{D=!1}}},I=F(()=>e.ctx.editorOpen(`workspace:${e.directory}`)),L=()=>b(h4e,{local:f,busy:C,open:g,get directory(){return e.directory},language:i,branch:()=>a.vcs?.branch,workspaceValue:p,workspaceEditActive:I,get InlineEditor(){return e.ctx.InlineEditor},get renameWorkspace(){return e.ctx.renameWorkspace},get setEditor(){return e.ctx.setEditor},get projectId(){return e.project.id}}),A=T=>{e.ctx.setWorkspaceExpanded(e.directory,T),!T&&e.ctx.editorOpen(`workspace:${e.directory}`)&&e.ctx.closeEditor()};return re(()=>{v()&&r.child(e.directory,{bootstrap:!0})}),(()=>{var T=rp();return pr(s,T,()=>!0),j(T,b(fy,{variant:"ghost",get open(){return g()},class:"shrink-0",onOpenChange:A,get children(){return[(()=>{var N=u4e(),W=N.firstChild,K=W.firstChild;return j(K,b(ce,{get when(){return I()},get fallback(){return b(fy.Trigger,{get class(){return`flex items-center justify-between w-full pl-2 py-1.5 rounded-md hover:bg-surface-raised-base-hover transition-[padding] duration-200 ${l.open?"pr-16":"pr-2"} group-hover/workspace:pr-16 group-focus-within/workspace:pr-16`},"data-action":"workspace-toggle",get"data-workspace"(){return dt(e.directory)},get children(){return L()}})},get children(){var V=rp();return j(V,L),De(()=>Bo(V,`flex items-center justify-between w-full pl-2 py-1.5 rounded-md transition-[padding] duration-200 ${l.open?"pr-16":"pr-2"} group-hover/workspace:pr-16 group-focus-within/workspace:pr-16`)),V}}),null),j(K,b(m4e,{get directory(){return e.directory},local:f,busy:C,menuOpen:()=>l.open,pendingRename:()=>l.pendingRename,setMenuOpen:V=>c("open",V),setPendingRename:V=>c("pendingRename",V),get sidebarHovering(){return e.ctx.sidebarHovering},touch:$,language:i,workspaceValue:p,get openEditor(){return e.ctx.openEditor},get showResetWorkspaceDialog(){return e.ctx.showResetWorkspaceDialog},get showDeleteWorkspaceDialog(){return e.ctx.showDeleteWorkspaceDialog},get showArchivedSessionsDialog(){return e.ctx.showArchivedSessionsDialog},get root(){return e.project.worktree},get clearHoverProjectSoon(){return e.ctx.clearHoverProjectSoon},navigateToNewSession:()=>t(`/${u()}/session`)}),null),De(()=>Ye(W,"data-workspace",dt(e.directory))),N})(),b(fy.Content,{get children(){return b(VN,{get directory(){return e.directory},slug:u,get mobile(){return e.mobile},get ctx(){return e.ctx},showNew:O,loading:()=>x.isLoading&&y()===0,sessions:d,childSessions:h,hasMore:k,loadMore:M,language:i,get projectID(){return e.project.id},get projectWorktree(){return e.project.worktree}})}})]}})),De(N=>Ct(T,{"opacity-30":s.isActiveDraggable,"opacity-50 pointer-events-none":C()},N)),T})()},g4e=e=>{const t=Jn(),n=At(),r=sr(),i=F(()=>{const[p]=t.child(e.directory());return p}),o=F(()=>dt(e.directory())),s=F(()=>yf(i(),e.sortNow(),e.directory())),a=F(()=>DN(i().session,e.sortNow())),l=F(()=>s()?.length??0),c=va(()=>({...Wm(e.directory(),r.scope.key)})),u=F(()=>MN(i().session)),d=F(()=>ON({loadedRootCount:u(),total:i().sessionTotal,visible:l()})),h=()=>c.isLoading&&l()===0;let f=!1;const m=async()=>{if(!f){f=!0;try{await t.project.loadSessions(e.directory(),{all:!0})}finally{f=!1}}};return(()=>{var p=d4e(),g=p.firstChild;return pr(v=>e.ctx.setScrollContainerRef(v,e.mobile),g),j(g,b(VN,{get directory(){return e.directory()},slug:o,get mobile(){return e.mobile},get ctx(){return e.ctx},showNew:()=>!1,loading:h,sessions:s,childSessions:a,hasMore:d,loadMore:m,language:n,hideArchive:!0})),j(p,b(WN,{language:n,get projectID(){return e.project.id},get projectWorktree(){return e.project.worktree},footer:!0}),null),j(p,b(qN,{get directory(){return e.directory()},get ctx(){return e.ctx},language:n,footer:!0}),null),p})()};var v4e={};vr(v4e,{Arrow:()=>xi,CheckboxItem:()=>Eg,Content:()=>GN,ContextMenu:()=>Bn,Group:()=>Qf,GroupLabel:()=>$g,Icon:()=>Ag,Item:()=>Lg,ItemDescription:()=>Dg,ItemIndicator:()=>Mg,ItemLabel:()=>Og,Portal:()=>Pg,RadioGroup:()=>Rg,RadioItem:()=>Ng,Root:()=>YN,Separator:()=>Su,Sub:()=>zg,SubContent:()=>jg,SubTrigger:()=>Fg,Trigger:()=>XN,useContextMenuContext:()=>ZN});function GN(e){const t=Ki(),[n,r]=se(e,["onCloseAutoFocus","onInteractOutside"]);let i=!1;return b(HR,ne({onCloseAutoFocus:a=>{n.onCloseAutoFocus?.(a),!a.defaultPrevented&&i&&a.preventDefault(),i=!1},onInteractOutside:a=>{n.onInteractOutside?.(a),!a.defaultPrevented&&!t.isModal()&&(i=!0)}},r))}var KN=pt();function y4e(){return ut(KN)}function ZN(){const e=y4e();if(e===void 0)throw new Error("[kobalte]: `useContextMenuContext` must be used within a `ContextMenu` component");return e}function YN(e){const t=`contextmenu-${an()}`,{direction:n}=Co(),r=Ne({id:t,placement:n()==="rtl"?"left-start":"right-start",gutter:2,shift:2},e),[i,o]=se(r,["onOpenChange"]),[s,a]=de({x:0,y:0}),l=Ps({defaultOpen:!1,onOpenChange:u=>i.onOpenChange?.(u)}),c={setAnchorRect:a};return b(KN.Provider,{value:c,get children(){return b(WR,ne({get open(){return l.isOpen()},get onOpenChange(){return l.setIsOpen},getAnchorRect:s},o))}})}function XN(e){const t=Ki(),n=os(),r=ZN(),i=Ne({id:t.generateId("trigger")},e),[o,s]=se(i,["ref","style","disabled","onContextMenu","onPointerDown","onPointerMove","onPointerCancel","onPointerUp"]);let a=0;const l=()=>{window.clearTimeout(a)};fe(()=>{l()});const c=p=>{if(o.disabled){ze(p,o.onContextMenu);return}l(),p.preventDefault(),p.stopPropagation(),r.setAnchorRect({x:p.clientX,y:p.clientY}),n.isOpen()?n.focusContent():n.open(!0)},u=p=>p.pointerType==="touch"||p.pointerType==="pen";return b(Ve,ne({as:"div",ref(p){var g=st(n.setTriggerRef,o.ref);typeof g=="function"&&g(p)},get style(){return gr({"-webkit-touch-callout":"none"},o.style)},get"data-disabled"(){return o.disabled?"":void 0},onContextMenu:c,onPointerDown:p=>{ze(p,o.onPointerDown),!o.disabled&&u(p)&&(l(),r.setAnchorRect({x:p.clientX,y:p.clientY}),a=window.setTimeout(()=>n.open(!1),700))},onPointerMove:p=>{ze(p,o.onPointerMove),!o.disabled&&u(p)&&l()},onPointerCancel:p=>{ze(p,o.onPointerCancel),!o.disabled&&u(p)&&l()},onPointerUp:p=>{ze(p,o.onPointerUp),!o.disabled&&u(p)&&l()}},()=>n.dataset(),s))}var Bn=Object.assign(YN,{Arrow:xi,CheckboxItem:Eg,Content:GN,Group:Qf,GroupLabel:$g,Icon:Ag,Item:Lg,ItemDescription:Dg,ItemIndicator:Mg,ItemLabel:Og,Portal:Pg,RadioGroup:Rg,RadioItem:Ng,Separator:Su,Sub:zg,SubContent:jg,SubTrigger:Fg,Trigger:XN});function b4e(e){return b(Bn,ne(e,{"data-component":"context-menu"}))}function w4e(e){const[t,n]=se(e,["class","classList","children"]);return b(Bn.Trigger,ne(n,{"data-slot":"context-menu-trigger",get classList(){return{...t.classList,[t.class??""]:!!t.class}},get children(){return t.children}}))}function k4e(e){const[t,n]=se(e,["class","classList","children"]);return b(Bn.Icon,ne(n,{"data-slot":"context-menu-icon",get classList(){return{...t.classList,[t.class??""]:!!t.class}},get children(){return t.children}}))}function x4e(e){return b(Bn.Portal,e)}function S4e(e){const[t,n]=se(e,["class","classList","children"]);return b(Bn.Content,ne(n,{"data-component":"context-menu-content",get classList(){return{...t.classList,[t.class??""]:!!t.class}},get children(){return t.children}}))}function _4e(e){const[t,n]=se(e,["class","classList"]);return b(Bn.Arrow,ne(n,{"data-slot":"context-menu-arrow",get classList(){return{...t.classList,[t.class??""]:!!t.class}}}))}function C4e(e){const[t,n]=se(e,["class","classList"]);return b(Bn.Separator,ne(n,{"data-slot":"context-menu-separator",get classList(){return{...t.classList,[t.class??""]:!!t.class}}}))}function I4e(e){const[t,n]=se(e,["class","classList","children"]);return b(Bn.Group,ne(n,{"data-slot":"context-menu-group",get classList(){return{...t.classList,[t.class??""]:!!t.class}},get children(){return t.children}}))}function T4e(e){const[t,n]=se(e,["class","classList","children"]);return b(Bn.GroupLabel,ne(n,{"data-slot":"context-menu-group-label",get classList(){return{...t.classList,[t.class??""]:!!t.class}},get children(){return t.children}}))}function E4e(e){const[t,n]=se(e,["class","classList","children"]);return b(Bn.Item,ne(n,{"data-slot":"context-menu-item",get classList(){return{...t.classList,[t.class??""]:!!t.class}},get children(){return t.children}}))}function $4e(e){const[t,n]=se(e,["class","classList","children"]);return b(Bn.ItemLabel,ne(n,{"data-slot":"context-menu-item-label",get classList(){return{...t.classList,[t.class??""]:!!t.class}},get children(){return t.children}}))}function A4e(e){const[t,n]=se(e,["class","classList","children"]);return b(Bn.ItemDescription,ne(n,{"data-slot":"context-menu-item-description",get classList(){return{...t.classList,[t.class??""]:!!t.class}},get children(){return t.children}}))}function L4e(e){const[t,n]=se(e,["class","classList","children"]);return b(Bn.ItemIndicator,ne(n,{"data-slot":"context-menu-item-indicator",get classList(){return{...t.classList,[t.class??""]:!!t.class}},get children(){return t.children}}))}function D4e(e){const[t,n]=se(e,["class","classList","children"]);return b(Bn.RadioGroup,ne(n,{"data-slot":"context-menu-radio-group",get classList(){return{...t.classList,[t.class??""]:!!t.class}},get children(){return t.children}}))}function M4e(e){const[t,n]=se(e,["class","classList","children"]);return b(Bn.RadioItem,ne(n,{"data-slot":"context-menu-radio-item",get classList(){return{...t.classList,[t.class??""]:!!t.class}},get children(){return t.children}}))}function O4e(e){const[t,n]=se(e,["class","classList","children"]);return b(Bn.CheckboxItem,ne(n,{"data-slot":"context-menu-checkbox-item",get classList(){return{...t.classList,[t.class??""]:!!t.class}},get children(){return t.children}}))}function P4e(e){return b(Bn.Sub,e)}function R4e(e){const[t,n]=se(e,["class","classList","children"]);return b(Bn.SubTrigger,ne(n,{"data-slot":"context-menu-sub-trigger",get classList(){return{...t.classList,[t.class??""]:!!t.class}},get children(){return t.children}}))}function N4e(e){const[t,n]=se(e,["class","classList","children"]);return b(Bn.SubContent,ne(n,{"data-component":"context-menu-sub-content",get classList(){return{...t.classList,[t.class??""]:!!t.class}},get children(){return t.children}}))}const li=Object.assign(b4e,{Trigger:w4e,Icon:k4e,Portal:x4e,Content:S4e,Arrow:_4e,Separator:C4e,Group:I4e,GroupLabel:T4e,Item:E4e,ItemLabel:$4e,ItemDescription:A4e,ItemIndicator:L4e,RadioGroup:D4e,RadioItem:M4e,CheckboxItem:O4e,Sub:P4e,SubTrigger:R4e,SubContent:N4e});var z4e={};vr(z4e,{Link:()=>j4e,Root:()=>Ak});function Ak(e){let t;const[n,r]=se(e,["ref","href","disabled"]),i=Sf(()=>t,()=>"a");return b(Ve,ne({as:"a",ref(o){var s=st(a=>t=a,n.ref);typeof s=="function"&&s(o)},get role(){return i()!=="a"||n.disabled?"link":void 0},get tabIndex(){return i()!=="a"&&!n.disabled?0:void 0},get href(){return je(()=>!n.disabled)()?n.href:void 0},get"aria-disabled"(){return n.disabled?!0:void 0},get"data-disabled"(){return n.disabled?"":void 0}},r))}var j4e=Ak,F4e={};vr(F4e,{Arrow:()=>xi,Content:()=>QN,HoverCard:()=>kd,Portal:()=>ez,Root:()=>tz,Trigger:()=>nz,useHoverCardContext:()=>Zg});var JN=pt();function Zg(){const e=ut(JN);if(e===void 0)throw new Error("[kobalte]: `useHoverCardContext` must be used within a `HoverCard` component");return e}function QN(e){const t=Zg(),[n,r]=se(e,["ref","style"]);return b(ce,{get when(){return t.contentPresent()},get children(){return b(is.Positioner,{get children(){return b(eu,ne({ref(i){var o=st(s=>{t.setContentRef(s)},n.ref);typeof o=="function"&&o(i)},disableOutsidePointerEvents:!1,get style(){return gr({"--kb-hovercard-content-transform-origin":"var(--kb-popper-content-transform-origin)",position:"relative"},n.style)},onFocusOutside:i=>i.preventDefault(),get onDismiss(){return t.close}},()=>t.dataset(),r))}})}})}function ez(e){const t=Zg();return b(ce,{get when(){return t.contentPresent()},get children(){return b(Os,e)}})}function U4e(e,t,n){const r=e.split("-")[0],i=t.getBoundingClientRect(),o=n.getBoundingClientRect(),s=[],a=i.left+i.width/2,l=i.top+i.height/2;switch(r){case"top":s.push([i.left,l]),s.push([o.left,o.bottom]),s.push([o.left,o.top]),s.push([o.right,o.top]),s.push([o.right,o.bottom]),s.push([i.right,l]);break;case"right":s.push([a,i.top]),s.push([o.left,o.top]),s.push([o.right,o.top]),s.push([o.right,o.bottom]),s.push([o.left,o.bottom]),s.push([a,i.bottom]);break;case"bottom":s.push([i.left,l]),s.push([o.left,o.top]),s.push([o.left,o.bottom]),s.push([o.right,o.bottom]),s.push([o.right,o.top]),s.push([i.right,l]);break;case"left":s.push([a,i.top]),s.push([o.right,o.top]),s.push([o.left,o.top]),s.push([o.left,o.bottom]),s.push([o.right,o.bottom]),s.push([a,i.bottom]);break}return s}function tz(e){const t=`hovercard-${an()}`,n=Ne({id:t,openDelay:700,closeDelay:300},e),[r,i]=se(n,["id","open","defaultOpen","onOpenChange","openDelay","closeDelay","ignoreSafeArea","forceMount"]);let o,s;const[a,l]=de(),[c,u]=de(),[d,h]=de(i.placement),f=Ps({open:()=>r.open,defaultOpen:()=>r.defaultOpen,onOpenChange:D=>r.onOpenChange?.(D)}),{present:m}=po({show:()=>r.forceMount||f.isOpen(),element:()=>c()??null}),{addGlobalListener:p,removeGlobalListener:g}=oF(),v=()=>{o=window.setTimeout(()=>{o=void 0,f.open()},r.openDelay)},y=()=>{s=window.setTimeout(()=>{s=void 0,f.close()},r.closeDelay)},w=()=>{window.clearTimeout(o),o=void 0},k=()=>{window.clearTimeout(s),s=void 0},x=D=>Dn(a(),D)||Dn(c(),D),C=D=>{const M=a(),I=c();if(!(!M||!I))return U4e(D,M,I)},S=D=>{const M=D.target;if(x(M)){k();return}if(!r.ignoreSafeArea){const I=C(d());if(I&&U2(Q9(D),I)){k();return}}s||y()};re(()=>{f.isOpen()&&(p(document,"pointermove",S,!0),fe(()=>{g(document,"pointermove",S,!0)}))}),fe(()=>{w(),k()});const O={dataset:F(()=>({"data-expanded":f.isOpen()?"":void 0,"data-closed":f.isOpen()?void 0:""})),isOpen:f.isOpen,contentPresent:m,openWithDelay:v,closeWithDelay:y,cancelOpening:w,cancelClosing:k,close:f.close,isTargetOnHoverCard:x,setTriggerRef:l,setContentRef:u};return b(JN.Provider,{value:O,get children(){return b(is,ne({anchorRef:a,contentRef:c,onCurrentPlacementChange:h},i))}})}function nz(e){const t=Zg(),[n,r]=se(e,["ref","onPointerEnter","onPointerLeave","onFocus","onBlur"]),i=l=>{ze(l,n.onPointerEnter),!(l.pointerType==="touch"||r.disabled||l.defaultPrevented)&&(t.cancelClosing(),t.isOpen()||t.openWithDelay())},o=l=>{ze(l,n.onPointerLeave),l.pointerType!=="touch"&&t.cancelOpening()},s=l=>{ze(l,n.onFocus),!(r.disabled||l.defaultPrevented)&&(t.cancelClosing(),t.isOpen()||t.openWithDelay())},a=l=>{ze(l,n.onBlur),t.cancelOpening();const c=l.relatedTarget;t.isTargetOnHoverCard(c)||t.closeWithDelay()};return fe(t.cancelOpening),b(Ak,ne({ref(l){var c=st(t.setTriggerRef,n.ref);typeof c=="function"&&c(l)},onPointerEnter:i,onPointerLeave:o,onFocus:s,onBlur:a},()=>t.dataset(),r))}var kd=Object.assign(tz,{Arrow:xi,Content:QN,Portal:ez,Trigger:nz}),H4e=ee("<div data-slot=hover-card-body>");function B4e(e){const[t,n]=se(e,["trigger","mount","class","classList","children"]);return b(kd,ne({gutter:4},n,{get children(){return[b(kd.Trigger,{as:"div","data-slot":"hover-card-trigger",tabIndex:-1,get children(){return t.trigger}}),b(kd.Portal,{get mount(){return t.mount},get children(){return b(kd.Content,{"data-component":"hover-card-content",get classList(){return{...t.classList,[t.class??""]:!!t.class}},get children(){var r=H4e();return j(r,()=>t.children),r}})}})]}}))}var V4e=ee('<div class="bg-background-base rounded-xl p-1">'),q4e=ee('<div class="-m-3 p-2 flex flex-col w-72"><div class="px-4 pt-2 pb-1 flex items-center gap-2"><div class="text-14-medium text-text-strong truncate grow"></div></div><div class="px-4 pb-2 text-12-medium text-text-weak"></div><div class="px-2 pb-2 flex flex-col gap-2"></div><div class="px-2 py-2 border-t border-border-weak-base">'),W4e=ee('<div class="flex flex-col gap-1"><div class="px-2 py-0.5 flex items-center gap-1 min-w-0"><div class="shrink-0 size-6 flex items-center justify-center"></div><span class="truncate text-14-medium text-text-base">'),G4e=ee("<div>");const K4e=e=>{const t=F(()=>e.projects().find(n=>n.worktree===e.activeProject()));return b(ce,{get when(){return t()},keyed:!0,children:n=>(()=>{var r=V4e();return j(r,b(BN,{project:n})),r})()})},Z4e=e=>{const t=Xf(),n=zl(),r=F(()=>e.dirs().reduce((o,s)=>o+t.project.unseenCount(s),0)),i=()=>e.dirs().filter(o=>t.project.unseenCount(o)>0).forEach(o=>t.project.markViewed(o));return b(li,{get modal(){return!e.sidebarHovering()},onOpenChange:o=>{e.setMenu(o),e.setSuppressHover(o),o&&e.setOpen(!1)},get children(){return[b(li.Trigger,{as:"button",type:"button",get"aria-label"(){return Ek(e.project)},"data-action":"project-switch",get"data-project"(){return dt(e.project.worktree)},get classList(){return{"flex items-center justify-center size-10 p-1 rounded-lg overflow-hidden transition-colors cursor-default":!0,"bg-surface-base-active border border-border-weak-base shadow-[var(--shadow-xs)]":e.selected(),"bg-transparent border border-transparent hover:bg-surface-base-hover hover:border-border-weak-base":!e.selected()&&!e.active(),"bg-surface-base-hover border border-border-weak-base":!e.selected()&&e.active()}},onPointerDown:o=>{if(o.button===0&&!o.ctrlKey){e.setOpen(!1),e.setSuppressHover(!0);return}e.overlay()&&(o.button!==2&&!(o.button===0&&o.ctrlKey)||(e.setOpen(!1),e.setSuppressHover(!0),o.preventDefault()))},onMouseEnter:o=>{e.overlay()&&(e.suppressHover()||e.onProjectMouseEnter(e.project.worktree,o))},onMouseLeave:()=>{e.suppressHover()&&e.setSuppressHover(!1),e.overlay()&&e.onProjectMouseLeave(e.project.worktree)},onFocus:()=>{e.overlay()&&(e.suppressHover()||e.onProjectFocus(e.project.worktree))},onClick:()=>{e.setOpen(!1),e.selected()&&n.sidebar.open(),e.navigateToProject(e.project.worktree)},onBlur:()=>e.setOpen(!1),get children(){return b(BN,{get project(){return e.project},notify:!0})}}),b(li.Portal,{get children(){return b(li.Content,{get children(){return[b(li.Item,{onSelect:()=>e.showEditProjectDialog(e.project),get children(){return b(li.ItemLabel,{get children(){return e.language.t("common.edit")}})}}),b(li.Item,{"data-action":"project-workspaces-toggle",get"data-project"(){return dt(e.project.worktree)},get disabled(){return je(()=>e.project.vcs!=="git")()&&!e.workspacesEnabled(e.project)},onSelect:()=>e.toggleProjectWorkspaces(e.project),get children(){return b(li.ItemLabel,{get children(){return je(()=>!!e.workspacesEnabled(e.project))()?e.language.t("sidebar.workspaces.disable"):e.language.t("sidebar.workspaces.enable")}})}}),b(li.Item,{"data-action":"project-clear-notifications",get"data-project"(){return dt(e.project.worktree)},get disabled(){return r()===0},onSelect:i,get children(){return b(li.ItemLabel,{get children(){return e.language.t("sidebar.project.clearNotifications")}})}}),b(li.Separator,{}),b(li.Item,{"data-action":"project-close-menu",get"data-project"(){return dt(e.project.worktree)},onSelect:()=>e.closeProject(e.project.worktree),get children(){return b(li.ItemLabel,{get children(){return e.language.t("common.close")}})}})]}})}})]}})},Y4e=e=>(()=>{var t=q4e(),n=t.firstChild,r=n.firstChild,i=n.nextSibling,o=i.nextSibling,s=o.nextSibling;return j(r,()=>Ek(e.project)),j(i,()=>e.language.t("sidebar.project.recentSessions")),j(o,b(ce,{get when(){return e.workspaceEnabled()},get fallback(){return b(Ut,{get each(){return e.projectSessions().slice(0,2)},children:a=>b(np,ne(()=>e.ctx.sessionProps,{session:a,get list(){return e.projectSessions()},get slug(){return dt(e.project.worktree)},dense:!0,showTooltip:!0,get mobile(){return e.mobile}}))})},get children(){return b(Ut,{get each(){return e.workspaces()},children:a=>{const l=F(()=>e.workspaceSessions(a));return(()=>{var c=W4e(),u=c.firstChild,d=u.firstChild,h=d.nextSibling;return j(d,b(Ht,{name:"branch",size:"small",class:"text-icon-base"})),j(h,()=>e.label(a)),j(c,b(Ut,{get each(){return l().slice(0,2)},children:f=>b(np,ne(()=>e.ctx.sessionProps,{session:f,get list(){return l()},get slug(){return dt(a)},dense:!0,showTooltip:!0,get mobile(){return e.mobile}}))}),null),c})()}})}})),j(s,b(Gt,{variant:"ghost",class:"flex w-full text-left justify-start text-text-base px-2 hover:bg-transparent active:bg-transparent",onClick:()=>{e.ctx.openSidebar(),e.ctx.onHoverOpenChanged(e.project.worktree,!1),e.ctx.navigateToProject(e.project.worktree)},get children(){return e.language.t("sidebar.project.viewAllSessions")}})),t})(),X4e=e=>{const t=Jn(),n=At(),r=nN(e.project.worktree),i=F(()=>e.ctx.currentProject()?.worktree===e.project.worktree),o=F(()=>e.ctx.workspaceIds(e.project).slice(0,2)),s=F(()=>e.ctx.workspacesEnabled(e.project)),a=F(()=>e.ctx.workspaceIds(e.project)),[l,c]=Je({menu:!1,suppressHover:!1}),u=()=>e.ctx.hoverProject()===e.project.worktree,d=F(()=>!e.mobile&&e.ctx.sidebarOpened()),h=F(()=>!e.mobile&&!e.ctx.sidebarOpened()),f=F(()=>l.menu||(d()||h())&&u()),m=()=>u()&&d()&&!i()&&!l.menu,p=k=>{const[x]=t.peek(k,{bootstrap:!1}),C=k===e.project.worktree?n.t("workspace.type.local"):n.t("workspace.type.sandbox"),S=e.ctx.workspaceLabel(k,x.vcs?.branch,e.project.id);return`${C} : ${S}`},g=F(()=>t.peek(e.project.worktree,{bootstrap:!1})[0]),v=F(()=>yf(g(),e.sortNow(),e.project.worktree)),y=k=>{const[x]=t.peek(k,{bootstrap:!1});return yf(x,e.sortNow(),k)};re(()=>{m()&&(t.project.loadSessions(e.project.worktree),s()&&a().forEach(k=>void t.project.loadSessions(k)))});const w=()=>b(Z4e,{get project(){return e.project},get mobile(){return e.mobile},get sidebarHovering(){return e.ctx.sidebarHovering},selected:i,active:f,overlay:h,suppressHover:()=>l.suppressHover,dirs:a,get onProjectMouseEnter(){return e.ctx.onProjectMouseEnter},get onProjectMouseLeave(){return e.ctx.onProjectMouseLeave},get onProjectFocus(){return e.ctx.onProjectFocus},get navigateToProject(){return e.ctx.navigateToProject},get showEditProjectDialog(){return e.ctx.showEditProjectDialog},get toggleProjectWorkspaces(){return e.ctx.toggleProjectWorkspaces},get workspacesEnabled(){return e.ctx.workspacesEnabled},get closeProject(){return e.ctx.closeProject},setMenu:k=>c("menu",k),setOpen:k=>e.ctx.onHoverOpenChanged(e.project.worktree,k),setSuppressHover:k=>c("suppressHover",k),language:n});return(()=>{var k=G4e();return pr(r,k,()=>!0),j(k,b(ce,{get when(){return je(()=>!!d())()&&!i()},get fallback(){return w()},get children(){return b(B4e,{get open(){return je(()=>!!(!l.suppressHover&&m()))()&&!l.menu},openDelay:0,closeDelay:0,placement:"right-start",gutter:6,get trigger(){return w()},onOpenChange:x=>{l.menu||x&&l.suppressHover||e.ctx.onHoverOpenChanged(e.project.worktree,x)},get children(){return b(Y4e,{get project(){return e.project},get mobile(){return e.mobile},selected:i,workspaceEnabled:s,workspaces:o,label:p,projectSessions:v,workspaceSessions:y,get ctx(){return e.ctx},language:n})}})}})),De(()=>k.classList.toggle("opacity-30",!!r.isActiveDraggable)),k})()};var J4e=ee('<div><div class="shrink-0 pl-1 py-1"><div class="flex flex-col min-w-0 gap-0.5 py-2 pl-2 pr-0"><div class="text-14-medium text-text-strong truncate"></div><div class="text-12-regular text-text-base truncate"></div></div></div><div class="flex-1 min-h-0 overflow-y-auto no-scrollbar py-4"><div class="flex flex-col gap-4">'),Q4e=ee('<div class="flex flex-col gap-1.5"><div class="px-3 text-12-medium text-text-weak"></div><div class="flex flex-col gap-1">'),e5e=ee("<button type=button><span class=truncate>");const Pd=[{value:"general",icon:"sliders",titleKey:"settings.tab.general",descriptionKey:"settings.tab.general.description",groupKey:"settings.section.app"},{value:"shortcuts",icon:"keyboard",titleKey:"settings.tab.shortcuts",descriptionKey:"settings.tab.shortcuts.description",groupKey:"settings.section.app"},{value:"providers",icon:"providers",titleKey:"settings.providers.title",descriptionKey:"settings.tab.providers.description",groupKey:"settings.section.ai"},{value:"models",icon:"models",titleKey:"models.page.title",descriptionKey:"settings.tab.models.description",groupKey:"settings.section.ai"},{value:"modes",icon:"brain",titleKey:"modes.page.title",descriptionKey:"settings.tab.modes.description",groupKey:"settings.section.ai"},{value:"plugins",icon:"server",titleKey:"plugins.page.title",descriptionKey:"settings.tab.plugins.description",groupKey:"settings.section.extensions"},{value:"mcp",icon:"mcp",titleKey:"mcp.page.title",descriptionKey:"settings.tab.mcp.description",groupKey:"settings.section.extensions"},{value:"secrets",icon:"shield",titleKey:"secrets.page.title",descriptionKey:"settings.tab.secrets.description",groupKey:"settings.section.extensions"},{value:"skills",icon:"checklist",titleKey:"skills.page.title",descriptionKey:"settings.tab.skills.description",groupKey:"settings.section.extensions"}],t5e=[{titleKey:"settings.section.app",sections:Pd.filter(e=>e.groupKey==="settings.section.app")},{titleKey:"settings.section.ai",sections:Pd.filter(e=>e.groupKey==="settings.section.ai")},{titleKey:"settings.section.extensions",sections:Pd.filter(e=>e.groupKey==="settings.section.extensions")}],ip=e=>e==="/settings"||e.startsWith("/settings/");function n5e(e){return e==="shortcuts"||e==="providers"||e==="modes"||e==="models"||e==="mcp"||e==="secrets"||e==="plugins"||e==="skills"?e:"general"}const r5e=e=>e==="general"?"/settings":`/settings/${e}`;function i5e(e){return ip(e)?n5e(e.slice(10).split("/")[0]):"general"}function U3e(e){return Pd.find(t=>t.value===e)??Pd[0]}function o5e(e){const t=At(),n=Z1e(),r=F(()=>e.mobile||(e.merged??!0));return(()=>{var i=J4e(),o=i.firstChild,s=o.firstChild,a=s.firstChild,l=a.nextSibling,c=o.nextSibling,u=c.firstChild;return j(a,()=>t.t("sidebar.settings")),j(l,()=>t.t("app.name.web"),null),j(l,b(ce,{get when(){return n.status()?.current},children:d=>[" v",je(d)]}),null),j(u,b(Ut,{each:t5e,children:d=>(()=>{var h=Q4e(),f=h.firstChild,m=f.nextSibling;return j(f,()=>t.t(d.titleKey)),j(m,b(Ut,{get each(){return d.sections},children:p=>{const g=()=>e.current()===p.value;return(()=>{var v=e5e(),y=v.firstChild;return v.$$click=()=>e.onSelect(p.value),j(v,b(Ht,{get name(){return p.icon},get class(){return g()?"icon-strong-base shrink-0":"icon-base shrink-0"}}),y),j(y,()=>t.t(p.titleKey)),De(w=>{var k={"flex h-8 w-full items-center gap-3 rounded-md px-2 text-left text-14-medium transition-colors focus:outline-none focus-visible:bg-surface-base-hover":!0,"bg-surface-base-active text-text-strong":g(),"text-text-base hover:bg-surface-base-hover":!g()},x=g()?"page":void 0;return w.e=Ct(v,k,w.e),x!==w.t&&Ye(v,"aria-current",w.t=x),w},{e:void 0,t:void 0}),v})()}})),h})()})),De(d=>{var h={"flex flex-col min-h-0 min-w-0 box-border px-3 border-r border-border-weak-base bg-background-base":!0,"shadow-[var(--shadow-lg)]":!r(),"flex-1 min-w-0 max-w-full overflow-hidden":e.mobile},f=e.mobile?void 0:`${e.width??244}px`;return d.e=Ct(i,h,d.e),f!==d.t&&Xr(i,"width",d.t=f),d},{e:void 0,t:void 0}),i})()}or(["click"]);var s5e=ee("<div>"),a5e=ee("<button type=button>"),u9=ee('<span class="text-icon-base text-12-medium">'),d9=ee('<div class="flex items-center gap-2"><span>'),f9=ee('<button type=button class="flex size-10 shrink-0 cursor-default items-center justify-center rounded-lg border border-transparent text-text-weak transition-colors hover:border-border-weak-base hover:bg-surface-base-hover hover:text-text-strong focus:outline-none">'),l5e=ee('<div class="h-full w-full flex flex-col items-center gap-2 px-3 pt-2 pb-3 overflow-y-auto no-scrollbar">'),c5e=ee('<div class="flex h-full w-full min-w-0 overflow-hidden"><div data-component=sidebar-rail class="w-16 shrink-0 bg-background-base border-r border-border-weak-base flex flex-col items-center overflow-hidden"><div class="flex-1 min-h-0 w-full"></div><div class="shrink-0 w-full px-3 pt-2 pb-4 flex flex-col items-center gap-2"></div></div><div>');const u5e=e=>{const t=zl(),n=At(),r=So(),i=xo(),o=Xf(),s=qi(),a=F(()=>!!e.mobile||e.opened()),l=()=>e.mobile?"bottom":"right",c=F(()=>r.pathname==="/"),u=F(()=>r.pathname==="/notifications"),d=F(()=>ip(r.pathname)),h=F(()=>o.unseenCount()>0),f=g=>{i(g),t.mobileSidebar.hide()},m=g=>b(bn,{get placement(){return l()},get value(){return(()=>{var v=d9(),y=v.firstChild;return j(y,()=>g.label()),j(v,b(ce,{get when(){return je(()=>!e.mobile)()&&!!g.keybind?.()},get children(){var w=u9();return j(w,()=>g.keybind?.()),w}}),null),v})()},get children(){var v=a5e();return Vo(v,"click",g.onClick,!0),j(v,b(Ht,{get name(){return g.icon}}),null),j(v,b(ce,{get when(){return g.notify?.()},get children(){var y=s5e();return De(w=>Ct(y,{"absolute top-1 right-1 size-1.5 rounded-full z-10":!0,"bg-icon-critical-base":g.critical?.(),"bg-text-interactive-base":!g.critical?.()},w)),y}}),null),De(y=>{var w={"relative flex items-center justify-center size-10 p-1 rounded-lg overflow-hidden border transition-colors cursor-default focus:outline-none":!0,"bg-surface-base-active border-border-weak-base text-text-strong shadow-[var(--shadow-xs)] hover:bg-surface-base-hover":g.selected(),"bg-transparent border-transparent text-text-weak hover:bg-surface-base-hover hover:border-border-weak-base hover:text-text-strong":!g.selected()},k=g.label(),x=g.selected()?"page":void 0;return y.e=Ct(v,w,y.e),k!==y.t&&Ye(v,"aria-label",y.t=k),x!==y.a&&Ye(v,"aria-current",y.a=x),y},{e:void 0,t:void 0,a:void 0}),v}});let p;return re(()=>{const g=p;if(g){if(a()){g.removeAttribute("inert");return}g.setAttribute("inert","")}}),(()=>{var g=c5e(),v=g.firstChild,y=v.firstChild,w=y.nextSibling,k=v.nextSibling;return Vo(v,"mousemove",e.aimMove,!0),j(y,b(XR,{get onDragStart(){return e.handleDragStart},get onDragEnd(){return e.handleDragEnd},get onDragOver(){return e.handleDragOver},collisionDetector:ZR,get children(){return[b(JR,{}),b(sN,{}),(()=>{var x=l5e();return j(x,b(m,{icon:"home",label:()=>n.t("sidebar.home"),selected:c,onClick:()=>f("/")}),null),j(x,b(m,{icon:"bell",label:()=>n.t("sidebar.notifications"),selected:u,notify:h,get critical(){return o.unseenHasError},onClick:()=>f("/notifications")}),null),j(x,b(tN,{get ids(){return e.projects().map(C=>C.worktree)},get children(){return b(Ut,{get each(){return e.projects()},children:C=>e.renderProject(C)})}}),null),j(x,b(bn,{get placement(){return l()},get value(){return(()=>{var C=d9(),S=C.firstChild;return j(S,()=>e.openProjectLabel),j(C,b(ce,{get when(){return je(()=>!e.mobile)()&&!!e.openProjectKeybind()},get children(){var $=u9();return j($,()=>e.openProjectKeybind()),$}}),null),C})()},get children(){var C=f9();return Vo(C,"click",e.onOpenProject,!0),j(C,b(Ht,{name:"plus"})),De(()=>Ye(C,"aria-label",typeof e.openProjectLabel=="string"?e.openProjectLabel:void 0)),C}}),null),x})(),b(QR,{get children(){return e.renderProjectOverlay()}})]}})),j(w,b(m,{icon:"settings-gear",get label(){return e.settingsLabel},selected:d,get keybind(){return e.settingsKeybind},get onClick(){return e.onOpenSettings}}),null),j(w,b(ce,{get when(){return!s.desktop},get children(){return b(bn,{get placement(){return l()},get value(){return e.restartLabel()},get children(){var x=f9();return x.$$click=()=>{window.confirm(e.restartConfirm())&&e.onRestart()},j(x,b(Ht,{name:"reset"})),De(()=>Ye(x,"aria-label",e.restartLabel())),x}})}}),null),pr(x=>{p=x},k),j(k,()=>e.renderPanel()),De(x=>{var C={"flex-1 flex h-full min-h-0 min-w-0 overflow-hidden":!0,"pointer-events-none":!a()},S=!a();return x.e=Ct(k,C,x.e),S!==x.t&&Ye(k,"aria-hidden",x.t=S),x},{e:void 0,t:void 0}),g})()};or(["click","mousemove"]);function d5e(e){return e.password?{Authorization:`Basic ${btoa(`${e.username??"codeplane"}:${e.password}`)}`}:{}}function f5e(e){return Array.isArray(e)?e.map(t=>typeof t=="object"&&t!==null&&"key"in t?t.key:t).filter(t=>t!=null).join("."):""}function h5e(e,t){if(!e||typeof e!="object")return{detail:t};const n=e;if(Array.isArray(n.error)&&n.error.length>0){const r=n.error.map(o=>({path:f5e(o.path),message:typeof o.message=="string"?o.message:"Invalid value"}));return{detail:r.map(o=>o.path?`${o.path}: ${o.message}`:o.message).join("; ")||t,fieldIssues:r}}if(typeof n.name=="string"&&n.data&&typeof n.data=="object"){const r=n.data,i=typeof r.message=="string"?r.message.split(`
2439
2439
  `)[0]:n.name;return typeof r.field=="string"?{detail:i,fieldIssues:[{path:r.field,message:i}]}:{detail:i}}return typeof n.message=="string"?{detail:n.message.split(`
2440
- `)[0]}:{detail:t}}async function Lo(e,t,n={}){const r=`${e.url.replace(/\/$/,"")}${t}`,i={"Content-Type":"application/json","Cache-Control":"no-store, no-cache, must-revalidate",Pragma:"no-cache",...d5e(e),...n.headers??{}},o=await fetch(r,{cache:"no-store",...n,headers:i});if(!o.ok){let s;try{s=h5e(await o.json(),o.statusText)}catch{s={detail:o.statusText}}const a=new Error(s.detail);throw a.status=o.status,s.fieldIssues&&(a.fieldIssues=s.fieldIssues),a}if(o.status!==204)return await o.json()}const Ko={list(e,t){const n=new URLSearchParams;t?.projectID&&n.set("projectID",t.projectID),t?.directory&&n.set("directory",t.directory);const r=n.toString();return Lo(e,`/global/cron${r?`?${r}`:""}`)},get(e,t){return Lo(e,`/global/cron/${encodeURIComponent(t)}`)},create(e,t){return Lo(e,"/global/cron",{method:"POST",body:JSON.stringify(t)})},update(e,t,n){return Lo(e,`/global/cron/${encodeURIComponent(t)}`,{method:"PATCH",body:JSON.stringify(n)})},remove(e,t){return Lo(e,`/global/cron/${encodeURIComponent(t)}`,{method:"DELETE"})},setStatus(e,t,n){return Lo(e,`/global/cron/${encodeURIComponent(t)}/status`,{method:"POST",body:JSON.stringify({status:n})})},trigger(e,t){return Lo(e,`/global/cron/${encodeURIComponent(t)}/trigger`,{method:"POST"})},listRuns(e,t,n){const r=n?`?limit=${n}`:"";return Lo(e,`/global/cron/${encodeURIComponent(t)}/runs${r}`)},getRun(e,t){return Lo(e,`/global/cron/runs/${encodeURIComponent(t)}`)},cancelRun(e,t){return Lo(e,`/global/cron/runs/${encodeURIComponent(t)}/cancel`,{method:"POST"})}};function Lk(e){if(!e)return[];const t=new Set;return[e.worktree,...e.sandboxes??[]].filter(n=>{if(!n)return!1;const r=Vi(n);return t.has(r)?!1:(t.add(r),!0)})}function m5e(e,t){return t.some(n=>ba(n,e))}function h9(e,t){return Lk(t).reduce((n,r)=>ba(r,e)?Math.max(n,Vi(r).length):n,-1)}function D2(e,t,n){if(!e)return;const r=n?t.find(o=>o.id===n):void 0;if(r&&h9(e,r)>=0)return r;const i=t.map((o,s)=>({project:o,index:s,score:h9(e,o)})).filter(o=>o.score>=0).sort((o,s)=>s.score-o.score||o.index-s.index)[0]?.project;return i||(n?{id:n,worktree:e}:{worktree:e})}function rz(e,t){return e?.id??t}function iz(e,t){if(t.projectID)return e.projectID===t.projectID;const n=t.project?Lk(t.project):t.directory?[t.directory]:[];return m5e(e.directory,n)}var p5e=ee('<div class="flex items-center gap-2 px-2 py-2 min-w-0"><span class="text-14-medium text-text-strong truncate">'),g5e=ee('<div class="shrink-0 px-3 pt-4 pb-1 text-11-medium text-text-weak uppercase tracking-wider">'),v5e=ee('<nav class="flex-1 min-h-0 overflow-y-auto no-scrollbar flex flex-col px-1">'),y5e=ee('<div class="flex flex-col min-h-0 flex-1 py-2"><div class="shrink-0 px-1">'),b5e=ee('<div class="flex items-center gap-1.5 px-2 py-1 min-w-0"><span class="text-12-medium text-text-weak truncate">'),w5e=ee('<div class="shrink-0 px-1 pb-1">'),k5e=ee('<div class="size-1.5 rounded-full bg-text-interactive-base">'),x5e=ee('<div class="shrink-0 size-6 flex items-center justify-center">'),S5e=ee('<div class="size-1.5 rounded-full">'),_5e=ee('<div class="flex items-center gap-2 min-w-0 w-full text-left focus:outline-none py-1"><span class="min-w-0 flex-1 flex flex-col"><span class="text-14-regular text-text-strong truncate"><span class="text-text-weak font-mono mr-1">#</span></span><span class="text-12-regular text-text-weak truncate">'),C5e=ee('<div class="group/session relative w-full min-w-0 rounded-md cursor-default px-2 transition-colors hover:bg-surface-raised-base-hover [&amp;:has(:focus-visible)]:bg-surface-raised-base-hover">'),I5e=ee('<div class="opacity-60 cursor-default">');const T5e=5e3,E5e=3e3,m9=6e4;function $5e(e){return new Date(e).toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"})}const A5e=e=>{const t=At(),n=So(),r=sr(),i=Jn(),o=F(()=>r.current?.http),s=F(()=>n.pathname==="/cron"||n.pathname.startsWith("/cron/")),a=F(()=>new URLSearchParams(n.search).get("projectID")??void 0),l=F(()=>{const y=e.projectID?.(),w=(i.data.project??[]).filter(S=>S.id!=="global");if(y){const S=w.find($=>$.id===y);return S?{id:S.id,worktree:e.projectWorktree?.()??S.worktree,sandboxes:S.sandboxes}:{id:y,worktree:e.projectWorktree?.()}}const k=n.pathname.match(/^\/cron\/worktree\/([^/?#]+)/);if(k){const S=_r(k[1]);return D2(S,w,a())}const x=n.pathname.match(/^\/cron\/([^/?#]+)/);if(x){const S=a()??decodeURIComponent(x[1]),$=w.find(O=>O.id===S);if($)return{id:$.id,worktree:$.worktree,sandboxes:$.sandboxes}}const C=n.pathname.match(/^\/([^/]+)\/session\//);if(C){const S=_r(C[1]);return D2(S,w,a())}}),c=F(()=>rz(l(),a())),u=F(()=>l()?.worktree),d=F(()=>Lk(l())),h=F(()=>d().flatMap(y=>{const[w]=i.child(y,{bootstrap:!1});return w.session}));re(()=>{d().forEach(y=>void i.project.loadSessions(y))});const f=va(()=>({queryKey:["cron","sidebar-panel-tasks",r.scope.key,c(),u()],queryFn:async()=>{const y=o(),w=c(),k=u();return!y||!w&&!k?[]:w?Ko.list(y,{projectID:w}):Ko.list(y,{directory:k})},enabled:!!o()&&(!!c()||!!u()),refetchInterval:5e3,refetchOnMount:!0,refetchOnWindowFocus:!0,staleTime:T5e,gcTime:m9,retry:1})),m=F(()=>(f.data??[]).filter(y=>iz(y,{projectID:c(),project:l(),directory:u()}))),p=va(()=>({queryKey:["cron","sidebar-panel-runs",r.scope.key,c(),m().map(y=>y.id).join(",")],queryFn:async()=>{const y=o();return y?(await Promise.all(m().map(async k=>(await Ko.listRuns(y,k.id,100).catch(()=>[])).map(C=>({...C,taskName:k.name,taskDirectory:k.directory||u()||""}))))).flat().sort((k,x)=>(x.time?.created??0)-(k.time?.created??0)):[]},enabled:!!o()&&(!!c()||!!u())&&!f.isLoading,refetchInterval:3e3,refetchOnMount:!0,refetchOnWindowFocus:!0,staleTime:E5e,gcTime:m9,retry:1})),g=F(()=>V2e({runs:p.data??[],sessions:h(),directories:d(),limit:200})),v=F(()=>{const y=c(),w=u();return w?`/cron/worktree/${dt(w)}${y?`?projectID=${encodeURIComponent(y)}`:""}`:y?`/cron/${encodeURIComponent(y)}`:"/cron"});return(()=>{var y=y5e(),w=y.firstChild;return j(y,b(ce,{get when(){return je(()=>!!s())()&&u()},keyed:!0,children:k=>(()=>{var x=w5e();return j(x,b(Uc,{get href(){return`/${dt(k)}/session`},class:"block w-full rounded-md transition-colors hover:bg-surface-raised-base-hover",get children(){var C=b5e(),S=C.firstChild;return j(C,b(Ht,{name:"chevron-left",size:"small",class:"shrink-0 text-text-weak"}),S),j(S,()=>t.t("common.back")),C}})),x})()}),w),j(w,b(Uc,{get href(){return v()},class:"block w-full rounded-md transition-colors",get classList(){return{"bg-surface-base-active":s(),"hover:bg-surface-raised-base-hover":!s()}},get children(){var k=p5e(),x=k.firstChild;return j(k,b(Ht,{name:"bell",size:"small",class:"shrink-0 icon-strong-base"}),x),j(x,()=>t.t("cron.title")),k}})),j(y,b(ce,{get when(){return g().length>0},get children(){return[(()=>{var k=g5e();return j(k,()=>t.t("cron.rail.title")),k})(),(()=>{var k=v5e();return j(k,b(Ut,{get each(){return g()},children:x=>b(L5e,{get sessionID(){return x.sessionID},get taskName(){return x.taskName},get taskDirectory(){return x.taskDirectory},get projectID(){return c()},get status(){return x.status},get startedAt(){return x.startedAt},get sequence(){return x.sequence}})})),k})()]}}),null),y})()},L5e=e=>{const t=F(()=>dt(e.taskDirectory)),n=F(()=>`/cron/worktree/${t()}/session/${e.sessionID}`),r=F(()=>{if(!e.sessionID)return"";const l=new URLSearchParams({sidebar:"cron"});return e.projectID&&l.set("projectID",e.projectID),`${n()}?${l.toString()}`}),i=So(),o=F(()=>!!e.sessionID&&i.pathname===n()),s=(()=>{var l=x5e();return j(l,b(Il,{get fallback(){return(()=>{var c=S5e();return De(u=>{var d=e.status==="success",h=e.status==="failed"||e.status==="timeout",f=e.status==="cancelled";return d!==u.e&&c.classList.toggle("bg-text-success-base",u.e=d),h!==u.t&&c.classList.toggle("bg-text-critical-base",u.t=h),f!==u.a&&c.classList.toggle("bg-text-weak-base",u.a=f),u},{e:void 0,t:void 0,a:void 0}),c})()},get children(){return[b(Cn,{get when(){return e.status==="running"},get children(){return b(Kg,{class:"size-[15px]"})}}),b(Cn,{get when(){return e.status==="queued"},get children(){return k5e()}})]}})),l})(),a=(()=>{var l=_5e(),c=l.firstChild,u=c.firstChild,d=u.firstChild;d.firstChild;var h=u.nextSibling;return j(l,s,c),j(d,()=>e.sequence,null),j(u,()=>e.taskName,null),j(h,()=>$5e(e.startedAt)),l})();return(()=>{var l=C5e();return j(l,b(ce,{get when(){return e.sessionID},get fallback(){return(()=>{var c=I5e();return j(c,a),c})()},get children(){return b(Uc,{get href(){return r()},class:"block",children:a})}})),De(()=>l.classList.toggle("bg-surface-base-active",!!o())),l})()};var D5e={};vr(D5e,{Description:()=>Aa,ErrorMessage:()=>La,Item:()=>az,ItemControl:()=>Dk,ItemDescription:()=>Mk,ItemIndicator:()=>Ok,ItemInput:()=>lz,ItemLabel:()=>Pk,Label:()=>Rk,RadioGroup:()=>Xg,Root:()=>cz,useRadioGroupContext:()=>Yg});var oz=pt();function Yg(){const e=ut(oz);if(e===void 0)throw new Error("[kobalte]: `useRadioGroupContext` must be used within a `RadioGroup` component");return e}var sz=pt();function _u(){const e=ut(sz);if(e===void 0)throw new Error("[kobalte]: `useRadioGroupItemContext` must be used within a `RadioGroup.Item` component");return e}function az(e){const t=Si(),n=Yg(),r=`${t.generateId("item")}-${an()}`,i=Ne({id:r},e),[o,s]=se(i,["value","disabled","onPointerDown"]),[a,l]=de(),[c,u]=de(),[d,h]=de(),[f,m]=de(),[p,g]=de(!1),v=F(()=>n.isDefaultValue(o.value)),y=F(()=>n.isSelectedValue(o.value)),w=F(()=>o.disabled||t.isDisabled()||!1),k=S=>{ze(S,o.onPointerDown),p()&&S.preventDefault()},x=F(()=>({...t.dataset(),"data-disabled":w()?"":void 0,"data-checked":y()?"":void 0})),C={value:()=>o.value,dataset:x,isDefault:v,isSelected:y,isDisabled:w,inputId:a,labelId:c,descriptionId:d,inputRef:f,select:()=>n.setSelectedValue(o.value),generateId:$r(()=>s.id),registerInput:en(l),registerLabel:en(u),registerDescription:en(h),setIsFocused:g,setInputRef:m};return b(sz.Provider,{value:C,get children(){return b(Ve,ne({as:"div",role:"group",onPointerDown:k},x,s))}})}function Dk(e){const t=_u(),n=Ne({id:t.generateId("control")},e),[r,i]=se(n,["onClick","onKeyDown"]);return b(Ve,ne({as:"div",onClick:a=>{ze(a,r.onClick),t.select(),t.inputRef()?.focus()},onKeyDown:a=>{ze(a,r.onKeyDown),a.key===dp.Space&&(t.select(),t.inputRef()?.focus())}},()=>t.dataset(),i))}function Mk(e){const t=_u(),n=Ne({id:t.generateId("description")},e);return re(()=>fe(t.registerDescription(n.id))),b(Ve,ne({as:"div"},()=>t.dataset(),n))}function Ok(e){const t=_u(),n=Ne({id:t.generateId("indicator")},e),[r,i]=se(n,["ref","forceMount"]),[o,s]=de(),{present:a}=po({show:()=>r.forceMount||t.isSelected(),element:()=>o()??null});return b(ce,{get when(){return a()},get children(){return b(Ve,ne({as:"div",ref(l){var c=st(s,r.ref);typeof c=="function"&&c(l)}},()=>t.dataset(),i))}})}function lz(e){const t=Si(),n=Yg(),r=_u(),i=Ne({id:r.generateId("input")},e),[o,s]=se(i,["ref","style","aria-labelledby","aria-describedby","onChange","onFocus","onBlur"]),a=()=>[o["aria-labelledby"],r.labelId(),o["aria-labelledby"]!=null&&s["aria-label"]!=null?s.id:void 0].filter(Boolean).join(" ")||void 0,l=()=>[o["aria-describedby"],r.descriptionId(),n.ariaDescribedBy()].filter(Boolean).join(" ")||void 0,[c,u]=de(!1),d=m=>{if(ze(m,o.onChange),m.stopPropagation(),!c()){n.setSelectedValue(r.value());const p=m.target;p.checked=r.isSelected()}u(!1)},h=m=>{ze(m,o.onFocus),r.setIsFocused(!0)},f=m=>{ze(m,o.onBlur),r.setIsFocused(!1)};return re(gt([()=>r.isSelected(),()=>r.value()],m=>{if(!m[0]&&m[1]===r.value())return;u(!0);const p=r.inputRef();p?.dispatchEvent(new Event("input",{bubbles:!0,cancelable:!0})),p?.dispatchEvent(new Event("change",{bubbles:!0,cancelable:!0}))},{defer:!0})),re(()=>fe(r.registerInput(s.id))),b(Ve,ne({as:"input",ref(m){var p=st(r.setInputRef,o.ref);typeof p=="function"&&p(m)},type:"radio",get name(){return t.name()},get value(){return r.value()},get checked(){return r.isSelected()},get required(){return t.isRequired()},get disabled(){return r.isDisabled()},get readonly(){return t.isReadOnly()},get style(){return gr({...fp},o.style)},get"aria-labelledby"(){return a()},get"aria-describedby"(){return l()},onChange:d,onFocus:h,onBlur:f},()=>r.dataset(),s))}function Pk(e){const t=_u(),n=Ne({id:t.generateId("label")},e);return re(()=>fe(t.registerLabel(n.id))),b(Ve,ne({as:"label",get for(){return t.inputId()}},()=>t.dataset(),n))}function Rk(e){return b(th,ne({as:"span"},e))}function cz(e){let t;const n=`radiogroup-${an()}`,r=Ne({id:n,orientation:"vertical"},e),[i,o,s]=se(r,["ref","value","defaultValue","onChange","orientation","aria-labelledby","aria-describedby"],Vg),[a,l]=El({value:()=>i.value,defaultValue:()=>i.defaultValue,onChange:g=>i.onChange?.(g)}),{formControlContext:c}=qg(o);nh(()=>t,()=>l(i.defaultValue??""));const u=()=>c.getAriaLabelledBy(he(o.id),s["aria-label"],i["aria-labelledby"]),d=()=>c.getAriaDescribedBy(i["aria-describedby"]),h=g=>g===e.defaultValue,f=g=>g===a(),p={ariaDescribedBy:d,isDefaultValue:h,isSelectedValue:f,setSelectedValue:g=>{if(!(c.isReadOnly()||c.isDisabled())&&(l(g),t))for(const v of t.querySelectorAll("[type='radio']")){const y=v;y.checked=f(y.value)}}};return b(eh.Provider,{value:c,get children(){return b(oz.Provider,{value:p,get children(){return b(Ve,ne({as:"div",ref(g){var v=st(y=>t=y,i.ref);typeof v=="function"&&v(g)},role:"radiogroup",get id(){return he(o.id)},get"aria-invalid"(){return c.validationState()==="invalid"||void 0},get"aria-required"(){return c.isRequired()||void 0},get"aria-disabled"(){return c.isDisabled()||void 0},get"aria-readonly"(){return c.isReadOnly()||void 0},get"aria-orientation"(){return i.orientation},get"aria-labelledby"(){return u()},get"aria-describedby"(){return d()}},()=>c.dataset(),s))}})}})}var Xg=Object.assign(cz,{Description:Aa,ErrorMessage:La,Item:az,ItemControl:Dk,ItemDescription:Mk,ItemIndicator:Ok,ItemInput:lz,ItemLabel:Pk,Label:Rk}),uz=pt();function dz(){const e=ut(uz);if(e===void 0)throw new Error("[kobalte]: `useSegmentedControlContext` must be used within a `SegmentedControl` component");return e}function M5e(e){const t=dz(),[n,r]=se(e,["style"]),[i,o]=de(),[s,a]=de(!1),l=()=>{const u=t.selectedItem();if(!u){o(void 0);return}o({width:`${u.offsetWidth}px`,height:`${u.offsetHeight}px`,transform:c(u),"transition-duration":s()?"0ms":void 0})},c=u=>{const d=getComputedStyle(u.parentElement),h=u.offsetLeft-Number.parseFloat(d.paddingLeft),f=u.offsetTop-Number.parseFloat(d.paddingTop);return`translate(${h}px, ${f}px)`};return re(gt(t.selectedItem,()=>{a(!i()),l(),a(!1)})),Ik(t.root,()=>{Xe(()=>{a(!0),l(),a(!1)})}),b(Ve,ne({as:"div",role:"presentation",get style(){return gr(i(),n.style)},get"data-resizing"(){return s()},get"data-orientation"(){return t.orientation()}},r))}var O5e=e=>{const t=Yg(),n=dz(),[r,i]=se(e,["ref"]),[o,s]=de();return re(()=>{const a=o();a&&t.isSelectedValue(e.value)&&n.setSelectedItem(a)}),b(Xg.Item,ne({ref(a){var l=st(s,r.ref);typeof l=="function"&&l(a)}},i))},P5e=e=>{const t=_u(),[n,r]=se(e,["ref"]),[i,o]=de();return nh(i,()=>{requestAnimationFrame(()=>{t.isDefault()&&t.select()})}),b(Xg.ItemInput,ne({ref(s){var a=st(o,n.ref);typeof a=="function"&&a(s)}},r))},R5e=e=>{const t=ne({defaultValue:e.value,orientation:"horizontal"},e),[n,r]=se(t,["ref"]),[i,o]=de(),[s,a]=de(),l={value:()=>r.value,defaultValue:()=>r.defaultValue,orientation:()=>r.orientation,root:i,selectedItem:s,setSelectedItem:a};return re(()=>{l.value()||a(void 0)}),b(uz.Provider,{value:l,get children(){return b(Xg,ne({ref(c){var u=st(o,n.ref);typeof u=="function"&&u(c)}},r))}})},rd=Object.assign(R5e,{Description:Aa,ErrorMessage:La,Indicator:M5e,Item:O5e,ItemControl:Dk,ItemDescription:Mk,ItemIndicator:Ok,ItemInput:P5e,ItemLabel:Pk,Label:Rk}),N5e=ee("<div role=presentation data-slot=radio-group-wrapper><div role=presentation data-slot=radio-group-items>"),z5e=ee("<span data-slot=radio-group-item-control>");function p9(e){const[t,n]=se(e,["class","classList","options","current","defaultValue","value","label","onSelect","size","fill","pad"]),r=s=>t.value?t.value(s):String(s),i=s=>t.label?t.label(s):String(s),o=s=>t.options.find(a=>r(a)===s);return b(rd,ne(n,{"data-component":"radio-group",get"data-size"(){return t.size??"medium"},get"data-fill"(){return t.fill?"":void 0},get"data-pad"(){return t.pad??"normal"},get classList(){return{...t.classList,[t.class??""]:!!t.class}},get value(){return je(()=>!!t.current)()?r(t.current):void 0},get defaultValue(){return je(()=>!!t.defaultValue)()?r(t.defaultValue):void 0},onChange:s=>t.onSelect?.(o(s)),get children(){var s=N5e(),a=s.firstChild;return j(s,b(rd.Indicator,{"data-slot":"radio-group-indicator"}),a),j(a,b(Ut,{get each(){return t.options},children:l=>b(rd.Item,{get value(){return r(l)},"data-slot":"radio-group-item",get"data-value"(){return r(l)},get children(){return[b(rd.ItemInput,{"data-slot":"radio-group-item-input"}),b(rd.ItemLabel,{"data-slot":"radio-group-item-label",get children(){var c=z5e();return j(c,()=>i(l)),c}})]}})})),s}}))}var j5e={};vr(j5e,{Description:()=>Aa,ErrorMessage:()=>La,Input:()=>hz,Label:()=>th,Root:()=>pz,TextArea:()=>gz,TextField:()=>qa,useTextFieldContext:()=>Nk});var fz=pt();function Nk(){const e=ut(fz);if(e===void 0)throw new Error("[kobalte]: `useTextFieldContext` must be used within a `TextField` component");return e}function hz(e){return b(mz,ne({type:"text"},e))}function mz(e){const t=Si(),n=Nk(),r=Ne({id:n.generateId("input")},e),[i,o,s]=se(r,["onInput"],_k),{fieldProps:a}=Ck(o);return b(Ve,ne({as:"input",get id(){return a.id()},get name(){return t.name()},get value(){return n.value()},get required(){return t.isRequired()},get disabled(){return t.isDisabled()},get readonly(){return t.isReadOnly()},get"aria-label"(){return a.ariaLabel()},get"aria-labelledby"(){return a.ariaLabelledBy()},get"aria-describedby"(){return a.ariaDescribedBy()},get"aria-invalid"(){return t.validationState()==="invalid"||void 0},get"aria-required"(){return t.isRequired()||void 0},get"aria-disabled"(){return t.isDisabled()||void 0},get"aria-readonly"(){return t.isReadOnly()||void 0},get onInput(){return wt([i.onInput,n.onInput])}},()=>t.dataset(),s))}function pz(e){let t;const n=`textfield-${an()}`,r=Ne({id:n},e),[i,o,s]=se(r,["ref","value","defaultValue","onChange"],Vg),a=i.value,[l,c]=El({value:()=>a===void 0?void 0:i.value??"",defaultValue:()=>i.defaultValue,onChange:f=>i.onChange?.(f)}),{formControlContext:u}=qg(o);nh(()=>t,()=>c(i.defaultValue??""));const d=f=>{if(u.isReadOnly()||u.isDisabled())return;const m=f.target;c(m.value),m.value=l()??""},h={value:l,generateId:$r(()=>he(o.id)),onInput:d};return b(eh.Provider,{value:u,get children(){return b(fz.Provider,{value:h,get children(){return b(Ve,ne({as:"div",ref(f){var m=st(p=>t=p,i.ref);typeof m=="function"&&m(f)},role:"group",get id(){return he(o.id)}},()=>u.dataset(),s))}})}})}function gz(e){let t;const n=Nk(),r=Ne({id:n.generateId("textarea")},e),[i,o]=se(r,["ref","autoResize","submitOnEnter","onKeyPress"]);re(gt([()=>t,()=>i.autoResize,()=>n.value()],([a,l])=>{!a||!l||F5e(a)}));const s=a=>{t&&i.submitOnEnter&&a.key==="Enter"&&!a.shiftKey&&t.form&&(t.form.requestSubmit(),a.preventDefault())};return b(mz,ne({as:"textarea",get"aria-multiline"(){return i.submitOnEnter?"false":void 0},get onKeyPress(){return wt([i.onKeyPress,s])},ref(a){var l=st(c=>t=c,i.ref);typeof l=="function"&&l(a)}},o))}function F5e(e){const t=e.style.alignSelf,n=e.style.overflow;"MozAppearance"in e.style||(e.style.overflow="hidden"),e.style.alignSelf="start",e.style.height="auto",e.style.height=`${e.scrollHeight+(e.offsetHeight-e.clientHeight)}px`,e.style.overflow=n,e.style.alignSelf=t}var qa=Object.assign(pz,{Description:Aa,ErrorMessage:La,Input:hz,Label:th,TextArea:gz}),U5e=ee("<div data-slot=input-wrapper>");function na(e){const t=Qo(),[n,r]=se(e,["name","defaultValue","value","onChange","onKeyDown","validationState","required","disabled","readOnly","class","label","hideLabel","description","error","variant","copyable","copyKind","multiline"]),[i,o]=de(!1),s=()=>i()?t.t("ui.textField.copied"):n.copyKind==="link"?t.t("ui.textField.copyLink"):t.t("ui.textField.copyToClipboard"),a=()=>i()?"check":n.copyKind==="link"?"link":"copy";async function l(){const u=n.value??n.defaultValue??"";await Ww(u)&&($t({variant:"success",icon:"circle-check",title:t.t("ui.message.copied"),description:n.copyKind==="link"?t.t("ui.message.copiedLink"):t.t("ui.message.copiedText")}),o(!0),setTimeout(()=>o(!1),2e3))}function c(){n.copyable&&l()}return b(qa,{"data-component":"input",get"data-variant"(){return n.variant||"normal"},get name(){return n.name},get defaultValue(){return n.defaultValue},get value(){return n.value},get onChange(){return n.onChange},get onKeyDown(){return n.onKeyDown},onClick:c,get required(){return n.required},get disabled(){return n.disabled},get readOnly(){return n.readOnly},get validationState(){return n.validationState},get children(){return[b(ce,{get when(){return n.label},get children(){return b(qa.Label,{"data-slot":"input-label",get classList(){return{"sr-only":n.hideLabel}},get children(){return n.label}})}}),(()=>{var u=U5e();return j(u,b(ce,{get when(){return n.multiline},get fallback(){return b(qa.Input,ne(r,{"data-slot":"input-input",get class(){return n.class}}))},get children(){return b(qa.TextArea,ne(r,{autoResize:!0,"data-slot":"input-input",get class(){return n.class}}))}}),null),j(u,b(ce,{get when(){return n.copyable},get children(){return b(bn,{get value(){return s()},placement:"top",gutter:4,get forceOpen(){return i()},skipDelayDuration:0,get children(){return b(Jr,{type:"button",get icon(){return a()},variant:"ghost",onClick:l,tabIndex:-1,"data-slot":"input-copy-button",get"aria-label"(){return s()}})}})}}),null),u})(),b(ce,{get when(){return n.description},get children(){return b(qa.Description,{"data-slot":"input-description",get children(){return n.description}})}}),b(qa.ErrorMessage,{"data-slot":"input-error",get children(){return n.error}})]}})}function H5e(e,t){const n=new Date(e),i=new Date().getTime()-n.getTime(),o=Math.floor(i/1e3),s=Math.floor(o/60),a=Math.floor(s/60),l=Math.floor(a/24);return o<60?t("common.time.justNow"):s<60?t("common.time.minutesAgo.short",{count:s}):a<24?t("common.time.hoursAgo.short",{count:a}):t("common.time.daysAgo.short",{count:l})}var B5e=ee('<div class="flex h-full items-center justify-center text-text-weak">'),V5e=ee('<div class="flex h-full items-center justify-center px-8 text-center text-14-regular text-text-weak">'),q5e=ee('<div class="flex flex-col gap-1">'),W5e=ee('<div class="flex h-full min-h-0 flex-col gap-3 px-4 pb-4"><div class="flex shrink-0 flex-col gap-2"><div class="flex items-center gap-2"><div class="min-w-0 flex-1 [&amp;_[data-slot=input-wrapper]:focus-within]:!border-border-weak-base [&amp;_[data-slot=input-wrapper]:focus-within]:!shadow-none"></div></div><div class="flex flex-wrap items-center gap-2"></div></div><div class="min-h-0 flex-1 overflow-y-auto no-scrollbar">'),G5e=ee('<button type=button class="group flex w-full min-w-0 items-center gap-3 rounded-md px-2 py-2 text-left hover:bg-surface-raised-base-hover focus:outline-none focus:bg-surface-raised-base-hover"><div class="flex size-8 shrink-0 items-center justify-center rounded-md bg-surface-base text-icon-weak"></div><div class="min-w-0 flex-1"><div class="truncate text-14-medium text-text-strong"></div><div class="flex min-w-0 items-center gap-2 text-12-regular text-text-weak"><span class=truncate></span><span class=shrink-0>-</span><span class=shrink-0></span><span class=shrink-0>-</span><span class=shrink-0></span></div></div><div class="flex shrink-0 items-center gap-1 text-12-medium text-text-weak transition-colors group-hover:text-text-base"><span>');const vz=1440*60*1e3,K5e=10080*60*1e3,Z5e=30*vz,Y5e=e=>[e.session.title,e.session.id,e.workspace.label,e.workspace.directory].join(" ").toLowerCase(),Nc=e=>e.time.archived??0,yz=e=>Nc(e)+Z5e,X5e=e=>Math.max(1,Math.ceil((yz(e)-Date.now())/vz)),J5e=(e,t)=>{const n=Nc(t.session)-Nc(e.session);return n!==0?n:t.session.id.localeCompare(e.session.id)};function Q5e(e){const t=Gi(),n=ko(),r=At(),i=xo(),o={token:0},[s,a]=Je({search:"",scope:"all",age:"all",loading:!0,error:!1,sessions:[]}),l=F(()=>[{value:"all",label:r.t("archiveSessions.filter.scope.all")},e.workspaces.some(f=>f.kind==="local")?{value:"local",label:r.t("workspace.type.local")}:void 0,e.workspaces.some(f=>f.kind==="sandbox")?{value:"sandbox",label:r.t("workspace.type.sandbox")}:void 0].filter(f=>!!f)),c=F(()=>[{value:"all",label:r.t("archiveSessions.filter.age.all")},{value:"recent",label:r.t("archiveSessions.filter.age.recent")},{value:"older",label:r.t("archiveSessions.filter.age.older")}]),u=()=>{o.token+=1;const f=o.token;a({loading:!0,error:!1}),Promise.all(e.workspaces.map(m=>t.client.session.list({directory:m.directory,roots:!0,archived:!0,limit:500}).then(p=>({failed:!1,items:(p.data??[]).filter(g=>!!g?.id&&!!g.time?.archived).map(g=>({session:g,workspace:m}))})).catch(()=>({failed:!0,items:[]})))).then(m=>{if(o.token!==f)return;const p=Date.now();a({loading:!1,error:m.some(g=>g.failed),sessions:m.flatMap(g=>g.items).filter(g=>yz(g.session)>p).sort(J5e)})})},d=F(()=>{const f=s.search.trim().toLowerCase(),m=Date.now()-K5e;return s.sessions.filter(p=>s.scope==="all"||p.workspace.kind===s.scope).filter(p=>s.age==="all"?!0:s.age==="recent"?Nc(p.session)>=m:Nc(p.session)<m).filter(p=>!f||Y5e(p).includes(f))}),h=f=>{i(`/${dt(f.workspace.directory)}/session/${f.session.id}`),n.close()};return Kt(u),b(Yc,{get title(){return r.t("archiveSessions.title")},size:"large",get children(){var f=W5e(),m=f.firstChild,p=m.firstChild,g=p.firstChild,v=p.nextSibling,y=m.nextSibling;return j(g,b(na,{get value(){return s.search},onChange:w=>a("search",w),get placeholder(){return r.t("archiveSessions.search.placeholder")},get label(){return r.t("archiveSessions.search.label")},hideLabel:!0,autofocus:!0})),j(p,b(bn,{get value(){return r.t("common.refresh")},placement:"top",get children(){return b(Jr,{icon:"reset",variant:"ghost",class:"size-8 rounded-md shrink-0",get"aria-label"(){return r.t("common.refresh")},get disabled(){return s.loading},onClick:u})}}),null),j(v,b(ce,{get when(){return l().length>1},get children(){return b(p9,{size:"small",get options(){return l()},get current(){return l().find(w=>w.value===s.scope)},value:w=>w.value,label:w=>w.label,onSelect:w=>{w&&a("scope",w.value)}})}}),null),j(v,b(p9,{size:"small",get options(){return c()},get current(){return c().find(w=>w.value===s.age)},value:w=>w.value,label:w=>w.label,onSelect:w=>{w&&a("age",w.value)}}),null),j(y,b(Il,{get children(){return[b(Cn,{get when(){return s.loading},get children(){var w=B5e();return j(w,b(Kg,{class:"size-4"})),w}}),b(Cn,{get when(){return d().length===0},get children(){var w=V5e();return j(w,(()=>{var k=je(()=>!!s.error);return()=>k()?r.t("archiveSessions.error"):r.t("archiveSessions.empty")})()),w}}),b(Cn,{when:!0,get children(){var w=q5e();return j(w,b(Ut,{get each(){return d()},children:k=>{const x=F(()=>FN(k.session.title));return(()=>{var C=G5e(),S=C.firstChild,$=S.nextSibling,O=$.firstChild,D=O.nextSibling,M=D.firstChild,I=M.nextSibling,L=I.nextSibling,A=L.nextSibling,T=A.nextSibling,N=$.nextSibling,W=N.firstChild;return C.$$click=()=>h(k),j(S,b(Ht,{name:"archive",size:"small"})),j(O,x),j(M,()=>k.workspace.label),j(L,()=>r.t("archiveSessions.archivedAt",{time:H5e(new Date(Nc(k.session)).toISOString(),r.t)})),j(T,()=>r.t("archiveSessions.deletesIn",{count:X5e(k.session)})),j(N,b(Ht,{name:"eye",size:"small"}),W),j(W,()=>r.t("common.open")),C})()}})),w}})]}})),f}})}or(["click"]);var eke=ee('<div class="flex flex-col gap-4 pl-6 pr-2.5 pb-3"><div class="flex flex-col gap-1"><span class="text-14-regular text-text-strong"></span><span class="text-12-regular text-text-weak"></span></div><div class="flex justify-end gap-2">'),tke=ee('<div class="flex flex-col gap-4 pl-6 pr-2.5 pb-3"><div class="flex flex-col gap-1"><span class="text-14-regular text-text-strong"></span><span class="text-12-regular text-text-weak"> <!> </span></div><div class="flex justify-end gap-2">'),g9=ee("<div>"),nke=ee('<div class="flex-1 min-h-0 -mt-4 flex items-center justify-center px-6 pb-64 text-center"><div class="mt-8 flex max-w-60 flex-col items-center gap-6 text-center"><div class="flex flex-col gap-3"><div class="text-14-medium text-text-strong"></div><div class="text-14-regular text-text-base"style=line-height:var(--line-height-normal)>'),rke=ee('<div class="flex-1 min-h-0 flex flex-col gap-2 px-1 pt-4"><div class="px-3 text-12-medium text-text-base uppercase tracking-wider"></div><div class="flex flex-col gap-1 overflow-y-auto no-scrollbar"></div><div class="px-1 pt-2">'),ike=ee('<button type=button class="flex items-center gap-2 px-3 py-2 rounded-md hover:bg-surface-base-hover text-left"><span class="text-14-medium text-text-strong truncate">'),oke=ee('<span class="text-12-regular text-text-base truncate select-text">'),ske=ee('<div class="shrink-0 pl-1 py-1"><div class="group/project flex items-start justify-between gap-2 py-2 pl-2 pr-0"><div class="flex flex-col min-w-0">'),v9=ee('<div class="shrink-0 py-4">'),ake=ee('<div class="size-full flex flex-col py-2 gap-4 overflow-y-auto no-scrollbar [overflow-anchor:none]">'),lke=ee('<div class="relative flex-1 min-h-0">'),cke=ee('<div class="flex-1 min-h-0 flex flex-col">'),uke=ee('<div class="flex-1 min-h-0">'),dke=ee('<div class="hidden xl:block absolute inset-y-0 z-30 w-0 overflow-visible">'),fke=ee('<div class="relative bg-background-base flex-1 min-h-0 min-w-0 flex flex-col select-none [&amp;_input]:select-text [&amp;_textarea]:select-text [&amp;_[contenteditable]]:select-text"data-component=layout-shell><div class="flex-1 min-h-0 min-w-0 flex"><div class="flex-1 min-h-0 relative"><div class="size-full relative overflow-x-hidden"><nav data-component=sidebar-nav-wide><div class="@container w-full h-full contain-strict"></div></nav><div class="hidden xl:block pointer-events-none absolute top-0 right-0 z-0 border-t border-border-weaker-base"style=left:4rem></div><div class=xl:hidden><div></div><nav data-component=sidebar-nav-mobile></nav></div><div><main>'),hy=ee("<div class=size-full>"),hke=ee('<div class="size-full flex flex-col items-center justify-center gap-4 p-6 text-center"><div class="text-14-medium text-text-strong"></div><div class="text-12-regular text-text-weak max-w-md break-words">');function mke(e){const t=sr(),n=t.scope,[r,i,,o]=ir(In.server(n,"layout.page",["layout.page.v1"]),Je({lastProjectSession:{},activeProject:void 0,activeWorkspace:void 0,workspaceOrder:{},workspaceName:{},workspaceBranchName:{},workspaceExpanded:{},sessionExpanded:{}})),s=F(()=>o());let a,l=0,c=!1;const u=ri(),d=Gi(),h=Jn(),f=zl(),m=F(()=>f.ready()),p=qi(),g=hu(),v=Xf(),y=fk(),w=xo();_be(w),Yf();const k=ko(),x=M$(),C=Ane(),S=At(),$=_r(u.dir),O=So();re(()=>{const R=u.dir;R&&_r(R)===void 0&&w("/",{replace:!0})});const D=F(()=>{const R=u.dir;if(!R)return{slug:R,dir:""};const U=_r(R);if(!U)return{slug:R,dir:""};const Q=h.peek(U,{bootstrap:!1});return{slug:R,store:Q,dir:Q[0].path.directory||U}}),M=F(()=>{const R=O.pathname.match(/^\/cron\/worktree\/([^/?#]+)\/session(?:\/([^/?#]+))?/);if(R){const le=_r(R[1]);return le?{cron:!0,dir:le,sessionID:R[2]?decodeURIComponent(R[2]):void 0,slug:R[1]}:void 0}const U=O.pathname.match(/^\/([^/]+)\/session(?:\/([^/?#]+))?/),Q=_r(U?.[1]);if(!(!U||!Q))return{cron:!1,dir:Q,sessionID:U[2]?decodeURIComponent(U[2]):void 0,slug:U[1]}}),I=["system","light","dark"],L={system:"theme.scheme.system",light:"theme.scheme.light",dark:"theme.scheme.dark"},A=R=>S.t(L[R]),T=F(()=>D().dir||M()?.dir||""),N=R=>R==="/cron"||R.startsWith("/cron/"),W=R=>R==="/"||R==="/notifications"||R==="/modes"||R==="/models"||R==="/mcp"||R==="/plugins"||R==="/skills",K=F(()=>ip(O.pathname)),V=F(()=>W(O.pathname)),q=F(()=>N(O.pathname)),B=F(()=>new URLSearchParams(O.search).get("projectID")??void 0),Y=F(()=>!!M()?.dir&&!!M()?.sessionID&&(M()?.cron||new URLSearchParams(O.search).get("sidebar")==="cron")),J=F(()=>{if(Y())return!0;const R=T(),U=u.id??M()?.sessionID;if(!R||!U)return!1;const[Q]=h.child(R,{bootstrap:!1}),le=Q.session.find(ve=>ve.id===U);return Tk(le)}),ge=F(()=>q()||J());re(gt(()=>M()?.dir,R=>{R&&h.project.loadSessions(R)},{defer:!0})),re(gt(()=>[J(),M()?.cron,M()?.dir,M()?.sessionID],([R,U,Q,le])=>{if(!R||U||!Q||!le)return;const[ve]=h.child(Q,{bootstrap:!1}),me=new URLSearchParams({sidebar:"cron"});ve.project&&me.set("projectID",ve.project),w(`/cron/worktree/${dt(Q)}/session/${le}?${me.toString()}`,{replace:!0})}));const ae=F(()=>{const R=f.projects.list().filter(_e=>_e.id!=="global"),U=(h.data.project??[]).filter(_e=>_e.id!=="global"),Q=_e=>{if(_e)return R.find(Pe=>Pe.id===_e.id||Be(Pe.worktree)===Be(_e.worktree))},le=(_e,Pe)=>ba(_e.worktree,Pe)||!!_e.sandboxes?.some(Fe=>ba(Fe,Pe)),ve=O.pathname.match(/^\/cron\/worktree\/([^/?#]+)/);if(ve){const _e=_r(ve[1]);if(_e){const Pe=R.find(lt=>lt.id===B())??Q(U.find(lt=>lt.id===B()));if(Pe&&le(Pe,_e))return Pe;const Fe=R.find(lt=>Be(lt.worktree)===Be(_e))??Q(U.find(lt=>Be(lt.worktree)===Be(_e)));if(Fe)return Fe}}const me=O.pathname.match(/^\/cron\/([^/?#]+)/);if(me){const _e=B()??decodeURIComponent(me[1]),Pe=R.find(Fe=>Fe.id===_e)??Q(U.find(Fe=>Fe.id===_e));if(Pe)return Pe}const Ae=T();if(Ae){const _e=R.find(lt=>lt.worktree===Ae)??Q(U.find(lt=>lt.worktree===Ae));if(_e)return _e;const[Pe]=h.child(Ae,{bootstrap:!1}),Fe=Pe.project;if(Fe){const lt=R.find(tt=>tt.id===Fe)??Q(U.find(tt=>tt.id===Fe));if(lt)return lt}}}),Te=F(()=>i5e(O.pathname)),pe=F(()=>{if(m()){if(K())return"settings";if(V())return"global";if(ge()){const R=ae();return`cron:${R?.id??R?.worktree??M()?.slug??u.dir??"unknown"}`}if(u.dir)return`project:${u.dir}`}}),[ue,Le]=Je({autoselect:!$&&!W(O.pathname)&&!ip(O.pathname)&&!N(O.pathname),busyWorkspaces:{},hoverProject:void 0,scrollSessionKey:void 0,nav:void 0,sortNow:Date.now(),sizing:!1}),$e=swe(),ht=(R,U)=>{const Q=Be(R);if(U){Le("busyWorkspaces",Q,!0);return}Le("busyWorkspaces",Ge(le=>{delete le[Q]}))},Bt=R=>!!ue.busyWorkspaces[Be(R)],Mt={current:void 0},zt=()=>ue.sortNow;let En,ar;const _i=()=>typeof document=="object"&&document.visibilityState==="hidden",lr=()=>{_i()||Le("sortNow",Date.now())},Ar=()=>{ar===void 0&&(ar=setInterval(lr,6e4))},nn=()=>{ar!==void 0&&(clearInterval(ar),ar=void 0)},Io=setTimeout(()=>{lr(),_i()||Ar()},6e4-Date.now()%6e4),cr=Sbe({enabled:()=>!1,active:()=>ue.hoverProject,el:()=>ue.nav?.querySelector("[data-component='sidebar-rail']")??ue.nav,onActivate:()=>{}});fe(()=>{c=!0,l+=1,Mt.current!==void 0&&clearTimeout(Mt.current),clearTimeout(Io),ar&&clearInterval(ar),En!==void 0&&clearTimeout(En),cr.reset()}),Kt(()=>{const R=()=>Le("sizing",!1),U=()=>Da(),Q=()=>{if(document.visibilityState!=="hidden"){Ar();return}nn(),Da()};Ln(window,"pointerup",R),Ln(window,"pointercancel",R),Ln(window,"blur",R),Ln(window,"blur",U),Ln(document,"visibilitychange",Q)});const yr=F(()=>!f.sidebar.opened()&&ue.hoverProject!==void 0),Us=F(()=>f.sidebar.opened()||yr()),ii=R=>{Le("hoverProject",R),cr.reset()},ss=()=>queueMicrotask(()=>ii(void 0));re(gt(pe,(R,U)=>{if(R&&R!==U){if(ii(void 0),R==="global"){f.sidebar.close();return}f.sidebar.open()}})),re(gt(()=>[m(),O.pathname,O.search,ge()],([R,,,U])=>{!R||!U||(ii(void 0),f.sidebar.open())}));const qr=()=>{Mt.current!==void 0&&(clearTimeout(Mt.current),Mt.current=void 0)},Da=()=>{qr(),ii(void 0)},oh=()=>{f.sidebar.opened()||ue.hoverProject!==void 0&&(qr(),Mt.current=window.setTimeout(()=>{Mt.current=void 0,ii(void 0)},300))},sh=F(()=>{const R=ue.hoverProject;if(R)return f.projects.list().find(U=>U.worktree===R)});re(()=>{f.sidebar.opened()&&ii(void 0)}),re(()=>{if(!ue.autoselect)return;const R=u.dir;!R||!_r(R)||Le("autoselect",!1)});const Cu=$e.editorOpen,ah=$e.openEditor,Vl=$e.closeEditor,ql=$e.setEditor,oi=$e.InlineEditor,as=()=>{f.sidebar.opened()||Da()},ur=R=>{as(),w(R),f.mobileSidebar.hide()};function Iu(R=1){const U=C.colorScheme(),Q=I.indexOf(U),le=Q===-1?0:(Q+R+I.length)%I.length,ve=I[le];C.setColorScheme(ve),$t({title:S.t("toast.scheme.title"),description:A(ve)})}function lh(R){R!==S.locale()&&(S.setLocale(R),$t({title:S.t("toast.language.title"),description:S.t("toast.language.description",{language:S.label(R)})}))}function Tu(R=1){const U=S.locales,Q=U.indexOf(S.locale()),le=Q===-1?0:(Q+R+U.length)%U.length,ve=U[le];ve&&lh(ve)}Kt(()=>{const R=new Map,U=new Map,Q=5e3,le=me=>{const Ae=R.get(me);Ae!==void 0&&(nl.dismiss(Ae),R.delete(me),U.delete(me))},ve=d.event.listen(me=>{if(me.details?.type==="worktree.ready"){ht(me.name,!1),g0.ready(me.name,n.key);return}if(me.details?.type==="worktree.failed"){ht(me.name,!1),g0.failed(me.name,me.details.properties?.message??S.t("common.requestFailed"),n.key);return}if(me.details?.type==="question.replied"||me.details?.type==="question.rejected"||me.details?.type==="permission.replied"){const c1=me.details.properties,ij=`${me.name}:${c1.sessionID}`;le(ij);return}if(me.details?.type!=="permission.asked"&&me.details?.type!=="question.asked")return;const Ae=me.details.type==="permission.asked"?S.t("notification.permission.title"):S.t("notification.question.title"),_e=me.details.type==="permission.asked"?"checklist":"bubble-5",Pe=me.name,Fe=me.details.properties;if(me.details.type==="permission.asked"&&y.autoResponds(me.details.properties,Pe))return;const[lt]=h.child(Pe,{bootstrap:!1}),tt=lt.session.find(c1=>c1.id===Fe.sessionID),We=`${Pe}:${Fe.sessionID}`,_t=tt?.title??S.t("command.session.new"),Xt=tr(Pe),Ke=me.details.type==="permission.asked"?S.t("notification.permission.description",{sessionTitle:_t,projectName:Xt}):S.t("notification.question.description",{sessionTitle:_t,projectName:Xt}),Et=`/${dt(Pe)}/session/${Fe.sessionID}`,gn=Date.now(),Ot=U.get(We)??0;if(gn-Ot<Q)return;U.set(We,gn),me.details.type==="permission.asked"&&(g.sounds.permissionsEnabled()&&w2(g.sounds.permissions()),g.notifications.permissions()&&p.notify(Ae,Ke,Et)),me.details.type==="question.asked"&&g.notifications.agent()&&p.notify(Ae,Ke,Et);const On=u.id,Pn=Be(Pe)===Be(T()),Pu=Pn&&Fe.sessionID===On,l1=Pn&&tt?.parentID===On,nj=Cbe({desktop:p.desktop,enabled:me.details.type==="permission.asked"?g.notifications.permissions():g.notifications.agent()});if(!Ibe({desktopNativeNotificationEnabled:nj,currentSessionTarget:Pu,childSessionTarget:l1})){le(We);return}le(We);const rj=$t({persistent:!0,icon:_e,title:Ae,description:Ke,actions:[{label:S.t("notification.action.goToSession"),onClick:()=>w(Et)},{label:S.t("common.dismiss"),onClick:"dismiss"}]});R.set(We,rj)});fe(ve),re(()=>{const me=u.id;if(!T()||!me)return;const Ae=`${T()}:${me}`;le(Ae);const[_e]=h.child(T(),{bootstrap:!1}),Pe=_e.session.filter(Fe=>Fe.parentID===me);for(const Fe of Pe)le(`${T()}:${Fe.id}`)})});function r1(R,U){if(!a||ue.scrollSessionKey===U)return;const Q=a.querySelector(`[data-session-id="${R}"]`);if(!Q)return;const le=a.getBoundingClientRect(),ve=Q.getBoundingClientRect();if(ve.top>=le.top&&ve.bottom<=le.bottom){Le("scrollSessionKey",U);return}Le("scrollSessionKey",U),Q.scrollIntoView({block:"nearest",behavior:"smooth"})}const cn=F(()=>{if(ge())return ae();const R=T();if(!R)return;const U=Be(R),Q=f.projects.list(),le=Q.find(Fe=>Fe.sandboxes?.some(lt=>Be(lt)===U));if(le)return le;const ve=Q.find(Fe=>Be(Fe.worktree)===U);if(ve)return ve;const[me]=h.child(R,{bootstrap:!1}),Ae=me.project;if(!Ae)return;const Pe=h.data.project.find(Fe=>Fe.id===Ae)?.worktree;if(Pe)return Q.find(Fe=>Fe.worktree===Pe)});re(gt(()=>[s(),m(),V(),K(),ge(),T(),u.dir],([R,U,Q,le,ve,me,Ae])=>{!R||!U||Q||le||ve||!me||!Ae||f.projects.open(me)}));const[uh]=Xo(async()=>{if(await o.promise,await f.ready.promise,!ot(()=>ue.autoselect))return;const R=f.projects.list(),U=t.projects.last();if(R.length===0){if(!U)return;await Pa(U,!0)}else{const Q=R.find(le=>le.worktree===U)??R[0];if(!Q)return;await Pa(Q.worktree,!0)}}),Eu=(R,U,Q)=>{const le=Be(R),ve=r.workspaceName[le]??r.workspaceName[R];if(ve)return ve;if(U&&Q)return r.workspaceBranchName[U]?.[Q]},wn=(R,U,Q,le)=>{const ve=Be(R);i("workspaceName",ve,U),Q&&le&&(r.workspaceBranchName[Q]||i("workspaceBranchName",Q,{}),i("workspaceBranchName",Q,le,U))},To=(R,U,Q)=>Eu(R,Q,U)??U??tr(R),dh=F(()=>{const R=cn();return!R||R.vcs!=="git"?!1:f.sidebar.workspaces(R.worktree)()}),Ma=F(()=>{const R=cn();return Z2e({project:R,currentDirectory:T(),workspacesEnabled:dh(),workspaces:Ou(R),expanded:r.workspaceExpanded})});re(()=>{if(!s()||!m())return;const R=f.projects.list();for(const[U,Q]of Object.entries(r.workspaceExpanded)){if(!Q)continue;const le=Be(U),ve=R.find(me=>Be(me.worktree)===le||me.sandboxes?.some(Ae=>Be(Ae)===le));ve&&(ve.vcs==="git"&&f.sidebar.workspaces(ve.worktree)()||i("workspaceExpanded",U,!1))}});const Eo=F(()=>{const R=zt(),U=Ma();if(U.length===0)return[];const Q=[];for(const le of U){const[ve]=h.child(le,{bootstrap:!0}),me=yf(ve,R,le);Q.push(...me)}return Q}),$u=200,fh=2,i1=10,si=4,Zi={value:0},Hs=new Map,Au=10,Bs=new Map,Wl=R=>{const U=Bs.get(R);if(U)return U;const Q=new Set;return Bs.set(R,Q),Q},Yi=(R,U)=>{const Q=Wl(R);return MO({seen:Q,keep:U,limit:Au,preserve:u.id&&Be(R)===Be(T())?[u.id]:void 0})};re(()=>{const R=new Set(Ma());for(const U of Bs.keys())R.has(U)||Bs.delete(U)}),re(()=>{D(),d.url,Zi.value+=1,Ohe(n.key),Hs.clear()}),re(()=>{const R=new Set(Ma());for(const[U,Q]of Hs)R.has(U)||(Q.pending.length=0,Q.pendingSet.clear(),Q.running===0&&Hs.delete(U))});const Lu=R=>{const U=Hs.get(R);if(U)return U;const Q={inflight:new Set,pending:[],pendingSet:new Set,running:0};return Hs.set(R,Q),Q},Gl=(R,U)=>{if(R.length===0)return U.slice().sort((le,ve)=>le.id<ve.id?-1:le.id>ve.id?1:0);const Q=new Map;for(const le of R)Q.set(le.id,le);for(const le of U)Q.set(le.id,le);return[...Q.values()].sort((le,ve)=>le.id<ve.id?-1:le.id>ve.id?1:0)};async function o1(R,U,Q){const[le,ve]=h.child(R,{bootstrap:!1});return Phe({scope:n.key,directory:R,sessionID:U,task:me=>Qt(()=>d.client.session.messages({directory:R,sessionID:U,limit:$u})).then(Ae=>{if(Zi.value!==Q||!Ox(n.key,R,U,me))return;const _e=(Ae.data??[]).filter(Ke=>!!Ke?.info?.id),Pe=_e.map(Ke=>Ke.info).filter(Ke=>!!Ke?.id),Fe=Gl([],Pe),lt=Yi(R,U),tt=Ae.response.headers.get("x-next-cursor")??void 0,We={limit:Fe.length,cursor:tt,complete:!tt,at:Date.now()};if(lt.length>0){CO(n.key,R,lt);for(const Ke of lt)h.todo.set(Ke,void 0)}const _t=le.message[U]??[],Xt=Gl(_t.filter(Ke=>!!Ke?.id),Fe);if(Ox(n.key,R,U,me))return Xe(()=>{lt.length>0&&ve(Ge(Ke=>{fg(Ke,lt)})),ve("message",U,St(Xt,{key:"id"})),Jb({scope:n.key,directory:R,sessionID:U,...We});for(const Ke of _e){const Et=le.part[Ke.info.id]??[],gn=Gl(Et.filter(Ot=>!!Ot?.id),Ke.parts.filter(Ot=>!!Ot?.id));ve("part",Ke.info.id,St(gn,{key:"id"}))}}),We}).catch(()=>{})})}const Du=R=>{const U=Lu(R);if(U.running>=fh)return;const Q=U.pending.shift();if(!Q)return;U.pendingSet.delete(Q),U.inflight.add(Q),U.running+=1;const le=Zi.value;o1(R,Q,le).finally(()=>{U.running-=1,U.inflight.delete(Q),Du(R)})},$o=(R,U="low")=>{const Q=R.directory;if(!Q)return;const[le]=h.child(Q,{bootstrap:!1});if(ot(()=>{const Pe=Xb(n.key,Q,R.id);return Dhe({message:le.message[R.id]!==void 0,info:Pe,chunk:$u})}))return;const me=Lu(Q);if(me.inflight.has(R.id))return;if(me.pendingSet.has(R.id)){if(U!=="high")return;const Pe=me.pending.indexOf(R.id);Pe>0&&(me.pending.splice(Pe,1),me.pending.unshift(R.id));return}const Ae=Wl(Q);if(!(!Ae.has(R.id)&&Ae.size>=Au&&U!=="high")){for(U==="high"&&me.pending.unshift(R.id),U!=="high"&&me.pending.push(R.id),me.pendingSet.add(R.id);me.pending.length>i1;){const Pe=me.pending.pop();Pe&&me.pendingSet.delete(Pe)}Du(Q)}},Kl=(R,U)=>{for(let Q=1;Q<=si;Q++){const le=R[U+Q];le&&$o(le,Q===1?"high":"low");const ve=R[U-Q];ve&&$o(ve,Q===1?"high":"low")}};re(()=>{const R=Eo();if(R.length===0)return;const U=u.id?R.findIndex(Q=>Q.id===u.id):0;if(U!==-1){if(!u.id){const Q=R[U];Q&&$o(Q,"high")}Kl(R,U)}});function Ze(R){const U=Eo();if(U.length===0)return;const Q=u.id?U.findIndex(me=>me.id===u.id):-1;let le;Q===-1?le=R>0?0:U.length-1:le=(Q+R+U.length)%U.length;const ve=U[le];ve&&($o(ve,"high"),Kl(U,le),Uk(ve))}function X(R){const U=f.projects.list();if(U.length===0)return;const Q=cn()?.worktree,le=T()?dr(T()):void 0,ve=Q??le,me=ve?U.findIndex(_e=>_e.worktree===ve):-1,Ae=me===-1?R>0?U[0]:U[U.length-1]:U[(me+R+U.length)%U.length];Ae&&(h.child(Ae.worktree),Pa(Ae.worktree))}function be(R){const U=Eo();if(U.length===0||!U.some(me=>v.session.unseenCount(me.id)>0))return;const le=u.id?U.findIndex(me=>me.id===u.id):-1,ve=le===-1?R>0?-1:0:le;for(let me=1;me<=U.length;me++){const Ae=R>0?(ve+me)%U.length:(ve-me+U.length)%U.length,_e=U[Ae];if(_e&&v.session.unseenCount(_e.id)!==0){$o(_e,"high"),Kl(U,Ae),Uk(_e);return}}}async function He(R){const[U,Q]=h.child(R.directory),le=U.session??[],ve=le.findIndex(Ae=>Ae.id===R.id),me=le[ve+1]??le[ve-1];await d.client.session.update({directory:R.directory,sessionID:R.id,time:{archived:Date.now()}}),Q(Ge(Ae=>{const _e=Jt.search(Ae.session,R.id,Pe=>Pe.id);_e.found&&Ae.session.splice(_e.index,1)})),R.id===u.id&&w(me?`/${u.dir}/session/${me.id}`:`/${u.dir}/session`)}x.register("layout",()=>{const R=[{id:"sidebar.toggle",title:S.t("command.sidebar.toggle"),category:S.t("command.category.view"),keybind:"mod+b",onSelect:()=>{O.pathname==="/"||O.pathname==="/notifications"||f.sidebar.toggle()}},{id:"project.open",title:S.t("command.project.open"),category:S.t("command.category.project"),keybind:"mod+o",onSelect:()=>Mu()},{id:"project.previous",title:S.t("command.project.previous"),category:S.t("command.category.project"),keybind:"mod+alt+arrowup",onSelect:()=>X(-1)},{id:"project.next",title:S.t("command.project.next"),category:S.t("command.category.project"),keybind:"mod+alt+arrowdown",onSelect:()=>X(1)},{id:"provider.connect",title:S.t("command.provider.connect"),category:S.t("command.category.provider"),onSelect:()=>Zt()},...p.desktop?[{id:"server.switch",title:S.t("command.server.switch"),category:S.t("command.category.server"),onSelect:()=>Vn()}]:[],{id:"settings.open",title:S.t("command.settings.open"),category:S.t("command.category.settings"),keybind:"mod+comma",onSelect:()=>pn()},{id:"quickSwitcher.open",title:S.t("command.quickSwitcher.open"),category:S.t("command.category.view"),keybind:"mod+j",onSelect:()=>br()},{id:"session.previous",title:S.t("command.session.previous"),category:S.t("command.category.session"),keybind:"alt+arrowup",onSelect:()=>Ze(-1)},{id:"session.next",title:S.t("command.session.next"),category:S.t("command.category.session"),keybind:"alt+arrowdown",onSelect:()=>Ze(1)},{id:"session.previous.unseen",title:S.t("command.session.previous.unseen"),category:S.t("command.category.session"),keybind:"shift+alt+arrowup",onSelect:()=>be(-1)},{id:"session.next.unseen",title:S.t("command.session.next.unseen"),category:S.t("command.category.session"),keybind:"shift+alt+arrowdown",onSelect:()=>be(1)},{id:"session.archive",title:S.t("command.session.archive"),category:S.t("command.category.session"),keybind:"mod+shift+backspace",disabled:!u.dir||!u.id,onSelect:()=>{const U=Eo().find(Q=>Q.id===u.id);U&&He(U)}},{id:"workspace.new",title:S.t("workspace.new"),category:S.t("command.category.workspace"),keybind:"mod+shift+w",disabled:!dh(),onSelect:()=>{const U=cn();if(U)return Gk(U)}},{id:"workspace.toggle",title:S.t("command.workspace.toggle"),description:S.t("command.workspace.toggle.description"),category:S.t("command.category.workspace"),slash:"workspace",disabled:!cn()||cn()?.vcs!=="git",onSelect:()=>{const U=cn();if(!U||U.vcs!=="git")return;const Q=f.sidebar.workspaces(U.worktree)();f.sidebar.toggleWorkspaces(U.worktree),$t({title:Q?S.t("toast.workspace.disabled.title"):S.t("toast.workspace.enabled.title"),description:Q?S.t("toast.workspace.disabled.description"):S.t("toast.workspace.enabled.description")})}}];R.push({id:"theme.scheme.cycle",title:S.t("command.theme.scheme.cycle"),category:S.t("command.category.theme"),keybind:"mod+shift+s",onSelect:()=>Iu(1)});for(const U of I)R.push({id:`theme.scheme.${U}`,title:S.t("command.theme.scheme.set",{scheme:A(U)}),category:S.t("command.category.theme"),onSelect:()=>C.commitPreview(),onHighlight:()=>(C.previewColorScheme(U),()=>C.cancelPreview())});R.push({id:"language.cycle",title:S.t("command.language.cycle"),category:S.t("command.category.language"),onSelect:()=>Tu(1)});for(const U of S.locales)R.push({id:`language.set.${U}`,title:S.t("command.language.set",{language:S.label(U)}),category:S.t("command.category.language"),onSelect:()=>lh(U)});return R});function Zt(){const R=++l;z(()=>import("./dialog-select-provider-C-JEreLC.js").then(U=>U.d),__vite__mapDeps([99,98,100,101])).then(U=>{c||l!==R||k.show(()=>b(U.DialogSelectProvider,{}))})}function Vn(){if(!p.desktop)return;if(p.serverManager){p.serverManager.show();return}const R=++l;z(()=>import("./dialog-select-server-DGTNSgKw.js"),__vite__mapDeps([97,98])).then(U=>{c||l!==R||k.show(()=>b(U.DialogSelectServer,{}))})}function pn(){ur("/settings")}function br(){const R=++l;z(()=>import("./dialog-quick-switcher-Bvm8ie5S.js"),[]).then(U=>{c||l!==R||k.show(()=>b(U.DialogQuickSwitcher,{get currentDirectory(){return T()},onChooseProject:()=>void Mu(),onSwitchServer:()=>Vn()}))})}function dr(R){const U=Be(R),Q=f.projects.list().find(_e=>Be(_e.worktree)===U||_e.sandboxes?.some(Pe=>Be(Pe)===U));if(Q)return Q.worktree;const le=Object.entries(r.workspaceOrder).find(([_e,Pe])=>Be(_e)===U||Pe.some(Fe=>Be(Fe)===U));if(le)return le[0];const[ve]=h.child(R,{bootstrap:!1}),me=ve.project;return me?h.data.project.find(_e=>_e.id===me)?.worktree??R:R}function Wr(R){return cn()?.worktree??dr(R)}function Zl(R,U,Q=Wr(R)){return i("lastProjectSession",Q,{directory:R,id:U,at:Date.now()}),Q}function $n(R){r.lastProjectSession[R]&&i("lastProjectSession",Ge(U=>{delete U[R]}))}function hh(R,U,Q=Wr(R)){return Zl(R,U,Q),v.session.markViewed(U),ot(()=>r.workspaceExpanded[R])===!1&&i("workspaceExpanded",R,!0),requestAnimationFrame(()=>r1(U,`${R}:${U}`)),Q}async function Oa(R){if(!R)return;const U=dr(R),Q=`/${dt(U)}/session`;t.projects.touch(U),ur(Q);const le=f.projects.list().find(tt=>tt.worktree===U);let ve=le?y0(U,[U,...le.sandboxes??[]],r.workspaceOrder[U]):[U];const me=tt=>tt?ve.some(We=>Be(We)===Be(tt)):!1,Ae=async tt=>{if(!tt||tt===U||me(tt))return me(tt);const We=await d.client.worktree.list({directory:U}).then(_t=>_t.data??[]).catch(()=>[]);return ve=y0(U,[U,...We],r.workspaceOrder[U]),me(tt)},_e=async tt=>{if(!me(tt.directory))return!1;const[We]=h.child(tt.directory,{bootstrap:!1});if(We.session.some(Xt=>Xt.id===tt.id))return i("lastProjectSession",U,{directory:tt.directory,id:tt.id,at:Date.now()}),ur(`/${dt(tt.directory)}/session/${tt.id}`),!0;const _t=await d.client.session.get({sessionID:tt.id}).then(Xt=>Xt.data).catch(()=>{});return!_t?.directory||!me(_t.directory)?!1:(i("lastProjectSession",U,{directory:_t.directory,id:_t.id,at:Date.now()}),ur(`/${dt(_t.directory)}/session/${_t.id}`),!0)},Pe=r.lastProjectSession[U];if(Pe?.id){if(await Ae(Pe.directory),await _e(Pe))return;$n(U)}const Fe=o9(ve.map(tt=>h.child(tt,{bootstrap:!1})[0]),Date.now());if(Fe&&await _e(Fe))return;const lt=o9(await Promise.all(ve.map(async tt=>({path:{directory:tt},session:await d.client.session.list({directory:tt}).then(We=>We.data??[]).catch(()=>[])}))),Date.now());lt&&await _e(lt)}function Uk(R){R&&ur(`/${dt(R.directory)}/session/${R.id}`)}function Pa(R,U=!0){if(f.projects.open(R),U)return Oa(R)}const Hk=R=>{if(t.isLocal()){for(const U of ewe(R))Pa(U);for(const U of twe(R)){Pa(U.directory,!1);const Q=dt(U.directory);U.prompt&&$be(n.key,Q,{prompt:U.prompt});const le=U.prompt?`/${Q}/session?prompt=${encodeURIComponent(U.prompt)}`:`/${Q}/session`;ur(le)}}};Kt(()=>{const R=U=>{const le=U.detail?.urls??[];le.length!==0&&Hk(le)};Hk(nwe(window)),Ln(window,X2e,R)});async function jz(R,U){const Q=Ek(R);if(U===Q)return;const le=U===tr(R.worktree)?"":U;if(R.id&&R.id!=="global"){await d.client.project.update({projectID:R.id,directory:R.worktree,name:le});return}h.project.meta(R.worktree,{name:le})}const Fz=(R,U,Q,le)=>{(Eu(R,Q,le)??le??tr(R))!==U&&wn(R,U,Q,le)};function Bk(R){const U=f.projects.list(),Q=Be(R),le=U.findIndex(Ae=>Be(Ae.worktree)===Q),ve=Be(cn()?.worktree??"")===Q;if(le===-1)return;const me=U[le+1];if(!ve){f.projects.close(R);return}if(!me){f.projects.close(R),w("/");return}ur(`/${dt(me.worktree)}/session`),f.projects.close(R),queueMicrotask(()=>{Oa(me.worktree)})}function Vk(R){if(f.sidebar.workspaces(R.worktree)()){f.sidebar.toggleWorkspaces(R.worktree);return}R.vcs==="git"&&f.sidebar.toggleWorkspaces(R.worktree)}const qk=R=>{const U=++l;z(()=>import("./dialog-edit-project-CX76A6rc.js"),[]).then(Q=>{c||l!==U||k.show(()=>b(Q.DialogEditProject,{project:R}))})};async function Mu(){function R(U){if(Array.isArray(U)){for(const Q of U)Pa(Q,!1);Oa(U[0])}else U&&Pa(U)}if(p.openDirectoryPickerDialog&&t.isLocal()){const U=await p.openDirectoryPickerDialog?.({title:S.t("command.project.open"),multiple:!0});R(U)}else{const U=++l;z(()=>import("./dialog-select-directory-BgyTQJRP.js"),__vite__mapDeps([102,103,98])).then(Q=>{c||l!==U||k.show(()=>b(Q.DialogSelectDirectory,{multiple:!0,onSelect:R}),()=>R(null))})}}const Uz=async(R,U,Q=!1)=>{if(U===R)return;const le=T(),ve=Be(le),me=Be(U),Ae=Q||!!u.dir&&ve===me;!Q&&Ae&&ur(`/${dt(R)}/session`),ht(U,!0);const _e=await d.client.worktree.remove({directory:R,worktreeRemoveInput:{directory:U}}).then(_t=>_t.data).catch(_t=>($t({title:S.t("workspace.delete.failed.title"),description:dy(_t,S.t("common.requestFailed"))}),!1));if(ht(U,!1),!_e||(Be(r.lastProjectSession[R]?.directory??"")===Be(U)&&$n(R),h.set("project",Ge(_t=>{const Xt=_t.find(Ke=>Ke.worktree===R);Xt&&(Xt.sandboxes=(Xt.sandboxes??[]).filter(Ke=>Ke!==U))})),i("workspaceOrder",R,_t=>(_t??[]).filter(Xt=>Xt!==U)),f.projects.close(U),f.projects.open(R),Ae))return;const Pe=T(),Fe=Be(Pe),lt=f.projects.list().find(_t=>_t.worktree===R),We=(lt?y0(R,[R,...lt.sandboxes??[]],r.workspaceOrder[R]):[R]).some(_t=>Be(_t)===Fe);u.dir&&dr(Pe)===R&&!We&&ur(`/${dt(R)}/session`)},Hz=async(R,U)=>{if(U===R)return;ht(U,!0);const Q=$t({persistent:!0,title:S.t("workspace.resetting.title"),description:S.t("workspace.resetting.description")}),le=()=>nl.dismiss(Q),ve=await d.client.session.list({directory:U}).then(_e=>_e.data??[]).catch(()=>[]);if(D1e(n,U,ve.map(_e=>_e.id),p),await d.client.instance.dispose({directory:U}).catch(()=>{}),!await d.client.worktree.reset({directory:R,worktreeResetInput:{directory:U}}).then(_e=>_e.data).catch(_e=>($t({title:S.t("workspace.reset.failed.title"),description:dy(_e,S.t("common.requestFailed"))}),!1))){ht(U,!1),le();return}const Ae=Date.now();await Promise.all(ve.filter(_e=>_e.time.archived===void 0).map(_e=>d.client.session.update({sessionID:_e.id,directory:_e.directory,time:{archived:Ae}}).catch(()=>{}))),ht(U,!1),le(),$t({title:S.t("workspace.reset.success.title"),description:S.t("workspace.reset.success.description"),actions:[{label:S.t("command.session.new"),onClick:()=>{const _e=`/${dt(U)}/session`;w(_e),f.mobileSidebar.hide()}},{label:S.t("common.dismiss"),onClick:"dismiss"}]})};function Bz(R){const U=F(()=>tr(R.directory)),[Q,le]=Je({status:"loading",dirty:!1});Kt(()=>{d.client.file.status({directory:R.directory}).then(Ae=>{const Pe=(Ae.data??[]).length>0;le({status:"ready",dirty:Pe})}).catch(()=>{le({status:"error",dirty:!1})})});const ve=()=>{const Ae=!!u.dir&&Be(T())===Be(R.directory);Ae&&ur(`/${dt(R.root)}/session`),k.close(),Uz(R.root,R.directory,Ae)},me=()=>Q.status==="loading"?S.t("workspace.status.checking"):Q.status==="error"?S.t("workspace.status.error"):Q.dirty?S.t("workspace.status.dirty"):S.t("workspace.status.clean");return b(Yc,{get title(){return S.t("workspace.delete.title")},fit:!0,get children(){var Ae=eke(),_e=Ae.firstChild,Pe=_e.firstChild,Fe=Pe.nextSibling,lt=_e.nextSibling;return j(Pe,()=>S.t("workspace.delete.confirm",{name:U()})),j(Fe,me),j(lt,b(Gt,{variant:"ghost",size:"large",onClick:()=>k.close(),get children(){return S.t("common.cancel")}}),null),j(lt,b(Gt,{variant:"primary",size:"large",get disabled(){return Q.status==="loading"},onClick:ve,get children(){return S.t("workspace.delete.button")}}),null),Ae}})}function Vz(R){const U=F(()=>tr(R.directory)),[Q,le]=Je({status:"loading",dirty:!1,sessions:[]}),ve=async()=>{const lt=(await d.client.session.list({directory:R.directory}).then(tt=>tt.data??[]).catch(()=>[])).filter(tt=>tt.time.archived===void 0);le({sessions:lt})};Kt(()=>{d.client.file.status({directory:R.directory}).then(Fe=>{const tt=(Fe.data??[]).length>0;le({status:"ready",dirty:tt}),ve()}).catch(()=>{le({status:"error",dirty:!1})})});const me=()=>{k.close(),Hz(R.root,R.directory)},Ae=()=>Q.sessions.length,_e=()=>Q.status==="loading"?S.t("workspace.status.checking"):Q.status==="error"?S.t("workspace.status.error"):Q.dirty?S.t("workspace.status.dirty"):S.t("workspace.status.clean"),Pe=()=>{const Fe=Ae();return Fe===0?S.t("workspace.reset.archived.none"):Fe===1?S.t("workspace.reset.archived.one"):S.t("workspace.reset.archived.many",{count:Fe})};return b(Yc,{get title(){return S.t("workspace.reset.title")},fit:!0,get children(){var Fe=tke(),lt=Fe.firstChild,tt=lt.firstChild,We=tt.nextSibling,_t=We.firstChild,Xt=_t.nextSibling;Xt.nextSibling;var Ke=lt.nextSibling;return j(tt,()=>S.t("workspace.reset.confirm",{name:U()})),j(We,_e,_t),j(We,Pe,Xt),j(We,()=>S.t("workspace.reset.note"),null),j(Ke,b(Gt,{variant:"ghost",size:"large",onClick:()=>k.close(),get children(){return S.t("common.cancel")}}),null),j(Ke,b(Gt,{variant:"primary",size:"large",get disabled(){return Q.status==="loading"},onClick:me,get children(){return S.t("workspace.reset.button")}}),null),Fe}})}const fr={session:"",sessionProject:"",directory:""};re(gt(()=>[s(),D().slug,u.id,cn()?.worktree,T()],([R,U,Q,le,ve])=>{if(!R||!U||!ve){fr.session="",fr.sessionProject="",fr.directory="";return}if(!Q){fr.session="",fr.sessionProject="",fr.directory="";return}const me=`${U}/${Q}`;if(!le){fr.session=me,fr.directory=ve,fr.sessionProject="";return}if(t.projects.last()!==le&&t.projects.touch(le),me!==fr.session||ve!==fr.directory){fr.session=me,fr.directory=ve,fr.sessionProject=hh(ve,Q,le);return}le!==fr.sessionProject&&(fr.directory=ve,fr.sessionProject=Zl(ve,Q,le))})),re(()=>{const R=f.sidebar.opened()?f.sidebar.width():48;document.documentElement.style.setProperty("--dialog-left-margin",`${R}px`)});const mh=F(()=>Math.max(f.sidebar.width(),244)),s1=F(()=>Math.max(mh()-64,0)),ph=new Set;re(gt(Ma,R=>{if(R.length===0){ph.clear();return}const U=new Set(R);for(const Q of U)ph.has(Q)||h.project.loadSessions(Q);ph.clear();for(const Q of U)ph.add(Q)},{defer:!0}));function qz(R){const U=tp(R);U&&(ii(void 0),i("activeProject",U))}function Wz(R){const{draggable:U,droppable:Q}=R;if(U&&Q){const le=f.projects.list(),ve=le.findIndex(Ae=>Ae.worktree===U.id.toString()),me=le.findIndex(Ae=>Ae.worktree===Q.id.toString());ve!==me&&me!==-1&&f.projects.move(U.id.toString(),me)}}function Gz(){i("activeProject",void 0)}function Ou(R){if(!R)return[];const U=R.worktree,Q=[U,...R.sandboxes??[]],le=cn(),ve=Be(le?.worktree??"")===Be(R.worktree)?T():void 0,me=ve&&Be(ve)!==Be(U)&&!Q.some(Pe=>Be(Pe)===Be(ve))?ve:void 0,Ae=me?g0.get(me,n.key)?.status==="pending":!1,_e=y0(U,Q,r.workspaceOrder[R.worktree]);return Ae&&me?[U,me,..._e.filter(Pe=>Pe!==U)]:!me||Ae?_e:[..._e,me]}function Kz(R,U){return Ou(R).filter(Q=>!U||Be(Q)===Be(U)).map(Q=>{const le=h.child(Q,{bootstrap:!1})[0],ve=Be(Q)===Be(R.worktree)?"local":"sandbox",me=To(Q,le.vcs?.branch,R.id);return{directory:Q,kind:ve,label:`${ve==="local"?S.t("workspace.type.local"):S.t("workspace.type.sandbox")} : ${me}`}})}function Zz(R,U){k.show(()=>b(Q5e,{get workspaces(){return Kz(R,U)}}))}const Wk=F(()=>{if(f.sidebar.opened())return cn();const R=sh();return R||cn()});function Yz(R){const U=tp(R);U&&i("activeWorkspace",U)}function Xz(R){const{draggable:U,droppable:Q}=R;if(!U||!Q)return;const le=Wk();if(!le)return;const ve=Ou(le),me=ve.findIndex(Fe=>Fe===U.id.toString()),Ae=ve.findIndex(Fe=>Fe===Q.id.toString());if(me===-1||Ae===-1||me===Ae)return;const _e=ve.slice(),[Pe]=_e.splice(me,1);Pe&&(_e.splice(Ae,0,Pe),i("workspaceOrder",le.worktree,_e.filter(Fe=>Be(Fe)!==Be(le.worktree))))}function Jz(){i("activeWorkspace",void 0)}const Gk=async R=>{as();const U=await d.client.worktree.create({directory:R.worktree}).then(me=>me.data).catch(me=>{$t({title:S.t("workspace.create.failed.title"),description:dy(me,S.t("common.requestFailed"))})});if(!U?.directory)return;wn(U.directory,U.branch,R.id,U.branch);const Q=R.worktree,le=Be(U.directory),ve=Be(Q);ht(U.directory,!0),g0.pending(U.directory,n.key),i("workspaceExpanded",le,!0),le!==U.directory&&i("workspaceExpanded",U.directory,!0),i("workspaceOrder",R.worktree,me=>{const _e=(me??[]).filter(Pe=>{const Fe=Be(Pe);return Fe!==ve&&Fe!==le});return[U.directory,..._e]}),h.child(U.directory),ur(`/${dt(U.directory)}/session`)},Kk={currentDir:T,navList:Eo,sidebarExpanded:Us,sidebarHovering:yr,clearHoverProjectSoon:ss,prefetchSession:$o,archiveSession:He,workspaceName:Eu,renameWorkspace:Fz,editorOpen:Cu,openEditor:ah,closeEditor:Vl,setEditor:ql,InlineEditor:oi,isBusy:Bt,workspaceExpanded:(R,U)=>r.workspaceExpanded[R]??U,setWorkspaceExpanded:(R,U)=>i("workspaceExpanded",R,U),sessionExpanded:R=>r.sessionExpanded[R]??!0,setSessionExpanded:(R,U)=>i("sessionExpanded",R,U),showResetWorkspaceDialog:(R,U)=>k.show(()=>b(Vz,{root:R,directory:U})),showDeleteWorkspaceDialog:(R,U)=>k.show(()=>b(Bz,{root:R,directory:U})),showArchivedSessionsDialog:R=>{const U=cn();U&&Zz(U,R)},setScrollContainerRef:(R,U)=>{U||(a=R)}},Qz={currentDir:T,currentProject:cn,sidebarOpened:()=>f.sidebar.opened(),sidebarHovering:yr,hoverProject:()=>ue.hoverProject,onProjectMouseEnter:(R,U)=>cr.enter(R,U),onProjectMouseLeave:R=>cr.leave(R),onProjectFocus:R=>cr.activate(R),onHoverOpenChanged:(R,U)=>{!U&&ue.hoverProject&&ue.hoverProject!==R||Le("hoverProject",U?R:void 0)},navigateToProject:Oa,openSidebar:()=>f.sidebar.open(),closeProject:Bk,showEditProjectDialog:qk,toggleProjectWorkspaces:Vk,workspacesEnabled:R=>R.vcs==="git"&&f.sidebar.workspaces(R.worktree)(),workspaceIds:Ou,workspaceLabel:To,sessionProps:{navList:Eo,sidebarExpanded:Us,clearHoverProjectSoon:ss,prefetchSession:$o,archiveSession:He,sessionExpanded:R=>r.sessionExpanded[R]??!0,setSessionExpanded:(R,U)=>i("sessionExpanded",R,U)}},Zk=R=>{const U=R.project,Q=F(()=>R.mobile||(R.merged??f.sidebar.opened())),le=F(()=>!u.dir&&f.projects.list().length===0),ve=F(()=>{const Ke=U();return Ke?Ke.name||tr(Ke.worktree):""}),me=F(()=>U()?.id??""),Ae=F(()=>U()?.worktree??""),_e=F(()=>T()||Ae()),Pe=F(()=>{const Ke=Ae();return Ke?dt(Ke):""}),Fe=F(()=>{const Ke=U();return Ke?Ou(Ke):[]}),lt=F(()=>Fe().reduce((Ke,Et)=>Ke+v.project.unseenCount(Et),0)),tt=()=>Fe().filter(Ke=>v.project.unseenCount(Ke)>0).forEach(Ke=>v.project.markViewed(Ke)),We=F(()=>{const Ke=U();return!Ke||Ke.vcs!=="git"?!1:f.sidebar.workspaces(Ke.worktree)()}),_t=F(()=>{const Ke=U();return Ke?Ke.vcs==="git"||f.sidebar.workspaces(Ke.worktree)():!1}),Xt=F(()=>h.data.path.home);return(()=>{var Ke=g9();return j(Ke,b(ce,{get when(){return U()},keyed:!0,get fallback(){return b(ce,{get when(){return le()},get fallback(){return b(ce,{get when(){return R.mobile},get children(){var Et=rke(),gn=Et.firstChild,Ot=gn.nextSibling,On=Ot.nextSibling;return j(gn,()=>S.t("home.projects.title")),j(Ot,b(Ut,{get each(){return a1()},children:Pn=>(()=>{var Pu=ike(),l1=Pu.firstChild;return Pu.$$click=()=>{w(`/${dt(Pn.worktree)}/session`),f.mobileSidebar.hide()},j(l1,()=>Pn.name||tr(Pn.worktree)),Pu})()})),j(On,b(Gt,{size:"normal",icon:"folder-add-left",onClick:Mu,get children(){return S.t("command.project.open")}})),Et}})},get children(){var Et=nke(),gn=Et.firstChild,Ot=gn.firstChild,On=Ot.firstChild,Pn=On.nextSibling;return j(On,()=>S.t("sidebar.empty.title")),j(Pn,()=>S.t("sidebar.empty.description")),j(gn,b(Gt,{size:"large",icon:"folder-add-left",onClick:Mu,get children(){return S.t("command.project.open")}}),null),Et}})},children:Et=>[(()=>{var gn=ske(),Ot=gn.firstChild,On=Ot.firstChild;return j(On,b(oi,{get id(){return`project:${me()}`},value:ve,onSave:Pn=>{jz(Et,Pn)},class:"text-14-medium text-text-strong truncate",displayClass:"text-14-medium text-text-strong truncate",stopPropagation:!0}),null),j(On,b(bn,{placement:"bottom",gutter:2,get value(){return Ae()},class:"shrink-0",contentStyle:{"max-width":"640px",transform:"translate3d(52px, 0, 0)"},get children(){var Pn=oke();return j(Pn,()=>Ae().replace(Xt(),"~")),Pn}}),null),j(Ot,b(on,{get modal(){return!yr()},get children(){return[b(on.Trigger,{as:Jr,icon:"dot-grid",variant:"ghost","data-action":"project-menu",get"data-project"(){return Pe()},class:"shrink-0 size-6 rounded-md transition-opacity data-[expanded]:bg-surface-base-active",get classList(){return{"opacity-100":R.mobile||Q(),"opacity-0 group-hover/project:opacity-100 group-focus-within/project:opacity-100 data-[expanded]:opacity-100":!R.mobile&&!Q()}},get"aria-label"(){return S.t("common.moreOptions")}}),b(on.Portal,{get children(){return b(on.Content,{class:"mt-1",get children(){return[b(on.Item,{onSelect:()=>{qk(Et)},get children(){return b(on.ItemLabel,{get children(){return S.t("common.edit")}})}}),b(on.Item,{"data-action":"project-workspaces-toggle",get"data-project"(){return Pe()},get disabled(){return!_t()},onSelect:()=>{Vk(Et)},get children(){return b(on.ItemLabel,{get children(){return je(()=>!!We())()?S.t("sidebar.workspaces.disable"):S.t("sidebar.workspaces.enable")}})}}),b(on.Item,{"data-action":"project-clear-notifications",get"data-project"(){return Pe()},get disabled(){return lt()===0},onSelect:tt,get children(){return b(on.ItemLabel,{get children(){return S.t("sidebar.project.clearNotifications")}})}}),b(on.Separator,{}),b(on.Item,{"data-action":"project-close-menu",get"data-project"(){return Pe()},onSelect:()=>{const Pn=Ae();Pn&&Bk(Pn)},get children(){return b(on.ItemLabel,{get children(){return S.t("common.close")}})}})]}})}})]}}),null),gn})(),(()=>{var gn=cke();return j(gn,b(ce,{get when(){return We()},get fallback(){return[(()=>{var Ot=v9();return j(Ot,b(Gt,{size:"large",icon:"new-session",class:"w-full",onClick:()=>{const On=_e();On&&ur(`/${dt(On)}/session`)},get children(){return S.t("command.session.new")}})),Ot})(),(()=>{var Ot=uke();return j(Ot,b(g4e,{ctx:Kk,project:Et,directory:_e,sortNow:zt,get mobile(){return R.mobile}})),Ot})()]},get children(){return[(()=>{var Ot=v9();return j(Ot,b(Gt,{size:"large",icon:"plus-small",class:"w-full",onClick:()=>{Gk(Et)},get children(){return S.t("workspace.new")}})),Ot})(),(()=>{var Ot=lke();return j(Ot,b(XR,{onDragStart:Yz,onDragEnd:Jz,onDragOver:Xz,collisionDetector:ZR,get children(){return[b(JR,{}),b(sN,{}),(()=>{var On=ake();return pr(Pn=>{R.mobile||(a=Pn)},On),j(On,b(tN,{get ids(){return Fe()},get children(){return b(Ut,{get each(){return Fe()},children:Pn=>b(p4e,{ctx:Kk,directory:Pn,project:Et,sortNow:zt,get mobile(){return R.mobile}})})}})),On})(),b(QR,{get children(){return b(f4e,{sidebarProject:Wk,activeWorkspace:()=>r.activeWorkspace,workspaceLabel:To})}})]}})),Ot})()]}})),gn})()]})),De(Et=>{var gn={"flex flex-col min-h-0 min-w-0 box-border px-3 border-r border-border-weak-base bg-background-base":!0,"shadow-[var(--shadow-lg)]":!Q(),"flex-1 min-w-0":R.mobile,"max-w-full overflow-hidden":R.mobile},Ot=R.mobile?void 0:`${s1()}px`;return Et.e=Ct(Ke,gn,Et.e),Ot!==Et.t&&Xr(Ke,"width",Et.t=Ot),Et},{e:void 0,t:void 0}),Ke})()},a1=()=>f.projects.list(),ej=()=>b(K4e,{projects:a1,activeProject:()=>r.activeProject}),tj=R=>{ur(r5e(R))},Yk=R=>b(u5e,{mobile:R,opened:()=>f.sidebar.opened(),get aimMove(){return cr.move},projects:a1,renderProject:U=>b(X4e,{ctx:Qz,project:U,sortNow:zt,mobile:R}),handleDragStart:qz,handleDragEnd:Gz,handleDragOver:Wz,get openProjectLabel(){return S.t("command.project.open")},openProjectKeybind:()=>x.keybind("project.open"),onOpenProject:Mu,renderProjectOverlay:ej,settingsLabel:()=>S.t("sidebar.settings"),settingsKeybind:()=>x.keybind("settings.open"),onOpenSettings:pn,restartLabel:()=>S.t("sidebar.restart"),restartConfirm:()=>S.t("sidebar.restart.confirm"),onRestart:()=>{p.restart?.()},renderPanel:()=>K()?b(o5e,{mobile:R,merged:!0,get width(){return s1()},current:Te,onSelect:tj}):ge()?(()=>{var U=g9();return j(U,b(A5e,{mobile:R,merged:!0,projectID:()=>ae()?.id,projectWorktree:()=>ae()?.worktree})),De(Q=>{var le={"flex flex-col min-h-0 min-w-0 box-border rounded-tl-[12px]":!0,"border-l border-t border-border-weaker-base bg-background-base":!R,"flex-1 min-w-0 max-w-full overflow-hidden":!!R},ve=R?void 0:`${s1()}px`;return Q.e=Ct(U,le,Q.e),ve!==Q.t&&Xr(U,"width",Q.t=ve),Q},{e:void 0,t:void 0}),U})():R?b(Zk,{project:cn,mobile:!0}):b(Zk,{project:cn,merged:!0})});return(()=>{var R=fke(),U=R.firstChild,Q=U.firstChild,le=Q.firstChild,ve=le.firstChild,me=ve.firstChild,Ae=ve.nextSibling,_e=Ae.nextSibling,Pe=_e.firstChild,Fe=Pe.nextSibling,lt=_e.nextSibling,tt=lt.firstChild;return j(R,()=>uh()??"",U),j(R,b(B2e,{}),U),ve.addEventListener("mouseleave",()=>{cr.reset(),yr()&&oh()}),ve.addEventListener("mouseenter",()=>{qr()}),pr(We=>{Le("nav",We)},ve),Ct(ve,{"hidden xl:block":!0,"absolute inset-y-0 left-0":!0,"z-10":!0}),j(me,Yk),j(le,b(ce,{get when(){return f.sidebar.opened()},get children(){var We=dke();return We.$$pointerdown=()=>Le("sizing",!0),j(We,b(fve,{direction:"horizontal",get size(){return f.sidebar.width()},min:244,get max(){return typeof window>"u"?1e3:window.innerWidth*.3+64},onResize:_t=>{Le("sizing",!0),En!==void 0&&clearTimeout(En),En=window.setTimeout(()=>Le("sizing",!1),120),f.sidebar.resize(_t)}})),De(_t=>Xr(We,"left",`${mh()}px`)),We}}),Ae),Pe.$$click=We=>{We.target===We.currentTarget&&f.mobileSidebar.hide()},Fe.$$click=We=>We.stopPropagation(),j(Fe,()=>Yk(!0)),Ct(tt,{"size-full overflow-hidden flex flex-col items-start contain-strict bg-background-base":!0}),j(tt,b(ce,{get when(){return!uh.loading},get fallback(){return hy()},get children(){return b(z9,{fallback:(We,_t)=>{const Xt=We instanceof Error?We.message:String(We);if((/failed to fetch dynamically imported module/i.test(Xt)||/importing a module script failed/i.test(Xt)||/dynamically imported module/i.test(Xt))&&typeof window<"u"){const Et="codeplane-stale-chunk-reload";if(sessionStorage.getItem(Et)!=="1")return sessionStorage.setItem(Et,"1"),window.location.reload(),hy()}return(()=>{var Et=hke(),gn=Et.firstChild,Ot=gn.nextSibling;return j(gn,()=>S.t("error.page.title")),j(Ot,()=>Xt||S.t("error.chain.unknown")),j(Et,b(Gt,{onClick:_t,get children(){return S.t("common.refresh")}}),null),Et})()},get children(){return b(j9,{get fallback(){return hy()},get children(){return e.children}})}})}})),j(U,(()=>{var We=je(()=>!1);return()=>We()&&b(Pbe,{})})(),null),j(R,b(Qs.Region,{}),null),De(We=>{var _t=S.t("sidebar.nav.projectsAndSessions"),Xt=`${mh()}px`,Ke={"fixed inset-x-0 top-10 bottom-0 z-40 bg-black/40 backdrop-blur-sm transition-opacity duration-300 ease-out":!0,"opacity-100 pointer-events-auto":f.mobileSidebar.opened(),"opacity-0 pointer-events-none":!f.mobileSidebar.opened()},Et=S.t("sidebar.nav.projectsAndSessions"),gn={"@container fixed top-10 bottom-0 left-0 z-50 overflow-hidden border-r border-border-weaker-base bg-background-base shadow-2xl transition-transform duration-300 ease-[cubic-bezier(0.32,0.72,0,1)]":!0,"w-[88vw] max-w-[360px] sm:max-w-[400px]":!!cn(),"w-[78vw] max-w-[300px]":!cn(),"translate-x-0":f.mobileSidebar.opened(),"-translate-x-full":!f.mobileSidebar.opened()},Ot={"absolute inset-0":!0,"xl:inset-y-0 xl:right-0 xl:left-[var(--main-left)]":!0,"z-20":!0,"transition-[left] duration-200 ease-[cubic-bezier(0.22,1,0.36,1)] will-change-[left] motion-reduce:transition-none":!ue.sizing},On=f.sidebar.opened()?`${mh()}px`:"4rem";return _t!==We.e&&Ye(ve,"aria-label",We.e=_t),Xt!==We.t&&Xr(ve,"width",We.t=Xt),We.a=Ct(Pe,Ke,We.a),Et!==We.o&&Ye(Fe,"aria-label",We.o=Et),We.i=Ct(Fe,gn,We.i),We.n=Ct(lt,Ot,We.n),On!==We.s&&Xr(lt,"--main-left",We.s=On),We},{e:void 0,t:void 0,a:void 0,o:void 0,i:void 0,n:void 0,s:void 0}),R})()}or(["click","pointerdown"]);var pke=ee("<option>"),gke=ee("<div aria-hidden=true><input type=text style=font-size:16px><select tabindex=-1><option>");function vke(e){let t;const[n,r]=se(e,["ref","onChange","collection","selectionManager","isOpen","isMultiple","isVirtualized","focusTrigger"]),i=Si(),[o,s]=de(!1),a=l=>{const c=n.collection.getItem(l);return b(ce,{get when(){return c?.type==="item"},get children(){var u=pke();return u.value=l,j(u,()=>c?.textValue),De(()=>u.selected=n.selectionManager.isSelected(l)),u}})};return re(gt(()=>n.selectionManager.selectedKeys(),(l,c)=>{c&&SR(l,c)||(s(!0),t?.dispatchEvent(new Event("input",{bubbles:!0,cancelable:!0})),t?.dispatchEvent(new Event("change",{bubbles:!0,cancelable:!0})))},{defer:!0})),(()=>{var l=gke(),c=l.firstChild,u=c.nextSibling;u.firstChild,c.addEventListener("focus",()=>n.focusTrigger()),u.addEventListener("change",h=>{ze(h,n.onChange),o()||n.selectionManager.setSelectedKeys(new Set([h.target.value])),s(!1)});var d=st(h=>t=h,n.ref);return typeof d=="function"&&pr(d,u),jr(u,ne({get multiple(){return n.isMultiple},get name(){return i.name()},get required(){return i.isRequired()},get disabled(){return i.isDisabled()},get size(){return n.collection.getSize()},get value(){return n.selectionManager.firstSelectedKey()??""}},r),!1,!0),j(u,b(ce,{get when(){return n.isVirtualized},get fallback(){return b(Ut,{get each(){return[...n.collection.getKeys()]},children:a})},get children(){return b(Ut,{get each(){return[...n.selectionManager.selectedKeys()]},children:a})}}),null),De(h=>{var f=fp,m=n.selectionManager.isFocused()||n.isOpen?-1:0,p=i.isRequired(),g=i.isDisabled(),v=i.isReadOnly();return h.e=up(l,f,h.e),m!==h.t&&Ye(c,"tabindex",h.t=m),p!==h.a&&(c.required=h.a=p),g!==h.o&&(c.disabled=h.o=g),v!==h.i&&(c.readOnly=h.i=v),h},{e:void 0,t:void 0,a:void 0,o:void 0,i:void 0}),l})()}var y9=new WeakMap;function yke(e){let t=y9.get(e);if(t!=null)return t;t=0;for(const n of e)n.type==="item"&&t++;return y9.set(e,t),t}var bke={};vr(bke,{Item:()=>Jg,ItemDescription:()=>Qg,ItemIndicator:()=>e1,ItemLabel:()=>t1,Listbox:()=>wke,Root:()=>jk,Section:()=>n1,useListboxContext:()=>wz});var bz=pt();function wz(){const e=ut(bz);if(e===void 0)throw new Error("[kobalte]: `useListboxContext` must be used within a `Listbox` component");return e}var kz=pt();function zk(){const e=ut(kz);if(e===void 0)throw new Error("[kobalte]: `useListboxItemContext` must be used within a `Listbox.Item` component");return e}function Jg(e){let t;const n=wz(),r=`${n.generateId("item")}-${an()}`,i=Ne({id:r},e),[o,s]=se(i,["ref","item","aria-label","aria-labelledby","aria-describedby","onPointerMove","onPointerDown","onPointerUp","onClick","onKeyDown","onMouseDown","onFocus"]),[a,l]=de(),[c,u]=de(),d=()=>n.listState().selectionManager(),h=()=>d().focusedKey()===o.item.key,f=Cg({key:()=>o.item.key,selectionManager:d,shouldSelectOnPressUp:n.shouldSelectOnPressUp,allowsDifferentPressOrigin:()=>n.shouldSelectOnPressUp()&&n.shouldFocusOnHover(),shouldUseVirtualFocus:n.shouldUseVirtualFocus,disabled:()=>o.item.disabled},()=>t),m=()=>{if(d().selectionMode()!=="none")return f.isSelected()},p=F(()=>!(xf()&&K9())),g=()=>p()?o["aria-label"]:void 0,v=()=>p()?a():void 0,y=()=>p()?c():void 0,w=()=>{if(!n.isVirtualized())return;const $=n.listState().collection().getItem(o.item.key)?.index;return $!=null?$+1:void 0},k=()=>{if(n.isVirtualized())return yke(n.listState().collection())},x=$=>{ze($,o.onPointerMove),$.pointerType==="mouse"&&!f.isDisabled()&&n.shouldFocusOnHover()&&(un($.currentTarget),d().setFocused(!0),d().setFocusedKey(o.item.key))},C=F(()=>({"data-disabled":f.isDisabled()?"":void 0,"data-selected":f.isSelected()?"":void 0,"data-highlighted":h()?"":void 0})),S={isSelected:f.isSelected,dataset:C,generateId:$r(()=>s.id),registerLabelId:en(l),registerDescriptionId:en(u)};return b(kz.Provider,{value:S,get children(){return b(Ve,ne({as:"li",ref($){var O=st(D=>t=D,o.ref);typeof O=="function"&&O($)},role:"option",get tabIndex(){return f.tabIndex()},get"aria-disabled"(){return f.isDisabled()},get"aria-selected"(){return m()},get"aria-label"(){return g()},get"aria-labelledby"(){return v()},get"aria-describedby"(){return y()},get"aria-posinset"(){return w()},get"aria-setsize"(){return k()},get"data-key"(){return f.dataKey()},get onPointerDown(){return wt([o.onPointerDown,f.onPointerDown])},get onPointerUp(){return wt([o.onPointerUp,f.onPointerUp])},get onClick(){return wt([o.onClick,f.onClick])},get onKeyDown(){return wt([o.onKeyDown,f.onKeyDown])},get onMouseDown(){return wt([o.onMouseDown,f.onMouseDown])},get onFocus(){return wt([o.onFocus,f.onFocus])},onPointerMove:x},C,s))}})}function Qg(e){const t=zk(),n=Ne({id:t.generateId("description")},e);return re(()=>fe(t.registerDescriptionId(n.id))),b(Ve,ne({as:"div"},()=>t.dataset(),n))}function e1(e){const t=zk(),n=Ne({id:t.generateId("indicator")},e),[r,i]=se(n,["forceMount"]);return b(ce,{get when(){return r.forceMount||t.isSelected()},get children(){return b(Ve,ne({as:"div","aria-hidden":"true"},()=>t.dataset(),i))}})}function t1(e){const t=zk(),n=Ne({id:t.generateId("label")},e);return re(()=>fe(t.registerLabelId(n.id))),b(Ve,ne({as:"div"},()=>t.dataset(),n))}function jk(e){let t;const n=`listbox-${an()}`,r=Ne({id:n,selectionMode:"single",virtualized:!1},e),[i,o]=se(r,["ref","children","renderItem","renderSection","value","defaultValue","onChange","options","optionValue","optionTextValue","optionDisabled","optionGroupChildren","state","keyboardDelegate","autoFocus","selectionMode","shouldFocusWrap","shouldUseVirtualFocus","shouldSelectOnPressUp","shouldFocusOnHover","allowDuplicateSelectionEvents","disallowEmptySelection","selectionBehavior","selectOnFocus","disallowTypeAhead","allowsTabNavigation","virtualized","scrollToItem","scrollRef","onKeyDown","onMouseDown","onFocusIn","onFocusOut"]),s=F(()=>i.state?i.state:Ig({selectedKeys:()=>i.value,defaultSelectedKeys:()=>i.defaultValue,onSelectionChange:i.onChange,allowDuplicateSelectionEvents:()=>he(i.allowDuplicateSelectionEvents),disallowEmptySelection:()=>he(i.disallowEmptySelection),selectionBehavior:()=>he(i.selectionBehavior),selectionMode:()=>he(i.selectionMode),dataSource:()=>i.options??[],getKey:()=>i.optionValue,getTextValue:()=>i.optionTextValue,getDisabled:()=>i.optionDisabled,getSectionChildren:()=>i.optionGroupChildren})),a=TR({selectionManager:()=>s().selectionManager(),collection:()=>s().collection(),autoFocus:()=>he(i.autoFocus),shouldFocusWrap:()=>he(i.shouldFocusWrap),keyboardDelegate:()=>i.keyboardDelegate,disallowEmptySelection:()=>he(i.disallowEmptySelection),selectOnFocus:()=>he(i.selectOnFocus),disallowTypeAhead:()=>he(i.disallowTypeAhead),shouldUseVirtualFocus:()=>he(i.shouldUseVirtualFocus),allowsTabNavigation:()=>he(i.allowsTabNavigation),isVirtualized:()=>i.virtualized,scrollToKey:()=>i.scrollToItem},()=>t,()=>i.scrollRef?.()),l={listState:s,generateId:$r(()=>o.id),shouldUseVirtualFocus:()=>r.shouldUseVirtualFocus,shouldSelectOnPressUp:()=>r.shouldSelectOnPressUp,shouldFocusOnHover:()=>r.shouldFocusOnHover,isVirtualized:()=>i.virtualized};return b(bz.Provider,{value:l,get children(){return b(Ve,ne({as:"ul",ref(c){var u=st(d=>t=d,i.ref);typeof u=="function"&&u(c)},role:"listbox",get tabIndex(){return a.tabIndex()},get"aria-multiselectable"(){return s().selectionManager().selectionMode()==="multiple"?!0:void 0},get onKeyDown(){return wt([i.onKeyDown,a.onKeyDown])},get onMouseDown(){return wt([i.onMouseDown,a.onMouseDown])},get onFocusIn(){return wt([i.onFocusIn,a.onFocusIn])},get onFocusOut(){return wt([i.onFocusOut,a.onFocusOut])}},o,{get children(){return b(ce,{get when(){return!i.virtualized},get fallback(){return i.children?.(s().collection)},get children(){return b(Jj,{get each(){return[...s().collection()]},by:"key",children:c=>b(Il,{get children(){return[b(Cn,{get when(){return c().type==="section"},get children(){return i.renderSection?.(c())}}),b(Cn,{get when(){return c().type==="item"},get children(){return i.renderItem?.(c())}})]}})})}})}}))}})}function n1(e){return b(Ve,ne({as:"li",role:"presentation"},e))}var wke=Object.assign(jk,{Item:Jg,ItemDescription:Qg,ItemIndicator:e1,ItemLabel:t1,Section:n1}),kke={};vr(kke,{Arrow:()=>xi,Content:()=>Sz,Description:()=>Aa,ErrorMessage:()=>La,HiddenSelect:()=>_z,Icon:()=>Cz,Item:()=>Jg,ItemDescription:()=>Qg,ItemIndicator:()=>e1,ItemLabel:()=>t1,Label:()=>Iz,Listbox:()=>Tz,Portal:()=>Ez,Root:()=>$z,Section:()=>n1,Select:()=>Ei,Trigger:()=>Az,Value:()=>Lz,useSelectContext:()=>Fs});var xz=pt();function Fs(){const e=ut(xz);if(e===void 0)throw new Error("[kobalte]: `useSelectContext` must be used within a `Select` component");return e}function Sz(e){let t;const n=Fs(),[r,i]=se(e,["ref","style","onCloseAutoFocus","onFocusOutside"]),o=a=>{n.close()},s=a=>{r.onFocusOutside?.(a),n.isOpen()&&n.isModal()&&a.preventDefault()};return mp({isDisabled:()=>!(n.isOpen()&&n.isModal()),targets:()=>t?[t]:[]}),pp({element:()=>t??null,enabled:()=>n.contentPresent()&&n.preventScroll()}),hp({trapFocus:()=>n.isOpen()&&n.isModal(),onMountAutoFocus:a=>{a.preventDefault()},onUnmountAutoFocus:a=>{r.onCloseAutoFocus?.(a),a.defaultPrevented||(un(n.triggerRef()),a.preventDefault())}},()=>t),b(ce,{get when(){return n.contentPresent()},get children(){return b(is.Positioner,{get children(){return b(eu,ne({ref(a){var l=st(c=>{n.setContentRef(c),t=c},r.ref);typeof l=="function"&&l(a)},get disableOutsidePointerEvents(){return je(()=>!!n.isModal())()&&n.isOpen()},get excludedElements(){return[n.triggerRef]},get style(){return gr({"--kb-select-content-transform-origin":"var(--kb-popper-content-transform-origin)",position:"relative"},r.style)},onEscapeKeyDown:o,onFocusOutside:s,get onDismiss(){return n.close}},()=>n.dataset(),i))}})}})}function _z(e){const t=Fs();return b(vke,ne({get collection(){return t.listState().collection()},get selectionManager(){return t.listState().selectionManager()},get isOpen(){return t.isOpen()},get isMultiple(){return t.isMultiple()},get isVirtualized(){return t.isVirtualized()},focusTrigger:()=>t.triggerRef()?.focus()},e))}function Cz(e){const t=Fs(),n=Ne({children:"▼"},e);return b(Ve,ne({as:"span","aria-hidden":"true"},()=>t.dataset(),n))}function Iz(e){const t=Fs(),[n,r]=se(e,["onClick"]);return b(th,ne({as:"span",onClick:o=>{ze(o,n.onClick),t.isDisabled()||t.triggerRef()?.focus()}},r))}function Tz(e){const t=Fs(),n=Ne({id:t.generateId("listbox")},e),[r,i]=se(n,["ref","id","onKeyDown"]);return re(()=>fe(t.registerListboxId(r.id))),b(jk,ne({ref(s){var a=st(t.setListboxRef,r.ref);typeof a=="function"&&a(s)},get id(){return r.id},get state(){return t.listState()},get virtualized(){return t.isVirtualized()},get autoFocus(){return t.autoFocus()},shouldSelectOnPressUp:!0,shouldFocusOnHover:!0,get shouldFocusWrap(){return t.shouldFocusWrap()},get disallowTypeAhead(){return t.disallowTypeAhead()},get"aria-labelledby"(){return t.listboxAriaLabelledBy()},get renderItem(){return t.renderItem},get renderSection(){return t.renderSection},onKeyDown:s=>{ze(s,r.onKeyDown),s.key==="Escape"&&s.preventDefault()}},i))}function Ez(e){const t=Fs();return b(ce,{get when(){return t.contentPresent()},get children(){return b(Os,e)}})}function xke(e){const t=`select-${an()}`,n=Ne({id:t,selectionMode:"single",disallowEmptySelection:!1,closeOnSelection:e.selectionMode==="single",allowDuplicateSelectionEvents:!0,gutter:8,sameWidth:!0,modal:!1},e),[r,i,o,s]=se(n,["itemComponent","sectionComponent","open","defaultOpen","onOpenChange","value","defaultValue","onChange","placeholder","options","optionValue","optionTextValue","optionDisabled","optionGroupChildren","keyboardDelegate","allowDuplicateSelectionEvents","disallowEmptySelection","closeOnSelection","disallowTypeAhead","shouldFocusWrap","selectionBehavior","selectionMode","virtualized","modal","preventScroll","forceMount"],["getAnchorRect","placement","gutter","shift","flip","slide","overlap","sameWidth","fitViewport","hideWhenDetached","detachedPadding","arrowPadding","overflowPadding"],Vg),[a,l]=de(),[c,u]=de(),[d,h]=de(),[f,m]=de(),[p,g]=de(),[v,y]=de(),[w,k]=de(),[x,C]=de(!0),S=pe=>{const ue=r.optionValue;return ue==null?String(pe):String(kf(ue)?ue(pe):pe[ue])},$=F(()=>{const pe=r.optionGroupChildren;return pe==null?r.options:r.options.flatMap(ue=>ue[pe]??ue)}),O=F(()=>$().map(pe=>S(pe))),D=pe=>[...pe].map(ue=>$().find(Le=>S(Le)===ue)).filter(ue=>ue!=null),M=Ps({open:()=>r.open,defaultOpen:()=>r.defaultOpen,onOpenChange:pe=>r.onOpenChange?.(pe)}),I=Ig({selectedKeys:()=>r.value!=null?r.value.map(S):r.value,defaultSelectedKeys:()=>r.defaultValue!=null?r.defaultValue.map(S):r.defaultValue,onSelectionChange:pe=>{r.onChange?.(D(pe)),r.closeOnSelection&&K()},allowDuplicateSelectionEvents:()=>he(r.allowDuplicateSelectionEvents),disallowEmptySelection:()=>he(r.disallowEmptySelection),selectionBehavior:()=>he(r.selectionBehavior),selectionMode:()=>r.selectionMode,dataSource:()=>r.options??[],getKey:()=>r.optionValue,getTextValue:()=>r.optionTextValue,getDisabled:()=>r.optionDisabled,getSectionChildren:()=>r.optionGroupChildren}),L=F(()=>D(I.selectionManager().selectedKeys())),A=pe=>{I.selectionManager().toggleSelection(S(pe))},{present:T}=po({show:()=>r.forceMount||M.isOpen(),element:()=>p()??null}),N=()=>{const pe=v();pe&&un(pe)},W=pe=>{if(r.options.length<=0)return;C(pe),M.open();let ue=I.selectionManager().firstSelectedKey();ue==null&&(pe==="first"?ue=I.collection().getFirstKey():pe==="last"&&(ue=I.collection().getLastKey())),N(),I.selectionManager().setFocused(!0),I.selectionManager().setFocusedKey(ue)},K=()=>{M.close(),I.selectionManager().setFocused(!1),I.selectionManager().setFocusedKey(void 0)},V=pe=>{M.isOpen()?K():W(pe)},{formControlContext:q}=qg(o);nh(f,()=>{const pe=r.defaultValue?[...r.defaultValue].map(S):new No;I.selectionManager().setSelectedKeys(pe)});const B=rR({usage:"search",sensitivity:"base"}),Y=F(()=>{const pe=he(r.keyboardDelegate);return pe||new IR(I.collection,void 0,B)}),J=pe=>r.itemComponent?.({item:pe}),ge=pe=>r.sectionComponent?.({section:pe});re(gt([O],([pe])=>{const Le=[...I.selectionManager().selectedKeys()].filter($e=>pe.includes($e));I.selectionManager().setSelectedKeys(Le)},{defer:!0}));const ae=F(()=>({"data-expanded":M.isOpen()?"":void 0,"data-closed":M.isOpen()?void 0:""})),Te={dataset:ae,isOpen:M.isOpen,isDisabled:()=>q.isDisabled()??!1,isMultiple:()=>he(r.selectionMode)==="multiple",isVirtualized:()=>r.virtualized??!1,isModal:()=>r.modal??!1,preventScroll:()=>r.preventScroll??Te.isModal(),disallowTypeAhead:()=>r.disallowTypeAhead??!1,shouldFocusWrap:()=>r.shouldFocusWrap??!1,selectedOptions:L,contentPresent:T,autoFocus:x,triggerRef:f,listState:()=>I,keyboardDelegate:Y,triggerId:a,valueId:c,listboxId:d,listboxAriaLabelledBy:w,setListboxAriaLabelledBy:k,setTriggerRef:m,setContentRef:g,setListboxRef:y,open:W,close:K,toggle:V,placeholder:()=>r.placeholder,renderItem:J,renderSection:ge,removeOptionFromSelection:A,generateId:$r(()=>he(o.id)),registerTriggerId:en(l),registerValueId:en(u),registerListboxId:en(h)};return b(eh.Provider,{value:q,get children(){return b(xz.Provider,{value:Te,get children(){return b(is,ne({anchorRef:f,contentRef:p},i,{get children(){return b(Ve,ne({as:"div",role:"group",get id(){return he(o.id)}},()=>q.dataset(),ae,s))}}))}})}})}function $z(e){const[t,n]=se(e,["value","defaultValue","onChange","multiple"]),r=F(()=>t.value!=null?t.multiple?t.value:[t.value]:t.value),i=F(()=>t.defaultValue!=null?t.multiple?t.defaultValue:[t.defaultValue]:t.defaultValue);return b(xke,ne({get value(){return r()},get defaultValue(){return i()},onChange:s=>{t.multiple?t.onChange?.(s??[]):t.onChange?.(s[0]??null)},get selectionMode(){return t.multiple?"multiple":"single"}},n))}function Az(e){const t=Si(),n=Fs(),r=Ne({id:n.generateId("trigger")},e),[i,o,s]=se(r,["ref","disabled","onPointerDown","onClick","onKeyDown","onFocus","onBlur"],_k),a=()=>n.listState().selectionManager(),l=()=>n.keyboardDelegate(),c=()=>i.disabled||n.isDisabled(),{fieldProps:u}=Ck(o),{typeSelectHandlers:d}=_R({keyboardDelegate:l,selectionManager:a,onTypeSelect:y=>a().select(y)}),h=()=>[n.listboxAriaLabelledBy(),n.valueId()].filter(Boolean).join(" ")||void 0,f=y=>{ze(y,i.onPointerDown),y.currentTarget.dataset.pointerType=y.pointerType,!c()&&y.pointerType!=="touch"&&y.button===0&&(y.preventDefault(),n.toggle(!0))},m=y=>{ze(y,i.onClick),!c()&&y.currentTarget.dataset.pointerType==="touch"&&n.toggle(!0)},p=y=>{if(ze(y,i.onKeyDown),!c())switch(ze(y,d.onKeyDown),y.key){case"Enter":case" ":case"ArrowDown":y.stopPropagation(),y.preventDefault(),n.toggle("first");break;case"ArrowUp":y.stopPropagation(),y.preventDefault(),n.toggle("last");break;case"ArrowLeft":{if(y.preventDefault(),n.isMultiple())return;const w=a().firstSelectedKey(),k=w!=null?l().getKeyAbove?.(w):l().getFirstKey?.();k!=null&&a().select(k);break}case"ArrowRight":{if(y.preventDefault(),n.isMultiple())return;const w=a().firstSelectedKey(),k=w!=null?l().getKeyBelow?.(w):l().getFirstKey?.();k!=null&&a().select(k);break}}},g=y=>{ze(y,i.onFocus),!a().isFocused()&&a().setFocused(!0)},v=y=>{ze(y,i.onBlur),!n.isOpen()&&a().setFocused(!1)};return re(()=>fe(n.registerTriggerId(u.id()))),re(()=>{n.setListboxAriaLabelledBy([u.ariaLabelledBy(),u.ariaLabel()&&!u.ariaLabelledBy()?u.id():null].filter(Boolean).join(" ")||void 0)}),b(Jo,ne({ref(y){var w=st(n.setTriggerRef,i.ref);typeof w=="function"&&w(y)},get id(){return u.id()},get disabled(){return c()},"aria-haspopup":"listbox",get"aria-expanded"(){return n.isOpen()},get"aria-controls"(){return je(()=>!!n.isOpen())()?n.listboxId():void 0},get"aria-label"(){return u.ariaLabel()},get"aria-labelledby"(){return h()},get"aria-describedby"(){return u.ariaDescribedBy()},onPointerDown:f,onClick:m,onKeyDown:p,onFocus:g,onBlur:v},()=>n.dataset(),()=>t.dataset(),s))}function Lz(e){const t=Si(),n=Fs(),r=Ne({id:n.generateId("value")},e),[i,o]=se(r,["id","children"]),s=()=>n.listState().selectionManager(),a=()=>{const l=s().selectedKeys();return l.size===1&&l.has("")?!0:s().isEmpty()};return re(()=>fe(n.registerValueId(i.id))),b(Ve,ne({as:"span",get id(){return i.id},get"data-placeholder-shown"(){return a()?"":void 0}},()=>t.dataset(),o,{get children(){return b(ce,{get when(){return!a()},get fallback(){return n.placeholder()},get children(){return b(Ske,{state:{selectedOption:()=>n.selectedOptions()[0],selectedOptions:()=>n.selectedOptions(),remove:l=>n.removeOptionFromSelection(l),clear:()=>s().clearSelection()},get children(){return i.children}})}})}}))}function Ske(e){const t=Cl(()=>{const n=e.children;return kf(n)?n(e.state):n});return je(t)}var Ei=Object.assign($z,{Arrow:xi,Content:Sz,Description:Aa,ErrorMessage:La,HiddenSelect:_z,Icon:Cz,Item:Jg,ItemDescription:Qg,ItemIndicator:e1,ItemLabel:t1,Label:Iz,Listbox:Tz,Portal:Ez,Section:n1,Trigger:Az,Value:Lz});function b9(e){const[t,n]=se(e,["class","classList","placeholder","options","current","value","label","groupBy","valueClass","onSelect","onHighlight","onOpenChange","children","triggerStyle","triggerVariant","triggerProps"]),r={key:void 0,cleanup:void 0},i=()=>{r.cleanup?.(),r.cleanup=void 0,r.key=void 0},o=l=>t.value?t.value(l):l,s=l=>{if(!t.onHighlight)return;if(!l){i();return}const c=o(l);r.key!==c&&(r.cleanup?.(),r.cleanup=t.onHighlight(l),r.key=c)};fe(i);const a=F(()=>hf(t.options,b2(c=>t.groupBy?t.groupBy(c):""),Kge(),jge(([c,u])=>({category:c,options:u}))));return b(Ei,ne(n,{"data-component":"select",get"data-trigger-style"(){return t.triggerVariant},get placement(){return t.triggerVariant==="settings"?"bottom-end":"bottom-start"},gutter:4,get value(){return t.current},get options(){return a()},optionValue:l=>t.value?t.value(l):l,optionTextValue:l=>t.label?t.label(l):l,optionGroupChildren:"options",get placeholder(){return t.placeholder},sectionComponent:l=>b(Ei.Section,{"data-slot":"select-section",get children(){return l.section.rawValue.category}}),itemComponent:l=>b(Ei.Item,ne(l,{"data-slot":"select-select-item",get classList(){return{...t.classList,[t.class??""]:!!t.class}},onPointerEnter:()=>s(l.item.rawValue),onPointerMove:()=>s(l.item.rawValue),onFocus:()=>s(l.item.rawValue),get children(){return[b(Ei.ItemLabel,{"data-slot":"select-select-item-label",get children(){return je(()=>!!t.children)()?t.children(l.item.rawValue):je(()=>!!t.label)()?t.label(l.item.rawValue):l.item.rawValue}}),b(Ei.ItemIndicator,{"data-slot":"select-select-item-indicator",get children(){return b(Ht,{name:"check-small",size:"small"})}})]}})),onChange:l=>{t.onSelect?.(l??void 0),i()},onOpenChange:l=>{t.onOpenChange?.(l),l||i()},get children(){return[b(Ei.Trigger,ne(()=>t.triggerProps,{get disabled(){return e.disabled},"data-slot":"select-select-trigger",as:Gt,get size(){return e.size},get variant(){return e.variant},get style(){return t.triggerStyle},get classList(){return{...t.classList,[t.class??""]:!!t.class}},get children(){return[b(Ei.Value,{"data-slot":"select-select-trigger-value",get class(){return t.valueClass},children:l=>{const c=l.selectedOption()??t.current;return c?t.label?t.label(c):c:t.placeholder||""}}),b(Ei.Icon,{"data-slot":"select-select-trigger-icon",get children(){return b(Ht,{get name(){return t.triggerVariant==="settings"?"selector":"chevron-down"},size:"small"})}})]}})),b(Ei.Portal,{get children(){return b(Ei.Content,{get classList(){return{...t.classList,[t.class??""]:!!t.class}},"data-component":"select-content",get"data-trigger-style"(){return t.triggerVariant},get children(){return b(Ei.Listbox,{"data-slot":"select-select-content-list"})}})}})]}}))}var _ke=ee("<span>");function w9(e){const[t,n]=se(e,["size","class","classList","children"]);return(()=>{var r=_ke();return jr(r,ne(n,{"data-component":"tag",get"data-size"(){return t.size||"normal"},get classList(){return{...t.classList,[t.class??""]:!!t.class}}}),!1,!0),j(r,()=>t.children),r})()}const k9=e=>!!e&&typeof e=="object"&&!Array.isArray(e);function Cke(e){const t=new Map,n=new Map;for(const r of e.agents??[])r?.name&&(r.hidden||r.mode==="subagent"||t.set(r.name,{name:r.name,label:r.name}));for(const[r,i]of Object.entries(e.config?.mode??{}))k9(i)&&n.set(r,i);for(const[r,i]of Object.entries(e.config?.agent??{}))k9(i)&&n.set(r,i);for(const[r,i]of n){if(i.disable===!0||i.hidden===!0||i.mode==="subagent"){t.delete(r);continue}t.set(r,{name:r,label:r})}return[{name:"",label:e.defaultLabel},...[...t.values()].sort((r,i)=>r.label.localeCompare(i.label))]}var Ike=ee('<div class="size-full overflow-y-auto"><div class="mx-auto flex min-h-full w-full max-w-3xl flex-col gap-6 px-6 py-8">'),Tke=ee('<div class="flex flex-col gap-4 shrink-0"><div class="shrink-0 flex items-center gap-4 justify-between border-b border-border-weak-base pb-4"><div class=min-w-0><div class="text-20-medium text-text-strong truncate"></div><div class="text-12-regular text-text-weak">'),Eke=ee('<ul class="overflow-hidden rounded-lg border border-border-weaker-base bg-background-base shadow-[var(--shadow-xs)]">'),$ke=ee('<div class="rounded-lg border border-border-weaker-base bg-background-base px-4 py-12 text-center text-12-regular text-text-weak shadow-[var(--shadow-xs)]">'),Ake=ee('<div class="mt-0.5 truncate text-12-regular text-text-weak">'),Lke=ee("<span>·"),Dke=ee("<span>: "),Mke=ee('<div class="mt-1.5 text-12-regular text-text-critical-base whitespace-pre-wrap break-words line-clamp-3">'),Oke=ee('<li class="border-b border-border-weak-base last:border-b-0"><div class="group flex w-full min-w-0 items-center gap-3 px-4 py-3"><div class="min-w-0 flex-1"><div class="flex flex-wrap items-center gap-2"><span class="truncate text-14-medium text-text-strong"></span></div><div class="mt-0.5 flex flex-wrap items-center gap-x-2 gap-y-0.5 font-mono text-11-regular text-text-weak"><span class=truncate></span><span>·</span><span>: </span></div></div><div class="flex shrink-0 items-center gap-1">'),Pke=ee('<div class="rounded-md border border-border-critical-base bg-surface-critical-base/10 px-3 py-2 text-12-regular text-text-critical-base whitespace-pre-wrap">'),Rke=ee('<form novalidate class="flex flex-col gap-5 px-6 pt-0 pb-5"><div class="flex flex-col gap-4"><div class="flex flex-col gap-2"><label class="text-12-medium text-text-weak"></label><div class="inline-flex items-center gap-0.5 rounded-lg bg-surface-base p-1 self-start"><button type=button class="px-3 h-7 rounded-md text-13-medium transition-colors">Cron</button><button type=button class="px-3 h-7 rounded-md text-13-medium transition-colors">Interval</button></div></div><div class="grid grid-cols-2 gap-3"><div class="flex flex-col gap-2"><label class="text-12-medium text-text-weak"></label></div></div><div class="flex flex-col gap-2"><label class="text-12-medium text-text-weak"></label></div></div><div class="flex justify-end gap-2 pt-1">');const Nke=["cron","tasks"],zke=5e3,jke=6e4;function x9(e,t,n=Date.now()){if(!e)return;const r=e-n,i=Math.abs(r),o=new Intl.RelativeTimeFormat(t.toString(),{numeric:"auto"}),s=6e4,a=60*s,l=24*a;return i<s?o.format(Math.round(r/1e3),"second"):i<a?o.format(Math.round(r/s),"minute"):i<l?o.format(Math.round(r/a),"hour"):o.format(Math.round(r/l),"day")}function Fke(e,t){if(e.schedule.kind==="cron")return`cron · ${e.schedule.expression}`;const n=Math.round(e.schedule.intervalMs/6e4);return`${t.t("cron.field.schedule.interval")}: ${n}`}function my(){const e=ri(),t=So(),n=sr(),r=Jn(),i=F(()=>n.current?.http),o=F(()=>(r.data.project??[]).filter(m=>m.id!=="global")),s=F(()=>_r(e.dir)),a=F(()=>new URLSearchParams(t.search).get("projectID")??void 0),l=F(()=>e.projectID??a()),c=F(()=>{const m=s();return m?D2(m,o(),a()):o().find(p=>p.id===l())}),u=F(()=>rz(c(),l())),d=xo();re(()=>{const m=c();m&&(e.dir||d(`/cron/worktree/${dt(m.worktree)}${m.id?`?projectID=${encodeURIComponent(m.id)}`:""}`,{replace:!0}))});const h=va(()=>({queryKey:[...Nke,n.scope.key,u(),s()],queryFn:async()=>{const m=i(),p=u(),g=s();return m?p?Ko.list(m,{projectID:p}):g?Ko.list(m,{directory:g}):[]:[]},enabled:!!i()&&(!!u()||!!s()),refetchInterval:5e3,refetchOnMount:!0,refetchOnWindowFocus:!0,staleTime:zke,gcTime:jke,retry:1})),f=F(()=>(h.data??[]).filter(m=>{const p=u(),g=s();return iz(m,{projectID:p,project:c(),directory:g})}));return(()=>{var m=Ike(),p=m.firstChild;return j(p,b(Uke,{selectedProject:c}),null),j(p,b(Hke,{server:i,tasks:f,selectedProject:c}),null),m})()}function Uke(e){const t=At(),n=ko(),r=()=>{const i=e.selectedProject();if(!i?.worktree){$t({variant:"error",title:t.t("common.requestFailed"),description:t.t("cron.create.noProject")});return}n.show(()=>b(Dz,{project:i}))};return(()=>{var i=Tke(),o=i.firstChild,s=o.firstChild,a=s.firstChild,l=a.nextSibling;return j(a,()=>t.t("cron.title")),j(l,()=>t.t("cron.subtitle")),j(o,b(Gt,{variant:"primary",size:"large",icon:"plus-small",onClick:r,get children(){return t.t("cron.create")}}),null),i})()}function Hke(e){const t=At(),n=ko(),r=i=>{const o=e.selectedProject();o?.worktree&&n.show(()=>b(Dz,{project:o,existing:i}))};return b(ce,{get when(){return e.tasks().length>0},get fallback(){return(()=>{var i=$ke();return j(i,(()=>{var o=je(()=>!!e.selectedProject());return()=>o()?t.t("cron.empty.project"):t.t("cron.empty")})()),i})()},get children(){var i=Eke();return j(i,b(Ut,{get each(){return e.tasks()},children:o=>b(Bke,{task:o,get server(){return e.server},onEdit:()=>r(o)})})),i}})}function Bke(e){const t=At(),n=cu(),r=At().intl,i=()=>n.invalidateQueries({queryKey:["cron"]}),o=Ad(()=>({mutationFn:async l=>{const c=e.server();if(!c)throw new Error("No server connection");return Ko.setStatus(c,e.task.id,l)},onSuccess:()=>i(),onError:l=>$t({variant:"error",title:t.t("common.requestFailed"),description:l instanceof Error?l.message:String(l)})})),s=Ad(()=>({mutationFn:async()=>{const l=e.server();if(!l)throw new Error("No server connection");return Ko.trigger(l,e.task.id)},onSuccess:()=>i(),onError:l=>$t({variant:"error",title:t.t("common.requestFailed"),description:l instanceof Error?l.message:String(l)})})),a=Ad(()=>({mutationFn:async()=>{if(!confirm(t.t("cron.delete.confirm")))return;const l=e.server();if(!l)throw new Error("No server connection");return Ko.remove(l,e.task.id)},onSuccess:()=>i(),onError:l=>$t({variant:"error",title:t.t("common.requestFailed"),description:l instanceof Error?l.message:String(l)})}));return(()=>{var l=Oke(),c=l.firstChild,u=c.firstChild,d=u.firstChild,h=d.firstChild,f=d.nextSibling,m=f.firstChild,p=m.nextSibling,g=p.nextSibling,v=g.firstChild,y=u.nextSibling;return j(d,b(Ht,{name:"bell",size:"small",class:"icon-strong-base shrink-0"}),h),j(h,()=>e.task.name),j(d,b(w9,{get children(){return t.t(`cron.status.${e.task.status}`)}}),null),j(d,b(ce,{get when(){return e.task.lastRunStatus},get children(){return b(w9,{get children(){return t.t(`cron.run.status.${e.task.lastRunStatus}`)}})}}),null),j(u,b(ce,{get when(){return e.task.description},get children(){var w=Ake();return j(w,()=>e.task.description),w}}),f),j(m,()=>Fke(e.task,t)),j(g,()=>t.t("cron.next"),v),j(g,(()=>{var w=je(()=>e.task.status==="active");return()=>w()?x9(e.task.nextRunAt,r())??t.t("cron.never"):"—"})(),null),j(f,b(ce,{get when(){return e.task.lastRunAt},get children(){return[Lke(),(()=>{var w=Dke(),k=w.firstChild;return j(w,()=>t.t("cron.last"),k),j(w,()=>x9(e.task.lastRunAt,r()),null),w})()]}}),null),j(u,b(ce,{get when(){return je(()=>!!e.task.lastError)()&&e.task.lastRunStatus!=="success"},get children(){var w=Mke();return j(w,()=>e.task.lastError),w}}),null),j(y,b(bn,{get value(){return t.t("cron.action.trigger")},placement:"top",get children(){return b(Jr,{icon:"arrow-right",variant:"ghost",size:"normal",get"aria-label"(){return t.t("cron.action.trigger")},get disabled(){return s.isPending||e.task.status==="disabled"},onClick:()=>s.mutate()})}}),null),j(y,b(ce,{get when(){return e.task.status==="active"},get fallback(){return b(bn,{get value(){return t.t("cron.action.resume")},placement:"top",get children(){return b(Jr,{icon:"circle-check",variant:"ghost",size:"normal",get"aria-label"(){return t.t("cron.action.resume")},get disabled(){return o.isPending},onClick:()=>o.mutate("active")})}})},get children(){return b(bn,{get value(){return t.t("cron.action.pause")},placement:"top",get children(){return b(Jr,{icon:"circle-ban-sign",variant:"ghost",size:"normal",get"aria-label"(){return t.t("cron.action.pause")},get disabled(){return o.isPending},onClick:()=>o.mutate("paused")})}})}}),null),j(y,b(bn,{get value(){return t.t("cron.action.edit")},placement:"top",get children(){return b(Jr,{icon:"edit",variant:"ghost",size:"normal",get"aria-label"(){return t.t("cron.action.edit")},get onClick(){return e.onEdit}})}}),null),j(y,b(bn,{get value(){return t.t("cron.action.delete")},placement:"top",get children(){return b(Jr,{icon:"trash",variant:"ghost",size:"normal",get"aria-label"(){return t.t("cron.action.delete")},get disabled(){return a.isPending},onClick:()=>a.mutate()})}}),null),l})()}function Vke(e){return e instanceof Error&&"status"in e}function qke(e){const t=e.trim();if(!t)return{ok:!1,reason:"Required"};if(/^@(?:hourly|daily|weekly|monthly|yearly|annually|midnight)$/i.test(t))return{ok:!0};const n=t.split(/\s+/);return n.length!==5?{ok:!1,reason:`Expected 5 fields (got ${n.length}). Example: 0 9 * * 1-5`}:{ok:!0}}function Dz(e){const t=At(),n=ko(),r=cu(),i=sr(),o=Yf(),s=Jn(),a=Gi(),l=F(()=>i.current?.http),c=va(()=>({queryKey:["cron","agents",i.scope.key,e.project.worktree],queryFn:async()=>(await a.createClient({directory:e.project.worktree,throwOnError:!0}).app.agents()).data??[],enabled:!!l()&&!!e.project.worktree,staleTime:5e3})),u=F(()=>Cke({agents:c.data,config:s.data.config,defaultLabel:t.t("common.default")})),d=F(()=>{const y=[];for(const w of o.connected())for(const[k,x]of Object.entries(w.models??{}))y.push({providerID:w.id,modelID:k,label:x.name??k,group:w.name??w.id});return y.sort((w,k)=>w.group.localeCompare(k.group)||w.label.localeCompare(k.label))}),h=()=>{const y=e.existing;return y?{name:y.name,description:y.description??"",prompt:y.prompt,scheduleKind:y.schedule.kind,cronExpression:y.schedule.kind==="cron"?y.schedule.expression:"0 9 * * 1-5",intervalMinutes:y.schedule.kind==="interval"?String(Math.round(y.schedule.intervalMs/6e4)):"60",timeoutMinutes:y.timeoutMs?String(Math.round(y.timeoutMs/6e4)):"30",agent:y.agent??"",model:y.model??"",status:y.status,errors:{}}:{name:"",description:"",prompt:"",scheduleKind:"cron",cronExpression:"0 9 * * 1-5",intervalMinutes:"60",timeoutMinutes:"30",agent:"",model:"",status:"active",errors:{}}},[f,m]=Je(h()),p=()=>{const y={};if(f.name.trim()||(y.name=t.t("cron.error.name.required")),f.prompt.trim()||(y.prompt=t.t("cron.error.prompt.required")),f.scheduleKind==="cron"){const w=qke(f.cronExpression);w.ok||(y.schedule=w.reason)}else{const w=Number(f.intervalMinutes);(!Number.isFinite(w)||w<1)&&(y.schedule=t.t("cron.error.interval.min"))}if(f.timeoutMinutes){const w=Number(f.timeoutMinutes);(!Number.isFinite(w)||w<1)&&(y.timeout=t.t("cron.error.timeout.min"))}return m("errors",y),Object.keys(y).length===0},g=y=>{if(m("errors",{}),!Vke(y)){m("errors","form",y instanceof Error?y.message:String(y));return}const w={};if(y.fieldIssues&&y.fieldIssues.length>0)for(const k of y.fieldIssues){const x=k.path;x==="name"?w.name=k.message:x==="prompt"?w.prompt=k.message:x==="schedule"||x.startsWith("schedule.")?w.schedule=k.message:x==="timeoutMs"||x==="timeout"?w.timeout=k.message:w.form=(w.form?`${w.form}; `:"")+(x?`${x}: ${k.message}`:k.message)}Object.keys(w).length===0&&(w.form=y.message),m("errors",w)},v=Ad(()=>({mutationFn:async()=>{if(!p()){const x=new Error(t.t("cron.error.validation.fix"));throw x._validation=!0,x}const y=l();if(!y)throw new Error("No server connection");const w=f.scheduleKind==="cron"?{kind:"cron",expression:f.cronExpression.trim()}:{kind:"interval",intervalMs:Math.max(1,Number(f.intervalMinutes))*6e4},k=f.timeoutMinutes?Math.max(1,Number(f.timeoutMinutes))*6e4:void 0;if(e.existing){const x={name:f.name.trim(),description:f.description.trim()||null,prompt:f.prompt,schedule:w,timeoutMs:k??null,agent:f.agent.trim()||null,model:f.model.trim()||null,status:f.status};await Ko.update(y,e.existing.id,x)}else{const x={...e.project.id?{projectID:e.project.id}:{},directory:e.project.worktree,name:f.name.trim(),description:f.description.trim()||void 0,prompt:f.prompt,schedule:w,timeoutMs:k,agent:f.agent.trim()||void 0,model:f.model.trim()||void 0,status:f.status};await Ko.create(y,x)}},onSuccess:()=>{r.invalidateQueries({queryKey:["cron"]}),n.close()},onError:y=>{y instanceof Error&&y._validation||(g(y),$t({variant:"error",title:t.t("common.requestFailed"),description:y instanceof Error?y.message:String(y)}))}}));return b(Yc,{get title(){return je(()=>!!e.existing)()?t.t("cron.action.edit"):t.t("cron.create")},class:"w-full max-w-[560px] mx-auto",fit:!0,get children(){var y=Rke(),w=y.firstChild,k=w.firstChild,x=k.firstChild,C=x.nextSibling,S=C.firstChild,$=S.nextSibling,O=k.nextSibling,D=O.firstChild,M=D.firstChild,I=O.nextSibling,L=I.firstChild,A=w.nextSibling;return y.addEventListener("submit",T=>{T.preventDefault(),v.mutate()}),j(w,b(na,{autofocus:!0,get label(){return t.t("cron.field.name")},get placeholder(){return t.t("cron.field.name.placeholder")},get value(){return f.name},onChange:T=>m("name",T),get error(){return f.errors.name}}),k),j(w,b(na,{get label(){return t.t("cron.field.description")},get placeholder(){return t.t("cron.field.description")},get value(){return f.description},onChange:T=>m("description",T)}),k),j(w,b(na,{multiline:!0,get label(){return t.t("cron.field.prompt")},get placeholder(){return t.t("cron.field.prompt.placeholder")},get value(){return f.prompt},onChange:T=>m("prompt",T),get error(){return f.errors.prompt},class:"max-h-40 w-full overflow-y-auto"}),k),j(x,()=>t.t("cron.field.scheduleKind")),S.$$click=()=>m("scheduleKind","cron"),$.$$click=()=>m("scheduleKind","interval"),j(w,b(ce,{get when(){return f.scheduleKind==="cron"},get fallback(){return b(na,{get label(){return t.t("cron.field.schedule.interval")},placeholder:"60",type:"number",get value(){return f.intervalMinutes},onChange:T=>m("intervalMinutes",T),get error(){return f.errors.schedule},inputmode:"numeric"})},get children(){return b(na,{get label(){return t.t("cron.field.schedule.cron")},get placeholder(){return t.t("cron.field.schedule.cron.placeholder")},get value(){return f.cronExpression},onChange:T=>m("cronExpression",T),get error(){return f.errors.schedule},spellcheck:!1,class:"font-mono text-xs"})}}),O),j(O,b(na,{get label(){return t.t("cron.field.timeout")},placeholder:"30",type:"number",get value(){return f.timeoutMinutes},onChange:T=>m("timeoutMinutes",T),get error(){return f.errors.timeout},inputmode:"numeric"}),D),j(M,()=>t.t("cron.field.agent")),j(D,b(b9,{variant:"ghost",size:"large",triggerVariant:"form",valueClass:"truncate text-14-regular",get options(){return u()},value:T=>T.name,label:T=>T.label,get current(){return u().find(T=>T.name===f.agent)??u()[0]},get placeholder(){return t.t("common.default")},onSelect:T=>m("agent",T?.name??"")}),null),j(L,()=>t.t("cron.field.model")),j(I,b(b9,{variant:"ghost",size:"large",triggerVariant:"form",valueClass:"truncate text-14-regular",get options(){return d()},value:T=>`${T.providerID}/${T.modelID}`,label:T=>T.label,groupBy:T=>T.group,get current(){return d().find(T=>`${T.providerID}/${T.modelID}`===f.model)},get placeholder(){return t.t("common.default")},onSelect:T=>m("model",T?`${T.providerID}/${T.modelID}`:"")}),null),j(w,b(ce,{get when(){return f.errors.form},get children(){var T=Pke();return j(T,()=>f.errors.form),T}}),null),j(A,b(Gt,{type:"button",variant:"ghost",size:"large",onClick:()=>n.close(),get children(){return t.t("common.cancel")}}),null),j(A,b(Gt,{type:"submit",variant:"primary",size:"large",get disabled(){return v.isPending},get children(){return je(()=>!!v.isPending)()?t.t("common.saving"):t.t("common.save")}}),null),De(T=>{var N={"bg-surface-base-active text-text-strong":f.scheduleKind==="cron","text-text-weak hover:text-text-base":f.scheduleKind!=="cron"},W={"bg-surface-base-active text-text-strong":f.scheduleKind==="interval","text-text-weak hover:text-text-base":f.scheduleKind!=="interval"};return T.e=Ct(S,N,T.e),T.t=Ct($,W,T.t),T},{e:void 0,t:void 0}),y}})}or(["click"]);var Wke=ee('<div class="relative flex-1 h-screen w-screen min-h-0 flex flex-col items-center justify-center bg-background-base font-sans"><div class="w-2/3 max-w-3xl flex flex-col items-center justify-center gap-8"><div class="flex flex-col items-center gap-2 text-center"><h1 class="text-lg font-medium text-text-strong"></h1><p class="text-sm text-text-weak"></p></div><div class="flex items-center gap-3"></div><div class="flex flex-col items-center gap-2"><div class="flex items-center justify-center gap-1"><button type=button class="flex items-center text-text-interactive-base gap-1"><div>'),Gke=ee('<p class="text-xs text-text-weak">');const w0=`
2440
+ `)[0]}:{detail:t}}async function Lo(e,t,n={}){const r=`${e.url.replace(/\/$/,"")}${t}`,i={"Content-Type":"application/json","Cache-Control":"no-store, no-cache, must-revalidate",Pragma:"no-cache",...d5e(e),...n.headers??{}},o=await fetch(r,{cache:"no-store",...n,headers:i});if(!o.ok){let s;try{s=h5e(await o.json(),o.statusText)}catch{s={detail:o.statusText}}const a=new Error(s.detail);throw a.status=o.status,s.fieldIssues&&(a.fieldIssues=s.fieldIssues),a}if(o.status!==204)return await o.json()}const Ko={list(e,t){const n=new URLSearchParams;t?.projectID&&n.set("projectID",t.projectID),t?.directory&&n.set("directory",t.directory);const r=n.toString();return Lo(e,`/global/cron${r?`?${r}`:""}`)},get(e,t){return Lo(e,`/global/cron/${encodeURIComponent(t)}`)},create(e,t){return Lo(e,"/global/cron",{method:"POST",body:JSON.stringify(t)})},update(e,t,n){return Lo(e,`/global/cron/${encodeURIComponent(t)}`,{method:"PATCH",body:JSON.stringify(n)})},remove(e,t){return Lo(e,`/global/cron/${encodeURIComponent(t)}`,{method:"DELETE"})},setStatus(e,t,n){return Lo(e,`/global/cron/${encodeURIComponent(t)}/status`,{method:"POST",body:JSON.stringify({status:n})})},trigger(e,t){return Lo(e,`/global/cron/${encodeURIComponent(t)}/trigger`,{method:"POST"})},listRuns(e,t,n){const r=n?`?limit=${n}`:"";return Lo(e,`/global/cron/${encodeURIComponent(t)}/runs${r}`)},getRun(e,t){return Lo(e,`/global/cron/runs/${encodeURIComponent(t)}`)},cancelRun(e,t){return Lo(e,`/global/cron/runs/${encodeURIComponent(t)}/cancel`,{method:"POST"})}};function Lk(e){if(!e)return[];const t=new Set;return[e.worktree,...e.sandboxes??[]].filter(n=>{if(!n)return!1;const r=Vi(n);return t.has(r)?!1:(t.add(r),!0)})}function m5e(e,t){return t.some(n=>ba(n,e))}function h9(e,t){return Lk(t).reduce((n,r)=>ba(r,e)?Math.max(n,Vi(r).length):n,-1)}function D2(e,t,n){if(!e)return;const r=n?t.find(o=>o.id===n):void 0;if(r&&h9(e,r)>=0)return r;const i=t.map((o,s)=>({project:o,index:s,score:h9(e,o)})).filter(o=>o.score>=0).sort((o,s)=>s.score-o.score||o.index-s.index)[0]?.project;return i||(n?{id:n,worktree:e}:{worktree:e})}function rz(e,t){return e?.id??t}function iz(e,t){if(t.projectID)return e.projectID===t.projectID;const n=t.project?Lk(t.project):t.directory?[t.directory]:[];return m5e(e.directory,n)}var p5e=ee('<div class="flex items-center gap-2 px-2 py-2 min-w-0"><span class="text-14-medium text-text-strong truncate">'),g5e=ee('<div class="shrink-0 px-3 pt-4 pb-1 text-11-medium text-text-weak uppercase tracking-wider">'),v5e=ee('<nav class="flex-1 min-h-0 overflow-y-auto no-scrollbar flex flex-col px-1">'),y5e=ee('<div class="flex flex-col min-h-0 flex-1 py-2"><div class="shrink-0 px-1">'),b5e=ee('<div class="flex items-center gap-1.5 px-2 py-1 min-w-0"><span class="text-12-medium text-text-weak truncate">'),w5e=ee('<div class="shrink-0 px-1 pb-1">'),k5e=ee('<div class="size-1.5 rounded-full bg-text-interactive-base">'),x5e=ee('<div class="shrink-0 size-6 flex items-center justify-center">'),S5e=ee('<div class="size-1.5 rounded-full">'),_5e=ee('<div class="flex items-center gap-2 min-w-0 w-full text-left focus:outline-none py-1"><span class="min-w-0 flex-1 flex flex-col"><span class="text-14-regular text-text-strong truncate"><span class="text-text-weak font-mono mr-1">#</span></span><span class="text-12-regular text-text-weak truncate">'),C5e=ee('<div class="group/session relative w-full min-w-0 rounded-md cursor-default px-2 transition-colors hover:bg-surface-raised-base-hover [&amp;:has(:focus-visible)]:bg-surface-raised-base-hover">'),I5e=ee('<div class="opacity-60 cursor-default">');const T5e=5e3,E5e=3e3,m9=6e4;function $5e(e){return new Date(e).toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"})}const A5e=e=>{const t=At(),n=So(),r=sr(),i=Jn(),o=F(()=>r.current?.http),s=F(()=>n.pathname==="/cron"||n.pathname.startsWith("/cron/")),a=F(()=>new URLSearchParams(n.search).get("projectID")??void 0),l=F(()=>{const y=e.projectID?.(),w=(i.data.project??[]).filter(S=>S.id!=="global");if(y){const S=w.find($=>$.id===y);return S?{id:S.id,worktree:e.projectWorktree?.()??S.worktree,sandboxes:S.sandboxes}:{id:y,worktree:e.projectWorktree?.()}}const k=n.pathname.match(/^\/cron\/worktree\/([^/?#]+)/);if(k){const S=_r(k[1]);return D2(S,w,a())}const x=n.pathname.match(/^\/cron\/([^/?#]+)/);if(x){const S=a()??decodeURIComponent(x[1]),$=w.find(O=>O.id===S);if($)return{id:$.id,worktree:$.worktree,sandboxes:$.sandboxes}}const C=n.pathname.match(/^\/([^/]+)\/session\//);if(C){const S=_r(C[1]);return D2(S,w,a())}}),c=F(()=>rz(l(),a())),u=F(()=>l()?.worktree),d=F(()=>Lk(l())),h=F(()=>d().flatMap(y=>{const[w]=i.child(y,{bootstrap:!1});return w.session}));re(()=>{d().forEach(y=>void i.project.loadSessions(y))});const f=va(()=>({queryKey:["cron","sidebar-panel-tasks",r.scope.key,c(),u()],queryFn:async()=>{const y=o(),w=c(),k=u();return!y||!w&&!k?[]:w?Ko.list(y,{projectID:w}):Ko.list(y,{directory:k})},enabled:!!o()&&(!!c()||!!u()),refetchInterval:5e3,refetchOnMount:!0,refetchOnWindowFocus:!0,staleTime:T5e,gcTime:m9,retry:1})),m=F(()=>(f.data??[]).filter(y=>iz(y,{projectID:c(),project:l(),directory:u()}))),p=va(()=>({queryKey:["cron","sidebar-panel-runs",r.scope.key,c(),m().map(y=>y.id).join(",")],queryFn:async()=>{const y=o();return y?(await Promise.all(m().map(async k=>(await Ko.listRuns(y,k.id,100).catch(()=>[])).map(C=>({...C,taskName:k.name,taskDirectory:k.directory||u()||""}))))).flat().sort((k,x)=>(x.time?.created??0)-(k.time?.created??0)):[]},enabled:!!o()&&(!!c()||!!u())&&!f.isLoading,refetchInterval:3e3,refetchOnMount:!0,refetchOnWindowFocus:!0,staleTime:E5e,gcTime:m9,retry:1})),g=F(()=>V2e({runs:p.data??[],sessions:h(),directories:d(),limit:200})),v=F(()=>{const y=c(),w=u();return w?`/cron/worktree/${dt(w)}${y?`?projectID=${encodeURIComponent(y)}`:""}`:y?`/cron/${encodeURIComponent(y)}`:"/cron"});return(()=>{var y=y5e(),w=y.firstChild;return j(y,b(ce,{get when(){return je(()=>!!s())()&&u()},keyed:!0,children:k=>(()=>{var x=w5e();return j(x,b(Uc,{get href(){return`/${dt(k)}/session`},class:"block w-full rounded-md transition-colors hover:bg-surface-raised-base-hover",get children(){var C=b5e(),S=C.firstChild;return j(C,b(Ht,{name:"chevron-left",size:"small",class:"shrink-0 text-text-weak"}),S),j(S,()=>t.t("common.back")),C}})),x})()}),w),j(w,b(Uc,{get href(){return v()},class:"block w-full rounded-md transition-colors",get classList(){return{"bg-surface-base-active":s(),"hover:bg-surface-raised-base-hover":!s()}},get children(){var k=p5e(),x=k.firstChild;return j(k,b(Ht,{name:"bell",size:"small",class:"shrink-0 icon-strong-base"}),x),j(x,()=>t.t("cron.title")),k}})),j(y,b(ce,{get when(){return g().length>0},get children(){return[(()=>{var k=g5e();return j(k,()=>t.t("cron.rail.title")),k})(),(()=>{var k=v5e();return j(k,b(Ut,{get each(){return g()},children:x=>b(L5e,{get sessionID(){return x.sessionID},get taskName(){return x.taskName},get taskDirectory(){return x.taskDirectory},get projectID(){return c()},get status(){return x.status},get startedAt(){return x.startedAt},get sequence(){return x.sequence}})})),k})()]}}),null),y})()},L5e=e=>{const t=F(()=>dt(e.taskDirectory)),n=F(()=>`/cron/worktree/${t()}/session/${e.sessionID}`),r=F(()=>{if(!e.sessionID)return"";const l=new URLSearchParams({sidebar:"cron"});return e.projectID&&l.set("projectID",e.projectID),`${n()}?${l.toString()}`}),i=So(),o=F(()=>!!e.sessionID&&i.pathname===n()),s=(()=>{var l=x5e();return j(l,b(Il,{get fallback(){return(()=>{var c=S5e();return De(u=>{var d=e.status==="success",h=e.status==="failed"||e.status==="timeout",f=e.status==="cancelled";return d!==u.e&&c.classList.toggle("bg-text-success-base",u.e=d),h!==u.t&&c.classList.toggle("bg-text-critical-base",u.t=h),f!==u.a&&c.classList.toggle("bg-text-weak-base",u.a=f),u},{e:void 0,t:void 0,a:void 0}),c})()},get children(){return[b(Cn,{get when(){return e.status==="running"},get children(){return b(Kg,{class:"size-[15px]"})}}),b(Cn,{get when(){return e.status==="queued"},get children(){return k5e()}})]}})),l})(),a=(()=>{var l=_5e(),c=l.firstChild,u=c.firstChild,d=u.firstChild;d.firstChild;var h=u.nextSibling;return j(l,s,c),j(d,()=>e.sequence,null),j(u,()=>e.taskName,null),j(h,()=>$5e(e.startedAt)),l})();return(()=>{var l=C5e();return j(l,b(ce,{get when(){return e.sessionID},get fallback(){return(()=>{var c=I5e();return j(c,a),c})()},get children(){return b(Uc,{get href(){return r()},class:"block",children:a})}})),De(()=>l.classList.toggle("bg-surface-base-active",!!o())),l})()};var D5e={};vr(D5e,{Description:()=>Aa,ErrorMessage:()=>La,Item:()=>az,ItemControl:()=>Dk,ItemDescription:()=>Mk,ItemIndicator:()=>Ok,ItemInput:()=>lz,ItemLabel:()=>Pk,Label:()=>Rk,RadioGroup:()=>Xg,Root:()=>cz,useRadioGroupContext:()=>Yg});var oz=pt();function Yg(){const e=ut(oz);if(e===void 0)throw new Error("[kobalte]: `useRadioGroupContext` must be used within a `RadioGroup` component");return e}var sz=pt();function _u(){const e=ut(sz);if(e===void 0)throw new Error("[kobalte]: `useRadioGroupItemContext` must be used within a `RadioGroup.Item` component");return e}function az(e){const t=Si(),n=Yg(),r=`${t.generateId("item")}-${an()}`,i=Ne({id:r},e),[o,s]=se(i,["value","disabled","onPointerDown"]),[a,l]=de(),[c,u]=de(),[d,h]=de(),[f,m]=de(),[p,g]=de(!1),v=F(()=>n.isDefaultValue(o.value)),y=F(()=>n.isSelectedValue(o.value)),w=F(()=>o.disabled||t.isDisabled()||!1),k=S=>{ze(S,o.onPointerDown),p()&&S.preventDefault()},x=F(()=>({...t.dataset(),"data-disabled":w()?"":void 0,"data-checked":y()?"":void 0})),C={value:()=>o.value,dataset:x,isDefault:v,isSelected:y,isDisabled:w,inputId:a,labelId:c,descriptionId:d,inputRef:f,select:()=>n.setSelectedValue(o.value),generateId:$r(()=>s.id),registerInput:en(l),registerLabel:en(u),registerDescription:en(h),setIsFocused:g,setInputRef:m};return b(sz.Provider,{value:C,get children(){return b(Ve,ne({as:"div",role:"group",onPointerDown:k},x,s))}})}function Dk(e){const t=_u(),n=Ne({id:t.generateId("control")},e),[r,i]=se(n,["onClick","onKeyDown"]);return b(Ve,ne({as:"div",onClick:a=>{ze(a,r.onClick),t.select(),t.inputRef()?.focus()},onKeyDown:a=>{ze(a,r.onKeyDown),a.key===dp.Space&&(t.select(),t.inputRef()?.focus())}},()=>t.dataset(),i))}function Mk(e){const t=_u(),n=Ne({id:t.generateId("description")},e);return re(()=>fe(t.registerDescription(n.id))),b(Ve,ne({as:"div"},()=>t.dataset(),n))}function Ok(e){const t=_u(),n=Ne({id:t.generateId("indicator")},e),[r,i]=se(n,["ref","forceMount"]),[o,s]=de(),{present:a}=po({show:()=>r.forceMount||t.isSelected(),element:()=>o()??null});return b(ce,{get when(){return a()},get children(){return b(Ve,ne({as:"div",ref(l){var c=st(s,r.ref);typeof c=="function"&&c(l)}},()=>t.dataset(),i))}})}function lz(e){const t=Si(),n=Yg(),r=_u(),i=Ne({id:r.generateId("input")},e),[o,s]=se(i,["ref","style","aria-labelledby","aria-describedby","onChange","onFocus","onBlur"]),a=()=>[o["aria-labelledby"],r.labelId(),o["aria-labelledby"]!=null&&s["aria-label"]!=null?s.id:void 0].filter(Boolean).join(" ")||void 0,l=()=>[o["aria-describedby"],r.descriptionId(),n.ariaDescribedBy()].filter(Boolean).join(" ")||void 0,[c,u]=de(!1),d=m=>{if(ze(m,o.onChange),m.stopPropagation(),!c()){n.setSelectedValue(r.value());const p=m.target;p.checked=r.isSelected()}u(!1)},h=m=>{ze(m,o.onFocus),r.setIsFocused(!0)},f=m=>{ze(m,o.onBlur),r.setIsFocused(!1)};return re(gt([()=>r.isSelected(),()=>r.value()],m=>{if(!m[0]&&m[1]===r.value())return;u(!0);const p=r.inputRef();p?.dispatchEvent(new Event("input",{bubbles:!0,cancelable:!0})),p?.dispatchEvent(new Event("change",{bubbles:!0,cancelable:!0}))},{defer:!0})),re(()=>fe(r.registerInput(s.id))),b(Ve,ne({as:"input",ref(m){var p=st(r.setInputRef,o.ref);typeof p=="function"&&p(m)},type:"radio",get name(){return t.name()},get value(){return r.value()},get checked(){return r.isSelected()},get required(){return t.isRequired()},get disabled(){return r.isDisabled()},get readonly(){return t.isReadOnly()},get style(){return gr({...fp},o.style)},get"aria-labelledby"(){return a()},get"aria-describedby"(){return l()},onChange:d,onFocus:h,onBlur:f},()=>r.dataset(),s))}function Pk(e){const t=_u(),n=Ne({id:t.generateId("label")},e);return re(()=>fe(t.registerLabel(n.id))),b(Ve,ne({as:"label",get for(){return t.inputId()}},()=>t.dataset(),n))}function Rk(e){return b(th,ne({as:"span"},e))}function cz(e){let t;const n=`radiogroup-${an()}`,r=Ne({id:n,orientation:"vertical"},e),[i,o,s]=se(r,["ref","value","defaultValue","onChange","orientation","aria-labelledby","aria-describedby"],Vg),[a,l]=El({value:()=>i.value,defaultValue:()=>i.defaultValue,onChange:g=>i.onChange?.(g)}),{formControlContext:c}=qg(o);nh(()=>t,()=>l(i.defaultValue??""));const u=()=>c.getAriaLabelledBy(he(o.id),s["aria-label"],i["aria-labelledby"]),d=()=>c.getAriaDescribedBy(i["aria-describedby"]),h=g=>g===e.defaultValue,f=g=>g===a(),p={ariaDescribedBy:d,isDefaultValue:h,isSelectedValue:f,setSelectedValue:g=>{if(!(c.isReadOnly()||c.isDisabled())&&(l(g),t))for(const v of t.querySelectorAll("[type='radio']")){const y=v;y.checked=f(y.value)}}};return b(eh.Provider,{value:c,get children(){return b(oz.Provider,{value:p,get children(){return b(Ve,ne({as:"div",ref(g){var v=st(y=>t=y,i.ref);typeof v=="function"&&v(g)},role:"radiogroup",get id(){return he(o.id)},get"aria-invalid"(){return c.validationState()==="invalid"||void 0},get"aria-required"(){return c.isRequired()||void 0},get"aria-disabled"(){return c.isDisabled()||void 0},get"aria-readonly"(){return c.isReadOnly()||void 0},get"aria-orientation"(){return i.orientation},get"aria-labelledby"(){return u()},get"aria-describedby"(){return d()}},()=>c.dataset(),s))}})}})}var Xg=Object.assign(cz,{Description:Aa,ErrorMessage:La,Item:az,ItemControl:Dk,ItemDescription:Mk,ItemIndicator:Ok,ItemInput:lz,ItemLabel:Pk,Label:Rk}),uz=pt();function dz(){const e=ut(uz);if(e===void 0)throw new Error("[kobalte]: `useSegmentedControlContext` must be used within a `SegmentedControl` component");return e}function M5e(e){const t=dz(),[n,r]=se(e,["style"]),[i,o]=de(),[s,a]=de(!1),l=()=>{const u=t.selectedItem();if(!u){o(void 0);return}o({width:`${u.offsetWidth}px`,height:`${u.offsetHeight}px`,transform:c(u),"transition-duration":s()?"0ms":void 0})},c=u=>{const d=getComputedStyle(u.parentElement),h=u.offsetLeft-Number.parseFloat(d.paddingLeft),f=u.offsetTop-Number.parseFloat(d.paddingTop);return`translate(${h}px, ${f}px)`};return re(gt(t.selectedItem,()=>{a(!i()),l(),a(!1)})),Ik(t.root,()=>{Xe(()=>{a(!0),l(),a(!1)})}),b(Ve,ne({as:"div",role:"presentation",get style(){return gr(i(),n.style)},get"data-resizing"(){return s()},get"data-orientation"(){return t.orientation()}},r))}var O5e=e=>{const t=Yg(),n=dz(),[r,i]=se(e,["ref"]),[o,s]=de();return re(()=>{const a=o();a&&t.isSelectedValue(e.value)&&n.setSelectedItem(a)}),b(Xg.Item,ne({ref(a){var l=st(s,r.ref);typeof l=="function"&&l(a)}},i))},P5e=e=>{const t=_u(),[n,r]=se(e,["ref"]),[i,o]=de();return nh(i,()=>{requestAnimationFrame(()=>{t.isDefault()&&t.select()})}),b(Xg.ItemInput,ne({ref(s){var a=st(o,n.ref);typeof a=="function"&&a(s)}},r))},R5e=e=>{const t=ne({defaultValue:e.value,orientation:"horizontal"},e),[n,r]=se(t,["ref"]),[i,o]=de(),[s,a]=de(),l={value:()=>r.value,defaultValue:()=>r.defaultValue,orientation:()=>r.orientation,root:i,selectedItem:s,setSelectedItem:a};return re(()=>{l.value()||a(void 0)}),b(uz.Provider,{value:l,get children(){return b(Xg,ne({ref(c){var u=st(o,n.ref);typeof u=="function"&&u(c)}},r))}})},rd=Object.assign(R5e,{Description:Aa,ErrorMessage:La,Indicator:M5e,Item:O5e,ItemControl:Dk,ItemDescription:Mk,ItemIndicator:Ok,ItemInput:P5e,ItemLabel:Pk,Label:Rk}),N5e=ee("<div role=presentation data-slot=radio-group-wrapper><div role=presentation data-slot=radio-group-items>"),z5e=ee("<span data-slot=radio-group-item-control>");function p9(e){const[t,n]=se(e,["class","classList","options","current","defaultValue","value","label","onSelect","size","fill","pad"]),r=s=>t.value?t.value(s):String(s),i=s=>t.label?t.label(s):String(s),o=s=>t.options.find(a=>r(a)===s);return b(rd,ne(n,{"data-component":"radio-group",get"data-size"(){return t.size??"medium"},get"data-fill"(){return t.fill?"":void 0},get"data-pad"(){return t.pad??"normal"},get classList(){return{...t.classList,[t.class??""]:!!t.class}},get value(){return je(()=>!!t.current)()?r(t.current):void 0},get defaultValue(){return je(()=>!!t.defaultValue)()?r(t.defaultValue):void 0},onChange:s=>t.onSelect?.(o(s)),get children(){var s=N5e(),a=s.firstChild;return j(s,b(rd.Indicator,{"data-slot":"radio-group-indicator"}),a),j(a,b(Ut,{get each(){return t.options},children:l=>b(rd.Item,{get value(){return r(l)},"data-slot":"radio-group-item",get"data-value"(){return r(l)},get children(){return[b(rd.ItemInput,{"data-slot":"radio-group-item-input"}),b(rd.ItemLabel,{"data-slot":"radio-group-item-label",get children(){var c=z5e();return j(c,()=>i(l)),c}})]}})})),s}}))}var j5e={};vr(j5e,{Description:()=>Aa,ErrorMessage:()=>La,Input:()=>hz,Label:()=>th,Root:()=>pz,TextArea:()=>gz,TextField:()=>qa,useTextFieldContext:()=>Nk});var fz=pt();function Nk(){const e=ut(fz);if(e===void 0)throw new Error("[kobalte]: `useTextFieldContext` must be used within a `TextField` component");return e}function hz(e){return b(mz,ne({type:"text"},e))}function mz(e){const t=Si(),n=Nk(),r=Ne({id:n.generateId("input")},e),[i,o,s]=se(r,["onInput"],_k),{fieldProps:a}=Ck(o);return b(Ve,ne({as:"input",get id(){return a.id()},get name(){return t.name()},get value(){return n.value()},get required(){return t.isRequired()},get disabled(){return t.isDisabled()},get readonly(){return t.isReadOnly()},get"aria-label"(){return a.ariaLabel()},get"aria-labelledby"(){return a.ariaLabelledBy()},get"aria-describedby"(){return a.ariaDescribedBy()},get"aria-invalid"(){return t.validationState()==="invalid"||void 0},get"aria-required"(){return t.isRequired()||void 0},get"aria-disabled"(){return t.isDisabled()||void 0},get"aria-readonly"(){return t.isReadOnly()||void 0},get onInput(){return wt([i.onInput,n.onInput])}},()=>t.dataset(),s))}function pz(e){let t;const n=`textfield-${an()}`,r=Ne({id:n},e),[i,o,s]=se(r,["ref","value","defaultValue","onChange"],Vg),a=i.value,[l,c]=El({value:()=>a===void 0?void 0:i.value??"",defaultValue:()=>i.defaultValue,onChange:f=>i.onChange?.(f)}),{formControlContext:u}=qg(o);nh(()=>t,()=>c(i.defaultValue??""));const d=f=>{if(u.isReadOnly()||u.isDisabled())return;const m=f.target;c(m.value),m.value=l()??""},h={value:l,generateId:$r(()=>he(o.id)),onInput:d};return b(eh.Provider,{value:u,get children(){return b(fz.Provider,{value:h,get children(){return b(Ve,ne({as:"div",ref(f){var m=st(p=>t=p,i.ref);typeof m=="function"&&m(f)},role:"group",get id(){return he(o.id)}},()=>u.dataset(),s))}})}})}function gz(e){let t;const n=Nk(),r=Ne({id:n.generateId("textarea")},e),[i,o]=se(r,["ref","autoResize","submitOnEnter","onKeyPress"]);re(gt([()=>t,()=>i.autoResize,()=>n.value()],([a,l])=>{!a||!l||F5e(a)}));const s=a=>{t&&i.submitOnEnter&&a.key==="Enter"&&!a.shiftKey&&t.form&&(t.form.requestSubmit(),a.preventDefault())};return b(mz,ne({as:"textarea",get"aria-multiline"(){return i.submitOnEnter?"false":void 0},get onKeyPress(){return wt([i.onKeyPress,s])},ref(a){var l=st(c=>t=c,i.ref);typeof l=="function"&&l(a)}},o))}function F5e(e){const t=e.style.alignSelf,n=e.style.overflow;"MozAppearance"in e.style||(e.style.overflow="hidden"),e.style.alignSelf="start",e.style.height="auto",e.style.height=`${e.scrollHeight+(e.offsetHeight-e.clientHeight)}px`,e.style.overflow=n,e.style.alignSelf=t}var qa=Object.assign(pz,{Description:Aa,ErrorMessage:La,Input:hz,Label:th,TextArea:gz}),U5e=ee("<div data-slot=input-wrapper>");function na(e){const t=Qo(),[n,r]=se(e,["name","defaultValue","value","onChange","onKeyDown","validationState","required","disabled","readOnly","class","label","hideLabel","description","error","variant","copyable","copyKind","multiline"]),[i,o]=de(!1),s=()=>i()?t.t("ui.textField.copied"):n.copyKind==="link"?t.t("ui.textField.copyLink"):t.t("ui.textField.copyToClipboard"),a=()=>i()?"check":n.copyKind==="link"?"link":"copy";async function l(){const u=n.value??n.defaultValue??"";await Ww(u)&&($t({variant:"success",icon:"circle-check",title:t.t("ui.message.copied"),description:n.copyKind==="link"?t.t("ui.message.copiedLink"):t.t("ui.message.copiedText")}),o(!0),setTimeout(()=>o(!1),2e3))}function c(){n.copyable&&l()}return b(qa,{"data-component":"input",get"data-variant"(){return n.variant||"normal"},get name(){return n.name},get defaultValue(){return n.defaultValue},get value(){return n.value},get onChange(){return n.onChange},get onKeyDown(){return n.onKeyDown},onClick:c,get required(){return n.required},get disabled(){return n.disabled},get readOnly(){return n.readOnly},get validationState(){return n.validationState},get children(){return[b(ce,{get when(){return n.label},get children(){return b(qa.Label,{"data-slot":"input-label",get classList(){return{"sr-only":n.hideLabel}},get children(){return n.label}})}}),(()=>{var u=U5e();return j(u,b(ce,{get when(){return n.multiline},get fallback(){return b(qa.Input,ne(r,{"data-slot":"input-input",get class(){return n.class}}))},get children(){return b(qa.TextArea,ne(r,{autoResize:!0,"data-slot":"input-input",get class(){return n.class}}))}}),null),j(u,b(ce,{get when(){return n.copyable},get children(){return b(bn,{get value(){return s()},placement:"top",gutter:4,get forceOpen(){return i()},skipDelayDuration:0,get children(){return b(Jr,{type:"button",get icon(){return a()},variant:"ghost",onClick:l,tabIndex:-1,"data-slot":"input-copy-button",get"aria-label"(){return s()}})}})}}),null),u})(),b(ce,{get when(){return n.description},get children(){return b(qa.Description,{"data-slot":"input-description",get children(){return n.description}})}}),b(qa.ErrorMessage,{"data-slot":"input-error",get children(){return n.error}})]}})}function H5e(e,t){const n=new Date(e),i=new Date().getTime()-n.getTime(),o=Math.floor(i/1e3),s=Math.floor(o/60),a=Math.floor(s/60),l=Math.floor(a/24);return o<60?t("common.time.justNow"):s<60?t("common.time.minutesAgo.short",{count:s}):a<24?t("common.time.hoursAgo.short",{count:a}):t("common.time.daysAgo.short",{count:l})}var B5e=ee('<div class="flex h-full items-center justify-center text-text-weak">'),V5e=ee('<div class="flex h-full items-center justify-center px-8 text-center text-14-regular text-text-weak">'),q5e=ee('<div class="flex flex-col gap-1">'),W5e=ee('<div class="flex h-full min-h-0 flex-col gap-3 px-4 pb-4"><div class="flex shrink-0 flex-col gap-2"><div class="flex items-center gap-2"><div class="min-w-0 flex-1 [&amp;_[data-slot=input-wrapper]:focus-within]:!border-border-weak-base [&amp;_[data-slot=input-wrapper]:focus-within]:!shadow-none"></div></div><div class="flex flex-wrap items-center gap-2"></div></div><div class="min-h-0 flex-1 overflow-y-auto no-scrollbar">'),G5e=ee('<button type=button class="group flex w-full min-w-0 items-center gap-3 rounded-md px-2 py-2 text-left hover:bg-surface-raised-base-hover focus:outline-none focus:bg-surface-raised-base-hover"><div class="flex size-8 shrink-0 items-center justify-center rounded-md bg-surface-base text-icon-weak"></div><div class="min-w-0 flex-1"><div class="truncate text-14-medium text-text-strong"></div><div class="flex min-w-0 items-center gap-2 text-12-regular text-text-weak"><span class=truncate></span><span class=shrink-0>-</span><span class=shrink-0></span><span class=shrink-0>-</span><span class=shrink-0></span></div></div><div class="flex shrink-0 items-center gap-1 text-12-medium text-text-weak transition-colors group-hover:text-text-base"><span>');const vz=1440*60*1e3,K5e=10080*60*1e3,Z5e=30*vz,Y5e=e=>[e.session.title,e.session.id,e.workspace.label,e.workspace.directory].join(" ").toLowerCase(),Nc=e=>e.time.archived??0,yz=e=>Nc(e)+Z5e,X5e=e=>Math.max(1,Math.ceil((yz(e)-Date.now())/vz)),J5e=(e,t)=>{const n=Nc(t.session)-Nc(e.session);return n!==0?n:t.session.id.localeCompare(e.session.id)};function Q5e(e){const t=Gi(),n=ko(),r=At(),i=xo(),o={token:0},[s,a]=Je({search:"",scope:"all",age:"all",loading:!0,error:!1,sessions:[]}),l=F(()=>[{value:"all",label:r.t("archiveSessions.filter.scope.all")},e.workspaces.some(f=>f.kind==="local")?{value:"local",label:r.t("workspace.type.local")}:void 0,e.workspaces.some(f=>f.kind==="sandbox")?{value:"sandbox",label:r.t("workspace.type.sandbox")}:void 0].filter(f=>!!f)),c=F(()=>[{value:"all",label:r.t("archiveSessions.filter.age.all")},{value:"recent",label:r.t("archiveSessions.filter.age.recent")},{value:"older",label:r.t("archiveSessions.filter.age.older")}]),u=()=>{o.token+=1;const f=o.token;a({loading:!0,error:!1}),Promise.all(e.workspaces.map(m=>t.client.session.list({directory:m.directory,roots:!0,archived:!0,limit:500}).then(p=>({failed:!1,items:(p.data??[]).filter(g=>!!g?.id&&!!g.time?.archived).map(g=>({session:g,workspace:m}))})).catch(()=>({failed:!0,items:[]})))).then(m=>{if(o.token!==f)return;const p=Date.now();a({loading:!1,error:m.some(g=>g.failed),sessions:m.flatMap(g=>g.items).filter(g=>yz(g.session)>p).sort(J5e)})})},d=F(()=>{const f=s.search.trim().toLowerCase(),m=Date.now()-K5e;return s.sessions.filter(p=>s.scope==="all"||p.workspace.kind===s.scope).filter(p=>s.age==="all"?!0:s.age==="recent"?Nc(p.session)>=m:Nc(p.session)<m).filter(p=>!f||Y5e(p).includes(f))}),h=f=>{i(`/${dt(f.workspace.directory)}/session/${f.session.id}`),n.close()};return Kt(u),b(Yc,{get title(){return r.t("archiveSessions.title")},size:"large",get children(){var f=W5e(),m=f.firstChild,p=m.firstChild,g=p.firstChild,v=p.nextSibling,y=m.nextSibling;return j(g,b(na,{get value(){return s.search},onChange:w=>a("search",w),get placeholder(){return r.t("archiveSessions.search.placeholder")},get label(){return r.t("archiveSessions.search.label")},hideLabel:!0,autofocus:!0})),j(p,b(bn,{get value(){return r.t("common.refresh")},placement:"top",get children(){return b(Jr,{icon:"reset",variant:"ghost",class:"size-8 rounded-md shrink-0",get"aria-label"(){return r.t("common.refresh")},get disabled(){return s.loading},onClick:u})}}),null),j(v,b(ce,{get when(){return l().length>1},get children(){return b(p9,{size:"small",get options(){return l()},get current(){return l().find(w=>w.value===s.scope)},value:w=>w.value,label:w=>w.label,onSelect:w=>{w&&a("scope",w.value)}})}}),null),j(v,b(p9,{size:"small",get options(){return c()},get current(){return c().find(w=>w.value===s.age)},value:w=>w.value,label:w=>w.label,onSelect:w=>{w&&a("age",w.value)}}),null),j(y,b(Il,{get children(){return[b(Cn,{get when(){return s.loading},get children(){var w=B5e();return j(w,b(Kg,{class:"size-4"})),w}}),b(Cn,{get when(){return d().length===0},get children(){var w=V5e();return j(w,(()=>{var k=je(()=>!!s.error);return()=>k()?r.t("archiveSessions.error"):r.t("archiveSessions.empty")})()),w}}),b(Cn,{when:!0,get children(){var w=q5e();return j(w,b(Ut,{get each(){return d()},children:k=>{const x=F(()=>FN(k.session.title));return(()=>{var C=G5e(),S=C.firstChild,$=S.nextSibling,O=$.firstChild,D=O.nextSibling,M=D.firstChild,I=M.nextSibling,L=I.nextSibling,A=L.nextSibling,T=A.nextSibling,N=$.nextSibling,W=N.firstChild;return C.$$click=()=>h(k),j(S,b(Ht,{name:"archive",size:"small"})),j(O,x),j(M,()=>k.workspace.label),j(L,()=>r.t("archiveSessions.archivedAt",{time:H5e(new Date(Nc(k.session)).toISOString(),r.t)})),j(T,()=>r.t("archiveSessions.deletesIn",{count:X5e(k.session)})),j(N,b(Ht,{name:"eye",size:"small"}),W),j(W,()=>r.t("common.open")),C})()}})),w}})]}})),f}})}or(["click"]);var eke=ee('<div class="flex flex-col gap-4 pl-6 pr-2.5 pb-3"><div class="flex flex-col gap-1"><span class="text-14-regular text-text-strong"></span><span class="text-12-regular text-text-weak"></span></div><div class="flex justify-end gap-2">'),tke=ee('<div class="flex flex-col gap-4 pl-6 pr-2.5 pb-3"><div class="flex flex-col gap-1"><span class="text-14-regular text-text-strong"></span><span class="text-12-regular text-text-weak"> <!> </span></div><div class="flex justify-end gap-2">'),g9=ee("<div>"),nke=ee('<div class="flex-1 min-h-0 -mt-4 flex items-center justify-center px-6 pb-64 text-center"><div class="mt-8 flex max-w-60 flex-col items-center gap-6 text-center"><div class="flex flex-col gap-3"><div class="text-14-medium text-text-strong"></div><div class="text-14-regular text-text-base"style=line-height:var(--line-height-normal)>'),rke=ee('<div class="flex-1 min-h-0 flex flex-col gap-2 px-1 pt-4"><div class="px-3 text-12-medium text-text-base uppercase tracking-wider"></div><div class="flex flex-col gap-1 overflow-y-auto no-scrollbar"></div><div class="px-1 pt-2">'),ike=ee('<button type=button class="flex items-center gap-2 px-3 py-2 rounded-md hover:bg-surface-base-hover text-left"><span class="text-14-medium text-text-strong truncate">'),oke=ee('<span class="text-12-regular text-text-base truncate select-text">'),ske=ee('<div class="shrink-0 pl-1 py-1"><div class="group/project flex items-start justify-between gap-2 py-2 pl-2 pr-0"><div class="flex flex-col min-w-0">'),v9=ee('<div class="shrink-0 py-4">'),ake=ee('<div class="size-full flex flex-col py-2 gap-4 overflow-y-auto no-scrollbar [overflow-anchor:none]">'),lke=ee('<div class="relative flex-1 min-h-0">'),cke=ee('<div class="flex-1 min-h-0 flex flex-col">'),uke=ee('<div class="flex-1 min-h-0">'),dke=ee('<div class="hidden xl:block absolute inset-y-0 z-30 w-0 overflow-visible">'),fke=ee('<div class="relative bg-background-base flex-1 min-h-0 min-w-0 flex flex-col select-none [&amp;_input]:select-text [&amp;_textarea]:select-text [&amp;_[contenteditable]]:select-text"data-component=layout-shell><div class="flex-1 min-h-0 min-w-0 flex"><div class="flex-1 min-h-0 relative"><div class="size-full relative overflow-x-hidden"><nav data-component=sidebar-nav-wide><div class="@container w-full h-full contain-strict"></div></nav><div class="hidden xl:block pointer-events-none absolute top-0 right-0 z-0 border-t border-border-weaker-base"style=left:4rem></div><div class=xl:hidden><div></div><nav data-component=sidebar-nav-mobile></nav></div><div><main>'),hy=ee("<div class=size-full>"),hke=ee('<div class="size-full flex flex-col items-center justify-center gap-4 p-6 text-center"><div class="text-14-medium text-text-strong"></div><div class="text-12-regular text-text-weak max-w-md break-words">');function mke(e){const t=sr(),n=t.scope,[r,i,,o]=ir(In.server(n,"layout.page",["layout.page.v1"]),Je({lastProjectSession:{},activeProject:void 0,activeWorkspace:void 0,workspaceOrder:{},workspaceName:{},workspaceBranchName:{},workspaceExpanded:{},sessionExpanded:{}})),s=F(()=>o());let a,l=0,c=!1;const u=ri(),d=Gi(),h=Jn(),f=zl(),m=F(()=>f.ready()),p=qi(),g=hu(),v=Xf(),y=fk(),w=xo();_be(w),Yf();const k=ko(),x=M$(),C=Ane(),S=At(),$=_r(u.dir),O=So();re(()=>{const R=u.dir;R&&_r(R)===void 0&&w("/",{replace:!0})});const D=F(()=>{const R=u.dir;if(!R)return{slug:R,dir:""};const U=_r(R);if(!U)return{slug:R,dir:""};const Q=h.peek(U,{bootstrap:!1});return{slug:R,store:Q,dir:Q[0].path.directory||U}}),M=F(()=>{const R=O.pathname.match(/^\/cron\/worktree\/([^/?#]+)\/session(?:\/([^/?#]+))?/);if(R){const le=_r(R[1]);return le?{cron:!0,dir:le,sessionID:R[2]?decodeURIComponent(R[2]):void 0,slug:R[1]}:void 0}const U=O.pathname.match(/^\/([^/]+)\/session(?:\/([^/?#]+))?/),Q=_r(U?.[1]);if(!(!U||!Q))return{cron:!1,dir:Q,sessionID:U[2]?decodeURIComponent(U[2]):void 0,slug:U[1]}}),I=["system","light","dark"],L={system:"theme.scheme.system",light:"theme.scheme.light",dark:"theme.scheme.dark"},A=R=>S.t(L[R]),T=F(()=>D().dir||M()?.dir||""),N=R=>R==="/cron"||R.startsWith("/cron/"),W=R=>R==="/"||R==="/notifications"||R==="/modes"||R==="/models"||R==="/mcp"||R==="/plugins"||R==="/skills",K=F(()=>ip(O.pathname)),V=F(()=>W(O.pathname)),q=F(()=>N(O.pathname)),B=F(()=>new URLSearchParams(O.search).get("projectID")??void 0),Y=F(()=>!!M()?.dir&&!!M()?.sessionID&&(M()?.cron||new URLSearchParams(O.search).get("sidebar")==="cron")),J=F(()=>{if(Y())return!0;const R=T(),U=u.id??M()?.sessionID;if(!R||!U)return!1;const[Q]=h.child(R,{bootstrap:!1}),le=Q.session.find(ve=>ve.id===U);return Tk(le)}),ge=F(()=>q()||J());re(gt(()=>M()?.dir,R=>{R&&h.project.loadSessions(R)},{defer:!0})),re(gt(()=>[J(),M()?.cron,M()?.dir,M()?.sessionID],([R,U,Q,le])=>{if(!R||U||!Q||!le)return;const[ve]=h.child(Q,{bootstrap:!1}),me=new URLSearchParams({sidebar:"cron"});ve.project&&me.set("projectID",ve.project),w(`/cron/worktree/${dt(Q)}/session/${le}?${me.toString()}`,{replace:!0})}));const ae=F(()=>{const R=f.projects.list().filter(_e=>_e.id!=="global"),U=(h.data.project??[]).filter(_e=>_e.id!=="global"),Q=_e=>{if(_e)return R.find(Pe=>Pe.id===_e.id||Be(Pe.worktree)===Be(_e.worktree))},le=(_e,Pe)=>ba(_e.worktree,Pe)||!!_e.sandboxes?.some(Fe=>ba(Fe,Pe)),ve=O.pathname.match(/^\/cron\/worktree\/([^/?#]+)/);if(ve){const _e=_r(ve[1]);if(_e){const Pe=R.find(lt=>lt.id===B())??Q(U.find(lt=>lt.id===B()));if(Pe&&le(Pe,_e))return Pe;const Fe=R.find(lt=>Be(lt.worktree)===Be(_e))??Q(U.find(lt=>Be(lt.worktree)===Be(_e)));if(Fe)return Fe}}const me=O.pathname.match(/^\/cron\/([^/?#]+)/);if(me){const _e=B()??decodeURIComponent(me[1]),Pe=R.find(Fe=>Fe.id===_e)??Q(U.find(Fe=>Fe.id===_e));if(Pe)return Pe}const Ae=T();if(Ae){const _e=R.find(lt=>lt.worktree===Ae)??Q(U.find(lt=>lt.worktree===Ae));if(_e)return _e;const[Pe]=h.child(Ae,{bootstrap:!1}),Fe=Pe.project;if(Fe){const lt=R.find(tt=>tt.id===Fe)??Q(U.find(tt=>tt.id===Fe));if(lt)return lt}}}),Te=F(()=>i5e(O.pathname)),pe=F(()=>{if(m()){if(K())return"settings";if(V())return"global";if(ge()){const R=ae();return`cron:${R?.id??R?.worktree??M()?.slug??u.dir??"unknown"}`}if(u.dir)return`project:${u.dir}`}}),[ue,Le]=Je({autoselect:!$&&!W(O.pathname)&&!ip(O.pathname)&&!N(O.pathname),busyWorkspaces:{},hoverProject:void 0,scrollSessionKey:void 0,nav:void 0,sortNow:Date.now(),sizing:!1}),$e=swe(),ht=(R,U)=>{const Q=Be(R);if(U){Le("busyWorkspaces",Q,!0);return}Le("busyWorkspaces",Ge(le=>{delete le[Q]}))},Bt=R=>!!ue.busyWorkspaces[Be(R)],Mt={current:void 0},zt=()=>ue.sortNow;let En,ar;const _i=()=>typeof document=="object"&&document.visibilityState==="hidden",lr=()=>{_i()||Le("sortNow",Date.now())},Ar=()=>{ar===void 0&&(ar=setInterval(lr,6e4))},nn=()=>{ar!==void 0&&(clearInterval(ar),ar=void 0)},Io=setTimeout(()=>{lr(),_i()||Ar()},6e4-Date.now()%6e4),cr=Sbe({enabled:()=>!1,active:()=>ue.hoverProject,el:()=>ue.nav?.querySelector("[data-component='sidebar-rail']")??ue.nav,onActivate:()=>{}});fe(()=>{c=!0,l+=1,Mt.current!==void 0&&clearTimeout(Mt.current),clearTimeout(Io),ar&&clearInterval(ar),En!==void 0&&clearTimeout(En),cr.reset()}),Kt(()=>{const R=()=>Le("sizing",!1),U=()=>Da(),Q=()=>{if(document.visibilityState!=="hidden"){Ar();return}nn(),Da()};Ln(window,"pointerup",R),Ln(window,"pointercancel",R),Ln(window,"blur",R),Ln(window,"blur",U),Ln(document,"visibilitychange",Q)});const yr=F(()=>!f.sidebar.opened()&&ue.hoverProject!==void 0),Us=F(()=>f.sidebar.opened()||yr()),ii=R=>{Le("hoverProject",R),cr.reset()},ss=()=>queueMicrotask(()=>ii(void 0));re(gt(pe,(R,U)=>{if(R&&R!==U){if(ii(void 0),R==="global"){f.sidebar.close();return}f.sidebar.open()}})),re(gt(()=>[m(),O.pathname,O.search,ge()],([R,,,U])=>{!R||!U||(ii(void 0),f.sidebar.open())}));const qr=()=>{Mt.current!==void 0&&(clearTimeout(Mt.current),Mt.current=void 0)},Da=()=>{qr(),ii(void 0)},oh=()=>{f.sidebar.opened()||ue.hoverProject!==void 0&&(qr(),Mt.current=window.setTimeout(()=>{Mt.current=void 0,ii(void 0)},300))},sh=F(()=>{const R=ue.hoverProject;if(R)return f.projects.list().find(U=>U.worktree===R)});re(()=>{f.sidebar.opened()&&ii(void 0)}),re(()=>{if(!ue.autoselect)return;const R=u.dir;!R||!_r(R)||Le("autoselect",!1)});const Cu=$e.editorOpen,ah=$e.openEditor,Vl=$e.closeEditor,ql=$e.setEditor,oi=$e.InlineEditor,as=()=>{f.sidebar.opened()||Da()},ur=R=>{as(),w(R),f.mobileSidebar.hide()};function Iu(R=1){const U=C.colorScheme(),Q=I.indexOf(U),le=Q===-1?0:(Q+R+I.length)%I.length,ve=I[le];C.setColorScheme(ve),$t({title:S.t("toast.scheme.title"),description:A(ve)})}function lh(R){R!==S.locale()&&(S.setLocale(R),$t({title:S.t("toast.language.title"),description:S.t("toast.language.description",{language:S.label(R)})}))}function Tu(R=1){const U=S.locales,Q=U.indexOf(S.locale()),le=Q===-1?0:(Q+R+U.length)%U.length,ve=U[le];ve&&lh(ve)}Kt(()=>{const R=new Map,U=new Map,Q=5e3,le=me=>{const Ae=R.get(me);Ae!==void 0&&(nl.dismiss(Ae),R.delete(me),U.delete(me))},ve=d.event.listen(me=>{if(me.details?.type==="worktree.ready"){ht(me.name,!1),g0.ready(me.name,n.key);return}if(me.details?.type==="worktree.failed"){ht(me.name,!1),g0.failed(me.name,me.details.properties?.message??S.t("common.requestFailed"),n.key);return}if(me.details?.type==="question.replied"||me.details?.type==="question.rejected"||me.details?.type==="permission.replied"){const c1=me.details.properties,ij=`${me.name}:${c1.sessionID}`;le(ij);return}if(me.details?.type!=="permission.asked"&&me.details?.type!=="question.asked")return;const Ae=me.details.type==="permission.asked"?S.t("notification.permission.title"):S.t("notification.question.title"),_e=me.details.type==="permission.asked"?"checklist":"bubble-5",Pe=me.name,Fe=me.details.properties;if(me.details.type==="permission.asked"&&y.autoResponds(me.details.properties,Pe))return;const[lt]=h.child(Pe,{bootstrap:!1}),tt=lt.session.find(c1=>c1.id===Fe.sessionID),We=`${Pe}:${Fe.sessionID}`,_t=tt?.title??S.t("command.session.new"),Xt=tr(Pe),Ke=me.details.type==="permission.asked"?S.t("notification.permission.description",{sessionTitle:_t,projectName:Xt}):S.t("notification.question.description",{sessionTitle:_t,projectName:Xt}),Et=`/${dt(Pe)}/session/${Fe.sessionID}`,gn=Date.now(),Ot=U.get(We)??0;if(gn-Ot<Q)return;U.set(We,gn),me.details.type==="permission.asked"&&(g.sounds.permissionsEnabled()&&w2(g.sounds.permissions()),g.notifications.permissions()&&p.notify(Ae,Ke,Et)),me.details.type==="question.asked"&&g.notifications.agent()&&p.notify(Ae,Ke,Et);const On=u.id,Pn=Be(Pe)===Be(T()),Pu=Pn&&Fe.sessionID===On,l1=Pn&&tt?.parentID===On,nj=Cbe({desktop:p.desktop,enabled:me.details.type==="permission.asked"?g.notifications.permissions():g.notifications.agent()});if(!Ibe({desktopNativeNotificationEnabled:nj,currentSessionTarget:Pu,childSessionTarget:l1})){le(We);return}le(We);const rj=$t({persistent:!0,icon:_e,title:Ae,description:Ke,actions:[{label:S.t("notification.action.goToSession"),onClick:()=>w(Et)},{label:S.t("common.dismiss"),onClick:"dismiss"}]});R.set(We,rj)});fe(ve),re(()=>{const me=u.id;if(!T()||!me)return;const Ae=`${T()}:${me}`;le(Ae);const[_e]=h.child(T(),{bootstrap:!1}),Pe=_e.session.filter(Fe=>Fe.parentID===me);for(const Fe of Pe)le(`${T()}:${Fe.id}`)})});function r1(R,U){if(!a||ue.scrollSessionKey===U)return;const Q=a.querySelector(`[data-session-id="${R}"]`);if(!Q)return;const le=a.getBoundingClientRect(),ve=Q.getBoundingClientRect();if(ve.top>=le.top&&ve.bottom<=le.bottom){Le("scrollSessionKey",U);return}Le("scrollSessionKey",U),Q.scrollIntoView({block:"nearest",behavior:"smooth"})}const cn=F(()=>{if(ge())return ae();const R=T();if(!R)return;const U=Be(R),Q=f.projects.list(),le=Q.find(Fe=>Fe.sandboxes?.some(lt=>Be(lt)===U));if(le)return le;const ve=Q.find(Fe=>Be(Fe.worktree)===U);if(ve)return ve;const[me]=h.child(R,{bootstrap:!1}),Ae=me.project;if(!Ae)return;const Pe=h.data.project.find(Fe=>Fe.id===Ae)?.worktree;if(Pe)return Q.find(Fe=>Fe.worktree===Pe)});re(gt(()=>[s(),m(),V(),K(),ge(),T(),u.dir],([R,U,Q,le,ve,me,Ae])=>{!R||!U||Q||le||ve||!me||!Ae||f.projects.open(me)}));const[uh]=Xo(async()=>{if(await o.promise,await f.ready.promise,!ot(()=>ue.autoselect))return;const R=f.projects.list(),U=t.projects.last();if(R.length===0){if(!U)return;await Pa(U,!0)}else{const Q=R.find(le=>le.worktree===U)??R[0];if(!Q)return;await Pa(Q.worktree,!0)}}),Eu=(R,U,Q)=>{const le=Be(R),ve=r.workspaceName[le]??r.workspaceName[R];if(ve)return ve;if(U&&Q)return r.workspaceBranchName[U]?.[Q]},wn=(R,U,Q,le)=>{const ve=Be(R);i("workspaceName",ve,U),Q&&le&&(r.workspaceBranchName[Q]||i("workspaceBranchName",Q,{}),i("workspaceBranchName",Q,le,U))},To=(R,U,Q)=>Eu(R,Q,U)??U??tr(R),dh=F(()=>{const R=cn();return!R||R.vcs!=="git"?!1:f.sidebar.workspaces(R.worktree)()}),Ma=F(()=>{const R=cn();return Z2e({project:R,currentDirectory:T(),workspacesEnabled:dh(),workspaces:Ou(R),expanded:r.workspaceExpanded})});re(()=>{if(!s()||!m())return;const R=f.projects.list();for(const[U,Q]of Object.entries(r.workspaceExpanded)){if(!Q)continue;const le=Be(U),ve=R.find(me=>Be(me.worktree)===le||me.sandboxes?.some(Ae=>Be(Ae)===le));ve&&(ve.vcs==="git"&&f.sidebar.workspaces(ve.worktree)()||i("workspaceExpanded",U,!1))}});const Eo=F(()=>{const R=zt(),U=Ma();if(U.length===0)return[];const Q=[];for(const le of U){const[ve]=h.child(le,{bootstrap:!0}),me=yf(ve,R,le);Q.push(...me)}return Q}),$u=200,fh=2,i1=10,si=4,Zi={value:0},Hs=new Map,Au=10,Bs=new Map,Wl=R=>{const U=Bs.get(R);if(U)return U;const Q=new Set;return Bs.set(R,Q),Q},Yi=(R,U)=>{const Q=Wl(R);return MO({seen:Q,keep:U,limit:Au,preserve:u.id&&Be(R)===Be(T())?[u.id]:void 0})};re(()=>{const R=new Set(Ma());for(const U of Bs.keys())R.has(U)||Bs.delete(U)}),re(()=>{D(),d.url,Zi.value+=1,Ohe(n.key),Hs.clear()}),re(()=>{const R=new Set(Ma());for(const[U,Q]of Hs)R.has(U)||(Q.pending.length=0,Q.pendingSet.clear(),Q.running===0&&Hs.delete(U))});const Lu=R=>{const U=Hs.get(R);if(U)return U;const Q={inflight:new Set,pending:[],pendingSet:new Set,running:0};return Hs.set(R,Q),Q},Gl=(R,U)=>{if(R.length===0)return U.slice().sort((le,ve)=>le.id<ve.id?-1:le.id>ve.id?1:0);const Q=new Map;for(const le of R)Q.set(le.id,le);for(const le of U)Q.set(le.id,le);return[...Q.values()].sort((le,ve)=>le.id<ve.id?-1:le.id>ve.id?1:0)};async function o1(R,U,Q){const[le,ve]=h.child(R,{bootstrap:!1});return Phe({scope:n.key,directory:R,sessionID:U,task:me=>Qt(()=>d.client.session.messages({directory:R,sessionID:U,limit:$u})).then(Ae=>{if(Zi.value!==Q||!Ox(n.key,R,U,me))return;const _e=(Ae.data??[]).filter(Ke=>!!Ke?.info?.id),Pe=_e.map(Ke=>Ke.info).filter(Ke=>!!Ke?.id),Fe=Gl([],Pe),lt=Yi(R,U),tt=Ae.response.headers.get("x-next-cursor")??void 0,We={limit:Fe.length,cursor:tt,complete:!tt,at:Date.now()};if(lt.length>0){CO(n.key,R,lt);for(const Ke of lt)h.todo.set(Ke,void 0)}const _t=le.message[U]??[],Xt=Gl(_t.filter(Ke=>!!Ke?.id),Fe);if(Ox(n.key,R,U,me))return Xe(()=>{lt.length>0&&ve(Ge(Ke=>{fg(Ke,lt)})),ve("message",U,St(Xt,{key:"id"})),Jb({scope:n.key,directory:R,sessionID:U,...We});for(const Ke of _e){const Et=le.part[Ke.info.id]??[],gn=Gl(Et.filter(Ot=>!!Ot?.id),Ke.parts.filter(Ot=>!!Ot?.id));ve("part",Ke.info.id,St(gn,{key:"id"}))}}),We}).catch(()=>{})})}const Du=R=>{const U=Lu(R);if(U.running>=fh)return;const Q=U.pending.shift();if(!Q)return;U.pendingSet.delete(Q),U.inflight.add(Q),U.running+=1;const le=Zi.value;o1(R,Q,le).finally(()=>{U.running-=1,U.inflight.delete(Q),Du(R)})},$o=(R,U="low")=>{const Q=R.directory;if(!Q)return;const[le]=h.child(Q,{bootstrap:!1});if(ot(()=>{const Pe=Xb(n.key,Q,R.id);return Dhe({message:le.message[R.id]!==void 0,info:Pe,chunk:$u})}))return;const me=Lu(Q);if(me.inflight.has(R.id))return;if(me.pendingSet.has(R.id)){if(U!=="high")return;const Pe=me.pending.indexOf(R.id);Pe>0&&(me.pending.splice(Pe,1),me.pending.unshift(R.id));return}const Ae=Wl(Q);if(!(!Ae.has(R.id)&&Ae.size>=Au&&U!=="high")){for(U==="high"&&me.pending.unshift(R.id),U!=="high"&&me.pending.push(R.id),me.pendingSet.add(R.id);me.pending.length>i1;){const Pe=me.pending.pop();Pe&&me.pendingSet.delete(Pe)}Du(Q)}},Kl=(R,U)=>{for(let Q=1;Q<=si;Q++){const le=R[U+Q];le&&$o(le,Q===1?"high":"low");const ve=R[U-Q];ve&&$o(ve,Q===1?"high":"low")}};re(()=>{const R=Eo();if(R.length===0)return;const U=u.id?R.findIndex(Q=>Q.id===u.id):0;if(U!==-1){if(!u.id){const Q=R[U];Q&&$o(Q,"high")}Kl(R,U)}});function Ze(R){const U=Eo();if(U.length===0)return;const Q=u.id?U.findIndex(me=>me.id===u.id):-1;let le;Q===-1?le=R>0?0:U.length-1:le=(Q+R+U.length)%U.length;const ve=U[le];ve&&($o(ve,"high"),Kl(U,le),Uk(ve))}function X(R){const U=f.projects.list();if(U.length===0)return;const Q=cn()?.worktree,le=T()?dr(T()):void 0,ve=Q??le,me=ve?U.findIndex(_e=>_e.worktree===ve):-1,Ae=me===-1?R>0?U[0]:U[U.length-1]:U[(me+R+U.length)%U.length];Ae&&(h.child(Ae.worktree),Pa(Ae.worktree))}function be(R){const U=Eo();if(U.length===0||!U.some(me=>v.session.unseenCount(me.id)>0))return;const le=u.id?U.findIndex(me=>me.id===u.id):-1,ve=le===-1?R>0?-1:0:le;for(let me=1;me<=U.length;me++){const Ae=R>0?(ve+me)%U.length:(ve-me+U.length)%U.length,_e=U[Ae];if(_e&&v.session.unseenCount(_e.id)!==0){$o(_e,"high"),Kl(U,Ae),Uk(_e);return}}}async function He(R){const[U,Q]=h.child(R.directory),le=U.session??[],ve=le.findIndex(Ae=>Ae.id===R.id),me=le[ve+1]??le[ve-1];await d.client.session.update({directory:R.directory,sessionID:R.id,time:{archived:Date.now()}}),Q(Ge(Ae=>{const _e=Jt.search(Ae.session,R.id,Pe=>Pe.id);_e.found&&Ae.session.splice(_e.index,1)})),R.id===u.id&&w(me?`/${u.dir}/session/${me.id}`:`/${u.dir}/session`)}x.register("layout",()=>{const R=[{id:"sidebar.toggle",title:S.t("command.sidebar.toggle"),category:S.t("command.category.view"),keybind:"mod+b",onSelect:()=>{O.pathname==="/"||O.pathname==="/notifications"||f.sidebar.toggle()}},{id:"project.open",title:S.t("command.project.open"),category:S.t("command.category.project"),keybind:"mod+o",onSelect:()=>Mu()},{id:"project.previous",title:S.t("command.project.previous"),category:S.t("command.category.project"),keybind:"mod+alt+arrowup",onSelect:()=>X(-1)},{id:"project.next",title:S.t("command.project.next"),category:S.t("command.category.project"),keybind:"mod+alt+arrowdown",onSelect:()=>X(1)},{id:"provider.connect",title:S.t("command.provider.connect"),category:S.t("command.category.provider"),onSelect:()=>Zt()},...p.desktop?[{id:"server.switch",title:S.t("command.server.switch"),category:S.t("command.category.server"),onSelect:()=>Vn()}]:[],{id:"settings.open",title:S.t("command.settings.open"),category:S.t("command.category.settings"),keybind:"mod+comma",onSelect:()=>pn()},{id:"quickSwitcher.open",title:S.t("command.quickSwitcher.open"),category:S.t("command.category.view"),keybind:"mod+j",onSelect:()=>br()},{id:"session.previous",title:S.t("command.session.previous"),category:S.t("command.category.session"),keybind:"alt+arrowup",onSelect:()=>Ze(-1)},{id:"session.next",title:S.t("command.session.next"),category:S.t("command.category.session"),keybind:"alt+arrowdown",onSelect:()=>Ze(1)},{id:"session.previous.unseen",title:S.t("command.session.previous.unseen"),category:S.t("command.category.session"),keybind:"shift+alt+arrowup",onSelect:()=>be(-1)},{id:"session.next.unseen",title:S.t("command.session.next.unseen"),category:S.t("command.category.session"),keybind:"shift+alt+arrowdown",onSelect:()=>be(1)},{id:"session.archive",title:S.t("command.session.archive"),category:S.t("command.category.session"),keybind:"mod+shift+backspace",disabled:!u.dir||!u.id,onSelect:()=>{const U=Eo().find(Q=>Q.id===u.id);U&&He(U)}},{id:"workspace.new",title:S.t("workspace.new"),category:S.t("command.category.workspace"),keybind:"mod+shift+w",disabled:!dh(),onSelect:()=>{const U=cn();if(U)return Gk(U)}},{id:"workspace.toggle",title:S.t("command.workspace.toggle"),description:S.t("command.workspace.toggle.description"),category:S.t("command.category.workspace"),slash:"workspace",disabled:!cn()||cn()?.vcs!=="git",onSelect:()=>{const U=cn();if(!U||U.vcs!=="git")return;const Q=f.sidebar.workspaces(U.worktree)();f.sidebar.toggleWorkspaces(U.worktree),$t({title:Q?S.t("toast.workspace.disabled.title"):S.t("toast.workspace.enabled.title"),description:Q?S.t("toast.workspace.disabled.description"):S.t("toast.workspace.enabled.description")})}}];R.push({id:"theme.scheme.cycle",title:S.t("command.theme.scheme.cycle"),category:S.t("command.category.theme"),keybind:"mod+shift+s",onSelect:()=>Iu(1)});for(const U of I)R.push({id:`theme.scheme.${U}`,title:S.t("command.theme.scheme.set",{scheme:A(U)}),category:S.t("command.category.theme"),onSelect:()=>C.commitPreview(),onHighlight:()=>(C.previewColorScheme(U),()=>C.cancelPreview())});R.push({id:"language.cycle",title:S.t("command.language.cycle"),category:S.t("command.category.language"),onSelect:()=>Tu(1)});for(const U of S.locales)R.push({id:`language.set.${U}`,title:S.t("command.language.set",{language:S.label(U)}),category:S.t("command.category.language"),onSelect:()=>lh(U)});return R});function Zt(){const R=++l;z(()=>import("./dialog-select-provider-DBHvhmzI.js").then(U=>U.d),__vite__mapDeps([99,98,100,101])).then(U=>{c||l!==R||k.show(()=>b(U.DialogSelectProvider,{}))})}function Vn(){if(!p.desktop)return;if(p.serverManager){p.serverManager.show();return}const R=++l;z(()=>import("./dialog-select-server-HywTbVo8.js"),__vite__mapDeps([97,98])).then(U=>{c||l!==R||k.show(()=>b(U.DialogSelectServer,{}))})}function pn(){ur("/settings")}function br(){const R=++l;z(()=>import("./dialog-quick-switcher-PP1cl-AC.js"),[]).then(U=>{c||l!==R||k.show(()=>b(U.DialogQuickSwitcher,{get currentDirectory(){return T()},onChooseProject:()=>void Mu(),onSwitchServer:()=>Vn()}))})}function dr(R){const U=Be(R),Q=f.projects.list().find(_e=>Be(_e.worktree)===U||_e.sandboxes?.some(Pe=>Be(Pe)===U));if(Q)return Q.worktree;const le=Object.entries(r.workspaceOrder).find(([_e,Pe])=>Be(_e)===U||Pe.some(Fe=>Be(Fe)===U));if(le)return le[0];const[ve]=h.child(R,{bootstrap:!1}),me=ve.project;return me?h.data.project.find(_e=>_e.id===me)?.worktree??R:R}function Wr(R){return cn()?.worktree??dr(R)}function Zl(R,U,Q=Wr(R)){return i("lastProjectSession",Q,{directory:R,id:U,at:Date.now()}),Q}function $n(R){r.lastProjectSession[R]&&i("lastProjectSession",Ge(U=>{delete U[R]}))}function hh(R,U,Q=Wr(R)){return Zl(R,U,Q),v.session.markViewed(U),ot(()=>r.workspaceExpanded[R])===!1&&i("workspaceExpanded",R,!0),requestAnimationFrame(()=>r1(U,`${R}:${U}`)),Q}async function Oa(R){if(!R)return;const U=dr(R),Q=`/${dt(U)}/session`;t.projects.touch(U),ur(Q);const le=f.projects.list().find(tt=>tt.worktree===U);let ve=le?y0(U,[U,...le.sandboxes??[]],r.workspaceOrder[U]):[U];const me=tt=>tt?ve.some(We=>Be(We)===Be(tt)):!1,Ae=async tt=>{if(!tt||tt===U||me(tt))return me(tt);const We=await d.client.worktree.list({directory:U}).then(_t=>_t.data??[]).catch(()=>[]);return ve=y0(U,[U,...We],r.workspaceOrder[U]),me(tt)},_e=async tt=>{if(!me(tt.directory))return!1;const[We]=h.child(tt.directory,{bootstrap:!1});if(We.session.some(Xt=>Xt.id===tt.id))return i("lastProjectSession",U,{directory:tt.directory,id:tt.id,at:Date.now()}),ur(`/${dt(tt.directory)}/session/${tt.id}`),!0;const _t=await d.client.session.get({sessionID:tt.id}).then(Xt=>Xt.data).catch(()=>{});return!_t?.directory||!me(_t.directory)?!1:(i("lastProjectSession",U,{directory:_t.directory,id:_t.id,at:Date.now()}),ur(`/${dt(_t.directory)}/session/${_t.id}`),!0)},Pe=r.lastProjectSession[U];if(Pe?.id){if(await Ae(Pe.directory),await _e(Pe))return;$n(U)}const Fe=o9(ve.map(tt=>h.child(tt,{bootstrap:!1})[0]),Date.now());if(Fe&&await _e(Fe))return;const lt=o9(await Promise.all(ve.map(async tt=>({path:{directory:tt},session:await d.client.session.list({directory:tt}).then(We=>We.data??[]).catch(()=>[])}))),Date.now());lt&&await _e(lt)}function Uk(R){R&&ur(`/${dt(R.directory)}/session/${R.id}`)}function Pa(R,U=!0){if(f.projects.open(R),U)return Oa(R)}const Hk=R=>{if(t.isLocal()){for(const U of ewe(R))Pa(U);for(const U of twe(R)){Pa(U.directory,!1);const Q=dt(U.directory);U.prompt&&$be(n.key,Q,{prompt:U.prompt});const le=U.prompt?`/${Q}/session?prompt=${encodeURIComponent(U.prompt)}`:`/${Q}/session`;ur(le)}}};Kt(()=>{const R=U=>{const le=U.detail?.urls??[];le.length!==0&&Hk(le)};Hk(nwe(window)),Ln(window,X2e,R)});async function jz(R,U){const Q=Ek(R);if(U===Q)return;const le=U===tr(R.worktree)?"":U;if(R.id&&R.id!=="global"){await d.client.project.update({projectID:R.id,directory:R.worktree,name:le});return}h.project.meta(R.worktree,{name:le})}const Fz=(R,U,Q,le)=>{(Eu(R,Q,le)??le??tr(R))!==U&&wn(R,U,Q,le)};function Bk(R){const U=f.projects.list(),Q=Be(R),le=U.findIndex(Ae=>Be(Ae.worktree)===Q),ve=Be(cn()?.worktree??"")===Q;if(le===-1)return;const me=U[le+1];if(!ve){f.projects.close(R);return}if(!me){f.projects.close(R),w("/");return}ur(`/${dt(me.worktree)}/session`),f.projects.close(R),queueMicrotask(()=>{Oa(me.worktree)})}function Vk(R){if(f.sidebar.workspaces(R.worktree)()){f.sidebar.toggleWorkspaces(R.worktree);return}R.vcs==="git"&&f.sidebar.toggleWorkspaces(R.worktree)}const qk=R=>{const U=++l;z(()=>import("./dialog-edit-project-g8UJkKZf.js"),[]).then(Q=>{c||l!==U||k.show(()=>b(Q.DialogEditProject,{project:R}))})};async function Mu(){function R(U){if(Array.isArray(U)){for(const Q of U)Pa(Q,!1);Oa(U[0])}else U&&Pa(U)}if(p.openDirectoryPickerDialog&&t.isLocal()){const U=await p.openDirectoryPickerDialog?.({title:S.t("command.project.open"),multiple:!0});R(U)}else{const U=++l;z(()=>import("./dialog-select-directory-DlfczDen.js"),__vite__mapDeps([102,103,98])).then(Q=>{c||l!==U||k.show(()=>b(Q.DialogSelectDirectory,{multiple:!0,onSelect:R}),()=>R(null))})}}const Uz=async(R,U,Q=!1)=>{if(U===R)return;const le=T(),ve=Be(le),me=Be(U),Ae=Q||!!u.dir&&ve===me;!Q&&Ae&&ur(`/${dt(R)}/session`),ht(U,!0);const _e=await d.client.worktree.remove({directory:R,worktreeRemoveInput:{directory:U}}).then(_t=>_t.data).catch(_t=>($t({title:S.t("workspace.delete.failed.title"),description:dy(_t,S.t("common.requestFailed"))}),!1));if(ht(U,!1),!_e||(Be(r.lastProjectSession[R]?.directory??"")===Be(U)&&$n(R),h.set("project",Ge(_t=>{const Xt=_t.find(Ke=>Ke.worktree===R);Xt&&(Xt.sandboxes=(Xt.sandboxes??[]).filter(Ke=>Ke!==U))})),i("workspaceOrder",R,_t=>(_t??[]).filter(Xt=>Xt!==U)),f.projects.close(U),f.projects.open(R),Ae))return;const Pe=T(),Fe=Be(Pe),lt=f.projects.list().find(_t=>_t.worktree===R),We=(lt?y0(R,[R,...lt.sandboxes??[]],r.workspaceOrder[R]):[R]).some(_t=>Be(_t)===Fe);u.dir&&dr(Pe)===R&&!We&&ur(`/${dt(R)}/session`)},Hz=async(R,U)=>{if(U===R)return;ht(U,!0);const Q=$t({persistent:!0,title:S.t("workspace.resetting.title"),description:S.t("workspace.resetting.description")}),le=()=>nl.dismiss(Q),ve=await d.client.session.list({directory:U}).then(_e=>_e.data??[]).catch(()=>[]);if(D1e(n,U,ve.map(_e=>_e.id),p),await d.client.instance.dispose({directory:U}).catch(()=>{}),!await d.client.worktree.reset({directory:R,worktreeResetInput:{directory:U}}).then(_e=>_e.data).catch(_e=>($t({title:S.t("workspace.reset.failed.title"),description:dy(_e,S.t("common.requestFailed"))}),!1))){ht(U,!1),le();return}const Ae=Date.now();await Promise.all(ve.filter(_e=>_e.time.archived===void 0).map(_e=>d.client.session.update({sessionID:_e.id,directory:_e.directory,time:{archived:Ae}}).catch(()=>{}))),ht(U,!1),le(),$t({title:S.t("workspace.reset.success.title"),description:S.t("workspace.reset.success.description"),actions:[{label:S.t("command.session.new"),onClick:()=>{const _e=`/${dt(U)}/session`;w(_e),f.mobileSidebar.hide()}},{label:S.t("common.dismiss"),onClick:"dismiss"}]})};function Bz(R){const U=F(()=>tr(R.directory)),[Q,le]=Je({status:"loading",dirty:!1});Kt(()=>{d.client.file.status({directory:R.directory}).then(Ae=>{const Pe=(Ae.data??[]).length>0;le({status:"ready",dirty:Pe})}).catch(()=>{le({status:"error",dirty:!1})})});const ve=()=>{const Ae=!!u.dir&&Be(T())===Be(R.directory);Ae&&ur(`/${dt(R.root)}/session`),k.close(),Uz(R.root,R.directory,Ae)},me=()=>Q.status==="loading"?S.t("workspace.status.checking"):Q.status==="error"?S.t("workspace.status.error"):Q.dirty?S.t("workspace.status.dirty"):S.t("workspace.status.clean");return b(Yc,{get title(){return S.t("workspace.delete.title")},fit:!0,get children(){var Ae=eke(),_e=Ae.firstChild,Pe=_e.firstChild,Fe=Pe.nextSibling,lt=_e.nextSibling;return j(Pe,()=>S.t("workspace.delete.confirm",{name:U()})),j(Fe,me),j(lt,b(Gt,{variant:"ghost",size:"large",onClick:()=>k.close(),get children(){return S.t("common.cancel")}}),null),j(lt,b(Gt,{variant:"primary",size:"large",get disabled(){return Q.status==="loading"},onClick:ve,get children(){return S.t("workspace.delete.button")}}),null),Ae}})}function Vz(R){const U=F(()=>tr(R.directory)),[Q,le]=Je({status:"loading",dirty:!1,sessions:[]}),ve=async()=>{const lt=(await d.client.session.list({directory:R.directory}).then(tt=>tt.data??[]).catch(()=>[])).filter(tt=>tt.time.archived===void 0);le({sessions:lt})};Kt(()=>{d.client.file.status({directory:R.directory}).then(Fe=>{const tt=(Fe.data??[]).length>0;le({status:"ready",dirty:tt}),ve()}).catch(()=>{le({status:"error",dirty:!1})})});const me=()=>{k.close(),Hz(R.root,R.directory)},Ae=()=>Q.sessions.length,_e=()=>Q.status==="loading"?S.t("workspace.status.checking"):Q.status==="error"?S.t("workspace.status.error"):Q.dirty?S.t("workspace.status.dirty"):S.t("workspace.status.clean"),Pe=()=>{const Fe=Ae();return Fe===0?S.t("workspace.reset.archived.none"):Fe===1?S.t("workspace.reset.archived.one"):S.t("workspace.reset.archived.many",{count:Fe})};return b(Yc,{get title(){return S.t("workspace.reset.title")},fit:!0,get children(){var Fe=tke(),lt=Fe.firstChild,tt=lt.firstChild,We=tt.nextSibling,_t=We.firstChild,Xt=_t.nextSibling;Xt.nextSibling;var Ke=lt.nextSibling;return j(tt,()=>S.t("workspace.reset.confirm",{name:U()})),j(We,_e,_t),j(We,Pe,Xt),j(We,()=>S.t("workspace.reset.note"),null),j(Ke,b(Gt,{variant:"ghost",size:"large",onClick:()=>k.close(),get children(){return S.t("common.cancel")}}),null),j(Ke,b(Gt,{variant:"primary",size:"large",get disabled(){return Q.status==="loading"},onClick:me,get children(){return S.t("workspace.reset.button")}}),null),Fe}})}const fr={session:"",sessionProject:"",directory:""};re(gt(()=>[s(),D().slug,u.id,cn()?.worktree,T()],([R,U,Q,le,ve])=>{if(!R||!U||!ve){fr.session="",fr.sessionProject="",fr.directory="";return}if(!Q){fr.session="",fr.sessionProject="",fr.directory="";return}const me=`${U}/${Q}`;if(!le){fr.session=me,fr.directory=ve,fr.sessionProject="";return}if(t.projects.last()!==le&&t.projects.touch(le),me!==fr.session||ve!==fr.directory){fr.session=me,fr.directory=ve,fr.sessionProject=hh(ve,Q,le);return}le!==fr.sessionProject&&(fr.directory=ve,fr.sessionProject=Zl(ve,Q,le))})),re(()=>{const R=f.sidebar.opened()?f.sidebar.width():48;document.documentElement.style.setProperty("--dialog-left-margin",`${R}px`)});const mh=F(()=>Math.max(f.sidebar.width(),244)),s1=F(()=>Math.max(mh()-64,0)),ph=new Set;re(gt(Ma,R=>{if(R.length===0){ph.clear();return}const U=new Set(R);for(const Q of U)ph.has(Q)||h.project.loadSessions(Q);ph.clear();for(const Q of U)ph.add(Q)},{defer:!0}));function qz(R){const U=tp(R);U&&(ii(void 0),i("activeProject",U))}function Wz(R){const{draggable:U,droppable:Q}=R;if(U&&Q){const le=f.projects.list(),ve=le.findIndex(Ae=>Ae.worktree===U.id.toString()),me=le.findIndex(Ae=>Ae.worktree===Q.id.toString());ve!==me&&me!==-1&&f.projects.move(U.id.toString(),me)}}function Gz(){i("activeProject",void 0)}function Ou(R){if(!R)return[];const U=R.worktree,Q=[U,...R.sandboxes??[]],le=cn(),ve=Be(le?.worktree??"")===Be(R.worktree)?T():void 0,me=ve&&Be(ve)!==Be(U)&&!Q.some(Pe=>Be(Pe)===Be(ve))?ve:void 0,Ae=me?g0.get(me,n.key)?.status==="pending":!1,_e=y0(U,Q,r.workspaceOrder[R.worktree]);return Ae&&me?[U,me,..._e.filter(Pe=>Pe!==U)]:!me||Ae?_e:[..._e,me]}function Kz(R,U){return Ou(R).filter(Q=>!U||Be(Q)===Be(U)).map(Q=>{const le=h.child(Q,{bootstrap:!1})[0],ve=Be(Q)===Be(R.worktree)?"local":"sandbox",me=To(Q,le.vcs?.branch,R.id);return{directory:Q,kind:ve,label:`${ve==="local"?S.t("workspace.type.local"):S.t("workspace.type.sandbox")} : ${me}`}})}function Zz(R,U){k.show(()=>b(Q5e,{get workspaces(){return Kz(R,U)}}))}const Wk=F(()=>{if(f.sidebar.opened())return cn();const R=sh();return R||cn()});function Yz(R){const U=tp(R);U&&i("activeWorkspace",U)}function Xz(R){const{draggable:U,droppable:Q}=R;if(!U||!Q)return;const le=Wk();if(!le)return;const ve=Ou(le),me=ve.findIndex(Fe=>Fe===U.id.toString()),Ae=ve.findIndex(Fe=>Fe===Q.id.toString());if(me===-1||Ae===-1||me===Ae)return;const _e=ve.slice(),[Pe]=_e.splice(me,1);Pe&&(_e.splice(Ae,0,Pe),i("workspaceOrder",le.worktree,_e.filter(Fe=>Be(Fe)!==Be(le.worktree))))}function Jz(){i("activeWorkspace",void 0)}const Gk=async R=>{as();const U=await d.client.worktree.create({directory:R.worktree}).then(me=>me.data).catch(me=>{$t({title:S.t("workspace.create.failed.title"),description:dy(me,S.t("common.requestFailed"))})});if(!U?.directory)return;wn(U.directory,U.branch,R.id,U.branch);const Q=R.worktree,le=Be(U.directory),ve=Be(Q);ht(U.directory,!0),g0.pending(U.directory,n.key),i("workspaceExpanded",le,!0),le!==U.directory&&i("workspaceExpanded",U.directory,!0),i("workspaceOrder",R.worktree,me=>{const _e=(me??[]).filter(Pe=>{const Fe=Be(Pe);return Fe!==ve&&Fe!==le});return[U.directory,..._e]}),h.child(U.directory),ur(`/${dt(U.directory)}/session`)},Kk={currentDir:T,navList:Eo,sidebarExpanded:Us,sidebarHovering:yr,clearHoverProjectSoon:ss,prefetchSession:$o,archiveSession:He,workspaceName:Eu,renameWorkspace:Fz,editorOpen:Cu,openEditor:ah,closeEditor:Vl,setEditor:ql,InlineEditor:oi,isBusy:Bt,workspaceExpanded:(R,U)=>r.workspaceExpanded[R]??U,setWorkspaceExpanded:(R,U)=>i("workspaceExpanded",R,U),sessionExpanded:R=>r.sessionExpanded[R]??!0,setSessionExpanded:(R,U)=>i("sessionExpanded",R,U),showResetWorkspaceDialog:(R,U)=>k.show(()=>b(Vz,{root:R,directory:U})),showDeleteWorkspaceDialog:(R,U)=>k.show(()=>b(Bz,{root:R,directory:U})),showArchivedSessionsDialog:R=>{const U=cn();U&&Zz(U,R)},setScrollContainerRef:(R,U)=>{U||(a=R)}},Qz={currentDir:T,currentProject:cn,sidebarOpened:()=>f.sidebar.opened(),sidebarHovering:yr,hoverProject:()=>ue.hoverProject,onProjectMouseEnter:(R,U)=>cr.enter(R,U),onProjectMouseLeave:R=>cr.leave(R),onProjectFocus:R=>cr.activate(R),onHoverOpenChanged:(R,U)=>{!U&&ue.hoverProject&&ue.hoverProject!==R||Le("hoverProject",U?R:void 0)},navigateToProject:Oa,openSidebar:()=>f.sidebar.open(),closeProject:Bk,showEditProjectDialog:qk,toggleProjectWorkspaces:Vk,workspacesEnabled:R=>R.vcs==="git"&&f.sidebar.workspaces(R.worktree)(),workspaceIds:Ou,workspaceLabel:To,sessionProps:{navList:Eo,sidebarExpanded:Us,clearHoverProjectSoon:ss,prefetchSession:$o,archiveSession:He,sessionExpanded:R=>r.sessionExpanded[R]??!0,setSessionExpanded:(R,U)=>i("sessionExpanded",R,U)}},Zk=R=>{const U=R.project,Q=F(()=>R.mobile||(R.merged??f.sidebar.opened())),le=F(()=>!u.dir&&f.projects.list().length===0),ve=F(()=>{const Ke=U();return Ke?Ke.name||tr(Ke.worktree):""}),me=F(()=>U()?.id??""),Ae=F(()=>U()?.worktree??""),_e=F(()=>T()||Ae()),Pe=F(()=>{const Ke=Ae();return Ke?dt(Ke):""}),Fe=F(()=>{const Ke=U();return Ke?Ou(Ke):[]}),lt=F(()=>Fe().reduce((Ke,Et)=>Ke+v.project.unseenCount(Et),0)),tt=()=>Fe().filter(Ke=>v.project.unseenCount(Ke)>0).forEach(Ke=>v.project.markViewed(Ke)),We=F(()=>{const Ke=U();return!Ke||Ke.vcs!=="git"?!1:f.sidebar.workspaces(Ke.worktree)()}),_t=F(()=>{const Ke=U();return Ke?Ke.vcs==="git"||f.sidebar.workspaces(Ke.worktree)():!1}),Xt=F(()=>h.data.path.home);return(()=>{var Ke=g9();return j(Ke,b(ce,{get when(){return U()},keyed:!0,get fallback(){return b(ce,{get when(){return le()},get fallback(){return b(ce,{get when(){return R.mobile},get children(){var Et=rke(),gn=Et.firstChild,Ot=gn.nextSibling,On=Ot.nextSibling;return j(gn,()=>S.t("home.projects.title")),j(Ot,b(Ut,{get each(){return a1()},children:Pn=>(()=>{var Pu=ike(),l1=Pu.firstChild;return Pu.$$click=()=>{w(`/${dt(Pn.worktree)}/session`),f.mobileSidebar.hide()},j(l1,()=>Pn.name||tr(Pn.worktree)),Pu})()})),j(On,b(Gt,{size:"normal",icon:"folder-add-left",onClick:Mu,get children(){return S.t("command.project.open")}})),Et}})},get children(){var Et=nke(),gn=Et.firstChild,Ot=gn.firstChild,On=Ot.firstChild,Pn=On.nextSibling;return j(On,()=>S.t("sidebar.empty.title")),j(Pn,()=>S.t("sidebar.empty.description")),j(gn,b(Gt,{size:"large",icon:"folder-add-left",onClick:Mu,get children(){return S.t("command.project.open")}}),null),Et}})},children:Et=>[(()=>{var gn=ske(),Ot=gn.firstChild,On=Ot.firstChild;return j(On,b(oi,{get id(){return`project:${me()}`},value:ve,onSave:Pn=>{jz(Et,Pn)},class:"text-14-medium text-text-strong truncate",displayClass:"text-14-medium text-text-strong truncate",stopPropagation:!0}),null),j(On,b(bn,{placement:"bottom",gutter:2,get value(){return Ae()},class:"shrink-0",contentStyle:{"max-width":"640px",transform:"translate3d(52px, 0, 0)"},get children(){var Pn=oke();return j(Pn,()=>Ae().replace(Xt(),"~")),Pn}}),null),j(Ot,b(on,{get modal(){return!yr()},get children(){return[b(on.Trigger,{as:Jr,icon:"dot-grid",variant:"ghost","data-action":"project-menu",get"data-project"(){return Pe()},class:"shrink-0 size-6 rounded-md transition-opacity data-[expanded]:bg-surface-base-active",get classList(){return{"opacity-100":R.mobile||Q(),"opacity-0 group-hover/project:opacity-100 group-focus-within/project:opacity-100 data-[expanded]:opacity-100":!R.mobile&&!Q()}},get"aria-label"(){return S.t("common.moreOptions")}}),b(on.Portal,{get children(){return b(on.Content,{class:"mt-1",get children(){return[b(on.Item,{onSelect:()=>{qk(Et)},get children(){return b(on.ItemLabel,{get children(){return S.t("common.edit")}})}}),b(on.Item,{"data-action":"project-workspaces-toggle",get"data-project"(){return Pe()},get disabled(){return!_t()},onSelect:()=>{Vk(Et)},get children(){return b(on.ItemLabel,{get children(){return je(()=>!!We())()?S.t("sidebar.workspaces.disable"):S.t("sidebar.workspaces.enable")}})}}),b(on.Item,{"data-action":"project-clear-notifications",get"data-project"(){return Pe()},get disabled(){return lt()===0},onSelect:tt,get children(){return b(on.ItemLabel,{get children(){return S.t("sidebar.project.clearNotifications")}})}}),b(on.Separator,{}),b(on.Item,{"data-action":"project-close-menu",get"data-project"(){return Pe()},onSelect:()=>{const Pn=Ae();Pn&&Bk(Pn)},get children(){return b(on.ItemLabel,{get children(){return S.t("common.close")}})}})]}})}})]}}),null),gn})(),(()=>{var gn=cke();return j(gn,b(ce,{get when(){return We()},get fallback(){return[(()=>{var Ot=v9();return j(Ot,b(Gt,{size:"large",icon:"new-session",class:"w-full",onClick:()=>{const On=_e();On&&ur(`/${dt(On)}/session`)},get children(){return S.t("command.session.new")}})),Ot})(),(()=>{var Ot=uke();return j(Ot,b(g4e,{ctx:Kk,project:Et,directory:_e,sortNow:zt,get mobile(){return R.mobile}})),Ot})()]},get children(){return[(()=>{var Ot=v9();return j(Ot,b(Gt,{size:"large",icon:"plus-small",class:"w-full",onClick:()=>{Gk(Et)},get children(){return S.t("workspace.new")}})),Ot})(),(()=>{var Ot=lke();return j(Ot,b(XR,{onDragStart:Yz,onDragEnd:Jz,onDragOver:Xz,collisionDetector:ZR,get children(){return[b(JR,{}),b(sN,{}),(()=>{var On=ake();return pr(Pn=>{R.mobile||(a=Pn)},On),j(On,b(tN,{get ids(){return Fe()},get children(){return b(Ut,{get each(){return Fe()},children:Pn=>b(p4e,{ctx:Kk,directory:Pn,project:Et,sortNow:zt,get mobile(){return R.mobile}})})}})),On})(),b(QR,{get children(){return b(f4e,{sidebarProject:Wk,activeWorkspace:()=>r.activeWorkspace,workspaceLabel:To})}})]}})),Ot})()]}})),gn})()]})),De(Et=>{var gn={"flex flex-col min-h-0 min-w-0 box-border px-3 border-r border-border-weak-base bg-background-base":!0,"shadow-[var(--shadow-lg)]":!Q(),"flex-1 min-w-0":R.mobile,"max-w-full overflow-hidden":R.mobile},Ot=R.mobile?void 0:`${s1()}px`;return Et.e=Ct(Ke,gn,Et.e),Ot!==Et.t&&Xr(Ke,"width",Et.t=Ot),Et},{e:void 0,t:void 0}),Ke})()},a1=()=>f.projects.list(),ej=()=>b(K4e,{projects:a1,activeProject:()=>r.activeProject}),tj=R=>{ur(r5e(R))},Yk=R=>b(u5e,{mobile:R,opened:()=>f.sidebar.opened(),get aimMove(){return cr.move},projects:a1,renderProject:U=>b(X4e,{ctx:Qz,project:U,sortNow:zt,mobile:R}),handleDragStart:qz,handleDragEnd:Gz,handleDragOver:Wz,get openProjectLabel(){return S.t("command.project.open")},openProjectKeybind:()=>x.keybind("project.open"),onOpenProject:Mu,renderProjectOverlay:ej,settingsLabel:()=>S.t("sidebar.settings"),settingsKeybind:()=>x.keybind("settings.open"),onOpenSettings:pn,restartLabel:()=>S.t("sidebar.restart"),restartConfirm:()=>S.t("sidebar.restart.confirm"),onRestart:()=>{p.restart?.()},renderPanel:()=>K()?b(o5e,{mobile:R,merged:!0,get width(){return s1()},current:Te,onSelect:tj}):ge()?(()=>{var U=g9();return j(U,b(A5e,{mobile:R,merged:!0,projectID:()=>ae()?.id,projectWorktree:()=>ae()?.worktree})),De(Q=>{var le={"flex flex-col min-h-0 min-w-0 box-border rounded-tl-[12px]":!0,"border-l border-t border-border-weaker-base bg-background-base":!R,"flex-1 min-w-0 max-w-full overflow-hidden":!!R},ve=R?void 0:`${s1()}px`;return Q.e=Ct(U,le,Q.e),ve!==Q.t&&Xr(U,"width",Q.t=ve),Q},{e:void 0,t:void 0}),U})():R?b(Zk,{project:cn,mobile:!0}):b(Zk,{project:cn,merged:!0})});return(()=>{var R=fke(),U=R.firstChild,Q=U.firstChild,le=Q.firstChild,ve=le.firstChild,me=ve.firstChild,Ae=ve.nextSibling,_e=Ae.nextSibling,Pe=_e.firstChild,Fe=Pe.nextSibling,lt=_e.nextSibling,tt=lt.firstChild;return j(R,()=>uh()??"",U),j(R,b(B2e,{}),U),ve.addEventListener("mouseleave",()=>{cr.reset(),yr()&&oh()}),ve.addEventListener("mouseenter",()=>{qr()}),pr(We=>{Le("nav",We)},ve),Ct(ve,{"hidden xl:block":!0,"absolute inset-y-0 left-0":!0,"z-10":!0}),j(me,Yk),j(le,b(ce,{get when(){return f.sidebar.opened()},get children(){var We=dke();return We.$$pointerdown=()=>Le("sizing",!0),j(We,b(fve,{direction:"horizontal",get size(){return f.sidebar.width()},min:244,get max(){return typeof window>"u"?1e3:window.innerWidth*.3+64},onResize:_t=>{Le("sizing",!0),En!==void 0&&clearTimeout(En),En=window.setTimeout(()=>Le("sizing",!1),120),f.sidebar.resize(_t)}})),De(_t=>Xr(We,"left",`${mh()}px`)),We}}),Ae),Pe.$$click=We=>{We.target===We.currentTarget&&f.mobileSidebar.hide()},Fe.$$click=We=>We.stopPropagation(),j(Fe,()=>Yk(!0)),Ct(tt,{"size-full overflow-hidden flex flex-col items-start contain-strict bg-background-base":!0}),j(tt,b(ce,{get when(){return!uh.loading},get fallback(){return hy()},get children(){return b(z9,{fallback:(We,_t)=>{const Xt=We instanceof Error?We.message:String(We);if((/failed to fetch dynamically imported module/i.test(Xt)||/importing a module script failed/i.test(Xt)||/dynamically imported module/i.test(Xt))&&typeof window<"u"){const Et="codeplane-stale-chunk-reload";if(sessionStorage.getItem(Et)!=="1")return sessionStorage.setItem(Et,"1"),window.location.reload(),hy()}return(()=>{var Et=hke(),gn=Et.firstChild,Ot=gn.nextSibling;return j(gn,()=>S.t("error.page.title")),j(Ot,()=>Xt||S.t("error.chain.unknown")),j(Et,b(Gt,{onClick:_t,get children(){return S.t("common.refresh")}}),null),Et})()},get children(){return b(j9,{get fallback(){return hy()},get children(){return e.children}})}})}})),j(U,(()=>{var We=je(()=>!1);return()=>We()&&b(Pbe,{})})(),null),j(R,b(Qs.Region,{}),null),De(We=>{var _t=S.t("sidebar.nav.projectsAndSessions"),Xt=`${mh()}px`,Ke={"fixed inset-x-0 top-10 bottom-0 z-40 bg-black/40 backdrop-blur-sm transition-opacity duration-300 ease-out":!0,"opacity-100 pointer-events-auto":f.mobileSidebar.opened(),"opacity-0 pointer-events-none":!f.mobileSidebar.opened()},Et=S.t("sidebar.nav.projectsAndSessions"),gn={"@container fixed top-10 bottom-0 left-0 z-50 overflow-hidden border-r border-border-weaker-base bg-background-base shadow-2xl transition-transform duration-300 ease-[cubic-bezier(0.32,0.72,0,1)]":!0,"w-[88vw] max-w-[360px] sm:max-w-[400px]":!!cn(),"w-[78vw] max-w-[300px]":!cn(),"translate-x-0":f.mobileSidebar.opened(),"-translate-x-full":!f.mobileSidebar.opened()},Ot={"absolute inset-0":!0,"xl:inset-y-0 xl:right-0 xl:left-[var(--main-left)]":!0,"z-20":!0,"transition-[left] duration-200 ease-[cubic-bezier(0.22,1,0.36,1)] will-change-[left] motion-reduce:transition-none":!ue.sizing},On=f.sidebar.opened()?`${mh()}px`:"4rem";return _t!==We.e&&Ye(ve,"aria-label",We.e=_t),Xt!==We.t&&Xr(ve,"width",We.t=Xt),We.a=Ct(Pe,Ke,We.a),Et!==We.o&&Ye(Fe,"aria-label",We.o=Et),We.i=Ct(Fe,gn,We.i),We.n=Ct(lt,Ot,We.n),On!==We.s&&Xr(lt,"--main-left",We.s=On),We},{e:void 0,t:void 0,a:void 0,o:void 0,i:void 0,n:void 0,s:void 0}),R})()}or(["click","pointerdown"]);var pke=ee("<option>"),gke=ee("<div aria-hidden=true><input type=text style=font-size:16px><select tabindex=-1><option>");function vke(e){let t;const[n,r]=se(e,["ref","onChange","collection","selectionManager","isOpen","isMultiple","isVirtualized","focusTrigger"]),i=Si(),[o,s]=de(!1),a=l=>{const c=n.collection.getItem(l);return b(ce,{get when(){return c?.type==="item"},get children(){var u=pke();return u.value=l,j(u,()=>c?.textValue),De(()=>u.selected=n.selectionManager.isSelected(l)),u}})};return re(gt(()=>n.selectionManager.selectedKeys(),(l,c)=>{c&&SR(l,c)||(s(!0),t?.dispatchEvent(new Event("input",{bubbles:!0,cancelable:!0})),t?.dispatchEvent(new Event("change",{bubbles:!0,cancelable:!0})))},{defer:!0})),(()=>{var l=gke(),c=l.firstChild,u=c.nextSibling;u.firstChild,c.addEventListener("focus",()=>n.focusTrigger()),u.addEventListener("change",h=>{ze(h,n.onChange),o()||n.selectionManager.setSelectedKeys(new Set([h.target.value])),s(!1)});var d=st(h=>t=h,n.ref);return typeof d=="function"&&pr(d,u),jr(u,ne({get multiple(){return n.isMultiple},get name(){return i.name()},get required(){return i.isRequired()},get disabled(){return i.isDisabled()},get size(){return n.collection.getSize()},get value(){return n.selectionManager.firstSelectedKey()??""}},r),!1,!0),j(u,b(ce,{get when(){return n.isVirtualized},get fallback(){return b(Ut,{get each(){return[...n.collection.getKeys()]},children:a})},get children(){return b(Ut,{get each(){return[...n.selectionManager.selectedKeys()]},children:a})}}),null),De(h=>{var f=fp,m=n.selectionManager.isFocused()||n.isOpen?-1:0,p=i.isRequired(),g=i.isDisabled(),v=i.isReadOnly();return h.e=up(l,f,h.e),m!==h.t&&Ye(c,"tabindex",h.t=m),p!==h.a&&(c.required=h.a=p),g!==h.o&&(c.disabled=h.o=g),v!==h.i&&(c.readOnly=h.i=v),h},{e:void 0,t:void 0,a:void 0,o:void 0,i:void 0}),l})()}var y9=new WeakMap;function yke(e){let t=y9.get(e);if(t!=null)return t;t=0;for(const n of e)n.type==="item"&&t++;return y9.set(e,t),t}var bke={};vr(bke,{Item:()=>Jg,ItemDescription:()=>Qg,ItemIndicator:()=>e1,ItemLabel:()=>t1,Listbox:()=>wke,Root:()=>jk,Section:()=>n1,useListboxContext:()=>wz});var bz=pt();function wz(){const e=ut(bz);if(e===void 0)throw new Error("[kobalte]: `useListboxContext` must be used within a `Listbox` component");return e}var kz=pt();function zk(){const e=ut(kz);if(e===void 0)throw new Error("[kobalte]: `useListboxItemContext` must be used within a `Listbox.Item` component");return e}function Jg(e){let t;const n=wz(),r=`${n.generateId("item")}-${an()}`,i=Ne({id:r},e),[o,s]=se(i,["ref","item","aria-label","aria-labelledby","aria-describedby","onPointerMove","onPointerDown","onPointerUp","onClick","onKeyDown","onMouseDown","onFocus"]),[a,l]=de(),[c,u]=de(),d=()=>n.listState().selectionManager(),h=()=>d().focusedKey()===o.item.key,f=Cg({key:()=>o.item.key,selectionManager:d,shouldSelectOnPressUp:n.shouldSelectOnPressUp,allowsDifferentPressOrigin:()=>n.shouldSelectOnPressUp()&&n.shouldFocusOnHover(),shouldUseVirtualFocus:n.shouldUseVirtualFocus,disabled:()=>o.item.disabled},()=>t),m=()=>{if(d().selectionMode()!=="none")return f.isSelected()},p=F(()=>!(xf()&&K9())),g=()=>p()?o["aria-label"]:void 0,v=()=>p()?a():void 0,y=()=>p()?c():void 0,w=()=>{if(!n.isVirtualized())return;const $=n.listState().collection().getItem(o.item.key)?.index;return $!=null?$+1:void 0},k=()=>{if(n.isVirtualized())return yke(n.listState().collection())},x=$=>{ze($,o.onPointerMove),$.pointerType==="mouse"&&!f.isDisabled()&&n.shouldFocusOnHover()&&(un($.currentTarget),d().setFocused(!0),d().setFocusedKey(o.item.key))},C=F(()=>({"data-disabled":f.isDisabled()?"":void 0,"data-selected":f.isSelected()?"":void 0,"data-highlighted":h()?"":void 0})),S={isSelected:f.isSelected,dataset:C,generateId:$r(()=>s.id),registerLabelId:en(l),registerDescriptionId:en(u)};return b(kz.Provider,{value:S,get children(){return b(Ve,ne({as:"li",ref($){var O=st(D=>t=D,o.ref);typeof O=="function"&&O($)},role:"option",get tabIndex(){return f.tabIndex()},get"aria-disabled"(){return f.isDisabled()},get"aria-selected"(){return m()},get"aria-label"(){return g()},get"aria-labelledby"(){return v()},get"aria-describedby"(){return y()},get"aria-posinset"(){return w()},get"aria-setsize"(){return k()},get"data-key"(){return f.dataKey()},get onPointerDown(){return wt([o.onPointerDown,f.onPointerDown])},get onPointerUp(){return wt([o.onPointerUp,f.onPointerUp])},get onClick(){return wt([o.onClick,f.onClick])},get onKeyDown(){return wt([o.onKeyDown,f.onKeyDown])},get onMouseDown(){return wt([o.onMouseDown,f.onMouseDown])},get onFocus(){return wt([o.onFocus,f.onFocus])},onPointerMove:x},C,s))}})}function Qg(e){const t=zk(),n=Ne({id:t.generateId("description")},e);return re(()=>fe(t.registerDescriptionId(n.id))),b(Ve,ne({as:"div"},()=>t.dataset(),n))}function e1(e){const t=zk(),n=Ne({id:t.generateId("indicator")},e),[r,i]=se(n,["forceMount"]);return b(ce,{get when(){return r.forceMount||t.isSelected()},get children(){return b(Ve,ne({as:"div","aria-hidden":"true"},()=>t.dataset(),i))}})}function t1(e){const t=zk(),n=Ne({id:t.generateId("label")},e);return re(()=>fe(t.registerLabelId(n.id))),b(Ve,ne({as:"div"},()=>t.dataset(),n))}function jk(e){let t;const n=`listbox-${an()}`,r=Ne({id:n,selectionMode:"single",virtualized:!1},e),[i,o]=se(r,["ref","children","renderItem","renderSection","value","defaultValue","onChange","options","optionValue","optionTextValue","optionDisabled","optionGroupChildren","state","keyboardDelegate","autoFocus","selectionMode","shouldFocusWrap","shouldUseVirtualFocus","shouldSelectOnPressUp","shouldFocusOnHover","allowDuplicateSelectionEvents","disallowEmptySelection","selectionBehavior","selectOnFocus","disallowTypeAhead","allowsTabNavigation","virtualized","scrollToItem","scrollRef","onKeyDown","onMouseDown","onFocusIn","onFocusOut"]),s=F(()=>i.state?i.state:Ig({selectedKeys:()=>i.value,defaultSelectedKeys:()=>i.defaultValue,onSelectionChange:i.onChange,allowDuplicateSelectionEvents:()=>he(i.allowDuplicateSelectionEvents),disallowEmptySelection:()=>he(i.disallowEmptySelection),selectionBehavior:()=>he(i.selectionBehavior),selectionMode:()=>he(i.selectionMode),dataSource:()=>i.options??[],getKey:()=>i.optionValue,getTextValue:()=>i.optionTextValue,getDisabled:()=>i.optionDisabled,getSectionChildren:()=>i.optionGroupChildren})),a=TR({selectionManager:()=>s().selectionManager(),collection:()=>s().collection(),autoFocus:()=>he(i.autoFocus),shouldFocusWrap:()=>he(i.shouldFocusWrap),keyboardDelegate:()=>i.keyboardDelegate,disallowEmptySelection:()=>he(i.disallowEmptySelection),selectOnFocus:()=>he(i.selectOnFocus),disallowTypeAhead:()=>he(i.disallowTypeAhead),shouldUseVirtualFocus:()=>he(i.shouldUseVirtualFocus),allowsTabNavigation:()=>he(i.allowsTabNavigation),isVirtualized:()=>i.virtualized,scrollToKey:()=>i.scrollToItem},()=>t,()=>i.scrollRef?.()),l={listState:s,generateId:$r(()=>o.id),shouldUseVirtualFocus:()=>r.shouldUseVirtualFocus,shouldSelectOnPressUp:()=>r.shouldSelectOnPressUp,shouldFocusOnHover:()=>r.shouldFocusOnHover,isVirtualized:()=>i.virtualized};return b(bz.Provider,{value:l,get children(){return b(Ve,ne({as:"ul",ref(c){var u=st(d=>t=d,i.ref);typeof u=="function"&&u(c)},role:"listbox",get tabIndex(){return a.tabIndex()},get"aria-multiselectable"(){return s().selectionManager().selectionMode()==="multiple"?!0:void 0},get onKeyDown(){return wt([i.onKeyDown,a.onKeyDown])},get onMouseDown(){return wt([i.onMouseDown,a.onMouseDown])},get onFocusIn(){return wt([i.onFocusIn,a.onFocusIn])},get onFocusOut(){return wt([i.onFocusOut,a.onFocusOut])}},o,{get children(){return b(ce,{get when(){return!i.virtualized},get fallback(){return i.children?.(s().collection)},get children(){return b(Jj,{get each(){return[...s().collection()]},by:"key",children:c=>b(Il,{get children(){return[b(Cn,{get when(){return c().type==="section"},get children(){return i.renderSection?.(c())}}),b(Cn,{get when(){return c().type==="item"},get children(){return i.renderItem?.(c())}})]}})})}})}}))}})}function n1(e){return b(Ve,ne({as:"li",role:"presentation"},e))}var wke=Object.assign(jk,{Item:Jg,ItemDescription:Qg,ItemIndicator:e1,ItemLabel:t1,Section:n1}),kke={};vr(kke,{Arrow:()=>xi,Content:()=>Sz,Description:()=>Aa,ErrorMessage:()=>La,HiddenSelect:()=>_z,Icon:()=>Cz,Item:()=>Jg,ItemDescription:()=>Qg,ItemIndicator:()=>e1,ItemLabel:()=>t1,Label:()=>Iz,Listbox:()=>Tz,Portal:()=>Ez,Root:()=>$z,Section:()=>n1,Select:()=>Ei,Trigger:()=>Az,Value:()=>Lz,useSelectContext:()=>Fs});var xz=pt();function Fs(){const e=ut(xz);if(e===void 0)throw new Error("[kobalte]: `useSelectContext` must be used within a `Select` component");return e}function Sz(e){let t;const n=Fs(),[r,i]=se(e,["ref","style","onCloseAutoFocus","onFocusOutside"]),o=a=>{n.close()},s=a=>{r.onFocusOutside?.(a),n.isOpen()&&n.isModal()&&a.preventDefault()};return mp({isDisabled:()=>!(n.isOpen()&&n.isModal()),targets:()=>t?[t]:[]}),pp({element:()=>t??null,enabled:()=>n.contentPresent()&&n.preventScroll()}),hp({trapFocus:()=>n.isOpen()&&n.isModal(),onMountAutoFocus:a=>{a.preventDefault()},onUnmountAutoFocus:a=>{r.onCloseAutoFocus?.(a),a.defaultPrevented||(un(n.triggerRef()),a.preventDefault())}},()=>t),b(ce,{get when(){return n.contentPresent()},get children(){return b(is.Positioner,{get children(){return b(eu,ne({ref(a){var l=st(c=>{n.setContentRef(c),t=c},r.ref);typeof l=="function"&&l(a)},get disableOutsidePointerEvents(){return je(()=>!!n.isModal())()&&n.isOpen()},get excludedElements(){return[n.triggerRef]},get style(){return gr({"--kb-select-content-transform-origin":"var(--kb-popper-content-transform-origin)",position:"relative"},r.style)},onEscapeKeyDown:o,onFocusOutside:s,get onDismiss(){return n.close}},()=>n.dataset(),i))}})}})}function _z(e){const t=Fs();return b(vke,ne({get collection(){return t.listState().collection()},get selectionManager(){return t.listState().selectionManager()},get isOpen(){return t.isOpen()},get isMultiple(){return t.isMultiple()},get isVirtualized(){return t.isVirtualized()},focusTrigger:()=>t.triggerRef()?.focus()},e))}function Cz(e){const t=Fs(),n=Ne({children:"▼"},e);return b(Ve,ne({as:"span","aria-hidden":"true"},()=>t.dataset(),n))}function Iz(e){const t=Fs(),[n,r]=se(e,["onClick"]);return b(th,ne({as:"span",onClick:o=>{ze(o,n.onClick),t.isDisabled()||t.triggerRef()?.focus()}},r))}function Tz(e){const t=Fs(),n=Ne({id:t.generateId("listbox")},e),[r,i]=se(n,["ref","id","onKeyDown"]);return re(()=>fe(t.registerListboxId(r.id))),b(jk,ne({ref(s){var a=st(t.setListboxRef,r.ref);typeof a=="function"&&a(s)},get id(){return r.id},get state(){return t.listState()},get virtualized(){return t.isVirtualized()},get autoFocus(){return t.autoFocus()},shouldSelectOnPressUp:!0,shouldFocusOnHover:!0,get shouldFocusWrap(){return t.shouldFocusWrap()},get disallowTypeAhead(){return t.disallowTypeAhead()},get"aria-labelledby"(){return t.listboxAriaLabelledBy()},get renderItem(){return t.renderItem},get renderSection(){return t.renderSection},onKeyDown:s=>{ze(s,r.onKeyDown),s.key==="Escape"&&s.preventDefault()}},i))}function Ez(e){const t=Fs();return b(ce,{get when(){return t.contentPresent()},get children(){return b(Os,e)}})}function xke(e){const t=`select-${an()}`,n=Ne({id:t,selectionMode:"single",disallowEmptySelection:!1,closeOnSelection:e.selectionMode==="single",allowDuplicateSelectionEvents:!0,gutter:8,sameWidth:!0,modal:!1},e),[r,i,o,s]=se(n,["itemComponent","sectionComponent","open","defaultOpen","onOpenChange","value","defaultValue","onChange","placeholder","options","optionValue","optionTextValue","optionDisabled","optionGroupChildren","keyboardDelegate","allowDuplicateSelectionEvents","disallowEmptySelection","closeOnSelection","disallowTypeAhead","shouldFocusWrap","selectionBehavior","selectionMode","virtualized","modal","preventScroll","forceMount"],["getAnchorRect","placement","gutter","shift","flip","slide","overlap","sameWidth","fitViewport","hideWhenDetached","detachedPadding","arrowPadding","overflowPadding"],Vg),[a,l]=de(),[c,u]=de(),[d,h]=de(),[f,m]=de(),[p,g]=de(),[v,y]=de(),[w,k]=de(),[x,C]=de(!0),S=pe=>{const ue=r.optionValue;return ue==null?String(pe):String(kf(ue)?ue(pe):pe[ue])},$=F(()=>{const pe=r.optionGroupChildren;return pe==null?r.options:r.options.flatMap(ue=>ue[pe]??ue)}),O=F(()=>$().map(pe=>S(pe))),D=pe=>[...pe].map(ue=>$().find(Le=>S(Le)===ue)).filter(ue=>ue!=null),M=Ps({open:()=>r.open,defaultOpen:()=>r.defaultOpen,onOpenChange:pe=>r.onOpenChange?.(pe)}),I=Ig({selectedKeys:()=>r.value!=null?r.value.map(S):r.value,defaultSelectedKeys:()=>r.defaultValue!=null?r.defaultValue.map(S):r.defaultValue,onSelectionChange:pe=>{r.onChange?.(D(pe)),r.closeOnSelection&&K()},allowDuplicateSelectionEvents:()=>he(r.allowDuplicateSelectionEvents),disallowEmptySelection:()=>he(r.disallowEmptySelection),selectionBehavior:()=>he(r.selectionBehavior),selectionMode:()=>r.selectionMode,dataSource:()=>r.options??[],getKey:()=>r.optionValue,getTextValue:()=>r.optionTextValue,getDisabled:()=>r.optionDisabled,getSectionChildren:()=>r.optionGroupChildren}),L=F(()=>D(I.selectionManager().selectedKeys())),A=pe=>{I.selectionManager().toggleSelection(S(pe))},{present:T}=po({show:()=>r.forceMount||M.isOpen(),element:()=>p()??null}),N=()=>{const pe=v();pe&&un(pe)},W=pe=>{if(r.options.length<=0)return;C(pe),M.open();let ue=I.selectionManager().firstSelectedKey();ue==null&&(pe==="first"?ue=I.collection().getFirstKey():pe==="last"&&(ue=I.collection().getLastKey())),N(),I.selectionManager().setFocused(!0),I.selectionManager().setFocusedKey(ue)},K=()=>{M.close(),I.selectionManager().setFocused(!1),I.selectionManager().setFocusedKey(void 0)},V=pe=>{M.isOpen()?K():W(pe)},{formControlContext:q}=qg(o);nh(f,()=>{const pe=r.defaultValue?[...r.defaultValue].map(S):new No;I.selectionManager().setSelectedKeys(pe)});const B=rR({usage:"search",sensitivity:"base"}),Y=F(()=>{const pe=he(r.keyboardDelegate);return pe||new IR(I.collection,void 0,B)}),J=pe=>r.itemComponent?.({item:pe}),ge=pe=>r.sectionComponent?.({section:pe});re(gt([O],([pe])=>{const Le=[...I.selectionManager().selectedKeys()].filter($e=>pe.includes($e));I.selectionManager().setSelectedKeys(Le)},{defer:!0}));const ae=F(()=>({"data-expanded":M.isOpen()?"":void 0,"data-closed":M.isOpen()?void 0:""})),Te={dataset:ae,isOpen:M.isOpen,isDisabled:()=>q.isDisabled()??!1,isMultiple:()=>he(r.selectionMode)==="multiple",isVirtualized:()=>r.virtualized??!1,isModal:()=>r.modal??!1,preventScroll:()=>r.preventScroll??Te.isModal(),disallowTypeAhead:()=>r.disallowTypeAhead??!1,shouldFocusWrap:()=>r.shouldFocusWrap??!1,selectedOptions:L,contentPresent:T,autoFocus:x,triggerRef:f,listState:()=>I,keyboardDelegate:Y,triggerId:a,valueId:c,listboxId:d,listboxAriaLabelledBy:w,setListboxAriaLabelledBy:k,setTriggerRef:m,setContentRef:g,setListboxRef:y,open:W,close:K,toggle:V,placeholder:()=>r.placeholder,renderItem:J,renderSection:ge,removeOptionFromSelection:A,generateId:$r(()=>he(o.id)),registerTriggerId:en(l),registerValueId:en(u),registerListboxId:en(h)};return b(eh.Provider,{value:q,get children(){return b(xz.Provider,{value:Te,get children(){return b(is,ne({anchorRef:f,contentRef:p},i,{get children(){return b(Ve,ne({as:"div",role:"group",get id(){return he(o.id)}},()=>q.dataset(),ae,s))}}))}})}})}function $z(e){const[t,n]=se(e,["value","defaultValue","onChange","multiple"]),r=F(()=>t.value!=null?t.multiple?t.value:[t.value]:t.value),i=F(()=>t.defaultValue!=null?t.multiple?t.defaultValue:[t.defaultValue]:t.defaultValue);return b(xke,ne({get value(){return r()},get defaultValue(){return i()},onChange:s=>{t.multiple?t.onChange?.(s??[]):t.onChange?.(s[0]??null)},get selectionMode(){return t.multiple?"multiple":"single"}},n))}function Az(e){const t=Si(),n=Fs(),r=Ne({id:n.generateId("trigger")},e),[i,o,s]=se(r,["ref","disabled","onPointerDown","onClick","onKeyDown","onFocus","onBlur"],_k),a=()=>n.listState().selectionManager(),l=()=>n.keyboardDelegate(),c=()=>i.disabled||n.isDisabled(),{fieldProps:u}=Ck(o),{typeSelectHandlers:d}=_R({keyboardDelegate:l,selectionManager:a,onTypeSelect:y=>a().select(y)}),h=()=>[n.listboxAriaLabelledBy(),n.valueId()].filter(Boolean).join(" ")||void 0,f=y=>{ze(y,i.onPointerDown),y.currentTarget.dataset.pointerType=y.pointerType,!c()&&y.pointerType!=="touch"&&y.button===0&&(y.preventDefault(),n.toggle(!0))},m=y=>{ze(y,i.onClick),!c()&&y.currentTarget.dataset.pointerType==="touch"&&n.toggle(!0)},p=y=>{if(ze(y,i.onKeyDown),!c())switch(ze(y,d.onKeyDown),y.key){case"Enter":case" ":case"ArrowDown":y.stopPropagation(),y.preventDefault(),n.toggle("first");break;case"ArrowUp":y.stopPropagation(),y.preventDefault(),n.toggle("last");break;case"ArrowLeft":{if(y.preventDefault(),n.isMultiple())return;const w=a().firstSelectedKey(),k=w!=null?l().getKeyAbove?.(w):l().getFirstKey?.();k!=null&&a().select(k);break}case"ArrowRight":{if(y.preventDefault(),n.isMultiple())return;const w=a().firstSelectedKey(),k=w!=null?l().getKeyBelow?.(w):l().getFirstKey?.();k!=null&&a().select(k);break}}},g=y=>{ze(y,i.onFocus),!a().isFocused()&&a().setFocused(!0)},v=y=>{ze(y,i.onBlur),!n.isOpen()&&a().setFocused(!1)};return re(()=>fe(n.registerTriggerId(u.id()))),re(()=>{n.setListboxAriaLabelledBy([u.ariaLabelledBy(),u.ariaLabel()&&!u.ariaLabelledBy()?u.id():null].filter(Boolean).join(" ")||void 0)}),b(Jo,ne({ref(y){var w=st(n.setTriggerRef,i.ref);typeof w=="function"&&w(y)},get id(){return u.id()},get disabled(){return c()},"aria-haspopup":"listbox",get"aria-expanded"(){return n.isOpen()},get"aria-controls"(){return je(()=>!!n.isOpen())()?n.listboxId():void 0},get"aria-label"(){return u.ariaLabel()},get"aria-labelledby"(){return h()},get"aria-describedby"(){return u.ariaDescribedBy()},onPointerDown:f,onClick:m,onKeyDown:p,onFocus:g,onBlur:v},()=>n.dataset(),()=>t.dataset(),s))}function Lz(e){const t=Si(),n=Fs(),r=Ne({id:n.generateId("value")},e),[i,o]=se(r,["id","children"]),s=()=>n.listState().selectionManager(),a=()=>{const l=s().selectedKeys();return l.size===1&&l.has("")?!0:s().isEmpty()};return re(()=>fe(n.registerValueId(i.id))),b(Ve,ne({as:"span",get id(){return i.id},get"data-placeholder-shown"(){return a()?"":void 0}},()=>t.dataset(),o,{get children(){return b(ce,{get when(){return!a()},get fallback(){return n.placeholder()},get children(){return b(Ske,{state:{selectedOption:()=>n.selectedOptions()[0],selectedOptions:()=>n.selectedOptions(),remove:l=>n.removeOptionFromSelection(l),clear:()=>s().clearSelection()},get children(){return i.children}})}})}}))}function Ske(e){const t=Cl(()=>{const n=e.children;return kf(n)?n(e.state):n});return je(t)}var Ei=Object.assign($z,{Arrow:xi,Content:Sz,Description:Aa,ErrorMessage:La,HiddenSelect:_z,Icon:Cz,Item:Jg,ItemDescription:Qg,ItemIndicator:e1,ItemLabel:t1,Label:Iz,Listbox:Tz,Portal:Ez,Section:n1,Trigger:Az,Value:Lz});function b9(e){const[t,n]=se(e,["class","classList","placeholder","options","current","value","label","groupBy","valueClass","onSelect","onHighlight","onOpenChange","children","triggerStyle","triggerVariant","triggerProps"]),r={key:void 0,cleanup:void 0},i=()=>{r.cleanup?.(),r.cleanup=void 0,r.key=void 0},o=l=>t.value?t.value(l):l,s=l=>{if(!t.onHighlight)return;if(!l){i();return}const c=o(l);r.key!==c&&(r.cleanup?.(),r.cleanup=t.onHighlight(l),r.key=c)};fe(i);const a=F(()=>hf(t.options,b2(c=>t.groupBy?t.groupBy(c):""),Kge(),jge(([c,u])=>({category:c,options:u}))));return b(Ei,ne(n,{"data-component":"select",get"data-trigger-style"(){return t.triggerVariant},get placement(){return t.triggerVariant==="settings"?"bottom-end":"bottom-start"},gutter:4,get value(){return t.current},get options(){return a()},optionValue:l=>t.value?t.value(l):l,optionTextValue:l=>t.label?t.label(l):l,optionGroupChildren:"options",get placeholder(){return t.placeholder},sectionComponent:l=>b(Ei.Section,{"data-slot":"select-section",get children(){return l.section.rawValue.category}}),itemComponent:l=>b(Ei.Item,ne(l,{"data-slot":"select-select-item",get classList(){return{...t.classList,[t.class??""]:!!t.class}},onPointerEnter:()=>s(l.item.rawValue),onPointerMove:()=>s(l.item.rawValue),onFocus:()=>s(l.item.rawValue),get children(){return[b(Ei.ItemLabel,{"data-slot":"select-select-item-label",get children(){return je(()=>!!t.children)()?t.children(l.item.rawValue):je(()=>!!t.label)()?t.label(l.item.rawValue):l.item.rawValue}}),b(Ei.ItemIndicator,{"data-slot":"select-select-item-indicator",get children(){return b(Ht,{name:"check-small",size:"small"})}})]}})),onChange:l=>{t.onSelect?.(l??void 0),i()},onOpenChange:l=>{t.onOpenChange?.(l),l||i()},get children(){return[b(Ei.Trigger,ne(()=>t.triggerProps,{get disabled(){return e.disabled},"data-slot":"select-select-trigger",as:Gt,get size(){return e.size},get variant(){return e.variant},get style(){return t.triggerStyle},get classList(){return{...t.classList,[t.class??""]:!!t.class}},get children(){return[b(Ei.Value,{"data-slot":"select-select-trigger-value",get class(){return t.valueClass},children:l=>{const c=l.selectedOption()??t.current;return c?t.label?t.label(c):c:t.placeholder||""}}),b(Ei.Icon,{"data-slot":"select-select-trigger-icon",get children(){return b(Ht,{get name(){return t.triggerVariant==="settings"?"selector":"chevron-down"},size:"small"})}})]}})),b(Ei.Portal,{get children(){return b(Ei.Content,{get classList(){return{...t.classList,[t.class??""]:!!t.class}},"data-component":"select-content",get"data-trigger-style"(){return t.triggerVariant},get children(){return b(Ei.Listbox,{"data-slot":"select-select-content-list"})}})}})]}}))}var _ke=ee("<span>");function w9(e){const[t,n]=se(e,["size","class","classList","children"]);return(()=>{var r=_ke();return jr(r,ne(n,{"data-component":"tag",get"data-size"(){return t.size||"normal"},get classList(){return{...t.classList,[t.class??""]:!!t.class}}}),!1,!0),j(r,()=>t.children),r})()}const k9=e=>!!e&&typeof e=="object"&&!Array.isArray(e);function Cke(e){const t=new Map,n=new Map;for(const r of e.agents??[])r?.name&&(r.hidden||r.mode==="subagent"||t.set(r.name,{name:r.name,label:r.name}));for(const[r,i]of Object.entries(e.config?.mode??{}))k9(i)&&n.set(r,i);for(const[r,i]of Object.entries(e.config?.agent??{}))k9(i)&&n.set(r,i);for(const[r,i]of n){if(i.disable===!0||i.hidden===!0||i.mode==="subagent"){t.delete(r);continue}t.set(r,{name:r,label:r})}return[{name:"",label:e.defaultLabel},...[...t.values()].sort((r,i)=>r.label.localeCompare(i.label))]}var Ike=ee('<div class="size-full overflow-y-auto"><div class="mx-auto flex min-h-full w-full max-w-3xl flex-col gap-6 px-6 py-8">'),Tke=ee('<div class="flex flex-col gap-4 shrink-0"><div class="shrink-0 flex items-center gap-4 justify-between border-b border-border-weak-base pb-4"><div class=min-w-0><div class="text-20-medium text-text-strong truncate"></div><div class="text-12-regular text-text-weak">'),Eke=ee('<ul class="overflow-hidden rounded-lg border border-border-weaker-base bg-background-base shadow-[var(--shadow-xs)]">'),$ke=ee('<div class="rounded-lg border border-border-weaker-base bg-background-base px-4 py-12 text-center text-12-regular text-text-weak shadow-[var(--shadow-xs)]">'),Ake=ee('<div class="mt-0.5 truncate text-12-regular text-text-weak">'),Lke=ee("<span>·"),Dke=ee("<span>: "),Mke=ee('<div class="mt-1.5 text-12-regular text-text-critical-base whitespace-pre-wrap break-words line-clamp-3">'),Oke=ee('<li class="border-b border-border-weak-base last:border-b-0"><div class="group flex w-full min-w-0 items-center gap-3 px-4 py-3"><div class="min-w-0 flex-1"><div class="flex flex-wrap items-center gap-2"><span class="truncate text-14-medium text-text-strong"></span></div><div class="mt-0.5 flex flex-wrap items-center gap-x-2 gap-y-0.5 font-mono text-11-regular text-text-weak"><span class=truncate></span><span>·</span><span>: </span></div></div><div class="flex shrink-0 items-center gap-1">'),Pke=ee('<div class="rounded-md border border-border-critical-base bg-surface-critical-base/10 px-3 py-2 text-12-regular text-text-critical-base whitespace-pre-wrap">'),Rke=ee('<form novalidate class="flex flex-col gap-5 px-6 pt-0 pb-5"><div class="flex flex-col gap-4"><div class="flex flex-col gap-2"><label class="text-12-medium text-text-weak"></label><div class="inline-flex items-center gap-0.5 rounded-lg bg-surface-base p-1 self-start"><button type=button class="px-3 h-7 rounded-md text-13-medium transition-colors">Cron</button><button type=button class="px-3 h-7 rounded-md text-13-medium transition-colors">Interval</button></div></div><div class="grid grid-cols-2 gap-3"><div class="flex flex-col gap-2"><label class="text-12-medium text-text-weak"></label></div></div><div class="flex flex-col gap-2"><label class="text-12-medium text-text-weak"></label></div></div><div class="flex justify-end gap-2 pt-1">');const Nke=["cron","tasks"],zke=5e3,jke=6e4;function x9(e,t,n=Date.now()){if(!e)return;const r=e-n,i=Math.abs(r),o=new Intl.RelativeTimeFormat(t.toString(),{numeric:"auto"}),s=6e4,a=60*s,l=24*a;return i<s?o.format(Math.round(r/1e3),"second"):i<a?o.format(Math.round(r/s),"minute"):i<l?o.format(Math.round(r/a),"hour"):o.format(Math.round(r/l),"day")}function Fke(e,t){if(e.schedule.kind==="cron")return`cron · ${e.schedule.expression}`;const n=Math.round(e.schedule.intervalMs/6e4);return`${t.t("cron.field.schedule.interval")}: ${n}`}function my(){const e=ri(),t=So(),n=sr(),r=Jn(),i=F(()=>n.current?.http),o=F(()=>(r.data.project??[]).filter(m=>m.id!=="global")),s=F(()=>_r(e.dir)),a=F(()=>new URLSearchParams(t.search).get("projectID")??void 0),l=F(()=>e.projectID??a()),c=F(()=>{const m=s();return m?D2(m,o(),a()):o().find(p=>p.id===l())}),u=F(()=>rz(c(),l())),d=xo();re(()=>{const m=c();m&&(e.dir||d(`/cron/worktree/${dt(m.worktree)}${m.id?`?projectID=${encodeURIComponent(m.id)}`:""}`,{replace:!0}))});const h=va(()=>({queryKey:[...Nke,n.scope.key,u(),s()],queryFn:async()=>{const m=i(),p=u(),g=s();return m?p?Ko.list(m,{projectID:p}):g?Ko.list(m,{directory:g}):[]:[]},enabled:!!i()&&(!!u()||!!s()),refetchInterval:5e3,refetchOnMount:!0,refetchOnWindowFocus:!0,staleTime:zke,gcTime:jke,retry:1})),f=F(()=>(h.data??[]).filter(m=>{const p=u(),g=s();return iz(m,{projectID:p,project:c(),directory:g})}));return(()=>{var m=Ike(),p=m.firstChild;return j(p,b(Uke,{selectedProject:c}),null),j(p,b(Hke,{server:i,tasks:f,selectedProject:c}),null),m})()}function Uke(e){const t=At(),n=ko(),r=()=>{const i=e.selectedProject();if(!i?.worktree){$t({variant:"error",title:t.t("common.requestFailed"),description:t.t("cron.create.noProject")});return}n.show(()=>b(Dz,{project:i}))};return(()=>{var i=Tke(),o=i.firstChild,s=o.firstChild,a=s.firstChild,l=a.nextSibling;return j(a,()=>t.t("cron.title")),j(l,()=>t.t("cron.subtitle")),j(o,b(Gt,{variant:"primary",size:"large",icon:"plus-small",onClick:r,get children(){return t.t("cron.create")}}),null),i})()}function Hke(e){const t=At(),n=ko(),r=i=>{const o=e.selectedProject();o?.worktree&&n.show(()=>b(Dz,{project:o,existing:i}))};return b(ce,{get when(){return e.tasks().length>0},get fallback(){return(()=>{var i=$ke();return j(i,(()=>{var o=je(()=>!!e.selectedProject());return()=>o()?t.t("cron.empty.project"):t.t("cron.empty")})()),i})()},get children(){var i=Eke();return j(i,b(Ut,{get each(){return e.tasks()},children:o=>b(Bke,{task:o,get server(){return e.server},onEdit:()=>r(o)})})),i}})}function Bke(e){const t=At(),n=cu(),r=At().intl,i=()=>n.invalidateQueries({queryKey:["cron"]}),o=Ad(()=>({mutationFn:async l=>{const c=e.server();if(!c)throw new Error("No server connection");return Ko.setStatus(c,e.task.id,l)},onSuccess:()=>i(),onError:l=>$t({variant:"error",title:t.t("common.requestFailed"),description:l instanceof Error?l.message:String(l)})})),s=Ad(()=>({mutationFn:async()=>{const l=e.server();if(!l)throw new Error("No server connection");return Ko.trigger(l,e.task.id)},onSuccess:()=>i(),onError:l=>$t({variant:"error",title:t.t("common.requestFailed"),description:l instanceof Error?l.message:String(l)})})),a=Ad(()=>({mutationFn:async()=>{if(!confirm(t.t("cron.delete.confirm")))return;const l=e.server();if(!l)throw new Error("No server connection");return Ko.remove(l,e.task.id)},onSuccess:()=>i(),onError:l=>$t({variant:"error",title:t.t("common.requestFailed"),description:l instanceof Error?l.message:String(l)})}));return(()=>{var l=Oke(),c=l.firstChild,u=c.firstChild,d=u.firstChild,h=d.firstChild,f=d.nextSibling,m=f.firstChild,p=m.nextSibling,g=p.nextSibling,v=g.firstChild,y=u.nextSibling;return j(d,b(Ht,{name:"bell",size:"small",class:"icon-strong-base shrink-0"}),h),j(h,()=>e.task.name),j(d,b(w9,{get children(){return t.t(`cron.status.${e.task.status}`)}}),null),j(d,b(ce,{get when(){return e.task.lastRunStatus},get children(){return b(w9,{get children(){return t.t(`cron.run.status.${e.task.lastRunStatus}`)}})}}),null),j(u,b(ce,{get when(){return e.task.description},get children(){var w=Ake();return j(w,()=>e.task.description),w}}),f),j(m,()=>Fke(e.task,t)),j(g,()=>t.t("cron.next"),v),j(g,(()=>{var w=je(()=>e.task.status==="active");return()=>w()?x9(e.task.nextRunAt,r())??t.t("cron.never"):"—"})(),null),j(f,b(ce,{get when(){return e.task.lastRunAt},get children(){return[Lke(),(()=>{var w=Dke(),k=w.firstChild;return j(w,()=>t.t("cron.last"),k),j(w,()=>x9(e.task.lastRunAt,r()),null),w})()]}}),null),j(u,b(ce,{get when(){return je(()=>!!e.task.lastError)()&&e.task.lastRunStatus!=="success"},get children(){var w=Mke();return j(w,()=>e.task.lastError),w}}),null),j(y,b(bn,{get value(){return t.t("cron.action.trigger")},placement:"top",get children(){return b(Jr,{icon:"arrow-right",variant:"ghost",size:"normal",get"aria-label"(){return t.t("cron.action.trigger")},get disabled(){return s.isPending||e.task.status==="disabled"},onClick:()=>s.mutate()})}}),null),j(y,b(ce,{get when(){return e.task.status==="active"},get fallback(){return b(bn,{get value(){return t.t("cron.action.resume")},placement:"top",get children(){return b(Jr,{icon:"circle-check",variant:"ghost",size:"normal",get"aria-label"(){return t.t("cron.action.resume")},get disabled(){return o.isPending},onClick:()=>o.mutate("active")})}})},get children(){return b(bn,{get value(){return t.t("cron.action.pause")},placement:"top",get children(){return b(Jr,{icon:"circle-ban-sign",variant:"ghost",size:"normal",get"aria-label"(){return t.t("cron.action.pause")},get disabled(){return o.isPending},onClick:()=>o.mutate("paused")})}})}}),null),j(y,b(bn,{get value(){return t.t("cron.action.edit")},placement:"top",get children(){return b(Jr,{icon:"edit",variant:"ghost",size:"normal",get"aria-label"(){return t.t("cron.action.edit")},get onClick(){return e.onEdit}})}}),null),j(y,b(bn,{get value(){return t.t("cron.action.delete")},placement:"top",get children(){return b(Jr,{icon:"trash",variant:"ghost",size:"normal",get"aria-label"(){return t.t("cron.action.delete")},get disabled(){return a.isPending},onClick:()=>a.mutate()})}}),null),l})()}function Vke(e){return e instanceof Error&&"status"in e}function qke(e){const t=e.trim();if(!t)return{ok:!1,reason:"Required"};if(/^@(?:hourly|daily|weekly|monthly|yearly|annually|midnight)$/i.test(t))return{ok:!0};const n=t.split(/\s+/);return n.length!==5?{ok:!1,reason:`Expected 5 fields (got ${n.length}). Example: 0 9 * * 1-5`}:{ok:!0}}function Dz(e){const t=At(),n=ko(),r=cu(),i=sr(),o=Yf(),s=Jn(),a=Gi(),l=F(()=>i.current?.http),c=va(()=>({queryKey:["cron","agents",i.scope.key,e.project.worktree],queryFn:async()=>(await a.createClient({directory:e.project.worktree,throwOnError:!0}).app.agents()).data??[],enabled:!!l()&&!!e.project.worktree,staleTime:5e3})),u=F(()=>Cke({agents:c.data,config:s.data.config,defaultLabel:t.t("common.default")})),d=F(()=>{const y=[];for(const w of o.connected())for(const[k,x]of Object.entries(w.models??{}))y.push({providerID:w.id,modelID:k,label:x.name??k,group:w.name??w.id});return y.sort((w,k)=>w.group.localeCompare(k.group)||w.label.localeCompare(k.label))}),h=()=>{const y=e.existing;return y?{name:y.name,description:y.description??"",prompt:y.prompt,scheduleKind:y.schedule.kind,cronExpression:y.schedule.kind==="cron"?y.schedule.expression:"0 9 * * 1-5",intervalMinutes:y.schedule.kind==="interval"?String(Math.round(y.schedule.intervalMs/6e4)):"60",timeoutMinutes:y.timeoutMs?String(Math.round(y.timeoutMs/6e4)):"30",agent:y.agent??"",model:y.model??"",status:y.status,errors:{}}:{name:"",description:"",prompt:"",scheduleKind:"cron",cronExpression:"0 9 * * 1-5",intervalMinutes:"60",timeoutMinutes:"30",agent:"",model:"",status:"active",errors:{}}},[f,m]=Je(h()),p=()=>{const y={};if(f.name.trim()||(y.name=t.t("cron.error.name.required")),f.prompt.trim()||(y.prompt=t.t("cron.error.prompt.required")),f.scheduleKind==="cron"){const w=qke(f.cronExpression);w.ok||(y.schedule=w.reason)}else{const w=Number(f.intervalMinutes);(!Number.isFinite(w)||w<1)&&(y.schedule=t.t("cron.error.interval.min"))}if(f.timeoutMinutes){const w=Number(f.timeoutMinutes);(!Number.isFinite(w)||w<1)&&(y.timeout=t.t("cron.error.timeout.min"))}return m("errors",y),Object.keys(y).length===0},g=y=>{if(m("errors",{}),!Vke(y)){m("errors","form",y instanceof Error?y.message:String(y));return}const w={};if(y.fieldIssues&&y.fieldIssues.length>0)for(const k of y.fieldIssues){const x=k.path;x==="name"?w.name=k.message:x==="prompt"?w.prompt=k.message:x==="schedule"||x.startsWith("schedule.")?w.schedule=k.message:x==="timeoutMs"||x==="timeout"?w.timeout=k.message:w.form=(w.form?`${w.form}; `:"")+(x?`${x}: ${k.message}`:k.message)}Object.keys(w).length===0&&(w.form=y.message),m("errors",w)},v=Ad(()=>({mutationFn:async()=>{if(!p()){const x=new Error(t.t("cron.error.validation.fix"));throw x._validation=!0,x}const y=l();if(!y)throw new Error("No server connection");const w=f.scheduleKind==="cron"?{kind:"cron",expression:f.cronExpression.trim()}:{kind:"interval",intervalMs:Math.max(1,Number(f.intervalMinutes))*6e4},k=f.timeoutMinutes?Math.max(1,Number(f.timeoutMinutes))*6e4:void 0;if(e.existing){const x={name:f.name.trim(),description:f.description.trim()||null,prompt:f.prompt,schedule:w,timeoutMs:k??null,agent:f.agent.trim()||null,model:f.model.trim()||null,status:f.status};await Ko.update(y,e.existing.id,x)}else{const x={...e.project.id?{projectID:e.project.id}:{},directory:e.project.worktree,name:f.name.trim(),description:f.description.trim()||void 0,prompt:f.prompt,schedule:w,timeoutMs:k,agent:f.agent.trim()||void 0,model:f.model.trim()||void 0,status:f.status};await Ko.create(y,x)}},onSuccess:()=>{r.invalidateQueries({queryKey:["cron"]}),n.close()},onError:y=>{y instanceof Error&&y._validation||(g(y),$t({variant:"error",title:t.t("common.requestFailed"),description:y instanceof Error?y.message:String(y)}))}}));return b(Yc,{get title(){return je(()=>!!e.existing)()?t.t("cron.action.edit"):t.t("cron.create")},class:"w-full max-w-[560px] mx-auto",fit:!0,get children(){var y=Rke(),w=y.firstChild,k=w.firstChild,x=k.firstChild,C=x.nextSibling,S=C.firstChild,$=S.nextSibling,O=k.nextSibling,D=O.firstChild,M=D.firstChild,I=O.nextSibling,L=I.firstChild,A=w.nextSibling;return y.addEventListener("submit",T=>{T.preventDefault(),v.mutate()}),j(w,b(na,{autofocus:!0,get label(){return t.t("cron.field.name")},get placeholder(){return t.t("cron.field.name.placeholder")},get value(){return f.name},onChange:T=>m("name",T),get error(){return f.errors.name}}),k),j(w,b(na,{get label(){return t.t("cron.field.description")},get placeholder(){return t.t("cron.field.description")},get value(){return f.description},onChange:T=>m("description",T)}),k),j(w,b(na,{multiline:!0,get label(){return t.t("cron.field.prompt")},get placeholder(){return t.t("cron.field.prompt.placeholder")},get value(){return f.prompt},onChange:T=>m("prompt",T),get error(){return f.errors.prompt},class:"max-h-40 w-full overflow-y-auto"}),k),j(x,()=>t.t("cron.field.scheduleKind")),S.$$click=()=>m("scheduleKind","cron"),$.$$click=()=>m("scheduleKind","interval"),j(w,b(ce,{get when(){return f.scheduleKind==="cron"},get fallback(){return b(na,{get label(){return t.t("cron.field.schedule.interval")},placeholder:"60",type:"number",get value(){return f.intervalMinutes},onChange:T=>m("intervalMinutes",T),get error(){return f.errors.schedule},inputmode:"numeric"})},get children(){return b(na,{get label(){return t.t("cron.field.schedule.cron")},get placeholder(){return t.t("cron.field.schedule.cron.placeholder")},get value(){return f.cronExpression},onChange:T=>m("cronExpression",T),get error(){return f.errors.schedule},spellcheck:!1,class:"font-mono text-xs"})}}),O),j(O,b(na,{get label(){return t.t("cron.field.timeout")},placeholder:"30",type:"number",get value(){return f.timeoutMinutes},onChange:T=>m("timeoutMinutes",T),get error(){return f.errors.timeout},inputmode:"numeric"}),D),j(M,()=>t.t("cron.field.agent")),j(D,b(b9,{variant:"ghost",size:"large",triggerVariant:"form",valueClass:"truncate text-14-regular",get options(){return u()},value:T=>T.name,label:T=>T.label,get current(){return u().find(T=>T.name===f.agent)??u()[0]},get placeholder(){return t.t("common.default")},onSelect:T=>m("agent",T?.name??"")}),null),j(L,()=>t.t("cron.field.model")),j(I,b(b9,{variant:"ghost",size:"large",triggerVariant:"form",valueClass:"truncate text-14-regular",get options(){return d()},value:T=>`${T.providerID}/${T.modelID}`,label:T=>T.label,groupBy:T=>T.group,get current(){return d().find(T=>`${T.providerID}/${T.modelID}`===f.model)},get placeholder(){return t.t("common.default")},onSelect:T=>m("model",T?`${T.providerID}/${T.modelID}`:"")}),null),j(w,b(ce,{get when(){return f.errors.form},get children(){var T=Pke();return j(T,()=>f.errors.form),T}}),null),j(A,b(Gt,{type:"button",variant:"ghost",size:"large",onClick:()=>n.close(),get children(){return t.t("common.cancel")}}),null),j(A,b(Gt,{type:"submit",variant:"primary",size:"large",get disabled(){return v.isPending},get children(){return je(()=>!!v.isPending)()?t.t("common.saving"):t.t("common.save")}}),null),De(T=>{var N={"bg-surface-base-active text-text-strong":f.scheduleKind==="cron","text-text-weak hover:text-text-base":f.scheduleKind!=="cron"},W={"bg-surface-base-active text-text-strong":f.scheduleKind==="interval","text-text-weak hover:text-text-base":f.scheduleKind!=="interval"};return T.e=Ct(S,N,T.e),T.t=Ct($,W,T.t),T},{e:void 0,t:void 0}),y}})}or(["click"]);var Wke=ee('<div class="relative flex-1 h-screen w-screen min-h-0 flex flex-col items-center justify-center bg-background-base font-sans"><div class="w-2/3 max-w-3xl flex flex-col items-center justify-center gap-8"><div class="flex flex-col items-center gap-2 text-center"><h1 class="text-lg font-medium text-text-strong"></h1><p class="text-sm text-text-weak"></p></div><div class="flex items-center gap-3"></div><div class="flex flex-col items-center gap-2"><div class="flex items-center justify-center gap-1"><button type=button class="flex items-center text-text-interactive-base gap-1"><div>'),Gke=ee('<p class="text-xs text-text-weak">');const w0=`
2441
2441
  `+"─".repeat(40)+`
2442
2442
  `;function Kke(e){if(!e||typeof e!="object"||!("message"in e)||!("path"in e))return!1;const t=e.message,n=e.path;return typeof t!="string"||!Array.isArray(n)?!1:n.every(r=>typeof r=="string")}function Zke(e){return typeof e=="object"&&e!==null&&"name"in e&&"data"in e&&typeof e.data=="object"}function Mz(e,t){const n=new WeakSet;return JSON.stringify(e,(i,o)=>{if(typeof o=="bigint")return o.toString();if(typeof o=="object"&&o){if(n.has(o))return t;n.add(o)}return o},2)??String(e)}function Yke(e,t){const n=e.data,r=i=>Mz(i,t("error.page.circular"));switch(e.name){case"MCPFailed":{const i=typeof n.name=="string"?n.name:"";return t("error.chain.mcpFailed",{name:i})}case"ProviderAuthError":{const i=typeof n.providerID=="string"?n.providerID:t("common.unknown"),o=typeof n.message=="string"?n.message:r(n.message);return t("error.chain.providerAuthFailed",{provider:i,message:o})}case"APIError":{const o=[typeof n.message=="string"?n.message:t("error.chain.apiError")];return typeof n.statusCode=="number"&&o.push(t("error.chain.status",{status:n.statusCode})),typeof n.isRetryable=="boolean"&&o.push(t("error.chain.retryable",{retryable:n.isRetryable})),typeof n.responseBody=="string"&&n.responseBody&&o.push(t("error.chain.responseBody",{body:n.responseBody})),o.join(`
2443
2443
  `)}case"ProviderModelNotFoundError":{const{providerID:i,modelID:o,suggestions:s}=n,a=Array.isArray(s)&&s.length?[t("error.chain.didYouMean",{suggestions:s.join(", ")})]:[];return[t("error.chain.modelNotFound",{provider:i,model:o}),...a,t("error.chain.checkConfig")].join(`
@@ -2456,5 +2456,5 @@ ${u}`)}if(!u&&!s&&a.push(l+c),e.cause){const d=Oz(e.cause,t,n+1,e.message);d&&a.
2456
2456
  ${w0}${t("error.chain.causedBy")}
2457
2457
  `:"")+e:(n>0?`
2458
2458
  ${w0}${t("error.chain.causedBy")}
2459
- `:"")+i(e)}function Xke(e,t){return Oz(e,t,0)}const Jke=e=>{const t=qi(),n=At();return(()=>{var r=Wke(),i=r.firstChild,o=i.firstChild,s=o.firstChild,a=s.nextSibling,l=o.nextSibling,c=l.nextSibling,u=c.firstChild,d=u.firstChild,h=d.firstChild;return j(i,b(kne,{class:"w-58.5 opacity-12 shrink-0"}),o),j(s,()=>n.t("error.page.title")),j(a,()=>n.t("error.page.description")),j(i,b(na,{get value(){return Xke(e.error,n.t)},readOnly:!0,copyable:!0,multiline:!0,class:"max-h-96 w-full font-mono text-xs no-scrollbar",get label(){return n.t("error.page.details.label")},hideLabel:!0}),l),j(l,b(Gt,{size:"large",get onClick(){return t.restart},get children(){return n.t("error.page.action.restart")}})),j(u,()=>n.t("error.page.report.prefix"),d),d.$$click=()=>t.openLink("https://github.com/devinoldenburg/codeplane/issues/new"),j(h,()=>n.t("error.page.report.issues")),j(c,b(ce,{get when(){return t.version},keyed:!0,children:f=>(()=>{var m=Gke();return j(m,()=>n.t("error.page.version",{version:f})),m})()}),null),r})()};or(["click"]);var Qke=ee('<div class="h-dvh w-screen flex flex-col items-center justify-center bg-background-base">'),e6e=ee('<div class="flex flex-col gap-2 w-full max-w-sm"><span class="text-12-regular text-text-base text-center"></span><div class="flex flex-col gap-1 bg-surface-base rounded-lg p-2">'),t6e=ee('<div class="h-dvh w-screen flex flex-col items-center justify-center bg-background-base gap-6 p-6"><div class="flex flex-col items-center max-w-md text-center"><p class="text-14-regular text-text-base"><span class="text-text-strong font-medium"></span></p><p class="mt-1 text-12-regular text-text-weak">'),n6e=ee('<button type=button class="flex items-center gap-3 w-full px-3 py-2 rounded-md hover:bg-surface-raised-base-hover transition-colors text-left"><span class="text-14-regular text-text-strong truncate">');const M2=()=>z(()=>import("./home-BxUuIoXQ.js"),[]),op=()=>z(()=>import("./notifications-Can6MxXX.js"),[]),sp=()=>z(()=>import("./settings-CaQrQUx2.js"),__vite__mapDeps([104,98,100,101,99])),ap=()=>z(()=>import("./session-BV0LX606.js").then(e=>e.s),__vite__mapDeps([105,98,100,103])),r6e=cp(M2),i6e=cp(op),o6e=cp(sp),s6e=cp(ap),a6e=()=>b(lu,{href:"/settings/modes"}),l6e=()=>b(lu,{href:"/settings/models"}),c6e=()=>b(lu,{href:"/settings/mcp"}),u6e=()=>b(lu,{href:"/settings/plugins"}),d6e=()=>b(lu,{href:"/settings/skills"});if(typeof location=="object"){const e=location.pathname;/\/session(?:\/|$)/.test(e)&&ap(),e.startsWith("/settings")&&sp(),e==="/notifications"&&op()}if(typeof window=="object"&&typeof requestIdleCallback=="function"){const e=()=>{M2(),sp(),op(),ap()};requestIdleCallback(e,{timeout:3e3})}else typeof window=="object"&&window.setTimeout(()=>{M2(),sp(),op(),ap()},1500);const Pz=()=>b(v6e,{get children(){return b(s6e,{})}}),f6e=()=>b(lu,{href:"session"}),h6e=()=>b(tR,{get children(){return b(Pz,{})}});function m6e(e){const t=At();return b(rU,{get value(){return{locale:t.intl,t:t.t}},get children(){return e.children}})}function p6e(e){const t=new Wre;return b(Hre,{client:t,get children(){return e.children}})}function g6e(e){return b(tae,{get children(){return b(p1e,{get children(){return b(G0e,{get children(){return b(c1e,{get children(){return b(Y1e,{get children(){return b(n1e,{get children(){return b(Lle,{get children(){return b(Ime,{get children(){return b(Ehe,{get children(){return b(mke,{get children(){return e.children}})}})}})}})}})}})}})}})}})}})}function v6e(e){return b(O1e,{get children(){return b(cme,{get children(){return b(I1e,{get children(){return b(She,{get children(){return e.children}})}})}})}})}function y6e(e){return b(g6e,{get children(){return[je(()=>e.appChildren),je(()=>e.children)]}})}function b6e(e){return b(Pne,{get children(){return[b(vne,{}),b(Lne,{get children(){return b(qse,{get locale(){return e.locale},get children(){return b(m6e,{get children(){return b(z9,{fallback:t=>b(Jke,{error:t}),get children(){return b(eU,{get children(){return b(hY,{get children(){return b(Vj,{component:gne,get children(){return e.children}})}})}})}})}})}})}})]}})}function w6e(e){const t=sr(),n=h4(),[r,i]=de("blocking"),[o,s]=Xo(()=>e.disableHealthCheck?!0:yse(function*(){if(!t.current)return!0;const{http:a,type:l}=t.current;for(;;){if((yield*pse(()=>n(a))).healthy)return!0;if(r()==="background"||l==="http")return!1}}).pipe(bse({duration:"10 seconds",orElse:()=>gse(!1)}),wse(vse(()=>i("background"))),kse));return b(j9,{get fallback(){return(()=>{var a=Qke();return j(a,b(wE,{class:"w-16 h-20 opacity-50 animate-pulse"})),a})()},get children(){return[je(()=>je(()=>r()==="blocking")()?o():o.latest),b(ce,{get when(){return o()},get fallback(){return b(k6e,{onRetry:()=>{r()==="background"&&s.refetch()},onServerSelected:a=>{i("blocking"),t.setActive(a),s.refetch()}})},get children(){return e.children}})]}})}function k6e(e){const t=At(),n=qi(),r=sr(),i=()=>r.list.filter(c=>dn.key(c)!==r.key),o=F(()=>r.name||r.key),s="\0server\0",a=F(()=>t.t("app.server.unreachable",{server:s}).split(s)),l=setInterval(()=>e.onRetry?.(),1e3);return fe(()=>clearInterval(l)),(()=>{var c=t6e(),u=c.firstChild,d=u.firstChild,h=d.firstChild,f=d.nextSibling;return j(u,b(wE,{class:"w-12 h-15 mb-4"}),d),j(d,()=>a()[0],h),j(h,o),j(d,()=>a()[1],null),j(f,()=>t.t("app.server.retrying")),j(c,b(ce,{get when(){return i().length>0},get children(){var m=e6e(),p=m.firstChild,g=p.nextSibling;return j(p,()=>t.t("app.server.otherServers")),j(g,b(Ut,{get each(){return i()},children:v=>{const y=dn.key(v);return(()=>{var w=n6e(),k=w.firstChild;return w.$$click=()=>{const x=n.serverManager?.instances.find(C=>C.key===y);if(x){n.serverManager?.open(x.id);return}e.onServerSelected?.(y)},j(k,()=>Om(v)),w})()}})),m}}),null),c})()}function x6e(e){const t=sr(),n=F(()=>`${t.key}
2459
+ `:"")+i(e)}function Xke(e,t){return Oz(e,t,0)}const Jke=e=>{const t=qi(),n=At();return(()=>{var r=Wke(),i=r.firstChild,o=i.firstChild,s=o.firstChild,a=s.nextSibling,l=o.nextSibling,c=l.nextSibling,u=c.firstChild,d=u.firstChild,h=d.firstChild;return j(i,b(kne,{class:"w-58.5 opacity-12 shrink-0"}),o),j(s,()=>n.t("error.page.title")),j(a,()=>n.t("error.page.description")),j(i,b(na,{get value(){return Xke(e.error,n.t)},readOnly:!0,copyable:!0,multiline:!0,class:"max-h-96 w-full font-mono text-xs no-scrollbar",get label(){return n.t("error.page.details.label")},hideLabel:!0}),l),j(l,b(Gt,{size:"large",get onClick(){return t.restart},get children(){return n.t("error.page.action.restart")}})),j(u,()=>n.t("error.page.report.prefix"),d),d.$$click=()=>t.openLink("https://github.com/devinoldenburg/codeplane/issues/new"),j(h,()=>n.t("error.page.report.issues")),j(c,b(ce,{get when(){return t.version},keyed:!0,children:f=>(()=>{var m=Gke();return j(m,()=>n.t("error.page.version",{version:f})),m})()}),null),r})()};or(["click"]);var Qke=ee('<div class="h-dvh w-screen flex flex-col items-center justify-center bg-background-base">'),e6e=ee('<div class="flex flex-col gap-2 w-full max-w-sm"><span class="text-12-regular text-text-base text-center"></span><div class="flex flex-col gap-1 bg-surface-base rounded-lg p-2">'),t6e=ee('<div class="h-dvh w-screen flex flex-col items-center justify-center bg-background-base gap-6 p-6"><div class="flex flex-col items-center max-w-md text-center"><p class="text-14-regular text-text-base"><span class="text-text-strong font-medium"></span></p><p class="mt-1 text-12-regular text-text-weak">'),n6e=ee('<button type=button class="flex items-center gap-3 w-full px-3 py-2 rounded-md hover:bg-surface-raised-base-hover transition-colors text-left"><span class="text-14-regular text-text-strong truncate">');const M2=()=>z(()=>import("./home-B7DxBTly.js"),[]),op=()=>z(()=>import("./notifications-CwW7x_Cu.js"),[]),sp=()=>z(()=>import("./settings-DAiABNBQ.js"),__vite__mapDeps([104,98,100,101,99])),ap=()=>z(()=>import("./session-xxBuNFt6.js").then(e=>e.s),__vite__mapDeps([105,98,100,103])),r6e=cp(M2),i6e=cp(op),o6e=cp(sp),s6e=cp(ap),a6e=()=>b(lu,{href:"/settings/modes"}),l6e=()=>b(lu,{href:"/settings/models"}),c6e=()=>b(lu,{href:"/settings/mcp"}),u6e=()=>b(lu,{href:"/settings/plugins"}),d6e=()=>b(lu,{href:"/settings/skills"});if(typeof location=="object"){const e=location.pathname;/\/session(?:\/|$)/.test(e)&&ap(),e.startsWith("/settings")&&sp(),e==="/notifications"&&op()}if(typeof window=="object"&&typeof requestIdleCallback=="function"){const e=()=>{M2(),sp(),op(),ap()};requestIdleCallback(e,{timeout:3e3})}else typeof window=="object"&&window.setTimeout(()=>{M2(),sp(),op(),ap()},1500);const Pz=()=>b(v6e,{get children(){return b(s6e,{})}}),f6e=()=>b(lu,{href:"session"}),h6e=()=>b(tR,{get children(){return b(Pz,{})}});function m6e(e){const t=At();return b(rU,{get value(){return{locale:t.intl,t:t.t}},get children(){return e.children}})}function p6e(e){const t=new Wre;return b(Hre,{client:t,get children(){return e.children}})}function g6e(e){return b(tae,{get children(){return b(p1e,{get children(){return b(G0e,{get children(){return b(c1e,{get children(){return b(Y1e,{get children(){return b(n1e,{get children(){return b(Lle,{get children(){return b(Ime,{get children(){return b(Ehe,{get children(){return b(mke,{get children(){return e.children}})}})}})}})}})}})}})}})}})}})}function v6e(e){return b(O1e,{get children(){return b(cme,{get children(){return b(I1e,{get children(){return b(She,{get children(){return e.children}})}})}})}})}function y6e(e){return b(g6e,{get children(){return[je(()=>e.appChildren),je(()=>e.children)]}})}function b6e(e){return b(Pne,{get children(){return[b(vne,{}),b(Lne,{get children(){return b(qse,{get locale(){return e.locale},get children(){return b(m6e,{get children(){return b(z9,{fallback:t=>b(Jke,{error:t}),get children(){return b(eU,{get children(){return b(hY,{get children(){return b(Vj,{component:gne,get children(){return e.children}})}})}})}})}})}})}})]}})}function w6e(e){const t=sr(),n=h4(),[r,i]=de("blocking"),[o,s]=Xo(()=>e.disableHealthCheck?!0:yse(function*(){if(!t.current)return!0;const{http:a,type:l}=t.current;for(;;){if((yield*pse(()=>n(a))).healthy)return!0;if(r()==="background"||l==="http")return!1}}).pipe(bse({duration:"10 seconds",orElse:()=>gse(!1)}),wse(vse(()=>i("background"))),kse));return b(j9,{get fallback(){return(()=>{var a=Qke();return j(a,b(wE,{class:"w-16 h-20 opacity-50 animate-pulse"})),a})()},get children(){return[je(()=>je(()=>r()==="blocking")()?o():o.latest),b(ce,{get when(){return o()},get fallback(){return b(k6e,{onRetry:()=>{r()==="background"&&s.refetch()},onServerSelected:a=>{i("blocking"),t.setActive(a),s.refetch()}})},get children(){return e.children}})]}})}function k6e(e){const t=At(),n=qi(),r=sr(),i=()=>r.list.filter(c=>dn.key(c)!==r.key),o=F(()=>r.name||r.key),s="\0server\0",a=F(()=>t.t("app.server.unreachable",{server:s}).split(s)),l=setInterval(()=>e.onRetry?.(),1e3);return fe(()=>clearInterval(l)),(()=>{var c=t6e(),u=c.firstChild,d=u.firstChild,h=d.firstChild,f=d.nextSibling;return j(u,b(wE,{class:"w-12 h-15 mb-4"}),d),j(d,()=>a()[0],h),j(h,o),j(d,()=>a()[1],null),j(f,()=>t.t("app.server.retrying")),j(c,b(ce,{get when(){return i().length>0},get children(){var m=e6e(),p=m.firstChild,g=p.nextSibling;return j(p,()=>t.t("app.server.otherServers")),j(g,b(Ut,{get each(){return i()},children:v=>{const y=dn.key(v);return(()=>{var w=n6e(),k=w.firstChild;return w.$$click=()=>{const x=n.serverManager?.instances.find(C=>C.key===y);if(x){n.serverManager?.open(x.id);return}e.onServerSelected?.(y)},j(k,()=>Om(v)),w})()}})),m}}),null),c})()}function x6e(e){const t=sr(),n=F(()=>`${t.key}
2460
2460
  ${t.scope.key}`);return b(ce,{get when(){return n()},keyed:!0,children:r=>e.children})}function S6e(e){return b(Cle,{get defaultServer(){return e.defaultServer},get disableHealthCheck(){return e.disableHealthCheck},get servers(){return e.servers},get children(){return b(w6e,{get disableHealthCheck(){return e.disableHealthCheck},get children(){return b(x6e,{get children(){return b(p6e,{get children(){return b(hhe,{get children(){return b(k0e,{get children(){return b(U9,{get component(){return e.router??dre},root:t=>b(y6e,{get appChildren(){return e.children},get children(){return t.children}}),get children(){return[b(Dr,{path:"/",component:r6e}),b(Dr,{path:"/notifications",component:i6e}),b(Dr,{path:"/modes",component:a6e}),b(Dr,{path:"/models",component:l6e}),b(Dr,{path:"/mcp",component:c6e}),b(Dr,{path:"/plugins",component:u6e}),b(Dr,{path:"/skills",component:d6e}),b(Dr,{path:"/settings/:tab?",component:o6e}),b(Dr,{path:"/cron",component:my}),b(Dr,{path:"/cron/worktree/:dir/session/:id",component:h6e}),b(Dr,{path:"/cron/worktree/:dir",component:my}),b(Dr,{path:"/cron/:projectID",component:my}),b(Dr,{path:"/:dir",component:tR,get children(){return[b(Dr,{path:"/",component:f6e}),b(Dr,{path:"/session/:id?",component:Pz})]}})]}})}})}})}})}})}})}})}or(["click"]);const py="ResizeObserver loop";let S9=!1;function k0(e){return typeof e=="string"?e.includes(py):e instanceof Error?e.message.includes(py):!e||typeof e!="object"?!1:"message"in e&&typeof e.message=="string"?e.message.includes(py):!1}function _6e(){if(S9||typeof window>"u")return;S9=!0,window.addEventListener("error",n=>{k0(n)&&(n.stopImmediatePropagation(),n.preventDefault())},!0),window.addEventListener("unhandledrejection",n=>{k0(n.reason)&&n.preventDefault()});const e=console.error.bind(console);console.error=(...n)=>{n.some(k0)||e(...n)};const t=window.reportError?.bind(window);t&&(window.reportError=(n=>{k0(n)||t(n)}))}const C6e="29.0.11";_6e();const Rz="codeplane.settings.dat:defaultServerUrl",Ss=window.codeplaneDesktop?.storage,O2=window.codeplaneDesktop?.notifications,I6e=e=>{if(Ss)try{return Ss.getItem(void 0,e)}catch{return null}if(typeof localStorage>"u")return null;try{return localStorage.getItem(e)}catch{return null}},T6e=(e,t)=>{if(Ss){try{if(t!==null){Ss.setItem(void 0,e,t);return}Ss.removeItem(void 0,e)}catch{return}return}if(!(typeof localStorage>"u"))try{if(t!==null){localStorage.setItem(e,t);return}localStorage.removeItem(e)}catch{return}},Nz=()=>I6e(Rz),E6e=e=>T6e(Rz,e);O2?.onClick?.(e=>{rN(e)});const $6e=async(e,t,n)=>{if(O2?.notify&&await O2.notify({title:e,description:t,href:n}).catch(()=>!1))return!0;if(document.visibilityState==="visible"&&document.hasFocus()||!("Notification"in window)||(Notification.permission==="default"?await Notification.requestPermission().catch(()=>"denied"):Notification.permission)!=="granted")return!1;const o=new Notification(e,{body:t??"",icon:"/favicon-96x96-v3.png"});return o.onclick=()=>{rN(n),o.close()},!0},A6e=e=>{window.open(e,"_blank")},L6e=()=>{window.history.back()},D6e=()=>{window.history.forward()},_9=document.getElementById("root"),Fk=()=>location.hostname.includes("example.invalid")?"http://localhost:4096":location.origin,C9=async(e,t=3e4)=>{const n=Date.now();for(;Date.now()-n<t;){try{if((await fetch(`${e}/global/health`,{method:"GET",cache:"no-store"})).ok)return!0}catch{}await new Promise(r=>setTimeout(r,500))}return!1},M6e=async()=>{const e=Fk();try{const t=await fetch(`${e}/global/restart`,{method:"POST",headers:{"Content-Type":"application/json"}});t.ok&&(await t.json().catch(()=>({}))).method==="exit"&&await C9(e)}catch{await C9(e)}window.location.reload()},I9=()=>{const e=Nz();return e||Fk()},T9=e=>{if(e==="darwin"||/mac/i.test(e))return"macos";if(e==="win32"||/win/i.test(e))return"windows";if(e==="linux"||/linux/i.test(e))return"linux"},zz=()=>{const e=window.codeplaneDesktop?.platform;if(e)return{desktop:!0,os:T9(e)};if(!(typeof navigator!="object"||!/electron/i.test(navigator.userAgent)))return{desktop:!0,os:T9(navigator.platform||navigator.userAgent)}},gy=zz();if(typeof document<"u"){const e=document.documentElement;gy?(e.dataset.desktop="true",gy.os&&(e.dataset.os=gy.os)):e.dataset.desktop="false";const t=window.codeplaneDesktop?.window,n=r=>{e.dataset.fullscreen=r.fullscreen?"true":"false",e.dataset.windowFocused=r.focused?"true":"false",e.dataset.maximized=r.maximized?"true":"false"};t?.state&&n(t.state),t?.onStateChange?.(n)}const Oi=window.codeplaneDesktop?.serverManager,O6e=()=>(Oi?.instances??[]).map(e=>({type:"http",displayName:e.label,http:{key:e.key,remoteUrl:e.remoteUrl,url:e.proxyUrl}})),P6e=()=>Oi?.currentKey??Oi?.defaultKey??Oi?.instances[0]?.key??null,R6e={platform:"web",...zz(),version:window.codeplaneDesktop?.version??C6e,desktopAppVersion:window.codeplaneDesktop?.version,serverManager:Oi,openLink:A6e,back:L6e,forward:D6e,restart:M6e,notify:$6e,storage:Ss?e=>({getItem:t=>Ss.getItem(e,t),setItem:(t,n)=>Ss.setItem(e,t,n),removeItem:t=>Ss.removeItem(e,t)}):void 0,getDefaultServer:async()=>{if(Oi){const t=await Oi.getDefaultKey();return t?dn.Key.make(t):null}const e=Nz();return e?dn.Key.make(e):null},setDefaultServer:e=>{if(Oi)return Oi.setDefaultKey(e??null).then(()=>{});E6e(e)},systemPermissions:window.codeplaneDesktop?.systemPermissions,relaunchShell:window.codeplaneDesktop?.relaunchShell?async()=>(await window.codeplaneDesktop.relaunchShell()).ok:void 0};if(_9 instanceof HTMLElement){const e=Oi?O6e():[{type:"http",http:{url:Fk()}}],t=Oi?P6e():dn.Key.make(I9());Lj(()=>b(Ase,{value:R6e,get children(){return b(b6e,{get children(){return b(S6e,{get defaultServer(){return dn.Key.make(t??I9())},get servers(){return[...e]},disableHealthCheck:!Oi})}})}}),_9)}export{T3e as $,zl as A,Gt as B,Jn as C,on as D,de as E,yf as F,FN as G,Ek as H,Jr as I,Kt as J,Il as K,Ut as L,Cn as M,De as N,Ct as O,dt as P,or as Q,Gi as R,dn as S,na as T,tr as U,Ye as V,kwe as W,ne as X,U0e as Y,Mwe as Z,pr as _,p_ as a,U9 as a$,mg as a0,pu as a1,gt as a2,Ybe as a3,ri as a4,L3e as a5,M3e as a6,Yf as a7,w9 as a8,bn as a9,jge as aA,Kge as aB,b2 as aC,Qo as aD,Ln as aE,Ane as aF,fk as aG,hu as aH,Z1e as aI,b9 as aJ,m3e as aK,eae as aL,h3e as aM,Qse as aN,p3e as aO,b3e as aP,v3e as aQ,g3e as aR,y3e as aS,A3e as aT,w2 as aU,Ub as aV,Vo as aW,t1e as aX,r5e as aY,n5e as aZ,U3e as a_,Jge as aa,z as ab,_m as ac,Xf as ad,Uc as ae,rt as af,se as ag,jr as ah,Kg as ai,Ge as aj,an as ak,M$ as al,$3e as am,_r as an,Rv as ao,H5e as ap,Xe as aq,hg as ar,Di as as,Xr as at,Bo as au,Fl as av,UY as aw,ot as ax,xr as ay,hf as az,ko as b,OR as b$,j9 as b0,wY as b1,Yj as b2,Bx as b3,D3e as b4,ir as b5,In as b6,_we as b7,Os as b8,z2e as b9,a3e as bA,Ax as bB,z0e as bC,g0 as bD,lf as bE,Jt as bF,wd as bG,Dle as bH,E3e as bI,oa as bJ,I3e as bK,O3e as bL,d3e as bM,up as bN,x2 as bO,y1e as bP,Yhe as bQ,LO as bR,Ik as bS,XR as bT,ZR as bU,JR as bV,sN as bW,tN as bX,z6e as bY,Vg as bZ,qg as b_,XS as ba,Ne as bb,DR as bc,Ig as bd,TR as be,$k as bf,MR as bg,Cg as bh,wt as bi,st as bj,jN as bk,Ve as bl,gr as bm,NN as bn,ut as bo,ze as bp,pt as bq,vr as br,zN as bs,en as bt,$r as bu,cE as bv,gne as bw,nN as bx,Ao as by,E1e as bz,sr as c,nh as c0,th as c1,Si as c2,_k as c3,Ck as c4,fp as c5,po as c6,La as c7,Aa as c8,dp as c9,Lj as cA,i3e as cB,p9 as cC,nX as cD,n3e as cE,b7 as cF,j3e as cG,QR as cH,fve as cI,tp as cJ,C3e as cK,N3e as cL,z3e as cM,cu as cN,l3e as cO,Ho as cP,f3e as cQ,rve as cR,C0e as cS,Ol as cT,Xb as cU,Lhe as cV,U6e as cW,o3e as cX,K6e as cY,he as ca,eh as cb,Cl as cc,kf as cd,s3e as ce,R3e as cf,$be as cg,F3e as ch,Iwe as ci,fy as cj,ZX as ck,Ww as cl,ub as cm,j6e as cn,So as co,F6e as cp,qj as cq,R2 as cr,_O as cs,eR as ct,iwe as cu,e3e as cv,VQ as cw,h8 as cx,r3e as cy,t3e as cz,k$ as d,qi as e,At as f,h4 as g,Je as h,Ad as i,F as j,re as k,j as l,b as m,Mm as n,fe as o,je as p,ce as q,b2e as r,y2e as s,Ht as t,xo as u,Yc as v,Xo as w,St as x,ee as y,$t as z};